@pega/react-sdk-components 0.23.26 → 8.8.20

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 (553) hide show
  1. package/lib/bridge/Context/StoreContext.d.ts +3 -2
  2. package/lib/bridge/Context/StoreContext.d.ts.map +1 -1
  3. package/lib/bridge/Context/StoreContext.js +2 -3
  4. package/lib/bridge/Context/StoreContext.js.map +1 -1
  5. package/lib/bridge/helpers/sdk_component_map.d.ts +1 -0
  6. package/lib/bridge/helpers/sdk_component_map.d.ts.map +1 -1
  7. package/lib/bridge/helpers/sdk_component_map.js +22 -0
  8. package/lib/bridge/helpers/sdk_component_map.js.map +1 -1
  9. package/lib/bridge/react_pconnect.d.ts.map +1 -1
  10. package/lib/bridge/react_pconnect.js +2 -14
  11. package/lib/bridge/react_pconnect.js.map +1 -1
  12. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts +10 -0
  13. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts.map +1 -0
  14. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js +19 -0
  15. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.map +1 -0
  16. package/lib/components/designSystemExtension/AlertBanner/index.d.ts +2 -0
  17. package/lib/components/designSystemExtension/AlertBanner/index.d.ts.map +1 -0
  18. package/lib/components/designSystemExtension/AlertBanner/index.js +2 -0
  19. package/lib/components/designSystemExtension/AlertBanner/index.js.map +1 -0
  20. package/lib/components/designSystemExtension/Banner/Banner.d.ts +15 -1
  21. package/lib/components/designSystemExtension/Banner/Banner.d.ts.map +1 -1
  22. package/lib/components/designSystemExtension/Banner/Banner.js.map +1 -1
  23. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts +6 -9
  24. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
  25. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +3 -7
  26. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
  27. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts +4 -10
  28. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts.map +1 -1
  29. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +1 -8
  30. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
  31. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts +6 -2
  32. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
  33. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +3 -3
  34. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
  35. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts +7 -2
  36. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts.map +1 -1
  37. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js +4 -4
  38. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
  39. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts +7 -2
  40. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts.map +1 -1
  41. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +3 -3
  42. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
  43. package/lib/components/designSystemExtension/Operator/Operator.d.ts +17 -7
  44. package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
  45. package/lib/components/designSystemExtension/Operator/Operator.js +13 -16
  46. package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
  47. package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +5 -1
  48. package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
  49. package/lib/components/designSystemExtension/Pulse/Pulse.js +3 -6
  50. package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
  51. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts +19 -0
  52. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -0
  53. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +77 -0
  54. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -0
  55. package/lib/components/designSystemExtension/RichTextEditor/index.d.ts +2 -0
  56. package/lib/components/designSystemExtension/RichTextEditor/index.d.ts.map +1 -0
  57. package/lib/components/designSystemExtension/RichTextEditor/index.js +2 -0
  58. package/lib/components/designSystemExtension/RichTextEditor/index.js.map +1 -0
  59. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts +6 -1
  60. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts.map +1 -1
  61. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js +2 -2
  62. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
  63. package/lib/components/field/AutoComplete/AutoComplete.d.ts +15 -1
  64. package/lib/components/field/AutoComplete/AutoComplete.d.ts.map +1 -1
  65. package/lib/components/field/AutoComplete/AutoComplete.js +17 -15
  66. package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
  67. package/lib/components/field/CancelAlert/CancelAlert.d.ts +7 -2
  68. package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
  69. package/lib/components/field/CancelAlert/CancelAlert.js +12 -10
  70. package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
  71. package/lib/components/field/Checkbox/Checkbox.d.ts +19 -1
  72. package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
  73. package/lib/components/field/Checkbox/Checkbox.js +12 -10
  74. package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
  75. package/lib/components/field/Currency/Currency.d.ts +6 -1
  76. package/lib/components/field/Currency/Currency.d.ts.map +1 -1
  77. package/lib/components/field/Currency/Currency.js +11 -11
  78. package/lib/components/field/Currency/Currency.js.map +1 -1
  79. package/lib/components/field/Currency/currency-utils.d.ts +1 -1
  80. package/lib/components/field/Currency/currency-utils.d.ts.map +1 -1
  81. package/lib/components/field/Currency/currency-utils.js +1 -1
  82. package/lib/components/field/Currency/currency-utils.js.map +1 -1
  83. package/lib/components/field/Date/Date.d.ts +5 -1
  84. package/lib/components/field/Date/Date.d.ts.map +1 -1
  85. package/lib/components/field/Date/Date.js +19 -11
  86. package/lib/components/field/Date/Date.js.map +1 -1
  87. package/lib/components/field/DateTime/DateTime.d.ts +5 -1
  88. package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
  89. package/lib/components/field/DateTime/DateTime.js +15 -9
  90. package/lib/components/field/DateTime/DateTime.js.map +1 -1
  91. package/lib/components/field/Decimal/Decimal.d.ts +8 -1
  92. package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
  93. package/lib/components/field/Decimal/Decimal.js +43 -9
  94. package/lib/components/field/Decimal/Decimal.js.map +1 -1
  95. package/lib/components/field/Dropdown/Dropdown.d.ts +10 -1
  96. package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
  97. package/lib/components/field/Dropdown/Dropdown.js +26 -9
  98. package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
  99. package/lib/components/field/Email/Email.d.ts +5 -1
  100. package/lib/components/field/Email/Email.d.ts.map +1 -1
  101. package/lib/components/field/Email/Email.js +7 -5
  102. package/lib/components/field/Email/Email.js.map +1 -1
  103. package/lib/components/field/Integer/Integer.d.ts +5 -1
  104. package/lib/components/field/Integer/Integer.d.ts.map +1 -1
  105. package/lib/components/field/Integer/Integer.js +6 -4
  106. package/lib/components/field/Integer/Integer.js.map +1 -1
  107. package/lib/components/field/Percentage/Percentage.d.ts +5 -1
  108. package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
  109. package/lib/components/field/Percentage/Percentage.js +6 -4
  110. package/lib/components/field/Percentage/Percentage.js.map +1 -1
  111. package/lib/components/field/Phone/Phone.d.ts +5 -1
  112. package/lib/components/field/Phone/Phone.d.ts.map +1 -1
  113. package/lib/components/field/Phone/Phone.js +10 -7
  114. package/lib/components/field/Phone/Phone.js.map +1 -1
  115. package/lib/components/field/RadioButtons/RadioButtons.d.ts +7 -1
  116. package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
  117. package/lib/components/field/RadioButtons/RadioButtons.js +24 -11
  118. package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
  119. package/lib/components/field/RichText/RichText.d.ts +7 -0
  120. package/lib/components/field/RichText/RichText.d.ts.map +1 -0
  121. package/lib/components/field/RichText/RichText.js +51 -0
  122. package/lib/components/field/RichText/RichText.js.map +1 -0
  123. package/lib/components/field/RichText/index.d.ts +2 -0
  124. package/lib/components/field/RichText/index.d.ts.map +1 -0
  125. package/lib/components/field/RichText/index.js +2 -0
  126. package/lib/components/field/RichText/index.js.map +1 -0
  127. package/lib/components/field/ScalarList/ScalarList.d.ts +13 -0
  128. package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -0
  129. package/lib/components/field/ScalarList/ScalarList.js +34 -0
  130. package/lib/components/field/ScalarList/ScalarList.js.map +1 -0
  131. package/lib/components/field/ScalarList/index.d.ts +2 -0
  132. package/lib/components/field/ScalarList/index.d.ts.map +1 -0
  133. package/lib/components/field/ScalarList/index.js +2 -0
  134. package/lib/components/field/ScalarList/index.js.map +1 -0
  135. package/lib/components/field/SemanticLink/SemanticLink.d.ts +5 -9
  136. package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
  137. package/lib/components/field/SemanticLink/SemanticLink.js +10 -14
  138. package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
  139. package/lib/components/field/SemanticLink/utils.d.ts.map +1 -1
  140. package/lib/components/field/SemanticLink/utils.js.map +1 -1
  141. package/lib/components/field/TextArea/TextArea.d.ts +6 -1
  142. package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
  143. package/lib/components/field/TextArea/TextArea.js +5 -3
  144. package/lib/components/field/TextArea/TextArea.js.map +1 -1
  145. package/lib/components/field/TextContent/TextContent.d.ts +7 -1
  146. package/lib/components/field/TextContent/TextContent.d.ts.map +1 -1
  147. package/lib/components/field/TextContent/TextContent.js.map +1 -1
  148. package/lib/components/field/TextInput/TextInput.d.ts +6 -1
  149. package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
  150. package/lib/components/field/TextInput/TextInput.js +24 -5
  151. package/lib/components/field/TextInput/TextInput.js.map +1 -1
  152. package/lib/components/field/Time/Time.d.ts +5 -1
  153. package/lib/components/field/Time/Time.d.ts.map +1 -1
  154. package/lib/components/field/Time/Time.js +14 -8
  155. package/lib/components/field/Time/Time.js.map +1 -1
  156. package/lib/components/field/URL/URL.d.ts +5 -1
  157. package/lib/components/field/URL/URL.d.ts.map +1 -1
  158. package/lib/components/field/URL/URL.js +11 -5
  159. package/lib/components/field/URL/URL.js.map +1 -1
  160. package/lib/components/field/UserReference/UserReference.d.ts +19 -40
  161. package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
  162. package/lib/components/field/UserReference/UserReference.js +16 -45
  163. package/lib/components/field/UserReference/UserReference.js.map +1 -1
  164. package/lib/components/helpers/attachmentHelpers.d.ts +6 -6
  165. package/lib/components/helpers/attachmentHelpers.d.ts.map +1 -1
  166. package/lib/components/helpers/attachmentHelpers.js +2 -2
  167. package/lib/components/helpers/attachmentHelpers.js.map +1 -1
  168. package/lib/components/helpers/auth.d.ts +8 -6
  169. package/lib/components/helpers/auth.d.ts.map +1 -1
  170. package/lib/components/helpers/auth.js +642 -327
  171. package/lib/components/helpers/auth.js.map +1 -1
  172. package/lib/components/helpers/authManager.d.ts +20 -17
  173. package/lib/components/helpers/authManager.d.ts.map +1 -1
  174. package/lib/components/helpers/authManager.js +713 -438
  175. package/lib/components/helpers/authManager.js.map +1 -1
  176. package/lib/components/helpers/case-utils.d.ts +20 -0
  177. package/lib/components/helpers/case-utils.d.ts.map +1 -0
  178. package/lib/components/helpers/case-utils.js +82 -0
  179. package/lib/components/helpers/case-utils.js.map +1 -0
  180. package/lib/components/helpers/common-utils.d.ts +2 -0
  181. package/lib/components/helpers/common-utils.d.ts.map +1 -0
  182. package/lib/components/helpers/common-utils.js +5 -0
  183. package/lib/components/helpers/common-utils.js.map +1 -0
  184. package/lib/components/helpers/config_access.d.ts.map +1 -1
  185. package/lib/components/helpers/config_access.js +28 -98
  186. package/lib/components/helpers/config_access.js.map +1 -1
  187. package/lib/components/helpers/data_page.d.ts.map +1 -1
  188. package/lib/components/helpers/data_page.js.map +1 -1
  189. package/lib/components/helpers/date-format-utils.d.ts +1 -6
  190. package/lib/components/helpers/date-format-utils.d.ts.map +1 -1
  191. package/lib/components/helpers/date-format-utils.js +23 -14
  192. package/lib/components/helpers/date-format-utils.js.map +1 -1
  193. package/lib/components/helpers/event-utils.d.ts +1 -1
  194. package/lib/components/helpers/event-utils.d.ts.map +1 -1
  195. package/lib/components/helpers/event-utils.js.map +1 -1
  196. package/lib/components/helpers/field-group-utils.d.ts +15 -2
  197. package/lib/components/helpers/field-group-utils.d.ts.map +1 -1
  198. package/lib/components/helpers/field-group-utils.js +3 -3
  199. package/lib/components/helpers/field-group-utils.js.map +1 -1
  200. package/lib/components/helpers/formatters/Boolean.d.ts +3 -3
  201. package/lib/components/helpers/formatters/Boolean.d.ts.map +1 -1
  202. package/lib/components/helpers/formatters/Boolean.js.map +1 -1
  203. package/lib/components/helpers/formatters/Currency.d.ts +6 -6
  204. package/lib/components/helpers/formatters/Currency.d.ts.map +1 -1
  205. package/lib/components/helpers/formatters/Currency.js +6 -5
  206. package/lib/components/helpers/formatters/Currency.js.map +1 -1
  207. package/lib/components/helpers/formatters/CurrencyMap.d.ts +881 -1399
  208. package/lib/components/helpers/formatters/CurrencyMap.d.ts.map +1 -1
  209. package/lib/components/helpers/formatters/CurrencyMap.js.map +1 -1
  210. package/lib/components/helpers/formatters/Date.d.ts +4 -4
  211. package/lib/components/helpers/formatters/Date.d.ts.map +1 -1
  212. package/lib/components/helpers/formatters/Date.js +1 -1
  213. package/lib/components/helpers/formatters/Date.js.map +1 -1
  214. package/lib/components/helpers/formatters/common.d.ts +2 -2
  215. package/lib/components/helpers/formatters/common.d.ts.map +1 -1
  216. package/lib/components/helpers/formatters/common.js +4 -5
  217. package/lib/components/helpers/formatters/common.js.map +1 -1
  218. package/lib/components/helpers/formatters/index.d.ts +11 -11
  219. package/lib/components/helpers/formatters/index.d.ts.map +1 -1
  220. package/lib/components/helpers/formatters/index.js.map +1 -1
  221. package/lib/components/helpers/reactContextHelpers.d.ts +3 -2
  222. package/lib/components/helpers/reactContextHelpers.d.ts.map +1 -1
  223. package/lib/components/helpers/reactContextHelpers.js.map +1 -1
  224. package/lib/components/helpers/simpleTableHelpers.d.ts +5 -3
  225. package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
  226. package/lib/components/helpers/simpleTableHelpers.js +10 -5
  227. package/lib/components/helpers/simpleTableHelpers.js.map +1 -1
  228. package/lib/components/helpers/state-utils.d.ts +4 -0
  229. package/lib/components/helpers/state-utils.d.ts.map +1 -0
  230. package/lib/components/helpers/state-utils.js +36 -0
  231. package/lib/components/helpers/state-utils.js.map +1 -0
  232. package/lib/components/helpers/template-utils.d.ts +7 -3
  233. package/lib/components/helpers/template-utils.d.ts.map +1 -1
  234. package/lib/components/helpers/template-utils.js.map +1 -1
  235. package/lib/components/helpers/utils.d.ts +1 -1
  236. package/lib/components/helpers/utils.d.ts.map +1 -1
  237. package/lib/components/helpers/utils.js +9 -3
  238. package/lib/components/helpers/utils.js.map +1 -1
  239. package/lib/components/helpers/versionHelpers.d.ts.map +1 -1
  240. package/lib/components/helpers/versionHelpers.js.map +1 -1
  241. package/lib/components/infra/ActionButtons/ActionButtons.d.ts +6 -13
  242. package/lib/components/infra/ActionButtons/ActionButtons.d.ts.map +1 -1
  243. package/lib/components/infra/ActionButtons/ActionButtons.js +5 -15
  244. package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
  245. package/lib/components/infra/Assignment/Assignment.d.ts +9 -14
  246. package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
  247. package/lib/components/infra/Assignment/Assignment.js +32 -33
  248. package/lib/components/infra/Assignment/Assignment.js.map +1 -1
  249. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +8 -14
  250. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
  251. package/lib/components/infra/AssignmentCard/AssignmentCard.js +3 -16
  252. package/lib/components/infra/AssignmentCard/AssignmentCard.js.map +1 -1
  253. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +1 -21
  254. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
  255. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +53 -52
  256. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
  257. package/lib/components/infra/Containers/FlowContainer/helpers.d.ts +12 -12
  258. package/lib/components/infra/Containers/FlowContainer/helpers.d.ts.map +1 -1
  259. package/lib/components/infra/Containers/FlowContainer/helpers.js +17 -16
  260. package/lib/components/infra/Containers/FlowContainer/helpers.js.map +1 -1
  261. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +8 -17
  262. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
  263. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +22 -24
  264. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
  265. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +9 -22
  266. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
  267. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +7 -22
  268. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
  269. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +9 -19
  270. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
  271. package/lib/components/infra/DashboardFilter/DashboardFilter.js +2 -16
  272. package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
  273. package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -1
  274. package/lib/components/infra/DashboardFilter/filterUtils.js +1 -1
  275. package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
  276. package/lib/components/infra/DeferLoad/DeferLoad.d.ts +1 -14
  277. package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
  278. package/lib/components/infra/DeferLoad/DeferLoad.js +13 -15
  279. package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
  280. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +5 -12
  281. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
  282. package/lib/components/infra/ErrorBoundary/ErrorBoundary.js +9 -16
  283. package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
  284. package/lib/components/infra/MultiStep/MultiStep.d.ts +11 -17
  285. package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
  286. package/lib/components/infra/MultiStep/MultiStep.js +6 -20
  287. package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
  288. package/lib/components/infra/NavBar/NavBar.d.ts +8 -16
  289. package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
  290. package/lib/components/infra/NavBar/NavBar.js +9 -20
  291. package/lib/components/infra/NavBar/NavBar.js.map +1 -1
  292. package/lib/components/infra/Reference/Reference.d.ts +8 -17
  293. package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
  294. package/lib/components/infra/Reference/Reference.js +1 -15
  295. package/lib/components/infra/Reference/Reference.js.map +1 -1
  296. package/lib/components/infra/Region/Region.d.ts +4 -7
  297. package/lib/components/infra/Region/Region.d.ts.map +1 -1
  298. package/lib/components/infra/Region/Region.js +0 -4
  299. package/lib/components/infra/Region/Region.js.map +1 -1
  300. package/lib/components/infra/RootContainer/RootContainer.d.ts +1 -21
  301. package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
  302. package/lib/components/infra/RootContainer/RootContainer.js +16 -36
  303. package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
  304. package/lib/components/infra/Stages/Stages.d.ts +5 -8
  305. package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
  306. package/lib/components/infra/Stages/Stages.js +3 -7
  307. package/lib/components/infra/Stages/Stages.js.map +1 -1
  308. package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.d.ts.map +1 -1
  309. package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js.map +1 -1
  310. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts +4 -10
  311. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts.map +1 -1
  312. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +4 -9
  313. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
  314. package/lib/components/infra/View/View.d.ts +13 -16
  315. package/lib/components/infra/View/View.d.ts.map +1 -1
  316. package/lib/components/infra/View/View.js +8 -54
  317. package/lib/components/infra/View/View.js.map +1 -1
  318. package/lib/components/template/AppShell/AppShell.d.ts +20 -15
  319. package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
  320. package/lib/components/template/AppShell/AppShell.js +17 -29
  321. package/lib/components/template/AppShell/AppShell.js.map +1 -1
  322. package/lib/components/template/BannerPage/BannerPage.d.ts +11 -23
  323. package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
  324. package/lib/components/template/BannerPage/BannerPage.js +4 -22
  325. package/lib/components/template/BannerPage/BannerPage.js.map +1 -1
  326. package/lib/components/template/CaseSummary/CaseSummary.d.ts +5 -7
  327. package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
  328. package/lib/components/template/CaseSummary/CaseSummary.js +6 -6
  329. package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
  330. package/lib/components/template/CaseView/CaseView.d.ts +10 -22
  331. package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
  332. package/lib/components/template/CaseView/CaseView.js +41 -45
  333. package/lib/components/template/CaseView/CaseView.js.map +1 -1
  334. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +8 -13
  335. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
  336. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +9 -16
  337. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
  338. package/lib/components/template/Confirmation/Confirmation.d.ts +10 -16
  339. package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
  340. package/lib/components/template/Confirmation/Confirmation.js +12 -23
  341. package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
  342. package/lib/components/template/DataReference/DataReference.d.ts +1 -31
  343. package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
  344. package/lib/components/template/DataReference/DataReference.js +41 -48
  345. package/lib/components/template/DataReference/DataReference.js.map +1 -1
  346. package/lib/components/template/DefaultForm/DefaultForm.d.ts +1 -11
  347. package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
  348. package/lib/components/template/DefaultForm/DefaultForm.js +18 -15
  349. package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
  350. package/lib/components/template/DefaultForm/utils/index.d.ts +3 -0
  351. package/lib/components/template/DefaultForm/utils/index.d.ts.map +1 -0
  352. package/lib/components/template/DefaultForm/utils/index.js +27 -0
  353. package/lib/components/template/DefaultForm/utils/index.js.map +1 -0
  354. package/lib/components/template/Details/Details/Details.d.ts +1 -16
  355. package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
  356. package/lib/components/template/Details/Details/Details.js +10 -15
  357. package/lib/components/template/Details/Details/Details.js.map +1 -1
  358. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +7 -15
  359. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
  360. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js +1 -13
  361. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
  362. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +1 -16
  363. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
  364. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +14 -16
  365. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
  366. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +1 -16
  367. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
  368. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +14 -16
  369. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
  370. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +12 -19
  371. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
  372. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +7 -21
  373. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
  374. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +7 -7
  375. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
  376. package/lib/components/template/InlineDashboard/InlineDashboard.js +0 -5
  377. package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
  378. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +8 -15
  379. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
  380. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js +5 -14
  381. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js.map +1 -1
  382. package/lib/components/template/ListPage/ListPage.d.ts +5 -13
  383. package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
  384. package/lib/components/template/ListPage/ListPage.js +6 -10
  385. package/lib/components/template/ListPage/ListPage.js.map +1 -1
  386. package/lib/components/template/ListView/DefaultViewMeta.d.ts +1 -90
  387. package/lib/components/template/ListView/DefaultViewMeta.d.ts.map +1 -1
  388. package/lib/components/template/ListView/DefaultViewMeta.js.map +1 -1
  389. package/lib/components/template/ListView/ListView.d.ts +1 -9
  390. package/lib/components/template/ListView/ListView.d.ts.map +1 -1
  391. package/lib/components/template/ListView/ListView.js +96 -100
  392. package/lib/components/template/ListView/ListView.js.map +1 -1
  393. package/lib/components/template/ListView/hooks.d.ts.map +1 -1
  394. package/lib/components/template/ListView/hooks.js +0 -1
  395. package/lib/components/template/ListView/hooks.js.map +1 -1
  396. package/lib/components/template/ListView/utils.d.ts +72 -16
  397. package/lib/components/template/ListView/utils.d.ts.map +1 -1
  398. package/lib/components/template/ListView/utils.js +143 -3
  399. package/lib/components/template/ListView/utils.js.map +1 -1
  400. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +9 -13
  401. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
  402. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js +2 -13
  403. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -1
  404. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +10 -1
  405. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -1
  406. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js.map +1 -1
  407. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +1 -16
  408. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
  409. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +14 -16
  410. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
  411. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +5 -1
  412. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -1
  413. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js.map +1 -1
  414. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +7 -14
  415. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
  416. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js +4 -13
  417. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -1
  418. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +4 -7
  419. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
  420. package/lib/components/template/OneColumn/OneColumn/OneColumn.js +0 -5
  421. package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
  422. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +4 -8
  423. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
  424. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js +3 -6
  425. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -1
  426. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +4 -7
  427. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
  428. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js +0 -5
  429. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js.map +1 -1
  430. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +1 -15
  431. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
  432. package/lib/components/template/PromotedFilters/PromotedFilters.js +17 -13
  433. package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
  434. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
  435. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js +57 -5
  436. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
  437. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +18 -1
  438. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
  439. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +5 -5
  440. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
  441. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +1 -29
  442. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
  443. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js +22 -28
  444. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
  445. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +14 -26
  446. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
  447. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js +5 -26
  448. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
  449. package/lib/components/template/SubTabs/SubTabs.d.ts +4 -10
  450. package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
  451. package/lib/components/template/SubTabs/SubTabs.js +1 -8
  452. package/lib/components/template/SubTabs/SubTabs.js.map +1 -1
  453. package/lib/components/template/SubTabs/tabUtils.d.ts.map +1 -1
  454. package/lib/components/template/SubTabs/tabUtils.js.map +1 -1
  455. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts +5 -11
  456. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
  457. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +1 -12
  458. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
  459. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +4 -8
  460. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
  461. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js +3 -6
  462. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -1
  463. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +5 -11
  464. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
  465. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +1 -9
  466. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
  467. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +10 -1
  468. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
  469. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js +1 -1
  470. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js.map +1 -1
  471. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +1 -16
  472. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
  473. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +31 -23
  474. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
  475. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +5 -1
  476. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -1
  477. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js.map +1 -1
  478. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +7 -14
  479. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
  480. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js +4 -14
  481. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js.map +1 -1
  482. package/lib/components/template/WssNavBar/WssNavBar.d.ts +17 -1
  483. package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -1
  484. package/lib/components/template/WssNavBar/WssNavBar.js +2 -2
  485. package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
  486. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts +8 -17
  487. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
  488. package/lib/components/widget/AppAnnouncement/AppAnnouncement.js +4 -19
  489. package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
  490. package/lib/components/widget/Attachment/Attachment.css +15 -3
  491. package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
  492. package/lib/components/widget/Attachment/Attachment.js +44 -32
  493. package/lib/components/widget/Attachment/Attachment.js.map +1 -1
  494. package/lib/components/widget/CaseHistory/CaseHistory.d.ts +4 -7
  495. package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
  496. package/lib/components/widget/CaseHistory/CaseHistory.js +4 -8
  497. package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
  498. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +8 -1
  499. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts.map +1 -1
  500. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
  501. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +5 -1
  502. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
  503. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +33 -23
  504. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
  505. package/lib/components/widget/Followers/Followers.d.ts +4 -5
  506. package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
  507. package/lib/components/widget/Followers/Followers.js +3 -10
  508. package/lib/components/widget/Followers/Followers.js.map +1 -1
  509. package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
  510. package/lib/components/widget/QuickCreate/QuickCreate.js +12 -4
  511. package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
  512. package/lib/components/widget/SummaryItem/SummaryItem.d.ts +7 -1
  513. package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
  514. package/lib/components/widget/SummaryItem/SummaryItem.js +2 -2
  515. package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
  516. package/lib/components/widget/SummaryList/SummaryList.d.ts +7 -1
  517. package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
  518. package/lib/components/widget/SummaryList/SummaryList.js +5 -2
  519. package/lib/components/widget/SummaryList/SummaryList.js.map +1 -1
  520. package/lib/components/widget/ToDo/ToDo.d.ts +13 -27
  521. package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
  522. package/lib/components/widget/ToDo/ToDo.js +35 -67
  523. package/lib/components/widget/ToDo/ToDo.js.map +1 -1
  524. package/lib/components_map.d.ts +3 -3
  525. package/lib/components_map.d.ts.map +1 -1
  526. package/lib/components_map.js +819 -818
  527. package/lib/components_map.js.map +1 -1
  528. package/lib/doc/KeyReleaseUpdates.md +65 -9
  529. package/lib/hooks/index.d.ts +4 -0
  530. package/lib/hooks/index.d.ts.map +1 -0
  531. package/lib/hooks/index.js +4 -0
  532. package/lib/hooks/index.js.map +1 -0
  533. package/lib/hooks/useAfterInitialEffect.d.ts +9 -0
  534. package/lib/hooks/useAfterInitialEffect.d.ts.map +1 -0
  535. package/lib/hooks/useAfterInitialEffect.js +16 -0
  536. package/lib/hooks/useAfterInitialEffect.js.map +1 -0
  537. package/lib/hooks/useConsolidatedRef.d.ts +9 -0
  538. package/lib/hooks/useConsolidatedRef.d.ts.map +1 -0
  539. package/lib/hooks/useConsolidatedRef.js +30 -0
  540. package/lib/hooks/useConsolidatedRef.js.map +1 -0
  541. package/lib/hooks/useUID.d.ts +8 -0
  542. package/lib/hooks/useUID.d.ts.map +1 -0
  543. package/lib/hooks/useUID.js +14 -0
  544. package/lib/hooks/useUID.js.map +1 -0
  545. package/lib/index.d.ts +1 -0
  546. package/lib/index.d.ts.map +1 -1
  547. package/lib/index.js +2 -1
  548. package/lib/index.js.map +1 -1
  549. package/lib/sdk-pega-component-map.d.ts +15 -1
  550. package/lib/sdk-pega-component-map.js +15 -1
  551. package/lib/sdk-pega-component-map.js.map +1 -1
  552. package/lib/types/PConnProps.d.ts +42 -0
  553. package/package.json +1 -1
