@pega/react-sdk-components 24.2.10 → 25.1.10

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 (643) 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.d.ts.map +1 -1
  13. package/lib/components/designSystemExtension/Banner/Banner.js +2 -2
  14. package/lib/components/designSystemExtension/Banner/Banner.js.map +1 -1
  15. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
  16. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
  17. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +50 -35
  18. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
  19. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts.map +1 -1
  20. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +6 -8
  21. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
  22. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts +1 -1
  23. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
  24. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +3 -5
  25. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
  26. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js +2 -2
  27. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
  28. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts.map +1 -1
  29. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +4 -6
  30. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
  31. package/lib/components/designSystemExtension/Operator/Operator.d.ts +1 -1
  32. package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
  33. package/lib/components/designSystemExtension/Operator/Operator.js +12 -9
  34. package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
  35. package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +1 -1
  36. package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
  37. package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
  38. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -1
  39. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +32 -4
  40. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -1
  41. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.css +7 -14
  42. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts.map +1 -1
  43. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js +12 -2
  44. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
  45. package/lib/components/field/AutoComplete/AutoComplete.d.ts +1 -1
  46. package/lib/components/field/AutoComplete/AutoComplete.d.ts.map +1 -1
  47. package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
  48. package/lib/components/field/CancelAlert/CancelAlert.css +4 -4
  49. package/lib/components/field/CancelAlert/CancelAlert.d.ts +1 -1
  50. package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
  51. package/lib/components/field/CancelAlert/CancelAlert.js +4 -7
  52. package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
  53. package/lib/components/field/Checkbox/Checkbox.d.ts +9 -1
  54. package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
  55. package/lib/components/field/Checkbox/Checkbox.js +52 -3
  56. package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
  57. package/lib/components/field/Currency/Currency.d.ts +1 -1
  58. package/lib/components/field/Currency/Currency.d.ts.map +1 -1
  59. package/lib/components/field/Currency/Currency.js +8 -7
  60. package/lib/components/field/Currency/Currency.js.map +1 -1
  61. package/lib/components/field/Currency/currency-utils.d.ts.map +1 -1
  62. package/lib/components/field/Currency/currency-utils.js +0 -2
  63. package/lib/components/field/Currency/currency-utils.js.map +1 -1
  64. package/lib/components/field/Date/Date.d.ts +1 -1
  65. package/lib/components/field/Date/Date.d.ts.map +1 -1
  66. package/lib/components/field/Date/Date.js +7 -7
  67. package/lib/components/field/Date/Date.js.map +1 -1
  68. package/lib/components/field/DateTime/DateTime.d.ts +1 -1
  69. package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
  70. package/lib/components/field/DateTime/DateTime.js +15 -11
  71. package/lib/components/field/DateTime/DateTime.js.map +1 -1
  72. package/lib/components/field/Decimal/Decimal.d.ts +1 -1
  73. package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
  74. package/lib/components/field/Decimal/Decimal.js +7 -6
  75. package/lib/components/field/Decimal/Decimal.js.map +1 -1
  76. package/lib/components/field/Dropdown/Dropdown.d.ts +1 -1
  77. package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
  78. package/lib/components/field/Dropdown/Dropdown.js +16 -13
  79. package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
  80. package/lib/components/field/Email/Email.d.ts +1 -1
  81. package/lib/components/field/Email/Email.d.ts.map +1 -1
  82. package/lib/components/field/Email/Email.js +6 -7
  83. package/lib/components/field/Email/Email.js.map +1 -1
  84. package/lib/components/field/Group/Group.d.ts +2 -2
  85. package/lib/components/field/Group/Group.d.ts.map +1 -1
  86. package/lib/components/field/Group/Group.js +4 -3
  87. package/lib/components/field/Group/Group.js.map +1 -1
  88. package/lib/components/field/Integer/Integer.d.ts +1 -1
  89. package/lib/components/field/Integer/Integer.d.ts.map +1 -1
  90. package/lib/components/field/Integer/Integer.js +4 -5
  91. package/lib/components/field/Integer/Integer.js.map +1 -1
  92. package/lib/components/field/Location/Location.css +4 -0
  93. package/lib/components/field/Location/Location.d.ts +11 -0
  94. package/lib/components/field/Location/Location.d.ts.map +1 -0
  95. package/lib/components/field/Location/Location.js +158 -0
  96. package/lib/components/field/Location/Location.js.map +1 -0
  97. package/lib/components/field/Location/index.d.ts +2 -0
  98. package/lib/components/field/Location/index.d.ts.map +1 -0
  99. package/lib/components/field/Location/index.js +2 -0
  100. package/lib/components/field/Location/index.js.map +1 -0
  101. package/lib/components/field/Multiselect/Multiselect.js.map +1 -1
  102. package/lib/components/field/Multiselect/utils.d.ts +2 -1
  103. package/lib/components/field/Multiselect/utils.d.ts.map +1 -1
  104. package/lib/components/field/Multiselect/utils.js +1 -1
  105. package/lib/components/field/Multiselect/utils.js.map +1 -1
  106. package/lib/components/field/ObjectReference/ObjectReference.d.ts +16 -0
  107. package/lib/components/field/ObjectReference/ObjectReference.d.ts.map +1 -0
  108. package/lib/components/field/ObjectReference/ObjectReference.js +165 -0
  109. package/lib/components/field/ObjectReference/ObjectReference.js.map +1 -0
  110. package/lib/components/field/ObjectReference/index.d.ts +2 -0
  111. package/lib/components/field/ObjectReference/index.d.ts.map +1 -0
  112. package/lib/components/field/ObjectReference/index.js +2 -0
  113. package/lib/components/field/ObjectReference/index.js.map +1 -0
  114. package/lib/components/field/ObjectReference/utils.d.ts +17 -0
  115. package/lib/components/field/ObjectReference/utils.d.ts.map +1 -0
  116. package/lib/components/field/ObjectReference/utils.js +99 -0
  117. package/lib/components/field/ObjectReference/utils.js.map +1 -0
  118. package/lib/components/field/Percentage/Percentage.d.ts +1 -1
  119. package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
  120. package/lib/components/field/Percentage/Percentage.js +7 -7
  121. package/lib/components/field/Percentage/Percentage.js.map +1 -1
  122. package/lib/components/field/Phone/Phone.d.ts +1 -1
  123. package/lib/components/field/Phone/Phone.d.ts.map +1 -1
  124. package/lib/components/field/Phone/Phone.js +6 -4
  125. package/lib/components/field/Phone/Phone.js.map +1 -1
  126. package/lib/components/field/RadioButtons/RadioButtons.d.ts +8 -1
  127. package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
  128. package/lib/components/field/RadioButtons/RadioButtons.js +15 -10
  129. package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
  130. package/lib/components/field/RichText/RichText.css +79 -0
  131. package/lib/components/field/RichText/RichText.d.ts +2 -1
  132. package/lib/components/field/RichText/RichText.d.ts.map +1 -1
  133. package/lib/components/field/RichText/RichText.js +1 -0
  134. package/lib/components/field/RichText/RichText.js.map +1 -1
  135. package/lib/components/field/ScalarList/ScalarList.d.ts +1 -1
  136. package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -1
  137. package/lib/components/field/ScalarList/ScalarList.js +3 -4
  138. package/lib/components/field/ScalarList/ScalarList.js.map +1 -1
  139. package/lib/components/field/SelectableCard/SelectableCard.d.ts +2 -0
  140. package/lib/components/field/SelectableCard/SelectableCard.d.ts.map +1 -0
  141. package/lib/components/field/SelectableCard/SelectableCard.js +57 -0
  142. package/lib/components/field/SelectableCard/SelectableCard.js.map +1 -0
  143. package/lib/components/field/SelectableCard/index.d.ts +2 -0
  144. package/lib/components/field/SelectableCard/index.d.ts.map +1 -0
  145. package/lib/components/field/SelectableCard/index.js +2 -0
  146. package/lib/components/field/SelectableCard/index.js.map +1 -0
  147. package/lib/components/field/SelectableCard/utils.d.ts +13 -0
  148. package/lib/components/field/SelectableCard/utils.d.ts.map +1 -0
  149. package/lib/components/field/SelectableCard/utils.js +183 -0
  150. package/lib/components/field/SelectableCard/utils.js.map +1 -0
  151. package/lib/components/field/SemanticLink/SemanticLink.d.ts +10 -2
  152. package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
  153. package/lib/components/field/SemanticLink/SemanticLink.js +128 -15
  154. package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
  155. package/lib/components/field/SemanticLink/utils.js +1 -1
  156. package/lib/components/field/SemanticLink/utils.js.map +1 -1
  157. package/lib/components/field/TextArea/TextArea.d.ts +1 -1
  158. package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
  159. package/lib/components/field/TextArea/TextArea.js +4 -5
  160. package/lib/components/field/TextArea/TextArea.js.map +1 -1
  161. package/lib/components/field/TextContent/TextContent.d.ts +1 -1
  162. package/lib/components/field/TextContent/TextContent.d.ts.map +1 -1
  163. package/lib/components/field/TextContent/TextContent.js +0 -1
  164. package/lib/components/field/TextContent/TextContent.js.map +1 -1
  165. package/lib/components/field/TextInput/TextInput.d.ts +1 -1
  166. package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
  167. package/lib/components/field/TextInput/TextInput.js +4 -5
  168. package/lib/components/field/TextInput/TextInput.js.map +1 -1
  169. package/lib/components/field/Time/Time.d.ts +1 -1
  170. package/lib/components/field/Time/Time.d.ts.map +1 -1
  171. package/lib/components/field/Time/Time.js +3 -6
  172. package/lib/components/field/Time/Time.js.map +1 -1
  173. package/lib/components/field/URL/URL.d.ts +1 -1
  174. package/lib/components/field/URL/URL.d.ts.map +1 -1
  175. package/lib/components/field/URL/URL.js +4 -5
  176. package/lib/components/field/URL/URL.js.map +1 -1
  177. package/lib/components/field/UserReference/UserReference.d.ts +1 -2
  178. package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
  179. package/lib/components/field/UserReference/UserReference.js +2 -5
  180. package/lib/components/field/UserReference/UserReference.js.map +1 -1
  181. package/lib/components/field/UserReference/UserReferenceUtils.d.ts.map +1 -1
  182. package/lib/components/field/UserReference/UserReferenceUtils.js.map +1 -1
  183. package/lib/components/helpers/attachmentShared.d.ts +2 -0
  184. package/lib/components/helpers/attachmentShared.d.ts.map +1 -0
  185. package/lib/components/helpers/attachmentShared.js +6 -0
  186. package/lib/components/helpers/attachmentShared.js.map +1 -0
  187. package/lib/components/helpers/case-utils.js.map +1 -1
  188. package/lib/components/helpers/common-utils.d.ts +8 -1
  189. package/lib/components/helpers/common-utils.d.ts.map +1 -1
  190. package/lib/components/helpers/common-utils.js +20 -1
  191. package/lib/components/helpers/common-utils.js.map +1 -1
  192. package/lib/components/helpers/data_page.d.ts.map +1 -1
  193. package/lib/components/helpers/data_page.js +0 -1
  194. package/lib/components/helpers/data_page.js.map +1 -1
  195. package/lib/components/helpers/date-format-utils.d.ts.map +1 -1
  196. package/lib/components/helpers/event-utils.d.ts.map +1 -1
  197. package/lib/components/helpers/event-utils.js.map +1 -1
  198. package/lib/components/helpers/field-group-utils.d.ts +1 -1
  199. package/lib/components/helpers/field-group-utils.d.ts.map +1 -1
  200. package/lib/components/helpers/field-group-utils.js.map +1 -1
  201. package/lib/components/helpers/formatters/Boolean.js.map +1 -1
  202. package/lib/components/helpers/formatters/Currency.d.ts +1 -0
  203. package/lib/components/helpers/formatters/Currency.d.ts.map +1 -1
  204. package/lib/components/helpers/formatters/Currency.js +20 -19
  205. package/lib/components/helpers/formatters/Currency.js.map +1 -1
  206. package/lib/components/helpers/formatters/CurrencyMap.d.ts.map +1 -1
  207. package/lib/components/helpers/formatters/CurrencyMap.js +0 -1
  208. package/lib/components/helpers/formatters/CurrencyMap.js.map +1 -1
  209. package/lib/components/helpers/formatters/Date.js.map +1 -1
  210. package/lib/components/helpers/formatters/common.d.ts +2 -2
  211. package/lib/components/helpers/formatters/common.d.ts.map +1 -1
  212. package/lib/components/helpers/formatters/common.js +2 -1
  213. package/lib/components/helpers/formatters/common.js.map +1 -1
  214. package/lib/components/helpers/formatters/index.d.ts +1 -0
  215. package/lib/components/helpers/formatters/index.d.ts.map +1 -1
  216. package/lib/components/helpers/formatters/index.js +2 -3
  217. package/lib/components/helpers/formatters/index.js.map +1 -1
  218. package/lib/components/helpers/instructions-utils.d.ts.map +1 -1
  219. package/lib/components/helpers/object-utils.d.ts +9 -0
  220. package/lib/components/helpers/object-utils.d.ts.map +1 -0
  221. package/lib/components/helpers/object-utils.js +11 -0
  222. package/lib/components/helpers/object-utils.js.map +1 -0
  223. package/lib/components/helpers/reactContextHelpers.d.ts +0 -1
  224. package/lib/components/helpers/reactContextHelpers.d.ts.map +1 -1
  225. package/lib/components/helpers/simpleTableHelpers.d.ts +16 -2
  226. package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
  227. package/lib/components/helpers/simpleTableHelpers.js +111 -5
  228. package/lib/components/helpers/simpleTableHelpers.js.map +1 -1
  229. package/lib/components/helpers/state-utils.d.ts.map +1 -1
  230. package/lib/components/helpers/state-utils.js.map +1 -1
  231. package/lib/components/helpers/template-utils.js.map +1 -1
  232. package/lib/components/helpers/utils.d.ts +1 -0
  233. package/lib/components/helpers/utils.d.ts.map +1 -1
  234. package/lib/components/helpers/utils.js +7 -1
  235. package/lib/components/helpers/utils.js.map +1 -1
  236. package/lib/components/helpers/versionHelpers.d.ts.map +1 -1
  237. package/lib/components/helpers/versionHelpers.js +0 -1
  238. package/lib/components/helpers/versionHelpers.js.map +1 -1
  239. package/lib/components/infra/ActionButtons/ActionButtons.d.ts.map +1 -1
  240. package/lib/components/infra/ActionButtons/ActionButtons.js +12 -7
  241. package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
  242. package/lib/components/infra/Assignment/Assignment.d.ts +2 -2
  243. package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
  244. package/lib/components/infra/Assignment/Assignment.js +35 -36
  245. package/lib/components/infra/Assignment/Assignment.js.map +1 -1
  246. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +2 -2
  247. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
  248. package/lib/components/infra/AssignmentCard/AssignmentCard.js.map +1 -1
  249. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +1 -2
  250. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
  251. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +18 -93
  252. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
  253. package/lib/components/infra/Containers/FlowContainer/helpers.d.ts.map +1 -1
  254. package/lib/components/infra/Containers/FlowContainer/helpers.js +1 -5
  255. package/lib/components/infra/Containers/FlowContainer/helpers.js.map +1 -1
  256. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts +1 -1
  257. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts.map +1 -1
  258. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js +3 -2
  259. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js.map +1 -1
  260. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +1 -1
  261. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
  262. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +4 -5
  263. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
  264. package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts +0 -1
  265. package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts.map +1 -1
  266. package/lib/components/infra/Containers/SimpleView/helper.d.ts +0 -1
  267. package/lib/components/infra/Containers/SimpleView/helper.d.ts.map +1 -1
  268. package/lib/components/infra/Containers/SimpleView/helper.js +1 -1
  269. package/lib/components/infra/Containers/SimpleView/helper.js.map +1 -1
  270. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +1 -1
  271. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
  272. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +3 -4
  273. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
  274. package/lib/components/infra/Containers/container-helpers.d.ts +3 -0
  275. package/lib/components/infra/Containers/container-helpers.d.ts.map +1 -0
  276. package/lib/components/infra/Containers/container-helpers.js +52 -0
  277. package/lib/components/infra/Containers/container-helpers.js.map +1 -0
  278. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +2 -2
  279. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
  280. package/lib/components/infra/DashboardFilter/DashboardFilter.js +3 -7
  281. package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
  282. package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -1
  283. package/lib/components/infra/DashboardFilter/filterUtils.js +2 -5
  284. package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
  285. package/lib/components/infra/DeferLoad/DeferLoad.d.ts +2 -1
  286. package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
  287. package/lib/components/infra/DeferLoad/DeferLoad.js +6 -9
  288. package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
  289. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +1 -1
  290. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
  291. package/lib/components/infra/ErrorBoundary/ErrorBoundary.js +0 -2
  292. package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
  293. package/lib/components/infra/MultiStep/MultiStep.css +48 -70
  294. package/lib/components/infra/MultiStep/MultiStep.d.ts +2 -2
  295. package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
  296. package/lib/components/infra/MultiStep/MultiStep.js +19 -41
  297. package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
  298. package/lib/components/infra/NavBar/NavBar.css +1 -1
  299. package/lib/components/infra/NavBar/NavBar.d.ts +1 -1
  300. package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
  301. package/lib/components/infra/NavBar/NavBar.js +13 -7
  302. package/lib/components/infra/NavBar/NavBar.js.map +1 -1
  303. package/lib/components/infra/Reference/Reference.d.ts +1 -1
  304. package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
  305. package/lib/components/infra/Reference/Reference.js +2 -3
  306. package/lib/components/infra/Reference/Reference.js.map +1 -1
  307. package/lib/components/infra/Region/Region.d.ts +1 -1
  308. package/lib/components/infra/Region/Region.d.ts.map +1 -1
  309. package/lib/components/infra/Region/Region.js.map +1 -1
  310. package/lib/components/infra/RootContainer/RootContainer.d.ts +2 -2
  311. package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
  312. package/lib/components/infra/RootContainer/RootContainer.js +1 -2
  313. package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
  314. package/lib/components/infra/Stages/Stages.d.ts +1 -1
  315. package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
  316. package/lib/components/infra/Stages/Stages.js +2 -2
  317. package/lib/components/infra/Stages/Stages.js.map +1 -1
  318. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +1 -1
  319. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
  320. package/lib/components/infra/View/View.d.ts +2 -2
  321. package/lib/components/infra/View/View.d.ts.map +1 -1
  322. package/lib/components/infra/View/View.js +2 -1
  323. package/lib/components/infra/View/View.js.map +1 -1
  324. package/lib/components/template/AdvancedSearch/AdvancedSearch.d.ts +2 -0
  325. package/lib/components/template/AdvancedSearch/AdvancedSearch.d.ts.map +1 -0
  326. package/lib/components/template/AdvancedSearch/AdvancedSearch.js +68 -0
  327. package/lib/components/template/AdvancedSearch/AdvancedSearch.js.map +1 -0
  328. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.d.ts +23 -0
  329. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.d.ts.map +1 -0
  330. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.js +26 -0
  331. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.js.map +1 -0
  332. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.d.ts +3 -0
  333. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.d.ts.map +1 -0
  334. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.js +179 -0
  335. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.js.map +1 -0
  336. package/lib/components/template/AdvancedSearch/SearchGroups/hooks.d.ts +10 -0
  337. package/lib/components/template/AdvancedSearch/SearchGroups/hooks.d.ts.map +1 -0
  338. package/lib/components/template/AdvancedSearch/SearchGroups/hooks.js +25 -0
  339. package/lib/components/template/AdvancedSearch/SearchGroups/hooks.js.map +1 -0
  340. package/lib/components/template/AdvancedSearch/SearchGroups/index.d.ts +2 -0
  341. package/lib/components/template/AdvancedSearch/SearchGroups/index.d.ts.map +1 -0
  342. package/lib/components/template/AdvancedSearch/SearchGroups/index.js +2 -0
  343. package/lib/components/template/AdvancedSearch/SearchGroups/index.js.map +1 -0
  344. package/lib/components/template/AdvancedSearch/SearchGroups/utils.d.ts +16 -0
  345. package/lib/components/template/AdvancedSearch/SearchGroups/utils.d.ts.map +1 -0
  346. package/lib/components/template/AdvancedSearch/SearchGroups/utils.js +22 -0
  347. package/lib/components/template/AdvancedSearch/SearchGroups/utils.js.map +1 -0
  348. package/lib/components/template/AdvancedSearch/TemplateContext.d.ts +10 -0
  349. package/lib/components/template/AdvancedSearch/TemplateContext.d.ts.map +1 -0
  350. package/lib/components/template/AdvancedSearch/TemplateContext.js +11 -0
  351. package/lib/components/template/AdvancedSearch/TemplateContext.js.map +1 -0
  352. package/lib/components/template/AdvancedSearch/index.d.ts +2 -0
  353. package/lib/components/template/AdvancedSearch/index.d.ts.map +1 -0
  354. package/lib/components/template/AdvancedSearch/index.js +2 -0
  355. package/lib/components/template/AdvancedSearch/index.js.map +1 -0
  356. package/lib/components/template/AppShell/AppShell.css +1 -1
  357. package/lib/components/template/AppShell/AppShell.d.ts +2 -2
  358. package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
  359. package/lib/components/template/AppShell/AppShell.js +14 -17
  360. package/lib/components/template/AppShell/AppShell.js.map +1 -1
  361. package/lib/components/template/BannerPage/BannerPage.d.ts +2 -2
  362. package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
  363. package/lib/components/template/BannerPage/BannerPage.js.map +1 -1
  364. package/lib/components/template/CaseSummary/CaseSummary.d.ts +4 -2
  365. package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
  366. package/lib/components/template/CaseSummary/CaseSummary.js +24 -37
  367. package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
  368. package/lib/components/template/CaseView/CaseView.d.ts +3 -2
  369. package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
  370. package/lib/components/template/CaseView/CaseView.js +14 -16
  371. package/lib/components/template/CaseView/CaseView.js.map +1 -1
  372. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +1 -1
  373. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
  374. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +1 -1
  375. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
  376. package/lib/components/template/Confirmation/Confirmation.d.ts +2 -2
  377. package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
  378. package/lib/components/template/Confirmation/Confirmation.js +1 -2
  379. package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
  380. package/lib/components/template/DataReference/DataReference.d.ts +9 -2
  381. package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
  382. package/lib/components/template/DataReference/DataReference.js +239 -80
  383. package/lib/components/template/DataReference/DataReference.js.map +1 -1
  384. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.d.ts +8 -0
  385. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.d.ts.map +1 -0
  386. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.js +9 -0
  387. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.js.map +1 -0
  388. package/lib/components/template/DataReference/SearchForm.d.ts +3 -0
  389. package/lib/components/template/DataReference/SearchForm.d.ts.map +1 -0
  390. package/lib/components/template/DataReference/SearchForm.js +87 -0
  391. package/lib/components/template/DataReference/SearchForm.js.map +1 -0
  392. package/lib/components/template/DataReference/utils.d.ts +15 -0
  393. package/lib/components/template/DataReference/utils.d.ts.map +1 -0
  394. package/lib/components/template/DataReference/utils.js +75 -0
  395. package/lib/components/template/DataReference/utils.js.map +1 -0
  396. package/lib/components/template/DefaultForm/DefaultForm.d.ts +2 -2
  397. package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
  398. package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
  399. package/lib/components/template/DefaultForm/utils/index.d.ts.map +1 -1
  400. package/lib/components/template/DefaultForm/utils/index.js +1 -2
  401. package/lib/components/template/DefaultForm/utils/index.js.map +1 -1
  402. package/lib/components/template/DefaultPage/DefaultPage.d.ts +36 -0
  403. package/lib/components/template/DefaultPage/DefaultPage.d.ts.map +1 -0
  404. package/lib/components/template/DefaultPage/DefaultPage.js +28 -0
  405. package/lib/components/template/DefaultPage/DefaultPage.js.map +1 -0
  406. package/lib/components/template/DefaultPage/index.d.ts +2 -0
  407. package/lib/components/template/DefaultPage/index.d.ts.map +1 -0
  408. package/lib/components/template/DefaultPage/index.js +2 -0
  409. package/lib/components/template/DefaultPage/index.js.map +1 -0
  410. package/lib/components/template/Details/Details/Details.d.ts +1 -1
  411. package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
  412. package/lib/components/template/Details/Details/Details.js +2 -3
  413. package/lib/components/template/Details/Details/Details.js.map +1 -1
  414. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +2 -2
  415. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
  416. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
  417. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +1 -1
  418. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
  419. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +2 -3
  420. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
  421. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +1 -1
  422. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
  423. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +2 -3
  424. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
  425. package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts +1 -1
  426. package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts.map +1 -1
  427. package/lib/components/template/Details/DynamicTabs/DynamicTabs.js +0 -1
  428. package/lib/components/template/Details/DynamicTabs/DynamicTabs.js.map +1 -1
  429. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +1 -1
  430. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
  431. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +1 -4
  432. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
  433. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +2 -2
  434. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
  435. package/lib/components/template/InlineDashboard/InlineDashboard.js +2 -2
  436. package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
  437. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +2 -2
  438. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
  439. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js.map +1 -1
  440. package/lib/components/template/ListPage/ListPage.d.ts +1 -1
  441. package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
  442. package/lib/components/template/ListPage/ListPage.js.map +1 -1
  443. package/lib/components/template/ListView/DefaultViewMeta.js.map +1 -1
  444. package/lib/components/template/ListView/ListView.d.ts +4 -1
  445. package/lib/components/template/ListView/ListView.d.ts.map +1 -1
  446. package/lib/components/template/ListView/ListView.js +134 -67
  447. package/lib/components/template/ListView/ListView.js.map +1 -1
  448. package/lib/components/template/ListView/hooks.d.ts.map +1 -1
  449. package/lib/components/template/ListView/hooks.js +2 -5
  450. package/lib/components/template/ListView/hooks.js.map +1 -1
  451. package/lib/components/template/ListView/utils.d.ts.map +1 -1
  452. package/lib/components/template/ListView/utils.js +28 -6
  453. package/lib/components/template/ListView/utils.js.map +1 -1
  454. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +1 -1
  455. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
  456. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -1
  457. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +2 -2
  458. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -1
  459. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js.map +1 -1
  460. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +1 -1
  461. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
  462. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +2 -3
  463. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
  464. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +2 -2
  465. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -1
  466. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js.map +1 -1
  467. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +2 -2
  468. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
  469. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -1
  470. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +2 -2
  471. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
  472. package/lib/components/template/OneColumn/OneColumn/OneColumn.js +2 -2
  473. package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
  474. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +1 -1
  475. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
  476. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -1
  477. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +2 -2
  478. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
  479. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js.map +1 -1
  480. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +1 -1
  481. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
  482. package/lib/components/template/PromotedFilters/PromotedFilters.js +0 -2
  483. package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
  484. package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.d.ts +2 -0
  485. package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.d.ts.map +1 -0
  486. package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.js +73 -0
  487. package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.js.map +1 -0
  488. package/lib/components/template/SelfServiceCaseView/index.d.ts +2 -0
  489. package/lib/components/template/SelfServiceCaseView/index.d.ts.map +1 -0
  490. package/lib/components/template/SelfServiceCaseView/index.js +2 -0
  491. package/lib/components/template/SelfServiceCaseView/index.js.map +1 -0
  492. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts +1 -1
  493. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
  494. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js +1 -4
  495. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
  496. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +4 -2
  497. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
  498. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +64 -47
  499. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
  500. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +1 -1
  501. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
  502. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js +2 -4
  503. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
  504. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +1 -1
  505. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
  506. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js +3 -2
  507. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
  508. package/lib/components/template/SubTabs/SubTabs.d.ts +2 -2
  509. package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
  510. package/lib/components/template/SubTabs/SubTabs.js.map +1 -1
  511. package/lib/components/template/SubTabs/tabUtils.d.ts +10 -0
  512. package/lib/components/template/SubTabs/tabUtils.d.ts.map +1 -1
  513. package/lib/components/template/SubTabs/tabUtils.js +102 -1
  514. package/lib/components/template/SubTabs/tabUtils.js.map +1 -1
  515. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts +2 -2
  516. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
  517. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +2 -3
  518. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
  519. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +1 -1
  520. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
  521. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -1
  522. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +2 -2
  523. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
  524. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +2 -3
  525. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
  526. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +2 -2
  527. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
  528. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js.map +1 -1
  529. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +1 -1
  530. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
  531. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +2 -3
  532. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
  533. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +2 -2
  534. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -1
  535. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js.map +1 -1
  536. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +2 -2
  537. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
  538. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js.map +1 -1
  539. package/lib/components/template/WssNavBar/WssNavBar.css +1 -1
  540. package/lib/components/template/WssNavBar/WssNavBar.d.ts +1 -1
  541. package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -1
  542. package/lib/components/template/WssNavBar/WssNavBar.js +4 -4
  543. package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
  544. package/lib/components/template/utils.d.ts +7 -0
  545. package/lib/components/template/utils.d.ts.map +1 -0
  546. package/lib/components/template/utils.js +52 -0
  547. package/lib/components/template/utils.js.map +1 -0
  548. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts +1 -1
  549. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
  550. package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
  551. package/lib/components/widget/Attachment/Attachment.css +7 -8
  552. package/lib/components/widget/Attachment/Attachment.d.ts +4 -2
  553. package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
  554. package/lib/components/widget/Attachment/Attachment.js +255 -207
  555. package/lib/components/widget/Attachment/Attachment.js.map +1 -1
  556. package/lib/components/widget/Attachment/Attachment.types.d.ts +90 -0
  557. package/lib/components/widget/Attachment/Attachment.types.d.ts.map +1 -0
  558. package/lib/components/widget/Attachment/Attachment.types.js +2 -0
  559. package/lib/components/widget/Attachment/Attachment.types.js.map +1 -0
  560. package/lib/components/widget/Attachment/AttachmentUtils.d.ts +25 -0
  561. package/lib/components/widget/Attachment/AttachmentUtils.d.ts.map +1 -0
  562. package/lib/components/widget/Attachment/AttachmentUtils.js +255 -0
  563. package/lib/components/widget/Attachment/AttachmentUtils.js.map +1 -0
  564. package/lib/components/widget/CaseHistory/CaseHistory.d.ts +1 -1
  565. package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
  566. package/lib/components/widget/CaseHistory/CaseHistory.js +2 -2
  567. package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
  568. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.css +0 -14
  569. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +1 -1
  570. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts.map +1 -1
  571. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js +1 -1
  572. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
  573. package/lib/components/widget/FileUtility/FileUtility/FileUtility.css +7 -6
  574. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +2 -1
  575. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
  576. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +29 -17
  577. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
  578. package/lib/components/widget/Followers/Followers.d.ts +2 -2
  579. package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
  580. package/lib/components/widget/Followers/Followers.js +0 -2
  581. package/lib/components/widget/Followers/Followers.js.map +1 -1
  582. package/lib/components/widget/QuickCreate/QuickCreate.d.ts +1 -1
  583. package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
  584. package/lib/components/widget/QuickCreate/QuickCreate.js +0 -2
  585. package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
  586. package/lib/components/widget/SummaryItem/SummaryItem.css +9 -11
  587. package/lib/components/widget/SummaryItem/SummaryItem.d.ts +1 -1
  588. package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
  589. package/lib/components/widget/SummaryItem/SummaryItem.js +1 -1
  590. package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
  591. package/lib/components/widget/SummaryList/SummaryList.d.ts +1 -1
  592. package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
  593. package/lib/components/widget/SummaryList/SummaryList.js.map +1 -1
  594. package/lib/components/widget/ToDo/ToDo.css +1 -13
  595. package/lib/components/widget/ToDo/ToDo.d.ts +1 -1
  596. package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
  597. package/lib/components/widget/ToDo/ToDo.js +22 -17
  598. package/lib/components/widget/ToDo/ToDo.js.map +1 -1
  599. package/lib/hooks/useAfterInitialEffect.d.ts +1 -1
  600. package/lib/hooks/useAfterInitialEffect.d.ts.map +1 -1
  601. package/lib/hooks/useAfterInitialEffect.js.map +1 -1
  602. package/lib/hooks/useConsolidatedRef.d.ts +1 -1
  603. package/lib/hooks/useConsolidatedRef.d.ts.map +1 -1
  604. package/lib/hooks/useConsolidatedRef.js.map +1 -1
  605. package/lib/hooks/useFocusFirstField.d.ts.map +1 -1
  606. package/lib/hooks/useFocusFirstField.js.map +1 -1
  607. package/lib/hooks/useGetTabsCount.d.ts +10 -0
  608. package/lib/hooks/useGetTabsCount.d.ts.map +1 -0
  609. package/lib/hooks/useGetTabsCount.js +165 -0
  610. package/lib/hooks/useGetTabsCount.js.map +1 -0
  611. package/lib/hooks/useIsMount.d.ts +2 -0
  612. package/lib/hooks/useIsMount.d.ts.map +1 -0
  613. package/lib/hooks/useIsMount.js +9 -0
  614. package/lib/hooks/useIsMount.js.map +1 -0
  615. package/lib/hooks/useScrolltoTop.d.ts.map +1 -1
  616. package/lib/mediaco/ToDo/ToDo.css +81 -0
  617. package/lib/mediaco/ToDo/ToDo.d.ts +16 -0
  618. package/lib/mediaco/ToDo/ToDo.d.ts.map +1 -0
  619. package/lib/mediaco/ToDo/ToDo.js +187 -0
  620. package/lib/mediaco/ToDo/ToDo.js.map +1 -0
  621. package/lib/mediaco/ToDo/index.d.ts +2 -0
  622. package/lib/mediaco/ToDo/index.d.ts.map +1 -0
  623. package/lib/mediaco/ToDo/index.js +2 -0
  624. package/lib/mediaco/ToDo/index.js.map +1 -0
  625. package/lib/samples/Embedded/styles.css +26 -0
  626. package/lib/sdk-pega-component-map.d.ts +119 -103
  627. package/lib/sdk-pega-component-map.d.ts.map +1 -1
  628. package/lib/sdk-pega-component-map.js +20 -3
  629. package/lib/sdk-pega-component-map.js.map +1 -1
  630. package/lib/theme.d.ts +30 -1
  631. package/lib/theme.d.ts.map +1 -1
  632. package/lib/theme.js +209 -2
  633. package/lib/theme.js.map +1 -1
  634. package/lib/types/PConnProps.d.ts +1 -1
  635. package/package.json +32 -1
  636. package/lib/components/helpers/attachmentHelpers.d.ts +0 -13
  637. package/lib/components/helpers/attachmentHelpers.d.ts.map +0 -1
  638. package/lib/components/helpers/attachmentHelpers.js +0 -72
  639. package/lib/components/helpers/attachmentHelpers.js.map +0 -1
  640. package/lib/components/infra/Containers/helpers.d.ts +0 -2
  641. package/lib/components/infra/Containers/helpers.d.ts.map +0 -1
  642. package/lib/components/infra/Containers/helpers.js +0 -7
  643. package/lib/components/infra/Containers/helpers.js.map +0 -1
