@pega/dx-component-builder-sdk 23.1.15 → 24.1.10

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 (311) hide show
  1. package/README.md +3 -3
  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 +6 -0
  7. package/src/tasks/bundle/builderAngular/webpack.config.js +14 -1
  8. package/src/tasks/bundle/builderAssociated/webpack.config.js +13 -0
  9. package/src/tasks/bundle/builderReact/webpack.config.js +14 -1
  10. package/src/tasks/create/templates/Constellation/field/Boolean/index.tsx.mustache +3 -2
  11. package/src/tasks/create/templates/Constellation/field/Icon-Button-URL/PConnProps.d.ts.mustache +46 -0
  12. package/src/tasks/create/templates/Constellation/field/Icon-Button-URL/config.json.mustache +64 -0
  13. package/src/tasks/create/templates/Constellation/field/Icon-Button-URL/demo.stories.tsx.mustache +99 -0
  14. package/src/tasks/create/templates/Constellation/field/Icon-Button-URL/index.tsx.mustache +204 -0
  15. package/src/tasks/create/templates/Constellation/field/Icon-Button-URL/mock.ts.mustache +5 -0
  16. package/src/tasks/create/templates/Constellation/field/Icon-Button-URL/styles.ts.mustache +8 -0
  17. package/src/tasks/create/templates/Constellation/field/Picklist/index.tsx.mustache +0 -1
  18. package/src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/date.ts.mustache +15 -37
  19. package/src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/index.tsx.mustache +11 -0
  20. package/src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/utils.ts.mustache +3 -0
  21. package/src/tasks/create/templates/Constellation/field/Text/index.tsx.mustache +94 -4
  22. package/src/tasks/create/templates/Constellation/template/DETAILS/Avatar.tsx.mustache +78 -0
  23. package/src/tasks/create/templates/Constellation/template/DETAILS/DetailsRender.tsx.mustache +55 -0
  24. package/src/tasks/create/templates/Constellation/template/DETAILS/HighlightRender.tsx.mustache +49 -0
  25. package/src/tasks/create/templates/Constellation/template/DETAILS/Operator.tsx.mustache +218 -0
  26. package/src/tasks/create/templates/Constellation/template/DETAILS/demo.stories.tsx.mustache +77 -23
  27. package/src/tasks/create/templates/Constellation/template/DETAILS/index.tsx.mustache +51 -40
  28. package/src/tasks/create/templates/Constellation/template/DETAILS/mock.ts.mustache +78 -20
  29. package/src/tasks/create/templates/Constellation/template/DETAILS/styles.ts.mustache +16 -0
  30. package/src/tasks/create/templates/Constellation/template/DETAILS-region/Avatar.tsx.mustache +78 -0
  31. package/src/tasks/create/templates/Constellation/template/DETAILS-region/DetailsRender.tsx.mustache +55 -0
  32. package/src/tasks/create/templates/Constellation/template/DETAILS-region/HighlightRender.tsx.mustache +49 -0
  33. package/src/tasks/create/templates/Constellation/template/DETAILS-region/Operator.tsx.mustache +218 -0
  34. package/src/tasks/create/templates/Constellation/template/DETAILS-region/demo.stories.tsx.mustache +95 -26
  35. package/src/tasks/create/templates/Constellation/template/DETAILS-region/index.tsx.mustache +42 -39
  36. package/src/tasks/create/templates/Constellation/template/DETAILS-region/mock.ts.mustache +68 -10
  37. package/src/tasks/create/templates/Constellation/template/DETAILS-region/styles.ts.mustache +15 -0
  38. package/src/tasks/create/templates/Constellation/template/FORM/DetailsRender.tsx +59 -0
  39. package/src/tasks/create/templates/Constellation/template/FORM/demo.stories.tsx.mustache +73 -8
  40. package/src/tasks/create/templates/Constellation/template/FORM/index.tsx.mustache +33 -5
  41. package/src/tasks/create/templates/Constellation/template/FORM-region/DetailsRender.tsx +59 -0
  42. package/src/tasks/create/templates/Constellation/template/FORM-region/demo.stories.tsx.mustache +95 -15
  43. package/src/tasks/create/templates/Constellation/template/FORM-region/index.tsx.mustache +29 -7
  44. package/src/tasks/create/templates/Constellation/template/PAGE/GetNextWork.tsx.mustache +2 -1
  45. package/src/tasks/create/templates/Constellation/template/PAGE/localizations.json.mustache +4 -2
  46. package/src/tasks/create/templates/Constellation/widget/PAGE/demo.stories.tsx.mustache +87 -6
  47. package/src/tasks/create/templates/Constellation/widget/PAGE/index.tsx.mustache +67 -5
  48. package/src/tasks/create/templates/SDK-Angular/field/Boolean/boolean.component.html.mustache +19 -18
  49. package/src/tasks/create/templates/SDK-Angular/field/Boolean/boolean.component.ts.mustache +127 -44
  50. package/src/tasks/create/templates/SDK-Angular/field/Icon-Button-URL/config.json.mustache +64 -0
  51. package/src/tasks/create/templates/SDK-Angular/field/Icon-Button-URL/demo.stories.tsx.mustache +63 -0
  52. package/src/tasks/create/templates/SDK-Angular/field/Icon-Button-URL/icon-button-url.component.html.mustache +40 -0
  53. package/src/tasks/create/templates/SDK-Angular/field/Icon-Button-URL/icon-button-url.component.scss.mustache +24 -0
  54. package/src/tasks/create/templates/SDK-Angular/field/Icon-Button-URL/icon-button-url.component.spec.ts.mustache +26 -0
  55. package/src/tasks/create/templates/SDK-Angular/field/Icon-Button-URL/icon-button-url.component.ts.mustache +195 -0
  56. package/src/tasks/create/templates/SDK-Angular/field/Icon-Button-URL/mock.ts.mustache +37 -0
  57. package/src/tasks/create/templates/SDK-Angular/field/Text-URL/text-url.component.html.mustache +1 -0
  58. package/src/tasks/create/templates/SDK-Angular/field/Text-URL/text-url.component.ts.mustache +2 -0
  59. package/src/tasks/create/templates/SDK-Angular/field/TimeOfDay/time-of-day.component.html.mustache +1 -0
  60. package/src/tasks/create/templates/SDK-Angular/field/TimeOfDay/time-of-day.component.ts.mustache +2 -0
  61. package/src/tasks/create/templates/SDK-Angular/template/FORM-region/form.component.scss.mustache +1 -1
  62. package/src/tasks/create/templates/SDK-Angular/widget/CASE/case.component.ts.mustache +2 -2
  63. package/src/tasks/create/templates/SDK-Angular/widget/PAGE/demo.stories.tsx.mustache +22 -5
  64. package/src/tasks/create/templates/SDK-Angular/widget/PAGE/mock.ts.mustache +25 -0
  65. package/src/tasks/create/templates/SDK-Angular/widget/PAGE/page.component.html.mustache +11 -1
  66. package/src/tasks/create/templates/SDK-Angular/widget/PAGE/page.component.ts.mustache +93 -1
  67. package/src/tasks/create/templates/SDK-React/field/Boolean/demo.stories.tsx.mustache +1 -1
  68. package/src/tasks/create/templates/SDK-React/field/Boolean/mock.ts.mustache +8 -8
  69. package/src/tasks/create/templates/SDK-React/field/Date/index.tsx.mustache +2 -2
  70. package/src/tasks/create/templates/SDK-React/field/Date/mock.ts.mustache +7 -7
  71. package/src/tasks/create/templates/SDK-React/field/DateTime/demo.stories.tsx.mustache +1 -1
  72. package/src/tasks/create/templates/SDK-React/field/DateTime/index.tsx.mustache +2 -3
  73. package/src/tasks/create/templates/SDK-React/field/DateTime/mock.ts.mustache +6 -6
  74. package/src/tasks/create/templates/SDK-React/field/Decimal/index.tsx.mustache +51 -35
  75. package/src/tasks/create/templates/SDK-React/field/Decimal/mock.ts.mustache +1 -1
  76. package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/config.json.mustache +1 -1
  77. package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/demo.stories.tsx.mustache +1 -1
  78. package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/index.tsx.mustache +47 -37
  79. package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/mock.ts.mustache +1 -1
  80. package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/config.json.mustache +1 -1
  81. package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/index.tsx.mustache +36 -21
  82. package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/mock.ts.mustache +1 -1
  83. package/src/tasks/create/templates/SDK-React/field/Icon-Button-URL/config.json.mustache +64 -0
  84. package/src/tasks/create/templates/SDK-React/field/Icon-Button-URL/demo.stories.tsx.mustache +91 -0
  85. package/src/tasks/create/templates/SDK-React/field/Icon-Button-URL/index.tsx.mustache +160 -0
  86. package/src/tasks/create/templates/SDK-React/field/Icon-Button-URL/mock.ts.mustache +4 -0
  87. package/src/tasks/create/templates/SDK-React/field/Icon-Button-URL/styles.js.mustache +7 -0
  88. package/src/tasks/create/templates/SDK-React/field/Integer/config.json.mustache +1 -1
  89. package/src/tasks/create/templates/SDK-React/field/Integer/index.tsx.mustache +19 -20
  90. package/src/tasks/create/templates/SDK-React/field/Integer/mock.ts.mustache +1 -1
  91. package/src/tasks/create/templates/SDK-React/field/Picklist/index.tsx.mustache +26 -26
  92. package/src/tasks/create/templates/SDK-React/field/Picklist-RadioButtons/mock.ts.mustache +0 -1
  93. package/src/tasks/create/templates/SDK-React/field/Text/config.json.mustache +1 -1
  94. package/src/tasks/create/templates/SDK-React/field/Text/index.tsx.mustache +0 -1
  95. package/src/tasks/create/templates/SDK-React/field/Text/mock.ts.mustache +1 -1
  96. package/src/tasks/create/templates/SDK-React/field/Text-Email/config.json.mustache +1 -1
  97. package/src/tasks/create/templates/SDK-React/field/Text-Email/mock.ts.mustache +1 -1
  98. package/src/tasks/create/templates/SDK-React/field/Text-Input/config.json.mustache +1 -1
  99. package/src/tasks/create/templates/SDK-React/field/Text-Input/index.tsx.mustache +0 -1
  100. package/src/tasks/create/templates/SDK-React/field/Text-Input/mock.ts.mustache +1 -1
  101. package/src/tasks/create/templates/SDK-React/field/Text-Paragraph/index.tsx.mustache +1 -3
  102. package/src/tasks/create/templates/SDK-React/field/Text-Paragraph/mock.ts.mustache +1 -1
  103. package/src/tasks/create/templates/SDK-React/field/Text-Phone/index.tsx.mustache +17 -9
  104. package/src/tasks/create/templates/SDK-React/field/Text-URL/index.tsx.mustache +1 -2
  105. package/src/tasks/create/templates/SDK-React/field/Text-URL/mock.ts.mustache +1 -1
  106. package/src/tasks/create/templates/SDK-React/field/TimeOfDay/demo.stories.tsx.mustache +4 -4
  107. package/src/tasks/create/templates/SDK-React/field/TimeOfDay/index.tsx.mustache +0 -2
  108. package/src/tasks/create/templates/SDK-React/field/TimeOfDay/mock.ts.mustache +6 -6
  109. package/src/tasks/create/templates/SDK-React/template/DETAILS/demo.stories.tsx.mustache +1 -7
  110. package/src/tasks/create/templates/SDK-React/template/DETAILS/index.tsx.mustache +4 -9
  111. package/src/tasks/create/templates/SDK-React/template/DETAILS/mock.ts.mustache +197 -164
  112. package/src/tasks/create/templates/SDK-React/template/DETAILS-region/demo.stories.tsx.mustache +1 -6
  113. package/src/tasks/create/templates/SDK-React/template/DETAILS-region/index.tsx.mustache +4 -9
  114. package/src/tasks/create/templates/SDK-React/template/DETAILS-region/mock.ts.mustache +207 -163
  115. package/src/tasks/create/templates/SDK-React/template/FORM/config.json.mustache +1 -1
  116. package/src/tasks/create/templates/SDK-React/template/FORM/demo.stories.tsx.mustache +13 -1
  117. package/src/tasks/create/templates/SDK-React/template/FORM/index.tsx.mustache +14 -16
  118. package/src/tasks/create/templates/SDK-React/template/FORM/utils.ts.mustache +1 -1
  119. package/src/tasks/create/templates/SDK-React/template/FORM-region/demo.stories.tsx.mustache +0 -2
  120. package/src/tasks/create/templates/SDK-React/template/FORM-region/mock.ts.mustache +121 -122
  121. package/src/tasks/create/templates/SDK-React/template/PAGE/OneColumn.tsx.mustache +12 -13
  122. package/src/tasks/create/templates/SDK-React/template/PAGE/demo.stories.tsx.mustache +1 -1
  123. package/src/tasks/create/templates/SDK-React/template/PAGE/index.tsx.mustache +3 -5
  124. package/src/tasks/create/templates/SDK-React/template/PAGE/mock.ts.mustache +8 -9
  125. package/src/tasks/create/templates/SDK-React/widget/CASE/config.json.mustache +2 -2
  126. package/src/tasks/create/templates/SDK-React/widget/CASE/demo.stories.tsx.mustache +19 -20
  127. package/src/tasks/create/templates/SDK-React/widget/CASE/index.tsx.mustache +3 -3
  128. package/src/tasks/create/templates/SDK-React/widget/PAGE/config.json.mustache +43 -43
  129. package/src/tasks/create/templates/SDK-React/widget/PAGE/demo.stories.tsx.mustache +45 -2
  130. package/src/tasks/create/templates/SDK-React/widget/PAGE/index.tsx.mustache +168 -3
  131. package/src/tasks/create/templates/SDK-React/widget/PAGE/mock.ts.mustache +26 -1
  132. package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/demo.stories.tsx.mustache +20 -21
  133. package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/index.tsx.mustache +0 -1
  134. package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/mock.ts.mustache +0 -1
  135. package/src/tasks/create-all/index.js +3 -0
  136. package/src/tasks/publish/helper.js +4 -0
  137. package/src/tasks/publish-all/helper.js +6 -2
  138. package/src/tasks/validator/index.js +7 -1
  139. package/tests/assets/sdk-r/components/create/custom-constellation/field/Pega_DXIL_MyTestText/index.tsx +94 -4
  140. package/tests/assets/sdk-r/components/create/custom-sdk/field/Pega_DXIL_MyTestText/config.json +1 -1
  141. package/tests/assets/sdk-r/components/create/custom-sdk/field/Pega_DXIL_MyTestText/index.tsx +0 -1
  142. package/tests/assets/sdk-r/components/create/custom-sdk/field/Pega_DXIL_MyTestText/mock.ts +1 -1
  143. package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +2 -2
  144. package/tests/assets/sdk-r/components/create/override-sdk/field/CancelAlert/CancelAlert.tsx +2 -0
  145. package/tests/assets/sdk-r/components/create/override-sdk/field/Currency/Currency.tsx +36 -26
  146. package/tests/assets/sdk-r/components/create/override-sdk/field/Decimal/Decimal.tsx +33 -19
  147. package/tests/assets/sdk-r/components/create/override-sdk/field/Multiselect/Multiselect.tsx +1 -1
  148. package/tests/assets/sdk-r/components/create/override-sdk/field/Percentage/Percentage.tsx +33 -18
  149. package/tests/assets/sdk-r/components/create/override-sdk/field/Phone/Phone.tsx +16 -7
  150. package/tests/assets/sdk-r/components/create/override-sdk/field/ScalarList/ScalarList.tsx +2 -0
  151. package/tests/assets/sdk-r/components/create/override-sdk/field/UserReference/UserReference.tsx +11 -1
  152. package/tests/assets/sdk-r/components/create/override-sdk/infra/Assignment/Assignment.tsx +28 -1
  153. package/tests/assets/sdk-r/components/create/override-sdk/infra/DashboardFilter/DashboardFilter.tsx +1 -1
  154. package/tests/assets/sdk-r/components/create/override-sdk/infra/DeferLoad/DeferLoad.tsx +5 -1
  155. package/tests/assets/sdk-r/components/create/override-sdk/infra/MultiStep/MultiStep.tsx +3 -1
  156. package/tests/assets/sdk-r/components/create/override-sdk/infra/NavBar/NavBar.tsx +2 -2
  157. package/tests/assets/sdk-r/components/create/override-sdk/template/CaseView/CaseView.tsx +2 -1
  158. package/tests/assets/sdk-r/components/create/override-sdk/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +1 -1
  159. package/tests/assets/sdk-r/components/create/override-sdk/template/DataReference/DataReference.tsx +1 -1
  160. package/tests/assets/sdk-r/components/create/override-sdk/template/DefaultForm/utils/index.ts +2 -7
  161. package/tests/assets/sdk-r/components/create/override-sdk/template/Details/Details.tsx +1 -1
  162. package/tests/assets/sdk-r/components/create/override-sdk/template/DetailsThreeColumn/DetailsThreeColumn.tsx +1 -1
  163. package/tests/assets/sdk-r/components/create/override-sdk/template/DetailsTwoColumn/DetailsTwoColumn.tsx +1 -1
  164. package/tests/assets/sdk-r/components/create/override-sdk/template/FieldGroupTemplate/FieldGroupTemplate.tsx +2 -0
  165. package/tests/assets/sdk-r/components/create/override-sdk/template/ListView/ListView.tsx +20 -31
  166. package/tests/assets/sdk-r/components/create/override-sdk/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +1 -1
  167. package/tests/assets/sdk-r/components/create/override-sdk/template/NarrowWideDetails/NarrowWideDetails.tsx +1 -1
  168. package/tests/assets/sdk-r/components/create/override-sdk/template/PromotedFilters/PromotedFilters.tsx +1 -0
  169. package/tests/assets/sdk-r/components/create/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +4 -0
  170. package/tests/assets/sdk-r/components/create/override-sdk/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +1 -1
  171. package/tests/assets/sdk-r/components/create/override-sdk/template/WideNarrowDetails/WideNarrowDetails.tsx +1 -1
  172. package/tests/assets/sdk-r/components/create/override-sdk/widget/Attachment/Attachment.tsx +3 -2
  173. package/tests/assets/sdk-r/components/create/override-sdk/widget/FileUtility/FileUtility.tsx +1 -1
  174. package/tests/assets/sdk-r/components/create/override-sdk/widget/QuickCreate/QuickCreate.tsx +1 -0
  175. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyBoolean/index.tsx +3 -2
  176. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyIconButtonURL/PConnProps.d.ts +46 -0
  177. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyIconButtonURL/demo.stories.tsx +99 -0
  178. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyIconButtonURL/index.tsx +201 -0
  179. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyIconButtonURL/mock.ts +5 -0
  180. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyIconButtonURL/styles.ts +8 -0
  181. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPicklist/index.tsx +0 -1
  182. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/date.ts +15 -37
  183. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/index.tsx +11 -0
  184. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/utils.ts +3 -0
  185. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyText/index.tsx +94 -4
  186. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/Avatar.tsx +78 -0
  187. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/DetailsRender.tsx +52 -0
  188. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/HighlightRender.tsx +46 -0
  189. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/Operator.tsx +215 -0
  190. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/demo.stories.tsx +77 -23
  191. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/index.tsx +48 -37
  192. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/mock.ts +78 -20
  193. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/styles.ts +16 -0
  194. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyForm/DetailsRender.tsx +59 -0
  195. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyForm/demo.stories.tsx +73 -8
  196. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyForm/index.tsx +30 -5
  197. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyPage/GetNextWork.tsx +2 -1
  198. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyPage/localizations.json +4 -2
  199. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/Avatar.tsx +78 -0
  200. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/DetailsRender.tsx +52 -0
  201. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/HighlightRender.tsx +46 -0
  202. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/Operator.tsx +215 -0
  203. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +95 -26
  204. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/index.tsx +39 -36
  205. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/mock.ts +68 -10
  206. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/styles.ts +15 -0
  207. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnForm/DetailsRender.tsx +59 -0
  208. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnForm/demo.stories.tsx +95 -15
  209. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnForm/index.tsx +23 -4
  210. package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageWidget/demo.stories.tsx +87 -6
  211. package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageWidget/index.tsx +67 -5
  212. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyBoolean/demo.stories.tsx +1 -1
  213. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyBoolean/mock.ts +8 -8
  214. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/config.json +1 -1
  215. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/demo.stories.tsx +1 -1
  216. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/index.tsx +44 -34
  217. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/mock.ts +1 -1
  218. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDate/index.tsx +2 -2
  219. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDate/mock.ts +7 -7
  220. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/demo.stories.tsx +1 -1
  221. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/index.tsx +2 -3
  222. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/mock.ts +6 -6
  223. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/index.tsx +48 -32
  224. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/mock.ts +1 -1
  225. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyEmail/config.json +1 -1
  226. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyEmail/mock.ts +1 -1
  227. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyIconButtonURL/config.json +64 -0
  228. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyIconButtonURL/demo.stories.tsx +91 -0
  229. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyIconButtonURL/index.tsx +157 -0
  230. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyIconButtonURL/mock.ts +4 -0
  231. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyIconButtonURL/styles.js +7 -0
  232. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyInteger/config.json +1 -1
  233. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyInteger/index.tsx +16 -17
  234. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyInteger/mock.ts +1 -1
  235. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyParagraph/index.tsx +1 -3
  236. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyParagraph/mock.ts +1 -1
  237. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPercentage/config.json +1 -1
  238. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPercentage/index.tsx +34 -19
  239. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPercentage/mock.ts +1 -1
  240. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPhone/index.tsx +17 -9
  241. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPicklist/index.tsx +23 -23
  242. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyRadiobuttons/mock.ts +0 -1
  243. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyText/config.json +1 -1
  244. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyText/index.tsx +0 -1
  245. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyText/mock.ts +1 -1
  246. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTextInput/config.json +1 -1
  247. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTextInput/index.tsx +0 -1
  248. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTextInput/mock.ts +1 -1
  249. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +4 -4
  250. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTimeOfDay/index.tsx +0 -2
  251. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTimeOfDay/mock.ts +6 -6
  252. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyURL/index.tsx +1 -2
  253. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyURL/mock.ts +1 -1
  254. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyDetails/demo.stories.tsx +1 -7
  255. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyDetails/index.tsx +4 -9
  256. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyDetails/mock.ts +197 -164
  257. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyForm/config.json +1 -1
  258. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyForm/demo.stories.tsx +13 -1
  259. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyForm/index.tsx +11 -13
  260. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyForm/utils.ts +1 -1
  261. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyPage/OneColumn.tsx +12 -13
  262. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyPage/demo.stories.tsx +1 -1
  263. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyPage/index.tsx +3 -5
  264. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyPage/mock.ts +8 -9
  265. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +1 -6
  266. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/index.tsx +4 -9
  267. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/mock.ts +207 -163
  268. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnForm/demo.stories.tsx +0 -2
  269. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnForm/mock.ts +121 -122
  270. package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyCaseWidget/config.json +2 -2
  271. package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyCaseWidget/demo.stories.tsx +19 -20
  272. package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyCaseWidget/index.tsx +3 -3
  273. package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +20 -21
  274. package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageCaseWidget/index.tsx +0 -1
  275. package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageCaseWidget/mock.ts +0 -1
  276. package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageWidget/config.json +43 -43
  277. package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageWidget/demo.stories.tsx +45 -2
  278. package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageWidget/index.tsx +168 -3
  279. package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageWidget/mock.ts +26 -1
  280. package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +2 -2
  281. package/tests/assets/sdk-r/components/createAll/override-sdk/field/CancelAlert/CancelAlert.tsx +2 -0
  282. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Currency/Currency.tsx +36 -26
  283. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Decimal/Decimal.tsx +33 -19
  284. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Multiselect/Multiselect.tsx +1 -1
  285. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Percentage/Percentage.tsx +33 -18
  286. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Phone/Phone.tsx +16 -7
  287. package/tests/assets/sdk-r/components/createAll/override-sdk/field/ScalarList/ScalarList.tsx +2 -0
  288. package/tests/assets/sdk-r/components/createAll/override-sdk/field/UserReference/UserReference.tsx +11 -1
  289. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/Assignment/Assignment.tsx +28 -1
  290. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/DashboardFilter/DashboardFilter.tsx +1 -1
  291. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/DeferLoad/DeferLoad.tsx +5 -1
  292. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/MultiStep/MultiStep.tsx +3 -1
  293. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/NavBar/NavBar.tsx +2 -2
  294. package/tests/assets/sdk-r/components/createAll/override-sdk/template/CaseView/CaseView.tsx +2 -1
  295. package/tests/assets/sdk-r/components/createAll/override-sdk/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +1 -1
  296. package/tests/assets/sdk-r/components/createAll/override-sdk/template/DataReference/DataReference.tsx +1 -1
  297. package/tests/assets/sdk-r/components/createAll/override-sdk/template/DefaultForm/utils/index.ts +2 -7
  298. package/tests/assets/sdk-r/components/createAll/override-sdk/template/Details/Details.tsx +1 -1
  299. package/tests/assets/sdk-r/components/createAll/override-sdk/template/DetailsThreeColumn/DetailsThreeColumn.tsx +1 -1
  300. package/tests/assets/sdk-r/components/createAll/override-sdk/template/DetailsTwoColumn/DetailsTwoColumn.tsx +1 -1
  301. package/tests/assets/sdk-r/components/createAll/override-sdk/template/FieldGroupTemplate/FieldGroupTemplate.tsx +2 -0
  302. package/tests/assets/sdk-r/components/createAll/override-sdk/template/ListView/ListView.tsx +20 -31
  303. package/tests/assets/sdk-r/components/createAll/override-sdk/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +1 -1
  304. package/tests/assets/sdk-r/components/createAll/override-sdk/template/NarrowWideDetails/NarrowWideDetails.tsx +1 -1
  305. package/tests/assets/sdk-r/components/createAll/override-sdk/template/PromotedFilters/PromotedFilters.tsx +1 -0
  306. package/tests/assets/sdk-r/components/createAll/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +4 -0
  307. package/tests/assets/sdk-r/components/createAll/override-sdk/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +1 -1
  308. package/tests/assets/sdk-r/components/createAll/override-sdk/template/WideNarrowDetails/WideNarrowDetails.tsx +1 -1
  309. package/tests/assets/sdk-r/components/createAll/override-sdk/widget/Attachment/Attachment.tsx +3 -2
  310. package/tests/assets/sdk-r/components/createAll/override-sdk/widget/FileUtility/FileUtility.tsx +1 -1
  311. package/tests/assets/sdk-r/components/createAll/override-sdk/widget/QuickCreate/QuickCreate.tsx +1 -0
