@pega/react-sdk-components 0.25.1 → 0.25.3

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 (542) 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.d.ts.map +1 -1
  5. package/lib/bridge/helpers/sdk_component_map.js +0 -6
  6. package/lib/bridge/helpers/sdk_component_map.js.map +1 -1
  7. package/lib/bridge/react_pconnect.d.ts.map +1 -1
  8. package/lib/bridge/react_pconnect.js +11 -14
  9. package/lib/bridge/react_pconnect.js.map +1 -1
  10. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.map +1 -1
  11. package/lib/components/designSystemExtension/Banner/Banner.css +1 -1
  12. package/lib/components/designSystemExtension/Banner/Banner.js +2 -2
  13. package/lib/components/designSystemExtension/Banner/Banner.js.map +1 -1
  14. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
  15. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
  16. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +49 -34
  17. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
  18. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts.map +1 -1
  19. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +6 -8
  20. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
  21. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts +1 -1
  22. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
  23. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +3 -5
  24. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
  25. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js +2 -2
  26. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
  27. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts.map +1 -1
  28. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +4 -6
  29. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
  30. package/lib/components/designSystemExtension/Operator/Operator.d.ts +1 -1
  31. package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
  32. package/lib/components/designSystemExtension/Operator/Operator.js +12 -9
  33. package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
  34. package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +1 -1
  35. package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
  36. package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
  37. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -1
  38. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +28 -4
  39. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -1
  40. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.css +4 -4
  41. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js +1 -1
  42. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
  43. package/lib/components/field/AutoComplete/AutoComplete.d.ts +1 -1
  44. package/lib/components/field/AutoComplete/AutoComplete.d.ts.map +1 -1
  45. package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
  46. package/lib/components/field/CancelAlert/CancelAlert.css +4 -4
  47. package/lib/components/field/CancelAlert/CancelAlert.d.ts +1 -1
  48. package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
  49. package/lib/components/field/CancelAlert/CancelAlert.js +3 -3
  50. package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
  51. package/lib/components/field/Checkbox/Checkbox.d.ts +9 -1
  52. package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
  53. package/lib/components/field/Checkbox/Checkbox.js +52 -3
  54. package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
  55. package/lib/components/field/Currency/Currency.d.ts +1 -1
  56. package/lib/components/field/Currency/Currency.d.ts.map +1 -1
  57. package/lib/components/field/Currency/Currency.js +2 -2
  58. package/lib/components/field/Currency/Currency.js.map +1 -1
  59. package/lib/components/field/Currency/currency-utils.d.ts.map +1 -1
  60. package/lib/components/field/Currency/currency-utils.js +0 -2
  61. package/lib/components/field/Currency/currency-utils.js.map +1 -1
  62. package/lib/components/field/Date/Date.d.ts +1 -1
  63. package/lib/components/field/Date/Date.d.ts.map +1 -1
  64. package/lib/components/field/Date/Date.js +3 -6
  65. package/lib/components/field/Date/Date.js.map +1 -1
  66. package/lib/components/field/DateTime/DateTime.d.ts +1 -1
  67. package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
  68. package/lib/components/field/DateTime/DateTime.js +4 -7
  69. package/lib/components/field/DateTime/DateTime.js.map +1 -1
  70. package/lib/components/field/Decimal/Decimal.d.ts +1 -1
  71. package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
  72. package/lib/components/field/Decimal/Decimal.js +2 -4
  73. package/lib/components/field/Decimal/Decimal.js.map +1 -1
  74. package/lib/components/field/Dropdown/Dropdown.d.ts +1 -1
  75. package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
  76. package/lib/components/field/Dropdown/Dropdown.js +6 -9
  77. package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
  78. package/lib/components/field/Email/Email.d.ts +1 -1
  79. package/lib/components/field/Email/Email.d.ts.map +1 -1
  80. package/lib/components/field/Email/Email.js +6 -7
  81. package/lib/components/field/Email/Email.js.map +1 -1
  82. package/lib/components/field/Group/Group.d.ts +2 -2
  83. package/lib/components/field/Group/Group.d.ts.map +1 -1
  84. package/lib/components/field/Group/Group.js +2 -2
  85. package/lib/components/field/Group/Group.js.map +1 -1
  86. package/lib/components/field/Integer/Integer.d.ts +1 -1
  87. package/lib/components/field/Integer/Integer.d.ts.map +1 -1
  88. package/lib/components/field/Integer/Integer.js +4 -5
  89. package/lib/components/field/Integer/Integer.js.map +1 -1
  90. package/lib/components/field/Location/Location.d.ts +10 -0
  91. package/lib/components/field/Location/Location.d.ts.map +1 -0
  92. package/lib/components/field/Location/Location.js +157 -0
  93. package/lib/components/field/Location/Location.js.map +1 -0
  94. package/lib/components/field/Location/index.d.ts +2 -0
  95. package/lib/components/field/Location/index.d.ts.map +1 -0
  96. package/lib/components/field/Location/index.js +2 -0
  97. package/lib/components/field/Location/index.js.map +1 -0
  98. package/lib/components/field/Multiselect/Multiselect.js.map +1 -1
  99. package/lib/components/field/Multiselect/utils.d.ts +2 -1
  100. package/lib/components/field/Multiselect/utils.d.ts.map +1 -1
  101. package/lib/components/field/Multiselect/utils.js.map +1 -1
  102. package/lib/components/field/ObjectReference/ObjectReference.d.ts +16 -0
  103. package/lib/components/field/ObjectReference/ObjectReference.d.ts.map +1 -0
  104. package/lib/components/field/ObjectReference/ObjectReference.js +165 -0
  105. package/lib/components/field/ObjectReference/ObjectReference.js.map +1 -0
  106. package/lib/components/field/ObjectReference/index.d.ts +2 -0
  107. package/lib/components/field/ObjectReference/index.d.ts.map +1 -0
  108. package/lib/components/field/ObjectReference/index.js +2 -0
  109. package/lib/components/field/ObjectReference/index.js.map +1 -0
  110. package/lib/components/field/ObjectReference/utils.d.ts +17 -0
  111. package/lib/components/field/ObjectReference/utils.d.ts.map +1 -0
  112. package/lib/components/field/ObjectReference/utils.js +99 -0
  113. package/lib/components/field/ObjectReference/utils.js.map +1 -0
  114. package/lib/components/field/Percentage/Percentage.d.ts +1 -1
  115. package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
  116. package/lib/components/field/Percentage/Percentage.js +2 -5
  117. package/lib/components/field/Percentage/Percentage.js.map +1 -1
  118. package/lib/components/field/Phone/Phone.d.ts +1 -1
  119. package/lib/components/field/Phone/Phone.d.ts.map +1 -1
  120. package/lib/components/field/Phone/Phone.js +6 -4
  121. package/lib/components/field/Phone/Phone.js.map +1 -1
  122. package/lib/components/field/RadioButtons/RadioButtons.d.ts +8 -1
  123. package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
  124. package/lib/components/field/RadioButtons/RadioButtons.js +12 -1
  125. package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
  126. package/lib/components/field/RichText/RichText.d.ts +1 -1
  127. package/lib/components/field/RichText/RichText.d.ts.map +1 -1
  128. package/lib/components/field/RichText/RichText.js.map +1 -1
  129. package/lib/components/field/ScalarList/ScalarList.d.ts +1 -1
  130. package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -1
  131. package/lib/components/field/ScalarList/ScalarList.js +1 -2
  132. package/lib/components/field/ScalarList/ScalarList.js.map +1 -1
  133. package/lib/components/field/SelectableCard/SelectableCard.d.ts +2 -0
  134. package/lib/components/field/SelectableCard/SelectableCard.d.ts.map +1 -0
  135. package/lib/components/field/SelectableCard/SelectableCard.js +57 -0
  136. package/lib/components/field/SelectableCard/SelectableCard.js.map +1 -0
  137. package/lib/components/field/SelectableCard/index.d.ts +2 -0
  138. package/lib/components/field/SelectableCard/index.d.ts.map +1 -0
  139. package/lib/components/field/SelectableCard/index.js +2 -0
  140. package/lib/components/field/SelectableCard/index.js.map +1 -0
  141. package/lib/components/field/SelectableCard/utils.d.ts +14 -0
  142. package/lib/components/field/SelectableCard/utils.d.ts.map +1 -0
  143. package/lib/components/field/SelectableCard/utils.js +185 -0
  144. package/lib/components/field/SelectableCard/utils.js.map +1 -0
  145. package/lib/components/field/SemanticLink/SemanticLink.d.ts +10 -2
  146. package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
  147. package/lib/components/field/SemanticLink/SemanticLink.js +128 -15
  148. package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
  149. package/lib/components/field/SemanticLink/utils.js +1 -1
  150. package/lib/components/field/SemanticLink/utils.js.map +1 -1
  151. package/lib/components/field/TextArea/TextArea.d.ts +1 -1
  152. package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
  153. package/lib/components/field/TextArea/TextArea.js +4 -5
  154. package/lib/components/field/TextArea/TextArea.js.map +1 -1
  155. package/lib/components/field/TextContent/TextContent.d.ts +1 -1
  156. package/lib/components/field/TextContent/TextContent.d.ts.map +1 -1
  157. package/lib/components/field/TextContent/TextContent.js +0 -1
  158. package/lib/components/field/TextContent/TextContent.js.map +1 -1
  159. package/lib/components/field/TextInput/TextInput.d.ts +1 -1
  160. package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
  161. package/lib/components/field/TextInput/TextInput.js +4 -5
  162. package/lib/components/field/TextInput/TextInput.js.map +1 -1
  163. package/lib/components/field/Time/Time.d.ts +1 -1
  164. package/lib/components/field/Time/Time.d.ts.map +1 -1
  165. package/lib/components/field/Time/Time.js +2 -5
  166. package/lib/components/field/Time/Time.js.map +1 -1
  167. package/lib/components/field/URL/URL.d.ts +1 -1
  168. package/lib/components/field/URL/URL.d.ts.map +1 -1
  169. package/lib/components/field/URL/URL.js +4 -5
  170. package/lib/components/field/URL/URL.js.map +1 -1
  171. package/lib/components/field/UserReference/UserReference.d.ts +1 -2
  172. package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
  173. package/lib/components/field/UserReference/UserReference.js +0 -1
  174. package/lib/components/field/UserReference/UserReference.js.map +1 -1
  175. package/lib/components/field/UserReference/UserReferenceUtils.d.ts.map +1 -1
  176. package/lib/components/field/UserReference/UserReferenceUtils.js.map +1 -1
  177. package/lib/components/helpers/attachmentHelpers.d.ts +14 -11
  178. package/lib/components/helpers/attachmentHelpers.d.ts.map +1 -1
  179. package/lib/components/helpers/attachmentHelpers.js +52 -30
  180. package/lib/components/helpers/attachmentHelpers.js.map +1 -1
  181. package/lib/components/helpers/case-utils.js.map +1 -1
  182. package/lib/components/helpers/common-utils.d.ts +1 -1
  183. package/lib/components/helpers/common-utils.js.map +1 -1
  184. package/lib/components/helpers/data_page.d.ts.map +1 -1
  185. package/lib/components/helpers/data_page.js +0 -1
  186. package/lib/components/helpers/data_page.js.map +1 -1
  187. package/lib/components/helpers/date-format-utils.d.ts.map +1 -1
  188. package/lib/components/helpers/event-utils.d.ts.map +1 -1
  189. package/lib/components/helpers/event-utils.js.map +1 -1
  190. package/lib/components/helpers/field-group-utils.d.ts +1 -1
  191. package/lib/components/helpers/field-group-utils.d.ts.map +1 -1
  192. package/lib/components/helpers/field-group-utils.js.map +1 -1
  193. package/lib/components/helpers/formatters/Boolean.js.map +1 -1
  194. package/lib/components/helpers/formatters/Currency.js.map +1 -1
  195. package/lib/components/helpers/formatters/CurrencyMap.d.ts.map +1 -1
  196. package/lib/components/helpers/formatters/CurrencyMap.js +0 -1
  197. package/lib/components/helpers/formatters/CurrencyMap.js.map +1 -1
  198. package/lib/components/helpers/formatters/Date.js.map +1 -1
  199. package/lib/components/helpers/formatters/index.js.map +1 -1
  200. package/lib/components/helpers/instructions-utils.d.ts.map +1 -1
  201. package/lib/components/helpers/reactContextHelpers.d.ts +0 -1
  202. package/lib/components/helpers/reactContextHelpers.d.ts.map +1 -1
  203. package/lib/components/helpers/simpleTableHelpers.d.ts +15 -1
  204. package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
  205. package/lib/components/helpers/simpleTableHelpers.js +111 -5
  206. package/lib/components/helpers/simpleTableHelpers.js.map +1 -1
  207. package/lib/components/helpers/state-utils.d.ts.map +1 -1
  208. package/lib/components/helpers/state-utils.js.map +1 -1
  209. package/lib/components/helpers/template-utils.js.map +1 -1
  210. package/lib/components/helpers/utils.d.ts +1 -0
  211. package/lib/components/helpers/utils.d.ts.map +1 -1
  212. package/lib/components/helpers/utils.js +7 -1
  213. package/lib/components/helpers/utils.js.map +1 -1
  214. package/lib/components/helpers/versionHelpers.d.ts.map +1 -1
  215. package/lib/components/helpers/versionHelpers.js +0 -1
  216. package/lib/components/helpers/versionHelpers.js.map +1 -1
  217. package/lib/components/infra/ActionButtons/ActionButtons.d.ts.map +1 -1
  218. package/lib/components/infra/ActionButtons/ActionButtons.js +12 -7
  219. package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
  220. package/lib/components/infra/Assignment/Assignment.d.ts +2 -2
  221. package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
  222. package/lib/components/infra/Assignment/Assignment.js +1 -2
  223. package/lib/components/infra/Assignment/Assignment.js.map +1 -1
  224. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +2 -2
  225. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
  226. package/lib/components/infra/AssignmentCard/AssignmentCard.js.map +1 -1
  227. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +1 -2
  228. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
  229. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +13 -77
  230. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
  231. package/lib/components/infra/Containers/FlowContainer/helpers.d.ts.map +1 -1
  232. package/lib/components/infra/Containers/FlowContainer/helpers.js.map +1 -1
  233. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts +1 -1
  234. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts.map +1 -1
  235. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js +0 -1
  236. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js.map +1 -1
  237. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +1 -1
  238. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
  239. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +0 -2
  240. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
  241. package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts +0 -1
  242. package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts.map +1 -1
  243. package/lib/components/infra/Containers/SimpleView/helper.d.ts +0 -1
  244. package/lib/components/infra/Containers/SimpleView/helper.d.ts.map +1 -1
  245. package/lib/components/infra/Containers/SimpleView/helper.js.map +1 -1
  246. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +1 -1
  247. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
  248. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +3 -4
  249. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
  250. package/lib/components/infra/Containers/container-helpers.d.ts +1 -0
  251. package/lib/components/infra/Containers/container-helpers.d.ts.map +1 -1
  252. package/lib/components/infra/Containers/container-helpers.js +46 -1
  253. package/lib/components/infra/Containers/container-helpers.js.map +1 -1
  254. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +2 -2
  255. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
  256. package/lib/components/infra/DashboardFilter/DashboardFilter.js +0 -2
  257. package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
  258. package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -1
  259. package/lib/components/infra/DashboardFilter/filterUtils.js +2 -3
  260. package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
  261. package/lib/components/infra/DeferLoad/DeferLoad.d.ts +1 -1
  262. package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
  263. package/lib/components/infra/DeferLoad/DeferLoad.js +2 -4
  264. package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
  265. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +1 -1
  266. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
  267. package/lib/components/infra/ErrorBoundary/ErrorBoundary.js +0 -2
  268. package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
  269. package/lib/components/infra/MultiStep/MultiStep.css +8 -8
  270. package/lib/components/infra/MultiStep/MultiStep.d.ts +2 -2
  271. package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
  272. package/lib/components/infra/MultiStep/MultiStep.js +1 -1
  273. package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
  274. package/lib/components/infra/NavBar/NavBar.css +1 -1
  275. package/lib/components/infra/NavBar/NavBar.d.ts +1 -1
  276. package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
  277. package/lib/components/infra/NavBar/NavBar.js +4 -5
  278. package/lib/components/infra/NavBar/NavBar.js.map +1 -1
  279. package/lib/components/infra/Reference/Reference.d.ts +1 -1
  280. package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
  281. package/lib/components/infra/Reference/Reference.js +2 -3
  282. package/lib/components/infra/Reference/Reference.js.map +1 -1
  283. package/lib/components/infra/Region/Region.d.ts +1 -1
  284. package/lib/components/infra/Region/Region.d.ts.map +1 -1
  285. package/lib/components/infra/Region/Region.js.map +1 -1
  286. package/lib/components/infra/RootContainer/RootContainer.d.ts +2 -2
  287. package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
  288. package/lib/components/infra/RootContainer/RootContainer.js +0 -1
  289. package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
  290. package/lib/components/infra/Stages/Stages.d.ts +1 -1
  291. package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
  292. package/lib/components/infra/Stages/Stages.js.map +1 -1
  293. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +1 -1
  294. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
  295. package/lib/components/infra/View/View.d.ts +2 -2
  296. package/lib/components/infra/View/View.d.ts.map +1 -1
  297. package/lib/components/infra/View/View.js.map +1 -1
  298. package/lib/components/template/AdvancedSearch/AdvancedSearch.d.ts.map +1 -1
  299. package/lib/components/template/AdvancedSearch/AdvancedSearch.js +0 -1
  300. package/lib/components/template/AdvancedSearch/AdvancedSearch.js.map +1 -1
  301. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.d.ts +0 -1
  302. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.d.ts.map +1 -1
  303. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.js +2 -8
  304. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.js.map +1 -1
  305. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.d.ts.map +1 -1
  306. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.js +3 -5
  307. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.js.map +1 -1
  308. package/lib/components/template/AdvancedSearch/SearchGroups/hooks.js +0 -1
  309. package/lib/components/template/AdvancedSearch/SearchGroups/hooks.js.map +1 -1
  310. package/lib/components/template/AdvancedSearch/SearchGroups/utils.js.map +1 -1
  311. package/lib/components/template/AdvancedSearch/TemplateContext.d.ts +0 -1
  312. package/lib/components/template/AdvancedSearch/TemplateContext.d.ts.map +1 -1
  313. package/lib/components/template/AppShell/AppShell.css +1 -1
  314. package/lib/components/template/AppShell/AppShell.d.ts +2 -2
  315. package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
  316. package/lib/components/template/AppShell/AppShell.js +4 -9
  317. package/lib/components/template/AppShell/AppShell.js.map +1 -1
  318. package/lib/components/template/BannerPage/BannerPage.d.ts +2 -2
  319. package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
  320. package/lib/components/template/BannerPage/BannerPage.js.map +1 -1
  321. package/lib/components/template/CaseSummary/CaseSummary.d.ts +2 -2
  322. package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
  323. package/lib/components/template/CaseSummary/CaseSummary.js +0 -1
  324. package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
  325. package/lib/components/template/CaseView/CaseView.d.ts +2 -2
  326. package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
  327. package/lib/components/template/CaseView/CaseView.js +4 -5
  328. package/lib/components/template/CaseView/CaseView.js.map +1 -1
  329. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +1 -1
  330. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
  331. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +1 -1
  332. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
  333. package/lib/components/template/Confirmation/Confirmation.d.ts +2 -2
  334. package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
  335. package/lib/components/template/Confirmation/Confirmation.js +0 -1
  336. package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
  337. package/lib/components/template/DataReference/DataReference.d.ts +2 -2
  338. package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
  339. package/lib/components/template/DataReference/DataReference.js +8 -12
  340. package/lib/components/template/DataReference/DataReference.js.map +1 -1
  341. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.d.ts +1 -1
  342. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.d.ts.map +1 -1
  343. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.js.map +1 -1
  344. package/lib/components/template/DataReference/SearchForm.d.ts.map +1 -1
  345. package/lib/components/template/DataReference/SearchForm.js +3 -2
  346. package/lib/components/template/DataReference/SearchForm.js.map +1 -1
  347. package/lib/components/template/DataReference/utils.d.ts +4 -4
  348. package/lib/components/template/DataReference/utils.d.ts.map +1 -1
  349. package/lib/components/template/DataReference/utils.js +1 -1
  350. package/lib/components/template/DataReference/utils.js.map +1 -1
  351. package/lib/components/template/DefaultForm/DefaultForm.d.ts +2 -2
  352. package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
  353. package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
  354. package/lib/components/template/DefaultForm/utils/index.d.ts.map +1 -1
  355. package/lib/components/template/DefaultForm/utils/index.js.map +1 -1
  356. package/lib/components/template/Details/Details/Details.d.ts +1 -1
  357. package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
  358. package/lib/components/template/Details/Details/Details.js +2 -3
  359. package/lib/components/template/Details/Details/Details.js.map +1 -1
  360. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +2 -2
  361. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
  362. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
  363. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +1 -1
  364. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
  365. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +2 -3
  366. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
  367. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +1 -1
  368. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
  369. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +2 -3
  370. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
  371. package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts +1 -1
  372. package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts.map +1 -1
  373. package/lib/components/template/Details/DynamicTabs/DynamicTabs.js.map +1 -1
  374. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +1 -1
  375. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
  376. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +1 -2
  377. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
  378. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +2 -2
  379. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
  380. package/lib/components/template/InlineDashboard/InlineDashboard.js +2 -2
  381. package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
  382. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +2 -2
  383. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
  384. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js.map +1 -1
  385. package/lib/components/template/ListPage/ListPage.d.ts +1 -1
  386. package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
  387. package/lib/components/template/ListPage/ListPage.js.map +1 -1
  388. package/lib/components/template/ListView/DefaultViewMeta.js.map +1 -1
  389. package/lib/components/template/ListView/ListView.d.ts +1 -1
  390. package/lib/components/template/ListView/ListView.d.ts.map +1 -1
  391. package/lib/components/template/ListView/ListView.js +3 -14
  392. package/lib/components/template/ListView/ListView.js.map +1 -1
  393. package/lib/components/template/ListView/hooks.d.ts.map +1 -1
  394. package/lib/components/template/ListView/hooks.js +2 -5
  395. package/lib/components/template/ListView/hooks.js.map +1 -1
  396. package/lib/components/template/ListView/utils.d.ts.map +1 -1
  397. package/lib/components/template/ListView/utils.js +0 -1
  398. package/lib/components/template/ListView/utils.js.map +1 -1
  399. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +1 -1
  400. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
  401. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -1
  402. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +2 -2
  403. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -1
  404. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js.map +1 -1
  405. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +1 -1
  406. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
  407. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +2 -3
  408. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
  409. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +2 -2
  410. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -1
  411. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js.map +1 -1
  412. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +2 -2
  413. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
  414. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -1
  415. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +2 -2
  416. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
  417. package/lib/components/template/OneColumn/OneColumn/OneColumn.js +2 -2
  418. package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
  419. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +1 -1
  420. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
  421. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -1
  422. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +2 -2
  423. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
  424. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js.map +1 -1
  425. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +1 -1
  426. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
  427. package/lib/components/template/PromotedFilters/PromotedFilters.js +0 -1
  428. package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
  429. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts +1 -1
  430. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
  431. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js +1 -2
  432. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
  433. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +2 -2
  434. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
  435. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +33 -31
  436. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
  437. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +1 -1
  438. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
  439. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
  440. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +1 -1
  441. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
  442. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
  443. package/lib/components/template/SubTabs/SubTabs.d.ts +2 -2
  444. package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
  445. package/lib/components/template/SubTabs/SubTabs.js.map +1 -1
  446. package/lib/components/template/SubTabs/tabUtils.d.ts.map +1 -1
  447. package/lib/components/template/SubTabs/tabUtils.js.map +1 -1
  448. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts +2 -2
  449. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
  450. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +2 -3
  451. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
  452. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +1 -1
  453. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
  454. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -1
  455. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +2 -2
  456. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
  457. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +2 -3
  458. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
  459. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +2 -2
  460. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
  461. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js.map +1 -1
  462. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +1 -1
  463. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
  464. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +2 -3
  465. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
  466. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +2 -2
  467. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -1
  468. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js.map +1 -1
  469. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +2 -2
  470. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
  471. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js.map +1 -1
  472. package/lib/components/template/WssNavBar/WssNavBar.css +1 -1
  473. package/lib/components/template/WssNavBar/WssNavBar.d.ts +1 -1
  474. package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -1
  475. package/lib/components/template/WssNavBar/WssNavBar.js +3 -3
  476. package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
  477. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts +1 -1
  478. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
  479. package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
  480. package/lib/components/widget/Attachment/Attachment.css +6 -8
  481. package/lib/components/widget/Attachment/Attachment.d.ts +1 -1
  482. package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
  483. package/lib/components/widget/Attachment/Attachment.js +52 -51
  484. package/lib/components/widget/Attachment/Attachment.js.map +1 -1
  485. package/lib/components/widget/CaseHistory/CaseHistory.d.ts +1 -1
  486. package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
  487. package/lib/components/widget/CaseHistory/CaseHistory.js +2 -2
  488. package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
  489. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.css +0 -14
  490. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +1 -1
  491. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts.map +1 -1
  492. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js +1 -1
  493. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
  494. package/lib/components/widget/FileUtility/FileUtility/FileUtility.css +7 -6
  495. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +1 -1
  496. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
  497. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +9 -10
  498. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
  499. package/lib/components/widget/Followers/Followers.d.ts +2 -2
  500. package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
  501. package/lib/components/widget/Followers/Followers.js +0 -2
  502. package/lib/components/widget/Followers/Followers.js.map +1 -1
  503. package/lib/components/widget/QuickCreate/QuickCreate.d.ts +1 -1
  504. package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
  505. package/lib/components/widget/QuickCreate/QuickCreate.js +0 -1
  506. package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
  507. package/lib/components/widget/SummaryItem/SummaryItem.css +9 -11
  508. package/lib/components/widget/SummaryItem/SummaryItem.d.ts +1 -1
  509. package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
  510. package/lib/components/widget/SummaryItem/SummaryItem.js +1 -1
  511. package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
  512. package/lib/components/widget/SummaryList/SummaryList.d.ts +1 -1
  513. package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
  514. package/lib/components/widget/SummaryList/SummaryList.js.map +1 -1
  515. package/lib/components/widget/ToDo/ToDo.css +1 -13
  516. package/lib/components/widget/ToDo/ToDo.d.ts +1 -1
  517. package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
  518. package/lib/components/widget/ToDo/ToDo.js +14 -8
  519. package/lib/components/widget/ToDo/ToDo.js.map +1 -1
  520. package/lib/hooks/useAfterInitialEffect.d.ts +1 -1
  521. package/lib/hooks/useAfterInitialEffect.d.ts.map +1 -1
  522. package/lib/hooks/useAfterInitialEffect.js.map +1 -1
  523. package/lib/hooks/useConsolidatedRef.d.ts +1 -1
  524. package/lib/hooks/useConsolidatedRef.d.ts.map +1 -1
  525. package/lib/hooks/useConsolidatedRef.js.map +1 -1
  526. package/lib/hooks/useFocusFirstField.d.ts.map +1 -1
  527. package/lib/hooks/useFocusFirstField.js.map +1 -1
  528. package/lib/hooks/useGetTabsCount.d.ts +0 -1
  529. package/lib/hooks/useGetTabsCount.d.ts.map +1 -1
  530. package/lib/hooks/useGetTabsCount.js +2 -3
  531. package/lib/hooks/useGetTabsCount.js.map +1 -1
  532. package/lib/hooks/useScrolltoTop.d.ts.map +1 -1
  533. package/lib/sdk-pega-component-map.d.ts +112 -106
  534. package/lib/sdk-pega-component-map.d.ts.map +1 -1
  535. package/lib/sdk-pega-component-map.js +9 -2
  536. package/lib/sdk-pega-component-map.js.map +1 -1
  537. package/lib/theme.d.ts +23 -0
  538. package/lib/theme.d.ts.map +1 -1
  539. package/lib/theme.js +189 -2
  540. package/lib/theme.js.map +1 -1
  541. package/lib/types/PConnProps.d.ts +1 -1
  542. package/package.json +16 -14
