@pega/custom-dx-components 23.1.11 → 23.1.12

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 (391) hide show
  1. package/README.md +3 -3
  2. package/SECURITY.md +10 -0
  3. package/package.json +1 -1
  4. package/src/constants.js +1 -0
  5. package/src/tasks/build-all/index.js +10 -25
  6. package/src/tasks/build-comp/index.js +1 -0
  7. package/src/tasks/bundle/builder/index.js +6 -3
  8. package/src/tasks/create/templates/Constellation/Field/Boolean/Boolean.ts.mustache +35 -0
  9. package/src/tasks/create/templates/Constellation/Field/Boolean/demo.stories.tsx.mustache +23 -6
  10. package/src/tasks/create/templates/Constellation/Field/Boolean/index.tsx.mustache +10 -47
  11. package/src/tasks/create/templates/Constellation/Field/Boolean/mock.ts.mustache +2 -1
  12. package/src/tasks/create/templates/Constellation/Field/Boolean/styles.ts.mustache +7 -14
  13. package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/DateFormatter.js → src/tasks/create/templates/Constellation/Field/Date/DateFormatter.ts.mustache} +6 -6
  14. package/src/tasks/create/templates/Constellation/Field/Date/FormattedText.tsx.mustache +20 -0
  15. package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/date.js → src/tasks/create/templates/Constellation/Field/Date/date.ts.mustache} +2 -2
  16. package/src/tasks/create/templates/Constellation/Field/Date/demo.stories.tsx.mustache +24 -6
  17. package/src/tasks/create/templates/Constellation/Field/Date/index.tsx.mustache +18 -59
  18. package/src/tasks/create/templates/Constellation/Field/Date/mock.ts.mustache +2 -1
  19. package/src/tasks/create/templates/Constellation/Field/Date/styles.ts.mustache +7 -14
  20. package/src/tasks/create/templates/Constellation/Field/DateTime/{date-time.js.mustache → date-time.ts.mustache} +12 -12
  21. 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
  22. package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date.js → src/tasks/create/templates/Constellation/Field/DateTime/date.ts.mustache} +1 -0
  23. package/src/tasks/create/templates/Constellation/Field/DateTime/demo.stories.tsx.mustache +25 -7
  24. package/src/tasks/create/templates/Constellation/Field/DateTime/index.tsx.mustache +12 -59
  25. package/src/tasks/create/templates/Constellation/Field/DateTime/mock.ts.mustache +2 -1
  26. package/src/tasks/create/templates/Constellation/Field/DateTime/styles.ts.mustache +7 -14
  27. package/src/tasks/create/templates/Constellation/Field/Decimal/demo.stories.tsx.mustache +25 -7
  28. package/src/tasks/create/templates/Constellation/Field/Decimal/index.tsx.mustache +14 -67
  29. package/src/tasks/create/templates/Constellation/Field/Decimal/mock.ts.mustache +8 -1
  30. package/src/tasks/create/templates/Constellation/Field/Decimal/styles.ts.mustache +7 -14
  31. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/demo.stories.tsx.mustache +27 -7
  32. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/index.tsx.mustache +23 -75
  33. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/mock.ts.mustache +9 -1
  34. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/styles.ts.mustache +7 -14
  35. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/demo.stories.tsx.mustache +24 -7
  36. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/index.tsx.mustache +13 -54
  37. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/mock.ts.mustache +8 -2
  38. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/styles.ts.mustache +7 -14
  39. package/src/tasks/create/templates/Constellation/Field/Integer/demo.stories.tsx.mustache +24 -7
  40. package/src/tasks/create/templates/Constellation/Field/Integer/index.tsx.mustache +23 -87
  41. package/src/tasks/create/templates/Constellation/Field/Integer/mock.ts.mustache +8 -2
  42. package/src/tasks/create/templates/Constellation/Field/Integer/styles.ts.mustache +7 -14
  43. package/src/tasks/create/templates/Constellation/Field/Picklist/demo.stories.tsx.mustache +24 -7
  44. package/src/tasks/create/templates/Constellation/Field/Picklist/index.tsx.mustache +12 -60
  45. package/src/tasks/create/templates/Constellation/Field/Picklist/mock.ts.mustache +8 -1
  46. package/src/tasks/create/templates/Constellation/Field/Picklist/styles.ts.mustache +7 -14
  47. package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/date.js → src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/date.ts.mustache} +2 -1
  48. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/demo.stories.tsx.mustache +25 -7
  49. 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
  50. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/index.tsx.mustache +15 -76
  51. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/mock.ts.mustache +8 -1
  52. 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
  53. 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
  54. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/{repeat-utils.js.mustache → repeat-utils.ts.mustache} +6 -12
  55. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/styles.ts.mustache +7 -14
  56. 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
  57. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/utils.ts.mustache +1 -1
  58. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/demo.stories.tsx.mustache +26 -8
  59. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/index.tsx.mustache +11 -58
  60. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/mock.ts.mustache +9 -1
  61. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/styles.ts.mustache +7 -14
  62. package/src/tasks/create/templates/Constellation/Field/{Picklist-Autocomplete/textformat-utils.jsx.mustache → Picklist-RadioButtons/textformat-utils.tsx.mustache} +1 -0
  63. package/src/tasks/create/templates/Constellation/Field/Text/demo.stories.tsx.mustache +23 -6
  64. package/src/tasks/create/templates/Constellation/Field/Text/index.tsx.mustache +4 -22
  65. package/src/tasks/create/templates/Constellation/Field/Text/mock.ts.mustache +8 -1
  66. package/src/tasks/create/templates/Constellation/Field/Text/styles.ts.mustache +7 -14
  67. package/src/tasks/create/templates/Constellation/Field/Text-Email/demo.stories.tsx.mustache +24 -7
  68. package/src/tasks/create/templates/Constellation/Field/Text-Email/index.tsx.mustache +9 -46
  69. package/src/tasks/create/templates/Constellation/Field/Text-Email/mock.ts.mustache +8 -1
  70. package/src/tasks/create/templates/Constellation/Field/Text-Email/styles.ts.mustache +7 -14
  71. package/src/tasks/create/templates/Constellation/Field/Text-Input/demo.stories.tsx.mustache +24 -7
  72. package/src/tasks/create/templates/Constellation/Field/Text-Input/index.tsx.mustache +10 -50
  73. package/src/tasks/create/templates/Constellation/Field/Text-Input/mock.ts.mustache +8 -1
  74. package/src/tasks/create/templates/Constellation/Field/Text-Input/styles.ts.mustache +7 -14
  75. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/demo.stories.tsx.mustache +24 -7
  76. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/index.tsx.mustache +12 -48
  77. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/mock.ts.mustache +8 -1
  78. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/styles.ts.mustache +7 -14
  79. package/src/tasks/create/templates/Constellation/Field/Text-Phone/demo.stories.tsx.mustache +24 -7
  80. package/src/tasks/create/templates/Constellation/Field/Text-Phone/index.tsx.mustache +13 -52
  81. package/src/tasks/create/templates/Constellation/Field/Text-Phone/mock.ts.mustache +8 -1
  82. package/src/tasks/create/templates/Constellation/Field/Text-Phone/styles.ts.mustache +7 -14
  83. package/src/tasks/create/templates/Constellation/Field/Text-URL/demo.stories.tsx.mustache +24 -7
  84. package/src/tasks/create/templates/Constellation/Field/Text-URL/index.tsx.mustache +15 -71
  85. package/src/tasks/create/templates/Constellation/Field/Text-URL/mock.ts.mustache +8 -1
  86. package/src/tasks/create/templates/Constellation/Field/Text-URL/styles.ts.mustache +7 -14
  87. package/src/tasks/create/templates/Constellation/Field/Text-URL/{text-url.jsx.mustache → text-url.tsx.mustache} +4 -3
  88. package/src/tasks/create/templates/Constellation/Field/TimeofDay/demo.stories.tsx.mustache +23 -7
  89. package/src/tasks/create/templates/Constellation/Field/TimeofDay/index.tsx.mustache +16 -52
  90. package/src/tasks/create/templates/Constellation/Field/TimeofDay/mock.ts.mustache +2 -1
  91. package/src/tasks/create/templates/Constellation/Field/TimeofDay/styles.ts.mustache +7 -14
  92. package/src/tasks/create/templates/Constellation/Field/{DateTime/date-utils.js.mustache → TimeofDay/time-of-day.ts.mustache} +24 -23
  93. package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.stories.tsx.mustache +17 -6
  94. package/src/tasks/create/templates/Constellation/Template/DETAILS/index.tsx.mustache +4 -17
  95. package/src/tasks/create/templates/Constellation/Template/DETAILS/styles.ts.mustache +7 -14
  96. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/demo.stories.tsx.mustache +13 -4
  97. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/index.tsx.mustache +4 -18
  98. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/styles.ts.mustache +7 -14
  99. package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/utils.js → src/tasks/create/templates/Constellation/Template/DETAILS-region/utils.ts.mustache} +15 -13
  100. package/src/tasks/create/templates/Constellation/Template/FORM/demo.stories.tsx.mustache +14 -6
  101. package/src/tasks/create/templates/Constellation/Template/FORM/index.tsx.mustache +5 -13
  102. package/src/tasks/create/templates/Constellation/Template/FORM/styles.ts.mustache +7 -14
  103. package/src/tasks/create/templates/Constellation/Template/FORM-region/demo.stories.tsx.mustache +14 -6
  104. package/src/tasks/create/templates/Constellation/Template/FORM-region/index.tsx.mustache +4 -10
  105. package/src/tasks/create/templates/Constellation/Template/FORM-region/styles.ts.mustache +7 -14
  106. package/src/tasks/create/templates/Constellation/Template/PAGE/demo.stories.tsx.mustache +11 -6
  107. package/src/tasks/create/templates/Constellation/Template/PAGE/index.tsx.mustache +5 -16
  108. package/src/tasks/create/templates/Constellation/Template/PAGE/styles.ts.mustache +7 -14
  109. package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/utils.js → src/tasks/create/templates/Constellation/Template/PAGE/utils.ts.mustache} +28 -14
  110. package/src/tasks/create/templates/Constellation/Widget/CASE/demo.stories.tsx.mustache +11 -6
  111. package/src/tasks/create/templates/Constellation/Widget/CASE/index.tsx.mustache +3 -10
  112. package/src/tasks/create/templates/Constellation/Widget/CASE/styles.ts.mustache +7 -14
  113. package/src/tasks/create/templates/Constellation/Widget/PAGE/demo.stories.tsx.mustache +14 -6
  114. package/src/tasks/create/templates/Constellation/Widget/PAGE/index.tsx.mustache +4 -18
  115. package/src/tasks/create/templates/Constellation/Widget/PAGE/styles.ts.mustache +7 -14
  116. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Avatar.tsx.mustache +3 -13
  117. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Operator.tsx.mustache +4 -19
  118. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/demo.stories.tsx.mustache +11 -6
  119. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/index.tsx.mustache +24 -39
  120. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/styles.ts.mustache +7 -14
  121. package/src/tasks/create/templates/Launchpad/Widget/CASE/demo.stories.tsx.mustache +11 -6
  122. package/src/tasks/create/templates/Launchpad/Widget/CASE/index.tsx.mustache +3 -9
  123. package/src/tasks/create/templates/Launchpad/Widget/CASE/styles.ts.mustache +7 -14
  124. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/Avatar.tsx.mustache +1 -11
  125. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/Operator.tsx.mustache +33 -51
  126. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/demo.stories.tsx.mustache +11 -6
  127. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/index.tsx.mustache +22 -21
  128. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/styles.ts.mustache +7 -14
  129. package/src/tasks/delete-all/helper.js +37 -5
  130. package/src/tasks/init/template/.eslintignore +6 -0
  131. package/src/tasks/init/template/README.md +4 -4
  132. package/src/tasks/init/template/SECURITY.md +10 -0
  133. package/src/tasks/init/template/package.json.mustache +12 -14
  134. package/src/tasks/init/template/tasks.config.json +2 -1
  135. package/src/tasks/linter/index.js +7 -4
  136. package/src/tasks/list/helper.js +10 -0
  137. package/src/tasks/list/index.js +20 -3
  138. package/src/tasks/promote-webpack/index.js +6 -32
  139. package/src/tasks/publish/helper.js +1 -1
  140. package/src/tasks/publish/index.js +6 -4
  141. package/src/tasks/publish-all/helper.js +52 -40
  142. package/src/tasks/publish-all/index.js +16 -17
  143. package/src/tasks/revert-webpack/index.js +4 -23
  144. package/src/util.js +171 -66
  145. package/tests/assets/components/create/Pega_DXIL_MyTestText/demo.stories.tsx +23 -6
  146. package/tests/assets/components/create/Pega_DXIL_MyTestText/index.tsx +4 -22
  147. package/tests/assets/components/create/Pega_DXIL_MyTestText/mock.ts +8 -1
  148. package/tests/assets/components/create/Pega_DXIL_MyTestText/styles.ts +7 -14
  149. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/Boolean.ts +35 -0
  150. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/demo.stories.tsx +23 -6
  151. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/index.tsx +10 -47
  152. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/mock.ts +2 -1
  153. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/styles.ts +7 -14
  154. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/demo.stories.tsx +11 -6
  155. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/index.tsx +3 -10
  156. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/styles.ts +7 -14
  157. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/demo.stories.tsx +27 -7
  158. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/index.tsx +23 -75
  159. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/mock.ts +9 -1
  160. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/styles.ts +7 -14
  161. package/{src/tasks/create/templates/Constellation/Field/Date/DateFormatter.js.mustache → tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/DateFormatter.ts} +6 -6
  162. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/FormattedText.tsx +20 -0
  163. package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MyDate/date.js → Constellation/Pega_DXIL_MyDate/date.ts} +2 -2
  164. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/demo.stories.tsx +24 -6
  165. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/index.tsx +18 -59
  166. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/mock.ts +2 -1
  167. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/styles.ts +7 -14
  168. package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MyDateTime/date-time.js → Constellation/Pega_DXIL_MyDateTime/date-time.ts} +12 -12
  169. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date-utils.ts +288 -0
  170. package/{src/tasks/create/templates/Constellation/Field/DateTime/date.js.mustache → tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date.ts} +1 -0
  171. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/demo.stories.tsx +25 -7
  172. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/index.tsx +12 -59
  173. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/mock.ts +2 -1
  174. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/styles.ts +7 -14
  175. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/demo.stories.tsx +25 -7
  176. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/index.tsx +14 -67
  177. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/mock.ts +8 -1
  178. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/styles.ts +7 -14
  179. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/demo.stories.tsx +15 -4
  180. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/index.tsx +4 -17
  181. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/styles.ts +7 -14
  182. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/demo.stories.tsx +24 -7
  183. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/index.tsx +9 -46
  184. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/mock.ts +8 -1
  185. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/styles.ts +7 -14
  186. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/demo.stories.tsx +14 -6
  187. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/index.tsx +5 -13
  188. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/styles.ts +7 -14
  189. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/demo.stories.tsx +24 -7
  190. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/index.tsx +23 -87
  191. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/mock.ts +8 -2
  192. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/styles.ts +7 -14
  193. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/demo.stories.tsx +11 -6
  194. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/index.tsx +5 -16
  195. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/styles.ts +7 -14
  196. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/{utils.js → utils.ts} +28 -14
  197. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/Avatar.tsx +3 -13
  198. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/Operator.tsx +4 -19
  199. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +11 -6
  200. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/index.tsx +24 -39
  201. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/styles.ts +7 -14
  202. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/demo.stories.tsx +14 -6
  203. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/index.tsx +4 -18
  204. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/styles.ts +7 -14
  205. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/demo.stories.tsx +24 -7
  206. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/index.tsx +12 -48
  207. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/mock.ts +8 -1
  208. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/styles.ts +7 -14
  209. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/demo.stories.tsx +24 -7
  210. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/index.tsx +13 -54
  211. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/mock.ts +8 -2
  212. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/styles.ts +7 -14
  213. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/demo.stories.tsx +24 -7
  214. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/index.tsx +13 -52
  215. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/mock.ts +8 -1
  216. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/styles.ts +7 -14
  217. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/demo.stories.tsx +24 -7
  218. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/index.tsx +12 -60
  219. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/mock.ts +8 -1
  220. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/styles.ts +7 -14
  221. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/demo.stories.tsx +26 -8
  222. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/index.tsx +11 -58
  223. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/mock.ts +9 -1
  224. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/styles.ts +7 -14
  225. package/tests/assets/components/createAll/Constellation/{Pega_DXIL_MySearchbox/textformat-utils.jsx → Pega_DXIL_MyRadioButtons/textformat-utils.tsx} +1 -0
  226. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/{date.js → date.ts} +2 -1
  227. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/demo.stories.tsx +25 -7
  228. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/{embed-utils.js → embed-utils.ts} +2 -1
  229. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/index.tsx +15 -76
  230. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/mock.ts +8 -1
  231. package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MySearchbox/picklist-utils.js → Constellation/Pega_DXIL_MySearchbox/picklist-utils.ts} +1 -0
  232. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/{repeat-constants.js → repeat-constants.ts} +1 -1
  233. package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MySearchbox/repeat-utils.js → Constellation/Pega_DXIL_MySearchbox/repeat-utils.ts} +6 -12
  234. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/styles.ts +7 -14
  235. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/textformat-utils.tsx +181 -0
  236. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/utils.ts +1 -1
  237. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/demo.stories.tsx +23 -6
  238. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/index.tsx +4 -22
  239. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/mock.ts +8 -1
  240. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/styles.ts +7 -14
  241. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/demo.stories.tsx +24 -7
  242. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/index.tsx +10 -50
  243. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/mock.ts +8 -1
  244. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/styles.ts +7 -14
  245. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +23 -7
  246. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/index.tsx +16 -52
  247. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/mock.ts +2 -1
  248. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/styles.ts +7 -14
  249. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/{time-of-day.js → time-of-day.ts} +24 -23
  250. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +13 -4
  251. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/index.tsx +4 -18
  252. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/styles.ts +7 -14
  253. package/{src/tasks/create/templates/Constellation/Template/DETAILS-region/utils.js.mustache → tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/utils.ts} +15 -13
  254. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/demo.stories.tsx +14 -6
  255. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/index.tsx +4 -10
  256. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/styles.ts +7 -14
  257. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/demo.stories.tsx +24 -7
  258. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/index.tsx +15 -71
  259. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/mock.ts +8 -1
  260. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/styles.ts +7 -14
  261. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/{text-url.jsx → text-url.tsx} +4 -3
  262. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/Boolean.ts +35 -0
  263. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/demo.stories.tsx +23 -6
  264. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/index.tsx +10 -47
  265. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/mock.ts +2 -1
  266. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/styles.ts +7 -14
  267. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/demo.stories.tsx +11 -6
  268. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/index.tsx +3 -9
  269. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/styles.ts +7 -14
  270. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/demo.stories.tsx +27 -7
  271. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/index.tsx +23 -75
  272. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/mock.ts +9 -1
  273. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/styles.ts +7 -14
  274. package/tests/assets/components/createAll/{Constellation/Pega_DXIL_MyDate/DateFormatter.js → Launchpad/Pega_DXIL_MyDate/DateFormatter.ts} +6 -6
  275. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/FormattedText.tsx +20 -0
  276. package/{src/tasks/create/templates/Constellation/Field/Date/date.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/date.ts} +2 -2
  277. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/demo.stories.tsx +24 -6
  278. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/index.tsx +18 -59
  279. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/mock.ts +2 -1
  280. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/styles.ts +7 -14
  281. package/tests/assets/components/createAll/{Constellation/Pega_DXIL_MyDateTime/date-time.js → Launchpad/Pega_DXIL_MyDateTime/date-time.ts} +12 -12
  282. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date-utils.ts +288 -0
  283. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/{date.js → date.ts} +1 -0
  284. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/demo.stories.tsx +25 -7
  285. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/index.tsx +12 -59
  286. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/mock.ts +2 -1
  287. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/styles.ts +7 -14
  288. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/demo.stories.tsx +25 -7
  289. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/index.tsx +14 -67
  290. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/mock.ts +8 -1
  291. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/styles.ts +7 -14
  292. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/demo.stories.tsx +15 -4
  293. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/index.tsx +4 -17
  294. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/styles.ts +7 -14
  295. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/demo.stories.tsx +24 -7
  296. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/index.tsx +9 -46
  297. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/mock.ts +8 -1
  298. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/styles.ts +7 -14
  299. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/demo.stories.tsx +14 -6
  300. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/index.tsx +5 -13
  301. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/styles.ts +7 -14
  302. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/demo.stories.tsx +24 -7
  303. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/index.tsx +23 -87
  304. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/mock.ts +8 -2
  305. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/styles.ts +7 -14
  306. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/demo.stories.tsx +11 -6
  307. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/index.tsx +5 -16
  308. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/styles.ts +7 -14
  309. package/{src/tasks/create/templates/Constellation/Template/PAGE/utils.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/utils.ts} +28 -14
  310. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/Avatar.tsx +1 -11
  311. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/Operator.tsx +33 -51
  312. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +11 -6
  313. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/index.tsx +22 -20
  314. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/styles.ts +7 -14
  315. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/demo.stories.tsx +14 -6
  316. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/index.tsx +4 -18
  317. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/styles.ts +7 -14
  318. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/demo.stories.tsx +24 -7
  319. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/index.tsx +12 -48
  320. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/mock.ts +8 -1
  321. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/styles.ts +7 -14
  322. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/demo.stories.tsx +24 -7
  323. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/index.tsx +13 -54
  324. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/mock.ts +8 -2
  325. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/styles.ts +7 -14
  326. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/demo.stories.tsx +24 -7
  327. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/index.tsx +13 -52
  328. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/mock.ts +8 -1
  329. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/styles.ts +7 -14
  330. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/demo.stories.tsx +24 -7
  331. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/index.tsx +12 -60
  332. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/mock.ts +8 -1
  333. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/styles.ts +7 -14
  334. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/demo.stories.tsx +26 -8
  335. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/index.tsx +11 -58
  336. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/mock.ts +9 -1
  337. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/styles.ts +7 -14
  338. 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
  339. package/{src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/date.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/date.ts} +2 -1
  340. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/demo.stories.tsx +25 -7
  341. 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
  342. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/index.tsx +15 -76
  343. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/mock.ts +8 -1
  344. 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
  345. 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
  346. package/tests/assets/components/createAll/{Constellation/Pega_DXIL_MySearchbox/repeat-utils.js → Launchpad/Pega_DXIL_MySearchbox/repeat-utils.ts} +6 -12
  347. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/styles.ts +7 -14
  348. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/textformat-utils.tsx +181 -0
  349. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/utils.ts +1 -1
  350. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/demo.stories.tsx +23 -6
  351. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/index.tsx +4 -22
  352. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/mock.ts +8 -1
  353. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/styles.ts +7 -14
  354. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/demo.stories.tsx +24 -7
  355. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/index.tsx +10 -50
  356. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/mock.ts +8 -1
  357. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/styles.ts +7 -14
  358. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +23 -7
  359. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/index.tsx +16 -52
  360. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/mock.ts +2 -1
  361. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/styles.ts +7 -14
  362. 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
  363. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +13 -4
  364. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/index.tsx +4 -18
  365. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/styles.ts +7 -14
  366. package/tests/assets/components/createAll/{Constellation/Pega_DXIL_MyTwoColumnDetails/utils.js → Launchpad/Pega_DXIL_MyTwoColumnDetails/utils.ts} +15 -13
  367. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/demo.stories.tsx +14 -6
  368. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/index.tsx +4 -10
  369. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/styles.ts +7 -14
  370. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/demo.stories.tsx +24 -7
  371. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/index.tsx +15 -71
  372. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/mock.ts +8 -1
  373. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/styles.ts +7 -14
  374. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/{text-url.jsx → text-url.tsx} +4 -3
  375. package/tests/functional/localCreateAllListDeleteAll.test.js +10 -3
  376. package/src/tasks/create/templates/Constellation/Field/Boolean/Boolean.js.mustache +0 -38
  377. package/src/tasks/create/templates/Constellation/Field/Date/FormattedText.jsx.mustache +0 -41
  378. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/Boolean.js +0 -38
  379. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/FormattedText.jsx +0 -41
  380. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/Boolean.js +0 -38
  381. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/FormattedText.jsx +0 -41
  382. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date-utils.js +0 -287
  383. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/textformat-utils.jsx +0 -161
  384. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/textformat-utils.jsx +0 -161
  385. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/time-of-day.js +0 -287
  386. /package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/{component-constants.js → component-constants.ts} +0 -0
  387. /package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/{format-constants.js.mustache → format-constants.ts.mustache} +0 -0
  388. /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/{component-constants.js → component-constants.ts} +0 -0
  389. /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/{format-constants.js → format-constants.ts} +0 -0
  390. /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/{component-constants.js → component-constants.ts} +0 -0
  391. /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/{format-constants.js → format-constants.ts} +0 -0
