@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
|
@@ -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
|
}
|
|
@@ -13,7 +13,6 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
|
13
13
|
// Duplicated runtime code from React SDK
|
|
14
14
|
|
|
15
15
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
16
|
-
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
17
16
|
export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
18
17
|
// Get emitted components from map (so we can get any override that may exist)
|
|
19
18
|
const FieldValueList = getComponentFromMap('FieldValueList');
|
|
@@ -63,27 +62,27 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
63
62
|
|
|
64
63
|
return (
|
|
65
64
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
{{! pick new delimiters for mustache }}
|
|
83
|
-
{{=<% %>=}}
|
|
84
|
-
|
|
85
|
-
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
86
|
-
|
|
65
|
+
<TextField
|
|
66
|
+
multiline
|
|
67
|
+
minRows={5}
|
|
68
|
+
maxRows={5}
|
|
69
|
+
fullWidth
|
|
70
|
+
variant={readOnly ? 'standard' : 'outlined'}
|
|
71
|
+
helperText={helperTextToDisplay}
|
|
72
|
+
placeholder={placeholder ?? ''}
|
|
73
|
+
size='small'
|
|
74
|
+
required={required}
|
|
75
|
+
disabled={disabled}
|
|
76
|
+
onChange={onChange}
|
|
77
|
+
onBlur={!readOnly ? onBlur : undefined}
|
|
78
|
+
error={status === 'error'}
|
|
79
|
+
label={label}
|
|
80
|
+
value={value}
|
|
81
|
+
{{! pick new delimiters for mustache }}
|
|
82
|
+
{{=<% %>=}}
|
|
83
|
+
InputProps={{ ...readOnlyProp, inputProps: { maxLength, ...testProp } }}
|
|
84
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
85
|
+
/>
|
|
87
86
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
88
87
|
);
|
|
89
88
|
}
|
|
@@ -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 FieldValueList = getComponentFromMap('FieldValueList');
|
|
@@ -54,26 +53,26 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
54
53
|
return (
|
|
55
54
|
<div>
|
|
56
55
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
56
|
+
<MuiPhoneNumber
|
|
57
|
+
fullWidth
|
|
58
|
+
helperText={helperTextToDisplay}
|
|
59
|
+
placeholder={placeholder ?? ''}
|
|
60
|
+
size='small'
|
|
61
|
+
required={required}
|
|
62
|
+
disabled={disabled}
|
|
63
|
+
onChange={onChange}
|
|
64
|
+
error={status === 'error'}
|
|
65
|
+
label={label}
|
|
66
|
+
value={value}
|
|
67
|
+
{{! pick new delimiters for mustache }}
|
|
68
|
+
{{=<% %>=}}
|
|
69
|
+
InputProps={{
|
|
70
|
+
readOnly: true,
|
|
71
|
+
inputProps: { ...testProp }
|
|
72
|
+
}}
|
|
73
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
74
|
+
disableDropdown={disableDropdown}
|
|
75
|
+
/>
|
|
77
76
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
78
77
|
</div>
|
|
79
78
|
);
|
|
@@ -93,25 +92,25 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
93
92
|
|
|
94
93
|
return (
|
|
95
94
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
{{! pick new delimiters for mustache }}
|
|
111
|
-
{{=<% %>=}}
|
|
112
|
-
|
|
113
|
-
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
114
|
-
|
|
95
|
+
<MuiPhoneNumber
|
|
96
|
+
fullWidth
|
|
97
|
+
variant='outlined'
|
|
98
|
+
helperText={helperTextToDisplay}
|
|
99
|
+
placeholder={placeholder ?? ''}
|
|
100
|
+
size='small'
|
|
101
|
+
defaultCountry='us'
|
|
102
|
+
required={required}
|
|
103
|
+
disabled={disabled}
|
|
104
|
+
onChange={handleChange}
|
|
105
|
+
onBlur={!readOnly ? handleBlur : undefined}
|
|
106
|
+
error={status === 'error'}
|
|
107
|
+
label={label}
|
|
108
|
+
value={value}
|
|
109
|
+
{{! pick new delimiters for mustache }}
|
|
110
|
+
{{=<% %>=}}
|
|
111
|
+
InputProps={{ ...testProp }}
|
|
112
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
113
|
+
/>
|
|
115
114
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
116
115
|
);
|
|
117
116
|
}
|
|
@@ -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 FieldValueList = getComponentFromMap('FieldValueList');
|
|
@@ -55,25 +54,25 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
55
54
|
|
|
56
55
|
return (
|
|
57
56
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
57
|
+
<TextField
|
|
58
|
+
type='url'
|
|
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
|
+
{{! pick new delimiters for mustache }}
|
|
72
|
+
{{=<% %>=}}
|
|
73
|
+
InputProps={{ inputProps: { ...testProp } }}
|
|
74
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
75
|
+
/>
|
|
77
76
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
78
77
|
);
|
|
79
78
|
}
|
|
@@ -15,7 +15,6 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
|
15
15
|
// Duplicated runtime code from React SDK
|
|
16
16
|
|
|
17
17
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
18
|
-
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
19
18
|
export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
20
19
|
// Get emitted components from map (so we can get any override that may exist)
|
|
21
20
|
const FieldValueList = getComponentFromMap('FieldValueList');
|
|
@@ -79,10 +78,10 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
79
78
|
format='hh:mm a'
|
|
80
79
|
value={timeValue}
|
|
81
80
|
onChange={handleChange}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
{{! pick new delimiters for mustache }}
|
|
82
|
+
{{=<% %>=}}
|
|
83
|
+
InputProps={{ inputProps: { ...testProp } }}
|
|
84
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
86
85
|
/>
|
|
87
86
|
</MuiPickersUtilsProvider>
|
|
88
87
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
@@ -15,7 +15,6 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnProps {
|
|
|
15
15
|
}
|
|
16
16
|
// Duplicated runtime code from React SDK
|
|
17
17
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
18
|
-
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
19
18
|
export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
20
19
|
// Get emitted components from map (so we can get any override that may exist)
|
|
21
20
|
const FieldGroup = getComponentFromMap('FieldGroup');
|
|
@@ -55,28 +54,28 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
55
54
|
}
|
|
56
55
|
|
|
57
56
|
return (
|
|
58
|
-
|
|
59
|
-
{{! pick new delimiters for mustache }}
|
|
60
|
-
{{=<% %>=}}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
57
|
+
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
58
|
+
{{! pick new delimiters for mustache }}
|
|
59
|
+
{{=<% %>=}}
|
|
60
|
+
<FieldGroup name={propsToUse.showLabel ? propsToUse.label : ''}>
|
|
61
|
+
{showHighlightedData && highlightedDataArr.length > 0 && (
|
|
62
|
+
<Grid container spacing={1} style={{ padding: '0 0 1em' }}>
|
|
63
|
+
{highlightedDataArr.map((child, i) => (
|
|
64
|
+
<Grid item xs={12} key={`hf-${i + 1}`}>
|
|
65
|
+
{child}
|
|
66
|
+
</Grid>
|
|
67
|
+
))}
|
|
68
|
+
</Grid>
|
|
69
|
+
)}
|
|
70
|
+
<Grid container spacing={1}>
|
|
71
|
+
{children.map((child, i) => (
|
|
72
|
+
<Grid item xs={12} key={`r-${i + 1}`}>
|
|
66
73
|
{child}
|
|
67
74
|
</Grid>
|
|
68
75
|
))}
|
|
69
76
|
</Grid>
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
{children.map((child, i) => (
|
|
73
|
-
<Grid item xs={12} key={`r-${i + 1}`}>
|
|
74
|
-
{child}
|
|
75
|
-
</Grid>
|
|
76
|
-
))}
|
|
77
|
-
</Grid>
|
|
78
|
-
</FieldGroup>
|
|
79
|
-
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
77
|
+
</FieldGroup>
|
|
78
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
80
79
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
81
80
|
);
|
|
82
|
-
}
|
|
81
|
+
}
|
|
@@ -15,7 +15,6 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnProps {
|
|
|
15
15
|
}
|
|
16
16
|
// Duplicated runtime code from React SDK
|
|
17
17
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
18
|
-
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
19
18
|
export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
20
19
|
// Get emitted components from map (so we can get any override that may exist)
|
|
21
20
|
const FieldGroup = getComponentFromMap('FieldGroup');
|
|
@@ -55,28 +54,28 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
55
54
|
}
|
|
56
55
|
|
|
57
56
|
return (
|
|
58
|
-
|
|
59
|
-
{{! pick new delimiters for mustache }}
|
|
60
|
-
{{=<% %>=}}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
57
|
+
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
58
|
+
{{! pick new delimiters for mustache }}
|
|
59
|
+
{{=<% %>=}}
|
|
60
|
+
<FieldGroup name={propsToUse.showLabel ? propsToUse.label : ''}>
|
|
61
|
+
{showHighlightedData && highlightedDataArr.length > 0 && (
|
|
62
|
+
<Grid container spacing={1} style={{ padding: '0 0 1em' }}>
|
|
63
|
+
{highlightedDataArr.map((child, i) => (
|
|
64
|
+
<Grid item xs={6} key={`hf-${i + 1}`}>
|
|
65
|
+
{child}
|
|
66
|
+
</Grid>
|
|
67
|
+
))}
|
|
68
|
+
</Grid>
|
|
69
|
+
)}
|
|
70
|
+
<Grid container spacing={1}>
|
|
71
|
+
{children.map((child, i) => (
|
|
72
|
+
<Grid item xs={6} key={`r-${i + 1}`}>
|
|
66
73
|
{child}
|
|
67
74
|
</Grid>
|
|
68
75
|
))}
|
|
69
76
|
</Grid>
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
{children.map((child, i) => (
|
|
73
|
-
<Grid item xs={6} key={`r-${i + 1}`}>
|
|
74
|
-
{child}
|
|
75
|
-
</Grid>
|
|
76
|
-
))}
|
|
77
|
-
</Grid>
|
|
78
|
-
</FieldGroup>
|
|
79
|
-
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
77
|
+
</FieldGroup>
|
|
78
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
80
79
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
81
80
|
);
|
|
82
|
-
}
|
|
81
|
+
}
|
|
@@ -25,7 +25,6 @@ const Child = connectToState(mapStateToProps)(props => {
|
|
|
25
25
|
// Duplicated runtime code from React SDK
|
|
26
26
|
|
|
27
27
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
28
|
-
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
29
28
|
export default function {{COMPONENT_CLASS_NAME}}(props: PropsWithChildren<{{COMPONENT_CLASS_NAME}}Props>) {
|
|
30
29
|
const { getPConnect, NumCols = '1' } = props;
|
|
31
30
|
const instructions = getInstructions(getPConnect(), props.instructions);
|
|
@@ -63,11 +62,11 @@ export default function {{COMPONENT_CLASS_NAME}}(props: PropsWithChildren<{{COMP
|
|
|
63
62
|
<div className='psdk-default-form-instruction-text'>
|
|
64
63
|
{/* server performs sanitization method for instructions html content */}
|
|
65
64
|
{/* eslint-disable react/no-danger */}
|
|
66
|
-
<div key='instructions' id='instruction-text'
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
dangerouslySetInnerHTML={{ __html: instructions }}
|
|
70
|
-
|
|
65
|
+
<div key='instructions' id='instruction-text'
|
|
66
|
+
{{! pick new delimiters for mustache }}
|
|
67
|
+
{{=<% %>=}}
|
|
68
|
+
dangerouslySetInnerHTML={{ __html: instructions }}
|
|
69
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
71
70
|
/>
|
|
72
71
|
</div>
|
|
73
72
|
)}
|
|
@@ -75,4 +74,4 @@ export default function {{COMPONENT_CLASS_NAME}}(props: PropsWithChildren<{{COMP
|
|
|
75
74
|
</>
|
|
76
75
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
77
76
|
);
|
|
78
|
-
}
|
|
77
|
+
}
|
|
@@ -21,7 +21,6 @@ const useStyles = makeStyles(() => ({
|
|
|
21
21
|
// Duplicated runtime code from React SDK
|
|
22
22
|
|
|
23
23
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
24
|
-
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
25
24
|
export default function {{COMPONENT_CLASS_NAME}}(props: PropsWithChildren<{{COMPONENT_CLASS_NAME}}Props>) {
|
|
26
25
|
const classes = useStyles();
|
|
27
26
|
|
|
@@ -50,14 +49,14 @@ export default function {{COMPONENT_CLASS_NAME}}(props: PropsWithChildren<{{COMP
|
|
|
50
49
|
|
|
51
50
|
return (
|
|
52
51
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
<Grid container spacing={1}>
|
|
53
|
+
<Grid item xs={12} md={aSize} className={classes.colStyles}>
|
|
54
|
+
{childrenToRender[0]}
|
|
55
|
+
</Grid>
|
|
56
|
+
<Grid item xs={12} md={bSize} className={classes.colStyles}>
|
|
57
|
+
{childrenToRender[1]}
|
|
58
|
+
</Grid>
|
|
56
59
|
</Grid>
|
|
57
|
-
<Grid item xs={12} md={bSize} className={classes.colStyles}>
|
|
58
|
-
{childrenToRender[1]}
|
|
59
|
-
</Grid>
|
|
60
|
-
</Grid>
|
|
61
60
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
62
61
|
);
|
|
63
|
-
}
|
|
62
|
+
}
|
|
@@ -14,16 +14,15 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnProps {
|
|
|
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 OneColumn = getComponentFromMap('OneColumn');
|
|
21
20
|
|
|
22
21
|
return (
|
|
23
22
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
<OneColumn
|
|
24
|
+
{...props}
|
|
25
|
+
/>
|
|
27
26
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
28
27
|
);
|
|
29
|
-
}
|
|
28
|
+
}
|
|
@@ -39,7 +39,6 @@ const StyledTableCell = withStyles((theme: Theme) =>
|
|
|
39
39
|
// Case widget example is a "history table"
|
|
40
40
|
|
|
41
41
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
42
|
-
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
43
42
|
export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
44
43
|
const { getPConnect } = props;
|
|
45
44
|
const thePConn = getPConnect();
|
|
@@ -164,15 +163,15 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
164
163
|
}
|
|
165
164
|
|
|
166
165
|
return (
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
166
|
+
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
167
|
+
<div id='CaseHistory'>
|
|
168
|
+
<TableContainer>
|
|
169
|
+
<Table>
|
|
170
|
+
<TableHead>{getTableHeader()}</TableHead>
|
|
171
|
+
<TableBody>{getTableData()}</TableBody>
|
|
172
|
+
</Table>
|
|
173
|
+
</TableContainer>
|
|
174
|
+
</div>
|
|
176
175
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
177
176
|
);
|
|
178
|
-
}
|
|
177
|
+
}
|
|
@@ -25,7 +25,6 @@ const useStyles = makeStyles(theme => ({
|
|
|
25
25
|
// Page Widget example is the "App Announcment"
|
|
26
26
|
|
|
27
27
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
28
|
-
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
29
28
|
export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
30
29
|
const { header = '', description = '', datasource = [], whatsnewlink = '' } = props;
|
|
31
30
|
let details = [];
|
|
@@ -42,28 +41,28 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
42
41
|
};
|
|
43
42
|
|
|
44
43
|
return (
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
44
|
+
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
45
|
+
<Card title='AppAnnouncement' className={classes.root}>
|
|
46
|
+
<CardHeader title={<Typography variant='h6'>{header}</Typography>} />
|
|
47
|
+
<CardContent>
|
|
48
|
+
<Typography variant='body1' gutterBottom>
|
|
49
|
+
{description}
|
|
50
|
+
</Typography>
|
|
51
|
+
{details.map((itm, idx) => {
|
|
52
|
+
const theKey = `AppAnn-item-${idx}`;
|
|
53
|
+
return (
|
|
54
|
+
<Typography key={theKey} variant='body2'>
|
|
55
|
+
- {itm}
|
|
56
|
+
</Typography>
|
|
57
|
+
);
|
|
58
|
+
})}
|
|
59
|
+
</CardContent>
|
|
60
|
+
<CardActions>
|
|
61
|
+
<Button color='primary' onClick={handleClick} size='small'>
|
|
62
|
+
See what's new
|
|
63
|
+
</Button>
|
|
64
|
+
</CardActions>
|
|
65
|
+
</Card>
|
|
67
66
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
68
67
|
);
|
|
69
|
-
}
|
|
68
|
+
}
|