@pega/dx-component-builder-sdk 0.242.2 → 0.242.4

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 (257) hide show
  1. package/package.json +1 -1
  2. package/src/tasks/create/templates/Constellation/field/Decimal/index.tsx.mustache +3 -6
  3. package/src/tasks/create/templates/Constellation/field/Decimal-Currency/index.tsx.mustache +1 -3
  4. package/src/tasks/create/templates/Constellation/field/Decimal-Percentage/index.tsx.mustache +2 -5
  5. package/src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/index.tsx.mustache +10 -52
  6. package/src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/utils.ts.mustache +1 -1
  7. package/src/tasks/create/templates/Constellation/template/DETAILS/Avatar.tsx.mustache +5 -7
  8. package/src/tasks/create/templates/Constellation/template/DETAILS-region/Avatar.tsx.mustache +5 -7
  9. package/src/tasks/create/templates/Constellation/widget/PAGE-CASE/Avatar.tsx.mustache +5 -7
  10. package/src/tasks/create/templates/SDK-React/field/Boolean/index.tsx.mustache +2 -2
  11. package/src/tasks/create/templates/SDK-React/field/Date/index.tsx.mustache +1 -1
  12. package/src/tasks/create/templates/SDK-React/field/DateTime/index.tsx.mustache +9 -2
  13. package/src/tasks/create/templates/SDK-React/field/Decimal/index.tsx.mustache +2 -2
  14. package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/index.tsx.mustache +2 -2
  15. package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/index.tsx.mustache +2 -2
  16. package/src/tasks/create/templates/SDK-React/field/Icon-Button-URL/index.tsx.mustache +2 -2
  17. package/src/tasks/create/templates/SDK-React/field/Integer/index.tsx.mustache +21 -7
  18. package/src/tasks/create/templates/SDK-React/field/Picklist/index.tsx.mustache +3 -3
  19. package/src/tasks/create/templates/SDK-React/field/Picklist-Autocomplete/index.tsx.mustache +1 -1
  20. package/src/tasks/create/templates/SDK-React/field/Picklist-RadioButtons/index.tsx.mustache +1 -1
  21. package/src/tasks/create/templates/SDK-React/field/Text/index.tsx.mustache +1 -1
  22. package/src/tasks/create/templates/SDK-React/field/Text-Email/index.tsx.mustache +27 -6
  23. package/src/tasks/create/templates/SDK-React/field/Text-Input/index.tsx.mustache +1 -1
  24. package/src/tasks/create/templates/SDK-React/field/Text-Paragraph/index.tsx.mustache +25 -6
  25. package/src/tasks/create/templates/SDK-React/field/Text-Phone/index.tsx.mustache +6 -5
  26. package/src/tasks/create/templates/SDK-React/field/Text-URL/index.tsx.mustache +25 -6
  27. package/src/tasks/create/templates/SDK-React/field/TimeOfDay/index.tsx.mustache +9 -5
  28. package/src/tasks/create/templates/SDK-React/template/DETAILS/index.tsx.mustache +1 -1
  29. package/src/tasks/create/templates/SDK-React/template/DETAILS/mock.ts.mustache +28 -11
  30. package/src/tasks/create/templates/SDK-React/template/DETAILS-region/index.tsx.mustache +1 -1
  31. package/src/tasks/create/templates/SDK-React/template/DETAILS-region/mock.ts.mustache +13 -13
  32. package/src/tasks/create/templates/SDK-React/template/FORM/demo.stories.tsx.mustache +13 -0
  33. package/src/tasks/create/templates/SDK-React/template/FORM-region/demo.stories.tsx.mustache +1 -1
  34. package/src/tasks/create/templates/SDK-React/widget/CASE/index.tsx.mustache +5 -4
  35. package/src/tasks/create/templates/SDK-React/widget/PAGE/index.tsx.mustache +5 -5
  36. package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/mock.ts.mustache +1 -1
  37. package/tests/assets/sdk-r/components/create/custom-sdk/field/Pega_DXIL_MyTestText/index.tsx +3 -2
  38. package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/AlertBanner/AlertBanner.tsx +1 -1
  39. package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/Banner/Banner.tsx +1 -1
  40. package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
  41. package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +11 -2
  42. package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/DetailsFields/DetailsFields.tsx +4 -4
  43. package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/FieldGroup/FieldGroup.tsx +4 -4
  44. package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/FieldGroupList/FieldGroupList.tsx +4 -4
  45. package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/FieldValueList/FieldValueList.tsx +3 -3
  46. package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/Operator/Operator.tsx +6 -5
  47. package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/Pulse/Pulse.tsx +2 -2
  48. package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/RichTextEditor/RichTextEditor.tsx +3 -2
  49. package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx +1 -1
  50. package/tests/assets/sdk-r/components/create/override-sdk/field/AutoComplete/AutoComplete.tsx +4 -4
  51. package/tests/assets/sdk-r/components/create/override-sdk/field/CancelAlert/CancelAlert.tsx +3 -3
  52. package/tests/assets/sdk-r/components/create/override-sdk/field/Checkbox/Checkbox.tsx +4 -4
  53. package/tests/assets/sdk-r/components/create/override-sdk/field/Currency/Currency.tsx +2 -2
  54. package/tests/assets/sdk-r/components/create/override-sdk/field/Date/Date.tsx +23 -42
  55. package/tests/assets/sdk-r/components/create/override-sdk/field/DateTime/DateTime.tsx +29 -34
  56. package/tests/assets/sdk-r/components/create/override-sdk/field/Decimal/Decimal.tsx +2 -2
  57. package/tests/assets/sdk-r/components/create/override-sdk/field/Dropdown/Dropdown.tsx +3 -3
  58. package/tests/assets/sdk-r/components/create/override-sdk/field/Email/Email.tsx +29 -8
  59. package/tests/assets/sdk-r/components/create/override-sdk/field/Group/Group.tsx +2 -2
  60. package/tests/assets/sdk-r/components/create/override-sdk/field/Integer/Integer.tsx +22 -8
  61. package/tests/assets/sdk-r/components/create/override-sdk/field/Multiselect/Multiselect.tsx +8 -14
  62. package/tests/assets/sdk-r/components/create/override-sdk/field/Percentage/Percentage.tsx +3 -3
  63. package/tests/assets/sdk-r/components/create/override-sdk/field/Phone/Phone.tsx +3 -2
  64. package/tests/assets/sdk-r/components/create/override-sdk/field/Phone/config-ext.json +9 -0
  65. package/tests/assets/sdk-r/components/create/override-sdk/field/RadioButtons/RadioButtons.tsx +3 -3
  66. package/tests/assets/sdk-r/components/create/override-sdk/field/RichText/RichText.tsx +1 -1
  67. package/tests/assets/sdk-r/components/create/override-sdk/field/RichText/config-ext.json +11 -0
  68. package/tests/assets/sdk-r/components/create/override-sdk/field/ScalarList/ScalarList.tsx +2 -2
  69. package/tests/assets/sdk-r/components/create/override-sdk/field/SemanticLink/SemanticLink.tsx +4 -4
  70. package/tests/assets/sdk-r/components/create/override-sdk/field/TextArea/TextArea.tsx +26 -8
  71. package/tests/assets/sdk-r/components/create/override-sdk/field/TextContent/TextContent.tsx +1 -1
  72. package/tests/assets/sdk-r/components/create/override-sdk/field/TextInput/TextInput.tsx +2 -2
  73. package/tests/assets/sdk-r/components/create/override-sdk/field/Time/Time.tsx +27 -20
  74. package/tests/assets/sdk-r/components/create/override-sdk/field/URL/URL.tsx +26 -7
  75. package/tests/assets/sdk-r/components/create/override-sdk/field/UserReference/UserReference.tsx +2 -2
  76. package/tests/assets/sdk-r/components/create/override-sdk/infra/ActionButtons/ActionButtons.tsx +3 -3
  77. package/tests/assets/sdk-r/components/create/override-sdk/infra/Assignment/Assignment.tsx +10 -6
  78. package/tests/assets/sdk-r/components/create/override-sdk/infra/DashboardFilter/DashboardFilter.tsx +1 -1
  79. package/tests/assets/sdk-r/components/create/override-sdk/infra/DashboardFilter/filterUtils.tsx +2 -1
  80. package/tests/assets/sdk-r/components/create/override-sdk/infra/DeferLoad/DeferLoad.tsx +3 -3
  81. package/tests/assets/sdk-r/components/create/override-sdk/infra/LeftAlignVerticalTabs/LeftAlignVerticalTabs.tsx +4 -3
  82. package/tests/assets/sdk-r/components/create/override-sdk/infra/MultiStep/MultiStep.tsx +14 -8
  83. package/tests/assets/sdk-r/components/create/override-sdk/infra/NavBar/NavBar.tsx +25 -17
  84. package/tests/assets/sdk-r/components/create/override-sdk/infra/Stages/Stages.tsx +4 -4
  85. package/tests/assets/sdk-r/components/create/override-sdk/infra/VerticalTabs/VerticalTabs.tsx +2 -2
  86. package/tests/assets/sdk-r/components/create/override-sdk/infra/View/View.tsx +37 -3
  87. package/tests/assets/sdk-r/components/create/override-sdk/template/AppShell/AppShell.tsx +55 -5
  88. package/tests/assets/sdk-r/components/create/override-sdk/template/BannerPage/config-ext.json +10 -0
  89. package/tests/assets/sdk-r/components/create/override-sdk/template/CaseView/CaseView.tsx +5 -5
  90. package/tests/assets/sdk-r/components/create/override-sdk/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +7 -7
  91. package/tests/assets/sdk-r/components/create/override-sdk/template/Confirmation/Confirmation.tsx +2 -1
  92. package/tests/assets/sdk-r/components/create/override-sdk/template/DataReference/DataReference.tsx +2 -2
  93. package/tests/assets/sdk-r/components/create/override-sdk/template/Details/Details.tsx +2 -2
  94. package/tests/assets/sdk-r/components/create/override-sdk/template/DetailsSubTabs/DetailsSubTabs.tsx +3 -3
  95. package/tests/assets/sdk-r/components/create/override-sdk/template/DetailsThreeColumn/DetailsThreeColumn.tsx +2 -2
  96. package/tests/assets/sdk-r/components/create/override-sdk/template/DetailsTwoColumn/DetailsTwoColumn.tsx +2 -2
  97. package/tests/assets/sdk-r/components/create/override-sdk/template/FieldGroupTemplate/FieldGroupTemplate.tsx +10 -3
  98. package/tests/assets/sdk-r/components/create/override-sdk/template/InlineDashboard/InlineDashboard.tsx +2 -2
  99. package/tests/assets/sdk-r/components/create/override-sdk/template/InlineDashboardPage/config-ext.json +10 -0
  100. package/tests/assets/sdk-r/components/create/override-sdk/template/ListView/ListView.tsx +41 -34
  101. package/tests/assets/sdk-r/components/create/override-sdk/template/ListView/utils.ts +1 -1
  102. package/tests/assets/sdk-r/components/create/override-sdk/template/NarrowWideDetails/NarrowWideDetails.tsx +2 -2
  103. package/tests/assets/sdk-r/components/create/override-sdk/template/OneColumn/OneColumn.tsx +2 -2
  104. package/tests/assets/sdk-r/components/create/override-sdk/template/PromotedFilters/PromotedFilters.tsx +1 -1
  105. package/tests/assets/sdk-r/components/create/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +29 -25
  106. package/tests/assets/sdk-r/components/create/override-sdk/template/SubTabs/SubTabs.tsx +2 -2
  107. package/tests/assets/sdk-r/components/create/override-sdk/template/TwoColumn/TwoColumn.tsx +2 -2
  108. package/tests/assets/sdk-r/components/create/override-sdk/template/TwoColumnTab/TwoColumnTab.tsx +2 -2
  109. package/tests/assets/sdk-r/components/create/override-sdk/template/WideNarrowDetails/WideNarrowDetails.tsx +2 -2
  110. package/tests/assets/sdk-r/components/create/override-sdk/template/WssNavBar/WssNavBar.tsx +9 -9
  111. package/tests/assets/sdk-r/components/create/override-sdk/widget/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +1 -1
  112. package/tests/assets/sdk-r/components/create/override-sdk/widget/AppAnnouncement/AppAnnouncement.tsx +2 -2
  113. package/tests/assets/sdk-r/components/create/override-sdk/widget/Attachment/Attachment.tsx +5 -2
  114. package/tests/assets/sdk-r/components/create/override-sdk/widget/CaseHistory/CaseHistory.tsx +12 -10
  115. package/tests/assets/sdk-r/components/create/override-sdk/widget/FileUtility/FileUtility.tsx +4 -3
  116. package/tests/assets/sdk-r/components/create/override-sdk/widget/Followers/Followers.tsx +2 -2
  117. package/tests/assets/sdk-r/components/create/override-sdk/widget/QuickCreate/config-ext.json +10 -0
  118. package/tests/assets/sdk-r/components/create/override-sdk/widget/SummaryItem/SummaryItem.tsx +3 -2
  119. package/tests/assets/sdk-r/components/create/override-sdk/widget/ToDo/ToDo.tsx +91 -21
  120. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyBoolean/demo.stories.tsx +2 -3
  121. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyBoolean/index.tsx +5 -4
  122. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyBoolean/mock.ts +0 -1
  123. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyCurrency/index.tsx +1 -3
  124. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDate/index.tsx +3 -5
  125. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDecimal/index.tsx +3 -6
  126. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyInteger/demo.stories.tsx +1 -2
  127. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyInteger/event-utils.ts +1 -1
  128. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyInteger/index.tsx +2 -12
  129. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyInteger/mock.ts +3 -2
  130. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPercentage/index.tsx +2 -5
  131. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/index.tsx +10 -52
  132. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/utils.ts +1 -1
  133. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/Avatar.tsx +5 -7
  134. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/Avatar.tsx +5 -7
  135. package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageCaseWidget/Avatar.tsx +5 -7
  136. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyBoolean/index.tsx +5 -4
  137. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/index.tsx +4 -3
  138. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDate/index.tsx +29 -45
  139. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/index.tsx +35 -38
  140. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/index.tsx +6 -5
  141. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyEmail/index.tsx +30 -8
  142. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyIconButtonURL/index.tsx +13 -13
  143. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyInteger/index.tsx +23 -8
  144. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyParagraph/index.tsx +27 -7
  145. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPercentage/index.tsx +6 -5
  146. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPhone/index.tsx +2 -1
  147. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPicklist/index.tsx +6 -5
  148. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyRadiobuttons/index.tsx +3 -2
  149. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MySearchbox/index.tsx +5 -4
  150. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyText/index.tsx +3 -2
  151. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTextInput/index.tsx +3 -2
  152. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTimeOfDay/index.tsx +32 -22
  153. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyURL/index.tsx +27 -7
  154. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyDetails/index.tsx +2 -2
  155. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyDetails/mock.ts +28 -11
  156. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyForm/demo.stories.tsx +13 -0
  157. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyPage/OneColumn.tsx +2 -2
  158. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/index.tsx +2 -2
  159. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/mock.ts +13 -13
  160. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnForm/demo.stories.tsx +18 -15
  161. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnForm/index.tsx +6 -6
  162. package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyCaseWidget/index.tsx +15 -13
  163. package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageCaseWidget/index.tsx +18 -10
  164. package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageCaseWidget/mock.ts +1 -1
  165. package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageWidget/index.tsx +29 -23
  166. package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageWidget/mock.ts +1 -1
  167. package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/AlertBanner/AlertBanner.tsx +1 -1
  168. package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/Banner/Banner.tsx +1 -1
  169. package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
  170. package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +11 -2
  171. package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/DetailsFields/DetailsFields.tsx +4 -4
  172. package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/FieldGroup/FieldGroup.tsx +4 -4
  173. package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/FieldGroupList/FieldGroupList.tsx +4 -4
  174. package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/FieldValueList/FieldValueList.tsx +3 -3
  175. package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/Operator/Operator.tsx +6 -5
  176. package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/Pulse/Pulse.tsx +2 -2
  177. package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/RichTextEditor/RichTextEditor.tsx +3 -2
  178. package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx +1 -1
  179. package/tests/assets/sdk-r/components/createAll/override-sdk/field/AutoComplete/AutoComplete.tsx +4 -4
  180. package/tests/assets/sdk-r/components/createAll/override-sdk/field/CancelAlert/CancelAlert.tsx +3 -3
  181. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Checkbox/Checkbox.tsx +4 -4
  182. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Currency/Currency.tsx +2 -2
  183. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Date/Date.tsx +23 -42
  184. package/tests/assets/sdk-r/components/createAll/override-sdk/field/DateTime/DateTime.tsx +29 -34
  185. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Decimal/Decimal.tsx +2 -2
  186. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Dropdown/Dropdown.tsx +3 -3
  187. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Email/Email.tsx +29 -8
  188. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Group/Group.tsx +2 -2
  189. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Integer/Integer.tsx +22 -8
  190. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Multiselect/Multiselect.tsx +8 -14
  191. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Percentage/Percentage.tsx +3 -3
  192. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Phone/Phone.tsx +3 -2
  193. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Phone/config-ext.json +9 -0
  194. package/tests/assets/sdk-r/components/createAll/override-sdk/field/RadioButtons/RadioButtons.tsx +3 -3
  195. package/tests/assets/sdk-r/components/createAll/override-sdk/field/RichText/RichText.tsx +1 -1
  196. package/tests/assets/sdk-r/components/createAll/override-sdk/field/RichText/config-ext.json +11 -0
  197. package/tests/assets/sdk-r/components/createAll/override-sdk/field/ScalarList/ScalarList.tsx +2 -2
  198. package/tests/assets/sdk-r/components/createAll/override-sdk/field/SemanticLink/SemanticLink.tsx +4 -4
  199. package/tests/assets/sdk-r/components/createAll/override-sdk/field/TextArea/TextArea.tsx +26 -8
  200. package/tests/assets/sdk-r/components/createAll/override-sdk/field/TextContent/TextContent.tsx +1 -1
  201. package/tests/assets/sdk-r/components/createAll/override-sdk/field/TextInput/TextInput.tsx +2 -2
  202. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Time/Time.tsx +27 -20
  203. package/tests/assets/sdk-r/components/createAll/override-sdk/field/URL/URL.tsx +26 -7
  204. package/tests/assets/sdk-r/components/createAll/override-sdk/field/UserReference/UserReference.tsx +2 -2
  205. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/ActionButtons/ActionButtons.tsx +3 -3
  206. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/Assignment/Assignment.tsx +10 -6
  207. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/DashboardFilter/DashboardFilter.tsx +1 -1
  208. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/DashboardFilter/filterUtils.tsx +2 -1
  209. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/DeferLoad/DeferLoad.tsx +3 -3
  210. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/LeftAlignVerticalTabs/LeftAlignVerticalTabs.tsx +4 -3
  211. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/MultiStep/MultiStep.tsx +14 -8
  212. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/NavBar/NavBar.tsx +25 -17
  213. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/Stages/Stages.tsx +4 -4
  214. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/VerticalTabs/VerticalTabs.tsx +2 -2
  215. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/View/View.tsx +37 -3
  216. package/tests/assets/sdk-r/components/createAll/override-sdk/template/AppShell/AppShell.tsx +55 -5
  217. package/tests/assets/sdk-r/components/createAll/override-sdk/template/BannerPage/config-ext.json +10 -0
  218. package/tests/assets/sdk-r/components/createAll/override-sdk/template/CaseView/CaseView.tsx +5 -5
  219. package/tests/assets/sdk-r/components/createAll/override-sdk/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +7 -7
  220. package/tests/assets/sdk-r/components/createAll/override-sdk/template/Confirmation/Confirmation.tsx +2 -1
  221. package/tests/assets/sdk-r/components/createAll/override-sdk/template/DataReference/DataReference.tsx +2 -2
  222. package/tests/assets/sdk-r/components/createAll/override-sdk/template/Details/Details.tsx +2 -2
  223. package/tests/assets/sdk-r/components/createAll/override-sdk/template/DetailsSubTabs/DetailsSubTabs.tsx +3 -3
  224. package/tests/assets/sdk-r/components/createAll/override-sdk/template/DetailsThreeColumn/DetailsThreeColumn.tsx +2 -2
  225. package/tests/assets/sdk-r/components/createAll/override-sdk/template/DetailsTwoColumn/DetailsTwoColumn.tsx +2 -2
  226. package/tests/assets/sdk-r/components/createAll/override-sdk/template/FieldGroupTemplate/FieldGroupTemplate.tsx +10 -3
  227. package/tests/assets/sdk-r/components/createAll/override-sdk/template/InlineDashboard/InlineDashboard.tsx +2 -2
  228. package/tests/assets/sdk-r/components/createAll/override-sdk/template/InlineDashboardPage/config-ext.json +10 -0
  229. package/tests/assets/sdk-r/components/createAll/override-sdk/template/ListView/ListView.tsx +41 -34
  230. package/tests/assets/sdk-r/components/createAll/override-sdk/template/ListView/utils.ts +1 -1
  231. package/tests/assets/sdk-r/components/createAll/override-sdk/template/NarrowWideDetails/NarrowWideDetails.tsx +2 -2
  232. package/tests/assets/sdk-r/components/createAll/override-sdk/template/OneColumn/OneColumn.tsx +2 -2
  233. package/tests/assets/sdk-r/components/createAll/override-sdk/template/PromotedFilters/PromotedFilters.tsx +1 -1
  234. package/tests/assets/sdk-r/components/createAll/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +29 -25
  235. package/tests/assets/sdk-r/components/createAll/override-sdk/template/SubTabs/SubTabs.tsx +2 -2
  236. package/tests/assets/sdk-r/components/createAll/override-sdk/template/TwoColumn/TwoColumn.tsx +2 -2
  237. package/tests/assets/sdk-r/components/createAll/override-sdk/template/TwoColumnTab/TwoColumnTab.tsx +2 -2
  238. package/tests/assets/sdk-r/components/createAll/override-sdk/template/WideNarrowDetails/WideNarrowDetails.tsx +2 -2
  239. package/tests/assets/sdk-r/components/createAll/override-sdk/template/WssNavBar/WssNavBar.tsx +9 -9
  240. package/tests/assets/sdk-r/components/createAll/override-sdk/widget/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +1 -1
  241. package/tests/assets/sdk-r/components/createAll/override-sdk/widget/AppAnnouncement/AppAnnouncement.tsx +2 -2
  242. package/tests/assets/sdk-r/components/createAll/override-sdk/widget/Attachment/Attachment.tsx +5 -2
  243. package/tests/assets/sdk-r/components/createAll/override-sdk/widget/CaseHistory/CaseHistory.tsx +12 -10
  244. package/tests/assets/sdk-r/components/createAll/override-sdk/widget/FileUtility/FileUtility.tsx +4 -3
  245. package/tests/assets/sdk-r/components/createAll/override-sdk/widget/Followers/Followers.tsx +2 -2
  246. package/tests/assets/sdk-r/components/createAll/override-sdk/widget/QuickCreate/config-ext.json +10 -0
  247. package/tests/assets/sdk-r/components/createAll/override-sdk/widget/SummaryItem/SummaryItem.tsx +3 -2
  248. package/tests/assets/sdk-r/components/createAll/override-sdk/widget/ToDo/ToDo.tsx +91 -21
  249. /package/tests/assets/sdk-a/components/createAll/custom-constellation/field/{Pega_DXIL_MyRadiobuttons → Pega_DXIL_MyRadioButtons}/PConnProps.d.ts +0 -0
  250. /package/tests/assets/sdk-a/components/createAll/custom-constellation/field/{Pega_DXIL_MyRadiobuttons → Pega_DXIL_MyRadioButtons}/create-nonce.ts +0 -0
  251. /package/tests/assets/sdk-a/components/createAll/custom-constellation/field/{Pega_DXIL_MyRadiobuttons → Pega_DXIL_MyRadioButtons}/demo.stories.tsx +0 -0
  252. /package/tests/assets/sdk-a/components/createAll/custom-constellation/field/{Pega_DXIL_MyRadiobuttons → Pega_DXIL_MyRadioButtons}/event-utils.ts +0 -0
  253. /package/tests/assets/sdk-a/components/createAll/custom-constellation/field/{Pega_DXIL_MyRadiobuttons → Pega_DXIL_MyRadioButtons}/index.tsx +0 -0
  254. /package/tests/assets/sdk-a/components/createAll/custom-constellation/field/{Pega_DXIL_MyRadiobuttons → Pega_DXIL_MyRadioButtons}/mock.ts +0 -0
  255. /package/tests/assets/sdk-a/components/createAll/custom-constellation/field/{Pega_DXIL_MyRadiobuttons → Pega_DXIL_MyRadioButtons}/styles.ts +0 -0
  256. /package/tests/assets/sdk-a/components/createAll/custom-constellation/field/{Pega_DXIL_MyRadiobuttons → Pega_DXIL_MyRadioButtons}/suggestions-handler.ts +0 -0
  257. /package/tests/assets/sdk-a/components/createAll/custom-constellation/field/{Pega_DXIL_MyRadiobuttons → Pega_DXIL_MyRadioButtons}/textformat-utils.tsx +0 -0
