@pega/dx-component-builder-sdk 24.1.12 → 24.2.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 (259) hide show
  1. package/package.json +2 -2
  2. package/src/tasks/create/templates/Constellation/field/Boolean/demo.stories.tsx.mustache +2 -3
  3. package/src/tasks/create/templates/Constellation/field/Boolean/index.tsx.mustache +5 -4
  4. package/src/tasks/create/templates/Constellation/field/Boolean/mock.ts.mustache +0 -1
  5. package/src/tasks/create/templates/Constellation/field/Date/index.tsx.mustache +3 -5
  6. package/src/tasks/create/templates/Constellation/field/Integer/demo.stories.tsx.mustache +1 -2
  7. package/src/tasks/create/templates/Constellation/field/Integer/event-utils.ts.mustache +1 -1
  8. package/src/tasks/create/templates/Constellation/field/Integer/index.tsx.mustache +2 -12
  9. package/src/tasks/create/templates/Constellation/field/Integer/mock.ts.mustache +3 -2
  10. package/src/tasks/create/templates/SDK-React/field/Boolean/index.tsx.mustache +5 -4
  11. package/src/tasks/create/templates/SDK-React/field/Date/index.tsx.mustache +32 -48
  12. package/src/tasks/create/templates/SDK-React/field/DateTime/index.tsx.mustache +38 -38
  13. package/src/tasks/create/templates/SDK-React/field/Decimal/index.tsx.mustache +5 -4
  14. package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/index.tsx.mustache +3 -2
  15. package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/index.tsx.mustache +5 -4
  16. package/src/tasks/create/templates/SDK-React/field/Icon-Button-URL/index.tsx.mustache +13 -13
  17. package/src/tasks/create/templates/SDK-React/field/Integer/index.tsx.mustache +23 -8
  18. package/src/tasks/create/templates/SDK-React/field/Picklist/index.tsx.mustache +6 -5
  19. package/src/tasks/create/templates/SDK-React/field/Picklist-Autocomplete/index.tsx.mustache +5 -4
  20. package/src/tasks/create/templates/SDK-React/field/Picklist-RadioButtons/index.tsx.mustache +3 -2
  21. package/src/tasks/create/templates/SDK-React/field/Text/index.tsx.mustache +3 -2
  22. package/src/tasks/create/templates/SDK-React/field/Text-Email/index.tsx.mustache +30 -8
  23. package/src/tasks/create/templates/SDK-React/field/Text-Input/index.tsx.mustache +3 -2
  24. package/src/tasks/create/templates/SDK-React/field/Text-Paragraph/index.tsx.mustache +27 -7
  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 +27 -7
  27. package/src/tasks/create/templates/SDK-React/field/TimeOfDay/index.tsx.mustache +35 -25
  28. package/src/tasks/create/templates/SDK-React/template/DETAILS/index.tsx.mustache +2 -2
  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 +2 -2
  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 +41 -25
  34. package/src/tasks/create/templates/SDK-React/template/FORM-region/index.tsx.mustache +6 -6
  35. package/src/tasks/create/templates/SDK-React/template/PAGE/OneColumn.tsx.mustache +2 -2
  36. package/src/tasks/create/templates/SDK-React/widget/CASE/index.tsx.mustache +15 -13
  37. package/src/tasks/create/templates/SDK-React/widget/PAGE/index.tsx.mustache +29 -23
  38. package/src/tasks/create/templates/SDK-React/widget/PAGE/mock.ts.mustache +1 -1
  39. package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/index.tsx.mustache +18 -10
  40. package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/mock.ts.mustache +1 -1
  41. package/tests/assets/sdk-r/components/create/custom-sdk/field/Pega_DXIL_MyTestText/index.tsx +3 -2
  42. package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/AlertBanner/AlertBanner.tsx +1 -1
  43. package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/Banner/Banner.tsx +1 -1
  44. package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
  45. package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +11 -2
  46. package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/DetailsFields/DetailsFields.tsx +4 -4
  47. package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/FieldGroup/FieldGroup.tsx +4 -4
  48. package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/FieldGroupList/FieldGroupList.tsx +4 -4
  49. package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/FieldValueList/FieldValueList.tsx +5 -5
  50. package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/Operator/Operator.tsx +6 -5
  51. package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/Pulse/Pulse.tsx +2 -2
  52. package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/RichTextEditor/RichTextEditor.tsx +3 -2
  53. package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx +1 -1
  54. package/tests/assets/sdk-r/components/create/override-sdk/field/AutoComplete/AutoComplete.tsx +4 -4
  55. package/tests/assets/sdk-r/components/create/override-sdk/field/CancelAlert/CancelAlert.tsx +3 -3
  56. package/tests/assets/sdk-r/components/create/override-sdk/field/Checkbox/Checkbox.tsx +4 -4
  57. package/tests/assets/sdk-r/components/create/override-sdk/field/Currency/Currency.tsx +2 -2
  58. package/tests/assets/sdk-r/components/create/override-sdk/field/Date/Date.tsx +23 -42
  59. package/tests/assets/sdk-r/components/create/override-sdk/field/DateTime/DateTime.tsx +29 -34
  60. package/tests/assets/sdk-r/components/create/override-sdk/field/Decimal/Decimal.tsx +2 -2
  61. package/tests/assets/sdk-r/components/create/override-sdk/field/Dropdown/Dropdown.tsx +3 -3
  62. package/tests/assets/sdk-r/components/create/override-sdk/field/Email/Email.tsx +29 -8
  63. package/tests/assets/sdk-r/components/create/override-sdk/field/Group/Group.tsx +2 -2
  64. package/tests/assets/sdk-r/components/create/override-sdk/field/Integer/Integer.tsx +22 -8
  65. package/tests/assets/sdk-r/components/create/override-sdk/field/Multiselect/Multiselect.tsx +8 -14
  66. package/tests/assets/sdk-r/components/create/override-sdk/field/Percentage/Percentage.tsx +3 -3
  67. package/tests/assets/sdk-r/components/create/override-sdk/field/Phone/Phone.tsx +6 -5
  68. package/tests/assets/sdk-r/components/create/override-sdk/field/Phone/config-ext.json +9 -0
  69. package/tests/assets/sdk-r/components/create/override-sdk/field/RadioButtons/RadioButtons.tsx +3 -3
  70. package/tests/assets/sdk-r/components/create/override-sdk/field/RichText/RichText.tsx +1 -1
  71. package/tests/assets/sdk-r/components/create/override-sdk/field/RichText/config-ext.json +11 -0
  72. package/tests/assets/sdk-r/components/create/override-sdk/field/ScalarList/ScalarList.tsx +2 -2
  73. package/tests/assets/sdk-r/components/create/override-sdk/field/SemanticLink/SemanticLink.tsx +4 -4
  74. package/tests/assets/sdk-r/components/create/override-sdk/field/TextArea/TextArea.tsx +26 -8
  75. package/tests/assets/sdk-r/components/create/override-sdk/field/TextContent/TextContent.tsx +1 -1
  76. package/tests/assets/sdk-r/components/create/override-sdk/field/TextInput/TextInput.tsx +2 -2
  77. package/tests/assets/sdk-r/components/create/override-sdk/field/Time/Time.tsx +27 -20
  78. package/tests/assets/sdk-r/components/create/override-sdk/field/URL/URL.tsx +26 -7
  79. package/tests/assets/sdk-r/components/create/override-sdk/field/UserReference/UserReference.tsx +2 -2
  80. package/tests/assets/sdk-r/components/create/override-sdk/infra/ActionButtons/ActionButtons.tsx +3 -3
  81. package/tests/assets/sdk-r/components/create/override-sdk/infra/Assignment/Assignment.tsx +10 -6
  82. package/tests/assets/sdk-r/components/create/override-sdk/infra/DashboardFilter/DashboardFilter.tsx +1 -1
  83. package/tests/assets/sdk-r/components/create/override-sdk/infra/DashboardFilter/filterUtils.tsx +2 -1
  84. package/tests/assets/sdk-r/components/create/override-sdk/infra/DeferLoad/DeferLoad.tsx +3 -3
  85. package/tests/assets/sdk-r/components/create/override-sdk/infra/LeftAlignVerticalTabs/LeftAlignVerticalTabs.tsx +4 -3
  86. package/tests/assets/sdk-r/components/create/override-sdk/infra/MultiStep/MultiStep.tsx +14 -8
  87. package/tests/assets/sdk-r/components/create/override-sdk/infra/NavBar/NavBar.css +1 -0
  88. package/tests/assets/sdk-r/components/create/override-sdk/infra/NavBar/NavBar.tsx +25 -17
  89. package/tests/assets/sdk-r/components/create/override-sdk/infra/Stages/Stages.tsx +4 -4
  90. package/tests/assets/sdk-r/components/create/override-sdk/infra/VerticalTabs/VerticalTabs.tsx +2 -2
  91. package/tests/assets/sdk-r/components/create/override-sdk/infra/View/View.tsx +37 -3
  92. package/tests/assets/sdk-r/components/create/override-sdk/template/AppShell/AppShell.tsx +55 -5
  93. package/tests/assets/sdk-r/components/create/override-sdk/template/BannerPage/config-ext.json +10 -0
  94. package/tests/assets/sdk-r/components/create/override-sdk/template/CaseView/CaseView.tsx +5 -5
  95. package/tests/assets/sdk-r/components/create/override-sdk/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +7 -7
  96. package/tests/assets/sdk-r/components/create/override-sdk/template/Confirmation/Confirmation.tsx +2 -1
  97. package/tests/assets/sdk-r/components/create/override-sdk/template/DataReference/DataReference.tsx +2 -2
  98. package/tests/assets/sdk-r/components/create/override-sdk/template/Details/Details.tsx +2 -2
  99. package/tests/assets/sdk-r/components/create/override-sdk/template/DetailsSubTabs/DetailsSubTabs.tsx +3 -3
  100. package/tests/assets/sdk-r/components/create/override-sdk/template/DetailsThreeColumn/DetailsThreeColumn.tsx +2 -2
  101. package/tests/assets/sdk-r/components/create/override-sdk/template/DetailsTwoColumn/DetailsTwoColumn.tsx +2 -2
  102. package/tests/assets/sdk-r/components/create/override-sdk/template/FieldGroupTemplate/FieldGroupTemplate.tsx +10 -3
  103. package/tests/assets/sdk-r/components/create/override-sdk/template/InlineDashboard/InlineDashboard.tsx +2 -2
  104. package/tests/assets/sdk-r/components/create/override-sdk/template/InlineDashboardPage/config-ext.json +10 -0
  105. package/tests/assets/sdk-r/components/create/override-sdk/template/ListView/ListView.tsx +69 -61
  106. package/tests/assets/sdk-r/components/create/override-sdk/template/ListView/utils.ts +1 -1
  107. package/tests/assets/sdk-r/components/create/override-sdk/template/NarrowWideDetails/NarrowWideDetails.tsx +2 -2
  108. package/tests/assets/sdk-r/components/create/override-sdk/template/OneColumn/OneColumn.tsx +2 -2
  109. package/tests/assets/sdk-r/components/create/override-sdk/template/PromotedFilters/PromotedFilters.tsx +1 -1
  110. package/tests/assets/sdk-r/components/create/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +39 -30
  111. package/tests/assets/sdk-r/components/create/override-sdk/template/SubTabs/SubTabs.tsx +2 -2
  112. package/tests/assets/sdk-r/components/create/override-sdk/template/TwoColumn/TwoColumn.tsx +2 -2
  113. package/tests/assets/sdk-r/components/create/override-sdk/template/TwoColumnTab/TwoColumnTab.tsx +2 -2
  114. package/tests/assets/sdk-r/components/create/override-sdk/template/WideNarrowDetails/WideNarrowDetails.tsx +2 -2
  115. package/tests/assets/sdk-r/components/create/override-sdk/template/WssNavBar/WssNavBar.tsx +9 -9
  116. package/tests/assets/sdk-r/components/create/override-sdk/widget/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +1 -1
  117. package/tests/assets/sdk-r/components/create/override-sdk/widget/AppAnnouncement/AppAnnouncement.tsx +2 -2
  118. package/tests/assets/sdk-r/components/create/override-sdk/widget/Attachment/Attachment.tsx +5 -2
  119. package/tests/assets/sdk-r/components/create/override-sdk/widget/CaseHistory/CaseHistory.tsx +12 -10
  120. package/tests/assets/sdk-r/components/create/override-sdk/widget/FileUtility/FileUtility.tsx +4 -3
  121. package/tests/assets/sdk-r/components/create/override-sdk/widget/Followers/Followers.tsx +2 -2
  122. package/tests/assets/sdk-r/components/create/override-sdk/widget/QuickCreate/config-ext.json +10 -0
  123. package/tests/assets/sdk-r/components/create/override-sdk/widget/SummaryItem/SummaryItem.tsx +3 -2
  124. package/tests/assets/sdk-r/components/create/override-sdk/widget/ToDo/ToDo.tsx +91 -21
  125. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyBoolean/demo.stories.tsx +2 -3
  126. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyBoolean/index.tsx +5 -4
  127. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyBoolean/mock.ts +0 -1
  128. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDate/index.tsx +3 -5
  129. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyInteger/demo.stories.tsx +1 -2
  130. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyInteger/event-utils.ts +1 -1
  131. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyInteger/index.tsx +2 -12
  132. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyInteger/mock.ts +3 -2
  133. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyBoolean/index.tsx +5 -4
  134. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/index.tsx +3 -2
  135. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDate/index.tsx +29 -45
  136. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/index.tsx +35 -38
  137. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/index.tsx +5 -4
  138. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyEmail/index.tsx +30 -8
  139. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyIconButtonURL/index.tsx +13 -13
  140. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyInteger/index.tsx +23 -8
  141. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyParagraph/index.tsx +27 -7
  142. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPercentage/index.tsx +5 -4
  143. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPhone/index.tsx +6 -5
  144. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPicklist/index.tsx +6 -5
  145. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyRadiobuttons/index.tsx +3 -2
  146. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MySearchbox/index.tsx +5 -4
  147. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyText/index.tsx +3 -2
  148. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTextInput/index.tsx +3 -2
  149. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTimeOfDay/index.tsx +32 -22
  150. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyURL/index.tsx +27 -7
  151. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyDetails/index.tsx +2 -2
  152. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyDetails/mock.ts +28 -11
  153. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyForm/demo.stories.tsx +13 -0
  154. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyPage/OneColumn.tsx +2 -2
  155. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/index.tsx +2 -2
  156. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/mock.ts +13 -13
  157. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnForm/demo.stories.tsx +39 -23
  158. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnForm/index.tsx +6 -6
  159. package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyCaseWidget/index.tsx +15 -13
  160. package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageCaseWidget/index.tsx +18 -10
  161. package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageCaseWidget/mock.ts +1 -1
  162. package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageWidget/index.tsx +29 -23
  163. package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageWidget/mock.ts +1 -1
  164. package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/AlertBanner/AlertBanner.tsx +1 -1
  165. package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/Banner/Banner.tsx +1 -1
  166. package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
  167. package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +11 -2
  168. package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/DetailsFields/DetailsFields.tsx +4 -4
  169. package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/FieldGroup/FieldGroup.tsx +4 -4
  170. package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/FieldGroupList/FieldGroupList.tsx +4 -4
  171. package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/FieldValueList/FieldValueList.tsx +5 -5
  172. package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/Operator/Operator.tsx +6 -5
  173. package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/Pulse/Pulse.tsx +2 -2
  174. package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/RichTextEditor/RichTextEditor.tsx +3 -2
  175. package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx +1 -1
  176. package/tests/assets/sdk-r/components/createAll/override-sdk/field/AutoComplete/AutoComplete.tsx +4 -4
  177. package/tests/assets/sdk-r/components/createAll/override-sdk/field/CancelAlert/CancelAlert.tsx +3 -3
  178. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Checkbox/Checkbox.tsx +4 -4
  179. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Currency/Currency.tsx +2 -2
  180. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Date/Date.tsx +23 -42
  181. package/tests/assets/sdk-r/components/createAll/override-sdk/field/DateTime/DateTime.tsx +29 -34
  182. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Decimal/Decimal.tsx +2 -2
  183. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Dropdown/Dropdown.tsx +3 -3
  184. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Email/Email.tsx +29 -8
  185. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Group/Group.tsx +2 -2
  186. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Integer/Integer.tsx +22 -8
  187. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Multiselect/Multiselect.tsx +8 -14
  188. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Percentage/Percentage.tsx +3 -3
  189. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Phone/Phone.tsx +6 -5
  190. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Phone/config-ext.json +9 -0
  191. package/tests/assets/sdk-r/components/createAll/override-sdk/field/RadioButtons/RadioButtons.tsx +3 -3
  192. package/tests/assets/sdk-r/components/createAll/override-sdk/field/RichText/RichText.tsx +1 -1
  193. package/tests/assets/sdk-r/components/createAll/override-sdk/field/RichText/config-ext.json +11 -0
  194. package/tests/assets/sdk-r/components/createAll/override-sdk/field/ScalarList/ScalarList.tsx +2 -2
  195. package/tests/assets/sdk-r/components/createAll/override-sdk/field/SemanticLink/SemanticLink.tsx +4 -4
  196. package/tests/assets/sdk-r/components/createAll/override-sdk/field/TextArea/TextArea.tsx +26 -8
  197. package/tests/assets/sdk-r/components/createAll/override-sdk/field/TextContent/TextContent.tsx +1 -1
  198. package/tests/assets/sdk-r/components/createAll/override-sdk/field/TextInput/TextInput.tsx +2 -2
  199. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Time/Time.tsx +27 -20
  200. package/tests/assets/sdk-r/components/createAll/override-sdk/field/URL/URL.tsx +26 -7
  201. package/tests/assets/sdk-r/components/createAll/override-sdk/field/UserReference/UserReference.tsx +2 -2
  202. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/ActionButtons/ActionButtons.tsx +3 -3
  203. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/Assignment/Assignment.tsx +10 -6
  204. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/DashboardFilter/DashboardFilter.tsx +1 -1
  205. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/DashboardFilter/filterUtils.tsx +2 -1
  206. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/DeferLoad/DeferLoad.tsx +3 -3
  207. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/LeftAlignVerticalTabs/LeftAlignVerticalTabs.tsx +4 -3
  208. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/MultiStep/MultiStep.tsx +14 -8
  209. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/NavBar/NavBar.css +1 -0
  210. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/NavBar/NavBar.tsx +25 -17
  211. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/Stages/Stages.tsx +4 -4
  212. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/VerticalTabs/VerticalTabs.tsx +2 -2
  213. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/View/View.tsx +37 -3
  214. package/tests/assets/sdk-r/components/createAll/override-sdk/template/AppShell/AppShell.tsx +55 -5
  215. package/tests/assets/sdk-r/components/createAll/override-sdk/template/BannerPage/config-ext.json +10 -0
  216. package/tests/assets/sdk-r/components/createAll/override-sdk/template/CaseView/CaseView.tsx +5 -5
  217. package/tests/assets/sdk-r/components/createAll/override-sdk/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +7 -7
  218. package/tests/assets/sdk-r/components/createAll/override-sdk/template/Confirmation/Confirmation.tsx +2 -1
  219. package/tests/assets/sdk-r/components/createAll/override-sdk/template/DataReference/DataReference.tsx +2 -2
  220. package/tests/assets/sdk-r/components/createAll/override-sdk/template/Details/Details.tsx +2 -2
  221. package/tests/assets/sdk-r/components/createAll/override-sdk/template/DetailsSubTabs/DetailsSubTabs.tsx +3 -3
  222. package/tests/assets/sdk-r/components/createAll/override-sdk/template/DetailsThreeColumn/DetailsThreeColumn.tsx +2 -2
  223. package/tests/assets/sdk-r/components/createAll/override-sdk/template/DetailsTwoColumn/DetailsTwoColumn.tsx +2 -2
  224. package/tests/assets/sdk-r/components/createAll/override-sdk/template/FieldGroupTemplate/FieldGroupTemplate.tsx +10 -3
  225. package/tests/assets/sdk-r/components/createAll/override-sdk/template/InlineDashboard/InlineDashboard.tsx +2 -2
  226. package/tests/assets/sdk-r/components/createAll/override-sdk/template/InlineDashboardPage/config-ext.json +10 -0
  227. package/tests/assets/sdk-r/components/createAll/override-sdk/template/ListView/ListView.tsx +69 -61
  228. package/tests/assets/sdk-r/components/createAll/override-sdk/template/ListView/utils.ts +1 -1
  229. package/tests/assets/sdk-r/components/createAll/override-sdk/template/NarrowWideDetails/NarrowWideDetails.tsx +2 -2
  230. package/tests/assets/sdk-r/components/createAll/override-sdk/template/OneColumn/OneColumn.tsx +2 -2
  231. package/tests/assets/sdk-r/components/createAll/override-sdk/template/PromotedFilters/PromotedFilters.tsx +1 -1
  232. package/tests/assets/sdk-r/components/createAll/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +39 -30
  233. package/tests/assets/sdk-r/components/createAll/override-sdk/template/SubTabs/SubTabs.tsx +2 -2
  234. package/tests/assets/sdk-r/components/createAll/override-sdk/template/TwoColumn/TwoColumn.tsx +2 -2
  235. package/tests/assets/sdk-r/components/createAll/override-sdk/template/TwoColumnTab/TwoColumnTab.tsx +2 -2
  236. package/tests/assets/sdk-r/components/createAll/override-sdk/template/WideNarrowDetails/WideNarrowDetails.tsx +2 -2
  237. package/tests/assets/sdk-r/components/createAll/override-sdk/template/WssNavBar/WssNavBar.tsx +9 -9
  238. package/tests/assets/sdk-r/components/createAll/override-sdk/widget/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +1 -1
  239. package/tests/assets/sdk-r/components/createAll/override-sdk/widget/AppAnnouncement/AppAnnouncement.tsx +2 -2
  240. package/tests/assets/sdk-r/components/createAll/override-sdk/widget/Attachment/Attachment.tsx +5 -2
  241. package/tests/assets/sdk-r/components/createAll/override-sdk/widget/CaseHistory/CaseHistory.tsx +12 -10
  242. package/tests/assets/sdk-r/components/createAll/override-sdk/widget/FileUtility/FileUtility.tsx +4 -3
  243. package/tests/assets/sdk-r/components/createAll/override-sdk/widget/Followers/Followers.tsx +2 -2
  244. package/tests/assets/sdk-r/components/createAll/override-sdk/widget/QuickCreate/config-ext.json +10 -0
  245. package/tests/assets/sdk-r/components/createAll/override-sdk/widget/SummaryItem/SummaryItem.tsx +3 -2
  246. package/tests/assets/sdk-r/components/createAll/override-sdk/widget/ToDo/ToDo.tsx +91 -21
  247. package/tests/functional/sdk-r/localCreateAllListDeleteAllCustom.test.js +1 -1
  248. package/tests/functional/sdk-r/localCreateAllListDeleteAllOverride.test.js +1 -1
  249. package/tests/functional/sdk-r/localCreateBuildAllDeleteAllCustom.test.js +2 -2
  250. package/tests/functional/sdk-r/localCreateBuildDeleteCustom.test.js +1 -1
  251. package/tests/functional/sdk-r/localCreateBuildDeleteOverride.test.js +2 -2
  252. package/tests/functional/sdk-r/localCreateListDeleteCustom.test.js +1 -1
  253. package/tests/functional/sdk-r/localCreateListDeleteOverride.test.js +1 -1
  254. package/tests/functional/sdk-r/localCreateMapAllClearMap.test.js +1 -1
  255. package/tests/functional/sdk-r/localCreatePublishAllDeleteAllCustom.test.js +2 -2
  256. package/tests/functional/sdk-r/localCreatePublishAllDeleteAllOverride.test.js +1 -1
  257. package/tests/functional/sdk-r/localCreatePublishDeleteCustom.test.js +1 -1
  258. package/tests/functional/sdk-r/localCreatePublishDeleteOverride.test.js +2 -2
  259. package/tests/functional/sdk-r/localCreateRenameDeleteCustom.test.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/dx-component-builder-sdk",
