@pega/react-sdk-components 23.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 (432) hide show
  1. package/lib/bridge/react_pconnect.d.ts.map +1 -1
  2. package/lib/bridge/react_pconnect.js +137 -140
  3. package/lib/bridge/react_pconnect.js.map +1 -1
  4. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts +1 -2
  5. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts.map +1 -1
  6. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js +1 -1
  7. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.map +1 -1
  8. package/lib/components/designSystemExtension/Banner/Banner.d.ts +1 -2
  9. package/lib/components/designSystemExtension/Banner/Banner.d.ts.map +1 -1
  10. package/lib/components/designSystemExtension/Banner/Banner.js +1 -1
  11. package/lib/components/designSystemExtension/Banner/Banner.js.map +1 -1
  12. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
  13. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts +1 -2
  14. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
  15. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +13 -13
  16. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
  17. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts +1 -2
  18. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts.map +1 -1
  19. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +4 -4
  20. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
  21. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts +1 -1
  22. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
  23. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +4 -4
  24. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
  25. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts +1 -2
  26. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts.map +1 -1
  27. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js +4 -4
  28. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
  29. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts +1 -2
  30. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts.map +1 -1
  31. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +5 -5
  32. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
  33. package/lib/components/designSystemExtension/Operator/Operator.d.ts +1 -2
  34. package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
  35. package/lib/components/designSystemExtension/Operator/Operator.js +6 -6
  36. package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
  37. package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +1 -1
  38. package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
  39. package/lib/components/designSystemExtension/Pulse/Pulse.js +2 -2
  40. package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
  41. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -1
  42. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +3 -2
  43. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -1
  44. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts +1 -2
  45. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts.map +1 -1
  46. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js +1 -1
  47. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
  48. package/lib/components/field/AutoComplete/AutoComplete.d.ts +1 -2
  49. package/lib/components/field/AutoComplete/AutoComplete.d.ts.map +1 -1
  50. package/lib/components/field/AutoComplete/AutoComplete.js +4 -4
  51. package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
  52. package/lib/components/field/CancelAlert/CancelAlert.d.ts +1 -2
  53. package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
  54. package/lib/components/field/CancelAlert/CancelAlert.js +4 -2
  55. package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
  56. package/lib/components/field/Checkbox/Checkbox.d.ts +1 -2
  57. package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
  58. package/lib/components/field/Checkbox/Checkbox.js +4 -4
  59. package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
  60. package/lib/components/field/Currency/Currency.d.ts +2 -2
  61. package/lib/components/field/Currency/Currency.d.ts.map +1 -1
  62. package/lib/components/field/Currency/Currency.js +20 -9
  63. package/lib/components/field/Currency/Currency.js.map +1 -1
  64. package/lib/components/field/Date/Date.d.ts +1 -2
  65. package/lib/components/field/Date/Date.d.ts.map +1 -1
  66. package/lib/components/field/Date/Date.js +18 -9
  67. package/lib/components/field/Date/Date.js.map +1 -1
  68. package/lib/components/field/DateTime/DateTime.d.ts +1 -2
  69. package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
  70. package/lib/components/field/DateTime/DateTime.js +30 -8
  71. package/lib/components/field/DateTime/DateTime.js.map +1 -1
  72. package/lib/components/field/Decimal/Decimal.d.ts +2 -3
  73. package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
  74. package/lib/components/field/Decimal/Decimal.js +18 -6
  75. package/lib/components/field/Decimal/Decimal.js.map +1 -1
  76. package/lib/components/field/Dropdown/Dropdown.d.ts +1 -2
  77. package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
  78. package/lib/components/field/Dropdown/Dropdown.js +3 -3
  79. package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
  80. package/lib/components/field/Email/Email.d.ts +1 -2
  81. package/lib/components/field/Email/Email.d.ts.map +1 -1
  82. package/lib/components/field/Email/Email.js +21 -5
  83. package/lib/components/field/Email/Email.js.map +1 -1
  84. package/lib/components/field/Group/Group.d.ts +1 -1
  85. package/lib/components/field/Group/Group.d.ts.map +1 -1
  86. package/lib/components/field/Group/Group.js +2 -2
  87. package/lib/components/field/Group/Group.js.map +1 -1
  88. package/lib/components/field/Integer/Integer.d.ts +1 -2
  89. package/lib/components/field/Integer/Integer.d.ts.map +1 -1
  90. package/lib/components/field/Integer/Integer.js +17 -6
  91. package/lib/components/field/Integer/Integer.js.map +1 -1
  92. package/lib/components/field/Multiselect/Multiselect.d.ts +2 -0
  93. package/lib/components/field/Multiselect/Multiselect.d.ts.map +1 -0
  94. package/lib/components/field/{MultiSelect → Multiselect}/Multiselect.js +12 -8
  95. package/lib/components/field/Multiselect/Multiselect.js.map +1 -0
  96. package/lib/components/field/Multiselect/index.d.ts.map +1 -0
  97. package/lib/components/field/{MultiSelect → Multiselect}/index.js.map +1 -1
  98. package/lib/components/field/{MultiSelect → Multiselect}/utils.d.ts.map +1 -1
  99. package/lib/components/field/{MultiSelect → Multiselect}/utils.js.map +1 -1
  100. package/lib/components/field/Percentage/Percentage.d.ts +3 -2
  101. package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
  102. package/lib/components/field/Percentage/Percentage.js +18 -9
  103. package/lib/components/field/Percentage/Percentage.js.map +1 -1
  104. package/lib/components/field/Phone/Phone.d.ts +1 -2
  105. package/lib/components/field/Phone/Phone.d.ts.map +1 -1
  106. package/lib/components/field/Phone/Phone.js +16 -10
  107. package/lib/components/field/Phone/Phone.js.map +1 -1
  108. package/lib/components/field/RadioButtons/RadioButtons.d.ts +1 -2
  109. package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
  110. package/lib/components/field/RadioButtons/RadioButtons.js +3 -3
  111. package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
  112. package/lib/components/field/RichText/RichText.js +1 -1
  113. package/lib/components/field/RichText/RichText.js.map +1 -1
  114. package/lib/components/field/ScalarList/ScalarList.d.ts +1 -2
  115. package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -1
  116. package/lib/components/field/ScalarList/ScalarList.js +4 -2
  117. package/lib/components/field/ScalarList/ScalarList.js.map +1 -1
  118. package/lib/components/field/SemanticLink/SemanticLink.d.ts +1 -2
  119. package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
  120. package/lib/components/field/SemanticLink/SemanticLink.js +4 -4
  121. package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
  122. package/lib/components/field/TextArea/TextArea.d.ts +1 -2
  123. package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
  124. package/lib/components/field/TextArea/TextArea.js +20 -4
  125. package/lib/components/field/TextArea/TextArea.js.map +1 -1
  126. package/lib/components/field/TextContent/TextContent.d.ts +1 -2
  127. package/lib/components/field/TextContent/TextContent.d.ts.map +1 -1
  128. package/lib/components/field/TextContent/TextContent.js +1 -1
  129. package/lib/components/field/TextContent/TextContent.js.map +1 -1
  130. package/lib/components/field/TextInput/TextInput.d.ts +1 -2
  131. package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
  132. package/lib/components/field/TextInput/TextInput.js +2 -2
  133. package/lib/components/field/TextInput/TextInput.js.map +1 -1
  134. package/lib/components/field/Time/Time.d.ts +1 -2
  135. package/lib/components/field/Time/Time.d.ts.map +1 -1
  136. package/lib/components/field/Time/Time.js +30 -7
  137. package/lib/components/field/Time/Time.js.map +1 -1
  138. package/lib/components/field/URL/URL.d.ts +1 -2
  139. package/lib/components/field/URL/URL.d.ts.map +1 -1
  140. package/lib/components/field/URL/URL.js +19 -4
  141. package/lib/components/field/URL/URL.js.map +1 -1
  142. package/lib/components/field/UserReference/UserReference.d.ts +1 -0
  143. package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
  144. package/lib/components/field/UserReference/UserReference.js +9 -2
  145. package/lib/components/field/UserReference/UserReference.js.map +1 -1
  146. package/lib/components/helpers/common-utils.d.ts +0 -1
  147. package/lib/components/helpers/common-utils.d.ts.map +1 -1
  148. package/lib/components/helpers/common-utils.js +1 -4
  149. package/lib/components/helpers/common-utils.js.map +1 -1
  150. package/lib/components/helpers/field-group-utils.js +2 -2
  151. package/lib/components/helpers/field-group-utils.js.map +1 -1
  152. package/lib/components/helpers/formatters/common.d.ts +2 -2
  153. package/lib/components/helpers/formatters/common.d.ts.map +1 -1
  154. package/lib/components/helpers/simpleTableHelpers.js +1 -1
  155. package/lib/components/helpers/simpleTableHelpers.js.map +1 -1
  156. package/lib/components/helpers/state-utils.d.ts +1 -2
  157. package/lib/components/helpers/state-utils.d.ts.map +1 -1
  158. package/lib/components/infra/ActionButtons/ActionButtons.d.ts +1 -2
  159. package/lib/components/infra/ActionButtons/ActionButtons.d.ts.map +1 -1
  160. package/lib/components/infra/ActionButtons/ActionButtons.js +3 -3
  161. package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
  162. package/lib/components/infra/Assignment/Assignment.d.ts +1 -1
  163. package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
  164. package/lib/components/infra/Assignment/Assignment.js +30 -6
  165. package/lib/components/infra/Assignment/Assignment.js.map +1 -1
  166. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +1 -1
  167. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
  168. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +2 -2
  169. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
  170. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +9 -7
  171. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
  172. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts +1 -2
  173. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts.map +1 -1
  174. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js +7 -4
  175. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js.map +1 -1
  176. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +1 -2
  177. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
  178. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +7 -7
  179. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
  180. package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts +3 -3
  181. package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts.map +1 -1
  182. package/lib/components/infra/Containers/SimpleView/helper.d.ts +3 -3
  183. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +1 -2
  184. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
  185. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +1 -1
  186. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
  187. package/lib/components/infra/Containers/helpers.d.ts +1 -1
  188. package/lib/components/infra/Containers/helpers.d.ts.map +1 -1
  189. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +1 -1
  190. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
  191. package/lib/components/infra/DashboardFilter/DashboardFilter.js +2 -2
  192. package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
  193. package/lib/components/infra/DashboardFilter/filterUtils.d.ts +1 -2
  194. package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -1
  195. package/lib/components/infra/DashboardFilter/filterUtils.js +2 -2
  196. package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
  197. package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
  198. package/lib/components/infra/DeferLoad/DeferLoad.js +8 -4
  199. package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
  200. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +1 -2
  201. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
  202. package/lib/components/infra/MultiStep/MultiStep.d.ts +2 -2
  203. package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
  204. package/lib/components/infra/MultiStep/MultiStep.js +11 -6
  205. package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
  206. package/lib/components/infra/NavBar/NavBar.css +1 -0
  207. package/lib/components/infra/NavBar/NavBar.d.ts +1 -2
  208. package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
  209. package/lib/components/infra/NavBar/NavBar.js +24 -16
  210. package/lib/components/infra/NavBar/NavBar.js.map +1 -1
  211. package/lib/components/infra/Reference/Reference.d.ts +1 -2
  212. package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
  213. package/lib/components/infra/Region/Region.d.ts +1 -1
  214. package/lib/components/infra/Region/Region.d.ts.map +1 -1
  215. package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
  216. package/lib/components/infra/RootContainer/RootContainer.js +5 -6
  217. package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
  218. package/lib/components/infra/Stages/Stages.d.ts +1 -2
  219. package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
  220. package/lib/components/infra/Stages/Stages.js +4 -4
  221. package/lib/components/infra/Stages/Stages.js.map +1 -1
  222. package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.d.ts.map +1 -1
  223. package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js +4 -3
  224. package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js.map +1 -1
  225. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts +1 -2
  226. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts.map +1 -1
  227. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +2 -2
  228. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
  229. package/lib/components/infra/View/View.d.ts +2 -1
  230. package/lib/components/infra/View/View.d.ts.map +1 -1
  231. package/lib/components/infra/View/View.js +32 -2
  232. package/lib/components/infra/View/View.js.map +1 -1
  233. package/lib/components/template/AppShell/AppShell.d.ts +3 -1
  234. package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
  235. package/lib/components/template/AppShell/AppShell.js +29 -6
  236. package/lib/components/template/AppShell/AppShell.js.map +1 -1
  237. package/lib/components/template/BannerPage/BannerPage.d.ts +1 -1
  238. package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
  239. package/lib/components/template/CaseSummary/CaseSummary.d.ts +1 -1
  240. package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
  241. package/lib/components/template/CaseView/CaseView.d.ts +1 -1
  242. package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
  243. package/lib/components/template/CaseView/CaseView.js +7 -7
  244. package/lib/components/template/CaseView/CaseView.js.map +1 -1
  245. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +1 -2
  246. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
  247. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +7 -7
  248. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
  249. package/lib/components/template/Confirmation/Confirmation.d.ts +1 -1
  250. package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
  251. package/lib/components/template/Confirmation/Confirmation.js +2 -1
  252. package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
  253. package/lib/components/template/DataReference/DataReference.d.ts +1 -1
  254. package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
  255. package/lib/components/template/DataReference/DataReference.js +3 -3
  256. package/lib/components/template/DataReference/DataReference.js.map +1 -1
  257. package/lib/components/template/DefaultForm/DefaultForm.d.ts +1 -1
  258. package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
  259. package/lib/components/template/DefaultForm/utils/index.d.ts.map +1 -1
  260. package/lib/components/template/DefaultForm/utils/index.js +2 -6
  261. package/lib/components/template/DefaultForm/utils/index.js.map +1 -1
  262. package/lib/components/template/Details/Details/Details.d.ts +1 -2
  263. package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
  264. package/lib/components/template/Details/Details/Details.js +3 -3
  265. package/lib/components/template/Details/Details/Details.js.map +1 -1
  266. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +1 -1
  267. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
  268. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js +3 -3
  269. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
  270. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +1 -2
  271. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
  272. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +3 -3
  273. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
  274. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +1 -2
  275. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
  276. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +3 -3
  277. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
  278. package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts +1 -2
  279. package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts.map +1 -1
  280. package/lib/components/template/Details/DynamicTabs/DynamicTabs.js +4 -3
  281. package/lib/components/template/Details/DynamicTabs/DynamicTabs.js.map +1 -1
  282. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +1 -2
  283. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
  284. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +11 -3
  285. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
  286. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +1 -1
  287. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
  288. package/lib/components/template/InlineDashboard/InlineDashboard.js +2 -2
  289. package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
  290. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +1 -1
  291. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
  292. package/lib/components/template/ListPage/ListPage.d.ts +1 -2
  293. package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
  294. package/lib/components/template/ListView/ListView.d.ts +1 -2
  295. package/lib/components/template/ListView/ListView.d.ts.map +1 -1
  296. package/lib/components/template/ListView/ListView.js +62 -67
  297. package/lib/components/template/ListView/ListView.js.map +1 -1
  298. package/lib/components/template/ListView/utils.js +1 -1
  299. package/lib/components/template/ListView/utils.js.map +1 -1
  300. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +1 -2
  301. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
  302. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js +1 -1
  303. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -1
  304. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +1 -1
  305. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -1
  306. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +1 -2
  307. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
  308. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +3 -3
  309. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
  310. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +1 -1
  311. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -1
  312. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +1 -1
  313. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
  314. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +1 -1
  315. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
  316. package/lib/components/template/OneColumn/OneColumn/OneColumn.js +2 -2
  317. package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
  318. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +1 -2
  319. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
  320. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +1 -1
  321. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
  322. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +1 -2
  323. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
  324. package/lib/components/template/PromotedFilters/PromotedFilters.js +2 -1
  325. package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
  326. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts +1 -2
  327. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
  328. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +1 -1
  329. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
  330. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +36 -24
  331. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
  332. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +1 -2
  333. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
  334. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +1 -2
  335. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
  336. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js +1 -1
  337. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
  338. package/lib/components/template/SubTabs/SubTabs.d.ts +1 -1
  339. package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
  340. package/lib/components/template/SubTabs/SubTabs.js +2 -2
  341. package/lib/components/template/SubTabs/SubTabs.js.map +1 -1
  342. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts +1 -1
  343. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
  344. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +2 -2
  345. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
  346. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +1 -2
  347. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
  348. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +1 -1
  349. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
  350. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +2 -2
  351. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
  352. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +1 -1
  353. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
  354. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +1 -2
  355. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
  356. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +3 -3
  357. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
  358. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +1 -1
  359. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -1
  360. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +1 -1
  361. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
  362. package/lib/components/template/WssNavBar/WssNavBar.d.ts +1 -2
  363. package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -1
  364. package/lib/components/template/WssNavBar/WssNavBar.js +9 -9
  365. package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
  366. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts +1 -2
  367. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
  368. package/lib/components/widget/AppAnnouncement/AppAnnouncement.js +2 -2
  369. package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
  370. package/lib/components/widget/Attachment/Attachment.d.ts +1 -2
  371. package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
  372. package/lib/components/widget/Attachment/Attachment.js +8 -5
  373. package/lib/components/widget/Attachment/Attachment.js.map +1 -1
  374. package/lib/components/widget/CaseHistory/CaseHistory.d.ts +1 -2
  375. package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
  376. package/lib/components/widget/CaseHistory/CaseHistory.js +8 -7
  377. package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
  378. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +1 -2
  379. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts.map +1 -1
  380. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js +1 -1
  381. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
  382. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +1 -2
  383. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
  384. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +4 -4
  385. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
  386. package/lib/components/widget/Followers/Followers.d.ts +1 -1
  387. package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
  388. package/lib/components/widget/Followers/Followers.js +2 -2
  389. package/lib/components/widget/Followers/Followers.js.map +1 -1
  390. package/lib/components/widget/QuickCreate/QuickCreate.d.ts +1 -2
  391. package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
  392. package/lib/components/widget/QuickCreate/QuickCreate.js +1 -0
  393. package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
  394. package/lib/components/widget/SummaryItem/SummaryItem.d.ts +1 -2
  395. package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
  396. package/lib/components/widget/SummaryItem/SummaryItem.js +3 -3
  397. package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
  398. package/lib/components/widget/SummaryList/SummaryList.d.ts +1 -2
  399. package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
  400. package/lib/components/widget/ToDo/ToDo.d.ts +1 -2
  401. package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
  402. package/lib/components/widget/ToDo/ToDo.js +59 -16
  403. package/lib/components/widget/ToDo/ToDo.js.map +1 -1
  404. package/lib/doc/KeyReleaseUpdates.md +19 -7
  405. package/lib/hooks/index.d.ts +2 -0
  406. package/lib/hooks/index.d.ts.map +1 -1
  407. package/lib/hooks/index.js +2 -0
  408. package/lib/hooks/index.js.map +1 -1
  409. package/lib/hooks/useFocusFirstField.d.ts +7 -0
  410. package/lib/hooks/useFocusFirstField.d.ts.map +1 -0
  411. package/lib/hooks/useFocusFirstField.js +20 -0
  412. package/lib/hooks/useFocusFirstField.js.map +1 -0
  413. package/lib/hooks/useScrolltoTop.d.ts +7 -0
  414. package/lib/hooks/useScrolltoTop.d.ts.map +1 -0
  415. package/lib/hooks/useScrolltoTop.js +13 -0
  416. package/lib/hooks/useScrolltoTop.js.map +1 -0
  417. package/lib/sdk-pega-component-map.d.ts +1 -1
  418. package/lib/sdk-pega-component-map.js +1 -1
  419. package/lib/sdk-pega-component-map.js.map +1 -1
  420. package/lib/theme.d.ts +11 -0
  421. package/lib/theme.d.ts.map +1 -0
  422. package/lib/theme.js +31 -0
  423. package/lib/theme.js.map +1 -0
  424. package/package.json +1 -1
  425. package/lib/components/field/MultiSelect/Multiselect.d.ts +0 -3
  426. package/lib/components/field/MultiSelect/Multiselect.d.ts.map +0 -1
  427. package/lib/components/field/MultiSelect/Multiselect.js.map +0 -1
  428. package/lib/components/field/MultiSelect/index.d.ts.map +0 -1
  429. /package/lib/components/field/{MultiSelect → Multiselect}/index.d.ts +0 -0
  430. /package/lib/components/field/{MultiSelect → Multiselect}/index.js +0 -0
  431. /package/lib/components/field/{MultiSelect → Multiselect}/utils.d.ts +0 -0
  432. /package/lib/components/field/{MultiSelect → Multiselect}/utils.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"DashboardFilter.js","sourceRoot":"","sources":["../../../../src/components/infra/DashboardFilter/DashboardFilter.tsx"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,wCAAwC;AACxC,OAAO,EAAE,UAAU,EAAqB,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnF,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,UAAU,MAAM,kBA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CAAC;IAEjD,+DAA+D;IAC/D,MAAM,eAAe,GAAG,UAAU,CAA8B,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,GAAQ,EAAE,EAAE,CAAC,CAChG,KAAC,SAAS,IAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAC,UAAU,EAAC,SAAS,QAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,YACxG,KAAK,GACI,CACb,CAAC,CAAC;IAEH,OAAO,CACL,8BACG,IAAI,KAAK,UAAU,IAAI,CACtB,KAAC,UAAU,IACT,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,YAAY,QACZ,aAAa,EAAE,KAAK,EACpB,WAAW,EAAE,KAAC,eAAe,KAAG,GAChC,CACH,EACA,IAAI,KAAK,cAAc,IAAI,CAC1B,eACE,QAAQ,EAAE,KAAK,CAAC,EAAE;oBAChB,IAAI,KAAK,IAAI,KAAK,CAAC,MAAM,IAAI,CAAE,KAAK,CAAC,MAA2B,CAAC,KAAK,EAAE;wBACtE,gBAAgB,CAAC,KAAK,CAAC,CAAC;qBACzB;gBACH,CAAC,YAEA,kBAAkB,EAAE,GAChB,CACR,EACA,QAAQ,IAAI,CACX,eACE,QAAQ,EAAE,KAAK,CAAC,EAAE;oBAChB,yBAAyB,CAAE,KAAK,CAAC,MAA2B,CAAC,KAAK,CAAC,CAAC;gBACtE,CAAC,YAEA,QAAQ,GACJ,CACR,IACA,CACJ,CAAC;AACJ,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-shadow */\n/* eslint-disable operator-assignment */\nimport { forwardRef, PropsWithChildren, useEffect, useRef, useState } from 'react';\nimport { TextField } from '@material-ui/core';\nimport { v4 as uuidv4 } from 'uuid';\nimport { debounce } from 'throttle-debounce';\nimport DatePicker from 'react-datepicker';\n\nimport { createFilter, combineFilters, getFormattedDate, getFilterExpression } from './filterUtils';\nimport { PConnProps } from '../../../types/PConnProps';\n\nimport 'react-datepicker/dist/react-datepicker.css';\n\ninterface DashboardFilterProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n name: string;\n filterProp: string;\n type?: string;\n metadata?: any;\n}\n\nexport default function DashboardFilter(props: PropsWithChildren<DashboardFilterProps>) {\n const { children = [], name, filterProp, type = '', metadata = null, getPConnect } = props;\n const { current: filterId } = useRef(uuidv4());\n\n const [startDate, setStartDate] = useState(null);\n const [endDate, setEndDate] = useState(null);\n\n useEffect(() => {\n PCore.getPubSubUtils().subscribe(\n PCore.getConstants().PUB_SUB_EVENTS.EVENT_DASHBOARD_FILTER_CLEAR_ALL,\n () => {\n if (type === 'Dropdown') {\n getPConnect().getActionsApi().updateFieldValue(filterProp, '');\n } else if (type === 'RadioButtons') {\n const reference = getPConnect().getFullReference() + filterProp;\n const radList = document.getElementsByName(reference);\n for (let i = 0; i < radList.length; i = i + 1) {\n if ((radList[i] as HTMLInputElement).value === '') {\n (radList[i] as HTMLInputElement).checked = true;\n } else {\n (radList[i] as HTMLInputElement).checked = false;\n }\n }\n } else {\n getPConnect().getActionsApi().updateFieldValue(filterProp, undefined);\n if (type === 'DateTime') {\n setStartDate(null);\n setEndDate(null);\n }\n }\n },\n filterId,\n false,\n getPConnect().getContextName()\n );\n return function cleanup() {\n PCore.getPubSubUtils().unsubscribe(\n PCore.getConstants().PUB_SUB_EVENTS.EVENT_DASHBOARD_FILTER_CLEAR_ALL,\n filterId,\n getPConnect().getContextName()\n );\n };\n });\n\n const fireFilterChange = filterValue => {\n const filterData = {\n filterId,\n filterExpression: getFilterExpression(filterValue, name, metadata)\n };\n\n PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.EVENT_DASHBOARD_FILTER_CHANGE, filterData);\n };\n\n const fireFilterChangeDebounced = debounce(500, fireFilterChange);\n const dateRangeChangeHandler = value => {\n const { start, end } = value;\n\n let startDate = getFormattedDate(start);\n let endDate = getFormattedDate(end);\n\n if (startDate && endDate) {\n startDate = `${startDate}T00:00:00`;\n endDate = `${endDate}T00:00:00`;\n const startFilter = createFilter(startDate, name, 'GT');\n const endFilter = createFilter(endDate, name, 'LT');\n\n const filterData = {\n filterId,\n filterExpression: combineFilters([startFilter, endFilter], null)\n };\n PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.EVENT_DASHBOARD_FILTER_CHANGE, filterData);\n }\n };\n\n const renderAutoComplete = () => {\n metadata.config.onRecordChange = e => {\n fireFilterChange(e.id);\n };\n return getPConnect().createComponent(metadata, '', '', {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional);\n };\n\n const onChange = dates => {\n const [start, end] = dates;\n setStartDate(start);\n setEndDate(end);\n dateRangeChangeHandler({ start, end });\n };\n\n type TextProps = React.HTMLProps<HTMLInputElement>;\n\n const label = metadata.config.label.substring(3);\n\n // eslint-disable-next-line react/no-unstable-nested-components\n const CustomDateInput = forwardRef<HTMLInputElement, TextProps>(({ value, onClick }, ref: any) => (\n <TextField label={label} variant='outlined' fullWidth value={value} size='small' onClick={onClick} ref={ref}>\n {value}\n </TextField>\n ));\n\n return (\n <>\n {type === 'DateTime' && (\n <DatePicker\n onChange={onChange}\n startDate={startDate}\n endDate={endDate}\n selectsRange\n enableTabLoop={false}\n customInput={<CustomDateInput />}\n />\n )}\n {type === 'AutoComplete' && (\n <span\n onChange={event => {\n if (event && event.target && !(event.target as HTMLInputElement).value) {\n fireFilterChange('ALL');\n }\n }}\n >\n {renderAutoComplete()}\n </span>\n )}\n {children && (\n <span\n onChange={event => {\n fireFilterChangeDebounced((event.target as HTMLInputElement).value);\n }}\n >\n {children}\n </span>\n )}\n </>\n );\n}\n"]}
1
+ {"version":3,"file":"DashboardFilter.js","sourceRoot":"","sources":["../../../../src/components/infra/DashboardFilter/DashboardFilter.tsx"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,wCAAwC;AACxC,OAAO,EAAE,UAAU,EAAqB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AAC;AACJ,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-shadow */\n/* eslint-disable operator-assignment */\nimport { forwardRef, PropsWithChildren, useEffect, useRef, useState } from 'react';\nimport { TextField } from '@mui/material';\nimport { v4 as uuidv4 } from 'uuid';\nimport { debounce } from 'throttle-debounce';\nimport DatePicker from 'react-datepicker';\n\nimport { createFilter, combineFilters, getFormattedDate, getFilterExpression } from './filterUtils';\nimport { PConnProps } from '../../../types/PConnProps';\n\nimport 'react-datepicker/dist/react-datepicker.css';\n\ninterface DashboardFilterProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n name: string;\n filterProp: string;\n type?: string;\n metadata?: any;\n}\n\nexport default function DashboardFilter(props: PropsWithChildren<DashboardFilterProps>) {\n const { children = [], name, filterProp, type = '', metadata = null, getPConnect } = props;\n const { current: filterId } = useRef(uuidv4());\n\n const [startDate, setStartDate] = useState(null);\n const [endDate, setEndDate] = useState(null);\n\n useEffect(() => {\n PCore.getPubSubUtils().subscribe(\n PCore.getConstants().PUB_SUB_EVENTS.EVENT_DASHBOARD_FILTER_CLEAR_ALL,\n () => {\n if (type === 'Dropdown') {\n getPConnect().getActionsApi().updateFieldValue(filterProp, '');\n } else if (type === 'RadioButtons') {\n const reference = getPConnect().getFullReference() + filterProp;\n const radList = document.getElementsByName(reference);\n for (let i = 0; i < radList.length; i = i + 1) {\n if ((radList[i] as HTMLInputElement).value === '') {\n (radList[i] as HTMLInputElement).checked = true;\n } else {\n (radList[i] as HTMLInputElement).checked = false;\n }\n }\n } else {\n getPConnect().getActionsApi().updateFieldValue(filterProp, undefined);\n if (type === 'DateTime') {\n setStartDate(null);\n setEndDate(null);\n }\n }\n },\n filterId,\n false,\n getPConnect().getContextName()\n );\n return function cleanup() {\n PCore.getPubSubUtils().unsubscribe(\n PCore.getConstants().PUB_SUB_EVENTS.EVENT_DASHBOARD_FILTER_CLEAR_ALL,\n filterId,\n getPConnect().getContextName()\n );\n };\n });\n\n const fireFilterChange = filterValue => {\n const filterData = {\n filterId,\n filterExpression: getFilterExpression(filterValue, name, metadata)\n };\n\n PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.EVENT_DASHBOARD_FILTER_CHANGE, filterData);\n };\n\n const fireFilterChangeDebounced = debounce(500, fireFilterChange);\n const dateRangeChangeHandler = value => {\n const { start, end } = value;\n\n let startDate = getFormattedDate(start);\n let endDate = getFormattedDate(end);\n\n if (startDate && endDate) {\n startDate = `${startDate}T00:00:00`;\n endDate = `${endDate}T00:00:00`;\n const startFilter = createFilter(startDate, name, 'GT');\n const endFilter = createFilter(endDate, name, 'LT');\n\n const filterData = {\n filterId,\n filterExpression: combineFilters([startFilter, endFilter], null)\n };\n PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.EVENT_DASHBOARD_FILTER_CHANGE, filterData);\n }\n };\n\n const renderAutoComplete = () => {\n metadata.config.onRecordChange = e => {\n fireFilterChange(e.id);\n };\n return getPConnect().createComponent(metadata, '', 0, {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional);\n };\n\n const onChange = dates => {\n const [start, end] = dates;\n setStartDate(start);\n setEndDate(end);\n dateRangeChangeHandler({ start, end });\n };\n\n type TextProps = React.HTMLProps<HTMLInputElement>;\n\n const label = metadata.config.label.substring(3);\n\n // eslint-disable-next-line react/no-unstable-nested-components\n const CustomDateInput = forwardRef<HTMLInputElement, TextProps>(({ value, onClick }, ref: any) => (\n <TextField label={label} variant='outlined' fullWidth value={value} size='small' onClick={onClick} ref={ref}>\n {value}\n </TextField>\n ));\n\n return (\n <>\n {type === 'DateTime' && (\n <DatePicker\n onChange={onChange}\n startDate={startDate}\n endDate={endDate}\n selectsRange\n enableTabLoop={false}\n customInput={<CustomDateInput />}\n />\n )}\n {type === 'AutoComplete' && (\n <span\n onChange={event => {\n if (event && event.target && !(event.target as HTMLInputElement).value) {\n fireFilterChange('ALL');\n }\n }}\n >\n {renderAutoComplete()}\n </span>\n )}\n {children && (\n <span\n onChange={event => {\n fireFilterChangeDebounced((event.target as HTMLInputElement).value);\n }}\n >\n {children}\n </span>\n )}\n </>\n );\n}\n"]}
@@ -1,5 +1,4 @@
1
1
  /** This file contains various utility methods to generate filter components, regionLayout data, filter expressions, etc. */
2
- /// <reference types="react" />
3
2
  export declare const createFilter: (value: any, fieldId: any, comparator?: string) => {
4
3
  condition: {
5
4
  lhs: {
@@ -12,7 +11,7 @@ export declare const createFilter: (value: any, fieldId: any, comparator?: strin
12
11
  };
13
12
  };
14
13
  export declare const combineFilters: (filterList: any, existingFilters: any) => any;
15
- export declare const createFilterComponent: (getPConnect: any, filterMeta: any, index: any) => JSX.Element;
14
+ export declare const createFilterComponent: (getPConnect: any, filterMeta: any, index: any) => import("react/jsx-runtime").JSX.Element;
16
15
  export declare const buildFilterComponents: (getPConnect: any, allFilters: any) => any;
17
16
  export declare const convertDateToGMT: (value: any) => any;
18
17
  export declare const getFilterExpression: (filterValue: any, name: any, metadata: any) => "" | {
@@ -1 +1 @@
1
- {"version":3,"file":"filterUtils.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/DashboardFilter/filterUtils.tsx"],"names":[],"mappings":"AACA,6HAA6H;;AAM7H,eAAO,MAAM,YAAY;;;;;;;;;;CAYxB,CAAC;AAEF,eAAO,MAAM,cAAc,gDAiB1B,CAAC;AAEF,eAAO,MAAM,qBAAqB,gEAkCjC,CAAC;AAEF,eAAO,MAAM,qBAAqB,4CAkBjC,CAAC;AAEF,eAAO,MAAM,gBAAgB,qBAG5B,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;QAuB/B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,KAAA,OAsBjD;AAED,eAAO,MAAM,gBAAgB,oBAK5B,CAAC"}
1
+ {"version":3,"file":"filterUtils.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/DashboardFilter/filterUtils.tsx"],"names":[],"mappings":"AACA,6HAA6H;AAM7H,eAAO,MAAM,YAAY;;;;;;;;;;CAYxB,CAAC;AAEF,eAAO,MAAM,cAAc,gDAiB1B,CAAC;AAEF,eAAO,MAAM,qBAAqB,4FAkCjC,CAAC;AAEF,eAAO,MAAM,qBAAqB,4CAmBjC,CAAC;AAEF,eAAO,MAAM,gBAAgB,qBAG5B,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;QAuB/B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,KAAA,OAsBjD;AAED,eAAO,MAAM,gBAAgB,oBAK5B,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  /* eslint-disable prefer-template */
3
3
  /** This file contains various utility methods to generate filter components, regionLayout data, filter expressions, etc. */
4
- import { Grid, Link } from '@material-ui/core';
4
+ import { Grid, Link } from '@mui/material';
5
5
  import DashboardFilter from './DashboardFilter';
6
6
  export const createFilter = (value, fieldId, comparator = 'EQ') => {
7
7
  return {
@@ -68,7 +68,7 @@ export const buildFilterComponents = (getPConnect, allFilters) => {
68
68
  filterComponents.push(_jsx(Grid, { children: _jsx(Link, { style: { cursor: 'pointer' }, onClick: () => {
69
69
  // @ts-ignore - second parameter “payload” for publish method should be optional
70
70
  PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.EVENT_DASHBOARD_FILTER_CLEAR_ALL);
71
- }, children: "Clear All" }) }));
71
+ }, underline: 'hover', children: "Clear All" }) }));
72
72
  }
