@pega/react-sdk-components 0.25.1 → 0.25.3

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 (542) hide show
  1. package/lib/bridge/Context/StoreContext.d.ts +0 -1
  2. package/lib/bridge/Context/StoreContext.d.ts.map +1 -1
  3. package/lib/bridge/Context/StoreContext.js.map +1 -1
  4. package/lib/bridge/helpers/sdk_component_map.d.ts.map +1 -1
  5. package/lib/bridge/helpers/sdk_component_map.js +0 -6
  6. package/lib/bridge/helpers/sdk_component_map.js.map +1 -1
  7. package/lib/bridge/react_pconnect.d.ts.map +1 -1
  8. package/lib/bridge/react_pconnect.js +11 -14
  9. package/lib/bridge/react_pconnect.js.map +1 -1
  10. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.map +1 -1
  11. package/lib/components/designSystemExtension/Banner/Banner.css +1 -1
  12. package/lib/components/designSystemExtension/Banner/Banner.js +2 -2
  13. package/lib/components/designSystemExtension/Banner/Banner.js.map +1 -1
  14. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
  15. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
  16. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +49 -34
  17. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
  18. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts.map +1 -1
  19. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +6 -8
  20. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
  21. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts +1 -1
  22. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
  23. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +3 -5
  24. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
  25. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js +2 -2
  26. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
  27. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts.map +1 -1
  28. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +4 -6
  29. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
  30. package/lib/components/designSystemExtension/Operator/Operator.d.ts +1 -1
  31. package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
  32. package/lib/components/designSystemExtension/Operator/Operator.js +12 -9
  33. package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
  34. package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +1 -1
  35. package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
  36. package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
  37. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -1
  38. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +28 -4
  39. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -1
  40. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.css +4 -4
  41. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js +1 -1
  42. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
  43. package/lib/components/field/AutoComplete/AutoComplete.d.ts +1 -1
  44. package/lib/components/field/AutoComplete/AutoComplete.d.ts.map +1 -1
  45. package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
  46. package/lib/components/field/CancelAlert/CancelAlert.css +4 -4
  47. package/lib/components/field/CancelAlert/CancelAlert.d.ts +1 -1
  48. package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
  49. package/lib/components/field/CancelAlert/CancelAlert.js +3 -3
  50. package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
  51. package/lib/components/field/Checkbox/Checkbox.d.ts +9 -1
  52. package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
  53. package/lib/components/field/Checkbox/Checkbox.js +52 -3
  54. package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
  55. package/lib/components/field/Currency/Currency.d.ts +1 -1
  56. package/lib/components/field/Currency/Currency.d.ts.map +1 -1
  57. package/lib/components/field/Currency/Currency.js +2 -2
  58. package/lib/components/field/Currency/Currency.js.map +1 -1
  59. package/lib/components/field/Currency/currency-utils.d.ts.map +1 -1
  60. package/lib/components/field/Currency/currency-utils.js +0 -2
  61. package/lib/components/field/Currency/currency-utils.js.map +1 -1
  62. package/lib/components/field/Date/Date.d.ts +1 -1
  63. package/lib/components/field/Date/Date.d.ts.map +1 -1
  64. package/lib/components/field/Date/Date.js +3 -6
  65. package/lib/components/field/Date/Date.js.map +1 -1
  66. package/lib/components/field/DateTime/DateTime.d.ts +1 -1
  67. package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
  68. package/lib/components/field/DateTime/DateTime.js +4 -7
  69. package/lib/components/field/DateTime/DateTime.js.map +1 -1
  70. package/lib/components/field/Decimal/Decimal.d.ts +1 -1
  71. package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
  72. package/lib/components/field/Decimal/Decimal.js +2 -4
  73. package/lib/components/field/Decimal/Decimal.js.map +1 -1
  74. package/lib/components/field/Dropdown/Dropdown.d.ts +1 -1
  75. package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
  76. package/lib/components/field/Dropdown/Dropdown.js +6 -9
  77. package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
  78. package/lib/components/field/Email/Email.d.ts +1 -1
  79. package/lib/components/field/Email/Email.d.ts.map +1 -1
  80. package/lib/components/field/Email/Email.js +6 -7
  81. package/lib/components/field/Email/Email.js.map +1 -1
  82. package/lib/components/field/Group/Group.d.ts +2 -2
  83. package/lib/components/field/Group/Group.d.ts.map +1 -1
  84. package/lib/components/field/Group/Group.js +2 -2
  85. package/lib/components/field/Group/Group.js.map +1 -1
  86. package/lib/components/field/Integer/Integer.d.ts +1 -1
  87. package/lib/components/field/Integer/Integer.d.ts.map +1 -1
  88. package/lib/components/field/Integer/Integer.js +4 -5
  89. package/lib/components/field/Integer/Integer.js.map +1 -1
  90. package/lib/components/field/Location/Location.d.ts +10 -0
  91. package/lib/components/field/Location/Location.d.ts.map +1 -0
  92. package/lib/components/field/Location/Location.js +157 -0
  93. package/lib/components/field/Location/Location.js.map +1 -0
  94. package/lib/components/field/Location/index.d.ts +2 -0
  95. package/lib/components/field/Location/index.d.ts.map +1 -0
  96. package/lib/components/field/Location/index.js +2 -0
  97. package/lib/components/field/Location/index.js.map +1 -0
  98. package/lib/components/field/Multiselect/Multiselect.js.map +1 -1
  99. package/lib/components/field/Multiselect/utils.d.ts +2 -1
  100. package/lib/components/field/Multiselect/utils.d.ts.map +1 -1
  101. package/lib/components/field/Multiselect/utils.js.map +1 -1
  102. package/lib/components/field/ObjectReference/ObjectReference.d.ts +16 -0
  103. package/lib/components/field/ObjectReference/ObjectReference.d.ts.map +1 -0
  104. package/lib/components/field/ObjectReference/ObjectReference.js +165 -0
  105. package/lib/components/field/ObjectReference/ObjectReference.js.map +1 -0
  106. package/lib/components/field/ObjectReference/index.d.ts +2 -0
  107. package/lib/components/field/ObjectReference/index.d.ts.map +1 -0
  108. package/lib/components/field/ObjectReference/index.js +2 -0
  109. package/lib/components/field/ObjectReference/index.js.map +1 -0
  110. package/lib/components/field/ObjectReference/utils.d.ts +17 -0
  111. package/lib/components/field/ObjectReference/utils.d.ts.map +1 -0
  112. package/lib/components/field/ObjectReference/utils.js +99 -0
  113. package/lib/components/field/ObjectReference/utils.js.map +1 -0
  114. package/lib/components/field/Percentage/Percentage.d.ts +1 -1
  115. package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
  116. package/lib/components/field/Percentage/Percentage.js +2 -5
  117. package/lib/components/field/Percentage/Percentage.js.map +1 -1
  118. package/lib/components/field/Phone/Phone.d.ts +1 -1
  119. package/lib/components/field/Phone/Phone.d.ts.map +1 -1
  120. package/lib/components/field/Phone/Phone.js +6 -4
  121. package/lib/components/field/Phone/Phone.js.map +1 -1
  122. package/lib/components/field/RadioButtons/RadioButtons.d.ts +8 -1
  123. package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
  124. package/lib/components/field/RadioButtons/RadioButtons.js +12 -1
  125. package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
  126. package/lib/components/field/RichText/RichText.d.ts +1 -1
  127. package/lib/components/field/RichText/RichText.d.ts.map +1 -1
  128. package/lib/components/field/RichText/RichText.js.map +1 -1
  129. package/lib/components/field/ScalarList/ScalarList.d.ts +1 -1
  130. package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -1
  131. package/lib/components/field/ScalarList/ScalarList.js +1 -2
  132. package/lib/components/field/ScalarList/ScalarList.js.map +1 -1
  133. package/lib/components/field/SelectableCard/SelectableCard.d.ts +2 -0
  134. package/lib/components/field/SelectableCard/SelectableCard.d.ts.map +1 -0
  135. package/lib/components/field/SelectableCard/SelectableCard.js +57 -0
  136. package/lib/components/field/SelectableCard/SelectableCard.js.map +1 -0
  137. package/lib/components/field/SelectableCard/index.d.ts +2 -0
  138. package/lib/components/field/SelectableCard/index.d.ts.map +1 -0
  139. package/lib/components/field/SelectableCard/index.js +2 -0
  140. package/lib/components/field/SelectableCard/index.js.map +1 -0
  141. package/lib/components/field/SelectableCard/utils.d.ts +14 -0
  142. package/lib/components/field/SelectableCard/utils.d.ts.map +1 -0
  143. package/lib/components/field/SelectableCard/utils.js +185 -0
  144. package/lib/components/field/SelectableCard/utils.js.map +1 -0
  145. package/lib/components/field/SemanticLink/SemanticLink.d.ts +10 -2
  146. package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
  147. package/lib/components/field/SemanticLink/SemanticLink.js +128 -15
  148. package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
  149. package/lib/components/field/SemanticLink/utils.js +1 -1
  150. package/lib/components/field/SemanticLink/utils.js.map +1 -1
  151. package/lib/components/field/TextArea/TextArea.d.ts +1 -1
  152. package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
  153. package/lib/components/field/TextArea/TextArea.js +4 -5
  154. package/lib/components/field/TextArea/TextArea.js.map +1 -1
  155. package/lib/components/field/TextContent/TextContent.d.ts +1 -1
  156. package/lib/components/field/TextContent/TextContent.d.ts.map +1 -1
  157. package/lib/components/field/TextContent/TextContent.js +0 -1
  158. package/lib/components/field/TextContent/TextContent.js.map +1 -1
  159. package/lib/components/field/TextInput/TextInput.d.ts +1 -1
  160. package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
  161. package/lib/components/field/TextInput/TextInput.js +4 -5
  162. package/lib/components/field/TextInput/TextInput.js.map +1 -1
  163. package/lib/components/field/Time/Time.d.ts +1 -1
  164. package/lib/components/field/Time/Time.d.ts.map +1 -1
  165. package/lib/components/field/Time/Time.js +2 -5
  166. package/lib/components/field/Time/Time.js.map +1 -1
  167. package/lib/components/field/URL/URL.d.ts +1 -1
  168. package/lib/components/field/URL/URL.d.ts.map +1 -1
  169. package/lib/components/field/URL/URL.js +4 -5
  170. package/lib/components/field/URL/URL.js.map +1 -1
  171. package/lib/components/field/UserReference/UserReference.d.ts +1 -2
  172. package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
  173. package/lib/components/field/UserReference/UserReference.js +0 -1
  174. package/lib/components/field/UserReference/UserReference.js.map +1 -1
  175. package/lib/components/field/UserReference/UserReferenceUtils.d.ts.map +1 -1
  176. package/lib/components/field/UserReference/UserReferenceUtils.js.map +1 -1
  177. package/lib/components/helpers/attachmentHelpers.d.ts +14 -11
  178. package/lib/components/helpers/attachmentHelpers.d.ts.map +1 -1
  179. package/lib/components/helpers/attachmentHelpers.js +52 -30
  180. package/lib/components/helpers/attachmentHelpers.js.map +1 -1
  181. package/lib/components/helpers/case-utils.js.map +1 -1
  182. package/lib/components/helpers/common-utils.d.ts +1 -1
  183. package/lib/components/helpers/common-utils.js.map +1 -1
  184. package/lib/components/helpers/data_page.d.ts.map +1 -1
  185. package/lib/components/helpers/data_page.js +0 -1
  186. package/lib/components/helpers/data_page.js.map +1 -1
  187. package/lib/components/helpers/date-format-utils.d.ts.map +1 -1
  188. package/lib/components/helpers/event-utils.d.ts.map +1 -1
  189. package/lib/components/helpers/event-utils.js.map +1 -1
  190. package/lib/components/helpers/field-group-utils.d.ts +1 -1
  191. package/lib/components/helpers/field-group-utils.d.ts.map +1 -1
  192. package/lib/components/helpers/field-group-utils.js.map +1 -1
  193. package/lib/components/helpers/formatters/Boolean.js.map +1 -1
  194. package/lib/components/helpers/formatters/Currency.js.map +1 -1
  195. package/lib/components/helpers/formatters/CurrencyMap.d.ts.map +1 -1
  196. package/lib/components/helpers/formatters/CurrencyMap.js +0 -1
  197. package/lib/components/helpers/formatters/CurrencyMap.js.map +1 -1
  198. package/lib/components/helpers/formatters/Date.js.map +1 -1
  199. package/lib/components/helpers/formatters/index.js.map +1 -1
  200. package/lib/components/helpers/instructions-utils.d.ts.map +1 -1
  201. package/lib/components/helpers/reactContextHelpers.d.ts +0 -1
  202. package/lib/components/helpers/reactContextHelpers.d.ts.map +1 -1
  203. package/lib/components/helpers/simpleTableHelpers.d.ts +15 -1
  204. package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
  205. package/lib/components/helpers/simpleTableHelpers.js +111 -5
  206. package/lib/components/helpers/simpleTableHelpers.js.map +1 -1
  207. package/lib/components/helpers/state-utils.d.ts.map +1 -1
  208. package/lib/components/helpers/state-utils.js.map +1 -1
  209. package/lib/components/helpers/template-utils.js.map +1 -1
  210. package/lib/components/helpers/utils.d.ts +1 -0
  211. package/lib/components/helpers/utils.d.ts.map +1 -1
  212. package/lib/components/helpers/utils.js +7 -1
  213. package/lib/components/helpers/utils.js.map +1 -1
  214. package/lib/components/helpers/versionHelpers.d.ts.map +1 -1
  215. package/lib/components/helpers/versionHelpers.js +0 -1
  216. package/lib/components/helpers/versionHelpers.js.map +1 -1
  217. package/lib/components/infra/ActionButtons/ActionButtons.d.ts.map +1 -1
  218. package/lib/components/infra/ActionButtons/ActionButtons.js +12 -7
  219. package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
  220. package/lib/components/infra/Assignment/Assignment.d.ts +2 -2
  221. package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
  222. package/lib/components/infra/Assignment/Assignment.js +1 -2
  223. package/lib/components/infra/Assignment/Assignment.js.map +1 -1
  224. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +2 -2
  225. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
  226. package/lib/components/infra/AssignmentCard/AssignmentCard.js.map +1 -1
  227. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +1 -2
  228. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
  229. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +13 -77
  230. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
  231. package/lib/components/infra/Containers/FlowContainer/helpers.d.ts.map +1 -1
  232. package/lib/components/infra/Containers/FlowContainer/helpers.js.map +1 -1
  233. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts +1 -1
  234. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts.map +1 -1
  235. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js +0 -1
  236. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js.map +1 -1
  237. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +1 -1
  238. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
  239. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +0 -2
  240. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
  241. package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts +0 -1
  242. package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts.map +1 -1
  243. package/lib/components/infra/Containers/SimpleView/helper.d.ts +0 -1
  244. package/lib/components/infra/Containers/SimpleView/helper.d.ts.map +1 -1
  245. package/lib/components/infra/Containers/SimpleView/helper.js.map +1 -1
  246. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +1 -1
  247. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
  248. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +3 -4
  249. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
  250. package/lib/components/infra/Containers/container-helpers.d.ts +1 -0
  251. package/lib/components/infra/Containers/container-helpers.d.ts.map +1 -1
  252. package/lib/components/infra/Containers/container-helpers.js +46 -1
  253. package/lib/components/infra/Containers/container-helpers.js.map +1 -1
  254. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +2 -2
  255. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
  256. package/lib/components/infra/DashboardFilter/DashboardFilter.js +0 -2
  257. package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
  258. package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -1
  259. package/lib/components/infra/DashboardFilter/filterUtils.js +2 -3
  260. package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
  261. package/lib/components/infra/DeferLoad/DeferLoad.d.ts +1 -1
  262. package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
  263. package/lib/components/infra/DeferLoad/DeferLoad.js +2 -4
  264. package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
  265. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +1 -1
  266. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
  267. package/lib/components/infra/ErrorBoundary/ErrorBoundary.js +0 -2
  268. package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
  269. package/lib/components/infra/MultiStep/MultiStep.css +8 -8
  270. package/lib/components/infra/MultiStep/MultiStep.d.ts +2 -2
  271. package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
  272. package/lib/components/infra/MultiStep/MultiStep.js +1 -1
  273. package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
  274. package/lib/components/infra/NavBar/NavBar.css +1 -1
  275. package/lib/components/infra/NavBar/NavBar.d.ts +1 -1
  276. package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
  277. package/lib/components/infra/NavBar/NavBar.js +4 -5
  278. package/lib/components/infra/NavBar/NavBar.js.map +1 -1
  279. package/lib/components/infra/Reference/Reference.d.ts +1 -1
  280. package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
  281. package/lib/components/infra/Reference/Reference.js +2 -3
  282. package/lib/components/infra/Reference/Reference.js.map +1 -1
  283. package/lib/components/infra/Region/Region.d.ts +1 -1
  284. package/lib/components/infra/Region/Region.d.ts.map +1 -1
  285. package/lib/components/infra/Region/Region.js.map +1 -1
  286. package/lib/components/infra/RootContainer/RootContainer.d.ts +2 -2
  287. package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
  288. package/lib/components/infra/RootContainer/RootContainer.js +0 -1
  289. package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
  290. package/lib/components/infra/Stages/Stages.d.ts +1 -1
  291. package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
  292. package/lib/components/infra/Stages/Stages.js.map +1 -1
  293. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +1 -1
  294. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
  295. package/lib/components/infra/View/View.d.ts +2 -2
  296. package/lib/components/infra/View/View.d.ts.map +1 -1
  297. package/lib/components/infra/View/View.js.map +1 -1
  298. package/lib/components/template/AdvancedSearch/AdvancedSearch.d.ts.map +1 -1
  299. package/lib/components/template/AdvancedSearch/AdvancedSearch.js +0 -1
  300. package/lib/components/template/AdvancedSearch/AdvancedSearch.js.map +1 -1
  301. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.d.ts +0 -1
  302. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.d.ts.map +1 -1
  303. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.js +2 -8
  304. package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.js.map +1 -1
  305. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.d.ts.map +1 -1
  306. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.js +3 -5
  307. package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.js.map +1 -1
  308. package/lib/components/template/AdvancedSearch/SearchGroups/hooks.js +0 -1
  309. package/lib/components/template/AdvancedSearch/SearchGroups/hooks.js.map +1 -1
  310. package/lib/components/template/AdvancedSearch/SearchGroups/utils.js.map +1 -1
  311. package/lib/components/template/AdvancedSearch/TemplateContext.d.ts +0 -1
  312. package/lib/components/template/AdvancedSearch/TemplateContext.d.ts.map +1 -1
  313. package/lib/components/template/AppShell/AppShell.css +1 -1
  314. package/lib/components/template/AppShell/AppShell.d.ts +2 -2
  315. package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
  316. package/lib/components/template/AppShell/AppShell.js +4 -9
  317. package/lib/components/template/AppShell/AppShell.js.map +1 -1
  318. package/lib/components/template/BannerPage/BannerPage.d.ts +2 -2
  319. package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
  320. package/lib/components/template/BannerPage/BannerPage.js.map +1 -1
  321. package/lib/components/template/CaseSummary/CaseSummary.d.ts +2 -2
  322. package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
  323. package/lib/components/template/CaseSummary/CaseSummary.js +0 -1
  324. package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
  325. package/lib/components/template/CaseView/CaseView.d.ts +2 -2
  326. package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
  327. package/lib/components/template/CaseView/CaseView.js +4 -5
  328. package/lib/components/template/CaseView/CaseView.js.map +1 -1
  329. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +1 -1
  330. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
  331. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +1 -1
  332. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
  333. package/lib/components/template/Confirmation/Confirmation.d.ts +2 -2
  334. package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
  335. package/lib/components/template/Confirmation/Confirmation.js +0 -1
  336. package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
  337. package/lib/components/template/DataReference/DataReference.d.ts +2 -2
  338. package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
  339. package/lib/components/template/DataReference/DataReference.js +8 -12
  340. package/lib/components/template/DataReference/DataReference.js.map +1 -1
  341. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.d.ts +1 -1
  342. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.d.ts.map +1 -1
  343. package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.js.map +1 -1
  344. package/lib/components/template/DataReference/SearchForm.d.ts.map +1 -1
  345. package/lib/components/template/DataReference/SearchForm.js +3 -2
  346. package/lib/components/template/DataReference/SearchForm.js.map +1 -1
  347. package/lib/components/template/DataReference/utils.d.ts +4 -4
  348. package/lib/components/template/DataReference/utils.d.ts.map +1 -1
  349. package/lib/components/template/DataReference/utils.js +1 -1
  350. package/lib/components/template/DataReference/utils.js.map +1 -1
  351. package/lib/components/template/DefaultForm/DefaultForm.d.ts +2 -2
  352. package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
  353. package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
  354. package/lib/components/template/DefaultForm/utils/index.d.ts.map +1 -1
  355. package/lib/components/template/DefaultForm/utils/index.js.map +1 -1
  356. package/lib/components/template/Details/Details/Details.d.ts +1 -1
  357. package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
  358. package/lib/components/template/Details/Details/Details.js +2 -3
  359. package/lib/components/template/Details/Details/Details.js.map +1 -1
  360. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +2 -2
  361. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
  362. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
  363. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +1 -1
  364. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
  365. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +2 -3
  366. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
  367. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +1 -1
  368. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
  369. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +2 -3
  370. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
  371. package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts +1 -1
  372. package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts.map +1 -1
  373. package/lib/components/template/Details/DynamicTabs/DynamicTabs.js.map +1 -1
  374. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +1 -1
  375. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
  376. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +1 -2
  377. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
  378. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +2 -2
  379. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
  380. package/lib/components/template/InlineDashboard/InlineDashboard.js +2 -2
  381. package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
  382. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +2 -2
  383. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
  384. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js.map +1 -1
  385. package/lib/components/template/ListPage/ListPage.d.ts +1 -1
  386. package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
  387. package/lib/components/template/ListPage/ListPage.js.map +1 -1
  388. package/lib/components/template/ListView/DefaultViewMeta.js.map +1 -1
  389. package/lib/components/template/ListView/ListView.d.ts +1 -1
  390. package/lib/components/template/ListView/ListView.d.ts.map +1 -1
  391. package/lib/components/template/ListView/ListView.js +3 -14
  392. package/lib/components/template/ListView/ListView.js.map +1 -1
  393. package/lib/components/template/ListView/hooks.d.ts.map +1 -1
  394. package/lib/components/template/ListView/hooks.js +2 -5
  395. package/lib/components/template/ListView/hooks.js.map +1 -1
  396. package/lib/components/template/ListView/utils.d.ts.map +1 -1
  397. package/lib/components/template/ListView/utils.js +0 -1
  398. package/lib/components/template/ListView/utils.js.map +1 -1
  399. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +1 -1
  400. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
  401. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -1
  402. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +2 -2
  403. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -1
  404. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js.map +1 -1
  405. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +1 -1
  406. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
  407. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +2 -3
  408. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
  409. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +2 -2
  410. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -1
  411. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js.map +1 -1
  412. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +2 -2
  413. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
  414. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -1
  415. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +2 -2
  416. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
  417. package/lib/components/template/OneColumn/OneColumn/OneColumn.js +2 -2
  418. package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
  419. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +1 -1
  420. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
  421. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -1
  422. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +2 -2
  423. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
  424. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js.map +1 -1
  425. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +1 -1
  426. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
  427. package/lib/components/template/PromotedFilters/PromotedFilters.js +0 -1
  428. package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
  429. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts +1 -1
  430. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
  431. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js +1 -2
  432. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
  433. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +2 -2
  434. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
  435. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +33 -31
  436. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
  437. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +1 -1
  438. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
  439. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
  440. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +1 -1
  441. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
  442. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
  443. package/lib/components/template/SubTabs/SubTabs.d.ts +2 -2
  444. package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
  445. package/lib/components/template/SubTabs/SubTabs.js.map +1 -1
  446. package/lib/components/template/SubTabs/tabUtils.d.ts.map +1 -1
  447. package/lib/components/template/SubTabs/tabUtils.js.map +1 -1
  448. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts +2 -2
  449. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
  450. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +2 -3
  451. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
  452. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +1 -1
  453. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
  454. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -1
  455. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +2 -2
  456. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
  457. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +2 -3
  458. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
  459. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +2 -2
  460. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
  461. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js.map +1 -1
  462. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +1 -1
  463. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
  464. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +2 -3
  465. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
  466. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +2 -2
  467. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -1
  468. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js.map +1 -1
  469. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +2 -2
  470. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
  471. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js.map +1 -1
  472. package/lib/components/template/WssNavBar/WssNavBar.css +1 -1
  473. package/lib/components/template/WssNavBar/WssNavBar.d.ts +1 -1
  474. package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -1
  475. package/lib/components/template/WssNavBar/WssNavBar.js +3 -3
  476. package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
  477. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts +1 -1
  478. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
  479. package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
  480. package/lib/components/widget/Attachment/Attachment.css +6 -8
  481. package/lib/components/widget/Attachment/Attachment.d.ts +1 -1
  482. package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
  483. package/lib/components/widget/Attachment/Attachment.js +52 -51
  484. package/lib/components/widget/Attachment/Attachment.js.map +1 -1
  485. package/lib/components/widget/CaseHistory/CaseHistory.d.ts +1 -1
  486. package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
  487. package/lib/components/widget/CaseHistory/CaseHistory.js +2 -2
  488. package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
  489. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.css +0 -14
  490. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +1 -1
  491. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts.map +1 -1
  492. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js +1 -1
  493. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
  494. package/lib/components/widget/FileUtility/FileUtility/FileUtility.css +7 -6
  495. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +1 -1
  496. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
  497. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +9 -10
  498. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
  499. package/lib/components/widget/Followers/Followers.d.ts +2 -2
  500. package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
  501. package/lib/components/widget/Followers/Followers.js +0 -2
  502. package/lib/components/widget/Followers/Followers.js.map +1 -1
  503. package/lib/components/widget/QuickCreate/QuickCreate.d.ts +1 -1
  504. package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
  505. package/lib/components/widget/QuickCreate/QuickCreate.js +0 -1
  506. package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
  507. package/lib/components/widget/SummaryItem/SummaryItem.css +9 -11
  508. package/lib/components/widget/SummaryItem/SummaryItem.d.ts +1 -1
  509. package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
  510. package/lib/components/widget/SummaryItem/SummaryItem.js +1 -1
  511. package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
  512. package/lib/components/widget/SummaryList/SummaryList.d.ts +1 -1
  513. package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
  514. package/lib/components/widget/SummaryList/SummaryList.js.map +1 -1
  515. package/lib/components/widget/ToDo/ToDo.css +1 -13
  516. package/lib/components/widget/ToDo/ToDo.d.ts +1 -1
  517. package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
  518. package/lib/components/widget/ToDo/ToDo.js +14 -8
  519. package/lib/components/widget/ToDo/ToDo.js.map +1 -1
  520. package/lib/hooks/useAfterInitialEffect.d.ts +1 -1
  521. package/lib/hooks/useAfterInitialEffect.d.ts.map +1 -1
  522. package/lib/hooks/useAfterInitialEffect.js.map +1 -1
  523. package/lib/hooks/useConsolidatedRef.d.ts +1 -1
  524. package/lib/hooks/useConsolidatedRef.d.ts.map +1 -1
  525. package/lib/hooks/useConsolidatedRef.js.map +1 -1
  526. package/lib/hooks/useFocusFirstField.d.ts.map +1 -1
  527. package/lib/hooks/useFocusFirstField.js.map +1 -1
  528. package/lib/hooks/useGetTabsCount.d.ts +0 -1
  529. package/lib/hooks/useGetTabsCount.d.ts.map +1 -1
  530. package/lib/hooks/useGetTabsCount.js +2 -3
  531. package/lib/hooks/useGetTabsCount.js.map +1 -1
  532. package/lib/hooks/useScrolltoTop.d.ts.map +1 -1
  533. package/lib/sdk-pega-component-map.d.ts +112 -106
  534. package/lib/sdk-pega-component-map.d.ts.map +1 -1
  535. package/lib/sdk-pega-component-map.js +9 -2
  536. package/lib/sdk-pega-component-map.js.map +1 -1
  537. package/lib/theme.d.ts +23 -0
  538. package/lib/theme.d.ts.map +1 -1
  539. package/lib/theme.js +189 -2
  540. package/lib/theme.js.map +1 -1
  541. package/lib/types/PConnProps.d.ts +1 -1
  542. package/package.json +16 -14
