@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/package.json
CHANGED
package/src/constants.js
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 Styled{{COMPONENT_CLASS_NAME}}Wrapper 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 {{COMPONENT_CLASS_NAME}}Props until getValidationApi() knows about validate method
|
|
18
|
+
// interface {{COMPONENT_CLASS_NAME}}Props 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 {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
45
|
+
export default function {{COMPONENT_CLASS_NAME}}(props /* : {{COMPONENT_CLASS_NAME}}Props */) {
|
|
43
46
|
const {
|
|
44
47
|
getPConnect,
|
|
45
48
|
label,
|
|
@@ -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 Styled{{COMPONENT_CLASS_NAME}}Wrapper from "./styles";
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
//
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
//
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
// }
|
|
11
|
+
interface {{COMPONENT_CLASS_NAME}}Props 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 {{COMPONENT_CLASS_NAME}}(props
|
|
24
|
+
export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
26
25
|
const { getPConnect, NumCols = '1' } = props;
|
|
27
26
|
const instructions = getInstructions(getPConnect(), props.instructions);
|
|
28
27
|
|
package/tests/assets/components/SDK-React/create/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)
|
|
@@ -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(() => {
|
|
@@ -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
|
|
@@ -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('');
|
|
@@ -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/create/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
|
|
|
@@ -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/create/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);
|
package/tests/assets/components/SDK-React/create/override-sdk/infra/ErrorBoundary/ErrorBoundary.tsx
CHANGED
|
@@ -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/create/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 (
|
package/tests/assets/components/SDK-React/create/override-sdk/template/CaseSummary/CaseSummary.tsx
CHANGED
|
@@ -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)
|
|
@@ -23,7 +23,7 @@ export default function InlineDashboardPage(props: InlineDashboardPageProps) {
|
|
|
23
23
|
return Children.toArray(children);
|
|
24
24
|
}, [children]);
|
|
25
25
|
|
|
26
|
-
const allFilters = getPConnect().getRawMetadata()
|
|
26
|
+
const allFilters = getPConnect().getRawMetadata()["children"][1];
|
|
27
27
|
|
|
28
28
|
useEffect(() => {
|
|
29
29
|
setFilterComponents(buildFilterComponents(getPConnect, allFilters));
|
|
@@ -6,16 +6,18 @@ import ListView from '@pega/react-sdk-components/lib/components/template/ListVie
|
|
|
6
6
|
import { isEmptyObject } from '@pega/react-sdk-components/lib/components/helpers/common-utils';
|
|
7
7
|
import './PromotedFilters.css';
|
|
8
8
|
|
|
9
|
-
import type { PConnProps } from '
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
// import type { PConnProps } from '../../../types/PConnProps';
|
|
10
|
+
|
|
11
|
+
// Can't use PromotedFilterProps until getContainerManager() knows about addTransientItem
|
|
12
|
+
// Currently just expects "object"
|
|
13
|
+
// interface PromotedFilterProps extends PConnProps {
|
|
14
|
+
// // If any, enter additional props that only exist on this component
|
|
15
|
+
// viewName: string,
|
|
16
|
+
// filters: Array<any>,
|
|
17
|
+
// listViewProps: any,
|
|
18
|
+
// pageClass: string,
|
|
19
|
+
// parameters?: object
|
|
20
|
+
// }
|
|
19
21
|
|
|
20
22
|
|
|
21
23
|
const localeCategory = 'SimpleTable';
|
|
@@ -65,7 +67,7 @@ function isValidInput(input) {
|
|
|
65
67
|
return Object.values(input).findIndex((v) => v) >= 0;
|
|
66
68
|
}
|
|
67
69
|
|
|
68
|
-
export default function PromotedFilters(props: PromotedFilterProps) {
|
|
70
|
+
export default function PromotedFilters(props /* : PromotedFilterProps */) {
|
|
69
71
|
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
70
72
|
const { getPConnect, viewName, filters, listViewProps, pageClass, parameters } = props;
|
|
71
73
|
const [initTable, setInitTable] = useState(false);
|
package/tests/assets/components/SDK-React/create/override-sdk/template/SimpleTable/SimpleTable.tsx
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import FieldGroupTemplate from '@pega/react-sdk-components/lib/components/template/FieldGroupTemplate';
|
|
3
3
|
import SimpleTableManual from '@pega/react-sdk-components/lib/components/template/SimpleTable/SimpleTableManual';
|
|
4
|
-
import type { PConnProps } from '
|
|
5
|
-
|
|
6
|
-
interface SimpleTableProps extends PConnProps {
|
|
7
|
-
// If any, enter additional props that only exist on this component
|
|
8
|
-
multiRecordDisplayAs: string,
|
|
9
|
-
allowTableEdit: boolean,
|
|
10
|
-
contextClass: any
|
|
11
|
-
}
|
|
4
|
+
// import type { PConnProps } from '../../../../types/PConnProps';
|
|
12
5
|
|
|
6
|
+
// Can't use SimpleTableProps until getComponentConfig() and getFieldMetadata() are NOT private
|
|
7
|
+
// interface SimpleTableProps extends PConnProps {
|
|
8
|
+
// // If any, enter additional props that only exist on this component
|
|
9
|
+
// multiRecordDisplayAs: string,
|
|
10
|
+
// allowTableEdit: boolean,
|
|
11
|
+
// contextClass: any
|
|
12
|
+
// }
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
export default function SimpleTable(props: SimpleTableProps) {
|
|
15
|
+
export default function SimpleTable(props /* : SimpleTableProps */) {
|
|
16
16
|
const { getPConnect, multiRecordDisplayAs, allowTableEdit } = props;
|
|
17
17
|
|
|
18
18
|
let { contextClass } = props;
|
|
@@ -150,7 +150,7 @@ export default function SimpleTableManual(props: SimpleTableManualProps) {
|
|
|
150
150
|
// config.datasource (ex: "@ASSOCIATED .DeclarantChoice")
|
|
151
151
|
// Neither of these appear in the resolved props
|
|
152
152
|
|
|
153
|
-
const rawConfig = rawMetadata?.config;
|
|
153
|
+
const rawConfig = rawMetadata?.["config"];
|
|
154
154
|
const rawFields =
|
|
155
155
|
rawConfig?.children?.[0]?.children || rawConfig?.presets?.[0].children?.[0]?.children;
|
|
156
156
|
|
package/tests/assets/components/SDK-React/create/override-sdk/widget/Attachment/Attachment.tsx
CHANGED
|
@@ -44,7 +44,7 @@ export default function Attachment(props /* :AttachmentProps */) {
|
|
|
44
44
|
categoryName = value.pyCategoryName;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
let valueRef = pConn.getStateProps()
|
|
47
|
+
let valueRef = pConn.getStateProps()["value"];
|
|
48
48
|
valueRef = valueRef.indexOf('.') === 0 ? valueRef.substring(1) : valueRef;
|
|
49
49
|
const [file, setFile] = useState(fileTemp);
|
|
50
50
|
|
|
@@ -254,7 +254,7 @@ export default function Attachment(props /* :AttachmentProps */) {
|
|
|
254
254
|
}
|
|
255
255
|
);
|
|
256
256
|
}
|
|
257
|
-
const fieldName = pConn.getStateProps()
|
|
257
|
+
const fieldName = pConn.getStateProps()["value"];
|
|
258
258
|
const context = pConn.getContextName();
|
|
259
259
|
|
|
260
260
|
PCore.getMessageManager().clearMessages({
|