73
73
  return filterComponents;
74
74
  };
@@ -1 +1 @@
1
- {"version":3,"file":"filterUtils.js","sourceRoot":"","sources":["../../../../src/components/infra/DashboardFilter/filterUtils.tsx"],"names":[],"mappings":";AAAA,oCAAoC;AACpC,6HAA6H;AAE7H,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,O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CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;QACpB,MAAM,YAAY,GAAG,IAAI,EAAE,WAAW,EAAE,CAAC;QAEzC,OAAO;YACL,EAAE,EAAE,YAAY,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,gBAAgB,EAAE,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,EAAE;YACxG,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE;YACrC,YAAY,EAAE;gBACZ,GAAG,mBAAmB;gBACtB,GAAG,YAAY,EAAE,cAAc,EAAE,CAAC,YAAY;aAC/C;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACP,CAAC;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC,EAAE;IACrC,IAAI,CAAC,IAAI,EAAE;QACT,OAAO,IAAI,CAAC;KACb;IACD,OAAO,GAAG,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAChH,CAAC,CAAC","sourcesContent":["/* eslint-disable prefer-template */\n/** This file contains various utility methods to generate filter components, regionLayout data, filter expressions, etc. */\n\nimport { Grid, Link } from '@material-ui/core';\n\nimport DashboardFilter from './DashboardFilter';\n\nexport const createFilter = (value, fieldId, comparator = 'EQ') => {\n return {\n condition: {\n lhs: {\n field: fieldId\n },\n comparator,\n rhs: {\n value\n }\n }\n };\n};\n\nexport const combineFilters = (filterList, existingFilters) => {\n if (filterList && filterList.length) {\n // Need to combine them\n if (existingFilters) {\n return { AND: [existingFilters, ...filterList] };\n }\n\n // No existing, just return the one(s) from the list\n if (filterList.length > 1) {\n return { AND: [...filterList] };\n }\n\n return filterList[0];\n }\n\n // No filter list,\n return existingFilters;\n};\n\nexport const createFilterComponent = (getPConnect, filterMeta, index) => {\n const name = filterMeta.config.value.substring(4);\n let cleanedName = name;\n if (name.indexOf('.') !== -1) {\n cleanedName = name.substring(name.indexOf('.') + 1);\n }\n let propInfo: any = PCore.getMetadataUtils().getPropertyMetadata(cleanedName, filterMeta.config.ruleClass);\n if (!propInfo) {\n // @ts-ignore - PCore.getMetadataUtils().getPropertyMetadata - An argument for 'currentClassID' was not provided.\n propInfo = PCore.getMetadataUtils().getPropertyMetadata(cleanedName);\n }\n const { type: propertyType } = propInfo || { type: 'Text' };\n const isNumber = propertyType && (propertyType === 'Decimal' || propertyType === 'Integer');\n filterMeta.isNumber = isNumber;\n const { filterType, datasource } = filterMeta.config;\n const type = filterType || filterMeta.type;\n const filterProp = `.pyDashboardFilter${index}`;\n if (type === 'DateTime') {\n return <DashboardFilter key={name} getPConnect={getPConnect} name={name} filterProp={filterProp} metadata={filterMeta} type={filterMeta.type} />;\n }\n if (datasource && datasource.fields) {\n datasource.fields.key = datasource.fields.value;\n }\n if (filterMeta.config.listType === 'associated' && propInfo && propInfo.datasource) {\n filterMeta.config.datasource = propInfo.datasource.records;\n }\n filterMeta.config.value = `@P ${filterProp}`;\n filterMeta.type = filterMeta.config.displayAs || type;\n filterMeta.config.placeholder = 'ALL';\n return (\n <DashboardFilter key={name} getPConnect={getPConnect} name={name} filterProp={filterProp} metadata={filterMeta} type={filterMeta.type}>\n {getPConnect().createComponent(filterMeta, '', '', {})}\n </DashboardFilter>\n );\n};\n\nexport const buildFilterComponents = (getPConnect, allFilters) => {\n const filterComponents = allFilters.children.map((filter, index) => createFilterComponent(getPConnect, filter, index));\n if (filterComponents && filterComponents.length > 0) {\n filterComponents.push(\n <Grid>\n <Link\n style={{ cursor: 'pointer' }}\n onClick={() => {\n // @ts-ignore - second parameter “payload” for publish method should be optional\n PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.EVENT_DASHBOARD_FILTER_CLEAR_ALL);\n }}\n >\n Clear All\n </Link>\n </Grid>\n );\n }\n return filterComponents;\n};\n\nexport const convertDateToGMT = value => {\n const { valueAsISOString: date } = value;\n return date ? date.substring(0, date.indexOf('T')) : date;\n};\n\nexport const getFilterExpression = (filterValue, name, metadata) => {\n if (filterValue === '') {\n return null;\n }\n let comparator = 'EQ';\n if (metadata.type === 'TextInput' && !metadata.isNumber) {\n comparator = 'CONTAINS';\n }\n\n if (metadata.config.filterType && metadata.config.filterType === 'RelativeDates') {\n const fieldSource = metadata.config.datasource.filter(source => source.key === filterValue)[0];\n const relativeDateExpression = JSON.parse(fieldSource.json);\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const fields = [\n {\n name: relativeDateExpression.condition.lhs.field,\n type: 'DATE_TIME'\n }\n ];\n return '';\n }\n\n return createFilter(filterValue, name, comparator);\n};\n\n/**\n * Returns ConfigurableLayout mapped content. With pre-populated default layout configs.\n * @returns {object[]} ConfigurableLayout content.\n */\nexport function getLayoutDataFromRegion(regionData) {\n const defaultLayoutConfig = {\n width: 'full',\n fillAvailable: true,\n minWidth: [300, 'px']\n };\n\n return regionData.props\n ?.getPConnect()\n ?.getChildren()\n ?.map((item, index) => {\n const itemPConnect = item?.getPConnect();\n\n return {\n id: itemPConnect?.getComponentName() ? `${itemPConnect.getComponentName()}--${index}` : `item--${index}`,\n content: itemPConnect?.getComponent(),\n layoutConfig: {\n ...defaultLayoutConfig,\n ...itemPConnect?.getConfigProps().layoutConfig\n }\n };\n });\n}\n\nexport const getFormattedDate = date => {\n if (!date) {\n return date;\n }\n return `${date.getFullYear()}-${('0' + (date.getMonth() + 1)).slice(-2)}-${('0' + date.getDate()).slice(-2)}`;\n};\n"]}
1
+ {"version":3,"file":"filterUtils.js","sourceRoot":"","sources":["../../../../src/components/infra/DashboardFilter/filterUtils.tsx"],"names":[],"mappings":";AAAA,oCAAoC;AACpC,6HAA6H;AAE7H,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MA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GAAG,EAAE,IAAI,CAAC;KACtB,CAAC;IAEF,OAAO,UAAU,CAAC,KAAK;QACrB,EAAE,WAAW,EAAE;QACf,EAAE,WAAW,EAAE;QACf,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;QACpB,MAAM,YAAY,GAAG,IAAI,EAAE,WAAW,EAAE,CAAC;QAEzC,OAAO;YACL,EAAE,EAAE,YAAY,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,gBAAgB,EAAE,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,EAAE;YACxG,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE;YACrC,YAAY,EAAE;gBACZ,GAAG,mBAAmB;gBACtB,GAAG,YAAY,EAAE,cAAc,EAAE,CAAC,YAAY;aAC/C;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACP,CAAC;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC,EAAE;IACrC,IAAI,CAAC,IAAI,EAAE;QACT,OAAO,IAAI,CAAC;KACb;IACD,OAAO,GAAG,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAChH,CAAC,CAAC","sourcesContent":["/* eslint-disable prefer-template */\n/** This file contains various utility methods to generate filter components, regionLayout data, filter expressions, etc. */\n\nimport { Grid, Link } from '@mui/material';\n\nimport DashboardFilter from './DashboardFilter';\n\nexport const createFilter = (value, fieldId, comparator = 'EQ') => {\n return {\n condition: {\n lhs: {\n field: fieldId\n },\n comparator,\n rhs: {\n value\n }\n }\n };\n};\n\nexport const combineFilters = (filterList, existingFilters) => {\n if (filterList && filterList.length) {\n // Need to combine them\n if (existingFilters) {\n return { AND: [existingFilters, ...filterList] };\n }\n\n // No existing, just return the one(s) from the list\n if (filterList.length > 1) {\n return { AND: [...filterList] };\n }\n\n return filterList[0];\n }\n\n // No filter list,\n return existingFilters;\n};\n\nexport const createFilterComponent = (getPConnect, filterMeta, index) => {\n const name = filterMeta.config.value.substring(4);\n let cleanedName = name;\n if (name.indexOf('.') !== -1) {\n cleanedName = name.substring(name.indexOf('.') + 1);\n }\n let propInfo: any = PCore.getMetadataUtils().getPropertyMetadata(cleanedName, filterMeta.config.ruleClass);\n if (!propInfo) {\n // @ts-ignore - PCore.getMetadataUtils().getPropertyMetadata - An argument for 'currentClassID' was not provided.\n propInfo = PCore.getMetadataUtils().getPropertyMetadata(cleanedName);\n }\n const { type: propertyType } = propInfo || { type: 'Text' };\n const isNumber = propertyType && (propertyType === 'Decimal' || propertyType === 'Integer');\n filterMeta.isNumber = isNumber;\n const { filterType, datasource } = filterMeta.config;\n const type = filterType || filterMeta.type;\n const filterProp = `.pyDashboardFilter${index}`;\n if (type === 'DateTime') {\n return <DashboardFilter key={name} getPConnect={getPConnect} name={name} filterProp={filterProp} metadata={filterMeta} type={filterMeta.type} />;\n }\n if (datasource && datasource.fields) {\n datasource.fields.key = datasource.fields.value;\n }\n if (filterMeta.config.listType === 'associated' && propInfo && propInfo.datasource) {\n filterMeta.config.datasource = propInfo.datasource.records;\n }\n filterMeta.config.value = `@P ${filterProp}`;\n filterMeta.type = filterMeta.config.displayAs || type;\n filterMeta.config.placeholder = 'ALL';\n return (\n <DashboardFilter key={name} getPConnect={getPConnect} name={name} filterProp={filterProp} metadata={filterMeta} type={filterMeta.type}>\n {getPConnect().createComponent(filterMeta, '', '', {})}\n </DashboardFilter>\n );\n};\n\nexport const buildFilterComponents = (getPConnect, allFilters) => {\n const filterComponents = allFilters.children.map((filter, index) => createFilterComponent(getPConnect, filter, index));\n if (filterComponents && filterComponents.length > 0) {\n filterComponents.push(\n <Grid>\n <Link\n style={{ cursor: 'pointer' }}\n onClick={() => {\n // @ts-ignore - second parameter “payload” for publish method should be optional\n PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.EVENT_DASHBOARD_FILTER_CLEAR_ALL);\n }}\n underline='hover'\n >\n Clear All\n </Link>\n </Grid>\n );\n }\n return filterComponents;\n};\n\nexport const convertDateToGMT = value => {\n const { valueAsISOString: date } = value;\n return date ? date.substring(0, date.indexOf('T')) : date;\n};\n\nexport const getFilterExpression = (filterValue, name, metadata) => {\n if (filterValue === '') {\n return null;\n }\n let comparator = 'EQ';\n if (metadata.type === 'TextInput' && !metadata.isNumber) {\n comparator = 'CONTAINS';\n }\n\n if (metadata.config.filterType && metadata.config.filterType === 'RelativeDates') {\n const fieldSource = metadata.config.datasource.filter(source => source.key === filterValue)[0];\n const relativeDateExpression = JSON.parse(fieldSource.json);\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const fields = [\n {\n name: relativeDateExpression.condition.lhs.field,\n type: 'DATE_TIME'\n }\n ];\n return '';\n }\n\n return createFilter(filterValue, name, comparator);\n};\n\n/**\n * Returns ConfigurableLayout mapped content. With pre-populated default layout configs.\n * @returns {object[]} ConfigurableLayout content.\n */\nexport function getLayoutDataFromRegion(regionData) {\n const defaultLayoutConfig = {\n width: 'full',\n fillAvailable: true,\n minWidth: [300, 'px']\n };\n\n return regionData.props\n ?.getPConnect()\n ?.getChildren()\n ?.map((item, index) => {\n const itemPConnect = item?.getPConnect();\n\n return {\n id: itemPConnect?.getComponentName() ? `${itemPConnect.getComponentName()}--${index}` : `item--${index}`,\n content: itemPConnect?.getComponent(),\n layoutConfig: {\n ...defaultLayoutConfig,\n ...itemPConnect?.getConfigProps().layoutConfig\n }\n };\n });\n}\n\nexport const getFormattedDate = date => {\n if (!date) {\n return date;\n }\n return `${date.getFullYear()}-${('0' + (date.getMonth() + 1)).slice(-2)}-${('0' + date.getDate()).slice(-2)}`;\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"DeferLoad.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/DeferLoad/DeferLoad.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,UAAU,cAAe,SAAQ,UAAU;IAEzC,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;CACrB;AAqBD,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAK,EAAE,cAAc,OAkItD"}
1
+ {"version":3,"file":"DeferLoad.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/DeferLoad/DeferLoad.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,UAAU,cAAe,SAAQ,UAAU;IAEzC,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;CACrB;AAqBD,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAK,EAAE,cAAc,OAsItD"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useState, useEffect, createElement } from 'react';
3
- import { Box, Card, CircularProgress } from '@material-ui/core';
4
- import { makeStyles } from '@material-ui/core/styles';
3
+ import { Box, Card, CircularProgress } from '@mui/material';
4
+ import makeStyles from '@mui/styles/makeStyles';
5
5
  import createPConnectComponent from '../../../bridge/react_pconnect';
6
6
  //
7
7
  // WARNING: It is not expected that this file should be modified. It is part of infrastructure code that works with
@@ -67,7 +67,7 @@ export default function DeferLoad(props) {
67
67
  }
68
68
  };
69
69
  const configObject = PCore.createPConnect(config);
70
- configObject.getPConnect().setInheritedProp('displayMode', 'LABELS_LEFT');
70
+ configObject.getPConnect().setInheritedProp('displayMode', 'DISPLAY_ONLY');
71
71
  setContent(createElement(createPConnectComponent(), configObject));
72
72
  if (deferLoadId) {
73
73
  PCore.getDeferLoadManager().stop(deferLoadId, getPConnect().getContextName());
@@ -110,8 +110,12 @@ export default function DeferLoad(props) {
110
110
  getPConnect()
111
111
  .getActionsApi()
112
112
  .refreshCaseView(encodeURI(loadViewCaseID), name, '') // 3rd arg empty string until typedef allows optional
113
- .then(data => {
113
+ .then((data) => {
114
114
  onResponse(data.root);
115
+ })
116
+ .catch(error => {
117
+ // eslint-disable-next-line no-console
118
+ console.log(`deferload: ${error}`);
115
119
  });
116
120
  }
117
121
  }, [name, getPConnect, currentLoadedAssignment]);
@@ -1 +1 @@
1
- {"version":3,"file":"DeferLoad.js","sourceRoot":"","sources":["../../../../src/components/infra/DeferLoad/DeferLoad.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,uBAAuB,MAAM,gCAAgC,CAAC;AAYrE,EAAE;AACF,qHAAqH;AACrH,uHAAuH;AACvH,+BAA+B;AAC/B,EAAE;AAEF,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACrC,IAAI,EAAE;QACJ,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC9B,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7B,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5B,aAAa,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC/B,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7B,UAAU,EAAE,KAAK,CAAC,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GAAI,GACT,CACR,CAAC;KACH;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC","sourcesContent":["import { useState, useEffect, createElement } from 'react';\nimport { Box, Card, CircularProgress } from '@material-ui/core';\nimport { makeStyles } from '@material-ui/core/styles';\n\nimport createPConnectComponent from '../../../bridge/react_pconnect';\n\nimport { PConnProps } from '../../../types/PConnProps';\n\ninterface DeferLoadProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n name: string;\n isChildDeferLoad?: boolean;\n isTab: boolean;\n deferLoadId: string;\n}\n\n//\n// WARNING: It is not expected that this file should be modified. It is part of infrastructure code that works with\n// Redux and creation/update of Redux containers and PConnect. Modifying this code could have undesireable results and\n// is totally at your own risk.\n//\n\nconst useStyles = makeStyles(theme => ({\n root: {\n paddingRight: theme.spacing(1),\n paddingLeft: theme.spacing(1),\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n marginRight: theme.spacing(1),\n marginLeft: theme.spacing(1),\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1)\n }\n}));\n\nexport default function DeferLoad(props: DeferLoadProps) {\n const { getPConnect, name, deferLoadId, isTab } = props;\n const [content, setContent] = useState<any>(null);\n const [isLoading, setLoading] = useState(true);\n const [currentLoadedAssignment, setCurrentLoadedAssignment] = useState('');\n\n const classes = useStyles();\n\n const pConnect = getPConnect();\n const constants = PCore.getConstants();\n\n const theRequestedAssignment = pConnect.getValue(PCore.getConstants().CASE_INFO.ASSIGNMENT_LABEL, ''); // 2nd arg empty string until typedef allows optional\n if (theRequestedAssignment !== currentLoadedAssignment) {\n // console.log(`DeferLoad: currentLoadedAssignment about to change from ${currentLoadedAssignment} to ${theRequestedAssignment}`);\n setCurrentLoadedAssignment(theRequestedAssignment);\n }\n\n const { CASE, PAGE, DATA } = constants.RESOURCE_TYPES;\n const loadViewCaseID = pConnect.getValue(constants.PZINSKEY, '') || pConnect.getValue(constants.CASE_INFO.CASE_INFO_ID, ''); // 2nd arg empty string until typedef allows optional\n let containerName;\n let containerItemData;\n const targetName = pConnect.getTarget();\n if (targetName) {\n containerName = PCore.getContainerUtils().getActiveContainerItemName(targetName);\n\n containerItemData = PCore.getContainerUtils().getContainerItemData(targetName, containerName);\n }\n\n const { resourceType = CASE } = containerItemData || {\n resourceType: loadViewCaseID ? CASE : PAGE\n };\n const isContainerPreview = /preview_[0-9]*/g.test(pConnect.getContextName());\n\n const getViewOptions = () => ({\n viewContext: resourceType,\n pageClass: loadViewCaseID ? '' : (pConnect.getDataObject('') as any).pyPortal.classID, // 2nd arg empty string until typedef allows optional\n container: isContainerPreview ? 'preview' : null,\n containerName: isContainerPreview ? 'preview' : null,\n updateData: isContainerPreview\n });\n\n const onResponse = data => {\n setLoading(false);\n if (deferLoadId) {\n PCore.getDeferLoadManager().start(\n name,\n getPConnect().getCaseInfo().getKey(),\n getPConnect().getPageReference().replace('caseInfo.content', ''),\n getPConnect().getContextName(),\n deferLoadId\n );\n }\n\n if (data && !(data.type && data.type === 'error')) {\n const config = {\n meta: data,\n options: {\n context: pConnect.getContextName(),\n pageReference: pConnect.getPageReference()\n }\n };\n const configObject = PCore.createPConnect(config);\n configObject.getPConnect().setInheritedProp('displayMode', 'LABELS_LEFT');\n setContent(createElement(createPConnectComponent(), configObject));\n if (deferLoadId) {\n PCore.getDeferLoadManager().stop(deferLoadId, getPConnect().getContextName());\n }\n }\n };\n\n useEffect(() => {\n if (resourceType === DATA) {\n // Rendering defer loaded tabs in data context\n if (containerName) {\n const dataContext = PCore.getStoreValue('.dataContext', 'dataInfo', containerName);\n const dataContextParameters = PCore.getStoreValue('.dataContextParameters', 'dataInfo', containerName);\n\n getPConnect()\n .getActionsApi()\n .showData(name, dataContext, dataContextParameters, {\n // @ts-ignore - Type 'boolean' is not assignable to type 'string'\n skipSemanticUrl: true,\n // @ts-ignore\n isDeferLoaded: true\n })\n .then(data => {\n onResponse(data);\n });\n } else {\n // eslint-disable-next-line no-console\n console.error('Cannot load the defer loaded view without container information');\n }\n } else if (resourceType === PAGE) {\n // Rendering defer loaded tabs in case/ page context\n getPConnect()\n .getActionsApi()\n .loadView(encodeURI(loadViewCaseID), name, getViewOptions())\n .then(data => {\n onResponse(data);\n });\n } else {\n getPConnect()\n .getActionsApi()\n .refreshCaseView(encodeURI(loadViewCaseID), name, '') // 3rd arg empty string until typedef allows optional\n .then(data => {\n onResponse(data.root);\n });\n }\n }, [name, getPConnect, currentLoadedAssignment]);\n /* TODO Cosmos need to handle for now added a wrapper div with pos relative */\n let deferLoadContent;\n if (isLoading) {\n deferLoadContent = (\n <div style={{ position: 'relative', height: '100px' }}>\n <Box textAlign='center'>\n <CircularProgress />\n </Box>\n </div>\n );\n } else {\n deferLoadContent = !isTab ? (\n <div className={classes.root}>{content}</div>\n ) : (\n <Card id='DeferLoad' className={classes.root}>\n <>{content}</>\n </Card>\n );\n }\n\n return deferLoadContent;\n}\n"]}
1
+ {"version":3,"file":"DeferLoad.js","sourceRoot":"","sources":["../../../../src/components/infra/DeferLoad/DeferLoad.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAEhD,OAAO,uBAAuB,MAAM,gCAAgC,CAAC;AAYrE,EAAE;AACF,qHAAqH;AACrH,uHAAuH;AACvH,+BAA+B;AAC/B,EAAE;AAEF,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACrC,IAAI,EAAE;QACJ,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC9B,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7B,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5B,aAAa,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC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L,gBAAgB,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAC1B,cAAK,SAAS,EAAE,OAAO,CAAC,IAAI,YAAG,OAAO,GAAO,CAC9C,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,IAAC,EAAE,EAAC,WAAW,EAAC,SAAS,EAAE,OAAO,CAAC,IAAI,YAC1C,4BAAG,OAAO,GAAI,GACT,CACR,CAAC;KACH;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC","sourcesContent":["import { useState, useEffect, createElement } from 'react';\nimport { Box, Card, CircularProgress } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\n\nimport createPConnectComponent from '../../../bridge/react_pconnect';\n\nimport { PConnProps } from '../../../types/PConnProps';\n\ninterface DeferLoadProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n name: string;\n isChildDeferLoad?: boolean;\n isTab: boolean;\n deferLoadId: string;\n}\n\n//\n// WARNING: It is not expected that this file should be modified. It is part of infrastructure code that works with\n// Redux and creation/update of Redux containers and PConnect. Modifying this code could have undesireable results and\n// is totally at your own risk.\n//\n\nconst useStyles = makeStyles(theme => ({\n root: {\n paddingRight: theme.spacing(1),\n paddingLeft: theme.spacing(1),\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n marginRight: theme.spacing(1),\n marginLeft: theme.spacing(1),\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1)\n }\n}));\n\nexport default function DeferLoad(props: DeferLoadProps) {\n const { getPConnect, name, deferLoadId, isTab } = props;\n const [content, setContent] = useState<any>(null);\n const [isLoading, setLoading] = useState(true);\n const [currentLoadedAssignment, setCurrentLoadedAssignment] = useState('');\n\n const classes = useStyles();\n\n const pConnect = getPConnect();\n const constants = PCore.getConstants();\n\n const theRequestedAssignment = pConnect.getValue(PCore.getConstants().CASE_INFO.ASSIGNMENT_LABEL, ''); // 2nd arg empty string until typedef allows optional\n if (theRequestedAssignment !== currentLoadedAssignment) {\n // console.log(`DeferLoad: currentLoadedAssignment about to change from ${currentLoadedAssignment} to ${theRequestedAssignment}`);\n setCurrentLoadedAssignment(theRequestedAssignment);\n }\n\n const { CASE, PAGE, DATA } = constants.RESOURCE_TYPES;\n const loadViewCaseID = pConnect.getValue(constants.PZINSKEY, '') || pConnect.getValue(constants.CASE_INFO.CASE_INFO_ID, ''); // 2nd arg empty string until typedef allows optional\n let containerName;\n let containerItemData;\n const targetName = pConnect.getTarget();\n if (targetName) {\n containerName = PCore.getContainerUtils().getActiveContainerItemName(targetName);\n\n containerItemData = PCore.getContainerUtils().getContainerItemData(targetName, containerName);\n }\n\n const { resourceType = CASE } = containerItemData || {\n resourceType: loadViewCaseID ? CASE : PAGE\n };\n const isContainerPreview = /preview_[0-9]*/g.test(pConnect.getContextName());\n\n const getViewOptions = () => ({\n viewContext: resourceType,\n pageClass: loadViewCaseID ? '' : (pConnect.getDataObject('') as any).pyPortal.classID, // 2nd arg empty string until typedef allows optional\n container: isContainerPreview ? 'preview' : null,\n containerName: isContainerPreview ? 'preview' : null,\n updateData: isContainerPreview\n });\n\n const onResponse = data => {\n setLoading(false);\n if (deferLoadId) {\n PCore.getDeferLoadManager().start(\n name,\n getPConnect().getCaseInfo().getKey(),\n getPConnect().getPageReference().replace('caseInfo.content', ''),\n getPConnect().getContextName(),\n deferLoadId\n );\n }\n\n if (data && !(data.type && data.type === 'error')) {\n const config = {\n meta: data,\n options: {\n context: pConnect.getContextName(),\n pageReference: pConnect.getPageReference()\n }\n };\n const configObject = PCore.createPConnect(config);\n configObject.getPConnect().setInheritedProp('displayMode', 'DISPLAY_ONLY');\n setContent(createElement(createPConnectComponent(), configObject));\n if (deferLoadId) {\n PCore.getDeferLoadManager().stop(deferLoadId, getPConnect().getContextName());\n }\n }\n };\n\n useEffect(() => {\n if (resourceType === DATA) {\n // Rendering defer loaded tabs in data context\n if (containerName) {\n const dataContext = PCore.getStoreValue('.dataContext', 'dataInfo', containerName);\n const dataContextParameters = PCore.getStoreValue('.dataContextParameters', 'dataInfo', containerName);\n\n getPConnect()\n .getActionsApi()\n .showData(name, dataContext, dataContextParameters, {\n // @ts-ignore - Type 'boolean' is not assignable to type 'string'\n skipSemanticUrl: true,\n // @ts-ignore\n isDeferLoaded: true\n })\n .then(data => {\n onResponse(data);\n });\n } else {\n // eslint-disable-next-line no-console\n console.error('Cannot load the defer loaded view without container information');\n }\n } else if (resourceType === PAGE) {\n // Rendering defer loaded tabs in case/ page context\n getPConnect()\n .getActionsApi()\n .loadView(encodeURI(loadViewCaseID), name, getViewOptions())\n .then(data => {\n onResponse(data);\n });\n } else {\n getPConnect()\n .getActionsApi()\n .refreshCaseView(encodeURI(loadViewCaseID), name, '') // 3rd arg empty string until typedef allows optional\n .then((data: any) => {\n onResponse(data.root);\n })\n .catch(error => {\n // eslint-disable-next-line no-console\n console.log(`deferload: ${error}`);\n });\n }\n }, [name, getPConnect, currentLoadedAssignment]);\n /* TODO Cosmos need to handle for now added a wrapper div with pos relative */\n let deferLoadContent;\n if (isLoading) {\n deferLoadContent = (\n <div style={{ position: 'relative', height: '100px' }}>\n <Box textAlign='center'>\n <CircularProgress />\n </Box>\n </div>\n );\n } else {\n deferLoadContent = !isTab ? (\n <div className={classes.root}>{content}</div>\n ) : (\n <Card id='DeferLoad' className={classes.root}>\n <>{content}</>\n </Card>\n );\n }\n\n return deferLoadContent;\n}\n"]}
@@ -1,8 +1,7 @@
1
- /// <reference types="react" />
2
1
  import { PConnProps } from '../../../types/PConnProps';
3
2
  interface ErrorBoundaryProps extends PConnProps {
4
3
  isInternalError?: boolean;
5
4
  }
6
- export default function ErrorBoundary(props: ErrorBoundaryProps): JSX.Element | null;
5
+ export default function ErrorBoundary(props: ErrorBoundaryProps): import("react/jsx-runtime").JSX.Element | null;
7
6
  export {};
8
7
  //# sourceMappingURL=ErrorBoundary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/ErrorBoundary/ErrorBoundary.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,UAAU,kBAAmB,SAAQ,UAAU;IAE7C,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,EAAE,kBAAkB,sBAsC9D"}
1
+ {"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/ErrorBoundary/ErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,UAAU,kBAAmB,SAAQ,UAAU;IAE7C,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,EAAE,kBAAkB,kDAsC9D"}
@@ -6,8 +6,8 @@ interface MultiStepProps extends PConnProps {
6
6
  actionButtons: any[];
7
7
  onButtonPress: any;
8
8
  bIsVertical: boolean;
9
- arNavigationSteps: any[];
9
+ arNavigationSteps: any;
10
10
  }
11
- export default function MultiStep(props: PropsWithChildren<MultiStepProps>): JSX.Element;
11
+ export default function MultiStep(props: PropsWithChildren<MultiStepProps>): import("react/jsx-runtime").JSX.Element;
12
12
  export {};
13
13
  //# sourceMappingURL=MultiStep.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MultiStep.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/MultiStep/MultiStep.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAGjD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,OAAO,iBAAiB,CAAC;AAEzB,UAAU,cAAe,SAAQ,UAAU;IAEzC,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,GAAG,EAAE,CAAC;IACrB,aAAa,EAAE,GAAG,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;IACrB,iBAAiB,EAAE,GAAG,EAAE,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,eA4KzE"}
1
+ {"version":3,"file":"MultiStep.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/MultiStep/MultiStep.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAGjD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,OAAO,iBAAiB,CAAC;AAEzB,UAAU,cAAe,SAAQ,UAAU;IAEzC,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,GAAG,EAAE,CAAC;IACrB,aAAa,EAAE,GAAG,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;IACrB,iBAAiB,EAAE,GAAG,CAAC;CACxB;AAED,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAK,EAAE,iBAAiB,CAAC,cAAc,CAAC,2CAoLzE"}
@@ -7,6 +7,11 @@ export default function MultiStep(props) {
7
7
  const AssignmentCard = getComponentFromMap('AssignmentCard');
8
8
  const { getPConnect, children, itemKey = '', actionButtons, onButtonPress } = props;
9
9
  const { bIsVertical, arNavigationSteps } = props;
10
+ let currentStep = arNavigationSteps.find(({ visited_status: vs }) => vs === 'current');
11
+ if (!currentStep) {
12
+ const lastActiveStepIndex = arNavigationSteps.findLastIndex(({ visited_status: vs }) => vs === 'success');
13
+ currentStep = arNavigationSteps[lastActiveStepIndex >= 0 ? lastActiveStepIndex : 0];
14
+ }
10
15
  // const svgCurrent = Utils.getImageSrc("circle-solid", Utils.getSDKStaticConentUrl());
11
16
  // const svgNotCurrent = Utils.getImageSrc("circle-solid", Utils.getSDKStaticConentUrl());
12
17
  function _getVIconClass(status) {
@@ -27,14 +32,14 @@ export default function MultiStep(props) {
27
32
  }
28
33
  return 'psdk-vertical-step-body';
29
34
  }
30
- function _getHIconClass(status) {
31
- if (status === 'current') {
35
+ function _getHIconClass(step) {
36
+ if (step.ID === currentStep?.ID) {
32
37
  return 'psdk-horizontal-step-icon-selected';
33
38
  }
34
39
  return 'psdk-horizontal-step-icon';
35
40
  }
36
- function _getHLabelClass(status) {
37
- if (status === 'current') {
41
+ function _getHLabelClass(step) {
42
+ if (step.ID === currentStep?.ID) {
38
43
  return 'psdk-horizontal-step-label-selected';
39
44
  }
40
45
  return 'psdk-horizontal-step-label';
@@ -57,9 +62,9 @@ export default function MultiStep(props) {
57
62
  _jsxs("li", { className: 'psdk-sub-step-list', children: [_jsxs("div", { style: { display: 'inline-flex' }, children: [subStep.visited_status === 'current' && _jsx("img", { className: 'psdk-current-svg-icon', src: '{svgCurrent}' }), subStep.visited_status !== 'current' && _jsx("img", { className: 'psdk-not-current-svg-icon', src: '{svgNotCurrent}' }), subStep.visited_status === 'current' && _jsx("label", { className: 'psdk-sub-step-current', children: subStep.name }), subStep.visited_status !== 'current' && _jsx("label", { className: 'psdk-sub-step-not-current', children: subStep.name })] }), subStep.visited_status === 'current' && (_jsx("div", { children: _jsx(AssignmentCard, { getPConnect: getPConnect, itemKey: itemKey, actionButtons: actionButtons, onButtonPress: buttonPress, children: children }) }))] });
58
63
  }) })), !mainStep?.steps && mainStep.visited_status === 'current' && (_jsx(AssignmentCard, { getPConnect: getPConnect, itemKey: itemKey, actionButtons: actionButtons, onButtonPress: buttonPress, children: children }))] })] }) }, mainStep.actionID));
