@pega/react-sdk-components 24.1.10 → 24.2.11

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 (279) hide show
  1. package/lib/bridge/react_pconnect.d.ts.map +1 -1
  2. package/lib/bridge/react_pconnect.js +2 -1
  3. package/lib/bridge/react_pconnect.js.map +1 -1
  4. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js +1 -1
  5. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.map +1 -1
  6. package/lib/components/designSystemExtension/Banner/Banner.js +1 -1
  7. package/lib/components/designSystemExtension/Banner/Banner.js.map +1 -1
  8. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
  9. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
  10. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +11 -11
  11. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
  12. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +4 -4
  13. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
  14. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +4 -4
  15. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
  16. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js +4 -4
  17. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
  18. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +6 -6
  19. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
  20. package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
  21. package/lib/components/designSystemExtension/Operator/Operator.js +6 -6
  22. package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
  23. package/lib/components/designSystemExtension/Pulse/Pulse.js +2 -2
  24. package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
  25. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -1
  26. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +3 -2
  27. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -1
  28. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js +1 -1
  29. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
  30. package/lib/components/field/AutoComplete/AutoComplete.js +4 -4
  31. package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
  32. package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
  33. package/lib/components/field/CancelAlert/CancelAlert.js +3 -6
  34. package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
  35. package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
  36. package/lib/components/field/Checkbox/Checkbox.js +4 -4
  37. package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
  38. package/lib/components/field/Currency/Currency.d.ts.map +1 -1
  39. package/lib/components/field/Currency/Currency.js +9 -8
  40. package/lib/components/field/Currency/Currency.js.map +1 -1
  41. package/lib/components/field/Date/Date.d.ts.map +1 -1
  42. package/lib/components/field/Date/Date.js +21 -9
  43. package/lib/components/field/Date/Date.js.map +1 -1
  44. package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
  45. package/lib/components/field/DateTime/DateTime.js +38 -9
  46. package/lib/components/field/DateTime/DateTime.js.map +1 -1
  47. package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
  48. package/lib/components/field/Decimal/Decimal.js +8 -5
  49. package/lib/components/field/Decimal/Decimal.js.map +1 -1
  50. package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
  51. package/lib/components/field/Dropdown/Dropdown.js +18 -12
  52. package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
  53. package/lib/components/field/Email/Email.d.ts.map +1 -1
  54. package/lib/components/field/Email/Email.js +21 -5
  55. package/lib/components/field/Email/Email.js.map +1 -1
  56. package/lib/components/field/Group/Group.js +2 -2
  57. package/lib/components/field/Group/Group.js.map +1 -1
  58. package/lib/components/field/Integer/Integer.d.ts.map +1 -1
  59. package/lib/components/field/Integer/Integer.js +17 -6
  60. package/lib/components/field/Integer/Integer.js.map +1 -1
  61. package/lib/components/field/Multiselect/Multiselect.d.ts.map +1 -1
  62. package/lib/components/field/Multiselect/Multiselect.js +12 -8
  63. package/lib/components/field/Multiselect/Multiselect.js.map +1 -1
  64. package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
  65. package/lib/components/field/Percentage/Percentage.js +7 -4
  66. package/lib/components/field/Percentage/Percentage.js.map +1 -1
  67. package/lib/components/field/Phone/Phone.d.ts.map +1 -1
  68. package/lib/components/field/Phone/Phone.js +4 -4
  69. package/lib/components/field/Phone/Phone.js.map +1 -1
  70. package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
  71. package/lib/components/field/RadioButtons/RadioButtons.js +6 -12
  72. package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
  73. package/lib/components/field/RichText/RichText.js +1 -1
  74. package/lib/components/field/RichText/RichText.js.map +1 -1
  75. package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -1
  76. package/lib/components/field/ScalarList/ScalarList.js +5 -5
  77. package/lib/components/field/ScalarList/ScalarList.js.map +1 -1
  78. package/lib/components/field/SemanticLink/SemanticLink.js +4 -4
  79. package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
  80. package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
  81. package/lib/components/field/TextArea/TextArea.js +20 -4
  82. package/lib/components/field/TextArea/TextArea.js.map +1 -1
  83. package/lib/components/field/TextContent/TextContent.js +1 -1
  84. package/lib/components/field/TextContent/TextContent.js.map +1 -1
  85. package/lib/components/field/TextInput/TextInput.js +2 -2
  86. package/lib/components/field/TextInput/TextInput.js.map +1 -1
  87. package/lib/components/field/Time/Time.d.ts.map +1 -1
  88. package/lib/components/field/Time/Time.js +31 -8
  89. package/lib/components/field/Time/Time.js.map +1 -1
  90. package/lib/components/field/URL/URL.d.ts.map +1 -1
  91. package/lib/components/field/URL/URL.js +19 -4
  92. package/lib/components/field/URL/URL.js.map +1 -1
  93. package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
  94. package/lib/components/field/UserReference/UserReference.js +3 -5
  95. package/lib/components/field/UserReference/UserReference.js.map +1 -1
  96. package/lib/components/helpers/common-utils.d.ts +7 -0
  97. package/lib/components/helpers/common-utils.d.ts.map +1 -1
  98. package/lib/components/helpers/common-utils.js +21 -1
  99. package/lib/components/helpers/common-utils.js.map +1 -1
  100. package/lib/components/helpers/field-group-utils.js +2 -2
  101. package/lib/components/helpers/field-group-utils.js.map +1 -1
  102. package/lib/components/helpers/formatters/Currency.d.ts.map +1 -1
  103. package/lib/components/helpers/formatters/Currency.js +12 -15
  104. package/lib/components/helpers/formatters/Currency.js.map +1 -1
  105. package/lib/components/helpers/formatters/common.d.ts +2 -2
  106. package/lib/components/helpers/formatters/common.d.ts.map +1 -1
  107. package/lib/components/helpers/formatters/common.js +2 -1
  108. package/lib/components/helpers/formatters/common.js.map +1 -1
  109. package/lib/components/helpers/formatters/index.d.ts.map +1 -1
  110. package/lib/components/helpers/formatters/index.js +2 -3
  111. package/lib/components/helpers/formatters/index.js.map +1 -1
  112. package/lib/components/helpers/simpleTableHelpers.d.ts +1 -1
  113. package/lib/components/helpers/simpleTableHelpers.js +1 -1
  114. package/lib/components/helpers/simpleTableHelpers.js.map +1 -1
  115. package/lib/components/infra/ActionButtons/ActionButtons.js +3 -3
  116. package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
  117. package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
  118. package/lib/components/infra/Assignment/Assignment.js +11 -13
  119. package/lib/components/infra/Assignment/Assignment.js.map +1 -1
  120. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
  121. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +12 -22
  122. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
  123. package/lib/components/infra/Containers/FlowContainer/helpers.d.ts.map +1 -1
  124. package/lib/components/infra/Containers/FlowContainer/helpers.js +1 -5
  125. package/lib/components/infra/Containers/FlowContainer/helpers.js.map +1 -1
  126. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts.map +1 -1
  127. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js +9 -4
  128. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js.map +1 -1
  129. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +7 -7
  130. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
  131. package/lib/components/infra/Containers/SimpleView/helper.js +1 -1
  132. package/lib/components/infra/Containers/SimpleView/helper.js.map +1 -1
  133. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +1 -1
  134. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
  135. package/lib/components/infra/Containers/container-helpers.d.ts +2 -0
  136. package/lib/components/infra/Containers/container-helpers.d.ts.map +1 -0
  137. package/lib/components/infra/Containers/{helpers.js → container-helpers.js} +1 -1
  138. package/lib/components/infra/Containers/container-helpers.js.map +1 -0
  139. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
  140. package/lib/components/infra/DashboardFilter/DashboardFilter.js +3 -4
  141. package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
  142. package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -1
  143. package/lib/components/infra/DashboardFilter/filterUtils.js +3 -5
  144. package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
  145. package/lib/components/infra/DeferLoad/DeferLoad.d.ts +1 -0
  146. package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
  147. package/lib/components/infra/DeferLoad/DeferLoad.js +7 -8
  148. package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
  149. package/lib/components/infra/MultiStep/MultiStep.d.ts +1 -1
  150. package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
  151. package/lib/components/infra/MultiStep/MultiStep.js +12 -11
  152. package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
  153. package/lib/components/infra/NavBar/NavBar.css +1 -0
  154. package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
  155. package/lib/components/infra/NavBar/NavBar.js +24 -16
  156. package/lib/components/infra/NavBar/NavBar.js.map +1 -1
  157. package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
  158. package/lib/components/infra/RootContainer/RootContainer.js +5 -6
  159. package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
  160. package/lib/components/infra/Stages/Stages.js +4 -4
  161. package/lib/components/infra/Stages/Stages.js.map +1 -1
  162. package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.d.ts.map +1 -1
  163. package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js +4 -3
  164. package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js.map +1 -1
  165. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +2 -2
  166. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
  167. package/lib/components/infra/View/View.d.ts +1 -0
  168. package/lib/components/infra/View/View.d.ts.map +1 -1
  169. package/lib/components/infra/View/View.js +32 -2
  170. package/lib/components/infra/View/View.js.map +1 -1
  171. package/lib/components/template/AppShell/AppShell.d.ts +2 -0
  172. package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
  173. package/lib/components/template/AppShell/AppShell.js +33 -10
  174. package/lib/components/template/AppShell/AppShell.js.map +1 -1
  175. package/lib/components/template/CaseView/CaseView.d.ts +1 -0
  176. package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
  177. package/lib/components/template/CaseView/CaseView.js +7 -7
  178. package/lib/components/template/CaseView/CaseView.js.map +1 -1
  179. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +6 -6
  180. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
  181. package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
  182. package/lib/components/template/Confirmation/Confirmation.js +3 -2
  183. package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
  184. package/lib/components/template/DataReference/DataReference.js +2 -2
  185. package/lib/components/template/DataReference/DataReference.js.map +1 -1
  186. package/lib/components/template/Details/Details/Details.js +2 -2
  187. package/lib/components/template/Details/Details/Details.js.map +1 -1
  188. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js +3 -3
  189. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
  190. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +2 -2
  191. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
  192. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +2 -2
  193. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
  194. package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts.map +1 -1
  195. package/lib/components/template/Details/DynamicTabs/DynamicTabs.js +4 -4
  196. package/lib/components/template/Details/DynamicTabs/DynamicTabs.js.map +1 -1
  197. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
  198. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +9 -5
  199. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
  200. package/lib/components/template/InlineDashboard/InlineDashboard.js +2 -2
  201. package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
  202. package/lib/components/template/ListView/ListView.d.ts.map +1 -1
  203. package/lib/components/template/ListView/ListView.js +45 -45
  204. package/lib/components/template/ListView/ListView.js.map +1 -1
  205. package/lib/components/template/ListView/utils.d.ts.map +1 -1
  206. package/lib/components/template/ListView/utils.js +1 -2
  207. package/lib/components/template/ListView/utils.js.map +1 -1
  208. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +2 -2
  209. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
  210. package/lib/components/template/OneColumn/OneColumn/OneColumn.js +2 -2
  211. package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
  212. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
  213. package/lib/components/template/PromotedFilters/PromotedFilters.js +1 -2
  214. package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
  215. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
  216. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js +0 -2
  217. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
  218. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +2 -0
  219. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
  220. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +67 -44
  221. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
  222. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
  223. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js +2 -4
  224. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
  225. package/lib/components/template/SubTabs/SubTabs.js +2 -2
  226. package/lib/components/template/SubTabs/SubTabs.js.map +1 -1
  227. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +2 -2
  228. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
  229. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +2 -2
  230. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
  231. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +2 -2
  232. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
  233. package/lib/components/template/WssNavBar/WssNavBar.js +9 -9
  234. package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
  235. package/lib/components/widget/AppAnnouncement/AppAnnouncement.js +2 -2
  236. package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
  237. package/lib/components/widget/Attachment/Attachment.css +1 -0
  238. package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
  239. package/lib/components/widget/Attachment/Attachment.js +7 -10
  240. package/lib/components/widget/Attachment/Attachment.js.map +1 -1
  241. package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
  242. package/lib/components/widget/CaseHistory/CaseHistory.js +8 -7
  243. package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
  244. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js +1 -1
  245. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
  246. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
  247. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +4 -4
  248. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
  249. package/lib/components/widget/Followers/Followers.js +2 -2
  250. package/lib/components/widget/Followers/Followers.js.map +1 -1
  251. package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
  252. package/lib/components/widget/QuickCreate/QuickCreate.js +0 -1
  253. package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
  254. package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
  255. package/lib/components/widget/SummaryItem/SummaryItem.js +3 -3
  256. package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
  257. package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
  258. package/lib/components/widget/ToDo/ToDo.js +60 -17
  259. package/lib/components/widget/ToDo/ToDo.js.map +1 -1
  260. package/lib/hooks/index.d.ts +2 -0
  261. package/lib/hooks/index.d.ts.map +1 -1
  262. package/lib/hooks/index.js +2 -0
  263. package/lib/hooks/index.js.map +1 -1
  264. package/lib/hooks/useFocusFirstField.d.ts +7 -0
  265. package/lib/hooks/useFocusFirstField.d.ts.map +1 -0
  266. package/lib/hooks/useFocusFirstField.js +20 -0
  267. package/lib/hooks/useFocusFirstField.js.map +1 -0
  268. package/lib/hooks/useScrolltoTop.d.ts +7 -0
  269. package/lib/hooks/useScrolltoTop.d.ts.map +1 -0
  270. package/lib/hooks/useScrolltoTop.js +13 -0
  271. package/lib/hooks/useScrolltoTop.js.map +1 -0
  272. package/lib/theme.d.ts +11 -0
  273. package/lib/theme.d.ts.map +1 -0
  274. package/lib/theme.js +31 -0
  275. package/lib/theme.js.map +1 -0
  276. package/package.json +1 -1
  277. package/lib/components/infra/Containers/helpers.d.ts +0 -2
  278. package/lib/components/infra/Containers/helpers.d.ts.map +0 -1
  279. package/lib/components/infra/Containers/helpers.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Grid } from '@material-ui/core';
