@pega/custom-dx-components 0.23.48 → 0.23.50

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 (249) hide show
  1. package/package.json +1 -1
  2. package/src/cli.js +9 -3
  3. package/src/constants.js +5 -0
  4. package/src/tasks/build-all/helper.js +1 -1
  5. package/src/tasks/build-comp/helper.js +4 -2
  6. package/src/tasks/build-comp/index.js +8 -2
  7. package/src/tasks/build-jest-assets/index.js +171 -0
  8. package/src/tasks/create/templates/Constellation/Field/Boolean/create-nonce.ts.mustache +6 -0
  9. package/src/tasks/create/templates/Constellation/Field/Boolean/demo.stories.tsx.mustache +1 -0
  10. package/src/tasks/create/templates/Constellation/Field/Boolean/index.tsx.mustache +3 -1
  11. package/src/tasks/create/templates/Constellation/Field/Date/create-nonce.ts.mustache +6 -0
  12. package/src/tasks/create/templates/Constellation/Field/Date/demo.stories.tsx.mustache +1 -0
  13. package/src/tasks/create/templates/Constellation/Field/Date/index.tsx.mustache +2 -1
  14. package/src/tasks/create/templates/Constellation/Field/DateTime/create-nonce.ts.mustache +6 -0
  15. package/src/tasks/create/templates/Constellation/Field/DateTime/demo.stories.tsx.mustache +2 -0
  16. package/src/tasks/create/templates/Constellation/Field/DateTime/index.tsx.mustache +2 -1
  17. package/src/tasks/create/templates/Constellation/Field/Decimal/create-nonce.ts.mustache +6 -0
  18. package/src/tasks/create/templates/Constellation/Field/Decimal/demo.stories.tsx.mustache +2 -0
  19. package/src/tasks/create/templates/Constellation/Field/Decimal/index.tsx.mustache +2 -1
  20. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/create-nonce.ts.mustache +6 -0
  21. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/demo.stories.tsx.mustache +4 -0
  22. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/index.tsx.mustache +5 -2
  23. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/mock.ts.mustache +1 -0
  24. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/create-nonce.ts.mustache +6 -0
  25. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/demo.stories.tsx.mustache +1 -0
  26. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/index.tsx.mustache +2 -1
  27. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/mock.ts.mustache +0 -1
  28. package/src/tasks/create/templates/Constellation/Field/Integer/create-nonce.ts.mustache +6 -0
  29. package/src/tasks/create/templates/Constellation/Field/Integer/demo.stories.tsx.mustache +1 -0
  30. package/src/tasks/create/templates/Constellation/Field/Integer/index.tsx.mustache +2 -1
  31. package/src/tasks/create/templates/Constellation/Field/Integer/mock.ts.mustache +0 -1
  32. package/src/tasks/create/templates/Constellation/Field/Picklist/create-nonce.ts.mustache +6 -0
  33. package/src/tasks/create/templates/Constellation/Field/Picklist/demo.stories.tsx.mustache +1 -0
  34. package/src/tasks/create/templates/Constellation/Field/Picklist/index.tsx.mustache +2 -1
  35. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/create-nonce.ts.mustache +6 -0
  36. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/demo.stories.tsx.mustache +2 -0
  37. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/index.tsx.mustache +1 -0
  38. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/create-nonce.ts.mustache +6 -0
  39. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/demo.stories.tsx.mustache +3 -1
  40. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/index.tsx.mustache +1 -3
  41. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/mock.ts.mustache +1 -0
  42. package/src/tasks/create/templates/Constellation/Field/Text/create-nonce.ts.mustache +6 -0
  43. package/src/tasks/create/templates/Constellation/Field/Text/demo.stories.tsx.mustache +1 -0
  44. package/src/tasks/create/templates/Constellation/Field/Text/index.tsx.mustache +1 -0
  45. package/src/tasks/create/templates/Constellation/Field/Text-Email/create-nonce.ts.mustache +6 -0
  46. package/src/tasks/create/templates/Constellation/Field/Text-Email/demo.stories.tsx.mustache +1 -0
  47. package/src/tasks/create/templates/Constellation/Field/Text-Email/index.tsx.mustache +2 -1
  48. package/src/tasks/create/templates/Constellation/Field/Text-Input/create-nonce.ts.mustache +6 -0
  49. package/src/tasks/create/templates/Constellation/Field/Text-Input/demo.stories.tsx.mustache +1 -0
  50. package/src/tasks/create/templates/Constellation/Field/Text-Input/index.tsx.mustache +2 -1
  51. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/create-nonce.ts.mustache +6 -0
  52. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/demo.stories.tsx.mustache +1 -0
  53. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/index.tsx.mustache +2 -1
  54. package/src/tasks/create/templates/Constellation/Field/Text-Phone/create-nonce.ts.mustache +6 -0
  55. package/src/tasks/create/templates/Constellation/Field/Text-Phone/demo.stories.tsx.mustache +1 -0
  56. package/src/tasks/create/templates/Constellation/Field/Text-Phone/index.tsx.mustache +2 -1
  57. package/src/tasks/create/templates/Constellation/Field/Text-URL/create-nonce.ts.mustache +6 -0
  58. package/src/tasks/create/templates/Constellation/Field/Text-URL/demo.stories.tsx.mustache +1 -0
  59. package/src/tasks/create/templates/Constellation/Field/Text-URL/index.tsx.mustache +1 -0
  60. package/src/tasks/create/templates/Constellation/Field/TimeofDay/create-nonce.ts.mustache +6 -0
  61. package/src/tasks/create/templates/Constellation/Field/TimeofDay/demo.stories.tsx.mustache +1 -0
  62. package/src/tasks/create/templates/Constellation/Field/TimeofDay/index.tsx.mustache +2 -1
  63. package/src/tasks/create/templates/Constellation/Template/DETAILS/create-nonce.ts.mustache +6 -0
  64. package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.stories.tsx.mustache +1 -4
  65. package/src/tasks/create/templates/Constellation/Template/DETAILS/index.tsx.mustache +1 -0
  66. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/create-nonce.ts.mustache +6 -0
  67. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/demo.stories.tsx.mustache +1 -5
  68. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/index.tsx.mustache +1 -0
  69. package/src/tasks/create/templates/Constellation/Template/FORM/create-nonce.ts.mustache +6 -0
  70. package/src/tasks/create/templates/Constellation/Template/FORM/index.tsx.mustache +1 -1
  71. package/src/tasks/create/templates/Constellation/Template/FORM-region/create-nonce.ts.mustache +6 -0
  72. package/src/tasks/create/templates/Constellation/Template/FORM-region/index.tsx.mustache +1 -0
  73. package/src/tasks/create/templates/Constellation/Template/PAGE/create-nonce.ts.mustache +6 -0
  74. package/src/tasks/create/templates/Constellation/Template/PAGE/index.tsx.mustache +1 -1
  75. package/src/tasks/create/templates/Constellation/Widget/CASE/create-nonce.ts.mustache +6 -0
  76. package/src/tasks/create/templates/Constellation/Widget/CASE/index.tsx.mustache +1 -0
  77. package/src/tasks/create/templates/Constellation/Widget/PAGE/create-nonce.ts.mustache +6 -0
  78. package/src/tasks/create/templates/Constellation/Widget/PAGE/index.tsx.mustache +1 -0
  79. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/create-nonce.ts.mustache +6 -0
  80. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/index.tsx.mustache +1 -0
  81. package/src/tasks/create/templates/Launchpad/Widget/CASE/create-nonce.ts.mustache +6 -0
  82. package/src/tasks/create/templates/Launchpad/Widget/CASE/index.tsx.mustache +1 -0
  83. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/create-nonce.ts.mustache +6 -0
  84. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/demo.stories.tsx.mustache +1 -5
  85. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/index.tsx.mustache +1 -0
  86. package/src/tasks/delete/helper.js +75 -50
  87. package/src/tasks/index.js +1 -0
  88. package/src/tasks/init/helper.js +5 -5
  89. package/src/tasks/init/template/package.json.mustache +5 -4
  90. package/src/tasks/list/helper.js +5 -2
  91. package/src/tasks/publish/helper.js +53 -45
  92. package/src/tasks/publish/index.js +8 -2
  93. package/src/tasks/publish-all/helper.js +6 -0
  94. package/src/tasks/rename/index.js +9 -2
  95. package/src/tasks/revert-webpack/index.js +8 -26
  96. package/src/util.js +51 -72
  97. package/tests/assets/components/create/Pega_DXIL_MyTestText/create-nonce.ts +6 -0
  98. package/tests/assets/components/create/Pega_DXIL_MyTestText/demo.stories.tsx +1 -0
  99. package/tests/assets/components/create/Pega_DXIL_MyTestText/index.tsx +1 -0
  100. package/tests/assets/components/create/_components.md +1 -0
  101. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/create-nonce.ts +6 -0
  102. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/demo.stories.tsx +1 -0
  103. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/index.tsx +3 -1
  104. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/create-nonce.ts +6 -0
  105. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/index.tsx +1 -0
  106. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/create-nonce.ts +6 -0
  107. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/demo.stories.tsx +4 -0
  108. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/index.tsx +5 -2
  109. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/mock.ts +1 -0
  110. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/create-nonce.ts +6 -0
  111. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/demo.stories.tsx +1 -0
  112. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/index.tsx +2 -1
  113. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/create-nonce.ts +6 -0
  114. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/demo.stories.tsx +2 -0
  115. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/index.tsx +2 -1
  116. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/create-nonce.ts +6 -0
  117. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/demo.stories.tsx +2 -0
  118. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/index.tsx +2 -1
  119. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/create-nonce.ts +6 -0
  120. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/demo.stories.tsx +1 -4
  121. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/index.tsx +1 -0
  122. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/create-nonce.ts +6 -0
  123. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/demo.stories.tsx +1 -0
  124. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/index.tsx +2 -1
  125. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/create-nonce.ts +6 -0
  126. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/index.tsx +1 -1
  127. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/create-nonce.ts +6 -0
  128. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/demo.stories.tsx +1 -0
  129. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/index.tsx +2 -1
  130. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/mock.ts +0 -1
  131. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/create-nonce.ts +6 -0
  132. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/index.tsx +1 -1
  133. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/create-nonce.ts +6 -0
  134. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/index.tsx +1 -0
  135. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/create-nonce.ts +6 -0
  136. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/index.tsx +1 -0
  137. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/create-nonce.ts +6 -0
  138. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/demo.stories.tsx +1 -0
  139. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/index.tsx +2 -1
  140. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/create-nonce.ts +6 -0
  141. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/demo.stories.tsx +1 -0
  142. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/index.tsx +2 -1
  143. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/mock.ts +0 -1
  144. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/create-nonce.ts +6 -0
  145. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/demo.stories.tsx +1 -0
  146. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/index.tsx +2 -1
  147. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/create-nonce.ts +6 -0
  148. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/demo.stories.tsx +1 -0
  149. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/index.tsx +2 -1
  150. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/create-nonce.ts +6 -0
  151. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/demo.stories.tsx +3 -1
  152. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/index.tsx +1 -3
  153. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/mock.ts +1 -0
  154. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/create-nonce.ts +6 -0
  155. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/demo.stories.tsx +2 -0
  156. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/index.tsx +1 -0
  157. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/create-nonce.ts +6 -0
  158. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/demo.stories.tsx +1 -0
  159. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/index.tsx +1 -0
  160. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/create-nonce.ts +6 -0
  161. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/demo.stories.tsx +1 -0
  162. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/index.tsx +2 -1
  163. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/create-nonce.ts +6 -0
  164. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +1 -0
  165. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/index.tsx +2 -1
  166. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/create-nonce.ts +6 -0
  167. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +1 -5
  168. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/index.tsx +1 -0
  169. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/create-nonce.ts +6 -0
  170. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/index.tsx +1 -0
  171. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/create-nonce.ts +6 -0
  172. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/demo.stories.tsx +1 -0
  173. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/index.tsx +1 -0
  174. package/tests/assets/components/createAll/Constellation/_components.md +1 -0
  175. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/create-nonce.ts +6 -0
  176. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/demo.stories.tsx +1 -0
  177. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/index.tsx +3 -1
  178. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/create-nonce.ts +6 -0
  179. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/index.tsx +1 -0
  180. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/create-nonce.ts +6 -0
  181. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/demo.stories.tsx +4 -0
  182. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/index.tsx +5 -2
  183. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/mock.ts +1 -0
  184. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/create-nonce.ts +6 -0
  185. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/demo.stories.tsx +1 -0
  186. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/index.tsx +2 -1
  187. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/create-nonce.ts +6 -0
  188. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/demo.stories.tsx +2 -0
  189. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/index.tsx +2 -1
  190. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/create-nonce.ts +6 -0
  191. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/demo.stories.tsx +2 -0
  192. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/index.tsx +2 -1
  193. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/create-nonce.ts +6 -0
  194. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/demo.stories.tsx +1 -4
  195. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/index.tsx +1 -0
  196. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/create-nonce.ts +6 -0
  197. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/demo.stories.tsx +1 -0
  198. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/index.tsx +2 -1
  199. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/create-nonce.ts +6 -0
  200. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/index.tsx +1 -1
  201. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/create-nonce.ts +6 -0
  202. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/demo.stories.tsx +1 -0
  203. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/index.tsx +2 -1
  204. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/mock.ts +0 -1
  205. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/create-nonce.ts +6 -0
  206. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/index.tsx +1 -1
  207. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/create-nonce.ts +6 -0
  208. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +1 -5
  209. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/index.tsx +1 -0
  210. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/create-nonce.ts +6 -0
  211. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/index.tsx +1 -0
  212. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/create-nonce.ts +6 -0
  213. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/demo.stories.tsx +1 -0
  214. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/index.tsx +2 -1
  215. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/create-nonce.ts +6 -0
  216. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/demo.stories.tsx +1 -0
  217. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/index.tsx +2 -1
  218. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/mock.ts +0 -1
  219. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/create-nonce.ts +6 -0
  220. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/demo.stories.tsx +1 -0
  221. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/index.tsx +2 -1
  222. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/create-nonce.ts +6 -0
  223. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/demo.stories.tsx +1 -0
  224. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/index.tsx +2 -1
  225. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/create-nonce.ts +6 -0
  226. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/demo.stories.tsx +3 -1
  227. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/index.tsx +1 -3
  228. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/mock.ts +1 -0
  229. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/create-nonce.ts +6 -0
  230. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/demo.stories.tsx +2 -0
  231. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/index.tsx +1 -0
  232. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/create-nonce.ts +6 -0
  233. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/demo.stories.tsx +1 -0
  234. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/index.tsx +1 -0
  235. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/create-nonce.ts +6 -0
  236. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/demo.stories.tsx +1 -0
  237. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/index.tsx +2 -1
  238. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/create-nonce.ts +6 -0
  239. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +1 -0
  240. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/index.tsx +2 -1
  241. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/create-nonce.ts +6 -0
  242. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +1 -5
  243. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/index.tsx +1 -0
  244. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/create-nonce.ts +6 -0
  245. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/index.tsx +1 -0
  246. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/create-nonce.ts +6 -0
  247. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/demo.stories.tsx +1 -0
  248. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/index.tsx +1 -0
  249. package/tests/assets/components/createAll/Launchpad/_components.md +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/custom-dx-components",