59
64
  }) })) : (_jsxs("div", { className: 'psdk-horizontal-stepper', children: [_jsx("div", { className: 'psdk-horizontal-stepper-header-container', children: arNavigationSteps.map((mainStep, index) => {
60
- return (_jsxs(React.Fragment, { children: [_jsxs("div", { className: 'psdk-horizontal-step-header', children: [_jsx("div", { className: _getHIconClass(mainStep.visited_status), children: _jsx("div", { className: 'psdk-horizontal-step-icon-content', children: _jsx("span", { children: index + 1 }) }) }), _jsx("div", { className: _getHLabelClass(mainStep.visited_status), children: _jsx("div", { className: 'psdk-horizontal-step-text-label', children: mainStep.name }) })] }), _showHLine(index) && _jsx("div", { className: 'psdk-horizontal-step-line' })] }, mainStep.actionID));
65
+ return (_jsxs(React.Fragment, { children: [_jsxs("div", { className: 'psdk-horizontal-step-header', children: [_jsx("div", { className: _getHIconClass(mainStep), children: _jsx("div", { className: 'psdk-horizontal-step-icon-content', children: _jsx("span", { children: index + 1 }) }) }), _jsx("div", { className: _getHLabelClass(mainStep), children: _jsx("div", { className: 'psdk-horizontal-step-text-label', id: 'selected-label', children: mainStep.name }) })] }), _showHLine(index) && _jsx("div", { className: 'psdk-horizontal-step-line' })] }, mainStep.actionID));
61
66
  }) }), arNavigationSteps.map(mainStep => {
62
- return (_jsxs(React.Fragment, { children: [mainStep.steps && (_jsx("ul", { style: { paddingInlineStart: '0rem', marginLeft: '35px' }, children: mainStep.steps.map(subStep => (_jsxs("li", { className: 'psdk-sub-step-list', children: [_jsxs("div", { style: { display: 'inline-flex' }, children: [subStep.visited_status === 'current' && _jsx("img", { className: 'psdk-current-svg-icon', src: '{svgCurrent}' }), subStep.visited_status !== 'current' && _jsx("img", { className: 'psdk-not-current-svg-icon', src: '{svgNotCurrent}' }), subStep.visited_status === 'current' && _jsx("label", { className: 'psdk-sub-step-current', children: subStep.name }), subStep.visited_status !== 'current' && _jsx("label", { className: 'psdk-sub-step-not-current', children: subStep.name })] }), subStep.visited_status === 'current' && (_jsx(AssignmentCard, { getPConnect: getPConnect, itemKey: itemKey, actionButtons: actionButtons, onButtonPress: buttonPress, children: children }))] }))) })), !mainStep?.steps && mainStep.visited_status === 'current' && (_jsx(AssignmentCard, { getPConnect: getPConnect, itemKey: itemKey, actionButtons: actionButtons, onButtonPress: buttonPress, children: children }))] }, mainStep.actionID));
67
+ return (_jsxs(React.Fragment, { children: [mainStep.steps && (_jsx("ul", { style: { paddingInlineStart: '0rem', marginLeft: '35px' }, children: mainStep.steps.map(subStep => (_jsxs("li", { className: 'psdk-sub-step-list', children: [_jsxs("div", { style: { display: 'inline-flex' }, children: [subStep.visited_status === 'current' && _jsx("img", { className: 'psdk-current-svg-icon', src: '{svgCurrent}' }), subStep.visited_status !== 'current' && _jsx("img", { className: 'psdk-not-current-svg-icon', src: '{svgNotCurrent}' }), subStep.visited_status === 'current' && _jsx("label", { className: 'psdk-sub-step-current', children: subStep.name }), subStep.visited_status !== 'current' && _jsx("label", { className: 'psdk-sub-step-not-current', children: subStep.name })] }), subStep.visited_status === 'current' && (_jsx(AssignmentCard, { getPConnect: getPConnect, itemKey: itemKey, actionButtons: actionButtons, onButtonPress: buttonPress, children: children }))] }))) })), !mainStep?.steps && mainStep.ID === currentStep?.ID && (_jsx(AssignmentCard, { getPConnect: getPConnect, itemKey: itemKey, actionButtons: actionButtons, onButtonPress: buttonPress, children: children }))] }, mainStep.actionID));
63
68
  })] })) }));
