@pega/react-sdk-components 0.23.26 → 8.8.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (553) hide show
  1. package/lib/bridge/Context/StoreContext.d.ts +3 -2
  2. package/lib/bridge/Context/StoreContext.d.ts.map +1 -1
  3. package/lib/bridge/Context/StoreContext.js +2 -3
  4. package/lib/bridge/Context/StoreContext.js.map +1 -1
  5. package/lib/bridge/helpers/sdk_component_map.d.ts +1 -0
  6. package/lib/bridge/helpers/sdk_component_map.d.ts.map +1 -1
  7. package/lib/bridge/helpers/sdk_component_map.js +22 -0
  8. package/lib/bridge/helpers/sdk_component_map.js.map +1 -1
  9. package/lib/bridge/react_pconnect.d.ts.map +1 -1
  10. package/lib/bridge/react_pconnect.js +2 -14
  11. package/lib/bridge/react_pconnect.js.map +1 -1
  12. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts +10 -0
  13. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts.map +1 -0
  14. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js +19 -0
  15. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.map +1 -0
  16. package/lib/components/designSystemExtension/AlertBanner/index.d.ts +2 -0
  17. package/lib/components/designSystemExtension/AlertBanner/index.d.ts.map +1 -0
  18. package/lib/components/designSystemExtension/AlertBanner/index.js +2 -0
  19. package/lib/components/designSystemExtension/AlertBanner/index.js.map +1 -0
  20. package/lib/components/designSystemExtension/Banner/Banner.d.ts +15 -1
  21. package/lib/components/designSystemExtension/Banner/Banner.d.ts.map +1 -1
  22. package/lib/components/designSystemExtension/Banner/Banner.js.map +1 -1
  23. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts +6 -9
  24. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
  25. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +3 -7
  26. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
  27. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts +4 -10
  28. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts.map +1 -1
  29. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +1 -8
  30. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
  31. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts +6 -2
  32. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
  33. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +3 -3
  34. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
  35. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts +7 -2
  36. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts.map +1 -1
  37. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js +4 -4
  38. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
  39. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts +7 -2
  40. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts.map +1 -1
  41. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +3 -3
  42. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
  43. package/lib/components/designSystemExtension/Operator/Operator.d.ts +17 -7
  44. package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
  45. package/lib/components/designSystemExtension/Operator/Operator.js +13 -16
  46. package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
  47. package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +5 -1
  48. package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
  49. package/lib/components/designSystemExtension/Pulse/Pulse.js +3 -6
  50. package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
  51. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts +19 -0
  52. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -0
  53. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +77 -0
  54. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -0
  55. package/lib/components/designSystemExtension/RichTextEditor/index.d.ts +2 -0
  56. package/lib/components/designSystemExtension/RichTextEditor/index.d.ts.map +1 -0
  57. package/lib/components/designSystemExtension/RichTextEditor/index.js +2 -0
  58. package/lib/components/designSystemExtension/RichTextEditor/index.js.map +1 -0
  59. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts +6 -1
  60. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts.map +1 -1
  61. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js +2 -2
  62. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
  63. package/lib/components/field/AutoComplete/AutoComplete.d.ts +15 -1
  64. package/lib/components/field/AutoComplete/AutoComplete.d.ts.map +1 -1
  65. package/lib/components/field/AutoComplete/AutoComplete.js +17 -15
  66. package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
  67. package/lib/components/field/CancelAlert/CancelAlert.d.ts +7 -2
  68. package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
  69. package/lib/components/field/CancelAlert/CancelAlert.js +12 -10
  70. package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
  71. package/lib/components/field/Checkbox/Checkbox.d.ts +19 -1
  72. package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
  73. package/lib/components/field/Checkbox/Checkbox.js +12 -10
  74. package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
  75. package/lib/components/field/Currency/Currency.d.ts +6 -1
  76. package/lib/components/field/Currency/Currency.d.ts.map +1 -1
  77. package/lib/components/field/Currency/Currency.js +11 -11
  78. package/lib/components/field/Currency/Currency.js.map +1 -1
  79. package/lib/components/field/Currency/currency-utils.d.ts +1 -1
  80. package/lib/components/field/Currency/currency-utils.d.ts.map +1 -1
  81. package/lib/components/field/Currency/currency-utils.js +1 -1
  82. package/lib/components/field/Currency/currency-utils.js.map +1 -1
  83. package/lib/components/field/Date/Date.d.ts +5 -1
  84. package/lib/components/field/Date/Date.d.ts.map +1 -1
  85. package/lib/components/field/Date/Date.js +19 -11
  86. package/lib/components/field/Date/Date.js.map +1 -1
  87. package/lib/components/field/DateTime/DateTime.d.ts +5 -1
  88. package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
  89. package/lib/components/field/DateTime/DateTime.js +15 -9
  90. package/lib/components/field/DateTime/DateTime.js.map +1 -1
  91. package/lib/components/field/Decimal/Decimal.d.ts +8 -1
  92. package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
  93. package/lib/components/field/Decimal/Decimal.js +43 -9
  94. package/lib/components/field/Decimal/Decimal.js.map +1 -1
  95. package/lib/components/field/Dropdown/Dropdown.d.ts +10 -1
  96. package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
  97. package/lib/components/field/Dropdown/Dropdown.js +26 -9
  98. package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
  99. package/lib/components/field/Email/Email.d.ts +5 -1
  100. package/lib/components/field/Email/Email.d.ts.map +1 -1
  101. package/lib/components/field/Email/Email.js +7 -5
  102. package/lib/components/field/Email/Email.js.map +1 -1
  103. package/lib/components/field/Integer/Integer.d.ts +5 -1
  104. package/lib/components/field/Integer/Integer.d.ts.map +1 -1
  105. package/lib/components/field/Integer/Integer.js +6 -4
  106. package/lib/components/field/Integer/Integer.js.map +1 -1
  107. package/lib/components/field/Percentage/Percentage.d.ts +5 -1
  108. package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
  109. package/lib/components/field/Percentage/Percentage.js +6 -4
  110. package/lib/components/field/Percentage/Percentage.js.map +1 -1
  111. package/lib/components/field/Phone/Phone.d.ts +5 -1
  112. package/lib/components/field/Phone/Phone.d.ts.map +1 -1
  113. package/lib/components/field/Phone/Phone.js +10 -7
  114. package/lib/components/field/Phone/Phone.js.map +1 -1
  115. package/lib/components/field/RadioButtons/RadioButtons.d.ts +7 -1
  116. package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
  117. package/lib/components/field/RadioButtons/RadioButtons.js +24 -11
  118. package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
  119. package/lib/components/field/RichText/RichText.d.ts +7 -0
  120. package/lib/components/field/RichText/RichText.d.ts.map +1 -0
  121. package/lib/components/field/RichText/RichText.js +51 -0
  122. package/lib/components/field/RichText/RichText.js.map +1 -0
  123. package/lib/components/field/RichText/index.d.ts +2 -0
  124. package/lib/components/field/RichText/index.d.ts.map +1 -0
  125. package/lib/components/field/RichText/index.js +2 -0
  126. package/lib/components/field/RichText/index.js.map +1 -0
  127. package/lib/components/field/ScalarList/ScalarList.d.ts +13 -0
  128. package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -0
  129. package/lib/components/field/ScalarList/ScalarList.js +34 -0
  130. package/lib/components/field/ScalarList/ScalarList.js.map +1 -0
  131. package/lib/components/field/ScalarList/index.d.ts +2 -0
  132. package/lib/components/field/ScalarList/index.d.ts.map +1 -0
  133. package/lib/components/field/ScalarList/index.js +2 -0
  134. package/lib/components/field/ScalarList/index.js.map +1 -0
  135. package/lib/components/field/SemanticLink/SemanticLink.d.ts +5 -9
  136. package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
  137. package/lib/components/field/SemanticLink/SemanticLink.js +10 -14
  138. package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
  139. package/lib/components/field/SemanticLink/utils.d.ts.map +1 -1
  140. package/lib/components/field/SemanticLink/utils.js.map +1 -1
  141. package/lib/components/field/TextArea/TextArea.d.ts +6 -1
  142. package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
  143. package/lib/components/field/TextArea/TextArea.js +5 -3
  144. package/lib/components/field/TextArea/TextArea.js.map +1 -1
  145. package/lib/components/field/TextContent/TextContent.d.ts +7 -1
  146. package/lib/components/field/TextContent/TextContent.d.ts.map +1 -1
  147. package/lib/components/field/TextContent/TextContent.js.map +1 -1
  148. package/lib/components/field/TextInput/TextInput.d.ts +6 -1
  149. package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
  150. package/lib/components/field/TextInput/TextInput.js +24 -5
  151. package/lib/components/field/TextInput/TextInput.js.map +1 -1
  152. package/lib/components/field/Time/Time.d.ts +5 -1
  153. package/lib/components/field/Time/Time.d.ts.map +1 -1
  154. package/lib/components/field/Time/Time.js +14 -8
  155. package/lib/components/field/Time/Time.js.map +1 -1
  156. package/lib/components/field/URL/URL.d.ts +5 -1
  157. package/lib/components/field/URL/URL.d.ts.map +1 -1
  158. package/lib/components/field/URL/URL.js +11 -5
  159. package/lib/components/field/URL/URL.js.map +1 -1
  160. package/lib/components/field/UserReference/UserReference.d.ts +19 -40
  161. package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
  162. package/lib/components/field/UserReference/UserReference.js +16 -45
  163. package/lib/components/field/UserReference/UserReference.js.map +1 -1
  164. package/lib/components/helpers/attachmentHelpers.d.ts +6 -6
  165. package/lib/components/helpers/attachmentHelpers.d.ts.map +1 -1
  166. package/lib/components/helpers/attachmentHelpers.js +2 -2
  167. package/lib/components/helpers/attachmentHelpers.js.map +1 -1
  168. package/lib/components/helpers/auth.d.ts +8 -6
  169. package/lib/components/helpers/auth.d.ts.map +1 -1
  170. package/lib/components/helpers/auth.js +642 -327
  171. package/lib/components/helpers/auth.js.map +1 -1
  172. package/lib/components/helpers/authManager.d.ts +20 -17
  173. package/lib/components/helpers/authManager.d.ts.map +1 -1
  174. package/lib/components/helpers/authManager.js +713 -438
  175. package/lib/components/helpers/authManager.js.map +1 -1
  176. package/lib/components/helpers/case-utils.d.ts +20 -0
  177. package/lib/components/helpers/case-utils.d.ts.map +1 -0
  178. package/lib/components/helpers/case-utils.js +82 -0
  179. package/lib/components/helpers/case-utils.js.map +1 -0
  180. package/lib/components/helpers/common-utils.d.ts +2 -0
  181. package/lib/components/helpers/common-utils.d.ts.map +1 -0
  182. package/lib/components/helpers/common-utils.js +5 -0
  183. package/lib/components/helpers/common-utils.js.map +1 -0
  184. package/lib/components/helpers/config_access.d.ts.map +1 -1
  185. package/lib/components/helpers/config_access.js +28 -98
  186. package/lib/components/helpers/config_access.js.map +1 -1
  187. package/lib/components/helpers/data_page.d.ts.map +1 -1
  188. package/lib/components/helpers/data_page.js.map +1 -1
  189. package/lib/components/helpers/date-format-utils.d.ts +1 -6
  190. package/lib/components/helpers/date-format-utils.d.ts.map +1 -1
  191. package/lib/components/helpers/date-format-utils.js +23 -14
  192. package/lib/components/helpers/date-format-utils.js.map +1 -1
  193. package/lib/components/helpers/event-utils.d.ts +1 -1
  194. package/lib/components/helpers/event-utils.d.ts.map +1 -1
  195. package/lib/components/helpers/event-utils.js.map +1 -1
  196. package/lib/components/helpers/field-group-utils.d.ts +15 -2
  197. package/lib/components/helpers/field-group-utils.d.ts.map +1 -1
  198. package/lib/components/helpers/field-group-utils.js +3 -3
  199. package/lib/components/helpers/field-group-utils.js.map +1 -1
  200. package/lib/components/helpers/formatters/Boolean.d.ts +3 -3
  201. package/lib/components/helpers/formatters/Boolean.d.ts.map +1 -1
  202. package/lib/components/helpers/formatters/Boolean.js.map +1 -1
  203. package/lib/components/helpers/formatters/Currency.d.ts +6 -6
  204. package/lib/components/helpers/formatters/Currency.d.ts.map +1 -1
  205. package/lib/components/helpers/formatters/Currency.js +6 -5
  206. package/lib/components/helpers/formatters/Currency.js.map +1 -1
  207. package/lib/components/helpers/formatters/CurrencyMap.d.ts +881 -1399
  208. package/lib/components/helpers/formatters/CurrencyMap.d.ts.map +1 -1
  209. package/lib/components/helpers/formatters/CurrencyMap.js.map +1 -1
  210. package/lib/components/helpers/formatters/Date.d.ts +4 -4
  211. package/lib/components/helpers/formatters/Date.d.ts.map +1 -1
  212. package/lib/components/helpers/formatters/Date.js +1 -1
  213. package/lib/components/helpers/formatters/Date.js.map +1 -1
  214. package/lib/components/helpers/formatters/common.d.ts +2 -2
  215. package/lib/components/helpers/formatters/common.d.ts.map +1 -1
  216. package/lib/components/helpers/formatters/common.js +4 -5
  217. package/lib/components/helpers/formatters/common.js.map +1 -1
  218. package/lib/components/helpers/formatters/index.d.ts +11 -11
  219. package/lib/components/helpers/formatters/index.d.ts.map +1 -1
  220. package/lib/components/helpers/formatters/index.js.map +1 -1
  221. package/lib/components/helpers/reactContextHelpers.d.ts +3 -2
  222. package/lib/components/helpers/reactContextHelpers.d.ts.map +1 -1
  223. package/lib/components/helpers/reactContextHelpers.js.map +1 -1
  224. package/lib/components/helpers/simpleTableHelpers.d.ts +5 -3
  225. package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
  226. package/lib/components/helpers/simpleTableHelpers.js +10 -5
  227. package/lib/components/helpers/simpleTableHelpers.js.map +1 -1
  228. package/lib/components/helpers/state-utils.d.ts +4 -0
  229. package/lib/components/helpers/state-utils.d.ts.map +1 -0
  230. package/lib/components/helpers/state-utils.js +36 -0
  231. package/lib/components/helpers/state-utils.js.map +1 -0
  232. package/lib/components/helpers/template-utils.d.ts +7 -3
  233. package/lib/components/helpers/template-utils.d.ts.map +1 -1
  234. package/lib/components/helpers/template-utils.js.map +1 -1
  235. package/lib/components/helpers/utils.d.ts +1 -1
  236. package/lib/components/helpers/utils.d.ts.map +1 -1
  237. package/lib/components/helpers/utils.js +9 -3
  238. package/lib/components/helpers/utils.js.map +1 -1
  239. package/lib/components/helpers/versionHelpers.d.ts.map +1 -1
  240. package/lib/components/helpers/versionHelpers.js.map +1 -1
  241. package/lib/components/infra/ActionButtons/ActionButtons.d.ts +6 -13
  242. package/lib/components/infra/ActionButtons/ActionButtons.d.ts.map +1 -1
  243. package/lib/components/infra/ActionButtons/ActionButtons.js +5 -15
  244. package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
  245. package/lib/components/infra/Assignment/Assignment.d.ts +9 -14
  246. package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
  247. package/lib/components/infra/Assignment/Assignment.js +32 -33
  248. package/lib/components/infra/Assignment/Assignment.js.map +1 -1
  249. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +8 -14
  250. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
  251. package/lib/components/infra/AssignmentCard/AssignmentCard.js +3 -16
  252. package/lib/components/infra/AssignmentCard/AssignmentCard.js.map +1 -1
  253. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +1 -21
  254. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
  255. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +53 -52
  256. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
  257. package/lib/components/infra/Containers/FlowContainer/helpers.d.ts +12 -12
  258. package/lib/components/infra/Containers/FlowContainer/helpers.d.ts.map +1 -1
  259. package/lib/components/infra/Containers/FlowContainer/helpers.js +17 -16
  260. package/lib/components/infra/Containers/FlowContainer/helpers.js.map +1 -1
  261. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +8 -17
  262. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
  263. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +22 -24
  264. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
  265. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +9 -22
  266. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
  267. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +7 -22
  268. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
  269. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +9 -19
  270. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
  271. package/lib/components/infra/DashboardFilter/DashboardFilter.js +2 -16
  272. package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
  273. package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -1
  274. package/lib/components/infra/DashboardFilter/filterUtils.js +1 -1
  275. package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
  276. package/lib/components/infra/DeferLoad/DeferLoad.d.ts +1 -14
  277. package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
  278. package/lib/components/infra/DeferLoad/DeferLoad.js +13 -15
  279. package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
  280. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +5 -12
  281. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
  282. package/lib/components/infra/ErrorBoundary/ErrorBoundary.js +9 -16
  283. package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
  284. package/lib/components/infra/MultiStep/MultiStep.d.ts +11 -17
  285. package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
  286. package/lib/components/infra/MultiStep/MultiStep.js +6 -20
  287. package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
  288. package/lib/components/infra/NavBar/NavBar.d.ts +8 -16
  289. package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
  290. package/lib/components/infra/NavBar/NavBar.js +9 -20
  291. package/lib/components/infra/NavBar/NavBar.js.map +1 -1
  292. package/lib/components/infra/Reference/Reference.d.ts +8 -17
  293. package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
  294. package/lib/components/infra/Reference/Reference.js +1 -15
  295. package/lib/components/infra/Reference/Reference.js.map +1 -1
  296. package/lib/components/infra/Region/Region.d.ts +4 -7
  297. package/lib/components/infra/Region/Region.d.ts.map +1 -1
  298. package/lib/components/infra/Region/Region.js +0 -4
  299. package/lib/components/infra/Region/Region.js.map +1 -1
  300. package/lib/components/infra/RootContainer/RootContainer.d.ts +1 -21
  301. package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
  302. package/lib/components/infra/RootContainer/RootContainer.js +16 -36
  303. package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
  304. package/lib/components/infra/Stages/Stages.d.ts +5 -8
  305. package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
  306. package/lib/components/infra/Stages/Stages.js +3 -7
  307. package/lib/components/infra/Stages/Stages.js.map +1 -1
  308. package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.d.ts.map +1 -1
  309. package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js.map +1 -1
  310. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts +4 -10
  311. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts.map +1 -1
  312. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +4 -9
  313. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
  314. package/lib/components/infra/View/View.d.ts +13 -16
  315. package/lib/components/infra/View/View.d.ts.map +1 -1
  316. package/lib/components/infra/View/View.js +8 -54
  317. package/lib/components/infra/View/View.js.map +1 -1
  318. package/lib/components/template/AppShell/AppShell.d.ts +20 -15
  319. package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
  320. package/lib/components/template/AppShell/AppShell.js +17 -29
  321. package/lib/components/template/AppShell/AppShell.js.map +1 -1
  322. package/lib/components/template/BannerPage/BannerPage.d.ts +11 -23
  323. package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
  324. package/lib/components/template/BannerPage/BannerPage.js +4 -22
  325. package/lib/components/template/BannerPage/BannerPage.js.map +1 -1
  326. package/lib/components/template/CaseSummary/CaseSummary.d.ts +5 -7
  327. package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
  328. package/lib/components/template/CaseSummary/CaseSummary.js +6 -6
  329. package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
  330. package/lib/components/template/CaseView/CaseView.d.ts +10 -22
  331. package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
  332. package/lib/components/template/CaseView/CaseView.js +41 -45
  333. package/lib/components/template/CaseView/CaseView.js.map +1 -1
  334. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +8 -13
  335. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
  336. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +9 -16
  337. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
  338. package/lib/components/template/Confirmation/Confirmation.d.ts +10 -16
  339. package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
  340. package/lib/components/template/Confirmation/Confirmation.js +12 -23
  341. package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
  342. package/lib/components/template/DataReference/DataReference.d.ts +1 -31
  343. package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
  344. package/lib/components/template/DataReference/DataReference.js +41 -48
  345. package/lib/components/template/DataReference/DataReference.js.map +1 -1
  346. package/lib/components/template/DefaultForm/DefaultForm.d.ts +1 -11
  347. package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
  348. package/lib/components/template/DefaultForm/DefaultForm.js +18 -15
  349. package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
  350. package/lib/components/template/DefaultForm/utils/index.d.ts +3 -0
  351. package/lib/components/template/DefaultForm/utils/index.d.ts.map +1 -0
  352. package/lib/components/template/DefaultForm/utils/index.js +27 -0
  353. package/lib/components/template/DefaultForm/utils/index.js.map +1 -0
  354. package/lib/components/template/Details/Details/Details.d.ts +1 -16
  355. package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
  356. package/lib/components/template/Details/Details/Details.js +10 -15
  357. package/lib/components/template/Details/Details/Details.js.map +1 -1
  358. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +7 -15
  359. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
  360. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js +1 -13
  361. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
  362. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +1 -16
  363. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
  364. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +14 -16
  365. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
  366. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +1 -16
  367. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
  368. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +14 -16
  369. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
  370. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +12 -19
  371. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
  372. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +7 -21
  373. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
  374. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +7 -7
  375. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
  376. package/lib/components/template/InlineDashboard/InlineDashboard.js +0 -5
  377. package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
  378. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +8 -15
  379. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
  380. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js +5 -14
  381. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js.map +1 -1
  382. package/lib/components/template/ListPage/ListPage.d.ts +5 -13
  383. package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
  384. package/lib/components/template/ListPage/ListPage.js +6 -10
  385. package/lib/components/template/ListPage/ListPage.js.map +1 -1
  386. package/lib/components/template/ListView/DefaultViewMeta.d.ts +1 -90
  387. package/lib/components/template/ListView/DefaultViewMeta.d.ts.map +1 -1
  388. package/lib/components/template/ListView/DefaultViewMeta.js.map +1 -1
  389. package/lib/components/template/ListView/ListView.d.ts +1 -9
  390. package/lib/components/template/ListView/ListView.d.ts.map +1 -1
  391. package/lib/components/template/ListView/ListView.js +96 -100
  392. package/lib/components/template/ListView/ListView.js.map +1 -1
  393. package/lib/components/template/ListView/hooks.d.ts.map +1 -1
  394. package/lib/components/template/ListView/hooks.js +0 -1
  395. package/lib/components/template/ListView/hooks.js.map +1 -1
  396. package/lib/components/template/ListView/utils.d.ts +72 -16
  397. package/lib/components/template/ListView/utils.d.ts.map +1 -1
  398. package/lib/components/template/ListView/utils.js +143 -3
  399. package/lib/components/template/ListView/utils.js.map +1 -1
  400. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +9 -13
  401. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
  402. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js +2 -13
  403. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -1
  404. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +10 -1
  405. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -1
  406. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js.map +1 -1
  407. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +1 -16
  408. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
  409. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +14 -16
  410. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
  411. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +5 -1
  412. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -1
  413. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js.map +1 -1
  414. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +7 -14
  415. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
  416. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js +4 -13
  417. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -1
  418. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +4 -7
  419. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
  420. package/lib/components/template/OneColumn/OneColumn/OneColumn.js +0 -5
  421. package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
  422. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +4 -8
  423. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
  424. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js +3 -6
  425. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -1
  426. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +4 -7
  427. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
  428. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js +0 -5
  429. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js.map +1 -1
  430. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +1 -15
  431. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
  432. package/lib/components/template/PromotedFilters/PromotedFilters.js +17 -13
  433. package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
  434. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
  435. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js +57 -5
  436. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
  437. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +18 -1
  438. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
  439. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +5 -5
  440. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
  441. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +1 -29
  442. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
  443. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js +22 -28
  444. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
  445. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +14 -26
  446. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
  447. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js +5 -26
  448. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
  449. package/lib/components/template/SubTabs/SubTabs.d.ts +4 -10
  450. package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
  451. package/lib/components/template/SubTabs/SubTabs.js +1 -8
  452. package/lib/components/template/SubTabs/SubTabs.js.map +1 -1
  453. package/lib/components/template/SubTabs/tabUtils.d.ts.map +1 -1
  454. package/lib/components/template/SubTabs/tabUtils.js.map +1 -1
  455. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts +5 -11
  456. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
  457. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +1 -12
  458. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
  459. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +4 -8
  460. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
  461. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js +3 -6
  462. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -1
  463. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +5 -11
  464. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
  465. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +1 -9
  466. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
  467. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +10 -1
  468. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
  469. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js +1 -1
  470. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js.map +1 -1
  471. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +1 -16
  472. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
  473. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +31 -23
  474. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
  475. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +5 -1
  476. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -1
  477. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js.map +1 -1
  478. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +7 -14
  479. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
  480. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js +4 -14
  481. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js.map +1 -1
  482. package/lib/components/template/WssNavBar/WssNavBar.d.ts +17 -1
  483. package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -1
  484. package/lib/components/template/WssNavBar/WssNavBar.js +2 -2
  485. package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
  486. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts +8 -17
  487. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
  488. package/lib/components/widget/AppAnnouncement/AppAnnouncement.js +4 -19
  489. package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
  490. package/lib/components/widget/Attachment/Attachment.css +15 -3
  491. package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
  492. package/lib/components/widget/Attachment/Attachment.js +44 -32
  493. package/lib/components/widget/Attachment/Attachment.js.map +1 -1
  494. package/lib/components/widget/CaseHistory/CaseHistory.d.ts +4 -7
  495. package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
  496. package/lib/components/widget/CaseHistory/CaseHistory.js +4 -8
  497. package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
  498. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +8 -1
  499. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts.map +1 -1
  500. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
  501. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +5 -1
  502. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
  503. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +33 -23
  504. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
  505. package/lib/components/widget/Followers/Followers.d.ts +4 -5
  506. package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
  507. package/lib/components/widget/Followers/Followers.js +3 -10
  508. package/lib/components/widget/Followers/Followers.js.map +1 -1
  509. package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
  510. package/lib/components/widget/QuickCreate/QuickCreate.js +12 -4
  511. package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
  512. package/lib/components/widget/SummaryItem/SummaryItem.d.ts +7 -1
  513. package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
  514. package/lib/components/widget/SummaryItem/SummaryItem.js +2 -2
  515. package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
  516. package/lib/components/widget/SummaryList/SummaryList.d.ts +7 -1
  517. package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
  518. package/lib/components/widget/SummaryList/SummaryList.js +5 -2
  519. package/lib/components/widget/SummaryList/SummaryList.js.map +1 -1
  520. package/lib/components/widget/ToDo/ToDo.d.ts +13 -27
  521. package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
  522. package/lib/components/widget/ToDo/ToDo.js +35 -67
  523. package/lib/components/widget/ToDo/ToDo.js.map +1 -1
  524. package/lib/components_map.d.ts +3 -3
  525. package/lib/components_map.d.ts.map +1 -1
  526. package/lib/components_map.js +819 -818
  527. package/lib/components_map.js.map +1 -1
  528. package/lib/doc/KeyReleaseUpdates.md +65 -9
  529. package/lib/hooks/index.d.ts +4 -0
  530. package/lib/hooks/index.d.ts.map +1 -0
  531. package/lib/hooks/index.js +4 -0
  532. package/lib/hooks/index.js.map +1 -0
  533. package/lib/hooks/useAfterInitialEffect.d.ts +9 -0
  534. package/lib/hooks/useAfterInitialEffect.d.ts.map +1 -0
  535. package/lib/hooks/useAfterInitialEffect.js +16 -0
  536. package/lib/hooks/useAfterInitialEffect.js.map +1 -0
  537. package/lib/hooks/useConsolidatedRef.d.ts +9 -0
  538. package/lib/hooks/useConsolidatedRef.d.ts.map +1 -0
  539. package/lib/hooks/useConsolidatedRef.js +30 -0
  540. package/lib/hooks/useConsolidatedRef.js.map +1 -0
  541. package/lib/hooks/useUID.d.ts +8 -0
  542. package/lib/hooks/useUID.d.ts.map +1 -0
  543. package/lib/hooks/useUID.js +14 -0
  544. package/lib/hooks/useUID.js.map +1 -0
  545. package/lib/index.d.ts +1 -0
  546. package/lib/index.d.ts.map +1 -1
  547. package/lib/index.js +2 -1
  548. package/lib/index.js.map +1 -1
  549. package/lib/sdk-pega-component-map.d.ts +15 -1
  550. package/lib/sdk-pega-component-map.js +15 -1
  551. package/lib/sdk-pega-component-map.js.map +1 -1
  552. package/lib/types/PConnProps.d.ts +42 -0
  553. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"CaseHistory.js","sourceRoot":"","sources":["../../../../src/components/widget/CaseHistory/CaseHistory.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,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;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAK5C,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,CAAC,QAAQ;QAC5C,KAAK,EAAE,KAAK,CAAC,OAA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BAAC,eAAe,QAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAmB,CAC3D,CACV,CAAA;YACH,CAAC,CAAC,CAAC;SACJ;QAED,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,OAAO,CACL,6BAAK,EAAE,EAAC,aAAa;QACnB,oBAAC,cAAc;YACb,oBAAC,KAAK;gBACJ,oBAAC,SAAS,QACP,cAAc,EAAE,CACP;gBACZ,oBAAC,SAAS,QACP,YAAY,EAAE,CACL,CACN,CACO,CACb,CACP,CAAA;AACH,CAAC;AAED,WAAW,CAAC,SAAS,GAAG;IACtB,WAAW,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;CACvC,CAAC","sourcesContent":["import React, { useState, useRef, useEffect } from \"react\";\nimport PropTypes from \"prop-types\";\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';\nimport { Utils } from '../../helpers/utils';\n\ndeclare const PCore;\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\n\nexport default function CaseHistory(props) {\n const { getPConnect } = props;\n const thePConn = getPConnect();\n // let waitingForData = true;\n\n const displayedColumns = [\n { label: \"Date\", type: \"DateTime\", fieldName: \"pxTimeCreated\" },\n { label: \"Description\", type: \"TextInput\", fieldName: \"pyMessageKey\" },\n { label: \"User\", type: \"TextInput\", fieldName: \"pyPerformer\" }\n ];\n\n const rowData: any = useRef([]);\n // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars\n const [waitingForData, setWaitingForData] = useState<boolean>(true);\n\n\n const caseID = thePConn.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID);\n const dataViewName = \"D_pyWorkHistory\";\n const context = thePConn.getContextName();\n\n\n function computeRowData(rows: Array<Object>): void {\n const theRowData: Array<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: Object, rowValIndex) => {\n const theType = column[\"type\"];\n const theFieldName = column[\"fieldName\"];\n const theValue = ((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\n let bCallSetWaitingForData = true;\n\n const historyData = PCore.getDataApiUtils().getData(\n dataViewName, `{\"dataViewParameters\":[{\"CaseInstanceKey\":\"${caseID}\"}]}`,\n context\n );\n\n historyData.then( (historyJSON: Object) => {\n\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\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\n\n function getTableHeader() {\n const theRowKey = \"CaseHistory.TableHeader\";\n\n const theHeaderCells: Array<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\n function getTableData() {\n const theDataRows: Array<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: Array<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( <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>\n {getTableHeader()}\n </TableHead>\n <TableBody>\n {getTableData()}\n </TableBody>\n </Table>\n </TableContainer>\n </div>\n )\n}\n\nCaseHistory.propTypes = {\n getPConnect: PropTypes.func.isRequired\n};\n"]}
