@pega/dx-component-builder-sdk 0.23.5 → 0.23.7
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/package.json +1 -1
- package/src/tasks/create/templates/Constellation/field/Text/index.jsx.mustache +1 -1
- package/src/tasks/create/templates/Constellation/field/Text-Input/index.jsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/field/Boolean/index.tsx.mustache +30 -29
- package/src/tasks/create/templates/SDK-React/field/Date/index.tsx.mustache +6 -2
- package/src/tasks/create/templates/SDK-React/field/DateTime/index.tsx.mustache +6 -2
- package/src/tasks/create/templates/SDK-React/field/Decimal/index.tsx.mustache +4 -1
- package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/index.tsx.mustache +4 -1
- package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/index.tsx.mustache +5 -2
- package/src/tasks/create/templates/SDK-React/field/Integer/index.tsx.mustache +6 -2
- package/src/tasks/create/templates/SDK-React/field/Picklist/index.tsx.mustache +4 -1
- package/src/tasks/create/templates/SDK-React/field/Text/index.tsx.mustache +4 -1
- package/src/tasks/create/templates/SDK-React/field/Text-Email/index.tsx.mustache +6 -2
- package/src/tasks/create/templates/SDK-React/field/Text-Input/index.tsx.mustache +4 -1
- package/src/tasks/create/templates/SDK-React/field/Text-Paragraph/index.tsx.mustache +4 -1
- package/src/tasks/create/templates/SDK-React/field/Text-Phone/index.tsx.mustache +4 -1
- package/src/tasks/create/templates/SDK-React/field/Text-URL/index.tsx.mustache +6 -2
- package/src/tasks/create/templates/SDK-React/field/TimeOfDay/index.tsx.mustache +6 -2
- package/src/tasks/create/templates/SDK-React/template/DETAILS/index.tsx.mustache +4 -2
- package/src/tasks/create/templates/SDK-React/template/DETAILS-region/index.tsx.mustache +4 -2
- package/src/tasks/create/templates/SDK-React/template/PAGE/OneColumn.tsx.mustache +7 -6
- package/tests/assets/components/SDK-React/create/custom-constellation/field/Pega_DXIL_MyTestText/index.jsx +1 -1
- package/tests/assets/components/SDK-React/create/custom-sdk/field/Pega_DXIL_MyTestText/index.tsx +4 -1
- package/tests/assets/components/SDK-React/create/override-sdk/designSystemExtension/AlertBanner/AlertBanner.tsx +47 -0
- package/tests/assets/components/SDK-React/create/override-sdk/designSystemExtension/AlertBanner/index.tsx +1 -0
- package/tests/assets/components/SDK-React/create/override-sdk/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +5 -3
- package/tests/assets/components/SDK-React/create/override-sdk/designSystemExtension/FieldValueList/FieldValueList.tsx +1 -1
- package/tests/assets/components/SDK-React/create/override-sdk/designSystemExtension/RichTextEditor/RichTextEditor.tsx +121 -0
- package/tests/assets/components/SDK-React/create/override-sdk/designSystemExtension/RichTextEditor/index.tsx +1 -0
- package/tests/assets/components/SDK-React/create/override-sdk/field/AutoComplete/AutoComplete.tsx +29 -27
- package/tests/assets/components/SDK-React/create/override-sdk/field/Checkbox/Checkbox.tsx +10 -6
- package/tests/assets/components/SDK-React/create/override-sdk/field/Currency/Currency.tsx +16 -15
- package/tests/assets/components/SDK-React/create/override-sdk/field/Date/Date.tsx +16 -15
- package/tests/assets/components/SDK-React/create/override-sdk/field/DateTime/DateTime.tsx +19 -14
- package/tests/assets/components/SDK-React/create/override-sdk/field/Decimal/Decimal.tsx +18 -16
- package/tests/assets/components/SDK-React/create/override-sdk/field/Dropdown/Dropdown.tsx +17 -25
- package/tests/assets/components/SDK-React/create/override-sdk/field/Email/Email.tsx +11 -11
- package/tests/assets/components/SDK-React/create/override-sdk/field/Integer/Integer.tsx +9 -7
- package/tests/assets/components/SDK-React/create/override-sdk/field/Percentage/Percentage.tsx +9 -9
- package/tests/assets/components/SDK-React/create/override-sdk/field/Phone/Phone.tsx +13 -12
- package/tests/assets/components/SDK-React/create/override-sdk/field/RadioButtons/RadioButtons.tsx +16 -35
- package/tests/assets/components/SDK-React/create/override-sdk/field/RichText/RichText.tsx +95 -0
- package/tests/assets/components/SDK-React/create/override-sdk/field/RichText/index.tsx +1 -0
- package/tests/assets/components/SDK-React/create/override-sdk/field/ScalarList/ScalarList.tsx +73 -0
- package/tests/assets/components/SDK-React/create/override-sdk/field/ScalarList/config-ext.json +8 -0
- package/tests/assets/components/SDK-React/create/override-sdk/field/ScalarList/index.tsx +1 -0
- package/tests/assets/components/SDK-React/create/override-sdk/field/SemanticLink/SemanticLink.tsx +19 -19
- package/tests/assets/components/SDK-React/create/override-sdk/field/TextArea/TextArea.tsx +8 -6
- package/tests/assets/components/SDK-React/create/override-sdk/field/TextInput/TextInput.tsx +8 -7
- package/tests/assets/components/SDK-React/create/override-sdk/field/Time/Time.tsx +16 -28
- package/tests/assets/components/SDK-React/create/override-sdk/field/URL/URL.tsx +10 -8
- package/tests/assets/components/SDK-React/create/override-sdk/field/UserReference/UserReference.tsx +29 -29
- package/tests/assets/components/SDK-React/create/override-sdk/infra/Assignment/Assignment.tsx +5 -2
- package/tests/assets/components/SDK-React/create/override-sdk/infra/AssignmentCard/AssignmentCard.tsx +4 -2
- package/tests/assets/components/SDK-React/create/override-sdk/infra/DashboardFilter/DashboardFilter.tsx +13 -13
- package/tests/assets/components/SDK-React/create/override-sdk/infra/DashboardFilter/filterUtils.tsx +2 -1
- package/tests/assets/components/SDK-React/create/override-sdk/infra/DeferLoad/DeferLoad.tsx +172 -0
- package/tests/assets/components/SDK-React/create/override-sdk/infra/DeferLoad/index.tsx +1 -0
- package/tests/assets/components/SDK-React/create/override-sdk/infra/MultiStep/MultiStep.tsx +4 -3
- package/tests/assets/components/SDK-React/create/override-sdk/infra/NavBar/NavBar.tsx +2 -1
- package/tests/assets/components/SDK-React/create/override-sdk/infra/VerticalTabs/VerticalTabs.tsx +4 -1
- package/tests/assets/components/SDK-React/create/override-sdk/template/AppShell/AppShell.tsx +6 -4
- package/tests/assets/components/SDK-React/create/override-sdk/template/BannerPage/BannerPage.tsx +4 -1
- package/tests/assets/components/SDK-React/create/override-sdk/template/CaseSummary/CaseSummary.tsx +4 -1
- package/tests/assets/components/SDK-React/create/override-sdk/template/CaseView/CaseView.tsx +10 -13
- package/tests/assets/components/SDK-React/create/override-sdk/template/Confirmation/Confirmation.tsx +23 -44
- package/tests/assets/components/SDK-React/create/override-sdk/template/DataReference/DataReference.tsx +43 -64
- package/tests/assets/components/SDK-React/create/override-sdk/template/Details/Details.tsx +8 -4
- package/tests/assets/components/SDK-React/create/override-sdk/template/DetailsThreeColumn/DetailsThreeColumn.tsx +8 -4
- package/tests/assets/components/SDK-React/create/override-sdk/template/DetailsTwoColumn/DetailsTwoColumn.tsx +8 -4
- package/tests/assets/components/SDK-React/create/override-sdk/template/FieldGroupTemplate/FieldGroupTemplate.tsx +6 -2
- package/tests/assets/components/SDK-React/create/override-sdk/template/InlineDashboardPage/InlineDashboardPage.tsx +5 -1
- package/tests/assets/components/SDK-React/create/override-sdk/template/ListPage/ListPage.tsx +6 -3
- package/tests/assets/components/SDK-React/create/override-sdk/template/ListView/ListView.tsx +89 -93
- package/tests/assets/components/SDK-React/create/override-sdk/template/ListView/utils.ts +170 -23
- package/tests/assets/components/SDK-React/create/override-sdk/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +9 -9
- package/tests/assets/components/SDK-React/create/override-sdk/template/NarrowWideDetails/NarrowWideDetails.tsx +8 -4
- package/tests/assets/components/SDK-React/create/override-sdk/template/NarrowWidePage/NarrowWidePage.tsx +4 -1
- package/tests/assets/components/SDK-React/create/override-sdk/template/OneColumnPage/OneColumnPage.tsx +3 -1
- package/tests/assets/components/SDK-React/create/override-sdk/template/PromotedFilters/PromotedFilters.tsx +4 -1
- package/tests/assets/components/SDK-React/create/override-sdk/template/SimpleTable/SimpleTable.tsx +88 -5
- package/tests/assets/components/SDK-React/create/override-sdk/template/SimpleTableSelect/SimpleTableSelect.tsx +6 -4
- package/tests/assets/components/SDK-React/create/override-sdk/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +22 -18
- package/tests/assets/components/SDK-React/create/override-sdk/template/TwoColumnPage/TwoColumnPage.tsx +3 -2
- package/tests/assets/components/SDK-React/create/override-sdk/template/WideNarrowDetails/WideNarrowDetails.tsx +8 -3
- package/tests/assets/components/SDK-React/create/override-sdk/template/WideNarrowPage/WideNarrowPage.tsx +4 -3
- package/tests/assets/components/SDK-React/create/override-sdk/widget/Attachment/Attachment.tsx +5 -1
- package/tests/assets/components/SDK-React/create/override-sdk/widget/FileUtility/FileUtility.tsx +8 -2
- package/tests/assets/components/SDK-React/create/override-sdk/widget/QuickCreate/QuickCreate.tsx +4 -1
- package/tests/assets/components/SDK-React/create/override-sdk/widget/SummaryList/SummaryList.tsx +4 -1
- package/tests/assets/components/SDK-React/create/override-sdk/widget/ToDo/ToDo.tsx +53 -82
- package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyText/index.jsx +1 -1
- package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyTextInput/index.jsx +1 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyBoolean/index.tsx +30 -29
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/index.tsx +4 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDate/index.tsx +6 -2
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/index.tsx +6 -2
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/index.tsx +4 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyEmail/index.tsx +6 -2
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyInteger/index.tsx +6 -2
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyParagraph/index.tsx +4 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyPercentage/index.tsx +5 -2
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyPhone/index.tsx +4 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyPicklist/index.tsx +4 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyText/index.tsx +4 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyTextInput/index.tsx +4 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyTimeOfDay/index.tsx +6 -2
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyURL/index.tsx +6 -2
- package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyDetails/index.tsx +4 -2
- package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyPage/OneColumn.tsx +7 -6
- package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/index.tsx +4 -2
- package/tests/assets/components/SDK-React/createAll/override-sdk/designSystemExtension/AlertBanner/AlertBanner.tsx +47 -0
- package/tests/assets/components/SDK-React/createAll/override-sdk/designSystemExtension/AlertBanner/index.tsx +1 -0
- package/tests/assets/components/SDK-React/createAll/override-sdk/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +5 -3
- package/tests/assets/components/SDK-React/createAll/override-sdk/designSystemExtension/RichTextEditor/RichTextEditor.tsx +121 -0
- package/tests/assets/components/SDK-React/createAll/override-sdk/designSystemExtension/RichTextEditor/index.tsx +1 -0
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/AutoComplete/AutoComplete.tsx +29 -27
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/Checkbox/Checkbox.tsx +10 -6
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/Currency/Currency.tsx +16 -15
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/Date/Date.tsx +16 -15
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/DateTime/DateTime.tsx +19 -14
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/Decimal/Decimal.tsx +18 -16
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/Dropdown/Dropdown.tsx +17 -25
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/Email/Email.tsx +11 -11
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/Integer/Integer.tsx +9 -7
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/Percentage/Percentage.tsx +9 -9
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/Phone/Phone.tsx +13 -12
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/RadioButtons/RadioButtons.tsx +16 -35
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/RichText/RichText.tsx +95 -0
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/RichText/index.tsx +1 -0
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/ScalarList/ScalarList.tsx +25 -18
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/SemanticLink/SemanticLink.tsx +19 -19
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/TextArea/TextArea.tsx +8 -6
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/TextInput/TextInput.tsx +8 -7
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/Time/Time.tsx +16 -28
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/URL/URL.tsx +10 -8
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/UserReference/UserReference.tsx +29 -29
- package/tests/assets/components/SDK-React/createAll/override-sdk/infra/Assignment/Assignment.tsx +5 -2
- package/tests/assets/components/SDK-React/createAll/override-sdk/infra/AssignmentCard/AssignmentCard.tsx +4 -2
- package/tests/assets/components/SDK-React/createAll/override-sdk/infra/DeferLoad/DeferLoad.tsx +172 -0
- package/tests/assets/components/SDK-React/createAll/override-sdk/infra/DeferLoad/index.tsx +1 -0
- package/tests/assets/components/SDK-React/createAll/override-sdk/infra/MultiStep/MultiStep.tsx +4 -3
- package/tests/assets/components/SDK-React/createAll/override-sdk/infra/VerticalTabs/VerticalTabs.tsx +4 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/AppShell/AppShell.tsx +6 -4
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/BannerPage/BannerPage.tsx +4 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/CaseSummary/CaseSummary.tsx +4 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/CaseView/CaseView.tsx +6 -3
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/Confirmation/Confirmation.tsx +23 -44
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/DataReference/DataReference.tsx +6 -2
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/Details/Details.tsx +5 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/DetailsThreeColumn/DetailsThreeColumn.tsx +5 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/DetailsTwoColumn/DetailsTwoColumn.tsx +5 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/FieldGroupTemplate/FieldGroupTemplate.tsx +6 -2
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/InlineDashboardPage/InlineDashboardPage.tsx +5 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/ListPage/ListPage.tsx +6 -3
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/ListView/ListView.tsx +89 -93
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/ListView/utils.ts +170 -23
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/NarrowWideDetails/NarrowWideDetails.tsx +5 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/NarrowWidePage/NarrowWidePage.tsx +4 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/OneColumnPage/OneColumnPage.tsx +3 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/PromotedFilters/PromotedFilters.tsx +4 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/SimpleTable/SimpleTable.tsx +88 -5
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/SimpleTableSelect/SimpleTableSelect.tsx +6 -4
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/TwoColumnPage/TwoColumnPage.tsx +3 -2
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/WideNarrowDetails/WideNarrowDetails.tsx +5 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/WideNarrowPage/WideNarrowPage.tsx +4 -3
- package/tests/assets/components/SDK-React/createAll/override-sdk/widget/Attachment/Attachment.tsx +5 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/widget/FileUtility/FileUtility.tsx +8 -2
- package/tests/assets/components/SDK-React/createAll/override-sdk/widget/QuickCreate/QuickCreate.tsx +4 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/widget/SummaryList/SummaryList.tsx +4 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/widget/ToDo/ToDo.tsx +53 -82
- package/tests/functional/localCreateBuildAllDeleteAllCustom.test.js +1 -1
- package/tests/functional/localCreateBuildDeleteCustom.test.js +14 -1
- package/tests/functional/localCreateBuildDeleteOverride.test.js +2 -1
- package/tests/functional/localCreatePublishAllDeleteAllCustom.test.js +5 -3
- package/tests/functional/localCreatePublishAllDeleteAllOverride.test.js +3 -5
- package/tests/functional/localCreatePublishDeleteCustom.test.js +4 -3
- package/tests/functional/localCreatePublishDeleteOverride.test.js +2 -5
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
3
|
-
import TwoColumn from '@pega/react-sdk-components/lib/components/template/TwoColumn/TwoColumn';
|
|
2
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
4
3
|
|
|
5
4
|
// TwoColumnPage does NOT have getPConnect. So, no need to extend from PConnProps
|
|
6
5
|
interface TwoColumnPageProps{
|
|
@@ -14,6 +13,8 @@ interface TwoColumnPageProps{
|
|
|
14
13
|
* and mapping to the TwoColumn template.
|
|
15
14
|
*/
|
|
16
15
|
export default function TwoColumnPage(props: TwoColumnPageProps) {
|
|
16
|
+
// Get emitted components from map (so we can get any override that may exist)
|
|
17
|
+
const TwoColumn = getComponentFromMap('TwoColumn');
|
|
17
18
|
|
|
18
19
|
return (
|
|
19
20
|
<TwoColumn
|
|
@@ -2,10 +2,11 @@ import React, { createElement } from 'react';
|
|
|
2
2
|
import Grid from '@material-ui/core/Grid';
|
|
3
3
|
import { GridSize } from '@material-ui/core/Grid';
|
|
4
4
|
import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
|
|
5
|
-
import
|
|
5
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
6
|
+
|
|
6
7
|
// import type { PConnProps } from '../../../../types/PConnProps';
|
|
7
8
|
|
|
8
|
-
// Can't use PConnProps until
|
|
9
|
+
// Can't use PConnProps until PConnect.getChildren() type is ok
|
|
9
10
|
// interface WideNarrowDetailsProps extends PConnProps {
|
|
10
11
|
// // If any, enter additional props that only exist on this component
|
|
11
12
|
// showLabel?: boolean,
|
|
@@ -16,6 +17,9 @@ import FieldGroup from '@pega/react-sdk-components/lib/components/designSystemEx
|
|
|
16
17
|
const COLUMN_WIDTHS = [8, 4];
|
|
17
18
|
|
|
18
19
|
export default function WideNarrowDetails(props /* : WideNarrowDetailsProps */) {
|
|
20
|
+
// Get emitted components from map (so we can get any override that may exist)
|
|
21
|
+
const FieldGroup = getComponentFromMap('FieldGroup');
|
|
22
|
+
|
|
19
23
|
const { label, showLabel = true, getPConnect, showHighlightedData = false } = props;
|
|
20
24
|
|
|
21
25
|
// Get the inherited props from the parent to determine label settings
|
|
@@ -53,7 +57,8 @@ export default function WideNarrowDetails(props /* : WideNarrowDetailsProps */)
|
|
|
53
57
|
field.config.displayAsStatus = true;
|
|
54
58
|
}
|
|
55
59
|
|
|
56
|
-
return getPConnect().createComponent(field
|
|
60
|
+
return getPConnect().createComponent(field,
|
|
61
|
+
'', '', {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional
|
|
57
62
|
});
|
|
58
63
|
}
|
|
59
64
|
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import React, { Children } from "react";
|
|
2
|
-
|
|
3
|
-
// import { TwoColumnPage as TwoColumn } from "@pega/cosmos-react-core";
|
|
4
|
-
import WideNarrow from '@pega/react-sdk-components/lib/components/template/WideNarrow/WideNarrow';
|
|
2
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
5
3
|
|
|
6
4
|
// WideNarrowPage does NOT have getPConnect. So, no need to extend from PConnProps
|
|
7
5
|
interface WideNarrowPageProps {
|
|
@@ -18,6 +16,9 @@ interface WideNarrowPageProps {
|
|
|
18
16
|
* to the Cosmos template.
|
|
19
17
|
*/
|
|
20
18
|
export default function WideNarrowPage(props: WideNarrowPageProps) {
|
|
19
|
+
// Get emitted components from map (so we can get any override that may exist)
|
|
20
|
+
const WideNarrow = getComponentFromMap('WideNarrow');
|
|
21
|
+
|
|
21
22
|
const { children, title, templateCol = '1fr 1fr', icon = '' } = props;
|
|
22
23
|
const childArray = Children.toArray(children);
|
|
23
24
|
|
package/tests/assets/components/SDK-React/create/override-sdk/widget/Attachment/Attachment.tsx
CHANGED
|
@@ -4,9 +4,10 @@ import { Button } from '@material-ui/core';
|
|
|
4
4
|
import React, { useState, useEffect } from 'react';
|
|
5
5
|
import { buildFilePropsFromResponse, getIconFromFileType, validateMaxSize, getIconForAttachment } from '@pega/react-sdk-components/lib/components/helpers/attachmentHelpers';
|
|
6
6
|
import './Attachment.css';
|
|
7
|
-
import SummaryList from '@pega/react-sdk-components/lib/components/widget/SummaryList'
|
|
8
7
|
import { CircularProgress } from "@material-ui/core";
|
|
9
8
|
import download from "downloadjs";
|
|
9
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
10
|
+
|
|
10
11
|
// import type { PConnProps } from '../../../types/PConnProps';
|
|
11
12
|
|
|
12
13
|
// Remove this and use "real" PCore type once .d.ts is fixed (currently shows 2 errors)
|
|
@@ -27,6 +28,9 @@ function getCurrentAttachmentsList(key, context) {
|
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
export default function Attachment(props /* :AttachmentProps */) {
|
|
31
|
+
// Get emitted components from map (so we can get any override that may exist)
|
|
32
|
+
const SummaryList = getComponentFromMap('SummaryList');
|
|
33
|
+
|
|
30
34
|
const PCoreVersion = PCore.getPCoreVersion();
|
|
31
35
|
const {value, getPConnect, label, validatemessage} = props;
|
|
32
36
|
/* this is a temporary fix because required is supposed to be passed as a boolean and NOT as a string */
|
package/tests/assets/components/SDK-React/create/override-sdk/widget/FileUtility/FileUtility.tsx
CHANGED
|
@@ -2,14 +2,16 @@ import React, { useEffect, useState } from "react";
|
|
|
2
2
|
import TextField from '@material-ui/core/TextField';
|
|
3
3
|
import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
4
4
|
import download from "downloadjs";
|
|
5
|
-
import SummaryList from '
|
|
6
|
-
import ActionButtonsForFileUtil from '
|
|
5
|
+
// import SummaryList from '../../SummaryList';
|
|
6
|
+
// import ActionButtonsForFileUtil from '../ActionButtonsForFileUtil';
|
|
7
7
|
import './FileUtility.css';
|
|
8
8
|
import { IconButton, Menu, MenuItem } from '@material-ui/core';
|
|
9
9
|
import MoreVertIcon from '@material-ui/icons/MoreVert';
|
|
10
10
|
import { Button } from '@material-ui/core';
|
|
11
11
|
import { validateMaxSize } from '@pega/react-sdk-components/lib/components/helpers/attachmentHelpers';
|
|
12
12
|
import { CircularProgress } from "@material-ui/core";
|
|
13
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
14
|
+
|
|
13
15
|
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
14
16
|
|
|
15
17
|
|
|
@@ -23,6 +25,10 @@ declare const PCore: any;
|
|
|
23
25
|
|
|
24
26
|
|
|
25
27
|
export default function FileUtility(props:FileUtilityProps) {
|
|
28
|
+
// Get emitted components from map (so we can get any override that may exist)
|
|
29
|
+
const SummaryList = getComponentFromMap('SummaryList');
|
|
30
|
+
const ActionButtonsForFileUtil = getComponentFromMap('ActionButtonsForFileUtil');
|
|
31
|
+
|
|
26
32
|
const { getPConnect } = props;
|
|
27
33
|
const thePConn = getPConnect();
|
|
28
34
|
const required = true;
|
package/tests/assets/components/SDK-React/create/override-sdk/widget/QuickCreate/QuickCreate.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import WssQuickCreate from '@pega/react-sdk-components/lib/components/designSystemExtension/WssQuickCreate';
|
|
3
2
|
import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
3
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
4
4
|
// import type { PConnProps } from '../../../types/PConnProps';
|
|
5
5
|
|
|
6
6
|
// Can't add PConnTypes until we can resolve type problems with
|
|
@@ -11,6 +11,9 @@ import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
export default function QuickCreate(props /* : QuickCreateProps */) {
|
|
14
|
+
// Get emitted components from map (so we can get any override that may exist)
|
|
15
|
+
const WssQuickCreate = getComponentFromMap('WssQuickCreate');
|
|
16
|
+
|
|
14
17
|
const { getPConnect, heading, showCaseIcons, classFilter } = props;
|
|
15
18
|
const pConn = getPConnect();
|
|
16
19
|
const createCase = (className) => {
|
package/tests/assets/components/SDK-React/create/override-sdk/widget/SummaryList/SummaryList.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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
4
|
// SummaryList does NOT have getPConnect. So, no need to extend from PConnProps
|
|
5
5
|
|
|
@@ -12,6 +12,9 @@ interface SummaryListProps {
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
export default function SummaryList(props: SummaryListProps) {
|
|
15
|
+
// Get emitted components from map (so we can get any override that may exist)
|
|
16
|
+
const SummaryItem = getComponentFromMap('SummaryItem');
|
|
17
|
+
|
|
15
18
|
const { menuIconOverride$: menuOverride = ""} = props;
|
|
16
19
|
return (
|
|
17
20
|
<div>
|
|
@@ -31,22 +31,21 @@ import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps
|
|
|
31
31
|
|
|
32
32
|
interface ToDoProps extends PConnProps {
|
|
33
33
|
// If any, enter additional props that only exist on this component
|
|
34
|
-
datasource?: any
|
|
35
|
-
myWorkList?: any
|
|
34
|
+
datasource?: any;
|
|
35
|
+
myWorkList?: any;
|
|
36
36
|
// eslint-disable-next-line react/no-unused-prop-types
|
|
37
|
-
caseInfoID?: string
|
|
38
|
-
headerText?: string
|
|
37
|
+
caseInfoID?: string;
|
|
38
|
+
headerText?: string;
|
|
39
39
|
// eslint-disable-next-line react/no-unused-prop-types
|
|
40
|
-
itemKey?: string
|
|
41
|
-
showTodoList?: boolean
|
|
42
|
-
type?: string
|
|
40
|
+
itemKey?: string;
|
|
41
|
+
showTodoList?: boolean;
|
|
42
|
+
type?: string;
|
|
43
43
|
// eslint-disable-next-line react/no-unused-prop-types
|
|
44
|
-
context?: string
|
|
45
|
-
isConfirm?: boolean
|
|
44
|
+
context?: string;
|
|
45
|
+
isConfirm?: boolean;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
const isChildCase = assignment => {
|
|
48
|
+
const isChildCase = (assignment) => {
|
|
50
49
|
return assignment.isChild;
|
|
51
50
|
};
|
|
52
51
|
|
|
@@ -65,7 +64,7 @@ function getID(assignment: any) {
|
|
|
65
64
|
}
|
|
66
65
|
}
|
|
67
66
|
|
|
68
|
-
const useStyles = makeStyles(theme => ({
|
|
67
|
+
const useStyles = makeStyles((theme) => ({
|
|
69
68
|
root: {
|
|
70
69
|
marginTop: theme.spacing(1),
|
|
71
70
|
marginBottom: theme.spacing(1),
|
|
@@ -86,15 +85,7 @@ const useStyles = makeStyles(theme => ({
|
|
|
86
85
|
}));
|
|
87
86
|
|
|
88
87
|
export default function ToDo(props: ToDoProps) {
|
|
89
|
-
const {
|
|
90
|
-
getPConnect,
|
|
91
|
-
datasource = [],
|
|
92
|
-
headerText = 'To do',
|
|
93
|
-
showTodoList = true,
|
|
94
|
-
myWorkList = {},
|
|
95
|
-
type = 'worklist',
|
|
96
|
-
isConfirm = false
|
|
97
|
-
} = props;
|
|
88
|
+
const { getPConnect, datasource = [], headerText = 'To do', showTodoList = true, myWorkList = {}, type = 'worklist', isConfirm = false } = props;
|
|
98
89
|
|
|
99
90
|
const CONSTS = PCore.getConstants();
|
|
100
91
|
|
|
@@ -130,15 +121,15 @@ export default function ToDo(props: ToDoProps) {
|
|
|
130
121
|
}
|
|
131
122
|
}
|
|
132
123
|
|
|
133
|
-
const getAssignmentId = assignment => {
|
|
124
|
+
const getAssignmentId = (assignment) => {
|
|
134
125
|
return type === CONSTS.TODO ? assignment.ID : assignment.id;
|
|
135
126
|
};
|
|
136
127
|
|
|
137
|
-
const getPriority = assignment => {
|
|
128
|
+
const getPriority = (assignment) => {
|
|
138
129
|
return type === CONSTS.TODO ? assignment.urgency : assignment.priority;
|
|
139
130
|
};
|
|
140
131
|
|
|
141
|
-
const getAssignmentName = assignment => {
|
|
132
|
+
const getAssignmentName = (assignment) => {
|
|
142
133
|
return type === CONSTS.TODO ? assignment.name : assignment.stepName;
|
|
143
134
|
};
|
|
144
135
|
|
|
@@ -173,7 +164,7 @@ export default function ToDo(props: ToDoProps) {
|
|
|
173
164
|
const sTarget = thePConn.getContainerName();
|
|
174
165
|
const sTargetContainerName = sTarget;
|
|
175
166
|
|
|
176
|
-
const options = { containerName: sTargetContainerName, channelName:
|
|
167
|
+
const options = { containerName: sTargetContainerName, channelName: '' };
|
|
177
168
|
|
|
178
169
|
if (classname === null || classname === '') {
|
|
179
170
|
classname = thePConn.getCaseInfo().getClassName();
|
|
@@ -208,30 +199,26 @@ export default function ToDo(props: ToDoProps) {
|
|
|
208
199
|
|
|
209
200
|
if ((showTodoList && type !== CONSTS.TODO) || assignment.isChild === true) {
|
|
210
201
|
/* Supress link for todo inside flow step */
|
|
211
|
-
return (
|
|
212
|
-
<Button size='small' color='primary'>{`${assignment.name} ${getID(assignment)}`}</Button>
|
|
213
|
-
);
|
|
202
|
+
return <Button size="small" color="primary">{`${assignment.name} ${getID(assignment)}`}</Button>;
|
|
214
203
|
}
|
|
215
204
|
return displayID;
|
|
216
205
|
};
|
|
217
206
|
|
|
218
|
-
const getListItemComponent = assignment => {
|
|
207
|
+
const getListItemComponent = (assignment) => {
|
|
219
208
|
if (isDesktop) {
|
|
220
209
|
return (
|
|
221
210
|
<>
|
|
222
211
|
{localizedVal('Task in', localeCategory)}
|
|
223
212
|
{renderTaskId(type, getPConnect, showTodoList, assignment)}
|
|
224
213
|
{type === CONSTS.WORKLIST && assignment.status ? `\u2022 ` : undefined}
|
|
225
|
-
{type === CONSTS.WORKLIST && assignment.status ?
|
|
226
|
-
<span className='psdk-todo-assignment-status'>{assignment.status}</span>
|
|
227
|
-
) : undefined}
|
|
214
|
+
{type === CONSTS.WORKLIST && assignment.status ? <span className="psdk-todo-assignment-status">{assignment.status}</span> : undefined}
|
|
228
215
|
{` \u2022 ${localizedVal('Urgency', localeCategory)} ${getPriority(assignment)}`}
|
|
229
216
|
</>
|
|
230
217
|
);
|
|
231
218
|
}
|
|
232
219
|
return (
|
|
233
220
|
<>
|
|
234
|
-
<Button size=
|
|
221
|
+
<Button size="small" color="primary">{`${assignment.name} ${getID(assignment)}`}</Button>
|
|
235
222
|
{` \u2022 ${localizedVal('Urgency', localeCategory)} ${getPriority(assignment)}`}
|
|
236
223
|
</>
|
|
237
224
|
);
|
|
@@ -242,37 +229,33 @@ export default function ToDo(props: ToDoProps) {
|
|
|
242
229
|
{showTodoList && (
|
|
243
230
|
<CardHeader
|
|
244
231
|
title={
|
|
245
|
-
<Badge badgeContent={assignmentCount} color=
|
|
246
|
-
<Typography variant=
|
|
232
|
+
<Badge badgeContent={assignmentCount} overlap="rectangular" color="primary">
|
|
233
|
+
<Typography variant="h6">{headerText} </Typography>
|
|
247
234
|
</Badge>
|
|
248
235
|
}
|
|
249
236
|
></CardHeader>
|
|
250
237
|
)}
|
|
251
238
|
<List>
|
|
252
|
-
{assignments.map(assignment => (
|
|
253
|
-
|
|
254
|
-
<
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
<
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
showTodoList,
|
|
264
|
-
assignment
|
|
265
|
-
)} \u2022 ${localizedVal('Urgency', localeCategory)} ${getPriority(assignment)}`}
|
|
266
|
-
</div>
|
|
267
|
-
{!isConfirm && (
|
|
268
|
-
<div style={{ marginLeft: 'auto' }}>
|
|
269
|
-
<IconButton onClick={() => clickGo(assignment)}>
|
|
270
|
-
<ArrowForwardIosOutlinedIcon />
|
|
271
|
-
</IconButton>
|
|
272
|
-
</div>
|
|
273
|
-
)}
|
|
239
|
+
{assignments.map((assignment) => (
|
|
240
|
+
<div className="psdk-todo-avatar-header" key={getAssignmentId(assignment)}>
|
|
241
|
+
<Avatar className={classes.avatar} style={{ marginRight: '16px' }}>
|
|
242
|
+
{currentUserInitials}
|
|
243
|
+
</Avatar>
|
|
244
|
+
<div style={{ display: 'block' }}>
|
|
245
|
+
<Typography variant="h6">{assignment?.name}</Typography>
|
|
246
|
+
{`${localizedVal('Task in', localeCategory)} ${renderTaskId(type, getPConnect, showTodoList, assignment)} \u2022 ${localizedVal(
|
|
247
|
+
'Urgency',
|
|
248
|
+
localeCategory
|
|
249
|
+
)} ${getPriority(assignment)}`}
|
|
274
250
|
</div>
|
|
275
|
-
|
|
251
|
+
{!isConfirm && (
|
|
252
|
+
<div style={{ marginLeft: 'auto' }}>
|
|
253
|
+
<IconButton onClick={() => clickGo(assignment)}>
|
|
254
|
+
<ArrowForwardIosOutlinedIcon />
|
|
255
|
+
</IconButton>
|
|
256
|
+
</div>
|
|
257
|
+
)}
|
|
258
|
+
</div>
|
|
276
259
|
))}
|
|
277
260
|
</List>
|
|
278
261
|
</>
|
|
@@ -285,8 +268,8 @@ export default function ToDo(props: ToDoProps) {
|
|
|
285
268
|
{showTodoList && (
|
|
286
269
|
<CardHeader
|
|
287
270
|
title={
|
|
288
|
-
<Badge badgeContent={assignmentCount} color=
|
|
289
|
-
<Typography variant=
|
|
271
|
+
<Badge badgeContent={assignmentCount} overlap="rectangular" color="primary">
|
|
272
|
+
<Typography variant="h6">{headerText} </Typography>
|
|
290
273
|
</Badge>
|
|
291
274
|
}
|
|
292
275
|
avatar={<Avatar className={classes.avatar}>{currentUserInitials}</Avatar>}
|
|
@@ -294,17 +277,9 @@ export default function ToDo(props: ToDoProps) {
|
|
|
294
277
|
)}
|
|
295
278
|
<CardContent>
|
|
296
279
|
<List>
|
|
297
|
-
{assignments.map(assignment => (
|
|
298
|
-
<ListItem
|
|
299
|
-
|
|
300
|
-
dense
|
|
301
|
-
divider
|
|
302
|
-
onClick={() => clickGo(assignment)}
|
|
303
|
-
>
|
|
304
|
-
<ListItemText
|
|
305
|
-
primary={getAssignmentName(assignment)}
|
|
306
|
-
secondary={getListItemComponent(assignment)}
|
|
307
|
-
/>
|
|
280
|
+
{assignments.map((assignment) => (
|
|
281
|
+
<ListItem key={getAssignmentId(assignment)} dense divider onClick={() => clickGo(assignment)}>
|
|
282
|
+
<ListItemText primary={getAssignmentName(assignment)} secondary={getListItemComponent(assignment)} />
|
|
308
283
|
<ListItemSecondaryAction>
|
|
309
284
|
<IconButton onClick={() => clickGo(assignment)}>
|
|
310
285
|
<ArrowForwardIosOutlinedIcon />
|
|
@@ -317,21 +292,17 @@ export default function ToDo(props: ToDoProps) {
|
|
|
317
292
|
</Card>
|
|
318
293
|
)}
|
|
319
294
|
|
|
320
|
-
{type === CONSTS.TODO && !isConfirm &&
|
|
321
|
-
<Card className={classes.todoWrapper}>{toDoContent}</Card>
|
|
322
|
-
)}
|
|
295
|
+
{type === CONSTS.TODO && !isConfirm && <Card className={classes.todoWrapper}>{toDoContent}</Card>}
|
|
323
296
|
{type === CONSTS.TODO && isConfirm && <Fragment>{toDoContent}</Fragment>}
|
|
324
297
|
|
|
325
298
|
{assignmentCount > 3 && (
|
|
326
|
-
<Box display=
|
|
299
|
+
<Box display="flex" justifyContent="center">
|
|
327
300
|
{bShowMore ? (
|
|
328
|
-
<Button color=
|
|
329
|
-
{showMoreLocalizedValue ===
|
|
301
|
+
<Button color="primary" onClick={_showMore}>
|
|
302
|
+
{showMoreLocalizedValue === 'show_more' ? 'Show more' : showMoreLocalizedValue}
|
|
330
303
|
</Button>
|
|
331
304
|
) : (
|
|
332
|
-
<Button onClick={_showLess}>
|
|
333
|
-
{showlessLocalizedValue === 'show_less' ? 'Show less': showlessLocalizedValue}
|
|
334
|
-
</Button>
|
|
305
|
+
<Button onClick={_showLess}>{showlessLocalizedValue === 'show_less' ? 'Show less' : showlessLocalizedValue}</Button>
|
|
335
306
|
)}
|
|
336
307
|
</Box>
|
|
337
308
|
)}
|
|
@@ -342,8 +313,8 @@ export default function ToDo(props: ToDoProps) {
|
|
|
342
313
|
onClose={handleSnackbarClose}
|
|
343
314
|
message={snackbarMessage}
|
|
344
315
|
action={
|
|
345
|
-
<IconButton size=
|
|
346
|
-
<CloseIcon fontSize=
|
|
316
|
+
<IconButton size="small" aria-label="close" color="inherit" onClick={handleSnackbarClose}>
|
|
317
|
+
<CloseIcon fontSize="small" />
|
|
347
318
|
</IconButton>
|
|
348
319
|
}
|
|
349
320
|
/>
|
|
@@ -102,7 +102,7 @@ const PegaDxilMyTextInput = props => {
|
|
|
102
102
|
} else if (!hasSuggestions && status !== 'success') {
|
|
103
103
|
setStatus(validatemessage !== '' ? 'error' : undefined);
|
|
104
104
|
}
|
|
105
|
-
}, [validatemessage, hasSuggestions]);
|
|
105
|
+
}, [validatemessage, hasSuggestions, status]);
|
|
106
106
|
|
|
107
107
|
const onResolveSuggestionHandler = (accepted) => {
|
|
108
108
|
suggestionsHandler(accepted, pConn, setStatus);
|
package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyBoolean/index.tsx
CHANGED
|
@@ -8,41 +8,38 @@ import {
|
|
|
8
8
|
} from '@material-ui/core';
|
|
9
9
|
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
10
10
|
// import PropTypes from 'prop-types';
|
|
11
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
12
11
|
import StyledPegaDxilMyBooleanWrapper from './styles';
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
//
|
|
18
|
-
//
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
//
|
|
27
|
-
|
|
28
|
-
//
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
//
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
// placeholder?: string
|
|
39
|
-
// }
|
|
12
|
+
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
13
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
14
|
+
|
|
15
|
+
interface PegaDxilMyBooleanProps extends PConnProps {
|
|
16
|
+
// If any, enter additional props that only exist on this componentName
|
|
17
|
+
// Everything from PConnFieldProps except value and change type of value to boolean
|
|
18
|
+
|
|
19
|
+
value?: boolean,
|
|
20
|
+
label: string,
|
|
21
|
+
required: boolean,
|
|
22
|
+
disabled: boolean,
|
|
23
|
+
validatemessage: string,
|
|
24
|
+
status?: string,
|
|
25
|
+
// eslint-disable-next-line react/no-unused-prop-types
|
|
26
|
+
onChange: any,
|
|
27
|
+
// eslint-disable-next-line react/no-unused-prop-types
|
|
28
|
+
onBlur?: any,
|
|
29
|
+
readOnly: boolean,
|
|
30
|
+
testId: string,
|
|
31
|
+
helperText: string,
|
|
32
|
+
displayMode?: string,
|
|
33
|
+
hideLabel: boolean,
|
|
34
|
+
// eslint-disable-next-line react/no-unused-prop-types
|
|
35
|
+
placeholder?: string
|
|
36
|
+
}
|
|
40
37
|
|
|
41
38
|
// Duplicated runtime code from React SDK
|
|
42
39
|
|
|
43
40
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
44
41
|
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
45
|
-
export default function PegaDxilMyBoolean(props
|
|
42
|
+
export default function PegaDxilMyBoolean(props: PegaDxilMyBooleanProps) {
|
|
46
43
|
const {
|
|
47
44
|
getPConnect,
|
|
48
45
|
label,
|
|
@@ -57,6 +54,9 @@ export default function PegaDxilMyBoolean(props /* : PegaDxilMyBooleanProps */)
|
|
|
57
54
|
displayMode,
|
|
58
55
|
hideLabel
|
|
59
56
|
} = props;
|
|
57
|
+
|
|
58
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
59
|
+
|
|
60
60
|
const helperTextToDisplay = validatemessage || helperText;
|
|
61
61
|
|
|
62
62
|
const thePConn = getPConnect();
|
|
@@ -85,6 +85,7 @@ export default function PegaDxilMyBoolean(props /* : PegaDxilMyBooleanProps */)
|
|
|
85
85
|
};
|
|
86
86
|
|
|
87
87
|
const handleBlur = event => {
|
|
88
|
+
// @ts-ignore
|
|
88
89
|
thePConn.getValidationApi().validate(event.target.checked, ''); // 2nd arg empty string until typedef marked correctly as optional
|
|
89
90
|
};
|
|
90
91
|
|
package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/index.tsx
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
2
|
import CurrencyTextField from '@unicef/material-ui-currency-textfield';
|
|
3
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
3
|
+
// import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
4
4
|
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
5
5
|
// import PropTypes from 'prop-types';
|
|
6
6
|
import { format } from "@pega/react-sdk-components/lib/components/helpers/formatters";
|
|
7
7
|
import { getCurrencyCharacters, getCurrencyOptions } from '@pega/react-sdk-components/lib/components/field/Currency/currency-utils.js';
|
|
8
8
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
9
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
import StyledPegaDxilMyCurrencyWrapper from './styles';
|
|
@@ -44,6 +45,8 @@ export default function PegaDxilMyCurrency(props: PegaDxilMyCurrencyProps) {
|
|
|
44
45
|
const propName = pConn.getStateProps()["value"];
|
|
45
46
|
const helperTextToDisplay = validatemessage || helperText;
|
|
46
47
|
|
|
48
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
49
|
+
|
|
47
50
|
let readOnlyProp = {}; // Note: empty if NOT ReadOnly
|
|
48
51
|
|
|
49
52
|
if (readOnly) {
|
package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDate/index.tsx
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { KeyboardDatePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';
|
|
3
3
|
import DayjsUtils from '@date-io/dayjs';
|
|
4
|
-
import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
4
|
+
// import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
5
5
|
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
6
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
6
|
+
// import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
7
7
|
// import PropTypes from 'prop-types';
|
|
8
8
|
import { format } from '@pega/react-sdk-components/lib/components/helpers/formatters';
|
|
9
9
|
import { dateFormatInfoDefault, getDateFormatInfo} from '@pega/react-sdk-components/lib/components/helpers/date-format-utils';
|
|
10
10
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
11
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
11
12
|
|
|
12
13
|
import StyledPegaDxilMyDateWrapper from './styles';
|
|
13
14
|
|
|
@@ -44,6 +45,9 @@ export default function PegaDxilMyDate(props: PegaDxilMyDateProps) {
|
|
|
44
45
|
const propName = pConn.getStateProps()["value"];
|
|
45
46
|
const helperTextToDisplay = validatemessage || helperText;
|
|
46
47
|
|
|
48
|
+
const TextInput = getComponentFromMap("TextInput");
|
|
49
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
50
|
+
|
|
47
51
|
// Start with default dateFormatInfo
|
|
48
52
|
const dateFormatInfo = dateFormatInfoDefault;
|
|
49
53
|
// and then update, as needed, based on locale, etc.
|
package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/index.tsx
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { KeyboardDateTimePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';
|
|
3
3
|
import DayjsUtils from '@date-io/dayjs';
|
|
4
|
-
import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
4
|
+
// import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
5
5
|
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
6
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
6
|
+
// import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
7
7
|
// import PropTypes from 'prop-types';
|
|
8
8
|
import { format } from '@pega/react-sdk-components/lib/components/helpers/formatters/';
|
|
9
9
|
import { dateFormatInfoDefault, getDateFormatInfo} from '@pega/react-sdk-components/lib/components/helpers/date-format-utils';
|
|
10
10
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
11
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
import StyledPegaDxilMyDateTimeWrapper from './styles';
|
|
@@ -43,6 +44,9 @@ export default function PegaDxilMyDateTime(props: PegaDxilMyDateTimeProps) {
|
|
|
43
44
|
const propName = pConn.getStateProps()["value"];
|
|
44
45
|
const helperTextToDisplay = validatemessage || helperText;
|
|
45
46
|
|
|
47
|
+
const TextInput = getComponentFromMap("TextInput");
|
|
48
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
49
|
+
|
|
46
50
|
// Start with default dateFormatInfo
|
|
47
51
|
const dateFormatInfo = dateFormatInfoDefault;
|
|
48
52
|
// and then update, as needed, based on locale, etc.
|
package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/index.tsx
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
2
|
import CurrencyTextField from '@unicef/material-ui-currency-textfield';
|
|
3
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
3
|
+
// import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
4
4
|
import { getCurrencyCharacters, getCurrencyOptions } from '@pega/react-sdk-components/lib/components/field/Currency/currency-utils.js';
|
|
5
5
|
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
6
6
|
import { format } from "@pega/react-sdk-components/lib/components/helpers/formatters";
|
|
7
7
|
// import PropTypes from 'prop-types';
|
|
8
8
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
9
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
import StyledPegaDxilMyDecimalWrapper from './styles';
|
|
@@ -49,6 +50,8 @@ export default function PegaDxilMyDecimal(props: PegaDxilMyDecimalProps) {
|
|
|
49
50
|
const propName = pConn.getStateProps()["value"];
|
|
50
51
|
const helperTextToDisplay = validatemessage || helperText;
|
|
51
52
|
|
|
53
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
54
|
+
|
|
52
55
|
const [decValue, setDecimalvalue] = useState("");
|
|
53
56
|
const [theCurrDec, setCurrDec] = useState(".");
|
|
54
57
|
const [theCurrSep, setCurrSep] = useState(",");
|
package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyEmail/index.tsx
CHANGED
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { TextField, InputAdornment } from '@material-ui/core';
|
|
4
4
|
import MailOutlineIcon from '@material-ui/icons/MailOutline';
|
|
5
|
-
import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
6
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
5
|
+
// import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
6
|
+
// import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
7
7
|
// import PropTypes from 'prop-types';
|
|
8
8
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
9
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
import StyledPegaDxilMyEmailWrapper from './styles';
|
|
@@ -38,6 +39,9 @@ export default function PegaDxilMyEmail(props: PegaDxilMyEmailProps) {
|
|
|
38
39
|
} = props;
|
|
39
40
|
const helperTextToDisplay = validatemessage || helperText;
|
|
40
41
|
|
|
42
|
+
const TextInput = getComponentFromMap("TextInput");
|
|
43
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
44
|
+
|
|
41
45
|
if (displayMode === 'LABELS_LEFT') {
|
|
42
46
|
return <FieldValueList name={hideLabel ? '' : label} value={value} />;
|
|
43
47
|
}
|