@pega/custom-dx-components 0.23.34 → 0.23.36

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 (325) hide show
  1. package/SECURITY.md +10 -0
  2. package/package.json +1 -1
  3. package/src/tasks/build-all/index.js +10 -25
  4. package/src/tasks/build-comp/index.js +1 -0
  5. package/src/tasks/create/templates/Constellation/Field/Boolean/Boolean.ts.mustache +35 -0
  6. package/src/tasks/create/templates/Constellation/Field/Boolean/demo.stories.tsx.mustache +8 -5
  7. package/src/tasks/create/templates/Constellation/Field/Boolean/index.tsx.mustache +11 -48
  8. package/src/tasks/create/templates/Constellation/Field/Boolean/styles.ts.mustache +7 -14
  9. package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/DateFormatter.js → src/tasks/create/templates/Constellation/Field/Date/DateFormatter.ts.mustache} +6 -6
  10. package/src/tasks/create/templates/Constellation/Field/Date/FormattedText.tsx.mustache +20 -0
  11. package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/date.js → src/tasks/create/templates/Constellation/Field/Date/date.ts.mustache} +2 -2
  12. package/src/tasks/create/templates/Constellation/Field/Date/demo.stories.tsx.mustache +8 -5
  13. package/src/tasks/create/templates/Constellation/Field/Date/index.tsx.mustache +29 -70
  14. package/src/tasks/create/templates/Constellation/Field/Date/styles.ts.mustache +7 -14
  15. package/src/tasks/create/templates/Constellation/Field/DateTime/{date-time.js.mustache → date-time.ts.mustache} +12 -12
  16. 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
  17. package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date.js → src/tasks/create/templates/Constellation/Field/DateTime/date.ts.mustache} +1 -0
  18. package/src/tasks/create/templates/Constellation/Field/DateTime/demo.stories.tsx.mustache +9 -6
  19. package/src/tasks/create/templates/Constellation/Field/DateTime/index.tsx.mustache +12 -59
  20. package/src/tasks/create/templates/Constellation/Field/DateTime/styles.ts.mustache +7 -14
  21. package/src/tasks/create/templates/Constellation/Field/Decimal/demo.stories.tsx.mustache +8 -5
  22. package/src/tasks/create/templates/Constellation/Field/Decimal/index.tsx.mustache +14 -67
  23. package/src/tasks/create/templates/Constellation/Field/Decimal/styles.ts.mustache +7 -14
  24. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/demo.stories.tsx.mustache +8 -5
  25. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/index.tsx.mustache +21 -75
  26. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/styles.ts.mustache +7 -14
  27. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/demo.stories.tsx.mustache +8 -5
  28. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/index.tsx.mustache +13 -54
  29. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/styles.ts.mustache +7 -14
  30. package/src/tasks/create/templates/Constellation/Field/Integer/demo.stories.tsx.mustache +8 -5
  31. package/src/tasks/create/templates/Constellation/Field/Integer/index.tsx.mustache +23 -87
  32. package/src/tasks/create/templates/Constellation/Field/Integer/styles.ts.mustache +7 -14
  33. package/src/tasks/create/templates/Constellation/Field/Picklist/demo.stories.tsx.mustache +8 -5
  34. package/src/tasks/create/templates/Constellation/Field/Picklist/index.tsx.mustache +12 -60
  35. package/src/tasks/create/templates/Constellation/Field/Picklist/styles.ts.mustache +7 -14
  36. package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/date.js → src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/date.ts.mustache} +2 -1
  37. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/demo.stories.tsx.mustache +8 -5
  38. 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
  39. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/index.tsx.mustache +15 -76
  40. 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
  41. 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
  42. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/{repeat-utils.js.mustache → repeat-utils.ts.mustache} +6 -12
  43. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/styles.ts.mustache +7 -14
  44. 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
  45. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/utils.ts.mustache +1 -1
  46. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/demo.stories.tsx.mustache +8 -5
  47. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/index.tsx.mustache +11 -55
  48. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/styles.ts.mustache +7 -14
  49. package/src/tasks/create/templates/Constellation/Field/Text/demo.stories.tsx.mustache +8 -5
  50. package/src/tasks/create/templates/Constellation/Field/Text/index.tsx.mustache +4 -22
  51. package/src/tasks/create/templates/Constellation/Field/Text/styles.ts.mustache +7 -14
  52. package/src/tasks/create/templates/Constellation/Field/Text-Email/demo.stories.tsx.mustache +8 -5
  53. package/src/tasks/create/templates/Constellation/Field/Text-Email/index.tsx.mustache +9 -46
  54. package/src/tasks/create/templates/Constellation/Field/Text-Email/styles.ts.mustache +7 -14
  55. package/src/tasks/create/templates/Constellation/Field/Text-Input/demo.stories.tsx.mustache +7 -4
  56. package/src/tasks/create/templates/Constellation/Field/Text-Input/index.tsx.mustache +10 -50
  57. package/src/tasks/create/templates/Constellation/Field/Text-Input/styles.ts.mustache +7 -14
  58. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/demo.stories.tsx.mustache +8 -5
  59. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/index.tsx.mustache +12 -48
  60. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/styles.ts.mustache +7 -14
  61. package/src/tasks/create/templates/Constellation/Field/Text-Phone/demo.stories.tsx.mustache +8 -5
  62. package/src/tasks/create/templates/Constellation/Field/Text-Phone/index.tsx.mustache +13 -52
  63. package/src/tasks/create/templates/Constellation/Field/Text-Phone/styles.ts.mustache +7 -14
  64. package/src/tasks/create/templates/Constellation/Field/Text-URL/demo.stories.tsx.mustache +8 -5
  65. package/src/tasks/create/templates/Constellation/Field/Text-URL/index.tsx.mustache +15 -71
  66. package/src/tasks/create/templates/Constellation/Field/Text-URL/styles.ts.mustache +7 -14
  67. 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
  68. package/src/tasks/create/templates/Constellation/Field/TimeofDay/demo.stories.tsx.mustache +8 -6
  69. package/src/tasks/create/templates/Constellation/Field/TimeofDay/index.tsx.mustache +16 -52
  70. package/src/tasks/create/templates/Constellation/Field/TimeofDay/styles.ts.mustache +7 -14
  71. package/src/tasks/create/templates/Constellation/Field/{DateTime/date-utils.js.mustache → TimeofDay/time-of-day.ts.mustache} +24 -23
  72. package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.stories.tsx.mustache +14 -5
  73. package/src/tasks/create/templates/Constellation/Template/DETAILS/index.tsx.mustache +4 -17
  74. package/src/tasks/create/templates/Constellation/Template/DETAILS/styles.ts.mustache +7 -14
  75. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/demo.stories.tsx.mustache +10 -3
  76. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/index.tsx.mustache +4 -18
  77. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/styles.ts.mustache +7 -14
  78. package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/utils.js → src/tasks/create/templates/Constellation/Template/DETAILS-region/utils.ts.mustache} +15 -13
  79. package/src/tasks/create/templates/Constellation/Template/FORM/demo.stories.tsx.mustache +11 -5
  80. package/src/tasks/create/templates/Constellation/Template/FORM/index.tsx.mustache +5 -13
  81. package/src/tasks/create/templates/Constellation/Template/FORM/styles.ts.mustache +7 -14
  82. package/src/tasks/create/templates/Constellation/Template/FORM-region/demo.stories.tsx.mustache +11 -5
  83. package/src/tasks/create/templates/Constellation/Template/FORM-region/index.tsx.mustache +4 -10
  84. package/src/tasks/create/templates/Constellation/Template/FORM-region/styles.ts.mustache +7 -14
  85. package/src/tasks/create/templates/Constellation/Template/PAGE/demo.stories.tsx.mustache +8 -5
  86. package/src/tasks/create/templates/Constellation/Template/PAGE/index.tsx.mustache +5 -16
  87. package/src/tasks/create/templates/Constellation/Template/PAGE/styles.ts.mustache +7 -14
  88. package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/utils.js → src/tasks/create/templates/Constellation/Template/PAGE/utils.ts.mustache} +28 -14
  89. package/src/tasks/create/templates/Constellation/Widget/CASE/demo.stories.tsx.mustache +8 -5
  90. package/src/tasks/create/templates/Constellation/Widget/CASE/index.tsx.mustache +3 -10
  91. package/src/tasks/create/templates/Constellation/Widget/CASE/styles.ts.mustache +7 -14
  92. package/src/tasks/create/templates/Constellation/Widget/PAGE/demo.stories.tsx.mustache +8 -5
  93. package/src/tasks/create/templates/Constellation/Widget/PAGE/index.tsx.mustache +4 -18
  94. package/src/tasks/create/templates/Constellation/Widget/PAGE/styles.ts.mustache +7 -14
  95. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Avatar.tsx.mustache +3 -13
  96. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Operator.tsx.mustache +49 -94
  97. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/demo.stories.tsx.mustache +8 -5
  98. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/index.tsx.mustache +24 -39
  99. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/styles.ts.mustache +7 -14
  100. package/src/tasks/create/templates/Launchpad/Widget/CASE/demo.stories.tsx.mustache +8 -5
  101. package/src/tasks/create/templates/Launchpad/Widget/CASE/index.tsx.mustache +3 -9
  102. package/src/tasks/create/templates/Launchpad/Widget/CASE/styles.ts.mustache +7 -14
  103. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/Avatar.tsx.mustache +1 -11
  104. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/Operator.tsx.mustache +33 -123
  105. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/demo.stories.tsx.mustache +8 -5
  106. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/index.tsx.mustache +22 -21
  107. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/styles.ts.mustache +7 -14
  108. package/src/tasks/delete-all/helper.js +37 -5
  109. package/src/tasks/init/template/package.json.mustache +2 -2
  110. package/src/tasks/linter/index.js +7 -4
  111. package/src/tasks/list/helper.js +10 -0
  112. package/src/tasks/list/index.js +20 -3
  113. package/src/tasks/publish/helper.js +1 -1
  114. package/src/tasks/publish/index.js +6 -4
  115. package/src/tasks/publish-all/helper.js +52 -40
  116. package/src/tasks/publish-all/index.js +16 -17
  117. package/src/util.js +103 -61
  118. package/tests/assets/components/create/Pega_DXIL_MyTestText/demo.stories.tsx +8 -5
  119. package/tests/assets/components/create/Pega_DXIL_MyTestText/index.tsx +4 -22
  120. package/tests/assets/components/create/Pega_DXIL_MyTestText/styles.ts +7 -14
  121. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/Boolean.ts +35 -0
  122. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/demo.stories.tsx +8 -5
  123. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/index.tsx +10 -47
  124. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/styles.ts +7 -14
  125. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/demo.stories.tsx +8 -5
  126. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/index.tsx +3 -10
  127. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/styles.ts +7 -14
  128. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/demo.stories.tsx +8 -5
  129. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/index.tsx +21 -75
  130. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/styles.ts +7 -14
  131. package/{src/tasks/create/templates/Constellation/Field/Date/DateFormatter.js.mustache → tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/DateFormatter.ts} +6 -6
  132. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/FormattedText.tsx +20 -0
  133. package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MyDate/date.js → Constellation/Pega_DXIL_MyDate/date.ts} +2 -2
  134. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/demo.stories.tsx +8 -5
  135. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/index.tsx +18 -59
  136. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/styles.ts +7 -14
  137. package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MyDateTime/date-time.js → Constellation/Pega_DXIL_MyDateTime/date-time.ts} +12 -12
  138. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date-utils.ts +288 -0
  139. package/{src/tasks/create/templates/Constellation/Field/DateTime/date.js.mustache → tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date.ts} +1 -0
  140. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/demo.stories.tsx +9 -6
  141. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/index.tsx +12 -59
  142. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/styles.ts +7 -14
  143. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/demo.stories.tsx +8 -5
  144. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/index.tsx +14 -67
  145. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/styles.ts +7 -14
  146. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/demo.stories.tsx +12 -3
  147. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/index.tsx +4 -17
  148. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/styles.ts +7 -14
  149. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/demo.stories.tsx +8 -5
  150. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/index.tsx +9 -46
  151. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/styles.ts +7 -14
  152. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/demo.stories.tsx +11 -5
  153. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/index.tsx +5 -13
  154. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/styles.ts +7 -14
  155. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/demo.stories.tsx +8 -5
  156. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/index.tsx +23 -87
  157. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/styles.ts +7 -14
  158. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/demo.stories.tsx +8 -5
  159. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/index.tsx +5 -16
  160. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/styles.ts +7 -14
  161. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/{utils.js → utils.ts} +28 -14
  162. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/Avatar.tsx +3 -13
  163. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/Operator.tsx +49 -94
  164. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +8 -5
  165. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/index.tsx +24 -39
  166. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/styles.ts +7 -14
  167. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/demo.stories.tsx +8 -5
  168. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/index.tsx +4 -18
  169. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/styles.ts +7 -14
  170. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/demo.stories.tsx +8 -5
  171. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/index.tsx +12 -48
  172. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/styles.ts +7 -14
  173. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/demo.stories.tsx +8 -5
  174. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/index.tsx +13 -54
  175. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/styles.ts +7 -14
  176. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/demo.stories.tsx +8 -5
  177. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/index.tsx +13 -52
  178. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/styles.ts +7 -14
  179. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/demo.stories.tsx +8 -5
  180. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/index.tsx +12 -60
  181. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/styles.ts +7 -14
  182. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/demo.stories.tsx +8 -5
  183. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/index.tsx +11 -55
  184. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/styles.ts +7 -14
  185. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/{date.js → date.ts} +2 -1
  186. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/demo.stories.tsx +8 -5
  187. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/{embed-utils.js → embed-utils.ts} +2 -1
  188. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/index.tsx +15 -76
  189. package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MySearchbox/picklist-utils.js → Constellation/Pega_DXIL_MySearchbox/picklist-utils.ts} +1 -0
  190. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/{repeat-constants.js → repeat-constants.ts} +1 -1
  191. package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MySearchbox/repeat-utils.js → Constellation/Pega_DXIL_MySearchbox/repeat-utils.ts} +6 -12
  192. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/styles.ts +7 -14
  193. package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MySearchbox/textformat-utils.jsx → Constellation/Pega_DXIL_MySearchbox/textformat-utils.tsx} +30 -10
  194. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/utils.ts +1 -1
  195. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/demo.stories.tsx +8 -5
  196. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/index.tsx +4 -22
  197. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/styles.ts +7 -14
  198. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/demo.stories.tsx +7 -4
  199. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/index.tsx +10 -50
  200. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/styles.ts +7 -14
  201. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +8 -6
  202. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/index.tsx +16 -52
  203. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/styles.ts +7 -14
  204. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/{time-of-day.js → time-of-day.ts} +24 -23
  205. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +10 -3
  206. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/index.tsx +4 -18
  207. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/styles.ts +7 -14
  208. package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MyTwoColumnDetails/utils.js → Constellation/Pega_DXIL_MyTwoColumnDetails/utils.ts} +15 -13
  209. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/demo.stories.tsx +11 -5
  210. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/index.tsx +4 -10
  211. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/styles.ts +7 -14
  212. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/demo.stories.tsx +8 -5
  213. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/index.tsx +15 -71
  214. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/styles.ts +7 -14
  215. 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
  216. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/Boolean.ts +35 -0
  217. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/demo.stories.tsx +8 -5
  218. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/index.tsx +10 -47
  219. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/styles.ts +7 -14
  220. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/demo.stories.tsx +8 -5
  221. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/index.tsx +3 -9
  222. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/styles.ts +7 -14
  223. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/demo.stories.tsx +8 -5
  224. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/index.tsx +21 -75
  225. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/styles.ts +7 -14
  226. package/tests/assets/components/createAll/{Constellation/Pega_DXIL_MyDate/DateFormatter.js → Launchpad/Pega_DXIL_MyDate/DateFormatter.ts} +6 -6
  227. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/FormattedText.tsx +20 -0
  228. package/{src/tasks/create/templates/Constellation/Field/Date/date.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/date.ts} +2 -2
  229. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/demo.stories.tsx +8 -5
  230. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/index.tsx +18 -59
  231. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/styles.ts +7 -14
  232. package/tests/assets/components/createAll/{Constellation/Pega_DXIL_MyDateTime/date-time.js → Launchpad/Pega_DXIL_MyDateTime/date-time.ts} +12 -12
  233. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date-utils.ts +288 -0
  234. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/{date.js → date.ts} +1 -0
  235. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/demo.stories.tsx +9 -6
  236. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/index.tsx +12 -59
  237. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/styles.ts +7 -14
  238. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/demo.stories.tsx +8 -5
  239. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/index.tsx +14 -67
  240. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/styles.ts +7 -14
  241. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/demo.stories.tsx +12 -3
  242. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/index.tsx +4 -17
  243. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/styles.ts +7 -14
  244. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/demo.stories.tsx +8 -5
  245. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/index.tsx +9 -46
  246. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/styles.ts +7 -14
  247. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/demo.stories.tsx +11 -5
  248. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/index.tsx +5 -13
  249. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/styles.ts +7 -14
  250. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/demo.stories.tsx +8 -5
  251. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/index.tsx +23 -87
  252. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/styles.ts +7 -14
  253. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/demo.stories.tsx +8 -5
  254. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/index.tsx +5 -16
  255. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/styles.ts +7 -14
  256. package/{src/tasks/create/templates/Constellation/Template/PAGE/utils.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/utils.ts} +28 -14
  257. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/Avatar.tsx +1 -11
  258. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/Operator.tsx +33 -123
  259. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +8 -5
  260. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/index.tsx +22 -20
  261. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/styles.ts +7 -14
  262. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/demo.stories.tsx +8 -5
  263. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/index.tsx +4 -18
  264. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/styles.ts +7 -14
  265. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/demo.stories.tsx +8 -5
  266. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/index.tsx +12 -48
  267. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/styles.ts +7 -14
  268. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/demo.stories.tsx +8 -5
  269. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/index.tsx +13 -54
  270. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/styles.ts +7 -14
  271. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/demo.stories.tsx +8 -5
  272. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/index.tsx +13 -52
  273. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/styles.ts +7 -14
  274. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/demo.stories.tsx +8 -5
  275. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/index.tsx +12 -60
  276. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/styles.ts +7 -14
  277. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/demo.stories.tsx +8 -5
  278. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/index.tsx +11 -55
  279. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/styles.ts +7 -14
  280. package/{src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/date.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/date.ts} +2 -1
  281. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/demo.stories.tsx +8 -5
  282. 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
  283. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/index.tsx +15 -76
  284. 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
  285. 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
  286. package/tests/assets/components/createAll/{Constellation/Pega_DXIL_MySearchbox/repeat-utils.js → Launchpad/Pega_DXIL_MySearchbox/repeat-utils.ts} +6 -12
  287. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/styles.ts +7 -14
  288. 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
  289. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/utils.ts +1 -1
  290. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/demo.stories.tsx +8 -5
  291. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/index.tsx +4 -22
  292. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/styles.ts +7 -14
  293. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/demo.stories.tsx +7 -4
  294. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/index.tsx +10 -50
  295. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/styles.ts +7 -14
  296. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +8 -6
  297. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/index.tsx +16 -52
  298. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/styles.ts +7 -14
  299. 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
  300. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +10 -3
  301. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/index.tsx +4 -18
  302. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/styles.ts +7 -14
  303. package/{src/tasks/create/templates/Constellation/Template/DETAILS-region/utils.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/utils.ts} +15 -13
  304. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/demo.stories.tsx +11 -5
  305. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/index.tsx +4 -10
  306. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/styles.ts +7 -14
  307. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/demo.stories.tsx +8 -5
  308. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/index.tsx +15 -71
  309. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/styles.ts +7 -14
  310. package/tests/assets/components/createAll/{Constellation/Pega_DXIL_MyURL/text-url.jsx → Launchpad/Pega_DXIL_MyURL/text-url.tsx} +4 -3
  311. package/tests/functional/localCreateAllListDeleteAll.test.js +10 -3
  312. package/src/tasks/create/templates/Constellation/Field/Boolean/Boolean.js.mustache +0 -38
  313. package/src/tasks/create/templates/Constellation/Field/Date/FormattedText.jsx.mustache +0 -41
  314. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/Boolean.js +0 -38
  315. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/FormattedText.jsx +0 -41
  316. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/Boolean.js +0 -38
  317. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/FormattedText.jsx +0 -41
  318. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date-utils.js +0 -287
  319. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/time-of-day.js +0 -287
  320. /package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/{component-constants.js → component-constants.ts} +0 -0
  321. /package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/{format-constants.js.mustache → format-constants.ts.mustache} +0 -0
  322. /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/{component-constants.js → component-constants.ts} +0 -0
  323. /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/{format-constants.js → format-constants.ts} +0 -0
  324. /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/{component-constants.js → component-constants.ts} +0 -0
  325. /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);