3
- "version": "0.23.48",
3
+ "version": "0.23.50",
4
4
  "description": "Utility for building custom UI components",
5
5
  "bin": "./bin/index.js",
6
6
  "scripts": {
package/src/cli.js CHANGED
@@ -18,7 +18,8 @@ import {
18
18
  promoteWebPack,
19
19
  updateComponent,
20
20
  validate,
21
- upgrade
21
+ upgrade,
22
+ buildJestAssets
22
23
  } from './tasks/index.js';
23
24
 
24
25
  const TASKS = {
@@ -36,9 +37,10 @@ const TASKS = {
36
37
  VALIDATE_SCHEMA: 'validateSchema',
37
38
  UPDATE: 'update',
38
39
  DELETE: 'delete',
39
- DELETE_ALL: "deleteAll",
40
+ DELETE_ALL: 'deleteAll',
40
41
  AUTHENTICATE: 'authenticate',
41
- UPGRADE: 'upgrade'
42
+ UPGRADE: 'upgrade',
43
+ BUILD_JEST_ASSETS: 'buildJestAssets'
42
44
  };
43
45
 
44
46
  const parseArgumentsIntoOptions = rawArgs => {
@@ -132,6 +134,10 @@ export default async (args = []) => {
132
134
  upgrade(options);
133
135
  break;
134
136
  }
137
+ case TASKS.BUILD_JEST_ASSETS: {
138
+ buildJestAssets(options);
139
+ break;
140
+ }
135
141
  default: {
136
142
  console.log(chalk.red(`No task matched with ${task}`));
137
143
  break;
package/src/constants.js CHANGED
@@ -39,6 +39,11 @@ export const BUILDER_DIR_FILE_PATH = '../bundle/builder';
39
39
 
40
40
  export const CATEGORY_CONSTELLATION = 'constellation';
41
41
 
42
+ export const JEST_ASSETS_PATH = 'node_modules/@pega/custom-dx-components/tests/assets/components/';
43
+ export const JEST_CREATE_PATH = 'create/';
44
+ export const JEST_CREATE_ALL_CONSTELLATION_PATH = 'createAll/Constellation/';
45
+ export const JEST_CREATE_ALL_LAUNCHPAD_PATH = 'createAll/Launchpad';
46
+
42
47
  export const AUTHENTICATE_DEFAULTS = {
43
48
  serverType: 'infinity',
44
49
  server: 'https://localhost:1080/prweb',
@@ -37,7 +37,7 @@ export const getBuildComponentQuestions = async () => {
37
37
 
38
38
  if (components.length == 0) {
39
39
  console.log(chalk.redBright("No components to build"));
40
- process.exit(1);
40
+ process.exit();
41
41
  }
42
42
 
43
43
  return [
@@ -8,7 +8,7 @@ import chalk from 'chalk';
8
8
  import { constructCompleteUrl, getComponentDirectoryPath, getComponents, getPegaServerConfig, getHttpsAgent } from '../../util.js';
9
9
  import { PUBLISH_COMPONENT_SERVICE_REST_ENDPOINT, TOKEN_PATH } from '../../constants.js';
10
10
 
11
- export const getPublishComponentQuestions = async () => {
11
+ export const getPublishComponentQuestions = async (componentKey) => {
12
12
  const components = await getComponents();
13
13
 
14
14
  if (components.length === 0) {
@@ -23,7 +23,9 @@ export const getPublishComponentQuestions = async () => {
23
23
  name: 'componentKey',
24
24
  type: 'rawlist',
25
25
  message: 'Select component to build',
26
- choices: components
26
+ choices: components,
27
+ default: componentKey,
28
+ when: () => !componentKey
27
29
  },
28
30
  {
29
31
  name: 'sourceMap',
@@ -29,9 +29,15 @@ export default async options => {
29
29
  content = { componentKey, sourceMap, devBuild};
30
30
  }
31
31
  else {
32
- const questions = await getPublishComponentQuestions();
32
+ // VS Code pluggin would send in the component
33
+ let paramComponentKey;
34
+ if (options.params.length == 4) {
35
+ paramComponentKey = options.params[3];
36
+ }
37
+
38
+ const questions = await getPublishComponentQuestions(paramComponentKey);
33
39
  const answers = await inquirer.prompt(questions);
34
- ({ componentKey, sourceMap, devBuild } = answers);
40
+ ({ componentKey = paramComponentKey, sourceMap, devBuild } = answers);
35
41
 
36
42
  content = {
37
43
  ...answers
@@ -0,0 +1,171 @@
1
+ import fs from 'fs';
2
+ import path from 'path';
3
+ import { join } from 'path';
4
+ import inquirer from 'inquirer';
5
+ import { Listr } from 'listr2';
6
+ import chalk from 'chalk';
7
+
8
+ import { showVersion, getServerType, setServerType, getSubComponents, deleteLocalComponent, checkPathAccess, getComponents } from '../../util.js';
9
+ import createAll from '../create-all/index.js';
10
+ import create from '../create/index.js';
11
+
12
+ import { JEST_ASSETS_PATH, JEST_CREATE_PATH, JEST_CREATE_ALL_CONSTELLATION_PATH, JEST_CREATE_ALL_LAUNCHPAD_PATH, TASKS_CONFIG_JSON_FILENAME, COMPONENTS_DIRECTORY_PATH } from '../../constants.js';
13
+
14
+
15
+ const getBuildAssetsQuestions = async () => {
16
+ const message = "\n**IMPORTANT** Building Jest Assets will remove any local components in your components directory!\n";
17
+ console.log(`${chalk.green.bold(message)}`);
18
+
19
+ return [
20
+ {
21
+ name: 'buildAssets',
22
+ type: 'confirm',
23
+ message: 'Generate Jest Assets ?',
24
+ default: false
25
+ }
26
+ ];
27
+ };
28
+
29
+ const deleteTestComponent = async(path, componentKey) => {
30
+ const directory = join(path, componentKey);
31
+
32
+ try {
33
+ fs.rmSync(directory, { recursive: true });
34
+ console.log(`${chalk.red.bold(componentKey)} is deleted from assets`);
35
+ } catch (err) {
36
+ console.log('no file');
37
+ throw new Error(`No such file ${componentKey}`);
38
+ }
39
+ }
40
+
41
+ const copyAssets = async(destinationPath) => {
42
+ const currentDirectory = process.cwd();
43
+ const pegaConfigJsonPath = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
44
+
45
+ await checkPathAccess(pegaConfigJsonPath);
46
+
47
+ let data = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
48
+ data = JSON.parse(data);
49
+
50
+ if (!data[COMPONENTS_DIRECTORY_PATH]) {
51
+ console.error(
52
+ `${chalk.red.bold('ERROR')} Could not able find components directory path in config.json`
53
+ );
54
+ process.exit(1);
55
+ }
56
+
57
+ const srcDir = join(currentDirectory, data[COMPONENTS_DIRECTORY_PATH]);
58
+
59
+ fs.cpSync(srcDir, destinationPath, { recursive: true});
60
+ }
61
+
62
+ const deleteAssets = async() => {
63
+ const currentDirectory = process.cwd();
64
+ const pegaConfigJsonPath = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
65
+
66
+ await checkPathAccess(pegaConfigJsonPath);
67
+
68
+ let data = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
69
+ data = JSON.parse(data);
70
+
71
+ if (!data[COMPONENTS_DIRECTORY_PATH]) {
72
+ console.error(
73
+ `${chalk.red.bold('ERROR')} Could not able find components directory path in config.json`
74
+ );
75
+ process.exit(1);
76
+ }
77
+ const localComponents = await getComponents();
78
+
79
+ for (const index in localComponents) {
80
+ const componentToDelete = localComponents[index];
81
+ // console.log(chalk.bold.green("Deleting: " + componentToDelete));
82
+ // eslint-disable-next-line no-await-in-loop
83
+ const directory = join(currentDirectory, data[COMPONENTS_DIRECTORY_PATH], componentToDelete);
84
+
85
+ try {
86
+ fs.rmSync(directory, { recursive: true });
87
+ console.log(`${chalk.red.bold(componentToDelete)} is deleted from Local`);
88
+ } catch (err) {
89
+ console.log('no file');
90
+ throw new Error(`No such file ${componentToDelete}`);
91
+ }
92
+ }
93
+ }
94
+
95
+ const createJestAssets = async(isLaunchPad = false) => {
96
+
97
+ // initially delete local assets
98
+ await deleteAssets();
99
+
100
+ // const framework = await getFramework();
101
+ let args = [ '','', '', 'My', '0.0.1', 'DXIL', '', 'Pega'];
102
+ let myOptions = {};
103
+ myOptions["params"] = args;
104
+
105
+ await createAll(myOptions);
106
+
107
+ const jestCreateAllPath = isLaunchPad ? JEST_CREATE_ALL_LAUNCHPAD_PATH : JEST_CREATE_ALL_CONSTELLATION_PATH;
108
+
109
+ // goto Constellation
110
+ // get current test assets and delete them
111
+ let createAllPath = path.join(path.resolve(), JEST_ASSETS_PATH, jestCreateAllPath);
112
+ const fileList = await getSubComponents(createAllPath, '');
113
+
114
+ for (const index in fileList) {
115
+ const componentToDelete = fileList[index];
116
+ // console.log(chalk.bold.green("Deleting: " + componentToDelete));
117
+ // eslint-disable-next-line no-await-in-loop
118
+ await deleteTestComponent(createAllPath, componentToDelete);
119
+ }
120
+
121
+ await copyAssets(createAllPath);
122
+ await deleteAssets();
123
+
124
+ args = [ '','', '', 'Field', 'Text', 'MyTestText', 'My Test Text', '0.0.1','DXIL', '', 'My Test Text Description', 'Pega'];
125
+ myOptions = {};
126
+ myOptions["params"] = args;
127
+
128
+ await create(myOptions);
129
+
130
+ let createPath = path.join(path.resolve(), JEST_ASSETS_PATH, JEST_CREATE_PATH);
131
+ const myFileList = await getSubComponents(createPath, '');
132
+
133
+ for (const index in myFileList) {
134
+ const componentToDelete = myFileList[index];
135
+ // console.log(chalk.bold.green("Deleting: " + componentToDelete));
136
+ // eslint-disable-next-line no-await-in-loop
137
+ await deleteTestComponent(createPath, componentToDelete);
138
+ }
139
+
140
+ await copyAssets(createPath);
141
+ await deleteAssets();
142
+ }
143
+
144
+
145
+ export default async options => {
146
+ showVersion();
147
+
148
+ const questions = await getBuildAssetsQuestions();
149
+ const answers = await inquirer.prompt(questions);
150
+ const { buildAssets } = answers;
151
+
152
+ if (buildAssets) {
153
+ // get current server type
154
+ const savedServerType = await getServerType();
155
+
156
+ // Constellation
157
+ await setServerType("infinity");
158
+ await createJestAssets(false);
159
+
160
+ //Launchpad
161
+ await setServerType("launchpad");
162
+ await createJestAssets(true);
163
+
164
+
165
+ // restore serverType
166
+ await setServerType(savedServerType);
167
+ }
168
+
169
+
170
+
171
+ };
@@ -0,0 +1,6 @@
1
+ /* eslint-disable camelcase */
2
+ // @ts-ignore
3
+ if (window?.__webpack_nonce__) {
4
+ // @ts-ignore
5
+ __webpack_nonce__ = window.__webpack_nonce__;
6
+ }
@@ -69,6 +69,7 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
69
69
  Base{{COMPONENT_CLASS_NAME}}.args = {
70
70
  label: configProps.label,
71
71
  helperText: configProps.helperText,
72
+ caption: configProps.caption,
72
73
  testId: configProps.testId,
73
74
  readOnly: configProps.readOnly,
74
75
  disabled: configProps.disabled,
@@ -7,6 +7,8 @@ import {
7
7
  } from "@pega/cosmos-react-core";
8
8
 
9
9
  import type { PConnFieldProps } from './PConnProps';
10
+ import './create-nonce';
11
+
10
12
 
11
13
  // includes in bundle
12
14
  import handleEvent from "./event-utils";
@@ -104,7 +106,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
104
106
  }
105
107
 
106
108
  if (displayMode === 'DISPLAY_ONLY') {
107
- return ( <Styled{{COMPONENT_CLASS_NAME}}Wrapper> displayComponent </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
109
+ return ( <Styled{{COMPONENT_CLASS_NAME}}Wrapper> {displayComponent} </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
108
110
  }
109
111
 
110
112
  if (displayMode === "LABELS_LEFT") {
@@ -0,0 +1,6 @@
1
+ /* eslint-disable camelcase */
2
+ // @ts-ignore
3
+ if (window?.__webpack_nonce__) {
4
+ // @ts-ignore
5
+ __webpack_nonce__ = window.__webpack_nonce__;
6
+ }
@@ -85,6 +85,7 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
85
85
  Base{{COMPONENT_CLASS_NAME}}.args = {
86
86
  label: configProps.label,
87
87
  helperText: configProps.helperText,
88
+ showWeekNumber: configProps.showWeekNumber,
88
89
  testId: configProps.testId,
89
90
  readOnly: configProps.readOnly,
90
91
  disabled: configProps.disabled,
@@ -3,6 +3,7 @@ import { DateInput, FieldValueList, DateTimeDisplay, Text, withConfiguration } f
3
3
  import FormattedText from "./FormattedText";
4
4
 
5
5
  import type { PConnFieldProps } from './PConnProps';
6
+ import './create-nonce';
6
7
 
7
8
  import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
8
9
 
@@ -175,7 +176,7 @@ function {{COMPONENT_CLASS_NAME}} (props: {{COMPONENT_CLASS_NAME}}Props) {
175
176
  );
176
177
  switch(displayMode){
177
178
  case 'DISPLAY_ONLY': {
178
- return ( <Styled{{COMPONENT_CLASS_NAME}}Wrapper> displayComp </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
179
+ return ( <Styled{{COMPONENT_CLASS_NAME}}Wrapper> {displayComp} </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
179
180
  }
180
181
  case "LABELS_LEFT" : {
181
182
  return (
@@ -0,0 +1,6 @@
1
+ /* eslint-disable camelcase */
2
+ // @ts-ignore
3
+ if (window?.__webpack_nonce__) {
4
+ // @ts-ignore
5
+ __webpack_nonce__ = window.__webpack_nonce__;
6
+ }
@@ -84,6 +84,8 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
84
84
  Base{{COMPONENT_CLASS_NAME}}.args = {
85
85
  label: configProps.label,
86
86
  helperText: configProps.helperText,
87
+ withSeconds: configProps.withSeconds,
88
+ showWeekNumber: configProps.showWeekNumber,
87
89
  testId: configProps.testId,
88
90
  readOnly: configProps.readOnly,
89
91
  disabled: configProps.disabled,
@@ -1,6 +1,7 @@
1
1
  import { useEffect, useState } from 'react';
2
2
  import { DateTimeInput, FieldValueList, DateTimeDisplay, Text, withConfiguration } from "@pega/cosmos-react-core";
3
3
  import type { PConnFieldProps } from './PConnProps';
4
+ import './create-nonce';
4
5
 
5
6
  // includes in bundle
6
7
  import DateTimeFormatter from "./date-time";
@@ -181,7 +182,7 @@ function {{COMPONENT_CLASS_NAME}} (props: {{COMPONENT_CLASS_NAME}}Props) {
181
182
  );
182
183
  switch (displayMode) {
183
184
  case 'DISPLAY_ONLY': {
184
- return ( <Styled{{COMPONENT_CLASS_NAME}}Wrapper> displayComp </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
185
+ return ( <Styled{{COMPONENT_CLASS_NAME}}Wrapper> {displayComp} </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
185
186
  }
186
187
  case 'LABELS_LEFT': {
187
188
  return (
@@ -0,0 +1,6 @@
1
+ /* eslint-disable camelcase */
2
+ // @ts-ignore
3
+ if (window?.__webpack_nonce__) {
4
+ // @ts-ignore
5
+ __webpack_nonce__ = window.__webpack_nonce__;
6
+ }
@@ -57,6 +57,8 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
57
57
  Base{{COMPONENT_CLASS_NAME}}.args = {
58
58
  label: configProps.label,
59
59
  helperText: configProps.helperText,
60
+ placeholder: configProps.placeholder,
61
+ showGroupSeparators: configProps.showGroupSeparators,
60
62
  testId: configProps.testId,
61
63
  readOnly: configProps.readOnly,
62
64
  disabled: configProps.disabled,
@@ -2,6 +2,7 @@ import { useState, useEffect, useRef } from 'react';
2
2
  import { NumberInput, NumberDisplay, CurrencyDisplay, FieldValueList, Text, withConfiguration } from '@pega/cosmos-react-core';
3
3
 
4
4
  import type { PConnFieldProps } from './PConnProps';
5
+ import './create-nonce';
5
6
 
6
7
  // includes in bundle
7
8
  import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
@@ -161,7 +162,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
161
162
 
162
163
  switch (displayMode) {
163
164
  case 'DISPLAY_ONLY': {
164
- return (<Styled{{COMPONENT_CLASS_NAME}}Wrapper> displayComp </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
165
+ return (<Styled{{COMPONENT_CLASS_NAME}}Wrapper> {displayComp} </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
165
166
  }
166
167
  case 'LABELS_LEFT': {
167
168
  return (
@@ -0,0 +1,6 @@
1
+ /* eslint-disable camelcase */
2
+ // @ts-ignore
3
+ if (window?.__webpack_nonce__) {
4
+ // @ts-ignore
5
+ __webpack_nonce__ = window.__webpack_nonce__;
6
+ }
@@ -61,6 +61,10 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
61
61
  Base{{COMPONENT_CLASS_NAME}}.args = {
62
62
  label: configProps.label,
63
63
  helperText: configProps.helperText,
64
+ showGroupSeparators: configProps.showGroupSeparators,
65
+ allowDecimals: configProps.allowDecimals,
66
+ currencyISOCode: configProps.currencyISOCode,
67
+ alwaysShowISOCode: configProps.alwaysShowISOCode,
64
68
  testId: configProps.testId,
65
69
  readOnly: configProps.readOnly,
66
70
  disabled: configProps.disabled,
@@ -12,6 +12,7 @@ import {
12
12
 
13
13
 
14
14
  import type { PConnFieldProps } from './PConnProps';
15
+ import './create-nonce';
15
16
 
16
17
  // includes in bundle
17
18
  import handleEvent from './event-utils';
@@ -86,6 +87,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
86
87
  const [currencyValue, setCurrencyValue] = useState(() => formatValue(value));
87
88
 
88
89
  let { readOnly = false, required = false, disabled = false } = props;
90
+ let { showGroupSeparators = false } = props;
89
91
 
90
92
  [readOnly, required, disabled] = [readOnly, required, disabled].map(
91
93
  (prop) => prop === true || (typeof prop === 'string' && prop === 'true')
@@ -120,7 +122,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
120
122
  displayMode === 'DISPLAY_ONLY'
121
123
  ) {
122
124
  let displayComp;
123
- let { showGroupSeparators = false } = props;
125
+ // let { showGroupSeparators = false } = props;
124
126
  if (displayMode === 'LABELS_LEFT' && isTableFormatter) {
125
127
  noOfFractionDigits = undefined;
126
128
  showGroupSeparators = true;
@@ -191,7 +193,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
191
193
 
192
194
  switch (displayMode) {
193
195
  case 'DISPLAY_ONLY': {
194
- return (<Styled{{COMPONENT_CLASS_NAME}}Wrapper> displayComp </Styled{{COMPONENT_CLASS_NAME}}Wrapper>) ;
196
+ return (<Styled{{COMPONENT_CLASS_NAME}}Wrapper> {displayComp} </Styled{{COMPONENT_CLASS_NAME}}Wrapper>) ;
195
197
  }
196
198
  case 'LABELS_LEFT': {
197
199
  return (
@@ -245,6 +247,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
245
247
  showDecimal={allowDecimals}
246
248
  currencyISOCode={currencyISOCode}
247
249
  alwaysShowISOCode={alwaysShowISOCode}
250
+ showGroupSeparators={showGroupSeparators}
248
251
  placeholder={placeholder}
249
252
  disabled={disabled}
250
253
  readOnly={readOnly}
@@ -5,6 +5,7 @@ export const configProps = {
5
5
  label: 'Currency Sample',
6
6
  currencyISOCode: 'USD',
7
7
  allowDecimals: true,
8
+ showGroupSeparators: true,
8
9
  alwaysShowISOCode: true,
9
10
  placeholder: 'Currency Placeholder',
10
11
  helperText: 'Currency Helper Text',
@@ -0,0 +1,6 @@
1
+ /* eslint-disable camelcase */
2
+ // @ts-ignore
3
+ if (window?.__webpack_nonce__) {
4
+ // @ts-ignore
5
+ __webpack_nonce__ = window.__webpack_nonce__;
6
+ }
@@ -57,6 +57,7 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
57
57
  Base{{COMPONENT_CLASS_NAME}}.args = {
58
58
  label: configProps.label,
59
59
  helperText: configProps.helperText,
60
+ showGroupSeparators: configProps.showGroupSeparators,
60
61
  testId: configProps.testId,
61
62
  readOnly: configProps.readOnly,
62
63
  disabled: configProps.disabled,
@@ -10,6 +10,7 @@ import {
10
10
 
11
11
 
12
12
  import type { PConnFieldProps } from './PConnProps';
13
+ import './create-nonce';
13
14
 
14
15
  // includes in bundle
15
16
  import handleEvent from './event-utils';
@@ -168,7 +169,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
168
169
 
169
170
  return displayMode === 'DISPLAY_ONLY' ? (
170
171
  <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
171
- displayComp
172
+ {displayComp}
172
173
  </Styled{{COMPONENT_CLASS_NAME}}Wrapper>
173
174
  ) : (
174
175
  <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
@@ -4,7 +4,6 @@ export const configProps = {
4
4
  value: '',
5
5
  label: 'Percentage Sample',
6
6
  showGroupSeparators: true,
7
- placeholder: 'Percentage Placeholder',
8
7
  helperText: 'Percentage Helper Text',
9
8
  testId: 'percentage-12345678',
10
9
  hasSuggestions: false,
@@ -0,0 +1,6 @@
1
+ /* eslint-disable camelcase */
2
+ // @ts-ignore
3
+ if (window?.__webpack_nonce__) {
4
+ // @ts-ignore
5
+ __webpack_nonce__ = window.__webpack_nonce__;
6
+ }
@@ -56,6 +56,7 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
56
56
  Base{{COMPONENT_CLASS_NAME}}.args = {
57
57
  label: configProps.label,
58
58
  helperText: configProps.helperText,
59
+ showGroupSeparators: configProps.showGroupSeparators,
59
60
  testId: configProps.testId,
60
61
  readOnly: configProps.readOnly,
61
62
  disabled: configProps.disabled,
@@ -3,6 +3,7 @@ import { NumberInput, NumberDisplay, Slider, FieldValueList, CurrencyDisplay, Te
3
3
 
4
4
 
5
5
  import type { PConnFieldProps } from './PConnProps';
6
+ import './create-nonce';
6
7
 
7
8
  // includes in bundle
8
9
  import handleEvent from "./event-utils";
@@ -187,7 +188,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
187
188
 
188
189
  switch (displayMode) {
189
190
  case 'DISPLAY_ONLY': {
190
- return (<Styled{{COMPONENT_CLASS_NAME}}Wrapper> displayComp </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
191
+ return (<Styled{{COMPONENT_CLASS_NAME}}Wrapper> {displayComp} </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
191
192
  }
192
193
  case 'LABELS_LEFT': {
193
194
  return (
@@ -3,7 +3,6 @@ export const configProps = {
3
3
  value: '',
4
4
  label: 'Integer Sample',
5
5
  showGroupSeparators: true,
6
- placeholder: 'Integer Placeholder',
7
6
  helperText: 'Integer Helper Text',
8
7
  testId: 'integer-12345678',
9
8
  hasSuggestions: false,
@@ -0,0 +1,6 @@
1
+ /* eslint-disable camelcase */
2
+ // @ts-ignore
3
+ if (window?.__webpack_nonce__) {
4
+ // @ts-ignore
5
+ __webpack_nonce__ = window.__webpack_nonce__;
6
+ }
@@ -86,6 +86,7 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
86
86
  Base{{COMPONENT_CLASS_NAME}}.args = {
87
87
  label: configProps.label,
88
88
  helperText: configProps.helperText,
89
+ placeholder: configProps.placeholder,
89
90
  testId: configProps.testId,
90
91
  readOnly: configProps.readOnly,
91
92
  disabled: configProps.disabled,
@@ -4,6 +4,7 @@ import { useState, useEffect, useRef } from 'react';
4
4
  import { Select, Option, FieldValueList, Text, withConfiguration } from '@pega/cosmos-react-core';
5
5
 
6
6
  import type { PConnFieldProps } from './PConnProps';
7
+ import './create-nonce';
7
8
 
8
9
  // includes in bundle
9
10
  import handleEvent from "./event-utils";
@@ -256,7 +257,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
256
257
 
257
258
  return displayMode === 'DISPLAY_ONLY' ? (
258
259
  <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
259
- displayComp
260
+ {displayComp}
260
261
  </Styled{{COMPONENT_CLASS_NAME}}Wrapper>
261
262
  ) : (
262
263
  <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
@@ -0,0 +1,6 @@
1
+ /* eslint-disable camelcase */
2
+ // @ts-ignore
3
+ if (window?.__webpack_nonce__) {
4
+ // @ts-ignore
5
+ __webpack_nonce__ = window.__webpack_nonce__;
6
+ }
@@ -95,6 +95,8 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
95
95
  Base{{COMPONENT_CLASS_NAME}}.args = {
96
96
  label: configProps.label,
97
97
  helperText: configProps.helperText,
98
+ placeholder: configProps.placeholder,
99
+ isTableFormatter: false,
98
100
  testId: configProps.testId,
99
101
  readOnly: configProps.readOnly,
100
102
  disabled: configProps.disabled,
@@ -4,6 +4,7 @@ import { useEffect, useRef, useState, useMemo, type MutableRefObject, type SetSt
4
4
  import { ComboBox, menuHelpers, debounce, throttle, Button, Icon, withConfiguration, type MenuGroupProps, type MenuItemProps } from '@pega/cosmos-react-core';
5
5
  import get from 'lodash.get';
6
6
  import type { PConnFieldProps } from './PConnProps';
7
+ import './create-nonce';
7
8
 
8
9
  // includes in bundle
9
10
  import handleEvent from "./event-utils";
@@ -0,0 +1,6 @@
1
+ /* eslint-disable camelcase */
2
+ // @ts-ignore
3
+ if (window?.__webpack_nonce__) {
4
+ // @ts-ignore
5
+ __webpack_nonce__ = window.__webpack_nonce__;
6
+ }