@pega/custom-dx-components 23.1.12 → 24.1.10
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/README.md +1 -1
- package/package.json +1 -1
- package/src/cli.js +8 -2
- package/src/constants.js +9 -0
- package/src/tasks/build-all/helper.js +6 -0
- package/src/tasks/build-comp/helper.js +8 -0
- package/src/tasks/build-jest-assets/index.js +171 -0
- package/src/tasks/bundle/builder/webpack.config.js +15 -1
- package/src/tasks/create/index.js +3 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/demo.stories.tsx.mustache +3 -13
- package/src/tasks/create/templates/Constellation/Field/Boolean/index.tsx.mustache +8 -5
- package/src/tasks/create/templates/Constellation/Field/Date/demo.stories.tsx.mustache +8 -19
- package/src/tasks/create/templates/Constellation/Field/Date/index.tsx.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Field/DateTime/demo.stories.tsx.mustache +7 -18
- package/src/tasks/create/templates/Constellation/Field/DateTime/index.tsx.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Field/DateTime/mock.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/demo.stories.tsx.mustache +1 -7
- package/src/tasks/create/templates/Constellation/Field/Decimal/index.tsx.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Field/Decimal/mock.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/demo.stories.tsx.mustache +2 -9
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/index.tsx.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/mock.ts.mustache +2 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/demo.stories.tsx.mustache +2 -6
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/index.tsx.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/mock.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/config.json.mustache +64 -0
- package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/demo.stories.tsx.mustache +104 -0
- package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/index.tsx.mustache +218 -0
- package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/mock.ts.mustache +5 -0
- package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/styles.ts.mustache +8 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/demo.stories.tsx.mustache +2 -6
- package/src/tasks/create/templates/Constellation/Field/Integer/index.tsx.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Field/Picklist/demo.stories.tsx.mustache +2 -6
- package/src/tasks/create/templates/Constellation/Field/Picklist/index.tsx.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Field/Picklist/mock.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/demo.stories.tsx.mustache +2 -8
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/index.tsx.mustache +11 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/utils.ts.mustache +3 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/demo.stories.tsx.mustache +1 -7
- package/src/tasks/create/templates/Constellation/Field/Text/demo.stories.tsx.mustache +0 -3
- package/src/tasks/create/templates/Constellation/Field/Text/index.tsx.mustache +94 -4
- package/src/tasks/create/templates/Constellation/Field/Text-Email/demo.stories.tsx.mustache +1 -5
- package/src/tasks/create/templates/Constellation/Field/Text-Email/index.tsx.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Field/Text-Input/StatusWork.tsx +3 -9
- package/src/tasks/create/templates/Constellation/Field/Text-Input/demo.stories.tsx.mustache +1 -5
- package/src/tasks/create/templates/Constellation/Field/Text-Input/index.tsx.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Field/Text-Input/mock.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/demo.stories.tsx.mustache +1 -5
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/index.tsx.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/mock.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/demo.stories.tsx.mustache +2 -5
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/index.tsx.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/mock.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/demo.stories.tsx.mustache +1 -5
- package/src/tasks/create/templates/Constellation/Field/Text-URL/mock.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/demo.stories.tsx.mustache +5 -15
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/index.tsx.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Template/DETAILS/Avatar.tsx.mustache +78 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/DetailsRender.tsx.mustache +55 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/HighlightRender.tsx.mustache +49 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/Operator.tsx.mustache +218 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/StatusWork.tsx.mustache +17 -19
- package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.stories.tsx.mustache +79 -25
- package/src/tasks/create/templates/Constellation/Template/DETAILS/index.tsx.mustache +51 -40
- package/src/tasks/create/templates/Constellation/Template/DETAILS/mock.ts.mustache +78 -20
- package/src/tasks/create/templates/Constellation/Template/DETAILS/styles.ts.mustache +16 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/Avatar.tsx.mustache +78 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/DetailsRender.tsx.mustache +55 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/HighlightRender.tsx.mustache +49 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/Operator.tsx.mustache +218 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/StatusWork.tsx.mustache +17 -19
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/demo.stories.tsx.mustache +96 -27
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/index.tsx.mustache +42 -39
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/mock.ts.mustache +68 -10
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Template/FORM/DetailsRender.tsx +59 -0
- package/src/tasks/create/templates/Constellation/Template/FORM/demo.stories.tsx.mustache +5 -3
- package/src/tasks/create/templates/Constellation/Template/FORM/index.tsx.mustache +31 -5
- package/src/tasks/create/templates/Constellation/Template/FORM-region/DetailsRender.tsx +59 -0
- package/src/tasks/create/templates/Constellation/Template/FORM-region/demo.stories.tsx.mustache +4 -2
- package/src/tasks/create/templates/Constellation/Template/FORM-region/index.tsx.mustache +29 -7
- package/src/tasks/create/templates/Constellation/Template/PAGE/GetNextWork.tsx.mustache +2 -1
- package/src/tasks/create/templates/Constellation/Template/PAGE/demo.stories.tsx.mustache +4 -3
- package/src/tasks/create/templates/Constellation/Template/PAGE/localizations.json.mustache +4 -2
- package/src/tasks/create/templates/Constellation/Widget/CASE/demo.stories.tsx.mustache +3 -2
- package/src/tasks/create/templates/Constellation/Widget/PAGE/demo.stories.tsx.mustache +91 -13
- package/src/tasks/create/templates/Constellation/Widget/PAGE/index.tsx.mustache +67 -5
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/demo.stories.tsx.mustache +5 -4
- package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/config.json.mustache +32 -0
- package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/demo.stories.tsx.mustache +103 -0
- package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/index.tsx.mustache +216 -0
- package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/mock.ts.mustache +5 -0
- package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/styles.ts.mustache +8 -0
- package/src/tasks/create/templates/Launchpad/Widget/PAGE/OneColumnPage.svg +36 -0
- package/src/tasks/create/templates/Launchpad/Widget/PAGE/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Launchpad/Widget/PAGE/config.json.mustache +59 -0
- package/src/tasks/create/templates/Launchpad/Widget/PAGE/demo.stories.tsx.mustache +120 -0
- package/src/tasks/create/templates/Launchpad/Widget/PAGE/index.tsx.mustache +109 -0
- package/src/tasks/create/templates/Launchpad/Widget/PAGE/mock.ts.mustache +25 -0
- package/src/tasks/create/templates/Launchpad/Widget/PAGE/styles.ts.mustache +8 -0
- package/src/tasks/create-all/index.js +3 -0
- package/src/tasks/index.js +1 -0
- package/src/tasks/init/template/.storybook/preview.js +3 -0
- package/src/tasks/init/template/package.json.mustache +7 -6
- package/src/tasks/init/template/tsconfig.build.json +3 -1
- package/src/tasks/publish/helper.js +6 -0
- package/src/tasks/publish-all/helper.js +6 -0
- package/src/tasks/validator/index.js +7 -1
- package/src/util.js +18 -0
- package/tests/assets/components/create/Pega_DXIL_MyDetails.zip +0 -0
- package/tests/assets/components/create/Pega_DXIL_MyTestText/demo.stories.tsx +0 -3
- package/tests/assets/components/create/Pega_DXIL_MyTestText/index.tsx +94 -4
- package/tests/assets/components/create/_components.md +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/demo.stories.tsx +3 -13
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/index.tsx +8 -5
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/demo.stories.tsx +3 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/demo.stories.tsx +2 -9
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/index.tsx +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/mock.ts +2 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/demo.stories.tsx +8 -19
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/index.tsx +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/demo.stories.tsx +7 -18
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/index.tsx +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/mock.ts +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/demo.stories.tsx +1 -7
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/index.tsx +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/mock.ts +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/Avatar.tsx +78 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/DetailsRender.tsx +52 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/HighlightRender.tsx +46 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/Operator.tsx +215 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/StatusWork.tsx +17 -19
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/demo.stories.tsx +79 -25
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/index.tsx +48 -37
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/mock.ts +78 -20
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/styles.ts +16 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails.zip +0 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/demo.stories.tsx +1 -5
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/index.tsx +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/DetailsRender.tsx +59 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/demo.stories.tsx +5 -3
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/index.tsx +28 -5
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/PConnProps.d.ts +46 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/config.json +64 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/demo.stories.tsx +104 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/index.tsx +215 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/mock.ts +5 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/styles.ts +8 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/demo.stories.tsx +2 -6
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/index.tsx +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/GetNextWork.tsx +2 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/demo.stories.tsx +4 -3
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/localizations.json +4 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +5 -4
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/demo.stories.tsx +91 -13
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/index.tsx +67 -5
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/demo.stories.tsx +1 -5
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/index.tsx +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/mock.ts +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/demo.stories.tsx +2 -6
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/index.tsx +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/mock.ts +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/demo.stories.tsx +2 -5
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/index.tsx +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/mock.ts +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/demo.stories.tsx +2 -6
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/index.tsx +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/mock.ts +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/demo.stories.tsx +1 -7
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/demo.stories.tsx +2 -8
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/index.tsx +11 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/utils.ts +3 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/demo.stories.tsx +0 -3
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/index.tsx +94 -4
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/StatusWork.tsx +3 -9
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/demo.stories.tsx +1 -5
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/index.tsx +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/mock.ts +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +5 -15
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/index.tsx +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/Avatar.tsx +78 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/DetailsRender.tsx +52 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/HighlightRender.tsx +46 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/Operator.tsx +215 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/StatusWork.tsx +17 -19
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +96 -27
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/index.tsx +39 -36
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/mock.ts +68 -10
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/styles.ts +15 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/DetailsRender.tsx +59 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/demo.stories.tsx +4 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/index.tsx +23 -4
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/demo.stories.tsx +1 -5
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/mock.ts +1 -0
- package/tests/assets/components/createAll/Constellation/_components.md +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/demo.stories.tsx +3 -13
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/index.tsx +8 -5
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/demo.stories.tsx +2 -9
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/index.tsx +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/mock.ts +2 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/demo.stories.tsx +8 -19
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/index.tsx +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/demo.stories.tsx +7 -18
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/index.tsx +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/mock.ts +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/demo.stories.tsx +1 -7
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/index.tsx +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/mock.ts +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/Avatar.tsx +78 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/DetailsRender.tsx +52 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/HighlightRender.tsx +46 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/Operator.tsx +215 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/StatusWork.tsx +17 -19
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/demo.stories.tsx +79 -25
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/index.tsx +48 -37
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/mock.ts +78 -20
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/styles.ts +16 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails.zip +0 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/demo.stories.tsx +1 -5
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/index.tsx +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/DetailsRender.tsx +59 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/demo.stories.tsx +5 -3
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/index.tsx +28 -5
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/PConnProps.d.ts +46 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/config.json +32 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/demo.stories.tsx +103 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/index.tsx +213 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/mock.ts +5 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/styles.ts +8 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/demo.stories.tsx +2 -6
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/index.tsx +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/GetNextWork.tsx +2 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/demo.stories.tsx +4 -3
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/localizations.json +4 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/demo.stories.tsx +88 -9
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/index.tsx +67 -5
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/demo.stories.tsx +1 -5
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/index.tsx +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/mock.ts +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/demo.stories.tsx +2 -6
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/index.tsx +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/mock.ts +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/demo.stories.tsx +2 -5
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/index.tsx +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/mock.ts +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/demo.stories.tsx +2 -6
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/index.tsx +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/mock.ts +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/demo.stories.tsx +1 -7
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/demo.stories.tsx +2 -8
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/index.tsx +11 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/utils.ts +3 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/demo.stories.tsx +0 -3
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/index.tsx +94 -4
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/StatusWork.tsx +3 -9
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/demo.stories.tsx +1 -5
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/index.tsx +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/mock.ts +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +5 -15
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/index.tsx +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/Avatar.tsx +78 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/DetailsRender.tsx +52 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/HighlightRender.tsx +46 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/Operator.tsx +215 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/StatusWork.tsx +17 -19
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +96 -27
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/index.tsx +39 -36
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/mock.ts +68 -10
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/styles.ts +15 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/DetailsRender.tsx +59 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/demo.stories.tsx +4 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/index.tsx +23 -4
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/demo.stories.tsx +1 -5
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/mock.ts +1 -0
- package/tests/assets/components/createAll/Launchpad/_components.md +1 -0
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This project provides you with an environment to extend Constellation by giving
|
|
|
8
8
|
|
|
9
9
|
Ensure you have access to the following in your system:
|
|
10
10
|
|
|
11
|
-
- Pega Infinity Server version
|
|
11
|
+
- Pega Infinity Server version 24 or later
|
|
12
12
|
|
|
13
13
|
- Git version 2.30 or later
|
|
14
14
|
|
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -18,7 +18,8 @@ import {
|
|
|
18
18
|
promoteWebPack,
|
|
19
19
|
updateComponent,
|
|
20
20
|
validate,
|
|
21
|
-
upgrade
|
|
21
|
+
upgrade,
|
|
22
|
+
buildJestAssets
|
|
22
23
|
} from './tasks/index.js';
|
|
23
24
|
|
|
24
25
|
const TASKS = {
|
|
@@ -38,7 +39,8 @@ const TASKS = {
|
|
|
38
39
|
DELETE: 'delete',
|
|
39
40
|
DELETE_ALL: "deleteAll",
|
|
40
41
|
AUTHENTICATE: 'authenticate',
|
|
41
|
-
UPGRADE: 'upgrade'
|
|
42
|
+
UPGRADE: 'upgrade',
|
|
43
|
+
BUILD_JEST_ASSETS: 'buildJestAssets'
|
|
42
44
|
};
|
|
43
45
|
|
|
44
46
|
const parseArgumentsIntoOptions = rawArgs => {
|
|
@@ -132,6 +134,10 @@ export default async (args = []) => {
|
|
|
132
134
|
upgrade(options);
|
|
133
135
|
break;
|
|
134
136
|
}
|
|
137
|
+
case TASKS.BUILD_JEST_ASSETS: {
|
|
138
|
+
buildJestAssets(options);
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
135
141
|
default: {
|
|
136
142
|
console.log(chalk.red(`No task matched with ${task}`));
|
|
137
143
|
break;
|
package/src/constants.js
CHANGED
|
@@ -39,6 +39,11 @@ export const BUILDER_DIR_FILE_PATH = '../bundle/builder';
|
|
|
39
39
|
|
|
40
40
|
export const CATEGORY_CONSTELLATION = 'constellation';
|
|
41
41
|
|
|
42
|
+
export const JEST_ASSETS_PATH = 'node_modules/@pega/custom-dx-components/tests/assets/components/';
|
|
43
|
+
export const JEST_CREATE_PATH = 'create/';
|
|
44
|
+
export const JEST_CREATE_ALL_CONSTELLATION_PATH = 'createAll/Constellation/';
|
|
45
|
+
export const JEST_CREATE_ALL_LAUNCHPAD_PATH = 'createAll/Launchpad';
|
|
46
|
+
|
|
42
47
|
export const AUTHENTICATE_DEFAULTS = {
|
|
43
48
|
serverType: 'infinity',
|
|
44
49
|
server: 'https://localhost:1080/prweb',
|
|
@@ -134,6 +139,10 @@ export const COMPONENT_SCHEMA = {
|
|
|
134
139
|
name: 'URL',
|
|
135
140
|
value: 'Text-URL'
|
|
136
141
|
},
|
|
142
|
+
{
|
|
143
|
+
name: 'Icon Button URL',
|
|
144
|
+
value: 'Icon-Button-URL'
|
|
145
|
+
},
|
|
137
146
|
{
|
|
138
147
|
name: 'Integer',
|
|
139
148
|
value: 'Integer'
|
|
@@ -56,11 +56,17 @@ export const zipComponent = async (componentKey) => {
|
|
|
56
56
|
const srcDirectory = await getComponentDirectoryPath(componentKey);
|
|
57
57
|
const buildDirectory = await path.join(path.resolve(), 'dist/components', componentKey);
|
|
58
58
|
const configJson = `${srcDirectory}/config.json`;
|
|
59
|
+
const localizationJson = `${srcDirectory}/localizations.json`;
|
|
59
60
|
|
|
60
61
|
const zip = new AdmZip();
|
|
61
62
|
|
|
62
63
|
zip.addLocalFolder(srcDirectory, 'src/');
|
|
63
64
|
zip.addLocalFile(configJson);
|
|
65
|
+
|
|
66
|
+
if (fs.existsSync(localizationJson)) {
|
|
67
|
+
zip.addLocalFile(localizationJson);
|
|
68
|
+
}
|
|
69
|
+
|
|
64
70
|
zip.addLocalFolder(buildDirectory);
|
|
65
71
|
const zipContent = zip.toBuffer().toString('base64');
|
|
66
72
|
|
|
@@ -46,13 +46,21 @@ export const zipComponent = async (componentKey) => {
|
|
|
46
46
|
const buildDirectory = await path.join(path.resolve(), 'dist/components', componentKey);
|
|
47
47
|
const configJson = `${srcDirectory}/config.json`;
|
|
48
48
|
|
|
49
|
+
const localizationJson = `${srcDirectory}/localizations.json`;
|
|
50
|
+
|
|
49
51
|
const zip = new AdmZip();
|
|
50
52
|
|
|
51
53
|
zip.addLocalFolder(srcDirectory, 'src/');
|
|
52
54
|
zip.addLocalFile(configJson);
|
|
55
|
+
|
|
56
|
+
if (fs.existsSync(localizationJson)) {
|
|
57
|
+
zip.addLocalFile(localizationJson);
|
|
58
|
+
}
|
|
59
|
+
|
|
53
60
|
zip.addLocalFolder(buildDirectory);
|
|
54
61
|
const zipContent = zip.toBuffer().toString('base64');
|
|
55
62
|
|
|
63
|
+
|
|
56
64
|
const configContent = Buffer.from(fs.readFileSync(`${srcDirectory}/config.json`)).toString();
|
|
57
65
|
if (fs.existsSync('dist/components')) {
|
|
58
66
|
fs.rm('dist/components', { recursive: true }, err => {
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { join } from 'path';
|
|
4
|
+
import inquirer from 'inquirer';
|
|
5
|
+
import { Listr } from 'listr2';
|
|
6
|
+
import chalk from 'chalk';
|
|
7
|
+
|
|
8
|
+
import { showVersion, getServerType, setServerType, getSubComponents, deleteLocalComponent, checkPathAccess, getComponents } from '../../util.js';
|
|
9
|
+
import createAll from '../create-all/index.js';
|
|
10
|
+
import create from '../create/index.js';
|
|
11
|
+
|
|
12
|
+
import { JEST_ASSETS_PATH, JEST_CREATE_PATH, JEST_CREATE_ALL_CONSTELLATION_PATH, JEST_CREATE_ALL_LAUNCHPAD_PATH, TASKS_CONFIG_JSON_FILENAME, COMPONENTS_DIRECTORY_PATH } from '../../constants.js';
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
const getBuildAssetsQuestions = async () => {
|
|
16
|
+
const message = "\n**IMPORTANT** Building Jest Assets will remove any local components in your components directory!\n";
|
|
17
|
+
console.log(`${chalk.green.bold(message)}`);
|
|
18
|
+
|
|
19
|
+
return [
|
|
20
|
+
{
|
|
21
|
+
name: 'buildAssets',
|
|
22
|
+
type: 'confirm',
|
|
23
|
+
message: 'Generate Jest Assets ?',
|
|
24
|
+
default: false
|
|
25
|
+
}
|
|
26
|
+
];
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const deleteTestComponent = async(path, componentKey) => {
|
|
30
|
+
const directory = join(path, componentKey);
|
|
31
|
+
|
|
32
|
+
try {
|
|
33
|
+
fs.rmSync(directory, { recursive: true });
|
|
34
|
+
console.log(`${chalk.red.bold(componentKey)} is deleted from assets`);
|
|
35
|
+
} catch (err) {
|
|
36
|
+
console.log('no file');
|
|
37
|
+
throw new Error(`No such file ${componentKey}`);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const copyAssets = async(destinationPath) => {
|
|
42
|
+
const currentDirectory = process.cwd();
|
|
43
|
+
const pegaConfigJsonPath = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
|
|
44
|
+
|
|
45
|
+
await checkPathAccess(pegaConfigJsonPath);
|
|
46
|
+
|
|
47
|
+
let data = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
|
|
48
|
+
data = JSON.parse(data);
|
|
49
|
+
|
|
50
|
+
if (!data[COMPONENTS_DIRECTORY_PATH]) {
|
|
51
|
+
console.error(
|
|
52
|
+
`${chalk.red.bold('ERROR')} Could not able find components directory path in config.json`
|
|
53
|
+
);
|
|
54
|
+
process.exit(1);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const srcDir = join(currentDirectory, data[COMPONENTS_DIRECTORY_PATH]);
|
|
58
|
+
|
|
59
|
+
fs.cpSync(srcDir, destinationPath, { recursive: true});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const deleteAssets = async() => {
|
|
63
|
+
const currentDirectory = process.cwd();
|
|
64
|
+
const pegaConfigJsonPath = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
|
|
65
|
+
|
|
66
|
+
await checkPathAccess(pegaConfigJsonPath);
|
|
67
|
+
|
|
68
|
+
let data = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
|
|
69
|
+
data = JSON.parse(data);
|
|
70
|
+
|
|
71
|
+
if (!data[COMPONENTS_DIRECTORY_PATH]) {
|
|
72
|
+
console.error(
|
|
73
|
+
`${chalk.red.bold('ERROR')} Could not able find components directory path in config.json`
|
|
74
|
+
);
|
|
75
|
+
process.exit(1);
|
|
76
|
+
}
|
|
77
|
+
const localComponents = await getComponents();
|
|
78
|
+
|
|
79
|
+
for (const index in localComponents) {
|
|
80
|
+
const componentToDelete = localComponents[index];
|
|
81
|
+
// console.log(chalk.bold.green("Deleting: " + componentToDelete));
|
|
82
|
+
// eslint-disable-next-line no-await-in-loop
|
|
83
|
+
const directory = join(currentDirectory, data[COMPONENTS_DIRECTORY_PATH], componentToDelete);
|
|
84
|
+
|
|
85
|
+
try {
|
|
86
|
+
fs.rmSync(directory, { recursive: true });
|
|
87
|
+
console.log(`${chalk.red.bold(componentToDelete)} is deleted from Local`);
|
|
88
|
+
} catch (err) {
|
|
89
|
+
console.log('no file');
|
|
90
|
+
throw new Error(`No such file ${componentToDelete}`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const createJestAssets = async(isLaunchPad = false) => {
|
|
96
|
+
|
|
97
|
+
// initially delete local assets
|
|
98
|
+
await deleteAssets();
|
|
99
|
+
|
|
100
|
+
// const framework = await getFramework();
|
|
101
|
+
let args = [ '','', '', 'My', '0.0.1', 'DXIL', '', 'Pega'];
|
|
102
|
+
let myOptions = {};
|
|
103
|
+
myOptions["params"] = args;
|
|
104
|
+
|
|
105
|
+
await createAll(myOptions);
|
|
106
|
+
|
|
107
|
+
const jestCreateAllPath = isLaunchPad ? JEST_CREATE_ALL_LAUNCHPAD_PATH : JEST_CREATE_ALL_CONSTELLATION_PATH;
|
|
108
|
+
|
|
109
|
+
// goto Constellation
|
|
110
|
+
// get current test assets and delete them
|
|
111
|
+
let createAllPath = path.join(path.resolve(), JEST_ASSETS_PATH, jestCreateAllPath);
|
|
112
|
+
const fileList = await getSubComponents(createAllPath, '');
|
|
113
|
+
|
|
114
|
+
for (const index in fileList) {
|
|
115
|
+
const componentToDelete = fileList[index];
|
|
116
|
+
// console.log(chalk.bold.green("Deleting: " + componentToDelete));
|
|
117
|
+
// eslint-disable-next-line no-await-in-loop
|
|
118
|
+
await deleteTestComponent(createAllPath, componentToDelete);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
await copyAssets(createAllPath);
|
|
122
|
+
await deleteAssets();
|
|
123
|
+
|
|
124
|
+
args = [ '','', '', 'Field', 'Text', 'MyTestText', 'My Test Text', '0.0.1','DXIL', '', 'My Test Text Description', 'Pega'];
|
|
125
|
+
myOptions = {};
|
|
126
|
+
myOptions["params"] = args;
|
|
127
|
+
|
|
128
|
+
await create(myOptions);
|
|
129
|
+
|
|
130
|
+
let createPath = path.join(path.resolve(), JEST_ASSETS_PATH, JEST_CREATE_PATH);
|
|
131
|
+
const myFileList = await getSubComponents(createPath, '');
|
|
132
|
+
|
|
133
|
+
for (const index in myFileList) {
|
|
134
|
+
const componentToDelete = myFileList[index];
|
|
135
|
+
// console.log(chalk.bold.green("Deleting: " + componentToDelete));
|
|
136
|
+
// eslint-disable-next-line no-await-in-loop
|
|
137
|
+
await deleteTestComponent(createPath, componentToDelete);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
await copyAssets(createPath);
|
|
141
|
+
await deleteAssets();
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
export default async options => {
|
|
146
|
+
showVersion();
|
|
147
|
+
|
|
148
|
+
const questions = await getBuildAssetsQuestions();
|
|
149
|
+
const answers = await inquirer.prompt(questions);
|
|
150
|
+
const { buildAssets } = answers;
|
|
151
|
+
|
|
152
|
+
if (buildAssets) {
|
|
153
|
+
// get current server type
|
|
154
|
+
const savedServerType = await getServerType();
|
|
155
|
+
|
|
156
|
+
// Constellation
|
|
157
|
+
await setServerType("infinity");
|
|
158
|
+
await createJestAssets(false);
|
|
159
|
+
|
|
160
|
+
//Launchpad
|
|
161
|
+
await setServerType("launchpad");
|
|
162
|
+
await createJestAssets(true);
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
// restore serverType
|
|
166
|
+
await setServerType(savedServerType);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
};
|
|
@@ -304,6 +304,7 @@ export default (
|
|
|
304
304
|
resourceRegExp: /^\.\/locale$/,
|
|
305
305
|
contextRegExp: /moment$/
|
|
306
306
|
}),
|
|
307
|
+
/* cosmos 4.x and below */
|
|
307
308
|
/* Ignore cosmos icons */
|
|
308
309
|
new webpack.IgnorePlugin({
|
|
309
310
|
resourceRegExp: /^\.\/icons$/,
|
|
@@ -327,7 +328,20 @@ export default (
|
|
|
327
328
|
resourceRegExp: /^\.\/streamline-icons$/,
|
|
328
329
|
contextRegExp: /@pega\\cosmos-react-core\\lib\\components\\Icon$/
|
|
329
330
|
}),
|
|
330
|
-
|
|
331
|
+
|
|
332
|
+
/* cosmos 6.x and above */
|
|
333
|
+
/* Ignore cosmos icons */
|
|
334
|
+
new webpack.IgnorePlugin({
|
|
335
|
+
resourceRegExp: /^\.\/.*\/.*\.icon$/,
|
|
336
|
+
contextRegExp: /@pega\/cosmos-react-core\/lib\/components\/Icon$/
|
|
337
|
+
}),
|
|
338
|
+
|
|
339
|
+
/* Ignore cosmos icons - windows */
|
|
340
|
+
new webpack.IgnorePlugin({
|
|
341
|
+
resourceRegExp: /^\.\/.*\/.*\.icon$/,
|
|
342
|
+
contextRegExp: /@pega\\cosmos-react-core\\lib\\components\\Icon$/
|
|
343
|
+
}),
|
|
344
|
+
|
|
331
345
|
new webpack.optimize.LimitChunkCountPlugin({
|
|
332
346
|
maxChunks: 1
|
|
333
347
|
}),
|
|
@@ -23,20 +23,7 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
|
23
23
|
|
|
24
24
|
const props = {
|
|
25
25
|
value,
|
|
26
|
-
label: configProps.label,
|
|
27
|
-
helperText: configProps.helperText,
|
|
28
|
-
caption: configProps.caption,
|
|
29
|
-
validatemessage: configProps.validatemessage,
|
|
30
|
-
hideLabel: configProps.hideLabel,
|
|
31
|
-
testId: configProps.testId,
|
|
32
26
|
additionalProps: configProps.additionalProps,
|
|
33
|
-
displayMode: configProps.displayMode,
|
|
34
|
-
variant: configProps.variant,
|
|
35
|
-
trueLabel: configProps.trueLabel,
|
|
36
|
-
falseLabel: configProps.falseLabel,
|
|
37
|
-
disabled: configProps.disabled,
|
|
38
|
-
readOnly: configProps.readOnly,
|
|
39
|
-
required: configProps.required,
|
|
40
27
|
getPConnect: () => {
|
|
41
28
|
return {
|
|
42
29
|
getStateProps: () => {
|
|
@@ -76,6 +63,9 @@ Base{{COMPONENT_CLASS_NAME}}.args = {
|
|
|
76
63
|
required: configProps.required,
|
|
77
64
|
status: configProps.status,
|
|
78
65
|
hideLabel: configProps.hideLabel,
|
|
66
|
+
trueLabel: configProps.trueLabel,
|
|
67
|
+
falseLabel: configProps.falseLabel,
|
|
79
68
|
displayMode: configProps.displayMode,
|
|
69
|
+
variant: configProps.variant,
|
|
80
70
|
validatemessage: configProps.validatemessage
|
|
81
71
|
};
|
|
@@ -3,7 +3,8 @@ import {
|
|
|
3
3
|
CheckboxGroup,
|
|
4
4
|
FieldValueList,
|
|
5
5
|
Text,
|
|
6
|
-
withConfiguration
|
|
6
|
+
withConfiguration,
|
|
7
|
+
BooleanDisplay
|
|
7
8
|
} from "@pega/cosmos-react-core";
|
|
8
9
|
|
|
9
10
|
import type { PConnFieldProps } from './PConnProps';
|
|
@@ -96,15 +97,17 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
|
96
97
|
|
|
97
98
|
let displayComponent;
|
|
98
99
|
if (displayMode) {
|
|
99
|
-
// @ts-ignore
|
|
100
100
|
displayComponent = (
|
|
101
|
-
|
|
102
|
-
<{{COMPONENT_CLASS_NAME}} value={value} trueLabel={trueLabel} falseLabel={falseLabel} />
|
|
101
|
+
<BooleanDisplay value={value} trueLabel={trueLabel} falseLabel={falseLabel} />
|
|
103
102
|
);
|
|
104
103
|
}
|
|
105
104
|
|
|
106
105
|
if (displayMode === 'DISPLAY_ONLY') {
|
|
107
|
-
return (
|
|
106
|
+
return (
|
|
107
|
+
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
108
|
+
{displayComponent}
|
|
109
|
+
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
110
|
+
);
|
|
108
111
|
}
|
|
109
112
|
|
|
110
113
|
if (displayMode === "LABELS_LEFT") {
|
|
@@ -31,6 +31,9 @@ window.PCore.getEnvironmentInfo = () => {
|
|
|
31
31
|
|
|
32
32
|
export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
33
33
|
const props = {
|
|
34
|
+
value: configProps.value,
|
|
35
|
+
additionalProps: configProps.additionalProps,
|
|
36
|
+
hasSuggestions: configProps.hasSuggestions,
|
|
34
37
|
getPConnect: () => {
|
|
35
38
|
return {
|
|
36
39
|
getActionsApi: () => {
|
|
@@ -54,25 +57,7 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
|
54
57
|
acceptSuggestion: () => {/* nothing */},
|
|
55
58
|
clearErrorMessages: () => {/* nothing */}
|
|
56
59
|
};
|
|
57
|
-
}
|
|
58
|
-
value: configProps.value,
|
|
59
|
-
validatemessage: configProps.validatemessage,
|
|
60
|
-
label: configProps.label,
|
|
61
|
-
hideLabel: configProps.hideLabel,
|
|
62
|
-
helperText: configProps.helperText,
|
|
63
|
-
nextYearRange: configProps.nextYearRange,
|
|
64
|
-
previousYearRange: configProps.previousYearRange,
|
|
65
|
-
showWeekNumber: configProps.showWeekNumber,
|
|
66
|
-
testId: configProps.testId,
|
|
67
|
-
showAsFormattedText: configProps.showAsFormattedText,
|
|
68
|
-
additionalProps: configProps.additionalProps,
|
|
69
|
-
displayMode: configProps.displayMode,
|
|
70
|
-
variant: configProps.variant,
|
|
71
|
-
hasSuggestions: configProps.hasSuggestions,
|
|
72
|
-
validatemessage: '',
|
|
73
|
-
disabled: configProps.disabled,
|
|
74
|
-
readOnly: configProps.readOnly,
|
|
75
|
-
required: configProps.required
|
|
60
|
+
}
|
|
76
61
|
};
|
|
77
62
|
|
|
78
63
|
return (
|
|
@@ -92,6 +77,10 @@ Base{{COMPONENT_CLASS_NAME}}.args = {
|
|
|
92
77
|
required: configProps.required,
|
|
93
78
|
status: configProps.status,
|
|
94
79
|
hideLabel: configProps.hideLabel,
|
|
80
|
+
nextYearRange: configProps.nextYearRange,
|
|
81
|
+
previousYearRange: configProps.previousYearRange,
|
|
82
|
+
showAsFormattedText: configProps.showAsFormattedText,
|
|
95
83
|
displayMode: configProps.displayMode,
|
|
84
|
+
variant: configProps.variant,
|
|
96
85
|
validatemessage: configProps.validatemessage
|
|
97
86
|
};
|
|
@@ -175,7 +175,7 @@ function {{COMPONENT_CLASS_NAME}} (props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
|
175
175
|
);
|
|
176
176
|
switch(displayMode){
|
|
177
177
|
case 'DISPLAY_ONLY': {
|
|
178
|
-
return ( <Styled{{COMPONENT_CLASS_NAME}}Wrapper> displayComp </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
|
|
178
|
+
return ( <Styled{{COMPONENT_CLASS_NAME}}Wrapper> {displayComp} </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
|
|
179
179
|
}
|
|
180
180
|
case "LABELS_LEFT" : {
|
|
181
181
|
return (
|
|
@@ -31,6 +31,9 @@ window.PCore.getEnvironmentInfo = () => {
|
|
|
31
31
|
|
|
32
32
|
export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
33
33
|
const props = {
|
|
34
|
+
value: configProps.value,
|
|
35
|
+
additionalProps: configProps.additionalProps,
|
|
36
|
+
hasSuggestions: configProps.hasSuggestions,
|
|
34
37
|
getPConnect: () => {
|
|
35
38
|
return {
|
|
36
39
|
getActionsApi: () => {
|
|
@@ -54,24 +57,7 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
|
54
57
|
acceptSuggestion: () => {/* nothing */},
|
|
55
58
|
clearErrorMessages: () => {/* nothing */}
|
|
56
59
|
};
|
|
57
|
-
}
|
|
58
|
-
value: configProps.value,
|
|
59
|
-
validatemessage: configProps.validatemessage,
|
|
60
|
-
label: configProps.label,
|
|
61
|
-
hideLabel: configProps.hideLabel,
|
|
62
|
-
helperText: configProps.helperText,
|
|
63
|
-
withSeconds: configProps.withSeconds,
|
|
64
|
-
nextYearRange: configProps.nextYearRange,
|
|
65
|
-
previousYearRange: configProps.previousYearRange,
|
|
66
|
-
showWeekNumber: configProps.showWeekNumber,
|
|
67
|
-
testId: configProps.testId,
|
|
68
|
-
additionalProps: configProps.additionalProps,
|
|
69
|
-
displayMode: configProps.displayMode,
|
|
70
|
-
variant: configProps.variant,
|
|
71
|
-
hasSuggestions: configProps.hasSuggestions,
|
|
72
|
-
disabled: configProps.disabled,
|
|
73
|
-
readOnly: configProps.readOnly,
|
|
74
|
-
required: configProps.required
|
|
60
|
+
}
|
|
75
61
|
};
|
|
76
62
|
|
|
77
63
|
return (
|
|
@@ -92,6 +78,9 @@ Base{{COMPONENT_CLASS_NAME}}.args = {
|
|
|
92
78
|
required: configProps.required,
|
|
93
79
|
status: configProps.status,
|
|
94
80
|
hideLabel: configProps.hideLabel,
|
|
81
|
+
nextYearRange: configProps.nextYearRange,
|
|
82
|
+
previousYearRange: configProps.previousYearRange,
|
|
95
83
|
displayMode: configProps.displayMode,
|
|
84
|
+
variant: configProps.variant,
|
|
96
85
|
validatemessage: configProps.validatemessage
|
|
97
86
|
};
|
|
@@ -181,7 +181,7 @@ function {{COMPONENT_CLASS_NAME}} (props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
|
181
181
|
);
|
|
182
182
|
switch (displayMode) {
|
|
183
183
|
case 'DISPLAY_ONLY': {
|
|
184
|
-
return ( <Styled{{COMPONENT_CLASS_NAME}}Wrapper> displayComp </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
|
|
184
|
+
return ( <Styled{{COMPONENT_CLASS_NAME}}Wrapper> {displayComp} </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
|
|
185
185
|
}
|
|
186
186
|
case 'LABELS_LEFT': {
|
|
187
187
|
return (
|
|
@@ -20,14 +20,7 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
|
20
20
|
|
|
21
21
|
const props = {
|
|
22
22
|
value: configProps.value,
|
|
23
|
-
placeholder: configProps.placeholder,
|
|
24
|
-
label: configProps.label,
|
|
25
|
-
helperText: configProps.helperText,
|
|
26
|
-
showGroupSeparators: configProps.showGroupSeparators,
|
|
27
|
-
hasSuggestions: configProps.hasSuggestions,
|
|
28
|
-
testId: configProps.testId,
|
|
29
23
|
fieldMetadata,
|
|
30
|
-
validatemessage: '',
|
|
31
24
|
getPConnect: () => {
|
|
32
25
|
return {
|
|
33
26
|
getStateProps: () => {
|
|
@@ -66,5 +59,6 @@ Base{{COMPONENT_CLASS_NAME}}.args = {
|
|
|
66
59
|
status: configProps.status,
|
|
67
60
|
hideLabel: configProps.hideLabel,
|
|
68
61
|
displayMode: configProps.displayMode,
|
|
62
|
+
variant: configProps.variant,
|
|
69
63
|
validatemessage: configProps.validatemessage
|
|
70
64
|
};
|
|
@@ -161,7 +161,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
|
161
161
|
|
|
162
162
|
switch (displayMode) {
|
|
163
163
|
case 'DISPLAY_ONLY': {
|
|
164
|
-
return (<Styled{{COMPONENT_CLASS_NAME}}Wrapper> displayComp </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
|
|
164
|
+
return (<Styled{{COMPONENT_CLASS_NAME}}Wrapper> {displayComp} </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
|
|
165
165
|
}
|
|
166
166
|
case 'LABELS_LEFT': {
|
|
167
167
|
return (
|
package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/demo.stories.tsx.mustache
CHANGED
|
@@ -20,17 +20,8 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
|
20
20
|
|
|
21
21
|
const props = {
|
|
22
22
|
value: Number(configProps.value),
|
|
23
|
-
placeholder: configProps.placeholder,
|
|
24
|
-
label: configProps.label,
|
|
25
|
-
helperText: configProps.helperText,
|
|
26
|
-
showGroupSeparators: configProps.showGroupSeparators,
|
|
27
|
-
allowDecimals: configProps.allowDecimals,
|
|
28
|
-
currencyISOCode: configProps.currencyISOCode,
|
|
29
|
-
alwaysShowISOCode: configProps.alwaysShowISOCode,
|
|
30
23
|
hasSuggestions: configProps.hasSuggestions,
|
|
31
|
-
testId: configProps.testId,
|
|
32
24
|
fieldMetadata,
|
|
33
|
-
validatemessage: '',
|
|
34
25
|
getPConnect: () => {
|
|
35
26
|
return {
|
|
36
27
|
getStateProps: () => {
|
|
@@ -60,6 +51,7 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
|
60
51
|
|
|
61
52
|
Base{{COMPONENT_CLASS_NAME}}.args = {
|
|
62
53
|
label: configProps.label,
|
|
54
|
+
placeholder: configProps.placeholder,
|
|
63
55
|
helperText: configProps.helperText,
|
|
64
56
|
showGroupSeparators: configProps.showGroupSeparators,
|
|
65
57
|
allowDecimals: configProps.allowDecimals,
|
|
@@ -72,5 +64,6 @@ Base{{COMPONENT_CLASS_NAME}}.args = {
|
|
|
72
64
|
status: configProps.status,
|
|
73
65
|
hideLabel: configProps.hideLabel,
|
|
74
66
|
displayMode: configProps.displayMode,
|
|
67
|
+
variant: configProps.variant,
|
|
75
68
|
validatemessage: configProps.validatemessage
|
|
76
69
|
};
|
|
@@ -192,7 +192,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
|
192
192
|
|
|
193
193
|
switch (displayMode) {
|
|
194
194
|
case 'DISPLAY_ONLY': {
|
|
195
|
-
return (<Styled{{COMPONENT_CLASS_NAME}}Wrapper> displayComp </Styled{{COMPONENT_CLASS_NAME}}Wrapper>) ;
|
|
195
|
+
return (<Styled{{COMPONENT_CLASS_NAME}}Wrapper> {displayComp} </Styled{{COMPONENT_CLASS_NAME}}Wrapper>) ;
|
|
196
196
|
}
|
|
197
197
|
case 'LABELS_LEFT': {
|
|
198
198
|
return (
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
export const configProps = {
|
|
4
4
|
value: '',
|
|
5
5
|
label: 'Currency Sample',
|
|
6
|
+
placeholder: 'Currency Placeholder',
|
|
6
7
|
currencyISOCode: 'USD',
|
|
7
8
|
allowDecimals: true,
|
|
8
9
|
showGroupSeparators: true,
|
|
@@ -12,6 +13,7 @@ export const configProps = {
|
|
|
12
13
|
testId: 'currency-12345678',
|
|
13
14
|
hasSuggestions: false,
|
|
14
15
|
displayMode: '',
|
|
16
|
+
variant: '',
|
|
15
17
|
hideLabel: false,
|
|
16
18
|
readOnly: false,
|
|
17
19
|
required: false,
|
package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/demo.stories.tsx.mustache
CHANGED
|
@@ -20,14 +20,8 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
|
20
20
|
|
|
21
21
|
const props = {
|
|
22
22
|
value: configProps.value,
|
|
23
|
-
placeholder: configProps.placeholder,
|
|
24
|
-
label: configProps.label,
|
|
25
|
-
helperText: configProps.helperText,
|
|
26
|
-
showGroupSeparators: configProps.showGroupSeparators,
|
|
27
23
|
hasSuggestions: configProps.hasSuggestions,
|
|
28
|
-
testId: configProps.testId,
|
|
29
24
|
fieldMetadata,
|
|
30
|
-
validatemessage: '',
|
|
31
25
|
getPConnect: () => {
|
|
32
26
|
return {
|
|
33
27
|
getStateProps: () => {
|
|
@@ -57,6 +51,7 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
|
57
51
|
Base{{COMPONENT_CLASS_NAME}}.args = {
|
|
58
52
|
label: configProps.label,
|
|
59
53
|
helperText: configProps.helperText,
|
|
54
|
+
placeholder: configProps.placeholder,
|
|
60
55
|
showGroupSeparators: configProps.showGroupSeparators,
|
|
61
56
|
testId: configProps.testId,
|
|
62
57
|
readOnly: configProps.readOnly,
|
|
@@ -65,5 +60,6 @@ Base{{COMPONENT_CLASS_NAME}}.args = {
|
|
|
65
60
|
status: configProps.status,
|
|
66
61
|
hideLabel: configProps.hideLabel,
|
|
67
62
|
displayMode: configProps.displayMode,
|
|
63
|
+
variant: configProps.variant,
|
|
68
64
|
validatemessage: configProps.validatemessage
|
|
69
65
|
};
|
package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/index.tsx.mustache
CHANGED
|
@@ -168,7 +168,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
|
168
168
|
|
|
169
169
|
return displayMode === 'DISPLAY_ONLY' ? (
|
|
170
170
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
171
|
-
displayComp
|
|
171
|
+
{displayComp}
|
|
172
172
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
173
173
|
) : (
|
|
174
174
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|