@pega/custom-dx-components 0.23.48 → 0.23.50
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/cli.js +9 -3
- package/src/constants.js +5 -0
- package/src/tasks/build-all/helper.js +1 -1
- package/src/tasks/build-comp/helper.js +4 -2
- package/src/tasks/build-comp/index.js +8 -2
- package/src/tasks/build-jest-assets/index.js +171 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/demo.stories.tsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/index.tsx.mustache +3 -1
- package/src/tasks/create/templates/Constellation/Field/Date/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/Date/demo.stories.tsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Date/index.tsx.mustache +2 -1
- package/src/tasks/create/templates/Constellation/Field/DateTime/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/demo.stories.tsx.mustache +2 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/index.tsx.mustache +2 -1
- package/src/tasks/create/templates/Constellation/Field/Decimal/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/demo.stories.tsx.mustache +2 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/index.tsx.mustache +2 -1
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/demo.stories.tsx.mustache +4 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/index.tsx.mustache +5 -2
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/mock.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/demo.stories.tsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/index.tsx.mustache +2 -1
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/mock.ts.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/Integer/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/demo.stories.tsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/index.tsx.mustache +2 -1
- package/src/tasks/create/templates/Constellation/Field/Integer/mock.ts.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/Picklist/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/demo.stories.tsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/index.tsx.mustache +2 -1
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/demo.stories.tsx.mustache +2 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/index.tsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/demo.stories.tsx.mustache +3 -1
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/index.tsx.mustache +1 -3
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/mock.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Text/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/Text/demo.stories.tsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Text/index.tsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/demo.stories.tsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/index.tsx.mustache +2 -1
- package/src/tasks/create/templates/Constellation/Field/Text-Input/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/demo.stories.tsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/index.tsx.mustache +2 -1
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/demo.stories.tsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/index.tsx.mustache +2 -1
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/demo.stories.tsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/index.tsx.mustache +2 -1
- package/src/tasks/create/templates/Constellation/Field/Text-URL/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/demo.stories.tsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/index.tsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/demo.stories.tsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/index.tsx.mustache +2 -1
- package/src/tasks/create/templates/Constellation/Template/DETAILS/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.stories.tsx.mustache +1 -4
- package/src/tasks/create/templates/Constellation/Template/DETAILS/index.tsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/demo.stories.tsx.mustache +1 -5
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/index.tsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Template/FORM/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Template/FORM/index.tsx.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Template/FORM-region/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Template/FORM-region/index.tsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/index.tsx.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Widget/CASE/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Widget/CASE/index.tsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE/index.tsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/index.tsx.mustache +1 -0
- package/src/tasks/create/templates/Launchpad/Widget/CASE/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Launchpad/Widget/CASE/index.tsx.mustache +1 -0
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/demo.stories.tsx.mustache +1 -5
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/index.tsx.mustache +1 -0
- package/src/tasks/delete/helper.js +75 -50
- package/src/tasks/index.js +1 -0
- package/src/tasks/init/helper.js +5 -5
- package/src/tasks/init/template/package.json.mustache +5 -4
- package/src/tasks/list/helper.js +5 -2
- package/src/tasks/publish/helper.js +53 -45
- package/src/tasks/publish/index.js +8 -2
- package/src/tasks/publish-all/helper.js +6 -0
- package/src/tasks/rename/index.js +9 -2
- package/src/tasks/revert-webpack/index.js +8 -26
- package/src/util.js +51 -72
- package/tests/assets/components/create/Pega_DXIL_MyTestText/create-nonce.ts +6 -0
- package/tests/assets/components/create/Pega_DXIL_MyTestText/demo.stories.tsx +1 -0
- package/tests/assets/components/create/Pega_DXIL_MyTestText/index.tsx +1 -0
- package/tests/assets/components/create/_components.md +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/demo.stories.tsx +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/index.tsx +3 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/index.tsx +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/demo.stories.tsx +4 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/index.tsx +5 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/mock.ts +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/demo.stories.tsx +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/index.tsx +2 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/demo.stories.tsx +2 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/index.tsx +2 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/demo.stories.tsx +2 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/index.tsx +2 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/demo.stories.tsx +1 -4
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/index.tsx +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/demo.stories.tsx +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/index.tsx +2 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/index.tsx +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/demo.stories.tsx +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/index.tsx +2 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/mock.ts +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/index.tsx +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/index.tsx +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/index.tsx +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/demo.stories.tsx +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/index.tsx +2 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/demo.stories.tsx +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/index.tsx +2 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/mock.ts +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/demo.stories.tsx +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/index.tsx +2 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/demo.stories.tsx +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/index.tsx +2 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/demo.stories.tsx +3 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/index.tsx +1 -3
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/mock.ts +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/demo.stories.tsx +2 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/index.tsx +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/demo.stories.tsx +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/index.tsx +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/demo.stories.tsx +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/index.tsx +2 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/index.tsx +2 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +1 -5
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/index.tsx +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/index.tsx +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/demo.stories.tsx +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/index.tsx +1 -0
- package/tests/assets/components/createAll/Constellation/_components.md +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/demo.stories.tsx +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/index.tsx +3 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/index.tsx +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/demo.stories.tsx +4 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/index.tsx +5 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/mock.ts +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/demo.stories.tsx +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/index.tsx +2 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/demo.stories.tsx +2 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/index.tsx +2 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/demo.stories.tsx +2 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/index.tsx +2 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/demo.stories.tsx +1 -4
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/index.tsx +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/demo.stories.tsx +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/index.tsx +2 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/index.tsx +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/demo.stories.tsx +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/index.tsx +2 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/mock.ts +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/index.tsx +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +1 -5
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/index.tsx +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/index.tsx +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/demo.stories.tsx +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/index.tsx +2 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/demo.stories.tsx +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/index.tsx +2 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/mock.ts +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/demo.stories.tsx +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/index.tsx +2 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/demo.stories.tsx +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/index.tsx +2 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/demo.stories.tsx +3 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/index.tsx +1 -3
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/mock.ts +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/demo.stories.tsx +2 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/index.tsx +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/demo.stories.tsx +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/index.tsx +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/demo.stories.tsx +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/index.tsx +2 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/index.tsx +2 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +1 -5
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/index.tsx +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/index.tsx +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/demo.stories.tsx +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/index.tsx +1 -0
- package/tests/assets/components/createAll/Launchpad/_components.md +1 -0
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 = {
|
|
@@ -36,9 +37,10 @@ const TASKS = {
|
|
|
36
37
|
VALIDATE_SCHEMA: 'validateSchema',
|
|
37
38
|
UPDATE: 'update',
|
|
38
39
|
DELETE: 'delete',
|
|
39
|
-
DELETE_ALL:
|
|
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',
|
|
@@ -8,7 +8,7 @@ import chalk from 'chalk';
|
|
|
8
8
|
import { constructCompleteUrl, getComponentDirectoryPath, getComponents, getPegaServerConfig, getHttpsAgent } from '../../util.js';
|
|
9
9
|
import { PUBLISH_COMPONENT_SERVICE_REST_ENDPOINT, TOKEN_PATH } from '../../constants.js';
|
|
10
10
|
|
|
11
|
-
export const getPublishComponentQuestions = async () => {
|
|
11
|
+
export const getPublishComponentQuestions = async (componentKey) => {
|
|
12
12
|
const components = await getComponents();
|
|
13
13
|
|
|
14
14
|
if (components.length === 0) {
|
|
@@ -23,7 +23,9 @@ export const getPublishComponentQuestions = async () => {
|
|
|
23
23
|
name: 'componentKey',
|
|
24
24
|
type: 'rawlist',
|
|
25
25
|
message: 'Select component to build',
|
|
26
|
-
choices: components
|
|
26
|
+
choices: components,
|
|
27
|
+
default: componentKey,
|
|
28
|
+
when: () => !componentKey
|
|
27
29
|
},
|
|
28
30
|
{
|
|
29
31
|
name: 'sourceMap',
|
|
@@ -29,9 +29,15 @@ export default async options => {
|
|
|
29
29
|
content = { componentKey, sourceMap, devBuild};
|
|
30
30
|
}
|
|
31
31
|
else {
|
|
32
|
-
|
|
32
|
+
// VS Code pluggin would send in the component
|
|
33
|
+
let paramComponentKey;
|
|
34
|
+
if (options.params.length == 4) {
|
|
35
|
+
paramComponentKey = options.params[3];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const questions = await getPublishComponentQuestions(paramComponentKey);
|
|
33
39
|
const answers = await inquirer.prompt(questions);
|
|
34
|
-
({ componentKey, sourceMap, devBuild } = answers);
|
|
40
|
+
({ componentKey = paramComponentKey, sourceMap, devBuild } = answers);
|
|
35
41
|
|
|
36
42
|
content = {
|
|
37
43
|
...answers
|
|
@@ -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
|
+
};
|
|
@@ -69,6 +69,7 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
|
69
69
|
Base{{COMPONENT_CLASS_NAME}}.args = {
|
|
70
70
|
label: configProps.label,
|
|
71
71
|
helperText: configProps.helperText,
|
|
72
|
+
caption: configProps.caption,
|
|
72
73
|
testId: configProps.testId,
|
|
73
74
|
readOnly: configProps.readOnly,
|
|
74
75
|
disabled: configProps.disabled,
|
|
@@ -7,6 +7,8 @@ import {
|
|
|
7
7
|
} from "@pega/cosmos-react-core";
|
|
8
8
|
|
|
9
9
|
import type { PConnFieldProps } from './PConnProps';
|
|
10
|
+
import './create-nonce';
|
|
11
|
+
|
|
10
12
|
|
|
11
13
|
// includes in bundle
|
|
12
14
|
import handleEvent from "./event-utils";
|
|
@@ -104,7 +106,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
|
104
106
|
}
|
|
105
107
|
|
|
106
108
|
if (displayMode === 'DISPLAY_ONLY') {
|
|
107
|
-
return ( <Styled{{COMPONENT_CLASS_NAME}}Wrapper> displayComponent </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
|
|
109
|
+
return ( <Styled{{COMPONENT_CLASS_NAME}}Wrapper> {displayComponent} </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
|
|
108
110
|
}
|
|
109
111
|
|
|
110
112
|
if (displayMode === "LABELS_LEFT") {
|
|
@@ -85,6 +85,7 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
|
85
85
|
Base{{COMPONENT_CLASS_NAME}}.args = {
|
|
86
86
|
label: configProps.label,
|
|
87
87
|
helperText: configProps.helperText,
|
|
88
|
+
showWeekNumber: configProps.showWeekNumber,
|
|
88
89
|
testId: configProps.testId,
|
|
89
90
|
readOnly: configProps.readOnly,
|
|
90
91
|
disabled: configProps.disabled,
|
|
@@ -3,6 +3,7 @@ import { DateInput, FieldValueList, DateTimeDisplay, Text, withConfiguration } f
|
|
|
3
3
|
import FormattedText from "./FormattedText";
|
|
4
4
|
|
|
5
5
|
import type { PConnFieldProps } from './PConnProps';
|
|
6
|
+
import './create-nonce';
|
|
6
7
|
|
|
7
8
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
8
9
|
|
|
@@ -175,7 +176,7 @@ function {{COMPONENT_CLASS_NAME}} (props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
|
175
176
|
);
|
|
176
177
|
switch(displayMode){
|
|
177
178
|
case 'DISPLAY_ONLY': {
|
|
178
|
-
return ( <Styled{{COMPONENT_CLASS_NAME}}Wrapper> displayComp </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
|
|
179
|
+
return ( <Styled{{COMPONENT_CLASS_NAME}}Wrapper> {displayComp} </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
|
|
179
180
|
}
|
|
180
181
|
case "LABELS_LEFT" : {
|
|
181
182
|
return (
|
|
@@ -84,6 +84,8 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
|
84
84
|
Base{{COMPONENT_CLASS_NAME}}.args = {
|
|
85
85
|
label: configProps.label,
|
|
86
86
|
helperText: configProps.helperText,
|
|
87
|
+
withSeconds: configProps.withSeconds,
|
|
88
|
+
showWeekNumber: configProps.showWeekNumber,
|
|
87
89
|
testId: configProps.testId,
|
|
88
90
|
readOnly: configProps.readOnly,
|
|
89
91
|
disabled: configProps.disabled,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react';
|
|
2
2
|
import { DateTimeInput, FieldValueList, DateTimeDisplay, Text, withConfiguration } from "@pega/cosmos-react-core";
|
|
3
3
|
import type { PConnFieldProps } from './PConnProps';
|
|
4
|
+
import './create-nonce';
|
|
4
5
|
|
|
5
6
|
// includes in bundle
|
|
6
7
|
import DateTimeFormatter from "./date-time";
|
|
@@ -181,7 +182,7 @@ function {{COMPONENT_CLASS_NAME}} (props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
|
181
182
|
);
|
|
182
183
|
switch (displayMode) {
|
|
183
184
|
case 'DISPLAY_ONLY': {
|
|
184
|
-
return ( <Styled{{COMPONENT_CLASS_NAME}}Wrapper> displayComp </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
|
|
185
|
+
return ( <Styled{{COMPONENT_CLASS_NAME}}Wrapper> {displayComp} </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
|
|
185
186
|
}
|
|
186
187
|
case 'LABELS_LEFT': {
|
|
187
188
|
return (
|
|
@@ -57,6 +57,8 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
|
57
57
|
Base{{COMPONENT_CLASS_NAME}}.args = {
|
|
58
58
|
label: configProps.label,
|
|
59
59
|
helperText: configProps.helperText,
|
|
60
|
+
placeholder: configProps.placeholder,
|
|
61
|
+
showGroupSeparators: configProps.showGroupSeparators,
|
|
60
62
|
testId: configProps.testId,
|
|
61
63
|
readOnly: configProps.readOnly,
|
|
62
64
|
disabled: configProps.disabled,
|
|
@@ -2,6 +2,7 @@ import { useState, useEffect, useRef } from 'react';
|
|
|
2
2
|
import { NumberInput, NumberDisplay, CurrencyDisplay, FieldValueList, Text, withConfiguration } from '@pega/cosmos-react-core';
|
|
3
3
|
|
|
4
4
|
import type { PConnFieldProps } from './PConnProps';
|
|
5
|
+
import './create-nonce';
|
|
5
6
|
|
|
6
7
|
// includes in bundle
|
|
7
8
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
@@ -161,7 +162,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
|
161
162
|
|
|
162
163
|
switch (displayMode) {
|
|
163
164
|
case 'DISPLAY_ONLY': {
|
|
164
|
-
return (<Styled{{COMPONENT_CLASS_NAME}}Wrapper> displayComp </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
|
|
165
|
+
return (<Styled{{COMPONENT_CLASS_NAME}}Wrapper> {displayComp} </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
|
|
165
166
|
}
|
|
166
167
|
case 'LABELS_LEFT': {
|
|
167
168
|
return (
|
package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/demo.stories.tsx.mustache
CHANGED
|
@@ -61,6 +61,10 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
|
61
61
|
Base{{COMPONENT_CLASS_NAME}}.args = {
|
|
62
62
|
label: configProps.label,
|
|
63
63
|
helperText: configProps.helperText,
|
|
64
|
+
showGroupSeparators: configProps.showGroupSeparators,
|
|
65
|
+
allowDecimals: configProps.allowDecimals,
|
|
66
|
+
currencyISOCode: configProps.currencyISOCode,
|
|
67
|
+
alwaysShowISOCode: configProps.alwaysShowISOCode,
|
|
64
68
|
testId: configProps.testId,
|
|
65
69
|
readOnly: configProps.readOnly,
|
|
66
70
|
disabled: configProps.disabled,
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
import type { PConnFieldProps } from './PConnProps';
|
|
15
|
+
import './create-nonce';
|
|
15
16
|
|
|
16
17
|
// includes in bundle
|
|
17
18
|
import handleEvent from './event-utils';
|
|
@@ -86,6 +87,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
|
86
87
|
const [currencyValue, setCurrencyValue] = useState(() => formatValue(value));
|
|
87
88
|
|
|
88
89
|
let { readOnly = false, required = false, disabled = false } = props;
|
|
90
|
+
let { showGroupSeparators = false } = props;
|
|
89
91
|
|
|
90
92
|
[readOnly, required, disabled] = [readOnly, required, disabled].map(
|
|
91
93
|
(prop) => prop === true || (typeof prop === 'string' && prop === 'true')
|
|
@@ -120,7 +122,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
|
120
122
|
displayMode === 'DISPLAY_ONLY'
|
|
121
123
|
) {
|
|
122
124
|
let displayComp;
|
|
123
|
-
let { showGroupSeparators = false } = props;
|
|
125
|
+
// let { showGroupSeparators = false } = props;
|
|
124
126
|
if (displayMode === 'LABELS_LEFT' && isTableFormatter) {
|
|
125
127
|
noOfFractionDigits = undefined;
|
|
126
128
|
showGroupSeparators = true;
|
|
@@ -191,7 +193,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
|
191
193
|
|
|
192
194
|
switch (displayMode) {
|
|
193
195
|
case 'DISPLAY_ONLY': {
|
|
194
|
-
return (<Styled{{COMPONENT_CLASS_NAME}}Wrapper> displayComp </Styled{{COMPONENT_CLASS_NAME}}Wrapper>) ;
|
|
196
|
+
return (<Styled{{COMPONENT_CLASS_NAME}}Wrapper> {displayComp} </Styled{{COMPONENT_CLASS_NAME}}Wrapper>) ;
|
|
195
197
|
}
|
|
196
198
|
case 'LABELS_LEFT': {
|
|
197
199
|
return (
|
|
@@ -245,6 +247,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
|
245
247
|
showDecimal={allowDecimals}
|
|
246
248
|
currencyISOCode={currencyISOCode}
|
|
247
249
|
alwaysShowISOCode={alwaysShowISOCode}
|
|
250
|
+
showGroupSeparators={showGroupSeparators}
|
|
248
251
|
placeholder={placeholder}
|
|
249
252
|
disabled={disabled}
|
|
250
253
|
readOnly={readOnly}
|
package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/demo.stories.tsx.mustache
CHANGED
|
@@ -57,6 +57,7 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
|
57
57
|
Base{{COMPONENT_CLASS_NAME}}.args = {
|
|
58
58
|
label: configProps.label,
|
|
59
59
|
helperText: configProps.helperText,
|
|
60
|
+
showGroupSeparators: configProps.showGroupSeparators,
|
|
60
61
|
testId: configProps.testId,
|
|
61
62
|
readOnly: configProps.readOnly,
|
|
62
63
|
disabled: configProps.disabled,
|
package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/index.tsx.mustache
CHANGED
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
import type { PConnFieldProps } from './PConnProps';
|
|
13
|
+
import './create-nonce';
|
|
13
14
|
|
|
14
15
|
// includes in bundle
|
|
15
16
|
import handleEvent from './event-utils';
|
|
@@ -168,7 +169,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
|
168
169
|
|
|
169
170
|
return displayMode === 'DISPLAY_ONLY' ? (
|
|
170
171
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
171
|
-
displayComp
|
|
172
|
+
{displayComp}
|
|
172
173
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
173
174
|
) : (
|
|
174
175
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
@@ -56,6 +56,7 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
|
56
56
|
Base{{COMPONENT_CLASS_NAME}}.args = {
|
|
57
57
|
label: configProps.label,
|
|
58
58
|
helperText: configProps.helperText,
|
|
59
|
+
showGroupSeparators: configProps.showGroupSeparators,
|
|
59
60
|
testId: configProps.testId,
|
|
60
61
|
readOnly: configProps.readOnly,
|
|
61
62
|
disabled: configProps.disabled,
|
|
@@ -3,6 +3,7 @@ import { NumberInput, NumberDisplay, Slider, FieldValueList, CurrencyDisplay, Te
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
import type { PConnFieldProps } from './PConnProps';
|
|
6
|
+
import './create-nonce';
|
|
6
7
|
|
|
7
8
|
// includes in bundle
|
|
8
9
|
import handleEvent from "./event-utils";
|
|
@@ -187,7 +188,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
|
187
188
|
|
|
188
189
|
switch (displayMode) {
|
|
189
190
|
case 'DISPLAY_ONLY': {
|
|
190
|
-
return (<Styled{{COMPONENT_CLASS_NAME}}Wrapper> displayComp </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
|
|
191
|
+
return (<Styled{{COMPONENT_CLASS_NAME}}Wrapper> {displayComp} </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
|
|
191
192
|
}
|
|
192
193
|
case 'LABELS_LEFT': {
|
|
193
194
|
return (
|
|
@@ -86,6 +86,7 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
|
86
86
|
Base{{COMPONENT_CLASS_NAME}}.args = {
|
|
87
87
|
label: configProps.label,
|
|
88
88
|
helperText: configProps.helperText,
|
|
89
|
+
placeholder: configProps.placeholder,
|
|
89
90
|
testId: configProps.testId,
|
|
90
91
|
readOnly: configProps.readOnly,
|
|
91
92
|
disabled: configProps.disabled,
|
|
@@ -4,6 +4,7 @@ import { useState, useEffect, useRef } from 'react';
|
|
|
4
4
|
import { Select, Option, FieldValueList, Text, withConfiguration } from '@pega/cosmos-react-core';
|
|
5
5
|
|
|
6
6
|
import type { PConnFieldProps } from './PConnProps';
|
|
7
|
+
import './create-nonce';
|
|
7
8
|
|
|
8
9
|
// includes in bundle
|
|
9
10
|
import handleEvent from "./event-utils";
|
|
@@ -256,7 +257,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
|
256
257
|
|
|
257
258
|
return displayMode === 'DISPLAY_ONLY' ? (
|
|
258
259
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
259
|
-
displayComp
|
|
260
|
+
{displayComp}
|
|
260
261
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
261
262
|
) : (
|
|
262
263
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
@@ -95,6 +95,8 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
|
95
95
|
Base{{COMPONENT_CLASS_NAME}}.args = {
|
|
96
96
|
label: configProps.label,
|
|
97
97
|
helperText: configProps.helperText,
|
|
98
|
+
placeholder: configProps.placeholder,
|
|
99
|
+
isTableFormatter: false,
|
|
98
100
|
testId: configProps.testId,
|
|
99
101
|
readOnly: configProps.readOnly,
|
|
100
102
|
disabled: configProps.disabled,
|
package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/index.tsx.mustache
CHANGED
|
@@ -4,6 +4,7 @@ import { useEffect, useRef, useState, useMemo, type MutableRefObject, type SetSt
|
|
|
4
4
|
import { ComboBox, menuHelpers, debounce, throttle, Button, Icon, withConfiguration, type MenuGroupProps, type MenuItemProps } from '@pega/cosmos-react-core';
|
|
5
5
|
import get from 'lodash.get';
|
|
6
6
|
import type { PConnFieldProps } from './PConnProps';
|
|
7
|
+
import './create-nonce';
|
|
7
8
|
|
|
8
9
|
// includes in bundle
|
|
9
10
|
import handleEvent from "./event-utils";
|