3
- "version": "24.1.12",
3
+ "version": "24.2.10",
4
4
  "description": "Utility for building custom UI components",
5
5
  "bin": "./bin/index.js",
6
6
  "scripts": {
@@ -52,7 +52,7 @@
52
52
  "sass-loader": "^13.3.3",
53
53
  "terser-webpack-plugin": "5.3.10",
54
54
  "ts-loader": "^9.5.1",
55
- "typescript": "^4.9.5",
55
+ "typescript": "~5.2.2",
56
56
  "url-loader": "4.1.1",
57
57
  "webpack": "^5.89.0"
58
58
  },
@@ -1,6 +1,5 @@
1
1
 
2
2
  /* eslint-disable react/jsx-no-useless-fragment */
3
- // @ts-nocheck
4
3
  import { useState } from 'react';
5
4
  import type { Meta, StoryObj } from '@storybook/react';
6
5
 
@@ -17,7 +16,7 @@ const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
17
16
  export default meta;
18
17
  type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
19
18
 
20
- export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
19
+ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args: any) => {
21
20
 
22
21
  const [value, setValue] = useState(configProps.value);
23
22
 
@@ -31,7 +30,7 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
31
30
  },
32
31
  getActionsApi: () => {
33
32
  return {
34
- updateFieldValue: (propName, theValue) => {
33
+ updateFieldValue: (propName: string, theValue: any) => {
35
34
  setValue(theValue);
36
35
  },
37
36
  triggerFieldChange: () => { /* nothing */}
@@ -87,7 +87,6 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
87
87
  handleEvent(actions, "changeNblur", propName, event.target.checked);
88
88
  }}
89
89
  onBlur={(event: { target: { checked: any; }; }) => {
90
- // @ts-ignore
91
90
  pConn.getValidationApi().validate(event.target.checked);
92
91
  }}
93
92
  data-testid={testId}
@@ -98,15 +97,17 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
98
97
 
99
98
  let displayComponent;
100
99
  if (displayMode) {
101
- // @ts-ignore
102
100
  displayComponent = (
103
- // @ts-ignore
104
101
  <BooleanDisplay value={value} trueLabel={trueLabel} falseLabel={falseLabel} />
105
102
  );
106
103
  }
107
104
 
108
105
  if (displayMode === 'DISPLAY_ONLY') {
109
- return ( <Styled{{COMPONENT_CLASS_NAME}}Wrapper> {displayComponent} </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
106
+ return (
107
+ <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
108
+ {displayComponent}
109
+ </Styled{{COMPONENT_CLASS_NAME}}Wrapper>
110
+ );
110
111
  }
111
112
 
112
113
  if (displayMode === "LABELS_LEFT") {
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  export const configProps = {
3
2
  value: true,
4
3
  label: 'Boolean label',
@@ -104,8 +104,7 @@ function {{COMPONENT_CLASS_NAME}} (props: {{COMPONENT_CLASS_NAME}}Props) {
104
104
  }, [validatemessage, hasSuggestions, myStatus]);
105
105
 
106
106
  // calculate min and max range of calendar
107
- // @ts-ignore
108
- const currentYear = getFullYear();
107
+ const currentYear = getFullYear(null);
109
108
 
110
109
  const yearFromValue = getFullYear(value);
111
110
  const maxDate = getMaxDate(
@@ -161,7 +160,7 @@ function {{COMPONENT_CLASS_NAME}} (props: {{COMPONENT_CLASS_NAME}}Props) {
161
160
  }
162
161
 
163
162
 
164
- if (formatter !== "" && formatExists(formatter)){
163
+ if (formatter !== "" && formatExists(formatter)) {
165
164
  // @ts-ignore
166
165
  const {variantVal, formatVal} = datetimedisplayformatter(formatter);
167
166
  variantValue = variantVal;
@@ -225,8 +224,7 @@ function {{COMPONENT_CLASS_NAME}} (props: {{COMPONENT_CLASS_NAME}}Props) {
225
224
  hideLabel={hideLabel}
226
225
  testId={testId}
227
226
  additionalProps={textAdditionalProps}
228
- // @ts-ignore
229
- customFormat={getDateFormat(locale)}
227
+ customFormat={getDateFormat(locale, null)}
230
228
  />
231
229
  </Styled{{COMPONENT_CLASS_NAME}}Wrapper>
232
230
  );
@@ -1,5 +1,4 @@
1
1
  /* eslint-disable react/jsx-no-useless-fragment */
2
- // @ts-nocheck
3
2
  import type { Meta, StoryObj } from '@storybook/react';
4
3
 
5
4
  import { stateProps, configProps, fieldMetadata } from './mock';
@@ -15,7 +14,7 @@ const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
15
14
  export default meta;
16
15
  type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
17
16
 
18
- export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
17
+ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args: any) => {
19
18
 
20
19
  const props = {
21
20
  value: configProps.value,
@@ -1,4 +1,4 @@
1
- const handleEvent = (actions: any, eventType: string, propName: string, value: string) => {
1
+ const handleEvent = (actions: any, eventType: string, propName: string, value: string | number) => {
2
2
  switch (eventType) {
3
3
  case 'change':
4
4
  actions.updateFieldValue(propName, value);
@@ -112,21 +112,17 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
112
112
 
113
113
  useEffect(() => {
114
114
  if (displayAs === 'slider' && value === '') {
115
- // @ts-ignore
116
115
  handleEvent(actions, 'change', propName, sliderDefaultValue);
117
116
  }
118
117
  }, [actions, displayAs, propName, sliderDefaultValue, value]);
119
118
 
120
119
  const { decimalPrecision, currencyDecimalPrecision = 'auto', currencyISOCode = 'USD' } = props;
121
- let noOfDecimals = parseInt(decimalPrecision, 10);
122
- // @ts-ignore
120
+ let noOfDecimals : number | undefined = parseInt(decimalPrecision, 10);
123
121
  if (Number.isNaN(noOfDecimals)) noOfDecimals = undefined;
124
122
  let noOfFractionDigits = currencyDecimalPrecision === 'auto' ? undefined : parseInt(currencyDecimalPrecision, 10);
125
123
  let unit;
126
- let unitPlacement;
127
124
 
128
- // @ts-ignore
129
- if (['LABELS_LEFT', 'STACKED_LARGE_VAL', 'DISPLAY_ONLY'].includes(displayMode)) {
125
+ if (['LABELS_LEFT', 'STACKED_LARGE_VAL', 'DISPLAY_ONLY'].includes(displayMode as string)) {
130
126
  switch (formatter) {
131
127
  case 'Decimal': {
132
128
  break;
@@ -134,7 +130,6 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
134
130
  case 'Percentage': {
135
131
  showGroupSeparators = false;
136
132
  unit = '%';
137
- unitPlacement = 'after';
138
133
  break;
139
134
  }
140
135
  case 'Decimal-Auto': {
@@ -180,7 +175,6 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
180
175
  notation
181
176
  }}
182
177
  unit={unit}
183
- unitPlacement={unitPlacement}
184
178
  />
185
179
  );
186
180
 
@@ -233,13 +227,11 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
233
227
  setIntegerValue(enteredValue);
234
228
  // const parsedValue = integerValue !== '' ? Number(integerValue) : '';
235
229
  if (value !== (enteredValue !== '' ? Number(enteredValue) : '')) {
236
- // @ts-ignore
237
230
  handleEvent(actions, 'change', propName, enteredValue !== '' ? Number(enteredValue) : '');
238
231
  hasValueChange.current = true;
239
232
  }
240
233
  // In case of stepper variation there is no blur event as component is never focussed unless forced. Need to update redux on change.
241
234
  if (displayAs === 'stepper') {
242
- // @ts-ignore
243
235
  handleEvent(actions, 'changeNblur', propName, enteredValue !== '' ? Number(enteredValue) : '');
244
236
  }
245
237
  }
@@ -271,7 +263,6 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
271
263
  ticks={showTicks && { [min]: `${min}`, [max]: `${max}` }}
272
264
  onChange={(selectedValue) => {
273
265
  onChangeHandler(selectedValue.toString());
274
- // @ts-ignore
275
266
  handleEvent(actions, 'changeNblur', propName, selectedValue);
276
267
  }}
277
268
  />
@@ -298,7 +289,6 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
298
289
  }}
299
290
  onBlur={() => {
300
291
  if (!readOnly && (hasValueChange.current || !value)) {
301
- // @ts-ignore
302
292
  handleEvent(actions, 'blur', propName, integerValue !== '' ? Number(integerValue) : '');
303
293
  if (hasSuggestions) {
304
294
  pConn.ignoreSuggestion('');
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  export const configProps = {
3
2
  value: '',
4
3
  label: 'Integer Sample',
@@ -12,7 +11,9 @@ export const configProps = {
12
11
  required: false,
13
12
  disabled: false,
14
13
  status: '',
15
- validatemessage: ''
14
+ validatemessage: '',
15
+ placeholder: '',
16
+ variant: ''
16
17
  };
17
18
 
18
19
  export const stateProps = {
@@ -1,12 +1,13 @@
1
1
  /* eslint-disable react/no-array-index-key */
2
2
  import { useState, useEffect } from 'react';
3
- import { Checkbox, FormControl, FormControlLabel, FormGroup, FormHelperText, FormLabel } from '@material-ui/core';
3
+ import { Checkbox, FormControl, FormControlLabel, FormGroup, FormHelperText, FormLabel } from '@mui/material';
4
+ import makeStyles from '@mui/styles/makeStyles';
4
5
 
5
6
  import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
6
7
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
7
8
  import { insertInstruction, deleteInstruction, updateNewInstuctions } from '@pega/react-sdk-components/lib/components/helpers/instructions-utils';
8
9
  import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
9
- import { makeStyles } from '@material-ui/core/styles';
10
+
10
11
  import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
11
12
 
12
13
  interface {{COMPONENT_CLASS_NAME}}Props extends Omit<PConnFieldProps, 'value'> {
@@ -81,7 +82,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
81
82
  }
82
83
  }, [thePConn]);
83
84
 
84
- if (displayMode === 'LABELS_LEFT') {
85
+ if (displayMode === 'DISPLAY_ONLY') {
85
86
  return <FieldValueList name={hideLabel ? '' : caption} value={value ? trueLabel : falseLabel} />;
86
87
  }
87
88
 
@@ -166,7 +167,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
166
167
 
167
168
  return (
168
169
  <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
169
- <FormControl required={required} error={status === 'error'}>
170
+ <FormControl variant='standard' required={required} error={status === 'error'}>
170
171
  {!hideLabel && <FormLabel component='legend'>{label}</FormLabel>}
171
172
  <FormGroup>{theCheckbox}</FormGroup>
172
173
  <FormHelperText>{helperTextToDisplay}</FormHelperText>
@@ -1,10 +1,15 @@
1
- import { KeyboardDatePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';
2
- import DayjsUtils from '@date-io/dayjs';
1
+ import { useState } from 'react';
2
+ import { DatePicker } from '@mui/x-date-pickers/DatePicker';
3
+ import { LocalizationProvider } from '@mui/x-date-pickers';
4
+ import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
5
+ import dayjs, { Dayjs } from 'dayjs';
6
+
3
7
  import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
4
8
  import { format } from '@pega/react-sdk-components/lib/components/helpers/formatters';
5
9
  import { dateFormatInfoDefault, getDateFormatInfo } from '@pega/react-sdk-components/lib/components/helpers/date-format-utils';
6
10
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
7
11
  import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
12
+
8
13
  import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
9
14
 
10
15
  // Will return the date string in YYYY-MM-DD format which we'll be POSTing to the server
@@ -24,22 +29,9 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
24
29
  const TextInput = getComponentFromMap('TextInput');
25
30
  const FieldValueList = getComponentFromMap('FieldValueList');
26
31
 
27
- const {
28
- getPConnect,
29
- label,
30
- required,
31
- disabled,
32
- value = '',
33
- validatemessage,
34
- status,
35
- onChange,
36
- onBlur,
37
- readOnly,
38
- testId,
39
- helperText,
40
- displayMode,
41
- hideLabel
42
- } = props;
32
+ const { getPConnect, label, required, disabled, value, validatemessage, status, readOnly, testId, helperText, displayMode, hideLabel } = props;
33
+
34
+ const [dateValue, setDateValue] = useState<Dayjs | null>(value ? dayjs(value) : null);
43
35
 
44
36
  const pConn = getPConnect();
45
37
  const actions = pConn.getActionsApi();
@@ -54,7 +46,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
54
46
  dateFormatInfo.dateFormatStringLC = theDateFormat.dateFormatStringLC;
55
47
  dateFormatInfo.dateFormatMask = theDateFormat.dateFormatMask;
56
48
 
57
- if (displayMode === 'LABELS_LEFT') {
49
+ if (displayMode === 'DISPLAY_ONLY') {
58
50
  const formattedDate = format(props.value, 'date', {
59
51
  format: dateFormatInfo.dateFormatString
60
52
  });
@@ -81,44 +73,36 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
81
73
 
82
74
  const handleChange = date => {
83
75
  if (date && date.isValid()) {
84
- onChange({ value: getFormattedDate(date) });
85
- }
86
- };
87
-
88
- const handleAccept = date => {
89
- if (date && date.isValid()) {
76
+ setDateValue(date);
90
77
  handleEvent(actions, 'changeNblur', propName, getFormattedDate(date));
91
78
  }
92
79
  };
93
80
 
94
81
  return (
95
82
  <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
96
- <MuiPickersUtilsProvider utils={DayjsUtils}>
97
- <KeyboardDatePicker
98
- disableToolbar
99
- variant='inline'
100
- inputVariant='outlined'
101
- placeholder={dateFormatInfo.dateFormatStringLC}
102
- format={dateFormatInfo.dateFormatString}
103
- mask={dateFormatInfo.dateFormatMask}
104
- fullWidth
105
- autoOk
106
- required={required}
107
- disabled={disabled}
108
- error={status === 'error'}
109
- helperText={helperTextToDisplay}
110
- size='small'
83
+ <LocalizationProvider dateAdapter={AdapterDayjs}>
84
+ <DatePicker
111
85
  label={label}
112
- value={value || null}
86
+ disabled={disabled}
87
+ format={dateFormatInfo.dateFormatString}
88
+ value={dateValue}
89
+ {{! pick new delimiters for mustache }}
90
+ {{=<% %>=}}
91
+ slotProps={{
92
+ textField: {
93
+ required,
94
+ variant: 'outlined',
95
+ placeholder: dateFormatInfo.dateFormatStringLC,
96
+ error: status === 'error',
97
+ helperText: helperTextToDisplay,
98
+ size: 'small',
99
+ InputProps: { ...testProp }
100
+ }
101
+ }}
102
+ <%={{ }}=%> {{! revert delimiters for mustache }}
113
103
  onChange={handleChange}
114
- onBlur={!readOnly ? onBlur : undefined}
115
- onAccept={handleAccept}
116
- {{! pick new delimiters for mustache }}
117
- {{=<% %>=}}
118
- InputProps={{ ...testProp }}
119
- <%={{ }}=%> {{! revert delimiters for mustache }}
120
104
  />
121
- </MuiPickersUtilsProvider>
105
+ </LocalizationProvider>
122
106
  </Styled{{COMPONENT_CLASS_NAME}}Wrapper>
123
107
  );
124
108
  }
@@ -1,7 +1,11 @@
1
- import { KeyboardDateTimePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';
2
- import DayjsUtils from '@date-io/dayjs';
1
+ import { useState } from 'react';
2
+ import { DateTimePicker } from '@mui/x-date-pickers/DateTimePicker';
3
+ import { LocalizationProvider } from '@mui/x-date-pickers';
4
+ import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
5
+ import dayjs, { Dayjs } from 'dayjs';
6
+
3
7
  import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
4
- import { format } from '@pega/react-sdk-components/lib/components/helpers/formatters/';
8
+ import { format } from '@pega/react-sdk-components/lib/components/helpers/formatters';
5
9
  import { dateFormatInfoDefault, getDateFormatInfo } from '@pega/react-sdk-components/lib/components/helpers/date-format-utils';
6
10
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
7
11
  import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
@@ -20,21 +24,9 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
20
24
  const TextInput = getComponentFromMap('TextInput');
21
25
  const FieldValueList = getComponentFromMap('FieldValueList');
22
26
 
23
- const {
24
- getPConnect,
25
- label,
26
- required,
27
- disabled,
28
- value = '',
29
- validatemessage,
30
- status,
31
- onChange,
32
- readOnly,
33
- testId,
34
- helperText,
35
- displayMode,
36
- hideLabel
37
- } = props;
27
+ const { getPConnect, label, required, disabled, value = '', validatemessage, status, readOnly, testId, helperText, displayMode, hideLabel } = props;
28
+
29
+ const [dateValue, setDateValue] = useState<Dayjs | null>(value ? dayjs(value) : null);
38
30
 
39
31
  const pConn = getPConnect();
40
32
  const actions = pConn.getActionsApi();
@@ -49,7 +41,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
49
41
  dateFormatInfo.dateFormatStringLC = theDateFormat.dateFormatStringLC;
50
42
  dateFormatInfo.dateFormatMask = theDateFormat.dateFormatMask;
51
43
 
52
- if (displayMode === 'LABELS_LEFT') {
44
+ if (displayMode === 'DISPLAY_ONLY') {
53
45
  const formattedDateTime = format(props.value, 'datetime', {
54
46
  format: `${dateFormatInfo.dateFormatString} hh:mm a`
55
47
  });
@@ -68,12 +60,14 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
68
60
  return <TextInput {...props} value={formattedDateTime} />;
69
61
  }
70
62
 
71
- const handleChange = date => {
72
- const changeValue = date && date.isValid() ? date.toISOString() : null;
73
- onChange({ value: changeValue });
63
+ let testProp = {};
64
+
65
+ testProp = {
66
+ 'data-test-id': testId
74
67
  };
75
68
 
76
- const handleAccept = date => {
69
+ const handleChange = date => {
70
+ setDateValue(date);
77
71
  const changeValue = date && date.isValid() ? date.toISOString() : null;
78
72
  handleEvent(actions, 'changeNblur', propName, changeValue);
79
73
  };
@@ -85,28 +79,34 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
85
79
 
86
80
  return (
87
81
  <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
88
- <MuiPickersUtilsProvider utils={DayjsUtils}>
89
- <KeyboardDateTimePicker
90
- variant='inline'
91
- inputVariant='outlined'
92
- fullWidth
93
- autoOk
94
- required={required}
82
+ <LocalizationProvider dateAdapter={AdapterDayjs}>
83
+ <DateTimePicker
84
+ // fullWidth
85
+ // autoOk
95
86
  disabled={disabled}
96
- placeholder={`${dateFormatInfo.dateFormatStringLC} hh:mm a`}
97
87
  format={`${dateFormatInfo.dateFormatString} hh:mm a`}
98
- mask={`${dateFormatInfo.dateFormatMask} __:__ _m`}
88
+ // mask={`${dateFormatInfo.dateFormatMask} __:__ _m`}
99
89
  minutesStep={5}
100
- error={status === 'error'}
101
- helperText={helperTextToDisplay}
102
- size='small'
103
90
  label={label}
104
- value={value || null}
91
+ value={dateValue}
105
92
  onChange={handleChange}
106
- onAccept={handleAccept}
107
93
  data-test-id={testId}
94
+ {{! pick new delimiters for mustache }}
95
+ {{=<% %>=}}
96
+ slotProps={{
97
+ textField: {
98
+ variant: 'outlined',
99
+ required,
100
+ placeholder: `${dateFormatInfo.dateFormatStringLC} hh:mm a`,
101
+ error: status === 'error',
102
+ helperText: helperTextToDisplay,
103
+ size: 'small',
104
+ InputProps: { ...testProp }
105
+ }
106
+ }}
107
+ <%={{ }}=%> {{! revert delimiters for mustache }}
108
108
  />
109
- </MuiPickersUtilsProvider>
109
+ </LocalizationProvider>
110
110
  </Styled{{COMPONENT_CLASS_NAME}}Wrapper>
111
111
  );
112
112
  }
@@ -1,11 +1,12 @@
1
- import { TextField } from '@material-ui/core';
2
1
  import { NumericFormat } from 'react-number-format';
2
+ import { TextField } from '@mui/material';
3
3
  import { useState } from 'react';
4
- import { getCurrencyCharacters, getCurrencyOptions } from '@pega/react-sdk-components/lib/components/field/Currency/currency-utils.js';
4
+ import { getCurrencyCharacters, getCurrencyOptions } from '@pega/react-sdk-components/lib/components/field/Currency/currency-utils';
5
5
  import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
6
6
  import { format } from '@pega/react-sdk-components/lib/components/helpers/formatters';
7
7
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
8
8
  import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
9
+
9
10
  import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
10
11
 
11
12
  /* Using react-number-format component here, since it allows formatting decimal values,
@@ -75,7 +76,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
75
76
  formattedValue = format(value, pConn.getComponentName().toLowerCase(), theCurrencyOptions);
76
77
  }
77
78
 
78
- if (displayMode === 'LABELS_LEFT') {
79
+ if (displayMode === 'DISPLAY_ONLY') {
79
80
  return <FieldValueList name={hideLabel ? '' : label} value={formattedValue} />;
80
81
  }
81
82
 
@@ -98,7 +99,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
98
99
  return (
99
100
  <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
100
101
  <NumericFormat
101
- valueIsNumericString
102
+ valueIsNumericString
102
103
  fullWidth
103
104
  variant={readOnly ? 'standard' : 'outlined'}
104
105
  helperText={helperTextToDisplay}
@@ -1,11 +1,12 @@
1
- import { TextField } from '@material-ui/core';
2
1
  import { useState } from 'react';
3
2
  import { NumericFormat } from 'react-number-format';
3
+ import { TextField } from '@mui/material';
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';
6
6
  import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
7
7
  import { format } from '@pega/react-sdk-components/lib/components/helpers/formatters';
8
8
  import { getCurrencyCharacters, getCurrencyOptions } from '@pega/react-sdk-components/lib/components/field/Currency/currency-utils.js';
9
+
9
10
  import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
10
11
 
11
12
  /* Using react-number-format component here, since it allows formatting decimal values,
@@ -72,7 +73,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
72
73
  let currencyProp = {};
73
74
  currencyProp = { prefix: theCurrSym, decimalSeparator: theCurrDec, thousandSeparator: theCurrSep };
74
75
 
75
- if (displayMode === 'LABELS_LEFT') {
76
+ if (displayMode === 'DISPLAY_ONLY') {
76
77
  return <FieldValueList name={hideLabel ? '' : label} value={formattedValue} />;
77
78
  }
78
79
 
@@ -1,11 +1,12 @@
1
- import { TextField } from '@material-ui/core';
2
- import { NumericFormat } from 'react-number-format';
3
1
  import { useState } from 'react';
2
+ import { NumericFormat } from 'react-number-format';
3
+ import { TextField } from '@mui/material';
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';
6
- import { getCurrencyCharacters, getCurrencyOptions } from '@pega/react-sdk-components/lib/components/field/Currency/currency-utils.js';
6
+ import { getCurrencyCharacters, getCurrencyOptions } from '@pega/react-sdk-components/lib/components/field/Currency/currency-utils';
7
7
  import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
8
8
  import { format } from '@pega/react-sdk-components/lib/components/helpers/formatters';
9
+
9
10
  import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
10
11
 
11
12
  /* Using react-number-format component here, since it allows formatting decimal values,
@@ -61,7 +62,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
61
62
  readOnlyProp = { readOnly: true };
62
63
  }
63
64
 
64
- if (displayMode === 'LABELS_LEFT') {
65
+ if (displayMode === 'DISPLAY_ONLY') {
65
66
  return <FieldValueList name={hideLabel ? '' : label} value={formattedValue} />;
66
67
  }
67
68
 
@@ -1,12 +1,12 @@
1
1
  import { useEffect, useState } from 'react';
2
- import { Tooltip, IconButton, Link } from '@material-ui/core';
3
- import Table from '@material-ui/core/Table';
4
- import TableBody from '@material-ui/core/TableBody';
5
- import TableCell from '@material-ui/core/TableCell';
6
- import TableContainer from '@material-ui/core/TableContainer';
7
- import TableHead from '@material-ui/core/TableHead';
8
- import TableRow from '@material-ui/core/TableRow';
9
- import Paper from '@material-ui/core/Paper';
2
+ import { Tooltip, IconButton, Link } from '@mui/material';
3
+ import Table from '@mui/material/Table';
4
+ import TableBody from '@mui/material/TableBody';
5
+ import TableCell from '@mui/material/TableCell';
6
+ import TableContainer from '@mui/material/TableContainer';
7
+ import TableHead from '@mui/material/TableHead';
8
+ import TableRow from '@mui/material/TableRow';
9
+ import Paper from '@mui/material/Paper';
10
10
 
11
11
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
12
12
  import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
@@ -14,9 +14,9 @@ import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
14
14
 
15
15
  // IMPORTANT
16
16
  // import LanguageIcon from '@mui/icons-material/Language';
17
- import ArrowForwardIcon from '@material-ui/icons/ArrowForward';
18
- import LanguageIcon from '@material-ui/icons/Language';
19
- import FormatListNumberedIcon from '@material-ui/icons/FormatListNumbered';
17
+ import ArrowForwardIcon from '@mui/icons-material/ArrowForward';
18
+ import LanguageIcon from '@mui/icons-material/Language';
19
+ import FormatListNumberedIcon from '@mui/icons-material/FormatListNumbered';
20
20
 
21
21
  interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
22
22
  // If any, enter additional props that only exist on this componentName
@@ -117,7 +117,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
117
117
  <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
118
118
  {{! pick new delimiters for mustache }}
119
119
  {{=<% %>=}}
120
- <div style={{ display: 'flex' }} data-testid={testId}>
120
+ <div style={{ display: 'flex', alignItems: 'center' }} data-testid={testId}>
121
121
  <ArrowForwardIcon />
122
122
  <TextContent displayAs='body' content={localLabel} />
123
123
  <Tooltip title={PConnect.getLocalizedValue('Click to show/hide state list', '', '')}>
@@ -127,7 +127,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
127
127
  </Tooltip>
128
128
  {
129
129
  // eslint-disable-next-line jsx-a11y/control-has-associated-label
130
- <a href={validUrl} style={{ padding: '0 0.25rem' }}>
130
+ <a href={validUrl} style={{ display: 'flex' }}>
131
131
  <LanguageIcon />
132
132
  </a>
133
133
  }