@pega/dx-component-builder-sdk 0.23.13 → 0.23.15
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 +20 -0
- package/src/tasks/create/templates/SDK-Angular/field/Boolean/boolean.component.html.mustache +5 -1
- package/src/tasks/create/templates/SDK-Angular/field/Boolean/boolean.component.ts.mustache +6 -0
- package/src/tasks/create/templates/SDK-Angular/field/Date/date.component.html.mustache +5 -1
- package/src/tasks/create/templates/SDK-Angular/field/Date/date.component.ts.mustache +7 -0
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS/details.component.ts.mustache +2 -1
- package/src/tasks/create/templates/SDK-Angular/template/FORM/form.component.scss.mustache +14 -5
- package/src/tasks/create/templates/SDK-React/field/Boolean/demo.stories.tsx.mustache +8 -4
- package/src/tasks/create/templates/SDK-React/field/Boolean/index.tsx.mustache +23 -21
- package/src/tasks/create/templates/SDK-React/field/Date/demo.stories.tsx.mustache +17 -15
- package/src/tasks/create/templates/SDK-React/field/Date/index.tsx.mustache +24 -26
- package/src/tasks/create/templates/SDK-React/field/DateTime/demo.stories.tsx.mustache +15 -14
- package/src/tasks/create/templates/SDK-React/field/DateTime/index.tsx.mustache +20 -22
- package/src/tasks/create/templates/SDK-React/field/Decimal/demo.stories.tsx.mustache +15 -14
- package/src/tasks/create/templates/SDK-React/field/Decimal/index.tsx.mustache +4 -5
- package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/demo.stories.tsx.mustache +14 -12
- 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/demo.stories.tsx.mustache +2 -2
- package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/index.tsx.mustache +3 -4
- package/src/tasks/create/templates/SDK-React/field/Integer/demo.stories.tsx.mustache +3 -3
- package/src/tasks/create/templates/SDK-React/field/Integer/index.tsx.mustache +3 -4
- package/src/tasks/create/templates/SDK-React/field/Picklist/demo.stories.tsx.mustache +2 -3
- package/src/tasks/create/templates/SDK-React/field/Picklist/index.tsx.mustache +3 -4
- package/src/tasks/create/templates/SDK-React/field/Picklist-Autocomplete/demo.stories.tsx.mustache +3 -3
- 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/demo.stories.tsx.mustache +6 -4
- package/src/tasks/create/templates/SDK-React/field/Picklist-RadioButtons/index.tsx.mustache +22 -23
- package/src/tasks/create/templates/SDK-React/field/Text/demo.stories.tsx.mustache +8 -4
- package/src/tasks/create/templates/SDK-React/field/Text/index.tsx.mustache +18 -19
- package/src/tasks/create/templates/SDK-React/field/Text-Email/demo.stories.tsx.mustache +8 -4
- 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/demo.stories.tsx.mustache +8 -4
- 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/demo.stories.tsx.mustache +8 -5
- 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/demo.stories.tsx.mustache +6 -4
- 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/demo.stories.tsx.mustache +8 -4
- package/src/tasks/create/templates/SDK-React/field/Text-URL/index.tsx.mustache +19 -20
- package/src/tasks/create/templates/SDK-React/field/TimeOfDay/demo.stories.tsx.mustache +6 -4
- package/src/tasks/create/templates/SDK-React/field/TimeOfDay/index.tsx.mustache +4 -5
- package/src/tasks/create/templates/SDK-React/template/DETAILS/demo.stories.tsx.mustache +22 -22
- package/src/tasks/create/templates/SDK-React/template/DETAILS/index.tsx.mustache +19 -20
- package/src/tasks/create/templates/SDK-React/template/DETAILS-region/demo.stories.tsx.mustache +17 -17
- package/src/tasks/create/templates/SDK-React/template/DETAILS-region/index.tsx.mustache +19 -20
- package/src/tasks/create/templates/SDK-React/template/FORM/demo.stories.tsx.mustache +30 -18
- package/src/tasks/create/templates/SDK-React/template/FORM/index.tsx.mustache +6 -7
- package/src/tasks/create/templates/SDK-React/template/FORM-region/demo.stories.tsx.mustache +50 -24
- package/src/tasks/create/templates/SDK-React/template/FORM-region/index.tsx.mustache +8 -9
- package/src/tasks/create/templates/SDK-React/template/PAGE/demo.stories.tsx.mustache +37 -21
- package/src/tasks/create/templates/SDK-React/template/PAGE/index.tsx.mustache +4 -5
- package/src/tasks/create/templates/SDK-React/widget/CASE/demo.stories.tsx.mustache +22 -10
- package/src/tasks/create/templates/SDK-React/widget/CASE/index.tsx.mustache +10 -11
- package/src/tasks/create/templates/SDK-React/widget/PAGE/demo.stories.tsx.mustache +3 -4
- package/src/tasks/create/templates/SDK-React/widget/PAGE/index.tsx.mustache +23 -24
- package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/demo.stories.tsx.mustache +21 -9
- 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/field-group/field-group.component.html +21 -0
- package/tests/assets/sdk-a/components/create/override-sdk/designSystemExtension/field-group/field-group.component.scss +18 -0
- package/tests/assets/sdk-a/components/create/override-sdk/designSystemExtension/field-group/field-group.component.spec.ts +21 -0
- package/tests/assets/sdk-a/components/create/override-sdk/designSystemExtension/field-group/field-group.component.ts +24 -0
- package/tests/assets/sdk-a/components/create/override-sdk/designSystemExtension/material-details-fields/material-details-fields.component.html +8 -2
- 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/check-box/check-box.component.html +5 -1
- package/tests/assets/sdk-a/components/create/override-sdk/field/check-box/check-box.component.ts +6 -0
- package/tests/assets/sdk-a/components/create/override-sdk/field/date/date.component.html +5 -1
- package/tests/assets/sdk-a/components/create/override-sdk/field/date/date.component.ts +7 -0
- package/tests/assets/sdk-a/components/create/override-sdk/field/group/config-ext.json +8 -0
- package/tests/assets/sdk-a/components/create/override-sdk/field/group/group.component.html +25 -0
- package/tests/assets/sdk-a/components/create/override-sdk/field/group/group.component.scss +0 -0
- package/tests/assets/sdk-a/components/create/override-sdk/field/group/group.component.spec.ts +21 -0
- package/tests/assets/sdk-a/components/create/override-sdk/field/group/group.component.ts +84 -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/template/app-shell/app-shell.component.ts +2 -2
- package/tests/assets/sdk-a/components/create/override-sdk/template/case-view/case-view.component.ts +1 -1
- package/tests/assets/sdk-a/components/create/override-sdk/template/default-form/default-form.component.scss +9 -5
- package/tests/assets/sdk-a/components/create/override-sdk/template/details/details.component.ts +2 -1
- 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/custom-sdk/field/pega-dxil-my-boolean/pega-dxil-my-boolean.component.html +5 -1
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-boolean/pega-dxil-my-boolean.component.ts +6 -0
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-date/pega-dxil-my-date.component.html +5 -1
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-date/pega-dxil-my-date.component.ts +7 -0
- package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-details/pega-dxil-my-details.component.ts +2 -1
- package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-form/pega-dxil-my-form.component.scss +14 -5
- package/tests/assets/sdk-a/components/createAll/override-sdk/designSystemExtension/field-group/field-group.component.html +21 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/designSystemExtension/field-group/field-group.component.scss +18 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/designSystemExtension/field-group/field-group.component.spec.ts +21 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/designSystemExtension/field-group/field-group.component.ts +24 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/designSystemExtension/material-details-fields/material-details-fields.component.html +8 -2
- 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/check-box/check-box.component.html +5 -1
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/check-box/check-box.component.ts +6 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/date/date.component.html +5 -1
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/date/date.component.ts +7 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/group/config-ext.json +8 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/group/group.component.html +25 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/group/group.component.scss +0 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/group/group.component.spec.ts +21 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/group/group.component.ts +84 -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/template/app-shell/app-shell.component.ts +2 -2
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/case-view/case-view.component.ts +1 -1
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/default-form/default-form.component.scss +9 -5
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/details/details.component.ts +2 -1
- package/tests/assets/sdk-a/components/createAll/override-sdk/widget/file-utility/file-utility.component.ts +21 -15
- package/tests/assets/sdk-r/components/create/custom-sdk/field/Pega_DXIL_MyTestText/demo.stories.tsx +8 -4
- package/tests/assets/sdk-r/components/create/custom-sdk/field/Pega_DXIL_MyTestText/index.tsx +15 -16
- package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/FieldGroup/FieldGroup.tsx +35 -6
- package/tests/assets/sdk-r/components/create/override-sdk/field/Checkbox/Checkbox.tsx +7 -4
- package/tests/assets/sdk-r/components/create/override-sdk/field/Group/Group.tsx +37 -0
- package/tests/assets/sdk-r/components/create/override-sdk/field/Group/config-ext.json +8 -0
- package/tests/assets/sdk-r/components/create/override-sdk/field/Group/index.tsx +1 -0
- package/tests/assets/sdk-r/components/create/override-sdk/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +14 -1
- package/tests/assets/sdk-r/components/create/override-sdk/template/DefaultForm/DefaultForm.css +6 -2
- package/tests/assets/sdk-r/components/create/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +19 -1
- package/tests/assets/sdk-r/components/create/override-sdk/widget/FileUtility/FileUtility.tsx +22 -16
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTestText/PConnProps.d.ts +46 -0
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTestText/demo.stories.tsx +54 -0
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTestText/index.tsx +73 -0
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTestText/mock.ts +15 -0
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTestText/styles.ts +15 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyBoolean/demo.stories.tsx +8 -4
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyBoolean/index.tsx +23 -21
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/demo.stories.tsx +14 -12
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/index.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDate/demo.stories.tsx +17 -15
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDate/index.tsx +21 -23
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/demo.stories.tsx +15 -14
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/index.tsx +20 -22
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/demo.stories.tsx +15 -14
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/index.tsx +1 -2
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyEmail/demo.stories.tsx +8 -4
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyEmail/index.tsx +23 -24
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyInteger/demo.stories.tsx +3 -3
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyInteger/index.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyParagraph/demo.stories.tsx +8 -5
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyParagraph/index.tsx +18 -19
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPercentage/demo.stories.tsx +2 -2
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPercentage/index.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPhone/demo.stories.tsx +6 -4
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPhone/index.tsx +33 -34
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPicklist/demo.stories.tsx +2 -3
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPicklist/index.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyRadiobuttons/demo.stories.tsx +6 -4
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyRadiobuttons/index.tsx +22 -23
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MySearchbox/demo.stories.tsx +3 -3
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MySearchbox/index.tsx +28 -29
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTestText/config.json +83 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTestText/demo.stories.tsx +59 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTestText/index.tsx +101 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTestText/mock.ts +16 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTestText/styles.js +7 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyText/demo.stories.tsx +8 -4
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyText/index.tsx +15 -16
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTextInput/demo.stories.tsx +8 -4
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTextInput/index.tsx +15 -16
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +6 -4
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTimeOfDay/index.tsx +1 -2
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyURL/demo.stories.tsx +8 -4
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyURL/index.tsx +16 -17
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyDetails/demo.stories.tsx +22 -22
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyDetails/index.tsx +16 -17
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyForm/demo.stories.tsx +56 -18
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyForm/index.tsx +3 -4
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyPage/demo.stories.tsx +37 -21
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyPage/index.tsx +4 -5
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +17 -17
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/index.tsx +16 -17
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnForm/demo.stories.tsx +50 -24
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnForm/index.tsx +8 -9
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyCaseWidget/demo.stories.tsx +22 -10
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyCaseWidget/index.tsx +10 -11
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +21 -9
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageCaseWidget/index.tsx +34 -34
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageWidget/demo.stories.tsx +3 -4
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageWidget/index.tsx +23 -24
- package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/FieldGroup/FieldGroup.tsx +35 -6
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Checkbox/Checkbox.tsx +7 -4
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Group/Group.tsx +37 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Group/config-ext.json +8 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Group/index.tsx +1 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +14 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/DefaultForm/DefaultForm.css +6 -2
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +19 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/FileUtility/FileUtility.tsx +22 -16
|
@@ -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
|
+
}
|
|
@@ -11,16 +11,16 @@ window.PCore = {
|
|
|
11
11
|
getGenericFailedMessage() {
|
|
12
12
|
/* nothing */
|
|
13
13
|
}
|
|
14
|
-
}
|
|
14
|
+
};
|
|
15
15
|
},
|
|
16
16
|
getConstants: (): any => {
|
|
17
17
|
return {
|
|
18
18
|
CASE_INFO: {
|
|
19
|
-
INSTRUCTIONS:
|
|
19
|
+
INSTRUCTIONS: ''
|
|
20
20
|
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
24
|
|
|
25
25
|
const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
|
|
26
26
|
title: '{{COMPONENT_CLASS_NAME}}',
|
|
@@ -34,7 +34,7 @@ const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
|
|
|
34
34
|
export default meta;
|
|
35
35
|
type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
|
|
36
36
|
|
|
37
|
-
export const Base{{COMPONENT_CLASS_NAME}}: Story =
|
|
37
|
+
export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
38
38
|
|
|
39
39
|
const [firstName, setFirstName] = useState('John');
|
|
40
40
|
const [middleName, setMiddleName] = useState('');
|
|
@@ -44,10 +44,10 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
|
|
|
44
44
|
const [email, setEmail] = useState('john@doe.com');
|
|
45
45
|
|
|
46
46
|
const props = {
|
|
47
|
-
NumCols:
|
|
47
|
+
NumCols: '1',
|
|
48
48
|
template: 'DefaultForm',
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
getPConnect: () => {
|
|
51
51
|
return {
|
|
52
52
|
getChildren: () => {
|
|
53
53
|
return [
|
|
@@ -69,8 +69,12 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
|
|
|
69
69
|
return {
|
|
70
70
|
getActionsApi: () => {
|
|
71
71
|
return {
|
|
72
|
-
updateFieldValue: () => {
|
|
73
|
-
|
|
72
|
+
updateFieldValue: () => {
|
|
73
|
+
/* nothing */
|
|
74
|
+
},
|
|
75
|
+
triggerFieldChange: () => {
|
|
76
|
+
/* nothing */
|
|
77
|
+
}
|
|
74
78
|
};
|
|
75
79
|
},
|
|
76
80
|
getStateProps: () => {
|
|
@@ -95,8 +99,12 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
|
|
|
95
99
|
return {
|
|
96
100
|
getActionsApi: () => {
|
|
97
101
|
return {
|
|
98
|
-
updateFieldValue: () => {
|
|
99
|
-
|
|
102
|
+
updateFieldValue: () => {
|
|
103
|
+
/* nothing */
|
|
104
|
+
},
|
|
105
|
+
triggerFieldChange: () => {
|
|
106
|
+
/* nothing */
|
|
107
|
+
}
|
|
100
108
|
};
|
|
101
109
|
},
|
|
102
110
|
getStateProps: () => {
|
|
@@ -123,8 +131,12 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
|
|
|
123
131
|
return {
|
|
124
132
|
getActionsApi: () => {
|
|
125
133
|
return {
|
|
126
|
-
updateFieldValue: () => {
|
|
127
|
-
|
|
134
|
+
updateFieldValue: () => {
|
|
135
|
+
/* nothing */
|
|
136
|
+
},
|
|
137
|
+
triggerFieldChange: () => {
|
|
138
|
+
/* nothing */
|
|
139
|
+
}
|
|
128
140
|
};
|
|
129
141
|
},
|
|
130
142
|
getStateProps: () => {
|
|
@@ -263,14 +275,14 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
|
|
|
263
275
|
}
|
|
264
276
|
];
|
|
265
277
|
},
|
|
266
|
-
getValue:
|
|
278
|
+
getValue: val => {
|
|
267
279
|
return val;
|
|
268
280
|
},
|
|
269
281
|
getCurrentView: () => {
|
|
270
|
-
return
|
|
282
|
+
return '';
|
|
271
283
|
},
|
|
272
284
|
getCurrentClassID: () => {
|
|
273
|
-
return
|
|
285
|
+
return '';
|
|
274
286
|
}
|
|
275
287
|
};
|
|
276
288
|
}
|
|
@@ -279,4 +291,4 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
|
|
|
279
291
|
return <{{COMPONENT_CLASS_NAME}} {...props} {...args} />;
|
|
280
292
|
};
|
|
281
293
|
|
|
282
|
-
Base{{COMPONENT_CLASS_NAME}}.args = {}
|
|
294
|
+
Base{{COMPONENT_CLASS_NAME}}.args = {};
|
|
@@ -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
|
+
}
|
|
@@ -14,44 +14,69 @@ const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
|
|
|
14
14
|
component: {{COMPONENT_CLASS_NAME}},
|
|
15
15
|
excludeStories: /.*Data$/,
|
|
16
16
|
parameters: {
|
|
17
|
-
type:
|
|
18
|
-
}
|
|
17
|
+
type: 'TwoColumnForm'
|
|
18
|
+
}
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
export default meta;
|
|
22
22
|
type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
|
|
23
23
|
|
|
24
24
|
const renderField = resolvedProps => {
|
|
25
|
-
const { displayMode, value = '', label = '', onChange} = resolvedProps;
|
|
25
|
+
const { displayMode, value = '', label = '', onChange } = resolvedProps;
|
|
26
26
|
|
|
27
27
|
const variant = displayMode === 'LABELS_LEFT' ? 'inline' : 'stacked';
|
|
28
28
|
let val: any = '';
|
|
29
29
|
if (label === 'Service Date')
|
|
30
|
-
val =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
30
|
+
val = (
|
|
31
|
+
<MuiPickersUtilsProvider utils={DayjsUtils}>
|
|
32
|
+
<KeyboardDatePicker
|
|
33
|
+
variant='inline'
|
|
34
|
+
inputVariant='outlined'
|
|
35
|
+
placeholder='mm/dd/yyyy'
|
|
36
|
+
fullWidth
|
|
37
|
+
format='MM/DD/YYYY'
|
|
38
|
+
mask='__/__/____'
|
|
39
|
+
size='small'
|
|
40
|
+
label={label}
|
|
41
|
+
value={value || null}
|
|
42
|
+
onChange={onChange}
|
|
43
|
+
/>
|
|
44
|
+
</MuiPickersUtilsProvider>
|
|
45
|
+
);
|
|
43
46
|
|
|
44
47
|
{{! pick new delimiters for mustache }}
|
|
45
48
|
{{=<% %>=}}
|
|
46
49
|
|
|
47
50
|
if (label === 'Email')
|
|
48
|
-
val =
|
|
51
|
+
val = (
|
|
52
|
+
<TextField
|
|
53
|
+
type='email'
|
|
54
|
+
fullWidth
|
|
55
|
+
value={value}
|
|
56
|
+
size='small'
|
|
57
|
+
variant='outlined'
|
|
58
|
+
style={{ fontSize: '14px' }}
|
|
59
|
+
label={label}
|
|
60
|
+
onChange={onChange}
|
|
61
|
+
/>
|
|
62
|
+
);
|
|
49
63
|
|
|
50
64
|
if (label === 'First Name' || label === 'Last Name' || label === 'Middle Name')
|
|
51
65
|
val = <TextField value={value} fullWidth size='small' variant='outlined' style={{ fontSize: '14px' }} label={label} onChange={onChange} />;
|
|
52
66
|
|
|
53
67
|
if (label === 'Phone Number')
|
|
54
|
-
val =
|
|
68
|
+
val = (
|
|
69
|
+
<MuiPhoneNumber
|
|
70
|
+
value={value}
|
|
71
|
+
fullWidth
|
|
72
|
+
variant='outlined'
|
|
73
|
+
size='small'
|
|
74
|
+
style={{ fontSize: '14px' }}
|
|
75
|
+
defaultCountry='us'
|
|
76
|
+
label={label}
|
|
77
|
+
onChange={onChange}
|
|
78
|
+
/>
|
|
79
|
+
);
|
|
55
80
|
|
|
56
81
|
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
57
82
|
|
|
@@ -62,7 +87,7 @@ const renderField = resolvedProps => {
|
|
|
62
87
|
return <span key={label}>{val}</span>;
|
|
63
88
|
};
|
|
64
89
|
|
|
65
|
-
export const Base{{COMPONENT_CLASS_NAME}}: Story =
|
|
90
|
+
export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
66
91
|
const [firstName, setFirstName] = useState('John');
|
|
67
92
|
const [middleName, setMiddleName] = useState('');
|
|
68
93
|
const [lastName, setLastName] = useState('Joe');
|
|
@@ -143,7 +168,6 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
|
|
|
143
168
|
const changeValue = date && date.isValid() ? date.toISOString() : null;
|
|
144
169
|
setServiceDate(changeValue);
|
|
145
170
|
}
|
|
146
|
-
|
|
147
171
|
}
|
|
148
172
|
];
|
|
149
173
|
const props = {
|
|
@@ -182,10 +206,12 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
|
|
|
182
206
|
return props.getPConnect().createComponent(child);
|
|
183
207
|
});
|
|
184
208
|
|
|
185
|
-
return
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
209
|
+
return (
|
|
210
|
+
<{{COMPONENT_CLASS_NAME}} {...props} {...args}>
|
|
211
|
+
{regionAChildren}
|
|
212
|
+
{regionBChildren}
|
|
213
|
+
</{{COMPONENT_CLASS_NAME}}>
|
|
214
|
+
);
|
|
189
215
|
};
|
|
190
216
|
|
|
191
217
|
Base{{COMPONENT_CLASS_NAME}}.args = {};
|
|
@@ -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
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable react/no-unstable-nested-components */
|
|
2
2
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
3
|
|
|
4
|
-
import AppAnnouncement from
|
|
4
|
+
import AppAnnouncement from '@pega/react-sdk-components/lib/components/widget/AppAnnouncement';
|
|
5
5
|
|
|
6
6
|
import {{COMPONENT_CLASS_NAME}} from './index';
|
|
7
7
|
import { pyHome1Resolved, pyHome1Raw } from './mock';
|
|
@@ -15,8 +15,7 @@ const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
|
|
|
15
15
|
export default meta;
|
|
16
16
|
type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
|
|
17
17
|
|
|
18
|
-
export const Base{{COMPONENT_CLASS_NAME}}: Story =
|
|
19
|
-
|
|
18
|
+
export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
20
19
|
const configProps = pyHome1Resolved.children[0].children[0].config;
|
|
21
20
|
|
|
22
21
|
const props = {
|
|
@@ -32,8 +31,12 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
|
|
|
32
31
|
resolve({});
|
|
33
32
|
});
|
|
34
33
|
},
|
|
35
|
-
updateFieldValue: () => {
|
|
36
|
-
|
|
34
|
+
updateFieldValue: () => {
|
|
35
|
+
/* nothing */
|
|
36
|
+
},
|
|
37
|
+
triggerFieldChange: () => {
|
|
38
|
+
/* nothing */
|
|
39
|
+
}
|
|
37
40
|
};
|
|
38
41
|
},
|
|
39
42
|
getChildren: () => {
|
|
@@ -49,31 +52,44 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
|
|
|
49
52
|
return pyHome1Raw;
|
|
50
53
|
},
|
|
51
54
|
createComponent: config => {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
55
|
+
if (config.type === 'AppAnnouncement') {
|
|
56
|
+
return (
|
|
57
|
+
<AppAnnouncement
|
|
58
|
+
key='announcement'
|
|
59
|
+
header='Announcements'
|
|
60
|
+
description={configProps.description}
|
|
61
|
+
datasource={configProps.datasource}
|
|
62
|
+
whatsnewlink={configProps.whatsnewlink}
|
|
63
|
+
getPConnect={(): typeof PConnect => ({}) as typeof PConnect}
|
|
64
|
+
/>
|
|
65
|
+
);
|
|
62
66
|
}
|
|
63
67
|
},
|
|
64
|
-
ignoreSuggestion: () => {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
+
ignoreSuggestion: () => {
|
|
69
|
+
/* nothing */
|
|
70
|
+
},
|
|
71
|
+
acceptSuggestion: () => {
|
|
72
|
+
/* nothing */
|
|
73
|
+
},
|
|
74
|
+
setInheritedProps: () => {
|
|
75
|
+
/* nothing */
|
|
76
|
+
},
|
|
77
|
+
resolveConfigProps: () => {
|
|
78
|
+
/* nothing */
|
|
79
|
+
}
|
|
68
80
|
};
|
|
69
81
|
}
|
|
70
82
|
};
|
|
71
83
|
|
|
72
84
|
const regionAChildren = pyHome1Raw.children[0].children.map(child => {
|
|
73
|
-
|
|
85
|
+
return props.getPConnect().createComponent(child);
|
|
74
86
|
});
|
|
75
87
|
|
|
76
|
-
return
|
|
88
|
+
return (
|
|
89
|
+
<{{COMPONENT_CLASS_NAME}} {...props} {...args}>
|
|
90
|
+
{regionAChildren}
|
|
91
|
+
</{{COMPONENT_CLASS_NAME}}>
|
|
92
|
+
);
|
|
77
93
|
};
|
|
78
94
|
|
|
79
95
|
Base{{COMPONENT_CLASS_NAME}}.args = {};
|
|
@@ -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
|
+
}
|
|
@@ -5,14 +5,14 @@ import { historyData } from './mock';
|
|
|
5
5
|
|
|
6
6
|
window.PCore = {
|
|
7
7
|
...window.PCore,
|
|
8
|
-
getDataApiUtils: ()
|
|
8
|
+
getDataApiUtils: (): any => {
|
|
9
9
|
return {
|
|
10
10
|
getData: (): any => {
|
|
11
11
|
return new Promise(resolve => {
|
|
12
12
|
resolve(historyData);
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
|
-
}
|
|
15
|
+
};
|
|
16
16
|
},
|
|
17
17
|
getConstants: (): any => {
|
|
18
18
|
return {
|
|
@@ -21,7 +21,7 @@ window.PCore = {
|
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
}
|
|
24
|
+
};
|
|
25
25
|
|
|
26
26
|
const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
|
|
27
27
|
title: '{{COMPONENT_CLASS_NAME}}',
|
|
@@ -32,7 +32,7 @@ const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
|
|
|
32
32
|
export default meta;
|
|
33
33
|
type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
|
|
34
34
|
|
|
35
|
-
export const Base{{COMPONENT_CLASS_NAME}}: Story =
|
|
35
|
+
export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
36
36
|
|
|
37
37
|
const props = {
|
|
38
38
|
label: 'Case history',
|
|
@@ -50,14 +50,26 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
|
|
|
50
50
|
},
|
|
51
51
|
getActionsApi: () => {
|
|
52
52
|
return {
|
|
53
|
-
updateFieldValue: () => {
|
|
54
|
-
|
|
53
|
+
updateFieldValue: () => {
|
|
54
|
+
/* nothing */
|
|
55
|
+
},
|
|
56
|
+
triggerFieldChange: () => {
|
|
57
|
+
/* nothing */
|
|
58
|
+
}
|
|
55
59
|
};
|
|
56
60
|
},
|
|
57
|
-
ignoreSuggestion: () => {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
+
ignoreSuggestion: () => {
|
|
62
|
+
/* nothing */
|
|
63
|
+
},
|
|
64
|
+
acceptSuggestion: () => {
|
|
65
|
+
/* nothing */
|
|
66
|
+
},
|
|
67
|
+
setInheritedProps: () => {
|
|
68
|
+
/* nothing */
|
|
69
|
+
},
|
|
70
|
+
resolveConfigProps: () => {
|
|
71
|
+
/* nothing */
|
|
72
|
+
}
|
|
61
73
|
};
|
|
62
74
|
}
|
|
63
75
|
};
|
|
@@ -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
|
+
}
|
|
@@ -12,8 +12,7 @@ const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
|
|
|
12
12
|
export default meta;
|
|
13
13
|
type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
|
|
14
14
|
|
|
15
|
-
export const Base{{COMPONENT_CLASS_NAME}}: Story =
|
|
16
|
-
|
|
15
|
+
export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
17
16
|
const props = {
|
|
18
17
|
datasource: configProps.datasource,
|
|
19
18
|
whatsnewlink: configProps.whatsnewlink
|
|
@@ -24,5 +23,5 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
|
|
|
24
23
|
|
|
25
24
|
Base{{COMPONENT_CLASS_NAME}}.args = {
|
|
26
25
|
header: configProps.header,
|
|
27
|
-
description: configProps.description
|
|
28
|
-
}
|
|
26
|
+
description: configProps.description
|
|
27
|
+
};
|
|
@@ -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
|
+
}
|