@pega/react-sdk-components 0.25.2 → 0.25.4

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 (302) hide show
  1. package/lib/bridge/helpers/sdk_component_map.d.ts.map +1 -1
  2. package/lib/bridge/helpers/sdk_component_map.js +0 -6
  3. package/lib/bridge/helpers/sdk_component_map.js.map +1 -1
  4. package/lib/bridge/react_pconnect.js +11 -13
  5. package/lib/bridge/react_pconnect.js.map +1 -1
  6. package/lib/components/designSystemExtension/Banner/Banner.css +1 -1
  7. package/lib/components/designSystemExtension/Banner/Banner.js +2 -2
  8. package/lib/components/designSystemExtension/Banner/Banner.js.map +1 -1
  9. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
  10. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +5 -8
  11. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
  12. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts.map +1 -1
  13. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +6 -8
  14. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
  15. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
  16. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +3 -5
  17. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
  18. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js +2 -2
  19. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
  20. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts.map +1 -1
  21. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +4 -6
  22. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
  23. package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
  24. package/lib/components/designSystemExtension/Operator/Operator.js +3 -4
  25. package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
  26. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -1
  27. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +27 -3
  28. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -1
  29. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.css +4 -4
  30. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js +1 -1
  31. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
  32. package/lib/components/field/CancelAlert/CancelAlert.css +4 -4
  33. package/lib/components/field/CancelAlert/CancelAlert.js +2 -2
  34. package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
  35. package/lib/components/field/Checkbox/Checkbox.d.ts +8 -0
  36. package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
  37. package/lib/components/field/Checkbox/Checkbox.js +52 -3
  38. package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
  39. package/lib/components/field/Currency/currency-utils.d.ts.map +1 -1
  40. package/lib/components/field/Currency/currency-utils.js +0 -2
  41. package/lib/components/field/Currency/currency-utils.js.map +1 -1
  42. package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
  43. package/lib/components/field/Dropdown/Dropdown.js +2 -6
  44. package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
  45. package/lib/components/field/Group/Group.js +2 -2
  46. package/lib/components/field/Group/Group.js.map +1 -1
  47. package/lib/components/field/Location/Location.d.ts +10 -0
  48. package/lib/components/field/Location/Location.d.ts.map +1 -0
  49. package/lib/components/field/Location/Location.js +157 -0
  50. package/lib/components/field/Location/Location.js.map +1 -0
  51. package/lib/components/field/Location/index.d.ts +2 -0
  52. package/lib/components/field/Location/index.d.ts.map +1 -0
  53. package/lib/components/field/Location/index.js +2 -0
  54. package/lib/components/field/Location/index.js.map +1 -0
  55. package/lib/components/field/ObjectReference/ObjectReference.d.ts +16 -0
  56. package/lib/components/field/ObjectReference/ObjectReference.d.ts.map +1 -0
  57. package/lib/components/field/ObjectReference/ObjectReference.js +165 -0
  58. package/lib/components/field/ObjectReference/ObjectReference.js.map +1 -0
  59. package/lib/components/field/ObjectReference/index.d.ts +2 -0
  60. package/lib/components/field/ObjectReference/index.d.ts.map +1 -0
  61. package/lib/components/field/ObjectReference/index.js +2 -0
  62. package/lib/components/field/ObjectReference/index.js.map +1 -0
  63. package/lib/components/field/ObjectReference/utils.d.ts +17 -0
  64. package/lib/components/field/ObjectReference/utils.d.ts.map +1 -0
  65. package/lib/components/field/ObjectReference/utils.js +99 -0
  66. package/lib/components/field/ObjectReference/utils.js.map +1 -0
  67. package/lib/components/field/RadioButtons/RadioButtons.d.ts +7 -0
  68. package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
  69. package/lib/components/field/RadioButtons/RadioButtons.js +12 -1
  70. package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
  71. package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -1
  72. package/lib/components/field/ScalarList/ScalarList.js +1 -2
  73. package/lib/components/field/ScalarList/ScalarList.js.map +1 -1
  74. package/lib/components/field/SelectableCard/SelectableCard.d.ts +2 -0
  75. package/lib/components/field/SelectableCard/SelectableCard.d.ts.map +1 -0
  76. package/lib/components/field/SelectableCard/SelectableCard.js +57 -0
  77. package/lib/components/field/SelectableCard/SelectableCard.js.map +1 -0
  78. package/lib/components/field/SelectableCard/index.d.ts +2 -0
  79. package/lib/components/field/SelectableCard/index.d.ts.map +1 -0
  80. package/lib/components/field/SelectableCard/index.js +2 -0
  81. package/lib/components/field/SelectableCard/index.js.map +1 -0
  82. package/lib/components/field/SelectableCard/utils.d.ts +14 -0
  83. package/lib/components/field/SelectableCard/utils.d.ts.map +1 -0
  84. package/lib/components/field/SelectableCard/utils.js +185 -0
  85. package/lib/components/field/SelectableCard/utils.js.map +1 -0
  86. package/lib/components/field/SemanticLink/SemanticLink.d.ts +9 -1
  87. package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
  88. package/lib/components/field/SemanticLink/SemanticLink.js +128 -15
  89. package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
  90. package/lib/components/field/SemanticLink/utils.js +1 -1
  91. package/lib/components/field/SemanticLink/utils.js.map +1 -1
  92. package/lib/components/field/TextContent/TextContent.d.ts.map +1 -1
  93. package/lib/components/field/TextContent/TextContent.js +0 -1
  94. package/lib/components/field/TextContent/TextContent.js.map +1 -1
  95. package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
  96. package/lib/components/field/UserReference/UserReference.js +0 -1
  97. package/lib/components/field/UserReference/UserReference.js.map +1 -1
  98. package/lib/components/helpers/attachmentHelpers.d.ts +14 -11
  99. package/lib/components/helpers/attachmentHelpers.d.ts.map +1 -1
  100. package/lib/components/helpers/attachmentHelpers.js +52 -30
  101. package/lib/components/helpers/attachmentHelpers.js.map +1 -1
  102. package/lib/components/helpers/common-utils.d.ts +1 -1
  103. package/lib/components/helpers/common-utils.js.map +1 -1
  104. package/lib/components/helpers/data_page.d.ts.map +1 -1
  105. package/lib/components/helpers/data_page.js +0 -1
  106. package/lib/components/helpers/data_page.js.map +1 -1
  107. package/lib/components/helpers/formatters/CurrencyMap.d.ts.map +1 -1
  108. package/lib/components/helpers/formatters/CurrencyMap.js +0 -1
  109. package/lib/components/helpers/formatters/CurrencyMap.js.map +1 -1
  110. package/lib/components/helpers/simpleTableHelpers.d.ts +15 -1
  111. package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
  112. package/lib/components/helpers/simpleTableHelpers.js +110 -4
  113. package/lib/components/helpers/simpleTableHelpers.js.map +1 -1
  114. package/lib/components/helpers/utils.d.ts +1 -0
  115. package/lib/components/helpers/utils.d.ts.map +1 -1
  116. package/lib/components/helpers/utils.js +7 -1
  117. package/lib/components/helpers/utils.js.map +1 -1
  118. package/lib/components/helpers/versionHelpers.d.ts.map +1 -1
  119. package/lib/components/helpers/versionHelpers.js +0 -1
  120. package/lib/components/helpers/versionHelpers.js.map +1 -1
  121. package/lib/components/infra/ActionButtons/ActionButtons.d.ts.map +1 -1
  122. package/lib/components/infra/ActionButtons/ActionButtons.js +12 -7
  123. package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
  124. package/lib/components/infra/Assignment/Assignment.js +0 -1
  125. package/lib/components/infra/Assignment/Assignment.js.map +1 -1
  126. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
  127. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +13 -77
  128. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
  129. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts.map +1 -1
  130. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js +0 -1
  131. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js.map +1 -1
  132. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +0 -2
  133. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
  134. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
  135. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +3 -4
  136. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
  137. package/lib/components/infra/Containers/container-helpers.d.ts +1 -0
  138. package/lib/components/infra/Containers/container-helpers.d.ts.map +1 -1
  139. package/lib/components/infra/Containers/container-helpers.js +46 -1
  140. package/lib/components/infra/Containers/container-helpers.js.map +1 -1
  141. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
  142. package/lib/components/infra/DashboardFilter/DashboardFilter.js +0 -2
  143. package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
  144. package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -1
  145. package/lib/components/infra/DashboardFilter/filterUtils.js +2 -3
  146. package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
  147. package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
  148. package/lib/components/infra/DeferLoad/DeferLoad.js +1 -3
  149. package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
  150. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
  151. package/lib/components/infra/ErrorBoundary/ErrorBoundary.js +0 -2
  152. package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
  153. package/lib/components/infra/MultiStep/MultiStep.css +8 -8
  154. package/lib/components/infra/NavBar/NavBar.css +1 -1
  155. package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
  156. package/lib/components/infra/NavBar/NavBar.js +2 -3
  157. package/lib/components/infra/NavBar/NavBar.js.map +1 -1
  158. package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
  159. package/lib/components/infra/Reference/Reference.js +2 -3
  160. package/lib/components/infra/Reference/Reference.js.map +1 -1
  161. package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
  162. package/lib/components/infra/RootContainer/RootContainer.js +0 -1
  163. package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
  164. package/lib/components/template/AdvancedSearch/AdvancedSearch.d.ts.map +1 -1
  165. package/lib/components/template/AdvancedSearch/AdvancedSearch.js +0 -1
  166. package/lib/components/template/AdvancedSearch/AdvancedSearch.js.map +1 -1
  167. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.d.ts +0 -1
  168. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.d.ts.map +1 -1
  169. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.js +2 -8
  170. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.js.map +1 -1
  171. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.d.ts.map +1 -1
  172. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.js +3 -5
  173. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.js.map +1 -1
  174. package/lib/components/template/AdvancedSearch/SearchGroups/hooks.js +0 -1
  175. package/lib/components/template/AdvancedSearch/SearchGroups/hooks.js.map +1 -1
  176. package/lib/components/template/AppShell/AppShell.css +1 -1
  177. package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
  178. package/lib/components/template/AppShell/AppShell.js +4 -9
  179. package/lib/components/template/AppShell/AppShell.js.map +1 -1
  180. package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
  181. package/lib/components/template/CaseSummary/CaseSummary.js +0 -1
  182. package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
  183. package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
  184. package/lib/components/template/CaseView/CaseView.js +4 -5
  185. package/lib/components/template/CaseView/CaseView.js.map +1 -1
  186. package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
  187. package/lib/components/template/Confirmation/Confirmation.js +0 -1
  188. package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
  189. package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
  190. package/lib/components/template/DataReference/DataReference.js +8 -12
  191. package/lib/components/template/DataReference/DataReference.js.map +1 -1
  192. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.d.ts +1 -1
  193. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.d.ts.map +1 -1
  194. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.js.map +1 -1
  195. package/lib/components/template/DataReference/SearchForm.d.ts.map +1 -1
  196. package/lib/components/template/DataReference/SearchForm.js +3 -2
  197. package/lib/components/template/DataReference/SearchForm.js.map +1 -1
  198. package/lib/components/template/DataReference/utils.d.ts +4 -4
  199. package/lib/components/template/DataReference/utils.d.ts.map +1 -1
  200. package/lib/components/template/DataReference/utils.js +1 -1
  201. package/lib/components/template/DataReference/utils.js.map +1 -1
  202. package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
  203. package/lib/components/template/DefaultPage/DefaultPage.d.ts +36 -0
  204. package/lib/components/template/DefaultPage/DefaultPage.d.ts.map +1 -0
  205. package/lib/components/template/DefaultPage/DefaultPage.js +19 -0
  206. package/lib/components/template/DefaultPage/DefaultPage.js.map +1 -0
  207. package/lib/components/template/DefaultPage/index.d.ts +2 -0
  208. package/lib/components/template/DefaultPage/index.d.ts.map +1 -0
  209. package/lib/components/template/DefaultPage/index.js +2 -0
  210. package/lib/components/template/DefaultPage/index.js.map +1 -0
  211. package/lib/components/template/Details/Details/Details.js +2 -3
  212. package/lib/components/template/Details/Details/Details.js.map +1 -1
  213. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +2 -3
  214. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
  215. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +2 -3
  216. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
  217. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
  218. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +1 -2
  219. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
  220. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
  221. package/lib/components/template/InlineDashboard/InlineDashboard.js +2 -2
  222. package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
  223. package/lib/components/template/ListView/ListView.d.ts.map +1 -1
  224. package/lib/components/template/ListView/ListView.js +2 -13
  225. package/lib/components/template/ListView/ListView.js.map +1 -1
  226. package/lib/components/template/ListView/hooks.d.ts.map +1 -1
  227. package/lib/components/template/ListView/hooks.js +2 -5
  228. package/lib/components/template/ListView/hooks.js.map +1 -1
  229. package/lib/components/template/ListView/utils.js +0 -1
  230. package/lib/components/template/ListView/utils.js.map +1 -1
  231. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js.map +1 -1
  232. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +2 -3
  233. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
  234. package/lib/components/template/OneColumn/OneColumn/OneColumn.js +2 -2
  235. package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
  236. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
  237. package/lib/components/template/PromotedFilters/PromotedFilters.js +0 -1
  238. package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
  239. package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.d.ts +2 -0
  240. package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.d.ts.map +1 -0
  241. package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.js +4 -0
  242. package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.js.map +1 -0
  243. package/lib/components/template/SelfServiceCaseView/index.d.ts +2 -0
  244. package/lib/components/template/SelfServiceCaseView/index.d.ts.map +1 -0
  245. package/lib/components/template/SelfServiceCaseView/index.js +2 -0
  246. package/lib/components/template/SelfServiceCaseView/index.js.map +1 -0
  247. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
  248. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js +1 -2
  249. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
  250. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
  251. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +32 -30
  252. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
  253. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
  254. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +1 -2
  255. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
  256. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
  257. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +1 -2
  258. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
  259. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js.map +1 -1
  260. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +2 -3
  261. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
  262. package/lib/components/template/WssNavBar/WssNavBar.css +1 -1
  263. package/lib/components/template/WssNavBar/WssNavBar.js +2 -2
  264. package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
  265. package/lib/components/widget/Attachment/Attachment.css +6 -8
  266. package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
  267. package/lib/components/widget/Attachment/Attachment.js +52 -51
  268. package/lib/components/widget/Attachment/Attachment.js.map +1 -1
  269. package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
  270. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.css +0 -14
  271. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js +1 -1
  272. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
  273. package/lib/components/widget/FileUtility/FileUtility/FileUtility.css +7 -6
  274. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
  275. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +3 -4
  276. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
  277. package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
  278. package/lib/components/widget/Followers/Followers.js +0 -2
  279. package/lib/components/widget/Followers/Followers.js.map +1 -1
  280. package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
  281. package/lib/components/widget/QuickCreate/QuickCreate.js +0 -1
  282. package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
  283. package/lib/components/widget/SummaryItem/SummaryItem.css +9 -11
  284. package/lib/components/widget/SummaryItem/SummaryItem.js +1 -1
  285. package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
  286. package/lib/components/widget/ToDo/ToDo.css +1 -13
  287. package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
  288. package/lib/components/widget/ToDo/ToDo.js +11 -5
  289. package/lib/components/widget/ToDo/ToDo.js.map +1 -1
  290. package/lib/hooks/useGetTabsCount.d.ts.map +1 -1
  291. package/lib/hooks/useGetTabsCount.js +2 -3
  292. package/lib/hooks/useGetTabsCount.js.map +1 -1
  293. package/lib/sdk-pega-component-map.d.ts +10 -0
  294. package/lib/sdk-pega-component-map.d.ts.map +1 -1
  295. package/lib/sdk-pega-component-map.js +11 -0
  296. package/lib/sdk-pega-component-map.js.map +1 -1
  297. package/lib/theme.d.ts +23 -0
  298. package/lib/theme.d.ts.map +1 -1
  299. package/lib/theme.js +187 -2
  300. package/lib/theme.js.map +1 -1
  301. package/lib/types/PConnProps.d.ts +1 -1
  302. package/package.json +2 -1
