@pega/dx-component-builder-sdk 0.8.4 → 0.8.5
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 +6 -3
- package/tests/assets/components/SDK-React/create/custom-constellation/field/Pega_DXIL_MyTestText/index.jsx +6 -3
- package/tests/assets/components/SDK-React/createAll/custom-constellation/field/Pega_DXIL_MyText/index.jsx +6 -3
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
-
import { Input
|
|
2
|
+
import { Input } from '@pega/cosmos-react-core';
|
|
3
3
|
|
|
4
4
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
5
5
|
|
|
@@ -9,7 +9,7 @@ import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
|
9
9
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
10
10
|
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
11
11
|
const {{COMPONENT_CLASS_NAME}} = props => {
|
|
12
|
-
const { getPConnect, value, placeholder, disabled, readOnly, required, label, testId } = props;
|
|
12
|
+
const { getPConnect, value, placeholder, disabled, readOnly, required, label, hideLabel, testId } = props;
|
|
13
13
|
|
|
14
14
|
const pConn = getPConnect();
|
|
15
15
|
const actions = pConn.getActionsApi();
|
|
@@ -22,9 +22,10 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
22
22
|
|
|
23
23
|
return (
|
|
24
24
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
25
|
-
<Label>{label}</Label>
|
|
26
25
|
<Input
|
|
27
26
|
type='text'
|
|
27
|
+
label={label}
|
|
28
|
+
labelHidden={hideLabel}
|
|
28
29
|
value={value}
|
|
29
30
|
placeholder={placeholder}
|
|
30
31
|
disabled={disabled}
|
|
@@ -39,6 +40,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
39
40
|
|
|
40
41
|
{{COMPONENT_CLASS_NAME}}.defaultProps = {
|
|
41
42
|
value: '',
|
|
43
|
+
hideLabel: false,
|
|
42
44
|
placeholder: '',
|
|
43
45
|
disabled: false,
|
|
44
46
|
readOnly: false,
|
|
@@ -48,6 +50,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
48
50
|
|
|
49
51
|
{{COMPONENT_CLASS_NAME}}.propTypes = {
|
|
50
52
|
label: PropTypes.string,
|
|
53
|
+
hideLabel: PropTypes.bool,
|
|
51
54
|
value: PropTypes.string,
|
|
52
55
|
placeholder: PropTypes.string,
|
|
53
56
|
getPConnect: PropTypes.func.isRequired,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
-
import { Input
|
|
2
|
+
import { Input } from '@pega/cosmos-react-core';
|
|
3
3
|
|
|
4
4
|
import StyledPegaDxilMyTestTextWrapper from './styles';
|
|
5
5
|
|
|
@@ -9,7 +9,7 @@ import StyledPegaDxilMyTestTextWrapper from './styles';
|
|
|
9
9
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
10
10
|
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
11
11
|
const PegaDxilMyTestText = props => {
|
|
12
|
-
const { getPConnect, value, placeholder, disabled, readOnly, required, label, testId } = props;
|
|
12
|
+
const { getPConnect, value, placeholder, disabled, readOnly, required, label, hideLabel, testId } = props;
|
|
13
13
|
|
|
14
14
|
const pConn = getPConnect();
|
|
15
15
|
const actions = pConn.getActionsApi();
|
|
@@ -22,9 +22,10 @@ const PegaDxilMyTestText = props => {
|
|
|
22
22
|
|
|
23
23
|
return (
|
|
24
24
|
<StyledPegaDxilMyTestTextWrapper>
|
|
25
|
-
<Label>{label}</Label>
|
|
26
25
|
<Input
|
|
27
26
|
type='text'
|
|
27
|
+
label={label}
|
|
28
|
+
labelHidden={hideLabel}
|
|
28
29
|
value={value}
|
|
29
30
|
placeholder={placeholder}
|
|
30
31
|
disabled={disabled}
|
|
@@ -39,6 +40,7 @@ const PegaDxilMyTestText = props => {
|
|
|
39
40
|
|
|
40
41
|
PegaDxilMyTestText.defaultProps = {
|
|
41
42
|
value: '',
|
|
43
|
+
hideLabel: false,
|
|
42
44
|
placeholder: '',
|
|
43
45
|
disabled: false,
|
|
44
46
|
readOnly: false,
|
|
@@ -48,6 +50,7 @@ PegaDxilMyTestText.defaultProps = {
|
|
|
48
50
|
|
|
49
51
|
PegaDxilMyTestText.propTypes = {
|
|
50
52
|
label: PropTypes.string,
|
|
53
|
+
hideLabel: PropTypes.bool,
|
|
51
54
|
value: PropTypes.string,
|
|
52
55
|
placeholder: PropTypes.string,
|
|
53
56
|
getPConnect: PropTypes.func.isRequired,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
-
import { Input
|
|
2
|
+
import { Input } from '@pega/cosmos-react-core';
|
|
3
3
|
|
|
4
4
|
import StyledPegaDxilMyTextWrapper from './styles';
|
|
5
5
|
|
|
@@ -9,7 +9,7 @@ import StyledPegaDxilMyTextWrapper from './styles';
|
|
|
9
9
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
10
10
|
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
11
11
|
const PegaDxilMyText = props => {
|
|
12
|
-
const { getPConnect, value, placeholder, disabled, readOnly, required, label, testId } = props;
|
|
12
|
+
const { getPConnect, value, placeholder, disabled, readOnly, required, label, hideLabel, testId } = props;
|
|
13
13
|
|
|
14
14
|
const pConn = getPConnect();
|
|
15
15
|
const actions = pConn.getActionsApi();
|
|
@@ -22,9 +22,10 @@ const PegaDxilMyText = props => {
|
|
|
22
22
|
|
|
23
23
|
return (
|
|
24
24
|
<StyledPegaDxilMyTextWrapper>
|
|
25
|
-
<Label>{label}</Label>
|
|
26
25
|
<Input
|
|
27
26
|
type='text'
|
|
27
|
+
label={label}
|
|
28
|
+
labelHidden={hideLabel}
|
|
28
29
|
value={value}
|
|
29
30
|
placeholder={placeholder}
|
|
30
31
|
disabled={disabled}
|
|
@@ -39,6 +40,7 @@ const PegaDxilMyText = props => {
|
|
|
39
40
|
|
|
40
41
|
PegaDxilMyText.defaultProps = {
|
|
41
42
|
value: '',
|
|
43
|
+
hideLabel: false,
|
|
42
44
|
placeholder: '',
|
|
43
45
|
disabled: false,
|
|
44
46
|
readOnly: false,
|
|
@@ -48,6 +50,7 @@ PegaDxilMyText.defaultProps = {
|
|
|
48
50
|
|
|
49
51
|
PegaDxilMyText.propTypes = {
|
|
50
52
|
label: PropTypes.string,
|
|
53
|
+
hideLabel: PropTypes.bool,
|
|
51
54
|
value: PropTypes.string,
|
|
52
55
|
placeholder: PropTypes.string,
|
|
53
56
|
getPConnect: PropTypes.func.isRequired,
|