@pega/react-sdk-overrides 8.8.21 → 8.23.11-debug
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 +9 -13
- package/lib/designSystemExtension/Banner/Banner.tsx +1 -12
- package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +10 -15
- package/lib/designSystemExtension/DetailsFields/DetailsFields.tsx +11 -10
- package/lib/designSystemExtension/FieldGroup/FieldGroup.tsx +3 -10
- package/lib/designSystemExtension/FieldGroupList/FieldGroupList.tsx +3 -11
- package/lib/designSystemExtension/FieldValueList/FieldValueList.tsx +3 -11
- package/lib/designSystemExtension/Operator/Operator.tsx +12 -16
- package/lib/designSystemExtension/Pulse/Pulse.tsx +7 -11
- package/lib/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx +1 -10
- package/lib/field/AutoComplete/AutoComplete.tsx +18 -37
- package/lib/field/CancelAlert/CancelAlert.tsx +4 -9
- package/lib/field/Checkbox/Checkbox.tsx +16 -39
- package/lib/field/Currency/Currency.tsx +15 -23
- package/lib/field/Currency/currency-utils.ts +5 -1
- package/lib/field/Date/Date.tsx +15 -22
- package/lib/field/DateTime/DateTime.tsx +14 -25
- package/lib/field/Decimal/Decimal.tsx +14 -25
- package/lib/field/Dropdown/Dropdown.tsx +26 -30
- package/lib/field/Email/Email.tsx +9 -17
- package/lib/field/Integer/Integer.tsx +7 -15
- package/lib/field/Percentage/Percentage.tsx +7 -15
- package/lib/field/Phone/Phone.tsx +11 -19
- package/lib/field/RadioButtons/RadioButtons.tsx +37 -25
- package/lib/field/SemanticLink/SemanticLink.tsx +25 -26
- package/lib/field/TextArea/TextArea.tsx +5 -14
- package/lib/field/TextContent/TextContent.tsx +1 -10
- package/lib/field/TextInput/TextInput.tsx +6 -15
- package/lib/field/Time/Time.tsx +27 -22
- package/lib/field/URL/URL.tsx +8 -16
- package/lib/field/UserReference/UserReference.tsx +60 -50
- package/lib/helpers/attachmentHelpers.ts +4 -4
- package/lib/helpers/auth.js +397 -741
- package/lib/helpers/authManager.js +634 -0
- package/lib/helpers/case-utils.tsx +9 -8
- package/lib/helpers/common-utils.ts +1 -1
- package/lib/helpers/config_access.js +73 -0
- package/lib/helpers/date-format-utils.ts +1 -1
- package/lib/helpers/event-utils.ts +1 -1
- package/lib/helpers/formatters/Currency.ts +11 -11
- package/lib/helpers/formatters/CurrencyMap.ts +5 -8
- package/lib/helpers/formatters/Date.ts +1 -1
- package/lib/helpers/formatters/common.ts +6 -2
- package/lib/helpers/formatters/index.ts +3 -3
- package/lib/helpers/simpleTableHelpers.ts +7 -7
- package/lib/helpers/state-utils.tsx +3 -0
- package/lib/helpers/template-utils.ts +6 -3
- package/lib/helpers/versionHelpers.ts +3 -0
- package/lib/infra/ActionButtons/ActionButtons.tsx +19 -9
- package/lib/infra/Assignment/Assignment.tsx +28 -21
- package/lib/infra/AssignmentCard/AssignmentCard.tsx +19 -15
- package/lib/infra/Containers/FlowContainer/FlowContainer.tsx +58 -57
- package/lib/infra/Containers/FlowContainer/helpers.ts +3 -0
- package/lib/infra/Containers/ModalViewContainer/ModalViewContainer.tsx +19 -14
- package/lib/infra/Containers/ViewContainer/ViewContainer.tsx +25 -14
- package/lib/infra/DashboardFilter/DashboardFilter.tsx +21 -13
- package/lib/infra/DashboardFilter/filterUtils.tsx +1 -1
- package/lib/infra/DeferLoad/DeferLoad.tsx +20 -14
- package/lib/infra/ErrorBoundary/ErrorBoundary.tsx +14 -10
- package/lib/infra/MultiStep/MultiStep.tsx +22 -22
- package/lib/infra/NavBar/NavBar.tsx +21 -14
- package/lib/infra/Reference/Reference.tsx +18 -13
- package/lib/infra/Region/Region.tsx +6 -8
- package/lib/infra/RootContainer/RootContainer.tsx +25 -16
- package/lib/infra/Stages/Stages.tsx +8 -10
- package/lib/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.tsx +1 -8
- package/lib/infra/VerticalTabs/VerticalTabs/VerticalTabs.tsx +12 -12
- package/lib/infra/View/View.tsx +22 -21
- package/lib/template/AppShell/AppShell.tsx +25 -36
- package/lib/template/BannerPage/BannerPage.tsx +31 -26
- package/lib/template/CaseSummary/CaseSummary.tsx +8 -15
- package/lib/template/CaseView/CaseView.tsx +25 -24
- package/lib/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +19 -10
- package/lib/template/Confirmation/Confirmation.tsx +53 -27
- package/lib/template/DataReference/DataReference.tsx +52 -48
- package/lib/template/DefaultForm/DefaultForm.tsx +12 -14
- package/lib/template/Details/Details/Details.tsx +17 -16
- package/lib/template/Details/DetailsSubTabs/DetailsSubTabs.tsx +16 -13
- package/lib/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx +18 -19
- package/lib/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx +18 -20
- package/lib/template/FieldGroupTemplate/FieldGroupTemplate.tsx +28 -22
- package/lib/template/InlineDashboard/InlineDashboard.tsx +7 -11
- package/lib/template/InlineDashboardPage/InlineDashboardPage.tsx +17 -19
- package/lib/template/ListPage/ListPage.tsx +13 -14
- package/lib/template/ListView/ListView.tsx +186 -189
- package/lib/template/ListView/utils.ts +23 -170
- package/lib/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +19 -10
- package/lib/template/NarrowWide/NarrowWide/NarrowWide.tsx +1 -16
- package/lib/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.tsx +18 -19
- package/lib/template/NarrowWide/NarrowWideForm/NarrowWideForm.tsx +1 -9
- package/lib/template/NarrowWide/NarrowWidePage/NarrowWidePage.tsx +17 -17
- package/lib/template/OneColumn/OneColumn/OneColumn.tsx +7 -8
- package/lib/template/OneColumn/OneColumnPage/OneColumnPage.tsx +10 -10
- package/lib/template/OneColumn/OneColumnTab/OneColumnTab.tsx +7 -5
- package/lib/template/PromotedFilters/PromotedFilters.tsx +14 -16
- package/lib/template/SimpleTable/SimpleTable/SimpleTable.tsx +8 -102
- package/lib/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +7 -24
- package/lib/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.tsx +33 -23
- package/lib/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +36 -34
- package/lib/template/SubTabs/SubTabs.tsx +11 -10
- package/lib/template/SubTabs/tabUtils.ts +4 -0
- package/lib/template/TwoColumn/TwoColumn/TwoColumn.tsx +15 -10
- package/lib/template/TwoColumn/TwoColumnPage/TwoColumnPage.tsx +10 -10
- package/lib/template/TwoColumn/TwoColumnTab/TwoColumnTab.tsx +12 -10
- package/lib/template/WideNarrow/WideNarrow/WideNarrow.tsx +3 -17
- package/lib/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.tsx +25 -35
- package/lib/template/WideNarrow/WideNarrowForm/WideNarrowForm.tsx +1 -7
- package/lib/template/WideNarrow/WideNarrowPage/WideNarrowPage.tsx +17 -15
- package/lib/template/WssNavBar/WssNavBar.tsx +1 -18
- package/lib/widget/AppAnnouncement/AppAnnouncement.tsx +21 -13
- package/lib/widget/Attachment/Attachment.tsx +16 -28
- package/lib/widget/CaseHistory/CaseHistory.tsx +10 -12
- package/lib/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +1 -13
- package/lib/widget/FileUtility/FileUtility/FileUtility.tsx +22 -35
- package/lib/widget/Followers/Followers.tsx +11 -10
- package/lib/widget/QuickCreate/QuickCreate.tsx +5 -11
- package/lib/widget/SummaryItem/SummaryItem.tsx +1 -11
- package/lib/widget/SummaryList/SummaryList.tsx +3 -17
- package/lib/widget/ToDo/ToDo.tsx +105 -62
- package/package.json +1 -1
- package/lib/designSystemExtension/RichTextEditor/RichTextEditor.tsx +0 -121
- package/lib/designSystemExtension/RichTextEditor/index.tsx +0 -1
- package/lib/field/RichText/RichText.tsx +0 -93
- package/lib/field/RichText/index.tsx +0 -1
- package/lib/field/ScalarList/ScalarList.tsx +0 -64
- package/lib/field/ScalarList/config-ext.json +0 -8
- package/lib/field/ScalarList/index.tsx +0 -1
- package/lib/helpers/authManager.ts +0 -933
|
@@ -1,25 +1,11 @@
|
|
|
1
1
|
import React, { createElement } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
2
3
|
import Grid from '@material-ui/core/Grid';
|
|
3
4
|
import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
|
|
4
|
-
import
|
|
5
|
+
import FieldGroup from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldGroup';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
// Can't use PConnProps until getPConnect().getChildren() type is ok
|
|
10
|
-
// interface DetailsTwoColumnProps extends PConnProps {
|
|
11
|
-
// // If any, enter additional props that only exist on this component
|
|
12
|
-
// showLabel: boolean,
|
|
13
|
-
// label: string,
|
|
14
|
-
// showHighlightedData: boolean
|
|
15
|
-
// }
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export default function DetailsTwoColumn(props /* : DetailsTwoColumnProps */) {
|
|
19
|
-
// Get emitted components from map (so we can get any override that may exist)
|
|
20
|
-
const FieldGroup = getComponentFromMap('FieldGroup');
|
|
21
|
-
|
|
22
|
-
const { label, showLabel = true, getPConnect, showHighlightedData = false } = props;
|
|
7
|
+
export default function DetailsTwoColumn(props) {
|
|
8
|
+
const { label, showLabel, getPConnect, showHighlightedData } = props;
|
|
23
9
|
|
|
24
10
|
// Get the inherited props from the parent to determine label settings
|
|
25
11
|
const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };
|
|
@@ -51,8 +37,7 @@ export default function DetailsTwoColumn(props /* : DetailsTwoColumnProps */) {
|
|
|
51
37
|
field.config.displayAsStatus = true;
|
|
52
38
|
}
|
|
53
39
|
|
|
54
|
-
return getPConnect().createComponent(field
|
|
55
|
-
'', '', {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional
|
|
40
|
+
return getPConnect().createComponent(field);
|
|
56
41
|
});
|
|
57
42
|
}
|
|
58
43
|
|
|
@@ -77,3 +62,16 @@ export default function DetailsTwoColumn(props /* : DetailsTwoColumnProps */) {
|
|
|
77
62
|
</FieldGroup>
|
|
78
63
|
);
|
|
79
64
|
}
|
|
65
|
+
|
|
66
|
+
DetailsTwoColumn.defaultProps = {
|
|
67
|
+
label: undefined,
|
|
68
|
+
showLabel: true,
|
|
69
|
+
showHighlightedData: false
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
DetailsTwoColumn.propTypes = {
|
|
73
|
+
showLabel: PropTypes.bool,
|
|
74
|
+
label: PropTypes.string,
|
|
75
|
+
getPConnect: PropTypes.func.isRequired,
|
|
76
|
+
showHighlightedData: PropTypes.bool
|
|
77
|
+
};
|
|
@@ -1,35 +1,24 @@
|
|
|
1
1
|
/* eslint-disable react-hooks/rules-of-hooks */
|
|
2
2
|
import React, { useMemo } from 'react';
|
|
3
|
-
import
|
|
4
|
-
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
5
4
|
|
|
6
|
-
import
|
|
5
|
+
import FieldGroup from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldGroup';
|
|
6
|
+
import FieldGroupList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldGroupList';
|
|
7
|
+
import { getReferenceList, buildView } from '@pega/react-sdk-components/lib/components/helpers/field-group-utils';
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
// If any, enter additional props that only exist on this component
|
|
10
|
-
referenceList?: Array<any>,
|
|
11
|
-
contextClass: string,
|
|
12
|
-
renderMode?: string,
|
|
13
|
-
heading?: string,
|
|
14
|
-
lookForChildInConfig?: boolean,
|
|
15
|
-
displayMode?: string,
|
|
16
|
-
fieldHeader?: string,
|
|
17
|
-
allowTableEdit: boolean
|
|
18
|
-
}
|
|
9
|
+
import PCoreType from '@pega/pcore-pconnect-typedefs/types/pcore';
|
|
19
10
|
|
|
11
|
+
declare const PCore: typeof PCoreType;
|
|
20
12
|
|
|
21
|
-
export default function FieldGroupTemplate(props: FieldGroupTemplateProps) {
|
|
22
|
-
// Get emitted components from map (so we can get any override that may exist)
|
|
23
|
-
const FieldGroup = getComponentFromMap('FieldGroup');
|
|
24
|
-
const FieldGroupList = getComponentFromMap('FieldGroupList');
|
|
25
13
|
|
|
14
|
+
export default function FieldGroupTemplate(props) {
|
|
26
15
|
const {
|
|
27
|
-
referenceList
|
|
16
|
+
referenceList,
|
|
28
17
|
renderMode,
|
|
29
18
|
contextClass,
|
|
30
19
|
getPConnect,
|
|
31
20
|
lookForChildInConfig,
|
|
32
|
-
heading
|
|
21
|
+
heading,
|
|
33
22
|
displayMode,
|
|
34
23
|
fieldHeader,
|
|
35
24
|
allowTableEdit: allowAddEdit
|
|
@@ -52,7 +41,7 @@ export default function FieldGroupTemplate(props: FieldGroupTemplateProps) {
|
|
|
52
41
|
if (PCore.getPCoreVersion()?.includes('8.7')) {
|
|
53
42
|
pConn.getListActions().insert({ classID: contextClass }, referenceList.length, pageReference);
|
|
54
43
|
} else {
|
|
55
|
-
pConn.getListActions().insert({}, referenceList.length
|
|
44
|
+
pConn.getListActions().insert({}, referenceList.length);
|
|
56
45
|
}
|
|
57
46
|
};
|
|
58
47
|
|
|
@@ -64,7 +53,7 @@ export default function FieldGroupTemplate(props: FieldGroupTemplateProps) {
|
|
|
64
53
|
if (PCore.getPCoreVersion()?.includes('8.7')) {
|
|
65
54
|
pConn.getListActions().deleteEntry(index, pageReference);
|
|
66
55
|
} else {
|
|
67
|
-
pConn.getListActions().deleteEntry(index
|
|
56
|
+
pConn.getListActions().deleteEntry(index);
|
|
68
57
|
}
|
|
69
58
|
};
|
|
70
59
|
if (referenceList.length === 0 && allowAddEdit !== false) {
|
|
@@ -108,3 +97,20 @@ export default function FieldGroupTemplate(props: FieldGroupTemplateProps) {
|
|
|
108
97
|
|
|
109
98
|
return <div>{memoisedReadOnlyList}</div>;
|
|
110
99
|
}
|
|
100
|
+
|
|
101
|
+
FieldGroupTemplate.defaultProps = {
|
|
102
|
+
referenceList: [],
|
|
103
|
+
heading: undefined,
|
|
104
|
+
contextClass: null,
|
|
105
|
+
displayMode: undefined
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
FieldGroupTemplate.propTypes = {
|
|
109
|
+
referenceList: PropTypes.arrayOf(Object),
|
|
110
|
+
contextClass: PropTypes.string,
|
|
111
|
+
getPConnect: PropTypes.func.isRequired,
|
|
112
|
+
renderMode: PropTypes.string.isRequired,
|
|
113
|
+
heading: PropTypes.string,
|
|
114
|
+
lookForChildInConfig: PropTypes.bool,
|
|
115
|
+
displayMode: PropTypes.string
|
|
116
|
+
};
|
|
@@ -1,16 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
2
3
|
import { Grid, Typography } from '@material-ui/core';
|
|
3
4
|
import { makeStyles } from '@material-ui/core/styles';
|
|
4
|
-
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
5
|
-
|
|
6
|
-
// InlineDashboard does NOT have getPConnect. So, no need to extend from PConnProps
|
|
7
|
-
interface InlineDashboardProps extends PConnProps {
|
|
8
|
-
// If any, enter additional props that only exist on this component
|
|
9
|
-
children: Array<any>,
|
|
10
|
-
title: string,
|
|
11
|
-
filterPosition?: string
|
|
12
|
-
}
|
|
13
|
-
|
|
14
5
|
|
|
15
6
|
const useStyles = makeStyles((/* theme */) => ({
|
|
16
7
|
headerStyles: {
|
|
@@ -39,7 +30,7 @@ const useStyles = makeStyles((/* theme */) => ({
|
|
|
39
30
|
}
|
|
40
31
|
}));
|
|
41
32
|
|
|
42
|
-
export default function InlineDashboard(props
|
|
33
|
+
export default function InlineDashboard(props) {
|
|
43
34
|
const classes = useStyles();
|
|
44
35
|
|
|
45
36
|
const { children, title, filterPosition } = props;
|
|
@@ -74,3 +65,8 @@ export default function InlineDashboard(props: InlineDashboardProps) {
|
|
|
74
65
|
</>
|
|
75
66
|
);
|
|
76
67
|
}
|
|
68
|
+
|
|
69
|
+
InlineDashboard.propTypes = {
|
|
70
|
+
children: PropTypes.arrayOf(PropTypes.node).isRequired
|
|
71
|
+
// template: PropTypes.string.isRequired
|
|
72
|
+
};
|
|
@@ -1,27 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useMemo, Children, useEffect, useState } from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
3
4
|
|
|
4
5
|
import { buildFilterComponents } from '@pega/react-sdk-components/lib/components/infra/DashboardFilter/filterUtils';
|
|
5
|
-
import
|
|
6
|
+
import InlineDashboard from '@pega/react-sdk-components/lib/components/template/InlineDashboard';
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
interface InlineDashboardPageProps extends PConnProps {
|
|
11
|
-
// If any, enter additional props that only exist on this component
|
|
12
|
-
children: Array<any>,
|
|
13
|
-
title: string,
|
|
14
|
-
icon?: string,
|
|
15
|
-
filterPosition?: string
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
export default function InlineDashboardPage(props: InlineDashboardPageProps) {
|
|
20
|
-
// Get emitted components from map (so we can get any override that may exist)
|
|
21
|
-
const InlineDashboard = getComponentFromMap("InlineDashboard");
|
|
22
|
-
|
|
23
|
-
// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
|
|
24
|
-
const { children, getPConnect, icon = '', filterPosition = 'block-start' } = props;
|
|
8
|
+
export default function InlineDashboardPage(props) {
|
|
9
|
+
const { children, getPConnect } = props;
|
|
25
10
|
const [filterComponents, setFilterComponents] = useState([]);
|
|
26
11
|
const childArray = useMemo(() => {
|
|
27
12
|
return Children.toArray(children);
|
|
@@ -41,3 +26,16 @@ export default function InlineDashboardPage(props: InlineDashboardPageProps) {
|
|
|
41
26
|
|
|
42
27
|
return <InlineDashboard {...inlineProps} />;
|
|
43
28
|
}
|
|
29
|
+
|
|
30
|
+
InlineDashboardPage.propTypes = {
|
|
31
|
+
children: PropTypes.arrayOf(PropTypes.node).isRequired,
|
|
32
|
+
getPConnect: PropTypes.func.isRequired,
|
|
33
|
+
title: PropTypes.string.isRequired,
|
|
34
|
+
icon: PropTypes.string,
|
|
35
|
+
filterPosition: PropTypes.string
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
InlineDashboardPage.defaultProps = {
|
|
39
|
+
icon: '',
|
|
40
|
+
filterPosition: 'block-start'
|
|
41
|
+
};
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import ListView from '@pega/react-sdk-components/lib/components/template/ListView';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
// If any, enter additional props that only exist on this component
|
|
8
|
-
parameters: object
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export default function ListPage(props: ListPageProps) {
|
|
13
|
-
// Get emitted components from map (so we can get any override that may exist)
|
|
14
|
-
const ListView = getComponentFromMap('ListView');
|
|
6
|
+
export default function ListPage(props) {
|
|
15
7
|
|
|
16
|
-
// special case for ListView - add in a prop
|
|
17
|
-
const listViewProps = {...props, bInForm: false};
|
|
18
8
|
return (
|
|
19
|
-
<ListView {...
|
|
9
|
+
<ListView {...props}></ListView>
|
|
20
10
|
)
|
|
21
11
|
}
|
|
12
|
+
|
|
13
|
+
ListPage.defaultProps = {
|
|
14
|
+
parameters: undefined
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
ListPage.propTypes = {
|
|
18
|
+
getPConnect: PropTypes.func.isRequired,
|
|
19
|
+
parameters: PropTypes.objectOf(PropTypes.any)
|
|
20
|
+
};
|