@@ -1,16 +1,25 @@
1
1
 
2
2
  /* eslint-disable react/jsx-no-useless-fragment */
3
3
  // @ts-nocheck
4
+ import type { Meta, StoryObj } from '@storybook/react';
4
5
  import { Text, FieldValueList, Button, DateTimeDisplay, useTheme } from '@pega/cosmos-react-core';
5
- import PegaDxilMyDetails from './index';
6
+ import {{COMPONENT_CLASS_NAME}} from './index';
6
7
  import { pyReviewRaw, pyReviewResolved, regionChildrenResolved } from './mock';
7
8
  import StatusWorkRenderer from './StatusWork';
8
9
 
9
- export default {
10
- title: 'PegaDxilMyDetails',
11
- component: PegaDxilMyDetails
10
+
11
+ const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
12
+ title: '{{COMPONENT_CLASS_NAME}}',
13
+ component: {{COMPONENT_CLASS_NAME}},
14
+ excludeStories: /.*Data$/,
15
+ parameters: {
16
+ type: 'Details'
17
+ }
12
18
  };
13
19
 
20
+ export default meta;
21
+ type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
22
+
14
23
  const renderField = resolvedProps => {
15
24
  const {
16
25
  displayAsStatus = false,
@@ -77,7 +86,7 @@ const renderField = resolvedProps => {
77
86
  return <FieldValueList variant={variant} fields={[{ name: label, value: val }]} key={key} />;
78
87
  };
79
88
 
80
- export const BasePegaDxilMyDetails = () => {
89
+ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
81
90
  const props = {
82
91
  template: 'MyCo_MyComponents_NewDetailsTemplate',
83
92
  showHighlightedData: true,
@@ -132,7 +141,9 @@ export const BasePegaDxilMyDetails = () => {
132
141
 
133
142
  return (
134
143
  <>
135
- <PegaDxilMyDetails {...props}>{regionAChildren}</PegaDxilMyDetails>
144
+ <{{COMPONENT_CLASS_NAME}} {...props} {...args}>{regionAChildren}</{{COMPONENT_CLASS_NAME}}>
136
145
  </>
137
146
  );
138
147
  };
148
+
149
+ Base{{COMPONENT_CLASS_NAME}}.args = {};
@@ -1,7 +1,5 @@
1
1
  import { Fragment } from 'react';
2
- import { Grid, Flex, FieldGroup } from '@pega/cosmos-react-core';
3
- import PropTypes from 'prop-types';
4
-
2
+ import { Grid, Flex, FieldGroup, withConfiguration } from '@pega/cosmos-react-core';
5
3
  import type { PConnFieldProps } from './PConnProps';
6
4
 
7
5
  import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
@@ -22,9 +20,9 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
22
20
 
23
21
  // props passed in combination of props from property panel (config.json) and run time props from Constellation
24
22
  // any default values in config.pros should be set in defaultProps at bottom of this file
25
- export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
23
+ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
26
24
 
27
- const { getPConnect, children, label, showLabel, showHighlightedData } = props;
25
+ const { getPConnect, children, label, showLabel = true, showHighlightedData = false } = props;
28
26
  const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };
29
27
 
30
28
  const numRegions = getAllFields(getPConnect)?.length;
@@ -89,16 +87,5 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
89
87
 
90
88
  }
91
89
 
92
- {{COMPONENT_CLASS_NAME}}.defaultProps = {
93
- label: undefined,
94
- showLabel: true,
95
- showHighlightedData: false
96
- };
97
-
98
90
 
99
- {{COMPONENT_CLASS_NAME}}.propTypes = {
100
- showLabel: PropTypes.bool,
101
- label: PropTypes.string,
102
- getPConnect: PropTypes.func.isRequired,
103
- showHighlightedData: PropTypes.bool
104
- };
91
+ export default withConfiguration({{COMPONENT_CLASS_NAME}});
@@ -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
+ });
@@ -1,16 +1,23 @@
1
1
 
