@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
@@ -1,38 +0,0 @@
1
- function Boolean(value, { 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" ||
22
- value === "" ||
23
- value === null ||
24
- typeof value === "undefined")
25
- ) {
26
- return "––";
27
- }
28
- return value;
29
- }
30
-
31
- export default {
32
- TrueFalse: (value, options) =>
33
- Boolean(value, {
34
- ...options,
35
- tick: "True",
36
- cross: "False"
37
- })
38
- };
@@ -1,41 +0,0 @@
1
- import { FieldValueList } from '@pega/cosmos-react-core';
2
- import PropTypes from 'prop-types';
3
-
4
- import { format } from './date.js';
5
-
6
- export default function FormattedText(props) {
7
- const { formatType, label, value, testId, hideLabel, variant, additionalProps } = props;
8
-
9
- let text = value;
10
-
11
- text = format(text, formatType, additionalProps);
12
-
13
- const fields = [
14
- {
15
- id: label.toLowerCase(),
16
- name: hideLabel ? '' : label,
17
- value: text
18
- }
19
- ];
20
- return <FieldValueList variant={variant} fields={fields} data-testid={testId} />;
21
- }
22
-
23
- FormattedText.defaultProps = {
24
- formatType: 'none',
25
- variant: 'stacked',
26
- value: undefined,
27
- label: '',
28
- testId: null,
29
- hideLabel: false,
30
- additionalProps: {}
31
- };
32
-
33
- FormattedText.propTypes = {
34
- formatType: PropTypes.string,
35
- variant: PropTypes.oneOf(['inline', 'stacked']),
36
- value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool]),
37
- label: PropTypes.string,
38
- testId: PropTypes.string,
39
- additionalProps: PropTypes.objectOf(PropTypes.any),
40
- hideLabel: PropTypes.bool
41
- };
@@ -1,287 +0,0 @@
1
- import dayjs from "dayjs";
2
- import relativeTime from 'dayjs/plugin/relativeTime.js';
3
- import localizedFormat from 'dayjs/plugin/localizedFormat.js';
4
- import utc from 'dayjs/plugin/utc.js';
5
- import timezone from 'dayjs/plugin/timezone.js';
6
-
7
- dayjs.extend(relativeTime);
8
- dayjs.extend(localizedFormat);
9
- dayjs.extend(utc);
10
- dayjs.extend(timezone);
11
-
12
- /**
13
- * Return relative time in fromNow for the given datetime
14
- * @description Convert and return the given datetime in dayJSObject
15
- *
16
- * @param {string} text datetime
17
- * @returns {object} datetime as a dayjs object
18
- */
19
- export const getDayJSObject = (text) => {
20
- const momObj = dayjs(text);
21
- if (momObj.isValid()) return momObj;
22
- const timeStamp = text;
23
- const isDateTime = timeStamp.indexOf("GMT") !== -1;
24
- const year = parseInt(timeStamp.substr(0, 4), 10);
25
- const month = parseInt(timeStamp.substr(4, 2), 10) - 1;
26
- const day = parseInt(timeStamp.substr(6, 2), 10);
27
-
28
- const CurrentTz = PCore.getLocaleUtils().getTimeZoneInUse();
29
-
30
- let mom = new Date();
31
-
32
- mom.setUTCDate(day);
33
- mom.setUTCMonth(month);
34
- mom.setUTCFullYear(year);
35
-
36
- /* istanbul ignore else */
37
- if (isDateTime) {
38
- const hours = parseInt(timeStamp.substr(9, 2), 10);
39
- const minutes = parseInt(timeStamp.substr(11, 2), 10);
40
- const seconds = parseInt(timeStamp.substr(13, 2), 10);
41
- const ms = parseInt(timeStamp.substr(16, 3), 10);
42
- mom.setUTCHours(hours);
43
- mom.setUTCMinutes(minutes);
44
- mom.setUTCSeconds(seconds);
45
- mom.setUTCMilliseconds(ms);
46
- }
47
-
48
- mom = dayjs(
49
- mom.toLocaleString("en-US", {
50
- timeZone: CurrentTz
51
- })
52
- );
53
-
54
- return mom;
55
- };
56
-
57
- /**
58
- * Return relative time in fromNow for the given datetime
59
- *
60
- * @param {string} time datetime
61
- * @returns {object} relative time from now
62
- */
63
- export const getRelativeTime = (time) => {
64
- let relativetime = "";
65
- if (dayjs(time).isUTC()) {
66
- relativetime = dayjs(time).fromNow();
67
- } else {
68
- const dayjstime = getDayJSObject(time);
69
- relativetime = dayjs(dayjstime).fromNow();
70
- }
71
- return relativetime;
72
- };
73
-
74
- /**
75
- * Return year for the date passed
76
- *
77
- * @param {string} value from which Year needs to be taken out
78
- * @returns {number} year for the date passed
79
- */
80
- export const getFullYear = (value) =>
81
- value ? new Date(value).getFullYear() : new Date().getFullYear();
82
-
83
- /**
84
- * Return maxDate for the date passed
85
- *
86
- * @param {number} nextYears next number of years
87
- * @param {number} currentYear current year
88
- * @param {number} yearFromValue year set on value in redux
89
- *
90
- * @returns {string} maxDate calculated based on inputs
91
- */
92
- export const getMaxDate = (nextYears, currentYear, yearFromValue) => {
93
- if (Number.isNaN(nextYears)) {
94
- nextYears = 20;
95
- }
96
- let maxYear = currentYear + nextYears;
97
- if (yearFromValue > maxYear) {
98
- maxYear = yearFromValue;
99
- }
100
- return `${maxYear}-01-01`;
101
- };
102
-
103
- /**
104
- * Return minDate for the date passed
105
- *
106
- * @param {number} previousYears previous number of years
107
- * @param {number} currentYear current year
108
- * @param {number} yearFromValue year set on value in redux
109
- *
110
- * @returns {string} minDate calculated based on inputs
111
- */
112
- export const getMinDate = (previousYears, currentYear, yearFromValue) => {
113
- if (Number.isNaN(previousYears)) {
114
- previousYears = 100;
115
- }
116
- let minYear = currentYear - previousYears;
117
- if (yearFromValue < minYear) {
118
- minYear = yearFromValue;
119
- }
120
- return `${minYear}-12-31`;
121
- };
122
-
123
- /**
124
- * Return clockFormat after parsing
125
- *
126
- * @param {number | string} clockFormat chosen by user
127
- *
128
- * @returns {number} clockFormat
129
- */
130
- export const parseClockFormat = (clockFormat) =>
131
- typeof clockFormat === "string" ? parseInt(clockFormat, 10) : clockFormat;
132
-
133
- /**
134
- * Return datetime value string off to seconds
135
- *
136
- * @param {string} datetime in ISO format
137
- * @param {boolean} withSeconds to specify if seconds is needed or not
138
- *
139
- * @returns {string} datetime after stripping of ms and seconds if selected to
140
- */
141
- export const correctDateTimeToSeconds = (datetime, withSeconds) => {
142
- if (withSeconds) {
143
- return `${datetime.substring(0, datetime.indexOf("Z"))}.000Z`;
144
- }
145
- return `${datetime.substring(0, datetime.lastIndexOf(":"))}:00.000Z`;
146
- };
147
-
148
- /**
149
- * Return time value string off to seconds
150
- *
151
- * @param {string} datetime in ISO format
152
- * @param {boolean} withSeconds to specify if seconds is needed or not
153
- *
154
- * @returns {string} just time after stripping of ms and seconds if selected to
155
- */
156
- export const timeCorrectedToSeconds = (datetime, withSeconds) => {
157
- if (withSeconds) {
158
- return datetime.substring(datetime.indexOf("T") + 1, datetime.indexOf("."));
159
- }
160
- return `${datetime.substring(
161
- datetime.indexOf("T") + 1,
162
- datetime.lastIndexOf(":")
163
- )}:00`;
164
- };
165
-
166
- /**
167
- * This function handles the cosmos blur handler of DateTime components
168
- *
169
- * @param {string | undefined} errorState for the selected datetime value
170
- * @param {string} actualValue present in redux
171
- * @param {string} formattedValue retrieved by trimming ISO to just Date/Time, also applying timezone if DateTime
172
- * @param {object} actions object which has fire and blur callbacks
173
- * @param {string} propName name of the property bound
174
- * @param {object} pConn component's PConnect object which is useful to invoke validationApi
175
- *
176
- * @returns {void}
177
- */
178
- export const datetimeFireChangeBlurEvents = (
179
- errorState,
180
- actualValue,
181
- formattedValue,
182
- actions,
183
- propName,
184
- pConn
185
- ) => {
186
-
187
- // TODO - clean up, we should not rely on timestamp from cosmos to check InComplete validation
188
- // above triggerFieldChange should have validated this
189
- if (errorState) {
190
- pConn.getValidationApi().validate(errorState);
191
- }
192
- // BUG-640834 In errorState presist old values avoiding store update & re-render.
193
- else{
194
- if (formattedValue !== actualValue) {
195
- actions.updateFieldValue(propName, formattedValue);
196
- }
197
- actions.triggerFieldChange(propName, formattedValue);
198
- }
199
- };
200
-
201
- /**
202
- * Return Date format for the locale passed
203
- *
204
- * @param {string} locale locale string
205
- * @param {object} options options for format string
206
- * @returns {string} dateformat for the locale
207
- * Example : getDateFormat("pl-PL") returns "DD.MM.YYYY"
208
- */
209
- export const getDateFormat = (locale, options) => {
210
- return new Intl.DateTimeFormat(locale, options)
211
- .formatToParts()
212
- .map(({ type, value }) => {
213
- switch (type) {
214
- case "day":
215
- return "DD";
216
- case "month":
217
- return "MM";
218
- case "year":
219
- return "YYYY";
220
- case "hour":
221
- return "hh";
222
- case "minute":
223
- return "mm";
224
- case "second":
225
- return "ss";
226
- case "dayPeriod":
227
- return "A";
228
- case "literal":
229
- return value;
230
- default:
231
- return "";
232
- }
233
- })
234
- .join("");
235
- };
236
-
237
- /**
238
- * Return boolean for the locale passed to specify if locale uses 12 hour format
239
- *
240
- * @param {string} locale locale string
241
- * @returns {boolean} True or False for the locale
242
- * Example : getDateFormat("pl-PL") returns false
243
- */
244
- export const is12HClockFormat = (locale) => {
245
- const meridiem = new Intl.DateTimeFormat(locale, {
246
- hour: "numeric"
247
- })
248
- .formatToParts()
249
- .find(({ type }) => type === "dayPeriod");
250
- return !!(meridiem === null || meridiem === undefined
251
- ? undefined
252
- : meridiem.value);
253
- };
254
-
255
- /**
256
- * Return Option object for Time formatting
257
- *
258
- * @param {boolean} withSeconds true or false depending on seconds to be included
259
- * @param {boolean} is12h 12 hour format
260
- * @returns {object} options object time formatting
261
- * Example : getTimeOptions(false, true) returns {hour: 'numeric',minute: 'numeric',hour12: true}
262
- */
263
- export const getTimeOptions = (withSeconds, is12h = false) => {
264
- return {
265
- hour: "numeric",
266
- minute: "numeric",
267
- ...(withSeconds && { second: "numeric" }),
268
- hour12: is12h
269
- };
270
- };
271
-
272
- /**
273
- * Return Option object for Datetime formatting
274
- *
275
- * @param {boolean} withSeconds true or false depending on seconds to be included
276
- * @param {boolean} is12h 12 hour format
277
- * @returns {object} options object datetime formatting
278
- * Example : getDateTimeOptions(false, true) returns {year: 'numeric',month: 'numeric',day: 'numeric',hour: 'numeric',minute: 'numeric',hour12: true}
279
- */
280
- export const getDateTimeOptions = (withSeconds, is12h = false) => {
281
- return {
282
- year: "numeric",
283
- month: "numeric",
284
- day: "numeric",
285
- ...getTimeOptions(withSeconds, is12h)
286
- };
287
- };
@@ -1,161 +0,0 @@
1
- import { EmailDisplay, PhoneDisplay, URLDisplay, Image, Button, Lightbox } from '@pega/cosmos-react-core';
2
- import { useRef, useState } from 'react';
3
-
4
- export const formatExists = (formatterVal) => {
5
- const formatterValues = ['TextInput', 'Email', 'Phone'];
6
- let isformatter = false;
7
- if (formatterValues.includes(formatterVal)) {
8
- isformatter = true;
9
- }
10
- return isformatter;
11
- };
12
-
13
- const urlLabelVal = (urlLabelSelection, btnVal, urlLabel, propUrlLabel) => {
14
- if ((urlLabel !== '' || propUrlLabel !== '') && btnVal !== null) {
15
- switch (urlLabelSelection) {
16
- case 'constant': {
17
- btnVal = urlLabel;
18
- break;
19
- }
20
- case 'propertyRef': {
21
- btnVal = propUrlLabel;
22
- break;
23
- }
24
- // no default
25
- }
26
- }
27
- return btnVal;
28
- };
29
-
30
- const isImage = (url) => /\.(jpg|jpeg|png|webp|avif|gif|svg)$/.test(url);
31
-
32
- const TableImage = (imageProps) => {
33
- const { value, altText, altTextOfImage, propaltTextOfImage, urlLabelSelection, urlLabel, propUrlLabel } = imageProps;
34
- const demoButtonRef = useRef(null);
35
- let imageDisplayComp = null;
36
- const [images, setImages] = useState(null);
37
- const imgDescription = {
38
- id: 'url',
39
- name: urlLabelSelection === 'constant' ? urlLabel : propUrlLabel,
40
- description: altText === 'constant' ? altTextOfImage : propaltTextOfImage,
41
- src: value
42
- };
43
- const onClick = () => {
44
- setImages([imgDescription]);
45
- };
46
- const onItemDownload = async (id) => {
47
- const a = document.createElement('a');
48
- a.href = await fetch(images[0].src)
49
- .then((response) => {
50
- return response.blob();
51
- })
52
- .then((blob) => {
53
- return URL.createObjectURL(blob);
54
- });
55
- a.download = images?.find((image) => image.id === id)?.name ?? id;
56
- document.body.appendChild(a);
57
- a.click();
58
- document.body.removeChild(a);
59
- };
60
- let btnVal = value;
61
- btnVal = urlLabelVal(urlLabelSelection, btnVal, urlLabel, propUrlLabel);
62
- imageDisplayComp = (
63
- <>
64
- {btnVal !== null && (
65
- <Button ref={demoButtonRef} variant='link' compact={false} onClick={onClick} autoFocus>
66
- {btnVal}
67
- </Button>
68
- )}
69
- {images && (
70
- <Lightbox
71
- items={images}
72
- cycle={false}
73
- onAfterClose={() => {
74
- setImages(null);
75
- demoButtonRef.current?.focus();
76
- }}
77
- onItemDownload={isImage(images[0].src) ? onItemDownload : undefined}
78
- />
79
- )}
80
- </>
81
- );
82
- return imageDisplayComp;
83
- };
84
-
85
- export const textFormatter = (formatter, value) => {
86
- let displayComponent = null;
87
- switch (formatter) {
88
- case 'TextInput': {
89
- displayComponent = value;
90
- break;
91
- }
92
- case 'Email': {
93
- displayComponent = <EmailDisplay value={value} displayText={value} variant='link' />;
94
- break;
95
- }
96
- case 'Phone': {
97
- displayComponent = <PhoneDisplay value={value} variant='link' />;
98
- break;
99
- }
100
- // no default
101
- }
102
- return displayComponent;
103
- };
104
-
105
- /**
106
- * Returns a URL display component based on the options
107
- * @function urlFormatter
108
- * @param {string} value value
109
- * @param {object} options options for formatting
110
- * { displayAs,tableDisplayAs,isTableFormatter,altText,altTextOfImage,propaltTextOfImage,urlLabelSelection, urlLabel,propUrlLabel, widthSel, customWidth}
111
- */
112
- export const urlFormatter = (value, options) => {
113
- const {
114
- displayAs,
115
- tableDisplayAs,
116
- isTableFormatter,
117
- altText,
118
- altTextOfImage,
119
- propaltTextOfImage,
120
- urlLabelSelection,
121
- urlLabel,
122
- propUrlLabel,
123
- widthSel,
124
- customWidth
125
- } = options;
126
-
127
- let urlFormatComp = null;
128
- if (
129
- (displayAs === 'labelText' || (isTableFormatter && tableDisplayAs === 'link')) &&
130
- (urlLabel !== '' || propUrlLabel !== '')
131
- ) {
132
- urlFormatComp = (
133
- <URLDisplay
134
- target='_blank'
135
- value={value}
136
- displayText={urlLabelSelection === 'constant' ? urlLabel : propUrlLabel}
137
- variant='link'
138
- />
139
- );
140
- } else if ((displayAs === 'Image' || tableDisplayAs === 'Image') && !!value) {
141
- if (isTableFormatter) {
142
- urlFormatComp = TableImage({
143
- value,
144
- altText,
145
- altTextOfImage,
146
- propaltTextOfImage,
147
- urlLabelSelection,
148
- urlLabel,
149
- propUrlLabel
150
- });
151
- } else {
152
- const width = widthSel === 'widthpx' ? customWidth : null;
153
- urlFormatComp = (
154
- <Image src={value} width={width} alt={altText === 'constant' ? altTextOfImage : propaltTextOfImage} />
155
- );
156
- }
157
- } else {
158
- urlFormatComp = <URLDisplay target='_blank' value={value} displayText={value} variant='link' />;
159
- }
160
- return urlFormatComp;
161
- };
@@ -1,161 +0,0 @@
1
- import { EmailDisplay, PhoneDisplay, URLDisplay, Image, Button, Lightbox } from '@pega/cosmos-react-core';
2
- import { useRef, useState } from 'react';
3
-
4
- export const formatExists = (formatterVal) => {
5
- const formatterValues = ['TextInput', 'Email', 'Phone'];
6
- let isformatter = false;
7
- if (formatterValues.includes(formatterVal)) {
8
- isformatter = true;
9
- }
10
- return isformatter;
11
- };
12
-
13
- const urlLabelVal = (urlLabelSelection, btnVal, urlLabel, propUrlLabel) => {
14
- if ((urlLabel !== '' || propUrlLabel !== '') && btnVal !== null) {
15
- switch (urlLabelSelection) {
16
- case 'constant': {
17
- btnVal = urlLabel;
18
- break;
19
- }
20
- case 'propertyRef': {
21
- btnVal = propUrlLabel;
22
- break;
23
- }
24
- // no default
25
- }
26
- }
27
- return btnVal;
28
- };
29
-
30
- const isImage = (url) => /\.(jpg|jpeg|png|webp|avif|gif|svg)$/.test(url);
31
-
32
- const TableImage = (imageProps) => {
33
- const { value, altText, altTextOfImage, propaltTextOfImage, urlLabelSelection, urlLabel, propUrlLabel } = imageProps;
34
- const demoButtonRef = useRef(null);
35
- let imageDisplayComp = null;
36
- const [images, setImages] = useState(null);
37
- const imgDescription = {
38
- id: 'url',
39
- name: urlLabelSelection === 'constant' ? urlLabel : propUrlLabel,
40
- description: altText === 'constant' ? altTextOfImage : propaltTextOfImage,
41
- src: value
42
- };
43
- const onClick = () => {
44
- setImages([imgDescription]);
45
- };
46
- const onItemDownload = async (id) => {
47
- const a = document.createElement('a');
48
- a.href = await fetch(images[0].src)
49
- .then((response) => {
50
- return response.blob();
51
- })
52
- .then((blob) => {
53
- return URL.createObjectURL(blob);
54
- });
55
- a.download = images?.find((image) => image.id === id)?.name ?? id;
56
- document.body.appendChild(a);
57
- a.click();
58
- document.body.removeChild(a);
59
- };
60
- let btnVal = value;
61
- btnVal = urlLabelVal(urlLabelSelection, btnVal, urlLabel, propUrlLabel);
62
- imageDisplayComp = (
63
- <>
64
- {btnVal !== null && (
65
- <Button ref={demoButtonRef} variant='link' compact={false} onClick={onClick} autoFocus>
66
- {btnVal}
67
- </Button>
68
- )}
69
- {images && (
70
- <Lightbox
71
- items={images}
72
- cycle={false}
73
- onAfterClose={() => {
74
- setImages(null);
75
- demoButtonRef.current?.focus();
76
- }}
77
- onItemDownload={isImage(images[0].src) ? onItemDownload : undefined}
78
- />
79
- )}
80
- </>
81
- );
82
- return imageDisplayComp;
83
- };
84
-
85
- export const textFormatter = (formatter, value) => {
86
- let displayComponent = null;
87
- switch (formatter) {
88
- case 'TextInput': {
89
- displayComponent = value;
90
- break;
91
- }
92
- case 'Email': {
93
- displayComponent = <EmailDisplay value={value} displayText={value} variant='link' />;
94
- break;
95
- }
96
- case 'Phone': {
97
- displayComponent = <PhoneDisplay value={value} variant='link' />;
98
- break;
99
- }
100
- // no default
101
- }
102
- return displayComponent;
103
- };
104
-
105
- /**
106
- * Returns a URL display component based on the options
107
- * @function urlFormatter
108
- * @param {string} value value
109
- * @param {object} options options for formatting
110
- * { displayAs,tableDisplayAs,isTableFormatter,altText,altTextOfImage,propaltTextOfImage,urlLabelSelection, urlLabel,propUrlLabel, widthSel, customWidth}
111
- */
112
- export const urlFormatter = (value, options) => {
113
- const {
114
- displayAs,
115
- tableDisplayAs,
116
- isTableFormatter,
117
- altText,
118
- altTextOfImage,
119
- propaltTextOfImage,
120
- urlLabelSelection,
121
- urlLabel,
122
- propUrlLabel,
123
- widthSel,
124
- customWidth
125
- } = options;
126
-
127
- let urlFormatComp = null;
128
- if (
129
- (displayAs === 'labelText' || (isTableFormatter && tableDisplayAs === 'link')) &&
130
- (urlLabel !== '' || propUrlLabel !== '')
131
- ) {
132
- urlFormatComp = (
133
- <URLDisplay
134
- target='_blank'
135
- value={value}
136
- displayText={urlLabelSelection === 'constant' ? urlLabel : propUrlLabel}
137
- variant='link'
138
- />
139
- );
140
- } else if ((displayAs === 'Image' || tableDisplayAs === 'Image') && !!value) {
141
- if (isTableFormatter) {
142
- urlFormatComp = TableImage({
143
- value,
144
- altText,
145
- altTextOfImage,
146
- propaltTextOfImage,
147
- urlLabelSelection,
148
- urlLabel,
149
- propUrlLabel
150
- });
151
- } else {
152
- const width = widthSel === 'widthpx' ? customWidth : null;
153
- urlFormatComp = (
154
- <Image src={value} width={width} alt={altText === 'constant' ? altTextOfImage : propaltTextOfImage} />
155
- );
156
- }
157
- } else {
158
- urlFormatComp = <URLDisplay target='_blank' value={value} displayText={value} variant='link' />;
159
- }
160
- return urlFormatComp;
161
- };