@pega/custom-dx-components 0.23.20 → 0.23.21
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 +35 -35
- package/src/constants.js +14 -3
- package/src/tasks/authenticate/helper.js +44 -32
- package/src/tasks/authenticate/index.js +3 -1
- package/src/tasks/build-all/index.js +1 -1
- package/src/tasks/{build → build-comp}/index.js +1 -1
- package/src/tasks/create/index.js +20 -7
- package/src/tasks/create/templates/Constellation/Field/Boolean/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/{boolean-format.js.mustache → boolean-format.ts.mustache} +2 -2
- package/src/tasks/create/templates/Constellation/Field/Boolean/demo.stories.jsx.mustache +3 -3
- package/src/tasks/create/templates/Constellation/Field/Boolean/event-utils.ts.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/{index.jsx.mustache → index.tsx.mustache} +35 -10
- package/src/tasks/create/templates/Constellation/Field/{Date/styles.js.mustache → Boolean/styles.ts.mustache} +1 -1
- package/src/tasks/create/templates/Constellation/Field/Date/DateFormatter.js.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Field/Date/FormattedText.jsx.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Field/Date/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Field/Date/date.js.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/Date/demo.stories.jsx.mustache +3 -3
- package/src/tasks/create/templates/Constellation/Field/Date/{index.jsx.mustache → index.tsx.mustache} +82 -38
- package/src/tasks/create/templates/Constellation/Field/{Boolean/styles.js.mustache → Date/styles.ts.mustache} +1 -1
- package/src/tasks/create/templates/Constellation/Field/Date/suggestions-handler.ts +9 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/date-time.js.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Field/DateTime/date-utils.js.mustache +1 -2
- package/src/tasks/create/templates/Constellation/Field/DateTime/date.js.mustache +1 -2
- package/src/tasks/create/templates/Constellation/Field/DateTime/demo.stories.jsx.mustache +3 -3
- package/src/tasks/create/templates/Constellation/Field/DateTime/{index.jsx.mustache → index.tsx.mustache} +64 -22
- package/src/tasks/create/templates/Constellation/Field/{Decimal-Currency/styles.js.mustache → DateTime/styles.ts.mustache} +1 -1
- package/src/tasks/create/templates/Constellation/Field/DateTime/suggestions-handler.ts +10 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/demo.stories.jsx.mustache +3 -3
- package/src/tasks/create/templates/Constellation/Field/Decimal/event-utils.ts.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/{index.jsx.mustache → index.tsx.mustache} +38 -9
- package/src/tasks/create/templates/Constellation/Field/Decimal/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/suggestions-handler.ts +9 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/demo.stories.jsx.mustache +3 -3
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/event-utils.ts.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/{index.jsx.mustache → index.tsx.mustache} +50 -14
- package/src/tasks/create/templates/Constellation/Field/{DateTime/styles.js.mustache → Decimal-Currency/styles.ts.mustache} +1 -1
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/suggestions-handler.ts +9 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/demo.stories.jsx.mustache +3 -3
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/event-utils.ts.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/{index.jsx.mustache → index.tsx.mustache} +37 -8
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/suggestions-handler.ts +9 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/demo.stories.jsx.mustache +3 -3
- package/src/tasks/create/templates/Constellation/Field/Integer/event-utils.ts.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/{index.jsx.mustache → index.tsx.mustache} +52 -11
- package/src/tasks/create/templates/Constellation/Field/Integer/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/suggestions-handler.ts +9 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/demo.stories.jsx.mustache +3 -3
- package/src/tasks/create/templates/Constellation/Field/Picklist/event-utils.ts.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/{index.jsx.mustache → index.tsx.mustache} +54 -15
- package/src/tasks/create/templates/Constellation/Field/Picklist/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/suggestions-handler.ts +9 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/PConnProps.d.ts +46 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/component-constants.js +5 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/config.json.mustache +115 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/date.js.mustache +161 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/demo.stories.jsx.mustache +90 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/embed-utils.js.mustache +310 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/event-utils.ts.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/format-constants.js.mustache +41 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/index.tsx.mustache +1238 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/picklist-utils.js.mustache +88 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/repeat-constants.js.mustache +20 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/repeat-utils.js.mustache +657 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/suggestions-handler.ts.mustache +9 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/textformat-utils.jsx.mustache +161 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/utils.ts.mustache +218 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/PConnProps.d.ts +46 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/config.json.mustache +113 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/demo.stories.jsx.mustache +85 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/event-utils.ts.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/index.tsx.mustache +243 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/suggestions-handler.ts.mustache +9 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/textformat-utils.jsx.mustache +161 -0
- package/src/tasks/create/templates/Constellation/Field/Text/PConnProps.d.ts +46 -0
- package/src/tasks/create/templates/Constellation/Field/Text/demo.stories.jsx.mustache +3 -3
- package/src/tasks/create/templates/Constellation/Field/Text/{index.jsx.mustache → index.tsx.mustache} +17 -6
- package/src/tasks/create/templates/Constellation/Field/Text/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/PConnProps.d.ts +46 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/demo.stories.jsx.mustache +3 -3
- package/src/tasks/create/templates/Constellation/Field/Text-Email/event-utils.ts.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/{index.jsx.mustache → index.tsx.mustache} +30 -12
- package/src/tasks/create/templates/Constellation/Field/Text-Email/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/suggestions-handler.ts.mustache +9 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/StatusWork.tsx +30 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/demo.stories.jsx.mustache +3 -3
- package/src/tasks/create/templates/Constellation/Field/Text-Input/event-utils.ts.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/{index.jsx.mustache → index.tsx.mustache} +54 -31
- package/src/tasks/create/templates/Constellation/Field/Text-Input/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/suggestions-handler.ts.mustache +9 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/demo.stories.jsx.mustache +3 -3
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/event-utils.ts.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/{index.jsx.mustache → index.tsx.mustache} +30 -13
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/suggestions-handler.ts.mustache +9 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/demo.stories.jsx.mustache +3 -3
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/event-utils.ts.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/{index.jsx.mustache → index.tsx.mustache} +37 -16
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/suggestions-handler.ts.mustache +9 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/demo.stories.jsx.mustache +3 -3
- package/src/tasks/create/templates/Constellation/Field/Text-URL/event-utils.ts.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/{index.jsx.mustache → index.tsx.mustache} +39 -11
- package/src/tasks/create/templates/Constellation/Field/Text-URL/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/suggestions-handler.ts.mustache +9 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/text-url.jsx.mustache +2 -1
- package/src/tasks/create/templates/Constellation/Field/TimeOfDay/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Field/{TimeofDay → TimeOfDay}/demo.stories.jsx.mustache +3 -3
- package/src/tasks/create/templates/Constellation/Field/{TimeofDay/index.jsx.mustache → TimeOfDay/index.tsx.mustache} +46 -16
- package/src/tasks/create/templates/Constellation/Field/TimeOfDay/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/TimeOfDay/suggestions-handler.ts.mustache +9 -0
- package/src/tasks/create/templates/Constellation/Field/{TimeofDay → TimeOfDay}/time-of-day.js.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Template/DETAILS/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Template/{DETAILS-region/StatusWork.jsx.mustache → DETAILS/StatusWork.tsx.mustache} +2 -3
- package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.stories.jsx.mustache +3 -4
- package/src/tasks/create/templates/Constellation/Template/{DETAILS-region/index.jsx.mustache → DETAILS/index.tsx.mustache} +22 -5
- package/src/tasks/create/templates/Constellation/Template/DETAILS/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/utils.js.mustache +2 -3
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/{Field/Text-Input/StatusWork.jsx → Template/DETAILS-region/StatusWork.tsx.mustache} +2 -3
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/demo.stories.jsx.mustache +3 -4
- package/src/tasks/create/templates/Constellation/Template/{DETAILS/index.jsx.mustache → DETAILS-region/index.tsx.mustache} +21 -5
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/utils.js.mustache +0 -4
- package/src/tasks/create/templates/Constellation/Template/FORM/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Template/FORM/demo.stories.jsx.mustache +15 -13
- package/src/tasks/create/templates/Constellation/Template/FORM/{index.jsx.mustache → index.tsx.mustache} +11 -7
- package/src/tasks/create/templates/Constellation/Template/FORM/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Template/FORM-region/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Template/FORM-region/demo.stories.jsx.mustache +7 -8
- package/src/tasks/create/templates/Constellation/Template/FORM-region/{index.jsx.mustache → index.tsx.mustache} +14 -3
- package/src/tasks/create/templates/Constellation/Template/FORM-region/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/{GetNextWork.jsx.mustache → GetNextWork.tsx.mustache} +13 -6
- package/src/tasks/create/templates/Constellation/Template/PAGE/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/demo.stories.jsx.mustache +3 -3
- package/src/tasks/create/templates/Constellation/Template/PAGE/{index.jsx.mustache → index.tsx.mustache} +18 -6
- package/src/tasks/create/templates/Constellation/Template/PAGE/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/utils.js.mustache +1 -4
- package/src/tasks/create/templates/Constellation/Widget/CASE/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Widget/CASE/demo.stories.jsx.mustache +3 -3
- package/src/tasks/create/templates/Constellation/Widget/CASE/{index.jsx.mustache → index.tsx.mustache} +19 -10
- package/src/tasks/create/templates/Constellation/Widget/CASE/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE/demo.stories.jsx.mustache +3 -3
- package/src/tasks/create/templates/Constellation/Widget/PAGE/{index.jsx.mustache → index.tsx.mustache} +14 -2
- package/src/tasks/create/templates/Constellation/Widget/PAGE/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/{Avatar.jsx.mustache → Avatar.tsx.mustache} +21 -10
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/{Operator.jsx.mustache → Operator.tsx.mustache} +30 -9
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/demo.stories.jsx.mustache +2 -3
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/{index.jsx.mustache → index.tsx.mustache} +25 -4
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Launchpad/Widget/CASE/demo.stories.jsx.mustache +3 -3
- package/src/tasks/create/templates/Launchpad/Widget/CASE/index.jsx.mustache +0 -2
- package/src/tasks/create/templates/Launchpad/Widget/CASE/styles.js.mustache +1 -1
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/Avatar.jsx.mustache +2 -4
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/Operator.jsx.mustache +1 -2
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/demo.stories.jsx.mustache +2 -3
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/index.jsx.mustache +1 -2
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/styles.js.mustache +1 -1
- package/src/tasks/create-all/index.js +9 -1
- package/src/tasks/index.js +1 -1
- package/src/tasks/init/helper.js +0 -1
- package/src/tasks/init/index.js +31 -16
- package/src/tasks/init/template/.eslintrc.json +15 -10
- package/src/tasks/init/template/.storybook/main.js +12 -0
- package/src/tasks/init/template/.storybook/preview.js +14 -0
- package/src/tasks/init/template/package.json.mustache +36 -35
- package/src/tasks/publish/helper.js +34 -14
- package/src/tasks/publish/index.js +1 -1
- package/src/tasks/publish-all/helper.js +42 -16
- package/src/tasks/publish-all/index.js +1 -1
- package/src/tasks/revert-webpack/index.js +5 -7
- package/src/tasks/upgrade/index.js +1 -1
- package/src/util.js +68 -44
- package/tests/assets/components/create/Pega_DXIL_MyTestText/demo.stories.jsx +17 -11
- package/tests/assets/components/create/Pega_DXIL_MyTestText/index.jsx +0 -1
- package/tests/assets/components/create/Pega_DXIL_MyTestText/styles.js +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/component-constants.js +5 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/config.json +115 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/date.js +161 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/demo.stories.jsx +91 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/embed-utils.js +310 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/format-constants.js +41 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/index.jsx +1042 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/mock.js +69 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/picklist-utils.js +88 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/repeat-constants.js +20 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/repeat-utils.js +657 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/styles.js +15 -0
- package/{src/tasks/create/templates/Constellation/Field/Date → tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete}/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/textformat-utils.jsx +161 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/utils.js +182 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/boolean-format.js +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/demo.stories.jsx +8 -7
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/index.jsx +0 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/styles.js +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/demo.stories.jsx +22 -12
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/index.jsx +0 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/styles.js +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/demo.stories.jsx +23 -12
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/index.jsx +2 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/styles.js +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/DateFormatter.js +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/FormattedText.jsx +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/date.js +0 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/demo.stories.jsx +20 -9
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/index.jsx +1 -3
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/styles.js +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date-time.js +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date-utils.js +1 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date.js +1 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/demo.stories.jsx +20 -9
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/index.jsx +1 -3
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/styles.js +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/demo.stories.jsx +20 -11
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/index.jsx +1 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/styles.js +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/StatusWork.jsx +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/demo.stories.jsx +2 -4
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/index.jsx +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/styles.js +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/utils.js +2 -3
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/demo.stories.jsx +20 -12
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/index.jsx +1 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/styles.js +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/demo.stories.jsx +15 -21
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/index.jsx +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/styles.js +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/demo.stories.jsx +20 -11
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/index.jsx +2 -3
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/styles.js +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/GetNextWork.jsx +1 -4
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/demo.stories.jsx +20 -10
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/index.jsx +3 -3
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/styles.js +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/utils.js +1 -4
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/Avatar.jsx +2 -4
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/Operator.jsx +2 -3
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/demo.stories.jsx +22 -12
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/index.jsx +2 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/styles.js +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/demo.stories.jsx +4 -7
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/index.jsx +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/styles.js +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/demo.stories.jsx +20 -12
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/index.jsx +1 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/styles.js +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/demo.stories.jsx +20 -11
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/index.jsx +1 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/styles.js +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/demo.stories.jsx +20 -10
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/index.jsx +1 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/styles.js +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/demo.stories.jsx +20 -12
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/index.jsx +3 -3
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/mock.js +69 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/styles.js +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/config.json +113 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/demo.stories.jsx +91 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/index.jsx +218 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/mock.js +69 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/styles.js +15 -0
- package/{src/tasks/create/templates/Constellation/Field/DateTime → tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons}/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/textformat-utils.jsx +161 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/demo.stories.jsx +17 -11
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/index.jsx +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/styles.js +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/StatusWork.jsx +15 -16
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/demo.stories.jsx +20 -10
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/index.jsx +1 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/styles.js +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/demo.stories.jsx +18 -8
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/index.jsx +1 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/styles.js +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/time-of-day.js +0 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/StatusWork.jsx +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/demo.stories.jsx +2 -4
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/index.jsx +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/styles.js +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/utils.js +0 -4
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/demo.stories.jsx +6 -11
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/index.jsx +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/styles.js +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/demo.stories.jsx +20 -10
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/index.jsx +1 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/styles.js +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/text-url.jsx +2 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/component-constants.js +5 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/config.json +115 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/date.js +161 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/demo.stories.jsx +89 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/embed-utils.js +310 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/format-constants.js +41 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/index.jsx +1042 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/mock.js +69 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/picklist-utils.js +88 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/repeat-constants.js +20 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/repeat-utils.js +657 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/styles.js +15 -0
- package/{src/tasks/create/templates/Constellation/Field/Decimal-Percentage → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete}/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/textformat-utils.jsx +161 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/utils.js +182 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/boolean-format.js +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/demo.stories.jsx +8 -7
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/index.jsx +0 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/styles.js +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/demo.stories.jsx +22 -14
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/index.jsx +0 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/styles.js +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/demo.stories.jsx +23 -13
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/index.jsx +2 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/styles.js +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/DateFormatter.js +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/FormattedText.jsx +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/date.js +0 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/demo.stories.jsx +21 -10
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/index.jsx +1 -3
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/styles.js +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date-time.js +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date-utils.js +1 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date.js +1 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/demo.stories.jsx +21 -10
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/index.jsx +1 -3
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/styles.js +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/demo.stories.jsx +20 -12
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/index.jsx +1 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/styles.js +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/StatusWork.jsx +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/demo.stories.jsx +5 -6
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/index.jsx +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/styles.js +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/utils.js +2 -3
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/demo.stories.jsx +20 -12
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/index.jsx +1 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/styles.js +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/demo.stories.jsx +23 -24
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/index.jsx +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/styles.js +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/demo.stories.jsx +20 -12
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/index.jsx +2 -3
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/styles.js +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/GetNextWork.jsx +1 -4
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/demo.stories.jsx +20 -11
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/index.jsx +3 -3
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/styles.js +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/utils.js +1 -4
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/Avatar.jsx +2 -4
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/Operator.jsx +1 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/demo.stories.jsx +23 -15
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/index.jsx +1 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/styles.js +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/demo.stories.jsx +4 -9
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/index.jsx +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/styles.js +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/demo.stories.jsx +20 -12
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/index.jsx +1 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/styles.js +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/demo.stories.jsx +20 -12
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/index.jsx +1 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/styles.js +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/demo.stories.jsx +20 -11
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/index.jsx +1 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/styles.js +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/demo.stories.jsx +20 -12
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/index.jsx +3 -3
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/mock.js +69 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/styles.js +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/config.json +113 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/demo.stories.jsx +89 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/index.jsx +218 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/mock.js +69 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/styles.js +15 -0
- package/{src/tasks/create/templates/Constellation/Field/Decimal-Currency → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons}/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/textformat-utils.jsx +161 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/demo.stories.jsx +17 -11
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/index.jsx +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/styles.js +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/StatusWork.jsx +15 -16
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/demo.stories.jsx +20 -12
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/index.jsx +1 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/styles.js +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/demo.stories.jsx +18 -9
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/index.jsx +1 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/styles.js +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/time-of-day.js +0 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/StatusWork.jsx +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/demo.stories.jsx +5 -6
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/index.jsx +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/styles.js +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/utils.js +0 -4
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/demo.stories.jsx +14 -14
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/index.jsx +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/styles.js +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/demo.stories.jsx +20 -11
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/index.jsx +1 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/styles.js +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/text-url.jsx +2 -1
- package/src/tasks/create/templates/Constellation/Field/Decimal/styles.js.mustache +0 -15
- package/src/tasks/create/templates/Constellation/Field/Decimal/suggestions-handler.js +0 -10
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/styles.js.mustache +0 -15
- package/src/tasks/create/templates/Constellation/Field/Integer/event-utils.js.mustache +0 -18
- package/src/tasks/create/templates/Constellation/Field/Integer/styles.js.mustache +0 -15
- package/src/tasks/create/templates/Constellation/Field/Integer/suggestions-handler.js +0 -10
- package/src/tasks/create/templates/Constellation/Field/Picklist/event-utils.js.mustache +0 -18
- package/src/tasks/create/templates/Constellation/Field/Picklist/styles.js.mustache +0 -15
- package/src/tasks/create/templates/Constellation/Field/Picklist/suggestions-handler.js +0 -10
- package/src/tasks/create/templates/Constellation/Field/Text/styles.js.mustache +0 -15
- package/src/tasks/create/templates/Constellation/Field/Text-Email/event-utils.js.mustache +0 -18
- package/src/tasks/create/templates/Constellation/Field/Text-Email/styles.js.mustache +0 -15
- package/src/tasks/create/templates/Constellation/Field/Text-Email/suggestions-handler.js +0 -10
- package/src/tasks/create/templates/Constellation/Field/Text-Input/event-utils.js.mustache +0 -18
- package/src/tasks/create/templates/Constellation/Field/Text-Input/styles.js.mustache +0 -15
- package/src/tasks/create/templates/Constellation/Field/Text-Input/suggestions-handler.js +0 -10
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/event-utils.js.mustache +0 -18
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/styles.js.mustache +0 -15
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/suggestions-handler.js +0 -10
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/event-utils.js.mustache +0 -18
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/styles.js.mustache +0 -15
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/suggestions-handler.js +0 -10
- package/src/tasks/create/templates/Constellation/Field/Text-URL/event-utils.js.mustache +0 -18
- package/src/tasks/create/templates/Constellation/Field/Text-URL/styles.js.mustache +0 -15
- package/src/tasks/create/templates/Constellation/Field/Text-URL/suggestions-handler.js +0 -10
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/styles.js.mustache +0 -15
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/suggestions-handler.js +0 -10
- package/src/tasks/create/templates/Constellation/Template/DETAILS/StatusWork.jsx.mustache +0 -27
- package/src/tasks/create/templates/Constellation/Template/DETAILS/styles.js.mustache +0 -15
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/styles.js.mustache +0 -15
- package/src/tasks/create/templates/Constellation/Template/FORM/styles.js.mustache +0 -15
- package/src/tasks/create/templates/Constellation/Template/FORM-region/styles.js.mustache +0 -15
- package/src/tasks/create/templates/Constellation/Template/PAGE/styles.js.mustache +0 -15
- package/src/tasks/create/templates/Constellation/Widget/CASE/styles.js.mustache +0 -15
- package/src/tasks/create/templates/Constellation/Widget/PAGE/styles.js.mustache +0 -15
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/styles.js.mustache +0 -15
- package/src/tasks/init/template/.storybook/main.cjs +0 -6
- package/src/tasks/init/template/.storybook/package.json +0 -1
- package/src/tasks/init/template/.storybook/preview.tsx +0 -44
- /package/src/tasks/{build → build-comp}/helper.js +0 -0
- /package/src/tasks/create/templates/Constellation/Field/Boolean/{mock.stories.js.mustache → mock.js.mustache} +0 -0
- /package/src/tasks/create/templates/Constellation/Field/Date/{mock.stories.js.mustache → mock.js.mustache} +0 -0
- /package/src/tasks/create/templates/Constellation/Field/DateTime/{mock.stories.js.mustache → mock.js.mustache} +0 -0
- /package/src/tasks/create/templates/Constellation/Field/Decimal/{mock.stories.js.mustache → mock.js.mustache} +0 -0
- /package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/{mock.stories.js.mustache → mock.js.mustache} +0 -0
- /package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/{mock.stories.js.mustache → mock.js.mustache} +0 -0
- /package/src/tasks/create/templates/Constellation/Field/Integer/{mock.stories.js.mustache → mock.js.mustache} +0 -0
- /package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/mock.stories.js → src/tasks/create/templates/Constellation/Field/Picklist/mock.js.mustache} +0 -0
- /package/src/tasks/create/templates/Constellation/Field/{Picklist/mock.stories.js.mustache → Picklist-Autocomplete/mock.js.mustache} +0 -0
- /package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/mock.stories.js → src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/mock.js.mustache} +0 -0
- /package/src/tasks/create/templates/Constellation/Field/Text/{mock.stories.js.mustache → mock.js.mustache} +0 -0
- /package/src/tasks/create/templates/Constellation/Field/Text-Email/{mock.stories.js.mustache → mock.js.mustache} +0 -0
- /package/src/tasks/create/templates/Constellation/Field/Text-Input/{mock.stories.js.mustache → mock.js.mustache} +0 -0
- /package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/{mock.stories.js.mustache → mock.js.mustache} +0 -0
- /package/src/tasks/create/templates/Constellation/Field/Text-Phone/{mock.stories.js.mustache → mock.js.mustache} +0 -0
- /package/src/tasks/create/templates/Constellation/Field/Text-URL/{mock.stories.js.mustache → mock.js.mustache} +0 -0
- /package/src/tasks/create/templates/Constellation/Field/{TimeofDay → TimeOfDay}/config.json.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/Field/{TimeofDay/mock.stories.js.mustache → TimeOfDay/mock.js.mustache} +0 -0
- /package/src/tasks/create/templates/Constellation/Template/DETAILS/{mock.stories.js.mustache → mock.js.mustache} +0 -0
- /package/src/tasks/create/templates/Constellation/Template/DETAILS-region/{mock.stories.js.mustache → mock.js.mustache} +0 -0
- /package/src/tasks/create/templates/Constellation/Template/FORM/{mock.stories.js.mustache → mock.js.mustache} +0 -0
- /package/src/tasks/create/templates/Constellation/Template/FORM-region/{mock.stories.js.mustache → mock.js.mustache} +0 -0
- /package/src/tasks/create/templates/Constellation/Template/PAGE/{mock.stories.js.mustache → mock.js.mustache} +0 -0
- /package/src/tasks/create/templates/Constellation/Widget/CASE/{mock.stories.js.mustache → mock.js.mustache} +0 -0
- /package/src/tasks/create/templates/Constellation/Widget/PAGE/{mock.stories.js.mustache → mock.js.mustache} +0 -0
- /package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/{mock.stories.js.mustache → mock.js.mustache} +0 -0
- /package/src/tasks/create/templates/Launchpad/Widget/CASE/{mock.stories.js.mustache → mock.js.mustache} +0 -0
- /package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/{mock.stories.js.mustache → mock.js.mustache} +0 -0
- /package/tests/assets/components/create/Pega_DXIL_MyTestText/{mock.stories.js → mock.js} +0 -0
- /package/{src/tasks/create/templates/Constellation/Field/Boolean/event-utils.js.mustache → tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/event-utils.js} +0 -0
- /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/{mock.stories.js → mock.js} +0 -0
- /package/{src/tasks/create/templates/Constellation/Field/Decimal-Currency/event-utils.js.mustache → tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/event-utils.js} +0 -0
- /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/{mock.stories.js → mock.js} +0 -0
- /package/{src/tasks/create/templates/Constellation/Field/Decimal-Percentage/event-utils.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/event-utils.js} +0 -0
- /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/{mock.stories.js → mock.js} +0 -0
- /package/{src/tasks/create/templates/Constellation/Field/Decimal/event-utils.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/event-utils.js} +0 -0
- /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/{mock.stories.js → mock.js} +0 -0
- /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/{mock.stories.js → mock.js} +0 -0
|
@@ -1,19 +1,46 @@
|
|
|
1
|
-
/* eslint-disable import/no-relative-packages */
|
|
2
1
|
import { useState, useEffect, useRef } from 'react';
|
|
3
2
|
import { NumberInput, NumberDisplay, CurrencyDisplay, FieldValueList, Text } from '@pega/cosmos-react-core';
|
|
4
3
|
import PropTypes from 'prop-types';
|
|
5
4
|
|
|
5
|
+
import type { PConnFieldProps } from './PConnProps';
|
|
6
|
+
|
|
6
7
|
// includes in bundle
|
|
7
8
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
8
9
|
import handleEvent from "./event-utils";
|
|
9
10
|
import { suggestionsHandler } from './suggestions-handler';
|
|
10
11
|
|
|
12
|
+
// interface for props
|
|
13
|
+
interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
14
|
+
// If any, enter additional props that only exist on TextInput here
|
|
15
|
+
displayAsStatus?: boolean;
|
|
16
|
+
isTableFormatter?: boolean;
|
|
17
|
+
hasSuggestions?: boolean;
|
|
18
|
+
variant?: any;
|
|
19
|
+
formatter: string;
|
|
20
|
+
decimalPrecision: string;
|
|
21
|
+
allowDecimals: boolean;
|
|
22
|
+
currencyISOCode: string;
|
|
23
|
+
alwaysShowISOCode: boolean;
|
|
24
|
+
isoCodeSelection: string;
|
|
25
|
+
additionalProps: any;
|
|
26
|
+
showGroupSeparators: boolean;
|
|
27
|
+
currencyDisplay: 'symbol' | 'code' | 'name' | undefined;
|
|
28
|
+
negative: 'minus-sign' | 'parentheses' | undefined;
|
|
29
|
+
notation: 'standard' | 'compact' | undefined;
|
|
30
|
+
currencyDecimalPrecision: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// interface for StateProps object
|
|
34
|
+
interface StateProps {
|
|
35
|
+
value: string;
|
|
36
|
+
hasSuggestions: boolean;
|
|
37
|
+
}
|
|
11
38
|
|
|
12
39
|
// Duplicated runtime code from Constellation Design System Component
|
|
13
40
|
|
|
14
41
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
15
42
|
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
16
|
-
|
|
43
|
+
export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
17
44
|
const {
|
|
18
45
|
getPConnect,
|
|
19
46
|
value,
|
|
@@ -37,7 +64,8 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
37
64
|
let { currencyDisplay } = props;
|
|
38
65
|
const pConn = getPConnect();
|
|
39
66
|
const actions = pConn.getActionsApi();
|
|
40
|
-
const
|
|
67
|
+
const stateProps = pConn.getStateProps() as StateProps;
|
|
68
|
+
const propName: string = stateProps.value;
|
|
41
69
|
const [decimalValue, setDecimalValue] = useState(value?.toString());
|
|
42
70
|
const hasValueChange = useRef(false);
|
|
43
71
|
|
|
@@ -57,11 +85,12 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
57
85
|
} else if (!hasSuggestions && status !== 'success') {
|
|
58
86
|
setStatus(validatemessage !== '' ? 'error' : undefined);
|
|
59
87
|
}
|
|
60
|
-
}, [validatemessage, hasSuggestions]);
|
|
88
|
+
}, [validatemessage, hasSuggestions, status]);
|
|
61
89
|
|
|
62
90
|
const { decimalPrecision, currencyDecimalPrecision } = props;
|
|
63
91
|
let numberOfDecimals = parseInt(decimalPrecision, 10);
|
|
64
92
|
if (Number.isNaN(numberOfDecimals)) {
|
|
93
|
+
// @ts-ignore
|
|
65
94
|
numberOfDecimals = decimalPrecision === '' ? undefined : 2;
|
|
66
95
|
}
|
|
67
96
|
let noOfFractionDigits = currencyDecimalPrecision === 'auto' ? undefined : parseInt(currencyDecimalPrecision, 10);
|
|
@@ -72,7 +101,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
72
101
|
|
|
73
102
|
let unit;
|
|
74
103
|
|
|
75
|
-
if (['DISPLAY_ONLY', 'LABELS_LEFT', 'STACKED_LARGE_VAL'].includes(displayMode)) {
|
|
104
|
+
if (['DISPLAY_ONLY', 'LABELS_LEFT', 'STACKED_LARGE_VAL'].includes(displayMode as string)) {
|
|
76
105
|
if (displayMode !== 'STACKED_LARGE_VAL' && isTableFormatter) {
|
|
77
106
|
showGroupSeparators = true;
|
|
78
107
|
noOfFractionDigits = undefined;
|
|
@@ -171,7 +200,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
171
200
|
}
|
|
172
201
|
}
|
|
173
202
|
|
|
174
|
-
const onResolveSuggestionHandler = (accepted) => {
|
|
203
|
+
const onResolveSuggestionHandler = (accepted: boolean) => {
|
|
175
204
|
suggestionsHandler(accepted, pConn, setStatus);
|
|
176
205
|
};
|
|
177
206
|
|
|
@@ -197,15 +226,17 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
197
226
|
}
|
|
198
227
|
setDecimalValue(enteredValue);
|
|
199
228
|
if (value !== (enteredValue !== '' ? Number(enteredValue) : '')) {
|
|
229
|
+
// @ts-ignore
|
|
200
230
|
handleEvent(actions, 'change', propName, enteredValue !== '' ? Number(enteredValue) : '');
|
|
201
231
|
hasValueChange.current = true;
|
|
202
232
|
}
|
|
203
233
|
}}
|
|
204
234
|
onBlur={() => {
|
|
205
235
|
if (!value || hasValueChange.current) {
|
|
236
|
+
// @ts-ignore
|
|
206
237
|
handleEvent(actions, 'blur', propName, decimalValue !== '' ? Number(decimalValue) : '');
|
|
207
238
|
if (hasSuggestions) {
|
|
208
|
-
pConn.ignoreSuggestion();
|
|
239
|
+
pConn.ignoreSuggestion("");
|
|
209
240
|
}
|
|
210
241
|
hasValueChange.current = false;
|
|
211
242
|
}
|
|
@@ -270,5 +301,3 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
270
301
|
isTableFormatter: PropTypes.bool,
|
|
271
302
|
hasSuggestions: PropTypes.bool
|
|
272
303
|
};
|
|
273
|
-
|
|
274
|
-
export default {{COMPONENT_CLASS_NAME}};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
// utilizing theming, comment out, if want individual style
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { Configuration } from '@pega/cosmos-react-core';
|
|
5
|
+
|
|
6
|
+
export default styled(Configuration)``;
|
|
7
|
+
|
|
8
|
+
// individual style, comment out above, and uncomment here and add styles
|
|
9
|
+
// import styled, { css } from 'styled-components';
|
|
10
|
+
//
|
|
11
|
+
// export default styled.div(() => {
|
|
12
|
+
// return css`
|
|
13
|
+
// margin: 0px 0;
|
|
14
|
+
// `;
|
|
15
|
+
// });
|
package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/PConnProps.d.ts.mustache
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import {PConnect } from '@pega/pcore-pconnect-typedefs';
|
|
2
|
+
|
|
3
|
+
// PConnProps.d.ts
|
|
4
|
+
// This gives us a place to have each component (which is most DX Components) that is
|
|
5
|
+
// expected to have a getPConnect extend its props (from BaseProps)
|
|
6
|
+
// such that every component will be expected to have a getPConnect() function
|
|
7
|
+
// that returns a PConnect object. (new/better way of doing .propTypes).
|
|
8
|
+
// This PConnProps can be extended to include other props that we know are in every component
|
|
9
|
+
export interface PConnProps {
|
|
10
|
+
// getPConnect should exist for every C11n component. (add @ts-ignore in special cases where it isn't)
|
|
11
|
+
getPConnect: () => typeof PConnect;
|
|
12
|
+
|
|
13
|
+
// Allow any/all other key/value pairs in the BaseProps for now
|
|
14
|
+
// TODO: refine which other props are always expected for various component
|
|
15
|
+
// types and consider further interface "subclassing". For example, we may
|
|
16
|
+
// want to create a "BasePropsForm" that gives guidance on required, readonly, etc.
|
|
17
|
+
// and any other props that every Form component expects.
|
|
18
|
+
// For example, see the PConnFieldProps below.
|
|
19
|
+
// NOTE: if you uncomment the line below, the PConnProps type will allow
|
|
20
|
+
// otherwise undefined types to appear. This can be helpful for debugging
|
|
21
|
+
// or when adding new components whose types aren't yet known.
|
|
22
|
+
// [key: string]: any;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
// PConnFieldProps extends PConnProps to bring in the common properties that are
|
|
27
|
+
// associated with most field components (ex: Dropdown, TextInput, etc.) in the
|
|
28
|
+
// components/field directory
|
|
29
|
+
export interface PConnFieldProps extends PConnProps {
|
|
30
|
+
label: string,
|
|
31
|
+
required: boolean,
|
|
32
|
+
disabled: boolean,
|
|
33
|
+
value: any,
|
|
34
|
+
validatemessage: string,
|
|
35
|
+
status?: string,
|
|
36
|
+
onChange?: any,
|
|
37
|
+
onBlur?: any,
|
|
38
|
+
readOnly: boolean,
|
|
39
|
+
testId: string,
|
|
40
|
+
helperText: string,
|
|
41
|
+
displayMode?: string,
|
|
42
|
+
hideLabel: boolean,
|
|
43
|
+
placeholder?: string,
|
|
44
|
+
fieldMetadata?: any,
|
|
45
|
+
additionalProps?: any
|
|
46
|
+
}
|
package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/demo.stories.jsx.mustache
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
/* eslint-disable storybook/prefer-pascal-case */
|
|
3
3
|
/* eslint-disable react/jsx-no-useless-fragment */
|
|
4
4
|
import { withKnobs } from '@storybook/addon-knobs';
|
|
5
5
|
|
|
6
|
-
import { configProps, fieldMetadata, stateProps } from './mock.
|
|
6
|
+
import { configProps, fieldMetadata, stateProps } from './mock.js';
|
|
7
7
|
|
|
8
8
|
import {{COMPONENT_CLASS_NAME}} from './index.jsx';
|
|
9
9
|
|
|
@@ -13,7 +13,7 @@ export default {
|
|
|
13
13
|
component: {{COMPONENT_CLASS_NAME}}
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
export const
|
|
16
|
+
export const Base{{COMPONENT_CLASS_NAME}} = () => {
|
|
17
17
|
|
|
18
18
|
const props = {
|
|
19
19
|
value: Number(configProps.value),
|
package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/event-utils.ts.mustache
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const handleEvent = (actions: any, eventType: string, propName: string, value: string) => {
|
|
2
|
+
switch (eventType) {
|
|
3
|
+
case 'change':
|
|
4
|
+
actions.updateFieldValue(propName, value);
|
|
5
|
+
break;
|
|
6
|
+
case 'blur':
|
|
7
|
+
actions.triggerFieldChange(propName, value);
|
|
8
|
+
break;
|
|
9
|
+
case 'changeNblur':
|
|
10
|
+
actions.updateFieldValue(propName, value);
|
|
11
|
+
actions.triggerFieldChange(propName, value);
|
|
12
|
+
break;
|
|
13
|
+
default:
|
|
14
|
+
break;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export default handleEvent;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
import { useState, useEffect } from 'react';
|
|
3
3
|
import {
|
|
4
4
|
CurrencyInput as CosmosCurrency,
|
|
@@ -10,13 +10,42 @@ import {
|
|
|
10
10
|
} from '@pega/cosmos-react-core';
|
|
11
11
|
import PropTypes from 'prop-types';
|
|
12
12
|
|
|
13
|
+
import type { PConnFieldProps } from './PConnProps';
|
|
14
|
+
|
|
13
15
|
// includes in bundle
|
|
14
16
|
import handleEvent from './event-utils';
|
|
15
17
|
import { suggestionsHandler } from './suggestions-handler';
|
|
16
18
|
|
|
17
19
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
// interface for props
|
|
22
|
+
interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
23
|
+
// If any, enter additional props that only exist on TextInput here
|
|
24
|
+
displayAsStatus?: boolean;
|
|
25
|
+
isTableFormatter?: boolean;
|
|
26
|
+
hasSuggestions?: boolean;
|
|
27
|
+
variant?: any;
|
|
28
|
+
formatter: string;
|
|
29
|
+
decimalPrecision: string;
|
|
30
|
+
allowDecimals: boolean;
|
|
31
|
+
currencyISOCode: string;
|
|
32
|
+
alwaysShowISOCode: boolean;
|
|
33
|
+
isoCodeSelection: string;
|
|
34
|
+
additionalProps: any;
|
|
35
|
+
showGroupSeparators: boolean;
|
|
36
|
+
currencyDisplay: 'symbol' | 'code' | 'name' | undefined;
|
|
37
|
+
negative: 'minus-sign' | 'parentheses' | undefined;
|
|
38
|
+
notation: 'standard' | 'compact' | undefined;
|
|
39
|
+
currencyDecimalPrecision: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// interface for StateProps object
|
|
43
|
+
interface StateProps {
|
|
44
|
+
value: string;
|
|
45
|
+
hasSuggestions: boolean;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const formatValue = (value: any) => {
|
|
20
49
|
if (!value && value !== 0) return '';
|
|
21
50
|
const [integer, decimal = ''] = value.toString().split('.');
|
|
22
51
|
return `${integer}.${decimal.padEnd(3, '0')}`;
|
|
@@ -27,7 +56,7 @@ const formatValue = (value) => {
|
|
|
27
56
|
|
|
28
57
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
29
58
|
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
30
|
-
|
|
59
|
+
export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
31
60
|
const {
|
|
32
61
|
getPConnect,
|
|
33
62
|
value,
|
|
@@ -52,7 +81,8 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
52
81
|
let { currencyDisplay } = props;
|
|
53
82
|
const pConn = getPConnect();
|
|
54
83
|
const actions = pConn.getActionsApi();
|
|
55
|
-
const
|
|
84
|
+
const stateProps = pConn.getStateProps() as StateProps;
|
|
85
|
+
const propName: string = stateProps.value;
|
|
56
86
|
const [currencyValue, setCurrencyValue] = useState(() => formatValue(value));
|
|
57
87
|
|
|
58
88
|
let { readOnly, required, disabled } = props;
|
|
@@ -72,18 +102,23 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
72
102
|
} else if (!hasSuggestions && status !== 'success') {
|
|
73
103
|
setStatus(validatemessage !== '' ? 'error' : undefined);
|
|
74
104
|
}
|
|
75
|
-
}, [validatemessage, hasSuggestions]);
|
|
105
|
+
}, [validatemessage, hasSuggestions, status]);
|
|
76
106
|
|
|
77
107
|
useAfterInitialEffect(() => {
|
|
78
108
|
setCurrencyValue(formatValue(value));
|
|
79
109
|
}, [value]);
|
|
80
110
|
|
|
81
111
|
const { decimalPrecision, currencyDecimalPrecision } = props;
|
|
82
|
-
let noOfDecimals = parseInt(decimalPrecision, 10);
|
|
83
|
-
if (Number.isNaN(noOfDecimals)) noOfDecimals =
|
|
84
|
-
let noOfFractionDigits =
|
|
112
|
+
let noOfDecimals: number = parseInt(decimalPrecision, 10);
|
|
113
|
+
if (Number.isNaN(noOfDecimals)) noOfDecimals = 0;
|
|
114
|
+
let noOfFractionDigits =
|
|
115
|
+
currencyDecimalPrecision === 'auto' ? undefined : parseInt(currencyDecimalPrecision, 10);
|
|
85
116
|
|
|
86
|
-
if (
|
|
117
|
+
if (
|
|
118
|
+
displayMode === 'LABELS_LEFT' ||
|
|
119
|
+
displayMode === 'STACKED_LARGE_VAL' ||
|
|
120
|
+
displayMode === 'DISPLAY_ONLY'
|
|
121
|
+
) {
|
|
87
122
|
let displayComp;
|
|
88
123
|
let { showGroupSeparators } = props;
|
|
89
124
|
if (displayMode === 'LABELS_LEFT' && isTableFormatter) {
|
|
@@ -194,7 +229,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
194
229
|
}
|
|
195
230
|
}
|
|
196
231
|
|
|
197
|
-
const onResolveSuggestionHandler = (accepted) => {
|
|
232
|
+
const onResolveSuggestionHandler = (accepted: boolean) => {
|
|
198
233
|
suggestionsHandler(accepted, pConn, setStatus);
|
|
199
234
|
};
|
|
200
235
|
|
|
@@ -221,15 +256,18 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
221
256
|
}
|
|
222
257
|
setCurrencyValue(enteredValue);
|
|
223
258
|
pConn.clearErrorMessages({
|
|
224
|
-
|
|
259
|
+
category: '',
|
|
260
|
+
property: propName,
|
|
261
|
+
context: ''
|
|
225
262
|
});
|
|
226
263
|
}}
|
|
227
264
|
onBlur={(enteredValue) => {
|
|
228
265
|
const parsedValue = enteredValue !== '' ? Number(enteredValue) : enteredValue;
|
|
229
266
|
if (!readOnly && (!value || value !== parsedValue)) {
|
|
267
|
+
// @ts-ignore
|
|
230
268
|
handleEvent(actions, 'changeNblur', propName, parsedValue);
|
|
231
269
|
if (hasSuggestions) {
|
|
232
|
-
pConn.ignoreSuggestion();
|
|
270
|
+
pConn.ignoreSuggestion('');
|
|
233
271
|
}
|
|
234
272
|
}
|
|
235
273
|
}}
|
|
@@ -296,5 +334,3 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
296
334
|
alwaysShowISOCode: PropTypes.bool,
|
|
297
335
|
hasSuggestions: PropTypes.bool
|
|
298
336
|
};
|
|
299
|
-
|
|
300
|
-
export default {{COMPONENT_CLASS_NAME}};
|
package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/PConnProps.d.ts.mustache
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import {PConnect } from '@pega/pcore-pconnect-typedefs';
|
|
2
|
+
|
|
3
|
+
// PConnProps.d.ts
|
|
4
|
+
// This gives us a place to have each component (which is most DX Components) that is
|
|
5
|
+
// expected to have a getPConnect extend its props (from BaseProps)
|
|
6
|
+
// such that every component will be expected to have a getPConnect() function
|
|
7
|
+
// that returns a PConnect object. (new/better way of doing .propTypes).
|
|
8
|
+
// This PConnProps can be extended to include other props that we know are in every component
|
|
9
|
+
export interface PConnProps {
|
|
10
|
+
// getPConnect should exist for every C11n component. (add @ts-ignore in special cases where it isn't)
|
|
11
|
+
getPConnect: () => typeof PConnect;
|
|
12
|
+
|
|
13
|
+
// Allow any/all other key/value pairs in the BaseProps for now
|
|
14
|
+
// TODO: refine which other props are always expected for various component
|
|
15
|
+
// types and consider further interface "subclassing". For example, we may
|
|
16
|
+
// want to create a "BasePropsForm" that gives guidance on required, readonly, etc.
|
|
17
|
+
// and any other props that every Form component expects.
|
|
18
|
+
// For example, see the PConnFieldProps below.
|
|
19
|
+
// NOTE: if you uncomment the line below, the PConnProps type will allow
|
|
20
|
+
// otherwise undefined types to appear. This can be helpful for debugging
|
|
21
|
+
// or when adding new components whose types aren't yet known.
|
|
22
|
+
// [key: string]: any;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
// PConnFieldProps extends PConnProps to bring in the common properties that are
|
|
27
|
+
// associated with most field components (ex: Dropdown, TextInput, etc.) in the
|
|
28
|
+
// components/field directory
|
|
29
|
+
export interface PConnFieldProps extends PConnProps {
|
|
30
|
+
label: string,
|
|
31
|
+
required: boolean,
|
|
32
|
+
disabled: boolean,
|
|
33
|
+
value: any,
|
|
34
|
+
validatemessage: string,
|
|
35
|
+
status?: string,
|
|
36
|
+
onChange?: any,
|
|
37
|
+
onBlur?: any,
|
|
38
|
+
readOnly: boolean,
|
|
39
|
+
testId: string,
|
|
40
|
+
helperText: string,
|
|
41
|
+
displayMode?: string,
|
|
42
|
+
hideLabel: boolean,
|
|
43
|
+
placeholder?: string,
|
|
44
|
+
fieldMetadata?: any,
|
|
45
|
+
additionalProps?: any
|
|
46
|
+
}
|
package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/demo.stories.jsx.mustache
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
/* eslint-disable storybook/prefer-pascal-case */
|
|
3
3
|
/* eslint-disable react/jsx-no-useless-fragment */
|
|
4
4
|
import { withKnobs } from '@storybook/addon-knobs';
|
|
5
5
|
|
|
6
|
-
import { configProps, stateProps, fieldMetadata } from './mock.
|
|
6
|
+
import { configProps, stateProps, fieldMetadata } from './mock.js';
|
|
7
7
|
|
|
8
8
|
import {{COMPONENT_CLASS_NAME}} from './index.jsx';
|
|
9
9
|
|
|
@@ -13,7 +13,7 @@ export default {
|
|
|
13
13
|
component: {{COMPONENT_CLASS_NAME}}
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
export const
|
|
16
|
+
export const Base{{COMPONENT_CLASS_NAME}} = () => {
|
|
17
17
|
|
|
18
18
|
const props = {
|
|
19
19
|
value: configProps.value,
|
package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/event-utils.ts.mustache
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const handleEvent = (actions: any, eventType: string, propName: string, value: string) => {
|
|
2
|
+
switch (eventType) {
|
|
3
|
+
case 'change':
|
|
4
|
+
actions.updateFieldValue(propName, value);
|
|
5
|
+
break;
|
|
6
|
+
case 'blur':
|
|
7
|
+
actions.triggerFieldChange(propName, value);
|
|
8
|
+
break;
|
|
9
|
+
case 'changeNblur':
|
|
10
|
+
actions.updateFieldValue(propName, value);
|
|
11
|
+
actions.triggerFieldChange(propName, value);
|
|
12
|
+
break;
|
|
13
|
+
default:
|
|
14
|
+
break;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export default handleEvent;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable import/no-relative-packages */
|
|
2
1
|
import { useState, useEffect, useRef } from 'react';
|
|
3
2
|
import {
|
|
4
3
|
NumberInput,
|
|
@@ -9,18 +8,46 @@ import {
|
|
|
9
8
|
} from '@pega/cosmos-react-core';
|
|
10
9
|
import PropTypes from 'prop-types';
|
|
11
10
|
|
|
11
|
+
import type { PConnFieldProps } from './PConnProps';
|
|
12
|
+
|
|
12
13
|
// includes in bundle
|
|
13
14
|
import handleEvent from './event-utils';
|
|
14
15
|
import { suggestionsHandler } from './suggestions-handler';
|
|
15
16
|
|
|
16
17
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
17
18
|
|
|
19
|
+
// interface for props
|
|
20
|
+
interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
|
|
21
|
+
// If any, enter additional props that only exist on TextInput here
|
|
22
|
+
displayAsStatus?: boolean;
|
|
23
|
+
isTableFormatter?: boolean;
|
|
24
|
+
hasSuggestions?: boolean;
|
|
25
|
+
variant?: any;
|
|
26
|
+
formatter: string;
|
|
27
|
+
decimalPrecision: string;
|
|
28
|
+
allowDecimals: boolean;
|
|
29
|
+
currencyISOCode: string;
|
|
30
|
+
alwaysShowISOCode: boolean;
|
|
31
|
+
isoCodeSelection: string;
|
|
32
|
+
additionalProps: any;
|
|
33
|
+
showGroupSeparators: boolean;
|
|
34
|
+
currencyDisplay: 'symbol' | 'code' | 'name' | undefined;
|
|
35
|
+
negative: 'minus-sign' | 'parentheses' | undefined;
|
|
36
|
+
notation: 'standard' | 'compact' | undefined;
|
|
37
|
+
currencyDecimalPrecision: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// interface for StateProps object
|
|
41
|
+
interface StateProps {
|
|
42
|
+
value: string;
|
|
43
|
+
hasSuggestions: boolean;
|
|
44
|
+
}
|
|
18
45
|
|
|
19
46
|
// Duplicated runtime code from Constellation Design System Component
|
|
20
47
|
|
|
21
48
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
22
49
|
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
23
|
-
|
|
50
|
+
export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
24
51
|
const {
|
|
25
52
|
getPConnect,
|
|
26
53
|
value,
|
|
@@ -41,7 +68,8 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
41
68
|
let { showGroupSeparators } = props;
|
|
42
69
|
const pConn = getPConnect();
|
|
43
70
|
const actions = pConn.getActionsApi();
|
|
44
|
-
const
|
|
71
|
+
const stateProps = pConn.getStateProps() as StateProps;
|
|
72
|
+
const propName: string = stateProps.value;
|
|
45
73
|
const [percentageValue, setPercentageValue] = useState(value?.toString());
|
|
46
74
|
|
|
47
75
|
const hasValueChange = useRef(false);
|
|
@@ -62,10 +90,11 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
62
90
|
} else if (!hasSuggestions && status !== 'success') {
|
|
63
91
|
setStatus(validatemessage !== '' ? 'error' : undefined);
|
|
64
92
|
}
|
|
65
|
-
}, [validatemessage, hasSuggestions]);
|
|
93
|
+
}, [validatemessage, hasSuggestions, status]);
|
|
66
94
|
|
|
67
95
|
let numberOfDecimals = parseInt(decimalPrecision, 10);
|
|
68
96
|
if (Number.isNaN(numberOfDecimals)) {
|
|
97
|
+
// @ts-ignore
|
|
69
98
|
numberOfDecimals = decimalPrecision === '' ? undefined : 2;
|
|
70
99
|
}
|
|
71
100
|
|
|
@@ -189,7 +218,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
189
218
|
);
|
|
190
219
|
}
|
|
191
220
|
|
|
192
|
-
const onResolveSuggestionHandler = (accepted) => {
|
|
221
|
+
const onResolveSuggestionHandler = (accepted: boolean) => {
|
|
193
222
|
suggestionsHandler(accepted, pConn, setStatus);
|
|
194
223
|
};
|
|
195
224
|
|
|
@@ -216,6 +245,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
216
245
|
}
|
|
217
246
|
setPercentageValue(enteredValue);
|
|
218
247
|
if (value !== enteredValue) {
|
|
248
|
+
// @ts-ignore
|
|
219
249
|
handleEvent(actions, 'change', propName, enteredValue);
|
|
220
250
|
hasValueChange.current = true;
|
|
221
251
|
}
|
|
@@ -223,9 +253,10 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
223
253
|
onBlur={() => {
|
|
224
254
|
const parsedValue = percentageValue !== '' ? Number(percentageValue) : '';
|
|
225
255
|
if (!value || hasValueChange.current) {
|
|
256
|
+
// @ts-ignore
|
|
226
257
|
handleEvent(actions, 'blur', propName, parsedValue);
|
|
227
258
|
if (hasSuggestions) {
|
|
228
|
-
pConn.ignoreSuggestion();
|
|
259
|
+
pConn.ignoreSuggestion("");
|
|
229
260
|
}
|
|
230
261
|
hasValueChange.current = false;
|
|
231
262
|
}
|
|
@@ -279,5 +310,3 @@ const {{COMPONENT_CLASS_NAME}} = props => {
|
|
|
279
310
|
isTableFormatter: PropTypes.bool,
|
|
280
311
|
hasSuggestions: PropTypes.bool
|
|
281
312
|
};
|
|
282
|
-
|
|
283
|
-
export default {{COMPONENT_CLASS_NAME}};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
// utilizing theming, comment out, if want individual style
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { Configuration } from '@pega/cosmos-react-core';
|
|
5
|
+
|
|
6
|
+
export default styled(Configuration)``;
|
|
7
|
+
|
|
8
|
+
// individual style, comment out above, and uncomment here and add styles
|
|
9
|
+
// import styled, { css } from 'styled-components';
|
|
10
|
+
//
|
|
11
|
+
// export default styled.div(() => {
|
|
12
|
+
// return css`
|
|
13
|
+
// margin: 0px 0;
|
|
14
|
+
// `;
|
|
15
|
+
// });
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import {PConnect } from '@pega/pcore-pconnect-typedefs';
|
|
2
|
+
|
|
3
|
+
// PConnProps.d.ts
|
|
4
|
+
// This gives us a place to have each component (which is most DX Components) that is
|
|
5
|
+
// expected to have a getPConnect extend its props (from BaseProps)
|
|
6
|
+
// such that every component will be expected to have a getPConnect() function
|
|
7
|
+
// that returns a PConnect object. (new/better way of doing .propTypes).
|
|
8
|
+
// This PConnProps can be extended to include other props that we know are in every component
|
|
9
|
+
export interface PConnProps {
|
|
10
|
+
// getPConnect should exist for every C11n component. (add @ts-ignore in special cases where it isn't)
|
|
11
|
+
getPConnect: () => typeof PConnect;
|
|
12
|
+
|
|
13
|
+
// Allow any/all other key/value pairs in the BaseProps for now
|
|
14
|
+
// TODO: refine which other props are always expected for various component
|
|
15
|
+
// types and consider further interface "subclassing". For example, we may
|
|
16
|
+
// want to create a "BasePropsForm" that gives guidance on required, readonly, etc.
|
|
17
|
+
// and any other props that every Form component expects.
|
|
18
|
+
// For example, see the PConnFieldProps below.
|
|
19
|
+
// NOTE: if you uncomment the line below, the PConnProps type will allow
|
|
20
|
+
// otherwise undefined types to appear. This can be helpful for debugging
|
|
21
|
+
// or when adding new components whose types aren't yet known.
|
|
22
|
+
// [key: string]: any;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
// PConnFieldProps extends PConnProps to bring in the common properties that are
|
|
27
|
+
// associated with most field components (ex: Dropdown, TextInput, etc.) in the
|
|
28
|
+
// components/field directory
|
|
29
|
+
export interface PConnFieldProps extends PConnProps {
|
|
30
|
+
label: string,
|
|
31
|
+
required: boolean,
|
|
32
|
+
disabled: boolean,
|
|
33
|
+
value: any,
|
|
34
|
+
validatemessage: string,
|
|
35
|
+
status?: string,
|
|
36
|
+
onChange?: any,
|
|
37
|
+
onBlur?: any,
|
|
38
|
+
readOnly: boolean,
|
|
39
|
+
testId: string,
|
|
40
|
+
helperText: string,
|
|
41
|
+
displayMode?: string,
|
|
42
|
+
hideLabel: boolean,
|
|
43
|
+
placeholder?: string,
|
|
44
|
+
fieldMetadata?: any,
|
|
45
|
+
additionalProps?: any
|
|
46
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
/* eslint-disable storybook/prefer-pascal-case */
|
|
3
3
|
/* eslint-disable react/jsx-no-useless-fragment */
|
|
4
4
|
import { withKnobs } from '@storybook/addon-knobs';
|
|
5
5
|
|
|
6
|
-
import { stateProps, configProps, fieldMetadata } from './mock
|
|
6
|
+
import { stateProps, configProps, fieldMetadata } from './mock';
|
|
7
7
|
|
|
8
8
|
import {{COMPONENT_CLASS_NAME}} from './index.jsx';
|
|
9
9
|
|
|
@@ -13,7 +13,7 @@ export default {
|
|
|
13
13
|
component: {{COMPONENT_CLASS_NAME}}
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
export const
|
|
16
|
+
export const Base{{COMPONENT_CLASS_NAME}} = () => {
|
|
17
17
|
|
|
18
18
|
const props = {
|
|
19
19
|
value: configProps.value,
|