@pega/dx-component-builder-sdk 0.1.46 → 0.1.48
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 +3 -2
- package/src/auth.js +3 -3
- package/src/cli.js +1 -1
- package/src/constants.js +728 -2
- package/src/tasks/authenticate/index.js +1 -1
- package/src/tasks/build/helper.js +10 -6
- package/src/tasks/build/index.js +76 -22
- package/src/tasks/build-all/helper.js +16 -11
- package/src/tasks/build-all/index.js +108 -44
- package/src/tasks/bundle/{builder → builderAngular}/paths.js +2 -2
- package/src/tasks/bundle/builderAngular/webpack.config.js +342 -0
- package/src/tasks/bundle/builderReact/index.js +218 -0
- package/src/tasks/bundle/builderReact/modules.js +139 -0
- package/src/tasks/bundle/builderReact/paths.js +50 -0
- package/src/tasks/bundle/{builder → builderReact}/webpack.config.js +5 -4
- package/src/tasks/bundle/index.js +64 -5
- package/src/tasks/create/index.js +54 -12
- package/src/tasks/create/templates/Constellation/field/Boolean/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/field/Date/DateFormatter.js.mustache +7 -7
- package/src/tasks/create/templates/Constellation/field/Date/date.js.mustache +8 -8
- package/src/tasks/create/templates/Constellation/field/Date/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/field/DateTime/date-time.js.mustache +10 -10
- package/src/tasks/create/templates/Constellation/field/DateTime/date-utils.js.mustache +6 -5
- package/src/tasks/create/templates/Constellation/field/DateTime/date.js.mustache +6 -3
- package/src/tasks/create/templates/Constellation/field/DateTime/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/field/Decimal/index.jsx.mustache +2 -2
- package/src/tasks/create/templates/Constellation/field/Decimal/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/field/Decimal-Currency/index.jsx.mustache +2 -2
- package/src/tasks/create/templates/Constellation/field/Decimal-Currency/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/field/Decimal-Percentage/index.jsx.mustache +4 -4
- package/src/tasks/create/templates/Constellation/field/Decimal-Percentage/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/field/Integer/index.jsx.mustache +2 -2
- package/src/tasks/create/templates/Constellation/field/Integer/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/field/Picklist/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/field/Text/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/field/Text-Email/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/field/Text-Input/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/field/Text-Paragraph/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/field/Text-Phone/index.jsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Text-Phone/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/field/Text-URL/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/field/TimeOfDay/styles.js.mustache +14 -0
- package/src/tasks/create/templates/Constellation/field/{TimeofDay → TimeOfDay}/time-of-day.js.mustache +6 -5
- package/src/tasks/create/templates/Constellation/template/DETAILS/demo.stories.jsx.mustache +20 -6
- package/src/tasks/create/templates/Constellation/template/DETAILS/index.jsx.mustache +2 -2
- package/src/tasks/create/templates/Constellation/template/DETAILS/mock.stories.js.mustache +20 -10
- package/src/tasks/create/templates/Constellation/template/DETAILS/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/template/DETAILS-region/demo.stories.jsx.mustache +20 -7
- package/src/tasks/create/templates/Constellation/template/DETAILS-region/index.jsx.mustache +2 -2
- package/src/tasks/create/templates/Constellation/template/DETAILS-region/mock.stories.js.mustache +28 -13
- package/src/tasks/create/templates/Constellation/template/DETAILS-region/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/template/FORM/demo.stories.jsx.mustache +92 -16
- package/src/tasks/create/templates/Constellation/template/FORM/index.jsx.mustache +2 -2
- package/src/tasks/create/templates/Constellation/template/FORM/mock.stories.js.mustache +24 -12
- package/src/tasks/create/templates/Constellation/template/FORM/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/template/FORM-region/demo.stories.jsx.mustache +91 -13
- package/src/tasks/create/templates/Constellation/template/FORM-region/index.jsx.mustache +2 -2
- package/src/tasks/create/templates/Constellation/template/FORM-region/mock.stories.js.mustache +24 -12
- package/src/tasks/create/templates/Constellation/template/FORM-region/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/template/PAGE/demo.stories.jsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/template/PAGE/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/widget/CASE/index.jsx.mustache +2 -2
- package/src/tasks/create/templates/Constellation/widget/CASE/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/widget/PAGE/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/widget/PAGE-CASE/Operator.jsx.mustache +2 -2
- package/src/tasks/create/templates/Constellation/widget/PAGE-CASE/index.jsx.mustache +2 -2
- package/src/tasks/create/templates/Constellation/widget/PAGE-CASE/styles.js.mustache +13 -6
- package/src/tasks/create/templates/SDK-Angular/field/Boolean/boolean.component.html.mustache +42 -0
- package/src/tasks/create/templates/SDK-Angular/field/Boolean/boolean.component.scss.mustache +24 -0
- package/src/tasks/create/templates/SDK-Angular/field/Boolean/boolean.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/field/Boolean/boolean.component.ts.mustache +165 -0
- package/src/tasks/create/templates/SDK-Angular/field/Boolean/config.json.mustache +87 -0
- package/src/tasks/create/templates/SDK-Angular/field/Boolean/demo.stories.jsx.mustache +56 -0
- package/src/tasks/create/templates/SDK-Angular/field/Boolean/mock.stories.js.mustache +15 -0
- package/src/tasks/create/templates/SDK-Angular/field/Date/config.json.mustache +147 -0
- package/src/tasks/create/templates/SDK-Angular/field/Date/date.component.html.mustache +35 -0
- package/src/tasks/create/templates/SDK-Angular/field/Date/date.component.scss.mustache +20 -0
- package/src/tasks/create/templates/SDK-Angular/field/Date/date.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/field/Date/date.component.ts.mustache +209 -0
- package/src/tasks/create/templates/SDK-Angular/field/DateTime/config.json.mustache +204 -0
- package/src/tasks/create/templates/SDK-Angular/field/DateTime/date-time.component.html.mustache +31 -0
- package/src/tasks/create/templates/SDK-Angular/field/DateTime/date-time.component.scss.mustache +20 -0
- package/src/tasks/create/templates/SDK-Angular/field/DateTime/date-time.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/field/DateTime/date-time.component.ts.mustache +177 -0
- package/src/tasks/create/templates/SDK-Angular/field/Decimal/config.json.mustache +94 -0
- package/src/tasks/create/templates/SDK-Angular/field/Decimal/decimal.component.html.mustache +32 -0
- package/src/tasks/create/templates/SDK-Angular/field/Decimal/decimal.component.scss.mustache +20 -0
- package/src/tasks/create/templates/SDK-Angular/field/Decimal/decimal.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/field/Decimal/decimal.component.ts.mustache +170 -0
- package/src/tasks/create/templates/SDK-Angular/field/Decimal-Currency/config.json.mustache +125 -0
- package/src/tasks/create/templates/SDK-Angular/field/Decimal-Currency/decimal-currency.component.html.mustache +33 -0
- package/src/tasks/create/templates/SDK-Angular/field/Decimal-Currency/decimal-currency.component.scss.mustache +20 -0
- package/src/tasks/create/templates/SDK-Angular/field/Decimal-Currency/decimal-currency.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/field/Decimal-Currency/decimal-currency.component.ts.mustache +175 -0
- package/src/tasks/create/templates/SDK-Angular/field/Decimal-Percentage/config.json.mustache +94 -0
- package/src/tasks/create/templates/SDK-Angular/field/Decimal-Percentage/decimal-percentage.component.html.mustache +33 -0
- package/src/tasks/create/templates/SDK-Angular/field/Decimal-Percentage/decimal-percentage.component.scss.mustache +20 -0
- package/src/tasks/create/templates/SDK-Angular/field/Decimal-Percentage/decimal-percentage.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/field/Decimal-Percentage/decimal-percentage.component.ts.mustache +176 -0
- package/src/tasks/create/templates/SDK-Angular/field/Integer/config.json.mustache +88 -0
- package/src/tasks/create/templates/SDK-Angular/field/Integer/integer.component.html.mustache +33 -0
- package/src/tasks/create/templates/SDK-Angular/field/Integer/integer.component.scss.mustache +20 -0
- package/src/tasks/create/templates/SDK-Angular/field/Integer/integer.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/field/Integer/integer.component.ts.mustache +180 -0
- package/src/tasks/create/templates/SDK-Angular/field/Picklist/config.json.mustache +86 -0
- package/src/tasks/create/templates/SDK-Angular/field/Picklist/picklist.component.html.mustache +30 -0
- package/src/tasks/create/templates/SDK-Angular/field/Picklist/picklist.component.scss.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/field/Picklist/picklist.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/field/Picklist/picklist.component.ts.mustache +195 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text/config.json.mustache +83 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text/text.component.html.mustache +17 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text/text.component.scss.mustache +30 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text/text.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text/text.component.ts.mustache +145 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Email/config.json.mustache +83 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Email/text-email.component.html.mustache +31 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Email/text-email.component.scss.mustache +20 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Email/text-email.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Email/text-email.component.ts.mustache +175 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Input/config.json.mustache +83 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Input/text.component.html.mustache +31 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Input/text.component.scss.mustache +20 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Input/text.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Input/text.component.ts.mustache +177 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Paragraph/config.json.mustache +83 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Paragraph/text-paragraph.component.html.mustache +31 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Paragraph/text-paragraph.component.scss.mustache +20 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Paragraph/text-paragraph.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Paragraph/text-paragraph.component.ts.mustache +179 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Phone/config.json.mustache +95 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Phone/text-phone.component.html.mustache +30 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Phone/text-phone.component.scss.mustache +81 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Phone/text-phone.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Phone/text-phone.component.ts.mustache +194 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-URL/config.json.mustache +111 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-URL/text-url.component.html.mustache +30 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-URL/text-url.component.scss.mustache +20 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-URL/text-url.component.spec.ts.mustache +26 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-URL/text-url.component.ts.mustache +174 -0
- package/src/tasks/create/templates/SDK-Angular/field/TimeOfDay/time-of-day.component.html.mustache +30 -0
- package/src/tasks/create/templates/SDK-Angular/field/TimeOfDay/time-of-day.component.scss.mustache +20 -0
- package/src/tasks/create/templates/SDK-Angular/field/TimeOfDay/time-of-day.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/field/TimeOfDay/time-of-day.component.ts.mustache +172 -0
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS/DefaultForm.svg +29 -0
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS/config.json.mustache +21 -0
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS/demo.stories.jsx.mustache +71 -0
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS/details.component.html.mustache +7 -0
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS/details.component.scss.mustache +7 -0
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS/details.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS/details.component.ts.mustache +121 -0
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS/mock.stories.js.mustache +294 -0
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS-region/TwoColumnDetails.svg +28 -0
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS-region/config.json.mustache +27 -0
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS-region/demo.stories.jsx.mustache +73 -0
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS-region/details.component.html.mustache +6 -0
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS-region/details.component.scss.mustache +7 -0
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS-region/details.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS-region/details.component.ts.mustache +92 -0
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS-region/mock.stories.js.mustache +290 -0
- package/src/tasks/create/templates/SDK-Angular/template/FORM/DefaultForm.svg +29 -0
- package/src/tasks/create/templates/SDK-Angular/template/FORM/config.json.mustache +45 -0
- package/src/tasks/create/templates/SDK-Angular/template/FORM/demo.stories.jsx.mustache +215 -0
- package/src/tasks/create/templates/SDK-Angular/template/FORM/form.component.html.mustache +23 -0
- package/src/tasks/create/templates/SDK-Angular/template/FORM/form.component.scss.mustache +33 -0
- package/src/tasks/create/templates/SDK-Angular/template/FORM/form.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/template/FORM/form.component.ts.mustache +71 -0
- package/src/tasks/create/templates/SDK-Angular/template/FORM-region/TwoColumn.svg +38 -0
- package/src/tasks/create/templates/SDK-Angular/template/FORM-region/config.json.mustache +49 -0
- package/src/tasks/create/templates/SDK-Angular/template/FORM-region/demo.stories.jsx.mustache +183 -0
- package/src/tasks/create/templates/SDK-Angular/template/FORM-region/form.component.html.mustache +16 -0
- package/src/tasks/create/templates/SDK-Angular/template/FORM-region/form.component.scss.mustache +28 -0
- package/src/tasks/create/templates/SDK-Angular/template/FORM-region/form.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/template/FORM-region/form.component.ts.mustache +26 -0
- package/src/tasks/create/templates/SDK-Angular/template/FORM-region/mock.stories.js.mustache +132 -0
- package/src/tasks/create/templates/SDK-Angular/template/PAGE/OneColumnPage.svg +28 -0
- package/src/tasks/create/templates/SDK-Angular/template/PAGE/config.json.mustache +32 -0
- package/src/tasks/create/templates/SDK-Angular/template/PAGE/demo.stories.jsx.mustache +80 -0
- package/src/tasks/create/templates/SDK-Angular/template/PAGE/mock.stories.js.mustache +115 -0
- package/src/tasks/create/templates/SDK-Angular/template/PAGE/page.component.html.mustache +15 -0
- package/src/tasks/create/templates/SDK-Angular/template/PAGE/page.component.scss.mustache +3 -0
- package/src/tasks/create/templates/SDK-Angular/template/PAGE/page.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/template/PAGE/page.component.ts.mustache +63 -0
- package/src/tasks/create/templates/SDK-Angular/widget/CASE/OneColumnPage.svg +36 -0
- package/src/tasks/create/templates/SDK-Angular/widget/CASE/case.component.html.mustache +15 -0
- package/src/tasks/create/templates/SDK-Angular/widget/CASE/case.component.scss.mustache +22 -0
- package/src/tasks/create/templates/SDK-Angular/widget/CASE/case.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/widget/CASE/case.component.ts.mustache +111 -0
- package/src/tasks/create/templates/SDK-Angular/widget/CASE/config.json.mustache +23 -0
- package/src/tasks/create/templates/SDK-Angular/widget/CASE/demo.stories.jsx.mustache +70 -0
- package/src/tasks/create/templates/SDK-Angular/widget/CASE/mock.stories.js.mustache +390 -0
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE/OneColumnPage.svg +36 -0
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE/config.json.mustache +59 -0
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE/demo.stories.jsx.mustache +29 -0
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE/mock.stories.js.mustache +23 -0
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE/page.component.html.mustache +17 -0
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE/page.component.scss.mustache +19 -0
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE/page.component.ts.mustache +32 -0
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE/pagecomponent.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE-CASE/OneColumnPage.svg +36 -0
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE-CASE/config.json.mustache +66 -0
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE-CASE/demo.stories.jsx.mustache +52 -0
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE-CASE/mock.stories.js.mustache +52 -0
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE-CASE/page-case.component.html.mustache +28 -0
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE-CASE/page-case.component.scss.mustache +137 -0
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE-CASE/page-case.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE-CASE/page-case.component.ts.mustache +115 -0
- package/src/tasks/create/templates/SDK-React/field/Boolean/index.tsx.mustache +3 -3
- package/src/tasks/create/templates/SDK-React/field/Date/index.tsx.mustache +2 -2
- package/src/tasks/create/templates/SDK-React/field/DateTime/index.tsx.mustache +6 -7
- package/src/tasks/create/templates/SDK-React/field/Decimal/demo.stories.jsx.mustache +5 -1
- package/src/tasks/create/templates/SDK-React/field/Decimal/index.tsx.mustache +78 -28
- package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/index.tsx.mustache +3 -3
- package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/index.tsx.mustache +2 -2
- package/src/tasks/create/templates/SDK-React/field/Integer/index.tsx.mustache +2 -2
- package/src/tasks/create/templates/SDK-React/field/Picklist/demo.stories.jsx.mustache +13 -0
- package/src/tasks/create/templates/SDK-React/field/Picklist/index.tsx.mustache +30 -10
- package/src/tasks/create/templates/SDK-React/field/Text/index.tsx.mustache +2 -2
- package/src/tasks/create/templates/SDK-React/field/Text-Email/index.tsx.mustache +2 -2
- package/src/tasks/create/templates/SDK-React/field/Text-Input/index.tsx.mustache +2 -2
- package/src/tasks/create/templates/SDK-React/field/Text-Paragraph/index.tsx.mustache +2 -2
- package/src/tasks/create/templates/SDK-React/field/Text-Phone/index.tsx.mustache +6 -5
- package/src/tasks/create/templates/SDK-React/field/Text-URL/index.tsx.mustache +11 -0
- package/src/tasks/create/templates/SDK-React/field/TimeOfDay/config.json.mustache +135 -0
- package/src/tasks/create/templates/SDK-React/field/{TimeofDay → TimeOfDay}/index.tsx.mustache +12 -1
- package/src/tasks/create/templates/SDK-React/template/DETAILS/index.tsx.mustache +7 -3
- package/src/tasks/create/templates/SDK-React/template/DETAILS-region/index.tsx.mustache +8 -4
- package/src/tasks/create/templates/SDK-React/template/FORM/index.tsx.mustache +30 -20
- package/src/tasks/create/templates/SDK-React/template/FORM-region/demo.stories.jsx.mustache +2 -2
- package/src/tasks/create/templates/SDK-React/template/PAGE/demo.stories.jsx.mustache +1 -0
- package/src/tasks/create/templates/SDK-React/widget/CASE/index.tsx.mustache +4 -3
- package/src/tasks/create/templates/SDK-React/widget/PAGE/index.tsx.mustache +7 -7
- package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/demo.stories.jsx.mustache +2 -10
- package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/index.tsx.mustache +138 -36
- package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/mock.stories.js.mustache +1 -1
- package/src/tasks/create-all/index.js +114 -58
- package/src/tasks/delete/helper.js +88 -24
- package/src/tasks/delete/index.js +17 -8
- package/src/tasks/delete-all/helper.js +88 -25
- package/src/tasks/delete-all/index.js +15 -6
- package/src/tasks/list/index.js +14 -7
- package/src/tasks/map/map.js +212 -20
- package/src/tasks/map-all/index.js +19 -2
- package/src/tasks/override/index.js +137 -76
- package/src/tasks/override-all/index.js +54 -6
- package/src/tasks/publish/helper.js +93 -50
- package/src/tasks/publish/index.js +87 -34
- package/src/tasks/publish-all/helper.js +96 -57
- package/src/tasks/publish-all/index.js +123 -47
- package/src/tasks/rename/index.js +184 -111
- package/src/tasks/validator/index.js +31 -7
- package/src/util.js +173 -20
- package/src/tasks/create/templates/Constellation/field/TimeofDay/styles.js.mustache +0 -7
- /package/src/tasks/bundle/{builder → builderAngular}/index.js +0 -0
- /package/src/tasks/bundle/{builder → builderAngular}/modules.js +0 -0
- /package/src/tasks/create/templates/Constellation/field/{TimeofDay → TimeOfDay}/config.json.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/field/{TimeofDay → TimeOfDay}/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/field/{TimeofDay → TimeOfDay}/index.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/field/{TimeofDay → TimeOfDay}/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/field/{TimeofDay → TimeOfDay}/suggestions-handler.js +0 -0
- /package/src/tasks/create/templates/{SDK-React/field/TimeofDay → SDK-Angular/field/TimeOfDay}/config.json.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/field/{TimeofDay → TimeOfDay}/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/field/{TimeofDay → TimeOfDay}/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/field/{TimeofDay → TimeOfDay}/styles.js.mustache +0 -0
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import
|
|
4
|
-
import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
1
|
+
/* eslint-disable react/no-unused-prop-types */
|
|
2
|
+
import React, { useState, useEffect } from 'react';
|
|
3
|
+
import CurrencyTextField from '@unicef/material-ui-currency-textfield';
|
|
5
4
|
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
5
|
+
import { getCurrencyCharacters, getCurrencyOptions } from '@pega/react-sdk-components/lib/components/field/Currency/currency-utils.js';
|
|
6
|
+
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
7
|
+
import { format } from "@pega/react-sdk-components/lib/components/helpers/formatters";
|
|
6
8
|
import PropTypes from 'prop-types';
|
|
7
9
|
|
|
8
10
|
|
|
9
11
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
10
12
|
|
|
13
|
+
// Using control from: https://github.com/unicef/material-ui-currency-textfield
|
|
11
14
|
|
|
12
15
|
// Duplicated runtime code from React SDK
|
|
13
16
|
|
|
@@ -15,55 +18,102 @@ import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
|
15
18
|
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
16
19
|
export default function {{COMPONENT_CLASS_NAME}}(props: any) {
|
|
17
20
|
const {
|
|
21
|
+
getPConnect,
|
|
18
22
|
label,
|
|
19
23
|
required,
|
|
20
24
|
disabled,
|
|
21
25
|
value = '',
|
|
22
26
|
validatemessage,
|
|
23
27
|
status,
|
|
24
|
-
onChange,
|
|
25
|
-
onBlur,
|
|
28
|
+
/* onChange, onBlur, */
|
|
26
29
|
readOnly,
|
|
27
30
|
helperText,
|
|
28
31
|
displayMode,
|
|
29
|
-
hideLabel
|
|
32
|
+
hideLabel,
|
|
33
|
+
currencyISOCode = "USD",
|
|
34
|
+
decimalPrecision = 2,
|
|
35
|
+
showGroupSeparators = true,
|
|
36
|
+
testId
|
|
30
37
|
} = props;
|
|
38
|
+
|
|
39
|
+
const pConn = getPConnect();
|
|
40
|
+
const actions = pConn.getActionsApi();
|
|
41
|
+
const propName = pConn.getStateProps().value;
|
|
31
42
|
const helperTextToDisplay = validatemessage || helperText;
|
|
32
43
|
|
|
44
|
+
const [decValue, setDecimalvalue] = useState("");
|
|
45
|
+
const [theCurrDec, setCurrDec] = useState(".");
|
|
46
|
+
const [theCurrSep, setCurrSep] = useState(",");
|
|
47
|
+
|
|
48
|
+
useEffect(() => {
|
|
49
|
+
const theSymbols = getCurrencyCharacters(currencyISOCode);
|
|
50
|
+
setCurrDec(theSymbols.theDecimalIndicator);
|
|
51
|
+
setCurrSep(theSymbols.theDigitGroupSeparator);
|
|
52
|
+
}, [currencyISOCode]);
|
|
53
|
+
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
setDecimalvalue(value.toString());
|
|
56
|
+
}, [value]);
|
|
57
|
+
|
|
58
|
+
const theCurrencyOptions = getCurrencyOptions(currencyISOCode);
|
|
59
|
+
const formattedValue = format(value, pConn.getComponentName().toLowerCase(), theCurrencyOptions);
|
|
60
|
+
|
|
33
61
|
if (displayMode === 'LABELS_LEFT') {
|
|
34
|
-
return <FieldValueList name={hideLabel ? '' : label} value={
|
|
62
|
+
return <FieldValueList name={hideLabel ? '' : label} value={formattedValue} />;
|
|
35
63
|
}
|
|
36
64
|
|
|
37
65
|
if (displayMode === 'STACKED_LARGE_VAL') {
|
|
38
|
-
return <FieldValueList name={hideLabel ? '' : label} value={
|
|
66
|
+
return <FieldValueList name={hideLabel ? '' : label} value={formattedValue} variant='stacked' />;
|
|
39
67
|
}
|
|
40
68
|
|
|
69
|
+
let readOnlyProp = {}; // Note: empty if NOT ReadOnly
|
|
70
|
+
|
|
41
71
|
if (readOnly) {
|
|
42
|
-
|
|
72
|
+
readOnlyProp = { readOnly: true };
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
let testProp = {};
|
|
76
|
+
|
|
77
|
+
testProp = {
|
|
78
|
+
'data-test-id': testId
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
function decimalOnChange(event) {
|
|
82
|
+
// update internal value
|
|
83
|
+
setDecimalvalue(event?.target?.value);
|
|
43
84
|
}
|
|
44
85
|
|
|
86
|
+
function decimalOnBlur(event, inValue) {
|
|
87
|
+
handleEvent(actions, 'changeNblur', propName, inValue !== '' ? Number(inValue) : inValue);
|
|
88
|
+
}
|
|
45
89
|
|
|
46
90
|
return (
|
|
47
91
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
92
|
+
<CurrencyTextField
|
|
93
|
+
fullWidth
|
|
94
|
+
variant={readOnly ? 'standard' : 'outlined'}
|
|
95
|
+
helperText={helperTextToDisplay}
|
|
96
|
+
placeholder=''
|
|
97
|
+
size='small'
|
|
98
|
+
required={required}
|
|
99
|
+
disabled={disabled}
|
|
100
|
+
onChange={decimalOnChange}
|
|
101
|
+
onBlur={!readOnly ? decimalOnBlur : undefined}
|
|
102
|
+
error={status === 'error'}
|
|
103
|
+
label={label}
|
|
104
|
+
value={decValue}
|
|
105
|
+
type='text'
|
|
106
|
+
outputFormat='number'
|
|
107
|
+
textAlign='left'
|
|
108
|
+
{{! pick new delimiters for mustache }}
|
|
63
109
|
{{=<% %>=}}
|
|
64
|
-
|
|
65
|
-
<%={{ }}=%> {{! revert
|
|
66
|
-
|
|
110
|
+
InputProps={{ ...readOnlyProp, inputProps: { ...testProp, value: decValue } }}
|
|
111
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
112
|
+
currencySymbol=''
|
|
113
|
+
decimalCharacter={theCurrDec}
|
|
114
|
+
digitGroupSeparator={showGroupSeparators ? theCurrSep : ''}
|
|
115
|
+
decimalPlaces={decimalPrecision}
|
|
116
|
+
/>
|
|
67
117
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
68
118
|
);
|
|
69
119
|
}
|
|
@@ -49,7 +49,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: any) {
|
|
|
49
49
|
'data-test-id': testId
|
|
50
50
|
};
|
|
51
51
|
|
|
52
|
-
const [currValue, setCurrValue] = useState();
|
|
52
|
+
const [currValue, setCurrValue] = useState("");
|
|
53
53
|
const [theCurrSym, setCurrSym] = useState("$");
|
|
54
54
|
const [theCurrDec, setCurrDec] = useState(".");
|
|
55
55
|
const [theCurrSep, setCurrSep] = useState(",");
|
|
@@ -109,10 +109,10 @@ export default function {{COMPONENT_CLASS_NAME}}(props: any) {
|
|
|
109
109
|
type='text'
|
|
110
110
|
outputFormat='number'
|
|
111
111
|
textAlign='left'
|
|
112
|
-
{{! pick new
|
|
112
|
+
{{! pick new delimiters for mustache }}
|
|
113
113
|
{{=<% %>=}}
|
|
114
114
|
InputProps={{ ...readOnlyProp, inputProps: { ...testProp, value: currValue } }}
|
|
115
|
-
<%={{ }}=%> {{! revert
|
|
115
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
116
116
|
currencySymbol={theCurrSym}
|
|
117
117
|
decimalCharacter={theCurrDec}
|
|
118
118
|
digitGroupSeparator={theCurrSep}
|
|
@@ -88,10 +88,10 @@ export default function {{COMPONENT_CLASS_NAME}}(props: any) {
|
|
|
88
88
|
label={label}
|
|
89
89
|
value={value}
|
|
90
90
|
type='number'
|
|
91
|
-
{{! pick new
|
|
91
|
+
{{! pick new delimiters for mustache }}
|
|
92
92
|
{{=<% %>=}}
|
|
93
93
|
inputProps={{ ...testProp }}
|
|
94
|
-
<%={{ }}=%> {{! revert
|
|
94
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
95
95
|
/>
|
|
96
96
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
97
97
|
);
|
|
@@ -83,10 +83,10 @@ export default function {{COMPONENT_CLASS_NAME}}(props: any) {
|
|
|
83
83
|
label={label}
|
|
84
84
|
value={value}
|
|
85
85
|
type='text'
|
|
86
|
-
{{! pick new
|
|
86
|
+
{{! pick new delimiters for mustache }}
|
|
87
87
|
{{=<% %>=}}
|
|
88
88
|
inputProps={{ inputMode: 'numeric', pattern: '[0-9]*', ...testProp }}
|
|
89
|
-
<%={{ }}=%> {{! revert
|
|
89
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
90
90
|
/>
|
|
91
91
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
92
92
|
);
|
|
@@ -39,6 +39,19 @@ export const Base{{COMPONENT_CLASS_NAME}} = () => {
|
|
|
39
39
|
return undefined;
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
+
},
|
|
43
|
+
getCaseInfo: () => {
|
|
44
|
+
return {
|
|
45
|
+
getClassName: () => {
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
},
|
|
50
|
+
getLocalizedValue: val => {
|
|
51
|
+
return val;
|
|
52
|
+
},
|
|
53
|
+
getLocaleRuleNameFromKeys: () => {
|
|
54
|
+
return undefined;
|
|
42
55
|
}
|
|
43
56
|
};
|
|
44
57
|
}
|
|
@@ -24,7 +24,6 @@ export default function {{COMPONENT_CLASS_NAME}}(props: any) {
|
|
|
24
24
|
label,
|
|
25
25
|
required,
|
|
26
26
|
disabled,
|
|
27
|
-
placeholder,
|
|
28
27
|
value = '',
|
|
29
28
|
datasource = [],
|
|
30
29
|
validatemessage,
|
|
@@ -34,21 +33,38 @@ export default function {{COMPONENT_CLASS_NAME}}(props: any) {
|
|
|
34
33
|
helperText,
|
|
35
34
|
displayMode,
|
|
36
35
|
hideLabel,
|
|
37
|
-
onRecordChange
|
|
36
|
+
onRecordChange,
|
|
37
|
+
fieldMetadata
|
|
38
38
|
} = props;
|
|
39
|
+
let { placeholder } = props;
|
|
40
|
+
placeholder = placeholder || 'Select...';
|
|
39
41
|
const [options, setOptions] = useState<Array<IOption>>([]);
|
|
40
42
|
const helperTextToDisplay = validatemessage || helperText;
|
|
41
43
|
|
|
42
44
|
const thePConn = getPConnect();
|
|
43
45
|
const actionsApi = thePConn.getActionsApi();
|
|
44
46
|
const propName = thePConn.getStateProps().value;
|
|
47
|
+
const className = thePConn.getCaseInfo().getClassName();
|
|
48
|
+
const refName = propName?.slice(propName.lastIndexOf('.') + 1);
|
|
45
49
|
|
|
46
50
|
useEffect(() => {
|
|
47
|
-
const
|
|
48
|
-
optionsList
|
|
51
|
+
const list = Utils.getOptionList(props, getPConnect().getDataObject());
|
|
52
|
+
const optionsList = [...list];
|
|
53
|
+
optionsList.unshift({ key: placeholder, value: placeholder });
|
|
49
54
|
setOptions(optionsList);
|
|
50
55
|
}, [datasource]);
|
|
51
56
|
|
|
57
|
+
const metaData = Array.isArray(fieldMetadata)
|
|
58
|
+
? fieldMetadata.filter((field) => field?.classID === className)[0]
|
|
59
|
+
: fieldMetadata;
|
|
60
|
+
|
|
61
|
+
let displayName = metaData?.datasource?.propertyForDisplayText;
|
|
62
|
+
displayName = displayName?.slice(displayName.lastIndexOf('.') + 1);
|
|
63
|
+
const localeContext = metaData?.datasource?.tableType === 'DataPage' ? 'datapage' : 'associated';
|
|
64
|
+
const localeClass = localeContext === 'datapage' ? '@baseclass' : className;
|
|
65
|
+
const localeName = localeContext === 'datapage' ? metaData?.datasource?.name : refName;
|
|
66
|
+
const localePath = localeContext === 'datapage' ? displayName : '';
|
|
67
|
+
|
|
52
68
|
let readOnlyProp = {};
|
|
53
69
|
|
|
54
70
|
if (displayMode === 'LABELS_LEFT') {
|
|
@@ -70,7 +86,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: any) {
|
|
|
70
86
|
};
|
|
71
87
|
|
|
72
88
|
const handleChange = evt => {
|
|
73
|
-
const selectedValue = evt.target.value ===
|
|
89
|
+
const selectedValue = evt.target.value === placeholder ? '' : evt.target.value;
|
|
74
90
|
handleEvent(actionsApi, 'changeNblur', propName, selectedValue);
|
|
75
91
|
if (onRecordChange) {
|
|
76
92
|
onRecordChange(evt);
|
|
@@ -85,23 +101,27 @@ export default function {{COMPONENT_CLASS_NAME}}(props: any) {
|
|
|
85
101
|
fullWidth
|
|
86
102
|
variant={readOnly ? 'standard' : 'outlined'}
|
|
87
103
|
helperText={helperTextToDisplay}
|
|
88
|
-
placeholder={placeholder}
|
|
104
|
+
placeholder={thePConn.getLocalizedValue(placeholder)}
|
|
89
105
|
size='small'
|
|
90
106
|
required={required}
|
|
91
107
|
disabled={disabled}
|
|
92
108
|
onChange={!readOnly ? handleChange : undefined}
|
|
93
109
|
error={status === 'error'}
|
|
94
110
|
label={label}
|
|
95
|
-
value={value === '' && !readOnly ?
|
|
111
|
+
value={value === '' && !readOnly ? placeholder : value}
|
|
96
112
|
select
|
|
97
|
-
{{! pick new
|
|
113
|
+
{{! pick new delimiters for mustache }}
|
|
98
114
|
{{=<% %>=}}
|
|
99
115
|
InputProps={{ ...readOnlyProp, ...testProp }}
|
|
100
|
-
<%={{ }}=%> {{! revert
|
|
116
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
101
117
|
>
|
|
102
118
|
{options.map((option: any) => (
|
|
103
119
|
<MenuItem key={option.key} value={option.key}>
|
|
104
|
-
{
|
|
120
|
+
{thePConn.getLocalizedValue(
|
|
121
|
+
option.value,
|
|
122
|
+
localePath,
|
|
123
|
+
thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)
|
|
124
|
+
)}
|
|
105
125
|
</MenuItem>
|
|
106
126
|
))}
|
|
107
127
|
</TextField>
|
|
@@ -69,10 +69,10 @@ export default function {{COMPONENT_CLASS_NAME}}(props: any) {
|
|
|
69
69
|
error={status === 'error'}
|
|
70
70
|
label={label}
|
|
71
71
|
value={value}
|
|
72
|
-
{{! pick new
|
|
72
|
+
{{! pick new delimiters for mustache }}
|
|
73
73
|
{{=<% %>=}}
|
|
74
74
|
InputProps={{ ...readOnlyProp, inputProps: { maxLength, ...testProp } }}
|
|
75
|
-
<%={{ }}=%> {{! revert
|
|
75
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
76
76
|
/>
|
|
77
77
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
78
78
|
);
|
|
@@ -66,7 +66,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: any) {
|
|
|
66
66
|
label={label}
|
|
67
67
|
value={value}
|
|
68
68
|
type='email'
|
|
69
|
-
{{! pick new
|
|
69
|
+
{{! pick new delimiters for mustache }}
|
|
70
70
|
{{=<% %>=}}
|
|
71
71
|
InputProps={{
|
|
72
72
|
startAdornment: (
|
|
@@ -76,7 +76,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: any) {
|
|
|
76
76
|
),
|
|
77
77
|
inputProps: { ...testProp }
|
|
78
78
|
}}
|
|
79
|
-
<%={{ }}=%> {{! revert
|
|
79
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
80
80
|
/>
|
|
81
81
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
82
82
|
);
|
|
@@ -69,10 +69,10 @@ export default function {{COMPONENT_CLASS_NAME}}(props: any) {
|
|
|
69
69
|
error={status === 'error'}
|
|
70
70
|
label={label}
|
|
71
71
|
value={value}
|
|
72
|
-
{{! pick new
|
|
72
|
+
{{! pick new delimiters for mustache }}
|
|
73
73
|
{{=<% %>=}}
|
|
74
74
|
InputProps={{ ...readOnlyProp, inputProps: { maxLength, ...testProp } }}
|
|
75
|
-
<%={{ }}=%> {{! revert
|
|
75
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
76
76
|
/>
|
|
77
77
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
78
78
|
);
|
|
@@ -73,10 +73,10 @@ export default function {{COMPONENT_CLASS_NAME}}(props: any) {
|
|
|
73
73
|
error={status === 'error'}
|
|
74
74
|
label={label}
|
|
75
75
|
value={value}
|
|
76
|
-
{{! pick new
|
|
76
|
+
{{! pick new delimiters for mustache }}
|
|
77
77
|
{{=<% %>=}}
|
|
78
78
|
InputProps={{ ...readOnlyProp, inputProps: { maxLength, ...testProp } }}
|
|
79
|
-
<%={{ }}=%> {{! revert
|
|
79
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
80
80
|
/>
|
|
81
81
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
82
82
|
);
|
|
@@ -60,12 +60,13 @@ export default function {{COMPONENT_CLASS_NAME}}(props: any) {
|
|
|
60
60
|
error={status === 'error'}
|
|
61
61
|
label={label}
|
|
62
62
|
value={value}
|
|
63
|
-
{{! pick new
|
|
63
|
+
{{! pick new delimiters for mustache }}
|
|
64
64
|
{{=<% %>=}}
|
|
65
65
|
InputProps={{
|
|
66
|
-
readOnly: true
|
|
66
|
+
readOnly: true,
|
|
67
|
+
inputProps: { ...testProp }
|
|
67
68
|
}}
|
|
68
|
-
<%={{ }}=%> {{! revert
|
|
69
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
69
70
|
disableDropdown={disableDropdown}
|
|
70
71
|
/>
|
|
71
72
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
@@ -101,10 +102,10 @@ export default function {{COMPONENT_CLASS_NAME}}(props: any) {
|
|
|
101
102
|
error={status === 'error'}
|
|
102
103
|
label={label}
|
|
103
104
|
value={value}
|
|
104
|
-
{{! pick new
|
|
105
|
+
{{! pick new delimiters for mustache }}
|
|
105
106
|
{{=<% %>=}}
|
|
106
107
|
InputProps={{ ...testProp }}
|
|
107
|
-
<%={{ }}=%> {{! revert
|
|
108
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
108
109
|
/>
|
|
109
110
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
110
111
|
);
|
|
@@ -24,6 +24,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: any) {
|
|
|
24
24
|
onChange,
|
|
25
25
|
onBlur,
|
|
26
26
|
readOnly,
|
|
27
|
+
testId,
|
|
27
28
|
helperText,
|
|
28
29
|
displayMode,
|
|
29
30
|
hideLabel
|
|
@@ -42,6 +43,12 @@ export default function {{COMPONENT_CLASS_NAME}}(props: any) {
|
|
|
42
43
|
return <TextInput {...props} />;
|
|
43
44
|
}
|
|
44
45
|
|
|
46
|
+
let testProp = {};
|
|
47
|
+
|
|
48
|
+
testProp = {
|
|
49
|
+
'data-test-id': testId
|
|
50
|
+
};
|
|
51
|
+
|
|
45
52
|
return (
|
|
46
53
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
47
54
|
<TextField
|
|
@@ -58,6 +65,10 @@ export default function {{COMPONENT_CLASS_NAME}}(props: any) {
|
|
|
58
65
|
error={status === 'error'}
|
|
59
66
|
label={label}
|
|
60
67
|
value={value}
|
|
68
|
+
{{! pick new delimiters for mustache }}
|
|
69
|
+
{{=<% %>=}}
|
|
70
|
+
InputProps={{ inputProps: { ...testProp } }}
|
|
71
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
61
72
|
/>
|
|
62
73
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
63
74
|
);
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{COMPONENT_KEY}}",
|
|
3
|
+
"label": "{{COMPONENT_LABEL}}",
|
|
4
|
+
"description": "{{DESCRIPTION}}",
|
|
5
|
+
"organization": "{{ORGANIZATION}}",
|
|
6
|
+
"version": "{{VERSION}}",
|
|
7
|
+
"library": "{{LIBRARY}}",
|
|
8
|
+
"allowedApplications": {{{ALLOWEDAPPS}}},
|
|
9
|
+
"componentKey": "{{COMPONENT_KEY}}",
|
|
10
|
+
"type": "{{TYPE}}",
|
|
11
|
+
"subtype": {{{SUB_TYPE}}},
|
|
12
|
+
"icon": "images/pz-date-time-active.svg",
|
|
13
|
+
"properties": [
|
|
14
|
+
{
|
|
15
|
+
"name": "label",
|
|
16
|
+
"label": "Field label",
|
|
17
|
+
"format": "TEXT",
|
|
18
|
+
"required": true
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "readOnly",
|
|
22
|
+
"label": "Edit mode",
|
|
23
|
+
"format": "READONLY"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"format": "SELECT",
|
|
27
|
+
"name": "clockFormat",
|
|
28
|
+
"label": "Clock",
|
|
29
|
+
"defaultValue": "use locale",
|
|
30
|
+
"source": [
|
|
31
|
+
{
|
|
32
|
+
"key": 0,
|
|
33
|
+
"value": "use locale"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"key": 12,
|
|
37
|
+
"value": "12 hours"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"key": 24,
|
|
41
|
+
"value": "24 hours"
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "withSeconds",
|
|
47
|
+
"label": "Display Seconds",
|
|
48
|
+
"format": "BOOLEAN"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"label": "Input settings",
|
|
52
|
+
"format": "GROUP",
|
|
53
|
+
"visibility": "(!readOnly = true)",
|
|
54
|
+
"properties": [
|
|
55
|
+
{
|
|
56
|
+
"format": "SELECT",
|
|
57
|
+
"name": "pickerInterval",
|
|
58
|
+
"label": "Time picker",
|
|
59
|
+
"defaultValue": "30",
|
|
60
|
+
"source": [
|
|
61
|
+
{
|
|
62
|
+
"key": "5",
|
|
63
|
+
"value": "5 min"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"key": "10",
|
|
67
|
+
"value": "10 min"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"key": "15",
|
|
71
|
+
"value": "15 min"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"key": "20",
|
|
75
|
+
"value": "20 min"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"key": "30",
|
|
79
|
+
"value": "30 min"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"key": "60",
|
|
83
|
+
"value": "1 hr"
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"name": "helperText",
|
|
89
|
+
"label": "Helper text",
|
|
90
|
+
"format": "TEXT"
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"label": "Conditions",
|
|
96
|
+
"format": "GROUP",
|
|
97
|
+
"properties": [
|
|
98
|
+
{
|
|
99
|
+
"name": "required",
|
|
100
|
+
"label": "Required",
|
|
101
|
+
"format": "REQUIRED",
|
|
102
|
+
"visibility": "(!readOnly = true)"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"name": "disabled",
|
|
106
|
+
"label": "Disabled",
|
|
107
|
+
"format": "DISABLED",
|
|
108
|
+
"visibility": "(!readOnly = true)"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"name": "visibility",
|
|
112
|
+
"label": "Visibility",
|
|
113
|
+
"format": "VISIBILITY"
|
|
114
|
+
}
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"label": "Advanced",
|
|
119
|
+
"format": "GROUP",
|
|
120
|
+
"collapsible": true,
|
|
121
|
+
"properties": [
|
|
122
|
+
{
|
|
123
|
+
"name": "testId",
|
|
124
|
+
"label": "Test ID",
|
|
125
|
+
"format": "TEXT",
|
|
126
|
+
"ignorePattern": "[^-_\\p{N}\\p{L}]",
|
|
127
|
+
"includeAnnotations": false
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
"defaultConfig": {
|
|
133
|
+
"label": "@L $this.label"
|
|
134
|
+
}
|
|
135
|
+
}
|
package/src/tasks/create/templates/SDK-React/field/{TimeofDay → TimeOfDay}/index.tsx.mustache
RENAMED
|
@@ -26,7 +26,8 @@ export default function {{COMPONENT_CLASS_NAME}}(props: any) {
|
|
|
26
26
|
readOnly,
|
|
27
27
|
helperText,
|
|
28
28
|
displayMode,
|
|
29
|
-
hideLabel
|
|
29
|
+
hideLabel,
|
|
30
|
+
testId
|
|
30
31
|
} = props;
|
|
31
32
|
const helperTextToDisplay = validatemessage || helperText;
|
|
32
33
|
|
|
@@ -42,6 +43,12 @@ export default function {{COMPONENT_CLASS_NAME}}(props: any) {
|
|
|
42
43
|
return <TextInput {...props} />;
|
|
43
44
|
}
|
|
44
45
|
|
|
46
|
+
let testProp = {};
|
|
47
|
+
|
|
48
|
+
testProp = {
|
|
49
|
+
'data-test-id': testId
|
|
50
|
+
};
|
|
51
|
+
|
|
45
52
|
const handleChange = date => {
|
|
46
53
|
const theValue = date && date.isValid() ? date.format('HH:mm') : null;
|
|
47
54
|
onChange({ value: theValue });
|
|
@@ -79,6 +86,10 @@ export default function {{COMPONENT_CLASS_NAME}}(props: any) {
|
|
|
79
86
|
format='hh:mm a'
|
|
80
87
|
value={timeValue}
|
|
81
88
|
onChange={handleChange}
|
|
89
|
+
{{! pick new delimiters for mustache }}
|
|
90
|
+
{{=<% %>=}}
|
|
91
|
+
InputProps={{ inputProps: { ...testProp } }}
|
|
92
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
82
93
|
/>
|
|
83
94
|
</MuiPickersUtilsProvider>
|
|
84
95
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
@@ -48,10 +48,12 @@ export default function {{COMPONENT_CLASS_NAME}}(props) {
|
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
{{=<% %>=}}
|
|
51
|
+
|
|
53
52
|
|
|
54
53
|
return (
|
|
54
|
+
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
55
|
+
{{! pick new delimiters for mustache }}
|
|
56
|
+
{{=<% %>=}}
|
|
55
57
|
<FieldGroup name={propsToUse.showLabel ? propsToUse.label : ""}>
|
|
56
58
|
{showHighlightedData && highlightedDataArr.length > 0 && (
|
|
57
59
|
<Grid container spacing={1} style={{ padding: "0 0 1em" }}>
|
|
@@ -70,10 +72,12 @@ export default function {{COMPONENT_CLASS_NAME}}(props) {
|
|
|
70
72
|
))}
|
|
71
73
|
</Grid>
|
|
72
74
|
</FieldGroup>
|
|
75
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
76
|
+
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
73
77
|
);
|
|
74
78
|
}
|
|
75
79
|
|
|
76
|
-
|
|
80
|
+
|
|
77
81
|
|
|
78
82
|
{{COMPONENT_CLASS_NAME}}.defaultProps = {
|
|
79
83
|
label: undefined,
|
|
@@ -5,7 +5,7 @@ import FieldGroup from "@pega/react-sdk-components/lib/components/designSystemEx
|
|
|
5
5
|
import createPConnectComponent from "@pega/react-sdk-components/lib/bridge/react_pconnect";
|
|
6
6
|
|
|
7
7
|
// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
|
|
8
|
-
import
|
|
8
|
+
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from "./styles";
|
|
9
9
|
|
|
10
10
|
// Duplicated runtime code from React SDK
|
|
11
11
|
|
|
@@ -48,10 +48,12 @@ export default function {{COMPONENT_CLASS_NAME}}(props) {
|
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
{{=<% %>=}}
|
|
51
|
+
|
|
53
52
|
|
|
54
53
|
return (
|
|
54
|
+
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
55
|
+
{{! pick new delimiters for mustache }}
|
|
56
|
+
{{=<% %>=}}
|
|
55
57
|
<FieldGroup name={propsToUse.showLabel ? propsToUse.label : ""}>
|
|
56
58
|
{showHighlightedData && highlightedDataArr.length > 0 && (
|
|
57
59
|
<Grid container spacing={1} style={{ padding: "0 0 1em" }}>
|
|
@@ -70,10 +72,12 @@ export default function {{COMPONENT_CLASS_NAME}}(props) {
|
|
|
70
72
|
))}
|
|
71
73
|
</Grid>
|
|
72
74
|
</FieldGroup>
|
|
75
|
+
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
76
|
+
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
73
77
|
);
|
|
74
78
|
}
|
|
75
79
|
|
|
76
|
-
|
|
80
|
+
|
|
77
81
|
|
|
78
82
|
{{COMPONENT_CLASS_NAME}}.defaultProps = {
|
|
79
83
|
label: undefined,
|