@pega/react-sdk-components 23.1.10 → 23.1.12

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