@pega/react-sdk-components 8.23.11 → 23.1.11

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 (635) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +17 -0
  3. package/SECURITY.md +10 -0
  4. package/lib/bridge/Context/StoreContext.js +3 -3
  5. package/lib/bridge/Context/StoreContext.js.map +1 -1
  6. package/lib/bridge/helpers/sdk_component_map.d.ts.map +1 -1
  7. package/lib/bridge/helpers/sdk_component_map.js +24 -47
  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 +17 -28
  11. package/lib/bridge/react_pconnect.js.map +1 -1
  12. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts +7 -10
  13. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts.map +1 -1
  14. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js +2 -9
  15. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.map +1 -1
  16. package/lib/components/designSystemExtension/Banner/Banner.d.ts +15 -1
  17. package/lib/components/designSystemExtension/Banner/Banner.d.ts.map +1 -1
  18. package/lib/components/designSystemExtension/Banner/Banner.js +2 -10
  19. package/lib/components/designSystemExtension/Banner/Banner.js.map +1 -1
  20. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
  21. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts +6 -9
  22. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
  23. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +32 -33
  24. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
  25. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts +4 -10
  26. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts.map +1 -1
  27. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +10 -23
  28. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
  29. package/lib/components/designSystemExtension/DetailsFields/index.js.map +1 -1
  30. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts +8 -3
  31. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
  32. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +25 -14
  33. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
  34. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts +7 -2
  35. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts.map +1 -1
  36. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js +6 -18
  37. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
  38. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts +7 -2
  39. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts.map +1 -1
  40. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +6 -12
  41. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
  42. package/lib/components/designSystemExtension/Operator/Operator.d.ts +17 -7
  43. package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
  44. package/lib/components/designSystemExtension/Operator/Operator.js +49 -67
  45. package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
  46. package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +5 -2
  47. package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
  48. package/lib/components/designSystemExtension/Pulse/Pulse.js +9 -15
  49. package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
  50. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts +19 -0
  51. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -0
  52. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +75 -0
  53. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -0
  54. package/lib/components/designSystemExtension/RichTextEditor/index.d.ts +2 -0
  55. package/lib/components/designSystemExtension/RichTextEditor/index.d.ts.map +1 -0
  56. package/lib/components/designSystemExtension/RichTextEditor/index.js +2 -0
  57. package/lib/components/designSystemExtension/RichTextEditor/index.js.map +1 -0
  58. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts +6 -1
  59. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts.map +1 -1
  60. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js +5 -11
  61. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
  62. package/lib/components/field/AutoComplete/AutoComplete.d.ts +15 -1
  63. package/lib/components/field/AutoComplete/AutoComplete.d.ts.map +1 -1
  64. package/lib/components/field/AutoComplete/AutoComplete.js +17 -17
  65. package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
  66. package/lib/components/field/CancelAlert/CancelAlert.d.ts +12 -2
  67. package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
  68. package/lib/components/field/CancelAlert/CancelAlert.js +78 -70
  69. package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
  70. package/lib/components/field/CancelAlert/index.js.map +1 -1
  71. package/lib/components/field/Checkbox/Checkbox.d.ts +9 -1
  72. package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
  73. package/lib/components/field/Checkbox/Checkbox.js +13 -13
  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 +15 -36
  78. package/lib/components/field/Currency/Currency.js.map +1 -1
  79. package/lib/components/field/Currency/currency-utils.d.ts.map +1 -1
  80. package/lib/components/field/Currency/currency-utils.js +5 -6
  81. package/lib/components/field/Currency/currency-utils.js.map +1 -1
  82. package/lib/components/field/Date/Date.d.ts +5 -1
  83. package/lib/components/field/Date/Date.d.ts.map +1 -1
  84. package/lib/components/field/Date/Date.js +15 -9
  85. package/lib/components/field/Date/Date.js.map +1 -1
  86. package/lib/components/field/DateTime/DateTime.d.ts +5 -1
  87. package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
  88. package/lib/components/field/DateTime/DateTime.js +15 -9
  89. package/lib/components/field/DateTime/DateTime.js.map +1 -1
  90. package/lib/components/field/Decimal/Decimal.d.ts +8 -1
  91. package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
  92. package/lib/components/field/Decimal/Decimal.js +13 -29
  93. package/lib/components/field/Decimal/Decimal.js.map +1 -1
  94. package/lib/components/field/Decimal/index.js.map +1 -1
  95. package/lib/components/field/Dropdown/Dropdown.d.ts +13 -1
  96. package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
  97. package/lib/components/field/Dropdown/Dropdown.js +105 -15
  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 +12 -11
  102. package/lib/components/field/Email/Email.js.map +1 -1
  103. package/lib/components/field/Email/index.js.map +1 -1
  104. package/lib/components/field/Group/Group.d.ts +13 -0
  105. package/lib/components/field/Group/Group.d.ts.map +1 -0
  106. package/lib/components/field/Group/Group.js +15 -0
  107. package/lib/components/field/Group/Group.js.map +1 -0
  108. package/lib/components/field/Group/index.d.ts +2 -0
  109. package/lib/components/field/Group/index.d.ts.map +1 -0
  110. package/lib/components/field/Group/index.js +2 -0
  111. package/lib/components/field/Group/index.js.map +1 -0
  112. package/lib/components/field/Integer/Integer.d.ts +5 -1
  113. package/lib/components/field/Integer/Integer.d.ts.map +1 -1
  114. package/lib/components/field/Integer/Integer.js +10 -8
  115. package/lib/components/field/Integer/Integer.js.map +1 -1
  116. package/lib/components/field/Percentage/Percentage.d.ts +6 -1
  117. package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
  118. package/lib/components/field/Percentage/Percentage.js +28 -29
  119. package/lib/components/field/Percentage/Percentage.js.map +1 -1
  120. package/lib/components/field/Phone/Phone.d.ts +5 -1
  121. package/lib/components/field/Phone/Phone.d.ts.map +1 -1
  122. package/lib/components/field/Phone/Phone.js +10 -9
  123. package/lib/components/field/Phone/Phone.js.map +1 -1
  124. package/lib/components/field/Phone/index.js.map +1 -1
  125. package/lib/components/field/RadioButtons/RadioButtons.d.ts +7 -1
  126. package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
  127. package/lib/components/field/RadioButtons/RadioButtons.js +19 -15
  128. package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
  129. package/lib/components/field/RichText/RichText.d.ts +7 -0
  130. package/lib/components/field/RichText/RichText.d.ts.map +1 -0
  131. package/lib/components/field/RichText/RichText.js +54 -0
  132. package/lib/components/field/RichText/RichText.js.map +1 -0
  133. package/lib/components/field/RichText/index.d.ts +2 -0
  134. package/lib/components/field/RichText/index.d.ts.map +1 -0
  135. package/lib/components/field/RichText/index.js +2 -0
  136. package/lib/components/field/RichText/index.js.map +1 -0
  137. package/lib/components/field/ScalarList/ScalarList.d.ts +13 -0
  138. package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -0
  139. package/lib/components/field/ScalarList/ScalarList.js +32 -0
  140. package/lib/components/field/ScalarList/ScalarList.js.map +1 -0
  141. package/lib/components/field/ScalarList/index.d.ts +2 -0
  142. package/lib/components/field/ScalarList/index.d.ts.map +1 -0
  143. package/lib/components/field/ScalarList/index.js +2 -0
  144. package/lib/components/field/ScalarList/index.js.map +1 -0
  145. package/lib/components/field/SemanticLink/SemanticLink.d.ts +5 -9
  146. package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
  147. package/lib/components/field/SemanticLink/SemanticLink.js +11 -19
  148. package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
  149. package/lib/components/field/SemanticLink/utils.d.ts.map +1 -1
  150. package/lib/components/field/SemanticLink/utils.js +8 -8
  151. package/lib/components/field/SemanticLink/utils.js.map +1 -1
  152. package/lib/components/field/TextArea/TextArea.d.ts +6 -1
  153. package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
  154. package/lib/components/field/TextArea/TextArea.js +8 -6
  155. package/lib/components/field/TextArea/TextArea.js.map +1 -1
  156. package/lib/components/field/TextContent/TextContent.d.ts +7 -1
  157. package/lib/components/field/TextContent/TextContent.d.ts.map +1 -1
  158. package/lib/components/field/TextContent/TextContent.js +2 -2
  159. package/lib/components/field/TextContent/TextContent.js.map +1 -1
  160. package/lib/components/field/TextInput/TextInput.d.ts +6 -1
  161. package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
  162. package/lib/components/field/TextInput/TextInput.js +10 -7
  163. package/lib/components/field/TextInput/TextInput.js.map +1 -1
  164. package/lib/components/field/TextInput/index.js.map +1 -1
  165. package/lib/components/field/Time/Time.d.ts +5 -1
  166. package/lib/components/field/Time/Time.d.ts.map +1 -1
  167. package/lib/components/field/Time/Time.js +11 -9
  168. package/lib/components/field/Time/Time.js.map +1 -1
  169. package/lib/components/field/URL/URL.d.ts +5 -1
  170. package/lib/components/field/URL/URL.d.ts.map +1 -1
  171. package/lib/components/field/URL/URL.js +10 -8
  172. package/lib/components/field/URL/URL.js.map +1 -1
  173. package/lib/components/field/URL/index.js.map +1 -1
  174. package/lib/components/field/UserReference/UserReference.d.ts +20 -41
  175. package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
  176. package/lib/components/field/UserReference/UserReference.js +17 -46
  177. package/lib/components/field/UserReference/UserReference.js.map +1 -1
  178. package/lib/components/field/UserReference/UserReferenceUtils.js +2 -2
  179. package/lib/components/field/UserReference/UserReferenceUtils.js.map +1 -1
  180. package/lib/components/helpers/attachmentHelpers.d.ts +3 -3
  181. package/lib/components/helpers/attachmentHelpers.d.ts.map +1 -1
  182. package/lib/components/helpers/attachmentHelpers.js +6 -6
  183. package/lib/components/helpers/attachmentHelpers.js.map +1 -1
  184. package/lib/components/helpers/case-utils.d.ts.map +1 -1
  185. package/lib/components/helpers/case-utils.js +5 -4
  186. package/lib/components/helpers/case-utils.js.map +1 -1
  187. package/lib/components/helpers/common-utils.d.ts +2 -1
  188. package/lib/components/helpers/common-utils.d.ts.map +1 -1
  189. package/lib/components/helpers/common-utils.js +4 -1
  190. package/lib/components/helpers/common-utils.js.map +1 -1
  191. package/lib/components/helpers/data_page.d.ts.map +1 -1
  192. package/lib/components/helpers/data_page.js +2 -3
  193. package/lib/components/helpers/data_page.js.map +1 -1
  194. package/lib/components/helpers/date-format-utils.d.ts +1 -6
  195. package/lib/components/helpers/date-format-utils.d.ts.map +1 -1
  196. package/lib/components/helpers/date-format-utils.js.map +1 -1
  197. package/lib/components/helpers/event-utils.d.ts +1 -1
  198. package/lib/components/helpers/event-utils.d.ts.map +1 -1
  199. package/lib/components/helpers/event-utils.js +3 -3
  200. package/lib/components/helpers/event-utils.js.map +1 -1
  201. package/lib/components/helpers/field-group-utils.d.ts.map +1 -1
  202. package/lib/components/helpers/field-group-utils.js +3 -7
  203. package/lib/components/helpers/field-group-utils.js.map +1 -1
  204. package/lib/components/helpers/formatters/Boolean.d.ts.map +1 -1
  205. package/lib/components/helpers/formatters/Boolean.js +9 -20
  206. package/lib/components/helpers/formatters/Boolean.js.map +1 -1
  207. package/lib/components/helpers/formatters/Currency.d.ts +6 -6
  208. package/lib/components/helpers/formatters/Currency.d.ts.map +1 -1
  209. package/lib/components/helpers/formatters/Currency.js +13 -14
  210. package/lib/components/helpers/formatters/Currency.js.map +1 -1
  211. package/lib/components/helpers/formatters/CurrencyMap.d.ts +69 -320
  212. package/lib/components/helpers/formatters/CurrencyMap.d.ts.map +1 -1
  213. package/lib/components/helpers/formatters/CurrencyMap.js +500 -500
  214. package/lib/components/helpers/formatters/CurrencyMap.js.map +1 -1
  215. package/lib/components/helpers/formatters/Date.d.ts +5 -5
  216. package/lib/components/helpers/formatters/Date.d.ts.map +1 -1
  217. package/lib/components/helpers/formatters/Date.js +20 -20
  218. package/lib/components/helpers/formatters/Date.js.map +1 -1
  219. package/lib/components/helpers/formatters/common.d.ts +1 -1
  220. package/lib/components/helpers/formatters/common.d.ts.map +1 -1
  221. package/lib/components/helpers/formatters/common.js +1 -1
  222. package/lib/components/helpers/formatters/common.js.map +1 -1
  223. package/lib/components/helpers/formatters/index.d.ts +12 -12
  224. package/lib/components/helpers/formatters/index.d.ts.map +1 -1
  225. package/lib/components/helpers/formatters/index.js +25 -19
  226. package/lib/components/helpers/formatters/index.js.map +1 -1
  227. package/lib/components/helpers/reactContextHelpers.d.ts.map +1 -1
  228. package/lib/components/helpers/reactContextHelpers.js +1 -1
  229. package/lib/components/helpers/reactContextHelpers.js.map +1 -1
  230. package/lib/components/helpers/simpleTableHelpers.d.ts +3 -1
  231. package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
  232. package/lib/components/helpers/simpleTableHelpers.js +48 -54
  233. package/lib/components/helpers/simpleTableHelpers.js.map +1 -1
  234. package/lib/components/helpers/state-utils.d.ts.map +1 -1
  235. package/lib/components/helpers/state-utils.js +6 -8
  236. package/lib/components/helpers/state-utils.js.map +1 -1
  237. package/lib/components/helpers/template-utils.d.ts +7 -3
  238. package/lib/components/helpers/template-utils.d.ts.map +1 -1
  239. package/lib/components/helpers/template-utils.js +2 -2
  240. package/lib/components/helpers/template-utils.js.map +1 -1
  241. package/lib/components/helpers/utils.d.ts +1 -1
  242. package/lib/components/helpers/utils.d.ts.map +1 -1
  243. package/lib/components/helpers/utils.js +3 -8
  244. package/lib/components/helpers/utils.js.map +1 -1
  245. package/lib/components/helpers/versionHelpers.d.ts +6 -0
  246. package/lib/components/helpers/versionHelpers.d.ts.map +1 -1
  247. package/lib/components/helpers/versionHelpers.js +7 -1
  248. package/lib/components/helpers/versionHelpers.js.map +1 -1
  249. package/lib/components/infra/ActionButtons/ActionButtons.d.ts +6 -13
  250. package/lib/components/infra/ActionButtons/ActionButtons.d.ts.map +1 -1
  251. package/lib/components/infra/ActionButtons/ActionButtons.js +11 -27
  252. package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
  253. package/lib/components/infra/ActionButtons/index.js.map +1 -1
  254. package/lib/components/infra/Assignment/Assignment.d.ts +9 -16
  255. package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
  256. package/lib/components/infra/Assignment/Assignment.js +71 -74
  257. package/lib/components/infra/Assignment/Assignment.js.map +1 -1
  258. package/lib/components/infra/Assignment/index.js.map +1 -1
  259. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +7 -15
  260. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
  261. package/lib/components/infra/AssignmentCard/AssignmentCard.js +6 -20
  262. package/lib/components/infra/AssignmentCard/AssignmentCard.js.map +1 -1
  263. package/lib/components/infra/AssignmentCard/index.js.map +1 -1
  264. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +10 -20
  265. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
  266. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +63 -192
  267. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
  268. package/lib/components/infra/Containers/FlowContainer/helpers.d.ts.map +1 -1
  269. package/lib/components/infra/Containers/FlowContainer/helpers.js +30 -30
  270. package/lib/components/infra/Containers/FlowContainer/helpers.js.map +1 -1
  271. package/lib/components/infra/Containers/FlowContainer/index.js.map +1 -1
  272. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts +9 -0
  273. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts.map +1 -0
  274. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js +36 -0
  275. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js.map +1 -0
  276. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/index.d.ts +2 -0
  277. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/index.d.ts.map +1 -0
  278. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/index.js +2 -0
  279. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/index.js.map +1 -0
  280. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +8 -17
  281. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
  282. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +179 -172
  283. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
  284. package/lib/components/infra/Containers/ModalViewContainer/index.js.map +1 -1
  285. package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts +9 -0
  286. package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts.map +1 -0
  287. package/lib/components/infra/Containers/SimpleView/SimpleView.js +29 -0
  288. package/lib/components/infra/Containers/SimpleView/SimpleView.js.map +1 -0
  289. package/lib/components/infra/Containers/SimpleView/helper.d.ts +10 -0
  290. package/lib/components/infra/Containers/SimpleView/helper.d.ts.map +1 -0
  291. package/lib/components/infra/Containers/SimpleView/helper.js +102 -0
  292. package/lib/components/infra/Containers/SimpleView/helper.js.map +1 -0
  293. package/lib/components/infra/Containers/SimpleView/index.d.ts +2 -0
  294. package/lib/components/infra/Containers/SimpleView/index.d.ts.map +1 -0
  295. package/lib/components/infra/Containers/SimpleView/index.js +2 -0
  296. package/lib/components/infra/Containers/SimpleView/index.js.map +1 -0
  297. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +9 -22
  298. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
  299. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +24 -44
  300. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
  301. package/lib/components/infra/Containers/helpers.d.ts +2 -0
  302. package/lib/components/infra/Containers/helpers.d.ts.map +1 -0
  303. package/lib/components/infra/Containers/helpers.js +7 -0
  304. package/lib/components/infra/Containers/helpers.js.map +1 -0
  305. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +9 -20
  306. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
  307. package/lib/components/infra/DashboardFilter/DashboardFilter.js +15 -33
  308. package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
  309. package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -1
  310. package/lib/components/infra/DashboardFilter/filterUtils.js +10 -12
  311. package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
  312. package/lib/components/infra/DeferLoad/DeferLoad.d.ts +8 -13
  313. package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
  314. package/lib/components/infra/DeferLoad/DeferLoad.js +11 -22
  315. package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
  316. package/lib/components/infra/DeferLoad/index.js.map +1 -1
  317. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +5 -12
  318. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
  319. package/lib/components/infra/ErrorBoundary/ErrorBoundary.js +17 -26
  320. package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
  321. package/lib/components/infra/MultiStep/MultiStep.css +11 -15
  322. package/lib/components/infra/MultiStep/MultiStep.d.ts +10 -18
  323. package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
  324. package/lib/components/infra/MultiStep/MultiStep.js +32 -97
  325. package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
  326. package/lib/components/infra/MultiStep/index.js.map +1 -1
  327. package/lib/components/infra/NavBar/NavBar.css +103 -105
  328. package/lib/components/infra/NavBar/NavBar.d.ts +8 -16
  329. package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
  330. package/lib/components/infra/NavBar/NavBar.js +19 -66
  331. package/lib/components/infra/NavBar/NavBar.js.map +1 -1
  332. package/lib/components/infra/Reference/Reference.d.ts +8 -17
  333. package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
  334. package/lib/components/infra/Reference/Reference.js +5 -17
  335. package/lib/components/infra/Reference/Reference.js.map +1 -1
  336. package/lib/components/infra/Region/Region.d.ts +4 -8
  337. package/lib/components/infra/Region/Region.d.ts.map +1 -1
  338. package/lib/components/infra/Region/Region.js +2 -7
  339. package/lib/components/infra/Region/Region.js.map +1 -1
  340. package/lib/components/infra/RootContainer/RootContainer.d.ts +13 -20
  341. package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
  342. package/lib/components/infra/RootContainer/RootContainer.js +41 -80
  343. package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
  344. package/lib/components/infra/RootContainer/index.js.map +1 -1
  345. package/lib/components/infra/Stages/Stages.d.ts +5 -8
  346. package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
  347. package/lib/components/infra/Stages/Stages.js +19 -27
  348. package/lib/components/infra/Stages/Stages.js.map +1 -1
  349. package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.d.ts.map +1 -1
  350. package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js +6 -8
  351. package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js.map +1 -1
  352. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts +4 -10
  353. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts.map +1 -1
  354. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +13 -17
  355. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
  356. package/lib/components/infra/View/View.d.ts +13 -17
  357. package/lib/components/infra/View/View.d.ts.map +1 -1
  358. package/lib/components/infra/View/View.js +10 -32
  359. package/lib/components/infra/View/View.js.map +1 -1
  360. package/lib/components/template/AppShell/AppShell.css +22 -23
  361. package/lib/components/template/AppShell/AppShell.d.ts +20 -16
  362. package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
  363. package/lib/components/template/AppShell/AppShell.js +27 -45
  364. package/lib/components/template/AppShell/AppShell.js.map +1 -1
  365. package/lib/components/template/BannerPage/BannerPage.d.ts +12 -24
  366. package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
  367. package/lib/components/template/BannerPage/BannerPage.js +7 -25
  368. package/lib/components/template/BannerPage/BannerPage.js.map +1 -1
  369. package/lib/components/template/CaseSummary/CaseSummary.d.ts +5 -8
  370. package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
  371. package/lib/components/template/CaseSummary/CaseSummary.js +48 -12
  372. package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
  373. package/lib/components/template/CaseView/CaseView.d.ts +10 -23
  374. package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
  375. package/lib/components/template/CaseView/CaseView.js +22 -58
  376. package/lib/components/template/CaseView/CaseView.js.map +1 -1
  377. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +8 -15
  378. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
  379. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +37 -19
  380. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
  381. package/lib/components/template/Confirmation/Confirmation.d.ts +10 -17
  382. package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
  383. package/lib/components/template/Confirmation/Confirmation.js +10 -28
  384. package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
  385. package/lib/components/template/DataReference/DataReference.d.ts +15 -30
  386. package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
  387. package/lib/components/template/DataReference/DataReference.js +35 -72
  388. package/lib/components/template/DataReference/DataReference.js.map +1 -1
  389. package/lib/components/template/DefaultForm/DefaultForm.css +7 -3
  390. package/lib/components/template/DefaultForm/DefaultForm.d.ts +7 -11
  391. package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
  392. package/lib/components/template/DefaultForm/DefaultForm.js +5 -15
  393. package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
  394. package/lib/components/template/Details/Details/Details.d.ts +7 -15
  395. package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
  396. package/lib/components/template/Details/Details/Details.js +8 -21
  397. package/lib/components/template/Details/Details/Details.js.map +1 -1
  398. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +7 -16
  399. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
  400. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js +6 -23
  401. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
  402. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +7 -15
  403. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
  404. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +9 -22
  405. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
  406. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +7 -15
  407. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
  408. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +9 -22
  409. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
  410. package/lib/components/template/Details/DetailsTwoColumn/index.js.map +1 -1
  411. package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts +10 -0
  412. package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts.map +1 -0
  413. package/lib/components/template/Details/DynamicTabs/DynamicTabs.js +45 -0
  414. package/lib/components/template/Details/DynamicTabs/DynamicTabs.js.map +1 -0
  415. package/lib/components/template/Details/DynamicTabs/index.d.ts +2 -0
  416. package/lib/components/template/Details/DynamicTabs/index.d.ts.map +1 -0
  417. package/lib/components/template/Details/DynamicTabs/index.js +2 -0
  418. package/lib/components/template/Details/DynamicTabs/index.js.map +1 -0
  419. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +12 -19
  420. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
  421. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +11 -26
  422. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
  423. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +7 -8
  424. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
  425. package/lib/components/template/InlineDashboard/InlineDashboard.js +3 -14
  426. package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
  427. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +8 -16
  428. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
  429. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js +9 -17
  430. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js.map +1 -1
  431. package/lib/components/template/ListPage/ListPage.d.ts +5 -13
  432. package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
  433. package/lib/components/template/ListPage/ListPage.js +7 -11
  434. package/lib/components/template/ListPage/ListPage.js.map +1 -1
  435. package/lib/components/template/ListView/DefaultViewMeta.d.ts.map +1 -1
  436. package/lib/components/template/ListView/DefaultViewMeta.js.map +1 -1
  437. package/lib/components/template/ListView/ListView.d.ts +15 -8
  438. package/lib/components/template/ListView/ListView.d.ts.map +1 -1
  439. package/lib/components/template/ListView/ListView.js +168 -258
  440. package/lib/components/template/ListView/ListView.js.map +1 -1
  441. package/lib/components/template/ListView/hooks.d.ts.map +1 -1
  442. package/lib/components/template/ListView/hooks.js +4 -6
  443. package/lib/components/template/ListView/hooks.js.map +1 -1
  444. package/lib/components/template/ListView/utils.d.ts +45 -1
  445. package/lib/components/template/ListView/utils.d.ts.map +1 -1
  446. package/lib/components/template/ListView/utils.js +165 -32
  447. package/lib/components/template/ListView/utils.js.map +1 -1
  448. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +9 -13
  449. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
  450. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js +5 -16
  451. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -1
  452. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.css +0 -2
  453. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +11 -2
  454. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -1
  455. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js +2 -10
  456. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js.map +1 -1
  457. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +7 -15
  458. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
  459. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +9 -22
  460. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
  461. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.css +0 -2
  462. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +6 -2
  463. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -1
  464. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js +2 -5
  465. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js.map +1 -1
  466. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +8 -15
  467. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
  468. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js +7 -18
  469. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -1
  470. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +5 -8
  471. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
  472. package/lib/components/template/OneColumn/OneColumn/OneColumn.js +9 -13
  473. package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
  474. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +4 -8
  475. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
  476. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js +5 -8
  477. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -1
  478. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +5 -8
  479. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
  480. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js +2 -7
  481. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js.map +1 -1
  482. package/lib/components/template/PromotedFilters/PromotedFilters.css +1 -1
  483. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +9 -14
  484. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
  485. package/lib/components/template/PromotedFilters/PromotedFilters.js +14 -27
  486. package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
  487. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts +19 -1
  488. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
  489. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js +62 -13
  490. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
  491. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +24 -2
  492. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
  493. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +120 -130
  494. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
  495. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +14 -29
  496. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
  497. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js +15 -33
  498. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
  499. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +14 -26
  500. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
  501. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js +8 -29
  502. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
  503. package/lib/components/template/SubTabs/SubTabs.d.ts +5 -11
  504. package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
  505. package/lib/components/template/SubTabs/SubTabs.js +7 -17
  506. package/lib/components/template/SubTabs/SubTabs.js.map +1 -1
  507. package/lib/components/template/SubTabs/tabUtils.d.ts.map +1 -1
  508. package/lib/components/template/SubTabs/tabUtils.js +2 -4
  509. package/lib/components/template/SubTabs/tabUtils.js.map +1 -1
  510. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.css +0 -1
  511. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts +6 -12
  512. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
  513. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +15 -24
  514. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
  515. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +4 -8
  516. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
  517. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js +5 -8
  518. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -1
  519. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +6 -12
  520. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
  521. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +15 -21
  522. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
  523. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.css +0 -2
  524. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +11 -2
  525. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
  526. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js +3 -11
  527. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js.map +1 -1
  528. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +7 -15
  529. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
  530. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +23 -26
  531. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
  532. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.css +0 -2
  533. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +6 -2
  534. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -1
  535. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js +2 -5
  536. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js.map +1 -1
  537. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +8 -15
  538. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
  539. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js +7 -17
  540. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js.map +1 -1
  541. package/lib/components/template/WideNarrow/WideNarrowPage/index.js.map +1 -1
  542. package/lib/components/template/WssNavBar/WssNavBar.d.ts +18 -1
  543. package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -1
  544. package/lib/components/template/WssNavBar/WssNavBar.js +20 -37
  545. package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
  546. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts +9 -17
  547. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
  548. package/lib/components/widget/AppAnnouncement/AppAnnouncement.js +13 -37
  549. package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
  550. package/lib/components/widget/Attachment/Attachment.css +60 -1
  551. package/lib/components/widget/Attachment/Attachment.d.ts +8 -1
  552. package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
  553. package/lib/components/widget/Attachment/Attachment.js +277 -343
  554. package/lib/components/widget/Attachment/Attachment.js.map +1 -1
  555. package/lib/components/widget/Attachment/index.js.map +1 -1
  556. package/lib/components/widget/CaseHistory/CaseHistory.d.ts +4 -7
  557. package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
  558. package/lib/components/widget/CaseHistory/CaseHistory.js +38 -36
  559. package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
  560. package/lib/components/widget/CaseHistory/index.js.map +1 -1
  561. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +9 -1
  562. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts.map +1 -1
  563. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js +2 -4
  564. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
  565. package/lib/components/widget/FileUtility/FileUtility/FileUtility.css +2 -2
  566. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +5 -1
  567. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
  568. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +121 -140
  569. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
  570. package/lib/components/widget/Followers/Followers.d.ts +5 -6
  571. package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
  572. package/lib/components/widget/Followers/Followers.js +10 -25
  573. package/lib/components/widget/Followers/Followers.js.map +1 -1
  574. package/lib/components/widget/QuickCreate/QuickCreate.d.ts +8 -1
  575. package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
  576. package/lib/components/widget/QuickCreate/QuickCreate.js +59 -29
  577. package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
  578. package/lib/components/widget/SummaryItem/SummaryItem.css +9 -9
  579. package/lib/components/widget/SummaryItem/SummaryItem.d.ts +8 -1
  580. package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
  581. package/lib/components/widget/SummaryItem/SummaryItem.js +8 -23
  582. package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
  583. package/lib/components/widget/SummaryItem/index.js.map +1 -1
  584. package/lib/components/widget/SummaryList/SummaryList.d.ts +8 -1
  585. package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
  586. package/lib/components/widget/SummaryList/SummaryList.js +6 -3
  587. package/lib/components/widget/SummaryList/SummaryList.js.map +1 -1
  588. package/lib/components/widget/ToDo/ToDo.css +4 -4
  589. package/lib/components/widget/ToDo/ToDo.d.ts +13 -27
  590. package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
  591. package/lib/components/widget/ToDo/ToDo.js +26 -98
  592. package/lib/components/widget/ToDo/ToDo.js.map +1 -1
  593. package/lib/components_map.d.ts +2 -2
  594. package/lib/components_map.d.ts.map +1 -1
  595. package/lib/components_map.js +4 -2
  596. package/lib/components_map.js.map +1 -1
  597. package/lib/doc/KeyReleaseUpdates.md +39 -0
  598. package/lib/hooks/index.d.ts +4 -0
  599. package/lib/hooks/index.d.ts.map +1 -0
  600. package/lib/hooks/index.js +4 -0
  601. package/lib/hooks/index.js.map +1 -0
  602. package/lib/hooks/useAfterInitialEffect.d.ts +9 -0
  603. package/lib/hooks/useAfterInitialEffect.d.ts.map +1 -0
  604. package/lib/hooks/useAfterInitialEffect.js +16 -0
  605. package/lib/hooks/useAfterInitialEffect.js.map +1 -0
  606. package/lib/hooks/useConsolidatedRef.d.ts +9 -0
  607. package/lib/hooks/useConsolidatedRef.d.ts.map +1 -0
  608. package/lib/hooks/useConsolidatedRef.js +30 -0
  609. package/lib/hooks/useConsolidatedRef.js.map +1 -0
  610. package/lib/hooks/useUID.d.ts +8 -0
  611. package/lib/hooks/useUID.d.ts.map +1 -0
  612. package/lib/hooks/useUID.js +14 -0
  613. package/lib/hooks/useUID.js.map +1 -0
  614. package/lib/index.d.ts +1 -0
  615. package/lib/index.d.ts.map +1 -1
  616. package/lib/index.js +2 -1
  617. package/lib/index.js.map +1 -1
  618. package/lib/sdk-local-component-map.js +2 -2
  619. package/lib/sdk-pega-component-map.d.ts +21 -1
  620. package/lib/sdk-pega-component-map.js +112 -92
  621. package/lib/sdk-pega-component-map.js.map +1 -1
  622. package/lib/types/PConnProps.d.ts +41 -0
  623. package/package.json +5 -2
  624. package/lib/components/helpers/auth.d.ts +0 -16
  625. package/lib/components/helpers/auth.d.ts.map +0 -1
  626. package/lib/components/helpers/auth.js +0 -437
  627. package/lib/components/helpers/auth.js.map +0 -1
  628. package/lib/components/helpers/authManager.d.ts +0 -18
  629. package/lib/components/helpers/authManager.d.ts.map +0 -1
  630. package/lib/components/helpers/authManager.js +0 -592
  631. package/lib/components/helpers/authManager.js.map +0 -1
  632. package/lib/components/helpers/config_access.d.ts +0 -3
  633. package/lib/components/helpers/config_access.d.ts.map +0 -1
  634. package/lib/components/helpers/config_access.js +0 -261
  635. package/lib/components/helpers/config_access.js.map +0 -1