64
69
  }
65
70
  //# sourceMappingURL=MultiStep.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MultiStep.js","sourceRoot":"","sources":["../../../../src/components/infra/MultiStep/MultiStep.tsx"],"names":[],"mappings":";AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAGhF,OAAO,iBAAiB,CAAC;AAWzB,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAwC;IACxE,8EAA8E;IAC9E,MAAM,cAAc,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAE7D,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,GAAG,EAAE,EAAE,aAAa,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC;IACpF,MAAM,EAAE,WAAW,EAAE,iBAAiB,EAAE,GAAG,KAAK,CAAC;IAEjD,uFAAuF;IACvF,0FAA0F;IAE1F,SAAS,cAAc,CAAC,MAAM;QAC5B,IAAI,MAAM,KAAK,SAAS,EAAE;YACxB,OAAO,kCAAkC,CAAC;SAC3C;QAED,OAAO,yBAAyB,CAAC;IACnC,CAAC;IAED,SAAS,eAAe,CAAC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AK,SAAS,IAAI,cAAK,SAAS,EAAC,2BAA2B,EAAC,GAAG,EAAC,iBAAiB,GAAG,EAC3G,OAAO,CAAC,cAAc,KAAK,SAAS,IAAI,gBAAO,SAAS,EAAC,uBAAuB,YAAE,OAAO,CAAC,IAAI,GAAS,EACvG,OAAO,CAAC,cAAc,KAAK,SAAS,IAAI,gBAAO,SAAS,EAAC,2BAA2B,YAAE,OAAO,CAAC,IAAI,GAAS,IACxG,EACL,OAAO,CAAC,cAAc,KAAK,SAAS,IAAI,CACvC,KAAC,cAAc,IAAC,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,YACjH,QAAQ,GACM,CAClB,IACE,CACN,CAAC,GACC,CACN,EACA,CAAC,QAAQ,EAAE,KAAK,IAAI,QAAQ,CAAC,cAAc,KAAK,SAAS,IAAI,CAC5D,KAAC,cAAc,IAAC,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,YACjH,QAAQ,GACM,CAClB,KAxBkB,QAAQ,CAAC,QAAQ,CAyBrB,CAClB,CAAC;gBACJ,CAAC,CAAC,IACE,CACP,GACG,CACP,CAAC;AACJ,CAAC","sourcesContent":["import React, { PropsWithChildren } from 'react';\n\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { PConnProps } from '../../../types/PConnProps';\n\nimport './MultiStep.css';\n\ninterface MultiStepProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n itemKey: string;\n actionButtons: any[];\n onButtonPress: any;\n bIsVertical: boolean;\n arNavigationSteps: any[];\n}\n\nexport default function MultiStep(props: PropsWithChildren<MultiStepProps>) {\n // Get emitted components from map (so we can get any override that may exist)\n const AssignmentCard = getComponentFromMap('AssignmentCard');\n\n const { getPConnect, children, itemKey = '', actionButtons, onButtonPress } = props;\n const { bIsVertical, arNavigationSteps } = props;\n\n // const svgCurrent = Utils.getImageSrc(\"circle-solid\", Utils.getSDKStaticConentUrl());\n // const svgNotCurrent = Utils.getImageSrc(\"circle-solid\", Utils.getSDKStaticConentUrl());\n\n function _getVIconClass(status): string {\n if (status === 'current') {\n return 'psdk-vertical-step-icon-selected';\n }\n\n return 'psdk-vertical-step-icon';\n }\n\n function _getVLabelClass(status): string {\n if (status === 'current') {\n return 'psdk-vertical-step-label-selected';\n }\n\n return 'psdk-vertical-step-label';\n }\n\n function _getVBodyClass(index: number): string {\n if (index < arNavigationSteps.length - 1) {\n return 'psdk-vertical-step-body psdk-vertical-step-line';\n }\n\n return 'psdk-vertical-step-body';\n }\n\n function _getHIconClass(status): string {\n if (status === 'current') {\n return 'psdk-horizontal-step-icon-selected';\n }\n\n return 'psdk-horizontal-step-icon';\n }\n\n function _getHLabelClass(status): string {\n if (status === 'current') {\n return 'psdk-horizontal-step-label-selected';\n }\n\n return 'psdk-horizontal-step-label';\n }\n\n function _showHLine(index: number): boolean {\n // eslint-disable-next-line sonarjs/prefer-single-boolean-return\n if (index < arNavigationSteps.length - 1) {\n return true;\n }\n\n return false;\n }\n\n function buttonPress(sAction: string, sButtonType: string) {\n onButtonPress(sAction, sButtonType);\n }\n\n return (\n <div>\n {bIsVertical ? (\n <div className='psdk-vertical-stepper'>\n {arNavigationSteps.map((mainStep, index) => {\n return (\n <React.Fragment key={mainStep.actionID}>\n <div className='psdk-vertical-step'>\n <div className='psdk-vertical-step-header'>\n <div className={_getVIconClass(mainStep.visited_status)}>\n <div className='psdk-vertical-step-icon-content'>\n <span>{index + 1}</span>\n </div>\n </div>\n <div className={_getVLabelClass(mainStep.visited_status)}>{mainStep.name}</div>\n </div>\n <div className={_getVBodyClass(index)}>\n {mainStep?.steps && (\n <ul\n style={{\n paddingInlineStart: '0rem',\n marginLeft: '-7px'\n }}\n >\n {mainStep.steps.forEach(subStep => {\n <li className='psdk-sub-step-list'>\n <div style={{ display: 'inline-flex' }}>\n {subStep.visited_status === 'current' && <img className='psdk-current-svg-icon' src='{svgCurrent}' />}\n {subStep.visited_status !== 'current' && <img className='psdk-not-current-svg-icon' src='{svgNotCurrent}' />}\n {subStep.visited_status === 'current' && <label className='psdk-sub-step-current'>{subStep.name}</label>}\n {subStep.visited_status !== 'current' && <label className='psdk-sub-step-not-current'>{subStep.name}</label>}\n </div>\n {subStep.visited_status === 'current' && (\n <div>\n <AssignmentCard getPConnect={getPConnect} itemKey={itemKey} actionButtons={actionButtons} onButtonPress={buttonPress}>\n {children}\n </AssignmentCard>\n </div>\n )}\n </li>;\n })}\n </ul>\n )}\n {!mainStep?.steps && mainStep.visited_status === 'current' && (\n <AssignmentCard getPConnect={getPConnect} itemKey={itemKey} actionButtons={actionButtons} onButtonPress={buttonPress}>\n {children}\n </AssignmentCard>\n )}\n </div>\n </div>\n </React.Fragment>\n );\n })}\n </div>\n ) : (\n <div className='psdk-horizontal-stepper'>\n <div className='psdk-horizontal-stepper-header-container'>\n {arNavigationSteps.map((mainStep, index) => {\n return (\n <React.Fragment key={mainStep.actionID}>\n <div className='psdk-horizontal-step-header'>\n <div className={_getHIconClass(mainStep.visited_status)}>\n <div className='psdk-horizontal-step-icon-content'>\n <span>{index + 1}</span>\n </div>\n </div>\n <div className={_getHLabelClass(mainStep.visited_status)}>\n <div className='psdk-horizontal-step-text-label'>{mainStep.name}</div>\n </div>\n </div>\n {_showHLine(index) && <div className='psdk-horizontal-step-line' />}\n </React.Fragment>\n );\n })}\n </div>\n {arNavigationSteps.map(mainStep => {\n return (\n <React.Fragment key={mainStep.actionID}>\n {mainStep.steps && (\n <ul style={{ paddingInlineStart: '0rem', marginLeft: '35px' }}>\n {mainStep.steps.map(subStep => (\n <li className='psdk-sub-step-list'>\n <div style={{ display: 'inline-flex' }}>\n {subStep.visited_status === 'current' && <img className='psdk-current-svg-icon' src='{svgCurrent}' />}\n {subStep.visited_status !== 'current' && <img className='psdk-not-current-svg-icon' src='{svgNotCurrent}' />}\n {subStep.visited_status === 'current' && <label className='psdk-sub-step-current'>{subStep.name}</label>}\n {subStep.visited_status !== 'current' && <label className='psdk-sub-step-not-current'>{subStep.name}</label>}\n </div>\n {subStep.visited_status === 'current' && (\n <AssignmentCard getPConnect={getPConnect} itemKey={itemKey} actionButtons={actionButtons} onButtonPress={buttonPress}>\n {children}\n </AssignmentCard>\n )}\n </li>\n ))}\n </ul>\n )}\n {!mainStep?.steps && mainStep.visited_status === 'current' && (\n <AssignmentCard getPConnect={getPConnect} itemKey={itemKey} actionButtons={actionButtons} onButtonPress={buttonPress}>\n {children}\n </AssignmentCard>\n )}\n </React.Fragment>\n );\n })}\n </div>\n )}\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"MultiStep.js","sourceRoot":"","sources":["../../../../src/components/infra/MultiStep/MultiStep.tsx"],"names":[],"mappings":";AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAGhF,OAAO,iBAAiB,CAAC;AAWzB,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAwC;IACxE,8EAA8E;IAC9E,MAAM,cAAc,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAE7D,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,GAAG,EAAE,EAAE,aAAa,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC;IACpF,MAAM,EAAE,WAAW,EAAE,iBAAiB,EAAE,GAAG,KAAK,CAAC;IAEjD,IAAI,WAAW,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC,EAAE,cAAc,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC;IACvF,IAAI,CAAC,WAAW,EAAE;QAChB,MAAM,mBAAmB,GAAG,iBAAiB,CAAC,aAAa,CAAC,CAAC,EAAE,cAAc,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC;QAC1G,WAAW,GAA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component_map';\nimport { PConnProps } from '../../../types/PConnProps';\n\nimport './MultiStep.css';\n\ninterface MultiStepProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n itemKey: string;\n actionButtons: any[];\n onButtonPress: any;\n bIsVertical: boolean;\n arNavigationSteps: any;\n}\n\nexport default function MultiStep(props: PropsWithChildren<MultiStepProps>) {\n // Get emitted components from map (so we can get any override that may exist)\n const AssignmentCard = getComponentFromMap('AssignmentCard');\n\n const { getPConnect, children, itemKey = '', actionButtons, onButtonPress } = props;\n const { bIsVertical, arNavigationSteps } = props;\n\n let currentStep = arNavigationSteps.find(({ visited_status: vs }) => vs === 'current');\n if (!currentStep) {\n const lastActiveStepIndex = arNavigationSteps.findLastIndex(({ visited_status: vs }) => vs === 'success');\n currentStep = arNavigationSteps[lastActiveStepIndex >= 0 ? lastActiveStepIndex : 0];\n }\n\n // const svgCurrent = Utils.getImageSrc(\"circle-solid\", Utils.getSDKStaticConentUrl());\n // const svgNotCurrent = Utils.getImageSrc(\"circle-solid\", Utils.getSDKStaticConentUrl());\n\n function _getVIconClass(status): string {\n if (status === 'current') {\n return 'psdk-vertical-step-icon-selected';\n }\n\n return 'psdk-vertical-step-icon';\n }\n\n function _getVLabelClass(status): string {\n if (status === 'current') {\n return 'psdk-vertical-step-label-selected';\n }\n\n return 'psdk-vertical-step-label';\n }\n\n function _getVBodyClass(index: number): string {\n if (index < arNavigationSteps.length - 1) {\n return 'psdk-vertical-step-body psdk-vertical-step-line';\n }\n\n return 'psdk-vertical-step-body';\n }\n\n function _getHIconClass(step): string {\n if (step.ID === currentStep?.ID) {\n return 'psdk-horizontal-step-icon-selected';\n }\n\n return 'psdk-horizontal-step-icon';\n }\n\n function _getHLabelClass(step): string {\n if (step.ID === currentStep?.ID) {\n return 'psdk-horizontal-step-label-selected';\n }\n\n return 'psdk-horizontal-step-label';\n }\n\n function _showHLine(index: number): boolean {\n // eslint-disable-next-line sonarjs/prefer-single-boolean-return\n if (index < arNavigationSteps.length - 1) {\n return true;\n }\n\n return false;\n }\n\n function buttonPress(sAction: string, sButtonType: string) {\n onButtonPress(sAction, sButtonType);\n }\n\n return (\n <div>\n {bIsVertical ? (\n <div className='psdk-vertical-stepper'>\n {arNavigationSteps.map((mainStep, index) => {\n return (\n <React.Fragment key={mainStep.actionID}>\n <div className='psdk-vertical-step'>\n <div className='psdk-vertical-step-header'>\n <div className={_getVIconClass(mainStep.visited_status)}>\n <div className='psdk-vertical-step-icon-content'>\n <span>{index + 1}</span>\n </div>\n </div>\n <div className={_getVLabelClass(mainStep.visited_status)}>{mainStep.name}</div>\n </div>\n <div className={_getVBodyClass(index)}>\n {mainStep?.steps && (\n <ul\n style={{\n paddingInlineStart: '0rem',\n marginLeft: '-7px'\n }}\n >\n {mainStep.steps.forEach(subStep => {\n <li className='psdk-sub-step-list'>\n <div style={{ display: 'inline-flex' }}>\n {subStep.visited_status === 'current' && <img className='psdk-current-svg-icon' src='{svgCurrent}' />}\n {subStep.visited_status !== 'current' && <img className='psdk-not-current-svg-icon' src='{svgNotCurrent}' />}\n {subStep.visited_status === 'current' && <label className='psdk-sub-step-current'>{subStep.name}</label>}\n {subStep.visited_status !== 'current' && <label className='psdk-sub-step-not-current'>{subStep.name}</label>}\n </div>\n {subStep.visited_status === 'current' && (\n <div>\n <AssignmentCard getPConnect={getPConnect} itemKey={itemKey} actionButtons={actionButtons} onButtonPress={buttonPress}>\n {children}\n </AssignmentCard>\n </div>\n )}\n </li>;\n })}\n </ul>\n )}\n {!mainStep?.steps && mainStep.visited_status === 'current' && (\n <AssignmentCard getPConnect={getPConnect} itemKey={itemKey} actionButtons={actionButtons} onButtonPress={buttonPress}>\n {children}\n </AssignmentCard>\n )}\n </div>\n </div>\n </React.Fragment>\n );\n })}\n </div>\n ) : (\n <div className='psdk-horizontal-stepper'>\n <div className='psdk-horizontal-stepper-header-container'>\n {arNavigationSteps.map((mainStep, index) => {\n return (\n <React.Fragment key={mainStep.actionID}>\n <div className='psdk-horizontal-step-header'>\n <div className={_getHIconClass(mainStep)}>\n <div className='psdk-horizontal-step-icon-content'>\n <span>{index + 1}</span>\n </div>\n </div>\n <div className={_getHLabelClass(mainStep)}>\n <div className='psdk-horizontal-step-text-label' id='selected-label'>\n {mainStep.name}\n </div>\n </div>\n </div>\n {_showHLine(index) && <div className='psdk-horizontal-step-line' />}\n </React.Fragment>\n );\n })}\n </div>\n {arNavigationSteps.map(mainStep => {\n return (\n <React.Fragment key={mainStep.actionID}>\n {mainStep.steps && (\n <ul style={{ paddingInlineStart: '0rem', marginLeft: '35px' }}>\n {mainStep.steps.map(subStep => (\n <li className='psdk-sub-step-list'>\n <div style={{ display: 'inline-flex' }}>\n {subStep.visited_status === 'current' && <img className='psdk-current-svg-icon' src='{svgCurrent}' />}\n {subStep.visited_status !== 'current' && <img className='psdk-not-current-svg-icon' src='{svgNotCurrent}' />}\n {subStep.visited_status === 'current' && <label className='psdk-sub-step-current'>{subStep.name}</label>}\n {subStep.visited_status !== 'current' && <label className='psdk-sub-step-not-current'>{subStep.name}</label>}\n </div>\n {subStep.visited_status === 'current' && (\n <AssignmentCard getPConnect={getPConnect} itemKey={itemKey} actionButtons={actionButtons} onButtonPress={buttonPress}>\n {children}\n </AssignmentCard>\n )}\n </li>\n ))}\n </ul>\n )}\n {!mainStep?.steps && mainStep.ID === currentStep?.ID && (\n <AssignmentCard getPConnect={getPConnect} itemKey={itemKey} actionButtons={actionButtons} onButtonPress={buttonPress}>\n {children}\n </AssignmentCard>\n )}\n </React.Fragment>\n );\n })}\n </div>\n )}\n </div>\n );\n}\n"]}
