@pega/react-sdk-components 0.24.4 → 0.25.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (544) hide show
  1. package/lib/bridge/Context/StoreContext.d.ts +0 -1
  2. package/lib/bridge/Context/StoreContext.d.ts.map +1 -1
  3. package/lib/bridge/Context/StoreContext.js.map +1 -1
  4. package/lib/bridge/helpers/sdk_component_map.js.map +1 -1
  5. package/lib/bridge/react_pconnect.d.ts.map +1 -1
  6. package/lib/bridge/react_pconnect.js +2 -2
  7. package/lib/bridge/react_pconnect.js.map +1 -1
  8. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js +1 -1
  9. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.map +1 -1
  10. package/lib/components/designSystemExtension/Banner/Banner.js +1 -1
  11. package/lib/components/designSystemExtension/Banner/Banner.js.map +1 -1
  12. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -2
  13. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
  14. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +51 -33
  15. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
  16. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +4 -4
  17. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
  18. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts +1 -1
  19. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
  20. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +4 -4
  21. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
  22. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js +4 -4
  23. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
  24. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +6 -6
  25. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
  26. package/lib/components/designSystemExtension/Operator/Operator.d.ts +1 -1
  27. package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
  28. package/lib/components/designSystemExtension/Operator/Operator.js +14 -10
  29. package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
  30. package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +1 -1
  31. package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
  32. package/lib/components/designSystemExtension/Pulse/Pulse.js +2 -2
  33. package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
  34. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -1
  35. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +4 -3
  36. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -1
  37. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js +1 -1
  38. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
  39. package/lib/components/field/AutoComplete/AutoComplete.d.ts +1 -1
  40. package/lib/components/field/AutoComplete/AutoComplete.d.ts.map +1 -1
  41. package/lib/components/field/AutoComplete/AutoComplete.js +4 -4
  42. package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
  43. package/lib/components/field/CancelAlert/CancelAlert.d.ts +1 -1
  44. package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
  45. package/lib/components/field/CancelAlert/CancelAlert.js +4 -7
  46. package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
  47. package/lib/components/field/Checkbox/Checkbox.d.ts +1 -1
  48. package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
  49. package/lib/components/field/Checkbox/Checkbox.js +4 -4
  50. package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
  51. package/lib/components/field/Currency/Currency.d.ts +1 -1
  52. package/lib/components/field/Currency/Currency.d.ts.map +1 -1
  53. package/lib/components/field/Currency/Currency.js +10 -9
  54. package/lib/components/field/Currency/Currency.js.map +1 -1
  55. package/lib/components/field/Currency/currency-utils.d.ts.map +1 -1
  56. package/lib/components/field/Currency/currency-utils.js.map +1 -1
  57. package/lib/components/field/Date/Date.d.ts +1 -1
  58. package/lib/components/field/Date/Date.d.ts.map +1 -1
  59. package/lib/components/field/Date/Date.js +22 -13
  60. package/lib/components/field/Date/Date.js.map +1 -1
  61. package/lib/components/field/DateTime/DateTime.d.ts +1 -1
  62. package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
  63. package/lib/components/field/DateTime/DateTime.js +35 -9
  64. package/lib/components/field/DateTime/DateTime.js.map +1 -1
  65. package/lib/components/field/Decimal/Decimal.d.ts +1 -1
  66. package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
  67. package/lib/components/field/Decimal/Decimal.js +9 -8
  68. package/lib/components/field/Decimal/Decimal.js.map +1 -1
  69. package/lib/components/field/Dropdown/Dropdown.d.ts +1 -1
  70. package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
  71. package/lib/components/field/Dropdown/Dropdown.js +22 -15
  72. package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
  73. package/lib/components/field/Email/Email.d.ts +1 -1
  74. package/lib/components/field/Email/Email.d.ts.map +1 -1
  75. package/lib/components/field/Email/Email.js +26 -11
  76. package/lib/components/field/Email/Email.js.map +1 -1
  77. package/lib/components/field/Group/Group.d.ts +2 -2
  78. package/lib/components/field/Group/Group.d.ts.map +1 -1
  79. package/lib/components/field/Group/Group.js +2 -2
  80. package/lib/components/field/Group/Group.js.map +1 -1
  81. package/lib/components/field/Integer/Integer.d.ts +1 -1
  82. package/lib/components/field/Integer/Integer.d.ts.map +1 -1
  83. package/lib/components/field/Integer/Integer.js +20 -10
  84. package/lib/components/field/Integer/Integer.js.map +1 -1
  85. package/lib/components/field/Multiselect/Multiselect.d.ts.map +1 -1
  86. package/lib/components/field/Multiselect/Multiselect.js +12 -8
  87. package/lib/components/field/Multiselect/Multiselect.js.map +1 -1
  88. package/lib/components/field/Multiselect/utils.d.ts +2 -1
  89. package/lib/components/field/Multiselect/utils.d.ts.map +1 -1
  90. package/lib/components/field/Multiselect/utils.js +1 -1
  91. package/lib/components/field/Multiselect/utils.js.map +1 -1
  92. package/lib/components/field/Percentage/Percentage.d.ts +1 -1
  93. package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
  94. package/lib/components/field/Percentage/Percentage.js +9 -9
  95. package/lib/components/field/Percentage/Percentage.js.map +1 -1
  96. package/lib/components/field/Phone/Phone.d.ts +1 -1
  97. package/lib/components/field/Phone/Phone.d.ts.map +1 -1
  98. package/lib/components/field/Phone/Phone.js +8 -6
  99. package/lib/components/field/Phone/Phone.js.map +1 -1
  100. package/lib/components/field/RadioButtons/RadioButtons.d.ts +1 -1
  101. package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
  102. package/lib/components/field/RadioButtons/RadioButtons.js +6 -12
  103. package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
  104. package/lib/components/field/RichText/RichText.d.ts +1 -1
  105. package/lib/components/field/RichText/RichText.d.ts.map +1 -1
  106. package/lib/components/field/RichText/RichText.js +1 -1
  107. package/lib/components/field/RichText/RichText.js.map +1 -1
  108. package/lib/components/field/ScalarList/ScalarList.d.ts +1 -1
  109. package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -1
  110. package/lib/components/field/ScalarList/ScalarList.js +5 -5
  111. package/lib/components/field/ScalarList/ScalarList.js.map +1 -1
  112. package/lib/components/field/SemanticLink/SemanticLink.d.ts +1 -1
  113. package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
  114. package/lib/components/field/SemanticLink/SemanticLink.js +4 -4
  115. package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
  116. package/lib/components/field/SemanticLink/utils.js.map +1 -1
  117. package/lib/components/field/TextArea/TextArea.d.ts +1 -1
  118. package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
  119. package/lib/components/field/TextArea/TextArea.js +23 -8
  120. package/lib/components/field/TextArea/TextArea.js.map +1 -1
  121. package/lib/components/field/TextContent/TextContent.d.ts +1 -1
  122. package/lib/components/field/TextContent/TextContent.d.ts.map +1 -1
  123. package/lib/components/field/TextContent/TextContent.js +1 -1
  124. package/lib/components/field/TextContent/TextContent.js.map +1 -1
  125. package/lib/components/field/TextInput/TextInput.d.ts +1 -1
  126. package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
  127. package/lib/components/field/TextInput/TextInput.js +6 -7
  128. package/lib/components/field/TextInput/TextInput.js.map +1 -1
  129. package/lib/components/field/Time/Time.d.ts +1 -1
  130. package/lib/components/field/Time/Time.d.ts.map +1 -1
  131. package/lib/components/field/Time/Time.js +32 -12
  132. package/lib/components/field/Time/Time.js.map +1 -1
  133. package/lib/components/field/URL/URL.d.ts +1 -1
  134. package/lib/components/field/URL/URL.d.ts.map +1 -1
  135. package/lib/components/field/URL/URL.js +21 -7
  136. package/lib/components/field/URL/URL.js.map +1 -1
  137. package/lib/components/field/UserReference/UserReference.d.ts +1 -2
  138. package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
  139. package/lib/components/field/UserReference/UserReference.js +3 -5
  140. package/lib/components/field/UserReference/UserReference.js.map +1 -1
  141. package/lib/components/field/UserReference/UserReferenceUtils.d.ts.map +1 -1
  142. package/lib/components/field/UserReference/UserReferenceUtils.js.map +1 -1
  143. package/lib/components/helpers/attachmentHelpers.d.ts.map +1 -1
  144. package/lib/components/helpers/attachmentHelpers.js.map +1 -1
  145. package/lib/components/helpers/case-utils.js.map +1 -1
  146. package/lib/components/helpers/common-utils.d.ts +7 -0
  147. package/lib/components/helpers/common-utils.d.ts.map +1 -1
  148. package/lib/components/helpers/common-utils.js +21 -1
  149. package/lib/components/helpers/common-utils.js.map +1 -1
  150. package/lib/components/helpers/data_page.d.ts.map +1 -1
  151. package/lib/components/helpers/data_page.js.map +1 -1
  152. package/lib/components/helpers/date-format-utils.d.ts.map +1 -1
  153. package/lib/components/helpers/event-utils.d.ts.map +1 -1
  154. package/lib/components/helpers/event-utils.js.map +1 -1
  155. package/lib/components/helpers/field-group-utils.d.ts +1 -1
  156. package/lib/components/helpers/field-group-utils.d.ts.map +1 -1
  157. package/lib/components/helpers/field-group-utils.js +2 -2
  158. package/lib/components/helpers/field-group-utils.js.map +1 -1
  159. package/lib/components/helpers/formatters/Boolean.js.map +1 -1
  160. package/lib/components/helpers/formatters/Currency.d.ts.map +1 -1
  161. package/lib/components/helpers/formatters/Currency.js +12 -15
  162. package/lib/components/helpers/formatters/Currency.js.map +1 -1
  163. package/lib/components/helpers/formatters/Date.js.map +1 -1
  164. package/lib/components/helpers/formatters/common.d.ts +2 -2
  165. package/lib/components/helpers/formatters/common.d.ts.map +1 -1
  166. package/lib/components/helpers/formatters/common.js +2 -1
  167. package/lib/components/helpers/formatters/common.js.map +1 -1
  168. package/lib/components/helpers/formatters/index.d.ts.map +1 -1
  169. package/lib/components/helpers/formatters/index.js +2 -3
  170. package/lib/components/helpers/formatters/index.js.map +1 -1
  171. package/lib/components/helpers/instructions-utils.d.ts.map +1 -1
  172. package/lib/components/helpers/reactContextHelpers.d.ts +0 -1
  173. package/lib/components/helpers/reactContextHelpers.d.ts.map +1 -1
  174. package/lib/components/helpers/simpleTableHelpers.d.ts +1 -1
  175. package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
  176. package/lib/components/helpers/simpleTableHelpers.js +1 -1
  177. package/lib/components/helpers/simpleTableHelpers.js.map +1 -1
  178. package/lib/components/helpers/state-utils.d.ts.map +1 -1
  179. package/lib/components/helpers/state-utils.js.map +1 -1
  180. package/lib/components/helpers/template-utils.js.map +1 -1
  181. package/lib/components/helpers/utils.js.map +1 -1
  182. package/lib/components/infra/ActionButtons/ActionButtons.js +3 -3
  183. package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
  184. package/lib/components/infra/Assignment/Assignment.d.ts +2 -2
  185. package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
  186. package/lib/components/infra/Assignment/Assignment.js +12 -14
  187. package/lib/components/infra/Assignment/Assignment.js.map +1 -1
  188. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +2 -2
  189. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
  190. package/lib/components/infra/AssignmentCard/AssignmentCard.js.map +1 -1
  191. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +1 -2
  192. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
  193. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +12 -22
  194. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
  195. package/lib/components/infra/Containers/FlowContainer/helpers.d.ts.map +1 -1
  196. package/lib/components/infra/Containers/FlowContainer/helpers.js +1 -5
  197. package/lib/components/infra/Containers/FlowContainer/helpers.js.map +1 -1
  198. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts +1 -1
  199. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts.map +1 -1
  200. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js +9 -4
  201. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js.map +1 -1
  202. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +1 -1
  203. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
  204. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +7 -7
  205. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
  206. package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts +0 -1
  207. package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts.map +1 -1
  208. package/lib/components/infra/Containers/SimpleView/helper.d.ts +0 -1
  209. package/lib/components/infra/Containers/SimpleView/helper.d.ts.map +1 -1
  210. package/lib/components/infra/Containers/SimpleView/helper.js +1 -1
  211. package/lib/components/infra/Containers/SimpleView/helper.js.map +1 -1
  212. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +1 -1
  213. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
  214. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +1 -1
  215. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
  216. package/lib/components/infra/Containers/container-helpers.d.ts +2 -0
  217. package/lib/components/infra/Containers/container-helpers.d.ts.map +1 -0
  218. package/lib/components/infra/Containers/{helpers.js → container-helpers.js} +1 -1
  219. package/lib/components/infra/Containers/container-helpers.js.map +1 -0
  220. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +2 -2
  221. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
  222. package/lib/components/infra/DashboardFilter/DashboardFilter.js +4 -6
  223. package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
  224. package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -1
  225. package/lib/components/infra/DashboardFilter/filterUtils.js +3 -5
  226. package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
  227. package/lib/components/infra/DeferLoad/DeferLoad.d.ts +2 -1
  228. package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
  229. package/lib/components/infra/DeferLoad/DeferLoad.js +8 -9
  230. package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
  231. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +1 -1
  232. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
  233. package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
  234. package/lib/components/infra/MultiStep/MultiStep.d.ts +3 -3
  235. package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
  236. package/lib/components/infra/MultiStep/MultiStep.js +13 -12
  237. package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
  238. package/lib/components/infra/NavBar/NavBar.css +1 -0
  239. package/lib/components/infra/NavBar/NavBar.d.ts +1 -1
  240. package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
  241. package/lib/components/infra/NavBar/NavBar.js +24 -16
  242. package/lib/components/infra/NavBar/NavBar.js.map +1 -1
  243. package/lib/components/infra/Reference/Reference.d.ts +1 -1
  244. package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
  245. package/lib/components/infra/Reference/Reference.js.map +1 -1
  246. package/lib/components/infra/Region/Region.d.ts +1 -1
  247. package/lib/components/infra/Region/Region.d.ts.map +1 -1
  248. package/lib/components/infra/Region/Region.js.map +1 -1
  249. package/lib/components/infra/RootContainer/RootContainer.d.ts +2 -2
  250. package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
  251. package/lib/components/infra/RootContainer/RootContainer.js +5 -6
  252. package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
  253. package/lib/components/infra/Stages/Stages.d.ts +1 -1
  254. package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
  255. package/lib/components/infra/Stages/Stages.js +4 -4
  256. package/lib/components/infra/Stages/Stages.js.map +1 -1
  257. package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.d.ts.map +1 -1
  258. package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js +4 -3
  259. package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js.map +1 -1
  260. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +3 -3
  261. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
  262. package/lib/components/infra/View/View.d.ts +3 -2
  263. package/lib/components/infra/View/View.d.ts.map +1 -1
  264. package/lib/components/infra/View/View.js +32 -2
  265. package/lib/components/infra/View/View.js.map +1 -1
  266. package/lib/components/template/AdvancedSearch/AdvancedSearch.d.ts +2 -0
  267. package/lib/components/template/AdvancedSearch/AdvancedSearch.d.ts.map +1 -0
  268. package/lib/components/template/AdvancedSearch/AdvancedSearch.js +69 -0
  269. package/lib/components/template/AdvancedSearch/AdvancedSearch.js.map +1 -0
  270. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.d.ts +24 -0
  271. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.d.ts.map +1 -0
  272. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.js +32 -0
  273. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.js.map +1 -0
  274. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.d.ts +3 -0
  275. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.d.ts.map +1 -0
  276. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.js +181 -0
  277. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.js.map +1 -0
  278. package/lib/components/template/AdvancedSearch/SearchGroups/hooks.d.ts +10 -0
  279. package/lib/components/template/AdvancedSearch/SearchGroups/hooks.d.ts.map +1 -0
  280. package/lib/components/template/AdvancedSearch/SearchGroups/hooks.js +26 -0
  281. package/lib/components/template/AdvancedSearch/SearchGroups/hooks.js.map +1 -0
  282. package/lib/components/template/AdvancedSearch/SearchGroups/index.d.ts +2 -0
  283. package/lib/components/template/AdvancedSearch/SearchGroups/index.d.ts.map +1 -0
  284. package/lib/components/template/AdvancedSearch/SearchGroups/index.js +2 -0
  285. package/lib/components/template/AdvancedSearch/SearchGroups/index.js.map +1 -0
  286. package/lib/components/template/AdvancedSearch/SearchGroups/utils.d.ts +16 -0
  287. package/lib/components/template/AdvancedSearch/SearchGroups/utils.d.ts.map +1 -0
  288. package/lib/components/template/AdvancedSearch/SearchGroups/utils.js +22 -0
  289. package/lib/components/template/AdvancedSearch/SearchGroups/utils.js.map +1 -0
  290. package/lib/components/template/AdvancedSearch/TemplateContext.d.ts +10 -0
  291. package/lib/components/template/AdvancedSearch/TemplateContext.d.ts.map +1 -0
  292. package/lib/components/template/AdvancedSearch/TemplateContext.js +11 -0
  293. package/lib/components/template/AdvancedSearch/TemplateContext.js.map +1 -0
  294. package/lib/components/template/AdvancedSearch/index.d.ts +2 -0
  295. package/lib/components/template/AdvancedSearch/index.d.ts.map +1 -0
  296. package/lib/components/template/AdvancedSearch/index.js +2 -0
  297. package/lib/components/template/AdvancedSearch/index.js.map +1 -0
  298. package/lib/components/template/AppShell/AppShell.d.ts +4 -2
  299. package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
  300. package/lib/components/template/AppShell/AppShell.js +33 -10
  301. package/lib/components/template/AppShell/AppShell.js.map +1 -1
  302. package/lib/components/template/BannerPage/BannerPage.d.ts +2 -2
  303. package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
  304. package/lib/components/template/BannerPage/BannerPage.js.map +1 -1
  305. package/lib/components/template/CaseSummary/CaseSummary.d.ts +2 -2
  306. package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
  307. package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
  308. package/lib/components/template/CaseView/CaseView.d.ts +3 -2
  309. package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
  310. package/lib/components/template/CaseView/CaseView.js +7 -7
  311. package/lib/components/template/CaseView/CaseView.js.map +1 -1
  312. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +1 -1
  313. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
  314. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +7 -7
  315. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
  316. package/lib/components/template/Confirmation/Confirmation.d.ts +2 -2
  317. package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
  318. package/lib/components/template/Confirmation/Confirmation.js +3 -2
  319. package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
  320. package/lib/components/template/DataReference/DataReference.d.ts +9 -2
  321. package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
  322. package/lib/components/template/DataReference/DataReference.js +245 -81
  323. package/lib/components/template/DataReference/DataReference.js.map +1 -1
  324. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.d.ts +8 -0
  325. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.d.ts.map +1 -0
  326. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.js +9 -0
  327. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.js.map +1 -0
  328. package/lib/components/template/DataReference/SearchForm.d.ts +3 -0
  329. package/lib/components/template/DataReference/SearchForm.d.ts.map +1 -0
  330. package/lib/components/template/DataReference/SearchForm.js +86 -0
  331. package/lib/components/template/DataReference/SearchForm.js.map +1 -0
  332. package/lib/components/template/DataReference/utils.d.ts +15 -0
  333. package/lib/components/template/DataReference/utils.d.ts.map +1 -0
  334. package/lib/components/template/DataReference/utils.js +75 -0
  335. package/lib/components/template/DataReference/utils.js.map +1 -0
  336. package/lib/components/template/DefaultForm/DefaultForm.d.ts +2 -2
  337. package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
  338. package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
  339. package/lib/components/template/DefaultForm/utils/index.d.ts.map +1 -1
  340. package/lib/components/template/DefaultForm/utils/index.js +1 -2
  341. package/lib/components/template/DefaultForm/utils/index.js.map +1 -1
  342. package/lib/components/template/Details/Details/Details.d.ts +1 -1
  343. package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
  344. package/lib/components/template/Details/Details/Details.js +2 -2
  345. package/lib/components/template/Details/Details/Details.js.map +1 -1
  346. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +2 -2
  347. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
  348. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js +3 -3
  349. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
  350. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +1 -1
  351. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
  352. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +2 -2
  353. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
  354. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +1 -1
  355. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
  356. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +2 -2
  357. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
  358. package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts +1 -1
  359. package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts.map +1 -1
  360. package/lib/components/template/Details/DynamicTabs/DynamicTabs.js +4 -4
  361. package/lib/components/template/Details/DynamicTabs/DynamicTabs.js.map +1 -1
  362. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +1 -1
  363. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
  364. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +9 -5
  365. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
  366. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +2 -2
  367. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
  368. package/lib/components/template/InlineDashboard/InlineDashboard.js +2 -2
  369. package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
  370. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +2 -2
  371. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
  372. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js.map +1 -1
  373. package/lib/components/template/ListPage/ListPage.d.ts +1 -1
  374. package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
  375. package/lib/components/template/ListPage/ListPage.js.map +1 -1
  376. package/lib/components/template/ListView/DefaultViewMeta.js.map +1 -1
  377. package/lib/components/template/ListView/ListView.d.ts +4 -1
  378. package/lib/components/template/ListView/ListView.d.ts.map +1 -1
  379. package/lib/components/template/ListView/ListView.js +151 -66
  380. package/lib/components/template/ListView/ListView.js.map +1 -1
  381. package/lib/components/template/ListView/hooks.js.map +1 -1
  382. package/lib/components/template/ListView/utils.d.ts.map +1 -1
  383. package/lib/components/template/ListView/utils.js +29 -6
  384. package/lib/components/template/ListView/utils.js.map +1 -1
  385. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +1 -1
  386. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
  387. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -1
  388. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +2 -2
  389. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -1
  390. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js.map +1 -1
  391. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +1 -1
  392. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
  393. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +2 -2
  394. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
  395. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +2 -2
  396. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -1
  397. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js.map +1 -1
  398. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +2 -2
  399. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
  400. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -1
  401. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +2 -2
  402. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
  403. package/lib/components/template/OneColumn/OneColumn/OneColumn.js +2 -2
  404. package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
  405. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +1 -1
  406. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
  407. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -1
  408. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +2 -2
  409. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
  410. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js.map +1 -1
  411. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +1 -1
  412. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
  413. package/lib/components/template/PromotedFilters/PromotedFilters.js +1 -2
  414. package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
  415. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts +1 -1
  416. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
  417. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js +0 -2
  418. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
  419. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +4 -2
  420. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
  421. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +68 -45
  422. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
  423. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +1 -1
  424. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
  425. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js +2 -4
  426. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
  427. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +1 -1
  428. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
  429. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
  430. package/lib/components/template/SubTabs/SubTabs.d.ts +2 -2
  431. package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
  432. package/lib/components/template/SubTabs/SubTabs.js +2 -2
  433. package/lib/components/template/SubTabs/SubTabs.js.map +1 -1
  434. package/lib/components/template/SubTabs/tabUtils.d.ts +10 -0
  435. package/lib/components/template/SubTabs/tabUtils.d.ts.map +1 -1
  436. package/lib/components/template/SubTabs/tabUtils.js +102 -1
  437. package/lib/components/template/SubTabs/tabUtils.js.map +1 -1
  438. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts +2 -2
  439. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
  440. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +3 -3
  441. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
  442. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +1 -1
  443. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
  444. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -1
  445. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +2 -2
  446. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
  447. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +3 -3
  448. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
  449. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +2 -2
  450. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
  451. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js.map +1 -1
  452. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +1 -1
  453. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
  454. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +2 -2
  455. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
  456. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +2 -2
  457. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -1
  458. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js.map +1 -1
  459. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +2 -2
  460. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
  461. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js.map +1 -1
  462. package/lib/components/template/WssNavBar/WssNavBar.d.ts +1 -1
  463. package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -1
  464. package/lib/components/template/WssNavBar/WssNavBar.js +10 -10
  465. package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
  466. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts +1 -1
  467. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
  468. package/lib/components/widget/AppAnnouncement/AppAnnouncement.js +2 -2
  469. package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
  470. package/lib/components/widget/Attachment/Attachment.css +1 -0
  471. package/lib/components/widget/Attachment/Attachment.d.ts +1 -1
  472. package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
  473. package/lib/components/widget/Attachment/Attachment.js +7 -10
  474. package/lib/components/widget/Attachment/Attachment.js.map +1 -1
  475. package/lib/components/widget/CaseHistory/CaseHistory.d.ts +1 -1
  476. package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
  477. package/lib/components/widget/CaseHistory/CaseHistory.js +10 -9
  478. package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
  479. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +1 -1
  480. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts.map +1 -1
  481. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js +1 -1
  482. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
  483. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +1 -1
  484. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
  485. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +10 -10
  486. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
  487. package/lib/components/widget/Followers/Followers.d.ts +2 -2
  488. package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
  489. package/lib/components/widget/Followers/Followers.js +2 -2
  490. package/lib/components/widget/Followers/Followers.js.map +1 -1
  491. package/lib/components/widget/QuickCreate/QuickCreate.d.ts +1 -1
  492. package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
  493. package/lib/components/widget/QuickCreate/QuickCreate.js +0 -1
  494. package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
  495. package/lib/components/widget/SummaryItem/SummaryItem.d.ts +1 -1
  496. package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
  497. package/lib/components/widget/SummaryItem/SummaryItem.js +3 -3
  498. package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
  499. package/lib/components/widget/SummaryList/SummaryList.d.ts +1 -1
  500. package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
  501. package/lib/components/widget/SummaryList/SummaryList.js.map +1 -1
  502. package/lib/components/widget/ToDo/ToDo.d.ts +1 -1
  503. package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
  504. package/lib/components/widget/ToDo/ToDo.js +60 -17
  505. package/lib/components/widget/ToDo/ToDo.js.map +1 -1
  506. package/lib/doc/KeyReleaseUpdates.md +19 -7
  507. package/lib/hooks/index.d.ts +2 -0
  508. package/lib/hooks/index.d.ts.map +1 -1
  509. package/lib/hooks/index.js +2 -0
  510. package/lib/hooks/index.js.map +1 -1
  511. package/lib/hooks/useAfterInitialEffect.d.ts +1 -1
  512. package/lib/hooks/useAfterInitialEffect.d.ts.map +1 -1
  513. package/lib/hooks/useAfterInitialEffect.js.map +1 -1
  514. package/lib/hooks/useConsolidatedRef.d.ts +1 -1
  515. package/lib/hooks/useConsolidatedRef.d.ts.map +1 -1
  516. package/lib/hooks/useConsolidatedRef.js.map +1 -1
  517. package/lib/hooks/useFocusFirstField.d.ts +7 -0
  518. package/lib/hooks/useFocusFirstField.d.ts.map +1 -0
  519. package/lib/hooks/useFocusFirstField.js +20 -0
  520. package/lib/hooks/useFocusFirstField.js.map +1 -0
  521. package/lib/hooks/useGetTabsCount.d.ts +10 -0
  522. package/lib/hooks/useGetTabsCount.d.ts.map +1 -0
  523. package/lib/hooks/useGetTabsCount.js +166 -0
  524. package/lib/hooks/useGetTabsCount.js.map +1 -0
  525. package/lib/hooks/useIsMount.d.ts +2 -0
  526. package/lib/hooks/useIsMount.d.ts.map +1 -0
  527. package/lib/hooks/useIsMount.js +9 -0
  528. package/lib/hooks/useIsMount.js.map +1 -0
  529. package/lib/hooks/useScrolltoTop.d.ts +7 -0
  530. package/lib/hooks/useScrolltoTop.d.ts.map +1 -0
  531. package/lib/hooks/useScrolltoTop.js +13 -0
  532. package/lib/hooks/useScrolltoTop.js.map +1 -0
  533. package/lib/sdk-pega-component-map.d.ts +109 -103
  534. package/lib/sdk-pega-component-map.d.ts.map +1 -1
  535. package/lib/sdk-pega-component-map.js +9 -3
  536. package/lib/sdk-pega-component-map.js.map +1 -1
  537. package/lib/theme.d.ts +11 -0
  538. package/lib/theme.d.ts.map +1 -0
  539. package/lib/theme.js +31 -0
  540. package/lib/theme.js.map +1 -0
  541. package/package.json +31 -1
  542. package/lib/components/infra/Containers/helpers.d.ts +0 -2
  543. package/lib/components/infra/Containers/helpers.d.ts.map +0 -1
  544. package/lib/components/infra/Containers/helpers.js.map +0 -1