@@ -0,0 +1,165 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useMemo } from 'react';
3
+ import Grid2 from '@mui/material/Grid2';
4
+ import { SELECTION_MODE, generateColumns, getDataRelationshipContextFromKey } from './utils';
5
+ import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
6
+ export default function ObjectReference(props) {
7
+ const { getPConnect, displayMode, allowAndPersistChangesInReviewMode: editableInReview = false, targetObjectType, mode = '', parameters, hideLabel = false, inline = false, showPromotedFilters = false, additionalFields } = props;
8
+ const SingleReferenceReadonly = getComponentFromMap('SingleReferenceReadOnly');
9
+ // Configs
10
+ const pConn = getPConnect();
11
+ const referenceType = targetObjectType === 'case' ? 'Case' : 'Data';
12
+ const rawViewMetadata = pConn.getRawMetadata();
13
+ const refFieldMetadata = pConn.getFieldMetadata(rawViewMetadata?.config?.value?.split('.', 2)[1]);
14
+ // Destructured properties
15
+ const propsToUse = { ...pConn.getInheritedProps(), ...props };
16
+ // Computed variables
17
+ const isDisplayModeEnabled = displayMode === 'DISPLAY_ONLY';
18
+ const canBeChangedInReviewMode = editableInReview && ['Autocomplete', 'Dropdown'].includes(rawViewMetadata.config.componentType);
19
+ // Editable first child on change handler
20
+ const onRecordChange = event => {
21
+ const caseKey = pConn.getCaseInfo().getKey();
22
+ const refreshOptions = { autoDetectRefresh: true, propertyName: '' };
23
+ refreshOptions.propertyName = rawViewMetadata.config?.value;
24
+ if (!canBeChangedInReviewMode || !pConn.getValue('__currentPageTabViewName')) {
25
+ const pgRef = pConn.getPageReference().replace('caseInfo.content', '');
26
+ const viewName = rawViewMetadata.name;
27
+ if (viewName && viewName.length > 0) {
28
+ getPConnect().getActionsApi().refreshCaseView(caseKey, viewName, pgRef, refreshOptions);
29
+ }
30
+ }
31
+ // AutoComplete sets value on event.id whereas Dropdown sets it on event.target.value if event.id is unset
32
+ // When value is empty propValue will be undefined here and no value will be set for the reference
33
+ const propValue = event?.id || event?.target?.value;
34
+ const propName = rawViewMetadata.type === 'SimpleTableSelect' && mode === SELECTION_MODE.MULTI
35
+ ? PCore.getAnnotationUtils().getPropertyName(rawViewMetadata.config.selectionList)
36
+ : PCore.getAnnotationUtils().getPropertyName(rawViewMetadata.config?.value);
37
+ if (propValue && canBeChangedInReviewMode && isDisplayModeEnabled) {
38
+ PCore.getCaseUtils()
39
+ .getCaseEditLock(caseKey, '')
40
+ .then(caseResponse => {
41
+ const pageTokens = pConn.getPageReference().replace('caseInfo.content', '').split('.');
42
+ let curr = {};
43
+ const commitData = curr;
44
+ pageTokens.forEach(el => {
45
+ if (el !== '') {
46
+ curr[el] = {};
47
+ curr = curr[el];
48
+ }
49
+ });
50
+ // expecting format like {Customer: {pyID:"C-100"}}
51
+ const propArr = propName.split('.');
52
+ propArr.forEach((element, idx) => {
53
+ if (idx + 1 === propArr.length) {
54
+ curr[element] = propValue;
55
+ }
56
+ else {
57
+ curr[element] = {};
58
+ curr = curr[element];
59
+ }
60
+ });
61
+ PCore.getCaseUtils()
62
+ .updateCaseEditFieldsData(caseKey, { [caseKey]: commitData }, caseResponse.headers.etag, pConn.getContextName())
63
+ .then(response => {
64
+ PCore.getContainerUtils().updateParentLastUpdateTime(pConn.getContextName(), response.data.data.caseInfo.lastUpdateTime);
65
+ PCore.getContainerUtils().updateRelatedContextEtag(pConn.getContextName(), response.headers.etag);
66
+ });
67
+ });
68
+ }
69
+ };
70
+ // Prepare first child
71
+ const recreatedFirstChild = useMemo(() => {
72
+ const type = rawViewMetadata.config.componentType;
73
+ /* Read-only variants */
74
+ if (type === 'SemanticLink' && !canBeChangedInReviewMode) {
75
+ const config = {
76
+ ...rawViewMetadata.config,
77
+ primaryField: rawViewMetadata.config.displayField
78
+ };
79
+ config.caseClass = rawViewMetadata.config.targetObjectClass;
80
+ config.text = config.primaryField;
81
+ config.caseID = config.value;
82
+ config.contextPage = `@P .${rawViewMetadata.config?.displayField ? getDataRelationshipContextFromKey(rawViewMetadata.config.displayField) : null}`;
83
+ config.resourceParams = {
84
+ workID: config.value
85
+ };
86
+ config.resourcePayload = {
87
+ caseClassName: config.caseClass
88
+ };
89
+ return getPConnect().createComponent({
90
+ type: 'SemanticLink',
91
+ config: {
92
+ ...config,
93
+ displayMode,
94
+ referenceType,
95
+ hideLabel,
96
+ dataRelationshipContext: rawViewMetadata.config?.displayField
97
+ ? getDataRelationshipContextFromKey(rawViewMetadata.config.displayField)
98
+ : null
99
+ }
100
+ });
101
+ }
102
+ if (isDisplayModeEnabled && !canBeChangedInReviewMode) {
103
+ return (_jsx(SingleReferenceReadonly, { config: {
104
+ ...rawViewMetadata.config,
105
+ primaryField: rawViewMetadata.config.displayField
106
+ }, getPConnect: getPConnect, label: propsToUse.label, type: type, displayAs: 'readonly', displayMode: displayMode, activeViewRuleClass: rawViewMetadata.config.targetObjectClass, referenceType: referenceType, hideLabel: hideLabel, dataRelationshipContext: rawViewMetadata.config?.displayField ? getDataRelationshipContextFromKey(rawViewMetadata.config.displayField) : null, additionalFields: additionalFields }));
107
+ }
108
+ // 1) Set datasource
109
+ generateColumns(rawViewMetadata.config, pConn, referenceType);
110
+ rawViewMetadata.config.deferDatasource = true;
111
+ rawViewMetadata.config.listType = 'datapage';
112
+ if (['Dropdown', 'AutoComplete'].includes(type) && !rawViewMetadata.config.placeholder) {
113
+ rawViewMetadata.config.placeholder = '@L Select...';
114
+ }
115
+ // 2) Pass through configs
116
+ rawViewMetadata.config.showPromotedFilters = showPromotedFilters;
117
+ if (!canBeChangedInReviewMode) {
118
+ rawViewMetadata.config.displayMode = displayMode;
119
+ }
120
+ // 3) Define field meta
121
+ let fieldMetaData = null;
122
+ fieldMetaData = {
123
+ datasourceMetadata: {
124
+ datasource: {
125
+ parameters: {}
126
+ }
127
+ }
128
+ };
129
+ if (rawViewMetadata.config?.parameters) {
130
+ fieldMetaData.datasourceMetadata.datasource.parameters = parameters;
131
+ }
132
+ fieldMetaData.datasourceMetadata.datasource.propertyForDisplayText = rawViewMetadata?.config?.datasource?.fields?.text.startsWith('@P')
133
+ ? rawViewMetadata?.config?.datasource?.fields?.text?.substring(3)
134
+ : rawViewMetadata?.config?.datasource?.fields?.text;
135
+ fieldMetaData.datasourceMetadata.datasource.propertyForValue = rawViewMetadata?.config?.datasource?.fields?.value.startsWith('@P')
136
+ ? rawViewMetadata?.config?.datasource?.fields?.value?.substring(3)
137
+ : rawViewMetadata?.config?.datasource?.fields?.value;
138
+ fieldMetaData.datasourceMetadata.datasource.name = rawViewMetadata.config?.referenceList;
139
+ return getPConnect().createComponent({
140
+ type,
141
+ config: {
142
+ ...rawViewMetadata.config,
143
+ descriptors: mode === SELECTION_MODE.SINGLE ? refFieldMetadata?.descriptors : null,
144
+ datasourceMetadata: fieldMetaData?.datasourceMetadata,
145
+ required: propsToUse.required,
146
+ visibility: propsToUse.visibility,
147
+ disabled: propsToUse.disabled,
148
+ label: propsToUse.label,
149
+ parameters: rawViewMetadata.config.parameters,
150
+ readOnly: false,
151
+ localeReference: rawViewMetadata.config.localeReference,
152
+ ...(mode === SELECTION_MODE.SINGLE ? { referenceType } : ''),
153
+ contextClass: rawViewMetadata.config.targetObjectClass,
154
+ primaryField: rawViewMetadata.config?.displayField,
155
+ dataRelationshipContext: rawViewMetadata.config?.displayField ? getDataRelationshipContextFromKey(rawViewMetadata.config.displayField) : null,
156
+ hideLabel,
157
+ onRecordChange,
158
+ inline
159
+ }
160
+ });
161
+ }, [rawViewMetadata.config?.datasource?.source, parameters, propsToUse.required, propsToUse.disabled, getPConnect().getPageReference()]);
162
+ // Prepare children to render
163
+ return (_jsx(Grid2, { container: true, children: _jsx(Grid2, { children: recreatedFirstChild }) }));
164
+ }
165
+ //# sourceMappingURL=ObjectReference.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ObjectReference.js","sourceRoot":"","sources":["../../../../src/components/field/ObjectReference/ObjectReference.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,KAAK,MAAM,qBAAqB,CAAC;AAExC,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,iCAAiC,EAAE,MAAM,SAAS,CAAC;AAC7F,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAiBhF,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAA2B;IACjE,MAAM,EACJ,WAAW,EACX,WAAW,EACX,kCAAkC,EAAE,gBAAgB,GAAG,KAAK,EAC5D,gBAAgB,EAChB,IAAI,GAAG,EAAE,EACT,UAAU,EACV,SAAS,GAAG,KAAK,EACjB,MAAM,GAAG,KAAK,EACd,mBAAmB,GAAG,KAAK,EAC3B,gBAAgB,EACjB,GAAG,KAAK,CAAC;IAEV,MAAM,uBAAuB,GAAG,mBAAmB,CAAC,yBAAyB,CAAC,CAAC;IAE/E,UAAU;IACV,MAAM,KAAK,GAAG,WAAW,EAAE,CAAC;IAC5B,MAAM,aAAa,GAAG,gBAAgB,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;IACpE,MAAM,eAAe,GAAG,KAAK,CAAC,cAAc,EAAE,CAAC;IAC/C,MAAM,gBAAgB,GAAG,KAAK,C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AAe,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,IAAI;gBAC7I,SAAS;gBACT,cAAc;gBACd,MAAM;aACP;SACF,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,eAAe,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,QAAQ,EAAE,WAAW,EAAE,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC;IAEzI,6BAA6B;IAC7B,OAAO,CACL,KAAC,KAAK,IAAC,SAAS,kBACd,KAAC,KAAK,cAAE,mBAAmB,GAAS,GAC9B,CACT,CAAC;AACJ,CAAC","sourcesContent":["import { useMemo } from 'react';\n\nimport Grid2 from '@mui/material/Grid2';\n\nimport { SELECTION_MODE, generateColumns, getDataRelationshipContextFromKey } from './utils';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport type { PConnFieldProps } from '../../../types/PConnProps';\n\ninterface ObjectReferenceProps extends Omit<PConnFieldProps, 'value'> {\n // If any, enter additional props that only exist on ObjectReference here\n getPConnect: any;\n displayMode;\n allowAndPersistChangesInReviewMode: any;\n targetObjectType: any;\n mode: string;\n parameters: object;\n hideLabel: boolean;\n inline: boolean;\n showPromotedFilters: boolean;\n additionalFields: any;\n}\n\nexport default function ObjectReference(props: ObjectReferenceProps) {\n const {\n getPConnect,\n displayMode,\n allowAndPersistChangesInReviewMode: editableInReview = false,\n targetObjectType,\n mode = '',\n parameters,\n hideLabel = false,\n inline = false,\n showPromotedFilters = false,\n additionalFields\n } = props;\n\n const SingleReferenceReadonly = getComponentFromMap('SingleReferenceReadOnly');\n\n // Configs\n const pConn = getPConnect();\n const referenceType = targetObjectType === 'case' ? 'Case' : 'Data';\n const rawViewMetadata = pConn.getRawMetadata();\n const refFieldMetadata = pConn.getFieldMetadata(rawViewMetadata?.config?.value?.split('.', 2)[1]);\n\n // Destructured properties\n const propsToUse = { ...pConn.getInheritedProps(), ...props };\n\n // Computed variables\n const isDisplayModeEnabled = displayMode === 'DISPLAY_ONLY';\n const canBeChangedInReviewMode = editableInReview && ['Autocomplete', 'Dropdown'].includes(rawViewMetadata.config.componentType);\n\n // Editable first child on change handler\n const onRecordChange = event => {\n const caseKey = pConn.getCaseInfo().getKey();\n const refreshOptions = { autoDetectRefresh: true, propertyName: '' };\n refreshOptions.propertyName = rawViewMetadata.config?.value;\n\n if (!canBeChangedInReviewMode || !pConn.getValue('__currentPageTabViewName')) {\n const pgRef = pConn.getPageReference().replace('caseInfo.content', '');\n const viewName = rawViewMetadata.name;\n if (viewName && viewName.length > 0) {\n getPConnect().getActionsApi().refreshCaseView(caseKey, viewName, pgRef, refreshOptions);\n }\n }\n\n // AutoComplete sets value on event.id whereas Dropdown sets it on event.target.value if event.id is unset\n // When value is empty propValue will be undefined here and no value will be set for the reference\n const propValue = event?.id || event?.target?.value;\n const propName =\n rawViewMetadata.type === 'SimpleTableSelect' && mode === SELECTION_MODE.MULTI\n ? PCore.getAnnotationUtils().getPropertyName(rawViewMetadata.config.selectionList)\n : PCore.getAnnotationUtils().getPropertyName(rawViewMetadata.config?.value);\n\n if (propValue && canBeChangedInReviewMode && isDisplayModeEnabled) {\n PCore.getCaseUtils()\n .getCaseEditLock(caseKey, '')\n .then(caseResponse => {\n const pageTokens = pConn.getPageReference().replace('caseInfo.content', '').split('.');\n let curr = {};\n const commitData = curr;\n\n pageTokens.forEach(el => {\n if (el !== '') {\n curr[el] = {};\n curr = curr[el];\n }\n });\n\n // expecting format like {Customer: {pyID:\"C-100\"}}\n const propArr = propName.split('.');\n propArr.forEach((element, idx) => {\n if (idx + 1 === propArr.length) {\n curr[element] = propValue;\n } else {\n curr[element] = {};\n curr = curr[element];\n }\n });\n\n PCore.getCaseUtils()\n .updateCaseEditFieldsData(caseKey, { [caseKey]: commitData }, caseResponse.headers.etag, pConn.getContextName())\n .then(response => {\n PCore.getContainerUtils().updateParentLastUpdateTime(pConn.getContextName(), (response.data as any).data.caseInfo.lastUpdateTime);\n PCore.getContainerUtils().updateRelatedContextEtag(pConn.getContextName(), response.headers.etag);\n });\n });\n }\n };\n\n // Prepare first child\n const recreatedFirstChild = useMemo(() => {\n const type = rawViewMetadata.config.componentType;\n\n /* Read-only variants */\n if (type === 'SemanticLink' && !canBeChangedInReviewMode) {\n const config = {\n ...rawViewMetadata.config,\n primaryField: rawViewMetadata.config.displayField\n };\n config.caseClass = rawViewMetadata.config.targetObjectClass;\n config.text = config.primaryField;\n config.caseID = config.value;\n config.contextPage = `@P .${\n rawViewMetadata.config?.displayField ? getDataRelationshipContextFromKey(rawViewMetadata.config.displayField) : null\n }`;\n config.resourceParams = {\n workID: config.value\n };\n config.resourcePayload = {\n caseClassName: config.caseClass\n };\n\n return getPConnect().createComponent({\n type: 'SemanticLink',\n config: {\n ...config,\n displayMode,\n referenceType,\n hideLabel,\n dataRelationshipContext: rawViewMetadata.config?.displayField\n ? getDataRelationshipContextFromKey(rawViewMetadata.config.displayField)\n : null\n }\n });\n }\n if (isDisplayModeEnabled && !canBeChangedInReviewMode) {\n return (\n <SingleReferenceReadonly\n config={{\n ...rawViewMetadata.config,\n primaryField: rawViewMetadata.config.displayField\n }}\n getPConnect={getPConnect}\n label={propsToUse.label}\n type={type}\n displayAs='readonly'\n displayMode={displayMode}\n activeViewRuleClass={rawViewMetadata.config.targetObjectClass} // for older views which may not have context class set, fall back to previous behavior\n referenceType={referenceType}\n hideLabel={hideLabel}\n dataRelationshipContext={\n rawViewMetadata.config?.displayField ? getDataRelationshipContextFromKey(rawViewMetadata.config.displayField) : null\n }\n additionalFields={additionalFields}\n />\n );\n }\n\n // 1) Set datasource\n generateColumns(rawViewMetadata.config, pConn, referenceType);\n rawViewMetadata.config.deferDatasource = true;\n rawViewMetadata.config.listType = 'datapage';\n if (['Dropdown', 'AutoComplete'].includes(type) && !rawViewMetadata.config.placeholder) {\n rawViewMetadata.config.placeholder = '@L Select...';\n }\n\n // 2) Pass through configs\n rawViewMetadata.config.showPromotedFilters = showPromotedFilters;\n\n if (!canBeChangedInReviewMode) {\n rawViewMetadata.config.displayMode = displayMode;\n }\n\n // 3) Define field meta\n let fieldMetaData: any = null;\n\n fieldMetaData = {\n datasourceMetadata: {\n datasource: {\n parameters: {}\n }\n }\n };\n if (rawViewMetadata.config?.parameters) {\n fieldMetaData.datasourceMetadata.datasource.parameters = parameters;\n }\n fieldMetaData.datasourceMetadata.datasource.propertyForDisplayText = rawViewMetadata?.config?.datasource?.fields?.text.startsWith('@P')\n ? rawViewMetadata?.config?.datasource?.fields?.text?.substring(3)\n : rawViewMetadata?.config?.datasource?.fields?.text;\n fieldMetaData.datasourceMetadata.datasource.propertyForValue = rawViewMetadata?.config?.datasource?.fields?.value.startsWith('@P')\n ? rawViewMetadata?.config?.datasource?.fields?.value?.substring(3)\n : rawViewMetadata?.config?.datasource?.fields?.value;\n fieldMetaData.datasourceMetadata.datasource.name = rawViewMetadata.config?.referenceList;\n\n return getPConnect().createComponent({\n type,\n config: {\n ...rawViewMetadata.config,\n descriptors: mode === SELECTION_MODE.SINGLE ? refFieldMetadata?.descriptors : null,\n datasourceMetadata: fieldMetaData?.datasourceMetadata,\n required: propsToUse.required,\n visibility: propsToUse.visibility,\n disabled: propsToUse.disabled,\n label: propsToUse.label,\n parameters: rawViewMetadata.config.parameters,\n readOnly: false,\n localeReference: rawViewMetadata.config.localeReference,\n ...(mode === SELECTION_MODE.SINGLE ? { referenceType } : ''),\n contextClass: rawViewMetadata.config.targetObjectClass,\n primaryField: rawViewMetadata.config?.displayField,\n dataRelationshipContext: rawViewMetadata.config?.displayField ? getDataRelationshipContextFromKey(rawViewMetadata.config.displayField) : null,\n hideLabel,\n onRecordChange,\n inline\n }\n });\n }, [rawViewMetadata.config?.datasource?.source, parameters, propsToUse.required, propsToUse.disabled, getPConnect().getPageReference()]);\n\n // Prepare children to render\n return (\n <Grid2 container>\n <Grid2>{recreatedFirstChild}</Grid2>\n </Grid2>\n );\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export { default } from './ObjectReference';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/field/ObjectReference/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default } from './ObjectReference';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/field/ObjectReference/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["export { default } from './ObjectReference';\n"]}
@@ -0,0 +1,17 @@
1
+ export declare const SELECTION_MODE: {
2
+ SINGLE: string;
3
+ MULTI: string;
4
+ };
5
+ export declare const AT_FILTEREDLIST = "@FILTERED_LIST";
6
+ export declare const AT_PROPERTY = "@P";
7
+ export declare const SQUARE_BRACKET_START = "[";
8
+ export declare const SQUARE_BRACKET_END = "]";
9
+ export declare const SIMPLE_TABLE_MANUAL_READONLY = "SimpleTableManualReadOnly";
10
+ export declare const PAGE = "!P!";
11
+ export declare const PAGELIST = "!PL!";
12
+ export declare const PERIOD = ".";
13
+ export declare function updatePageListPropertyValue(value: any): any;
14
+ export declare function getPropertyValue(value: any): any;
15
+ export declare const generateColumns: (config: any, pConn: any, referenceType: any) => void;
16
+ export declare const getDataRelationshipContextFromKey: (key: any) => any;
17
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/components/field/ObjectReference/utils.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc;;;CAAuC,CAAC;AAMnE,eAAO,MAAM,eAAe,mBAAmB,CAAC;AAChD,eAAO,MAAM,WAAW,OAAO,CAAC;AAChC,eAAO,MAAM,oBAAoB,MAAM,CAAC;AACxC,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC,eAAO,MAAM,4BAA4B,8BAA8B,CAAC;AACxE,eAAO,MAAM,IAAI,QAAQ,CAAC;AAC1B,eAAO,MAAM,QAAQ,SAAS,CAAC;AAC/B,eAAO,MAAM,MAAM,MAAM,CAAC;AAG1B,wBAAgB,2BAA2B,CAAC,KAAK,KAAA,OAGhD;AAED,wBAAgB,gBAAgB,CAAC,KAAK,KAAA,OASrC;AAcD,eAAO,MAAM,eAAe,GAAI,WAAM,EAAE,UAAK,EAAE,kBAAa,SA6D3D,CAAC;AAEF,eAAO,MAAM,iCAAiC,GAAG,QAAG,QAAwB,CAAC"}
@@ -0,0 +1,99 @@
1
+ import { Utils } from '../../helpers/utils';
2
+ export const SELECTION_MODE = { SINGLE: 'single', MULTI: 'multi' };
3
+ const getLeafNameFromPropertyName = property => property?.substr(property.lastIndexOf('.'));
4
+ const isSelfReferencedProperty = (param, referenceProp) => param === referenceProp?.split('.', 2)[1];
5
+ export const AT_FILTEREDLIST = '@FILTERED_LIST';
6
+ export const AT_PROPERTY = '@P';
7
+ export const SQUARE_BRACKET_START = '[';
8
+ export const SQUARE_BRACKET_END = ']';
9
+ export const SIMPLE_TABLE_MANUAL_READONLY = 'SimpleTableManualReadOnly';
10
+ export const PAGE = '!P!';
11
+ export const PAGELIST = '!PL!';
12
+ export const PERIOD = '.';
13
+ const AT = '@';
14
+ export function updatePageListPropertyValue(value) {
15
+ value = value.substring(0, value.indexOf(SQUARE_BRACKET_START)) + value.substring(value.indexOf(SQUARE_BRACKET_END) + 1);
16
+ return value;
17
+ }
18
+ export function getPropertyValue(value) {
19
+ if (value.startsWith(AT)) {
20
+ value = value.substring(value.indexOf(' ') + 1);
21
+ if (value.startsWith(PERIOD))
22
+ value = value.substring(1);
23
+ }
24
+ if (value.includes(SQUARE_BRACKET_START)) {
25
+ value = updatePageListPropertyValue(value);
26
+ }
27
+ return value;
28
+ }
29
+ const getCompositeKeys = (c11nEnv, property) => {
30
+ const { datasource: { parameters = {} } = {} } = c11nEnv.getFieldMetadata(property) || {};
31
+ return Object.values(parameters).reduce((compositeKeys, param) => {
32
+ if (isSelfReferencedProperty(property, param)) {
33
+ let propName = getPropertyValue(param);
34
+ propName = propName.substring(propName.indexOf('.'));
35
+ compositeKeys.push(propName);
36
+ }
37
+ return compositeKeys;
38
+ }, []);
39
+ };
40
+ export const generateColumns = (config, pConn, referenceType) => {
41
+ const displayField = getLeafNameFromPropertyName(config.displayField);
42
+ const referenceProp = config.value.split('.', 2)[1];
43
+ const compositeKeys = getCompositeKeys(pConn, referenceProp);
44
+ let value = getLeafNameFromPropertyName(config.value);
45
+ const columns = [];
46
+ if (displayField) {
47
+ columns.push({
48
+ value: displayField,
49
+ display: 'true',
50
+ useForSearch: true,
51
+ primary: 'true'
52
+ });
53
+ }
54
+ if (value && compositeKeys.indexOf(value) !== -1) {
55
+ columns.push({
56
+ value,
57
+ setProperty: 'Associated property',
58
+ key: 'true'
59
+ });
60
+ }
61
+ else {
62
+ const actualValue = compositeKeys.length > 0 ? compositeKeys[0] : value;
63
+ config.value = `@P .${referenceProp}${actualValue}`;
64
+ value = actualValue;
65
+ columns.push({
66
+ value: actualValue,
67
+ setProperty: 'Associated property',
68
+ key: 'true'
69
+ });
70
+ }
71
+ config.datasource = {
72
+ fields: {
73
+ key: getLeafNameFromPropertyName(config.value),
74
+ text: getLeafNameFromPropertyName(config.displayField),
75
+ value: getLeafNameFromPropertyName(config.value)
76
+ }
77
+ };
78
+ if (referenceType === 'Case') {
79
+ columns.push({
80
+ secondary: 'true',
81
+ display: 'true',
82
+ value: Utils.getMappedKey('pyID'),
83
+ useForSearch: true
84
+ });
85
+ }
86
+ compositeKeys.forEach(key => {
87
+ if (value !== key)
88
+ columns.push({
89
+ value: key,
90
+ display: 'false',
91
+ secondary: 'true',
92
+ useForSearch: false,
93
+ setProperty: `.${referenceProp}${key}`
94
+ });
95
+ });
96
+ config.columns = columns;
97
+ };
98
+ export const getDataRelationshipContextFromKey = key => key.split('.', 2)[1];
99
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/components/field/ObjectReference/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AAEnE,MAAM,2BAA2B,GAAG,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;AAE5F,MAAM,wBAAwB,GAAG,CAAC,KAAK,EAAE,aAAa,EAAE,EAAE,CAAC,KAAK,KAAK,aAAa,EAAE,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAErG,MAAM,CAAC,MAAM,eAAe,GAAG,gBAAgB,CAAC;AAChD,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC;AAChC,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAC;AACxC,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAEtC,MAAM,CAAC,MAAM,4BAA4B,GAAG,2BAA2B,CAAC;AACxE,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;AAC1B,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC;AAC/B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAC;AAC1B,MAAM,EAAE,GAAG,GAAG,CAAC;AAEf,MAAM,UAAU,2BAA2B,CAAC,KAAK;IAC/C,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAAC,GAAG,CA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,CAAC,MAAM,CAAC,KAAK,CAAC;YAC9C,IAAI,EAAE,2BAA2B,CAAC,MAAM,CAAC,YAAY,CAAC;YACtD,KAAK,EAAE,2BAA2B,CAAC,MAAM,CAAC,KAAK,CAAC;SACjD;KACF,CAAC;IAEF,IAAI,aAAa,KAAK,MAAM,EAAE,CAAC;QAC7B,OAAO,CAAC,IAAI,CAAC;YACX,SAAS,EAAE,MAAM;YACjB,OAAO,EAAE,MAAM;YACf,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC;YACjC,YAAY,EAAE,IAAI;SACnB,CAAC,CAAC;IACL,CAAC;IAED,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;QAC1B,IAAI,KAAK,KAAK,GAAG;YACf,OAAO,CAAC,IAAI,CAAC;gBACX,KAAK,EAAE,GAAG;gBACV,OAAO,EAAE,OAAO;gBAChB,SAAS,EAAE,MAAM;gBACjB,YAAY,EAAE,KAAK;gBACnB,WAAW,EAAE,IAAI,aAAa,GAAG,GAAG,EAAE;aACvC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;AAC3B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iCAAiC,GAAG,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC","sourcesContent":["import { Utils } from '../../helpers/utils';\n\nexport const SELECTION_MODE = { SINGLE: 'single', MULTI: 'multi' };\n\nconst getLeafNameFromPropertyName = property => property?.substr(property.lastIndexOf('.'));\n\nconst isSelfReferencedProperty = (param, referenceProp) => param === referenceProp?.split('.', 2)[1];\n\nexport const AT_FILTEREDLIST = '@FILTERED_LIST';\nexport const AT_PROPERTY = '@P';\nexport const SQUARE_BRACKET_START = '[';\nexport const SQUARE_BRACKET_END = ']';\n\nexport const SIMPLE_TABLE_MANUAL_READONLY = 'SimpleTableManualReadOnly';\nexport const PAGE = '!P!';\nexport const PAGELIST = '!PL!';\nexport const PERIOD = '.';\nconst AT = '@';\n\nexport function updatePageListPropertyValue(value) {\n value = value.substring(0, value.indexOf(SQUARE_BRACKET_START)) + value.substring(value.indexOf(SQUARE_BRACKET_END) + 1);\n return value;\n}\n\nexport function getPropertyValue(value) {\n if (value.startsWith(AT)) {\n value = value.substring(value.indexOf(' ') + 1);\n if (value.startsWith(PERIOD)) value = value.substring(1);\n }\n if (value.includes(SQUARE_BRACKET_START)) {\n value = updatePageListPropertyValue(value);\n }\n return value;\n}\n\nconst getCompositeKeys = (c11nEnv, property) => {\n const { datasource: { parameters = {} } = {} } = c11nEnv.getFieldMetadata(property) || {};\n return Object.values(parameters).reduce((compositeKeys: any, param) => {\n if (isSelfReferencedProperty(property, param)) {\n let propName = getPropertyValue(param);\n propName = propName.substring(propName.indexOf('.'));\n compositeKeys.push(propName);\n }\n return compositeKeys;\n }, []);\n};\n\nexport const generateColumns = (config, pConn, referenceType) => {\n const displayField = getLeafNameFromPropertyName(config.displayField);\n const referenceProp = config.value.split('.', 2)[1];\n const compositeKeys: any = getCompositeKeys(pConn, referenceProp);\n let value = getLeafNameFromPropertyName(config.value);\n\n const columns: any = [];\n if (displayField) {\n columns.push({\n value: displayField,\n display: 'true',\n useForSearch: true,\n primary: 'true'\n });\n }\n if (value && compositeKeys.indexOf(value) !== -1) {\n columns.push({\n value,\n setProperty: 'Associated property',\n key: 'true'\n });\n } else {\n const actualValue = compositeKeys.length > 0 ? compositeKeys[0] : value;\n config.value = `@P .${referenceProp}${actualValue}`;\n value = actualValue;\n columns.push({\n value: actualValue,\n setProperty: 'Associated property',\n key: 'true'\n });\n }\n\n config.datasource = {\n fields: {\n key: getLeafNameFromPropertyName(config.value),\n text: getLeafNameFromPropertyName(config.displayField),\n value: getLeafNameFromPropertyName(config.value)\n }\n };\n\n if (referenceType === 'Case') {\n columns.push({\n secondary: 'true',\n display: 'true',\n value: Utils.getMappedKey('pyID'),\n useForSearch: true\n });\n }\n\n compositeKeys.forEach(key => {\n if (value !== key)\n columns.push({\n value: key,\n display: 'false',\n secondary: 'true',\n useForSearch: false,\n setProperty: `.${referenceProp}${key}`\n });\n });\n\n config.columns = columns;\n};\n\nexport const getDataRelationshipContextFromKey = key => key.split('.', 2)[1];\n"]}
@@ -1,4 +1,4 @@
1
- import { PConnFieldProps } from '../../../types/PConnProps';
1
+ import type { PConnFieldProps } from '../../../types/PConnProps';
2
2
  interface PercentageProps extends PConnFieldProps {
3
3
  currencyISOCode?: string;
4
4
  showGroupSeparators?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Percentage.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Percentage/Percentage.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAQ5D,UAAU,eAAgB,SAAQ,eAAe;IAE/C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,eAAe,2CA4FxD"}
1
+ {"version":3,"file":"Percentage.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Percentage/Percentage.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAQjE,UAAU,eAAgB,SAAQ,eAAe;IAE/C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,eAAe,2CA4FxD"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useState } from 'react';
2
+ import { useEffect, useState } from 'react';
3
3
  import { NumericFormat } from 'react-number-format';
4
4
  import { TextField } from '@mui/material';
5
5
  import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
@@ -19,7 +19,10 @@ export default function Percentage(props) {
19
19
  const propName = pConn.getStateProps().value;
20
20
  const helperTextToDisplay = validatemessage || helperText;
21
21
  const theCurrencyOptions = getCurrencyOptions(currencyISOCode);
22
- const formattedValue = format(value, pConn.getComponentName().toLowerCase(), theCurrencyOptions);
22
+ const formattedValue = format(value, pConn.getComponentName()?.toLowerCase(), theCurrencyOptions);
23
+ useEffect(() => {
24
+ setValues(value.toString());
25
+ }, [value]);
23
26
  let readOnlyProp = {}; // Note: empty if NOT ReadOnly
24
27
  if (readOnly) {
25
28
  readOnlyProp = { readOnly: true };
@@ -30,10 +33,7 @@ export default function Percentage(props) {
30
33
  if (displayMode === 'STACKED_LARGE_VAL') {
31
34
  return _jsx(FieldValueList, { name: hideLabel ? '' : label, value: formattedValue, variant: 'stacked' });
32
35
  }
33
- let testProp = {};
34
- testProp = {
35
- 'data-test-id': testId
36
- };
36
+ const testProps = { 'data-test-id': testId };
37
37
  const theSymbols = getCurrencyCharacters(currencyISOCode);
38
38
  const theCurrDec = theSymbols.theDecimalIndicator;
39
39
  const theCurrSep = theSymbols.theDigitGroupSeparator;
@@ -45,6 +45,6 @@ export default function Percentage(props) {
45
45
  };
46
46
  return (_jsx(NumericFormat, { valueIsNumericString: true, fullWidth: true, variant: readOnly ? 'standard' : 'outlined', helperText: helperTextToDisplay, placeholder: placeholder ?? '', size: 'small', required: required, disabled: disabled, error: status === 'error', label: label, value: values, onValueChange: val => {
47
47
  handleChange(val);
48
- }, onBlur: !readOnly ? PercentageOnBlur : undefined, decimalSeparator: theCurrDec, thousandSeparator: showGroupSeparators ? theCurrSep : '', decimalScale: decimalPrecision, suffix: '%', InputProps: { ...readOnlyProp, inputProps: { ...testProp } }, customInput: TextField }));
48
+ }, onBlur: !readOnly ? PercentageOnBlur : undefined, decimalSeparator: theCurrDec, thousandSeparator: showGroupSeparators ? theCurrSep : '', decimalScale: decimalPrecision, suffix: '%', slotProps: { input: { ...readOnlyProp, inputProps: { ...testProps } } }, customInput: TextField }));
49
49
  }