@@ -1 +1 @@
1
- {"version":3,"file":"sdk_component_map.d.ts","sourceRoot":"","sources":["../../../src/bridge/helpers/sdk_component_map.ts"],"names":[],"mappings":"AAWA,eAAO,IAAI,eAAe,KAAA,CAAC;AAwF3B,wBAAgB,mBAAmB,CAAC,eAAe,EAAE,MAAM,GAAG,GAAG,CAmBhE;AAYD,wBAAsB,kBAAkB,CAAC,mBAAmB,KAAK,oBAmChE"}
1
+ {"version":3,"file":"sdk_component_map.d.ts","sourceRoot":"","sources":["../../../src/bridge/helpers/sdk_component_map.ts"],"names":[],"mappings":"AAWA,eAAO,IAAI,eAAe,KAAA,CAAC;AAuF3B,wBAAgB,mBAAmB,CAAC,eAAe,EAAE,MAAM,GAAG,GAAG,CAiBhE;AAYD,wBAAsB,kBAAkB,CAAC,mBAAmB,KAAK,oBAkChE"}
@@ -6,7 +6,6 @@ import pegaSdkComponentMap from '../../sdk-pega-component-map';
6
6
  // Create a singleton for this class (with async loading of components map file) and export it
7
7
  // Note: Initializing SdkComponentMap to null seems to cause lots of compile issues with references
8
8
  // within other components and the value potentially being null (so try to leave it undefined)
9
- // eslint-disable-next-line import/no-mutable-exports
10
9
  export let SdkComponentMap;
11
10
  let SdkComponentMapCreateInProgress = false;
