@pega/react-sdk-components 24.2.11 → 25.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (665) 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.css +46 -0
  11. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts +2 -1
  12. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts.map +1 -1
  13. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js +18 -16
  14. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.map +1 -1
  15. package/lib/components/designSystemExtension/Banner/Banner.css +1 -1
  16. package/lib/components/designSystemExtension/Banner/Banner.d.ts.map +1 -1
  17. package/lib/components/designSystemExtension/Banner/Banner.js +2 -2
  18. package/lib/components/designSystemExtension/Banner/Banner.js.map +1 -1
  19. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
  20. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
  21. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +50 -35
  22. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
  23. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts.map +1 -1
  24. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +6 -8
  25. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
  26. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts +1 -1
  27. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
  28. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +3 -5
  29. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
  30. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js +3 -3
  31. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
  32. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts.map +1 -1
  33. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +4 -6
  34. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
  35. package/lib/components/designSystemExtension/Operator/Operator.d.ts +1 -1
  36. package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
  37. package/lib/components/designSystemExtension/Operator/Operator.js +12 -9
  38. package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
  39. package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +1 -1
  40. package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
  41. package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
  42. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -1
  43. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +32 -4
  44. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -1
  45. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.css +7 -14
  46. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts.map +1 -1
  47. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js +12 -2
  48. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
  49. package/lib/components/field/AutoComplete/AutoComplete.d.ts +1 -1
  50. package/lib/components/field/AutoComplete/AutoComplete.d.ts.map +1 -1
  51. package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
  52. package/lib/components/field/CancelAlert/CancelAlert.css +4 -4
  53. package/lib/components/field/CancelAlert/CancelAlert.d.ts +1 -1
  54. package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
  55. package/lib/components/field/CancelAlert/CancelAlert.js +3 -3
  56. package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
  57. package/lib/components/field/Checkbox/Checkbox.d.ts +9 -1
  58. package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
  59. package/lib/components/field/Checkbox/Checkbox.js +52 -3
  60. package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
  61. package/lib/components/field/Currency/Currency.d.ts +1 -1
  62. package/lib/components/field/Currency/Currency.d.ts.map +1 -1
  63. package/lib/components/field/Currency/Currency.js +2 -2
  64. package/lib/components/field/Currency/Currency.js.map +1 -1
  65. package/lib/components/field/Currency/currency-utils.d.ts.map +1 -1
  66. package/lib/components/field/Currency/currency-utils.js +0 -2
  67. package/lib/components/field/Currency/currency-utils.js.map +1 -1
  68. package/lib/components/field/Date/Date.d.ts +1 -1
  69. package/lib/components/field/Date/Date.d.ts.map +1 -1
  70. package/lib/components/field/Date/Date.js +3 -6
  71. package/lib/components/field/Date/Date.js.map +1 -1
  72. package/lib/components/field/DateTime/DateTime.d.ts +1 -1
  73. package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
  74. package/lib/components/field/DateTime/DateTime.js +4 -7
  75. package/lib/components/field/DateTime/DateTime.js.map +1 -1
  76. package/lib/components/field/Decimal/Decimal.d.ts +1 -1
  77. package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
  78. package/lib/components/field/Decimal/Decimal.js +2 -4
  79. package/lib/components/field/Decimal/Decimal.js.map +1 -1
  80. package/lib/components/field/Dropdown/Dropdown.d.ts +1 -1
  81. package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
  82. package/lib/components/field/Dropdown/Dropdown.js +6 -9
  83. package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
  84. package/lib/components/field/Email/Email.d.ts +1 -1
  85. package/lib/components/field/Email/Email.d.ts.map +1 -1
  86. package/lib/components/field/Email/Email.js +6 -7
  87. package/lib/components/field/Email/Email.js.map +1 -1
  88. package/lib/components/field/Group/Group.d.ts +2 -2
  89. package/lib/components/field/Group/Group.d.ts.map +1 -1
  90. package/lib/components/field/Group/Group.js +4 -3
  91. package/lib/components/field/Group/Group.js.map +1 -1
  92. package/lib/components/field/Integer/Integer.d.ts +1 -1
  93. package/lib/components/field/Integer/Integer.d.ts.map +1 -1
  94. package/lib/components/field/Integer/Integer.js +4 -5
  95. package/lib/components/field/Integer/Integer.js.map +1 -1
  96. package/lib/components/field/Location/Location.css +4 -0
  97. package/lib/components/field/Location/Location.d.ts +11 -0
  98. package/lib/components/field/Location/Location.d.ts.map +1 -0
  99. package/lib/components/field/Location/Location.js +158 -0
  100. package/lib/components/field/Location/Location.js.map +1 -0
  101. package/lib/components/field/Location/index.d.ts +2 -0
  102. package/lib/components/field/Location/index.d.ts.map +1 -0
  103. package/lib/components/field/Location/index.js +2 -0
  104. package/lib/components/field/Location/index.js.map +1 -0
  105. package/lib/components/field/Multiselect/Multiselect.js.map +1 -1
  106. package/lib/components/field/Multiselect/utils.d.ts +2 -1
  107. package/lib/components/field/Multiselect/utils.d.ts.map +1 -1
  108. package/lib/components/field/Multiselect/utils.js +1 -1
  109. package/lib/components/field/Multiselect/utils.js.map +1 -1
  110. package/lib/components/field/ObjectReference/ObjectReference.d.ts +16 -0
  111. package/lib/components/field/ObjectReference/ObjectReference.d.ts.map +1 -0
  112. package/lib/components/field/ObjectReference/ObjectReference.js +165 -0
  113. package/lib/components/field/ObjectReference/ObjectReference.js.map +1 -0
  114. package/lib/components/field/ObjectReference/index.d.ts +2 -0
  115. package/lib/components/field/ObjectReference/index.d.ts.map +1 -0
  116. package/lib/components/field/ObjectReference/index.js +2 -0
  117. package/lib/components/field/ObjectReference/index.js.map +1 -0
  118. package/lib/components/field/ObjectReference/utils.d.ts +17 -0
  119. package/lib/components/field/ObjectReference/utils.d.ts.map +1 -0
  120. package/lib/components/field/ObjectReference/utils.js +99 -0
  121. package/lib/components/field/ObjectReference/utils.js.map +1 -0
  122. package/lib/components/field/Percentage/Percentage.d.ts +1 -1
  123. package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
  124. package/lib/components/field/Percentage/Percentage.js +2 -5
  125. package/lib/components/field/Percentage/Percentage.js.map +1 -1
  126. package/lib/components/field/Phone/Phone.d.ts +1 -1
  127. package/lib/components/field/Phone/Phone.d.ts.map +1 -1
  128. package/lib/components/field/Phone/Phone.js +6 -4
  129. package/lib/components/field/Phone/Phone.js.map +1 -1
  130. package/lib/components/field/RadioButtons/RadioButtons.d.ts +8 -1
  131. package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
  132. package/lib/components/field/RadioButtons/RadioButtons.js +12 -1
  133. package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
  134. package/lib/components/field/RichText/RichText.css +79 -0
  135. package/lib/components/field/RichText/RichText.d.ts +2 -1
  136. package/lib/components/field/RichText/RichText.d.ts.map +1 -1
  137. package/lib/components/field/RichText/RichText.js +1 -0
  138. package/lib/components/field/RichText/RichText.js.map +1 -1
  139. package/lib/components/field/ScalarList/ScalarList.d.ts +1 -1
  140. package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -1
  141. package/lib/components/field/ScalarList/ScalarList.js +1 -2
  142. package/lib/components/field/ScalarList/ScalarList.js.map +1 -1
  143. package/lib/components/field/SelectableCard/SelectableCard.d.ts +2 -0
  144. package/lib/components/field/SelectableCard/SelectableCard.d.ts.map +1 -0
  145. package/lib/components/field/SelectableCard/SelectableCard.js +68 -0
  146. package/lib/components/field/SelectableCard/SelectableCard.js.map +1 -0
  147. package/lib/components/field/SelectableCard/index.d.ts +2 -0
  148. package/lib/components/field/SelectableCard/index.d.ts.map +1 -0
  149. package/lib/components/field/SelectableCard/index.js +2 -0
  150. package/lib/components/field/SelectableCard/index.js.map +1 -0
  151. package/lib/components/field/SelectableCard/utils.d.ts +13 -0
  152. package/lib/components/field/SelectableCard/utils.d.ts.map +1 -0
  153. package/lib/components/field/SelectableCard/utils.js +183 -0
  154. package/lib/components/field/SelectableCard/utils.js.map +1 -0
  155. package/lib/components/field/SemanticLink/SemanticLink.d.ts +10 -2
  156. package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
  157. package/lib/components/field/SemanticLink/SemanticLink.js +128 -15
  158. package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
  159. package/lib/components/field/SemanticLink/utils.js +1 -1
  160. package/lib/components/field/SemanticLink/utils.js.map +1 -1
  161. package/lib/components/field/TextArea/TextArea.d.ts +1 -1
  162. package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
  163. package/lib/components/field/TextArea/TextArea.js +4 -5
  164. package/lib/components/field/TextArea/TextArea.js.map +1 -1
  165. package/lib/components/field/TextContent/TextContent.d.ts +1 -1
  166. package/lib/components/field/TextContent/TextContent.d.ts.map +1 -1
  167. package/lib/components/field/TextContent/TextContent.js +0 -1
  168. package/lib/components/field/TextContent/TextContent.js.map +1 -1
  169. package/lib/components/field/TextInput/TextInput.d.ts +1 -1
  170. package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
  171. package/lib/components/field/TextInput/TextInput.js +4 -5
  172. package/lib/components/field/TextInput/TextInput.js.map +1 -1
  173. package/lib/components/field/Time/Time.d.ts +1 -1
  174. package/lib/components/field/Time/Time.d.ts.map +1 -1
  175. package/lib/components/field/Time/Time.js +2 -5
  176. package/lib/components/field/Time/Time.js.map +1 -1
  177. package/lib/components/field/URL/URL.d.ts +1 -1
  178. package/lib/components/field/URL/URL.d.ts.map +1 -1
  179. package/lib/components/field/URL/URL.js +4 -5
  180. package/lib/components/field/URL/URL.js.map +1 -1
  181. package/lib/components/field/UserReference/UserReference.d.ts +1 -2
  182. package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
  183. package/lib/components/field/UserReference/UserReference.js +1 -2
  184. package/lib/components/field/UserReference/UserReference.js.map +1 -1
  185. package/lib/components/field/UserReference/UserReferenceUtils.d.ts.map +1 -1
  186. package/lib/components/field/UserReference/UserReferenceUtils.js.map +1 -1
  187. package/lib/components/helpers/attachmentShared.d.ts +2 -0
  188. package/lib/components/helpers/attachmentShared.d.ts.map +1 -0
  189. package/lib/components/helpers/attachmentShared.js +6 -0
  190. package/lib/components/helpers/attachmentShared.js.map +1 -0
  191. package/lib/components/helpers/case-utils.js.map +1 -1
  192. package/lib/components/helpers/common-utils.d.ts +1 -1
  193. package/lib/components/helpers/common-utils.d.ts.map +1 -1
  194. package/lib/components/helpers/common-utils.js +1 -2
  195. package/lib/components/helpers/common-utils.js.map +1 -1
  196. package/lib/components/helpers/data_page.d.ts.map +1 -1
  197. package/lib/components/helpers/data_page.js +0 -1
  198. package/lib/components/helpers/data_page.js.map +1 -1
  199. package/lib/components/helpers/date-format-utils.d.ts.map +1 -1
  200. package/lib/components/helpers/event-utils.d.ts.map +1 -1
  201. package/lib/components/helpers/event-utils.js.map +1 -1
  202. package/lib/components/helpers/field-group-utils.d.ts +1 -1
  203. package/lib/components/helpers/field-group-utils.d.ts.map +1 -1
  204. package/lib/components/helpers/field-group-utils.js.map +1 -1
  205. package/lib/components/helpers/formatters/Boolean.js.map +1 -1
  206. package/lib/components/helpers/formatters/Currency.d.ts +1 -0
  207. package/lib/components/helpers/formatters/Currency.d.ts.map +1 -1
  208. package/lib/components/helpers/formatters/Currency.js +8 -4
  209. package/lib/components/helpers/formatters/Currency.js.map +1 -1
  210. package/lib/components/helpers/formatters/CurrencyMap.d.ts.map +1 -1
  211. package/lib/components/helpers/formatters/CurrencyMap.js +0 -1
  212. package/lib/components/helpers/formatters/CurrencyMap.js.map +1 -1
  213. package/lib/components/helpers/formatters/Date.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.map +1 -1
  217. package/lib/components/helpers/instructions-utils.d.ts.map +1 -1
  218. package/lib/components/helpers/object-utils.d.ts +9 -0
  219. package/lib/components/helpers/object-utils.d.ts.map +1 -0
  220. package/lib/components/helpers/object-utils.js +11 -0
  221. package/lib/components/helpers/object-utils.js.map +1 -0
  222. package/lib/components/helpers/reactContextHelpers.d.ts +0 -1
  223. package/lib/components/helpers/reactContextHelpers.d.ts.map +1 -1
  224. package/lib/components/helpers/simpleTableHelpers.d.ts +15 -1
  225. package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
  226. package/lib/components/helpers/simpleTableHelpers.js +111 -5
  227. package/lib/components/helpers/simpleTableHelpers.js.map +1 -1
  228. package/lib/components/helpers/state-utils.d.ts.map +1 -1
  229. package/lib/components/helpers/state-utils.js.map +1 -1
  230. package/lib/components/helpers/template-utils.js.map +1 -1
  231. package/lib/components/helpers/utils.d.ts +1 -0
  232. package/lib/components/helpers/utils.d.ts.map +1 -1
  233. package/lib/components/helpers/utils.js +7 -1
  234. package/lib/components/helpers/utils.js.map +1 -1
  235. package/lib/components/helpers/versionHelpers.d.ts.map +1 -1
  236. package/lib/components/helpers/versionHelpers.js +0 -1
  237. package/lib/components/helpers/versionHelpers.js.map +1 -1
  238. package/lib/components/infra/ActionButtons/ActionButtons.d.ts.map +1 -1
  239. package/lib/components/infra/ActionButtons/ActionButtons.js +12 -7
  240. package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
  241. package/lib/components/infra/Assignment/Assignment.d.ts +2 -2
  242. package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
  243. package/lib/components/infra/Assignment/Assignment.js +38 -30
  244. package/lib/components/infra/Assignment/Assignment.js.map +1 -1
  245. package/lib/components/infra/Assignment/useValidationBanner.d.ts +7 -0
  246. package/lib/components/infra/Assignment/useValidationBanner.d.ts.map +1 -0
  247. package/lib/components/infra/Assignment/useValidationBanner.js +26 -0
  248. package/lib/components/infra/Assignment/useValidationBanner.js.map +1 -0
  249. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +2 -2
  250. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
  251. package/lib/components/infra/AssignmentCard/AssignmentCard.js.map +1 -1
  252. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +1 -2
  253. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
  254. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +20 -85
  255. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
  256. package/lib/components/infra/Containers/FlowContainer/helpers.d.ts.map +1 -1
  257. package/lib/components/infra/Containers/FlowContainer/helpers.js.map +1 -1
  258. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts +1 -1
  259. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts.map +1 -1
  260. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js +0 -1
  261. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js.map +1 -1
  262. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +5 -1
  263. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
  264. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +4 -5
  265. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
  266. package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts +0 -1
  267. package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts.map +1 -1
  268. package/lib/components/infra/Containers/SimpleView/helper.d.ts +0 -1
  269. package/lib/components/infra/Containers/SimpleView/helper.d.ts.map +1 -1
  270. package/lib/components/infra/Containers/SimpleView/helper.js.map +1 -1
  271. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +5 -1
  272. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
  273. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +7 -11
  274. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
  275. package/lib/components/infra/Containers/container-helpers.d.ts +1 -0
  276. package/lib/components/infra/Containers/container-helpers.d.ts.map +1 -1
  277. package/lib/components/infra/Containers/container-helpers.js +46 -1
  278. package/lib/components/infra/Containers/container-helpers.js.map +1 -1
  279. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +2 -2
  280. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
  281. package/lib/components/infra/DashboardFilter/DashboardFilter.js +1 -4
  282. package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
  283. package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -1
  284. package/lib/components/infra/DashboardFilter/filterUtils.js +2 -3
  285. package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
  286. package/lib/components/infra/DeferLoad/DeferLoad.d.ts +2 -1
  287. package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
  288. package/lib/components/infra/DeferLoad/DeferLoad.js +26 -13
  289. package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
  290. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +1 -1
  291. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
  292. package/lib/components/infra/ErrorBoundary/ErrorBoundary.js +0 -2
  293. package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
  294. package/lib/components/infra/MultiStep/MultiStep.css +48 -70
  295. package/lib/components/infra/MultiStep/MultiStep.d.ts +2 -2
  296. package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
  297. package/lib/components/infra/MultiStep/MultiStep.js +19 -37
  298. package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
  299. package/lib/components/infra/NavBar/NavBar.css +1 -1
  300. package/lib/components/infra/NavBar/NavBar.d.ts +1 -1
  301. package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
  302. package/lib/components/infra/NavBar/NavBar.js +19 -7
  303. package/lib/components/infra/NavBar/NavBar.js.map +1 -1
  304. package/lib/components/infra/Reference/Reference.d.ts +1 -1
  305. package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
  306. package/lib/components/infra/Reference/Reference.js +6 -3
  307. package/lib/components/infra/Reference/Reference.js.map +1 -1
  308. package/lib/components/infra/Region/Region.d.ts +1 -1
  309. package/lib/components/infra/Region/Region.d.ts.map +1 -1
  310. package/lib/components/infra/Region/Region.js.map +1 -1
  311. package/lib/components/infra/RootContainer/RootContainer.d.ts +2 -2
  312. package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
  313. package/lib/components/infra/RootContainer/RootContainer.js +4 -6
  314. package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
  315. package/lib/components/infra/Stages/Stages.d.ts +1 -1
  316. package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
  317. package/lib/components/infra/Stages/Stages.js +2 -2
  318. package/lib/components/infra/Stages/Stages.js.map +1 -1
  319. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +1 -1
  320. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
  321. package/lib/components/infra/View/View.d.ts +2 -2
  322. package/lib/components/infra/View/View.d.ts.map +1 -1
  323. package/lib/components/infra/View/View.js +7 -7
  324. package/lib/components/infra/View/View.js.map +1 -1
  325. package/lib/components/template/AdvancedSearch/AdvancedSearch.d.ts +2 -0
  326. package/lib/components/template/AdvancedSearch/AdvancedSearch.d.ts.map +1 -0
  327. package/lib/components/template/AdvancedSearch/AdvancedSearch.js +68 -0
  328. package/lib/components/template/AdvancedSearch/AdvancedSearch.js.map +1 -0
  329. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.d.ts +23 -0
  330. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.d.ts.map +1 -0
  331. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.js +26 -0
  332. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.js.map +1 -0
  333. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.d.ts +3 -0
  334. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.d.ts.map +1 -0
  335. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.js +179 -0
  336. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.js.map +1 -0
  337. package/lib/components/template/AdvancedSearch/SearchGroups/hooks.d.ts +10 -0
  338. package/lib/components/template/AdvancedSearch/SearchGroups/hooks.d.ts.map +1 -0
  339. package/lib/components/template/AdvancedSearch/SearchGroups/hooks.js +25 -0
  340. package/lib/components/template/AdvancedSearch/SearchGroups/hooks.js.map +1 -0
  341. package/lib/components/template/AdvancedSearch/SearchGroups/index.d.ts +2 -0
  342. package/lib/components/template/AdvancedSearch/SearchGroups/index.d.ts.map +1 -0
  343. package/lib/components/template/AdvancedSearch/SearchGroups/index.js +2 -0
  344. package/lib/components/template/AdvancedSearch/SearchGroups/index.js.map +1 -0
  345. package/lib/components/template/AdvancedSearch/SearchGroups/utils.d.ts +16 -0
  346. package/lib/components/template/AdvancedSearch/SearchGroups/utils.d.ts.map +1 -0
  347. package/lib/components/template/AdvancedSearch/SearchGroups/utils.js +22 -0
  348. package/lib/components/template/AdvancedSearch/SearchGroups/utils.js.map +1 -0
  349. package/lib/components/template/AdvancedSearch/TemplateContext.d.ts +10 -0
  350. package/lib/components/template/AdvancedSearch/TemplateContext.d.ts.map +1 -0
  351. package/lib/components/template/AdvancedSearch/TemplateContext.js +11 -0
  352. package/lib/components/template/AdvancedSearch/TemplateContext.js.map +1 -0
  353. package/lib/components/template/AdvancedSearch/index.d.ts +2 -0
  354. package/lib/components/template/AdvancedSearch/index.d.ts.map +1 -0
  355. package/lib/components/template/AdvancedSearch/index.js +2 -0
  356. package/lib/components/template/AdvancedSearch/index.js.map +1 -0
  357. package/lib/components/template/AppShell/AppShell.css +1 -5
  358. package/lib/components/template/AppShell/AppShell.d.ts +2 -2
  359. package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
  360. package/lib/components/template/AppShell/AppShell.js +10 -13
  361. package/lib/components/template/AppShell/AppShell.js.map +1 -1
  362. package/lib/components/template/BannerPage/BannerPage.d.ts +2 -2
  363. package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
  364. package/lib/components/template/BannerPage/BannerPage.js.map +1 -1
  365. package/lib/components/template/CaseSummary/CaseSummary.d.ts +4 -2
  366. package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
  367. package/lib/components/template/CaseSummary/CaseSummary.js +22 -39
  368. package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
  369. package/lib/components/template/CaseView/CaseView.d.ts +2 -2
  370. package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
  371. package/lib/components/template/CaseView/CaseView.js +13 -15
  372. package/lib/components/template/CaseView/CaseView.js.map +1 -1
  373. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +1 -1
  374. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
  375. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +1 -1
  376. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
  377. package/lib/components/template/Confirmation/Confirmation.d.ts +2 -2
  378. package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
  379. package/lib/components/template/Confirmation/Confirmation.js +0 -1
  380. package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
  381. package/lib/components/template/DataReference/DataReference.d.ts +9 -2
  382. package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
  383. package/lib/components/template/DataReference/DataReference.js +239 -80
  384. package/lib/components/template/DataReference/DataReference.js.map +1 -1
  385. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.d.ts +8 -0
  386. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.d.ts.map +1 -0
  387. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.js +9 -0
  388. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.js.map +1 -0
  389. package/lib/components/template/DataReference/SearchForm.d.ts +3 -0
  390. package/lib/components/template/DataReference/SearchForm.d.ts.map +1 -0
  391. package/lib/components/template/DataReference/SearchForm.js +87 -0
  392. package/lib/components/template/DataReference/SearchForm.js.map +1 -0
  393. package/lib/components/template/DataReference/utils.d.ts +15 -0
  394. package/lib/components/template/DataReference/utils.d.ts.map +1 -0
  395. package/lib/components/template/DataReference/utils.js +75 -0
  396. package/lib/components/template/DataReference/utils.js.map +1 -0
  397. package/lib/components/template/DefaultForm/DefaultForm.d.ts +2 -2
  398. package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
  399. package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
  400. package/lib/components/template/DefaultForm/utils/index.d.ts.map +1 -1
  401. package/lib/components/template/DefaultForm/utils/index.js +1 -2
  402. package/lib/components/template/DefaultForm/utils/index.js.map +1 -1
  403. package/lib/components/template/DefaultPage/DefaultPage.d.ts +36 -0
  404. package/lib/components/template/DefaultPage/DefaultPage.d.ts.map +1 -0
  405. package/lib/components/template/DefaultPage/DefaultPage.js +28 -0
  406. package/lib/components/template/DefaultPage/DefaultPage.js.map +1 -0
  407. package/lib/components/template/DefaultPage/index.d.ts +2 -0
  408. package/lib/components/template/DefaultPage/index.d.ts.map +1 -0
  409. package/lib/components/template/DefaultPage/index.js +2 -0
  410. package/lib/components/template/DefaultPage/index.js.map +1 -0
  411. package/lib/components/template/Details/Details/Details.d.ts +1 -1
  412. package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
  413. package/lib/components/template/Details/Details/Details.js +2 -3
  414. package/lib/components/template/Details/Details/Details.js.map +1 -1
  415. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +2 -2
  416. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
  417. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
  418. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +1 -1
  419. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
  420. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +2 -3
  421. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
  422. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +1 -1
  423. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
  424. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +2 -3
  425. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
  426. package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts +1 -1
  427. package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts.map +1 -1
  428. package/lib/components/template/Details/DynamicTabs/DynamicTabs.js.map +1 -1
  429. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +2 -1
  430. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
  431. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +8 -5
  432. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
  433. package/lib/components/template/HierarchicalForm/HierarchicalForm.d.ts +4 -0
  434. package/lib/components/template/HierarchicalForm/HierarchicalForm.d.ts.map +1 -0
  435. package/lib/components/template/HierarchicalForm/HierarchicalForm.js +16 -0
  436. package/lib/components/template/HierarchicalForm/HierarchicalForm.js.map +1 -0
  437. package/lib/components/template/HierarchicalForm/hooks.d.ts +15 -0
  438. package/lib/components/template/HierarchicalForm/hooks.d.ts.map +1 -0
  439. package/lib/components/template/HierarchicalForm/hooks.js +163 -0
  440. package/lib/components/template/HierarchicalForm/hooks.js.map +1 -0
  441. package/lib/components/template/HierarchicalForm/index.d.ts +2 -0
  442. package/lib/components/template/HierarchicalForm/index.d.ts.map +1 -0
  443. package/lib/components/template/HierarchicalForm/index.js +2 -0
  444. package/lib/components/template/HierarchicalForm/index.js.map +1 -0
  445. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +2 -2
  446. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
  447. package/lib/components/template/InlineDashboard/InlineDashboard.js +2 -2
  448. package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
  449. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +2 -2
  450. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
  451. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js.map +1 -1
  452. package/lib/components/template/ListPage/ListPage.d.ts +1 -1
  453. package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
  454. package/lib/components/template/ListPage/ListPage.js.map +1 -1
  455. package/lib/components/template/ListView/DefaultViewMeta.js.map +1 -1
  456. package/lib/components/template/ListView/ListView.d.ts +5 -1
  457. package/lib/components/template/ListView/ListView.d.ts.map +1 -1
  458. package/lib/components/template/ListView/ListView.js +186 -70
  459. package/lib/components/template/ListView/ListView.js.map +1 -1
  460. package/lib/components/template/ListView/hooks.d.ts.map +1 -1
  461. package/lib/components/template/ListView/hooks.js +2 -5
  462. package/lib/components/template/ListView/hooks.js.map +1 -1
  463. package/lib/components/template/ListView/utils.d.ts.map +1 -1
  464. package/lib/components/template/ListView/utils.js +28 -5
  465. package/lib/components/template/ListView/utils.js.map +1 -1
  466. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +4 -2
  467. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
  468. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js +13 -1
  469. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -1
  470. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +2 -2
  471. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -1
  472. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js.map +1 -1
  473. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +1 -1
  474. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
  475. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +2 -3
  476. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
  477. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +2 -2
  478. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -1
  479. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js.map +1 -1
  480. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +2 -2
  481. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
  482. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -1
  483. package/lib/components/template/ObjectPage/index.d.ts +2 -0
  484. package/lib/components/template/ObjectPage/index.d.ts.map +1 -0
  485. package/lib/components/template/ObjectPage/index.js +2 -0
  486. package/lib/components/template/ObjectPage/index.js.map +1 -0
  487. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +2 -2
  488. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
  489. package/lib/components/template/OneColumn/OneColumn/OneColumn.js +2 -2
  490. package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
  491. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +1 -1
  492. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
  493. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -1
  494. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +2 -2
  495. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
  496. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js.map +1 -1
  497. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +1 -1
  498. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
  499. package/lib/components/template/PromotedFilters/PromotedFilters.js +0 -1
  500. package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
  501. package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.d.ts +2 -0
  502. package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.d.ts.map +1 -0
  503. package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.js +84 -0
  504. package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.js.map +1 -0
  505. package/lib/components/template/SelfServiceCaseView/index.d.ts +2 -0
  506. package/lib/components/template/SelfServiceCaseView/index.d.ts.map +1 -0
  507. package/lib/components/template/SelfServiceCaseView/index.js +2 -0
  508. package/lib/components/template/SelfServiceCaseView/index.js.map +1 -0
  509. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts +1 -1
  510. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
  511. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js +1 -2
  512. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
  513. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +2 -2
  514. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
  515. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +37 -33
  516. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
  517. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +1 -1
  518. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
  519. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
  520. package/lib/components/template/SimpleTable/SimpleTableSelectReadonly/SimpleTableSelectReadonly.d.ts +17 -0
  521. package/lib/components/template/SimpleTable/SimpleTableSelectReadonly/SimpleTableSelectReadonly.d.ts.map +1 -0
  522. package/lib/components/template/SimpleTable/SimpleTableSelectReadonly/SimpleTableSelectReadonly.js +94 -0
  523. package/lib/components/template/SimpleTable/SimpleTableSelectReadonly/SimpleTableSelectReadonly.js.map +1 -0
  524. package/lib/components/template/SimpleTable/SimpleTableSelectReadonly/index.d.ts +2 -0
  525. package/lib/components/template/SimpleTable/SimpleTableSelectReadonly/index.d.ts.map +1 -0
  526. package/lib/components/template/SimpleTable/SimpleTableSelectReadonly/index.js +2 -0
  527. package/lib/components/template/SimpleTable/SimpleTableSelectReadonly/index.js.map +1 -0
  528. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +1 -1
  529. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
  530. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js +3 -2
  531. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
  532. package/lib/components/template/SubTabs/SubTabs.d.ts +2 -2
  533. package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
  534. package/lib/components/template/SubTabs/SubTabs.js.map +1 -1
  535. package/lib/components/template/SubTabs/tabUtils.d.ts +10 -0
  536. package/lib/components/template/SubTabs/tabUtils.d.ts.map +1 -1
  537. package/lib/components/template/SubTabs/tabUtils.js +102 -1
  538. package/lib/components/template/SubTabs/tabUtils.js.map +1 -1
  539. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts +2 -2
  540. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
  541. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +2 -3
  542. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
  543. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +1 -1
  544. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
  545. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -1
  546. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +2 -2
  547. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
  548. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +2 -3
  549. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
  550. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +2 -2
  551. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
  552. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js.map +1 -1
  553. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +1 -1
  554. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
  555. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +2 -3
  556. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
  557. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +2 -2
  558. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -1
  559. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js.map +1 -1
  560. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +2 -2
  561. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
  562. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js.map +1 -1
  563. package/lib/components/template/WssNavBar/WssNavBar.css +1 -1
  564. package/lib/components/template/WssNavBar/WssNavBar.d.ts +1 -1
  565. package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -1
  566. package/lib/components/template/WssNavBar/WssNavBar.js +4 -4
  567. package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
  568. package/lib/components/template/utils.d.ts +7 -0
  569. package/lib/components/template/utils.d.ts.map +1 -0
  570. package/lib/components/template/utils.js +52 -0
  571. package/lib/components/template/utils.js.map +1 -0
  572. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts +1 -1
  573. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
  574. package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
  575. package/lib/components/widget/Attachment/Attachment.css +6 -8
  576. package/lib/components/widget/Attachment/Attachment.d.ts +4 -2
  577. package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
  578. package/lib/components/widget/Attachment/Attachment.js +255 -202
  579. package/lib/components/widget/Attachment/Attachment.js.map +1 -1
  580. package/lib/components/widget/Attachment/Attachment.types.d.ts +90 -0
  581. package/lib/components/widget/Attachment/Attachment.types.d.ts.map +1 -0
  582. package/lib/components/widget/Attachment/Attachment.types.js +2 -0
  583. package/lib/components/widget/Attachment/Attachment.types.js.map +1 -0
  584. package/lib/components/widget/Attachment/AttachmentUtils.d.ts +25 -0
  585. package/lib/components/widget/Attachment/AttachmentUtils.d.ts.map +1 -0
  586. package/lib/components/widget/Attachment/AttachmentUtils.js +255 -0
  587. package/lib/components/widget/Attachment/AttachmentUtils.js.map +1 -0
  588. package/lib/components/widget/CaseHistory/CaseHistory.d.ts +1 -1
  589. package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
  590. package/lib/components/widget/CaseHistory/CaseHistory.js +2 -2
  591. package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
  592. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.css +0 -14
  593. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +1 -1
  594. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts.map +1 -1
  595. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js +1 -1
  596. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
  597. package/lib/components/widget/FileUtility/FileUtility/FileUtility.css +7 -6
  598. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +2 -1
  599. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
  600. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +29 -17
  601. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
  602. package/lib/components/widget/Followers/Followers.d.ts +2 -2
  603. package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
  604. package/lib/components/widget/Followers/Followers.js +0 -2
  605. package/lib/components/widget/Followers/Followers.js.map +1 -1
  606. package/lib/components/widget/QuickCreate/QuickCreate.d.ts +1 -1
  607. package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
  608. package/lib/components/widget/QuickCreate/QuickCreate.js +0 -1
  609. package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
  610. package/lib/components/widget/SummaryItem/SummaryItem.css +9 -11
  611. package/lib/components/widget/SummaryItem/SummaryItem.d.ts +1 -1
  612. package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
  613. package/lib/components/widget/SummaryItem/SummaryItem.js +1 -1
  614. package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
  615. package/lib/components/widget/SummaryList/SummaryList.d.ts +1 -1
  616. package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
  617. package/lib/components/widget/SummaryList/SummaryList.js.map +1 -1
  618. package/lib/components/widget/ToDo/ToDo.css +1 -13
  619. package/lib/components/widget/ToDo/ToDo.d.ts +1 -1
  620. package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
  621. package/lib/components/widget/ToDo/ToDo.js +21 -16
  622. package/lib/components/widget/ToDo/ToDo.js.map +1 -1
  623. package/lib/hooks/useAfterInitialEffect.d.ts +1 -1
  624. package/lib/hooks/useAfterInitialEffect.d.ts.map +1 -1
  625. package/lib/hooks/useAfterInitialEffect.js.map +1 -1
  626. package/lib/hooks/useConsolidatedRef.d.ts +1 -1
  627. package/lib/hooks/useConsolidatedRef.d.ts.map +1 -1
  628. package/lib/hooks/useConsolidatedRef.js.map +1 -1
  629. package/lib/hooks/useFocusFirstField.d.ts +3 -3
  630. package/lib/hooks/useFocusFirstField.d.ts.map +1 -1
  631. package/lib/hooks/useFocusFirstField.js +19 -12
  632. package/lib/hooks/useFocusFirstField.js.map +1 -1
  633. package/lib/hooks/useGetTabsCount.d.ts +10 -0
  634. package/lib/hooks/useGetTabsCount.d.ts.map +1 -0
  635. package/lib/hooks/useGetTabsCount.js +165 -0
  636. package/lib/hooks/useGetTabsCount.js.map +1 -0
  637. package/lib/hooks/useIsMount.d.ts +2 -0
  638. package/lib/hooks/useIsMount.d.ts.map +1 -0
  639. package/lib/hooks/useIsMount.js +9 -0
  640. package/lib/hooks/useIsMount.js.map +1 -0
  641. package/lib/hooks/useScrolltoTop.d.ts.map +1 -1
  642. package/lib/mediaco/ToDo/ToDo.css +81 -0
  643. package/lib/mediaco/ToDo/ToDo.d.ts +16 -0
  644. package/lib/mediaco/ToDo/ToDo.d.ts.map +1 -0
  645. package/lib/mediaco/ToDo/ToDo.js +187 -0
  646. package/lib/mediaco/ToDo/ToDo.js.map +1 -0
  647. package/lib/mediaco/ToDo/index.d.ts +2 -0
  648. package/lib/mediaco/ToDo/index.d.ts.map +1 -0
  649. package/lib/mediaco/ToDo/index.js +2 -0
  650. package/lib/mediaco/ToDo/index.js.map +1 -0
  651. package/lib/samples/Embedded/styles.css +26 -0
  652. package/lib/sdk-pega-component-map.d.ts +125 -103
  653. package/lib/sdk-pega-component-map.d.ts.map +1 -1
  654. package/lib/sdk-pega-component-map.js +26 -3
  655. package/lib/sdk-pega-component-map.js.map +1 -1
  656. package/lib/theme.d.ts +30 -1
  657. package/lib/theme.d.ts.map +1 -1
  658. package/lib/theme.js +209 -2
  659. package/lib/theme.js.map +1 -1
  660. package/lib/types/PConnProps.d.ts +1 -1
  661. package/package.json +32 -1
  662. package/lib/components/helpers/attachmentHelpers.d.ts +0 -13
  663. package/lib/components/helpers/attachmentHelpers.d.ts.map +0 -1
  664. package/lib/components/helpers/attachmentHelpers.js +0 -72
  665. package/lib/components/helpers/attachmentHelpers.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import { useRef } from 'react';
