@pega/custom-dx-components 23.1.11 → 23.1.13

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 (397) hide show
  1. package/README.md +3 -3
  2. package/SECURITY.md +10 -0
  3. package/package.json +1 -1
  4. package/src/cli.js +9 -3
  5. package/src/constants.js +6 -0
  6. package/src/tasks/build-all/index.js +10 -25
  7. package/src/tasks/build-comp/index.js +1 -0
  8. package/src/tasks/build-jest-assets/index.js +171 -0
  9. package/src/tasks/bundle/builder/index.js +6 -3
  10. package/src/tasks/create/templates/Constellation/Field/Boolean/Boolean.ts.mustache +35 -0
  11. package/src/tasks/create/templates/Constellation/Field/Boolean/demo.stories.tsx.mustache +23 -6
  12. package/src/tasks/create/templates/Constellation/Field/Boolean/index.tsx.mustache +11 -48
  13. package/src/tasks/create/templates/Constellation/Field/Boolean/mock.ts.mustache +2 -1
  14. package/src/tasks/create/templates/Constellation/Field/Boolean/styles.ts.mustache +7 -14
  15. package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/DateFormatter.js → src/tasks/create/templates/Constellation/Field/Date/DateFormatter.ts.mustache} +6 -6
  16. package/src/tasks/create/templates/Constellation/Field/Date/FormattedText.tsx.mustache +20 -0
  17. package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/date.js → src/tasks/create/templates/Constellation/Field/Date/date.ts.mustache} +2 -2
  18. package/src/tasks/create/templates/Constellation/Field/Date/demo.stories.tsx.mustache +24 -6
  19. package/src/tasks/create/templates/Constellation/Field/Date/index.tsx.mustache +19 -60
  20. package/src/tasks/create/templates/Constellation/Field/Date/mock.ts.mustache +2 -1
  21. package/src/tasks/create/templates/Constellation/Field/Date/styles.ts.mustache +7 -14
  22. package/src/tasks/create/templates/Constellation/Field/DateTime/{date-time.js.mustache → date-time.ts.mustache} +12 -12
  23. package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date-utils.js → src/tasks/create/templates/Constellation/Field/DateTime/date-utils.ts.mustache} +27 -26
  24. package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date.js → src/tasks/create/templates/Constellation/Field/DateTime/date.ts.mustache} +1 -0
  25. package/src/tasks/create/templates/Constellation/Field/DateTime/demo.stories.tsx.mustache +25 -7
  26. package/src/tasks/create/templates/Constellation/Field/DateTime/index.tsx.mustache +13 -60
  27. package/src/tasks/create/templates/Constellation/Field/DateTime/mock.ts.mustache +2 -1
  28. package/src/tasks/create/templates/Constellation/Field/DateTime/styles.ts.mustache +7 -14
  29. package/src/tasks/create/templates/Constellation/Field/Decimal/demo.stories.tsx.mustache +25 -7
  30. package/src/tasks/create/templates/Constellation/Field/Decimal/index.tsx.mustache +15 -68
  31. package/src/tasks/create/templates/Constellation/Field/Decimal/mock.ts.mustache +8 -1
  32. package/src/tasks/create/templates/Constellation/Field/Decimal/styles.ts.mustache +7 -14
  33. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/demo.stories.tsx.mustache +27 -7
  34. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/index.tsx.mustache +24 -76
  35. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/mock.ts.mustache +9 -1
  36. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/styles.ts.mustache +7 -14
  37. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/demo.stories.tsx.mustache +24 -7
  38. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/index.tsx.mustache +14 -55
  39. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/mock.ts.mustache +8 -2
  40. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/styles.ts.mustache +7 -14
  41. package/src/tasks/create/templates/Constellation/Field/Integer/demo.stories.tsx.mustache +24 -7
  42. package/src/tasks/create/templates/Constellation/Field/Integer/index.tsx.mustache +24 -88
  43. package/src/tasks/create/templates/Constellation/Field/Integer/mock.ts.mustache +8 -2
  44. package/src/tasks/create/templates/Constellation/Field/Integer/styles.ts.mustache +7 -14
  45. package/src/tasks/create/templates/Constellation/Field/Picklist/demo.stories.tsx.mustache +24 -7
  46. package/src/tasks/create/templates/Constellation/Field/Picklist/index.tsx.mustache +13 -61
  47. package/src/tasks/create/templates/Constellation/Field/Picklist/mock.ts.mustache +8 -1
  48. package/src/tasks/create/templates/Constellation/Field/Picklist/styles.ts.mustache +7 -14
  49. package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/date.js → src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/date.ts.mustache} +2 -1
  50. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/demo.stories.tsx.mustache +25 -7
  51. package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/embed-utils.js → src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/embed-utils.ts.mustache} +2 -1
  52. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/index.tsx.mustache +15 -76
  53. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/mock.ts.mustache +8 -1
  54. package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/picklist-utils.js → src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/picklist-utils.ts.mustache} +1 -0
  55. package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/repeat-constants.js → src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/repeat-constants.ts.mustache} +1 -1
  56. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/{repeat-utils.js.mustache → repeat-utils.ts.mustache} +6 -12
  57. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/styles.ts.mustache +7 -14
  58. package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/textformat-utils.jsx → src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/textformat-utils.tsx.mustache} +30 -10
  59. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/utils.ts.mustache +1 -1
  60. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/demo.stories.tsx.mustache +26 -8
  61. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/index.tsx.mustache +11 -58
  62. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/mock.ts.mustache +9 -1
  63. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/styles.ts.mustache +7 -14
  64. package/src/tasks/create/templates/Constellation/Field/{Picklist-Autocomplete/textformat-utils.jsx.mustache → Picklist-RadioButtons/textformat-utils.tsx.mustache} +1 -0
  65. package/src/tasks/create/templates/Constellation/Field/Text/demo.stories.tsx.mustache +23 -6
  66. package/src/tasks/create/templates/Constellation/Field/Text/index.tsx.mustache +4 -22
  67. package/src/tasks/create/templates/Constellation/Field/Text/mock.ts.mustache +8 -1
  68. package/src/tasks/create/templates/Constellation/Field/Text/styles.ts.mustache +7 -14
  69. package/src/tasks/create/templates/Constellation/Field/Text-Email/demo.stories.tsx.mustache +24 -7
  70. package/src/tasks/create/templates/Constellation/Field/Text-Email/index.tsx.mustache +10 -47
  71. package/src/tasks/create/templates/Constellation/Field/Text-Email/mock.ts.mustache +8 -1
  72. package/src/tasks/create/templates/Constellation/Field/Text-Email/styles.ts.mustache +7 -14
  73. package/src/tasks/create/templates/Constellation/Field/Text-Input/demo.stories.tsx.mustache +24 -7
  74. package/src/tasks/create/templates/Constellation/Field/Text-Input/index.tsx.mustache +11 -51
  75. package/src/tasks/create/templates/Constellation/Field/Text-Input/mock.ts.mustache +8 -1
  76. package/src/tasks/create/templates/Constellation/Field/Text-Input/styles.ts.mustache +7 -14
  77. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/demo.stories.tsx.mustache +24 -7
  78. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/index.tsx.mustache +13 -49
  79. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/mock.ts.mustache +8 -1
  80. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/styles.ts.mustache +7 -14
  81. package/src/tasks/create/templates/Constellation/Field/Text-Phone/demo.stories.tsx.mustache +24 -7
  82. package/src/tasks/create/templates/Constellation/Field/Text-Phone/index.tsx.mustache +14 -53
  83. package/src/tasks/create/templates/Constellation/Field/Text-Phone/mock.ts.mustache +8 -1
  84. package/src/tasks/create/templates/Constellation/Field/Text-Phone/styles.ts.mustache +7 -14
  85. package/src/tasks/create/templates/Constellation/Field/Text-URL/demo.stories.tsx.mustache +24 -7
  86. package/src/tasks/create/templates/Constellation/Field/Text-URL/index.tsx.mustache +15 -71
  87. package/src/tasks/create/templates/Constellation/Field/Text-URL/mock.ts.mustache +8 -1
  88. package/src/tasks/create/templates/Constellation/Field/Text-URL/styles.ts.mustache +7 -14
  89. package/src/tasks/create/templates/Constellation/Field/Text-URL/{text-url.jsx.mustache → text-url.tsx.mustache} +4 -3
  90. package/src/tasks/create/templates/Constellation/Field/TimeofDay/demo.stories.tsx.mustache +23 -7
  91. package/src/tasks/create/templates/Constellation/Field/TimeofDay/index.tsx.mustache +17 -53
  92. package/src/tasks/create/templates/Constellation/Field/TimeofDay/mock.ts.mustache +2 -1
  93. package/src/tasks/create/templates/Constellation/Field/TimeofDay/styles.ts.mustache +7 -14
  94. package/src/tasks/create/templates/Constellation/Field/{DateTime/date-utils.js.mustache → TimeofDay/time-of-day.ts.mustache} +24 -23
  95. package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.stories.tsx.mustache +17 -6
  96. package/src/tasks/create/templates/Constellation/Template/DETAILS/index.tsx.mustache +4 -17
  97. package/src/tasks/create/templates/Constellation/Template/DETAILS/styles.ts.mustache +7 -14
  98. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/demo.stories.tsx.mustache +13 -4
  99. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/index.tsx.mustache +4 -18
  100. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/styles.ts.mustache +7 -14
  101. package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/utils.js → src/tasks/create/templates/Constellation/Template/DETAILS-region/utils.ts.mustache} +15 -13
  102. package/src/tasks/create/templates/Constellation/Template/FORM/demo.stories.tsx.mustache +14 -6
  103. package/src/tasks/create/templates/Constellation/Template/FORM/index.tsx.mustache +5 -13
  104. package/src/tasks/create/templates/Constellation/Template/FORM/styles.ts.mustache +7 -14
  105. package/src/tasks/create/templates/Constellation/Template/FORM-region/demo.stories.tsx.mustache +14 -6
  106. package/src/tasks/create/templates/Constellation/Template/FORM-region/index.tsx.mustache +4 -10
  107. package/src/tasks/create/templates/Constellation/Template/FORM-region/styles.ts.mustache +7 -14
  108. package/src/tasks/create/templates/Constellation/Template/PAGE/demo.stories.tsx.mustache +11 -6
  109. package/src/tasks/create/templates/Constellation/Template/PAGE/index.tsx.mustache +5 -16
  110. package/src/tasks/create/templates/Constellation/Template/PAGE/styles.ts.mustache +7 -14
  111. package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/utils.js → src/tasks/create/templates/Constellation/Template/PAGE/utils.ts.mustache} +28 -14
  112. package/src/tasks/create/templates/Constellation/Widget/CASE/demo.stories.tsx.mustache +11 -6
  113. package/src/tasks/create/templates/Constellation/Widget/CASE/index.tsx.mustache +3 -10
  114. package/src/tasks/create/templates/Constellation/Widget/CASE/styles.ts.mustache +7 -14
  115. package/src/tasks/create/templates/Constellation/Widget/PAGE/demo.stories.tsx.mustache +14 -6
  116. package/src/tasks/create/templates/Constellation/Widget/PAGE/index.tsx.mustache +4 -18
  117. package/src/tasks/create/templates/Constellation/Widget/PAGE/styles.ts.mustache +7 -14
  118. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Avatar.tsx.mustache +3 -13
  119. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Operator.tsx.mustache +4 -19
  120. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/demo.stories.tsx.mustache +11 -6
  121. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/index.tsx.mustache +24 -39
  122. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/styles.ts.mustache +7 -14
  123. package/src/tasks/create/templates/Launchpad/Widget/CASE/demo.stories.tsx.mustache +11 -6
  124. package/src/tasks/create/templates/Launchpad/Widget/CASE/index.tsx.mustache +3 -9
  125. package/src/tasks/create/templates/Launchpad/Widget/CASE/styles.ts.mustache +7 -14
  126. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/Avatar.tsx.mustache +1 -11
  127. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/Operator.tsx.mustache +33 -51
  128. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/demo.stories.tsx.mustache +11 -6
  129. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/index.tsx.mustache +22 -21
  130. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/styles.ts.mustache +7 -14
  131. package/src/tasks/delete-all/helper.js +37 -5
  132. package/src/tasks/index.js +1 -0
  133. package/src/tasks/init/template/.eslintignore +6 -0
  134. package/src/tasks/init/template/README.md +4 -4
  135. package/src/tasks/init/template/SECURITY.md +10 -0
  136. package/src/tasks/init/template/package.json.mustache +13 -14
  137. package/src/tasks/init/template/tasks.config.json +2 -1
  138. package/src/tasks/linter/index.js +7 -4
  139. package/src/tasks/list/helper.js +10 -0
  140. package/src/tasks/list/index.js +20 -3
  141. package/src/tasks/promote-webpack/index.js +6 -32
  142. package/src/tasks/publish/helper.js +7 -1
  143. package/src/tasks/publish/index.js +6 -4
  144. package/src/tasks/publish-all/helper.js +58 -40
  145. package/src/tasks/publish-all/index.js +16 -17
  146. package/src/tasks/revert-webpack/index.js +4 -23
  147. package/src/util.js +152 -68
  148. package/tests/assets/components/create/Pega_DXIL_MyTestText/demo.stories.tsx +23 -6
  149. package/tests/assets/components/create/Pega_DXIL_MyTestText/index.tsx +4 -22
  150. package/tests/assets/components/create/Pega_DXIL_MyTestText/mock.ts +8 -1
  151. package/tests/assets/components/create/Pega_DXIL_MyTestText/styles.ts +7 -14
  152. package/tests/assets/components/create/_components.md +1 -0
  153. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/Boolean.ts +35 -0
  154. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/demo.stories.tsx +23 -6
  155. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/index.tsx +11 -48
  156. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/mock.ts +2 -1
  157. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/styles.ts +7 -14
  158. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/demo.stories.tsx +11 -6
  159. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/index.tsx +3 -10
  160. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/styles.ts +7 -14
  161. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/demo.stories.tsx +27 -7
  162. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/index.tsx +24 -76
  163. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/mock.ts +9 -1
  164. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/styles.ts +7 -14
  165. package/{src/tasks/create/templates/Constellation/Field/Date/DateFormatter.js.mustache → tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/DateFormatter.ts} +6 -6
  166. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/FormattedText.tsx +20 -0
  167. package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MyDate/date.js → Constellation/Pega_DXIL_MyDate/date.ts} +2 -2
  168. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/demo.stories.tsx +24 -6
  169. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/index.tsx +19 -60
  170. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/mock.ts +2 -1
  171. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/styles.ts +7 -14
  172. package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MyDateTime/date-time.js → Constellation/Pega_DXIL_MyDateTime/date-time.ts} +12 -12
  173. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date-utils.ts +288 -0
  174. package/{src/tasks/create/templates/Constellation/Field/DateTime/date.js.mustache → tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date.ts} +1 -0
  175. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/demo.stories.tsx +25 -7
  176. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/index.tsx +13 -60
  177. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/mock.ts +2 -1
  178. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/styles.ts +7 -14
  179. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/demo.stories.tsx +25 -7
  180. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/index.tsx +15 -68
  181. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/mock.ts +8 -1
  182. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/styles.ts +7 -14
  183. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/demo.stories.tsx +15 -4
  184. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/index.tsx +4 -17
  185. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/styles.ts +7 -14
  186. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/demo.stories.tsx +24 -7
  187. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/index.tsx +10 -47
  188. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/mock.ts +8 -1
  189. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/styles.ts +7 -14
  190. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/demo.stories.tsx +14 -6
  191. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/index.tsx +5 -13
  192. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/styles.ts +7 -14
  193. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/demo.stories.tsx +24 -7
  194. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/index.tsx +24 -88
  195. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/mock.ts +8 -2
  196. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/styles.ts +7 -14
  197. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/demo.stories.tsx +11 -6
  198. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/index.tsx +5 -16
  199. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/styles.ts +7 -14
  200. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/{utils.js → utils.ts} +28 -14
  201. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/Avatar.tsx +3 -13
  202. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/Operator.tsx +4 -19
  203. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +11 -6
  204. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/index.tsx +24 -39
  205. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/styles.ts +7 -14
  206. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/demo.stories.tsx +14 -6
  207. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/index.tsx +4 -18
  208. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/styles.ts +7 -14
  209. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/demo.stories.tsx +24 -7
  210. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/index.tsx +13 -49
  211. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/mock.ts +8 -1
  212. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/styles.ts +7 -14
  213. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/demo.stories.tsx +24 -7
  214. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/index.tsx +14 -55
  215. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/mock.ts +8 -2
  216. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/styles.ts +7 -14
  217. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/demo.stories.tsx +24 -7
  218. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/index.tsx +14 -53
  219. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/mock.ts +8 -1
  220. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/styles.ts +7 -14
  221. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/demo.stories.tsx +24 -7
  222. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/index.tsx +13 -61
  223. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/mock.ts +8 -1
  224. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/styles.ts +7 -14
  225. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/demo.stories.tsx +26 -8
  226. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/index.tsx +11 -58
  227. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/mock.ts +9 -1
  228. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/styles.ts +7 -14
  229. package/tests/assets/components/createAll/Constellation/{Pega_DXIL_MySearchbox/textformat-utils.jsx → Pega_DXIL_MyRadioButtons/textformat-utils.tsx} +1 -0
  230. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/{date.js → date.ts} +2 -1
  231. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/demo.stories.tsx +25 -7
  232. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/{embed-utils.js → embed-utils.ts} +2 -1
  233. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/index.tsx +15 -76
  234. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/mock.ts +8 -1
  235. package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MySearchbox/picklist-utils.js → Constellation/Pega_DXIL_MySearchbox/picklist-utils.ts} +1 -0
  236. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/{repeat-constants.js → repeat-constants.ts} +1 -1
  237. package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MySearchbox/repeat-utils.js → Constellation/Pega_DXIL_MySearchbox/repeat-utils.ts} +6 -12
  238. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/styles.ts +7 -14
  239. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/textformat-utils.tsx +181 -0
  240. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/utils.ts +1 -1
  241. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/demo.stories.tsx +23 -6
  242. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/index.tsx +4 -22
  243. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/mock.ts +8 -1
  244. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/styles.ts +7 -14
  245. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/demo.stories.tsx +24 -7
  246. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/index.tsx +11 -51
  247. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/mock.ts +8 -1
  248. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/styles.ts +7 -14
  249. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +23 -7
  250. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/index.tsx +17 -53
  251. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/mock.ts +2 -1
  252. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/styles.ts +7 -14
  253. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/{time-of-day.js → time-of-day.ts} +24 -23
  254. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +13 -4
  255. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/index.tsx +4 -18
  256. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/styles.ts +7 -14
  257. package/{src/tasks/create/templates/Constellation/Template/DETAILS-region/utils.js.mustache → tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/utils.ts} +15 -13
  258. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/demo.stories.tsx +14 -6
  259. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/index.tsx +4 -10
  260. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/styles.ts +7 -14
  261. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/demo.stories.tsx +24 -7
  262. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/index.tsx +15 -71
  263. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/mock.ts +8 -1
  264. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/styles.ts +7 -14
  265. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/{text-url.jsx → text-url.tsx} +4 -3
  266. package/tests/assets/components/createAll/Constellation/_components.md +1 -0
  267. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/Boolean.ts +35 -0
  268. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/demo.stories.tsx +23 -6
  269. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/index.tsx +11 -48
  270. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/mock.ts +2 -1
  271. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/styles.ts +7 -14
  272. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/demo.stories.tsx +11 -6
  273. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/index.tsx +3 -9
  274. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/styles.ts +7 -14
  275. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/demo.stories.tsx +27 -7
  276. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/index.tsx +24 -76
  277. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/mock.ts +9 -1
  278. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/styles.ts +7 -14
  279. package/tests/assets/components/createAll/{Constellation/Pega_DXIL_MyDate/DateFormatter.js → Launchpad/Pega_DXIL_MyDate/DateFormatter.ts} +6 -6
  280. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/FormattedText.tsx +20 -0
  281. package/{src/tasks/create/templates/Constellation/Field/Date/date.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/date.ts} +2 -2
  282. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/demo.stories.tsx +24 -6
  283. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/index.tsx +19 -60
  284. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/mock.ts +2 -1
  285. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/styles.ts +7 -14
  286. package/tests/assets/components/createAll/{Constellation/Pega_DXIL_MyDateTime/date-time.js → Launchpad/Pega_DXIL_MyDateTime/date-time.ts} +12 -12
  287. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date-utils.ts +288 -0
  288. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/{date.js → date.ts} +1 -0
  289. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/demo.stories.tsx +25 -7
  290. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/index.tsx +13 -60
  291. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/mock.ts +2 -1
  292. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/styles.ts +7 -14
  293. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/demo.stories.tsx +25 -7
  294. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/index.tsx +15 -68
  295. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/mock.ts +8 -1
  296. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/styles.ts +7 -14
  297. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/demo.stories.tsx +15 -4
  298. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/index.tsx +4 -17
  299. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/styles.ts +7 -14
  300. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/demo.stories.tsx +24 -7
  301. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/index.tsx +10 -47
  302. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/mock.ts +8 -1
  303. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/styles.ts +7 -14
  304. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/demo.stories.tsx +14 -6
  305. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/index.tsx +5 -13
  306. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/styles.ts +7 -14
  307. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/demo.stories.tsx +24 -7
  308. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/index.tsx +24 -88
  309. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/mock.ts +8 -2
  310. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/styles.ts +7 -14
  311. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/demo.stories.tsx +11 -6
  312. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/index.tsx +5 -16
  313. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/styles.ts +7 -14
  314. package/{src/tasks/create/templates/Constellation/Template/PAGE/utils.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/utils.ts} +28 -14
  315. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/Avatar.tsx +1 -11
  316. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/Operator.tsx +33 -51
  317. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +11 -6
  318. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/index.tsx +22 -20
  319. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/styles.ts +7 -14
  320. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/demo.stories.tsx +14 -6
  321. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/index.tsx +4 -18
  322. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/styles.ts +7 -14
  323. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/demo.stories.tsx +24 -7
  324. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/index.tsx +13 -49
  325. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/mock.ts +8 -1
  326. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/styles.ts +7 -14
  327. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/demo.stories.tsx +24 -7
  328. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/index.tsx +14 -55
  329. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/mock.ts +8 -2
  330. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/styles.ts +7 -14
  331. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/demo.stories.tsx +24 -7
  332. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/index.tsx +14 -53
  333. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/mock.ts +8 -1
  334. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/styles.ts +7 -14
  335. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/demo.stories.tsx +24 -7
  336. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/index.tsx +13 -61
  337. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/mock.ts +8 -1
  338. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/styles.ts +7 -14
  339. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/demo.stories.tsx +26 -8
  340. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/index.tsx +11 -58
  341. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/mock.ts +9 -1
  342. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/styles.ts +7 -14
  343. package/{src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/textformat-utils.jsx.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/textformat-utils.tsx} +1 -0
  344. package/{src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/date.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/date.ts} +2 -1
  345. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/demo.stories.tsx +25 -7
  346. package/{src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/embed-utils.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/embed-utils.ts} +2 -1
  347. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/index.tsx +15 -76
  348. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/mock.ts +8 -1
  349. package/{src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/picklist-utils.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/picklist-utils.ts} +1 -0
  350. package/{src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/repeat-constants.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/repeat-constants.ts} +1 -1
  351. package/tests/assets/components/createAll/{Constellation/Pega_DXIL_MySearchbox/repeat-utils.js → Launchpad/Pega_DXIL_MySearchbox/repeat-utils.ts} +6 -12
  352. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/styles.ts +7 -14
  353. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/textformat-utils.tsx +181 -0
  354. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/utils.ts +1 -1
  355. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/demo.stories.tsx +23 -6
  356. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/index.tsx +4 -22
  357. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/mock.ts +8 -1
  358. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/styles.ts +7 -14
  359. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/demo.stories.tsx +24 -7
  360. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/index.tsx +11 -51
  361. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/mock.ts +8 -1
  362. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/styles.ts +7 -14
  363. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +23 -7
  364. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/index.tsx +17 -53
  365. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/mock.ts +2 -1
  366. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/styles.ts +7 -14
  367. package/{src/tasks/create/templates/Constellation/Field/TimeofDay/time-of-day.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/time-of-day.ts} +24 -23
  368. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +13 -4
  369. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/index.tsx +4 -18
  370. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/styles.ts +7 -14
  371. package/tests/assets/components/createAll/{Constellation/Pega_DXIL_MyTwoColumnDetails/utils.js → Launchpad/Pega_DXIL_MyTwoColumnDetails/utils.ts} +15 -13
  372. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/demo.stories.tsx +14 -6
  373. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/index.tsx +4 -10
  374. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/styles.ts +7 -14
  375. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/demo.stories.tsx +24 -7
  376. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/index.tsx +15 -71
  377. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/mock.ts +8 -1
  378. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/styles.ts +7 -14
  379. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/{text-url.jsx → text-url.tsx} +4 -3
  380. package/tests/assets/components/createAll/Launchpad/_components.md +1 -0
  381. package/tests/functional/localCreateAllListDeleteAll.test.js +10 -3
  382. package/src/tasks/create/templates/Constellation/Field/Boolean/Boolean.js.mustache +0 -38
  383. package/src/tasks/create/templates/Constellation/Field/Date/FormattedText.jsx.mustache +0 -41
  384. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/Boolean.js +0 -38
  385. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/FormattedText.jsx +0 -41
  386. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/Boolean.js +0 -38
  387. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/FormattedText.jsx +0 -41
  388. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date-utils.js +0 -287
  389. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/textformat-utils.jsx +0 -161
  390. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/textformat-utils.jsx +0 -161
  391. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/time-of-day.js +0 -287
  392. /package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/{component-constants.js → component-constants.ts} +0 -0
  393. /package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/{format-constants.js.mustache → format-constants.ts.mustache} +0 -0
  394. /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/{component-constants.js → component-constants.ts} +0 -0
  395. /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/{format-constants.js → format-constants.ts} +0 -0
  396. /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/{component-constants.js → component-constants.ts} +0 -0
  397. /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/{format-constants.js → format-constants.ts} +0 -0