@@ -1,38 +1,72 @@
1
- import React, { useEffect, useRef, useState, createElement } from 'react';
2
- import PropTypes from 'prop-types';
3
- import isEqual from 'fast-deep-equal';
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { createElement, useEffect, useRef, useState } from 'react';
4
3
  import Dialog from '@material-ui/core/Dialog';
5
4
  import DialogContent from '@material-ui/core/DialogContent';
6
5
  import DialogTitle from '@material-ui/core/DialogTitle';
7
6
  import { makeStyles } from '@material-ui/core/styles';
7
+ import { MuiPickersUtilsProvider } from '@material-ui/pickers';
8
+ import DayjsUtils from '@date-io/dayjs';
9
+ import difference from 'lodash.difference';
8
10
  import createPConnectComponent from '../../../../bridge/react_pconnect';
9
11
  // Need to get correct implementation from component map for Assignment and CancelAlert
10
12
  import { getComponentFromMap } from '../../../../bridge/helpers/sdk_component_map';
11
13
  import { getBanners } from '../../../helpers/case-utils';
12
- import { isEmptyObject } from '../../../helpers/common-utils';
14
+ function isOpenModalAction(prevModalCollection, currentModalList) {
15
+ return prevModalCollection && currentModalList ? Object.keys(prevModalCollection).length < currentModalList.length : false;
16
+ }
17
+ function isUpdateModalAction(prevModalCollection, currentModalList) {
18
+ return prevModalCollection && currentModalList ? Object.keys(prevModalCollection).length === currentModalList.length : false;
19
+ }
20
+ function isCloseModalAction(prevModalCollection, currentModalList) {
21
+ return prevModalCollection && currentModalList ? Object.keys(prevModalCollection).length > currentModalList.length : false;
22
+ }
13
23
  function buildName(pConnect, name = '') {
14
24
  const context = pConnect.getContextName();
15
25
  return `${context}/${name}`;
16
26
  }