@@ -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,eAAe,CAAC;AAE1C,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,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AO,EAAC,SAAS,GAAG,CAAC;KACzF;IAED,IAAI,QAAQ,EAAE;QACZ,YAAY,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;KACnC;IAED,IAAI,QAAQ,GAAG,EAAE,CAAC;IAElB,QAAQ,GAAG;QACT,cAAc,EAAE,MAAM;KACvB,CAAC;IAEF,SAAS,YAAY,CAAC,KAAK;QACzB,wBAAwB;QACxB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IACtC,CAAC;IAED,SAAS,UAAU;QACjB,WAAW,CAAC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;IAC5D,CAAC;IAED,OAAO,CACL,KAAC,SAAS,IACR,SAAS,QACT,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,EAC3C,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,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 '@mui/material';\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 === '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 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,OAA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C,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAC,SAAS,GAAG,CAAC;IAC1F,CAAC;IAED,IAAI,QAAQ,EAAE,CAAC;QACb,YAAY,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACpC,CAAC;IAED,MAAM,SAAS,GAAQ,EAAE,cAAc,EAAE,MAAM,EAAE,CAAC;IAElD,SAAS,YAAY,CAAC,KAAK;QACzB,wBAAwB;QACxB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IACtC,CAAC;IAED,SAAS,UAAU;QACjB,WAAW,CAAC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;IAC5D,CAAC;IAED,OAAO,CACL,KAAC,SAAS,IACR,SAAS,QACT,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,EAC3C,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,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":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,UAAU,SAAU,SAAQ,eAAe;CAE1C;AAED,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAK,EAAE,SAAS,2CAsE5C"}
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"}
@@ -22,10 +22,7 @@ export default function Time(props) {
22
22
  if (readOnly) {
23
23
  return _jsx(TextInput, { ...props });
24
24
  }
25
- let testProp = {};
26
- testProp = {
27
- 'data-test-id': testId
28
- };
25
+ const testProps = { 'data-test-id': testId };
29
26
  const handleChange = date => {
30
27
  const theValue = date && date.isValid() ? date.format('HH:mm:ss') : null;
31
28
  handleEvent(actions, 'changeNblur', propName, theValue);
@@ -56,7 +53,7 @@ export default function Time(props) {
56
53
  error: status === 'error',
57
54
  helperText: helperTextToDisplay,
58
55
  size: 'small',
59
- InputProps: { ...testProp }
56
+ InputProps: { ...testProps }
60
57
  }
61
58
  } }));