package/README.md CHANGED
@@ -12,10 +12,10 @@ Ensure you have access to the following in your system:
12
12
 
13
13
  - Git version 2.30 or later
14
14
 
15
- - System node version 18
15
+ - System node version 18, 20
16
16
 
17
- - System npm version 8
17
+ - System npm version 8, 10 (9 is not supported)
18
18
 
19
19
  ## Latest Documentation
20
20
 
21
- Find the latest documentation on using **DX Component Builder** [here](https://docs.pega.com/bundle/constellation-dx-components/page/constellation-dx-components/custom-components/lifecycle-dx-cosmos-components.html)
21
+ Find the latest documentation on using **DX Component Builder** [here](https://docs.pega.com/bundle/constellation-dx-components/page/constellation-dx-components/custom-components/whats-new-constellation-dx-components-pega-infinity-23.html)
package/SECURITY.md ADDED
@@ -0,0 +1,10 @@
1
+ # Reporting Security Issues
2
+
3
+ Pegasystems takes security seriously. We appreciate your efforts to responsibly disclose your findings, and will make every effort to acknowledge your contributions.
4
+
5
+ To report a security issue, [email us](mailto:opensource@pega.com;security@pega.com) and include the word "SECURITY" in the subject line.
6
+
7
+ The Pega team will send a response indicating the next steps in handling your report. We may ask for additional information or guidance.
8
+
9
+ ## Learning More About Security
10
+ To learn more about securing a Pega application or our security capabilities, please see the [security article](https://community.pega.com/knowledgebase/capabilities/security) on Pega Community and the [Pega Trust Center](https://www.pega.com/products/cloud/pega-trust-center).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/custom-dx-components",
3
- "version": "23.1.11",
3
+ "version": "23.1.13",
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
@@ -4,6 +4,7 @@ export const PACKAGE_JSON_FILENAME = 'package.json';
4
4
  export const BUILD_CONFIG_JSON_FILENAME = 'build.config.json';
5
5
  export const WEBPACK_CONFIG_JS_FILENAME = 'webpack.config.js';
6
6
  export const WEBPACK_PATHS_JS_FILENAME = 'paths.js';
7
+ export const USE_PROMOTED_WEB_PACK = 'usePromotedWebPack';
7
8
  export const COMPONENTS_DIRECTORY_PATH = 'components-directory-path';
8
9
  export const COMPONENTS_PATH = 'component';
9
10
  export const TOKEN_PATH = 'node_modules/@pega/custom-dx-components/.access_token';
@@ -38,6 +39,11 @@ export const BUILDER_DIR_FILE_PATH = '../bundle/builder';
38
39
 
39
40
  export const CATEGORY_CONSTELLATION = 'constellation';
40
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
+
41
47
  export const AUTHENTICATE_DEFAULTS = {
42
48
  serverType: 'infinity',
43
49
  server: 'https://localhost:1080/prweb',
@@ -9,9 +9,7 @@ import { getComponentDirectoryPath, showVersion, getComponents } from '../../uti
9
9
 
10
10
  import { getBuildComponentQuestions, cleanUp } from './helper.js';
11
11
 
12
-
13
12
  export function getCustomTasks(componentKey, sourceMap, devBuild, options) {
14
-
15
13
  const sDevBuild = devBuild ? '(dev build)' : '';
16
14
  return new Listr(
17
15
  [
@@ -35,50 +33,37 @@ export function getCustomTasks(componentKey, sourceMap, devBuild, options) {
35
33
  skip: () => (options.skipBundle ? 'Skipped bundling component' : undefined)
36
34
  }
37
35
  ],
38
- {
39
- exitOnError: true
40
- }
36
+ { concurrent: false, exitOnError: true }
41
37
  );
42
-
43
-
44
38
  }
45
39
 
46
-
47
-
48
-
49
- export default async (options) => {
40
+ export default async options => {
50
41
  showVersion();
51
42
 
52
-
53
43
  const components = await getComponents();
54
44
  let sourceMap;
55
45
  let devBuild;
56
46
 
57
47
  if (options.params.length >= 4) {
58
48
  const dBuild = options.params[3];
59
- devBuild = (dBuild === 'Y' ||
60
- dBuild === 'y' ||
61
- dBuild === true ||
62
- dBuild === 'true') ? true : false;
63
- }
64
- else {
49
+ devBuild = !!(dBuild === 'Y' || dBuild === 'y' || dBuild === true || dBuild === 'true');
50
+ } else {
65
51
  const questions = await getBuildComponentQuestions();
66
52
  const answers = await inquirer.prompt(questions);
67
53
  ({ sourceMap, devBuild } = answers);
68
54
  }
69
55
 
70
-
71
- for (const componentKey of components) {
56
+ for await (const componentKey of components) {
72
57
  console.log(chalk.bold.green(`Building ${componentKey}`));
73
58
 
74
- const myCustomTasks = getCustomTasks(componentKey, sourceMap, devBuild, options );
59
+ const myCustomTasks = getCustomTasks(componentKey, sourceMap, devBuild, options);
75
60
 
76
- // eslint-disable-next-line no-await-in-loop
77
- await myCustomTasks.run().catch(err => {
61
+ try {
62
+ await myCustomTasks.run();
63
+ } catch (err) {
78
64
  console.log(chalk.bold.red(err.toString()));
79
65
  process.exit(1);
80
- });
81
-
66
+ }
82
67
  }
83
68
 
84
69
  // once done, remove leftover directories
@@ -71,6 +71,7 @@ export default async options => {
71
71
 
72
72
  await tasks.run().catch(err => {
73
73
  console.log(chalk.bold.red(err.toString()));
74
+ process.exit(1);
74
75
  });
75
76
  return true;
76
77
  };
@@ -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
+ };
@@ -3,12 +3,15 @@ import fs from 'fs-extra';
3
3
  import webpack from 'webpack';
4
4
  import FileSizeReporter from 'react-dev-utils/FileSizeReporter.js';
5
5
  import printBuildError from 'react-dev-utils/printBuildError.js';
6
+ import { getUseWebPackPromotion} from '../../../util.js';
6
7
 
7
8
 
9
+ const usePromoted = await getUseWebPackPromotion();
8
10
  // used by promote and revert webPack commands, do not change
9
- import configFactory from './webpack.config.js';
10
- // import configFactory from '../../../../../../../webpack.config.js';
11
- // do not change
11
+ const configFactory = (
12
+ await import(`${usePromoted ? `../../../../../../../webpack.config.js` : `./webpack.config.js`}`)
13
+ ).default
14
+
12
15
 
13
16
  import paths from './paths.js';
14
17
 
@@ -0,0 +1,35 @@
1
+ function Boolean(value: any, { allowEmpty = true, tick = '', cross = '' } = {}) {
2
+ if (
3
+ (!allowEmpty && !value) ||
4
+ value === false ||
5
+ value?.toString()?.toLowerCase() === 'false' ||
6
+ value === 0 ||
7
+ value === '0'
8
+ ) {
9
+ return cross || '';
10
+ }
11
+ if (
12
+ value === true ||
13
+ value?.toString()?.toLowerCase() === 'true' ||
14
+ value === 1 ||
15
+ value === '1'
16
+ ) {
17
+ return tick || '';
18
+ }
19
+ if (
20
+ allowEmpty &&
21
+ (value === 'null' || value === '' || value === null || typeof value === 'undefined')
22
+ ) {
23
+ return '––';
24
+ }
25
+ return value;
26
+ }
27
+
28
+ export default {
29
+ TrueFalse: (value: any, options: Object) =>
30
+ Boolean(value, {
31
+ ...options,
32
+ tick: 'True',
33
+ cross: 'False'
34
+ })
35
+ };
@@ -2,19 +2,22 @@
2
2
  /* eslint-disable react/jsx-no-useless-fragment */
3
3
  // @ts-nocheck
4
4
  import { useState } from 'react';
5
- import { withKnobs } from '@storybook/addon-knobs';
5
+ import type { Meta, StoryObj } from '@storybook/react';
6
6
 
7
7
  import { configProps, stateProps } from './mock';
8
8
 
9
9
  import {{COMPONENT_CLASS_NAME}} from './index';
10
10
 
11
- export default {
11
+ const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
12
12
  title: '{{COMPONENT_CLASS_NAME}}',
13
- decorators: [withKnobs],
14
- component: {{COMPONENT_CLASS_NAME}}
13
+ component: {{COMPONENT_CLASS_NAME}},
14
+ excludeStories: /.*Data$/
15
15
  };
16
16
 
17
- export const Base{{COMPONENT_CLASS_NAME}} = () => {
17
+ export default meta;
18
+ type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
19
+
20
+ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
18
21
 
19
22
  const [value, setValue] = useState(configProps.value);
20
23
 
@@ -58,7 +61,21 @@ export const Base{{COMPONENT_CLASS_NAME}} = () => {
58
61
 
59
62
  return (
60
63
  <>
61
- <{{COMPONENT_CLASS_NAME}} {...props} />
64
+ <{{COMPONENT_CLASS_NAME}} {...props} {...args} />
62
65
  </>
63
66
  );
64
67
  };
68
+
69
+ Base{{COMPONENT_CLASS_NAME}}.args = {
70
+ label: configProps.label,
71
+ helperText: configProps.helperText,
72
+ caption: configProps.caption,
73
+ testId: configProps.testId,
74
+ readOnly: configProps.readOnly,
75
+ disabled: configProps.disabled,
76
+ required: configProps.required,
77
+ status: configProps.status,
78
+ hideLabel: configProps.hideLabel,
79
+ displayMode: configProps.displayMode,
80
+ validatemessage: configProps.validatemessage
81
+ };
@@ -2,10 +2,9 @@ import {
2
2
  Checkbox as CosmosCheckbox,
3
3
  CheckboxGroup,
4
4
  FieldValueList,
5
- Text
5
+ Text,
6
+ withConfiguration
6
7
  } from "@pega/cosmos-react-core";
7
- import PropTypes from "prop-types";
8
-
9
8
 
10
9
  import type { PConnFieldProps } from './PConnProps';
11
10
 
@@ -40,19 +39,19 @@ interface ActionsProps {
40
39
 
41
40
  // props passed in combination of props from property panel (config.json) and run time props from Constellation
42
41
  // any default values in config.pros should be set in defaultProps at bottom of this file
43
- export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
42
+ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
44
43
  const {
45
44
  getPConnect,
46
- value,
47
- label,
48
- helperText,
45
+ value = false,
46
+ label = '',
47
+ helperText = '',
49
48
  caption,
50
49
  validatemessage,
51
50
  hideLabel,
52
51
  testId,
53
- additionalProps,
52
+ additionalProps = {},
54
53
  displayMode,
55
- variant,
54
+ variant = 'inline',
56
55
  trueLabel,
57
56
  falseLabel
58
57
  } = props;
@@ -62,7 +61,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
62
61
  const stateProps = pConn.getStateProps() as StateProps;
63
62
  const propName: string = stateProps.value;
64
63
 
65
- let { readOnly, required, disabled } = props;
64
+ let { readOnly = false, required = false, disabled = false } = props;
66
65
  [readOnly, required, disabled] = [readOnly, required, disabled].map(
67
66
  (prop) => prop === true || (typeof prop === 'string' && prop === 'true')
68
67
  );
@@ -105,7 +104,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
105
104
  }
106
105
 
107
106
  if (displayMode === 'DISPLAY_ONLY') {
108
- return ( <Styled{{COMPONENT_CLASS_NAME}}Wrapper> displayComponent </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
107
+ return ( <Styled{{COMPONENT_CLASS_NAME}}Wrapper> {displayComponent} </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
109
108
  }
110
109
 
111
110
  if (displayMode === "LABELS_LEFT") {
@@ -161,40 +160,4 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
161
160
  };
162
161
 
163
162
 
164
- {{COMPONENT_CLASS_NAME}}.defaultProps = {
165
- validatemessage: '',
166
- value: false,
167
- label: '',
168
- hideLabel: false,
169
- helperText: '',
170
- disabled: false,
171
- readOnly: false,
172
- required: false,
173
- testId: '',
174
- additionalProps: {},
175
- displayMode: null,
176
- variant: 'inline',
177
- displayValue: 'Yes/No',
178
- trueLabel: '',
179
- falseLabel: ''
180
- };
181
-
182
- {{COMPONENT_CLASS_NAME}}.propTypes = {
183
- getPConnect: PropTypes.func.isRequired,
184
- validatemessage: PropTypes.string,
185
- label: PropTypes.string,
186
- hideLabel: PropTypes.bool,
187
- helperText: PropTypes.string,
188
- value: PropTypes.bool,
189
- caption: PropTypes.string.isRequired,
190
- disabled: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
191
- readOnly: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
192
- required: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
193
- testId: PropTypes.string,
194
- additionalProps: PropTypes.objectOf(PropTypes.any),
195
- displayMode: PropTypes.string,
196
- variant: PropTypes.string,
197
- displayValue: PropTypes.string,
198
- trueLabel: PropTypes.string,
199
- falseLabel: PropTypes.string
200
- };
163
+ export default withConfiguration({{COMPONENT_CLASS_NAME}});
@@ -14,7 +14,8 @@ export const configProps = {
14
14
  falseLabel: 'False',
15
15
  disabled: false,
16
16
  readOnly: false,
17
- required: true
17
+ required: true,
18
+ status: ''
18
19
  };
19
20
 
20
21
  export const stateProps = {
@@ -1,15 +1,8 @@
1
-
2
- // utilizing theming, comment out, if want individual style
3
- import styled from 'styled-components';
4
- import { Configuration } from '@pega/cosmos-react-core';
5
-
6
- export default styled(Configuration)``;
7
-
8
1
  // individual style, comment out above, and uncomment here and add styles
9
- // import styled, { css } from 'styled-components';
10
- //
11
- // export default styled.div(() => {
12
- // return css`
13
- // margin: 0px 0;
14
- // `;
15
- // });
2
+ import styled, { css } from 'styled-components';
3
+
4
+ export default styled.div(() => {
5
+ return css`
6
+ margin: 0px 0;
7
+ `;
8
+ });
@@ -15,8 +15,8 @@ const types = ['fromNow', 'customFormat'];
15
15
 
16
16
  // value should be in ISO 8601 format.
17
17
  function DateFormatter(
18
- value,
19
- { type = types[1], format = "DD/MM/YYYY", tzone } = {}
18
+ value: any,
19
+ { type = types[1], format = "DD/MM/YYYY", tzone = null } = {}
20
20
  ) {
21
21
  if (!value) return value;
22
22
  switch (type) {
@@ -31,7 +31,7 @@ function DateFormatter(
31
31
  }
32
32
 
33
33
  // value should be in hh:mm:ss format (00:00:00 - 23:59:59).
34
- function TimeFormatter(value, options) {
34
+ function TimeFormatter(value: any, options: any) {
35
35
  if (!value) return value;
36
36
  const { locale = "en-US" } = options;
37
37
  const timeOnlyRegex = /^(?:[01]\d|2[0123]):(?:[012345]\d):(?:[012345]\d)$/;
@@ -49,10 +49,10 @@ function TimeFormatter(value, options) {
49
49
  }
50
50
 
51
51
  export default {
52
- Date: (value, options) => DateFormatter(value, { type: 'customFormat', ...options }),
53
- 'Date-Time-Default': (value, options) =>
52
+ Date: (value: any, options: any) => DateFormatter(value, { type: 'customFormat', ...options }),
53
+ 'Date-Time-Default': (value: any, options: any) =>
54
54
  DateFormatter(value, { ...options, type: 'customFormat', format: 'lll' }),
55
- 'Time-Default': (value, options) =>
55
+ 'Time-Default': (value: any, options: any) =>
56
56
  TimeFormatter(value, {
57
57
  ...options,
58
58
  type: 'customFormat',
@@ -0,0 +1,20 @@
1
+ import { FieldValueList } from '@pega/cosmos-react-core';
2
+
3
+ import { format } from './date';
4
+
5
+ export default function FormattedText(props: any) {
6
+ const { formatType = 'none', label, value, testId, hideLabel, variant = 'stacked', additionalProps = {} } = props;
7
+
8
+ let text = value;
9
+
10
+ text = format(text, formatType, additionalProps);
11
+
12
+ const fields = [
13
+ {
14
+ id: label.toLowerCase(),
15
+ name: hideLabel ? '' : label,
16
+ value: text
17
+ }
18
+ ];
19
+ return <FieldValueList variant={variant} fields={fields} data-testid={testId} />;
20
+ }
@@ -1,6 +1,6 @@
1
- /* eslint-disable no-undef */
1
+ // @ts-nocheck
2
2
  import dayjs from 'dayjs';
3
- import DateFormatter from './DateFormatter.js';
3
+ import DateFormatter from './DateFormatter';
4
4
 
5
5
  import relativeTime from 'dayjs/plugin/relativeTime.js';
6
6
  import localizedFormat from 'dayjs/plugin/localizedFormat.js';