@@ -1,19 +1,18 @@
1
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
- import React from 'react';
1
+ // @ts-nocheck
3
2
  import { useState, useEffect, Fragment } from 'react';
4
3
  import {
5
4
  Link,
6
5
  Button,
7
6
  Popover,
8
- Flex,
9
7
  useOuterEvent,
10
8
  useElement,
11
9
  Progress,
12
10
  FormField,
13
- useTheme
11
+ useTheme,
12
+ withConfiguration
14
13
  } from '@pega/cosmos-react-core';
15
14
  import { Glimpse } from '@pega/cosmos-react-work';
16
- import PropTypes from 'prop-types';
15
+ import { EmailDisplay } from '@pega/cosmos-react-core';
17
16
 
18
17
  import type { PConnFieldProps } from './PConnProps';
19
18
 
@@ -30,19 +29,19 @@ interface PegaDxilMyPageCaseWidgetOperatorProps extends PConnFieldProps {
30
29
  externalUser: any;
31
30
  }
32
31
 
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);
38
- const [popoverTarget, setPopoverTarget] = useState(null);
39
38
  const [popoverEl, setPopoverEl] = useElement(null);
40
39
  const [popoverContent, setpopoverContent] = useState(null);
41
40
  const theme: any = useTheme();
42
41
 