@@ -1,7 +1,9 @@
1
+ import { useEffect, useState } from 'react';
1
2
  import { TextField } from '@mui/material';
2
3
 
3
4
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
4
5
  import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
6
+ import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
5
7
 
6
8
  import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
7
9
 
@@ -18,14 +20,13 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
18
20
  const FieldValueList = getComponentFromMap('FieldValueList');
19
21
 
20
22
  const {
23
+ getPConnect,
21
24
  label,
22
25
  required,
23
26
  disabled,
24
27
  value = '',
25
28
  validatemessage,
26
29
  status,
27
- onChange,
28
- onBlur,
29
30
  readOnly,
30
31
  testId,
31
32
  helperText,
@@ -33,11 +34,20 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
33
34
  hideLabel,
34
35
  placeholder
35
36
  } = props;
37
+
38
+ const pConn = getPConnect();
39
+ const actions = pConn.getActionsApi();
40
+ const propName = (pConn.getStateProps() as any).value;
41
+
36
42
  const helperTextToDisplay = validatemessage || helperText;
37
43
 
38
- // console.log(`Integer: label: ${label} value: ${value}`);
44
+ const [inputValue, setInputValue] = useState('');
45
+
46
+ useEffect(() => {
47
+ setInputValue(value);
48
+ }, [value]);
39
49
 