@@ -1,19 +1,23 @@
1
1
  import React, { useState, useEffect } from 'react';
2
- import PropTypes from 'prop-types';
3
- import AssignmentCard from '../AssignmentCard';
4
- import MultiStep from '../MultiStep';
5
2
  import Snackbar from '@material-ui/core/Snackbar';
6
3
  import IconButton from '@material-ui/core/IconButton';
7
4
  import CloseIcon from '@material-ui/icons/Close';
5
+ import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
8
6
  export default function Assignment(props) {
9
- const { getPConnect, children, itemKey, isInModal } = 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;
10
11
  const thePConn = getPConnect();
11
12
  const [bHasNavigation, setHasNavigation] = useState(false);
12
- const [actionButtons, setActionButtons] = useState({});
13
+ const [actionButtons, setActionButtons] = useState([]);
13
14
  const [bIsVertical, setIsVertical] = useState(false);
14
15
  const [arCurrentStepIndicies, setArCurrentStepIndicies] = useState([]);
15
16
  const [arNavigationSteps, setArNavigationSteps] = useState([]);
16
17
  const actionsAPI = thePConn.getActionsApi();
18
+ const localizedVal = PCore.getLocaleUtils().getLocaleValue;
19
+ const localeCategory = 'Assignment';
20
+ const localeReference = `${getPConnect().getCaseInfo().getClassName()}!CASE!${getPConnect().getCaseInfo().getName()}`.toUpperCase();
17
21
  // store off bound functions to above pointers
18
22
  const finishAssignment = actionsAPI.finishAssignment.bind(actionsAPI);
19
23
  const navigateToStep = actionsAPI.navigateToStep.bind(actionsAPI);
@@ -50,7 +54,7 @@ export default function Assignment(props) {
50
54
  // debugger;
51
55
  const oWorkItem = children[0].props.getPConnect();
52
56
  const oWorkData = oWorkItem.getDataObject();
53
- const oData = thePConn.getDataObject();
57
+ const oData = thePConn.getDataObject(thePConn.getContextName());
54
58
  if (oWorkData?.caseInfo && oWorkData.caseInfo.assignments !== null) {
55
59
  const oCaseInfo = oData.caseInfo;
56
60
  if (oCaseInfo && oCaseInfo.actionButtons) {
@@ -69,7 +73,13 @@ export default function Assignment(props) {
69
73
  else {
70
74
  setIsVertical(false);
71
75
  }
72
- setArNavigationSteps(JSON.parse(JSON.stringify(oCaseInfo.navigation.steps)));
76
+ const steps = JSON.parse(JSON.stringify(oCaseInfo?.navigation?.steps));
77
+ steps.forEach(step => {
78
+ if (step.name) {
79
+ step.name = PCore.getLocaleUtils().getLocaleValue(step.name, undefined, localeReference);
80
+ }
81
+ });
82
+ setArNavigationSteps(steps);
73
83
  setArCurrentStepIndicies(findCurrentIndicies(arNavigationSteps, arCurrentStepIndicies, 0));
74
84
  }
75
85
  }
@@ -101,7 +111,7 @@ export default function Assignment(props) {
101
111
  navigatePromise
102
112
  .then(() => { })
103
113
  .catch(() => {
104
- showToast(`Navigation failed!`);
114
+ showToast(`${localizedVal('Navigation failed!', localeCategory)}`);
105
115
  });
106
116
  break;
107
117
  }
@@ -117,7 +127,7 @@ export default function Assignment(props) {
117
127
  onSaveActionSuccess({ caseType, caseID, assignmentID });
118
128
  })
119
129
  .catch(() => {
120
- showToast('Save failed');
130
+ showToast(`${localizedVal('Save failed', localeCategory)}`);
121
131
  });
122
132
  break;
123
133
  }
@@ -128,7 +138,7 @@ export default function Assignment(props) {
128
138
  const isAssignmentInCreateStage = thePConn.getCaseInfo().isAssignmentInCreateStage();
129
139
  const isLocalAction = thePConn.getCaseInfo().isLocalAction() ||
130
140
  (PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION &&
131
- getPConnect().getValue(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
132
142
  if (isAssignmentInCreateStage && isInModal && !isLocalAction) {
133
143
  const cancelPromise = cancelCreateStageAssignment(itemKey);
134
144
  cancelPromise
@@ -136,7 +146,7 @@ export default function Assignment(props) {
136
146
  publish(PUB_SUB_EVENTS.EVENT_CANCEL, data);
137
147
  })
138
148
  .catch(() => {
139
- showToast(`Cancel failed!`);
149
+ showToast(`${localizedVal('Cancel failed!', localeCategory)}`);
140
150
  });
141
151
  }
142
152
  else {
@@ -146,7 +156,7 @@ export default function Assignment(props) {
146
156
  publish(PUB_SUB_EVENTS.EVENT_CANCEL, data);
147
157
  })
148
158
  .catch(() => {
149
- showToast(`Cancel failed!`);
159
+ showToast(`${localizedVal('Cancel failed!', localeCategory)}`);
150
160
  });
151
161
  }
152
162
  break;
@@ -163,7 +173,7 @@ export default function Assignment(props) {
163
173
  finishPromise
164
174
  .then(() => { })
165
175
  .catch(() => {
166
- showToast(`Submit failed!`);
176
+ showToast(`${localizedVal('Submit failed!', localeCategory)}`);
167
177
  });
168
178
  break;
169
179
  }
@@ -172,13 +182,15 @@ export default function Assignment(props) {
172
182
  }
173
183
  }
174
184
  }
