@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 +1 @@
1
- {"version":3,"file":"Confirmation.js","sourceRoot":"","sources":["../../../../src/components/template/Confirmation/Confirmation.tsx"],"names":[],"mappings":";AAAA,sCAAsC;AACtC,OAAO,EAAqB,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAEhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAWhF,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACrC,IAAI,EAAE;QACJ,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC9B,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7B,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5B,aAAa,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC/B,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7B,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5B,SAAS,EAAE,KAAK,CA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AE,UAAU,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,UAAU,EAAC,OAAO,EAAC,SAAS,SAAG,GAC1H,CACR,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC","sourcesContent":["/* eslint-disable no-nested-ternary */\nimport { PropsWithChildren, useState } from 'react';\nimport { Button, Card } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\n\nimport { getToDoAssignments } from '../../infra/Containers/FlowContainer/helpers';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { PConnProps } from '../../../types/PConnProps';\n\ninterface ConfirmationProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n datasource: { source: any };\n label: string;\n showLabel: boolean;\n showTasks: boolean;\n}\n\nconst useStyles = makeStyles(theme => ({\n root: {\n paddingRight: theme.spacing(1),\n paddingLeft: theme.spacing(1),\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n marginRight: theme.spacing(1),\n marginLeft: theme.spacing(1),\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1)\n }\n}));\n\nexport default function Confirmation(props: PropsWithChildren<ConfirmationProps>) {\n // Get emitted components from map (so we can get any override that may exist)\n const ToDo = getComponentFromMap('Todo'); // NOTE: ConstellationJS Engine uses \"Todo\" and not \"ToDo\"!!!\n const Details = getComponentFromMap('Details');\n\n const classes = useStyles();\n const CONSTS = PCore.getConstants();\n const [showConfirmView, setShowConfirmView] = useState(true);\n const { showTasks, getPConnect } = props;\n // Get the inherited props from the parent to determine label settings\n // Not using whatsNext at the moment, need to figure out the use of it\n // const whatsNext = datasource?.source;\n // const items = whatsNext.length > 0 ? whatsNext.map(item => item.label) : '';\n const activeContainerItemID = PCore.getContainerUtils().getActiveContainerItemName(getPConnect().getTarget() || '');\n const rootInfo = PCore.getContainerUtils().getContainerItemData(getPConnect().getTarget(), activeContainerItemID);\n const onConfirmViewClose = () => {\n setShowConfirmView(false);\n PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.CLOSE_CONFIRM_VIEW, rootInfo);\n };\n const todoProps = { ...props, renderTodoInConfirm: true };\n const toDoList = getToDoAssignments(getPConnect());\n const detailProps = { ...props, showLabel: false };\n const showDetails = detailProps?.children?.[0]?.props?.getPConnect()?.getChildren()?.length > 0;\n return showConfirmView ? (\n <Card className={classes.root}>\n <h2 id='confirm-label'>{props.showLabel ? props.label : ''}</h2>\n {showDetails ? <Details {...detailProps} /> : undefined}\n {showTasks ? (\n toDoList && toDoList.length > 0 ? (\n <ToDo {...todoProps} datasource={{ source: toDoList }} getPConnect={getPConnect} type={CONSTS.TODO} headerText='Open Tasks' isConfirm />\n ) : undefined\n ) : undefined}\n <div style={{ display: 'flex', justifyContent: 'flex-end' }}>\n <Button variant='contained' color='primary' onClick={onConfirmViewClose}>\n Done\n </Button>\n </div>\n </Card>\n ) : toDoList && toDoList.length > 0 ? (\n <Card className={classes.root}>\n <ToDo {...props} datasource={{ source: toDoList }} getPConnect={getPConnect} type={CONSTS.TODO} headerText='Tasks' isConfirm />\n </Card>\n ) : null;\n}\n"]}
1
+ {"version":3,"file":"Confirmation.js","sourceRoot":"","sources":["../../../../src/components/template/Confirmation/Confirmation.tsx"],"names":[],"mappings":";AAAA,OAAO,EAA0B,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAEhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAWhF,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACrC,IAAI,EAAE;QACJ,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;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c,EAAE,UAAU,EAAE,YACzD,KAAC,MAAM,IAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,SAAS,EAAC,OAAO,EAAE,kBAAkB,qBAE9D,GACL,IACD,CACR,CAAC,CAAC,CAAC,QAAQ,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CACpC,KAAC,IAAI,IAAC,SAAS,EAAE,OAAO,CAAC,IAAI,YAC3B,KAAC,IAAI,OAAK,KAAK,EAAE,UAAU,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,UAAU,EAAC,OAAO,EAAC,SAAS,SAAG,GAC1H,CACR,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC","sourcesContent":["import { type PropsWithChildren, useState } from 'react';\nimport { Button, Card } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\n\nimport { getToDoAssignments } from '../../infra/Containers/FlowContainer/helpers';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport type { PConnProps } from '../../../types/PConnProps';\n\ninterface ConfirmationProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n datasource: { source: any };\n label: string;\n showLabel: boolean;\n showTasks: boolean;\n}\n\nconst useStyles = makeStyles(theme => ({\n root: {\n paddingRight: theme.spacing(1),\n paddingLeft: theme.spacing(1),\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n marginRight: theme.spacing(1),\n marginLeft: theme.spacing(1),\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1)\n }\n}));\n\nexport default function Confirmation(props: PropsWithChildren<ConfirmationProps>) {\n // Get emitted components from map (so we can get any override that may exist)\n const ToDo = getComponentFromMap('Todo'); // NOTE: ConstellationJS Engine uses \"Todo\" and not \"ToDo\"!!!\n const Details = getComponentFromMap('Details');\n\n const classes = useStyles();\n const CONSTS = PCore.getConstants();\n const [showConfirmView, setShowConfirmView] = useState(true);\n const { showTasks, getPConnect } = props;\n // Get the inherited props from the parent to determine label settings\n // Not using whatsNext at the moment, need to figure out the use of it\n // const whatsNext = datasource?.source;\n // const items = whatsNext.length > 0 ? whatsNext.map(item => item.label) : '';\n const activeContainerItemID = PCore.getContainerUtils().getActiveContainerItemName(getPConnect().getTarget() || '');\n const rootInfo = PCore.getContainerUtils().getContainerItemData(getPConnect().getTarget(), activeContainerItemID);\n const onConfirmViewClose = () => {\n setShowConfirmView(false);\n PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.CLOSE_CONFIRM_VIEW, rootInfo);\n };\n const todoProps = { ...props, renderTodoInConfirm: true };\n const toDoList = getToDoAssignments(getPConnect());\n const detailProps = { ...props, showLabel: false };\n const showDetails = detailProps?.children?.[0]?.props?.getPConnect()?.getChildren()?.length > 0;\n return showConfirmView ? (\n <Card className={classes.root}>\n <h2 id='confirm-label'>{props.showLabel ? props.label : ''}</h2>\n {showDetails ? <Details {...detailProps} /> : undefined}\n {showTasks ? (\n toDoList && toDoList.length > 0 ? (\n <ToDo {...todoProps} datasource={{ source: toDoList }} getPConnect={getPConnect} type={CONSTS.TODO} headerText='Open Tasks' isConfirm />\n ) : undefined\n ) : undefined}\n <div style={{ display: 'flex', justifyContent: 'flex-end' }}>\n <Button variant='contained' color='primary' onClick={onConfirmViewClose}>\n Done\n </Button>\n </div>\n </Card>\n ) : toDoList && toDoList.length > 0 ? (\n <Card className={classes.root}>\n <ToDo {...props} datasource={{ source: toDoList }} getPConnect={getPConnect} type={CONSTS.TODO} headerText='Tasks' isConfirm />\n </Card>\n ) : null;\n}\n"]}
@@ -1,5 +1,5 @@
1
- import { PropsWithChildren } from 'react';
2
- import { PConnProps } from '../../../types/PConnProps';
1
+ import { type PropsWithChildren } from 'react';
2
+ import type { PConnProps } from '../../../types/PConnProps';
3
3
  interface DataReferenceProps extends PConnProps {
4
4
  label: string;
5
5
  showLabel: any;
@@ -11,6 +11,13 @@ interface DataReferenceProps extends PConnProps {
11
11
  ruleClass: string;
12
12
  parameters: string[];
13
13
  hideLabel: boolean;
14
+ imagePosition: string;
15
+ showImageDescription: string;
16
+ showPromotedFilters: boolean;
17
+ isCreationOfNewRecordAllowedForReference: boolean;
18
+ contextClass: string;
19
+ inline: any;
20
+ selectionList: any;
14
21
  }
15
22
  export default function DataReference(props: PropsWithChildren<DataReferenceProps>): import("react/jsx-runtime").JSX.Element;
16
23
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"DataReference.d.ts","sourceRoot":"","sources":["../../../../src/components/template/DataReference/DataReference.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAA8C,MAAM,OAAO,CAAC;AAGtF,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAGvD,UAAU,kBAAmB,SAAQ,UAAU;IAE7C,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,GAAG,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,kCAAkC,EAAE,OAAO,CAAC;IAC5C,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;CACpB;AAID,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,EAAE,iBAAiB,CAAC,kBAAkB,CAAC,2CA+OjF"}
1
+ {"version":3,"file":"DataReference.d.ts","sourceRoot":"","sources":["../../../../src/components/template/DataReference/DataReference.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,iBAAiB,EAAmD,MAAM,OAAO,CAAC;AAGvG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAQ5D,UAAU,kBAAmB,SAAQ,UAAU;IAE7C,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,GAAG,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,kCAAkC,EAAE,OAAO,CAAC;IAC5C,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,wCAAwC,EAAE,OAAO,CAAC;IAClD,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,GAAG,CAAC;IACZ,aAAa,EAAE,GAAG,CAAC;CACpB;AAID,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,EAAE,iBAAiB,CAAC,kBAAkB,CAAC,2CAibjF"}
@@ -1,12 +1,19 @@
1
- import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { useEffect, useMemo, useState } from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import React, { useEffect, useMemo, useState } from 'react';
3
3
  import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
4
+ import useIsMount from '../../../hooks/useIsMount';
5
+ import componentCachePersistUtils from '../AdvancedSearch/SearchGroup/persistUtils';
6
+ import DataReferenceAdvancedSearchContext from './DataReferenceAdvancedSearchContext';
7
+ import { Utils } from '../../helpers/utils';
8
+ import { getFirstChildConfig } from './utils';
4
9
  const SELECTION_MODE = { SINGLE: 'single', MULTI: 'multi' };
5
10
  export default function DataReference(props) {
6
11
  // Get emitted components from map (so we can get any override that may exist)
7
12
  const SingleReferenceReadonly = getComponentFromMap('SingleReferenceReadOnly');
8
13
  const MultiReferenceReadonly = getComponentFromMap('MultiReferenceReadOnly');
9
- const { children, getPConnect, label, showLabel, displayMode, allowAndPersistChangesInReviewMode, referenceType, selectionMode, displayAs, ruleClass, parameters, hideLabel } = props;
14
+ const SearchForm = getComponentFromMap('SearchForm');
15
+ const { children, getPConnect, label, showLabel, displayMode, allowAndPersistChangesInReviewMode, referenceType, selectionMode, displayAs, ruleClass, parameters, hideLabel, imagePosition, showImageDescription, showPromotedFilters, isCreationOfNewRecordAllowedForReference, contextClass, inline, selectionList } = props;
16
+ const isMounted = useIsMount();
10
17
  let childrenToRender = children;
11
18
  const pConn = getPConnect();
12
19
  const [dropDownDataSource, setDropDownDataSource] = useState(null);
@@ -15,44 +22,70 @@ export default function DataReference(props) {
15
22
  propsToUse.label = '';
16
23
  }
17
24
  const rawViewMetadata = pConn.getRawMetadata();
18
- const viewName = rawViewMetadata.name;
25
+ const refFieldMetadata = pConn.getFieldMetadata(rawViewMetadata.config?.authorContext);
19
26
  const [firstChildMeta] = rawViewMetadata.children;
20
27
  const refList = rawViewMetadata.config.referenceList;
21
28
  const canBeChangedInReviewMode = allowAndPersistChangesInReviewMode && (displayAs === 'autocomplete' || displayAs === 'dropdown');
22
- let propName;
23
29
  const isDisplayModeEnabled = ['STACKED_LARGE_VAL', 'DISPLAY_ONLY'].includes(displayMode);
30
+ const isDDSourceDeferred = (firstChildMeta?.type === 'Dropdown' && selectionMode === SELECTION_MODE.SINGLE && refFieldMetadata?.descriptors) ||
31
+ firstChildMeta.config.deferDatasource;
32
+ const pyID = Utils.getMappedKey('pyID');
33
+ const isInfinity = pyID === 'pyID';
34
+ const { allowImplicitRefresh } = isInfinity
35
+ ? PCore.getFieldDefaultUtils().fieldDefaults.DataReference || {}
36
+ : {
37
+ allowImplicitRefresh: true
38
+ };
24
39
  let firstChildPConnect;
40
+ const localizedPlaceholderOption = placeholder => {
41
+ const localizedDefaultPlaceholder = pConn.getLocalizedValue('select_placeholder_default', '', 'CosmosFields');
42
+ // If we have a placeholder, push that option in the list of items
43
+ if (placeholder === 'Select...' && localizedDefaultPlaceholder !== 'select_placeholder_default') {
44
+ return localizedDefaultPlaceholder;
45
+ }
46
+ return pConn.getLocalizedValue(placeholder);
47
+ };
48
+ if (['Dropdown', 'AutoComplete'].includes(firstChildMeta?.type)) {
49
+ firstChildMeta.config.placeholder = localizedPlaceholderOption(firstChildMeta.config.placeholder);
50
+ }
51
+ if (['Checkbox', 'RadioButtons'].includes(firstChildMeta?.type) && firstChildMeta.config.variant === 'card') {
52
+ firstChildMeta.config.imagePosition = imagePosition;
53
+ firstChildMeta.config.showImageDescription = showImageDescription;
54
+ }
25
55
  /* Only for dropdown when it has param use data api to get the data back and add it to datasource */
26
56
  useEffect(() => {
27
- if (firstChildMeta?.type === 'Dropdown' && rawViewMetadata.config?.parameters) {
57
+ if (rawViewMetadata.config?.parameters && !isDDSourceDeferred && ['Checkbox', 'Dropdown', 'RadioButtons'].includes(firstChildMeta?.type)) {
28
58
  const { value, key, text } = firstChildMeta.config.datasource.fields;
29
- PCore.getDataApiUtils().getData(refList, {
30
- dataViewParameters: parameters
31
- }, '')
32
- .then(res => {
33
- if (res.data.data !== null) {
34
- const ddDataSource = res.data.data
35
- .map(listItem => ({
36
- key: listItem[key.split(' .', 2)[1]],
37
- text: listItem[text.split(' .', 2)[1]],
38
- value: listItem[value.split(' .', 2)[1]]
39
- }))
40
- .filter(item => item.key);
41
- // Filtering out undefined entries that will break preview
42
- setDropDownDataSource(ddDataSource);
43
- }
44
- else {
45
- const ddDataSource = [];
46
- setDropDownDataSource(ddDataSource);
47
- }
48
- })
49
- .catch(err => {
50
- // eslint-disable-next-line no-console
51
- console.error(err?.stack);
52
- return Promise.resolve({
53
- data: { data: [] }
59
+ if (firstChildMeta.config.variant !== 'card' || (firstChildMeta.config.variant === 'card' && !isMounted)) {
60
+ PCore.getDataApiUtils().getData(refList, {
61
+ dataViewParameters: parameters
62
+ }, '')
63
+ .then(res => {
64
+ if (res.data.data !== null) {
65
+ const ddDataSource = firstChildMeta.config.datasource.filterDownloadedFields
66
+ ? res.data.data
67
+ : res.data.data
68
+ .map(listItem => ({
69
+ key: listItem[key.split(' .', 2)[1]],
70
+ text: listItem[text.split(' .', 2)[1]],
71
+ value: listItem[value.split(' .', 2)[1]]
72
+ }))
73
+ .filter(item => item.key);
74
+ // Filtering out undefined entries that will break preview
75
+ setDropDownDataSource(ddDataSource);
76
+ }
77
+ else {
78
+ const ddDataSource = [];
79
+ setDropDownDataSource(ddDataSource);
80
+ }
81
+ })
82
+ .catch(err => {
83
+ console.error(err?.stack);
84
+ return Promise.resolve({
85
+ data: { data: [] }
86
+ });
54
87
  });
55
- });
88
+ }
56
89
  }
57
90
  }, [firstChildMeta, rawViewMetadata, parameters]);
58
91
  if (firstChildMeta?.type !== 'Region') {
@@ -77,28 +110,40 @@ export default function DataReference(props) {
77
110
  if (!canBeChangedInReviewMode) {
78
111
  firstChildMeta.config.displayMode = displayMode;
79
112
  }
80
- if (firstChildMeta.type === 'SimpleTableSelect' && selectionMode === SELECTION_MODE.MULTI) {
81
- propName = PCore.getAnnotationUtils().getPropertyName(firstChildMeta.config.selectionList);
82
- }
83
- else {
84
- propName = PCore.getAnnotationUtils().getPropertyName(firstChildMeta.config.value);
85
- }
86
113
  }
87
114
  const handleSelection = event => {
88
115
  const caseKey = pConn.getCaseInfo().getKey();
89
116
  const refreshOptions = { autoDetectRefresh: true };
90
- if (canBeChangedInReviewMode && pConn.getValue('__currentPageTabViewName', '')) {
91
- // 2nd arg empty string until typedef marked correctly
92
- getPConnect().getActionsApi().refreshCaseView(caseKey, pConn.getValue('__currentPageTabViewName', ''), '', refreshOptions); // 2nd arg empty string until typedef marked correctly
93
- PCore.getDeferLoadManager().refreshActiveComponents(pConn.getContextName());
117
+ const children = pConn.getRawMetadata()?.children;
118
+ if (children?.length > 0 && children[0].config?.value) {
119
+ refreshOptions.propertyName = children[0].config.value;
120
+ refreshOptions.classID = pConn.getRawMetadata().classID;
94
121
  }
95
- else {
96
- const pgRef = pConn.getPageReference().replace('caseInfo.content', '');
97
- getPConnect().getActionsApi().refreshCaseView(caseKey, viewName, pgRef, refreshOptions);
122
+ // AutoComplete sets value on event.id whereas Dropdown sets it on event.target.value if event.id is unset
123
+ // When value is empty propValue will be undefined here and no value will be set for the reference
124
+ const propValue = event?.id || event?.target?.value;
125
+ const propName = firstChildMeta.type === 'SimpleTableSelect' && selectionMode === SELECTION_MODE.MULTI
126
+ ? PCore.getAnnotationUtils().getPropertyName(firstChildMeta.config.selectionList)
127
+ : PCore.getAnnotationUtils().getPropertyName(firstChildMeta.config.value);
128
+ const hasAssociatedViewConfigured = rawViewMetadata.children[1].children?.length;
129
+ if (pConn.getContextName().includes('modal') || pConn.getContextName().includes('workarea')) {
130
+ if (hasAssociatedViewConfigured || allowImplicitRefresh) {
131
+ const pageReference = pConn.getPageReference();
132
+ let pgRef = null;
133
+ if (pageReference.startsWith('objectInfo')) {
134
+ pgRef = pageReference.replace('objectInfo.content', '');
135
+ }
136
+ else {
137
+ pgRef = pageReference.replace('caseInfo.content', '');
138
+ }
139
+ const viewName = rawViewMetadata.name;
140
+ getPConnect()
141
+ .getActionsApi()
142
+ .refreshCaseView(caseKey, viewName, pgRef, refreshOptions)
143
+ .catch(() => { });
144
+ }
98
145
  }
99
- // AutoComplete sets value on event.id whereas Dropdown sets it on event.target.value
100
- const propValue = event?.id || event?.target.value;
101
- if (propValue && canBeChangedInReviewMode && isDisplayModeEnabled) {
146
+ else if (propValue && canBeChangedInReviewMode && isDisplayModeEnabled) {
102
147
  PCore.getDataApiUtils().getCaseEditLock(caseKey, '').then(caseResponse => {
103
148
  const pageTokens = pConn.getPageReference().replace('caseInfo.content', '').split('.');
104
149
  let curr = {};
@@ -132,53 +177,167 @@ export default function DataReference(props) {
132
177
  // rerenders without any actual change
133
178
  const recreatedFirstChild = useMemo(() => {
134
179
  const { type, config } = firstChildMeta;
135
- if (firstChildMeta?.type !== 'Region') {
136
- pConn.clearErrorMessages({
137
- // Need to add empty string for category and context to match typdef
138
- property: propName,
139
- category: '',
140
- context: ''
141
- });
142
- if (!canBeChangedInReviewMode && isDisplayModeEnabled && selectionMode === SELECTION_MODE.SINGLE) {
143
- return (_jsx(SingleReferenceReadonly, { config: config, getPConnect: firstChildPConnect, label: propsToUse.label, type: type, displayAs: displayAs, displayMode: displayMode, ruleClass: ruleClass, referenceType: referenceType, hideLabel: hideLabel, dataRelationshipContext: rawViewMetadata.config.contextClass && rawViewMetadata.config.name ? rawViewMetadata.config.name : null }));
180
+ if (firstChildMeta?.type === 'Region' && displayAs !== 'advancedSearch') {
181
+ return;
182
+ }
183
+ if ((displayAs === 'readonly' || isDisplayModeEnabled) && !canBeChangedInReviewMode && selectionMode === SELECTION_MODE.SINGLE) {
184
+ return (_jsx(SingleReferenceReadonly, { config: config, getPConnect: firstChildPConnect, label: propsToUse.label, type: type, displayAs: displayAs, displayMode: displayMode, ruleClass: ruleClass, referenceType: referenceType, hideLabel: hideLabel, dataRelationshipContext: rawViewMetadata.config.contextClass && rawViewMetadata.config.name ? rawViewMetadata.config.name : null }));
185
+ }
186
+ if ((['readonly', 'readonlyMulti', 'map'].includes(displayAs) || isDisplayModeEnabled) && selectionMode === SELECTION_MODE.MULTI) {
187
+ return (_jsx(MultiReferenceReadonly, { config: {
188
+ ...firstChildMeta.config,
189
+ localeReference: rawViewMetadata.config.localeReference
190
+ }, getPConnect: firstChildPConnect, displayAs: displayAs, label: propsToUse.label, hideLabel: hideLabel, displayMode: displayMode }));
191
+ }
192
+ /* Editable variants */
193
+ // Datasource w/ parameters cannot load the dropdown before the parameters
194
+ if (type === 'Dropdown' && dropDownDataSource === null && !isDDSourceDeferred && rawViewMetadata.config?.parameters) {
195
+ return null;
196
+ }
197
+ if (firstChildMeta.config?.readOnly) {
198
+ delete firstChildMeta.config.readOnly;
199
+ }
200
+ // 2) Set datasource
201
+ if (['Dropdown', 'Checkbox', 'RadioButtons'].includes(firstChildMeta?.type) &&
202
+ !firstChildMeta.config.deferDatasource &&
203
+ firstChildMeta.config.datasource) {
204
+ firstChildMeta.config.datasource.source =
205
+ (firstChildMeta.config.variant === 'card' && dropDownDataSource) ||
206
+ (firstChildMeta.config.variant !== 'card' && rawViewMetadata.config?.parameters)
207
+ ? dropDownDataSource
208
+ : '@DATASOURCE '.concat(refList).concat('.pxResults');
209
+ }
210
+ else if (firstChildMeta?.type === 'AutoComplete') {
211
+ firstChildMeta.config.datasource = refList;
212
+ if (rawViewMetadata.config?.parameters) {
213
+ firstChildMeta.config.parameters = parameters;
144
214
  }
145
- if (isDisplayModeEnabled && selectionMode === SELECTION_MODE.MULTI) {
146
- return _jsx(MultiReferenceReadonly, { config: config, getPConnect: firstChildPConnect, label: propsToUse.label, hideLabel: hideLabel });
215
+ }
216
+ // 3) Pass through configs
217
+ if (firstChildMeta.config) {
218
+ firstChildMeta.config.showPromotedFilters = showPromotedFilters;
219
+ if (!canBeChangedInReviewMode) {
220
+ firstChildMeta.config.displayMode = displayMode;
147
221
  }
148
- // In the case of a datasource with parameters you cannot load the dropdown before the parameters
149
- if (type === 'Dropdown' && rawViewMetadata.config?.parameters && dropDownDataSource === null) {
150
- return null;
222
+ }
223
+ // 4) Define field meta
224
+ let fieldMetaData = null;
225
+ if (isDDSourceDeferred && !firstChildMeta.config.deferDatasource) {
226
+ fieldMetaData = {
227
+ datasourceMetadata: refFieldMetadata
228
+ };
229
+ if (rawViewMetadata.config?.parameters) {
230
+ fieldMetaData.datasourceMetadata.datasource.parameters = parameters;
151
231
  }
152
- return firstChildPConnect().createComponent({
153
- type,
154
- config: {
155
- ...config,
156
- required: propsToUse.required,
157
- visibility: propsToUse.visibility,
158
- disabled: propsToUse.disabled,
159
- label: propsToUse.label,
160
- viewName: getPConnect().getCurrentView(),
161
- parameters: rawViewMetadata.config.parameters,
162
- readOnly: false,
163
- localeReference: rawViewMetadata.config.localeReference,
164
- ...(selectionMode === SELECTION_MODE.SINGLE ? { referenceType } : ''),
165
- dataRelationshipContext: rawViewMetadata.config.contextClass && rawViewMetadata.config.name ? rawViewMetadata.config.name : null,
166
- hideLabel,
167
- onRecordChange: handleSelection
232
+ fieldMetaData.datasourceMetadata.datasource.propertyForDisplayText = firstChildMeta?.config?.datasource?.fields?.text.startsWith('@P')
233
+ ? firstChildMeta?.config?.datasource?.fields?.text?.substring(3)
234
+ : firstChildMeta?.config?.datasource?.fields?.text;
235
+ fieldMetaData.datasourceMetadata.datasource.propertyForValue = firstChildMeta?.config?.datasource?.fields?.value.startsWith('@P')
236
+ ? firstChildMeta?.config?.datasource?.fields?.value?.substring(3)
237
+ : firstChildMeta?.config?.datasource?.fields?.value;
238
+ fieldMetaData.datasourceMetadata.datasource.name = rawViewMetadata.config?.referenceList;
239
+ }
240
+ // @ts-expect-error
241
+ const { disableStartingFieldsForReference = false } = PCore.getEnvironmentInfo().environmentInfoObject?.features?.form || {};
242
+ // @ts-expect-error
243
+ let { isCreateNewReferenceEnabled = false } = PCore.getEnvironmentInfo().environmentInfoObject?.features?.form || {};
244
+ if (isCreateNewReferenceEnabled) {
245
+ isCreateNewReferenceEnabled = isCreationOfNewRecordAllowedForReference && PCore.getAccessPrivilege().hasCreateAccess(contextClass);
246
+ }
247
+ const startingFields = {};
248
+ const createNewRecord = () => {
249
+ if (referenceType === 'Case' || firstChildMeta?.config?.referenceType === 'Case') {
250
+ if (!disableStartingFieldsForReference) {
251
+ startingFields.pyAddCaseContextPage = { pyID: pConn.getCaseInfo().getKey()?.split(' ')?.pop() };
168
252
  }
169
- }, '', '', {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional);
253
+ return pConn.getActionsApi().createWork(contextClass, {
254
+ openCaseViewAfterCreate: false,
255
+ startingFields
256
+ });
257
+ }
258
+ if (referenceType === 'Data' || firstChildMeta?.config?.referenceType === 'Data') {
259
+ return getPConnect().getActionsApi().showDataObjectCreateView(contextClass);
260
+ }
261
+ };
262
+ const additionalInfo = refFieldMetadata?.additionalInformation
263
+ ? {
264
+ content: refFieldMetadata.additionalInformation
265
+ }
266
+ : undefined;
267
+ const dataReferenceConfigToChild = {
268
+ selectionMode,
269
+ additionalInfo,
270
+ descriptors: selectionMode === SELECTION_MODE.SINGLE ? refFieldMetadata?.descriptors : null,
271
+ datasourceMetadata: fieldMetaData?.datasourceMetadata,
272
+ required: propsToUse.required,
273
+ visibility: propsToUse.visibility,
274
+ disabled: propsToUse.disabled,
275
+ label: propsToUse.label,
276
+ displayAs,
277
+ readOnly: false,
278
+ ...(selectionMode === SELECTION_MODE.SINGLE && {
279
+ referenceType
280
+ }),
281
+ ...(selectionMode === SELECTION_MODE.SINGLE &&
282
+ displayAs === 'advancedSearch' && {
283
+ value: rawViewMetadata.config.value,
284
+ contextPage: rawViewMetadata.config.contextPage
285
+ }),
286
+ ...(selectionMode === SELECTION_MODE.MULTI &&
287
+ displayAs === 'advancedSearch' && {
288
+ selectionList,
289
+ readonlyContextList: rawViewMetadata.config.readonlyContextList
290
+ }),
291
+ dataRelationshipContext: rawViewMetadata.config.contextClass && rawViewMetadata.config.name ? rawViewMetadata.config.name : null,
292
+ hideLabel,
293
+ onRecordChange: handleSelection,
294
+ createNewRecord: isCreateNewReferenceEnabled ? createNewRecord : undefined,
295
+ inline
296
+ };
297
+ const searchSelectCacheKey = componentCachePersistUtils.getComponentStateKey(getPConnect, rawViewMetadata.config.name);
298
+ const dataReferenceAdvancedSearchContext = {
299
+ dataReferenceConfigToChild,
300
+ isCreateNewReferenceEnabled,
301
+ disableStartingFieldsForReference,
302
+ pyID,
303
+ searchSelectCacheKey
304
+ };
305
+ if (displayAs === 'advancedSearch') {
306
+ return (_jsx(DataReferenceAdvancedSearchContext.Provider, { value: dataReferenceAdvancedSearchContext, children: _jsx(SearchForm, { getPConnect: getPConnect, searchSelectCacheKey: searchSelectCacheKey, children: children }) }));
170
307
  }
308
+ return firstChildPConnect().createComponent({
309
+ type,
310
+ config: {
311
+ ...getFirstChildConfig({
312
+ firstChildMeta,
313
+ getPConnect,
314
+ rawViewMetadata,
315
+ contextClass,
316
+ dataReferenceConfigToChild,
317
+ isCreateNewReferenceEnabled,
318
+ disableStartingFieldsForReference,
319
+ pyID
320
+ })
321
+ }
322
+ });
171
323
  }, [firstChildMeta.config?.datasource?.source, parameters, dropDownDataSource, propsToUse.required, propsToUse.disabled]);
172
324
  // Only include the views region for rendering when it has content
173
325
  if (firstChildMeta?.type !== 'Region') {
174
326
  const viewsRegion = rawViewMetadata.children[1];
175
327
  if (viewsRegion?.name === 'Views' && viewsRegion.children.length) {
328
+ viewsRegion.children.map(child => {
329
+ child.config.isEmbeddedInDataReference = true;
330
+ return child;
331
+ });
176
332
  childrenToRender = [recreatedFirstChild, ...children.slice(1)];
177
333
  }
178
334
  else {
179
335
  childrenToRender = [recreatedFirstChild];
180
336
  }
181
337
  }
182
- return childrenToRender.length === 1 ? ((childrenToRender[0] ?? null)) : (_jsx("div", { children: childrenToRender.map(child => (_jsx(_Fragment, { children: child }))) }));
338
+ else if (displayAs === 'advancedSearch') {
339
+ childrenToRender = [recreatedFirstChild];
340
+ }
341
+ return childrenToRender.length === 1 ? ((childrenToRender[0] ?? null)) : (_jsx("div", { children: childrenToRender.map((child, index) => (_jsx(React.Fragment, { children: child }, index))) }));
183
342
  }
184
343
  //# sourceMappingURL=DataReference.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DataReference.js","sourceRoot":"","sources":["../../../../src/components/template/DataReference/DataReference.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAmC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAkBhF,MAAM,cAAc,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AAE5D,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAA4C;IAChF,8EAA8E;IAC9E,MAAM,uBAAuB,GAAG,mBAAmB,CAAC,yBAAyB,CAAC,CAAC;IAC/E,MAAM,sBAAsB,GAAG,mBAAmB,CAAC,wBAAwB,CAAC,CAAC;IAE7E,MAAM,EACJ,QAAQ,EACR,WAAW,EACX,KAAK,EACL,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C,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CACrC,CAAC,gBAAgB,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAC9B,CAAC,CAAC,CAAC,CACF,wBACG,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAC7B,4BAAG,KAAK,GAAI,CACb,CAAC,GACE,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { PropsWithChildren, ReactElement, useEffect, useMemo, useState } from 'react';\n\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { PConnProps } from '../../../types/PConnProps';\n\n// ReferenceProps can't be used until getComponentConfig() is NOT private\ninterface DataReferenceProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n label: string;\n showLabel: any;\n displayMode: string;\n allowAndPersistChangesInReviewMode: boolean;\n referenceType: string;\n selectionMode: string;\n displayAs: string;\n ruleClass: string;\n parameters: string[]; // need to fix\n hideLabel: boolean;\n}\n\nconst SELECTION_MODE = { SINGLE: 'single', MULTI: 'multi' };\n\nexport default function DataReference(props: PropsWithChildren<DataReferenceProps>) {\n // Get emitted components from map (so we can get any override that may exist)\n const SingleReferenceReadonly = getComponentFromMap('SingleReferenceReadOnly');\n const MultiReferenceReadonly = getComponentFromMap('MultiReferenceReadOnly');\n\n const {\n children,\n getPConnect,\n label,\n showLabel,\n displayMode,\n allowAndPersistChangesInReviewMode,\n referenceType,\n selectionMode,\n displayAs,\n ruleClass,\n parameters,\n hideLabel\n } = props;\n let childrenToRender = children as ReactElement[];\n const pConn = getPConnect();\n const [dropDownDataSource, setDropDownDataSource] = useState(null);\n const propsToUse: any = { label, showLabel, ...pConn.getInheritedProps() };\n if (propsToUse.showLabel === false) {\n propsToUse.label = '';\n }\n const rawViewMetadata: any = pConn.getRawMetadata();\n const viewName = rawViewMetadata.name;\n const [firstChildMeta] = rawViewMetadata.children;\n const refList = rawViewMetadata.config.referenceList;\n const canBeChangedInReviewMode = allowAndPersistChangesInReviewMode && (displayAs === 'autocomplete' || displayAs === 'dropdown');\n let propName;\n const isDisplayModeEnabled = ['STACKED_LARGE_VAL', 'DISPLAY_ONLY'].includes(displayMode);\n let firstChildPConnect;\n\n /* Only for dropdown when it has param use data api to get the data back and add it to datasource */\n useEffect(() => {\n if (firstChildMeta?.type === 'Dropdown' && rawViewMetadata.config?.parameters) {\n const { value, key, text } = firstChildMeta.config.datasource.fields;\n (\n PCore.getDataApiUtils().getData(\n refList,\n {\n dataViewParameters: parameters\n } as any,\n ''\n ) as Promise<any>\n )\n .then(res => {\n if (res.data.data !== null) {\n const ddDataSource = res.data.data\n .map(listItem => ({\n key: listItem[key.split(' .', 2)[1]],\n text: listItem[text.split(' .', 2)[1]],\n value: listItem[value.split(' .', 2)[1]]\n }))\n .filter(item => item.key);\n // Filtering out undefined entries that will break preview\n setDropDownDataSource(ddDataSource);\n } else {\n const ddDataSource: any = [];\n setDropDownDataSource(ddDataSource);\n }\n })\n .catch(err => {\n // eslint-disable-next-line no-console\n console.error(err?.stack);\n return Promise.resolve({\n data: { data: [] }\n });\n });\n }\n }, [firstChildMeta, rawViewMetadata, parameters]);\n\n if (firstChildMeta?.type !== 'Region') {\n firstChildPConnect = getPConnect().getChildren()?.[0].getPConnect;\n /* remove refresh When condition from those old view so that it will not be used for runtime */\n if (firstChildMeta.config?.readOnly) {\n delete firstChildMeta.config.readOnly;\n }\n if (firstChildMeta?.type === 'Dropdown') {\n firstChildMeta.config.datasource.source = rawViewMetadata.config?.parameters\n ? dropDownDataSource\n : '@DATASOURCE '.concat(refList).concat('.pxResults');\n } else if (firstChildMeta?.type === 'AutoComplete') {\n firstChildMeta.config.datasource = refList;\n\n /* Insert the parameters to the component only if present */\n if (rawViewMetadata.config?.parameters) {\n firstChildMeta.config.parameters = parameters;\n }\n }\n // set displayMode conditionally\n if (!canBeChangedInReviewMode) {\n firstChildMeta.config.displayMode = displayMode;\n }\n if (firstChildMeta.type === 'SimpleTableSelect' && selectionMode === SELECTION_MODE.MULTI) {\n propName = PCore.getAnnotationUtils().getPropertyName(firstChildMeta.config.selectionList);\n } else {\n propName = PCore.getAnnotationUtils().getPropertyName(firstChildMeta.config.value);\n }\n }\n\n const handleSelection = event => {\n const caseKey = pConn.getCaseInfo().getKey();\n const refreshOptions = { autoDetectRefresh: true };\n if (canBeChangedInReviewMode && pConn.getValue('__currentPageTabViewName', '')) {\n // 2nd arg empty string until typedef marked correctly\n getPConnect().getActionsApi().refreshCaseView(caseKey, pConn.getValue('__currentPageTabViewName', ''), '', refreshOptions); // 2nd arg empty string until typedef marked correctly\n PCore.getDeferLoadManager().refreshActiveComponents(pConn.getContextName());\n } else {\n const pgRef = pConn.getPageReference().replace('caseInfo.content', '');\n getPConnect().getActionsApi().refreshCaseView(caseKey, viewName, pgRef, refreshOptions);\n }\n\n // AutoComplete sets value on event.id whereas Dropdown sets it on event.target.value\n const propValue = event?.id || event?.target.value;\n if (propValue && canBeChangedInReviewMode && isDisplayModeEnabled) {\n (PCore.getDataApiUtils().getCaseEditLock(caseKey, '') as Promise<any>).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 (\n PCore.getDataApiUtils().updateCaseEditFieldsData(\n caseKey,\n { [caseKey]: commitData },\n caseResponse.headers.etag,\n pConn.getContextName()\n ) as Promise<any>\n ).then(response => {\n PCore.getContainerUtils().updateParentLastUpdateTime(pConn.getContextName(), response.data.data.caseInfo.lastUpdateTime);\n PCore.getContainerUtils().updateRelatedContextEtag(pConn.getContextName(), response.headers.etag);\n });\n });\n }\n };\n\n // Re-create first child with overridden props\n // Memoized child in order to stop unmount and remount of the child component when data reference\n // rerenders without any actual change\n const recreatedFirstChild = useMemo(() => {\n const { type, config } = firstChildMeta;\n if (firstChildMeta?.type !== 'Region') {\n pConn.clearErrorMessages({\n // Need to add empty string for category and context to match typdef\n property: propName,\n category: '',\n context: ''\n });\n if (!canBeChangedInReviewMode && isDisplayModeEnabled && selectionMode === SELECTION_MODE.SINGLE) {\n return (\n <SingleReferenceReadonly\n config={config}\n getPConnect={firstChildPConnect}\n label={propsToUse.label}\n type={type}\n displayAs={displayAs}\n displayMode={displayMode}\n ruleClass={ruleClass}\n referenceType={referenceType}\n hideLabel={hideLabel}\n dataRelationshipContext={rawViewMetadata.config.contextClass && rawViewMetadata.config.name ? rawViewMetadata.config.name : null}\n />\n );\n }\n\n if (isDisplayModeEnabled && selectionMode === SELECTION_MODE.MULTI) {\n return <MultiReferenceReadonly config={config} getPConnect={firstChildPConnect} label={propsToUse.label} hideLabel={hideLabel} />;\n }\n\n // In the case of a datasource with parameters you cannot load the dropdown before the parameters\n if (type === 'Dropdown' && rawViewMetadata.config?.parameters && dropDownDataSource === null) {\n return null;\n }\n\n return firstChildPConnect().createComponent(\n {\n type,\n config: {\n ...config,\n required: propsToUse.required,\n visibility: propsToUse.visibility,\n disabled: propsToUse.disabled,\n label: propsToUse.label,\n viewName: getPConnect().getCurrentView(),\n parameters: rawViewMetadata.config.parameters,\n readOnly: false,\n localeReference: rawViewMetadata.config.localeReference,\n ...(selectionMode === SELECTION_MODE.SINGLE ? { referenceType } : ''),\n dataRelationshipContext: rawViewMetadata.config.contextClass && rawViewMetadata.config.name ? rawViewMetadata.config.name : null,\n hideLabel,\n onRecordChange: handleSelection\n }\n },\n '',\n '',\n {}\n ); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional);\n }\n }, [firstChildMeta.config?.datasource?.source, parameters, dropDownDataSource, propsToUse.required, propsToUse.disabled]);\n\n // Only include the views region for rendering when it has content\n if (firstChildMeta?.type !== 'Region') {\n const viewsRegion = rawViewMetadata.children[1];\n if (viewsRegion?.name === 'Views' && viewsRegion.children.length) {\n childrenToRender = [recreatedFirstChild, ...(children as ReactElement[]).slice(1)];\n } else {\n childrenToRender = [recreatedFirstChild];\n }\n }\n\n return childrenToRender.length === 1 ? (\n (childrenToRender[0] ?? null)\n ) : (\n <div>\n {childrenToRender.map(child => (\n <>{child}</>\n ))}\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"DataReference.js","sourceRoot":"","sources":["../../../../src/components/template/DataReference/DataReference.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAA6C,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEvG,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,OAAO,UAAU,MAAM,2BAA2B,CAAC;AACnD,OAAO,0BAA0B,MAAM,4CAA4C,CAAC;AACpF,OAAO,kCAAkC,MAAM,sCAAsC,CAAC;AACtF,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAwB9C,MAAM,cAAc,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AAE5D,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAA4C;IAChF,8EAA8E;IAC9E,MAAM,uBAAuB,GAAG,mBAAmB,CAAC,yBAAyB,CAAC,CAAC;IAC/E,MAAM,sBAAsB,GAAG,mBAAmB,CAAC,wBAAwB,CAAC,CAAC;IAC7E,MAAM,UAAU,GAAG,mBAAmB,CAAC,YAAY,CAAC,CAAC;IACrD,MAAM,EACJ,QAAQ,EACR,WAAW,EACX,KAAK,EACL,SAAS,EACT,WAAW,EACX,kCAAkC,EAClC,aAAa,EACb,aAAa,EACb,SAAS,EACT,SAAS,EACT,UAAU,EACV,SAAS,EACT,aAAa,EACb,oBAAoB,EACpB,mBAAmB,EACnB,wCAAwC,EACxC,YAAY,EACZ,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,CAAC;QAC1C,gBAAgB,GAAG,CAAC,mBAAmB,CAAC,CAAC;IAC3C,CAAC;IAED,OAAO,gBAAgB,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CACrC,CAAC,gBAAgB,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAC9B,CAAC,CAAC,CAAC,CACF,wBACG,gBAAgB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CACtC,KAAC,KAAK,CAAC,QAAQ,cAAc,KAAK,IAAb,KAAK,CAA0B,CACrD,CAAC,GACE,CACP,CAAC;AACJ,CAAC","sourcesContent":["import React, { type PropsWithChildren, type ReactElement, useEffect, useMemo, useState } from 'react';\n\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport type { PConnProps } from '../../../types/PConnProps';\nimport useIsMount from '../../../hooks/useIsMount';\nimport componentCachePersistUtils from '../AdvancedSearch/SearchGroup/persistUtils';\nimport DataReferenceAdvancedSearchContext from './DataReferenceAdvancedSearchContext';\nimport { Utils } from '../../helpers/utils';\nimport { getFirstChildConfig } from './utils';\n\n// ReferenceProps can't be used until getComponentConfig() is NOT private\ninterface DataReferenceProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n label: string;\n showLabel: any;\n displayMode: string;\n allowAndPersistChangesInReviewMode: boolean;\n referenceType: string;\n selectionMode: string;\n displayAs: string;\n ruleClass: string;\n parameters: string[]; // need to fix\n hideLabel: boolean;\n imagePosition: string;\n showImageDescription: string;\n showPromotedFilters: boolean;\n isCreationOfNewRecordAllowedForReference: boolean;\n contextClass: string;\n inline: any;\n selectionList: any;\n}\n\nconst SELECTION_MODE = { SINGLE: 'single', MULTI: 'multi' };\n\nexport default function DataReference(props: PropsWithChildren<DataReferenceProps>) {\n // Get emitted components from map (so we can get any override that may exist)\n const SingleReferenceReadonly = getComponentFromMap('SingleReferenceReadOnly');\n const MultiReferenceReadonly = getComponentFromMap('MultiReferenceReadOnly');\n const SearchForm = getComponentFromMap('SearchForm');\n const {\n children,\n getPConnect,\n label,\n showLabel,\n displayMode,\n allowAndPersistChangesInReviewMode,\n referenceType,\n selectionMode,\n displayAs,\n ruleClass,\n parameters,\n hideLabel,\n imagePosition,\n showImageDescription,\n showPromotedFilters,\n isCreationOfNewRecordAllowedForReference,\n contextClass,\n inline,\n selectionList\n } = props;\n\n const isMounted = useIsMount();\n let childrenToRender = children as ReactElement[];\n const pConn = getPConnect();\n const [dropDownDataSource, setDropDownDataSource] = useState(null);\n const propsToUse: any = { label, showLabel, ...pConn.getInheritedProps() };\n if (propsToUse.showLabel === false) {\n propsToUse.label = '';\n }\n const rawViewMetadata: any = pConn.getRawMetadata();\n const refFieldMetadata = pConn.getFieldMetadata(rawViewMetadata.config?.authorContext);\n\n const [firstChildMeta] = rawViewMetadata.children;\n const refList = rawViewMetadata.config.referenceList;\n const canBeChangedInReviewMode = allowAndPersistChangesInReviewMode && (displayAs === 'autocomplete' || displayAs === 'dropdown');\n const isDisplayModeEnabled = ['STACKED_LARGE_VAL', 'DISPLAY_ONLY'].includes(displayMode);\n const isDDSourceDeferred =\n (firstChildMeta?.type === 'Dropdown' && selectionMode === SELECTION_MODE.SINGLE && refFieldMetadata?.descriptors) ||\n firstChildMeta.config.deferDatasource;\n const pyID = Utils.getMappedKey('pyID');\n const isInfinity = pyID === 'pyID';\n const { allowImplicitRefresh } = isInfinity\n ? PCore.getFieldDefaultUtils().fieldDefaults.DataReference || {}\n : {\n allowImplicitRefresh: true\n };\n\n let firstChildPConnect;\n\n const localizedPlaceholderOption = placeholder => {\n const localizedDefaultPlaceholder = pConn.getLocalizedValue('select_placeholder_default', '', 'CosmosFields');\n // If we have a placeholder, push that option in the list of items\n if (placeholder === 'Select...' && localizedDefaultPlaceholder !== 'select_placeholder_default') {\n return localizedDefaultPlaceholder;\n }\n return pConn.getLocalizedValue(placeholder);\n };\n\n if (['Dropdown', 'AutoComplete'].includes(firstChildMeta?.type)) {\n firstChildMeta.config.placeholder = localizedPlaceholderOption(firstChildMeta.config.placeholder);\n }\n\n if (['Checkbox', 'RadioButtons'].includes(firstChildMeta?.type) && firstChildMeta.config.variant === 'card') {\n firstChildMeta.config.imagePosition = imagePosition;\n firstChildMeta.config.showImageDescription = showImageDescription;\n }\n\n /* Only for dropdown when it has param use data api to get the data back and add it to datasource */\n useEffect(() => {\n if (rawViewMetadata.config?.parameters && !isDDSourceDeferred && ['Checkbox', 'Dropdown', 'RadioButtons'].includes(firstChildMeta?.type)) {\n const { value, key, text } = firstChildMeta.config.datasource.fields;\n if (firstChildMeta.config.variant !== 'card' || (firstChildMeta.config.variant === 'card' && !isMounted)) {\n (\n PCore.getDataApiUtils().getData(\n refList,\n {\n dataViewParameters: parameters\n } as any,\n ''\n ) as Promise<any>\n )\n .then(res => {\n if (res.data.data !== null) {\n const ddDataSource = firstChildMeta.config.datasource.filterDownloadedFields\n ? res.data.data\n : res.data.data\n .map(listItem => ({\n key: listItem[key.split(' .', 2)[1]],\n text: listItem[text.split(' .', 2)[1]],\n value: listItem[value.split(' .', 2)[1]]\n }))\n .filter(item => item.key);\n // Filtering out undefined entries that will break preview\n setDropDownDataSource(ddDataSource);\n } else {\n const ddDataSource: any = [];\n setDropDownDataSource(ddDataSource);\n }\n })\n .catch(err => {\n console.error(err?.stack);\n return Promise.resolve({\n data: { data: [] }\n });\n });\n }\n }\n }, [firstChildMeta, rawViewMetadata, parameters]);\n\n if (firstChildMeta?.type !== 'Region') {\n firstChildPConnect = getPConnect().getChildren()?.[0].getPConnect;\n /* remove refresh When condition from those old view so that it will not be used for runtime */\n if (firstChildMeta.config?.readOnly) {\n delete firstChildMeta.config.readOnly;\n }\n if (firstChildMeta?.type === 'Dropdown') {\n firstChildMeta.config.datasource.source = rawViewMetadata.config?.parameters\n ? dropDownDataSource\n : '@DATASOURCE '.concat(refList).concat('.pxResults');\n } else if (firstChildMeta?.type === 'AutoComplete') {\n firstChildMeta.config.datasource = refList;\n\n /* Insert the parameters to the component only if present */\n if (rawViewMetadata.config?.parameters) {\n firstChildMeta.config.parameters = parameters;\n }\n }\n // set displayMode conditionally\n if (!canBeChangedInReviewMode) {\n firstChildMeta.config.displayMode = displayMode;\n }\n }\n\n const handleSelection = event => {\n const caseKey = pConn.getCaseInfo().getKey();\n const refreshOptions: any = { autoDetectRefresh: true };\n\n const children: any = pConn.getRawMetadata()?.children;\n if (children?.length > 0 && children[0].config?.value) {\n refreshOptions.propertyName = children[0].config.value;\n refreshOptions.classID = (pConn.getRawMetadata() as any).classID;\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 firstChildMeta.type === 'SimpleTableSelect' && selectionMode === SELECTION_MODE.MULTI\n ? PCore.getAnnotationUtils().getPropertyName(firstChildMeta.config.selectionList)\n : PCore.getAnnotationUtils().getPropertyName(firstChildMeta.config.value);\n\n const hasAssociatedViewConfigured = rawViewMetadata.children[1].children?.length;\n\n if (pConn.getContextName().includes('modal') || pConn.getContextName().includes('workarea')) {\n if (hasAssociatedViewConfigured || allowImplicitRefresh) {\n const pageReference = pConn.getPageReference();\n let pgRef: any = null;\n if (pageReference.startsWith('objectInfo')) {\n pgRef = pageReference.replace('objectInfo.content', '');\n } else {\n pgRef = pageReference.replace('caseInfo.content', '');\n }\n const viewName = rawViewMetadata.name;\n getPConnect()\n .getActionsApi()\n .refreshCaseView(caseKey, viewName, pgRef, refreshOptions)\n .catch(() => {});\n }\n } else if (propValue && canBeChangedInReviewMode && isDisplayModeEnabled) {\n (PCore.getDataApiUtils().getCaseEditLock(caseKey, '') as Promise<any>).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 (\n PCore.getDataApiUtils().updateCaseEditFieldsData(\n caseKey,\n { [caseKey]: commitData },\n caseResponse.headers.etag,\n pConn.getContextName()\n ) as Promise<any>\n ).then(response => {\n PCore.getContainerUtils().updateParentLastUpdateTime(pConn.getContextName(), response.data.data.caseInfo.lastUpdateTime);\n PCore.getContainerUtils().updateRelatedContextEtag(pConn.getContextName(), response.headers.etag);\n });\n });\n }\n };\n\n // Re-create first child with overridden props\n // Memoized child in order to stop unmount and remount of the child component when data reference\n // rerenders without any actual change\n const recreatedFirstChild = useMemo(() => {\n const { type, config } = firstChildMeta;\n if (firstChildMeta?.type === 'Region' && displayAs !== 'advancedSearch') {\n return;\n }\n\n if ((displayAs === 'readonly' || isDisplayModeEnabled) && !canBeChangedInReviewMode && selectionMode === SELECTION_MODE.SINGLE) {\n return (\n <SingleReferenceReadonly\n config={config}\n getPConnect={firstChildPConnect}\n label={propsToUse.label}\n type={type}\n displayAs={displayAs}\n displayMode={displayMode}\n ruleClass={ruleClass}\n referenceType={referenceType}\n hideLabel={hideLabel}\n dataRelationshipContext={rawViewMetadata.config.contextClass && rawViewMetadata.config.name ? rawViewMetadata.config.name : null}\n />\n );\n }\n\n if ((['readonly', 'readonlyMulti', 'map'].includes(displayAs) || isDisplayModeEnabled) && selectionMode === SELECTION_MODE.MULTI) {\n return (\n <MultiReferenceReadonly\n config={{\n ...firstChildMeta.config,\n localeReference: rawViewMetadata.config.localeReference\n }}\n getPConnect={firstChildPConnect}\n displayAs={displayAs}\n label={propsToUse.label}\n hideLabel={hideLabel}\n displayMode={displayMode}\n />\n );\n }\n\n /* Editable variants */\n // Datasource w/ parameters cannot load the dropdown before the parameters\n if (type === 'Dropdown' && dropDownDataSource === null && !isDDSourceDeferred && rawViewMetadata.config?.parameters) {\n return null;\n }\n\n if (firstChildMeta.config?.readOnly) {\n delete firstChildMeta.config.readOnly;\n }\n\n // 2) Set datasource\n if (\n ['Dropdown', 'Checkbox', 'RadioButtons'].includes(firstChildMeta?.type) &&\n !firstChildMeta.config.deferDatasource &&\n firstChildMeta.config.datasource\n ) {\n firstChildMeta.config.datasource.source =\n (firstChildMeta.config.variant === 'card' && dropDownDataSource) ||\n (firstChildMeta.config.variant !== 'card' && rawViewMetadata.config?.parameters)\n ? dropDownDataSource\n : '@DATASOURCE '.concat(refList).concat('.pxResults');\n } else if (firstChildMeta?.type === 'AutoComplete') {\n firstChildMeta.config.datasource = refList;\n\n if (rawViewMetadata.config?.parameters) {\n firstChildMeta.config.parameters = parameters;\n }\n }\n\n // 3) Pass through configs\n if (firstChildMeta.config) {\n firstChildMeta.config.showPromotedFilters = showPromotedFilters;\n if (!canBeChangedInReviewMode) {\n firstChildMeta.config.displayMode = displayMode;\n }\n }\n\n // 4) Define field meta\n let fieldMetaData: any = null;\n if (isDDSourceDeferred && !firstChildMeta.config.deferDatasource) {\n fieldMetaData = {\n datasourceMetadata: refFieldMetadata\n };\n if (rawViewMetadata.config?.parameters) {\n fieldMetaData.datasourceMetadata.datasource.parameters = parameters;\n }\n fieldMetaData.datasourceMetadata.datasource.propertyForDisplayText = firstChildMeta?.config?.datasource?.fields?.text.startsWith('@P')\n ? firstChildMeta?.config?.datasource?.fields?.text?.substring(3)\n : firstChildMeta?.config?.datasource?.fields?.text;\n fieldMetaData.datasourceMetadata.datasource.propertyForValue = firstChildMeta?.config?.datasource?.fields?.value.startsWith('@P')\n ? firstChildMeta?.config?.datasource?.fields?.value?.substring(3)\n : firstChildMeta?.config?.datasource?.fields?.value;\n fieldMetaData.datasourceMetadata.datasource.name = rawViewMetadata.config?.referenceList;\n }\n // @ts-expect-error\n const { disableStartingFieldsForReference = false } = PCore.getEnvironmentInfo().environmentInfoObject?.features?.form || {};\n // @ts-expect-error\n let { isCreateNewReferenceEnabled = false } = PCore.getEnvironmentInfo().environmentInfoObject?.features?.form || {};\n\n if (isCreateNewReferenceEnabled) {\n isCreateNewReferenceEnabled = isCreationOfNewRecordAllowedForReference && PCore.getAccessPrivilege().hasCreateAccess(contextClass);\n }\n\n const startingFields: any = {};\n const createNewRecord = () => {\n if (referenceType === 'Case' || firstChildMeta?.config?.referenceType === 'Case') {\n if (!disableStartingFieldsForReference) {\n startingFields.pyAddCaseContextPage = { pyID: pConn.getCaseInfo().getKey()?.split(' ')?.pop() };\n }\n return pConn.getActionsApi().createWork(contextClass, {\n openCaseViewAfterCreate: false,\n startingFields\n });\n }\n if (referenceType === 'Data' || firstChildMeta?.config?.referenceType === 'Data') {\n return getPConnect().getActionsApi().showDataObjectCreateView(contextClass);\n }\n };\n\n const additionalInfo = refFieldMetadata?.additionalInformation\n ? {\n content: refFieldMetadata.additionalInformation\n }\n : undefined;\n\n const dataReferenceConfigToChild = {\n selectionMode,\n additionalInfo,\n descriptors: selectionMode === 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 displayAs,\n readOnly: false,\n ...(selectionMode === SELECTION_MODE.SINGLE && {\n referenceType\n }),\n ...(selectionMode === SELECTION_MODE.SINGLE &&\n displayAs === 'advancedSearch' && {\n value: rawViewMetadata.config.value,\n contextPage: rawViewMetadata.config.contextPage\n }),\n ...(selectionMode === SELECTION_MODE.MULTI &&\n displayAs === 'advancedSearch' && {\n selectionList,\n readonlyContextList: rawViewMetadata.config.readonlyContextList\n }),\n dataRelationshipContext: rawViewMetadata.config.contextClass && rawViewMetadata.config.name ? rawViewMetadata.config.name : null,\n hideLabel,\n onRecordChange: handleSelection,\n createNewRecord: isCreateNewReferenceEnabled ? createNewRecord : undefined,\n inline\n };\n\n const searchSelectCacheKey = componentCachePersistUtils.getComponentStateKey(getPConnect, rawViewMetadata.config.name);\n\n const dataReferenceAdvancedSearchContext = {\n dataReferenceConfigToChild,\n isCreateNewReferenceEnabled,\n disableStartingFieldsForReference,\n pyID,\n searchSelectCacheKey\n };\n\n if (displayAs === 'advancedSearch') {\n return (\n <DataReferenceAdvancedSearchContext.Provider value={dataReferenceAdvancedSearchContext}>\n <SearchForm getPConnect={getPConnect} searchSelectCacheKey={searchSelectCacheKey}>\n {children}\n </SearchForm>\n </DataReferenceAdvancedSearchContext.Provider>\n );\n }\n\n return firstChildPConnect().createComponent({\n type,\n config: {\n ...getFirstChildConfig({\n firstChildMeta,\n getPConnect,\n rawViewMetadata,\n contextClass,\n dataReferenceConfigToChild,\n isCreateNewReferenceEnabled,\n disableStartingFieldsForReference,\n pyID\n })\n }\n });\n }, [firstChildMeta.config?.datasource?.source, parameters, dropDownDataSource, propsToUse.required, propsToUse.disabled]);\n\n // Only include the views region for rendering when it has content\n if (firstChildMeta?.type !== 'Region') {\n const viewsRegion = rawViewMetadata.children[1];\n if (viewsRegion?.name === 'Views' && viewsRegion.children.length) {\n viewsRegion.children.map(child => {\n child.config.isEmbeddedInDataReference = true;\n return child;\n });\n childrenToRender = [recreatedFirstChild, ...(children as ReactElement[]).slice(1)];\n } else {\n childrenToRender = [recreatedFirstChild];\n }\n } else if (displayAs === 'advancedSearch') {\n childrenToRender = [recreatedFirstChild];\n }\n\n return childrenToRender.length === 1 ? (\n (childrenToRender[0] ?? null)\n ) : (\n <div>\n {childrenToRender.map((child, index) => (\n <React.Fragment key={index}>{child}</React.Fragment>\n ))}\n </div>\n );\n}\n"]}
@@ -0,0 +1,8 @@
1
+ declare const DataReferenceAdvancedSearchContext: import("react").Context<{
2
+ disableStartingFieldsForReference: boolean;
3
+ dataReferenceConfigToChild: {
4
+ selectionMode: string;
5
+ };
6
+ }>;
7
+ export default DataReferenceAdvancedSearchContext;
8
+ //# sourceMappingURL=DataReferenceAdvancedSearchContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataReferenceAdvancedSearchContext.d.ts","sourceRoot":"","sources":["../../../../src/components/template/DataReference/DataReferenceAdvancedSearchContext.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,kCAAkC;;;;;EAKtC,CAAC;AAEH,eAAe,kCAAkC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { createContext } from 'react';
2
+ const DataReferenceAdvancedSearchContext = createContext({
3
+ disableStartingFieldsForReference: true,
4
+ dataReferenceConfigToChild: {
5
+ selectionMode: 'single'
6
+ }
7
+ });
8
+ export default DataReferenceAdvancedSearchContext;
9
+ //# sourceMappingURL=DataReferenceAdvancedSearchContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataReferenceAdvancedSearchContext.js","sourceRoot":"","sources":["../../../../src/components/template/DataReference/DataReferenceAdvancedSearchContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,MAAM,kCAAkC,GAAG,aAAa,CAAC;IACvD,iCAAiC,EAAE,IAAI;IACvC,0BAA0B,EAAE;QAC1B,aAAa,EAAE,QAAQ;KACxB;CACF,CAAC,CAAC;AAEH,eAAe,kCAAkC,CAAC","sourcesContent":["import { createContext } from 'react';\n\nconst DataReferenceAdvancedSearchContext = createContext({\n disableStartingFieldsForReference: true,\n dataReferenceConfigToChild: {\n selectionMode: 'single'\n }\n});\n\nexport default DataReferenceAdvancedSearchContext;\n"]}
@@ -0,0 +1,3 @@
1
+ declare const SearchForm: (props: any) => import("react/jsx-runtime").JSX.Element;
2
+ export default SearchForm;
3
+ //# sourceMappingURL=SearchForm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchForm.d.ts","sourceRoot":"","sources":["../../../../src/components/template/DataReference/SearchForm.tsx"],"names":[],"mappings":"AA0CA,QAAA,MAAM,UAAU,GAAG,UAAK,4CAwGvB,CAAC;AAEF,eAAe,UAAU,CAAC"}