3
- import { makeStyles } from '@material-ui/core/styles';
2
+ import { Grid } from '@mui/material';
3
+ import makeStyles from '@mui/styles/makeStyles';
4
4
  const useStyles = makeStyles(() => ({
5
5
  colStyles: {
6
6
  display: 'grid',
@@ -1 +1 @@
1
- {"version":3,"file":"TwoColumn.js","sourceRoot":"","sources":["../../../../../src/components/template/TwoColumn/TwoColumn/TwoColumn.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAY,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAQtD,MA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I,IAAC,IAAI,QAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,YACvD,gBAAgB,CAAC,CAAC,CAAC,GACf,EACP,KAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,YACvD,gBAAgB,CAAC,CAAC,CAAC,GACf,IACF,CACR,CAAC;AACJ,CAAC","sourcesContent":["import { PropsWithChildren, ReactElement } from 'react';\nimport { Grid, GridSize } from '@material-ui/core';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { PConnProps } from '../../../../types/PConnProps';\n\ninterface TwoColumnProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n templateCol?: string;\n}\n\nconst useStyles = makeStyles(() => ({\n colStyles: {\n display: 'grid',\n gap: '1rem',\n alignContent: 'baseline'\n }\n}));\n\nexport default function TwoColumn(props: PropsWithChildren<TwoColumnProps>) {\n const classes = useStyles();\n\n const { children, templateCol = '1fr 1fr' } = props;\n const childrenToRender = children as ReactElement[];\n\n if (childrenToRender.length !== 2) {\n // eslint-disable-next-line no-console\n console.error(`TwoColumn template sees more than 2 columns: ${childrenToRender.length}`);\n }\n\n // Calculate the size\n // Default to assume the 2 columns are evenly split. However, override if templateCol\n // (example value: \"1fr 1fr\")\n let aSize: GridSize = 6;\n let bSize: GridSize = 6;\n\n const colAArray = templateCol\n .replaceAll(/[a-z]+/g, '')\n .split(/\\s/)\n .map(itm => Number(itm));\n const totalCols = colAArray.reduce((v, itm) => itm + v, 0);\n const ratio = 12 / totalCols;\n aSize = (ratio * colAArray[0]) as GridSize;\n bSize = (ratio * colAArray[1]) as GridSize;\n\n return (\n <Grid container spacing={1}>\n <Grid item xs={12} md={aSize} className={classes.colStyles}>\n {childrenToRender[0]}\n </Grid>\n <Grid item xs={12} md={bSize} className={classes.colStyles}>\n {childrenToRender[1]}\n </Grid>\n </Grid>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G,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,CAAa,CAAC;IAC3C,KAAK,GAAG,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,CAAa,CAAC;IAE3C,OAAO,CACL,MAAC,IAAI,IAAC,SAAS,QAAC,OAAO,EAAE,CAAC,aACxB,KAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,YACvD,gBAAgB,CAAC,CAAC,CAAC,GACf,EACP,KAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,YACvD,gBAAgB,CAAC,CAAC,CAAC,GACf,IACF,CACR,CAAC;AACJ,CAAC","sourcesContent":["import { PropsWithChildren, ReactElement } from 'react';\nimport { Grid, GridSize } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport { PConnProps } from '../../../../types/PConnProps';\n\ninterface TwoColumnProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n templateCol?: string;\n}\n\nconst useStyles = makeStyles(() => ({\n colStyles: {\n display: 'grid',\n gap: '1rem',\n alignContent: 'baseline'\n }\n}));\n\nexport default function TwoColumn(props: PropsWithChildren<TwoColumnProps>) {\n const classes = useStyles();\n\n const { children, templateCol = '1fr 1fr' } = props;\n const childrenToRender = children as ReactElement[];\n\n if (childrenToRender.length !== 2) {\n // eslint-disable-next-line no-console\n console.error(`TwoColumn template sees more than 2 columns: ${childrenToRender.length}`);\n }\n\n // Calculate the size\n // Default to assume the 2 columns are evenly split. However, override if templateCol\n // (example value: \"1fr 1fr\")\n let aSize: GridSize = 6;\n let bSize: GridSize = 6;\n\n const colAArray = templateCol\n .replaceAll(/[a-z]+/g, '')\n .split(/\\s/)\n .map(itm => Number(itm));\n const totalCols = colAArray.reduce((v, itm) => itm + v, 0);\n const ratio = 12 / totalCols;\n aSize = (ratio * colAArray[0]) as GridSize;\n bSize = (ratio * colAArray[1]) as GridSize;\n\n return (\n <Grid container spacing={1}>\n <Grid item xs={12} md={aSize} className={classes.colStyles}>\n {childrenToRender[0]}\n </Grid>\n <Grid item xs={12} md={bSize} className={classes.colStyles}>\n {childrenToRender[1]}\n </Grid>\n </Grid>\n );\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Grid } from '@material-ui/core';
3
- import { makeStyles } from '@material-ui/core/styles';
2
+ import { Grid } from '@mui/material';
3
+ import makeStyles from '@mui/styles/makeStyles';
4
4
  const useStyles = makeStyles(() => ({
5
5
  colStyles: {
6
6
  display: 'grid',
@@ -1 +1 @@
1
- {"version":3,"file":"TwoColumnTab.js","sourceRoot":"","sources":["../../../../../src/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAY,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAQtD,MAAM,SAAS,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,CAAC;IAClC,SAAS,EAAE;QACT,OAAO,EAAE,MAAM;QACf,GAAG,EAAE,MAAM;QACX,YAAY,EAAE,UAAU;KACzB;CACF,CAAC,CAAC,CAAC;AAEJ,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAA2C;IAC9E,MAAM,OAAO,GAAG,SAAS,EAAE,CAAC;IAE5B,MAAM,EAAE,QAAQ,EAAE,WAAW,GAAG,SAAS,EAAE,GAAG,KAAK,CAAC;IACpD,MAAM,gBAAgB,GAAG,QAA0B,CAAC;IAEpD,IAAI,gBAAgB,CAAC,MAAM,KAAK,CAAC,EAAE;QACjC,sCAAsC;QACtC,OAAO,CAAC,KAAK,CAAC,gDAAgD,gBAAgB,CAAC,MAAM,EAAE,CAAC,CAAC;KAC1F;IAED,qBAAqB;IACrB,sFAAsF;IACtF,8BAA8B;IAC9B,IAAI,KAAK,GAAa,CAAC,CAAC;IACxB,IAAI,KAAK,GAAa,CAAC,CAAC;IAExB,MAAM,SAAS,GAAG,WAAW;SAC1B,UAAU,CAAC,SAAS,EAAE,EAAE,CAAC;SACzB,KAAK,CAAC,IAAI,CAAC;SACX,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,MAAM,SAAS,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;IAC3D,MAAM,KAAK,GAAG,EAAE,GAAG,SAAS,CAAC;IAC7B,KAAK,GAAG,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,CAAa,CAAC;IAC3C,KAAK,GAAG,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,CAAa,CAAC;IAE3C,OAAO,CACL,MAAC,IAAI,IAAC,SAAS,QAAC,OAAO,EAAE,CAAC,aACxB,KAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,YACvD,gBAAgB,CAAC,CAAC,CAAC,GACf,EACP,KAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,YACvD,gBAAgB,CAAC,CAAC,CAAC,GACf,IACF,CACR,CAAC;AACJ,CAAC","sourcesContent":["import { PropsWithChildren, ReactElement } from 'react';\nimport { Grid, GridSize } from '@material-ui/core';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { PConnProps } from '../../../../types/PConnProps';\n\ninterface TwoColumnTabProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n templateCol?: string;\n}\n\nconst useStyles = makeStyles(() => ({\n colStyles: {\n display: 'grid',\n gap: '1rem',\n alignContent: 'baseline'\n }\n}));\n\nexport default function TwoColumnTab(props: PropsWithChildren<TwoColumnTabProps>) {\n const classes = useStyles();\n\n const { children, templateCol = '1fr 1fr' } = props;\n const childrenToRender = children as ReactElement[];\n\n if (childrenToRender.length !== 2) {\n // eslint-disable-next-line no-console\n console.error(`TwoColumn template sees more than 2 columns: ${childrenToRender.length}`);\n }\n\n // Calculate the size\n // Default to assume the 2 columns are evenly split. However, override if templateCol\n // (example value: \"1fr 1fr\")\n let aSize: GridSize = 6;\n let bSize: GridSize = 6;\n\n const colAArray = templateCol\n .replaceAll(/[a-z]+/g, '')\n .split(/\\s/)\n .map(itm => Number(itm));\n const totalCols = colAArray.reduce((v, itm) => itm + v, 0);\n const ratio = 12 / totalCols;\n aSize = (ratio * colAArray[0]) as GridSize;\n bSize = (ratio * colAArray[1]) as GridSize;\n\n return (\n <Grid container spacing={1}>\n <Grid item xs={12} md={aSize} className={classes.colStyles}>\n {childrenToRender[0]}\n </Grid>\n <Grid item xs={12} md={bSize} className={classes.colStyles}>\n {childrenToRender[1]}\n </Grid>\n </Grid>\n );\n}\n"]}
1
+ {"version":3,"file":"TwoColumnTab.js","sourceRoot":"","sources":["../../../../../src/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAY,MAAM,eAAe,CAAC;AAC/C,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAQhD,MAAM,SAAS,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,CAAC;IAClC,SAAS,EAAE;QACT,OAAO,EAAE,MAAM;QACf,GAAG,EAAE,MAAM;QACX,YAAY,EAAE,UAAU;KACzB;CACF,CAAC,CAAC,CAAC;AAEJ,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAA2C;IAC9E,MAAM,OAAO,GAAG,SAAS,EAAE,CAAC;IAE5B,MAAM,EAAE,QAAQ,EAAE,WAAW,GAAG,SAAS,EAAE,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cesContent":["import { PropsWithChildren, ReactElement } from 'react';\nimport { Grid, GridSize } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport { PConnProps } from '../../../../types/PConnProps';\n\ninterface TwoColumnTabProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n templateCol?: string;\n}\n\nconst useStyles = makeStyles(() => ({\n colStyles: {\n display: 'grid',\n gap: '1rem',\n alignContent: 'baseline'\n }\n}));\n\nexport default function TwoColumnTab(props: PropsWithChildren<TwoColumnTabProps>) {\n const classes = useStyles();\n\n const { children, templateCol = '1fr 1fr' } = props;\n const childrenToRender = children as ReactElement[];\n\n if (childrenToRender.length !== 2) {\n // eslint-disable-next-line no-console\n console.error(`TwoColumn template sees more than 2 columns: ${childrenToRender.length}`);\n }\n\n // Calculate the size\n // Default to assume the 2 columns are evenly split. However, override if templateCol\n // (example value: \"1fr 1fr\")\n let aSize: GridSize = 6;\n let bSize: GridSize = 6;\n\n const colAArray = templateCol\n .replaceAll(/[a-z]+/g, '')\n .split(/\\s/)\n .map(itm => Number(itm));\n const totalCols = colAArray.reduce((v, itm) => itm + v, 0);\n const ratio = 12 / totalCols;\n aSize = (ratio * colAArray[0]) as GridSize;\n bSize = (ratio * colAArray[1]) as GridSize;\n\n return (\n <Grid container spacing={1}>\n <Grid item xs={12} md={aSize} className={classes.colStyles}>\n {childrenToRender[0]}\n </Grid>\n <Grid item xs={12} md={bSize} className={classes.colStyles}>\n {childrenToRender[1]}\n </Grid>\n </Grid>\n );\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { createElement } from 'react';
3
- import Grid from '@material-ui/core/Grid';
3
+ import Grid from '@mui/material/Grid';
4
4
  import createPConnectComponent from '../../../../bridge/react_pconnect';
5
5
  import { getComponentFromMap } from '../../../../bridge/helpers/sdk_component_map';
6
6
  const COLUMN_WIDTHS = [8, 4];
@@ -12,7 +12,7 @@ export default function WideNarrowDetails(props) {
12
12
  const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };
13
13
  // Set display mode prop and re-create the children so this part of the dom tree renders
14
14
  // in a readonly (display) mode instead of a editable
15
- getPConnect().setInheritedProp('displayMode', 'LABELS_LEFT');
15
+ getPConnect().setInheritedProp('displayMode', 'DISPLAY_ONLY');
16
16
  getPConnect().setInheritedProp('readOnly', true);
17
17
  const children = getPConnect().getChildren()?.map((configObject, index) => {
18
18
  let theConfigObject = configObject;
@@ -1 +1 @@
1
- {"version":3,"file":"WideNarrowDetails.js","sourceRoot":"","sources":["../../../../../src/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAkB,MAAM,wBAAwB,CAAC;AAExD,OAAO,uBAAuB,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AAWnF,MAAM,aAAa,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAE7B,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAA6B;IACrE,8EAA8E;IAC9E,MAAM,UAAU,GAAG,mBAAmB,CAAC,YAAY,CAAC,CAAC;IAErD,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,IAAI,EAAE,WAAW,EAAE,mBAAmB,GAAG,KAAK,EAAE,GAAG,KAAK,CAAC;IAEpF,sEAAsE;IACtE,MAAM,UAAU,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,WAAW,EAAE,CAAC,iBAAiB,EAAE,EAAE,CAAC;IAE9E,wFAAwF;IACxF,qDAAqD;IACrD,WAAW,EAAE,CAAC,gBAAgB,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;IAC7D,WAAW,EAAE,CAAC,gBAAgB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IACjD,MAAM,QAAQ,GAAI,WAAW,EAAE,CAAC,WAAW,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S,QAAC,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,YACtD,kBAAkB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CACpC,KAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,aAAa,CAAC,CAAC,CAAa,YACxC,KAAK,IAD0C,MAAM,CAAC,GAAG,CAAC,EAAE,CAExD,CACR,CAAC,GACG,CACR,EACD,KAAC,IAAI,IAAC,SAAS,QAAC,OAAO,EAAE,CAAC,YACvB,QAAQ,EAAE,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAC3B,KAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,aAAa,CAAC,CAAC,CAAa,YACxC,KAAK,IAD0C,KAAK,CAAC,GAAG,CAAC,EAAE,CAEvD,CACR,CAAC,GACG,IACI,CACd,CAAC;AACJ,CAAC","sourcesContent":["import { createElement } from 'react';\nimport Grid, { GridSize } from '@material-ui/core/Grid';\n\nimport createPConnectComponent from '../../../../bridge/react_pconnect';\nimport { getComponentFromMap } from '../../../../bridge/helpers/sdk_component_map';\n\nimport { PConnProps } from '../../../../types/PConnProps';\n\ninterface WideNarrowDetailsProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n showLabel?: boolean;\n label?: string;\n showHighlightedData?: boolean;\n}\n\nconst COLUMN_WIDTHS = [8, 4];\n\nexport default function WideNarrowDetails(props: WideNarrowDetailsProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const FieldGroup = getComponentFromMap('FieldGroup');\n\n const { label, showLabel = true, getPConnect, showHighlightedData = false } = props;\n\n // Get the inherited props from the parent to determine label settings\n const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };\n\n // Set display mode prop and re-create the children so this part of the dom tree renders\n // in a readonly (display) mode instead of a editable\n getPConnect().setInheritedProp('displayMode', 'LABELS_LEFT');\n getPConnect().setInheritedProp('readOnly', true);\n const children = (getPConnect().getChildren() as any[])?.map((configObject, index) => {\n let theConfigObject: object = configObject;\n if (!theConfigObject) {\n theConfigObject = {};\n }\n\n return createElement(createPConnectComponent(), {\n ...theConfigObject,\n // eslint-disable-next-line react/no-array-index-key\n key: index.toString()\n });\n });\n\n // Set up highlighted data to pass in return if is set to show, need raw metadata to pass to createComponent\n let highlightedDataArr = [];\n if (showHighlightedData) {\n const { highlightedData = [] } = (getPConnect().getRawMetadata() as any).config;\n highlightedDataArr = highlightedData.map(field => {\n field.config.displayMode = 'STACKED_LARGE_VAL';\n\n // Mark as status display when using pyStatusWork\n if (field.config.value === '@P .pyStatusWork') {\n field.type = 'TextInput';\n field.config.displayAsStatus = true;\n }\n\n return getPConnect().createComponent(field, '', 0, {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional\n });\n }\n\n let theName = '';\n if (propsToUse?.showLabel && propsToUse.label) {\n theName = propsToUse.label;\n }\n\n return (\n <FieldGroup name={theName}>\n {showHighlightedData && highlightedDataArr.length > 0 && (\n <Grid container spacing={1} style={{ padding: '0 0 1em' }}>\n {highlightedDataArr.map((child, i) => (\n <Grid item xs={COLUMN_WIDTHS[i] as GridSize} key={`hf-${i + 1}`}>\n {child}\n </Grid>\n ))}\n </Grid>\n )}\n <Grid container spacing={1}>\n {children?.map((child, i) => (\n <Grid item xs={COLUMN_WIDTHS[i] as GridSize} key={`r-${i + 1}`}>\n {child}\n </Grid>\n ))}\n </Grid>\n </FieldGroup>\n );\n}\n"]}
1
+ {"version":3,"file":"WideNarrowDetails.js","sourceRoot":"","sources":["../../../../../src/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAkB,MAAM,oBAAoB,CAAC;AAEpD,OAAO,uBAAuB,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AAWnF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ent":["import { createElement } from 'react';\nimport Grid, { GridSize } from '@mui/material/Grid';\n\nimport createPConnectComponent from '../../../../bridge/react_pconnect';\nimport { getComponentFromMap } from '../../../../bridge/helpers/sdk_component_map';\n\nimport { PConnProps } from '../../../../types/PConnProps';\n\ninterface WideNarrowDetailsProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n showLabel?: boolean;\n label?: string;\n showHighlightedData?: boolean;\n}\n\nconst COLUMN_WIDTHS = [8, 4];\n\nexport default function WideNarrowDetails(props: WideNarrowDetailsProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const FieldGroup = getComponentFromMap('FieldGroup');\n\n const { label, showLabel = true, getPConnect, showHighlightedData = false } = props;\n\n // Get the inherited props from the parent to determine label settings\n const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };\n\n // Set display mode prop and re-create the children so this part of the dom tree renders\n // in a readonly (display) mode instead of a editable\n getPConnect().setInheritedProp('displayMode', 'DISPLAY_ONLY');\n getPConnect().setInheritedProp('readOnly', true);\n const children = (getPConnect().getChildren() as any[])?.map((configObject, index) => {\n let theConfigObject: object = configObject;\n if (!theConfigObject) {\n theConfigObject = {};\n }\n\n return createElement(createPConnectComponent(), {\n ...theConfigObject,\n // eslint-disable-next-line react/no-array-index-key\n key: index.toString()\n });\n });\n\n // Set up highlighted data to pass in return if is set to show, need raw metadata to pass to createComponent\n let highlightedDataArr = [];\n if (showHighlightedData) {\n const { highlightedData = [] } = (getPConnect().getRawMetadata() as any).config;\n highlightedDataArr = highlightedData.map(field => {\n field.config.displayMode = 'STACKED_LARGE_VAL';\n\n // Mark as status display when using pyStatusWork\n if (field.config.value === '@P .pyStatusWork') {\n field.type = 'TextInput';\n field.config.displayAsStatus = true;\n }\n\n return getPConnect().createComponent(field, '', 0, {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional\n });\n }\n\n let theName = '';\n if (propsToUse?.showLabel && propsToUse.label) {\n theName = propsToUse.label;\n }\n\n return (\n <FieldGroup name={theName}>\n {showHighlightedData && highlightedDataArr.length > 0 && (\n <Grid container spacing={1} style={{ padding: '0 0 1em' }}>\n {highlightedDataArr.map((child, i) => (\n <Grid item xs={COLUMN_WIDTHS[i] as GridSize} key={`hf-${i + 1}`}>\n {child}\n </Grid>\n ))}\n </Grid>\n )}\n <Grid container spacing={1}>\n {children?.map((child, i) => (\n <Grid item xs={COLUMN_WIDTHS[i] as GridSize} key={`r-${i + 1}`}>\n {child}\n </Grid>\n ))}\n </Grid>\n </FieldGroup>\n );\n}\n"]}
@@ -1,13 +1,13 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useState } from 'react';
3
- import { makeStyles } from '@material-ui/core/styles';
4
- import AppBar from '@material-ui/core/AppBar';
5
- import Box from '@material-ui/core/Box';
6
- import Toolbar from '@material-ui/core/Toolbar';
7
- import Container from '@material-ui/core/Container';
8
- import { IconButton, Menu, MenuItem, Typography, Button } from '@material-ui/core';
9
- import Avatar from '@material-ui/core/Avatar';
10
- import MenuIcon from '@material-ui/icons/Menu';
3
+ import makeStyles from '@mui/styles/makeStyles';
4
+ import AppBar from '@mui/material/AppBar';
5
+ import Box from '@mui/material/Box';
6
+ import Toolbar from '@mui/material/Toolbar';
7
+ import Container from '@mui/material/Container';
8
+ import { IconButton, Menu, MenuItem, Typography, Button } from '@mui/material';
9
+ import Avatar from '@mui/material/Avatar';
10
+ import MenuIcon from '@mui/icons-material/Menu';
11
11
  import { logout } from '@pega/auth/lib/sdk-auth-manager';
12
12
  import './WssNavBar.css';
13
13
  const useStyles = makeStyles(theme => ({
@@ -57,7 +57,7 @@ export default function WssNavBar(props) {
57
57
  }, keepMounted: true, transformOrigin: {
58
58
  vertical: 'top',
59
59
  horizontal: 'left'
60
- }, open: Boolean(anchorElNav), onClose: handleCloseNavMenu, children: navLinks.map(link => (_jsx(MenuItem, { onClick: link.onClick, children: _jsx(Typography, { children: link.text }) }, link.text))) })] }), position === 'inline' && _jsx(_Fragment, { children: navLinksContent }), _jsxs(Box, { sx: { flexGrow: 0 }, children: [_jsx(IconButton, { onClick: handleOpenUserMenu, children: _jsx(Avatar, { children: operator.currentUserInitials }) }), _jsx(Menu, { id: 'menu-appbar', anchorEl: anchorElUser, anchorOrigin: {
60
+ }, open: Boolean(anchorElNav), onClose: handleCloseNavMenu, children: navLinks.map(link => (_jsx(MenuItem, { onClick: link.onClick, children: _jsx(Typography, { children: link.text }) }, link.text))) })] }), position === 'inline' && _jsx(_Fragment, { children: navLinksContent }), _jsxs(Box, { sx: { flexGrow: 0 }, children: [_jsx(IconButton, { onClick: handleOpenUserMenu, size: 'large', children: _jsx(Avatar, { children: operator.currentUserInitials }) }), _jsx(Menu, { id: 'menu-appbar', anchorEl: anchorElUser, anchorOrigin: {
61
61
  vertical: 'top',
62
62
  horizontal: 'right'
63
63
  }, keepMounted: true, transformOrigin: {
@@ -1 +1 @@
1
- {"version":3,"file":"WssNavBar.js","sourceRoot":"","sources":["../../../../src/components/template/WssNavBar/WssNavBar.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAC9C,OAAO,GAAG,MAAM,uBAAuB,CAAC;AACxC,OAAO,OAAO,MAAM,2BAA2B,CAAC;AAChD,OAAO,SAAS,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACnF,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAC9C,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAEzD,OAAO,iBAAiB,CAAC;AAgBzB,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAA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AAE,OAAO,CAAC,YAAY,CAAC,EAC3B,OAAO,EAAE,mBAAmB,YAE5B,KAAC,QAAQ,IAAC,OAAO,EAAE,MAAM,YACvB,KAAC,UAAU,cAAE,YAAY,CAAC,SAAS,EAAE,cAAc,CAAC,GAAc,GACzD,GACN,IACH,IACE,EACT,QAAQ,KAAK,OAAO,IAAI,4BAAG,eAAe,GAAI,IACrC,GACL,GACL,CACP,CAAC;AACJ,CAAC","sourcesContent":["import React, { useState } from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport AppBar from '@material-ui/core/AppBar';\nimport Box from '@material-ui/core/Box';\nimport Toolbar from '@material-ui/core/Toolbar';\nimport Container from '@material-ui/core/Container';\nimport { IconButton, Menu, MenuItem, Typography, Button } from '@material-ui/core';\nimport Avatar from '@material-ui/core/Avatar';\nimport MenuIcon from '@material-ui/icons/Menu';\nimport { logout } from '@pega/auth/lib/sdk-auth-manager';\nimport { PConnProps } from '../../../types/PConnProps';\nimport './WssNavBar.css';\n\ninterface WssNavBarProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n appInfo: any;\n navLinks: any[];\n operator: { currentUserInitials: string };\n navDisplayOptions: { alignment: string; position: string };\n // eslint-disable-next-line react/no-unused-prop-types\n portalName: string;\n imageSrc: string;\n // eslint-disable-next-line react/no-unused-prop-types\n fullImageSrc: string;\n appName: any;\n}\n\nconst useStyles = makeStyles(theme => ({\n root: {\n display: 'flex'\n },\n content: {\n flexGrow: 1,\n height: '100vh',\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2)\n },\n appListLogo: {\n width: '3.6rem'\n },\n appName: {\n color: 'white',\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(4),\n fontSize: '1.5rem'\n }\n}));\n\nexport default function WssNavBar(props: WssNavBarProps) {\n const { appInfo, navLinks, operator, navDisplayOptions } = props;\n const { alignment, position } = navDisplayOptions;\n const classes = useStyles();\n\n const [anchorElNav, setAnchorElNav] = useState<null | HTMLElement>(null);\n const [anchorElUser, setAnchorElUser] = useState<null | HTMLElement>(null);\n\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'AppShell';\n\n const handleOpenNavMenu = (event: React.MouseEvent<HTMLElement>) => {\n setAnchorElNav(event.currentTarget);\n };\n const handleOpenUserMenu = (event: React.MouseEvent<HTMLElement>) => {\n setAnchorElUser(event.currentTarget);\n };\n\n const handleCloseNavMenu = () => {\n setAnchorElNav(null);\n };\n\n const handleCloseUserMenu = () => {\n setAnchorElUser(null);\n };\n\n const navLinksContent = (\n <Box id='nav-links' sx={{ flexGrow: 1, display: { xs: 'none', md: 'flex' } }} style={{ justifyContent: alignment }}>\n {navLinks.map(link => (\n <Button className='link-style' key={link.text} onClick={link.onClick}>\n {link.text}\n </Button>\n ))}\n </Box>\n );\n\n return (\n <div id='NavBar' className='nav-bar'>\n <AppBar position='static' color='primary'>\n <Container maxWidth='xl'>\n <Toolbar disableGutters style={{ justifyContent: 'space-between' }}>\n <Button id='appName' style={{ textTransform: 'capitalize' }} onClick={appInfo.onClick}>\n <img src={appInfo.imageSrc} className={classes.appListLogo} />\n <span className={classes.appName}>{appInfo.appName}</span>\n </Button>\n <Box sx={{ flexGrow: 1, display: { xs: 'flex', md: 'none' } }}>\n <IconButton\n size='small'\n aria-label='account of current user'\n aria-controls='menu-appbar'\n aria-haspopup='true'\n onClick={handleOpenNavMenu}\n color='inherit'\n >\n <MenuIcon />\n </IconButton>\n <Menu\n id='menu-appbar'\n anchorEl={anchorElNav}\n anchorOrigin={{\n vertical: 'bottom',\n horizontal: 'left'\n }}\n keepMounted\n transformOrigin={{\n vertical: 'top',\n horizontal: 'left'\n }}\n open={Boolean(anchorElNav)}\n onClose={handleCloseNavMenu}\n >\n {navLinks.map(link => (\n <MenuItem key={link.text} onClick={link.onClick}>\n <Typography>{link.text}</Typography>\n </MenuItem>\n ))}\n </Menu>\n </Box>\n\n {position === 'inline' && <>{navLinksContent}</>}\n\n <Box sx={{ flexGrow: 0 }}>\n <IconButton onClick={handleOpenUserMenu}>\n <Avatar>{operator.currentUserInitials}</Avatar>\n </IconButton>\n <Menu\n id='menu-appbar'\n anchorEl={anchorElUser}\n anchorOrigin={{\n vertical: 'top',\n horizontal: 'right'\n }}\n keepMounted\n transformOrigin={{\n vertical: 'top',\n horizontal: 'right'\n }}\n open={Boolean(anchorElUser)}\n onClose={handleCloseUserMenu}\n >\n <MenuItem onClick={logout}>\n <Typography>{localizedVal('Log off', localeCategory)}</Typography>\n </MenuItem>\n </Menu>\n </Box>\n </Toolbar>\n {position === 'below' && <>{navLinksContent}</>}\n </Container>\n </AppBar>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"WssNavBar.js","sourceRoot":"","sources":["../../../../src/components/template/WssNavBar/WssNavBar.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAChD,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,GAAG,MAAM,mBAAmB,CAAC;AACpC,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAEzD,OAAO,iBAAiB,CAAC;AAgBzB,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACrC,IAAI,EAAE;QACJ,OAAO,EAAE,MAAM;KAChB;IACD,OAAO,EAAE;QACP,QAAQ,EAAE,CAAC;QACX,MAAM,EAAE,OAAO;QACf,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5B,WAAW,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AAc,GACzD,GACN,IACH,IACE,EACT,QAAQ,KAAK,OAAO,IAAI,4BAAG,eAAe,GAAI,IACrC,GACL,GACL,CACP,CAAC;AACJ,CAAC","sourcesContent":["import React, { useState } from 'react';\nimport makeStyles from '@mui/styles/makeStyles';\nimport AppBar from '@mui/material/AppBar';\nimport Box from '@mui/material/Box';\nimport Toolbar from '@mui/material/Toolbar';\nimport Container from '@mui/material/Container';\nimport { IconButton, Menu, MenuItem, Typography, Button } from '@mui/material';\nimport Avatar from '@mui/material/Avatar';\nimport MenuIcon from '@mui/icons-material/Menu';\nimport { logout } from '@pega/auth/lib/sdk-auth-manager';\nimport { PConnProps } from '../../../types/PConnProps';\nimport './WssNavBar.css';\n\ninterface WssNavBarProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n appInfo: any;\n navLinks: any[];\n operator: { currentUserInitials: string };\n navDisplayOptions: { alignment: string; position: string };\n // eslint-disable-next-line react/no-unused-prop-types\n portalName: string;\n imageSrc: string;\n // eslint-disable-next-line react/no-unused-prop-types\n fullImageSrc: string;\n appName: any;\n}\n\nconst useStyles = makeStyles(theme => ({\n root: {\n display: 'flex'\n },\n content: {\n flexGrow: 1,\n height: '100vh',\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2)\n },\n appListLogo: {\n width: '3.6rem'\n },\n appName: {\n color: 'white',\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(4),\n fontSize: '1.5rem'\n }\n}));\n\nexport default function WssNavBar(props: WssNavBarProps) {\n const { appInfo, navLinks, operator, navDisplayOptions } = props;\n const { alignment, position } = navDisplayOptions;\n const classes = useStyles();\n\n const [anchorElNav, setAnchorElNav] = useState<null | HTMLElement>(null);\n const [anchorElUser, setAnchorElUser] = useState<null | HTMLElement>(null);\n\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'AppShell';\n\n const handleOpenNavMenu = (event: React.MouseEvent<HTMLElement>) => {\n setAnchorElNav(event.currentTarget);\n };\n const handleOpenUserMenu = (event: React.MouseEvent<HTMLElement>) => {\n setAnchorElUser(event.currentTarget);\n };\n\n const handleCloseNavMenu = () => {\n setAnchorElNav(null);\n };\n\n const handleCloseUserMenu = () => {\n setAnchorElUser(null);\n };\n\n const navLinksContent = (\n <Box id='nav-links' sx={{ flexGrow: 1, display: { xs: 'none', md: 'flex' } }} style={{ justifyContent: alignment }}>\n {navLinks.map(link => (\n <Button className='link-style' key={link.text} onClick={link.onClick}>\n {link.text}\n </Button>\n ))}\n </Box>\n );\n\n return (\n <div id='NavBar' className='nav-bar'>\n <AppBar position='static' color='primary'>\n <Container maxWidth='xl'>\n <Toolbar disableGutters style={{ justifyContent: 'space-between' }}>\n <Button id='appName' style={{ textTransform: 'capitalize' }} onClick={appInfo.onClick}>\n <img src={appInfo.imageSrc} className={classes.appListLogo} />\n <span className={classes.appName}>{appInfo.appName}</span>\n </Button>\n <Box sx={{ flexGrow: 1, display: { xs: 'flex', md: 'none' } }}>\n <IconButton\n size='small'\n aria-label='account of current user'\n aria-controls='menu-appbar'\n aria-haspopup='true'\n onClick={handleOpenNavMenu}\n color='inherit'\n >\n <MenuIcon />\n </IconButton>\n <Menu\n id='menu-appbar'\n anchorEl={anchorElNav}\n anchorOrigin={{\n vertical: 'bottom',\n horizontal: 'left'\n }}\n keepMounted\n transformOrigin={{\n vertical: 'top',\n horizontal: 'left'\n }}\n open={Boolean(anchorElNav)}\n onClose={handleCloseNavMenu}\n >\n {navLinks.map(link => (\n <MenuItem key={link.text} onClick={link.onClick}>\n <Typography>{link.text}</Typography>\n </MenuItem>\n ))}\n </Menu>\n </Box>\n\n {position === 'inline' && <>{navLinksContent}</>}\n\n <Box sx={{ flexGrow: 0 }}>\n <IconButton onClick={handleOpenUserMenu} size='large'>\n <Avatar>{operator.currentUserInitials}</Avatar>\n </IconButton>\n <Menu\n id='menu-appbar'\n anchorEl={anchorElUser}\n anchorOrigin={{\n vertical: 'top',\n horizontal: 'right'\n }}\n keepMounted\n transformOrigin={{\n vertical: 'top',\n horizontal: 'right'\n }}\n open={Boolean(anchorElUser)}\n onClose={handleCloseUserMenu}\n >\n <MenuItem onClick={logout}>\n <Typography>{localizedVal('Log off', localeCategory)}</Typography>\n </MenuItem>\n </Menu>\n </Box>\n </Toolbar>\n {position === 'below' && <>{navLinksContent}</>}\n </Container>\n </AppBar>\n </div>\n );\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Card, CardContent, CardHeader, Typography, CardActions, Button } from '@material-ui/core';
3
- import { makeStyles } from '@material-ui/core/styles';
2
+ import { Card, CardContent, CardHeader, Typography, CardActions, Button } from '@mui/material';
3
+ import makeStyles from '@mui/styles/makeStyles';
4
4
  const useStyles = makeStyles(theme => ({
5
5
  root: {
6
6
  marginTop: theme.spacing(1),
@@ -1 +1 @@
1
- {"version":3,"file":"AppAnnouncement.js","sourceRoot":"","sources":["../../../../src/components/widget/AppAnnouncement/AppAnnouncement.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACnG,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAWtD,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACrC,IAAI,EAAE;QACJ,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC3B,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC9B,UAAU,EAAE,WAAW;QACvB,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK;KAC7C;CACF,CAAC,CAAC,CAAC;AAEJ,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAA2B;IACjE,MAAM,EAAE,MAAM,GAAG,EAAE,EAAE,WAAW,GAAG,EAAE,EAAE,UAAU,GAAG,EAAE,EAAE,YAAY,GAAG,EAAE,EAAE,GAAG,KAAK,CAAC;IACpF,IAAI,OAAO,GAAG,EAAE,CAAC;IACjB,IAAI,UAAU,IAAI,UAAU,CAAC,MAAM,EAAE;QACnC,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YACrC,OAAO,IAAI,CAAC,IAAI,CAAC;QACnB,CAAC,CAAC,CAAC;KACJ;IAED,MAAM,OAAO,GAAG,SAAS,EAAE,CAAC;IAE5B,MAAM,WAAW,GAAG,GAAG,EAAE;QACvB,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC5B,CAAC,CAAC;IAEF,OAAO,CACL,MAAC,IAAI,IAAC,KAAK,EAAC,iBAAiB,EAAC,SAAS,EAAE,OAAO,CAAC,IAAI,aACnD,KAAC,UAAU,IAAC,KAAK,EAAE,KAAC,UAAU,IAAC,OAAO,EAAC,IAAI,YAAE,MAAM,GAAc,GAAI,EACrE,MAAC,WAAW,eACV,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,EAAC,YAAY,kBACrC,WAAW,GACD,EACZ,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;wBACxB,MAAM,MAAM,GAAG,eAAe,GAAG,EAAE,CAAC;wBACpC,OAAO,CACL,MAAC,UAAU,IAAc,OAAO,EAAC,OAAO,mBACnC,GAAG,KADS,MAAM,CAEV,CACd,CAAC;oBACJ,CAAC,CAAC,IACU,EACd,KAAC,WAAW,cACV,KAAC,MAAM,IAAC,KAAK,EAAC,SAAS,EAAC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAC,OAAO,+BAEjD,GACG,IACT,CACR,CAAC;AACJ,CAAC","sourcesContent":["import { Card, CardContent, CardHeader, Typography, CardActions, Button } from '@material-ui/core';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { PConnProps } from '../../../types/PConnProps';\n\ninterface AppAnnouncementProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n header?: string;\n description?: string;\n datasource?: any;\n whatsnewlink?: string;\n}\n\nconst useStyles = makeStyles(theme => ({\n root: {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n borderLeft: '6px solid',\n borderLeftColor: theme.palette.primary.light\n }\n}));\n\nexport default function AppAnnouncement(props: AppAnnouncementProps) {\n const { header = '', description = '', datasource = [], whatsnewlink = '' } = props;\n let details = [];\n if (datasource && datasource.source) {\n details = datasource.source.map(item => {\n return item.name;\n });\n }\n\n const classes = useStyles();\n\n const handleClick = () => {\n window.open(whatsnewlink);\n };\n\n return (\n <Card title='AppAnnouncement' className={classes.root}>\n <CardHeader title={<Typography variant='h6'>{header}</Typography>} />\n <CardContent>\n <Typography variant='body1' gutterBottom>\n {description}\n </Typography>\n {details.map((itm, idx) => {\n const theKey = `AppAnn-item-${idx}`;\n return (\n <Typography key={theKey} variant='body2'>\n - {itm}\n </Typography>\n );\n })}\n </CardContent>\n <CardActions>\n <Button color='primary' onClick={handleClick} size='small'>\n See what&apos;s new\n </Button>\n </CardActions>\n </Card>\n );\n}\n"]}
1
+ {"version":3,"file":"AppAnnouncement.js","sourceRoot":"","sources":["../../../../src/components/widget/AppAnnouncement/AppAnnouncement.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC/F,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAWhD,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACrC,IAAI,EAAE;QACJ,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC3B,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC9B,UAAU,EAAE,WAAW;QACvB,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK;KAC7C;CACF,CAAC,CAAC,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ardContent, CardHeader, Typography, CardActions, Button } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport { PConnProps } from '../../../types/PConnProps';\n\ninterface AppAnnouncementProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n header?: string;\n description?: string;\n datasource?: any;\n whatsnewlink?: string;\n}\n\nconst useStyles = makeStyles(theme => ({\n root: {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n borderLeft: '6px solid',\n borderLeftColor: theme.palette.primary.light\n }\n}));\n\nexport default function AppAnnouncement(props: AppAnnouncementProps) {\n const { header = '', description = '', datasource = [], whatsnewlink = '' } = props;\n let details = [];\n if (datasource && datasource.source) {\n details = datasource.source.map(item => {\n return item.name;\n });\n }\n\n const classes = useStyles();\n\n const handleClick = () => {\n window.open(whatsnewlink);\n };\n\n return (\n <Card title='AppAnnouncement' className={classes.root}>\n <CardHeader title={<Typography variant='h6'>{header}</Typography>} />\n <CardContent>\n <Typography variant='body1' gutterBottom>\n {description}\n </Typography>\n {details.map((itm, idx) => {\n const theKey = `AppAnn-item-${idx}`;\n return (\n <Typography key={theKey} variant='body2'>\n - {itm}\n </Typography>\n );\n })}\n </CardContent>\n <CardActions>\n <Button color='primary' onClick={handleClick} size='small'>\n See what&apos;s new\n </Button>\n </CardActions>\n </Card>\n );\n}\n"]}
@@ -34,6 +34,7 @@
34
34
 
35
35
  .file-error {
36
36
  color: var(--app-error-color);
37
+ font-size: 14px;
37
38
  }
38
39
 
39
40
  .psdk-utility-card {
@@ -1 +1 @@
1
- {"version":3,"file":"Attachment.d.ts","sourceRoot":"","sources":["../../../../src/components/widget/Attachment/Attachment.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,OAAO,kBAAkB,CAAC;AAE1B,UAAU,eAAgB,SAAQ,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC;IAE9D,KAAK,EAAE,GAAG,CAAC;IACX,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;CACpB;AAeD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,eAAe,2CA8axD"}
1
+ {"version":3,"file":"Attachment.d.ts","sourceRoot":"","sources":["../../../../src/components/widget/Attachment/Attachment.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,OAAO,kBAAkB,CAAC;AAE1B,UAAU,eAAgB,SAAQ,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC;IAE9D,KAAK,EAAE,GAAG,CAAC;IACX,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;CACpB;AAeD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,eAAe,2CA4axD"}
@@ -3,8 +3,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  /* eslint-disable react/no-array-index-key */
4
4
  /* eslint-disable no-nested-ternary */
5
5
  import { useState, useEffect, useCallback } from 'react';
6
- import { CircularProgress, IconButton, Menu, MenuItem, Button } from '@material-ui/core';
7
- import MoreVertIcon from '@material-ui/icons/MoreVert';
6
+ import { CircularProgress, IconButton, Menu, MenuItem, Button } from '@mui/material';
7
+ import MoreVertIcon from '@mui/icons-material/MoreVert';
8
8
  import download from 'downloadjs';
9
9
  import { buildFilePropsFromResponse, getIconFromFileType, validateMaxSize } from '../../helpers/attachmentHelpers';
10
10
  import { Utils } from '../../helpers/utils';
@@ -20,7 +20,7 @@ const updateAttachmentState = (pConn, key, attachments) => {
20
20
  });
21
21
  };
22
22
  export default function Attachment(props) {
23
- const { value, getPConnect, label, validatemessage, allowMultiple, extensions, displayMode } = props;
23
+ const { value, getPConnect, label, validatemessage, allowMultiple, extensions, displayMode, helperText } = props;
24
24
  /* this is a temporary fix because required is supposed to be passed as a boolean and NOT as a string */
25
25
  let { required, disabled } = props;
26
26
  [required, disabled] = [required, disabled].map(prop => prop === true || (typeof prop === 'string' && prop === 'true'));
@@ -126,11 +126,9 @@ export default function Attachment(props) {
126
126
  const context = pConn.getContextName();
127
127
  // set errors to property to block submit even on errors in file upload
128
128
  PCore.getMessageManager().addMessages({
129
- // @ts-ignore
130
129
  messages: [
131
130
  {
132
131
  type: 'error',
133
- // @ts-ignore - Type '{ type: string; message: string; }' is not assignable to type 'MessagesConfigObject'.
134
132
  message: pConn.getLocalizedValue('Error with one or more files', '', '')
135
133
  }
136
134
  ],
@@ -161,7 +159,6 @@ export default function Attachment(props) {
161
159
  const clearFieldErrorMessages = () => {
162
160
  const fieldName = pConn.getStateProps().value;
163
161
  const context = pConn.getContextName();
164
- // @ts-ignore
165
162
  PCore.getMessageManager().clearMessages({
166
163
  type: PCore.getConstants().MESSAGES.MESSAGES_TYPE_ERROR,
167
164
  property: fieldName,
@@ -185,21 +182,21 @@ export default function Attachment(props) {
185
182
  };
186
183
  if (!validateMaxSize(f, maxAttachmentSize)) {
187
184
  f.props.error = true;
185
+ f.inProgress = false;
188
186
  f.props.meta = pConn.getLocalizedValue(`File is too big. Max allowed size is ${maxAttachmentSize}MB.`, '', '');
189
187
  }
190
188
  else if (!validateFileExtension(f, extensions)) {
191
189
  f.props.error = true;
190
+ f.inProgress = false;
192
191
  f.props.meta = `${pConn.getLocalizedValue('File has invalid extension. Allowed extensions are:', '', '')} ${extensions.replaceAll('.', '')}`;
193
192
  }
194
193
  if (f.props.error) {
195
194
  const fieldName = pConn.getStateProps().value;
196
195
  const context = pConn.getContextName();
197
196
  PCore.getMessageManager().addMessages({
198
- // @ts-ignore
199
197
  messages: [
200
198
  {
201
199
  type: 'error',
202
- // @ts-ignore - Type '{ type: string; message: string; }' is not assignable to type 'MessagesConfigObject'.
203
200
  message: pConn.getLocalizedValue('Error with one or more files', '', '')
204
201
  }
205
202
  ],
@@ -325,8 +322,8 @@ export default function Attachment(props) {
325
322
  const fileDisplay = (_jsx("div", { children: files &&
326
323
  files.length > 0 &&
327
324
  files.map((item, index) => {
328
- return (_jsxs("div", { className: 'psdk-utility-card', children: [_jsxs("div", { className: 'psdk-utility-card-icon', children: [!item.inProgress && _jsx("img", { className: 'psdk-utility-card-svg-icon', src: srcImg }), item.inProgress && (_jsx("div", { children: _jsx(CircularProgress, {}) }))] }), _jsxs("div", { className: 'psdk-utility-card-main', children: [_jsx("div", { className: 'psdk-utility-card-main-primary-label', children: item.props.name }), item.props.meta && _jsx("div", { style: { color: item.props.error ? 'red' : undefined }, children: item.props.meta })] }), _jsxs("div", { className: 'psdk-utility-action', children: [item.ID && (_jsx("button", { type: 'button', className: 'psdk-utility-button', "aria-label": 'Delete Attachment', onClick: () => deleteFile(item), children: _jsx("img", { className: 'psdk-utility-card-action-svg-icon', src: deleteIcon }) })), !item.ID && (_jsxs("div", { children: [_jsx(IconButton, { id: 'setting-button', "aria-controls": open ? 'file-menu' : undefined, "aria-expanded": open ? 'true' : undefined, "aria-haspopup": 'true', onClick: handleClick, children: _jsx(MoreVertIcon, {}) }), _jsxs(Menu, { style: { marginTop: '3rem' }, id: 'file-menu', anchorEl: anchorEl, keepMounted: true, open: Boolean(anchorEl), onClose: handleClose, children: [_jsx(MenuItem, { style: { fontSize: '14px' }, onClick: () => downloadFile(item.responseProps ? item.responseProps : {}), children: "Download" }, 'download'), _jsx(MenuItem, { style: { fontSize: '14px' }, onClick: () => deleteFile(item), children: "Delete" }, 'delete')] })] }))] })] }, index));
325
+ return (_jsxs("div", { className: 'psdk-utility-card', children: [_jsxs("div", { className: 'psdk-utility-card-icon', children: [!item.inProgress && _jsx("img", { className: 'psdk-utility-card-svg-icon', src: srcImg }), item.inProgress && (_jsx("div", { children: _jsx(CircularProgress, {}) }))] }), _jsxs("div", { className: 'psdk-utility-card-main', children: [_jsx("div", { className: 'psdk-utility-card-main-primary-label', children: item.props.name }), item.props.meta && _jsx("div", { style: { color: item.props.error ? 'red' : undefined }, children: item.props.meta })] }), _jsxs("div", { className: 'psdk-utility-action', children: [item.ID && (_jsx("button", { type: 'button', className: 'psdk-utility-button', "aria-label": 'Delete Attachment', onClick: () => deleteFile(item), children: _jsx("img", { className: 'psdk-utility-card-action-svg-icon', src: deleteIcon }) })), !item.ID && (_jsxs("div", { children: [_jsx(IconButton, { id: 'setting-button', "aria-controls": open ? 'file-menu' : undefined, "aria-expanded": open ? 'true' : undefined, "aria-haspopup": 'true', onClick: handleClick, size: 'large', children: _jsx(MoreVertIcon, {}) }), _jsxs(Menu, { style: { marginTop: '3rem' }, id: 'file-menu', anchorEl: anchorEl, keepMounted: true, open: Boolean(anchorEl), onClose: handleClose, children: [_jsx(MenuItem, { style: { fontSize: '14px' }, onClick: () => downloadFile(item.responseProps ? item.responseProps : {}), children: "Download" }, 'download'), _jsx(MenuItem, { style: { fontSize: '14px' }, onClick: () => deleteFile(item), children: "Delete" }, 'delete')] })] }))] })] }, index));
329
326
  }) }));
330
- return (_jsxs("div", { className: 'file-upload-container', children: [_jsx("span", { className: `label ${required ? 'file-label' : ''}`, children: label }), ((files.length === 0 && allowMultiple !== 'true') || allowMultiple === 'true') && _jsx("section", { children: content }), validatemessage !== '' ? _jsx("span", { className: 'file-error', children: validatemessage }) : '', files && files.length > 0 && _jsx("section", { children: fileDisplay })] }));
327
+ return (_jsxs("div", { className: 'file-upload-container', children: [_jsx("span", { className: `label ${required ? 'file-label' : ''}`, children: label }), ((files.length === 0 && allowMultiple !== 'true') || allowMultiple === 'true') && _jsx("section", { children: content }), validatemessage !== '' ? _jsx("span", { className: 'file-error', children: validatemessage }) : _jsx("span", { style: { fontSize: '14px' }, children: helperText }), files && files.length > 0 && _jsx("section", { children: fileDisplay })] }));
331
328
  }
332
329
  //# sourceMappingURL=Attachment.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Attachment.js","sourceRoot":"","sources":["../../../../src/components/widget/Attachment/Attachment.tsx"],"names":[],"mappings":";AAAA,4CAA4C;AAC5C,6CAA6C;AAC7C,sCAAsC;AACtC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,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C,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,EAAC,WAAW,EAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,QAAC,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,WAAW,aAC9H,KAAC,QAAQ,IACP,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,EAE3B,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,0BADrE,UAAU,CAIL,EACX,KAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAe,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,wBAAxC,QAAQ,CAExC,IACN,IACH,CACP,IACG,KA5CE,KAAK,CA6CT,CACP,CAAC;YACJ,CAAC,CAAC,GACA,CACP,CAAC;IAEF,OAAO,CACL,eAAK,SAAS,EAAC,uBAAuB,aACpC,eAAM,SAAS,EAAE,SAAS,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,EAAE,YAAG,KAAK,GAAQ,EACvE,CAAC,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,aAAa,KAAK,MAAM,CAAC,IAAI,aAAa,KAAK,MAAM,CAAC,IAAI,4BAAU,OAAO,GAAW,EAC9G,eAAe,KAAK,EAAE,CAAC,CAAC,CAAC,eAAM,SAAS,EAAC,YAAY,YAAE,eAAe,GAAQ,CAAC,CAAC,CAAC,EAAE,EACnF,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,4BAAU,WAAW,GAAW,IAC1D,CACP,CAAC;AACJ,CAAC","sourcesContent":["/* eslint-disable react/jsx-boolean-value */\n/* eslint-disable react/no-array-index-key */\n/* eslint-disable no-nested-ternary */\nimport { useState, useEffect, useCallback } from 'react';\nimport { CircularProgress, IconButton, Menu, MenuItem, Button } from '@material-ui/core';\nimport MoreVertIcon from '@material-ui/icons/MoreVert';\nimport download from 'downloadjs';\n\nimport { buildFilePropsFromResponse, getIconFromFileType, validateMaxSize } from '../../helpers/attachmentHelpers';\nimport { Utils } from '../../helpers/utils';\nimport { PConnFieldProps } from '../../../types/PConnProps';\n\nimport './Attachment.css';\n\ninterface AttachmentProps extends Omit<PConnFieldProps, 'value'> {\n // If any, enter additional props that only exist on this component\n value: any;\n allowMultiple: string;\n extensions: string;\n}\n\nconst getAttachmentKey = (name = '') => (name ? `attachmentsList.${name}` : 'attachmentsList');\n\nconst getCurrentAttachmentsList = (key, context) => {\n return PCore.getStoreValue(`.${key}`, 'context_data', context) || [];\n};\n\nconst updateAttachmentState = (pConn, key, attachments) => {\n PCore.getStateUtils().updateState(pConn.getContextName(), key, attachments, {\n pageReference: 'context_data',\n isArrayDeepMerge: false\n });\n};\n\nexport default function Attachment(props: AttachmentProps) {\n const { value, getPConnect, label, validatemessage, allowMultiple, extensions, displayMode } = props;\n /* this is a temporary fix because required is supposed to be passed as a boolean and NOT as a string */\n let { required, disabled } = props;\n [required, disabled] = [required, disabled].map(prop => prop === true || (typeof prop === 'string' && prop === 'true'));\n const pConn = getPConnect();\n const caseID = PCore.getStoreValue('.pyID', 'caseInfo.content', pConn.getContextName());\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'CosmosFields';\n const uploadMultipleFilesLabel = localizedVal('file_upload_text_multiple', localeCategory);\n const uploadSingleFileLabel = localizedVal('file_upload_text_one', localeCategory);\n let categoryName = '';\n if (value && value.pyCategoryName) {\n categoryName = value.pyCategoryName;\n }\n const deleteIcon = Utils.getImageSrc('trash', Utils.getSDKStaticConentUrl());\n const srcImg = Utils.getImageSrc('document-doc', Utils.getSDKStaticConentUrl());\n let valueRef = (pConn.getStateProps() as any).value;\n valueRef = valueRef.indexOf('.') === 0 ? valueRef.substring(1) : valueRef;\n const [anchorEl, setAnchorEl] = useState(null);\n const open = Boolean(anchorEl);\n const [files, setFiles] = useState<any[]>(() =>\n value?.pxResults && +value.pyCount > 0 ? value.pxResults.map(f => buildFilePropsFromResponse(f)) : []\n );\n const [filesWithError, setFilesWithError] = useState<any[]>([]);\n const [toggleUploadBegin, setToggleUploadBegin] = useState(false);\n\n const resetAttachmentStoredState = () => {\n PCore.getStateUtils().updateState(pConn.getContextName(), getAttachmentKey(valueRef), undefined, {\n pageReference: 'context_data',\n isArrayDeepMerge: false\n });\n };\n\n const fileDownload = (data, fileName, ext) => {\n const fileData = ext ? `${fileName}.${ext}` : fileName;\n download(atob(data), fileData);\n };\n\n const downloadFile = (fileObj: any) => {\n setAnchorEl(null);\n PCore.getAttachmentUtils()\n // @ts-ignore - 3rd parameter \"responseEncoding\" should be optional\n .downloadAttachment(fileObj.pzInsKey, pConn.getContextName())\n .then((content: any) => {\n const extension = fileObj.pyAttachName.split('.').pop();\n fileDownload(content.data, fileObj.pyFileName, extension);\n })\n .catch(() => {});\n };\n\n const deleteFile = useCallback(\n file => {\n setAnchorEl(null);\n let attachmentsList: any[] = [];\n let currentAttachmentList = getCurrentAttachmentsList(getAttachmentKey(valueRef), pConn.getContextName());\n\n // If file to be deleted is the one added in previous stage i.e. for which a file instance is created in server\n // no need to filter currentAttachmentList as we will get another entry of file in redux with delete & label\n // eslint-disable-next-line no-unsafe-optional-chaining\n if (value && value?.pxResults && +value?.pyCount > 0 && file.responseProps && file?.responseProps?.pzInsKey !== 'temp') {\n const updatedAttachments = files.map(f => {\n if (f.responseProps && f.responseProps.pzInsKey === file.responseProps.pzInsKey) {\n return { ...f, delete: true, label: valueRef };\n }\n return f;\n });\n\n // updating the redux store to help form-handler in passing the data to delete the file from server\n updateAttachmentState(pConn, getAttachmentKey(valueRef), [...updatedAttachments]);\n setFiles(current => {\n const newlyAddedFiles = current.filter(f => !!f.ID);\n const filesPostDelete = current.filter(\n f => f.responseProps?.pzInsKey !== 'temp' && f.responseProps?.pzInsKey !== file.responseProps?.pzInsKey\n );\n attachmentsList = [...filesPostDelete, ...newlyAddedFiles];\n return attachmentsList;\n });\n } // if the file being deleted is the added in this stage i.e. whose data is not yet created in server\n else {\n // filter newly added files in this stage, later the updated current stage files will be added to redux once files state is updated in below setFiles()\n currentAttachmentList = currentAttachmentList.filter(f => f.label !== valueRef);\n setFiles(current => {\n attachmentsList = current.filter(f => f.ID !== file.ID);\n return attachmentsList;\n });\n updateAttachmentState(pConn, getAttachmentKey(valueRef), [...currentAttachmentList, ...attachmentsList]);\n if (file.inProgress) {\n // @ts-ignore - 3rd parameter \"responseEncoding\" should be optional\n PCore.getAttachmentUtils().cancelRequest(file.ID, pConn.getContextName());\n }\n }\n\n setToggleUploadBegin(false);\n setFilesWithError(prevFilesWithError => {\n return prevFilesWithError.filter(f => f.ID !== file.ID);\n });\n },\n [pConn, value, valueRef, filesWithError]\n );\n\n const onUploadProgress = () => {};\n\n const errorHandler = (isFetchCanceled, attachedFile) => {\n return error => {\n if (!isFetchCanceled(error)) {\n let uploadFailMsg = pConn.getLocalizedValue('Something went wrong', '', '');\n if (error.response && error.response.data && error.response.data.errorDetails) {\n uploadFailMsg = pConn.getLocalizedValue(error.response.data.errorDetails[0].localizedValue, '', '');\n }\n setFiles(current => {\n return current.map(f => {\n if (f.ID === attachedFile.ID) {\n f.props.meta = uploadFailMsg;\n f.props.error = true;\n f.props.onDelete = () => deleteFile(f);\n f.props.icon = getIconFromFileType(f.type);\n f.props.name = pConn.getLocalizedValue('Unable to upload file', '', '');\n f.inProgress = false;\n const fieldName = (pConn.getStateProps() as any).value;\n const context = pConn.getContextName();\n // set errors to property to block submit even on errors in file upload\n PCore.getMessageManager().addMessages({\n // @ts-ignore\n messages: [\n {\n type: 'error',\n // @ts-ignore - Type '{ type: string; message: string; }' is not assignable to type 'MessagesConfigObject'.\n message: pConn.getLocalizedValue('Error with one or more files', '', '')\n }\n ],\n property: fieldName,\n pageReference: pConn.getPageReference(),\n context\n });\n delete f.props.progress;\n }\n return f;\n });\n });\n }\n throw error;\n };\n };\n\n const validateFileExtension = (fileObj, allowedExtensions) => {\n if (!allowedExtensions) {\n return true;\n }\n const allowedExtensionList = allowedExtensions\n .toLowerCase()\n .split(',')\n .map(item => item.replaceAll('.', '').trim());\n const extension = fileObj.name.split('.').pop().toLowerCase();\n return allowedExtensionList.includes(extension);\n };\n\n const clearFieldErrorMessages = () => {\n const fieldName = (pConn.getStateProps() as any).value;\n const context = pConn.getContextName();\n // @ts-ignore\n PCore.getMessageManager().clearMessages({\n type: PCore.getConstants().MESSAGES.MESSAGES_TYPE_ERROR,\n property: fieldName,\n pageReference: pConn.getPageReference(),\n context\n });\n };\n\n const onFileAdded = event => {\n let addedFiles = Array.from(event.target.files);\n addedFiles = allowMultiple === 'true' ? addedFiles : [addedFiles[0]];\n const maxAttachmentSize = PCore.getEnvironmentInfo().getMaxAttachmentSize() || '5';\n const tempFilesToBeUploaded = [\n ...addedFiles.map((f: any, index) => {\n f.ID = `${new Date().getTime()}I${index}`;\n f.inProgress = true;\n f.props = {\n type: f.type,\n name: f.name,\n icon: getIconFromFileType(f.type),\n onDelete: () => deleteFile(f)\n };\n if (!validateMaxSize(f, maxAttachmentSize)) {\n f.props.error = true;\n f.props.meta = pConn.getLocalizedValue(`File is too big. Max allowed size is ${maxAttachmentSize}MB.`, '', '');\n } else if (!validateFileExtension(f, extensions)) {\n f.props.error = true;\n f.props.meta = `${pConn.getLocalizedValue('File has invalid extension. Allowed extensions are:', '', '')} ${extensions.replaceAll(\n '.',\n ''\n )}`;\n }\n if (f.props.error) {\n const fieldName = (pConn.getStateProps() as any).value;\n const context = pConn.getContextName();\n PCore.getMessageManager().addMessages({\n // @ts-ignore\n messages: [\n {\n type: 'error',\n // @ts-ignore - Type '{ type: string; message: string; }' is not assignable to type 'MessagesConfigObject'.\n message: pConn.getLocalizedValue('Error with one or more files', '', '')\n }\n ],\n property: fieldName,\n pageReference: pConn.getPageReference(),\n context\n });\n }\n return f;\n })\n ];\n const tempFilesWithError = tempFilesToBeUploaded.filter(f => f.props.error);\n if (tempFilesWithError.length > 0) {\n setFilesWithError(tempFilesWithError);\n }\n setFiles(current => (allowMultiple !== 'true' ? [...tempFilesToBeUploaded] : [...current, ...tempFilesToBeUploaded]));\n setToggleUploadBegin(true);\n };\n\n const uploadFiles = useCallback(() => {\n const filesToBeUploaded = files\n .filter(e => {\n const isFileUploaded = e.props && e.props.progress === 100;\n const fileHasError = e.props && e.props.error;\n const isFileUploadedinLastStep = e.responseProps && e.responseProps.pzInsKey;\n return !isFileUploaded && !fileHasError && !isFileUploadedinLastStep;\n })\n .map(f =>\n window.PCore.getAttachmentUtils().uploadAttachment(\n f,\n () => {\n onUploadProgress();\n },\n isFetchCanceled => {\n return errorHandler(isFetchCanceled, f);\n },\n pConn.getContextName()\n )\n );\n Promise.allSettled(filesToBeUploaded)\n .then((fileResponses: any) => {\n fileResponses = fileResponses.filter(fr => fr.status !== 'rejected'); // in case of deleting an in progress file, promise gets cancelled but still enters then block\n if (fileResponses.length > 0) {\n setFiles(current => {\n const tempFilesUploaded = [...current];\n tempFilesUploaded.forEach(f => {\n const index = fileResponses.findIndex((fr: any) => fr.value.clientFileID === f.ID);\n if (index >= 0) {\n f.props.meta = pConn.getLocalizedValue('Uploaded successfully', '', '');\n f.props.progress = 100;\n f.inProgress = false;\n f.handle = fileResponses[index].value.ID;\n f.label = valueRef;\n f.category = categoryName;\n f.responseProps = {\n pzInsKey: 'temp',\n pyAttachName: f.props.name\n };\n }\n });\n return tempFilesUploaded;\n });\n\n if (filesWithError.length === 0) {\n clearFieldErrorMessages();\n }\n }\n setToggleUploadBegin(false);\n })\n .catch(error => {\n // eslint-disable-next-line no-console\n console.log(error);\n setToggleUploadBegin(false);\n });\n }, [files, filesWithError]);\n\n useEffect(() => {\n if (toggleUploadBegin && files.length > 0) {\n uploadFiles();\n }\n }, [toggleUploadBegin]);\n\n useEffect(() => {\n if (files.length > 0 && displayMode !== 'DISPLAY_ONLY') {\n const currentAttachmentList = getCurrentAttachmentsList(getAttachmentKey(valueRef), pConn.getContextName());\n // block duplicate files to redux store when added 1 after another to prevent multiple duplicates being added to the case on submit\n const tempFiles = files.filter(f => currentAttachmentList.findIndex(fr => fr.ID === f.ID) === -1 && !f.inProgress && f.responseProps);\n\n const updatedAttList = [...currentAttachmentList, ...tempFiles];\n updateAttachmentState(pConn, getAttachmentKey(valueRef), updatedAttList);\n }\n }, [files]);\n\n useEffect(() => {\n if (filesWithError.length === 0) {\n clearFieldErrorMessages();\n }\n }, [filesWithError]);\n\n useEffect(() => {\n let tempUploadedFiles = getCurrentAttachmentsList(getAttachmentKey(valueRef), pConn.getContextName());\n tempUploadedFiles = tempUploadedFiles.filter(f => f.label === valueRef);\n setFiles(current => {\n return [\n ...current.map(f => {\n return f.responseProps.pzInsKey && !f.responseProps.pzInsKey.includes('temp')\n ? {\n ...f,\n props: {\n ...f.props,\n onDelete: () => deleteFile(f)\n }\n }\n : { ...f };\n }),\n ...tempUploadedFiles\n ];\n });\n PCore.getPubSubUtils().subscribe(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION, resetAttachmentStoredState, caseID);\n return () => {\n PCore.getPubSubUtils().unsubscribe(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION, caseID);\n };\n }, []);\n\n const handleClick = event => {\n setAnchorEl(event.currentTarget);\n };\n\n const handleClose = () => {\n setAnchorEl(null);\n };\n\n const content = (\n <div style={{ marginBottom: '8px' }}>\n <div className={`${disabled ? 'file-disabled' : ''} ${validatemessage === '' ? 'file-div' : 'file-div-error'}`}>\n <div hidden={true} id='attachment-ID'>\n {valueRef}\n </div>\n <label htmlFor={valueRef}>\n <input\n style={{ display: 'none' }}\n id={valueRef}\n name='upload-photo'\n type='file'\n multiple={allowMultiple === 'true'}\n required={required}\n disabled={disabled}\n onChange={onFileAdded}\n />\n <Button style={{ textTransform: 'none' }} variant='outlined' color='primary' component='span'>\n {allowMultiple === 'true'\n ? uploadMultipleFilesLabel === 'file_upload_text_multiple'\n ? 'Choose files'\n : uploadMultipleFilesLabel\n : uploadSingleFileLabel === 'file_upload_text_one'\n ? 'Choose a file'\n : uploadSingleFileLabel}\n </Button>\n </label>\n </div>\n </div>\n );\n\n const fileDisplay = (\n <div>\n {files &&\n files.length > 0 &&\n files.map((item, index) => {\n return (\n <div key={index} className='psdk-utility-card'>\n <div className='psdk-utility-card-icon'>\n {!item.inProgress && <img className='psdk-utility-card-svg-icon' src={srcImg} />}\n {item.inProgress && (\n <div>\n <CircularProgress />\n </div>\n )}\n </div>\n <div className='psdk-utility-card-main'>\n <div className='psdk-utility-card-main-primary-label'>{item.props.name}</div>\n {item.props.meta && <div style={{ color: item.props.error ? 'red' : undefined }}>{item.props.meta}</div>}\n </div>\n <div className='psdk-utility-action'>\n {item.ID && (\n <button type='button' className='psdk-utility-button' aria-label='Delete Attachment' onClick={() => deleteFile(item)}>\n <img className='psdk-utility-card-action-svg-icon' src={deleteIcon} />\n </button>\n )}\n {!item.ID && (\n <div>\n <IconButton\n id='setting-button'\n aria-controls={open ? 'file-menu' : undefined}\n aria-expanded={open ? 'true' : undefined}\n aria-haspopup='true'\n onClick={handleClick}\n >\n <MoreVertIcon />\n </IconButton>\n <Menu style={{ marginTop: '3rem' }} id='file-menu' anchorEl={anchorEl} keepMounted open={Boolean(anchorEl)} onClose={handleClose}>\n <MenuItem\n style={{ fontSize: '14px' }}\n key='download'\n onClick={() => downloadFile(item.responseProps ? item.responseProps : {})}\n >\n Download\n </MenuItem>\n <MenuItem style={{ fontSize: '14px' }} key='delete' onClick={() => deleteFile(item)}>\n Delete\n </MenuItem>\n </Menu>\n </div>\n )}\n </div>\n </div>\n );\n })}\n </div>\n );\n\n return (\n <div className='file-upload-container'>\n <span className={`label ${required ? 'file-label' : ''}`}>{label}</span>\n {((files.length === 0 && allowMultiple !== 'true') || allowMultiple === 'true') && <section>{content}</section>}\n {validatemessage !== '' ? <span className='file-error'>{validatemessage}</span> : ''}\n {files && files.length > 0 && <section>{fileDisplay}</section>}\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"Attachment.js","sourceRoot":"","sources":["../../../../src/components/widget/Attachment/Attachment.tsx"],"names":[],"mappings":";AAAA,4CAA4C;AAC5C,6CAA6C;AAC7C,sCAAsC;AACtC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACrF,OAAO,YAAY,MAAM,8BAA8B,CAAC;AACxD,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,OAAO,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACnH,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAG5C,OAAO,kBAAkB,CAAC;AAS1B,MAAM,gBAAgB,GAAG,CAAC,IAAI,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,mBAAmB,IAAI,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC;AAE/F,MAAM,yBAAyB,GAAG,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE;IACjD,OAAO,KAAK,CAAC,aAAa,CAAC,IAAI,GAAG,EAAE,EAAE,cAAc,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC;AACvE,CAAC,CAAC;AAEF,MAAM,qBAAqB,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,EAAE;IACxD,KAAK,CAAC,aAAa,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,cAAc,EAAE,EAAE,GAAG,EAAE,WAAW,EAAE;QAC1E,aAAa,EAAE,cAAc;QAC7B,gBAAgB,EAAE,KAAK;KACxB,CAAC,CAAC;AACL,CAAC,CAAC;AAEF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AC9G,eAAe,KAAK,EAAE,CAAC,CAAC,CAAC,eAAM,SAAS,EAAC,YAAY,YAAE,eAAe,GAAQ,CAAC,CAAC,CAAC,eAAM,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAG,UAAU,GAAQ,EACvI,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,4BAAU,WAAW,GAAW,IAC1D,CACP,CAAC;AACJ,CAAC","sourcesContent":["/* eslint-disable react/jsx-boolean-value */\n/* eslint-disable react/no-array-index-key */\n/* eslint-disable no-nested-ternary */\nimport { useState, useEffect, useCallback } from 'react';\nimport { CircularProgress, IconButton, Menu, MenuItem, Button } from '@mui/material';\nimport MoreVertIcon from '@mui/icons-material/MoreVert';\nimport download from 'downloadjs';\n\nimport { buildFilePropsFromResponse, getIconFromFileType, validateMaxSize } from '../../helpers/attachmentHelpers';\nimport { Utils } from '../../helpers/utils';\nimport { PConnFieldProps } from '../../../types/PConnProps';\n\nimport './Attachment.css';\n\ninterface AttachmentProps extends Omit<PConnFieldProps, 'value'> {\n // If any, enter additional props that only exist on this component\n value: any;\n allowMultiple: string;\n extensions: string;\n}\n\nconst getAttachmentKey = (name = '') => (name ? `attachmentsList.${name}` : 'attachmentsList');\n\nconst getCurrentAttachmentsList = (key, context) => {\n return PCore.getStoreValue(`.${key}`, 'context_data', context) || [];\n};\n\nconst updateAttachmentState = (pConn, key, attachments) => {\n PCore.getStateUtils().updateState(pConn.getContextName(), key, attachments, {\n pageReference: 'context_data',\n isArrayDeepMerge: false\n });\n};\n\nexport default function Attachment(props: AttachmentProps) {\n const { value, getPConnect, label, validatemessage, allowMultiple, extensions, displayMode, helperText } = props;\n /* this is a temporary fix because required is supposed to be passed as a boolean and NOT as a string */\n let { required, disabled } = props;\n [required, disabled] = [required, disabled].map(prop => prop === true || (typeof prop === 'string' && prop === 'true'));\n const pConn = getPConnect();\n const caseID = PCore.getStoreValue('.pyID', 'caseInfo.content', pConn.getContextName());\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'CosmosFields';\n const uploadMultipleFilesLabel = localizedVal('file_upload_text_multiple', localeCategory);\n const uploadSingleFileLabel = localizedVal('file_upload_text_one', localeCategory);\n let categoryName = '';\n if (value && value.pyCategoryName) {\n categoryName = value.pyCategoryName;\n }\n const deleteIcon = Utils.getImageSrc('trash', Utils.getSDKStaticConentUrl());\n const srcImg = Utils.getImageSrc('document-doc', Utils.getSDKStaticConentUrl());\n let valueRef = (pConn.getStateProps() as any).value;\n valueRef = valueRef.indexOf('.') === 0 ? valueRef.substring(1) : valueRef;\n const [anchorEl, setAnchorEl] = useState(null);\n const open = Boolean(anchorEl);\n const [files, setFiles] = useState<any[]>(() =>\n value?.pxResults && +value.pyCount > 0 ? value.pxResults.map(f => buildFilePropsFromResponse(f)) : []\n );\n const [filesWithError, setFilesWithError] = useState<any[]>([]);\n const [toggleUploadBegin, setToggleUploadBegin] = useState(false);\n\n const resetAttachmentStoredState = () => {\n PCore.getStateUtils().updateState(pConn.getContextName(), getAttachmentKey(valueRef), undefined, {\n pageReference: 'context_data',\n isArrayDeepMerge: false\n });\n };\n\n const fileDownload = (data, fileName, ext) => {\n const fileData = ext ? `${fileName}.${ext}` : fileName;\n download(atob(data), fileData);\n };\n\n const downloadFile = (fileObj: any) => {\n setAnchorEl(null);\n PCore.getAttachmentUtils()\n // @ts-ignore - 3rd parameter \"responseEncoding\" should be optional\n .downloadAttachment(fileObj.pzInsKey, pConn.getContextName())\n .then((content: any) => {\n const extension = fileObj.pyAttachName.split('.').pop();\n fileDownload(content.data, fileObj.pyFileName, extension);\n })\n .catch(() => {});\n };\n\n const deleteFile = useCallback(\n file => {\n setAnchorEl(null);\n let attachmentsList: any[] = [];\n let currentAttachmentList = getCurrentAttachmentsList(getAttachmentKey(valueRef), pConn.getContextName());\n\n // If file to be deleted is the one added in previous stage i.e. for which a file instance is created in server\n // no need to filter currentAttachmentList as we will get another entry of file in redux with delete & label\n // eslint-disable-next-line no-unsafe-optional-chaining\n if (value && value?.pxResults && +value?.pyCount > 0 && file.responseProps && file?.responseProps?.pzInsKey !== 'temp') {\n const updatedAttachments = files.map(f => {\n if (f.responseProps && f.responseProps.pzInsKey === file.responseProps.pzInsKey) {\n return { ...f, delete: true, label: valueRef };\n }\n return f;\n });\n\n // updating the redux store to help form-handler in passing the data to delete the file from server\n updateAttachmentState(pConn, getAttachmentKey(valueRef), [...updatedAttachments]);\n setFiles(current => {\n const newlyAddedFiles = current.filter(f => !!f.ID);\n const filesPostDelete = current.filter(\n f => f.responseProps?.pzInsKey !== 'temp' && f.responseProps?.pzInsKey !== file.responseProps?.pzInsKey\n );\n attachmentsList = [...filesPostDelete, ...newlyAddedFiles];\n return attachmentsList;\n });\n } // if the file being deleted is the added in this stage i.e. whose data is not yet created in server\n else {\n // filter newly added files in this stage, later the updated current stage files will be added to redux once files state is updated in below setFiles()\n currentAttachmentList = currentAttachmentList.filter(f => f.label !== valueRef);\n setFiles(current => {\n attachmentsList = current.filter(f => f.ID !== file.ID);\n return attachmentsList;\n });\n updateAttachmentState(pConn, getAttachmentKey(valueRef), [...currentAttachmentList, ...attachmentsList]);\n if (file.inProgress) {\n // @ts-ignore - 3rd parameter \"responseEncoding\" should be optional\n PCore.getAttachmentUtils().cancelRequest(file.ID, pConn.getContextName());\n }\n }\n\n setToggleUploadBegin(false);\n setFilesWithError(prevFilesWithError => {\n return prevFilesWithError.filter(f => f.ID !== file.ID);\n });\n },\n [pConn, value, valueRef, filesWithError]\n );\n\n const onUploadProgress = () => {};\n\n const errorHandler = (isFetchCanceled, attachedFile) => {\n return error => {\n if (!isFetchCanceled(error)) {\n let uploadFailMsg = pConn.getLocalizedValue('Something went wrong', '', '');\n if (error.response && error.response.data && error.response.data.errorDetails) {\n uploadFailMsg = pConn.getLocalizedValue(error.response.data.errorDetails[0].localizedValue, '', '');\n }\n setFiles(current => {\n return current.map(f => {\n if (f.ID === attachedFile.ID) {\n f.props.meta = uploadFailMsg;\n f.props.error = true;\n f.props.onDelete = () => deleteFile(f);\n f.props.icon = getIconFromFileType(f.type);\n f.props.name = pConn.getLocalizedValue('Unable to upload file', '', '');\n f.inProgress = false;\n const fieldName = (pConn.getStateProps() as any).value;\n const context = pConn.getContextName();\n // set errors to property to block submit even on errors in file upload\n PCore.getMessageManager().addMessages({\n messages: [\n {\n type: 'error',\n message: pConn.getLocalizedValue('Error with one or more files', '', '')\n }\n ],\n property: fieldName,\n pageReference: pConn.getPageReference(),\n context\n });\n delete f.props.progress;\n }\n return f;\n });\n });\n }\n throw error;\n };\n };\n\n const validateFileExtension = (fileObj, allowedExtensions) => {\n if (!allowedExtensions) {\n return true;\n }\n const allowedExtensionList = allowedExtensions\n .toLowerCase()\n .split(',')\n .map(item => item.replaceAll('.', '').trim());\n const extension = fileObj.name.split('.').pop().toLowerCase();\n return allowedExtensionList.includes(extension);\n };\n\n const clearFieldErrorMessages = () => {\n const fieldName = (pConn.getStateProps() as any).value;\n const context = pConn.getContextName();\n PCore.getMessageManager().clearMessages({\n type: PCore.getConstants().MESSAGES.MESSAGES_TYPE_ERROR,\n property: fieldName,\n pageReference: pConn.getPageReference(),\n context\n });\n };\n\n const onFileAdded = event => {\n let addedFiles = Array.from(event.target.files);\n addedFiles = allowMultiple === 'true' ? addedFiles : [addedFiles[0]];\n const maxAttachmentSize = PCore.getEnvironmentInfo().getMaxAttachmentSize() || '5';\n const tempFilesToBeUploaded = [\n ...addedFiles.map((f: any, index) => {\n f.ID = `${new Date().getTime()}I${index}`;\n f.inProgress = true;\n f.props = {\n type: f.type,\n name: f.name,\n icon: getIconFromFileType(f.type),\n onDelete: () => deleteFile(f)\n };\n if (!validateMaxSize(f, maxAttachmentSize)) {\n f.props.error = true;\n f.inProgress = false;\n f.props.meta = pConn.getLocalizedValue(`File is too big. Max allowed size is ${maxAttachmentSize}MB.`, '', '');\n } else if (!validateFileExtension(f, extensions)) {\n f.props.error = true;\n f.inProgress = false;\n f.props.meta = `${pConn.getLocalizedValue('File has invalid extension. Allowed extensions are:', '', '')} ${extensions.replaceAll(\n '.',\n ''\n )}`;\n }\n if (f.props.error) {\n const fieldName = (pConn.getStateProps() as any).value;\n const context = pConn.getContextName();\n PCore.getMessageManager().addMessages({\n messages: [\n {\n type: 'error',\n message: pConn.getLocalizedValue('Error with one or more files', '', '')\n }\n ],\n property: fieldName,\n pageReference: pConn.getPageReference(),\n context\n });\n }\n return f;\n })\n ];\n const tempFilesWithError = tempFilesToBeUploaded.filter(f => f.props.error);\n if (tempFilesWithError.length > 0) {\n setFilesWithError(tempFilesWithError);\n }\n setFiles(current => (allowMultiple !== 'true' ? [...tempFilesToBeUploaded] : [...current, ...tempFilesToBeUploaded]));\n setToggleUploadBegin(true);\n };\n\n const uploadFiles = useCallback(() => {\n const filesToBeUploaded = files\n .filter(e => {\n const isFileUploaded = e.props && e.props.progress === 100;\n const fileHasError = e.props && e.props.error;\n const isFileUploadedinLastStep = e.responseProps && e.responseProps.pzInsKey;\n return !isFileUploaded && !fileHasError && !isFileUploadedinLastStep;\n })\n .map(f =>\n window.PCore.getAttachmentUtils().uploadAttachment(\n f,\n () => {\n onUploadProgress();\n },\n isFetchCanceled => {\n return errorHandler(isFetchCanceled, f);\n },\n pConn.getContextName()\n )\n );\n Promise.allSettled(filesToBeUploaded)\n .then((fileResponses: any) => {\n fileResponses = fileResponses.filter(fr => fr.status !== 'rejected'); // in case of deleting an in progress file, promise gets cancelled but still enters then block\n if (fileResponses.length > 0) {\n setFiles(current => {\n const tempFilesUploaded = [...current];\n tempFilesUploaded.forEach(f => {\n const index = fileResponses.findIndex((fr: any) => fr.value.clientFileID === f.ID);\n if (index >= 0) {\n f.props.meta = pConn.getLocalizedValue('Uploaded successfully', '', '');\n f.props.progress = 100;\n f.inProgress = false;\n f.handle = fileResponses[index].value.ID;\n f.label = valueRef;\n f.category = categoryName;\n f.responseProps = {\n pzInsKey: 'temp',\n pyAttachName: f.props.name\n };\n }\n });\n return tempFilesUploaded;\n });\n\n if (filesWithError.length === 0) {\n clearFieldErrorMessages();\n }\n }\n setToggleUploadBegin(false);\n })\n .catch(error => {\n // eslint-disable-next-line no-console\n console.log(error);\n setToggleUploadBegin(false);\n });\n }, [files, filesWithError]);\n\n useEffect(() => {\n if (toggleUploadBegin && files.length > 0) {\n uploadFiles();\n }\n }, [toggleUploadBegin]);\n\n useEffect(() => {\n if (files.length > 0 && displayMode !== 'DISPLAY_ONLY') {\n const currentAttachmentList = getCurrentAttachmentsList(getAttachmentKey(valueRef), pConn.getContextName());\n // block duplicate files to redux store when added 1 after another to prevent multiple duplicates being added to the case on submit\n const tempFiles = files.filter(f => currentAttachmentList.findIndex(fr => fr.ID === f.ID) === -1 && !f.inProgress && f.responseProps);\n\n const updatedAttList = [...currentAttachmentList, ...tempFiles];\n updateAttachmentState(pConn, getAttachmentKey(valueRef), updatedAttList);\n }\n }, [files]);\n\n useEffect(() => {\n if (filesWithError.length === 0) {\n clearFieldErrorMessages();\n }\n }, [filesWithError]);\n\n useEffect(() => {\n let tempUploadedFiles = getCurrentAttachmentsList(getAttachmentKey(valueRef), pConn.getContextName());\n tempUploadedFiles = tempUploadedFiles.filter(f => f.label === valueRef);\n setFiles(current => {\n return [\n ...current.map(f => {\n return f.responseProps.pzInsKey && !f.responseProps.pzInsKey.includes('temp')\n ? {\n ...f,\n props: {\n ...f.props,\n onDelete: () => deleteFile(f)\n }\n }\n : { ...f };\n }),\n ...tempUploadedFiles\n ];\n });\n PCore.getPubSubUtils().subscribe(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION, resetAttachmentStoredState, caseID);\n return () => {\n PCore.getPubSubUtils().unsubscribe(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION, caseID);\n };\n }, []);\n\n const handleClick = event => {\n setAnchorEl(event.currentTarget);\n };\n\n const handleClose = () => {\n setAnchorEl(null);\n };\n\n const content = (\n <div style={{ marginBottom: '8px' }}>\n <div className={`${disabled ? 'file-disabled' : ''} ${validatemessage === '' ? 'file-div' : 'file-div-error'}`}>\n <div hidden={true} id='attachment-ID'>\n {valueRef}\n </div>\n <label htmlFor={valueRef}>\n <input\n style={{ display: 'none' }}\n id={valueRef}\n name='upload-photo'\n type='file'\n multiple={allowMultiple === 'true'}\n required={required}\n disabled={disabled}\n onChange={onFileAdded}\n />\n <Button style={{ textTransform: 'none' }} variant='outlined' color='primary' component='span'>\n {allowMultiple === 'true'\n ? uploadMultipleFilesLabel === 'file_upload_text_multiple'\n ? 'Choose files'\n : uploadMultipleFilesLabel\n : uploadSingleFileLabel === 'file_upload_text_one'\n ? 'Choose a file'\n : uploadSingleFileLabel}\n </Button>\n </label>\n </div>\n </div>\n );\n\n const fileDisplay = (\n <div>\n {files &&\n files.length > 0 &&\n files.map((item, index) => {\n return (\n <div key={index} className='psdk-utility-card'>\n <div className='psdk-utility-card-icon'>\n {!item.inProgress && <img className='psdk-utility-card-svg-icon' src={srcImg} />}\n {item.inProgress && (\n <div>\n <CircularProgress />\n </div>\n )}\n </div>\n <div className='psdk-utility-card-main'>\n <div className='psdk-utility-card-main-primary-label'>{item.props.name}</div>\n {item.props.meta && <div style={{ color: item.props.error ? 'red' : undefined }}>{item.props.meta}</div>}\n </div>\n <div className='psdk-utility-action'>\n {item.ID && (\n <button type='button' className='psdk-utility-button' aria-label='Delete Attachment' onClick={() => deleteFile(item)}>\n <img className='psdk-utility-card-action-svg-icon' src={deleteIcon} />\n </button>\n )}\n {!item.ID && (\n <div>\n <IconButton\n id='setting-button'\n aria-controls={open ? 'file-menu' : undefined}\n aria-expanded={open ? 'true' : undefined}\n aria-haspopup='true'\n onClick={handleClick}\n size='large'\n >\n <MoreVertIcon />\n </IconButton>\n <Menu style={{ marginTop: '3rem' }} id='file-menu' anchorEl={anchorEl} keepMounted open={Boolean(anchorEl)} onClose={handleClose}>\n <MenuItem\n style={{ fontSize: '14px' }}\n key='download'\n onClick={() => downloadFile(item.responseProps ? item.responseProps : {})}\n >\n Download\n </MenuItem>\n <MenuItem style={{ fontSize: '14px' }} key='delete' onClick={() => deleteFile(item)}>\n Delete\n </MenuItem>\n </Menu>\n </div>\n )}\n </div>\n </div>\n );\n })}\n </div>\n );\n\n return (\n <div className='file-upload-container'>\n <span className={`label ${required ? 'file-label' : ''}`}>{label}</span>\n {((files.length === 0 && allowMultiple !== 'true') || allowMultiple === 'true') && <section>{content}</section>}\n {validatemessage !== '' ? <span className='file-error'>{validatemessage}</span> : <span style={{ fontSize: '14px' }}>{helperText}</span>}\n {files && files.length > 0 && <section>{fileDisplay}</section>}\n </div>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"CaseHistory.d.ts","sourceRoot":"","sources":["../../../../src/components/widget/CaseHistory/CaseHistory.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,UAAU,gBAAiB,SAAQ,UAAU;CAE5C;AAoBD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAqI1D"}
1
+ {"version":3,"file":"CaseHistory.d.ts","sourceRoot":"","sources":["../../../../src/components/widget/CaseHistory/CaseHistory.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,UAAU,gBAAiB,SAAQ,UAAU;CAE5C;AAoBD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAqI1D"}
@@ -1,12 +1,13 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useRef, useState } from 'react';
3
- import { withStyles, createStyles } from '@material-ui/core/styles';
4
- import Table from '@material-ui/core/Table';
5
- import TableBody from '@material-ui/core/TableBody';
6
- import TableCell from '@material-ui/core/TableCell';
7
- import TableContainer from '@material-ui/core/TableContainer';
8
- import TableHead from '@material-ui/core/TableHead';
9
- import TableRow from '@material-ui/core/TableRow';
3
+ import withStyles from '@mui/styles/withStyles';
4
+ import createStyles from '@mui/styles/createStyles';
5
+ import Table from '@mui/material/Table';
6
+ import TableBody from '@mui/material/TableBody';
7
+ import TableCell from '@mui/material/TableCell';
8
+ import TableContainer from '@mui/material/TableContainer';
9
+ import TableHead from '@mui/material/TableHead';
10
+ import TableRow from '@mui/material/TableRow';
10
11
  import isDeepEqual from 'fast-deep-equal/react';
11
12
  import { Utils } from '../../helpers/utils';
12
13
  const StyledTableCell = withStyles((theme) => createStyles({