@pega/dx-component-builder-sdk 0.1.18 → 0.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/constants.js +8 -1
- package/src/tasks/authenticate/index.js +10 -4
- package/src/tasks/create/index.js +25 -9
- package/src/tasks/map/map.js +9 -8
- package/src/tasks/override/index.js +25 -13
- package/src/util.js +23 -20
- /package/src/tasks/create/templates/Constellation/{Field → field}/Boolean/Boolean.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Boolean/boolean-format.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Boolean/config.json.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Boolean/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Boolean/event-utils.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Boolean/index.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Boolean/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Boolean/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Date/DateFormatter.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Date/FormattedText.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Date/config.json.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Date/date.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Date/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Date/index.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Date/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Date/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Date/suggestions-handler.js +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/DateTime/config.json.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/DateTime/date-time.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/DateTime/date-utils.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/DateTime/date.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/DateTime/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/DateTime/index.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/DateTime/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/DateTime/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/DateTime/suggestions-handler.js +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Decimal/config.json.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Decimal/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Decimal/event-utils.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Decimal/index.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Decimal/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Decimal/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Decimal/suggestions-handler.js +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Decimal-Currency/config.json.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Decimal-Currency/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Decimal-Currency/event-utils.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Decimal-Currency/index.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Decimal-Currency/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Decimal-Currency/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Decimal-Currency/suggestions-handler.js +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Decimal-Percentage/config.json.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Decimal-Percentage/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Decimal-Percentage/event-utils.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Decimal-Percentage/index.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Decimal-Percentage/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Decimal-Percentage/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Decimal-Percentage/suggestions-handler.js +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Integer/config.json.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Integer/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Integer/event-utils.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Integer/index.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Integer/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Integer/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Integer/suggestions-handler.js +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Picklist/config.json.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Picklist/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Picklist/event-utils.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Picklist/index.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Picklist/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Picklist/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Picklist/suggestions-handler.js +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text/config.json.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text/index.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-Email/config.json.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-Email/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-Email/event-utils.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-Email/index.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-Email/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-Email/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-Email/suggestions-handler.js +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-Input/StatusWork.jsx +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-Input/config.json.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-Input/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-Input/event-utils.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-Input/index.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-Input/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-Input/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-Input/suggestions-handler.js +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-Paragraph/config.json.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-Paragraph/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-Paragraph/event-utils.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-Paragraph/index.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-Paragraph/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-Paragraph/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-Paragraph/suggestions-handler.js +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-Phone/config.json.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-Phone/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-Phone/event-utils.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-Phone/index.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-Phone/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-Phone/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-Phone/suggestions-handler.js +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-URL/config.json.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-URL/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-URL/event-utils.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-URL/index.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-URL/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-URL/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-URL/suggestions-handler.js +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/Text-URL/text-url.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/TimeofDay/config.json.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/TimeofDay/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/TimeofDay/index.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/TimeofDay/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/TimeofDay/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/TimeofDay/suggestions-handler.js +0 -0
- /package/src/tasks/create/templates/Constellation/{Field → field}/TimeofDay/time-of-day.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/DETAILS/OneColumnDetails.svg +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/DETAILS/StatusWork.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/DETAILS/config.json.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/DETAILS/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/DETAILS/index.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/DETAILS/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/DETAILS/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/DETAILS/utils.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/DETAILS-region/StatusWork.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/DETAILS-region/TwoColumnDetails.svg +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/DETAILS-region/config.json.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/DETAILS-region/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/DETAILS-region/index.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/DETAILS-region/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/DETAILS-region/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/DETAILS-region/utils.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/FORM/DefaultForm.svg +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/FORM/config.json.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/FORM/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/FORM/index.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/FORM/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/FORM/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/FORM-region/TwoColumn.svg +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/FORM-region/config.json.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/FORM-region/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/FORM-region/index.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/FORM-region/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/FORM-region/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/PAGE/GetNextWork.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/PAGE/OneColumnPage.svg +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/PAGE/config.json.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/PAGE/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/PAGE/index.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/PAGE/localizations.json.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/PAGE/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/PAGE/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Template → template}/PAGE/utils.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Widget → widget}/CASE/OneColumnPage.svg +0 -0
- /package/src/tasks/create/templates/Constellation/{Widget → widget}/CASE/config.json.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Widget → widget}/CASE/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Widget → widget}/CASE/index.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Widget → widget}/CASE/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Widget → widget}/CASE/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Widget → widget}/PAGE/OneColumnPage.svg +0 -0
- /package/src/tasks/create/templates/Constellation/{Widget → widget}/PAGE/config.json.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Widget → widget}/PAGE/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Widget → widget}/PAGE/index.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Widget → widget}/PAGE/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Widget → widget}/PAGE/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Widget → widget}/PAGE-CASE/Avatar.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Widget → widget}/PAGE-CASE/OneColumnPage.svg +0 -0
- /package/src/tasks/create/templates/Constellation/{Widget → widget}/PAGE-CASE/Operator.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Widget → widget}/PAGE-CASE/config.json.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Widget → widget}/PAGE-CASE/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Widget → widget}/PAGE-CASE/index.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Widget → widget}/PAGE-CASE/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/{Widget → widget}/PAGE-CASE/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-Angular/{Field → field}/__components.md +0 -0
- /package/src/tasks/create/templates/SDK-Angular/{Template → template}/__components.md +0 -0
- /package/src/tasks/create/templates/SDK-Angular/{Widget → widget}/__components.md +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Boolean/config.json.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Boolean/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Boolean/index.tsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Boolean/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Boolean/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Date/config.json.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Date/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Date/index.tsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Date/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Date/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/DateTime/config.json.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/DateTime/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/DateTime/index.tsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/DateTime/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/DateTime/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Decimal/config.json.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Decimal/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Decimal/index.tsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Decimal/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Decimal/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Decimal-Currency/config.json.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Decimal-Currency/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Decimal-Currency/index.tsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Decimal-Currency/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Decimal-Currency/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Decimal-Percentage/config.json.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Decimal-Percentage/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Decimal-Percentage/index.tsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Decimal-Percentage/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Decimal-Percentage/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Integer/config.json.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Integer/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Integer/index.tsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Integer/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Integer/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Picklist/config.json.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Picklist/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Picklist/index.tsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Picklist/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Picklist/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Text/config.json.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Text/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Text/index.tsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Text/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Text/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Text-Email/config.json.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Text-Email/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Text-Email/index.tsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Text-Email/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Text-Email/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Text-Input/config.json.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Text-Input/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Text-Input/index.tsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Text-Input/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Text-Input/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Text-Paragraph/config.json.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Text-Paragraph/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Text-Paragraph/index.tsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Text-Paragraph/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Text-Paragraph/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Text-Phone/config.json.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Text-Phone/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Text-Phone/index.tsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Text-Phone/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Text-Phone/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Text-URL/config.json.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Text-URL/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Text-URL/index.tsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Text-URL/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/Text-URL/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/TimeofDay/config.json.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/TimeofDay/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/TimeofDay/index.tsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/TimeofDay/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Field → field}/TimeofDay/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Template → template}/DETAILS/DefaultForm.svg +0 -0
- /package/src/tasks/create/templates/SDK-React/{Template → template}/DETAILS/config.json.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Template → template}/DETAILS/index.tsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Template → template}/DETAILS/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Template → template}/DETAILS-region/TwoColumnDetails.svg +0 -0
- /package/src/tasks/create/templates/SDK-React/{Template → template}/DETAILS-region/config.json.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Template → template}/DETAILS-region/index.tsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Template → template}/DETAILS-region/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Template → template}/FORM/DefaultForm.css +0 -0
- /package/src/tasks/create/templates/SDK-React/{Template → template}/FORM/DefaultForm.svg +0 -0
- /package/src/tasks/create/templates/SDK-React/{Template → template}/FORM/config.json.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Template → template}/FORM/index.tsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Template → template}/FORM/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Template → template}/FORM-region/TwoColumn.svg +0 -0
- /package/src/tasks/create/templates/SDK-React/{Template → template}/FORM-region/config.json.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Template → template}/FORM-region/index.tsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Template → template}/FORM-region/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Template → template}/PAGE/OneColumn.tsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Template → template}/PAGE/OneColumnPage.svg +0 -0
- /package/src/tasks/create/templates/SDK-React/{Template → template}/PAGE/config.json.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Template → template}/PAGE/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Template → template}/PAGE/index.tsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Template → template}/PAGE/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Template → template}/PAGE/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Widget → widget}/CASE/OneColumnPage.svg +0 -0
- /package/src/tasks/create/templates/SDK-React/{Widget → widget}/CASE/config.json.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Widget → widget}/CASE/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Widget → widget}/CASE/index.tsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Widget → widget}/CASE/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Widget → widget}/CASE/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Widget → widget}/PAGE/OneColumnPage.svg +0 -0
- /package/src/tasks/create/templates/SDK-React/{Widget → widget}/PAGE/config.json.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Widget → widget}/PAGE/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Widget → widget}/PAGE/index.tsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Widget → widget}/PAGE/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Widget → widget}/PAGE/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Widget → widget}/PAGE-CASE/OneColumnPage.svg +0 -0
- /package/src/tasks/create/templates/SDK-React/{Widget → widget}/PAGE-CASE/config.json.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Widget → widget}/PAGE-CASE/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Widget → widget}/PAGE-CASE/index.tsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Widget → widget}/PAGE-CASE/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/{Widget → widget}/PAGE-CASE/styles.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-WebComponents/{Field → field}/__components.md +0 -0
- /package/src/tasks/create/templates/SDK-WebComponents/{Template → template}/__components.md +0 -0
- /package/src/tasks/create/templates/SDK-WebComponents/{Widget → widget}/__components.md +0 -0
package/package.json
CHANGED
package/src/constants.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
// cSpell:ignore words timeofday caseview casepreview objectview
|
|
2
|
-
export const
|
|
2
|
+
export const SDK_CONFIG_JSON_FILENAME = 'sdk-config.json';
|
|
3
3
|
export const BUILD_CONFIG_JSON_FILENAME = 'build.config.json';
|
|
4
4
|
export const SDK_LOCAL_COMPONENT_MAP_FILENAME = "sdk-local-component-map.js";
|
|
5
|
+
export const DXCB_CONFIG = 'dxcbConfig';
|
|
6
|
+
export const DXCB_PUBLISH_ACCESS = 'publishAccess';
|
|
7
|
+
export const DXCB_COMPONENT_DEFAULTS = 'componentDefaults';
|
|
5
8
|
export const COMPONENTS_DIRECTORY_PATH = 'components-directory-path';
|
|
6
9
|
export const TOKEN_PATH = '../.access_token';
|
|
7
10
|
export const OOTB_COMPONENTS = '../.ootb_components';
|
|
@@ -16,6 +19,10 @@ export const COMPONENT_PREFIX_WIDGET_PATH = "widget/";
|
|
|
16
19
|
export const COMPONENT_PREFIX_DSE_PATH = "designSystemExtension/";
|
|
17
20
|
export const COMPONENT_PREFIX_INFRA_PATH = "infra/";
|
|
18
21
|
|
|
22
|
+
export const CUSTOM_TEMPLATE_PATH = 'customTemplatesPath';
|
|
23
|
+
export const OVERRIDE_TEMPLATE_PATH = 'overrideTemplatesPath';
|
|
24
|
+
export const OVERRIDE_LIB_PATH = 'node_modules/@pega/react-sdk-overrides/lib';
|
|
25
|
+
|
|
19
26
|
export const COMPONENT_DIRECTORY_PREFIX_CUSTOM = "/custom-";
|
|
20
27
|
|
|
21
28
|
export const CATEGORY_CUSTOM = "custom";
|
|
@@ -7,13 +7,12 @@ import inquirer from 'inquirer';
|
|
|
7
7
|
import fetch from 'node-fetch';
|
|
8
8
|
|
|
9
9
|
import { checkPathAccess, getTokenUrl, showVersion } from '../../util.js';
|
|
10
|
-
import { TOKEN_PATH } from '../../constants.js';
|
|
10
|
+
import { TOKEN_PATH, SDK_CONFIG_JSON_FILENAME, DXCB_CONFIG, DXCB_PUBLISH_ACCESS } from '../../constants.js';
|
|
11
11
|
|
|
12
12
|
import { getAuthQuestions } from './helper.js';
|
|
13
13
|
|
|
14
|
-
export const DXCB_CONFIG_JSON_FILENAME = 'dxcb.config.json';
|
|
15
14
|
|
|
16
|
-
const pegaConfigJsonPath = path.join(path.resolve(),
|
|
15
|
+
const pegaConfigJsonPath = path.join(path.resolve(), SDK_CONFIG_JSON_FILENAME);
|
|
17
16
|
|
|
18
17
|
const generateAccessToken = async config => {
|
|
19
18
|
const formData = new URLSearchParams();
|
|
@@ -64,7 +63,14 @@ export default async options => {
|
|
|
64
63
|
let data = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
|
|
65
64
|
data = data && JSON.parse(data);
|
|
66
65
|
|
|
67
|
-
|
|
66
|
+
if (!data[DXCB_CONFIG] || !data[DXCB_CONFIG][DXCB_PUBLISH_ACCESS]) {
|
|
67
|
+
console.error(
|
|
68
|
+
`${chalk.red.bold('ERROR')} Could not able find publish access path in config.json`
|
|
69
|
+
);
|
|
70
|
+
process.exit(1);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const serverConfig = data[DXCB_CONFIG][DXCB_PUBLISH_ACCESS];
|
|
68
74
|
const params = options.params;
|
|
69
75
|
|
|
70
76
|
const questions = await getAuthQuestions(params);
|
|
@@ -9,13 +9,18 @@ import ncp from 'ncp';
|
|
|
9
9
|
import chalk from 'chalk';
|
|
10
10
|
|
|
11
11
|
import { checkPathAccess, getTokenUrl, showVersion } from '../../util.js';
|
|
12
|
-
import { CATEGORY_CONSTELLATION
|
|
12
|
+
import { CATEGORY_CONSTELLATION,
|
|
13
|
+
SDK_CONFIG_JSON_FILENAME,
|
|
14
|
+
DXCB_CONFIG,
|
|
15
|
+
DXCB_COMPONENT_DEFAULTS,
|
|
16
|
+
CUSTOM_TEMPLATE_PATH,
|
|
17
|
+
OVERRIDE_TEMPLATE_PATH } from '../../constants.js';
|
|
18
|
+
|
|
13
19
|
|
|
14
20
|
|
|
15
|
-
export const DXCB_CONFIG_JSON_FILENAME = 'dxcb.config.json';
|
|
16
21
|
export const DXCB_CONFIG_INTERNAL_JSON_FILENAME = 'src/dxcb.config.json';
|
|
17
22
|
|
|
18
|
-
const pegaConfigJsonPath = path.join(path.resolve(),
|
|
23
|
+
const pegaConfigJsonPath = path.join(path.resolve(), SDK_CONFIG_JSON_FILENAME);
|
|
19
24
|
const pegaConfigInternalJsonPath = path.join(path.resolve(), DXCB_CONFIG_INTERNAL_JSON_FILENAME);
|
|
20
25
|
|
|
21
26
|
import {
|
|
@@ -152,6 +157,8 @@ export const validateCompile = async (
|
|
|
152
157
|
sSubType = subtype.join("-");
|
|
153
158
|
}
|
|
154
159
|
|
|
160
|
+
const typeLC = type.toLowerCase();
|
|
161
|
+
|
|
155
162
|
await checkPathAccess(pegaConfigInternalJsonPath);
|
|
156
163
|
|
|
157
164
|
let internalData = fs.readFileSync(pegaConfigInternalJsonPath, { encoding: 'utf8' });
|
|
@@ -161,19 +168,21 @@ export const validateCompile = async (
|
|
|
161
168
|
|
|
162
169
|
let pegaConfig = await getPegaConfig();
|
|
163
170
|
let templateParentDir = `./templates/${framework}`;
|
|
164
|
-
if (pegaConfig[
|
|
165
|
-
|
|
171
|
+
if (pegaConfig[DXCB_CONFIG] &&
|
|
172
|
+
pegaConfig[DXCB_CONFIG][CUSTOM_TEMPLATE_PATH] &&
|
|
173
|
+
pegaConfig[DXCB_CONFIG][CUSTOM_TEMPLATE_PATH] != "") {
|
|
174
|
+
templateParentDir = pegaConfig[DXCB_CONFIG][CUSTOM_TEMPLATE_PATH];
|
|
166
175
|
}
|
|
167
176
|
|
|
168
|
-
const templateDir = `${templateParentDir}/${
|
|
177
|
+
const templateDir = `${templateParentDir}/${typeLC}/${sSubType}`;
|
|
169
178
|
const templateDirectory = fileURLToPath(new URL(templateDir, import.meta.url));
|
|
170
179
|
|
|
171
|
-
const templateDirConstellation = `./templates/Constellation/${
|
|
180
|
+
const templateDirConstellation = `./templates/Constellation/${typeLC}/${sSubType}`;
|
|
172
181
|
const templateDirectoryConstellation = fileURLToPath(new URL(templateDirConstellation, import.meta.url));
|
|
173
182
|
|
|
174
183
|
const componentKey = `${organization}_${library}_${componentName}`;
|
|
175
184
|
|
|
176
|
-
|
|
185
|
+
|
|
177
186
|
const targetDirectory = await getComponentDirectoryPath(join(typeLC, "/",componentKey));
|
|
178
187
|
const targetDirectoryConstellation = await getComponentDirectoryPath(join(typeLC, "/",componentKey), CATEGORY_CONSTELLATION);
|
|
179
188
|
|
|
@@ -288,7 +297,14 @@ export default async options => {
|
|
|
288
297
|
let data = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
|
|
289
298
|
data = data && JSON.parse(data);
|
|
290
299
|
|
|
291
|
-
|
|
300
|
+
if (!data[DXCB_CONFIG] || !data[DXCB_CONFIG][DXCB_COMPONENT_DEFAULTS]) {
|
|
301
|
+
console.error(
|
|
302
|
+
`${chalk.red.bold('ERROR')} Could not able find component defaults in config.json`
|
|
303
|
+
);
|
|
304
|
+
process.exit(1);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
const componentData = data[DXCB_CONFIG][DXCB_COMPONENT_DEFAULTS];
|
|
292
308
|
|
|
293
309
|
const { organization, library} = componentData;
|
|
294
310
|
|
package/src/tasks/map/map.js
CHANGED
|
@@ -10,10 +10,11 @@ import {
|
|
|
10
10
|
|
|
11
11
|
import {
|
|
12
12
|
COMPONENTS_DIRECTORY_PATH,
|
|
13
|
-
|
|
13
|
+
SDK_CONFIG_JSON_FILENAME,
|
|
14
14
|
CATEGORY_CUSTOM,
|
|
15
15
|
CATEGORY_CONSTELLATION,
|
|
16
|
-
COMPONENT_DIRECTORY_PREFIX_CUSTOM
|
|
16
|
+
COMPONENT_DIRECTORY_PREFIX_CUSTOM,
|
|
17
|
+
DXCB_CONFIG
|
|
17
18
|
} from '../../constants.js';
|
|
18
19
|
|
|
19
20
|
export const SDK_LOCAL_COMPONENT_MAP_FILENAME = "sdk-local-component-map.js";
|
|
@@ -22,7 +23,7 @@ export const MAP_END_TAG = "/*map end";
|
|
|
22
23
|
|
|
23
24
|
export const updateComponentMap = async (componentKey, category = CATEGORY_CUSTOM) => {
|
|
24
25
|
|
|
25
|
-
const pegaConfigJsonPath = path.join(path.resolve(),
|
|
26
|
+
const pegaConfigJsonPath = path.join(path.resolve(), SDK_CONFIG_JSON_FILENAME);
|
|
26
27
|
const pegaLocalComponentMapPath = path.join(path.resolve(), SDK_LOCAL_COMPONENT_MAP_FILENAME);
|
|
27
28
|
const categoryDirectory = (category === CATEGORY_CONSTELLATION) ? join("/", COMPONENT_DIRECTORY_PREFIX_CUSTOM + category.toLowerCase()) : join("/", category.toLowerCase());
|
|
28
29
|
|
|
@@ -34,14 +35,14 @@ export const updateComponentMap = async (componentKey, category = CATEGORY_CUSTO
|
|
|
34
35
|
let data = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
|
|
35
36
|
data = JSON.parse(data);
|
|
36
37
|
|
|
37
|
-
if (!data[COMPONENTS_DIRECTORY_PATH]) {
|
|
38
|
+
if (!data[DXCB_CONFIG] || !data[DXCB_CONFIG][COMPONENTS_DIRECTORY_PATH]) {
|
|
38
39
|
console.error(
|
|
39
40
|
`${chalk.red.bold('ERROR')} Could not able find components directory path in config.json`
|
|
40
41
|
);
|
|
41
42
|
process.exit(1);
|
|
42
43
|
}
|
|
43
44
|
|
|
44
|
-
let importComponent = join(data[COMPONENTS_DIRECTORY_PATH], categoryDirectory, componentKey);
|
|
45
|
+
let importComponent = join(data[DXCB_CONFIG][COMPONENTS_DIRECTORY_PATH], categoryDirectory, componentKey);
|
|
45
46
|
importComponent = "./".concat(importComponent);
|
|
46
47
|
|
|
47
48
|
let importFull = "import ".concat(componentName).concat(" from '").concat(importComponent).concat("/';");
|
|
@@ -75,7 +76,7 @@ export const updateComponentMap = async (componentKey, category = CATEGORY_CUSTO
|
|
|
75
76
|
export const deleteFromComponentMap = async (componentKey, category = CATEGORY_CUSTOM) => {
|
|
76
77
|
const pegaLocalComponentMapPath = path.join(path.resolve(), SDK_LOCAL_COMPONENT_MAP_FILENAME);
|
|
77
78
|
const categoryDirectory = (category === CATEGORY_CONSTELLATION) ? join("/", COMPONENT_DIRECTORY_PREFIX_CUSTOM + category.toLowerCase()) : join("/", category.toLowerCase());
|
|
78
|
-
const pegaConfigJsonPath = path.join(path.resolve(),
|
|
79
|
+
const pegaConfigJsonPath = path.join(path.resolve(), SDK_CONFIG_JSON_FILENAME);
|
|
79
80
|
|
|
80
81
|
const componentNameNoPrefix = removeComponentPrefix(componentKey);
|
|
81
82
|
const componentName = convertIntoPascalCase(componentNameNoPrefix);
|
|
@@ -85,14 +86,14 @@ export const deleteFromComponentMap = async (componentKey, category = CATEGORY_C
|
|
|
85
86
|
let data = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
|
|
86
87
|
data = JSON.parse(data);
|
|
87
88
|
|
|
88
|
-
if (!data[COMPONENTS_DIRECTORY_PATH]) {
|
|
89
|
+
if (!data[DXCB_CONFIG] || !data[DXCB_CONFIG][COMPONENTS_DIRECTORY_PATH]) {
|
|
89
90
|
console.error(
|
|
90
91
|
`${chalk.red.bold('ERROR')} Could not able find components directory path in config.json`
|
|
91
92
|
);
|
|
92
93
|
process.exit(1);
|
|
93
94
|
}
|
|
94
95
|
|
|
95
|
-
let importComponent = join(data[COMPONENTS_DIRECTORY_PATH], categoryDirectory, componentKey);
|
|
96
|
+
let importComponent = join(data[DXCB_CONFIG][COMPONENTS_DIRECTORY_PATH], categoryDirectory, componentKey);
|
|
96
97
|
importComponent = "./".concat(importComponent);
|
|
97
98
|
|
|
98
99
|
let importFull = "import ".concat(componentName).concat(" from '").concat(importComponent).concat("/';");
|
|
@@ -19,16 +19,16 @@ import {
|
|
|
19
19
|
getComponentDefaults,
|
|
20
20
|
sanitize,
|
|
21
21
|
validateSemver
|
|
22
|
-
} from '
|
|
23
|
-
import { COMPONENT_SCHEMA,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
} from '../../util.js';
|
|
23
|
+
import { COMPONENT_SCHEMA,
|
|
24
|
+
CATEGORY_OVERRIDE,
|
|
25
|
+
SDK_CONFIG_JSON_FILENAME,
|
|
26
|
+
DXCB_CONFIG,
|
|
27
|
+
DXCB_COMPONENT_DEFAULTS,
|
|
28
|
+
OVERRIDE_TEMPLATE_PATH,
|
|
29
|
+
OVERRIDE_LIB_PATH } from '../../constants.js';
|
|
31
30
|
|
|
31
|
+
const pegaConfigJsonPath = path.join(path.resolve(), SDK_CONFIG_JSON_FILENAME);
|
|
32
32
|
|
|
33
33
|
const copy = promisify(ncp);
|
|
34
34
|
|
|
@@ -112,11 +112,16 @@ const validateCompile = async (
|
|
|
112
112
|
|
|
113
113
|
let pegaConfig =
|
|
114
114
|
await getPegaConfig();
|
|
115
|
-
let templateParentDir =
|
|
116
|
-
|
|
117
|
-
|
|
115
|
+
let templateParentDir = OVERRIDE_LIB_PATH;
|
|
116
|
+
|
|
117
|
+
if (pegaConfig[DXCB_CONFIG] &&
|
|
118
|
+
pegaConfig[DXCB_CONFIG][OVERRIDE_TEMPLATE_PATH] &&
|
|
119
|
+
pegaConfig[DXCB_CONFIG][OVERRIDE_TEMPLATE_PATH] != "") {
|
|
120
|
+
templateParentDir = pegaConfig[DXCB_CONFIG][OVERRIDE_TEMPLATE_PATH];
|
|
118
121
|
}
|
|
119
122
|
|
|
123
|
+
|
|
124
|
+
|
|
120
125
|
// componentName has sub directory if components are in a sub directory of main "type"
|
|
121
126
|
const overrideDirectory = `${templateParentDir}/${type}/${componentName}`;
|
|
122
127
|
|
|
@@ -190,7 +195,14 @@ export default async options => {
|
|
|
190
195
|
let data = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
|
|
191
196
|
data = data && JSON.parse(data);
|
|
192
197
|
|
|
193
|
-
|
|
198
|
+
if (!data[DXCB_CONFIG] || !data[DXCB_CONFIG][DXCB_COMPONENT_DEFAULTS]) {
|
|
199
|
+
console.error(
|
|
200
|
+
`${chalk.red.bold('ERROR')} Could not able find components defaults path in config.json`
|
|
201
|
+
);
|
|
202
|
+
process.exit(1);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
const componentData = data[DXCB_CONFIG][DXCB_COMPONENT_DEFAULTS];
|
|
194
206
|
|
|
195
207
|
const { organization, library} = componentData;
|
|
196
208
|
|
package/src/util.js
CHANGED
|
@@ -13,7 +13,9 @@ import fetch from 'node-fetch';
|
|
|
13
13
|
|
|
14
14
|
import {
|
|
15
15
|
COMPONENTS_DIRECTORY_PATH,
|
|
16
|
-
|
|
16
|
+
SDK_CONFIG_JSON_FILENAME,
|
|
17
|
+
DXCB_CONFIG,
|
|
18
|
+
DXCB_PUBLISH_ACCESS,
|
|
17
19
|
TOKEN_PATH,
|
|
18
20
|
OOTB_COMPONENT_SERVICE_REST_ENDPOINT,
|
|
19
21
|
DELETE_COMPONENT_SERVICE_REST_ENDPOINT,
|
|
@@ -32,7 +34,8 @@ import {
|
|
|
32
34
|
CATEGORY_CUSTOM,
|
|
33
35
|
CATEGORY_OVERRIDE,
|
|
34
36
|
CATEGORY_CONSTELLATION,
|
|
35
|
-
COMPONENT_DIRECTORY_PREFIX_CUSTOM
|
|
37
|
+
COMPONENT_DIRECTORY_PREFIX_CUSTOM,
|
|
38
|
+
DXCB_COMPONENT_DEFAULTS
|
|
36
39
|
} from './constants.js';
|
|
37
40
|
|
|
38
41
|
|
|
@@ -54,7 +57,7 @@ export const checkPathAccess = async (path, options = {}) => {
|
|
|
54
57
|
|
|
55
58
|
export const deleteLocalComponent = async (componentKey, category = CATEGORY_CUSTOM) => {
|
|
56
59
|
const currentDirectory = process.cwd();
|
|
57
|
-
const pegaConfigJsonPath = join(currentDirectory,
|
|
60
|
+
const pegaConfigJsonPath = join(currentDirectory, SDK_CONFIG_JSON_FILENAME);
|
|
58
61
|
const categoryDirectory = (category === CATEGORY_CONSTELLATION) ? join("/", COMPONENT_DIRECTORY_PREFIX_CUSTOM + category.toLowerCase()) : join("/", category.toLowerCase());
|
|
59
62
|
|
|
60
63
|
await checkPathAccess(pegaConfigJsonPath);
|
|
@@ -62,14 +65,14 @@ export const deleteLocalComponent = async (componentKey, category = CATEGORY_CUS
|
|
|
62
65
|
let data = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
|
|
63
66
|
data = JSON.parse(data);
|
|
64
67
|
|
|
65
|
-
if (!data[COMPONENTS_DIRECTORY_PATH]) {
|
|
68
|
+
if (!data[DXCB_CONFIG] || !data[DXCB_CONFIG][COMPONENTS_DIRECTORY_PATH]) {
|
|
66
69
|
console.error(
|
|
67
70
|
`${chalk.red.bold('ERROR')} Could not able find components directory path in config.json`
|
|
68
71
|
);
|
|
69
72
|
process.exit(1);
|
|
70
73
|
}
|
|
71
74
|
|
|
72
|
-
const directory = join(currentDirectory, data[COMPONENTS_DIRECTORY_PATH], categoryDirectory, componentKey);
|
|
75
|
+
const directory = join(currentDirectory, data[DXCB_CONFIG][COMPONENTS_DIRECTORY_PATH], categoryDirectory, componentKey);
|
|
73
76
|
|
|
74
77
|
// test for the directory
|
|
75
78
|
if (fs.existsSync(directory)) {
|
|
@@ -166,7 +169,7 @@ export const getOptionsSource = (options) => {
|
|
|
166
169
|
|
|
167
170
|
export const getComponents = async (showSeparator = false, category = CATEGORY_CUSTOM) => {
|
|
168
171
|
const currentDirectory = process.cwd();
|
|
169
|
-
const pegaConfigJsonPath = join(currentDirectory,
|
|
172
|
+
const pegaConfigJsonPath = join(currentDirectory, SDK_CONFIG_JSON_FILENAME);
|
|
170
173
|
const categoryDirectory = (category === CATEGORY_CONSTELLATION) ? join("/", COMPONENT_DIRECTORY_PREFIX_CUSTOM + category.toLowerCase()) : join("/", category.toLowerCase());
|
|
171
174
|
|
|
172
175
|
await checkPathAccess(pegaConfigJsonPath);
|
|
@@ -174,7 +177,7 @@ export const getComponents = async (showSeparator = false, category = CATEGORY_C
|
|
|
174
177
|
let data = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
|
|
175
178
|
data = JSON.parse(data);
|
|
176
179
|
|
|
177
|
-
if (!data[COMPONENTS_DIRECTORY_PATH]) {
|
|
180
|
+
if (!data[DXCB_CONFIG] || !data[DXCB_CONFIG][COMPONENTS_DIRECTORY_PATH]) {
|
|
178
181
|
console.error(
|
|
179
182
|
`${chalk.red.bold('ERROR')} Could not able find components directory path in config.json`
|
|
180
183
|
);
|
|
@@ -182,7 +185,7 @@ export const getComponents = async (showSeparator = false, category = CATEGORY_C
|
|
|
182
185
|
}
|
|
183
186
|
|
|
184
187
|
|
|
185
|
-
const directory = join(currentDirectory, data[COMPONENTS_DIRECTORY_PATH], categoryDirectory);
|
|
188
|
+
const directory = join(currentDirectory, data[DXCB_CONFIG][COMPONENTS_DIRECTORY_PATH], categoryDirectory);
|
|
186
189
|
let compList = new Array();
|
|
187
190
|
|
|
188
191
|
switch (category) {
|
|
@@ -285,7 +288,7 @@ export const createBlankConfigExt = async (directory, name) => {
|
|
|
285
288
|
|
|
286
289
|
export const getComponentsObj = async (showSeparator = false, category = CATEGORY_CUSTOM) => {
|
|
287
290
|
const currentDirectory = process.cwd();
|
|
288
|
-
const pegaConfigJsonPath = join(currentDirectory,
|
|
291
|
+
const pegaConfigJsonPath = join(currentDirectory, SDK_CONFIG_JSON_FILENAME);
|
|
289
292
|
const categoryDirectory = (category === CATEGORY_CONSTELLATION) ? join("/", COMPONENT_DIRECTORY_PREFIX_CUSTOM + category.toLowerCase()) : join("/", category.toLowerCase());
|
|
290
293
|
|
|
291
294
|
await checkPathAccess(pegaConfigJsonPath);
|
|
@@ -293,14 +296,14 @@ export const getComponentsObj = async (showSeparator = false, category = CATEGOR
|
|
|
293
296
|
let data = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
|
|
294
297
|
data = JSON.parse(data);
|
|
295
298
|
|
|
296
|
-
if (!data[COMPONENTS_DIRECTORY_PATH]) {
|
|
299
|
+
if (!data[DXCB_CONFIG] || !data[DXCB_CONFIG][COMPONENTS_DIRECTORY_PATH]) {
|
|
297
300
|
console.error(
|
|
298
301
|
`${chalk.red.bold('ERROR')} Could not able find components directory path in config.json`
|
|
299
302
|
);
|
|
300
303
|
process.exit(1);
|
|
301
304
|
}
|
|
302
305
|
|
|
303
|
-
const directory = join(currentDirectory, data[COMPONENTS_DIRECTORY_PATH], categoryDirectory);
|
|
306
|
+
const directory = join(currentDirectory, data[DXCB_CONFIG][COMPONENTS_DIRECTORY_PATH], categoryDirectory);
|
|
304
307
|
let compList = new Array();
|
|
305
308
|
|
|
306
309
|
switch (category) {
|
|
@@ -445,7 +448,7 @@ export const getSubComponentsAndDir = async (directory, type) => {
|
|
|
445
448
|
|
|
446
449
|
export const getComponentsAndSubDirectory = async (category = CATEGORY_CUSTOM) => {
|
|
447
450
|
const currentDirectory = process.cwd();
|
|
448
|
-
const pegaConfigJsonPath = join(currentDirectory,
|
|
451
|
+
const pegaConfigJsonPath = join(currentDirectory, SDK_CONFIG_JSON_FILENAME);
|
|
449
452
|
const categoryDirectory = (category === CATEGORY_CONSTELLATION) ? join("/", COMPONENT_DIRECTORY_PREFIX_CUSTOM + category.toLowerCase()) : join("/", category.toLowerCase());
|
|
450
453
|
|
|
451
454
|
await checkPathAccess(pegaConfigJsonPath);
|
|
@@ -453,14 +456,14 @@ export const getComponentsAndSubDirectory = async (category = CATEGORY_CUSTOM) =
|
|
|
453
456
|
let data = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
|
|
454
457
|
data = JSON.parse(data);
|
|
455
458
|
|
|
456
|
-
if (!data[COMPONENTS_DIRECTORY_PATH]) {
|
|
459
|
+
if (!data[DXCB_CONFIG] || !data[DXCB_CONFIG][COMPONENTS_DIRECTORY_PATH]) {
|
|
457
460
|
console.error(
|
|
458
461
|
`${chalk.red.bold('ERROR')} Could not able find components directory path in config.json`
|
|
459
462
|
);
|
|
460
463
|
process.exit(1);
|
|
461
464
|
}
|
|
462
465
|
|
|
463
|
-
const directory = join(currentDirectory, data[COMPONENTS_DIRECTORY_PATH], categoryDirectory);
|
|
466
|
+
const directory = join(currentDirectory, data[DXCB_CONFIG][COMPONENTS_DIRECTORY_PATH], categoryDirectory);
|
|
464
467
|
|
|
465
468
|
const fieldComps = await getSubComponentsAndDir(directory, FIELD_PATH);
|
|
466
469
|
const templateComps = await getSubComponentsAndDir(directory, TEMPLATE_PATH);
|
|
@@ -498,7 +501,7 @@ export const removeComponentPrefix = (componentName) => {
|
|
|
498
501
|
|
|
499
502
|
export const getPegaConfig = async () => {
|
|
500
503
|
const currentDirectory = process.cwd();
|
|
501
|
-
const pegaConfigJsonPath = join(currentDirectory,
|
|
504
|
+
const pegaConfigJsonPath = join(currentDirectory, SDK_CONFIG_JSON_FILENAME);
|
|
502
505
|
|
|
503
506
|
await checkPathAccess(pegaConfigJsonPath);
|
|
504
507
|
|
|
@@ -510,17 +513,17 @@ export const getPegaConfig = async () => {
|
|
|
510
513
|
|
|
511
514
|
export const getPegaServerConfig = async () => {
|
|
512
515
|
const config = await getPegaConfig();
|
|
513
|
-
return config[
|
|
516
|
+
return config[DXCB_CONFIG][DXCB_PUBLISH_ACCESS];
|
|
514
517
|
};
|
|
515
518
|
|
|
516
519
|
export const getComponentDefaults = async () => {
|
|
517
520
|
const config = await getPegaConfig();
|
|
518
|
-
return config
|
|
521
|
+
return config[DXCB_CONFIG][DXCB_COMPONENT_DEFAULTS];
|
|
519
522
|
};
|
|
520
523
|
|
|
521
524
|
export const getComponentDirectoryPath = async (componentKey, category = CATEGORY_CUSTOM) => {
|
|
522
525
|
const currentDirectory = process.cwd();
|
|
523
|
-
const pegaConfigJsonPath = join(currentDirectory,
|
|
526
|
+
const pegaConfigJsonPath = join(currentDirectory, SDK_CONFIG_JSON_FILENAME);
|
|
524
527
|
const categoryDirectory = (category === CATEGORY_CONSTELLATION) ? join("/", COMPONENT_DIRECTORY_PREFIX_CUSTOM + category.toLowerCase()) : join("/", category.toLowerCase());
|
|
525
528
|
|
|
526
529
|
await checkPathAccess(pegaConfigJsonPath);
|
|
@@ -528,14 +531,14 @@ export const getComponentDirectoryPath = async (componentKey, category = CATEGOR
|
|
|
528
531
|
let data = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
|
|
529
532
|
data = JSON.parse(data);
|
|
530
533
|
|
|
531
|
-
if (!data[COMPONENTS_DIRECTORY_PATH]) {
|
|
534
|
+
if (!data[DXCB_CONFIG] || !data[DXCB_CONFIG][COMPONENTS_DIRECTORY_PATH]) {
|
|
532
535
|
console.error(
|
|
533
536
|
`${chalk.red.bold('ERROR')} Could not able find components directory path in config.json`
|
|
534
537
|
);
|
|
535
538
|
process.exit(1);
|
|
536
539
|
}
|
|
537
540
|
|
|
538
|
-
return join(currentDirectory, data[COMPONENTS_DIRECTORY_PATH], categoryDirectory, componentKey);
|
|
541
|
+
return join(currentDirectory, data[DXCB_CONFIG][COMPONENTS_DIRECTORY_PATH], categoryDirectory, componentKey);
|
|
539
542
|
};
|
|
540
543
|
|
|
541
544
|
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Boolean/Boolean.js.mustache
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Boolean/boolean-format.js.mustache
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Boolean/config.json.mustache
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Boolean/demo.stories.jsx.mustache
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Boolean/event-utils.js.mustache
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Boolean/index.jsx.mustache
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Boolean/mock.stories.js.mustache
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Boolean/styles.js.mustache
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Date/DateFormatter.js.mustache
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Date/FormattedText.jsx.mustache
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Date/demo.stories.jsx.mustache
RENAMED
|
File without changes
|
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Date/mock.stories.js.mustache
RENAMED
|
File without changes
|
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Date/suggestions-handler.js
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/DateTime/config.json.mustache
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/DateTime/date-time.js.mustache
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/DateTime/date-utils.js.mustache
RENAMED
|
File without changes
|
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/DateTime/demo.stories.jsx.mustache
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/DateTime/index.jsx.mustache
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/DateTime/mock.stories.js.mustache
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/DateTime/styles.js.mustache
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/DateTime/suggestions-handler.js
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Decimal/config.json.mustache
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Decimal/demo.stories.jsx.mustache
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Decimal/event-utils.js.mustache
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Decimal/index.jsx.mustache
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Decimal/mock.stories.js.mustache
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Decimal/styles.js.mustache
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Decimal/suggestions-handler.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Integer/config.json.mustache
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Integer/demo.stories.jsx.mustache
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Integer/event-utils.js.mustache
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Integer/index.jsx.mustache
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Integer/mock.stories.js.mustache
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Integer/styles.js.mustache
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Integer/suggestions-handler.js
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Picklist/config.json.mustache
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Picklist/demo.stories.jsx.mustache
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Picklist/event-utils.js.mustache
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Picklist/index.jsx.mustache
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Picklist/mock.stories.js.mustache
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Picklist/styles.js.mustache
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Picklist/suggestions-handler.js
RENAMED
|
File without changes
|
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Text/demo.stories.jsx.mustache
RENAMED
|
File without changes
|
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Text/mock.stories.js.mustache
RENAMED
|
File without changes
|
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Text-Email/config.json.mustache
RENAMED
|
File without changes
|
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Text-Email/event-utils.js.mustache
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Text-Email/index.jsx.mustache
RENAMED
|
File without changes
|
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Text-Email/styles.js.mustache
RENAMED
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Text-Email/suggestions-handler.js
RENAMED
|
File without changes
|
|
File without changes
|
/package/src/tasks/create/templates/Constellation/{Field → field}/Text-Input/config.json.mustache
RENAMED
|
File without changes
|