@pega/dx-component-builder-sdk 8.23.17 → 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/package.json +1 -1
- package/src/tasks/bundle/builderAngular/webpack.config.js +1 -2
- package/src/tasks/create/templates/Constellation/field/Boolean/index.jsx.mustache +15 -3
- package/src/tasks/create/templates/Constellation/field/Date/index.jsx.mustache +20 -4
- package/src/tasks/create/templates/Constellation/field/DateTime/index.jsx.mustache +18 -3
- package/src/tasks/create/templates/Constellation/field/Decimal/index.jsx.mustache +19 -4
- package/src/tasks/create/templates/Constellation/field/Decimal-Currency/index.jsx.mustache +19 -4
- package/src/tasks/create/templates/Constellation/field/Decimal-Percentage/index.jsx.mustache +20 -4
- package/src/tasks/create/templates/Constellation/field/Integer/index.jsx.mustache +21 -4
- package/src/tasks/create/templates/Constellation/field/Picklist/index.jsx.mustache +25 -3
- package/src/tasks/create/templates/Constellation/field/Text/index.jsx.mustache +1 -3
- package/src/tasks/create/templates/Constellation/field/Text-Email/index.jsx.mustache +19 -3
- package/src/tasks/create/templates/Constellation/field/Text-Input/index.jsx.mustache +15 -3
- package/src/tasks/create/templates/Constellation/field/Text-Paragraph/index.jsx.mustache +15 -3
- package/src/tasks/create/templates/Constellation/field/Text-Phone/index.jsx.mustache +18 -3
- package/src/tasks/create/templates/Constellation/field/Text-URL/index.jsx.mustache +18 -3
- package/src/tasks/create/templates/Constellation/field/TimeOfDay/index.jsx.mustache +20 -4
- package/src/tasks/create/templates/SDK-React/field/Boolean/index.tsx.mustache +1 -0
- package/src/tasks/create/templates/SDK-React/field/Date/demo.stories.jsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/field/Date/index.tsx.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/DateTime/demo.stories.jsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/field/Decimal/demo.stories.jsx.mustache +1 -0
- package/src/tasks/create/templates/SDK-React/field/Decimal/index.tsx.mustache +1 -0
- package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/demo.stories.jsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/index.tsx.mustache +2 -2
- package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/index.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/field/Integer/index.tsx.mustache +1 -3
- package/src/tasks/create/templates/SDK-React/field/Picklist/index.tsx.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/Text/index.tsx.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/Text-Email/index.tsx.mustache +1 -2
- package/src/tasks/create/templates/SDK-React/field/Text-Input/index.tsx.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/Text-Paragraph/index.tsx.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/Text-Phone/index.tsx.mustache +0 -2
- package/src/tasks/create/templates/SDK-React/field/Text-URL/index.tsx.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/TimeOfDay/index.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/template/DETAILS/index.tsx.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/template/DETAILS-region/index.tsx.mustache +2 -3
- package/src/tasks/create/templates/SDK-React/template/FORM/demo.stories.jsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/template/FORM/index.tsx.mustache +9 -9
- package/src/tasks/create/templates/SDK-React/template/FORM-region/demo.stories.jsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/demo.stories.jsx.mustache +1 -1
- package/tests/assets/components/SDK-React/create/custom-constellation/field/Pega_DXIL_MyTestText/index.jsx +1 -3
- package/tests/assets/components/SDK-React/create/custom-sdk/field/Pega_DXIL_MyTestText/index.tsx +0 -1
- package/tests/assets/components/SDK-React/create/override-sdk/field/AutoComplete/AutoComplete.tsx +2 -2
- package/tests/assets/components/SDK-React/create/override-sdk/field/Checkbox/Checkbox.tsx +41 -32
- package/tests/assets/components/SDK-React/create/override-sdk/field/Currency/Currency.tsx +1 -1
- package/tests/assets/components/SDK-React/create/override-sdk/field/Date/Date.tsx +1 -1
- package/tests/assets/components/SDK-React/create/override-sdk/field/DateTime/DateTime.tsx +1 -1
- package/tests/assets/components/SDK-React/create/override-sdk/field/Decimal/Decimal.tsx +1 -1
- package/tests/assets/components/SDK-React/create/override-sdk/field/Dropdown/Dropdown.tsx +17 -15
- package/tests/assets/components/SDK-React/create/override-sdk/field/RadioButtons/RadioButtons.tsx +11 -9
- package/tests/assets/components/SDK-React/create/override-sdk/field/RichText/RichText.tsx +5 -3
- package/tests/assets/components/SDK-React/create/override-sdk/field/ScalarList/ScalarList.tsx +15 -6
- package/tests/assets/components/SDK-React/create/override-sdk/field/TextInput/TextInput.tsx +1 -1
- package/tests/assets/components/SDK-React/create/override-sdk/infra/Assignment/Assignment.tsx +19 -16
- package/tests/assets/components/SDK-React/create/override-sdk/infra/DashboardFilter/DashboardFilter.tsx +1 -1
- 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 +1 -1
- package/tests/assets/components/SDK-React/create/override-sdk/infra/ErrorBoundary/ErrorBoundary.tsx +1 -1
- package/tests/assets/components/SDK-React/create/override-sdk/template/AppShell/AppShell.tsx +1 -1
- package/tests/assets/components/SDK-React/create/override-sdk/template/DataReference/DataReference.tsx +16 -16
- package/tests/assets/components/SDK-React/create/override-sdk/template/InlineDashboardPage/InlineDashboardPage.tsx +1 -1
- package/tests/assets/components/SDK-React/create/override-sdk/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +1 -1
- package/tests/assets/components/SDK-React/create/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +1 -1
- package/tests/assets/components/SDK-React/create/override-sdk/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +1 -2
- package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyBoolean/index.jsx +15 -3
- package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyCurrency/index.jsx +19 -4
- package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyDate/index.jsx +20 -4
- package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyDateTime/index.jsx +18 -3
- package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyDecimal/index.jsx +19 -4
- package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyEmail/index.jsx +19 -3
- package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyInteger/index.jsx +21 -4
- package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyParagraph/index.jsx +15 -3
- package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyPercentage/index.jsx +20 -4
- package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyPhone/index.jsx +18 -3
- package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyPicklist/index.jsx +25 -3
- package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyText/index.jsx +1 -3
- package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyTextInput/index.jsx +15 -3
- package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyTimeOfDay/index.jsx +20 -4
- package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyURL/index.jsx +18 -3
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyBoolean/index.tsx +1 -0
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/demo.stories.jsx +1 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/index.tsx +2 -2
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDate/demo.stories.jsx +1 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDate/index.tsx +0 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/demo.stories.jsx +1 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/demo.stories.jsx +1 -0
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/index.tsx +1 -0
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyEmail/index.tsx +1 -2
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyInteger/index.tsx +1 -3
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyParagraph/index.tsx +0 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyPercentage/index.tsx +1 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyPhone/index.tsx +0 -2
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyPicklist/index.tsx +0 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyText/index.tsx +0 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyTextInput/index.tsx +0 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyTimeOfDay/index.tsx +1 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyURL/index.tsx +0 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyDetails/index.tsx +0 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyForm/demo.stories.jsx +1 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyForm/index.tsx +9 -9
- package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/index.tsx +2 -3
- package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnForm/demo.stories.jsx +1 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/widget/Pega_DXIL_MyPageCaseWidget/demo.stories.jsx +1 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/AutoComplete/AutoComplete.tsx +2 -2
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/Checkbox/Checkbox.tsx +41 -32
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/Currency/Currency.tsx +1 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/Date/Date.tsx +1 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/DateTime/DateTime.tsx +1 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/Decimal/Decimal.tsx +1 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/Dropdown/Dropdown.tsx +17 -15
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/RadioButtons/RadioButtons.tsx +11 -9
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/RichText/RichText.tsx +5 -3
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/ScalarList/ScalarList.tsx +15 -6
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/TextInput/TextInput.tsx +1 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/infra/Assignment/Assignment.tsx +19 -16
- package/tests/assets/components/SDK-React/createAll/override-sdk/infra/DashboardFilter/DashboardFilter.tsx +1 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/infra/DashboardFilter/filterUtils.tsx +2 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/infra/DeferLoad/DeferLoad.tsx +1 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/infra/ErrorBoundary/ErrorBoundary.tsx +1 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/AppShell/AppShell.tsx +1 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/DataReference/DataReference.tsx +16 -16
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/InlineDashboardPage/InlineDashboardPage.tsx +1 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +1 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +1 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +1 -2
- package/tests/functional/localCreateBuildAllDeleteAllCustom.test.js +1 -0
- package/tests/functional/localCreateBuildDeleteCustom.test.js +13 -0
- package/tests/functional/localCreateBuildDeleteOverride.test.js +1 -0
- package/tests/functional/localCreatePublishAllDeleteAllCustom.test.js +1 -2
- package/tests/functional/localCreatePublishAllDeleteAllOverride.test.js +1 -2
- package/tests/functional/localCreatePublishDeleteCustom.test.js +4 -3
- package/tests/functional/localCreatePublishDeleteOverride.test.js +2 -2
package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/index.tsx
CHANGED
|
@@ -6,6 +6,7 @@ import { getCurrencyCharacters, getCurrencyOptions } from '@pega/react-sdk-compo
|
|
|
6
6
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
7
7
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
8
8
|
|
|
9
|
+
|
|
9
10
|
import StyledPegaDxilMyCurrencyWrapper from './styles';
|
|
10
11
|
|
|
11
12
|
interface PegaDxilMyCurrencyProps extends PConnFieldProps {
|
|
@@ -44,7 +45,7 @@ export default function PegaDxilMyCurrency(props: PegaDxilMyCurrencyProps) {
|
|
|
44
45
|
|
|
45
46
|
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
46
47
|
|
|
47
|
-
|
|
48
|
+
let readOnlyProp = {}; // Note: empty if NOT ReadOnly
|
|
48
49
|
|
|
49
50
|
if (readOnly) {
|
|
50
51
|
readOnlyProp = { readOnly: true };
|
|
@@ -125,4 +126,3 @@ export default function PegaDxilMyCurrency(props: PegaDxilMyCurrencyProps) {
|
|
|
125
126
|
);
|
|
126
127
|
}
|
|
127
128
|
|
|
128
|
-
|
package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/index.tsx
CHANGED
|
@@ -6,6 +6,7 @@ import { format } from "@pega/react-sdk-components/lib/components/helpers/format
|
|
|
6
6
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
7
7
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
8
8
|
|
|
9
|
+
|
|
9
10
|
import StyledPegaDxilMyDecimalWrapper from './styles';
|
|
10
11
|
|
|
11
12
|
interface PegaDxilMyDecimalProps extends PConnFieldProps {
|
package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyEmail/index.tsx
CHANGED
|
@@ -13,6 +13,7 @@ interface PegaDxilMyEmailProps extends PConnFieldProps {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
|
|
16
|
+
|
|
16
17
|
// Duplicated runtime code from React SDK
|
|
17
18
|
|
|
18
19
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
@@ -84,5 +85,3 @@ export default function PegaDxilMyEmail(props: PegaDxilMyEmailProps) {
|
|
|
84
85
|
</StyledPegaDxilMyEmailWrapper>
|
|
85
86
|
);
|
|
86
87
|
}
|
|
87
|
-
|
|
88
|
-
|
package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyInteger/index.tsx
CHANGED
|
@@ -4,6 +4,7 @@ import { TextField } from '@material-ui/core';
|
|
|
4
4
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
5
5
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
6
6
|
|
|
7
|
+
|
|
7
8
|
import StyledPegaDxilMyIntegerWrapper from './styles';
|
|
8
9
|
|
|
9
10
|
interface PegaDxilMyIntegerProps extends PConnFieldProps {
|
|
@@ -56,8 +57,6 @@ export default function PegaDxilMyInteger(props: PegaDxilMyIntegerProps) {
|
|
|
56
57
|
};
|
|
57
58
|
|
|
58
59
|
function intOnChange(event) {
|
|
59
|
-
// console.log(`Integer intOnChange inValue: ${event.target.value}`);
|
|
60
|
-
|
|
61
60
|
// Disallow "." and "," (separators) since this is an integer field
|
|
62
61
|
// Mimics Pega Integer behavior (where separator characters are "eaten" if they're typed)
|
|
63
62
|
const disallowedChars = ['.', ','];
|
|
@@ -94,4 +93,3 @@ export default function PegaDxilMyInteger(props: PegaDxilMyIntegerProps) {
|
|
|
94
93
|
);
|
|
95
94
|
}
|
|
96
95
|
|
|
97
|
-
|
|
@@ -5,6 +5,7 @@ import { TextField } from '@material-ui/core';
|
|
|
5
5
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
6
6
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
7
7
|
|
|
8
|
+
|
|
8
9
|
import StyledPegaDxilMyPercentageWrapper from './styles';
|
|
9
10
|
|
|
10
11
|
interface PegaDxilMyPercentageProps extends PConnFieldProps {
|
|
@@ -98,4 +99,3 @@ export default function PegaDxilMyPercentage(props: PegaDxilMyPercentageProps) {
|
|
|
98
99
|
);
|
|
99
100
|
}
|
|
100
101
|
|
|
101
|
-
|
package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyPhone/index.tsx
CHANGED
|
@@ -3,7 +3,6 @@ import MuiPhoneNumber from 'material-ui-phone-number';
|
|
|
3
3
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
4
4
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
5
5
|
|
|
6
|
-
|
|
7
6
|
import StyledPegaDxilMyPhoneWrapper from './styles';
|
|
8
7
|
|
|
9
8
|
interface PegaDxilMyPhoneProps extends PConnFieldProps {
|
|
@@ -110,4 +109,3 @@ export default function PegaDxilMyPhone(props: PegaDxilMyPhoneProps) {
|
|
|
110
109
|
);
|
|
111
110
|
}
|
|
112
111
|
|
|
113
|
-
|
package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyTimeOfDay/index.tsx
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
// import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
2
3
|
import { KeyboardTimePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';
|
|
3
4
|
import DayjsUtils from '@date-io/dayjs';
|
|
4
5
|
import dayjs from 'dayjs';
|
|
@@ -100,4 +101,3 @@ export default function PegaDxilMyTimeOfDay(props: PegaDxilMyTimeOfDayProps) {
|
|
|
100
101
|
);
|
|
101
102
|
}
|
|
102
103
|
|
|
103
|
-
|
|
@@ -3,7 +3,6 @@ import Grid from "@material-ui/core/Grid";
|
|
|
3
3
|
import createPConnectComponent from "@pega/react-sdk-components/lib/bridge/react_pconnect";
|
|
4
4
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
5
5
|
|
|
6
|
-
|
|
7
6
|
import StyledPegaDxilMyDetailsWrapper from "./styles";
|
|
8
7
|
|
|
9
8
|
// Can't use PConnProps until getPConnect().getChildren() types are ok
|
package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyForm/index.tsx
CHANGED
|
@@ -2,26 +2,26 @@ import React, { createElement } from 'react';
|
|
|
2
2
|
|
|
3
3
|
import { getInstructions } from './utils';
|
|
4
4
|
import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
|
|
5
|
+
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
5
6
|
|
|
6
7
|
import './DefaultForm.css';
|
|
7
8
|
|
|
8
9
|
import StyledPegaDxilMyFormWrapper from "./styles";
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
//
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
//
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
// }
|
|
11
|
+
interface PegaDxilMyFormProps extends PConnProps {
|
|
12
|
+
// If any, enter additional props that only exist on this componentName
|
|
13
|
+
NumCols?: string,
|
|
14
|
+
instructions?: string,
|
|
15
|
+
// eslint-disable-next-line react/no-unused-prop-types
|
|
16
|
+
children: Array<any>
|
|
17
|
+
}
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
// Duplicated runtime code from React SDK
|
|
21
21
|
|
|
22
22
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
23
23
|
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
24
|
-
export default function PegaDxilMyForm(props
|
|
24
|
+
export default function PegaDxilMyForm(props: PegaDxilMyFormProps) {
|
|
25
25
|
const { getPConnect, NumCols = '1' } = props;
|
|
26
26
|
const instructions = getInstructions(getPConnect(), props.instructions);
|
|
27
27
|
|
|
@@ -3,7 +3,6 @@ import Grid from "@material-ui/core/Grid";
|
|
|
3
3
|
import createPConnectComponent from "@pega/react-sdk-components/lib/bridge/react_pconnect";
|
|
4
4
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
5
5
|
|
|
6
|
-
|
|
7
6
|
import StyledPegaDxilMyTwoColumnDetailsWrapper from "./styles";
|
|
8
7
|
|
|
9
8
|
// Can't use PConnProps until getPConnect().getChildren() types are ok
|
|
@@ -22,9 +21,9 @@ import StyledPegaDxilMyTwoColumnDetailsWrapper from "./styles";
|
|
|
22
21
|
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
23
22
|
export default function PegaDxilMyTwoColumnDetails(props /* : PegaDxilMyTwoColumnDetailsProps */) {
|
|
24
23
|
const { label = '', showLabel = true, getPConnect, showHighlightedData = false } = props;
|
|
25
|
-
|
|
26
|
-
const FieldGroup = getComponentFromMap("FieldGroup");
|
|
27
24
|
|
|
25
|
+
const FieldGroup = getComponentFromMap("FieldGroup");
|
|
26
|
+
|
|
28
27
|
// Get the inherited props from the parent to determine label settings
|
|
29
28
|
const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };
|
|
30
29
|
|
package/tests/assets/components/SDK-React/createAll/override-sdk/field/AutoComplete/AutoComplete.tsx
CHANGED
|
@@ -83,7 +83,7 @@ export default function AutoComplete(props: AutoCompleteProps) {
|
|
|
83
83
|
|
|
84
84
|
const thePConn = getPConnect();
|
|
85
85
|
const actionsApi = thePConn.getActionsApi();
|
|
86
|
-
const propName = thePConn.getStateProps()
|
|
86
|
+
const propName = thePConn.getStateProps()["value"];
|
|
87
87
|
|
|
88
88
|
if (!isDeepEqual(datasource, theDatasource)) {
|
|
89
89
|
// inbound datasource is different, so update theDatasource (to trigger useEffect)
|
|
@@ -130,7 +130,7 @@ export default function AutoComplete(props: AutoCompleteProps) {
|
|
|
130
130
|
|
|
131
131
|
useEffect(() => {
|
|
132
132
|
if (listType === 'associated') {
|
|
133
|
-
setOptions(Utils.getOptionList(props, getPConnect().getDataObject(
|
|
133
|
+
setOptions(Utils.getOptionList(props, getPConnect().getDataObject('')));
|
|
134
134
|
}
|
|
135
135
|
}, [theDatasource]);
|
|
136
136
|
|
package/tests/assets/components/SDK-React/createAll/override-sdk/field/Checkbox/Checkbox.tsx
CHANGED
|
@@ -1,35 +1,42 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Checkbox,
|
|
4
|
+
FormControl,
|
|
5
|
+
FormControlLabel,
|
|
6
|
+
FormGroup,
|
|
7
|
+
FormHelperText
|
|
8
|
+
} from '@material-ui/core';
|
|
3
9
|
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
4
|
-
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
5
10
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
11
|
+
// import type { PConnProps } from '../../../types/PConnProps';
|
|
6
12
|
|
|
7
13
|
// Checkbox passes in 'value' as a boolean. So can't use the default
|
|
8
14
|
// PConnFieldProps since it expects value to be a string.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
15
|
+
// But can't use CheckBoxProps until getValidationApi() knows about validate method
|
|
16
|
+
// Currently just thinks that returns an "object"
|
|
17
|
+
// interface CheckboxProps extends PConnProps {
|
|
18
|
+
// // If any, enter additional props that only exist on Checkbox here
|
|
19
|
+
// // Everything from PConnFieldProps except value and change type of value to boolean
|
|
12
20
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export default function CheckboxComponent(props: CheckboxProps) {
|
|
21
|
+
// value?: boolean,
|
|
22
|
+
// label: string,
|
|
23
|
+
// required: boolean,
|
|
24
|
+
// disabled: boolean,
|
|
25
|
+
// validatemessage: string,
|
|
26
|
+
// status?: string,
|
|
27
|
+
// // eslint-disable-next-line react/no-unused-prop-types
|
|
28
|
+
// onChange: any,
|
|
29
|
+
// // eslint-disable-next-line react/no-unused-prop-types
|
|
30
|
+
// onBlur?: any,
|
|
31
|
+
// readOnly: boolean,
|
|
32
|
+
// testId: string,
|
|
33
|
+
// helperText: string,
|
|
34
|
+
// displayMode?: string,
|
|
35
|
+
// hideLabel: boolean,
|
|
36
|
+
// // eslint-disable-next-line react/no-unused-prop-types
|
|
37
|
+
// placeholder?: string
|
|
38
|
+
// }
|
|
39
|
+
export default function CheckboxComponent(props /* : CheckboxProps */) {
|
|
33
40
|
// Get emitted components from map (so we can get any override that may exist)
|
|
34
41
|
const FieldValueList = getComponentFromMap('FieldValueList');
|
|
35
42
|
|
|
@@ -51,9 +58,9 @@ export default function CheckboxComponent(props: CheckboxProps) {
|
|
|
51
58
|
|
|
52
59
|
const thePConn = getPConnect();
|
|
53
60
|
const theConfigProps = thePConn.getConfigProps();
|
|
54
|
-
const
|
|
61
|
+
const caption = theConfigProps['caption'];
|
|
55
62
|
const actionsApi = thePConn.getActionsApi();
|
|
56
|
-
const propName = thePConn.getStateProps()
|
|
63
|
+
const propName = thePConn.getStateProps()['value'];
|
|
57
64
|
|
|
58
65
|
const [checked, setChecked] = useState(false);
|
|
59
66
|
useEffect(() => {
|
|
@@ -66,18 +73,20 @@ export default function CheckboxComponent(props: CheckboxProps) {
|
|
|
66
73
|
}
|
|
67
74
|
|
|
68
75
|
if (displayMode === 'STACKED_LARGE_VAL') {
|
|
69
|
-
return
|
|
76
|
+
return (
|
|
77
|
+
<FieldValueList name={hideLabel ? '' : label} value={value.toString()} variant='stacked' />
|
|
78
|
+
);
|
|
70
79
|
}
|
|
71
80
|
|
|
72
|
-
const handleChange =
|
|
81
|
+
const handleChange = event => {
|
|
73
82
|
handleEvent(actionsApi, 'changeNblur', propName, event.target.checked);
|
|
74
83
|
};
|
|
75
84
|
|
|
76
|
-
const handleBlur =
|
|
85
|
+
const handleBlur = event => {
|
|
77
86
|
thePConn.getValidationApi().validate(event.target.checked, ''); // 2nd arg empty string until typedef marked correctly as optional
|
|
78
87
|
};
|
|
79
88
|
|
|
80
|
-
let theCheckbox = <Checkbox color=
|
|
89
|
+
let theCheckbox = <Checkbox color='primary' disabled={disabled} />;
|
|
81
90
|
|
|
82
91
|
if (readOnly) {
|
|
83
92
|
// Workaround for lack of InputProps readOnly from https://github.com/mui-org/material-ui/issues/17043
|
|
@@ -94,7 +103,7 @@ export default function CheckboxComponent(props: CheckboxProps) {
|
|
|
94
103
|
onChange={!readOnly ? handleChange : undefined}
|
|
95
104
|
onBlur={!readOnly ? handleBlur : undefined}
|
|
96
105
|
label={caption}
|
|
97
|
-
labelPlacement=
|
|
106
|
+
labelPlacement='end'
|
|
98
107
|
data-test-id={testId}
|
|
99
108
|
/>
|
|
100
109
|
</FormGroup>
|
package/tests/assets/components/SDK-React/createAll/override-sdk/field/Currency/Currency.tsx
CHANGED
|
@@ -36,7 +36,7 @@ export default function Currency(props: CurrrencyProps) {
|
|
|
36
36
|
|
|
37
37
|
const pConn = getPConnect();
|
|
38
38
|
const actions = pConn.getActionsApi();
|
|
39
|
-
const propName = pConn.getStateProps()
|
|
39
|
+
const propName = pConn.getStateProps()["value"];
|
|
40
40
|
const helperTextToDisplay = validatemessage || helperText;
|
|
41
41
|
|
|
42
42
|
// console.log(`Currency: label: ${label} value: ${value}`);
|
|
@@ -39,7 +39,7 @@ export default function Date(props: DateProps) {
|
|
|
39
39
|
|
|
40
40
|
const pConn = getPConnect();
|
|
41
41
|
const actions = pConn.getActionsApi();
|
|
42
|
-
const propName = pConn.getStateProps()
|
|
42
|
+
const propName = pConn.getStateProps()["value"];
|
|
43
43
|
const helperTextToDisplay = validatemessage || helperText;
|
|
44
44
|
|
|
45
45
|
// Start with default dateFormatInfo
|
package/tests/assets/components/SDK-React/createAll/override-sdk/field/DateTime/DateTime.tsx
CHANGED
|
@@ -33,7 +33,7 @@ export default function DateTime(props: DateTimeProps) {
|
|
|
33
33
|
|
|
34
34
|
const pConn = getPConnect();
|
|
35
35
|
const actions = pConn.getActionsApi();
|
|
36
|
-
const propName = pConn.getStateProps()
|
|
36
|
+
const propName = pConn.getStateProps()["value"];
|
|
37
37
|
const helperTextToDisplay = validatemessage || helperText;
|
|
38
38
|
|
|
39
39
|
// Start with default dateFormatInfo
|
|
@@ -40,7 +40,7 @@ export default function Decimal(props: DecimalProps) {
|
|
|
40
40
|
|
|
41
41
|
const pConn = getPConnect();
|
|
42
42
|
const actions = pConn.getActionsApi();
|
|
43
|
-
const propName = pConn.getStateProps()
|
|
43
|
+
const propName = pConn.getStateProps()["value"];
|
|
44
44
|
const helperTextToDisplay = validatemessage || helperText;
|
|
45
45
|
|
|
46
46
|
const [decValue, setDecimalvalue] = useState('');
|
package/tests/assets/components/SDK-React/createAll/override-sdk/field/Dropdown/Dropdown.tsx
CHANGED
|
@@ -4,25 +4,27 @@ import MenuItem from '@material-ui/core/MenuItem';
|
|
|
4
4
|
import Utils from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
5
5
|
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
6
6
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
7
|
-
import type { PConnFieldProps } from '
|
|
7
|
+
// import type { PConnFieldProps } from '../../../types/PConnProps';
|
|
8
8
|
|
|
9
9
|
interface IOption {
|
|
10
10
|
key: string;
|
|
11
11
|
value: string;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
14
|
+
// Can't use DropdownProps with 8.23 until getLocaleRuleNameFromKeys is NOT private
|
|
15
|
+
// interface DropdownProps extends PConnFieldProps {
|
|
16
|
+
// // If any, enter additional props that only exist on Dropdown here
|
|
17
|
+
// datasource?: Array<any>,
|
|
18
|
+
// onRecordChange?: any,
|
|
19
|
+
// fieldMetadata?: any,
|
|
20
|
+
// // eslint-disable-next-line react/no-unused-prop-types
|
|
21
|
+
// listType: string,
|
|
22
|
+
// // eslint-disable-next-line react/no-unused-prop-types
|
|
23
|
+
// additionalProps?: object
|
|
24
|
+
// }
|
|
25
|
+
|
|
24
26
|
|
|
25
|
-
export default function Dropdown(props: DropdownProps) {
|
|
27
|
+
export default function Dropdown(props /* : DropdownProps */) {
|
|
26
28
|
// Get emitted components from map (so we can get any override that may exist)
|
|
27
29
|
const FieldValueList = getComponentFromMap('FieldValueList');
|
|
28
30
|
|
|
@@ -43,19 +45,19 @@ export default function Dropdown(props: DropdownProps) {
|
|
|
43
45
|
onRecordChange,
|
|
44
46
|
fieldMetadata
|
|
45
47
|
} = props;
|
|
46
|
-
let { placeholder } = props;
|
|
48
|
+
let { placeholder = "" } = props;
|
|
47
49
|
placeholder = placeholder || 'Select...';
|
|
48
50
|
const [options, setOptions] = useState<Array<IOption>>([]);
|
|
49
51
|
const helperTextToDisplay = validatemessage || helperText;
|
|
50
52
|
|
|
51
53
|
const thePConn = getPConnect();
|
|
52
54
|
const actionsApi = thePConn.getActionsApi();
|
|
53
|
-
const propName = thePConn.getStateProps()
|
|
55
|
+
const propName = thePConn.getStateProps()["value"];
|
|
54
56
|
const className = thePConn.getCaseInfo().getClassName();
|
|
55
57
|
const refName = propName?.slice(propName.lastIndexOf('.') + 1);
|
|
56
58
|
|
|
57
59
|
useEffect(() => {
|
|
58
|
-
const list = Utils.getOptionList(props, getPConnect().getDataObject(
|
|
60
|
+
const list = Utils.getOptionList(props, getPConnect().getDataObject('')); // 1st arg empty string until typedef marked correctly
|
|
59
61
|
const optionsList = [...list];
|
|
60
62
|
optionsList.unshift({
|
|
61
63
|
key: placeholder,
|
package/tests/assets/components/SDK-React/createAll/override-sdk/field/RadioButtons/RadioButtons.tsx
CHANGED
|
@@ -4,15 +4,17 @@ import { Radio, RadioGroup, FormControl, FormControlLabel, FormLabel, FormHelper
|
|
|
4
4
|
import Utils from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
5
5
|
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
6
6
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
7
|
-
import type { PConnFieldProps } from '
|
|
7
|
+
// import type { PConnFieldProps } from '../../../types/PConnProps';
|
|
8
|
+
|
|
9
|
+
// Can't use RadioButtonProps until getLocaleRuleNameFromKeys is NOT private
|
|
10
|
+
// interface RadioButtonsProps extends PConnFieldProps {
|
|
11
|
+
// // If any, enter additional props that only exist on RadioButtons here
|
|
12
|
+
// inline: boolean,
|
|
13
|
+
// fieldMetadata?: any
|
|
14
|
+
// }
|
|
8
15
|
|
|
9
|
-
interface RadioButtonsProps extends PConnFieldProps {
|
|
10
|
-
// If any, enter additional props that only exist on RadioButtons here
|
|
11
|
-
inline: boolean;
|
|
12
|
-
fieldMetadata?: any;
|
|
13
|
-
}
|
|
14
16
|
|
|
15
|
-
export default function RadioButtons(props: RadioButtonsProps) {
|
|
17
|
+
export default function RadioButtons(props /* : RadioButtonsProps */ ) {
|
|
16
18
|
// Get emitted components from map (so we can get any override that may exist)
|
|
17
19
|
const FieldValueList = getComponentFromMap('FieldValueList');
|
|
18
20
|
|
|
@@ -35,7 +37,7 @@ export default function RadioButtons(props: RadioButtonsProps) {
|
|
|
35
37
|
const thePConn = getPConnect();
|
|
36
38
|
const theConfigProps = thePConn.getConfigProps();
|
|
37
39
|
const actionsApi = thePConn.getActionsApi();
|
|
38
|
-
const propName = thePConn.getStateProps()
|
|
40
|
+
const propName = thePConn.getStateProps()["value"];
|
|
39
41
|
const helperTextToDisplay = validatemessage || helperText;
|
|
40
42
|
const className = thePConn.getCaseInfo().getClassName();
|
|
41
43
|
|
|
@@ -53,7 +55,7 @@ export default function RadioButtons(props: RadioButtonsProps) {
|
|
|
53
55
|
|
|
54
56
|
// theOptions will be an array of JSON objects that are literally key/value pairs.
|
|
55
57
|
// Ex: [ {key: "Basic", value: "Basic"} ]
|
|
56
|
-
const theOptions = Utils.getOptionList(theConfigProps, thePConn.getDataObject(
|
|
58
|
+
const theOptions = Utils.getOptionList(theConfigProps, thePConn.getDataObject(''));
|
|
57
59
|
|
|
58
60
|
useEffect(() => {
|
|
59
61
|
// This update theSelectedButton which will update the UI to show the selected button correctly
|
package/tests/assets/components/SDK-React/createAll/override-sdk/field/RichText/RichText.tsx
CHANGED
|
@@ -55,9 +55,11 @@ export default function RichText(props: RichTextProps) {
|
|
|
55
55
|
}
|
|
56
56
|
const handleChange = () => {
|
|
57
57
|
if (status === 'error') {
|
|
58
|
-
const property = pConn.getStateProps()
|
|
58
|
+
const property = pConn.getStateProps()["value"];
|
|
59
59
|
pConn.clearErrorMessages({
|
|
60
|
-
property
|
|
60
|
+
property,
|
|
61
|
+
category: '',
|
|
62
|
+
context: ''
|
|
61
63
|
});
|
|
62
64
|
}
|
|
63
65
|
};
|
|
@@ -65,7 +67,7 @@ export default function RichText(props: RichTextProps) {
|
|
|
65
67
|
const handleBlur = () => {
|
|
66
68
|
if (editorRef.current) {
|
|
67
69
|
const editorValue = editorRef.current.getContent({ format: 'html' });
|
|
68
|
-
const property = pConn.getStateProps()
|
|
70
|
+
const property = pConn.getStateProps()["value"];
|
|
69
71
|
handleEvent(actionsApi, 'changeNblur', property, editorValue);
|
|
70
72
|
}
|
|
71
73
|
};
|
package/tests/assets/components/SDK-React/createAll/override-sdk/field/ScalarList/ScalarList.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable react/no-array-index-key */
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
4
|
-
import
|
|
4
|
+
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
5
5
|
|
|
6
6
|
// ScalarListProps can't extend PConnFieldProps because its 'value' has a different type
|
|
7
7
|
interface ScalarListProps extends PConnProps {
|
|
@@ -29,9 +29,18 @@ function CommaSeparatedList(props) {
|
|
|
29
29
|
export default function ScalarList(props: ScalarListProps) {
|
|
30
30
|
// Get emitted components from map (so we can get any override that may exist)
|
|
31
31
|
const FieldValueList = getComponentFromMap('FieldValueList');
|
|
32
|
-
const { label, getPConnect, componentType, value: scalarValues, displayMode, hideLabel, ...restProps } = props;
|
|
33
32
|
|
|
34
|
-
const
|
|
33
|
+
const {
|
|
34
|
+
label,
|
|
35
|
+
getPConnect,
|
|
36
|
+
componentType,
|
|
37
|
+
value: scalarValues,
|
|
38
|
+
displayMode,
|
|
39
|
+
hideLabel,
|
|
40
|
+
...restProps
|
|
41
|
+
} = props;
|
|
42
|
+
|
|
43
|
+
const items = scalarValues?.map(scalarValue => {
|
|
35
44
|
return getPConnect().createComponent(
|
|
36
45
|
{
|
|
37
46
|
type: componentType,
|
|
@@ -43,8 +52,8 @@ export default function ScalarList(props: ScalarListProps) {
|
|
|
43
52
|
readOnly: 'true'
|
|
44
53
|
}
|
|
45
54
|
},
|
|
46
|
-
|
|
47
|
-
|
|
55
|
+
'',
|
|
56
|
+
'',
|
|
48
57
|
{}
|
|
49
58
|
); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional;
|
|
50
59
|
});
|
|
@@ -60,5 +69,5 @@ export default function ScalarList(props: ScalarListProps) {
|
|
|
60
69
|
|
|
61
70
|
const displayComp = <CommaSeparatedList items={items} />;
|
|
62
71
|
|
|
63
|
-
return <FieldValueList name={hideLabel ? '' : label} value={displayComp} variant=
|
|
72
|
+
return <FieldValueList name={hideLabel ? '' : label} value={displayComp} variant='stacked' />;
|
|
64
73
|
}
|
package/tests/assets/components/SDK-React/createAll/override-sdk/field/TextInput/TextInput.tsx
CHANGED
|
@@ -32,7 +32,7 @@ export default function TextInput(props: TextInputProps) {
|
|
|
32
32
|
|
|
33
33
|
const pConn = getPConnect();
|
|
34
34
|
const actions = pConn.getActionsApi();
|
|
35
|
-
const propName = pConn.getStateProps()
|
|
35
|
+
const propName = pConn.getStateProps()["value"];
|
|
36
36
|
|
|
37
37
|
const helperTextToDisplay = validatemessage || helperText;
|
|
38
38
|
|