@pega/dx-component-builder-sdk 0.8.2 → 0.23.2
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/constants.js +0 -1
- package/src/tasks/bundle/builderAngular/webpack.config.js +1 -2
- package/src/tasks/create/templates/SDK-React/field/Boolean/index.tsx.mustache +28 -25
- package/src/tasks/create/templates/SDK-React/field/Date/demo.stories.jsx.mustache +1 -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-Currency/demo.stories.jsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/template/DETAILS/demo.stories.jsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/template/DETAILS/mock.stories.js.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/template/DETAILS-region/demo.stories.jsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/template/DETAILS-region/mock.stories.js.mustache +1 -1
- 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 -10
- 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/override-sdk/field/AutoComplete/AutoComplete.tsx +1 -1
- package/tests/assets/components/SDK-React/create/override-sdk/field/Checkbox/Checkbox.tsx +27 -25
- 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 +15 -14
- package/tests/assets/components/SDK-React/create/override-sdk/field/RadioButtons/RadioButtons.tsx +9 -8
- 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 +18 -15
- 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/CaseSummary/CaseSummary.tsx +3 -1
- 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/PromotedFilters/PromotedFilters.tsx +13 -11
- package/tests/assets/components/SDK-React/create/override-sdk/template/SimpleTable/SimpleTable.tsx +9 -9
- package/tests/assets/components/SDK-React/create/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +1 -1
- package/tests/assets/components/SDK-React/create/override-sdk/widget/Attachment/Attachment.tsx +2 -2
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyBoolean/index.tsx +28 -25
- 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_MyDate/demo.stories.jsx +1 -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/template/Pega_DXIL_MyDetails/demo.stories.jsx +1 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyDetails/mock.stories.js +1 -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 -10
- package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/demo.stories.jsx +1 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/mock.stories.js +1 -1
- 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 +1 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/Checkbox/Checkbox.tsx +27 -25
- 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 +15 -14
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/RadioButtons/RadioButtons.tsx +9 -8
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/ScalarList/ScalarList.tsx +2 -2
- package/tests/assets/components/SDK-React/createAll/override-sdk/field/ScalarList/config-ext.json +7 -22
- 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 +18 -15
- 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/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/CaseSummary/CaseSummary.tsx +3 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/DataReference/DataReference.tsx +36 -34
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/Details/Details.tsx +1 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/DetailsThreeColumn/DetailsThreeColumn.tsx +1 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/DetailsTwoColumn/DetailsTwoColumn.tsx +1 -1
- 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/NarrowWideDetails/NarrowWideDetails.tsx +1 -1
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/PromotedFilters/PromotedFilters.tsx +13 -11
- package/tests/assets/components/SDK-React/createAll/override-sdk/template/SimpleTable/SimpleTable.tsx +9 -9
- 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/assets/components/SDK-React/createAll/override-sdk/template/WideNarrowDetails/WideNarrowDetails.tsx +3 -3
- package/tests/assets/components/SDK-React/createAll/override-sdk/widget/Attachment/Attachment.tsx +2 -2
package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyBoolean/index.tsx
CHANGED
|
@@ -10,36 +10,39 @@ import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event
|
|
|
10
10
|
// import PropTypes from 'prop-types';
|
|
11
11
|
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
12
12
|
import StyledPegaDxilMyBooleanWrapper from './styles';
|
|
13
|
-
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
13
|
+
// import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
14
|
+
|
|
15
|
+
// Checkbox passes in 'value' as a boolean. So can't use the default
|
|
16
|
+
// PConnFieldProps since it expects value to be a string.
|
|
17
|
+
// But can't use PegaDxilMyBooleanProps until getValidationApi() knows about validate method
|
|
18
|
+
// interface PegaDxilMyBooleanProps extends PConnProps {
|
|
19
|
+
// // If any, enter additional props that only exist on this componentName
|
|
20
|
+
// // Everything from PConnFieldProps except value and change type of value to boolean
|
|
21
|
+
//
|
|
22
|
+
// value?: boolean,
|
|
23
|
+
// label: string,
|
|
24
|
+
// required: boolean,
|
|
25
|
+
// disabled: boolean,
|
|
26
|
+
// validatemessage: string,
|
|
27
|
+
// status?: string,
|
|
28
|
+
// // eslint-disable-next-line react/no-unused-prop-types
|
|
29
|
+
// onChange: any,
|
|
30
|
+
// // eslint-disable-next-line react/no-unused-prop-types
|
|
31
|
+
// onBlur?: any,
|
|
32
|
+
// readOnly: boolean,
|
|
33
|
+
// testId: string,
|
|
34
|
+
// helperText: string,
|
|
35
|
+
// displayMode?: string,
|
|
36
|
+
// hideLabel: boolean,
|
|
37
|
+
// // eslint-disable-next-line react/no-unused-prop-types
|
|
38
|
+
// placeholder?: string
|
|
39
|
+
// }
|
|
37
40
|
|
|
38
41
|
// Duplicated runtime code from React SDK
|
|
39
42
|
|
|
40
43
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
41
44
|
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
42
|
-
export default function PegaDxilMyBoolean(props: PegaDxilMyBooleanProps) {
|
|
45
|
+
export default function PegaDxilMyBoolean(props /* : PegaDxilMyBooleanProps */) {
|
|
43
46
|
const {
|
|
44
47
|
getPConnect,
|
|
45
48
|
label,
|
package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyForm/index.tsx
CHANGED
|
@@ -2,27 +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
|
-
|
|
5
|
+
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
6
6
|
|
|
7
7
|
import './DefaultForm.css';
|
|
8
8
|
|
|
9
9
|
import StyledPegaDxilMyFormWrapper from "./styles";
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
//
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
//
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
// }
|
|
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
|
+
}
|
|
19
18
|
|
|
20
19
|
|
|
21
20
|
// Duplicated runtime code from React SDK
|
|
22
21
|
|
|
23
22
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
24
23
|
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
25
|
-
export default function PegaDxilMyForm(props
|
|
24
|
+
export default function PegaDxilMyForm(props: PegaDxilMyFormProps) {
|
|
26
25
|
const { getPConnect, NumCols = '1' } = props;
|
|
27
26
|
const instructions = getInstructions(getPConnect(), props.instructions);
|
|
28
27
|
|
package/tests/assets/components/SDK-React/createAll/override-sdk/field/AutoComplete/AutoComplete.tsx
CHANGED
|
@@ -81,7 +81,7 @@ export default function AutoComplete(props:AutoCompleteProps) {
|
|
|
81
81
|
|
|
82
82
|
const thePConn = getPConnect();
|
|
83
83
|
const actionsApi = thePConn.getActionsApi();
|
|
84
|
-
const propName = thePConn.getStateProps()
|
|
84
|
+
const propName = thePConn.getStateProps()["value"];
|
|
85
85
|
|
|
86
86
|
if (!isDeepEqual(datasource, theDatasource)) {
|
|
87
87
|
// inbound datasource is different, so update theDatasource (to trigger useEffect)
|
package/tests/assets/components/SDK-React/createAll/override-sdk/field/Checkbox/Checkbox.tsx
CHANGED
|
@@ -8,34 +8,36 @@ import {
|
|
|
8
8
|
} from '@material-ui/core';
|
|
9
9
|
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
10
10
|
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
11
|
-
import type { PConnProps } from '
|
|
11
|
+
// import type { PConnProps } from '../../../types/PConnProps';
|
|
12
12
|
|
|
13
13
|
// Checkbox passes in 'value' as a boolean. So can't use the default
|
|
14
14
|
// PConnFieldProps since it expects value to be a string.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
|
18
20
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
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
|
+
// }
|
|
37
39
|
|
|
38
|
-
export default function CheckboxComponent(props: CheckboxProps) {
|
|
40
|
+
export default function CheckboxComponent(props /* : CheckboxProps */) {
|
|
39
41
|
const {
|
|
40
42
|
getPConnect,
|
|
41
43
|
label,
|
|
@@ -54,9 +56,9 @@ export default function CheckboxComponent(props: CheckboxProps) {
|
|
|
54
56
|
|
|
55
57
|
const thePConn = getPConnect();
|
|
56
58
|
const theConfigProps = thePConn.getConfigProps();
|
|
57
|
-
const
|
|
59
|
+
const caption = theConfigProps["caption"];
|
|
58
60
|
const actionsApi = thePConn.getActionsApi();
|
|
59
|
-
const propName = thePConn.getStateProps()
|
|
61
|
+
const propName = thePConn.getStateProps()["value"];
|
|
60
62
|
|
|
61
63
|
const [checked, setChecked] = useState(false);
|
|
62
64
|
useEffect(() => {
|
package/tests/assets/components/SDK-React/createAll/override-sdk/field/Currency/Currency.tsx
CHANGED
|
@@ -35,7 +35,7 @@ export default function Currency(props:CurrrencyProps) {
|
|
|
35
35
|
|
|
36
36
|
const pConn = getPConnect();
|
|
37
37
|
const actions = pConn.getActionsApi();
|
|
38
|
-
const propName = pConn.getStateProps()
|
|
38
|
+
const propName = pConn.getStateProps()["value"];
|
|
39
39
|
const helperTextToDisplay = validatemessage || helperText;
|
|
40
40
|
|
|
41
41
|
// console.log(`Currency: label: ${label} value: ${value}`);
|
|
@@ -37,7 +37,7 @@ export default function Date(props:DateProps) {
|
|
|
37
37
|
|
|
38
38
|
const pConn = getPConnect();
|
|
39
39
|
const actions = pConn.getActionsApi();
|
|
40
|
-
const propName = pConn.getStateProps()
|
|
40
|
+
const propName = pConn.getStateProps()["value"];
|
|
41
41
|
const helperTextToDisplay = validatemessage || helperText;
|
|
42
42
|
|
|
43
43
|
// Start with default dateFormatInfo
|
package/tests/assets/components/SDK-React/createAll/override-sdk/field/DateTime/DateTime.tsx
CHANGED
|
@@ -31,7 +31,7 @@ export default function DateTime(props: DateTimeProps) {
|
|
|
31
31
|
|
|
32
32
|
const pConn = getPConnect();
|
|
33
33
|
const actions = pConn.getActionsApi();
|
|
34
|
-
const propName = pConn.getStateProps()
|
|
34
|
+
const propName = pConn.getStateProps()["value"];
|
|
35
35
|
const helperTextToDisplay = validatemessage || helperText;
|
|
36
36
|
|
|
37
37
|
// Start with default dateFormatInfo
|
|
@@ -38,7 +38,7 @@ export default function Decimal(props: DecimalProps) {
|
|
|
38
38
|
|
|
39
39
|
const pConn = getPConnect();
|
|
40
40
|
const actions = pConn.getActionsApi();
|
|
41
|
-
const propName = pConn.getStateProps()
|
|
41
|
+
const propName = pConn.getStateProps()["value"];
|
|
42
42
|
const helperTextToDisplay = validatemessage || helperText;
|
|
43
43
|
|
|
44
44
|
const [decValue, setDecimalvalue] = useState('');
|
package/tests/assets/components/SDK-React/createAll/override-sdk/field/Dropdown/Dropdown.tsx
CHANGED
|
@@ -4,26 +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 FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
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
|
+
// }
|
|
24
25
|
|
|
25
26
|
|
|
26
|
-
export default function Dropdown(props: DropdownProps) {
|
|
27
|
+
export default function Dropdown(props /* : DropdownProps */) {
|
|
27
28
|
const {
|
|
28
29
|
getPConnect,
|
|
29
30
|
label,
|
|
@@ -41,14 +42,14 @@ export default function Dropdown(props: DropdownProps) {
|
|
|
41
42
|
onRecordChange,
|
|
42
43
|
fieldMetadata
|
|
43
44
|
} = props;
|
|
44
|
-
let { placeholder } = props;
|
|
45
|
+
let { placeholder = "" } = props;
|
|
45
46
|
placeholder = placeholder || 'Select...';
|
|
46
47
|
const [options, setOptions] = useState<Array<IOption>>([]);
|
|
47
48
|
const helperTextToDisplay = validatemessage || helperText;
|
|
48
49
|
|
|
49
50
|
const thePConn = getPConnect();
|
|
50
51
|
const actionsApi = thePConn.getActionsApi();
|
|
51
|
-
const propName = thePConn.getStateProps()
|
|
52
|
+
const propName = thePConn.getStateProps()["value"];
|
|
52
53
|
const className = thePConn.getCaseInfo().getClassName();
|
|
53
54
|
const refName = propName?.slice(propName.lastIndexOf('.') + 1);
|
|
54
55
|
|
package/tests/assets/components/SDK-React/createAll/override-sdk/field/RadioButtons/RadioButtons.tsx
CHANGED
|
@@ -11,16 +11,17 @@ import {
|
|
|
11
11
|
import Utils from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
12
12
|
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
13
13
|
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
14
|
-
import type { PConnFieldProps } from '
|
|
14
|
+
// import type { PConnFieldProps } from '../../../types/PConnProps';
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
// Can't use RadioButtonProps until getLocaleRuleNameFromKeys is NOT private
|
|
17
|
+
// interface RadioButtonsProps extends PConnFieldProps {
|
|
18
|
+
// // If any, enter additional props that only exist on RadioButtons here
|
|
19
|
+
// inline: boolean,
|
|
20
|
+
// fieldMetadata?: any
|
|
21
|
+
// }
|
|
21
22
|
|
|
22
23
|
|
|
23
|
-
export default function RadioButtons(props: RadioButtonsProps) {
|
|
24
|
+
export default function RadioButtons(props /* : RadioButtonsProps */ ) {
|
|
24
25
|
const {
|
|
25
26
|
getPConnect,
|
|
26
27
|
label,
|
|
@@ -40,7 +41,7 @@ export default function RadioButtons(props: RadioButtonsProps) {
|
|
|
40
41
|
const thePConn = getPConnect();
|
|
41
42
|
const theConfigProps = thePConn.getConfigProps();
|
|
42
43
|
const actionsApi = thePConn.getActionsApi();
|
|
43
|
-
const propName = thePConn.getStateProps()
|
|
44
|
+
const propName = thePConn.getStateProps()["value"];
|
|
44
45
|
const helperTextToDisplay = validatemessage || helperText;
|
|
45
46
|
const className = thePConn.getCaseInfo().getClassName();
|
|
46
47
|
|
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 FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
4
|
-
import { PConnProps } from '
|
|
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 {
|
|
@@ -48,7 +48,7 @@ export default function ScalarList(props: ScalarListProps) {
|
|
|
48
48
|
readOnly: 'true'
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
|
-
|
|
51
|
+
'', '', {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional
|
|
52
52
|
});
|
|
53
53
|
|
|
54
54
|
if (['LABELS_LEFT', 'STACKED_LARGE_VAL', 'DISPLAY_ONLY'].includes(displayMode)) {
|
package/tests/assets/components/SDK-React/createAll/override-sdk/field/ScalarList/config-ext.json
CHANGED
|
@@ -1,23 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"format": "COMPONENTDEFINITION"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"label": "List settings",
|
|
13
|
-
"format": "GROUP",
|
|
14
|
-
"properties": [
|
|
15
|
-
{
|
|
16
|
-
"name": "filter",
|
|
17
|
-
"label": "Filter by",
|
|
18
|
-
"format": "SCALARLISTFILTER"
|
|
19
|
-
}
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
]
|
|
23
|
-
}
|
|
2
|
+
"label": "ScalarList",
|
|
3
|
+
"componentKey": "ScalarList",
|
|
4
|
+
"name": "ScalarList",
|
|
5
|
+
"type": "Field",
|
|
6
|
+
"properties": [
|
|
7
|
+
]
|
|
8
|
+
}
|
package/tests/assets/components/SDK-React/createAll/override-sdk/field/TextInput/TextInput.tsx
CHANGED
|
@@ -31,7 +31,7 @@ export default function TextInput(props: TextInputProps) {
|
|
|
31
31
|
|
|
32
32
|
const pConn = getPConnect();
|
|
33
33
|
const actions = pConn.getActionsApi();
|
|
34
|
-
const propName = pConn.getStateProps()
|
|
34
|
+
const propName = pConn.getStateProps()["value"];
|
|
35
35
|
|
|
36
36
|
const helperTextToDisplay = validatemessage || helperText;
|
|
37
37
|
|
package/tests/assets/components/SDK-React/createAll/override-sdk/infra/Assignment/Assignment.tsx
CHANGED
|
@@ -5,20 +5,23 @@ import Snackbar from '@material-ui/core/Snackbar';
|
|
|
5
5
|
import IconButton from '@material-ui/core/IconButton';
|
|
6
6
|
import CloseIcon from '@material-ui/icons/Close';
|
|
7
7
|
|
|
8
|
-
import type { PConnProps } from '
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
8
|
+
// import type { PConnProps } from '../../../types/PConnProps';
|
|
9
|
+
|
|
10
|
+
// Can't use AssignmentProps until the following are NOT private
|
|
11
|
+
// getCaseInfo().isAssignmentInCreateStage()
|
|
12
|
+
// getCaseInfo().isLocalAction()
|
|
13
|
+
// interface AssignmentProps extends PConnProps {
|
|
14
|
+
// // If any, enter additional props that only exist on this component
|
|
15
|
+
// children: Array<any>,
|
|
16
|
+
// itemKey: string,
|
|
17
|
+
// isInModal: boolean,
|
|
18
|
+
// banners: Array<any>
|
|
19
|
+
// // eslint-disable-next-line react/no-unused-prop-types
|
|
20
|
+
// actionButtons: Array<any>,
|
|
21
|
+
// }
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
export default function Assignment(props /* : AssignmentProps */) {
|
|
22
25
|
const { getPConnect, children, itemKey = '', isInModal = false, banners = [] } = props;
|
|
23
26
|
const thePConn = getPConnect();
|
|
24
27
|
|
|
@@ -81,7 +84,7 @@ export default function Assignment(props: AssignmentProps) {
|
|
|
81
84
|
const oData = thePConn.getDataObject(''); // 1st arg empty string until typedefs allow it to be optional
|
|
82
85
|
|
|
83
86
|
if (oWorkData?.caseInfo && oWorkData.caseInfo.assignments !== null) {
|
|
84
|
-
const oCaseInfo = oData
|
|
87
|
+
const oCaseInfo = oData["caseInfo"];
|
|
85
88
|
|
|
86
89
|
if (oCaseInfo && oCaseInfo.actionButtons) {
|
|
87
90
|
setActionButtons(oCaseInfo.actionButtons);
|
|
@@ -109,7 +109,7 @@ export default function DashboardFilter(props: DashboardFilterProps) {
|
|
|
109
109
|
fireFilterChange(e.id);
|
|
110
110
|
};
|
|
111
111
|
return getPConnect().createComponent(metadata,
|
|
112
|
-
|
|
112
|
+
'', '', {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional);
|
|
113
113
|
};
|
|
114
114
|
|
|
115
115
|
const onChange = dates => {
|
|
@@ -91,7 +91,8 @@ export const createFilterComponent = (getPConnect, filterMeta, index) => {
|
|
|
91
91
|
metadata={filterMeta}
|
|
92
92
|
type={filterMeta.type}
|
|
93
93
|
>
|
|
94
|
-
{getPConnect().createComponent(filterMeta,
|
|
94
|
+
{getPConnect().createComponent(filterMeta,
|
|
95
|
+
'', '', {})}
|
|
95
96
|
</DashboardFilter>
|
|
96
97
|
);
|
|
97
98
|
};
|
|
@@ -38,7 +38,7 @@ export default function ErrorBoundary(props: ErrorBoundaryProps) {
|
|
|
38
38
|
Raw meta data for the component:`, localeCategory)} ${JSON.stringify(pConn.getRawMetadata())}`);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
if (pConn.getConfigProps()
|
|
41
|
+
if (pConn.getConfigProps()["type"] === "page") {
|
|
42
42
|
return (
|
|
43
43
|
theErrorDiv
|
|
44
44
|
);
|
package/tests/assets/components/SDK-React/createAll/override-sdk/template/AppShell/AppShell.tsx
CHANGED
|
@@ -93,7 +93,7 @@ export default function AppShell(props:AppShellProps) {
|
|
|
93
93
|
useEffect(() => {
|
|
94
94
|
setAppName(PCore.getEnvironmentInfo().getApplicationName());
|
|
95
95
|
|
|
96
|
-
const tempMap: any = pConn.getChildren()?.map((child: any, index) => {
|
|
96
|
+
const tempMap: any = pConn.getChildren()?.["map"]((child: any, index) => {
|
|
97
97
|
const theChildComp = child.getPConnect().getComponentName();
|
|
98
98
|
const theKey = `.${index}`;
|
|
99
99
|
return (
|
|
@@ -13,7 +13,9 @@ export default function CaseSummary(props: CaseSummaryProps) {
|
|
|
13
13
|
const { getPConnect, children } = props;
|
|
14
14
|
const thePConn = getPConnect();
|
|
15
15
|
const theConfigProps = thePConn.getConfigProps();
|
|
16
|
-
const { status, showStatus } = theConfigProps;
|
|
16
|
+
// const { status, showStatus } = theConfigProps;
|
|
17
|
+
const status = theConfigProps["status"];
|
|
18
|
+
const showStatus = theConfigProps["showStatus"];
|
|
17
19
|
|
|
18
20
|
// from Constellation DX Components
|
|
19
21
|
// get the primary and secondary fields with the raw data (which has the non-resolved property values)
|