@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.
Files changed (46) hide show
  1. package/package.json +1 -1
  2. package/src/constants.js +12 -0
  3. package/src/tasks/create/templates/SDK-React/field/Boolean/index.tsx.mustache +23 -21
  4. package/src/tasks/create/templates/SDK-React/field/Date/index.tsx.mustache +24 -26
  5. package/src/tasks/create/templates/SDK-React/field/DateTime/index.tsx.mustache +20 -22
  6. package/src/tasks/create/templates/SDK-React/field/Decimal/index.tsx.mustache +3 -4
  7. package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/index.tsx.mustache +3 -4
  8. package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/index.tsx.mustache +3 -4
  9. package/src/tasks/create/templates/SDK-React/field/Integer/index.tsx.mustache +3 -4
  10. package/src/tasks/create/templates/SDK-React/field/Picklist/index.tsx.mustache +3 -4
  11. package/src/tasks/create/templates/SDK-React/field/Picklist-Autocomplete/index.tsx.mustache +31 -32
  12. package/src/tasks/create/templates/SDK-React/field/Picklist-RadioButtons/index.tsx.mustache +22 -23
  13. package/src/tasks/create/templates/SDK-React/field/Text/index.tsx.mustache +18 -19
  14. package/src/tasks/create/templates/SDK-React/field/Text-Email/index.tsx.mustache +26 -27
  15. package/src/tasks/create/templates/SDK-React/field/Text-Input/index.tsx.mustache +18 -19
  16. package/src/tasks/create/templates/SDK-React/field/Text-Paragraph/index.tsx.mustache +21 -22
  17. package/src/tasks/create/templates/SDK-React/field/Text-Phone/index.tsx.mustache +39 -40
  18. package/src/tasks/create/templates/SDK-React/field/Text-URL/index.tsx.mustache +19 -20
  19. package/src/tasks/create/templates/SDK-React/field/TimeOfDay/index.tsx.mustache +4 -5
  20. package/src/tasks/create/templates/SDK-React/template/DETAILS/index.tsx.mustache +19 -20
  21. package/src/tasks/create/templates/SDK-React/template/DETAILS-region/index.tsx.mustache +19 -20
  22. package/src/tasks/create/templates/SDK-React/template/FORM/index.tsx.mustache +6 -7
  23. package/src/tasks/create/templates/SDK-React/template/FORM-region/index.tsx.mustache +8 -9
  24. package/src/tasks/create/templates/SDK-React/template/PAGE/index.tsx.mustache +4 -5
  25. package/src/tasks/create/templates/SDK-React/widget/CASE/index.tsx.mustache +10 -11
  26. package/src/tasks/create/templates/SDK-React/widget/PAGE/index.tsx.mustache +23 -24
  27. package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/index.tsx.mustache +37 -37
  28. package/src/tasks/validator/index.js +52 -47
  29. package/tests/assets/sdk-a/components/create/override-sdk/designSystemExtension/rich-text-editor/rich-text-editor.component.html +33 -0
  30. package/tests/assets/sdk-a/components/create/override-sdk/designSystemExtension/rich-text-editor/rich-text-editor.component.scss +19 -0
  31. package/tests/assets/sdk-a/components/create/override-sdk/designSystemExtension/rich-text-editor/rich-text-editor.component.spec.ts +24 -0
  32. package/tests/assets/sdk-a/components/create/override-sdk/designSystemExtension/rich-text-editor/rich-text-editor.component.ts +89 -0
  33. package/tests/assets/sdk-a/components/create/override-sdk/field/rich-text/rich-text.component.html +20 -0
  34. package/tests/assets/sdk-a/components/create/override-sdk/field/rich-text/rich-text.component.scss +0 -0
  35. package/tests/assets/sdk-a/components/create/override-sdk/field/rich-text/rich-text.component.spec.ts +24 -0
  36. package/tests/assets/sdk-a/components/create/override-sdk/field/rich-text/rich-text.component.ts +131 -0
  37. package/tests/assets/sdk-a/components/create/override-sdk/widget/file-utility/file-utility.component.ts +21 -15
  38. package/tests/assets/sdk-a/components/createAll/override-sdk/designSystemExtension/rich-text-editor/rich-text-editor.component.html +33 -0
  39. package/tests/assets/sdk-a/components/createAll/override-sdk/designSystemExtension/rich-text-editor/rich-text-editor.component.scss +19 -0
  40. package/tests/assets/sdk-a/components/createAll/override-sdk/designSystemExtension/rich-text-editor/rich-text-editor.component.spec.ts +24 -0
  41. package/tests/assets/sdk-a/components/createAll/override-sdk/designSystemExtension/rich-text-editor/rich-text-editor.component.ts +89 -0
  42. package/tests/assets/sdk-a/components/createAll/override-sdk/field/rich-text/rich-text.component.html +20 -0
  43. package/tests/assets/sdk-a/components/createAll/override-sdk/field/rich-text/rich-text.component.scss +0 -0
  44. package/tests/assets/sdk-a/components/createAll/override-sdk/field/rich-text/rich-text.component.spec.ts +24 -0
  45. package/tests/assets/sdk-a/components/createAll/override-sdk/field/rich-text/rich-text.component.ts +131 -0
  46. 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