12
11
  class ComponentMap {
@@ -39,7 +38,6 @@ class ComponentMap {
39
38
  Promise.all([theLocalCompPromise, thePegaCompPromise])
40
39
  .then(() => this.sdkComponentMap)
41
40
  .catch(error => {
42
- // eslint-disable-next-line no-console
43
41
  console.error(`Error in readSdkComponentMap: ${error}`);
44
42
  });
45
43
  }
@@ -80,7 +78,6 @@ export function getComponentFromMap(inComponentName) {
80
78
  let theComponentImplementation = null;
81
79
  const theLocalComponent = SdkComponentMap.getLocalComponentMap()[inComponentName];
82
80
  if (theLocalComponent !== undefined) {
83
- // eslint-disable-next-line no-console
84
81
  console.log(`Requested component found ${inComponentName}: Local`);
85
82
  theComponentImplementation = theLocalComponent;
86
83
  }
@@ -91,7 +88,6 @@ export function getComponentFromMap(inComponentName) {
91
88
  theComponentImplementation = thePegaProvidedComponent;
92
89
  }
93
90
  else {
94
- // eslint-disable-next-line no-console
95
91
  console.error(`Requested component has neither Local nor Pega-provided implementation: ${inComponentName}`);
96
92
  theComponentImplementation = getComponentFromMap('ErrorBoundary');
97
93
  }
@@ -117,7 +113,6 @@ export async function getSdkComponentMap(inLocalComponentMap = {}) {
117
113
  // Key initialization of SdkComponentMap
118
114
  SdkComponentMap = theComponentMap;
119
115
  SdkComponentMapCreateInProgress = false;
120
- // eslint-disable-next-line no-console
121
116
  console.log(`getSdkComponentMap: created SdkComponentMap singleton`);
122
117
  // Create and dispatch the SdkConfigAccessReady event
123
118
  // Not used anyplace yet but putting it in place in case we need it.
@@ -137,7 +132,6 @@ export async function getSdkComponentMap(inLocalComponentMap = {}) {
137
132
  idNextCheck = setInterval(fnCheckForConfig, 500);
138
133
  };
139
134
  if (SdkComponentMap) {
140
- // eslint-disable-next-line no-promise-executor-return
141
135
  return resolve(SdkComponentMap.sdkComponentMap);
142
136
  }
143
137
  idNextCheck = setInterval(fnCheckForConfig, 500);
@@ -1 +1 @@
1
- {"version":3,"file":"sdk_component_map.js","sourceRoot":"","sources":["../../../src/bridge/helpers/sdk_component_map.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,gCAAgC;AAChC,oEAAoE;AACpE,OAAO,mBAAmB,MAAM,8BAA8B,CAAC;AAE/D,yCAAyC;AAEzC,8FAA8F;AAC9F,mGAAmG;AACnG,+FAA+F;AAC/F,qDAAqD;AACrD,MAAM,CAAC,IAAI,eAAe,CAAC;AAC3B,IAAI,+BAA+B,GAAG,KAAK,CAAC;AAO5C,MAAM,YAAY;IAChB,eAAe,CAAmB,CAAC,mBAAmB;IACtD,oBAAoB,CAAU;IAE9B;QACE,sCAAsC;QACtC,IAAI,CAAC,eAAe,GAAG;YACrB,iBAAiB,EAAE,EAAE;YACrB,wBAAwB,EAAE,EAAE;SAC7B,CAAC;QAEF,kFAAkF;QAClF,IAAI,CAAC,oBAAoB,GAAG,KAAK,CAAC;QAElC,uFAAuF;QACvF,0DAA0D;QAC1D,IAAI,CAAC,eAAe,CAAC,iBAAiB,GAAG,EAAE,CAAC;QAE5C,IAAI,CAAC,eAAe,CAAC,wBAAwB,GAAG,EAAE,CAAC;QAEnD,iFAAiF;QACjF,6BAA6B;IAC/B,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,mBAAmB,CAAC,sBAAsB,GAAG,EAAE;QACnD,YAAY;QACZ,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,wBAAwB,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAChJ,MAAM,mBAAmB,GAAG,IAAI,CAAC,wBAAwB,CAAC,sBAAsB,CAAC,CAAC;YAClF,MAAM,kBAAkB,G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AW,GAAG,WAAW,CAAC,gBAAgB,EAAE,GAAG,CAAC,CAAC;QACnD,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["// Helper singleton class to assist with loading and\n// accessing the SDK components\n// import localSdkComponentMap from '../../sdk-local-component-map';\nimport pegaSdkComponentMap from '../../sdk-pega-component-map';\n\n// Statically load all \"local\" components\n\n// Create a singleton for this class (with async loading of components map file) and export it\n// Note: Initializing SdkComponentMap to null seems to cause lots of compile issues with references\n// within other components and the value potentially being null (so try to leave it undefined)\n// eslint-disable-next-line import/no-mutable-exports\nexport let SdkComponentMap;\nlet SdkComponentMapCreateInProgress = false;\n\ninterface ISdkComponentMap {\n localComponentMap: Object;\n pegaProvidedComponentMap: Object;\n}\n\nclass ComponentMap {\n sdkComponentMap: ISdkComponentMap; // Top level object\n isComponentMapLoaded: boolean;\n\n constructor() {\n // sdkComponentMap is top-level object\n this.sdkComponentMap = {\n localComponentMap: {},\n pegaProvidedComponentMap: {}\n };\n\n // isCoComponentMapLoaded will be updated to true after the async load is complete\n this.isComponentMapLoaded = false;\n\n // pegaSdkComponents.local is the JSON object where we'll store the components that are\n // found locally or can be found in the Pega-provided repo\n this.sdkComponentMap.localComponentMap = {};\n\n this.sdkComponentMap.pegaProvidedComponentMap = {};\n\n // The \"work\" to load the config file is done (asynchronously) via the initialize\n // (Factory function) below)\n }\n\n /**\n * Asynchronous initialization of the config file contents.\n * @returns Promise of config file fetch\n */\n async readSdkComponentMap(inLocalSdkComponentMap = {}) {\n // debugger;\n if (Object.keys(this.sdkComponentMap.localComponentMap).length === 0 && Object.keys(this.sdkComponentMap.pegaProvidedComponentMap).length === 0) {\n const theLocalCompPromise = this.readLocalSdkComponentMap(inLocalSdkComponentMap);\n const thePegaCompPromise = this.readPegaSdkComponentMap(pegaSdkComponentMap);\n\n Promise.all([theLocalCompPromise, thePegaCompPromise])\n .then(() => this.sdkComponentMap)\n .catch(error => {\n // eslint-disable-next-line no-console\n console.error(`Error in readSdkComponentMap: ${error}`);\n });\n } else {\n return Promise.resolve(this.sdkComponentMap);\n }\n }\n\n async readLocalSdkComponentMap(inLocalSdkComponentMap = {}) {\n // debugger;\n if (Object.entries(this.getLocalComponentMap()).length === 0) {\n this.sdkComponentMap.localComponentMap = inLocalSdkComponentMap;\n }\n return Promise.resolve(this);\n }\n\n async readPegaSdkComponentMap(inPegaSdkComponentMap = {}) {\n // debugger;\n if (Object.entries(this.getPegaProvidedComponentMap()).length === 0) {\n this.sdkComponentMap.pegaProvidedComponentMap = inPegaSdkComponentMap;\n }\n return Promise.resolve(this);\n }\n\n getLocalComponentMap = () => {\n return this.sdkComponentMap.localComponentMap;\n };\n\n setLocalComponentMap(inLocalSdkComponentMap) {\n this.sdkComponentMap.localComponentMap = inLocalSdkComponentMap;\n return this.sdkComponentMap.localComponentMap;\n }\n\n getPegaProvidedComponentMap = () => {\n return this.sdkComponentMap.pegaProvidedComponentMap;\n };\n\n setPegaProvidedComponentMap = inPegaProvidedComponentMap => {\n this.sdkComponentMap.pegaProvidedComponentMap = inPegaProvidedComponentMap;\n return this.sdkComponentMap.pegaProvidedComponentMap;\n };\n}\n\nexport function getComponentFromMap(inComponentName: string): any {\n let theComponentImplementation = null;\n const theLocalComponent = SdkComponentMap.getLocalComponentMap()[inComponentName];\n if (theLocalComponent !== undefined) {\n // eslint-disable-next-line no-console\n console.log(`Requested component found ${inComponentName}: Local`);\n theComponentImplementation = theLocalComponent;\n } else {\n const thePegaProvidedComponent = SdkComponentMap.getPegaProvidedComponentMap()[inComponentName];\n if (thePegaProvidedComponent !== undefined) {\n // console.log(`Requested component found ${inComponentName}: Pega-provided`);\n theComponentImplementation = thePegaProvidedComponent;\n } else {\n // eslint-disable-next-line no-console\n console.error(`Requested component has neither Local nor Pega-provided implementation: ${inComponentName}`);\n theComponentImplementation = getComponentFromMap('ErrorBoundary');\n }\n }\n return theComponentImplementation;\n}\n\n// Implement Factory function to allow async load\n// See https://stackoverflow.com/questions/49905178/asynchronous-operations-in-constructor/49906064#49906064 for inspiration\nasync function createSdkComponentMap(inLocalComponentMap = {}) {\n // Note that our initialize function returns a promise...\n const singleton = new ComponentMap();\n await singleton.readSdkComponentMap(inLocalComponentMap);\n return singleton;\n}\n\n// Initialize exported SdkComponentMap structure\nexport async function getSdkComponentMap(inLocalComponentMap = {}) {\n return new Promise(resolve => {\n let idNextCheck;\n if (!SdkComponentMap && !SdkComponentMapCreateInProgress) {\n SdkComponentMapCreateInProgress = true;\n createSdkComponentMap(inLocalComponentMap).then(theComponentMap => {\n // debugger;\n // Key initialization of SdkComponentMap\n SdkComponentMap = theComponentMap;\n SdkComponentMapCreateInProgress = false;\n // eslint-disable-next-line no-console\n console.log(`getSdkComponentMap: created SdkComponentMap singleton`);\n // Create and dispatch the SdkConfigAccessReady event\n // Not used anyplace yet but putting it in place in case we need it.\n const event = new CustomEvent('SdkComponentMapReady', {});\n document.dispatchEvent(event);\n return resolve(SdkComponentMap /* .sdkComponentMap */);\n });\n } else {\n const fnCheckForConfig = () => {\n if (SdkComponentMap) {\n if (idNextCheck) {\n clearInterval(idNextCheck);\n }\n return resolve(SdkComponentMap.sdkComponentMap);\n }\n idNextCheck = setInterval(fnCheckForConfig, 500);\n };\n if (SdkComponentMap) {\n // eslint-disable-next-line no-promise-executor-return\n return resolve(SdkComponentMap.sdkComponentMap);\n }\n idNextCheck = setInterval(fnCheckForConfig, 500);\n }\n });\n}\n"]}
1
+ {"version":3,"file":"sdk_component_map.js","sourceRoot":"","sources":["../../../src/bridge/helpers/sdk_component_map.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,gCAAgC;AAChC,oEAAoE;AACpE,OAAO,mBAAmB,MAAM,8BAA8B,CAAC;AAE/D,yCAAyC;AAEzC,8FAA8F;AAC9F,mGAAmG;AACnG,+FAA+F;AAE/F,MAAM,CAAC,IAAI,eAAe,CAAC;AAC3B,IAAI,+BAA+B,GAAG,KAAK,CAAC;AAO5C,MAAM,YAAY;IAChB,eAAe,CAAmB,CAAC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AAC,uDAAuD,CAAC,CAAC;gBACrE,qDAAqD;gBACrD,qEAAqE;gBACrE,MAAM,KAAK,GAAG,IAAI,WAAW,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC;gBAC1D,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;gBAC9B,OAAO,OAAO,CAAC,eAAe,CAAC,sBAAsB,CAAC,CAAC;YACzD,CAAC,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACN,MAAM,gBAAgB,GAAG,GAAG,EAAE;gBAC5B,IAAI,eAAe,EAAE,CAAC;oBACpB,IAAI,WAAW,EAAE,CAAC;wBAChB,aAAa,CAAC,WAAW,CAAC,CAAC;oBAC7B,CAAC;oBACD,OAAO,OAAO,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC;gBAClD,CAAC;gBACD,WAAW,GAAG,WAAW,CAAC,gBAAgB,EAAE,GAAG,CAAC,CAAC;YACnD,CAAC,CAAC;YACF,IAAI,eAAe,EAAE,CAAC;gBACpB,OAAO,OAAO,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC;YAClD,CAAC;YACD,WAAW,GAAG,WAAW,CAAC,gBAAgB,EAAE,GAAG,CAAC,CAAC;QACnD,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["// Helper singleton class to assist with loading and\n// accessing the SDK components\n// import localSdkComponentMap from '../../sdk-local-component-map';\nimport pegaSdkComponentMap from '../../sdk-pega-component-map';\n\n// Statically load all \"local\" components\n\n// Create a singleton for this class (with async loading of components map file) and export it\n// Note: Initializing SdkComponentMap to null seems to cause lots of compile issues with references\n// within other components and the value potentially being null (so try to leave it undefined)\n\nexport let SdkComponentMap;\nlet SdkComponentMapCreateInProgress = false;\n\ninterface ISdkComponentMap {\n localComponentMap: object;\n pegaProvidedComponentMap: object;\n}\n\nclass ComponentMap {\n sdkComponentMap: ISdkComponentMap; // Top level object\n isComponentMapLoaded: boolean;\n\n constructor() {\n // sdkComponentMap is top-level object\n this.sdkComponentMap = {\n localComponentMap: {},\n pegaProvidedComponentMap: {}\n };\n\n // isCoComponentMapLoaded will be updated to true after the async load is complete\n this.isComponentMapLoaded = false;\n\n // pegaSdkComponents.local is the JSON object where we'll store the components that are\n // found locally or can be found in the Pega-provided repo\n this.sdkComponentMap.localComponentMap = {};\n\n this.sdkComponentMap.pegaProvidedComponentMap = {};\n\n // The \"work\" to load the config file is done (asynchronously) via the initialize\n // (Factory function) below)\n }\n\n /**\n * Asynchronous initialization of the config file contents.\n * @returns Promise of config file fetch\n */\n async readSdkComponentMap(inLocalSdkComponentMap = {}) {\n // debugger;\n if (Object.keys(this.sdkComponentMap.localComponentMap).length === 0 && Object.keys(this.sdkComponentMap.pegaProvidedComponentMap).length === 0) {\n const theLocalCompPromise = this.readLocalSdkComponentMap(inLocalSdkComponentMap);\n const thePegaCompPromise = this.readPegaSdkComponentMap(pegaSdkComponentMap);\n\n Promise.all([theLocalCompPromise, thePegaCompPromise])\n .then(() => this.sdkComponentMap)\n .catch(error => {\n console.error(`Error in readSdkComponentMap: ${error}`);\n });\n } else {\n return Promise.resolve(this.sdkComponentMap);\n }\n }\n\n async readLocalSdkComponentMap(inLocalSdkComponentMap = {}) {\n // debugger;\n if (Object.entries(this.getLocalComponentMap()).length === 0) {\n this.sdkComponentMap.localComponentMap = inLocalSdkComponentMap;\n }\n return Promise.resolve(this);\n }\n\n async readPegaSdkComponentMap(inPegaSdkComponentMap = {}) {\n // debugger;\n if (Object.entries(this.getPegaProvidedComponentMap()).length === 0) {\n this.sdkComponentMap.pegaProvidedComponentMap = inPegaSdkComponentMap;\n }\n return Promise.resolve(this);\n }\n\n getLocalComponentMap = () => {\n return this.sdkComponentMap.localComponentMap;\n };\n\n setLocalComponentMap(inLocalSdkComponentMap) {\n this.sdkComponentMap.localComponentMap = inLocalSdkComponentMap;\n return this.sdkComponentMap.localComponentMap;\n }\n\n getPegaProvidedComponentMap = () => {\n return this.sdkComponentMap.pegaProvidedComponentMap;\n };\n\n setPegaProvidedComponentMap = inPegaProvidedComponentMap => {\n this.sdkComponentMap.pegaProvidedComponentMap = inPegaProvidedComponentMap;\n return this.sdkComponentMap.pegaProvidedComponentMap;\n };\n}\n\nexport function getComponentFromMap(inComponentName: string): any {\n let theComponentImplementation = null;\n const theLocalComponent = SdkComponentMap.getLocalComponentMap()[inComponentName];\n if (theLocalComponent !== undefined) {\n console.log(`Requested component found ${inComponentName}: Local`);\n theComponentImplementation = theLocalComponent;\n } else {\n const thePegaProvidedComponent = SdkComponentMap.getPegaProvidedComponentMap()[inComponentName];\n if (thePegaProvidedComponent !== undefined) {\n // console.log(`Requested component found ${inComponentName}: Pega-provided`);\n theComponentImplementation = thePegaProvidedComponent;\n } else {\n console.error(`Requested component has neither Local nor Pega-provided implementation: ${inComponentName}`);\n theComponentImplementation = getComponentFromMap('ErrorBoundary');\n }\n }\n return theComponentImplementation;\n}\n\n// Implement Factory function to allow async load\n// See https://stackoverflow.com/questions/49905178/asynchronous-operations-in-constructor/49906064#49906064 for inspiration\nasync function createSdkComponentMap(inLocalComponentMap = {}) {\n // Note that our initialize function returns a promise...\n const singleton = new ComponentMap();\n await singleton.readSdkComponentMap(inLocalComponentMap);\n return singleton;\n}\n\n// Initialize exported SdkComponentMap structure\nexport async function getSdkComponentMap(inLocalComponentMap = {}) {\n return new Promise(resolve => {\n let idNextCheck;\n if (!SdkComponentMap && !SdkComponentMapCreateInProgress) {\n SdkComponentMapCreateInProgress = true;\n createSdkComponentMap(inLocalComponentMap).then(theComponentMap => {\n // debugger;\n // Key initialization of SdkComponentMap\n SdkComponentMap = theComponentMap;\n SdkComponentMapCreateInProgress = false;\n\n console.log(`getSdkComponentMap: created SdkComponentMap singleton`);\n // Create and dispatch the SdkConfigAccessReady event\n // Not used anyplace yet but putting it in place in case we need it.\n const event = new CustomEvent('SdkComponentMapReady', {});\n document.dispatchEvent(event);\n return resolve(SdkComponentMap /* .sdkComponentMap */);\n });\n } else {\n const fnCheckForConfig = () => {\n if (SdkComponentMap) {\n if (idNextCheck) {\n clearInterval(idNextCheck);\n }\n return resolve(SdkComponentMap.sdkComponentMap);\n }\n idNextCheck = setInterval(fnCheckForConfig, 500);\n };\n if (SdkComponentMap) {\n return resolve(SdkComponentMap.sdkComponentMap);\n }\n idNextCheck = setInterval(fnCheckForConfig, 500);\n }\n });\n}\n"]}
@@ -29,7 +29,6 @@ export const setVisibilityForList = (c11nEnv, visibility) => {
29
29
  }
30
30
  };
31
31
  function withVisibility(WrappedComponent) {
32
- // eslint-disable-next-line react/prefer-stateless-function
33
32
  return class extends Component {
34
33
  render() {
35
34
  const { visibility } = this.props;
@@ -46,7 +45,6 @@ const connectRedux = (component, c11nEnv) => {
46
45
  const obj = {};
47
46
  // Need to use ownProps pconnect since c11nEnv is stale and prior to re-render
48
47
  if (!ownProps.getPConnect) {
49
- // eslint-disable-next-line no-console
50
48
  console.error('connectRedux ownProps are not defined');
51
49
  }
52
50
  else {
@@ -82,6 +80,15 @@ const connectRedux = (component, c11nEnv) => {
82
80
  }
83
81
  }
84
82
  }
83
+ // For CaseSummary, we need to compare changes in
84
+ // primaryFields and secondary Fields
85
+ if (next.template === 'CaseSummary') {
86
+ for (const key of Object.keys(prev)) {
87
+ if (!PCore.isDeepEqual(next[key], prev[key])) {
88
+ return false;
89
+ }
90
+ }
91
+ }
85
92
  /* TODO For some rawConfig we are not getting routingInfo under allStateProps */
86
93
  return !routingInfoCompare(next, prev);
87
94
  }
@@ -101,7 +108,6 @@ const getComponent = c11nEnv => {
101
108
  // This is the node_modules version of react_pconnect!
102
109
  const theLocalComponent = SdkComponentMap.getLocalComponentMap()[componentType];
103
110
  if (theLocalComponent !== undefined) {
104
- // eslint-disable-next-line no-console
105
111
  console.log(`react_pconnect getComponent found ${componentType}: Local`);
106
112
  component = theLocalComponent;
107
113
  }
@@ -112,7 +118,6 @@ const getComponent = c11nEnv => {
112
118
  component = thePegaProvidedComponent;
113
119
  }
114
120
  else {
115
- // eslint-disable-next-line no-console
116
121
  console.error(`react_pconnect: getComponent doesn't have an entry for type ${type}`);
117
122
  component = ErrorBoundary;
118
123
  }
@@ -121,12 +126,10 @@ const getComponent = c11nEnv => {
121
126
  else {
122
127
  // We no longer handle the "old" switch statement that was here in the original packaging.
123
128
  // All components seen here need to be in the SdkComponentMap
124
- // eslint-disable-next-line no-console
125
129
  console.error(`SdkComponentMap not defined! Unable to process component: ${componentType}`);
126
130
  }
127
131
  }
128
132
  else {
129
- // eslint-disable-next-line no-console
130
133
  console.log(`getComponent doesn't have an entry for component ${component}`);
131
134
  component = ErrorBoundary;
132
135
  }
@@ -155,7 +158,6 @@ class PConnect extends Component {
155
158
  this.eventHandler = this.eventHandler.bind(this);
156
159
  this.changeHandler = this.changeHandler.bind(this);
157
160
  this.c11nEnv = getPConnect();
158
- // eslint-disable-next-line react/no-unused-class-component-methods
159
161
  this.Control = getComponent(this.c11nEnv);
160
162
  this.actionsAPI = this.c11nEnv.getActionsApi();
161
163
  this.processActions(this.c11nEnv);
@@ -172,7 +174,6 @@ class PConnect extends Component {
172
174
  setVisibilityForList(this.c11nEnv, true);
173
175
  }
174
176
  componentDidCatch(error, info) {
175
- // eslint-disable-next-line no-console
176
177
  console.error(`Error while Rendering the component ${this.componentName} : `, error, info.componentStack);
177
178
  }
178
179
  componentWillUnmount() {
@@ -203,10 +204,9 @@ class PConnect extends Component {
203
204
  createChildren() {
204
205
  const { getPConnect } = this.props;
205
206
  if (getPConnect().hasChildren() && getPConnect().getChildren()) {
206
- return (getPConnect()
207
+ return getPConnect()
207
208
  .getChildren()
208
- // eslint-disable-next-line react/no-array-index-key
209
- .map((childProps, index) => _jsx(PConnect, { ...childProps }, `${this.getKey(childProps)}_${index}`)));
209
+ .map((childProps, index) => _jsx(PConnect, { ...childProps }, `${this.getKey(childProps)}_${index}`));
210
210
  }
211
211
  return null;
212
212
  }
@@ -245,7 +245,6 @@ class PConnect extends Component {
245
245
  return _jsx(this.Control, { ...finalProps, children: this.createChildren() });
246
246
  }
247
247
  }
248
- // eslint-disable-next-line react/static-property-placement
249
248
  PConnect.propTypes = {
250
249
  // __internal: PropTypes.object.isRequired,
251
250
  // meta: PropTypes.object.isRequired,
@@ -257,7 +256,6 @@ PConnect.propTypes = {
257
256
  }),
258
257
  validatemessage: PropTypes.string
259
258
  };
260
- // eslint-disable-next-line react/static-property-placement
261
259
  PConnect.defaultProps = {
262
260
  additionalProps: {},
263
261
  validatemessage: ''
@@ -1 +1 @@
1
- {"version":3,"file":"react_pconnect.js","sourceRoot":"","sources":["../../src/bridge/react_pconnect.jsx"],"names":[],"mappings":";;AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEpD,OAAO,YAAY,EAAE,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,mBAAmB,CAAC,CAAC,2CAA2C;AAC1H,OAAO,aAAa,MAAM,mCAAmC,CAAC;AAE9D,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAElD,iHAAiH;AAEjH,0FAA0F;AAC1F,uFAAuF;AACvF,4BAA4B;AAE5B,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,MAAM,gBAAgB,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;IAC3C,OAAO,CAAC,CAAC,GAAG,KAAK,SAAS,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAC5D,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE;IACxC,OAAO,aAAa,IAAI,IAAI,IAAI,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAA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C,0BAA0B,EAAE,SAAS,KAAK,CAAC,cAAc,EAAE,CAAC,WAAW,EAAE,cAAc,IAAI,KAAK,CAAC;oBAC1I,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;gBACtE,CAAC;qBAAM,CAAC;oBACN,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;wBACpE,YAAY,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;4BAC1C,gBAAgB,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;wBAClC,CAAC,CAAC,CAAC;oBACL,CAAC;oBACD,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;wBACpE,YAAY,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;4BAC1C,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;wBACtE,CAAC,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC,CAAC,CAAC;QACH;;;;;YAKI;QACJ,MAAM,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,uBAAuB,GAAG,GAAG,EAAE;IACnC,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAEF,eAAe,uBAAuB,CAAC","sourcesContent":["import { Component, createElement } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect, shallowEqual } from 'react-redux';\n\nimport ComponentMap, { LazyMap as LazyComponentMap } from '../components_map'; // was '../../../../../src/components_map';\nimport ErrorBoundary from '../components/infra/ErrorBoundary';\n\nimport StoreContext from './Context/StoreContext';\n\n// const pathToComponents = \"../../../../../src/components\"; /* When bridge was local, it was \"../components\" */\n\n// For now, NOT doing lazy loading - needs some work on the loader to work with TypeScript\n// As we add components, we'll need to import them here and add to the switch statement\n// below in getComponent!\n\nimport { SdkComponentMap } from './helpers/sdk_component_map';\n\nconst isClassIDCompare = (key, prev, next) => {\n return !(key === 'classID' && (!prev[key] || !next[key]));\n};\n\nconst routingInfoCompare = (next, prev) => {\n return 'routingInfo' in next && (!shallowEqual(next.routingInfo, prev.routingInfo) || !PCore.isDeepEqual(next.routingInfo, prev.routingInfo));\n};\n\n/** Generate unique id for elements */\nconst createUID = () => {\n return `_${Math.random().toString(36).slice(2, 11)}`;\n};\n\nexport const setVisibilityForList = (c11nEnv, visibility) => {\n const { selectionMode, selectionList, renderMode, referenceList } = c11nEnv.getComponentConfig();\n // usecase:multiselect, fieldgroup, editable table\n if ((selectionMode === PCore.getConstants().LIST_SELECTION_MODE.MULTI && selectionList) || (renderMode === 'Editable' && referenceList)) {\n c11nEnv.getListActions().setVisibility(visibility);\n }\n};\n\nfunction withVisibility(WrappedComponent) {\n // eslint-disable-next-line react/prefer-stateless-function\n return class extends Component {\n render() {\n const { visibility } = this.props;\n\n if (visibility === false) {\n return null;\n }\n return <WrappedComponent {...this.props} />;\n }\n };\n}\n\nconst connectRedux = (component, c11nEnv) => {\n return connect(\n (state, ownProps) => {\n let addProps = {};\n const obj = {};\n // Need to use ownProps pconnect since c11nEnv is stale and prior to re-render\n if (!ownProps.getPConnect) {\n // eslint-disable-next-line no-console\n console.error('connectRedux ownProps are not defined');\n } else {\n c11nEnv = ownProps.getPConnect();\n }\n\n if (typeof component.additionalProps === 'object') {\n addProps = c11nEnv.resolveConfigProps(component.additionalProps);\n } else if (typeof component.additionalProps === 'function') {\n addProps = c11nEnv.resolveConfigProps(component.additionalProps(state, ownProps.getPConnect));\n }\n\n c11nEnv.getConfigProps(obj);\n\n // populate additional props which are component specific and not present in configurations\n // This block can be removed once all these props will be added as part of configs\n c11nEnv.populateAdditionalProps(obj);\n\n return {\n ...obj,\n ...addProps\n };\n },\n null,\n null,\n {\n context: StoreContext,\n areStatePropsEqual: (next, prev) => {\n const allStateProps = c11nEnv.getStateProps();\n for (const key of Object.keys(allStateProps)) {\n if (Object.prototype.hasOwnProperty.call(allStateProps, key)) {\n if (key === 'inheritedProps' && next.inheritedProps && !PCore.isDeepEqual(next.inheritedProps, prev.inheritedProps)) {\n return false;\n }\n if (\n key !== 'inheritedProps' &&\n ((isClassIDCompare(key, prev, next) && !shallowEqual(next[key], prev[key])) ||\n (next.routingInfo && !PCore.isDeepEqual(next.routingInfo, prev.routingInfo)))\n ) {\n return false;\n }\n }\n }\n /* TODO For some rawConfig we are not getting routingInfo under allStateProps */\n return !routingInfoCompare(next, prev);\n }\n }\n )(component);\n};\n\nconst getComponent = c11nEnv => {\n // PCore is defined in pxBootstrapShell - eventually will be exported in place of constellationCore\n const ComponentsRegistry = PCore.getComponentsRegistry();\n const type = c11nEnv.getComponentName();\n\n const componentObj = ComponentsRegistry.getComponent(type);\n const componentType = (componentObj && componentObj.component) || type;\n\n // JEA - modifying logic before bailing to RootContainer logic to work around async loading problem\n let component = LazyComponentMap[componentType]; /* || window[componentType] */\n\n // NOTE: Until we get lazy loading working, maintain this for each component we add\n if (component === undefined) {\n if (SdkComponentMap) {\n // This is the node_modules version of react_pconnect!\n const theLocalComponent = SdkComponentMap.getLocalComponentMap()[componentType];\n if (theLocalComponent !== undefined) {\n // eslint-disable-next-line no-console\n console.log(`react_pconnect getComponent found ${componentType}: Local`);\n component = theLocalComponent;\n } else {\n const thePegaProvidedComponent = SdkComponentMap.getPegaProvidedComponentMap()[componentType];\n if (thePegaProvidedComponent !== undefined) {\n // console.log(`react_pconnect getComponent found ${componentType}: Pega-provided`);\n component = thePegaProvidedComponent;\n } else {\n // eslint-disable-next-line no-console\n console.error(`react_pconnect: getComponent doesn't have an entry for type ${type}`);\n component = ErrorBoundary;\n }\n }\n } else {\n // We no longer handle the \"old\" switch statement that was here in the original packaging.\n // All components seen here need to be in the SdkComponentMap\n // eslint-disable-next-line no-console\n console.error(`SdkComponentMap not defined! Unable to process component: ${componentType}`);\n }\n } else {\n // eslint-disable-next-line no-console\n console.log(`getComponent doesn't have an entry for component ${component}`);\n component = ErrorBoundary;\n }\n\n if (c11nEnv.isConditionExist()) {\n return connectRedux(withVisibility(component), c11nEnv);\n }\n\n return connectRedux(component, c11nEnv);\n};\n\n/**\n * JEA - add Type info via JSdoc syntax...\n * @extends {React.Components<Props, State>}\n * createPConnectComponent - Class to create/initialize a PConnect (c11nEnv) object\n * to pre-process meta data of each componnet.\n * - Wraps each child in a component with PConnect\n * - Process all actions and make them avaiable in props\n * - Filters all properties in metadata and keeps them\n * __internal for re-render process through connect\n */\nclass PConnect extends Component {\n constructor(props) {\n super(props);\n const { getPConnect } = this.props;\n this.state = {\n hasError: false\n };\n\n this.eventHandler = this.eventHandler.bind(this);\n this.changeHandler = this.changeHandler.bind(this);\n\n this.c11nEnv = getPConnect();\n // eslint-disable-next-line react/no-unused-class-component-methods\n this.Control = getComponent(this.c11nEnv);\n this.actionsAPI = this.c11nEnv.getActionsApi();\n\n this.processActions(this.c11nEnv);\n }\n\n static getDerivedStateFromError(error) {\n // Update state so the next render will show the fallback UI.\n return {\n hasError: true,\n error\n };\n }\n\n componentDidMount() {\n this.c11nEnv.addFormField();\n setVisibilityForList(this.c11nEnv, true);\n }\n\n componentDidCatch(error, info) {\n // eslint-disable-next-line no-console\n console.error(`Error while Rendering the component ${this.componentName} : `, error, info.componentStack);\n }\n\n componentWillUnmount() {\n if (this.c11nEnv.removeFormField) {\n this.c11nEnv.removeFormField();\n setVisibilityForList(this.c11nEnv, false);\n }\n }\n\n /*\n * processActions to see all actions in meta and adds event in props.\n * Attaches common handler (eventHandler) for all actions.\n */\n processActions() {\n if (this.c11nEnv.isEditable()) {\n this.c11nEnv.setAction('onChange', this.changeHandler);\n this.c11nEnv.setAction('onBlur', this.eventHandler);\n }\n }\n\n // Using separate handle for change as in case of dropdown, native click is mapped to react change\n changeHandler(event) {\n this.actionsAPI.changeHandler(this.c11nEnv, event);\n // getActionProcessor().changeHandler(this.c11nEnv, event);\n }\n\n eventHandler(event) {\n this.actionsAPI.eventHandler(this.c11nEnv, event);\n // getActionProcessor().eventHandler(this.c11nEnv, event);\n }\n\n createChildren() {\n const { getPConnect } = this.props;\n if (getPConnect().hasChildren() && getPConnect().getChildren()) {\n return (\n getPConnect()\n .getChildren()\n // eslint-disable-next-line react/no-array-index-key\n .map((childProps, index) => <PConnect key={`${this.getKey(childProps)}_${index}`} {...childProps} />)\n );\n }\n return null;\n }\n\n getKey(props = this.props) {\n const { getPConnect } = props;\n const viewName = getPConnect().getConfigProps().name || getPConnect().getCurrentView();\n let key = !viewName ? createUID() : `${viewName}!${getPConnect().getCurrentClassID() || createUID()}`;\n\n // In the case of pyDetails the key must be unique for each instance\n if (viewName && viewName.toUpperCase() === 'PYDETAILS') {\n key += `!${getPConnect().getCaseInfo().getID()}`;\n }\n\n return key.toUpperCase();\n }\n\n render() {\n const { hasError } = this.state;\n const { getPConnect, additionalProps, ...otherProps } = this.props;\n\n if (hasError) {\n // You can render any custom fallback UI\n // console.log(`react_pconnect error: used to return: <ErrorBoundary getPConnect={() => this.c11nEnv} isInternalError />`);\n return <ErrorBoundary getPConnect={() => this.c11nEnv} isInternalError />;\n }\n\n const props = this.c11nEnv.getConfigProps();\n const actions = this.c11nEnv.getActions();\n const finalProps = {\n ...props,\n getPConnect,\n ...actions,\n additionalProps,\n ...otherProps\n };\n\n // If the new component is a reference node then mark with a unique key\n if (['reference', 'View'].includes(getPConnect().getComponentName()) && !finalProps.key) {\n return (\n <this.Control {...finalProps} key={this.getKey()}>\n {this.createChildren()}\n </this.Control>\n );\n }\n\n // console.log(`react_pconnect: used to return: <this.Control {...finalProps} />`);\n\n return <this.Control {...finalProps}>{this.createChildren()}</this.Control>;\n }\n}\n// eslint-disable-next-line react/static-property-placement\nPConnect.propTypes = {\n // __internal: PropTypes.object.isRequired,\n // meta: PropTypes.object.isRequired,\n // configObject: PropTypes.object.isRequired,\n getPConnect: PropTypes.func.isRequired,\n additionalProps: PropTypes.shape({\n noLabel: PropTypes.bool,\n readOnly: PropTypes.bool\n }),\n validatemessage: PropTypes.string\n};\n\n// eslint-disable-next-line react/static-property-placement\nPConnect.defaultProps = {\n additionalProps: {},\n validatemessage: ''\n};\n\n// Move these into SdkConstellationReady so PCore is available\ndocument.addEventListener('SdkConstellationReady', () => {\n PCore.registerComponentCreator((c11nEnv, additionalProps = {}) => {\n return createElement(PConnect, {\n ...c11nEnv,\n ...c11nEnv.getPConnect().getConfigProps(),\n ...c11nEnv.getPConnect().getActions(),\n ...{ additionalProps }\n });\n });\n\n PCore.getAssetLoader().register('component-loader', async (componentNames = []) => {\n const promises = [];\n componentNames.forEach(comp => {\n if (/^[A-Z]/.test(comp) && !LazyComponentMap[comp]) {\n if (!ComponentMap[comp]) {\n const srcUrl = `${PCore.getAssetLoader().getConstellationServiceUrl()}/v860/${PCore.getAssetLoader().getAppAlias()}/component/${comp}.js`;\n promises.push(PCore.getAssetLoader().getLoader()(srcUrl, 'script'));\n } else {\n if (ComponentMap[comp].modules && ComponentMap[comp].modules.length) {\n ComponentMap[comp].modules.forEach(module => {\n LazyComponentMap[comp] = module;\n });\n }\n if (ComponentMap[comp].scripts && ComponentMap[comp].scripts.length) {\n ComponentMap[comp].scripts.forEach(script => {\n promises.push(PCore.getAssetLoader().getLoader()(script, 'script'));\n });\n }\n }\n }\n });\n /* Promise.all rejects or accepts all or none. This causes entire component loader to fail\n in case there is a single failure.\n Using allSettled to allow Promise to be resolved even if there are failed components\n Note : This is a liberty taken at component loader and unwise to be used at\n asset loader which will still use Promise.all\n */\n await Promise.allSettled(promises);\n });\n});\n\n/**\n *\n * @param {*} declarative\n * @returns {React.Components<Props, State>}\n\n */\nconst createPConnectComponent = () => {\n return PConnect;\n};\n\nexport default createPConnectComponent;\n\n/* These APIs need to be exposed for authoring bridge\nWill be removed when pxbootstrap and constellation_bridge is cleaned up\nto use single bootstrap file from constellation */\n// window.authoringUtils = {\n// createElement,\n// render,\n// unmountComponentAtNode,\n// LazyComponentMap\n// };\n"]}
1
+ {"version":3,"file":"react_pconnect.js","sourceRoot":"","sources":["../../src/bridge/react_pconnect.jsx"],"names":[],"mappings":";;AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEpD,OAAO,YAAY,EAAE,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,mBAAmB,CAAC,CAAC,2CAA2C;AAC1H,OAAO,aAAa,MAAM,mCAAmC,CAAC;AAE9D,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAElD,iHAAiH;AAEjH,0FAA0F;AAC1F,uFAAuF;AACvF,4BAA4B;AAE5B,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,MAAM,gBAAgB,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;IAC3C,OAAO,CAAC,CAAC,GAAG,KAAK,SAAS,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAC5D,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE;IACxC,OAAO,aAAa,IAAI,IAAI,IAAI,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI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,QAAQ,CAAC;AAClB,CAAC,CAAC;AAEF,eAAe,uBAAuB,CAAC","sourcesContent":["import { Component, createElement } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect, shallowEqual } from 'react-redux';\n\nimport ComponentMap, { LazyMap as LazyComponentMap } from '../components_map'; // was '../../../../../src/components_map';\nimport ErrorBoundary from '../components/infra/ErrorBoundary';\n\nimport StoreContext from './Context/StoreContext';\n\n// const pathToComponents = \"../../../../../src/components\"; /* When bridge was local, it was \"../components\" */\n\n// For now, NOT doing lazy loading - needs some work on the loader to work with TypeScript\n// As we add components, we'll need to import them here and add to the switch statement\n// below in getComponent!\n\nimport { SdkComponentMap } from './helpers/sdk_component_map';\n\nconst isClassIDCompare = (key, prev, next) => {\n return !(key === 'classID' && (!prev[key] || !next[key]));\n};\n\nconst routingInfoCompare = (next, prev) => {\n return 'routingInfo' in next && (!shallowEqual(next.routingInfo, prev.routingInfo) || !PCore.isDeepEqual(next.routingInfo, prev.routingInfo));\n};\n\n/** Generate unique id for elements */\nconst createUID = () => {\n return `_${Math.random().toString(36).slice(2, 11)}`;\n};\n\nexport const setVisibilityForList = (c11nEnv, visibility) => {\n const { selectionMode, selectionList, renderMode, referenceList } = c11nEnv.getComponentConfig();\n // usecase:multiselect, fieldgroup, editable table\n if ((selectionMode === PCore.getConstants().LIST_SELECTION_MODE.MULTI && selectionList) || (renderMode === 'Editable' && referenceList)) {\n c11nEnv.getListActions().setVisibility(visibility);\n }\n};\n\nfunction withVisibility(WrappedComponent) {\n return class extends Component {\n render() {\n const { visibility } = this.props;\n\n if (visibility === false) {\n return null;\n }\n return <WrappedComponent {...this.props} />;\n }\n };\n}\n\nconst connectRedux = (component, c11nEnv) => {\n return connect(\n (state, ownProps) => {\n let addProps = {};\n const obj = {};\n // Need to use ownProps pconnect since c11nEnv is stale and prior to re-render\n if (!ownProps.getPConnect) {\n console.error('connectRedux ownProps are not defined');\n } else {\n c11nEnv = ownProps.getPConnect();\n }\n\n if (typeof component.additionalProps === 'object') {\n addProps = c11nEnv.resolveConfigProps(component.additionalProps);\n } else if (typeof component.additionalProps === 'function') {\n addProps = c11nEnv.resolveConfigProps(component.additionalProps(state, ownProps.getPConnect));\n }\n\n c11nEnv.getConfigProps(obj);\n\n // populate additional props which are component specific and not present in configurations\n // This block can be removed once all these props will be added as part of configs\n c11nEnv.populateAdditionalProps(obj);\n\n return {\n ...obj,\n ...addProps\n };\n },\n null,\n null,\n {\n context: StoreContext,\n areStatePropsEqual: (next, prev) => {\n const allStateProps = c11nEnv.getStateProps();\n for (const key of Object.keys(allStateProps)) {\n if (Object.prototype.hasOwnProperty.call(allStateProps, key)) {\n if (key === 'inheritedProps' && next.inheritedProps && !PCore.isDeepEqual(next.inheritedProps, prev.inheritedProps)) {\n return false;\n }\n if (\n key !== 'inheritedProps' &&\n ((isClassIDCompare(key, prev, next) && !shallowEqual(next[key], prev[key])) ||\n (next.routingInfo && !PCore.isDeepEqual(next.routingInfo, prev.routingInfo)))\n ) {\n return false;\n }\n }\n }\n // For CaseSummary, we need to compare changes in\n // primaryFields and secondary Fields\n if (next.template === 'CaseSummary') {\n for (const key of Object.keys(prev)) {\n if (!PCore.isDeepEqual(next[key], prev[key])) {\n return false;\n }\n }\n }\n /* TODO For some rawConfig we are not getting routingInfo under allStateProps */\n return !routingInfoCompare(next, prev);\n }\n }\n )(component);\n};\n\nconst getComponent = c11nEnv => {\n // PCore is defined in pxBootstrapShell - eventually will be exported in place of constellationCore\n const ComponentsRegistry = PCore.getComponentsRegistry();\n const type = c11nEnv.getComponentName();\n\n const componentObj = ComponentsRegistry.getComponent(type);\n const componentType = (componentObj && componentObj.component) || type;\n\n // JEA - modifying logic before bailing to RootContainer logic to work around async loading problem\n let component = LazyComponentMap[componentType]; /* || window[componentType] */\n\n // NOTE: Until we get lazy loading working, maintain this for each component we add\n if (component === undefined) {\n if (SdkComponentMap) {\n // This is the node_modules version of react_pconnect!\n const theLocalComponent = SdkComponentMap.getLocalComponentMap()[componentType];\n if (theLocalComponent !== undefined) {\n console.log(`react_pconnect getComponent found ${componentType}: Local`);\n component = theLocalComponent;\n } else {\n const thePegaProvidedComponent = SdkComponentMap.getPegaProvidedComponentMap()[componentType];\n if (thePegaProvidedComponent !== undefined) {\n // console.log(`react_pconnect getComponent found ${componentType}: Pega-provided`);\n component = thePegaProvidedComponent;\n } else {\n console.error(`react_pconnect: getComponent doesn't have an entry for type ${type}`);\n component = ErrorBoundary;\n }\n }\n } else {\n // We no longer handle the \"old\" switch statement that was here in the original packaging.\n // All components seen here need to be in the SdkComponentMap\n\n console.error(`SdkComponentMap not defined! Unable to process component: ${componentType}`);\n }\n } else {\n console.log(`getComponent doesn't have an entry for component ${component}`);\n component = ErrorBoundary;\n }\n\n if (c11nEnv.isConditionExist()) {\n return connectRedux(withVisibility(component), c11nEnv);\n }\n\n return connectRedux(component, c11nEnv);\n};\n\n/**\n * JEA - add Type info via JSdoc syntax...\n * @extends {React.Components<Props, State>}\n * createPConnectComponent - Class to create/initialize a PConnect (c11nEnv) object\n * to pre-process meta data of each componnet.\n * - Wraps each child in a component with PConnect\n * - Process all actions and make them avaiable in props\n * - Filters all properties in metadata and keeps them\n * __internal for re-render process through connect\n */\nclass PConnect extends Component {\n constructor(props) {\n super(props);\n const { getPConnect } = this.props;\n this.state = {\n hasError: false\n };\n\n this.eventHandler = this.eventHandler.bind(this);\n this.changeHandler = this.changeHandler.bind(this);\n\n this.c11nEnv = getPConnect();\n\n this.Control = getComponent(this.c11nEnv);\n this.actionsAPI = this.c11nEnv.getActionsApi();\n\n this.processActions(this.c11nEnv);\n }\n\n static getDerivedStateFromError(error) {\n // Update state so the next render will show the fallback UI.\n return {\n hasError: true,\n error\n };\n }\n\n componentDidMount() {\n this.c11nEnv.addFormField();\n setVisibilityForList(this.c11nEnv, true);\n }\n\n componentDidCatch(error, info) {\n console.error(`Error while Rendering the component ${this.componentName} : `, error, info.componentStack);\n }\n\n componentWillUnmount() {\n if (this.c11nEnv.removeFormField) {\n this.c11nEnv.removeFormField();\n setVisibilityForList(this.c11nEnv, false);\n }\n }\n\n /*\n * processActions to see all actions in meta and adds event in props.\n * Attaches common handler (eventHandler) for all actions.\n */\n processActions() {\n if (this.c11nEnv.isEditable()) {\n this.c11nEnv.setAction('onChange', this.changeHandler);\n this.c11nEnv.setAction('onBlur', this.eventHandler);\n }\n }\n\n // Using separate handle for change as in case of dropdown, native click is mapped to react change\n changeHandler(event) {\n this.actionsAPI.changeHandler(this.c11nEnv, event);\n // getActionProcessor().changeHandler(this.c11nEnv, event);\n }\n\n eventHandler(event) {\n this.actionsAPI.eventHandler(this.c11nEnv, event);\n // getActionProcessor().eventHandler(this.c11nEnv, event);\n }\n\n createChildren() {\n const { getPConnect } = this.props;\n if (getPConnect().hasChildren() && getPConnect().getChildren()) {\n return getPConnect()\n .getChildren()\n\n .map((childProps, index) => <PConnect key={`${this.getKey(childProps)}_${index}`} {...childProps} />);\n }\n return null;\n }\n\n getKey(props = this.props) {\n const { getPConnect } = props;\n const viewName = getPConnect().getConfigProps().name || getPConnect().getCurrentView();\n let key = !viewName ? createUID() : `${viewName}!${getPConnect().getCurrentClassID() || createUID()}`;\n\n // In the case of pyDetails the key must be unique for each instance\n if (viewName && viewName.toUpperCase() === 'PYDETAILS') {\n key += `!${getPConnect().getCaseInfo().getID()}`;\n }\n\n return key.toUpperCase();\n }\n\n render() {\n const { hasError } = this.state;\n const { getPConnect, additionalProps, ...otherProps } = this.props;\n\n if (hasError) {\n // You can render any custom fallback UI\n // console.log(`react_pconnect error: used to return: <ErrorBoundary getPConnect={() => this.c11nEnv} isInternalError />`);\n return <ErrorBoundary getPConnect={() => this.c11nEnv} isInternalError />;\n }\n\n const props = this.c11nEnv.getConfigProps();\n const actions = this.c11nEnv.getActions();\n const finalProps = {\n ...props,\n getPConnect,\n ...actions,\n additionalProps,\n ...otherProps\n };\n\n // If the new component is a reference node then mark with a unique key\n if (['reference', 'View'].includes(getPConnect().getComponentName()) && !finalProps.key) {\n return (\n <this.Control {...finalProps} key={this.getKey()}>\n {this.createChildren()}\n </this.Control>\n );\n }\n\n // console.log(`react_pconnect: used to return: <this.Control {...finalProps} />`);\n\n return <this.Control {...finalProps}>{this.createChildren()}</this.Control>;\n }\n}\n\nPConnect.propTypes = {\n // __internal: PropTypes.object.isRequired,\n // meta: PropTypes.object.isRequired,\n // configObject: PropTypes.object.isRequired,\n getPConnect: PropTypes.func.isRequired,\n additionalProps: PropTypes.shape({\n noLabel: PropTypes.bool,\n readOnly: PropTypes.bool\n }),\n validatemessage: PropTypes.string\n};\n\nPConnect.defaultProps = {\n additionalProps: {},\n validatemessage: ''\n};\n\n// Move these into SdkConstellationReady so PCore is available\ndocument.addEventListener('SdkConstellationReady', () => {\n PCore.registerComponentCreator((c11nEnv, additionalProps = {}) => {\n return createElement(PConnect, {\n ...c11nEnv,\n ...c11nEnv.getPConnect().getConfigProps(),\n ...c11nEnv.getPConnect().getActions(),\n ...{ additionalProps }\n });\n });\n\n PCore.getAssetLoader().register('component-loader', async (componentNames = []) => {\n const promises = [];\n componentNames.forEach(comp => {\n if (/^[A-Z]/.test(comp) && !LazyComponentMap[comp]) {\n if (!ComponentMap[comp]) {\n const srcUrl = `${PCore.getAssetLoader().getConstellationServiceUrl()}/v860/${PCore.getAssetLoader().getAppAlias()}/component/${comp}.js`;\n promises.push(PCore.getAssetLoader().getLoader()(srcUrl, 'script'));\n } else {\n if (ComponentMap[comp].modules && ComponentMap[comp].modules.length) {\n ComponentMap[comp].modules.forEach(module => {\n LazyComponentMap[comp] = module;\n });\n }\n if (ComponentMap[comp].scripts && ComponentMap[comp].scripts.length) {\n ComponentMap[comp].scripts.forEach(script => {\n promises.push(PCore.getAssetLoader().getLoader()(script, 'script'));\n });\n }\n }\n }\n });\n /* Promise.all rejects or accepts all or none. This causes entire component loader to fail\n in case there is a single failure.\n Using allSettled to allow Promise to be resolved even if there are failed components\n Note : This is a liberty taken at component loader and unwise to be used at\n asset loader which will still use Promise.all\n */\n await Promise.allSettled(promises);\n });\n});\n\n/**\n *\n * @param {*} declarative\n * @returns {React.Components<Props, State>}\n\n */\nconst createPConnectComponent = () => {\n return PConnect;\n};\n\nexport default createPConnectComponent;\n\n/* These APIs need to be exposed for authoring bridge\nWill be removed when pxbootstrap and constellation_bridge is cleaned up\nto use single bootstrap file from constellation */\n// window.authoringUtils = {\n// createElement,\n// render,\n// unmountComponentAtNode,\n// LazyComponentMap\n// };\n"]}
@@ -8,7 +8,7 @@
8
8
 
9
9
  .background-style {
10
10
  background-color: transparent;
11
- color: rgb(0, 0, 0);
11
+ color: var(--banner-text-color);
12
12
  width: 100%;
13
13
  height: 100%;
14
14
  text-align: center;
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import Grid from '@mui/material/Grid';
2
+ import Grid2 from '@mui/material/Grid2';
3
3
  import './Banner.css';
4
4
  export default function Banner(props) {
5
5
  const { a, b, banner, variant } = props;
@@ -9,6 +9,6 @@ export default function Banner(props) {
9
9
  'narrow-wide': [4, 8],
10
10
  'wide-narrow': [8, 4]
11
11
  };
12
- return (_jsxs("div", { style: { marginBottom: '2rem' }, children: [_jsx("div", { className: 'background-image-style', style: { backgroundImage: `url(${backgroundImage})` }, children: _jsx("div", { className: 'background-style content', children: _jsxs("div", { children: [_jsx("h1", { className: 'title', children: title }), _jsx("p", { className: 'message', children: message })] }) }) }), _jsxs(Grid, { container: true, item: true, xs: 12, className: 'banner-layout', spacing: 1, children: [_jsx(Grid, { item: true, xs: variantMap[variant][0], style: { padding: '1em' }, children: a }), _jsx(Grid, { item: true, xs: variantMap[variant][1], style: { padding: '1em' }, children: b })] })] }));
12
+ return (_jsxs("div", { style: { marginBottom: '2rem' }, children: [_jsx("div", { className: 'background-image-style', style: { backgroundImage: `url(${backgroundImage})` }, children: _jsx("div", { className: 'background-style content', children: _jsxs("div", { children: [_jsx("h1", { className: 'title', children: title }), _jsx("p", { className: 'message', children: message })] }) }) }), _jsxs(Grid2, { container: true, size: 12, className: 'banner-layout', spacing: 1, children: [_jsx(Grid2, { size: { xs: variantMap[variant][0] }, style: { padding: '1em' }, children: a }), _jsx(Grid2, { size: { xs: variantMap[variant][1] }, style: { padding: '1em' }, children: b })] })] }));
13
13
  }
14
14
  //# sourceMappingURL=Banner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Banner.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/Banner/Banner.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,cAAc,CAAC;AAoBtB,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAkB;IAC/C,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACxC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,MAAM,CAAC;IACnD,MAAM,UAAU,GAAG;QACjB,YAAY,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QACpB,aAAa,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QACrB,aAAa,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;KACtB,CAAC;IACF,OAAO,CACL,eAAK,KAAK,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,aAClC,cAAK,SAAS,EAAC,wBAAwB,EAAC,KAAK,EAAE,EAAE,eAAe,EAAE,OAAO,eAAe,GAAG,EAAE,YAC3F,cAAK,SAAS,EAAC,0BAA0B,YACvC,0BACE,aAAI,SAAS,EAAC,OAAO,YAAE,KAAK,GAAM,EAClC,YAAG,SAAS,EAAC,SAAS,YAAE,OAAO,GAAK,IAChC,GACF,GACF,EACN,MAAC,IAAI,IAAC,SAAS,QAAC,IAAI,QAAC,EAAE,EAAE,EAAE,EAAE,SAAS,EAAC,eAAe,EAAC,OAAO,EAAE,CAAC,aAC/D,KAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,YAC7D,CAAC,GACG,EACP,KAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,YAC7D,CAAC,GACG,IACF,IACH,CACP,CAAC;AACJ,CAAC","sourcesContent":["import Grid from '@mui/material/Grid';\nimport './Banner.css';\n\n// AlertBanner is one of the few components that does NOT have getPConnect.\n// So, no need to extend PConnProps\n\ninterface BannerProps {\n // If any, enter additional props that only exist on this component\n a: any;\n b: any;\n banner: {\n variant: any;\n backgroundColor: any;\n title: any;\n message: any;\n backgroundImage: any;\n tintImage: any;\n };\n variant: any;\n}\n\nexport default function Banner(props: BannerProps) {\n const { a, b, banner, variant } = props;\n const { title, message, backgroundImage } = banner;\n const variantMap = {\n 'two-column': [6, 6],\n 'narrow-wide': [4, 8],\n 'wide-narrow': [8, 4]\n };\n return (\n <div style={{ marginBottom: '2rem' }}>\n <div className='background-image-style' style={{ backgroundImage: `url(${backgroundImage})` }}>\n <div className='background-style content'>\n <div>\n <h1 className='title'>{title}</h1>\n <p className='message'>{message}</p>\n </div>\n </div>\n </div>\n <Grid container item xs={12} className='banner-layout' spacing={1}>\n <Grid item xs={variantMap[variant][0]} style={{ padding: '1em' }}>\n {a}\n </Grid>\n <Grid item xs={variantMap[variant][1]} style={{ padding: '1em' }}>\n {b}\n </Grid>\n </Grid>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"Banner.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/Banner/Banner.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,cAAc,CAAC;AAoBtB,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAkB;IAC/C,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACxC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,MAAM,CAAC;IACnD,MAAM,UAAU,GAAG;QACjB,YAAY,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QACpB,aAAa,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QACrB,aAAa,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;KACtB,CAAC;IACF,OAAO,CACL,eAAK,KAAK,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,aAClC,cAAK,SAAS,EAAC,wBAAwB,EAAC,KAAK,EAAE,EAAE,eAAe,EAAE,OAAO,eAAe,GAAG,EAAE,YAC3F,cAAK,SAAS,EAAC,0BAA0B,YACvC,0BACE,aAAI,SAAS,EAAC,OAAO,YAAE,KAAK,GAAM,EAClC,YAAG,SAAS,EAAC,SAAS,YAAE,OAAO,GAAK,IAChC,GACF,GACF,EACN,MAAC,KAAK,IAAC,SAAS,QAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAC,eAAe,EAAC,OAAO,EAAE,CAAC,aAC7D,KAAC,KAAK,IAAC,IAAI,EAAE,EAAE,EAAE,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,YACnE,CAAC,GACI,EACR,KAAC,KAAK,IAAC,IAAI,EAAE,EAAE,EAAE,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,YACnE,CAAC,GACI,IACF,IACJ,CACP,CAAC;AACJ,CAAC","sourcesContent":["import Grid2 from '@mui/material/Grid2';\nimport './Banner.css';\n\n// AlertBanner is one of the few components that does NOT have getPConnect.\n// So, no need to extend PConnProps\n\ninterface BannerProps {\n // If any, enter additional props that only exist on this component\n a: any;\n b: any;\n banner: {\n variant: any;\n backgroundColor: any;\n title: any;\n message: any;\n backgroundImage: any;\n tintImage: any;\n };\n variant: any;\n}\n\nexport default function Banner(props: BannerProps) {\n const { a, b, banner, variant } = props;\n const { title, message, backgroundImage } = banner;\n const variantMap = {\n 'two-column': [6, 6],\n 'narrow-wide': [4, 8],\n 'wide-narrow': [8, 4]\n };\n return (\n <div style={{ marginBottom: '2rem' }}>\n <div className='background-image-style' style={{ backgroundImage: `url(${backgroundImage})` }}>\n <div className='background-style content'>\n <div>\n <h1 className='title'>{title}</h1>\n <p className='message'>{message}</p>\n </div>\n </div>\n </div>\n <Grid2 container size={12} className='banner-layout' spacing={1}>\n <Grid2 size={{ xs: variantMap[variant][0] }} style={{ padding: '1em' }}>\n {a}\n </Grid2>\n <Grid2 size={{ xs: variantMap[variant][1] }} style={{ padding: '1em' }}>\n {b}\n </Grid2>\n </Grid2>\n </div>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"CaseSummaryFields.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx"],"names":[],"mappings":"AASA,OAAO,yBAAyB,CAAC;AAMjC,UAAU,sBAAsB;IAE9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,GAAG,EAAE,GAAG,GAAG,GAAG,KAAK,CAAC;CAChC;AAED,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,2CAyPtE"}
1
+ {"version":3,"file":"CaseSummaryFields.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx"],"names":[],"mappings":"AASA,OAAO,yBAAyB,CAAC;AAMjC,UAAU,sBAAsB;IAE9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,GAAG,EAAE,GAAG,GAAG,GAAG,KAAK,CAAC;CAChC;AAED,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,2CAuPtE"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState, useEffect } from 'react';
3
3
  import isDeepEqual from 'fast-deep-equal/react';
4
- import Grid from '@mui/material/Grid';
4
+ import Grid2 from '@mui/material/Grid2';
5
5
  import TextField from '@mui/material/TextField';
6
6
  import { getDateFormatInfo } from '../../helpers/date-format-utils';
7
7
  import { getCurrencyOptions } from '../../field/Currency/currency-utils';
@@ -18,7 +18,6 @@ export default function CaseSummaryFields(props) {
18
18
  const fieldTypeLower = field.type.toLowerCase();
19
19
  if (field.config.value === null || field.config.value === '') {
20
20
  // Special handling for missing value
21
- // eslint-disable-next-line sonarjs/no-small-switch
22
21
  switch (fieldTypeLower) {
23
22
  case 'caseoperator':
24
23
  return _jsx(Operator, { ...field.config });
@@ -66,10 +65,8 @@ export default function CaseSummaryFields(props) {
66
65
  return (_jsx("a", { href: `tel:${displayPhone}`, children: _jsx(TextField, { variant: 'standard', value: field.config.value, label: field.config.label, slotProps: {
67
66
  input: {
68
67
  readOnly: true,
69
- inputProps: {
70
- style: { cursor: 'pointer' },
71
- disableUnderline: true
72
- }
68
+ disableUnderline: true,
69
+ inputProps: { style: { cursor: 'pointer' } }
73
70
  }
74
71
  } }) }));
75
72
  }
@@ -125,7 +122,7 @@ export default function CaseSummaryFields(props) {
125
122
  const arGridItems = theFieldsToRender.map((field) => {
126
123
  // display the field when either visibility property doesn't exist or is true(if exists)
127
124
  if (field.config.visibility === undefined || field.config.visibility === true) {
128
- return (_jsx(Grid, { item: true, xs: 6, children: getFieldValue(field) }, field.config.label));
125
+ return (_jsx(Grid2, { size: { xs: 6 }, children: getFieldValue(field) }, field.config.label));
129
126
  }
130
127
  return null;
131
128
  });
@@ -152,6 +149,6 @@ export default function CaseSummaryFields(props) {
152
149
  if (!isDeepEqual(theFieldsToRender, theFieldsModifiable)) {
153
150
  setFieldsToRender(theFieldsModifiable);
154
151
  }
155
- return (_jsx(Grid, { container: true, className: 'psdk-case-summary-fields', children: theFieldsAsGridItems }));
152
+ return (_jsx(Grid2, { container: true, className: 'psdk-case-summary-fields', children: theFieldsAsGridItems }));
156
153
  }
157
154
  //# sourceMappingURL=CaseSummaryFields.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CaseSummaryFields.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAEhD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,OAAO,yBAAyB,CAAC;AAEjC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAWlD,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAA6B;IACrE,8EAA8E;IAC9E,MAAM,QAAQ,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC;IAEjD,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAEhD,MAAM,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC5D,MAAM,CAAC,oBAAoB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAQ,EAAE,CAAC,CAAC;IAEzE,SAAS,aAAa,CAAC,KAAU;QAC/B,MAAM,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;QAE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O,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;QACH,oBAAoB,CAAC,WAAW,CAAC,CAAC;IACpC,CAAC,EAAE,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAExB,MAAM,mBAAmB,GAAG,SAAS,CAAC;IAEtC,sFAAsF;IACtF,6BAA6B;IAC7B,IAAI,UAAU,IAAI,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QACnD,MAAM,OAAO,GAAG;YACd,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE;SAC3C,CAAC;QAEF,MAAM,KAAK,GAAG,mBAAmB,CAAC,MAAM,CAAC;QACzC,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;YACd,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpC,CAAC;aAAM,CAAC;YACN,mBAAmB,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC;QAC5C,CAAC;IACH,CAAC;IAED,0DAA0D;IAC1D,wCAAwC;IACxC,IAAI,CAAC,WAAW,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,EAAE,CAAC;QACzD,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;IACzC,CAAC;IAED,OAAO,CACL,KAAC,IAAI,IAAC,SAAS,QAAC,SAAS,EAAC,0BAA0B,YACjD,oBAAoB,GAChB,CACR,CAAC;AACJ,CAAC","sourcesContent":["import { useState, useEffect } from 'react';\nimport isDeepEqual from 'fast-deep-equal/react';\nimport Grid from '@mui/material/Grid';\nimport TextField from '@mui/material/TextField';\n\nimport { getDateFormatInfo } from '../../helpers/date-format-utils';\nimport { getCurrencyOptions } from '../../field/Currency/currency-utils';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\n\nimport './CaseSummaryFields.css';\n\nimport { format } from '../../helpers/formatters';\n\n// CaseSummaryFields is one of the few components that does NOT have getPConnect.\n// So, no need to extend PConnProps\ninterface CaseSummaryFieldsProps {\n // If any, enter additional props that only exist on this component\n status?: string;\n showStatus?: boolean;\n theFields: any[] | any | never;\n}\n\nexport default function CaseSummaryFields(props: CaseSummaryFieldsProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const Operator = getComponentFromMap('Operator');\n\n const { status, showStatus, theFields } = props;\n\n const [theFieldsToRender, setFieldsToRender] = useState([]);\n const [theFieldsAsGridItems, setFieldsAsGridItems] = useState<any[]>([]);\n\n function getFieldValue(field: any): any {\n const fieldTypeLower = field.type.toLowerCase();\n\n if (field.config.value === null || field.config.value === '') {\n // Special handling for missing value\n // eslint-disable-next-line sonarjs/no-small-switch\n switch (fieldTypeLower) {\n case 'caseoperator':\n return <Operator {...field.config} />;\n break;\n\n default:\n return (\n <TextField\n variant='standard'\n value='---'\n label={field.config.label}\n slotProps={{\n input: {\n readOnly: true,\n disableUnderline: true\n }\n }}\n />\n );\n }\n }\n\n switch (fieldTypeLower) {\n case 'textinput':\n case 'decimal':\n case 'integer':\n case 'dropdown':\n return (\n <TextField\n variant='standard'\n value={field.config.value}\n label={field.config.label}\n slotProps={{\n input: {\n readOnly: true,\n disableUnderline: true\n }\n }}\n />\n );\n\n case 'checkbox': {\n const { caption, label, value, trueLabel, falseLabel } = field.config;\n const fieldLabel = label || caption;\n const fieldValue = value ? trueLabel : falseLabel;\n\n return (\n <TextField\n variant='standard'\n value={fieldValue}\n label={fieldLabel}\n slotProps={{\n input: {\n readOnly: true,\n disableUnderline: true\n }\n }}\n />\n );\n }\n\n case 'status':\n return (\n <TextField\n variant='standard'\n className='psdk-csf-status-style'\n value={field.config.value}\n label={field.config.label}\n slotProps={{\n input: {\n readOnly: true,\n disableUnderline: true\n }\n }}\n />\n );\n\n case 'phone': {\n const displayPhone = field.config.value !== '' ? field.config.value : '---';\n return (\n <a href={`tel:${displayPhone}`}>\n <TextField\n variant='standard'\n value={field.config.value}\n label={field.config.label}\n slotProps={{\n input: {\n readOnly: true,\n inputProps: {\n style: { cursor: 'pointer' },\n disableUnderline: true\n }\n }\n }}\n />\n </a>\n );\n }\n\n case 'email': {\n const displayEmail = format(field.config.value, field.type);\n return (\n <a href={`mailto:${displayEmail}`}>\n <TextField\n variant='standard'\n value={field.config.value}\n label={field.config.label}\n slotProps={{\n input: {\n readOnly: true,\n disableUnderline: true,\n inputProps: { style: { cursor: 'pointer' } }\n }\n }}\n />\n </a>\n );\n }\n\n case 'date':\n case 'datetime': {\n const theDateFormatInfo = getDateFormatInfo();\n // console.log(`theDateFormatInfo: ${theDateFormatInfo}`);\n const theFormat =\n fieldTypeLower === 'datetime' ? `${theDateFormatInfo.dateFormatStringLong} hh:mm a` : theDateFormatInfo.dateFormatStringLong;\n\n return (\n <TextField\n variant='standard'\n value={format(field.config.value, field.type, {\n format: theFormat\n })}\n label={field.config.label}\n slotProps={{\n input: {\n readOnly: true,\n disableUnderline: true\n }\n }}\n />\n );\n }\n\n case 'currency': {\n const theCurrencyOptions = getCurrencyOptions(field.config?.currencyISOCode);\n return (\n <TextField\n variant='standard'\n value={format(field.config.value, field.type, theCurrencyOptions)}\n label={field.config.label}\n slotProps={{\n input: {\n readOnly: true,\n disableUnderline: true\n }\n }}\n />\n );\n }\n\n case 'boolean':\n case 'userreference':\n return (\n <TextField\n variant='standard'\n value={format(field.config.value, field.type)}\n label={field.config.label}\n slotProps={{\n input: {\n readOnly: true,\n disableUnderline: true\n }\n }}\n />\n );\n\n case 'caseoperator':\n return <Operator {...field.config} />;\n\n default:\n return (\n <span>\n {field.type.toLowerCase()} {field.config.value}\n </span>\n );\n }\n }\n\n // Whenever theFieldsToRender changes, update theFieldsAsGridItems that's used during render\n useEffect(() => {\n const arGridItems = theFieldsToRender.map((field: any) => {\n // display the field when either visibility property doesn't exist or is true(if exists)\n if (field.config.visibility === undefined || field.config.visibility === true) {\n return (\n <Grid item xs={6} key={field.config.label}>\n {getFieldValue(field)}\n </Grid>\n );\n }\n\n return null;\n });\n setFieldsAsGridItems(arGridItems);\n }, [theFieldsToRender]);\n\n const theFieldsModifiable = theFields;\n\n // Special Case: if showStatus is true, splice the status value to be 2nd in theFields\n // if it's not already there\n if (showStatus && theFields?.[1].type !== 'status') {\n const oStatus = {\n type: 'status',\n config: { value: status, label: 'Status' }\n };\n\n const count = theFieldsModifiable.length;\n if (count < 2) {\n theFieldsModifiable.push(oStatus);\n } else {\n theFieldsModifiable.splice(1, 0, oStatus);\n }\n }\n\n // At this point, we know what fields we want to render...\n // So, update our state if it's changed\n if (!isDeepEqual(theFieldsToRender, theFieldsModifiable)) {\n setFieldsToRender(theFieldsModifiable);\n }\n\n return (\n <Grid container className='psdk-case-summary-fields'>\n {theFieldsAsGridItems}\n </Grid>\n );\n}\n"]}
1
+ {"version":3,"file":"CaseSummaryFields.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAEhD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,OAAO,yBAAyB,CAAC;AAEjC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAWlD,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAA6B;IACrE,8EAA8E;IAC9E,MAAM,QAAQ,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC;IAEjD,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAEhD,MAAM,CAAC,iBAAiB,E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 'fast-deep-equal/react';\nimport Grid2 from '@mui/material/Grid2';\nimport TextField from '@mui/material/TextField';\n\nimport { getDateFormatInfo } from '../../helpers/date-format-utils';\nimport { getCurrencyOptions } from '../../field/Currency/currency-utils';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\n\nimport './CaseSummaryFields.css';\n\nimport { format } from '../../helpers/formatters';\n\n// CaseSummaryFields is one of the few components that does NOT have getPConnect.\n// So, no need to extend PConnProps\ninterface CaseSummaryFieldsProps {\n // If any, enter additional props that only exist on this component\n status?: string;\n showStatus?: boolean;\n theFields: any[] | any | never;\n}\n\nexport default function CaseSummaryFields(props: CaseSummaryFieldsProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const Operator = getComponentFromMap('Operator');\n\n const { status, showStatus, theFields } = props;\n\n const [theFieldsToRender, setFieldsToRender] = useState([]);\n const [theFieldsAsGridItems, setFieldsAsGridItems] = useState<any[]>([]);\n\n function getFieldValue(field: any): any {\n const fieldTypeLower = field.type.toLowerCase();\n\n if (field.config.value === null || field.config.value === '') {\n // Special handling for missing value\n\n switch (fieldTypeLower) {\n case 'caseoperator':\n return <Operator {...field.config} />;\n break;\n\n default:\n return (\n <TextField\n variant='standard'\n value='---'\n label={field.config.label}\n slotProps={{\n input: {\n readOnly: true,\n disableUnderline: true\n }\n }}\n />\n );\n }\n }\n\n switch (fieldTypeLower) {\n case 'textinput':\n case 'decimal':\n case 'integer':\n case 'dropdown':\n return (\n <TextField\n variant='standard'\n value={field.config.value}\n label={field.config.label}\n slotProps={{\n input: {\n readOnly: true,\n disableUnderline: true\n }\n }}\n />\n );\n\n case 'checkbox': {\n const { caption, label, value, trueLabel, falseLabel } = field.config;\n const fieldLabel = label || caption;\n const fieldValue = value ? trueLabel : falseLabel;\n\n return (\n <TextField\n variant='standard'\n value={fieldValue}\n label={fieldLabel}\n slotProps={{\n input: {\n readOnly: true,\n disableUnderline: true\n }\n }}\n />\n );\n }\n\n case 'status':\n return (\n <TextField\n variant='standard'\n className='psdk-csf-status-style'\n value={field.config.value}\n label={field.config.label}\n slotProps={{\n input: {\n readOnly: true,\n disableUnderline: true\n }\n }}\n />\n );\n\n case 'phone': {\n const displayPhone = field.config.value !== '' ? field.config.value : '---';\n return (\n <a href={`tel:${displayPhone}`}>\n <TextField\n variant='standard'\n value={field.config.value}\n label={field.config.label}\n slotProps={{\n input: {\n readOnly: true,\n disableUnderline: true,\n inputProps: { style: { cursor: 'pointer' } }\n }\n }}\n />\n </a>\n );\n }\n\n case 'email': {\n const displayEmail = format(field.config.value, field.type);\n return (\n <a href={`mailto:${displayEmail}`}>\n <TextField\n variant='standard'\n value={field.config.value}\n label={field.config.label}\n slotProps={{\n input: {\n readOnly: true,\n disableUnderline: true,\n inputProps: { style: { cursor: 'pointer' } }\n }\n }}\n />\n </a>\n );\n }\n\n case 'date':\n case 'datetime': {\n const theDateFormatInfo = getDateFormatInfo();\n // console.log(`theDateFormatInfo: ${theDateFormatInfo}`);\n const theFormat =\n fieldTypeLower === 'datetime' ? `${theDateFormatInfo.dateFormatStringLong} hh:mm a` : theDateFormatInfo.dateFormatStringLong;\n\n return (\n <TextField\n variant='standard'\n value={format(field.config.value, field.type, {\n format: theFormat\n })}\n label={field.config.label}\n slotProps={{\n input: {\n readOnly: true,\n disableUnderline: true\n }\n }}\n />\n );\n }\n\n case 'currency': {\n const theCurrencyOptions = getCurrencyOptions(field.config?.currencyISOCode);\n return (\n <TextField\n variant='standard'\n value={format(field.config.value, field.type, theCurrencyOptions)}\n label={field.config.label}\n slotProps={{\n input: {\n readOnly: true,\n disableUnderline: true\n }\n }}\n />\n );\n }\n\n case 'boolean':\n case 'userreference':\n return (\n <TextField\n variant='standard'\n value={format(field.config.value, field.type)}\n label={field.config.label}\n slotProps={{\n input: {\n readOnly: true,\n disableUnderline: true\n }\n }}\n />\n );\n\n case 'caseoperator':\n return <Operator {...field.config} />;\n\n default:\n return (\n <span>\n {field.type.toLowerCase()} {field.config.value}\n </span>\n );\n }\n }\n\n // Whenever theFieldsToRender changes, update theFieldsAsGridItems that's used during render\n useEffect(() => {\n const arGridItems = theFieldsToRender.map((field: any) => {\n // display the field when either visibility property doesn't exist or is true(if exists)\n if (field.config.visibility === undefined || field.config.visibility === true) {\n return (\n <Grid2 size={{ xs: 6 }} key={field.config.label}>\n {getFieldValue(field)}\n </Grid2>\n );\n }\n\n return null;\n });\n setFieldsAsGridItems(arGridItems);\n }, [theFieldsToRender]);\n\n const theFieldsModifiable = theFields;\n\n // Special Case: if showStatus is true, splice the status value to be 2nd in theFields\n // if it's not already there\n if (showStatus && theFields?.[1].type !== 'status') {\n const oStatus = {\n type: 'status',\n config: { value: status, label: 'Status' }\n };\n\n const count = theFieldsModifiable.length;\n if (count < 2) {\n theFieldsModifiable.push(oStatus);\n } else {\n theFieldsModifiable.splice(1, 0, oStatus);\n }\n }\n\n // At this point, we know what fields we want to render...\n // So, update our state if it's changed\n if (!isDeepEqual(theFieldsToRender, theFieldsModifiable)) {\n setFieldsToRender(theFieldsModifiable);\n }\n\n return (\n <Grid2 container className='psdk-case-summary-fields'>\n {theFieldsAsGridItems}\n </Grid2>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"DetailsFields.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/DetailsFields/DetailsFields.tsx"],"names":[],"mappings":"AAWA,UAAU,kBAAkB;IAE1B,MAAM,EAAE,GAAG,EAAE,CAAC;CACf;AAwBD,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,EAAE,kBAAkB,2CAsG9D"}
1
+ {"version":3,"file":"DetailsFields.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/DetailsFields/DetailsFields.tsx"],"names":[],"mappings":"AAUA,UAAU,kBAAkB;IAE1B,MAAM,EAAE,GAAG,EAAE,CAAC;CACf;AAwBD,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,EAAE,kBAAkB,2CAqG9D"}
@@ -1,7 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- /* eslint-disable react/no-array-index-key */
3
2
  import React, { createElement, isValidElement } from 'react';
4
- import Grid from '@mui/material/Grid';
3
+ import Grid2 from '@mui/material/Grid2';
5
4
  import Typography from '@mui/material/Typography';
6
5
  import makeStyles from '@mui/styles/makeStyles';
7
6
  import createPConnectComponent from '../../../bridge/react_pconnect';
@@ -49,12 +48,11 @@ export default function DetailsFields(props) {
49
48
  });
50
49
  function getGridItemLabel(field, keyVal) {
51
50
  const dispValue = field.label;
52
- return (_jsx(Grid, { item: true, xs: 6, children: _jsx(Typography, { variant: 'body2', component: 'span', className: `${classes.fieldLabel}`, children: dispValue }) }, keyVal));
51
+ return (_jsx(Grid2, { size: { xs: 6 }, children: _jsx(Typography, { variant: 'body2', component: 'span', className: `${classes.fieldLabel}`, children: dispValue }) }, keyVal));
53
52
  }
54
53
  function formatItemValue(inField) {
55
54
  const { type, value } = inField;
56
55
  let formattedVal = value;
57
- // eslint-disable-next-line sonarjs/no-small-switch
58
56
  switch (type) {
59
57
  case 'date':
60
58
  formattedVal = format(value, type);
@@ -71,10 +69,10 @@ export default function DetailsFields(props) {
71
69
  }
72
70
  function getGridItemValue(field, keyVal) {
73
71
  const formattedValue = formatItemValue(field);
74
- return (_jsx(Grid, { item: true, xs: 6, children: _jsx(Typography, { variant: 'body2', component: 'span', className: classes.fieldValue, children: formattedValue }) }, keyVal));
72
+ return (_jsx(Grid2, { size: { xs: 6 }, children: _jsx(Typography, { variant: 'body2', component: 'span', className: classes.fieldValue, children: formattedValue }) }, keyVal));
75
73
  }
76
74
  function getGridItem(field, keyVal) {
77
- return (_jsx(Grid, { item: true, xs: 12, children: _jsx(Typography, { variant: 'body2', component: 'span', className: classes.fieldValue, children: field?.value }) }, keyVal));
75
+ return (_jsx(Grid2, { size: { xs: 12 }, children: _jsx(Typography, { variant: 'body2', component: 'span', className: classes.fieldValue, children: field?.value }) }, keyVal));
78
76
  }
79
77
  function getGridItems() {
80
78
  const gridItems = fieldComponents.map((field, index) => {
@@ -82,9 +80,9 @@ export default function DetailsFields(props) {
82
80
  return field?.value;
83
81
  }
84
82
  if (isValidElement(field?.value)) {
85
- return (_jsx(Grid, { container: true, spacing: 1, style: { padding: '4px 0px' }, children: getGridItem(field, `${index}-item`) }, index));
83
+ return (_jsx(Grid2, { container: true, spacing: 1, style: { padding: '4px 0px' }, children: getGridItem(field, `${index}-item`) }, index));
86
84
  }
87
- return (_jsxs(Grid, { container: true, spacing: 1, style: { padding: '4px 0px' }, children: [getGridItemLabel(field, `${index}-label`), getGridItemValue(field, `${index}-value`)] }, index));
85
+ return (_jsxs(Grid2, { container: true, spacing: 1, style: { padding: '4px 0px' }, children: [getGridItemLabel(field, `${index}-label`), getGridItemValue(field, `${index}-value`)] }, index));
88
86
  });
89
87
  return gridItems;
90
88
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DetailsFields.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/DetailsFields/DetailsFields.tsx"],"names":[],"mappings":";AAAA,6CAA6C;AAC7C,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAEhD,OAAO,uBAAuB,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AASlD,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACrC,IAAI,EAAE;QACJ,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC9B,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7B,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5B,aAAa,EAAE,KAAK,CAAC,OAA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AFoB,KAAK,CAG9D,CACR,CAAC;QACJ,CAAC,CAAC,CAAC;QACH,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,4BAAG,YAAY,EAAE,GAAI,CAAC;AAC/B,CAAC","sourcesContent":["/* eslint-disable react/no-array-index-key */\nimport React, { createElement, isValidElement } from 'react';\nimport Grid from '@mui/material/Grid';\nimport Typography from '@mui/material/Typography';\nimport makeStyles from '@mui/styles/makeStyles';\n\nimport createPConnectComponent from '../../../bridge/react_pconnect';\nimport { format } from '../../helpers/formatters';\n\n// DetailsFields is one of the few components that does NOT have getPConnect.\n// So, no need to extend PConnProps\ninterface DetailsFieldsProps {\n // If any, enter additional props that only exist on this component\n fields: any[];\n}\n\nconst useStyles = makeStyles(theme => ({\n root: {\n paddingRight: theme.spacing(1),\n paddingLeft: theme.spacing(1),\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n marginRight: theme.spacing(1),\n marginLeft: theme.spacing(1),\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1)\n },\n fieldLabel: {\n display: 'block',\n fontWeight: 400,\n color: theme.palette.text.secondary\n },\n fieldValue: {\n fontWeight: 400,\n color: theme.palette.text.primary\n }\n}));\n\nexport default function DetailsFields(props: DetailsFieldsProps) {\n // const componentName = \"DetailsFields\";\n const { fields = [] } = props;\n const classes = useStyles();\n const fieldComponents: any[] = [];\n\n fields?.forEach((field, index) => {\n const thePConn = field.getPConnect();\n const theCompType = thePConn.getComponentName().toLowerCase();\n const { label } = thePConn.getConfigProps();\n const configObj = thePConn?.getReferencedView();\n configObj.config.readOnly = true;\n configObj.config.displayMode = 'DISPLAY_ONLY';\n const propToUse = { ...thePConn.getInheritedProps() };\n configObj.config.label = theCompType === 'reference' ? propToUse?.label : label;\n fieldComponents.push({\n type: theCompType,\n label,\n value: <React.Fragment key={index}>{createElement(createPConnectComponent(), thePConn.getReferencedViewPConnect())}</React.Fragment>\n });\n });\n\n function getGridItemLabel(field: any, keyVal: string) {\n const dispValue = field.label;\n\n return (\n <Grid item xs={6} key={keyVal}>\n <Typography variant='body2' component='span' className={`${classes.fieldLabel}`}>\n {dispValue}\n </Typography>\n </Grid>\n );\n }\n\n function formatItemValue(inField: any) {\n const { type, value } = inField;\n let formattedVal = value;\n\n // eslint-disable-next-line sonarjs/no-small-switch\n switch (type) {\n case 'date':\n formattedVal = format(value, type);\n break;\n\n default:\n // No match means we return the value as we received it\n break;\n }\n\n // Finally, if the value is undefined or an empty string, we want to display it as \"---\"\n if (formattedVal === undefined || formattedVal === '') {\n formattedVal = '---';\n }\n\n return formattedVal;\n }\n\n function getGridItemValue(field: any, keyVal: string) {\n const formattedValue = formatItemValue(field);\n\n return (\n <Grid item xs={6} key={keyVal}>\n <Typography variant='body2' component='span' className={classes.fieldValue}>\n {formattedValue}\n </Typography>\n </Grid>\n );\n }\n\n function getGridItem(field: any, keyVal: string) {\n return (\n <Grid item xs={12} key={keyVal}>\n <Typography variant='body2' component='span' className={classes.fieldValue}>\n {field?.value}\n </Typography>\n </Grid>\n );\n }\n\n function getGridItems() {\n const gridItems: any[] = fieldComponents.map((field, index) => {\n if (field?.type === 'reference') {\n return field?.value;\n }\n if (isValidElement(field?.value)) {\n return (\n <Grid container spacing={1} style={{ padding: '4px 0px' }} key={index}>\n {getGridItem(field, `${index}-item`)}\n </Grid>\n );\n }\n return (\n <Grid container spacing={1} style={{ padding: '4px 0px' }} key={index}>\n {getGridItemLabel(field, `${index}-label`)}\n {getGridItemValue(field, `${index}-value`)}\n </Grid>\n );\n });\n return gridItems;\n }\n\n return <>{getGridItems()}</>;\n}\n"]}
1
+ {"version":3,"file":"DetailsFields.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/DetailsFields/DetailsFields.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,UAAU,MAAM,0BAA0B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,CAAC;gBACjC,OAAO,CACL,KAAC,KAAK,IAAC,SAAS,QAAC,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,YACvD,WAAW,CAAC,KAAK,EAAE,GAAG,KAAK,OAAO,CAAC,IAD2B,KAAK,CAE9D,CACT,CAAC;YACJ,CAAC;YACD,OAAO,CACL,MAAC,KAAK,IAAC,SAAS,QAAC,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,aACvD,gBAAgB,CAAC,KAAK,EAAE,GAAG,KAAK,QAAQ,CAAC,EACzC,gBAAgB,CAAC,KAAK,EAAE,GAAG,KAAK,QAAQ,CAAC,KAFqB,KAAK,CAG9D,CACT,CAAC;QACJ,CAAC,CAAC,CAAC;QACH,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,4BAAG,YAAY,EAAE,GAAI,CAAC;AAC/B,CAAC","sourcesContent":["import React, { createElement, isValidElement } from 'react';\nimport Grid2 from '@mui/material/Grid2';\nimport Typography from '@mui/material/Typography';\nimport makeStyles from '@mui/styles/makeStyles';\n\nimport createPConnectComponent from '../../../bridge/react_pconnect';\nimport { format } from '../../helpers/formatters';\n\n// DetailsFields is one of the few components that does NOT have getPConnect.\n// So, no need to extend PConnProps\ninterface DetailsFieldsProps {\n // If any, enter additional props that only exist on this component\n fields: any[];\n}\n\nconst useStyles = makeStyles(theme => ({\n root: {\n paddingRight: theme.spacing(1),\n paddingLeft: theme.spacing(1),\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n marginRight: theme.spacing(1),\n marginLeft: theme.spacing(1),\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1)\n },\n fieldLabel: {\n display: 'block',\n fontWeight: 400,\n color: theme.palette.text.secondary\n },\n fieldValue: {\n fontWeight: 400,\n color: theme.palette.text.primary\n }\n}));\n\nexport default function DetailsFields(props: DetailsFieldsProps) {\n // const componentName = \"DetailsFields\";\n const { fields = [] } = props;\n const classes = useStyles();\n const fieldComponents: any[] = [];\n\n fields?.forEach((field, index) => {\n const thePConn = field.getPConnect();\n const theCompType = thePConn.getComponentName().toLowerCase();\n const { label } = thePConn.getConfigProps();\n const configObj = thePConn?.getReferencedView();\n configObj.config.readOnly = true;\n configObj.config.displayMode = 'DISPLAY_ONLY';\n const propToUse = { ...thePConn.getInheritedProps() };\n configObj.config.label = theCompType === 'reference' ? propToUse?.label : label;\n fieldComponents.push({\n type: theCompType,\n label,\n value: <React.Fragment key={index}>{createElement(createPConnectComponent(), thePConn.getReferencedViewPConnect())}</React.Fragment>\n });\n });\n\n function getGridItemLabel(field: any, keyVal: string) {\n const dispValue = field.label;\n\n return (\n <Grid2 size={{ xs: 6 }} key={keyVal}>\n <Typography variant='body2' component='span' className={`${classes.fieldLabel}`}>\n {dispValue}\n </Typography>\n </Grid2>\n );\n }\n\n function formatItemValue(inField: any) {\n const { type, value } = inField;\n let formattedVal = value;\n\n switch (type) {\n case 'date':\n formattedVal = format(value, type);\n break;\n\n default:\n // No match means we return the value as we received it\n break;\n }\n\n // Finally, if the value is undefined or an empty string, we want to display it as \"---\"\n if (formattedVal === undefined || formattedVal === '') {\n formattedVal = '---';\n }\n\n return formattedVal;\n }\n\n function getGridItemValue(field: any, keyVal: string) {\n const formattedValue = formatItemValue(field);\n\n return (\n <Grid2 size={{ xs: 6 }} key={keyVal}>\n <Typography variant='body2' component='span' className={classes.fieldValue}>\n {formattedValue}\n </Typography>\n </Grid2>\n );\n }\n\n function getGridItem(field: any, keyVal: string) {\n return (\n <Grid2 size={{ xs: 12 }} key={keyVal}>\n <Typography variant='body2' component='span' className={classes.fieldValue}>\n {field?.value}\n </Typography>\n </Grid2>\n );\n }\n\n function getGridItems() {\n const gridItems: any[] = fieldComponents.map((field, index) => {\n if (field?.type === 'reference') {\n return field?.value;\n }\n if (isValidElement(field?.value)) {\n return (\n <Grid2 container spacing={1} style={{ padding: '4px 0px' }} key={index}>\n {getGridItem(field, `${index}-item`)}\n </Grid2>\n );\n }\n return (\n <Grid2 container spacing={1} style={{ padding: '4px 0px' }} key={index}>\n {getGridItemLabel(field, `${index}-label`)}\n {getGridItemValue(field, `${index}-value`)}\n </Grid2>\n );\n });\n return gridItems;\n }\n\n return <>{getGridItems()}</>;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FieldGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/FieldGroup/FieldGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAY,MAAM,OAAO,CAAC;AAQzD,UAAU,eAAe;IAEvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AA4BD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,iBAAiB,CAAC,eAAe,CAAC,2CAsC3E"}
1
+ {"version":3,"file":"FieldGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/FieldGroup/FieldGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAY,MAAM,OAAO,CAAC;AAQzD,UAAU,eAAe;IAEvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AA4BD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,iBAAiB,CAAC,eAAe,CAAC,2CAqC3E"}