@pega/react-sdk-components 24.2.11 → 25.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (630) hide show
  1. package/lib/bridge/Context/StoreContext.d.ts +0 -1
  2. package/lib/bridge/Context/StoreContext.d.ts.map +1 -1
  3. package/lib/bridge/Context/StoreContext.js.map +1 -1
  4. package/lib/bridge/helpers/sdk_component_map.d.ts.map +1 -1
  5. package/lib/bridge/helpers/sdk_component_map.js +0 -6
  6. package/lib/bridge/helpers/sdk_component_map.js.map +1 -1
  7. package/lib/bridge/react_pconnect.d.ts.map +1 -1
  8. package/lib/bridge/react_pconnect.js +11 -14
  9. package/lib/bridge/react_pconnect.js.map +1 -1
  10. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.map +1 -1
  11. package/lib/components/designSystemExtension/Banner/Banner.css +1 -1
  12. package/lib/components/designSystemExtension/Banner/Banner.d.ts.map +1 -1
  13. package/lib/components/designSystemExtension/Banner/Banner.js +2 -2
  14. package/lib/components/designSystemExtension/Banner/Banner.js.map +1 -1
  15. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
  16. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
  17. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +50 -35
  18. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
  19. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts.map +1 -1
  20. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +6 -8
  21. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
  22. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts +1 -1
  23. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
  24. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +3 -5
  25. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
  26. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js +2 -2
  27. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
  28. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts.map +1 -1
  29. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +4 -6
  30. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
  31. package/lib/components/designSystemExtension/Operator/Operator.d.ts +1 -1
  32. package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
  33. package/lib/components/designSystemExtension/Operator/Operator.js +12 -9
  34. package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
  35. package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +1 -1
  36. package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
  37. package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
  38. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -1
  39. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +32 -4
  40. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -1
  41. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.css +7 -14
  42. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts.map +1 -1
  43. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js +12 -2
  44. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
  45. package/lib/components/field/AutoComplete/AutoComplete.d.ts +1 -1
  46. package/lib/components/field/AutoComplete/AutoComplete.d.ts.map +1 -1
  47. package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
  48. package/lib/components/field/CancelAlert/CancelAlert.css +4 -4
  49. package/lib/components/field/CancelAlert/CancelAlert.d.ts +1 -1
  50. package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
  51. package/lib/components/field/CancelAlert/CancelAlert.js +3 -3
  52. package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
  53. package/lib/components/field/Checkbox/Checkbox.d.ts +9 -1
  54. package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
  55. package/lib/components/field/Checkbox/Checkbox.js +52 -3
  56. package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
  57. package/lib/components/field/Currency/Currency.d.ts +1 -1
  58. package/lib/components/field/Currency/Currency.d.ts.map +1 -1
  59. package/lib/components/field/Currency/Currency.js +2 -2
  60. package/lib/components/field/Currency/Currency.js.map +1 -1
  61. package/lib/components/field/Currency/currency-utils.d.ts.map +1 -1
  62. package/lib/components/field/Currency/currency-utils.js +0 -2
  63. package/lib/components/field/Currency/currency-utils.js.map +1 -1
  64. package/lib/components/field/Date/Date.d.ts +1 -1
  65. package/lib/components/field/Date/Date.d.ts.map +1 -1
  66. package/lib/components/field/Date/Date.js +3 -6
  67. package/lib/components/field/Date/Date.js.map +1 -1
  68. package/lib/components/field/DateTime/DateTime.d.ts +1 -1
  69. package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
  70. package/lib/components/field/DateTime/DateTime.js +4 -7
  71. package/lib/components/field/DateTime/DateTime.js.map +1 -1
  72. package/lib/components/field/Decimal/Decimal.d.ts +1 -1
  73. package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
  74. package/lib/components/field/Decimal/Decimal.js +2 -4
  75. package/lib/components/field/Decimal/Decimal.js.map +1 -1
  76. package/lib/components/field/Dropdown/Dropdown.d.ts +1 -1
  77. package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
  78. package/lib/components/field/Dropdown/Dropdown.js +6 -9
  79. package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
  80. package/lib/components/field/Email/Email.d.ts +1 -1
  81. package/lib/components/field/Email/Email.d.ts.map +1 -1
  82. package/lib/components/field/Email/Email.js +6 -7
  83. package/lib/components/field/Email/Email.js.map +1 -1
  84. package/lib/components/field/Group/Group.d.ts +2 -2
  85. package/lib/components/field/Group/Group.d.ts.map +1 -1
  86. package/lib/components/field/Group/Group.js +4 -3
  87. package/lib/components/field/Group/Group.js.map +1 -1
  88. package/lib/components/field/Integer/Integer.d.ts +1 -1
  89. package/lib/components/field/Integer/Integer.d.ts.map +1 -1
  90. package/lib/components/field/Integer/Integer.js +4 -5
  91. package/lib/components/field/Integer/Integer.js.map +1 -1
  92. package/lib/components/field/Location/Location.css +4 -0
  93. package/lib/components/field/Location/Location.d.ts +11 -0
  94. package/lib/components/field/Location/Location.d.ts.map +1 -0
  95. package/lib/components/field/Location/Location.js +158 -0
  96. package/lib/components/field/Location/Location.js.map +1 -0
  97. package/lib/components/field/Location/index.d.ts +2 -0
  98. package/lib/components/field/Location/index.d.ts.map +1 -0
  99. package/lib/components/field/Location/index.js +2 -0
  100. package/lib/components/field/Location/index.js.map +1 -0
  101. package/lib/components/field/Multiselect/Multiselect.js.map +1 -1
  102. package/lib/components/field/Multiselect/utils.d.ts +2 -1
  103. package/lib/components/field/Multiselect/utils.d.ts.map +1 -1
  104. package/lib/components/field/Multiselect/utils.js +1 -1
  105. package/lib/components/field/Multiselect/utils.js.map +1 -1
  106. package/lib/components/field/ObjectReference/ObjectReference.d.ts +16 -0
  107. package/lib/components/field/ObjectReference/ObjectReference.d.ts.map +1 -0
  108. package/lib/components/field/ObjectReference/ObjectReference.js +165 -0
  109. package/lib/components/field/ObjectReference/ObjectReference.js.map +1 -0
  110. package/lib/components/field/ObjectReference/index.d.ts +2 -0
  111. package/lib/components/field/ObjectReference/index.d.ts.map +1 -0
  112. package/lib/components/field/ObjectReference/index.js +2 -0
  113. package/lib/components/field/ObjectReference/index.js.map +1 -0
  114. package/lib/components/field/ObjectReference/utils.d.ts +17 -0
  115. package/lib/components/field/ObjectReference/utils.d.ts.map +1 -0
  116. package/lib/components/field/ObjectReference/utils.js +99 -0
  117. package/lib/components/field/ObjectReference/utils.js.map +1 -0
  118. package/lib/components/field/Percentage/Percentage.d.ts +1 -1
  119. package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
  120. package/lib/components/field/Percentage/Percentage.js +2 -5
  121. package/lib/components/field/Percentage/Percentage.js.map +1 -1
  122. package/lib/components/field/Phone/Phone.d.ts +1 -1
  123. package/lib/components/field/Phone/Phone.d.ts.map +1 -1
  124. package/lib/components/field/Phone/Phone.js +6 -4
  125. package/lib/components/field/Phone/Phone.js.map +1 -1
  126. package/lib/components/field/RadioButtons/RadioButtons.d.ts +8 -1
  127. package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
  128. package/lib/components/field/RadioButtons/RadioButtons.js +12 -1
  129. package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
  130. package/lib/components/field/RichText/RichText.css +79 -0
  131. package/lib/components/field/RichText/RichText.d.ts +2 -1
  132. package/lib/components/field/RichText/RichText.d.ts.map +1 -1
  133. package/lib/components/field/RichText/RichText.js +1 -0
  134. package/lib/components/field/RichText/RichText.js.map +1 -1
  135. package/lib/components/field/ScalarList/ScalarList.d.ts +1 -1
  136. package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -1
  137. package/lib/components/field/ScalarList/ScalarList.js +1 -2
  138. package/lib/components/field/ScalarList/ScalarList.js.map +1 -1
  139. package/lib/components/field/SelectableCard/SelectableCard.d.ts +2 -0
  140. package/lib/components/field/SelectableCard/SelectableCard.d.ts.map +1 -0
  141. package/lib/components/field/SelectableCard/SelectableCard.js +57 -0
  142. package/lib/components/field/SelectableCard/SelectableCard.js.map +1 -0
  143. package/lib/components/field/SelectableCard/index.d.ts +2 -0
  144. package/lib/components/field/SelectableCard/index.d.ts.map +1 -0
  145. package/lib/components/field/SelectableCard/index.js +2 -0
  146. package/lib/components/field/SelectableCard/index.js.map +1 -0
  147. package/lib/components/field/SelectableCard/utils.d.ts +13 -0
  148. package/lib/components/field/SelectableCard/utils.d.ts.map +1 -0
  149. package/lib/components/field/SelectableCard/utils.js +183 -0
  150. package/lib/components/field/SelectableCard/utils.js.map +1 -0
  151. package/lib/components/field/SemanticLink/SemanticLink.d.ts +10 -2
  152. package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
  153. package/lib/components/field/SemanticLink/SemanticLink.js +128 -15
  154. package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
  155. package/lib/components/field/SemanticLink/utils.js +1 -1
  156. package/lib/components/field/SemanticLink/utils.js.map +1 -1
  157. package/lib/components/field/TextArea/TextArea.d.ts +1 -1
  158. package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
  159. package/lib/components/field/TextArea/TextArea.js +4 -5
  160. package/lib/components/field/TextArea/TextArea.js.map +1 -1
  161. package/lib/components/field/TextContent/TextContent.d.ts +1 -1
  162. package/lib/components/field/TextContent/TextContent.d.ts.map +1 -1
  163. package/lib/components/field/TextContent/TextContent.js +0 -1
  164. package/lib/components/field/TextContent/TextContent.js.map +1 -1
  165. package/lib/components/field/TextInput/TextInput.d.ts +1 -1
  166. package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
  167. package/lib/components/field/TextInput/TextInput.js +4 -5
  168. package/lib/components/field/TextInput/TextInput.js.map +1 -1
  169. package/lib/components/field/Time/Time.d.ts +1 -1
  170. package/lib/components/field/Time/Time.d.ts.map +1 -1
  171. package/lib/components/field/Time/Time.js +2 -5
  172. package/lib/components/field/Time/Time.js.map +1 -1
  173. package/lib/components/field/URL/URL.d.ts +1 -1
  174. package/lib/components/field/URL/URL.d.ts.map +1 -1
  175. package/lib/components/field/URL/URL.js +4 -5
  176. package/lib/components/field/URL/URL.js.map +1 -1
  177. package/lib/components/field/UserReference/UserReference.d.ts +1 -2
  178. package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
  179. package/lib/components/field/UserReference/UserReference.js +1 -2
  180. package/lib/components/field/UserReference/UserReference.js.map +1 -1
  181. package/lib/components/field/UserReference/UserReferenceUtils.d.ts.map +1 -1
  182. package/lib/components/field/UserReference/UserReferenceUtils.js.map +1 -1
  183. package/lib/components/helpers/attachmentShared.d.ts +2 -0
  184. package/lib/components/helpers/attachmentShared.d.ts.map +1 -0
  185. package/lib/components/helpers/attachmentShared.js +6 -0
  186. package/lib/components/helpers/attachmentShared.js.map +1 -0
  187. package/lib/components/helpers/case-utils.js.map +1 -1
  188. package/lib/components/helpers/common-utils.d.ts +1 -1
  189. package/lib/components/helpers/common-utils.d.ts.map +1 -1
  190. package/lib/components/helpers/common-utils.js +1 -2
  191. package/lib/components/helpers/common-utils.js.map +1 -1
  192. package/lib/components/helpers/data_page.d.ts.map +1 -1
  193. package/lib/components/helpers/data_page.js +0 -1
  194. package/lib/components/helpers/data_page.js.map +1 -1
  195. package/lib/components/helpers/date-format-utils.d.ts.map +1 -1
  196. package/lib/components/helpers/event-utils.d.ts.map +1 -1
  197. package/lib/components/helpers/event-utils.js.map +1 -1
  198. package/lib/components/helpers/field-group-utils.d.ts +1 -1
  199. package/lib/components/helpers/field-group-utils.d.ts.map +1 -1
  200. package/lib/components/helpers/field-group-utils.js.map +1 -1
  201. package/lib/components/helpers/formatters/Boolean.js.map +1 -1
  202. package/lib/components/helpers/formatters/Currency.d.ts +1 -0
  203. package/lib/components/helpers/formatters/Currency.d.ts.map +1 -1
  204. package/lib/components/helpers/formatters/Currency.js +8 -4
  205. package/lib/components/helpers/formatters/Currency.js.map +1 -1
  206. package/lib/components/helpers/formatters/CurrencyMap.d.ts.map +1 -1
  207. package/lib/components/helpers/formatters/CurrencyMap.js +0 -1
  208. package/lib/components/helpers/formatters/CurrencyMap.js.map +1 -1
  209. package/lib/components/helpers/formatters/Date.js.map +1 -1
  210. package/lib/components/helpers/formatters/index.d.ts +1 -0
  211. package/lib/components/helpers/formatters/index.d.ts.map +1 -1
  212. package/lib/components/helpers/formatters/index.js.map +1 -1
  213. package/lib/components/helpers/instructions-utils.d.ts.map +1 -1
  214. package/lib/components/helpers/object-utils.d.ts +9 -0
  215. package/lib/components/helpers/object-utils.d.ts.map +1 -0
  216. package/lib/components/helpers/object-utils.js +11 -0
  217. package/lib/components/helpers/object-utils.js.map +1 -0
  218. package/lib/components/helpers/reactContextHelpers.d.ts +0 -1
  219. package/lib/components/helpers/reactContextHelpers.d.ts.map +1 -1
  220. package/lib/components/helpers/simpleTableHelpers.d.ts +15 -1
  221. package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
  222. package/lib/components/helpers/simpleTableHelpers.js +111 -5
  223. package/lib/components/helpers/simpleTableHelpers.js.map +1 -1
  224. package/lib/components/helpers/state-utils.d.ts.map +1 -1
  225. package/lib/components/helpers/state-utils.js.map +1 -1
  226. package/lib/components/helpers/template-utils.js.map +1 -1
  227. package/lib/components/helpers/utils.d.ts +1 -0
  228. package/lib/components/helpers/utils.d.ts.map +1 -1
  229. package/lib/components/helpers/utils.js +7 -1
  230. package/lib/components/helpers/utils.js.map +1 -1
  231. package/lib/components/helpers/versionHelpers.d.ts.map +1 -1
  232. package/lib/components/helpers/versionHelpers.js +0 -1
  233. package/lib/components/helpers/versionHelpers.js.map +1 -1
  234. package/lib/components/infra/ActionButtons/ActionButtons.d.ts.map +1 -1
  235. package/lib/components/infra/ActionButtons/ActionButtons.js +12 -7
  236. package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
  237. package/lib/components/infra/Assignment/Assignment.d.ts +2 -2
  238. package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
  239. package/lib/components/infra/Assignment/Assignment.js +32 -28
  240. package/lib/components/infra/Assignment/Assignment.js.map +1 -1
  241. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +2 -2
  242. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
  243. package/lib/components/infra/AssignmentCard/AssignmentCard.js.map +1 -1
  244. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +1 -2
  245. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
  246. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +15 -79
  247. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
  248. package/lib/components/infra/Containers/FlowContainer/helpers.d.ts.map +1 -1
  249. package/lib/components/infra/Containers/FlowContainer/helpers.js.map +1 -1
  250. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts +1 -1
  251. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts.map +1 -1
  252. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js +0 -1
  253. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js.map +1 -1
  254. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +1 -1
  255. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
  256. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +4 -5
  257. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
  258. package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts +0 -1
  259. package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts.map +1 -1
  260. package/lib/components/infra/Containers/SimpleView/helper.d.ts +0 -1
  261. package/lib/components/infra/Containers/SimpleView/helper.d.ts.map +1 -1
  262. package/lib/components/infra/Containers/SimpleView/helper.js.map +1 -1
  263. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +1 -1
  264. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
  265. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +3 -4
  266. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
  267. package/lib/components/infra/Containers/container-helpers.d.ts +1 -0
  268. package/lib/components/infra/Containers/container-helpers.d.ts.map +1 -1
  269. package/lib/components/infra/Containers/container-helpers.js +46 -1
  270. package/lib/components/infra/Containers/container-helpers.js.map +1 -1
  271. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +2 -2
  272. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
  273. package/lib/components/infra/DashboardFilter/DashboardFilter.js +1 -4
  274. package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
  275. package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -1
  276. package/lib/components/infra/DashboardFilter/filterUtils.js +2 -3
  277. package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
  278. package/lib/components/infra/DeferLoad/DeferLoad.d.ts +1 -1
  279. package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
  280. package/lib/components/infra/DeferLoad/DeferLoad.js +2 -4
  281. package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
  282. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +1 -1
  283. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
  284. package/lib/components/infra/ErrorBoundary/ErrorBoundary.js +0 -2
  285. package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
  286. package/lib/components/infra/MultiStep/MultiStep.css +48 -70
  287. package/lib/components/infra/MultiStep/MultiStep.d.ts +2 -2
  288. package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
  289. package/lib/components/infra/MultiStep/MultiStep.js +19 -37
  290. package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
  291. package/lib/components/infra/NavBar/NavBar.css +1 -1
  292. package/lib/components/infra/NavBar/NavBar.d.ts +1 -1
  293. package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
  294. package/lib/components/infra/NavBar/NavBar.js +13 -7
  295. package/lib/components/infra/NavBar/NavBar.js.map +1 -1
  296. package/lib/components/infra/Reference/Reference.d.ts +1 -1
  297. package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
  298. package/lib/components/infra/Reference/Reference.js +2 -3
  299. package/lib/components/infra/Reference/Reference.js.map +1 -1
  300. package/lib/components/infra/Region/Region.d.ts +1 -1
  301. package/lib/components/infra/Region/Region.d.ts.map +1 -1
  302. package/lib/components/infra/Region/Region.js.map +1 -1
  303. package/lib/components/infra/RootContainer/RootContainer.d.ts +2 -2
  304. package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
  305. package/lib/components/infra/RootContainer/RootContainer.js +0 -1
  306. package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
  307. package/lib/components/infra/Stages/Stages.d.ts +1 -1
  308. package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
  309. package/lib/components/infra/Stages/Stages.js +2 -2
  310. package/lib/components/infra/Stages/Stages.js.map +1 -1
  311. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +1 -1
  312. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
  313. package/lib/components/infra/View/View.d.ts +2 -2
  314. package/lib/components/infra/View/View.d.ts.map +1 -1
  315. package/lib/components/infra/View/View.js +2 -1
  316. package/lib/components/infra/View/View.js.map +1 -1
  317. package/lib/components/template/AdvancedSearch/AdvancedSearch.d.ts +2 -0
  318. package/lib/components/template/AdvancedSearch/AdvancedSearch.d.ts.map +1 -0
  319. package/lib/components/template/AdvancedSearch/AdvancedSearch.js +68 -0
  320. package/lib/components/template/AdvancedSearch/AdvancedSearch.js.map +1 -0
  321. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.d.ts +23 -0
  322. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.d.ts.map +1 -0
  323. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.js +26 -0
  324. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.js.map +1 -0
  325. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.d.ts +3 -0
  326. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.d.ts.map +1 -0
  327. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.js +179 -0
  328. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.js.map +1 -0
  329. package/lib/components/template/AdvancedSearch/SearchGroups/hooks.d.ts +10 -0
  330. package/lib/components/template/AdvancedSearch/SearchGroups/hooks.d.ts.map +1 -0
  331. package/lib/components/template/AdvancedSearch/SearchGroups/hooks.js +25 -0
  332. package/lib/components/template/AdvancedSearch/SearchGroups/hooks.js.map +1 -0
  333. package/lib/components/template/AdvancedSearch/SearchGroups/index.d.ts +2 -0
  334. package/lib/components/template/AdvancedSearch/SearchGroups/index.d.ts.map +1 -0
  335. package/lib/components/template/AdvancedSearch/SearchGroups/index.js +2 -0
  336. package/lib/components/template/AdvancedSearch/SearchGroups/index.js.map +1 -0
  337. package/lib/components/template/AdvancedSearch/SearchGroups/utils.d.ts +16 -0
  338. package/lib/components/template/AdvancedSearch/SearchGroups/utils.d.ts.map +1 -0
  339. package/lib/components/template/AdvancedSearch/SearchGroups/utils.js +22 -0
  340. package/lib/components/template/AdvancedSearch/SearchGroups/utils.js.map +1 -0
  341. package/lib/components/template/AdvancedSearch/TemplateContext.d.ts +10 -0
  342. package/lib/components/template/AdvancedSearch/TemplateContext.d.ts.map +1 -0
  343. package/lib/components/template/AdvancedSearch/TemplateContext.js +11 -0
  344. package/lib/components/template/AdvancedSearch/TemplateContext.js.map +1 -0
  345. package/lib/components/template/AdvancedSearch/index.d.ts +2 -0
  346. package/lib/components/template/AdvancedSearch/index.d.ts.map +1 -0
  347. package/lib/components/template/AdvancedSearch/index.js +2 -0
  348. package/lib/components/template/AdvancedSearch/index.js.map +1 -0
  349. package/lib/components/template/AppShell/AppShell.css +1 -1
  350. package/lib/components/template/AppShell/AppShell.d.ts +2 -2
  351. package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
  352. package/lib/components/template/AppShell/AppShell.js +10 -13
  353. package/lib/components/template/AppShell/AppShell.js.map +1 -1
  354. package/lib/components/template/BannerPage/BannerPage.d.ts +2 -2
  355. package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
  356. package/lib/components/template/BannerPage/BannerPage.js.map +1 -1
  357. package/lib/components/template/CaseSummary/CaseSummary.d.ts +4 -2
  358. package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
  359. package/lib/components/template/CaseSummary/CaseSummary.js +24 -37
  360. package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
  361. package/lib/components/template/CaseView/CaseView.d.ts +2 -2
  362. package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
  363. package/lib/components/template/CaseView/CaseView.js +13 -15
  364. package/lib/components/template/CaseView/CaseView.js.map +1 -1
  365. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +1 -1
  366. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
  367. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +1 -1
  368. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
  369. package/lib/components/template/Confirmation/Confirmation.d.ts +2 -2
  370. package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
  371. package/lib/components/template/Confirmation/Confirmation.js +0 -1
  372. package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
  373. package/lib/components/template/DataReference/DataReference.d.ts +9 -2
  374. package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
  375. package/lib/components/template/DataReference/DataReference.js +239 -80
  376. package/lib/components/template/DataReference/DataReference.js.map +1 -1
  377. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.d.ts +8 -0
  378. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.d.ts.map +1 -0
  379. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.js +9 -0
  380. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.js.map +1 -0
  381. package/lib/components/template/DataReference/SearchForm.d.ts +3 -0
  382. package/lib/components/template/DataReference/SearchForm.d.ts.map +1 -0
  383. package/lib/components/template/DataReference/SearchForm.js +87 -0
  384. package/lib/components/template/DataReference/SearchForm.js.map +1 -0
  385. package/lib/components/template/DataReference/utils.d.ts +15 -0
  386. package/lib/components/template/DataReference/utils.d.ts.map +1 -0
  387. package/lib/components/template/DataReference/utils.js +75 -0
  388. package/lib/components/template/DataReference/utils.js.map +1 -0
  389. package/lib/components/template/DefaultForm/DefaultForm.d.ts +2 -2
  390. package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
  391. package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
  392. package/lib/components/template/DefaultForm/utils/index.d.ts.map +1 -1
  393. package/lib/components/template/DefaultForm/utils/index.js +1 -2
  394. package/lib/components/template/DefaultForm/utils/index.js.map +1 -1
  395. package/lib/components/template/DefaultPage/DefaultPage.d.ts +36 -0
  396. package/lib/components/template/DefaultPage/DefaultPage.d.ts.map +1 -0
  397. package/lib/components/template/DefaultPage/DefaultPage.js +28 -0
  398. package/lib/components/template/DefaultPage/DefaultPage.js.map +1 -0
  399. package/lib/components/template/DefaultPage/index.d.ts +2 -0
  400. package/lib/components/template/DefaultPage/index.d.ts.map +1 -0
  401. package/lib/components/template/DefaultPage/index.js +2 -0
  402. package/lib/components/template/DefaultPage/index.js.map +1 -0
  403. package/lib/components/template/Details/Details/Details.d.ts +1 -1
  404. package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
  405. package/lib/components/template/Details/Details/Details.js +2 -3
  406. package/lib/components/template/Details/Details/Details.js.map +1 -1
  407. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +2 -2
  408. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
  409. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
  410. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +1 -1
  411. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
  412. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +2 -3
  413. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
  414. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +1 -1
  415. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
  416. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +2 -3
  417. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
  418. package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts +1 -1
  419. package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts.map +1 -1
  420. package/lib/components/template/Details/DynamicTabs/DynamicTabs.js.map +1 -1
  421. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +1 -1
  422. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
  423. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +1 -2
  424. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
  425. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +2 -2
  426. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
  427. package/lib/components/template/InlineDashboard/InlineDashboard.js +2 -2
  428. package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
  429. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +2 -2
  430. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
  431. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js.map +1 -1
  432. package/lib/components/template/ListPage/ListPage.d.ts +1 -1
  433. package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
  434. package/lib/components/template/ListPage/ListPage.js.map +1 -1
  435. package/lib/components/template/ListView/DefaultViewMeta.js.map +1 -1
  436. package/lib/components/template/ListView/ListView.d.ts +4 -1
  437. package/lib/components/template/ListView/ListView.d.ts.map +1 -1
  438. package/lib/components/template/ListView/ListView.js +133 -64
  439. package/lib/components/template/ListView/ListView.js.map +1 -1
  440. package/lib/components/template/ListView/hooks.d.ts.map +1 -1
  441. package/lib/components/template/ListView/hooks.js +2 -5
  442. package/lib/components/template/ListView/hooks.js.map +1 -1
  443. package/lib/components/template/ListView/utils.d.ts.map +1 -1
  444. package/lib/components/template/ListView/utils.js +28 -5
  445. package/lib/components/template/ListView/utils.js.map +1 -1
  446. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +1 -1
  447. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
  448. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -1
  449. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +2 -2
  450. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -1
  451. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js.map +1 -1
  452. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +1 -1
  453. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
  454. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +2 -3
  455. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
  456. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +2 -2
  457. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -1
  458. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js.map +1 -1
  459. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +2 -2
  460. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
  461. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -1
  462. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +2 -2
  463. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
  464. package/lib/components/template/OneColumn/OneColumn/OneColumn.js +2 -2
  465. package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
  466. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +1 -1
  467. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
  468. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -1
  469. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +2 -2
  470. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
  471. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js.map +1 -1
  472. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +1 -1
  473. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
  474. package/lib/components/template/PromotedFilters/PromotedFilters.js +0 -1
  475. package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
  476. package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.d.ts +2 -0
  477. package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.d.ts.map +1 -0
  478. package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.js +73 -0
  479. package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.js.map +1 -0
  480. package/lib/components/template/SelfServiceCaseView/index.d.ts +2 -0
  481. package/lib/components/template/SelfServiceCaseView/index.d.ts.map +1 -0
  482. package/lib/components/template/SelfServiceCaseView/index.js +2 -0
  483. package/lib/components/template/SelfServiceCaseView/index.js.map +1 -0
  484. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts +1 -1
  485. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
  486. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js +1 -2
  487. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
  488. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +2 -2
  489. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
  490. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +34 -32
  491. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
  492. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +1 -1
  493. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
  494. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
  495. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +1 -1
  496. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
  497. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js +3 -2
  498. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
  499. package/lib/components/template/SubTabs/SubTabs.d.ts +2 -2
  500. package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
  501. package/lib/components/template/SubTabs/SubTabs.js.map +1 -1
  502. package/lib/components/template/SubTabs/tabUtils.d.ts +10 -0
  503. package/lib/components/template/SubTabs/tabUtils.d.ts.map +1 -1
  504. package/lib/components/template/SubTabs/tabUtils.js +102 -1
  505. package/lib/components/template/SubTabs/tabUtils.js.map +1 -1
  506. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts +2 -2
  507. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
  508. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +2 -3
  509. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
  510. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +1 -1
  511. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
  512. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -1
  513. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +2 -2
  514. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
  515. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +2 -3
  516. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
  517. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +2 -2
  518. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
  519. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js.map +1 -1
  520. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +1 -1
  521. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
  522. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +2 -3
  523. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
  524. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +2 -2
  525. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -1
  526. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js.map +1 -1
  527. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +2 -2
  528. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
  529. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js.map +1 -1
  530. package/lib/components/template/WssNavBar/WssNavBar.css +1 -1
  531. package/lib/components/template/WssNavBar/WssNavBar.d.ts +1 -1
  532. package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -1
  533. package/lib/components/template/WssNavBar/WssNavBar.js +4 -4
  534. package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
  535. package/lib/components/template/utils.d.ts +7 -0
  536. package/lib/components/template/utils.d.ts.map +1 -0
  537. package/lib/components/template/utils.js +52 -0
  538. package/lib/components/template/utils.js.map +1 -0
  539. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts +1 -1
  540. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
  541. package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
  542. package/lib/components/widget/Attachment/Attachment.css +6 -8
  543. package/lib/components/widget/Attachment/Attachment.d.ts +4 -2
  544. package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
  545. package/lib/components/widget/Attachment/Attachment.js +255 -202
  546. package/lib/components/widget/Attachment/Attachment.js.map +1 -1
  547. package/lib/components/widget/Attachment/Attachment.types.d.ts +90 -0
  548. package/lib/components/widget/Attachment/Attachment.types.d.ts.map +1 -0
  549. package/lib/components/widget/Attachment/Attachment.types.js +2 -0
  550. package/lib/components/widget/Attachment/Attachment.types.js.map +1 -0
  551. package/lib/components/widget/Attachment/AttachmentUtils.d.ts +25 -0
  552. package/lib/components/widget/Attachment/AttachmentUtils.d.ts.map +1 -0
  553. package/lib/components/widget/Attachment/AttachmentUtils.js +255 -0
  554. package/lib/components/widget/Attachment/AttachmentUtils.js.map +1 -0
  555. package/lib/components/widget/CaseHistory/CaseHistory.d.ts +1 -1
  556. package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
  557. package/lib/components/widget/CaseHistory/CaseHistory.js +2 -2
  558. package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
  559. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.css +0 -14
  560. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +1 -1
  561. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts.map +1 -1
  562. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js +1 -1
  563. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
  564. package/lib/components/widget/FileUtility/FileUtility/FileUtility.css +7 -6
  565. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +2 -1
  566. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
  567. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +29 -17
  568. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
  569. package/lib/components/widget/Followers/Followers.d.ts +2 -2
  570. package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
  571. package/lib/components/widget/Followers/Followers.js +0 -2
  572. package/lib/components/widget/Followers/Followers.js.map +1 -1
  573. package/lib/components/widget/QuickCreate/QuickCreate.d.ts +1 -1
  574. package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
  575. package/lib/components/widget/QuickCreate/QuickCreate.js +0 -1
  576. package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
  577. package/lib/components/widget/SummaryItem/SummaryItem.css +9 -11
  578. package/lib/components/widget/SummaryItem/SummaryItem.d.ts +1 -1
  579. package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
  580. package/lib/components/widget/SummaryItem/SummaryItem.js +1 -1
  581. package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
  582. package/lib/components/widget/SummaryList/SummaryList.d.ts +1 -1
  583. package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
  584. package/lib/components/widget/SummaryList/SummaryList.js.map +1 -1
  585. package/lib/components/widget/ToDo/ToDo.css +1 -13
  586. package/lib/components/widget/ToDo/ToDo.d.ts +1 -1
  587. package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
  588. package/lib/components/widget/ToDo/ToDo.js +21 -16
  589. package/lib/components/widget/ToDo/ToDo.js.map +1 -1
  590. package/lib/hooks/useAfterInitialEffect.d.ts +1 -1
  591. package/lib/hooks/useAfterInitialEffect.d.ts.map +1 -1
  592. package/lib/hooks/useAfterInitialEffect.js.map +1 -1
  593. package/lib/hooks/useConsolidatedRef.d.ts +1 -1
  594. package/lib/hooks/useConsolidatedRef.d.ts.map +1 -1
  595. package/lib/hooks/useConsolidatedRef.js.map +1 -1
  596. package/lib/hooks/useFocusFirstField.d.ts.map +1 -1
  597. package/lib/hooks/useFocusFirstField.js.map +1 -1
  598. package/lib/hooks/useGetTabsCount.d.ts +10 -0
  599. package/lib/hooks/useGetTabsCount.d.ts.map +1 -0
  600. package/lib/hooks/useGetTabsCount.js +165 -0
  601. package/lib/hooks/useGetTabsCount.js.map +1 -0
  602. package/lib/hooks/useIsMount.d.ts +2 -0
  603. package/lib/hooks/useIsMount.d.ts.map +1 -0
  604. package/lib/hooks/useIsMount.js +9 -0
  605. package/lib/hooks/useIsMount.js.map +1 -0
  606. package/lib/hooks/useScrolltoTop.d.ts.map +1 -1
  607. package/lib/mediaco/ToDo/ToDo.css +81 -0
  608. package/lib/mediaco/ToDo/ToDo.d.ts +16 -0
  609. package/lib/mediaco/ToDo/ToDo.d.ts.map +1 -0
  610. package/lib/mediaco/ToDo/ToDo.js +187 -0
  611. package/lib/mediaco/ToDo/ToDo.js.map +1 -0
  612. package/lib/mediaco/ToDo/index.d.ts +2 -0
  613. package/lib/mediaco/ToDo/index.d.ts.map +1 -0
  614. package/lib/mediaco/ToDo/index.js +2 -0
  615. package/lib/mediaco/ToDo/index.js.map +1 -0
  616. package/lib/samples/Embedded/styles.css +26 -0
  617. package/lib/sdk-pega-component-map.d.ts +119 -103
  618. package/lib/sdk-pega-component-map.d.ts.map +1 -1
  619. package/lib/sdk-pega-component-map.js +20 -3
  620. package/lib/sdk-pega-component-map.js.map +1 -1
  621. package/lib/theme.d.ts +30 -1
  622. package/lib/theme.d.ts.map +1 -1
  623. package/lib/theme.js +209 -2
  624. package/lib/theme.js.map +1 -1
  625. package/lib/types/PConnProps.d.ts +1 -1
  626. package/package.json +32 -1
  627. package/lib/components/helpers/attachmentHelpers.d.ts +0 -13
  628. package/lib/components/helpers/attachmentHelpers.d.ts.map +0 -1
  629. package/lib/components/helpers/attachmentHelpers.js +0 -72
  630. package/lib/components/helpers/attachmentHelpers.js.map +0 -1