175
- return (React.createElement("div", { id: 'Assignment' }, bHasNavigation ? (React.createElement(React.Fragment, null,
176
- React.createElement(MultiStep, { getPConnect: getPConnect, itemKey: itemKey, actionButtons: actionButtons, onButtonPress: buttonPress, bIsVertical: bIsVertical, arCurrentStepIndicies: arCurrentStepIndicies, arNavigationSteps: arNavigationSteps }, children),
177
- React.createElement(Snackbar, { open: showSnackbar, autoHideDuration: 3000, onClose: handleSnackbarClose, message: snackbarMessage, action: React.createElement(IconButton, { size: 'small', "aria-label": 'close', color: 'inherit', onClick: handleSnackbarClose },
178
- React.createElement(CloseIcon, { fontSize: 'small' })) }))) : (React.createElement(React.Fragment, null,
179
- React.createElement(AssignmentCard, { getPConnect: getPConnect, itemKey: itemKey, actionButtons: actionButtons, onButtonPress: buttonPress }, children),
180
- React.createElement(Snackbar, { open: showSnackbar, autoHideDuration: 3000, onClose: handleSnackbarClose, message: snackbarMessage, action: React.createElement(IconButton, { size: 'small', "aria-label": 'close', color: 'inherit', onClick: handleSnackbarClose },
181
- React.createElement(CloseIcon, { fontSize: 'small' })) })))));
185
+ return (React.createElement("div", { id: 'Assignment' },
186
+ banners,
187
+ bHasNavigation ? (React.createElement(React.Fragment, null,
188
+ React.createElement(MultiStep, { getPConnect: getPConnect, itemKey: itemKey, actionButtons: actionButtons, onButtonPress: buttonPress, bIsVertical: bIsVertical, arCurrentStepIndicies: arCurrentStepIndicies, arNavigationSteps: arNavigationSteps }, children),
189
+ React.createElement(Snackbar, { open: showSnackbar, autoHideDuration: 3000, onClose: handleSnackbarClose, message: snackbarMessage, action: React.createElement(IconButton, { size: 'small', "aria-label": 'close', color: 'inherit', onClick: handleSnackbarClose },
190
+ React.createElement(CloseIcon, { fontSize: 'small' })) }))) : (React.createElement(React.Fragment, null,
191
+ React.createElement(AssignmentCard, { getPConnect: getPConnect, itemKey: itemKey, actionButtons: actionButtons, onButtonPress: buttonPress }, children),
192
+ React.createElement(Snackbar, { open: showSnackbar, autoHideDuration: 3000, onClose: handleSnackbarClose, message: snackbarMessage, action: React.createElement(IconButton, { size: 'small', "aria-label": 'close', color: 'inherit', onClick: handleSnackbarClose },
193
+ React.createElement(CloseIcon, { fontSize: 'small' })) })))));
182
194
  }