50
50
  //# sourceMappingURL=Percentage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Percentage.js","sourceRoot":"","sources":["../../../../src/components/field/Percentage/Percentage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACvF,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAYlD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAsB;IACvD,8EAA8E;IAC9E,MAAM,cAAc,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAE7D,MAAM,EACJ,WAAW,EACX,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,KAAK,GAAG,EAAE,EACV,eAAe,EACf,MAAM;IACN,YAAY;IACZ,UAAU;IACV,QAAQ,EACR,eAAe,GAAG,KAAK,EACvB,MAAM,EACN,UAAU,EACV,WAAW,EACX,SAAS,EACT,WAAW,EACX,mBAAmB,EACnB,gBAAgB,EACjB,GAAG,KAAK,CAAC;IAEV,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;IAEvD,MAAM,KAAK,GAAG,WAAW,EAAE,CAAC;IAC5B,MAAM,OAAO,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC;IACtC,MAAM,QAAQ,GAAI,KAAK,CAAC,aAAa,EAAU,CAAC,KAAK,CA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AAa,IACZ,oBAAoB,QACpB,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,KAAK,EAAE,MAAM,KAAK,OAAO,EACzB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,GAAG,CAAC,EAAE;YACnB,YAAY,CAAC,GAAG,CAAC,CAAC;QACpB,CAAC,EACD,MAAM,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS,EAChD,gBAAgB,EAAE,UAAU,EAC5B,iBAAiB,EAAE,mBAAmB,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EACxD,YAAY,EAAE,gBAAgB,EAC9B,MAAM,EAAC,GAAG,EACV,UAAU,EAAE,EAAE,GAAG,YAAY,EAAE,UAAU,EAAE,EAAE,GAAG,QAAQ,EAAE,EAAE,EAC5D,WAAW,EAAE,SAAS,GACtB,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { useState } from 'react';\nimport { NumericFormat } from 'react-number-format';\nimport { TextField } from '@mui/material';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { PConnFieldProps } from '../../../types/PConnProps';\nimport { getCurrencyCharacters, getCurrencyOptions } from '../Currency/currency-utils';\nimport handleEvent from '../../helpers/event-utils';\nimport { format } from '../../helpers/formatters';\n\n/* Using react-number-format component here, since it allows formatting decimal values,\nas per the locale.\n*/\ninterface PercentageProps extends PConnFieldProps {\n // If any, enter additional props that only exist on Percentage here\n currencyISOCode?: string;\n showGroupSeparators?: string;\n decimalPrecision?: number;\n}\n\nexport default function Percentage(props: PercentageProps) {\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,\n // onBlur,\n readOnly,\n currencyISOCode = 'USD',\n testId,\n helperText,\n displayMode,\n hideLabel,\n placeholder,\n showGroupSeparators,\n decimalPrecision\n } = props;\n\n const [values, setValues] = useState(value.toString());\n\n const pConn = getPConnect();\n const actions = pConn.getActionsApi();\n const propName = (pConn.getStateProps() as any).value;\n const helperTextToDisplay = validatemessage || helperText;\n\n const theCurrencyOptions = getCurrencyOptions(currencyISOCode);\n const formattedValue = format(value, pConn.getComponentName().toLowerCase(), theCurrencyOptions);\n\n let readOnlyProp = {}; // Note: empty if NOT ReadOnly\n\n if (readOnly) {\n readOnlyProp = { readOnly: true };\n }\n\n if (displayMode === 'DISPLAY_ONLY') {\n return <FieldValueList name={hideLabel ? '' : label} value={formattedValue} />;\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n return <FieldValueList name={hideLabel ? '' : label} value={formattedValue} variant='stacked' />;\n }\n\n let testProp = {};\n\n testProp = {\n 'data-test-id': testId\n };\n\n const theSymbols = getCurrencyCharacters(currencyISOCode);\n const theCurrDec = theSymbols.theDecimalIndicator;\n const theCurrSep = theSymbols.theDigitGroupSeparator;\n\n function PercentageOnBlur() {\n handleEvent(actions, 'changeNblur', propName, values);\n }\n\n const handleChange = val => {\n setValues(val.value);\n };\n\n return (\n <NumericFormat\n valueIsNumericString\n fullWidth\n variant={readOnly ? 'standard' : 'outlined'}\n helperText={helperTextToDisplay}\n placeholder={placeholder ?? ''}\n size='small'\n required={required}\n disabled={disabled}\n error={status === 'error'}\n label={label}\n value={values}\n onValueChange={val => {\n handleChange(val);\n }}\n onBlur={!readOnly ? PercentageOnBlur : undefined}\n decimalSeparator={theCurrDec}\n thousandSeparator={showGroupSeparators ? theCurrSep : ''}\n decimalScale={decimalPrecision}\n suffix='%'\n InputProps={{ ...readOnlyProp, inputProps: { ...testProp } }}\n customInput={TextField}\n />\n );\n}\n"]}
