@pega/dx-component-builder-sdk 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (279) hide show
  1. package/.access_token +1 -0
  2. package/.agilestudio +3 -0
  3. package/.eslintrc.json +18 -0
  4. package/.prettierignore +2 -0
  5. package/.prettierrc.json +1 -0
  6. package/LICENSE +185 -0
  7. package/README.md +199 -0
  8. package/bin/index.js +5 -0
  9. package/cspell.json +26 -0
  10. package/package.json +67 -0
  11. package/src/cli.js +104 -0
  12. package/src/constants.js +134 -0
  13. package/src/tasks/authenticate/helper.js +60 -0
  14. package/src/tasks/authenticate/index.js +81 -0
  15. package/src/tasks/build/helper.js +125 -0
  16. package/src/tasks/build/index.js +52 -0
  17. package/src/tasks/bundle/builder/index.js +218 -0
  18. package/src/tasks/bundle/builder/modules.js +139 -0
  19. package/src/tasks/bundle/builder/paths.js +50 -0
  20. package/src/tasks/bundle/builder/webpack.config.js +336 -0
  21. package/src/tasks/bundle/index.js +65 -0
  22. package/src/tasks/create/index.js +380 -0
  23. package/src/tasks/create/template/config.json.mustache +62 -0
  24. package/src/tasks/create/template/demo.stories.jsx.mustache +44 -0
  25. package/src/tasks/create/template/index.jsx.mustache +55 -0
  26. package/src/tasks/create/template/styles.js.mustache +7 -0
  27. package/src/tasks/create/templates/Constellation/Field/Boolean/Boolean.js.mustache +38 -0
  28. package/src/tasks/create/templates/Constellation/Field/Boolean/boolean-format.js.mustache +26 -0
  29. package/src/tasks/create/templates/Constellation/Field/Boolean/config.json.mustache +145 -0
  30. package/src/tasks/create/templates/Constellation/Field/Boolean/event-utils.js.mustache +18 -0
  31. package/src/tasks/create/templates/Constellation/Field/Boolean/index.jsx.mustache +171 -0
  32. package/src/tasks/create/templates/Constellation/Field/Boolean/styles.js.mustache +7 -0
  33. package/src/tasks/create/templates/Constellation/Field/Date/config.json.mustache +195 -0
  34. package/src/tasks/create/templates/Constellation/Field/Date/date.js.mustache +327 -0
  35. package/src/tasks/create/templates/Constellation/Field/Date/demo.stories.jsx.mustache +44 -0
  36. package/src/tasks/create/templates/Constellation/Field/Date/index.jsx.mustache +254 -0
  37. package/src/tasks/create/templates/Constellation/Field/Date/styles.js.mustache +7 -0
  38. package/src/tasks/create/templates/Constellation/Field/Date/suggestions-handler.js +10 -0
  39. package/src/tasks/create/templates/Constellation/Field/DateTime/config.json.mustache +256 -0
  40. package/src/tasks/create/templates/Constellation/Field/DateTime/date-time.js.mustache +93 -0
  41. package/src/tasks/create/templates/Constellation/Field/DateTime/date-utils.js +286 -0
  42. package/src/tasks/create/templates/Constellation/Field/DateTime/date.js.mustache +327 -0
  43. package/src/tasks/create/templates/Constellation/Field/DateTime/demo.stories.jsx.mustache +44 -0
  44. package/src/tasks/create/templates/Constellation/Field/DateTime/index.jsx.mustache +252 -0
  45. package/src/tasks/create/templates/Constellation/Field/DateTime/styles.js.mustache +7 -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 +44 -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 +272 -0
  51. package/src/tasks/create/templates/Constellation/Field/Decimal/styles.js.mustache +7 -0
  52. package/src/tasks/create/templates/Constellation/Field/Decimal/suggestions-handler.js +10 -0
  53. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/config.json.mustache +291 -0
  54. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/demo.stories.jsx.mustache +44 -0
  55. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/event-utils.js.mustache +18 -0
  56. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/index.jsx.mustache +300 -0
  57. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/styles.js.mustache +7 -0
  58. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/suggestions-handler.js +10 -0
  59. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/config.json.mustache +93 -0
  60. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/demo.stories.jsx.mustache +44 -0
  61. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/event-utils.js.mustache +18 -0
  62. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/index.jsx.mustache +275 -0
  63. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/styles.js.mustache +7 -0
  64. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/suggestions-handler.js +10 -0
  65. package/src/tasks/create/templates/Constellation/Field/Integer/config.json.mustache +347 -0
  66. package/src/tasks/create/templates/Constellation/Field/Integer/demo.stories.jsx.mustache +44 -0
  67. package/src/tasks/create/templates/Constellation/Field/Integer/event-utils.js.mustache +18 -0
  68. package/src/tasks/create/templates/Constellation/Field/Integer/index.jsx.mustache +335 -0
  69. package/src/tasks/create/templates/Constellation/Field/Integer/styles.js.mustache +7 -0
  70. package/src/tasks/create/templates/Constellation/Field/Integer/suggestions-handler.js +10 -0
  71. package/src/tasks/create/templates/Constellation/Field/Picklist/config.json.mustache +114 -0
  72. package/src/tasks/create/templates/Constellation/Field/Picklist/demo.stories.jsx.mustache +44 -0
  73. package/src/tasks/create/templates/Constellation/Field/Picklist/event-utils.js.mustache +18 -0
  74. package/src/tasks/create/templates/Constellation/Field/Picklist/index.jsx.mustache +308 -0
  75. package/src/tasks/create/templates/Constellation/Field/Picklist/picklist.js.mustache +43 -0
  76. package/src/tasks/create/templates/Constellation/Field/Picklist/styles.js.mustache +7 -0
  77. package/src/tasks/create/templates/Constellation/Field/Picklist/suggestions-handler.js +10 -0
  78. package/src/tasks/create/templates/Constellation/Field/Text/config.json.mustache +62 -0
  79. package/src/tasks/create/templates/Constellation/Field/Text/demo.stories.jsx.mustache +44 -0
  80. package/src/tasks/create/templates/Constellation/Field/Text/index.jsx.mustache +60 -0
  81. package/src/tasks/create/templates/Constellation/Field/Text/styles.js.mustache +7 -0
  82. package/src/tasks/create/templates/Constellation/Field/Text-Email/config.json.mustache +111 -0
  83. package/src/tasks/create/templates/Constellation/Field/Text-Email/demo.stories.jsx.mustache +44 -0
  84. package/src/tasks/create/templates/Constellation/Field/Text-Email/event-utils.js.mustache +18 -0
  85. package/src/tasks/create/templates/Constellation/Field/Text-Email/index.jsx.mustache +189 -0
  86. package/src/tasks/create/templates/Constellation/Field/Text-Email/styles.js.mustache +7 -0
  87. package/src/tasks/create/templates/Constellation/Field/Text-Email/suggestions-handler.js +10 -0
  88. package/src/tasks/create/templates/Constellation/Field/Text-Email/text-email.js.mustache +43 -0
  89. package/src/tasks/create/templates/Constellation/Field/Text-Input/StatusWork.js +27 -0
  90. package/src/tasks/create/templates/Constellation/Field/Text-Input/config.json.mustache +111 -0
  91. package/src/tasks/create/templates/Constellation/Field/Text-Input/demo.stories.jsx.mustache +44 -0
  92. package/src/tasks/create/templates/Constellation/Field/Text-Input/event-utils.js.mustache +18 -0
  93. package/src/tasks/create/templates/Constellation/Field/Text-Input/index.jsx.mustache +196 -0
  94. package/src/tasks/create/templates/Constellation/Field/Text-Input/styles.js.mustache +7 -0
  95. package/src/tasks/create/templates/Constellation/Field/Text-Input/suggestions-handler.js +10 -0
  96. package/src/tasks/create/templates/Constellation/Field/Text-Input/text-input.js.mustache +43 -0
  97. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/config.json.mustache +111 -0
  98. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/demo.stories.jsx.mustache +44 -0
  99. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/event-utils.js.mustache +18 -0
  100. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/index.jsx.mustache +189 -0
  101. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/styles.js.mustache +7 -0
  102. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/suggestions-handler.js +10 -0
  103. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/text-paragraph.js.mustache +43 -0
  104. package/src/tasks/create/templates/Constellation/Field/Text-Phone/config.json.mustache +123 -0
  105. package/src/tasks/create/templates/Constellation/Field/Text-Phone/demo.stories.jsx.mustache +44 -0
  106. package/src/tasks/create/templates/Constellation/Field/Text-Phone/event-utils.js.mustache +18 -0
  107. package/src/tasks/create/templates/Constellation/Field/Text-Phone/index.jsx.mustache +223 -0
  108. package/src/tasks/create/templates/Constellation/Field/Text-Phone/styles.js.mustache +7 -0
  109. package/src/tasks/create/templates/Constellation/Field/Text-Phone/suggestions-handler.js +10 -0
  110. package/src/tasks/create/templates/Constellation/Field/Text-Phone/text-phone.js.mustache +43 -0
  111. package/src/tasks/create/templates/Constellation/Field/Text-URL/config.json.mustache +237 -0
  112. package/src/tasks/create/templates/Constellation/Field/Text-URL/demo.stories.jsx.mustache +44 -0
  113. package/src/tasks/create/templates/Constellation/Field/Text-URL/event-utils.js.mustache +18 -0
  114. package/src/tasks/create/templates/Constellation/Field/Text-URL/index.jsx.mustache +232 -0
  115. package/src/tasks/create/templates/Constellation/Field/Text-URL/styles.js.mustache +7 -0
  116. package/src/tasks/create/templates/Constellation/Field/Text-URL/suggestions-handler.js +10 -0
  117. package/src/tasks/create/templates/Constellation/Field/Text-URL/text-url.js.mustache +172 -0
  118. package/src/tasks/create/templates/Constellation/Field/TimeofDay/config.json.mustache +185 -0
  119. package/src/tasks/create/templates/Constellation/Field/TimeofDay/demo.stories.jsx.mustache +44 -0
  120. package/src/tasks/create/templates/Constellation/Field/TimeofDay/index.jsx.mustache +213 -0
  121. package/src/tasks/create/templates/Constellation/Field/TimeofDay/styles.js.mustache +7 -0
  122. package/src/tasks/create/templates/Constellation/Field/TimeofDay/suggestions-handler.js +10 -0
  123. package/src/tasks/create/templates/Constellation/Field/TimeofDay/time-of-day.js.mustache +286 -0
  124. package/src/tasks/create/templates/Constellation/Template/DETAILS/OneColumnDetails.svg +22 -0
  125. package/src/tasks/create/templates/Constellation/Template/DETAILS/config.json.mustache +35 -0
  126. package/src/tasks/create/templates/Constellation/Template/DETAILS/index.jsx.mustache +88 -0
  127. package/src/tasks/create/templates/Constellation/Template/DETAILS/styles.js.mustache +7 -0
  128. package/src/tasks/create/templates/Constellation/Template/DETAILS/utils.js.mustache +155 -0
  129. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/TwoColumnDetails.svg +28 -0
  130. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/config.json.mustache +42 -0
  131. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/index.jsx.mustache +88 -0
  132. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/styles.js.mustache +7 -0
  133. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/utils.js.mustache +155 -0
  134. package/src/tasks/create/templates/Constellation/Template/FORM/DefaultForm.svg +29 -0
  135. package/src/tasks/create/templates/Constellation/Template/FORM/config.json.mustache +45 -0
  136. package/src/tasks/create/templates/Constellation/Template/FORM/index.jsx.mustache +49 -0
  137. package/src/tasks/create/templates/Constellation/Template/FORM/styles.js.mustache +7 -0
  138. package/src/tasks/create/templates/Constellation/Template/FORM-region/TwoColumn.svg +38 -0
  139. package/src/tasks/create/templates/Constellation/Template/FORM-region/config.json.mustache +27 -0
  140. package/src/tasks/create/templates/Constellation/Template/FORM-region/index.jsx.mustache +51 -0
  141. package/src/tasks/create/templates/Constellation/Template/FORM-region/styles.js.mustache +7 -0
  142. package/src/tasks/create/templates/Constellation/Template/PAGE/GetNextWork.js.mustache +29 -0
  143. package/src/tasks/create/templates/Constellation/Template/PAGE/OneColumnPage.svg +36 -0
  144. package/src/tasks/create/templates/Constellation/Template/PAGE/config.json.mustache +32 -0
  145. package/src/tasks/create/templates/Constellation/Template/PAGE/index.jsx.mustache +68 -0
  146. package/src/tasks/create/templates/Constellation/Template/PAGE/localizations.json.mustache +4 -0
  147. package/src/tasks/create/templates/Constellation/Template/PAGE/styles.js.mustache +7 -0
  148. package/src/tasks/create/templates/Constellation/Template/PAGE/utils.js.mustache +226 -0
  149. package/src/tasks/create/templates/Constellation/Widget/CASE/OneColumnPage.svg +36 -0
  150. package/src/tasks/create/templates/Constellation/Widget/CASE/config.json.mustache +23 -0
  151. package/src/tasks/create/templates/Constellation/Widget/CASE/index.jsx.mustache +75 -0
  152. package/src/tasks/create/templates/Constellation/Widget/CASE/styles.js.mustache +7 -0
  153. package/src/tasks/create/templates/Constellation/Widget/PAGE/OneColumnPage.svg +36 -0
  154. package/src/tasks/create/templates/Constellation/Widget/PAGE/config.json.mustache +59 -0
  155. package/src/tasks/create/templates/Constellation/Widget/PAGE/index.jsx.mustache +48 -0
  156. package/src/tasks/create/templates/Constellation/Widget/PAGE/styles.js.mustache +7 -0
  157. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Avatar.js.mustache +73 -0
  158. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/OneColumnPage.svg +36 -0
  159. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Operator.js.mustache +239 -0
  160. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/config.json.mustache +66 -0
  161. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/index.jsx.mustache +110 -0
  162. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/styles.js.mustache +7 -0
  163. package/src/tasks/create/templates/SDK-Angular/Field/__components.md +4 -0
  164. package/src/tasks/create/templates/SDK-Angular/Template/__components.md +4 -0
  165. package/src/tasks/create/templates/SDK-Angular/Widget/__components.md +4 -0
  166. package/src/tasks/create/templates/SDK-React/Field/Boolean/config.json.mustache +73 -0
  167. package/src/tasks/create/templates/SDK-React/Field/Boolean/demo.stories.jsx.mustache +44 -0
  168. package/src/tasks/create/templates/SDK-React/Field/Boolean/index.tsx.mustache +109 -0
  169. package/src/tasks/create/templates/SDK-React/Field/Boolean/styles.js.mustache +7 -0
  170. package/src/tasks/create/templates/SDK-React/Field/Date/config.json.mustache +133 -0
  171. package/src/tasks/create/templates/SDK-React/Field/Date/demo.stories.jsx.mustache +44 -0
  172. package/src/tasks/create/templates/SDK-React/Field/Date/index.tsx.mustache +122 -0
  173. package/src/tasks/create/templates/SDK-React/Field/Date/styles.js.mustache +7 -0
  174. package/src/tasks/create/templates/SDK-React/Field/DateTime/config.json.mustache +190 -0
  175. package/src/tasks/create/templates/SDK-React/Field/DateTime/demo.stories.jsx.mustache +44 -0
  176. package/src/tasks/create/templates/SDK-React/Field/DateTime/index.tsx.mustache +112 -0
  177. package/src/tasks/create/templates/SDK-React/Field/DateTime/styles.js.mustache +7 -0
  178. package/src/tasks/create/templates/SDK-React/Field/Decimal/config.json.mustache +80 -0
  179. package/src/tasks/create/templates/SDK-React/Field/Decimal/demo.stories.jsx.mustache +44 -0
  180. package/src/tasks/create/templates/SDK-React/Field/Decimal/index.tsx.mustache +105 -0
  181. package/src/tasks/create/templates/SDK-React/Field/Decimal/styles.js.mustache +7 -0
  182. package/src/tasks/create/templates/SDK-React/Field/Decimal-Currency/config.json.mustache +111 -0
  183. package/src/tasks/create/templates/SDK-React/Field/Decimal-Currency/demo.stories.jsx.mustache +44 -0
  184. package/src/tasks/create/templates/SDK-React/Field/Decimal-Currency/index.tsx.mustache +131 -0
  185. package/src/tasks/create/templates/SDK-React/Field/Decimal-Currency/styles.js.mustache +7 -0
  186. package/src/tasks/create/templates/SDK-React/Field/Decimal-Percentage/config.json.mustache +80 -0
  187. package/src/tasks/create/templates/SDK-React/Field/Decimal-Percentage/demo.stories.jsx.mustache +44 -0
  188. package/src/tasks/create/templates/SDK-React/Field/Decimal-Percentage/index.tsx.mustache +128 -0
  189. package/src/tasks/create/templates/SDK-React/Field/Decimal-Percentage/styles.js.mustache +7 -0
  190. package/src/tasks/create/templates/SDK-React/Field/Integer/config.json.mustache +74 -0
  191. package/src/tasks/create/templates/SDK-React/Field/Integer/demo.stories.jsx.mustache +44 -0
  192. package/src/tasks/create/templates/SDK-React/Field/Integer/index.tsx.mustache +124 -0
  193. package/src/tasks/create/templates/SDK-React/Field/Integer/styles.js.mustache +7 -0
  194. package/src/tasks/create/templates/SDK-React/Field/Picklist/config.json.mustache +72 -0
  195. package/src/tasks/create/templates/SDK-React/Field/Picklist/demo.stories.jsx.mustache +44 -0
  196. package/src/tasks/create/templates/SDK-React/Field/Picklist/index.tsx.mustache +141 -0
  197. package/src/tasks/create/templates/SDK-React/Field/Picklist/styles.js.mustache +7 -0
  198. package/src/tasks/create/templates/SDK-React/Field/Text/config.json.mustache +69 -0
  199. package/src/tasks/create/templates/SDK-React/Field/Text/demo.stories.jsx.mustache +44 -0
  200. package/src/tasks/create/templates/SDK-React/Field/Text/index.tsx.mustache +119 -0
  201. package/src/tasks/create/templates/SDK-React/Field/Text/styles.js.mustache +7 -0
  202. package/src/tasks/create/templates/SDK-React/Field/Text-Email/config.json.mustache +69 -0
  203. package/src/tasks/create/templates/SDK-React/Field/Text-Email/demo.stories.jsx.mustache +44 -0
  204. package/src/tasks/create/templates/SDK-React/Field/Text-Email/index.tsx.mustache +121 -0
  205. package/src/tasks/create/templates/SDK-React/Field/Text-Email/styles.js.mustache +7 -0
  206. package/src/tasks/create/templates/SDK-React/Field/Text-Input/config.json.mustache +69 -0
  207. package/src/tasks/create/templates/SDK-React/Field/Text-Input/demo.stories.jsx.mustache +44 -0
  208. package/src/tasks/create/templates/SDK-React/Field/Text-Input/index.tsx.mustache +119 -0
  209. package/src/tasks/create/templates/SDK-React/Field/Text-Input/styles.js.mustache +7 -0
  210. package/src/tasks/create/templates/SDK-React/Field/Text-Paragraph/config.json.mustache +69 -0
  211. package/src/tasks/create/templates/SDK-React/Field/Text-Paragraph/demo.stories.jsx.mustache +44 -0
  212. package/src/tasks/create/templates/SDK-React/Field/Text-Paragraph/index.tsx.mustache +123 -0
  213. package/src/tasks/create/templates/SDK-React/Field/Text-Paragraph/styles.js.mustache +7 -0
  214. package/src/tasks/create/templates/SDK-React/Field/Text-Phone/config.json.mustache +81 -0
  215. package/src/tasks/create/templates/SDK-React/Field/Text-Phone/demo.stories.jsx.mustache +44 -0
  216. package/src/tasks/create/templates/SDK-React/Field/Text-Phone/index.tsx.mustache +147 -0
  217. package/src/tasks/create/templates/SDK-React/Field/Text-Phone/styles.js.mustache +7 -0
  218. package/src/tasks/create/templates/SDK-React/Field/Text-URL/config.json.mustache +111 -0
  219. package/src/tasks/create/templates/SDK-React/Field/Text-URL/demo.stories.jsx.mustache +44 -0
  220. package/src/tasks/create/templates/SDK-React/Field/Text-URL/index.tsx.mustache +98 -0
  221. package/src/tasks/create/templates/SDK-React/Field/Text-URL/styles.js.mustache +7 -0
  222. package/src/tasks/create/templates/SDK-React/Field/TimeofDay/config.json.mustache +121 -0
  223. package/src/tasks/create/templates/SDK-React/Field/TimeofDay/demo.stories.jsx.mustache +44 -0
  224. package/src/tasks/create/templates/SDK-React/Field/TimeofDay/index.tsx.mustache +120 -0
  225. package/src/tasks/create/templates/SDK-React/Field/TimeofDay/styles.js.mustache +7 -0
  226. package/src/tasks/create/templates/SDK-React/Template/DETAILS/DefaultForm.svg +29 -0
  227. package/src/tasks/create/templates/SDK-React/Template/DETAILS/config.json.mustache +21 -0
  228. package/src/tasks/create/templates/SDK-React/Template/DETAILS/index.tsx.mustache +45 -0
  229. package/src/tasks/create/templates/SDK-React/Template/DETAILS/styles.js.mustache +7 -0
  230. package/src/tasks/create/templates/SDK-React/Template/DETAILS-region/TwoColumnDetails.svg +28 -0
  231. package/src/tasks/create/templates/SDK-React/Template/DETAILS-region/config.json.mustache +27 -0
  232. package/src/tasks/create/templates/SDK-React/Template/DETAILS-region/index.tsx.mustache +53 -0
  233. package/src/tasks/create/templates/SDK-React/Template/DETAILS-region/styles.js.mustache +7 -0
  234. package/src/tasks/create/templates/SDK-React/Template/FORM/DefaultForm.css +25 -0
  235. package/src/tasks/create/templates/SDK-React/Template/FORM/DefaultForm.svg +29 -0
  236. package/src/tasks/create/templates/SDK-React/Template/FORM/config.json.mustache +45 -0
  237. package/src/tasks/create/templates/SDK-React/Template/FORM/index.tsx.mustache +63 -0
  238. package/src/tasks/create/templates/SDK-React/Template/FORM/styles.js.mustache +7 -0
  239. package/src/tasks/create/templates/SDK-React/Template/FORM-region/TwoColumn.svg +38 -0
  240. package/src/tasks/create/templates/SDK-React/Template/FORM-region/config.json.mustache +49 -0
  241. package/src/tasks/create/templates/SDK-React/Template/FORM-region/index.tsx.mustache +69 -0
  242. package/src/tasks/create/templates/SDK-React/Template/FORM-region/styles.js.mustache +7 -0
  243. package/src/tasks/create/templates/SDK-React/Template/PAGE/OneColumn.tsx.mustache +32 -0
  244. package/src/tasks/create/templates/SDK-React/Template/PAGE/OneColumnPage.svg +28 -0
  245. package/src/tasks/create/templates/SDK-React/Template/PAGE/config.json.mustache +32 -0
  246. package/src/tasks/create/templates/SDK-React/Template/PAGE/index.tsx.mustache +31 -0
  247. package/src/tasks/create/templates/SDK-React/Template/PAGE/styles.js.mustache +7 -0
  248. package/src/tasks/create/templates/SDK-React/Widget/CASE/OneColumnPage.svg +36 -0
  249. package/src/tasks/create/templates/SDK-React/Widget/CASE/config.json.mustache +23 -0
  250. package/src/tasks/create/templates/SDK-React/Widget/CASE/index.tsx.mustache +183 -0
  251. package/src/tasks/create/templates/SDK-React/Widget/CASE/styles.js.mustache +7 -0
  252. package/src/tasks/create/templates/SDK-React/Widget/PAGE/OneColumnPage.svg +36 -0
  253. package/src/tasks/create/templates/SDK-React/Widget/PAGE/config.json.mustache +59 -0
  254. package/src/tasks/create/templates/SDK-React/Widget/PAGE/index.tsx.mustache +78 -0
  255. package/src/tasks/create/templates/SDK-React/Widget/PAGE/styles.js.mustache +7 -0
  256. package/src/tasks/create/templates/SDK-React/Widget/PAGE-CASE/OneColumnPage.svg +36 -0
  257. package/src/tasks/create/templates/SDK-React/Widget/PAGE-CASE/config.json.mustache +66 -0
  258. package/src/tasks/create/templates/SDK-React/Widget/PAGE-CASE/index.tsx.mustache +239 -0
  259. package/src/tasks/create/templates/SDK-React/Widget/PAGE-CASE/styles.js.mustache +7 -0
  260. package/src/tasks/create/templates/SDK-WebComponents/Field/__components.md +4 -0
  261. package/src/tasks/create/templates/SDK-WebComponents/Template/__components.md +4 -0
  262. package/src/tasks/create/templates/SDK-WebComponents/Widget/__components.md +4 -0
  263. package/src/tasks/delete/helper.js +122 -0
  264. package/src/tasks/delete/index.js +45 -0
  265. package/src/tasks/delete-all/helper.js +177 -0
  266. package/src/tasks/delete-all/index.js +45 -0
  267. package/src/tasks/index.js +11 -0
  268. package/src/tasks/linter/index.js +46 -0
  269. package/src/tasks/list/helper.js +118 -0
  270. package/src/tasks/list/index.js +51 -0
  271. package/src/tasks/map/map.js +118 -0
  272. package/src/tasks/publish/helper.js +147 -0
  273. package/src/tasks/publish/index.js +72 -0
  274. package/src/tasks/publish-all/helper.js +139 -0
  275. package/src/tasks/publish-all/index.js +84 -0
  276. package/src/tasks/update/index.js +5 -0
  277. package/src/tasks/upgrade/index.js +31 -0
  278. package/src/tasks/validator/index.js +216 -0
  279. package/src/util.js +442 -0
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "{{COMPONENT_KEY}}",
3
+ "label": "{{COMPONENT_LABEL}}",
4
+ "description": "{{DESCRIPTION}}",
5
+ "organization": "{{ORGANIZATION}}",
6
+ "version": "{{VERSION}}",
7
+ "library": "{{LIBRARY}}",
8
+ "allowedApplications": {{{ALLOWEDAPPS}}},
9
+ "componentKey": "{{COMPONENT_KEY}}",
10
+ "type": "{{TYPE}}",
11
+ "subtype": {{{SUB_TYPE}}},
12
+ "icon": "OneColumnPage.svg",
13
+ "properties": [
14
+ {
15
+ "name": "useConfigurableLayout",
16
+ "label": "Use inline layout for insights",
17
+ "format": "BOOLEAN"
18
+ },
19
+ {
20
+ "name": "enableGetNextWork",
21
+ "label": "Enable Get next work",
22
+ "format": "BOOLEAN"
23
+ },
24
+ {
25
+ "name": "A",
26
+ "label": "Region A",
27
+ "format": "CONTENTPICKER",
28
+ "addTypeList": ["Widgets", "Views", "Insights"]
29
+ }
30
+ ],
31
+ "defaultConfig": {}
32
+ }
@@ -0,0 +1,31 @@
1
+ /* eslint-disable react/no-unused-prop-types */
2
+ import React from "react";
3
+ import PropTypes from 'prop-types';
4
+
5
+ import OneColumn from './OneColumn';
6
+
7
+ import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
8
+
9
+
10
+ // Duplicated runtime code from React SDK
11
+
12
+ // props passed in combination of props from property panel (config.json) and run time props from Constellation
13
+ // any default values in config.pros should be set in defaultProps at bottom of this file
14
+ export default function {{COMPONENT_CLASS_NAME}}(props) {
15
+
16
+ return (
17
+ <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
18
+ <OneColumn
19
+ {...props}
20
+ />
21
+ </Styled{{COMPONENT_CLASS_NAME}}Wrapper>
22
+ );
23
+
24
+ }
25
+
26
+ {{COMPONENT_CLASS_NAME}}.defaultProps = {
27
+ children: PropTypes.arrayOf(PropTypes.node).isRequired,
28
+ };
29
+
30
+ {{COMPONENT_CLASS_NAME}}.propTypes = {
31
+ };
@@ -0,0 +1,7 @@
1
+ import styled, { css } from 'styled-components';
2
+
3
+ export default styled.div(() => {
4
+ return css`
5
+ margin: 0px 0;
6
+ `;
7
+ });
@@ -0,0 +1,36 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="100px" height="70px" viewBox="0 0 100 70" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <title>1 col </title>
4
+ <defs>
5
+ <rect id="path-1" x="0" y="0" width="100" height="70"></rect>
6
+ </defs>
7
+ <g id="Concepts" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
8
+ <g id="Templates" transform="translate(-98.000000, -108.000000)">
9
+ <g id="Change-template" transform="translate(42.000000, 36.000000)">
10
+ <g id="1-col-" transform="translate(56.000000, 72.000000)">
11
+ <mask id="mask-2" fill="white">
12
+ <use xlink:href="#path-1"></use>
13
+ </mask>
14
+ <rect stroke="#A5A8BC" stroke-width="0.5" x="0.25" y="0.25" width="99.5" height="69.5"></rect>
15
+ <g id="white" mask="url(#mask-2)" fill="#FFFFFF">
16
+ <g transform="translate(3.000000, 3.000000)" id="Rectangle">
17
+ <rect x="0" y="0" width="94" height="66.5"></rect>
18
+ </g>
19
+ </g>
20
+ <g id="gray" mask="url(#mask-2)" fill="#8084A7">
21
+ <g transform="translate(6.000000, 6.000000)" id="Rectangle">
22
+ <rect x="0" y="-2.84217094e-14" width="88" height="77.8"></rect>
23
+ </g>
24
+ </g>
25
+ <g id="labels" mask="url(#mask-2)" font-family="OpenSans-Semibold, Open Sans" font-size="11" font-weight="500">
26
+ <g transform="translate(44.000000, 17.000000)" id="A">
27
+ <text>
28
+ <tspan x="0.75" y="12" fill="#FFFFFF">A</tspan>
29
+ </text>
30
+ </g>
31
+ </g>
32
+ </g>
33
+ </g>
34
+ </g>
35
+ </g>
36
+ </svg>
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "{{COMPONENT_KEY}}",
3
+ "label": "{{COMPONENT_LABEL}}",
4
+ "description": "{{DESCRIPTION}}",
5
+ "organization": "{{ORGANIZATION}}",
6
+ "version": "{{VERSION}}",
7
+ "library": "{{LIBRARY}}",
8
+ "allowedApplications": {{{ALLOWEDAPPS}}},
9
+ "componentKey": "{{COMPONENT_KEY}}",
10
+ "type": "{{TYPE}}",
11
+ "subtype": {{{SUB_TYPE}}},
12
+ "icon": "OneColumnPage.svg",
13
+ "properties": [
14
+ {
15
+ "name": "label",
16
+ "label": "Label value",
17
+ "format": "TEXT"
18
+ }
19
+ ],
20
+ "defaultConfig": {
21
+ "label": "Case Widget"
22
+ }
23
+ }
@@ -0,0 +1,183 @@
1
+ /* eslint-disable react/no-unused-prop-types */
2
+ import React, { useState, useRef, useEffect } from "react";
3
+ import PropTypes from "prop-types";
4
+ import { withStyles, Theme, createStyles } from '@material-ui/core/styles';
5
+ import Table from '@material-ui/core/Table';
6
+ import TableBody from '@material-ui/core/TableBody';
7
+ import TableCell from '@material-ui/core/TableCell';
8
+ import TableContainer from '@material-ui/core/TableContainer';
9
+ import TableHead from '@material-ui/core/TableHead';
10
+ import TableRow from '@material-ui/core/TableRow';
11
+ import isDeepEqual from 'fast-deep-equal/react';
12
+ import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
13
+
14
+ import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
15
+
16
+ declare const PCore;
17
+
18
+ const StyledTableCell = withStyles((theme: Theme) =>
19
+ createStyles({
20
+ head: {
21
+ borderWidth: "1px",
22
+ borderStyle: "solid",
23
+ borderColor: "silver",
24
+ backgroundColor: theme.palette.text.disabled,
25
+ color: theme.palette.getContrastText(theme.palette.text.disabled),
26
+ },
27
+ body: {
28
+ borderWidth: "1px",
29
+ borderStyle: "solid",
30
+ borderColor: "silver",
31
+ // fontSize: 14,
32
+ },
33
+ }),
34
+ )(TableCell);
35
+
36
+ // Duplicated runtime code from React SDK
37
+
38
+ // Case widget example is a "history table"
39
+
40
+ // props passed in combination of props from property panel (config.json) and run time props from Constellation
41
+ // any default values in config.pros should be set in defaultProps at bottom of this file
42
+ export default function {{COMPONENT_CLASS_NAME}}(props) {
43
+ const { getPConnect } = props;
44
+ const thePConn = getPConnect();
45
+ // let waitingForData = true;
46
+
47
+ const displayedColumns = [
48
+ { label: "Date", type: "DateTime", fieldName: "pxTimeCreated" },
49
+ { label: "Description", type: "TextInput", fieldName: "pyMessageKey" },
50
+ { label: "User", type: "TextInput", fieldName: "pyPerformer" }
51
+ ];
52
+
53
+ const rowData: any = useRef([]);
54
+ // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
55
+ const [waitingForData, setWaitingForData] = useState<boolean>(true);
56
+
57
+
58
+ const caseID = thePConn.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID);
59
+ const dataViewName = "D_pyWorkHistory";
60
+ const context = thePConn.getContextName();
61
+
62
+ function computeRowData(rows: Array<Object>): void {
63
+ const theRowData: Array<Object> = [];
64
+
65
+ rows.forEach((row: any, rowIndex: number) => {
66
+ // Now, for each property in the index of row properties (displayedColumns), add an object
67
+ // to a new array of values
68
+ const rowDisplayValues: any = [];
69
+
70
+ displayedColumns.forEach((column: Object, rowValIndex) => {
71
+ const theType = column["type"];
72
+ const theFieldName = column["fieldName"];
73
+ const theValue = ((theType === "Date" || theType === "DateTime")) ? Utils.generateDateTime(row[theFieldName], "DateTime-Short") : row[theFieldName];
74
+ rowDisplayValues[rowValIndex] = theValue;
75
+ });
76
+
77
+ theRowData[rowIndex] = rowDisplayValues;
78
+ })
79
+
80
+ if (!isDeepEqual(theRowData, rowData.current)) {
81
+ // Only update rowData.current when it actually changes (to prevent infinite loop)
82
+ rowData.current = theRowData;
83
+ }
84
+ }
85
+
86
+ // Get the case history data when component mounted/initialized
87
+ useEffect( () => {
88
+
89
+ let bCallSetWaitingForData = true;
90
+
91
+ const historyData = PCore.getDataApiUtils().getData(
92
+ dataViewName, `{"dataViewParameters":[{"CaseInstanceKey":"${caseID}"}]}`,
93
+ context
94
+ );
95
+
96
+ historyData.then( (historyJSON: Object) => {
97
+
98
+ const tableDataResults = historyJSON["data"].data;
99
+
100
+ // compute the rowData using the tableDataResults
101
+ computeRowData(tableDataResults);
102
+
103
+ // At this point, if we have data ready to render and haven't been asked
104
+ // to NOT call setWaitingForData, we can stop progress indicator
105
+ if (bCallSetWaitingForData) {
106
+ setWaitingForData(false);
107
+ }
108
+
109
+ });
110
+
111
+ return () => {
112
+ // Inspired by https://juliangaramendy.dev/blog/use-promise-subscription
113
+ // The useEffect closure lets us have access to the bCallSetWaitingForData
114
+ // variable inside the useEffect and inside the "then" clause of the
115
+ // historyData promise
116
+ // So, if this cleanup code gets run before the promise .then is called,
117
+ // we can avoid calling the useState setter which would otherwise show a warning
118
+ bCallSetWaitingForData = false;
119
+ }
120
+
121
+ }, []);
122
+
123
+
124
+ function getTableHeader() {
125
+ const theRowKey = "CaseHistory.TableHeader";
126
+
127
+ const theHeaderCells: Array<any> = displayedColumns.map((headerCol, index) => {
128
+ const theCellKey = `${theRowKey}.${index}`;
129
+ return <StyledTableCell key={theCellKey}>{headerCol.label}</StyledTableCell>
130
+ })
131
+
132
+ return <TableRow key={theRowKey}>{theHeaderCells}</TableRow>;
133
+ }
134
+
135
+
136
+ function getTableData() {
137
+ const theDataRows: Array<any> = [];
138
+
139
+ // Note: using rowData.current since we're using useRef as a mutatable
140
+ // value that's only updated when it changes.
141
+ if (rowData.current.length > 0) {
142
+ rowData.current.forEach((dataRow: Array<Object>, index) => {
143
+ // using dataRow[0]-dataRow[1] as the array key since it's a unique value
144
+ const theKey = `CaseHistory-${index}`;
145
+ theDataRows.push( <TableRow key={theKey}>
146
+ <StyledTableCell>{dataRow[0] ? dataRow[0] : "---"}</StyledTableCell>
147
+ <StyledTableCell>{dataRow[1] ? dataRow[1] : "---"}</StyledTableCell>
148
+ <StyledTableCell>{dataRow[2] ? dataRow[2] : "---"}</StyledTableCell>
149
+ </TableRow>
150
+ )
151
+ });
152
+ }
153
+
154
+ return theDataRows;
155
+ }
156
+
157
+
158
+ return (
159
+ <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
160
+ <div id="CaseHistory">
161
+ <TableContainer>
162
+ <Table>
163
+ <TableHead>
164
+ {getTableHeader()}
165
+ </TableHead>
166
+ <TableBody>
167
+ {getTableData()}
168
+ </TableBody>
169
+ </Table>
170
+ </TableContainer>
171
+ </div>
172
+ </Styled{{COMPONENT_CLASS_NAME}}Wrapper>
173
+ );
174
+
175
+ }
176
+
177
+ {{COMPONENT_CLASS_NAME}}.defaultProps = {
178
+
179
+ };
180
+
181
+ {{COMPONENT_CLASS_NAME}}.propTypes = {
182
+ getPConnect: PropTypes.func.isRequired
183
+ };
@@ -0,0 +1,7 @@
1
+ import styled, { css } from 'styled-components';
2
+
3
+ export default styled.div(() => {
4
+ return css`
5
+ margin: 0px 0;
6
+ `;
7
+ });
@@ -0,0 +1,36 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="100px" height="70px" viewBox="0 0 100 70" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <title>1 col </title>
4
+ <defs>
5
+ <rect id="path-1" x="0" y="0" width="100" height="70"></rect>
6
+ </defs>
7
+ <g id="Concepts" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
8
+ <g id="Templates" transform="translate(-98.000000, -108.000000)">
9
+ <g id="Change-template" transform="translate(42.000000, 36.000000)">
10
+ <g id="1-col-" transform="translate(56.000000, 72.000000)">
11
+ <mask id="mask-2" fill="white">
12
+ <use xlink:href="#path-1"></use>
13
+ </mask>
14
+ <rect stroke="#A5A8BC" stroke-width="0.5" x="0.25" y="0.25" width="99.5" height="69.5"></rect>
15
+ <g id="white" mask="url(#mask-2)" fill="#FFFFFF">
16
+ <g transform="translate(3.000000, 3.000000)" id="Rectangle">
17
+ <rect x="0" y="0" width="94" height="66.5"></rect>
18
+ </g>
19
+ </g>
20
+ <g id="gray" mask="url(#mask-2)" fill="#8084A7">
21
+ <g transform="translate(6.000000, 6.000000)" id="Rectangle">
22
+ <rect x="0" y="-2.84217094e-14" width="88" height="77.8"></rect>
23
+ </g>
24
+ </g>
25
+ <g id="labels" mask="url(#mask-2)" font-family="OpenSans-Semibold, Open Sans" font-size="11" font-weight="500">
26
+ <g transform="translate(44.000000, 17.000000)" id="A">
27
+ <text>
28
+ <tspan x="0.75" y="12" fill="#FFFFFF">A</tspan>
29
+ </text>
30
+ </g>
31
+ </g>
32
+ </g>
33
+ </g>
34
+ </g>
35
+ </g>
36
+ </svg>
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "{{COMPONENT_KEY}}",
3
+ "label": "{{COMPONENT_LABEL}}",
4
+ "description": "{{DESCRIPTION}}",
5
+ "organization": "{{ORGANIZATION}}",
6
+ "version": "{{VERSION}}",
7
+ "library": "{{LIBRARY}}",
8
+ "allowedApplications": {{{ALLOWEDAPPS}}},
9
+ "componentKey": "{{COMPONENT_KEY}}",
10
+ "type": "{{TYPE}}",
11
+ "subtype": {{{SUB_TYPE}}},
12
+ "icon": "OneColumnPage.svg",
13
+ "properties": [
14
+ {
15
+ "name": "description",
16
+ "label": "Description",
17
+ "format": "TEXT",
18
+ "defaultValue": "We've launched a brand new experience to accelerate your workflow. Check out the guides to help you get the most of Cosmos."
19
+ },
20
+ {
21
+ "name": "whatsnewlink",
22
+ "label": "What's new link",
23
+ "format": "TEXT",
24
+ "defaultValue": "https://design.pega.com"
25
+ },
26
+ {
27
+ "name": "image",
28
+ "label": "Image link",
29
+ "format": "TEXT",
30
+ "defaultValue": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzOSAxMSI+PHRpdGxlPlBlZ2EgdGV4dC1vbmx5IGxvZ288L3RpdGxlPjxwYXRoIHN0eWxlPSJmaWxsLW9wYWNpdHk6IC4yNTsiIGZpbGw9IiNmZmYiIGQ9Ik03LjcyIDMuODJjMCAyLjI1LTEuNzggMy40MS00IDMuNDFoLTEuNnYzSDBWLjQyaDMuOTRjMi4zNiAwIDMuNzggMS4zOSAzLjc4IDMuNHptLTQtMS40N2gtMS42djNoMS43QTEuNDcgMS40NyAwIDAgMCA1LjUgMy44MmMwLS45MS0uNjUtMS40Ny0xLjc1LTEuNDd6bTcuNjggNS45MWg1LjN2Mkg5LjI5Vi40Mmg3LjM4djEuOTNoLTUuMjR2Mmg0LjI0djEuOWgtNC4yNHpNMjMuMTggMGE1IDUgMCAwIDEgMy41NyAxLjI4TDI1LjYzIDIuOGEzLjc4IDMuNzggMCAwIDAtMS4wNS0uNjNBNC4zMiA0LjMyIDAgMCAwIDIzLjMxIDIgMy4xNyAzLjE3IDAgMCAwIDIwIDUuMjdhMy4xNiAzLjE2IDAgMCAwIDEgMi4zOSAzLjA3IDMuMDcgMCAwIDAgMi4xNy44NCA0LjYgNC42IDAgMCAwIDIuMDktLjVWNi4xOWgtMi4yVjQuMzhoNC4yNXY0LjU2YTUuNDEgNS40MSAwIDAgMS00LjA4IDEuNTdBNS4zNSA1LjM1IDAgMCAxIDE5LjQzIDlhNS4wNSA1LjA1IDAgMCAxLTEuNTYtMy43NCA1LjIxIDUuMjEgMCAwIDEgMS41Ni0zLjc2QTUuMzEgNS4zMSAwIDAgMSAyMy4xOCAwem0xMS4yOS40Mmw0LjEzIDkuNzloLTIuMjVMMzUuNDggOGgtNC4wNmwtLjkgMi4xOGgtMi4yTDMyLjUxLjQyem0uMjUgNS43MkwzMy40NCAzbC0xLjI5IDMuMTR6bTMtNWEuNzEuNzEgMCAwIDEtLjc0Ljc1LjcxLjcxIDAgMCAxLS43My0uNzUuNzMuNzMgMCAwIDEgLjc1LS43Mi43Mi43MiAwIDAgMSAuNzUuNzF6TTM3IC41M2EuNTkuNTkgMCAwIDAtLjYuNi42MS42MSAwIDEgMCAxLjIxIDAgLjYuNiAwIDAgMC0uNjEtLjZ6bS0uMjQgMVYuNzFIMzdjLjEyIDAgLjE4LjA2LjI1LjA2YS4yMS4yMSAwIDAgMSAuMDcuMTguMTkuMTkgMCAwIDEtLjA3LjE4cy0uMDcuMDgtLjEzLjA4bC4yNi4zNmgtLjJMMzcgMS4yOGgtLjF2LjI5em0uMTMtLjQ0aC4yM2EuMjYuMjYgMCAwIDAgLjA3LS4wOWgtLjA2Yy0uMDUtLjE3LS4wNS0uMTctLjEzLS4xN2gtLjF6Ii8+PC9zdmc+"
31
+ },
32
+ {
33
+ "name": "datasource",
34
+ "label": "Data source for details",
35
+ "defaultValue": "@DATASOURCE D_pyAnnouncements.pxResults",
36
+ "format": "DATASOURCE",
37
+ "required": true,
38
+ "properties": [
39
+ {
40
+ "name": "name",
41
+ "label": "Label",
42
+ "defaultValue": "@P .pyLabel"
43
+ }
44
+ ]
45
+ },
46
+ {
47
+ "label": "Conditions",
48
+ "format": "GROUP",
49
+ "properties": [
50
+ {
51
+ "name": "visibility",
52
+ "label": "Visibility",
53
+ "format": "VISIBILITY"
54
+ }
55
+ ]
56
+ }
57
+ ],
58
+ "defaultConfig": {}
59
+ }
@@ -0,0 +1,78 @@
1
+ /* eslint-disable react/no-unused-prop-types */
2
+ import React from "react";
3
+ import PropTypes from "prop-types";
4
+ import { Card, CardContent, CardHeader, Typography, CardActions, Button } from "@material-ui/core";
5
+ import { makeStyles } from '@material-ui/core/styles';
6
+
7
+
8
+ import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
9
+
10
+ const useStyles = makeStyles((theme) => ({
11
+ root: {
12
+ marginTop: theme.spacing(1),
13
+ marginBottom: theme.spacing(1),
14
+ borderLeft: "6px solid",
15
+ borderLeftColor: theme.palette.primary.light
16
+ },
17
+ }));
18
+
19
+ // Duplicated runtime code from React SDK
20
+
21
+ // Page Widget example is the "App Announcment"
22
+
23
+ // props passed in combination of props from property panel (config.json) and run time props from Constellation
24
+ // any default values in config.pros should be set in defaultProps at bottom of this file
25
+ export default function {{COMPONENT_CLASS_NAME}}(props) {
26
+ const { header, description, datasource, whatsnewlink } = props;
27
+ let details = [];
28
+ if (datasource && datasource.source) {
29
+ details = datasource.source.map((item) => {
30
+ return item.name;
31
+ });
32
+ }
33
+
34
+ const classes = useStyles();
35
+
36
+ const handleClick = () => {
37
+ window.open(whatsnewlink);
38
+ }
39
+
40
+
41
+ return (
42
+ <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
43
+ <Card title="AppAnnouncement" className={classes.root}>
44
+ <CardHeader title={<Typography variant="h6">{header}</Typography>} />
45
+ <CardContent>
46
+ <Typography variant="body1" gutterBottom>{description}</Typography>
47
+ {
48
+ details.map((itm, idx) => {
49
+ const theKey = `AppAnn-item-${idx}`;
50
+ return (
51
+ <Typography key={theKey} variant="body2">- {itm}</Typography>
52
+ )
53
+ })
54
+ }
55
+ </CardContent>
56
+ <CardActions>
57
+ <Button color="primary" onClick={handleClick} size="small">See what&apos;s new</Button>
58
+ </CardActions>
59
+ </Card>
60
+ </Styled{{COMPONENT_CLASS_NAME}}Wrapper>
61
+ );
62
+
63
+ }
64
+
65
+ {{COMPONENT_CLASS_NAME}}.defaultProps = {
66
+ header: PropTypes.string,
67
+ description: PropTypes.string,
68
+ datasource: PropTypes.instanceOf(Object),
69
+ whatsnewlink: PropTypes.string
70
+ };
71
+
72
+ {{COMPONENT_CLASS_NAME}}.propTypes = {
73
+ header: "",
74
+ description: "",
75
+ // image: "",
76
+ datasource: [],
77
+ whatsnewlink: ""
78
+ };
@@ -0,0 +1,7 @@
1
+ import styled, { css } from 'styled-components';
2
+
3
+ export default styled.div(() => {
4
+ return css`
5
+ margin: 0px 0;
6
+ `;
7
+ });
@@ -0,0 +1,36 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="100px" height="70px" viewBox="0 0 100 70" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <title>1 col </title>
4
+ <defs>
5
+ <rect id="path-1" x="0" y="0" width="100" height="70"></rect>
6
+ </defs>
7
+ <g id="Concepts" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
8
+ <g id="Templates" transform="translate(-98.000000, -108.000000)">
9
+ <g id="Change-template" transform="translate(42.000000, 36.000000)">
10
+ <g id="1-col-" transform="translate(56.000000, 72.000000)">
11
+ <mask id="mask-2" fill="white">
12
+ <use xlink:href="#path-1"></use>
13
+ </mask>
14
+ <rect stroke="#A5A8BC" stroke-width="0.5" x="0.25" y="0.25" width="99.5" height="69.5"></rect>
15
+ <g id="white" mask="url(#mask-2)" fill="#FFFFFF">
16
+ <g transform="translate(3.000000, 3.000000)" id="Rectangle">
17
+ <rect x="0" y="0" width="94" height="66.5"></rect>
18
+ </g>
19
+ </g>
20
+ <g id="gray" mask="url(#mask-2)" fill="#8084A7">
21
+ <g transform="translate(6.000000, 6.000000)" id="Rectangle">
22
+ <rect x="0" y="-2.84217094e-14" width="88" height="77.8"></rect>
23
+ </g>
24
+ </g>
25
+ <g id="labels" mask="url(#mask-2)" font-family="OpenSans-Semibold, Open Sans" font-size="11" font-weight="500">
26
+ <g transform="translate(44.000000, 17.000000)" id="A">
27
+ <text>
28
+ <tspan x="0.75" y="12" fill="#FFFFFF">A</tspan>
29
+ </text>
30
+ </g>
31
+ </g>
32
+ </g>
33
+ </g>
34
+ </g>
35
+ </g>
36
+ </svg>
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "{{COMPONENT_KEY}}",
3
+ "label": "{{COMPONENT_LABEL}}",
4
+ "description": "{{DESCRIPTION}}",
5
+ "organization": "{{ORGANIZATION}}",
6
+ "version": "{{VERSION}}",
7
+ "library": "{{LIBRARY}}",
8
+ "allowedApplications": {{{ALLOWEDAPPS}}},
9
+ "componentKey": "{{COMPONENT_KEY}}",
10
+ "type": "{{TYPE}}",
11
+ "subtype": {{{SUB_TYPE}}},
12
+ "icon": "OneColumnPage.svg",
13
+ "properties": [
14
+ {
15
+ "name": "title",
16
+ "label": "Label value",
17
+ "format": "TEXT"
18
+ },
19
+ {
20
+ "format": "SELECT",
21
+ "label": "Usage",
22
+ "name": "label",
23
+ "defaultValue": "Create operator",
24
+ "localize": true,
25
+ "source": [
26
+ {
27
+ "key": "Create operator",
28
+ "value": "Create operator"
29
+ },
30
+ {
31
+ "key": "Update operator",
32
+ "value": "Update operator"
33
+ },
34
+ {
35
+ "key": "Resolve operator",
36
+ "value": "Resolve operator"
37
+ }
38
+ ]
39
+ },
40
+
41
+ {
42
+ "label": "Conditions",
43
+ "format": "GROUP",
44
+ "properties": [
45
+ {
46
+ "name": "visibility",
47
+ "label": "Visibility",
48
+ "format": "VISIBILITY"
49
+ }
50
+ ]
51
+ }
52
+ ],
53
+ "defaultConfig": {
54
+ "label": "Create operator",
55
+ "title": "Create operator",
56
+ "createLabel": "@L Created",
57
+ "updateLabel": "@L Updated",
58
+ "createOperator": "@USER .pxCreateOperator",
59
+ "updateOperator": "@USER .pxUpdateOperator",
60
+ "createDateTime": "@P .pxCreateDateTime",
61
+ "updateDateTime": "@P .pxUpdateDateTime",
62
+ "resolveLabel": "@L Resolved",
63
+ "resolveOperator": "@USER .pyResolvedUserID",
64
+ "resolveDateTime": "@P .pyResolvedTimestamp"
65
+ }
66
+ }