@@ -1,208 +1,187 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /* eslint-disable react/jsx-boolean-value */
3
- /* eslint-disable react/no-array-index-key */
4
- /* eslint-disable no-nested-ternary */
5
- import { useState, useEffect, useCallback } from 'react';
2
+ import { useState, useEffect, useCallback, useMemo, useRef } from 'react';
6
3
  import { CircularProgress, IconButton, Menu, MenuItem, Button } from '@mui/material';
7
4
  import MoreVertIcon from '@mui/icons-material/MoreVert';
8
- import download from 'downloadjs';
9
- import { buildFilePropsFromResponse, getIconFromFileType, validateMaxSize } from '../../helpers/attachmentHelpers';
10
5
  import { Utils } from '../../helpers/utils';
6
+ import { clearFieldErrorMessages, deleteAttachments, getIconFromFileType, getMappedValue, insertAttachments, useDeepMemo, useFileDownload, validateFileExtension } from './AttachmentUtils';
7
+ import { validateMaxSize } from '../../helpers/attachmentShared';
11
8
  import './Attachment.css';
12
- const getAttachmentKey = (name = '') => (name ? `attachmentsList.${name}` : 'attachmentsList');
13
- const getCurrentAttachmentsList = (key, context) => {
14
- return PCore.getStoreValue(`.${key}`, 'context_data', context) || [];
15
- };
16
- const updateAttachmentState = (pConn, key, attachments) => {
17
- PCore.getStateUtils().updateState(pConn.getContextName(), key, attachments, {
18
- pageReference: 'context_data',
19
- isArrayDeepMerge: false
20
- });
21
- };
22
9
  export default function Attachment(props) {
23
- const { value, getPConnect, label, validatemessage, allowMultiple, extensions, displayMode, helperText } = props;
10
+ const { value, getPConnect, label, validatemessage, extensions, displayMode, helperText, editMode, isTableFormatter } = props;
24
11
  /* this is a temporary fix because required is supposed to be passed as a boolean and NOT as a string */
25
- let { required, disabled } = props;
26
- [required, disabled] = [required, disabled].map(prop => prop === true || (typeof prop === 'string' && prop === 'true'));
12
+ let { required, disabled, allowMultiple } = props;
13
+ [required, disabled, allowMultiple] = [required, disabled, allowMultiple].map(prop => prop === true || (typeof prop === 'string' && prop === 'true'));
27
14
  const pConn = getPConnect();
28
- const caseID = PCore.getStoreValue('.pyID', 'caseInfo.content', pConn.getContextName());
15
+ const localizationService = pConn.getLocalizationService();
16
+ const actionSequencer = useMemo(() => PCore.getActionsSequencer(), []);
17
+ const rawValue = pConn.getComponentConfig().value;
18
+ const isAttachmentAnnotationPresent = typeof rawValue === 'object' ? false : rawValue?.includes('@ATTACHMENT');
19
+ const { attachments, isOldAttachment } = isAttachmentAnnotationPresent ? value : PCore.getAttachmentUtils().prepareAttachmentData(value);
20
+ let valueRef = pConn.getStateProps().value;
21
+ valueRef = valueRef.indexOf('.') === 0 ? valueRef.substring(1) : valueRef;
22
+ pConn.setReferenceList(`.${valueRef}`);
23
+ const isMultiAttachmentInInlineEditTable = isTableFormatter && allowMultiple && editMode === 'tableRows';
24
+ const [files, setFiles] = useState(attachments);
25
+ const overrideLocalState = useRef(false);
26
+ const attachmentCount = useRef(attachments.length);
27
+ const filesWithError = useRef([]);
28
+ const multiAttachmentsInInlineEdit = useRef([]);
29
+ const thumbnailURLs = useRef([]);
30
+ const contextName = pConn.getContextName();
31
+ const onFileDownload = useFileDownload(contextName);
29
32
  const localizedVal = PCore.getLocaleUtils().getLocaleValue;
30
33
  const localeCategory = 'CosmosFields';
31
34
  const uploadMultipleFilesLabel = localizedVal('file_upload_text_multiple', localeCategory);
32
35
  const uploadSingleFileLabel = localizedVal('file_upload_text_one', localeCategory);
33
- let categoryName = '';
34
- if (value && value.pyCategoryName) {
35
- categoryName = value.pyCategoryName;
36
- }
37
36
  const deleteIcon = Utils.getImageSrc('trash', Utils.getSDKStaticConentUrl());
38
37
  const srcImg = Utils.getImageSrc('document-doc', Utils.getSDKStaticConentUrl());
39
- let valueRef = pConn.getStateProps().value;
40
- valueRef = valueRef.indexOf('.') === 0 ? valueRef.substring(1) : valueRef;
41
38
  const [anchorEl, setAnchorEl] = useState(null);
42
39
  const open = Boolean(anchorEl);
43
- const [files, setFiles] = useState(() => value?.pxResults && +value.pyCount > 0 ? value.pxResults.map(f => buildFilePropsFromResponse(f)) : []);
44
- const [filesWithError, setFilesWithError] = useState([]);
40
+ const fileInputRef = useRef(null);
45
41
  const [toggleUploadBegin, setToggleUploadBegin] = useState(false);
46
- const resetAttachmentStoredState = () => {
47
- PCore.getStateUtils().updateState(pConn.getContextName(), getAttachmentKey(valueRef), undefined, {
48
- pageReference: 'context_data',
49
- isArrayDeepMerge: false
50
- });
51
- };
52
- const fileDownload = (data, fileName, ext) => {
53
- const fileData = ext ? `${fileName}.${ext}` : fileName;
54
- download(atob(data), fileData);
55
- };
56
- const downloadFile = (fileObj) => {
57
- setAnchorEl(null);
58
- PCore.getAttachmentUtils()
59
- // @ts-ignore - 3rd parameter "responseEncoding" should be optional
60
- .downloadAttachment(fileObj.pzInsKey, pConn.getContextName())
61
- .then((content) => {
62
- const extension = fileObj.pyAttachName.split('.').pop();
63
- fileDownload(content.data, fileObj.pyFileName, extension);
64
- })
65
- .catch(() => { });
66
- };
67
- const deleteFile = useCallback(file => {
42
+ const deleteFile = useCallback((file, fileIndex) => {
68
43
  setAnchorEl(null);
69
- let attachmentsList = [];
70
- let currentAttachmentList = getCurrentAttachmentsList(getAttachmentKey(valueRef), pConn.getContextName());
71
- // If file to be deleted is the one added in previous stage i.e. for which a file instance is created in server
72
- // no need to filter currentAttachmentList as we will get another entry of file in redux with delete & label
73
- // eslint-disable-next-line no-unsafe-optional-chaining
74
- if (value && value?.pxResults && +value?.pyCount > 0 && file.responseProps && file?.responseProps?.pzInsKey !== 'temp') {
75
- const updatedAttachments = files.map(f => {
76
- if (f.responseProps && f.responseProps.pzInsKey === file.responseProps.pzInsKey) {
77
- return { ...f, delete: true, label: valueRef };
78
- }
79
- return f;
80
- });
81
- // updating the redux store to help form-handler in passing the data to delete the file from server
82
- updateAttachmentState(pConn, getAttachmentKey(valueRef), [...updatedAttachments]);
83
- setFiles(current => {
84
- const newlyAddedFiles = current.filter(f => !!f.ID);
85
- const filesPostDelete = current.filter(f => f.responseProps?.pzInsKey !== 'temp' && f.responseProps?.pzInsKey !== file.responseProps?.pzInsKey);
86
- attachmentsList = [...filesPostDelete, ...newlyAddedFiles];
87
- return attachmentsList;
44
+ // reset the file input so that it will allow re-uploading the same file after deletion
45
+ if (fileInputRef.current) {
46
+ fileInputRef.current.value = ''; // Reset the input
47
+ }
48
+ if (filesWithError.current.length > 0) {
49
+ filesWithError.current = filesWithError.current.filter(fileWithError => fileWithError.props.id !== file.props.id);
50
+ if (filesWithError.current.length === 0) {
51
+ clearFieldErrorMessages(pConn);
52
+ }
53
+ }
54
+ if (file.inProgress) {
55
+ // @ts-ignore - Expected 1 arguments, but got 2.ts(2554)
56
+ PCore.getAttachmentUtils().cancelRequest(file.props.id, contextName);
57
+ actionSequencer.deRegisterBlockingAction(contextName).catch(() => { });
58
+ setFiles(localFiles => {
59
+ return localFiles.filter(localFile => localFile.props.id !== file.props.id);
88
60
  });
89
- } // if the file being deleted is the added in this stage i.e. whose data is not yet created in server
61
+ }
90
62
  else {
91
- // filter newly added files in this stage, later the updated current stage files will be added to redux once files state is updated in below setFiles()
92
- currentAttachmentList = currentAttachmentList.filter(f => f.label !== valueRef);
93
- setFiles(current => {
94
- attachmentsList = current.filter(f => f.ID !== file.ID);
95
- return attachmentsList;
63
+ deleteAttachments([file], pConn, multiAttachmentsInInlineEdit.current, {
64
+ allowMultiple,
65
+ isOldAttachment,
66
+ isMultiAttachmentInInlineEditTable,
67
+ attachmentCount: attachmentCount.current,
68
+ deleteIndex: fileIndex
69
+ });
70
+ // Filter out without deleted file and reset the file indexes
71
+ setFiles(localFiles => {
72
+ let tempLocalFiles = [...localFiles];
73
+ tempLocalFiles = tempLocalFiles.filter(localFile => localFile.props.id !== file.props.id);
74
+ tempLocalFiles.forEach(localFile => {
75
+ if (!localFile.props.error && !file.props.error) {
76
+ const updatedDeleteIndex = localFile.responseProps.deleteIndex > fileIndex ? localFile.responseProps.deleteIndex - 1 : localFile.responseProps.deleteIndex;
77
+ localFile.props.onDelete = () => deleteFile(localFile, updatedDeleteIndex);
78
+ localFile.responseProps.deleteIndex = updatedDeleteIndex;
79
+ }
80
+ });
81
+ return tempLocalFiles;
96
82
  });
97
- updateAttachmentState(pConn, getAttachmentKey(valueRef), [...currentAttachmentList, ...attachmentsList]);
98
- if (file.inProgress) {
99
- // @ts-ignore - 3rd parameter "responseEncoding" should be optional
100
- PCore.getAttachmentUtils().cancelRequest(file.ID, pConn.getContextName());
83
+ if (!file.props.error) {
84
+ attachmentCount.current -= 1;
101
85
  }
102
86
  }
103
87
  setToggleUploadBegin(false);
104
- setFilesWithError(prevFilesWithError => {
105
- return prevFilesWithError.filter(f => f.ID !== file.ID);
88
+ }, [pConn]);
89
+ const onUploadProgress = (id, ev) => {
90
+ const progress = Math.floor((ev.loaded / ev.total) * 100);
91
+ setFiles(localFiles => [
92
+ ...localFiles.map(localFile => {
93
+ if (localFile.props?.id === id) {
94
+ localFile.inProgress = true;
95
+ localFile.props.progress = progress;
96
+ }
97
+ return localFile;
98
+ })
99
+ ]);
100
+ };
101
+ const populateErrorAndUpdateRedux = file => {
102
+ const fieldName = pConn.getStateProps().value;
103
+ // set errors to property to block submit even on errors in file upload
104
+ PCore.getMessageManager().addMessages({
105
+ messages: [
106
+ {
107
+ type: 'error',
108
+ message: localizationService.getLocalizedText('Error with one or more files')
109
+ }
110
+ ],
111
+ property: fieldName,
112
+ pageReference: pConn.getPageReference(),
113
+ context: contextName
106
114
  });
107
- }, [pConn, value, valueRef, filesWithError]);
108
- const onUploadProgress = () => { };
109
- const errorHandler = (isFetchCanceled, attachedFile) => {
115
+ insertAttachments([file], pConn, multiAttachmentsInInlineEdit.current, {
116
+ allowMultiple,
117
+ isOldAttachment,
118
+ isMultiAttachmentInInlineEditTable,
119
+ attachmentCount: attachmentCount.current
120
+ });
121
+ };
122
+ const errorHandler = (isFetchCanceled, file) => {
110
123
  return error => {
111
124
  if (!isFetchCanceled(error)) {
112
- let uploadFailMsg = pConn.getLocalizedValue('Something went wrong', '', '');
125
+ let uploadFailMsg = localizationService.getLocalizedText('Something went wrong');
113
126
  if (error.response && error.response.data && error.response.data.errorDetails) {
114
- uploadFailMsg = pConn.getLocalizedValue(error.response.data.errorDetails[0].localizedValue, '', '');
127
+ uploadFailMsg = localizationService.getLocalizedText(error.response.data.errorDetails[0].localizedValue);
115
128
  }
116
129
  setFiles(current => {
117
- return current.map(f => {
118
- if (f.ID === attachedFile.ID) {
119
- f.props.meta = uploadFailMsg;
120
- f.props.error = true;
121
- f.props.onDelete = () => deleteFile(f);
122
- f.props.icon = getIconFromFileType(f.type);
123
- f.props.name = pConn.getLocalizedValue('Unable to upload file', '', '');
124
- f.inProgress = false;
125
- const fieldName = pConn.getStateProps().value;
126
- const context = pConn.getContextName();
127
- // set errors to property to block submit even on errors in file upload
128
- PCore.getMessageManager().addMessages({
129
- messages: [
130
- {
131
- type: 'error',
132
- message: pConn.getLocalizedValue('Error with one or more files', '', '')
133
- }
134
- ],
135
- property: fieldName,
136
- pageReference: pConn.getPageReference(),
137
- context
138
- });
139
- delete f.props.progress;
130
+ return current.map((localFile, index) => {
131
+ if (localFile.props.id === file.props.id) {
132
+ localFile.props.meta = uploadFailMsg;
133
+ localFile.props.error = true;
134
+ localFile.props.onDelete = () => deleteFile(localFile, index);
135
+ localFile.props.icon = getIconFromFileType(localFile.type);
136
+ localFile.props.name = localizationService.getLocalizedText('Unable to upload file');
137
+ localFile.inProgress = false;
138
+ delete localFile.props.progress;
139
+ filesWithError.current.push(localFile);
140
+ populateErrorAndUpdateRedux(localFile);
140
141
  }
141
- return f;
142
+ return localFile;
142
143
  });
143
144
  });
144
145
  }
145
146
  throw error;
146
147
  };
147
148
  };
148
- const validateFileExtension = (fileObj, allowedExtensions) => {
149
- if (!allowedExtensions) {
150
- return true;
151
- }
152
- const allowedExtensionList = allowedExtensions
153
- .toLowerCase()
154
- .split(',')
155
- .map(item => item.replaceAll('.', '').trim());
156
- const extension = fileObj.name.split('.').pop().toLowerCase();
157
- return allowedExtensionList.includes(extension);
158
- };
159
- const clearFieldErrorMessages = () => {
160
- const fieldName = pConn.getStateProps().value;
161
- const context = pConn.getContextName();
162
- PCore.getMessageManager().clearMessages({
163
- type: PCore.getConstants().MESSAGES.MESSAGES_TYPE_ERROR,
164
- property: fieldName,
165
- pageReference: pConn.getPageReference(),
166
- context
167
- });
168
- };
169
149
  const onFileAdded = event => {
170
150
  let addedFiles = Array.from(event.target.files);
171
- addedFiles = allowMultiple === 'true' ? addedFiles : [addedFiles[0]];
151
+ addedFiles = allowMultiple ? addedFiles : [addedFiles[0]];
172
152
  const maxAttachmentSize = PCore.getEnvironmentInfo().getMaxAttachmentSize() || '5';
173
153
  const tempFilesToBeUploaded = [
174
154
  ...addedFiles.map((f, index) => {
175
155
  f.ID = `${new Date().getTime()}I${index}`;
176
- f.inProgress = true;
177
156
  f.props = {
178
157
  type: f.type,
179
158
  name: f.name,
159
+ id: f.ID,
160
+ format: f.name.split('.').pop(),
180
161
  icon: getIconFromFileType(f.type),
181
- onDelete: () => deleteFile(f)
162
+ onDelete: () => deleteFile(f, index),
163
+ thumbnail: window.URL.createObjectURL(f)
182
164
  };
183
165
  if (!validateMaxSize(f, maxAttachmentSize)) {
184
166
  f.props.error = true;
185
- f.inProgress = false;
186
- f.props.meta = pConn.getLocalizedValue(`File is too big. Max allowed size is ${maxAttachmentSize}MB.`, '', '');
167
+ f.props.meta = localizationService.getLocalizedText(`File is too big. Max allowed size is ${maxAttachmentSize}MB.`);
187
168
  }
188
169
  else if (!validateFileExtension(f, extensions)) {
189
170
  f.props.error = true;
190
- f.inProgress = false;
191
- f.props.meta = `${pConn.getLocalizedValue('File has invalid extension. Allowed extensions are:', '', '')} ${extensions.replaceAll('.', '')}`;
171
+ f.props.meta = `${localizationService.getLocalizedText('File has invalid extension. Allowed extensions are:')} ${extensions.replaceAll('.', '')}`;
192
172
  }
193
173
  if (f.props.error) {
194
174
  const fieldName = pConn.getStateProps().value;
195
- const context = pConn.getContextName();
196
175
  PCore.getMessageManager().addMessages({
197
176
  messages: [
198
177
  {
199
178
  type: 'error',
200
- message: pConn.getLocalizedValue('Error with one or more files', '', '')
179
+ message: localizationService.getLocalizedText('Error with one or more files')
201
180
  }
202
181
  ],
203
182
  property: fieldName,
204
183
  pageReference: pConn.getPageReference(),
205
- context
184
+ context: contextName
206
185
  });
207
186
  }
208
187
  return f;
@@ -210,9 +189,15 @@ export default function Attachment(props) {
210
189
  ];
211
190
  const tempFilesWithError = tempFilesToBeUploaded.filter(f => f.props.error);
212
191
  if (tempFilesWithError.length > 0) {
213
- setFilesWithError(tempFilesWithError);
192
+ filesWithError.current = [...filesWithError.current, ...tempFilesWithError];
193
+ insertAttachments(tempFilesWithError, pConn, multiAttachmentsInInlineEdit.current, {
194
+ allowMultiple,
195
+ isOldAttachment,
196
+ isMultiAttachmentInInlineEditTable,
197
+ attachmentCount: attachmentCount.current
198
+ });
214
199
  }
215
- setFiles(current => (allowMultiple !== 'true' ? [...tempFilesToBeUploaded] : [...current, ...tempFilesToBeUploaded]));
200
+ setFiles(current => (!allowMultiple ? [...tempFilesToBeUploaded] : [...current, ...tempFilesToBeUploaded]));
216
201
  setToggleUploadBegin(true);
217
202
  };
218
203
  const uploadFiles = useCallback(() => {
@@ -220,99 +205,164 @@ export default function Attachment(props) {
220
205
  .filter(e => {
221
206
  const isFileUploaded = e.props && e.props.progress === 100;
222
207
  const fileHasError = e.props && e.props.error;
223
- const isFileUploadedinLastStep = e.responseProps && e.responseProps.pzInsKey;
224
- return !isFileUploaded && !fileHasError && !isFileUploadedinLastStep;
208
+ const isFileUploadedInLastStep = e.responseProps && e.responseProps.ID !== 'temp';
209
+ const isFileUploadInProgress = e.inProgress;
210
+ return !isFileUploadInProgress && !isFileUploaded && !fileHasError && !isFileUploadedInLastStep;
225
211
  })
226
- .map(f => window.PCore.getAttachmentUtils().uploadAttachment(f, () => {
227
- onUploadProgress();
212
+ .map(file => PCore.getAttachmentUtils().uploadAttachment(file, ev => {
213
+ onUploadProgress(file.props.id, ev);
228
214
  }, isFetchCanceled => {
229
- return errorHandler(isFetchCanceled, f);
230
- }, pConn.getContextName()));
215
+ return errorHandler(isFetchCanceled, file);
216
+ }, contextName));
217
+ // allow new files to be added when other files upload is still in progress
218
+ setToggleUploadBegin(false);
231
219
  Promise.allSettled(filesToBeUploaded)
232
220
  .then((fileResponses) => {
233
221
  fileResponses = fileResponses.filter(fr => fr.status !== 'rejected'); // in case of deleting an in progress file, promise gets cancelled but still enters then block
234
222
  if (fileResponses.length > 0) {
235
- setFiles(current => {
236
- const tempFilesUploaded = [...current];
237
- tempFilesUploaded.forEach(f => {
238
- const index = fileResponses.findIndex((fr) => fr.value.clientFileID === f.ID);
223
+ setFiles(localFiles => {
224
+ const tempFilesUploaded = [...localFiles];
225
+ tempFilesUploaded.forEach(localFile => {
226
+ // if attach field has multiple files & in bw any error files are present
227
+ // Example : files = [properFile1, errFile, errFile, properFile2]
228
+ // indexes for delete & preview should be for files [properFile1, properFile2] which is [1,2]
229
+ const index = fileResponses.findIndex(fileResponse => fileResponse.value.clientFileID === localFile.props.id);
239
230
  if (index >= 0) {
240
- f.props.meta = pConn.getLocalizedValue('Uploaded successfully', '', '');
241
- f.props.progress = 100;
242
- f.inProgress = false;
243
- f.handle = fileResponses[index].value.ID;
244
- f.label = valueRef;
245
- f.category = categoryName;
246
- f.responseProps = {
247
- pzInsKey: 'temp',
248
- pyAttachName: f.props.name
231
+ fileResponses[index].value.thumbnail = localFile.props.thumbnail;
232
+ localFile.inProgress = false;
233
+ localFile.ID = fileResponses[index].value.ID;
234
+ localFile.props.meta = localizationService.getLocalizedText('Uploaded successfully');
235
+ localFile.props.progress = 100;
236
+ localFile.handle = fileResponses[index].value.ID;
237
+ localFile.label = valueRef;
238
+ localFile.responseProps = {
239
+ pzInsKey: 'temp'
249
240
  };
250
241
  }
251
242
  });
252
243
  return tempFilesUploaded;
253
244
  });
254
- if (filesWithError.length === 0) {
255
- clearFieldErrorMessages();
245
+ insertAttachments(fileResponses, pConn, multiAttachmentsInInlineEdit.current, {
246
+ allowMultiple,
247
+ isOldAttachment,
248
+ isMultiAttachmentInInlineEditTable,
249
+ attachmentCount: attachmentCount.current,
250
+ insert: true
251
+ });
252
+ attachmentCount.current += fileResponses.length;
253
+ if (filesWithError.current.length === 0) {
254
+ clearFieldErrorMessages(pConn);
256
255
  }
257
256
  }
258
- setToggleUploadBegin(false);
257
+ actionSequencer.deRegisterBlockingAction(contextName).catch(() => { });
259
258
  })
260
259
  .catch(error => {
261
- // eslint-disable-next-line no-console
262
260
  console.log(error);
263
261
  setToggleUploadBegin(false);
264
262
  });
265
- }, [files, filesWithError]);
263
+ }, [files]);
266
264
  useEffect(() => {
267
265
  if (toggleUploadBegin && files.length > 0) {
268
- uploadFiles();
266
+ actionSequencer.registerBlockingAction(contextName).then(() => {
267
+ uploadFiles();
268
+ });
269
269
  }
270
270
  }, [toggleUploadBegin]);
271
271
  useEffect(() => {
272
- if (files.length > 0 && displayMode !== 'DISPLAY_ONLY') {
273
- const currentAttachmentList = getCurrentAttachmentsList(getAttachmentKey(valueRef), pConn.getContextName());
274
- // block duplicate files to redux store when added 1 after another to prevent multiple duplicates being added to the case on submit
275
- const tempFiles = files.filter(f => currentAttachmentList.findIndex(fr => fr.ID === f.ID) === -1 && !f.inProgress && f.responseProps);
276
- const updatedAttList = [...currentAttachmentList, ...tempFiles];
277
- updateAttachmentState(pConn, getAttachmentKey(valueRef), updatedAttList);
278
- }
279
- }, [files]);
280
- useEffect(() => {
281
- if (filesWithError.length === 0) {
282
- clearFieldErrorMessages();
272
+ if (filesWithError.current.length === 0) {
273
+ clearFieldErrorMessages(pConn);
283
274
  }
284
275
  }, [filesWithError]);
285
- useEffect(() => {
286
- let tempUploadedFiles = getCurrentAttachmentsList(getAttachmentKey(valueRef), pConn.getContextName());
287
- tempUploadedFiles = tempUploadedFiles.filter(f => f.label === valueRef);
288
- setFiles(current => {
289
- return [
290
- ...current.map(f => {
291
- return f.responseProps.pzInsKey && !f.responseProps.pzInsKey.includes('temp')
292
- ? {
293
- ...f,
294
- props: {
295
- ...f.props,
296
- onDelete: () => deleteFile(f)
297
- }
298
- }
299
- : { ...f };
300
- }),
301
- ...tempUploadedFiles
302
- ];
276
+ const memoizedAttachments = useDeepMemo(() => {
277
+ return attachments;
278
+ }, [attachments]);
279
+ // Prepares new structure as per Cosmos component
280
+ const transformAttachments = () => {
281
+ const transformedFiles = [...attachments];
282
+ let deleteIndex = -1;
283
+ transformedFiles.forEach(attachment => {
284
+ attachment.props.id = attachment.responseProps.ID;
285
+ attachment.props.format = attachment.props.name.split('.').pop();
286
+ if (attachment.props.error) {
287
+ attachment.responseProps.deleteIndex = deleteIndex;
288
+ }
289
+ else {
290
+ deleteIndex += 1;
291
+ attachment.responseProps.deleteIndex = deleteIndex;
292
+ }
293
+ if (attachment.props.thumbnail) {
294
+ thumbnailURLs.current.push(attachment.props.thumbnail);
295
+ }
303
296
  });
304
- PCore.getPubSubUtils().subscribe(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION, resetAttachmentStoredState, caseID);
297
+ return transformedFiles;
298
+ };
299
+ useEffect(() => {
300
+ const caseID = PCore.getStoreValue(`.${getMappedValue('pyID')}`, PCore.getResolvedConstantValue('caseInfo.content'), contextName);
301
+ if (displayMode !== 'DISPLAY_ONLY') {
302
+ PCore.getPubSubUtils().subscribe(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION, () => {
303
+ overrideLocalState.current = true;
304
+ }, caseID);
305
+ }
306
+ // When component mounts, only set local files state from redux.
307
+ const serverFiles = transformAttachments();
308
+ setFiles(serverFiles);
309
+ filesWithError.current = serverFiles.filter(file => file.props.error);
305
310
  return () => {
306
- PCore.getPubSubUtils().unsubscribe(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION, caseID);
311
+ if (displayMode !== 'DISPLAY_ONLY') {
312
+ PCore.getPubSubUtils().unsubscribe(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION, caseID);
313
+ }
307
314
  };
308
315
  }, []);
316
+ useEffect(() => {
317
+ if (overrideLocalState.current) {
318
+ const serverFiles = transformAttachments();
319
+ overrideLocalState.current = false;
320
+ attachmentCount.current = attachments.length;
321
+ filesWithError.current = [];
322
+ setFiles(serverFiles);
323
+ }
324
+ else {
325
+ // Determine whether refresh call has overridden any error files in redux, push error files back to redux from local state to perform client side validation during assignment submit
326
+ const errorFiles = attachments.filter(attachment => attachment.props.error);
327
+ if (errorFiles.length === 0 && filesWithError.current.length > 0) {
328
+ // Check if local file state contains error files and push those to redux
329
+ const uniqueKey = getMappedValue('pzInsKey');
330
+ const transformedErrorFiles = filesWithError.current.map(errorFile => {
331
+ const filename = errorFile.props.name;
332
+ return {
333
+ [uniqueKey]: errorFile.props.id,
334
+ FileName: filename,
335
+ Category: '',
336
+ FileExtension: filename.split('.').pop() ?? filename,
337
+ error: errorFile.props.error || null
338
+ };
339
+ });
340
+ let key = '';
341
+ let updatedAttachments = [];
342
+ if (allowMultiple || isOldAttachment) {
343
+ key = isOldAttachment ? `${valueRef}.pxResults` : valueRef;
344
+ const existingAttachments = PCore.getStoreValue(`.${key}`, pConn.getPageReference(), pConn.getContextName()) || [];
345
+ updatedAttachments = [...existingAttachments, ...transformedErrorFiles];
346
+ }
347
+ else {
348
+ key = valueRef;
349
+ updatedAttachments = transformedErrorFiles[0];
350
+ }
351
+ PCore.getStateUtils().updateState(pConn.getContextName(), key, updatedAttachments, {
352
+ pageReference: pConn.getPageReference(),
353
+ isArrayDeepMerge: false,
354
+ removePropertyFromChangedList: true
355
+ });
356
+ }
357
+ }
358
+ }, [memoizedAttachments]);
309
359
  const handleClick = event => {
310
360
  setAnchorEl(event.currentTarget);
311
361
  };
312
362
  const handleClose = () => {
313
363
  setAnchorEl(null);
314
364
  };
315
- const content = (_jsx("div", { style: { marginBottom: '8px' }, children: _jsxs("div", { className: `${disabled ? 'file-disabled' : ''} ${validatemessage === '' ? 'file-div' : 'file-div-error'}`, children: [_jsx("div", { hidden: true, id: 'attachment-ID', children: valueRef }), _jsxs("label", { htmlFor: valueRef, children: [_jsx("input", { style: { display: 'none' }, id: valueRef, name: 'upload-photo', type: 'file', multiple: allowMultiple === 'true', required: required, disabled: disabled, onChange: onFileAdded }), _jsx(Button, { style: { textTransform: 'none' }, variant: 'outlined', color: 'primary', component: 'span', children: allowMultiple === 'true'
365
+ const content = (_jsx("div", { style: { marginBottom: '8px' }, children: _jsxs("div", { className: `${disabled ? 'file-disabled' : ''} ${validatemessage === '' ? 'file-div' : 'file-div-error'}`, children: [_jsx("div", { hidden: true, id: 'attachment-ID', children: valueRef }), _jsxs("label", { htmlFor: valueRef, children: [_jsx("input", { style: { display: 'none' }, id: valueRef, name: 'upload-photo', type: 'file', multiple: allowMultiple, required: required, disabled: disabled, onChange: onFileAdded }), _jsx(Button, { style: { textTransform: 'none' }, variant: 'outlined', color: 'primary', component: 'span', children: allowMultiple
316
366
  ? uploadMultipleFilesLabel === 'file_upload_text_multiple'
317
367
  ? 'Choose files'
318
368
  : uploadMultipleFilesLabel
@@ -322,8 +372,11 @@ export default function Attachment(props) {
322
372
  const fileDisplay = (_jsx("div", { children: files &&
323
373
  files.length > 0 &&
324
374
  files.map((item, index) => {
325
- return (_jsxs("div", { className: 'psdk-utility-card', children: [_jsxs("div", { className: 'psdk-utility-card-icon', children: [!item.inProgress && _jsx("img", { className: 'psdk-utility-card-svg-icon', src: srcImg }), item.inProgress && (_jsx("div", { children: _jsx(CircularProgress, {}) }))] }), _jsxs("div", { className: 'psdk-utility-card-main', children: [_jsx("div", { className: 'psdk-utility-card-main-primary-label', children: item.props.name }), item.props.meta && _jsx("div", { style: { color: item.props.error ? 'red' : undefined }, children: item.props.meta })] }), _jsxs("div", { className: 'psdk-utility-action', children: [item.ID && (_jsx("button", { type: 'button', className: 'psdk-utility-button', "aria-label": 'Delete Attachment', onClick: () => deleteFile(item), children: _jsx("img", { className: 'psdk-utility-card-action-svg-icon', src: deleteIcon }) })), !item.ID && (_jsxs("div", { children: [_jsx(IconButton, { id: 'setting-button', "aria-controls": open ? 'file-menu' : undefined, "aria-expanded": open ? 'true' : undefined, "aria-haspopup": 'true', onClick: handleClick, size: 'large', children: _jsx(MoreVertIcon, {}) }), _jsxs(Menu, { style: { marginTop: '3rem' }, id: 'file-menu', anchorEl: anchorEl, keepMounted: true, open: Boolean(anchorEl), onClose: handleClose, children: [_jsx(MenuItem, { style: { fontSize: '14px' }, onClick: () => downloadFile(item.responseProps ? item.responseProps : {}), children: "Download" }, 'download'), _jsx(MenuItem, { style: { fontSize: '14px' }, onClick: () => deleteFile(item), children: "Delete" }, 'delete')] })] }))] })] }, index));
375
+ return (_jsxs("div", { className: 'psdk-utility-card', children: [_jsxs("div", { className: 'psdk-utility-card-icon', children: [!item.inProgress && _jsx("img", { className: 'psdk-utility-card-svg-icon', src: srcImg }), item.inProgress && (_jsx("div", { children: _jsx(CircularProgress, {}) }))] }), _jsxs("div", { className: 'psdk-utility-card-main', children: [_jsx("div", { className: 'psdk-utility-card-main-primary-label', children: item.props.name }), item.props.meta && _jsx("div", { style: { color: item.props.error ? 'red' : undefined }, children: item.props.meta })] }), _jsxs("div", { className: 'psdk-utility-action', children: [item.ID && (_jsx("button", { type: 'button', className: 'psdk-utility-button', "aria-label": 'Delete Attachment', onClick: () => deleteFile(item, index), children: _jsx("img", { className: 'psdk-utility-card-action-svg-icon', src: deleteIcon }) })), !item.ID && (_jsxs("div", { children: [_jsx(IconButton, { id: 'setting-button', "aria-controls": open ? 'file-menu' : undefined, "aria-expanded": open ? 'true' : undefined, "aria-haspopup": 'true', onClick: handleClick, size: 'large', children: _jsx(MoreVertIcon, {}) }), _jsxs(Menu, { style: { marginTop: '3rem' }, id: 'file-menu', anchorEl: anchorEl, keepMounted: true, open: Boolean(anchorEl), onClose: handleClose, children: [_jsx(MenuItem, { style: { fontSize: '14px' }, onClick: () => {
376
+ setAnchorEl(null);
377
+ onFileDownload(item.responseProps ? item.responseProps : {});
378
+ }, children: "Download" }, 'download'), _jsx(MenuItem, { style: { fontSize: '14px' }, onClick: () => deleteFile(item, index), children: "Delete" }, 'delete')] })] }))] })] }, index));
326
379
  }) }));
327
- return (_jsxs("div", { className: 'file-upload-container', children: [_jsx("span", { className: `label ${required ? 'file-label' : ''}`, children: label }), ((files.length === 0 && allowMultiple !== 'true') || allowMultiple === 'true') && _jsx("section", { children: content }), validatemessage !== '' ? _jsx("span", { className: 'file-error', children: validatemessage }) : _jsx("span", { style: { fontSize: '14px' }, children: helperText }), files && files.length > 0 && _jsx("section", { children: fileDisplay })] }));
380
+ return (_jsxs("div", { className: 'file-upload-container', children: [_jsx("span", { className: `label ${required ? 'file-label' : ''}`, children: label }), ((files.length === 0 && !allowMultiple) || allowMultiple) && _jsx("section", { children: content }), validatemessage !== '' ? _jsx("span", { className: 'file-error', children: validatemessage }) : _jsx("span", { style: { fontSize: '14px' }, children: helperText }), files && files.length > 0 && _jsx("section", { children: fileDisplay })] }));
328
381
  }
329
382
  //# sourceMappingURL=Attachment.js.map