@@ -1,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
  import './View.css';
4
4
  interface ViewProps extends PConnProps {
5
5
  template?: string;
@@ -10,6 +10,7 @@ interface ViewProps extends PConnProps {
10
10
  visibility?: boolean;
11
11
  name?: string;
12
12
  bInForm?: boolean;
13
+ type?: any;
13
14
  }
14
15
  declare function View(props: PropsWithChildren<ViewProps>): import("react/jsx-runtime").JSX.Element | "" | null;
15
16
  declare namespace View {
@@ -1 +1 @@
1
- {"version":3,"file":"View.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/View/View.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAI1C,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAIvD,OAAO,YAAY,CAAC;AAEpB,UAAU,SAAU,SAAQ,UAAU;IAEpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAqBD,iBAAwB,IAAI,CAAC,KAAK,EAAE,iBAAiB,CAAC,SAAS,CAAC,uDAsF/D;kBAtFuB,IAAI;;;eAAJ,IAAI"}
1
+ {"version":3,"file":"View.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/View/View.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAa,MAAM,OAAO,CAAC;AAI1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAI5D,OAAO,YAAY,CAAC;AAEpB,UAAU,SAAU,SAAQ,UAAU;IAEpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,GAAG,CAAC;CACZ;AAsBD,iBAAwB,IAAI,CAAC,KAAK,EAAE,iBAAiB,CAAC,SAAS,CAAC,uDAsH/D;kBAtHuB,IAAI;;;eAAJ,IAAI"}
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useEffect } from 'react';
2
3
  import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
3
4
  import { getAllFields } from '../../helpers/template-utils';
4
5
  // Need to import any templates that we might render
@@ -18,20 +19,49 @@ const NO_HEADER_TEMPLATES = [
18
19
  'NarrowWideDetails',
19
20
  'WideNarrowDetails',
20
21
  'Confirmation',
21
- 'DynamicTabs'
22
+ 'DynamicTabs',
23
+ 'DetailsSubTabs'
22
24
  ];
23
25
  export default function View(props) {
24
- const { children, template, getPConnect, mode, visibility, name: pageName } = props;
26
+ const { children, template, getPConnect, mode, visibility, name: pageName, type, title } = props;
25
27
  let { label = '', showLabel = false } = props;
28
+ const { PAGE_TYPES: { PAGE, LANDINGPAGE, LISTPAGE } = {}, MODAL } = PCore.getConstants();
26
29
  // Get the inherited props from the parent to determine label settings. For 8.6, this is only for embedded data form views
27
30
  // Putting this logic here instead of copy/paste in every Form template index.js
28
31
  const inheritedProps = getPConnect().getInheritedProps(); // try to remove any when getInheritedProps typedefs are fixed
29
32
  label = inheritedProps.label || label;
30
33
  showLabel = inheritedProps.showLabel || showLabel;
34
+ const localeUtils = PCore.getLocaleUtils();
31
35
  const isEmbeddedDataView = mode === 'editable'; // would be better to check the reference child for `context` attribute if possible
32
36
  if (isEmbeddedDataView && showLabel === undefined) {
33
37
  showLabel = true;
34
38
  }
39
+ useEffect(() => {
40
+ // Get the localized application label
41
+ let applicationLabel = PCore.getEnvironmentInfo().getApplicationLabel();
42
+ applicationLabel = localeUtils.getLocaleValue(`${applicationLabel}`, '', '');
43
+ const caseInfo = getPConnect().getCaseInfo();
44
+ const isAssignmentInCreateStage = caseInfo && caseInfo.isAssignmentInCreateStage();
45
+ const isRenderingInModal = getPConnect().getContainerName().includes(MODAL);
46
+ const isRenderingInPreviewPanel = getPConnect().getContainerName().includes('preview');
47
+ /* If assignment is in create stage and rendering in modal don't update the title.
48
+ Title will be updated on completion of create stage and when the assignment is rendered inline to the page.
49
+ */
50
+ const canUpdateTitle = !isRenderingInPreviewPanel &&
51
+ (type === PAGE || type === LANDINGPAGE || type === LISTPAGE) &&
52
+ !(isRenderingInModal && isAssignmentInCreateStage) &&
53
+ PCore.getEnvironmentInfo().getRenderingMode() === 'FULL_PORTAL';
54
+ // Incase of home route title is same as applicationLabel so setting to empty to just show applicationLabel
55
+ let titleVar = title === applicationLabel ? '' : title;
56
+ if (canUpdateTitle) {
57
+ if (caseInfo) {
58
+ const name = caseInfo.getName();
59
+ const id = caseInfo.getBusinessID();
60
+ titleVar = name && id ? `${name} (${id})` : titleVar;
61
+ }
62
+ document.title = titleVar ? `${titleVar} - ${applicationLabel}` : applicationLabel;
63
+ }
64
+ }, [type, title, getPConnect, PAGE, LANDINGPAGE, LISTPAGE]);
35
65
  const key = `${getPConnect().getContextName()}_${getPConnect().getPageReference()}_${pageName}`;
36
66
  // As long as the template is defined in the dependencies of the view
37
67
  // it will be loaded, otherwise fall back to single column
@@ -1 +1 @@
1
- {"version":3,"file":"View.js","sourceRoot":"","sources":["../../../../src/components/infra/View/View.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAG5D,oDAAoD;AAEpD,OAAO,YAAY,CAAC;AAcpB,EAAE;AACF,qHAAqH;AACrH,uHAAuH;AACvH,+BAA+B;AAC/B,EAAE;AAEF,MAAM,aAAa,GAAG,CAAC,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC;AAC5F,MAAM,mBAAmB,GAAG;IAC1B,SAAS;IACT,aAAa;IACb,SAAS;IACT,kBAAkB;IAClB,oBAAoB;IACpB,mBAAmB;IACnB,mBAAmB;IACnB,cAAc;IACd,aAAa;CACd,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAmC;IAC9D,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACpF,IAAI,EAAE,KAAK,GAAG,EAAE,EAAE,SAAS,GAAG,KAAK,EAAE,GAAG,KAAK,CAAC;IAE9C,0HAA0H;IAC1H,gFAAgF;IAEhF,MAAM,cAAc,GAAQ,WAAW,EAAE,CAAC,iBAAiB,EAAE,CAAC,CAAC,8DAA8D;IAC7H,KAAK,G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../../bridge/helpers/sdk_component_map';\nimport { getAllFields } from '../../helpers/template-utils';\nimport { PConnProps } from '../../../types/PConnProps';\n\n// Need to import any templates that we might render\n\nimport './View.css';\n\ninterface ViewProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n template?: string;\n label?: string;\n showLabel: boolean;\n mode?: string;\n title?: string;\n visibility?: boolean;\n name?: string;\n bInForm?: boolean;\n}\n\n//\n// WARNING: It is not expected that this file should be modified. It is part of infrastructure code that works with\n// Redux and creation/update of Redux containers and PConnect. Modifying this code could have undesireable results and\n// is totally at your own risk.\n//\n\nconst FORMTEMPLATES = ['OneColumn', 'TwoColumn', 'DefaultForm', 'WideNarrow', 'NarrowWide'];\nconst NO_HEADER_TEMPLATES = [\n 'SubTabs',\n 'SimpleTable',\n 'Details',\n 'DetailsTwoColumn',\n 'DetailsThreeColumn',\n 'NarrowWideDetails',\n 'WideNarrowDetails',\n 'Confirmation',\n 'DynamicTabs'\n];\n\nexport default function View(props: PropsWithChildren<ViewProps>) {\n const { children, template, getPConnect, mode, visibility, name: pageName } = props;\n let { label = '', showLabel = false } = props;\n\n // Get the inherited props from the parent to determine label settings. For 8.6, this is only for embedded data form views\n // Putting this logic here instead of copy/paste in every Form template index.js\n\n const inheritedProps: any = getPConnect().getInheritedProps(); // try to remove any when getInheritedProps typedefs are fixed\n label = inheritedProps.label || label;\n showLabel = inheritedProps.showLabel || showLabel;\n\n const isEmbeddedDataView = mode === 'editable'; // would be better to check the reference child for `context` attribute if possible\n if (isEmbeddedDataView && showLabel === undefined) {\n showLabel = true;\n }\n\n const key = `${getPConnect().getContextName()}_${getPConnect().getPageReference()}_${pageName}`;\n // As long as the template is defined in the dependencies of the view\n // it will be loaded, otherwise fall back to single column\n if (visibility === false) {\n return '';\n }\n\n // As long as the template is defined in the dependencies of the view\n // it will be loaded, otherwise fall back to single column\n // JA - React SDK not using LazyComponentMap yet\n if (template /* && LazyComponentMap[template] */) {\n // const ViewTemplate = LazyComponentMap[template];\n const ViewTemplate: any = getComponentFromMap(template);\n\n if (template === 'ListView') {\n // special case for ListView - add in a prop\n const bInForm = true;\n props = { ...props, bInForm };\n }\n\n // for debugging/investigation\n // console.log(`View rendering template: ${template}`);\n\n // spreading because all props should go to the template\n let RenderedTemplate = (\n <ViewTemplate key={key} {...props}>\n {children}\n </ViewTemplate>\n );\n\n if (FORMTEMPLATES.includes(template) && showLabel) {\n // Original:\n // RenderedTemplate = (\n // <FieldGroup name={label} style={{ marginBlockStart: \"1rem\" }}>\n // {RenderedTemplate}\n // </FieldGroup>\n // );\n RenderedTemplate = (\n <div\n data-name='RenderedTemplate'\n data-template-type={template}\n /* name */ id='label'\n style={{ marginBlockStart: '1rem' }}\n className='grid-column'\n >\n {RenderedTemplate}\n </div>\n );\n }\n\n return (\n <div className='grid-column'>\n {showLabel && !NO_HEADER_TEMPLATES.includes(template) && (\n <div className='template-title-container'>\n <span>{label}</span>\n </div>\n )}\n {RenderedTemplate}\n </div>\n );\n }\n\n // debugging/investigation help\n // console.log(`View about to render React.Fragment for children: ${children}`);\n\n if (children) {\n return <>{children}</>;\n }\n\n return null;\n}\n\n// Adapted from Constellation DX Component to add in additional props for some templates\nView.additionalProps = (state, getPConnect) => {\n const thePConn = getPConnect();\n const { template } = thePConn.getConfigProps();\n\n let propObj = {};\n let allFields = {};\n\n switch (template) {\n case 'CaseSummary':\n allFields = getAllFields(thePConn);\n // eslint-disable-next-line no-case-declarations\n const unresFields = {\n primaryFields: allFields[0],\n secondaryFields: allFields[1]\n };\n propObj = thePConn.resolveConfigProps(unresFields);\n break;\n\n case 'Details':\n allFields = getAllFields(thePConn);\n propObj = { fields: allFields[0] };\n break;\n\n default:\n break;\n }\n\n return propObj;\n};\n"]}
1
+ {"version":3,"file":"View.js","sourceRoot":"","sources":["../../../../src/components/infra/View/View.tsx"],"names":[],"mappings":";AAAA,OAAO,EAA0B,SAAS,EAAE,MAAM,OAAO,CAAC;AAE1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,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nC,MAAM;QAER;YACE,MAAM;IACV,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC","sourcesContent":["import { type PropsWithChildren, useEffect } from 'react';\n\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { getAllFields } from '../../helpers/template-utils';\nimport type { PConnProps } from '../../../types/PConnProps';\n\n// Need to import any templates that we might render\n\nimport './View.css';\n\ninterface ViewProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n template?: string;\n label?: string;\n showLabel: boolean;\n mode?: string;\n title?: string;\n visibility?: boolean;\n name?: string;\n bInForm?: boolean;\n type?: any;\n}\n\n//\n// WARNING: It is not expected that this file should be modified. It is part of infrastructure code that works with\n// Redux and creation/update of Redux containers and PConnect. Modifying this code could have undesireable results and\n// is totally at your own risk.\n//\n\nconst FORMTEMPLATES = ['OneColumn', 'TwoColumn', 'DefaultForm', 'WideNarrow', 'NarrowWide'];\nconst NO_HEADER_TEMPLATES = [\n 'SubTabs',\n 'SimpleTable',\n 'Details',\n 'DetailsTwoColumn',\n 'DetailsThreeColumn',\n 'NarrowWideDetails',\n 'WideNarrowDetails',\n 'Confirmation',\n 'DynamicTabs',\n 'DetailsSubTabs'\n];\n\nexport default function View(props: PropsWithChildren<ViewProps>) {\n const { children, template, getPConnect, mode, visibility, name: pageName, type, title } = props;\n let { label = '', showLabel = false } = props;\n const { PAGE_TYPES: { PAGE, LANDINGPAGE, LISTPAGE } = {}, MODAL } = PCore.getConstants();\n\n // Get the inherited props from the parent to determine label settings. For 8.6, this is only for embedded data form views\n // Putting this logic here instead of copy/paste in every Form template index.js\n\n const inheritedProps: any = getPConnect().getInheritedProps(); // try to remove any when getInheritedProps typedefs are fixed\n label = inheritedProps.label || label;\n showLabel = inheritedProps.showLabel || showLabel;\n const localeUtils = PCore.getLocaleUtils();\n\n const isEmbeddedDataView = mode === 'editable'; // would be better to check the reference child for `context` attribute if possible\n if (isEmbeddedDataView && showLabel === undefined) {\n showLabel = true;\n }\n\n useEffect(() => {\n // Get the localized application label\n let applicationLabel = PCore.getEnvironmentInfo().getApplicationLabel();\n applicationLabel = localeUtils.getLocaleValue(`${applicationLabel}`, '', '');\n const caseInfo = getPConnect().getCaseInfo();\n const isAssignmentInCreateStage = caseInfo && caseInfo.isAssignmentInCreateStage();\n const isRenderingInModal = getPConnect().getContainerName().includes(MODAL);\n const isRenderingInPreviewPanel = getPConnect().getContainerName().includes('preview');\n\n /* If assignment is in create stage and rendering in modal don't update the title.\n Title will be updated on completion of create stage and when the assignment is rendered inline to the page.\n */\n const canUpdateTitle =\n !isRenderingInPreviewPanel &&\n (type === PAGE || type === LANDINGPAGE || type === LISTPAGE) &&\n !(isRenderingInModal && isAssignmentInCreateStage) &&\n PCore.getEnvironmentInfo().getRenderingMode() === 'FULL_PORTAL';\n // Incase of home route title is same as applicationLabel so setting to empty to just show applicationLabel\n let titleVar = title === applicationLabel ? '' : title;\n\n if (canUpdateTitle) {\n if (caseInfo) {\n const name = caseInfo.getName();\n const id = caseInfo.getBusinessID();\n titleVar = name && id ? `${name} (${id})` : titleVar;\n }\n document.title = titleVar ? `${titleVar} - ${applicationLabel}` : applicationLabel;\n }\n }, [type, title, getPConnect, PAGE, LANDINGPAGE, LISTPAGE]);\n\n const key = `${getPConnect().getContextName()}_${getPConnect().getPageReference()}_${pageName}`;\n // As long as the template is defined in the dependencies of the view\n // it will be loaded, otherwise fall back to single column\n if (visibility === false) {\n return '';\n }\n\n // As long as the template is defined in the dependencies of the view\n // it will be loaded, otherwise fall back to single column\n // JA - React SDK not using LazyComponentMap yet\n if (template /* && LazyComponentMap[template] */) {\n // const ViewTemplate = LazyComponentMap[template];\n const ViewTemplate: any = getComponentFromMap(template);\n\n if (template === 'ListView') {\n // special case for ListView - add in a prop\n const bInForm = true;\n props = { ...props, bInForm };\n }\n\n // for debugging/investigation\n // console.log(`View rendering template: ${template}`);\n\n // spreading because all props should go to the template\n let RenderedTemplate = (\n <ViewTemplate key={key} {...props}>\n {children}\n </ViewTemplate>\n );\n\n if (FORMTEMPLATES.includes(template) && showLabel) {\n // Original:\n // RenderedTemplate = (\n // <FieldGroup name={label} style={{ marginBlockStart: \"1rem\" }}>\n // {RenderedTemplate}\n // </FieldGroup>\n // );\n RenderedTemplate = (\n <div\n data-name='RenderedTemplate'\n data-template-type={template}\n /* name */ id='label'\n style={{ marginBlockStart: '1rem' }}\n className='grid-column'\n >\n {RenderedTemplate}\n </div>\n );\n }\n\n return (\n <div className='grid-column'>\n {showLabel && !NO_HEADER_TEMPLATES.includes(template) && (\n <div className='template-title-container'>\n <span>{label}</span>\n </div>\n )}\n {RenderedTemplate}\n </div>\n );\n }\n\n // debugging/investigation help\n // console.log(`View about to render React.Fragment for children: ${children}`);\n\n if (children) {\n return <>{children}</>;\n }\n\n return null;\n}\n\n// Adapted from Constellation DX Component to add in additional props for some templates\nView.additionalProps = (state, getPConnect) => {\n const thePConn = getPConnect();\n const { template } = thePConn.getConfigProps();\n\n let propObj = {};\n let allFields = {};\n\n switch (template) {\n case 'CaseSummary':\n allFields = getAllFields(thePConn);\n // eslint-disable-next-line no-case-declarations\n const unresFields = {\n primaryFields: allFields[0],\n secondaryFields: allFields[1]\n };\n propObj = thePConn.resolveConfigProps(unresFields);\n break;\n\n case 'Details':\n allFields = getAllFields(thePConn);\n propObj = { fields: allFields[0] };\n break;\n\n default:\n break;\n }\n\n return propObj;\n};\n"]}
@@ -0,0 +1,2 @@
1
+ export default function AdvancedSearch(props: any): import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=AdvancedSearch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AdvancedSearch.d.ts","sourceRoot":"","sources":["../../../../src/components/template/AdvancedSearch/AdvancedSearch.tsx"],"names":[],"mappings":"AAMA,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,KAAA,2CAgF3C"}
@@ -0,0 +1,69 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useContext, useState } from 'react';
3
+ import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
4
+ import DataReferenceAdvancedSearchContext from '../DataReference/DataReferenceAdvancedSearchContext';
5
+ import { getFirstChildConfig } from '../DataReference/utils';
6
+ export default function AdvancedSearch(props) {
7
+ const { getPConnect, targetObjectClass, localeReference } = props;
8
+ const SearchGroups = getComponentFromMap('SearchGroups');
9
+ const { dataReferenceConfigToChild, isCreateNewReferenceEnabled, disableStartingFieldsForReference, pyID, searchSelectCacheKey } = useContext(DataReferenceAdvancedSearchContext);
10
+ const { selectionMode, value: singleSelectFieldValue, readonlyContextList: multiSelectField } = dataReferenceConfigToChild;
11
+ let isSelectionExist = false;
12
+ const { MULTI } = PCore.getConstants().LIST_SELECTION_MODE;
13
+ if (selectionMode === MULTI) {
14
+ isSelectionExist = getPConnect().getValue(multiSelectField)?.length || false;
15
+ }
16
+ else {
17
+ isSelectionExist = getPConnect().getValue(singleSelectFieldValue) || false;
18
+ }
19
+ const [showRecords, setShowRecords] = useState(isSelectionExist);
20
+ const pConn = getPConnect();
21
+ const rawViewMetadata = pConn.getRawMetadata();
22
+ const searchFieldsSet = new Set();
23
+ const searchFields = [];
24
+ rawViewMetadata.config.searchGroups.forEach(group => {
25
+ group.children.forEach(child => {
26
+ if (!searchFieldsSet.has(child.config.value) && !child.config.validator) {
27
+ searchFields.push(child);
28
+ searchFieldsSet.add(child.config.value);
29
+ }
30
+ });
31
+ });
32
+ const firstChildPConnect = getPConnect().getChildren()[0].getPConnect;
33
+ const [firstChildMeta] = rawViewMetadata.children;
34
+ const localizedVal = PCore.getLocaleUtils().getLocaleValue;
35
+ // @ts-ignore
36
+ const cache = PCore.getNavigationUtils().getComponentCache(searchSelectCacheKey) ?? {};
37
+ const editableFieldComp = firstChildPConnect().createComponent({
38
+ type: firstChildMeta.type,
39
+ config: {
40
+ ...getFirstChildConfig({
41
+ firstChildMeta,
42
+ getPConnect,
43
+ rawViewMetadata,
44
+ contextClass: targetObjectClass,
45
+ dataReferenceConfigToChild,
46
+ isCreateNewReferenceEnabled,
47
+ disableStartingFieldsForReference,
48
+ pyID
49
+ }),
50
+ searchFields,
51
+ showRecords,
52
+ label: localizedVal('Search results', 'DataReference'),
53
+ searchSelectCacheKey,
54
+ cache
55
+ }
56
+ });
57
+ const { selectionList, dataRelationshipContext } = editableFieldComp.props.getPConnect().getConfigProps();
58
+ const editableField = selectionMode === MULTI ? selectionList.substring(1) : dataRelationshipContext;
59
+ const searchGroupsProps = {
60
+ getPConnect,
61
+ editableField,
62
+ localeReference,
63
+ setShowRecords,
64
+ searchSelectCacheKey,
65
+ cache
66
+ };
67
+ return (_jsxs(_Fragment, { children: [_jsx(SearchGroups, { ...searchGroupsProps }), editableFieldComp] }));
68
+ }
69
+ //# sourceMappingURL=AdvancedSearch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AdvancedSearch.js","sourceRoot":"","sources":["../../../../src/components/template/AdvancedSearch/AdvancedSearch.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,kCAAkC,MAAM,qDAAqD,CAAC;AACrG,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7D,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK;IAC1C,MAAM,EAAE,WAAW,EAAE,iBAAiB,EAAE,eAAe,EAAE,GAAG,KAAK,CAAC;IAClE,MAAM,YAAY,GAAG,mBAAmB,CAAC,cAAc,CAAC,CAAC;IACzD,MAAM,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,iCAAiC,EAAE,IAAI,EAAE,oBAAoB,EAAE,GAAG,UAAU,CAC3I,kCAAkC,CAC5B,CAAC;IAET,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE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cAAc,CAAC,GAAG,eAAe,CAAC,QAAQ,CAAC;IAElD,MAAM,YAAY,GAAG,KAAK,CAAC,cAAc,EAAE,CAAC,cAAc,CAAC;IAC3D,aAAa;IACb,MAAM,KAAK,GAAG,KAAK,CAAC,kBAAkB,EAAE,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,IAAI,EAAE,CAAC;IAEvF,MAAM,iBAAiB,GAAG,kBAAkB,EAAE,CAAC,eAAe,CAAC;QAC7D,IAAI,EAAE,cAAc,CAAC,IAAI;QACzB,MAAM,EAAE;YACN,GAAG,mBAAmB,CAAC;gBACrB,cAAc;gBACd,WAAW;gBACX,eAAe;gBACf,YAAY,EAAE,iBAAiB;gBAC/B,0BAA0B;gBAC1B,2BAA2B;gBAC3B,iCAAiC;gBACjC,IAAI;aACL,CAAC;YACF,YAAY;YACZ,WAAW;YACX,KAAK,EAAE,YAAY,CAAC,gBAAgB,EAAE,eAAe,CAAC;YACtD,oBAAoB;YACpB,KAAK;SACN;KACF,CAAC,CAAC;IAEH,MAAM,EAAE,aAAa,EAAE,uBAAuB,EAAE,GAAG,iBAAiB,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,cAAc,EAAE,CAAC;IAC1G,MAAM,aAAa,GAAG,aAAa,KAAK,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,uBAAuB,CAAC;IAErG,MAAM,iBAAiB,GAAG;QACxB,WAAW;QACX,aAAa;QACb,eAAe;QACf,cAAc;QACd,oBAAoB;QACpB,KAAK;KACN,CAAC;IAEF,OAAO,CACL,8BACE,KAAC,YAAY,OAAK,iBAAiB,GAAI,EACtC,iBAAiB,IACjB,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import { useContext, useState } from 'react';\n\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport DataReferenceAdvancedSearchContext from '../DataReference/DataReferenceAdvancedSearchContext';\nimport { getFirstChildConfig } from '../DataReference/utils';\n\nexport default function AdvancedSearch(props) {\n const { getPConnect, targetObjectClass, localeReference } = props;\n const SearchGroups = getComponentFromMap('SearchGroups');\n const { dataReferenceConfigToChild, isCreateNewReferenceEnabled, disableStartingFieldsForReference, pyID, searchSelectCacheKey } = useContext(\n DataReferenceAdvancedSearchContext\n ) as any;\n\n const { selectionMode, value: singleSelectFieldValue, readonlyContextList: multiSelectField } = dataReferenceConfigToChild;\n\n let isSelectionExist = false;\n const { MULTI } = PCore.getConstants().LIST_SELECTION_MODE;\n\n if (selectionMode === MULTI) {\n isSelectionExist = getPConnect().getValue(multiSelectField)?.length || false;\n } else {\n isSelectionExist = getPConnect().getValue(singleSelectFieldValue) || false;\n }\n\n const [showRecords, setShowRecords] = useState(isSelectionExist);\n\n const pConn = getPConnect();\n const rawViewMetadata = pConn.getRawMetadata();\n\n const searchFieldsSet = new Set();\n const searchFields: any = [];\n rawViewMetadata.config.searchGroups.forEach(group => {\n group.children.forEach(child => {\n if (!searchFieldsSet.has(child.config.value) && !child.config.validator) {\n searchFields.push(child);\n searchFieldsSet.add(child.config.value);\n }\n });\n });\n\n const firstChildPConnect = getPConnect().getChildren()[0].getPConnect;\n const [firstChildMeta] = rawViewMetadata.children;\n\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n // @ts-ignore\n const cache = PCore.getNavigationUtils().getComponentCache(searchSelectCacheKey) ?? {};\n\n const editableFieldComp = firstChildPConnect().createComponent({\n type: firstChildMeta.type,\n config: {\n ...getFirstChildConfig({\n firstChildMeta,\n getPConnect,\n rawViewMetadata,\n contextClass: targetObjectClass,\n dataReferenceConfigToChild,\n isCreateNewReferenceEnabled,\n disableStartingFieldsForReference,\n pyID\n }),\n searchFields,\n showRecords,\n label: localizedVal('Search results', 'DataReference'),\n searchSelectCacheKey,\n cache\n }\n });\n\n const { selectionList, dataRelationshipContext } = editableFieldComp.props.getPConnect().getConfigProps();\n const editableField = selectionMode === MULTI ? selectionList.substring(1) : dataRelationshipContext;\n\n const searchGroupsProps = {\n getPConnect,\n editableField,\n localeReference,\n setShowRecords,\n searchSelectCacheKey,\n cache\n };\n\n return (\n <>\n <SearchGroups {...searchGroupsProps} />\n {editableFieldComp}\n </>\n );\n}\n"]}
@@ -0,0 +1,24 @@
1
+ export declare function getMappedKey(key: any): any;
2
+ declare const getComponentStateOptions: (getPConnect: any) => {
3
+ clearOnCancelForContext: any;
4
+ };
5
+ interface SearchCategory {
6
+ selectedCategory: string;
7
+ }
8
+ interface SearchGroup {
9
+ searchFields: unknown;
10
+ activeGroupId: string;
11
+ }
12
+ declare const componentCachePersistUtils: {
13
+ getComponentStateKey: (getPConnect: any, propertyName: string) => string;
14
+ getComponentStateOptions: (getPConnect: any) => {
15
+ clearOnCancelForContext: any;
16
+ };
17
+ setComponentCache: ({ cacheKey, state, options }: {
18
+ cacheKey: string;
19
+ state: SearchCategory | SearchGroup;
20
+ options: ReturnType<typeof getComponentStateOptions>;
21
+ }) => void;
22
+ };
23
+ export default componentCachePersistUtils;
24
+ //# sourceMappingURL=persistUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"persistUtils.d.ts","sourceRoot":"","sources":["../../../../../src/components/template/AdvancedSearch/SearchGroup/persistUtils.ts"],"names":[],"mappings":"AAEA,wBAAgB,YAAY,CAAC,GAAG,KAAA,OAM/B;AAcD,QAAA,MAAM,wBAAwB,GAAG,gBAAW;;CAE3C,CAAC;AAEF,UAAU,cAAc;IAEtB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,UAAU,WAAW;IAEnB,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;CACvB;AAgBD,QAAA,MAAM,0BAA0B;2DAzCyB,MAAM;;;;sDA+B5D;QACD,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,cAAc,GAAG,WAAW,CAAC;QACpC,OAAO,EAAE,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC;KACtD;CAUA,CAAC;AAEF,eAAe,0BAA0B,CAAC"}
@@ -0,0 +1,32 @@
1
+ const SKIP_CACHE_KEY = '';
2
+ export function getMappedKey(key) {
3
+ const mappedKey = PCore.getEnvironmentInfo().getKeyMapping(key);
4
+ if (!mappedKey) {
5
+ return key;
6
+ }
7
+ return mappedKey;
8
+ }
9
+ const getComponentStateKey = (getPConnect, propertyName) => {
10
+ const pConnect = getPConnect();
11
+ const caseID = `.${getMappedKey('pyID')}`; // Enhance this later when use-case arrives for data objects using S&S.
12
+ const resolvedCaseID = pConnect.getValue(caseID);
13
+ if (!resolvedCaseID) {
14
+ return SKIP_CACHE_KEY;
15
+ }
16
+ return `Search-${resolvedCaseID}-${pConnect.getPageReference()}-${propertyName}-${pConnect.getCurrentView()}`;
17
+ };
18
+ const getComponentStateOptions = getPConnect => {
19
+ return { clearOnCancelForContext: getPConnect().getContextName() };
20
+ };
21
+ const setComponentCache = ({ cacheKey, state, options }) => {
22
+ if (cacheKey !== SKIP_CACHE_KEY) {
23
+ PCore.getNavigationUtils().setComponentCache(cacheKey, state, options);
24
+ }
25
+ };
26
+ const componentCachePersistUtils = {
27
+ getComponentStateKey,
28
+ getComponentStateOptions,
29
+ setComponentCache
30
+ };
31
+ export default componentCachePersistUtils;
32
+ //# sourceMappingURL=persistUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"persistUtils.js","sourceRoot":"","sources":["../../../../../src/components/template/AdvancedSearch/SearchGroup/persistUtils.ts"],"names":[],"mappings":"AAAA,MAAM,cAAc,GAAG,EAAE,CAAC;AAE1B,MAAM,UAAU,YAAY,CAAC,GAAG;IAC9B,MAAM,SAAS,GAAG,KAAK,CAAC,kBAAkB,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IAChE,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,OAAO,GAAG,CAAC;IACb,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,oBAAoB,GAAG,CAAC,WAAW,EAAE,YAAoB,EAAE,EAAE;IACjE,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,MAAM,GAAG,IAAI,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,uEAAuE;IAClH,MAAM,cAAc,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEjD,IAAI,CAAC,cAAc,EAAE,CAAC;QACpB,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,OAAO,UAAU,cAAc,IAAI,QAAQ,CAAC,gBAAgB,EAAE,IAAI,YAAY,IAAI,QAAQ,CAAC,cAAc,EAAE,EAAE,CAAC;AAChH,CAAC,CAAC;AAEF,MAAM,wBAAwB,GAAG,WAAW,CAAC,EAAE;IAC7C,OAAO,EAAE,uBAAuB,EAAE,WAAW,EAAE,CAAC,cAAc,EAAE,EAAE,CAAC;AACrE,CAAC,CAAC;AAaF,MAAM,iBAAiB,GAAG,CAAC,EACzB,QAAQ,EACR,KAAK,EACL,OAAO,EAKR,EAAE,EAAE;IACH,IAAI,QAAQ,KAAK,cAAc,EAAE,CAAC;QAC/B,KAAK,CAAC,kBAAkB,EAAU,CAAC,iBAAiB,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IAClF,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,0BAA0B,GAAG;IACjC,oBAAoB;IACpB,wBAAwB;IACxB,iBAAiB;CAClB,CAAC;AAEF,eAAe,0BAA0B,CAAC","sourcesContent":["const SKIP_CACHE_KEY = '';\n\nexport function getMappedKey(key) {\n const mappedKey = PCore.getEnvironmentInfo().getKeyMapping(key);\n if (!mappedKey) {\n return key;\n }\n return mappedKey;\n}\n\nconst getComponentStateKey = (getPConnect, propertyName: string) => {\n const pConnect = getPConnect();\n const caseID = `.${getMappedKey('pyID')}`; // Enhance this later when use-case arrives for data objects using S&S.\n const resolvedCaseID = pConnect.getValue(caseID);\n\n if (!resolvedCaseID) {\n return SKIP_CACHE_KEY;\n }\n\n return `Search-${resolvedCaseID}-${pConnect.getPageReference()}-${propertyName}-${pConnect.getCurrentView()}`;\n};\n\nconst getComponentStateOptions = getPConnect => {\n return { clearOnCancelForContext: getPConnect().getContextName() };\n};\n\ninterface SearchCategory {\n // tabId of search category selected\n selectedCategory: string;\n}\n\ninterface SearchGroup {\n // searchFields can be any object based on what fields are authored.\n searchFields: unknown;\n activeGroupId: string;\n}\n\nconst setComponentCache = ({\n cacheKey,\n state,\n options\n}: {\n cacheKey: string;\n state: SearchCategory | SearchGroup;\n options: ReturnType<typeof getComponentStateOptions>;\n}) => {\n if (cacheKey !== SKIP_CACHE_KEY) {\n (PCore.getNavigationUtils() as any).setComponentCache(cacheKey, state, options);\n }\n};\n\nconst componentCachePersistUtils = {\n getComponentStateKey,\n getComponentStateOptions,\n setComponentCache\n};\n\nexport default componentCachePersistUtils;\n"]}
@@ -0,0 +1,3 @@
1
+ export declare const initializeSearchFields: (searchFields: any, getPConnect: any, referenceListClassID: any, searchFieldRestoreValues?: {}) => {};
2
+ export default function SearchGroups(props: any): import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=SearchGroups.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchGroups.d.ts","sourceRoot":"","sources":["../../../../../src/components/template/AdvancedSearch/SearchGroups/SearchGroups.tsx"],"names":[],"mappings":"AAUA,eAAO,MAAM,sBAAsB,GAAI,iBAAY,EAAE,gBAAW,EAAE,yBAAoB,EAAE,6BAA6B,OAmCpH,CAAC;AAmBF,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,KAAA,2CAoLzC"}
@@ -0,0 +1,181 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React, { createElement, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
3
+ import { Button, Grid, Select, MenuItem, Box } from '@mui/material';
4
+ import createPConnectComponent from '../../../../bridge/react_pconnect';
5
+ import TemplateContext from '../TemplateContext';
6
+ import componentCachePersistUtils from '../SearchGroup/persistUtils';
7
+ import { getCacheInfo, isValidInput } from './utils';
8
+ import { useCacheWhenListViewReady } from './hooks';
9
+ export const initializeSearchFields = (searchFields, getPConnect, referenceListClassID, searchFieldRestoreValues = {}) => {
10
+ const filtersProperties = {};
11
+ searchFields.forEach(field => {
12
+ let val = '';
13
+ const { value, defaultValue = '' } = field.config;
14
+ const propPath = PCore.getAnnotationUtils().getPropertyName(value);
15
+ if (searchFieldRestoreValues[propPath]) {
16
+ val = searchFieldRestoreValues[propPath];
17
+ }
18
+ else if (PCore.getAnnotationUtils().isProperty(defaultValue)) {
19
+ val = getPConnect().getValue(defaultValue.split(' ')[1]);
20
+ }
21
+ else if (defaultValue.startsWith('@L')) {
22
+ val = defaultValue.split(' ')[1];
23
+ }
24
+ else {
25
+ val = defaultValue;
26
+ }
27
+ filtersProperties[propPath] = val;
28
+ const valueSplit = value.split('@P ')[1]?.split('.').filter(Boolean) ?? [];
29
+ valueSplit.pop();
30
+ if (valueSplit.length) {
31
+ let path = '';
32
+ let currentClassID = referenceListClassID;
33
+ valueSplit.forEach(item => {
34
+ path = path.length ? `${path}.${item}` : item;
35
+ currentClassID = PCore.getMetadataUtils().getPropertyMetadata(item, currentClassID).pageClass;
36
+ if (currentClassID) {
37
+ filtersProperties[`${path}.classID`] = currentClassID;
38
+ }
39
+ });
40
+ }
41
+ });
42
+ return filtersProperties;
43
+ };
44
+ const flattenObj = obj => {
45
+ const result = {};
46
+ Object.keys(obj).forEach(key => {
47
+ if (!['context_data', 'pageInstructions'].includes(key)) {
48
+ if (typeof obj[key] === 'object' && !Array.isArray(obj[key])) {
49
+ const temp = flattenObj(obj[key]);
50
+ Object.keys(temp).forEach(nestedKey => {
51
+ result[`${key}.${nestedKey}`] = temp[nestedKey];
52
+ });
53
+ }
54
+ else {
55
+ result[key] = obj[key];
56
+ }
57
+ }
58
+ });
59
+ return result;
60
+ };
61
+ export default function SearchGroups(props) {
62
+ const localizedVal = PCore.getLocaleUtils().getLocaleValue;
63
+ const { getPConnect, editableField, localeReference, setShowRecords, searchSelectCacheKey, cache } = props;
64
+ const referenceFieldName = editableField.replaceAll('.', '_');
65
+ const state = useRef({ searchFields: {}, activeGroupId: '' }).current;
66
+ const options = componentCachePersistUtils.getComponentStateOptions(getPConnect);
67
+ const { searchGroups: groups, referenceList } = getPConnect().getConfigProps();
68
+ const { useCache, initialActiveGroupId } = getCacheInfo(cache, groups);
69
+ const [activeGroupId, setActiveGroupId] = useState(initialActiveGroupId);
70
+ const [transientItemID, setTransientItemID] = useState(null);
71
+ const [previousFormValues, setPreviousFormValues] = useState(null);
72
+ const viewName = getPConnect().getCurrentView();
73
+ const rawGroupsConfig = getPConnect().getRawConfigProps().searchGroups;
74
+ const activeGroupIndex = groups.findIndex(group => group.config.id === activeGroupId);
75
+ const { children: searchFieldsChildren = [] } = activeGroupIndex !== -1 ? rawGroupsConfig[activeGroupIndex] : {};
76
+ const searchFields = searchFieldsChildren.map(field => ({
77
+ ...field,
78
+ config: { ...field.config, isSearchField: true }
79
+ }));
80
+ const searchByRef = useRef(null);
81
+ const searchFieldsRef = useRef(null);
82
+ const isValidatorField = searchFields.some(field => field.config.validator);
83
+ const { classID: referenceListClassID } = PCore.getMetadataUtils().getDataPageMetadata(referenceList);
84
+ const initialSearchFields = useMemo(() => initializeSearchFields(searchFields, getPConnect, referenceListClassID, useCache && cache.activeGroupId === activeGroupId ? cache.searchFields : {}), [activeGroupId, getPConnect, cache.searchFields]);
85
+ useEffect(() => {
86
+ if (transientItemID) {
87
+ const filtersWithClassID = {
88
+ ...initialSearchFields,
89
+ classID: referenceListClassID
90
+ };
91
+ // @ts-ignore
92
+ PCore.getContainerUtils().replaceTransientData({ transientItemID, data: filtersWithClassID });
93
+ }
94
+ }, [activeGroupId]);
95
+ useEffect(() => {
96
+ const filtersWithClassID = {
97
+ ...initialSearchFields,
98
+ classID: referenceListClassID
99
+ };
100
+ const transientId = getPConnect()
101
+ .getContainerManager()
102
+ .addTransientItem({ id: `${referenceFieldName}-${viewName}`, data: filtersWithClassID });
103
+ setTransientItemID(transientId);
104
+ }, []);
105
+ const getFilterData = useCallback(() => {
106
+ // @ts-ignore
107
+ let changes = PCore.getFormUtils().getSubmitData(transientItemID, {
108
+ isTransientContext: true,
109
+ includeDisabledFields: true
110
+ });
111
+ if (Object.keys(cache.searchFields ?? {}).length > 0 && Object.keys(changes).length === 1) {
112
+ changes = cache.searchFields;
113
+ }
114
+ const formValues = flattenObj(changes);
115
+ if (!PCore.isDeepEqual(previousFormValues, formValues) && PCore.getFormUtils().isFormValid(transientItemID) && isValidInput(formValues)) {
116
+ if (isValidatorField) {
117
+ // @ts-ignore
118
+ PCore.getMessageManager().clearContextMessages({ context: transientItemID });
119
+ }
120
+ setPreviousFormValues(formValues);
121
+ setShowRecords(true);
122
+ PCore.getPubSubUtils().publish(PCore.getEvents().getTransientEvent().UPDATE_PROMOTED_FILTERS, {
123
+ payload: formValues,
124
+ showRecords: true,
125
+ viewName
126
+ });
127
+ }
128
+ state.activeGroupId = activeGroupId;
129
+ state.searchFields = changes;
130
+ state.selectedCategory = viewName;
131
+ componentCachePersistUtils.setComponentCache({ cacheKey: searchSelectCacheKey, state, options });
132
+ }, [transientItemID, setShowRecords, viewName, activeGroupId, previousFormValues]);
133
+ const resetFilterData = useCallback(() => {
134
+ // @ts-ignore
135
+ PCore.getNavigationUtils().resetComponentCache(searchSelectCacheKey);
136
+ const resetPayload = {
137
+ transientItemID,
138
+ data: initializeSearchFields(searchFields, getPConnect, referenceListClassID),
139
+ options: { reset: true }
140
+ };
141
+ // @ts-ignore
142
+ PCore.getContainerUtils().updateTransientData(resetPayload);
143
+ }, [transientItemID, initialSearchFields]);
144
+ useCacheWhenListViewReady(cache, viewName, useCache, getFilterData, searchSelectCacheKey);
145
+ const searchDropdown = groups.length > 1 && (_jsx(Grid, { container: true, spacing: 2, children: _jsx(Select, { value: activeGroupId, onChange: e => setActiveGroupId(e.target.value), ref: searchByRef, fullWidth: true, children: groups.map(group => (_jsx(MenuItem, { value: group.config.id, children: group.config.label }, group.config.id))) }) }));
146
+ const actionButtons = (_jsxs(Box, { display: 'flex', gap: 2, children: [_jsx(Button, { variant: 'outlined', onClick: resetFilterData, children: localizedVal('Reset', 'SimpleTable') }), _jsx(Button, { variant: 'contained', onClick: getFilterData, children: localizedVal('Search', 'SimpleTable') })] }));
147
+ const searchFieldsViewConfig = {
148
+ name: 'SearchFields',
149
+ type: 'View',
150
+ config: {
151
+ template: 'DefaultForm',
152
+ NumCols: '3',
153
+ contextName: transientItemID,
154
+ readOnly: false,
155
+ context: transientItemID,
156
+ localeReference
157
+ },
158
+ children: [
159
+ {
160
+ name: 'Fields',
161
+ type: 'Region',
162
+ children: searchFields
163
+ }
164
+ ]
165
+ };
166
+ const searchFieldsC11nEnv = PCore.createPConnect({
167
+ meta: searchFieldsViewConfig,
168
+ options: {
169
+ hasForm: true,
170
+ contextName: transientItemID
171
+ }
172
+ });
173
+ const templateContext = useContext(TemplateContext);
174
+ const templateContextValue = useMemo(() => ({ ...templateContext, outerColumnCount: undefined }), []);
175
+ const searchFieldsViewComp = transientItemID ? (_jsx(TemplateContext.Provider, { value: templateContextValue, children: _jsx("div", { ref: searchFieldsRef, children: createElement(createPConnectComponent(), { ...searchFieldsC11nEnv }) }) })) : null;
176
+ const childrenToRender = [searchDropdown, searchFieldsViewComp, actionButtons];
177
+ return (_jsx(Box, { display: 'flex', flexDirection: 'column', gap: 2, children: childrenToRender.map((child, index) => (
178
+ // eslint-disable-next-line react/no-array-index-key
179
+ _jsx(React.Fragment, { children: child }, index))) }));
180
+ }
181
+ //# sourceMappingURL=SearchGroups.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchGroups.js","sourceRoot":"","sources":["../../../../../src/components/template/AdvancedSearch/SearchGroups/SearchGroups.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAA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AG,EAAE,CAAC,YAC9C,gBAAgB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC;QACtC,oDAAoD;QACpD,KAAC,KAAK,CAAC,QAAQ,cAAc,KAAK,IAAb,KAAK,CAA0B,CACrD,CAAC,GACE,CACP,CAAC;AACJ,CAAC","sourcesContent":["import React, { createElement, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport { Button, Grid, Select, MenuItem, Box } from '@mui/material';\n\nimport createPConnectComponent from '../../../../bridge/react_pconnect';\nimport TemplateContext from '../TemplateContext';\nimport componentCachePersistUtils from '../SearchGroup/persistUtils';\n\nimport { getCacheInfo, isValidInput } from './utils';\nimport { useCacheWhenListViewReady } from './hooks';\n\nexport const initializeSearchFields = (searchFields, getPConnect, referenceListClassID, searchFieldRestoreValues = {}) => {\n const filtersProperties = {};\n searchFields.forEach(field => {\n let val = '';\n const { value, defaultValue = '' } = field.config;\n const propPath = PCore.getAnnotationUtils().getPropertyName(value);\n\n if (searchFieldRestoreValues[propPath]) {\n val = searchFieldRestoreValues[propPath];\n } else if (PCore.getAnnotationUtils().isProperty(defaultValue)) {\n val = getPConnect().getValue(defaultValue.split(' ')[1]);\n } else if (defaultValue.startsWith('@L')) {\n val = defaultValue.split(' ')[1];\n } else {\n val = defaultValue;\n }\n\n filtersProperties[propPath] = val;\n\n const valueSplit = value.split('@P ')[1]?.split('.').filter(Boolean) ?? [];\n valueSplit.pop();\n\n if (valueSplit.length) {\n let path = '';\n let currentClassID = referenceListClassID;\n valueSplit.forEach(item => {\n path = path.length ? `${path}.${item}` : item;\n currentClassID = (PCore.getMetadataUtils().getPropertyMetadata(item, currentClassID) as any).pageClass;\n if (currentClassID) {\n filtersProperties[`${path}.classID`] = currentClassID;\n }\n });\n }\n });\n return filtersProperties;\n};\n\nconst flattenObj = obj => {\n const result = {};\n Object.keys(obj).forEach(key => {\n if (!['context_data', 'pageInstructions'].includes(key)) {\n if (typeof obj[key] === 'object' && !Array.isArray(obj[key])) {\n const temp = flattenObj(obj[key]);\n Object.keys(temp).forEach(nestedKey => {\n result[`${key}.${nestedKey}`] = temp[nestedKey];\n });\n } else {\n result[key] = obj[key];\n }\n }\n });\n return result;\n};\n\nexport default function SearchGroups(props) {\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const { getPConnect, editableField, localeReference, setShowRecords, searchSelectCacheKey, cache } = props;\n const referenceFieldName = editableField.replaceAll('.', '_');\n\n const state: any = useRef({ searchFields: {}, activeGroupId: '' }).current;\n const options = componentCachePersistUtils.getComponentStateOptions(getPConnect);\n\n const { searchGroups: groups, referenceList } = getPConnect().getConfigProps();\n const { useCache, initialActiveGroupId } = getCacheInfo(cache, groups);\n const [activeGroupId, setActiveGroupId] = useState(initialActiveGroupId);\n const [transientItemID, setTransientItemID] = useState<any>(null);\n const [previousFormValues, setPreviousFormValues] = useState<any>(null);\n const viewName = getPConnect().getCurrentView();\n\n const rawGroupsConfig = getPConnect().getRawConfigProps().searchGroups;\n const activeGroupIndex = groups.findIndex(group => group.config.id === activeGroupId);\n const { children: searchFieldsChildren = [] } = activeGroupIndex !== -1 ? rawGroupsConfig[activeGroupIndex] : {};\n const searchFields = searchFieldsChildren.map(field => ({\n ...field,\n config: { ...field.config, isSearchField: true }\n }));\n\n const searchByRef = useRef(null);\n const searchFieldsRef = useRef(null);\n const isValidatorField = searchFields.some(field => field.config.validator);\n const { classID: referenceListClassID } = PCore.getMetadataUtils().getDataPageMetadata(referenceList) as any;\n\n const initialSearchFields = useMemo(\n () =>\n initializeSearchFields(\n searchFields,\n getPConnect,\n referenceListClassID,\n useCache && cache.activeGroupId === activeGroupId ? cache.searchFields : {}\n ),\n [activeGroupId, getPConnect, cache.searchFields]\n );\n\n useEffect(() => {\n if (transientItemID) {\n const filtersWithClassID = {\n ...initialSearchFields,\n classID: referenceListClassID\n };\n // @ts-ignore\n PCore.getContainerUtils().replaceTransientData({ transientItemID, data: filtersWithClassID });\n }\n }, [activeGroupId]);\n\n useEffect(() => {\n const filtersWithClassID = {\n ...initialSearchFields,\n classID: referenceListClassID\n };\n\n const transientId = getPConnect()\n .getContainerManager()\n .addTransientItem({ id: `${referenceFieldName}-${viewName}`, data: filtersWithClassID });\n setTransientItemID(transientId);\n }, []);\n\n const getFilterData = useCallback(() => {\n // @ts-ignore\n let changes = PCore.getFormUtils().getSubmitData(transientItemID, {\n isTransientContext: true,\n includeDisabledFields: true\n });\n\n if (Object.keys(cache.searchFields ?? {}).length > 0 && Object.keys(changes).length === 1) {\n changes = cache.searchFields;\n }\n\n const formValues = flattenObj(changes);\n\n if (!PCore.isDeepEqual(previousFormValues, formValues) && PCore.getFormUtils().isFormValid(transientItemID) && isValidInput(formValues)) {\n if (isValidatorField) {\n // @ts-ignore\n PCore.getMessageManager().clearContextMessages({ context: transientItemID });\n }\n setPreviousFormValues(formValues);\n setShowRecords(true);\n PCore.getPubSubUtils().publish(PCore.getEvents().getTransientEvent().UPDATE_PROMOTED_FILTERS, {\n payload: formValues,\n showRecords: true,\n viewName\n });\n }\n\n state.activeGroupId = activeGroupId;\n state.searchFields = changes;\n state.selectedCategory = viewName;\n\n componentCachePersistUtils.setComponentCache({ cacheKey: searchSelectCacheKey, state, options });\n }, [transientItemID, setShowRecords, viewName, activeGroupId, previousFormValues]);\n\n const resetFilterData = useCallback(() => {\n // @ts-ignore\n PCore.getNavigationUtils().resetComponentCache(searchSelectCacheKey);\n const resetPayload = {\n transientItemID,\n data: initializeSearchFields(searchFields, getPConnect, referenceListClassID),\n options: { reset: true }\n };\n // @ts-ignore\n PCore.getContainerUtils().updateTransientData(resetPayload);\n }, [transientItemID, initialSearchFields]);\n\n useCacheWhenListViewReady(cache, viewName, useCache, getFilterData, searchSelectCacheKey);\n\n const searchDropdown = groups.length > 1 && (\n <Grid container spacing={2}>\n <Select value={activeGroupId} onChange={e => setActiveGroupId(e.target.value)} ref={searchByRef} fullWidth>\n {groups.map(group => (\n <MenuItem key={group.config.id} value={group.config.id}>\n {group.config.label}\n </MenuItem>\n ))}\n </Select>\n </Grid>\n );\n\n const actionButtons = (\n <Box display='flex' gap={2}>\n <Button variant='outlined' onClick={resetFilterData}>\n {localizedVal('Reset', 'SimpleTable')}\n </Button>\n <Button variant='contained' onClick={getFilterData}>\n {localizedVal('Search', 'SimpleTable')}\n </Button>\n </Box>\n );\n\n const searchFieldsViewConfig = {\n name: 'SearchFields',\n type: 'View',\n config: {\n template: 'DefaultForm',\n NumCols: '3',\n contextName: transientItemID,\n readOnly: false,\n context: transientItemID,\n localeReference\n },\n children: [\n {\n name: 'Fields',\n type: 'Region',\n children: searchFields\n }\n ]\n };\n\n const searchFieldsC11nEnv = PCore.createPConnect({\n meta: searchFieldsViewConfig,\n options: {\n hasForm: true,\n contextName: transientItemID\n }\n });\n\n const templateContext = useContext(TemplateContext);\n const templateContextValue = useMemo(() => ({ ...templateContext, outerColumnCount: undefined }), []);\n\n const searchFieldsViewComp = transientItemID ? (\n <TemplateContext.Provider value={templateContextValue}>\n <div ref={searchFieldsRef}>{createElement(createPConnectComponent(), { ...searchFieldsC11nEnv })}</div>\n </TemplateContext.Provider>\n ) : null;\n\n const childrenToRender = [searchDropdown, searchFieldsViewComp, actionButtons];\n\n return (\n <Box display='flex' flexDirection='column' gap={2}>\n {childrenToRender.map((child, index) => (\n // eslint-disable-next-line react/no-array-index-key\n <React.Fragment key={index}>{child}</React.Fragment>\n ))}\n </Box>\n );\n}\n"]}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This hook registers a callback for the whenever list view component is ready
3
+ * then makes a call to get the data using the search fields pre-filled with cache data.
4
+ */
5
+ export declare function useCacheWhenListViewReady(cache: {
6
+ searchFields: unknown;
7
+ }, viewName: string, useCache: boolean, getFilterData: (params: {
8
+ isCalledFromCache: boolean;
9
+ }) => void, searchSelectCacheKey: string): void;
10
+ //# sourceMappingURL=hooks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../../../src/components/template/AdvancedSearch/SearchGroups/hooks.ts"],"names":[],"mappings":"AAOA;;;GAGG;AAEH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE;IAAE,YAAY,EAAE,OAAO,CAAA;CAAE,EAChC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,OAAO,EACjB,aAAa,EAAE,CAAC,MAAM,EAAE;IAAE,iBAAiB,EAAE,OAAO,CAAA;CAAE,KAAK,IAAI,EAC/D,oBAAoB,EAAE,MAAM,QAmB7B"}
@@ -0,0 +1,26 @@
1
+ import { useEffect } from 'react';
2
+ const listViewConstants = {
3
+ EVENTS: {
4
+ LIST_VIEW_READY: 'LIST_VIEW_READY'
5
+ }
6
+ };
7
+ /**
8
+ * This hook registers a callback for the whenever list view component is ready
9
+ * then makes a call to get the data using the search fields pre-filled with cache data.
10
+ */
11
+ // eslint-disable-next-line import/prefer-default-export
12
+ export function useCacheWhenListViewReady(cache, viewName, useCache, getFilterData, searchSelectCacheKey) {
13
+ useEffect(() => {
14
+ if (Object.keys(cache.searchFields ?? {}).length > 0) {
15
+ PCore.getPubSubUtils().subscribe(listViewConstants.EVENTS.LIST_VIEW_READY, ({ viewName: viewNameFromListView }) => {
16
+ if (viewNameFromListView === viewName && useCache) {
17
+ getFilterData({ isCalledFromCache: true });
18
+ }
19
+ }, `${searchSelectCacheKey}-listview-ready`);
20
+ }
21
+ return () => {
22
+ PCore.getPubSubUtils().unsubscribe(listViewConstants.EVENTS.LIST_VIEW_READY, `${searchSelectCacheKey}-listview-ready`);
23
+ };
24
+ }, []);
25
+ }
26
+ //# sourceMappingURL=hooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../../../src/components/template/AdvancedSearch/SearchGroups/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,iBAAiB,GAAG;IACxB,MAAM,EAAE;QACN,eAAe,EAAE,iBAAiB;KACnC;CACF,CAAC;AACF;;;GAGG;AACH,wDAAwD;AACxD,MAAM,UAAU,yBAAyB,CACvC,KAAgC,EAChC,QAAgB,EAChB,QAAiB,EACjB,aAA+D,EAC/D,oBAA4B;IAE5B,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACrD,KAAK,CAAC,cAAc,EAAE,CAAC,SAAS,CAC9B,iBAAiB,CAAC,MAAM,CAAC,eAAe,EACxC,CAAC,EAAE,QAAQ,EAAE,oBAAoB,EAAwB,EAAE,EAAE;gBAC3D,IAAI,oBAAoB,KAAK,QAAQ,IAAI,QAAQ,EAAE,CAAC;oBAClD,aAAa,CAAC,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC,CAAC;gBAC7C,CAAC;YACH,CAAC,EACD,GAAG,oBAAoB,iBAAiB,CACzC,CAAC;QACJ,CAAC;QAED,OAAO,GAAG,EAAE;YACV,KAAK,CAAC,cAAc,EAAE,CAAC,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,eAAe,EAAE,GAAG,oBAAoB,iBAAiB,CAAC,CAAC;QACzH,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC","sourcesContent":["import { useEffect } from 'react';\n\nconst listViewConstants = {\n EVENTS: {\n LIST_VIEW_READY: 'LIST_VIEW_READY'\n }\n};\n/**\n * This hook registers a callback for the whenever list view component is ready\n * then makes a call to get the data using the search fields pre-filled with cache data.\n */\n// eslint-disable-next-line import/prefer-default-export\nexport function useCacheWhenListViewReady(\n cache: { searchFields: unknown },\n viewName: string,\n useCache: boolean,\n getFilterData: (params: { isCalledFromCache: boolean }) => void,\n searchSelectCacheKey: string\n) {\n useEffect(() => {\n if (Object.keys(cache.searchFields ?? {}).length > 0) {\n PCore.getPubSubUtils().subscribe(\n listViewConstants.EVENTS.LIST_VIEW_READY,\n ({ viewName: viewNameFromListView }: { viewName: string }) => {\n if (viewNameFromListView === viewName && useCache) {\n getFilterData({ isCalledFromCache: true });\n }\n },\n `${searchSelectCacheKey}-listview-ready`\n );\n }\n\n return () => {\n PCore.getPubSubUtils().unsubscribe(listViewConstants.EVENTS.LIST_VIEW_READY, `${searchSelectCacheKey}-listview-ready`);\n };\n }, []);\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export { default } from './SearchGroups';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/template/AdvancedSearch/SearchGroups/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default } from './SearchGroups';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/template/AdvancedSearch/SearchGroups/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC","sourcesContent":["export { default } from './SearchGroups';\n"]}
@@ -0,0 +1,16 @@
1
+ export declare function getCacheInfo(cache: {
2
+ selectedCategory: string;
3
+ activeGroupId: string;
4
+ searchFields: unknown;
5
+ }, groups: {
6
+ config: {
7
+ id: string;
8
+ };
9
+ }[]): {
10
+ useCache: boolean;
11
+ initialActiveGroupId: string;
12
+ };
13
+ export declare function isValidInput(input: {
14
+ [s: string]: unknown;
15
+ }): boolean;
16
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/components/template/AdvancedSearch/SearchGroups/utils.ts"],"names":[],"mappings":"AAWA,wBAAgB,YAAY,CAC1B,KAAK,EAAE;IAAE,gBAAgB,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,OAAO,CAAA;CAAE,EACjF,MAAM,EAAE;IAAE,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,EAAE;;;EAWrC;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,WAE3D"}