62
59
  }
@@ -1 +1 @@
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,CAA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mui/icons-material/AccessTime';\nimport dayjs from 'dayjs';\n\nimport handleEvent from '../../helpers/event-utils';\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 { 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 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: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: { ...testProp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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":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,UAAU,iBAAkB,SAAQ,eAAe;CAElD;AAKD,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CA4E5D"}
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"}
@@ -28,16 +28,15 @@ export default function URLComponent(props) {
28
28
  if (readOnly) {
29
29
  return _jsx(TextInput, { ...props });
30
30
  }
31
- let testProp = {};
32
- testProp = {
33
- 'data-test-id': testId
34
- };
31
+ const testProps = { 'data-test-id': testId };
35
32
  const handleChange = event => {
36
33
  setInputValue(event?.target?.value);
37
34
  };
38
35
  function handleBlur() {
39
36
  handleEvent(actions, 'changeNblur', propName, inputValue);
40
37
  }
41
- 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, InputProps: { inputProps: { ...testProp } } }));
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
+ } }));
42
41
  }
43
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,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,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAC7D,MAAM,SAAS,GAAG,mBAAmB,CAAC,WAAW,CAAC,CAAC;IAEnD,MAAM,EACJ,WAAW,EACX,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,KAAK,GAAG,EAAE,EACV,eAAe,EACf,MAAM,EACN,QAAQ,EACR,MAAM,EACN,UAAU,EACV,WAAW,EACX,SAAS,EACT,WAAW,EACZ,GAAG,KAAK,CAAC;IACV,MAAM,mBAAmB,GA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AAC,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,UAAU,EAAE,EAAE,UAAU,EAAE,EAAE,GAAG,QAAQ,EAAE,EAAE,GAC3C,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 { 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 let testProp = {};\n\n testProp = {\n 'data-test-id': testId\n };\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 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,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAC7D,MAAM,SAAS,GAAG,mBAAmB,CAAC,WAAW,CAAC,CAAC;IAEnD,MAAM,EACJ,WAAW,EACX,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,KAAK,GAAG,EAAE,EACV,eAAe,EACf,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,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,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AI,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;;AAwKD,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;AAqKhD,wBAAiD"}
@@ -47,7 +47,6 @@ const UserReference = (props) => {
47
47
  setDropDownDataSource(ddDataSource);
48
48
  })