@@ -165,4 +165,5 @@
165
165
 
166
166
  .scrollable {
167
167
  overflow-y: scroll !important;
168
+ min-height: 200px !important;
168
169
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PConnProps } from '../../../types/PConnProps';
3
2
  import './NavBar.css';
4
3
  interface NavBarProps extends PConnProps {
@@ -7,6 +6,6 @@ interface NavBarProps extends PConnProps {
7
6
  caseTypes: any[];
8
7
  pConn?: any;
9
8
  }
10
- export default function NavBar(props: NavBarProps): JSX.Element;
9
+ export default function NavBar(props: NavBarProps): import("react/jsx-runtime").JSX.Element;
11
10
  export {};
12
11
  //# sourceMappingURL=NavBar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NavBar.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/NavBar/NavBar.tsx"],"names":[],"mappings":";AAkCA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,OAAO,cAAc,CAAC;AAEtB,UAAU,WAAY,SAAQ,UAAU;IAGtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC;IACd,SAAS,EAAE,GAAG,EAAE,CAAC;IACjB,KAAK,CAAC,EAAE,GAAG,CAAC;CACb;AA6DD,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,WAAW,eAuLhD"}
1
+ {"version":3,"file":"NavBar.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/NavBar/NavBar.tsx"],"names":[],"mappings":"AAsCA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,OAAO,cAAc,CAAC;AAEtB,UAAU,WAAY,SAAQ,UAAU;IAGtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC;IACd,SAAS,EAAE,GAAG,EAAE,CAAC;IACjB,KAAK,CAAC,EAAE,GAAG,CAAC;CACb;AAiED,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,WAAW,2CAuLhD"}
@@ -1,20 +1,24 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useEffect, useState } from 'react';
3
- import { makeStyles, useTheme } from '@material-ui/core/styles';
3
+ import { useTheme } from '@mui/material/styles';
4
+ import makeStyles from '@mui/styles/makeStyles';
4
5
  import clsx from 'clsx';
