@pega/react-sdk-components 8.8.21 → 8.23.11-debug

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 (490) hide show
  1. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts +10 -7
  2. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts.map +1 -1
  3. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js +7 -0
  4. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.map +1 -1
  5. package/lib/components/designSystemExtension/Banner/Banner.d.ts +1 -15
  6. package/lib/components/designSystemExtension/Banner/Banner.d.ts.map +1 -1
  7. package/lib/components/designSystemExtension/Banner/Banner.js.map +1 -1
  8. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts +9 -6
  9. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
  10. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +7 -3
  11. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
  12. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts +10 -4
  13. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts.map +1 -1
  14. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +8 -1
  15. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
  16. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts +2 -6
  17. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
  18. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +3 -3
  19. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
  20. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts +2 -7
  21. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts.map +1 -1
  22. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js +3 -3
  23. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
  24. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts +2 -7
  25. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts.map +1 -1
  26. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +3 -3
  27. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
  28. package/lib/components/designSystemExtension/Operator/Operator.d.ts +7 -17
  29. package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
  30. package/lib/components/designSystemExtension/Operator/Operator.js +6 -1
  31. package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
  32. package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +1 -5
  33. package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
  34. package/lib/components/designSystemExtension/Pulse/Pulse.js +6 -3
  35. package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
  36. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts +1 -6
  37. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts.map +1 -1
  38. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
  39. package/lib/components/field/AutoComplete/AutoComplete.d.ts +1 -15
  40. package/lib/components/field/AutoComplete/AutoComplete.d.ts.map +1 -1
  41. package/lib/components/field/AutoComplete/AutoComplete.js +15 -17
  42. package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
  43. package/lib/components/field/CancelAlert/CancelAlert.d.ts +2 -7
  44. package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
  45. package/lib/components/field/CancelAlert/CancelAlert.js +3 -3
  46. package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
  47. package/lib/components/field/Checkbox/Checkbox.d.ts +1 -19
  48. package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
  49. package/lib/components/field/Checkbox/Checkbox.js +8 -10
  50. package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
  51. package/lib/components/field/Currency/Currency.d.ts +1 -6
  52. package/lib/components/field/Currency/Currency.d.ts.map +1 -1
  53. package/lib/components/field/Currency/Currency.js +11 -11
  54. package/lib/components/field/Currency/Currency.js.map +1 -1
  55. package/lib/components/field/Currency/currency-utils.d.ts.map +1 -1
  56. package/lib/components/field/Currency/currency-utils.js +1 -1
  57. package/lib/components/field/Currency/currency-utils.js.map +1 -1
  58. package/lib/components/field/Date/Date.d.ts +1 -5
  59. package/lib/components/field/Date/Date.d.ts.map +1 -1
  60. package/lib/components/field/Date/Date.js +6 -8
  61. package/lib/components/field/Date/Date.js.map +1 -1
  62. package/lib/components/field/DateTime/DateTime.d.ts +1 -5
  63. package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
  64. package/lib/components/field/DateTime/DateTime.js +8 -14
  65. package/lib/components/field/DateTime/DateTime.js.map +1 -1
  66. package/lib/components/field/Decimal/Decimal.d.ts +1 -8
  67. package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
  68. package/lib/components/field/Decimal/Decimal.js +9 -10
  69. package/lib/components/field/Decimal/Decimal.js.map +1 -1
  70. package/lib/components/field/Dropdown/Dropdown.d.ts +1 -10
  71. package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
  72. package/lib/components/field/Dropdown/Dropdown.js +9 -12
  73. package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
  74. package/lib/components/field/Email/Email.d.ts +1 -5
  75. package/lib/components/field/Email/Email.d.ts.map +1 -1
  76. package/lib/components/field/Email/Email.js +5 -7
  77. package/lib/components/field/Email/Email.js.map +1 -1
  78. package/lib/components/field/Integer/Integer.d.ts +1 -5
  79. package/lib/components/field/Integer/Integer.d.ts.map +1 -1
  80. package/lib/components/field/Integer/Integer.js +4 -6
  81. package/lib/components/field/Integer/Integer.js.map +1 -1
  82. package/lib/components/field/Percentage/Percentage.d.ts +1 -5
  83. package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
  84. package/lib/components/field/Percentage/Percentage.js +4 -6
  85. package/lib/components/field/Percentage/Percentage.js.map +1 -1
  86. package/lib/components/field/Phone/Phone.d.ts +1 -5
  87. package/lib/components/field/Phone/Phone.d.ts.map +1 -1
  88. package/lib/components/field/Phone/Phone.js +6 -8
  89. package/lib/components/field/Phone/Phone.js.map +1 -1
  90. package/lib/components/field/RadioButtons/RadioButtons.d.ts +1 -7
  91. package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
  92. package/lib/components/field/RadioButtons/RadioButtons.js +12 -12
  93. package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
  94. package/lib/components/field/SemanticLink/SemanticLink.d.ts +9 -5
  95. package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
  96. package/lib/components/field/SemanticLink/SemanticLink.js +14 -10
  97. package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
  98. package/lib/components/field/TextArea/TextArea.d.ts +1 -6
  99. package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
  100. package/lib/components/field/TextArea/TextArea.js +3 -5
  101. package/lib/components/field/TextArea/TextArea.js.map +1 -1
  102. package/lib/components/field/TextContent/TextContent.d.ts +1 -7
  103. package/lib/components/field/TextContent/TextContent.d.ts.map +1 -1
  104. package/lib/components/field/TextContent/TextContent.js.map +1 -1
  105. package/lib/components/field/TextInput/TextInput.d.ts +1 -6
  106. package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
  107. package/lib/components/field/TextInput/TextInput.js +4 -6
  108. package/lib/components/field/TextInput/TextInput.js.map +1 -1
  109. package/lib/components/field/Time/Time.d.ts +1 -5
  110. package/lib/components/field/Time/Time.d.ts.map +1 -1
  111. package/lib/components/field/Time/Time.js +8 -10
  112. package/lib/components/field/Time/Time.js.map +1 -1
  113. package/lib/components/field/URL/URL.d.ts +1 -5
  114. package/lib/components/field/URL/URL.d.ts.map +1 -1
  115. package/lib/components/field/URL/URL.js +4 -6
  116. package/lib/components/field/URL/URL.js.map +1 -1
  117. package/lib/components/field/UserReference/UserReference.d.ts +40 -19
  118. package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
  119. package/lib/components/field/UserReference/UserReference.js +45 -16
  120. package/lib/components/field/UserReference/UserReference.js.map +1 -1
  121. package/lib/components/helpers/attachmentHelpers.d.ts +3 -3
  122. package/lib/components/helpers/attachmentHelpers.d.ts.map +1 -1
  123. package/lib/components/helpers/attachmentHelpers.js.map +1 -1
  124. package/lib/components/helpers/auth.d.ts +6 -8
  125. package/lib/components/helpers/auth.d.ts.map +1 -1
  126. package/lib/components/helpers/auth.js +335 -642
  127. package/lib/components/helpers/auth.js.map +1 -1
  128. package/lib/components/helpers/authManager.d.ts +17 -20
  129. package/lib/components/helpers/authManager.d.ts.map +1 -1
  130. package/lib/components/helpers/authManager.js +439 -711
  131. package/lib/components/helpers/authManager.js.map +1 -1
  132. package/lib/components/helpers/case-utils.d.ts.map +1 -1
  133. package/lib/components/helpers/case-utils.js +4 -5
  134. package/lib/components/helpers/case-utils.js.map +1 -1
  135. package/lib/components/helpers/common-utils.d.ts +1 -1
  136. package/lib/components/helpers/common-utils.js.map +1 -1
  137. package/lib/components/helpers/config_access.d.ts.map +1 -1
  138. package/lib/components/helpers/config_access.js +63 -0
  139. package/lib/components/helpers/config_access.js.map +1 -1
  140. package/lib/components/helpers/date-format-utils.d.ts +6 -1
  141. package/lib/components/helpers/date-format-utils.d.ts.map +1 -1
  142. package/lib/components/helpers/date-format-utils.js.map +1 -1
  143. package/lib/components/helpers/event-utils.d.ts +1 -1
  144. package/lib/components/helpers/event-utils.d.ts.map +1 -1
  145. package/lib/components/helpers/event-utils.js.map +1 -1
  146. package/lib/components/helpers/formatters/Currency.d.ts +6 -6
  147. package/lib/components/helpers/formatters/Currency.js +2 -2
  148. package/lib/components/helpers/formatters/Currency.js.map +1 -1
  149. package/lib/components/helpers/formatters/CurrencyMap.d.ts +320 -69
  150. package/lib/components/helpers/formatters/CurrencyMap.d.ts.map +1 -1
  151. package/lib/components/helpers/formatters/CurrencyMap.js.map +1 -1
  152. package/lib/components/helpers/formatters/Date.d.ts +4 -4
  153. package/lib/components/helpers/formatters/Date.js.map +1 -1
  154. package/lib/components/helpers/formatters/common.d.ts +1 -1
  155. package/lib/components/helpers/formatters/common.d.ts.map +1 -1
  156. package/lib/components/helpers/formatters/common.js.map +1 -1
  157. package/lib/components/helpers/formatters/index.d.ts +11 -11
  158. package/lib/components/helpers/formatters/index.d.ts.map +1 -1
  159. package/lib/components/helpers/formatters/index.js.map +1 -1
  160. package/lib/components/helpers/simpleTableHelpers.d.ts +1 -3
  161. package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
  162. package/lib/components/helpers/simpleTableHelpers.js +3 -5
  163. package/lib/components/helpers/simpleTableHelpers.js.map +1 -1
  164. package/lib/components/helpers/state-utils.d.ts.map +1 -1
  165. package/lib/components/helpers/state-utils.js.map +1 -1
  166. package/lib/components/helpers/template-utils.d.ts +3 -7
  167. package/lib/components/helpers/template-utils.d.ts.map +1 -1
  168. package/lib/components/helpers/template-utils.js +0 -1
  169. package/lib/components/helpers/template-utils.js.map +1 -1
  170. package/lib/components/helpers/versionHelpers.d.ts +0 -6
  171. package/lib/components/helpers/versionHelpers.d.ts.map +1 -1
  172. package/lib/components/helpers/versionHelpers.js +0 -6
  173. package/lib/components/helpers/versionHelpers.js.map +1 -1
  174. package/lib/components/infra/ActionButtons/ActionButtons.d.ts +13 -6
  175. package/lib/components/infra/ActionButtons/ActionButtons.d.ts.map +1 -1
  176. package/lib/components/infra/ActionButtons/ActionButtons.js +13 -1
  177. package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
  178. package/lib/components/infra/Assignment/Assignment.d.ts +15 -9
  179. package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
  180. package/lib/components/infra/Assignment/Assignment.js +21 -8
  181. package/lib/components/infra/Assignment/Assignment.js.map +1 -1
  182. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +14 -8
  183. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
  184. package/lib/components/infra/AssignmentCard/AssignmentCard.js +16 -3
  185. package/lib/components/infra/AssignmentCard/AssignmentCard.js.map +1 -1
  186. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +21 -1
  187. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
  188. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +48 -41
  189. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
  190. package/lib/components/infra/Containers/FlowContainer/helpers.d.ts.map +1 -1
  191. package/lib/components/infra/Containers/FlowContainer/helpers.js.map +1 -1
  192. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +17 -8
  193. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
  194. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +17 -6
  195. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
  196. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +22 -9
  197. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
  198. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +20 -3
  199. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
  200. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +19 -9
  201. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
  202. package/lib/components/infra/DashboardFilter/DashboardFilter.js +16 -2
  203. package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
  204. package/lib/components/infra/DashboardFilter/filterUtils.js +1 -1
  205. package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
  206. package/lib/components/infra/DeferLoad/DeferLoad.d.ts +14 -1
  207. package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
  208. package/lib/components/infra/DeferLoad/DeferLoad.js +15 -13
  209. package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
  210. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +12 -5
  211. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
  212. package/lib/components/infra/ErrorBoundary/ErrorBoundary.js +12 -2
  213. package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
  214. package/lib/components/infra/MultiStep/MultiStep.d.ts +17 -11
  215. package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
  216. package/lib/components/infra/MultiStep/MultiStep.js +18 -4
  217. package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
  218. package/lib/components/infra/NavBar/NavBar.d.ts +16 -8
  219. package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
  220. package/lib/components/infra/NavBar/NavBar.js +16 -3
  221. package/lib/components/infra/NavBar/NavBar.js.map +1 -1
  222. package/lib/components/infra/Reference/Reference.d.ts +17 -8
  223. package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
  224. package/lib/components/infra/Reference/Reference.js +15 -1
  225. package/lib/components/infra/Reference/Reference.js.map +1 -1
  226. package/lib/components/infra/Region/Region.d.ts +7 -4
  227. package/lib/components/infra/Region/Region.d.ts.map +1 -1
  228. package/lib/components/infra/Region/Region.js +4 -0
  229. package/lib/components/infra/Region/Region.js.map +1 -1
  230. package/lib/components/infra/RootContainer/RootContainer.d.ts +21 -1
  231. package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
  232. package/lib/components/infra/RootContainer/RootContainer.js +21 -4
  233. package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
  234. package/lib/components/infra/Stages/Stages.d.ts +8 -5
  235. package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
  236. package/lib/components/infra/Stages/Stages.js +6 -1
  237. package/lib/components/infra/Stages/Stages.js.map +1 -1
  238. package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.d.ts.map +1 -1
  239. package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js.map +1 -1
  240. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts +10 -4
  241. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts.map +1 -1
  242. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +9 -4
  243. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
  244. package/lib/components/infra/View/View.d.ts +16 -13
  245. package/lib/components/infra/View/View.d.ts.map +1 -1
  246. package/lib/components/infra/View/View.js +20 -2
  247. package/lib/components/infra/View/View.js.map +1 -1
  248. package/lib/components/template/AppShell/AppShell.d.ts +15 -20
  249. package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
  250. package/lib/components/template/AppShell/AppShell.js +22 -10
  251. package/lib/components/template/AppShell/AppShell.js.map +1 -1
  252. package/lib/components/template/BannerPage/BannerPage.d.ts +23 -11
  253. package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
  254. package/lib/components/template/BannerPage/BannerPage.js +22 -4
  255. package/lib/components/template/BannerPage/BannerPage.js.map +1 -1
  256. package/lib/components/template/CaseSummary/CaseSummary.d.ts +7 -5
  257. package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
  258. package/lib/components/template/CaseSummary/CaseSummary.js +6 -6
  259. package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
  260. package/lib/components/template/CaseView/CaseView.d.ts +22 -10
  261. package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
  262. package/lib/components/template/CaseView/CaseView.js +21 -8
  263. package/lib/components/template/CaseView/CaseView.js.map +1 -1
  264. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +15 -8
  265. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
  266. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +12 -0
  267. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
  268. package/lib/components/template/Confirmation/Confirmation.d.ts +16 -10
  269. package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
  270. package/lib/components/template/Confirmation/Confirmation.js +23 -12
  271. package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
  272. package/lib/components/template/DataReference/DataReference.d.ts +31 -1
  273. package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
  274. package/lib/components/template/DataReference/DataReference.js +48 -41
  275. package/lib/components/template/DataReference/DataReference.js.map +1 -1
  276. package/lib/components/template/DefaultForm/DefaultForm.d.ts +11 -1
  277. package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
  278. package/lib/components/template/DefaultForm/DefaultForm.js +10 -9
  279. package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
  280. package/lib/components/template/Details/Details/Details.d.ts +16 -1
  281. package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
  282. package/lib/components/template/Details/Details/Details.js +15 -10
  283. package/lib/components/template/Details/Details/Details.js.map +1 -1
  284. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +15 -7
  285. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
  286. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js +13 -1
  287. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
  288. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +16 -1
  289. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
  290. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +16 -14
  291. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
  292. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +16 -1
  293. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
  294. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +16 -14
  295. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
  296. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +19 -12
  297. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
  298. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +21 -7
  299. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
  300. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +7 -7
  301. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
  302. package/lib/components/template/InlineDashboard/InlineDashboard.js +5 -0
  303. package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
  304. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +15 -8
  305. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
  306. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js +14 -5
  307. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js.map +1 -1
  308. package/lib/components/template/ListPage/ListPage.d.ts +13 -5
  309. package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
  310. package/lib/components/template/ListPage/ListPage.js +10 -6
  311. package/lib/components/template/ListPage/ListPage.js.map +1 -1
  312. package/lib/components/template/ListView/ListView.d.ts +9 -1
  313. package/lib/components/template/ListView/ListView.d.ts.map +1 -1
  314. package/lib/components/template/ListView/ListView.js +123 -127
  315. package/lib/components/template/ListView/ListView.js.map +1 -1
  316. package/lib/components/template/ListView/utils.d.ts +0 -44
  317. package/lib/components/template/ListView/utils.d.ts.map +1 -1
  318. package/lib/components/template/ListView/utils.js +1 -142
  319. package/lib/components/template/ListView/utils.js.map +1 -1
  320. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +13 -9
  321. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
  322. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js +13 -2
  323. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -1
  324. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +1 -10
  325. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -1
  326. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js.map +1 -1
  327. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +16 -1
  328. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
  329. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +16 -14
  330. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
  331. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +1 -5
  332. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -1
  333. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js.map +1 -1
  334. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +14 -7
  335. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
  336. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js +13 -4
  337. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -1
  338. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +7 -4
  339. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
  340. package/lib/components/template/OneColumn/OneColumn/OneColumn.js +5 -0
  341. package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
  342. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +8 -4
  343. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
  344. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js +6 -3
  345. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -1
  346. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +7 -4
  347. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
  348. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js +5 -0
  349. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js.map +1 -1
  350. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +15 -1
  351. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
  352. package/lib/components/template/PromotedFilters/PromotedFilters.js +11 -15
  353. package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
  354. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
  355. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js +5 -57
  356. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
  357. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +1 -18
  358. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
  359. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +2 -2
  360. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
  361. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +29 -1
  362. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
  363. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js +28 -22
  364. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
  365. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +26 -14
  366. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
  367. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js +26 -5
  368. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
  369. package/lib/components/template/SubTabs/SubTabs.d.ts +10 -4
  370. package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
  371. package/lib/components/template/SubTabs/SubTabs.js +8 -1
  372. package/lib/components/template/SubTabs/SubTabs.js.map +1 -1
  373. package/lib/components/template/SubTabs/tabUtils.d.ts.map +1 -1
  374. package/lib/components/template/SubTabs/tabUtils.js.map +1 -1
  375. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts +11 -5
  376. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
  377. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +12 -1
  378. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
  379. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +8 -4
  380. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
  381. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js +6 -3
  382. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -1
  383. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +11 -5
  384. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
  385. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +9 -1
  386. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
  387. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +1 -10
  388. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
  389. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js +1 -1
  390. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js.map +1 -1
  391. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +16 -1
  392. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
  393. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +23 -31
  394. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
  395. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +1 -5
  396. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -1
  397. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js.map +1 -1
  398. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +14 -7
  399. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
  400. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js +14 -4
  401. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js.map +1 -1
  402. package/lib/components/template/WssNavBar/WssNavBar.d.ts +1 -17
  403. package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -1
  404. package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
  405. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts +17 -8
  406. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
  407. package/lib/components/widget/AppAnnouncement/AppAnnouncement.js +19 -4
  408. package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
  409. package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
  410. package/lib/components/widget/Attachment/Attachment.js +16 -24
  411. package/lib/components/widget/Attachment/Attachment.js.map +1 -1
  412. package/lib/components/widget/CaseHistory/CaseHistory.d.ts +7 -4
  413. package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
  414. package/lib/components/widget/CaseHistory/CaseHistory.js +8 -4
  415. package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
  416. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +1 -8
  417. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts.map +1 -1
  418. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
  419. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +1 -5
  420. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
  421. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +21 -31
  422. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
  423. package/lib/components/widget/Followers/Followers.d.ts +5 -4
  424. package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
  425. package/lib/components/widget/Followers/Followers.js +10 -3
  426. package/lib/components/widget/Followers/Followers.js.map +1 -1
  427. package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
  428. package/lib/components/widget/QuickCreate/QuickCreate.js +2 -10
  429. package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
  430. package/lib/components/widget/SummaryItem/SummaryItem.d.ts +1 -7
  431. package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
  432. package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
  433. package/lib/components/widget/SummaryList/SummaryList.d.ts +1 -7
  434. package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
  435. package/lib/components/widget/SummaryList/SummaryList.js +2 -5
  436. package/lib/components/widget/SummaryList/SummaryList.js.map +1 -1
  437. package/lib/components/widget/ToDo/ToDo.d.ts +27 -13
  438. package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
  439. package/lib/components/widget/ToDo/ToDo.js +64 -28
  440. package/lib/components/widget/ToDo/ToDo.js.map +1 -1
  441. package/lib/doc/KeyReleaseUpdates.md +0 -21
  442. package/lib/index.d.ts +0 -1
  443. package/lib/index.d.ts.map +1 -1
  444. package/lib/index.js +1 -2
  445. package/lib/index.js.map +1 -1
  446. package/lib/sdk-pega-component-map.d.ts +1 -15
  447. package/lib/sdk-pega-component-map.js +1 -15
  448. package/lib/sdk-pega-component-map.js.map +1 -1
  449. package/package.json +1 -1
  450. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts +0 -19
  451. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +0 -1
  452. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +0 -77
  453. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +0 -1
  454. package/lib/components/designSystemExtension/RichTextEditor/index.d.ts +0 -2
  455. package/lib/components/designSystemExtension/RichTextEditor/index.d.ts.map +0 -1
  456. package/lib/components/designSystemExtension/RichTextEditor/index.js +0 -2
  457. package/lib/components/designSystemExtension/RichTextEditor/index.js.map +0 -1
  458. package/lib/components/field/RichText/RichText.d.ts +0 -7
  459. package/lib/components/field/RichText/RichText.d.ts.map +0 -1
  460. package/lib/components/field/RichText/RichText.js +0 -51
  461. package/lib/components/field/RichText/RichText.js.map +0 -1
  462. package/lib/components/field/RichText/index.d.ts +0 -2
  463. package/lib/components/field/RichText/index.d.ts.map +0 -1
  464. package/lib/components/field/RichText/index.js +0 -2
  465. package/lib/components/field/RichText/index.js.map +0 -1
  466. package/lib/components/field/ScalarList/ScalarList.d.ts +0 -13
  467. package/lib/components/field/ScalarList/ScalarList.d.ts.map +0 -1
  468. package/lib/components/field/ScalarList/ScalarList.js +0 -34
  469. package/lib/components/field/ScalarList/ScalarList.js.map +0 -1
  470. package/lib/components/field/ScalarList/index.d.ts +0 -2
  471. package/lib/components/field/ScalarList/index.d.ts.map +0 -1
  472. package/lib/components/field/ScalarList/index.js +0 -2
  473. package/lib/components/field/ScalarList/index.js.map +0 -1
  474. package/lib/hooks/index.d.ts +0 -4
  475. package/lib/hooks/index.d.ts.map +0 -1
  476. package/lib/hooks/index.js +0 -4
  477. package/lib/hooks/index.js.map +0 -1
  478. package/lib/hooks/useAfterInitialEffect.d.ts +0 -9
  479. package/lib/hooks/useAfterInitialEffect.d.ts.map +0 -1
  480. package/lib/hooks/useAfterInitialEffect.js +0 -16
  481. package/lib/hooks/useAfterInitialEffect.js.map +0 -1
  482. package/lib/hooks/useConsolidatedRef.d.ts +0 -9
  483. package/lib/hooks/useConsolidatedRef.d.ts.map +0 -1
  484. package/lib/hooks/useConsolidatedRef.js +0 -30
  485. package/lib/hooks/useConsolidatedRef.js.map +0 -1
  486. package/lib/hooks/useUID.d.ts +0 -8
  487. package/lib/hooks/useUID.d.ts.map +0 -1
  488. package/lib/hooks/useUID.js +0 -14
  489. package/lib/hooks/useUID.js.map +0 -1
  490. package/lib/types/PConnProps.d.ts +0 -42