183
195
  // From WC SDK
184
196
  // const aHtml = html`
@@ -203,17 +215,4 @@ export default function Assignment(props) {
203
215
  // <lit-toast></lit-toast>
204
216
  // </div>`}
205
217
  // `;
206
- Assignment.propTypes = {
207
- children: PropTypes.node.isRequired,
208
- getPConnect: PropTypes.func.isRequired,
209
- itemKey: PropTypes.string,
210
- isInModal: PropTypes.bool
211
- // actionButtons: PropTypes.object
212
- // buildName: PropTypes.string
213
- };
214
- Assignment.defaultProps = {
215
- itemKey: null,
216
- isInModal: false
217
- // buildName: null
218
- };
219
218
  //# 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,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,0BAA0B,CAAC;AAIjD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK;IACtC,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAC5D,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAE/B,MAAM,CAAC,cAAc,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC3D,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACvD,MAAM,CAAC,WAAW,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACrD,MAAM,CAAC,qBAAqB,EAAE,wBAAwB,CAAC,GAAG,QAAQ,CAAa,EAAE,CAAC,CAAC;IACnF,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAa,EAAE,CAAC,CAAC;IAE3E,MAAM,UAAU,GAAG,QAAQ,CAAC,aAAa,EAAE,CAAC;IAE5C,8CAA8C;IAC9C,MAAM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nC,WAAW,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACtC,OAAO,EAAE,SAAS,CAAC,MAAM;IACzB,SAAS,EAAE,SAAS,CAAC,IAAI;IACzB,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\ndeclare const PCore: any;\n\nexport default function Assignment(props) {\n const { getPConnect, children, itemKey, isInModal } = 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\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\n setArNavigationSteps(JSON.parse(JSON.stringify(oCaseInfo.navigation.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(`Navigation failed!`);\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('Save failed');\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(`Cancel failed!`);\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(`Cancel failed!`);\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(`Submit failed!`);\n });\n\n break;\n }\n\n default:\n break;\n }\n }\n }\n\n return (\n <div id='Assignment'>\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 // actionButtons: PropTypes.object\n // buildName: PropTypes.string\n};\n\nAssignment.defaultProps = {\n itemKey: null,\n isInModal: false\n // buildName: null\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,QAAQ,MAAM,4BAA4B,CAAC;AAClD,OAAO,UAAU,MAAM,8BAA8B,CAAC;AACtD,OAAO,SAAS,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAehF,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAsB;IACvD,8EAA8E;IAC9E,MAAM,cAAc,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAC7D,MAAM,SAAS,GAAG,mBAAmB,CAAC,WAAW,CAAC,CAAC;IAEnD,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,GAAG,EAAE,EAAE,SAAS,GAAG,KAAK,EAAE,OAAO,GAAG,EAAE,EAAE,GAAG,KAAK,CAAC;IACvF,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAE/B,MAAM,CAAC,cAAc,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC3D,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACvD,MAAM,CAAC,WAAW,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACrD,MAAM,CAAC,qBAAqB,EAAE,wBAAwB,CAAC,GAAG,QAAQ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AS,EACf,OAAO,EAAE,mBAAmB;oBAE5B,oBAAC,SAAS,IAAC,QAAQ,EAAC,OAAO,GAAG,CACnB,GAEf,CACa,CAClB,CAAC,CAAC,CAAC,CACF,oBAAC,KAAK,CAAC,QAAQ;YACb,oBAAC,cAAc,IACb,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,EAChB,aAAa,EAAE,aAAa,EAC5B,aAAa,EAAE,WAAW,IAEzB,QAAQ,CACM;YACjB,oBAAC,QAAQ,IACP,IAAI,EAAE,YAAY,EAClB,gBAAgB,EAAE,IAAI,EACtB,OAAO,EAAE,mBAAmB,EAC5B,OAAO,EAAE,eAAe,EACxB,MAAM,EACJ,oBAAC,UAAU,IACT,IAAI,EAAC,OAAO,gBACD,OAAO,EAClB,KAAK,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,17 +1,11 @@
1
1
  /// <reference types="react" />
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
- };
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;
15
8
  }
