@pega/dx-component-builder-sdk 0.23.5 → 0.23.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/tasks/create/templates/Constellation/field/Text/index.jsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/field/Boolean/index.tsx.mustache +30 -29
- package/src/tasks/create/templates/SDK-React/field/Date/index.tsx.mustache +6 -2
- package/src/tasks/create/templates/SDK-React/field/DateTime/index.tsx.mustache +6 -2
- package/src/tasks/create/templates/SDK-React/field/Decimal/index.tsx.mustache +4 -1
- package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/index.tsx.mustache +4 -1
- package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/index.tsx.mustache +5 -2
- package/src/tasks/create/templates/SDK-React/field/Integer/index.tsx.mustache +6 -2
- package/src/tasks/create/templates/SDK-React/field/Picklist/index.tsx.mustache +4 -1
- package/src/tasks/create/templates/SDK-React/field/Text/index.tsx.mustache +4 -1
- package/src/tasks/create/templates/SDK-React/field/Text-Email/index.tsx.mustache +6 -2
- package/src/tasks/create/templates/SDK-React/field/Text-Input/index.tsx.mustache +4 -1
- package/src/tasks/create/templates/SDK-React/field/Text-Paragraph/index.tsx.mustache +4 -1
- package/src/tasks/create/templates/SDK-React/field/Text-Phone/index.tsx.mustache +4 -1
- package/src/tasks/create/templates/SDK-React/field/Text-URL/index.tsx.mustache +6 -2
- package/src/tasks/create/templates/SDK-React/field/TimeOfDay/index.tsx.mustache +6 -2
- package/src/tasks/create/templates/SDK-React/template/DETAILS/index.tsx.mustache +4 -2
- package/src/tasks/create/templates/SDK-React/template/DETAILS-region/index.tsx.mustache +4 -2
- package/src/tasks/create/templates/SDK-React/template/PAGE/OneColumn.tsx.mustache +7 -6
- package/tests/assets/components/SDK-React/create/custom-constellation/field/Pega_DXIL_MyTestText/index.jsx +1 -1
- package/tests/assets/components/SDK-React/create/custom-sdk/field/Pega_DXIL_MyTestText/index.tsx +4 -1
- package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyText/index.jsx +1 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyBoolean/index.tsx +30 -29
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/index.tsx +4 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDate/index.tsx +6 -2
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/index.tsx +6 -2
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/index.tsx +4 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyEmail/index.tsx +6 -2
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyInteger/index.tsx +6 -2
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyParagraph/index.tsx +4 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyPercentage/index.tsx +5 -2
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyPhone/index.tsx +4 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyPicklist/index.tsx +4 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyText/index.tsx +4 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyTextInput/index.tsx +4 -1
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyTimeOfDay/index.tsx +6 -2
- package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyURL/index.tsx +6 -2
- package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyDetails/index.tsx +4 -2
- package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyPage/OneColumn.tsx +7 -6
- package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/index.tsx +4 -2
- package/tests/functional/localCreateBuildDeleteCustom.test.js +14 -1
- package/tests/functional/localCreatePublishAllDeleteAllCustom.test.js +4 -1
- package/tests/functional/localCreatePublishAllDeleteAllOverride.test.js +3 -1
- package/tests/functional/localCreatePublishDeleteCustom.test.js +4 -3
package/package.json
CHANGED
|
@@ -8,41 +8,38 @@ import {
|
|
|
8
8
|
} from '@material-ui/core';
|
|
9
9
|
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
10
10
|
// import PropTypes from 'prop-types';
|
|
11
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
12
11
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
//
|
|
18
|
-
//
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
//
|
|
27
|
-
|
|
28
|
-
//
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
//
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
// placeholder?: string
|
|
39
|
-
// }
|
|
12
|
+
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
13
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
14
|
+
|
|
15
|
+
interface {{COMPONENT_CLASS_NAME}}Props extends PConnProps {
|
|
16
|
+
// If any, enter additional props that only exist on this componentName
|
|
17
|
+
// Everything from PConnFieldProps except value and change type of value to boolean
|
|
18
|
+
|
|
19
|
+
value?: boolean,
|
|
20
|
+
label: string,
|
|
21
|
+
required: boolean,
|
|
22
|
+
disabled: boolean,
|
|
23
|
+
validatemessage: string,
|
|
24
|
+
status?: string,
|
|
25
|
+
// eslint-disable-next-line react/no-unused-prop-types
|
|
26
|
+
onChange: any,
|
|
27
|
+
// eslint-disable-next-line react/no-unused-prop-types
|
|
28
|
+
onBlur?: any,
|
|
29
|
+
readOnly: boolean,
|
|
30
|
+
testId: string,
|
|
31
|
+
helperText: string,
|
|
32
|
+
displayMode?: string,
|
|
33
|
+
hideLabel: boolean,
|
|
34
|
+
// eslint-disable-next-line react/no-unused-prop-types
|
|
35
|
+
placeholder?: string
|
|
36
|
+
}
|
|
40
37
|
|
|
41
38
|
// Duplicated runtime code from React SDK
|
|
42
39
|
|
|
43
40
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
44
41
|
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
45
|
-
export default function {{COMPONENT_CLASS_NAME}}(props
|
|
42
|
+
export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
46
43
|
const {
|
|
47
44
|
getPConnect,
|
|
48
45
|
label,
|
|
@@ -57,6 +54,9 @@ export default function {{COMPONENT_CLASS_NAME}}(props /* : {{COMPONENT_CLASS_NA
|
|
|
57
54
|
displayMode,
|
|
58
55
|
hideLabel
|
|
59
56
|
} = props;
|
|
57
|
+
|
|
58
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
59
|
+
|
|
60
60
|
const helperTextToDisplay = validatemessage || helperText;
|
|
61
61
|
|
|
62
62
|
const thePConn = getPConnect();
|
|
@@ -85,6 +85,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props /* : {{COMPONENT_CLASS_NA
|
|
|
85
85
|
};
|
|
86
86
|
|
|
87
87
|
const handleBlur = event => {
|
|
88
|
+
// @ts-ignore
|
|
88
89
|
thePConn.getValidationApi().validate(event.target.checked, ''); // 2nd arg empty string until typedef marked correctly as optional
|
|
89
90
|
};
|
|
90
91
|
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { KeyboardDatePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';
|
|
3
3
|
import DayjsUtils from '@date-io/dayjs';
|
|
4
|
-
import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
4
|
+
// import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
5
5
|
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
6
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
6
|
+
// import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
7
7
|
// import PropTypes from 'prop-types';
|
|
8
8
|
import { format } from '@pega/react-sdk-components/lib/components/helpers/formatters';
|
|
9
9
|
import { dateFormatInfoDefault, getDateFormatInfo} from '@pega/react-sdk-components/lib/components/helpers/date-format-utils';
|
|
10
10
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
11
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
11
12
|
|
|
12
13
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
13
14
|
|
|
@@ -44,6 +45,9 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
44
45
|
const propName = pConn.getStateProps()["value"];
|
|
45
46
|
const helperTextToDisplay = validatemessage || helperText;
|
|
46
47
|
|
|
48
|
+
const TextInput = getComponentFromMap("TextInput");
|
|
49
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
50
|
+
|
|
47
51
|
// Start with default dateFormatInfo
|
|
48
52
|
const dateFormatInfo = dateFormatInfoDefault;
|
|
49
53
|
// and then update, as needed, based on locale, etc.
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { KeyboardDateTimePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';
|
|
3
3
|
import DayjsUtils from '@date-io/dayjs';
|
|
4
|
-
import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
4
|
+
// import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
5
5
|
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
6
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
6
|
+
// import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
7
7
|
// import PropTypes from 'prop-types';
|
|
8
8
|
import { format } from '@pega/react-sdk-components/lib/components/helpers/formatters/';
|
|
9
9
|
import { dateFormatInfoDefault, getDateFormatInfo} from '@pega/react-sdk-components/lib/components/helpers/date-format-utils';
|
|
10
10
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
11
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
@@ -43,6 +44,9 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
43
44
|
const propName = pConn.getStateProps()["value"];
|
|
44
45
|
const helperTextToDisplay = validatemessage || helperText;
|
|
45
46
|
|
|
47
|
+
const TextInput = getComponentFromMap("TextInput");
|
|
48
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
49
|
+
|
|
46
50
|
// Start with default dateFormatInfo
|
|
47
51
|
const dateFormatInfo = dateFormatInfoDefault;
|
|
48
52
|
// and then update, as needed, based on locale, etc.
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
2
|
import CurrencyTextField from '@unicef/material-ui-currency-textfield';
|
|
3
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
3
|
+
// import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
4
4
|
import { getCurrencyCharacters, getCurrencyOptions } from '@pega/react-sdk-components/lib/components/field/Currency/currency-utils.js';
|
|
5
5
|
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
6
6
|
import { format } from "@pega/react-sdk-components/lib/components/helpers/formatters";
|
|
7
7
|
// import PropTypes from 'prop-types';
|
|
8
8
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
9
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
@@ -49,6 +50,8 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
49
50
|
const propName = pConn.getStateProps()["value"];
|
|
50
51
|
const helperTextToDisplay = validatemessage || helperText;
|
|
51
52
|
|
|
53
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
54
|
+
|
|
52
55
|
const [decValue, setDecimalvalue] = useState("");
|
|
53
56
|
const [theCurrDec, setCurrDec] = useState(".");
|
|
54
57
|
const [theCurrSep, setCurrSep] = useState(",");
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
2
|
import CurrencyTextField from '@unicef/material-ui-currency-textfield';
|
|
3
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
3
|
+
// import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
4
4
|
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
5
5
|
// import PropTypes from 'prop-types';
|
|
6
6
|
import { format } from "@pega/react-sdk-components/lib/components/helpers/formatters";
|
|
7
7
|
import { getCurrencyCharacters, getCurrencyOptions } from '@pega/react-sdk-components/lib/components/field/Currency/currency-utils.js';
|
|
8
8
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
9
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
@@ -44,6 +45,8 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
44
45
|
const propName = pConn.getStateProps()["value"];
|
|
45
46
|
const helperTextToDisplay = validatemessage || helperText;
|
|
46
47
|
|
|
48
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
49
|
+
|
|
47
50
|
let readOnlyProp = {}; // Note: empty if NOT ReadOnly
|
|
48
51
|
|
|
49
52
|
if (readOnly) {
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { makeStyles } from '@material-ui/core/styles';
|
|
4
4
|
import { TextField } from '@material-ui/core';
|
|
5
|
-
import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
6
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
5
|
+
// import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
6
|
+
// import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
7
7
|
// import PropTypes from 'prop-types';
|
|
8
8
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
9
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
@@ -56,6 +57,8 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
56
57
|
} = props;
|
|
57
58
|
const helperTextToDisplay = validatemessage || helperText;
|
|
58
59
|
|
|
60
|
+
const TextInput = getComponentFromMap("TextInput");
|
|
61
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
59
62
|
|
|
60
63
|
|
|
61
64
|
if (displayMode === 'LABELS_LEFT') {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { TextField } from '@material-ui/core';
|
|
4
|
-
import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
5
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
4
|
+
// import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
5
|
+
// import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
6
6
|
// import PropTypes from 'prop-types';
|
|
7
7
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
8
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
@@ -36,6 +37,9 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
36
37
|
} = props;
|
|
37
38
|
const helperTextToDisplay = validatemessage || helperText;
|
|
38
39
|
|
|
40
|
+
const TextInput = getComponentFromMap("TextInput");
|
|
41
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
42
|
+
|
|
39
43
|
|
|
40
44
|
if (displayMode === 'LABELS_LEFT') {
|
|
41
45
|
return <FieldValueList name={hideLabel ? '' : label} value={value} />;
|
|
@@ -4,8 +4,9 @@ import MenuItem from '@material-ui/core/MenuItem';
|
|
|
4
4
|
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
5
5
|
import Utils from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
6
6
|
// import PropTypes from 'prop-types';
|
|
7
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
7
|
+
// import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
8
8
|
// import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
9
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
@@ -50,6 +51,8 @@ export default function {{COMPONENT_CLASS_NAME}}(props /* : {{COMPONENT_CLASS_NA
|
|
|
50
51
|
const [options, setOptions] = useState<Array<IOption>>([]);
|
|
51
52
|
const helperTextToDisplay = validatemessage || helperText;
|
|
52
53
|
|
|
54
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
55
|
+
|
|
53
56
|
const thePConn = getPConnect();
|
|
54
57
|
const actionsApi = thePConn.getActionsApi();
|
|
55
58
|
const propName = thePConn.getStateProps()["value"];
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TextField } from '@material-ui/core';
|
|
3
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
3
|
+
// import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
4
4
|
// import PropTypes from 'prop-types';
|
|
5
5
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
6
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
@@ -36,6 +37,8 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
36
37
|
} = props;
|
|
37
38
|
const helperTextToDisplay = validatemessage || helperText;
|
|
38
39
|
|
|
40
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
41
|
+
|
|
39
42
|
const maxLength = fieldMetadata?.maxLength;
|
|
40
43
|
|
|
41
44
|
let readOnlyProp = {}; // Note: empty if NOT ReadOnly
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { TextField, InputAdornment } from '@material-ui/core';
|
|
4
4
|
import MailOutlineIcon from '@material-ui/icons/MailOutline';
|
|
5
|
-
import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
6
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
5
|
+
// import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
6
|
+
// import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
7
7
|
// import PropTypes from 'prop-types';
|
|
8
8
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
9
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
@@ -38,6 +39,9 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
38
39
|
} = props;
|
|
39
40
|
const helperTextToDisplay = validatemessage || helperText;
|
|
40
41
|
|
|
42
|
+
const TextInput = getComponentFromMap("TextInput");
|
|
43
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
44
|
+
|
|
41
45
|
if (displayMode === 'LABELS_LEFT') {
|
|
42
46
|
return <FieldValueList name={hideLabel ? '' : label} value={value} />;
|
|
43
47
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TextField } from '@material-ui/core';
|
|
3
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
3
|
+
/// import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
4
4
|
// import PropTypes from 'prop-types';
|
|
5
5
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
6
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
@@ -37,6 +38,8 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
37
38
|
} = props;
|
|
38
39
|
const helperTextToDisplay = validatemessage || helperText;
|
|
39
40
|
|
|
41
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
42
|
+
|
|
40
43
|
const maxLength = fieldMetadata?.maxLength;
|
|
41
44
|
|
|
42
45
|
let readOnlyProp = {}; // Note: empty if NOT ReadOnly
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TextField } from '@material-ui/core';
|
|
3
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
3
|
+
// import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
4
4
|
// import PropTypes from 'prop-types';
|
|
5
5
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
6
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
@@ -36,6 +37,8 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
36
37
|
} = props;
|
|
37
38
|
const helperTextToDisplay = validatemessage || helperText;
|
|
38
39
|
|
|
40
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
41
|
+
|
|
39
42
|
const maxLength = fieldMetadata?.maxLength;
|
|
40
43
|
|
|
41
44
|
let readOnlyProp = {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import MuiPhoneNumber from 'material-ui-phone-number';
|
|
3
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
3
|
+
// import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
4
4
|
// import PropTypes from 'prop-types';
|
|
5
5
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
6
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
6
7
|
|
|
7
8
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
8
9
|
|
|
@@ -33,6 +34,8 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
33
34
|
} = props;
|
|
34
35
|
const helperTextToDisplay = validatemessage || helperText;
|
|
35
36
|
|
|
37
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
38
|
+
|
|
36
39
|
let testProp = {};
|
|
37
40
|
|
|
38
41
|
testProp = {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { TextField } from '@material-ui/core';
|
|
4
|
-
import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
5
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
4
|
+
// import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
5
|
+
// import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
6
6
|
// import PropTypes from 'prop-types';
|
|
7
7
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
8
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
@@ -36,6 +37,9 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
36
37
|
} = props;
|
|
37
38
|
const helperTextToDisplay = validatemessage || helperText;
|
|
38
39
|
|
|
40
|
+
const TextInput = getComponentFromMap("TextInput");
|
|
41
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
42
|
+
|
|
39
43
|
if (displayMode === 'LABELS_LEFT') {
|
|
40
44
|
return <FieldValueList name={hideLabel ? '' : label} value={value} />;
|
|
41
45
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
2
|
+
// import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
3
3
|
import { KeyboardTimePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';
|
|
4
4
|
import DayjsUtils from '@date-io/dayjs';
|
|
5
5
|
import dayjs from 'dayjs';
|
|
6
6
|
import AccessTimeIcon from '@material-ui/icons/AccessTime';
|
|
7
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
7
|
+
// import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
8
8
|
// import PropTypes from 'prop-types';
|
|
9
9
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
10
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
@@ -37,6 +38,9 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
37
38
|
} = props;
|
|
38
39
|
const helperTextToDisplay = validatemessage || helperText;
|
|
39
40
|
|
|
41
|
+
const TextInput = getComponentFromMap("TextInput");
|
|
42
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
43
|
+
|
|
40
44
|
if (displayMode === 'LABELS_LEFT') {
|
|
41
45
|
return <FieldValueList name={hideLabel ? '' : label} value={value} />;
|
|
42
46
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { createElement } from "react";
|
|
2
2
|
import Grid from "@material-ui/core/Grid";
|
|
3
|
-
import FieldGroup from "@pega/react-sdk-components/lib/components/designSystemExtension/FieldGroup";
|
|
3
|
+
// import FieldGroup from "@pega/react-sdk-components/lib/components/designSystemExtension/FieldGroup";
|
|
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
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
7
7
|
|
|
8
8
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from "./styles";
|
|
9
9
|
|
|
@@ -23,6 +23,8 @@ import Styled{{COMPONENT_CLASS_NAME}}Wrapper from "./styles";
|
|
|
23
23
|
export default function {{COMPONENT_CLASS_NAME}}(props /* : {{COMPONENT_CLASS_NAME}}Props */) {
|
|
24
24
|
const { label = '', showLabel = true, getPConnect, showHighlightedData = false } = props;
|
|
25
25
|
|
|
26
|
+
const FieldGroup = getComponentFromMap("FieldGroup");
|
|
27
|
+
|
|
26
28
|
// Get the inherited props from the parent to determine label settings
|
|
27
29
|
const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };
|
|
28
30
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { createElement } from "react";
|
|
2
2
|
import Grid from "@material-ui/core/Grid";
|
|
3
|
-
import FieldGroup from "@pega/react-sdk-components/lib/components/designSystemExtension/FieldGroup";
|
|
3
|
+
// import FieldGroup from "@pega/react-sdk-components/lib/components/designSystemExtension/FieldGroup";
|
|
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
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
7
7
|
|
|
8
8
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from "./styles";
|
|
9
9
|
|
|
@@ -24,6 +24,8 @@ import Styled{{COMPONENT_CLASS_NAME}}Wrapper from "./styles";
|
|
|
24
24
|
export default function {{COMPONENT_CLASS_NAME}}(props /* : {{COMPONENT_CLASS_NAME}}Props */) {
|
|
25
25
|
const { label = '', showLabel = true, getPConnect, showHighlightedData = false } = props;
|
|
26
26
|
|
|
27
|
+
const FieldGroup = getComponentFromMap("FieldGroup");
|
|
28
|
+
|
|
27
29
|
// Get the inherited props from the parent to determine label settings
|
|
28
30
|
const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };
|
|
29
31
|
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import PropTypes from "prop-types";
|
|
3
2
|
import { Grid } from "@material-ui/core";
|
|
4
3
|
import { makeStyles } from '@material-ui/core/styles';
|
|
5
4
|
|
|
5
|
+
interface OneColumnProps{
|
|
6
|
+
// If any, enter additional props that only exist on this component
|
|
7
|
+
children: Array<any>
|
|
8
|
+
}
|
|
9
|
+
|
|
6
10
|
const useStyles = makeStyles((/* theme */) => ({
|
|
7
11
|
colStyles: {
|
|
8
12
|
display: "grid",
|
|
@@ -12,7 +16,7 @@ const useStyles = makeStyles((/* theme */) => ({
|
|
|
12
16
|
}));
|
|
13
17
|
|
|
14
18
|
|
|
15
|
-
export default function OneColumn(props) {
|
|
19
|
+
export default function OneColumn(props: OneColumnProps) {
|
|
16
20
|
const classes = useStyles();
|
|
17
21
|
|
|
18
22
|
const { children} = props;
|
|
@@ -26,7 +30,4 @@ export default function OneColumn(props) {
|
|
|
26
30
|
)
|
|
27
31
|
}
|
|
28
32
|
|
|
29
|
-
|
|
30
|
-
children: PropTypes.arrayOf(PropTypes.node).isRequired,
|
|
31
|
-
// template: PropTypes.string.isRequired
|
|
32
|
-
};
|
|
33
|
+
|
package/tests/assets/components/SDK-React/create/custom-sdk/field/Pega_DXIL_MyTestText/index.tsx
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TextField } from '@material-ui/core';
|
|
3
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
3
|
+
// import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
4
4
|
// import PropTypes from 'prop-types';
|
|
5
5
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
6
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
import StyledPegaDxilMyTestTextWrapper from './styles';
|
|
@@ -36,6 +37,8 @@ export default function PegaDxilMyTestText(props: PegaDxilMyTestTextProps) {
|
|
|
36
37
|
} = props;
|
|
37
38
|
const helperTextToDisplay = validatemessage || helperText;
|
|
38
39
|
|
|
40
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
41
|
+
|
|
39
42
|
const maxLength = fieldMetadata?.maxLength;
|
|
40
43
|
|
|
41
44
|
let readOnlyProp = {}; // Note: empty if NOT ReadOnly
|
package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyBoolean/index.tsx
CHANGED
|
@@ -8,41 +8,38 @@ import {
|
|
|
8
8
|
} from '@material-ui/core';
|
|
9
9
|
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
10
10
|
// import PropTypes from 'prop-types';
|
|
11
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
12
11
|
import StyledPegaDxilMyBooleanWrapper from './styles';
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
//
|
|
18
|
-
//
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
//
|
|
27
|
-
|
|
28
|
-
//
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
//
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
// placeholder?: string
|
|
39
|
-
// }
|
|
12
|
+
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
13
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
14
|
+
|
|
15
|
+
interface PegaDxilMyBooleanProps extends PConnProps {
|
|
16
|
+
// If any, enter additional props that only exist on this componentName
|
|
17
|
+
// Everything from PConnFieldProps except value and change type of value to boolean
|
|
18
|
+
|
|
19
|
+
value?: boolean,
|
|
20
|
+
label: string,
|
|
21
|
+
required: boolean,
|
|
22
|
+
disabled: boolean,
|
|
23
|
+
validatemessage: string,
|
|
24
|
+
status?: string,
|
|
25
|
+
// eslint-disable-next-line react/no-unused-prop-types
|
|
26
|
+
onChange: any,
|
|
27
|
+
// eslint-disable-next-line react/no-unused-prop-types
|
|
28
|
+
onBlur?: any,
|
|
29
|
+
readOnly: boolean,
|
|
30
|
+
testId: string,
|
|
31
|
+
helperText: string,
|
|
32
|
+
displayMode?: string,
|
|
33
|
+
hideLabel: boolean,
|
|
34
|
+
// eslint-disable-next-line react/no-unused-prop-types
|
|
35
|
+
placeholder?: string
|
|
36
|
+
}
|
|
40
37
|
|
|
41
38
|
// Duplicated runtime code from React SDK
|
|
42
39
|
|
|
43
40
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
44
41
|
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
45
|
-
export default function PegaDxilMyBoolean(props
|
|
42
|
+
export default function PegaDxilMyBoolean(props: PegaDxilMyBooleanProps) {
|
|
46
43
|
const {
|
|
47
44
|
getPConnect,
|
|
48
45
|
label,
|
|
@@ -57,6 +54,9 @@ export default function PegaDxilMyBoolean(props /* : PegaDxilMyBooleanProps */)
|
|
|
57
54
|
displayMode,
|
|
58
55
|
hideLabel
|
|
59
56
|
} = props;
|
|
57
|
+
|
|
58
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
59
|
+
|
|
60
60
|
const helperTextToDisplay = validatemessage || helperText;
|
|
61
61
|
|
|
62
62
|
const thePConn = getPConnect();
|
|
@@ -85,6 +85,7 @@ export default function PegaDxilMyBoolean(props /* : PegaDxilMyBooleanProps */)
|
|
|
85
85
|
};
|
|
86
86
|
|
|
87
87
|
const handleBlur = event => {
|
|
88
|
+
// @ts-ignore
|
|
88
89
|
thePConn.getValidationApi().validate(event.target.checked, ''); // 2nd arg empty string until typedef marked correctly as optional
|
|
89
90
|
};
|
|
90
91
|
|
package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/index.tsx
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
2
|
import CurrencyTextField from '@unicef/material-ui-currency-textfield';
|
|
3
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
3
|
+
// import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
4
4
|
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
5
5
|
// import PropTypes from 'prop-types';
|
|
6
6
|
import { format } from "@pega/react-sdk-components/lib/components/helpers/formatters";
|
|
7
7
|
import { getCurrencyCharacters, getCurrencyOptions } from '@pega/react-sdk-components/lib/components/field/Currency/currency-utils.js';
|
|
8
8
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
9
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
import StyledPegaDxilMyCurrencyWrapper from './styles';
|
|
@@ -44,6 +45,8 @@ export default function PegaDxilMyCurrency(props: PegaDxilMyCurrencyProps) {
|
|
|
44
45
|
const propName = pConn.getStateProps()["value"];
|
|
45
46
|
const helperTextToDisplay = validatemessage || helperText;
|
|
46
47
|
|
|
48
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
49
|
+
|
|
47
50
|
let readOnlyProp = {}; // Note: empty if NOT ReadOnly
|
|
48
51
|
|
|
49
52
|
if (readOnly) {
|
package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDate/index.tsx
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { KeyboardDatePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';
|
|
3
3
|
import DayjsUtils from '@date-io/dayjs';
|
|
4
|
-
import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
4
|
+
// import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
5
5
|
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
6
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
6
|
+
// import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
7
7
|
// import PropTypes from 'prop-types';
|
|
8
8
|
import { format } from '@pega/react-sdk-components/lib/components/helpers/formatters';
|
|
9
9
|
import { dateFormatInfoDefault, getDateFormatInfo} from '@pega/react-sdk-components/lib/components/helpers/date-format-utils';
|
|
10
10
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
11
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
11
12
|
|
|
12
13
|
import StyledPegaDxilMyDateWrapper from './styles';
|
|
13
14
|
|
|
@@ -44,6 +45,9 @@ export default function PegaDxilMyDate(props: PegaDxilMyDateProps) {
|
|
|
44
45
|
const propName = pConn.getStateProps()["value"];
|
|
45
46
|
const helperTextToDisplay = validatemessage || helperText;
|
|
46
47
|
|
|
48
|
+
const TextInput = getComponentFromMap("TextInput");
|
|
49
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
50
|
+
|
|
47
51
|
// Start with default dateFormatInfo
|
|
48
52
|
const dateFormatInfo = dateFormatInfoDefault;
|
|
49
53
|
// and then update, as needed, based on locale, etc.
|
package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/index.tsx
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { KeyboardDateTimePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';
|
|
3
3
|
import DayjsUtils from '@date-io/dayjs';
|
|
4
|
-
import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
4
|
+
// import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
5
5
|
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
6
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
6
|
+
// import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
7
7
|
// import PropTypes from 'prop-types';
|
|
8
8
|
import { format } from '@pega/react-sdk-components/lib/components/helpers/formatters/';
|
|
9
9
|
import { dateFormatInfoDefault, getDateFormatInfo} from '@pega/react-sdk-components/lib/components/helpers/date-format-utils';
|
|
10
10
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
11
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
import StyledPegaDxilMyDateTimeWrapper from './styles';
|
|
@@ -43,6 +44,9 @@ export default function PegaDxilMyDateTime(props: PegaDxilMyDateTimeProps) {
|
|
|
43
44
|
const propName = pConn.getStateProps()["value"];
|
|
44
45
|
const helperTextToDisplay = validatemessage || helperText;
|
|
45
46
|
|
|
47
|
+
const TextInput = getComponentFromMap("TextInput");
|
|
48
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
49
|
+
|
|
46
50
|
// Start with default dateFormatInfo
|
|
47
51
|
const dateFormatInfo = dateFormatInfoDefault;
|
|
48
52
|
// and then update, as needed, based on locale, etc.
|
package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/index.tsx
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
2
|
import CurrencyTextField from '@unicef/material-ui-currency-textfield';
|
|
3
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
3
|
+
// import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
4
4
|
import { getCurrencyCharacters, getCurrencyOptions } from '@pega/react-sdk-components/lib/components/field/Currency/currency-utils.js';
|
|
5
5
|
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
6
6
|
import { format } from "@pega/react-sdk-components/lib/components/helpers/formatters";
|
|
7
7
|
// import PropTypes from 'prop-types';
|
|
8
8
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
9
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
import StyledPegaDxilMyDecimalWrapper from './styles';
|
|
@@ -49,6 +50,8 @@ export default function PegaDxilMyDecimal(props: PegaDxilMyDecimalProps) {
|
|
|
49
50
|
const propName = pConn.getStateProps()["value"];
|
|
50
51
|
const helperTextToDisplay = validatemessage || helperText;
|
|
51
52
|
|
|
53
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
54
|
+
|
|
52
55
|
const [decValue, setDecimalvalue] = useState("");
|
|
53
56
|
const [theCurrDec, setCurrDec] = useState(".");
|
|
54
57
|
const [theCurrSep, setCurrSep] = useState(",");
|
package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyEmail/index.tsx
CHANGED
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { TextField, InputAdornment } from '@material-ui/core';
|
|
4
4
|
import MailOutlineIcon from '@material-ui/icons/MailOutline';
|
|
5
|
-
import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
6
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
5
|
+
// import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
6
|
+
// import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
7
7
|
// import PropTypes from 'prop-types';
|
|
8
8
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
9
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
import StyledPegaDxilMyEmailWrapper from './styles';
|
|
@@ -38,6 +39,9 @@ export default function PegaDxilMyEmail(props: PegaDxilMyEmailProps) {
|
|
|
38
39
|
} = props;
|
|
39
40
|
const helperTextToDisplay = validatemessage || helperText;
|
|
40
41
|
|
|
42
|
+
const TextInput = getComponentFromMap("TextInput");
|
|
43
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
44
|
+
|
|
41
45
|
if (displayMode === 'LABELS_LEFT') {
|
|
42
46
|
return <FieldValueList name={hideLabel ? '' : label} value={value} />;
|
|
43
47
|
}
|
package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyInteger/index.tsx
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { TextField } from '@material-ui/core';
|
|
4
|
-
import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
5
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
4
|
+
// import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
5
|
+
// import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
6
6
|
// import PropTypes from 'prop-types';
|
|
7
7
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
8
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
import StyledPegaDxilMyIntegerWrapper from './styles';
|
|
@@ -36,6 +37,9 @@ export default function PegaDxilMyInteger(props: PegaDxilMyIntegerProps) {
|
|
|
36
37
|
} = props;
|
|
37
38
|
const helperTextToDisplay = validatemessage || helperText;
|
|
38
39
|
|
|
40
|
+
const TextInput = getComponentFromMap("TextInput");
|
|
41
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
42
|
+
|
|
39
43
|
|
|
40
44
|
if (displayMode === 'LABELS_LEFT') {
|
|
41
45
|
return <FieldValueList name={hideLabel ? '' : label} value={value} />;
|
package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyParagraph/index.tsx
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TextField } from '@material-ui/core';
|
|
3
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
3
|
+
// import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
4
4
|
// import PropTypes from 'prop-types';
|
|
5
5
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
6
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
import StyledPegaDxilMyParagraphWrapper from './styles';
|
|
@@ -36,6 +37,8 @@ export default function PegaDxilMyParagraph(props: PegaDxilMyParagraphProps) {
|
|
|
36
37
|
} = props;
|
|
37
38
|
const helperTextToDisplay = validatemessage || helperText;
|
|
38
39
|
|
|
40
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
41
|
+
|
|
39
42
|
const maxLength = fieldMetadata?.maxLength;
|
|
40
43
|
|
|
41
44
|
let readOnlyProp = {};
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { makeStyles } from '@material-ui/core/styles';
|
|
4
4
|
import { TextField } from '@material-ui/core';
|
|
5
|
-
import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
6
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
5
|
+
// import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
6
|
+
// import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
7
7
|
// import PropTypes from 'prop-types';
|
|
8
8
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
9
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
import StyledPegaDxilMyPercentageWrapper from './styles';
|
|
@@ -56,6 +57,8 @@ export default function PegaDxilMyPercentage(props: PegaDxilMyPercentageProps) {
|
|
|
56
57
|
} = props;
|
|
57
58
|
const helperTextToDisplay = validatemessage || helperText;
|
|
58
59
|
|
|
60
|
+
const TextInput = getComponentFromMap("TextInput");
|
|
61
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
59
62
|
|
|
60
63
|
|
|
61
64
|
if (displayMode === 'LABELS_LEFT') {
|
package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyPhone/index.tsx
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import MuiPhoneNumber from 'material-ui-phone-number';
|
|
3
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
3
|
+
// import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
4
4
|
// import PropTypes from 'prop-types';
|
|
5
5
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
6
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
6
7
|
|
|
7
8
|
import StyledPegaDxilMyPhoneWrapper from './styles';
|
|
8
9
|
|
|
@@ -33,6 +34,8 @@ export default function PegaDxilMyPhone(props: PegaDxilMyPhoneProps) {
|
|
|
33
34
|
} = props;
|
|
34
35
|
const helperTextToDisplay = validatemessage || helperText;
|
|
35
36
|
|
|
37
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
38
|
+
|
|
36
39
|
let testProp = {};
|
|
37
40
|
|
|
38
41
|
testProp = {
|
package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyPicklist/index.tsx
CHANGED
|
@@ -4,8 +4,9 @@ import MenuItem from '@material-ui/core/MenuItem';
|
|
|
4
4
|
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
5
5
|
import Utils from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
6
6
|
// import PropTypes from 'prop-types';
|
|
7
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
7
|
+
// import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
8
8
|
// import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
9
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
import StyledPegaDxilMyPicklistWrapper from './styles';
|
|
@@ -50,6 +51,8 @@ export default function PegaDxilMyPicklist(props /* : PegaDxilMyPicklistProps */
|
|
|
50
51
|
const [options, setOptions] = useState<Array<IOption>>([]);
|
|
51
52
|
const helperTextToDisplay = validatemessage || helperText;
|
|
52
53
|
|
|
54
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
55
|
+
|
|
53
56
|
const thePConn = getPConnect();
|
|
54
57
|
const actionsApi = thePConn.getActionsApi();
|
|
55
58
|
const propName = thePConn.getStateProps()["value"];
|
package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyText/index.tsx
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TextField } from '@material-ui/core';
|
|
3
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
3
|
+
// import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
4
4
|
// import PropTypes from 'prop-types';
|
|
5
5
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
6
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
import StyledPegaDxilMyTextWrapper from './styles';
|
|
@@ -36,6 +37,8 @@ export default function PegaDxilMyText(props: PegaDxilMyTextProps) {
|
|
|
36
37
|
} = props;
|
|
37
38
|
const helperTextToDisplay = validatemessage || helperText;
|
|
38
39
|
|
|
40
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
41
|
+
|
|
39
42
|
const maxLength = fieldMetadata?.maxLength;
|
|
40
43
|
|
|
41
44
|
let readOnlyProp = {}; // Note: empty if NOT ReadOnly
|
package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyTextInput/index.tsx
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TextField } from '@material-ui/core';
|
|
3
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
3
|
+
/// import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
4
4
|
// import PropTypes from 'prop-types';
|
|
5
5
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
6
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
import StyledPegaDxilMyTextInputWrapper from './styles';
|
|
@@ -37,6 +38,8 @@ export default function PegaDxilMyTextInput(props: PegaDxilMyTextInputProps) {
|
|
|
37
38
|
} = props;
|
|
38
39
|
const helperTextToDisplay = validatemessage || helperText;
|
|
39
40
|
|
|
41
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
42
|
+
|
|
40
43
|
const maxLength = fieldMetadata?.maxLength;
|
|
41
44
|
|
|
42
45
|
let readOnlyProp = {}; // Note: empty if NOT ReadOnly
|
package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyTimeOfDay/index.tsx
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
2
|
+
// import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
3
3
|
import { KeyboardTimePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';
|
|
4
4
|
import DayjsUtils from '@date-io/dayjs';
|
|
5
5
|
import dayjs from 'dayjs';
|
|
6
6
|
import AccessTimeIcon from '@material-ui/icons/AccessTime';
|
|
7
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
7
|
+
// import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
8
8
|
// import PropTypes from 'prop-types';
|
|
9
9
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
10
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
import StyledPegaDxilMyTimeOfDayWrapper from './styles';
|
|
@@ -37,6 +38,9 @@ export default function PegaDxilMyTimeOfDay(props: PegaDxilMyTimeOfDayProps) {
|
|
|
37
38
|
} = props;
|
|
38
39
|
const helperTextToDisplay = validatemessage || helperText;
|
|
39
40
|
|
|
41
|
+
const TextInput = getComponentFromMap("TextInput");
|
|
42
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
43
|
+
|
|
40
44
|
if (displayMode === 'LABELS_LEFT') {
|
|
41
45
|
return <FieldValueList name={hideLabel ? '' : label} value={value} />;
|
|
42
46
|
}
|
package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyURL/index.tsx
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { TextField } from '@material-ui/core';
|
|
4
|
-
import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
5
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
4
|
+
// import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
5
|
+
// import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
6
6
|
// import PropTypes from 'prop-types';
|
|
7
7
|
import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
8
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
import StyledPegaDxilMyUrlWrapper from './styles';
|
|
@@ -36,6 +37,9 @@ export default function PegaDxilMyUrl(props: PegaDxilMyUrlProps) {
|
|
|
36
37
|
} = props;
|
|
37
38
|
const helperTextToDisplay = validatemessage || helperText;
|
|
38
39
|
|
|
40
|
+
const TextInput = getComponentFromMap("TextInput");
|
|
41
|
+
const FieldValueList = getComponentFromMap("FieldValueList");
|
|
42
|
+
|
|
39
43
|
if (displayMode === 'LABELS_LEFT') {
|
|
40
44
|
return <FieldValueList name={hideLabel ? '' : label} value={value} />;
|
|
41
45
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { createElement } from "react";
|
|
2
2
|
import Grid from "@material-ui/core/Grid";
|
|
3
|
-
import FieldGroup from "@pega/react-sdk-components/lib/components/designSystemExtension/FieldGroup";
|
|
3
|
+
// import FieldGroup from "@pega/react-sdk-components/lib/components/designSystemExtension/FieldGroup";
|
|
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
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
7
7
|
|
|
8
8
|
import StyledPegaDxilMyDetailsWrapper from "./styles";
|
|
9
9
|
|
|
@@ -23,6 +23,8 @@ import StyledPegaDxilMyDetailsWrapper from "./styles";
|
|
|
23
23
|
export default function PegaDxilMyDetails(props /* : PegaDxilMyDetailsProps */) {
|
|
24
24
|
const { label = '', showLabel = true, getPConnect, showHighlightedData = false } = props;
|
|
25
25
|
|
|
26
|
+
const FieldGroup = getComponentFromMap("FieldGroup");
|
|
27
|
+
|
|
26
28
|
// Get the inherited props from the parent to determine label settings
|
|
27
29
|
const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };
|
|
28
30
|
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import PropTypes from "prop-types";
|
|
3
2
|
import { Grid } from "@material-ui/core";
|
|
4
3
|
import { makeStyles } from '@material-ui/core/styles';
|
|
5
4
|
|
|
5
|
+
interface OneColumnProps{
|
|
6
|
+
// If any, enter additional props that only exist on this component
|
|
7
|
+
children: Array<any>
|
|
8
|
+
}
|
|
9
|
+
|
|
6
10
|
const useStyles = makeStyles((/* theme */) => ({
|
|
7
11
|
colStyles: {
|
|
8
12
|
display: "grid",
|
|
@@ -12,7 +16,7 @@ const useStyles = makeStyles((/* theme */) => ({
|
|
|
12
16
|
}));
|
|
13
17
|
|
|
14
18
|
|
|
15
|
-
export default function OneColumn(props) {
|
|
19
|
+
export default function OneColumn(props: OneColumnProps) {
|
|
16
20
|
const classes = useStyles();
|
|
17
21
|
|
|
18
22
|
const { children} = props;
|
|
@@ -26,7 +30,4 @@ export default function OneColumn(props) {
|
|
|
26
30
|
)
|
|
27
31
|
}
|
|
28
32
|
|
|
29
|
-
|
|
30
|
-
children: PropTypes.arrayOf(PropTypes.node).isRequired,
|
|
31
|
-
// template: PropTypes.string.isRequired
|
|
32
|
-
};
|
|
33
|
+
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { createElement } from "react";
|
|
2
2
|
import Grid from "@material-ui/core/Grid";
|
|
3
|
-
import FieldGroup from "@pega/react-sdk-components/lib/components/designSystemExtension/FieldGroup";
|
|
3
|
+
// import FieldGroup from "@pega/react-sdk-components/lib/components/designSystemExtension/FieldGroup";
|
|
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
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
7
7
|
|
|
8
8
|
import StyledPegaDxilMyTwoColumnDetailsWrapper from "./styles";
|
|
9
9
|
|
|
@@ -24,6 +24,8 @@ import StyledPegaDxilMyTwoColumnDetailsWrapper from "./styles";
|
|
|
24
24
|
export default function PegaDxilMyTwoColumnDetails(props /* : PegaDxilMyTwoColumnDetailsProps */) {
|
|
25
25
|
const { label = '', showLabel = true, getPConnect, showHighlightedData = false } = props;
|
|
26
26
|
|
|
27
|
+
const FieldGroup = getComponentFromMap("FieldGroup");
|
|
28
|
+
|
|
27
29
|
// Get the inherited props from the parent to determine label settings
|
|
28
30
|
const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };
|
|
29
31
|
|
|
@@ -87,7 +87,20 @@ describe('create build and delete local custom', () => {
|
|
|
87
87
|
expect(stderr).not.toBeNull();
|
|
88
88
|
|
|
89
89
|
expect(stdout).toContain(`${newFileNameConstellation} schema is valid`);
|
|
90
|
-
expect(stdout).toContain('Compiled successfully.');
|
|
90
|
+
// expect(stdout).toContain('Compiled successfully.');
|
|
91
|
+
|
|
92
|
+
switch (framework) {
|
|
93
|
+
case "SDK-Angular":
|
|
94
|
+
break;
|
|
95
|
+
case "SDK-React":
|
|
96
|
+
expect(stdout).toContain("Bundle React component [completed]");
|
|
97
|
+
expect(stdout).toContain("Bundle associated component [completed]");
|
|
98
|
+
break;
|
|
99
|
+
case "SDK-WebComponents":
|
|
100
|
+
break
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
|
|
91
104
|
// done();
|
|
92
105
|
}, 60000);
|
|
93
106
|
|
|
@@ -197,6 +197,9 @@ describe('create publish and deleteAll local', () => {
|
|
|
197
197
|
mapData= fs.readFileSync(pegaLocalAngularComponentMapPath, { encoding: 'utf8' });
|
|
198
198
|
break;
|
|
199
199
|
case "SDK-React":
|
|
200
|
+
expect(stdout).toContain("Bundle React component [completed]");
|
|
201
|
+
expect(stdout).toContain("Bundle associated component [completed]");
|
|
202
|
+
|
|
200
203
|
mapData= fs.readFileSync(pegaLocalReactComponentMapPath, { encoding: 'utf8' });
|
|
201
204
|
break;
|
|
202
205
|
case "SDK-WebComponents":
|
|
@@ -244,7 +247,7 @@ describe('create publish and deleteAll local', () => {
|
|
|
244
247
|
expect(isInMap).toBeTruthy();
|
|
245
248
|
|
|
246
249
|
// done();
|
|
247
|
-
},
|
|
250
|
+
}, 100000);
|
|
248
251
|
|
|
249
252
|
it('npm run deleteAll Local verify not in map custom', async () => {
|
|
250
253
|
const script = `npm run deleteAll Local custom Y --prefix ../../..`;
|
|
@@ -218,6 +218,8 @@ describe('override publish and deleteAll local override', () => {
|
|
|
218
218
|
expect(stdout).toContain('todo');
|
|
219
219
|
break;
|
|
220
220
|
case "SDK-React":
|
|
221
|
+
expect(stdout).toContain("Bundle React component [completed]");
|
|
222
|
+
|
|
221
223
|
expect(stdout).toContain('AutoComplete');
|
|
222
224
|
expect(stdout).toContain('Details');
|
|
223
225
|
expect(stdout).toContain('ToDo');
|
|
@@ -300,7 +302,7 @@ describe('override publish and deleteAll local override', () => {
|
|
|
300
302
|
|
|
301
303
|
expect(isInMap).toBeTruthy();
|
|
302
304
|
|
|
303
|
-
},
|
|
305
|
+
}, 100000);
|
|
304
306
|
|
|
305
307
|
it('npm run deleteAll Local override verify removed from map', async () => {
|
|
306
308
|
const script = `npm run deleteAll Local override Y --prefix ../../..`;
|
|
@@ -91,9 +91,7 @@ describe('create publish and delete local custom', () => {
|
|
|
91
91
|
expect(stderr).not.toBeNull();
|
|
92
92
|
|
|
93
93
|
expect(stdout).toContain(`${newFileNameConstellation} schema is valid`);
|
|
94
|
-
expect(stdout).toContain('Compiled successfully.');
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
// expect(stdout).toContain('Compiled successfully.');
|
|
97
95
|
|
|
98
96
|
// verify in map
|
|
99
97
|
const pegaLocalReactComponentMapPath = path.join(path.resolve('../../..'), 'sdk-local-component-map.js');
|
|
@@ -105,6 +103,9 @@ describe('create publish and delete local custom', () => {
|
|
|
105
103
|
mapData= fs.readFileSync(pegaLocalAngularComponentMapPath, { encoding: 'utf8' });
|
|
106
104
|
break;
|
|
107
105
|
case "SDK-React":
|
|
106
|
+
expect(stdout).toContain("Bundle React component [completed]");
|
|
107
|
+
expect(stdout).toContain("Bundle associated component [completed]");
|
|
108
|
+
|
|
108
109
|
mapData= fs.readFileSync(pegaLocalReactComponentMapPath, { encoding: 'utf8' });
|
|
109
110
|
break;
|
|
110
111
|
case "SDK-WebComponents":
|