40
- if (displayMode === 'LABELS_LEFT') {
50
+ if (displayMode === 'DISPLAY_ONLY') {
41
51
  return <FieldValueList name={hideLabel ? '' : label} value={value} />;
42
52
  }
43
53
 
@@ -69,7 +79,11 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
69
79
  }
70
80
 
71
81
  // Pass through to the Constellation change handler
72
- onChange(event);
82
+ setInputValue(event.target.value);
83
+ }
84
+
85
+ function handleBlur() {
86
+ handleEvent(actions, 'changeNblur', propName, inputValue);
73
87
  }
74
88
 
75
89
  return (
@@ -83,10 +97,10 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
83
97
  required={required}
84
98
  disabled={disabled}
85
99
  onChange={intOnChange}
86
- onBlur={!readOnly ? onBlur : undefined}
100
+ onBlur={!readOnly ? handleBlur : undefined}
87
101
  error={status === 'error'}
88
102
  label={label}
89
- value={value}
103
+ value={inputValue}
90
104
  type='text'
91
105
  {{! pick new delimiters for mustache }}
92
106
  {{=<% %>=}}
@@ -136,7 +136,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
136
136
  const optionsList = [...list];
137
137
  optionsList.unshift({
138
138
  key: placeholder,
139
- value: thePConn.getLocalizedValue(placeholder, '', '')
139
+ value: thePConn.getLocalizedValue(placeholder)
140
140
  }); // 2nd and 3rd args empty string until typedef marked correctly
141
141
  setOptions(optionsList);
142
142
  }
