@pega/custom-dx-components 0.23.3 → 0.23.5

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 (254) hide show
  1. package/.prettierrc.json +7 -1
  2. package/babel.config.cjs +13 -0
  3. package/jest.config.cjs +37 -0
  4. package/package.json +18 -10
  5. package/src/auth.js +578 -555
  6. package/src/cli.js +11 -5
  7. package/src/constants.js +23 -25
  8. package/src/currentPath.cjs +1 -0
  9. package/src/tasks/authenticate/helper.js +82 -18
  10. package/src/tasks/authenticate/index.js +21 -7
  11. package/src/tasks/build/helper.js +17 -8
  12. package/src/tasks/build/index.js +29 -7
  13. package/src/tasks/build-all/helper.js +2 -1
  14. package/src/tasks/build-all/index.js +32 -25
  15. package/src/tasks/bundle/builder/index.js +5 -0
  16. package/src/tasks/bundle/builder/webpack.config.js +3 -2
  17. package/src/tasks/create/index.js +17 -7
  18. package/src/tasks/create/templates/Constellation/Field/Boolean/config.json.mustache +0 -1
  19. package/src/tasks/create/templates/Constellation/Field/Date/DateFormatter.js.mustache +7 -7
  20. package/src/tasks/create/templates/Constellation/Field/Date/config.json.mustache +0 -1
  21. package/src/tasks/create/templates/Constellation/Field/Date/date.js.mustache +8 -8
  22. package/src/tasks/create/templates/Constellation/Field/DateTime/config.json.mustache +0 -1
  23. package/src/tasks/create/templates/Constellation/Field/DateTime/date-time.js.mustache +10 -10
  24. package/src/tasks/create/templates/Constellation/Field/DateTime/date-utils.js.mustache +6 -5
  25. package/src/tasks/create/templates/Constellation/Field/DateTime/date.js.mustache +6 -3
  26. package/src/tasks/create/templates/Constellation/Field/Decimal/config.json.mustache +0 -1
  27. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/config.json.mustache +0 -1
  28. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/config.json.mustache +0 -1
  29. package/src/tasks/create/templates/Constellation/Field/Integer/config.json.mustache +0 -1
  30. package/src/tasks/create/templates/Constellation/Field/Picklist/config.json.mustache +0 -1
  31. package/src/tasks/create/templates/Constellation/Field/Text/config.json.mustache +0 -1
  32. package/src/tasks/create/templates/Constellation/Field/Text-Email/config.json.mustache +0 -1
  33. package/src/tasks/create/templates/Constellation/Field/Text-Input/config.json.mustache +0 -1
  34. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/config.json.mustache +0 -1
  35. package/src/tasks/create/templates/Constellation/Field/Text-Phone/config.json.mustache +0 -1
  36. package/src/tasks/create/templates/Constellation/Field/Text-Phone/index.jsx.mustache +0 -1
  37. package/src/tasks/create/templates/Constellation/Field/Text-URL/config.json.mustache +0 -1
  38. package/src/tasks/create/templates/Constellation/Field/TimeOfDay/config.json.mustache +0 -1
  39. package/src/tasks/create/templates/Constellation/Field/TimeOfDay/time-of-day.js.mustache +6 -5
  40. package/src/tasks/create/templates/Constellation/Template/DETAILS/config.json.mustache +0 -1
  41. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/config.json.mustache +0 -1
  42. package/src/tasks/create/templates/Constellation/Template/FORM/config.json.mustache +0 -1
  43. package/src/tasks/create/templates/Constellation/Template/FORM-region/config.json.mustache +0 -1
  44. package/src/tasks/create/templates/Constellation/Template/PAGE/config.json.mustache +0 -1
  45. package/src/tasks/create/templates/Constellation/Widget/CASE/config.json.mustache +0 -1
  46. package/src/tasks/create/templates/Constellation/Widget/PAGE/config.json.mustache +0 -1
  47. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/config.json.mustache +0 -1
  48. package/src/tasks/create-all/index.js +72 -48
  49. package/src/tasks/delete/helper.js +90 -40
  50. package/src/tasks/delete/index.js +5 -5
  51. package/src/tasks/delete-all/helper.js +108 -48
  52. package/src/tasks/delete-all/index.js +6 -6
  53. package/src/tasks/index.js +2 -1
  54. package/src/tasks/init/template/README.md +2 -204
  55. package/src/tasks/init/template/babel.config.cjs +13 -0
  56. package/src/tasks/init/template/jest.config.cjs +21 -0
  57. package/src/tasks/init/template/package.json.mustache +13 -5
  58. package/src/tasks/init/template/src/components/_components.md +1 -1
  59. package/src/tasks/init/template/tasks.config.json +11 -8
  60. package/src/tasks/init/template/test/assets/components/create/Pega_DXIL_MyTestText/config.json +55 -0
  61. package/src/tasks/init/template/test/assets/components/create/Pega_DXIL_MyTestText/demo.stories.jsx +51 -0
  62. package/src/tasks/init/template/test/assets/components/create/Pega_DXIL_MyTestText/index.jsx +60 -0
  63. package/src/tasks/init/template/test/assets/components/create/Pega_DXIL_MyTestText/mock.stories.js +13 -0
  64. package/src/tasks/init/template/test/assets/components/create/Pega_DXIL_MyTestText/styles.js +7 -0
  65. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyBoolean/Boolean.js +38 -0
  66. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyBoolean/boolean-format.js +26 -0
  67. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyBoolean/config.json +145 -0
  68. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyBoolean/demo.stories.jsx +61 -0
  69. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyBoolean/event-utils.js +18 -0
  70. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyBoolean/index.jsx +170 -0
  71. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyBoolean/mock.stories.js +21 -0
  72. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyBoolean/styles.js +7 -0
  73. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyCaseWidget/OneColumnPage.svg +36 -0
  74. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyCaseWidget/config.json +23 -0
  75. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyCaseWidget/demo.stories.jsx +78 -0
  76. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyCaseWidget/index.jsx +73 -0
  77. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyCaseWidget/mock.stories.js +390 -0
  78. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyCaseWidget/styles.js +7 -0
  79. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyCurrency/config.json +291 -0
  80. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyCurrency/demo.stories.jsx +53 -0
  81. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyCurrency/event-utils.js +18 -0
  82. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyCurrency/index.jsx +296 -0
  83. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyCurrency/mock.stories.js +23 -0
  84. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyCurrency/styles.js +7 -0
  85. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyCurrency/suggestions-handler.js +10 -0
  86. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDate/DateFormatter.js +61 -0
  87. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDate/FormattedText.jsx +41 -0
  88. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDate/config.json +195 -0
  89. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDate/date.js +439 -0
  90. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDate/demo.stories.jsx +73 -0
  91. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDate/index.jsx +256 -0
  92. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDate/mock.stories.js +23 -0
  93. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDate/styles.js +7 -0
  94. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDate/suggestions-handler.js +10 -0
  95. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDateTime/config.json +256 -0
  96. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDateTime/date-time.js +92 -0
  97. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDateTime/date-utils.js +288 -0
  98. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDateTime/date.js +331 -0
  99. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDateTime/demo.stories.jsx +73 -0
  100. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDateTime/index.jsx +254 -0
  101. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDateTime/mock.stories.js +23 -0
  102. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDateTime/styles.js +7 -0
  103. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDateTime/suggestions-handler.js +10 -0
  104. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDecimal/config.json +278 -0
  105. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDecimal/demo.stories.jsx +49 -0
  106. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDecimal/event-utils.js +18 -0
  107. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDecimal/index.jsx +270 -0
  108. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDecimal/mock.stories.js +21 -0
  109. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDecimal/styles.js +7 -0
  110. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDecimal/suggestions-handler.js +10 -0
  111. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDetails/OneColumnDetails.svg +22 -0
  112. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDetails/StatusWork.jsx +26 -0
  113. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDetails/config.json +35 -0
  114. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDetails/demo.stories.jsx +132 -0
  115. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDetails/index.jsx +83 -0
  116. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDetails/mock.stories.js +189 -0
  117. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDetails/styles.js +7 -0
  118. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDetails/utils.js +152 -0
  119. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyEmail/config.json +111 -0
  120. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyEmail/demo.stories.jsx +48 -0
  121. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyEmail/event-utils.js +18 -0
  122. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyEmail/index.jsx +231 -0
  123. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyEmail/mock.stories.js +22 -0
  124. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyEmail/styles.js +7 -0
  125. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyEmail/suggestions-handler.js +10 -0
  126. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyForm/DefaultForm.svg +29 -0
  127. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyForm/config.json +45 -0
  128. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyForm/demo.stories.jsx +166 -0
  129. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyForm/index.jsx +42 -0
  130. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyForm/mock.stories.js +137 -0
  131. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyForm/styles.js +7 -0
  132. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyInteger/config.json +344 -0
  133. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyInteger/demo.stories.jsx +49 -0
  134. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyInteger/event-utils.js +18 -0
  135. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyInteger/index.jsx +333 -0
  136. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyInteger/mock.stories.js +21 -0
  137. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyInteger/styles.js +7 -0
  138. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyInteger/suggestions-handler.js +10 -0
  139. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPage/GetNextWork.jsx +35 -0
  140. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPage/OneColumnPage.svg +36 -0
  141. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPage/config.json +32 -0
  142. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPage/demo.stories.jsx +102 -0
  143. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPage/index.jsx +70 -0
  144. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPage/localizations.json +4 -0
  145. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPage/mock.stories.js +94 -0
  146. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPage/styles.js +7 -0
  147. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPage/utils.js +229 -0
  148. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPageCaseWidget/Avatar.jsx +75 -0
  149. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPageCaseWidget/OneColumnPage.svg +36 -0
  150. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPageCaseWidget/Operator.jsx +237 -0
  151. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPageCaseWidget/config.json +66 -0
  152. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPageCaseWidget/demo.stories.jsx +68 -0
  153. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPageCaseWidget/index.jsx +108 -0
  154. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPageCaseWidget/mock.stories.js +51 -0
  155. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPageCaseWidget/styles.js +7 -0
  156. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPageWidget/OneColumnPage.svg +36 -0
  157. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPageWidget/config.json +59 -0
  158. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPageWidget/demo.stories.jsx +30 -0
  159. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPageWidget/index.jsx +48 -0
  160. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPageWidget/mock.stories.js +23 -0
  161. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPageWidget/styles.js +7 -0
  162. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyParagraph/config.json +111 -0
  163. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyParagraph/demo.stories.jsx +48 -0
  164. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyParagraph/event-utils.js +18 -0
  165. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyParagraph/index.jsx +231 -0
  166. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyParagraph/mock.stories.js +20 -0
  167. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyParagraph/styles.js +7 -0
  168. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyParagraph/suggestions-handler.js +10 -0
  169. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPercentage/config.json +93 -0
  170. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPercentage/demo.stories.jsx +49 -0
  171. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPercentage/event-utils.js +18 -0
  172. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPercentage/index.jsx +275 -0
  173. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPercentage/mock.stories.js +21 -0
  174. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPercentage/styles.js +7 -0
  175. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPercentage/suggestions-handler.js +10 -0
  176. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPhone/config.json +123 -0
  177. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPhone/demo.stories.jsx +46 -0
  178. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPhone/event-utils.js +18 -0
  179. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPhone/index.jsx +266 -0
  180. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPhone/mock.stories.js +37 -0
  181. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPhone/styles.js +7 -0
  182. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPhone/suggestions-handler.js +10 -0
  183. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPicklist/config.json +114 -0
  184. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPicklist/demo.stories.jsx +78 -0
  185. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPicklist/event-utils.js +18 -0
  186. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPicklist/index.jsx +351 -0
  187. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPicklist/mock.stories.js +67 -0
  188. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPicklist/styles.js +7 -0
  189. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPicklist/suggestions-handler.js +10 -0
  190. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyText/config.json +55 -0
  191. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyText/demo.stories.jsx +51 -0
  192. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyText/index.jsx +60 -0
  193. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyText/mock.stories.js +13 -0
  194. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyText/styles.js +7 -0
  195. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTextInput/StatusWork.jsx +26 -0
  196. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTextInput/config.json +111 -0
  197. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTextInput/demo.stories.jsx +48 -0
  198. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTextInput/event-utils.js +18 -0
  199. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTextInput/index.jsx +239 -0
  200. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTextInput/mock.stories.js +21 -0
  201. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTextInput/styles.js +7 -0
  202. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTextInput/suggestions-handler.js +10 -0
  203. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTimeOfDay/config.json +185 -0
  204. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTimeOfDay/demo.stories.jsx +57 -0
  205. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTimeOfDay/index.jsx +213 -0
  206. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTimeOfDay/mock.stories.js +20 -0
  207. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTimeOfDay/styles.js +7 -0
  208. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTimeOfDay/suggestions-handler.js +10 -0
  209. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTimeOfDay/time-of-day.js +288 -0
  210. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTwoColumnDetails/StatusWork.jsx +26 -0
  211. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTwoColumnDetails/TwoColumnDetails.svg +28 -0
  212. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTwoColumnDetails/config.json +42 -0
  213. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTwoColumnDetails/demo.stories.jsx +136 -0
  214. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTwoColumnDetails/index.jsx +83 -0
  215. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTwoColumnDetails/mock.stories.js +230 -0
  216. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTwoColumnDetails/styles.js +7 -0
  217. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTwoColumnDetails/utils.js +155 -0
  218. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTwoColumnForm/TwoColumn.svg +38 -0
  219. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTwoColumnForm/config.json +27 -0
  220. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTwoColumnForm/demo.stories.jsx +175 -0
  221. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTwoColumnForm/index.jsx +45 -0
  222. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTwoColumnForm/mock.stories.js +143 -0
  223. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTwoColumnForm/styles.js +7 -0
  224. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyURL/config.json +237 -0
  225. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyURL/demo.stories.jsx +46 -0
  226. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyURL/event-utils.js +18 -0
  227. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyURL/index.jsx +232 -0
  228. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyURL/mock.stories.js +22 -0
  229. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyURL/styles.js +7 -0
  230. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyURL/suggestions-handler.js +10 -0
  231. package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyURL/text-url.jsx +173 -0
  232. package/src/tasks/init/template/test/functionTest/localCreateAllListDeleteAll.test.js +157 -0
  233. package/src/tasks/init/template/test/functionTest/localCreateBuildAllDeleteAll.test.js +148 -0
  234. package/src/tasks/init/template/test/functionTest/localCreateBuildDelete.test.js +84 -0
  235. package/src/tasks/init/template/test/functionTest/localCreateListDelete.test.js +108 -0
  236. package/src/tasks/init/template/test/functionTest/localCreatePublishAllDeleteAll.test.js +148 -0
  237. package/src/tasks/init/template/test/functionTest/localCreatePublishDelete.test.js +84 -0
  238. package/src/tasks/init/template/test/functionTest/localCreateRenameDelete.test.js +84 -0
  239. package/src/tasks/init/template/test/functionTest/localPromoteRevertWP.test.js +59 -0
  240. package/src/tasks/list/helper.js +115 -14
  241. package/src/tasks/promote-webpack/index.js +126 -0
  242. package/src/tasks/promote-webpack/webpack.config.js +376 -0
  243. package/src/tasks/publish/helper.js +116 -61
  244. package/src/tasks/publish/index.js +34 -8
  245. package/src/tasks/publish-all/helper.js +115 -63
  246. package/src/tasks/publish-all/index.js +51 -30
  247. package/src/tasks/rename/index.js +127 -97
  248. package/src/tasks/revert-webpack/index.js +71 -0
  249. package/src/util.js +159 -320
  250. package/test/unitTest/util.test.js +544 -0
  251. package/src/tasks/generate-ai/aiPrompt.txt.mustache +0 -23
  252. package/src/tasks/generate-ai/aiPromptDavinci.txt.mustache +0 -14
  253. package/src/tasks/generate-ai/helper.js +0 -390
  254. package/src/tasks/generate-ai/index.js +0 -34