16
- export default AssignmentCard;
9
+ export default function AssignmentCard(props: AssignmentCardProps): JSX.Element;
10
+ export {};
17
11
  //# 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,SAAS,MAAM,YAAY,CAAC;AAInC,iBAAwB,cAAc,CAAC,KAAK,KAAA,eAyB3C;kBAzBuB,cAAc;;;;;;;;;;;;eAAd,cAAc"}
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,7 +1,8 @@
1
1
  import React, { useState, useEffect } from "react";
2
- import PropTypes from "prop-types";
3
- import ActionButtons from "../ActionButtons";
2
+ import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
4
3
  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");
5
6
  const { children, actionButtons, onButtonPress } = props;
6
7
  const [arMainButtons, setArMainButtons] = useState([]);
7
8
  const [arSecondaryButtons, setArSecondaryButtons] = useState([]);
@@ -18,18 +19,4 @@ export default function AssignmentCard(props) {
18
19
  children,
19
20
  arMainButtons && arSecondaryButtons && React.createElement(ActionButtons, { arMainButtons: arMainButtons, arSecondaryButtons: arSecondaryButtons, onButtonPress: buttonPress })));
20
21
  }
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
- };
35
22
  //# 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;AACnD,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAE7C,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK;IAC1C,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;AAED,cAAc,CAAC,SAAS,GAAG;IACzB,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACnC,sDAAsD;IACtD,WAAW,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACtC,sDAAsD;IACtD,OAAO,EAAE,SAAS,CAAC,MAAM;IACzB,aAAa,EAAE,SAAS,CAAC,MAAM;IAC/B,aAAa,EAAE,SAAS,CAAC,IAAI;IAC7B,8BAA8B;CAC/B,CAAC;AAEF,cAAc,CAAC,YAAY,GAAG;IAC5B,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