2
2
 
3
3
  // @ts-nocheck
4
+ import type { Meta, StoryObj } from '@storybook/react';
4
5
  import { Text, FieldValueList, Button, DateTimeDisplay, useTheme } from '@pega/cosmos-react-core';
5
6
  import {{COMPONENT_CLASS_NAME}} from './index';
6
7
  import { pyReviewRaw, pyReviewResolved, regionChildrenResolved } from './mock';
7
8
  import StatusWorkRenderer from './StatusWork';
8
9
 
9
- export default {
10
+ const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
10
11
  title: '{{COMPONENT_CLASS_NAME}}',
11
- component: {{COMPONENT_CLASS_NAME}}
12
+ component: {{COMPONENT_CLASS_NAME}},
13
+ excludeStories: /.*Data$/,
14
+ parameters: {
15
+ type: 'Details'
16
+ }
12
17
  };
13
18
 
19
+ export default meta;
20
+ type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
14
21
  const renderField = resolvedProps => {
15
22
  const {
16
23
  displayAsStatus = false,
@@ -77,7 +84,7 @@ const renderField = resolvedProps => {
77
84
  return <FieldValueList variant={variant} fields={[{ name: label, value: val }]} key={key} />;
78
85
  };
79
86
 
80
- export const Base{{COMPONENT_CLASS_NAME}} = () => {
87
+ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
81
88
  const props = {
82
89
  template: 'MyCo_MyComponents_NewDetailsTemplate',
83
90
  showHighlightedData: true,
@@ -134,9 +141,11 @@ export const Base{{COMPONENT_CLASS_NAME}} = () => {
134
141
  });
135
142
 
136
143
  return (
137
- <{{COMPONENT_CLASS_NAME}} {...props}>
144
+ <{{COMPONENT_CLASS_NAME}} {...props} {...args}>
138
145
  {regionAChildren}
139
146
  {regionBChildren}
140
147
  </{{COMPONENT_CLASS_NAME}}>
141
148
  );
142
149
  };
150
+
151
+ Base{{COMPONENT_CLASS_NAME}}.args = {};
@@ -1,7 +1,5 @@
1
1
  import { Fragment } from 'react';
2
- import { Grid, Flex, FieldGroup } from '@pega/cosmos-react-core';
3
- import PropTypes from 'prop-types';
4
-
2
+ import { Grid, Flex, FieldGroup, withConfiguration } from '@pega/cosmos-react-core';
5
3
  import type { PConnFieldProps } from './PConnProps';
6
4
 
7
5
  import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
@@ -21,9 +19,9 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
21
19
 
22
20
  // props passed in combination of props from property panel (config.json) and run time props from Constellation
23
21
  // any default values in config.pros should be set in defaultProps at bottom of this file
24
- export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
22
+ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
25
23
 
26
- const { getPConnect, children, label, showLabel, showHighlightedData } = props;
24
+ const { getPConnect, children, label, showLabel = true, showHighlightedData = false } = props;
27
25
  const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };
28
26
 
29
27
  const numRegions = getAllFields(getPConnect)?.length;
@@ -88,16 +86,4 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
88
86
 
89
87
  }
