@pega/react-sdk-components 0.24.4 → 0.25.2

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 (544) 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.js.map +1 -1
  5. package/lib/bridge/react_pconnect.d.ts.map +1 -1
  6. package/lib/bridge/react_pconnect.js +2 -2
  7. package/lib/bridge/react_pconnect.js.map +1 -1
  8. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js +1 -1
  9. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.map +1 -1
  10. package/lib/components/designSystemExtension/Banner/Banner.js +1 -1
  11. package/lib/components/designSystemExtension/Banner/Banner.js.map +1 -1
  12. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -2
  13. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
  14. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +51 -33
  15. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
  16. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +4 -4
  17. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
  18. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts +1 -1
  19. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
  20. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +4 -4
  21. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
  22. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js +4 -4
  23. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
  24. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +6 -6
  25. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
  26. package/lib/components/designSystemExtension/Operator/Operator.d.ts +1 -1
  27. package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
  28. package/lib/components/designSystemExtension/Operator/Operator.js +14 -10
  29. package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
  30. package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +1 -1
  31. package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
  32. package/lib/components/designSystemExtension/Pulse/Pulse.js +2 -2
  33. package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
  34. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -1
  35. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +4 -3
  36. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -1
  37. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js +1 -1
  38. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
  39. package/lib/components/field/AutoComplete/AutoComplete.d.ts +1 -1
  40. package/lib/components/field/AutoComplete/AutoComplete.d.ts.map +1 -1
  41. package/lib/components/field/AutoComplete/AutoComplete.js +4 -4
  42. package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
  43. package/lib/components/field/CancelAlert/CancelAlert.d.ts +1 -1
  44. package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
  45. package/lib/components/field/CancelAlert/CancelAlert.js +4 -7
  46. package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
  47. package/lib/components/field/Checkbox/Checkbox.d.ts +1 -1
  48. package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
  49. package/lib/components/field/Checkbox/Checkbox.js +4 -4
  50. package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
  51. package/lib/components/field/Currency/Currency.d.ts +1 -1
  52. package/lib/components/field/Currency/Currency.d.ts.map +1 -1
  53. package/lib/components/field/Currency/Currency.js +10 -9
  54. package/lib/components/field/Currency/Currency.js.map +1 -1
  55. package/lib/components/field/Currency/currency-utils.d.ts.map +1 -1
  56. package/lib/components/field/Currency/currency-utils.js.map +1 -1
  57. package/lib/components/field/Date/Date.d.ts +1 -1
  58. package/lib/components/field/Date/Date.d.ts.map +1 -1
  59. package/lib/components/field/Date/Date.js +22 -13
  60. package/lib/components/field/Date/Date.js.map +1 -1
  61. package/lib/components/field/DateTime/DateTime.d.ts +1 -1
  62. package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
  63. package/lib/components/field/DateTime/DateTime.js +35 -9
  64. package/lib/components/field/DateTime/DateTime.js.map +1 -1
  65. package/lib/components/field/Decimal/Decimal.d.ts +1 -1
  66. package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
  67. package/lib/components/field/Decimal/Decimal.js +9 -8
  68. package/lib/components/field/Decimal/Decimal.js.map +1 -1
  69. package/lib/components/field/Dropdown/Dropdown.d.ts +1 -1
  70. package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
  71. package/lib/components/field/Dropdown/Dropdown.js +22 -15
  72. package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
  73. package/lib/components/field/Email/Email.d.ts +1 -1
  74. package/lib/components/field/Email/Email.d.ts.map +1 -1
  75. package/lib/components/field/Email/Email.js +26 -11
  76. package/lib/components/field/Email/Email.js.map +1 -1
  77. package/lib/components/field/Group/Group.d.ts +2 -2
  78. package/lib/components/field/Group/Group.d.ts.map +1 -1
  79. package/lib/components/field/Group/Group.js +2 -2
  80. package/lib/components/field/Group/Group.js.map +1 -1
  81. package/lib/components/field/Integer/Integer.d.ts +1 -1
  82. package/lib/components/field/Integer/Integer.d.ts.map +1 -1
  83. package/lib/components/field/Integer/Integer.js +20 -10
  84. package/lib/components/field/Integer/Integer.js.map +1 -1
  85. package/lib/components/field/Multiselect/Multiselect.d.ts.map +1 -1
  86. package/lib/components/field/Multiselect/Multiselect.js +12 -8
  87. package/lib/components/field/Multiselect/Multiselect.js.map +1 -1
  88. package/lib/components/field/Multiselect/utils.d.ts +2 -1
  89. package/lib/components/field/Multiselect/utils.d.ts.map +1 -1
  90. package/lib/components/field/Multiselect/utils.js +1 -1
  91. package/lib/components/field/Multiselect/utils.js.map +1 -1
  92. package/lib/components/field/Percentage/Percentage.d.ts +1 -1
  93. package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
  94. package/lib/components/field/Percentage/Percentage.js +9 -9
  95. package/lib/components/field/Percentage/Percentage.js.map +1 -1
  96. package/lib/components/field/Phone/Phone.d.ts +1 -1
  97. package/lib/components/field/Phone/Phone.d.ts.map +1 -1
  98. package/lib/components/field/Phone/Phone.js +8 -6
  99. package/lib/components/field/Phone/Phone.js.map +1 -1
  100. package/lib/components/field/RadioButtons/RadioButtons.d.ts +1 -1
  101. package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
  102. package/lib/components/field/RadioButtons/RadioButtons.js +6 -12
  103. package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
  104. package/lib/components/field/RichText/RichText.d.ts +1 -1
  105. package/lib/components/field/RichText/RichText.d.ts.map +1 -1
  106. package/lib/components/field/RichText/RichText.js +1 -1
  107. package/lib/components/field/RichText/RichText.js.map +1 -1
  108. package/lib/components/field/ScalarList/ScalarList.d.ts +1 -1
  109. package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -1
  110. package/lib/components/field/ScalarList/ScalarList.js +5 -5
  111. package/lib/components/field/ScalarList/ScalarList.js.map +1 -1
  112. package/lib/components/field/SemanticLink/SemanticLink.d.ts +1 -1
  113. package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
  114. package/lib/components/field/SemanticLink/SemanticLink.js +4 -4
  115. package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
  116. package/lib/components/field/SemanticLink/utils.js.map +1 -1
  117. package/lib/components/field/TextArea/TextArea.d.ts +1 -1
  118. package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
  119. package/lib/components/field/TextArea/TextArea.js +23 -8
  120. package/lib/components/field/TextArea/TextArea.js.map +1 -1
  121. package/lib/components/field/TextContent/TextContent.d.ts +1 -1
  122. package/lib/components/field/TextContent/TextContent.d.ts.map +1 -1
  123. package/lib/components/field/TextContent/TextContent.js +1 -1
  124. package/lib/components/field/TextContent/TextContent.js.map +1 -1
  125. package/lib/components/field/TextInput/TextInput.d.ts +1 -1
  126. package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
  127. package/lib/components/field/TextInput/TextInput.js +6 -7
  128. package/lib/components/field/TextInput/TextInput.js.map +1 -1
  129. package/lib/components/field/Time/Time.d.ts +1 -1
  130. package/lib/components/field/Time/Time.d.ts.map +1 -1
  131. package/lib/components/field/Time/Time.js +32 -12
  132. package/lib/components/field/Time/Time.js.map +1 -1
  133. package/lib/components/field/URL/URL.d.ts +1 -1
  134. package/lib/components/field/URL/URL.d.ts.map +1 -1
  135. package/lib/components/field/URL/URL.js +21 -7
  136. package/lib/components/field/URL/URL.js.map +1 -1
  137. package/lib/components/field/UserReference/UserReference.d.ts +1 -2
  138. package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
  139. package/lib/components/field/UserReference/UserReference.js +3 -5
  140. package/lib/components/field/UserReference/UserReference.js.map +1 -1
  141. package/lib/components/field/UserReference/UserReferenceUtils.d.ts.map +1 -1
  142. package/lib/components/field/UserReference/UserReferenceUtils.js.map +1 -1
  143. package/lib/components/helpers/attachmentHelpers.d.ts.map +1 -1
  144. package/lib/components/helpers/attachmentHelpers.js.map +1 -1
  145. package/lib/components/helpers/case-utils.js.map +1 -1
  146. package/lib/components/helpers/common-utils.d.ts +7 -0
  147. package/lib/components/helpers/common-utils.d.ts.map +1 -1
  148. package/lib/components/helpers/common-utils.js +21 -1
  149. package/lib/components/helpers/common-utils.js.map +1 -1
  150. package/lib/components/helpers/data_page.d.ts.map +1 -1
  151. package/lib/components/helpers/data_page.js.map +1 -1
  152. package/lib/components/helpers/date-format-utils.d.ts.map +1 -1
  153. package/lib/components/helpers/event-utils.d.ts.map +1 -1
  154. package/lib/components/helpers/event-utils.js.map +1 -1
  155. package/lib/components/helpers/field-group-utils.d.ts +1 -1
  156. package/lib/components/helpers/field-group-utils.d.ts.map +1 -1
  157. package/lib/components/helpers/field-group-utils.js +2 -2
  158. package/lib/components/helpers/field-group-utils.js.map +1 -1
  159. package/lib/components/helpers/formatters/Boolean.js.map +1 -1
  160. package/lib/components/helpers/formatters/Currency.d.ts.map +1 -1
  161. package/lib/components/helpers/formatters/Currency.js +12 -15
  162. package/lib/components/helpers/formatters/Currency.js.map +1 -1
  163. package/lib/components/helpers/formatters/Date.js.map +1 -1
  164. package/lib/components/helpers/formatters/common.d.ts +2 -2
  165. package/lib/components/helpers/formatters/common.d.ts.map +1 -1
  166. package/lib/components/helpers/formatters/common.js +2 -1
  167. package/lib/components/helpers/formatters/common.js.map +1 -1
  168. package/lib/components/helpers/formatters/index.d.ts.map +1 -1
  169. package/lib/components/helpers/formatters/index.js +2 -3
  170. package/lib/components/helpers/formatters/index.js.map +1 -1
  171. package/lib/components/helpers/instructions-utils.d.ts.map +1 -1
  172. package/lib/components/helpers/reactContextHelpers.d.ts +0 -1
  173. package/lib/components/helpers/reactContextHelpers.d.ts.map +1 -1
  174. package/lib/components/helpers/simpleTableHelpers.d.ts +1 -1
  175. package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
  176. package/lib/components/helpers/simpleTableHelpers.js +1 -1
  177. package/lib/components/helpers/simpleTableHelpers.js.map +1 -1
  178. package/lib/components/helpers/state-utils.d.ts.map +1 -1
  179. package/lib/components/helpers/state-utils.js.map +1 -1
  180. package/lib/components/helpers/template-utils.js.map +1 -1
  181. package/lib/components/helpers/utils.js.map +1 -1
  182. package/lib/components/infra/ActionButtons/ActionButtons.js +3 -3
  183. package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
  184. package/lib/components/infra/Assignment/Assignment.d.ts +2 -2
  185. package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
  186. package/lib/components/infra/Assignment/Assignment.js +12 -14
  187. package/lib/components/infra/Assignment/Assignment.js.map +1 -1
  188. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +2 -2
  189. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
  190. package/lib/components/infra/AssignmentCard/AssignmentCard.js.map +1 -1
  191. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +1 -2
  192. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
  193. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +12 -22
  194. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
  195. package/lib/components/infra/Containers/FlowContainer/helpers.d.ts.map +1 -1
  196. package/lib/components/infra/Containers/FlowContainer/helpers.js +1 -5
  197. package/lib/components/infra/Containers/FlowContainer/helpers.js.map +1 -1
  198. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts +1 -1
  199. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts.map +1 -1
  200. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js +9 -4
  201. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js.map +1 -1
  202. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +1 -1
  203. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
  204. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +7 -7
  205. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
  206. package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts +0 -1
  207. package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts.map +1 -1
  208. package/lib/components/infra/Containers/SimpleView/helper.d.ts +0 -1
  209. package/lib/components/infra/Containers/SimpleView/helper.d.ts.map +1 -1
  210. package/lib/components/infra/Containers/SimpleView/helper.js +1 -1
  211. package/lib/components/infra/Containers/SimpleView/helper.js.map +1 -1
  212. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +1 -1
  213. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
  214. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +1 -1
  215. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
  216. package/lib/components/infra/Containers/container-helpers.d.ts +2 -0
  217. package/lib/components/infra/Containers/container-helpers.d.ts.map +1 -0
  218. package/lib/components/infra/Containers/{helpers.js → container-helpers.js} +1 -1
  219. package/lib/components/infra/Containers/container-helpers.js.map +1 -0
  220. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +2 -2
  221. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
  222. package/lib/components/infra/DashboardFilter/DashboardFilter.js +4 -6
  223. package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
  224. package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -1
  225. package/lib/components/infra/DashboardFilter/filterUtils.js +3 -5
  226. package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
  227. package/lib/components/infra/DeferLoad/DeferLoad.d.ts +2 -1
  228. package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
  229. package/lib/components/infra/DeferLoad/DeferLoad.js +8 -9
  230. package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
  231. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +1 -1
  232. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
  233. package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
  234. package/lib/components/infra/MultiStep/MultiStep.d.ts +3 -3
  235. package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
  236. package/lib/components/infra/MultiStep/MultiStep.js +13 -12
  237. package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
  238. package/lib/components/infra/NavBar/NavBar.css +1 -0
  239. package/lib/components/infra/NavBar/NavBar.d.ts +1 -1
  240. package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
  241. package/lib/components/infra/NavBar/NavBar.js +24 -16
  242. package/lib/components/infra/NavBar/NavBar.js.map +1 -1
  243. package/lib/components/infra/Reference/Reference.d.ts +1 -1
  244. package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
  245. package/lib/components/infra/Reference/Reference.js.map +1 -1
  246. package/lib/components/infra/Region/Region.d.ts +1 -1
  247. package/lib/components/infra/Region/Region.d.ts.map +1 -1
  248. package/lib/components/infra/Region/Region.js.map +1 -1
  249. package/lib/components/infra/RootContainer/RootContainer.d.ts +2 -2
  250. package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
  251. package/lib/components/infra/RootContainer/RootContainer.js +5 -6
  252. package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
  253. package/lib/components/infra/Stages/Stages.d.ts +1 -1
  254. package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
  255. package/lib/components/infra/Stages/Stages.js +4 -4
  256. package/lib/components/infra/Stages/Stages.js.map +1 -1
  257. package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.d.ts.map +1 -1
  258. package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js +4 -3
  259. package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js.map +1 -1
  260. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +3 -3
  261. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
  262. package/lib/components/infra/View/View.d.ts +3 -2
  263. package/lib/components/infra/View/View.d.ts.map +1 -1
  264. package/lib/components/infra/View/View.js +32 -2
  265. package/lib/components/infra/View/View.js.map +1 -1
  266. package/lib/components/template/AdvancedSearch/AdvancedSearch.d.ts +2 -0
  267. package/lib/components/template/AdvancedSearch/AdvancedSearch.d.ts.map +1 -0
  268. package/lib/components/template/AdvancedSearch/AdvancedSearch.js +69 -0
  269. package/lib/components/template/AdvancedSearch/AdvancedSearch.js.map +1 -0
  270. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.d.ts +24 -0
  271. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.d.ts.map +1 -0
  272. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.js +32 -0
  273. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.js.map +1 -0
  274. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.d.ts +3 -0
  275. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.d.ts.map +1 -0
  276. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.js +181 -0
  277. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.js.map +1 -0
  278. package/lib/components/template/AdvancedSearch/SearchGroups/hooks.d.ts +10 -0
  279. package/lib/components/template/AdvancedSearch/SearchGroups/hooks.d.ts.map +1 -0
  280. package/lib/components/template/AdvancedSearch/SearchGroups/hooks.js +26 -0
  281. package/lib/components/template/AdvancedSearch/SearchGroups/hooks.js.map +1 -0
  282. package/lib/components/template/AdvancedSearch/SearchGroups/index.d.ts +2 -0
  283. package/lib/components/template/AdvancedSearch/SearchGroups/index.d.ts.map +1 -0
  284. package/lib/components/template/AdvancedSearch/SearchGroups/index.js +2 -0
  285. package/lib/components/template/AdvancedSearch/SearchGroups/index.js.map +1 -0
  286. package/lib/components/template/AdvancedSearch/SearchGroups/utils.d.ts +16 -0
  287. package/lib/components/template/AdvancedSearch/SearchGroups/utils.d.ts.map +1 -0
  288. package/lib/components/template/AdvancedSearch/SearchGroups/utils.js +22 -0
  289. package/lib/components/template/AdvancedSearch/SearchGroups/utils.js.map +1 -0
  290. package/lib/components/template/AdvancedSearch/TemplateContext.d.ts +10 -0
  291. package/lib/components/template/AdvancedSearch/TemplateContext.d.ts.map +1 -0
  292. package/lib/components/template/AdvancedSearch/TemplateContext.js +11 -0
  293. package/lib/components/template/AdvancedSearch/TemplateContext.js.map +1 -0
  294. package/lib/components/template/AdvancedSearch/index.d.ts +2 -0
  295. package/lib/components/template/AdvancedSearch/index.d.ts.map +1 -0
  296. package/lib/components/template/AdvancedSearch/index.js +2 -0
  297. package/lib/components/template/AdvancedSearch/index.js.map +1 -0
  298. package/lib/components/template/AppShell/AppShell.d.ts +4 -2
  299. package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
  300. package/lib/components/template/AppShell/AppShell.js +33 -10
  301. package/lib/components/template/AppShell/AppShell.js.map +1 -1
  302. package/lib/components/template/BannerPage/BannerPage.d.ts +2 -2
  303. package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
  304. package/lib/components/template/BannerPage/BannerPage.js.map +1 -1
  305. package/lib/components/template/CaseSummary/CaseSummary.d.ts +2 -2
  306. package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
  307. package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
  308. package/lib/components/template/CaseView/CaseView.d.ts +3 -2
  309. package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
  310. package/lib/components/template/CaseView/CaseView.js +7 -7
  311. package/lib/components/template/CaseView/CaseView.js.map +1 -1
  312. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +1 -1
  313. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
  314. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +7 -7
  315. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
  316. package/lib/components/template/Confirmation/Confirmation.d.ts +2 -2
  317. package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
  318. package/lib/components/template/Confirmation/Confirmation.js +3 -2
  319. package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
  320. package/lib/components/template/DataReference/DataReference.d.ts +9 -2
  321. package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
  322. package/lib/components/template/DataReference/DataReference.js +245 -81
  323. package/lib/components/template/DataReference/DataReference.js.map +1 -1
  324. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.d.ts +8 -0
  325. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.d.ts.map +1 -0
  326. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.js +9 -0
  327. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.js.map +1 -0
  328. package/lib/components/template/DataReference/SearchForm.d.ts +3 -0
  329. package/lib/components/template/DataReference/SearchForm.d.ts.map +1 -0
  330. package/lib/components/template/DataReference/SearchForm.js +86 -0
  331. package/lib/components/template/DataReference/SearchForm.js.map +1 -0
  332. package/lib/components/template/DataReference/utils.d.ts +15 -0
  333. package/lib/components/template/DataReference/utils.d.ts.map +1 -0
  334. package/lib/components/template/DataReference/utils.js +75 -0
  335. package/lib/components/template/DataReference/utils.js.map +1 -0
  336. package/lib/components/template/DefaultForm/DefaultForm.d.ts +2 -2
  337. package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
  338. package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
  339. package/lib/components/template/DefaultForm/utils/index.d.ts.map +1 -1
  340. package/lib/components/template/DefaultForm/utils/index.js +1 -2
  341. package/lib/components/template/DefaultForm/utils/index.js.map +1 -1
  342. package/lib/components/template/Details/Details/Details.d.ts +1 -1
  343. package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
  344. package/lib/components/template/Details/Details/Details.js +2 -2
  345. package/lib/components/template/Details/Details/Details.js.map +1 -1
  346. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +2 -2
  347. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
  348. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js +3 -3
  349. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
  350. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +1 -1
  351. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
  352. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +2 -2
  353. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
  354. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +1 -1
  355. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
  356. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +2 -2
  357. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
  358. package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts +1 -1
  359. package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts.map +1 -1
  360. package/lib/components/template/Details/DynamicTabs/DynamicTabs.js +4 -4
  361. package/lib/components/template/Details/DynamicTabs/DynamicTabs.js.map +1 -1
  362. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +1 -1
  363. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
  364. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +9 -5
  365. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
  366. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +2 -2
  367. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
  368. package/lib/components/template/InlineDashboard/InlineDashboard.js +2 -2
  369. package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
  370. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +2 -2
  371. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
  372. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js.map +1 -1
  373. package/lib/components/template/ListPage/ListPage.d.ts +1 -1
  374. package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
  375. package/lib/components/template/ListPage/ListPage.js.map +1 -1
  376. package/lib/components/template/ListView/DefaultViewMeta.js.map +1 -1
  377. package/lib/components/template/ListView/ListView.d.ts +4 -1
  378. package/lib/components/template/ListView/ListView.d.ts.map +1 -1
  379. package/lib/components/template/ListView/ListView.js +151 -66
  380. package/lib/components/template/ListView/ListView.js.map +1 -1
  381. package/lib/components/template/ListView/hooks.js.map +1 -1
  382. package/lib/components/template/ListView/utils.d.ts.map +1 -1
  383. package/lib/components/template/ListView/utils.js +29 -6
  384. package/lib/components/template/ListView/utils.js.map +1 -1
  385. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +1 -1
  386. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
  387. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -1
  388. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +2 -2
  389. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -1
  390. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js.map +1 -1
  391. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +1 -1
  392. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
  393. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +2 -2
  394. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
  395. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +2 -2
  396. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -1
  397. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js.map +1 -1
  398. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +2 -2
  399. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
  400. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -1
  401. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +2 -2
  402. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
  403. package/lib/components/template/OneColumn/OneColumn/OneColumn.js +2 -2
  404. package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
  405. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +1 -1
  406. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
  407. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -1
  408. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +2 -2
  409. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
  410. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js.map +1 -1
  411. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +1 -1
  412. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
  413. package/lib/components/template/PromotedFilters/PromotedFilters.js +1 -2
  414. package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
  415. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts +1 -1
  416. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
  417. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js +0 -2
  418. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
  419. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +4 -2
  420. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
  421. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +68 -45
  422. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
  423. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +1 -1
  424. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
  425. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js +2 -4
  426. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
  427. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +1 -1
  428. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
  429. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
  430. package/lib/components/template/SubTabs/SubTabs.d.ts +2 -2
  431. package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
  432. package/lib/components/template/SubTabs/SubTabs.js +2 -2
  433. package/lib/components/template/SubTabs/SubTabs.js.map +1 -1
  434. package/lib/components/template/SubTabs/tabUtils.d.ts +10 -0
  435. package/lib/components/template/SubTabs/tabUtils.d.ts.map +1 -1
  436. package/lib/components/template/SubTabs/tabUtils.js +102 -1
  437. package/lib/components/template/SubTabs/tabUtils.js.map +1 -1
  438. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts +2 -2
  439. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
  440. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +3 -3
  441. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
  442. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +1 -1
  443. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
  444. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -1
  445. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +2 -2
  446. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
  447. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +3 -3
  448. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
  449. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +2 -2
  450. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
  451. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js.map +1 -1
  452. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +1 -1
  453. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
  454. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +2 -2
  455. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
  456. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +2 -2
  457. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -1
  458. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js.map +1 -1
  459. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +2 -2
  460. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
  461. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js.map +1 -1
  462. package/lib/components/template/WssNavBar/WssNavBar.d.ts +1 -1
  463. package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -1
  464. package/lib/components/template/WssNavBar/WssNavBar.js +10 -10
  465. package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
  466. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts +1 -1
  467. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
  468. package/lib/components/widget/AppAnnouncement/AppAnnouncement.js +2 -2
  469. package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
  470. package/lib/components/widget/Attachment/Attachment.css +1 -0
  471. package/lib/components/widget/Attachment/Attachment.d.ts +1 -1
  472. package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
  473. package/lib/components/widget/Attachment/Attachment.js +7 -10
  474. package/lib/components/widget/Attachment/Attachment.js.map +1 -1
  475. package/lib/components/widget/CaseHistory/CaseHistory.d.ts +1 -1
  476. package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
  477. package/lib/components/widget/CaseHistory/CaseHistory.js +10 -9
  478. package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
  479. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +1 -1
  480. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts.map +1 -1
  481. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js +1 -1
  482. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
  483. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +1 -1
  484. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
  485. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +10 -10
  486. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
  487. package/lib/components/widget/Followers/Followers.d.ts +2 -2
  488. package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
  489. package/lib/components/widget/Followers/Followers.js +2 -2
  490. package/lib/components/widget/Followers/Followers.js.map +1 -1
  491. package/lib/components/widget/QuickCreate/QuickCreate.d.ts +1 -1
  492. package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
  493. package/lib/components/widget/QuickCreate/QuickCreate.js +0 -1
  494. package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
  495. package/lib/components/widget/SummaryItem/SummaryItem.d.ts +1 -1
  496. package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
  497. package/lib/components/widget/SummaryItem/SummaryItem.js +3 -3
  498. package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
  499. package/lib/components/widget/SummaryList/SummaryList.d.ts +1 -1
  500. package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
  501. package/lib/components/widget/SummaryList/SummaryList.js.map +1 -1
  502. package/lib/components/widget/ToDo/ToDo.d.ts +1 -1
  503. package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
  504. package/lib/components/widget/ToDo/ToDo.js +60 -17
  505. package/lib/components/widget/ToDo/ToDo.js.map +1 -1
  506. package/lib/doc/KeyReleaseUpdates.md +19 -7
  507. package/lib/hooks/index.d.ts +2 -0
  508. package/lib/hooks/index.d.ts.map +1 -1
  509. package/lib/hooks/index.js +2 -0
  510. package/lib/hooks/index.js.map +1 -1
  511. package/lib/hooks/useAfterInitialEffect.d.ts +1 -1
  512. package/lib/hooks/useAfterInitialEffect.d.ts.map +1 -1
  513. package/lib/hooks/useAfterInitialEffect.js.map +1 -1
  514. package/lib/hooks/useConsolidatedRef.d.ts +1 -1
  515. package/lib/hooks/useConsolidatedRef.d.ts.map +1 -1
  516. package/lib/hooks/useConsolidatedRef.js.map +1 -1
  517. package/lib/hooks/useFocusFirstField.d.ts +7 -0
  518. package/lib/hooks/useFocusFirstField.d.ts.map +1 -0
  519. package/lib/hooks/useFocusFirstField.js +20 -0
  520. package/lib/hooks/useFocusFirstField.js.map +1 -0
  521. package/lib/hooks/useGetTabsCount.d.ts +10 -0
  522. package/lib/hooks/useGetTabsCount.d.ts.map +1 -0
  523. package/lib/hooks/useGetTabsCount.js +166 -0
  524. package/lib/hooks/useGetTabsCount.js.map +1 -0
  525. package/lib/hooks/useIsMount.d.ts +2 -0
  526. package/lib/hooks/useIsMount.d.ts.map +1 -0
  527. package/lib/hooks/useIsMount.js +9 -0
  528. package/lib/hooks/useIsMount.js.map +1 -0
  529. package/lib/hooks/useScrolltoTop.d.ts +7 -0
  530. package/lib/hooks/useScrolltoTop.d.ts.map +1 -0
  531. package/lib/hooks/useScrolltoTop.js +13 -0
  532. package/lib/hooks/useScrolltoTop.js.map +1 -0
  533. package/lib/sdk-pega-component-map.d.ts +109 -103
  534. package/lib/sdk-pega-component-map.d.ts.map +1 -1
  535. package/lib/sdk-pega-component-map.js +9 -3
  536. package/lib/sdk-pega-component-map.js.map +1 -1
  537. package/lib/theme.d.ts +11 -0
  538. package/lib/theme.d.ts.map +1 -0
  539. package/lib/theme.js +31 -0
  540. package/lib/theme.js.map +1 -0
  541. package/package.json +31 -1
  542. package/lib/components/infra/Containers/helpers.d.ts +0 -2
  543. package/lib/components/infra/Containers/helpers.d.ts.map +0 -1
  544. package/lib/components/infra/Containers/helpers.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Attachment.js","sourceRoot":"","sources":["../../../../src/components/widget/Attachment/Attachment.tsx"],"names":[],"mappings":";AAAA,4CAA4C;AAC5C,6CAA6C;AAC7C,sCAAsC;AACtC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACzF,OAAO,YAAY,MAAM,6BAA6B,CAAC;AACvD,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,OAAO,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACnH,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAG5C,OAAO,kBAAkB,CAAC;AAS1B,MAAM,gBAAgB,GAAG,CAAC,IAAI,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,mBAAmB,IAAI,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC;AAE/F,MAAM,yBAAyB,GAAG,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE;IACjD,OAAO,KAAK,CAAC,aAAa,CAAC,IAAI,GAAG,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AEF,OAAO,CACL,eAAK,SAAS,EAAC,uBAAuB,aACpC,eAAM,SAAS,EAAE,SAAS,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,EAAE,YAAG,KAAK,GAAQ,EACvE,CAAC,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,aAAa,KAAK,MAAM,CAAC,IAAI,aAAa,KAAK,MAAM,CAAC,IAAI,4BAAU,OAAO,GAAW,EAC9G,eAAe,KAAK,EAAE,CAAC,CAAC,CAAC,eAAM,SAAS,EAAC,YAAY,YAAE,eAAe,GAAQ,CAAC,CAAC,CAAC,EAAE,EACnF,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,4BAAU,WAAW,GAAW,IAC1D,CACP,CAAC;AACJ,CAAC","sourcesContent":["/* eslint-disable react/jsx-boolean-value */\n/* eslint-disable react/no-array-index-key */\n/* eslint-disable no-nested-ternary */\nimport { useState, useEffect, useCallback } from 'react';\nimport { CircularProgress, IconButton, Menu, MenuItem, Button } from '@material-ui/core';\nimport MoreVertIcon from '@material-ui/icons/MoreVert';\nimport download from 'downloadjs';\n\nimport { buildFilePropsFromResponse, getIconFromFileType, validateMaxSize } from '../../helpers/attachmentHelpers';\nimport { Utils } from '../../helpers/utils';\nimport { PConnFieldProps } from '../../../types/PConnProps';\n\nimport './Attachment.css';\n\ninterface AttachmentProps extends Omit<PConnFieldProps, 'value'> {\n // If any, enter additional props that only exist on this component\n value: any;\n allowMultiple: string;\n extensions: string;\n}\n\nconst getAttachmentKey = (name = '') => (name ? `attachmentsList.${name}` : 'attachmentsList');\n\nconst getCurrentAttachmentsList = (key, context) => {\n return PCore.getStoreValue(`.${key}`, 'context_data', context) || [];\n};\n\nconst updateAttachmentState = (pConn, key, attachments) => {\n PCore.getStateUtils().updateState(pConn.getContextName(), key, attachments, {\n pageReference: 'context_data',\n isArrayDeepMerge: false\n });\n};\n\nexport default function Attachment(props: AttachmentProps) {\n const { value, getPConnect, label, validatemessage, allowMultiple, extensions, displayMode } = props;\n /* this is a temporary fix because required is supposed to be passed as a boolean and NOT as a string */\n let { required, disabled } = props;\n [required, disabled] = [required, disabled].map(prop => prop === true || (typeof prop === 'string' && prop === 'true'));\n const pConn = getPConnect();\n const caseID = PCore.getStoreValue('.pyID', 'caseInfo.content', pConn.getContextName());\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'CosmosFields';\n const uploadMultipleFilesLabel = localizedVal('file_upload_text_multiple', localeCategory);\n const uploadSingleFileLabel = localizedVal('file_upload_text_one', localeCategory);\n let categoryName = '';\n if (value && value.pyCategoryName) {\n categoryName = value.pyCategoryName;\n }\n const deleteIcon = Utils.getImageSrc('trash', Utils.getSDKStaticConentUrl());\n const srcImg = Utils.getImageSrc('document-doc', Utils.getSDKStaticConentUrl());\n let valueRef = (pConn.getStateProps() as any).value;\n valueRef = valueRef.indexOf('.') === 0 ? valueRef.substring(1) : valueRef;\n const [anchorEl, setAnchorEl] = useState(null);\n const open = Boolean(anchorEl);\n const [files, setFiles] = useState<any[]>(() =>\n value?.pxResults && +value.pyCount > 0 ? value.pxResults.map(f => buildFilePropsFromResponse(f)) : []\n );\n const [filesWithError, setFilesWithError] = useState<any[]>([]);\n const [toggleUploadBegin, setToggleUploadBegin] = useState(false);\n\n const resetAttachmentStoredState = () => {\n PCore.getStateUtils().updateState(pConn.getContextName(), getAttachmentKey(valueRef), undefined, {\n pageReference: 'context_data',\n isArrayDeepMerge: false\n });\n };\n\n const fileDownload = (data, fileName, ext) => {\n const fileData = ext ? `${fileName}.${ext}` : fileName;\n download(atob(data), fileData);\n };\n\n const downloadFile = (fileObj: any) => {\n setAnchorEl(null);\n PCore.getAttachmentUtils()\n // @ts-ignore - 3rd parameter \"responseEncoding\" should be optional\n .downloadAttachment(fileObj.pzInsKey, pConn.getContextName())\n .then((content: any) => {\n const extension = fileObj.pyAttachName.split('.').pop();\n fileDownload(content.data, fileObj.pyFileName, extension);\n })\n .catch(() => {});\n };\n\n const deleteFile = useCallback(\n file => {\n setAnchorEl(null);\n let attachmentsList: any[] = [];\n let currentAttachmentList = getCurrentAttachmentsList(getAttachmentKey(valueRef), pConn.getContextName());\n\n // If file to be deleted is the one added in previous stage i.e. for which a file instance is created in server\n // no need to filter currentAttachmentList as we will get another entry of file in redux with delete & label\n // eslint-disable-next-line no-unsafe-optional-chaining\n if (value && value?.pxResults && +value?.pyCount > 0 && file.responseProps && file?.responseProps?.pzInsKey !== 'temp') {\n const updatedAttachments = files.map(f => {\n if (f.responseProps && f.responseProps.pzInsKey === file.responseProps.pzInsKey) {\n return { ...f, delete: true, label: valueRef };\n }\n return f;\n });\n\n // updating the redux store to help form-handler in passing the data to delete the file from server\n updateAttachmentState(pConn, getAttachmentKey(valueRef), [...updatedAttachments]);\n setFiles(current => {\n const newlyAddedFiles = current.filter(f => !!f.ID);\n const filesPostDelete = current.filter(\n f => f.responseProps?.pzInsKey !== 'temp' && f.responseProps?.pzInsKey !== file.responseProps?.pzInsKey\n );\n attachmentsList = [...filesPostDelete, ...newlyAddedFiles];\n return attachmentsList;\n });\n } // if the file being deleted is the added in this stage i.e. whose data is not yet created in server\n else {\n // 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()\n currentAttachmentList = currentAttachmentList.filter(f => f.label !== valueRef);\n setFiles(current => {\n attachmentsList = current.filter(f => f.ID !== file.ID);\n return attachmentsList;\n });\n updateAttachmentState(pConn, getAttachmentKey(valueRef), [...currentAttachmentList, ...attachmentsList]);\n if (file.inProgress) {\n // @ts-ignore - 3rd parameter \"responseEncoding\" should be optional\n PCore.getAttachmentUtils().cancelRequest(file.ID, pConn.getContextName());\n }\n }\n\n setToggleUploadBegin(false);\n setFilesWithError(prevFilesWithError => {\n return prevFilesWithError.filter(f => f.ID !== file.ID);\n });\n },\n [pConn, value, valueRef, filesWithError]\n );\n\n const onUploadProgress = () => {};\n\n const errorHandler = (isFetchCanceled, attachedFile) => {\n return error => {\n if (!isFetchCanceled(error)) {\n let uploadFailMsg = pConn.getLocalizedValue('Something went wrong', '', '');\n if (error.response && error.response.data && error.response.data.errorDetails) {\n uploadFailMsg = pConn.getLocalizedValue(error.response.data.errorDetails[0].localizedValue, '', '');\n }\n setFiles(current => {\n return current.map(f => {\n if (f.ID === attachedFile.ID) {\n f.props.meta = uploadFailMsg;\n f.props.error = true;\n f.props.onDelete = () => deleteFile(f);\n f.props.icon = getIconFromFileType(f.type);\n f.props.name = pConn.getLocalizedValue('Unable to upload file', '', '');\n f.inProgress = false;\n const fieldName = (pConn.getStateProps() as any).value;\n const context = pConn.getContextName();\n // set errors to property to block submit even on errors in file upload\n PCore.getMessageManager().addMessages({\n // @ts-ignore\n messages: [\n {\n type: 'error',\n // @ts-ignore - Type '{ type: string; message: string; }' is not assignable to type 'MessagesConfigObject'.\n message: pConn.getLocalizedValue('Error with one or more files', '', '')\n }\n ],\n property: fieldName,\n pageReference: pConn.getPageReference(),\n context\n });\n delete f.props.progress;\n }\n return f;\n });\n });\n }\n throw error;\n };\n };\n\n const validateFileExtension = (fileObj, allowedExtensions) => {\n if (!allowedExtensions) {\n return true;\n }\n const allowedExtensionList = allowedExtensions\n .toLowerCase()\n .split(',')\n .map(item => item.replaceAll('.', '').trim());\n const extension = fileObj.name.split('.').pop().toLowerCase();\n return allowedExtensionList.includes(extension);\n };\n\n const clearFieldErrorMessages = () => {\n const fieldName = (pConn.getStateProps() as any).value;\n const context = pConn.getContextName();\n // @ts-ignore\n PCore.getMessageManager().clearMessages({\n type: PCore.getConstants().MESSAGES.MESSAGES_TYPE_ERROR,\n property: fieldName,\n pageReference: pConn.getPageReference(),\n context\n });\n };\n\n const onFileAdded = event => {\n let addedFiles = Array.from(event.target.files);\n addedFiles = allowMultiple === 'true' ? addedFiles : [addedFiles[0]];\n const maxAttachmentSize = PCore.getEnvironmentInfo().getMaxAttachmentSize() || '5';\n const tempFilesToBeUploaded = [\n ...addedFiles.map((f: any, index) => {\n f.ID = `${new Date().getTime()}I${index}`;\n f.inProgress = true;\n f.props = {\n type: f.type,\n name: f.name,\n icon: getIconFromFileType(f.type),\n onDelete: () => deleteFile(f)\n };\n if (!validateMaxSize(f, maxAttachmentSize)) {\n f.props.error = true;\n f.props.meta = pConn.getLocalizedValue(`File is too big. Max allowed size is ${maxAttachmentSize}MB.`, '', '');\n } else if (!validateFileExtension(f, extensions)) {\n f.props.error = true;\n f.props.meta = `${pConn.getLocalizedValue('File has invalid extension. Allowed extensions are:', '', '')} ${extensions.replaceAll(\n '.',\n ''\n )}`;\n }\n if (f.props.error) {\n const fieldName = (pConn.getStateProps() as any).value;\n const context = pConn.getContextName();\n PCore.getMessageManager().addMessages({\n // @ts-ignore\n messages: [\n {\n type: 'error',\n // @ts-ignore - Type '{ type: string; message: string; }' is not assignable to type 'MessagesConfigObject'.\n message: pConn.getLocalizedValue('Error with one or more files', '', '')\n }\n ],\n property: fieldName,\n pageReference: pConn.getPageReference(),\n context\n });\n }\n return f;\n })\n ];\n const tempFilesWithError = tempFilesToBeUploaded.filter(f => f.props.error);\n if (tempFilesWithError.length > 0) {\n setFilesWithError(tempFilesWithError);\n }\n setFiles(current => (allowMultiple !== 'true' ? [...tempFilesToBeUploaded] : [...current, ...tempFilesToBeUploaded]));\n setToggleUploadBegin(true);\n };\n\n const uploadFiles = useCallback(() => {\n const filesToBeUploaded = files\n .filter(e => {\n const isFileUploaded = e.props && e.props.progress === 100;\n const fileHasError = e.props && e.props.error;\n const isFileUploadedinLastStep = e.responseProps && e.responseProps.pzInsKey;\n return !isFileUploaded && !fileHasError && !isFileUploadedinLastStep;\n })\n .map(f =>\n window.PCore.getAttachmentUtils().uploadAttachment(\n f,\n () => {\n onUploadProgress();\n },\n isFetchCanceled => {\n return errorHandler(isFetchCanceled, f);\n },\n pConn.getContextName()\n )\n );\n Promise.allSettled(filesToBeUploaded)\n .then((fileResponses: any) => {\n fileResponses = fileResponses.filter(fr => fr.status !== 'rejected'); // in case of deleting an in progress file, promise gets cancelled but still enters then block\n if (fileResponses.length > 0) {\n setFiles(current => {\n const tempFilesUploaded = [...current];\n tempFilesUploaded.forEach(f => {\n const index = fileResponses.findIndex((fr: any) => fr.value.clientFileID === f.ID);\n if (index >= 0) {\n f.props.meta = pConn.getLocalizedValue('Uploaded successfully', '', '');\n f.props.progress = 100;\n f.inProgress = false;\n f.handle = fileResponses[index].value.ID;\n f.label = valueRef;\n f.category = categoryName;\n f.responseProps = {\n pzInsKey: 'temp',\n pyAttachName: f.props.name\n };\n }\n });\n return tempFilesUploaded;\n });\n\n if (filesWithError.length === 0) {\n clearFieldErrorMessages();\n }\n }\n setToggleUploadBegin(false);\n })\n .catch(error => {\n // eslint-disable-next-line no-console\n console.log(error);\n setToggleUploadBegin(false);\n });\n }, [files, filesWithError]);\n\n useEffect(() => {\n if (toggleUploadBegin && files.length > 0) {\n uploadFiles();\n }\n }, [toggleUploadBegin]);\n\n useEffect(() => {\n if (files.length > 0 && displayMode !== 'DISPLAY_ONLY') {\n const currentAttachmentList = getCurrentAttachmentsList(getAttachmentKey(valueRef), pConn.getContextName());\n // block duplicate files to redux store when added 1 after another to prevent multiple duplicates being added to the case on submit\n const tempFiles = files.filter(f => currentAttachmentList.findIndex(fr => fr.ID === f.ID) === -1 && !f.inProgress && f.responseProps);\n\n const updatedAttList = [...currentAttachmentList, ...tempFiles];\n updateAttachmentState(pConn, getAttachmentKey(valueRef), updatedAttList);\n }\n }, [files]);\n\n useEffect(() => {\n if (filesWithError.length === 0) {\n clearFieldErrorMessages();\n }\n }, [filesWithError]);\n\n useEffect(() => {\n let tempUploadedFiles = getCurrentAttachmentsList(getAttachmentKey(valueRef), pConn.getContextName());\n tempUploadedFiles = tempUploadedFiles.filter(f => f.label === valueRef);\n setFiles(current => {\n return [\n ...current.map(f => {\n return f.responseProps.pzInsKey && !f.responseProps.pzInsKey.includes('temp')\n ? {\n ...f,\n props: {\n ...f.props,\n onDelete: () => deleteFile(f)\n }\n }\n : { ...f };\n }),\n ...tempUploadedFiles\n ];\n });\n PCore.getPubSubUtils().subscribe(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION, resetAttachmentStoredState, caseID);\n return () => {\n PCore.getPubSubUtils().unsubscribe(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION, caseID);\n };\n }, []);\n\n const handleClick = event => {\n setAnchorEl(event.currentTarget);\n };\n\n const handleClose = () => {\n setAnchorEl(null);\n };\n\n const content = (\n <div style={{ marginBottom: '8px' }}>\n <div className={`${disabled ? 'file-disabled' : ''} ${validatemessage === '' ? 'file-div' : 'file-div-error'}`}>\n <div hidden={true} id='attachment-ID'>\n {valueRef}\n </div>\n <label htmlFor={valueRef}>\n <input\n style={{ display: 'none' }}\n id={valueRef}\n name='upload-photo'\n type='file'\n multiple={allowMultiple === 'true'}\n required={required}\n disabled={disabled}\n onChange={onFileAdded}\n />\n <Button style={{ textTransform: 'none' }} variant='outlined' color='primary' component='span'>\n {allowMultiple === 'true'\n ? uploadMultipleFilesLabel === 'file_upload_text_multiple'\n ? 'Choose files'\n : uploadMultipleFilesLabel\n : uploadSingleFileLabel === 'file_upload_text_one'\n ? 'Choose a file'\n : uploadSingleFileLabel}\n </Button>\n </label>\n </div>\n </div>\n );\n\n const fileDisplay = (\n <div>\n {files &&\n files.length > 0 &&\n files.map((item, index) => {\n return (\n <div key={index} className='psdk-utility-card'>\n <div className='psdk-utility-card-icon'>\n {!item.inProgress && <img className='psdk-utility-card-svg-icon' src={srcImg} />}\n {item.inProgress && (\n <div>\n <CircularProgress />\n </div>\n )}\n </div>\n <div className='psdk-utility-card-main'>\n <div className='psdk-utility-card-main-primary-label'>{item.props.name}</div>\n {item.props.meta && <div style={{ color: item.props.error ? 'red' : undefined }}>{item.props.meta}</div>}\n </div>\n <div className='psdk-utility-action'>\n {item.ID && (\n <button type='button' className='psdk-utility-button' aria-label='Delete Attachment' onClick={() => deleteFile(item)}>\n <img className='psdk-utility-card-action-svg-icon' src={deleteIcon} />\n </button>\n )}\n {!item.ID && (\n <div>\n <IconButton\n id='setting-button'\n aria-controls={open ? 'file-menu' : undefined}\n aria-expanded={open ? 'true' : undefined}\n aria-haspopup='true'\n onClick={handleClick}\n >\n <MoreVertIcon />\n </IconButton>\n <Menu style={{ marginTop: '3rem' }} id='file-menu' anchorEl={anchorEl} keepMounted open={Boolean(anchorEl)} onClose={handleClose}>\n <MenuItem\n style={{ fontSize: '14px' }}\n key='download'\n onClick={() => downloadFile(item.responseProps ? item.responseProps : {})}\n >\n Download\n </MenuItem>\n <MenuItem style={{ fontSize: '14px' }} key='delete' onClick={() => deleteFile(item)}>\n Delete\n </MenuItem>\n </Menu>\n </div>\n )}\n </div>\n </div>\n );\n })}\n </div>\n );\n\n return (\n <div className='file-upload-container'>\n <span className={`label ${required ? 'file-label' : ''}`}>{label}</span>\n {((files.length === 0 && allowMultiple !== 'true') || allowMultiple === 'true') && <section>{content}</section>}\n {validatemessage !== '' ? <span className='file-error'>{validatemessage}</span> : ''}\n {files && files.length > 0 && <section>{fileDisplay}</section>}\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"Attachment.js","sourceRoot":"","sources":["../../../../src/components/widget/Attachment/Attachment.tsx"],"names":[],"mappings":";AAAA,4CAA4C;AAC5C,6CAA6C;AAC7C,sCAAsC;AACtC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACrF,OAAO,YAAY,MAAM,8BAA8B,CAAC;AACxD,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,OAAO,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACnH,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAG5C,OAAO,kBAAkB,CAAC;AAS1B,MAA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AAQ,EAAE,WAAW,QAAC,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,WAAW,aAC9H,KAAC,QAAQ,IACP,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,EAE3B,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,0BADrE,UAAU,CAIL,EACX,KAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAe,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,wBAAxC,QAAQ,CAExC,IACN,IACH,CACP,IACG,KA7CE,KAAK,CA8CT,CACP,CAAC;YACJ,CAAC,CAAC,GACA,CACP,CAAC;IAEF,OAAO,CACL,eAAK,SAAS,EAAC,uBAAuB,aACpC,eAAM,SAAS,EAAE,SAAS,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,EAAE,YAAG,KAAK,GAAQ,EACvE,CAAC,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,aAAa,KAAK,MAAM,CAAC,IAAI,aAAa,KAAK,MAAM,CAAC,IAAI,4BAAU,OAAO,GAAW,EAC9G,eAAe,KAAK,EAAE,CAAC,CAAC,CAAC,eAAM,SAAS,EAAC,YAAY,YAAE,eAAe,GAAQ,CAAC,CAAC,CAAC,eAAM,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAG,UAAU,GAAQ,EACvI,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,4BAAU,WAAW,GAAW,IAC1D,CACP,CAAC;AACJ,CAAC","sourcesContent":["/* eslint-disable react/jsx-boolean-value */\n/* eslint-disable react/no-array-index-key */\n/* eslint-disable no-nested-ternary */\nimport { useState, useEffect, useCallback } from 'react';\nimport { CircularProgress, IconButton, Menu, MenuItem, Button } from '@mui/material';\nimport MoreVertIcon from '@mui/icons-material/MoreVert';\nimport download from 'downloadjs';\n\nimport { buildFilePropsFromResponse, getIconFromFileType, validateMaxSize } from '../../helpers/attachmentHelpers';\nimport { Utils } from '../../helpers/utils';\nimport type { PConnFieldProps } from '../../../types/PConnProps';\n\nimport './Attachment.css';\n\ninterface AttachmentProps extends Omit<PConnFieldProps, 'value'> {\n // If any, enter additional props that only exist on this component\n value: any;\n allowMultiple: string;\n extensions: string;\n}\n\nconst getAttachmentKey = (name = '') => (name ? `attachmentsList.${name}` : 'attachmentsList');\n\nconst getCurrentAttachmentsList = (key, context) => {\n return PCore.getStoreValue(`.${key}`, 'context_data', context) || [];\n};\n\nconst updateAttachmentState = (pConn, key, attachments) => {\n PCore.getStateUtils().updateState(pConn.getContextName(), key, attachments, {\n pageReference: 'context_data',\n isArrayDeepMerge: false\n });\n};\n\nexport default function Attachment(props: AttachmentProps) {\n const { value, getPConnect, label, validatemessage, allowMultiple, extensions, displayMode, helperText } = props;\n /* this is a temporary fix because required is supposed to be passed as a boolean and NOT as a string */\n let { required, disabled } = props;\n [required, disabled] = [required, disabled].map(prop => prop === true || (typeof prop === 'string' && prop === 'true'));\n const pConn = getPConnect();\n const caseID = PCore.getStoreValue('.pyID', 'caseInfo.content', pConn.getContextName());\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'CosmosFields';\n const uploadMultipleFilesLabel = localizedVal('file_upload_text_multiple', localeCategory);\n const uploadSingleFileLabel = localizedVal('file_upload_text_one', localeCategory);\n let categoryName = '';\n if (value && value.pyCategoryName) {\n categoryName = value.pyCategoryName;\n }\n const deleteIcon = Utils.getImageSrc('trash', Utils.getSDKStaticConentUrl());\n const srcImg = Utils.getImageSrc('document-doc', Utils.getSDKStaticConentUrl());\n let valueRef = (pConn.getStateProps() as any).value;\n valueRef = valueRef.indexOf('.') === 0 ? valueRef.substring(1) : valueRef;\n const [anchorEl, setAnchorEl] = useState(null);\n const open = Boolean(anchorEl);\n const [files, setFiles] = useState<any[]>(() =>\n value?.pxResults && +value.pyCount > 0 ? value.pxResults.map(f => buildFilePropsFromResponse(f)) : []\n );\n const [filesWithError, setFilesWithError] = useState<any[]>([]);\n const [toggleUploadBegin, setToggleUploadBegin] = useState(false);\n\n const resetAttachmentStoredState = () => {\n PCore.getStateUtils().updateState(pConn.getContextName(), getAttachmentKey(valueRef), undefined, {\n pageReference: 'context_data',\n isArrayDeepMerge: false\n });\n };\n\n const fileDownload = (data, fileName, ext) => {\n const fileData = ext ? `${fileName}.${ext}` : fileName;\n download(atob(data), fileData);\n };\n\n const downloadFile = (fileObj: any) => {\n setAnchorEl(null);\n PCore.getAttachmentUtils()\n // @ts-ignore - 3rd parameter \"responseEncoding\" should be optional\n .downloadAttachment(fileObj.pzInsKey, pConn.getContextName())\n .then((content: any) => {\n const extension = fileObj.pyAttachName.split('.').pop();\n fileDownload(content.data, fileObj.pyFileName, extension);\n })\n .catch(() => {});\n };\n\n const deleteFile = useCallback(\n file => {\n setAnchorEl(null);\n let attachmentsList: any[] = [];\n let currentAttachmentList = getCurrentAttachmentsList(getAttachmentKey(valueRef), pConn.getContextName());\n\n // If file to be deleted is the one added in previous stage i.e. for which a file instance is created in server\n // no need to filter currentAttachmentList as we will get another entry of file in redux with delete & label\n // eslint-disable-next-line no-unsafe-optional-chaining\n if (value && value?.pxResults && +value?.pyCount > 0 && file.responseProps && file?.responseProps?.pzInsKey !== 'temp') {\n const updatedAttachments = files.map(f => {\n if (f.responseProps && f.responseProps.pzInsKey === file.responseProps.pzInsKey) {\n return { ...f, delete: true, label: valueRef };\n }\n return f;\n });\n\n // updating the redux store to help form-handler in passing the data to delete the file from server\n updateAttachmentState(pConn, getAttachmentKey(valueRef), [...updatedAttachments]);\n setFiles(current => {\n const newlyAddedFiles = current.filter(f => !!f.ID);\n const filesPostDelete = current.filter(\n f => f.responseProps?.pzInsKey !== 'temp' && f.responseProps?.pzInsKey !== file.responseProps?.pzInsKey\n );\n attachmentsList = [...filesPostDelete, ...newlyAddedFiles];\n return attachmentsList;\n });\n } // if the file being deleted is the added in this stage i.e. whose data is not yet created in server\n else {\n // 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()\n currentAttachmentList = currentAttachmentList.filter(f => f.label !== valueRef);\n setFiles(current => {\n attachmentsList = current.filter(f => f.ID !== file.ID);\n return attachmentsList;\n });\n updateAttachmentState(pConn, getAttachmentKey(valueRef), [...currentAttachmentList, ...attachmentsList]);\n if (file.inProgress) {\n // @ts-ignore - 3rd parameter \"responseEncoding\" should be optional\n PCore.getAttachmentUtils().cancelRequest(file.ID, pConn.getContextName());\n }\n }\n\n setToggleUploadBegin(false);\n setFilesWithError(prevFilesWithError => {\n return prevFilesWithError.filter(f => f.ID !== file.ID);\n });\n },\n [pConn, value, valueRef, filesWithError]\n );\n\n const onUploadProgress = () => {};\n\n const errorHandler = (isFetchCanceled, attachedFile) => {\n return error => {\n if (!isFetchCanceled(error)) {\n let uploadFailMsg = pConn.getLocalizedValue('Something went wrong', '', '');\n if (error.response && error.response.data && error.response.data.errorDetails) {\n uploadFailMsg = pConn.getLocalizedValue(error.response.data.errorDetails[0].localizedValue, '', '');\n }\n setFiles(current => {\n return current.map(f => {\n if (f.ID === attachedFile.ID) {\n f.props.meta = uploadFailMsg;\n f.props.error = true;\n f.props.onDelete = () => deleteFile(f);\n f.props.icon = getIconFromFileType(f.type);\n f.props.name = pConn.getLocalizedValue('Unable to upload file', '', '');\n f.inProgress = false;\n const fieldName = (pConn.getStateProps() as any).value;\n const context = pConn.getContextName();\n // set errors to property to block submit even on errors in file upload\n PCore.getMessageManager().addMessages({\n messages: [\n {\n type: 'error',\n message: pConn.getLocalizedValue('Error with one or more files', '', '')\n }\n ],\n property: fieldName,\n pageReference: pConn.getPageReference(),\n context\n });\n delete f.props.progress;\n }\n return f;\n });\n });\n }\n throw error;\n };\n };\n\n const validateFileExtension = (fileObj, allowedExtensions) => {\n if (!allowedExtensions) {\n return true;\n }\n const allowedExtensionList = allowedExtensions\n .toLowerCase()\n .split(',')\n .map(item => item.replaceAll('.', '').trim());\n const extension = fileObj.name.split('.').pop().toLowerCase();\n return allowedExtensionList.includes(extension);\n };\n\n const clearFieldErrorMessages = () => {\n const fieldName = (pConn.getStateProps() as any).value;\n const context = pConn.getContextName();\n PCore.getMessageManager().clearMessages({\n type: PCore.getConstants().MESSAGES.MESSAGES_TYPE_ERROR,\n property: fieldName,\n pageReference: pConn.getPageReference(),\n context\n });\n };\n\n const onFileAdded = event => {\n let addedFiles = Array.from(event.target.files);\n addedFiles = allowMultiple === 'true' ? addedFiles : [addedFiles[0]];\n const maxAttachmentSize = PCore.getEnvironmentInfo().getMaxAttachmentSize() || '5';\n const tempFilesToBeUploaded = [\n ...addedFiles.map((f: any, index) => {\n f.ID = `${new Date().getTime()}I${index}`;\n f.inProgress = true;\n f.props = {\n type: f.type,\n name: f.name,\n icon: getIconFromFileType(f.type),\n onDelete: () => deleteFile(f)\n };\n if (!validateMaxSize(f, maxAttachmentSize)) {\n f.props.error = true;\n f.inProgress = false;\n f.props.meta = pConn.getLocalizedValue(`File is too big. Max allowed size is ${maxAttachmentSize}MB.`, '', '');\n } else if (!validateFileExtension(f, extensions)) {\n f.props.error = true;\n f.inProgress = false;\n f.props.meta = `${pConn.getLocalizedValue('File has invalid extension. Allowed extensions are:', '', '')} ${extensions.replaceAll(\n '.',\n ''\n )}`;\n }\n if (f.props.error) {\n const fieldName = (pConn.getStateProps() as any).value;\n const context = pConn.getContextName();\n PCore.getMessageManager().addMessages({\n messages: [\n {\n type: 'error',\n message: pConn.getLocalizedValue('Error with one or more files', '', '')\n }\n ],\n property: fieldName,\n pageReference: pConn.getPageReference(),\n context\n });\n }\n return f;\n })\n ];\n const tempFilesWithError = tempFilesToBeUploaded.filter(f => f.props.error);\n if (tempFilesWithError.length > 0) {\n setFilesWithError(tempFilesWithError);\n }\n setFiles(current => (allowMultiple !== 'true' ? [...tempFilesToBeUploaded] : [...current, ...tempFilesToBeUploaded]));\n setToggleUploadBegin(true);\n };\n\n const uploadFiles = useCallback(() => {\n const filesToBeUploaded = files\n .filter(e => {\n const isFileUploaded = e.props && e.props.progress === 100;\n const fileHasError = e.props && e.props.error;\n const isFileUploadedinLastStep = e.responseProps && e.responseProps.pzInsKey;\n return !isFileUploaded && !fileHasError && !isFileUploadedinLastStep;\n })\n .map(f =>\n window.PCore.getAttachmentUtils().uploadAttachment(\n f,\n () => {\n onUploadProgress();\n },\n isFetchCanceled => {\n return errorHandler(isFetchCanceled, f);\n },\n pConn.getContextName()\n )\n );\n Promise.allSettled(filesToBeUploaded)\n .then((fileResponses: any) => {\n fileResponses = fileResponses.filter(fr => fr.status !== 'rejected'); // in case of deleting an in progress file, promise gets cancelled but still enters then block\n if (fileResponses.length > 0) {\n setFiles(current => {\n const tempFilesUploaded = [...current];\n tempFilesUploaded.forEach(f => {\n const index = fileResponses.findIndex((fr: any) => fr.value.clientFileID === f.ID);\n if (index >= 0) {\n f.props.meta = pConn.getLocalizedValue('Uploaded successfully', '', '');\n f.props.progress = 100;\n f.inProgress = false;\n f.handle = fileResponses[index].value.ID;\n f.label = valueRef;\n f.category = categoryName;\n f.responseProps = {\n pzInsKey: 'temp',\n pyAttachName: f.props.name\n };\n }\n });\n return tempFilesUploaded;\n });\n\n if (filesWithError.length === 0) {\n clearFieldErrorMessages();\n }\n }\n setToggleUploadBegin(false);\n })\n .catch(error => {\n // eslint-disable-next-line no-console\n console.log(error);\n setToggleUploadBegin(false);\n });\n }, [files, filesWithError]);\n\n useEffect(() => {\n if (toggleUploadBegin && files.length > 0) {\n uploadFiles();\n }\n }, [toggleUploadBegin]);\n\n useEffect(() => {\n if (files.length > 0 && displayMode !== 'DISPLAY_ONLY') {\n const currentAttachmentList = getCurrentAttachmentsList(getAttachmentKey(valueRef), pConn.getContextName());\n // block duplicate files to redux store when added 1 after another to prevent multiple duplicates being added to the case on submit\n const tempFiles = files.filter(f => currentAttachmentList.findIndex(fr => fr.ID === f.ID) === -1 && !f.inProgress && f.responseProps);\n\n const updatedAttList = [...currentAttachmentList, ...tempFiles];\n updateAttachmentState(pConn, getAttachmentKey(valueRef), updatedAttList);\n }\n }, [files]);\n\n useEffect(() => {\n if (filesWithError.length === 0) {\n clearFieldErrorMessages();\n }\n }, [filesWithError]);\n\n useEffect(() => {\n let tempUploadedFiles = getCurrentAttachmentsList(getAttachmentKey(valueRef), pConn.getContextName());\n tempUploadedFiles = tempUploadedFiles.filter(f => f.label === valueRef);\n setFiles(current => {\n return [\n ...current.map(f => {\n return f.responseProps.pzInsKey && !f.responseProps.pzInsKey.includes('temp')\n ? {\n ...f,\n props: {\n ...f.props,\n onDelete: () => deleteFile(f)\n }\n }\n : { ...f };\n }),\n ...tempUploadedFiles\n ];\n });\n PCore.getPubSubUtils().subscribe(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION, resetAttachmentStoredState, caseID);\n return () => {\n PCore.getPubSubUtils().unsubscribe(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION, caseID);\n };\n }, []);\n\n const handleClick = event => {\n setAnchorEl(event.currentTarget);\n };\n\n const handleClose = () => {\n setAnchorEl(null);\n };\n\n const content = (\n <div style={{ marginBottom: '8px' }}>\n <div className={`${disabled ? 'file-disabled' : ''} ${validatemessage === '' ? 'file-div' : 'file-div-error'}`}>\n <div hidden={true} id='attachment-ID'>\n {valueRef}\n </div>\n <label htmlFor={valueRef}>\n <input\n style={{ display: 'none' }}\n id={valueRef}\n name='upload-photo'\n type='file'\n multiple={allowMultiple === 'true'}\n required={required}\n disabled={disabled}\n onChange={onFileAdded}\n />\n <Button style={{ textTransform: 'none' }} variant='outlined' color='primary' component='span'>\n {allowMultiple === 'true'\n ? uploadMultipleFilesLabel === 'file_upload_text_multiple'\n ? 'Choose files'\n : uploadMultipleFilesLabel\n : uploadSingleFileLabel === 'file_upload_text_one'\n ? 'Choose a file'\n : uploadSingleFileLabel}\n </Button>\n </label>\n </div>\n </div>\n );\n\n const fileDisplay = (\n <div>\n {files &&\n files.length > 0 &&\n files.map((item, index) => {\n return (\n <div key={index} className='psdk-utility-card'>\n <div className='psdk-utility-card-icon'>\n {!item.inProgress && <img className='psdk-utility-card-svg-icon' src={srcImg} />}\n {item.inProgress && (\n <div>\n <CircularProgress />\n </div>\n )}\n </div>\n <div className='psdk-utility-card-main'>\n <div className='psdk-utility-card-main-primary-label'>{item.props.name}</div>\n {item.props.meta && <div style={{ color: item.props.error ? 'red' : undefined }}>{item.props.meta}</div>}\n </div>\n <div className='psdk-utility-action'>\n {item.ID && (\n <button type='button' className='psdk-utility-button' aria-label='Delete Attachment' onClick={() => deleteFile(item)}>\n <img className='psdk-utility-card-action-svg-icon' src={deleteIcon} />\n </button>\n )}\n {!item.ID && (\n <div>\n <IconButton\n id='setting-button'\n aria-controls={open ? 'file-menu' : undefined}\n aria-expanded={open ? 'true' : undefined}\n aria-haspopup='true'\n onClick={handleClick}\n size='large'\n >\n <MoreVertIcon />\n </IconButton>\n <Menu style={{ marginTop: '3rem' }} id='file-menu' anchorEl={anchorEl} keepMounted open={Boolean(anchorEl)} onClose={handleClose}>\n <MenuItem\n style={{ fontSize: '14px' }}\n key='download'\n onClick={() => downloadFile(item.responseProps ? item.responseProps : {})}\n >\n Download\n </MenuItem>\n <MenuItem style={{ fontSize: '14px' }} key='delete' onClick={() => deleteFile(item)}>\n Delete\n </MenuItem>\n </Menu>\n </div>\n )}\n </div>\n </div>\n );\n })}\n </div>\n );\n\n return (\n <div className='file-upload-container'>\n <span className={`label ${required ? 'file-label' : ''}`}>{label}</span>\n {((files.length === 0 && allowMultiple !== 'true') || allowMultiple === 'true') && <section>{content}</section>}\n {validatemessage !== '' ? <span className='file-error'>{validatemessage}</span> : <span style={{ fontSize: '14px' }}>{helperText}</span>}\n {files && files.length > 0 && <section>{fileDisplay}</section>}\n </div>\n );\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { PConnProps } from '../../../types/PConnProps';
1
+ import type { PConnProps } from '../../../types/PConnProps';
2
2
  interface CaseHistoryProps extends PConnProps {
3
3
  }
4
4
  export default function CaseHistory(props: CaseHistoryProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"CaseHistory.d.ts","sourceRoot":"","sources":["../../../../src/components/widget/CaseHistory/CaseHistory.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,UAAU,gBAAiB,SAAQ,UAAU;CAE5C;AAoBD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAqI1D"}
1
+ {"version":3,"file":"CaseHistory.d.ts","sourceRoot":"","sources":["../../../../src/components/widget/CaseHistory/CaseHistory.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,UAAU,gBAAiB,SAAQ,UAAU;CAE5C;AAoBD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAqI1D"}
@@ -1,12 +1,13 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useRef, useState } from 'react';
3
- import { withStyles, createStyles } from '@material-ui/core/styles';
4
- import Table from '@material-ui/core/Table';
5
- import TableBody from '@material-ui/core/TableBody';
6
- import TableCell from '@material-ui/core/TableCell';
7
- import TableContainer from '@material-ui/core/TableContainer';
8
- import TableHead from '@material-ui/core/TableHead';
9
- import TableRow from '@material-ui/core/TableRow';
3
+ import withStyles from '@mui/styles/withStyles';
4
+ import createStyles from '@mui/styles/createStyles';
5
+ import Table from '@mui/material/Table';
6
+ import TableBody from '@mui/material/TableBody';
7
+ import TableCell from '@mui/material/TableCell';
8
+ import TableContainer from '@mui/material/TableContainer';
9
+ import TableHead from '@mui/material/TableHead';
10
+ import TableRow from '@mui/material/TableRow';
10
11
  import isDeepEqual from 'fast-deep-equal/react';
11
12
  import { Utils } from '../../helpers/utils';
12
13
  const StyledTableCell = withStyles((theme) => createStyles({
@@ -33,12 +34,12 @@ export default function CaseHistory(props) {
33
34
  label: thePConn.getLocalizedValue('Date', '', ''),
34
35
  type: 'DateTime',
35
36
  fieldName: 'pxTimeCreated'
36
- },
37
+ }, // 2nd and 3rd args empty string until typedef marked correctly
37
38
  {
38
39
  label: thePConn.getLocalizedValue('Description', '', ''),
39
40
  type: 'TextInput',
40
41
  fieldName: 'pyMessageKey'
41
- },
42
+ }, // 2nd and 3rd args empty string until typedef marked correctly
42
43
  {
43
44
  label: thePConn.getLocalizedValue('Performed by', '', ''),
44
45
  type: 'TextInput',
@@ -1 +1 @@
1
- {"version":3,"file":"CaseHistory.js","sourceRoot":"","sources":["../../../../src/components/widget/CaseHistory/CaseHistory.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,UAAU,EAAS,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,KAAK,MAAM,yBAAyB,CAAC;AAC5C,OAAO,SAAS,MAAM,6BAA6B,CAAC;AACpD,OAAO,SAAS,MAAM,6BAA6B,CAAC;AACpD,OAAO,cAAc,MAAM,kCAAkC,CAAC;AAC9D,OAAO,SAAS,MAAM,6BAA6B,CAAC;AACpD,OAAO,QAAQ,MAAM,4BAA4B,CAAC;AAClD,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAO5C,MAAM,eAAe,GAAG,UAAU,CAAC,CAAC,KAAY,EAAE,EAAE,CAClD,YAAY,CAAC;IACX,IAAI,EAAE;QACJ,WAAW,EAAE,KAAK;QAClB,WAAW,EAAE,OAAO;QACpB,WAAW,EAAE,QAAQ;QACrB,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAA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AC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,GAAmB,EACpE,KAAC,eAAe,cAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,GAAmB,EACpE,KAAC,eAAe,cAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,GAAmB,KAHvD,MAAM,CAIV,CACZ,CAAC;YACJ,CAAC,CAAC,CAAC;SACJ;QAED,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,OAAO,CACL,cAAK,EAAE,EAAC,aAAa,YACnB,KAAC,cAAc,cACb,MAAC,KAAK,eACJ,KAAC,SAAS,cAAE,cAAc,EAAE,GAAa,EACzC,KAAC,SAAS,cAAE,YAAY,EAAE,GAAa,IACjC,GACO,GACb,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { useEffect, useRef, useState } from 'react';\nimport { withStyles, Theme, createStyles } from '@material-ui/core/styles';\nimport Table from '@material-ui/core/Table';\nimport TableBody from '@material-ui/core/TableBody';\nimport TableCell from '@material-ui/core/TableCell';\nimport TableContainer from '@material-ui/core/TableContainer';\nimport TableHead from '@material-ui/core/TableHead';\nimport TableRow from '@material-ui/core/TableRow';\nimport isDeepEqual from 'fast-deep-equal/react';\n\nimport { Utils } from '../../helpers/utils';\nimport { PConnProps } from '../../../types/PConnProps';\n\ninterface CaseHistoryProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n}\n\nconst StyledTableCell = withStyles((theme: Theme) =>\n createStyles({\n head: {\n borderWidth: '1px',\n borderStyle: 'solid',\n borderColor: 'silver',\n backgroundColor: theme.palette.text.disabled,\n color: theme.palette.getContrastText(theme.palette.text.disabled)\n },\n body: {\n borderWidth: '1px',\n borderStyle: 'solid',\n borderColor: 'silver'\n // fontSize: 14,\n }\n })\n)(TableCell);\n\nexport default function CaseHistory(props: CaseHistoryProps) {\n const { getPConnect } = props;\n const thePConn = getPConnect();\n // let waitingForData = true;\n\n const displayedColumns = [\n {\n label: thePConn.getLocalizedValue('Date', '', ''),\n type: 'DateTime',\n fieldName: 'pxTimeCreated'\n }, // 2nd and 3rd args empty string until typedef marked correctly\n {\n label: thePConn.getLocalizedValue('Description', '', ''),\n type: 'TextInput',\n fieldName: 'pyMessageKey'\n }, // 2nd and 3rd args empty string until typedef marked correctly\n {\n label: thePConn.getLocalizedValue('Performed by', '', ''),\n type: 'TextInput',\n fieldName: 'pyPerformer'\n } // 2nd and 3rd args empty string until typedef marked correctly\n ];\n\n const rowData: any = useRef([]);\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const [waitingForData, setWaitingForData] = useState<boolean>(true);\n\n const caseID = thePConn.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID, ''); // 2nd arg empty string until typedef marked correctly\n const dataViewName = 'D_pyWorkHistory';\n const context = thePConn.getContextName();\n\n function computeRowData(rows: Object[]): void {\n const theRowData: Object[] = [];\n\n rows.forEach((row: any, rowIndex: number) => {\n // Now, for each property in the index of row properties (displayedColumns), add an object\n // to a new array of values\n const rowDisplayValues: any = [];\n\n displayedColumns.forEach((column: any, rowValIndex) => {\n const theType = column.type;\n const theFieldName = column.fieldName;\n const theValue =\n theType === 'Date' || theType === 'DateTime' ? Utils.generateDateTime(row[theFieldName], 'DateTime-Short') : row[theFieldName];\n rowDisplayValues[rowValIndex] = theValue;\n });\n\n theRowData[rowIndex] = rowDisplayValues;\n });\n\n if (!isDeepEqual(theRowData, rowData.current)) {\n // Only update rowData.current when it actually changes (to prevent infinite loop)\n rowData.current = theRowData;\n }\n }\n\n // Get the case history data when component mounted/initialized\n useEffect(() => {\n let bCallSetWaitingForData = true;\n\n const historyData = PCore.getDataApiUtils().getData(\n dataViewName,\n { dataViewParameters: [{ CaseInstanceKey: caseID }] } as any,\n context\n ) as Promise<any>;\n\n historyData.then((historyJSON: any) => {\n const tableDataResults = historyJSON.data.data;\n\n // compute the rowData using the tableDataResults\n computeRowData(tableDataResults);\n\n // At this point, if we have data ready to render and haven't been asked\n // to NOT call setWaitingForData, we can stop progress indicator\n if (bCallSetWaitingForData) {\n setWaitingForData(false);\n }\n });\n\n return () => {\n // Inspired by https://juliangaramendy.dev/blog/use-promise-subscription\n // The useEffect closure lets us have access to the bCallSetWaitingForData\n // variable inside the useEffect and inside the \"then\" clause of the\n // historyData promise\n // So, if this cleanup code gets run before the promise .then is called,\n // we can avoid calling the useState setter which would otherwise show a warning\n bCallSetWaitingForData = false;\n };\n }, []);\n\n function getTableHeader() {\n const theRowKey = 'CaseHistory.TableHeader';\n\n const theHeaderCells: any[] = displayedColumns.map((headerCol, index) => {\n const theCellKey = `${theRowKey}.${index}`;\n return <StyledTableCell key={theCellKey}>{headerCol.label}</StyledTableCell>;\n });\n\n return <TableRow key={theRowKey}>{theHeaderCells}</TableRow>;\n }\n\n function getTableData() {\n const theDataRows: any[] = [];\n\n // Note: using rowData.current since we're using useRef as a mutatable\n // value that's only updated when it changes.\n if (rowData.current.length > 0) {\n rowData.current.forEach((dataRow: Object[], index) => {\n // using dataRow[0]-dataRow[1] as the array key since it's a unique value\n const theKey = `CaseHistory-${index}`;\n theDataRows.push(\n <TableRow key={theKey}>\n <StyledTableCell>{dataRow[0] ? dataRow[0] : '---'}</StyledTableCell>\n <StyledTableCell>{dataRow[1] ? dataRow[1] : '---'}</StyledTableCell>\n <StyledTableCell>{dataRow[2] ? dataRow[2] : '---'}</StyledTableCell>\n </TableRow>\n );\n });\n }\n\n return theDataRows;\n }\n\n return (\n <div id='CaseHistory'>\n <TableContainer>\n <Table>\n <TableHead>{getTableHeader()}</TableHead>\n <TableBody>{getTableData()}</TableBody>\n </Table>\n </TableContainer>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"CaseHistory.js","sourceRoot":"","sources":["../../../../src/components/widget/CaseHistory/CaseHistory.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,S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eACJ,KAAC,SAAS,cAAE,cAAc,EAAE,GAAa,EACzC,KAAC,SAAS,cAAE,YAAY,EAAE,GAAa,IACjC,GACO,GACb,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { useEffect, useRef, useState } from 'react';\nimport type { Theme } from '@mui/material/styles';\nimport withStyles from '@mui/styles/withStyles';\nimport createStyles from '@mui/styles/createStyles';\nimport Table from '@mui/material/Table';\nimport TableBody from '@mui/material/TableBody';\nimport TableCell from '@mui/material/TableCell';\nimport TableContainer from '@mui/material/TableContainer';\nimport TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport isDeepEqual from 'fast-deep-equal/react';\n\nimport { Utils } from '../../helpers/utils';\nimport type { PConnProps } from '../../../types/PConnProps';\n\ninterface CaseHistoryProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n}\n\nconst StyledTableCell = withStyles((theme: Theme) =>\n createStyles({\n head: {\n borderWidth: '1px',\n borderStyle: 'solid',\n borderColor: 'silver',\n backgroundColor: theme.palette.text.disabled,\n color: theme.palette.getContrastText(theme.palette.text.disabled)\n },\n body: {\n borderWidth: '1px',\n borderStyle: 'solid',\n borderColor: 'silver'\n // fontSize: 14,\n }\n })\n)(TableCell);\n\nexport default function CaseHistory(props: CaseHistoryProps) {\n const { getPConnect } = props;\n const thePConn = getPConnect();\n // let waitingForData = true;\n\n const displayedColumns = [\n {\n label: thePConn.getLocalizedValue('Date', '', ''),\n type: 'DateTime',\n fieldName: 'pxTimeCreated'\n }, // 2nd and 3rd args empty string until typedef marked correctly\n {\n label: thePConn.getLocalizedValue('Description', '', ''),\n type: 'TextInput',\n fieldName: 'pyMessageKey'\n }, // 2nd and 3rd args empty string until typedef marked correctly\n {\n label: thePConn.getLocalizedValue('Performed by', '', ''),\n type: 'TextInput',\n fieldName: 'pyPerformer'\n } // 2nd and 3rd args empty string until typedef marked correctly\n ];\n\n const rowData: any = useRef([]);\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const [waitingForData, setWaitingForData] = useState<boolean>(true);\n\n const caseID = thePConn.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID, ''); // 2nd arg empty string until typedef marked correctly\n const dataViewName = 'D_pyWorkHistory';\n const context = thePConn.getContextName();\n\n function computeRowData(rows: Object[]): void {\n const theRowData: Object[] = [];\n\n rows.forEach((row: any, rowIndex: number) => {\n // Now, for each property in the index of row properties (displayedColumns), add an object\n // to a new array of values\n const rowDisplayValues: any = [];\n\n displayedColumns.forEach((column: any, rowValIndex) => {\n const theType = column.type;\n const theFieldName = column.fieldName;\n const theValue =\n theType === 'Date' || theType === 'DateTime' ? Utils.generateDateTime(row[theFieldName], 'DateTime-Short') : row[theFieldName];\n rowDisplayValues[rowValIndex] = theValue;\n });\n\n theRowData[rowIndex] = rowDisplayValues;\n });\n\n if (!isDeepEqual(theRowData, rowData.current)) {\n // Only update rowData.current when it actually changes (to prevent infinite loop)\n rowData.current = theRowData;\n }\n }\n\n // Get the case history data when component mounted/initialized\n useEffect(() => {\n let bCallSetWaitingForData = true;\n\n const historyData = PCore.getDataApiUtils().getData(\n dataViewName,\n { dataViewParameters: [{ CaseInstanceKey: caseID }] } as any,\n context\n ) as Promise<any>;\n\n historyData.then((historyJSON: any) => {\n const tableDataResults = historyJSON.data.data;\n\n // compute the rowData using the tableDataResults\n computeRowData(tableDataResults);\n\n // At this point, if we have data ready to render and haven't been asked\n // to NOT call setWaitingForData, we can stop progress indicator\n if (bCallSetWaitingForData) {\n setWaitingForData(false);\n }\n });\n\n return () => {\n // Inspired by https://juliangaramendy.dev/blog/use-promise-subscription\n // The useEffect closure lets us have access to the bCallSetWaitingForData\n // variable inside the useEffect and inside the \"then\" clause of the\n // historyData promise\n // So, if this cleanup code gets run before the promise .then is called,\n // we can avoid calling the useState setter which would otherwise show a warning\n bCallSetWaitingForData = false;\n };\n }, []);\n\n function getTableHeader() {\n const theRowKey = 'CaseHistory.TableHeader';\n\n const theHeaderCells: any[] = displayedColumns.map((headerCol, index) => {\n const theCellKey = `${theRowKey}.${index}`;\n return <StyledTableCell key={theCellKey}>{headerCol.label}</StyledTableCell>;\n });\n\n return <TableRow key={theRowKey}>{theHeaderCells}</TableRow>;\n }\n\n function getTableData() {\n const theDataRows: any[] = [];\n\n // Note: using rowData.current since we're using useRef as a mutatable\n // value that's only updated when it changes.\n if (rowData.current.length > 0) {\n rowData.current.forEach((dataRow: Object[], index) => {\n // using dataRow[0]-dataRow[1] as the array key since it's a unique value\n const theKey = `CaseHistory-${index}`;\n theDataRows.push(\n <TableRow key={theKey}>\n <StyledTableCell>{dataRow[0] ? dataRow[0] : ('---' as any)}</StyledTableCell>\n <StyledTableCell>{dataRow[1] ? dataRow[1] : ('---' as any)}</StyledTableCell>\n <StyledTableCell>{dataRow[2] ? dataRow[2] : ('---' as any)}</StyledTableCell>\n </TableRow>\n );\n });\n }\n\n return theDataRows;\n }\n\n return (\n <div id='CaseHistory'>\n <TableContainer>\n <Table>\n <TableHead>{getTableHeader()}</TableHead>\n <TableBody>{getTableData()}</TableBody>\n </Table>\n </TableContainer>\n </div>\n );\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { PConnProps } from '../../../../types/PConnProps';
1
+ import type { PConnProps } from '../../../../types/PConnProps';
2
2
  import './ActionButtonsForFileUtil.css';
3
3
  interface ActionButtonsForFileUtilProps extends PConnProps {
4
4
  arMainButtons: any[];
@@ -1 +1 @@
1
- {"version":3,"file":"ActionButtonsForFileUtil.d.ts","sourceRoot":"","sources":["../../../../../src/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,gCAAgC,CAAC;AAExC,UAAU,6BAA8B,SAAQ,UAAU;IAExD,aAAa,EAAE,GAAG,EAAE,CAAC;IACrB,kBAAkB,EAAE,GAAG,EAAE,CAAC;IAC1B,aAAa,EAAE,GAAG,CAAC;IACnB,eAAe,EAAE,GAAG,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,2CAmBpF"}
1
+ {"version":3,"file":"ActionButtonsForFileUtil.d.ts","sourceRoot":"","sources":["../../../../../src/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,gCAAgC,CAAC;AAExC,UAAU,6BAA8B,SAAQ,UAAU;IAExD,aAAa,EAAE,GAAG,EAAE,CAAC;IACrB,kBAAkB,EAAE,GAAG,EAAE,CAAC;IAC1B,aAAa,EAAE,GAAG,CAAC;IACnB,eAAe,EAAE,GAAG,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,2CAmBpF"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Button } from '@material-ui/core';
2
+ import { Button } from '@mui/material';
3
3
  import './ActionButtonsForFileUtil.css';
4
4
  export default function ActionButtonsForFileUtil(props) {
5
5
  return (_jsxs("div", { className: 'psdk-actions', children: [_jsx("div", { className: 'psdk-action-buttons', children: props.arSecondaryButtons.map(file => (_jsx(Button, { className: 'secondary-button', onClick: props.secondaryAction, children: file.name }, file.actionID))) }), _jsx("div", { className: 'psdk-action-buttons', children: props.arMainButtons.map(file => (_jsx(Button, { className: 'primary-button', onClick: props.primaryAction, children: file.name }, file.actionID))) })] }));
@@ -1 +1 @@
1
- {"version":3,"file":"ActionButtonsForFileUtil.js","sourceRoot":"","sources":["../../../../../src/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,gCAAgC,CAAC;AAUxC,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,KAAoC;IACnF,OAAO,CACL,eAAK,SAAS,EAAC,cAAc,aAC3B,cAAK,SAAS,EAAC,qBAAqB,YACjC,KAAK,CAAC,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CACpC,KAAC,MAAM,IAAC,SAAS,EAAC,kBAAkB,EAAqB,OAAO,EAAE,KAAK,CAAC,eAAe,YACpF,IAAI,CAAC,IAAI,IAD8B,IAAI,CAAC,QAAQ,CAE9C,CACV,CAAC,GACE,EACN,cAAK,SAAS,EAAC,qBAAqB,YACjC,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAC/B,KAAC,MAAM,IAAC,SAAS,EAAC,gBAAgB,EAAqB,OAAO,EAAE,KAAK,CAAC,aAAa,YAChF,IAAI,CAAC,IAAI,IAD4B,IAAI,CAAC,QAAQ,CAE5C,CACV,CAAC,GACE,IACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { Button } from '@material-ui/core';\nimport { PConnProps } from '../../../../types/PConnProps';\nimport './ActionButtonsForFileUtil.css';\n\ninterface ActionButtonsForFileUtilProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n arMainButtons: any[];\n arSecondaryButtons: any[];\n primaryAction: any;\n secondaryAction: any;\n}\n\nexport default function ActionButtonsForFileUtil(props: ActionButtonsForFileUtilProps) {\n return (\n <div className='psdk-actions'>\n <div className='psdk-action-buttons'>\n {props.arSecondaryButtons.map(file => (\n <Button className='secondary-button' key={file.actionID} onClick={props.secondaryAction}>\n {file.name}\n </Button>\n ))}\n </div>\n <div className='psdk-action-buttons'>\n {props.arMainButtons.map(file => (\n <Button className='primary-button' key={file.actionID} onClick={props.primaryAction}>\n {file.name}\n </Button>\n ))}\n </div>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"ActionButtonsForFileUtil.js","sourceRoot":"","sources":["../../../../../src/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,OAAO,gCAAgC,CAAC;AAUxC,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,KAAoC;IACnF,OAAO,CACL,eAAK,SAAS,EAAC,cAAc,aAC3B,cAAK,SAAS,EAAC,qBAAqB,YACjC,KAAK,CAAC,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CACpC,KAAC,MAAM,IAAC,SAAS,EAAC,kBAAkB,EAAqB,OAAO,EAAE,KAAK,CAAC,eAAe,YACpF,IAAI,CAAC,IAAI,IAD8B,IAAI,CAAC,QAAQ,CAE9C,CACV,CAAC,GACE,EACN,cAAK,SAAS,EAAC,qBAAqB,YACjC,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAC/B,KAAC,MAAM,IAAC,SAAS,EAAC,gBAAgB,EAAqB,OAAO,EAAE,KAAK,CAAC,aAAa,YAChF,IAAI,CAAC,IAAI,IAD4B,IAAI,CAAC,QAAQ,CAE5C,CACV,CAAC,GACE,IACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { Button } from '@mui/material';\nimport type { PConnProps } from '../../../../types/PConnProps';\nimport './ActionButtonsForFileUtil.css';\n\ninterface ActionButtonsForFileUtilProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n arMainButtons: any[];\n arSecondaryButtons: any[];\n primaryAction: any;\n secondaryAction: any;\n}\n\nexport default function ActionButtonsForFileUtil(props: ActionButtonsForFileUtilProps) {\n return (\n <div className='psdk-actions'>\n <div className='psdk-action-buttons'>\n {props.arSecondaryButtons.map(file => (\n <Button className='secondary-button' key={file.actionID} onClick={props.secondaryAction}>\n {file.name}\n </Button>\n ))}\n </div>\n <div className='psdk-action-buttons'>\n {props.arMainButtons.map(file => (\n <Button className='primary-button' key={file.actionID} onClick={props.primaryAction}>\n {file.name}\n </Button>\n ))}\n </div>\n </div>\n );\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import './FileUtility.css';
2
- import { PConnProps } from '../../../../types/PConnProps';
2
+ import type { PConnProps } from '../../../../types/PConnProps';
3
3
  interface FileUtilityProps extends PConnProps {
4
4
  }
5
5
  export default function FileUtility(props: FileUtilityProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"FileUtility.d.ts","sourceRoot":"","sources":["../../../../../src/components/widget/FileUtility/FileUtility/FileUtility.tsx"],"names":[],"mappings":"AAQA,OAAO,mBAAmB,CAAC;AAM3B,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,UAAU,gBAAiB,SAAQ,UAAU;CAE5C;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAgnB1D"}
1
+ {"version":3,"file":"FileUtility.d.ts","sourceRoot":"","sources":["../../../../../src/components/widget/FileUtility/FileUtility/FileUtility.tsx"],"names":[],"mappings":"AAQA,OAAO,mBAAmB,CAAC;AAM3B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE/D,UAAU,gBAAiB,SAAQ,UAAU;CAE5C;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAinB1D"}
@@ -1,13 +1,13 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useState } from 'react';
3
- import TextField from '@material-ui/core/TextField';
3
+ import TextField from '@mui/material/TextField';
4
4
  import { Utils } from '../../../helpers/utils';
5
5
  import download from 'downloadjs';
6
6
  // import SummaryList from '../../SummaryList';
7
7
  // import ActionButtonsForFileUtil from '../ActionButtonsForFileUtil';
8
8
  import './FileUtility.css';
9
- import { IconButton, Menu, MenuItem, Button, CircularProgress } from '@material-ui/core';
10
- import MoreVertIcon from '@material-ui/icons/MoreVert';
9
+ import { IconButton, Menu, MenuItem, Button, CircularProgress } from '@mui/material';
10
+ import MoreVertIcon from '@mui/icons-material/MoreVert';
11
11
  import { validateMaxSize } from '../../../helpers/attachmentHelpers';
12
12
  import { getComponentFromMap } from '../../../../bridge/helpers/sdk_component_map';
13
13
  export default function FileUtility(props) {
@@ -36,7 +36,7 @@ export default function FileUtility(props) {
36
36
  jsAction: 'attachFiles',
37
37
  name: thePConn.getLocalizedValue('Attach files', '', '')
38
38
  }
39
- ],
39
+ ], // 2nd and 3rd args empty string until typedef marked correctly
40
40
  fileSecondaryButtons: [
41
41
  {
42
42
  actionID: 'cancel',
@@ -56,7 +56,7 @@ export default function FileUtility(props) {
56
56
  jsAction: 'attachLinks',
57
57
  name: thePConn.getLocalizedValue('Attach links', '', '')
58
58
  }
59
- ],
59
+ ], // 2nd and 3rd args empty string until typedef marked correctly
60
60
  linkSecondaryButtons: [
61
61
  {
62
62
  actionID: 'cancel',
@@ -91,7 +91,7 @@ export default function FileUtility(props) {
91
91
  actions = [
92
92
  {
93
93
  id: `Cancel-${att.ID}`,
94
- text: thePConn.getLocalizedValue('Cancel', '', ''),
94
+ text: thePConn.getLocalizedValue('Cancel', '', ''), // 2nd and 3rd args empty string until typedef marked correctly
95
95
  icon: 'times',
96
96
  onClick: cancelFile
97
97
  }
@@ -105,7 +105,7 @@ export default function FileUtility(props) {
105
105
  'download',
106
106
  {
107
107
  id: `download-${ID}`,
108
- text: isFile ? thePConn.getLocalizedValue('Download', '', '') : thePConn.getLocalizedValue('Open', '', ''),
108
+ text: isFile ? thePConn.getLocalizedValue('Download', '', '') : thePConn.getLocalizedValue('Open', '', ''), // 2nd and 3rd args empty string until typedef marked correctly
109
109
  icon: isFile ? 'download' : 'open',
110
110
  onClick: downloadFile
111
111
  }
@@ -114,7 +114,7 @@ export default function FileUtility(props) {
114
114
  'delete',
115
115
  {
116
116
  id: `Delete-${ID}`,
117
- text: thePConn.getLocalizedValue('Delete', '', ''),
117
+ text: thePConn.getLocalizedValue('Delete', '', ''), // 2nd and 3rd args empty string until typedef marked correctly
118
118
  icon: 'trash',
119
119
  onClick: deleteFile
120
120
  }
@@ -131,7 +131,7 @@ export default function FileUtility(props) {
131
131
  actions = [
132
132
  {
133
133
  id: `Remove-${att.ID}`,
134
- text: thePConn.getLocalizedValue('Remove', '', ''),
134
+ text: thePConn.getLocalizedValue('Remove', '', ''), // 2nd and 3rd args empty string until typedef marked correctly
135
135
  icon: 'trash',
136
136
  onClick: removeFile
137
137
  }
@@ -432,6 +432,6 @@ export default function FileUtility(props) {
432
432
  .catch(() => setProgress(false));
433
433
  }
434
434
  }
435
- return (_jsxs("div", { className: 'psdk-utility', id: 'file-utility', children: [inProgress && (_jsx("div", { className: 'progress-div', children: _jsx(CircularProgress, {}) })), _jsxs("div", { className: 'psdk-header', children: [_jsx("img", { className: 'psdk-file-utility-card-svg-icon', src: headerSvgIcon$ }), _jsx("div", { className: 'header-text', children: header }), _jsx("div", { className: 'psdk-utility-count', id: 'attachments-count', children: list.count }), _jsx("div", { style: { flexGrow: 1 } }), _jsxs("div", { children: [_jsx(IconButton, { id: 'long-button', "aria-controls": open ? 'simple-menu' : undefined, "aria-expanded": open ? 'true' : undefined, "aria-haspopup": 'true', onClick: handleClick, children: _jsx(MoreVertIcon, {}) }), _jsxs(Menu, { style: { marginTop: '3rem' }, id: 'simple-menu', anchorEl: anchorEl, keepMounted: true, open: Boolean(anchorEl), onClose: handleClose, children: [_jsx(MenuItem, { style: { fontSize: '14px' }, onClick: onAddFilesClick, children: thePConn.getLocalizedValue('Add files', '', '') }), ' ', _jsx(MenuItem, { style: { fontSize: '14px' }, onClick: onAddLinksClick, children: thePConn.getLocalizedValue('Add links', '', '') }), ' '] })] })] }), list.data.length > 0 && (_jsx("div", { style: { marginTop: '1rem' }, children: _jsx(SummaryList, { "arItems$": list.data }) })), list.count > 3 && (_jsx("div", { className: 'psdk-utility-view-all', children: _jsx(Button, { style: { textTransform: 'none' }, color: 'primary', onClick: () => setViewAll(true), children: "View all" }) })), fileData.showfileModal && (_jsx("div", { className: 'psdk-dialog-background', children: _jsxs("div", { className: 'psdk-modal-file-top', children: [_jsx("h3", { children: thePConn.getLocalizedValue('Add local files', '', '') }), _jsxs("div", { className: 'psdk-modal-body', children: [_jsx("div", { className: 'psdk-modal-file-selector', children: _jsxs("label", { htmlFor: 'upload-files', children: [_jsx("input", { style: { display: 'none' }, id: 'upload-files', name: 'upload-files', type: 'file', multiple: true, onChange: uploadMyFiles }), _jsx(Button, { variant: 'outlined', color: 'primary', component: 'span', children: thePConn.getLocalizedValue('Attach files', '', '') }), ' '] }) }), fileData.fileList.length > 0 && (_jsx("div", { style: { marginTop: '1rem' }, children: _jsx(SummaryList, { "menuIconOverride$": 'trash', "arItems$": fileData.fileList, "menuIconOverrideAction$": removeFileFromList }) })), fileData.fileList.length === 0 && _jsx("div", {}), _jsx(ActionButtonsForFileUtil, { arMainButtons: fileData.fileMainButtons, arSecondaryButtons: fileData.fileSecondaryButtons, primaryAction: onAttachFiles, secondaryAction: closeFilePopup })] })] }) })), linkData.showLinkModal && (_jsx("div", { className: 'psdk-dialog-background', children: _jsxs("div", { className: 'psdk-modal-file-top', children: [_jsx("h3", { children: thePConn.getLocalizedValue('Add links', '', '') }), " ", _jsxs("div", { className: 'psdk-modal-body', children: [_jsxs("div", { className: 'psdk-modal-links-row', children: [_jsxs("div", { className: 'psdk-links-two-column', children: [_jsx("div", { className: 'psdk-modal-link-data', children: _jsx(TextField, { fullWidth: true, variant: 'outlined', label: 'Link title', size: 'small', required: required, value: link.title, onChange: fieldlinkOnChange }) }), _jsx("div", { className: 'psdk-modal-link-data', children: _jsx(TextField, { fullWidth: true, variant: 'outlined', label: 'URL', size: 'small', required: required, value: link.url, onChange: fieldurlOnChange }) })] }), _jsxs("div", { className: 'psdk-modal-link-add', children: [_jsx(Button, { className: 'psdk-add-link-action', color: 'primary', variant: 'contained', component: 'span', onClick: addLink, disabled: link.disable, children: thePConn.getLocalizedValue('Add link', '', '') }), ' '] })] }), linkData.linksList.length > 0 && (_jsx("div", { style: { marginTop: '1rem' }, children: _jsx(SummaryList, { "menuIconOverride$": 'trash', "arItems$": linkData.linksList, "menuIconOverrideAction$": removeLinksFromList }) })), _jsx(ActionButtonsForFileUtil, { arMainButtons: linkData.linkMainButtons, arSecondaryButtons: linkData.linkSecondaryButtons, primaryAction: onAttachLinks, secondaryAction: closeAddLinksPopup })] })] }) })), showViewAllModal && (_jsx("div", { className: 'psdk-dialog-background', children: _jsxs("div", { className: 'psdk-modal-file-top', children: [_jsxs("div", { className: 'psdk-view-all-header', children: [_jsx("h3", { children: thePConn.getLocalizedValue('Attachments', '', '') }), " ", _jsx("button", { type: 'button', className: 'psdk-close-button', onClick: () => setViewAll(false), children: _jsx("img", { className: 'psdk-utility-card-actions-svg-icon', src: closeSvgIcon }) })] }), _jsx("div", { className: 'psdk-view-all-body', children: _jsx(SummaryList, { "arItems$": vaItems }) })] }) }))] }));
435
+ return (_jsxs("div", { className: 'psdk-utility', id: 'file-utility', children: [inProgress && (_jsx("div", { className: 'progress-div', children: _jsx(CircularProgress, {}) })), _jsxs("div", { className: 'psdk-header', children: [_jsx("img", { className: 'psdk-file-utility-card-svg-icon', src: headerSvgIcon$ }), _jsx("div", { className: 'header-text', children: header }), _jsx("div", { className: 'psdk-utility-count', id: 'attachments-count', children: list.count }), _jsx("div", { style: { flexGrow: 1 } }), _jsxs("div", { children: [_jsx(IconButton, { id: 'long-button', "aria-controls": open ? 'simple-menu' : undefined, "aria-expanded": open ? 'true' : undefined, "aria-haspopup": 'true', onClick: handleClick, size: 'large', children: _jsx(MoreVertIcon, {}) }), _jsxs(Menu, { id: 'simple-menu', anchorEl: anchorEl, keepMounted: true, open: Boolean(anchorEl), onClose: handleClose, children: [_jsx(MenuItem, { style: { fontSize: '14px' }, onClick: onAddFilesClick, children: thePConn.getLocalizedValue('Add files', '', '') }), ' ', _jsx(MenuItem, { style: { fontSize: '14px' }, onClick: onAddLinksClick, children: thePConn.getLocalizedValue('Add links', '', '') }), ' '] })] })] }), list.data.length > 0 && (_jsx("div", { style: { marginTop: '1rem' }, children: _jsx(SummaryList, { "arItems$": list.data }) })), list.count > 3 && (_jsx("div", { className: 'psdk-utility-view-all', children: _jsx(Button, { style: { textTransform: 'none' }, color: 'primary', onClick: () => setViewAll(true), children: "View all" }) })), fileData.showfileModal && (_jsx("div", { className: 'psdk-dialog-background', children: _jsxs("div", { className: 'psdk-modal-file-top', children: [_jsx("h3", { children: thePConn.getLocalizedValue('Add local files', '', '') }), _jsxs("div", { className: 'psdk-modal-body', children: [_jsx("div", { className: 'psdk-modal-file-selector', children: _jsxs("label", { htmlFor: 'upload-files', children: [_jsx("input", { style: { display: 'none' }, id: 'upload-files', name: 'upload-files', type: 'file', multiple: true, onChange: uploadMyFiles }), _jsx(Button, { variant: 'outlined', color: 'primary', component: 'span', children: thePConn.getLocalizedValue('Attach files', '', '') }), ' '] }) }), fileData.fileList.length > 0 && (_jsx("div", { style: { marginTop: '1rem' }, children: _jsx(SummaryList, { "menuIconOverride$": 'trash', "arItems$": fileData.fileList, "menuIconOverrideAction$": removeFileFromList }) })), fileData.fileList.length === 0 && _jsx("div", {}), _jsx(ActionButtonsForFileUtil, { arMainButtons: fileData.fileMainButtons, arSecondaryButtons: fileData.fileSecondaryButtons, primaryAction: onAttachFiles, secondaryAction: closeFilePopup })] })] }) })), linkData.showLinkModal && (_jsx("div", { className: 'psdk-dialog-background', children: _jsxs("div", { className: 'psdk-modal-file-top', children: [_jsx("h3", { children: thePConn.getLocalizedValue('Add links', '', '') }), " ", _jsxs("div", { className: 'psdk-modal-body', children: [_jsxs("div", { className: 'psdk-modal-links-row', children: [_jsxs("div", { className: 'psdk-links-two-column', children: [_jsx("div", { className: 'psdk-modal-link-data', children: _jsx(TextField, { fullWidth: true, variant: 'outlined', label: 'Link title', size: 'small', required: required, value: link.title, onChange: fieldlinkOnChange }) }), _jsx("div", { className: 'psdk-modal-link-data', children: _jsx(TextField, { fullWidth: true, variant: 'outlined', label: 'URL', size: 'small', required: required, value: link.url, onChange: fieldurlOnChange }) })] }), _jsxs("div", { className: 'psdk-modal-link-add', children: [_jsx(Button, { className: 'psdk-add-link-action', color: 'primary', variant: 'contained', component: 'span', onClick: addLink, disabled: link.disable, children: thePConn.getLocalizedValue('Add link', '', '') }), ' '] })] }), linkData.linksList.length > 0 && (_jsx("div", { style: { marginTop: '1rem' }, children: _jsx(SummaryList, { "menuIconOverride$": 'trash', "arItems$": linkData.linksList, "menuIconOverrideAction$": removeLinksFromList }) })), _jsx(ActionButtonsForFileUtil, { arMainButtons: linkData.linkMainButtons, arSecondaryButtons: linkData.linkSecondaryButtons, primaryAction: onAttachLinks, secondaryAction: closeAddLinksPopup })] })] }) })), showViewAllModal && (_jsx("div", { className: 'psdk-dialog-background', children: _jsxs("div", { className: 'psdk-modal-file-top', children: [_jsxs("div", { className: 'psdk-view-all-header', children: [_jsx("h3", { children: thePConn.getLocalizedValue('Attachments', '', '') }), " ", _jsx("button", { type: 'button', className: 'psdk-close-button', onClick: () => setViewAll(false), children: _jsx("img", { className: 'psdk-utility-card-actions-svg-icon', src: closeSvgIcon }) })] }), _jsx("div", { className: 'psdk-view-all-body', children: _jsx(SummaryList, { "arItems$": vaItems }) })] }) }))] }));
436
436
  }
437
437
  //# sourceMappingURL=FileUtility.js.map