@pega/react-sdk-components 8.8.21 → 8.23.11-debug

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 (490) hide show
  1. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts +10 -7
  2. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts.map +1 -1
  3. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js +7 -0
  4. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.map +1 -1
  5. package/lib/components/designSystemExtension/Banner/Banner.d.ts +1 -15
  6. package/lib/components/designSystemExtension/Banner/Banner.d.ts.map +1 -1
  7. package/lib/components/designSystemExtension/Banner/Banner.js.map +1 -1
  8. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts +9 -6
  9. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
  10. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +7 -3
  11. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
  12. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts +10 -4
  13. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts.map +1 -1
  14. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +8 -1
  15. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
  16. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts +2 -6
  17. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
  18. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +3 -3
  19. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
  20. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts +2 -7
  21. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts.map +1 -1
  22. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js +3 -3
  23. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
  24. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts +2 -7
  25. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts.map +1 -1
  26. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +3 -3
  27. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
  28. package/lib/components/designSystemExtension/Operator/Operator.d.ts +7 -17
  29. package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
  30. package/lib/components/designSystemExtension/Operator/Operator.js +6 -1
  31. package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
  32. package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +1 -5
  33. package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
  34. package/lib/components/designSystemExtension/Pulse/Pulse.js +6 -3
  35. package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
  36. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts +1 -6
  37. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts.map +1 -1
  38. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
  39. package/lib/components/field/AutoComplete/AutoComplete.d.ts +1 -15
  40. package/lib/components/field/AutoComplete/AutoComplete.d.ts.map +1 -1
  41. package/lib/components/field/AutoComplete/AutoComplete.js +15 -17
  42. package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
  43. package/lib/components/field/CancelAlert/CancelAlert.d.ts +2 -7
  44. package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
  45. package/lib/components/field/CancelAlert/CancelAlert.js +3 -3
  46. package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
  47. package/lib/components/field/Checkbox/Checkbox.d.ts +1 -19
  48. package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
  49. package/lib/components/field/Checkbox/Checkbox.js +8 -10
  50. package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
  51. package/lib/components/field/Currency/Currency.d.ts +1 -6
  52. package/lib/components/field/Currency/Currency.d.ts.map +1 -1
  53. package/lib/components/field/Currency/Currency.js +11 -11
  54. package/lib/components/field/Currency/Currency.js.map +1 -1
  55. package/lib/components/field/Currency/currency-utils.d.ts.map +1 -1
  56. package/lib/components/field/Currency/currency-utils.js +1 -1
  57. package/lib/components/field/Currency/currency-utils.js.map +1 -1
  58. package/lib/components/field/Date/Date.d.ts +1 -5
  59. package/lib/components/field/Date/Date.d.ts.map +1 -1
  60. package/lib/components/field/Date/Date.js +6 -8
  61. package/lib/components/field/Date/Date.js.map +1 -1
  62. package/lib/components/field/DateTime/DateTime.d.ts +1 -5
  63. package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
  64. package/lib/components/field/DateTime/DateTime.js +8 -14
  65. package/lib/components/field/DateTime/DateTime.js.map +1 -1
  66. package/lib/components/field/Decimal/Decimal.d.ts +1 -8
  67. package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
  68. package/lib/components/field/Decimal/Decimal.js +9 -10
  69. package/lib/components/field/Decimal/Decimal.js.map +1 -1
  70. package/lib/components/field/Dropdown/Dropdown.d.ts +1 -10
  71. package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
  72. package/lib/components/field/Dropdown/Dropdown.js +9 -12
  73. package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
  74. package/lib/components/field/Email/Email.d.ts +1 -5
  75. package/lib/components/field/Email/Email.d.ts.map +1 -1
  76. package/lib/components/field/Email/Email.js +5 -7
  77. package/lib/components/field/Email/Email.js.map +1 -1
  78. package/lib/components/field/Integer/Integer.d.ts +1 -5
  79. package/lib/components/field/Integer/Integer.d.ts.map +1 -1
  80. package/lib/components/field/Integer/Integer.js +4 -6
  81. package/lib/components/field/Integer/Integer.js.map +1 -1
  82. package/lib/components/field/Percentage/Percentage.d.ts +1 -5
  83. package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
  84. package/lib/components/field/Percentage/Percentage.js +4 -6
  85. package/lib/components/field/Percentage/Percentage.js.map +1 -1
  86. package/lib/components/field/Phone/Phone.d.ts +1 -5
  87. package/lib/components/field/Phone/Phone.d.ts.map +1 -1
  88. package/lib/components/field/Phone/Phone.js +6 -8
  89. package/lib/components/field/Phone/Phone.js.map +1 -1
  90. package/lib/components/field/RadioButtons/RadioButtons.d.ts +1 -7
  91. package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
  92. package/lib/components/field/RadioButtons/RadioButtons.js +12 -12
  93. package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
  94. package/lib/components/field/SemanticLink/SemanticLink.d.ts +9 -5
  95. package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
  96. package/lib/components/field/SemanticLink/SemanticLink.js +14 -10
  97. package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
  98. package/lib/components/field/TextArea/TextArea.d.ts +1 -6
  99. package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
  100. package/lib/components/field/TextArea/TextArea.js +3 -5
  101. package/lib/components/field/TextArea/TextArea.js.map +1 -1
  102. package/lib/components/field/TextContent/TextContent.d.ts +1 -7
  103. package/lib/components/field/TextContent/TextContent.d.ts.map +1 -1
  104. package/lib/components/field/TextContent/TextContent.js.map +1 -1
  105. package/lib/components/field/TextInput/TextInput.d.ts +1 -6
  106. package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
  107. package/lib/components/field/TextInput/TextInput.js +4 -6
  108. package/lib/components/field/TextInput/TextInput.js.map +1 -1
  109. package/lib/components/field/Time/Time.d.ts +1 -5
  110. package/lib/components/field/Time/Time.d.ts.map +1 -1
  111. package/lib/components/field/Time/Time.js +8 -10
  112. package/lib/components/field/Time/Time.js.map +1 -1
  113. package/lib/components/field/URL/URL.d.ts +1 -5
  114. package/lib/components/field/URL/URL.d.ts.map +1 -1
  115. package/lib/components/field/URL/URL.js +4 -6
  116. package/lib/components/field/URL/URL.js.map +1 -1
  117. package/lib/components/field/UserReference/UserReference.d.ts +40 -19
  118. package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
  119. package/lib/components/field/UserReference/UserReference.js +45 -16
  120. package/lib/components/field/UserReference/UserReference.js.map +1 -1
  121. package/lib/components/helpers/attachmentHelpers.d.ts +3 -3
  122. package/lib/components/helpers/attachmentHelpers.d.ts.map +1 -1
  123. package/lib/components/helpers/attachmentHelpers.js.map +1 -1
  124. package/lib/components/helpers/auth.d.ts +6 -8
  125. package/lib/components/helpers/auth.d.ts.map +1 -1
  126. package/lib/components/helpers/auth.js +335 -642
  127. package/lib/components/helpers/auth.js.map +1 -1
  128. package/lib/components/helpers/authManager.d.ts +17 -20
  129. package/lib/components/helpers/authManager.d.ts.map +1 -1
  130. package/lib/components/helpers/authManager.js +439 -711
  131. package/lib/components/helpers/authManager.js.map +1 -1
  132. package/lib/components/helpers/case-utils.d.ts.map +1 -1
  133. package/lib/components/helpers/case-utils.js +4 -5
  134. package/lib/components/helpers/case-utils.js.map +1 -1
  135. package/lib/components/helpers/common-utils.d.ts +1 -1
  136. package/lib/components/helpers/common-utils.js.map +1 -1
  137. package/lib/components/helpers/config_access.d.ts.map +1 -1
  138. package/lib/components/helpers/config_access.js +63 -0
  139. package/lib/components/helpers/config_access.js.map +1 -1
  140. package/lib/components/helpers/date-format-utils.d.ts +6 -1
  141. package/lib/components/helpers/date-format-utils.d.ts.map +1 -1
  142. package/lib/components/helpers/date-format-utils.js.map +1 -1
  143. package/lib/components/helpers/event-utils.d.ts +1 -1
  144. package/lib/components/helpers/event-utils.d.ts.map +1 -1
  145. package/lib/components/helpers/event-utils.js.map +1 -1
  146. package/lib/components/helpers/formatters/Currency.d.ts +6 -6
  147. package/lib/components/helpers/formatters/Currency.js +2 -2
  148. package/lib/components/helpers/formatters/Currency.js.map +1 -1
  149. package/lib/components/helpers/formatters/CurrencyMap.d.ts +320 -69
  150. package/lib/components/helpers/formatters/CurrencyMap.d.ts.map +1 -1
  151. package/lib/components/helpers/formatters/CurrencyMap.js.map +1 -1
  152. package/lib/components/helpers/formatters/Date.d.ts +4 -4
  153. package/lib/components/helpers/formatters/Date.js.map +1 -1
  154. package/lib/components/helpers/formatters/common.d.ts +1 -1
  155. package/lib/components/helpers/formatters/common.d.ts.map +1 -1
  156. package/lib/components/helpers/formatters/common.js.map +1 -1
  157. package/lib/components/helpers/formatters/index.d.ts +11 -11
  158. package/lib/components/helpers/formatters/index.d.ts.map +1 -1
  159. package/lib/components/helpers/formatters/index.js.map +1 -1
  160. package/lib/components/helpers/simpleTableHelpers.d.ts +1 -3
  161. package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
  162. package/lib/components/helpers/simpleTableHelpers.js +3 -5
  163. package/lib/components/helpers/simpleTableHelpers.js.map +1 -1
  164. package/lib/components/helpers/state-utils.d.ts.map +1 -1
  165. package/lib/components/helpers/state-utils.js.map +1 -1
  166. package/lib/components/helpers/template-utils.d.ts +3 -7
  167. package/lib/components/helpers/template-utils.d.ts.map +1 -1
  168. package/lib/components/helpers/template-utils.js +0 -1
  169. package/lib/components/helpers/template-utils.js.map +1 -1
  170. package/lib/components/helpers/versionHelpers.d.ts +0 -6
  171. package/lib/components/helpers/versionHelpers.d.ts.map +1 -1
  172. package/lib/components/helpers/versionHelpers.js +0 -6
  173. package/lib/components/helpers/versionHelpers.js.map +1 -1
  174. package/lib/components/infra/ActionButtons/ActionButtons.d.ts +13 -6
  175. package/lib/components/infra/ActionButtons/ActionButtons.d.ts.map +1 -1
  176. package/lib/components/infra/ActionButtons/ActionButtons.js +13 -1
  177. package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
  178. package/lib/components/infra/Assignment/Assignment.d.ts +15 -9
  179. package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
  180. package/lib/components/infra/Assignment/Assignment.js +21 -8
  181. package/lib/components/infra/Assignment/Assignment.js.map +1 -1
  182. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +14 -8
  183. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
  184. package/lib/components/infra/AssignmentCard/AssignmentCard.js +16 -3
  185. package/lib/components/infra/AssignmentCard/AssignmentCard.js.map +1 -1
  186. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +21 -1
  187. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
  188. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +48 -41
  189. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
  190. package/lib/components/infra/Containers/FlowContainer/helpers.d.ts.map +1 -1
  191. package/lib/components/infra/Containers/FlowContainer/helpers.js.map +1 -1
  192. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +17 -8
  193. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
  194. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +17 -6
  195. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
  196. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +22 -9
  197. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
  198. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +20 -3
  199. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
  200. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +19 -9
  201. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
  202. package/lib/components/infra/DashboardFilter/DashboardFilter.js +16 -2
  203. package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
  204. package/lib/components/infra/DashboardFilter/filterUtils.js +1 -1
  205. package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
  206. package/lib/components/infra/DeferLoad/DeferLoad.d.ts +14 -1
  207. package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
  208. package/lib/components/infra/DeferLoad/DeferLoad.js +15 -13
  209. package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
  210. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +12 -5
  211. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
  212. package/lib/components/infra/ErrorBoundary/ErrorBoundary.js +12 -2
  213. package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
  214. package/lib/components/infra/MultiStep/MultiStep.d.ts +17 -11
  215. package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
  216. package/lib/components/infra/MultiStep/MultiStep.js +18 -4
  217. package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
  218. package/lib/components/infra/NavBar/NavBar.d.ts +16 -8
  219. package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
  220. package/lib/components/infra/NavBar/NavBar.js +16 -3
  221. package/lib/components/infra/NavBar/NavBar.js.map +1 -1
  222. package/lib/components/infra/Reference/Reference.d.ts +17 -8
  223. package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
  224. package/lib/components/infra/Reference/Reference.js +15 -1
  225. package/lib/components/infra/Reference/Reference.js.map +1 -1
  226. package/lib/components/infra/Region/Region.d.ts +7 -4
  227. package/lib/components/infra/Region/Region.d.ts.map +1 -1
  228. package/lib/components/infra/Region/Region.js +4 -0
  229. package/lib/components/infra/Region/Region.js.map +1 -1
  230. package/lib/components/infra/RootContainer/RootContainer.d.ts +21 -1
  231. package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
  232. package/lib/components/infra/RootContainer/RootContainer.js +21 -4
  233. package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
  234. package/lib/components/infra/Stages/Stages.d.ts +8 -5
  235. package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
  236. package/lib/components/infra/Stages/Stages.js +6 -1
  237. package/lib/components/infra/Stages/Stages.js.map +1 -1
  238. package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.d.ts.map +1 -1
  239. package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js.map +1 -1
  240. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts +10 -4
  241. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts.map +1 -1
  242. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +9 -4
  243. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
  244. package/lib/components/infra/View/View.d.ts +16 -13
  245. package/lib/components/infra/View/View.d.ts.map +1 -1
  246. package/lib/components/infra/View/View.js +20 -2
  247. package/lib/components/infra/View/View.js.map +1 -1
  248. package/lib/components/template/AppShell/AppShell.d.ts +15 -20
  249. package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
  250. package/lib/components/template/AppShell/AppShell.js +22 -10
  251. package/lib/components/template/AppShell/AppShell.js.map +1 -1
  252. package/lib/components/template/BannerPage/BannerPage.d.ts +23 -11
  253. package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
  254. package/lib/components/template/BannerPage/BannerPage.js +22 -4
  255. package/lib/components/template/BannerPage/BannerPage.js.map +1 -1
  256. package/lib/components/template/CaseSummary/CaseSummary.d.ts +7 -5
  257. package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
  258. package/lib/components/template/CaseSummary/CaseSummary.js +6 -6
  259. package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
  260. package/lib/components/template/CaseView/CaseView.d.ts +22 -10
  261. package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
  262. package/lib/components/template/CaseView/CaseView.js +21 -8
  263. package/lib/components/template/CaseView/CaseView.js.map +1 -1
  264. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +15 -8
  265. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
  266. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +12 -0
  267. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
  268. package/lib/components/template/Confirmation/Confirmation.d.ts +16 -10
  269. package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
  270. package/lib/components/template/Confirmation/Confirmation.js +23 -12
  271. package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
  272. package/lib/components/template/DataReference/DataReference.d.ts +31 -1
  273. package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
  274. package/lib/components/template/DataReference/DataReference.js +48 -41
  275. package/lib/components/template/DataReference/DataReference.js.map +1 -1
  276. package/lib/components/template/DefaultForm/DefaultForm.d.ts +11 -1
  277. package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
  278. package/lib/components/template/DefaultForm/DefaultForm.js +10 -9
  279. package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
  280. package/lib/components/template/Details/Details/Details.d.ts +16 -1
  281. package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
  282. package/lib/components/template/Details/Details/Details.js +15 -10
  283. package/lib/components/template/Details/Details/Details.js.map +1 -1
  284. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +15 -7
  285. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
  286. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js +13 -1
  287. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
  288. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +16 -1
  289. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
  290. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +16 -14
  291. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
  292. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +16 -1
  293. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
  294. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +16 -14
  295. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
  296. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +19 -12
  297. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
  298. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +21 -7
  299. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
  300. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +7 -7
  301. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
  302. package/lib/components/template/InlineDashboard/InlineDashboard.js +5 -0
  303. package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
  304. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +15 -8
  305. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
  306. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js +14 -5
  307. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js.map +1 -1
  308. package/lib/components/template/ListPage/ListPage.d.ts +13 -5
  309. package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
  310. package/lib/components/template/ListPage/ListPage.js +10 -6
  311. package/lib/components/template/ListPage/ListPage.js.map +1 -1
  312. package/lib/components/template/ListView/ListView.d.ts +9 -1
  313. package/lib/components/template/ListView/ListView.d.ts.map +1 -1
  314. package/lib/components/template/ListView/ListView.js +123 -127
  315. package/lib/components/template/ListView/ListView.js.map +1 -1
  316. package/lib/components/template/ListView/utils.d.ts +0 -44
  317. package/lib/components/template/ListView/utils.d.ts.map +1 -1
  318. package/lib/components/template/ListView/utils.js +1 -142
  319. package/lib/components/template/ListView/utils.js.map +1 -1
  320. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +13 -9
  321. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
  322. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js +13 -2
  323. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -1
  324. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +1 -10
  325. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -1
  326. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js.map +1 -1
  327. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +16 -1
  328. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
  329. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +16 -14
  330. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
  331. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +1 -5
  332. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -1
  333. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js.map +1 -1
  334. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +14 -7
  335. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
  336. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js +13 -4
  337. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -1
  338. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +7 -4
  339. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
  340. package/lib/components/template/OneColumn/OneColumn/OneColumn.js +5 -0
  341. package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
  342. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +8 -4
  343. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
  344. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js +6 -3
  345. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -1
  346. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +7 -4
  347. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
  348. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js +5 -0
  349. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js.map +1 -1
  350. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +15 -1
  351. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
  352. package/lib/components/template/PromotedFilters/PromotedFilters.js +11 -15
  353. package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
  354. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
  355. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js +5 -57
  356. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
  357. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +1 -18
  358. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
  359. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +2 -2
  360. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
  361. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +29 -1
  362. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
  363. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js +28 -22
  364. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
  365. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +26 -14
  366. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
  367. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js +26 -5
  368. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
  369. package/lib/components/template/SubTabs/SubTabs.d.ts +10 -4
  370. package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
  371. package/lib/components/template/SubTabs/SubTabs.js +8 -1
  372. package/lib/components/template/SubTabs/SubTabs.js.map +1 -1
  373. package/lib/components/template/SubTabs/tabUtils.d.ts.map +1 -1
  374. package/lib/components/template/SubTabs/tabUtils.js.map +1 -1
  375. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts +11 -5
  376. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
  377. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +12 -1
  378. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
  379. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +8 -4
  380. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
  381. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js +6 -3
  382. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -1
  383. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +11 -5
  384. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
  385. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +9 -1
  386. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
  387. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +1 -10
  388. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
  389. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js +1 -1
  390. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js.map +1 -1
  391. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +16 -1
  392. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
  393. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +23 -31
  394. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
  395. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +1 -5
  396. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -1
  397. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js.map +1 -1
  398. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +14 -7
  399. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
  400. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js +14 -4
  401. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js.map +1 -1
  402. package/lib/components/template/WssNavBar/WssNavBar.d.ts +1 -17
  403. package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -1
  404. package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
  405. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts +17 -8
  406. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
  407. package/lib/components/widget/AppAnnouncement/AppAnnouncement.js +19 -4
  408. package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
  409. package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
  410. package/lib/components/widget/Attachment/Attachment.js +16 -24
  411. package/lib/components/widget/Attachment/Attachment.js.map +1 -1
  412. package/lib/components/widget/CaseHistory/CaseHistory.d.ts +7 -4
  413. package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
  414. package/lib/components/widget/CaseHistory/CaseHistory.js +8 -4
  415. package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
  416. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +1 -8
  417. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts.map +1 -1
  418. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
  419. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +1 -5
  420. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
  421. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +21 -31
  422. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
  423. package/lib/components/widget/Followers/Followers.d.ts +5 -4
  424. package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
  425. package/lib/components/widget/Followers/Followers.js +10 -3
  426. package/lib/components/widget/Followers/Followers.js.map +1 -1
  427. package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
  428. package/lib/components/widget/QuickCreate/QuickCreate.js +2 -10
  429. package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
  430. package/lib/components/widget/SummaryItem/SummaryItem.d.ts +1 -7
  431. package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
  432. package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
  433. package/lib/components/widget/SummaryList/SummaryList.d.ts +1 -7
  434. package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
  435. package/lib/components/widget/SummaryList/SummaryList.js +2 -5
  436. package/lib/components/widget/SummaryList/SummaryList.js.map +1 -1
  437. package/lib/components/widget/ToDo/ToDo.d.ts +27 -13
  438. package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
  439. package/lib/components/widget/ToDo/ToDo.js +64 -28
  440. package/lib/components/widget/ToDo/ToDo.js.map +1 -1
  441. package/lib/doc/KeyReleaseUpdates.md +0 -21
  442. package/lib/index.d.ts +0 -1
  443. package/lib/index.d.ts.map +1 -1
  444. package/lib/index.js +1 -2
  445. package/lib/index.js.map +1 -1
  446. package/lib/sdk-pega-component-map.d.ts +1 -15
  447. package/lib/sdk-pega-component-map.js +1 -15
  448. package/lib/sdk-pega-component-map.js.map +1 -1
  449. package/package.json +1 -1
  450. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts +0 -19
  451. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +0 -1
  452. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +0 -77
  453. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +0 -1
  454. package/lib/components/designSystemExtension/RichTextEditor/index.d.ts +0 -2
  455. package/lib/components/designSystemExtension/RichTextEditor/index.d.ts.map +0 -1
  456. package/lib/components/designSystemExtension/RichTextEditor/index.js +0 -2
  457. package/lib/components/designSystemExtension/RichTextEditor/index.js.map +0 -1
  458. package/lib/components/field/RichText/RichText.d.ts +0 -7
  459. package/lib/components/field/RichText/RichText.d.ts.map +0 -1
  460. package/lib/components/field/RichText/RichText.js +0 -51
  461. package/lib/components/field/RichText/RichText.js.map +0 -1
  462. package/lib/components/field/RichText/index.d.ts +0 -2
  463. package/lib/components/field/RichText/index.d.ts.map +0 -1
  464. package/lib/components/field/RichText/index.js +0 -2
  465. package/lib/components/field/RichText/index.js.map +0 -1
  466. package/lib/components/field/ScalarList/ScalarList.d.ts +0 -13
  467. package/lib/components/field/ScalarList/ScalarList.d.ts.map +0 -1
  468. package/lib/components/field/ScalarList/ScalarList.js +0 -34
  469. package/lib/components/field/ScalarList/ScalarList.js.map +0 -1
  470. package/lib/components/field/ScalarList/index.d.ts +0 -2
  471. package/lib/components/field/ScalarList/index.d.ts.map +0 -1
  472. package/lib/components/field/ScalarList/index.js +0 -2
  473. package/lib/components/field/ScalarList/index.js.map +0 -1
  474. package/lib/hooks/index.d.ts +0 -4
  475. package/lib/hooks/index.d.ts.map +0 -1
  476. package/lib/hooks/index.js +0 -4
  477. package/lib/hooks/index.js.map +0 -1
  478. package/lib/hooks/useAfterInitialEffect.d.ts +0 -9
  479. package/lib/hooks/useAfterInitialEffect.d.ts.map +0 -1
  480. package/lib/hooks/useAfterInitialEffect.js +0 -16
  481. package/lib/hooks/useAfterInitialEffect.js.map +0 -1
  482. package/lib/hooks/useConsolidatedRef.d.ts +0 -9
  483. package/lib/hooks/useConsolidatedRef.d.ts.map +0 -1
  484. package/lib/hooks/useConsolidatedRef.js +0 -30
  485. package/lib/hooks/useConsolidatedRef.js.map +0 -1
  486. package/lib/hooks/useUID.d.ts +0 -8
  487. package/lib/hooks/useUID.d.ts.map +0 -1
  488. package/lib/hooks/useUID.js +0 -14
  489. package/lib/hooks/useUID.js.map +0 -1
  490. package/lib/types/PConnProps.d.ts +0 -42
