@pega/dx-component-builder-sdk 0.1.0
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/.access_token +1 -0
- package/.agilestudio +3 -0
- package/.eslintrc.json +18 -0
- package/.prettierignore +2 -0
- package/.prettierrc.json +1 -0
- package/LICENSE +185 -0
- package/README.md +199 -0
- package/bin/index.js +5 -0
- package/cspell.json +26 -0
- package/package.json +67 -0
- package/src/cli.js +104 -0
- package/src/constants.js +134 -0
- package/src/tasks/authenticate/helper.js +60 -0
- package/src/tasks/authenticate/index.js +81 -0
- package/src/tasks/build/helper.js +125 -0
- package/src/tasks/build/index.js +52 -0
- package/src/tasks/bundle/builder/index.js +218 -0
- package/src/tasks/bundle/builder/modules.js +139 -0
- package/src/tasks/bundle/builder/paths.js +50 -0
- package/src/tasks/bundle/builder/webpack.config.js +336 -0
- package/src/tasks/bundle/index.js +65 -0
- package/src/tasks/create/index.js +380 -0
- package/src/tasks/create/template/config.json.mustache +62 -0
- package/src/tasks/create/template/demo.stories.jsx.mustache +44 -0
- package/src/tasks/create/template/index.jsx.mustache +55 -0
- package/src/tasks/create/template/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/Boolean.js.mustache +38 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/boolean-format.js.mustache +26 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/config.json.mustache +145 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/event-utils.js.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/index.jsx.mustache +171 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Field/Date/config.json.mustache +195 -0
- package/src/tasks/create/templates/Constellation/Field/Date/date.js.mustache +327 -0
- package/src/tasks/create/templates/Constellation/Field/Date/demo.stories.jsx.mustache +44 -0
- package/src/tasks/create/templates/Constellation/Field/Date/index.jsx.mustache +254 -0
- package/src/tasks/create/templates/Constellation/Field/Date/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Field/Date/suggestions-handler.js +10 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/config.json.mustache +256 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/date-time.js.mustache +93 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/date-utils.js +286 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/date.js.mustache +327 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/demo.stories.jsx.mustache +44 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/index.jsx.mustache +252 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/suggestions-handler.js +10 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/config.json.mustache +278 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/demo.stories.jsx.mustache +44 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/event-utils.js.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/index.jsx.mustache +272 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/suggestions-handler.js +10 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/config.json.mustache +291 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/demo.stories.jsx.mustache +44 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/event-utils.js.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/index.jsx.mustache +300 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/suggestions-handler.js +10 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/config.json.mustache +93 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/demo.stories.jsx.mustache +44 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/event-utils.js.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/index.jsx.mustache +275 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/suggestions-handler.js +10 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/config.json.mustache +347 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/demo.stories.jsx.mustache +44 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/event-utils.js.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/index.jsx.mustache +335 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/suggestions-handler.js +10 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/config.json.mustache +114 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/demo.stories.jsx.mustache +44 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/event-utils.js.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/index.jsx.mustache +308 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/picklist.js.mustache +43 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/suggestions-handler.js +10 -0
- package/src/tasks/create/templates/Constellation/Field/Text/config.json.mustache +62 -0
- package/src/tasks/create/templates/Constellation/Field/Text/demo.stories.jsx.mustache +44 -0
- package/src/tasks/create/templates/Constellation/Field/Text/index.jsx.mustache +60 -0
- package/src/tasks/create/templates/Constellation/Field/Text/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/config.json.mustache +111 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/demo.stories.jsx.mustache +44 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/event-utils.js.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/index.jsx.mustache +189 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/suggestions-handler.js +10 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/text-email.js.mustache +43 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/StatusWork.js +27 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/config.json.mustache +111 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/demo.stories.jsx.mustache +44 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/event-utils.js.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/index.jsx.mustache +196 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/suggestions-handler.js +10 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/text-input.js.mustache +43 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/config.json.mustache +111 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/demo.stories.jsx.mustache +44 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/event-utils.js.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/index.jsx.mustache +189 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/suggestions-handler.js +10 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/text-paragraph.js.mustache +43 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/config.json.mustache +123 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/demo.stories.jsx.mustache +44 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/event-utils.js.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/index.jsx.mustache +223 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/suggestions-handler.js +10 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/text-phone.js.mustache +43 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/config.json.mustache +237 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/demo.stories.jsx.mustache +44 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/event-utils.js.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/index.jsx.mustache +232 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/suggestions-handler.js +10 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/text-url.js.mustache +172 -0
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/config.json.mustache +185 -0
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/demo.stories.jsx.mustache +44 -0
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/index.jsx.mustache +213 -0
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/suggestions-handler.js +10 -0
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/time-of-day.js.mustache +286 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/OneColumnDetails.svg +22 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/config.json.mustache +35 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/index.jsx.mustache +88 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/utils.js.mustache +155 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/TwoColumnDetails.svg +28 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/config.json.mustache +42 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/index.jsx.mustache +88 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/utils.js.mustache +155 -0
- package/src/tasks/create/templates/Constellation/Template/FORM/DefaultForm.svg +29 -0
- package/src/tasks/create/templates/Constellation/Template/FORM/config.json.mustache +45 -0
- package/src/tasks/create/templates/Constellation/Template/FORM/index.jsx.mustache +49 -0
- package/src/tasks/create/templates/Constellation/Template/FORM/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Template/FORM-region/TwoColumn.svg +38 -0
- package/src/tasks/create/templates/Constellation/Template/FORM-region/config.json.mustache +27 -0
- package/src/tasks/create/templates/Constellation/Template/FORM-region/index.jsx.mustache +51 -0
- package/src/tasks/create/templates/Constellation/Template/FORM-region/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/GetNextWork.js.mustache +29 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/OneColumnPage.svg +36 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/config.json.mustache +32 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/index.jsx.mustache +68 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/localizations.json.mustache +4 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/utils.js.mustache +226 -0
- package/src/tasks/create/templates/Constellation/Widget/CASE/OneColumnPage.svg +36 -0
- package/src/tasks/create/templates/Constellation/Widget/CASE/config.json.mustache +23 -0
- package/src/tasks/create/templates/Constellation/Widget/CASE/index.jsx.mustache +75 -0
- package/src/tasks/create/templates/Constellation/Widget/CASE/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE/OneColumnPage.svg +36 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE/config.json.mustache +59 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE/index.jsx.mustache +48 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Avatar.js.mustache +73 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/OneColumnPage.svg +36 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Operator.js.mustache +239 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/config.json.mustache +66 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/index.jsx.mustache +110 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/styles.js.mustache +7 -0
- package/src/tasks/create/templates/SDK-Angular/Field/__components.md +4 -0
- package/src/tasks/create/templates/SDK-Angular/Template/__components.md +4 -0
- package/src/tasks/create/templates/SDK-Angular/Widget/__components.md +4 -0
- package/src/tasks/create/templates/SDK-React/Field/Boolean/config.json.mustache +73 -0
- package/src/tasks/create/templates/SDK-React/Field/Boolean/demo.stories.jsx.mustache +44 -0
- package/src/tasks/create/templates/SDK-React/Field/Boolean/index.tsx.mustache +109 -0
- package/src/tasks/create/templates/SDK-React/Field/Boolean/styles.js.mustache +7 -0
- package/src/tasks/create/templates/SDK-React/Field/Date/config.json.mustache +133 -0
- package/src/tasks/create/templates/SDK-React/Field/Date/demo.stories.jsx.mustache +44 -0
- package/src/tasks/create/templates/SDK-React/Field/Date/index.tsx.mustache +122 -0
- package/src/tasks/create/templates/SDK-React/Field/Date/styles.js.mustache +7 -0
- package/src/tasks/create/templates/SDK-React/Field/DateTime/config.json.mustache +190 -0
- package/src/tasks/create/templates/SDK-React/Field/DateTime/demo.stories.jsx.mustache +44 -0
- package/src/tasks/create/templates/SDK-React/Field/DateTime/index.tsx.mustache +112 -0
- package/src/tasks/create/templates/SDK-React/Field/DateTime/styles.js.mustache +7 -0
- package/src/tasks/create/templates/SDK-React/Field/Decimal/config.json.mustache +80 -0
- package/src/tasks/create/templates/SDK-React/Field/Decimal/demo.stories.jsx.mustache +44 -0
- package/src/tasks/create/templates/SDK-React/Field/Decimal/index.tsx.mustache +105 -0
- package/src/tasks/create/templates/SDK-React/Field/Decimal/styles.js.mustache +7 -0
- package/src/tasks/create/templates/SDK-React/Field/Decimal-Currency/config.json.mustache +111 -0
- package/src/tasks/create/templates/SDK-React/Field/Decimal-Currency/demo.stories.jsx.mustache +44 -0
- package/src/tasks/create/templates/SDK-React/Field/Decimal-Currency/index.tsx.mustache +131 -0
- package/src/tasks/create/templates/SDK-React/Field/Decimal-Currency/styles.js.mustache +7 -0
- package/src/tasks/create/templates/SDK-React/Field/Decimal-Percentage/config.json.mustache +80 -0
- package/src/tasks/create/templates/SDK-React/Field/Decimal-Percentage/demo.stories.jsx.mustache +44 -0
- package/src/tasks/create/templates/SDK-React/Field/Decimal-Percentage/index.tsx.mustache +128 -0
- package/src/tasks/create/templates/SDK-React/Field/Decimal-Percentage/styles.js.mustache +7 -0
- package/src/tasks/create/templates/SDK-React/Field/Integer/config.json.mustache +74 -0
- package/src/tasks/create/templates/SDK-React/Field/Integer/demo.stories.jsx.mustache +44 -0
- package/src/tasks/create/templates/SDK-React/Field/Integer/index.tsx.mustache +124 -0
- package/src/tasks/create/templates/SDK-React/Field/Integer/styles.js.mustache +7 -0
- package/src/tasks/create/templates/SDK-React/Field/Picklist/config.json.mustache +72 -0
- package/src/tasks/create/templates/SDK-React/Field/Picklist/demo.stories.jsx.mustache +44 -0
- package/src/tasks/create/templates/SDK-React/Field/Picklist/index.tsx.mustache +141 -0
- package/src/tasks/create/templates/SDK-React/Field/Picklist/styles.js.mustache +7 -0
- package/src/tasks/create/templates/SDK-React/Field/Text/config.json.mustache +69 -0
- package/src/tasks/create/templates/SDK-React/Field/Text/demo.stories.jsx.mustache +44 -0
- package/src/tasks/create/templates/SDK-React/Field/Text/index.tsx.mustache +119 -0
- package/src/tasks/create/templates/SDK-React/Field/Text/styles.js.mustache +7 -0
- package/src/tasks/create/templates/SDK-React/Field/Text-Email/config.json.mustache +69 -0
- package/src/tasks/create/templates/SDK-React/Field/Text-Email/demo.stories.jsx.mustache +44 -0
- package/src/tasks/create/templates/SDK-React/Field/Text-Email/index.tsx.mustache +121 -0
- package/src/tasks/create/templates/SDK-React/Field/Text-Email/styles.js.mustache +7 -0
- package/src/tasks/create/templates/SDK-React/Field/Text-Input/config.json.mustache +69 -0
- package/src/tasks/create/templates/SDK-React/Field/Text-Input/demo.stories.jsx.mustache +44 -0
- package/src/tasks/create/templates/SDK-React/Field/Text-Input/index.tsx.mustache +119 -0
- package/src/tasks/create/templates/SDK-React/Field/Text-Input/styles.js.mustache +7 -0
- package/src/tasks/create/templates/SDK-React/Field/Text-Paragraph/config.json.mustache +69 -0
- package/src/tasks/create/templates/SDK-React/Field/Text-Paragraph/demo.stories.jsx.mustache +44 -0
- package/src/tasks/create/templates/SDK-React/Field/Text-Paragraph/index.tsx.mustache +123 -0
- package/src/tasks/create/templates/SDK-React/Field/Text-Paragraph/styles.js.mustache +7 -0
- package/src/tasks/create/templates/SDK-React/Field/Text-Phone/config.json.mustache +81 -0
- package/src/tasks/create/templates/SDK-React/Field/Text-Phone/demo.stories.jsx.mustache +44 -0
- package/src/tasks/create/templates/SDK-React/Field/Text-Phone/index.tsx.mustache +147 -0
- package/src/tasks/create/templates/SDK-React/Field/Text-Phone/styles.js.mustache +7 -0
- package/src/tasks/create/templates/SDK-React/Field/Text-URL/config.json.mustache +111 -0
- package/src/tasks/create/templates/SDK-React/Field/Text-URL/demo.stories.jsx.mustache +44 -0
- package/src/tasks/create/templates/SDK-React/Field/Text-URL/index.tsx.mustache +98 -0
- package/src/tasks/create/templates/SDK-React/Field/Text-URL/styles.js.mustache +7 -0
- package/src/tasks/create/templates/SDK-React/Field/TimeofDay/config.json.mustache +121 -0
- package/src/tasks/create/templates/SDK-React/Field/TimeofDay/demo.stories.jsx.mustache +44 -0
- package/src/tasks/create/templates/SDK-React/Field/TimeofDay/index.tsx.mustache +120 -0
- package/src/tasks/create/templates/SDK-React/Field/TimeofDay/styles.js.mustache +7 -0
- package/src/tasks/create/templates/SDK-React/Template/DETAILS/DefaultForm.svg +29 -0
- package/src/tasks/create/templates/SDK-React/Template/DETAILS/config.json.mustache +21 -0
- package/src/tasks/create/templates/SDK-React/Template/DETAILS/index.tsx.mustache +45 -0
- package/src/tasks/create/templates/SDK-React/Template/DETAILS/styles.js.mustache +7 -0
- package/src/tasks/create/templates/SDK-React/Template/DETAILS-region/TwoColumnDetails.svg +28 -0
- package/src/tasks/create/templates/SDK-React/Template/DETAILS-region/config.json.mustache +27 -0
- package/src/tasks/create/templates/SDK-React/Template/DETAILS-region/index.tsx.mustache +53 -0
- package/src/tasks/create/templates/SDK-React/Template/DETAILS-region/styles.js.mustache +7 -0
- package/src/tasks/create/templates/SDK-React/Template/FORM/DefaultForm.css +25 -0
- package/src/tasks/create/templates/SDK-React/Template/FORM/DefaultForm.svg +29 -0
- package/src/tasks/create/templates/SDK-React/Template/FORM/config.json.mustache +45 -0
- package/src/tasks/create/templates/SDK-React/Template/FORM/index.tsx.mustache +63 -0
- package/src/tasks/create/templates/SDK-React/Template/FORM/styles.js.mustache +7 -0
- package/src/tasks/create/templates/SDK-React/Template/FORM-region/TwoColumn.svg +38 -0
- package/src/tasks/create/templates/SDK-React/Template/FORM-region/config.json.mustache +49 -0
- package/src/tasks/create/templates/SDK-React/Template/FORM-region/index.tsx.mustache +69 -0
- package/src/tasks/create/templates/SDK-React/Template/FORM-region/styles.js.mustache +7 -0
- package/src/tasks/create/templates/SDK-React/Template/PAGE/OneColumn.tsx.mustache +32 -0
- package/src/tasks/create/templates/SDK-React/Template/PAGE/OneColumnPage.svg +28 -0
- package/src/tasks/create/templates/SDK-React/Template/PAGE/config.json.mustache +32 -0
- package/src/tasks/create/templates/SDK-React/Template/PAGE/index.tsx.mustache +31 -0
- package/src/tasks/create/templates/SDK-React/Template/PAGE/styles.js.mustache +7 -0
- package/src/tasks/create/templates/SDK-React/Widget/CASE/OneColumnPage.svg +36 -0
- package/src/tasks/create/templates/SDK-React/Widget/CASE/config.json.mustache +23 -0
- package/src/tasks/create/templates/SDK-React/Widget/CASE/index.tsx.mustache +183 -0
- package/src/tasks/create/templates/SDK-React/Widget/CASE/styles.js.mustache +7 -0
- package/src/tasks/create/templates/SDK-React/Widget/PAGE/OneColumnPage.svg +36 -0
- package/src/tasks/create/templates/SDK-React/Widget/PAGE/config.json.mustache +59 -0
- package/src/tasks/create/templates/SDK-React/Widget/PAGE/index.tsx.mustache +78 -0
- package/src/tasks/create/templates/SDK-React/Widget/PAGE/styles.js.mustache +7 -0
- package/src/tasks/create/templates/SDK-React/Widget/PAGE-CASE/OneColumnPage.svg +36 -0
- package/src/tasks/create/templates/SDK-React/Widget/PAGE-CASE/config.json.mustache +66 -0
- package/src/tasks/create/templates/SDK-React/Widget/PAGE-CASE/index.tsx.mustache +239 -0
- package/src/tasks/create/templates/SDK-React/Widget/PAGE-CASE/styles.js.mustache +7 -0
- package/src/tasks/create/templates/SDK-WebComponents/Field/__components.md +4 -0
- package/src/tasks/create/templates/SDK-WebComponents/Template/__components.md +4 -0
- package/src/tasks/create/templates/SDK-WebComponents/Widget/__components.md +4 -0
- package/src/tasks/delete/helper.js +122 -0
- package/src/tasks/delete/index.js +45 -0
- package/src/tasks/delete-all/helper.js +177 -0
- package/src/tasks/delete-all/index.js +45 -0
- package/src/tasks/index.js +11 -0
- package/src/tasks/linter/index.js +46 -0
- package/src/tasks/list/helper.js +118 -0
- package/src/tasks/list/index.js +51 -0
- package/src/tasks/map/map.js +118 -0
- package/src/tasks/publish/helper.js +147 -0
- package/src/tasks/publish/index.js +72 -0
- package/src/tasks/publish-all/helper.js +139 -0
- package/src/tasks/publish-all/index.js +84 -0
- package/src/tasks/update/index.js +5 -0
- package/src/tasks/upgrade/index.js +31 -0
- package/src/tasks/validator/index.js +216 -0
- package/src/util.js +442 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="100px" height="70px" viewBox="0 0 100 70" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>2 col copy</title>
|
|
4
|
+
<g id="Views" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
|
+
<g id="Template-icons" transform="translate(-320.000000, -925.000000)">
|
|
6
|
+
<g id="2-col--copy" transform="translate(320.000000, 925.000000)">
|
|
7
|
+
<rect id="bg" stroke="#A5A8BC" stroke-width="0.5" fill="#E7E9EB" x="0.25" y="0.25" width="99.5" height="69.5"></rect>
|
|
8
|
+
<g id="white" transform="translate(3.000000, 3.000000)" fill="#FFFFFF">
|
|
9
|
+
<rect id="Rectangle" x="0" y="0" width="94" height="66.5"></rect>
|
|
10
|
+
</g>
|
|
11
|
+
<g id="gray-copy-2" transform="translate(6.000000, 6.000000)" fill="#8084A7">
|
|
12
|
+
<rect id="Rectangle" x="0" y="-2.84217094e-14" width="42" height="11.8"></rect>
|
|
13
|
+
<rect id="Rectangle" x="46" y="-2.84217094e-14" width="42" height="11.8"></rect>
|
|
14
|
+
<rect id="Rectangle-Copy-5" x="0" y="16" width="42" height="11.8"></rect>
|
|
15
|
+
<rect id="Rectangle-Copy-3" x="46" y="16" width="42" height="11.8"></rect>
|
|
16
|
+
<rect id="Rectangle-Copy-15" x="0" y="32" width="42" height="11.8"></rect>
|
|
17
|
+
<rect id="Rectangle-Copy-14" x="46" y="32" width="42" height="11.8"></rect>
|
|
18
|
+
<rect id="Rectangle-Copy-17" x="0" y="48" width="42" height="11.8"></rect>
|
|
19
|
+
<rect id="Rectangle-Copy-16" x="46" y="48" width="42" height="11.8"></rect>
|
|
20
|
+
</g>
|
|
21
|
+
<g id="Group-7" transform="translate(28.000000, 11.000000)">
|
|
22
|
+
<path id="Line-12-Copy" d="M35.1666667,42.75 L47.1666667,48.5 L35.1666667,54.25 L35.166,49.25 L-0.25,49.25 L-0.25,47.75 L35.166,47.75 L35.1666667,42.75 Z" fill="#1E1F27" fill-rule="nonzero"></path>
|
|
23
|
+
<line x1="0.5" y1="48.5" x2="43.5" y2="32.5" id="Line" stroke="#1E1F27" stroke-width="1.5" stroke-linecap="square"></line>
|
|
24
|
+
<line x1="43.5" y1="32.5" x2="1.5" y2="32.5" id="Line-2" stroke="#1E1F27" stroke-width="1.5" stroke-linecap="square"></line>
|
|
25
|
+
</g>
|
|
26
|
+
</g>
|
|
27
|
+
</g>
|
|
28
|
+
</g>
|
|
29
|
+
</svg>
|
|
@@ -0,0 +1,21 @@
|
|
|
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": "DefaultForm.svg",
|
|
13
|
+
"properties": [
|
|
14
|
+
{
|
|
15
|
+
"name": "A",
|
|
16
|
+
"label": "Region A",
|
|
17
|
+
"format": "CONTENTPICKER",
|
|
18
|
+
"addTypeList": ["Fields", "Views", "UIComponents"]
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/* eslint-disable react/no-unused-prop-types */
|
|
2
|
+
import React from "react";
|
|
3
|
+
// import PropTypes from "prop-types";
|
|
4
|
+
import Grid from '@material-ui/core/Grid';
|
|
5
|
+
import DetailsFields from '@pega/react-sdk-components/lib/components/designSystemExtensions/DetailsFields';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
// Duplicated runtime code from React SDK
|
|
12
|
+
|
|
13
|
+
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
14
|
+
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
15
|
+
export default function {{COMPONENT_CLASS_NAME}}(props) {
|
|
16
|
+
const { children } = props;
|
|
17
|
+
const arFields: Array<any> = [];
|
|
18
|
+
|
|
19
|
+
for (const child of children) {
|
|
20
|
+
const theChildPConn = child.props.getPConnect();
|
|
21
|
+
const theChildrenOfChild = theChildPConn.getChildren();
|
|
22
|
+
arFields.push(theChildrenOfChild);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
27
|
+
<div id="DetailsOneColumn">
|
|
28
|
+
<Grid container spacing={1}>
|
|
29
|
+
<Grid item xs={12}>
|
|
30
|
+
<DetailsFields fields={arFields[0]} />
|
|
31
|
+
</Grid>
|
|
32
|
+
</Grid>
|
|
33
|
+
</div>
|
|
34
|
+
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
{{COMPONENT_CLASS_NAME}}.defaultProps = {
|
|
40
|
+
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
{{COMPONENT_CLASS_NAME}}.propTypes = {
|
|
44
|
+
|
|
45
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="100px" height="70px" viewBox="0 0 100 70" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>2 col </title>
|
|
4
|
+
<g id="Page-Config" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
|
+
<g id="Page-layouts" transform="translate(-847.000000, -84.000000)">
|
|
6
|
+
<g id="2-col-" transform="translate(847.000000, 84.000000)">
|
|
7
|
+
<rect id="bg" stroke="#A5A8BC" stroke-width="0.5" fill="#E7E9EB" x="0.25" y="0.25" width="99.5" height="69.5"></rect>
|
|
8
|
+
<g id="white" transform="translate(3.000000, 3.000000)" fill="#FFFFFF">
|
|
9
|
+
<rect id="Rectangle" x="0" y="0" width="94" height="66.5"></rect>
|
|
10
|
+
</g>
|
|
11
|
+
<g id="gray-copy-2" transform="translate(6.000000, 6.000000)" fill="#8084A7">
|
|
12
|
+
<rect id="Rectangle" x="0" y="-2.84217094e-14" width="42" height="63.8"></rect>
|
|
13
|
+
<rect id="Rectangle" x="46" y="-2.84217094e-14" width="42" height="63.8"></rect>
|
|
14
|
+
</g>
|
|
15
|
+
<g id="labels-copy" transform="translate(22.000000, 17.000000)" fill="#FFFFFF" font-family="OpenSans-Semibold, Open Sans" font-size="11" font-weight="500">
|
|
16
|
+
<text id="B">
|
|
17
|
+
<tspan x="45.75" y="12">B</tspan>
|
|
18
|
+
</text>
|
|
19
|
+
<g id="labels">
|
|
20
|
+
<text id="A">
|
|
21
|
+
<tspan x="0.75" y="12">A</tspan>
|
|
22
|
+
</text>
|
|
23
|
+
</g>
|
|
24
|
+
</g>
|
|
25
|
+
</g>
|
|
26
|
+
</g>
|
|
27
|
+
</g>
|
|
28
|
+
</svg>
|
|
@@ -0,0 +1,27 @@
|
|
|
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": "TwoColumnDetails.svg",
|
|
13
|
+
"properties": [
|
|
14
|
+
{
|
|
15
|
+
"name": "A",
|
|
16
|
+
"label": "Region A",
|
|
17
|
+
"format": "CONTENTPICKER",
|
|
18
|
+
"addTypeList": ["Fields", "Views", "UIComponents"]
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "B",
|
|
22
|
+
"label": "Region B",
|
|
23
|
+
"format": "CONTENTPICKER",
|
|
24
|
+
"addTypeList": ["Fields", "Views", "UIComponents"]
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/* eslint-disable react/no-unused-prop-types */
|
|
2
|
+
import React from "react";
|
|
3
|
+
// import PropTypes from "prop-types";
|
|
4
|
+
import Grid from '@material-ui/core/Grid';
|
|
5
|
+
import DetailsFields from '@pega/react-sdk-components/lib/components/designSystemExtensions/DetailsFields';
|
|
6
|
+
|
|
7
|
+
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
// Duplicated runtime code from React SDK
|
|
11
|
+
|
|
12
|
+
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
13
|
+
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
14
|
+
export default function {{COMPONENT_CLASS_NAME}}(props) {
|
|
15
|
+
const { children } = props;
|
|
16
|
+
const arFields: Array<any> = [];
|
|
17
|
+
|
|
18
|
+
for (const child of children) {
|
|
19
|
+
const theChildPConn = child.props.getPConnect();
|
|
20
|
+
const theChildrenOfChild = theChildPConn.getChildren();
|
|
21
|
+
arFields.push(theChildrenOfChild);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (arFields.length !== 2) {
|
|
25
|
+
// eslint-disable-next-line no-console
|
|
26
|
+
console.error(`DetailsTwoColumn expects 2 children and received ${arFields.length}`);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
32
|
+
<div id="DetailsTwoColumn">
|
|
33
|
+
<Grid container spacing={1}>
|
|
34
|
+
<Grid item xs={6}>
|
|
35
|
+
<DetailsFields fields={arFields[0]} />
|
|
36
|
+
</Grid>
|
|
37
|
+
<Grid item xs={6}>
|
|
38
|
+
<DetailsFields fields={arFields[1]} />
|
|
39
|
+
</Grid>
|
|
40
|
+
</Grid>
|
|
41
|
+
</div>
|
|
42
|
+
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
{{COMPONENT_CLASS_NAME}}.defaultProps = {
|
|
48
|
+
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
{{COMPONENT_CLASS_NAME}}.propTypes = {
|
|
52
|
+
|
|
53
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.psdk-default-form-one-column {
|
|
2
|
+
display: grid;
|
|
3
|
+
grid-template-columns: repeat(1, minmax(0, 1fr));
|
|
4
|
+
gap: calc(1rem);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.psdk-default-form-two-column {
|
|
8
|
+
display: grid;
|
|
9
|
+
grid-template-columns: repeat(2, 1fr);
|
|
10
|
+
gap: calc(1rem);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.psdk-default-form-three-column {
|
|
14
|
+
display: grid;
|
|
15
|
+
grid-template-columns: repeat(3, 1fr);
|
|
16
|
+
gap: calc(1rem);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.psdk-default-form-two-column .grid-column {
|
|
20
|
+
grid-column: 1 / span 2;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.psdk-default-form-three-column .grid-column {
|
|
24
|
+
grid-column: 1 / span 3;
|
|
25
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="100px" height="70px" viewBox="0 0 100 70" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>2 col copy</title>
|
|
4
|
+
<g id="Views" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
|
+
<g id="Template-icons" transform="translate(-320.000000, -925.000000)">
|
|
6
|
+
<g id="2-col--copy" transform="translate(320.000000, 925.000000)">
|
|
7
|
+
<rect id="bg" stroke="#A5A8BC" stroke-width="0.5" fill="#E7E9EB" x="0.25" y="0.25" width="99.5" height="69.5"></rect>
|
|
8
|
+
<g id="white" transform="translate(3.000000, 3.000000)" fill="#FFFFFF">
|
|
9
|
+
<rect id="Rectangle" x="0" y="0" width="94" height="66.5"></rect>
|
|
10
|
+
</g>
|
|
11
|
+
<g id="gray-copy-2" transform="translate(6.000000, 6.000000)" fill="#8084A7">
|
|
12
|
+
<rect id="Rectangle" x="0" y="-2.84217094e-14" width="42" height="11.8"></rect>
|
|
13
|
+
<rect id="Rectangle" x="46" y="-2.84217094e-14" width="42" height="11.8"></rect>
|
|
14
|
+
<rect id="Rectangle-Copy-5" x="0" y="16" width="42" height="11.8"></rect>
|
|
15
|
+
<rect id="Rectangle-Copy-3" x="46" y="16" width="42" height="11.8"></rect>
|
|
16
|
+
<rect id="Rectangle-Copy-15" x="0" y="32" width="42" height="11.8"></rect>
|
|
17
|
+
<rect id="Rectangle-Copy-14" x="46" y="32" width="42" height="11.8"></rect>
|
|
18
|
+
<rect id="Rectangle-Copy-17" x="0" y="48" width="42" height="11.8"></rect>
|
|
19
|
+
<rect id="Rectangle-Copy-16" x="46" y="48" width="42" height="11.8"></rect>
|
|
20
|
+
</g>
|
|
21
|
+
<g id="Group-7" transform="translate(28.000000, 11.000000)">
|
|
22
|
+
<path id="Line-12-Copy" d="M35.1666667,42.75 L47.1666667,48.5 L35.1666667,54.25 L35.166,49.25 L-0.25,49.25 L-0.25,47.75 L35.166,47.75 L35.1666667,42.75 Z" fill="#1E1F27" fill-rule="nonzero"></path>
|
|
23
|
+
<line x1="0.5" y1="48.5" x2="43.5" y2="32.5" id="Line" stroke="#1E1F27" stroke-width="1.5" stroke-linecap="square"></line>
|
|
24
|
+
<line x1="43.5" y1="32.5" x2="1.5" y2="32.5" id="Line-2" stroke="#1E1F27" stroke-width="1.5" stroke-linecap="square"></line>
|
|
25
|
+
</g>
|
|
26
|
+
</g>
|
|
27
|
+
</g>
|
|
28
|
+
</g>
|
|
29
|
+
</svg>
|
|
@@ -0,0 +1,45 @@
|
|
|
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": "DefaultForm.svg",
|
|
13
|
+
"properties": [
|
|
14
|
+
{
|
|
15
|
+
"format": "SELECT",
|
|
16
|
+
"name": "NumCols",
|
|
17
|
+
"label": "Number of columns",
|
|
18
|
+
"defaultValue": "1",
|
|
19
|
+
"source": [
|
|
20
|
+
{ "key": "1", "value": "One" },
|
|
21
|
+
{ "key": "2", "value": "Two" },
|
|
22
|
+
{ "key": "3", "value": "Three" }
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"format": "SELECT",
|
|
27
|
+
"name": "templateOverrideMode",
|
|
28
|
+
"label": "Template for embedded views",
|
|
29
|
+
"defaultValue": "USE_TEMPLATE",
|
|
30
|
+
"source": [
|
|
31
|
+
{ "key": "USE_TEMPLATE", "value": "Use template" },
|
|
32
|
+
{ "key": "IGNORE_TEMPLATE", "value": "Ignore template" }
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"format": "INSTRUCTIONS"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "Fields",
|
|
40
|
+
"label": "Fields",
|
|
41
|
+
"format": "CONTENTPICKER",
|
|
42
|
+
"allowCreatingGroup": true
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/* eslint-disable react/no-unused-prop-types */
|
|
2
|
+
import React, { createElement } from "react";
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
|
|
5
|
+
import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
|
|
6
|
+
import './DefaultForm.css';
|
|
7
|
+
|
|
8
|
+
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
// Duplicated runtime code from React SDK
|
|
12
|
+
|
|
13
|
+
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
14
|
+
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
15
|
+
export default function {{COMPONENT_CLASS_NAME}}(props) {
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
const { getPConnect, NumCols } = props;
|
|
19
|
+
|
|
20
|
+
let divClass: string;
|
|
21
|
+
|
|
22
|
+
const numCols = NumCols || "1";
|
|
23
|
+
switch (numCols) {
|
|
24
|
+
case "1" :
|
|
25
|
+
divClass = "psdk-default-form-one-column";
|
|
26
|
+
break;
|
|
27
|
+
case "2" :
|
|
28
|
+
divClass = "psdk-default-form-two-column";
|
|
29
|
+
break;
|
|
30
|
+
case "3" :
|
|
31
|
+
divClass = "psdk-default-form-three-column";
|
|
32
|
+
break;
|
|
33
|
+
default :
|
|
34
|
+
divClass = "psdk-default-form-one-column";
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
// repoint the children because they are in a region and we need to not render the region
|
|
40
|
+
// to take the children and create components for them, put in an array and pass as the
|
|
41
|
+
// defaultForm kids
|
|
42
|
+
const arChildren = getPConnect().getChildren()[0].getPConnect().getChildren();
|
|
43
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
44
|
+
const dfChildren = arChildren.map((kid, idx) => createElement(createPConnectComponent(), {...kid, key: idx}));
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
48
|
+
<div className={divClass}>
|
|
49
|
+
{dfChildren}
|
|
50
|
+
</div>
|
|
51
|
+
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
{{COMPONENT_CLASS_NAME}}.defaultProps = {
|
|
57
|
+
NumCols: "1"
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
{{COMPONENT_CLASS_NAME}}.propTypes = {
|
|
61
|
+
// children: PropTypes.arrayOf(PropTypes.node).isRequired,
|
|
62
|
+
NumCols: PropTypes.string
|
|
63
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="100px" height="70px" viewBox="0 0 100 70" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>2-col icon</title>
|
|
4
|
+
<g id="Views" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
|
+
<g id="Artboard-Copy-2" transform="translate(-198.000000, -207.000000)">
|
|
6
|
+
<g id="2-col--icon" transform="translate(198.000000, 207.000000)">
|
|
7
|
+
<rect id="bg" stroke="#A5A8BC" stroke-width="0.5" fill="#E7E9EB" x="0.25" y="0.25" width="99.5" height="69.5"></rect>
|
|
8
|
+
<g id="white" transform="translate(3.000000, 3.000000)" fill="#FFFFFF">
|
|
9
|
+
<rect id="Rectangle" x="0" y="0" width="94" height="66.5"></rect>
|
|
10
|
+
</g>
|
|
11
|
+
<g id="gray" transform="translate(6.000000, 6.000000)" fill="#8084A7">
|
|
12
|
+
<rect id="Rectangle" x="0" y="0" width="42" height="7.8"></rect>
|
|
13
|
+
<rect id="Rectangle-Copy-18" x="0" y="11.7" width="42" height="7.8"></rect>
|
|
14
|
+
<rect id="Rectangle-Copy-19" x="0" y="23.4" width="42" height="7.8"></rect>
|
|
15
|
+
<rect id="Rectangle-Copy-20" x="0" y="35.1" width="42" height="7.8"></rect>
|
|
16
|
+
<rect id="Rectangle-Copy-21" x="0" y="46.8" width="42" height="7.8"></rect>
|
|
17
|
+
<rect id="Rectangle-Copy-22" x="0" y="58.5" width="42" height="5"></rect>
|
|
18
|
+
<rect id="Rectangle-Copy" x="46" y="2.66453526e-15" width="42" height="7.8"></rect>
|
|
19
|
+
<rect id="Rectangle-Copy-27" x="46" y="11.7" width="42" height="7.8"></rect>
|
|
20
|
+
<rect id="Rectangle-Copy-26" x="46" y="23.4" width="42" height="7.8"></rect>
|
|
21
|
+
<rect id="Rectangle-Copy-25" x="46" y="35.1" width="42" height="7.8"></rect>
|
|
22
|
+
<rect id="Rectangle-Copy-24" x="46" y="46.8" width="42" height="7.8"></rect>
|
|
23
|
+
<rect id="Rectangle-Copy-23" x="46" y="58.5" width="42" height="5"></rect>
|
|
24
|
+
</g>
|
|
25
|
+
<g id="labels" transform="translate(16.000000, 11.000000)">
|
|
26
|
+
<circle id="Oval-Copy-3" fill="#FFFFFF" cx="10.5" cy="10.8076923" r="10.5"></circle>
|
|
27
|
+
<text id="A" font-family="OpenSans-Semibold, Open Sans" font-size="11" font-weight="500" fill="#56566F">
|
|
28
|
+
<tspan x="6.75" y="14">A</tspan>
|
|
29
|
+
</text>
|
|
30
|
+
<circle id="Oval-Copy-4" fill="#FFFFFF" cx="56.5" cy="10.8076923" r="10.5"></circle>
|
|
31
|
+
<text id="B" font-family="OpenSans-Semibold, Open Sans" font-size="11" font-weight="500" fill="#56566F">
|
|
32
|
+
<tspan x="52.75" y="14">B</tspan>
|
|
33
|
+
</text>
|
|
34
|
+
</g>
|
|
35
|
+
</g>
|
|
36
|
+
</g>
|
|
37
|
+
</g>
|
|
38
|
+
</svg>
|
|
@@ -0,0 +1,49 @@
|
|
|
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": "TwoColumn.svg",
|
|
13
|
+
"properties": [
|
|
14
|
+
{
|
|
15
|
+
"name": "A",
|
|
16
|
+
"label": "Region A",
|
|
17
|
+
"format": "CONTENTPICKER"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "B",
|
|
21
|
+
"label": "Region B",
|
|
22
|
+
"format": "CONTENTPICKER"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"label": "Conditions",
|
|
26
|
+
"format": "GROUP",
|
|
27
|
+
"properties": [
|
|
28
|
+
{
|
|
29
|
+
"name": "required",
|
|
30
|
+
"label": "Required",
|
|
31
|
+
"format": "REQUIRED",
|
|
32
|
+
"saveToReference": true
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "disabled",
|
|
36
|
+
"label": "Disabled",
|
|
37
|
+
"format": "DISABLED",
|
|
38
|
+
"saveToReference": true
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"name": "visibility",
|
|
42
|
+
"label": "Visibility",
|
|
43
|
+
"format": "VISIBILITY",
|
|
44
|
+
"saveToReference": true
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/* eslint-disable react/no-unused-prop-types */
|
|
2
|
+
import React from "react";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import { Grid, GridSize } from "@material-ui/core";
|
|
5
|
+
import { makeStyles } from '@material-ui/core/styles';
|
|
6
|
+
|
|
7
|
+
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
8
|
+
|
|
9
|
+
const useStyles = makeStyles(() => ({
|
|
10
|
+
colStyles: {
|
|
11
|
+
display: "grid",
|
|
12
|
+
gap: "1rem",
|
|
13
|
+
alignContent: "baseline",
|
|
14
|
+
},
|
|
15
|
+
}));
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
// Duplicated runtime code from React SDK
|
|
19
|
+
|
|
20
|
+
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
21
|
+
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
22
|
+
export default function {{COMPONENT_CLASS_NAME}}(props) {
|
|
23
|
+
const classes = useStyles();
|
|
24
|
+
|
|
25
|
+
const {children, templateCol} = props;
|
|
26
|
+
|
|
27
|
+
if (children.length !== 2) {
|
|
28
|
+
// eslint-disable-next-line no-console
|
|
29
|
+
console.error( `TwoColumn template sees more than 2 columns: ${children.length}`);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Calculate the size
|
|
33
|
+
// Default to assume the 2 columns are evenly split. However, override if templateCol
|
|
34
|
+
// (example value: "1fr 1fr")
|
|
35
|
+
let aSize: GridSize = 6;
|
|
36
|
+
let bSize: GridSize = 6;
|
|
37
|
+
|
|
38
|
+
const colAArray = templateCol.replaceAll(/[a-z]+/g, "").split(/\s/).map(itm => Number(itm));
|
|
39
|
+
const totalCols = colAArray.reduce((v, itm) => itm + v, 0);
|
|
40
|
+
const ratio = 12 / totalCols;
|
|
41
|
+
aSize = (ratio * colAArray[0]) as GridSize;
|
|
42
|
+
bSize = (ratio * colAArray[1]) as GridSize;
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
46
|
+
<Grid container spacing={1}>
|
|
47
|
+
<Grid item xs={12} md={aSize} className={classes.colStyles}>
|
|
48
|
+
{children[0]}
|
|
49
|
+
</Grid>
|
|
50
|
+
<Grid item xs={12} md={bSize} className={classes.colStyles}>
|
|
51
|
+
{children[1]}
|
|
52
|
+
</Grid>
|
|
53
|
+
</Grid>
|
|
54
|
+
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
{{COMPONENT_CLASS_NAME}}.defaultProps = {
|
|
60
|
+
templateCol: "1fr 1fr",
|
|
61
|
+
// icon: ""
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
{{COMPONENT_CLASS_NAME}}.propTypes = {
|
|
65
|
+
children: PropTypes.arrayOf(PropTypes.node).isRequired,
|
|
66
|
+
// title: PropTypes.string,
|
|
67
|
+
templateCol: PropTypes.string,
|
|
68
|
+
// icon: PropTypes.string
|
|
69
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import { Grid } from "@material-ui/core";
|
|
4
|
+
import { makeStyles } from '@material-ui/core/styles';
|
|
5
|
+
|
|
6
|
+
const useStyles = makeStyles((/* theme */) => ({
|
|
7
|
+
colStyles: {
|
|
8
|
+
display: "grid",
|
|
9
|
+
gap: "1rem",
|
|
10
|
+
alignContent: "baseline",
|
|
11
|
+
},
|
|
12
|
+
}));
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
export default function OneColumn(props) {
|
|
16
|
+
const classes = useStyles();
|
|
17
|
+
|
|
18
|
+
const { children} = props;
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<Grid container spacing={2}>
|
|
22
|
+
<Grid item xs={12} className={classes.colStyles}>
|
|
23
|
+
{children.map(child => { return child; } )}
|
|
24
|
+
</Grid>
|
|
25
|
+
</Grid>
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
OneColumn.propTypes = {
|
|
30
|
+
children: PropTypes.arrayOf(PropTypes.node).isRequired,
|
|
31
|
+
// template: PropTypes.string.isRequired
|
|
32
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="100px" height="70px" viewBox="0 0 100 70" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>1-col icon</title>
|
|
4
|
+
<g id="Views" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
|
+
<g id="Artboard-Copy-2" transform="translate(-38.000000, -207.000000)">
|
|
6
|
+
<g id="1-col--icon" transform="translate(38.000000, 207.000000)">
|
|
7
|
+
<rect id="bg" stroke="#A5A8BC" stroke-width="0.5" fill="#E7E9EB" x="0.25" y="0.25" width="99.5" height="69.5"></rect>
|
|
8
|
+
<g id="white" transform="translate(3.000000, 3.000000)" fill="#FFFFFF">
|
|
9
|
+
<rect id="Rectangle" x="0" y="0" width="94" height="66.5"></rect>
|
|
10
|
+
</g>
|
|
11
|
+
<g id="gray" transform="translate(6.000000, 6.000000)" fill="#8084A7">
|
|
12
|
+
<rect id="Rectangle" x="0" y="0" width="88" height="7.8"></rect>
|
|
13
|
+
<rect id="Rectangle-Copy-18" x="0" y="11.7" width="88" height="7.8"></rect>
|
|
14
|
+
<rect id="Rectangle-Copy-19" x="0" y="23.4" width="88" height="7.8"></rect>
|
|
15
|
+
<rect id="Rectangle-Copy-20" x="0" y="35.1" width="88" height="7.8"></rect>
|
|
16
|
+
<rect id="Rectangle-Copy-21" x="0" y="46.8" width="88" height="7.8"></rect>
|
|
17
|
+
<rect id="Rectangle-Copy-22" x="0" y="58.5" width="88" height="5"></rect>
|
|
18
|
+
</g>
|
|
19
|
+
<g id="labels" transform="translate(39.000000, 11.000000)">
|
|
20
|
+
<circle id="Oval-Copy-3" fill="#FFFFFF" cx="10.5" cy="10.8076923" r="10.5"></circle>
|
|
21
|
+
<text id="A" font-family="OpenSans-Semibold, Open Sans" font-size="11" font-weight="500" fill="#56566F">
|
|
22
|
+
<tspan x="6.75" y="14">A</tspan>
|
|
23
|
+
</text>
|
|
24
|
+
</g>
|
|
25
|
+
</g>
|
|
26
|
+
</g>
|
|
27
|
+
</g>
|
|
28
|
+
</svg>
|