@@ -51,6 +51,7 @@ export default function FieldGroupTemplate(props: FieldGroupTemplateProps) {
51
51
  if (PCore.getPCoreVersion()?.includes('8.7')) {
52
52
  pConn.getListActions().insert({ classID: contextClass }, referenceList.length, pageReference);
53
53
  } else {
54
+ // @ts-ignore - An argument for 'pageRef' was not provided.
54
55
  pConn.getListActions().insert({}, referenceList.length);
55
56
  }
56
57
  };
@@ -63,6 +64,7 @@ export default function FieldGroupTemplate(props: FieldGroupTemplateProps) {
63
64
  if (PCore.getPCoreVersion()?.includes('8.7')) {
64
65
  pConn.getListActions().deleteEntry(index, pageReference);
65
66
  } else {
67
+ // @ts-ignore - An argument for 'pageRef' was not provided.
66
68
  pConn.getListActions().deleteEntry(index);
67
69
  }
68
70
  };
@@ -65,7 +65,6 @@ interface ListViewProps extends PConnProps {
65
65
  const SELECTION_MODE = { SINGLE: 'single', MULTI: 'multi' };
66
66
 
67
67
  let myRows: any[];
68
- let myDisplayColumnList: any[];
69
68
 
70
69
  let menuColumnId = '';
71
70
  let menuColumnType = '';
@@ -119,6 +118,7 @@ export default function ListView(props: ListViewProps) {
119
118
  const rowID = compositeKeys && compositeKeys?.length === 1 ? compositeKeys[0] : defRowID;
120
119
 
121
120
  const [arRows, setRows] = useState<any[]>([]);
121
+ const [rowsData, setRowsData] = useState<any[]>([]);
122
122
  const [arColumns, setColumns] = useState<any[]>([]);
123
123
  const [response, setResponse] = useState<any[]>([]);
124
124
 
@@ -291,16 +291,6 @@ export default function ListView(props: ListViewProps) {
291
291
  });
292
292
  }
