@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
|
@@ -3,7 +3,7 @@ import CurrencyTextField from '@unicef/material-ui-currency-textfield';
|
|
|
3
3
|
|
|
4
4
|
import { getCurrencyCharacters, getCurrencyOptions } from '@pega/react-sdk-components/lib/components/field/Currency/currency-utils.js';
|
|
5
5
|
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
6
|
-
import { format } from
|
|
6
|
+
import { format } from '@pega/react-sdk-components/lib/components/helpers/formatters';
|
|
7
7
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
8
8
|
import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
9
9
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
@@ -20,7 +20,6 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
|
20
20
|
// Duplicated runtime code from React SDK
|
|
21
21
|
|
|
22
22
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
23
|
-
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
24
23
|
export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
25
24
|
// Get emitted components from map (so we can get any override that may exist)
|
|
26
25
|
const FieldValueList = getComponentFromMap('FieldValueList');
|
|
@@ -95,10 +94,10 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
95
94
|
type='text'
|
|
96
95
|
outputFormat='number'
|
|
97
96
|
textAlign='left'
|
|
98
|
-
{{! pick new delimiters for mustache }}
|
|
99
|
-
{{=<% %>=}}
|
|
97
|
+
{{! pick new delimiters for mustache }}
|
|
98
|
+
{{=<% %>=}}
|
|
100
99
|
InputProps={{ inputProps: { ...testProp } }}
|
|
101
|
-
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
100
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
102
101
|
currencySymbol=''
|
|
103
102
|
decimalCharacter={theCurrDec}
|
|
104
103
|
digitGroupSeparator={showGroupSeparators ? theCurrSep : ''}
|
package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/demo.stories.tsx.mustache
CHANGED
|
@@ -7,14 +7,14 @@ import { configProps, fieldMetadata } from './mock';
|
|
|
7
7
|
window.PCore = {
|
|
8
8
|
...window.PCore,
|
|
9
9
|
getEnvironmentInfo: (): any => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
return {
|
|
11
|
+
getUseLocale: () => {
|
|
12
|
+
return 'en-GB';
|
|
13
|
+
},
|
|
14
|
+
getLocale: () => {
|
|
15
|
+
return 'en-GB';
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -27,7 +27,7 @@ const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
|
|
|
27
27
|
export default meta;
|
|
28
28
|
type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
|
|
29
29
|
|
|
30
|
-
export const Base{{COMPONENT_CLASS_NAME}}: Story =
|
|
30
|
+
export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
31
31
|
const [value, setValue] = useState(configProps.value);
|
|
32
32
|
|
|
33
33
|
const props = {
|
|
@@ -41,7 +41,9 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
|
|
|
41
41
|
updateFieldValue: (propName, theValue) => {
|
|
42
42
|
setValue(theValue?.toString());
|
|
43
43
|
},
|
|
44
|
-
triggerFieldChange: () => {
|
|
44
|
+
triggerFieldChange: () => {
|
|
45
|
+
/* nothing */
|
|
46
|
+
}
|
|
45
47
|
};
|
|
46
48
|
},
|
|
47
49
|
getStateProps: () => {
|
|
@@ -60,7 +62,7 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
|
|
|
60
62
|
}
|
|
61
63
|
};
|
|
62
64
|
|
|
63
|
-
return <{{COMPONENT_CLASS_NAME}} {...props} {...args}
|
|
65
|
+
return <{{COMPONENT_CLASS_NAME}} {...props} {...args} />;
|
|
64
66
|
};
|
|
65
67
|
|
|
66
68
|
Base{{COMPONENT_CLASS_NAME}}.args = {
|
|
@@ -73,5 +75,5 @@ Base{{COMPONENT_CLASS_NAME}}.args = {
|
|
|
73
75
|
status: configProps.status,
|
|
74
76
|
hideLabel: configProps.hideLabel,
|
|
75
77
|
displayMode: configProps.displayMode,
|
|
76
|
-
validatemessage: configProps.validatemessage
|
|
78
|
+
validatemessage: configProps.validatemessage
|
|
77
79
|
};
|
|
@@ -19,7 +19,6 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
|
19
19
|
// Duplicated runtime code from React SDK
|
|
20
20
|
|
|
21
21
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
22
|
-
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
23
22
|
export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
24
23
|
// Get emitted components from map (so we can get any override that may exist)
|
|
25
24
|
const FieldValueList = getComponentFromMap('FieldValueList');
|
|
@@ -100,10 +99,10 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
100
99
|
type='text'
|
|
101
100
|
outputFormat='number'
|
|
102
101
|
textAlign='left'
|
|
103
|
-
{{! pick new delimiters for mustache }}
|
|
104
|
-
{{=<% %>=}}
|
|
102
|
+
{{! pick new delimiters for mustache }}
|
|
103
|
+
{{=<% %>=}}
|
|
105
104
|
InputProps={{ inputProps: { ...testProp } }}
|
|
106
|
-
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
105
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
107
106
|
currencySymbol={theCurrSym}
|
|
108
107
|
decimalCharacter={theCurrDec}
|
|
109
108
|
digitGroupSeparator={theCurrSep}
|
package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/demo.stories.tsx.mustache
CHANGED
|
@@ -13,7 +13,7 @@ const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
|
|
|
13
13
|
export default meta;
|
|
14
14
|
type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
|
|
15
15
|
|
|
16
|
-
export const Base{{COMPONENT_CLASS_NAME}}: Story =
|
|
16
|
+
export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
17
17
|
const [value, setValue] = useState(configProps.value);
|
|
18
18
|
|
|
19
19
|
const props = {
|
|
@@ -55,5 +55,5 @@ Base{{COMPONENT_CLASS_NAME}}.args = {
|
|
|
55
55
|
status: configProps.status,
|
|
56
56
|
hideLabel: configProps.hideLabel,
|
|
57
57
|
displayMode: configProps.displayMode,
|
|
58
|
-
validatemessage: configProps.validatemessage
|
|
58
|
+
validatemessage: configProps.validatemessage
|
|
59
59
|
};
|
|
@@ -27,7 +27,6 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
30
|
-
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
31
30
|
export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
32
31
|
// Get emitted components from map (so we can get any override that may exist)
|
|
33
32
|
const TextInput = getComponentFromMap('TextInput');
|
|
@@ -90,10 +89,10 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
90
89
|
label={label}
|
|
91
90
|
value={value}
|
|
92
91
|
type='number'
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
{{! pick new delimiters for mustache }}
|
|
93
|
+
{{=<% %>=}}
|
|
95
94
|
inputProps={{ ...testProp }}
|
|
96
|
-
|
|
95
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
97
96
|
/>
|
|
98
97
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
99
98
|
);
|
|
@@ -13,7 +13,7 @@ const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
|
|
|
13
13
|
export default meta;
|
|
14
14
|
type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
|
|
15
15
|
|
|
16
|
-
export const Base{{COMPONENT_CLASS_NAME}}: Story =
|
|
16
|
+
export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
17
17
|
const [value, setValue] = useState(configProps.value);
|
|
18
18
|
|
|
19
19
|
const props = {
|
|
@@ -42,7 +42,7 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
|
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
-
return <{{COMPONENT_CLASS_NAME}} {...props} {...args}/>;
|
|
45
|
+
return <{{COMPONENT_CLASS_NAME}} {...props} {...args} />;
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
Base{{COMPONENT_CLASS_NAME}}.args = {
|
|
@@ -55,5 +55,5 @@ Base{{COMPONENT_CLASS_NAME}}.args = {
|
|
|
55
55
|
status: configProps.status,
|
|
56
56
|
hideLabel: configProps.hideLabel,
|
|
57
57
|
displayMode: configProps.displayMode,
|
|
58
|
-
validatemessage: configProps.validatemessage
|
|
58
|
+
validatemessage: configProps.validatemessage
|
|
59
59
|
};
|
|
@@ -11,7 +11,6 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
|
11
11
|
// Duplicated runtime code from React SDK
|
|
12
12
|
|
|
13
13
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
14
|
-
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
15
14
|
export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
16
15
|
// Get emitted components from map (so we can get any override that may exist)
|
|
17
16
|
const TextInput = getComponentFromMap('TextInput');
|
|
@@ -88,10 +87,10 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
88
87
|
label={label}
|
|
89
88
|
value={value}
|
|
90
89
|
type='text'
|
|
91
|
-
{{! pick new delimiters for mustache }}
|
|
92
|
-
{{=<% %>=}}
|
|
90
|
+
{{! pick new delimiters for mustache }}
|
|
91
|
+
{{=<% %>=}}
|
|
93
92
|
inputProps={{ inputMode: 'numeric', pattern: '[0-9]*', ...testProp }}
|
|
94
|
-
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
93
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
95
94
|
/>
|
|
96
95
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
97
96
|
);
|
|
@@ -13,7 +13,7 @@ const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
|
|
|
13
13
|
export default meta;
|
|
14
14
|
type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
|
|
15
15
|
|
|
16
|
-
export const Base{{COMPONENT_CLASS_NAME}}: Story =
|
|
16
|
+
export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
17
17
|
const [value, setValue] = useState(configProps.value);
|
|
18
18
|
|
|
19
19
|
const props = {
|
|
@@ -72,6 +72,5 @@ Base{{COMPONENT_CLASS_NAME}}.args = {
|
|
|
72
72
|
status: configProps.status,
|
|
73
73
|
hideLabel: configProps.hideLabel,
|
|
74
74
|
displayMode: configProps.displayMode,
|
|
75
|
-
validatemessage: configProps.validatemessage
|
|
75
|
+
validatemessage: configProps.validatemessage
|
|
76
76
|
};
|
|
77
|
-
|
|
@@ -62,7 +62,6 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
|
62
62
|
// Duplicated runtime code from React SDK
|
|
63
63
|
|
|
64
64
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
65
|
-
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
66
65
|
export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
67
66
|
// Get emitted components from map (so we can get any override that may exist)
|
|
68
67
|
const FieldValueList = getComponentFromMap('FieldValueList');
|
|
@@ -226,10 +225,10 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
226
225
|
label={label}
|
|
227
226
|
value={value === '' && !readOnly ? placeholder : value}
|
|
228
227
|
select
|
|
229
|
-
{{! pick new delimiters for mustache }}
|
|
230
|
-
{{=<% %>=}}
|
|
228
|
+
{{! pick new delimiters for mustache }}
|
|
229
|
+
{{=<% %>=}}
|
|
231
230
|
InputProps={{ ...readOnlyProp, ...testProp }}
|
|
232
|
-
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
231
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
233
232
|
>
|
|
234
233
|
{options.map((option: any) => (
|
|
235
234
|
<MenuItem key={option.key} value={option.key}>
|
package/src/tasks/create/templates/SDK-React/field/Picklist-Autocomplete/demo.stories.tsx.mustache
CHANGED
|
@@ -13,7 +13,7 @@ const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
|
|
|
13
13
|
export default meta;
|
|
14
14
|
type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
|
|
15
15
|
|
|
16
|
-
export const Base{{COMPONENT_CLASS_NAME}}: Story =
|
|
16
|
+
export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
17
17
|
const [value, setValue] = useState(configProps.value);
|
|
18
18
|
|
|
19
19
|
const props = {
|
|
@@ -72,5 +72,5 @@ Base{{COMPONENT_CLASS_NAME}}.args = {
|
|
|
72
72
|
status: configProps.status,
|
|
73
73
|
hideLabel: configProps.hideLabel,
|
|
74
74
|
displayMode: configProps.displayMode,
|
|
75
|
-
validatemessage: configProps.validatemessage
|
|
76
|
-
}
|
|
75
|
+
validatemessage: configProps.validatemessage
|
|
76
|
+
};
|
|
@@ -55,7 +55,6 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
|
55
55
|
// Duplicated runtime code from React SDK
|
|
56
56
|
|
|
57
57
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
58
|
-
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
59
58
|
export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
60
59
|
// Get emitted components from map (so we can get any override that may exist)
|
|
61
60
|
const TextInput = getComponentFromMap('TextInput');
|
|
@@ -192,37 +191,37 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
192
191
|
// key/value structure to what Autocomplete expects
|
|
193
192
|
return (
|
|
194
193
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
{{! pick new delimiters for mustache }}
|
|
198
|
-
{{=<% %>=}}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
194
|
+
<Autocomplete
|
|
195
|
+
options={options}
|
|
196
|
+
{{! pick new delimiters for mustache }}
|
|
197
|
+
{{=<% %>=}}
|
|
198
|
+
getOptionLabel={(option: IOption) => {
|
|
199
|
+
return option.value ? option.value : '';
|
|
200
|
+
}}
|
|
201
|
+
getOptionSelected={(option: any) => {
|
|
202
|
+
return option.value ? option.value : '';
|
|
203
|
+
}}
|
|
204
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
205
|
+
fullWidth
|
|
206
|
+
onChange={handleChange}
|
|
207
|
+
value={selectedValue}
|
|
208
|
+
inputValue={inputValue || selectedValue}
|
|
209
|
+
onInputChange={handleInputValue}
|
|
210
|
+
renderInput={params => (
|
|
211
|
+
<TextField
|
|
212
|
+
{...params}
|
|
213
|
+
fullWidth
|
|
214
|
+
variant='outlined'
|
|
215
|
+
helperText={helperTextToDisplay}
|
|
216
|
+
placeholder={placeholder}
|
|
217
|
+
size='small'
|
|
218
|
+
required={required}
|
|
219
|
+
error={status === 'error'}
|
|
220
|
+
label={label}
|
|
221
|
+
data-test-id={testId}
|
|
222
|
+
/>
|
|
223
|
+
)}
|
|
224
|
+
/>
|
|
226
225
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
227
226
|
);
|
|
228
227
|
}
|
package/src/tasks/create/templates/SDK-React/field/Picklist-RadioButtons/demo.stories.tsx.mustache
CHANGED
|
@@ -13,7 +13,7 @@ const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
|
|
|
13
13
|
export default meta;
|
|
14
14
|
type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
|
|
15
15
|
|
|
16
|
-
export const Base{{COMPONENT_CLASS_NAME}}: Story =
|
|
16
|
+
export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
17
17
|
const [value, setValue] = useState(configProps.value);
|
|
18
18
|
|
|
19
19
|
const props = {
|
|
@@ -46,7 +46,9 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
|
|
|
46
46
|
},
|
|
47
47
|
getValidationApi: () => {
|
|
48
48
|
return {
|
|
49
|
-
validate: () => {
|
|
49
|
+
validate: () => {
|
|
50
|
+
/* nothing */
|
|
51
|
+
}
|
|
50
52
|
};
|
|
51
53
|
},
|
|
52
54
|
getCaseInfo: () => {
|
|
@@ -79,5 +81,5 @@ Base{{COMPONENT_CLASS_NAME}}.args = {
|
|
|
79
81
|
status: configProps.status,
|
|
80
82
|
hideLabel: configProps.hideLabel,
|
|
81
83
|
displayMode: configProps.displayMode,
|
|
82
|
-
validatemessage: configProps.validatemessage
|
|
83
|
-
}
|
|
84
|
+
validatemessage: configProps.validatemessage
|
|
85
|
+
};
|
|
@@ -17,7 +17,6 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
|
17
17
|
// Duplicated runtime code from React SDK
|
|
18
18
|
|
|
19
19
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
20
|
-
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
21
20
|
export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
22
21
|
// Get emitted components from map (so we can get any override that may exist)
|
|
23
22
|
const FieldValueList = getComponentFromMap('FieldValueList');
|
|
@@ -97,27 +96,27 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
97
96
|
|
|
98
97
|
return (
|
|
99
98
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
99
|
+
<FormControl error={status === 'error'} required={required}>
|
|
100
|
+
<FormLabel component='legend'>{label}</FormLabel>
|
|
101
|
+
<RadioGroup value={theSelectedButton} onChange={handleChange} onBlur={!readOnly ? handleBlur : undefined} row={inline}>
|
|
102
|
+
{theOptions.map(theOption => {
|
|
103
|
+
return (
|
|
104
|
+
<FormControlLabel
|
|
105
|
+
value={theOption.key}
|
|
106
|
+
key={theOption.key}
|
|
107
|
+
label={thePConn.getLocalizedValue(
|
|
108
|
+
theOption.value,
|
|
109
|
+
localePath,
|
|
110
|
+
// @ts-ignore - Property 'getLocaleRuleNameFromKeys' is private and only accessible within class 'C11nEnv'
|
|
111
|
+
thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)
|
|
112
|
+
)}
|
|
113
|
+
control={<Radio key={theOption.key} color='primary' disabled={readOnly} />}
|
|
114
|
+
/>
|
|
115
|
+
);
|
|
116
|
+
})}
|
|
117
|
+
</RadioGroup>
|
|
118
|
+
<FormHelperText>{helperTextToDisplay}</FormHelperText>
|
|
119
|
+
</FormControl>
|
|
120
|
+
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
122
121
|
);
|
|
123
122
|
}
|
|
@@ -14,7 +14,7 @@ const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
|
|
|
14
14
|
export default meta;
|
|
15
15
|
type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
|
|
16
16
|
|
|
17
|
-
export const Base{{COMPONENT_CLASS_NAME}}: Story =
|
|
17
|
+
export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
18
18
|
const [value, setValue] = useState(configProps.value);
|
|
19
19
|
|
|
20
20
|
const props = {
|
|
@@ -34,8 +34,12 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
|
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
},
|
|
37
|
-
onChange:
|
|
38
|
-
|
|
37
|
+
onChange: event => {
|
|
38
|
+
setValue(event.target.value);
|
|
39
|
+
},
|
|
40
|
+
onBlur: () => {
|
|
41
|
+
return configProps.value;
|
|
42
|
+
}
|
|
39
43
|
};
|
|
40
44
|
|
|
41
45
|
return <{{COMPONENT_CLASS_NAME}} {...props} {...args} />;
|
|
@@ -51,5 +55,5 @@ Base{{COMPONENT_CLASS_NAME}}.args = {
|
|
|
51
55
|
status: configProps.status,
|
|
52
56
|
hideLabel: configProps.hideLabel,
|
|
53
57
|
displayMode: configProps.displayMode,
|
|
54
|
-
validatemessage: configProps.validatemessage
|
|
58
|
+
validatemessage: configProps.validatemessage
|
|
55
59
|
};
|
|
@@ -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,7 @@ const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
|
|
|
13
13
|
export default meta;
|
|
14
14
|
type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
|
|
15
15
|
|
|
16
|
-
export const Base{{COMPONENT_CLASS_NAME}}: Story =
|
|
16
|
+
export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
17
17
|
const [value, setValue] = useState(configProps.value);
|
|
18
18
|
|
|
19
19
|
const props = {
|
|
@@ -33,8 +33,12 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
|
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
},
|
|
36
|
-
onChange:
|
|
37
|
-
|
|
36
|
+
onChange: event => {
|
|
37
|
+
setValue(event.target.value);
|
|
38
|
+
},
|
|
39
|
+
onBlur: () => {
|
|
40
|
+
return configProps.value;
|
|
41
|
+
}
|
|
38
42
|
};
|
|
39
43
|
return <{{COMPONENT_CLASS_NAME}} {...props} {...args} />;
|
|
40
44
|
};
|
|
@@ -49,5 +53,5 @@ Base{{COMPONENT_CLASS_NAME}}.args = {
|
|
|
49
53
|
status: configProps.status,
|
|
50
54
|
hideLabel: configProps.hideLabel,
|
|
51
55
|
displayMode: configProps.displayMode,
|
|
52
|
-
validatemessage: configProps.validatemessage
|
|
56
|
+
validatemessage: configProps.validatemessage
|
|
53
57
|
};
|
|
@@ -12,7 +12,6 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
|
12
12
|
// Duplicated runtime code from React SDK
|
|
13
13
|
|
|
14
14
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
15
|
-
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
16
15
|
export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
17
16
|
// Get emitted components from map (so we can get any override that may exist)
|
|
18
17
|
const TextInput = getComponentFromMap('TextInput');
|
|
@@ -56,32 +55,32 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
56
55
|
|
|
57
56
|
return (
|
|
58
57
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
{{! pick new delimiters for mustache }}
|
|
74
|
-
{{=<% %>=}}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
84
|
-
|
|
58
|
+
<TextField
|
|
59
|
+
fullWidth
|
|
60
|
+
variant='outlined'
|
|
61
|
+
helperText={helperTextToDisplay}
|
|
62
|
+
placeholder={placeholder ?? ''}
|
|
63
|
+
size='small'
|
|
64
|
+
required={required}
|
|
65
|
+
disabled={disabled}
|
|
66
|
+
onChange={onChange}
|
|
67
|
+
onBlur={!readOnly ? onBlur : undefined}
|
|
68
|
+
error={status === 'error'}
|
|
69
|
+
label={label}
|
|
70
|
+
value={value}
|
|
71
|
+
type='email'
|
|
72
|
+
{{! pick new delimiters for mustache }}
|
|
73
|
+
{{=<% %>=}}
|
|
74
|
+
InputProps={{
|
|
75
|
+
startAdornment: (
|
|
76
|
+
<InputAdornment position='start'>
|
|
77
|
+
<MailOutlineIcon />
|
|
78
|
+
</InputAdornment>
|
|
79
|
+
),
|
|
80
|
+
inputProps: { ...testProp }
|
|
81
|
+
}}
|
|
82
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
83
|
+
/>
|
|
85
84
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
86
85
|
);
|
|
87
86
|
}
|
|
@@ -14,7 +14,7 @@ const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
|
|
|
14
14
|
export default meta;
|
|
15
15
|
type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
|
|
16
16
|
|
|
17
|
-
export const Base{{COMPONENT_CLASS_NAME}}: Story =
|
|
17
|
+
export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
18
18
|
const [value, setValue] = useState(configProps.value);
|
|
19
19
|
|
|
20
20
|
const props = {
|
|
@@ -35,8 +35,12 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
|
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
},
|
|
38
|
-
onChange:
|
|
39
|
-
|
|
38
|
+
onChange: event => {
|
|
39
|
+
setValue(event.target.value);
|
|
40
|
+
},
|
|
41
|
+
onBlur: () => {
|
|
42
|
+
return configProps.value;
|
|
43
|
+
}
|
|
40
44
|
};
|
|
41
45
|
|
|
42
46
|
return <{{COMPONENT_CLASS_NAME}} {...props} {...args} />;
|
|
@@ -52,5 +56,5 @@ Base{{COMPONENT_CLASS_NAME}}.args = {
|
|
|
52
56
|
status: configProps.status,
|
|
53
57
|
hideLabel: configProps.hideLabel,
|
|
54
58
|
displayMode: configProps.displayMode,
|
|
55
|
-
validatemessage: configProps.validatemessage
|
|
59
|
+
validatemessage: configProps.validatemessage
|
|
56
60
|
};
|