+ {"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,23 +1,3 @@
1
1
  /// <reference types="react" />
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;
2
+ export default function FlowContainer(props: any): JSX.Element;
23
3
  //# 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":";AAGA,OAAO,SAAS,MAAM,YAAY,CAAC;AA6CnC,iBAAwB,aAAa,CAAC,KAAK,KAAA,eAua1C;kBAvauB,aAAa;;;;;;;;;;;;;;;;;;eAAb,aAAa"}
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,18 +1,17 @@
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';
5
4
  import { makeStyles } from '@material-ui/core/styles';
6
5
  import { Card, CardHeader, Avatar, Typography } from '@material-ui/core';
7
6
  import { Utils } from '../../../helpers/utils';
8
7
  import { Alert } from '@material-ui/lab';
9
- import Assignment from '../../Assignment';
10
- import ToDo from '../../../widget/ToDo';
11
8
  import createPConnectComponent from '../../../../bridge/react_pconnect';
12
9
  import StoreContext from '../../../../bridge/Context/StoreContext';
13
10
  import DayjsUtils from '@date-io/dayjs';
14
11
  import { MuiPickersUtilsProvider } from '@material-ui/pickers';
15
12
  import { addContainerItem, getToDoAssignments, showBanner } from './helpers';
13
+ import { isEmptyObject } from '../../../helpers/common-utils';
14
+ import { getComponentFromMap } from '../../../../bridge/helpers/sdk_component_map';
16
15
  //
17
16
  // WARNING: It is not expected that this file should be modified. It is part of infrastructure code that works with
18
17
  // Redux and creation/update of Redux containers and PConnect. Modifying this code could have undesireable results and
@@ -38,11 +37,16 @@ const useStyles = makeStyles(theme => ({
38
37
  color: theme.palette.getContrastText(theme.palette.primary.light)
39
38
  }
40
39
  }));
