@pega/dx-component-builder-sdk 0.1.47 → 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 +112 -56
- 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
|
@@ -3,39 +3,80 @@ import Listr from 'listr';
|
|
|
3
3
|
import chalk from 'chalk';
|
|
4
4
|
|
|
5
5
|
import validate from '../validator/index.js';
|
|
6
|
-
import { getComponentDirectoryPath, showVersion, getOptionsCategory } from '../../util.js';
|
|
7
|
-
import
|
|
6
|
+
import { getComponentDirectoryPath, showVersion, getOptionsCategory, getFramework, getLocalComponentKeyFromConfig, convertIntoKebabCase, convertIntoPascalCase } from '../../util.js';
|
|
7
|
+
import { bundleReactComponent, bundleAngularComponent} from '../bundle/index.js';
|
|
8
8
|
import { updateComponentMap } from '../map/map.js';
|
|
9
9
|
import { lintComponent } from '../linter/index.js';
|
|
10
10
|
import { CATEGORY_CONSTELLATION, CATEGORY_CUSTOM } from '../../constants.js';
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
import { getPublishComponentQuestions,
|
|
14
|
-
publishComponentToServer,
|
|
15
|
-
zipComponent,
|
|
16
|
-
getBuildCategory,
|
|
17
|
-
mapConfigJsonToCompanion,
|
|
13
|
+
import { getPublishComponentQuestions,
|
|
14
|
+
publishComponentToServer,
|
|
15
|
+
zipComponent,
|
|
16
|
+
getBuildCategory,
|
|
17
|
+
mapConfigJsonToCompanion,
|
|
18
18
|
removeCompanionConfigJson} from './helper.js';
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
export default async options => {
|
|
22
22
|
showVersion();
|
|
23
23
|
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
let
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
const framework = await getFramework();
|
|
25
|
+
|
|
26
|
+
let componentKey;
|
|
27
|
+
let sourceMap;
|
|
28
|
+
let devBuild;
|
|
29
|
+
let content;
|
|
30
|
+
let category;
|
|
31
|
+
|
|
32
|
+
let doFetch = true;
|
|
33
|
+
|
|
34
|
+
if (options.params.length >= 8) {
|
|
35
|
+
category = options.params[3];
|
|
36
|
+
componentKey = options.params[4];
|
|
37
|
+
const rulesetName = options.params[5];
|
|
38
|
+
const rulesetVersion = options.params[6];
|
|
39
|
+
const dBuild = options.params[7];
|
|
40
|
+
devBuild = dBuild === 'Y' || dBuild === 'y' || dBuild === true || dBuild === 'true';
|
|
41
|
+
doFetch = false;
|
|
42
|
+
|
|
43
|
+
content = { componentKey, rulesetName, rulesetVersion, devBuild };
|
|
44
|
+
} else {
|
|
45
|
+
const catQuestion = await getBuildCategory(options);
|
|
46
|
+
const catAnswers = await inquirer.prompt(catQuestion);
|
|
47
|
+
|
|
48
|
+
category = catAnswers.category;
|
|
49
|
+
if (category == null) {
|
|
50
|
+
category = getOptionsCategory(options);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const questions = await getPublishComponentQuestions(category);
|
|
54
|
+
const answers = await inquirer.prompt(questions);
|
|
55
|
+
({ componentKey, sourceMap, devBuild } = answers);
|
|
56
|
+
|
|
57
|
+
content = {
|
|
58
|
+
...answers
|
|
59
|
+
};
|
|
30
60
|
}
|
|
31
61
|
|
|
32
|
-
const questions = await getPublishComponentQuestions(category);
|
|
33
|
-
const answers = await inquirer.prompt(questions);
|
|
34
|
-
const { componentKey, sourceMap, devBuild } = answers;
|
|
35
62
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
63
|
+
const sDevBuild = devBuild ? '(dev build)' : '';
|
|
64
|
+
const sFramework = framework.split("-")[1];
|
|
65
|
+
|
|
66
|
+
let associatedComponentKey = componentKey;
|
|
67
|
+
|
|
68
|
+
switch (framework) {
|
|
69
|
+
case "SDK-Angular":
|
|
70
|
+
// componentKey is in Pascal case, which is associated, need to convert to Kabab case
|
|
71
|
+
let arComp = componentKey.split("/");
|
|
72
|
+
arComp[1] = convertIntoKebabCase(convertIntoPascalCase(arComp[1]));
|
|
73
|
+
componentKey = arComp.join("/");
|
|
74
|
+
break;
|
|
75
|
+
case "SDK-React":
|
|
76
|
+
break;
|
|
77
|
+
case "SDK-WebComponents":
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
39
80
|
|
|
40
81
|
const customTasks = new Listr(
|
|
41
82
|
[
|
|
@@ -47,7 +88,7 @@ export default async options => {
|
|
|
47
88
|
}
|
|
48
89
|
},
|
|
49
90
|
{
|
|
50
|
-
title:
|
|
91
|
+
title: `Lint ${sFramework} component`,
|
|
51
92
|
task: async () => {
|
|
52
93
|
const targetDirectory = await getComponentDirectoryPath(componentKey, category);
|
|
53
94
|
// console.log(`in buildComponent Lint component task: componentKey: ${componentKey} targetDirectory: ${targetDirectory}`);
|
|
@@ -55,9 +96,16 @@ export default async options => {
|
|
|
55
96
|
}
|
|
56
97
|
},
|
|
57
98
|
{
|
|
58
|
-
title:
|
|
59
|
-
task: async () => await
|
|
60
|
-
skip: () => (options.skipBundle ? 'Skipped bundling component' : undefined)
|
|
99
|
+
title: `Bundle React component ${sDevBuild}`,
|
|
100
|
+
task: async () => await bundleReactComponent(componentKey, sourceMap, devBuild, category),
|
|
101
|
+
skip: () => (options.skipBundle ? 'Skipped bundling component' : undefined),
|
|
102
|
+
enabled: ok => framework === "SDK-React"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
title: `Bundle Angular component ${sDevBuild}`,
|
|
106
|
+
task: async () => await bundleAngularComponent(componentKey, sourceMap, devBuild, category),
|
|
107
|
+
skip: () => (options.skipBundle ? 'Skipped bundling component' : undefined),
|
|
108
|
+
enabled: ok => framework === "SDK-Angular"
|
|
61
109
|
},
|
|
62
110
|
{
|
|
63
111
|
title: 'Update component map',
|
|
@@ -68,7 +116,7 @@ export default async options => {
|
|
|
68
116
|
{
|
|
69
117
|
title: 'Lint associated component',
|
|
70
118
|
task: async () => {
|
|
71
|
-
const targetDirectory = await getComponentDirectoryPath(
|
|
119
|
+
const targetDirectory = await getComponentDirectoryPath(associatedComponentKey, CATEGORY_CONSTELLATION);
|
|
72
120
|
// console.log(`in buildComponent Lint component task: componentKey: ${componentKey} targetDirectory: ${targetDirectory}`);
|
|
73
121
|
await lintComponent(targetDirectory);
|
|
74
122
|
}
|
|
@@ -80,27 +128,27 @@ export default async options => {
|
|
|
80
128
|
}
|
|
81
129
|
},
|
|
82
130
|
{
|
|
83
|
-
title:
|
|
84
|
-
task: async () => await
|
|
131
|
+
title: `Bundle associated component ${sDevBuild}`,
|
|
132
|
+
task: async () => await bundleReactComponent(associatedComponentKey, sourceMap, devBuild, CATEGORY_CONSTELLATION),
|
|
85
133
|
skip: () => (options.skipBundle ? 'Skipped bundling component' : undefined)
|
|
86
134
|
},
|
|
87
135
|
{
|
|
88
136
|
title: 'Zip associated component',
|
|
89
137
|
task: async () => {
|
|
90
|
-
const output = await zipComponent(
|
|
138
|
+
const output = await zipComponent(associatedComponentKey, CATEGORY_CONSTELLATION);
|
|
91
139
|
content = { ...content, ...output };
|
|
92
140
|
}
|
|
93
141
|
},
|
|
94
142
|
{
|
|
95
143
|
title: 'Publish associated component',
|
|
96
144
|
task: async () => {
|
|
97
|
-
await publishComponentToServer(content);
|
|
145
|
+
await publishComponentToServer(content, doFetch);
|
|
98
146
|
}
|
|
99
147
|
},
|
|
100
148
|
{
|
|
101
149
|
title: 'Clean up associated',
|
|
102
150
|
task: async () => {
|
|
103
|
-
await removeCompanionConfigJson(
|
|
151
|
+
await removeCompanionConfigJson(associatedComponentKey);
|
|
104
152
|
}
|
|
105
153
|
}
|
|
106
154
|
],
|
|
@@ -118,7 +166,7 @@ export default async options => {
|
|
|
118
166
|
}
|
|
119
167
|
},
|
|
120
168
|
{
|
|
121
|
-
title:
|
|
169
|
+
title: `Lint ${sFramework} component`,
|
|
122
170
|
task: async () => {
|
|
123
171
|
const targetDirectory = await getComponentDirectoryPath(componentKey, category);
|
|
124
172
|
// console.log(`in buildComponent Lint component task: componentKey: ${componentKey} targetDirectory: ${targetDirectory}`);
|
|
@@ -126,9 +174,14 @@ export default async options => {
|
|
|
126
174
|
}
|
|
127
175
|
},
|
|
128
176
|
{
|
|
129
|
-
title:
|
|
130
|
-
task: async () => await
|
|
131
|
-
|
|
177
|
+
title: `Bundle React component ${sDevBuild}`,
|
|
178
|
+
task: async () => await bundleReactComponent(componentKey, sourceMap, devBuild, category),
|
|
179
|
+
enabled: ok => framework === "SDK-React"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
title: `Bundle Angular component ${sDevBuild}`,
|
|
183
|
+
task: async () => await bundleAngularComponent(componentKey, sourceMap, devBuild, category),
|
|
184
|
+
enabled: ok => framework === "SDK-Angular"
|
|
132
185
|
},
|
|
133
186
|
{
|
|
134
187
|
title: 'Update component map',
|
|
@@ -139,7 +192,7 @@ export default async options => {
|
|
|
139
192
|
{
|
|
140
193
|
title: 'Zip component config',
|
|
141
194
|
task: async () => {
|
|
142
|
-
const output = await zipComponent(
|
|
195
|
+
const output = await zipComponent(associatedComponentKey, category);
|
|
143
196
|
content = { ...content, ...output };
|
|
144
197
|
}
|
|
145
198
|
},
|
|
@@ -12,20 +12,39 @@ import {
|
|
|
12
12
|
getComponentsObj,
|
|
13
13
|
validateRulesetVersion,
|
|
14
14
|
getPegaServerConfig,
|
|
15
|
-
getOptionsCategory
|
|
15
|
+
getOptionsCategory,
|
|
16
|
+
getLocalComponentKeyFromConfig,
|
|
17
|
+
getFramework
|
|
16
18
|
} from '../../util.js';
|
|
17
19
|
|
|
18
|
-
import { PUBLISH_COMPONENT_SERVICE_REST_ENDPOINT,
|
|
19
|
-
TOKEN_PATH,
|
|
20
|
-
COMPONENT_SCHEMA,
|
|
21
|
-
CATEGORY_CONSTELLATION,
|
|
20
|
+
import { PUBLISH_COMPONENT_SERVICE_REST_ENDPOINT,
|
|
21
|
+
TOKEN_PATH,
|
|
22
|
+
COMPONENT_SCHEMA,
|
|
23
|
+
CATEGORY_CONSTELLATION,
|
|
22
24
|
CATEGORY_CUSTOM } from '../../constants.js';
|
|
23
25
|
|
|
24
26
|
|
|
25
27
|
export const mapConfigJsonToCompanion = async ( componentKey ) => {
|
|
26
28
|
const srcDirectory = await getComponentDirectoryPath(componentKey, CATEGORY_CUSTOM);
|
|
27
|
-
const companionDirectory = await getComponentDirectoryPath(componentKey, CATEGORY_CONSTELLATION);
|
|
28
29
|
let configContent = fs.readFileSync(`${srcDirectory}/config.json`, { encoding: 'utf8' });
|
|
30
|
+
const framework = await getFramework();
|
|
31
|
+
|
|
32
|
+
let associatedComponentKey = componentKey;
|
|
33
|
+
|
|
34
|
+
switch (framework) {
|
|
35
|
+
case "SDK-Angular":
|
|
36
|
+
let arComp = associatedComponentKey.split("/");
|
|
37
|
+
const componentKeyPascal = await getLocalComponentKeyFromConfig(associatedComponentKey);
|
|
38
|
+
arComp[1] = componentKeyPascal;
|
|
39
|
+
associatedComponentKey = arComp.join("/")
|
|
40
|
+
break;
|
|
41
|
+
case "SDK-React":
|
|
42
|
+
break;
|
|
43
|
+
case "SDK-WebComponents":
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const companionDirectory = await getComponentDirectoryPath(associatedComponentKey, CATEGORY_CONSTELLATION);
|
|
29
48
|
|
|
30
49
|
fs.writeFileSync(`${companionDirectory}/config.json`, configContent, { encoding: 'utf8' });
|
|
31
50
|
|
|
@@ -54,8 +73,8 @@ export const getBuildCategory = async (options) => {
|
|
|
54
73
|
];
|
|
55
74
|
};
|
|
56
75
|
|
|
57
|
-
export const getPublishComponentQuestions = async () => {
|
|
58
|
-
|
|
76
|
+
export const getPublishComponentQuestions = async (category) => {
|
|
77
|
+
|
|
59
78
|
const defaultPegaConfig = await getPegaServerConfig();
|
|
60
79
|
|
|
61
80
|
return [
|
|
@@ -89,6 +108,7 @@ export const getPublishComponentQuestions = async () => {
|
|
|
89
108
|
},
|
|
90
109
|
{
|
|
91
110
|
name: 'devBuild',
|
|
111
|
+
type: 'confirm',
|
|
92
112
|
message: 'Generate development build ?',
|
|
93
113
|
default: defaultPegaConfig.devBuild
|
|
94
114
|
}
|
|
@@ -162,20 +182,25 @@ export const zipComponent = async (componentKey, category = CATEGORY_CUSTOM) =>
|
|
|
162
182
|
};
|
|
163
183
|
|
|
164
184
|
export const cleanUp = async () => {
|
|
165
|
-
fs.rm('dist/components', { recursive: true }, err => {
|
|
166
|
-
if (err) {
|
|
167
|
-
throw err;
|
|
168
|
-
}
|
|
169
|
-
});
|
|
170
185
|
|
|
171
|
-
fs.
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
186
|
+
if (fs.existsSync('dist/components')) {
|
|
187
|
+
fs.rm('dist/components', { recursive: true }, err => {
|
|
188
|
+
if (err) {
|
|
189
|
+
throw err;
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
if (fs.existsSync('lib')) {
|
|
195
|
+
fs.rm('lib', { recursive: true }, err => {
|
|
196
|
+
if (err) {
|
|
197
|
+
throw err;
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
}
|
|
176
201
|
}
|
|
177
202
|
|
|
178
|
-
export const publishComponentToServer = async data => {
|
|
203
|
+
export const publishComponentToServer = async (data, doFetch = true) => {
|
|
179
204
|
const { configContent, zipContent, rulesetName, rulesetVersion } = data;
|
|
180
205
|
let { componentKey } = data;
|
|
181
206
|
|
|
@@ -206,46 +231,60 @@ export const publishComponentToServer = async data => {
|
|
|
206
231
|
defaultPegaConfig.server,
|
|
207
232
|
PUBLISH_COMPONENT_SERVICE_REST_ENDPOINT
|
|
208
233
|
);
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
return response.text();
|
|
229
|
-
})
|
|
230
|
-
.then(resp => {
|
|
231
|
-
const respData = JSON.parse(resp);
|
|
232
|
-
if (status === 401) {
|
|
233
|
-
throw new Error(
|
|
234
|
-
'Error occurred in authentication. Please regenerate using authenticate'
|
|
235
|
-
);
|
|
236
|
-
// console.log(accessTokenUri, refreshToken);
|
|
237
|
-
/* TODO - Handle refresh_token */
|
|
238
|
-
} else if (status == 200) {
|
|
239
|
-
console.log(chalk.bold.green(`Success : ${respData.message}`));
|
|
240
|
-
} else {
|
|
241
|
-
throw new Error(`${respData.message}`);
|
|
242
|
-
}
|
|
234
|
+
|
|
235
|
+
// fetch if not testing
|
|
236
|
+
if (doFetch) {
|
|
237
|
+
try {
|
|
238
|
+
const OauthData = fs.readFileSync(TOKEN_PATH, 'utf8');
|
|
239
|
+
if (OauthData) {
|
|
240
|
+
const {
|
|
241
|
+
access_token: accessToken,
|
|
242
|
+
token_type: tokenType,
|
|
243
|
+
refresh_token: refreshToken
|
|
244
|
+
} = JSON.parse(OauthData);
|
|
245
|
+
let status = 500;
|
|
246
|
+
fetch(url, {
|
|
247
|
+
method: 'POST',
|
|
248
|
+
agent: new https.Agent({ rejectUnauthorized: false }),
|
|
249
|
+
headers: {
|
|
250
|
+
Authorization: `${tokenType} ${accessToken}`
|
|
251
|
+
},
|
|
252
|
+
body: JSON.stringify(apiBody)
|
|
243
253
|
})
|
|
244
|
-
|
|
245
|
-
|
|
254
|
+
.then(response => {
|
|
255
|
+
status = response.status;
|
|
256
|
+
return response.text();
|
|
257
|
+
})
|
|
258
|
+
.then(resp => {
|
|
259
|
+
const respData = JSON.parse(resp);
|
|
260
|
+
if (status === 401) {
|
|
261
|
+
throw new Error(
|
|
262
|
+
'Error occurred in authentication. Please regenerate using authenticate'
|
|
263
|
+
);
|
|
264
|
+
// console.log(accessTokenUri, refreshToken);
|
|
265
|
+
/* TODO - Handle refresh_token */
|
|
266
|
+
} else if (status == 200) {
|
|
267
|
+
console.log(chalk.bold.green(`Success : ${respData.message}`));
|
|
268
|
+
}
|
|
269
|
+
else if (status === 403) {
|
|
270
|
+
// eslint-disable-next-line prefer-promise-reject-errors
|
|
271
|
+
Promise.reject(
|
|
272
|
+
`${chalk.bold.red(
|
|
273
|
+
'Error forbidden: User does not have privileges to Publish.'
|
|
274
|
+
)}`
|
|
275
|
+
);
|
|
276
|
+
}
|
|
277
|
+
else {
|
|
278
|
+
throw new Error(`${respData.message}`);
|
|
279
|
+
}
|
|
280
|
+
})
|
|
281
|
+
.catch(e => Promise.reject(`${chalk.bold.red(e)}`));
|
|
282
|
+
} else {
|
|
283
|
+
throw new Error(`Error occurred in authentication. Please regenerate using authenticate`);
|
|
284
|
+
}
|
|
285
|
+
} catch (err) {
|
|
246
286
|
throw new Error(`Error occurred in authentication. Please regenerate using authenticate`);
|
|
247
287
|
}
|
|
248
|
-
} catch (err) {
|
|
249
|
-
throw new Error(`Error occurred in authentication. Please regenerate using authenticate`);
|
|
250
288
|
}
|
|
289
|
+
|
|
251
290
|
};
|