@pega/custom-dx-components 0.0.1 → 0.8.1

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.
Files changed (607) hide show
  1. package/.prettierrc.json +7 -1
  2. package/.vscode/extensions.json +1 -1
  3. package/README.md +6 -189
  4. package/babel.config.cjs +13 -0
  5. package/jest.config.cjs +37 -0
  6. package/package.json +45 -33
  7. package/src/auth.js +637 -0
  8. package/src/cli.js +49 -1
  9. package/src/constants.js +123 -8
  10. package/src/currentPath.cjs +1 -0
  11. package/src/tasks/authenticate/helper.js +155 -8
  12. package/src/tasks/authenticate/index.js +188 -51
  13. package/src/tasks/build/helper.js +116 -0
  14. package/src/tasks/build/index.js +76 -0
  15. package/src/tasks/build-all/helper.js +71 -0
  16. package/src/tasks/build-all/index.js +86 -0
  17. package/src/tasks/{publish/bundle → bundle}/builder/index.js +54 -5
  18. package/src/tasks/{publish/bundle → bundle}/builder/webpack.config.js +9 -8
  19. package/src/tasks/{publish/bundle → bundle}/index.js +2 -2
  20. package/src/tasks/create/index.js +129 -69
  21. package/src/tasks/create/templates/Constellation/Field/Boolean/Boolean.js.mustache +38 -0
  22. package/src/tasks/create/templates/Constellation/Field/Boolean/boolean-format.js.mustache +26 -0
  23. package/src/tasks/create/templates/Constellation/Field/Boolean/config.json.mustache +145 -0
  24. package/src/tasks/create/templates/Constellation/Field/Boolean/demo.stories.jsx.mustache +61 -0
  25. package/src/tasks/create/templates/Constellation/Field/Boolean/event-utils.js.mustache +18 -0
  26. package/src/tasks/create/templates/Constellation/Field/Boolean/index.jsx.mustache +170 -0
  27. package/src/tasks/create/templates/Constellation/Field/Boolean/mock.stories.js.mustache +21 -0
  28. package/src/tasks/create/templates/Constellation/Field/Boolean/styles.js.mustache +14 -0
  29. package/src/tasks/create/templates/Constellation/Field/Date/DateFormatter.js.mustache +61 -0
  30. package/src/tasks/create/templates/Constellation/Field/Date/FormattedText.jsx.mustache +41 -0
  31. package/src/tasks/create/templates/Constellation/Field/Date/config.json.mustache +195 -0
  32. package/src/tasks/create/templates/Constellation/Field/Date/date.js.mustache +439 -0
  33. package/src/tasks/create/templates/Constellation/Field/Date/demo.stories.jsx.mustache +73 -0
  34. package/src/tasks/create/templates/Constellation/Field/Date/index.jsx.mustache +256 -0
  35. package/src/tasks/create/templates/Constellation/Field/Date/mock.stories.js.mustache +23 -0
  36. package/src/tasks/create/templates/Constellation/Field/Date/styles.js.mustache +14 -0
  37. package/src/tasks/create/templates/Constellation/Field/Date/suggestions-handler.js +10 -0
  38. package/src/tasks/create/templates/Constellation/Field/DateTime/config.json.mustache +256 -0
  39. package/src/tasks/create/templates/Constellation/Field/DateTime/date-time.js.mustache +92 -0
  40. package/src/tasks/create/templates/Constellation/Field/DateTime/date-utils.js.mustache +288 -0
  41. package/src/tasks/create/templates/Constellation/Field/DateTime/date.js.mustache +331 -0
  42. package/src/tasks/create/templates/Constellation/Field/DateTime/demo.stories.jsx.mustache +73 -0
  43. package/src/tasks/create/templates/Constellation/Field/DateTime/index.jsx.mustache +254 -0
  44. package/src/tasks/create/templates/Constellation/Field/DateTime/mock.stories.js.mustache +23 -0
  45. package/src/tasks/create/templates/Constellation/Field/DateTime/styles.js.mustache +14 -0
  46. package/src/tasks/create/templates/Constellation/Field/DateTime/suggestions-handler.js +10 -0
  47. package/src/tasks/create/templates/Constellation/Field/Decimal/config.json.mustache +278 -0
  48. package/src/tasks/create/templates/Constellation/Field/Decimal/demo.stories.jsx.mustache +49 -0
  49. package/src/tasks/create/templates/Constellation/Field/Decimal/event-utils.js.mustache +18 -0
  50. package/src/tasks/create/templates/Constellation/Field/Decimal/index.jsx.mustache +273 -0
  51. package/src/tasks/create/templates/Constellation/Field/Decimal/mock.stories.js.mustache +21 -0
  52. package/src/tasks/create/templates/Constellation/Field/Decimal/styles.js.mustache +14 -0
  53. package/src/tasks/create/templates/Constellation/Field/Decimal/suggestions-handler.js +10 -0
  54. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/config.json.mustache +291 -0
  55. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/demo.stories.jsx.mustache +53 -0
  56. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/event-utils.js.mustache +18 -0
  57. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/index.jsx.mustache +299 -0
  58. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/mock.stories.js.mustache +23 -0
  59. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/styles.js.mustache +14 -0
  60. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/suggestions-handler.js +10 -0
  61. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/config.json.mustache +93 -0
  62. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/demo.stories.jsx.mustache +49 -0
  63. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/event-utils.js.mustache +18 -0
  64. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/index.jsx.mustache +281 -0
  65. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/mock.stories.js.mustache +21 -0
  66. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/styles.js.mustache +14 -0
  67. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/suggestions-handler.js +10 -0
  68. package/src/tasks/create/templates/Constellation/Field/Integer/config.json.mustache +347 -0
  69. package/src/tasks/create/templates/Constellation/Field/Integer/demo.stories.jsx.mustache +49 -0
  70. package/src/tasks/create/templates/Constellation/Field/Integer/event-utils.js.mustache +18 -0
  71. package/src/tasks/create/templates/Constellation/Field/Integer/index.jsx.mustache +336 -0
  72. package/src/tasks/create/templates/Constellation/Field/Integer/mock.stories.js.mustache +21 -0
  73. package/src/tasks/create/templates/Constellation/Field/Integer/styles.js.mustache +14 -0
  74. package/src/tasks/create/templates/Constellation/Field/Integer/suggestions-handler.js +10 -0
  75. package/src/tasks/create/templates/Constellation/Field/Picklist/config.json.mustache +114 -0
  76. package/src/tasks/create/templates/Constellation/Field/Picklist/demo.stories.jsx.mustache +78 -0
  77. package/src/tasks/create/templates/Constellation/Field/Picklist/event-utils.js.mustache +18 -0
  78. package/src/tasks/create/templates/Constellation/Field/Picklist/index.jsx.mustache +351 -0
  79. package/src/tasks/create/templates/Constellation/Field/Picklist/mock.stories.js.mustache +67 -0
  80. package/src/tasks/create/templates/Constellation/Field/Picklist/styles.js.mustache +14 -0
  81. package/src/tasks/create/templates/Constellation/Field/Picklist/suggestions-handler.js +10 -0
  82. package/src/tasks/create/{template → templates/Constellation/Field/Text}/config.json.mustache +14 -5
  83. package/src/tasks/create/templates/Constellation/Field/Text/demo.stories.jsx.mustache +51 -0
  84. package/src/tasks/create/{template → templates/Constellation/Field/Text}/index.jsx.mustache +5 -0
  85. package/src/tasks/create/templates/Constellation/Field/Text/mock.stories.js.mustache +13 -0
  86. package/src/tasks/create/templates/Constellation/Field/Text/styles.js.mustache +14 -0
  87. package/src/tasks/create/templates/Constellation/Field/Text-Email/config.json.mustache +111 -0
  88. package/src/tasks/create/templates/Constellation/Field/Text-Email/demo.stories.jsx.mustache +48 -0
  89. package/src/tasks/create/templates/Constellation/Field/Text-Email/event-utils.js.mustache +18 -0
  90. package/src/tasks/create/templates/Constellation/Field/Text-Email/index.jsx.mustache +231 -0
  91. package/src/tasks/create/templates/Constellation/Field/Text-Email/mock.stories.js.mustache +22 -0
  92. package/src/tasks/create/templates/Constellation/Field/Text-Email/styles.js.mustache +14 -0
  93. package/src/tasks/create/templates/Constellation/Field/Text-Email/suggestions-handler.js +10 -0
  94. package/src/tasks/create/templates/Constellation/Field/Text-Input/StatusWork.jsx +26 -0
  95. package/src/tasks/create/templates/Constellation/Field/Text-Input/config.json.mustache +111 -0
  96. package/src/tasks/create/templates/Constellation/Field/Text-Input/demo.stories.jsx.mustache +48 -0
  97. package/src/tasks/create/templates/Constellation/Field/Text-Input/event-utils.js.mustache +18 -0
  98. package/src/tasks/create/templates/Constellation/Field/Text-Input/index.jsx.mustache +239 -0
  99. package/src/tasks/create/templates/Constellation/Field/Text-Input/mock.stories.js.mustache +21 -0
  100. package/src/tasks/create/templates/Constellation/Field/Text-Input/styles.js.mustache +14 -0
  101. package/src/tasks/create/templates/Constellation/Field/Text-Input/suggestions-handler.js +10 -0
  102. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/config.json.mustache +111 -0
  103. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/demo.stories.jsx.mustache +48 -0
  104. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/event-utils.js.mustache +18 -0
  105. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/index.jsx.mustache +231 -0
  106. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/mock.stories.js.mustache +20 -0
  107. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/styles.js.mustache +14 -0
  108. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/suggestions-handler.js +10 -0
  109. package/src/tasks/create/templates/Constellation/Field/Text-Phone/config.json.mustache +123 -0
  110. package/src/tasks/create/templates/Constellation/Field/Text-Phone/demo.stories.jsx.mustache +46 -0
  111. package/src/tasks/create/templates/Constellation/Field/Text-Phone/event-utils.js.mustache +18 -0
  112. package/src/tasks/create/templates/Constellation/Field/Text-Phone/index.jsx.mustache +266 -0
  113. package/src/tasks/create/templates/Constellation/Field/Text-Phone/mock.stories.js.mustache +37 -0
  114. package/src/tasks/create/templates/Constellation/Field/Text-Phone/styles.js.mustache +14 -0
  115. package/src/tasks/create/templates/Constellation/Field/Text-Phone/suggestions-handler.js +10 -0
  116. package/src/tasks/create/templates/Constellation/Field/Text-URL/config.json.mustache +237 -0
  117. package/src/tasks/create/templates/Constellation/Field/Text-URL/demo.stories.jsx.mustache +46 -0
  118. package/src/tasks/create/templates/Constellation/Field/Text-URL/event-utils.js.mustache +18 -0
  119. package/src/tasks/create/templates/Constellation/Field/Text-URL/index.jsx.mustache +232 -0
  120. package/src/tasks/create/templates/Constellation/Field/Text-URL/mock.stories.js.mustache +22 -0
  121. package/src/tasks/create/templates/Constellation/Field/Text-URL/styles.js.mustache +14 -0
  122. package/src/tasks/create/templates/Constellation/Field/Text-URL/suggestions-handler.js +10 -0
  123. package/src/tasks/create/templates/Constellation/Field/Text-URL/text-url.jsx.mustache +173 -0
  124. package/src/tasks/create/templates/Constellation/Field/TimeOfDay/config.json.mustache +185 -0
  125. package/src/tasks/create/templates/Constellation/Field/TimeOfDay/demo.stories.jsx.mustache +57 -0
  126. package/src/tasks/create/templates/Constellation/Field/TimeOfDay/index.jsx.mustache +213 -0
  127. package/src/tasks/create/templates/Constellation/Field/TimeOfDay/mock.stories.js.mustache +20 -0
  128. package/src/tasks/create/templates/Constellation/Field/TimeOfDay/styles.js.mustache +14 -0
  129. package/src/tasks/create/templates/Constellation/Field/TimeOfDay/suggestions-handler.js +10 -0
  130. package/src/tasks/create/templates/Constellation/Field/TimeOfDay/time-of-day.js.mustache +288 -0
  131. package/src/tasks/create/templates/Constellation/Template/DETAILS/OneColumnDetails.svg +22 -0
  132. package/src/tasks/create/templates/Constellation/Template/DETAILS/StatusWork.jsx.mustache +26 -0
  133. package/src/tasks/create/templates/Constellation/Template/DETAILS/config.json.mustache +35 -0
  134. package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.stories.jsx.mustache +132 -0
  135. package/src/tasks/create/templates/Constellation/Template/DETAILS/index.jsx.mustache +86 -0
  136. package/src/tasks/create/templates/Constellation/Template/DETAILS/mock.stories.js.mustache +189 -0
  137. package/src/tasks/create/templates/Constellation/Template/DETAILS/styles.js.mustache +14 -0
  138. package/src/tasks/create/templates/Constellation/Template/DETAILS/utils.js.mustache +152 -0
  139. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/StatusWork.jsx.mustache +26 -0
  140. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/TwoColumnDetails.svg +28 -0
  141. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/config.json.mustache +42 -0
  142. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/demo.stories.jsx.mustache +136 -0
  143. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/index.jsx.mustache +86 -0
  144. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/mock.stories.js.mustache +230 -0
  145. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/styles.js.mustache +14 -0
  146. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/utils.js.mustache +155 -0
  147. package/src/tasks/create/templates/Constellation/Template/FORM/DefaultForm.svg +29 -0
  148. package/src/tasks/create/templates/Constellation/Template/FORM/config.json.mustache +45 -0
  149. package/src/tasks/create/templates/Constellation/Template/FORM/demo.stories.jsx.mustache +169 -0
  150. package/src/tasks/create/templates/Constellation/Template/FORM/index.jsx.mustache +45 -0
  151. package/src/tasks/create/templates/Constellation/Template/FORM/mock.stories.js.mustache +137 -0
  152. package/src/tasks/create/templates/Constellation/Template/FORM/styles.js.mustache +14 -0
  153. package/src/tasks/create/templates/Constellation/Template/FORM-region/TwoColumn.svg +38 -0
  154. package/src/tasks/create/templates/Constellation/Template/FORM-region/config.json.mustache +27 -0
  155. package/src/tasks/create/templates/Constellation/Template/FORM-region/demo.stories.jsx.mustache +178 -0
  156. package/src/tasks/create/templates/Constellation/Template/FORM-region/index.jsx.mustache +48 -0
  157. package/src/tasks/create/templates/Constellation/Template/FORM-region/mock.stories.js.mustache +143 -0
  158. package/src/tasks/create/templates/Constellation/Template/FORM-region/styles.js.mustache +14 -0
  159. package/src/tasks/create/templates/Constellation/Template/PAGE/GetNextWork.jsx.mustache +35 -0
  160. package/src/tasks/create/templates/Constellation/Template/PAGE/OneColumnPage.svg +36 -0
  161. package/src/tasks/create/templates/Constellation/Template/PAGE/config.json.mustache +32 -0
  162. package/src/tasks/create/templates/Constellation/Template/PAGE/demo.stories.jsx.mustache +102 -0
  163. package/src/tasks/create/templates/Constellation/Template/PAGE/index.jsx.mustache +70 -0
  164. package/src/tasks/create/templates/Constellation/Template/PAGE/localizations.json.mustache +4 -0
  165. package/src/tasks/create/templates/Constellation/Template/PAGE/mock.stories.js.mustache +94 -0
  166. package/src/tasks/create/templates/Constellation/Template/PAGE/styles.js.mustache +14 -0
  167. package/src/tasks/create/templates/Constellation/Template/PAGE/utils.js.mustache +229 -0
  168. package/src/tasks/create/templates/Constellation/Widget/CASE/OneColumnPage.svg +36 -0
  169. package/src/tasks/create/templates/Constellation/Widget/CASE/config.json.mustache +23 -0
  170. package/src/tasks/create/templates/Constellation/Widget/CASE/demo.stories.jsx.mustache +78 -0
  171. package/src/tasks/create/templates/Constellation/Widget/CASE/index.jsx.mustache +76 -0
  172. package/src/tasks/create/templates/Constellation/Widget/CASE/mock.stories.js.mustache +390 -0
  173. package/src/tasks/create/templates/Constellation/Widget/CASE/styles.js.mustache +14 -0
  174. package/src/tasks/create/templates/Constellation/Widget/PAGE/OneColumnPage.svg +36 -0
  175. package/src/tasks/create/templates/Constellation/Widget/PAGE/config.json.mustache +59 -0
  176. package/src/tasks/create/templates/Constellation/Widget/PAGE/demo.stories.jsx.mustache +30 -0
  177. package/src/tasks/create/templates/Constellation/Widget/PAGE/index.jsx.mustache +48 -0
  178. package/src/tasks/create/templates/Constellation/Widget/PAGE/mock.stories.js.mustache +23 -0
  179. package/src/tasks/create/templates/Constellation/Widget/PAGE/styles.js.mustache +14 -0
  180. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Avatar.jsx.mustache +75 -0
  181. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/OneColumnPage.svg +36 -0
  182. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Operator.jsx.mustache +240 -0
  183. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/config.json.mustache +66 -0
  184. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/demo.stories.jsx.mustache +68 -0
  185. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/index.jsx.mustache +110 -0
  186. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/mock.stories.js.mustache +51 -0
  187. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/styles.js.mustache +14 -0
  188. package/src/tasks/create/templates/Launchpad/Field/__components.md +3 -0
  189. package/src/tasks/create/templates/Launchpad/Template/__components.md +3 -0
  190. package/src/tasks/create/templates/Launchpad/Widget/CASE/OneColumnPage.svg +36 -0
  191. package/src/tasks/create/templates/Launchpad/Widget/CASE/config.json.mustache +23 -0
  192. package/src/tasks/create/templates/Launchpad/Widget/CASE/demo.stories.jsx.mustache +78 -0
  193. package/src/tasks/create/templates/Launchpad/Widget/CASE/index.jsx.mustache +76 -0
  194. package/src/tasks/create/templates/Launchpad/Widget/CASE/mock.stories.js.mustache +390 -0
  195. package/src/tasks/create/templates/Launchpad/Widget/CASE/styles.js.mustache +14 -0
  196. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/Avatar.jsx.mustache +75 -0
  197. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/OneColumnPage.svg +36 -0
  198. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/Operator.jsx.mustache +282 -0
  199. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/config.json.mustache +55 -0
  200. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/demo.stories.jsx.mustache +74 -0
  201. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/index.jsx.mustache +82 -0
  202. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/mock.stories.js.mustache +51 -0
  203. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/styles.js.mustache +14 -0
  204. package/src/tasks/create/templates/Launchpad/Widget/__components.md +3 -0
  205. package/src/tasks/create-all/index.js +383 -0
  206. package/src/tasks/delete/helper.js +158 -55
  207. package/src/tasks/delete/index.js +11 -14
  208. package/src/tasks/delete-all/helper.js +265 -0
  209. package/src/tasks/delete-all/index.js +42 -0
  210. package/src/tasks/index.js +8 -0
  211. package/src/tasks/init/index.js +27 -23
  212. package/src/tasks/init/template/.eslintignore +8 -0
  213. package/src/tasks/init/template/.eslintrc.json +186 -5
  214. package/src/tasks/init/template/.storybook/package.json +1 -0
  215. package/src/tasks/init/template/.vscode/extensions.json +1 -1
  216. package/src/tasks/init/template/README.md +6 -189
  217. package/src/tasks/init/template/babel.config.cjs +13 -0
  218. package/src/tasks/init/template/keys/DX-ComponentDev.zip +0 -0
  219. package/src/tasks/init/template/keys/dxcb.crt +32 -0
  220. package/src/tasks/init/template/keys/dxcb.key +51 -0
  221. package/src/tasks/init/template/package.json.mustache +55 -23
  222. package/src/tasks/init/template/src/components/_components.md +1 -0
  223. package/src/tasks/init/template/tasks.config.json +25 -8
  224. package/src/tasks/init/template/templateNPMRC.txt +8 -0
  225. package/src/tasks/linter/index.js +46 -0
  226. package/src/tasks/list/helper.js +195 -57
  227. package/src/tasks/list/index.js +22 -3
  228. package/src/tasks/promote-webpack/index.js +126 -0
  229. package/src/tasks/promote-webpack/webpack.config.js +376 -0
  230. package/src/tasks/publish/helper.js +110 -61
  231. package/src/tasks/publish/index.js +43 -12
  232. package/src/tasks/publish-all/helper.js +187 -0
  233. package/src/tasks/publish-all/index.js +107 -0
  234. package/src/tasks/rename/index.js +344 -0
  235. package/src/tasks/revert-webpack/index.js +71 -0
  236. package/src/tasks/validator/index.js +291 -18
  237. package/src/util.js +246 -76
  238. package/tests/assets/components/create/Pega_DXIL_MyTestText/config.json +55 -0
  239. package/tests/assets/components/create/Pega_DXIL_MyTestText/demo.stories.jsx +51 -0
  240. package/tests/assets/components/create/Pega_DXIL_MyTestText/index.jsx +60 -0
  241. package/tests/assets/components/create/Pega_DXIL_MyTestText/mock.stories.js +13 -0
  242. package/tests/assets/components/create/Pega_DXIL_MyTestText/styles.js +14 -0
  243. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/Boolean.js +38 -0
  244. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/boolean-format.js +26 -0
  245. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/config.json +145 -0
  246. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/demo.stories.jsx +61 -0
  247. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/event-utils.js +18 -0
  248. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/index.jsx +170 -0
  249. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/mock.stories.js +21 -0
  250. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/styles.js +14 -0
  251. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/OneColumnPage.svg +36 -0
  252. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/config.json +23 -0
  253. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/demo.stories.jsx +78 -0
  254. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/index.jsx +73 -0
  255. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/mock.stories.js +390 -0
  256. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/styles.js +14 -0
  257. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/config.json +291 -0
  258. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/demo.stories.jsx +53 -0
  259. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/event-utils.js +18 -0
  260. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/index.jsx +296 -0
  261. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/mock.stories.js +23 -0
  262. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/styles.js +14 -0
  263. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/suggestions-handler.js +10 -0
  264. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/DateFormatter.js +61 -0
  265. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/FormattedText.jsx +41 -0
  266. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/config.json +195 -0
  267. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/date.js +439 -0
  268. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/demo.stories.jsx +73 -0
  269. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/index.jsx +256 -0
  270. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/mock.stories.js +23 -0
  271. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/styles.js +14 -0
  272. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/suggestions-handler.js +10 -0
  273. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/config.json +256 -0
  274. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date-time.js +92 -0
  275. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date-utils.js +288 -0
  276. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date.js +331 -0
  277. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/demo.stories.jsx +73 -0
  278. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/index.jsx +254 -0
  279. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/mock.stories.js +23 -0
  280. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/styles.js +14 -0
  281. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/suggestions-handler.js +10 -0
  282. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/config.json +278 -0
  283. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/demo.stories.jsx +49 -0
  284. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/event-utils.js +18 -0
  285. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/index.jsx +270 -0
  286. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/mock.stories.js +21 -0
  287. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/styles.js +14 -0
  288. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/suggestions-handler.js +10 -0
  289. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/OneColumnDetails.svg +22 -0
  290. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/StatusWork.jsx +26 -0
  291. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/config.json +35 -0
  292. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/demo.stories.jsx +132 -0
  293. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/index.jsx +83 -0
  294. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/mock.stories.js +189 -0
  295. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/styles.js +14 -0
  296. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/utils.js +152 -0
  297. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/config.json +111 -0
  298. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/demo.stories.jsx +48 -0
  299. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/event-utils.js +18 -0
  300. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/index.jsx +231 -0
  301. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/mock.stories.js +22 -0
  302. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/styles.js +14 -0
  303. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/suggestions-handler.js +10 -0
  304. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/DefaultForm.svg +29 -0
  305. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/config.json +45 -0
  306. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/demo.stories.jsx +166 -0
  307. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/index.jsx +42 -0
  308. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/mock.stories.js +137 -0
  309. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/styles.js +14 -0
  310. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/config.json +344 -0
  311. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/demo.stories.jsx +49 -0
  312. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/event-utils.js +18 -0
  313. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/index.jsx +333 -0
  314. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/mock.stories.js +21 -0
  315. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/styles.js +14 -0
  316. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/suggestions-handler.js +10 -0
  317. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/GetNextWork.jsx +35 -0
  318. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/OneColumnPage.svg +36 -0
  319. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/config.json +32 -0
  320. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/demo.stories.jsx +102 -0
  321. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/index.jsx +70 -0
  322. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/localizations.json +4 -0
  323. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/mock.stories.js +94 -0
  324. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/styles.js +14 -0
  325. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/utils.js +229 -0
  326. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/Avatar.jsx +75 -0
  327. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/OneColumnPage.svg +36 -0
  328. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/Operator.jsx +237 -0
  329. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/config.json +66 -0
  330. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/demo.stories.jsx +68 -0
  331. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/index.jsx +108 -0
  332. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/mock.stories.js +51 -0
  333. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/styles.js +14 -0
  334. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/OneColumnPage.svg +36 -0
  335. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/config.json +59 -0
  336. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/demo.stories.jsx +30 -0
  337. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/index.jsx +48 -0
  338. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/mock.stories.js +23 -0
  339. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/styles.js +14 -0
  340. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/config.json +111 -0
  341. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/demo.stories.jsx +48 -0
  342. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/event-utils.js +18 -0
  343. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/index.jsx +231 -0
  344. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/mock.stories.js +20 -0
  345. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/styles.js +14 -0
  346. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/suggestions-handler.js +10 -0
  347. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/config.json +93 -0
  348. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/demo.stories.jsx +49 -0
  349. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/event-utils.js +18 -0
  350. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/index.jsx +275 -0
  351. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/mock.stories.js +21 -0
  352. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/styles.js +14 -0
  353. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/suggestions-handler.js +10 -0
  354. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/config.json +123 -0
  355. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/demo.stories.jsx +46 -0
  356. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/event-utils.js +18 -0
  357. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/index.jsx +266 -0
  358. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/mock.stories.js +37 -0
  359. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/styles.js +14 -0
  360. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/suggestions-handler.js +10 -0
  361. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/config.json +114 -0
  362. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/demo.stories.jsx +78 -0
  363. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/event-utils.js +18 -0
  364. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/index.jsx +351 -0
  365. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/mock.stories.js +67 -0
  366. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/styles.js +14 -0
  367. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/suggestions-handler.js +10 -0
  368. package/{src/tasks/init/template/src/components/Organization_Library_VideoPlayer → tests/assets/components/createAll/Constellation/Pega_DXIL_MyText}/config.json +24 -13
  369. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/demo.stories.jsx +51 -0
  370. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/index.jsx +60 -0
  371. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/mock.stories.js +13 -0
  372. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/styles.js +14 -0
  373. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/StatusWork.jsx +26 -0
  374. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/config.json +111 -0
  375. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/demo.stories.jsx +48 -0
  376. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/event-utils.js +18 -0
  377. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/index.jsx +239 -0
  378. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/mock.stories.js +21 -0
  379. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/styles.js +14 -0
  380. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/suggestions-handler.js +10 -0
  381. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/config.json +185 -0
  382. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/demo.stories.jsx +57 -0
  383. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/index.jsx +213 -0
  384. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/mock.stories.js +20 -0
  385. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/styles.js +14 -0
  386. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/suggestions-handler.js +10 -0
  387. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/time-of-day.js +288 -0
  388. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/StatusWork.jsx +26 -0
  389. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/TwoColumnDetails.svg +28 -0
  390. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/config.json +42 -0
  391. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/demo.stories.jsx +136 -0
  392. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/index.jsx +83 -0
  393. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/mock.stories.js +230 -0
  394. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/styles.js +14 -0
  395. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/utils.js +155 -0
  396. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/TwoColumn.svg +38 -0
  397. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/config.json +27 -0
  398. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/demo.stories.jsx +175 -0
  399. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/index.jsx +45 -0
  400. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/mock.stories.js +143 -0
  401. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/styles.js +14 -0
  402. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/config.json +237 -0
  403. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/demo.stories.jsx +46 -0
  404. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/event-utils.js +18 -0
  405. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/index.jsx +232 -0
  406. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/mock.stories.js +22 -0
  407. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/styles.js +14 -0
  408. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/suggestions-handler.js +10 -0
  409. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/text-url.jsx +173 -0
  410. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/Boolean.js +38 -0
  411. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/boolean-format.js +26 -0
  412. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/config.json +145 -0
  413. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/demo.stories.jsx +61 -0
  414. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/event-utils.js +18 -0
  415. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/index.jsx +170 -0
  416. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/mock.stories.js +21 -0
  417. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/styles.js +14 -0
  418. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/OneColumnPage.svg +36 -0
  419. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/config.json +23 -0
  420. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/demo.stories.jsx +78 -0
  421. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/index.jsx +73 -0
  422. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/mock.stories.js +390 -0
  423. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/styles.js +14 -0
  424. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/config.json +291 -0
  425. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/demo.stories.jsx +53 -0
  426. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/event-utils.js +18 -0
  427. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/index.jsx +296 -0
  428. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/mock.stories.js +23 -0
  429. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/styles.js +14 -0
  430. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/suggestions-handler.js +10 -0
  431. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/DateFormatter.js +61 -0
  432. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/FormattedText.jsx +41 -0
  433. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/config.json +195 -0
  434. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/date.js +439 -0
  435. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/demo.stories.jsx +73 -0
  436. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/index.jsx +256 -0
  437. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/mock.stories.js +23 -0
  438. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/styles.js +14 -0
  439. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/suggestions-handler.js +10 -0
  440. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/config.json +256 -0
  441. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date-time.js +92 -0
  442. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date-utils.js +288 -0
  443. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date.js +331 -0
  444. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/demo.stories.jsx +73 -0
  445. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/index.jsx +254 -0
  446. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/mock.stories.js +23 -0
  447. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/styles.js +14 -0
  448. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/suggestions-handler.js +10 -0
  449. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/config.json +278 -0
  450. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/demo.stories.jsx +49 -0
  451. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/event-utils.js +18 -0
  452. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/index.jsx +270 -0
  453. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/mock.stories.js +21 -0
  454. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/styles.js +14 -0
  455. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/suggestions-handler.js +10 -0
  456. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/OneColumnDetails.svg +22 -0
  457. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/StatusWork.jsx +26 -0
  458. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/config.json +35 -0
  459. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/demo.stories.jsx +132 -0
  460. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/index.jsx +83 -0
  461. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/mock.stories.js +189 -0
  462. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/styles.js +14 -0
  463. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/utils.js +152 -0
  464. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/config.json +111 -0
  465. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/demo.stories.jsx +48 -0
  466. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/event-utils.js +18 -0
  467. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/index.jsx +231 -0
  468. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/mock.stories.js +22 -0
  469. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/styles.js +14 -0
  470. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/suggestions-handler.js +10 -0
  471. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/DefaultForm.svg +29 -0
  472. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/config.json +45 -0
  473. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/demo.stories.jsx +166 -0
  474. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/index.jsx +42 -0
  475. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/mock.stories.js +137 -0
  476. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/styles.js +14 -0
  477. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/config.json +344 -0
  478. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/demo.stories.jsx +49 -0
  479. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/event-utils.js +18 -0
  480. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/index.jsx +333 -0
  481. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/mock.stories.js +21 -0
  482. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/styles.js +14 -0
  483. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/suggestions-handler.js +10 -0
  484. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/GetNextWork.jsx +35 -0
  485. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/OneColumnPage.svg +36 -0
  486. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/config.json +32 -0
  487. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/demo.stories.jsx +102 -0
  488. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/index.jsx +70 -0
  489. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/localizations.json +4 -0
  490. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/mock.stories.js +94 -0
  491. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/styles.js +14 -0
  492. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/utils.js +229 -0
  493. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/Avatar.jsx +75 -0
  494. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/OneColumnPage.svg +36 -0
  495. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/Operator.jsx +279 -0
  496. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/config.json +55 -0
  497. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/demo.stories.jsx +74 -0
  498. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/index.jsx +80 -0
  499. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/mock.stories.js +51 -0
  500. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/styles.js +14 -0
  501. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/OneColumnPage.svg +36 -0
  502. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/config.json +59 -0
  503. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/demo.stories.jsx +30 -0
  504. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/index.jsx +48 -0
  505. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/mock.stories.js +23 -0
  506. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/styles.js +14 -0
  507. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/config.json +111 -0
  508. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/demo.stories.jsx +48 -0
  509. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/event-utils.js +18 -0
  510. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/index.jsx +231 -0
  511. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/mock.stories.js +20 -0
  512. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/styles.js +14 -0
  513. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/suggestions-handler.js +10 -0
  514. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/config.json +93 -0
  515. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/demo.stories.jsx +49 -0
  516. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/event-utils.js +18 -0
  517. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/index.jsx +275 -0
  518. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/mock.stories.js +21 -0
  519. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/styles.js +14 -0
  520. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/suggestions-handler.js +10 -0
  521. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/config.json +123 -0
  522. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/demo.stories.jsx +46 -0
  523. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/event-utils.js +18 -0
  524. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/index.jsx +266 -0
  525. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/mock.stories.js +37 -0
  526. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/styles.js +14 -0
  527. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/suggestions-handler.js +10 -0
  528. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/config.json +114 -0
  529. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/demo.stories.jsx +78 -0
  530. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/event-utils.js +18 -0
  531. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/index.jsx +351 -0
  532. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/mock.stories.js +67 -0
  533. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/styles.js +14 -0
  534. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/suggestions-handler.js +10 -0
  535. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/config.json +55 -0
  536. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/demo.stories.jsx +51 -0
  537. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/index.jsx +60 -0
  538. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/mock.stories.js +13 -0
  539. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/styles.js +14 -0
  540. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/StatusWork.jsx +26 -0
  541. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/config.json +111 -0
  542. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/demo.stories.jsx +48 -0
  543. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/event-utils.js +18 -0
  544. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/index.jsx +239 -0
  545. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/mock.stories.js +21 -0
  546. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/styles.js +14 -0
  547. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/suggestions-handler.js +10 -0
  548. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/config.json +185 -0
  549. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/demo.stories.jsx +57 -0
  550. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/index.jsx +213 -0
  551. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/mock.stories.js +20 -0
  552. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/styles.js +14 -0
  553. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/suggestions-handler.js +10 -0
  554. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/time-of-day.js +288 -0
  555. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/StatusWork.jsx +26 -0
  556. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/TwoColumnDetails.svg +28 -0
  557. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/config.json +42 -0
  558. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/demo.stories.jsx +136 -0
  559. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/index.jsx +83 -0
  560. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/mock.stories.js +230 -0
  561. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/styles.js +14 -0
  562. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/utils.js +155 -0
  563. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/TwoColumn.svg +38 -0
  564. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/config.json +27 -0
  565. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/demo.stories.jsx +175 -0
  566. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/index.jsx +45 -0
  567. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/mock.stories.js +143 -0
  568. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/styles.js +14 -0
  569. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/config.json +237 -0
  570. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/demo.stories.jsx +46 -0
  571. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/event-utils.js +18 -0
  572. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/index.jsx +232 -0
  573. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/mock.stories.js +22 -0
  574. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/styles.js +14 -0
  575. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/suggestions-handler.js +10 -0
  576. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/text-url.jsx +173 -0
  577. package/tests/functional/localCreateAllListDeleteAll.test.js +163 -0
  578. package/tests/functional/localCreateBuildAllDeleteAll.test.js +148 -0
  579. package/tests/functional/localCreateBuildDelete.test.js +84 -0
  580. package/tests/functional/localCreateListDelete.test.js +108 -0
  581. package/tests/functional/localCreatePublishAllDeleteAll.test.js +148 -0
  582. package/tests/functional/localCreatePublishDelete.test.js +84 -0
  583. package/tests/functional/localCreateRenameDelete.test.js +84 -0
  584. package/tests/functional/localPromoteRevertWP.test.js +59 -0
  585. package/tests/unit/util.test.js +544 -0
  586. package/src/tasks/create/template/demo.stories.jsx.mustache +0 -44
  587. package/src/tasks/create/template/styles.js.mustache +0 -7
  588. package/src/tasks/init/template/src/components/MBTAList/MBTAList.stories.tsx +0 -10
  589. package/src/tasks/init/template/src/components/MBTAList/MBTAList.tsx +0 -122
  590. package/src/tasks/init/template/src/components/MBTAList/icons/accessible.icon.tsx +0 -14
  591. package/src/tasks/init/template/src/components/MBTAList/icons/bus.icon.tsx +0 -13
  592. package/src/tasks/init/template/src/components/MBTAList/icons/mbta.icon.tsx +0 -10
  593. package/src/tasks/init/template/src/components/MBTAList/icons/subway.icon.tsx +0 -14
  594. package/src/tasks/init/template/src/components/MBTAList/index.ts +0 -2
  595. package/src/tasks/init/template/src/components/Organization_Library_MediaURL/MediaURL.stories.tsx +0 -19
  596. package/src/tasks/init/template/src/components/Organization_Library_MediaURL/MediaURL.styles.ts +0 -5
  597. package/src/tasks/init/template/src/components/Organization_Library_MediaURL/MediaURL.types.ts +0 -10
  598. package/src/tasks/init/template/src/components/Organization_Library_MediaURL/MediaURLDisplay.tsx +0 -25
  599. package/src/tasks/init/template/src/components/Organization_Library_MediaURL/MediaURLInput.tsx +0 -24
  600. package/src/tasks/init/template/src/components/Organization_Library_MediaURL/config.json +0 -13
  601. package/src/tasks/init/template/src/components/Organization_Library_MediaURL/index.ts +0 -2
  602. package/src/tasks/init/template/src/components/Organization_Library_VideoPlayer/demo.stories.jsx +0 -40
  603. package/src/tasks/init/template/src/components/Organization_Library_VideoPlayer/index.jsx +0 -42
  604. package/src/tasks/init/template/src/components/Organization_Library_VideoPlayer/styles.js +0 -5
  605. /package/src/tasks/{publish/bundle → bundle}/builder/modules.js +0 -0
  606. /package/src/tasks/{publish/bundle → bundle}/builder/paths.js +0 -0
  607. /package/src/tasks/init/template/.storybook/{main.js → main.cjs} +0 -0