5
- import { Drawer, List, ListItem, ListItemIcon, ListItemText, ListItemSecondaryAction, Collapse, Divider, IconButton, Menu, MenuItem, Typography } from '@material-ui/core';
6
- import PersonOutlineIcon from '@material-ui/icons/PersonOutlineOutlined';
7
- import ChevronLeftIcon from '@material-ui/icons/ChevronLeft';
8
- import ChevronRightIcon from '@material-ui/icons/ChevronRight';
9
- import FlagOutlinedIcon from '@material-ui/icons/FlagOutlined';
10
- import HomeOutlinedIcon from '@material-ui/icons/HomeOutlined';
11
- import ExpandLess from '@material-ui/icons/ExpandLess';
12
- import ExpandMore from '@material-ui/icons/ExpandMore';
13
- import AddIcon from '@material-ui/icons/Add';
14
- import WorkOutlineIcon from '@material-ui/icons/WorkOutline';
15
- import ClearOutlinedIcon from '@material-ui/icons/ClearOutlined';
16
- import ArrowBackIcon from '@material-ui/icons/ArrowBack';
17
- import useMediaQuery from '@material-ui/core/useMediaQuery';
6
+ import { Drawer, List, ListItem, ListItemIcon, ListItemText, ListItemSecondaryAction, Collapse, Divider, IconButton, Menu, MenuItem, Typography } from '@mui/material';
7
+ import PersonOutlineIcon from '@mui/icons-material/PersonOutlineOutlined';
8
+ import ChevronLeftIcon from '@mui/icons-material/ChevronLeft';
9
+ import ChevronRightIcon from '@mui/icons-material/ChevronRight';
10
+ import FlagOutlinedIcon from '@mui/icons-material/FlagOutlined';
11
+ import HomeOutlinedIcon from '@mui/icons-material/HomeOutlined';
12
+ import TabletAndroidOutlineIcon from '@mui/icons-material/TabletAndroidOutlined';
13
+ import AirportShuttleOutlinedIcon from '@mui/icons-material/AirportShuttleOutlined';
14
+ import EditOutlinedIcon from '@mui/icons-material/EditOutlined';
15
+ import ExpandLess from '@mui/icons-material/ExpandLess';
16
+ import ExpandMore from '@mui/icons-material/ExpandMore';
17
+ import AddIcon from '@mui/icons-material/Add';
18
+ import WorkOutlineIcon from '@mui/icons-material/WorkOutline';
19
+ import ClearOutlinedIcon from '@mui/icons-material/ClearOutlined';
20
+ import ArrowBackIcon from '@mui/icons-material/ArrowBack';
21
+ import useMediaQuery from '@mui/material/useMediaQuery';
18
22
  import { logout } from '@pega/auth/lib/sdk-auth-manager';