@@ -109,7 +109,8 @@ const validateCompile = async (
109
109
  type,
110
110
  subtype,
111
111
  description,
112
- allowedApplications
112
+ allowedApplications,
113
+ organization
113
114
  },
114
115
  options
115
116
  ) => {
@@ -127,7 +128,11 @@ const validateCompile = async (
127
128
  const templateDir = `./templates/${framework}/${type}/${sSubType}`;
128
129
  const templateDirectory = fileURLToPath(new URL(templateDir, import.meta.url));
129
130
 
130
- const { organization } = JSON.parse(fs.readFileSync(path.resolve('package.json'), 'utf8'));
131
+ if (organization == null) {
132
+ ({ organization } = JSON.parse(fs.readFileSync(path.resolve('package.json'), 'utf8')));
133
+ }
134
+
135
+
131
136
 
132
137
  const componentKey = `${organization}_${library}_${componentName}`;
133
138
  const targetDirectory = await getComponentDirectoryPath(componentKey);
@@ -162,15 +167,18 @@ const validateCompile = async (
162
167
  export default async options => {
163
168
  showVersion();
164
169
 
165
- if (options.params[9]) {
170
+ if (options.params.length >= 12) {
166
171
 
167
172
  const type = options.params[3];
168
173
  const subtype = options.params[4];
169
174
  const componentName = options.params[5];
170
175
  const componentLabel = options.params[6];
171
- const library = options.params[7];
172
- const version = options.params[9];
173
- const description = options.params[9];
176
+ const version = options.params[7];
177
+ const library = options.params[8];
178
+ const allowedApplications = options.params[9];
179
+ const description = options.params[10];
180
+ const organization = options.params[11];
181
+ const framework = "Constellation";
174
182
 
175
183
  await validateCompile(
176
184
  {
@@ -181,7 +189,9 @@ export default async options => {
181
189
  framework,
182
190
  type,
183
191
  subtype,
184
- description
192
+ description,
193
+ allowedApplications,
194
+ organization
185
195
  },
186
196
  options
187
197
  );
@@ -7,7 +7,6 @@
7
7
  "library": "{{LIBRARY}}",
8
8
  "allowedApplications": {{{ALLOWEDAPPS}}},
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
- "compName" : "{{COMPONENT_CLASS_NAME}}",
11
10
  "type": "{{TYPE}}",
12
11
  "subtype": {{{SUB_TYPE}}},
13
12
  "icon": "images/pz-checkbox-active.svg",
@@ -1,13 +1,13 @@
1
1
  import dayjs from 'dayjs';
2
- import relativeTime from 'dayjs/plugin/relativeTime';
3
- import localizedFormat from 'dayjs/plugin/localizedFormat';
4
- import utc from 'dayjs/plugin/utc';
5
- import tzone from 'dayjs/plugin/timezone';
2
+ import relativeTime from 'dayjs/plugin/relativeTime.js';
3
+ import localizedFormat from 'dayjs/plugin/localizedFormat.js';
4
+ import utc from 'dayjs/plugin/utc.js';
5
+ import timezone from 'dayjs/plugin/timezone.js';
6
6
 
7
7
  dayjs.extend(relativeTime);
8
8
  dayjs.extend(localizedFormat);
9
9
  dayjs.extend(utc);
10
- dayjs.extend(tzone);
10
+ dayjs.extend(timezone);
11
11
 
12
12
  const types = ['fromNow', 'customFormat'];
13
13
 
@@ -16,12 +16,12 @@ const types = ['fromNow', 'customFormat'];
16
16
  // value should be in ISO 8601 format.
17
17
  function DateFormatter(
18
18
  value,
19
- { type = types[1], format = "DD/MM/YYYY", timezone } = {}
19
+ { type = types[1], format = "DD/MM/YYYY", tzone } = {}
20
20
  ) {
21
21
  if (!value) return value;
22
22
  switch (type) {
23
23
  case types[1]:
24
- if (timezone) return dayjs(value).tz(timezone).format(format);
24
+ if (tzone) return dayjs(value).tz(tzone).format(format);
25
25
  return dayjs(value).format(format);
26
26
  case types[0]:
27
27
  return dayjs(value).from(dayjs());
@@ -7,7 +7,6 @@
7
7
  "library": "{{LIBRARY}}",
8
8
  "allowedApplications": {{{ALLOWEDAPPS}}},
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
- "compName" : "{{COMPONENT_CLASS_NAME}}",
11
10
  "type": "{{TYPE}}",
12
11
  "subtype": {{{SUB_TYPE}}},
13
12
  "icon": "images/pz-date-time-active.svg",
@@ -1,16 +1,16 @@
1
1
  /* eslint-disable no-undef */
2
2
  import dayjs from 'dayjs';
3
- import DateFormatter from './DateFormatter';
3
+ import DateFormatter from './DateFormatter.js';
4
4
 
5
- const relativeTime = require('dayjs/plugin/relativeTime');
6
- const utc = require('dayjs/plugin/utc');
7
- const localizedFormat = require('dayjs/plugin/localizedFormat');
8
- const tzone = require('dayjs/plugin/timezone');
5
+ import relativeTime from 'dayjs/plugin/relativeTime.js';
6
+ import localizedFormat from 'dayjs/plugin/localizedFormat.js';
7
+ import utc from 'dayjs/plugin/utc.js';
8
+ import timezone from 'dayjs/plugin/timezone.js';
9
9
 
10
10
  dayjs.extend(relativeTime);
11
11
  dayjs.extend(localizedFormat);
12
12
  dayjs.extend(utc);
13
- dayjs.extend(tzone);
13
+ dayjs.extend(timezone);
14
14
 
15
15
  function isIsoDate(str) {
16
16
  if (!/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/.test(str)) return false;
@@ -372,8 +372,8 @@ export const getDateTimeOptions = (withSeconds, is12h = false) => {
372
372
  };
373
373
  };
374
374
 
375
- export function getCurrentTimezone(timezone) {
376
- if (timezone) return timezone;
375
+ export function getCurrentTimezone(tzone) {
376
+ if (tzone) return tzone;
377
377
  return PCore?.getLocaleUtils?.().getTimeZoneInUse?.();
378
378
  }
379
379
 
@@ -7,7 +7,6 @@
7
7
  "library": "{{LIBRARY}}",
8
8
  "allowedApplications": {{{ALLOWEDAPPS}}},
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
- "compName" : "{{COMPONENT_CLASS_NAME}}",
11
10
  "type": "{{TYPE}}",
12
11
  "subtype": {{{SUB_TYPE}}},
13
12
  "icon": "images/pz-text-input-active.svg",
@@ -1,25 +1,25 @@
1
1
  import dayjs from "dayjs";
2
- import relativeTime from "dayjs/plugin/relativeTime";
3
- import localizedFormat from "dayjs/plugin/localizedFormat";
4
- import utc from "dayjs/plugin/utc";
5
- import tzone from "dayjs/plugin/timezone";
2
+ import relativeTime from 'dayjs/plugin/relativeTime.js';
3
+ import localizedFormat from 'dayjs/plugin/localizedFormat.js';
4
+ import utc from 'dayjs/plugin/utc.js';
5
+ import timezone from 'dayjs/plugin/timezone.js';
6
6
 
7
7
  dayjs.extend(relativeTime);
8
8
  dayjs.extend(localizedFormat);
9
9
  dayjs.extend(utc);
10
- dayjs.extend(tzone);
10
+ dayjs.extend(timezone);
11
11
 
12
12
  const types = ["fromNow", "customFormat"];
13
13
 
14
14
  // value should be in ISO 8601 format.
15
15
  function DateFormatter(
16
16
  value,
17
- { type = types[1], format = "DD/MM/YYYY", timezone, fieldType } = {}
17
+ { type = types[1], format = "DD/MM/YYYY", tzone, fieldType } = {}
18
18
  ) {
19
19
  if (!value) return value;
20
20
  switch (type) {
21
21
  case types[1]:
22
- if (timezone && fieldType !== 'Date') return dayjs(value).tz(timezone).format(format); // Date only value should be formatted without timezone
22
+ if (tzone && fieldType !== 'Date') return dayjs(value).tz(tzone).format(format); // Date only value should be formatted without timezone
23
23
  return dayjs(value).format(format);
24
24
  case types[0]:
25
25
  return dayjs(value).from(dayjs());
@@ -74,9 +74,9 @@ export default {
74
74
  })
75
75
  : value;
76
76
  },
77
- convertFromTimezone: (value, timezone) =>
78
- value && timezone
79
- ? dayjs.tz(value, timezone).utc().format("YYYY-MM-DDTHH:mm:ss[Z]")
77
+ convertFromTimezone: (value, tzone) =>
78
+ value && tzone
79
+ ? dayjs.tz(value, tzone).utc().format("YYYY-MM-DDTHH:mm:ss[Z]")
80
80
  : value,
81
81
  Date: (value, options) =>
82
82
  DateFormatter(value, { type: "customFormat", ...options }),
@@ -1,13 +1,14 @@
1
1
  /* eslint-disable no-undef */
2
2
  import dayjs from "dayjs";
3
-
4
- const relativeTime = require("dayjs/plugin/relativeTime");
3
+ import relativeTime from 'dayjs/plugin/relativeTime.js';
4
+ import localizedFormat from 'dayjs/plugin/localizedFormat.js';
5
+ import utc from 'dayjs/plugin/utc.js';
6
+ import timezone from 'dayjs/plugin/timezone.js';
5
7
 
6
8
  dayjs.extend(relativeTime);
7
-
8
- const utc = require("dayjs/plugin/utc");
9
-
9
+ dayjs.extend(localizedFormat);
10
10
  dayjs.extend(utc);
11
+ dayjs.extend(timezone);
11
12
 
12
13
  /**
13
14
  * Return relative time in fromNow for the given datetime
@@ -1,11 +1,14 @@
1
1
  /* eslint-disable no-undef */
2
2
  import dayjs from 'dayjs';
3
-
4
- const relativeTime = require('dayjs/plugin/relativeTime');
5
- const utc = require('dayjs/plugin/utc');
3
+ import relativeTime from 'dayjs/plugin/relativeTime.js';
4
+ import localizedFormat from 'dayjs/plugin/localizedFormat.js';
5
+ import utc from 'dayjs/plugin/utc.js';
6
+ import timezone from 'dayjs/plugin/timezone.js';
6
7
 
7
8
  dayjs.extend(relativeTime);
9
+ dayjs.extend(localizedFormat);
8
10
  dayjs.extend(utc);
11
+ dayjs.extend(timezone);
9
12
 
10
13
  export const datetimedisplayformatter = (formatter) => {
11
14
  const objectvalues = {};
@@ -7,7 +7,6 @@
7
7
  "library": "{{LIBRARY}}",
8
8
  "allowedApplications": {{{ALLOWEDAPPS}}},
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
- "compName" : "{{COMPONENT_CLASS_NAME}}",
11
10
  "type": "{{TYPE}}",
12
11
  "subtype": {{{SUB_TYPE}}},
13
12
  "icon": "images/pz-decimal-active.svg",
@@ -7,7 +7,6 @@
7
7
  "library": "{{LIBRARY}}",
8
8
  "allowedApplications": {{{ALLOWEDAPPS}}},
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
- "compName" : "{{COMPONENT_CLASS_NAME}}",
11
10
  "type": "{{TYPE}}",
12
11
  "subtype": {{{SUB_TYPE}}},
13
12
  "icon": "images/pz-currency-active.svg",
@@ -7,7 +7,6 @@
7
7
  "library": "{{LIBRARY}}",
8
8
  "allowedApplications": {{{ALLOWEDAPPS}}},
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
- "compName" : "{{COMPONENT_CLASS_NAME}}",
11
10
  "type": "{{TYPE}}",
12
11
  "subtype": {{{SUB_TYPE}}},
13
12
  "icon": "images/pz-text-input-active.svg",
@@ -7,7 +7,6 @@
7
7
  "library": "{{LIBRARY}}",
8
8
  "allowedApplications": {{{ALLOWEDAPPS}}},
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
- "compName" : "{{COMPONENT_CLASS_NAME}}",
11
10
  "type": "{{TYPE}}",
12
11
  "subtype": {{{SUB_TYPE}}},
13
12
  {{#IS_TEMPLATE}}
@@ -7,7 +7,6 @@
7
7
  "library": "{{LIBRARY}}",
8
8
  "allowedApplications": {{{ALLOWEDAPPS}}},
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
- "compName" : "{{COMPONENT_CLASS_NAME}}",
11
10
  "type": "{{TYPE}}",
12
11
  "subtype": {{{SUB_TYPE}}},
13
12
  "icon": "images/pz-dropdown-active.svg",
@@ -7,7 +7,6 @@
7
7
  "library": "{{LIBRARY}}",
8
8
  "allowedApplications": {{{ALLOWEDAPPS}}},
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
- "compName" : "{{COMPONENT_CLASS_NAME}}",
11
10
  "type": "{{TYPE}}",
12
11
  "subtype": {{{SUB_TYPE}}},
13
12
  {{#IS_TEMPLATE}}
@@ -7,7 +7,6 @@
7
7
  "library": "{{LIBRARY}}",
8
8
  "allowedApplications": {{{ALLOWEDAPPS}}},
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
- "compName" : "{{COMPONENT_CLASS_NAME}}",
11
10
  "type": "{{TYPE}}",
12
11
  "subtype": {{{SUB_TYPE}}},
13
12
  "icon": "images/pz-email-active.svg",
@@ -7,7 +7,6 @@
7
7
  "library": "{{LIBRARY}}",
8
8
  "allowedApplications": {{{ALLOWEDAPPS}}},
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
- "compName" : "{{COMPONENT_CLASS_NAME}}",
11
10
  "type": "{{TYPE}}",
12
11
  "subtype": "Text",
13
12
  "icon": "images/pz-text-input-active.svg",
@@ -7,7 +7,6 @@
7
7
  "library": "{{LIBRARY}}",
8
8
  "allowedApplications": {{{ALLOWEDAPPS}}},
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
- "compName" : "{{COMPONENT_CLASS_NAME}}",
11
10
  "type": "{{TYPE}}",
12
11
  "subtype": {{{SUB_TYPE}}},
13
12
  "icon": "images/pz-text-area-active.svg",
@@ -7,7 +7,6 @@
7
7
  "library": "{{LIBRARY}}",
8
8
  "allowedApplications": {{{ALLOWEDAPPS}}},
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
- "compName" : "{{COMPONENT_CLASS_NAME}}",
11
10
  "type": "{{TYPE}}",
12
11
  "subtype": {{{SUB_TYPE}}},
13
12
  "icon": "images/pz-phone-active.svg",
@@ -14,7 +14,6 @@ import handleEvent from "./event-utils";
14
14
  import { suggestionsHandler } from './suggestions-handler';
15
15
 
16
16
  import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
17
- import { } from "@pega/cosmos-react-core";
18
17
 
19
18
  export const formatExists = (formatterVal) => {
20
19
  const formatterValues = [
@@ -7,7 +7,6 @@
7
7
  "library": "{{LIBRARY}}",
8
8
  "allowedApplications": {{{ALLOWEDAPPS}}},
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
- "compName" : "{{COMPONENT_CLASS_NAME}}",
11
10
  "type": "{{TYPE}}",
12
11
  "subtype": {{{SUB_TYPE}}},
13
12
  "icon": "images/pz-url-active.svg",
@@ -7,7 +7,6 @@
7
7
  "library": "{{LIBRARY}}",
8
8
  "allowedApplications": {{{ALLOWEDAPPS}}},
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
- "compName" : "{{COMPONENT_CLASS_NAME}}",
11
10
  "type": "{{TYPE}}",
12
11
  "subtype": {{{SUB_TYPE}}},
13
12
  "icon": "images/pz-date-time-active.svg",
@@ -1,13 +1,14 @@
1
1
  /* eslint-disable no-undef */
2
2
  import dayjs from "dayjs";
3
-
4
- const relativeTime = require("dayjs/plugin/relativeTime");
3
+ import relativeTime from 'dayjs/plugin/relativeTime.js';
4
+ import localizedFormat from 'dayjs/plugin/localizedFormat.js';
5
+ import utc from 'dayjs/plugin/utc.js';
6
+ import timezone from 'dayjs/plugin/timezone.js';
5
7
 
6
8
  dayjs.extend(relativeTime);
7
-
8
- const utc = require("dayjs/plugin/utc");
9
-
9
+ dayjs.extend(localizedFormat);
10
10
  dayjs.extend(utc);
11
+ dayjs.extend(timezone);
11
12
 
12
13
  /**
13
14
  * Return relative time in fromNow for the given datetime
@@ -7,7 +7,6 @@
7
7
  "library": "{{LIBRARY}}",
8
8
  "allowedApplications": {{{ALLOWEDAPPS}}},
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
- "compName" : "{{COMPONENT_CLASS_NAME}}",
11
10
  "type": "{{TYPE}}",
12
11
  "subtype": {{{SUB_TYPE}}},
13
12
  "icon": "OneColumnDetails.svg",
@@ -7,7 +7,6 @@
7
7
  "library": "{{LIBRARY}}",
8
8
  "allowedApplications": {{{ALLOWEDAPPS}}},
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
- "compName" : "{{COMPONENT_CLASS_NAME}}",
11
10
  "type": "{{TYPE}}",
12
11
  "subtype": {{{SUB_TYPE}}},
13
12
  "icon": "TwoColumnDetails.svg",
@@ -7,7 +7,6 @@
7
7
  "library": "{{LIBRARY}}",
8
8
  "allowedApplications": {{{ALLOWEDAPPS}}},
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
- "compName" : "{{COMPONENT_CLASS_NAME}}",
11
10
  "type": "{{TYPE}}",
12
11
  "subtype": {{{SUB_TYPE}}},
13
12
  "icon": "DefaultForm.svg",
@@ -7,7 +7,6 @@
7
7
  "library": "{{LIBRARY}}",
8
8
  "allowedApplications": {{{ALLOWEDAPPS}}},
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
- "compName" : "{{COMPONENT_CLASS_NAME}}",
11
10
  "type": "{{TYPE}}",
12
11
  "subtype": {{{SUB_TYPE}}},
13
12
  "icon": "TwoColumn.svg",
@@ -7,7 +7,6 @@
7
7
  "library": "{{LIBRARY}}",
8
8
  "allowedApplications": {{{ALLOWEDAPPS}}},
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
- "compName" : "{{COMPONENT_CLASS_NAME}}",
11
10
  "type": "{{TYPE}}",
12
11
  "subtype": {{{SUB_TYPE}}},
13
12
  "icon": "OneColumnPage.svg",
@@ -7,7 +7,6 @@
7
7
  "library": "{{LIBRARY}}",
8
8
  "allowedApplications": {{{ALLOWEDAPPS}}},
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
- "compName" : "{{COMPONENT_CLASS_NAME}}",
11
10
  "type": "{{TYPE}}",
12
11
  "subtype": {{{SUB_TYPE}}},
13
12
  "icon": "OneColumnPage.svg",
@@ -7,7 +7,6 @@
7
7
  "library": "{{LIBRARY}}",
8
8
  "allowedApplications": {{{ALLOWEDAPPS}}},
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
- "compName" : "{{COMPONENT_CLASS_NAME}}",
11
10
  "type": "{{TYPE}}",
12
11
  "subtype": {{{SUB_TYPE}}},
13
12
  "icon": "OneColumnPage.svg",
@@ -7,7 +7,6 @@
7
7
  "library": "{{LIBRARY}}",
8
8
  "allowedApplications": {{{ALLOWEDAPPS}}},
9
9
  "componentKey": "{{COMPONENT_KEY}}",
10
- "compName" : "{{COMPONENT_CLASS_NAME}}",
11
10
  "type": "{{TYPE}}",
12
11
  "subtype": {{{SUB_TYPE}}},
13
12
  "icon": "OneColumnPage.svg",
@@ -331,58 +331,21 @@ export default async options => {
331
331
  const componentData = data[COMPONENTS_PATH];
332
332
 
333
333
  const { library } = componentData;
334
- const { organization } = JSON.parse(fs.readFileSync(path.resolve('package.json'), 'utf8'));
334
+ let { organization } = JSON.parse(fs.readFileSync(path.resolve('package.json'), 'utf8'));
335
335
 
336
336
  let componentDefaults = await getComponentDefaults();
337
337
  componentDefaults.library = library;
338
338
 
339
339
 
340
- const questions = [
341
- {
342
- name: 'prefix',
343
- message: 'Enter prefix label'
344
- },
345
- {
346
- name: 'version',
347
- message: 'Enter component version',
348
- default: componentDefaults.version,
349
- validate: value => {
350
- if (validateSemver(value)) {
351
- return true;
352
- }
353
- return 'Please provide semver compatible version e.g 0.0.1';
354
- }
355
- },
356
- {
357
- name: 'library',
358
- message: 'Enter library name (required)',
359
- default: componentDefaults.library,
360
- validate: value => {
361
- /* value should not be empty
362
- It should not have spaces
363
- It should not start with a number
364
- Only case-insensitive alphanumeric values are allowed
365
- */
366
- if (value && !/^\d/.test(value) && value === sanitize(value)) {
367
- return true;
368
- }
369
- return 'Only alphanumeric values are allowed, starting with alphabets';
370
- }
371
- },
372
- {
373
- name: 'allowedApplications',
374
- message: 'Please enter the application names to be supported (comma-separated). ',
375
- suffix: 'Keep empty for all applications'
376
- }
377
- ];
378
-
379
- await inquirer.prompt(questions).then(async answers => {
380
- const {
381
- prefix,
382
- library,
383
- version,
384
- allowedApplications
385
- } = answers;
340
+ if (options.params.length >= 8) {
341
+ const prefix = options.params[3];
342
+ const version = options.params[4];
343
+ const library = options.params[5];
344
+ const allowedApplications = options.params[6];
345
+
346
+ // overwrite
347
+ organization = options.params[7];
348
+
386
349
  await validateCompileAll(
387
350
  {
388
351
  prefix,
@@ -393,6 +356,67 @@ export default async options => {
393
356
  },
394
357
  options
395
358
  );
396
- });
359
+ }
360
+ else {
361
+ const questions = [
362
+ {
363
+ name: 'prefix',
364
+ message: 'Enter prefix label'
365
+ },
366
+ {
367
+ name: 'version',
368
+ message: 'Enter component version',
369
+ default: componentDefaults.version,
370
+ validate: value => {
371
+ if (validateSemver(value)) {
372
+ return true;
373
+ }
374
+ return 'Please provide semver compatible version e.g 0.0.1';
375
+ }
376
+ },
377
+ {
378
+ name: 'library',
379
+ message: 'Enter library name (required)',
380
+ default: componentDefaults.library,
381
+ validate: value => {
382
+ /* value should not be empty
383
+ It should not have spaces
384
+ It should not start with a number
385
+ Only case-insensitive alphanumeric values are allowed
386
+ */
387
+ if (value && !/^\d/.test(value) && value === sanitize(value)) {
388
+ return true;
389
+ }
390
+ return 'Only alphanumeric values are allowed, starting with alphabets';
391
+ }
392
+ },
393
+ {
394
+ name: 'allowedApplications',
395
+ message: 'Please enter the application names to be supported (comma-separated). ',
396
+ suffix: 'Keep empty for all applications'
397
+ }
398
+ ];
399
+
400
+ await inquirer.prompt(questions).then(async answers => {
401
+ const {
402
+ prefix,
403
+ library,
404
+ version,
405
+ allowedApplications
406
+ } = answers;
407
+ await validateCompileAll(
408
+ {
409
+ prefix,
410
+ library,
411
+ version,
412
+ allowedApplications,
413
+ organization
414
+ },
415
+ options
416
+ );
417
+ });
418
+ }
419
+
420
+
397
421
 
398
422
  };