49
49
  .catch(err => {
50
- // eslint-disable-next-line no-console
51
50
  console.error(err);
52
51
  });
53
52
  }
@@ -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,eAA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,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 { 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
+ {"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,EACX,KAAK,GAAG,EAAE,EACV,MAAM,GAAG,EAAE,EACX,UA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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 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,13 +1,16 @@
1
- export declare const validateMaxSize: (fileObj: any, maxSizeInMB: string) => boolean;
2
- export declare const fileDownload: (data: any, fileName: any, ext: any) => void;
1
+ export declare const isContentBinary: (headers: any) => any;
2
+ export declare const isContentBase64: (headers: any) => any;
3
+ export declare const fileDownload: (data: any, fileName: any, ext: any, headers: any) => void;
4
+ export declare const fileDownloadVar: (content: any, type: any, name: any, extension: any) => void;
5
+ export declare const useFileDownload: (context: any) => ({ ID, name, extension, type, category, responseType }: {
6
+ ID: any;
7
+ name: any;
8
+ extension: any;
9
+ type: any;
10
+ category: any;
11
+ responseType: any;
12
+ }) => void;
3
13
  export declare const getIconFromFileType: (fileType: any) => string;
4
- export declare const getIconForAttachment: (inThis: any, attachment: any) => string;
5
- export declare const buildFilePropsFromResponse: (respObj: any) => {
6
- props: {
7
- meta: string;
8
- name: string;
9
- icon: string;
10
- };
11
- responseProps: any;
12
- };
14
+ export declare const validateMaxSize: (fileObj: any, maxSizeInMB: string) => boolean;
15
+ export declare const isFileUploadedToServer: (file: any) => any;
13
16
  //# sourceMappingURL=attachmentHelpers.d.ts.map
@@ -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":"AAGA,eAAO,MAAM,eAAe,GAAG,YAAO,QAErC,CAAC;AAEF,eAAO,MAAM,eAAe,GAAG,YAAO,QAErC,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,SAAI,EAAE,aAAQ,EAAE,QAAG,EAAE,YAAO,SAUxD,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,YAAO,EAAE,SAAI,EAAE,SAAI,EAAE,cAAS,SAa7D,CAAC;AAEF,eAAO,MAAM,eAAe,GAAG,YAAO;;;;;;;UAwBrC,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,aAAQ,KAAG,MAyB9C,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,SAAS,GAAG,EAAE,aAAa,MAAM,KAAG,OAGnE,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAG,SAAI,QAAkE,CAAC"}
@@ -1,18 +1,61 @@
1
+ import { useCallback } from 'react';
1
2
  import download from 'downloadjs';
2
- export const validateMaxSize = (fileObj, maxSizeInMB) => {
3
- const fileSize = (fileObj.size / 1048576).toFixed(2);
4
- return parseFloat(fileSize) < parseFloat(maxSizeInMB);
3
+ export const isContentBinary = headers => {
4
+ return headers && headers['content-transfer-encoding'] === 'binary';
5
5
  };
6
- export const fileDownload = (data, fileName, ext) => {
6
+ export const isContentBase64 = headers => {
7
+ return headers && headers['content-transfer-encoding'] === 'base64';
8
+ };
9
+ export const fileDownload = (data, fileName, ext, headers) => {
7
10
  const name = ext ? `${fileName}.${ext}` : fileName;
8
11
  // Temp fix: downloading EMAIl type attachment as html file
9
12
  if (ext === 'html') {
10
- download(data, name, 'text/html');
13
+ download(isContentBase64(headers) ? atob(data) : data, name, 'text/html');
14
+ }
15
+ else if (isContentBinary(headers)) {
16
+ download(data, name);
11
17
  }
12
18
  else {
13
19
  download(atob(data), name);
14
20
  }
15
21
  };
22
+ export const fileDownloadVar = (content, type, name, extension) => {
23
+ if (type === 'FILE' || type === undefined) {
24
+ fileDownload(content.data, name, extension, content.headers);
25
+ }
26
+ else if (type === 'URL') {
27
+ let { data } = content;
28
+ if (!/^(http|https):\/\//.test(data)) {
29
+ data = `//${data}`;
30
+ }
31
+ window.open(content.data, '_blank');
32
+ }
33
+ else if (type === 'EMAIL') {
34
+ // Temp Fix: for EMAIL type attachment
35
+ fileDownload(content.data, name, 'html', content.headers);
36
+ }
37
+ };
38
+ export const useFileDownload = context => {
39
+ return useCallback(({ ID, name, extension, type, category, responseType }) => {
40
+ if (category !== 'pxDocument') {
41
+ PCore.getAttachmentUtils()
42
+ .downloadAttachment(ID, context, responseType)
43
+ .then(content => {
44
+ fileDownloadVar(content, type, name, extension);
45
+ })
46
+ .catch(console.error);
47
+ }
48
+ else {
49
+ PCore.getAttachmentUtils()
50
+ // @ts-expect-error
51
+ .downloadDocument(ID, context, responseType)
52
+ .then(content => {
53
+ fileDownloadVar(content, type, name, extension);
54
+ })
55
+ .catch(console.error);
56
+ }
57
+ }, [context]);
58
+ };
16
59
  export const getIconFromFileType = (fileType) => {
17
60
  let icon = 'document-doc';
18
61
  if (!fileType)
@@ -43,30 +86,9 @@ export const getIconFromFileType = (fileType) => {
43
86
  }
44
87
  return icon;
45
88
  };
46
- export const getIconForAttachment = (inThis, attachment) => {
47
- let icon;
48
- switch (attachment.type) {
49
- case 'FILE':
50
- icon = inThis.getIconFromFileType(attachment.mimeType);
51
- break;
52
- case 'URL':
53
- icon = 'chain';
54
- break;
55
- default:
56
- icon = 'document-doc';
57
- }
58
- return icon;
59
- };
60
- export const buildFilePropsFromResponse = (respObj) => {
61
- return {
62
- props: {
63
- meta: `${respObj.pyCategoryName}, ${respObj.pxCreateOperator}`,
64
- name: respObj.pyAttachName,
65
- icon: getIconFromFileType(respObj.pyMimeFileExtension)
66
- },
67
- responseProps: {
68
- ...respObj
69
- }
70
- };
89
+ export const validateMaxSize = (fileObj, maxSizeInMB) => {
90
+ const fileSize = (fileObj.size / 1048576).toFixed(2);
91
+ return parseFloat(fileSize) < parseFloat(maxSizeInMB);
71
92
  };
93
+ export const isFileUploadedToServer = file => file.responseProps && !file.responseProps.ID?.includes('temp');
72
94
  //# sourceMappingURL=attachmentHelpers.js.map
@@ -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,CAA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AO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;QACpD,CAAC,CAAC;QAEF,IAAI,UAAU,CAAC,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC,EAAE;YACxC,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,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,MAAM,CAAC,MAAM,eAAe,GAAG,OAAO,CAAC,EAAE;IACvC,OAAO,OAAO,IAAI,OAAO,CAAC,2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AAM,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,sBAAsB,GAAG,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,aAAa,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC","sourcesContent":["import { useCallback } from 'react';\nimport download from 'downloadjs';\n\nexport const isContentBinary = headers => {\n return headers && headers['content-transfer-encoding'] === 'binary';\n};\n\nexport const isContentBase64 = headers => {\n return headers && headers['content-transfer-encoding'] === 'base64';\n};\n\nexport const fileDownload = (data, fileName, ext, headers) => {\n const name = ext ? `${fileName}.${ext}` : fileName;\n // Temp fix: downloading EMAIl type attachment as html file\n if (ext === 'html') {\n download(isContentBase64(headers) ? atob(data) : data, name, 'text/html');\n } else if (isContentBinary(headers)) {\n download(data, name);\n } else {\n download(atob(data), name);\n }\n};\n\nexport const fileDownloadVar = (content, type, name, extension) => {\n if (type === 'FILE' || type === undefined) {\n fileDownload(content.data, name, extension, content.headers);\n } else if (type === 'URL') {\n let { data } = content;\n if (!/^(http|https):\\/\\//.test(data)) {\n data = `//${data}`;\n }\n window.open(content.data, '_blank');\n } else if (type === 'EMAIL') {\n // Temp Fix: for EMAIL type attachment\n fileDownload(content.data, name, 'html', content.headers);\n }\n};\n\nexport const useFileDownload = context => {\n return useCallback(\n ({ ID, name, extension, type, category, responseType }) => {\n if (category !== 'pxDocument') {\n PCore.getAttachmentUtils()\n .downloadAttachment(ID, context, responseType)\n .then(content => {\n fileDownloadVar(content, type, name, extension);\n })\n\n .catch(console.error);\n } else {\n PCore.getAttachmentUtils()\n // @ts-expect-error\n .downloadDocument(ID, context, responseType)\n .then(content => {\n fileDownloadVar(content, type, name, extension);\n })\n\n .catch(console.error);\n }\n },\n [context]\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 validateMaxSize = (fileObj: any, maxSizeInMB: string): boolean => {\n const fileSize = (fileObj.size / 1048576).toFixed(2);\n return parseFloat(fileSize) < parseFloat(maxSizeInMB);\n};\n\nexport const isFileUploadedToServer = file => file.responseProps && !file.responseProps.ID?.includes('temp');\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,OAAO,CAAC,IAAI,CAAC,EAAE;YAC3B,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;YAC/B,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC;QACxD,CAAC,CAAC,CAAC;KACJ;IACD,OAAO,QA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AAC,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, getBanners };\n"]}
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,a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AE,CAAC;IACpD,MAAM,OAAO,GAAQ,EAAE,CAAC;IACxB,MAAM,mBAAmB,GAAG,kBAAkB,CAAC,YAAY,CAAC,CAAC;IAE7D,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,CAAC;QAC5C,OAAO,CAAC,IAAI,CAAC,KAAC,WAAW,IAAC,EAAE,EAAC,0BAA0B,EAAC,OAAO,EAAC,QAAQ,EAAC,QAAQ,EAAE,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,4 +1,4 @@
1
- export declare function isEmptyObject(obj: Object): boolean;
1
+ export declare function isEmptyObject(obj: object): boolean;
2
2
  /**
3
3
  * Get a localized value from the Generic Fields
4
4
  * @param path - The path within Generic Fields (e.g., 'CosmosFields.fields.lists')
@@ -1 +1 @@
1
- {"version":3,"file":"common-utils.js","sourceRoot":"","sources":["../../../src/components/helpers/common-utils.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;AACvC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,8BAA8B,CAAC,IAAY,EAAE,GAAW;IACtE,MAAM,kBAAkB,GAAG,KAAK,CAAC,cAAc,EAAE,CAAC,kBAAkB,CAAC;IACrE,MAAM,WAAW,GAAG,KAAK,CAAC,cAAc,EAAE,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC;IAE3E,IAAI,CAAC,WAAW;QAAE,OAAO,GAAG,CAAC;IAE7B,yCAAyC;IACzC,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAClC,IAAI,UAAU,GAAG,WAAW,CAAC;IAE7B,KAAK,MAAM,IAAI,IAAI,SAAS,EAAE;QAC5B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;YAAE,OAAO,GAAG,CAAC;QAClC,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;KAC/B;IAED,OAAO,UAAU,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC;AAChC,CAAC","sourcesContent":["export function isEmptyObject(obj: Object): boolean {\n return Object.keys(obj).length === 0;\n}\n\n/**\n * Get a localized value from the Generic Fields\n * @param path - The path within Generic Fields (e.g., 'CosmosFields.fields.lists')\n * @param key - The key of the string to localize\n * @returns The localized string or the key itself if no translation is found\n */\nexport function getGenericFieldsLocalizedValue(path: string, key: string): string {\n const GENERIC_BUNDLE_KEY = PCore.getLocaleUtils().GENERIC_BUNDLE_KEY;\n const localeStore = PCore.getLocaleUtils().localeStore[GENERIC_BUNDLE_KEY];\n\n if (!localeStore) return key;\n\n // Split the path and traverse the object\n const pathParts = path.split('.');\n let currentObj = localeStore;\n\n for (const part of pathParts) {\n if (!currentObj[part]) return key;\n currentObj = currentObj[part];\n }\n\n return currentObj[key] || key;\n}\n"]}
1
+ {"version":3,"file":"common-utils.js","sourceRoot":"","sources":["../../../src/components/helpers/common-utils.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;AACvC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,8BAA8B,CAAC,IAAY,EAAE,GAAW;IACtE,MAAM,kBAAkB,GAAG,KAAK,CAAC,cAAc,EAAE,CAAC,kBAAkB,CAAC;IACrE,MAAM,WAAW,GAAG,KAAK,CAAC,cAAc,EAAE,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC;IAE3E,IAAI,CAAC,WAAW;QAAE,OAAO,GAAG,CAAC;IAE7B,yCAAyC;IACzC,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAClC,IAAI,UAAU,GAAQ,WAAW,CAAC;IAElC,KAAK,MAAM,IAAI,IAAI,SAAS,EAAE,CAAC;QAC7B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;YAAE,OAAO,GAAG,CAAC;QAClC,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAED,OAAO,UAAU,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC;AAChC,CAAC","sourcesContent":["export function isEmptyObject(obj: object): boolean {\n return Object.keys(obj).length === 0;\n}\n\n/**\n * Get a localized value from the Generic Fields\n * @param path - The path within Generic Fields (e.g., 'CosmosFields.fields.lists')\n * @param key - The key of the string to localize\n * @returns The localized string or the key itself if no translation is found\n */\nexport function getGenericFieldsLocalizedValue(path: string, key: string): string {\n const GENERIC_BUNDLE_KEY = PCore.getLocaleUtils().GENERIC_BUNDLE_KEY;\n const localeStore = PCore.getLocaleUtils().localeStore[GENERIC_BUNDLE_KEY];\n\n if (!localeStore) return key;\n\n // Split the path and traverse the object\n const pathParts = path.split('.');\n let currentObj: any = localeStore;\n\n for (const part of pathParts) {\n if (!currentObj[part]) return key;\n currentObj = currentObj[part];\n }\n\n return currentObj[key] || key;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"data_page.d.ts","sourceRoot":"","sources":["../../../src/components/helpers/data_page.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,WAAW,wEAmBvB,CAAC"}
1
+ {"version":3,"file":"data_page.d.ts","sourceRoot":"","sources":["../../../src/components/helpers/data_page.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,GAAI,iBAAY,EAAE,eAAU,EAAE,YAAO,qBAmB5D,CAAC"}
@@ -1,4 +1,3 @@
1
- // eslint-disable-next-line import/prefer-default-export
2
1
  export const getDataPage = (dataPageName, parameters, context) => {
3
2
  let dataViewParams;
4
3
  if (parameters) {
@@ -1 +1 @@
1
- {"version":3,"file":"data_page.js","sourceRoot":"","sources":["../../../src/components/helpers/data_page.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,YAAY,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE;IAC/D,IAAI,cAAc,CAAC;IACnB,IAAI,UAAU,EAAE;QACd,cAAc,GAAG;YACf,kBAAkB,EAAE,UAAU;SAC/B,CAAC;KACH;IACD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACpC,KAAK,CAAC,eAAe,EAAE,CAAC,OAAO,CAAC,YAAY,EAAE,cAAc,EAAE,OAAO,CAAS;aAC5E,IAAI,CAAC,QAAQ,CAAC,EAAE;YACf,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC9B,CAAC,CAAC;aACD,KAAK,CAAC,CAAC,CAAC,EAAE;YACT,IAAI,CAAC,EAAE;gBACL,8FAA8F;gBAC9F,MAAM,CAAC,CAAC,CAAC,CAAC;aACX;QACH,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["// eslint-disable-next-line import/prefer-default-export\nexport const getDataPage = (dataPageName, parameters, context) => {\n let dataViewParams;\n if (parameters) {\n dataViewParams = {\n dataViewParameters: parameters\n };\n }\n return new Promise((resolve, reject) => {\n (PCore.getDataApiUtils().getData(dataPageName, dataViewParams, context) as any)\n .then(response => {\n resolve(response.data.data);\n })\n .catch(e => {\n if (e) {\n // check specific error if 401, and wiped out if so stored token is stale. Fetcch new tokens.\n reject(e);\n }\n });\n });\n};\n"]}
1
+ {"version":3,"file":"data_page.js","sourceRoot":"","sources":["../../../src/components/helpers/data_page.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,YAAY,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE;IAC/D,IAAI,cAAc,CAAC;IACnB,IAAI,UAAU,EAAE,CAAC;QACf,cAAc,GAAG;YACf,kBAAkB,EAAE,UAAU;SAC/B,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACpC,KAAK,CAAC,eAAe,EAAE,CAAC,OAAO,CAAC,YAAY,EAAE,cAAc,EAAE,OAAO,CAAS;aAC5E,IAAI,CAAC,QAAQ,CAAC,EAAE;YACf,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC9B,CAAC,CAAC;aACD,KAAK,CAAC,CAAC,CAAC,EAAE;YACT,IAAI,CAAC,EAAE,CAAC;gBACN,8FAA8F;gBAC9F,MAAM,CAAC,CAAC,CAAC,CAAC;YACZ,CAAC;QACH,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["export const getDataPage = (dataPageName, parameters, context) => {\n let dataViewParams;\n if (parameters) {\n dataViewParams = {\n dataViewParameters: parameters\n };\n }\n return new Promise((resolve, reject) => {\n (PCore.getDataApiUtils().getData(dataPageName, dataViewParams, context) as any)\n .then(response => {\n resolve(response.data.data);\n })\n .catch(e => {\n if (e) {\n // check specific error if 401, and wiped out if so stored token is stale. Fetcch new tokens.\n reject(e);\n }\n });\n });\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"date-format-utils.d.ts","sourceRoot":"","sources":["../../../src/components/helpers/date-format-utils.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,qBAAqB;;;;;CAKjC,CAAC;AAEF,eAAO,MAAM,iBAAiB,QAAO,4BAkEpC,CAAC"}
1
+ {"version":3,"file":"date-format-utils.d.ts","sourceRoot":"","sources":["../../../src/components/helpers/date-format-utils.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,qBAAqB;;;;;CAKjC,CAAC;AAEF,eAAO,MAAM,iBAAiB,QAAO,OAAO,qBAkE3C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"event-utils.d.ts","sourceRoot":"","sources":["../../../src/components/helpers/event-utils.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,WAAW,YAAa,GAAG,aAAa,MAAM,YAAY,MAAM,SAAS,MAAM,SAepF,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"event-utils.d.ts","sourceRoot":"","sources":["../../../src/components/helpers/event-utils.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,WAAW,GAAI,SAAS,GAAG,EAAE,WAAW,MAAM,EAAE,UAAU,MAAM,EAAE,OAAO,MAAM,SAepF,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"event-utils.js","sourceRoot":"","sources":["../../../src/components/helpers/event-utils.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAE9C,MAAM,WAAW,GAAG,CAAC,OAAY,EAAE,SAAiB,EAAE,QAAgB,EAAE,KAAa,EAAE,EAAE;IACvF,QAAQ,SAAS,EAAE;QACjB,KAAK,QAAQ;YACX,OAAO,CAAC,gBAAgB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;YAC1C,MAAM;QACR,KAAK,MAAM;YACT,OAAO,CAAC,kBAAkB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;YAC5C,MAAM;QACR,KAAK,aAAa;YAChB,OAAO,CAAC,gBAAgB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;YAC1C,OAAO,CAAC,kBAAkB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;YAC5C,MAAM;QACR;YACE,MAAM;KACT;AACH,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["// From DX Components src/utils/event-utils.js\n\nconst handleEvent = (actions: any, eventType: string, propName: string, value: string) => {\n switch (eventType) {\n case 'change':\n actions.updateFieldValue(propName, value);\n break;\n case 'blur':\n actions.triggerFieldChange(propName, value);\n break;\n case 'changeNblur':\n actions.updateFieldValue(propName, value);\n actions.triggerFieldChange(propName, value);\n break;\n default:\n break;\n }\n};\n\nexport default handleEvent;\n"]}
1
+ {"version":3,"file":"event-utils.js","sourceRoot":"","sources":["../../../src/components/helpers/event-utils.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAE9C,MAAM,WAAW,GAAG,CAAC,OAAY,EAAE,SAAiB,EAAE,QAAgB,EAAE,KAAa,EAAE,EAAE;IACvF,QAAQ,SAAS,EAAE,CAAC;QAClB,KAAK,QAAQ;YACX,OAAO,CAAC,gBAAgB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;YAC1C,MAAM;QACR,KAAK,MAAM;YACT,OAAO,CAAC,kBAAkB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;YAC5C,MAAM;QACR,KAAK,aAAa;YAChB,OAAO,CAAC,gBAAgB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;YAC1C,OAAO,CAAC,kBAAkB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;YAC5C,MAAM;QACR;YACE,MAAM;IACV,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["// From DX Components src/utils/event-utils.js\n\nconst handleEvent = (actions: any, eventType: string, propName: string, value: string) => {\n switch (eventType) {\n case 'change':\n actions.updateFieldValue(propName, value);\n break;\n case 'blur':\n actions.triggerFieldChange(propName, value);\n break;\n case 'changeNblur':\n actions.updateFieldValue(propName, value);\n actions.triggerFieldChange(propName, value);\n break;\n default:\n break;\n }\n};\n\nexport default handleEvent;\n"]}
@@ -1,4 +1,4 @@
1
- import { ReactElement } from 'react';
1
+ import { type ReactElement } from 'react';
2
2
  /**
3
3
  *
4
4
  * @param {*} pConn - pConnect object of the view
@@ -1 +1 @@
1
- {"version":3,"file":"field-group-utils.d.ts","sourceRoot":"","sources":["../../../src/components/helpers/field-group-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAC;AAIpD;;;;GAIG;AAEH,eAAO,MAAM,gBAAgB,qBAW5B,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,KAAK,KAAA,EAAE,KAAK,KAAA,EAAE,cAAc,KAAA,GAAG,YAAY,CAyBpE"}
1
+ {"version":3,"file":"field-group-utils.d.ts","sourceRoot":"","sources":["../../../src/components/helpers/field-group-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAIzD;;;;GAIG;AAEH,eAAO,MAAM,gBAAgB,GAAG,UAAK,QAWpC,C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AC,CAAC,CAAC,GAAG,KAAK,CAAC,gBAAgB,EAAE,GAAG,aAAa,IAAI,KAAK,GAAG,CAAC;IAC1H,MAAM,IAAI,GAAG,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAElH,OAAO,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC;IAE/B,MAAM,MAAM,GAAG;QACb,IAAI;QACJ,OAAO,EAAE;YACP,OAAO;YACP,aAAa;YACb,aAAa;YACb,OAAO,EAAE,IAAI;SACd;KACF,CAAC;IAEF,MAAM,IAAI,GAAG,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;IAC1C,IAAI,KAAK,CAAC,cAAc,EAAE,EAAE,WAAW,KAAK,cAAc,EAAE;QAC1D,IAAI,CAAC,WAAW,EAAE,EAAE,gBAAgB,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;KACrE;IACD,OAAO,aAAa,CAAC,uBAAuB,EAAE,EAAE,IAAI,CAAC,CAAC;AACxD,CAAC","sourcesContent":["import { createElement, ReactElement } from 'react';\n\nimport createPConnectComponent from '../../bridge/react_pconnect';\n\n/**\n *\n * @param {*} pConn - pConnect object of the view\n * @returns {string} - returns the name of referenceList\n */\n\nexport const getReferenceList = pConn => {\n let resolvePage = pConn.getComponentConfig().referenceList.replace('@P ', '');\n if (resolvePage.includes('D_')) {\n resolvePage = pConn.resolveDatasourceReference(resolvePage);\n if (resolvePage?.pxResults) {\n resolvePage = resolvePage?.pxResults;\n } else if (resolvePage.startsWith('D_') && !resolvePage.endsWith('.pxResults')) {\n resolvePage = `${resolvePage}.pxResults`;\n }\n }\n return resolvePage;\n};\n\n/**\n * creates and returns react element of the view\n * @param {*} pConn - pConnect object of the view\n * @param {*} index - index of the fieldGroup item\n * @param {*} viewConfigPath - boolean value to check for children in config\n * @returns {*} - return the react element of the view\n */\nexport function buildView(pConn, index, viewConfigPath): ReactElement {\n const context = pConn.getContextName();\n const referenceList = getReferenceList(pConn);\n\n const isDatapage = referenceList.startsWith('D_');\n const pageReference = isDatapage ? `${referenceList}[${index}]` : `${pConn.getPageReference()}${referenceList}[${index}]`;\n const meta = viewConfigPath ? pConn.getRawMetadata().children[0].children[0] : pConn.getRawMetadata().children[0];\n\n delete meta?.config?.ruleClass;\n\n const config = {\n meta,\n options: {\n context,\n pageReference,\n referenceList,\n hasForm: true\n }\n };\n\n const view = PCore.createPConnect(config);\n if (pConn.getConfigProps()?.displayMode === 'DISPLAY_ONLY') {\n view.getPConnect()?.setInheritedProp('displayMode', 'DISPLAY_ONLY');\n }\n return createElement(createPConnectComponent(), view);\n}\n"]}
1
+ {"version":3,"file":"field-group-utils.js","sourceRoot":"","sources":["../../../src/components/helpers/field-group-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAqB,MAAM,OAAO,CAAC;AAEzD,OAAO,uBAAuB,MAAM,6BAA6B,CAAC;AAElE;;;;GAIG;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC,EAAE;IACtC,IAAI,WAAW,GAAG,KAAK,CAAC,kBAAkB,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAC9E,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QAC/B,WAAW,GAAG,KAAK,CAAC,0BAA0B,CAAC,WAAW,CAAC,CAAC;QAC5D,IAAI,WAAW,EAAE,SAAS,EAAE,CAAC;YAC3B,WAAW,GAAG,WAAW,EAAE,SAAS,CAAC;QACvC,CAAC;aAAM,IAAI,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;YAC/E,WAAW,GAAG,G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react';\n\nimport createPConnectComponent from '../../bridge/react_pconnect';\n\n/**\n *\n * @param {*} pConn - pConnect object of the view\n * @returns {string} - returns the name of referenceList\n */\n\nexport const getReferenceList = pConn => {\n let resolvePage = pConn.getComponentConfig().referenceList.replace('@P ', '');\n if (resolvePage.includes('D_')) {\n resolvePage = pConn.resolveDatasourceReference(resolvePage);\n if (resolvePage?.pxResults) {\n resolvePage = resolvePage?.pxResults;\n } else if (resolvePage.startsWith('D_') && !resolvePage.endsWith('.pxResults')) {\n resolvePage = `${resolvePage}.pxResults`;\n }\n }\n return resolvePage;\n};\n\n/**\n * creates and returns react element of the view\n * @param {*} pConn - pConnect object of the view\n * @param {*} index - index of the fieldGroup item\n * @param {*} viewConfigPath - boolean value to check for children in config\n * @returns {*} - return the react element of the view\n */\nexport function buildView(pConn, index, viewConfigPath): ReactElement {\n const context = pConn.getContextName();\n const referenceList = getReferenceList(pConn);\n\n const isDatapage = referenceList.startsWith('D_');\n const pageReference = isDatapage ? `${referenceList}[${index}]` : `${pConn.getPageReference()}${referenceList}[${index}]`;\n const meta = viewConfigPath ? pConn.getRawMetadata().children[0].children[0] : pConn.getRawMetadata().children[0];\n\n delete meta?.config?.ruleClass;\n\n const config = {\n meta,\n options: {\n context,\n pageReference,\n referenceList,\n hasForm: true\n }\n };\n\n const view = PCore.createPConnect(config);\n if (pConn.getConfigProps()?.displayMode === 'DISPLAY_ONLY') {\n view.getPConnect()?.setInheritedProp('displayMode', 'DISPLAY_ONLY');\n }\n return createElement(createPConnectComponent(), view);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Boolean.js","sourceRoot":"","sources":["../../../../src/components/helpers/formatters/Boolean.ts"],"names":[],"mappings":"AAAA,SAAS,OAAO,CAAC,KAAK,EAAE,EAAE,UAAU,GAAG,IAAI,EAAE,IAAI,GAAG,EAAE,EAAE,KAAK,GAAG,EAAE,EAAE,GAAG,EAAE;IACvE,IAAI,CAAC,CAAC,UAAU,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,KAAK,IAAI,KAAK,EAAE,QAAQ,EAAE,EAAE,WAAW,EAAE,KAAK,OAAO,IAAI,KAAK,KAAK,CAAC,IAAI,KAAK,KAAK,GAAG,EAAE;QAC9H,OAAO,KAAK,IAAI,EAAE,CAAC;KACpB;IACD,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,EAAE,QAAQ,EAAE,EAAE,WAAW,EAAE,KAAK,MAAM,IAAI,KAAK,KAAK,CAAC,IAAI,KAAK,KAAK,GAAG,EAAE;QACjG,OAAO,IAAI,IAAI,EAAE,CAAC;KACnB;IACD,IAAI,UAAU,IAAI,CAAC,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,WAAW,CAAC,EAAE;QACtG,OAAO,KAAK,CAAC;KACd;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,eAAe;IACb,SAAS,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAC5B,OAAO,CAAC,KAAK,EAAE;QACb,GAAG,OAAO;QACV,IAAI,EAAE,OAAO,CAAC,SAAS,IAAI,MAAM;QACjC,KAAK,EAAE,OAAO,CAAC,UAAU,IAAI,OAAO;KACrC,CAAC;CACL,CAAC","sourcesContent":["function Boolean(value, { allowEmpty = true, tick = '', cross = '' } = {}) {\n if ((!allowEmpty && !value) || value === false || value?.toString()?.toLowerCase() === 'false' || value === 0 || value === '0') {\n return cross || '';\n }\n if (value === true || value?.toString()?.toLowerCase() === 'true' || value === 1 || value === '1') {\n return tick || '';\n }\n if (allowEmpty && (value === 'null' || value === '' || value === null || typeof value === 'undefined')) {\n return '- -';\n }\n return value;\n}\n\nexport default {\n TrueFalse: (value, options) =>\n Boolean(value, {\n ...options,\n tick: options.trueLabel || 'True',\n cross: options.falseLabel || 'False'\n })\n};\n"]}
1
+ {"version":3,"file":"Boolean.js","sourceRoot":"","sources":["../../../../src/components/helpers/formatters/Boolean.ts"],"names":[],"mappings":"AAAA,SAAS,OAAO,CAAC,KAAK,EAAE,EAAE,UAAU,GAAG,IAAI,EAAE,IAAI,GAAG,EAAE,EAAE,KAAK,GAAG,EAAE,EAAE,GAAG,EAAE;IACvE,IAAI,CAAC,CAAC,UAAU,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,KAAK,IAAI,KAAK,EAAE,QAAQ,EAAE,EAAE,WAAW,EAAE,KAAK,OAAO,IAAI,KAAK,KAAK,CAAC,IAAI,KAAK,KAAK,GAAG,EAAE,CAAC;QAC/H,OAAO,KAAK,IAAI,EAAE,CAAC;IACrB,CAAC;IACD,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,EAAE,QAAQ,EAAE,EAAE,WAAW,EAAE,KAAK,MAAM,IAAI,KAAK,KAAK,CAAC,IAAI,KAAK,KAAK,GAAG,EAAE,CAAC;QAClG,OAAO,IAAI,IAAI,EAAE,CAAC;IACpB,CAAC;IACD,IAAI,UAAU,IAAI,CAAC,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,WAAW,CAAC,EAAE,CAAC;QACvG,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,eAAe;IACb,SAAS,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAC5B,OAAO,CAAC,KAAK,EAAE;QACb,GAAG,OAAO;QACV,IAAI,EAAE,OAAO,CAAC,SAAS,IAAI,MAAM;QACjC,KAAK,EAAE,OAAO,CAAC,UAAU,IAAI,OAAO;KACrC,CAAC;CACL,CAAC","sourcesContent":["function Boolean(value, { allowEmpty = true, tick = '', cross = '' } = {}) {\n if ((!allowEmpty && !value) || value === false || value?.toString()?.toLowerCase() === 'false' || value === 0 || value === '0') {\n return cross || '';\n }\n if (value === true || value?.toString()?.toLowerCase() === 'true' || value === 1 || value === '1') {\n return tick || '';\n }\n if (allowEmpty && (value === 'null' || value === '' || value === null || typeof value === 'undefined')) {\n return '- -';\n }\n return value;\n}\n\nexport default {\n TrueFalse: (value, options) =>\n Boolean(value, {\n ...options,\n tick: options.trueLabel || 'True',\n cross: options.falseLabel || 'False'\n })\n};\n"]}