1
+ {"version":3,"file":"Percentage.js","sourceRoot":"","sources":["../../../../src/components/field/Percentage/Percentage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACvF,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAYlD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAsB;IACvD,8EAA8E;IAC9E,MAAM,cAAc,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAE7D,MAAM,EACJ,WAAW,EACX,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,KAAK,GAAG,EAAE,EACV,eAAe,EACf,MAAM;IACN,YAAY;IACZ,UAAU;IACV,QAAQ,EACR,eAAe,GAAG,KAAK,EACvB,MAAM,EACN,UAAU,EACV,WAAW,EACX,SAAS,EACT,WAAW,EACX,mBAAmB,EACnB,gBAAgB,EACjB,GAAG,KAAK,CAAC;IAEV,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;IAEvD,MAAM,KAAK,GAAG,WAAW,EAAE,CAAC;IAC5B,MAAM,OAAO,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC;IACtC,MAAM,QAAQ,GAAI,KAAK,CAAC,aAAa,EAAU,CAAC,KAAK,CAAC;IACtD,MAAM,mBAAmB,GAAG,eAAe,IAAI,UAAU,CAAC;IAE1D,MAAM,kBAAkB,GAAG,kBAAkB,CAA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C;IACvB,CAAC,CAAC;IAEF,OAAO,CACL,KAAC,aAAa,IACZ,oBAAoB,QACpB,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,KAAK,EAAE,MAAM,KAAK,OAAO,EACzB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,GAAG,CAAC,EAAE;YACnB,YAAY,CAAC,GAAG,CAAC,CAAC;QACpB,CAAC,EACD,MAAM,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS,EAChD,gBAAgB,EAAE,UAAU,EAC5B,iBAAiB,EAAE,mBAAmB,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EACxD,YAAY,EAAE,gBAAgB,EAC9B,MAAM,EAAC,GAAG,EACV,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,GAAG,YAAY,EAAE,UAAU,EAAE,EAAE,GAAG,SAAS,EAAE,EAAE,EAAE,EACvE,WAAW,EAAE,SAAS,GACtB,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { useEffect, useState } from 'react';\nimport { NumericFormat } from 'react-number-format';\nimport { TextField } from '@mui/material';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport type { PConnFieldProps } from '../../../types/PConnProps';\nimport { getCurrencyCharacters, getCurrencyOptions } from '../Currency/currency-utils';\nimport handleEvent from '../../helpers/event-utils';\nimport { format } from '../../helpers/formatters';\n\n/* Using react-number-format component here, since it allows formatting decimal values,\nas per the locale.\n*/\ninterface PercentageProps extends PConnFieldProps {\n // If any, enter additional props that only exist on Percentage here\n currencyISOCode?: string;\n showGroupSeparators?: string;\n decimalPrecision?: number;\n}\n\nexport default function Percentage(props: PercentageProps) {\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,\n // onBlur,\n readOnly,\n currencyISOCode = 'USD',\n testId,\n helperText,\n displayMode,\n hideLabel,\n placeholder,\n showGroupSeparators,\n decimalPrecision\n } = props;\n\n const [values, setValues] = useState(value.toString());\n\n const pConn = getPConnect();\n const actions = pConn.getActionsApi();\n const propName = (pConn.getStateProps() as any).value;\n const helperTextToDisplay = validatemessage || helperText;\n\n const theCurrencyOptions = getCurrencyOptions(currencyISOCode);\n const formattedValue = format(value, pConn.getComponentName()?.toLowerCase(), theCurrencyOptions);\n\n useEffect(() => {\n setValues(value.toString());\n }, [value]);\n\n let readOnlyProp = {}; // Note: empty if NOT ReadOnly\n\n if (readOnly) {\n readOnlyProp = { readOnly: true };\n }\n\n if (displayMode === 'DISPLAY_ONLY') {\n return <FieldValueList name={hideLabel ? '' : label} value={formattedValue} />;\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n return <FieldValueList name={hideLabel ? '' : label} value={formattedValue} variant='stacked' />;\n }\n\n const testProps: any = { 'data-test-id': testId };\n\n const theSymbols = getCurrencyCharacters(currencyISOCode);\n const theCurrDec = theSymbols.theDecimalIndicator;\n const theCurrSep = theSymbols.theDigitGroupSeparator;\n\n function PercentageOnBlur() {\n handleEvent(actions, 'changeNblur', propName, values);\n }\n\n const handleChange = val => {\n setValues(val.value);\n };\n\n return (\n <NumericFormat\n valueIsNumericString\n fullWidth\n variant={readOnly ? 'standard' : 'outlined'}\n helperText={helperTextToDisplay}\n placeholder={placeholder ?? ''}\n size='small'\n required={required}\n disabled={disabled}\n error={status === 'error'}\n label={label}\n value={values}\n onValueChange={val => {\n handleChange(val);\n }}\n onBlur={!readOnly ? PercentageOnBlur : undefined}\n decimalSeparator={theCurrDec}\n thousandSeparator={showGroupSeparators ? theCurrSep : ''}\n decimalScale={decimalPrecision}\n suffix='%'\n slotProps={{ input: { ...readOnlyProp, inputProps: { ...testProps } } }}\n customInput={TextField}\n />\n );\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { PConnFieldProps } from '../../../types/PConnProps';
1
+ import type { PConnFieldProps } from '../../../types/PConnProps';
2
2
  interface PhoneProps extends PConnFieldProps {
3
3
  }
4
4
  export default function Phone(props: PhoneProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"Phone.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Phone/Phone.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAG5D,UAAU,UAAW,SAAQ,eAAe;CAE3C;AAED,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,KAAK,EAAE,UAAU,2CAmG9C"}
1
+ {"version":3,"file":"Phone.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Phone/Phone.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAGjE,UAAU,UAAW,SAAQ,eAAe;CAE3C;AAED,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,KAAK,EAAE,UAAU,2CAqG9C"}
@@ -25,9 +25,11 @@ export default function Phone(props) {
25
25
  }
26
26
  if (readOnly) {
27
27
  const disableDropdown = true;
28
- return (_jsx("div", { children: _jsx(MuiTelInput, { fullWidth: true, helperText: helperTextToDisplay, placeholder: placeholder ?? '', size: 'small', defaultCountry: 'US', required: required, disabled: disabled, onChange: onChange, error: status === 'error', label: label, value: value, InputProps: {
29
- readOnly: true,
30
- inputProps: { ...testProp }
28
+ return (_jsx("div", { children: _jsx(MuiTelInput, { fullWidth: true, helperText: helperTextToDisplay, placeholder: placeholder ?? '', size: 'small', defaultCountry: 'US', required: required, disabled: disabled, onChange: onChange, error: status === 'error', label: label, value: value, slotProps: {
29
+ input: {
30
+ readOnly: true,
31
+ ...testProp
32
+ }
31
33
  }, disableDropdown: disableDropdown }) }));
32
34
  }
33
35
  const handleChange = inputVal => {
@@ -39,6 +41,6 @@ export default function Phone(props) {
39
41
  phoneNumber = phoneNumber ? `+${phoneValue && phoneValue.replace(/\D+/g, '')}` : '';
40
42
  handleEvent(actions, 'changeNblur', propName, phoneNumber);
41
43
  };
42
- return (_jsx(MuiTelInput, { fullWidth: true, variant: 'outlined', helperText: helperTextToDisplay, placeholder: placeholder ?? '', size: 'small', defaultCountry: 'US', required: required, disabled: disabled, onChange: handleChange, onBlur: !readOnly ? handleBlur : undefined, error: status === 'error', label: label, value: inputValue, InputProps: { ...testProp } }));
44
+ return (_jsx(MuiTelInput, { fullWidth: true, variant: 'outlined', helperText: helperTextToDisplay, placeholder: placeholder ?? '', size: 'small', defaultCountry: 'US', required: required, disabled: disabled, onChange: handleChange, onBlur: !readOnly ? handleBlur : undefined, error: status === 'error', label: label, value: inputValue, slotProps: { input: { ...testProp } } }));
43
45
  }
44
46
  //# sourceMappingURL=Phone.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Phone.js","sourceRoot":"","sources":["../../../../src/components/field/Phone/Phone.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,OAAO,WAAW,MAAM,2BAA2B,CAAC;AAMpD,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,KAAiB;IAC7C,8EAA8E;IAC9E,MAAM,cAAc,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAE7D,MAAM,EACJ,WAAW,EACX,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,KAAK,GAAG,EAAE,EACV,eAAe,EACf,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,MAAM,E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AAE,GAC3B,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { useEffect, useState } from 'react';\nimport { MuiTelInput } from 'mui-tel-input';\n\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { PConnFieldProps } from '../../../types/PConnProps';\nimport handleEvent from '../../helpers/event-utils';\n\ninterface PhoneProps extends PConnFieldProps {\n // If any, enter additional props that only exist on Phone here\n}\n\nexport default function Phone(props: PhoneProps) {\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,\n readOnly,\n testId,\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 [inputValue, setInputValue] = useState(value);\n useEffect(() => setInputValue(value), [value]);\n\n const helperTextToDisplay = validatemessage || helperText;\n\n let testProp = {};\n\n testProp = {\n 'data-test-id': testId\n };\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 const disableDropdown = true;\n return (\n <div>\n <MuiTelInput\n fullWidth\n helperText={helperTextToDisplay}\n placeholder={placeholder ?? ''}\n size='small'\n defaultCountry='US'\n required={required}\n disabled={disabled}\n onChange={onChange}\n error={status === 'error'}\n label={label}\n value={value}\n InputProps={{\n readOnly: true,\n inputProps: { ...testProp }\n }}\n disableDropdown={disableDropdown}\n />\n </div>\n );\n }\n\n const handleChange = inputVal => {\n setInputValue(inputVal);\n };\n\n const handleBlur = event => {\n const phoneValue = event?.target?.value;\n let phoneNumber = phoneValue.split(' ').slice(1).join();\n phoneNumber = phoneNumber ? `+${phoneValue && phoneValue.replace(/\\D+/g, '')}` : '';\n handleEvent(actions, 'changeNblur', propName, phoneNumber);\n };\n\n return (\n <MuiTelInput\n fullWidth\n variant='outlined'\n helperText={helperTextToDisplay}\n placeholder={placeholder ?? ''}\n size='small'\n defaultCountry='US'\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={{ ...testProp }}\n />\n );\n}\n"]}
1
+ {"version":3,"file":"Phone.js","sourceRoot":"","sources":["../../../../src/components/field/Phone/Phone.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,OAAO,WAAW,MAAM,2BAA2B,CAAC;AAMpD,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,KAAiB;IAC7C,8EAA8E;IAC9E,MAAM,cAAc,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAE7D,MAAM,EACJ,WAAW,EACX,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,KAAK,GAAG,EAAE,EACV,eAAe,EACf,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,UAAU,EACV,WAAW,EACX,SAAS,EACT,WAAW,EACZ,GAAG,KAAK,CAAC;IAEV,MAAM,KAAK,GAAG,WAAW,EAAE,CAAC;IAC5B,MAAM,OAAO,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC;IACtC,MAAM,QAAQ,GAAI,KAAK,CAAC,aAAa,EAAU,CAAC,KAAK,CAAC;IAEtD,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpD,SAAS,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAE/C,MAAM,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G,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC;QACxC,IAAI,WAAW,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QACxD,WAAW,GAAG,WAAW,CAAC,CAAC,CAAC,IAAI,UAAU,IAAI,UAAU,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACpF,WAAW,CAAC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;IAC7D,CAAC,CAAC;IAEF,OAAO,CACL,KAAC,WAAW,IACV,SAAS,QACT,OAAO,EAAC,UAAU,EAClB,UAAU,EAAE,mBAAmB,EAC/B,WAAW,EAAE,WAAW,IAAI,EAAE,EAC9B,IAAI,EAAC,OAAO,EACZ,cAAc,EAAC,IAAI,EACnB,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,EAAE,KAAK,EAAE,EAAE,GAAG,QAAQ,EAAE,EAAE,GACrC,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { useEffect, useState } from 'react';\nimport { MuiTelInput } from 'mui-tel-input';\n\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport type { PConnFieldProps } from '../../../types/PConnProps';\nimport handleEvent from '../../helpers/event-utils';\n\ninterface PhoneProps extends PConnFieldProps {\n // If any, enter additional props that only exist on Phone here\n}\n\nexport default function Phone(props: PhoneProps) {\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,\n readOnly,\n testId,\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 [inputValue, setInputValue] = useState(value);\n useEffect(() => setInputValue(value), [value]);\n\n const helperTextToDisplay = validatemessage || helperText;\n\n let testProp = {};\n\n testProp = {\n 'data-test-id': testId\n };\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 const disableDropdown = true;\n return (\n <div>\n <MuiTelInput\n fullWidth\n helperText={helperTextToDisplay}\n placeholder={placeholder ?? ''}\n size='small'\n defaultCountry='US'\n required={required}\n disabled={disabled}\n onChange={onChange}\n error={status === 'error'}\n label={label}\n value={value}\n slotProps={{\n input: {\n readOnly: true,\n ...testProp\n }\n }}\n disableDropdown={disableDropdown}\n />\n </div>\n );\n }\n\n const handleChange = inputVal => {\n setInputValue(inputVal);\n };\n\n const handleBlur = event => {\n const phoneValue = event?.target?.value;\n let phoneNumber = phoneValue.split(' ').slice(1).join();\n phoneNumber = phoneNumber ? `+${phoneValue && phoneValue.replace(/\\D+/g, '')}` : '';\n handleEvent(actions, 'changeNblur', propName, phoneNumber);\n };\n\n return (\n <MuiTelInput\n fullWidth\n variant='outlined'\n helperText={helperTextToDisplay}\n placeholder={placeholder ?? ''}\n size='small'\n defaultCountry='US'\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={{ input: { ...testProp } }}\n />\n );\n}\n"]}
@@ -1,7 +1,14 @@
1
- import { PConnFieldProps } from '../../../types/PConnProps';
1
+ import type { PConnFieldProps } from '../../../types/PConnProps';
2
2
  interface RadioButtonsProps extends PConnFieldProps {
3
3
  inline: boolean;
4
4
  fieldMetadata?: any;
5
+ variant?: string;
6
+ hideFieldLabels?: boolean;
7
+ additionalProps?: any;
8
+ imagePosition?: string;
9
+ imageSize?: string;
10
+ showImageDescription?: boolean;
11
+ datasource?: any;
5
12
  }
6
13
  export default function RadioButtons(props: RadioButtonsProps): import("react/jsx-runtime").JSX.Element;
7
14
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"RadioButtons.d.ts","sourceRoot":"","sources":["../../../../src/components/field/RadioButtons/RadioButtons.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAG5D,UAAU,iBAAkB,SAAQ,eAAe;IAEjD,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,CAAC,EAAE,GAAG,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CAoG5D"}
1
+ {"version":3,"file":"RadioButtons.d.ts","sourceRoot":"","sources":["../../../../src/components/field/RadioButtons/RadioButtons.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAGjE,UAAU,iBAAkB,SAAQ,eAAe;IAEjD,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,eAAe,CAAC,EAAE,GAAG,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,UAAU,CAAC,EAAE,GAAG,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CAuI5D"}
@@ -7,7 +7,8 @@ import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
7
7
  export default function RadioButtons(props) {
8
8
  // Get emitted components from map (so we can get any override that may exist)
9
9
  const FieldValueList = getComponentFromMap('FieldValueList');
10
- const { getPConnect, label, value = '', readOnly, validatemessage, helperText, status, required, inline, displayMode, hideLabel, fieldMetadata } = props;
10
+ const SelectableCard = getComponentFromMap('SelectableCard');
11
+ const { getPConnect, label, value = '', readOnly, validatemessage, helperText, status, required, inline, displayMode, hideLabel, fieldMetadata, variant, hideFieldLabels, additionalProps, datasource, imagePosition, imageSize, showImageDescription } = props;
11
12
  const [theSelectedButton, setSelectedButton] = useState(value);
12
13
  const thePConn = getPConnect();
13
14
  const theConfigProps = thePConn.getConfigProps();
@@ -33,14 +34,10 @@ export default function RadioButtons(props) {
33
34
  setSelectedButton(value);
34
35
  }, [value]);
35
36
  if (displayMode === 'DISPLAY_ONLY') {
36
- return (_jsx(FieldValueList, { name: hideLabel ? '' : label,
37
- // @ts-ignore - Property 'getLocaleRuleNameFromKeys' is private and only accessible within class 'C11nEnv'
38
- value: thePConn.getLocalizedValue(value, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)) }));
37
+ return (_jsx(FieldValueList, { name: hideLabel ? '' : label, value: thePConn.getLocalizedValue(value, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)) }));
39
38
  }
40
39
  if (displayMode === 'STACKED_LARGE_VAL') {
41
- return (_jsx(FieldValueList, { name: hideLabel ? '' : label,
42
- // @ts-ignore - Property 'getLocaleRuleNameFromKeys' is private and only accessible within class 'C11nEnv'
43
- value: thePConn.getLocalizedValue(value, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)), variant: 'stacked' }));
40
+ return (_jsx(FieldValueList, { name: hideLabel ? '' : label, value: thePConn.getLocalizedValue(value, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)), variant: 'stacked' }));
44
41
  }
45
42
  const handleChange = event => {
46
43
  handleEvent(actionsApi, 'changeNblur', propName, event.target.value);
@@ -48,10 +45,18 @@ export default function RadioButtons(props) {
48
45
  const handleBlur = event => {
49
46
  thePConn.getValidationApi().validate(event.target.value, ''); // 2nd arg empty string until typedef marked correctly as optional
50
47
  };
48
+ if (variant === 'card') {
49
+ const stateProps = thePConn.getStateProps();
50
+ return (_jsxs("div", { children: [_jsx("h4", { style: { marginTop: 0, marginBottom: 0 }, children: label }), _jsx("div", { id: 'selectable-card', style: { display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(min(200px, 100%), 1fr))', gap: '1rem' }, children: _jsx(SelectableCard, { hideFieldLabels: hideFieldLabels, additionalProps: additionalProps, getPConnect: getPConnect, dataSource: datasource, image: {
51
+ imagePosition,
52
+ imageSize,
53
+ showImageDescription,
54
+ imageField: stateProps.image?.split('.').pop(),
55
+ imageDescription: stateProps.imageDescription?.split('.').pop()
56
+ }, onChange: handleChange, recordKey: stateProps.value?.split('.').pop(), cardLabel: stateProps.primaryField?.split('.').pop(), radioBtnValue: value, type: 'radio', setIsRadioCardSelected: displayMode !== 'DISPLAY_ONLY' ? setSelectedButton : undefined }) })] }));
57
+ }
51
58
  return (_jsxs(FormControl, { variant: 'standard', error: status === 'error', required: required, children: [_jsx(FormLabel, { component: 'legend', children: label }), _jsx(RadioGroup, { value: theSelectedButton, onChange: handleChange, onBlur: !readOnly ? handleBlur : undefined, row: inline, children: theOptions.map(theOption => {
52
- return (_jsx(FormControlLabel, { value: theOption.key, label: thePConn.getLocalizedValue(theOption.value, localePath,
53
- // @ts-ignore - Property 'getLocaleRuleNameFromKeys' is private and only accessible within class 'C11nEnv'
54
- thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)), control: _jsx(Radio, { color: 'primary', disabled: readOnly }, theOption.key) }, theOption.key));
59
+ return (_jsx(FormControlLabel, { value: theOption.key, label: thePConn.getLocalizedValue(theOption.value, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)), control: _jsx(Radio, { color: 'primary', disabled: readOnly }, theOption.key) }, theOption.key));
55
60
  }) }), _jsx(FormHelperText, { children: helperTextToDisplay })] }));
56
61
  }
57
62
  //# sourceMappingURL=RadioButtons.js.map