90
88
 
91
- {{COMPONENT_CLASS_NAME}}.defaultProps = {
92
- label: undefined,
93
- showLabel: true,
94
- showHighlightedData: false
95
- };
96
-
97
-
98
- {{COMPONENT_CLASS_NAME}}.propTypes = {
99
- showLabel: PropTypes.bool,
100
- label: PropTypes.string,
101
- getPConnect: PropTypes.func.isRequired,
102
- showHighlightedData: PropTypes.bool
103
- };
89
+ export default withConfiguration({{COMPONENT_CLASS_NAME}});
@@ -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
+ });
@@ -3,7 +3,7 @@
3
3
  * metadata of all regions.
4
4
  * @param {Function} pConnect PConnect of a Template component.
5
5
  */
6
- export function getAllFields(pConnect) {
6
+ export function getAllFields(pConnect: Function) {
7
7
  const metadata = pConnect().getRawMetadata();
8
8
  if (!metadata.children) {
9
9
  return [];
@@ -11,15 +11,15 @@ export function getAllFields(pConnect) {
11
11
 
12
12
  let allFields = [];
13
13
 
14
- const makeField = (f) => ({
14
+ const makeField = (f: any) => ({
15
15
  ...pConnect().resolveConfigProps(f.config),
16
16
  type: f.type
17
17
  });
18
18
 
19
19
  const hasRegions = !!metadata.children[0]?.children;
20
20
  if (hasRegions) {
21
- allFields = metadata.children.map((region) =>
22
- region.children.map((field) => {
21
+ allFields = metadata.children.map((region: any) =>
22
+ region.children.map((field: any) => {
23
23
  // Do not resolve the config props if is status work, instead create component here as status badge and mark as status display
24
24
  if (field.config?.value === '@P .pyStatusWork') {
25
25
  field.type = 'TextInput';
@@ -39,7 +39,7 @@ export function getAllFields(pConnect) {
39
39
 
40
40
 
41
41
 
42
- export function getFilteredFields(getPConnect) {
42
+ export function getFilteredFields(getPConnect: Function) {
43
43
  let primaryFieldsRaw;
44
44
  let secondaryFieldsRaw;
45
45
  const metadata = getPConnect().getRawMetadata();
@@ -52,12 +52,12 @@ export function getFilteredFields(getPConnect) {
52
52
  }
53
53
 
54
54
  // Filter out fields that are not visible and unsupported types for primary fields (for CaseSummary)
55
- primaryFieldsRaw = primaryFieldsRaw.filter((item) => {
55
+ primaryFieldsRaw = primaryFieldsRaw.filter((item: any) => {
56
56
  const resolvedItem = getPConnect().resolveConfigProps(item.config);
57
57
  return resolvedItem.visibility !== false && item.type !== 'TextContent';
58
58
  });
59
59
 
60
- secondaryFieldsRaw = secondaryFieldsRaw.filter((item) => {
60
+ secondaryFieldsRaw = secondaryFieldsRaw.filter((item: any) => {
61
61
  const resolvedItem = getPConnect().resolveConfigProps(item.config);
62
62
  return resolvedItem.visibility !== false && item.type !== 'TextContent';
63
63
  });
@@ -70,7 +70,7 @@ export function getFilteredFields(getPConnect) {
70
70
  * @param {object[]} regionData template children item.
71
71
  * @returns {object[]} ConfigurableLayout content.
72
72
  */
73
- export function getLayoutDataFromRegion(regionData) {
73
+ export function getLayoutDataFromRegion(regionData: any) {
74
74
  const defaultLayoutConfig = {
75
75
  width: 'full',
76
76
  fillAvailable: true,
@@ -80,7 +80,7 @@ export function getLayoutDataFromRegion(regionData) {
80
80
  return regionData.props
81
81
  ?.getPConnect()
82
82
  ?.getChildren()
83
- ?.map((item, index) => {
83
+ ?.map((item: any, index: any) => {
84
84
  const itemPConnect = item?.getPConnect();
85
85
 
86
86
  return {
@@ -98,15 +98,18 @@ export function getLayoutDataFromRegion(regionData) {
98
98
  * Determine if the current view is the view of the case step/assignment.
99
99
  * @param {Function} pConnect PConnect object for the component
100
100
  */
101
- export function getIsAssignmentView(pConnect) {
101
+ export function getIsAssignmentView(pConnect: Function) {
102
102
  // Get caseInfo content from the store which contains the view info about the current assignment/step
103
103
  // TODO To be replaced with pConnect.getCaseInfo().getCurrentAssignmentView when it's available
104
+ // @ts-ignore
104
105
  const assignmentViewClass = pConnect.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_CLASSID);
106
+ // @ts-ignore
105
107
  const assignmentViewName = pConnect.getValue(PCore.getConstants().CASE_INFO.ASSIGNMENTACTION_ID);
106
108
 
107
109
  const assignmentViewId = `${assignmentViewName}!${assignmentViewClass}`;
108
110
 
109
111
  // Get the info about the current view from pConnect
112
+ // @ts-ignore
110
113
  const currentViewId = `${pConnect.getCurrentView()}!${pConnect.getCurrentClassID()}`;
111
114
 
112
115
  return assignmentViewId === currentViewId;
@@ -117,7 +120,8 @@ export function getIsAssignmentView(pConnect) {
117
120
  * @param {Function} pConnect PConnect object for the component
118
121
  * @param {string} [instructions="casestep"] 'casestep', 'none', or the html content of a Rule-UI-Paragraph rule (processed via core's paragraph annotation handler)
119
122
  */
120
- export function getInstructions(pConnect, instructions = 'casestep') {
123
+ export function getInstructions(pConnect: Function, instructions = 'casestep') {
124
+ // @ts-ignore
121
125
  const caseStepInstructions = pConnect.getValue(PCore.getConstants().CASE_INFO.INSTRUCTIONS);
122
126
 
123
127
  // Determine if this view is the current assignment/step view
@@ -135,9 +139,7 @@ export function getInstructions(pConnect, instructions = 'casestep') {
135
139
 
136
140
  // If the annotation wasn't processed correctly, don't return any instruction text
137
141
  if (instructions?.startsWith('@PARAGRAPH')) {
138
- /* eslint-disable no-console */
139
142
  console.error('@PARAGRAPH annotation was not processed. Hiding custom instructions.');
140
- /* eslint-enable no-console */
141
143
  return undefined;
142
144
  }
143
145
 
@@ -2,19 +2,25 @@
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 {{COMPONENT_CLASS_NAME}} from './index';
8
8
  import { DateInput, Input, FieldValueList, Text } from '@pega/cosmos-react-core';
9
9
  import { PhoneInput as CosmosPhone } from '@pega/cosmos-react-core';
10
10
  import { pyReviewRaw, regionChildrenResolved } from './mock';
11
11
 
12
- export default {
12
+ const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
13
13
  title: '{{COMPONENT_CLASS_NAME}}',
14
- decorators: [withKnobs],
15
- component: {{COMPONENT_CLASS_NAME}}
14
+ component: {{COMPONENT_CLASS_NAME}},
15
+ excludeStories: /.*Data$/,
16
+ parameters: {
17
+ type: 'Form'
18
+ }
16
19
  };
17
20
 
21
+ export default meta;
22
+ type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
23
+
18
24
  const renderField = resolvedProps => {
19
25
  const { displayMode, value = '', label = '', key } = resolvedProps;
20
26
 
@@ -134,7 +140,7 @@ const renderField = resolvedProps => {
134
140
  );
135
141
  };
136
142
 
137
- export const Base{{COMPONENT_CLASS_NAME}} = () => {
143
+ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
138
144
  const props = {
139
145
  NumCols: 1,
140
146
  template: 'DefaultForm',
@@ -173,7 +179,9 @@ export const Base{{COMPONENT_CLASS_NAME}} = () => {
173
179
 
174
180
  return (
175
181
  <>
176
- <{{COMPONENT_CLASS_NAME}} {...props}>{regionAChildren}</{{COMPONENT_CLASS_NAME}}>
182
+ <{{COMPONENT_CLASS_NAME}} {...props} {...args}>{regionAChildren}</{{COMPONENT_CLASS_NAME}}>
177
183
  </>
178
184
  );
179
185
  };
186
+
187
+ Base{{COMPONENT_CLASS_NAME}}.args = {};
@@ -1,5 +1,5 @@
1
- import { Grid, FieldGroup } from '@pega/cosmos-react-core';
2
- import PropTypes from 'prop-types';
1
+ import { Grid, FieldGroup, withConfiguration } from '@pega/cosmos-react-core';
2
+
3
3
 
4
4
  import type { PConnFieldProps } from './PConnProps';
5
5
 
@@ -17,9 +17,9 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
17
17
 
18
18
  // props passed in combination of props from property panel (config.json) and run time props from Constellation
19
19
  // any default values in config.pros should be set in defaultProps at bottom of this file
20
- export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
20
+ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
21
21
 
22
- const { children, NumCols, label, showLabel, getPConnect } = props;
22
+ const { children = [], NumCols = '1', label, showLabel, getPConnect } = props;
23
23
  const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };
24
24
 
25
25
  const nCols = parseInt(NumCols, 10);
@@ -45,12 +45,4 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
45
45
 
46
46
  }
47
47
 
48
- {{COMPONENT_CLASS_NAME}}.defaultProps = {
49
- NumCols: 1,
50
- children: []
51
- };
52
-
53
- {{COMPONENT_CLASS_NAME}}.propTypes = {
54
- NumCols: PropTypes.number,
55
- children: PropTypes.arrayOf(PropTypes.node),
56
- };
48
+ export default withConfiguration({{COMPONENT_CLASS_NAME}});
@@ -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
+ });
@@ -2,19 +2,25 @@
2
2
 
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 {{COMPONENT_CLASS_NAME}} from './index';
8
8
  import { DateInput, Input, FieldValueList, Text } from '@pega/cosmos-react-core';
9
9
  import { PhoneInput as CosmosPhone } from '@pega/cosmos-react-core';
10
10
  import { pyReviewRaw, regionChildrenResolved } from './mock';
11
11
 
12
- export default {
12
+ const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
13
13
  title: '{{COMPONENT_CLASS_NAME}}',
14
- decorators: [withKnobs],
15
- component: {{COMPONENT_CLASS_NAME}}
14
+ component: {{COMPONENT_CLASS_NAME}},
15
+ excludeStories: /.*Data$/,
16
+ parameters: {
17
+ type: 'TwoColumnForm'
18
+ }
16
19
  };
17
20
 
21
+ export default meta;
22
+ type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
23
+
18
24
  const renderField = resolvedProps => {
19
25
  const { displayMode, value = '', label = '', key } = resolvedProps;
20
26
 
@@ -137,7 +143,7 @@ const renderField = resolvedProps => {
137
143
  );
138
144
  };
139
145
 
140
- export const Base{{COMPONENT_CLASS_NAME}} = () => {
146
+ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
141
147
  const props = {
142
148
  template: 'DefaultForm',
143
149
  getPConnect: () => {
@@ -177,9 +183,11 @@ export const Base{{COMPONENT_CLASS_NAME}} = () => {
177
183
  });
178
184
 
179
185
  return (
180
- <{{COMPONENT_CLASS_NAME}} {...props}>
186
+ <{{COMPONENT_CLASS_NAME}} {...props} {...args}>
181
187
  {regionAChildren}
182
188
  {regionBChildren}
183
189
  </{{COMPONENT_CLASS_NAME}}>
184
190
  );
185
191
  };
192
+
193
+ Base{{COMPONENT_CLASS_NAME}}.args = {};
@@ -1,5 +1,4 @@
1
- import { Grid, Flex, FieldGroup } from '@pega/cosmos-react-core';
2
- import PropTypes from 'prop-types';
1
+ import { Grid, Flex, FieldGroup, withConfiguration } from '@pega/cosmos-react-core';
3
2
 
4
3
  import type { PConnFieldProps } from './PConnProps';
5
4
 
@@ -16,10 +15,10 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
16
15
 
17
16
  // props passed in combination of props from property panel (config.json) and run time props from Constellation
18
17
  // any default values in config.pros should be set in defaultProps at bottom of this file
19
- export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
18
+ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
20
19
 
21
20
 
22
- const { children, label, showLabel, getPConnect } = props;
21
+ const { children = [], label, showLabel, getPConnect } = props;
23
22
  const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };
24
23
 
25
24
  const numRegions = children?.length;
@@ -54,10 +53,5 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
54
53
 
55
54
  }
56
55
 
57
- {{COMPONENT_CLASS_NAME}}.defaultProps = {
58
- children: []
59
- };
60
56
 
61
- {{COMPONENT_CLASS_NAME}}.propTypes = {
62
- children: PropTypes.arrayOf(PropTypes.node),
63
- };
57
+ export default withConfiguration({{COMPONENT_CLASS_NAME}});
@@ -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
+ });
@@ -2,20 +2,23 @@
2
2
  /* eslint-disable react/jsx-no-useless-fragment */
3
3
  /* eslint-disable react/no-unstable-nested-components */
4
4
  // @ts-nocheck
5
- import { withKnobs } from '@storybook/addon-knobs';
5
+ import type { Meta, StoryObj } from '@storybook/react';
6
6
 
7
7
  import { AppAnnouncement as PegaAppAnnouncement } from '@pega/cosmos-react-work';
8
8
 
9
9
  import {{COMPONENT_CLASS_NAME}} from './index';
10
10
  import { pyHome1Resolved, pyHome1Raw } from './mock';
11
11
 
12
- export default {
12
+ const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
13
13
  title: '{{COMPONENT_CLASS_NAME}}',
14
- decorators: [withKnobs],
15
- component: {{COMPONENT_CLASS_NAME}}
14
+ component: {{COMPONENT_CLASS_NAME}},
15
+ excludeStories: /.*Data$/,
16
16
  };
17
17
 
18
- export const Base{{COMPONENT_CLASS_NAME}} = () => {
18
+ export default meta;
19
+ type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
20
+
21
+ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
19
22
  if (!window.PCore) {
20
23
  window.PCore = {};
21
24
  }
@@ -100,7 +103,9 @@ export const Base{{COMPONENT_CLASS_NAME}} = () => {
100
103
 
101
104
  return (
102
105
  <>
103
- <{{COMPONENT_CLASS_NAME}} {...props}>{regionAChildren}</{{COMPONENT_CLASS_NAME}}>
106
+ <{{COMPONENT_CLASS_NAME}} {...props} {...args}>{regionAChildren}</{{COMPONENT_CLASS_NAME}}>
104
107
  </>
105
108
  );
106
109
  };
110
+
111
+ Base{{COMPONENT_CLASS_NAME}}.args = {};
@@ -1,6 +1,5 @@
1
1
  import { useMemo, Children } from 'react';
2
- import PropTypes from 'prop-types';
3
- import { OneColumnPage as OneColumn } from '@pega/cosmos-react-core';
2
+ import { OneColumnPage as OneColumn, withConfiguration } from '@pega/cosmos-react-core';
4
3
  import { ConfigurableLayout } from '@pega/cosmos-react-work'
5
4
  // import { registerIcon } from '@pega/cosmos-react-core';
6
5
  import type { PConnFieldProps } from './PConnProps';
@@ -35,11 +34,11 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
35
34
 
36
35
  // props passed in combination of props from property panel (config.json) and run time props from Constellation
37
36
  // any default values in config.pros should be set in defaultProps at bottom of this file
38
- export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
37
+ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
39
38
 
40
39
  // add back in icon when working
41
- // const { children, title, icon, useConfigurableLayout, getPConnect, enableGetNextWork } = props;
42
- const { children, title, useConfigurableLayout, getPConnect, enableGetNextWork } = props;
40
+ // const { children, title, icon, useConfigurableLayout = false, getPConnect, enableGetNextWork } = props;
41
+ const { children = [], title, useConfigurableLayout, getPConnect, enableGetNextWork } = props;
43
42
  const childArray = useMemo(() => {
44
43
  return Children.toArray(children);
45
44
  }, [children]);
@@ -70,14 +69,4 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
70
69
 
71
70
  }
72
71
 
73
- {{COMPONENT_CLASS_NAME}}.defaultProps = {
74
- /* icon: '', */
75
- useConfigurableLayout: false
76
- };
77
-
78
- {{COMPONENT_CLASS_NAME}}.propTypes = {
79
- children: PropTypes.arrayOf(PropTypes.node).isRequired,
80
- title: PropTypes.string.isRequired,
81
- /* icon: PropTypes.string, */
82
- useConfigurableLayout: PropTypes.bool
83
- };
72
+ export default withConfiguration({{COMPONENT_CLASS_NAME}});
@@ -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
+ });