@pega/react-sdk-components 0.24.4 → 0.25.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (544) hide show
  1. package/lib/bridge/Context/StoreContext.d.ts +0 -1
  2. package/lib/bridge/Context/StoreContext.d.ts.map +1 -1
  3. package/lib/bridge/Context/StoreContext.js.map +1 -1
  4. package/lib/bridge/helpers/sdk_component_map.js.map +1 -1
  5. package/lib/bridge/react_pconnect.d.ts.map +1 -1
  6. package/lib/bridge/react_pconnect.js +2 -2
  7. package/lib/bridge/react_pconnect.js.map +1 -1
  8. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js +1 -1
  9. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.map +1 -1
  10. package/lib/components/designSystemExtension/Banner/Banner.js +1 -1
  11. package/lib/components/designSystemExtension/Banner/Banner.js.map +1 -1
  12. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -2
  13. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
  14. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +51 -33
  15. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
  16. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +4 -4
  17. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
  18. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts +1 -1
  19. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
  20. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +4 -4
  21. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
  22. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js +4 -4
  23. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
  24. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +6 -6
  25. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
  26. package/lib/components/designSystemExtension/Operator/Operator.d.ts +1 -1
  27. package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
  28. package/lib/components/designSystemExtension/Operator/Operator.js +14 -10
  29. package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
  30. package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +1 -1
  31. package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
  32. package/lib/components/designSystemExtension/Pulse/Pulse.js +2 -2
  33. package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
  34. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -1
  35. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +4 -3
  36. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -1
  37. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js +1 -1
  38. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
  39. package/lib/components/field/AutoComplete/AutoComplete.d.ts +1 -1
  40. package/lib/components/field/AutoComplete/AutoComplete.d.ts.map +1 -1
  41. package/lib/components/field/AutoComplete/AutoComplete.js +4 -4
  42. package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
  43. package/lib/components/field/CancelAlert/CancelAlert.d.ts +1 -1
  44. package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
  45. package/lib/components/field/CancelAlert/CancelAlert.js +4 -7
  46. package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
  47. package/lib/components/field/Checkbox/Checkbox.d.ts +1 -1
  48. package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
  49. package/lib/components/field/Checkbox/Checkbox.js +4 -4
  50. package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
  51. package/lib/components/field/Currency/Currency.d.ts +1 -1
  52. package/lib/components/field/Currency/Currency.d.ts.map +1 -1
  53. package/lib/components/field/Currency/Currency.js +10 -9
  54. package/lib/components/field/Currency/Currency.js.map +1 -1
  55. package/lib/components/field/Currency/currency-utils.d.ts.map +1 -1
  56. package/lib/components/field/Currency/currency-utils.js.map +1 -1
  57. package/lib/components/field/Date/Date.d.ts +1 -1
  58. package/lib/components/field/Date/Date.d.ts.map +1 -1
  59. package/lib/components/field/Date/Date.js +22 -13
  60. package/lib/components/field/Date/Date.js.map +1 -1
  61. package/lib/components/field/DateTime/DateTime.d.ts +1 -1
  62. package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
  63. package/lib/components/field/DateTime/DateTime.js +35 -9
  64. package/lib/components/field/DateTime/DateTime.js.map +1 -1
  65. package/lib/components/field/Decimal/Decimal.d.ts +1 -1
  66. package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
  67. package/lib/components/field/Decimal/Decimal.js +9 -8
  68. package/lib/components/field/Decimal/Decimal.js.map +1 -1
  69. package/lib/components/field/Dropdown/Dropdown.d.ts +1 -1
  70. package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
  71. package/lib/components/field/Dropdown/Dropdown.js +22 -15
  72. package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
  73. package/lib/components/field/Email/Email.d.ts +1 -1
  74. package/lib/components/field/Email/Email.d.ts.map +1 -1
  75. package/lib/components/field/Email/Email.js +26 -11
  76. package/lib/components/field/Email/Email.js.map +1 -1
  77. package/lib/components/field/Group/Group.d.ts +2 -2
  78. package/lib/components/field/Group/Group.d.ts.map +1 -1
  79. package/lib/components/field/Group/Group.js +2 -2
  80. package/lib/components/field/Group/Group.js.map +1 -1
  81. package/lib/components/field/Integer/Integer.d.ts +1 -1
  82. package/lib/components/field/Integer/Integer.d.ts.map +1 -1
  83. package/lib/components/field/Integer/Integer.js +20 -10
  84. package/lib/components/field/Integer/Integer.js.map +1 -1
  85. package/lib/components/field/Multiselect/Multiselect.d.ts.map +1 -1
  86. package/lib/components/field/Multiselect/Multiselect.js +12 -8
  87. package/lib/components/field/Multiselect/Multiselect.js.map +1 -1
  88. package/lib/components/field/Multiselect/utils.d.ts +2 -1
  89. package/lib/components/field/Multiselect/utils.d.ts.map +1 -1
  90. package/lib/components/field/Multiselect/utils.js +1 -1
  91. package/lib/components/field/Multiselect/utils.js.map +1 -1
  92. package/lib/components/field/Percentage/Percentage.d.ts +1 -1
  93. package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
  94. package/lib/components/field/Percentage/Percentage.js +9 -9
  95. package/lib/components/field/Percentage/Percentage.js.map +1 -1
  96. package/lib/components/field/Phone/Phone.d.ts +1 -1
  97. package/lib/components/field/Phone/Phone.d.ts.map +1 -1
  98. package/lib/components/field/Phone/Phone.js +8 -6
  99. package/lib/components/field/Phone/Phone.js.map +1 -1
  100. package/lib/components/field/RadioButtons/RadioButtons.d.ts +1 -1
  101. package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
  102. package/lib/components/field/RadioButtons/RadioButtons.js +6 -12
  103. package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
  104. package/lib/components/field/RichText/RichText.d.ts +1 -1
  105. package/lib/components/field/RichText/RichText.d.ts.map +1 -1
  106. package/lib/components/field/RichText/RichText.js +1 -1
  107. package/lib/components/field/RichText/RichText.js.map +1 -1
  108. package/lib/components/field/ScalarList/ScalarList.d.ts +1 -1
  109. package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -1
  110. package/lib/components/field/ScalarList/ScalarList.js +5 -5
  111. package/lib/components/field/ScalarList/ScalarList.js.map +1 -1
  112. package/lib/components/field/SemanticLink/SemanticLink.d.ts +1 -1
  113. package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
  114. package/lib/components/field/SemanticLink/SemanticLink.js +4 -4
  115. package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
  116. package/lib/components/field/SemanticLink/utils.js.map +1 -1
  117. package/lib/components/field/TextArea/TextArea.d.ts +1 -1
  118. package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
  119. package/lib/components/field/TextArea/TextArea.js +23 -8
  120. package/lib/components/field/TextArea/TextArea.js.map +1 -1
  121. package/lib/components/field/TextContent/TextContent.d.ts +1 -1
  122. package/lib/components/field/TextContent/TextContent.d.ts.map +1 -1
  123. package/lib/components/field/TextContent/TextContent.js +1 -1
  124. package/lib/components/field/TextContent/TextContent.js.map +1 -1
  125. package/lib/components/field/TextInput/TextInput.d.ts +1 -1
  126. package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
  127. package/lib/components/field/TextInput/TextInput.js +6 -7
  128. package/lib/components/field/TextInput/TextInput.js.map +1 -1
  129. package/lib/components/field/Time/Time.d.ts +1 -1
  130. package/lib/components/field/Time/Time.d.ts.map +1 -1
  131. package/lib/components/field/Time/Time.js +32 -12
  132. package/lib/components/field/Time/Time.js.map +1 -1
  133. package/lib/components/field/URL/URL.d.ts +1 -1
  134. package/lib/components/field/URL/URL.d.ts.map +1 -1
  135. package/lib/components/field/URL/URL.js +21 -7
  136. package/lib/components/field/URL/URL.js.map +1 -1
  137. package/lib/components/field/UserReference/UserReference.d.ts +1 -2
  138. package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
  139. package/lib/components/field/UserReference/UserReference.js +3 -5
  140. package/lib/components/field/UserReference/UserReference.js.map +1 -1
  141. package/lib/components/field/UserReference/UserReferenceUtils.d.ts.map +1 -1
  142. package/lib/components/field/UserReference/UserReferenceUtils.js.map +1 -1
  143. package/lib/components/helpers/attachmentHelpers.d.ts.map +1 -1
  144. package/lib/components/helpers/attachmentHelpers.js.map +1 -1
  145. package/lib/components/helpers/case-utils.js.map +1 -1
  146. package/lib/components/helpers/common-utils.d.ts +7 -0
  147. package/lib/components/helpers/common-utils.d.ts.map +1 -1
  148. package/lib/components/helpers/common-utils.js +21 -1
  149. package/lib/components/helpers/common-utils.js.map +1 -1
  150. package/lib/components/helpers/data_page.d.ts.map +1 -1
  151. package/lib/components/helpers/data_page.js.map +1 -1
  152. package/lib/components/helpers/date-format-utils.d.ts.map +1 -1
  153. package/lib/components/helpers/event-utils.d.ts.map +1 -1
  154. package/lib/components/helpers/event-utils.js.map +1 -1
  155. package/lib/components/helpers/field-group-utils.d.ts +1 -1
  156. package/lib/components/helpers/field-group-utils.d.ts.map +1 -1
  157. package/lib/components/helpers/field-group-utils.js +2 -2
  158. package/lib/components/helpers/field-group-utils.js.map +1 -1
  159. package/lib/components/helpers/formatters/Boolean.js.map +1 -1
  160. package/lib/components/helpers/formatters/Currency.d.ts.map +1 -1
  161. package/lib/components/helpers/formatters/Currency.js +12 -15
  162. package/lib/components/helpers/formatters/Currency.js.map +1 -1
  163. package/lib/components/helpers/formatters/Date.js.map +1 -1
  164. package/lib/components/helpers/formatters/common.d.ts +2 -2
  165. package/lib/components/helpers/formatters/common.d.ts.map +1 -1
  166. package/lib/components/helpers/formatters/common.js +2 -1
  167. package/lib/components/helpers/formatters/common.js.map +1 -1
  168. package/lib/components/helpers/formatters/index.d.ts.map +1 -1
  169. package/lib/components/helpers/formatters/index.js +2 -3
  170. package/lib/components/helpers/formatters/index.js.map +1 -1
  171. package/lib/components/helpers/instructions-utils.d.ts.map +1 -1
  172. package/lib/components/helpers/reactContextHelpers.d.ts +0 -1
  173. package/lib/components/helpers/reactContextHelpers.d.ts.map +1 -1
  174. package/lib/components/helpers/simpleTableHelpers.d.ts +1 -1
  175. package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
  176. package/lib/components/helpers/simpleTableHelpers.js +1 -1
  177. package/lib/components/helpers/simpleTableHelpers.js.map +1 -1
  178. package/lib/components/helpers/state-utils.d.ts.map +1 -1
  179. package/lib/components/helpers/state-utils.js.map +1 -1
  180. package/lib/components/helpers/template-utils.js.map +1 -1
  181. package/lib/components/helpers/utils.js.map +1 -1
  182. package/lib/components/infra/ActionButtons/ActionButtons.js +3 -3
  183. package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
  184. package/lib/components/infra/Assignment/Assignment.d.ts +2 -2
  185. package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
  186. package/lib/components/infra/Assignment/Assignment.js +12 -14
  187. package/lib/components/infra/Assignment/Assignment.js.map +1 -1
  188. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +2 -2
  189. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
  190. package/lib/components/infra/AssignmentCard/AssignmentCard.js.map +1 -1
  191. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +1 -2
  192. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
  193. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +12 -22
  194. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
  195. package/lib/components/infra/Containers/FlowContainer/helpers.d.ts.map +1 -1
  196. package/lib/components/infra/Containers/FlowContainer/helpers.js +1 -5
  197. package/lib/components/infra/Containers/FlowContainer/helpers.js.map +1 -1
  198. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts +1 -1
  199. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts.map +1 -1
  200. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js +9 -4
  201. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js.map +1 -1
  202. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +1 -1
  203. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
  204. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +7 -7
  205. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
  206. package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts +0 -1
  207. package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts.map +1 -1
  208. package/lib/components/infra/Containers/SimpleView/helper.d.ts +0 -1
  209. package/lib/components/infra/Containers/SimpleView/helper.d.ts.map +1 -1
  210. package/lib/components/infra/Containers/SimpleView/helper.js +1 -1
  211. package/lib/components/infra/Containers/SimpleView/helper.js.map +1 -1
  212. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +1 -1
  213. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
  214. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +1 -1
  215. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
  216. package/lib/components/infra/Containers/container-helpers.d.ts +2 -0
  217. package/lib/components/infra/Containers/container-helpers.d.ts.map +1 -0
  218. package/lib/components/infra/Containers/{helpers.js → container-helpers.js} +1 -1
  219. package/lib/components/infra/Containers/container-helpers.js.map +1 -0
  220. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +2 -2
  221. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
  222. package/lib/components/infra/DashboardFilter/DashboardFilter.js +4 -6
  223. package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
  224. package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -1
  225. package/lib/components/infra/DashboardFilter/filterUtils.js +3 -5
  226. package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
  227. package/lib/components/infra/DeferLoad/DeferLoad.d.ts +2 -1
  228. package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
  229. package/lib/components/infra/DeferLoad/DeferLoad.js +8 -9
  230. package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
  231. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +1 -1
  232. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
  233. package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
  234. package/lib/components/infra/MultiStep/MultiStep.d.ts +3 -3
  235. package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
  236. package/lib/components/infra/MultiStep/MultiStep.js +13 -12
  237. package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
  238. package/lib/components/infra/NavBar/NavBar.css +1 -0
  239. package/lib/components/infra/NavBar/NavBar.d.ts +1 -1
  240. package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
  241. package/lib/components/infra/NavBar/NavBar.js +24 -16
  242. package/lib/components/infra/NavBar/NavBar.js.map +1 -1
  243. package/lib/components/infra/Reference/Reference.d.ts +1 -1
  244. package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
  245. package/lib/components/infra/Reference/Reference.js.map +1 -1
  246. package/lib/components/infra/Region/Region.d.ts +1 -1
  247. package/lib/components/infra/Region/Region.d.ts.map +1 -1
  248. package/lib/components/infra/Region/Region.js.map +1 -1
  249. package/lib/components/infra/RootContainer/RootContainer.d.ts +2 -2
  250. package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
  251. package/lib/components/infra/RootContainer/RootContainer.js +5 -6
  252. package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
  253. package/lib/components/infra/Stages/Stages.d.ts +1 -1
  254. package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
  255. package/lib/components/infra/Stages/Stages.js +4 -4
  256. package/lib/components/infra/Stages/Stages.js.map +1 -1
  257. package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.d.ts.map +1 -1
  258. package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js +4 -3
  259. package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js.map +1 -1
  260. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +3 -3
  261. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
  262. package/lib/components/infra/View/View.d.ts +3 -2
  263. package/lib/components/infra/View/View.d.ts.map +1 -1
  264. package/lib/components/infra/View/View.js +32 -2
  265. package/lib/components/infra/View/View.js.map +1 -1
  266. package/lib/components/template/AdvancedSearch/AdvancedSearch.d.ts +2 -0
  267. package/lib/components/template/AdvancedSearch/AdvancedSearch.d.ts.map +1 -0
  268. package/lib/components/template/AdvancedSearch/AdvancedSearch.js +69 -0
  269. package/lib/components/template/AdvancedSearch/AdvancedSearch.js.map +1 -0
  270. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.d.ts +24 -0
  271. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.d.ts.map +1 -0
  272. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.js +32 -0
  273. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.js.map +1 -0
  274. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.d.ts +3 -0
  275. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.d.ts.map +1 -0
  276. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.js +181 -0
  277. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.js.map +1 -0
  278. package/lib/components/template/AdvancedSearch/SearchGroups/hooks.d.ts +10 -0
  279. package/lib/components/template/AdvancedSearch/SearchGroups/hooks.d.ts.map +1 -0
  280. package/lib/components/template/AdvancedSearch/SearchGroups/hooks.js +26 -0
  281. package/lib/components/template/AdvancedSearch/SearchGroups/hooks.js.map +1 -0
  282. package/lib/components/template/AdvancedSearch/SearchGroups/index.d.ts +2 -0
  283. package/lib/components/template/AdvancedSearch/SearchGroups/index.d.ts.map +1 -0
  284. package/lib/components/template/AdvancedSearch/SearchGroups/index.js +2 -0
  285. package/lib/components/template/AdvancedSearch/SearchGroups/index.js.map +1 -0
  286. package/lib/components/template/AdvancedSearch/SearchGroups/utils.d.ts +16 -0
  287. package/lib/components/template/AdvancedSearch/SearchGroups/utils.d.ts.map +1 -0
  288. package/lib/components/template/AdvancedSearch/SearchGroups/utils.js +22 -0
  289. package/lib/components/template/AdvancedSearch/SearchGroups/utils.js.map +1 -0
  290. package/lib/components/template/AdvancedSearch/TemplateContext.d.ts +10 -0
  291. package/lib/components/template/AdvancedSearch/TemplateContext.d.ts.map +1 -0
  292. package/lib/components/template/AdvancedSearch/TemplateContext.js +11 -0
  293. package/lib/components/template/AdvancedSearch/TemplateContext.js.map +1 -0
  294. package/lib/components/template/AdvancedSearch/index.d.ts +2 -0
  295. package/lib/components/template/AdvancedSearch/index.d.ts.map +1 -0
  296. package/lib/components/template/AdvancedSearch/index.js +2 -0
  297. package/lib/components/template/AdvancedSearch/index.js.map +1 -0
  298. package/lib/components/template/AppShell/AppShell.d.ts +4 -2
  299. package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
  300. package/lib/components/template/AppShell/AppShell.js +33 -10
  301. package/lib/components/template/AppShell/AppShell.js.map +1 -1
  302. package/lib/components/template/BannerPage/BannerPage.d.ts +2 -2
  303. package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
  304. package/lib/components/template/BannerPage/BannerPage.js.map +1 -1
  305. package/lib/components/template/CaseSummary/CaseSummary.d.ts +2 -2
  306. package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
  307. package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
  308. package/lib/components/template/CaseView/CaseView.d.ts +3 -2
  309. package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
  310. package/lib/components/template/CaseView/CaseView.js +7 -7
  311. package/lib/components/template/CaseView/CaseView.js.map +1 -1
  312. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +1 -1
  313. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
  314. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +7 -7
  315. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
  316. package/lib/components/template/Confirmation/Confirmation.d.ts +2 -2
  317. package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
  318. package/lib/components/template/Confirmation/Confirmation.js +3 -2
  319. package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
  320. package/lib/components/template/DataReference/DataReference.d.ts +9 -2
  321. package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
  322. package/lib/components/template/DataReference/DataReference.js +245 -81
  323. package/lib/components/template/DataReference/DataReference.js.map +1 -1
  324. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.d.ts +8 -0
  325. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.d.ts.map +1 -0
  326. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.js +9 -0
  327. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.js.map +1 -0
  328. package/lib/components/template/DataReference/SearchForm.d.ts +3 -0
  329. package/lib/components/template/DataReference/SearchForm.d.ts.map +1 -0
  330. package/lib/components/template/DataReference/SearchForm.js +86 -0
  331. package/lib/components/template/DataReference/SearchForm.js.map +1 -0
  332. package/lib/components/template/DataReference/utils.d.ts +15 -0
  333. package/lib/components/template/DataReference/utils.d.ts.map +1 -0
  334. package/lib/components/template/DataReference/utils.js +75 -0
  335. package/lib/components/template/DataReference/utils.js.map +1 -0
  336. package/lib/components/template/DefaultForm/DefaultForm.d.ts +2 -2
  337. package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
  338. package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
  339. package/lib/components/template/DefaultForm/utils/index.d.ts.map +1 -1
  340. package/lib/components/template/DefaultForm/utils/index.js +1 -2
  341. package/lib/components/template/DefaultForm/utils/index.js.map +1 -1
  342. package/lib/components/template/Details/Details/Details.d.ts +1 -1
  343. package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
  344. package/lib/components/template/Details/Details/Details.js +2 -2
  345. package/lib/components/template/Details/Details/Details.js.map +1 -1
  346. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +2 -2
  347. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
  348. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js +3 -3
  349. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
  350. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +1 -1
  351. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
  352. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +2 -2
  353. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
  354. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +1 -1
  355. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
  356. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +2 -2
  357. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
  358. package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts +1 -1
  359. package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts.map +1 -1
  360. package/lib/components/template/Details/DynamicTabs/DynamicTabs.js +4 -4
  361. package/lib/components/template/Details/DynamicTabs/DynamicTabs.js.map +1 -1
  362. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +1 -1
  363. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
  364. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +9 -5
  365. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
  366. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +2 -2
  367. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
  368. package/lib/components/template/InlineDashboard/InlineDashboard.js +2 -2
  369. package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
  370. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +2 -2
  371. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
  372. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js.map +1 -1
  373. package/lib/components/template/ListPage/ListPage.d.ts +1 -1
  374. package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
  375. package/lib/components/template/ListPage/ListPage.js.map +1 -1
  376. package/lib/components/template/ListView/DefaultViewMeta.js.map +1 -1
  377. package/lib/components/template/ListView/ListView.d.ts +4 -1
  378. package/lib/components/template/ListView/ListView.d.ts.map +1 -1
  379. package/lib/components/template/ListView/ListView.js +151 -66
  380. package/lib/components/template/ListView/ListView.js.map +1 -1
  381. package/lib/components/template/ListView/hooks.js.map +1 -1
  382. package/lib/components/template/ListView/utils.d.ts.map +1 -1
  383. package/lib/components/template/ListView/utils.js +29 -6
  384. package/lib/components/template/ListView/utils.js.map +1 -1
  385. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +1 -1
  386. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
  387. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -1
  388. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +2 -2
  389. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -1
  390. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js.map +1 -1
  391. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +1 -1
  392. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
  393. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +2 -2
  394. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
  395. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +2 -2
  396. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -1
  397. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js.map +1 -1
  398. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +2 -2
  399. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
  400. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -1
  401. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +2 -2
  402. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
  403. package/lib/components/template/OneColumn/OneColumn/OneColumn.js +2 -2
  404. package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
  405. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +1 -1
  406. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
  407. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -1
  408. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +2 -2
  409. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
  410. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js.map +1 -1
  411. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +1 -1
  412. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
  413. package/lib/components/template/PromotedFilters/PromotedFilters.js +1 -2
  414. package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
  415. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts +1 -1
  416. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
  417. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js +0 -2
  418. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
  419. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +4 -2
  420. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
  421. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +68 -45
  422. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
  423. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +1 -1
  424. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
  425. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js +2 -4
  426. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
  427. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +1 -1
  428. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
  429. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
  430. package/lib/components/template/SubTabs/SubTabs.d.ts +2 -2
  431. package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
  432. package/lib/components/template/SubTabs/SubTabs.js +2 -2
  433. package/lib/components/template/SubTabs/SubTabs.js.map +1 -1
  434. package/lib/components/template/SubTabs/tabUtils.d.ts +10 -0
  435. package/lib/components/template/SubTabs/tabUtils.d.ts.map +1 -1
  436. package/lib/components/template/SubTabs/tabUtils.js +102 -1
  437. package/lib/components/template/SubTabs/tabUtils.js.map +1 -1
  438. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts +2 -2
  439. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
  440. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +3 -3
  441. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
  442. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +1 -1
  443. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
  444. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -1
  445. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +2 -2
  446. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
  447. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +3 -3
  448. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
  449. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +2 -2
  450. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
  451. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js.map +1 -1
  452. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +1 -1
  453. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
  454. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +2 -2
  455. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
  456. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +2 -2
  457. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -1
  458. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js.map +1 -1
  459. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +2 -2
  460. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
  461. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js.map +1 -1
  462. package/lib/components/template/WssNavBar/WssNavBar.d.ts +1 -1
  463. package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -1
  464. package/lib/components/template/WssNavBar/WssNavBar.js +10 -10
  465. package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
  466. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts +1 -1
  467. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
  468. package/lib/components/widget/AppAnnouncement/AppAnnouncement.js +2 -2
  469. package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
  470. package/lib/components/widget/Attachment/Attachment.css +1 -0
  471. package/lib/components/widget/Attachment/Attachment.d.ts +1 -1
  472. package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
  473. package/lib/components/widget/Attachment/Attachment.js +7 -10
  474. package/lib/components/widget/Attachment/Attachment.js.map +1 -1
  475. package/lib/components/widget/CaseHistory/CaseHistory.d.ts +1 -1
  476. package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
  477. package/lib/components/widget/CaseHistory/CaseHistory.js +10 -9
  478. package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
  479. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +1 -1
  480. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts.map +1 -1
  481. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js +1 -1
  482. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
  483. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +1 -1
  484. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
  485. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +10 -10
  486. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
  487. package/lib/components/widget/Followers/Followers.d.ts +2 -2
  488. package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
  489. package/lib/components/widget/Followers/Followers.js +2 -2
  490. package/lib/components/widget/Followers/Followers.js.map +1 -1
  491. package/lib/components/widget/QuickCreate/QuickCreate.d.ts +1 -1
  492. package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
  493. package/lib/components/widget/QuickCreate/QuickCreate.js +0 -1
  494. package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
  495. package/lib/components/widget/SummaryItem/SummaryItem.d.ts +1 -1
  496. package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
  497. package/lib/components/widget/SummaryItem/SummaryItem.js +3 -3
  498. package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
  499. package/lib/components/widget/SummaryList/SummaryList.d.ts +1 -1
  500. package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
  501. package/lib/components/widget/SummaryList/SummaryList.js.map +1 -1
  502. package/lib/components/widget/ToDo/ToDo.d.ts +1 -1
  503. package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
  504. package/lib/components/widget/ToDo/ToDo.js +60 -17
  505. package/lib/components/widget/ToDo/ToDo.js.map +1 -1
  506. package/lib/doc/KeyReleaseUpdates.md +19 -7
  507. package/lib/hooks/index.d.ts +2 -0
  508. package/lib/hooks/index.d.ts.map +1 -1
  509. package/lib/hooks/index.js +2 -0
  510. package/lib/hooks/index.js.map +1 -1
  511. package/lib/hooks/useAfterInitialEffect.d.ts +1 -1
  512. package/lib/hooks/useAfterInitialEffect.d.ts.map +1 -1
  513. package/lib/hooks/useAfterInitialEffect.js.map +1 -1
  514. package/lib/hooks/useConsolidatedRef.d.ts +1 -1
  515. package/lib/hooks/useConsolidatedRef.d.ts.map +1 -1
  516. package/lib/hooks/useConsolidatedRef.js.map +1 -1
  517. package/lib/hooks/useFocusFirstField.d.ts +7 -0
  518. package/lib/hooks/useFocusFirstField.d.ts.map +1 -0
  519. package/lib/hooks/useFocusFirstField.js +20 -0
  520. package/lib/hooks/useFocusFirstField.js.map +1 -0
  521. package/lib/hooks/useGetTabsCount.d.ts +10 -0
  522. package/lib/hooks/useGetTabsCount.d.ts.map +1 -0
  523. package/lib/hooks/useGetTabsCount.js +166 -0
  524. package/lib/hooks/useGetTabsCount.js.map +1 -0
  525. package/lib/hooks/useIsMount.d.ts +2 -0
  526. package/lib/hooks/useIsMount.d.ts.map +1 -0
  527. package/lib/hooks/useIsMount.js +9 -0
  528. package/lib/hooks/useIsMount.js.map +1 -0
  529. package/lib/hooks/useScrolltoTop.d.ts +7 -0
  530. package/lib/hooks/useScrolltoTop.d.ts.map +1 -0
  531. package/lib/hooks/useScrolltoTop.js +13 -0
  532. package/lib/hooks/useScrolltoTop.js.map +1 -0
  533. package/lib/sdk-pega-component-map.d.ts +109 -103
  534. package/lib/sdk-pega-component-map.d.ts.map +1 -1
  535. package/lib/sdk-pega-component-map.js +9 -3
  536. package/lib/sdk-pega-component-map.js.map +1 -1
  537. package/lib/theme.d.ts +11 -0
  538. package/lib/theme.d.ts.map +1 -0
  539. package/lib/theme.js +31 -0
  540. package/lib/theme.js.map +1 -0
  541. package/package.json +31 -1
  542. package/lib/components/infra/Containers/helpers.d.ts +0 -2
  543. package/lib/components/infra/Containers/helpers.d.ts.map +0 -1
  544. package/lib/components/infra/Containers/helpers.js.map +0 -1
