@pega/custom-dx-components 23.1.13 → 24.1.11

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 (236) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/src/cli.js +1 -1
  4. package/src/constants.js +4 -0
  5. package/src/tasks/build-all/helper.js +6 -0
  6. package/src/tasks/build-comp/helper.js +8 -0
  7. package/src/tasks/bundle/builder/webpack.config.js +15 -1
  8. package/src/tasks/create/index.js +3 -0
  9. package/src/tasks/create/templates/Constellation/Field/Boolean/demo.stories.tsx.mustache +3 -13
  10. package/src/tasks/create/templates/Constellation/Field/Boolean/index.tsx.mustache +8 -5
  11. package/src/tasks/create/templates/Constellation/Field/Date/demo.stories.tsx.mustache +8 -19
  12. package/src/tasks/create/templates/Constellation/Field/DateTime/demo.stories.tsx.mustache +7 -18
  13. package/src/tasks/create/templates/Constellation/Field/DateTime/mock.ts.mustache +1 -0
  14. package/src/tasks/create/templates/Constellation/Field/Decimal/demo.stories.tsx.mustache +1 -7
  15. package/src/tasks/create/templates/Constellation/Field/Decimal/mock.ts.mustache +1 -0
  16. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/demo.stories.tsx.mustache +2 -9
  17. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/mock.ts.mustache +2 -0
  18. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/demo.stories.tsx.mustache +2 -6
  19. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/mock.ts.mustache +1 -0
  20. package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/PConnProps.d.ts.mustache +46 -0
  21. package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/config.json.mustache +64 -0
  22. package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/demo.stories.tsx.mustache +104 -0
  23. package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/index.tsx.mustache +218 -0
  24. package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/mock.ts.mustache +5 -0
  25. package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/styles.ts.mustache +8 -0
  26. package/src/tasks/create/templates/Constellation/Field/Integer/demo.stories.tsx.mustache +2 -6
  27. package/src/tasks/create/templates/Constellation/Field/Picklist/demo.stories.tsx.mustache +2 -6
  28. package/src/tasks/create/templates/Constellation/Field/Picklist/mock.ts.mustache +1 -0
  29. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/demo.stories.tsx.mustache +2 -8
  30. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/index.tsx.mustache +11 -0
  31. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/utils.ts.mustache +3 -0
  32. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/demo.stories.tsx.mustache +1 -7
  33. package/src/tasks/create/templates/Constellation/Field/Text/demo.stories.tsx.mustache +0 -3
  34. package/src/tasks/create/templates/Constellation/Field/Text/index.tsx.mustache +94 -4
  35. package/src/tasks/create/templates/Constellation/Field/Text-Email/demo.stories.tsx.mustache +1 -5
  36. package/src/tasks/create/templates/Constellation/Field/Text-Input/StatusWork.tsx +3 -9
  37. package/src/tasks/create/templates/Constellation/Field/Text-Input/demo.stories.tsx.mustache +1 -5
  38. package/src/tasks/create/templates/Constellation/Field/Text-Input/mock.ts.mustache +1 -0
  39. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/demo.stories.tsx.mustache +1 -5
  40. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/mock.ts.mustache +1 -0
  41. package/src/tasks/create/templates/Constellation/Field/Text-Phone/demo.stories.tsx.mustache +2 -5
  42. package/src/tasks/create/templates/Constellation/Field/Text-Phone/mock.ts.mustache +1 -0
  43. package/src/tasks/create/templates/Constellation/Field/Text-URL/demo.stories.tsx.mustache +1 -5
  44. package/src/tasks/create/templates/Constellation/Field/Text-URL/mock.ts.mustache +1 -0
  45. package/src/tasks/create/templates/Constellation/Field/TimeofDay/demo.stories.tsx.mustache +5 -15
  46. package/src/tasks/create/templates/Constellation/Template/DETAILS/Avatar.tsx.mustache +78 -0
  47. package/src/tasks/create/templates/Constellation/Template/DETAILS/DetailsRender.tsx.mustache +55 -0
  48. package/src/tasks/create/templates/Constellation/Template/DETAILS/HighlightRender.tsx.mustache +49 -0
  49. package/src/tasks/create/templates/Constellation/Template/DETAILS/Operator.tsx.mustache +218 -0
  50. package/src/tasks/create/templates/Constellation/Template/DETAILS/StatusWork.tsx.mustache +17 -19
  51. package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.stories.tsx.mustache +79 -25
  52. package/src/tasks/create/templates/Constellation/Template/DETAILS/index.tsx.mustache +51 -40
  53. package/src/tasks/create/templates/Constellation/Template/DETAILS/mock.ts.mustache +78 -20
  54. package/src/tasks/create/templates/Constellation/Template/DETAILS/styles.ts.mustache +16 -0
  55. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/Avatar.tsx.mustache +78 -0
  56. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/DetailsRender.tsx.mustache +55 -0
  57. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/HighlightRender.tsx.mustache +49 -0
  58. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/Operator.tsx.mustache +218 -0
  59. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/StatusWork.tsx.mustache +17 -19
  60. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/demo.stories.tsx.mustache +96 -27
  61. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/index.tsx.mustache +42 -39
  62. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/mock.ts.mustache +68 -10
  63. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/styles.ts.mustache +15 -0
  64. package/src/tasks/create/templates/Constellation/Template/FORM/DetailsRender.tsx +59 -0
  65. package/src/tasks/create/templates/Constellation/Template/FORM/demo.stories.tsx.mustache +5 -3
  66. package/src/tasks/create/templates/Constellation/Template/FORM/index.tsx.mustache +31 -5
  67. package/src/tasks/create/templates/Constellation/Template/FORM-region/DetailsRender.tsx +59 -0
  68. package/src/tasks/create/templates/Constellation/Template/FORM-region/demo.stories.tsx.mustache +4 -2
  69. package/src/tasks/create/templates/Constellation/Template/FORM-region/index.tsx.mustache +29 -7
  70. package/src/tasks/create/templates/Constellation/Template/PAGE/GetNextWork.tsx.mustache +2 -1
  71. package/src/tasks/create/templates/Constellation/Template/PAGE/demo.stories.tsx.mustache +4 -3
  72. package/src/tasks/create/templates/Constellation/Template/PAGE/localizations.json.mustache +4 -2
  73. package/src/tasks/create/templates/Constellation/Widget/CASE/demo.stories.tsx.mustache +3 -2
  74. package/src/tasks/create/templates/Constellation/Widget/PAGE/demo.stories.tsx.mustache +91 -13
  75. package/src/tasks/create/templates/Constellation/Widget/PAGE/index.tsx.mustache +67 -5
  76. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/demo.stories.tsx.mustache +5 -4
  77. package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/PConnProps.d.ts.mustache +46 -0
  78. package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/config.json.mustache +32 -0
  79. package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/demo.stories.tsx.mustache +103 -0
  80. package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/index.tsx.mustache +216 -0
  81. package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/mock.ts.mustache +5 -0
  82. package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/styles.ts.mustache +8 -0
  83. package/src/tasks/create/templates/Launchpad/Widget/PAGE/OneColumnPage.svg +36 -0
  84. package/src/tasks/create/templates/Launchpad/Widget/PAGE/PConnProps.d.ts.mustache +46 -0
  85. package/src/tasks/create/templates/Launchpad/Widget/PAGE/config.json.mustache +59 -0
  86. package/src/tasks/create/templates/Launchpad/Widget/PAGE/demo.stories.tsx.mustache +120 -0
  87. package/src/tasks/create/templates/Launchpad/Widget/PAGE/index.tsx.mustache +109 -0
  88. package/src/tasks/create/templates/Launchpad/Widget/PAGE/mock.ts.mustache +25 -0
  89. package/src/tasks/create/templates/Launchpad/Widget/PAGE/styles.ts.mustache +8 -0
  90. package/src/tasks/create-all/index.js +3 -0
  91. package/src/tasks/init/template/.storybook/preview.js +3 -0
  92. package/src/tasks/init/template/package.json.mustache +6 -6
  93. package/src/tasks/init/template/tsconfig.build.json +3 -1
  94. package/src/tasks/promote-webpack/webpack.config.js +26 -0
  95. package/src/tasks/revert-webpack/index.js +1 -5
  96. package/src/tasks/validator/index.js +7 -1
  97. package/src/util.js +72 -33
  98. package/tests/assets/components/create/Pega_DXIL_MyDetails.zip +0 -0
  99. package/tests/assets/components/create/Pega_DXIL_MyTestText/demo.stories.tsx +0 -3
  100. package/tests/assets/components/create/Pega_DXIL_MyTestText/index.tsx +94 -4
  101. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/demo.stories.tsx +3 -13
  102. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/index.tsx +8 -5
  103. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/demo.stories.tsx +3 -2
  104. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/demo.stories.tsx +2 -9
  105. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/mock.ts +2 -0
  106. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/demo.stories.tsx +8 -19
  107. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/demo.stories.tsx +7 -18
  108. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/mock.ts +1 -0
  109. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/demo.stories.tsx +1 -7
  110. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/mock.ts +1 -0
  111. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/Avatar.tsx +78 -0
  112. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/DetailsRender.tsx +52 -0
  113. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/HighlightRender.tsx +46 -0
  114. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/Operator.tsx +215 -0
  115. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/StatusWork.tsx +17 -19
  116. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/demo.stories.tsx +79 -25
  117. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/index.tsx +48 -37
  118. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/mock.ts +78 -20
  119. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/styles.ts +16 -0
  120. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails.zip +0 -0
  121. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/demo.stories.tsx +1 -5
  122. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/DetailsRender.tsx +59 -0
  123. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/demo.stories.tsx +5 -3
  124. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/index.tsx +28 -5
  125. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/PConnProps.d.ts +46 -0
  126. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/config.json +64 -0
  127. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/demo.stories.tsx +104 -0
  128. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/index.tsx +215 -0
  129. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/mock.ts +5 -0
  130. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/styles.ts +8 -0
  131. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/demo.stories.tsx +2 -6
  132. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/GetNextWork.tsx +2 -1
  133. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/demo.stories.tsx +4 -3
  134. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/localizations.json +4 -2
  135. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +5 -4
  136. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/demo.stories.tsx +91 -13
  137. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/index.tsx +67 -5
  138. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/demo.stories.tsx +1 -5
  139. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/mock.ts +1 -0
  140. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/demo.stories.tsx +2 -6
  141. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/mock.ts +1 -0
  142. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/demo.stories.tsx +2 -5
  143. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/mock.ts +1 -0
  144. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/demo.stories.tsx +2 -6
  145. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/mock.ts +1 -0
  146. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/demo.stories.tsx +1 -7
  147. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/demo.stories.tsx +2 -8
  148. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/index.tsx +11 -0
  149. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/utils.ts +3 -0
  150. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/demo.stories.tsx +0 -3
  151. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/index.tsx +94 -4
  152. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/StatusWork.tsx +3 -9
  153. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/demo.stories.tsx +1 -5
  154. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/mock.ts +1 -0
  155. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +5 -15
  156. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/Avatar.tsx +78 -0
  157. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/DetailsRender.tsx +52 -0
  158. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/HighlightRender.tsx +46 -0
  159. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/Operator.tsx +215 -0
  160. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/StatusWork.tsx +17 -19
  161. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +96 -27
  162. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/index.tsx +39 -36
  163. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/mock.ts +68 -10
  164. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/styles.ts +15 -0
  165. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/DetailsRender.tsx +59 -0
  166. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/demo.stories.tsx +4 -2
  167. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/index.tsx +23 -4
  168. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/demo.stories.tsx +1 -5
  169. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/mock.ts +1 -0
  170. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/demo.stories.tsx +3 -13
  171. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/index.tsx +8 -5
  172. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/demo.stories.tsx +2 -9
  173. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/mock.ts +2 -0
  174. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/demo.stories.tsx +8 -19
  175. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/demo.stories.tsx +7 -18
  176. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/mock.ts +1 -0
  177. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/demo.stories.tsx +1 -7
  178. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/mock.ts +1 -0
  179. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/Avatar.tsx +78 -0
  180. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/DetailsRender.tsx +52 -0
  181. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/HighlightRender.tsx +46 -0
  182. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/Operator.tsx +215 -0
  183. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/StatusWork.tsx +17 -19
  184. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/demo.stories.tsx +79 -25
  185. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/index.tsx +48 -37
  186. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/mock.ts +78 -20
  187. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/styles.ts +16 -0
  188. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails.zip +0 -0
  189. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/demo.stories.tsx +1 -5
  190. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/DetailsRender.tsx +59 -0
  191. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/demo.stories.tsx +5 -3
  192. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/index.tsx +28 -5
  193. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/PConnProps.d.ts +46 -0
  194. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/config.json +32 -0
  195. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/demo.stories.tsx +103 -0
  196. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/index.tsx +213 -0
  197. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/mock.ts +5 -0
  198. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/styles.ts +8 -0
  199. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/demo.stories.tsx +2 -6
  200. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/GetNextWork.tsx +2 -1
  201. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/demo.stories.tsx +4 -3
  202. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/localizations.json +4 -2
  203. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/demo.stories.tsx +88 -9
  204. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/index.tsx +67 -5
  205. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/demo.stories.tsx +1 -5
  206. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/mock.ts +1 -0
  207. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/demo.stories.tsx +2 -6
  208. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/mock.ts +1 -0
  209. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/demo.stories.tsx +2 -5
  210. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/mock.ts +1 -0
  211. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/demo.stories.tsx +2 -6
  212. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/mock.ts +1 -0
  213. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/demo.stories.tsx +1 -7
  214. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/demo.stories.tsx +2 -8
  215. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/index.tsx +11 -0
  216. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/utils.ts +3 -0
  217. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/demo.stories.tsx +0 -3
  218. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/index.tsx +94 -4
  219. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/StatusWork.tsx +3 -9
  220. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/demo.stories.tsx +1 -5
  221. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/mock.ts +1 -0
  222. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +5 -15
  223. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/Avatar.tsx +78 -0
  224. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/DetailsRender.tsx +52 -0
  225. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/HighlightRender.tsx +46 -0
  226. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/Operator.tsx +215 -0
  227. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/StatusWork.tsx +17 -19
  228. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +96 -27
  229. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/index.tsx +39 -36
  230. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/mock.ts +68 -10
  231. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/styles.ts +15 -0
  232. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/DetailsRender.tsx +59 -0
  233. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/demo.stories.tsx +4 -2
  234. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/index.tsx +23 -4
  235. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/demo.stories.tsx +1 -5
  236. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/mock.ts +1 -0