17
- function getKeyAndLatestItem(routinginfo, pConn) {
27
+ function getKeyAndLatestItem(routinginfo, pConn, options) {
18
28
  const containerName = pConn.getContainerName();
29
+ const { acTertiary = false } = options || {};
19
30
  if (PCore.getContainerUtils().hasContainerItems(buildName(pConn, containerName))) {
20
31
  const { accessedOrder, items } = routinginfo;
21
- const key = accessedOrder[accessedOrder.length - 1];
32
+ let key;
33
+ // eslint-disable-next-line no-plusplus
34
+ for (let i = accessedOrder.length - 1; i >= 0; i--) {
35
+ const tempkey = accessedOrder[i];
36
+ if ((acTertiary && items[tempkey].acTertiary) || (!acTertiary && !items[tempkey].acTertiary)) {
37
+ key = tempkey;
38
+ break;
39
+ }
40
+ }
22
41
  const latestItem = items[key];
23
42
  return { key, latestItem };
24
43
  }
25
44
  return {};
26
45
  }
27
- function getConfigObject(item, pConnect) {
46
+ function getConfigObject(item, pConnect, isReverseCoexistence = false) {
47
+ let config;
48
+ if (isReverseCoexistence) {
49
+ config = {
50
+ options: {
51
+ pageReference: pConnect?.getPageReference(),
52
+ hasForm: true,
53
+ containerName: pConnect?.getContainerName() || PCore.getConstants().MODAL
54
+ }
55
+ };
56
+ return PCore.createPConnect(config);
57
+ }
28
58
  if (item) {
29
- const { context, view } = item;
30
- const config = {
59
+ const { context, view, isBulkAction } = item;
60
+ const target = PCore.getContainerUtils().getTargetFromContainerItemID(context);
61
+ config = {
31
62
  meta: view,
32
63
  options: {
33
64
  context,
34
65
  pageReference: view.config.context || pConnect.getPageReference(),
35
- hasForm: true
66
+ hasForm: true,
67
+ ...(isBulkAction && { isBulkAction }),
68
+ containerName: pConnect?.getContainerName() || PCore.getConstants().MODAL,
69
+ target
36
70
  }
37
71
  };
38
72
  return PCore.createPConnect(config);
@@ -45,213 +79,186 @@ const useStyles = makeStyles(theme => ({
45
79
  marginRight: theme.spacing(2),
46
80
  marginTop: theme.spacing(2),
47
81
  marginBottom: theme.spacing(0)
48
- // paddingLeft: theme.spacing(0),
49
- // paddingRight: theme.spacing(0),
50
- // paddingTop: theme.spacing(0),
51
- // paddingBottom: theme.spacing(0),
52
82
  },
53
83
  dlgContent: {
54
84
  marginLeft: theme.spacing(2),
55
85
  marginRight: theme.spacing(2),
56
86
  marginTop: theme.spacing(0),
57
87
  marginBottom: theme.spacing(2)
58
- // paddingLeft: theme.spacing(0),
59
- // paddingRight: theme.spacing(0),
60
- // paddingTop: theme.spacing(0),
61
- // paddingBottom: theme.spacing(0),
62
88
  }
63
89
  }));
64
- const ModalViewContainer = props => {
90
+ export default function ModalViewContainer(props) {
65
91
  // Get the proper implementation (local or Pega-provided) for these components that are emitted below
66
- const Assignment = getComponentFromMap("Assignment");
67
- const CancelAlert = getComponentFromMap("CancelAlert");
92
+ const Assignment = getComponentFromMap('Assignment');
93
+ const CancelAlert = getComponentFromMap('CancelAlert');
94
+ const ListViewActionButtons = getComponentFromMap('ListViewActionButtons');
68
95
  const classes = useStyles();
96
+ const modalCollection = useRef({});
69
97
  const routingInfoRef = useRef({});
70
- const { getPConnect, routingInfo, loadingInfo, pageMessages } = props;
98
+ const { getPConnect, routingInfo = null, pageMessages = [] } = props;
71
99
  const pConn = getPConnect();
100
+ const { acTertiary } = pConn.getConfigProps();
72
101
  const { CONTAINER_TYPE: { MULTIPLE }, PUB_SUB_EVENTS: { EVENT_SHOW_CANCEL_ALERT } } = PCore.getConstants();
73
- const { subscribe } = PCore.getPubSubUtils();
102
+ const { subscribe, unsubscribe } = PCore.getPubSubUtils();
74
103
  const [bShowModal, setShowModal] = useState(false);
75
- const [bSubscribed, setSubscribed] = useState(false);
76
104
  const [bShowCancelAlert, setShowCancelAlert] = useState(false);
77
- const [oCaseInfo, setOCaseInfo] = useState({});
78
105
  const [createdView, setCreatedView] = useState(null);
79
106
  const [title, setTitle] = useState('');
80
107
  const [arNewChildrenAsReact, setArNewChildrenAsReact] = useState([]);
81
108
  const [itemKey, setItemKey] = useState('');
82
- const [cancelPConn, setCancelPConn] = useState(null);
109
+ const [cancelAlertProps, setCancelAlertProps] = useState({});
110
+ const [isMultiRecordData, setMultiRecordData] = useState(false);
83
111
  const localizedVal = PCore.getLocaleUtils().getLocaleValue;
84
112
  const localeCategory = 'Data Object';
113
+ const ERROR_WHILE_RENDERING = 'ERROR_WHILE_RENDERING';
85
114
  function showAlert(payload) {
86
- const { latestItem } = getKeyAndLatestItem(routingInfoRef.current, pConn);
87
- const { isModalAction } = payload;
115
+ const { latestItem } = getKeyAndLatestItem(routingInfoRef.current, pConn, { acTertiary });
116
+ const isReverseCoexistence = PCore.getCoexistenceManager().getBroadcastUtils().isReverseCoexistenceCaseLoaded();
117
+ const { isModalAction, hideDelete, isDataObject, skipReleaseLockRequest } = payload;
88
118
  /*
89
119
  If we are in create stage full page mode, created a new case and trying to click on cancel button
90
120
  it will show two alert dialogs which is not expected. Hence isModalAction flag to avoid that.
91
121
  */
92
122
  if (latestItem && isModalAction) {
93
- const configObject = getConfigObject(latestItem, pConn);
94
- setCancelPConn(configObject.getPConnect());
123
+ const configObject = getConfigObject(latestItem, pConn, isReverseCoexistence);
124
+ const contextName = configObject?.getPConnect().getContextName();
125
+ setCancelAlertProps({
126
+ heading: 'Discard unsaved changes?',
127
+ content: 'You have unsaved changes. You can discard them or go back to keep working.',
128
+ getPConnect: configObject?.getPConnect,
129
+ itemKey: contextName,
130
+ hideDelete,
131
+ isDataObject,
132
+ skipReleaseLockRequest
133
+ });
95
134
  setShowCancelAlert(true);
96
135
  }
97
136
  }
98
- function compareCaseInfoIsDifferent(oCurrentCaseInfo) {
99
- let bRet = false;
100
- // fast-deep-equal version
101
- if (isEqual !== undefined) {
102
- bRet = !isEqual(oCaseInfo, oCurrentCaseInfo);
103
- }
104
- else {
105
- const sCurrentCaseInfo = JSON.stringify(oCurrentCaseInfo);
106
- const sOldCaseInfo = JSON.stringify(oCaseInfo);
107
- // stringify compare version
108
- if (sCurrentCaseInfo !== sOldCaseInfo) {
109
- bRet = true;
110
- }
111
- }
112
- // if different, save off new case info
113
- if (bRet) {
114
- setOCaseInfo(JSON.parse(JSON.stringify(oCurrentCaseInfo)));
137
+ function handleModalOpen(key) {
138
+ modalCollection.current = {
139
+ ...modalCollection.current,
140
+ [key]: {}
141
+ };
142
+ }
143
+ function handleModalClose(accessedOrder) {
144
+ const tempModalCollection = modalCollection.current;
145
+ const [closedModalKey] = difference(Object.keys(tempModalCollection), accessedOrder);
146
+ if (closedModalKey && tempModalCollection[closedModalKey]) {
147
+ const modifiedModalCollection = { ...tempModalCollection };
148
+ delete modifiedModalCollection[closedModalKey];
149
+ modalCollection.current = modifiedModalCollection;
150
+ setShowModal(false);
115
151
  }
116
- return bRet;
117
152
  }
118
- const updateAlertState = modalFlag => {
153
+ const dismissCancelAlert = dismissAllModals => {
119
154
  setShowCancelAlert(false);
120
- setShowModal(modalFlag);
155
+ if (dismissAllModals) {
156
+ setShowModal(false);
157
+ }
121
158
  };
159
+ function getModalHeading(dataObjectAction) {
160
+ return dataObjectAction === PCore.getConstants().RESOURCE_STATUS.CREATE
161
+ ? localizedVal('Add Record', localeCategory)
162
+ : localizedVal('Edit Record', localeCategory);
163
+ }
164
+ function determineModalHeaderByAction(actionName, caseTypeName, ID, caseLocaleRef) {
165
+ if (actionName) {
166
+ return localizedVal(actionName, localeCategory);
167
+ }
168
+ return `${localizedVal('Create', localeCategory)} ${localizedVal(caseTypeName, undefined, caseLocaleRef)} (${ID})`;
169
+ }
122
170
  useEffect(() => {
123
171
  // Establish the necessary containers
124
172
  const containerMgr = pConn.getContainerManager();
125
173
  containerMgr.initializeContainers({ type: MULTIPLE });
126
174
  }, [MULTIPLE, pConn]);
127
175
  useEffect(() => {
128
- // Update routingInfoRef.current whenever routingInfo changes
176
+ // Persisting routing information between the renders in showAlert
129
177
  routingInfoRef.current = routingInfo;
130
- }, [routingInfo]);
178
+ });
131
179
  useEffect(() => {
132
- if (routingInfoRef.current && !loadingInfo) {
133
- const currentOrder = routingInfo.accessedOrder;
134
- if (undefined === currentOrder) {
135
- return;
136
- }
137
- const currentItems = routingInfo.items;
138
- const { key, latestItem } = getKeyAndLatestItem(routingInfoRef.current, pConn);
139
- // console.log(`ModalViewContainer: key: ${key} latestItem: ${JSON.stringify(latestItem)}`);
140
- if (currentOrder.length > 0) {
141
- if (currentItems[key] &&
142
- currentItems[key].view &&
143
- !isEmptyObject(currentItems[key].view)) {
144
- const currentItem = currentItems[key];
145
- const rootView = currentItem.view;
146
- const { context } = rootView.config;
147
- const config = { meta: rootView };
148
- config['options'] = {
149
- context: currentItem.context,
150
- hasForm: true,
151
- pageReference: context || pConn.getPageReference()
152
- };
153
- if (!bSubscribed) {
154
- setSubscribed(true);
155
- subscribe(EVENT_SHOW_CANCEL_ALERT, showAlert, EVENT_SHOW_CANCEL_ALERT /* Unique string for subscription */);
156
- }
157
- const configObject = PCore.createPConnect(config);
158
- // THIS is where the ViewContainer creates a View
159
- // The config has meta.config.type = "view"
160
- const newComp = configObject.getPConnect();
161
- // const newCompName = newComp.getComponentName();
162
- const caseInfo = newComp && newComp.getDataObject() && newComp.getDataObject().caseInfo
163
- ? newComp.getDataObject().caseInfo
164
- : null;
165
- // console.log(`ModalViewContainer just created newComp: ${newCompName}`);
166
- // The metadata for pyDetails changed such that the "template": "CaseView"
167
- // is no longer a child of the created View but is in the created View's
168
- // config. So, we DON'T want to replace this.pConn$ since the created
169
- // component is a View (and not a ViewContainer). We now look for the
170
- // "template" type directly in the created component (newComp) and NOT
171
- // as a child of the newly created component.
172
- // console.log(`---> ModalViewContainer created new ${newCompName}`);
173
- // Use the newly created component (View) info but DO NOT replace
174
- // this ModalViewContainer's pConn$, etc.
175
- // Note that we're now using the newly created View's PConnect in the
176
- // ViewContainer HTML template to guide what's rendered similar to what
177
- // the React return of React.Fragment does
178
- // right now need to check caseInfo for changes, to trigger redraw, not getting
179
- // changes from angularPconnect except for first draw
180
- if (newComp && caseInfo && compareCaseInfoIsDifferent(caseInfo)) {
181
- setCreatedView(configObject);
182
- const { actionName } = latestItem;
183
- const theNewCaseInfo = newComp.getCaseInfo();
184
- const caseName = theNewCaseInfo.getName();
185
- const ID = theNewCaseInfo.getID();
186
- setTitle(actionName || `${localizedVal('New', localeCategory)} ${caseName} (${ID})`);
187
- let arChildrenAsReact = [];
188
- if (newComp.getComponentName() === 'reference') {
189
- // Reference component doesn't have children. It can build the View we want.
190
- // The Reference component getPConnect is in configObject
191
- arChildrenAsReact.push(createElement(createPConnectComponent(), {
192
- ...configObject,
193
- key: `${caseName}-${ID}`
194
- }));
195
- }
196
- else {
197
- // This is the 8.6 implementation. Leaving it in for reference for now.
198
- // And create a similar array of the children as React components
199
- // passed to Assignment component when rendered
200
- arChildrenAsReact = newComp.getChildren().map(child => {
201
- // Use Case Summary ID as the React element's key
202
- const caseSummaryID = child.getPConnect().getCaseSummary().ID;
203
- return createElement(createPConnectComponent(), { ...child, key: caseSummaryID });
204
- });
205
- }
206
- if (arChildrenAsReact.length > 0)
207
- setArNewChildrenAsReact(arChildrenAsReact);
208
- setShowModal(true);
209
- // save off itemKey to be used for finishAssignment, etc.
210
- setItemKey(key);
211
- }
180
+ subscribe(EVENT_SHOW_CANCEL_ALERT, showAlert, EVENT_SHOW_CANCEL_ALERT /* Unique string for subscription */);
181
+ subscribe(ERROR_WHILE_RENDERING, error => {
182
+ // setError(true);
183
+ // eslint-disable-next-line no-console
184
+ console.error(error);
185
+ }, `${ERROR_WHILE_RENDERING}-mc-${getPConnect().getContextName()}`, false, getPConnect().getContextName());
186
+ // Unsubscribe on component unmount
187
+ return () => {
188
+ unsubscribe(EVENT_SHOW_CANCEL_ALERT, EVENT_SHOW_CANCEL_ALERT /* Should be same unique string passed during subscription */);
189
+ };
190
+ });
191
+ useEffect(() => {
192
+ if (routingInfo) {
193
+ const { accessedOrder, type } = routingInfo;
194
+ const { key, latestItem } = getKeyAndLatestItem(routingInfo, pConn, { acTertiary });
195
+ if (latestItem &&
196
+ type === MULTIPLE &&
197
+ (isOpenModalAction(modalCollection.current, accessedOrder) || isUpdateModalAction(modalCollection.current, accessedOrder))) {
198
+ const { actionName } = latestItem;
199
+ // const { isDockable = false } = latestItem?.modalOptions || {};
200
+ const configObject = getConfigObject(latestItem, null, false);
201
+ const pConnect = configObject.getPConnect();
202
+ const caseInfo = pConnect.getCaseInfo();
203
+ const caseName = caseInfo.getName();
204
+ const caseTypeName = caseInfo.getCaseTypeName();
205
+ const ID = caseInfo.getBusinessID() || caseInfo.getID();
206
+ const isDataObject = routingInfo.items[latestItem.context].resourceType === PCore.getConstants().RESOURCE_TYPES.DATA;
207
+ const dataObjectAction = routingInfo.items[latestItem.context].resourceStatus;
208
+ const isMultiRecord = routingInfo.items[latestItem.context].isMultiRecordData;
209
+ const headingValue = isDataObject || isMultiRecord
210
+ ? getModalHeading(dataObjectAction)
211
+ : determineModalHeaderByAction(actionName, caseTypeName, ID, `${caseInfo?.getClassName()}!CASE!${caseInfo.getName()}`.toUpperCase());
212
+ let arChildrenAsReact = [];
213
+ if (pConnect.getComponentName() === 'reference') {
214
+ // Reference component doesn't have children. It can build the View we want.
215
+ // The Reference component getPConnect is in configObject
216
+ arChildrenAsReact.push(createElement(createPConnectComponent(), {
217
+ ...configObject,
218
+ key: `${caseName}-${ID}`
219
+ }));
212
220
  }
213
- }
214
- else {
215
- if (bShowModal) {
216
- setShowModal(false);
221
+ else {
222
+ // This is the 8.6 implementation. Leaving it in for reference for now.
223
+ // And create a similar array of the children as React components
224
+ // passed to Assignment component when rendered
225
+ arChildrenAsReact = pConnect.getChildren().map((child) => {
226
+ // Use Case Summary ID as the React element's key
227
+ const caseSummaryID = child.getPConnect().getCaseSummary().ID;
228
+ return createElement(createPConnectComponent(), {
229
+ ...child,
230
+ key: caseSummaryID
231
+ });
232
+ });
217
233
  }
218
- if (!isEmptyObject(oCaseInfo)) {
219
- setOCaseInfo({});
234
+ if (arChildrenAsReact.length > 0)
235
+ setArNewChildrenAsReact(arChildrenAsReact);
236
+ setMultiRecordData(isMultiRecord);
237
+ setTitle(headingValue);
238
+ setCreatedView({ configObject, latestItem });
239
+ setItemKey(key);
240
+ setShowModal(true);
241
+ // Update modal use case which happens when assignment in submitted in modal.
242
+ if (isUpdateModalAction(modalCollection.current, accessedOrder)) {
243
+ // handleModalUpdate(key);
220
244
  }
245
+ else if (isOpenModalAction(modalCollection.current, accessedOrder)) {
246
+ // New modal open scenario
247
+ handleModalOpen(key);
248
+ }
249
+ }
250
+ else if (isCloseModalAction(modalCollection.current, accessedOrder)) {
251
+ handleModalClose(accessedOrder);
221
252
  }
222
253
  }
223
- });
224
- // function placeholderModalClose() {
225
- // // Intentionally a no-op. Similar behavior in other SDKs.
226
- // // Does NOT close the window. This forces the user to use
227
- // // the cancel or submit button to close the modal (which, in turn, gets the right
228
- // // Constellation code to run to clean up the containers, data, etc.)
229
- // // console.log(`ModalViewContainer: placeholderModalClose setting bShowModal to false`) setShowModal(false);
230
- // }
231
- // if (bShowModal) {
232
- // console.log(`ModalViewContainer about to show modal with`);
233
- // console.log(`--> createdView: ${createdView} createdView.getPConnect: ${typeof createdView.getPConnect}`);
234
- // console.log(`--> itemKey: ${itemKey}`);
235
- // console.log(`--> arNewChildrenAsReact: ${JSON.stringify(arNewChildrenAsReact)}`);
236
- // }
237
- return (React.createElement(React.Fragment, null,
238
- React.createElement(Dialog, { open: bShowModal, "aria-labelledby": 'form-dialog-title' },
239
- React.createElement(DialogTitle, { id: 'form-dialog-title', className: classes.dlgTitle }, title),
240
- React.createElement(DialogContent, { className: classes.dlgContent }, bShowModal ? (React.createElement(Assignment, { getPConnect: createdView.getPConnect, itemKey: itemKey, isInModal: true, banners: getBanners({
241
- target: itemKey,
242
- pageMessages
243
- }) }, arNewChildrenAsReact)) : (React.createElement(React.Fragment, null)))),
244
- bShowCancelAlert && (React.createElement(CancelAlert, { pConn: cancelPConn, showAlert: bShowCancelAlert, updateAlertState: updateAlertState }))));
245
- };
246
- export default ModalViewContainer;
247
- ModalViewContainer.defaultProps = {
248
- getPConnect: null,
249
- loadingInfo: false,
250
- routingInfo: null
251
- };
252
- ModalViewContainer.propTypes = {
253
- getPConnect: PropTypes.func,
254
- loadingInfo: PropTypes.bool,
255
- routingInfo: PropTypes.objectOf(PropTypes.any)
256
- };
254
+ }, [routingInfo]);
255
+ function closeActionsDialog() {
256
+ // actionsDialog.current = true;
257
+ setShowModal(false);
258
+ }
259
+ return (_jsxs(_Fragment, { children: [_jsxs(Dialog, { open: bShowModal, "aria-labelledby": 'form-dialog-title', children: [_jsx(DialogTitle, { id: 'form-dialog-title', className: `${classes.dlgTitle} psdk-dialog-title`, children: title }), _jsx(DialogContent, { className: `${classes.dlgContent} psdk-dialog-content`, children: bShowModal ? (_jsx(MuiPickersUtilsProvider, { utils: DayjsUtils, children: _jsx(Assignment, { getPConnect: createdView.configObject.getPConnect, itemKey: itemKey, isInModal: true, banners: getBanners({
260
+ target: itemKey,
261
+ pageMessages
262
+ }), children: arNewChildrenAsReact }) })) : null }), isMultiRecordData && (_jsx(ListViewActionButtons, { getPConnect: createdView.configObject.getPConnect, context: createdView.latestItem.context, closeActionsDialog: closeActionsDialog }))] }), bShowCancelAlert && _jsx(CancelAlert, { ...cancelAlertProps, dismiss: dismissCancelAlert })] }));
263
+ }
257
264
  //# sourceMappingURL=ModalViewContainer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ModalViewContainer.js","sourceRoot":"","sources":["../../../../../src/components/infra/Containers/ModalViewContainer/ModalViewContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,OAAO,MAAM,iBAAiB,CAAC;AACtC,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAC9C,OAAO,aAAa,MAAM,iCAAiC,CAAC;AAC5D,OAAO,WAAW,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,uBAAuB,MAAM,mCAAmC,CAAC;AACxE,uFAAuF;AACvF,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,C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V,CACd,CAAC,CAAC,CAAC,CACF,yCAAK,CACN,CACa,CACT;QACR,gBAAgB,IAAI,CACnB,oBAAC,WAAW,IACV,KAAK,EAAE,WAAW,EAClB,SAAS,EAAE,gBAAgB,EAC3B,gBAAgB,EAAE,gBAAgB,GAClC,CACH,CACA,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC;AAElC,kBAAkB,CAAC,YAAY,GAAG;IAChC,WAAW,EAAE,IAAI;IACjB,WAAW,EAAE,KAAK;IAClB,WAAW,EAAE,IAAI;CAClB,CAAC;AAEF,kBAAkB,CAAC,SAAS,GAAG;IAC7B,WAAW,EAAE,SAAS,CAAC,IAAI;IAC3B,WAAW,EAAE,SAAS,CAAC,IAAI;IAC3B,WAAW,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC;CAC/C,CAAC","sourcesContent":["import React, { useEffect, useRef, useState, createElement } from 'react';\nimport PropTypes from 'prop-types';\nimport isEqual from 'fast-deep-equal';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport { makeStyles } from '@material-ui/core/styles';\nimport createPConnectComponent from '../../../../bridge/react_pconnect';\n// Need to get correct implementation from component map for Assignment and CancelAlert\nimport { getComponentFromMap } from '../../../../bridge/helpers/sdk_component_map';\nimport { getBanners } from '../../../helpers/case-utils';\nimport { isEmptyObject } from '../../../helpers/common-utils';\n\n// Remove this and use \"real\" PCore type once .d.ts is fixed (currently shows 8 errors)\ndeclare const PCore: any;\n\n\nfunction buildName(pConnect, name = '') {\n const context = pConnect.getContextName();\n return `${context}/${name}`;\n}\n\nfunction getKeyAndLatestItem(routinginfo, pConn) {\n const containerName = pConn.getContainerName();\n if (PCore.getContainerUtils().hasContainerItems(buildName(pConn, containerName))) {\n const { accessedOrder, items } = routinginfo;\n const key = accessedOrder[accessedOrder.length - 1];\n const latestItem = items[key];\n return { key, latestItem };\n }\n return {};\n}\n\nfunction getConfigObject(item, pConnect) {\n if (item) {\n const { context, view } = item;\n const config = {\n meta: view,\n options: {\n context,\n pageReference: view.config.context || pConnect.getPageReference(),\n hasForm: true\n }\n };\n return PCore.createPConnect(config);\n }\n return null;\n}\n\nconst useStyles = makeStyles(theme => ({\n dlgTitle: {\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2),\n marginTop: theme.spacing(2),\n marginBottom: theme.spacing(0)\n // paddingLeft: theme.spacing(0),\n // paddingRight: theme.spacing(0),\n // paddingTop: theme.spacing(0),\n // paddingBottom: theme.spacing(0),\n },\n dlgContent: {\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2),\n marginTop: theme.spacing(0),\n marginBottom: theme.spacing(2)\n // paddingLeft: theme.spacing(0),\n // paddingRight: theme.spacing(0),\n // paddingTop: theme.spacing(0),\n // paddingBottom: theme.spacing(0),\n }\n}));\n\nconst ModalViewContainer = props => {\n // Get the proper implementation (local or Pega-provided) for these components that are emitted below\n const Assignment = getComponentFromMap(\"Assignment\");\n const CancelAlert = getComponentFromMap(\"CancelAlert\");\n\n const classes = useStyles();\n\n const routingInfoRef = useRef({});\n const { getPConnect, routingInfo, loadingInfo, pageMessages } = props;\n const pConn = getPConnect();\n const {\n CONTAINER_TYPE: { MULTIPLE },\n PUB_SUB_EVENTS: { EVENT_SHOW_CANCEL_ALERT }\n } = PCore.getConstants();\n const { subscribe } = PCore.getPubSubUtils();\n const [bShowModal, setShowModal] = useState(false);\n const [bSubscribed, setSubscribed] = useState(false);\n const [bShowCancelAlert, setShowCancelAlert] = useState(false);\n const [oCaseInfo, setOCaseInfo] = useState({});\n const [createdView, setCreatedView] = useState<any>(null);\n const [title, setTitle] = useState('');\n const [arNewChildrenAsReact, setArNewChildrenAsReact] = useState<Array<any>>([]);\n const [itemKey, setItemKey] = useState('');\n const [cancelPConn, setCancelPConn] = useState(null);\n\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'Data Object';\n\n\n function showAlert(payload) {\n const { latestItem } = getKeyAndLatestItem(routingInfoRef.current, pConn);\n const { isModalAction } = payload;\n\n /*\n If we are in create stage full page mode, created a new case and trying to click on cancel button\n it will show two alert dialogs which is not expected. Hence isModalAction flag to avoid that.\n */\n if (latestItem && isModalAction) {\n const configObject = getConfigObject(latestItem, pConn);\n setCancelPConn(configObject.getPConnect());\n setShowCancelAlert(true);\n }\n }\n\n function compareCaseInfoIsDifferent(oCurrentCaseInfo: Object): boolean {\n let bRet = false;\n\n // fast-deep-equal version\n if (isEqual !== undefined) {\n bRet = !isEqual(oCaseInfo, oCurrentCaseInfo);\n } else {\n const sCurrentCaseInfo = JSON.stringify(oCurrentCaseInfo);\n const sOldCaseInfo = JSON.stringify(oCaseInfo);\n // stringify compare version\n if (sCurrentCaseInfo !== sOldCaseInfo) {\n bRet = true;\n }\n }\n\n // if different, save off new case info\n if (bRet) {\n setOCaseInfo(JSON.parse(JSON.stringify(oCurrentCaseInfo)));\n }\n\n return bRet;\n }\n\n const updateAlertState = modalFlag => {\n setShowCancelAlert(false);\n setShowModal(modalFlag);\n };\n\n useEffect(() => {\n // Establish the necessary containers\n const containerMgr = pConn.getContainerManager();\n containerMgr.initializeContainers({ type: MULTIPLE });\n }, [MULTIPLE, pConn]);\n\n useEffect(() => {\n // Update routingInfoRef.current whenever routingInfo changes\n routingInfoRef.current = routingInfo;\n }, [routingInfo]);\n\n useEffect(() => {\n if (routingInfoRef.current && !loadingInfo) {\n const currentOrder = routingInfo.accessedOrder;\n\n if (undefined === currentOrder) {\n return;\n }\n\n const currentItems = routingInfo.items;\n\n const { key, latestItem } = getKeyAndLatestItem(routingInfoRef.current, pConn);\n\n // console.log(`ModalViewContainer: key: ${key} latestItem: ${JSON.stringify(latestItem)}`);\n\n if (currentOrder.length > 0) {\n if (\n currentItems[key] &&\n currentItems[key].view &&\n !isEmptyObject(currentItems[key].view)\n ) {\n const currentItem = currentItems[key];\n const rootView = currentItem.view;\n const { context } = rootView.config;\n const config = { meta: rootView };\n config['options'] = {\n context: currentItem.context,\n hasForm: true,\n pageReference: context || pConn.getPageReference()\n };\n\n if (!bSubscribed) {\n setSubscribed(true);\n subscribe(\n EVENT_SHOW_CANCEL_ALERT,\n showAlert,\n EVENT_SHOW_CANCEL_ALERT /* Unique string for subscription */\n );\n }\n\n const configObject = PCore.createPConnect(config);\n\n // THIS is where the ViewContainer creates a View\n // The config has meta.config.type = \"view\"\n const newComp = configObject.getPConnect();\n // const newCompName = newComp.getComponentName();\n const caseInfo =\n newComp && newComp.getDataObject() && newComp.getDataObject().caseInfo\n ? newComp.getDataObject().caseInfo\n : null;\n\n // console.log(`ModalViewContainer just created newComp: ${newCompName}`);\n\n // The metadata for pyDetails changed such that the \"template\": \"CaseView\"\n // is no longer a child of the created View but is in the created View's\n // config. So, we DON'T want to replace this.pConn$ since the created\n // component is a View (and not a ViewContainer). We now look for the\n // \"template\" type directly in the created component (newComp) and NOT\n // as a child of the newly created component.\n // console.log(`---> ModalViewContainer created new ${newCompName}`);\n\n // Use the newly created component (View) info but DO NOT replace\n // this ModalViewContainer's pConn$, etc.\n // Note that we're now using the newly created View's PConnect in the\n // ViewContainer HTML template to guide what's rendered similar to what\n // the React return of React.Fragment does\n\n // right now need to check caseInfo for changes, to trigger redraw, not getting\n // changes from angularPconnect except for first draw\n if (newComp && caseInfo && compareCaseInfoIsDifferent(caseInfo)) {\n setCreatedView(configObject);\n\n const { actionName } = latestItem;\n const theNewCaseInfo = newComp.getCaseInfo();\n const caseName = theNewCaseInfo.getName();\n const ID = theNewCaseInfo.getID();\n\n setTitle(actionName || `${localizedVal('New', localeCategory)} ${caseName} (${ID})`);\n\n let arChildrenAsReact: Array<any> = [];\n\n if (newComp.getComponentName() === 'reference') {\n // Reference component doesn't have children. It can build the View we want.\n // The Reference component getPConnect is in configObject\n\n arChildrenAsReact.push(\n createElement(createPConnectComponent(), {\n ...configObject,\n key: `${caseName}-${ID}`\n })\n );\n } else {\n // This is the 8.6 implementation. Leaving it in for reference for now.\n // And create a similar array of the children as React components\n // passed to Assignment component when rendered\n arChildrenAsReact = newComp.getChildren().map(child => {\n // Use Case Summary ID as the React element's key\n const caseSummaryID = child.getPConnect().getCaseSummary().ID;\n return createElement(createPConnectComponent(), { ...child, key: caseSummaryID });\n });\n }\n\n if (arChildrenAsReact.length > 0) setArNewChildrenAsReact(arChildrenAsReact);\n\n setShowModal(true);\n\n // save off itemKey to be used for finishAssignment, etc.\n setItemKey(key);\n }\n }\n } else {\n if (bShowModal) {\n setShowModal(false);\n }\n if (!isEmptyObject(oCaseInfo)) {\n setOCaseInfo({});\n }\n }\n }\n });\n\n // function placeholderModalClose() {\n // // Intentionally a no-op. Similar behavior in other SDKs.\n // // Does NOT close the window. This forces the user to use\n // // the cancel or submit button to close the modal (which, in turn, gets the right\n // // Constellation code to run to clean up the containers, data, etc.)\n\n // // console.log(`ModalViewContainer: placeholderModalClose setting bShowModal to false`) setShowModal(false);\n // }\n\n // if (bShowModal) {\n // console.log(`ModalViewContainer about to show modal with`);\n // console.log(`--> createdView: ${createdView} createdView.getPConnect: ${typeof createdView.getPConnect}`);\n // console.log(`--> itemKey: ${itemKey}`);\n // console.log(`--> arNewChildrenAsReact: ${JSON.stringify(arNewChildrenAsReact)}`);\n // }\n\n return (\n <>\n <Dialog open={bShowModal} aria-labelledby='form-dialog-title'>\n <DialogTitle id='form-dialog-title' className={classes.dlgTitle}>\n {title}\n </DialogTitle>\n <DialogContent className={classes.dlgContent}>\n {bShowModal ? (\n <Assignment\n getPConnect={createdView.getPConnect}\n itemKey={itemKey}\n isInModal\n banners={getBanners({\n target: itemKey,\n pageMessages\n })}\n >\n {arNewChildrenAsReact}\n </Assignment>\n ) : (\n <></>\n )}\n </DialogContent>\n </Dialog>\n {bShowCancelAlert && (\n <CancelAlert\n pConn={cancelPConn}\n showAlert={bShowCancelAlert}\n updateAlertState={updateAlertState}\n />\n )}\n </>\n );\n};\n\nexport default ModalViewContainer;\n\nModalViewContainer.defaultProps = {\n getPConnect: null,\n loadingInfo: false,\n routingInfo: null\n};\n\nModalViewContainer.propTypes = {\n getPConnect: PropTypes.func,\n loadingInfo: PropTypes.bool,\n routingInfo: PropTypes.objectOf(PropTypes.any)\n};\n"]}
1
+ {"version":3,"file":"ModalViewContainer.js","sourceRoot":"","sources":["../../../../../src/components/infra/Containers/ModalViewContainer/ModalViewContainer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnE,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAC9C,OAAO,aAAa,MAAM,iCAAiC,CAAC;AAC5D,OAAO,WAAW,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,UAAU,MAAM,gBAAgB,CAAC;AACxC,OAAO,UAAU,MAAM,mBAAmB,CAAC;AAE3C,OAAO,uBAAuB,MAAM,mCAAmC,CAAC;AACxE,uFAAuF;AACvF,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAUzD,SAAS,iBAAiB,CAAC,mBAAmB,EAAE,gBAAgB;IAC9D,OAAO,mBAAmB,IAAI,gBAAgB,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,MAAM,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC;AAC7H,CAAC;AAED,SAAS,mBAAmB,CAAC,mBAAmB,EAAE,gBAAgB;IAChE,OAAO,mBAAmB,IAAI,gBAAgB,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,MAAM,KAAK,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CA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C,YAAY,CAAC,WAAW,EACjD,OAAO,EAAE,WAAW,CAAC,UAAU,CAAC,OAAO,EACvC,kBAAkB,EAAE,kBAAkB,GACtC,CACH,IACM,EACR,gBAAgB,IAAI,KAAC,WAAW,OAAK,gBAAgB,EAAE,OAAO,EAAE,kBAAkB,GAAI,IACtF,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import { createElement, useEffect, useRef, useState } from 'react';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { MuiPickersUtilsProvider } from '@material-ui/pickers';\nimport DayjsUtils from '@date-io/dayjs';\nimport difference from 'lodash.difference';\n\nimport createPConnectComponent from '../../../../bridge/react_pconnect';\n// Need to get correct implementation from component map for Assignment and CancelAlert\nimport { getComponentFromMap } from '../../../../bridge/helpers/sdk_component_map';\nimport { getBanners } from '../../../helpers/case-utils';\nimport { PConnProps } from '../../../../types/PConnProps';\n\ninterface ModalViewContainerProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n loadingInfo?: string;\n routingInfo?: any;\n pageMessages?: string[];\n}\n\nfunction isOpenModalAction(prevModalCollection, currentModalList) {\n return prevModalCollection && currentModalList ? Object.keys(prevModalCollection).length < currentModalList.length : false;\n}\n\nfunction isUpdateModalAction(prevModalCollection, currentModalList) {\n return prevModalCollection && currentModalList ? Object.keys(prevModalCollection).length === currentModalList.length : false;\n}\n\nfunction isCloseModalAction(prevModalCollection, currentModalList) {\n return prevModalCollection && currentModalList ? Object.keys(prevModalCollection).length > currentModalList.length : false;\n}\n\nfunction buildName(pConnect, name = '') {\n const context = pConnect.getContextName();\n return `${context}/${name}`;\n}\n\nfunction getKeyAndLatestItem(routinginfo, pConn, options) {\n const containerName = pConn.getContainerName();\n const { acTertiary = false } = options || {};\n if (PCore.getContainerUtils().hasContainerItems(buildName(pConn, containerName))) {\n const { accessedOrder, items } = routinginfo;\n let key;\n // eslint-disable-next-line no-plusplus\n for (let i = accessedOrder.length - 1; i >= 0; i--) {\n const tempkey = accessedOrder[i];\n if ((acTertiary && items[tempkey].acTertiary) || (!acTertiary && !items[tempkey].acTertiary)) {\n key = tempkey;\n break;\n }\n }\n const latestItem = items[key];\n return { key, latestItem };\n }\n return {};\n}\n\nfunction getConfigObject(item, pConnect, isReverseCoexistence = false) {\n let config;\n if (isReverseCoexistence) {\n config = {\n options: {\n pageReference: pConnect?.getPageReference(),\n hasForm: true,\n containerName: pConnect?.getContainerName() || PCore.getConstants().MODAL\n }\n };\n return PCore.createPConnect(config);\n }\n if (item) {\n const { context, view, isBulkAction } = item;\n const target = PCore.getContainerUtils().getTargetFromContainerItemID(context);\n config = {\n meta: view,\n options: {\n context,\n pageReference: view.config.context || pConnect.getPageReference(),\n hasForm: true,\n ...(isBulkAction && { isBulkAction }),\n containerName: pConnect?.getContainerName() || PCore.getConstants().MODAL,\n target\n }\n };\n return PCore.createPConnect(config);\n }\n return null;\n}\n\nconst useStyles = makeStyles(theme => ({\n dlgTitle: {\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2),\n marginTop: theme.spacing(2),\n marginBottom: theme.spacing(0)\n },\n dlgContent: {\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2),\n marginTop: theme.spacing(0),\n marginBottom: theme.spacing(2)\n }\n}));\n\nexport default function ModalViewContainer(props: ModalViewContainerProps) {\n // Get the proper implementation (local or Pega-provided) for these components that are emitted below\n const Assignment = getComponentFromMap('Assignment');\n const CancelAlert = getComponentFromMap('CancelAlert');\n const ListViewActionButtons = getComponentFromMap('ListViewActionButtons');\n\n const classes = useStyles();\n\n const modalCollection = useRef({});\n const routingInfoRef = useRef({});\n const { getPConnect, routingInfo = null, pageMessages = [] } = props;\n const pConn = getPConnect();\n const { acTertiary } = pConn.getConfigProps() as any;\n const {\n CONTAINER_TYPE: { MULTIPLE },\n PUB_SUB_EVENTS: { EVENT_SHOW_CANCEL_ALERT }\n } = PCore.getConstants();\n const { subscribe, unsubscribe } = PCore.getPubSubUtils();\n const [bShowModal, setShowModal] = useState(false);\n const [bShowCancelAlert, setShowCancelAlert] = useState(false);\n const [createdView, setCreatedView] = useState<any>(null);\n const [title, setTitle] = useState('');\n const [arNewChildrenAsReact, setArNewChildrenAsReact] = useState<any[]>([]);\n const [itemKey, setItemKey] = useState('');\n const [cancelAlertProps, setCancelAlertProps] = useState({});\n const [isMultiRecordData, setMultiRecordData] = useState(false);\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'Data Object';\n\n const ERROR_WHILE_RENDERING = 'ERROR_WHILE_RENDERING';\n\n function showAlert(payload) {\n const { latestItem } = getKeyAndLatestItem(routingInfoRef.current, pConn, { acTertiary });\n const isReverseCoexistence = (PCore.getCoexistenceManager().getBroadcastUtils() as any).isReverseCoexistenceCaseLoaded();\n const { isModalAction, hideDelete, isDataObject, skipReleaseLockRequest } = payload;\n\n /*\n If we are in create stage full page mode, created a new case and trying to click on cancel button\n it will show two alert dialogs which is not expected. Hence isModalAction flag to avoid that.\n */\n if (latestItem && isModalAction) {\n const configObject = getConfigObject(latestItem, pConn, isReverseCoexistence);\n const contextName = configObject?.getPConnect().getContextName();\n setCancelAlertProps({\n heading: 'Discard unsaved changes?',\n content: 'You have unsaved changes. You can discard them or go back to keep working.',\n getPConnect: configObject?.getPConnect,\n itemKey: contextName,\n hideDelete,\n isDataObject,\n skipReleaseLockRequest\n });\n setShowCancelAlert(true);\n }\n }\n\n function handleModalOpen(key) {\n modalCollection.current = {\n ...modalCollection.current,\n [key]: {}\n };\n }\n\n function handleModalClose(accessedOrder) {\n const tempModalCollection = modalCollection.current;\n const [closedModalKey] = difference(Object.keys(tempModalCollection), accessedOrder);\n\n if (closedModalKey && tempModalCollection[closedModalKey]) {\n const modifiedModalCollection = { ...tempModalCollection };\n delete modifiedModalCollection[closedModalKey];\n modalCollection.current = modifiedModalCollection;\n setShowModal(false);\n }\n }\n\n const dismissCancelAlert = dismissAllModals => {\n setShowCancelAlert(false);\n\n if (dismissAllModals) {\n setShowModal(false);\n }\n };\n\n function getModalHeading(dataObjectAction) {\n return dataObjectAction === PCore.getConstants().RESOURCE_STATUS.CREATE\n ? localizedVal('Add Record', localeCategory)\n : localizedVal('Edit Record', localeCategory);\n }\n\n function determineModalHeaderByAction(actionName, caseTypeName, ID, caseLocaleRef) {\n if (actionName) {\n return localizedVal(actionName, localeCategory);\n }\n return `${localizedVal('Create', localeCategory)} ${localizedVal(caseTypeName, undefined, caseLocaleRef)} (${ID})`;\n }\n\n useEffect(() => {\n // Establish the necessary containers\n const containerMgr = pConn.getContainerManager();\n containerMgr.initializeContainers({ type: MULTIPLE });\n }, [MULTIPLE, pConn]);\n\n useEffect(() => {\n // Persisting routing information between the renders in showAlert\n routingInfoRef.current = routingInfo;\n });\n\n useEffect(() => {\n subscribe(EVENT_SHOW_CANCEL_ALERT, showAlert, EVENT_SHOW_CANCEL_ALERT /* Unique string for subscription */);\n subscribe(\n ERROR_WHILE_RENDERING,\n error => {\n // setError(true);\n // eslint-disable-next-line no-console\n console.error(error);\n },\n `${ERROR_WHILE_RENDERING}-mc-${getPConnect().getContextName()}`,\n false,\n getPConnect().getContextName()\n );\n\n // Unsubscribe on component unmount\n return () => {\n unsubscribe(EVENT_SHOW_CANCEL_ALERT, EVENT_SHOW_CANCEL_ALERT /* Should be same unique string passed during subscription */);\n };\n });\n\n useEffect(() => {\n if (routingInfo) {\n const { accessedOrder, type } = routingInfo;\n const { key, latestItem } = getKeyAndLatestItem(routingInfo, pConn, { acTertiary });\n\n if (\n latestItem &&\n type === MULTIPLE &&\n (isOpenModalAction(modalCollection.current, accessedOrder) || isUpdateModalAction(modalCollection.current, accessedOrder))\n ) {\n const { actionName } = latestItem;\n // const { isDockable = false } = latestItem?.modalOptions || {};\n const configObject: any = getConfigObject(latestItem, null, false);\n const pConnect = configObject.getPConnect();\n const caseInfo: any = pConnect.getCaseInfo();\n const caseName = caseInfo.getName();\n const caseTypeName = caseInfo.getCaseTypeName();\n const ID = caseInfo.getBusinessID() || caseInfo.getID();\n const isDataObject = routingInfo.items[latestItem.context].resourceType === PCore.getConstants().RESOURCE_TYPES.DATA;\n const dataObjectAction = routingInfo.items[latestItem.context].resourceStatus;\n const isMultiRecord = routingInfo.items[latestItem.context].isMultiRecordData;\n const headingValue =\n isDataObject || isMultiRecord\n ? getModalHeading(dataObjectAction)\n : determineModalHeaderByAction(actionName, caseTypeName, ID, `${caseInfo?.getClassName()}!CASE!${caseInfo.getName()}`.toUpperCase());\n\n let arChildrenAsReact: any[] = [];\n\n if (pConnect.getComponentName() === 'reference') {\n // Reference component doesn't have children. It can build the View we want.\n // The Reference component getPConnect is in configObject\n\n arChildrenAsReact.push(\n createElement(createPConnectComponent(), {\n ...configObject,\n key: `${caseName}-${ID}`\n })\n );\n } else {\n // This is the 8.6 implementation. Leaving it in for reference for now.\n // And create a similar array of the children as React components\n // passed to Assignment component when rendered\n arChildrenAsReact = (pConnect.getChildren() as []).map((child: any) => {\n // Use Case Summary ID as the React element's key\n const caseSummaryID = child.getPConnect().getCaseSummary().ID;\n return createElement(createPConnectComponent(), {\n ...child,\n key: caseSummaryID\n });\n });\n }\n\n if (arChildrenAsReact.length > 0) setArNewChildrenAsReact(arChildrenAsReact);\n setMultiRecordData(isMultiRecord);\n setTitle(headingValue);\n setCreatedView({ configObject, latestItem });\n setItemKey(key);\n setShowModal(true);\n\n // Update modal use case which happens when assignment in submitted in modal.\n if (isUpdateModalAction(modalCollection.current, accessedOrder)) {\n // handleModalUpdate(key);\n } else if (isOpenModalAction(modalCollection.current, accessedOrder)) {\n // New modal open scenario\n handleModalOpen(key);\n }\n } else if (isCloseModalAction(modalCollection.current, accessedOrder)) {\n handleModalClose(accessedOrder);\n }\n }\n }, [routingInfo]);\n\n function closeActionsDialog() {\n // actionsDialog.current = true;\n setShowModal(false);\n }\n\n return (\n <>\n <Dialog open={bShowModal} aria-labelledby='form-dialog-title'>\n <DialogTitle id='form-dialog-title' className={`${classes.dlgTitle} psdk-dialog-title`}>\n {title}\n </DialogTitle>\n <DialogContent className={`${classes.dlgContent} psdk-dialog-content`}>\n {bShowModal ? (\n <MuiPickersUtilsProvider utils={DayjsUtils}>\n <Assignment\n getPConnect={createdView.configObject.getPConnect}\n itemKey={itemKey}\n isInModal\n banners={getBanners({\n target: itemKey,\n pageMessages\n })}\n >\n {arNewChildrenAsReact}\n </Assignment>\n </MuiPickersUtilsProvider>\n ) : null}\n </DialogContent>\n\n {isMultiRecordData && (\n <ListViewActionButtons\n getPConnect={createdView.configObject.getPConnect}\n context={createdView.latestItem.context}\n closeActionsDialog={closeActionsDialog}\n />\n )}\n </Dialog>\n {bShowCancelAlert && <CancelAlert {...cancelAlertProps} dismiss={dismissCancelAlert} />}\n </>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/infra/Containers/ModalViewContainer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["export { default } from './ModalViewContainer';"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/infra/Containers/ModalViewContainer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["export { default } from './ModalViewContainer';\n"]}
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ declare const SimpleViewContainer: (props: any) => import("react").CElement<{
3
+ getPConnect: () => import("@pega/pcore-pconnect-typedefs/interpreter/c11n-env").default;
4
+ }, import("react").Component<{
5
+ getPConnect: () => import("@pega/pcore-pconnect-typedefs/interpreter/c11n-env").default;
6
+ }, any, any>> | null;
7
+ export declare const withSimpleViewContainerRenderer: (Component: any, options?: any) => (props: any) => JSX.Element;
8
+ export default SimpleViewContainer;
9
+ //# sourceMappingURL=SimpleView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SimpleView.d.ts","sourceRoot":"","sources":["../../../../../src/components/infra/Containers/SimpleView/SimpleView.tsx"],"names":[],"mappings":";AAIA,QAAA,MAAM,mBAAmB;;;;oBAexB,CAAC;AAEF,eAAO,MAAM,+BAA+B,6BACrB,GAAG,gCAuBvB,CAAC;AAEJ,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useMemo } from 'react';
3
+ import { getActiveContainerItemID, getActiveContainerRootViewElement, getPConnectOfActiveContainerItem, useContainerInitializer } from './helper';
4
+ const SimpleViewContainer = props => {
5
+ const { CONTAINER_TYPE } = PCore.getConstants();
6
+ const { getPConnect, mode = CONTAINER_TYPE.SINGLE, routingInfo: containerInfo, isAssignmentView, options = {} } = props;
7
+ const rootViewElement = useMemo(() => {
8
+ return getActiveContainerRootViewElement(containerInfo, {
9
+ isAssignmentView,
10
+ parentGetPConnect: getPConnect
11
+ });
12
+ }, [containerInfo, isAssignmentView, getPConnect]);
13
+ useContainerInitializer(getPConnect, options.mode || mode);
14
+ return rootViewElement;
15
+ };
16
+ export const withSimpleViewContainerRenderer = (Component, options = {}) => props => {
17
+ const { CONTAINER_TYPE } = PCore.getConstants();
18
+ const { getPConnect, mode = CONTAINER_TYPE.SINGLE, routingInfo: containerInfo, isAssignmentView } = props;
19
+ const rootViewElement = _jsx(SimpleViewContainer, { ...props, options: options });
20
+ const activeContainerItemID = getActiveContainerItemID(containerInfo);
21
+ const getPConnectOfActiveItem = getPConnectOfActiveContainerItem(containerInfo, {
22
+ isAssignmentView,
23
+ parentGetPConnect: getPConnect
24
+ });
25
+ useContainerInitializer(getPConnect, options.mode || mode);
26
+ return (_jsx(Component, { ...props, rootViewElement: rootViewElement, activeContainerItemID: activeContainerItemID, getPConnectOfActiveContainerItem: getPConnectOfActiveItem }));
27
+ };
28
+ export default SimpleViewContainer;
29
+ //# sourceMappingURL=SimpleView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"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BAAwB,CAAC,aAAa,CAAC,CAAC;IACtE,MAAM,uBAAuB,GAAG,gCAAgC,CAAC,aAAa,EAAE;QAC9E,gBAAgB;QAChB,iBAAiB,EAAE,WAAW;KAC/B,CAAC,CAAC;IAEH,uBAAuB,CAAC,WAAW,EAAE,OAAO,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC;IAE3D,OAAO,CACL,KAAC,SAAS,OACJ,KAAK,EACT,eAAe,EAAE,eAAe,EAChC,qBAAqB,EAAE,qBAAqB,EAC5C,gCAAgC,EAAE,uBAAuB,GACzD,CACH,CAAC;AACJ,CAAC,CAAC;AAEJ,eAAe,mBAAmB,CAAC","sourcesContent":["import { useMemo } from 'react';\n\nimport { getActiveContainerItemID, getActiveContainerRootViewElement, getPConnectOfActiveContainerItem, useContainerInitializer } from './helper';\n\nconst SimpleViewContainer = props => {\n const { CONTAINER_TYPE } = PCore.getConstants();\n\n const { getPConnect, mode = CONTAINER_TYPE.SINGLE, routingInfo: containerInfo, isAssignmentView, options = {} } = props;\n\n const rootViewElement = useMemo(() => {\n return getActiveContainerRootViewElement(containerInfo, {\n isAssignmentView,\n parentGetPConnect: getPConnect\n });\n }, [containerInfo, isAssignmentView, getPConnect]);\n\n useContainerInitializer(getPConnect, options.mode || mode);\n\n return rootViewElement;\n};\n\nexport const withSimpleViewContainerRenderer =\n (Component, options: any = {}) =>\n props => {\n const { CONTAINER_TYPE } = PCore.getConstants();\n\n const { getPConnect, mode = CONTAINER_TYPE.SINGLE, routingInfo: containerInfo, isAssignmentView } = props;\n\n const rootViewElement = <SimpleViewContainer {...props} options={options} />;\n const activeContainerItemID = getActiveContainerItemID(containerInfo);\n const getPConnectOfActiveItem = getPConnectOfActiveContainerItem(containerInfo, {\n isAssignmentView,\n parentGetPConnect: getPConnect\n });\n\n useContainerInitializer(getPConnect, options.mode || mode);\n\n return (\n <Component\n {...props}\n rootViewElement={rootViewElement}\n activeContainerItemID={activeContainerItemID}\n getPConnectOfActiveContainerItem={getPConnectOfActiveItem}\n />\n );\n };\n\nexport default SimpleViewContainer;\n"]}
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ export declare const getPConnectOfActiveContainerItem: (containerInfo: any, options: any) => (() => import("@pega/pcore-pconnect-typedefs/interpreter/c11n-env").default) | null;
3
+ export declare const getActiveContainerRootViewElement: (containerInfo: any, options: any) => import("react").CElement<{
4
+ getPConnect: () => import("@pega/pcore-pconnect-typedefs/interpreter/c11n-env").default;
5
+ }, import("react").Component<{
6
+ getPConnect: () => import("@pega/pcore-pconnect-typedefs/interpreter/c11n-env").default;
7
+ }, any, any>> | null;
8
+ export declare const getActiveContainerItemID: (containerInfo: any) => any;
9
+ export declare const useContainerInitializer: (getPConnect: any, mode: any) => void;
10
+ //# sourceMappingURL=helper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../../../../src/components/infra/Containers/SimpleView/helper.ts"],"names":[],"mappings":";AAsDA,eAAO,MAAM,gCAAgC,2HAwC5C,CAAC;AAEF,eAAO,MAAM,iCAAiC;;;;oBAM7C,CAAC;AAEF,eAAO,MAAM,wBAAwB,6BAMpC,CAAC;AAEF,eAAO,MAAM,uBAAuB,uCAYnC,CAAC"}