@pega/custom-dx-components 0.23.35 → 0.23.37

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 (330) hide show
  1. package/SECURITY.md +10 -0
  2. package/package.json +1 -1
  3. package/src/constants.js +1 -0
  4. package/src/tasks/build-all/index.js +10 -25
  5. package/src/tasks/build-comp/index.js +1 -0
  6. package/src/tasks/bundle/builder/index.js +6 -3
  7. package/src/tasks/create/templates/Constellation/Field/Boolean/Boolean.ts.mustache +35 -0
  8. package/src/tasks/create/templates/Constellation/Field/Boolean/demo.stories.tsx.mustache +8 -5
  9. package/src/tasks/create/templates/Constellation/Field/Boolean/index.tsx.mustache +10 -47
  10. package/src/tasks/create/templates/Constellation/Field/Boolean/styles.ts.mustache +7 -14
  11. package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/DateFormatter.js → src/tasks/create/templates/Constellation/Field/Date/DateFormatter.ts.mustache} +6 -6
  12. package/src/tasks/create/templates/Constellation/Field/Date/FormattedText.tsx.mustache +20 -0
  13. package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/date.js → src/tasks/create/templates/Constellation/Field/Date/date.ts.mustache} +2 -2
  14. package/src/tasks/create/templates/Constellation/Field/Date/demo.stories.tsx.mustache +8 -5
  15. package/src/tasks/create/templates/Constellation/Field/Date/index.tsx.mustache +29 -70
  16. package/src/tasks/create/templates/Constellation/Field/Date/styles.ts.mustache +7 -14
  17. package/src/tasks/create/templates/Constellation/Field/DateTime/{date-time.js.mustache → date-time.ts.mustache} +12 -12
  18. 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
  19. package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date.js → src/tasks/create/templates/Constellation/Field/DateTime/date.ts.mustache} +1 -0
  20. package/src/tasks/create/templates/Constellation/Field/DateTime/demo.stories.tsx.mustache +9 -6
  21. package/src/tasks/create/templates/Constellation/Field/DateTime/index.tsx.mustache +12 -59
  22. package/src/tasks/create/templates/Constellation/Field/DateTime/styles.ts.mustache +7 -14
  23. package/src/tasks/create/templates/Constellation/Field/Decimal/demo.stories.tsx.mustache +8 -5
  24. package/src/tasks/create/templates/Constellation/Field/Decimal/index.tsx.mustache +14 -67
  25. package/src/tasks/create/templates/Constellation/Field/Decimal/styles.ts.mustache +7 -14
  26. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/demo.stories.tsx.mustache +8 -5
  27. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/index.tsx.mustache +21 -75
  28. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/styles.ts.mustache +7 -14
  29. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/demo.stories.tsx.mustache +8 -5
  30. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/index.tsx.mustache +13 -54
  31. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/styles.ts.mustache +7 -14
  32. package/src/tasks/create/templates/Constellation/Field/Integer/demo.stories.tsx.mustache +8 -5
  33. package/src/tasks/create/templates/Constellation/Field/Integer/index.tsx.mustache +23 -87
  34. package/src/tasks/create/templates/Constellation/Field/Integer/styles.ts.mustache +7 -14
  35. package/src/tasks/create/templates/Constellation/Field/Picklist/demo.stories.tsx.mustache +8 -5
  36. package/src/tasks/create/templates/Constellation/Field/Picklist/index.tsx.mustache +12 -60
  37. package/src/tasks/create/templates/Constellation/Field/Picklist/styles.ts.mustache +7 -14
  38. package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/date.js → src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/date.ts.mustache} +2 -1
  39. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/demo.stories.tsx.mustache +8 -5
  40. 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
  41. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/index.tsx.mustache +15 -76
  42. 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
  43. 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
  44. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/{repeat-utils.js.mustache → repeat-utils.ts.mustache} +6 -12
  45. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/styles.ts.mustache +7 -14
  46. package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/textformat-utils.jsx → src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/textformat-utils.tsx.mustache} +30 -10
  47. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/utils.ts.mustache +1 -1
  48. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/demo.stories.tsx.mustache +8 -5
  49. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/index.tsx.mustache +11 -55
  50. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/styles.ts.mustache +7 -14
  51. package/src/tasks/create/templates/Constellation/Field/Text/demo.stories.tsx.mustache +8 -5
  52. package/src/tasks/create/templates/Constellation/Field/Text/index.tsx.mustache +4 -22
  53. package/src/tasks/create/templates/Constellation/Field/Text/styles.ts.mustache +7 -14
  54. package/src/tasks/create/templates/Constellation/Field/Text-Email/demo.stories.tsx.mustache +8 -5
  55. package/src/tasks/create/templates/Constellation/Field/Text-Email/index.tsx.mustache +9 -46
  56. package/src/tasks/create/templates/Constellation/Field/Text-Email/styles.ts.mustache +7 -14
  57. package/src/tasks/create/templates/Constellation/Field/Text-Input/demo.stories.tsx.mustache +7 -4
  58. package/src/tasks/create/templates/Constellation/Field/Text-Input/index.tsx.mustache +10 -50
  59. package/src/tasks/create/templates/Constellation/Field/Text-Input/styles.ts.mustache +7 -14
  60. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/demo.stories.tsx.mustache +8 -5
  61. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/index.tsx.mustache +12 -48
  62. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/styles.ts.mustache +7 -14
  63. package/src/tasks/create/templates/Constellation/Field/Text-Phone/demo.stories.tsx.mustache +8 -5
  64. package/src/tasks/create/templates/Constellation/Field/Text-Phone/index.tsx.mustache +13 -52
  65. package/src/tasks/create/templates/Constellation/Field/Text-Phone/styles.ts.mustache +7 -14
  66. package/src/tasks/create/templates/Constellation/Field/Text-URL/demo.stories.tsx.mustache +8 -5
  67. package/src/tasks/create/templates/Constellation/Field/Text-URL/index.tsx.mustache +15 -71
  68. package/src/tasks/create/templates/Constellation/Field/Text-URL/styles.ts.mustache +7 -14
  69. package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/text-url.jsx → src/tasks/create/templates/Constellation/Field/Text-URL/text-url.tsx.mustache} +4 -3
  70. package/src/tasks/create/templates/Constellation/Field/TimeofDay/demo.stories.tsx.mustache +8 -6
  71. package/src/tasks/create/templates/Constellation/Field/TimeofDay/index.tsx.mustache +16 -52
  72. package/src/tasks/create/templates/Constellation/Field/TimeofDay/styles.ts.mustache +7 -14
  73. package/src/tasks/create/templates/Constellation/Field/{DateTime/date-utils.js.mustache → TimeofDay/time-of-day.ts.mustache} +24 -23
  74. package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.stories.tsx.mustache +14 -5
  75. package/src/tasks/create/templates/Constellation/Template/DETAILS/index.tsx.mustache +4 -17
  76. package/src/tasks/create/templates/Constellation/Template/DETAILS/styles.ts.mustache +7 -14
  77. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/demo.stories.tsx.mustache +10 -3
  78. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/index.tsx.mustache +4 -18
  79. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/styles.ts.mustache +7 -14
  80. package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/utils.js → src/tasks/create/templates/Constellation/Template/DETAILS-region/utils.ts.mustache} +15 -13
  81. package/src/tasks/create/templates/Constellation/Template/FORM/demo.stories.tsx.mustache +11 -5
  82. package/src/tasks/create/templates/Constellation/Template/FORM/index.tsx.mustache +5 -13
  83. package/src/tasks/create/templates/Constellation/Template/FORM/styles.ts.mustache +7 -14
  84. package/src/tasks/create/templates/Constellation/Template/FORM-region/demo.stories.tsx.mustache +11 -5
  85. package/src/tasks/create/templates/Constellation/Template/FORM-region/index.tsx.mustache +4 -10
  86. package/src/tasks/create/templates/Constellation/Template/FORM-region/styles.ts.mustache +7 -14
  87. package/src/tasks/create/templates/Constellation/Template/PAGE/demo.stories.tsx.mustache +8 -5
  88. package/src/tasks/create/templates/Constellation/Template/PAGE/index.tsx.mustache +5 -16
  89. package/src/tasks/create/templates/Constellation/Template/PAGE/styles.ts.mustache +7 -14
  90. package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/utils.js → src/tasks/create/templates/Constellation/Template/PAGE/utils.ts.mustache} +28 -14
  91. package/src/tasks/create/templates/Constellation/Widget/CASE/demo.stories.tsx.mustache +8 -5
  92. package/src/tasks/create/templates/Constellation/Widget/CASE/index.tsx.mustache +3 -10
  93. package/src/tasks/create/templates/Constellation/Widget/CASE/styles.ts.mustache +7 -14
  94. package/src/tasks/create/templates/Constellation/Widget/PAGE/demo.stories.tsx.mustache +8 -5
  95. package/src/tasks/create/templates/Constellation/Widget/PAGE/index.tsx.mustache +4 -18
  96. package/src/tasks/create/templates/Constellation/Widget/PAGE/styles.ts.mustache +7 -14
  97. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Avatar.tsx.mustache +3 -13
  98. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Operator.tsx.mustache +4 -19
  99. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/demo.stories.tsx.mustache +8 -5
  100. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/index.tsx.mustache +24 -39
  101. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/styles.ts.mustache +7 -14
  102. package/src/tasks/create/templates/Launchpad/Widget/CASE/demo.stories.tsx.mustache +8 -5
  103. package/src/tasks/create/templates/Launchpad/Widget/CASE/index.tsx.mustache +3 -9
  104. package/src/tasks/create/templates/Launchpad/Widget/CASE/styles.ts.mustache +7 -14
  105. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/Avatar.tsx.mustache +1 -11
  106. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/Operator.tsx.mustache +33 -51
  107. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/demo.stories.tsx.mustache +8 -5
  108. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/index.tsx.mustache +22 -21
  109. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/styles.ts.mustache +7 -14
  110. package/src/tasks/delete-all/helper.js +37 -5
  111. package/src/tasks/init/template/package.json.mustache +6 -6
  112. package/src/tasks/init/template/tasks.config.json +2 -1
  113. package/src/tasks/linter/index.js +7 -4
  114. package/src/tasks/list/helper.js +10 -0
  115. package/src/tasks/list/index.js +20 -3
  116. package/src/tasks/promote-webpack/index.js +3 -26
  117. package/src/tasks/publish/helper.js +1 -1
  118. package/src/tasks/publish/index.js +6 -4
  119. package/src/tasks/publish-all/helper.js +52 -40
  120. package/src/tasks/publish-all/index.js +16 -17
  121. package/src/tasks/revert-webpack/index.js +3 -23
  122. package/src/util.js +152 -61
  123. package/tests/assets/components/create/Pega_DXIL_MyTestText/demo.stories.tsx +8 -5
  124. package/tests/assets/components/create/Pega_DXIL_MyTestText/index.tsx +4 -22
  125. package/tests/assets/components/create/Pega_DXIL_MyTestText/styles.ts +7 -14
  126. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/Boolean.ts +35 -0
  127. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/demo.stories.tsx +8 -5
  128. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/index.tsx +10 -47
  129. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/styles.ts +7 -14
  130. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/demo.stories.tsx +8 -5
  131. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/index.tsx +3 -10
  132. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/styles.ts +7 -14
  133. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/demo.stories.tsx +8 -5
  134. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/index.tsx +21 -75
  135. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/styles.ts +7 -14
  136. package/{src/tasks/create/templates/Constellation/Field/Date/DateFormatter.js.mustache → tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/DateFormatter.ts} +6 -6
  137. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/FormattedText.tsx +20 -0
  138. package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MyDate/date.js → Constellation/Pega_DXIL_MyDate/date.ts} +2 -2
  139. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/demo.stories.tsx +8 -5
  140. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/index.tsx +18 -59
  141. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/styles.ts +7 -14
  142. package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MyDateTime/date-time.js → Constellation/Pega_DXIL_MyDateTime/date-time.ts} +12 -12
  143. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date-utils.ts +288 -0
  144. package/{src/tasks/create/templates/Constellation/Field/DateTime/date.js.mustache → tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date.ts} +1 -0
  145. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/demo.stories.tsx +9 -6
  146. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/index.tsx +12 -59
  147. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/styles.ts +7 -14
  148. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/demo.stories.tsx +8 -5
  149. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/index.tsx +14 -67
  150. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/styles.ts +7 -14
  151. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/demo.stories.tsx +12 -3
  152. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/index.tsx +4 -17
  153. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/styles.ts +7 -14
  154. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/demo.stories.tsx +8 -5
  155. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/index.tsx +9 -46
  156. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/styles.ts +7 -14
  157. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/demo.stories.tsx +11 -5
  158. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/index.tsx +5 -13
  159. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/styles.ts +7 -14
  160. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/demo.stories.tsx +8 -5
  161. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/index.tsx +23 -87
  162. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/styles.ts +7 -14
  163. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/demo.stories.tsx +8 -5
  164. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/index.tsx +5 -16
  165. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/styles.ts +7 -14
  166. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/{utils.js → utils.ts} +28 -14
  167. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/Avatar.tsx +3 -13
  168. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/Operator.tsx +4 -19
  169. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +8 -5
  170. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/index.tsx +24 -39
  171. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/styles.ts +7 -14
  172. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/demo.stories.tsx +8 -5
  173. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/index.tsx +4 -18
  174. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/styles.ts +7 -14
  175. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/demo.stories.tsx +8 -5
  176. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/index.tsx +12 -48
  177. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/styles.ts +7 -14
  178. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/demo.stories.tsx +8 -5
  179. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/index.tsx +13 -54
  180. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/styles.ts +7 -14
  181. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/demo.stories.tsx +8 -5
  182. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/index.tsx +13 -52
  183. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/styles.ts +7 -14
  184. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/demo.stories.tsx +8 -5
  185. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/index.tsx +12 -60
  186. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/styles.ts +7 -14
  187. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/demo.stories.tsx +8 -5
  188. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/index.tsx +11 -55
  189. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/styles.ts +7 -14
  190. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/{date.js → date.ts} +2 -1
  191. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/demo.stories.tsx +8 -5
  192. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/{embed-utils.js → embed-utils.ts} +2 -1
  193. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/index.tsx +15 -76
  194. package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MySearchbox/picklist-utils.js → Constellation/Pega_DXIL_MySearchbox/picklist-utils.ts} +1 -0
  195. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/{repeat-constants.js → repeat-constants.ts} +1 -1
  196. package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MySearchbox/repeat-utils.js → Constellation/Pega_DXIL_MySearchbox/repeat-utils.ts} +6 -12
  197. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/styles.ts +7 -14
  198. package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MySearchbox/textformat-utils.jsx → Constellation/Pega_DXIL_MySearchbox/textformat-utils.tsx} +30 -10
  199. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/utils.ts +1 -1
  200. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/demo.stories.tsx +8 -5
  201. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/index.tsx +4 -22
  202. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/styles.ts +7 -14
  203. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/demo.stories.tsx +7 -4
  204. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/index.tsx +10 -50
  205. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/styles.ts +7 -14
  206. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +8 -6
  207. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/index.tsx +16 -52
  208. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/styles.ts +7 -14
  209. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/{time-of-day.js → time-of-day.ts} +24 -23
  210. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +10 -3
  211. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/index.tsx +4 -18
  212. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/styles.ts +7 -14
  213. package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MyTwoColumnDetails/utils.js → Constellation/Pega_DXIL_MyTwoColumnDetails/utils.ts} +15 -13
  214. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/demo.stories.tsx +11 -5
  215. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/index.tsx +4 -10
  216. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/styles.ts +7 -14
  217. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/demo.stories.tsx +8 -5
  218. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/index.tsx +15 -71
  219. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/styles.ts +7 -14
  220. package/{src/tasks/create/templates/Constellation/Field/Text-URL/text-url.jsx.mustache → tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/text-url.tsx} +4 -3
  221. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/Boolean.ts +35 -0
  222. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/demo.stories.tsx +8 -5
  223. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/index.tsx +10 -47
  224. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/styles.ts +7 -14
  225. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/demo.stories.tsx +8 -5
  226. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/index.tsx +3 -9
  227. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/styles.ts +7 -14
  228. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/demo.stories.tsx +8 -5
  229. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/index.tsx +21 -75
  230. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/styles.ts +7 -14
  231. package/tests/assets/components/createAll/{Constellation/Pega_DXIL_MyDate/DateFormatter.js → Launchpad/Pega_DXIL_MyDate/DateFormatter.ts} +6 -6
  232. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/FormattedText.tsx +20 -0
  233. package/{src/tasks/create/templates/Constellation/Field/Date/date.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/date.ts} +2 -2
  234. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/demo.stories.tsx +8 -5
  235. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/index.tsx +18 -59
  236. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/styles.ts +7 -14
  237. package/tests/assets/components/createAll/{Constellation/Pega_DXIL_MyDateTime/date-time.js → Launchpad/Pega_DXIL_MyDateTime/date-time.ts} +12 -12
  238. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date-utils.ts +288 -0
  239. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/{date.js → date.ts} +1 -0
  240. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/demo.stories.tsx +9 -6
  241. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/index.tsx +12 -59
  242. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/styles.ts +7 -14
  243. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/demo.stories.tsx +8 -5
  244. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/index.tsx +14 -67
  245. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/styles.ts +7 -14
  246. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/demo.stories.tsx +12 -3
  247. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/index.tsx +4 -17
  248. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/styles.ts +7 -14
  249. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/demo.stories.tsx +8 -5
  250. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/index.tsx +9 -46
  251. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/styles.ts +7 -14
  252. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/demo.stories.tsx +11 -5
  253. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/index.tsx +5 -13
  254. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/styles.ts +7 -14
  255. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/demo.stories.tsx +8 -5
  256. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/index.tsx +23 -87
  257. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/styles.ts +7 -14
  258. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/demo.stories.tsx +8 -5
  259. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/index.tsx +5 -16
  260. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/styles.ts +7 -14
  261. package/{src/tasks/create/templates/Constellation/Template/PAGE/utils.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/utils.ts} +28 -14
  262. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/Avatar.tsx +1 -11
  263. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/Operator.tsx +33 -51
  264. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +8 -5
  265. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/index.tsx +22 -20
  266. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/styles.ts +7 -14
  267. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/demo.stories.tsx +8 -5
  268. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/index.tsx +4 -18
  269. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/styles.ts +7 -14
  270. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/demo.stories.tsx +8 -5
  271. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/index.tsx +12 -48
  272. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/styles.ts +7 -14
  273. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/demo.stories.tsx +8 -5
  274. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/index.tsx +13 -54
  275. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/styles.ts +7 -14
  276. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/demo.stories.tsx +8 -5
  277. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/index.tsx +13 -52
  278. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/styles.ts +7 -14
  279. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/demo.stories.tsx +8 -5
  280. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/index.tsx +12 -60
  281. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/styles.ts +7 -14
  282. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/demo.stories.tsx +8 -5
  283. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/index.tsx +11 -55
  284. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/styles.ts +7 -14
  285. package/{src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/date.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/date.ts} +2 -1
  286. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/demo.stories.tsx +8 -5
  287. 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
  288. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/index.tsx +15 -76
  289. 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
  290. 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
  291. package/tests/assets/components/createAll/{Constellation/Pega_DXIL_MySearchbox/repeat-utils.js → Launchpad/Pega_DXIL_MySearchbox/repeat-utils.ts} +6 -12
  292. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/styles.ts +7 -14
  293. package/{src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/textformat-utils.jsx.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/textformat-utils.tsx} +30 -10
  294. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/utils.ts +1 -1
  295. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/demo.stories.tsx +8 -5
  296. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/index.tsx +4 -22
  297. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/styles.ts +7 -14
  298. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/demo.stories.tsx +7 -4
  299. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/index.tsx +10 -50
  300. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/styles.ts +7 -14
  301. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +8 -6
  302. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/index.tsx +16 -52
  303. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/styles.ts +7 -14
  304. 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
  305. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +10 -3
  306. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/index.tsx +4 -18
  307. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/styles.ts +7 -14
  308. package/{src/tasks/create/templates/Constellation/Template/DETAILS-region/utils.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/utils.ts} +15 -13
  309. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/demo.stories.tsx +11 -5
  310. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/index.tsx +4 -10
  311. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/styles.ts +7 -14
  312. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/demo.stories.tsx +8 -5
  313. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/index.tsx +15 -71
  314. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/styles.ts +7 -14
  315. package/tests/assets/components/createAll/{Constellation/Pega_DXIL_MyURL/text-url.jsx → Launchpad/Pega_DXIL_MyURL/text-url.tsx} +4 -3
  316. package/tests/functional/localCreateAllListDeleteAll.test.js +10 -3
  317. package/src/tasks/create/templates/Constellation/Field/Boolean/Boolean.js.mustache +0 -38
  318. package/src/tasks/create/templates/Constellation/Field/Date/FormattedText.jsx.mustache +0 -41
  319. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/Boolean.js +0 -38
  320. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/FormattedText.jsx +0 -41
  321. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/Boolean.js +0 -38
  322. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/FormattedText.jsx +0 -41
  323. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date-utils.js +0 -287
  324. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/time-of-day.js +0 -287
  325. /package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/{component-constants.js → component-constants.ts} +0 -0
  326. /package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/{format-constants.js.mustache → format-constants.ts.mustache} +0 -0
  327. /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/{component-constants.js → component-constants.ts} +0 -0
  328. /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/{format-constants.js → format-constants.ts} +0 -0
  329. /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/{component-constants.js → component-constants.ts} +0 -0
  330. /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/{format-constants.js → format-constants.ts} +0 -0