@@ -1,16 +1,15 @@
1
1
  import React, { useState, useEffect } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import AssignmentCard from '../AssignmentCard';
4
+ import MultiStep from '../MultiStep';
2
5
  import Snackbar from '@material-ui/core/Snackbar';
3
6
  import IconButton from '@material-ui/core/IconButton';
4
7
  import CloseIcon from '@material-ui/icons/Close';
5
- import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
6
8
  export default function Assignment(props) {
7
- // Get emitted components from map (so we can get any override that may exist)
8
- const AssignmentCard = getComponentFromMap("AssignmentCard");
9
- const MultiStep = getComponentFromMap("MultiStep");
10
- const { getPConnect, children, itemKey = '', isInModal = false, banners = [] } = props;
9
+ const { getPConnect, children, itemKey, isInModal, banners } = props;
11
10
  const thePConn = getPConnect();
12
11
  const [bHasNavigation, setHasNavigation] = useState(false);
13
- const [actionButtons, setActionButtons] = useState([]);
12
+ const [actionButtons, setActionButtons] = useState({});
14
13
  const [bIsVertical, setIsVertical] = useState(false);
15
14
  const [arCurrentStepIndicies, setArCurrentStepIndicies] = useState([]);
16
15
  const [arNavigationSteps, setArNavigationSteps] = useState([]);
@@ -54,7 +53,7 @@ export default function Assignment(props) {
54
53
  // debugger;
55
54
  const oWorkItem = children[0].props.getPConnect();
56
55
  const oWorkData = oWorkItem.getDataObject();
57
- const oData = thePConn.getDataObject(thePConn.getContextName());
56
+ const oData = thePConn.getDataObject();
58
57
  if (oWorkData?.caseInfo && oWorkData.caseInfo.assignments !== null) {
59
58
  const oCaseInfo = oData.caseInfo;
60
59
  if (oCaseInfo && oCaseInfo.actionButtons) {
@@ -138,7 +137,7 @@ export default function Assignment(props) {
138
137
  const isAssignmentInCreateStage = thePConn.getCaseInfo().isAssignmentInCreateStage();
139
138
  const isLocalAction = thePConn.getCaseInfo().isLocalAction() ||
140
139
  (PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION &&
141
- getPConnect().getValue(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION, '')); // 2nd arg empty string until typedefs allow it to be optional
140
+ getPConnect().getValue(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION));
142
141
  if (isAssignmentInCreateStage && isInModal && !isLocalAction) {
143
142
  const cancelPromise = cancelCreateStageAssignment(itemKey);
144
143
  cancelPromise
@@ -215,4 +214,18 @@ export default function Assignment(props) {
215
214
  // <lit-toast></lit-toast>
216
215
  // </div>`}
217
216
  // `;
217
+ Assignment.propTypes = {
218
+ children: PropTypes.node.isRequired,
219
+ getPConnect: PropTypes.func.isRequired,
220
+ itemKey: PropTypes.string,
221
+ isInModal: PropTypes.bool,
222
+ banners: PropTypes.any
223
+ // actionButtons: PropTypes.object
224
+ // buildName: PropTypes.string
225
+ };
226
+ Assignment.defaultProps = {
227
+ itemKey: null,
228
+ isInModal: false
229
+ // buildName: null
230
+ };
218
231
  //# sourceMappingURL=Assignment.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Assignment.js","sourceRoot":"","sources":["../../../../src/components/infra/Assignment/Assignment.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,QAAQ,MAAM,4BAA4B,CAAC;AAClD,OAAO,UAAU,MAAM,8BAA8B,CAAC;AACtD,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AK,EAAC,SAAS,EACf,OAAO,EAAE,mBAAmB;oBAE5B,oBAAC,SAAS,IAAC,QAAQ,EAAC,OAAO,GAAG,CACnB,GAEf,CACa,CAClB,CACG,CACP,CAAC;AACJ,CAAC;AAED,cAAc;AACd,sBAAsB;AACtB,yBAAyB;AACzB,UAAU;AACV,iCAAiC;AACjC,wGAAwG;AACxG,8FAA8F;AAC9F,gGAAgG;AAChG,uDAAuD;AACvD,sEAAsE;AACtE,8BAA8B;AAC9B,8BAA8B;AAC9B,cAAc;AACd,QAAQ;AACR,UAAU;AACV,YAAY;AACZ,iHAAiH;AACjH,gGAAgG;AAChG,yEAAyE;AACzE,uCAAuC;AACvC,kCAAkC;AAClC,eAAe;AACf,KAAK","sourcesContent":["import React, { useState, useEffect } from 'react';\nimport Snackbar from '@material-ui/core/Snackbar';\nimport IconButton from '@material-ui/core/IconButton';\nimport CloseIcon from '@material-ui/icons/Close';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\n\nimport type { PConnProps } from '../../../types/PConnProps';\n\ninterface AssignmentProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n children: Array<any>,\n itemKey: string,\n isInModal: boolean,\n banners: Array<any>\n // eslint-disable-next-line react/no-unused-prop-types\n actionButtons: Array<any>,\n}\n\n\nexport default function Assignment(props: AssignmentProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const AssignmentCard = getComponentFromMap(\"AssignmentCard\");\n const MultiStep = getComponentFromMap(\"MultiStep\");\n\n const { getPConnect, children, itemKey = '', isInModal = false, banners = [] } = props;\n const thePConn = getPConnect();\n\n const [bHasNavigation, setHasNavigation] = useState(false);\n const [actionButtons, setActionButtons] = useState([]);\n const [bIsVertical, setIsVertical] = useState(false);\n const [arCurrentStepIndicies, setArCurrentStepIndicies] = useState<Array<any>>([]);\n const [arNavigationSteps, setArNavigationSteps] = useState<Array<any>>([]);\n\n const actionsAPI = thePConn.getActionsApi();\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'Assignment';\n const localeReference = `${getPConnect().getCaseInfo().getClassName()}!CASE!${getPConnect().getCaseInfo().getName()}`.toUpperCase();\n\n // store off bound functions to above pointers\n const finishAssignment = actionsAPI.finishAssignment.bind(actionsAPI);\n const navigateToStep = actionsAPI.navigateToStep.bind(actionsAPI);\n const cancelAssignment = actionsAPI.cancelAssignment.bind(actionsAPI);\n const saveAssignment = actionsAPI.saveAssignment?.bind(actionsAPI);\n const cancelCreateStageAssignment = actionsAPI.cancelCreateStageAssignment.bind(actionsAPI);\n // const showPage = actionsAPI.showPage.bind(actionsAPI);\n\n const [showSnackbar, setShowSnackbar] = useState(false);\n const [snackbarMessage, setSnackbarMessage] = useState('');\n\n function findCurrentIndicies(\n arStepperSteps: Array<any>,\n arIndicies: Array<number>,\n depth: number\n ): Array<number> {\n let count = 0;\n arStepperSteps.forEach(step => {\n if (step.visited_status === 'current') {\n arIndicies[depth] = count;\n\n // add in\n step['step_status'] = '';\n } else if (step.visited_status === 'success') {\n count += 1;\n step.step_status = 'completed';\n } else {\n count += 1;\n step.step_status = '';\n }\n\n if (step.steps) {\n arIndicies = findCurrentIndicies(step.steps, arIndicies, depth + 1);\n }\n });\n\n return arIndicies;\n }\n\n useEffect(() => {\n if (children && children.length > 0) {\n // debugger;\n\n const oWorkItem = children[0].props.getPConnect();\n const oWorkData = oWorkItem.getDataObject();\n const oData = thePConn.getDataObject(thePConn.getContextName());\n\n if (oWorkData?.caseInfo && oWorkData.caseInfo.assignments !== null) {\n const oCaseInfo = oData.caseInfo;\n\n if (oCaseInfo && oCaseInfo.actionButtons) {\n setActionButtons(oCaseInfo.actionButtons);\n }\n\n if (oCaseInfo?.navigation /* was oCaseInfo.navigation != null */) {\n setHasNavigation(true);\n\n if (\n oCaseInfo.navigation.template &&\n oCaseInfo.navigation.template.toLowerCase() === 'standard'\n ) {\n setHasNavigation(false);\n } else if (\n oCaseInfo.navigation.template &&\n oCaseInfo.navigation.template.toLowerCase() === 'vertical'\n ) {\n setIsVertical(true);\n } else {\n setIsVertical(false);\n }\n const steps = JSON.parse(JSON.stringify(oCaseInfo?.navigation?.steps));\n steps.forEach(step => {\n if (step.name) {\n step.name = PCore.getLocaleUtils().getLocaleValue(step.name, undefined, localeReference);\n }\n });\n setArNavigationSteps(steps);\n setArCurrentStepIndicies(\n findCurrentIndicies(arNavigationSteps, arCurrentStepIndicies, 0)\n );\n }\n }\n }\n }, [children]);\n\n function showToast(message: string) {\n const theMessage = `Assignment: ${message}`;\n // eslint-disable-next-line no-console\n console.error(theMessage);\n setSnackbarMessage(message);\n setShowSnackbar(true);\n }\n\n function handleSnackbarClose(event: React.SyntheticEvent | React.MouseEvent, reason?: string) {\n if (reason === 'clickaway') {\n return;\n }\n setShowSnackbar(false);\n }\n\n function onSaveActionSuccess(data) {\n actionsAPI.cancelAssignment(itemKey).then(() => {\n PCore.getPubSubUtils().publish(\n PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_SAVED,\n data\n );\n });\n }\n\n function buttonPress(sAction: string, sButtonType: string) {\n if (sButtonType === 'secondary') {\n switch (sAction) {\n case 'navigateToStep': {\n const navigatePromise = navigateToStep('previous', itemKey);\n\n navigatePromise\n .then(() => {})\n .catch(() => {\n showToast(`${localizedVal('Navigation failed!', localeCategory)}`);\n });\n\n break;\n }\n\n case 'saveAssignment': {\n const caseID = thePConn.getCaseInfo().getKey();\n const assignmentID = thePConn.getCaseInfo().getAssignmentID();\n const savePromise = saveAssignment(itemKey);\n\n savePromise\n .then(() => {\n const caseType = thePConn\n .getCaseInfo()\n .c11nEnv.getValue(PCore.getConstants().CASE_INFO.CASE_TYPE_ID);\n onSaveActionSuccess({ caseType, caseID, assignmentID });\n })\n .catch(() => {\n showToast(`${localizedVal('Save failed', localeCategory)}`);\n });\n\n break;\n }\n\n case 'cancelAssignment': {\n // check if create stage (modal)\n const { PUB_SUB_EVENTS } = PCore.getConstants();\n const { publish } = PCore.getPubSubUtils();\n const isAssignmentInCreateStage = thePConn.getCaseInfo().isAssignmentInCreateStage();\n const isLocalAction =\n thePConn.getCaseInfo().isLocalAction() ||\n (PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION &&\n getPConnect().getValue(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION, ''));// 2nd arg empty string until typedefs allow it to be optional\n if (isAssignmentInCreateStage && isInModal && !isLocalAction) {\n const cancelPromise = cancelCreateStageAssignment(itemKey);\n\n cancelPromise\n .then(data => {\n publish(PUB_SUB_EVENTS.EVENT_CANCEL, data);\n })\n .catch(() => {\n showToast(`${localizedVal('Cancel failed!', localeCategory)}`);\n });\n } else {\n const cancelPromise = cancelAssignment(itemKey);\n\n cancelPromise\n .then(data => {\n publish(PUB_SUB_EVENTS.EVENT_CANCEL, data);\n })\n .catch(() => {\n showToast(`${localizedVal('Cancel failed!', localeCategory)}`);\n });\n }\n break;\n }\n\n default:\n break;\n }\n } else if (sButtonType === 'primary') {\n // eslint-disable-next-line sonarjs/no-small-switch\n switch (sAction) {\n case 'finishAssignment': {\n const finishPromise = finishAssignment(itemKey);\n\n finishPromise\n .then(() => {})\n .catch(() => {\n showToast(`${localizedVal('Submit failed!', localeCategory)}`);\n });\n\n break;\n }\n\n default:\n break;\n }\n }\n }\n\n return (\n <div id='Assignment'>\n {banners}\n {bHasNavigation ? (\n <React.Fragment>\n <MultiStep\n getPConnect={getPConnect}\n itemKey={itemKey}\n actionButtons={actionButtons}\n onButtonPress={buttonPress}\n bIsVertical={bIsVertical}\n arCurrentStepIndicies={arCurrentStepIndicies}\n arNavigationSteps={arNavigationSteps}\n >\n {children}\n </MultiStep>\n <Snackbar\n open={showSnackbar}\n autoHideDuration={3000}\n onClose={handleSnackbarClose}\n message={snackbarMessage}\n action={\n <IconButton\n size='small'\n aria-label='close'\n color='inherit'\n onClick={handleSnackbarClose}\n >\n <CloseIcon fontSize='small' />\n </IconButton>\n }\n />\n </React.Fragment>\n ) : (\n <React.Fragment>\n <AssignmentCard\n getPConnect={getPConnect}\n itemKey={itemKey}\n actionButtons={actionButtons}\n onButtonPress={buttonPress}\n >\n {children}\n </AssignmentCard>\n <Snackbar\n open={showSnackbar}\n autoHideDuration={3000}\n onClose={handleSnackbarClose}\n message={snackbarMessage}\n action={\n <IconButton\n size='small'\n aria-label='close'\n color='inherit'\n onClick={handleSnackbarClose}\n >\n <CloseIcon fontSize='small' />\n </IconButton>\n }\n />\n </React.Fragment>\n )}\n </div>\n );\n}\n\n// From WC SDK\n// const aHtml = html`\n// ${this.bHasNavigation?\n// html`\n// <div class=\"psdk-stepper\">\n// <multi-step-component .pConn=${this.pConn} .arChildren=${this.arChildren} itemKey=${this.itemKey}\n// .arMainButtons=${this.arMainButtons} .arSecondaryButtons=${this.arSecondaryButtons}\n// .bIsVertical=${this.bIsVertical} .arCurrentStepIndicies=${this.arCurrentStepIndicies}\n// .arNavigationSteps=${this.arNavigationSteps}\n// @MultiStepActionButtonClick=\"${this._onActionButtonClick}\">\n// </multi-step-component>\n// <lit-toast></lit-toast>\n// </div>`\n// :\n// html`\n// <div>\n// <assignment-card-component .pConn=${this.pConn} .arChildren=${this.arChildren} itemKey=${this.itemKey}\n// .arMainButtons=${this.arMainButtons} .arSecondaryButtons=${this.arSecondaryButtons}\n// @AssignmentActionButtonClick=\"${this._onActionButtonClick}\">\n// </assignment-card-component>\n// <lit-toast></lit-toast>\n// </div>`}\n// `;\n"]}
1
+ {"version":3,"file":"Assignment.js","sourceRoot":"","sources":["../../../../src/components/infra/Assignment/Assignment.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAC/C,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,QAAQ,MAAM,4BAA4B,CAAC;AAClD,OAAO,UAAU,MAAM,8BAA8B,CAAC;AACtD,OAAO,SAAS,MAAM,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C9B,8BAA8B;AAC9B,cAAc;AACd,QAAQ;AACR,UAAU;AACV,YAAY;AACZ,iHAAiH;AACjH,gGAAgG;AAChG,yEAAyE;AACzE,uCAAuC;AACvC,kCAAkC;AAClC,eAAe;AACf,KAAK;AAEL,UAAU,CAAC,SAAS,GAAG;IACrB,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACnC,WAAW,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACtC,OAAO,EAAE,SAAS,CAAC,MAAM;IACzB,SAAS,EAAE,SAAS,CAAC,IAAI;IACzB,OAAO,EAAE,SAAS,CAAC,GAAG;IACtB,kCAAkC;IAClC,8BAA8B;CAC/B,CAAC;AAEF,UAAU,CAAC,YAAY,GAAG;IACxB,OAAO,EAAE,IAAI;IACb,SAAS,EAAE,KAAK;IAChB,kBAAkB;CACnB,CAAC","sourcesContent":["import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\n\nimport AssignmentCard from '../AssignmentCard';\nimport MultiStep from '../MultiStep';\nimport Snackbar from '@material-ui/core/Snackbar';\nimport IconButton from '@material-ui/core/IconButton';\nimport CloseIcon from '@material-ui/icons/Close';\n\nimport PCoreType from '@pega/pcore-pconnect-typedefs/types/pcore';\n\ndeclare const PCore: typeof PCoreType;\n\n\nexport default function Assignment(props) {\n const { getPConnect, children, itemKey, isInModal, banners } = props;\n const thePConn = getPConnect();\n\n const [bHasNavigation, setHasNavigation] = useState(false);\n const [actionButtons, setActionButtons] = useState({});\n const [bIsVertical, setIsVertical] = useState(false);\n const [arCurrentStepIndicies, setArCurrentStepIndicies] = useState<Array<any>>([]);\n const [arNavigationSteps, setArNavigationSteps] = useState<Array<any>>([]);\n\n const actionsAPI = thePConn.getActionsApi();\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'Assignment';\n const localeReference = `${getPConnect().getCaseInfo().getClassName()}!CASE!${getPConnect().getCaseInfo().getName()}`.toUpperCase();\n\n // store off bound functions to above pointers\n const finishAssignment = actionsAPI.finishAssignment.bind(actionsAPI);\n const navigateToStep = actionsAPI.navigateToStep.bind(actionsAPI);\n const cancelAssignment = actionsAPI.cancelAssignment.bind(actionsAPI);\n const saveAssignment = actionsAPI.saveAssignment?.bind(actionsAPI);\n const cancelCreateStageAssignment = actionsAPI.cancelCreateStageAssignment.bind(actionsAPI);\n // const showPage = actionsAPI.showPage.bind(actionsAPI);\n\n const [showSnackbar, setShowSnackbar] = useState(false);\n const [snackbarMessage, setSnackbarMessage] = useState('');\n\n function findCurrentIndicies(\n arStepperSteps: Array<any>,\n arIndicies: Array<number>,\n depth: number\n ): Array<number> {\n let count = 0;\n arStepperSteps.forEach(step => {\n if (step.visited_status === 'current') {\n arIndicies[depth] = count;\n\n // add in\n step['step_status'] = '';\n } else if (step.visited_status === 'success') {\n count += 1;\n step.step_status = 'completed';\n } else {\n count += 1;\n step.step_status = '';\n }\n\n if (step.steps) {\n arIndicies = findCurrentIndicies(step.steps, arIndicies, depth + 1);\n }\n });\n\n return arIndicies;\n }\n\n useEffect(() => {\n if (children && children.length > 0) {\n // debugger;\n\n const oWorkItem = children[0].props.getPConnect();\n const oWorkData = oWorkItem.getDataObject();\n const oData = thePConn.getDataObject();\n\n if (oWorkData?.caseInfo && oWorkData.caseInfo.assignments !== null) {\n const oCaseInfo = oData.caseInfo;\n\n if (oCaseInfo && oCaseInfo.actionButtons) {\n setActionButtons(oCaseInfo.actionButtons);\n }\n\n if (oCaseInfo?.navigation /* was oCaseInfo.navigation != null */) {\n setHasNavigation(true);\n\n if (\n oCaseInfo.navigation.template &&\n oCaseInfo.navigation.template.toLowerCase() === 'standard'\n ) {\n setHasNavigation(false);\n } else if (\n oCaseInfo.navigation.template &&\n oCaseInfo.navigation.template.toLowerCase() === 'vertical'\n ) {\n setIsVertical(true);\n } else {\n setIsVertical(false);\n }\n const steps = JSON.parse(JSON.stringify(oCaseInfo?.navigation?.steps));\n steps.forEach(step => {\n if (step.name) {\n step.name = PCore.getLocaleUtils().getLocaleValue(step.name, undefined, localeReference);\n }\n });\n setArNavigationSteps(steps);\n setArCurrentStepIndicies(\n findCurrentIndicies(arNavigationSteps, arCurrentStepIndicies, 0)\n );\n }\n }\n }\n }, [children]);\n\n function showToast(message: string) {\n const theMessage = `Assignment: ${message}`;\n // eslint-disable-next-line no-console\n console.error(theMessage);\n setSnackbarMessage(message);\n setShowSnackbar(true);\n }\n\n function handleSnackbarClose(event: React.SyntheticEvent | React.MouseEvent, reason?: string) {\n if (reason === 'clickaway') {\n return;\n }\n setShowSnackbar(false);\n }\n\n function onSaveActionSuccess(data) {\n actionsAPI.cancelAssignment(itemKey).then(() => {\n PCore.getPubSubUtils().publish(\n PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_SAVED,\n data\n );\n });\n }\n\n function buttonPress(sAction: string, sButtonType: string) {\n if (sButtonType === 'secondary') {\n switch (sAction) {\n case 'navigateToStep': {\n const navigatePromise = navigateToStep('previous', itemKey);\n\n navigatePromise\n .then(() => {})\n .catch(() => {\n showToast(`${localizedVal('Navigation failed!', localeCategory)}`);\n });\n\n break;\n }\n\n case 'saveAssignment': {\n const caseID = thePConn.getCaseInfo().getKey();\n const assignmentID = thePConn.getCaseInfo().getAssignmentID();\n const savePromise = saveAssignment(itemKey);\n\n savePromise\n .then(() => {\n const caseType = thePConn\n .getCaseInfo()\n .c11nEnv.getValue(PCore.getConstants().CASE_INFO.CASE_TYPE_ID);\n onSaveActionSuccess({ caseType, caseID, assignmentID });\n })\n .catch(() => {\n showToast(`${localizedVal('Save failed', localeCategory)}`);\n });\n\n break;\n }\n\n case 'cancelAssignment': {\n // check if create stage (modal)\n const { PUB_SUB_EVENTS } = PCore.getConstants();\n const { publish } = PCore.getPubSubUtils();\n const isAssignmentInCreateStage = thePConn.getCaseInfo().isAssignmentInCreateStage();\n const isLocalAction =\n thePConn.getCaseInfo().isLocalAction() ||\n (PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION &&\n getPConnect().getValue(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION));\n if (isAssignmentInCreateStage && isInModal && !isLocalAction) {\n const cancelPromise = cancelCreateStageAssignment(itemKey);\n\n cancelPromise\n .then(data => {\n publish(PUB_SUB_EVENTS.EVENT_CANCEL, data);\n })\n .catch(() => {\n showToast(`${localizedVal('Cancel failed!', localeCategory)}`);\n });\n } else {\n const cancelPromise = cancelAssignment(itemKey);\n\n cancelPromise\n .then(data => {\n publish(PUB_SUB_EVENTS.EVENT_CANCEL, data);\n })\n .catch(() => {\n showToast(`${localizedVal('Cancel failed!', localeCategory)}`);\n });\n }\n break;\n }\n\n default:\n break;\n }\n } else if (sButtonType === 'primary') {\n // eslint-disable-next-line sonarjs/no-small-switch\n switch (sAction) {\n case 'finishAssignment': {\n const finishPromise = finishAssignment(itemKey);\n\n finishPromise\n .then(() => {})\n .catch(() => {\n showToast(`${localizedVal('Submit failed!', localeCategory)}`);\n });\n\n break;\n }\n\n default:\n break;\n }\n }\n }\n\n return (\n <div id='Assignment'>\n {banners}\n {bHasNavigation ? (\n <React.Fragment>\n <MultiStep\n getPConnect={getPConnect}\n itemKey={itemKey}\n actionButtons={actionButtons}\n onButtonPress={buttonPress}\n bIsVertical={bIsVertical}\n arCurrentStepIndicies={arCurrentStepIndicies}\n arNavigationSteps={arNavigationSteps}\n >\n {children}\n </MultiStep>\n <Snackbar\n open={showSnackbar}\n autoHideDuration={3000}\n onClose={handleSnackbarClose}\n message={snackbarMessage}\n action={\n <IconButton\n size='small'\n aria-label='close'\n color='inherit'\n onClick={handleSnackbarClose}\n >\n <CloseIcon fontSize='small' />\n </IconButton>\n }\n />\n </React.Fragment>\n ) : (\n <React.Fragment>\n <AssignmentCard\n getPConnect={getPConnect}\n itemKey={itemKey}\n actionButtons={actionButtons}\n onButtonPress={buttonPress}\n >\n {children}\n </AssignmentCard>\n <Snackbar\n open={showSnackbar}\n autoHideDuration={3000}\n onClose={handleSnackbarClose}\n message={snackbarMessage}\n action={\n <IconButton\n size='small'\n aria-label='close'\n color='inherit'\n onClick={handleSnackbarClose}\n >\n <CloseIcon fontSize='small' />\n </IconButton>\n }\n />\n </React.Fragment>\n )}\n </div>\n );\n}\n\n// From WC SDK\n// const aHtml = html`\n// ${this.bHasNavigation?\n// html`\n// <div class=\"psdk-stepper\">\n// <multi-step-component .pConn=${this.pConn} .arChildren=${this.arChildren} itemKey=${this.itemKey}\n// .arMainButtons=${this.arMainButtons} .arSecondaryButtons=${this.arSecondaryButtons}\n// .bIsVertical=${this.bIsVertical} .arCurrentStepIndicies=${this.arCurrentStepIndicies}\n// .arNavigationSteps=${this.arNavigationSteps}\n// @MultiStepActionButtonClick=\"${this._onActionButtonClick}\">\n// </multi-step-component>\n// <lit-toast></lit-toast>\n// </div>`\n// :\n// html`\n// <div>\n// <assignment-card-component .pConn=${this.pConn} .arChildren=${this.arChildren} itemKey=${this.itemKey}\n// .arMainButtons=${this.arMainButtons} .arSecondaryButtons=${this.arSecondaryButtons}\n// @AssignmentActionButtonClick=\"${this._onActionButtonClick}\">\n// </assignment-card-component>\n// <lit-toast></lit-toast>\n// </div>`}\n// `;\n\nAssignment.propTypes = {\n children: PropTypes.node.isRequired,\n getPConnect: PropTypes.func.isRequired,\n itemKey: PropTypes.string,\n isInModal: PropTypes.bool,\n banners: PropTypes.any\n // actionButtons: PropTypes.object\n // buildName: PropTypes.string\n};\n\nAssignment.defaultProps = {\n itemKey: null,\n isInModal: false\n // buildName: null\n};\n"]}
@@ -1,11 +1,17 @@
1
1
  /// <reference types="react" />
2
- import type { PConnProps } from '../../../types/PConnProps';
3
- interface AssignmentCardProps extends PConnProps {
4
- children: Array<any>;
5
- actionButtons: any;
6
- onButtonPress: any;
7
- itemKey?: string;
2
+ import PropTypes from "prop-types";
3
+ declare function AssignmentCard(props: any): JSX.Element;
4
+ declare namespace AssignmentCard {
5
+ var propTypes: {
6
+ children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
7
+ getPConnect: PropTypes.Validator<(...args: any[]) => any>;
8
+ itemKey: PropTypes.Requireable<string>;
9
+ actionButtons: PropTypes.Requireable<object>;
10
+ onButtonPress: PropTypes.Requireable<(...args: any[]) => any>;
11
+ };
12
+ var defaultProps: {
13
+ itemKey: null;
14
+ };
8
15
  }
9
- export default function AssignmentCard(props: AssignmentCardProps): JSX.Element;
10
- export {};
16
+ export default AssignmentCard;
11
17
  //# sourceMappingURL=AssignmentCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AssignmentCard.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/AssignmentCard/AssignmentCard.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAG5D,UAAU,mBAAoB,SAAQ,UAAU;IAE9C,QAAQ,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IACrB,aAAa,EAAE,GAAG,CAAC;IACnB,aAAa,EAAE,GAAG,CAAC;IAEnB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAGD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,mBAAmB,eA4BhE"}
1
+ {"version":3,"file":"AssignmentCard.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/AssignmentCard/AssignmentCard.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AAInC,iBAAwB,cAAc,CAAC,KAAK,KAAA,eAyB3C;kBAzBuB,cAAc;;;;;;;;;;;;eAAd,cAAc"}
@@ -1,8 +1,7 @@
1
1
  import React, { useState, useEffect } from "react";
2
- import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
2
+ import PropTypes from "prop-types";
3
+ import ActionButtons from "../ActionButtons";
3
4
  export default function AssignmentCard(props) {
4
- // Get emitted components from map (so we can get any override that may exist)
5
- const ActionButtons = getComponentFromMap("ActionButtons");
6
5
  const { children, actionButtons, onButtonPress } = props;
7
6
  const [arMainButtons, setArMainButtons] = useState([]);
8
7
  const [arSecondaryButtons, setArSecondaryButtons] = useState([]);
@@ -19,4 +18,18 @@ export default function AssignmentCard(props) {
19
18
  children,
20
19
  arMainButtons && arSecondaryButtons && React.createElement(ActionButtons, { arMainButtons: arMainButtons, arSecondaryButtons: arSecondaryButtons, onButtonPress: buttonPress })));
21
20
  }
21
+ AssignmentCard.propTypes = {
22
+ children: PropTypes.node.isRequired,
23
+ // eslint-disable-next-line react/no-unused-prop-types
24
+ getPConnect: PropTypes.func.isRequired,
25
+ // eslint-disable-next-line react/no-unused-prop-types
26
+ itemKey: PropTypes.string,
27
+ actionButtons: PropTypes.object,
28
+ onButtonPress: PropTypes.func
29
+ // buildName: PropTypes.string
30
+ };
31
+ AssignmentCard.defaultProps = {
32
+ itemKey: null,
33
+ // buildName: null
34
+ };
22
35
  //# sourceMappingURL=AssignmentCard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AssignmentCard.js","sourceRoot":"","sources":["../../../../src/components/infra/AssignmentCard/AssignmentCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAYhF,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAA0B;IAC/D,8EAA8E;IAC9E,MAAM,aAAa,GAAG,mBAAmB,CAAC,eAAe,CAAC,CAAC;IAE3D,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAC,GAAG,KAAK,CAAC;IAExD,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACvD,MAAM,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAEjE,SAAS,CAAE,GAAE,EAAE;QACb,IAAI,aAAa,EAAE;YACjB,gBAAgB,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;YACrC,qBAAqB,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;SAChD;IACH,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,SAAS,WAAW,CAAC,OAAO,EAAE,KAAK;QACjC,aAAa,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAChC,CAAC;IAED,OAAO,CACL;QACG,QAAQ;QAEP,aAAa,IAAI,kBAAkB,IAAI,oBAAC,aAAa,IAAC,aAAa,EAAE,aAAa,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,aAAa,EAAE,WAAW,GAAkB,CAEzK,CACJ,CAAA;AACH,CAAC","sourcesContent":["import React, { useState, useEffect } from \"react\";\nimport type { PConnProps } from '../../../types/PConnProps';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\n\ninterface AssignmentCardProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n children: Array<any>,\n actionButtons: any,\n onButtonPress: any,\n // eslint-disable-next-line react/no-unused-prop-types\n itemKey?: string\n}\n\n\nexport default function AssignmentCard(props: AssignmentCardProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const ActionButtons = getComponentFromMap(\"ActionButtons\");\n\n const { children, actionButtons, onButtonPress} = props;\n\n const [arMainButtons, setArMainButtons] = useState([]);\n const [arSecondaryButtons, setArSecondaryButtons] = useState([]);\n\n useEffect( ()=> {\n if (actionButtons) {\n setArMainButtons(actionButtons.main);\n setArSecondaryButtons(actionButtons.secondary);\n }\n }, [actionButtons]);\n\n function buttonPress(sAction, sType) {\n onButtonPress(sAction, sType);\n }\n\n return (\n <>\n {children}\n {\n arMainButtons && arSecondaryButtons && <ActionButtons arMainButtons={arMainButtons} arSecondaryButtons={arSecondaryButtons} onButtonPress={buttonPress}></ActionButtons>\n }\n </>\n )\n}\n"]}
1
+ {"version":3,"file":"AssignmentCard.js","sourceRoot":"","sources":["../../../../src/components/infra/AssignmentCard/AssignmentCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ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B,OAAO,EAAE,IAAI;IACb,kBAAkB;CACnB,CAAC","sourcesContent":["import React, { useState, useEffect } from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport ActionButtons from \"../ActionButtons\";\n\nexport default function AssignmentCard(props) {\n const { children, actionButtons, onButtonPress} = props;\n\n const [arMainButtons, setArMainButtons] = useState([]);\n const [arSecondaryButtons, setArSecondaryButtons] = useState([]);\n\n useEffect( ()=> {\n if (actionButtons) {\n setArMainButtons(actionButtons.main);\n setArSecondaryButtons(actionButtons.secondary);\n }\n }, [actionButtons]);\n\n function buttonPress(sAction, sType) {\n onButtonPress(sAction, sType);\n }\n\n return (\n <>\n {children}\n {\n arMainButtons && arSecondaryButtons && <ActionButtons arMainButtons={arMainButtons} arSecondaryButtons={arSecondaryButtons} onButtonPress={buttonPress}></ActionButtons>\n }\n </>\n )\n}\n\nAssignmentCard.propTypes = {\n children: PropTypes.node.isRequired,\n // eslint-disable-next-line react/no-unused-prop-types\n getPConnect: PropTypes.func.isRequired,\n // eslint-disable-next-line react/no-unused-prop-types\n itemKey: PropTypes.string,\n actionButtons: PropTypes.object,\n onButtonPress: PropTypes.func\n // buildName: PropTypes.string\n};\n\nAssignmentCard.defaultProps = {\n itemKey: null,\n // buildName: null\n};\n"]}
@@ -1,3 +1,23 @@
1
1
  /// <reference types="react" />
2
- export default function FlowContainer(props: any): JSX.Element;
2
+ import PropTypes from 'prop-types';
3
+ declare function FlowContainer(props: any): JSX.Element;
4
+ declare namespace FlowContainer {
5
+ var defaultProps: {
6
+ children: null;
7
+ getPConnect: null;
8
+ name: string;
9
+ routingInfo: null;
10
+ pageMessages: null;
11
+ };
12
+ var propTypes: {
13
+ children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
14
+ getPConnect: PropTypes.Requireable<(...args: any[]) => any>;
15
+ name: PropTypes.Requireable<string>;
16
+ routingInfo: PropTypes.Requireable<{
17
+ [x: string]: any;
18
+ }>;
19
+ pageMessages: PropTypes.Requireable<any[]>;
20
+ };
21
+ }
22
+ export default FlowContainer;
3
23
  //# sourceMappingURL=FlowContainer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FlowContainer.d.ts","sourceRoot":"","sources":["../../../../../src/components/infra/Containers/FlowContainer/FlowContainer.tsx"],"names":[],"mappings":";AA6DA,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,KAAA,eAyb1C"}
1
+ {"version":3,"file":"FlowContainer.d.ts","sourceRoot":"","sources":["../../../../../src/components/infra/Containers/FlowContainer/FlowContainer.tsx"],"names":[],"mappings":";AAGA,OAAO,SAAS,MAAM,YAAY,CAAC;AAgDnC,iBAAwB,aAAa,CAAC,KAAK,KAAA,eAib1C;kBAjbuB,aAAa;;;;;;;;;;;;;;;;;;eAAb,aAAa"}
@@ -1,6 +1,7 @@
1
1
  /* eslint-disable no-nested-ternary */
2
2
  /* eslint-disable camelcase */
3
3
  import React, { useState, useEffect, useContext, createElement } from 'react';
4
+ import PropTypes from 'prop-types';
4
5
  import { makeStyles } from '@material-ui/core/styles';
5
6
  import { Card, CardHeader, Avatar, Typography } from '@material-ui/core';
6
7
  import { Utils } from '../../../helpers/utils';
@@ -11,6 +12,7 @@ import DayjsUtils from '@date-io/dayjs';
11
12
  import { MuiPickersUtilsProvider } from '@material-ui/pickers';
12
13
  import { addContainerItem, getToDoAssignments, showBanner } from './helpers';
13
14
  import { isEmptyObject } from '../../../helpers/common-utils';
15
+ // Need to get correct implementation from component map for Assignment and ToDo
14
16
  import { getComponentFromMap } from '../../../../bridge/helpers/sdk_component_map';
15
17
  //
16
18
  // WARNING: It is not expected that this file should be modified. It is part of infrastructure code that works with
@@ -37,16 +39,14 @@ const useStyles = makeStyles(theme => ({
37
39
  color: theme.palette.getContrastText(theme.palette.primary.light)
38
40
  }
39
41
  }));
40
- export default function FlowContainer(props /* : FlowContainerProps */) {
42
+ export default function FlowContainer(props) {
41
43
  // Get the proper implementation (local or Pega-provided) for these components that are emitted below
42
- const Assignment = getComponentFromMap('Assignment');
43
- const ToDo = getComponentFromMap('Todo'); // NOTE: ConstellationJS Engine uses "Todo" and not "ToDo"!!!
44
- const AlertBanner = getComponentFromMap("AlertBanner");
44
+ const Assignment = getComponentFromMap("Assignment");
45
+ const ToDo = getComponentFromMap("Todo"); // NOTE: ConstellationJS Engine uses "Todo" and not "ToDo"!!!
45
46
  const pCoreConstants = PCore.getConstants();
46
- const PCoreVersion = PCore.getPCoreVersion();
47
47
  const { TODO } = pCoreConstants;
48
48
  const todo_headerText = 'To do';
49
- const { getPConnect, routingInfo, pageMessages } = props;
49
+ const { getPConnect, routingInfo } = props;
50
50
  const { displayOnlyFA } = useContext(StoreContext);
51
51
  const thePConn = getPConnect();
52
52
  // const [init, setInit] = useState(true);
@@ -99,7 +99,7 @@ export default function FlowContainer(props /* : FlowContainerProps */) {
99
99
  return `${context.toUpperCase()}/${viewContainerName.toUpperCase()}`;
100
100
  }
101
101
  function getTodoVisibility() {
102
- const caseViewMode = getPConnect().getValue('context_data.caseViewMode', ''); // 2nd arg empty string until typedefs properly allow optional
102
+ const caseViewMode = getPConnect().getValue('context_data.caseViewMode');
103
103
  if (caseViewMode && caseViewMode === 'review') {
104
104
  return true;
105
105
  }
@@ -153,8 +153,8 @@ export default function FlowContainer(props /* : FlowContainerProps */) {
153
153
  }, []);
154
154
  function isCaseWideLocalAction() {
155
155
  const ourPConn = getPConnect();
156
- const actionID = ourPConn.getValue(pCoreConstants.CASE_INFO.ACTIVE_ACTION_ID, ''); // 2nd arg empty string until typedefs properly allow optional
157
- const caseActions = ourPConn.getValue(pCoreConstants.CASE_INFO.AVAILABLEACTIONS, ''); // 2nd arg empty string until typedefs properly allow optional
156
+ const actionID = ourPConn.getValue(pCoreConstants.CASE_INFO.ACTIVE_ACTION_ID);
157
+ const caseActions = ourPConn.getValue(pCoreConstants.CASE_INFO.AVAILABLEACTIONS);
158
158
  let bCaseWideAction = false;
159
159
  if (caseActions && actionID) {
160
160
  const actionObj = caseActions.find(caseAction => caseAction.ID === actionID);
@@ -166,7 +166,7 @@ export default function FlowContainer(props /* : FlowContainerProps */) {
166
166
  }
167
167
  function hasChildCaseAssignments() {
168
168
  const ourPConn = getPConnect();
169
- const childCases = ourPConn.getValue(pCoreConstants.CASE_INFO.CHILD_ASSIGNMENTS, ''); // 2nd arg empty string until typedefs properly allow optional
169
+ const childCases = ourPConn.getValue(pCoreConstants.CASE_INFO.CHILD_ASSIGNMENTS);
170
170
  // const allAssignments = [];
171
171
  // eslint-disable-next-line sonarjs/prefer-single-boolean-return
172
172
  if (childCases && childCases.length > 0) {
@@ -177,27 +177,21 @@ export default function FlowContainer(props /* : FlowContainerProps */) {
177
177
  function hasAssignments() {
178
178
  const ourPConn = getPConnect();
179
179
  let bHasAssignments = false;
180
- const assignmentsList = ourPConn.getValue(pCoreConstants.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS, ''); // 2nd arg empty string until typedefs properly allow optional
181
- const isEmbedded = window.location.href.includes('embedded');
182
- let bAssignmentsForThisOperator = false;
180
+ const assignmentsList = ourPConn.getValue(pCoreConstants.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS);
181
+ const thisOperator = PCore.getEnvironmentInfo().getOperatorIdentifier();
183
182
  // 8.7 includes assignments in Assignments List that may be assigned to
184
183
  // a different operator. So, see if there are any assignments for
185
184
  // the current operator
186
- if (PCoreVersion?.includes('8.7') || isEmbedded) {
187
- const thisOperator = PCore.getEnvironmentInfo().getOperatorIdentifier();
188
- for (const assignment of assignmentsList) {
189
- if (assignment['assigneeInfo']['ID'] === thisOperator) {
190
- bAssignmentsForThisOperator = true;
191
- }
192
- }
193
- }
194
- else {
195
- bAssignmentsForThisOperator = true;
196
- }
185
+ let bAssignmentsForThisOperator = false;
197
186
  // Bail out if there isn't an assignmentsList
198
187
  if (!assignmentsList) {
199
188
  return bHasAssignments;
200
189
  }
190
+ for (const assignment of assignmentsList) {
191
+ if (assignment['assigneeInfo']['ID'] === thisOperator) {
192
+ bAssignmentsForThisOperator = true;
193
+ }
194
+ }
201
195
  const bHasChildCaseAssignments = hasChildCaseAssignments();
202
196
  if (bAssignmentsForThisOperator || bHasChildCaseAssignments || isCaseWideLocalAction()) {
203
197
  bHasAssignments = true;
@@ -208,8 +202,8 @@ export default function FlowContainer(props /* : FlowContainerProps */) {
208
202
  const ourPConn = getPConnect();
209
203
  let activeActionLabel = '';
210
204
  const { CASE_INFO: CASE_CONSTS } = pCoreConstants;
211
- const caseActions = ourPConn.getValue(CASE_CONSTS.CASE_INFO_ACTIONS, ''); // 2nd arg empty string until typedefs properly allow optionalv
212
- const activeActionID = ourPConn.getValue(CASE_CONSTS.ACTIVE_ACTION_ID, ''); // 2nd arg empty string until typedefs properly allow optional
205
+ const caseActions = ourPConn.getValue(CASE_CONSTS.CASE_INFO_ACTIONS);
206
+ const activeActionID = ourPConn.getValue(CASE_CONSTS.ACTIVE_ACTION_ID);
213
207
  const activeAction = caseActions?.find(action => action.ID === activeActionID);
214
208
  if (activeAction) {
215
209
  activeActionLabel = activeAction.name;
@@ -224,7 +218,7 @@ export default function FlowContainer(props /* : FlowContainerProps */) {
224
218
  // let routingInfo = this.getComponentProp("routingInfo");
225
219
  let loadingInfo;
226
220
  try {
227
- loadingInfo = thePConn.getLoadingStatus(''); // 1st arg empty string until typedefs properly allow optional
221
+ loadingInfo = thePConn.getLoadingStatus();
228
222
  }
229
223
  catch (ex) {
230
224
  // eslint-disable-next-line no-console
@@ -235,14 +229,14 @@ export default function FlowContainer(props /* : FlowContainerProps */) {
235
229
  // turn off spinner
236
230
  // this.psService.sendMessage(false);
237
231
  }
238
- const caseViewMode = thePConn.getValue('context_data.caseViewMode', ''); // 2nd arg empty string until typedefs properly allow optional
232
+ const caseViewMode = thePConn.getValue('context_data.caseViewMode');
239
233
  const { CASE_INFO: CASE_CONSTS } = pCoreConstants;
240
234
  if (caseViewMode && caseViewMode === 'review') {
241
235
  setTimeout(() => {
242
236
  // updated for 8.7 - 30-Mar-2022
243
237
  const todoAssignments = getToDoAssignments(thePConn);
244
238
  if (todoAssignments && todoAssignments.length > 0) {
245
- setCaseInfoID(thePConn.getValue(CASE_CONSTS.CASE_INFO_ID, '')); // 2nd arg empty string until typedefs properly allow optional
239
+ setCaseInfoID(thePConn.getValue(CASE_CONSTS.CASE_INFO_ID));
246
240
  setTodoDatasource({ source: todoAssignments });
247
241
  }
248
242
  setShowTodo(true);
@@ -262,7 +256,7 @@ export default function FlowContainer(props /* : FlowContainerProps */) {
262
256
  }
263
257
  }
264
258
  // if have caseMessage show message and end
265
- const theCaseMessages = localizedVal(thePConn.getValue('caseMessages', ''), localeCategory); // 2nd arg empty string until typedefs properly allow optional
259
+ const theCaseMessages = localizedVal(thePConn.getValue('caseMessages'), localeCategory);
266
260
  if (theCaseMessages || !hasAssignments()) {
267
261
  // Temp fix for 8.7 change: confirmationNote no longer coming through in caseMessages$.
268
262
  // So, if we get here and caseMessages$ is empty, use default value in DX API response
@@ -338,29 +332,42 @@ export default function FlowContainer(props /* : FlowContainerProps */) {
338
332
  ? getPConnect().getCaseSummary().assignments?.[0].urgency
339
333
  : '';
340
334
  const operatorInitials = Utils.getInitials(PCore.getEnvironmentInfo().getOperatorName());
335
+ let instructionText = thePConn.getCaseSummary()?.assignments?.[0]?.instructions;
336
+ if (instructionText === undefined) {
337
+ instructionText = '';
338
+ }
341
339
  const bShowBanner = showBanner(getPConnect);
342
- const displayPageMessages = () => {
343
- let hasBanner = false;
344
- const messages = pageMessages
345
- ? pageMessages.map(msg => localizedVal(msg.message, 'Messages'))
346
- : pageMessages;
347
- hasBanner = messages && messages.length > 0;
348
- return (hasBanner && React.createElement(AlertBanner, { id: 'flowContainerBanner', variant: 'urgent', messages: messages }));
349
- };
350
340
  return (React.createElement("div", { style: { textAlign: 'left' }, id: buildName, className: 'psdk-flow-container-top' },
351
341
  !bShowConfirm &&
352
342
  (!todo_showTodo ? (!displayOnlyFA ? (React.createElement(Card, { className: classes.root },
353
343
  React.createElement(CardHeader, { title: React.createElement(Typography, { variant: 'h6' }, containerName), subheader: `Task in ${caseId} \u2022 Priority ${urgency}`, avatar: React.createElement(Avatar, { className: classes.avatar }, operatorInitials) }),
354
- displayPageMessages(),
344
+ instructionText !== '' ? (React.createElement(Typography, { variant: 'caption' }, instructionText)) : null,
355
345
  React.createElement(MuiPickersUtilsProvider, { utils: DayjsUtils },
356
346
  React.createElement(Assignment, { getPConnect: getPConnect, itemKey: itemKey }, arNewChildrenAsReact)))) : (React.createElement(Card, { className: classes.root },
357
347
  React.createElement(Typography, { variant: 'h6' }, containerName),
358
- displayPageMessages(),
348
+ instructionText !== '' ? (React.createElement(Typography, { variant: 'caption' }, instructionText)) : null,
359
349
  React.createElement(MuiPickersUtilsProvider, { utils: DayjsUtils },
360
350
  React.createElement(Assignment, { getPConnect: getPConnect, itemKey: itemKey }, arNewChildrenAsReact))))) : (React.createElement("div", null,
361
- React.createElement(ToDo, { key: Math.random(), getPConnect: getPConnect, caseInfoID: todo_caseInfoID, datasource: todo_datasource, showTodoList: todo_showTodoList, headerText: todo_headerText, type: TODO, context: todo_context, itemKey: itemKey, isConfirm: bHasCaseMessages })))),
351
+ React.createElement(ToDo, { key: Math.random(), getPConnect: getPConnect, caseInfoID: todo_caseInfoID, datasource: todo_datasource, showTodoList: todo_showTodoList, headerText: todo_headerText, type: TODO, context: todo_context, itemKey: itemKey })))),
362
352
  bHasCaseMessages && (React.createElement("div", { className: classes.alert },
363
353
  React.createElement(Alert, { severity: 'success' }, caseMessages))),
364
354
  bShowConfirm && bShowBanner && React.createElement("div", null, arNewChildrenAsReact)));
365
355
  }
356
+ FlowContainer.defaultProps = {
357
+ children: null,
358
+ getPConnect: null,
359
+ name: '',
360
+ routingInfo: null,
361
+ pageMessages: null
362
+ };
363
+ FlowContainer.propTypes = {
364
+ // eslint-disable-next-line react/no-unused-prop-types
365
+ children: PropTypes.node,
366
+ getPConnect: PropTypes.func,
367
+ // eslint-disable-next-line react/no-unused-prop-types
368
+ name: PropTypes.string,
369
+ routingInfo: PropTypes.objectOf(PropTypes.any),
370
+ // eslint-disable-next-line react/no-unused-prop-types
371
+ pageMessages: PropTypes.arrayOf(PropTypes.any)
372
+ };
366
373
  //# sourceMappingURL=FlowContainer.js.map