@@ -0,0 +1,383 @@
1
+ import path from 'path';
2
+ import { URL, fileURLToPath } from 'url';
3
+ import fs from 'fs';
4
+ import { promisify } from 'util';
5
+ import { join } from 'path';
6
+
7
+ import inquirer from 'inquirer';
8
+ import ncp from 'ncp';
9
+ import chalk from 'chalk';
10
+
11
+ import { checkPathAccess, showVersion } from '../../util.js';
12
+
13
+ export const DXCB_CONFIG_INTERNAL_JSON_FILENAME = 'src/dxcb.config.json';
14
+
15
+ import {
16
+ convertIntoPascalCase,
17
+ compileMustacheTemplate,
18
+ getComponentDirectoryPath,
19
+ getPegaServerConfig,
20
+ getPegaConfig,
21
+ getComponents,
22
+ getComponentDefaults,
23
+ sanitize,
24
+ validateSemver
25
+ } from '../../util.js';
26
+ import { COMPONENT_SCHEMA, COMPONENTS_DIRECTORY_PATH, TASKS_CONFIG_JSON_FILENAME, COMPONENTS_PATH, CATEGORY_CONSTELLATION } from '../../constants.js';
27
+
28
+ const pegaConfigJsonPath = path.join(path.resolve(), TASKS_CONFIG_JSON_FILENAME);
29
+
30
+ const copy = promisify(ncp);
31
+
32
+ const copyComponentTemplate = async (options) => {
33
+ if (options.targetDirectory) {
34
+ return copy(options.templateDirectory, options.targetDirectory, {
35
+ clobber: false
36
+ });
37
+ } else {
38
+ return copy(options.templateDirectoryConstellation, options.targetDirectoryConstellation, {
39
+ clobber: false,
40
+ filter: (fileName) => {
41
+ // filter out the file config.json or config.json.mustache
42
+ if (fileName.indexOf('config.json') >= 0) return false;
43
+ else return true;
44
+ }
45
+ });
46
+ }
47
+ };
48
+
49
+ export const compileMustacheTemplates = async (
50
+ componentDirectory,
51
+ { componentKey, componentName, componentLabel, library, version, type, subtype, description, organization, allowedApplications }
52
+ ) => {
53
+ const files = fs.readdirSync(componentDirectory);
54
+ const componentClassName = convertIntoPascalCase(componentKey);
55
+
56
+ const isTemplate = type === 'Template';
57
+ const isPicklist = subtype === 'Picklist';
58
+ const isBool = subtype === 'Boolean';
59
+ const isPhone = subtype === 'Phone';
60
+
61
+ if (Array.isArray(subtype) && subtype.length === 1) {
62
+ subtype = subtype.toString();
63
+ }
64
+
65
+ let mustacheSubType = subtype;
66
+
67
+ // overrides
68
+ if (typeof mustacheSubType == 'string') {
69
+ switch (mustacheSubType) {
70
+ case 'FORM-region':
71
+ mustacheSubType = 'FORM';
72
+ break;
73
+ case 'DETAILS-region':
74
+ mustacheSubType = 'DETAILS';
75
+ break;
76
+ case 'Text-Input':
77
+ mustacheSubType = 'Text';
78
+ break;
79
+ }
80
+ }
81
+
82
+ if (allowedApplications.trim() === '') {
83
+ allowedApplications = [];
84
+ } else {
85
+ if (allowedApplications.indexOf(',') !== -1) {
86
+ allowedApplications = allowedApplications.split(',');
87
+ }
88
+ allowedApplications = [].concat(allowedApplications);
89
+ }
90
+
91
+ allowedApplications = allowedApplications.filter((el) => !!el.trim()).map((el) => el.trim());
92
+ files.forEach((file) => {
93
+ const filePath = path.join(componentDirectory, file);
94
+
95
+ const output = compileMustacheTemplate(filePath, {
96
+ COMPONENT_KEY: componentKey,
97
+ COMPONENT_NAME: componentName,
98
+ COMPONENT_LABEL: componentLabel,
99
+ COMPONENT_CLASS_NAME: componentClassName,
100
+ ORGANIZATION: organization,
101
+ VERSION: version,
102
+ LIBRARY: library,
103
+ ALLOWEDAPPS: JSON.stringify(allowedApplications),
104
+ TYPE: type,
105
+ SUB_TYPE: JSON.stringify(mustacheSubType),
106
+ DESCRIPTION: description || componentLabel,
107
+ IS_TEMPLATE: isTemplate,
108
+ IS_PICKLIST: isPicklist,
109
+ IS_BOOLEAN: isBool,
110
+ IS_PHONE: isPhone
111
+ });
112
+ fs.writeFileSync(filePath, output);
113
+ fs.renameSync(filePath, filePath.replace('.mustache', ''));
114
+ });
115
+ };
116
+
117
+ export const validateCompileAll = async ({ prefix, library, version, allowedApplications, organization }, options) => {
118
+ for (let fieldIdx in COMPONENT_SCHEMA.subtype.field) {
119
+ const type = 'Field';
120
+ const subtype = COMPONENT_SCHEMA.subtype.field[fieldIdx].value;
121
+ const prefixNoSpace = prefix.replace(/\s+/g, '');
122
+ const componentNameNoSpace = COMPONENT_SCHEMA.subtype.field[fieldIdx].name.replace(/\s+/g, '');
123
+ const componentName = ''.concat(prefixNoSpace).concat(componentNameNoSpace);
124
+ const componentLabel = ''.concat(prefix).concat(' ').concat(COMPONENT_SCHEMA.subtype.field[fieldIdx].name);
125
+ const description = componentLabel;
126
+
127
+ await validateCompile(
128
+ {
129
+ library,
130
+ organization,
131
+ componentName,
132
+ componentLabel,
133
+ version,
134
+ type,
135
+ subtype,
136
+ description,
137
+ allowedApplications
138
+ },
139
+ options
140
+ );
141
+ }
142
+
143
+ for (let templateIdx in COMPONENT_SCHEMA.subtype.template) {
144
+ const type = 'Template';
145
+ const subtype = COMPONENT_SCHEMA.subtype.template[templateIdx].value;
146
+ const prefixNoSpace = prefix.replace(/\s+/g, '');
147
+ let templateNameOriginal = COMPONENT_SCHEMA.subtype.template[templateIdx].name;
148
+ let templateName = convertIntoPascalCase(COMPONENT_SCHEMA.subtype.template[templateIdx].name);
149
+ let templateLabel = convertIntoPascalCase(COMPONENT_SCHEMA.subtype.template[templateIdx].name);
150
+ if (templateNameOriginal.indexOf('region') >= 0) {
151
+ let templateNameBase = convertIntoPascalCase(templateNameOriginal.replace(' region', ''));
152
+ templateName = 'TwoColumn'.concat(templateNameBase);
153
+ templateLabel = 'Two Column '.concat(templateNameBase);
154
+ }
155
+ const componentName = ''.concat(prefixNoSpace).concat(templateName);
156
+ const componentLabel = ''.concat(prefix).concat(' ').concat(templateLabel);
157
+ const description = componentLabel;
158
+
159
+ await validateCompile(
160
+ {
161
+ library,
162
+ organization,
163
+ componentName,
164
+ componentLabel,
165
+ version,
166
+ type,
167
+ subtype,
168
+ description,
169
+ allowedApplications
170
+ },
171
+ options
172
+ );
173
+ }
174
+
175
+ for (let widgetIdx in COMPONENT_SCHEMA.subtype.widget) {
176
+ const type = 'Widget';
177
+ const subtype = COMPONENT_SCHEMA.subtype.widget[widgetIdx].value;
178
+ const prefixNoSpace = prefix.replace(/\s+/g, '');
179
+ let widgetNameOriginal = COMPONENT_SCHEMA.subtype.widget[widgetIdx].name;
180
+ let widgetName = convertIntoPascalCase(COMPONENT_SCHEMA.subtype.widget[widgetIdx].name).concat('Widget');
181
+ let widgetLabel = convertIntoPascalCase(COMPONENT_SCHEMA.subtype.widget[widgetIdx].name).concat(' Widget');
182
+ if (widgetName.indexOf('&') >= 0) {
183
+ widgetName = convertIntoPascalCase(widgetNameOriginal.replace(' & ', ''));
184
+ }
185
+ const componentName = ''.concat(prefixNoSpace).concat(widgetName);
186
+ const componentLabel = ''.concat(prefix).concat(' ').concat(widgetLabel);
187
+ const description = componentLabel;
188
+
189
+ await validateCompile(
190
+ {
191
+ library,
192
+ organization,
193
+ componentName,
194
+ componentLabel,
195
+ version,
196
+ type,
197
+ subtype,
198
+ description,
199
+ allowedApplications
200
+ },
201
+ options
202
+ );
203
+ }
204
+ };
205
+
206
+ export const validateCompile = async (
207
+ { library, organization, componentName, componentLabel, version, framework, type, subtype, description, allowedApplications },
208
+ options
209
+ ) => {
210
+ let sSubType = subtype;
211
+ if (Array.isArray(subtype)) {
212
+ sSubType = subtype.join('-');
213
+ }
214
+
215
+ const typeLC = type.toLowerCase();
216
+
217
+ //await checkPathAccess(pegaConfigInternalJsonPath);
218
+
219
+ framework = convertIntoPascalCase(CATEGORY_CONSTELLATION);
220
+
221
+ let pegaConfig = await getPegaConfig();
222
+ let templateParentDir = `./templates/${framework}`;
223
+
224
+ let templateDir = `${templateParentDir}/${type}/${sSubType}`;
225
+ let templateDirectory = fileURLToPath(new URL(templateDir, import.meta.url));
226
+ templateDirectory = templateDirectory.replace(path.sep + 'create-all', path.sep + 'create');
227
+
228
+ const defaultPegaServerConfig = await getPegaServerConfig();
229
+ const isLaunchpad = defaultPegaServerConfig.serverType === 'launchpad';
230
+ let originalFramework = framework;
231
+
232
+ if (isLaunchpad) {
233
+ framework = "Launchpad";
234
+
235
+ templateDir = `./templates/${framework}/${type}/${sSubType}`;
236
+ templateDirectory = fileURLToPath(new URL(templateDir, import.meta.url));
237
+ templateDirectory = templateDirectory.replace(path.sep + 'create-all', path.sep + 'create');
238
+
239
+ // if doesn't exist, revert
240
+ if (!fs.existsSync(templateDirectory)) {
241
+ framework = originalFramework;
242
+
243
+ templateDir = `./templates/${framework}/${type}/${sSubType}`;
244
+ templateDirectory = fileURLToPath(new URL(templateDir, import.meta.url));
245
+ templateDirectory = templateDirectory.replace(path.sep + 'create-all', path.sep + 'create');
246
+
247
+ }
248
+
249
+ }
250
+
251
+
252
+
253
+ const componentKey = `${organization}_${library}_${componentName}`;
254
+
255
+ const targetDirectory = await getComponentDirectoryPath(componentKey);
256
+
257
+ const components = await getComponents(false);
258
+
259
+ if (components.includes(componentKey)) {
260
+ console.log(chalk.red(`${componentKey} component already exists in ${targetDirectory}`));
261
+
262
+ return;
263
+ }
264
+
265
+ // component
266
+ await copyComponentTemplate({
267
+ ...options,
268
+ targetDirectory,
269
+ templateDirectory
270
+ });
271
+ await compileMustacheTemplates(targetDirectory, {
272
+ componentKey,
273
+ componentName,
274
+ componentLabel,
275
+ library,
276
+ version,
277
+ type,
278
+ subtype,
279
+ description,
280
+ organization,
281
+ allowedApplications
282
+ });
283
+
284
+ console.log(chalk.green(`created ${componentKey} component in ${targetDirectory}`));
285
+ };
286
+
287
+ export default async (options) => {
288
+ showVersion();
289
+
290
+ await checkPathAccess(pegaConfigJsonPath);
291
+
292
+ let data = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
293
+ data = data && JSON.parse(data);
294
+
295
+ if (!data[COMPONENTS_DIRECTORY_PATH]) {
296
+ console.error(`${chalk.red.bold('ERROR')} Could not able find components directory path in config.json`);
297
+ process.exit(1);
298
+ }
299
+
300
+ const componentData = data[COMPONENTS_PATH];
301
+
302
+ const { library } = componentData;
303
+ let { organization } = JSON.parse(fs.readFileSync(path.resolve('package.json'), 'utf8'));
304
+
305
+ let componentDefaults = await getComponentDefaults();
306
+ componentDefaults.library = library;
307
+
308
+ if (options.params.length >= 8) {
309
+ const prefix = options.params[3];
310
+ const version = options.params[4];
311
+ const library = options.params[5];
312
+ const allowedApplications = options.params[6];
313
+
314
+ // overwrite
315
+ organization = options.params[7];
316
+
317
+ await validateCompileAll(
318
+ {
319
+ prefix,
320
+ library,
321
+ version,
322
+ allowedApplications,
323
+ organization
324
+ },
325
+ options
326
+ );
327
+ } else {
328
+ const questions = [
329
+ {
330
+ name: 'prefix',
331
+ message: 'Enter prefix label'
332
+ },
333
+ {
334
+ name: 'version',
335
+ message: 'Enter component version',
336
+ default: componentDefaults.version,
337
+ validate: (value) => {
338
+ if (validateSemver(value)) {
339
+ return true;
340
+ }
341
+ return 'Please provide semver compatible version e.g 0.0.1';
342
+ }
343
+ },
344
+ {
345
+ name: 'library',
346
+ message: 'Enter library name (required)',
347
+ default: componentDefaults.library,
348
+ validate: (value) => {
349
+ /* value should not be empty
350
+ It should not have spaces
351
+ It should not start with a number
352
+ Only case-insensitive alphanumeric values are allowed
353
+ */
354
+ if (value && !/^\d/.test(value) && value === sanitize(value)) {
355
+ return true;
356
+ }
357
+ return 'Only alphanumeric values are allowed, starting with alphabets';
358
+ }
359
+ },
360
+ {
361
+ name: 'allowedApplications',
362
+ message: 'Please enter the application names to be supported (comma-separated). ',
363
+ suffix: 'Keep empty for all applications'
364
+ }
365
+ ];
366
+
367
+ await inquirer.prompt(questions).then(async (answers) => {
368
+ const { library, version, allowedApplications } = answers;
369
+ let { prefix } = answers;
370
+ prefix = prefix.replace(/[^a-zA-Z0-9 ]/g, '');
371
+ await validateCompileAll(
372
+ {
373
+ prefix,
374
+ library,
375
+ version,
376
+ allowedApplications,
377
+ organization
378
+ },
379
+ options
380
+ );
381
+ });
382
+ }
383
+ };
@@ -1,24 +1,48 @@
1
+ import fs from 'fs';
1
2
  import chalk from 'chalk';