2
2
  import equal from 'fast-deep-equal';
3
- import cloneDeep from 'lodash/cloneDeep';
3
+ import cloneDeep from 'lodash.clonedeep';
4
4
  import { updateNewInstuctions, insertInstruction, deleteInstruction } from '../../helpers/instructions-utils';
5
5
  export const setVisibilityForList = (c11nEnv, visibility) => {
6
6
  const { selectionMode, selectionList, renderMode, referenceList } = c11nEnv.getComponentConfig();
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/components/field/Multiselect/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,SAAS,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAE9G,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,EAAE;IAC1D,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC;IACjG,kDAAkD;IAClD,IAAI,CAAC,aAAa,KAAK,KAAK,CAAC,YAA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WAAW,EACX,iBAAiB,EACjB,wBAAwB,EACxB,QAAQ,EACR,uBAAuB,EACvB,wBAAwB,EACxB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EAClB,CAAC","sourcesContent":["import { useRef } from 'react';\nimport equal from 'fast-deep-equal';\nimport cloneDeep from 'lodash/cloneDeep';\nimport { updateNewInstuctions, insertInstruction, deleteInstruction } from '../../helpers/instructions-utils';\n\nexport const setVisibilityForList = (c11nEnv, visibility) => {\n const { selectionMode, selectionList, renderMode, referenceList } = c11nEnv.getComponentConfig();\n // usecase:multiselect, fieldgroup, editable table\n if ((selectionMode === PCore.getConstants().LIST_SELECTION_MODE.MULTI && selectionList) || (renderMode === 'Editable' && referenceList)) {\n c11nEnv.getListActions().setVisibility(visibility);\n }\n};\n\nconst useDeepMemo = (memoFn, key) => {\n const ref: any = useRef();\n if (!ref.current || !equal(key, ref.current.key)) {\n ref.current = { key, value: memoFn() };\n }\n return ref.current.value;\n};\n\nconst preProcessColumns = columns => {\n return columns?.map(col => {\n const tempColObj = { ...col };\n tempColObj.value = col.value && col.value.startsWith('.') ? col.value.substring(1) : col.value;\n if (tempColObj.setProperty) {\n tempColObj.setProperty = col.setProperty && col.setProperty.startsWith('.') ? col.setProperty.substring(1) : col.setProperty;\n }\n return tempColObj;\n });\n};\n\nconst getDisplayFieldsMetaData = columns => {\n const displayColumns = columns?.filter(col => col.display === 'true');\n const metaDataObj: any = {\n key: '',\n primary: '',\n secondary: []\n };\n const keyCol = columns?.filter(col => col.key === 'true');\n metaDataObj.key = keyCol?.length > 0 ? keyCol[0].value : 'auto';\n const itemsRecordsColumn = columns?.filter(col => col.itemsRecordsColumn === 'true');\n if (itemsRecordsColumn?.length > 0) {\n metaDataObj.itemsRecordsColumn = itemsRecordsColumn[0].value;\n }\n const itemsGroupKeyColumn = columns?.filter(col => col.itemsGroupKeyColumn === 'true');\n if (itemsGroupKeyColumn?.length > 0) {\n metaDataObj.itemsGroupKeyColumn = itemsGroupKeyColumn[0].value;\n }\n for (let index = 0; index < displayColumns?.length; index += 1) {\n if (displayColumns[index].secondary === 'true') {\n metaDataObj.secondary.push(displayColumns[index].value);\n } else if (displayColumns[index].primary === 'true') {\n metaDataObj.primary = displayColumns[index].value;\n }\n }\n return metaDataObj;\n};\n\nconst createSingleTreeObejct = (entry, displayFieldMeta, showSecondaryData, selected) => {\n const secondaryArr: any = [];\n displayFieldMeta.secondary.forEach(col => {\n secondaryArr.push(entry[col]);\n });\n const isSelected = selected.some(item => item.id === entry[displayFieldMeta.key]);\n\n return {\n id: entry[displayFieldMeta.key],\n primary: entry[displayFieldMeta.primary],\n secondary: showSecondaryData ? secondaryArr : [],\n selected: isSelected\n };\n};\n\nconst putItemsDataInItemsTree = (listObjData, displayFieldMeta, itemsTree, showSecondaryInSearchOnly, selected) => {\n let newTreeItems = itemsTree.slice();\n const showSecondaryData = !showSecondaryInSearchOnly;\n for (const obj of listObjData) {\n const items = obj[displayFieldMeta.itemsRecordsColumn].map(entry => createSingleTreeObejct(entry, displayFieldMeta, showSecondaryData, selected));\n\n newTreeItems = newTreeItems.map(caseObject => {\n if (caseObject.id === obj[displayFieldMeta.itemsGroupKeyColumn]) {\n caseObject.items = [...items];\n }\n return caseObject;\n });\n }\n return newTreeItems;\n};\n\nconst prepareSearchResults = (listObjData, displayFieldMeta) => {\n const searchResults: any = [];\n for (const obj of listObjData) {\n searchResults.push(...obj[displayFieldMeta.itemsRecordsColumn]);\n }\n return searchResults;\n};\n\nconst doSearch = async (\n searchText,\n clickedGroup,\n initialCaseClass,\n displayFieldMeta,\n dataApiObj, // deep clone of the dataApiObj\n itemsTree,\n isGroupData,\n showSecondaryInSearchOnly,\n selected\n) => {\n let searchTextForUngroupedData = '';\n if (dataApiObj) {\n // creating dataApiObject in grouped data cases\n if (isGroupData) {\n dataApiObj = cloneDeep(dataApiObj);\n dataApiObj.fetchedNQData = false;\n dataApiObj.cache = {};\n\n // if we have no search text and no group selected, return the original tree\n if (searchText === '' && clickedGroup === '') {\n return itemsTree;\n }\n\n // setting the inital search text & search classes in ApiObject\n dataApiObj.parameters[Object.keys(dataApiObj.parameters)[1]] = searchText;\n dataApiObj.parameters[Object.keys(dataApiObj.parameters)[0]] = initialCaseClass;\n\n // if we have a selected group\n if (clickedGroup) {\n // check if the data for this group is already present and no search text\n if (searchText === '') {\n const containsData = itemsTree.find(item => item.id === clickedGroup);\n // do not make API call when items of respective group are already fetched\n if (containsData?.items?.length) return itemsTree;\n }\n\n dataApiObj.parameters[Object.keys(dataApiObj.parameters)[0]] = JSON.stringify([clickedGroup]);\n }\n } else {\n searchTextForUngroupedData = searchText;\n }\n\n // search API call\n const response = await dataApiObj.fetchData(searchTextForUngroupedData).catch(() => {\n return itemsTree;\n });\n\n let listObjData = response.data;\n let newItemsTree = [];\n if (isGroupData) {\n if (searchText) {\n listObjData = prepareSearchResults(listObjData, displayFieldMeta);\n } else {\n newItemsTree = putItemsDataInItemsTree(listObjData, displayFieldMeta, itemsTree, showSecondaryInSearchOnly, selected);\n return newItemsTree;\n }\n }\n const showSecondaryData = showSecondaryInSearchOnly ? !!searchText : true;\n if (listObjData !== undefined && listObjData.length > 0) {\n newItemsTree = listObjData.map(entry => createSingleTreeObejct(entry, displayFieldMeta, showSecondaryData, selected));\n }\n return newItemsTree;\n }\n\n return itemsTree;\n};\n\nconst setValuesToPropertyList = (searchText, assocProp, items, columns, actions, updatePropertyInRedux = true) => {\n const setPropertyList = columns\n ?.filter(col => col.setProperty)\n .map(col => {\n return {\n source: col.value,\n target: col.setProperty,\n key: col.key,\n primary: col.primary\n };\n });\n const valueToSet: any = [];\n if (setPropertyList.length > 0) {\n setPropertyList.forEach(prop => {\n items.forEach(item => {\n if (prop.key === 'true' && item) {\n valueToSet.push(item.id);\n } else if (prop.primary === 'true' || !item) {\n valueToSet.push(searchText);\n }\n });\n\n if (updatePropertyInRedux) {\n // BUG-666851 setting options so that the store values are replaced and not merged\n const options = {\n isArrayDeepMerge: false\n };\n if (prop.target === 'Associated property') {\n actions.updateFieldValue(assocProp, valueToSet, options);\n } else {\n actions.updateFieldValue(`.${prop.target}`, valueToSet, options);\n }\n }\n });\n }\n return valueToSet;\n};\n\nconst getGroupDataForItemsTree = (groupDataSource, groupsDisplayFieldMeta, showSecondaryInSearchOnly) => {\n return groupDataSource?.map(group => {\n const secondaryArr: any = [];\n groupsDisplayFieldMeta.secondary.forEach(col => {\n secondaryArr.push(group[col]);\n });\n return {\n id: group[groupsDisplayFieldMeta.key],\n primary: group[groupsDisplayFieldMeta.primary],\n secondary: showSecondaryInSearchOnly ? [] : secondaryArr,\n items: []\n };\n });\n};\n\nexport {\n useDeepMemo,\n preProcessColumns,\n getDisplayFieldsMetaData,\n doSearch,\n setValuesToPropertyList,\n getGroupDataForItemsTree,\n updateNewInstuctions,\n insertInstruction,\n deleteInstruction\n};\n"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/components/field/Multiselect/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,SAAS,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAE9G,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,EAAE;IAC1D,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC;IACjG,kDAAkD;IAClD,IAAI,CAAC,aAAa,KAAK,KAAK,CAAC,YAAY,EAAE,CAAC,mBAAmB,CAAC,KAAK,IAAI,aAAa,CAAC,IAAI,CAAC,UAAU,KAAK,UAAU,IAAI,aAAa,CAAC,EAAE,CAAC;QACxI,OAAO,CAAC,cAAc,EAAE,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IACrD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CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY;YACxD,KAAK,EAAE,EAAE;SACV,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,wBAAwB,EACxB,QAAQ,EACR,uBAAuB,EACvB,wBAAwB,EACxB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EAClB,CAAC","sourcesContent":["import { useRef } from 'react';\nimport equal from 'fast-deep-equal';\nimport cloneDeep from 'lodash.clonedeep';\nimport { updateNewInstuctions, insertInstruction, deleteInstruction } from '../../helpers/instructions-utils';\n\nexport const setVisibilityForList = (c11nEnv, visibility) => {\n const { selectionMode, selectionList, renderMode, referenceList } = c11nEnv.getComponentConfig();\n // usecase:multiselect, fieldgroup, editable table\n if ((selectionMode === PCore.getConstants().LIST_SELECTION_MODE.MULTI && selectionList) || (renderMode === 'Editable' && referenceList)) {\n c11nEnv.getListActions().setVisibility(visibility);\n }\n};\n\nconst useDeepMemo = (memoFn, key) => {\n const ref: any = useRef();\n if (!ref.current || !equal(key, ref.current.key)) {\n ref.current = { key, value: memoFn() };\n }\n return ref.current.value;\n};\n\nconst preProcessColumns = columns => {\n return columns?.map(col => {\n const tempColObj = { ...col };\n tempColObj.value = col.value && col.value.startsWith('.') ? col.value.substring(1) : col.value;\n if (tempColObj.setProperty) {\n tempColObj.setProperty = col.setProperty && col.setProperty.startsWith('.') ? col.setProperty.substring(1) : col.setProperty;\n }\n return tempColObj;\n });\n};\n\nconst getDisplayFieldsMetaData = columns => {\n const displayColumns = columns?.filter(col => col.display === 'true');\n const metaDataObj: any = {\n key: '',\n primary: '',\n secondary: []\n };\n const keyCol = columns?.filter(col => col.key === 'true');\n metaDataObj.key = keyCol?.length > 0 ? keyCol[0].value : 'auto';\n const itemsRecordsColumn = columns?.filter(col => col.itemsRecordsColumn === 'true');\n if (itemsRecordsColumn?.length > 0) {\n metaDataObj.itemsRecordsColumn = itemsRecordsColumn[0].value;\n }\n const itemsGroupKeyColumn = columns?.filter(col => col.itemsGroupKeyColumn === 'true');\n if (itemsGroupKeyColumn?.length > 0) {\n metaDataObj.itemsGroupKeyColumn = itemsGroupKeyColumn[0].value;\n }\n for (let index = 0; index < displayColumns?.length; index += 1) {\n if (displayColumns[index].secondary === 'true') {\n metaDataObj.secondary.push(displayColumns[index].value);\n } else if (displayColumns[index].primary === 'true') {\n metaDataObj.primary = displayColumns[index].value;\n }\n }\n return metaDataObj;\n};\n\nconst createSingleTreeObejct = (entry, displayFieldMeta, showSecondaryData, selected) => {\n const secondaryArr: any = [];\n displayFieldMeta.secondary.forEach(col => {\n secondaryArr.push(entry[col]);\n });\n const isSelected = selected.some(item => item.id === entry[displayFieldMeta.key]);\n\n return {\n id: entry[displayFieldMeta.key],\n primary: entry[displayFieldMeta.primary],\n secondary: showSecondaryData ? secondaryArr : [],\n selected: isSelected\n };\n};\n\nconst putItemsDataInItemsTree = (listObjData, displayFieldMeta, itemsTree, showSecondaryInSearchOnly, selected) => {\n let newTreeItems = itemsTree.slice();\n const showSecondaryData = !showSecondaryInSearchOnly;\n for (const obj of listObjData) {\n const items = obj[displayFieldMeta.itemsRecordsColumn].map(entry => createSingleTreeObejct(entry, displayFieldMeta, showSecondaryData, selected));\n\n newTreeItems = newTreeItems.map(caseObject => {\n if (caseObject.id === obj[displayFieldMeta.itemsGroupKeyColumn]) {\n caseObject.items = [...items];\n }\n return caseObject;\n });\n }\n return newTreeItems;\n};\n\nconst prepareSearchResults = (listObjData, displayFieldMeta) => {\n const searchResults: any = [];\n for (const obj of listObjData) {\n searchResults.push(...obj[displayFieldMeta.itemsRecordsColumn]);\n }\n return searchResults;\n};\n\nconst doSearch = async (\n searchText,\n clickedGroup,\n initialCaseClass,\n displayFieldMeta,\n dataApiObj, // deep clone of the dataApiObj\n itemsTree,\n isGroupData,\n showSecondaryInSearchOnly,\n selected\n) => {\n let searchTextForUngroupedData = '';\n if (dataApiObj) {\n // creating dataApiObject in grouped data cases\n if (isGroupData) {\n dataApiObj = cloneDeep(dataApiObj);\n dataApiObj.fetchedNQData = false;\n dataApiObj.cache = {};\n\n // if we have no search text and no group selected, return the original tree\n if (searchText === '' && clickedGroup === '') {\n return itemsTree;\n }\n\n // setting the inital search text & search classes in ApiObject\n dataApiObj.parameters[Object.keys(dataApiObj.parameters)[1]] = searchText;\n dataApiObj.parameters[Object.keys(dataApiObj.parameters)[0]] = initialCaseClass;\n\n // if we have a selected group\n if (clickedGroup) {\n // check if the data for this group is already present and no search text\n if (searchText === '') {\n const containsData = itemsTree.find(item => item.id === clickedGroup);\n // do not make API call when items of respective group are already fetched\n if (containsData?.items?.length) return itemsTree;\n }\n\n dataApiObj.parameters[Object.keys(dataApiObj.parameters)[0]] = JSON.stringify([clickedGroup]);\n }\n } else {\n searchTextForUngroupedData = searchText;\n }\n\n // search API call\n const response = await dataApiObj.fetchData(searchTextForUngroupedData).catch(() => {\n return itemsTree;\n });\n\n let listObjData = response.data;\n let newItemsTree = [];\n if (isGroupData) {\n if (searchText) {\n listObjData = prepareSearchResults(listObjData, displayFieldMeta);\n } else {\n newItemsTree = putItemsDataInItemsTree(listObjData, displayFieldMeta, itemsTree, showSecondaryInSearchOnly, selected);\n return newItemsTree;\n }\n }\n const showSecondaryData = showSecondaryInSearchOnly ? !!searchText : true;\n if (listObjData !== undefined && listObjData.length > 0) {\n newItemsTree = listObjData.map(entry => createSingleTreeObejct(entry, displayFieldMeta, showSecondaryData, selected));\n }\n return newItemsTree;\n }\n\n return itemsTree;\n};\n\nconst setValuesToPropertyList = (searchText, assocProp, items, columns, actions, updatePropertyInRedux = true) => {\n const setPropertyList = columns\n ?.filter(col => col.setProperty)\n .map(col => {\n return {\n source: col.value,\n target: col.setProperty,\n key: col.key,\n primary: col.primary\n };\n });\n const valueToSet: any = [];\n if (setPropertyList.length > 0) {\n setPropertyList.forEach(prop => {\n items.forEach(item => {\n if (prop.key === 'true' && item) {\n valueToSet.push(item.id);\n } else if (prop.primary === 'true' || !item) {\n valueToSet.push(searchText);\n }\n });\n\n if (updatePropertyInRedux) {\n // BUG-666851 setting options so that the store values are replaced and not merged\n const options = {\n isArrayDeepMerge: false\n };\n if (prop.target === 'Associated property') {\n actions.updateFieldValue(assocProp, valueToSet, options);\n } else {\n actions.updateFieldValue(`.${prop.target}`, valueToSet, options);\n }\n }\n });\n }\n return valueToSet;\n};\n\nconst getGroupDataForItemsTree = (groupDataSource, groupsDisplayFieldMeta, showSecondaryInSearchOnly) => {\n return groupDataSource?.map(group => {\n const secondaryArr: any = [];\n groupsDisplayFieldMeta.secondary.forEach(col => {\n secondaryArr.push(group[col]);\n });\n return {\n id: group[groupsDisplayFieldMeta.key],\n primary: group[groupsDisplayFieldMeta.primary],\n secondary: showSecondaryInSearchOnly ? [] : secondaryArr,\n items: []\n };\n });\n};\n\nexport {\n useDeepMemo,\n preProcessColumns,\n getDisplayFieldsMetaData,\n doSearch,\n setValuesToPropertyList,\n getGroupDataForItemsTree,\n updateNewInstuctions,\n insertInstruction,\n deleteInstruction\n};\n"]}
@@ -0,0 +1,16 @@
1
+ import type { PConnFieldProps } from '../../../types/PConnProps';
2
+ interface ObjectReferenceProps extends Omit<PConnFieldProps, 'value'> {
3
+ getPConnect: any;
4
+ displayMode: any;
5
+ allowAndPersistChangesInReviewMode: any;
6
+ targetObjectType: any;
7
+ mode: string;
8
+ parameters: object;
9
+ hideLabel: boolean;
10
+ inline: boolean;
11
+ showPromotedFilters: boolean;
12
+ additionalFields: any;
13
+ }
14
+ export default function ObjectReference(props: ObjectReferenceProps): import("react/jsx-runtime").JSX.Element;
15
+ export {};
16
+ //# sourceMappingURL=ObjectReference.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ObjectReference.d.ts","sourceRoot":"","sources":["../../../../src/components/field/ObjectReference/ObjectReference.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE,UAAU,oBAAqB,SAAQ,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC;IAEnE,WAAW,EAAE,GAAG,CAAC;IACjB,WAAW,MAAC;IACZ,kCAAkC,EAAE,GAAG,CAAC;IACxC,gBAAgB,EAAE,GAAG,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,gBAAgB,EAAE,GAAG,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,oBAAoB,2CAoNlE"}
@@ -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,CAAC,gBAAgB,CAAC,eAAe,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CA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AM;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","sourceR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,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,2CAgGxD"}
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"}
@@ -33,10 +33,7 @@ export default function Percentage(props) {
33
33
  if (displayMode === 'STACKED_LARGE_VAL') {
34
34
  return _jsx(FieldValueList, { name: hideLabel ? '' : label, value: formattedValue, variant: 'stacked' });
35
35
  }
36
- let testProp = {};
37
- testProp = {
38
- 'data-test-id': testId
39
- };
36
+ const testProps = { 'data-test-id': testId };
40
37
  const theSymbols = getCurrencyCharacters(currencyISOCode);
41
38
  const theCurrDec = theSymbols.theDecimalIndicator;
42
39
  const theCurrSep = theSymbols.theDigitGroupSeparator;
@@ -48,6 +45,6 @@ export default function Percentage(props) {
48
45
  };
49
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 => {
50
47
  handleChange(val);
51
- }, 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 }));
52
49
  }
53
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,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;IAC9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E,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 { useEffect, 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 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 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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M,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,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,mBAAmB,GAAG,eAAe,IAAI,UAAU,CAAC;IAE1D,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AAC,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,UAAU,EAAE,EAAE,GAAG,QAAQ,EAAE,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,EAA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AE,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"]}