@pega/react-sdk-overrides 0.24.3 → 0.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/designSystemExtension/AlertBanner/AlertBanner.tsx +1 -1
- package/lib/designSystemExtension/Banner/Banner.tsx +1 -1
- package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
- package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +11 -2
- package/lib/designSystemExtension/DetailsFields/DetailsFields.tsx +4 -4
- package/lib/designSystemExtension/FieldGroup/FieldGroup.tsx +4 -4
- package/lib/designSystemExtension/FieldGroupList/FieldGroupList.tsx +4 -4
- package/lib/designSystemExtension/FieldValueList/FieldValueList.tsx +6 -6
- package/lib/designSystemExtension/Operator/Operator.tsx +6 -5
- package/lib/designSystemExtension/Pulse/Pulse.tsx +2 -2
- package/lib/designSystemExtension/RichTextEditor/RichTextEditor.tsx +3 -2
- package/lib/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx +1 -1
- package/lib/field/AutoComplete/AutoComplete.tsx +4 -4
- package/lib/field/CancelAlert/CancelAlert.tsx +4 -7
- package/lib/field/Checkbox/Checkbox.tsx +4 -4
- package/lib/field/Currency/Currency.tsx +10 -7
- package/lib/field/Date/Date.tsx +27 -42
- package/lib/field/DateTime/DateTime.tsx +39 -36
- package/lib/field/Decimal/Decimal.tsx +9 -4
- package/lib/field/Dropdown/Dropdown.tsx +29 -22
- package/lib/field/Email/Email.tsx +29 -8
- package/lib/field/Group/Group.tsx +2 -2
- package/lib/field/Integer/Integer.tsx +22 -8
- package/lib/field/Multiselect/Multiselect.tsx +8 -14
- package/lib/field/Multiselect/utils.ts +1 -1
- package/lib/field/Percentage/Percentage.tsx +8 -4
- package/lib/field/Phone/Phone.tsx +22 -12
- package/lib/field/Phone/config-ext.json +8 -0
- package/lib/field/RadioButtons/RadioButtons.tsx +3 -6
- package/lib/field/RichText/RichText.tsx +1 -1
- package/lib/field/RichText/config-ext.json +10 -0
- package/lib/field/ScalarList/ScalarList.tsx +3 -4
- package/lib/field/SemanticLink/SemanticLink.tsx +4 -4
- package/lib/field/TextArea/TextArea.tsx +26 -8
- package/lib/field/TextContent/TextContent.tsx +1 -1
- package/lib/field/TextInput/TextInput.tsx +2 -2
- package/lib/field/Time/Time.tsx +28 -21
- package/lib/field/URL/URL.tsx +26 -7
- package/lib/field/UserReference/UserReference.tsx +3 -5
- package/lib/helpers/common-utils.ts +24 -1
- package/lib/helpers/field-group-utils.ts +2 -2
- package/lib/helpers/formatters/Currency.ts +11 -16
- package/lib/helpers/formatters/common.ts +2 -1
- package/lib/helpers/formatters/index.ts +2 -4
- package/lib/helpers/simpleTableHelpers.ts +1 -1
- package/lib/infra/ActionButtons/ActionButtons.tsx +3 -3
- package/lib/infra/Assignment/Assignment.tsx +38 -12
- package/lib/infra/Containers/FlowContainer/FlowContainer.tsx +16 -28
- package/lib/infra/Containers/FlowContainer/helpers.ts +1 -5
- package/lib/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx +9 -4
- package/lib/infra/Containers/ModalViewContainer/ModalViewContainer.tsx +8 -8
- package/lib/infra/Containers/SimpleView/helper.ts +1 -1
- package/lib/infra/Containers/ViewContainer/ViewContainer.tsx +1 -1
- package/lib/infra/DashboardFilter/DashboardFilter.tsx +4 -6
- package/lib/infra/DashboardFilter/filterUtils.tsx +3 -4
- package/lib/infra/DeferLoad/DeferLoad.tsx +8 -8
- package/lib/infra/MultiStep/MultiStep.tsx +15 -14
- package/lib/infra/NavBar/NavBar.css +1 -0
- package/lib/infra/NavBar/NavBar.tsx +25 -17
- package/lib/infra/RootContainer/RootContainer.tsx +5 -6
- package/lib/infra/Stages/Stages.tsx +4 -4
- package/lib/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.tsx +4 -3
- package/lib/infra/VerticalTabs/VerticalTabs/VerticalTabs.tsx +2 -2
- package/lib/infra/View/View.tsx +37 -3
- package/lib/template/AdvancedSearch/AdvancedSearch.tsx +87 -0
- package/lib/template/AdvancedSearch/SearchGroup/persistUtils.ts +58 -0
- package/lib/template/AdvancedSearch/SearchGroups/SearchGroups.tsx +245 -0
- package/lib/template/AdvancedSearch/SearchGroups/hooks.ts +37 -0
- package/lib/template/AdvancedSearch/SearchGroups/index.tsx +1 -0
- package/lib/template/AdvancedSearch/SearchGroups/utils.ts +29 -0
- package/lib/template/AdvancedSearch/TemplateContext.ts +11 -0
- package/lib/template/AdvancedSearch/config-ext.json +9 -0
- package/lib/template/AdvancedSearch/index.tsx +1 -0
- package/lib/template/AppShell/AppShell.tsx +60 -10
- package/lib/template/BannerPage/config-ext.json +9 -0
- package/lib/template/CaseView/CaseView.tsx +10 -9
- package/lib/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +7 -7
- package/lib/template/Confirmation/Confirmation.tsx +3 -2
- package/lib/template/DataReference/DataReference.tsx +317 -107
- package/lib/template/DataReference/DataReferenceAdvancedSearchContext.js +10 -0
- package/lib/template/DataReference/SearchForm.tsx +148 -0
- package/lib/template/DataReference/utils.js +90 -0
- package/lib/template/DefaultForm/utils/index.ts +1 -3
- package/lib/template/Details/Details/Details.tsx +2 -2
- package/lib/template/Details/DetailsSubTabs/DetailsSubTabs.tsx +3 -3
- package/lib/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx +2 -2
- package/lib/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx +2 -2
- package/lib/template/Details/DynamicTabs/DynamicTabs.tsx +4 -4
- package/lib/template/FieldGroupTemplate/FieldGroupTemplate.tsx +10 -5
- package/lib/template/InlineDashboard/InlineDashboard.tsx +2 -2
- package/lib/template/InlineDashboardPage/config-ext.json +9 -0
- package/lib/template/ListView/ListView.tsx +216 -123
- package/lib/template/ListView/utils.ts +38 -6
- package/lib/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.tsx +2 -2
- package/lib/template/OneColumn/OneColumn/OneColumn.tsx +2 -2
- package/lib/template/PromotedFilters/PromotedFilters.tsx +1 -2
- package/lib/template/SimpleTable/SimpleTable/SimpleTable.tsx +0 -2
- package/lib/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +110 -86
- package/lib/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.tsx +2 -4
- package/lib/template/SubTabs/SubTabs.tsx +2 -2
- package/lib/template/SubTabs/tabUtils.ts +118 -1
- package/lib/template/TwoColumn/TwoColumn/TwoColumn.tsx +2 -2
- package/lib/template/TwoColumn/TwoColumnTab/TwoColumnTab.tsx +2 -2
- package/lib/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.tsx +2 -2
- package/lib/template/WssNavBar/WssNavBar.tsx +9 -9
- package/lib/widget/AppAnnouncement/AppAnnouncement.tsx +2 -2
- package/lib/widget/Attachment/Attachment.css +1 -0
- package/lib/widget/Attachment/Attachment.tsx +7 -9
- package/lib/widget/CaseHistory/CaseHistory.tsx +12 -10
- package/lib/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +1 -1
- package/lib/widget/FileUtility/FileUtility/FileUtility.tsx +5 -4
- package/lib/widget/Followers/Followers.tsx +2 -2
- package/lib/widget/QuickCreate/QuickCreate.tsx +0 -1
- package/lib/widget/QuickCreate/config-ext.json +9 -0
- package/lib/widget/SummaryItem/SummaryItem.tsx +4 -3
- package/lib/widget/ToDo/ToDo.tsx +92 -22
- package/package.json +1 -1
- /package/lib/infra/Containers/{helpers.ts → container-helpers.ts} +0 -0
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
/* eslint-disable no-nested-ternary */
|
|
2
2
|
|
|
3
3
|
import { useState, useEffect, useContext } from 'react';
|
|
4
|
-
import
|
|
5
|
-
import { Card, CardHeader, Avatar, Typography } from '@material
|
|
6
|
-
import { Alert } from '@material-ui/lab';
|
|
7
|
-
import DayjsUtils from '@date-io/dayjs';
|
|
8
|
-
import { MuiPickersUtilsProvider } from '@material-ui/pickers';
|
|
4
|
+
import makeStyles from '@mui/styles/makeStyles';
|
|
5
|
+
import { Alert, Card, CardHeader, Avatar, Typography } from '@mui/material';
|
|
9
6
|
|
|
10
7
|
import StoreContext from '@pega/react-sdk-components/lib/bridge/Context/StoreContext';
|
|
11
8
|
import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
12
|
-
import { isContainerInitialized } from '@pega/react-sdk-components/lib/components/helpers';
|
|
9
|
+
import { isContainerInitialized } from '@pega/react-sdk-components/lib/components/infra/Containers/container-helpers';
|
|
13
10
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
14
|
-
import { withSimpleViewContainerRenderer } from '
|
|
11
|
+
import { withSimpleViewContainerRenderer } from '@pega/react-sdk-components/lib/components/infra/Containers/SimpleView/SimpleView';
|
|
15
12
|
|
|
16
13
|
import { addContainerItem, getToDoAssignments, showBanner, hasContainerItems } from './helpers';
|
|
17
14
|
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
15
|
+
import { LocalizationProvider } from '@mui/x-date-pickers';
|
|
16
|
+
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
|
|
18
17
|
|
|
19
18
|
interface FlowContainerProps extends PConnProps {
|
|
20
19
|
// If any, enter additional props that only exist on this component
|
|
@@ -118,12 +117,7 @@ export const FlowContainer = (props: FlowContainerProps) => {
|
|
|
118
117
|
if (caseViewMode && caseViewMode === 'review') {
|
|
119
118
|
return true;
|
|
120
119
|
}
|
|
121
|
-
|
|
122
|
-
if (caseViewMode && caseViewMode === 'perform') {
|
|
123
|
-
return false;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
return true;
|
|
120
|
+
return !(caseViewMode && caseViewMode === 'perform');
|
|
127
121
|
}
|
|
128
122
|
|
|
129
123
|
function initComponent() {
|
|
@@ -182,11 +176,7 @@ export const FlowContainer = (props: FlowContainerProps) => {
|
|
|
182
176
|
|
|
183
177
|
const childCases = ourPConn.getValue(pCoreConstants.CASE_INFO.CHILD_ASSIGNMENTS, ''); // 2nd arg empty string until typedefs properly allow optional
|
|
184
178
|
// const allAssignments = [];
|
|
185
|
-
|
|
186
|
-
if (childCases && childCases.length > 0) {
|
|
187
|
-
return true;
|
|
188
|
-
}
|
|
189
|
-
return false;
|
|
179
|
+
return !!(childCases && childCases.length > 0);
|
|
190
180
|
}
|
|
191
181
|
|
|
192
182
|
function hasAssignments() {
|
|
@@ -267,17 +257,15 @@ export const FlowContainer = (props: FlowContainerProps) => {
|
|
|
267
257
|
// if have caseMessage show message and end
|
|
268
258
|
const theCaseMessages = localizedVal(thePConn.getValue('caseMessages', ''), localeCategory); // 2nd arg empty string until typedefs properly allow optional
|
|
269
259
|
|
|
270
|
-
|
|
260
|
+
// caseMessages's behavior has changed in 24.2, and hence it doesn't let Optional Action work.
|
|
261
|
+
// Changing the below condition for now. Was: (theCaseMessages || !hasAssignments())
|
|
262
|
+
if (!hasAssignments()) {
|
|
271
263
|
// Temp fix for 8.7 change: confirmationNote no longer coming through in caseMessages$.
|
|
272
264
|
// So, if we get here and caseMessages$ is empty, use default value in DX API response
|
|
273
265
|
setCaseMessages(theCaseMessages || localizedVal('Thank you! The next step in this case has been routed appropriately.', localeCategory));
|
|
274
266
|
setHasCaseMessages(true);
|
|
275
267
|
setShowConfirm(true);
|
|
276
268
|
|
|
277
|
-
// publish this "assignmentFinished" for mashup, need to get approved as a standard
|
|
278
|
-
// @ts-ignore - second parameter “payload” for publish method should be optional
|
|
279
|
-
PCore.getPubSubUtils().publish('assignmentFinished');
|
|
280
|
-
|
|
281
269
|
// debugger;
|
|
282
270
|
setCheckSvg(Utils.getImageSrc('check', Utils.getSDKStaticConentUrl()));
|
|
283
271
|
} else {
|
|
@@ -289,7 +277,7 @@ export const FlowContainer = (props: FlowContainerProps) => {
|
|
|
289
277
|
|
|
290
278
|
const caseId = thePConn.getCaseSummary().content.pyID;
|
|
291
279
|
const urgency = getPConnect().getCaseSummary().assignments ? getPConnect().getCaseSummary().assignments?.[0].urgency : '';
|
|
292
|
-
const operatorInitials = Utils.getInitials(PCore.getEnvironmentInfo().getOperatorName());
|
|
280
|
+
const operatorInitials = Utils.getInitials(PCore.getEnvironmentInfo().getOperatorName() || '');
|
|
293
281
|
|
|
294
282
|
const bShowBanner = showBanner(getPConnect);
|
|
295
283
|
|
|
@@ -313,21 +301,21 @@ export const FlowContainer = (props: FlowContainerProps) => {
|
|
|
313
301
|
avatar={<Avatar className={`${classes.avatar} psdk-avatar`}>{operatorInitials}</Avatar>}
|
|
314
302
|
/>
|
|
315
303
|
{displayPageMessages()}
|
|
316
|
-
<
|
|
304
|
+
<LocalizationProvider dateAdapter={AdapterDayjs}>
|
|
317
305
|
<Assignment getPConnect={getPConnect} itemKey={itemKey}>
|
|
318
306
|
{rootViewElement}
|
|
319
307
|
</Assignment>
|
|
320
|
-
</
|
|
308
|
+
</LocalizationProvider>
|
|
321
309
|
</Card>
|
|
322
310
|
) : (
|
|
323
311
|
<Card className={`${classes.root} psdk-root`}>
|
|
324
312
|
<Typography variant='h6'>{localizedVal(containerName, undefined, key)}</Typography>
|
|
325
313
|
{displayPageMessages()}
|
|
326
|
-
<
|
|
314
|
+
<LocalizationProvider dateAdapter={AdapterDayjs}>
|
|
327
315
|
<Assignment getPConnect={getPConnect} itemKey={itemKey}>
|
|
328
316
|
{rootViewElement}
|
|
329
317
|
</Assignment>
|
|
330
|
-
</
|
|
318
|
+
</LocalizationProvider>
|
|
331
319
|
</Card>
|
|
332
320
|
)
|
|
333
321
|
) : (
|
|
@@ -88,11 +88,7 @@ export const hasAssignments = pConnect => {
|
|
|
88
88
|
const assignments = pConnect.getValue(CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS);
|
|
89
89
|
const childCasesAssignments = getChildCaseAssignments(pConnect);
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
if (assignments || childCasesAssignments || isCaseWideLocalAction(pConnect)) {
|
|
93
|
-
return true;
|
|
94
|
-
}
|
|
95
|
-
return false;
|
|
91
|
+
return !!(assignments || childCasesAssignments || isCaseWideLocalAction(pConnect));
|
|
96
92
|
};
|
|
97
93
|
|
|
98
94
|
export const showBanner = getPConnect => {
|
package/lib/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
|
-
import Button from '@material
|
|
3
|
-
import
|
|
2
|
+
import Button from '@mui/material/Button';
|
|
3
|
+
import makeStyles from '@mui/styles/makeStyles';
|
|
4
4
|
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
5
5
|
|
|
6
6
|
const useStyles = makeStyles((/* theme */) => ({
|
|
@@ -49,10 +49,15 @@ function ListViewActionButtons(props: ListViewActionButtonsProps) {
|
|
|
49
49
|
getPConnect()
|
|
50
50
|
.getActionsApi()
|
|
51
51
|
.submitEmbeddedDataModal(context)
|
|
52
|
-
.then(() => {
|
|
52
|
+
.then(() => {
|
|
53
|
+
closeActionsDialog();
|
|
54
|
+
})
|
|
55
|
+
.catch(err => {
|
|
56
|
+
// eslint-disable-next-line no-console
|
|
57
|
+
console.log(err);
|
|
58
|
+
})
|
|
53
59
|
.finally(() => {
|
|
54
60
|
setIsDisabled(false);
|
|
55
|
-
closeActionsDialog();
|
|
56
61
|
});
|
|
57
62
|
}}
|
|
58
63
|
>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createElement, useEffect, useRef, useState } from 'react';
|
|
2
|
-
import Dialog from '@material
|
|
3
|
-
import DialogContent from '@material
|
|
4
|
-
import DialogTitle from '@material
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
2
|
+
import Dialog from '@mui/material/Dialog';
|
|
3
|
+
import DialogContent from '@mui/material/DialogContent';
|
|
4
|
+
import DialogTitle from '@mui/material/DialogTitle';
|
|
5
|
+
import makeStyles from '@mui/styles/makeStyles';
|
|
6
|
+
import { LocalizationProvider } from '@mui/x-date-pickers';
|
|
7
|
+
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
|
|
8
8
|
import difference from 'lodash.difference';
|
|
9
9
|
|
|
10
10
|
import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
|
|
@@ -315,7 +315,7 @@ export default function ModalViewContainer(props: ModalViewContainerProps) {
|
|
|
315
315
|
</DialogTitle>
|
|
316
316
|
<DialogContent className={`${classes.dlgContent} psdk-dialog-content`}>
|
|
317
317
|
{bShowModal ? (
|
|
318
|
-
<
|
|
318
|
+
<LocalizationProvider dateAdapter={AdapterDayjs}>
|
|
319
319
|
<Assignment
|
|
320
320
|
getPConnect={createdView.configObject.getPConnect}
|
|
321
321
|
itemKey={itemKey}
|
|
@@ -327,7 +327,7 @@ export default function ModalViewContainer(props: ModalViewContainerProps) {
|
|
|
327
327
|
>
|
|
328
328
|
{arNewChildrenAsReact}
|
|
329
329
|
</Assignment>
|
|
330
|
-
</
|
|
330
|
+
</LocalizationProvider>
|
|
331
331
|
) : null}
|
|
332
332
|
</DialogContent>
|
|
333
333
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect, createElement } from 'react';
|
|
2
2
|
|
|
3
3
|
import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
|
|
4
|
-
import { isContainerInitialized } from '@pega/react-sdk-components/lib/components/helpers';
|
|
4
|
+
import { isContainerInitialized } from '@pega/react-sdk-components/lib/components/infra/Containers/container-helpers';
|
|
5
5
|
|
|
6
6
|
const processRootViewDetails = (rootView, containerItem, options) => {
|
|
7
7
|
const {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { createElement, useContext, useEffect, useState } from 'react';
|
|
2
|
-
import { Box, CircularProgress } from '@material
|
|
2
|
+
import { Box, CircularProgress } from '@mui/material';
|
|
3
3
|
|
|
4
4
|
import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
|
|
5
5
|
import StoreContext from '@pega/react-sdk-components/lib/bridge/Context/StoreContext';
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-shadow */
|
|
2
|
-
/* eslint-disable operator-assignment */
|
|
3
2
|
import { forwardRef, PropsWithChildren, useEffect, useRef, useState } from 'react';
|
|
4
|
-
import { TextField } from '@material
|
|
5
|
-
import { v4 as uuidv4 } from 'uuid';
|
|
3
|
+
import { TextField } from '@mui/material';
|
|
6
4
|
import { debounce } from 'throttle-debounce';
|
|
7
5
|
import DatePicker from 'react-datepicker';
|
|
8
6
|
|
|
@@ -20,8 +18,8 @@ interface DashboardFilterProps extends PConnProps {
|
|
|
20
18
|
}
|
|
21
19
|
|
|
22
20
|
export default function DashboardFilter(props: PropsWithChildren<DashboardFilterProps>) {
|
|
23
|
-
const { children
|
|
24
|
-
const { current: filterId } = useRef(
|
|
21
|
+
const { children, name, filterProp, type = '', metadata = null, getPConnect } = props;
|
|
22
|
+
const { current: filterId } = useRef(crypto.randomUUID());
|
|
25
23
|
|
|
26
24
|
const [startDate, setStartDate] = useState(null);
|
|
27
25
|
const [endDate, setEndDate] = useState(null);
|
|
@@ -35,7 +33,7 @@ export default function DashboardFilter(props: PropsWithChildren<DashboardFilter
|
|
|
35
33
|
} else if (type === 'RadioButtons') {
|
|
36
34
|
const reference = getPConnect().getFullReference() + filterProp;
|
|
37
35
|
const radList = document.getElementsByName(reference);
|
|
38
|
-
for (let i = 0; i < radList.length; i
|
|
36
|
+
for (let i = 0; i < radList.length; i += 1) {
|
|
39
37
|
if ((radList[i] as HTMLInputElement).value === '') {
|
|
40
38
|
(radList[i] as HTMLInputElement).checked = true;
|
|
41
39
|
} else {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable prefer-template */
|
|
2
2
|
/** This file contains various utility methods to generate filter components, regionLayout data, filter expressions, etc. */
|
|
3
3
|
|
|
4
|
-
import { Grid, Link } from '@material
|
|
4
|
+
import { Grid, Link } from '@mui/material';
|
|
5
5
|
|
|
6
6
|
import DashboardFilter from './DashboardFilter';
|
|
7
7
|
|
|
@@ -46,7 +46,6 @@ export const createFilterComponent = (getPConnect, filterMeta, index) => {
|
|
|
46
46
|
}
|
|
47
47
|
let propInfo: any = PCore.getMetadataUtils().getPropertyMetadata(cleanedName, filterMeta.config.ruleClass);
|
|
48
48
|
if (!propInfo) {
|
|
49
|
-
// @ts-ignore - PCore.getMetadataUtils().getPropertyMetadata - An argument for 'currentClassID' was not provided.
|
|
50
49
|
propInfo = PCore.getMetadataUtils().getPropertyMetadata(cleanedName);
|
|
51
50
|
}
|
|
52
51
|
const { type: propertyType } = propInfo || { type: 'Text' };
|
|
@@ -78,13 +77,13 @@ export const buildFilterComponents = (getPConnect, allFilters) => {
|
|
|
78
77
|
const filterComponents = allFilters.children.map((filter, index) => createFilterComponent(getPConnect, filter, index));
|
|
79
78
|
if (filterComponents && filterComponents.length > 0) {
|
|
80
79
|
filterComponents.push(
|
|
81
|
-
<Grid>
|
|
80
|
+
<Grid style={{ display: 'flex', alignItems: 'center' }}>
|
|
82
81
|
<Link
|
|
83
82
|
style={{ cursor: 'pointer' }}
|
|
84
83
|
onClick={() => {
|
|
85
|
-
// @ts-ignore - second parameter “payload” for publish method should be optional
|
|
86
84
|
PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.EVENT_DASHBOARD_FILTER_CLEAR_ALL);
|
|
87
85
|
}}
|
|
86
|
+
underline='hover'
|
|
88
87
|
>
|
|
89
88
|
Clear All
|
|
90
89
|
</Link>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState, useEffect, createElement } from 'react';
|
|
2
|
-
import { Box, Card, CircularProgress } from '@material
|
|
3
|
-
import
|
|
2
|
+
import { Box, Card, CircularProgress } from '@mui/material';
|
|
3
|
+
import makeStyles from '@mui/styles/makeStyles';
|
|
4
4
|
|
|
5
5
|
import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
|
|
6
6
|
|
|
@@ -12,6 +12,7 @@ interface DeferLoadProps extends PConnProps {
|
|
|
12
12
|
isChildDeferLoad?: boolean;
|
|
13
13
|
isTab: boolean;
|
|
14
14
|
deferLoadId: string;
|
|
15
|
+
lastUpdateCaseTime: any;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
//
|
|
@@ -34,7 +35,7 @@ const useStyles = makeStyles(theme => ({
|
|
|
34
35
|
}));
|
|
35
36
|
|
|
36
37
|
export default function DeferLoad(props: DeferLoadProps) {
|
|
37
|
-
const { getPConnect, name, deferLoadId, isTab } = props;
|
|
38
|
+
const { getPConnect, name, deferLoadId, isTab, lastUpdateCaseTime } = props;
|
|
38
39
|
const [content, setContent] = useState<any>(null);
|
|
39
40
|
const [isLoading, setLoading] = useState(true);
|
|
40
41
|
const [currentLoadedAssignment, setCurrentLoadedAssignment] = useState('');
|
|
@@ -69,8 +70,8 @@ export default function DeferLoad(props: DeferLoadProps) {
|
|
|
69
70
|
const getViewOptions = () => ({
|
|
70
71
|
viewContext: resourceType,
|
|
71
72
|
pageClass: loadViewCaseID ? '' : (pConnect.getDataObject('') as any).pyPortal.classID, // 2nd arg empty string until typedef allows optional
|
|
72
|
-
container: isContainerPreview ? 'preview' :
|
|
73
|
-
containerName: isContainerPreview ? 'preview' :
|
|
73
|
+
container: isContainerPreview ? 'preview' : undefined,
|
|
74
|
+
containerName: isContainerPreview ? 'preview' : undefined,
|
|
74
75
|
updateData: isContainerPreview
|
|
75
76
|
});
|
|
76
77
|
|
|
@@ -95,7 +96,7 @@ export default function DeferLoad(props: DeferLoadProps) {
|
|
|
95
96
|
}
|
|
96
97
|
};
|
|
97
98
|
const configObject = PCore.createPConnect(config);
|
|
98
|
-
configObject.getPConnect().setInheritedProp('displayMode', '
|
|
99
|
+
configObject.getPConnect().setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
99
100
|
setContent(createElement(createPConnectComponent(), configObject));
|
|
100
101
|
if (deferLoadId) {
|
|
101
102
|
PCore.getDeferLoadManager().stop(deferLoadId, getPConnect().getContextName());
|
|
@@ -113,7 +114,6 @@ export default function DeferLoad(props: DeferLoadProps) {
|
|
|
113
114
|
getPConnect()
|
|
114
115
|
.getActionsApi()
|
|
115
116
|
.showData(name, dataContext, dataContextParameters, {
|
|
116
|
-
// @ts-ignore - Type 'boolean' is not assignable to type 'string'
|
|
117
117
|
skipSemanticUrl: true,
|
|
118
118
|
// @ts-ignore
|
|
119
119
|
isDeferLoaded: true
|
|
@@ -145,7 +145,7 @@ export default function DeferLoad(props: DeferLoadProps) {
|
|
|
145
145
|
console.log(`deferload: ${error}`);
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
|
-
}, [name, getPConnect, currentLoadedAssignment]);
|
|
148
|
+
}, [name, getPConnect, currentLoadedAssignment, lastUpdateCaseTime]);
|
|
149
149
|
/* TODO Cosmos need to handle for now added a wrapper div with pos relative */
|
|
150
150
|
let deferLoadContent;
|
|
151
151
|
if (isLoading) {
|
|
@@ -11,7 +11,7 @@ interface MultiStepProps extends PConnProps {
|
|
|
11
11
|
actionButtons: any[];
|
|
12
12
|
onButtonPress: any;
|
|
13
13
|
bIsVertical: boolean;
|
|
14
|
-
arNavigationSteps: any
|
|
14
|
+
arNavigationSteps: any;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
export default function MultiStep(props: PropsWithChildren<MultiStepProps>) {
|
|
@@ -21,6 +21,12 @@ export default function MultiStep(props: PropsWithChildren<MultiStepProps>) {
|
|
|
21
21
|
const { getPConnect, children, itemKey = '', actionButtons, onButtonPress } = props;
|
|
22
22
|
const { bIsVertical, arNavigationSteps } = props;
|
|
23
23
|
|
|
24
|
+
let currentStep = arNavigationSteps.find(({ visited_status: vs }) => vs === 'current');
|
|
25
|
+
if (!currentStep) {
|
|
26
|
+
const lastActiveStepIndex = arNavigationSteps.findLastIndex(({ visited_status: vs }) => vs === 'success');
|
|
27
|
+
currentStep = arNavigationSteps[lastActiveStepIndex >= 0 ? lastActiveStepIndex : 0];
|
|
28
|
+
}
|
|
29
|
+
|
|
24
30
|
// const svgCurrent = Utils.getImageSrc("circle-solid", Utils.getSDKStaticConentUrl());
|
|
25
31
|
// const svgNotCurrent = Utils.getImageSrc("circle-solid", Utils.getSDKStaticConentUrl());
|
|
26
32
|
|
|
@@ -48,16 +54,16 @@ export default function MultiStep(props: PropsWithChildren<MultiStepProps>) {
|
|
|
48
54
|
return 'psdk-vertical-step-body';
|
|
49
55
|
}
|
|
50
56
|
|
|
51
|
-
function _getHIconClass(
|
|
52
|
-
if (
|
|
57
|
+
function _getHIconClass(step): string {
|
|
58
|
+
if (step.ID === currentStep?.ID) {
|
|
53
59
|
return 'psdk-horizontal-step-icon-selected';
|
|
54
60
|
}
|
|
55
61
|
|
|
56
62
|
return 'psdk-horizontal-step-icon';
|
|
57
63
|
}
|
|
58
64
|
|
|
59
|
-
function _getHLabelClass(
|
|
60
|
-
if (
|
|
65
|
+
function _getHLabelClass(step): string {
|
|
66
|
+
if (step.ID === currentStep?.ID) {
|
|
61
67
|
return 'psdk-horizontal-step-label-selected';
|
|
62
68
|
}
|
|
63
69
|
|
|
@@ -65,12 +71,7 @@ export default function MultiStep(props: PropsWithChildren<MultiStepProps>) {
|
|
|
65
71
|
}
|
|
66
72
|
|
|
67
73
|
function _showHLine(index: number): boolean {
|
|
68
|
-
|
|
69
|
-
if (index < arNavigationSteps.length - 1) {
|
|
70
|
-
return true;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
return false;
|
|
74
|
+
return index < arNavigationSteps.length - 1;
|
|
74
75
|
}
|
|
75
76
|
|
|
76
77
|
function buttonPress(sAction: string, sButtonType: string) {
|
|
@@ -138,12 +139,12 @@ export default function MultiStep(props: PropsWithChildren<MultiStepProps>) {
|
|
|
138
139
|
return (
|
|
139
140
|
<React.Fragment key={mainStep.actionID}>
|
|
140
141
|
<div className='psdk-horizontal-step-header'>
|
|
141
|
-
<div className={_getHIconClass(mainStep
|
|
142
|
+
<div className={_getHIconClass(mainStep)}>
|
|
142
143
|
<div className='psdk-horizontal-step-icon-content'>
|
|
143
144
|
<span>{index + 1}</span>
|
|
144
145
|
</div>
|
|
145
146
|
</div>
|
|
146
|
-
<div className={_getHLabelClass(mainStep
|
|
147
|
+
<div className={_getHLabelClass(mainStep)}>
|
|
147
148
|
<div className='psdk-horizontal-step-text-label' id='selected-label'>
|
|
148
149
|
{mainStep.name}
|
|
149
150
|
</div>
|
|
@@ -176,7 +177,7 @@ export default function MultiStep(props: PropsWithChildren<MultiStepProps>) {
|
|
|
176
177
|
))}
|
|
177
178
|
</ul>
|
|
178
179
|
)}
|
|
179
|
-
{!mainStep?.steps && mainStep.
|
|
180
|
+
{!mainStep?.steps && mainStep.ID === currentStep?.ID && (
|
|
180
181
|
<AssignmentCard getPConnect={getPConnect} itemKey={itemKey} actionButtons={actionButtons} onButtonPress={buttonPress}>
|
|
181
182
|
{children}
|
|
182
183
|
</AssignmentCard>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useTheme } from '@mui/material/styles';
|
|
3
|
+
import makeStyles from '@mui/styles/makeStyles';
|
|
3
4
|
import clsx from 'clsx';
|
|
4
5
|
|
|
5
6
|
import {
|
|
@@ -15,19 +16,22 @@ import {
|
|
|
15
16
|
Menu,
|
|
16
17
|
MenuItem,
|
|
17
18
|
Typography
|
|
18
|
-
} from '@material
|
|
19
|
-
import PersonOutlineIcon from '@
|
|
20
|
-
import ChevronLeftIcon from '@
|
|
21
|
-
import ChevronRightIcon from '@
|
|
22
|
-
import FlagOutlinedIcon from '@
|
|
23
|
-
import HomeOutlinedIcon from '@
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
19
|
+
} from '@mui/material';
|
|
20
|
+
import PersonOutlineIcon from '@mui/icons-material/PersonOutlineOutlined';
|
|
21
|
+
import ChevronLeftIcon from '@mui/icons-material/ChevronLeft';
|
|
22
|
+
import ChevronRightIcon from '@mui/icons-material/ChevronRight';
|
|
23
|
+
import FlagOutlinedIcon from '@mui/icons-material/FlagOutlined';
|
|
24
|
+
import HomeOutlinedIcon from '@mui/icons-material/HomeOutlined';
|
|
25
|
+
import TabletAndroidOutlineIcon from '@mui/icons-material/TabletAndroidOutlined';
|
|
26
|
+
import AirportShuttleOutlinedIcon from '@mui/icons-material/AirportShuttleOutlined';
|
|
27
|
+
import EditOutlinedIcon from '@mui/icons-material/EditOutlined';
|
|
28
|
+
import ExpandLess from '@mui/icons-material/ExpandLess';
|
|
29
|
+
import ExpandMore from '@mui/icons-material/ExpandMore';
|
|
30
|
+
import AddIcon from '@mui/icons-material/Add';
|
|
31
|
+
import WorkOutlineIcon from '@mui/icons-material/WorkOutline';
|
|
32
|
+
import ClearOutlinedIcon from '@mui/icons-material/ClearOutlined';
|
|
33
|
+
import ArrowBackIcon from '@mui/icons-material/ArrowBack';
|
|
34
|
+
import useMediaQuery from '@mui/material/useMediaQuery';
|
|
31
35
|
import { logout } from '@pega/auth/lib/sdk-auth-manager';
|
|
32
36
|
|
|
33
37
|
import { useNavBar } from '@pega/react-sdk-components/lib/components/helpers/reactContextHelpers';
|
|
@@ -48,7 +52,11 @@ interface NavBarProps extends PConnProps {
|
|
|
48
52
|
const iconMap = {
|
|
49
53
|
'pi pi-headline': <HomeOutlinedIcon fontSize='large' />,
|
|
50
54
|
'pi pi-flag-solid': <FlagOutlinedIcon fontSize='large' />,
|
|
51
|
-
'pi pi-home-solid': <HomeOutlinedIcon fontSize='large'
|
|
55
|
+
'pi pi-home-solid': <HomeOutlinedIcon fontSize='large' />,
|
|
56
|
+
'pi pi-tablet': <TabletAndroidOutlineIcon fontSize='large' />,
|
|
57
|
+
'pi pi-ambulance': <AirportShuttleOutlinedIcon fontSize='large' />,
|
|
58
|
+
'pi pi-ink-solid': <EditOutlinedIcon fontSize='large' />,
|
|
59
|
+
'pi pi-columns': <HomeOutlinedIcon fontSize='large' />
|
|
52
60
|
};
|
|
53
61
|
|
|
54
62
|
const drawerWidth = 300;
|
|
@@ -203,7 +211,7 @@ export default function NavBar(props: NavBarProps) {
|
|
|
203
211
|
}
|
|
204
212
|
/>
|
|
205
213
|
<ListItemSecondaryAction>
|
|
206
|
-
<IconButton edge='end' onClick={handleDrawerOpen}>
|
|
214
|
+
<IconButton edge='end' onClick={handleDrawerOpen} size='large'>
|
|
207
215
|
<ChevronLeftIcon className={classes.appListIcon} />
|
|
208
216
|
</IconButton>
|
|
209
217
|
</ListItemSecondaryAction>
|
|
@@ -256,7 +264,7 @@ export default function NavBar(props: NavBarProps) {
|
|
|
256
264
|
<ListItemText primary={portalOperator} />
|
|
257
265
|
{open && (
|
|
258
266
|
<ListItemSecondaryAction>
|
|
259
|
-
<IconButton edge='end' onClick={navPanelOperatorButtonClick}>
|
|
267
|
+
<IconButton edge='end' onClick={navPanelOperatorButtonClick} size='large'>
|
|
260
268
|
<ChevronRightIcon />
|
|
261
269
|
</IconButton>
|
|
262
270
|
</ListItemSecondaryAction>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Children, createElement, PropsWithChildren, useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
2
|
-
import
|
|
3
|
-
import { Box, CircularProgress } from '@material-ui/core';
|
|
2
|
+
import { Box, CircularProgress } from '@mui/material';
|
|
4
3
|
|
|
5
4
|
import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
|
|
6
5
|
import StoreContext from '@pega/react-sdk-components/lib/bridge/Context/StoreContext';
|
|
@@ -54,6 +53,7 @@ export default function RootContainer(props: PropsWithChildren<RootContainerProp
|
|
|
54
53
|
const pConn = getPConnect();
|
|
55
54
|
|
|
56
55
|
const options = { context: 'app' };
|
|
56
|
+
const rootView = useRef(null);
|
|
57
57
|
|
|
58
58
|
const [componentName, setComponentName] = useState('');
|
|
59
59
|
|
|
@@ -146,7 +146,6 @@ export default function RootContainer(props: PropsWithChildren<RootContainerProp
|
|
|
146
146
|
return noPortalContent;
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
let rootView: any;
|
|
150
149
|
let rootViewConfig: any = null;
|
|
151
150
|
|
|
152
151
|
useEffect(() => {
|
|
@@ -180,8 +179,8 @@ export default function RootContainer(props: PropsWithChildren<RootContainerProp
|
|
|
180
179
|
}
|
|
181
180
|
};
|
|
182
181
|
|
|
183
|
-
if (!
|
|
184
|
-
rootView = createElement(createPConnectComponent(), PCore.createPConnect(currentRootConfig));
|
|
182
|
+
if (prevRootConfig === null || !PCore.isDeepEqual(currentRootConfig, prevRootConfig)) {
|
|
183
|
+
rootView.current = createElement(createPConnectComponent(), PCore.createPConnect(currentRootConfig)) as any;
|
|
185
184
|
}
|
|
186
185
|
|
|
187
186
|
// debugging/investigation help
|
|
@@ -189,7 +188,7 @@ export default function RootContainer(props: PropsWithChildren<RootContainerProp
|
|
|
189
188
|
|
|
190
189
|
return (
|
|
191
190
|
<div id='ModalManager'>
|
|
192
|
-
{rootView}
|
|
191
|
+
{rootView.current}
|
|
193
192
|
{MemoizedModalViewContainer}
|
|
194
193
|
<div id='MemoizedPreviewViewContainer' />
|
|
195
194
|
<div id='ReAuthMessageModal' />
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Breadcrumbs, Card, Typography } from '@material
|
|
2
|
-
import DoubleArrowIcon from '@
|
|
3
|
-
import DoneIcon from '@
|
|
4
|
-
import
|
|
1
|
+
import { Breadcrumbs, Card, Typography } from '@mui/material';
|
|
2
|
+
import DoubleArrowIcon from '@mui/icons-material/DoubleArrow';
|
|
3
|
+
import DoneIcon from '@mui/icons-material/Done';
|
|
4
|
+
import makeStyles from '@mui/styles/makeStyles';
|
|
5
5
|
|
|
6
6
|
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
7
7
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Tab, Divider } from '@material
|
|
1
|
+
import withStyles from '@mui/styles/withStyles';
|
|
2
|
+
import { Tab, Divider } from '@mui/material';
|
|
3
3
|
|
|
4
4
|
// LeftAlignVerticalTabs does NOT have getPConnect. So, no need to extend from PConnProps
|
|
5
5
|
|
|
@@ -18,7 +18,8 @@ interface LeftAlignVerticalTabsProps {
|
|
|
18
18
|
const LeftAlignVerticalTabs: any = withStyles((/* theme */) => ({
|
|
19
19
|
root: {
|
|
20
20
|
width: '100%',
|
|
21
|
-
maxWidth: '100%'
|
|
21
|
+
maxWidth: '100%',
|
|
22
|
+
alignItems: 'flex-start'
|
|
22
23
|
},
|
|
23
24
|
wrapper: {
|
|
24
25
|
display: 'block',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
|
-
import
|
|
3
|
-
import Tabs from '@material
|
|
2
|
+
import makeStyles from '@mui/styles/makeStyles';
|
|
3
|
+
import Tabs from '@mui/material/Tabs';
|
|
4
4
|
|
|
5
5
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
6
6
|
|