@pega/react-sdk-overrides 8.23.10 → 23.1.10
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 +47 -0
- package/lib/designSystemExtension/AlertBanner/index.tsx +1 -0
- package/lib/designSystemExtension/Banner/Banner.tsx +12 -1
- package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +15 -10
- package/lib/designSystemExtension/DetailsFields/DetailsFields.tsx +10 -11
- package/lib/designSystemExtension/FieldGroup/FieldGroup.tsx +10 -3
- package/lib/designSystemExtension/FieldGroupList/FieldGroupList.tsx +11 -5
- package/lib/designSystemExtension/FieldValueList/FieldValueList.tsx +11 -3
- package/lib/designSystemExtension/Operator/Operator.tsx +30 -21
- package/lib/designSystemExtension/Pulse/Pulse.tsx +11 -7
- package/lib/designSystemExtension/RichTextEditor/RichTextEditor.tsx +121 -0
- package/lib/designSystemExtension/RichTextEditor/index.tsx +1 -0
- package/lib/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx +12 -3
- package/lib/field/AutoComplete/AutoComplete.tsx +38 -19
- package/lib/field/CancelAlert/CancelAlert.tsx +21 -12
- package/lib/field/Checkbox/Checkbox.tsx +42 -9
- package/lib/field/Currency/Currency.tsx +24 -16
- package/lib/field/Currency/currency-utils.ts +1 -2
- package/lib/field/Date/Date.tsx +32 -18
- package/lib/field/DateTime/DateTime.tsx +27 -16
- package/lib/field/Decimal/Decimal.tsx +82 -19
- package/lib/field/Dropdown/Dropdown.tsx +60 -15
- package/lib/field/Email/Email.tsx +17 -9
- package/lib/field/Integer/Integer.tsx +15 -7
- package/lib/field/Percentage/Percentage.tsx +15 -7
- package/lib/field/Phone/Phone.tsx +21 -12
- package/lib/field/RadioButtons/RadioButtons.tsx +57 -28
- package/lib/field/RichText/RichText.tsx +95 -0
- package/lib/field/RichText/index.tsx +1 -0
- package/lib/field/ScalarList/ScalarList.tsx +73 -0
- package/lib/field/ScalarList/config-ext.json +8 -0
- package/lib/field/ScalarList/index.tsx +1 -0
- package/lib/field/SemanticLink/SemanticLink.tsx +26 -25
- package/lib/field/SemanticLink/utils.ts +2 -1
- package/lib/field/TextArea/TextArea.tsx +14 -5
- package/lib/field/TextContent/TextContent.tsx +10 -1
- package/lib/field/TextInput/TextInput.tsx +40 -11
- package/lib/field/Time/Time.tsx +29 -26
- package/lib/field/URL/URL.tsx +24 -8
- package/lib/field/UserReference/UserReference.tsx +52 -60
- package/lib/helpers/{attachmentHelpers.js → attachmentHelpers.ts} +5 -5
- package/lib/helpers/auth.js +752 -401
- package/lib/helpers/authManager.ts +933 -0
- package/lib/helpers/case-utils.tsx +103 -0
- package/lib/helpers/common-utils.ts +4 -0
- package/lib/helpers/config_access.js +63 -145
- package/lib/helpers/data_page.ts +2 -1
- package/lib/helpers/date-format-utils.ts +29 -19
- package/lib/helpers/{event-utils.js → event-utils.ts} +1 -1
- package/lib/helpers/{field-group-utils.js → field-group-utils.ts} +10 -11
- package/lib/helpers/formatters/{Currency.js → Currency.ts} +13 -12
- package/lib/helpers/formatters/{CurrencyMap.js → CurrencyMap.ts} +8 -5
- package/lib/helpers/formatters/{Date.js → Date.ts} +2 -2
- package/lib/helpers/formatters/{common.js → common.ts} +4 -4
- package/lib/helpers/formatters/{index.js → index.ts} +3 -3
- package/lib/helpers/simpleTableHelpers.ts +10 -6
- package/lib/helpers/state-utils.tsx +47 -0
- package/lib/helpers/template-utils.ts +3 -4
- package/lib/helpers/utils.ts +12 -4
- package/lib/helpers/versionHelpers.ts +0 -1
- package/lib/infra/ActionButtons/ActionButtons.tsx +13 -18
- package/lib/infra/Assignment/Assignment.tsx +44 -35
- package/lib/infra/AssignmentCard/AssignmentCard.tsx +15 -19
- package/lib/infra/Containers/FlowContainer/FlowContainer.tsx +76 -64
- package/lib/infra/Containers/FlowContainer/{helpers.js → helpers.ts} +18 -16
- package/lib/infra/Containers/ModalViewContainer/ModalViewContainer.tsx +41 -25
- package/lib/infra/Containers/ViewContainer/ViewContainer.tsx +25 -30
- package/lib/infra/DashboardFilter/DashboardFilter.tsx +16 -20
- package/lib/infra/DashboardFilter/filterUtils.tsx +4 -1
- package/lib/infra/DeferLoad/DeferLoad.tsx +16 -19
- package/lib/infra/ErrorBoundary/ErrorBoundary.tsx +21 -20
- package/lib/infra/MultiStep/MultiStep.tsx +24 -24
- package/lib/infra/NavBar/NavBar.tsx +23 -24
- package/lib/infra/Reference/Reference.tsx +14 -18
- package/lib/infra/Region/Region.tsx +8 -6
- package/lib/infra/RootContainer/RootContainer.tsx +32 -39
- package/lib/infra/Stages/Stages.tsx +15 -9
- package/lib/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.tsx +8 -1
- package/lib/infra/VerticalTabs/VerticalTabs/VerticalTabs.tsx +12 -12
- package/lib/infra/View/View.tsx +30 -57
- package/lib/template/AppShell/AppShell.tsx +51 -34
- package/lib/template/BannerPage/BannerPage.tsx +26 -31
- package/lib/template/CaseSummary/CaseSummary.tsx +15 -8
- package/lib/template/CaseView/CaseView.tsx +137 -100
- package/lib/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +27 -27
- package/lib/template/Confirmation/Confirmation.tsx +29 -52
- package/lib/template/DataReference/DataReference.tsx +51 -53
- package/lib/template/DefaultForm/DefaultForm.tsx +29 -20
- package/lib/template/DefaultForm/utils/index.ts +33 -0
- package/lib/template/Details/Details/Details.tsx +16 -17
- package/lib/template/Details/DetailsSubTabs/DetailsSubTabs.tsx +13 -16
- package/lib/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx +19 -18
- package/lib/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx +20 -18
- package/lib/template/Details/DynamicTabs/DynamicTabs.tsx +78 -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 -27
- package/lib/template/InlineDashboard/InlineDashboard.tsx +11 -7
- package/lib/template/InlineDashboardPage/InlineDashboardPage.tsx +20 -18
- package/lib/template/ListPage/ListPage.tsx +14 -13
- package/lib/template/ListView/ListView.tsx +244 -314
- package/lib/template/ListView/{hooks.js → hooks.ts} +3 -1
- package/lib/template/ListView/{utils.js → utils.ts} +172 -23
- package/lib/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +12 -17
- package/lib/template/NarrowWide/NarrowWide/NarrowWide.tsx +16 -1
- package/lib/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.tsx +19 -18
- package/lib/template/NarrowWide/NarrowWideForm/NarrowWideForm.tsx +9 -1
- package/lib/template/NarrowWide/NarrowWidePage/NarrowWidePage.tsx +17 -17
- package/lib/template/OneColumn/OneColumn/OneColumn.tsx +8 -7
- package/lib/template/OneColumn/OneColumnPage/OneColumnPage.tsx +10 -10
- package/lib/template/OneColumn/OneColumnTab/OneColumnTab.tsx +5 -7
- package/lib/template/PromotedFilters/PromotedFilters.tsx +23 -17
- package/lib/template/SimpleTable/SimpleTable/SimpleTable.tsx +103 -6
- package/lib/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +29 -8
- package/lib/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.tsx +26 -31
- package/lib/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +33 -36
- package/lib/template/SubTabs/SubTabs.tsx +10 -11
- package/lib/template/SubTabs/tabUtils.ts +0 -2
- package/lib/template/TwoColumn/TwoColumn/TwoColumn.tsx +10 -15
- package/lib/template/TwoColumn/TwoColumnPage/TwoColumnPage.tsx +10 -10
- package/lib/template/TwoColumn/TwoColumnTab/TwoColumnTab.tsx +10 -12
- package/lib/template/WideNarrow/WideNarrow/WideNarrow.tsx +17 -3
- package/lib/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.tsx +35 -25
- package/lib/template/WideNarrow/WideNarrowForm/WideNarrowForm.tsx +7 -1
- package/lib/template/WideNarrow/WideNarrowPage/WideNarrowPage.tsx +15 -17
- package/lib/template/WssNavBar/WssNavBar.tsx +20 -3
- package/lib/widget/AppAnnouncement/AppAnnouncement.tsx +13 -21
- package/lib/widget/Attachment/Attachment.css +15 -3
- package/lib/widget/Attachment/Attachment.tsx +51 -32
- package/lib/widget/CaseHistory/CaseHistory.tsx +13 -11
- package/lib/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +13 -1
- package/lib/widget/FileUtility/FileUtility/FileUtility.tsx +40 -26
- package/lib/widget/Followers/Followers.tsx +10 -11
- package/lib/widget/QuickCreate/QuickCreate.tsx +15 -6
- package/lib/widget/SummaryItem/SummaryItem.tsx +12 -4
- package/lib/widget/SummaryList/SummaryList.tsx +17 -3
- package/lib/widget/ToDo/ToDo.tsx +69 -104
- package/package.json +1 -1
- package/lib/helpers/authManager.js +0 -631
- /package/lib/helpers/formatters/{Boolean.js → Boolean.ts} +0 -0
- /package/lib/helpers/{reactContextHelpers.js → reactContextHelpers.ts} +0 -0
- /package/lib/template/ListView/{DefaultViewMeta.js → DefaultViewMeta.ts} +0 -0
|
@@ -1,21 +1,35 @@
|
|
|
1
1
|
/* eslint-disable react-hooks/rules-of-hooks */
|
|
2
2
|
import React, { useMemo } from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
|
|
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
3
|
import { getReferenceList, buildView } from '@pega/react-sdk-components/lib/components/helpers/field-group-utils';
|
|
4
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
5
|
+
|
|
6
|
+
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
7
|
+
|
|
8
|
+
interface FieldGroupTemplateProps extends PConnProps {
|
|
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
|
+
}
|
|
8
19
|
|
|
9
|
-
declare const PCore: any;
|
|
10
20
|
|
|
11
|
-
export default function FieldGroupTemplate(props) {
|
|
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
|
+
|
|
12
26
|
const {
|
|
13
|
-
referenceList,
|
|
27
|
+
referenceList = [],
|
|
14
28
|
renderMode,
|
|
15
29
|
contextClass,
|
|
16
30
|
getPConnect,
|
|
17
31
|
lookForChildInConfig,
|
|
18
|
-
heading,
|
|
32
|
+
heading = '',
|
|
19
33
|
displayMode,
|
|
20
34
|
fieldHeader,
|
|
21
35
|
allowTableEdit: allowAddEdit
|
|
@@ -38,7 +52,7 @@ export default function FieldGroupTemplate(props) {
|
|
|
38
52
|
if (PCore.getPCoreVersion()?.includes('8.7')) {
|
|
39
53
|
pConn.getListActions().insert({ classID: contextClass }, referenceList.length, pageReference);
|
|
40
54
|
} else {
|
|
41
|
-
pConn.getListActions().insert({
|
|
55
|
+
pConn.getListActions().insert({}, referenceList.length, null); // 3rd arg null until typedef marked correctly as optional
|
|
42
56
|
}
|
|
43
57
|
};
|
|
44
58
|
|
|
@@ -50,7 +64,7 @@ export default function FieldGroupTemplate(props) {
|
|
|
50
64
|
if (PCore.getPCoreVersion()?.includes('8.7')) {
|
|
51
65
|
pConn.getListActions().deleteEntry(index, pageReference);
|
|
52
66
|
} else {
|
|
53
|
-
pConn.getListActions().deleteEntry(index);
|
|
67
|
+
pConn.getListActions().deleteEntry(index, null); // 2nd arg null until typedef marked correctly as optional
|
|
54
68
|
}
|
|
55
69
|
};
|
|
56
70
|
if (referenceList.length === 0 && allowAddEdit !== false) {
|
|
@@ -94,20 +108,3 @@ export default function FieldGroupTemplate(props) {
|
|
|
94
108
|
|
|
95
109
|
return <div>{memoisedReadOnlyList}</div>;
|
|
96
110
|
}
|
|
97
|
-
|
|
98
|
-
FieldGroupTemplate.defaultProps = {
|
|
99
|
-
referenceList: [],
|
|
100
|
-
heading: undefined,
|
|
101
|
-
contextClass: null,
|
|
102
|
-
displayMode: undefined
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
FieldGroupTemplate.propTypes = {
|
|
106
|
-
referenceList: PropTypes.arrayOf(Object),
|
|
107
|
-
contextClass: PropTypes.string,
|
|
108
|
-
getPConnect: PropTypes.func.isRequired,
|
|
109
|
-
renderMode: PropTypes.string.isRequired,
|
|
110
|
-
heading: PropTypes.string,
|
|
111
|
-
lookForChildInConfig: PropTypes.bool,
|
|
112
|
-
displayMode: PropTypes.string
|
|
113
|
-
};
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import { Grid, Typography } from '@material-ui/core';
|
|
4
3
|
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
|
+
|
|
5
14
|
|
|
6
15
|
const useStyles = makeStyles((/* theme */) => ({
|
|
7
16
|
headerStyles: {
|
|
@@ -30,7 +39,7 @@ const useStyles = makeStyles((/* theme */) => ({
|
|
|
30
39
|
}
|
|
31
40
|
}));
|
|
32
41
|
|
|
33
|
-
export default function InlineDashboard(props) {
|
|
42
|
+
export default function InlineDashboard(props: InlineDashboardProps) {
|
|
34
43
|
const classes = useStyles();
|
|
35
44
|
|
|
36
45
|
const { children, title, filterPosition } = props;
|
|
@@ -65,8 +74,3 @@ export default function InlineDashboard(props) {
|
|
|
65
74
|
</>
|
|
66
75
|
);
|
|
67
76
|
}
|
|
68
|
-
|
|
69
|
-
InlineDashboard.propTypes = {
|
|
70
|
-
children: PropTypes.arrayOf(PropTypes.node).isRequired
|
|
71
|
-
// template: PropTypes.string.isRequired
|
|
72
|
-
};
|
|
@@ -1,18 +1,33 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useMemo, Children, useEffect, useState } from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
3
|
|
|
5
4
|
import { buildFilterComponents } from '@pega/react-sdk-components/lib/components/infra/DashboardFilter/filterUtils';
|
|
6
|
-
import
|
|
5
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
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;
|
|
10
25
|
const [filterComponents, setFilterComponents] = useState([]);
|
|
11
26
|
const childArray = useMemo(() => {
|
|
12
27
|
return Children.toArray(children);
|
|
13
28
|
}, [children]);
|
|
14
29
|
|
|
15
|
-
const allFilters = getPConnect().getRawMetadata()
|
|
30
|
+
const allFilters = getPConnect().getRawMetadata()["children"][1];
|
|
16
31
|
|
|
17
32
|
useEffect(() => {
|
|
18
33
|
setFilterComponents(buildFilterComponents(getPConnect, allFilters));
|
|
@@ -26,16 +41,3 @@ export default function InlineDashboardPage(props) {
|
|
|
26
41
|
|
|
27
42
|
return <InlineDashboard {...inlineProps} />;
|
|
28
43
|
}
|
|
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,20 +1,21 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
interface ListPageProps extends PConnProps {
|
|
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');
|
|
7
15
|
|
|
16
|
+
// special case for ListView - add in a prop
|
|
17
|
+
const listViewProps = {...props, bInForm: false};
|
|
8
18
|
return (
|
|
9
|
-
<ListView {...
|
|
19
|
+
<ListView {...listViewProps}></ListView>
|
|
10
20
|
)
|
|
11
21
|
}
|
|
12
|
-
|
|
13
|
-
ListPage.defaultProps = {
|
|
14
|
-
parameters: undefined
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
ListPage.propTypes = {
|
|
18
|
-
getPConnect: PropTypes.func.isRequired,
|
|
19
|
-
parameters: PropTypes.objectOf(PropTypes.any)
|
|
20
|
-
};
|