293
293
 
294
- function getMyColumnList(arCols: any[]): string[] {
295
- const myColList: string[] = [];
296
-
297
- arCols.forEach(col => {
298
- myColList.push(col.id);
299
- });
300
-
301
- return myColList;
302
- }
303
-
304
294
  /** Will return field from a filter expression */
305
295
  function getFieldFromFilter(filter, dateRange = false) {
306
296
  let fieldValue;
@@ -543,8 +533,8 @@ export default function ListView(props: ListViewProps) {
543
533
 
544
534
  // store globally, so can be searched, filtered, etc.
545
535
  myRows = usingDataResults;
546
- myDisplayColumnList = getMyColumnList(myColumns);
547
536
 
537
+ setRowsData(myRows);
548
538
  // At this point, if we have data ready to render and haven't been asked
549
539
  // to NOT call setRows and setColumns, call them
550
540
  if (bCallSetRowsColumns) {
@@ -604,24 +594,22 @@ export default function ListView(props: ListViewProps) {
604
594
  }, [listContext]);
605
595
 
606
596
  function searchFilter(value: string, rows: any[]) {
597
+ const cols = arColumns.map(ele => {
598
+ return ele.id;
599
+ });
600
+
607
601
  function filterArray(el: any): boolean {
608
- const bReturn = false;
609
- for (const key of Object.keys(el)) {
610
- // only search columsn that are displayed (pzInsKey and pxRefObjectClass are added and may or may not be displayed)
611
- if (myDisplayColumnList.includes(key)) {
612
- let myVal = el[key];
613
- if (myVal !== null) {
614
- if (typeof myVal !== 'string') {
615
- myVal = myVal.toString();
616
- }
617
- if (myVal.toLowerCase().indexOf(value.toLowerCase()) >= 0) {
618
- return true;
619
- }
602
+ return Object.keys(el).some(key => {
603
+ // only search columns that are displayed (pzInsKey and pxRefObjectClass are added and may or may not be displayed)
604
+ if (cols.includes(key)) {
605
+ const myVal = el[key];
606
+ if (myVal !== null && typeof myVal !== 'undefined') {
607
+ const strVal = String(myVal); // Ensure myVal is a string
608
+ return strVal.toLowerCase().includes(value.toLowerCase());
620
609
  }
621
610
  }
622
- }
623
-
624
- return bReturn;
611
+ return false;
612
+ });
625
613
  }
626
614
 
627
615
  rows = rows.filter(filterArray);
@@ -631,8 +619,7 @@ export default function ListView(props: ListViewProps) {
631
619
 
632
620
  function _onSearch(event: any) {
633
621
  const searchValue = event.target.value;
634
-
635
- const filteredRows = searchFilter(searchValue, myRows.slice());
622
+ const filteredRows = searchFilter(searchValue, rowsData?.slice());
636
623
 
637
624
  setRows(filteredRows);
638
625
  }
@@ -653,6 +640,7 @@ export default function ListView(props: ListViewProps) {
653
640
 
654
641
  thePConn
655
642
  .getActionsApi()
643
+ // @ts-ignore
656
644
  .openAssignment(pzInsKey, pxRefObjectClass, options)
657
645
  .then(() => {
658
646
  // console.log("openAssignment successful");
@@ -885,6 +873,7 @@ export default function ListView(props: ListViewProps) {
885
873
  pzInsKey = row[`${associationCategory}:pzInsKey`];
886
874
  }
887
875
  if (column.isAssignmentLink) {
876
+ // @ts-ignore
888
877
  thePConn.getActionsApi().openAssignment(pzInsKey, pxObjClass, {
889
878
  containerName: 'primary',
890
879
  channelName: ''
@@ -1047,7 +1036,7 @@ export default function ListView(props: ListViewProps) {
1047
1036
  .slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage)
1048
1037
  .map(row => {
1049
1038
  return (
1050
- <TableRow key={row.pxRefObjectInsName || row.pyID || row.pyGUID}>
1039
+ <TableRow key={row.pxRefObjectInsName || row.pyID}>
1051
1040
  {arColumns.map(column => {
1052
1041
  const value = row[column.id];
1053
1042
  return (
@@ -1104,7 +1093,7 @@ export default function ListView(props: ListViewProps) {
1104
1093
  .slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage)
1105
1094
  .map(row => {
1106
1095
  return (
1107
- <TableRow key={row.pxRefObjectInsName || row.pyGUID || row.pyID}>
1096
+ <TableRow key={row[rowID]}>
1108
1097
  {selectionMode === SELECTION_MODE.SINGLE && (
1109
1098
  <TableCell>
1110
1099
  <Radio
@@ -29,7 +29,7 @@ export default function MultiReferenceReadOnly(props: MultiReferenceReadOnlyProp
29
29
  }
30
30
  },
31
31
  '',
32
- '',
32
+ 0,
33
33
  {}
34
34
  ); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional
35
35
 
@@ -49,7 +49,7 @@ export default function NarrowWideDetails(props: NarrowWideDetailsProps) {
49
49
  field.config.displayAsStatus = true;
50
50
  }
51
51
 
52
- return getPConnect().createComponent(field, '', '', {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional
52
+ return getPConnect().createComponent(field, '', 0, {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional
53
53
  });
54
54
  }
55
55
 
@@ -87,6 +87,7 @@ export default function PromotedFilters(props: PromotedFilterProps) {
87
87
  };
88
88
  return getPConnect().getContainerManager().addTransientItem({
89
89
  id: viewName,
90
+ // @ts-ignore - Property 'coreHeaders' is missing in type '{ classID: string; }' but required in type '{ coreHeaders: any; }'.
90
91
  data: filtersWithClassID
91
92
  });
92
93
  }, []);
@@ -201,6 +201,7 @@ export default function SimpleTableManual(props: PropsWithChildren<SimpleTableMa
201
201
  if (allowEditingInModal) {
202
202
  getPConnect()
203
203
  .getListActions()
204
+ // @ts-ignore - An argument for 'uniqueField' was not provided.
204
205
  .initDefaultPageInstructions(
205
206
  getPConnect().getReferenceList(),
206
207
  fieldDefs.filter(item => item.name).map(item => item.name)
@@ -302,6 +303,7 @@ export default function SimpleTableManual(props: PropsWithChildren<SimpleTableMa
302
303
  .getActionsApi()
303
304
  .openEmbeddedDataModal(defaultView, pConn, referenceListStr, referenceList.length, PCore.getConstants().RESOURCE_STATUS.CREATE);
304
305
  } else {
306
+ // @ts-ignore - An argument for 'pageRef' was not provided.
305
307
  pConn.getListActions().insert({ classID: contextClass }, referenceList.length);
306
308
  }
307
309
 
@@ -327,10 +329,12 @@ export default function SimpleTableManual(props: PropsWithChildren<SimpleTableMa
327
329
 
328
330
  const deleteRecord = () => {
329
331
  setEditAnchorEl(null);
332
+ // @ts-ignore - An argument for 'pageRef' was not provided.
330
333
  pConn.getListActions().deleteEntry(selectedRowIndex.current);
331
334
  };
332
335
 
333
336
  const deleteRecordFromInlineEditable = (index: number) => {
337
+ // @ts-ignore - An argument for 'pageRef' was not provided.
334
338
  pConn.getListActions().deleteEntry(index);
335
339
  };
336
340
 
@@ -55,7 +55,7 @@ export default function SingleReferenceReadOnly(props: SingleReferenceReadOnlyPr
55
55
  }
56
56
  },
57
57
  '',
58
- '',
58
+ 0,
59
59
  {}
60
60
  ); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional
61
61
 
@@ -54,7 +54,7 @@ export default function WideNarrowDetails(props: WideNarrowDetailsProps) {
54
54
  field.config.displayAsStatus = true;
55
55
  }
56
56
 
57
- return getPConnect().createComponent(field, '', '', {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional
57
+ return getPConnect().createComponent(field, '', 0, {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional
58
58
  });
59
59
  }
60
60
 
@@ -8,7 +8,6 @@ import download from 'downloadjs';
8
8
 
9
9
  import { buildFilePropsFromResponse, getIconFromFileType, validateMaxSize } from '@pega/react-sdk-components/lib/components/helpers/attachmentHelpers';
10
10
  import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
11
- import { isInfinity23OrHigher } from '@pega/react-sdk-components/lib/components/helpers/common-utils';
12
11
  import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
13
12
 
14
13
  import './Attachment.css';
@@ -61,7 +60,7 @@ export default function Attachment(props: AttachmentProps) {
61
60
  const [toggleUploadBegin, setToggleUploadBegin] = useState(false);
62
61
 
63
62
  const resetAttachmentStoredState = () => {
64
- PCore.getStateUtils().updateState(pConn.getContextName(), getAttachmentKey(isInfinity23OrHigher() ? valueRef : ''), undefined, {
63
+ PCore.getStateUtils().updateState(pConn.getContextName(), getAttachmentKey(valueRef), undefined, {
65
64
  pageReference: 'context_data',
66
65
  isArrayDeepMerge: false
67
66
  });
@@ -160,6 +159,7 @@ export default function Attachment(props: AttachmentProps) {
160
159
  messages: [
161
160
  {
162
161
  type: 'error',
162
+ // @ts-ignore - Type '{ type: string; message: string; }' is not assignable to type 'MessagesConfigObject'.
163
163
  message: pConn.getLocalizedValue('Error with one or more files', '', '')
164
164
  }
165
165
  ],
@@ -233,6 +233,7 @@ export default function Attachment(props: AttachmentProps) {
233
233
  messages: [
234
234
  {
235
235
  type: 'error',
236
+ // @ts-ignore - Type '{ type: string; message: string; }' is not assignable to type 'MessagesConfigObject'.
236
237
  message: pConn.getLocalizedValue('Error with one or more files', '', '')
237
238
  }
238
239
  ],
@@ -488,7 +488,7 @@ export default function FileUtility(props: FileUtilityProps) {
488
488
  }
489
489
 
490
490
  return (
491
- <div className='psdk-utility'>
491
+ <div className='psdk-utility' id='file-utility'>
492
492
  {inProgress && (
493
493
  <div className='progress-div'>
494
494
  <CircularProgress />
@@ -35,6 +35,7 @@ export default function QuickCreate(props: QuickCreateProps) {
35
35
  const defaultCases: any = [];
36
36
  const envInfo = PCore.getEnvironmentInfo();
37
37
  if (envInfo?.environmentInfoObject?.pyCaseTypeList) {
38
+ // @ts-ignore - Property 'forEach' does not exist on type 'string'
38
39
  envInfo.environmentInfoObject.pyCaseTypeList.forEach(casetype => {
39
40
  if (casetype.pyWorkTypeName && casetype.pyWorkTypeImplementationClassName) {
40
41
  defaultCases.push({
@@ -3,7 +3,8 @@ import {
3
3
  CheckboxGroup,
4
4
  FieldValueList,
5
5
  Text,
6
- withConfiguration
6
+ withConfiguration,
7
+ BooleanDisplay
7
8
  } from "@pega/cosmos-react-core";
8
9
 
9
10
  import type { PConnFieldProps } from './PConnProps';
@@ -99,7 +100,7 @@ function PegaDxilMyBoolean(props: PegaDxilMyBooleanProps) {
99
100
  // @ts-ignore
100
101
  displayComponent = (
101
102
  // @ts-ignore
102
- <PegaDxilMyBoolean value={value} trueLabel={trueLabel} falseLabel={falseLabel} />
103
+ <BooleanDisplay value={value} trueLabel={trueLabel} falseLabel={falseLabel} />
103
104
  );
104
105
  }
105
106
 
@@ -0,0 +1,46 @@
1
+ import {PConnect } from '@pega/pcore-pconnect-typedefs';
2
+
3
+ // PConnProps.d.ts
4
+ // This gives us a place to have each component (which is most DX Components) that is
5
+ // expected to have a getPConnect extend its props (from BaseProps)
6
+ // such that every component will be expected to have a getPConnect() function
7
+ // that returns a PConnect object. (new/better way of doing .propTypes).
8
+ // This PConnProps can be extended to include other props that we know are in every component
9
+ export interface PConnProps {
10
+ // getPConnect should exist for every C11n component. (add @ts-ignore in special cases where it isn't)
11
+ getPConnect: () => typeof PConnect;
12
+
13
+ // Allow any/all other key/value pairs in the BaseProps for now
14
+ // TODO: refine which other props are always expected for various component
15
+ // types and consider further interface "subclassing". For example, we may
16
+ // want to create a "BasePropsForm" that gives guidance on required, readonly, etc.
17
+ // and any other props that every Form component expects.
18
+ // For example, see the PConnFieldProps below.
19
+ // NOTE: if you uncomment the line below, the PConnProps type will allow
20
+ // otherwise undefined types to appear. This can be helpful for debugging
21
+ // or when adding new components whose types aren't yet known.
22
+ // [key: string]: any;
23
+ }
24
+
25
+
26
+ // PConnFieldProps extends PConnProps to bring in the common properties that are
27
+ // associated with most field components (ex: Dropdown, TextInput, etc.) in the
28
+ // components/field directory
29
+ export interface PConnFieldProps extends PConnProps {
30
+ label: string,
31
+ required: boolean,
32
+ disabled: boolean,
33
+ value: any,
34
+ validatemessage: string,
35
+ status?: string,
36
+ onChange?: any,
37
+ onBlur?: any,
38
+ readOnly: boolean,
39
+ testId: string,
40
+ helperText: string,
41
+ displayMode?: string,
42
+ hideLabel: boolean,
43
+ placeholder?: string,
44
+ fieldMetadata?: any,
45
+ additionalProps?: any
46
+ }
@@ -0,0 +1,99 @@
1
+
2
+ /* eslint-disable react/jsx-no-useless-fragment */
3
+ // @ts-nocheck
4
+ import type { Meta, StoryObj } from '@storybook/react';
5
+
6
+ import PegaDxilMyIconButtonUrl from './index';
7
+ import { configProps } from './mock';
8
+
9
+ const meta: Meta<typeof PegaDxilMyIconButtonUrl> = {
10
+ title: 'PegaDxilMyIconButtonUrl',
11
+ component: PegaDxilMyIconButtonUrl,
12
+ excludeStories: /.*Data$/
13
+ };
14
+
15
+ export default meta;
16
+ type Story = StoryObj<typeof PegaDxilMyIconButtonUrl>;
17
+
18
+ if (!window.PCore) {
19
+ window.PCore = {};
20
+ }
21
+
22
+ const statelistData = {
23
+ data: [
24
+ {
25
+ pyLabel: 'Massachusetts',
26
+ pyStateCode: 'MA'
27
+ },
28
+ {
29
+ pyLabel: 'Rhode Island',
30
+ pyStateCode: 'RI'
31
+ },
32
+ {
33
+ pyLabel: 'Connecticut',
34
+ pyStateCode: 'CT'
35
+ }
36
+ ]
37
+ };
38
+
39
+ window.PCore.getDataPageUtils = () => {
40
+ return {
41
+ getDataAsync: () => {
42
+ return new Promise(resolve => {
43
+ resolve(statelistData);
44
+ });
45
+ }
46
+ };
47
+ };
48
+
49
+ export const BasePegaDxilMyIconButtonUrl: Story = args => {
50
+
51
+ const props = {
52
+ countryCode: configProps.countryCode,
53
+ getPConnect: () => {
54
+ return {
55
+ getValue: value => {
56
+ return value;
57
+ },
58
+ getContextName: () => {
59
+ return 'app/primary_1';
60
+ },
61
+ getLocalizedValue: value => {
62
+ return value;
63
+ },
64
+ getActionsApi: () => {
65
+ return {
66
+ updateFieldValue: () => {
67
+ /* nothing */
68
+ },
69
+ triggerFieldChange: () => {
70
+ /* nothing */
71
+ }
72
+ };
73
+ },
74
+ ignoreSuggestion: () => {
75
+ /* nothing */
76
+ },
77
+ acceptSuggestion: () => {
78
+ /* nothing */
79
+ },
80
+ setInheritedProps: () => {
81
+ /* nothing */
82
+ },
83
+ resolveConfigProps: () => {
84
+ /* nothing */
85
+ }
86
+ };
87
+ }
88
+ };
89
+
90
+ return (
91
+ <>
92
+ <PegaDxilMyIconButtonUrl {...props} {...args} />
93
+ </>
94
+ );
95
+ };
96
+
97
+ BasePegaDxilMyIconButtonUrl.args = {
98
+ countryCode: configProps.countryCode
99
+ };
@@ -0,0 +1,201 @@
1
+ import { useEffect, useState } from 'react';
2
+ import {
3
+ Icon,
4
+ Button,
5
+ withConfiguration,
6
+ registerIcon,
7
+ Table,
8
+ Label,
9
+ Link,
10
+ URLDisplay
11
+ } from '@pega/cosmos-react-core';
12
+ import type { PConnFieldProps } from './PConnProps';
13
+
14
+ // IMPORTANT
15
+ // To use Icons, need to individually import the icon file form @pega/cosmos-react-core (see path below)
16
+ // Icons filename is kabab case (file-name), where as the icon you import is camel case (fileName)
17
+ // Icons need to be registered (camel case), and then used (kabab case)
18
+ import * as listNumber from '@pega/cosmos-react-core/lib/components/Icon/icons/list-number.icon';
19
+ import * as arrowRight from '@pega/cosmos-react-core/lib/components/Icon/icons/arrow-right.icon';
20
+ import * as globe from '@pega/cosmos-react-core/lib/components/Icon/icons/globe.icon';
21
+
22
+ import StyledPegaDxilMyIconButtonUrlWrapper from './styles';
23
+
24
+ // interface for props
25
+ interface PegaDxilMyIconButtonUrlProps extends PConnFieldProps {
26
+ // If any, enter additional props that only exist on TextInput here
27
+ countryCode: string;
28
+ }
29
+
30
+ export const textFormatter = (value: string) => {
31
+ return <URLDisplay target='_blank' value={value} displayText={value} variant='link' />;
32
+ };
33
+
34
+
35
+ // *************
36
+ // This component is meant to be an example of usage (Icon, Button, Link, etc.) and NOT meant to be
37
+ // used "as is"
38
+ //
39
+ // In this example, Icon is shown on its own and inside a Button
40
+ // Though an Icon can have an "onClick" event is it recommended if you want to click on it,
41
+ // to put it in a Button (shown below), so you can have a tooltip and hover style or put it
42
+ // in a Link (shown below) as a URL.
43
+ //
44
+ // For the button, the click will get a list of states for a given country and display in a
45
+ // table below. The table display will toggle with the click of the button icon. Example shows
46
+ // how to handle click, retrieve data from PCore and display it.
47
+ //
48
+ // Globe icon is an icon placed in a Link element. The Link element to use an icon internally. (NOTE: In general
49
+ // the Link element shows the open icon to the left of the link text, but here we are using
50
+ // another icon, so with "icon" specified in the Link element, the open icon doesn't show)
51
+ // Link elements do not handle bad urls well, so we have a simple validator to prevent the Link element
52
+ // from getting most bad urls.
53
+ //
54
+ // NOTE: because icons have to be imported and registered, you can NOT put the icon name
55
+ // inside the config.json and let the user pick it, if it is not already part of your
56
+ // import and registration (can't be done on the fly)
57
+ // **************
58
+
59
+ // props passed in combination of props from property panel (config.json) and run time props from Constellation
60
+ // any default values in config.pros should be set in defaultProps at bottom of this file
61
+ function PegaDxilMyIconButtonUrl(props: PegaDxilMyIconButtonUrlProps) {
62
+ const { value, displayMode, countryCode = 'USA', getPConnect, testId } = props;
63
+ const [statelist, setStatelist] = useState([]);
64
+ const [showTable, setShowTable] = useState(false);
65
+ const [validUrl, setValidUrl] = useState('about:blank');
66
+ const PConnect = getPConnect();
67
+
68
+ // IMPORTANT: need to register icons used in camel case
69
+ registerIcon(listNumber, arrowRight, globe);
70
+
71
+
72
+ // setting up columns for the work list table
73
+ const columns = [
74
+ { renderer: 'stateName', label: PConnect.getLocalizedValue('State name', '', '') },
75
+ { renderer: 'stateCode', label: PConnect.getLocalizedValue('State code', '', '') }
76
+ ];
77
+
78
+ // toggle showing table and getting table data
79
+ function showHideTable() {
80
+ setShowTable(prevShowTable => !prevShowTable);
81
+ }
82
+
83
+ // check if url is valid (simple)
84
+ function validateUrl(href: string) {
85
+ return /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(
86
+ href
87
+ );
88
+ }
89
+
90
+ // Testing to see if value entered is valid url, if not can't use it.
91
+ // Reason for this code is that you can NOT pass to Link component
92
+ // a bad url, or it will error out.
93
+ // For example: Since the value is the property field,
94
+ // it could be entered from another component and thus as it is
95
+ // entered (typed in), it won't be valid until it is all entered.
96
+ // NOTE: can't have a blank value for the url as the Link element will error out
97
+ // in App studio preview
98
+ useEffect(() => {
99
+ if (validateUrl(value)) {
100
+ setValidUrl(value);
101
+ } else {
102
+ setValidUrl('about:blank');
103
+ }
104
+ }, [value]);
105
+
106
+ // going to get data for worklist to put into a table
107
+ // data comes from calling a PCore function to get
108
+ // get data from a data page and a PConnect function
109
+ // to get getContextName
110
+ useEffect(() => {
111
+ const dataViewName = 'D_pyStateList';
112
+ const context = PConnect.getContextName();
113
+ const params = { pyCountry: countryCode };
114
+
115
+ // only retrieve table data if table is shown
116
+ if (showTable) {
117
+ PCore.getDataPageUtils()
118
+ .getDataAsync(dataViewName, context, params, null, null)
119
+ // @ts-ignore
120
+ .then((response: any) => {
121
+ // table requires an index or will get setExtraStackFrame error
122
+ setStatelist(
123
+ response.data.map((entry: any, index: number) => {
124
+ // mapping the data into the column names
125
+ // MUST have an id/index or will get a setExtraStackFrame error
126
+ // put a key in the table
127
+ return {
128
+ stateName: entry.pyLabel,
129
+ stateCode: entry.pyStateCode,
130
+ id: index
131
+ };
132
+ })
133
+ );
134
+ })
135
+ .catch((error: any) => {
136
+ console.log(error);
137
+ });
138
+ }
139
+ }, [PConnect, countryCode, showTable]);
140
+
141
+ // when DISPLAY_ONLY, in this example we will just show the URL.
142
+ if (displayMode === 'DISPLAY_ONLY') {
143
+ const displayComp = textFormatter(validUrl);
144
+ return (
145
+ <StyledPegaDxilMyIconButtonUrlWrapper> {displayComp} </StyledPegaDxilMyIconButtonUrlWrapper>
146
+ );
147
+ }
148
+
149
+ return (
150
+ <StyledPegaDxilMyIconButtonUrlWrapper>
151
+ <div style={{ display: 'flex' }} data-testid={testId}>
152
+ <Icon
153
+ style={{ height: '1.5rem', width: '1.5rem' }}
154
+ // icon name is kabab case
155
+ name='arrow-right'
156
+ role='img'
157
+ aria-label='arrow right'
158
+ />
159
+ <Label style={{ margin: '0.1rem' }}>
160
+ {' '}
161
+ {PConnect.getLocalizedValue('State list for', '', '')}{' '}
162
+ {PConnect.getLocalizedValue(`${countryCode}`, '', '')}{' '}
163
+ </Label>
164
+ <Button
165
+ icon
166
+ label={PConnect.getLocalizedValue('Click to show/hide state list', '', '')}
167
+ variant='link'
168
+ compact={false}
169
+ onClick={showHideTable}
170
+ >
171
+ <Icon
172
+ style={{ height: '1.5rem', width: '1.5rem' }}
173
+ // icon name is kabab case
174
+ name='list-number'
175
+ role='img'
176
+ aria-label='numbered list'
177
+ />
178
+ </Button>
179
+ <Link href={validUrl} variant='link' label={validUrl} icon>
180
+ <Icon
181
+ style={{ height: '1.5rem', width: '1.5rem' }}
182
+ // icon name is kabab case
183
+ name='globe'
184
+ role='img'
185
+ aria-label='open link'
186
+ />
187
+ </Link>
188
+ </div>
189
+ {showTable && (
190
+ <Table
191
+ title={PConnect.getLocalizedValue('State list', '', '')}
192
+ columns={columns}
193
+ data={statelist}
194
+ />
195
+ )}
196
+ </StyledPegaDxilMyIconButtonUrlWrapper>
197
+ );
198
+ }
199
+
200
+
201
+ export default withConfiguration(PegaDxilMyIconButtonUrl);
@@ -0,0 +1,5 @@
1
+
2
+ // @ts-nocheck
3
+ export const configProps = {
4
+ countryCode: 'USA'
5
+ };
@@ -0,0 +1,8 @@
1
+ // individual style, comment out above, and uncomment here and add styles
2
+ import styled, { css } from 'styled-components';
3
+
4
+ export default styled.div(() => {
5
+ return css`
6
+ margin: 0px 0;
7
+ `;
8
+ });
@@ -39,7 +39,6 @@ interface StateProps {
39
39
  hasSuggestions: boolean;
40
40
  }
41
41
 
42
-
43
42
  export const formatExists = (formatterVal: string) => {
44
43
  const formatterValues = [
45
44
  "TextInput",