19
23
  import { useNavBar } from '../../helpers/reactContextHelpers';
20
24
  import { Utils } from '../../helpers/utils';
@@ -22,7 +26,11 @@ import './NavBar.css';
22
26
  const iconMap = {
23
27
  'pi pi-headline': _jsx(HomeOutlinedIcon, { fontSize: 'large' }),
24
28
  'pi pi-flag-solid': _jsx(FlagOutlinedIcon, { fontSize: 'large' }),
25
- 'pi pi-home-solid': _jsx(HomeOutlinedIcon, { fontSize: 'large' })
29
+ 'pi pi-home-solid': _jsx(HomeOutlinedIcon, { fontSize: 'large' }),
30
+ 'pi pi-tablet': _jsx(TabletAndroidOutlineIcon, { fontSize: 'large' }),
31
+ 'pi pi-ambulance': _jsx(AirportShuttleOutlinedIcon, { fontSize: 'large' }),
32
+ 'pi pi-ink-solid': _jsx(EditOutlinedIcon, { fontSize: 'large' }),
33
+ 'pi pi-columns': _jsx(HomeOutlinedIcon, { fontSize: 'large' })
26
34
  };
27
35
  const drawerWidth = 300;
28
36
  const useStyles = makeStyles(theme => ({
@@ -146,7 +154,7 @@ export default function NavBar(props) {
146
154
  }, [isDesktop]);
147
155
  return (_jsxs(Drawer, { variant: 'permanent', classes: {
148
156
  paper: clsx(classes.drawerPaper, !open && classes.drawerPaperClose)
149
- }, open: open && isDesktop, children: [open ? (_jsx(List, { className: classes.appListItem, children: _jsxs(ListItem, { onClick: handleDrawerOpen, children: [_jsx(ListItemIcon, { children: _jsx("img", { src: portalLogoImage, className: classes.appListLogo }) }), _jsx(ListItemText, { primary: _jsx(Typography, { variant: 'h6', className: classes.applicationLabel, children: portalApp }) }), _jsx(ListItemSecondaryAction, { children: _jsx(IconButton, { edge: 'end', onClick: handleDrawerOpen, children: _jsx(ChevronLeftIcon, { className: classes.appListIcon }) }) })] }) })) : (_jsx("div", { className: classes.appListDiv, onClick: handleDrawerOpen, children: _jsx(ChevronRightIcon, { className: classes.appListIcon, id: 'chevron-right-icon', fontSize: 'large' }) })), _jsx(List, { children: _jsxs(ListItem, { button: true, onClick: handleCaseItemClick, children: [_jsx(ListItemIcon, { children: bShowCaseTypes && open ? _jsx(ClearOutlinedIcon, { fontSize: 'large' }) : _jsx(AddIcon, { fontSize: 'large' }) }), _jsx(ListItemText, { primary: 'Create' }), bShowCaseTypes ? _jsx(ExpandLess, {}) : _jsx(ExpandMore, {})] }) }), _jsx(Collapse, { in: bShowCaseTypes && open, timeout: 'auto', unmountOnExit: true, className: 'scrollable', children: _jsx(List, { component: 'div', disablePadding: true, children: caseTypes.map(caseType => (_jsxs(ListItem, { button: true, className: classes.nested, onClick: () => navPanelCreateCaseType(caseType.pyClassName, caseType.pyFlowType), children: [_jsx(ListItemIcon, { children: _jsx(WorkOutlineIcon, { fontSize: 'large' }) }), _jsx(ListItemText, { primary: localeUtils.getLocaleValue(caseType.pyLabel, '', localeReference) })] }, caseType.pyLabel))) }) }), _jsx(List, { children: navPages.map(page => (_jsxs(ListItem, { button: true, onClick: () => navPanelButtonClick(page), children: [_jsx(ListItemIcon, { children: iconMap[page.pxPageViewIcon] }), _jsx(ListItemText, { primary: localeUtils.getLocaleValue(page.pyLabel, '', localeReference) })] }, page.pyLabel))) }), _jsx(Divider, {}), _jsx(List, { className: 'marginTopAuto', children: _jsxs(_Fragment, { children: [_jsxs(ListItem, { onClick: navPanelOperatorButtonClick, style: { cursor: 'pointer' }, children: [_jsx(ListItemIcon, { children: _jsx(PersonOutlineIcon, { fontSize: 'large' }) }), _jsx(ListItemText, { primary: portalOperator }), open && (_jsx(ListItemSecondaryAction, { children: _jsx(IconButton, { edge: 'end', onClick: navPanelOperatorButtonClick, children: _jsx(ChevronRightIcon, {}) }) }))] }), _jsx(Menu, { anchorEl: anchorEl, keepMounted: bShowOperatorButtons, open: bShowOperatorButtons, onClick: navPanelOperatorButtonClick, anchorOrigin: {
157
+ }, open: open && isDesktop, children: [open ? (_jsx(List, { className: classes.appListItem, children: _jsxs(ListItem, { onClick: handleDrawerOpen, children: [_jsx(ListItemIcon, { children: _jsx("img", { src: portalLogoImage, className: classes.appListLogo }) }), _jsx(ListItemText, { primary: _jsx(Typography, { variant: 'h6', className: classes.applicationLabel, children: portalApp }) }), _jsx(ListItemSecondaryAction, { children: _jsx(IconButton, { edge: 'end', onClick: handleDrawerOpen, size: 'large', children: _jsx(ChevronLeftIcon, { className: classes.appListIcon }) }) })] }) })) : (_jsx("div", { className: classes.appListDiv, onClick: handleDrawerOpen, children: _jsx(ChevronRightIcon, { className: classes.appListIcon, id: 'chevron-right-icon', fontSize: 'large' }) })), _jsx(List, { children: _jsxs(ListItem, { button: true, onClick: handleCaseItemClick, children: [_jsx(ListItemIcon, { children: bShowCaseTypes && open ? _jsx(ClearOutlinedIcon, { fontSize: 'large' }) : _jsx(AddIcon, { fontSize: 'large' }) }), _jsx(ListItemText, { primary: 'Create' }), bShowCaseTypes ? _jsx(ExpandLess, {}) : _jsx(ExpandMore, {})] }) }), _jsx(Collapse, { in: bShowCaseTypes && open, timeout: 'auto', unmountOnExit: true, className: 'scrollable', children: _jsx(List, { component: 'div', disablePadding: true, children: caseTypes.map(caseType => (_jsxs(ListItem, { button: true, className: classes.nested, onClick: () => navPanelCreateCaseType(caseType.pyClassName, caseType.pyFlowType), children: [_jsx(ListItemIcon, { children: _jsx(WorkOutlineIcon, { fontSize: 'large' }) }), _jsx(ListItemText, { primary: localeUtils.getLocaleValue(caseType.pyLabel, '', localeReference) })] }, caseType.pyLabel))) }) }), _jsx(List, { children: navPages.map(page => (_jsxs(ListItem, { button: true, onClick: () => navPanelButtonClick(page), children: [_jsx(ListItemIcon, { children: iconMap[page.pxPageViewIcon] }), _jsx(ListItemText, { primary: localeUtils.getLocaleValue(page.pyLabel, '', localeReference) })] }, page.pyLabel))) }), _jsx(Divider, {}), _jsx(List, { className: 'marginTopAuto', children: _jsxs(_Fragment, { children: [_jsxs(ListItem, { onClick: navPanelOperatorButtonClick, children: [_jsx(ListItemIcon, { id: 'person-icon', children: _jsx(PersonOutlineIcon, { fontSize: 'large' }) }), _jsx(ListItemText, { primary: portalOperator }), open && (_jsx(ListItemSecondaryAction, { children: _jsx(IconButton, { edge: 'end', onClick: navPanelOperatorButtonClick, size: 'large', children: _jsx(ChevronRightIcon, {}) }) }))] }), _jsx(Menu, { anchorEl: anchorEl, keepMounted: bShowOperatorButtons, open: bShowOperatorButtons, onClick: navPanelOperatorButtonClick, anchorOrigin: {
150
158
  vertical: 'top',
151
159
  horizontal: 'right'
152
160
  }, transformOrigin: {