@@ -171,7 +171,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
171
171
 
172
172
  let readOnlyProp = {};
173
173
 
174
- if (displayMode === 'LABELS_LEFT') {
174
+ if (displayMode === 'DISPLAY_ONLY') {
175
175
  return (
176
176
  <FieldValueList
177
177
  name={hideLabel ? '' : label}
@@ -218,7 +218,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
218
218
  fullWidth
219
219
  variant={readOnly ? 'standard' : 'outlined'}
220
220
  helperText={helperTextToDisplay}
221
- placeholder={thePConn.getLocalizedValue(placeholder, '', '')} // 2nd and 3rd args empty string until typedef marked correctly
221
+ placeholder={thePConn.getLocalizedValue(placeholder, '', '')}
222
222
  size='small'
223
223
  required={required}
224
224
  disabled={disabled}
@@ -155,7 +155,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
155
155
  }
156
156
  }, []);
157
157
 
158
- if (displayMode === 'LABELS_LEFT') {
158
+ if (displayMode === 'DISPLAY_ONLY') {
159
159
  return <FieldValueList name={hideLabel ? '' : label} value={value} />;
160
160
  }
161
161
 
@@ -66,7 +66,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
66
66
  setSelectedButton(value);
67
67
  }, [value]);
68
68
 
69
- if (displayMode === 'LABELS_LEFT') {
69
+ if (displayMode === 'DISPLAY_ONLY') {
70
70
  return (
71
71
  <FieldValueList
72
72
  name={hideLabel ? '' : label}
@@ -52,7 +52,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
52
52
  setInputValue(value);
53
53
  }, [value]);
54
54
 
55
- if (displayMode === 'LABELS_LEFT') {
55
+ if (displayMode === 'DISPLAY_ONLY') {
56
56
  return <FieldValueList name={hideLabel ? '' : label} value={value} />;
57
57
  }
58
58
 
@@ -1,8 +1,10 @@
1
+ import { useEffect, useState } from 'react';
1
2
  import { InputAdornment, TextField } from '@mui/material';
2
3
  import MailOutlineIcon from '@mui/icons-material/MailOutline';
3
4
 
4
5
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
5
6
  import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
7
+ import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
6
8
 
7
9
  import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
8
10
 
@@ -19,14 +21,13 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
19
21
  const FieldValueList = getComponentFromMap('FieldValueList');
20
22
 
21
23
  const {
24
+ getPConnect,
22
25
  label,
23
26
  required,
24
27
  disabled,
25
28
  value = '',
26
29
  validatemessage,
27
30
  status,
28
- onChange,
29
- onBlur,
30
31
  readOnly,
31
32
  testId,
32
33
  helperText,
@@ -34,9 +35,20 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
34
35
  hideLabel,
35
36
  placeholder
36
37
  } = props;
38
+
39
+ const pConn = getPConnect();
40
+ const actions = pConn.getActionsApi();
41
+ const propName = (pConn.getStateProps() as any).value;
42
+
37
43
  const helperTextToDisplay = validatemessage || helperText;
38
44
 
39
- if (displayMode === 'LABELS_LEFT') {
45
+ const [inputValue, setInputValue] = useState('');
46
+
47
+ useEffect(() => {
48
+ setInputValue(value);
49
+ }, [value]);
50
+
51
+ if (displayMode === 'DISPLAY_ONLY') {
40
52
  return <FieldValueList name={hideLabel ? '' : label} value={value} />;
41
53
  }
42
54
 
@@ -54,6 +66,15 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
54
66
  'data-test-id': testId
55
67
  };
56
68
 
69
+ function handleChange(event) {
70
+ // update internal value
71
+ setInputValue(event?.target?.value);
72
+ }
73
+
74
+ function handleBlur() {
75
+ handleEvent(actions, 'changeNblur', propName, inputValue);
76
+ }
77
+
57
78
  return (
58
79
  <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
59
80
  <TextField
@@ -64,11 +85,11 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
64
85
  size='small'
65
86
  required={required}
66
87
  disabled={disabled}
67
- onChange={onChange}
68
- onBlur={!readOnly ? onBlur : undefined}
88
+ onChange={handleChange}
89
+ onBlur={!readOnly ? handleBlur : undefined}
69
90
  error={status === 'error'}
70
91
  label={label}
71
- value={value}
92
+ value={inputValue}
72
93
  type='email'
73
94
  {{! pick new delimiters for mustache }}
74
95
  {{=<% %>=}}
@@ -52,7 +52,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
52
52
  setInputValue(value);
53
53
  }, [value]);
54
54
 
55
- if (displayMode === 'LABELS_LEFT') {
55
+ if (displayMode === 'DISPLAY_ONLY') {
56
56
  return <FieldValueList name={hideLabel ? '' : label} value={value} />;
57
57
  }
58
58
 
@@ -1,7 +1,9 @@
1
+ import { useEffect, useState } from 'react';
1
2
  import { TextField } from '@mui/material';
2
3
 
3
4
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
4
5
  import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
6
+ import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
5
7
 
6
8
  import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
7
9
 
@@ -18,14 +20,13 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
18
20
  const FieldValueList = getComponentFromMap('FieldValueList');
19
21
 
20
22
  const {
23
+ getPConnect,
21
24
  label,
22
25
  required,
23
26
  disabled,
24
27
  value = '',
25
28
  validatemessage,
26
29
  status,
27
- onChange,
28
- onBlur,
29
30
  readOnly,
30
31
  testId,
31
32
  fieldMetadata,
@@ -36,11 +37,20 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
36
37
  } = props;
37
38
  const helperTextToDisplay = validatemessage || helperText;
38
39
 
40
+ const pConn = getPConnect();
41
+ const actions = pConn.getActionsApi();
42
+ const propName = (pConn.getStateProps() as any).value;
39
43
  const maxLength = fieldMetadata?.maxLength;
40
44
 
45
+ const [inputValue, setInputValue] = useState('');
46
+
41
47
  let readOnlyProp = {};
42
48
 
43
- if (displayMode === 'LABELS_LEFT') {
49
+ useEffect(() => {
50
+ setInputValue(value);
51
+ }, [value]);
52
+
53
+ if (displayMode === 'DISPLAY_ONLY') {
44
54
  return <FieldValueList name={hideLabel ? '' : label} value={value} />;
45
55
  }
46
56
 
@@ -60,6 +70,15 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
60
70
  'data-test-id': testId
61
71
  };
62
72
 
73
+ function handleChange(event) {
74
+ // update internal value
75
+ setInputValue(event?.target?.value);
76
+ }
77
+
78
+ function handleBlur() {
79
+ handleEvent(actions, 'changeNblur', propName, inputValue);
80
+ }
81
+
63
82
  return (
64
83
  <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
65
84
  <TextField
@@ -73,11 +92,11 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
73
92
  size='small'
74
93
  required={required}
75
94
  disabled={disabled}
76
- onChange={onChange}
77
- onBlur={!readOnly ? onBlur : undefined}
95
+ onChange={handleChange}
96
+ onBlur={!readOnly ? handleBlur : undefined}
78
97
  error={status === 'error'}
79
98
  label={label}
80
- value={value}
99
+ value={inputValue}
81
100
  {{! pick new delimiters for mustache }}
82
101
  {{=<% %>=}}
83
102
  InputProps={{ ...readOnlyProp, inputProps: { maxLength, ...testProp } }}
@@ -1,5 +1,5 @@
1
- import MuiPhoneNumber from 'material-ui-phone-number';
2
1
  import { useEffect, useState } from 'react';
2
+ import { MuiTelInput } from 'mui-tel-input';
3
3
 
4
4
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
5
5
  import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
@@ -50,7 +50,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
50
50
  'data-test-id': testId
51
51
  };
52
52
 
53
- if (displayMode === 'LABELS_LEFT') {
53
+ if (displayMode === 'DISPLAY_ONLY') {
54
54
  return <FieldValueList name={hideLabel ? '' : label} value={value} />;
55
55
  }
56
56
 
@@ -63,11 +63,12 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
63
63
  return (
64
64
  <div>
65
65
  <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
66
- <MuiPhoneNumber
66
+ <MuiTelInput
67
67
  fullWidth
68
68
  helperText={helperTextToDisplay}
69
69
  placeholder={placeholder ?? ''}
70
70
  size='small'
71
+ defaultCountry='US'
71
72
  required={required}
72
73
  disabled={disabled}
73
74
  onChange={onChange}
@@ -101,13 +102,13 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
101
102
 
102
103
  return (
103
104
  <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
104
- <MuiPhoneNumber
105
+ <MuiTelInput
105
106
  fullWidth
106
107
  variant='outlined'
107
108
  helperText={helperTextToDisplay}
108
109
  placeholder={placeholder ?? ''}
109
110
  size='small'
110
- defaultCountry='us'
111
+ defaultCountry='US'
111
112
  required={required}
112
113
  disabled={disabled}
113
114
  onChange={handleChange}
@@ -1,5 +1,7 @@
1
+ import { useEffect, useState } from 'react';
1
2
  import { TextField } from '@mui/material';
2
3
 
4
+ import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
3
5
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
4
6
  import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
5
7
 
@@ -18,14 +20,13 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
18
20
  const TextInput = getComponentFromMap('TextInput');
19
21
 
20
22
  const {
23
+ getPConnect,
21
24
  label,
22
25
  required,
23
26
  disabled,
24
27
  value = '',
25
28
  validatemessage,
26
29
  status,
27
- onChange,
28
- onBlur,
29
30
  readOnly,
30
31
  testId,
31
32
  helperText,
@@ -35,7 +36,17 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
35
36
  } = props;
36
37
  const helperTextToDisplay = validatemessage || helperText;
37
38
 
38
- if (displayMode === 'LABELS_LEFT') {
39
+ const [inputValue, setInputValue] = useState('');
40
+
41
+ const pConn = getPConnect();
42
+ const actions = pConn.getActionsApi();
43
+ const propName = (pConn.getStateProps() as any).value;
44
+
45
+ useEffect(() => {
46
+ setInputValue(value);
47
+ }, [value]);
48
+
49
+ if (displayMode === 'DISPLAY_ONLY') {
39
50
  return <FieldValueList name={hideLabel ? '' : label} value={value} />;
40
51
  }
41
52
 
@@ -53,6 +64,14 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
53
64
  'data-test-id': testId
54
65
  };
55
66
 
67
+ const handleChange = event => {
68
+ setInputValue(event?.target?.value);
69
+ };
70
+
71
+ function handleBlur() {
72
+ handleEvent(actions, 'changeNblur', propName, inputValue);
73
+ }
74
+
56
75
  return (
57
76
  <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
58
77
  <TextField
@@ -64,11 +83,11 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
64
83
  size='small'
65
84
  required={required}
66
85
  disabled={disabled}
67
- onChange={onChange}
68
- onBlur={!readOnly ? onBlur : undefined}
86
+ onChange={handleChange}
87
+ onBlur={!readOnly ? handleBlur : undefined}
69
88
  error={status === 'error'}
70
89
  label={label}
71
- value={value}
90
+ value={inputValue}
72
91
  {{! pick new delimiters for mustache }}
73
92
  {{=<% %>=}}
74
93
  InputProps={{ inputProps: { ...testProp } }}
@@ -4,6 +4,7 @@ import { LocalizationProvider } from '@mui/x-date-pickers';
4
4
  import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
5
5
  import dayjs from 'dayjs';
6
6
 
7
+ import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
7
8
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
8
9
  import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
9
10
 
@@ -21,10 +22,13 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
21
22
  const FieldValueList = getComponentFromMap('FieldValueList');
22
23
  const TextInput = getComponentFromMap('TextInput');
23
24
 
24
- const { label, required, disabled, value = '', validatemessage, status, onChange, readOnly, helperText, displayMode, hideLabel, testId } = props;
25
+ const { getPConnect, label, required, disabled, value = '', validatemessage, status, readOnly, helperText, displayMode, hideLabel, testId } = props;
25
26
  const helperTextToDisplay = validatemessage || helperText;
27
+ const pConn = getPConnect();
28
+ const actions = pConn.getActionsApi();
29
+ const propName = (pConn.getStateProps() as any).value;
26
30
 
27
- if (displayMode === 'LABELS_LEFT') {
31
+ if (displayMode === 'DISPLAY_ONLY') {
28
32
  return <FieldValueList name={hideLabel ? '' : label} value={value} />;
29
33
  }
30
34
 
@@ -44,11 +48,11 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
44
48
 
45
49
  const handleChange = date => {
46
50
  const theValue = date && date.isValid() ? date.format('HH:mm') : null;
47
- onChange({ value: theValue });
51
+ handleEvent(actions, 'changeNblur', propName, theValue);
48
52
  };
49
53
 
50
54
  let timeValue: any = null;
51
- if (value) {
55
+ if (value && Object.keys(value).length) {
52
56
  const timeArray = value.split(':').map(itm => Number(itm));
53
57
  timeValue = dayjs().hour(timeArray[0]).minute(timeArray[1]);
54
58
  }
@@ -83,7 +87,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
83
87
  error: status === 'error',
84
88
  helperText: helperTextToDisplay,
85
89
  size: 'small',
86
- InputProps: { inputProps: { ...testProp } }
90
+ InputProps: { ...testProp }
87
91
  }
88
92
  }}
89
93
  <%={{ }}=%> {{! revert delimiters for mustache }}
@@ -21,7 +21,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
21
21
 
22
22
  // Set display mode prop and re-create the children so this part of the dom tree renders
23
23
  // in a readonly (display) mode instead of a editable
24
- getPConnect().setInheritedProp('displayMode', 'LABELS_LEFT');
24
+ getPConnect().setInheritedProp('displayMode', 'DISPLAY_ONLY');
25
25
  getPConnect().setInheritedProp('readOnly', true);
26
26
  const children = (getPConnect().getChildren() as any[]).map((configObject, index) =>
27
27
  createElement(createPConnectComponent(), {
@@ -108,7 +108,7 @@ export const pyReviewRaw = {
108
108
  value: 'John',
109
109
  label: 'First Name',
110
110
  hasSuggestions: false,
111
- displayMode: 'LABELS_LEFT',
111
+ displayMode: 'DISPLAY_ONLY',
112
112
  getPConnect: () => {
113
113
  return {
114
114
  getActionsApi: () => {
@@ -133,7 +133,7 @@ export const pyReviewRaw = {
133
133
  value: '',
134
134
  label: 'Middle Name',
135
135
  hasSuggestions: false,
136
- displayMode: 'LABELS_LEFT',
136
+ displayMode: 'DISPLAY_ONLY',
137
137
  getPConnect: () => {
138
138
  return {
139
139
  getActionsApi: () => {
@@ -158,7 +158,7 @@ export const pyReviewRaw = {
158
158
  value: 'Doe',
159
159
  label: 'Last Name',
160
160
  hasSuggestions: false,
161
- displayMode: 'LABELS_LEFT',
161
+ displayMode: 'DISPLAY_ONLY',
162
162
  getPConnect: () => {
163
163
  return {
164
164
  getActionsApi: () => {
@@ -183,13 +183,30 @@ export const pyReviewRaw = {
183
183
  required: true,
184
184
  testId: 'CE8AE9DA5B7CD6C3DF2929543A9AF92D',
185
185
  hasSuggestions: false,
186
- displayMode: 'LABELS_LEFT'
186
+ displayMode: 'DISPLAY_ONLY',
187
+ getPConnect: () => {
188
+ return {
189
+ getActionsApi: () => {
190
+ return {
191
+ updateFieldValue: () => {
192
+ /* nothing */
193
+ },
194
+ triggerFieldChange: () => {
195
+ /* nothing */
196
+ }
197
+ };
198
+ },
199
+ getStateProps: () => {
200
+ return { value: '.email' };
201
+ }
202
+ };
203
+ }
187
204
  },
188
205
  {
189
206
  readOnly: undefined,
190
207
  value: '+16397975093',
191
208
  label: 'Phone',
192
- displayMode: 'LABELS_LEFT',
209
+ displayMode: 'DISPLAY_ONLY',
193
210
  hasSuggestions: false,
194
211
  getPConnect: () => {
195
212
  return {
@@ -215,7 +232,7 @@ export const pyReviewRaw = {
215
232
  value: '90.99',
216
233
  label: 'Price',
217
234
  hasSuggestions: false,
218
- displayMode: 'LABELS_LEFT',
235
+ displayMode: 'DISPLAY_ONLY',
219
236
  getPConnect: () => {
220
237
  return {
221
238
  getActionsApi: () => {
@@ -237,7 +254,7 @@ export const pyReviewRaw = {
237
254
  value: '100 Mbps',
238
255
  label: 'Internet Plan',
239
256
  hasSuggestions: false,
240
- displayMode: 'LABELS_LEFT',
257
+ displayMode: 'DISPLAY_ONLY',
241
258
  getPConnect: () => {
242
259
  return {
243
260
  getActionsApi: () => {
@@ -347,7 +364,7 @@ export const pyReviewResolved = {
347
364
  }
348
365
  }
349
366
  ],
350
- displayMode: 'LABELS_LEFT'
367
+ displayMode: 'DISPLAY_ONLY'
351
368
  };
352
369
 
353
370
  export const regionChildrenResolved = [
@@ -355,13 +372,13 @@ export const regionChildrenResolved = [
355
372
  readOnly: true,
356
373
  value: '',
357
374
  label: 'SLA Deadline',
358
- displayMode: 'LABELS_LEFT'
375
+ displayMode: 'DISPLAY_ONLY'
359
376
  },
360
377
  {
361
378
  readOnly: true,
362
379
  value: '',
363
380
  label: 'SLA Goal',
364
- displayMode: 'LABELS_LEFT'
381
+ displayMode: 'DISPLAY_ONLY'
365
382
  },
366
383
  {
367
384
  readOnly: true,
@@ -378,6 +395,6 @@ export const regionChildrenResolved = [
378
395
  value: 'Current Date Time'
379
396
  }
380
397
  ],
381
- displayMode: 'LABELS_LEFT'
398
+ displayMode: 'DISPLAY_ONLY'
382
399
  }
383
400
  ];
@@ -21,7 +21,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
21
21
 
22
22
  // Set display mode prop and re-create the children so this part of the dom tree renders
23
23
  // in a readonly (display) mode instead of a editable
24
- getPConnect().setInheritedProp('displayMode', 'LABELS_LEFT');
24
+ getPConnect().setInheritedProp('displayMode', 'DISPLAY_ONLY');
25
25
  getPConnect().setInheritedProp('readOnly', true);
26
26
  const children = (getPConnect().getChildren() as any[]).map((configObject, index) =>
27
27
  createElement(createPConnectComponent(), {