1
+ {"version":3,"file":"CaseHistory.js","sourceRoot":"","sources":["../../../../src/components/widget/CaseHistory/CaseHistory.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAS,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,KAAK,MAAM,yBAAyB,CAAC;AAC5C,OAAO,SAAS,MAAM,6BAA6B,CAAC;AACpD,OAAO,SAAS,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AA;QAEF,OAAO,oBAAC,QAAQ,IAAC,GAAG,EAAE,SAAS,IAAG,cAAc,CAAY,CAAC;IAC/D,CAAC;IAGD,SAAS,YAAY;QACnB,MAAM,WAAW,GAAe,EAAE,CAAC;QAEnC,sEAAsE;QACtE,8CAA8C;QAC9C,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;YAC9B,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,OAAsB,EAAE,KAAK,EAAE,EAAE;gBACxD,yEAAyE;gBACzE,MAAM,MAAM,GAAG,eAAe,KAAK,EAAE,CAAC;gBACtC,WAAW,CAAC,IAAI,CAAE,oBAAC,QAAQ,IAAC,GAAG,EAAE,MAAM;oBACrC,oBAAC,eAAe,QAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAmB;oBACpE,oBAAC,eAAe,QAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAmB;oBACpE,oBAAC,eAAe,QAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAmB,CAC3D,CACV,CAAA;YACH,CAAC,CAAC,CAAC;SACJ;QAED,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,OAAO,CACL,6BAAK,EAAE,EAAC,aAAa;QACnB,oBAAC,cAAc;YACb,oBAAC,KAAK;gBACJ,oBAAC,SAAS,QACP,cAAc,EAAE,CACP;gBACZ,oBAAC,SAAS,QACP,YAAY,EAAE,CACL,CACN,CACO,CACb,CACP,CAAA;AACH,CAAC","sourcesContent":["import React, { useState, useRef, useEffect } 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';\nimport { Utils } from '../../helpers/utils';\nimport type { PConnProps } from '../../../types/PConnProps';\n\n\ninterface CaseHistoryProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n}\n\n\n// Remove this and use \"real\" PCore type once .d.ts is fixed (currently shows 2 errors)\ndeclare const PCore: any;\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\n\nexport default function CaseHistory(props:CaseHistoryProps) {\n const { getPConnect } = props;\n const thePConn = getPConnect();\n // let waitingForData = true;\n\n const displayedColumns = [\n { label: thePConn.getLocalizedValue('Date', '', ''), type: \"DateTime\", fieldName: \"pxTimeCreated\" }, // 2nd and 3rd args empty string until typedef marked correctly\n { label: thePConn.getLocalizedValue('Description', '', ''), type: \"TextInput\", fieldName: \"pyMessageKey\" }, // 2nd and 3rd args empty string until typedef marked correctly\n { label: thePConn.getLocalizedValue('Performed by', '', ''), type: \"TextInput\", fieldName: \"pyPerformer\" } // 2nd and 3rd args empty string until typedef marked correctly\n ];\n\n const rowData: any = useRef([]);\n // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars\n const [waitingForData, setWaitingForData] = useState<boolean>(true);\n\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\n function computeRowData(rows: Array<Object>): void {\n const theRowData: Array<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: Object, rowValIndex) => {\n const theType = column[\"type\"];\n const theFieldName = column[\"fieldName\"];\n const theValue = ((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\n let bCallSetWaitingForData = true;\n\n const historyData = PCore.getDataApiUtils().getData(\n dataViewName, `{\"dataViewParameters\":[{\"CaseInstanceKey\":\"${caseID}\"}]}`,\n context\n );\n\n historyData.then( (historyJSON: Object) => {\n\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\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\n\n function getTableHeader() {\n const theRowKey = \"CaseHistory.TableHeader\";\n\n const theHeaderCells: Array<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\n function getTableData() {\n const theDataRows: Array<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: Array<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( <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>\n {getTableHeader()}\n </TableHead>\n <TableBody>\n {getTableData()}\n </TableBody>\n </Table>\n </TableContainer>\n </div>\n )\n}\n"]}
@@ -1,4 +1,11 @@
1
1
  /// <reference types="react" />
2
2
  import './ActionButtonsForFileUtil.css';
3
- export default function ActionButtonsForFileUtil(props: any): JSX.Element;
3
+ interface ActionButtonsForFileUtilProps {
4
+ arMainButtons: Array<any>;
5
+ arSecondaryButtons: Array<any>;
6
+ primaryAction: any;
7
+ secondaryAction: any;
8
+ }
9
+ export default function ActionButtonsForFileUtil(props: ActionButtonsForFileUtilProps): JSX.Element;
10
+ export {};
4
11
  //# sourceMappingURL=ActionButtonsForFileUtil.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ActionButtonsForFileUtil.d.ts","sourceRoot":"","sources":["../../../../../src/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx"],"names":[],"mappings":";AAEA,OAAO,gCAAgC,CAAC;AAExC,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,KAAK,KAAA,eAiBrD"}
1
+ {"version":3,"file":"ActionButtonsForFileUtil.d.ts","sourceRoot":"","sources":["../../../../../src/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx"],"names":[],"mappings":";AAEA,OAAO,gCAAgC,CAAC;AAKxC,UAAU,6BAA6B;IAErC,aAAa,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IAC1B,kBAAkB,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IAC/B,aAAa,EAAE,GAAG,CAAC;IACnB,eAAe,EAAE,GAAG,CAAA;CACrB;AAGD,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,eAiBpF"}
@@ -1 +1 @@
1
- {"version":3,"file":"ActionButtonsForFileUtil.js","sourceRoot":"","sources":["../../../../../src/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,gCAAgC,CAAC;AAExC,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,KAAK;IAEpD,OAAO,CACL,6BAAK,SAAS,EAAC,cAAc;QAC3B,6BAAK,SAAS,EAAC,qBAAqB,IACjC,KAAK,CAAC,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CACpC,oBAAC,MAAM,IAAC,SAAS,EAAC,kBAAkB,EAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,CAAC,eAAe,IAAG,IAAI,CAAC,IAAI,CAAU,CAC9G,CAAC,CACE;QACN,6BAAK,SAAS,EAAC,qBAAqB,IACjC,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAC/B,oBAAC,MAAM,IAAC,SAAS,EAAC,gBAAgB,EAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,CAAC,aAAa,IAAG,IAAI,CAAC,IAAI,CAAU,CAC1G,CAAC,CACE,CACF,CACP,CAAA;AAEH,CAAC","sourcesContent":["import React from \"react\";\nimport { Button } from '@material-ui/core';\nimport './ActionButtonsForFileUtil.css';\n\nexport default function ActionButtonsForFileUtil(props) {\n\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}>{file.name}</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}>{file.name}</Button>\n ))}\n </div>\n </div>\n )\n\n}\n"]}
1
+ {"version":3,"file":"ActionButtonsForFileUtil.js","sourceRoot":"","sources":["../../../../../src/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,gCAAgC,CAAC;AAcxC,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,KAAoC;IAEnF,OAAO,CACL,6BAAK,SAAS,EAAC,cAAc;QAC3B,6BAAK,SAAS,EAAC,qBAAqB,IACjC,KAAK,CAAC,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CACpC,oBAAC,MAAM,IAAC,SAAS,EAAC,kBAAkB,EAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,CAAC,eAAe,IAAG,IAAI,CAAC,IAAI,CAAU,CAC9G,CAAC,CACE;QACN,6BAAK,SAAS,EAAC,qBAAqB,IACjC,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAC/B,oBAAC,MAAM,IAAC,SAAS,EAAC,gBAAgB,EAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,CAAC,aAAa,IAAG,IAAI,CAAC,IAAI,CAAU,CAC1G,CAAC,CACE,CACF,CACP,CAAA;AAEH,CAAC","sourcesContent":["import React from \"react\";\nimport { Button } from '@material-ui/core';\nimport './ActionButtonsForFileUtil.css';\n\n// ActionButtonsForFileUtil does NOT have getPConnect.\n// So, no need to extend PConnProps\n\ninterface ActionButtonsForFileUtilProps {\n // If any, enter additional props that only exist on this component\n arMainButtons: Array<any>,\n arSecondaryButtons: Array<any>,\n primaryAction: any,\n secondaryAction: any\n}\n\n\nexport default function ActionButtonsForFileUtil(props: ActionButtonsForFileUtilProps) {\n\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}>{file.name}</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}>{file.name}</Button>\n ))}\n </div>\n </div>\n )\n\n}\n"]}
@@ -1,4 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import './FileUtility.css';
3
- export default function FileUtility(props: any): JSX.Element;
3
+ import type { PConnProps } from '../../../../types/PConnProps';
4
+ interface FileUtilityProps extends PConnProps {
5
+ }
6
+ export default function FileUtility(props: FileUtilityProps): JSX.Element;
7
+ export {};
4
8
  //# sourceMappingURL=FileUtility.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FileUtility.d.ts","sourceRoot":"","sources":["../../../../../src/components/widget/FileUtility/FileUtility/FileUtility.tsx"],"names":[],"mappings":";AAMA,OAAO,mBAAmB,CAAC;AAS3B,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,KAAA,eAuiBxC"}
1
+ {"version":3,"file":"FileUtility.d.ts","sourceRoot":"","sources":["../../../../../src/components/widget/FileUtility/FileUtility/FileUtility.tsx"],"names":[],"mappings":";AAMA,OAAO,mBAAmB,CAAC;AAQ3B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAG/D,UAAU,gBAAiB,SAAQ,UAAU;CAE5C;AAOD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAC,gBAAgB,eA0iBzD"}
@@ -2,15 +2,19 @@ import React, { useEffect, useState } from "react";
2
2
  import TextField from '@material-ui/core/TextField';
3
3
  import { Utils } from '../../../helpers/utils';
4
4
  import download from "downloadjs";
5
- import SummaryList from '../../SummaryList';
6
- import ActionButtonsForFileUtil from '../ActionButtonsForFileUtil';
5
+ // import SummaryList from '../../SummaryList';
6
+ // import ActionButtonsForFileUtil from '../ActionButtonsForFileUtil';
7
7
  import './FileUtility.css';
8
8
  import { IconButton, Menu, MenuItem } from '@material-ui/core';
9
9
  import MoreVertIcon from '@material-ui/icons/MoreVert';
10
10
  import { Button } from '@material-ui/core';
11
11
  import { validateMaxSize } from '../../../helpers/attachmentHelpers';
12
12
  import { CircularProgress } from "@material-ui/core";
13
+ import { getComponentFromMap } from '../../../../bridge/helpers/sdk_component_map';
13
14
  export default function FileUtility(props) {
15
+ // Get emitted components from map (so we can get any override that may exist)
16
+ const SummaryList = getComponentFromMap('SummaryList');
17
+ const ActionButtonsForFileUtil = getComponentFromMap('ActionButtonsForFileUtil');
14
18
  const { getPConnect } = props;
15
19
  const thePConn = getPConnect();
16
20
  const required = true;
@@ -19,24 +23,24 @@ export default function FileUtility(props) {
19
23
  count: 0
20
24
  };
21
25
  const [list, setList] = useState(listTemp);
22
- const headerSvgIcon$ = Utils.getImageSrc('paper-clip', PCore.getAssetLoader().getStaticServerUrl());
23
- const closeSvgIcon = Utils.getImageSrc("times", PCore.getAssetLoader().getStaticServerUrl());
26
+ const headerSvgIcon$ = Utils.getImageSrc('paper-clip', Utils.getSDKStaticConentUrl());
27
+ const closeSvgIcon = Utils.getImageSrc("times", Utils.getSDKStaticConentUrl());
24
28
  const configProps = thePConn.resolveConfigProps(thePConn.getConfigProps());
25
29
  const header = configProps.label;
26
30
  const fileTemp = {
27
31
  showfileModal: false,
28
32
  fileList: [],
29
33
  attachedFiles: [],
30
- fileMainButtons: [{ actionID: "attach", jsAction: "attachFiles", name: "Attach files" }],
31
- fileSecondaryButtons: [{ actionID: "cancel", jsAction: "cancel", name: "Cancel" }]
34
+ fileMainButtons: [{ actionID: "attach", jsAction: "attachFiles", name: thePConn.getLocalizedValue('Attach files', '', '') }],
35
+ fileSecondaryButtons: [{ actionID: "cancel", jsAction: "cancel", name: thePConn.getLocalizedValue('Cancel', '', '') }] // 2nd and 3rd args empty string until typedef marked correctly
32
36
  };
33
37
  const [fileData, setFileData] = useState(fileTemp);
34
38
  const linkTemp = {
35
39
  showLinkModal: false,
36
40
  linksList: [],
37
41
  attachedLinks: [],
38
- linkMainButtons: [{ actionID: "attach", jsAction: "attachLinks", name: "Attach links" }],
39
- linkSecondaryButtons: [{ actionID: "cancel", jsAction: "cancel", name: "Cancel" }]
42
+ linkMainButtons: [{ actionID: "attach", jsAction: "attachLinks", name: thePConn.getLocalizedValue('Attach links', '', '') }],
43
+ linkSecondaryButtons: [{ actionID: "cancel", jsAction: "cancel", name: thePConn.getLocalizedValue('Cancel', '', '') }] // 2nd and 3rd args empty string until typedef marked correctly
40
44
  };
41
45
  const [linkData, setLinkData] = useState(linkTemp);
42
46
  const [anchorEl, setAnchorEl] = useState(null);
@@ -64,7 +68,7 @@ export default function FileUtility(props) {
64
68
  actions = [
65
69
  {
66
70
  id: `Cancel-${att.ID}`,
67
- text: "Cancel",
71
+ text: thePConn.getLocalizedValue('Cancel', '', ''),
68
72
  icon: "times",
69
73
  onClick: cancelFile
70
74
  }
@@ -78,7 +82,7 @@ export default function FileUtility(props) {
78
82
  "download",
79
83
  {
80
84
  id: `download-${ID}`,
81
- text: isFile ? "Download" : "Open",
85
+ text: isFile ? thePConn.getLocalizedValue('Download', '', '') : thePConn.getLocalizedValue('Open', '', ''),
82
86
  icon: isFile ? "download" : "open",
83
87
  onClick: downloadFile
84
88
  }
@@ -87,7 +91,7 @@ export default function FileUtility(props) {
87
91
  "delete",
88
92
  {
89
93
  id: `Delete-${ID}`,
90
- text: "Delete",
94
+ text: thePConn.getLocalizedValue('Delete', '', ''),
91
95
  icon: "trash",
92
96
  onClick: deleteFile
93
97
  }
@@ -104,7 +108,7 @@ export default function FileUtility(props) {
104
108
  actions = [
105
109
  {
106
110
  id: `Remove-${att.ID}`,
107
- text: "Remove",
111
+ text: thePConn.getLocalizedValue('Remove', '', ''),
108
112
  icon: "trash",
109
113
  onClick: removeFile
110
114
  }
@@ -166,7 +170,7 @@ export default function FileUtility(props) {
166
170
  }
167
171
  const getAttachments = () => {
168
172
  const attachmentUtils = PCore.getAttachmentUtils();
169
- const caseID = thePConn.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID);
173
+ const caseID = thePConn.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID, ''); // 2nd arg empty string until typedef marked correctly
170
174
  if (caseID && caseID !== "") {
171
175
  const attPromise = attachmentUtils.getCaseAttachments(caseID, thePConn.getContextName());
172
176
  attPromise
@@ -211,7 +215,7 @@ export default function FileUtility(props) {
211
215
  function setNewFiles(arFiles) {
212
216
  let index = 0;
213
217
  for (const file of arFiles) {
214
- if (!validateMaxSize(file, 5)) {
218
+ if (!validateMaxSize(file, '5')) {
215
219
  file.error = true;
216
220
  file.meta = "File is too big. Max allowed size is 5MB.";
217
221
  }
@@ -273,7 +277,7 @@ export default function FileUtility(props) {
273
277
  }
274
278
  function onAttachFiles() {
275
279
  const attachmentUtils = PCore.getAttachmentUtils();
276
- const caseID = thePConn.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID);
280
+ const caseID = thePConn.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID, ''); // 2nd arg empty string until typedef marked correctly
277
281
  const onUploadProgress = () => { };
278
282
  const errorHandler = () => { };
279
283
  closeFilePopup();
@@ -377,7 +381,7 @@ export default function FileUtility(props) {
377
381
  }
378
382
  function onAttachLinks() {
379
383
  const attachmentUtils = PCore.getAttachmentUtils();
380
- const caseID = thePConn.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID);
384
+ const caseID = thePConn.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID, ''); // 2nd arg empty string until typedef marked correctly
381
385
  const links = linkData.attachedLinks;
382
386
  closeAddLinksPopup();
383
387
  const linksToAttach = links.map((item) => ({
@@ -411,27 +415,31 @@ export default function FileUtility(props) {
411
415
  React.createElement(IconButton, { id: "long-button", "aria-controls": open ? 'simple-menu' : undefined, "aria-expanded": open ? 'true' : undefined, "aria-haspopup": "true", onClick: handleClick },
412
416
  React.createElement(MoreVertIcon, null)),
413
417
  React.createElement(Menu, { style: { marginTop: '3rem' }, id: "simple-menu", anchorEl: anchorEl, keepMounted: true, open: Boolean(anchorEl), onClose: handleClose },
414
- React.createElement(MenuItem, { style: { fontSize: '14px' }, onClick: onAddFilesClick }, "Add Files"),
415
- React.createElement(MenuItem, { style: { fontSize: '14px' }, onClick: onAddLinksClick }, "Add Links")))),
418
+ React.createElement(MenuItem, { style: { fontSize: '14px' }, onClick: onAddFilesClick }, thePConn.getLocalizedValue('Add files', '', '')),
419
+ " ",
420
+ React.createElement(MenuItem, { style: { fontSize: '14px' }, onClick: onAddLinksClick }, thePConn.getLocalizedValue('Add links', '', '')),
421
+ " "))),
416
422
  list.data.length > 0 && (React.createElement("div", { style: { marginTop: '1rem' } },
417
423
  React.createElement(SummaryList, { "arItems$": list.data }))),
418
424
  list.count > 3 && (React.createElement("div", { className: "psdk-utility-view-all" },
419
425
  React.createElement(Button, { style: { textTransform: 'none' }, color: "primary", onClick: () => setViewAll(true) }, "View all"))),
420
426
  fileData.showfileModal && (React.createElement("div", { className: "psdk-dialog-background" },
421
427
  React.createElement("div", { className: "psdk-modal-file-top" },
422
- React.createElement("h3", null, "Add local files"),
428
+ React.createElement("h3", null, thePConn.getLocalizedValue('Add local files', '', '')),
423
429
  React.createElement("div", { className: "psdk-modal-body" },
424
430
  React.createElement("div", { className: "psdk-modal-file-selector" },
425
431
  React.createElement("label", { htmlFor: 'upload-files' },
426
432
  React.createElement("input", { style: { display: 'none' }, id: 'upload-files', name: 'upload-files', type: 'file', multiple: true, onChange: uploadMyFiles }),
427
- React.createElement(Button, { variant: 'outlined', color: 'primary', component: "span" }, "Upload file(s)"))),
433
+ React.createElement(Button, { variant: 'outlined', color: 'primary', component: "span" }, thePConn.getLocalizedValue('Attach files', '', '')),
434
+ " ")),
428
435
  fileData.fileList.length > 0 && (React.createElement("div", { style: { marginTop: '1rem' } },
429
436
  React.createElement(SummaryList, { "menuIconOverride$": 'trash', "arItems$": fileData.fileList, "menuIconOverrideAction$": removeFileFromList }))),
430
437
  fileData.fileList.length === 0 && (React.createElement("div", null)),
431
438
  React.createElement(ActionButtonsForFileUtil, { arMainButtons: fileData.fileMainButtons, arSecondaryButtons: fileData.fileSecondaryButtons, primaryAction: onAttachFiles, secondaryAction: closeFilePopup }))))),
432
439
  linkData.showLinkModal && (React.createElement("div", { className: "psdk-dialog-background" },
433
440
  React.createElement("div", { className: "psdk-modal-file-top" },
434
- React.createElement("h3", null, "Add links"),
441
+ React.createElement("h3", null, thePConn.getLocalizedValue('Add links', '', '')),
442
+ " ",
435
443
  React.createElement("div", { className: "psdk-modal-body" },
436
444
  React.createElement("div", { className: "psdk-modal-links-row" },
437
445
  React.createElement("div", { className: "psdk-links-two-column" },
@@ -440,14 +448,16 @@ export default function FileUtility(props) {
440
448
  React.createElement("div", { className: "psdk-modal-link-data" },
441
449
  React.createElement(TextField, { fullWidth: true, variant: "outlined", label: "URL", size: "small", required: required, value: link.url, onChange: fieldurlOnChange }))),
442
450
  React.createElement("div", { className: "psdk-modal-link-add" },
443
- React.createElement(Button, { className: "psdk-add-link-action", color: "primary", variant: "contained", component: "span", onClick: addLink, disabled: link.disable }, "Add Link"))),
451
+ React.createElement(Button, { className: "psdk-add-link-action", color: "primary", variant: "contained", component: "span", onClick: addLink, disabled: link.disable }, thePConn.getLocalizedValue('Add link', '', '')),
452
+ " ")),
444
453
  linkData.linksList.length > 0 && (React.createElement("div", { style: { marginTop: '1rem' } },
445
454
  React.createElement(SummaryList, { "menuIconOverride$": 'trash', "arItems$": linkData.linksList, "menuIconOverrideAction$": removeLinksFromList }))),
446
455
  React.createElement(ActionButtonsForFileUtil, { arMainButtons: linkData.linkMainButtons, arSecondaryButtons: linkData.linkSecondaryButtons, primaryAction: onAttachLinks, secondaryAction: closeAddLinksPopup }))))),
447
456
  showViewAllModal && (React.createElement("div", { className: "psdk-dialog-background" },
448
457
  React.createElement("div", { className: "psdk-modal-file-top" },
449
458
  React.createElement("div", { className: "psdk-view-all-header" },
450
- React.createElement("h3", null, "Attachments"),
459
+ React.createElement("h3", null, thePConn.getLocalizedValue('Attachments', '', '')),
460
+ " ",
451
461
  React.createElement("button", { type: "button", className: "psdk-close-button", onClick: () => setViewAll(false) },
452
462
  React.createElement("img", { className: "psdk-utility-card-actions-svg-icon", src: closeSvgIcon }))),
453
463
  React.createElement("div", { className: "psdk-view-all-body" },
@@ -1 +1 @@
1
- {"version":3,"file":"FileUtility.js","sourceRoot":"","sources":["../../../../../src/components/widget/FileUtility/FileUtility/FileUtility.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,SAAS,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,WAAW,MAAM,mBAAmB,CAAC;AAC5C,OAAO,wBAAwB,MAAM,6BAA6B,CAAC;AACnE,OAAO,mBAAmB,CAAC;AAC3B,OAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,YAAY,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,gBAAgB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,CAAC,OAAO,eAAmB,CACrJ,CACF;oBACL,QAAQ,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,6BAAK,KAAK,EAAE,EAAC,SAAS,EAAE,MAAM,EAAC;wBAChE,oBAAC,WAAW,yBAAmB,OAAO,cAAW,QAAQ,CAAC,SAAS,6BAA2B,mBAAmB,GAAgB,CAC7H,CAAC;oBACP,oBAAC,wBAAwB,IAAC,aAAa,EAAE,QAAQ,CAAC,eAAe,EAAE,kBAAkB,EAAE,QAAQ,CAAC,oBAAoB,EACpH,aAAa,EAAE,aAAa,EAAE,eAAe,EAAE,kBAAkB,GAA6B,CAC5F,CACF,CACF,CACP;QACA,gBAAgB,IAAI,CAAC,6BAAK,SAAS,EAAC,wBAAwB;YAC3D,6BAAK,SAAS,EAAC,qBAAqB;gBAClC,6BAAK,SAAS,EAAC,sBAAsB;oBACjC,8CAAoB;oBAEpB,gCAAQ,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAC,mBAAmB,EAAC,OAAO,EAAI,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;wBAAE,6BAAK,SAAS,EAAC,oCAAoC,EAAC,GAAG,EAAE,YAAY,GAAQ,CAAS,CAC5K;gBACN,6BAAK,SAAS,EAAC,oBAAoB;oBAAC,oBAAC,WAAW,gBAAW,OAAO,GAAgB,CAAM,CACpF,CACF,CAAC,CACH,CAEP,CAAA;AACH,CAAC","sourcesContent":["import React, { useEffect, useState } from \"react\";\nimport TextField from '@material-ui/core/TextField';\nimport { Utils } from '../../../helpers/utils';\nimport download from \"downloadjs\";\nimport SummaryList from '../../SummaryList';\nimport ActionButtonsForFileUtil from '../ActionButtonsForFileUtil';\nimport './FileUtility.css';\nimport { IconButton, Menu, MenuItem } from '@material-ui/core';\nimport MoreVertIcon from '@material-ui/icons/MoreVert';\nimport { Button } from '@material-ui/core';\nimport { validateMaxSize } from '../../../helpers/attachmentHelpers';\nimport { CircularProgress } from \"@material-ui/core\";\n\ndeclare const PCore;\n\nexport default function FileUtility(props) {\n const { getPConnect } = props;\n const thePConn = getPConnect();\n const required = true;\n const listTemp = {\n data: [],\n count: 0\n };\n const [list, setList] = useState(listTemp);\n const headerSvgIcon$ = Utils.getImageSrc('paper-clip', PCore.getAssetLoader().getStaticServerUrl());\n const closeSvgIcon = Utils.getImageSrc(\"times\", PCore.getAssetLoader().getStaticServerUrl());\n const configProps: any = thePConn.resolveConfigProps(thePConn.getConfigProps());\n\n const header = configProps.label;\n const fileTemp = {\n showfileModal: false,\n fileList: [],\n attachedFiles: [],\n fileMainButtons: [{ actionID: \"attach\", jsAction: \"attachFiles\", name: \"Attach files\"}],\n fileSecondaryButtons: [{ actionID: \"cancel\", jsAction: \"cancel\", name: \"Cancel\"}]\n };\n const [fileData, setFileData] = useState(fileTemp);\n const linkTemp = {\n showLinkModal: false,\n linksList: [],\n attachedLinks: [],\n linkMainButtons: [{ actionID: \"attach\", jsAction: \"attachLinks\", name: \"Attach links\"}],\n linkSecondaryButtons: [{ actionID: \"cancel\", jsAction: \"cancel\", name: \"Cancel\"}]\n };\n const [linkData, setLinkData] = useState(linkTemp);\n const [anchorEl, setAnchorEl] = useState(null);\n const open = Boolean(anchorEl);\n const [link, setLink] = useState({title: '', url: '', disable: true});\n const [inProgress, setProgress] = useState(false);\n const [showViewAllModal, setViewAll] = useState(false);\n const [vaItems, setFullAttachments] = useState([]);\n\n function addAttachments(attsFromResp: Array<any> = []) {\n attsFromResp = attsFromResp.map((respAtt) => {\n const updatedAtt = {\n ...respAtt,\n meta: `${respAtt.category} . ${Utils.generateDateTime(respAtt.createTime, \"DateTime-Since\")}, ${\n respAtt.createdBy\n }`\n };\n if (updatedAtt.type === \"FILE\") {\n updatedAtt.nameWithExt = updatedAtt.fileName;\n }\n return updatedAtt;\n });\n return attsFromResp;\n }\n\n function getListUtilityItemProps({\n att,\n cancelFile,\n downloadFile,\n deleteFile,\n removeFile\n }) {\n let actions;\n\n\n if (att.progress && att.progress !== 100) {\n actions = [\n {\n id: `Cancel-${att.ID}`,\n text: \"Cancel\",\n icon: \"times\",\n onClick: cancelFile\n }\n ];\n } else if (att.links) {\n const isFile = att.type === \"FILE\";\n const ID = att.ID.replace(/\\s/gi, \"\");\n const actionsMap = new Map([\n [\n \"download\",\n {\n id: `download-${ID}`,\n text: isFile ? \"Download\" : \"Open\",\n icon: isFile ? \"download\" : \"open\",\n onClick: downloadFile\n }\n ],\n [\n \"delete\",\n {\n id: `Delete-${ID}`,\n text: \"Delete\",\n icon: \"trash\",\n onClick: deleteFile\n }\n ]\n ]);\n actions = [];\n actionsMap.forEach((action, actionKey) => {\n if (att.links[actionKey]) {\n actions.push(action);\n }\n });\n } else if (att.error) {\n actions = [\n {\n id: `Remove-${att.ID}`,\n text: \"Remove\",\n icon: \"trash\",\n onClick: removeFile\n }\n ];\n }\n\n return {\n id: att.ID,\n visual: {\n icon: Utils.getIconForAttachment(att),\n progress: att.progress === 100 ? undefined: att.progress,\n },\n primary: {\n type: att.type,\n name: att.name,\n icon: \"open\",\n click: downloadFile,\n },\n secondary: {\n text: att.meta\n },\n actions\n };\n }\n\n function fileDownload(data, fileName, ext) {\n const file = ext ? `${fileName}.${ext}` : fileName;\n download(atob(data), file);\n };\n\n function downloadAttachedFile(att: any) {\n const attachUtils = PCore.getAttachmentUtils();\n const {ID, name, extension, type} = att;\n const context = thePConn.getContextName();\n\n attachUtils\n .downloadAttachment(ID, context)\n .then((content) => {\n if (type === \"FILE\") {\n fileDownload(content.data, name, extension);\n } else if (type === \"URL\") {\n let { data } = content;\n if (!/^(http|https):\\/\\//.test(data)) {\n data = `//${data}`;\n }\n window.open(content.data, \"_blank\");\n }\n })\n .catch();\n }\n\n function deleteAttachedFile(att: any) {\n const attachUtils = PCore.getAttachmentUtils();\n const {ID} = att;\n const context = thePConn.getContextName();\n\n attachUtils.deleteAttachment(ID, context)\n .then(() => {\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n getAttachments();\n })\n .catch();\n }\n\n const getAttachments = () => {\n\n const attachmentUtils = PCore.getAttachmentUtils();\n const caseID = thePConn.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID);\n\n if (caseID && caseID !== \"\") {\n const attPromise = attachmentUtils.getCaseAttachments(caseID, thePConn.getContextName());\n\n attPromise\n .then( (resp) => {\n const arFullListAttachments = addAttachments(resp);\n const attachmentsCount = arFullListAttachments.length;\n const arItems: any = arFullListAttachments.slice(0, 3).map((att) => {\n return getListUtilityItemProps({\n att,\n downloadFile: !att.progress ? () => downloadAttachedFile(att) : null,\n cancelFile: null,\n deleteFile: !att.progress ? () => deleteAttachedFile(att) : null,\n removeFile: null\n });\n });\n const viewAllarItems: any = arFullListAttachments.map((att) => {\n return getListUtilityItemProps({\n att,\n downloadFile: !att.progress ? () => downloadAttachedFile(att) : null,\n cancelFile: null,\n deleteFile: !att.progress ? () => deleteAttachedFile(att) : null,\n removeFile: null\n });\n });\n setProgress(false);\n setList((current) => {\n return {...current, count: attachmentsCount, data: arItems}\n });\n setFullAttachments(viewAllarItems);\n });\n }\n }\n\n useEffect(() => {\n getAttachments();\n }, []);\n\n\n useEffect(() => {\n PCore.getPubSubUtils().subscribe(\n PCore.getEvents().getCaseEvent().CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW,\n getAttachments,\n \"caseAttachmentsUpdateFromCaseview\"\n );\n\n return () => {\n PCore.getPubSubUtils().unsubscribe(\n PCore.getEvents().getCaseEvent().CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW,\n \"caseAttachmentsUpdateFromCaseview\"\n );\n };\n }, []);\n\n function setNewFiles(arFiles) {\n let index = 0;\n for (const file of arFiles) {\n if (!validateMaxSize(file, 5)) {\n file.error = true;\n file.meta = \"File is too big. Max allowed size is 5MB.\";\n }\n file.mimeType = file.type;\n file.icon = Utils.getIconFromFileType(file.type);\n file.ID = `${new Date().getTime()}I${index}`;\n index+=1;\n }\n return arFiles;\n }\n\n function getFiles(arFiles: Array<any>): Array<any> {\n return setNewFiles(arFiles);\n }\n\n function uploadMyFiles(event) {\n // alert($event.target.files[0]); // outputs the first file\n const arFiles = getFiles(event.target.files);\n // convert FileList to an array\n const myFiles: any = Array.from(arFiles);\n\n const arFileList$: any = myFiles.map((att: any) => {\n return getListUtilityItemProps({\n att,\n downloadFile: !att.progress ? () => downloadAttachedFile(att) : null,\n cancelFile: null,\n deleteFile: !att.progress ? () => deleteAttachedFile(att) : null,\n removeFile: null\n });\n });\n setFileData((current) => {\n return {...current, fileList: arFileList$, attachedFiles: myFiles}\n });\n }\n\n\n\n const handleClick = (event) => {\n setAnchorEl(event.currentTarget);\n };\n\n const handleClose = () => {\n setAnchorEl(null);\n };\n\n function onAddFilesClick() {\n setFileData((current) => {\n return {...current, showfileModal: true}\n });\n setAnchorEl(null);\n }\n\n function removeFileFromList(item: any) {\n let attachedFiles: any = fileData.attachedFiles;\n let fileList: any = fileData.fileList;\n if (item !== null) {\n attachedFiles = attachedFiles.filter(ele => ele.ID !== item.id);\n fileList = fileList.filter(ele => ele.id !== item.id);\n setFileData((current) => {\n return {...current, fileList, attachedFiles}\n });\n }\n }\n\n function closeFilePopup() {\n setFileData((current) => {\n return {...current, showfileModal: false}\n });\n }\n\n function onAttachFiles() {\n const attachmentUtils = PCore.getAttachmentUtils();\n const caseID = thePConn.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID);\n const onUploadProgress = () => {};\n const errorHandler = () => {};\n closeFilePopup()\n if (fileData.attachedFiles && fileData.attachedFiles.length > 0 ) {\n setProgress(true);\n }\n for (const file of fileData.attachedFiles) {\n attachmentUtils\n .uploadAttachment(\n file,\n onUploadProgress,\n errorHandler,\n thePConn.getContextName()\n )\n .then((fileResponse) => {\n if (fileResponse.type === \"File\") {\n attachmentUtils.linkAttachmentsToCase(\n caseID,\n [ fileResponse ],\n \"File\",\n thePConn.getContextName()\n )\n .then(() => {\n setFileData((current) => {\n return {...current, fileList: [], attachedFiles: []};\n });\n getAttachments();\n })\n .catch();\n }\n })\n .catch();\n }\n }\n\n function onAddLinksClick() {\n setLinkData((current) => {\n return {...current, showLinkModal: true}\n });\n setAnchorEl(null);\n }\n\n function closeAddLinksPopup() {\n setLinkData((current) => {\n return {...current, showLinkModal: false}\n });\n }\n\n const fieldlinkOnChange = (event) => {\n const title = event.target.value;\n setLink((current) => {\n const updatedData = {...current, title};\n updatedData.disable = !(updatedData.title && updatedData.url);\n return updatedData;\n });\n }\n\n function fieldurlOnChange(event) {\n const url = event.target.value;\n setLink((current) => {\n const updatedData = {...current, url}\n updatedData.disable = !(updatedData.title && updatedData.url);\n return updatedData;\n });\n }\n\n function addLink() {\n // copy list locally\n const localList: any = linkData.linksList.slice();\n const url = link.url;\n if (!/^(http|https):\\/\\//.test(link.url)) {\n link.url = `http://${link.url}`;\n }\n\n // list for display\n let oLink: any = {};\n oLink.icon = \"chain\";\n oLink.ID = `${new Date().getTime()}`;\n oLink = getListUtilityItemProps({\n att: oLink,\n downloadFile: null,\n cancelFile: null,\n deleteFile: null,\n removeFile: null\n });\n oLink.type = \"URL\";\n oLink.primary.type = oLink.type;\n oLink.visual.icon = \"chain\";\n oLink.primary.name = link.title;\n oLink.primary.icon = \"open\";\n oLink.secondary.text = url;\n\n localList.push(oLink);\n\n // list for actually attachments\n const attachedListTemp: any = linkData.attachedLinks.slice();\n const attachedLink: any = {};\n attachedLink.id = oLink.id;\n attachedLink.linkTitle = link.title;\n attachedLink.type = oLink.type;\n attachedLink.url = url;\n\n attachedListTemp.push(attachedLink);\n setLinkData((current) => {\n return {...current, linksList: localList, attachedLinks: attachedListTemp}\n });\n // clear values\n setLink({title: '', url: '', disable: true});\n }\n\n function removeLinksFromList(item: any) {\n let attachedLinks: any = linkData.attachedLinks;\n let linksList: any = linkData.linksList;\n if (item !== null) {\n attachedLinks = attachedLinks.filter(ele => ele.id !== item.id);\n linksList = linksList.filter(ele => ele.id !== item.id);\n setLinkData((current) => {\n return {...current, linksList, attachedLinks}\n });\n }\n }\n\n function onAttachLinks() {\n const attachmentUtils = PCore.getAttachmentUtils();\n const caseID = thePConn.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID);\n const links = linkData.attachedLinks;\n closeAddLinksPopup();\n const linksToAttach = links.map((item: any) => ({\n type: \"URL\",\n category: \"URL\",\n url: item.url,\n name: item.linkTitle\n }));\n\n if (linksToAttach && linksToAttach.length > 0) {\n setProgress(true);\n attachmentUtils\n .linkAttachmentsToCase(caseID, linksToAttach, \"URL\", thePConn.getContextName())\n .then( () => {\n setLinkData((current) => {\n return {...current, linksList: [], attachedLinks: []};\n });\n getAttachments();\n })\n .catch(setProgress(false));\n }\n }\n\n return (\n <div className=\"psdk-utility\">\n {inProgress && (<div className=\"progress-div\"><CircularProgress /></div>)}\n <div className=\"psdk-header\">\n <img className=\"psdk-file-utility-card-svg-icon\" src={headerSvgIcon$}></img>\n <div className=\"header-text\">{header}</div>\n <div className=\"psdk-utility-count\" id=\"attachments-count\">{list.count}</div>\n <div style={{flexGrow: 1}}></div>\n <div>\n <IconButton\n id=\"long-button\"\n aria-controls={open ? 'simple-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'}}\n id=\"simple-menu\"\n anchorEl={anchorEl}\n keepMounted\n open={Boolean(anchorEl)}\n onClose={handleClose}\n >\n <MenuItem style={{fontSize: '14px'}} onClick={onAddFilesClick}>Add Files</MenuItem>\n <MenuItem style={{fontSize: '14px'}} onClick={onAddLinksClick}>Add Links</MenuItem>\n </Menu>\n </div>\n </div>\n {list.data.length > 0 && (<div style={{marginTop: '1rem'}}>\n <SummaryList arItems$={list.data}></SummaryList>\n </div>)}\n {list.count > 3 && (<div className=\"psdk-utility-view-all\">\n <Button style={{textTransform: 'none'}} color=\"primary\" onClick = {() => setViewAll(true)}>View all</Button>\n </div>)}\n {fileData.showfileModal && (\n <div className=\"psdk-dialog-background\">\n <div className=\"psdk-modal-file-top\">\n <h3>Add local files</h3>\n <div className=\"psdk-modal-body\">\n <div className=\"psdk-modal-file-selector\">\n <label htmlFor='upload-files'>\n <input style={{ display: 'none' }} id='upload-files' name='upload-files' type='file' multiple onChange={uploadMyFiles}/>\n <Button variant='outlined' color='primary' component=\"span\">Upload file(s)</Button>\n </label>\n </div>\n {fileData.fileList.length > 0 && (<div style={{marginTop: '1rem'}}>\n <SummaryList menuIconOverride$='trash' arItems$={fileData.fileList} menuIconOverrideAction$={removeFileFromList}></SummaryList>\n </div>)}\n {fileData.fileList.length === 0 && (<div></div>)}\n <ActionButtonsForFileUtil arMainButtons={fileData.fileMainButtons} arSecondaryButtons={fileData.fileSecondaryButtons}\n primaryAction={onAttachFiles} secondaryAction={closeFilePopup}></ActionButtonsForFileUtil>\n </div>\n </div>\n </div>\n )}\n {linkData.showLinkModal && (\n <div className=\"psdk-dialog-background\">\n <div className=\"psdk-modal-file-top\">\n <h3>Add links</h3>\n <div className=\"psdk-modal-body\">\n <div className=\"psdk-modal-links-row\">\n <div className=\"psdk-links-two-column\">\n <div className=\"psdk-modal-link-data\">\n <TextField fullWidth variant=\"outlined\" label=\"Link title\" size=\"small\" required={required} value={link.title} onChange={fieldlinkOnChange}/>\n </div>\n <div className=\"psdk-modal-link-data\">\n <TextField fullWidth variant=\"outlined\" label=\"URL\" size=\"small\" required={required} value={link.url} onChange={fieldurlOnChange}/>\n </div>\n </div>\n <div className=\"psdk-modal-link-add\">\n <Button className=\"psdk-add-link-action\" color=\"primary\" variant=\"contained\" component=\"span\" onClick={addLink} disabled={link.disable}>Add Link</Button>\n </div>\n </div>\n {linkData.linksList.length > 0 && (<div style={{marginTop: '1rem'}}>\n <SummaryList menuIconOverride$='trash' arItems$={linkData.linksList} menuIconOverrideAction$={removeLinksFromList}></SummaryList>\n </div>)}\n <ActionButtonsForFileUtil arMainButtons={linkData.linkMainButtons} arSecondaryButtons={linkData.linkSecondaryButtons}\n primaryAction={onAttachLinks} secondaryAction={closeAddLinksPopup}></ActionButtonsForFileUtil>\n </div>\n </div>\n </div>\n )}\n {showViewAllModal && (<div className=\"psdk-dialog-background\">\n <div className=\"psdk-modal-file-top\">\n <div className=\"psdk-view-all-header\">\n <h3>Attachments</h3>\n {/* eslint-disable-next-line jsx-a11y/control-has-associated-label */}\n <button type=\"button\" className=\"psdk-close-button\" onClick = {() => setViewAll(false)}><img className=\"psdk-utility-card-actions-svg-icon\" src={closeSvgIcon}></img></button>\n </div>\n <div className=\"psdk-view-all-body\"><SummaryList arItems$={vaItems}></SummaryList></div>\n </div>\n </div>)}\n </div>\n\n )\n}\n"]}
1
+ {"version":3,"file":"FileUtility.js","sourceRoot":"","sources":["../../../../../src/components/widget/FileUtility/FileUtility/FileUtility.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,SAAS,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,+CAA+C;AAC/C,sEAAsE;AACtE,OAAO,mBAAmB,CAAC;AAC3B,OAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,YAAY,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AAcnF,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAsB;IACxD,8EAA8E;IAC9E,MAAM,WAAW,GAAG,mBAAmB,CAAC,aAAa,CAAC,CAAC;IACvD,MAAM,wBAAwB,GAAG,mBAAmB,CAAC,0BAA0B,CAAC,CAAC;IAEjF,MAAM,E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kBAAkB,EAAE,QAAQ,CAAC,oBAAoB,EACpH,aAAa,EAAE,aAAa,EAAE,eAAe,EAAE,kBAAkB,GAA6B,CAC5F,CACF,CACF,CACP;QACA,gBAAgB,IAAI,CAAC,6BAAK,SAAS,EAAC,wBAAwB;YAC3D,6BAAK,SAAS,EAAC,qBAAqB;gBAClC,6BAAK,SAAS,EAAC,sBAAsB;oBACjC,gCAAK,QAAQ,CAAC,iBAAiB,CAAC,aAAa,EAAE,EAAE,EAAE,EAAE,CAAC,CAAM;;oBAE5D,gCAAQ,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAC,mBAAmB,EAAC,OAAO,EAAI,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;wBAAE,6BAAK,SAAS,EAAC,oCAAoC,EAAC,GAAG,EAAE,YAAY,GAAQ,CAAS,CAC5K;gBACN,6BAAK,SAAS,EAAC,oBAAoB;oBAAC,oBAAC,WAAW,gBAAW,OAAO,GAAgB,CAAM,CACpF,CACF,CAAC,CACH,CAEP,CAAA;AACH,CAAC","sourcesContent":["import React, { useEffect, useState } from \"react\";\nimport TextField from '@material-ui/core/TextField';\nimport { Utils } from '../../../helpers/utils';\nimport download from \"downloadjs\";\n// import SummaryList from '../../SummaryList';\n// import ActionButtonsForFileUtil from '../ActionButtonsForFileUtil';\nimport './FileUtility.css';\nimport { IconButton, Menu, MenuItem } from '@material-ui/core';\nimport MoreVertIcon from '@material-ui/icons/MoreVert';\nimport { Button } from '@material-ui/core';\nimport { validateMaxSize } from '../../../helpers/attachmentHelpers';\nimport { CircularProgress } from \"@material-ui/core\";\nimport { getComponentFromMap } from '../../../../bridge/helpers/sdk_component_map';\n\nimport type { PConnProps } from '../../../../types/PConnProps';\n\n\ninterface FileUtilityProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n}\n\n\n// Remove this and use \"real\" PCore type once .d.ts is fixed (currently shows 5 errors)\ndeclare const PCore: any;\n\n\nexport default function FileUtility(props:FileUtilityProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const SummaryList = getComponentFromMap('SummaryList');\n const ActionButtonsForFileUtil = getComponentFromMap('ActionButtonsForFileUtil');\n\n const { getPConnect } = props;\n const thePConn = getPConnect();\n const required = true;\n const listTemp = {\n data: [],\n count: 0\n };\n const [list, setList] = useState(listTemp);\n const headerSvgIcon$ = Utils.getImageSrc('paper-clip', Utils.getSDKStaticConentUrl());\n const closeSvgIcon = Utils.getImageSrc(\"times\", Utils.getSDKStaticConentUrl());\n const configProps: any = thePConn.resolveConfigProps(thePConn.getConfigProps());\n\n const header = configProps.label;\n const fileTemp = {\n showfileModal: false,\n fileList: [],\n attachedFiles: [],\n fileMainButtons: [{ actionID: \"attach\", jsAction: \"attachFiles\", name: thePConn.getLocalizedValue('Attach files', '', '')}], // 2nd and 3rd args empty string until typedef marked correctly\n fileSecondaryButtons: [{ actionID: \"cancel\", jsAction: \"cancel\", name: thePConn.getLocalizedValue('Cancel', '', '')}] // 2nd and 3rd args empty string until typedef marked correctly\n };\n const [fileData, setFileData] = useState(fileTemp);\n const linkTemp = {\n showLinkModal: false,\n linksList: [],\n attachedLinks: [],\n linkMainButtons: [{ actionID: \"attach\", jsAction: \"attachLinks\", name: thePConn.getLocalizedValue('Attach links', '', '')}], // 2nd and 3rd args empty string until typedef marked correctly\n linkSecondaryButtons: [{ actionID: \"cancel\", jsAction: \"cancel\", name: thePConn.getLocalizedValue('Cancel', '', '')}] // 2nd and 3rd args empty string until typedef marked correctly\n };\n const [linkData, setLinkData] = useState(linkTemp);\n const [anchorEl, setAnchorEl] = useState(null);\n const open = Boolean(anchorEl);\n const [link, setLink] = useState({title: '', url: '', disable: true});\n const [inProgress, setProgress] = useState(false);\n const [showViewAllModal, setViewAll] = useState(false);\n const [vaItems, setFullAttachments] = useState([]);\n\n function addAttachments(attsFromResp: Array<any> = []) {\n attsFromResp = attsFromResp.map((respAtt) => {\n const updatedAtt = {\n ...respAtt,\n meta: `${respAtt.category} . ${Utils.generateDateTime(respAtt.createTime, \"DateTime-Since\")}, ${\n respAtt.createdBy\n }`\n };\n if (updatedAtt.type === \"FILE\") {\n updatedAtt.nameWithExt = updatedAtt.fileName;\n }\n return updatedAtt;\n });\n return attsFromResp;\n }\n\n function getListUtilityItemProps({\n att,\n cancelFile,\n downloadFile,\n deleteFile,\n removeFile\n }) {\n let actions;\n\n if (att.progress && att.progress !== 100) {\n actions = [\n {\n id: `Cancel-${att.ID}`,\n text: thePConn.getLocalizedValue('Cancel', '', ''), // 2nd and 3rd args empty string until typedef marked correctly\n icon: \"times\",\n onClick: cancelFile\n }\n ];\n } else if (att.links) {\n const isFile = att.type === \"FILE\";\n const ID = att.ID.replace(/\\s/gi, \"\");\n const actionsMap = new Map([\n [\n \"download\",\n {\n id: `download-${ID}`,\n text: isFile ? thePConn.getLocalizedValue('Download', '', '') : thePConn.getLocalizedValue('Open', '', ''), // 2nd and 3rd args empty string until typedef marked correctly\n icon: isFile ? \"download\" : \"open\",\n onClick: downloadFile\n }\n ],\n [\n \"delete\",\n {\n id: `Delete-${ID}`,\n text: thePConn.getLocalizedValue('Delete', '', ''), // 2nd and 3rd args empty string until typedef marked correctly\n icon: \"trash\",\n onClick: deleteFile\n }\n ]\n ]);\n actions = [];\n actionsMap.forEach((action, actionKey) => {\n if (att.links[actionKey]) {\n actions.push(action);\n }\n });\n } else if (att.error) {\n actions = [\n {\n id: `Remove-${att.ID}`,\n text: thePConn.getLocalizedValue('Remove', '', ''), // 2nd and 3rd args empty string until typedef marked correctly\n icon: \"trash\",\n onClick: removeFile\n }\n ];\n }\n\n return {\n id: att.ID,\n visual: {\n icon: Utils.getIconForAttachment(att),\n progress: att.progress === 100 ? undefined: att.progress,\n },\n primary: {\n type: att.type,\n name: att.name,\n icon: \"open\",\n click: downloadFile,\n },\n secondary: {\n text: att.meta\n },\n actions\n };\n }\n\n function fileDownload(data, fileName, ext) {\n const file = ext ? `${fileName}.${ext}` : fileName;\n download(atob(data), file);\n };\n\n function downloadAttachedFile(att: any) {\n const attachUtils = PCore.getAttachmentUtils();\n const {ID, name, extension, type} = att;\n const context = thePConn.getContextName();\n\n attachUtils\n .downloadAttachment(ID, context)\n .then((content) => {\n if (type === \"FILE\") {\n fileDownload(content.data, name, extension);\n } else if (type === \"URL\") {\n let { data } = content;\n if (!/^(http|https):\\/\\//.test(data)) {\n data = `//${data}`;\n }\n window.open(content.data, \"_blank\");\n }\n })\n .catch();\n }\n\n function deleteAttachedFile(att: any) {\n const attachUtils = PCore.getAttachmentUtils();\n const {ID} = att;\n const context = thePConn.getContextName();\n\n attachUtils.deleteAttachment(ID, context)\n .then(() => {\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n getAttachments();\n })\n .catch();\n }\n\n const getAttachments = () => {\n\n const attachmentUtils = PCore.getAttachmentUtils();\n const caseID = thePConn.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID, ''); // 2nd arg empty string until typedef marked correctly\n\n if (caseID && caseID !== \"\") {\n const attPromise = attachmentUtils.getCaseAttachments(caseID, thePConn.getContextName());\n\n attPromise\n .then( (resp) => {\n const arFullListAttachments = addAttachments(resp);\n const attachmentsCount = arFullListAttachments.length;\n const arItems: any = arFullListAttachments.slice(0, 3).map((att) => {\n return getListUtilityItemProps({\n att,\n downloadFile: !att.progress ? () => downloadAttachedFile(att) : null,\n cancelFile: null,\n deleteFile: !att.progress ? () => deleteAttachedFile(att) : null,\n removeFile: null\n });\n });\n const viewAllarItems: any = arFullListAttachments.map((att) => {\n return getListUtilityItemProps({\n att,\n downloadFile: !att.progress ? () => downloadAttachedFile(att) : null,\n cancelFile: null,\n deleteFile: !att.progress ? () => deleteAttachedFile(att) : null,\n removeFile: null\n });\n });\n setProgress(false);\n setList((current) => {\n return {...current, count: attachmentsCount, data: arItems}\n });\n setFullAttachments(viewAllarItems);\n });\n }\n }\n\n useEffect(() => {\n getAttachments();\n }, []);\n\n\n useEffect(() => {\n PCore.getPubSubUtils().subscribe(\n PCore.getEvents().getCaseEvent().CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW,\n getAttachments,\n \"caseAttachmentsUpdateFromCaseview\"\n );\n\n return () => {\n PCore.getPubSubUtils().unsubscribe(\n PCore.getEvents().getCaseEvent().CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW,\n \"caseAttachmentsUpdateFromCaseview\"\n );\n };\n }, []);\n\n function setNewFiles(arFiles) {\n let index = 0;\n for (const file of arFiles) {\n if (!validateMaxSize(file, '5')) {\n file.error = true;\n file.meta = \"File is too big. Max allowed size is 5MB.\";\n }\n file.mimeType = file.type;\n file.icon = Utils.getIconFromFileType(file.type);\n file.ID = `${new Date().getTime()}I${index}`;\n index+=1;\n }\n return arFiles;\n }\n\n function getFiles(arFiles: Array<any>): Array<any> {\n return setNewFiles(arFiles);\n }\n\n function uploadMyFiles(event) {\n // alert($event.target.files[0]); // outputs the first file\n const arFiles = getFiles(event.target.files);\n // convert FileList to an array\n const myFiles: any = Array.from(arFiles);\n\n const arFileList$: any = myFiles.map((att: any) => {\n return getListUtilityItemProps({\n att,\n downloadFile: !att.progress ? () => downloadAttachedFile(att) : null,\n cancelFile: null,\n deleteFile: !att.progress ? () => deleteAttachedFile(att) : null,\n removeFile: null\n });\n });\n setFileData((current) => {\n return {...current, fileList: arFileList$, attachedFiles: myFiles}\n });\n }\n\n\n\n const handleClick = (event) => {\n setAnchorEl(event.currentTarget);\n };\n\n const handleClose = () => {\n setAnchorEl(null);\n };\n\n function onAddFilesClick() {\n setFileData((current) => {\n return {...current, showfileModal: true}\n });\n setAnchorEl(null);\n }\n\n function removeFileFromList(item: any) {\n let attachedFiles: any = fileData.attachedFiles;\n let fileList: any = fileData.fileList;\n if (item !== null) {\n attachedFiles = attachedFiles.filter(ele => ele.ID !== item.id);\n fileList = fileList.filter(ele => ele.id !== item.id);\n setFileData((current) => {\n return {...current, fileList, attachedFiles}\n });\n }\n }\n\n function closeFilePopup() {\n setFileData((current) => {\n return {...current, showfileModal: false}\n });\n }\n\n function onAttachFiles() {\n const attachmentUtils = PCore.getAttachmentUtils();\n const caseID = thePConn.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID, ''); // 2nd arg empty string until typedef marked correctly\n const onUploadProgress = () => {};\n const errorHandler = () => {};\n closeFilePopup()\n if (fileData.attachedFiles && fileData.attachedFiles.length > 0 ) {\n setProgress(true);\n }\n for (const file of fileData.attachedFiles) {\n attachmentUtils\n .uploadAttachment(\n file,\n onUploadProgress,\n errorHandler,\n thePConn.getContextName()\n )\n .then((fileResponse) => {\n if (fileResponse.type === \"File\") {\n attachmentUtils.linkAttachmentsToCase(\n caseID,\n [ fileResponse ],\n \"File\",\n thePConn.getContextName()\n )\n .then(() => {\n setFileData((current) => {\n return {...current, fileList: [], attachedFiles: []};\n });\n getAttachments();\n })\n .catch();\n }\n })\n .catch();\n }\n }\n\n function onAddLinksClick() {\n setLinkData((current) => {\n return {...current, showLinkModal: true}\n });\n setAnchorEl(null);\n }\n\n function closeAddLinksPopup() {\n setLinkData((current) => {\n return {...current, showLinkModal: false}\n });\n }\n\n const fieldlinkOnChange = (event) => {\n const title = event.target.value;\n setLink((current) => {\n const updatedData = {...current, title};\n updatedData.disable = !(updatedData.title && updatedData.url);\n return updatedData;\n });\n }\n\n function fieldurlOnChange(event) {\n const url = event.target.value;\n setLink((current) => {\n const updatedData = {...current, url}\n updatedData.disable = !(updatedData.title && updatedData.url);\n return updatedData;\n });\n }\n\n function addLink() {\n // copy list locally\n const localList: any = linkData.linksList.slice();\n const url = link.url;\n if (!/^(http|https):\\/\\//.test(link.url)) {\n link.url = `http://${link.url}`;\n }\n\n // list for display\n let oLink: any = {};\n oLink.icon = \"chain\";\n oLink.ID = `${new Date().getTime()}`;\n oLink = getListUtilityItemProps({\n att: oLink,\n downloadFile: null,\n cancelFile: null,\n deleteFile: null,\n removeFile: null\n });\n oLink.type = \"URL\";\n oLink.primary.type = oLink.type;\n oLink.visual.icon = \"chain\";\n oLink.primary.name = link.title;\n oLink.primary.icon = \"open\";\n oLink.secondary.text = url;\n\n localList.push(oLink);\n\n // list for actually attachments\n const attachedListTemp: any = linkData.attachedLinks.slice();\n const attachedLink: any = {};\n attachedLink.id = oLink.id;\n attachedLink.linkTitle = link.title;\n attachedLink.type = oLink.type;\n attachedLink.url = url;\n\n attachedListTemp.push(attachedLink);\n setLinkData((current) => {\n return {...current, linksList: localList, attachedLinks: attachedListTemp}\n });\n // clear values\n setLink({title: '', url: '', disable: true});\n }\n\n function removeLinksFromList(item: any) {\n let attachedLinks: any = linkData.attachedLinks;\n let linksList: any = linkData.linksList;\n if (item !== null) {\n attachedLinks = attachedLinks.filter(ele => ele.id !== item.id);\n linksList = linksList.filter(ele => ele.id !== item.id);\n setLinkData((current) => {\n return {...current, linksList, attachedLinks}\n });\n }\n }\n\n function onAttachLinks() {\n const attachmentUtils = PCore.getAttachmentUtils();\n const caseID = thePConn.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID, ''); // 2nd arg empty string until typedef marked correctly\n const links = linkData.attachedLinks;\n closeAddLinksPopup();\n const linksToAttach = links.map((item: any) => ({\n type: \"URL\",\n category: \"URL\",\n url: item.url,\n name: item.linkTitle\n }));\n\n if (linksToAttach && linksToAttach.length > 0) {\n setProgress(true);\n attachmentUtils\n .linkAttachmentsToCase(caseID, linksToAttach, \"URL\", thePConn.getContextName())\n .then( () => {\n setLinkData((current) => {\n return {...current, linksList: [], attachedLinks: []};\n });\n getAttachments();\n })\n .catch(setProgress(false));\n }\n }\n\n return (\n <div className=\"psdk-utility\">\n {inProgress && (<div className=\"progress-div\"><CircularProgress /></div>)}\n <div className=\"psdk-header\">\n <img className=\"psdk-file-utility-card-svg-icon\" src={headerSvgIcon$}></img>\n <div className=\"header-text\">{header}</div>\n <div className=\"psdk-utility-count\" id=\"attachments-count\">{list.count}</div>\n <div style={{flexGrow: 1}}></div>\n <div>\n <IconButton\n id=\"long-button\"\n aria-controls={open ? 'simple-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'}}\n id=\"simple-menu\"\n anchorEl={anchorEl}\n keepMounted\n open={Boolean(anchorEl)}\n onClose={handleClose}\n >\n <MenuItem style={{fontSize: '14px'}} onClick={onAddFilesClick}>{thePConn.getLocalizedValue('Add files', '', '')}</MenuItem> {/* 2nd and 3rd args empty string until typedef marked correctly */}\n <MenuItem style={{fontSize: '14px'}} onClick={onAddLinksClick}>{thePConn.getLocalizedValue('Add links', '', '')}</MenuItem> {/* 2nd and 3rd args empty string until typedef marked correctly */}\n </Menu>\n </div>\n </div>\n {list.data.length > 0 && (<div style={{marginTop: '1rem'}}>\n <SummaryList arItems$={list.data}></SummaryList>\n </div>)}\n {list.count > 3 && (<div className=\"psdk-utility-view-all\">\n <Button style={{textTransform: 'none'}} color=\"primary\" onClick = {() => setViewAll(true)}>View all</Button>\n </div>)}\n {fileData.showfileModal && (\n <div className=\"psdk-dialog-background\">\n <div className=\"psdk-modal-file-top\">\n <h3>{thePConn.getLocalizedValue('Add local files', '', '')}</h3>\n <div className=\"psdk-modal-body\">\n <div className=\"psdk-modal-file-selector\">\n <label htmlFor='upload-files'>\n <input style={{ display: 'none' }} id='upload-files' name='upload-files' type='file' multiple onChange={uploadMyFiles}/>\n <Button variant='outlined' color='primary' component=\"span\">{thePConn.getLocalizedValue('Attach files', '', '')}</Button> {/* 2nd and 3rd args empty string until typedef marked correctly */}\n </label>\n </div>\n {fileData.fileList.length > 0 && (<div style={{marginTop: '1rem'}}>\n <SummaryList menuIconOverride$='trash' arItems$={fileData.fileList} menuIconOverrideAction$={removeFileFromList}></SummaryList>\n </div>)}\n {fileData.fileList.length === 0 && (<div></div>)}\n <ActionButtonsForFileUtil arMainButtons={fileData.fileMainButtons} arSecondaryButtons={fileData.fileSecondaryButtons}\n primaryAction={onAttachFiles} secondaryAction={closeFilePopup}></ActionButtonsForFileUtil>\n </div>\n </div>\n </div>\n )}\n {linkData.showLinkModal && (\n <div className=\"psdk-dialog-background\">\n <div className=\"psdk-modal-file-top\">\n <h3>{thePConn.getLocalizedValue('Add links', '', '')}</h3> {/* 2nd and 3rd args empty string until typedef marked correctly */}\n <div className=\"psdk-modal-body\">\n <div className=\"psdk-modal-links-row\">\n <div className=\"psdk-links-two-column\">\n <div className=\"psdk-modal-link-data\">\n <TextField fullWidth variant=\"outlined\" label=\"Link title\" size=\"small\" required={required} value={link.title} onChange={fieldlinkOnChange}/>\n </div>\n <div className=\"psdk-modal-link-data\">\n <TextField fullWidth variant=\"outlined\" label=\"URL\" size=\"small\" required={required} value={link.url} onChange={fieldurlOnChange}/>\n </div>\n </div>\n <div className=\"psdk-modal-link-add\">\n <Button className=\"psdk-add-link-action\" color=\"primary\" variant=\"contained\" component=\"span\" onClick={addLink} disabled={link.disable}>{thePConn.getLocalizedValue('Add link', '', '')}</Button> {/* 2nd and 3rd args empty string until typedef marked correctly */}\n </div>\n </div>\n {linkData.linksList.length > 0 && (<div style={{marginTop: '1rem'}}>\n <SummaryList menuIconOverride$='trash' arItems$={linkData.linksList} menuIconOverrideAction$={removeLinksFromList}></SummaryList>\n </div>)}\n <ActionButtonsForFileUtil arMainButtons={linkData.linkMainButtons} arSecondaryButtons={linkData.linkSecondaryButtons}\n primaryAction={onAttachLinks} secondaryAction={closeAddLinksPopup}></ActionButtonsForFileUtil>\n </div>\n </div>\n </div>\n )}\n {showViewAllModal && (<div className=\"psdk-dialog-background\">\n <div className=\"psdk-modal-file-top\">\n <div className=\"psdk-view-all-header\">\n <h3>{thePConn.getLocalizedValue('Attachments', '', '')}</h3> {/* 2nd and 3rd args empty string until typedef marked correctly */}\n {/* eslint-disable-next-line jsx-a11y/control-has-associated-label */}\n <button type=\"button\" className=\"psdk-close-button\" onClick = {() => setViewAll(false)}><img className=\"psdk-utility-card-actions-svg-icon\" src={closeSvgIcon}></img></button>\n </div>\n <div className=\"psdk-view-all-body\"><SummaryList arItems$={vaItems}></SummaryList></div>\n </div>\n </div>)}\n </div>\n\n )\n}\n"]}
@@ -1,8 +1,7 @@
1
1
  /// <reference types="react" />
2
- declare function Followers(): JSX.Element;
3
- declare namespace Followers {
4
- var defaultProps: {};
5
- var propTypes: {};
2
+ interface FollowersProps {
3
+ children: Array<any>;
6
4
  }
7
- export default Followers;
5
+ export default function Followers(props: FollowersProps): JSX.Element;
6
+ export {};
8
7
  //# sourceMappingURL=Followers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Followers.d.ts","sourceRoot":"","sources":["../../../../src/components/widget/Followers/Followers.tsx"],"names":[],"mappings":";AAqBA,iBAAwB,SAAS,gBAahC;kBAbuB,SAAS;;;;eAAT,SAAS"}
1
+ {"version":3,"file":"Followers.d.ts","sourceRoot":"","sources":["../../../../src/components/widget/Followers/Followers.tsx"],"names":[],"mappings":";AAMA,UAAU,cAAc;IAEtB,QAAQ,EAAE,KAAK,CAAC,GAAG,CAAC,CAAA;CACrB;AAkBD,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAK,EAAE,cAAc,eActD"}
@@ -1,8 +1,6 @@
1
1
  import React from "react";
2
- // import PropTypes from "prop-types";
3
2
  import { Card, CardContent, CardHeader, Typography } from "@material-ui/core";
4
3
  import { makeStyles } from '@material-ui/core/styles';
5
- // import { green } from "@material-ui/core/colors";
6
4
  const useStyles = makeStyles((theme) => ({
7
5
  root: {
8
6
  paddingRight: theme.spacing(1),
@@ -17,9 +15,10 @@ const useStyles = makeStyles((theme) => ({
17
15
  // borderLeftColor: green[300]
18
16
  },
19
17
  }));
20
- export default function Followers( /* props */) {
18
+ export default function Followers(props) {
21
19
  const componentName = "Followers";
22
- // const { children } = props;
20
+ // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
21
+ const { children } = props;
23
22
  const classes = useStyles();
24
23
  return (React.createElement(Card, { className: classes.root },
25
24
  React.createElement(CardHeader, { title: React.createElement(Typography, { variant: "h6", component: "div" },
@@ -31,10 +30,4 @@ export default function Followers( /* props */) {
31
30
  componentName,
32
31
  " content"))));
33
32
  }
34
- Followers.defaultProps = {
35
- // children: []
36
- };
37
- Followers.propTypes = {
38
- // children: PropTypes.arrayOf(PropTypes.node)
39
- };
40
33
  //# sourceMappingURL=Followers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Followers.js","sourceRoot":"","sources":["../../../../src/components/widget/Followers/Followers.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,sCAAsC;AACtC,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,oDAAoD;AAEpD,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACvC,IAAI,EAAE;QACJ,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC9B,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7B,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5B,aAAa,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC/B,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7B,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5B,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC3B,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC9B,2BAA2B;QAC3B,8BAA8B;KAC/B;CACF,CAAC,CAAC,CAAC;AAEJ,MAAM,CAAC,OAAO,UAAU,SAAS,EAAC,WAAW;IAC3C,MAAM,aAAa,GAAG,WAAW,CAAC;IAClC,8BAA8B;IAC9B,MAAM,OAAO,GAAG,SAAS,EAAE,CAAC;IAE5B,OAAO,CACH,oBAAC,IAAI,IAAC,SAAS,EAAE,OAAO,CAAC,IAAI;QAC3B,oBAAC,UAAU,IAAC,KAAK,EAAE,oBAAC,UAAU,IAAC,OAAO,EAAC,IAAI,EAAC,SAAS,EAAC,KAAK;gBAAE,aAAa;;gBAAI,8CAAoB,CAAa,GAAI;QACnH,oBAAC,WAAW;YACV,oBAAC,UAAU;gBAAE,aAAa;2BAAsB,CACpC,CACT,CACR,CAAC;AACN,CAAC;AAED,SAAS,CAAC,YAAY,GAAG;AACvB,eAAe;CAChB,CAAA;AAED,SAAS,CAAC,SAAS,GAAG;AACpB,8CAA8C;CAC/C,CAAC","sourcesContent":["import React from \"react\";\n// import PropTypes from \"prop-types\";\nimport { Card, CardContent, CardHeader, Typography } from \"@material-ui/core\";\nimport { makeStyles } from '@material-ui/core/styles';\n// import { green } from \"@material-ui/core/colors\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n paddingRight: theme.spacing(1),\n paddingLeft: theme.spacing(1),\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n marginRight: theme.spacing(1),\n marginLeft: theme.spacing(1),\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n // borderLeft: \"6px solid\",\n // borderLeftColor: green[300]\n },\n}));\n\nexport default function Followers(/* props */) {\n const componentName = \"Followers\";\n // const { children } = props;\n const classes = useStyles();\n\n return (\n <Card className={classes.root}>\n <CardHeader title={<Typography variant=\"h6\" component=\"div\">{componentName} - <em>unsupported</em></Typography>} />\n <CardContent>\n <Typography>{componentName} content</Typography>\n </CardContent>\n </Card>\n );\n}\n\nFollowers.defaultProps = {\n // children: []\n}\n\nFollowers.propTypes = {\n // children: PropTypes.arrayOf(PropTypes.node)\n};\n"]}
1
+ {"version":3,"file":"Followers.js","sourceRoot":"","sources":["../../../../src/components/widget/Followers/Followers.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAUtD,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACvC,IAAI,EAAE;QACJ,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC9B,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7B,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5B,aAAa,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC/B,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7B,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5B,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC3B,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC9B,2BAA2B;QAC3B,8BAA8B;KAC/B;CACF,CAAC,CAAC,CAAC;AAEJ,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAqB;IACrD,MAAM,aAAa,GAAG,WAAW,CAAC;IAClC,6EAA6E;IAC7E,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAC3B,MAAM,OAAO,GAAG,SAAS,EAAE,CAAC;IAE5B,OAAO,CACH,oBAAC,IAAI,IAAC,SAAS,EAAE,OAAO,CAAC,IAAI;QAC3B,oBAAC,UAAU,IAAC,KAAK,EAAE,oBAAC,UAAU,IAAC,OAAO,EAAC,IAAI,EAAC,SAAS,EAAC,KAAK;gBAAE,aAAa;;gBAAI,8CAAoB,CAAa,GAAI;QACnH,oBAAC,WAAW;YACV,oBAAC,UAAU;gBAAE,aAAa;2BAAsB,CACpC,CACT,CACR,CAAC;AACN,CAAC","sourcesContent":["import React from \"react\";\nimport { Card, CardContent, CardHeader, Typography } from \"@material-ui/core\";\nimport { makeStyles } from '@material-ui/core/styles';\n// import { green } from \"@material-ui/core/colors\";\n\n// Followers does NOT have getPConnect. So, no need to extend from PConnProps\ninterface FollowersProps {\n // If any, enter additional props that only exist on this component\n children: Array<any>\n}\n\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n paddingRight: theme.spacing(1),\n paddingLeft: theme.spacing(1),\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n marginRight: theme.spacing(1),\n marginLeft: theme.spacing(1),\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n // borderLeft: \"6px solid\",\n // borderLeftColor: green[300]\n },\n}));\n\nexport default function Followers(props: FollowersProps) {\n const componentName = \"Followers\";\n // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars\n const { children } = props;\n const classes = useStyles();\n\n return (\n <Card className={classes.root}>\n <CardHeader title={<Typography variant=\"h6\" component=\"div\">{componentName} - <em>unsupported</em></Typography>} />\n <CardContent>\n <Typography>{componentName} content</Typography>\n </CardContent>\n </Card>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"QuickCreate.d.ts","sourceRoot":"","sources":["../../../../src/components/widget/QuickCreate/QuickCreate.tsx"],"names":[],"mappings":";AAMA,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,KAAA,eA+CxC"}
1
+ {"version":3,"file":"QuickCreate.d.ts","sourceRoot":"","sources":["../../../../src/components/widget/QuickCreate/QuickCreate.tsx"],"names":[],"mappings":";AAYA,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,KAAA,eAkDxC"}
@@ -1,7 +1,15 @@
1
1
  import React from "react";
2
- import WssQuickCreate from '../../designSystemExtension/WssQuickCreate';
3
2
  import { Utils } from '../../helpers/utils';
4
- export default function QuickCreate(props) {
3
+ import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
4
+ // import type { PConnProps } from '../../../types/PConnProps';
5
+ // Can't add PConnTypes until we can resolve type problems with
6
+ // 2nd arg to createWork
7
+ // interface QuickCreateProps extends PConnProps {
8
+ // // If any, enter additional props that only exist on this component
9
+ // }
10
+ export default function QuickCreate(props /* : QuickCreateProps */) {
11
+ // Get emitted components from map (so we can get any override that may exist)
12
+ const WssQuickCreate = getComponentFromMap('WssQuickCreate');
5
13
  const { getPConnect, heading, showCaseIcons, classFilter } = props;
6
14
  const pConn = getPConnect();
7
15
  const createCase = (className) => {
@@ -20,11 +28,11 @@ export default function QuickCreate(props) {
20
28
  envInfo.environmentInfoObject.pyCaseTypeList &&
21
29
  envInfo.environmentInfoObject.pyCaseTypeList.length > 0) {
22
30
  classFilter.forEach((item) => {
23
- let icon = Utils.getImageSrc('polaris-solid', PCore.getAssetLoader().getStaticServerUrl());
31
+ let icon = Utils.getImageSrc('polaris-solid', Utils.getSDKStaticConentUrl());
24
32
  let label = '';
25
33
  envInfo.environmentInfoObject.pyCaseTypeList.forEach((casetype) => {
26
34
  if (casetype.pyWorkTypeImplementationClassName === item) {
27
- icon = casetype.pxIcon && Utils.getImageSrc(casetype?.pxIcon, PCore.getAssetLoader().getStaticServerUrl());
35
+ icon = casetype.pxIcon && Utils.getImageSrc(casetype?.pxIcon, Utils.getSDKStaticConentUrl());
28
36
  label = casetype.pyWorkTypeName ?? '';
29
37
  }
30
38
  });