- <TextField
85
- fullWidth
86
- variant={readOnly ? 'standard' : 'outlined'}
87
- helperText={helperTextToDisplay}
88
- placeholder={placeholder ?? ''}
89
- size='small'
90
- required={required}
91
- disabled={disabled}
92
- onChange={handleChange}
93
- onBlur={!readOnly ? handleBlur : undefined}
94
- error={status === 'error'}
95
- label={label}
96
- value={inputValue}
97
- {{! pick new delimiters for mustache }}
98
- {{=<% %>=}}
99
- InputProps={{ ...readOnlyProp, inputProps: { maxLength, ...testProp } }}
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
- <TextField
67
- multiline
68
- minRows={5}
69
- maxRows={5}
70
- fullWidth
71
- variant={readOnly ? 'standard' : 'outlined'}
72
- helperText={helperTextToDisplay}
73
- placeholder={placeholder ?? ''}
74
- size='small'
75
- required={required}
76
- disabled={disabled}
77
- onChange={onChange}
78
- onBlur={!readOnly ? onBlur : undefined}
79
- error={status === 'error'}
80
- label={label}
81
- value={value}
82
- {{! pick new delimiters for mustache }}
83
- {{=<% %>=}}
84
- InputProps={{ ...readOnlyProp, inputProps: { maxLength, ...testProp } }}
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
- <MuiPhoneNumber
58
- fullWidth
59
- helperText={helperTextToDisplay}
60
- placeholder={placeholder ?? ''}
61
- size='small'
62
- required={required}
63
- disabled={disabled}
64
- onChange={onChange}
65
- error={status === 'error'}
66
- label={label}
67
- value={value}
68
- {{! pick new delimiters for mustache }}
69
- {{=<% %>=}}
70
- InputProps={{
71
- readOnly: true,
72
- inputProps: { ...testProp }
73
- }}
74
- <%={{ }}=%> {{! revert delimiters for mustache }}
75
- disableDropdown={disableDropdown}
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
- <MuiPhoneNumber
97
- fullWidth
98
- variant='outlined'
99
- helperText={helperTextToDisplay}
100
- placeholder={placeholder ?? ''}
101
- size='small'
102
- defaultCountry='us'
103
- required={required}
104
- disabled={disabled}
105
- onChange={handleChange}
106
- onBlur={!readOnly ? handleBlur : undefined}
107
- error={status === 'error'}
108
- label={label}
109
- value={value}
110
- {{! pick new delimiters for mustache }}
111
- {{=<% %>=}}
112
- InputProps={{ ...testProp }}
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
- <TextField
59
- type='url'
60
- fullWidth
61
- variant='outlined'
62
- helperText={helperTextToDisplay}
63
- placeholder={placeholder ?? ''}
64
- size='small'
65
- required={required}
66
- disabled={disabled}
67
- onChange={onChange}
68
- onBlur={!readOnly ? onBlur : undefined}
69
- error={status === 'error'}
70
- label={label}
71
- value={value}
72
- {{! pick new delimiters for mustache }}
73
- {{=<% %>=}}
74
- InputProps={{ inputProps: { ...testProp } }}
75
- <%={{ }}=%> {{! revert delimiters for mustache }}
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
- {{! pick new delimiters for mustache }}
83
- {{=<% %>=}}
84
- InputProps={{ inputProps: { ...testProp } }}
85
- <%={{ }}=%> {{! revert delimiters for mustache }}
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
- <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
59
- {{! pick new delimiters for mustache }}
60
- {{=<% %>=}}
61
- <FieldGroup name={propsToUse.showLabel ? propsToUse.label : ''}>
62
- {showHighlightedData && highlightedDataArr.length > 0 && (
63
- <Grid container spacing={1} style={{ padding: '0 0 1em' }}>
64
- {highlightedDataArr.map((child, i) => (
65
- <Grid item xs={12} key={`hf-${i + 1}`}>
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
- <Grid container spacing={1}>
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
- <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
59
- {{! pick new delimiters for mustache }}
60
- {{=<% %>=}}
61
- <FieldGroup name={propsToUse.showLabel ? propsToUse.label : ''}>
62
- {showHighlightedData && highlightedDataArr.length > 0 && (
63
- <Grid container spacing={1} style={{ padding: '0 0 1em' }}>
64
- {highlightedDataArr.map((child, i) => (
65
- <Grid item xs={6} key={`hf-${i + 1}`}>
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
- <Grid container spacing={1}>
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
- {{! pick new delimiters for mustache }}
68
- {{=<% %>=}}
69
- dangerouslySetInnerHTML={{ __html: instructions }}
70
- <%={{ }}=%> {{! revert delimiters for mustache }}
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
- <Grid container spacing={1}>
54
- <Grid item xs={12} md={aSize} className={classes.colStyles}>
55
- {childrenToRender[0]}
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
- <OneColumn
25
- {...props}
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
- <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
168
- <div id='CaseHistory'>
169
- <TableContainer>
170
- <Table>
171
- <TableHead>{getTableHeader()}</TableHead>
172
- <TableBody>{getTableData()}</TableBody>
173
- </Table>
174
- </TableContainer>
175
- </div>
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
- <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
46
- <Card title='AppAnnouncement' className={classes.root}>
47
- <CardHeader title={<Typography variant='h6'>{header}</Typography>} />
48
- <CardContent>
49
- <Typography variant='body1' gutterBottom>
50
- {description}
51
- </Typography>
52
- {details.map((itm, idx) => {
53
- const theKey = `AppAnn-item-${idx}`;
54
- return (
55
- <Typography key={theKey} variant='body2'>
56
- - {itm}
57
- </Typography>
58
- );
59
- })}
60
- </CardContent>
61
- <CardActions>
62
- <Button color='primary' onClick={handleClick} size='small'>
63
- See what&apos;s new
64
- </Button>
65
- </CardActions>
66
- </Card>
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&apos;s new
63
+ </Button>
64
+ </CardActions>
65
+ </Card>
67
66
  </Styled{{COMPONENT_CLASS_NAME}}Wrapper>
68
67
  );
69
- }
68
+ }