@@ -1 +1 @@
1
- {"version":3,"file":"AppAnnouncement.d.ts","sourceRoot":"","sources":["../../../../src/components/widget/AppAnnouncement/AppAnnouncement.tsx"],"names":[],"mappings":";AAMA,UAAU,oBAAoB;IAE5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAYD,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,oBAAoB,eAkClE"}
1
+ {"version":3,"file":"AppAnnouncement.d.ts","sourceRoot":"","sources":["../../../../src/components/widget/AppAnnouncement/AppAnnouncement.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AAanC,QAAA,MAAM,eAAe;;;;;;;;;;;;;;CAkCpB,CAAC;AAkBF,eAAe,eAAe,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import PropTypes from "prop-types";
2
3
  import { Card, CardContent, CardHeader, Typography, CardActions, Button } from "@material-ui/core";
3
4
  import { makeStyles } from '@material-ui/core/styles';
4
5
  const useStyles = makeStyles((theme) => ({
@@ -9,8 +10,8 @@ const useStyles = makeStyles((theme) => ({
9
10
  borderLeftColor: theme.palette.primary.light
10
11
  },
11
12
  }));
12
- export default function AppAnnouncement(props) {
13
- const { header = '', description = '', datasource = [], whatsnewlink = '' } = props;
13
+ const AppAnnouncement = (props) => {
14
+ const { header, description, datasource, whatsnewlink } = props;
14
15
  let details = [];
15
16
  if (datasource && datasource.source) {
16
17
  details = datasource.source.map((item) => {
@@ -33,6 +34,20 @@ export default function AppAnnouncement(props) {
33
34
  })),
34
35
  React.createElement(CardActions, null,
35
36
  React.createElement(Button, { color: "primary", onClick: handleClick, size: "small" }, "See what's new"))));
36
- }
37
- ;
37
+ };
38
+ AppAnnouncement.propTypes = {
39
+ header: PropTypes.string,
40
+ description: PropTypes.string,
41
+ datasource: PropTypes.instanceOf(Object),
42
+ whatsnewlink: PropTypes.string,
43
+ // image: PropTypes.string
44
+ };
45
+ AppAnnouncement.defaultProps = {
46
+ header: "",
47
+ description: "",
48
+ // image: "",
49
+ datasource: [],
50
+ whatsnewlink: ""
51
+ };
52
+ export default AppAnnouncement;
38
53
  //# sourceMappingURL=AppAnnouncement.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AppAnnouncement.js","sourceRoot":"","sources":["../../../../src/components/widget/AppAnnouncement/AppAnnouncement.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACnG,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAatD,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACvC,IAAI,EAAE;QACJ,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC3B,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC9B,UAAU,EAAE,WAAW;QACvB,eAAe,EAAE,KAAK,CAAC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WAAW,EAAE,IAAI,EAAC,OAAO,qBAA6B,CAC3E,CACT,CACR,CAAC;AACJ,CAAC;AAAA,CAAC","sourcesContent":["import React from \"react\";\nimport { Card, CardContent, CardHeader, Typography, CardActions, Button } from \"@material-ui/core\";\nimport { makeStyles } from '@material-ui/core/styles';\n\n// AppAnnouncement is one of the few components that does NOT have getPConnect.\n// So, no need to extend PConnProps\ninterface AppAnnouncementProps {\n // If any, enter additional props that only exist on this component\n header?: string,\n description?: string,\n datasource?: any,\n whatsnewlink?: string\n}\n\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n borderLeft: \"6px solid\",\n borderLeftColor: theme.palette.primary.light\n },\n}));\n\nexport default function AppAnnouncement(props: AppAnnouncementProps) {\n const { header = '', description = '', datasource = [], whatsnewlink = '' } = props;\n let details = [];\n if (datasource && datasource.source) {\n details = datasource.source.map((item) => {\n return item.name;\n });\n }\n\n const classes = useStyles();\n\n const handleClick = () => {\n window.open(whatsnewlink);\n }\n\n return (\n <Card title=\"AppAnnouncement\" className={classes.root}>\n <CardHeader title={<Typography variant=\"h6\">{header}</Typography>} />\n <CardContent>\n <Typography variant=\"body1\" gutterBottom>{description}</Typography>\n {\n details.map((itm, idx) => {\n const theKey = `AppAnn-item-${idx}`;\n return (\n <Typography key={theKey} variant=\"body2\">- {itm}</Typography>\n )\n })\n }\n </CardContent>\n <CardActions>\n <Button color=\"primary\" onClick={handleClick} size=\"small\">See what&apos;s new</Button>\n </CardActions>\n </Card>\n );\n};\n"]}
1
+ {"version":3,"file":"AppAnnouncement.js","sourceRoot":"","sources":["../../../../src/components/widget/AppAnnouncement/AppAnnouncement.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,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EAAE,EAAE;gBACvB,MAAM,MAAM,GAAG,eAAe,GAAG,EAAE,CAAC;gBACpC,OAAO,CACL,oBAAC,UAAU,IAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAC,OAAO;;oBAAI,GAAG,CAAc,CAC9D,CAAA;YACH,CAAC,CAAC,CAEQ;QACd,oBAAC,WAAW;YACV,oBAAC,MAAM,IAAC,KAAK,EAAC,SAAS,EAAC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAC,OAAO,qBAA6B,CAC3E,CACT,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,CAAC,SAAS,GAAG;IAC1B,MAAM,EAAE,SAAS,CAAC,MAAM;IACxB,WAAW,EAAE,SAAS,CAAC,MAAM;IAC7B,UAAU,EAAE,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC;IACxC,YAAY,EAAE,SAAS,CAAC,MAAM;IAC9B,0BAA0B;CAC3B,CAAC;AAEF,eAAe,CAAC,YAAY,GAAG;IAC7B,MAAM,EAAE,EAAE;IACV,WAAW,EAAE,EAAE;IACf,aAAa;IACb,UAAU,EAAE,EAAE;IACd,YAAY,EAAE,EAAE;CACjB,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Card, CardContent, CardHeader, Typography, CardActions, Button } from \"@material-ui/core\";\nimport { makeStyles } from '@material-ui/core/styles';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n borderLeft: \"6px solid\",\n borderLeftColor: theme.palette.primary.light\n },\n}));\n\nconst AppAnnouncement = (props) => {\n const { header, description, datasource, whatsnewlink } = props;\n let details = [];\n if (datasource && datasource.source) {\n details = datasource.source.map((item) => {\n return item.name;\n });\n }\n\n const classes = useStyles();\n\n const handleClick = () => {\n window.open(whatsnewlink);\n }\n\n return (\n <Card title=\"AppAnnouncement\" className={classes.root}>\n <CardHeader title={<Typography variant=\"h6\">{header}</Typography>} />\n <CardContent>\n <Typography variant=\"body1\" gutterBottom>{description}</Typography>\n {\n details.map((itm, idx) => {\n const theKey = `AppAnn-item-${idx}`;\n return (\n <Typography key={theKey} variant=\"body2\">- {itm}</Typography>\n )\n })\n }\n </CardContent>\n <CardActions>\n <Button color=\"primary\" onClick={handleClick} size=\"small\">See what&apos;s new</Button>\n </CardActions>\n </Card>\n );\n};\n\nAppAnnouncement.propTypes = {\n header: PropTypes.string,\n description: PropTypes.string,\n datasource: PropTypes.instanceOf(Object),\n whatsnewlink: PropTypes.string,\n // image: PropTypes.string\n};\n\nAppAnnouncement.defaultProps = {\n header: \"\",\n description: \"\",\n // image: \"\",\n datasource: [],\n whatsnewlink: \"\"\n};\n\nexport default AppAnnouncement;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Attachment.d.ts","sourceRoot":"","sources":["../../../../src/components/widget/Attachment/Attachment.tsx"],"names":[],"mappings":";AAKA,OAAO,kBAAkB,CAAC;AAwB1B,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,KAAA,eA6cvC"}
1
+ {"version":3,"file":"Attachment.d.ts","sourceRoot":"","sources":["../../../../src/components/widget/Attachment/Attachment.tsx"],"names":[],"mappings":";AAKA,OAAO,kBAAkB,CAAC;AAe1B,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,KAAA,eA0cvC"}
@@ -3,22 +3,14 @@ import { Button } from '@material-ui/core';
3
3
  import React, { useState, useEffect } from 'react';
4
4
  import { buildFilePropsFromResponse, getIconFromFileType, validateMaxSize, getIconForAttachment } from '../../helpers/attachmentHelpers';
5
5
  import './Attachment.css';
6
+ import SummaryList from '../SummaryList';
6
7
  import { CircularProgress } from "@material-ui/core";
7
8
  import download from "downloadjs";
8
- import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
9
- // NOTE: we can't use PConnProps in this file because the
10
- // PConnect type is missing a number of expected properties
11
- // such as attachmentsInfo and incorrect type for our use of clearMessages,
12
- // interface AttachmentProps extends PConnProps {
13
- // // If any, enter additional props that only exist on this component
14
- // }
15
9
  const getAttachmentKey = (name = '') => name ? `attachmentsList.${name}` : 'attachmentsList';
16
10
  function getCurrentAttachmentsList(key, context) {
17
11
  return PCore.getStoreValue(`.${key}`, 'context_data', context) || [];
18
12
  }
19
- export default function Attachment(props /* :AttachmentProps */) {
20
- // Get emitted components from map (so we can get any override that may exist)
21
- const SummaryList = getComponentFromMap('SummaryList');
13
+ export default function Attachment(props) {
22
14
  const PCoreVersion = PCore.getPCoreVersion();
23
15
  const { value, getPConnect, label, validatemessage } = props;
24
16
  /* this is a temporary fix because required is supposed to be passed as a boolean and NOT as a string */
@@ -32,7 +24,7 @@ export default function Attachment(props /* :AttachmentProps */) {
32
24
  if (value && value.pyCategoryName) {
33
25
  categoryName = value.pyCategoryName;
34
26
  }
35
- let valueRef = pConn.getStateProps()["value"];
27
+ let valueRef = pConn.getStateProps().value;
36
28
  valueRef = valueRef.indexOf('.') === 0 ? valueRef.substring(1) : valueRef;
37
29
  const [file, setFile] = useState(fileTemp);
38
30
  const resetAttachmentStoredState = () => {
@@ -58,9 +50,9 @@ export default function Attachment(props /* :AttachmentProps */) {
58
50
  let index = 0;
59
51
  const maxAttachmentSize = 5;
60
52
  for (const item of arFiles) {
61
- if (!validateMaxSize(item, maxAttachmentSize.toString())) {
53
+ if (!validateMaxSize(item, maxAttachmentSize)) {
62
54
  item.error = true;
63
- item.meta = pConn.getLocalizedValue(`File is too big. Max allowed size is ${maxAttachmentSize}MB.`, '', ''); // 2nd and 3rd args empty string until typedef marked correctly
55
+ item.meta = pConn.getLocalizedValue(`File is too big. Max allowed size is ${maxAttachmentSize}MB.`);
64
56
  }
65
57
  item.mimeType = item.type;
66
58
  item.icon = getIconFromFileType(item.type);
@@ -78,7 +70,7 @@ export default function Attachment(props /* :AttachmentProps */) {
78
70
  actions = [
79
71
  {
80
72
  id: `Cancel-${att.ID}`,
81
- text: pConn.getLocalizedValue('Cancel', '', ''),
73
+ text: pConn.getLocalizedValue('Cancel'),
82
74
  icon: "times",
83
75
  onClick: cancelFile
84
76
  }
@@ -92,7 +84,7 @@ export default function Attachment(props /* :AttachmentProps */) {
92
84
  "download",
93
85
  {
94
86
  id: `download-${ID}`,
95
- text: isFile ? pConn.getLocalizedValue('Download', '', '') : pConn.getLocalizedValue('Open', '', ''),
87
+ text: isFile ? pConn.getLocalizedValue('Download') : pConn.getLocalizedValue('Open'),
96
88
  icon: isFile ? "download" : "open",
97
89
  onClick: downloadFile
98
90
  }
@@ -101,7 +93,7 @@ export default function Attachment(props /* :AttachmentProps */) {
101
93
  "delete",
102
94
  {
103
95
  id: `Delete-${ID}`,
104
- text: pConn.getLocalizedValue('Delete', '', ''),
96
+ text: pConn.getLocalizedValue('Delete'),
105
97
  icon: "trash",
106
98
  onClick: deleteFile
107
99
  }
@@ -118,7 +110,7 @@ export default function Attachment(props /* :AttachmentProps */) {
118
110
  actions = [
119
111
  {
120
112
  id: `Remove-${att.ID}`,
121
- text: pConn.getLocalizedValue('Remove', '', ''),
113
+ text: pConn.getLocalizedValue('Remove'),
122
114
  icon: "trash",
123
115
  onClick: removeFile
124
116
  }
@@ -159,13 +151,13 @@ export default function Attachment(props /* :AttachmentProps */) {
159
151
  const errorHandler = (isFetchCanceled) => {
160
152
  return (error) => {
161
153
  if (!isFetchCanceled(error)) {
162
- let uploadFailMsg = pConn.getLocalizedValue('Something went wrong', '', ''); // 2nd and 3rd args empty string until typedef marked correctly
154
+ let uploadFailMsg = pConn.getLocalizedValue('Something went wrong');
163
155
  if (error.response && error.response.data && error.response.data.errorDetails) {
164
- uploadFailMsg = pConn.getLocalizedValue(error.response.data.errorDetails[0].localizedValue, '', ''); // 2nd and 3rd args empty string until typedef marked correctly
156
+ uploadFailMsg = pConn.getLocalizedValue(error.response.data.errorDetails[0].localizedValue);
165
157
  }
166
158
  myFiles[0].meta = uploadFailMsg;
167
159
  myFiles[0].error = true;
168
- myFiles[0].fileName = pConn.getLocalizedValue('Unable to upload file', '', ''); // 2nd and 3rd args empty string until typedef marked correctly
160
+ myFiles[0].fileName = pConn.getLocalizedValue('Unable to upload file');
169
161
  arFileList$ = myFiles.map((att) => {
170
162
  return getNewListUtilityItemProps({
171
163
  att,
@@ -218,7 +210,7 @@ export default function Attachment(props /* :AttachmentProps */) {
218
210
  isArrayDeepMerge: false
219
211
  });
220
212
  }
221
- const fieldName = pConn.getStateProps()["value"];
213
+ const fieldName = pConn.getStateProps().value;
222
214
  const context = pConn.getContextName();
223
215
  PCore.getMessageManager().clearMessages({
224
216
  type: PCore.getConstants().MESSAGES.MESSAGES_TYPE_ERROR,
@@ -226,7 +218,7 @@ export default function Attachment(props /* :AttachmentProps */) {
226
218
  pageReference: pConn.getPageReference(),
227
219
  context
228
220
  });
229
- myFiles[0].meta = pConn.getLocalizedValue('Uploaded successfully', '', ''); // 2nd and 3rd args empty string until typedef marked correctly
221
+ myFiles[0].meta = pConn.getLocalizedValue('Uploaded successfully');
230
222
  arFileList$ = myFiles.map((att) => {
231
223
  return getNewListUtilityItemProps({
232
224
  att,
@@ -337,12 +329,12 @@ export default function Attachment(props /* :AttachmentProps */) {
337
329
  const arMenuList = [];
338
330
  let oMenu = {};
339
331
  oMenu.icon = "download";
340
- oMenu.text = pConn.getLocalizedValue('Download', '', ''); // 2nd and 3rd args empty string until typedef marked correctly
332
+ oMenu.text = pConn.getLocalizedValue('Download');
341
333
  oMenu.onClick = () => { _downloadFileFromList(value.pxResults[0]); };
342
334
  arMenuList.push(oMenu);
343
335
  oMenu = {};
344
336
  oMenu.icon = "trash";
345
- oMenu.text = pConn.getLocalizedValue('Delete', '', ''); // 2nd and 3rd args empty string until typedef marked correctly
337
+ oMenu.text = pConn.getLocalizedValue('Delete');
346
338
  oMenu.onClick = () => { _removeFileFromList(arFileList$[0], arFileList$); };
347
339
  arMenuList.push(oMenu);
348
340
  arFileList$.push(getNewListUtilityItemProps({
@@ -1 +1 @@
1
- {"version":3,"file":"Attachment.js","sourceRoot":"","sources":["../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AAO,cAAW,IAAI,CAAC,KAAK,CAAC,WAAW,6BAA2B,mBAAmB,GAAgB,CAAC,CAC3J,CAEP,CAAC;KACH;IAED,OAAO,CACL,6BAAK,SAAS,EAAC,uBAAuB;QACpC,8BAAM,SAAS,EAAE,SAAS,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,EAAE,IAAG,KAAK,CAAQ;QACxE,qCAAU,OAAO,CAAW;QAC3B,eAAe,KAAK,EAAE,CAAC,CAAC,CAAC,8BAAM,SAAS,EAAC,YAAY,IAAE,eAAe,CAAQ,CAAC,CAAC,CAAC,EAAE,CAChF,CACP,CAAC;AACJ,CAAC","sourcesContent":["/* eslint-disable react/jsx-boolean-value */\n\nimport { Button } from '@material-ui/core';\nimport React, { useState, useEffect } from 'react';\nimport { buildFilePropsFromResponse, getIconFromFileType, validateMaxSize, getIconForAttachment } from '../../helpers/attachmentHelpers';\nimport './Attachment.css';\nimport { CircularProgress } from \"@material-ui/core\";\nimport download from \"downloadjs\";\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\n\n// import type { PConnProps } from '../../../types/PConnProps';\n\n// Remove this and use \"real\" PCore type once .d.ts is fixed (currently shows 2 errors)\ndeclare const PCore: any;\n\n// NOTE: we can't use PConnProps in this file because the\n// PConnect type is missing a number of expected properties\n// such as attachmentsInfo and incorrect type for our use of clearMessages,\n// interface AttachmentProps extends PConnProps {\n// // If any, enter additional props that only exist on this component\n// }\n\n\nconst getAttachmentKey = (name='') => name ? `attachmentsList.${name}` : 'attachmentsList';\n\nfunction getCurrentAttachmentsList(key, context) {\n return PCore.getStoreValue(`.${key}`, 'context_data', context) || [];\n}\n\nexport default function Attachment(props /* :AttachmentProps */) {\n // Get emitted components from map (so we can get any override that may exist)\n const SummaryList = getComponentFromMap('SummaryList');\n\n const PCoreVersion = PCore.getPCoreVersion();\n const {value, getPConnect, label, validatemessage} = props;\n /* this is a temporary fix because required is supposed to be passed as a boolean and NOT as a string */\n let { required, disabled } = props;\n [required, disabled] = [required, disabled].map(\n prop => prop === true || (typeof prop === 'string' && prop === 'true')\n );\n let arFileList$: Array<any> = [];\n const pConn = getPConnect();\n const caseID = PCore.getStoreValue('.pyID', 'caseInfo.content', pConn.getContextName());\n let fileTemp: any = {};\n\n let categoryName = '';\n if (value && value.pyCategoryName) {\n categoryName = value.pyCategoryName;\n }\n\n let valueRef = pConn.getStateProps()[\"value\"];\n valueRef = valueRef.indexOf('.') === 0 ? valueRef.substring(1) : valueRef;\n const [file, setFile] = useState(fileTemp);\n\n const resetAttachmentStoredState = () => {\n PCore.getStateUtils().updateState(pConn.getContextName(), getAttachmentKey(PCoreVersion?.includes('8.23') ? valueRef : ''), undefined, {\n pageReference: 'context_data',\n isArrayDeepMerge: false\n });\n };\n\n const fileDownload = (data, fileName, ext) => {\n const fileData = ext ? `${fileName}.${ext}` : fileName;\n download(atob(data), fileData);\n };\n\n function _downloadFileFromList(fileObj: any) {\n PCore.getAttachmentUtils()\n .downloadAttachment(fileObj.pzInsKey, pConn.getContextName())\n .then((content) => {\n const extension = fileObj.pyAttachName.split(\".\").pop();\n fileDownload(content.data, fileObj.pyFileName, extension);\n })\n .catch(() => {});\n }\n\n function setNewFiles(arFiles) {\n let index = 0;\n const maxAttachmentSize = 5;\n for (const item of arFiles) {\n if (!validateMaxSize(item, maxAttachmentSize.toString())) {\n item.error = true;\n item.meta = pConn.getLocalizedValue(`File is too big. Max allowed size is ${maxAttachmentSize}MB.`, '', ''); // 2nd and 3rd args empty string until typedef marked correctly\n }\n item.mimeType = item.type;\n item.icon = getIconFromFileType(item.type);\n item.ID = `${new Date().getTime()}I${index}`;\n index+=1;\n }\n return arFiles;\n }\n\n function getFiles(arFiles: Array<any>) {\n return setNewFiles(arFiles);\n }\n\n function getNewListUtilityItemProps(this: any, {\n att,\n cancelFile,\n downloadFile,\n deleteFile,\n removeFile\n }) {\n let actions;\n if (att.progress && att.progress !== 100) {\n actions = [\n {\n id: `Cancel-${att.ID}`,\n text: pConn.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 ? pConn.getLocalizedValue('Download', '', '') : pConn.getLocalizedValue('Open', '', ''),\n icon: isFile ? \"download\" : \"open\",\n onClick: downloadFile\n }\n ],\n [\n \"delete\",\n {\n id: `Delete-${ID}`,\n text: pConn.getLocalizedValue('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: pConn.getLocalizedValue('Remove', '', ''),\n icon: \"trash\",\n onClick: removeFile\n }\n ];\n }\n return {\n id: att.ID,\n visual: {\n icon: getIconForAttachment(this, att),\n progress: att.progress === 100 ? undefined: att.progress,\n },\n primary: {\n type: att.type,\n name: att.error ? att.fileName : att.name,\n icon: \"trash\",\n click: removeFile,\n },\n secondary: {\n text: att.meta,\n error: att.error\n },\n actions\n };\n };\n\n const onFileAdded = (event) => {\n const addedFile = event.target.files[0];\n setFile({\n props: {\n name: addedFile.name,\n icon: getIconFromFileType(addedFile.type),\n },\n inProgress: true\n });\n const arFiles$ = getFiles(event.target.files);\n const myFiles: any = Array.from(arFiles$);\n\n const onUploadProgress = () => {};\n\n const errorHandler = (isFetchCanceled) => {\n return (error) => {\n if (!isFetchCanceled(error)) {\n let uploadFailMsg = pConn.getLocalizedValue('Something went wrong', '', ''); // 2nd and 3rd args empty string until typedef marked correctly\n if (error.response && error.response.data && error.response.data.errorDetails) {\n uploadFailMsg = pConn.getLocalizedValue(error.response.data.errorDetails[0].localizedValue, '', ''); // 2nd and 3rd args empty string until typedef marked correctly\n }\n myFiles[0].meta = uploadFailMsg;\n myFiles[0].error = true;\n myFiles[0].fileName = pConn.getLocalizedValue('Unable to upload file', '', ''); // 2nd and 3rd args empty string until typedef marked correctly\n arFileList$ = myFiles.map((att) => {\n return getNewListUtilityItemProps({\n att,\n downloadFile: null,\n cancelFile: null,\n deleteFile: null,\n removeFile: null\n });\n });\n setFile((current) => {\n return {\n ...current,\n props: {\n ...current.props,\n arFileList$\n },\n inProgress: false,\n attachmentUploaded: true,\n showMenuIcon: false\n };\n });\n }\n throw error;\n };\n };\n\n PCore.getAttachmentUtils()\n .uploadAttachment(\n myFiles[0],\n onUploadProgress,\n errorHandler,\n pConn.getContextName()\n )\n .then((fileRes) => {\n let reqObj;\n if (PCoreVersion?.includes('8.7')) {\n reqObj = {\n type: \"File\",\n attachmentFieldName: valueRef,\n category: categoryName,\n ID: fileRes.ID\n };\n pConn.attachmentsInfo = reqObj;\n } else {\n reqObj = {\n type: \"File\",\n label: valueRef,\n category: categoryName,\n handle: fileRes.ID,\n ID: fileRes.clientFileID\n };\n const currentAttachmentList = getCurrentAttachmentsList( getAttachmentKey(PCoreVersion?.includes('8.23') ? valueRef : ''), pConn.getContextName()).filter(\n (f) => f.label !== valueRef\n );\n PCore.getStateUtils().updateState(\n pConn.getContextName(),\n getAttachmentKey(PCoreVersion?.includes('8.23') ? valueRef : ''),\n [...currentAttachmentList, reqObj],\n {\n pageReference: 'context_data',\n isArrayDeepMerge: false\n }\n );\n }\n const fieldName = pConn.getStateProps()[\"value\"];\n const context = pConn.getContextName();\n\n PCore.getMessageManager().clearMessages({\n type: PCore.getConstants().MESSAGES.MESSAGES_TYPE_ERROR,\n property: fieldName,\n pageReference: pConn.getPageReference(),\n context\n });\n myFiles[0].meta = pConn.getLocalizedValue('Uploaded successfully', '', ''); // 2nd and 3rd args empty string until typedef marked correctly\n\n arFileList$ = myFiles.map((att) => {\n return getNewListUtilityItemProps({\n att,\n downloadFile: null,\n cancelFile: null,\n deleteFile: null,\n removeFile: null\n });\n });\n setFile((current) => {\n return {\n ...current,\n props: {\n ...current.props,\n arFileList$\n },\n inProgress: false,\n attachmentUploaded: true,\n showMenuIcon: false\n };\n });\n })\n\n .catch(() => {\n // just catching the rethrown error at uploadAttachment\n // to handle Unhandled rejections\n });\n };\n\n function _removeFileFromList(item: any, list) {\n const arFileList = file.props ? file.props.arFileList$ : list;\n const fileIndex = arFileList.findIndex(element => element?.id === item?.id);\n if (PCoreVersion?.includes('8.7')) {\n if (value) {\n pConn.attachmentsInfo = {\n type: \"File\",\n attachmentFieldName: valueRef,\n delete: true\n };\n }\n if (fileIndex > -1) { arFileList.splice(parseInt(fileIndex, 10), 1) };\n setFile((current) => {\n return {\n ...current,\n props: {\n ...current.props,\n arFileList\n },\n };\n });\n } else {\n const attachmentsList = [];\n const currentAttachmentList = getCurrentAttachmentsList( getAttachmentKey(PCoreVersion?.includes('8.23') ? valueRef : ''), pConn.getContextName()).filter(\n (f) => f.label !== valueRef\n );\n if (value && value.pxResults && +value.pyCount > 0) {\n const deletedFile = {\n type: \"File\",\n label: valueRef,\n delete: true,\n responseProps: {\n pzInsKey: arFileList[fileIndex].id\n },\n };\n // updating the redux store to help form-handler in passing the data to delete the file from server\n PCore.getStateUtils().updateState(\n pConn.getContextName(),\n getAttachmentKey(PCoreVersion?.includes('8.23') ? valueRef : ''),\n [...currentAttachmentList, deletedFile],\n {\n pageReference: 'context_data',\n isArrayDeepMerge: false\n }\n );\n } else {\n PCore.getStateUtils().updateState(\n pConn.getContextName(),\n getAttachmentKey(PCoreVersion?.includes('8.23') ? valueRef : ''),\n [...currentAttachmentList, ...attachmentsList],\n {\n pageReference: 'context_data',\n isArrayDeepMerge: false\n }\n );\n }\n if (fileIndex > -1) { arFileList.splice(parseInt(fileIndex, 10), 1) };\n setFile((current) => {\n return {\n ...current,\n props: {\n ...current.props,\n arFileList\n },\n };\n });\n }\n }\n\n useEffect(() => {\n if (value && value.pxResults && +value.pyCount > 0) {\n fileTemp = buildFilePropsFromResponse(value.pxResults[0]);\n\n if (fileTemp.responseProps) {\n if (!pConn.attachmentsInfo) {\n pConn.attachmentsInfo = {\n type: \"File\",\n attachmentFieldName: valueRef,\n category: categoryName\n };\n }\n\n if (fileTemp.responseProps.pzInsKey && !fileTemp.responseProps.pzInsKey.includes(\"temp\")) {\n\n fileTemp.props.type = fileTemp.responseProps.pyMimeFileExtension;\n fileTemp.props.mimeType = fileTemp.responseProps.pyMimeFileExtension;\n fileTemp.props.ID = fileTemp.responseProps.pzInsKey;\n // create the actions for the \"more\" menu on the attachment\n const arMenuList: Array<any> = [];\n let oMenu: any = {};\n\n oMenu.icon = \"download\";\n oMenu.text = pConn.getLocalizedValue('Download', '', ''); // 2nd and 3rd args empty string until typedef marked correctly\n oMenu.onClick = () => { _downloadFileFromList(value.pxResults[0])}\n arMenuList.push(oMenu);\n oMenu = {};\n oMenu.icon = \"trash\";\n oMenu.text = pConn.getLocalizedValue('Delete', '', ''); // 2nd and 3rd args empty string until typedef marked correctly\n oMenu.onClick = () => { _removeFileFromList(arFileList$[0], arFileList$)}\n arMenuList.push(oMenu);\n\n arFileList$.push(getNewListUtilityItemProps({\n att: fileTemp.props,\n downloadFile: null,\n cancelFile: null,\n deleteFile: null,\n removeFile: null\n }));\n arFileList$[0].actions = arMenuList;\n\n setFile((current) => {\n return {\n ...current,\n props: {\n ...current.props,\n arFileList$\n },\n inProgress: false,\n attachmentUploaded: true,\n showMenuIcon: true\n };\n });\n }\n\n if (fileTemp) {\n const currentAttachmentList = getCurrentAttachmentsList( getAttachmentKey(PCoreVersion?.includes('8.23') ? valueRef : ''), pConn.getContextName());\n const index = currentAttachmentList.findIndex(element => element.props.ID === fileTemp.props.ID);\n let tempFiles: any = [];\n if (index < 0) {\n tempFiles = [fileTemp];\n }\n PCore.getStateUtils().updateState(\n pConn.getContextName(),\n getAttachmentKey(PCoreVersion?.includes('8.23') ? valueRef : ''),\n [...currentAttachmentList, ...tempFiles],\n {\n pageReference: 'context_data',\n isArrayDeepMerge: false\n }\n );\n }\n }\n }\n PCore.getPubSubUtils().subscribe(\n PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION,\n resetAttachmentStoredState,\n caseID\n );\n return () => {\n PCore.getPubSubUtils().unsubscribe(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION, caseID);\n };\n }, []);\n\n let content = (\n <div className={`${validatemessage === '' ? 'file-div' : 'file-div-error'}`}>\n {file.inProgress && (<div className=\"progress-div\"><CircularProgress /></div>)}\n <div hidden={true} id=\"attachment-ID\">{valueRef}</div>\n <label htmlFor={valueRef}>\n <input\n style={{ display: 'none' }}\n id={valueRef}\n name='upload-photo'\n type='file'\n required={required}\n onChange={onFileAdded}\n />\n <Button variant='outlined' color='primary' component=\"span\">\n Upload file\n </Button>\n </label>\n </div>\n );\n\n if (file && file.attachmentUploaded && file.props.arFileList$ && file.props.arFileList$.length > 0) {\n content = (\n <div>\n {file.showMenuIcon && (<SummaryList arItems$={file.props.arFileList$} menuIconOverrideAction$={_removeFileFromList}></SummaryList>)}\n {!file.showMenuIcon && (<SummaryList menuIconOverride$='trash' arItems$={file.props.arFileList$} menuIconOverrideAction$={_removeFileFromList}></SummaryList>)}\n </div>\n\n );\n }\n\n return (\n <div className='file-upload-container'>\n <span className={`label ${required ? 'file-label' : ''}`}>{label}</span>\n <section>{content}</section>\n {validatemessage !== \"\" ? <span className='file-error'>{validatemessage}</span> : ''}\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"Attachment.js","sourceRoot":"","sources":["../../../../src/components/widget/Attachment/Attachment.tsx"],"names":[],"mappings":"AAAA,4CAA4C;AAE5C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAA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AAC;IAEF,IAAI,IAAI,IAAI,IAAI,CAAC,kBAAkB,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE;QAClG,OAAO,GAAG,CACR;YACI,IAAI,CAAC,YAAY,IAAI,CAAC,oBAAC,WAAW,gBAAW,IAAI,CAAC,KAAK,CAAC,WAAW,6BAA2B,mBAAmB,GAAgB,CAAC;YAClI,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC,oBAAC,WAAW,yBAAmB,OAAO,cAAW,IAAI,CAAC,KAAK,CAAC,WAAW,6BAA2B,mBAAmB,GAAgB,CAAC,CAC3J,CAEP,CAAC;KACH;IAED,OAAO,CACL,6BAAK,SAAS,EAAC,uBAAuB;QACpC,8BAAM,SAAS,EAAE,SAAS,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,EAAE,IAAG,KAAK,CAAQ;QACxE,qCAAU,OAAO,CAAW;QAC3B,eAAe,KAAK,EAAE,CAAC,CAAC,CAAC,8BAAM,SAAS,EAAC,YAAY,IAAE,eAAe,CAAQ,CAAC,CAAC,CAAC,EAAE,CAChF,CACP,CAAC;AACJ,CAAC","sourcesContent":["/* eslint-disable react/jsx-boolean-value */\n\nimport { Button } from '@material-ui/core';\nimport React, { useState, useEffect } from 'react';\nimport { buildFilePropsFromResponse, getIconFromFileType, validateMaxSize, getIconForAttachment } from '../../helpers/attachmentHelpers';\nimport './Attachment.css';\nimport SummaryList from '../SummaryList'\nimport { CircularProgress } from \"@material-ui/core\";\nimport download from \"downloadjs\";\n\n// Remove this and use \"real\" PCore type once .d.ts is fixed (currently shows 2 errors)\ndeclare const PCore: any;\n\n\nconst getAttachmentKey = (name='') => name ? `attachmentsList.${name}` : 'attachmentsList';\n\nfunction getCurrentAttachmentsList(key, context) {\n return PCore.getStoreValue(`.${key}`, 'context_data', context) || [];\n}\n\nexport default function Attachment(props) {\n const PCoreVersion = PCore.getPCoreVersion();\n const {value, getPConnect, label, validatemessage} = props;\n /* this is a temporary fix because required is supposed to be passed as a boolean and NOT as a string */\n let { required, disabled } = props;\n [required, disabled] = [required, disabled].map(\n prop => prop === true || (typeof prop === 'string' && prop === 'true')\n );\n let arFileList$: Array<any> = [];\n const pConn = getPConnect();\n const caseID = PCore.getStoreValue('.pyID', 'caseInfo.content', pConn.getContextName());\n let fileTemp: any = {};\n\n let categoryName = '';\n if (value && value.pyCategoryName) {\n categoryName = value.pyCategoryName;\n }\n\n let valueRef = pConn.getStateProps().value;\n valueRef = valueRef.indexOf('.') === 0 ? valueRef.substring(1) : valueRef;\n const [file, setFile] = useState(fileTemp);\n\n const resetAttachmentStoredState = () => {\n PCore.getStateUtils().updateState(pConn.getContextName(), getAttachmentKey(PCoreVersion?.includes('8.23') ? valueRef : ''), undefined, {\n pageReference: 'context_data',\n isArrayDeepMerge: false\n });\n };\n\n const fileDownload = (data, fileName, ext) => {\n const fileData = ext ? `${fileName}.${ext}` : fileName;\n download(atob(data), fileData);\n };\n\n function _downloadFileFromList(fileObj: any) {\n PCore.getAttachmentUtils()\n .downloadAttachment(fileObj.pzInsKey, pConn.getContextName())\n .then((content) => {\n const extension = fileObj.pyAttachName.split(\".\").pop();\n fileDownload(content.data, fileObj.pyFileName, extension);\n })\n .catch(() => {});\n }\n\n function setNewFiles(arFiles) {\n let index = 0;\n const maxAttachmentSize = 5;\n for (const item of arFiles) {\n if (!validateMaxSize(item, maxAttachmentSize)) {\n item.error = true;\n item.meta = pConn.getLocalizedValue(`File is too big. Max allowed size is ${maxAttachmentSize}MB.`);\n }\n item.mimeType = item.type;\n item.icon = getIconFromFileType(item.type);\n item.ID = `${new Date().getTime()}I${index}`;\n index+=1;\n }\n return arFiles;\n }\n\n function getFiles(arFiles: Array<any>) {\n return setNewFiles(arFiles);\n }\n\n function getNewListUtilityItemProps(this: any, {\n att,\n cancelFile,\n downloadFile,\n deleteFile,\n removeFile\n }) {\n let actions;\n if (att.progress && att.progress !== 100) {\n actions = [\n {\n id: `Cancel-${att.ID}`,\n text: pConn.getLocalizedValue('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 ? pConn.getLocalizedValue('Download') : pConn.getLocalizedValue('Open'),\n icon: isFile ? \"download\" : \"open\",\n onClick: downloadFile\n }\n ],\n [\n \"delete\",\n {\n id: `Delete-${ID}`,\n text: pConn.getLocalizedValue('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: pConn.getLocalizedValue('Remove'),\n icon: \"trash\",\n onClick: removeFile\n }\n ];\n }\n return {\n id: att.ID,\n visual: {\n icon: getIconForAttachment(this, att),\n progress: att.progress === 100 ? undefined: att.progress,\n },\n primary: {\n type: att.type,\n name: att.error ? att.fileName : att.name,\n icon: \"trash\",\n click: removeFile,\n },\n secondary: {\n text: att.meta,\n error: att.error\n },\n actions\n };\n };\n\n const onFileAdded = (event) => {\n const addedFile = event.target.files[0];\n setFile({\n props: {\n name: addedFile.name,\n icon: getIconFromFileType(addedFile.type),\n },\n inProgress: true\n });\n const arFiles$ = getFiles(event.target.files);\n const myFiles: any = Array.from(arFiles$);\n\n const onUploadProgress = () => {};\n\n const errorHandler = (isFetchCanceled) => {\n return (error) => {\n if (!isFetchCanceled(error)) {\n let uploadFailMsg = pConn.getLocalizedValue('Something went wrong');\n if (error.response && error.response.data && error.response.data.errorDetails) {\n uploadFailMsg = pConn.getLocalizedValue(error.response.data.errorDetails[0].localizedValue);\n }\n myFiles[0].meta = uploadFailMsg;\n myFiles[0].error = true;\n myFiles[0].fileName = pConn.getLocalizedValue('Unable to upload file');\n arFileList$ = myFiles.map((att) => {\n return getNewListUtilityItemProps({\n att,\n downloadFile: null,\n cancelFile: null,\n deleteFile: null,\n removeFile: null\n });\n });\n setFile((current) => {\n return {\n ...current,\n props: {\n ...current.props,\n arFileList$\n },\n inProgress: false,\n attachmentUploaded: true,\n showMenuIcon: false\n };\n });\n }\n throw error;\n };\n };\n\n PCore.getAttachmentUtils()\n .uploadAttachment(\n myFiles[0],\n onUploadProgress,\n errorHandler,\n pConn.getContextName()\n )\n .then((fileRes) => {\n let reqObj;\n if (PCoreVersion?.includes('8.7')) {\n reqObj = {\n type: \"File\",\n attachmentFieldName: valueRef,\n category: categoryName,\n ID: fileRes.ID\n };\n pConn.attachmentsInfo = reqObj;\n } else {\n reqObj = {\n type: \"File\",\n label: valueRef,\n category: categoryName,\n handle: fileRes.ID,\n ID: fileRes.clientFileID\n };\n const currentAttachmentList = getCurrentAttachmentsList( getAttachmentKey(PCoreVersion?.includes('8.23') ? valueRef : ''), pConn.getContextName()).filter(\n (f) => f.label !== valueRef\n );\n PCore.getStateUtils().updateState(\n pConn.getContextName(),\n getAttachmentKey(PCoreVersion?.includes('8.23') ? valueRef : ''),\n [...currentAttachmentList, reqObj],\n {\n pageReference: 'context_data',\n isArrayDeepMerge: false\n }\n );\n }\n const fieldName = pConn.getStateProps().value;\n const context = pConn.getContextName();\n\n PCore.getMessageManager().clearMessages({\n type: PCore.getConstants().MESSAGES.MESSAGES_TYPE_ERROR,\n property: fieldName,\n pageReference: pConn.getPageReference(),\n context\n });\n myFiles[0].meta = pConn.getLocalizedValue('Uploaded successfully');\n\n arFileList$ = myFiles.map((att) => {\n return getNewListUtilityItemProps({\n att,\n downloadFile: null,\n cancelFile: null,\n deleteFile: null,\n removeFile: null\n });\n });\n setFile((current) => {\n return {\n ...current,\n props: {\n ...current.props,\n arFileList$\n },\n inProgress: false,\n attachmentUploaded: true,\n showMenuIcon: false\n };\n });\n })\n\n .catch(() => {\n // just catching the rethrown error at uploadAttachment\n // to handle Unhandled rejections\n });\n };\n\n function _removeFileFromList(item: any, list) {\n const arFileList = file.props ? file.props.arFileList$ : list;\n const fileIndex = arFileList.findIndex(element => element?.id === item?.id);\n if (PCoreVersion?.includes('8.7')) {\n if (value) {\n pConn.attachmentsInfo = {\n type: \"File\",\n attachmentFieldName: valueRef,\n delete: true\n };\n }\n if (fileIndex > -1) { arFileList.splice(parseInt(fileIndex, 10), 1) };\n setFile((current) => {\n return {\n ...current,\n props: {\n ...current.props,\n arFileList\n },\n };\n });\n } else {\n const attachmentsList = [];\n const currentAttachmentList = getCurrentAttachmentsList( getAttachmentKey(PCoreVersion?.includes('8.23') ? valueRef : ''), pConn.getContextName()).filter(\n (f) => f.label !== valueRef\n );\n if (value && value.pxResults && +value.pyCount > 0) {\n const deletedFile = {\n type: \"File\",\n label: valueRef,\n delete: true,\n responseProps: {\n pzInsKey: arFileList[fileIndex].id\n },\n };\n // updating the redux store to help form-handler in passing the data to delete the file from server\n PCore.getStateUtils().updateState(\n pConn.getContextName(),\n getAttachmentKey(PCoreVersion?.includes('8.23') ? valueRef : ''),\n [...currentAttachmentList, deletedFile],\n {\n pageReference: 'context_data',\n isArrayDeepMerge: false\n }\n );\n } else {\n PCore.getStateUtils().updateState(\n pConn.getContextName(),\n getAttachmentKey(PCoreVersion?.includes('8.23') ? valueRef : ''),\n [...currentAttachmentList, ...attachmentsList],\n {\n pageReference: 'context_data',\n isArrayDeepMerge: false\n }\n );\n }\n if (fileIndex > -1) { arFileList.splice(parseInt(fileIndex, 10), 1) };\n setFile((current) => {\n return {\n ...current,\n props: {\n ...current.props,\n arFileList\n },\n };\n });\n }\n }\n\n useEffect(() => {\n if (value && value.pxResults && +value.pyCount > 0) {\n fileTemp = buildFilePropsFromResponse(value.pxResults[0]);\n\n if (fileTemp.responseProps) {\n if (!pConn.attachmentsInfo) {\n pConn.attachmentsInfo = {\n type: \"File\",\n attachmentFieldName: valueRef,\n category: categoryName\n };\n }\n\n if (fileTemp.responseProps.pzInsKey && !fileTemp.responseProps.pzInsKey.includes(\"temp\")) {\n\n fileTemp.props.type = fileTemp.responseProps.pyMimeFileExtension;\n fileTemp.props.mimeType = fileTemp.responseProps.pyMimeFileExtension;\n fileTemp.props.ID = fileTemp.responseProps.pzInsKey;\n // create the actions for the \"more\" menu on the attachment\n const arMenuList: Array<any> = [];\n let oMenu: any = {};\n\n oMenu.icon = \"download\";\n oMenu.text = pConn.getLocalizedValue('Download');\n oMenu.onClick = () => { _downloadFileFromList(value.pxResults[0])}\n arMenuList.push(oMenu);\n oMenu = {};\n oMenu.icon = \"trash\";\n oMenu.text = pConn.getLocalizedValue('Delete');\n oMenu.onClick = () => { _removeFileFromList(arFileList$[0], arFileList$)}\n arMenuList.push(oMenu);\n\n arFileList$.push(getNewListUtilityItemProps({\n att: fileTemp.props,\n downloadFile: null,\n cancelFile: null,\n deleteFile: null,\n removeFile: null\n }));\n arFileList$[0].actions = arMenuList;\n\n setFile((current) => {\n return {\n ...current,\n props: {\n ...current.props,\n arFileList$\n },\n inProgress: false,\n attachmentUploaded: true,\n showMenuIcon: true\n };\n });\n }\n\n if (fileTemp) {\n const currentAttachmentList = getCurrentAttachmentsList( getAttachmentKey(PCoreVersion?.includes('8.23') ? valueRef : ''), pConn.getContextName());\n const index = currentAttachmentList.findIndex(element => element.props.ID === fileTemp.props.ID);\n let tempFiles: any = [];\n if (index < 0) {\n tempFiles = [fileTemp];\n }\n PCore.getStateUtils().updateState(\n pConn.getContextName(),\n getAttachmentKey(PCoreVersion?.includes('8.23') ? valueRef : ''),\n [...currentAttachmentList, ...tempFiles],\n {\n pageReference: 'context_data',\n isArrayDeepMerge: false\n }\n );\n }\n }\n }\n PCore.getPubSubUtils().subscribe(\n PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION,\n resetAttachmentStoredState,\n caseID\n );\n return () => {\n PCore.getPubSubUtils().unsubscribe(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION, caseID);\n };\n }, []);\n\n let content = (\n <div className={`${validatemessage === '' ? 'file-div' : 'file-div-error'}`}>\n {file.inProgress && (<div className=\"progress-div\"><CircularProgress /></div>)}\n <div hidden={true} id=\"attachment-ID\">{valueRef}</div>\n <label htmlFor={valueRef}>\n <input\n style={{ display: 'none' }}\n id={valueRef}\n name='upload-photo'\n type='file'\n required={required}\n onChange={onFileAdded}\n />\n <Button variant='outlined' color='primary' component=\"span\">\n Upload file\n </Button>\n </label>\n </div>\n );\n\n if (file && file.attachmentUploaded && file.props.arFileList$ && file.props.arFileList$.length > 0) {\n content = (\n <div>\n {file.showMenuIcon && (<SummaryList arItems$={file.props.arFileList$} menuIconOverrideAction$={_removeFileFromList}></SummaryList>)}\n {!file.showMenuIcon && (<SummaryList menuIconOverride$='trash' arItems$={file.props.arFileList$} menuIconOverrideAction$={_removeFileFromList}></SummaryList>)}\n </div>\n\n );\n }\n\n return (\n <div className='file-upload-container'>\n <span className={`label ${required ? 'file-label' : ''}`}>{label}</span>\n <section>{content}</section>\n {validatemessage !== \"\" ? <span className='file-error'>{validatemessage}</span> : ''}\n </div>\n );\n}\n"]}
@@ -1,7 +1,10 @@
1
1
  /// <reference types="react" />
2
- import type { PConnProps } from '../../../types/PConnProps';
3
- interface CaseHistoryProps extends PConnProps {
2
+ import PropTypes from "prop-types";
3
+ declare function CaseHistory(props: any): JSX.Element;
4
+ declare namespace CaseHistory {
5
+ var propTypes: {
6
+ getPConnect: PropTypes.Validator<(...args: any[]) => any>;
7
+ };
4
8
  }
5
- export default function CaseHistory(props: CaseHistoryProps): JSX.Element;
6
- export {};
9
+ export default CaseHistory;
7
10
  //# sourceMappingURL=CaseHistory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CaseHistory.d.ts","sourceRoot":"","sources":["../../../../src/components/widget/CaseHistory/CaseHistory.tsx"],"names":[],"mappings":";AAUA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAG5D,UAAU,gBAAiB,SAAQ,UAAU;CAE5C;AAyBD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAC,gBAAgB,eAkIzD"}
1
+ {"version":3,"file":"CaseHistory.d.ts","sourceRoot":"","sources":["../../../../src/components/widget/CaseHistory/CaseHistory.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AAiCnC,iBAAwB,WAAW,CAAC,KAAK,KAAA,eAkIxC;kBAlIuB,WAAW;;;;;eAAX,WAAW"}
@@ -1,4 +1,5 @@
1
1
  import React, { useState, useRef, useEffect } from "react";
2
+ import PropTypes from "prop-types";
2
3
  import { withStyles, createStyles } from '@material-ui/core/styles';
3
4
  import Table from '@material-ui/core/Table';
4
5
  import TableBody from '@material-ui/core/TableBody';
@@ -28,14 +29,14 @@ export default function CaseHistory(props) {
28
29
  const thePConn = getPConnect();
29
30
  // let waitingForData = true;
30
31
  const displayedColumns = [
31
- { label: thePConn.getLocalizedValue('Date', '', ''), type: "DateTime", fieldName: "pxTimeCreated" },
32
- { label: thePConn.getLocalizedValue('Description', '', ''), type: "TextInput", fieldName: "pyMessageKey" },
33
- { label: thePConn.getLocalizedValue('Performed by', '', ''), type: "TextInput", fieldName: "pyPerformer" } // 2nd and 3rd args empty string until typedef marked correctly
32
+ { label: thePConn.getLocalizedValue('Date'), type: "DateTime", fieldName: "pxTimeCreated" },
33
+ { label: thePConn.getLocalizedValue('Description'), type: "TextInput", fieldName: "pyMessageKey" },
34
+ { label: thePConn.getLocalizedValue('Performed by'), type: "TextInput", fieldName: "pyPerformer" }
34
35
  ];
35
36
  const rowData = useRef([]);
36
37
  // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
37
38
  const [waitingForData, setWaitingForData] = useState(true);
38
- const caseID = thePConn.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID, ''); // 2nd arg empty string until typedef marked correctly
39
+ const caseID = thePConn.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID);
39
40
  const dataViewName = "D_pyWorkHistory";
40
41
  const context = thePConn.getContextName();
41
42
  function computeRowData(rows) {
@@ -111,4 +112,7 @@ export default function CaseHistory(props) {
111
112
  React.createElement(TableHead, null, getTableHeader()),
112
113
  React.createElement(TableBody, null, getTableData())))));
113
114
  }
115
+ CaseHistory.propTypes = {
116
+ getPConnect: PropTypes.func.isRequired
117
+ };
114
118
  //# sourceMappingURL=CaseHistory.js.map
@@ -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,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;AAY5C,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,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC;KAClE;IACD,IAAI,EAAE;QACJ,WAAW,EAAE,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AAO,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
+ {"version":3,"file":"CaseHistory.js","sourceRoot":"","sources":["../../../../src/components/widget/CaseHistory/CaseHistory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S,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\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) {\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\" },\n { label: thePConn.getLocalizedValue('Description'), type: \"TextInput\", fieldName: \"pyMessageKey\" },\n { label: thePConn.getLocalizedValue('Performed by'), 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,11 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import './ActionButtonsForFileUtil.css';
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 {};
3
+ export default function ActionButtonsForFileUtil(props: any): JSX.Element;
11
4
  //# 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;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
+ {"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 +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;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
+ {"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,8 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import './FileUtility.css';
3
- import type { PConnProps } from '../../../../types/PConnProps';
4
- interface FileUtilityProps extends PConnProps {
5
- }
6
- export default function FileUtility(props: FileUtilityProps): JSX.Element;
7
- export {};
3
+ export default function FileUtility(props: any): JSX.Element;
8
4
  //# 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;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"}
1
+ {"version":3,"file":"FileUtility.d.ts","sourceRoot":"","sources":["../../../../../src/components/widget/FileUtility/FileUtility/FileUtility.tsx"],"names":[],"mappings":";AAMA,OAAO,mBAAmB,CAAC;AAW3B,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,KAAA,eAsiBxC"}