2
3
  import inquirer from 'inquirer';
3
4
  import ora from 'ora';
4
5
 
5
- import { LIST_COMPONENT_SERVICE_REST_ENDPOINT } from '../../constants.js';
6
+ import path from 'path';
7
+ import { join } from 'path';
8
+
6
9
  import {
7
- constructCompleteUrl,
8
10
  deleteLocalComponent,
9
- deleteServerComponent,
11
+ deleteInfinityServerComponent,
12
+ deleteLaunchpadServerComponent,
10
13
  getComponents,
11
14
  getPegaServerConfig,
12
- nodeFetch
15
+ standardizeStr,
16
+ sanitize
13
17
  } from '../../util.js';
14
18
  import { getComponentsFromServer } from '../list/helper.js';
15
19
 
20
+ import { TASKS_CONFIG_JSON_FILENAME, COMPONENTS_DIRECTORY_PATH, COMPONENTS_PATH } from '../../constants.js';
21
+
16
22
  export const SOURCE_OF_COMPONENT_TYPES = {
17
23
  SERVER: 'Server',
18
24
  LOCAL: 'Local'
19
25
  };
20
26
 
21
- export const getDeleteComponentsQuestions = async (options, sourceOfComponentsOption) => {
27
+ const currentDirectory = process.cwd();
28
+ const pegaConfigJsonPath = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
29
+
30
+ let data = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
31
+ data = data && JSON.parse(data);
32
+
33
+ if (!data[COMPONENTS_DIRECTORY_PATH]) {
34
+ console.error(
35
+ `${chalk.red.bold('ERROR')} Could not able find components directory path in config.json`
36
+ );
37
+ process.exit(1);
38
+ }
39
+
40
+ const componentData = data[COMPONENTS_PATH];
41
+
42
+ let { library } = componentData;
43
+ let { organization } = JSON.parse(fs.readFileSync(path.resolve('package.json'), 'utf8'));
44
+
45
+ export const getDeleteComponentsQuestions = async (options) => {
22
46
  const defaultPegaServerConfig = await getPegaServerConfig();
23
47
 
24
48
  return [
@@ -35,26 +59,64 @@ export const getDeleteComponentsQuestions = async (options, sourceOfComponentsOp
35
59
  ];
36
60
  };
37
61
 
38
- export const deleteLocalComponents = async sourceOfComponents => {
62
+ export const getLaunchPadFilterQuestions = async () => {
63
+ const defaultPegaServerConfig = await getPegaServerConfig();
64
+
65
+ return [
66
+ {
67
+ name: 'organization',
68
+ message: 'Enter component organization (required)',
69
+ default: organization,
70
+ validate: value => {
71
+ if (value) {
72
+ return true;
73
+ }
74
+ return 'Please provide value for organization';
75
+ }
76
+ },
77
+ {
78
+ name: 'library',
79
+ message: 'Enter library name (required)',
80
+ default: library,
81
+ validate: value => {
82
+ if (value) {
83
+ return true;
84
+ }
85
+ return 'Please provide value for library';
86
+ }
87
+ }
88
+ ];
89
+ }
90
+
91
+ export const deleteLocalComponents = async (sourceOfComponents, options) => {
39
92
  const localComponents = await getComponents();
40
93
 
41
94
  if (localComponents.length > 0) {
42
- const answers = await inquirer.prompt([
43
- {
44
- name: 'componentKey',
45
- type: 'rawlist',
46
- message: 'Select component to delete',
47
- choices: localComponents
48
- },
49
- {
50
- name: 'confirmDeletion',
51
- type: 'confirm',
52
- message: 'Are you sure ?',
53
- default: false
95
+ if (options.params.length >= 6) {
96
+ const componentKey = options.params[4];
97
+ const sDeletion = options.params[5];
98
+ const confirmDeletion = sDeletion === 'Y' || sDeletion === 'y' || sDeletion === true || sDeletion === 'true';
99
+ if (confirmDeletion) {
100
+ await deleteLocalComponent(componentKey);
101
+ }
102
+ } else {
103
+ const answers = await inquirer.prompt([
104
+ {
105
+ name: 'componentKey',
106
+ type: 'rawlist',
107
+ message: 'Select component to delete',
108
+ choices: localComponents
109
+ },
110
+ {
111
+ name: 'confirmDeletion',
112
+ type: 'confirm',
113
+ message: 'Are you sure ?',
114
+ default: false
115
+ }
116
+ ]);
117
+ if (answers.confirmDeletion) {
118
+ await deleteLocalComponent(answers.componentKey);
54
119
  }
55
- ]);
56
- if (answers.confirmDeletion) {
57
- await deleteLocalComponent(answers.componentKey);
58
120
  }
59
121
  } else {
60
122
  console.log(chalk.bold.redBright(`No custom components in ${sourceOfComponents}`));
@@ -62,44 +124,85 @@ export const deleteLocalComponents = async sourceOfComponents => {
62
124
  };
63
125
 
64
126
  export const deleteServerComponents = async (sourceOfComponents, answers) => {
65
- const spinner = ora('Fetching components from server').start();
66
- const data = await getComponentsFromServer(answers);
67
127
 
68
- const serverComponents = JSON.parse(data);
128
+ const defaultPegaServerConfig = await getPegaServerConfig();
129
+ const isLaunchpad = defaultPegaServerConfig.serverType === 'launchpad';
130
+
131
+
132
+ if (isLaunchpad) {
133
+ const questions = await getLaunchPadFilterQuestions();
134
+ const lpAnswers = await inquirer.prompt(questions);
135
+
136
+ ({library, organization} = lpAnswers);
137
+ }
138
+
139
+ const spinner = ora('Fetching components from server').start();
140
+ const data = await getComponentsFromServer(library, organization);
69
141
  spinner.stop();
70
- if (serverComponents && serverComponents.pxResults?.length > 0) {
71
- const choicesArr = serverComponents.pxResults.map(({ label, pyRuleSet, pyRuleSetVersion }) => {
72
- const name = `${standardizeStr(label, 45)} ${standardizeStr(pyRuleSet, 30)} ${standardizeStr(
73
- pyRuleSetVersion,
74
- 20
75
- )}`;
76
-
77
- const value = `${label}~|~${pyRuleSet}~|~${pyRuleSetVersion}`;
78
- const short = `Selected component : ${chalk.redBright(
79
- `${label} ${pyRuleSet} : ${pyRuleSetVersion}`
80
- )}`;
81
-
82
- return { name, value, short };
83
- });
84
- const answers = await inquirer.prompt({
85
- name: 'componentToDelete',
86
- type: 'rawlist',
87
- pageSize: 10,
88
- message: `Select component to delete \n ${standardizeStr('Rule name', 48)} ${standardizeStr(
89
- 'Ruleset name',
90
- 30
91
- )} ${standardizeStr('Ruleset version', 22)}`,
92
- choices: choicesArr
93
- });
94
- await deleteServerComponent(answers.componentToDelete);
142
+
143
+
144
+ let serverComponents;
145
+ if (isLaunchpad) {
146
+ serverComponents = data;
147
+
95
148
  } else {
96
- console.log(chalk.bold.redBright(`No custom components in ${sourceOfComponents}`));
149
+ try {
150
+ if (typeof data === 'object') {
151
+ serverComponents = data.pxResults;
152
+ } else {
153
+ serverComponents = JSON.parse(data).pxResults;
154
+ }
155
+ } catch (ex) {
156
+ /* empty */
157
+ }
97
158
  }
98
- };
99
159
 
100
- export const standardizeStr = (str, leng) => {
101
- for (let i = str.length; i <= leng; i++) {
102
- str += ' ';
160
+
161
+ if (serverComponents && serverComponents?.length > 0) {
162
+ if (isLaunchpad) {
163
+ const choicesArr = serverComponents.map(({ name: componentName, type, version }) => {
164
+ const name = `${standardizeStr(componentName, 45)} ${standardizeStr(type, 20)} ${standardizeStr(version, 20)}`;
165
+
166
+ const value = `${componentName}~|~${type}~|~${version}`;
167
+ const short = `\n Selected component : ${chalk.redBright(`${componentName} ${type} : ${version}`)}`;
168
+
169
+ return { name, value, short };
170
+ });
171
+
172
+ const launchpadAnswers = await inquirer.prompt({
173
+ name: 'componentToDelete',
174
+ type: 'rawlist',
175
+ pageSize: 10,
176
+ message: `Select component to delete \n ${standardizeStr('Component Name', 48)} ${standardizeStr('Type', 20)} ${standardizeStr(
177
+ 'Version',
178
+ 22
179
+ )}`,
180
+ choices: choicesArr
181
+ });
182
+ await deleteLaunchpadServerComponent(launchpadAnswers.componentToDelete);
183
+ } else {
184
+ // logic for Infinity
185
+ const choicesArr = serverComponents.map(({ label, pyRuleSet, pyRuleSetVersion }) => {
186
+ const name = `${standardizeStr(label, 45)} ${standardizeStr(pyRuleSet, 30)} ${standardizeStr(pyRuleSetVersion, 20)}`;
187
+
188
+ const value = `${label}~|~${pyRuleSet}~|~${pyRuleSetVersion}`;
189
+ const short = `\n Selected component : ${chalk.redBright(`${label} ${pyRuleSet} : ${pyRuleSetVersion}`)}`;
190
+
191
+ return { name, value, short };
192
+ });
193
+ const infinityAnswers = await inquirer.prompt({
194
+ name: 'componentToDelete',
195
+ type: 'rawlist',
196
+ pageSize: 10,
197
+ message: `Select component to delete \n ${standardizeStr('Rule name', 48)} ${standardizeStr('Ruleset name', 30)} ${standardizeStr(
198
+ 'Ruleset version',
199
+ 22
200
+ )}`,
201
+ choices: choicesArr
202
+ });
203
+ await deleteInfinityServerComponent(infinityAnswers.componentToDelete);
204
+ }
205
+ } else {
206
+ console.log(chalk.bold.redBright(`No custom components in ${sourceOfComponents}`));
103
207
  }
104
- return str;
105
208
  };
@@ -1,18 +1,13 @@
1
1
  import inquirer from 'inquirer';
2
- import ora from 'ora';
3
- import chalk from 'chalk';
4
2
 
5
- import {
6
- deleteLocalComponents,
7
- SOURCE_OF_COMPONENT_TYPES,
8
- deleteServerComponents,
9
- getDeleteComponentsQuestions
10
- } from './helper.js';
3
+ import { showVersion } from '../../util.js';
11
4
 
12
- const deleteComponentsFn = async (sourceOfComponents, answers) => {
5
+ import { deleteLocalComponents, SOURCE_OF_COMPONENT_TYPES, deleteServerComponents, getDeleteComponentsQuestions } from './helper.js';
6
+
7
+ const deleteComponentsFn = async (sourceOfComponents, answers, options) => {
13
8
  switch (sourceOfComponents) {
14
9
  case SOURCE_OF_COMPONENT_TYPES.LOCAL: {
15
- await deleteLocalComponents(sourceOfComponents);
10
+ await deleteLocalComponents(sourceOfComponents, options);
16
11
  break;
17
12
  }
18
13
  case SOURCE_OF_COMPONENT_TYPES.SERVER: {
@@ -26,20 +21,22 @@ const deleteComponentsFn = async (sourceOfComponents, answers) => {
26
21
  }
27
22
  };
28
23
 
29
- export default async options => {
24
+ export default async (options) => {
25
+ showVersion();
26
+
30
27
  let sourceOfComponentsOption = SOURCE_OF_COMPONENT_TYPES.LOCAL;
31
28
  if (options.params[3] === SOURCE_OF_COMPONENT_TYPES.LOCAL) {
32
29
  sourceOfComponentsOption = options.params[3];
33
- await deleteComponentsFn(sourceOfComponentsOption);
30
+ await deleteComponentsFn(sourceOfComponentsOption, null, options);
34
31
  } else if (options.params[3] === SOURCE_OF_COMPONENT_TYPES.SERVER) {
35
32
  sourceOfComponentsOption = options.params[3];
36
33
  const questions = await getDeleteComponentsQuestions(options, sourceOfComponentsOption);
37
34
  const answers = await inquirer.prompt(questions);
38
- await deleteComponentsFn(sourceOfComponentsOption, answers);
35
+ await deleteComponentsFn(sourceOfComponentsOption, answers, options);
39
36
  } else {
40
37
  const questions = await getDeleteComponentsQuestions(options);
41
38
  const answers = await inquirer.prompt(questions);
42
39
  const { sourceOfComponents } = answers;
43
- await deleteComponentsFn(sourceOfComponents, answers);
40
+ await deleteComponentsFn(sourceOfComponents, answers, options);
44
41
  }
45
42
  };