@pega/dx-component-builder-sdk 0.23.13 → 0.23.14
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 +12 -0
- package/src/tasks/create/templates/SDK-React/field/Boolean/index.tsx.mustache +23 -21
- package/src/tasks/create/templates/SDK-React/field/Date/index.tsx.mustache +24 -26
- package/src/tasks/create/templates/SDK-React/field/DateTime/index.tsx.mustache +20 -22
- package/src/tasks/create/templates/SDK-React/field/Decimal/index.tsx.mustache +3 -4
- package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/index.tsx.mustache +3 -4
- package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/index.tsx.mustache +3 -4
- package/src/tasks/create/templates/SDK-React/field/Integer/index.tsx.mustache +3 -4
- package/src/tasks/create/templates/SDK-React/field/Picklist/index.tsx.mustache +3 -4
- package/src/tasks/create/templates/SDK-React/field/Picklist-Autocomplete/index.tsx.mustache +31 -32
- package/src/tasks/create/templates/SDK-React/field/Picklist-RadioButtons/index.tsx.mustache +22 -23
- package/src/tasks/create/templates/SDK-React/field/Text/index.tsx.mustache +18 -19
- package/src/tasks/create/templates/SDK-React/field/Text-Email/index.tsx.mustache +26 -27
- package/src/tasks/create/templates/SDK-React/field/Text-Input/index.tsx.mustache +18 -19
- package/src/tasks/create/templates/SDK-React/field/Text-Paragraph/index.tsx.mustache +21 -22
- package/src/tasks/create/templates/SDK-React/field/Text-Phone/index.tsx.mustache +39 -40
- package/src/tasks/create/templates/SDK-React/field/Text-URL/index.tsx.mustache +19 -20
- package/src/tasks/create/templates/SDK-React/field/TimeOfDay/index.tsx.mustache +4 -5
- package/src/tasks/create/templates/SDK-React/template/DETAILS/index.tsx.mustache +19 -20
- package/src/tasks/create/templates/SDK-React/template/DETAILS-region/index.tsx.mustache +19 -20
- package/src/tasks/create/templates/SDK-React/template/FORM/index.tsx.mustache +6 -7
- package/src/tasks/create/templates/SDK-React/template/FORM-region/index.tsx.mustache +8 -9
- package/src/tasks/create/templates/SDK-React/template/PAGE/index.tsx.mustache +4 -5
- package/src/tasks/create/templates/SDK-React/widget/CASE/index.tsx.mustache +10 -11
- package/src/tasks/create/templates/SDK-React/widget/PAGE/index.tsx.mustache +23 -24
- package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/index.tsx.mustache +37 -37
- package/src/tasks/validator/index.js +52 -47
- package/tests/assets/sdk-a/components/create/override-sdk/designSystemExtension/rich-text-editor/rich-text-editor.component.html +33 -0
- package/tests/assets/sdk-a/components/create/override-sdk/designSystemExtension/rich-text-editor/rich-text-editor.component.scss +19 -0
- package/tests/assets/sdk-a/components/create/override-sdk/designSystemExtension/rich-text-editor/rich-text-editor.component.spec.ts +24 -0
- package/tests/assets/sdk-a/components/create/override-sdk/designSystemExtension/rich-text-editor/rich-text-editor.component.ts +89 -0
- package/tests/assets/sdk-a/components/create/override-sdk/field/rich-text/rich-text.component.html +20 -0
- package/tests/assets/sdk-a/components/create/override-sdk/field/rich-text/rich-text.component.scss +0 -0
- package/tests/assets/sdk-a/components/create/override-sdk/field/rich-text/rich-text.component.spec.ts +24 -0
- package/tests/assets/sdk-a/components/create/override-sdk/field/rich-text/rich-text.component.ts +131 -0
- package/tests/assets/sdk-a/components/create/override-sdk/widget/file-utility/file-utility.component.ts +21 -15
- package/tests/assets/sdk-a/components/createAll/override-sdk/designSystemExtension/rich-text-editor/rich-text-editor.component.html +33 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/designSystemExtension/rich-text-editor/rich-text-editor.component.scss +19 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/designSystemExtension/rich-text-editor/rich-text-editor.component.spec.ts +24 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/designSystemExtension/rich-text-editor/rich-text-editor.component.ts +89 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/rich-text/rich-text.component.html +20 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/rich-text/rich-text.component.scss +0 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/rich-text/rich-text.component.spec.ts +24 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/rich-text/rich-text.component.ts +131 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/widget/file-utility/file-utility.component.ts +21 -15
package/package.json
CHANGED
package/src/constants.js
CHANGED
|
@@ -300,6 +300,10 @@ export const COMPONENT_SCHEMA = {
|
|
|
300
300
|
name: 'Email',
|
|
301
301
|
value: 'Email'
|
|
302
302
|
},
|
|
303
|
+
{
|
|
304
|
+
name: 'Field Group',
|
|
305
|
+
value: 'Group'
|
|
306
|
+
},
|
|
303
307
|
{
|
|
304
308
|
name: 'Integer',
|
|
305
309
|
value: 'Integer'
|
|
@@ -704,6 +708,10 @@ export const COMPONENT_SCHEMA = {
|
|
|
704
708
|
name: 'Radio Buttons',
|
|
705
709
|
value: 'RadioButtons'
|
|
706
710
|
},
|
|
711
|
+
{
|
|
712
|
+
name: 'Rich Text',
|
|
713
|
+
value: 'RichText'
|
|
714
|
+
},
|
|
707
715
|
{
|
|
708
716
|
name: 'Scalar List',
|
|
709
717
|
value: 'ScalarList'
|
|
@@ -789,6 +797,10 @@ export const COMPONENT_SCHEMA = {
|
|
|
789
797
|
{
|
|
790
798
|
name: 'Pulse',
|
|
791
799
|
value: 'Pulse'
|
|
800
|
+
},
|
|
801
|
+
{
|
|
802
|
+
name: 'Rich Text Editor',
|
|
803
|
+
value: 'RichTextEditor'
|
|
792
804
|
}
|
|
793
805
|
],
|
|
794
806
|
infra: [
|
|
@@ -2,28 +2,28 @@ import { useState, useEffect } from 'react';
|
|
|
2
2
|
import { Checkbox, FormControl, FormControlLabel, FormGroup, FormHelperText } from '@material-ui/core';
|
|
3
3
|
|
|
4
4
|
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
5
|
-
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
6
5
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
7
6
|
import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
7
|
+
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
8
8
|
|
|
9
9
|
interface {{COMPONENT_CLASS_NAME}}Props extends Omit<PConnFieldProps, 'value'> {
|
|
10
10
|
// If any, enter additional props that only exist on this componentName
|
|
11
11
|
value?: boolean;
|
|
12
12
|
// eslint-disable-next-line react/no-unused-prop-types
|
|
13
13
|
caption?: string;
|
|
14
|
+
trueLabel?: string;
|
|
15
|
+
falseLabel?: string;
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
// Duplicated runtime code from React SDK
|
|
17
19
|
|
|
18
20
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
19
|
-
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
20
21
|
export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
21
22
|
// Get emitted components from map (so we can get any override that may exist)
|
|
22
23
|
const FieldValueList = getComponentFromMap('FieldValueList');
|
|
23
24
|
|
|
24
25
|
const {
|
|
25
26
|
getPConnect,
|
|
26
|
-
label,
|
|
27
27
|
value = false,
|
|
28
28
|
readOnly,
|
|
29
29
|
testId,
|
|
@@ -33,7 +33,9 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
33
33
|
helperText,
|
|
34
34
|
validatemessage,
|
|
35
35
|
displayMode,
|
|
36
|
-
hideLabel
|
|
36
|
+
hideLabel,
|
|
37
|
+
trueLabel,
|
|
38
|
+
falseLabel
|
|
37
39
|
} = props;
|
|
38
40
|
const helperTextToDisplay = validatemessage || helperText;
|
|
39
41
|
|
|
@@ -50,11 +52,11 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
50
52
|
}, [value]);
|
|
51
53
|
|
|
52
54
|
if (displayMode === 'LABELS_LEFT') {
|
|
53
|
-
return <FieldValueList name={hideLabel ? '' :
|
|
55
|
+
return <FieldValueList name={hideLabel ? '' : caption} value={value ? trueLabel : falseLabel} />;
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
if (displayMode === 'STACKED_LARGE_VAL') {
|
|
57
|
-
return <FieldValueList name={hideLabel ? '' :
|
|
59
|
+
return <FieldValueList name={hideLabel ? '' : caption} value={value ? trueLabel : falseLabel} variant='stacked' />;
|
|
58
60
|
}
|
|
59
61
|
|
|
60
62
|
const handleChange = event => {
|
|
@@ -62,7 +64,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
62
64
|
};
|
|
63
65
|
|
|
64
66
|
const handleBlur = event => {
|
|
65
|
-
thePConn.getValidationApi().validate(event.target.checked
|
|
67
|
+
thePConn.getValidationApi().validate(event.target.checked);
|
|
66
68
|
};
|
|
67
69
|
|
|
68
70
|
let theCheckbox = <Checkbox color='primary' disabled={disabled} />;
|
|
@@ -75,20 +77,20 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
75
77
|
|
|
76
78
|
return (
|
|
77
79
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
80
|
+
<FormControl required={required} error={status === 'error'}>
|
|
81
|
+
<FormGroup>
|
|
82
|
+
<FormControlLabel
|
|
83
|
+
control={theCheckbox}
|
|
84
|
+
checked={checked}
|
|
85
|
+
onChange={!readOnly ? handleChange : undefined}
|
|
86
|
+
onBlur={!readOnly ? handleBlur : undefined}
|
|
87
|
+
label={caption}
|
|
88
|
+
labelPlacement='end'
|
|
89
|
+
data-test-id={testId}
|
|
90
|
+
/>
|
|
91
|
+
</FormGroup>
|
|
92
|
+
<FormHelperText>{helperTextToDisplay}</FormHelperText>
|
|
93
|
+
</FormControl>
|
|
92
94
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
93
95
|
);
|
|
94
96
|
}
|
|
@@ -16,11 +16,9 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
|
16
16
|
// If any, enter additional props that only exist on this componentName
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
|
|
20
19
|
// Duplicated runtime code from React SDK
|
|
21
20
|
|
|
22
21
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
23
|
-
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
24
22
|
export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
25
23
|
// Get emitted components from map (so we can get any override that may exist)
|
|
26
24
|
const TextInput = getComponentFromMap('TextInput');
|
|
@@ -96,30 +94,30 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
96
94
|
return (
|
|
97
95
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
98
96
|
<MuiPickersUtilsProvider utils={DayjsUtils}>
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
97
|
+
<KeyboardDatePicker
|
|
98
|
+
disableToolbar
|
|
99
|
+
variant='inline'
|
|
100
|
+
inputVariant='outlined'
|
|
101
|
+
placeholder={dateFormatInfo.dateFormatStringLC}
|
|
102
|
+
format={dateFormatInfo.dateFormatString}
|
|
103
|
+
mask={dateFormatInfo.dateFormatMask}
|
|
104
|
+
fullWidth
|
|
105
|
+
autoOk
|
|
106
|
+
required={required}
|
|
107
|
+
disabled={disabled}
|
|
108
|
+
error={status === 'error'}
|
|
109
|
+
helperText={helperTextToDisplay}
|
|
110
|
+
size='small'
|
|
111
|
+
label={label}
|
|
112
|
+
value={value || null}
|
|
113
|
+
onChange={handleChange}
|
|
114
|
+
onBlur={!readOnly ? onBlur : undefined}
|
|
115
|
+
onAccept={handleAccept}
|
|
116
|
+
{{! pick new delimiters for mustache }}
|
|
117
|
+
{{=<% %>=}}
|
|
118
|
+
InputProps={{ ...testProp }}
|
|
119
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
120
|
+
/>
|
|
123
121
|
</MuiPickersUtilsProvider>
|
|
124
122
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
125
123
|
);
|
|
@@ -12,11 +12,9 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
|
12
12
|
// If any, enter additional props that only exist on this componentName
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
|
|
16
15
|
// Duplicated runtime code from React SDK
|
|
17
16
|
|
|
18
17
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
19
|
-
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
20
18
|
export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
21
19
|
// Get emitted components from map (so we can get any override that may exist)
|
|
22
20
|
const TextInput = getComponentFromMap('TextInput');
|
|
@@ -88,26 +86,26 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
88
86
|
return (
|
|
89
87
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
90
88
|
<MuiPickersUtilsProvider utils={DayjsUtils}>
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
89
|
+
<KeyboardDateTimePicker
|
|
90
|
+
variant='inline'
|
|
91
|
+
inputVariant='outlined'
|
|
92
|
+
fullWidth
|
|
93
|
+
autoOk
|
|
94
|
+
required={required}
|
|
95
|
+
disabled={disabled}
|
|
96
|
+
placeholder={`${dateFormatInfo.dateFormatStringLC} hh:mm a`}
|
|
97
|
+
format={`${dateFormatInfo.dateFormatString} hh:mm a`}
|
|
98
|
+
mask={`${dateFormatInfo.dateFormatMask} __:__ _m`}
|
|
99
|
+
minutesStep={5}
|
|
100
|
+
error={status === 'error'}
|
|
101
|
+
helperText={helperTextToDisplay}
|
|
102
|
+
size='small'
|
|
103
|
+
label={label}
|
|
104
|
+
value={value || null}
|
|
105
|
+
onChange={handleChange}
|
|
106
|
+
onAccept={handleAccept}
|
|
107
|
+
data-test-id={testId}
|
|
108
|
+
/>
|
|
111
109
|
</MuiPickersUtilsProvider>
|
|
112
110
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
113
111
|
);
|
|
@@ -20,7 +20,6 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
|
20
20
|
// Duplicated runtime code from React SDK
|
|
21
21
|
|
|
22
22
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
23
|
-
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
24
23
|
export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
25
24
|
// Get emitted components from map (so we can get any override that may exist)
|
|
26
25
|
const FieldValueList = getComponentFromMap('FieldValueList');
|
|
@@ -95,10 +94,10 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
95
94
|
type='text'
|
|
96
95
|
outputFormat='number'
|
|
97
96
|
textAlign='left'
|
|
98
|
-
{{! pick new delimiters for mustache }}
|
|
99
|
-
{{=<% %>=}}
|
|
97
|
+
{{! pick new delimiters for mustache }}
|
|
98
|
+
{{=<% %>=}}
|
|
100
99
|
InputProps={{ inputProps: { ...testProp } }}
|
|
101
|
-
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
100
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
102
101
|
currencySymbol=''
|
|
103
102
|
decimalCharacter={theCurrDec}
|
|
104
103
|
digitGroupSeparator={showGroupSeparators ? theCurrSep : ''}
|
|
@@ -19,7 +19,6 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
|
19
19
|
// Duplicated runtime code from React SDK
|
|
20
20
|
|
|
21
21
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
22
|
-
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
23
22
|
export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
24
23
|
// Get emitted components from map (so we can get any override that may exist)
|
|
25
24
|
const FieldValueList = getComponentFromMap('FieldValueList');
|
|
@@ -100,10 +99,10 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
100
99
|
type='text'
|
|
101
100
|
outputFormat='number'
|
|
102
101
|
textAlign='left'
|
|
103
|
-
{{! pick new delimiters for mustache }}
|
|
104
|
-
{{=<% %>=}}
|
|
102
|
+
{{! pick new delimiters for mustache }}
|
|
103
|
+
{{=<% %>=}}
|
|
105
104
|
InputProps={{ inputProps: { ...testProp } }}
|
|
106
|
-
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
105
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
107
106
|
currencySymbol={theCurrSym}
|
|
108
107
|
decimalCharacter={theCurrDec}
|
|
109
108
|
digitGroupSeparator={theCurrSep}
|
|
@@ -27,7 +27,6 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
30
|
-
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
31
30
|
export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
32
31
|
// Get emitted components from map (so we can get any override that may exist)
|
|
33
32
|
const TextInput = getComponentFromMap('TextInput');
|
|
@@ -90,10 +89,10 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
90
89
|
label={label}
|
|
91
90
|
value={value}
|
|
92
91
|
type='number'
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
{{! pick new delimiters for mustache }}
|
|
93
|
+
{{=<% %>=}}
|
|
95
94
|
inputProps={{ ...testProp }}
|
|
96
|
-
|
|
95
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
97
96
|
/>
|
|
98
97
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
99
98
|
);
|
|
@@ -11,7 +11,6 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
|
11
11
|
// Duplicated runtime code from React SDK
|
|
12
12
|
|
|
13
13
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
14
|
-
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
15
14
|
export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
16
15
|
// Get emitted components from map (so we can get any override that may exist)
|
|
17
16
|
const TextInput = getComponentFromMap('TextInput');
|
|
@@ -88,10 +87,10 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
88
87
|
label={label}
|
|
89
88
|
value={value}
|
|
90
89
|
type='text'
|
|
91
|
-
{{! pick new delimiters for mustache }}
|
|
92
|
-
{{=<% %>=}}
|
|
90
|
+
{{! pick new delimiters for mustache }}
|
|
91
|
+
{{=<% %>=}}
|
|
93
92
|
inputProps={{ inputMode: 'numeric', pattern: '[0-9]*', ...testProp }}
|
|
94
|
-
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
93
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
95
94
|
/>
|
|
96
95
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
97
96
|
);
|
|
@@ -62,7 +62,6 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
|
62
62
|
// Duplicated runtime code from React SDK
|
|
63
63
|
|
|
64
64
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
65
|
-
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
66
65
|
export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
67
66
|
// Get emitted components from map (so we can get any override that may exist)
|
|
68
67
|
const FieldValueList = getComponentFromMap('FieldValueList');
|
|
@@ -226,10 +225,10 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
226
225
|
label={label}
|
|
227
226
|
value={value === '' && !readOnly ? placeholder : value}
|
|
228
227
|
select
|
|
229
|
-
{{! pick new delimiters for mustache }}
|
|
230
|
-
{{=<% %>=}}
|
|
228
|
+
{{! pick new delimiters for mustache }}
|
|
229
|
+
{{=<% %>=}}
|
|
231
230
|
InputProps={{ ...readOnlyProp, ...testProp }}
|
|
232
|
-
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
231
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
233
232
|
>
|
|
234
233
|
{options.map((option: any) => (
|
|
235
234
|
<MenuItem key={option.key} value={option.key}>
|
|
@@ -55,7 +55,6 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
|
55
55
|
// Duplicated runtime code from React SDK
|
|
56
56
|
|
|
57
57
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
58
|
-
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
59
58
|
export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
60
59
|
// Get emitted components from map (so we can get any override that may exist)
|
|
61
60
|
const TextInput = getComponentFromMap('TextInput');
|
|
@@ -192,37 +191,37 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
192
191
|
// key/value structure to what Autocomplete expects
|
|
193
192
|
return (
|
|
194
193
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
{{! pick new delimiters for mustache }}
|
|
198
|
-
{{=<% %>=}}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
194
|
+
<Autocomplete
|
|
195
|
+
options={options}
|
|
196
|
+
{{! pick new delimiters for mustache }}
|
|
197
|
+
{{=<% %>=}}
|
|
198
|
+
getOptionLabel={(option: IOption) => {
|
|
199
|
+
return option.value ? option.value : '';
|
|
200
|
+
}}
|
|
201
|
+
getOptionSelected={(option: any) => {
|
|
202
|
+
return option.value ? option.value : '';
|
|
203
|
+
}}
|
|
204
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
205
|
+
fullWidth
|
|
206
|
+
onChange={handleChange}
|
|
207
|
+
value={selectedValue}
|
|
208
|
+
inputValue={inputValue || selectedValue}
|
|
209
|
+
onInputChange={handleInputValue}
|
|
210
|
+
renderInput={params => (
|
|
211
|
+
<TextField
|
|
212
|
+
{...params}
|
|
213
|
+
fullWidth
|
|
214
|
+
variant='outlined'
|
|
215
|
+
helperText={helperTextToDisplay}
|
|
216
|
+
placeholder={placeholder}
|
|
217
|
+
size='small'
|
|
218
|
+
required={required}
|
|
219
|
+
error={status === 'error'}
|
|
220
|
+
label={label}
|
|
221
|
+
data-test-id={testId}
|
|
222
|
+
/>
|
|
223
|
+
)}
|
|
224
|
+
/>
|
|
226
225
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
227
226
|
);
|
|
228
227
|
}
|
|
@@ -17,7 +17,6 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
|
17
17
|
// Duplicated runtime code from React SDK
|
|
18
18
|
|
|
19
19
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
20
|
-
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
21
20
|
export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
22
21
|
// Get emitted components from map (so we can get any override that may exist)
|
|
23
22
|
const FieldValueList = getComponentFromMap('FieldValueList');
|
|
@@ -97,27 +96,27 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
97
96
|
|
|
98
97
|
return (
|
|
99
98
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
99
|
+
<FormControl error={status === 'error'} required={required}>
|
|
100
|
+
<FormLabel component='legend'>{label}</FormLabel>
|
|
101
|
+
<RadioGroup value={theSelectedButton} onChange={handleChange} onBlur={!readOnly ? handleBlur : undefined} row={inline}>
|
|
102
|
+
{theOptions.map(theOption => {
|
|
103
|
+
return (
|
|
104
|
+
<FormControlLabel
|
|
105
|
+
value={theOption.key}
|
|
106
|
+
key={theOption.key}
|
|
107
|
+
label={thePConn.getLocalizedValue(
|
|
108
|
+
theOption.value,
|
|
109
|
+
localePath,
|
|
110
|
+
// @ts-ignore - Property 'getLocaleRuleNameFromKeys' is private and only accessible within class 'C11nEnv'
|
|
111
|
+
thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)
|
|
112
|
+
)}
|
|
113
|
+
control={<Radio key={theOption.key} color='primary' disabled={readOnly} />}
|
|
114
|
+
/>
|
|
115
|
+
);
|
|
116
|
+
})}
|
|
117
|
+
</RadioGroup>
|
|
118
|
+
<FormHelperText>{helperTextToDisplay}</FormHelperText>
|
|
119
|
+
</FormControl>
|
|
120
|
+
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
122
121
|
);
|
|
123
122
|
}
|
|
@@ -14,7 +14,6 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
|
14
14
|
// Duplicated runtime code from React SDK
|
|
15
15
|
|
|
16
16
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
17
|
-
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
18
17
|
export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
19
18
|
// Get emitted components from map (so we can get any override that may exist)
|
|
20
19
|
const FieldValueList = getComponentFromMap('FieldValueList');
|
|
@@ -81,24 +80,24 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
81
80
|
|
|
82
81
|
return (
|
|
83
82
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
{{! pick new delimiters for mustache }}
|
|
98
|
-
{{=<% %>=}}
|
|
99
|
-
|
|
100
|
-
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
101
|
-
|
|
83
|
+
<TextField
|
|
84
|
+
fullWidth
|
|
85
|
+
variant={readOnly ? 'standard' : 'outlined'}
|
|
86
|
+
helperText={helperTextToDisplay}
|
|
87
|
+
placeholder={placeholder ?? ''}
|
|
88
|
+
size='small'
|
|
89
|
+
required={required}
|
|
90
|
+
disabled={disabled}
|
|
91
|
+
onChange={handleChange}
|
|
92
|
+
onBlur={!readOnly ? handleBlur : undefined}
|
|
93
|
+
error={status === 'error'}
|
|
94
|
+
label={label}
|
|
95
|
+
value={inputValue}
|
|
96
|
+
{{! pick new delimiters for mustache }}
|
|
97
|
+
{{=<% %>=}}
|
|
98
|
+
InputProps={{ ...readOnlyProp, inputProps: { maxLength, ...testProp } }}
|
|
99
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
100
|
+
/>
|
|
102
101
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
103
102
|
);
|
|
104
103
|
}
|
|
@@ -12,7 +12,6 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
|
12
12
|
// Duplicated runtime code from React SDK
|
|
13
13
|
|
|
14
14
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
15
|
-
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
16
15
|
export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
17
16
|
// Get emitted components from map (so we can get any override that may exist)
|
|
18
17
|
const TextInput = getComponentFromMap('TextInput');
|
|
@@ -56,32 +55,32 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
56
55
|
|
|
57
56
|
return (
|
|
58
57
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
{{! pick new delimiters for mustache }}
|
|
74
|
-
{{=<% %>=}}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
84
|
-
|
|
58
|
+
<TextField
|
|
59
|
+
fullWidth
|
|
60
|
+
variant='outlined'
|
|
61
|
+
helperText={helperTextToDisplay}
|
|
62
|
+
placeholder={placeholder ?? ''}
|
|
63
|
+
size='small'
|
|
64
|
+
required={required}
|
|
65
|
+
disabled={disabled}
|
|
66
|
+
onChange={onChange}
|
|
67
|
+
onBlur={!readOnly ? onBlur : undefined}
|
|
68
|
+
error={status === 'error'}
|
|
69
|
+
label={label}
|
|
70
|
+
value={value}
|
|
71
|
+
type='email'
|
|
72
|
+
{{! pick new delimiters for mustache }}
|
|
73
|
+
{{=<% %>=}}
|
|
74
|
+
InputProps={{
|
|
75
|
+
startAdornment: (
|
|
76
|
+
<InputAdornment position='start'>
|
|
77
|
+
<MailOutlineIcon />
|
|
78
|
+
</InputAdornment>
|
|
79
|
+
),
|
|
80
|
+
inputProps: { ...testProp }
|
|
81
|
+
}}
|
|
82
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
83
|
+
/>
|
|
85
84
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
86
85
|
);
|
|
87
86
|
}
|