@@ -1,14 +1,23 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { TextField } from '@material-ui/core';
2
+ import { useEffect, useState } from 'react';
3
+ import { TextField } from '@mui/material';
4
+ import handleEvent from '../../helpers/event-utils';
3
5
  import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
4
6
  export default function TextArea(props) {
5
7
  // Get emitted components from map (so we can get any override that may exist)
6
8
  const FieldValueList = getComponentFromMap('FieldValueList');
7
- const { label, required, disabled, value = '', validatemessage, status, onChange, onBlur, readOnly, testId, fieldMetadata, helperText, displayMode, hideLabel, placeholder } = props;
9
+ const { getPConnect, label, required, disabled, value = '', validatemessage, status, readOnly, testId, fieldMetadata, helperText, displayMode, hideLabel, placeholder } = props;
8
10
  const helperTextToDisplay = validatemessage || helperText;
11
+ const pConn = getPConnect();
12
+ const actions = pConn.getActionsApi();
13
+ const propName = pConn.getStateProps().value;
9
14
  const maxLength = fieldMetadata?.maxLength;
15
+ const [inputValue, setInputValue] = useState('');
10
16
  let readOnlyProp = {};
11
- if (displayMode === 'LABELS_LEFT') {
17
+ useEffect(() => {
18
+ setInputValue(value);
19
+ }, [value]);
20
+ if (displayMode === 'DISPLAY_ONLY') {
12
21
  return _jsx(FieldValueList, { name: hideLabel ? '' : label, value: value });
13
22
  }
14
23
  if (displayMode === 'STACKED_LARGE_VAL') {
@@ -19,10 +28,16 @@ export default function TextArea(props) {
19
28
  // since we want to preserve the minRows, maxRows info.
20
29
  readOnlyProp = { readOnly: true };
21
30
  }
22
- let testProp = {};
23
- testProp = {
24
- 'data-test-id': testId
25
- };
26
- return (_jsx(TextField, { multiline: true, minRows: 5, maxRows: 5, fullWidth: true, variant: readOnly ? 'standard' : 'outlined', helperText: helperTextToDisplay, placeholder: placeholder ?? '', size: 'small', required: required, disabled: disabled, onChange: onChange, onBlur: !readOnly ? onBlur : undefined, error: status === 'error', label: label, value: value, InputProps: { ...readOnlyProp, inputProps: { maxLength, ...testProp } } }));
31
+ const testProps = { 'data-test-id': testId };
32
+ function handleChange(event) {
33
+ // update internal value
34
+ setInputValue(event?.target?.value);
35
+ }
36
+ function handleBlur() {
37
+ handleEvent(actions, 'changeNblur', propName, inputValue);
38
+ }
39
+ return (_jsx(TextField, { multiline: true, minRows: 5, maxRows: 5, fullWidth: true, variant: readOnly ? 'standard' : 'outlined', helperText: helperTextToDisplay, placeholder: placeholder ?? '', size: 'small', required: required, disabled: disabled, onChange: handleChange, onBlur: !readOnly ? handleBlur : undefined, error: status === 'error', label: label, value: inputValue, slotProps: {
40
+ input: { ...readOnlyProp, inputProps: { maxLength, ...testProps } }
41
+ } }));
27
42
  }
28
43
  //# sourceMappingURL=TextArea.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextArea.js","sourceRoot":"","sources":["../../../../src/components/field/TextArea/TextArea.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAQhF,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAoB;IACnD,8EAA8E;IAC9E,MAAM,cAAc,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAE7D,MAAM,EACJ,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,KAAK,GAAG,EAA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,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EACtC,KAAK,EAAE,MAAM,KAAK,OAAO,EACzB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,EAAE,GAAG,YAAY,EAAE,UAAU,EAAE,EAAE,SAAS,EAAE,GAAG,QAAQ,EAAE,EAAE,GACvE,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { TextField } from '@material-ui/core';\n\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { PConnFieldProps } from '../../../types/PConnProps';\n\ninterface TextAreaProps extends PConnFieldProps {\n // If any, enter additional props that only exist on TextArea here\n fieldMetadata?: any;\n}\n\nexport default function TextArea(props: TextAreaProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const FieldValueList = getComponentFromMap('FieldValueList');\n\n const {\n label,\n required,\n disabled,\n value = '',\n validatemessage,\n status,\n onChange,\n onBlur,\n readOnly,\n testId,\n fieldMetadata,\n helperText,\n displayMode,\n hideLabel,\n placeholder\n } = props;\n const helperTextToDisplay = validatemessage || helperText;\n\n const maxLength = fieldMetadata?.maxLength;\n\n let readOnlyProp = {};\n\n if (displayMode === 'LABELS_LEFT') {\n return <FieldValueList name={hideLabel ? '' : label} value={value} />;\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n return <FieldValueList name={hideLabel ? '' : label} value={value} variant='stacked' />;\n }\n\n if (readOnly) {\n // Not just emitting a read only Textfield like some other components do\n // since we want to preserve the minRows, maxRows info.\n readOnlyProp = { readOnly: true };\n }\n\n let testProp = {};\n\n testProp = {\n 'data-test-id': testId\n };\n\n return (\n <TextField\n multiline\n minRows={5}\n maxRows={5}\n fullWidth\n variant={readOnly ? 'standard' : 'outlined'}\n helperText={helperTextToDisplay}\n placeholder={placeholder ?? ''}\n size='small'\n required={required}\n disabled={disabled}\n onChange={onChange}\n onBlur={!readOnly ? onBlur : undefined}\n error={status === 'error'}\n label={label}\n value={value}\n InputProps={{ ...readOnlyProp, inputProps: { maxLength, ...testProp } }}\n />\n );\n}\n"]}
1
+ {"version":3,"file":"TextArea.js","sourceRoot":"","sources":["../../../../src/components/field/TextArea/TextArea.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAQhF,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAoB;IACnD,8EAA8E;IAC9E,MAAM,cAAc,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAE7D,MAAM,EACJ,WAAW,EACX,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,KAAK,GAAG,EAAE,EACV,eAAe,EACf,MAAM,EACN,QAAQ,EACR,MAAM,EACN,aAAa,EACb,UAAU,EACV,WAAW,EACX,SAAS,EACT,WAAW,EACZ,GAAG,KAAK,CAAC;IACV,MAAM,mBAAmB,GAAG,eAAe,IAAI,UAAU,CAAC;IAC1D,MAAM,KAAK,GAAG,WAAW,EAAE,CAAC;IAC5B,MAAM,OAAO,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC;IACtC,MAAM,QAAQ,GAAI,KAAK,CAAC,aAAa,EAAU,CAAC,KAAK,CAAC;IACtD,MAAM,SAAS,GAAG,aAAa,EAAE,SAAS,CAAC;IAE3C,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAEjD,IAAI,YAAY,GAAG,EAAE,CAAC;IAEtB,SAAS,CAAC,GAAG,EAAE;QACb,aAAa,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,IAAI,WAAW,KAAK,cAAc,EAAE,CAAC;QACnC,OAAO,KAAC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K,EAAE,UAAU,EACjB,SAAS,EAAE;YACT,KAAK,EAAE,EAAE,GAAG,YAAY,EAAE,UAAU,EAAE,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,EAAE;SACpE,GACD,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { useEffect, useState } from 'react';\nimport { TextField } from '@mui/material';\n\nimport handleEvent from '../../helpers/event-utils';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport type { PConnFieldProps } from '../../../types/PConnProps';\n\ninterface TextAreaProps extends PConnFieldProps {\n // If any, enter additional props that only exist on TextArea here\n fieldMetadata?: any;\n}\n\nexport default function TextArea(props: TextAreaProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const FieldValueList = getComponentFromMap('FieldValueList');\n\n const {\n getPConnect,\n label,\n required,\n disabled,\n value = '',\n validatemessage,\n status,\n readOnly,\n testId,\n fieldMetadata,\n helperText,\n displayMode,\n hideLabel,\n placeholder\n } = props;\n const helperTextToDisplay = validatemessage || helperText;\n const pConn = getPConnect();\n const actions = pConn.getActionsApi();\n const propName = (pConn.getStateProps() as any).value;\n const maxLength = fieldMetadata?.maxLength;\n\n const [inputValue, setInputValue] = useState('');\n\n let readOnlyProp = {};\n\n useEffect(() => {\n setInputValue(value);\n }, [value]);\n\n if (displayMode === 'DISPLAY_ONLY') {\n return <FieldValueList name={hideLabel ? '' : label} value={value} />;\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n return <FieldValueList name={hideLabel ? '' : label} value={value} variant='stacked' />;\n }\n\n if (readOnly) {\n // Not just emitting a read only Textfield like some other components do\n // since we want to preserve the minRows, maxRows info.\n readOnlyProp = { readOnly: true };\n }\n\n const testProps: any = { 'data-test-id': testId };\n\n function handleChange(event) {\n // update internal value\n setInputValue(event?.target?.value);\n }\n\n function handleBlur() {\n handleEvent(actions, 'changeNblur', propName, inputValue);\n }\n\n return (\n <TextField\n multiline\n minRows={5}\n maxRows={5}\n fullWidth\n variant={readOnly ? 'standard' : 'outlined'}\n helperText={helperTextToDisplay}\n placeholder={placeholder ?? ''}\n size='small'\n required={required}\n disabled={disabled}\n onChange={handleChange}\n onBlur={!readOnly ? handleBlur : undefined}\n error={status === 'error'}\n label={label}\n value={inputValue}\n slotProps={{\n input: { ...readOnlyProp, inputProps: { maxLength, ...testProps } }\n }}\n />\n );\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { PConnProps } from '../../../types/PConnProps';
1
+ import type { PConnProps } from '../../../types/PConnProps';
2
2
  interface TextContentProps extends PConnProps {
3
3
  content: string;
4
4
  displayAs: 'Paragraph' | 'Heading 1' | 'Heading 2' | 'Heading 3' | 'Heading 4';
@@ -1 +1 @@
1
- {"version":3,"file":"TextContent.d.ts","sourceRoot":"","sources":["../../../../src/components/field/TextContent/TextContent.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,UAAU,gBAAiB,SAAQ,UAAU;IAE3C,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC;CAChF;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAoC1D"}
1
+ {"version":3,"file":"TextContent.d.ts","sourceRoot":"","sources":["../../../../src/components/field/TextContent/TextContent.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,UAAU,gBAAiB,SAAQ,UAAU;IAE3C,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC;CAChF;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAoC1D"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Typography } from '@material-ui/core';
2
+ import { Typography } from '@mui/material';
3
3
  export default function TextContent(props) {
4
4
  const { content, displayAs } = props;
5
5
  let theVariant = 'body1';
@@ -1 +1 @@
1
- {"version":3,"file":"TextContent.js","sourceRoot":"","sources":["../../../../src/components/field/TextContent/TextContent.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAU/C,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAuB;IAIzD,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAsD,KAAK,CAAC;IAExF,IAAI,UAAU,GAAqB,OAAO,CAAC;IAE3C,QAAQ,SAAS,EAAE;QACjB,KAAK,WAAW;YACd,UAAU,GAAG,OAAO,CAAC;YACrB,MAAM;QAER,KAAK,WAAW;YACd,UAAU,GAAG,IAAI,CAAC;YAClB,MAAM;QAER,KAAK,WAAW;YACd,UAAU,GAAG,IAAI,CAAC;YAClB,MAAM;QAER,KAAK,WAAW;YACd,UAAU,GAAG,IAAI,CAAC;YAClB,MAAM;QAER,KAAK,WAAW;YACd,UAAU,GAAG,IAAI,CAAC;YAClB,MAAM;QAER;YACE,sCAAsC;YACtC,OAAO,CAAC,KAAK,CAAC,+CAA+C,SAAS,EAAE,CAAC,CAAC;YAC1E,MAAM;KACT;IAED,OAAO,KAAC,UAAU,IAAC,OAAO,EAAE,UAAU,YAAG,OAAO,GAAc,CAAC;AACjE,CAAC","sourcesContent":["import { Typography } from '@material-ui/core';\n\nimport { PConnProps } from '../../../types/PConnProps';\n\ninterface TextContentProps extends PConnProps {\n // If any, enter additional props that only exist on TextContent here\n content: string;\n displayAs: 'Paragraph' | 'Heading 1' | 'Heading 2' | 'Heading 3' | 'Heading 4';\n}\n\nexport default function TextContent(props: TextContentProps) {\n type ExpectedDisplayAs = 'Paragraph' | 'Heading 1' | 'Heading 2' | 'Heading 3' | 'Heading 4';\n type ExpectedVariants = 'body1' | 'h1' | 'h2' | 'h3' | 'h4';\n\n const { content, displayAs }: { content: string; displayAs: ExpectedDisplayAs } = props;\n\n let theVariant: ExpectedVariants = 'body1';\n\n switch (displayAs) {\n case 'Paragraph':\n theVariant = 'body1';\n break;\n\n case 'Heading 1':\n theVariant = 'h1';\n break;\n\n case 'Heading 2':\n theVariant = 'h2';\n break;\n\n case 'Heading 3':\n theVariant = 'h3';\n break;\n\n case 'Heading 4':\n theVariant = 'h4';\n break;\n\n default:\n // eslint-disable-next-line no-console\n console.error(`TextContent got an expected displayAs prop: ${displayAs}`);\n break;\n }\n\n return <Typography variant={theVariant}>{content}</Typography>;\n}\n"]}
1
+ {"version":3,"file":"TextContent.js","sourceRoot":"","sources":["../../../../src/components/field/TextContent/TextContent.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAU3C,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAuB;IAIzD,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAsD,KAAK,CAAC;IAExF,IAAI,UAAU,GAAqB,OAAO,CAAC;IAE3C,QAAQ,SAAS,EAAE,CAAC;QAClB,KAAK,WAAW;YACd,UAAU,GAAG,OAAO,CAAC;YACrB,MAAM;QAER,KAAK,WAAW;YACd,UAAU,GAAG,IAAI,CAAC;YAClB,MAAM;QAER,KAAK,WAAW;YACd,UAAU,GAAG,IAAI,CAAC;YAClB,MAAM;QAER,KAAK,WAAW;YACd,UAAU,GAAG,IAAI,CAAC;YAClB,MAAM;QAER,KAAK,WAAW;YACd,UAAU,GAAG,IAAI,CAAC;YAClB,MAAM;QAER;YACE,sCAAsC;YACtC,OAAO,CAAC,KAAK,CAAC,+CAA+C,SAAS,EAAE,CAAC,CAAC;YAC1E,MAAM;IACV,CAAC;IAED,OAAO,KAAC,UAAU,IAAC,OAAO,EAAE,UAAU,YAAG,OAAO,GAAc,CAAC;AACjE,CAAC","sourcesContent":["import { Typography } from '@mui/material';\n\nimport type { PConnProps } from '../../../types/PConnProps';\n\ninterface TextContentProps extends PConnProps {\n // If any, enter additional props that only exist on TextContent here\n content: string;\n displayAs: 'Paragraph' | 'Heading 1' | 'Heading 2' | 'Heading 3' | 'Heading 4';\n}\n\nexport default function TextContent(props: TextContentProps) {\n type ExpectedDisplayAs = 'Paragraph' | 'Heading 1' | 'Heading 2' | 'Heading 3' | 'Heading 4';\n type ExpectedVariants = 'body1' | 'h1' | 'h2' | 'h3' | 'h4';\n\n const { content, displayAs }: { content: string; displayAs: ExpectedDisplayAs } = props;\n\n let theVariant: ExpectedVariants = 'body1';\n\n switch (displayAs) {\n case 'Paragraph':\n theVariant = 'body1';\n break;\n\n case 'Heading 1':\n theVariant = 'h1';\n break;\n\n case 'Heading 2':\n theVariant = 'h2';\n break;\n\n case 'Heading 3':\n theVariant = 'h3';\n break;\n\n case 'Heading 4':\n theVariant = 'h4';\n break;\n\n default:\n // eslint-disable-next-line no-console\n console.error(`TextContent got an expected displayAs prop: ${displayAs}`);\n break;\n }\n\n return <Typography variant={theVariant}>{content}</Typography>;\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { PConnFieldProps } from '../../../types/PConnProps';
1
+ import type { PConnFieldProps } from '../../../types/PConnProps';
2
2
  interface TextInputProps extends PConnFieldProps {
3
3
  fieldMetadata?: any;
4
4
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../src/components/field/TextInput/TextInput.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,UAAU,cAAe,SAAQ,eAAe;IAE9C,aAAa,CAAC,EAAE,GAAG,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAK,EAAE,cAAc,2CAiFtD"}
1
+ {"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../src/components/field/TextInput/TextInput.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE,UAAU,cAAe,SAAQ,eAAe;IAE9C,aAAa,CAAC,EAAE,GAAG,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAK,EAAE,cAAc,2CA+EtD"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useState, useEffect } from 'react';
3
- import { TextField } from '@material-ui/core';
3
+ import { TextField } from '@mui/material';
4
4
  import handleEvent from '../../helpers/event-utils';
5
5
  import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
6
6
  export default function TextInput(props) {
@@ -19,7 +19,7 @@ export default function TextInput(props) {
19
19
  useEffect(() => {
20
20
  setInputValue(value);
21
21
  }, [value]);
22
- if (displayMode === 'LABELS_LEFT') {
22
+ if (displayMode === 'DISPLAY_ONLY') {
23
23
  return _jsx(FieldValueList, { name: hideLabel ? '' : label, value: value });
24
24
  }
25
25
  if (displayMode === 'STACKED_LARGE_VAL') {
@@ -28,10 +28,7 @@ export default function TextInput(props) {
28
28
  if (readOnly) {
29
29
  readOnlyProp = { readOnly: true };
30
30
  }
31
- let testProp = {};
32
- testProp = {
33
- 'data-test-id': testId
34
- };
31
+ const testProps = { 'data-test-id': testId };
35
32
  function handleChange(event) {
36
33
  // update internal value
37
34
  setInputValue(event?.target?.value);
@@ -39,6 +36,8 @@ export default function TextInput(props) {
39
36
  function handleBlur() {
40
37
  handleEvent(actions, 'changeNblur', propName, inputValue);
41
38
  }
42
- return (_jsx(TextField, { fullWidth: true, variant: readOnly ? 'standard' : 'outlined', helperText: helperTextToDisplay, placeholder: placeholder ?? '', size: 'small', required: required, disabled: disabled, onChange: handleChange, onBlur: !readOnly ? handleBlur : undefined, error: status === 'error', label: label, value: inputValue, InputProps: { ...readOnlyProp, inputProps: { maxLength, ...testProp } } }));
39
+ return (_jsx(TextField, { fullWidth: true, variant: readOnly ? 'standard' : 'outlined', helperText: helperTextToDisplay, placeholder: placeholder ?? '', size: 'small', required: required, disabled: disabled, onChange: handleChange, onBlur: !readOnly ? handleBlur : undefined, error: status === 'error', label: label, value: inputValue, slotProps: {
40
+ input: { ...readOnlyProp, inputProps: { maxLength, ...testProps } }
41
+ } }));
43
42
  }
44
43
  //# sourceMappingURL=TextInput.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextInput.js","sourceRoot":"","sources":["../../../../src/components/field/TextInput/TextInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAQhF,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAqB;IACrD,8EAA8E;IAC9E,MAAM,cAAc,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAE7D,MAAM,EACJ,WAAW,EACX,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,KAAK,GAAG,EAAE,EACV,eAAe,EACf,MAAM;IACN,sBAAsB;IACtB,QAAQ,EACR,MAAM,EACN,aAAa,EACb,UAAU,EACV,WAAW,EACX,SAAS,EACT,WAAW,EACZ,GAAG,KAAK,CAAC;IAEV,MAAM,KAAK,GAAG,WAAW,EAAE,CAAC;IAC5B,MAAM,OAAO,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC;IACtC,MAAM,QAAQ,GAAI,KAAK,CAAC,aAAa,EAAU,CAAC,KAAK,CAAC;IAEtD,MAAM,mBAAmB,GAAG,eAAe,IAAI,UAAU,CAAC;IAE1D,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACjD,MAAM,SAAS,GAAG,aAAa,EAAE,SAAS,CAAC;IAE3C,IAAI,YAAY,GAAG,EAAE,CAAC,CAAC,8BAA8B;IAErD,SAAS,CAAC,GAAG,EAAE;QACb,aA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AAK,OAAO,EACzB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,UAAU,EACjB,UAAU,EAAE,EAAE,GAAG,YAAY,EAAE,UAAU,EAAE,EAAE,SAAS,EAAE,GAAG,QAAQ,EAAE,EAAE,GACvE,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { useState, useEffect } from 'react';\nimport { TextField } from '@material-ui/core';\n\nimport handleEvent from '../../helpers/event-utils';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { PConnFieldProps } from '../../../types/PConnProps';\n\ninterface TextInputProps extends PConnFieldProps {\n // If any, enter additional props that only exist on TextInput here\n fieldMetadata?: any;\n}\n\nexport default function TextInput(props: TextInputProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const FieldValueList = getComponentFromMap('FieldValueList');\n\n const {\n getPConnect,\n label,\n required,\n disabled,\n value = '',\n validatemessage,\n status,\n /* onChange, onBlur */\n readOnly,\n testId,\n fieldMetadata,\n helperText,\n displayMode,\n hideLabel,\n placeholder\n } = props;\n\n const pConn = getPConnect();\n const actions = pConn.getActionsApi();\n const propName = (pConn.getStateProps() as any).value;\n\n const helperTextToDisplay = validatemessage || helperText;\n\n const [inputValue, setInputValue] = useState('');\n const maxLength = fieldMetadata?.maxLength;\n\n let readOnlyProp = {}; // Note: empty if NOT ReadOnly\n\n useEffect(() => {\n setInputValue(value);\n }, [value]);\n\n if (displayMode === 'LABELS_LEFT') {\n return <FieldValueList name={hideLabel ? '' : label} value={value} />;\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n return <FieldValueList name={hideLabel ? '' : label} value={value} variant='stacked' />;\n }\n\n if (readOnly) {\n readOnlyProp = { readOnly: true };\n }\n\n let testProp = {};\n\n testProp = {\n 'data-test-id': testId\n };\n\n function handleChange(event) {\n // update internal value\n setInputValue(event?.target?.value);\n }\n\n function handleBlur() {\n handleEvent(actions, 'changeNblur', propName, inputValue);\n }\n\n return (\n <TextField\n fullWidth\n variant={readOnly ? 'standard' : 'outlined'}\n helperText={helperTextToDisplay}\n placeholder={placeholder ?? ''}\n size='small'\n required={required}\n disabled={disabled}\n onChange={handleChange}\n onBlur={!readOnly ? handleBlur : undefined}\n error={status === 'error'}\n label={label}\n value={inputValue}\n InputProps={{ ...readOnlyProp, inputProps: { maxLength, ...testProp } }}\n />\n );\n}\n"]}
1
+ {"version":3,"file":"TextInput.js","sourceRoot":"","sources":["../../../../src/components/field/TextInput/TextInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAQhF,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAqB;IACrD,8EAA8E;IAC9E,MAAM,cAAc,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAE7D,MAAM,EACJ,WAAW,EACX,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,KAAK,GAAG,EAAE,EACV,eAAe,EACf,MAAM;IACN,sBAAsB;IACtB,QAAQ,EACR,MAAM,EACN,aAAa,EACb,UAAU,EACV,WAAW,EACX,SAAS,EACT,WAAW,EACZ,GAAG,KAAK,CAAC;IAEV,MAAM,KAAK,GAAG,WAAW,EAAE,CAAC;IAC5B,MAAM,OAAO,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC;IACtC,MAAM,QAAQ,GAAI,KAAK,CAAC,aAAa,EAAU,CAAC,KAAK,CAAC;IAEtD,MAAM,mBAAmB,GAAG,eAAe,IAAI,UAAU,CAAC;IAE1D,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACjD,MAAM,SAAS,GAAG,aAAa,EAAE,SAAS,CAAC;IAE3C,IAAI,YAAY,GAAG,EAAE,CAAC,CAAC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U,CAAC,CAAC,CAAC,SAAS,EAC1C,KAAK,EAAE,MAAM,KAAK,OAAO,EACzB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE;YACT,KAAK,EAAE,EAAE,GAAG,YAAY,EAAE,UAAU,EAAE,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,EAAE;SACpE,GACD,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { useState, useEffect } from 'react';\nimport { TextField } from '@mui/material';\n\nimport handleEvent from '../../helpers/event-utils';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport type { PConnFieldProps } from '../../../types/PConnProps';\n\ninterface TextInputProps extends PConnFieldProps {\n // If any, enter additional props that only exist on TextInput here\n fieldMetadata?: any;\n}\n\nexport default function TextInput(props: TextInputProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const FieldValueList = getComponentFromMap('FieldValueList');\n\n const {\n getPConnect,\n label,\n required,\n disabled,\n value = '',\n validatemessage,\n status,\n /* onChange, onBlur */\n readOnly,\n testId,\n fieldMetadata,\n helperText,\n displayMode,\n hideLabel,\n placeholder\n } = props;\n\n const pConn = getPConnect();\n const actions = pConn.getActionsApi();\n const propName = (pConn.getStateProps() as any).value;\n\n const helperTextToDisplay = validatemessage || helperText;\n\n const [inputValue, setInputValue] = useState('');\n const maxLength = fieldMetadata?.maxLength;\n\n let readOnlyProp = {}; // Note: empty if NOT ReadOnly\n\n useEffect(() => {\n setInputValue(value);\n }, [value]);\n\n if (displayMode === 'DISPLAY_ONLY') {\n return <FieldValueList name={hideLabel ? '' : label} value={value} />;\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n return <FieldValueList name={hideLabel ? '' : label} value={value} variant='stacked' />;\n }\n\n if (readOnly) {\n readOnlyProp = { readOnly: true };\n }\n\n const testProps: any = { 'data-test-id': testId };\n\n function handleChange(event) {\n // update internal value\n setInputValue(event?.target?.value);\n }\n\n function handleBlur() {\n handleEvent(actions, 'changeNblur', propName, inputValue);\n }\n\n return (\n <TextField\n fullWidth\n variant={readOnly ? 'standard' : 'outlined'}\n helperText={helperTextToDisplay}\n placeholder={placeholder ?? ''}\n size='small'\n required={required}\n disabled={disabled}\n onChange={handleChange}\n onBlur={!readOnly ? handleBlur : undefined}\n error={status === 'error'}\n label={label}\n value={inputValue}\n slotProps={{\n input: { ...readOnlyProp, inputProps: { maxLength, ...testProps } }\n }}\n />\n );\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { PConnFieldProps } from '../../../types/PConnProps';
1
+ import type { PConnFieldProps } from '../../../types/PConnProps';
2
2
  interface TimeProps extends PConnFieldProps {
3
3
  }
4
4
  export default function Time(props: TimeProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"Time.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Time/Time.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,UAAU,SAAU,SAAQ,eAAe;CAE1C;AAED,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAK,EAAE,SAAS,2CAgE5C"}
1
+ {"version":3,"file":"Time.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Time/Time.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE,UAAU,SAAU,SAAQ,eAAe;CAE1C;AAED,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAK,EAAE,SAAS,2CAkE5C"}
@@ -1,15 +1,19 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { KeyboardTimePicker } from '@material-ui/pickers';
3
- import AccessTimeIcon from '@material-ui/icons/AccessTime';
2
+ import { TimePicker } from '@mui/x-date-pickers/TimePicker';
3
+ // import AccessTimeIcon from '@mui/icons-material/AccessTime';
4
4
  import dayjs from 'dayjs';
5
+ import handleEvent from '../../helpers/event-utils';
5
6
  import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
6
7
  export default function Time(props) {
7
8
  // Get emitted components from map (so we can get any override that may exist)
8
9
  const FieldValueList = getComponentFromMap('FieldValueList');
9
10
  const TextInput = getComponentFromMap('TextInput');
10
- const { label, required, disabled, value = '', validatemessage, status, onChange, readOnly, helperText, displayMode, hideLabel, testId } = props;
11
+ const { getPConnect, label, required, disabled, value = '', validatemessage, status, readOnly, helperText, displayMode, hideLabel, testId } = props;
11
12
  const helperTextToDisplay = validatemessage || helperText;
12
- if (displayMode === 'LABELS_LEFT') {
13
+ const pConn = getPConnect();
14
+ const actions = pConn.getActionsApi();
15
+ const propName = pConn.getStateProps().value;
16
+ if (displayMode === 'DISPLAY_ONLY') {
13
17
  return _jsx(FieldValueList, { name: hideLabel ? '' : label, value: value });
14
18
  }
15
19
  if (displayMode === 'STACKED_LARGE_VAL') {
@@ -18,16 +22,13 @@ export default function Time(props) {
18
22
  if (readOnly) {
19
23
  return _jsx(TextInput, { ...props });
20
24
  }
21
- let testProp = {};
22
- testProp = {
23
- 'data-test-id': testId
24
- };
25
+ const testProps = { 'data-test-id': testId };
25
26
  const handleChange = date => {
26
- const theValue = date && date.isValid() ? date.format('HH:mm') : null;
27
- onChange({ value: theValue });
27
+ const theValue = date && date.isValid() ? date.format('HH:mm:ss') : null;
28
+ handleEvent(actions, 'changeNblur', propName, theValue);
28
29
  };
29
30
  let timeValue = null;
30
- if (value) {
31
+ if (value && Object.keys(value).length) {
31
32
  const timeArray = value.split(':').map(itm => Number(itm));
32
33
  timeValue = dayjs().hour(timeArray[0]).minute(timeArray[1]);
33
34
  }
@@ -35,6 +36,25 @@ export default function Time(props) {
35
36
  // TODO: Keyboard doesn't work in the minute field, it updates one digit then jump to am/pm field
36
37
  // try an older version of the lib or use DateTimePicker
37
38
  //
38
- return (_jsx(KeyboardTimePicker, { variant: 'inline', inputVariant: 'outlined', placeholder: 'hh:mm am', keyboardIcon: _jsx(AccessTimeIcon, {}), fullWidth: true, required: required, disabled: disabled, error: status === 'error', helperText: helperTextToDisplay, minutesStep: 5, size: 'small', label: label, autoOk: true, mask: '__:__ _m', format: 'hh:mm a', value: timeValue, onChange: handleChange, InputProps: { inputProps: { ...testProp } } }));
39
+ return (_jsx(TimePicker
40
+ // keyboardIcon={<AccessTimeIcon />}
41
+ // fullWidth
42
+ , {
43
+ // keyboardIcon={<AccessTimeIcon />}
44
+ // fullWidth
45
+ disabled: disabled, minutesStep: 5, label: label,
46
+ // autoOk
47
+ // mask='__:__ _m'
48
+ format: 'hh:mm a', value: timeValue, onChange: handleChange, slotProps: {
49
+ textField: {
50
+ variant: 'outlined',
51
+ placeholder: 'hh:mm am',
52
+ required,
53
+ error: status === 'error',
54
+ helperText: helperTextToDisplay,
55
+ size: 'small',
56
+ InputProps: { ...testProps }
57
+ }
58
+ } }));
39
59
  }
40
60
  //# sourceMappingURL=Time.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Time.js","sourceRoot":"","sources":["../../../../src/components/field/Time/Time.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAC3D,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAOhF,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAgB;IAC3C,8EAA8E;IAC9E,MAAM,cAAc,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAC7D,MAAM,SAAS,GAAG,mBAAmB,CAAC,WAAW,CAAC,CAAC;IAEnD,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,GAAG,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IACjJ,MAAM,mBAAmB,GAAG,eA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,OAAO,CACL,KAAC,kBAAkB,IACjB,OAAO,EAAC,QAAQ,EAChB,YAAY,EAAC,UAAU,EACvB,WAAW,EAAC,UAAU,EACtB,YAAY,EAAE,KAAC,cAAc,KAAG,EAChC,SAAS,QACT,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,MAAM,KAAK,OAAO,EACzB,UAAU,EAAE,mBAAmB,EAC/B,WAAW,EAAE,CAAC,EACd,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,KAAK,EACZ,MAAM,QACN,IAAI,EAAC,UAAU,EACf,MAAM,EAAC,SAAS,EAChB,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,YAAY,EACtB,UAAU,EAAE,EAAE,UAAU,EAAE,EAAE,GAAG,QAAQ,EAAE,EAAE,GAC3C,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { KeyboardTimePicker } from '@material-ui/pickers';\nimport AccessTimeIcon from '@material-ui/icons/AccessTime';\nimport dayjs from 'dayjs';\n\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { PConnFieldProps } from '../../../types/PConnProps';\n\ninterface TimeProps extends PConnFieldProps {\n // If any, enter additional props that only exist on Time here\n}\n\nexport default function Time(props: TimeProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const FieldValueList = getComponentFromMap('FieldValueList');\n const TextInput = getComponentFromMap('TextInput');\n\n const { label, required, disabled, value = '', validatemessage, status, onChange, readOnly, helperText, displayMode, hideLabel, testId } = props;\n const helperTextToDisplay = validatemessage || helperText;\n\n if (displayMode === 'LABELS_LEFT') {\n return <FieldValueList name={hideLabel ? '' : label} value={value} />;\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n return <FieldValueList name={hideLabel ? '' : label} value={value} variant='stacked' />;\n }\n\n if (readOnly) {\n return <TextInput {...props} />;\n }\n\n let testProp = {};\n\n testProp = {\n 'data-test-id': testId\n };\n\n const handleChange = date => {\n const theValue = date && date.isValid() ? date.format('HH:mm') : null;\n onChange({ value: theValue });\n };\n\n let timeValue: any = null;\n if (value) {\n const timeArray = value.split(':').map(itm => Number(itm));\n timeValue = dayjs().hour(timeArray[0]).minute(timeArray[1]);\n }\n\n //\n // TODO: Keyboard doesn't work in the minute field, it updates one digit then jump to am/pm field\n // try an older version of the lib or use DateTimePicker\n //\n\n return (\n <KeyboardTimePicker\n variant='inline'\n inputVariant='outlined'\n placeholder='hh:mm am'\n keyboardIcon={<AccessTimeIcon />}\n fullWidth\n required={required}\n disabled={disabled}\n error={status === 'error'}\n helperText={helperTextToDisplay}\n minutesStep={5}\n size='small'\n label={label}\n autoOk\n mask='__:__ _m'\n format='hh:mm a'\n value={timeValue}\n onChange={handleChange}\n InputProps={{ inputProps: { ...testProp } }}\n />\n );\n}\n"]}
1
+ {"version":3,"file":"Time.js","sourceRoot":"","sources":["../../../../src/components/field/Time/Time.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,+DAA+D;AAC/D,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAOhF,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAgB;IAC3C,8EAA8E;IAC9E,MAAM,cAAc,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAC7D,MAAM,SAAS,GAAG,mBAAmB,CAAC,WAAW,CAAC,CAAC;IAEnD,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,GAAG,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IACpJ,MAAM,mBAAmB,GAAG,eAAe,IAAI,UAAU,CAAC;IAC1D,MAAM,KAAK,GAAG,WAA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C3D,SAAS,GAAG,KAAK,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9D,CAAC;IAED,EAAE;IACF,iGAAiG;IACjG,8DAA8D;IAC9D,EAAE;IAEF,OAAO,CACL,KAAC,UAAU;IACT,oCAAoC;IACpC,YAAY;;QADZ,oCAAoC;QACpC,YAAY;QAEZ,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,CAAC,EACd,KAAK,EAAE,KAAK;QACZ,SAAS;QACT,kBAAkB;QAClB,MAAM,EAAC,SAAS,EAChB,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,YAAY,EACtB,SAAS,EAAE;YACT,SAAS,EAAE;gBACT,OAAO,EAAE,UAAU;gBACnB,WAAW,EAAE,UAAU;gBACvB,QAAQ;gBACR,KAAK,EAAE,MAAM,KAAK,OAAO;gBACzB,UAAU,EAAE,mBAAmB;gBAC/B,IAAI,EAAE,OAAO;gBACb,UAAU,EAAE,EAAE,GAAG,SAAS,EAAE;aAC7B;SACF,GACD,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { TimePicker } from '@mui/x-date-pickers/TimePicker';\n// import AccessTimeIcon from '@mui/icons-material/AccessTime';\nimport dayjs from 'dayjs';\n\nimport handleEvent from '../../helpers/event-utils';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport type { PConnFieldProps } from '../../../types/PConnProps';\n\ninterface TimeProps extends PConnFieldProps {\n // If any, enter additional props that only exist on Time here\n}\n\nexport default function Time(props: TimeProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const FieldValueList = getComponentFromMap('FieldValueList');\n const TextInput = getComponentFromMap('TextInput');\n\n const { getPConnect, label, required, disabled, value = '', validatemessage, status, readOnly, helperText, displayMode, hideLabel, testId } = props;\n const helperTextToDisplay = validatemessage || helperText;\n const pConn = getPConnect();\n const actions = pConn.getActionsApi();\n const propName = (pConn.getStateProps() as any).value;\n if (displayMode === 'DISPLAY_ONLY') {\n return <FieldValueList name={hideLabel ? '' : label} value={value} />;\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n return <FieldValueList name={hideLabel ? '' : label} value={value} variant='stacked' />;\n }\n\n if (readOnly) {\n return <TextInput {...props} />;\n }\n\n const testProps: any = { 'data-test-id': testId };\n\n const handleChange = date => {\n const theValue = date && date.isValid() ? date.format('HH:mm:ss') : null;\n handleEvent(actions, 'changeNblur', propName, theValue);\n };\n\n let timeValue: any = null;\n if (value && Object.keys(value).length) {\n const timeArray = value.split(':').map(itm => Number(itm));\n timeValue = dayjs().hour(timeArray[0]).minute(timeArray[1]);\n }\n\n //\n // TODO: Keyboard doesn't work in the minute field, it updates one digit then jump to am/pm field\n // try an older version of the lib or use DateTimePicker\n //\n\n return (\n <TimePicker\n // keyboardIcon={<AccessTimeIcon />}\n // fullWidth\n\n disabled={disabled}\n minutesStep={5}\n label={label}\n // autoOk\n // mask='__:__ _m'\n format='hh:mm a'\n value={timeValue}\n onChange={handleChange}\n slotProps={{\n textField: {\n variant: 'outlined',\n placeholder: 'hh:mm am',\n required,\n error: status === 'error',\n helperText: helperTextToDisplay,\n size: 'small',\n InputProps: { ...testProps }\n }\n }}\n />\n );\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { PConnFieldProps } from '../../../types/PConnProps';
1
+ import type { PConnFieldProps } from '../../../types/PConnProps';
2
2
  interface URLComponentProps extends PConnFieldProps {
3
3
  }
4
4
  export default function URLComponent(props: URLComponentProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"URL.d.ts","sourceRoot":"","sources":["../../../../src/components/field/URL/URL.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,UAAU,iBAAkB,SAAQ,eAAe;CAElD;AAKD,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CA2D5D"}
1
+ {"version":3,"file":"URL.d.ts","sourceRoot":"","sources":["../../../../src/components/field/URL/URL.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE,UAAU,iBAAkB,SAAQ,eAAe;CAElD;AAKD,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CA0E5D"}
@@ -1,5 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { TextField } from '@material-ui/core';
2
+ import { useEffect, useState } from 'react';
3
+ import { TextField } from '@mui/material';
4
+ import handleEvent from '../../helpers/event-utils';
3
5
  import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
4
6
  // NOTE: that we had to change the name from URL to URLComponent
5
7
  // Otherwise, we were getting all kinds of weird errors when we
@@ -8,9 +10,16 @@ export default function URLComponent(props) {
8
10
  // Get emitted components from map (so we can get any override that may exist)
9
11
  const FieldValueList = getComponentFromMap('FieldValueList');
10
12
  const TextInput = getComponentFromMap('TextInput');
11
- const { label, required, disabled, value = '', validatemessage, status, onChange, onBlur, readOnly, testId, helperText, displayMode, hideLabel, placeholder } = props;
13
+ const { getPConnect, label, required, disabled, value = '', validatemessage, status, readOnly, testId, helperText, displayMode, hideLabel, placeholder } = props;
12
14
  const helperTextToDisplay = validatemessage || helperText;
13
- if (displayMode === 'LABELS_LEFT') {
15
+ const [inputValue, setInputValue] = useState('');
16
+ const pConn = getPConnect();
17
+ const actions = pConn.getActionsApi();
18
+ const propName = pConn.getStateProps().value;
19
+ useEffect(() => {
20
+ setInputValue(value);
21
+ }, [value]);
22
+ if (displayMode === 'DISPLAY_ONLY') {
14
23
  return _jsx(FieldValueList, { name: hideLabel ? '' : label, value: value });
15
24
  }
16
25
  if (displayMode === 'STACKED_LARGE_VAL') {
@@ -19,10 +28,15 @@ export default function URLComponent(props) {
19
28
  if (readOnly) {
20
29
  return _jsx(TextInput, { ...props });
21
30
  }
22
- let testProp = {};
23
- testProp = {
24
- 'data-test-id': testId
31
+ const testProps = { 'data-test-id': testId };
32
+ const handleChange = event => {
33
+ setInputValue(event?.target?.value);
25
34
  };
26
- return (_jsx(TextField, { type: 'url', fullWidth: true, variant: 'outlined', helperText: helperTextToDisplay, placeholder: placeholder ?? '', size: 'small', required: required, disabled: disabled, onChange: onChange, onBlur: !readOnly ? onBlur : undefined, error: status === 'error', label: label, value: value, InputProps: { inputProps: { ...testProp } } }));
35
+ function handleBlur() {
36
+ handleEvent(actions, 'changeNblur', propName, inputValue);
37
+ }
38
+ return (_jsx(TextField, { type: 'url', fullWidth: true, variant: 'outlined', helperText: helperTextToDisplay, placeholder: placeholder ?? '', size: 'small', required: required, disabled: disabled, onChange: handleChange, onBlur: !readOnly ? handleBlur : undefined, error: status === 'error', label: label, value: inputValue, slotProps: {
39
+ input: { inputProps: { ...testProps } }
40
+ } }));
27
41
  }
28
42
  //# sourceMappingURL=URL.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"URL.js","sourceRoot":"","sources":["../../../../src/components/field/URL/URL.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAOhF,gEAAgE;AAChE,gEAAgE;AAChE,mCAAmC;AACnC,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAwB;IAC3D,8EAA8E;IAC9E,MAAM,cAAc,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAC7D,MAAM,SAAS,GAAG,mBAAmB,CAAC,WAAW,CAAC,CAAC;IAEnD,MAAM,EACJ,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,KAAK,GAAG,EAAE,EACV,eAAe,EACf,MAAM,EACN,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,MAAM,EACN,UAAU,EACV,WAAW,EACX,SAAS,EACT,WAAW,EACZ,GAAG,KAAK,CAAC;IACV,MAAM,mBAAmB,GAAG,eAAe,IAAI,UAAU,CAAC;IAE1D,IAAI,WAAW,KAAK,aAAa,EAAE;QACjC,OAAO,KAAC,cAAc,IAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,GAAI,CAAC;KACvE;IAED,IAAI,WAAW,KAAK,mBAAmB,EAAE;QACvC,OAAO,KAAC,cAAc,IAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAC,SAAS,GAAG,CAAC;KACzF;IAED,IAAI,QAAQ,EAAE;QACZ,OAAO,KAAC,SAAS,OAAK,KAAK,GAAI,CAAC;KACjC;IAED,IAAI,QAAQ,GAAG,EAAE,CAAC;IAElB,QAAQ,GAAG;QACT,cAAc,EAAE,MAAM;KACvB,CAAC;IAEF,OAAO,CACL,KAAC,SAAS,IACR,IAAI,EAAC,KAAK,EACV,SAAS,QACT,OAAO,EAAC,UAAU,EAClB,UAAU,EAAE,mBAAmB,EAC/B,WAAW,EAAE,WAAW,IAAI,EAAE,EAC9B,IAAI,EAAC,OAAO,EACZ,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EACtC,KAAK,EAAE,MAAM,KAAK,OAAO,EACzB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,EAAE,UAAU,EAAE,EAAE,GAAG,QAAQ,EAAE,EAAE,GAC3C,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { TextField } from '@material-ui/core';\n\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { PConnFieldProps } from '../../../types/PConnProps';\n\ninterface URLComponentProps extends PConnFieldProps {\n // If any, enter additional props that only exist on URLComponent here\n}\n\n// NOTE: that we had to change the name from URL to URLComponent\n// Otherwise, we were getting all kinds of weird errors when we\n// referred to URL as a component.\nexport default function URLComponent(props: URLComponentProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const FieldValueList = getComponentFromMap('FieldValueList');\n const TextInput = getComponentFromMap('TextInput');\n\n const {\n label,\n required,\n disabled,\n value = '',\n validatemessage,\n status,\n onChange,\n onBlur,\n readOnly,\n testId,\n helperText,\n displayMode,\n hideLabel,\n placeholder\n } = props;\n const helperTextToDisplay = validatemessage || helperText;\n\n if (displayMode === 'LABELS_LEFT') {\n return <FieldValueList name={hideLabel ? '' : label} value={value} />;\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n return <FieldValueList name={hideLabel ? '' : label} value={value} variant='stacked' />;\n }\n\n if (readOnly) {\n return <TextInput {...props} />;\n }\n\n let testProp = {};\n\n testProp = {\n 'data-test-id': testId\n };\n\n return (\n <TextField\n type='url'\n fullWidth\n variant='outlined'\n helperText={helperTextToDisplay}\n placeholder={placeholder ?? ''}\n size='small'\n required={required}\n disabled={disabled}\n onChange={onChange}\n onBlur={!readOnly ? onBlur : undefined}\n error={status === 'error'}\n label={label}\n value={value}\n InputProps={{ inputProps: { ...testProp } }}\n />\n );\n}\n"]}
1
+ {"version":3,"file":"URL.js","sourceRoot":"","sources":["../../../../src/components/field/URL/URL.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAOhF,gEAAgE;AAChE,gEAAgE;AAChE,mCAAmC;AACnC,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAwB;IAC3D,8EAA8E;IAC9E,MAAM,cAAc,GAAG,mB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,EAAE,CAAC;IAElD,MAAM,YAAY,GAAG,KAAK,CAAC,EAAE;QAC3B,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IACtC,CAAC,CAAC;IAEF,SAAS,UAAU;QACjB,WAAW,CAAC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;IAC5D,CAAC;IAED,OAAO,CACL,KAAC,SAAS,IACR,IAAI,EAAC,KAAK,EACV,SAAS,QACT,OAAO,EAAC,UAAU,EAClB,UAAU,EAAE,mBAAmB,EAC/B,WAAW,EAAE,WAAW,IAAI,EAAE,EAC9B,IAAI,EAAC,OAAO,EACZ,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,YAAY,EACtB,MAAM,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,EAC1C,KAAK,EAAE,MAAM,KAAK,OAAO,EACzB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE;YACT,KAAK,EAAE,EAAE,UAAU,EAAE,EAAE,GAAG,SAAS,EAAE,EAAE;SACxC,GACD,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { useEffect, useState } from 'react';\nimport { TextField } from '@mui/material';\n\nimport handleEvent from '../../helpers/event-utils';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport type { PConnFieldProps } from '../../../types/PConnProps';\n\ninterface URLComponentProps extends PConnFieldProps {\n // If any, enter additional props that only exist on URLComponent here\n}\n\n// NOTE: that we had to change the name from URL to URLComponent\n// Otherwise, we were getting all kinds of weird errors when we\n// referred to URL as a component.\nexport default function URLComponent(props: URLComponentProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const FieldValueList = getComponentFromMap('FieldValueList');\n const TextInput = getComponentFromMap('TextInput');\n\n const {\n getPConnect,\n label,\n required,\n disabled,\n value = '',\n validatemessage,\n status,\n readOnly,\n testId,\n helperText,\n displayMode,\n hideLabel,\n placeholder\n } = props;\n const helperTextToDisplay = validatemessage || helperText;\n\n const [inputValue, setInputValue] = useState('');\n\n const pConn = getPConnect();\n const actions = pConn.getActionsApi();\n const propName = (pConn.getStateProps() as any).value;\n\n useEffect(() => {\n setInputValue(value);\n }, [value]);\n\n if (displayMode === 'DISPLAY_ONLY') {\n return <FieldValueList name={hideLabel ? '' : label} value={value} />;\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n return <FieldValueList name={hideLabel ? '' : label} value={value} variant='stacked' />;\n }\n\n if (readOnly) {\n return <TextInput {...props} />;\n }\n\n const testProps: any = { 'data-test-id': testId };\n\n const handleChange = event => {\n setInputValue(event?.target?.value);\n };\n\n function handleBlur() {\n handleEvent(actions, 'changeNblur', propName, inputValue);\n }\n\n return (\n <TextField\n type='url'\n fullWidth\n variant='outlined'\n helperText={helperTextToDisplay}\n placeholder={placeholder ?? ''}\n size='small'\n required={required}\n disabled={disabled}\n onChange={handleChange}\n onBlur={!readOnly ? handleBlur : undefined}\n error={status === 'error'}\n label={label}\n value={inputValue}\n slotProps={{\n input: { inputProps: { ...testProps } }\n }}\n />\n );\n}\n"]}
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
- import { PConnProps } from '../../../types/PConnProps';
1
+ import type { PConnProps } from '../../../types/PConnProps';
3
2
  interface UserReferenceProps extends PConnProps {
4
3
  displayAs?: string;
5
4
  displayMode?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"UserReference.d.ts","sourceRoot":"","sources":["../../../../src/components/field/UserReference/UserReference.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAQvD,UAAU,kBAAmB,SAAQ,UAAU;IAE7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,GAAG,CAAC;CAChB;;AA0KD,wBAAiD"}
1
+ {"version":3,"file":"UserReference.d.ts","sourceRoot":"","sources":["../../../../src/components/field/UserReference/UserReference.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAQ5D,UAAU,kBAAmB,SAAQ,UAAU;IAE7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,GAAG,CAAC;CAChB;oEAE6B,kBAAkB;AAsKhD,wBAAiD"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { memo, useEffect, useState } from 'react';
3
- import { Typography } from '@material-ui/core';
3
+ import { Typography } from '@mui/material';
4
4
  import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
5
5
  import FieldValueList from '../../designSystemExtension/FieldValueList';
6
6
  import { getUserId, isUserNameAvailable } from './UserReferenceUtils';
@@ -38,10 +38,8 @@ const UserReference = (props) => {
38
38
  dataViewName: OPERATORS_DP
39
39
  };
40
40
  PCore.getRestClient()
41
- // @ts-ignore - Argument of type '{ queryPayload: { dataViewName: string; }; }' is not assignable to parameter of type 'RestApiOptionsObject'
42
- // @ts-ignore - Expected 3 arguments, but got 2
43
41
  .invokeRestApi('getListData', { queryPayload })
44
- .then((res) => {
42
+ .then(res => {
45
43
  const ddDataSource = res.data.data.map(listItem => ({
46
44
  key: listItem.pyUserIdentifier,
47
45
  value: listItem.pyUserName
@@ -55,7 +53,7 @@ const UserReference = (props) => {
55
53
  }
56
54
  }, [displayAs, readOnly, showAsFormattedText, value]);
57
55
  let userReferenceComponent = null;
58
- if (displayMode === 'LABELS_LEFT') {
56
+ if (displayMode === 'DISPLAY_ONLY') {
59
57
  return _jsx(FieldValueList, { name: hideLabel ? '' : label, value: userName || '' });
60
58
  }
61
59
  if (displayMode === 'STACKED_LARGE_VAL') {
@@ -1 +1 @@
1
- {"version":3,"file":"UserReference.js","sourceRoot":"","sources":["../../../../src/components/field/UserReference/UserReference.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAGhF,OAAO,cAAc,MAAM,4CAA4C,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Effect, useState } from 'react';\nimport { Typography } from '@material-ui/core';\n\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { PConnProps } from '../../../types/PConnProps';\n\nimport FieldValueList from '../../designSystemExtension/FieldValueList';\nimport { getUserId, isUserNameAvailable } from './UserReferenceUtils';\n\nconst DROPDOWN_LIST = 'Drop-down list';\nconst SEARCH_BOX = 'Search box';\n\ninterface UserReferenceProps extends PConnProps {\n // If any, enter additional props that only exist on URLComponent here\n displayAs?: string;\n displayMode?: string;\n label?: string;\n value?: any;\n testId?: string;\n placeholder?: string;\n helperText?: string;\n disabled?: boolean;\n readOnly?: boolean;\n required?: boolean;\n validatemessage?: string;\n showAsFormattedText?: boolean;\n additionalProps?: object;\n hideLabel?: boolean;\n variant?: string;\n onChange?: any;\n}\n\nconst UserReference = (props: UserReferenceProps) => {\n // Get emitted components from map (so we can get any override that may exist)\n const AutoComplete = getComponentFromMap('AutoComplete');\n const Dropdown = getComponentFromMap('Dropdown');\n\n const {\n label = '',\n displayAs = '',\n displayMode = '',\n getPConnect,\n value = '',\n testId = '',\n helperText = '',\n validatemessage = '',\n placeholder = '',\n showAsFormattedText = false,\n additionalProps = {},\n hideLabel = false,\n readOnly = false,\n required = false,\n disabled = false,\n onChange,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n variant = 'inline'\n } = props;\n const [dropDownDataSource, setDropDownDataSource] = useState([]);\n const [userName, setUserName] = useState('');\n const OPERATORS_DP = PCore.getEnvironmentInfo().getDefaultOperatorDP();\n const userId = getUserId(value);\n\n useEffect(() => {\n if (userId && readOnly && showAsFormattedText) {\n if (isUserNameAvailable(value)) {\n setUserName(value.userName);\n } else {\n // if same user ref field is referred in view as editable & readonly formatted text\n // referenced users won't be available, so get user details from dx api\n const { getOperatorDetails } = PCore.getUserApi();\n getOperatorDetails(userId).then((res: any) => {\n if (res.data && res.data.pyOperatorInfo && res.data.pyOperatorInfo.pyUserName) {\n setUserName(res.data.pyOperatorInfo.pyUserName);\n }\n });\n }\n } else if (displayAs === DROPDOWN_LIST) {\n const queryPayload = {\n dataViewName: OPERATORS_DP\n };\n\n PCore.getRestClient()\n // @ts-ignore - Argument of type '{ queryPayload: { dataViewName: string; }; }' is not assignable to parameter of type 'RestApiOptionsObject'\n // @ts-ignore - Expected 3 arguments, but got 2\n .invokeRestApi('getListData', { queryPayload })\n .then((res: any) => {\n const ddDataSource = res.data.data.map(listItem => ({\n key: listItem.pyUserIdentifier,\n value: listItem.pyUserName\n }));\n setDropDownDataSource(ddDataSource);\n })\n .catch(err => {\n // eslint-disable-next-line no-console\n console.error(err);\n });\n }\n }, [displayAs, readOnly, showAsFormattedText, value]);\n\n let userReferenceComponent: any = null;\n\n if (displayMode === 'LABELS_LEFT') {\n return <FieldValueList name={hideLabel ? '' : label} value={userName || ''} />;\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n return <FieldValueList name={hideLabel ? '' : label} value={userName || ''} variant='stacked' />;\n }\n\n if (readOnly && showAsFormattedText) {\n if (userId) {\n userReferenceComponent = (\n <>\n {/*\n TODO: This has to be replaced with Operator Component\n */}\n <div>\n <Typography variant='caption'>{label}</Typography>\n <Typography variant='body1'>{userName}</Typography>\n </div>\n </>\n );\n }\n } else {\n if (displayAs === SEARCH_BOX) {\n const columns = [\n {\n value: 'pyUserName',\n display: 'true',\n useForSearch: true,\n primary: 'true'\n },\n {\n value: 'pyUserIdentifier',\n setProperty: 'Associated property',\n key: 'true',\n display: 'true',\n secondary: 'true',\n useForSearch: 'true'\n }\n ];\n\n userReferenceComponent = (\n <AutoComplete\n additionalProps={additionalProps}\n label={label}\n getPConnect={getPConnect}\n datasource={OPERATORS_DP}\n listType='datapage'\n columns={columns}\n testId={testId}\n placeholder={placeholder}\n readOnly={readOnly}\n disabled={disabled}\n required={required}\n helperText={helperText}\n validatemessage={validatemessage}\n value={userId}\n hideLabel={hideLabel}\n onChange={onChange}\n />\n );\n }\n if (displayAs === DROPDOWN_LIST) {\n userReferenceComponent = (\n <Dropdown\n additionalProps={additionalProps}\n datasource={dropDownDataSource}\n listType='associated'\n getPConnect={getPConnect}\n label={label}\n value={userId}\n testId={testId}\n placeholder={placeholder}\n readOnly={readOnly}\n disabled={disabled}\n required={required}\n helperText={helperText}\n validatemessage={validatemessage}\n hideLabel={hideLabel}\n onChange={onChange}\n />\n );\n }\n }\n return userReferenceComponent;\n};\n\n// as objects are there in props, shallow comparision fails & re-rendering of comp happens even with\n// same key value pairs in obj. hence using custom comparison function on when to re-render\nconst comparisonFn = (prevProps, nextProps) => {\n return (\n getUserId(prevProps.value) === getUserId(nextProps.value) &&\n prevProps.validatemessage === nextProps.validatemessage &&\n prevProps.required === nextProps.required &&\n prevProps.disabled === nextProps.disabled &&\n prevProps.readOnly === nextProps.readOnly\n );\n};\n\nexport default memo(UserReference, comparisonFn);\n"]}
1
+ {"version":3,"file":"UserReference.js","sourceRoot":"","sources":["../../../../src/components/field/UserReference/UserReference.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAGhF,OAAO,cAAc,MAAM,4CAA4C,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEtE,MAAM,aAAa,GAAG,gBAAgB,CAAC;AACvC,MAAM,UAAU,GAAG,YAAY,CAAC;AAsBhC,MAAM,aAAa,GAAG,CAAC,KAAyB,EAAE,EAAE;IAClD,8EAA8E;IAC9E,MAAM,YAAY,GAAG,mBAAmB,CAAC,cAAc,CAAC,CAAC;IACzD,MAAM,QAAQ,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC;IAEjD,MAAM,EACJ,KAAK,GAAG,EAAE,EACV,SAAS,GAAG,EAAE,EACd,WAAW,GAAG,EAAE,EAChB,WAAW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AAU,EAAE,kBAAkB,EAC9B,QAAQ,EAAC,YAAY,EACrB,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,EACtB,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO,sBAAsB,CAAC;AAChC,CAAC,CAAC;AAEF,oGAAoG;AACpG,2FAA2F;AAC3F,MAAM,YAAY,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE;IAC5C,OAAO,CACL,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC;QACzD,SAAS,CAAC,eAAe,KAAK,SAAS,CAAC,eAAe;QACvD,SAAS,CAAC,QAAQ,KAAK,SAAS,CAAC,QAAQ;QACzC,SAAS,CAAC,QAAQ,KAAK,SAAS,CAAC,QAAQ;QACzC,SAAS,CAAC,QAAQ,KAAK,SAAS,CAAC,QAAQ,CAC1C,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC","sourcesContent":["import { memo, useEffect, useState } from 'react';\nimport { Typography } from '@mui/material';\n\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport type { PConnProps } from '../../../types/PConnProps';\n\nimport FieldValueList from '../../designSystemExtension/FieldValueList';\nimport { getUserId, isUserNameAvailable } from './UserReferenceUtils';\n\nconst DROPDOWN_LIST = 'Drop-down list';\nconst SEARCH_BOX = 'Search box';\n\ninterface UserReferenceProps extends PConnProps {\n // If any, enter additional props that only exist on URLComponent here\n displayAs?: string;\n displayMode?: string;\n label?: string;\n value?: any;\n testId?: string;\n placeholder?: string;\n helperText?: string;\n disabled?: boolean;\n readOnly?: boolean;\n required?: boolean;\n validatemessage?: string;\n showAsFormattedText?: boolean;\n additionalProps?: object;\n hideLabel?: boolean;\n variant?: string;\n onChange?: any;\n}\n\nconst UserReference = (props: UserReferenceProps) => {\n // Get emitted components from map (so we can get any override that may exist)\n const AutoComplete = getComponentFromMap('AutoComplete');\n const Dropdown = getComponentFromMap('Dropdown');\n\n const {\n label = '',\n displayAs = '',\n displayMode = '',\n getPConnect,\n value = '',\n testId = '',\n helperText = '',\n validatemessage = '',\n placeholder = '',\n showAsFormattedText = false,\n additionalProps = {},\n hideLabel = false,\n readOnly = false,\n required = false,\n disabled = false,\n onChange,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n variant = 'inline'\n } = props;\n const [dropDownDataSource, setDropDownDataSource] = useState([]);\n const [userName, setUserName] = useState('');\n const OPERATORS_DP = PCore.getEnvironmentInfo().getDefaultOperatorDP();\n const userId = getUserId(value);\n\n useEffect(() => {\n if (userId && readOnly && showAsFormattedText) {\n if (isUserNameAvailable(value)) {\n setUserName(value.userName);\n } else {\n // if same user ref field is referred in view as editable & readonly formatted text\n // referenced users won't be available, so get user details from dx api\n const { getOperatorDetails } = PCore.getUserApi();\n getOperatorDetails(userId).then((res: any) => {\n if (res.data && res.data.pyOperatorInfo && res.data.pyOperatorInfo.pyUserName) {\n setUserName(res.data.pyOperatorInfo.pyUserName);\n }\n });\n }\n } else if (displayAs === DROPDOWN_LIST) {\n const queryPayload = {\n dataViewName: OPERATORS_DP\n };\n\n PCore.getRestClient()\n .invokeRestApi('getListData', { queryPayload })\n .then(res => {\n const ddDataSource = res.data.data.map(listItem => ({\n key: listItem.pyUserIdentifier,\n value: listItem.pyUserName\n }));\n setDropDownDataSource(ddDataSource);\n })\n .catch(err => {\n // eslint-disable-next-line no-console\n console.error(err);\n });\n }\n }, [displayAs, readOnly, showAsFormattedText, value]);\n\n let userReferenceComponent: any = null;\n\n if (displayMode === 'DISPLAY_ONLY') {\n return <FieldValueList name={hideLabel ? '' : label} value={userName || ''} />;\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n return <FieldValueList name={hideLabel ? '' : label} value={userName || ''} variant='stacked' />;\n }\n\n if (readOnly && showAsFormattedText) {\n if (userId) {\n userReferenceComponent = (\n <>\n {/*\n TODO: This has to be replaced with Operator Component\n */}\n <div>\n <Typography variant='caption'>{label}</Typography>\n <Typography variant='body1'>{userName}</Typography>\n </div>\n </>\n );\n }\n } else {\n if (displayAs === SEARCH_BOX) {\n const columns = [\n {\n value: 'pyUserName',\n display: 'true',\n useForSearch: true,\n primary: 'true'\n },\n {\n value: 'pyUserIdentifier',\n setProperty: 'Associated property',\n key: 'true',\n display: 'true',\n secondary: 'true',\n useForSearch: 'true'\n }\n ];\n\n userReferenceComponent = (\n <AutoComplete\n additionalProps={additionalProps}\n label={label}\n getPConnect={getPConnect}\n datasource={OPERATORS_DP}\n listType='datapage'\n columns={columns}\n testId={testId}\n placeholder={placeholder}\n readOnly={readOnly}\n disabled={disabled}\n required={required}\n helperText={helperText}\n validatemessage={validatemessage}\n value={userId}\n hideLabel={hideLabel}\n onChange={onChange}\n />\n );\n }\n if (displayAs === DROPDOWN_LIST) {\n userReferenceComponent = (\n <Dropdown\n additionalProps={additionalProps}\n datasource={dropDownDataSource}\n listType='associated'\n getPConnect={getPConnect}\n label={label}\n value={userId}\n testId={testId}\n placeholder={placeholder}\n readOnly={readOnly}\n disabled={disabled}\n required={required}\n helperText={helperText}\n validatemessage={validatemessage}\n hideLabel={hideLabel}\n onChange={onChange}\n />\n );\n }\n }\n return userReferenceComponent;\n};\n\n// as objects are there in props, shallow comparision fails & re-rendering of comp happens even with\n// same key value pairs in obj. hence using custom comparison function on when to re-render\nconst comparisonFn = (prevProps, nextProps) => {\n return (\n getUserId(prevProps.value) === getUserId(nextProps.value) &&\n prevProps.validatemessage === nextProps.validatemessage &&\n prevProps.required === nextProps.required &&\n prevProps.disabled === nextProps.disabled &&\n prevProps.readOnly === nextProps.readOnly\n );\n};\n\nexport default memo(UserReference, comparisonFn);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"UserReferenceUtils.d.ts","sourceRoot":"","sources":["../../../../src/components/field/UserReference/UserReferenceUtils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,uBAQrB,CAAC;AAEF,eAAO,MAAM,mBAAmB,oBAE/B,CAAC"}
1
+ {"version":3,"file":"UserReferenceUtils.d.ts","sourceRoot":"","sources":["../../../../src/components/field/UserReference/UserReferenceUtils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,GAAG,SAAI,WAQ5B,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAG,SAAI,QAEtC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"UserReferenceUtils.js","sourceRoot":"","sources":["../../../../src/components/field/UserReference/UserReferenceUtils.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE;IAC9B,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE;QAC5D,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;KACtB;SAAM,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,EAAE;QAC3C,MAAM,GAAG,IAAI,CAAC;KACf;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC,EAAE;IACxC,OAAO,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC;AACpE,CAAC,CAAC","sourcesContent":["export const getUserId = user => {\n let userId = '';\n if (typeof user === 'object' && user !== null && user.userId) {\n userId = user.userId;\n } else if (typeof user === 'string' && user) {\n userId = user;\n }\n return userId;\n};\n\nexport const isUserNameAvailable = user => {\n return typeof user === 'object' && user !== null && user.userName;\n};\n"]}
1
+ {"version":3,"file":"UserReferenceUtils.js","sourceRoot":"","sources":["../../../../src/components/field/UserReference/UserReferenceUtils.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE;IAC9B,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;QAC7D,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;SAAM,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,EAAE,CAAC;QAC5C,MAAM,GAAG,IAAI,CAAC;IAChB,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC,EAAE;IACxC,OAAO,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC;AACpE,CAAC,CAAC","sourcesContent":["export const getUserId = user => {\n let userId = '';\n if (typeof user === 'object' && user !== null && user.userId) {\n userId = user.userId;\n } else if (typeof user === 'string' && user) {\n userId = user;\n }\n return userId;\n};\n\nexport const isUserNameAvailable = user => {\n return typeof user === 'object' && user !== null && user.userName;\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"attachmentHelpers.d.ts","sourceRoot":"","sources":["../../../src/components/helpers/attachmentHelpers.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,YAAa,GAAG,eAAe,MAAM,KAAG,OAGnE,CAAC;AAEF,eAAO,MAAM,YAAY,8CAQxB,CAAC;AAEF,eAAO,MAAM,mBAAmB,qBAAe,MAyB9C,CAAC;AAEF,eAAO,MAAM,oBAAoB,WAAY,GAAG,cAAc,GAAG,KAAG,MAanE,CAAC;AAEF,eAAO,MAAM,0BAA0B,oBAEpC;IACD,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACpD,aAAa,EAAE,GAAG,CAAC;CAYpB,CAAC"}
1
+ {"version":3,"file":"attachmentHelpers.d.ts","sourceRoot":"","sources":["../../../src/components/helpers/attachmentHelpers.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,GAAI,SAAS,GAAG,EAAE,aAAa,MAAM,KAAG,OAGnE,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,SAAI,EAAE,aAAQ,EAAE,QAAG,SAQ/C,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,aAAQ,KAAG,MAyB9C,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,QAAQ,GAAG,EAAE,YAAY,GAAG,KAAG,MAanE,CAAC;AAEF,eAAO,MAAM,0BAA0B,GACrC,YAAO,KACN;IACD,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACpD,aAAa,EAAE,GAAG,CAAC;CAYpB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"attachmentHelpers.js","sourceRoot":"","sources":["../../../src/components/helpers/attachmentHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,OAAY,EAAE,WAAmB,EAAW,EAAE;IAC5E,MAAM,QAAQ,GAAG,CAAC,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IACrD,OAAO,UAAU,CAAC,QAAQ,CAAC,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;AACxD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAA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xC,IAAI,GAAG,cAAc,CAAC;SACvB;aAAM,IAAI,UAAU,CAAC,CAAC,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,EAAE;YAClE,IAAI,GAAG,mBAAmB,CAAC;SAC5B;KACF;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,MAAW,EAAE,UAAe,EAAU,EAAE;IAC3E,IAAI,IAAI,CAAC;IACT,QAAQ,UAAU,CAAC,IAAI,EAAE;QACvB,KAAK,MAAM;YACT,IAAI,GAAG,MAAM,CAAC,mBAAmB,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;YACvD,MAAM;QACR,KAAK,KAAK;YACR,IAAI,GAAG,OAAO,CAAC;YACf,MAAM;QACR;YACE,IAAI,GAAG,cAAc,CAAC;KACzB;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACxC,OAAO,EAIP,EAAE;IACF,OAAO;QACL,KAAK,EAAE;YACL,IAAI,EAAE,GAAG,OAAO,CAAC,cAAc,KAAK,OAAO,CAAC,gBAAgB,EAAE;YAC9D,IAAI,EAAE,OAAO,CAAC,YAAY;YAC1B,IAAI,EAAE,mBAAmB,CAAC,OAAO,CAAC,mBAAmB,CAAC;SACvD;QACD,aAAa,EAAE;YACb,GAAG,OAAO;SACX;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import download from 'downloadjs';\n\nexport const validateMaxSize = (fileObj: any, maxSizeInMB: string): boolean => {\n const fileSize = (fileObj.size / 1048576).toFixed(2);\n return parseFloat(fileSize) < parseFloat(maxSizeInMB);\n};\n\nexport const fileDownload = (data, fileName, ext) => {\n const name = ext ? `${fileName}.${ext}` : fileName;\n // Temp fix: downloading EMAIl type attachment as html file\n if (ext === 'html') {\n download(data, name, 'text/html');\n } else {\n download(atob(data), name);\n }\n};\n\nexport const getIconFromFileType = (fileType): string => {\n let icon = 'document-doc';\n if (!fileType) return icon;\n if (fileType.startsWith('audio')) {\n icon = 'audio';\n } else if (fileType.startsWith('video')) {\n icon = 'video';\n } else if (fileType.startsWith('image')) {\n icon = 'picture';\n } else if (fileType.includes('pdf')) {\n icon = 'document-pdf';\n } else {\n const [, subtype] = fileType.split('/');\n const foundMatch = sources => {\n return sources.some(key => subtype.includes(key));\n };\n\n if (foundMatch(['excel', 'spreadsheet'])) {\n icon = 'document-xls';\n } else if (foundMatch(['zip', 'compressed', 'gzip', 'rar', 'tar'])) {\n icon = 'document-compress';\n }\n }\n\n return icon;\n};\n\nexport const getIconForAttachment = (inThis: any, attachment: any): string => {\n let icon;\n switch (attachment.type) {\n case 'FILE':\n icon = inThis.getIconFromFileType(attachment.mimeType);\n break;\n case 'URL':\n icon = 'chain';\n break;\n default:\n icon = 'document-doc';\n }\n return icon;\n};\n\nexport const buildFilePropsFromResponse = (\n respObj\n): {\n props: { meta: string; name: string; icon: string };\n responseProps: any;\n} => {\n return {\n props: {\n meta: `${respObj.pyCategoryName}, ${respObj.pxCreateOperator}`,\n name: respObj.pyAttachName,\n icon: getIconFromFileType(respObj.pyMimeFileExtension)\n },\n responseProps: {\n ...respObj\n }\n };\n};\n"]}
1
+ {"version":3,"file":"attachmentHelpers.js","sourceRoot":"","sources":["../../../src/components/helpers/attachmentHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,OAAY,EAAE,WAAmB,EAAW,EAAE;IAC5E,MAAM,QAAQ,GAAG,CAAC,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IACrD,OAAO,UAAU,CAAC,QAAQ,CAAC,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;AACxD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAI,EAA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AU,CAAC,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC;YACzC,IAAI,GAAG,cAAc,CAAC;QACxB,CAAC;aAAM,IAAI,UAAU,CAAC,CAAC,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC;YACnE,IAAI,GAAG,mBAAmB,CAAC;QAC7B,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,MAAW,EAAE,UAAe,EAAU,EAAE;IAC3E,IAAI,IAAI,CAAC;IACT,QAAQ,UAAU,CAAC,IAAI,EAAE,CAAC;QACxB,KAAK,MAAM;YACT,IAAI,GAAG,MAAM,CAAC,mBAAmB,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;YACvD,MAAM;QACR,KAAK,KAAK;YACR,IAAI,GAAG,OAAO,CAAC;YACf,MAAM;QACR;YACE,IAAI,GAAG,cAAc,CAAC;IAC1B,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACxC,OAAO,EAIP,EAAE;IACF,OAAO;QACL,KAAK,EAAE;YACL,IAAI,EAAE,GAAG,OAAO,CAAC,cAAc,KAAK,OAAO,CAAC,gBAAgB,EAAE;YAC9D,IAAI,EAAE,OAAO,CAAC,YAAY;YAC1B,IAAI,EAAE,mBAAmB,CAAC,OAAO,CAAC,mBAAmB,CAAC;SACvD;QACD,aAAa,EAAE;YACb,GAAG,OAAO;SACX;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import download from 'downloadjs';\n\nexport const validateMaxSize = (fileObj: any, maxSizeInMB: string): boolean => {\n const fileSize = (fileObj.size / 1048576).toFixed(2);\n return parseFloat(fileSize) < parseFloat(maxSizeInMB);\n};\n\nexport const fileDownload = (data, fileName, ext) => {\n const name = ext ? `${fileName}.${ext}` : fileName;\n // Temp fix: downloading EMAIl type attachment as html file\n if (ext === 'html') {\n download(data, name, 'text/html');\n } else {\n download(atob(data), name);\n }\n};\n\nexport const getIconFromFileType = (fileType): string => {\n let icon = 'document-doc';\n if (!fileType) return icon;\n if (fileType.startsWith('audio')) {\n icon = 'audio';\n } else if (fileType.startsWith('video')) {\n icon = 'video';\n } else if (fileType.startsWith('image')) {\n icon = 'picture';\n } else if (fileType.includes('pdf')) {\n icon = 'document-pdf';\n } else {\n const [, subtype] = fileType.split('/');\n const foundMatch = sources => {\n return sources.some(key => subtype.includes(key));\n };\n\n if (foundMatch(['excel', 'spreadsheet'])) {\n icon = 'document-xls';\n } else if (foundMatch(['zip', 'compressed', 'gzip', 'rar', 'tar'])) {\n icon = 'document-compress';\n }\n }\n\n return icon;\n};\n\nexport const getIconForAttachment = (inThis: any, attachment: any): string => {\n let icon;\n switch (attachment.type) {\n case 'FILE':\n icon = inThis.getIconFromFileType(attachment.mimeType);\n break;\n case 'URL':\n icon = 'chain';\n break;\n default:\n icon = 'document-doc';\n }\n return icon;\n};\n\nexport const buildFilePropsFromResponse = (\n respObj\n): {\n props: { meta: string; name: string; icon: string };\n responseProps: any;\n} => {\n return {\n props: {\n meta: `${respObj.pyCategoryName}, ${respObj.pxCreateOperator}`,\n name: respObj.pyAttachName,\n icon: getIconFromFileType(respObj.pyMimeFileExtension)\n },\n responseProps: {\n ...respObj\n }\n };\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"case-utils.js","sourceRoot":"","sources":["../../../src/components/helpers/case-utils.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAE7E;;;;;;;;;;;;;;;GAeG;AAEH,SAAS,kBAAkB,CAAC,aAAa;IACvC,MAAM,QAAQ,GAAG,EAAE,CAAC;IAEpB,IAAI,aAAa,IAAI,aAAa,YAAY,KAAK,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE;QAC/E,aAAa,CAAC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7D,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QAC9C,MAAM,cAAc,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;QACjD,MAAM,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;QACjC,MAAM,oBAAoB,GAAG,GAAG,MAAM,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QACzF,OAAO,CAAC,IAAI,CACV,KAAC,WAAW,IACV,EAAE,EAAE,oBAAoB,EACxB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,cAAc,EACxB,SAAS,EACP,OAAO,KAAK,QAAQ;gBAClB,CAAC,CAAC,EAAE;gBACJ,CAAC,CAAC,GAAG,EAAE;oBACH,aAAa,CAAC;wBACZ,QAAQ,EAAE,IAAI;wBACd,IAAI;wBACJ,OAAO,EAAE,MAAM;qBACT,CAAC,CAAC;gBACZ,CAAC,GAEP,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,IAAI,YAAY,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE;QAC3C,OAAO,CAAC,IAAI,CAAC,KAAC,WAAW,IAAC,EAAE,EAAC,0BAA0B,EAAC,OAAO,EAAC,QAAQ,EAAC,QAAQ,EAAE,YAAY,GAAI,CAAC,CAAC;KACtG;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,CAAC","sourcesContent":["import { getComponentFromMap } from '../../bridge/helpers/sdk_component_map';\n\n/**\n * Function that accepts array of messages as input and group them by their type and returns the resulting object\n * @param {Array} inputMessages\n * Eg: [\n * {message: 'First Name is required', type: 'error'},\n * {message: 'Last Name is required', type: 'error'},\n * {message: 'Address field should be clear and precise', type: 'info'}\n * ]\n *\n * @returns {object}\n *\n * Eg: {\n * error: ['First Name is required', 'Last Name is required'],\n * info: ['Address field should be clear and precise']\n * }\n */\n\nfunction getMessagesGrouped(inputMessages) {\n const messages = {};\n\n if (inputMessages && inputMessages instanceof Array && inputMessages.length > 0) {\n inputMessages.forEach(item => {\n const { message, type } = item;\n messages[type] = [...(messages[type] || []), message];\n });\n }\n return messages;\n}\n\n/**\n * Function accepts a error type and variant of the banner\n * @param {string} type\n * Eg: 'error'\n * @returns {string}\n * Eg: 'urgent'\n */\nfunction getVariant(type) {\n const { BANNER_VARIANT_SUCCESS, BANNER_VARIANT_INFO, BANNER_VARIANT_URGENT, MESSAGES } = PCore.getConstants();\n const { MESSAGES_TYPE_ERROR, MESSAGES_TYPE_INFO, MESSAGES_TYPE_SUCCESS } = MESSAGES;\n\n let variant;\n switch (type) {\n case MESSAGES_TYPE_ERROR:\n variant = BANNER_VARIANT_URGENT;\n break;\n case MESSAGES_TYPE_INFO:\n variant = BANNER_VARIANT_INFO;\n break;\n case MESSAGES_TYPE_SUCCESS:\n variant = BANNER_VARIANT_SUCCESS;\n break;\n default:\n variant = '';\n }\n return variant;\n}\n\nfunction getBanners(config) {\n const AlertBanner = getComponentFromMap('AlertBanner');\n const { target, pageMessages, httpMessages } = config;\n const { PAGE } = PCore.getConstants();\n const { clearMessages } = PCore.getMessageManager();\n const banners: any = [];\n const groupedPageMessages = getMessagesGrouped(pageMessages);\n\n Object.keys(groupedPageMessages).forEach(type => {\n const messagesByType = groupedPageMessages[type];\n const variant = getVariant(type);\n const pageMessagesBannerID = `${target}_${PAGE}_${type}`.toLowerCase().replace('/', '_');\n banners.push(\n <AlertBanner\n id={pageMessagesBannerID}\n variant={variant}\n messages={messagesByType}\n onDismiss={\n variant === 'urgent'\n ? ''\n : () => {\n clearMessages({\n category: PAGE,\n type,\n context: target\n } as any);\n }\n }\n />\n );\n });\n\n if (httpMessages && httpMessages.length > 0) {\n banners.push(<AlertBanner id='modalViewContainerBanner' variant='urgent' messages={httpMessages} />);\n }\n\n return banners;\n}\n\nexport { getMessagesGrouped,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AAE,YAAY,GAAI,CAAC,CAAC;IACvG,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,CAAC","sourcesContent":["import { getComponentFromMap } from '../../bridge/helpers/sdk_component_map';\n\n/**\n * Function that accepts array of messages as input and group them by their type and returns the resulting object\n * @param {Array} inputMessages\n * Eg: [\n * {message: 'First Name is required', type: 'error'},\n * {message: 'Last Name is required', type: 'error'},\n * {message: 'Address field should be clear and precise', type: 'info'}\n * ]\n *\n * @returns {object}\n *\n * Eg: {\n * error: ['First Name is required', 'Last Name is required'],\n * info: ['Address field should be clear and precise']\n * }\n */\n\nfunction getMessagesGrouped(inputMessages) {\n const messages = {};\n\n if (inputMessages && inputMessages instanceof Array && inputMessages.length > 0) {\n inputMessages.forEach(item => {\n const { message, type } = item;\n messages[type] = [...(messages[type] || []), message];\n });\n }\n return messages;\n}\n\n/**\n * Function accepts a error type and variant of the banner\n * @param {string} type\n * Eg: 'error'\n * @returns {string}\n * Eg: 'urgent'\n */\nfunction getVariant(type) {\n const { BANNER_VARIANT_SUCCESS, BANNER_VARIANT_INFO, BANNER_VARIANT_URGENT, MESSAGES } = PCore.getConstants();\n const { MESSAGES_TYPE_ERROR, MESSAGES_TYPE_INFO, MESSAGES_TYPE_SUCCESS } = MESSAGES;\n\n let variant;\n switch (type) {\n case MESSAGES_TYPE_ERROR:\n variant = BANNER_VARIANT_URGENT;\n break;\n case MESSAGES_TYPE_INFO:\n variant = BANNER_VARIANT_INFO;\n break;\n case MESSAGES_TYPE_SUCCESS:\n variant = BANNER_VARIANT_SUCCESS;\n break;\n default:\n variant = '';\n }\n return variant;\n}\n\nfunction getBanners(config) {\n const AlertBanner = getComponentFromMap('AlertBanner');\n const { target, pageMessages, httpMessages } = config;\n const { PAGE } = PCore.getConstants();\n const { clearMessages } = PCore.getMessageManager();\n const banners: any = [];\n const groupedPageMessages = getMessagesGrouped(pageMessages);\n\n Object.keys(groupedPageMessages).forEach(type => {\n const messagesByType = groupedPageMessages[type];\n const variant = getVariant(type);\n const pageMessagesBannerID = `${target}_${PAGE}_${type}`.toLowerCase().replace('/', '_');\n banners.push(\n <AlertBanner\n id={pageMessagesBannerID}\n variant={variant}\n messages={messagesByType}\n onDismiss={\n variant === 'urgent'\n ? ''\n : () => {\n clearMessages({\n category: PAGE,\n type,\n context: target\n } as any);\n }\n }\n />\n );\n });\n\n if (httpMessages && httpMessages.length > 0) {\n banners.push(<AlertBanner id='modalViewContainerBanner' variant='urgent' messages={httpMessages} />);\n }\n\n return banners;\n}\n\nexport { getMessagesGrouped, getBanners };\n"]}
@@ -1,2 +1,9 @@
1
1
  export declare function isEmptyObject(obj: Object): boolean;
2
+ /**
3
+ * Get a localized value from the Generic Fields
4
+ * @param path - The path within Generic Fields (e.g., 'CosmosFields.fields.lists')
5
+ * @param key - The key of the string to localize
6
+ * @returns The localized string or the key itself if no translation is found
7
+ */
8
+ export declare function getGenericFieldsLocalizedValue(path: string, key: string): string;
2
9
  //# sourceMappingURL=common-utils.d.ts.map