@pega/react-sdk-components 24.2.11 → 25.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (630) hide show
  1. package/lib/bridge/Context/StoreContext.d.ts +0 -1
  2. package/lib/bridge/Context/StoreContext.d.ts.map +1 -1
  3. package/lib/bridge/Context/StoreContext.js.map +1 -1
  4. package/lib/bridge/helpers/sdk_component_map.d.ts.map +1 -1
  5. package/lib/bridge/helpers/sdk_component_map.js +0 -6
  6. package/lib/bridge/helpers/sdk_component_map.js.map +1 -1
  7. package/lib/bridge/react_pconnect.d.ts.map +1 -1
  8. package/lib/bridge/react_pconnect.js +11 -14
  9. package/lib/bridge/react_pconnect.js.map +1 -1
  10. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.map +1 -1
  11. package/lib/components/designSystemExtension/Banner/Banner.css +1 -1
  12. package/lib/components/designSystemExtension/Banner/Banner.d.ts.map +1 -1
  13. package/lib/components/designSystemExtension/Banner/Banner.js +2 -2
  14. package/lib/components/designSystemExtension/Banner/Banner.js.map +1 -1
  15. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
  16. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
  17. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +50 -35
  18. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
  19. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts.map +1 -1
  20. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +6 -8
  21. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
  22. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts +1 -1
  23. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
  24. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +3 -5
  25. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
  26. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js +2 -2
  27. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
  28. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts.map +1 -1
  29. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +4 -6
  30. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
  31. package/lib/components/designSystemExtension/Operator/Operator.d.ts +1 -1
  32. package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
  33. package/lib/components/designSystemExtension/Operator/Operator.js +12 -9
  34. package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
  35. package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +1 -1
  36. package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
  37. package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
  38. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -1
  39. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +32 -4
  40. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -1
  41. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.css +7 -14
  42. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts.map +1 -1
  43. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js +12 -2
  44. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
  45. package/lib/components/field/AutoComplete/AutoComplete.d.ts +1 -1
  46. package/lib/components/field/AutoComplete/AutoComplete.d.ts.map +1 -1
  47. package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
  48. package/lib/components/field/CancelAlert/CancelAlert.css +4 -4
  49. package/lib/components/field/CancelAlert/CancelAlert.d.ts +1 -1
  50. package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
  51. package/lib/components/field/CancelAlert/CancelAlert.js +3 -3
  52. package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
  53. package/lib/components/field/Checkbox/Checkbox.d.ts +9 -1
  54. package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
  55. package/lib/components/field/Checkbox/Checkbox.js +52 -3
  56. package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
  57. package/lib/components/field/Currency/Currency.d.ts +1 -1
  58. package/lib/components/field/Currency/Currency.d.ts.map +1 -1
  59. package/lib/components/field/Currency/Currency.js +2 -2
  60. package/lib/components/field/Currency/Currency.js.map +1 -1
  61. package/lib/components/field/Currency/currency-utils.d.ts.map +1 -1
  62. package/lib/components/field/Currency/currency-utils.js +0 -2
  63. package/lib/components/field/Currency/currency-utils.js.map +1 -1
  64. package/lib/components/field/Date/Date.d.ts +1 -1
  65. package/lib/components/field/Date/Date.d.ts.map +1 -1
  66. package/lib/components/field/Date/Date.js +3 -6
  67. package/lib/components/field/Date/Date.js.map +1 -1
  68. package/lib/components/field/DateTime/DateTime.d.ts +1 -1
  69. package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
  70. package/lib/components/field/DateTime/DateTime.js +4 -7
  71. package/lib/components/field/DateTime/DateTime.js.map +1 -1
  72. package/lib/components/field/Decimal/Decimal.d.ts +1 -1
  73. package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
  74. package/lib/components/field/Decimal/Decimal.js +2 -4
  75. package/lib/components/field/Decimal/Decimal.js.map +1 -1
  76. package/lib/components/field/Dropdown/Dropdown.d.ts +1 -1
  77. package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
  78. package/lib/components/field/Dropdown/Dropdown.js +6 -9
  79. package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
  80. package/lib/components/field/Email/Email.d.ts +1 -1
  81. package/lib/components/field/Email/Email.d.ts.map +1 -1
  82. package/lib/components/field/Email/Email.js +6 -7
  83. package/lib/components/field/Email/Email.js.map +1 -1
  84. package/lib/components/field/Group/Group.d.ts +2 -2
  85. package/lib/components/field/Group/Group.d.ts.map +1 -1
  86. package/lib/components/field/Group/Group.js +4 -3
  87. package/lib/components/field/Group/Group.js.map +1 -1
  88. package/lib/components/field/Integer/Integer.d.ts +1 -1
  89. package/lib/components/field/Integer/Integer.d.ts.map +1 -1
  90. package/lib/components/field/Integer/Integer.js +4 -5
  91. package/lib/components/field/Integer/Integer.js.map +1 -1
  92. package/lib/components/field/Location/Location.css +4 -0
  93. package/lib/components/field/Location/Location.d.ts +11 -0
  94. package/lib/components/field/Location/Location.d.ts.map +1 -0
  95. package/lib/components/field/Location/Location.js +158 -0
  96. package/lib/components/field/Location/Location.js.map +1 -0
  97. package/lib/components/field/Location/index.d.ts +2 -0
  98. package/lib/components/field/Location/index.d.ts.map +1 -0
  99. package/lib/components/field/Location/index.js +2 -0
  100. package/lib/components/field/Location/index.js.map +1 -0
  101. package/lib/components/field/Multiselect/Multiselect.js.map +1 -1
  102. package/lib/components/field/Multiselect/utils.d.ts +2 -1
  103. package/lib/components/field/Multiselect/utils.d.ts.map +1 -1
  104. package/lib/components/field/Multiselect/utils.js +1 -1
  105. package/lib/components/field/Multiselect/utils.js.map +1 -1
  106. package/lib/components/field/ObjectReference/ObjectReference.d.ts +16 -0
  107. package/lib/components/field/ObjectReference/ObjectReference.d.ts.map +1 -0
  108. package/lib/components/field/ObjectReference/ObjectReference.js +165 -0
  109. package/lib/components/field/ObjectReference/ObjectReference.js.map +1 -0
  110. package/lib/components/field/ObjectReference/index.d.ts +2 -0
  111. package/lib/components/field/ObjectReference/index.d.ts.map +1 -0
  112. package/lib/components/field/ObjectReference/index.js +2 -0
  113. package/lib/components/field/ObjectReference/index.js.map +1 -0
  114. package/lib/components/field/ObjectReference/utils.d.ts +17 -0
  115. package/lib/components/field/ObjectReference/utils.d.ts.map +1 -0
  116. package/lib/components/field/ObjectReference/utils.js +99 -0
  117. package/lib/components/field/ObjectReference/utils.js.map +1 -0
  118. package/lib/components/field/Percentage/Percentage.d.ts +1 -1
  119. package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
  120. package/lib/components/field/Percentage/Percentage.js +2 -5
  121. package/lib/components/field/Percentage/Percentage.js.map +1 -1
  122. package/lib/components/field/Phone/Phone.d.ts +1 -1
  123. package/lib/components/field/Phone/Phone.d.ts.map +1 -1
  124. package/lib/components/field/Phone/Phone.js +6 -4
  125. package/lib/components/field/Phone/Phone.js.map +1 -1
  126. package/lib/components/field/RadioButtons/RadioButtons.d.ts +8 -1
  127. package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
  128. package/lib/components/field/RadioButtons/RadioButtons.js +12 -1
  129. package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
  130. package/lib/components/field/RichText/RichText.css +79 -0
  131. package/lib/components/field/RichText/RichText.d.ts +2 -1
  132. package/lib/components/field/RichText/RichText.d.ts.map +1 -1
  133. package/lib/components/field/RichText/RichText.js +1 -0
  134. package/lib/components/field/RichText/RichText.js.map +1 -1
  135. package/lib/components/field/ScalarList/ScalarList.d.ts +1 -1
  136. package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -1
  137. package/lib/components/field/ScalarList/ScalarList.js +1 -2
  138. package/lib/components/field/ScalarList/ScalarList.js.map +1 -1
  139. package/lib/components/field/SelectableCard/SelectableCard.d.ts +2 -0
  140. package/lib/components/field/SelectableCard/SelectableCard.d.ts.map +1 -0
  141. package/lib/components/field/SelectableCard/SelectableCard.js +57 -0
  142. package/lib/components/field/SelectableCard/SelectableCard.js.map +1 -0
  143. package/lib/components/field/SelectableCard/index.d.ts +2 -0
  144. package/lib/components/field/SelectableCard/index.d.ts.map +1 -0
  145. package/lib/components/field/SelectableCard/index.js +2 -0
  146. package/lib/components/field/SelectableCard/index.js.map +1 -0
  147. package/lib/components/field/SelectableCard/utils.d.ts +13 -0
  148. package/lib/components/field/SelectableCard/utils.d.ts.map +1 -0
  149. package/lib/components/field/SelectableCard/utils.js +183 -0
  150. package/lib/components/field/SelectableCard/utils.js.map +1 -0
  151. package/lib/components/field/SemanticLink/SemanticLink.d.ts +10 -2
  152. package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
  153. package/lib/components/field/SemanticLink/SemanticLink.js +128 -15
  154. package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
  155. package/lib/components/field/SemanticLink/utils.js +1 -1
  156. package/lib/components/field/SemanticLink/utils.js.map +1 -1
  157. package/lib/components/field/TextArea/TextArea.d.ts +1 -1
  158. package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
  159. package/lib/components/field/TextArea/TextArea.js +4 -5
  160. package/lib/components/field/TextArea/TextArea.js.map +1 -1
  161. package/lib/components/field/TextContent/TextContent.d.ts +1 -1
  162. package/lib/components/field/TextContent/TextContent.d.ts.map +1 -1
  163. package/lib/components/field/TextContent/TextContent.js +0 -1
  164. package/lib/components/field/TextContent/TextContent.js.map +1 -1
  165. package/lib/components/field/TextInput/TextInput.d.ts +1 -1
  166. package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
  167. package/lib/components/field/TextInput/TextInput.js +4 -5
  168. package/lib/components/field/TextInput/TextInput.js.map +1 -1
  169. package/lib/components/field/Time/Time.d.ts +1 -1
  170. package/lib/components/field/Time/Time.d.ts.map +1 -1
  171. package/lib/components/field/Time/Time.js +2 -5
  172. package/lib/components/field/Time/Time.js.map +1 -1
  173. package/lib/components/field/URL/URL.d.ts +1 -1
  174. package/lib/components/field/URL/URL.d.ts.map +1 -1
  175. package/lib/components/field/URL/URL.js +4 -5
  176. package/lib/components/field/URL/URL.js.map +1 -1
  177. package/lib/components/field/UserReference/UserReference.d.ts +1 -2
  178. package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
  179. package/lib/components/field/UserReference/UserReference.js +1 -2
  180. package/lib/components/field/UserReference/UserReference.js.map +1 -1
  181. package/lib/components/field/UserReference/UserReferenceUtils.d.ts.map +1 -1
  182. package/lib/components/field/UserReference/UserReferenceUtils.js.map +1 -1
  183. package/lib/components/helpers/attachmentShared.d.ts +2 -0
  184. package/lib/components/helpers/attachmentShared.d.ts.map +1 -0
  185. package/lib/components/helpers/attachmentShared.js +6 -0
  186. package/lib/components/helpers/attachmentShared.js.map +1 -0
  187. package/lib/components/helpers/case-utils.js.map +1 -1
  188. package/lib/components/helpers/common-utils.d.ts +1 -1
  189. package/lib/components/helpers/common-utils.d.ts.map +1 -1
  190. package/lib/components/helpers/common-utils.js +1 -2
  191. package/lib/components/helpers/common-utils.js.map +1 -1
  192. package/lib/components/helpers/data_page.d.ts.map +1 -1
  193. package/lib/components/helpers/data_page.js +0 -1
  194. package/lib/components/helpers/data_page.js.map +1 -1
  195. package/lib/components/helpers/date-format-utils.d.ts.map +1 -1
  196. package/lib/components/helpers/event-utils.d.ts.map +1 -1
  197. package/lib/components/helpers/event-utils.js.map +1 -1
  198. package/lib/components/helpers/field-group-utils.d.ts +1 -1
  199. package/lib/components/helpers/field-group-utils.d.ts.map +1 -1
  200. package/lib/components/helpers/field-group-utils.js.map +1 -1
  201. package/lib/components/helpers/formatters/Boolean.js.map +1 -1
  202. package/lib/components/helpers/formatters/Currency.d.ts +1 -0
  203. package/lib/components/helpers/formatters/Currency.d.ts.map +1 -1
  204. package/lib/components/helpers/formatters/Currency.js +8 -4
  205. package/lib/components/helpers/formatters/Currency.js.map +1 -1
  206. package/lib/components/helpers/formatters/CurrencyMap.d.ts.map +1 -1
  207. package/lib/components/helpers/formatters/CurrencyMap.js +0 -1
  208. package/lib/components/helpers/formatters/CurrencyMap.js.map +1 -1
  209. package/lib/components/helpers/formatters/Date.js.map +1 -1
  210. package/lib/components/helpers/formatters/index.d.ts +1 -0
  211. package/lib/components/helpers/formatters/index.d.ts.map +1 -1
  212. package/lib/components/helpers/formatters/index.js.map +1 -1
  213. package/lib/components/helpers/instructions-utils.d.ts.map +1 -1
  214. package/lib/components/helpers/object-utils.d.ts +9 -0
  215. package/lib/components/helpers/object-utils.d.ts.map +1 -0
  216. package/lib/components/helpers/object-utils.js +11 -0
  217. package/lib/components/helpers/object-utils.js.map +1 -0
  218. package/lib/components/helpers/reactContextHelpers.d.ts +0 -1
  219. package/lib/components/helpers/reactContextHelpers.d.ts.map +1 -1
  220. package/lib/components/helpers/simpleTableHelpers.d.ts +15 -1
  221. package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
  222. package/lib/components/helpers/simpleTableHelpers.js +111 -5
  223. package/lib/components/helpers/simpleTableHelpers.js.map +1 -1
  224. package/lib/components/helpers/state-utils.d.ts.map +1 -1
  225. package/lib/components/helpers/state-utils.js.map +1 -1
  226. package/lib/components/helpers/template-utils.js.map +1 -1
  227. package/lib/components/helpers/utils.d.ts +1 -0
  228. package/lib/components/helpers/utils.d.ts.map +1 -1
  229. package/lib/components/helpers/utils.js +7 -1
  230. package/lib/components/helpers/utils.js.map +1 -1
  231. package/lib/components/helpers/versionHelpers.d.ts.map +1 -1
  232. package/lib/components/helpers/versionHelpers.js +0 -1
  233. package/lib/components/helpers/versionHelpers.js.map +1 -1
  234. package/lib/components/infra/ActionButtons/ActionButtons.d.ts.map +1 -1
  235. package/lib/components/infra/ActionButtons/ActionButtons.js +12 -7
  236. package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
  237. package/lib/components/infra/Assignment/Assignment.d.ts +2 -2
  238. package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
  239. package/lib/components/infra/Assignment/Assignment.js +32 -28
  240. package/lib/components/infra/Assignment/Assignment.js.map +1 -1
  241. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +2 -2
  242. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
  243. package/lib/components/infra/AssignmentCard/AssignmentCard.js.map +1 -1
  244. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +1 -2
  245. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
  246. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +15 -79
  247. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
  248. package/lib/components/infra/Containers/FlowContainer/helpers.d.ts.map +1 -1
  249. package/lib/components/infra/Containers/FlowContainer/helpers.js.map +1 -1
  250. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts +1 -1
  251. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts.map +1 -1
  252. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js +0 -1
  253. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js.map +1 -1
  254. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +1 -1
  255. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
  256. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +4 -5
  257. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
  258. package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts +0 -1
  259. package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts.map +1 -1
  260. package/lib/components/infra/Containers/SimpleView/helper.d.ts +0 -1
  261. package/lib/components/infra/Containers/SimpleView/helper.d.ts.map +1 -1
  262. package/lib/components/infra/Containers/SimpleView/helper.js.map +1 -1
  263. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +1 -1
  264. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
  265. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +3 -4
  266. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
  267. package/lib/components/infra/Containers/container-helpers.d.ts +1 -0
  268. package/lib/components/infra/Containers/container-helpers.d.ts.map +1 -1
  269. package/lib/components/infra/Containers/container-helpers.js +46 -1
  270. package/lib/components/infra/Containers/container-helpers.js.map +1 -1
  271. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +2 -2
  272. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
  273. package/lib/components/infra/DashboardFilter/DashboardFilter.js +1 -4
  274. package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
  275. package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -1
  276. package/lib/components/infra/DashboardFilter/filterUtils.js +2 -3
  277. package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
  278. package/lib/components/infra/DeferLoad/DeferLoad.d.ts +1 -1
  279. package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
  280. package/lib/components/infra/DeferLoad/DeferLoad.js +2 -4
  281. package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
  282. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +1 -1
  283. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
  284. package/lib/components/infra/ErrorBoundary/ErrorBoundary.js +0 -2
  285. package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
  286. package/lib/components/infra/MultiStep/MultiStep.css +48 -70
  287. package/lib/components/infra/MultiStep/MultiStep.d.ts +2 -2
  288. package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
  289. package/lib/components/infra/MultiStep/MultiStep.js +19 -37
  290. package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
  291. package/lib/components/infra/NavBar/NavBar.css +1 -1
  292. package/lib/components/infra/NavBar/NavBar.d.ts +1 -1
  293. package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
  294. package/lib/components/infra/NavBar/NavBar.js +13 -7
  295. package/lib/components/infra/NavBar/NavBar.js.map +1 -1
  296. package/lib/components/infra/Reference/Reference.d.ts +1 -1
  297. package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
  298. package/lib/components/infra/Reference/Reference.js +2 -3
  299. package/lib/components/infra/Reference/Reference.js.map +1 -1
  300. package/lib/components/infra/Region/Region.d.ts +1 -1
  301. package/lib/components/infra/Region/Region.d.ts.map +1 -1
  302. package/lib/components/infra/Region/Region.js.map +1 -1
  303. package/lib/components/infra/RootContainer/RootContainer.d.ts +2 -2
  304. package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
  305. package/lib/components/infra/RootContainer/RootContainer.js +0 -1
  306. package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
  307. package/lib/components/infra/Stages/Stages.d.ts +1 -1
  308. package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
  309. package/lib/components/infra/Stages/Stages.js +2 -2
  310. package/lib/components/infra/Stages/Stages.js.map +1 -1
  311. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +1 -1
  312. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
  313. package/lib/components/infra/View/View.d.ts +2 -2
  314. package/lib/components/infra/View/View.d.ts.map +1 -1
  315. package/lib/components/infra/View/View.js +2 -1
  316. package/lib/components/infra/View/View.js.map +1 -1
  317. package/lib/components/template/AdvancedSearch/AdvancedSearch.d.ts +2 -0
  318. package/lib/components/template/AdvancedSearch/AdvancedSearch.d.ts.map +1 -0
  319. package/lib/components/template/AdvancedSearch/AdvancedSearch.js +68 -0
  320. package/lib/components/template/AdvancedSearch/AdvancedSearch.js.map +1 -0
  321. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.d.ts +23 -0
  322. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.d.ts.map +1 -0
  323. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.js +26 -0
  324. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.js.map +1 -0
  325. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.d.ts +3 -0
  326. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.d.ts.map +1 -0
  327. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.js +179 -0
  328. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.js.map +1 -0
  329. package/lib/components/template/AdvancedSearch/SearchGroups/hooks.d.ts +10 -0
  330. package/lib/components/template/AdvancedSearch/SearchGroups/hooks.d.ts.map +1 -0
  331. package/lib/components/template/AdvancedSearch/SearchGroups/hooks.js +25 -0
  332. package/lib/components/template/AdvancedSearch/SearchGroups/hooks.js.map +1 -0
  333. package/lib/components/template/AdvancedSearch/SearchGroups/index.d.ts +2 -0
  334. package/lib/components/template/AdvancedSearch/SearchGroups/index.d.ts.map +1 -0
  335. package/lib/components/template/AdvancedSearch/SearchGroups/index.js +2 -0
  336. package/lib/components/template/AdvancedSearch/SearchGroups/index.js.map +1 -0
  337. package/lib/components/template/AdvancedSearch/SearchGroups/utils.d.ts +16 -0
  338. package/lib/components/template/AdvancedSearch/SearchGroups/utils.d.ts.map +1 -0
  339. package/lib/components/template/AdvancedSearch/SearchGroups/utils.js +22 -0
  340. package/lib/components/template/AdvancedSearch/SearchGroups/utils.js.map +1 -0
  341. package/lib/components/template/AdvancedSearch/TemplateContext.d.ts +10 -0
  342. package/lib/components/template/AdvancedSearch/TemplateContext.d.ts.map +1 -0
  343. package/lib/components/template/AdvancedSearch/TemplateContext.js +11 -0
  344. package/lib/components/template/AdvancedSearch/TemplateContext.js.map +1 -0
  345. package/lib/components/template/AdvancedSearch/index.d.ts +2 -0
  346. package/lib/components/template/AdvancedSearch/index.d.ts.map +1 -0
  347. package/lib/components/template/AdvancedSearch/index.js +2 -0
  348. package/lib/components/template/AdvancedSearch/index.js.map +1 -0
  349. package/lib/components/template/AppShell/AppShell.css +1 -1
  350. package/lib/components/template/AppShell/AppShell.d.ts +2 -2
  351. package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
  352. package/lib/components/template/AppShell/AppShell.js +10 -13
  353. package/lib/components/template/AppShell/AppShell.js.map +1 -1
  354. package/lib/components/template/BannerPage/BannerPage.d.ts +2 -2
  355. package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
  356. package/lib/components/template/BannerPage/BannerPage.js.map +1 -1
  357. package/lib/components/template/CaseSummary/CaseSummary.d.ts +4 -2
  358. package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
  359. package/lib/components/template/CaseSummary/CaseSummary.js +24 -37
  360. package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
  361. package/lib/components/template/CaseView/CaseView.d.ts +2 -2
  362. package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
  363. package/lib/components/template/CaseView/CaseView.js +13 -15
  364. package/lib/components/template/CaseView/CaseView.js.map +1 -1
  365. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +1 -1
  366. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
  367. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +1 -1
  368. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
  369. package/lib/components/template/Confirmation/Confirmation.d.ts +2 -2
  370. package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
  371. package/lib/components/template/Confirmation/Confirmation.js +0 -1
  372. package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
  373. package/lib/components/template/DataReference/DataReference.d.ts +9 -2
  374. package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
  375. package/lib/components/template/DataReference/DataReference.js +239 -80
  376. package/lib/components/template/DataReference/DataReference.js.map +1 -1
  377. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.d.ts +8 -0
  378. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.d.ts.map +1 -0
  379. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.js +9 -0
  380. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.js.map +1 -0
  381. package/lib/components/template/DataReference/SearchForm.d.ts +3 -0
  382. package/lib/components/template/DataReference/SearchForm.d.ts.map +1 -0
  383. package/lib/components/template/DataReference/SearchForm.js +87 -0
  384. package/lib/components/template/DataReference/SearchForm.js.map +1 -0
  385. package/lib/components/template/DataReference/utils.d.ts +15 -0
  386. package/lib/components/template/DataReference/utils.d.ts.map +1 -0
  387. package/lib/components/template/DataReference/utils.js +75 -0
  388. package/lib/components/template/DataReference/utils.js.map +1 -0
  389. package/lib/components/template/DefaultForm/DefaultForm.d.ts +2 -2
  390. package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
  391. package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
  392. package/lib/components/template/DefaultForm/utils/index.d.ts.map +1 -1
  393. package/lib/components/template/DefaultForm/utils/index.js +1 -2
  394. package/lib/components/template/DefaultForm/utils/index.js.map +1 -1
  395. package/lib/components/template/DefaultPage/DefaultPage.d.ts +36 -0
  396. package/lib/components/template/DefaultPage/DefaultPage.d.ts.map +1 -0
  397. package/lib/components/template/DefaultPage/DefaultPage.js +28 -0
  398. package/lib/components/template/DefaultPage/DefaultPage.js.map +1 -0
  399. package/lib/components/template/DefaultPage/index.d.ts +2 -0
  400. package/lib/components/template/DefaultPage/index.d.ts.map +1 -0
  401. package/lib/components/template/DefaultPage/index.js +2 -0
  402. package/lib/components/template/DefaultPage/index.js.map +1 -0
  403. package/lib/components/template/Details/Details/Details.d.ts +1 -1
  404. package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
  405. package/lib/components/template/Details/Details/Details.js +2 -3
  406. package/lib/components/template/Details/Details/Details.js.map +1 -1
  407. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +2 -2
  408. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
  409. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
  410. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +1 -1
  411. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
  412. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +2 -3
  413. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
  414. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +1 -1
  415. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
  416. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +2 -3
  417. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
  418. package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts +1 -1
  419. package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts.map +1 -1
  420. package/lib/components/template/Details/DynamicTabs/DynamicTabs.js.map +1 -1
  421. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +1 -1
  422. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
  423. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +1 -2
  424. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
  425. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +2 -2
  426. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
  427. package/lib/components/template/InlineDashboard/InlineDashboard.js +2 -2
  428. package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
  429. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +2 -2
  430. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
  431. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js.map +1 -1
  432. package/lib/components/template/ListPage/ListPage.d.ts +1 -1
  433. package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
  434. package/lib/components/template/ListPage/ListPage.js.map +1 -1
  435. package/lib/components/template/ListView/DefaultViewMeta.js.map +1 -1
  436. package/lib/components/template/ListView/ListView.d.ts +4 -1
  437. package/lib/components/template/ListView/ListView.d.ts.map +1 -1
  438. package/lib/components/template/ListView/ListView.js +133 -64
  439. package/lib/components/template/ListView/ListView.js.map +1 -1
  440. package/lib/components/template/ListView/hooks.d.ts.map +1 -1
  441. package/lib/components/template/ListView/hooks.js +2 -5
  442. package/lib/components/template/ListView/hooks.js.map +1 -1
  443. package/lib/components/template/ListView/utils.d.ts.map +1 -1
  444. package/lib/components/template/ListView/utils.js +28 -5
  445. package/lib/components/template/ListView/utils.js.map +1 -1
  446. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +1 -1
  447. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
  448. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -1
  449. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +2 -2
  450. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -1
  451. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js.map +1 -1
  452. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +1 -1
  453. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
  454. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +2 -3
  455. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
  456. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +2 -2
  457. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -1
  458. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js.map +1 -1
  459. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +2 -2
  460. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
  461. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -1
  462. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +2 -2
  463. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
  464. package/lib/components/template/OneColumn/OneColumn/OneColumn.js +2 -2
  465. package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
  466. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +1 -1
  467. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
  468. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -1
  469. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +2 -2
  470. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
  471. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js.map +1 -1
  472. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +1 -1
  473. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
  474. package/lib/components/template/PromotedFilters/PromotedFilters.js +0 -1
  475. package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
  476. package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.d.ts +2 -0
  477. package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.d.ts.map +1 -0
  478. package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.js +73 -0
  479. package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.js.map +1 -0
  480. package/lib/components/template/SelfServiceCaseView/index.d.ts +2 -0
  481. package/lib/components/template/SelfServiceCaseView/index.d.ts.map +1 -0
  482. package/lib/components/template/SelfServiceCaseView/index.js +2 -0
  483. package/lib/components/template/SelfServiceCaseView/index.js.map +1 -0
  484. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts +1 -1
  485. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
  486. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js +1 -2
  487. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
  488. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +2 -2
  489. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
  490. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +34 -32
  491. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
  492. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +1 -1
  493. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
  494. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
  495. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +1 -1
  496. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
  497. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js +3 -2
  498. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
  499. package/lib/components/template/SubTabs/SubTabs.d.ts +2 -2
  500. package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
  501. package/lib/components/template/SubTabs/SubTabs.js.map +1 -1
  502. package/lib/components/template/SubTabs/tabUtils.d.ts +10 -0
  503. package/lib/components/template/SubTabs/tabUtils.d.ts.map +1 -1
  504. package/lib/components/template/SubTabs/tabUtils.js +102 -1
  505. package/lib/components/template/SubTabs/tabUtils.js.map +1 -1
  506. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts +2 -2
  507. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
  508. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +2 -3
  509. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
  510. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +1 -1
  511. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
  512. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -1
  513. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +2 -2
  514. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
  515. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +2 -3
  516. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
  517. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +2 -2
  518. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
  519. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js.map +1 -1
  520. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +1 -1
  521. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
  522. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +2 -3
  523. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
  524. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +2 -2
  525. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -1
  526. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js.map +1 -1
  527. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +2 -2
  528. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
  529. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js.map +1 -1
  530. package/lib/components/template/WssNavBar/WssNavBar.css +1 -1
  531. package/lib/components/template/WssNavBar/WssNavBar.d.ts +1 -1
  532. package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -1
  533. package/lib/components/template/WssNavBar/WssNavBar.js +4 -4
  534. package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
  535. package/lib/components/template/utils.d.ts +7 -0
  536. package/lib/components/template/utils.d.ts.map +1 -0
  537. package/lib/components/template/utils.js +52 -0
  538. package/lib/components/template/utils.js.map +1 -0
  539. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts +1 -1
  540. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
  541. package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
  542. package/lib/components/widget/Attachment/Attachment.css +6 -8
  543. package/lib/components/widget/Attachment/Attachment.d.ts +4 -2
  544. package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
  545. package/lib/components/widget/Attachment/Attachment.js +255 -202
  546. package/lib/components/widget/Attachment/Attachment.js.map +1 -1
  547. package/lib/components/widget/Attachment/Attachment.types.d.ts +90 -0
  548. package/lib/components/widget/Attachment/Attachment.types.d.ts.map +1 -0
  549. package/lib/components/widget/Attachment/Attachment.types.js +2 -0
  550. package/lib/components/widget/Attachment/Attachment.types.js.map +1 -0
  551. package/lib/components/widget/Attachment/AttachmentUtils.d.ts +25 -0
  552. package/lib/components/widget/Attachment/AttachmentUtils.d.ts.map +1 -0
  553. package/lib/components/widget/Attachment/AttachmentUtils.js +255 -0
  554. package/lib/components/widget/Attachment/AttachmentUtils.js.map +1 -0
  555. package/lib/components/widget/CaseHistory/CaseHistory.d.ts +1 -1
  556. package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
  557. package/lib/components/widget/CaseHistory/CaseHistory.js +2 -2
  558. package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
  559. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.css +0 -14
  560. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +1 -1
  561. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts.map +1 -1
  562. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js +1 -1
  563. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
  564. package/lib/components/widget/FileUtility/FileUtility/FileUtility.css +7 -6
  565. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +2 -1
  566. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
  567. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +29 -17
  568. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
  569. package/lib/components/widget/Followers/Followers.d.ts +2 -2
  570. package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
  571. package/lib/components/widget/Followers/Followers.js +0 -2
  572. package/lib/components/widget/Followers/Followers.js.map +1 -1
  573. package/lib/components/widget/QuickCreate/QuickCreate.d.ts +1 -1
  574. package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
  575. package/lib/components/widget/QuickCreate/QuickCreate.js +0 -1
  576. package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
  577. package/lib/components/widget/SummaryItem/SummaryItem.css +9 -11
  578. package/lib/components/widget/SummaryItem/SummaryItem.d.ts +1 -1
  579. package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
  580. package/lib/components/widget/SummaryItem/SummaryItem.js +1 -1
  581. package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
  582. package/lib/components/widget/SummaryList/SummaryList.d.ts +1 -1
  583. package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
  584. package/lib/components/widget/SummaryList/SummaryList.js.map +1 -1
  585. package/lib/components/widget/ToDo/ToDo.css +1 -13
  586. package/lib/components/widget/ToDo/ToDo.d.ts +1 -1
  587. package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
  588. package/lib/components/widget/ToDo/ToDo.js +21 -16
  589. package/lib/components/widget/ToDo/ToDo.js.map +1 -1
  590. package/lib/hooks/useAfterInitialEffect.d.ts +1 -1
  591. package/lib/hooks/useAfterInitialEffect.d.ts.map +1 -1
  592. package/lib/hooks/useAfterInitialEffect.js.map +1 -1
  593. package/lib/hooks/useConsolidatedRef.d.ts +1 -1
  594. package/lib/hooks/useConsolidatedRef.d.ts.map +1 -1
  595. package/lib/hooks/useConsolidatedRef.js.map +1 -1
  596. package/lib/hooks/useFocusFirstField.d.ts.map +1 -1
  597. package/lib/hooks/useFocusFirstField.js.map +1 -1
  598. package/lib/hooks/useGetTabsCount.d.ts +10 -0
  599. package/lib/hooks/useGetTabsCount.d.ts.map +1 -0
  600. package/lib/hooks/useGetTabsCount.js +165 -0
  601. package/lib/hooks/useGetTabsCount.js.map +1 -0
  602. package/lib/hooks/useIsMount.d.ts +2 -0
  603. package/lib/hooks/useIsMount.d.ts.map +1 -0
  604. package/lib/hooks/useIsMount.js +9 -0
  605. package/lib/hooks/useIsMount.js.map +1 -0
  606. package/lib/hooks/useScrolltoTop.d.ts.map +1 -1
  607. package/lib/mediaco/ToDo/ToDo.css +81 -0
  608. package/lib/mediaco/ToDo/ToDo.d.ts +16 -0
  609. package/lib/mediaco/ToDo/ToDo.d.ts.map +1 -0
  610. package/lib/mediaco/ToDo/ToDo.js +187 -0
  611. package/lib/mediaco/ToDo/ToDo.js.map +1 -0
  612. package/lib/mediaco/ToDo/index.d.ts +2 -0
  613. package/lib/mediaco/ToDo/index.d.ts.map +1 -0
  614. package/lib/mediaco/ToDo/index.js +2 -0
  615. package/lib/mediaco/ToDo/index.js.map +1 -0
  616. package/lib/samples/Embedded/styles.css +26 -0
  617. package/lib/sdk-pega-component-map.d.ts +119 -103
  618. package/lib/sdk-pega-component-map.d.ts.map +1 -1
  619. package/lib/sdk-pega-component-map.js +20 -3
  620. package/lib/sdk-pega-component-map.js.map +1 -1
  621. package/lib/theme.d.ts +30 -1
  622. package/lib/theme.d.ts.map +1 -1
  623. package/lib/theme.js +209 -2
  624. package/lib/theme.js.map +1 -1
  625. package/lib/types/PConnProps.d.ts +1 -1
  626. package/package.json +32 -1
  627. package/lib/components/helpers/attachmentHelpers.d.ts +0 -13
  628. package/lib/components/helpers/attachmentHelpers.d.ts.map +0 -1
  629. package/lib/components/helpers/attachmentHelpers.js +0 -72
  630. package/lib/components/helpers/attachmentHelpers.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"DataReference.js","sourceRoot":"","sources":["../../../../src/components/template/DataReference/DataReference.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAmC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAkBhF,MAAM,cAAc,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AAE5D,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAA4C;IAChF,8EAA8E;IAC9E,MAAM,uBAAuB,GAAG,mBAAmB,CAAC,yBAAyB,CAAC,CAAC;IAC/E,MAAM,sBAAsB,GAAG,mBAAmB,CAAC,wBAAwB,CAAC,CAAC;IAE7E,MAAM,EACJ,QAAQ,EACR,WAAW,EACX,KAAK,EACL,SAAS,EACT,WAAW,EACX,kCAAkC,EAClC,aAAa,EACb,aAAa,EACb,SAAS,EACT,SAAS,EACT,UAAU,EACV,SAAS,EACV,GAAG,KAAK,CAAC;IACV,IAAI,gBAAgB,GAAG,QAA0B,CAAC;IAClD,MAAM,KAAK,GAAG,WAAW,EAAE,CAAC;IAC5B,MAAM,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IACnE,MAAM,UAAU,GAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC,iBAAiB,EAAE,EAAE,CAAC;IAC3E,IAAI,UAAU,CAAC,SAAS,KAAK,KAAK,EAAE;QAClC,UAAU,CAAC,KAAK,GAAG,EAAE,CAAC;KACvB;IACD,MAAM,eAAe,GAAQ,KAAK,CAAC,cAAc,EAAE,CAAC;IACpD,MAAM,QAAQ,GAAG,eAAe,CAAC,IAAI,CAAC;IACtC,MAAM,CAAC,cAAc,CAAC,GAAG,eAAe,CAAC,QAAQ,CAAC;IAClD,MAAM,OAAO,G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ACH,CAAC,EAAE,CAAC,cAAc,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,kBAAkB,EAAE,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;IAE1H,kEAAkE;IAClE,IAAI,cAAc,EAAE,IAAI,KAAK,QAAQ,EAAE;QACrC,MAAM,WAAW,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QAChD,IAAI,WAAW,EAAE,IAAI,KAAK,OAAO,IAAI,WAAW,CAAC,QAAQ,CAAC,MAAM,EAAE;YAChE,gBAAgB,GAAG,CAAC,mBAAmB,EAAE,GAAI,QAA2B,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;SACpF;aAAM;YACL,gBAAgB,GAAG,CAAC,mBAAmB,CAAC,CAAC;SAC1C;KACF;IAED,OAAO,gBAAgB,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CACrC,CAAC,gBAAgB,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAC9B,CAAC,CAAC,CAAC,CACF,wBACG,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAC7B,4BAAG,KAAK,GAAI,CACb,CAAC,GACE,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { PropsWithChildren, ReactElement, useEffect, useMemo, useState } from 'react';\n\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { PConnProps } from '../../../types/PConnProps';\n\n// ReferenceProps can't be used until getComponentConfig() is NOT private\ninterface DataReferenceProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n label: string;\n showLabel: any;\n displayMode: string;\n allowAndPersistChangesInReviewMode: boolean;\n referenceType: string;\n selectionMode: string;\n displayAs: string;\n ruleClass: string;\n parameters: string[]; // need to fix\n hideLabel: boolean;\n}\n\nconst SELECTION_MODE = { SINGLE: 'single', MULTI: 'multi' };\n\nexport default function DataReference(props: PropsWithChildren<DataReferenceProps>) {\n // Get emitted components from map (so we can get any override that may exist)\n const SingleReferenceReadonly = getComponentFromMap('SingleReferenceReadOnly');\n const MultiReferenceReadonly = getComponentFromMap('MultiReferenceReadOnly');\n\n const {\n children,\n getPConnect,\n label,\n showLabel,\n displayMode,\n allowAndPersistChangesInReviewMode,\n referenceType,\n selectionMode,\n displayAs,\n ruleClass,\n parameters,\n hideLabel\n } = props;\n let childrenToRender = children as ReactElement[];\n const pConn = getPConnect();\n const [dropDownDataSource, setDropDownDataSource] = useState(null);\n const propsToUse: any = { label, showLabel, ...pConn.getInheritedProps() };\n if (propsToUse.showLabel === false) {\n propsToUse.label = '';\n }\n const rawViewMetadata: any = pConn.getRawMetadata();\n const viewName = rawViewMetadata.name;\n const [firstChildMeta] = rawViewMetadata.children;\n const refList = rawViewMetadata.config.referenceList;\n const canBeChangedInReviewMode = allowAndPersistChangesInReviewMode && (displayAs === 'autocomplete' || displayAs === 'dropdown');\n let propName;\n const isDisplayModeEnabled = ['STACKED_LARGE_VAL', 'DISPLAY_ONLY'].includes(displayMode);\n let firstChildPConnect;\n\n /* Only for dropdown when it has param use data api to get the data back and add it to datasource */\n useEffect(() => {\n if (firstChildMeta?.type === 'Dropdown' && rawViewMetadata.config?.parameters) {\n const { value, key, text } = firstChildMeta.config.datasource.fields;\n (\n PCore.getDataApiUtils().getData(\n refList,\n {\n dataViewParameters: parameters\n } as any,\n ''\n ) as Promise<any>\n )\n .then(res => {\n if (res.data.data !== null) {\n const ddDataSource = res.data.data\n .map(listItem => ({\n key: listItem[key.split(' .', 2)[1]],\n text: listItem[text.split(' .', 2)[1]],\n value: listItem[value.split(' .', 2)[1]]\n }))\n .filter(item => item.key);\n // Filtering out undefined entries that will break preview\n setDropDownDataSource(ddDataSource);\n } else {\n const ddDataSource: any = [];\n setDropDownDataSource(ddDataSource);\n }\n })\n .catch(err => {\n // eslint-disable-next-line no-console\n console.error(err?.stack);\n return Promise.resolve({\n data: { data: [] }\n });\n });\n }\n }, [firstChildMeta, rawViewMetadata, parameters]);\n\n if (firstChildMeta?.type !== 'Region') {\n firstChildPConnect = getPConnect().getChildren()?.[0].getPConnect;\n /* remove refresh When condition from those old view so that it will not be used for runtime */\n if (firstChildMeta.config?.readOnly) {\n delete firstChildMeta.config.readOnly;\n }\n if (firstChildMeta?.type === 'Dropdown') {\n firstChildMeta.config.datasource.source = rawViewMetadata.config?.parameters\n ? dropDownDataSource\n : '@DATASOURCE '.concat(refList).concat('.pxResults');\n } else if (firstChildMeta?.type === 'AutoComplete') {\n firstChildMeta.config.datasource = refList;\n\n /* Insert the parameters to the component only if present */\n if (rawViewMetadata.config?.parameters) {\n firstChildMeta.config.parameters = parameters;\n }\n }\n // set displayMode conditionally\n if (!canBeChangedInReviewMode) {\n firstChildMeta.config.displayMode = displayMode;\n }\n if (firstChildMeta.type === 'SimpleTableSelect' && selectionMode === SELECTION_MODE.MULTI) {\n propName = PCore.getAnnotationUtils().getPropertyName(firstChildMeta.config.selectionList);\n } else {\n propName = PCore.getAnnotationUtils().getPropertyName(firstChildMeta.config.value);\n }\n }\n\n const handleSelection = event => {\n const caseKey = pConn.getCaseInfo().getKey();\n const refreshOptions = { autoDetectRefresh: true };\n if (canBeChangedInReviewMode && pConn.getValue('__currentPageTabViewName', '')) {\n // 2nd arg empty string until typedef marked correctly\n getPConnect().getActionsApi().refreshCaseView(caseKey, pConn.getValue('__currentPageTabViewName', ''), '', refreshOptions); // 2nd arg empty string until typedef marked correctly\n PCore.getDeferLoadManager().refreshActiveComponents(pConn.getContextName());\n } else {\n const pgRef = pConn.getPageReference().replace('caseInfo.content', '');\n getPConnect().getActionsApi().refreshCaseView(caseKey, viewName, pgRef, refreshOptions);\n }\n\n // AutoComplete sets value on event.id whereas Dropdown sets it on event.target.value\n const propValue = event?.id || event?.target.value;\n if (propValue && canBeChangedInReviewMode && isDisplayModeEnabled) {\n (PCore.getDataApiUtils().getCaseEditLock(caseKey, '') as Promise<any>).then(caseResponse => {\n const pageTokens = pConn.getPageReference().replace('caseInfo.content', '').split('.');\n let curr = {};\n const commitData = curr;\n\n pageTokens.forEach(el => {\n if (el !== '') {\n curr[el] = {};\n curr = curr[el];\n }\n });\n\n // expecting format like {Customer: {pyID:\"C-100\"}}\n const propArr = propName.split('.');\n propArr.forEach((element, idx) => {\n if (idx + 1 === propArr.length) {\n curr[element] = propValue;\n } else {\n curr[element] = {};\n curr = curr[element];\n }\n });\n\n (\n PCore.getDataApiUtils().updateCaseEditFieldsData(\n caseKey,\n { [caseKey]: commitData },\n caseResponse.headers.etag,\n pConn.getContextName()\n ) as Promise<any>\n ).then(response => {\n PCore.getContainerUtils().updateParentLastUpdateTime(pConn.getContextName(), response.data.data.caseInfo.lastUpdateTime);\n PCore.getContainerUtils().updateRelatedContextEtag(pConn.getContextName(), response.headers.etag);\n });\n });\n }\n };\n\n // Re-create first child with overridden props\n // Memoized child in order to stop unmount and remount of the child component when data reference\n // rerenders without any actual change\n const recreatedFirstChild = useMemo(() => {\n const { type, config } = firstChildMeta;\n if (firstChildMeta?.type !== 'Region') {\n pConn.clearErrorMessages({\n // Need to add empty string for category and context to match typdef\n property: propName,\n category: '',\n context: ''\n });\n if (!canBeChangedInReviewMode && isDisplayModeEnabled && selectionMode === SELECTION_MODE.SINGLE) {\n return (\n <SingleReferenceReadonly\n config={config}\n getPConnect={firstChildPConnect}\n label={propsToUse.label}\n type={type}\n displayAs={displayAs}\n displayMode={displayMode}\n ruleClass={ruleClass}\n referenceType={referenceType}\n hideLabel={hideLabel}\n dataRelationshipContext={rawViewMetadata.config.contextClass && rawViewMetadata.config.name ? rawViewMetadata.config.name : null}\n />\n );\n }\n\n if (isDisplayModeEnabled && selectionMode === SELECTION_MODE.MULTI) {\n return <MultiReferenceReadonly config={config} getPConnect={firstChildPConnect} label={propsToUse.label} hideLabel={hideLabel} />;\n }\n\n // In the case of a datasource with parameters you cannot load the dropdown before the parameters\n if (type === 'Dropdown' && rawViewMetadata.config?.parameters && dropDownDataSource === null) {\n return null;\n }\n\n return firstChildPConnect().createComponent(\n {\n type,\n config: {\n ...config,\n required: propsToUse.required,\n visibility: propsToUse.visibility,\n disabled: propsToUse.disabled,\n label: propsToUse.label,\n viewName: getPConnect().getCurrentView(),\n parameters: rawViewMetadata.config.parameters,\n readOnly: false,\n localeReference: rawViewMetadata.config.localeReference,\n ...(selectionMode === SELECTION_MODE.SINGLE ? { referenceType } : ''),\n dataRelationshipContext: rawViewMetadata.config.contextClass && rawViewMetadata.config.name ? rawViewMetadata.config.name : null,\n hideLabel,\n onRecordChange: handleSelection\n }\n },\n '',\n '',\n {}\n ); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional);\n }\n }, [firstChildMeta.config?.datasource?.source, parameters, dropDownDataSource, propsToUse.required, propsToUse.disabled]);\n\n // Only include the views region for rendering when it has content\n if (firstChildMeta?.type !== 'Region') {\n const viewsRegion = rawViewMetadata.children[1];\n if (viewsRegion?.name === 'Views' && viewsRegion.children.length) {\n childrenToRender = [recreatedFirstChild, ...(children as ReactElement[]).slice(1)];\n } else {\n childrenToRender = [recreatedFirstChild];\n }\n }\n\n return childrenToRender.length === 1 ? (\n (childrenToRender[0] ?? null)\n ) : (\n <div>\n {childrenToRender.map(child => (\n <>{child}</>\n ))}\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"DataReference.js","sourceRoot":"","sources":["../../../../src/components/template/DataReference/DataReference.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAA6C,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEvG,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,OAAO,UAAU,MAAM,2BAA2B,CAAC;AACnD,OAAO,0BAA0B,MAAM,4CAA4C,CAAC;AACpF,OAAO,kCAAkC,MAAM,sCAAsC,CAAC;AACtF,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,S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AAE,CAAC;QACtC,MAAM,WAAW,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QAChD,IAAI,WAAW,EAAE,IAAI,KAAK,OAAO,IAAI,WAAW,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;YACjE,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;gBAC/B,KAAK,CAAC,MAAM,CAAC,yBAAyB,GAAG,IAAI,CAAC;gBAC9C,OAAO,KAAK,CAAC;YACf,CAAC,CAAC,CAAC;YACH,gBAAgB,GAAG,CAAC,mBAAmB,EAAE,GAAI,QAA2B,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACrF,CAAC;aAAM,CAAC;YACN,gBAAgB,GAAG,CAAC,mBAAmB,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC;SAAM,IAAI,SAAS,KAAK,gBAAgB,EAAE,CAAC;QAC1C,gBAAgB,GAAG,CAAC,mBAAmB,CAAC,CAAC;IAC3C,CAAC;IAED,OAAO,gBAAgB,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CACrC,CAAC,gBAAgB,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAC9B,CAAC,CAAC,CAAC,CACF,wBACG,gBAAgB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CACtC,KAAC,KAAK,CAAC,QAAQ,cAAc,KAAK,IAAb,KAAK,CAA0B,CACrD,CAAC,GACE,CACP,CAAC;AACJ,CAAC","sourcesContent":["import React, { type PropsWithChildren, type ReactElement, useEffect, useMemo, useState } from 'react';\n\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport type { PConnProps } from '../../../types/PConnProps';\nimport useIsMount from '../../../hooks/useIsMount';\nimport componentCachePersistUtils from '../AdvancedSearch/SearchGroup/persistUtils';\nimport DataReferenceAdvancedSearchContext from './DataReferenceAdvancedSearchContext';\nimport { Utils } from '../../helpers/utils';\nimport { getFirstChildConfig } from './utils';\n\n// ReferenceProps can't be used until getComponentConfig() is NOT private\ninterface DataReferenceProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n label: string;\n showLabel: any;\n displayMode: string;\n allowAndPersistChangesInReviewMode: boolean;\n referenceType: string;\n selectionMode: string;\n displayAs: string;\n ruleClass: string;\n parameters: string[]; // need to fix\n hideLabel: boolean;\n imagePosition: string;\n showImageDescription: string;\n showPromotedFilters: boolean;\n isCreationOfNewRecordAllowedForReference: boolean;\n contextClass: string;\n inline: any;\n selectionList: any;\n}\n\nconst SELECTION_MODE = { SINGLE: 'single', MULTI: 'multi' };\n\nexport default function DataReference(props: PropsWithChildren<DataReferenceProps>) {\n // Get emitted components from map (so we can get any override that may exist)\n const SingleReferenceReadonly = getComponentFromMap('SingleReferenceReadOnly');\n const MultiReferenceReadonly = getComponentFromMap('MultiReferenceReadOnly');\n const SearchForm = getComponentFromMap('SearchForm');\n const {\n children,\n getPConnect,\n label,\n showLabel,\n displayMode,\n allowAndPersistChangesInReviewMode,\n referenceType,\n selectionMode,\n displayAs,\n ruleClass,\n parameters,\n hideLabel,\n imagePosition,\n showImageDescription,\n showPromotedFilters,\n isCreationOfNewRecordAllowedForReference,\n contextClass,\n inline,\n selectionList\n } = props;\n\n const isMounted = useIsMount();\n let childrenToRender = children as ReactElement[];\n const pConn = getPConnect();\n const [dropDownDataSource, setDropDownDataSource] = useState(null);\n const propsToUse: any = { label, showLabel, ...pConn.getInheritedProps() };\n if (propsToUse.showLabel === false) {\n propsToUse.label = '';\n }\n const rawViewMetadata: any = pConn.getRawMetadata();\n const refFieldMetadata = pConn.getFieldMetadata(rawViewMetadata.config?.authorContext);\n\n const [firstChildMeta] = rawViewMetadata.children;\n const refList = rawViewMetadata.config.referenceList;\n const canBeChangedInReviewMode = allowAndPersistChangesInReviewMode && (displayAs === 'autocomplete' || displayAs === 'dropdown');\n const isDisplayModeEnabled = ['STACKED_LARGE_VAL', 'DISPLAY_ONLY'].includes(displayMode);\n const isDDSourceDeferred =\n (firstChildMeta?.type === 'Dropdown' && selectionMode === SELECTION_MODE.SINGLE && refFieldMetadata?.descriptors) ||\n firstChildMeta.config.deferDatasource;\n const pyID = Utils.getMappedKey('pyID');\n const isInfinity = pyID === 'pyID';\n const { allowImplicitRefresh } = isInfinity\n ? PCore.getFieldDefaultUtils().fieldDefaults.DataReference || {}\n : {\n allowImplicitRefresh: true\n };\n\n let firstChildPConnect;\n\n const localizedPlaceholderOption = placeholder => {\n const localizedDefaultPlaceholder = pConn.getLocalizedValue('select_placeholder_default', '', 'CosmosFields');\n // If we have a placeholder, push that option in the list of items\n if (placeholder === 'Select...' && localizedDefaultPlaceholder !== 'select_placeholder_default') {\n return localizedDefaultPlaceholder;\n }\n return pConn.getLocalizedValue(placeholder);\n };\n\n if (['Dropdown', 'AutoComplete'].includes(firstChildMeta?.type)) {\n firstChildMeta.config.placeholder = localizedPlaceholderOption(firstChildMeta.config.placeholder);\n }\n\n if (['Checkbox', 'RadioButtons'].includes(firstChildMeta?.type) && firstChildMeta.config.variant === 'card') {\n firstChildMeta.config.imagePosition = imagePosition;\n firstChildMeta.config.showImageDescription = showImageDescription;\n }\n\n /* Only for dropdown when it has param use data api to get the data back and add it to datasource */\n useEffect(() => {\n if (rawViewMetadata.config?.parameters && !isDDSourceDeferred && ['Checkbox', 'Dropdown', 'RadioButtons'].includes(firstChildMeta?.type)) {\n const { value, key, text } = firstChildMeta.config.datasource.fields;\n if (firstChildMeta.config.variant !== 'card' || (firstChildMeta.config.variant === 'card' && !isMounted)) {\n (\n PCore.getDataApiUtils().getData(\n refList,\n {\n dataViewParameters: parameters\n } as any,\n ''\n ) as Promise<any>\n )\n .then(res => {\n if (res.data.data !== null) {\n const ddDataSource = firstChildMeta.config.datasource.filterDownloadedFields\n ? res.data.data\n : res.data.data\n .map(listItem => ({\n key: listItem[key.split(' .', 2)[1]],\n text: listItem[text.split(' .', 2)[1]],\n value: listItem[value.split(' .', 2)[1]]\n }))\n .filter(item => item.key);\n // Filtering out undefined entries that will break preview\n setDropDownDataSource(ddDataSource);\n } else {\n const ddDataSource: any = [];\n setDropDownDataSource(ddDataSource);\n }\n })\n .catch(err => {\n console.error(err?.stack);\n return Promise.resolve({\n data: { data: [] }\n });\n });\n }\n }\n }, [firstChildMeta, rawViewMetadata, parameters]);\n\n if (firstChildMeta?.type !== 'Region') {\n firstChildPConnect = getPConnect().getChildren()?.[0].getPConnect;\n /* remove refresh When condition from those old view so that it will not be used for runtime */\n if (firstChildMeta.config?.readOnly) {\n delete firstChildMeta.config.readOnly;\n }\n if (firstChildMeta?.type === 'Dropdown') {\n firstChildMeta.config.datasource.source = rawViewMetadata.config?.parameters\n ? dropDownDataSource\n : '@DATASOURCE '.concat(refList).concat('.pxResults');\n } else if (firstChildMeta?.type === 'AutoComplete') {\n firstChildMeta.config.datasource = refList;\n\n /* Insert the parameters to the component only if present */\n if (rawViewMetadata.config?.parameters) {\n firstChildMeta.config.parameters = parameters;\n }\n }\n // set displayMode conditionally\n if (!canBeChangedInReviewMode) {\n firstChildMeta.config.displayMode = displayMode;\n }\n }\n\n const handleSelection = event => {\n const caseKey = pConn.getCaseInfo().getKey();\n const refreshOptions: any = { autoDetectRefresh: true };\n\n const children: any = pConn.getRawMetadata()?.children;\n if (children?.length > 0 && children[0].config?.value) {\n refreshOptions.propertyName = children[0].config.value;\n refreshOptions.classID = (pConn.getRawMetadata() as any).classID;\n }\n\n // AutoComplete sets value on event.id whereas Dropdown sets it on event.target.value if event.id is unset\n // When value is empty propValue will be undefined here and no value will be set for the reference\n const propValue = event?.id || event?.target?.value;\n const propName =\n firstChildMeta.type === 'SimpleTableSelect' && selectionMode === SELECTION_MODE.MULTI\n ? PCore.getAnnotationUtils().getPropertyName(firstChildMeta.config.selectionList)\n : PCore.getAnnotationUtils().getPropertyName(firstChildMeta.config.value);\n\n const hasAssociatedViewConfigured = rawViewMetadata.children[1].children?.length;\n\n if (pConn.getContextName().includes('modal') || pConn.getContextName().includes('workarea')) {\n if (hasAssociatedViewConfigured || allowImplicitRefresh) {\n const pageReference = pConn.getPageReference();\n let pgRef: any = null;\n if (pageReference.startsWith('objectInfo')) {\n pgRef = pageReference.replace('objectInfo.content', '');\n } else {\n pgRef = pageReference.replace('caseInfo.content', '');\n }\n const viewName = rawViewMetadata.name;\n getPConnect()\n .getActionsApi()\n .refreshCaseView(caseKey, viewName, pgRef, refreshOptions)\n .catch(() => {});\n }\n } else if (propValue && canBeChangedInReviewMode && isDisplayModeEnabled) {\n (PCore.getDataApiUtils().getCaseEditLock(caseKey, '') as Promise<any>).then(caseResponse => {\n const pageTokens = pConn.getPageReference().replace('caseInfo.content', '').split('.');\n let curr = {};\n const commitData = curr;\n\n pageTokens.forEach(el => {\n if (el !== '') {\n curr[el] = {};\n curr = curr[el];\n }\n });\n\n // expecting format like {Customer: {pyID:\"C-100\"}}\n const propArr = propName.split('.');\n propArr.forEach((element, idx) => {\n if (idx + 1 === propArr.length) {\n curr[element] = propValue;\n } else {\n curr[element] = {};\n curr = curr[element];\n }\n });\n\n (\n PCore.getDataApiUtils().updateCaseEditFieldsData(\n caseKey,\n { [caseKey]: commitData },\n caseResponse.headers.etag,\n pConn.getContextName()\n ) as Promise<any>\n ).then(response => {\n PCore.getContainerUtils().updateParentLastUpdateTime(pConn.getContextName(), response.data.data.caseInfo.lastUpdateTime);\n PCore.getContainerUtils().updateRelatedContextEtag(pConn.getContextName(), response.headers.etag);\n });\n });\n }\n };\n\n // Re-create first child with overridden props\n // Memoized child in order to stop unmount and remount of the child component when data reference\n // rerenders without any actual change\n const recreatedFirstChild = useMemo(() => {\n const { type, config } = firstChildMeta;\n if (firstChildMeta?.type === 'Region' && displayAs !== 'advancedSearch') {\n return;\n }\n\n if ((displayAs === 'readonly' || isDisplayModeEnabled) && !canBeChangedInReviewMode && selectionMode === SELECTION_MODE.SINGLE) {\n return (\n <SingleReferenceReadonly\n config={config}\n getPConnect={firstChildPConnect}\n label={propsToUse.label}\n type={type}\n displayAs={displayAs}\n displayMode={displayMode}\n ruleClass={ruleClass}\n referenceType={referenceType}\n hideLabel={hideLabel}\n dataRelationshipContext={rawViewMetadata.config.contextClass && rawViewMetadata.config.name ? rawViewMetadata.config.name : null}\n />\n );\n }\n\n if ((['readonly', 'readonlyMulti', 'map'].includes(displayAs) || isDisplayModeEnabled) && selectionMode === SELECTION_MODE.MULTI) {\n return (\n <MultiReferenceReadonly\n config={{\n ...firstChildMeta.config,\n localeReference: rawViewMetadata.config.localeReference\n }}\n getPConnect={firstChildPConnect}\n displayAs={displayAs}\n label={propsToUse.label}\n hideLabel={hideLabel}\n displayMode={displayMode}\n />\n );\n }\n\n /* Editable variants */\n // Datasource w/ parameters cannot load the dropdown before the parameters\n if (type === 'Dropdown' && dropDownDataSource === null && !isDDSourceDeferred && rawViewMetadata.config?.parameters) {\n return null;\n }\n\n if (firstChildMeta.config?.readOnly) {\n delete firstChildMeta.config.readOnly;\n }\n\n // 2) Set datasource\n if (\n ['Dropdown', 'Checkbox', 'RadioButtons'].includes(firstChildMeta?.type) &&\n !firstChildMeta.config.deferDatasource &&\n firstChildMeta.config.datasource\n ) {\n firstChildMeta.config.datasource.source =\n (firstChildMeta.config.variant === 'card' && dropDownDataSource) ||\n (firstChildMeta.config.variant !== 'card' && rawViewMetadata.config?.parameters)\n ? dropDownDataSource\n : '@DATASOURCE '.concat(refList).concat('.pxResults');\n } else if (firstChildMeta?.type === 'AutoComplete') {\n firstChildMeta.config.datasource = refList;\n\n if (rawViewMetadata.config?.parameters) {\n firstChildMeta.config.parameters = parameters;\n }\n }\n\n // 3) Pass through configs\n if (firstChildMeta.config) {\n firstChildMeta.config.showPromotedFilters = showPromotedFilters;\n if (!canBeChangedInReviewMode) {\n firstChildMeta.config.displayMode = displayMode;\n }\n }\n\n // 4) Define field meta\n let fieldMetaData: any = null;\n if (isDDSourceDeferred && !firstChildMeta.config.deferDatasource) {\n fieldMetaData = {\n datasourceMetadata: refFieldMetadata\n };\n if (rawViewMetadata.config?.parameters) {\n fieldMetaData.datasourceMetadata.datasource.parameters = parameters;\n }\n fieldMetaData.datasourceMetadata.datasource.propertyForDisplayText = firstChildMeta?.config?.datasource?.fields?.text.startsWith('@P')\n ? firstChildMeta?.config?.datasource?.fields?.text?.substring(3)\n : firstChildMeta?.config?.datasource?.fields?.text;\n fieldMetaData.datasourceMetadata.datasource.propertyForValue = firstChildMeta?.config?.datasource?.fields?.value.startsWith('@P')\n ? firstChildMeta?.config?.datasource?.fields?.value?.substring(3)\n : firstChildMeta?.config?.datasource?.fields?.value;\n fieldMetaData.datasourceMetadata.datasource.name = rawViewMetadata.config?.referenceList;\n }\n // @ts-expect-error\n const { disableStartingFieldsForReference = false } = PCore.getEnvironmentInfo().environmentInfoObject?.features?.form || {};\n // @ts-expect-error\n let { isCreateNewReferenceEnabled = false } = PCore.getEnvironmentInfo().environmentInfoObject?.features?.form || {};\n\n if (isCreateNewReferenceEnabled) {\n isCreateNewReferenceEnabled = isCreationOfNewRecordAllowedForReference && PCore.getAccessPrivilege().hasCreateAccess(contextClass);\n }\n\n const startingFields: any = {};\n const createNewRecord = () => {\n if (referenceType === 'Case' || firstChildMeta?.config?.referenceType === 'Case') {\n if (!disableStartingFieldsForReference) {\n startingFields.pyAddCaseContextPage = { pyID: pConn.getCaseInfo().getKey()?.split(' ')?.pop() };\n }\n return pConn.getActionsApi().createWork(contextClass, {\n openCaseViewAfterCreate: false,\n startingFields\n });\n }\n if (referenceType === 'Data' || firstChildMeta?.config?.referenceType === 'Data') {\n return getPConnect().getActionsApi().showDataObjectCreateView(contextClass);\n }\n };\n\n const additionalInfo = refFieldMetadata?.additionalInformation\n ? {\n content: refFieldMetadata.additionalInformation\n }\n : undefined;\n\n const dataReferenceConfigToChild = {\n selectionMode,\n additionalInfo,\n descriptors: selectionMode === SELECTION_MODE.SINGLE ? refFieldMetadata?.descriptors : null,\n datasourceMetadata: fieldMetaData?.datasourceMetadata,\n required: propsToUse.required,\n visibility: propsToUse.visibility,\n disabled: propsToUse.disabled,\n label: propsToUse.label,\n displayAs,\n readOnly: false,\n ...(selectionMode === SELECTION_MODE.SINGLE && {\n referenceType\n }),\n ...(selectionMode === SELECTION_MODE.SINGLE &&\n displayAs === 'advancedSearch' && {\n value: rawViewMetadata.config.value,\n contextPage: rawViewMetadata.config.contextPage\n }),\n ...(selectionMode === SELECTION_MODE.MULTI &&\n displayAs === 'advancedSearch' && {\n selectionList,\n readonlyContextList: rawViewMetadata.config.readonlyContextList\n }),\n dataRelationshipContext: rawViewMetadata.config.contextClass && rawViewMetadata.config.name ? rawViewMetadata.config.name : null,\n hideLabel,\n onRecordChange: handleSelection,\n createNewRecord: isCreateNewReferenceEnabled ? createNewRecord : undefined,\n inline\n };\n\n const searchSelectCacheKey = componentCachePersistUtils.getComponentStateKey(getPConnect, rawViewMetadata.config.name);\n\n const dataReferenceAdvancedSearchContext = {\n dataReferenceConfigToChild,\n isCreateNewReferenceEnabled,\n disableStartingFieldsForReference,\n pyID,\n searchSelectCacheKey\n };\n\n if (displayAs === 'advancedSearch') {\n return (\n <DataReferenceAdvancedSearchContext.Provider value={dataReferenceAdvancedSearchContext}>\n <SearchForm getPConnect={getPConnect} searchSelectCacheKey={searchSelectCacheKey}>\n {children}\n </SearchForm>\n </DataReferenceAdvancedSearchContext.Provider>\n );\n }\n\n return firstChildPConnect().createComponent({\n type,\n config: {\n ...getFirstChildConfig({\n firstChildMeta,\n getPConnect,\n rawViewMetadata,\n contextClass,\n dataReferenceConfigToChild,\n isCreateNewReferenceEnabled,\n disableStartingFieldsForReference,\n pyID\n })\n }\n });\n }, [firstChildMeta.config?.datasource?.source, parameters, dropDownDataSource, propsToUse.required, propsToUse.disabled]);\n\n // Only include the views region for rendering when it has content\n if (firstChildMeta?.type !== 'Region') {\n const viewsRegion = rawViewMetadata.children[1];\n if (viewsRegion?.name === 'Views' && viewsRegion.children.length) {\n viewsRegion.children.map(child => {\n child.config.isEmbeddedInDataReference = true;\n return child;\n });\n childrenToRender = [recreatedFirstChild, ...(children as ReactElement[]).slice(1)];\n } else {\n childrenToRender = [recreatedFirstChild];\n }\n } else if (displayAs === 'advancedSearch') {\n childrenToRender = [recreatedFirstChild];\n }\n\n return childrenToRender.length === 1 ? (\n (childrenToRender[0] ?? null)\n ) : (\n <div>\n {childrenToRender.map((child, index) => (\n <React.Fragment key={index}>{child}</React.Fragment>\n ))}\n </div>\n );\n}\n"]}
@@ -0,0 +1,8 @@
1
+ declare const DataReferenceAdvancedSearchContext: import("react").Context<{
2
+ disableStartingFieldsForReference: boolean;
3
+ dataReferenceConfigToChild: {
4
+ selectionMode: string;
5
+ };
6
+ }>;
7
+ export default DataReferenceAdvancedSearchContext;
8
+ //# sourceMappingURL=DataReferenceAdvancedSearchContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataReferenceAdvancedSearchContext.d.ts","sourceRoot":"","sources":["../../../../src/components/template/DataReference/DataReferenceAdvancedSearchContext.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,kCAAkC;;;;;EAKtC,CAAC;AAEH,eAAe,kCAAkC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { createContext } from 'react';
2
+ const DataReferenceAdvancedSearchContext = createContext({
3
+ disableStartingFieldsForReference: true,
4
+ dataReferenceConfigToChild: {
5
+ selectionMode: 'single'
6
+ }
7
+ });
8
+ export default DataReferenceAdvancedSearchContext;
9
+ //# sourceMappingURL=DataReferenceAdvancedSearchContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataReferenceAdvancedSearchContext.js","sourceRoot":"","sources":["../../../../src/components/template/DataReference/DataReferenceAdvancedSearchContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,MAAM,kCAAkC,GAAG,aAAa,CAAC;IACvD,iCAAiC,EAAE,IAAI;IACvC,0BAA0B,EAAE;QAC1B,aAAa,EAAE,QAAQ;KACxB;CACF,CAAC,CAAC;AAEH,eAAe,kCAAkC,CAAC","sourcesContent":["import { createContext } from 'react';\n\nconst DataReferenceAdvancedSearchContext = createContext({\n disableStartingFieldsForReference: true,\n dataReferenceConfigToChild: {\n selectionMode: 'single'\n }\n});\n\nexport default DataReferenceAdvancedSearchContext;\n"]}
@@ -0,0 +1,3 @@
1
+ declare const SearchForm: (props: any) => import("react/jsx-runtime").JSX.Element;
2
+ export default SearchForm;
3
+ //# sourceMappingURL=SearchForm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchForm.d.ts","sourceRoot":"","sources":["../../../../src/components/template/DataReference/SearchForm.tsx"],"names":[],"mappings":"AA0CA,QAAA,MAAM,UAAU,GAAG,UAAK,4CAwGvB,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,87 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from 'react';
3
+ import { Tab, Tabs, Typography, RadioGroup, FormControlLabel, Radio, MenuItem, Box, TextField } from '@mui/material';
4
+ import Grid2 from '@mui/material/Grid2';
5
+ import { TabContext, TabPanel } from '@mui/lab';
6
+ import { Dialog, DialogTitle, DialogContent, DialogActions, Button } from '@mui/material';
7
+ import useGetTabsCount from '../../../hooks/useGetTabsCount';
8
+ import { searchtabsClick, getActiveTabId, getFirstVisibleTabId } from '../../template/SubTabs/tabUtils';
9
+ import { getFieldMeta } from './utils';
10
+ const publishEvent = ({ clearSelections, viewName }) => {
11
+ const payload = {};
12
+ if (clearSelections) {
13
+ payload.clearSelections = clearSelections;
14
+ }
15
+ if (viewName) {
16
+ payload.viewName = viewName;
17
+ }
18
+ PCore.getPubSubUtils().publish('update-advanced-search-selections', payload);
19
+ };
20
+ const checkIfSelectionsExist = getPConnect => {
21
+ const { MULTI } = PCore.getConstants().LIST_SELECTION_MODE;
22
+ const { selectionMode, readonlyContextList, contextPage, contextClass, name } = getPConnect().getConfigProps();
23
+ const isMultiSelectMode = selectionMode === MULTI;
24
+ const dataRelationshipContext = contextClass && name ? name : null;
25
+ const { compositeKeys } = getFieldMeta(getPConnect, dataRelationshipContext);
26
+ let selectionsExist = false;
27
+ if (isMultiSelectMode) {
28
+ selectionsExist = readonlyContextList?.length > 0;
29
+ }
30
+ else if (contextPage) {
31
+ selectionsExist = compositeKeys?.filter(key => !['', null, undefined].includes(contextPage[key]))?.length > 0;
32
+ }
33
+ return selectionsExist;
34
+ };
35
+ const SearchForm = props => {
36
+ const { children, getPConnect, searchSelectCacheKey } = props;
37
+ const deferLoadedTabs = children[2];
38
+ const cache = PCore.getNavigationUtils().getComponentCache(searchSelectCacheKey) ?? {};
39
+ const { selectedCategory } = cache;
40
+ const firstTabId = getFirstVisibleTabId(deferLoadedTabs, selectedCategory);
41
+ const [open, setOpen] = useState(false);
42
+ const [currentTabId, setCurrentTabId] = useState(getActiveTabId(deferLoadedTabs.props.getPConnect().getChildren(), firstTabId));
43
+ const [nextTabId, setNextTabId] = useState(null); // State to store the next tab ID
44
+ const { getLocaleValue } = PCore.getLocaleUtils();
45
+ // @ts-ignore
46
+ const { data: tabData } = useGetTabsCount(deferLoadedTabs, 'searchForm', currentTabId);
47
+ const handleTabClick = event => {
48
+ const tabId = event.target.value;
49
+ const viewName = tabData
50
+ .find(tab => tab.id === currentTabId)
51
+ .getPConnect()
52
+ .getConfigProps().name;
53
+ if (checkIfSelectionsExist(getPConnect)) {
54
+ setNextTabId(tabId); // Store the next tab ID
55
+ setOpen(true); // Open the dialog
56
+ }
57
+ else {
58
+ // @ts-ignore
59
+ publishEvent({ viewName, tabId });
60
+ searchtabsClick(tabId, tabData, currentTabId, setCurrentTabId);
61
+ }
62
+ };
63
+ const clearSelectionAndSwitchTab = () => {
64
+ const viewName = tabData
65
+ .find(tab => tab.id === currentTabId)
66
+ .getPConnect()
67
+ .getConfigProps().name;
68
+ publishEvent({ clearSelections: true, viewName });
69
+ searchtabsClick(nextTabId, tabData, currentTabId, setCurrentTabId);
70
+ setOpen(false);
71
+ };
72
+ const onDialogClose = () => {
73
+ setOpen(false); // Close the dialog
74
+ };
75
+ const tabItems = tabData?.filter(tab => tab.visibility()) || [];
76
+ const propsToUse = { ...getPConnect().getInheritedProps() };
77
+ let searchCategoriesComp;
78
+ if (tabItems.length > 3) {
79
+ searchCategoriesComp = (_jsx(Grid2, { container: true, spacing: 2, children: _jsx(TextField, { value: currentTabId, select: true, onChange: handleTabClick, fullWidth: true, children: tabItems.map(tab => (_jsx(MenuItem, { value: tab.id, children: tab.name }, tab.id))) }) }));
80
+ }
81
+ else if (tabItems.length > 1) {
82
+ searchCategoriesComp = (_jsx(RadioGroup, { row: true, value: currentTabId, onChange: handleTabClick, children: tabItems.map(tab => (_jsx(FormControlLabel, { value: tab.id, control: _jsx(Radio, {}), label: tab.name }, tab.id))) }));
83
+ }
84
+ return (_jsxs(Box, { display: 'flex', flexDirection: 'column', gap: 2, children: [_jsx(Typography, { variant: 'h5', children: propsToUse.label }), searchCategoriesComp, _jsxs(TabContext, { value: currentTabId, children: [_jsx(Tabs, { style: { display: 'none' }, value: currentTabId, onChange: (e, newValue) => setCurrentTabId(newValue), children: tabItems.map(tab => (_jsx(Tab, { label: tab.name, value: tab.id }, tab.id))) }), tabItems.map(tab => (_jsx(TabPanel, { style: { padding: '0px' }, value: tab.id, children: _jsx("div", { className: 'search-form', children: tab.content }) }, tab.id)))] }), _jsxs(Dialog, { open: open, onClose: onDialogClose, children: [_jsx(DialogTitle, { children: getLocaleValue('Discard selections?', 'DataReference') }), _jsx(DialogContent, { children: _jsx("div", { children: getLocaleValue('When changing search categories, any previous selections will be lost.', 'DataReference') }) }), _jsxs(DialogActions, { children: [_jsx(Button, { onClick: onDialogClose, variant: 'outlined', color: 'primary', children: getLocaleValue('Go back', 'ModalContainer') }), _jsx(Button, { onClick: clearSelectionAndSwitchTab, variant: 'contained', color: 'primary', children: getLocaleValue('Discard', 'ModalContainer') })] })] })] }));
85
+ };
86
+ export default SearchForm;
87
+ //# sourceMappingURL=SearchForm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file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AAO,EAAE,aAAa,EAAE,OAAO,EAAC,UAAU,EAAC,KAAK,EAAC,SAAS,YAC/D,cAAc,CAAC,SAAS,EAAE,gBAAgB,CAAC,GACrC,EACT,KAAC,MAAM,IAAC,OAAO,EAAE,0BAA0B,EAAE,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,SAAS,YAC7E,cAAc,CAAC,SAAS,EAAE,gBAAgB,CAAC,GACrC,IACK,IACT,IACL,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["import { useState } from 'react';\nimport { Tab, Tabs, Typography, RadioGroup, FormControlLabel, Radio, MenuItem, Box, TextField } from '@mui/material';\nimport Grid2 from '@mui/material/Grid2';\nimport { TabContext, TabPanel } from '@mui/lab';\nimport { Dialog, DialogTitle, DialogContent, DialogActions, Button } from '@mui/material';\n\nimport useGetTabsCount from '../../../hooks/useGetTabsCount';\nimport { searchtabsClick, getActiveTabId, getFirstVisibleTabId } from '../../template/SubTabs/tabUtils';\nimport { getFieldMeta } from './utils';\n\nconst publishEvent = ({ clearSelections, viewName }) => {\n const payload: any = {};\n\n if (clearSelections) {\n payload.clearSelections = clearSelections;\n }\n\n if (viewName) {\n payload.viewName = viewName;\n }\n\n PCore.getPubSubUtils().publish('update-advanced-search-selections', payload);\n};\n\nconst checkIfSelectionsExist = getPConnect => {\n const { MULTI } = PCore.getConstants().LIST_SELECTION_MODE;\n const { selectionMode, readonlyContextList, contextPage, contextClass, name } = getPConnect().getConfigProps();\n const isMultiSelectMode = selectionMode === MULTI;\n\n const dataRelationshipContext = contextClass && name ? name : null;\n\n const { compositeKeys } = getFieldMeta(getPConnect, dataRelationshipContext);\n\n let selectionsExist = false;\n if (isMultiSelectMode) {\n selectionsExist = readonlyContextList?.length > 0;\n } else if (contextPage) {\n selectionsExist = compositeKeys?.filter(key => !['', null, undefined].includes(contextPage[key]))?.length > 0;\n }\n return selectionsExist;\n};\n\nconst SearchForm = props => {\n const { children, getPConnect, searchSelectCacheKey } = props;\n\n const deferLoadedTabs = children[2];\n const cache: any = PCore.getNavigationUtils().getComponentCache(searchSelectCacheKey) ?? {};\n const { selectedCategory } = cache;\n const firstTabId = getFirstVisibleTabId(deferLoadedTabs, selectedCategory);\n const [open, setOpen] = useState(false);\n const [currentTabId, setCurrentTabId] = useState(getActiveTabId(deferLoadedTabs.props.getPConnect().getChildren(), firstTabId));\n const [nextTabId, setNextTabId] = useState(null); // State to store the next tab ID\n const { getLocaleValue } = PCore.getLocaleUtils();\n\n // @ts-ignore\n const { data: tabData } = useGetTabsCount(deferLoadedTabs, 'searchForm', currentTabId);\n\n const handleTabClick = event => {\n const tabId: any = event.target.value;\n const viewName = tabData\n .find(tab => tab.id === currentTabId)\n .getPConnect()\n .getConfigProps().name;\n\n if (checkIfSelectionsExist(getPConnect)) {\n setNextTabId(tabId); // Store the next tab ID\n setOpen(true); // Open the dialog\n } else {\n // @ts-ignore\n publishEvent({ viewName, tabId });\n searchtabsClick(tabId, tabData, currentTabId, setCurrentTabId);\n }\n };\n\n const clearSelectionAndSwitchTab = () => {\n const viewName = tabData\n .find(tab => tab.id === currentTabId)\n .getPConnect()\n .getConfigProps().name;\n publishEvent({ clearSelections: true, viewName });\n searchtabsClick(nextTabId, tabData, currentTabId, setCurrentTabId);\n setOpen(false);\n };\n\n const onDialogClose = () => {\n setOpen(false); // Close the dialog\n };\n\n const tabItems = tabData?.filter(tab => tab.visibility()) || [];\n const propsToUse = { ...getPConnect().getInheritedProps() };\n\n let searchCategoriesComp;\n if (tabItems.length > 3) {\n searchCategoriesComp = (\n <Grid2 container spacing={2}>\n <TextField value={currentTabId} select onChange={handleTabClick} fullWidth>\n {tabItems.map(tab => (\n <MenuItem key={tab.id} value={tab.id}>\n {tab.name}\n </MenuItem>\n ))}\n </TextField>\n </Grid2>\n );\n } else if (tabItems.length > 1) {\n searchCategoriesComp = (\n <RadioGroup row value={currentTabId} onChange={handleTabClick}>\n {tabItems.map(tab => (\n <FormControlLabel key={tab.id} value={tab.id} control={<Radio />} label={tab.name} />\n ))}\n </RadioGroup>\n );\n }\n\n return (\n <Box display='flex' flexDirection='column' gap={2}>\n <Typography variant='h5'>{propsToUse.label}</Typography>\n {searchCategoriesComp}\n <TabContext value={currentTabId}>\n <Tabs style={{ display: 'none' }} value={currentTabId} onChange={(e, newValue) => setCurrentTabId(newValue)}>\n {tabItems.map(tab => (\n <Tab key={tab.id} label={tab.name} value={tab.id} />\n ))}\n </Tabs>\n {tabItems.map(tab => (\n <TabPanel style={{ padding: '0px' }} key={tab.id} value={tab.id}>\n <div className='search-form'>{tab.content}</div>\n </TabPanel>\n ))}\n </TabContext>\n <Dialog open={open} onClose={onDialogClose}>\n <DialogTitle>{getLocaleValue('Discard selections?', 'DataReference')}</DialogTitle>\n <DialogContent>\n <div>{getLocaleValue('When changing search categories, any previous selections will be lost.', 'DataReference')}</div>\n </DialogContent>\n <DialogActions>\n <Button onClick={onDialogClose} variant='outlined' color='primary'>\n {getLocaleValue('Go back', 'ModalContainer')}\n </Button>\n <Button onClick={clearSelectionAndSwitchTab} variant='contained' color='primary'>\n {getLocaleValue('Discard', 'ModalContainer')}\n </Button>\n </DialogActions>\n </Dialog>\n </Box>\n );\n};\n\nexport default SearchForm;\n"]}
@@ -0,0 +1,15 @@
1
+ export declare function getFieldMeta(getPConnect: any, dataRelationshipContext: any): {
2
+ compositeKeys: any;
3
+ fieldMetadata: any;
4
+ };
5
+ export declare const getFirstChildConfig: ({ firstChildMeta, getPConnect, rawViewMetadata, contextClass, dataReferenceConfigToChild, isCreateNewReferenceEnabled, disableStartingFieldsForReference, pyID }: {
6
+ firstChildMeta: any;
7
+ getPConnect: any;
8
+ rawViewMetadata: any;
9
+ contextClass: any;
10
+ dataReferenceConfigToChild: any;
11
+ isCreateNewReferenceEnabled: any;
12
+ disableStartingFieldsForReference: any;
13
+ pyID: any;
14
+ }) => any;
15
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/components/template/DataReference/utils.ts"],"names":[],"mappings":"AAMA,wBAAgB,YAAY,CAAC,WAAW,KAAA,EAAE,uBAAuB,KAAA;;;EAyBhE;AAkBD,eAAO,MAAM,mBAAmB,GAAI;;;;;;;;;CASnC,QA+BA,CAAC"}
@@ -0,0 +1,75 @@
1
+ const isSelfReferencedProperty = (param, referenceProp) => {
2
+ const [, parentPropName] = param.split('.');
3
+ const referencePropParent = referenceProp?.split('.').pop();
4
+ return parentPropName === referencePropParent;
5
+ };
6
+ export function getFieldMeta(getPConnect, dataRelationshipContext) {
7
+ const pConn = getPConnect();
8
+ const { selectionMode, selectionList } = pConn.getConfigProps();
9
+ const { MULTI } = PCore.getConstants().LIST_SELECTION_MODE;
10
+ const isMultiSelectMode = selectionMode === MULTI;
11
+ const pageReference = pConn.getPageReference();
12
+ let referenceProp = isMultiSelectMode ? selectionList.substring(1) : pageReference.substring(pageReference.lastIndexOf('.') + 1);
13
+ // Replace here to use the context name instead
14
+ let contextPageReference = null;
15
+ if (dataRelationshipContext !== null && selectionMode === 'single') {
16
+ referenceProp = dataRelationshipContext;
17
+ contextPageReference = pageReference.concat('.').concat(referenceProp);
18
+ }
19
+ const fieldMetadata = (isMultiSelectMode ? pConn.getFieldMetadata(`${referenceProp}`) : pConn.getCurrentPageFieldMetadata(contextPageReference)) ?? {};
20
+ const { datasource: { parameters: fieldParameters = {} } = {} } = fieldMetadata;
21
+ const compositeKeys = [];
22
+ Object.values(fieldParameters).forEach((param) => {
23
+ if (isSelfReferencedProperty(param, referenceProp))
24
+ compositeKeys.push(param.substring(param.lastIndexOf('.') + 1));
25
+ });
26
+ return { compositeKeys, fieldMetadata };
27
+ }
28
+ /**
29
+ * returns array of self-referenced properties of the datasource
30
+ * Ex: returns ["@P .DataRef.pyGUID", "@P .DataRef.customerID"]
31
+ */
32
+ const getCompositeKeys = (pConnect, property) => {
33
+ const fieldMetadata = pConnect.getFieldMetadata(property) || {};
34
+ const { datasource: { parameters: fieldParameters = {} } = {} } = fieldMetadata;
35
+ const compositeKeys = [];
36
+ Object.values(fieldParameters).forEach(param => {
37
+ if (isSelfReferencedProperty(param, property)) {
38
+ compositeKeys.push(param);
39
+ }
40
+ });
41
+ return compositeKeys;
42
+ };
43
+ export const getFirstChildConfig = ({ firstChildMeta, getPConnect, rawViewMetadata, contextClass, dataReferenceConfigToChild, isCreateNewReferenceEnabled, disableStartingFieldsForReference, pyID }) => {
44
+ const config = {
45
+ ...firstChildMeta.config,
46
+ ...dataReferenceConfigToChild
47
+ };
48
+ const compositeKeys = getCompositeKeys(getPConnect(), dataReferenceConfigToChild?.dataRelationshipContext);
49
+ return {
50
+ ...config,
51
+ viewName: getPConnect().getCurrentView(),
52
+ referenceList: config.referenceList ?? rawViewMetadata.config.referenceList,
53
+ parameters: rawViewMetadata.config.parameters,
54
+ localeReference: rawViewMetadata.config.localeReference,
55
+ contextClass: config.contextClass || rawViewMetadata?.config?.contextClass || rawViewMetadata?.config?.targetObjectClass,
56
+ allowAddingNewRecords: firstChildMeta.type === 'SimpleTableSelect' && isCreateNewReferenceEnabled ? true : undefined,
57
+ actions: firstChildMeta.type === 'SimpleTableSelect' &&
58
+ isCreateNewReferenceEnabled && [
59
+ {
60
+ action: 'ADD_CASE',
61
+ config: {
62
+ label: '@L Add',
63
+ caseType: contextClass,
64
+ inputFields: disableStartingFieldsForReference
65
+ ? {}
66
+ : {
67
+ [`.pyAddCaseContextPage.${pyID}`]: `@P .${pyID}`
68
+ }
69
+ }
70
+ }
71
+ ],
72
+ compositeKeys
73
+ };
74
+ };
75
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/components/template/DataReference/utils.ts"],"names":[],"mappings":"AAAA,MAAM,wBAAwB,GAAG,CAAC,KAAK,EAAE,aAAa,EAAE,EAAE;IACxD,MAAM,CAAC,EAAE,cAAc,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC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0B;KAC9B,CAAC;IACF,MAAM,aAAa,GAAG,gBAAgB,CAAC,WAAW,EAAE,EAAE,0BAA0B,EAAE,uBAAuB,CAAC,CAAC;IAC3G,OAAO;QACL,GAAG,MAAM;QACT,QAAQ,EAAE,WAAW,EAAE,CAAC,cAAc,EAAE;QACxC,aAAa,EAAE,MAAM,CAAC,aAAa,IAAI,eAAe,CAAC,MAAM,CAAC,aAAa;QAC3E,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC,UAAU;QAC7C,eAAe,EAAE,eAAe,CAAC,MAAM,CAAC,eAAe;QACvD,YAAY,EAAE,MAAM,CAAC,YAAY,IAAI,eAAe,EAAE,MAAM,EAAE,YAAY,IAAI,eAAe,EAAE,MAAM,EAAE,iBAAiB;QACxH,qBAAqB,EAAE,cAAc,CAAC,IAAI,KAAK,mBAAmB,IAAI,2BAA2B,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;QACpH,OAAO,EAAE,cAAc,CAAC,IAAI,KAAK,mBAAmB;YAClD,2BAA2B,IAAI;YAC7B;gBACE,MAAM,EAAE,UAAU;gBAClB,MAAM,EAAE;oBACN,KAAK,EAAE,QAAQ;oBACf,QAAQ,EAAE,YAAY;oBACtB,WAAW,EAAE,iCAAiC;wBAC5C,CAAC,CAAC,EAAE;wBACJ,CAAC,CAAC;4BACE,CAAC,yBAAyB,IAAI,EAAE,CAAC,EAAE,OAAO,IAAI,EAAE;yBACjD;iBACN;aACF;SACF;QACH,aAAa;KACd,CAAC;AACJ,CAAC,CAAC","sourcesContent":["const isSelfReferencedProperty = (param, referenceProp) => {\n const [, parentPropName] = param.split('.');\n const referencePropParent = referenceProp?.split('.').pop();\n return parentPropName === referencePropParent;\n};\n\nexport function getFieldMeta(getPConnect, dataRelationshipContext) {\n const pConn = getPConnect();\n const { selectionMode, selectionList } = pConn.getConfigProps();\n const { MULTI } = PCore.getConstants().LIST_SELECTION_MODE;\n\n const isMultiSelectMode = selectionMode === MULTI;\n\n const pageReference = pConn.getPageReference();\n let referenceProp = isMultiSelectMode ? selectionList.substring(1) : pageReference.substring(pageReference.lastIndexOf('.') + 1);\n // Replace here to use the context name instead\n let contextPageReference = null;\n if (dataRelationshipContext !== null && selectionMode === 'single') {\n referenceProp = dataRelationshipContext;\n contextPageReference = pageReference.concat('.').concat(referenceProp);\n }\n\n const fieldMetadata =\n (isMultiSelectMode ? pConn.getFieldMetadata(`${referenceProp}`) : pConn.getCurrentPageFieldMetadata(contextPageReference)) ?? {};\n const { datasource: { parameters: fieldParameters = {} } = {} } = fieldMetadata;\n const compositeKeys: any = [];\n Object.values(fieldParameters).forEach((param: any) => {\n if (isSelfReferencedProperty(param, referenceProp)) compositeKeys.push(param.substring(param.lastIndexOf('.') + 1));\n });\n\n return { compositeKeys, fieldMetadata };\n}\n\n/**\n * returns array of self-referenced properties of the datasource\n * Ex: returns [\"@P .DataRef.pyGUID\", \"@P .DataRef.customerID\"]\n */\nconst getCompositeKeys = (pConnect, property) => {\n const fieldMetadata = pConnect.getFieldMetadata(property) || {};\n const { datasource: { parameters: fieldParameters = {} } = {} } = fieldMetadata;\n const compositeKeys: any = [];\n Object.values(fieldParameters).forEach(param => {\n if (isSelfReferencedProperty(param, property)) {\n compositeKeys.push(param);\n }\n });\n return compositeKeys;\n};\n\nexport const getFirstChildConfig = ({\n firstChildMeta,\n getPConnect,\n rawViewMetadata,\n contextClass,\n dataReferenceConfigToChild,\n isCreateNewReferenceEnabled,\n disableStartingFieldsForReference,\n pyID\n}) => {\n const config = {\n ...firstChildMeta.config,\n ...dataReferenceConfigToChild\n };\n const compositeKeys = getCompositeKeys(getPConnect(), dataReferenceConfigToChild?.dataRelationshipContext);\n return {\n ...config,\n viewName: getPConnect().getCurrentView(),\n referenceList: config.referenceList ?? rawViewMetadata.config.referenceList,\n parameters: rawViewMetadata.config.parameters,\n localeReference: rawViewMetadata.config.localeReference,\n contextClass: config.contextClass || rawViewMetadata?.config?.contextClass || rawViewMetadata?.config?.targetObjectClass,\n allowAddingNewRecords: firstChildMeta.type === 'SimpleTableSelect' && isCreateNewReferenceEnabled ? true : undefined,\n actions: firstChildMeta.type === 'SimpleTableSelect' &&\n isCreateNewReferenceEnabled && [\n {\n action: 'ADD_CASE',\n config: {\n label: '@L Add',\n caseType: contextClass,\n inputFields: disableStartingFieldsForReference\n ? {}\n : {\n [`.pyAddCaseContextPage.${pyID}`]: `@P .${pyID}`\n }\n }\n }\n ],\n compositeKeys\n };\n};\n"]}
@@ -1,5 +1,5 @@
1
- import { PropsWithChildren } from 'react';
2
- import { PConnProps } from '../../../types/PConnProps';
1
+ import { type PropsWithChildren } from 'react';
2
+ import type { PConnProps } from '../../../types/PConnProps';
3
3
  import './DefaultForm.css';
4
4
  interface DefaultFormProps extends PConnProps {
5
5
  NumCols: string;
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultForm.d.ts","sourceRoot":"","sources":["../../../../src/components/template/DefaultForm/DefaultForm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAOzD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,OAAO,mBAAmB,CAAC;AAE3B,UAAU,gBAAiB,SAAQ,UAAU;IAE3C,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;CACtB;AAQD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,2CA0C7E"}
1
+ {"version":3,"file":"DefaultForm.d.ts","sourceRoot":"","sources":["../../../../src/components/template/DefaultForm/DefaultForm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAO9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,OAAO,mBAAmB,CAAC;AAE3B,UAAU,gBAAiB,SAAQ,UAAU;IAE3C,OAAO,EAAE,MAAM,CAAC;I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K,GAAG;YACN,QAAQ,GAAG,gCAAgC,CAAC;YAC5C,MAAM;QACR;YACE,QAAQ,GAAG,8BAA8B,CAAC;YAC1C,MAAM;KACT;IAED,YAAY;IAEZ,yFAAyF;IACzF,uFAAuF;IACvF,mBAAmB;IACnB,MAAM,UAAU,GAAG,WAAW,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,WAAW,EAAE,CAAC;IAC9E,MAAM,UAAU,GAAG,UAAU,EAAE,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,KAAC,KAAK,OAAqC,GAAG,IAAlC,oBAAoB,CAAC,GAAG,CAAC,CAAa,CAAC,CAAC;IAE9F,OAAO,CACL,8BACG,YAAY,IAAI,CACf,cAAK,SAAS,EAAC,oCAAoC,YAGjD,cAAwB,EAAE,EAAC,kBAAkB,EAAC,uBAAuB,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,IAAtF,cAAc,CAA4E,GAC/F,CACP,EACD,cAAK,SAAS,EAAE,QAAQ,YAAG,UAAU,GAAO,IAC3C,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import { createElement, PropsWithChildren } from 'react';\n\nimport { getInstructions } from '../../helpers/template-utils';\nimport createPConnectComponent from '../../../bridge/react_pconnect';\nimport connectToState from '../../helpers/state-utils';\n\nimport { getKeyForMappedField, mapStateToProps } from './utils';\nimport { PConnProps } from '../../../types/PConnProps';\n\nimport './DefaultForm.css';\n\ninterface DefaultFormProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n NumCols: string;\n instructions: string;\n}\n\nconst Child = connectToState(mapStateToProps)(props => {\n const { key, visibility, ...rest } = props;\n\n return createElement(createPConnectComponent(), { ...rest, key, visibility });\n});\n\nexport default function DefaultForm(props: PropsWithChildren<DefaultFormProps>) {\n const { getPConnect, NumCols = '1' } = props;\n const instructions = getInstructions(getPConnect(), props.instructions);\n\n let divClass: string;\n\n const numCols = NumCols || '1';\n switch (numCols) {\n case '1':\n divClass = 'psdk-default-form-one-column';\n break;\n case '2':\n divClass = 'psdk-default-form-two-column';\n break;\n case '3':\n divClass = 'psdk-default-form-three-column';\n break;\n default:\n divClass = 'psdk-default-form-one-column';\n break;\n }\n\n // debugger;\n\n // repoint the children because they are in a region and we need to not render the region\n // to take the children and create components for them, put in an array and pass as the\n // defaultForm kids\n const arChildren = getPConnect().getChildren()[0].getPConnect().getChildren();\n const dfChildren = arChildren?.map(kid => <Child key={getKeyForMappedField(kid)} {...kid} />);\n\n return (\n <>\n {instructions && (\n <div className='psdk-default-form-instruction-text'>\n {/* server performs sanitization method for instructions html content */}\n {/* eslint-disable react/no-danger */}\n <div key='instructions' id='instruction-text' dangerouslySetInnerHTML={{ __html: instructions }} />\n </div>\n )}\n <div className={divClass}>{dfChildren}</div>\n </>\n );\n}\n"]}
1
+ {"version":3,"file":"DefaultForm.js","sourceRoot":"","sources":["../../../../src/components/template/DefaultForm/DefaultForm.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAA0B,MAAM,OAAO,CAAC;AAE9D,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,uBAAuB,MAAM,gCAAgC,CAAC;AACrE,OAAO,cAAc,MAAM,2BAA2B,CAAC;AAEvD,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAGhE,OAAO,mBAAmB,CAAC;AAQ3B,MAAM,KAAK,GAAG,cAAc,CAAC,eAAe,CAAC,CAAC,KAAK,CAAC,EAAE;IACpD,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IAE3C,OAAO,aAAa,CAAC,uBAAuB,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,CAAC;AAChF,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAA0C;IAC5E,MAAM,EAAE,WAAW,EAAE,OAAO,GAAG,GAAG,EAAE,GAAG,KAAK,CAAC;IAC7C,MAAM,YAAY,GAAG,eAAe,CAAC,WAAW,EAAE,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IAExE,IAAI,QAAgB,CAAC;IAErB,MAAM,OAAO,GAAG,OAAO,IAAI,GAAG,CAAC;IAC/B,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,GAAG;YACN,QAAQ,GAAG,8BAA8B,CAAC;YAC1C,MAAM;QACR,KAAK,GAAG;YACN,QAAQ,GAAG,8BAA8B,CAAC;YAC1C,MAAM;QACR,KAAK,GAAG;YACN,QAAQ,GAAG,gCAAgC,CAAC;YAC5C,MAAM;QACR;YACE,QAAQ,GAAG,8BAA8B,CAAC;YAC1C,MAAM;IACV,CAAC;IAED,YAAY;IAEZ,yFAAyF;IACzF,uFAAuF;IACvF,mBAAmB;IACnB,MAAM,UAAU,GAAG,WAAW,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,WAAW,EAAE,CAAC;IAC9E,MAAM,UAAU,GAAG,UAAU,EAAE,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,KAAC,KAAK,OAAqC,GAAG,IAAlC,oBAAoB,CAAC,GAAG,CAAC,CAAa,CAAC,CAAC;IAE9F,OAAO,CACL,8BACG,YAAY,IAAI,CACf,cAAK,SAAS,EAAC,oCAAoC,YAGjD,cAAwB,EAAE,EAAC,kBAAkB,EAAC,uBAAuB,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,IAAtF,cAAc,CAA4E,GAC/F,CACP,EACD,cAAK,SAAS,EAAE,QAAQ,YAAG,UAAU,GAAO,IAC3C,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import { createElement, type PropsWithChildren } from 'react';\n\nimport { getInstructions } from '../../helpers/template-utils';\nimport createPConnectComponent from '../../../bridge/react_pconnect';\nimport connectToState from '../../helpers/state-utils';\n\nimport { getKeyForMappedField, mapStateToProps } from './utils';\nimport type { PConnProps } from '../../../types/PConnProps';\n\nimport './DefaultForm.css';\n\ninterface DefaultFormProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n NumCols: string;\n instructions: string;\n}\n\nconst Child = connectToState(mapStateToProps)(props => {\n const { key, visibility, ...rest } = props;\n\n return createElement(createPConnectComponent(), { ...rest, key, visibility });\n});\n\nexport default function DefaultForm(props: PropsWithChildren<DefaultFormProps>) {\n const { getPConnect, NumCols = '1' } = props;\n const instructions = getInstructions(getPConnect(), props.instructions);\n\n let divClass: string;\n\n const numCols = NumCols || '1';\n switch (numCols) {\n case '1':\n divClass = 'psdk-default-form-one-column';\n break;\n case '2':\n divClass = 'psdk-default-form-two-column';\n break;\n case '3':\n divClass = 'psdk-default-form-three-column';\n break;\n default:\n divClass = 'psdk-default-form-one-column';\n break;\n }\n\n // debugger;\n\n // repoint the children because they are in a region and we need to not render the region\n // to take the children and create components for them, put in an array and pass as the\n // defaultForm kids\n const arChildren = getPConnect().getChildren()[0].getPConnect().getChildren();\n const dfChildren = arChildren?.map(kid => <Child key={getKeyForMappedField(kid)} {...kid} />);\n\n return (\n <>\n {instructions && (\n <div className='psdk-default-form-instruction-text'>\n {/* server performs sanitization method for instructions html content */}\n {}\n <div key='instructions' id='instruction-text' dangerouslySetInnerHTML={{ __html: instructions }} />\n </div>\n )}\n <div className={divClass}>{dfChildren}</div>\n </>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/template/DefaultForm/utils/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,EAAE,GAO7B,CAAC;AAEF,eAAO,MAAM,oBAAoB,qBAgBhC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/template/DefaultForm/utils/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,EAAE,GAO7B,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAG,UAAK,QAgBxC,CAAC"}
@@ -1,4 +1,3 @@
1
- import { v4 as uuidv4 } from 'uuid';
2
1
  export const mapStateToProps = (_, ownProps) => {
3
2
  const { getPConnect } = ownProps;
4
3
  return {
@@ -18,6 +17,6 @@ export const getKeyForMappedField = field => {
18
17
  if (pConnect?.meta) {
19
18
  return JSON.stringify(pConnect.meta);
20
19
  }
21
- return uuidv4();
20
+ return crypto.randomUUID();
22
21
  };
23
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/template/DefaultForm/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAEpC,MAAM,CAAC,MAAM,eAAe,GAAQ,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE;IAClD,MAAM,EAAE,WAAW,EAAE,GAAG,QAAQ,CAAC;IAEjC,OAAO;QACL,UAAU,EAAE,WAAW,EAAE,CAAC,qBAAqB,EAAE;QACjD,WAAW;KACZ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC,EAAE;IAC1C,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACxB,OAAO,KAAK;aACT,GAAG,CAAC,IAAI,CAAC,EAAE;YACV,OAAO,oBAAoB,CAAC,IAAI,CAAC,CAAC;QACpC,CAAC,CAAC;aACD,IAAI,CAAC,IAAI,CAAC,CAAC;KACf;IAED,MAAM,QAAQ,GAAG,KAAK,EAAE,WAAW,EAAE,EAAE,CAAC;IAExC,IAAI,QAAQ,EAAE,IAAI,EAAE;QAClB,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;KACtC;IAED,OAAO,MAAM,EAAE,CAAC;AAClB,CAAC,CAAC","sourcesContent":["import { v4 as uuidv4 } from 'uuid';\n\nexport const mapStateToProps: any = (_, ownProps) => {\n const { getPConnect } = ownProps;\n\n return {\n visibility: getPConnect().getComputedVisibility(),\n getPConnect\n };\n};\n\nexport const getKeyForMappedField = field => {\n if (Array.isArray(field)) {\n return field\n .map(item => {\n return getKeyForMappedField(item);\n })\n .join('__');\n }\n\n const pConnect = field?.getPConnect?.();\n\n if (pConnect?.meta) {\n return JSON.stringify(pConnect.meta);\n }\n\n return uuidv4();\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/template/DefaultForm/utils/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAQ,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE;IAClD,MAAM,EAAE,WAAW,EAAE,GAAG,QAAQ,CAAC;IAEjC,OAAO;QACL,UAAU,EAAE,WAAW,EAAE,CAAC,qBAAqB,EAAE;QACjD,WAAW;KACZ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC,EAAE;IAC1C,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,KAAK;aACT,GAAG,CAAC,IAAI,CAAC,EAAE;YACV,OAAO,oBAAoB,CAAC,IAAI,CAAC,CAAC;QACpC,CAAC,CAAC;aACD,IAAI,CAAC,IAAI,CAAC,CAAC;IAChB,CAAC;IAED,MAAM,QAAQ,GAAG,KAAK,EAAE,WAAW,EAAE,EAAE,CAAC;IAExC,IAAI,QAAQ,EAAE,IAAI,EAAE,CAAC;QACnB,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;IAED,OAAO,MAAM,CAAC,UAAU,EAAE,CAAC;AAC7B,CAAC,CAAC","sourcesContent":["export const mapStateToProps: any = (_, ownProps) => {\n const { getPConnect } = ownProps;\n\n return {\n visibility: getPConnect().getComputedVisibility(),\n getPConnect\n };\n};\n\nexport const getKeyForMappedField = field => {\n if (Array.isArray(field)) {\n return field\n .map(item => {\n return getKeyForMappedField(item);\n })\n .join('__');\n }\n\n const pConnect = field?.getPConnect?.();\n\n if (pConnect?.meta) {\n return JSON.stringify(pConnect.meta);\n }\n\n return crypto.randomUUID();\n};\n"]}
@@ -0,0 +1,36 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface CommonPageProps {
3
+ /** Page title */
4
+ title: string;
5
+ /** Page icon */
6
+ icon: string;
7
+ /** Region children */
8
+ children: ReactNode | ReactNode[];
9
+ /** Dynamic page pconnect object */
10
+ /** Enable GetNextWork in page */
11
+ enableGetNextWork?: boolean;
12
+ /** GetAI coaches configured in page */
13
+ /** Locale reference */
14
+ localeReference: string;
15
+ }
16
+ interface DefaultPageProps extends CommonPageProps {
17
+ /** Default page layout one or two columns */
18
+ layout: 'one-column' | 'two-column' | 'wide-narrow' | 'narrow-wide' | 'dynamic';
19
+ /** Flag to enable banner/hero */
20
+ enableBanner?: boolean;
21
+ /** Banner - Heading displayed */
22
+ heading?: string;
23
+ /** Banner - Message displayed */
24
+ message?: string;
25
+ /** Banner - Theme of the image */
26
+ imageTheme?: 'light' | 'dark' | undefined;
27
+ /** Banner - Background image */
28
+ backgroundImage?: string;
29
+ /** Banner - Background color */
30
+ backgroundColor?: string;
31
+ /** Banner - Tint image */
32
+ tintImage?: boolean;
33
+ }
34
+ export default function DefaultPage({ layout, children, enableBanner, heading, message, imageTheme, backgroundImage, backgroundColor, tintImage }: DefaultPageProps): import("react/jsx-runtime").JSX.Element;
35
+ export {};
36
+ //# sourceMappingURL=DefaultPage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultPage.d.ts","sourceRoot":"","sources":["../../../../src/components/template/DefaultPage/DefaultPage.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,MAAM,WAAW,eAAe;IAC9B,iBAAiB;IACjB,KAAK,EAAE,MAAM,CAAC;IAEd,gBAAgB;IAChB,IAAI,EAAE,MAAM,CAAC;IAEb,sBAAsB;IACtB,QAAQ,EAAE,SAAS,GAAG,SAAS,EAAE,CAAC;IAElC,mCAAmC;IAGnC,iCAAiC;IACjC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B,uCAAuC;IAGvC,uBAAuB;IACvB,eAAe,EAAE,MAAM,CAAC;CACzB;AACD,UAAU,gBAAiB,SAAQ,eAAe;IAChD,6CAA6C;IAC7C,MAAM,EAAE,YAAY,GAAG,YAAY,GAAG,aAAa,GAAG,aAAa,GAAG,SAAS,CAAC;IAEhF,iCAAiC;IACjC,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,iCAAiC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,iCAAiC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,kCAAkC;IAClC,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IAE1C,gCAAgC;IAChC,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,gCAAgC;IAChC,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,0BAA0B;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;CAIrB;AASD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,MAAqB,EACrB,QAAQ,EACR,YAAY,EACZ,OAAY,EACZ,OAAY,EACZ,UAAU,EACV,eAAoB,EACpB,eAAoB,EACpB,SAAS,EACV,EAAE,gBAAgB,2CAkClB"}
@@ -0,0 +1,28 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useMemo, Children } from 'react';
3
+ import { Grid2 } from '@mui/material';
4
+ import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
5
+ const COLUMNS_WIDTHS = {
6
+ 'one-column': [12],
7
+ 'two-column': [6, 6],
8
+ 'narrow-wide': [4, 8],
9
+ 'wide-narrow': [8, 4]
10
+ };
11
+ export default function DefaultPage({ layout = 'one-column', children, enableBanner, heading = '', message = '', imageTheme, backgroundImage = '', backgroundColor = '', tintImage }) {
12
+ const Banner = getComponentFromMap('Banner');
13
+ const childArray = useMemo(() => {
14
+ return Children.toArray(children);
15
+ }, [children]);
16
+ if (enableBanner) {
17
+ return (_jsx(Banner, { variant: layout === 'one-column' ? 'two-column' : layout, a: [childArray[0]], b: [childArray[1]], banner: {
18
+ variant: imageTheme,
19
+ backgroundColor,
20
+ title: heading,
21
+ message,
22
+ backgroundImage,
23
+ tintImage
24
+ } }));
25
+ }
26
+ return (_jsx(Grid2, { container: true, spacing: 1, children: childArray.map((child, index) => (_jsx(Grid2, { size: COLUMNS_WIDTHS[layout][index], children: child }, index))) }));
27
+ }
28
+ //# sourceMappingURL=DefaultPage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultPage.js","sourceRoot":"","sources":["../../../../src/components/template/DefaultPage/DefaultPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAqDhF,MAAM,cAAc,GAAG;IACrB,YAAY,EAAE,CAAC,EAAE,CAAC;IAClB,YAAY,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IACpB,aAAa,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IACrB,aAAa,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;CACtB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,MAAM,GAAG,YAAY,EACrB,QAAQ,EACR,YAAY,EACZ,OAAO,GAAG,EAAE,EACZ,OAAO,GAAG,EAAE,EACZ,UAAU,EACV,eAAe,GAAG,EAAE,EACpB,eAAe,GAAG,EAAE,EACpB,SAAS,EACQ;IACjB,MAAM,MAAM,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAE7C,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE;QAC9B,OAAO,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACpC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,IAAI,YAAY,EAAE,CAAC;QACjB,OAAO,CACL,KAAC,MAAM,IACL,OAAO,EAAE,MAAM,KAAK,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,EACxD,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAClB,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAClB,MAAM,EAAE;gBACN,OAAO,EAAE,UAAU;gBACnB,eAAe;gBACf,KAAK,EAAE,OAAO;gBACd,OAAO;gBACP,eAAe;gBACf,SAAS;aACV,GACD,CACH,CAAC;IACJ,CAAC;IAED,OAAO,CACL,KAAC,KAAK,IAAC,SAAS,QAAC,OAAO,EAAE,CAAC,YACxB,UAAU,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAChC,KAAC,KAAK,IAAa,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,YACnD,KAAK,IADI,KAAK,CAET,CACT,CAAC,GACI,CACT,CAAC;AACJ,CAAC","sourcesContent":["import { useMemo, Children } from 'react';\nimport type { ReactNode } from 'react';\nimport { Grid2 } from '@mui/material';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\n\nexport interface CommonPageProps {\n /** Page title */\n title: string;\n\n /** Page icon */\n icon: string;\n\n /** Region children */\n children: ReactNode | ReactNode[];\n\n /** Dynamic page pconnect object */\n // getPConnect: () => PConnect;\n\n /** Enable GetNextWork in page */\n enableGetNextWork?: boolean;\n\n /** GetAI coaches configured in page */\n // coaches?: GenAICoach[];\n\n /** Locale reference */\n localeReference: string;\n}\ninterface DefaultPageProps extends CommonPageProps {\n /** Default page layout one or two columns */\n layout: 'one-column' | 'two-column' | 'wide-narrow' | 'narrow-wide' | 'dynamic';\n\n /** Flag to enable banner/hero */\n enableBanner?: boolean;\n\n /** Banner - Heading displayed */\n heading?: string;\n\n /** Banner - Message displayed */\n message?: string;\n\n /** Banner - Theme of the image */\n imageTheme?: 'light' | 'dark' | undefined;\n\n /** Banner - Background image */\n backgroundImage?: string;\n\n /** Banner - Background color */\n backgroundColor?: string;\n\n /** Banner - Tint image */\n tintImage?: boolean;\n\n /** Flag to enable layout model */\n // layoutModel?: GridLayoutModel | undefined;\n}\n\nconst COLUMNS_WIDTHS = {\n 'one-column': [12],\n 'two-column': [6, 6],\n 'narrow-wide': [4, 8],\n 'wide-narrow': [8, 4]\n};\n\nexport default function DefaultPage({\n layout = 'one-column',\n children,\n enableBanner,\n heading = '',\n message = '',\n imageTheme,\n backgroundImage = '',\n backgroundColor = '',\n tintImage\n}: DefaultPageProps) {\n const Banner = getComponentFromMap('Banner');\n\n const childArray = useMemo(() => {\n return Children.toArray(children);\n }, [children]);\n\n if (enableBanner) {\n return (\n <Banner\n variant={layout === 'one-column' ? 'two-column' : layout}\n a={[childArray[0]]}\n b={[childArray[1]]}\n banner={{\n variant: imageTheme,\n backgroundColor,\n title: heading,\n message,\n backgroundImage,\n tintImage\n }}\n />\n );\n }\n\n return (\n <Grid2 container spacing={1}>\n {childArray.map((child, index) => (\n <Grid2 key={index} size={COLUMNS_WIDTHS[layout][index]}>\n {child}\n </Grid2>\n ))}\n </Grid2>\n );\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export { default } from './DefaultPage';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/template/DefaultPage/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default } from './DefaultPage';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/template/DefaultPage/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC","sourcesContent":["export { default } from './DefaultPage';\n"]}
@@ -1,4 +1,4 @@
1
- import { PConnProps } from '../../../../types/PConnProps';
1
+ import type { PConnProps } from '../../../../types/PConnProps';
2
2
  interface DetailsProps extends PConnProps {
3
3
  label: string;
4
4
  showLabel: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"Details.d.ts","sourceRoot":"","sources":["../../../../../src/components/template/Details/Details/Details.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,UAAU,YAAa,SAAQ,UAAU;IAEvC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,mBAAmB,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,KAAK,EAAE,YAAY,2CA0DlD"}
1
+ {"version":3,"file":"Details.d.ts","sourceRoot":"","sources":["../../../../../src/components/template/Details/Details/Details.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE/D,UAAU,YAAa,SAAQ,UAAU;IAEvC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,mBAAmB,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,KAAK,EAAE,YAAY,2CA0DlD"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { createElement } from 'react';
3
- import Grid from '@mui/material/Grid';
3
+ import Grid2 from '@mui/material/Grid2';
4
4
  import createPConnectComponent from '../../../../bridge/react_pconnect';
5
5
  import { getComponentFromMap } from '../../../../bridge/helpers/sdk_component_map';
6
6
  export default function Details(props) {
@@ -15,7 +15,6 @@ export default function Details(props) {
15
15
  getPConnect().setInheritedProp('readOnly', true);
16
16
  const children = getPConnect().getChildren().map((configObject, index) => createElement(createPConnectComponent(), {
17
17
  ...configObject,
18
- // eslint-disable-next-line react/no-array-index-key
19
18
  key: index.toString()
20
19
  }));
21
20
  // Set up highlighted data to pass in return if is set to show, need raw metadata to pass to createComponent
@@ -32,6 +31,6 @@ export default function Details(props) {
32
31
  return getPConnect().createComponent(field, '', 0, {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional
33
32
  });
34
33
  }
35
- return (_jsxs(FieldGroup, { name: propsToUse.showLabel ? propsToUse.label : '', children: [showHighlightedData && highlightedDataArr.length > 0 && (_jsx(Grid, { container: true, spacing: 1, style: { padding: '0 0 1em' }, children: highlightedDataArr.map((child, i) => (_jsx(Grid, { item: true, xs: 12, children: child }, `hf-${i + 1}`))) })), _jsx(Grid, { container: true, spacing: 1, children: children.map((child, i) => (_jsx(Grid, { item: true, xs: 12, children: child }, `r-${i + 1}`))) })] }));
34
+ return (_jsxs(FieldGroup, { name: propsToUse.showLabel ? propsToUse.label : '', children: [showHighlightedData && highlightedDataArr.length > 0 && (_jsx(Grid2, { container: true, spacing: 1, style: { padding: '0 0 1em' }, children: highlightedDataArr.map((child, i) => (_jsx(Grid2, { size: { xs: 12 }, children: child }, `hf-${i + 1}`))) })), _jsx(Grid2, { container: true, spacing: 1, children: children.map((child, i) => (_jsx(Grid2, { size: { xs: 12 }, children: child }, `r-${i + 1}`))) })] }));
36
35
  }
37
36
  //# sourceMappingURL=Details.js.map