@@ -9,7 +9,7 @@ const LazyComponentMap = {};
9
9
  * metadata of all regions.
10
10
  * @param {Function} pConnect PConnect of a Template component.
11
11
  */
12
- export function getAllFields(pConnect) {
12
+ export function getAllFields(pConnect: Function) {
13
13
  const metadata = pConnect().getRawMetadata();
14
14
  if (!metadata.children) {
15
15
  return [];
@@ -17,15 +17,15 @@ export function getAllFields(pConnect) {
17
17
 
18
18
  let allFields = [];
19
19
 
20
- const makeField = (f) => ({
20
+ const makeField = (f: any) => ({
21
21
  ...pConnect().resolveConfigProps(f.config),
22
22
  type: f.type
23
23
  });
24
24
 
25
25
  const hasRegions = !!metadata.children[0]?.children;
26
26
  if (hasRegions) {
27
- allFields = metadata.children.map((region) =>
28
- region.children.map((field) => {
27
+ allFields = metadata.children.map((region: any) =>
28
+ region.children.map((field: any) => {
29
29
  // Do not resolve the config props if is status work, instead create component here as status badge and mark as status display
30
30
  if (field.config?.value === '@P .pyStatusWork') {
31
31
  field.type = 'TextInput';
@@ -50,7 +50,7 @@ export function getAllFields(pConnect) {
50
50
  * @param {Function} getPConnect PConnect function passed along to other components.
51
51
  * @param {string} displayMode displayMode string contains information about the layout of component in review mode.
52
52
  */
53
- export function prepareComponentInCaseSummary(configObject, getPConnect, displayMode) {
53
+ export function prepareComponentInCaseSummary(configObject: any, getPConnect: Function, displayMode: string) {
54
54
  const { config, children } = configObject;
55
55
  let { type } = configObject;
56
56
  const caseSummaryComponentObject = {};
@@ -60,33 +60,40 @@ export function prepareComponentInCaseSummary(configObject, getPConnect, display
60
60
  type = 'TextInput'; // force the type to be TextInput for status field.
61
61
  // As TextInput is loaded forcefully sometimes, TextInput component might not be available in lazy map.
62
62
  // Load TextInput if it is not available.
63
+ // @ts-ignore
63
64
  if (!LazyComponentMap[type]) {
64
65
  PCore.getAssetLoader().getLoader('component-loader')([type]);
65
66
  }
66
67
  }
67
68
 
69
+ // @ts-ignore
68
70
  caseSummaryComponentObject.name = getPConnect().resolveConfigProps({
69
71
  label: config.label
70
72
  }).label;
71
73
  if (type === 'CaseOperator') {
74
+ // @ts-ignore
72
75
  switch (caseSummaryComponentObject.name) {
73
76
  case 'Create operator':
77
+ // @ts-ignore
74
78
  caseSummaryComponentObject.name = getPConnect().resolveConfigProps({
75
79
  createLabel: config.createLabel
76
80
  }).createLabel;
77
81
  break;
78
82
  case 'Update operator':
83
+ // @ts-ignore
79
84
  caseSummaryComponentObject.name = getPConnect().resolveConfigProps({
80
85
  updateLabel: config.updateLabel
81
86
  }).updateLabel;
82
87
  break;
83
88
  default:
89
+ // @ts-ignore
84
90
  caseSummaryComponentObject.name = getPConnect().resolveConfigProps({
85
91
  resolveLabel: config.resolveLabel
86
92
  }).resolveLabel;
87
93
  break;
88
94
  }
89
95
  } else if (type === 'Checkbox') {
96
+ // @ts-ignore
90
97
  caseSummaryComponentObject.name = getPConnect().resolveConfigProps({
91
98
  label: config.caption
92
99
  }).label;
@@ -108,15 +115,17 @@ export function prepareComponentInCaseSummary(configObject, getPConnect, display
108
115
  createdComponent.props.getPConnect().setInheritedProp('showAddressLabel', showAddressLabel);
109
116
  }
110
117
  // createdComponent.props.getPConnect().setInheritedProp("hideLabel", true);
118
+ // @ts-ignore
111
119
  caseSummaryComponentObject.value = createdComponent;
112
120
  if (type === 'reference') {
121
+ // @ts-ignore
113
122
  caseSummaryComponentObject.name = createdComponent.props.getPConnect().getInheritedProps().label;
114
123
  }
115
124
 
116
125
  return caseSummaryComponentObject;
117
126
  }
118
127
 
119
- export function getFilteredFields(getPConnect) {
128
+ export function getFilteredFields(getPConnect: Function) {
120
129
  let primaryFieldsRaw;
121
130
  let secondaryFieldsRaw;
122
131
  const metadata = getPConnect().getRawMetadata();
@@ -129,12 +138,12 @@ export function getFilteredFields(getPConnect) {
129
138
  }
130
139
 
131
140
  // Filter out fields that are not visible and unsupported types for primary fields (for CaseSummary)
132
- primaryFieldsRaw = primaryFieldsRaw.filter((item) => {
141
+ primaryFieldsRaw = primaryFieldsRaw.filter((item: any) => {
133
142
  const resolvedItem = getPConnect().resolveConfigProps(item.config);
134
143
  return resolvedItem.visibility !== false && item.type !== 'TextContent';
135
144
  });
136
145
 
137
- secondaryFieldsRaw = secondaryFieldsRaw.filter((item) => {
146
+ secondaryFieldsRaw = secondaryFieldsRaw.filter((item: any) => {
138
147
  const resolvedItem = getPConnect().resolveConfigProps(item.config);
139
148
  return resolvedItem.visibility !== false && item.type !== 'TextContent';
140
149
  });
@@ -147,17 +156,18 @@ export function getFilteredFields(getPConnect) {
147
156
  * @param {object[]} regionData template children item.
148
157
  * @returns {object[]} ConfigurableLayout content.
149
158
  */
150
- export function getLayoutDataFromRegion(regionData) {
159
+ export function getLayoutDataFromRegion(regionData: object[]) {
151
160
  const defaultLayoutConfig = {
152
161
  width: 'full',
153
162
  fillAvailable: true,
154
163
  minWidth: [300, 'px']
155
164
  };
156
165
 
166
+ // @ts-ignore
157
167
  return regionData.props
158
168
  ?.getPConnect()
159
169
  ?.getChildren()
160
- ?.map((item, index) => {
170
+ ?.map((item: any, index: number) => {
161
171
  const itemPConnect = item?.getPConnect();
162
172
 
163
173
  return {
@@ -175,15 +185,18 @@ export function getLayoutDataFromRegion(regionData) {
175
185
  * Determine if the current view is the view of the case step/assignment.
176
186
  * @param {Function} pConnect PConnect object for the component
177
187
  */
178
- export function getIsAssignmentView(pConnect) {
188
+ export function getIsAssignmentView(pConnect: Function) {
179
189
  // Get caseInfo content from the store which contains the view info about the current assignment/step
180
190
  // TODO To be replaced with pConnect.getCaseInfo().getCurrentAssignmentView when it's available
191
+ // @ts-ignore
181
192
  const assignmentViewClass = pConnect.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_CLASSID);
193
+ // @ts-ignore
182
194
  const assignmentViewName = pConnect.getValue(PCore.getConstants().CASE_INFO.ASSIGNMENTACTION_ID);
183
195
 
184
196
  const assignmentViewId = `${assignmentViewName}!${assignmentViewClass}`;
185
197
 
186
198
  // Get the info about the current view from pConnect
199
+ // @ts-ignore
187
200
  const currentViewId = `${pConnect.getCurrentView()}!${pConnect.getCurrentClassID()}`;
188
201
 
189
202
  return assignmentViewId === currentViewId;
@@ -194,7 +207,8 @@ export function getIsAssignmentView(pConnect) {
194
207
  * @param {Function} pConnect PConnect object for the component
195
208
  * @param {string} [instructions="casestep"] 'casestep', 'none', or the html content of a Rule-UI-Paragraph rule (processed via core's paragraph annotation handler)
196
209
  */
197
- export function getInstructions(pConnect, instructions = 'casestep') {
210
+ export function getInstructions(pConnect: Function, instructions: string = 'casestep') {
211
+ // @ts-ignore
198
212
  const caseStepInstructions = pConnect.getValue(PCore.getConstants().CASE_INFO.INSTRUCTIONS);
199
213
 
200
214
  // Determine if this view is the current assignment/step view
@@ -212,9 +226,9 @@ export function getInstructions(pConnect, instructions = 'casestep') {
212
226
 
213
227
  // If the annotation wasn't processed correctly, don't return any instruction text
214
228
  if (instructions?.startsWith('@PARAGRAPH')) {
215
- /* eslint-disable no-console */
229
+
216
230
  console.error('@PARAGRAPH annotation was not processed. Hiding custom instructions.');
217
- /* eslint-enable no-console */
231
+
218
232
  return undefined;
219
233
  }
220
234
 
@@ -1,8 +1,7 @@
1
1
  /* eslint-disable react-hooks/rules-of-hooks */
2
2
  import React from 'react';
3
3
  import { useEffect, useState } from 'react';
4
- import PropTypes from 'prop-types';
5
- import { Avatar as CosmosAvatar } from '@pega/cosmos-react-core';
4
+ import { Avatar as CosmosAvatar, withConfiguration } from '@pega/cosmos-react-core';
6
5
  import type { PConnFieldProps } from './PConnProps';
7
6
 
8
7
 
@@ -15,7 +14,7 @@ interface PegaDxilMyPageCaseWidgetAvatarProps extends PConnFieldProps {
15
14
  }
16
15
 
17
16
  function Avatar(props: PegaDxilMyPageCaseWidgetAvatarProps) {
18
- const { metaObj, showStatus } = props;
17
+ const { metaObj, showStatus = false } = props;
19
18
  const [imageBlobUrl, setImageBlobUrl] = useState(null);
20
19
  let userName: string;
21
20
  let userIdentifier: string;
@@ -75,14 +74,5 @@ function Avatar(props: PegaDxilMyPageCaseWidgetAvatarProps) {
75
74
  return <CosmosAvatar name={userName} imageSrc={imageBlobUrl as React.SetStateAction<any>} />;
76
75
  }
77
76
 
78
- Avatar.propTypes = {
79
- metaObj: PropTypes.objectOf(PropTypes.any),
80
- showStatus: PropTypes.bool
81
- };
82
77
 
83
- Avatar.defaultProps = {
84
- metaObj: null,
85
- showStatus: false
86
- };
87
-
88
- export default Avatar;
78
+ export default withConfiguration(Avatar);
@@ -8,11 +8,11 @@ import {
8
8
  useElement,
9
9
  Progress,
10
10
  FormField,
11
- useTheme
11
+ useTheme,
12
+ withConfiguration
12
13
  } from '@pega/cosmos-react-core';
13
14
  import { Glimpse } from '@pega/cosmos-react-work';
14
15
  import { EmailDisplay } from '@pega/cosmos-react-core';
15
- import PropTypes from 'prop-types';
16
16
 
17
17
  import type { PConnFieldProps } from './PConnProps';
18
18
 
@@ -31,7 +31,7 @@ interface PegaDxilMyPageCaseWidgetOperatorProps extends PConnFieldProps {
31
31
 
32
32
  let pTarget = null;
33
33
 
34
- export default function Operator(props: PegaDxilMyPageCaseWidgetOperatorProps) {
34
+ function Operator(props: PegaDxilMyPageCaseWidgetOperatorProps) {
35
35
  const { id, name, label, testId, helperText, externalUser, metaObj } = props;
36
36
  const [isOpen, setIsOpen] = useState(false);
37
37
  const [isLoading, setIsLoading] = useState(true);
@@ -211,20 +211,5 @@ export default function Operator(props: PegaDxilMyPageCaseWidgetOperatorProps) {
211
211
  return comp;
212
212
  };
213
213
 
214
- Operator.propTypes = {
215
- name: PropTypes.string,
216
- id: PropTypes.string,
217
- label: PropTypes.string,
218
- testId: PropTypes.string,
219
- helperText: PropTypes.string,
220
- metaObj: PropTypes.object
221
- };
222
214
 
223
- Operator.defaultProps = {
224
- name: '',
225
- id: '',
226
- label: null,
227
- testId: null,
228
- helperText: null,
229
- metaObj: null
230
- };
215
+ export default withConfiguration(Operator);
@@ -1,17 +1,20 @@
1
1
  /* eslint-disable react/jsx-no-useless-fragment */
2
2
  // @ts-nocheck
3
- import { withKnobs } from '@storybook/addon-knobs';
3
+ import type { Meta, StoryObj } from '@storybook/react';
4
4
 
5
5
  import PegaDxilMyPageCaseWidget from './index';
6
6
 
7
7
  import { configProps, operatorDetails } from './mock';
8
8
 
9
- export default {
9
+ const meta: Meta<typeof PegaDxilMyPageCaseWidget> = {
10
10
  title: 'PegaDxilMyPageCaseWidget',
11
- decorators: [withKnobs],
12
- component: PegaDxilMyPageCaseWidget
11
+ component: PegaDxilMyPageCaseWidget,
12
+ excludeStories: /.*Data$/
13
13
  };
14
14
 
15
+ export default meta;
16
+ type Story = StoryObj<typeof PegaDxilMyPageCaseWidget>;
17
+
15
18
  if (!window.PCore) {
16
19
  window.PCore = {};
17
20
  }
@@ -34,7 +37,7 @@ window.PCore.getUserApi = () => {
34
37
  };
35
38
  };
36
39
 
37
- export const BasePegaDxilMyPageCaseWidget = () => {
40
+ export const BasePegaDxilMyPageCaseWidget: Story = args => {
38
41
 
39
42
  const props = {
40
43
  label: configProps.label,
@@ -1,8 +1,8 @@
1
1
 
2
2
  /* eslint-disable no-nested-ternary */
3
3
  import { Fragment } from 'react';
4
- import { DateTimeDisplay, Card, CardHeader, CardContent, Flex } from '@pega/cosmos-react-core';
5
- import PropTypes from 'prop-types';
4
+ import { DateTimeDisplay, Card, CardHeader, CardContent, Flex, withConfiguration } from '@pega/cosmos-react-core';
5
+
6
6
  import type { PConnFieldProps } from './PConnProps';
7
7
 
8
8
  // includes in bundle
@@ -25,7 +25,6 @@ interface PegaDxilMyPageCaseWidgetProps extends PConnFieldProps {
25
25
  updateDateTime: string;
26
26
  resolveDateTime: string;
27
27
  hideLabel: boolean;
28
-
29
28
  }
30
29
 
31
30
 
@@ -33,12 +32,12 @@ interface PegaDxilMyPageCaseWidgetProps extends PConnFieldProps {
33
32
 
34
33
  // props passed in combination of props from property panel (config.json) and run time props from Constellation
35
34
  // any default values in config.pros should be set in defaultProps at bottom of this file
36
- export default function PegaDxilMyPageCaseWidget(props: PegaDxilMyPageCaseWidgetProps) {
35
+ function PegaDxilMyPageCaseWidget(props: PegaDxilMyPageCaseWidgetProps) {
37
36
 
38
37
  const {
39
38
  getPConnect,
40
- title,
41
- label,
39
+ title = 'Create operator',
40
+ label = 'Create operator',
42
41
  createLabel,
43
42
  updateLabel,
44
43
  createOperator,
@@ -67,9 +66,22 @@ export default function PegaDxilMyPageCaseWidget(props: PegaDxilMyPageCaseWidget
67
66
  <CardHeader>{title}</CardHeader>
68
67
  <CardContent>
69
68
  <Flex container={{ direction: 'row'}}>
70
- <Operator label={hideLabel ? undefined : _label} name={user.userName} id={user.userId} getPConnect={getPConnect} value={undefined} validatemessage='' hideLabel={false} readOnly={false} required={false} disabled={false} externalUser={undefined} />
71
-
72
-
69
+ <Operator
70
+ label={hideLabel ? '' : _label}
71
+ name={user.userName}
72
+ id={user.userId}
73
+ getPConnect={getPConnect}
74
+ value={undefined}
75
+ validatemessage=''
76
+ hideLabel={false}
77
+ readOnly={false}
78
+ required={false}
79
+ disabled={false}
80
+ externalUser={undefined}
81
+ metaObj={undefined}
82
+ testId=''
83
+ helperText=''
84
+ />
73
85
  {dateTimeValue && (
74
86
  <Fragment>
75
87
  {' '}
@@ -91,36 +103,9 @@ export default function PegaDxilMyPageCaseWidget(props: PegaDxilMyPageCaseWidget
91
103
 
92
104
  }
93
105
 
94
- PegaDxilMyPageCaseWidget.defaultProps = {
95
- "label": "Create operator",
96
- "title": "Create operator",
97
- createLabel: null,
98
- updateLabel: null,
99
- createOperator: null,
100
- updateOperator: null,
101
- createDateTime: null,
102
- updateDateTime: null,
103
- resolveLabel: null,
104
- resolveOperator: null,
105
- resolveDateTime: null,
106
- hideLabel: false
107
- };
108
-
109
- PegaDxilMyPageCaseWidget.propTypes = {
110
- getPConnect: PropTypes.func.isRequired,
111
- label: PropTypes.string,
112
- title: PropTypes.string,
113
- createLabel: PropTypes.string,
114
- updateLabel: PropTypes.string,
115
- resolveLabel: PropTypes.string,
116
- createOperator: PropTypes.objectOf(PropTypes.any),
117
- updateOperator: PropTypes.objectOf(PropTypes.any),
118
- resolveOperator: PropTypes.objectOf(PropTypes.any),
119
- createDateTime: PropTypes.string,
120
- updateDateTime: PropTypes.string,
121
- resolveDateTime: PropTypes.string,
122
- hideLabel: PropTypes.bool
123
- };
106
+
107
+
108
+ export default withConfiguration(PegaDxilMyPageCaseWidget);
124
109
 
125
110
  // as objects are there in props, shallow comparision fails & re-rendering of comp happens even with
126
111
  // same key value pairs in obj. hence using custom comparison function on when to re-render
@@ -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,20 +1,23 @@
1
1
 
2
2
  /* eslint-disable react/jsx-no-useless-fragment */
3
3
  // @ts-nocheck
4
- import { withKnobs } from '@storybook/addon-knobs';
4
+ import type { Meta, StoryObj } from '@storybook/react';
5
5
 
6
6
  import PegaDxilMyPageWidget from './index';
7
7
 
8
8
 
9
9
  import configProps from './mock';
10
10
 
11
- export default {
11
+ const meta: Meta<typeof PegaDxilMyPageWidget> = {
12
12
  title: 'PegaDxilMyPageWidget',
13
- decorators: [withKnobs],
14
- component: PegaDxilMyPageWidget
13
+ component: PegaDxilMyPageWidget,
14
+ excludeStories: /.*Data$/
15
15
  };
16
16
 
17
- export const BasePegaDxilMyPageWidget = () => {
17
+ export default meta;
18
+ type Story = StoryObj<typeof PegaDxilMyPageWidget>;
19
+
20
+ export const BasePegaDxilMyPageWidget: Story = args => {
18
21
 
19
22
  const props = {
20
23
  label: configProps.label,
@@ -1,4 +1,4 @@
1
- import PropTypes from 'prop-types';
1
+ import { withConfiguration } from '@pega/cosmos-react-core';
2
2
  import { AppAnnouncement as PegaAppAnnouncement } from '@pega/cosmos-react-work';
3
3
  import type { PConnFieldProps } from './PConnProps';
4
4
 
@@ -19,9 +19,9 @@ interface PegaDxilMyPageWidgetProps extends PConnFieldProps {
19
19
 
20
20
  // props passed in combination of props from property panel (config.json) and run time props from Constellation
21
21
  // any default values in config.pros should be set in defaultProps at bottom of this file
22
- export default function PegaDxilMyPageWidget(props: PegaDxilMyPageWidgetProps) {
22
+ function PegaDxilMyPageWidget(props: PegaDxilMyPageWidgetProps) {
23
23
 
24
- const { header, description, datasource, whatsnewlink, image } = props;
24
+ const { header, description, datasource = [], whatsnewlink, image } = props;
25
25
  let details = [];
26
26
  // @ts-ignore
27
27
  if (datasource && datasource.source) {
@@ -44,18 +44,4 @@ export default function PegaDxilMyPageWidget(props: PegaDxilMyPageWidgetProps) {
44
44
 
45
45
  }
46
46
 
47
- PegaDxilMyPageWidget.defaultProps = {
48
- header: '',
49
- description: '',
50
- image: '',
51
- datasource: [],
52
- whatsnewlink: ''
53
- };
54
-
55
- PegaDxilMyPageWidget.propTypes = {
56
- header: PropTypes.string,
57
- description: PropTypes.string,
58
- datasource: PropTypes.instanceOf(Object),
59
- whatsnewlink: PropTypes.string,
60
- image: PropTypes.string
61
- };
47
+ export default withConfiguration(PegaDxilMyPageWidget);
@@ -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,19 +1,22 @@
1
1
 
2
2
  /* eslint-disable react/jsx-no-useless-fragment */
3
3
  // @ts-nocheck
4
- import { withKnobs } from '@storybook/addon-knobs';
4
+ import type { Meta, StoryObj } from '@storybook/react';
5
5
 
6
6
  import PegaDxilMyParagraph from './index';
7
7
 
8
8
  import { stateProps, configProps, fieldMetadata } from './mock';
9
9
 
10
- export default {
10
+ const meta: Meta<typeof PegaDxilMyParagraph> = {
11
11
  title: 'PegaDxilMyParagraph',
12
- decorators: [withKnobs],
13
- component: PegaDxilMyParagraph
12
+ component: PegaDxilMyParagraph,
13
+ excludeStories: /.*Data$/
14
14
  };
15
15
 
16
- export const BasePegaDxilMyParagraph = () => {
16
+ export default meta;
17
+ type Story = StoryObj<typeof PegaDxilMyParagraph>;
18
+
19
+ export const BasePegaDxilMyParagraph: Story = args => {
17
20
 
18
21
  const props = {
19
22
  value: configProps.value,
@@ -1,6 +1,6 @@
1
1
  import { useState, useEffect, useRef } from 'react';
2
- import { TextArea as CosmosTextArea, FieldValueList, ParagraphDisplay, Text, EmailDisplay, PhoneDisplay, URLDisplay } from '@pega/cosmos-react-core';
3
- import PropTypes from 'prop-types';
2
+ import { TextArea as CosmosTextArea, FieldValueList, ParagraphDisplay, Text, EmailDisplay, PhoneDisplay, URLDisplay, withConfiguration } from '@pega/cosmos-react-core';
3
+
4
4
  import type { PConnFieldProps } from './PConnProps';
5
5
 
6
6
  // includes in bundle
@@ -73,22 +73,22 @@ export const textFormatter = (formatter: string, value: any) => {
73
73
 
74
74
  // props passed in combination of props from property panel (config.json) and run time props from Constellation
75
75
  // any default values in config.pros should be set in defaultProps at bottom of this file
76
- export default function PegaDxilMyParagraph(props: PegaDxilMyParagraphProps) {
76
+ function PegaDxilMyParagraph(props: PegaDxilMyParagraphProps) {
77
77
  const {
78
78
  getPConnect,
79
79
  value,
80
- hideLabel,
80
+ hideLabel = false,
81
81
  placeholder,
82
82
  validatemessage,
83
83
  label,
84
84
  helperText,
85
85
  testId,
86
- fieldMetadata,
86
+ fieldMetadata = {},
87
87
  displayMode,
88
- additionalProps,
89
- variant,
90
- isTableFormatter,
91
- hasSuggestions
88
+ additionalProps = {},
89
+ variant = 'inline',
90
+ isTableFormatter = false,
91
+ hasSuggestions = false
92
92
  } = props;
93
93
  const { formatter } = props;
94
94
  const pConn = getPConnect();
@@ -99,7 +99,7 @@ export default function PegaDxilMyParagraph(props: PegaDxilMyParagraphProps) {
99
99
  const hasValueChange = useRef(false);
100
100
 
101
101
  // BUG-547602: Temporary type coercion for 8.5 until DXAPIs are enhanced to pass original pxViewMetadata JSON, respecting boolean primitives
102
- let { readOnly, required, disabled } = props;
102
+ let { readOnly = false, required = false, disabled = false } = props;
103
103
  [readOnly, required, disabled] = [readOnly, required, disabled].map(
104
104
  (prop) => prop === true || (typeof prop === 'string' && prop === 'true')
105
105
  );
@@ -207,42 +207,6 @@ export default function PegaDxilMyParagraph(props: PegaDxilMyParagraphProps) {
207
207
  );
208
208
  }
209
209
 
210
- PegaDxilMyParagraph.defaultProps = {
211
- value: '',
212
- placeholder: '',
213
- validatemessage: '',
214
- helperText: '',
215
- hideLabel: false,
216
- disabled: false,
217
- readOnly: false,
218
- required: false,
219
- testId: '',
220
- displayMode: null,
221
- fieldMetadata: {},
222
- additionalProps: {},
223
- variant: 'inline',
224
- formatter: '',
225
- isTableFormatter: false,
226
- hasSuggestions: false
227
- };
228
210
 
229
- PegaDxilMyParagraph.propTypes = {
230
- value: PropTypes.string,
231
- placeholder: PropTypes.string,
232
- label: PropTypes.string.isRequired,
233
- hideLabel: PropTypes.bool,
234
- getPConnect: PropTypes.func.isRequired,
235
- validatemessage: PropTypes.string,
236
- displayMode: PropTypes.string,
237
- helperText: PropTypes.string,
238
- disabled: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
239
- readOnly: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
240
- required: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
241
- testId: PropTypes.string,
242
- fieldMetadata: PropTypes.objectOf(PropTypes.any),
243
- additionalProps: PropTypes.objectOf(PropTypes.any),
244
- variant: PropTypes.string,
245
- formatter: PropTypes.string,
246
- isTableFormatter: PropTypes.bool,
247
- hasSuggestions: PropTypes.bool
248
- };
211
+
212
+ export default withConfiguration(PegaDxilMyParagraph);
@@ -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,19 +1,22 @@
1
1
 
2
2
  /* eslint-disable react/jsx-no-useless-fragment */
3
3
  // @ts-nocheck
4
- import { withKnobs } from '@storybook/addon-knobs';
4
+ import type { Meta, StoryObj } from '@storybook/react';
5
5
 
6
6
  import { configProps, stateProps, fieldMetadata } from './mock';
7
7
 
8
8
  import PegaDxilMyPercentage from './index';
9
9
 
10
- export default {
10
+ const meta: Meta<typeof PegaDxilMyPercentage> = {
11
11
  title: 'PegaDxilMyPercentage',
12
- decorators: [withKnobs],
13
- component: PegaDxilMyPercentage
12
+ component: PegaDxilMyPercentage,
13
+ excludeStories: /.*Data$/
14
14
  };
15
15
 
16
- export const BasePegaDxilMyPercentage = () => {
16
+ export default meta;
17
+ type Story = StoryObj<typeof PegaDxilMyPercentage>;
18
+
19
+ export const BasePegaDxilMyPercentage: Story = args => {
17
20
 
18
21
  const props = {
19
22
  value: configProps.value,