43
42
  /* If the id has changed, we need to reset the popover */
44
43
  useEffect(() => {
45
- setPopoverTarget(null);
44
+ pTarget = null;
46
45
  }, [id]);
47
46
 
48
47
 
@@ -51,7 +50,6 @@ export default function Operator(props: PegaDxilMyPageCaseWidgetOperatorProps) {
51
50
  const localizedVal = PCore.getLocaleUtils().getLocaleValue;
52
51
  const localeCategory = 'Operator';
53
52
  setpopoverContent(
54
- // @ts-ignore
55
53
  <Progress variant='ring' message={localizedVal('Loading operator...', localeCategory)} placement='local' />
56
54
  );
57
55
  if (externalUser && externalUser.classID !== 'Data-Party-Operator') {
@@ -75,10 +73,8 @@ export default function Operator(props: PegaDxilMyPageCaseWidgetOperatorProps) {
75
73
  ];
76
74
  setIsLoading(false);
77
75
  setpopoverContent(
78
- // @ts-ignore
79
76
  <Glimpse
80
77
  visual={
81
- // @ts-ignore
82
78
  <Avatar
83
79
  metaObj={{
84
80
  name: externalUser.name
@@ -88,88 +84,63 @@ export default function Operator(props: PegaDxilMyPageCaseWidgetOperatorProps) {
88
84
  primary={externalUser.name}
89
85
  secondary={[externalUser.position]}
90
86
  fields={fields}
87
+ target={pTarget}
91
88
  />
92
89
  );
93
90
  } else {
94
- const { getOperatorDetails } = PCore.getUserApi();
95
- getOperatorDetails(id)
96
- .then((res) => {
97
- if (res.data && res.data.pyOperatorInfo && res.data.pyOperatorInfo.pyUserName) {
98
- const fields = [
99
- {
100
- id: 'pyOrganization',
101
- name: localizedVal('Organization', localeCategory),
102
- value: res.data.pyOperatorInfo.pyOrganization
103
- },
104
- {
105
- id: 'pyTelephone',
106
- name: localizedVal('Telephone', localeCategory),
107
- value:
108
- res.data.pyOperatorInfo.pyTelephone !== '' ? (
109
- <Link href={`tel:${res.data.pyOperatorInfo.pyTelephone}`}>
110
- {res.data.pyOperatorInfo.pyTelephone}
111
- </Link>
112
- ) : (
113
- ''
114
- )
115
- },
116
- {
117
- id: 'pyEmailAddress',
91
+ return PCore.getUserApi()
92
+ .getOperatorDetails(id, true)
93
+ .then(res => {
94
+ if (res.data?.pyOperatorInfo) {
95
+ const fields = [];
96
+ const data = res.data;
97
+ if (data.pyOperatorInfo && data.pyOperatorInfo.pyUserName) {
98
+ fields.push({
99
+ id: 'Name',
100
+ name: localizedVal('Name', localeCategory),
101
+ value: data.pyOperatorInfo.pyUserName
102
+ });
103
+ }
104
+ if (data.pyOperatorInfo && data.pyOperatorInfo.pyEmailAddress) {
105
+ fields.push({
106
+ id: 'Email',
118
107
  name: localizedVal('Email address', localeCategory),
119
- value:
120
- res.data.pyOperatorInfo.pyEmailAddress !== '' ? (
121
- <Link href={`mailto:${res.data.pyOperatorInfo.pyEmailAddress}`}>
122
- {res.data.pyOperatorInfo.pyEmailAddress}
123
- </Link>
124
- ) : (
125
- ''
126
- )
127
- },
128
- {
129
- id: 'ReportToUserName',
130
- name: localizedVal('Reports to', localeCategory),
131
- value: res.data.pyOperatorInfo.pyReportToUserName
132
- }
133
- ];
108
+ value: <EmailDisplay value={data.pyOperatorInfo.pyEmailAddress} />
109
+ });
110
+ }
111
+ const opAvatar = (
112
+ <Avatar
113
+ metaObj={{
114
+ image: '',
115
+ name: data.pyOperatorInfo.pyUserName
116
+ }}
117
+ />
118
+ );
119
+
134
120
  setIsLoading(false);
135
121
  setpopoverContent(
136
- // @ts-ignore
137
122
  <Glimpse
138
- visual={
139
- // @ts-ignore
140
- <Avatar
141
- metaObj={{
142
- image: res.data.pyOperatorInfo.pyImageInsKey || '',
143
- name: res.data.pyOperatorInfo.pyUserName
144
- }}
145
- />
146
- }
147
- primary={res.data.pyOperatorInfo.pyUserName}
148
- secondary={[res.data.pyOperatorInfo.pyPosition]}
123
+ heading={{
124
+ primary: data.pyOperatorInfo.pyUserName,
125
+ secondary: data.pyOperatorInfo.pyEmailAddress,
126
+ visual: opAvatar
127
+ }}
149
128
  fields={fields}
129
+ target={pTarget}
130
+ onDismiss={() => {pTarget = null;}}
150
131
  />
151
132
  );
152
- } else {
153
- setIsLoading(false);
154
- // @ts-ignore
155
- setpopoverContent(<Flex container={{ pad: 1 }}>{localizedVal('Operator not found', localeCategory)}</Flex>);
156
133
  }
157
- })
158
- .catch(() => {
159
- setIsLoading(false);
160
- setpopoverContent(
161
- // @ts-ignore
162
- <Flex container={{ pad: 1 }}>{localizedVal('Error loading the operator profile', localeCategory)}</Flex>
163
- );
164
134
  });
165
135
  }
166
136
  };
167
137
 
168
138
 
169
139
  const clickAction = (e: any) => {
170
- setPopoverTarget(e.currentTarget);
140
+
171
141
  setIsOpen(!isOpen);
172
- if (popoverTarget === null) {
142
+ if (pTarget === null) {
143
+ pTarget = e.currentTarget;
173
144
  OperatorPreview();
174
145
  }
175
146
  };
@@ -180,8 +151,7 @@ export default function Operator(props: PegaDxilMyPageCaseWidgetOperatorProps) {
180
151
  }
181
152
  };
182
153
 
183
- // @ts-ignore
184
- useOuterEvent('mousedown', [popoverEl, popoverTarget], hidePopover); // Call the method on clicking outside these elements
154
+ useOuterEvent('mousedown', [popoverEl], hidePopover); // Call the method on clicking outside these elements
185
155
 
186
156
  const hideOnEscape = (e: any) => {
187
157
  if (e.key === 'Escape') hidePopover(); // Call the method when Escape key is pressed
@@ -219,7 +189,7 @@ export default function Operator(props: PegaDxilMyPageCaseWidgetOperatorProps) {
219
189
  <Popover
220
190
  ref={setPopoverEl}
221
191
  groupId='operator'
222
- target={popoverTarget}
192
+ target={pTarget}
223
193
  placement='bottom-start'
224
194
  style={isLoading ? { position: 'relative', width: '10rem', minHeight: '4rem' } : undefined}
225
195
  strategy='fixed'
@@ -241,20 +211,5 @@ export default function Operator(props: PegaDxilMyPageCaseWidgetOperatorProps) {
241
211
  return comp;
242
212
  };
243
213
 
244
- Operator.propTypes = {
245
- name: PropTypes.string,
246
- id: PropTypes.string,
247
- label: PropTypes.string,
248
- testId: PropTypes.string,
249
- helperText: PropTypes.string,
250
- metaObj: PropTypes.object
251
- };
252
214
 
253
- Operator.defaultProps = {
254
- name: '',
255
- id: '',
256
- label: null,
257
- testId: null,
258
- helperText: null,
259
- metaObj: null
260
- };
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);