@@ -0,0 +1,2 @@
1
+ export { default } from './SelectableCard';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/field/SelectableCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["export { default } from './SelectableCard';\n"]}
@@ -0,0 +1,14 @@
1
+ export declare const getResolvedConstantValue: (pConnect: any, key: any) => any;
2
+ export declare const resolveReferencedPConnect: (pConnect: any) => any;
3
+ /**
4
+ * A helper function to create an object consisting react component as per the type.
5
+ * This is used by CaseSummary template.
6
+ * @param {object} pConnectMeta Object containing meta information for the particular field authored
7
+ * @param {Function} getPConnect PConnect function passed along to other components.
8
+ * @param {string} displayMode displayMode string contains information about the layout of component in review mode.
9
+ */
10
+ export declare function prepareComponentInCaseSummary(pConnectMeta: any, getPConnect: Function): any;
11
+ export declare function resolveReferenceFields(item: {
12
+ [key: string]: unknown;
13
+ }, hideFieldLabels: boolean, recordKey: string, pConnect: typeof PConnect): any;
14
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/components/field/SelectableCard/utils.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,wBAAwB,GAAI,aAAQ,EAAE,QAAG,QAErD,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAG,aAAQ,QAKhD,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAAC,YAAY,EAAE,GAAG,EAAE,WAAW,EAAE,QAAQ,OA0JrF;AAED,wBAAgB,sBAAsB,CACpC,IAAI,EAAE;IACJ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,EACD,eAAe,EAAE,OAAO,EACxB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,OAAO,QAAQ,OAyC1B"}
@@ -0,0 +1,185 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Link } from '@mui/material';
3
+ import { Utils } from '../../helpers/utils';
4
+ export const getResolvedConstantValue = (pConnect, key) => {
5
+ return pConnect.getValue(PCore.getResolvedConstantValue(key)) || pConnect.getValue(key);
6
+ };
7
+ export const resolveReferencedPConnect = pConnect => {
8
+ if (!pConnect || !pConnect.meta)
9
+ return undefined;
10
+ const type = pConnect?._type ?? undefined;
11
+ const referencedPConnect = type === 'reference' && pConnect.getReferencedViewPConnect().getPConnect();
12
+ return referencedPConnect || pConnect;
13
+ };
14
+ /**
15
+ * A helper function to create an object consisting react component as per the type.
16
+ * This is used by CaseSummary template.
17
+ * @param {object} pConnectMeta Object containing meta information for the particular field authored
18
+ * @param {Function} getPConnect PConnect function passed along to other components.
19
+ * @param {string} displayMode displayMode string contains information about the layout of component in review mode.
20
+ */
21
+ export function prepareComponentInCaseSummary(pConnectMeta, getPConnect) {
22
+ const { config, children } = pConnectMeta;
23
+ const noValueComponent = _jsx("div", { children: "No Value" });
24
+ const placeholder = '...';
25
+ const pConnect = getPConnect();
26
+ const caseSummaryComponentObject = {};
27
+ let { type } = pConnectMeta;
28
+ let showAddressLabel = true;
29
+ if (config && config.value === `@P .${Utils.getMappedKey('pyStatusWork')}`) {
30
+ config.displayAsStatus = true;
31
+ type = 'TextInput'; // force the type to be TextInput for status field.
32
+ // As TextInput is loaded forcefully sometimes, TextInput component might not be available in lazy map.
33
+ // Load TextInput if it is not available.
34
+ if (!PCore.getComponentsRegistry().getLazyComponent(type)) {
35
+ PCore.getAssetLoader().getLoader('component-loader')([type]);
36
+ }
37
+ }
38
+ caseSummaryComponentObject.name = pConnect.resolveConfigProps({ label: config.label }).label;
39
+ if (config.inheritedProps) {
40
+ const labelInInheritedProp = config.inheritedProps.find(inheritedProp => inheritedProp.prop === 'label');
41
+ if (labelInInheritedProp) {
42
+ labelInInheritedProp.value = pConnect.resolveConfigProps({ label: labelInInheritedProp.value }).label;
43
+ }
44
+ }
45
+ switch (type) {
46
+ case 'CaseOperator': {
47
+ if (config.label.includes('Create operator')) {
48
+ caseSummaryComponentObject.name = pConnect.resolveConfigProps({
49
+ createLabel: config.createLabel
50
+ }).createLabel;
51
+ }
52
+ else if (config.label.includes('Update operator')) {
53
+ caseSummaryComponentObject.name = pConnect.resolveConfigProps({
54
+ updateLabel: config.updateLabel
55
+ }).updateLabel;
56
+ }
57
+ else {
58
+ caseSummaryComponentObject.name = pConnect.resolveConfigProps({
59
+ resolveLabel: config.resolveLabel
60
+ }).resolveLabel;
61
+ }
62
+ break;
63
+ }
64
+ case 'Checkbox': {
65
+ caseSummaryComponentObject.name = pConnect.resolveConfigProps({
66
+ label: config.caption
67
+ }).label;
68
+ break;
69
+ }
70
+ case 'Pega_UI_PercentageWidget': {
71
+ const rawValue = pConnect.resolveConfigProps({
72
+ value: config.value
73
+ }).value;
74
+ caseSummaryComponentObject.simpleValue = rawValue || rawValue === 0 ? `${rawValue}%` : noValueComponent;
75
+ break;
76
+ }
77
+ case 'Address': {
78
+ showAddressLabel = false;
79
+ caseSummaryComponentObject.variant = 'stacked';
80
+ break;
81
+ }
82
+ case 'Location':
83
+ case 'RichText': {
84
+ const rawValue = pConnect.resolveConfigProps({
85
+ value: config.value
86
+ }).value;
87
+ caseSummaryComponentObject.variant = 'stacked';
88
+ caseSummaryComponentObject.simpleValue = rawValue?.length ? rawValue : noValueComponent;
89
+ break;
90
+ }
91
+ case 'TextArea': {
92
+ const rawValue = pConnect.resolveConfigProps({
93
+ value: config.value
94
+ }).value;
95
+ if (rawValue?.length > 22) {
96
+ caseSummaryComponentObject.variant = 'stacked';
97
+ }
98
+ caseSummaryComponentObject.simpleValue = rawValue?.length ? rawValue : noValueComponent;
99
+ break;
100
+ }
101
+ case 'URL': {
102
+ if (config.displayAs === 'Image') {
103
+ const rawValue = pConnect.resolveConfigProps({
104
+ value: config.value
105
+ }).value;
106
+ caseSummaryComponentObject.variant = 'stacked';
107
+ caseSummaryComponentObject.simpleValue = rawValue?.length ? _jsx(Link, { href: rawValue, children: rawValue }) : noValueComponent;
108
+ }
109
+ break;
110
+ }
111
+ case 'reference': {
112
+ const referencedPConnect = resolveReferencedPConnect(pConnect);
113
+ const viewType = referencedPConnect?.meta?.config.type;
114
+ const viewTemplate = referencedPConnect?.meta?.config.template;
115
+ const isTable = ['multirecordlist'].includes(viewType);
116
+ const isDataReference = viewTemplate === 'DataReference';
117
+ if (isTable || !isDataReference) {
118
+ caseSummaryComponentObject.variant = 'stacked';
119
+ caseSummaryComponentObject.simpleValue = placeholder;
120
+ }
121
+ break;
122
+ }
123
+ case 'view': {
124
+ caseSummaryComponentObject.variant = 'stacked';
125
+ caseSummaryComponentObject.simpleValue = placeholder;
126
+ break;
127
+ }
128
+ default:
129
+ break;
130
+ }
131
+ const createdComponent = pConnect.createComponent({
132
+ type,
133
+ children: children ? [...children] : [],
134
+ showAddressLabel,
135
+ config: {
136
+ ...config,
137
+ // Need a unique key for each summary component which helps in creating new component based on visibility
138
+ // Also a consistent key helps in rerendering summary components instead of remounting
139
+ key: config
140
+ }
141
+ });
142
+ createdComponent.props.getPConnect().setInheritedProp('displayMode', 'DISPLAY_ONLY');
143
+ createdComponent.props.getPConnect().setInheritedProp('readOnly', true);
144
+ if (type === 'Address') {
145
+ createdComponent.props.getPConnect().setInheritedProp('showAddressLabel', showAddressLabel);
146
+ }
147
+ // Add field label for reference summary item when not Embedded data
148
+ if (type === 'reference') {
149
+ const isEmbeddedData = config.context && config.displayAs === 'Form';
150
+ if (!isEmbeddedData) {
151
+ caseSummaryComponentObject.name = createdComponent.props.getPConnect().getInheritedProps().label;
152
+ }
153
+ }
154
+ caseSummaryComponentObject.value = createdComponent;
155
+ return caseSummaryComponentObject;
156
+ }
157
+ export function resolveReferenceFields(item, hideFieldLabels, recordKey, pConnect) {
158
+ const presets = (pConnect.getRawMetadata()?.config).presets ?? [];
159
+ const presetChildren = presets[0]?.children?.[0]?.children ?? [];
160
+ const maxFields = 5;
161
+ return presetChildren.slice(0, maxFields).map((preset, index) => {
162
+ const fieldMeta = {
163
+ meta: {
164
+ ...preset,
165
+ config: {
166
+ ...preset.config,
167
+ displayMode: 'DISPLAY_ONLY'
168
+ }
169
+ },
170
+ useCustomContext: item
171
+ };
172
+ const configObj = PCore.createPConnect(fieldMeta);
173
+ const meta = configObj.getPConnect().getMetadata();
174
+ const fieldInfo = meta ? prepareComponentInCaseSummary(meta, configObj.getPConnect) : {};
175
+ return hideFieldLabels
176
+ ? { id: `${item[recordKey]} - ${index}`, value: fieldInfo.value }
177
+ : {
178
+ id: `${item[recordKey]} - ${index}`,
179
+ name: fieldInfo.name,
180
+ value: fieldInfo.value,
181
+ type: preset.type
182
+ };
183
+ });
184
+ }
185
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/components/field/SelectableCard/utils.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE;IACxD,OAAO,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,wBAAwB,CAAC,GAAG,CAAC,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AAC1F,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAG,QAAQ,CAAC,EAAE;IAClD,IAAI,CAAC,QAAQ,IAAI,CAAC,QAAQ,CAAC,IAAI;QAAE,OAAO,SAAS,CAAC;IAClD,MAAM,IAAI,GAAG,QAA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AAE,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;QAC9D,MAAM,SAAS,GAAG;YAChB,IAAI,EAAE;gBACJ,GAAG,MAAM;gBACT,MAAM,EAAE;oBACN,GAAG,MAAM,CAAC,MAAM;oBAChB,WAAW,EAAE,cAAc;iBAC5B;aACF;YACD,gBAAgB,EAAE,IAAI;SACvB,CAAC;QACF,MAAM,SAAS,GAAG,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;QAClD,MAAM,IAAI,GAAG,SAAS,CAAC,WAAW,EAAE,CAAC,WAAW,EAAE,CAAC;QACnD,MAAM,SAAS,GAGX,IAAI,CAAC,CAAC,CAAC,6BAA6B,CAAC,IAAI,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3E,OAAO,eAAe;YACpB,CAAC,CAAC,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,EAAE;YACjE,CAAC,CAAC;gBACE,EAAE,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,KAAK,EAAE;gBACnC,IAAI,EAAE,SAAS,CAAC,IAAI;gBACpB,KAAK,EAAE,SAAS,CAAC,KAAK;gBACtB,IAAI,EAAE,MAAM,CAAC,IAAI;aAClB,CAAC;IACR,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { Link } from '@mui/material';\n\nimport { Utils } from '../../helpers/utils';\n\nexport const getResolvedConstantValue = (pConnect, key) => {\n return pConnect.getValue(PCore.getResolvedConstantValue(key)) || pConnect.getValue(key);\n};\n\nexport const resolveReferencedPConnect = pConnect => {\n if (!pConnect || !pConnect.meta) return undefined;\n const type = pConnect?._type ?? undefined;\n const referencedPConnect = type === 'reference' && pConnect.getReferencedViewPConnect().getPConnect();\n return referencedPConnect || pConnect;\n};\n\n/**\n * A helper function to create an object consisting react component as per the type.\n * This is used by CaseSummary template.\n * @param {object} pConnectMeta Object containing meta information for the particular field authored\n * @param {Function} getPConnect PConnect function passed along to other components.\n * @param {string} displayMode displayMode string contains information about the layout of component in review mode.\n */\nexport function prepareComponentInCaseSummary(pConnectMeta: any, getPConnect: Function) {\n const { config, children } = pConnectMeta;\n\n const noValueComponent = <div>No Value</div>;\n const placeholder = '...';\n const pConnect = getPConnect();\n\n const caseSummaryComponentObject: any = {};\n\n let { type } = pConnectMeta;\n let showAddressLabel = true;\n\n if (config && config.value === `@P .${Utils.getMappedKey('pyStatusWork')}`) {\n config.displayAsStatus = true;\n type = 'TextInput'; // force the type to be TextInput for status field.\n // As TextInput is loaded forcefully sometimes, TextInput component might not be available in lazy map.\n // Load TextInput if it is not available.\n if (!PCore.getComponentsRegistry().getLazyComponent(type)) {\n PCore.getAssetLoader().getLoader('component-loader')([type]);\n }\n }\n\n caseSummaryComponentObject.name = pConnect.resolveConfigProps({ label: config.label }).label;\n\n if (config.inheritedProps) {\n const labelInInheritedProp = config.inheritedProps.find(inheritedProp => inheritedProp.prop === 'label');\n if (labelInInheritedProp) {\n labelInInheritedProp.value = pConnect.resolveConfigProps({ label: labelInInheritedProp.value }).label;\n }\n }\n\n switch (type) {\n case 'CaseOperator': {\n if (config.label.includes('Create operator')) {\n caseSummaryComponentObject.name = pConnect.resolveConfigProps({\n createLabel: config.createLabel\n }).createLabel;\n } else if (config.label.includes('Update operator')) {\n caseSummaryComponentObject.name = pConnect.resolveConfigProps({\n updateLabel: config.updateLabel\n }).updateLabel;\n } else {\n caseSummaryComponentObject.name = pConnect.resolveConfigProps({\n resolveLabel: config.resolveLabel\n }).resolveLabel;\n }\n\n break;\n }\n case 'Checkbox': {\n caseSummaryComponentObject.name = pConnect.resolveConfigProps({\n label: config.caption\n }).label;\n\n break;\n }\n case 'Pega_UI_PercentageWidget': {\n const rawValue = pConnect.resolveConfigProps({\n value: config.value\n }).value;\n\n caseSummaryComponentObject.simpleValue = rawValue || rawValue === 0 ? `${rawValue}%` : noValueComponent;\n break;\n }\n case 'Address': {\n showAddressLabel = false;\n\n caseSummaryComponentObject.variant = 'stacked';\n break;\n }\n case 'Location':\n case 'RichText': {\n const rawValue = pConnect.resolveConfigProps({\n value: config.value\n }).value;\n\n caseSummaryComponentObject.variant = 'stacked';\n caseSummaryComponentObject.simpleValue = rawValue?.length ? rawValue : noValueComponent;\n break;\n }\n case 'TextArea': {\n const rawValue = pConnect.resolveConfigProps({\n value: config.value\n }).value;\n\n if (rawValue?.length > 22) {\n caseSummaryComponentObject.variant = 'stacked';\n }\n\n caseSummaryComponentObject.simpleValue = rawValue?.length ? rawValue : noValueComponent;\n break;\n }\n case 'URL': {\n if (config.displayAs === 'Image') {\n const rawValue = pConnect.resolveConfigProps({\n value: config.value\n }).value;\n\n caseSummaryComponentObject.variant = 'stacked';\n caseSummaryComponentObject.simpleValue = rawValue?.length ? <Link href={rawValue}>{rawValue}</Link> : noValueComponent;\n }\n break;\n }\n case 'reference': {\n const referencedPConnect = resolveReferencedPConnect(pConnect);\n const viewType = referencedPConnect?.meta?.config.type;\n const viewTemplate = referencedPConnect?.meta?.config.template;\n const isTable = ['multirecordlist'].includes(viewType);\n const isDataReference = viewTemplate === 'DataReference';\n\n if (isTable || !isDataReference) {\n caseSummaryComponentObject.variant = 'stacked';\n caseSummaryComponentObject.simpleValue = placeholder;\n }\n break;\n }\n case 'view': {\n caseSummaryComponentObject.variant = 'stacked';\n caseSummaryComponentObject.simpleValue = placeholder;\n break;\n }\n default:\n break;\n }\n\n const createdComponent = pConnect.createComponent({\n type,\n children: children ? [...children] : [],\n showAddressLabel,\n config: {\n ...config,\n // Need a unique key for each summary component which helps in creating new component based on visibility\n // Also a consistent key helps in rerendering summary components instead of remounting\n key: config\n }\n });\n\n createdComponent.props.getPConnect().setInheritedProp('displayMode', 'DISPLAY_ONLY');\n createdComponent.props.getPConnect().setInheritedProp('readOnly', true);\n\n if (type === 'Address') {\n createdComponent.props.getPConnect().setInheritedProp('showAddressLabel', showAddressLabel);\n }\n // Add field label for reference summary item when not Embedded data\n if (type === 'reference') {\n const isEmbeddedData = config.context && config.displayAs === 'Form';\n if (!isEmbeddedData) {\n caseSummaryComponentObject.name = createdComponent.props.getPConnect().getInheritedProps().label;\n }\n }\n\n caseSummaryComponentObject.value = createdComponent;\n\n return caseSummaryComponentObject;\n}\n\nexport function resolveReferenceFields(\n item: {\n [key: string]: unknown;\n },\n hideFieldLabels: boolean,\n recordKey: string,\n pConnect: typeof PConnect\n) {\n const presets: {\n children?: {\n children?: {\n config;\n type;\n };\n config?;\n };\n } = (pConnect.getRawMetadata()?.config as any).presets ?? [];\n\n const presetChildren = presets[0]?.children?.[0]?.children ?? [];\n\n const maxFields = 5;\n return presetChildren.slice(0, maxFields).map((preset, index) => {\n const fieldMeta = {\n meta: {\n ...preset,\n config: {\n ...preset.config,\n displayMode: 'DISPLAY_ONLY'\n }\n },\n useCustomContext: item\n };\n const configObj = PCore.createPConnect(fieldMeta);\n const meta = configObj.getPConnect().getMetadata();\n const fieldInfo: {\n name?: string;\n value?: React.ReactNode;\n } = meta ? prepareComponentInCaseSummary(meta, configObj.getPConnect) : {};\n return hideFieldLabels\n ? { id: `${item[recordKey]} - ${index}`, value: fieldInfo.value }\n : {\n id: `${item[recordKey]} - ${index}`,\n name: fieldInfo.name,\n value: fieldInfo.value,\n type: preset.type\n };\n });\n}\n"]}
@@ -1,7 +1,15 @@
1
- import { PConnFieldProps } from '../../../types/PConnProps';
1
+ import type { PConnFieldProps } from '../../../types/PConnProps';
2
2
  interface SemanticLinkProps extends PConnFieldProps {
3
3
  text: string;
4
+ resourcePayload: any;
5
+ resourceParams: any;
6
+ previewKey: string | null;
7
+ onClick: (event: any) => void;
8
+ testId: string;
9
+ referenceType: string | null;
10
+ dataRelationshipContext: string | null;
11
+ contextPage: any;
4
12
  }
5
- export default function SemanticLink(props: SemanticLinkProps): import("react/jsx-runtime").JSX.Element | undefined;
13
+ export default function SemanticLink(props: SemanticLinkProps): import("react/jsx-runtime").JSX.Element;
6
14
  export {};
7
15
  //# sourceMappingURL=SemanticLink.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SemanticLink.d.ts","sourceRoot":"","sources":["../../../../src/components/field/SemanticLink/SemanticLink.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAoC5D,UAAU,iBAAkB,SAAQ,eAAe;IAGjD,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,iBAAiB,uDA4B5D"}
1
+ {"version":3,"file":"SemanticLink.d.ts","sourceRoot":"","sources":["../../../../src/components/field/SemanticLink/SemanticLink.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAoCjE,UAAU,iBAAkB,SAAQ,eAAe;IAEjD,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,GAAG,CAAC;IACrB,cAAc,EAAE,GAAG,CAAC;IACpB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,OAAO,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,uBAAuB,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,WAAW,EAAE,GAAG,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CA2J5D"}
@@ -1,10 +1,8 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import Typography from '@mui/material/Typography';
3
- import Grid from '@mui/material/Grid';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Link } from '@mui/material';
4
3
  import makeStyles from '@mui/styles/makeStyles';
5
- import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
6
- /* although this is called the SemanticLink component, we are not yet displaying as a
7
- SemanticLink in SDK and only showing the value as a read only text field. */
4
+ import semanticUtils from './utils';
5
+ // eslint-disable-next-line
8
6
  const useStyles = makeStyles(theme => ({
9
7
  root: {
10
8
  paddingRight: theme.spacing(1),
@@ -36,16 +34,131 @@ const useStyles = makeStyles(theme => ({
36
34
  }
37
35
  }));
38
36
  export default function SemanticLink(props) {
39
- // Get emitted components from map (so we can get any override that may exist)
40
- const FieldValueList = getComponentFromMap('FieldValueList');
41
- const { text, displayMode, label, hideLabel } = props;
42
- const classes = useStyles();
43
- if (displayMode === 'DISPLAY_ONLY' || (!displayMode && label !== undefined)) {
44
- const value = text || '---';
45
- return (_jsxs(Grid, { container: true, spacing: 1, style: { padding: '4px 0px' }, id: 'semantic-link-grid', children: [_jsx(Grid, { item: true, xs: 6, children: _jsx(Typography, { variant: 'body2', component: 'span', className: `${classes.fieldLabel} ${classes.fieldMargin}`, children: label }) }), _jsx(Grid, { item: true, xs: 6, children: _jsx(Typography, { variant: 'body2', component: 'span', className: classes.fieldValue, children: value }) })] }));
37
+ const { text, resourcePayload = {}, resourceParams = {}, getPConnect, previewKey,
38
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
39
+ onClick, testId = '', referenceType, dataRelationshipContext = null, contextPage, ...restProps } = props;
40
+ const { ACTION_OPENWORKBYHANDLE, ACTION_SHOWDATA } = PCore.getSemanticUrlUtils().getActions();
41
+ const pConnect = getPConnect();
42
+ const dataResourcePayLoad = resourcePayload?.resourceType === 'DATA' ? resourcePayload : null;
43
+ const { RESOURCE_TYPES: { DATA }, WORKCLASS, CASE_INFO: { CASE_INFO_CLASSID } } = PCore.getConstants();
44
+ let linkURL = '';
45
+ let payload = {};
46
+ let dataViewName;
47
+ let linkComponentProps = {
48
+ href: linkURL
49
+ };
50
+ if (text) {
51
+ linkComponentProps.href = linkURL;
46
52
  }
47
- if (displayMode === 'STACKED_LARGE_VAL') {
48
- return _jsx(FieldValueList, { name: hideLabel ? '' : label, value: text, variant: 'stacked' });
53
+ let isData = false;
54
+ const shouldTreatAsDataReference = !previewKey && resourcePayload.caseClassName;
55
+ if (contextPage?.classID) {
56
+ resourcePayload.caseClassName = contextPage.classID;
49
57
  }
58
+ /* TODO : In case of duplicate search case the classID is Work- need to set it to
59
+ the current case class ID */
60
+ if (resourcePayload.caseClassName === WORKCLASS) {
61
+ resourcePayload.caseClassName = pConnect.getValue(CASE_INFO_CLASSID);
62
+ }
63
+ function showDataAction() {
64
+ if (dataResourcePayLoad && dataResourcePayLoad.resourceType === 'DATA') {
65
+ const { content } = dataResourcePayLoad;
66
+ const lookUpDataPageInfo = PCore.getDataTypeUtils().getLookUpDataPageInfo(dataResourcePayLoad?.className);
67
+ const lookUpDataPage = PCore.getDataTypeUtils().getLookUpDataPage(dataResourcePayLoad?.className);
68
+ if (lookUpDataPageInfo) {
69
+ const { parameters } = lookUpDataPageInfo;
70
+ payload = Object.keys(parameters).reduce((acc, param) => {
71
+ const paramValue = parameters[param];
72
+ return {
73
+ ...acc,
74
+ [param]: PCore.getAnnotationUtils().isProperty(paramValue) ? content[PCore.getAnnotationUtils().getPropertyName(paramValue)] : paramValue
75
+ };
76
+ }, {});
77
+ }
78
+ getPConnect()
79
+ .getActionsApi()
80
+ .showData('pyDetails', lookUpDataPage, {
81
+ ...payload
82
+ });
83
+ }
84
+ if ((referenceType && referenceType.toUpperCase() === DATA) || shouldTreatAsDataReference) {
85
+ getPConnect()
86
+ .getActionsApi()
87
+ .showData('pyDetails', dataViewName, {
88
+ ...payload
89
+ });
90
+ }
91
+ }
92
+ function openLinkClick(e) {
93
+ if (!e.metaKey && !e.ctrlKey) {
94
+ e.preventDefault();
95
+ if ((dataResourcePayLoad && dataResourcePayLoad.resourceType === 'DATA') ||
96
+ (referenceType && referenceType.toUpperCase() === DATA) ||
97
+ shouldTreatAsDataReference) {
98
+ showDataAction();
99
+ }
100
+ else if (previewKey) {
101
+ getPConnect().getActionsApi().openWorkByHandle(previewKey, resourcePayload.caseClassName);
102
+ }
103
+ }
104
+ }
105
+ if ((referenceType && referenceType.toUpperCase() === DATA) || shouldTreatAsDataReference) {
106
+ try {
107
+ isData = true;
108
+ // @ts-expect-error
109
+ const dataRefContext = semanticUtils.getDataReferenceInfo(pConnect, dataRelationshipContext, contextPage);
110
+ dataViewName = dataRefContext.dataContext;
111
+ payload = dataRefContext.dataContextParameters;
112
+ }
113
+ catch (error) {
114
+ console.log('Error in getting the data reference info', error);
115
+ }
116
+ }
117
+ else if (resourcePayload && resourcePayload.resourceType === 'DATA') {
118
+ isData = true;
119
+ dataViewName = PCore.getDataTypeUtils().getLookUpDataPage(resourcePayload.className);
120
+ const lookUpDataPageInfo = PCore.getDataTypeUtils().getLookUpDataPageInfo(resourcePayload.className);
121
+ const { content } = resourcePayload;
122
+ if (lookUpDataPageInfo) {
123
+ const { parameters } = lookUpDataPageInfo;
124
+ payload = Object.keys(parameters).reduce((acc, param) => {
125
+ const paramValue = parameters[param];
126
+ return {
127
+ ...acc,
128
+ [param]: PCore.getAnnotationUtils().isProperty(paramValue) ? content[PCore.getAnnotationUtils().getPropertyName(paramValue)] : paramValue
129
+ };
130
+ }, {});
131
+ }
132
+ else {
133
+ const keysInfo = PCore.getDataTypeUtils().getDataPageKeys(dataViewName) ?? [];
134
+ payload = keysInfo.reduce((acc, curr) => {
135
+ return {
136
+ ...acc,
137
+ [curr.keyName]: content[curr.isAlternateKeyStorage ? curr.linkedField : curr.keyName]
138
+ };
139
+ }, {});
140
+ }
141
+ }
142
+ if (isData && dataViewName && payload) {
143
+ linkURL = PCore.getSemanticUrlUtils().getResolvedSemanticURL(ACTION_SHOWDATA, { pageName: 'pyDetails', dataViewName }, {
144
+ ...payload
145
+ });
146
+ }
147
+ else {
148
+ // BUG-678282 fix to handle scenario when workID was not populated.
149
+ // Check renderParentLink in Caseview / CasePreview
150
+ resourceParams.objectID = resourceParams.workID === '' && typeof previewKey === 'string' ? previewKey.split(' ')[1] : resourceParams.workID;
151
+ if (previewKey) {
152
+ resourceParams.id = previewKey;
153
+ }
154
+ linkURL = PCore.getSemanticUrlUtils().getResolvedSemanticURL(ACTION_OPENWORKBYHANDLE, resourcePayload, resourceParams);
155
+ }
156
+ if (text) {
157
+ linkComponentProps = {
158
+ ...linkComponentProps,
159
+ href: linkURL
160
+ };
161
+ }
162
+ return (_jsx(Link, { component: 'button', ...linkComponentProps, ...restProps, onClick: openLinkClick, "data-testid": testId, children: text }));
50
163
  }
51
164
  //# sourceMappingURL=SemanticLink.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SemanticLink.js","sourceRoot":"","sources":["../../../../src/components/field/SemanticLink/SemanticLink.tsx"],"names":[],"mappings":";AAAA,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAEhD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAGhF;4EAC4E;AAE5E,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACrC,IAAI,EAAE;QACJ,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC9B,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7B,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5B,aAAa,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC/B,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7B,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5B,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC3B,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;KAC/B;IACD,WAAW,EAAE;QACX,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC9B,WAAW,EAA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C,OAAO,EAAC,SAAS,EAAC,MAAM,EAAC,SAAS,EAAE,GAAG,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,WAAW,EAAE,YACnG,KAAK,GACK,GACR,EACP,KAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,CAAC,YACd,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,EAAC,SAAS,EAAC,MAAM,EAAC,SAAS,EAAE,OAAO,CAAC,UAAU,YACvE,KAAK,GACK,GACR,IACF,CACR,CAAC;KACH;IAED,IAAI,WAAW,KAAK,mBAAmB,EAAE;QACvC,OAAO,KAAC,cAAc,IAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAC,SAAS,GAAG,CAAC;KACxF;AACH,CAAC","sourcesContent":["import Typography from '@mui/material/Typography';\nimport Grid from '@mui/material/Grid';\nimport makeStyles from '@mui/styles/makeStyles';\n\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { PConnFieldProps } from '../../../types/PConnProps';\n\n/* although this is called the SemanticLink component, we are not yet displaying as a\nSemanticLink in SDK and only showing the value as a read only text field. */\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 fieldMargin: {\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 fontWeight: 400,\n color: theme.palette.text.secondary\n },\n fieldValue: {\n fontWeight: 400,\n color: theme.palette.text.primary\n }\n}));\n\ninterface SemanticLinkProps extends PConnFieldProps {\n // If any, enter additional props that only exist on SemanticLink here\n // from previous PropTypes\n text: string;\n}\n\nexport default function SemanticLink(props: SemanticLinkProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const FieldValueList = getComponentFromMap('FieldValueList');\n\n const { text, displayMode, label, hideLabel } = props;\n const classes = useStyles();\n\n if (displayMode === 'DISPLAY_ONLY' || (!displayMode && label !== undefined)) {\n const value = text || '---';\n return (\n <Grid container spacing={1} style={{ padding: '4px 0px' }} id='semantic-link-grid'>\n <Grid item xs={6}>\n <Typography variant='body2' component='span' className={`${classes.fieldLabel} ${classes.fieldMargin}`}>\n {label}\n </Typography>\n </Grid>\n <Grid item xs={6}>\n <Typography variant='body2' component='span' className={classes.fieldValue}>\n {value}\n </Typography>\n </Grid>\n </Grid>\n );\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n return <FieldValueList name={hideLabel ? '' : label} value={text} variant='stacked' />;\n }\n}\n"]}
1
+ {"version":3,"file":"SemanticLink.js","sourceRoot":"","sources":["../../../../src/components/field/SemanticLink/SemanticLink.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAIhD,OAAO,aAAa,MAAM,SAAS,CAAC;AAEpC,2BAA2B;AAC3B,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACrC,IAAI,EAAE;QACJ,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC9B,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7B,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5B,aAAa,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC/B,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7B,UAAU,EAAE,KAAK,CAAC,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,CAAC,MAAM,CAAC;QAC5I,IAAI,UAAU,EAAE,CAAC;YACf,cAAc,CAAC,EAAE,GAAG,UAAU,CAAC;QACjC,CAAC;QACD,OAAO,GAAG,KAAK,CAAC,mBAAmB,EAAE,CAAC,sBAAsB,CAAC,uBAAuB,EAAE,eAAe,EAAE,cAAc,CAAC,CAAC;IACzH,CAAC;IAED,IAAI,IAAI,EAAE,CAAC;QACT,kBAAkB,GAAG;YACnB,GAAG,kBAAkB;YACrB,IAAI,EAAE,OAAO;SACd,CAAC;IACJ,CAAC;IAED,OAAO,CACL,KAAC,IAAI,IAAC,SAAS,EAAC,QAAQ,KAAK,kBAAkB,KAAM,SAAS,EAAE,OAAO,EAAE,aAAa,iBAAe,MAAM,YACxG,IAAI,GACA,CACR,CAAC;AACJ,CAAC","sourcesContent":["import { Link } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\n\nimport type { PConnFieldProps } from '../../../types/PConnProps';\n\nimport semanticUtils from './utils';\n\n// eslint-disable-next-line\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 fieldMargin: {\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 fontWeight: 400,\n color: theme.palette.text.secondary\n },\n fieldValue: {\n fontWeight: 400,\n color: theme.palette.text.primary\n }\n}));\n\ninterface SemanticLinkProps extends PConnFieldProps {\n // If any, enter additional props that only exist on SemanticLink here\n text: string;\n resourcePayload: any;\n resourceParams: any;\n previewKey: string | null;\n onClick: (event: any) => void;\n testId: string;\n referenceType: string | null;\n dataRelationshipContext: string | null;\n contextPage: any;\n}\n\nexport default function SemanticLink(props: SemanticLinkProps) {\n const {\n text,\n resourcePayload = {},\n resourceParams = {},\n getPConnect,\n previewKey,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onClick,\n testId = '',\n referenceType,\n dataRelationshipContext = null,\n contextPage,\n ...restProps\n } = props;\n const { ACTION_OPENWORKBYHANDLE, ACTION_SHOWDATA }: any = PCore.getSemanticUrlUtils().getActions();\n const pConnect = getPConnect();\n const dataResourcePayLoad = resourcePayload?.resourceType === 'DATA' ? resourcePayload : null;\n\n const {\n RESOURCE_TYPES: { DATA },\n WORKCLASS,\n CASE_INFO: { CASE_INFO_CLASSID }\n } = PCore.getConstants();\n\n let linkURL = '';\n let payload = {};\n let dataViewName;\n let linkComponentProps = {\n href: linkURL\n };\n if (text) {\n (linkComponentProps as any).href = linkURL;\n }\n let isData = false;\n const shouldTreatAsDataReference = !previewKey && resourcePayload.caseClassName;\n if (contextPage?.classID) {\n resourcePayload.caseClassName = contextPage.classID;\n }\n /* TODO : In case of duplicate search case the classID is Work- need to set it to\n the current case class ID */\n if (resourcePayload.caseClassName === WORKCLASS) {\n resourcePayload.caseClassName = pConnect.getValue(CASE_INFO_CLASSID);\n }\n\n function showDataAction() {\n if (dataResourcePayLoad && dataResourcePayLoad.resourceType === 'DATA') {\n const { content } = dataResourcePayLoad;\n const lookUpDataPageInfo = PCore.getDataTypeUtils().getLookUpDataPageInfo(dataResourcePayLoad?.className);\n const lookUpDataPage = PCore.getDataTypeUtils().getLookUpDataPage(dataResourcePayLoad?.className);\n if (lookUpDataPageInfo) {\n const { parameters }: any = lookUpDataPageInfo;\n payload = Object.keys(parameters).reduce((acc, param) => {\n const paramValue = parameters[param];\n return {\n ...acc,\n [param]: PCore.getAnnotationUtils().isProperty(paramValue) ? content[PCore.getAnnotationUtils().getPropertyName(paramValue)] : paramValue\n };\n }, {});\n }\n getPConnect()\n .getActionsApi()\n .showData('pyDetails', lookUpDataPage, {\n ...payload\n });\n }\n if ((referenceType && referenceType.toUpperCase() === DATA) || shouldTreatAsDataReference) {\n getPConnect()\n .getActionsApi()\n .showData('pyDetails', dataViewName, {\n ...payload\n });\n }\n }\n\n function openLinkClick(e) {\n if (!e.metaKey && !e.ctrlKey) {\n e.preventDefault();\n if (\n (dataResourcePayLoad && dataResourcePayLoad.resourceType === 'DATA') ||\n (referenceType && referenceType.toUpperCase() === DATA) ||\n shouldTreatAsDataReference\n ) {\n showDataAction();\n } else if (previewKey) {\n getPConnect().getActionsApi().openWorkByHandle(previewKey, resourcePayload.caseClassName);\n }\n }\n }\n\n if ((referenceType && referenceType.toUpperCase() === DATA) || shouldTreatAsDataReference) {\n try {\n isData = true;\n // @ts-expect-error\n const dataRefContext = semanticUtils.getDataReferenceInfo(pConnect, dataRelationshipContext, contextPage);\n dataViewName = dataRefContext.dataContext;\n payload = dataRefContext.dataContextParameters as any;\n } catch (error) {\n console.log('Error in getting the data reference info', error);\n }\n } else if (resourcePayload && resourcePayload.resourceType === 'DATA') {\n isData = true;\n dataViewName = PCore.getDataTypeUtils().getLookUpDataPage(resourcePayload.className);\n const lookUpDataPageInfo = PCore.getDataTypeUtils().getLookUpDataPageInfo(resourcePayload.className);\n const { content } = resourcePayload;\n if (lookUpDataPageInfo) {\n const { parameters }: any = lookUpDataPageInfo;\n payload = Object.keys(parameters).reduce((acc, param) => {\n const paramValue = parameters[param];\n return {\n ...acc,\n [param]: PCore.getAnnotationUtils().isProperty(paramValue) ? content[PCore.getAnnotationUtils().getPropertyName(paramValue)] : paramValue\n };\n }, {});\n } else {\n const keysInfo = PCore.getDataTypeUtils().getDataPageKeys(dataViewName) ?? [];\n payload = keysInfo.reduce((acc, curr) => {\n return {\n ...acc,\n [curr.keyName]: content[curr.isAlternateKeyStorage ? curr.linkedField : curr.keyName]\n };\n }, {});\n }\n }\n\n if (isData && dataViewName && payload) {\n linkURL = PCore.getSemanticUrlUtils().getResolvedSemanticURL(\n ACTION_SHOWDATA,\n { pageName: 'pyDetails', dataViewName },\n {\n ...payload\n }\n );\n } else {\n // BUG-678282 fix to handle scenario when workID was not populated.\n // Check renderParentLink in Caseview / CasePreview\n resourceParams.objectID = resourceParams.workID === '' && typeof previewKey === 'string' ? previewKey.split(' ')[1] : resourceParams.workID;\n if (previewKey) {\n resourceParams.id = previewKey;\n }\n linkURL = PCore.getSemanticUrlUtils().getResolvedSemanticURL(ACTION_OPENWORKBYHANDLE, resourcePayload, resourceParams);\n }\n\n if (text) {\n linkComponentProps = {\n ...linkComponentProps,\n href: linkURL\n };\n }\n\n return (\n <Link component='button' {...linkComponentProps} {...restProps} onClick={openLinkClick} data-testid={testId}>\n {text}\n </Link>\n );\n}\n"]}
@@ -27,7 +27,7 @@ function getDataReferenceInfo(pConnect, dataRelationshipContext) {
27
27
  dataContext = name;
28
28
  for (const [key, value] of Object.entries(parameters)) {
29
29
  const property =
30
- // @ts-ignore - Property 'getLeafPropertyName' is private and only accessible within class 'AnnotationUtils'
30
+ // @ts-expect-error - Property 'getLeafPropertyName' is private and only accessible within class 'AnnotationUtils'
31
31
  dataRelationshipContext !== null ? annotationUtils.getPropertyName(value) : annotationUtils.getLeafPropertyName(value);
32
32
  payload[key] = pConnect.getValue(`.${property}`);
33
33
  }
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/components/field/SemanticLink/utils.ts"],"names":[],"mappings":"AAAA,SAAS,oBAAoB,CAAC,QAAQ,EAAE,uBAAuB;IAC7D,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,KAAK,CAAC,gCAAgC,CAAC,CAAC;KAC/C;IAED,IAAI,WAAW,GAAG,EAAE,CAAC;IACrB,MAAM,OAAO,GAAG,EAAE,CAAC;IACnB,MAAM,aAAa,GAAG,QAAQ,CAAC,gBAAgB,EAAE,CAAC;IAClD,MAAM,eAAe,GAAG,KAAK,CAAC,kBAAkB,EAAE,CAAC;IACnD,IAAI,aAAa,CAAC;IAElB,IA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AAS,eAAe,CAAC,IAAI;IAC3B,OAAO,IAAI,KAAK,EAAE,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,IAAI,CAAC;AAC5D,CAAC;AAED,eAAe,EAAE,oBAAoB,EAAE,eAAe,EAAE,CAAC","sourcesContent":["function getDataReferenceInfo(pConnect, dataRelationshipContext) {\n if (!pConnect) {\n throw Error('PConnect parameter is required');\n }\n\n let dataContext = '';\n const payload = {};\n const pageReference = pConnect.getPageReference();\n const annotationUtils = PCore.getAnnotationUtils();\n let fieldMetadata;\n\n if (pageReference) {\n /*\n For page list the page refernce will be something like caseInfo.content.EmployeeRef[1].\n Need to extract EmployeeRef from caseInfo.content.EmployeeRef[1]\n */\n const propertySplit = pageReference.split('.');\n\n // Regex to match if the property is list type. Eg: EmployeeRef[1]\n const listPropertyRegex = /([a-z|A-Z]*[[][\\d]*)[\\]]$/gm;\n // Regex to match [1] part of the property EmployeeRef[1]\n const indexRegex = /([[][\\d]*[\\]])+/gm;\n\n let contextProperty = dataRelationshipContext !== null ? dataRelationshipContext : propertySplit.pop();\n const isListProperty = listPropertyRegex.test(contextProperty);\n contextProperty = isListProperty ? contextProperty.replace(indexRegex, '') : contextProperty;\n fieldMetadata = pConnect.getFieldMetadata(contextProperty);\n }\n\n if (!!fieldMetadata && fieldMetadata.datasource) {\n const { name, parameters } = fieldMetadata.datasource;\n dataContext = name;\n for (const [key, value] of Object.entries(parameters)) {\n const property =\n // @ts-ignore - Property 'getLeafPropertyName' is private and only accessible within class 'AnnotationUtils'\n dataRelationshipContext !== null ? annotationUtils.getPropertyName(value as string) : annotationUtils.getLeafPropertyName(value);\n payload[key] = pConnect.getValue(`.${property}`);\n }\n return { dataContext, dataContextParameters: payload };\n }\n\n return {};\n}\n\nfunction isLinkTextEmpty(text) {\n return text === '' || text === undefined || text === null;\n}\n\nexport default { getDataReferenceInfo, isLinkTextEmpty };\n"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/components/field/Sem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UAAU,CAAC,EAAE,CAAC;YACtD,MAAM,QAAQ;YACZ,kHAAkH;YAClH,uBAAuB,KAAK,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,eAAe,CAAC,KAAe,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;YACnI,OAAO,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,IAAI,QAAQ,EAAE,CAAC,CAAC;QACnD,CAAC;QACD,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,OAAO,EAAE,CAAC;IACzD,CAAC;IAED,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,SAAS,eAAe,CAAC,IAAI;IAC3B,OAAO,IAAI,KAAK,EAAE,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,IAAI,CAAC;AAC5D,CAAC;AAED,eAAe,EAAE,oBAAoB,EAAE,eAAe,EAAE,CAAC","sourcesContent":["function getDataReferenceInfo(pConnect, dataRelationshipContext) {\n if (!pConnect) {\n throw Error('PConnect parameter is required');\n }\n\n let dataContext = '';\n const payload = {};\n const pageReference = pConnect.getPageReference();\n const annotationUtils = PCore.getAnnotationUtils();\n let fieldMetadata;\n\n if (pageReference) {\n /*\n For page list the page refernce will be something like caseInfo.content.EmployeeRef[1].\n Need to extract EmployeeRef from caseInfo.content.EmployeeRef[1]\n */\n const propertySplit = pageReference.split('.');\n\n // Regex to match if the property is list type. Eg: EmployeeRef[1]\n const listPropertyRegex = /([a-z|A-Z]*[[][\\d]*)[\\]]$/gm;\n // Regex to match [1] part of the property EmployeeRef[1]\n const indexRegex = /([[][\\d]*[\\]])+/gm;\n\n let contextProperty = dataRelationshipContext !== null ? dataRelationshipContext : propertySplit.pop();\n const isListProperty = listPropertyRegex.test(contextProperty);\n contextProperty = isListProperty ? contextProperty.replace(indexRegex, '') : contextProperty;\n fieldMetadata = pConnect.getFieldMetadata(contextProperty);\n }\n\n if (!!fieldMetadata && fieldMetadata.datasource) {\n const { name, parameters } = fieldMetadata.datasource;\n dataContext = name;\n for (const [key, value] of Object.entries(parameters)) {\n const property =\n // @ts-expect-error - Property 'getLeafPropertyName' is private and only accessible within class 'AnnotationUtils'\n dataRelationshipContext !== null ? annotationUtils.getPropertyName(value as string) : annotationUtils.getLeafPropertyName(value);\n payload[key] = pConnect.getValue(`.${property}`);\n }\n return { dataContext, dataContextParameters: payload };\n }\n\n return {};\n}\n\nfunction isLinkTextEmpty(text) {\n return text === '' || text === undefined || text === null;\n}\n\nexport default { getDataReferenceInfo, isLinkTextEmpty };\n"]}
@@ -1,4 +1,4 @@
1
- import { PConnFieldProps } from '../../../types/PConnProps';
1
+ import type { PConnFieldProps } from '../../../types/PConnProps';
2
2
  interface TextAreaProps extends PConnFieldProps {
3
3
  fieldMetadata?: any;
4
4
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../../src/components/field/TextArea/TextArea.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,UAAU,aAAc,SAAQ,eAAe;IAE7C,aAAa,CAAC,EAAE,GAAG,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,aAAa,2CAmFpD"}
1
+ {"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../../src/components/field/TextArea/TextArea.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE,UAAU,aAAc,SAAQ,eAAe;IAE7C,aAAa,CAAC,EAAE,GAAG,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,aAAa,2CAiFpD"}
@@ -28,10 +28,7 @@ export default function TextArea(props) {
28
28
  // since we want to preserve the minRows, maxRows info.
29
29
  readOnlyProp = { readOnly: true };
30
30
  }
31
- let testProp = {};
32
- testProp = {
33
- 'data-test-id': testId
34
- };
31
+ const testProps = { 'data-test-id': testId };
35
32
  function handleChange(event) {
36
33
  // update internal value
37
34
  setInputValue(event?.target?.value);
@@ -39,6 +36,8 @@ export default function TextArea(props) {
39
36
  function handleBlur() {
40
37
  handleEvent(actions, 'changeNblur', propName, inputValue);
41
38
  }
42
- return (_jsx(TextField, { multiline: true, minRows: 5, maxRows: 5, fullWidth: true, variant: readOnly ? 'standard' : 'outlined', helperText: helperTextToDisplay, placeholder: placeholder ?? '', size: 'small', required: required, disabled: disabled, onChange: handleChange, onBlur: !readOnly ? handleBlur : undefined, error: status === 'error', label: label, value: inputValue, InputProps: { ...readOnlyProp, inputProps: { maxLength, ...testProp } } }));
39
+ return (_jsx(TextField, { multiline: true, minRows: 5, maxRows: 5, fullWidth: true, variant: readOnly ? 'standard' : 'outlined', helperText: helperTextToDisplay, placeholder: placeholder ?? '', size: 'small', required: required, disabled: disabled, onChange: handleChange, onBlur: !readOnly ? handleBlur : undefined, error: status === 'error', label: label, value: inputValue, slotProps: {
40
+ input: { ...readOnlyProp, inputProps: { maxLength, ...testProps } }
41
+ } }));
43
42
  }
44
43
  //# sourceMappingURL=TextArea.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextArea.js","sourceRoot":"","sources":["../../../../src/components/field/TextArea/TextArea.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAQhF,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAoB;IACnD,8EAA8E;IAC9E,MAAM,cAAc,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAE7D,MAAM,EACJ,WAAW,EACX,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,KAAK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AC,KAAK;QACzB,wBAAwB;QACxB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IACtC,CAAC;IAED,SAAS,UAAU;QACjB,WAAW,CAAC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;IAC5D,CAAC;IAED,OAAO,CACL,KAAC,SAAS,IACR,SAAS,QACT,OAAO,EAAE,CAAC,EACV,OAAO,EAAE,CAAC,EACV,SAAS,QACT,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,EAC3C,UAAU,EAAE,mBAAmB,EAC/B,WAAW,EAAE,WAAW,IAAI,EAAE,EAC9B,IAAI,EAAC,OAAO,EACZ,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,YAAY,EACtB,MAAM,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,EAC1C,KAAK,EAAE,MAAM,KAAK,OAAO,EACzB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,UAAU,EACjB,UAAU,EAAE,EAAE,GAAG,YAAY,EAAE,UAAU,EAAE,EAAE,SAAS,EAAE,GAAG,QAAQ,EAAE,EAAE,GACvE,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { useEffect, useState } from 'react';\nimport { TextField } from '@mui/material';\n\nimport handleEvent from '../../helpers/event-utils';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { PConnFieldProps } from '../../../types/PConnProps';\n\ninterface TextAreaProps extends PConnFieldProps {\n // If any, enter additional props that only exist on TextArea here\n fieldMetadata?: any;\n}\n\nexport default function TextArea(props: TextAreaProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const FieldValueList = getComponentFromMap('FieldValueList');\n\n const {\n getPConnect,\n label,\n required,\n disabled,\n value = '',\n validatemessage,\n status,\n readOnly,\n testId,\n fieldMetadata,\n helperText,\n displayMode,\n hideLabel,\n placeholder\n } = props;\n const helperTextToDisplay = validatemessage || helperText;\n const pConn = getPConnect();\n const actions = pConn.getActionsApi();\n const propName = (pConn.getStateProps() as any).value;\n const maxLength = fieldMetadata?.maxLength;\n\n const [inputValue, setInputValue] = useState('');\n\n let readOnlyProp = {};\n\n useEffect(() => {\n setInputValue(value);\n }, [value]);\n\n if (displayMode === 'DISPLAY_ONLY') {\n return <FieldValueList name={hideLabel ? '' : label} value={value} />;\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n return <FieldValueList name={hideLabel ? '' : label} value={value} variant='stacked' />;\n }\n\n if (readOnly) {\n // Not just emitting a read only Textfield like some other components do\n // since we want to preserve the minRows, maxRows info.\n readOnlyProp = { readOnly: true };\n }\n\n let testProp = {};\n\n testProp = {\n 'data-test-id': testId\n };\n\n function handleChange(event) {\n // update internal value\n setInputValue(event?.target?.value);\n }\n\n function handleBlur() {\n handleEvent(actions, 'changeNblur', propName, inputValue);\n }\n\n return (\n <TextField\n multiline\n minRows={5}\n maxRows={5}\n fullWidth\n variant={readOnly ? 'standard' : 'outlined'}\n helperText={helperTextToDisplay}\n placeholder={placeholder ?? ''}\n size='small'\n required={required}\n disabled={disabled}\n onChange={handleChange}\n onBlur={!readOnly ? handleBlur : undefined}\n error={status === 'error'}\n label={label}\n value={inputValue}\n InputProps={{ ...readOnlyProp, inputProps: { maxLength, ...testProp } }}\n />\n );\n}\n"]}
1
+ {"version":3,"file":"TextArea.js","sourceRoot":"","sources":["../../../../src/components/field/TextArea/TextArea.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAQhF,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAoB;I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;QACxD,YAAY,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACpC,CAAC;IAED,MAAM,SAAS,GAAQ,EAAE,cAAc,EAAE,MAAM,EAAE,CAAC;IAElD,SAAS,YAAY,CAAC,KAAK;QACzB,wBAAwB;QACxB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IACtC,CAAC;IAED,SAAS,UAAU;QACjB,WAAW,CAAC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;IAC5D,CAAC;IAED,OAAO,CACL,KAAC,SAAS,IACR,SAAS,QACT,OAAO,EAAE,CAAC,EACV,OAAO,EAAE,CAAC,EACV,SAAS,QACT,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,EAC3C,UAAU,EAAE,mBAAmB,EAC/B,WAAW,EAAE,WAAW,IAAI,EAAE,EAC9B,IAAI,EAAC,OAAO,EACZ,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,YAAY,EACtB,MAAM,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,EAC1C,KAAK,EAAE,MAAM,KAAK,OAAO,EACzB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE;YACT,KAAK,EAAE,EAAE,GAAG,YAAY,EAAE,UAAU,EAAE,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,EAAE;SACpE,GACD,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { useEffect, useState } from 'react';\nimport { TextField } from '@mui/material';\n\nimport handleEvent from '../../helpers/event-utils';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport type { PConnFieldProps } from '../../../types/PConnProps';\n\ninterface TextAreaProps extends PConnFieldProps {\n // If any, enter additional props that only exist on TextArea here\n fieldMetadata?: any;\n}\n\nexport default function TextArea(props: TextAreaProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const FieldValueList = getComponentFromMap('FieldValueList');\n\n const {\n getPConnect,\n label,\n required,\n disabled,\n value = '',\n validatemessage,\n status,\n readOnly,\n testId,\n fieldMetadata,\n helperText,\n displayMode,\n hideLabel,\n placeholder\n } = props;\n const helperTextToDisplay = validatemessage || helperText;\n const pConn = getPConnect();\n const actions = pConn.getActionsApi();\n const propName = (pConn.getStateProps() as any).value;\n const maxLength = fieldMetadata?.maxLength;\n\n const [inputValue, setInputValue] = useState('');\n\n let readOnlyProp = {};\n\n useEffect(() => {\n setInputValue(value);\n }, [value]);\n\n if (displayMode === 'DISPLAY_ONLY') {\n return <FieldValueList name={hideLabel ? '' : label} value={value} />;\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n return <FieldValueList name={hideLabel ? '' : label} value={value} variant='stacked' />;\n }\n\n if (readOnly) {\n // Not just emitting a read only Textfield like some other components do\n // since we want to preserve the minRows, maxRows info.\n readOnlyProp = { readOnly: true };\n }\n\n const testProps: any = { 'data-test-id': testId };\n\n function handleChange(event) {\n // update internal value\n setInputValue(event?.target?.value);\n }\n\n function handleBlur() {\n handleEvent(actions, 'changeNblur', propName, inputValue);\n }\n\n return (\n <TextField\n multiline\n minRows={5}\n maxRows={5}\n fullWidth\n variant={readOnly ? 'standard' : 'outlined'}\n helperText={helperTextToDisplay}\n placeholder={placeholder ?? ''}\n size='small'\n required={required}\n disabled={disabled}\n onChange={handleChange}\n onBlur={!readOnly ? handleBlur : undefined}\n error={status === 'error'}\n label={label}\n value={inputValue}\n slotProps={{\n input: { ...readOnlyProp, inputProps: { maxLength, ...testProps } }\n }}\n />\n );\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { PConnProps } from '../../../types/PConnProps';
1
+ import type { PConnProps } from '../../../types/PConnProps';
2
2
  interface TextContentProps extends PConnProps {
3
3
  content: string;
4
4
  displayAs: 'Paragraph' | 'Heading 1' | 'Heading 2' | 'Heading 3' | 'Heading 4';
@@ -1 +1 @@
1
- {"version":3,"file":"TextContent.d.ts","sourceRoot":"","sources":["../../../../src/components/field/TextContent/TextContent.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,UAAU,gBAAiB,SAAQ,UAAU;IAE3C,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC;CAChF;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAoC1D"}
1
+ {"version":3,"file":"TextContent.d.ts","sourceRoot":"","sources":["../../../../src/components/field/TextContent/TextContent.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,UAAU,gBAAiB,SAAQ,UAAU;IAE3C,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC;CAChF;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAmC1D"}
@@ -20,7 +20,6 @@ export default function TextContent(props) {
20
20
  theVariant = 'h4';
21
21
  break;
22
22
  default:
23
- // eslint-disable-next-line no-console
24
23
  console.error(`TextContent got an expected displayAs prop: ${displayAs}`);
25
24
  break;
26
25
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TextContent.js","sourceRoot":"","sources":["../../../../src/components/field/TextContent/TextContent.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAU3C,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAuB;IAIzD,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAsD,KAAK,CAAC;IAExF,IAAI,UAAU,GAAqB,OAAO,CAAC;IAE3C,QAAQ,SAAS,EAAE;QACjB,KAAK,WAAW;YACd,UAAU,GAAG,OAAO,CAAC;YACrB,MAAM;QAER,KAAK,WAAW;YACd,UAAU,GAAG,IAAI,CAAC;YAClB,MAAM;QAER,KAAK,WAAW;YACd,UAAU,GAAG,IAAI,CAAC;YAClB,MAAM;QAER,KAAK,WAAW;YACd,UAAU,GAAG,IAAI,CAAC;YAClB,MAAM;QAER,KAAK,WAAW;YACd,UAAU,GAAG,IAAI,CAAC;YAClB,MAAM;QAER;YACE,sCAAsC;YACtC,OAAO,CAAC,KAAK,CAAC,+CAA+C,SAAS,EAAE,CAAC,CAAC;YAC1E,MAAM;KACT;IAED,OAAO,KAAC,UAAU,IAAC,OAAO,EAAE,UAAU,YAAG,OAAO,GAAc,CAAC;AACjE,CAAC","sourcesContent":["import { Typography } from '@mui/material';\n\nimport { PConnProps } from '../../../types/PConnProps';\n\ninterface TextContentProps extends PConnProps {\n // If any, enter additional props that only exist on TextContent here\n content: string;\n displayAs: 'Paragraph' | 'Heading 1' | 'Heading 2' | 'Heading 3' | 'Heading 4';\n}\n\nexport default function TextContent(props: TextContentProps) {\n type ExpectedDisplayAs = 'Paragraph' | 'Heading 1' | 'Heading 2' | 'Heading 3' | 'Heading 4';\n type ExpectedVariants = 'body1' | 'h1' | 'h2' | 'h3' | 'h4';\n\n const { content, displayAs }: { content: string; displayAs: ExpectedDisplayAs } = props;\n\n let theVariant: ExpectedVariants = 'body1';\n\n switch (displayAs) {\n case 'Paragraph':\n theVariant = 'body1';\n break;\n\n case 'Heading 1':\n theVariant = 'h1';\n break;\n\n case 'Heading 2':\n theVariant = 'h2';\n break;\n\n case 'Heading 3':\n theVariant = 'h3';\n break;\n\n case 'Heading 4':\n theVariant = 'h4';\n break;\n\n default:\n // eslint-disable-next-line no-console\n console.error(`TextContent got an expected displayAs prop: ${displayAs}`);\n break;\n }\n\n return <Typography variant={theVariant}>{content}</Typography>;\n}\n"]}
1
+ {"version":3,"file":"TextContent.js","sourceRoot":"","sources":["../../../../src/components/field/TextContent/TextContent.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAU3C,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAuB;IAIzD,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAsD,KAAK,CAAC;IAExF,IAAI,UAAU,GAAqB,OAAO,CAAC;IAE3C,QAAQ,SAAS,EAAE,CAAC;QAClB,KAAK,WAAW;YACd,UAAU,GAAG,OAAO,CAAC;YACrB,MAAM;QAER,KAAK,WAAW;YACd,UAAU,GAAG,IAAI,CAAC;YAClB,MAAM;QAER,KAAK,WAAW;YACd,UAAU,GAAG,IAAI,CAAC;YAClB,MAAM;QAER,KAAK,WAAW;YACd,UAAU,GAAG,IAAI,CAAC;YAClB,MAAM;QAER,KAAK,WAAW;YACd,UAAU,GAAG,IAAI,CAAC;YAClB,MAAM;QAER;YACE,OAAO,CAAC,KAAK,CAAC,+CAA+C,SAAS,EAAE,CAAC,CAAC;YAC1E,MAAM;IACV,CAAC;IAED,OAAO,KAAC,UAAU,IAAC,OAAO,EAAE,UAAU,YAAG,OAAO,GAAc,CAAC;AACjE,CAAC","sourcesContent":["import { Typography } from '@mui/material';\n\nimport type { PConnProps } from '../../../types/PConnProps';\n\ninterface TextContentProps extends PConnProps {\n // If any, enter additional props that only exist on TextContent here\n content: string;\n displayAs: 'Paragraph' | 'Heading 1' | 'Heading 2' | 'Heading 3' | 'Heading 4';\n}\n\nexport default function TextContent(props: TextContentProps) {\n type ExpectedDisplayAs = 'Paragraph' | 'Heading 1' | 'Heading 2' | 'Heading 3' | 'Heading 4';\n type ExpectedVariants = 'body1' | 'h1' | 'h2' | 'h3' | 'h4';\n\n const { content, displayAs }: { content: string; displayAs: ExpectedDisplayAs } = props;\n\n let theVariant: ExpectedVariants = 'body1';\n\n switch (displayAs) {\n case 'Paragraph':\n theVariant = 'body1';\n break;\n\n case 'Heading 1':\n theVariant = 'h1';\n break;\n\n case 'Heading 2':\n theVariant = 'h2';\n break;\n\n case 'Heading 3':\n theVariant = 'h3';\n break;\n\n case 'Heading 4':\n theVariant = 'h4';\n break;\n\n default:\n console.error(`TextContent got an expected displayAs prop: ${displayAs}`);\n break;\n }\n\n return <Typography variant={theVariant}>{content}</Typography>;\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { PConnFieldProps } from '../../../types/PConnProps';
1
+ import type { PConnFieldProps } from '../../../types/PConnProps';
2
2
  interface TextInputProps extends PConnFieldProps {
3
3
  fieldMetadata?: any;
4
4
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../src/components/field/TextInput/TextInput.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,UAAU,cAAe,SAAQ,eAAe;IAE9C,aAAa,CAAC,EAAE,GAAG,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAK,EAAE,cAAc,2CAiFtD"}
1
+ {"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../src/components/field/TextInput/TextInput.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE,UAAU,cAAe,SAAQ,eAAe;IAE9C,aAAa,CAAC,EAAE,GAAG,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAK,EAAE,cAAc,2CA+EtD"}