41
- export default function FlowContainer(props) {
40
+ export default function FlowContainer(props /* : FlowContainerProps */) {
41
+ // 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");
42
45
  const pCoreConstants = PCore.getConstants();
46
+ const PCoreVersion = PCore.getPCoreVersion();
43
47
  const { TODO } = pCoreConstants;
44
48
  const todo_headerText = 'To do';
45
- const { getPConnect, routingInfo } = props;
49
+ const { getPConnect, routingInfo, pageMessages } = props;
46
50
  const { displayOnlyFA } = useContext(StoreContext);
47
51
  const thePConn = getPConnect();
48
52
  // const [init, setInit] = useState(true);
@@ -63,6 +67,10 @@ export default function FlowContainer(props) {
63
67
  const [containerName, setContainerName] = useState('');
64
68
  const [buildName, setBuildName] = useState('');
65
69
  const [bShowConfirm, setShowConfirm] = useState(false);
70
+ const localizedVal = PCore.getLocaleUtils().getLocaleValue;
71
+ const localeCategory = 'Messages';
72
+ const caseInfo = getPConnect().getCaseInfo();
73
+ const localeReference = `${caseInfo?.getClassName()}!CASE!${caseInfo.getName()}`.toUpperCase();
66
74
  const classes = useStyles();
67
75
  function initContainer() {
68
76
  const ourPConn = getPConnect();
@@ -91,7 +99,7 @@ export default function FlowContainer(props) {
91
99
  return `${context.toUpperCase()}/${viewContainerName.toUpperCase()}`;
92
100
  }
93
101
  function getTodoVisibility() {
94
- const caseViewMode = getPConnect().getValue('context_data.caseViewMode');
102
+ const caseViewMode = getPConnect().getValue('context_data.caseViewMode', ''); // 2nd arg empty string until typedefs properly allow optional
95
103
  if (caseViewMode && caseViewMode === 'review') {
96
104
  return true;
97
105
  }
@@ -133,7 +141,7 @@ export default function FlowContainer(props) {
133
141
  const oWorkData = oWorkItem.getDataObject();
134
142
  if (bLoadChildren && oWorkData) {
135
143
  // debugger;
136
- setContainerName(oWorkData.caseInfo.assignments?.[0].name);
144
+ setContainerName(localizedVal(oWorkData.caseInfo.assignments?.[0].name, undefined, localeReference));
137
145
  }
138
146
  // debugger;
139
147
  setBuildName(getBuildName());
@@ -145,8 +153,8 @@ export default function FlowContainer(props) {
145
153
  }, []);
146
154
  function isCaseWideLocalAction() {
147
155
  const ourPConn = getPConnect();
148
- const actionID = ourPConn.getValue(pCoreConstants.CASE_INFO.ACTIVE_ACTION_ID);
149
- const caseActions = ourPConn.getValue(pCoreConstants.CASE_INFO.AVAILABLEACTIONS);
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
150
158
  let bCaseWideAction = false;
151
159
  if (caseActions && actionID) {
152
160
  const actionObj = caseActions.find(caseAction => caseAction.ID === actionID);
@@ -158,7 +166,7 @@ export default function FlowContainer(props) {
158
166
  }
159
167
  function hasChildCaseAssignments() {
160
168
  const ourPConn = getPConnect();
161
- const childCases = ourPConn.getValue(pCoreConstants.CASE_INFO.CHILD_ASSIGNMENTS);
169
+ const childCases = ourPConn.getValue(pCoreConstants.CASE_INFO.CHILD_ASSIGNMENTS, ''); // 2nd arg empty string until typedefs properly allow optional
162
170
  // const allAssignments = [];
163
171
  // eslint-disable-next-line sonarjs/prefer-single-boolean-return
164
172
  if (childCases && childCases.length > 0) {
@@ -169,21 +177,27 @@ export default function FlowContainer(props) {
169
177
  function hasAssignments() {
170
178
  const ourPConn = getPConnect();
171
179
  let bHasAssignments = false;
172
- const assignmentsList = ourPConn.getValue(pCoreConstants.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS);
173
- const thisOperator = PCore.getEnvironmentInfo().getOperatorIdentifier();
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;
174
183
  // 8.7 includes assignments in Assignments List that may be assigned to
175
184
  // a different operator. So, see if there are any assignments for
176
185
  // the current operator
177
- let bAssignmentsForThisOperator = false;
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
+ }
178
197
  // Bail out if there isn't an assignmentsList
179
198
  if (!assignmentsList) {
180
199
  return bHasAssignments;
181
200
  }
182
- for (const assignment of assignmentsList) {
183
- if (assignment['assigneeInfo']['ID'] === thisOperator) {
184
- bAssignmentsForThisOperator = true;
185
- }
186
- }
187
201
  const bHasChildCaseAssignments = hasChildCaseAssignments();
188
202
  if (bAssignmentsForThisOperator || bHasChildCaseAssignments || isCaseWideLocalAction()) {
189
203
  bHasAssignments = true;
@@ -194,8 +208,8 @@ export default function FlowContainer(props) {
194
208
  const ourPConn = getPConnect();
195
209
  let activeActionLabel = '';
196
210
  const { CASE_INFO: CASE_CONSTS } = pCoreConstants;
197
- const caseActions = ourPConn.getValue(CASE_CONSTS.CASE_INFO_ACTIONS);
198
- const activeActionID = ourPConn.getValue(CASE_CONSTS.ACTIVE_ACTION_ID);
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
199
213
  const activeAction = caseActions?.find(action => action.ID === activeActionID);
200
214
  if (activeAction) {
201
215
  activeActionLabel = activeAction.name;
@@ -210,7 +224,7 @@ export default function FlowContainer(props) {
210
224
  // let routingInfo = this.getComponentProp("routingInfo");
211
225
  let loadingInfo;
212
226
  try {
213
- loadingInfo = thePConn.getLoadingStatus();
227
+ loadingInfo = thePConn.getLoadingStatus(''); // 1st arg empty string until typedefs properly allow optional
214
228
  }
215
229
  catch (ex) {
216
230
  // eslint-disable-next-line no-console
@@ -221,14 +235,14 @@ export default function FlowContainer(props) {
221
235
  // turn off spinner
222
236
  // this.psService.sendMessage(false);
223
237
  }
224
- const caseViewMode = thePConn.getValue('context_data.caseViewMode');
238
+ const caseViewMode = thePConn.getValue('context_data.caseViewMode', ''); // 2nd arg empty string until typedefs properly allow optional
225
239
  const { CASE_INFO: CASE_CONSTS } = pCoreConstants;
226
240
  if (caseViewMode && caseViewMode === 'review') {
227
241
  setTimeout(() => {
228
242
  // updated for 8.7 - 30-Mar-2022
229
243
  const todoAssignments = getToDoAssignments(thePConn);
230
244
  if (todoAssignments && todoAssignments.length > 0) {
231
- setCaseInfoID(thePConn.getValue(CASE_CONSTS.CASE_INFO_ID));
245
+ setCaseInfoID(thePConn.getValue(CASE_CONSTS.CASE_INFO_ID, '')); // 2nd arg empty string until typedefs properly allow optional
232
246
  setTodoDatasource({ source: todoAssignments });
233
247
  }
234
248
  setShowTodo(true);
@@ -248,17 +262,17 @@ export default function FlowContainer(props) {
248
262
  }
249
263
  }
250
264
  // if have caseMessage show message and end
251
- const theCaseMessages = thePConn.getValue('caseMessages');
265
+ const theCaseMessages = localizedVal(thePConn.getValue('caseMessages', ''), localeCategory); // 2nd arg empty string until typedefs properly allow optional
252
266
  if (theCaseMessages || !hasAssignments()) {
253
267
  // Temp fix for 8.7 change: confirmationNote no longer coming through in caseMessages$.
254
268
  // So, if we get here and caseMessages$ is empty, use default value in DX API response
255
- setCaseMessages(theCaseMessages || 'Thank you! The next step in this case has been routed appropriately.');
269
+ setCaseMessages(theCaseMessages || localizedVal('Thank you! The next step in this case has been routed appropriately.', localeCategory));
256
270
  setHasCaseMessages(true);
257
271
  setShowConfirm(true);
258
272
  // publish this "assignmentFinished" for mashup, need to get approved as a standard
259
273
  PCore.getPubSubUtils().publish('assignmentFinished');
260
274
  // debugger;
261
- setCheckSvg(Utils.getImageSrc('check', PCore.getAssetLoader().getStaticServerUrl()));
275
+ setCheckSvg(Utils.getImageSrc('check', Utils.getSDKStaticConentUrl()));
262
276
  }
263
277
  else {
264
278
  // debugger;
@@ -283,7 +297,7 @@ export default function FlowContainer(props) {
283
297
  currentItems[key] &&
284
298
  currentItems[key].view &&
285
299
  type === 'single' &&
286
- !Utils.isEmptyObject(currentItems[key].view)) {
300
+ !isEmptyObject(currentItems[key].view)) {
287
301
  const currentItem = currentItems[key];
288
302
  const rootView = currentItem.view;
289
303
  const { context } = rootView.config;
@@ -313,7 +327,7 @@ export default function FlowContainer(props) {
313
327
  // check if have oWorkData, there are times due to timing of state change, when this
314
328
  // may not be available
315
329
  if (oWorkData) {
316
- setContainerName(getActiveViewLabel() || oWorkData.caseInfo.assignments?.[0].name);
330
+ setContainerName(localizedVal(getActiveViewLabel() || oWorkData.caseInfo.assignments?.[0].name, undefined, localeReference));
317
331
  }
318
332
  }
319
333
  }
@@ -324,42 +338,29 @@ export default function FlowContainer(props) {
324
338
  ? getPConnect().getCaseSummary().assignments?.[0].urgency
325
339
  : '';
326
340
  const operatorInitials = Utils.getInitials(PCore.getEnvironmentInfo().getOperatorName());
327
- let instructionText = thePConn.getCaseSummary()?.assignments?.[0]?.instructions;
328
- if (instructionText === undefined) {
329
- instructionText = '';
330
- }
331
341
  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
+ };
332
350
  return (React.createElement("div", { style: { textAlign: 'left' }, id: buildName, className: 'psdk-flow-container-top' },
333
351
  !bShowConfirm &&
334
352
  (!todo_showTodo ? (!displayOnlyFA ? (React.createElement(Card, { className: classes.root },
335
353
  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) }),
336
- instructionText !== '' ? (React.createElement(Typography, { variant: 'caption' }, instructionText)) : null,
354
+ displayPageMessages(),
337
355
  React.createElement(MuiPickersUtilsProvider, { utils: DayjsUtils },
338
356
  React.createElement(Assignment, { getPConnect: getPConnect, itemKey: itemKey }, arNewChildrenAsReact)))) : (React.createElement(Card, { className: classes.root },
339
357
  React.createElement(Typography, { variant: 'h6' }, containerName),
340
- instructionText !== '' ? (React.createElement(Typography, { variant: 'caption' }, instructionText)) : null,
358
+ displayPageMessages(),
341
359
  React.createElement(MuiPickersUtilsProvider, { utils: DayjsUtils },
342
360
  React.createElement(Assignment, { getPConnect: getPConnect, itemKey: itemKey }, arNewChildrenAsReact))))) : (React.createElement("div", null,
343
- React.createElement(ToDo, { getPConnect: getPConnect, caseInfoID: todo_caseInfoID, datasource: todo_datasource, showTodoList: todo_showTodoList, headerText: todo_headerText, type: TODO, context: todo_context, itemKey: itemKey })))),
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 })))),
344
362
  bHasCaseMessages && (React.createElement("div", { className: classes.alert },
345
363
  React.createElement(Alert, { severity: 'success' }, caseMessages))),
346
364
  bShowConfirm && bShowBanner && React.createElement("div", null, arNewChildrenAsReact)));
347
365
  }
348
- FlowContainer.defaultProps = {
349
- children: null,
350
- getPConnect: null,
351
- name: '',
352
- routingInfo: null,
353
- pageMessages: null
354
- };
355
- FlowContainer.propTypes = {
356
- // eslint-disable-next-line react/no-unused-prop-types
357
- children: PropTypes.node,
358
- getPConnect: PropTypes.func,
359
- // eslint-disable-next-line react/no-unused-prop-types
360
- name: PropTypes.string,
361
- routingInfo: PropTypes.objectOf(PropTypes.any),
362
- // eslint-disable-next-line react/no-unused-prop-types
363
- pageMessages: PropTypes.arrayOf(PropTypes.any)
364
- };
365
366
  //# sourceMappingURL=FlowContainer.js.map