@@ -16,6 +16,7 @@ export const pyReviewRaw = {
16
16
  config: {
17
17
  value: '@P .pyStatusWork',
18
18
  label: '@L Work Status',
19
+ hideLabel: true,
19
20
  displayMode: 'STACKED_LARGE_VAL',
20
21
  displayAsStatus: true,
21
22
  key: 'pyStatusWork'
@@ -26,6 +27,7 @@ export const pyReviewRaw = {
26
27
  config: {
27
28
  value: '@P .pyID',
28
29
  label: '@L Case ID',
30
+ hideLabel: true,
29
31
  displayMode: 'STACKED_LARGE_VAL',
30
32
  key: 'pyID'
31
33
  }
@@ -35,6 +37,7 @@ export const pyReviewRaw = {
35
37
  config: {
36
38
  value: '@P .pxCreateDateTime',
37
39
  label: '@L Create date/time',
40
+ hideLabel: true,
38
41
  displayMode: 'STACKED_LARGE_VAL',
39
42
  key: 'pxCreateDateTime'
40
43
  }
@@ -43,6 +46,7 @@ export const pyReviewRaw = {
43
46
  type: 'UserReference',
44
47
  config: {
45
48
  label: '@L Create Operator',
49
+ hideLabel: true,
46
50
  value: '@USER .pxCreateOperator',
47
51
  placeholder: 'Select...',
48
52
  displayMode: 'STACKED_LARGE_VAL',
@@ -160,7 +164,6 @@ export const pyReviewResolved = {
160
164
  config: {
161
165
  value: 'New',
162
166
  label: 'Work Status',
163
- displayMode: 'STACKED_LARGE_VAL',
164
167
  displayAsStatus: true
165
168
  }
166
169
  },
@@ -168,16 +171,14 @@ export const pyReviewResolved = {
168
171
  type: 'TextInput',
169
172
  config: {
170
173
  value: 'M-1002',
171
- label: 'Case ID',
172
- displayMode: 'STACKED_LARGE_VAL'
174
+ label: 'Case ID'
173
175
  }
174
176
  },
175
177
  {
176
178
  type: 'DateTime',
177
179
  config: {
178
180
  value: '2022-12-11T20:06:27.232Z',
179
- label: 'Create date/time',
180
- displayMode: 'STACKED_LARGE_VAL'
181
+ label: 'Create date/time'
181
182
  }
182
183
  },
183
184
  {
@@ -188,8 +189,7 @@ export const pyReviewResolved = {
188
189
  userId: 'conns',
189
190
  userName: 'Sara Connor'
190
191
  },
191
- placeholder: 'Select...',
192
- displayMode: 'STACKED_LARGE_VAL'
192
+ placeholder: 'Select...'
193
193
  }
194
194
  }
195
195
  ],
@@ -199,22 +199,25 @@ export const pyReviewResolved = {
199
199
  export const regionChildrenResolved = [
200
200
  {
201
201
  readOnly: true,
202
- value: '',
202
+ value: 'Deadline',
203
203
  label: 'SLA Deadline',
204
+ hideLabel: true,
204
205
  displayMode: 'LABELS_LEFT',
205
206
  key: 'SLA Deadline'
206
207
  },
207
208
  {
208
209
  readOnly: true,
209
- value: '',
210
+ value: 'Goal',
210
211
  label: 'SLA Goal',
212
+ hideLabel: true,
211
213
  displayMode: 'LABELS_LEFT',
212
214
  key: 'SLA Goal'
213
215
  },
214
216
  {
215
217
  readOnly: true,
216
- value: '',
218
+ value: 'Start Time',
217
219
  label: 'SLA Start Time',
220
+ hideLabel: true,
218
221
  listType: 'associated',
219
222
  datasource: [
220
223
  {
@@ -230,3 +233,58 @@ export const regionChildrenResolved = [
230
233
  key: 'SLA Start Time'
231
234
  }
232
235
  ];
236
+
237
+ export const operatorDetails = {
238
+ data: {
239
+ pzLoadTime: 'January 18, 2023 10:33:19 AM EST',
240
+ pzPageNameHash: '_pa1519192551088960pz',
241
+ pyOperatorInfo: {
242
+ pyUserName: 'french DigV2',
243
+ pyPosition: '',
244
+ pyImageInsKey: '',
245
+ pySkills: [
246
+ {
247
+ pySkillName: '',
248
+ pzIndexOwnerKey: 'DATA-ADMIN-OPERATOR-ID FRENCHTEST.DIGV2',
249
+ pySkillRating: 0
250
+ }
251
+ ],
252
+ pyReportToUserName: '',
253
+ pyReportTo: '',
254
+ pyOrganization: 'DXIL',
255
+ pyTitle: '',
256
+ pyLabel: 'frenchTest.DigV2',
257
+ pyEmailAddress: 'User@DigV2',
258
+ pyTelephone: ''
259
+ }
260
+ },
261
+ status: 200,
262
+ statusText: '',
263
+ headers: {
264
+ 'content-length': '435',
265
+ 'content-type': 'application/json;charset=UTF-8'
266
+ },
267
+ request: {}
268
+ };
269
+
270
+ export const configProps = {
271
+ label: 'Create operator',
272
+ createLabel: 'Created',
273
+ updateLabel: 'Updated',
274
+ updateDateTime: '2023-01-16T14:53:33.280Z',
275
+ createDateTime: '2023-01-16T14:53:33.198Z',
276
+ updateOperator: {
277
+ userId: 'admin@mediaco',
278
+ userName: 'admin'
279
+ },
280
+ createOperator: {
281
+ userId: 'admin@mediaco',
282
+ userName: 'admin'
283
+ },
284
+ resolveLabel: '',
285
+ resolveOperator: '',
286
+ resolveDateTime: '',
287
+ hideLabel: true,
288
+ key: '_532zx1dah',
289
+ displayMode: 'LABELS_LEFT'
290
+ };
@@ -6,3 +6,18 @@ export default styled.div(() => {
6
6
  margin: 0px 0;
7
7
  `;
8
8
  });
9
+
10
+ export const StyledDetailsGridContainer = styled.div(() => {
11
+ return css`
12
+ margin-line-start: 1;
13
+ `;
14
+ });
15
+
16
+ export const StyledHighlightedFieldsHrLine = styled.hr(() => {
17
+ return css`
18
+ line: {
19
+ margin: '0.75rem 0';
20
+ opacity: '50%'
21
+ }
22
+ `;
23
+ });
@@ -0,0 +1,59 @@
1
+ import { Fragment, ReactElement } from 'react';
2
+ import { FieldValueList } from '@pega/cosmos-react-core';
3
+
4
+ interface DetailsRenderProps {
5
+ children?: never;
6
+ child: NonNullable<ReactElement>;
7
+ }
8
+
9
+ const DetailsRender = (props: DetailsRenderProps) => {
10
+ const { child } = props;
11
+
12
+ const kids = child.props.getPConnect().getChildren();
13
+
14
+ const displayCompArr: ReactElement[] = [];
15
+
16
+ Object.values(kids).forEach((value: any) => {
17
+ const { type } = value.getPConnect().getRawMetadata();
18
+ const { hideLabel, variant, testId, label } = value
19
+ .getPConnect()
20
+ .resolveConfigProps(value.getPConnect().getConfigProps());
21
+
22
+ let displayComp;
23
+ const key = JSON.stringify(value.getPConnect());
24
+
25
+ if (type === 'reference') {
26
+ const refElement = value.getPConnect().getComponent();
27
+
28
+ displayCompArr.push(refElement);
29
+ } else {
30
+ const element = value.getPConnect().getComponent();
31
+ const displayEl = <Fragment key={key}>{element}</Fragment>;
32
+
33
+ const fvlStyle = {
34
+ myColGap: {
35
+ columnGap: '0',
36
+ marginLineStart: 0
37
+ }
38
+ };
39
+
40
+ // const myEl = <div>boo</div>;
41
+ displayComp = (
42
+ <Fragment key={key}>
43
+ <FieldValueList
44
+ style={fvlStyle.myColGap}
45
+ variant={hideLabel ? 'stacked' : variant}
46
+ data-testid={testId}
47
+ fields={[{ id: '1', name: hideLabel ? '' : label, value: displayEl }]}
48
+ />
49
+ </Fragment>
50
+ );
51
+
52
+ displayCompArr.push(displayComp);
53
+ }
54
+ });
55
+
56
+ return <>{displayCompArr}</>;
57
+ };
58
+
59
+ export default DetailsRender;
@@ -142,8 +142,6 @@ const renderField = resolvedProps => {
142
142
 
143
143
  export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
144
144
  const props = {
145
- NumCols: 1,
146
- template: 'DefaultForm',
147
145
  getPConnect: () => {
148
146
  return {
149
147
  getChildren: () => {
@@ -184,4 +182,8 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
184
182
  );
185
183
  };
186
184
 
187
- Base{{COMPONENT_CLASS_NAME}}.args = {};
185
+ Base{{COMPONENT_CLASS_NAME}}.args = {
186
+ showLabel: true,
187
+ label: 'Form template',
188
+ NumCols: 1,
189
+ };
@@ -1,7 +1,8 @@
1
- import { Grid, FieldGroup, withConfiguration } from '@pega/cosmos-react-core';
1
+ import { Grid, Flex, FieldGroup, withConfiguration } from '@pega/cosmos-react-core';
2
2
 
3
3
 
4
4
  import type { PConnFieldProps } from './PConnProps';
5
+ import DetailsRender from './DetailsRender';
5
6
 
6
7
  import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
7
8
 
@@ -13,19 +14,44 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
13
14
  children: any;
14
15
  }
15
16
 
16
- // Duplicated runtime code from Constellation Design System Component
17
-
18
17
  // props passed in combination of props from property panel (config.json) and run time props from Constellation
19
18
  // any default values in config.pros should be set in defaultProps at bottom of this file
20
19
  function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
21
20
 
22
- const { children = [], NumCols = '1', label, showLabel, getPConnect } = props;
21
+ const { children = [], NumCols = '1', label, showLabel, getPConnect, readOnly, displayMode } = props;
23
22
  const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };
24
23
 
25
24
  const nCols = parseInt(NumCols, 10);
26
25
 
27
- // console.log(`Rendering ${getPConnect()?.getComponentName()} with ${template} with ${children?.length} Region(s)`);
28
26
 
27
+ if (readOnly && readOnly === true && displayMode && displayMode === 'DISPLAY_ONLY') {
28
+ const numRegions = '1';
29
+ const gridRepeat = 'repeat('.concat(numRegions).concat(', 1fr)');
30
+ const gridContainer = { colGap: 0, 'margin-line-start': 0 };
31
+ // @ts-ignore
32
+ gridContainer.cols = gridRepeat;
33
+
34
+ return (
35
+ <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
36
+ {{! pick new delimiters for mustache }}
37
+ {{=<% %>=}}
38
+ <FieldGroup name={propsToUse.showLabel ? propsToUse.label : ''}>
39
+ <Grid container={gridContainer} data-testid={`column-count-${numRegions}`}>
40
+ {children.map((child: any, i: number) => (
41
+ <Flex
42
+ // @ts-ignore
43
+ container={{ direction: 'column', alignItems: 'normal', colGap: 1, rowGap: 1.5 }}
44
+ key={`r-${i + 1}`}
45
+ >
46
+ <DetailsRender child={child} />
47
+ </Flex>
48
+ ))}
49
+ </Grid>
50
+ </FieldGroup>
51
+ <%={{ }}=%> {{! revert delimiters for mustache }}
52
+ </Styled{{COMPONENT_CLASS_NAME}}Wrapper>
53
+ );
54
+ }
29
55
  return (
30
56
  <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
31
57
  {{! pick new delimiters for mustache }}
@@ -0,0 +1,59 @@
1
+ import { Fragment, ReactElement } from 'react';
2
+ import { FieldValueList } from '@pega/cosmos-react-core';
3
+
4
+ interface DetailsRenderProps {
5
+ children?: never;
6
+ child: NonNullable<ReactElement>;
7
+ }
8
+
9
+ const DetailsRender = (props: DetailsRenderProps) => {
10
+ const { child } = props;
11
+
12
+ const kids = child.props.getPConnect().getChildren();
13
+
14
+ const displayCompArr: ReactElement[] = [];
15
+
16
+ Object.values(kids).forEach((value: any) => {
17
+ const { type } = value.getPConnect().getRawMetadata();
18
+ const { hideLabel, variant, testId, label } = value
19
+ .getPConnect()
20
+ .resolveConfigProps(value.getPConnect().getConfigProps());
21
+
22
+ let displayComp;
23
+ const key = JSON.stringify(value.getPConnect());
24
+
25
+ if (type === 'reference') {
26
+ const refElement = value.getPConnect().getComponent();
27
+
28
+ displayCompArr.push(refElement);
29
+ } else {
30
+ const element = value.getPConnect().getComponent();
31
+ const displayEl = <Fragment key={key}>{element}</Fragment>;
32
+
33
+ const fvlStyle = {
34
+ myColGap: {
35
+ columnGap: '0',
36
+ marginLineStart: 0
37
+ }
38
+ };
39
+
40
+ // const myEl = <div>boo</div>;
41
+ displayComp = (
42
+ <Fragment key={key}>
43
+ <FieldValueList
44
+ style={fvlStyle.myColGap}
45
+ variant={hideLabel ? 'stacked' : variant}
46
+ data-testid={testId}
47
+ fields={[{ id: '1', name: hideLabel ? '' : label, value: displayEl }]}
48
+ />
49
+ </Fragment>
50
+ );
51
+
52
+ displayCompArr.push(displayComp);
53
+ }
54
+ });
55
+
56
+ return <>{displayCompArr}</>;
57
+ };
58
+
59
+ export default DetailsRender;
@@ -145,7 +145,6 @@ const renderField = resolvedProps => {
145
145
 
146
146
  export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
147
147
  const props = {
148
- template: 'DefaultForm',
149
148
  getPConnect: () => {
150
149
  return {
151
150
  getChildren: () => {
@@ -190,4 +189,7 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
190
189
  );
191
190
  };
192
191
 
193
- Base{{COMPONENT_CLASS_NAME}}.args = {};
192
+ Base{{COMPONENT_CLASS_NAME}}.args = {
193
+ showLabel: true,
194
+ label: 'Form Region template',
195
+ };
@@ -1,6 +1,7 @@
1
1
  import { Grid, Flex, FieldGroup, withConfiguration } from '@pega/cosmos-react-core';
2
2
 
3
3
  import type { PConnFieldProps } from './PConnProps';
4
+ import DetailsRender from './DetailsRender';
4
5
 
5
6
  import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
6
7
 
@@ -11,19 +12,17 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
11
12
  children: any;
12
13
  }
13
14
 
14
- // Duplicated runtime code from Constellation Design System Component
15
-
16
15
  // props passed in combination of props from property panel (config.json) and run time props from Constellation
17
16
  // any default values in config.pros should be set in defaultProps at bottom of this file
18
17
  function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
19
18
 
20
19
 
21
- const { children = [], label, showLabel, getPConnect } = props;
20
+ const { children = [], label, showLabel, getPConnect, readOnly, displayMode } = props;
22
21
  const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };
23
22
 
24
23
  const numRegions = children?.length;
25
24
  const gridRepeat = "repeat(".concat(numRegions).concat(", 1fr)");
26
- const gridContainer = {"colGap" : 1};
25
+ const gridContainer = {"colGap" : 6};
27
26
  // @ts-ignore
28
27
  gridContainer.cols = gridRepeat;
29
28
  // @ts-ignore
@@ -33,10 +32,33 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
33
32
  // @ts-ignore
34
33
  flexContainer.gap = 2;
35
34
 
35
+ if (readOnly && readOnly === true && displayMode && displayMode === 'DISPLAY_ONLY') {
36
+ return (
37
+ <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
38
+ {{! pick new delimiters for mustache }}
39
+ {{=<% %>=}}
40
+ <FieldGroup name={propsToUse.showLabel ? propsToUse.label : ''}>
41
+ <Grid container={gridContainer} data-testid={`column-count-${numRegions}`}>
42
+ {children.map((child: any, i: number) => (
43
+ <Flex
44
+ // @ts-ignore
45
+ container={{ direction: 'column', alignItems: 'normal', colGap: 1, rowGap: 1.5 }}
46
+ key={`r-${i + 1}`}
47
+ >
48
+ <DetailsRender child={child} />
49
+ </Flex>
50
+ ))}
51
+ </Grid>
52
+ </FieldGroup>
53
+ <%={{ }}=%> {{! revert delimiters for mustache }}
54
+ </Styled{{COMPONENT_CLASS_NAME}}Wrapper>
55
+ );
56
+ }
57
+
36
58
  return (
37
59
  <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
38
- {{! pick new delimiters for mustache }}
39
- {{=<% %>=}}
60
+ {{! pick new delimiters for mustache }}
61
+ {{=<% %>=}}
40
62
  <FieldGroup name={propsToUse.showLabel ? propsToUse.label : ''}>
41
63
  <Grid container={gridContainer}>
42
64
  {children.map((child: any, i: number) => (
@@ -47,7 +69,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
47
69
  ))}
48
70
  </Grid>
49
71
  </FieldGroup>
50
- <%={{ }}=%> {{! revert delimiters for mustache }}
72
+ <%={{ }}=%> {{! revert delimiters for mustache }}
51
73
  </Styled{{COMPONENT_CLASS_NAME}}Wrapper>
52
74
  );
53
75
 
@@ -18,6 +18,7 @@ export default function GetNextWork(props: {{COMPONENT_CLASS_NAME}}WorkProps) {
18
18
  const toasterCtx = useToaster();
19
19
 
20
20
  const localizedVal = PCore.getLocaleUtils().getLocaleValue;
21
+ const localeCategory = 'Case';
21
22
 
22
23
  const getNextWork = () => {
23
24
 
@@ -30,7 +31,7 @@ export default function GetNextWork(props: {{COMPONENT_CLASS_NAME}}WorkProps) {
30
31
  console.log(err);
31
32
  if (err[0].status === 404) {
32
33
  toasterCtx.push({
33
- content: localizedVal('No task currently available')
34
+ content: localizedVal('No task currently available', localeCategory)
34
35
  });
35
36
  }
36
37
  });
@@ -35,9 +35,7 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
35
35
 
36
36
  const props = {
37
37
  useConfigurableLayout: false,
38
- enableGetNextWork: pyHome1Raw.config.enableGetNextWork,
39
38
  icon: pyHome1Raw.config.icon,
40
- title: 'Page Template',
41
39
 
42
40
  getPConnect: () => {
43
41
  return {
@@ -108,4 +106,7 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
108
106
  );
109
107
  };
110
108
 
111
- Base{{COMPONENT_CLASS_NAME}}.args = {};
109
+ Base{{COMPONENT_CLASS_NAME}}.args = {
110
+ title: 'Page Template',
111
+ enableGetNextWork: pyHome1Raw.config.enableGetNextWork,
112
+ };
@@ -1,4 +1,6 @@
1
1
  {
2
- "Get next work" : "Get next work",
3
- "No task currently available" : "No task currently available"
2
+ "fields" : {
3
+ "Get next work" : "Get next work",
4
+ "No task currently available" : "No task currently available"
5
+ }
4
6
  }
@@ -49,7 +49,6 @@ window.PCore.getDataApiUtils = () => {
49
49
  export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
50
50
 
51
51
  const props = {
52
- label: 'Case history',
53
52
 
54
53
  getPConnect: () => {
55
54
  return {
@@ -83,4 +82,6 @@ return (
83
82
  );
84
83
  };
85
84
 
86
- Base{{COMPONENT_CLASS_NAME}}.args = {};
85
+ Base{{COMPONENT_CLASS_NAME}}.args = {
86
+ label: 'Case history',
87
+ };
@@ -17,25 +17,103 @@ const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
17
17
  export default meta;
18
18
  type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
19
19
 
20
+ if (!window.PCore) {
21
+ window.PCore = {};
22
+ }
23
+
24
+ const worklistData = {
25
+ data: {
26
+ data: [
27
+ {
28
+ pxProcessName: 'Loan',
29
+ pxRefObjectInsName: ' A-8002',
30
+ pyAssignmentStatus: 'New',
31
+ pxTaskLabel: 'Details'
32
+ },
33
+ {
34
+ pxProcessName: 'Loan',
35
+ pxRefObjectInsName: ' A-7001',
36
+ pyAssignmentStatus: 'Open',
37
+ pxTaskLabel: 'Info'
38
+ },
39
+ {
40
+ pxProcessName: 'Loan',
41
+ pxRefObjectInsName: ' A-9000',
42
+ pyAssignmentStatus: 'Open',
43
+ pxTaskLabel: 'Amount'
44
+ }
45
+ ]
46
+ }
47
+ };
48
+
49
+ window.PCore.getDataApiUtils = () => {
50
+ return {
51
+ getData: () => {
52
+ return new Promise(resolve => {
53
+ resolve(worklistData);
54
+ });
55
+ },
56
+ getDataAsync: () => {
57
+ return new Promise(resolve => {
58
+ resolve(worklistData);
59
+ });
60
+ }
61
+ };
62
+ };
63
+
64
+
65
+
20
66
  export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
21
67
 
22
68
  const props = {
23
- label: configProps.label,
24
- header: configProps.header,
25
- description: configProps.description,
26
- image: configProps.image,
27
- datasource: configProps.datasource,
28
- whatsnewlink: configProps.whatsnewlink
29
- };
69
+ ...configProps,
70
+ getPConnect: () => {
71
+ return {
72
+ getValue: value => {
73
+ return value;
74
+ },
75
+ getContextName: () => {
76
+ return 'app/primary_1';
77
+ },
78
+ getLocalizedValue: value => {
79
+ return value;
80
+ },
81
+ getActionsApi: () => {
82
+ return {
83
+ updateFieldValue: () => {
84
+ /* nothing */
85
+ },
86
+ triggerFieldChange: () => {
87
+ /* nothing */
88
+ }
89
+ };
90
+ },
91
+ ignoreSuggestion: () => {
92
+ /* nothing */
93
+ },
94
+ acceptSuggestion: () => {
95
+ /* nothing */
96
+ },
97
+ setInheritedProps: () => {
98
+ /* nothing */
99
+ },
100
+ resolveConfigProps: () => {
101
+ /* nothing */
102
+ }
103
+ };
104
+ }
105
+ };
30
106
 
31
- return (
32
- <>
33
- <{{COMPONENT_CLASS_NAME}} {...props} {...args} />
34
- </>
35
- );
107
+ return (
108
+ <>
109
+ <{{COMPONENT_CLASS_NAME}} {...props} {...args} />
110
+ </>
111
+ );
36
112
  };
37
113
 
38
114
  Base{{COMPONENT_CLASS_NAME}}.args = {
39
115
  header: configProps.header,
40
- description: configProps.description
116
+ description: configProps.description,
117
+ whatsnewlink: configProps.whatsnewlink,
118
+ datasource: configProps.datasource,
41
119
  };