@pega/react-sdk-components 0.23.26 → 8.8.21

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 (553) hide show
  1. package/lib/bridge/Context/StoreContext.d.ts +3 -2
  2. package/lib/bridge/Context/StoreContext.d.ts.map +1 -1
  3. package/lib/bridge/Context/StoreContext.js +2 -3
  4. package/lib/bridge/Context/StoreContext.js.map +1 -1
  5. package/lib/bridge/helpers/sdk_component_map.d.ts +1 -0
  6. package/lib/bridge/helpers/sdk_component_map.d.ts.map +1 -1
  7. package/lib/bridge/helpers/sdk_component_map.js +22 -0
  8. package/lib/bridge/helpers/sdk_component_map.js.map +1 -1
  9. package/lib/bridge/react_pconnect.d.ts.map +1 -1
  10. package/lib/bridge/react_pconnect.js +2 -14
  11. package/lib/bridge/react_pconnect.js.map +1 -1
  12. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts +10 -0
  13. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts.map +1 -0
  14. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js +19 -0
  15. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.map +1 -0
  16. package/lib/components/designSystemExtension/AlertBanner/index.d.ts +2 -0
  17. package/lib/components/designSystemExtension/AlertBanner/index.d.ts.map +1 -0
  18. package/lib/components/designSystemExtension/AlertBanner/index.js +2 -0
  19. package/lib/components/designSystemExtension/AlertBanner/index.js.map +1 -0
  20. package/lib/components/designSystemExtension/Banner/Banner.d.ts +15 -1
  21. package/lib/components/designSystemExtension/Banner/Banner.d.ts.map +1 -1
  22. package/lib/components/designSystemExtension/Banner/Banner.js.map +1 -1
  23. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts +6 -9
  24. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
  25. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +3 -7
  26. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
  27. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts +4 -10
  28. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts.map +1 -1
  29. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +1 -8
  30. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
  31. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts +6 -2
  32. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
  33. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +3 -3
  34. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
  35. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts +7 -2
  36. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts.map +1 -1
  37. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js +4 -4
  38. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
  39. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts +7 -2
  40. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts.map +1 -1
  41. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +3 -3
  42. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
  43. package/lib/components/designSystemExtension/Operator/Operator.d.ts +17 -7
  44. package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
  45. package/lib/components/designSystemExtension/Operator/Operator.js +13 -16
  46. package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
  47. package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +5 -1
  48. package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
  49. package/lib/components/designSystemExtension/Pulse/Pulse.js +3 -6
  50. package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
  51. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts +19 -0
  52. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -0
  53. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +77 -0
  54. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -0
  55. package/lib/components/designSystemExtension/RichTextEditor/index.d.ts +2 -0
  56. package/lib/components/designSystemExtension/RichTextEditor/index.d.ts.map +1 -0
  57. package/lib/components/designSystemExtension/RichTextEditor/index.js +2 -0
  58. package/lib/components/designSystemExtension/RichTextEditor/index.js.map +1 -0
  59. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts +6 -1
  60. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts.map +1 -1
  61. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js +2 -2
  62. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
  63. package/lib/components/field/AutoComplete/AutoComplete.d.ts +15 -1
  64. package/lib/components/field/AutoComplete/AutoComplete.d.ts.map +1 -1
  65. package/lib/components/field/AutoComplete/AutoComplete.js +17 -15
  66. package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
  67. package/lib/components/field/CancelAlert/CancelAlert.d.ts +7 -2
  68. package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
  69. package/lib/components/field/CancelAlert/CancelAlert.js +12 -10
  70. package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
  71. package/lib/components/field/Checkbox/Checkbox.d.ts +19 -1
  72. package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
  73. package/lib/components/field/Checkbox/Checkbox.js +12 -10
  74. package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
  75. package/lib/components/field/Currency/Currency.d.ts +6 -1
  76. package/lib/components/field/Currency/Currency.d.ts.map +1 -1
  77. package/lib/components/field/Currency/Currency.js +11 -11
  78. package/lib/components/field/Currency/Currency.js.map +1 -1
  79. package/lib/components/field/Currency/currency-utils.d.ts +1 -1
  80. package/lib/components/field/Currency/currency-utils.d.ts.map +1 -1
  81. package/lib/components/field/Currency/currency-utils.js +1 -1
  82. package/lib/components/field/Currency/currency-utils.js.map +1 -1
  83. package/lib/components/field/Date/Date.d.ts +5 -1
  84. package/lib/components/field/Date/Date.d.ts.map +1 -1
  85. package/lib/components/field/Date/Date.js +19 -11
  86. package/lib/components/field/Date/Date.js.map +1 -1
  87. package/lib/components/field/DateTime/DateTime.d.ts +5 -1
  88. package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
  89. package/lib/components/field/DateTime/DateTime.js +15 -9
  90. package/lib/components/field/DateTime/DateTime.js.map +1 -1
  91. package/lib/components/field/Decimal/Decimal.d.ts +8 -1
  92. package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
  93. package/lib/components/field/Decimal/Decimal.js +43 -9
  94. package/lib/components/field/Decimal/Decimal.js.map +1 -1
  95. package/lib/components/field/Dropdown/Dropdown.d.ts +10 -1
  96. package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
  97. package/lib/components/field/Dropdown/Dropdown.js +26 -9
  98. package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
  99. package/lib/components/field/Email/Email.d.ts +5 -1
  100. package/lib/components/field/Email/Email.d.ts.map +1 -1
  101. package/lib/components/field/Email/Email.js +7 -5
  102. package/lib/components/field/Email/Email.js.map +1 -1
  103. package/lib/components/field/Integer/Integer.d.ts +5 -1
  104. package/lib/components/field/Integer/Integer.d.ts.map +1 -1
  105. package/lib/components/field/Integer/Integer.js +6 -4
  106. package/lib/components/field/Integer/Integer.js.map +1 -1
  107. package/lib/components/field/Percentage/Percentage.d.ts +5 -1
  108. package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
  109. package/lib/components/field/Percentage/Percentage.js +6 -4
  110. package/lib/components/field/Percentage/Percentage.js.map +1 -1
  111. package/lib/components/field/Phone/Phone.d.ts +5 -1
  112. package/lib/components/field/Phone/Phone.d.ts.map +1 -1
  113. package/lib/components/field/Phone/Phone.js +10 -7
  114. package/lib/components/field/Phone/Phone.js.map +1 -1
  115. package/lib/components/field/RadioButtons/RadioButtons.d.ts +7 -1
  116. package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
  117. package/lib/components/field/RadioButtons/RadioButtons.js +24 -11
  118. package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
  119. package/lib/components/field/RichText/RichText.d.ts +7 -0
  120. package/lib/components/field/RichText/RichText.d.ts.map +1 -0
  121. package/lib/components/field/RichText/RichText.js +51 -0
  122. package/lib/components/field/RichText/RichText.js.map +1 -0
  123. package/lib/components/field/RichText/index.d.ts +2 -0
  124. package/lib/components/field/RichText/index.d.ts.map +1 -0
  125. package/lib/components/field/RichText/index.js +2 -0
  126. package/lib/components/field/RichText/index.js.map +1 -0
  127. package/lib/components/field/ScalarList/ScalarList.d.ts +13 -0
  128. package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -0
  129. package/lib/components/field/ScalarList/ScalarList.js +34 -0
  130. package/lib/components/field/ScalarList/ScalarList.js.map +1 -0
  131. package/lib/components/field/ScalarList/index.d.ts +2 -0
  132. package/lib/components/field/ScalarList/index.d.ts.map +1 -0
  133. package/lib/components/field/ScalarList/index.js +2 -0
  134. package/lib/components/field/ScalarList/index.js.map +1 -0
  135. package/lib/components/field/SemanticLink/SemanticLink.d.ts +5 -9
  136. package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
  137. package/lib/components/field/SemanticLink/SemanticLink.js +10 -14
  138. package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
  139. package/lib/components/field/SemanticLink/utils.d.ts.map +1 -1
  140. package/lib/components/field/SemanticLink/utils.js.map +1 -1
  141. package/lib/components/field/TextArea/TextArea.d.ts +6 -1
  142. package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
  143. package/lib/components/field/TextArea/TextArea.js +5 -3
  144. package/lib/components/field/TextArea/TextArea.js.map +1 -1
  145. package/lib/components/field/TextContent/TextContent.d.ts +7 -1
  146. package/lib/components/field/TextContent/TextContent.d.ts.map +1 -1
  147. package/lib/components/field/TextContent/TextContent.js.map +1 -1
  148. package/lib/components/field/TextInput/TextInput.d.ts +6 -1
  149. package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
  150. package/lib/components/field/TextInput/TextInput.js +24 -5
  151. package/lib/components/field/TextInput/TextInput.js.map +1 -1
  152. package/lib/components/field/Time/Time.d.ts +5 -1
  153. package/lib/components/field/Time/Time.d.ts.map +1 -1
  154. package/lib/components/field/Time/Time.js +14 -8
  155. package/lib/components/field/Time/Time.js.map +1 -1
  156. package/lib/components/field/URL/URL.d.ts +5 -1
  157. package/lib/components/field/URL/URL.d.ts.map +1 -1
  158. package/lib/components/field/URL/URL.js +11 -5
  159. package/lib/components/field/URL/URL.js.map +1 -1
  160. package/lib/components/field/UserReference/UserReference.d.ts +19 -40
  161. package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
  162. package/lib/components/field/UserReference/UserReference.js +16 -45
  163. package/lib/components/field/UserReference/UserReference.js.map +1 -1
  164. package/lib/components/helpers/attachmentHelpers.d.ts +6 -6
  165. package/lib/components/helpers/attachmentHelpers.d.ts.map +1 -1
  166. package/lib/components/helpers/attachmentHelpers.js +2 -2
  167. package/lib/components/helpers/attachmentHelpers.js.map +1 -1
  168. package/lib/components/helpers/auth.d.ts +8 -6
  169. package/lib/components/helpers/auth.d.ts.map +1 -1
  170. package/lib/components/helpers/auth.js +642 -327
  171. package/lib/components/helpers/auth.js.map +1 -1
  172. package/lib/components/helpers/authManager.d.ts +20 -17
  173. package/lib/components/helpers/authManager.d.ts.map +1 -1
  174. package/lib/components/helpers/authManager.js +713 -438
  175. package/lib/components/helpers/authManager.js.map +1 -1
  176. package/lib/components/helpers/case-utils.d.ts +20 -0
  177. package/lib/components/helpers/case-utils.d.ts.map +1 -0
  178. package/lib/components/helpers/case-utils.js +82 -0
  179. package/lib/components/helpers/case-utils.js.map +1 -0
  180. package/lib/components/helpers/common-utils.d.ts +2 -0
  181. package/lib/components/helpers/common-utils.d.ts.map +1 -0
  182. package/lib/components/helpers/common-utils.js +5 -0
  183. package/lib/components/helpers/common-utils.js.map +1 -0
  184. package/lib/components/helpers/config_access.d.ts.map +1 -1
  185. package/lib/components/helpers/config_access.js +28 -98
  186. package/lib/components/helpers/config_access.js.map +1 -1
  187. package/lib/components/helpers/data_page.d.ts.map +1 -1
  188. package/lib/components/helpers/data_page.js.map +1 -1
  189. package/lib/components/helpers/date-format-utils.d.ts +1 -6
  190. package/lib/components/helpers/date-format-utils.d.ts.map +1 -1
  191. package/lib/components/helpers/date-format-utils.js +23 -14
  192. package/lib/components/helpers/date-format-utils.js.map +1 -1
  193. package/lib/components/helpers/event-utils.d.ts +1 -1
  194. package/lib/components/helpers/event-utils.d.ts.map +1 -1
  195. package/lib/components/helpers/event-utils.js.map +1 -1
  196. package/lib/components/helpers/field-group-utils.d.ts +15 -2
  197. package/lib/components/helpers/field-group-utils.d.ts.map +1 -1
  198. package/lib/components/helpers/field-group-utils.js +3 -3
  199. package/lib/components/helpers/field-group-utils.js.map +1 -1
  200. package/lib/components/helpers/formatters/Boolean.d.ts +3 -3
  201. package/lib/components/helpers/formatters/Boolean.d.ts.map +1 -1
  202. package/lib/components/helpers/formatters/Boolean.js.map +1 -1
  203. package/lib/components/helpers/formatters/Currency.d.ts +6 -6
  204. package/lib/components/helpers/formatters/Currency.d.ts.map +1 -1
  205. package/lib/components/helpers/formatters/Currency.js +6 -5
  206. package/lib/components/helpers/formatters/Currency.js.map +1 -1
  207. package/lib/components/helpers/formatters/CurrencyMap.d.ts +881 -1399
  208. package/lib/components/helpers/formatters/CurrencyMap.d.ts.map +1 -1
  209. package/lib/components/helpers/formatters/CurrencyMap.js.map +1 -1
  210. package/lib/components/helpers/formatters/Date.d.ts +4 -4
  211. package/lib/components/helpers/formatters/Date.d.ts.map +1 -1
  212. package/lib/components/helpers/formatters/Date.js +1 -1
  213. package/lib/components/helpers/formatters/Date.js.map +1 -1
  214. package/lib/components/helpers/formatters/common.d.ts +2 -2
  215. package/lib/components/helpers/formatters/common.d.ts.map +1 -1
  216. package/lib/components/helpers/formatters/common.js +4 -5
  217. package/lib/components/helpers/formatters/common.js.map +1 -1
  218. package/lib/components/helpers/formatters/index.d.ts +11 -11
  219. package/lib/components/helpers/formatters/index.d.ts.map +1 -1
  220. package/lib/components/helpers/formatters/index.js.map +1 -1
  221. package/lib/components/helpers/reactContextHelpers.d.ts +3 -2
  222. package/lib/components/helpers/reactContextHelpers.d.ts.map +1 -1
  223. package/lib/components/helpers/reactContextHelpers.js.map +1 -1
  224. package/lib/components/helpers/simpleTableHelpers.d.ts +5 -3
  225. package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
  226. package/lib/components/helpers/simpleTableHelpers.js +10 -5
  227. package/lib/components/helpers/simpleTableHelpers.js.map +1 -1
  228. package/lib/components/helpers/state-utils.d.ts +4 -0
  229. package/lib/components/helpers/state-utils.d.ts.map +1 -0
  230. package/lib/components/helpers/state-utils.js +36 -0
  231. package/lib/components/helpers/state-utils.js.map +1 -0
  232. package/lib/components/helpers/template-utils.d.ts +7 -3
  233. package/lib/components/helpers/template-utils.d.ts.map +1 -1
  234. package/lib/components/helpers/template-utils.js.map +1 -1
  235. package/lib/components/helpers/utils.d.ts +1 -1
  236. package/lib/components/helpers/utils.d.ts.map +1 -1
  237. package/lib/components/helpers/utils.js +9 -3
  238. package/lib/components/helpers/utils.js.map +1 -1
  239. package/lib/components/helpers/versionHelpers.d.ts.map +1 -1
  240. package/lib/components/helpers/versionHelpers.js.map +1 -1
  241. package/lib/components/infra/ActionButtons/ActionButtons.d.ts +6 -13
  242. package/lib/components/infra/ActionButtons/ActionButtons.d.ts.map +1 -1
  243. package/lib/components/infra/ActionButtons/ActionButtons.js +5 -15
  244. package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
  245. package/lib/components/infra/Assignment/Assignment.d.ts +9 -14
  246. package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
  247. package/lib/components/infra/Assignment/Assignment.js +32 -33
  248. package/lib/components/infra/Assignment/Assignment.js.map +1 -1
  249. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +8 -14
  250. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
  251. package/lib/components/infra/AssignmentCard/AssignmentCard.js +3 -16
  252. package/lib/components/infra/AssignmentCard/AssignmentCard.js.map +1 -1
  253. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +1 -21
  254. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
  255. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +53 -52
  256. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
  257. package/lib/components/infra/Containers/FlowContainer/helpers.d.ts +12 -12
  258. package/lib/components/infra/Containers/FlowContainer/helpers.d.ts.map +1 -1
  259. package/lib/components/infra/Containers/FlowContainer/helpers.js +17 -16
  260. package/lib/components/infra/Containers/FlowContainer/helpers.js.map +1 -1
  261. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +8 -17
  262. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
  263. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +22 -24
  264. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
  265. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +9 -22
  266. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
  267. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +7 -22
  268. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
  269. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +9 -19
  270. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
  271. package/lib/components/infra/DashboardFilter/DashboardFilter.js +2 -16
  272. package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
  273. package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -1
  274. package/lib/components/infra/DashboardFilter/filterUtils.js +1 -1
  275. package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
  276. package/lib/components/infra/DeferLoad/DeferLoad.d.ts +1 -14
  277. package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
  278. package/lib/components/infra/DeferLoad/DeferLoad.js +13 -15
  279. package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
  280. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +5 -12
  281. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
  282. package/lib/components/infra/ErrorBoundary/ErrorBoundary.js +9 -16
  283. package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
  284. package/lib/components/infra/MultiStep/MultiStep.d.ts +11 -17
  285. package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
  286. package/lib/components/infra/MultiStep/MultiStep.js +6 -20
  287. package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
  288. package/lib/components/infra/NavBar/NavBar.d.ts +8 -16
  289. package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
  290. package/lib/components/infra/NavBar/NavBar.js +9 -20
  291. package/lib/components/infra/NavBar/NavBar.js.map +1 -1
  292. package/lib/components/infra/Reference/Reference.d.ts +8 -17
  293. package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
  294. package/lib/components/infra/Reference/Reference.js +1 -15
  295. package/lib/components/infra/Reference/Reference.js.map +1 -1
  296. package/lib/components/infra/Region/Region.d.ts +4 -7
  297. package/lib/components/infra/Region/Region.d.ts.map +1 -1
  298. package/lib/components/infra/Region/Region.js +0 -4
  299. package/lib/components/infra/Region/Region.js.map +1 -1
  300. package/lib/components/infra/RootContainer/RootContainer.d.ts +1 -21
  301. package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
  302. package/lib/components/infra/RootContainer/RootContainer.js +16 -36
  303. package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
  304. package/lib/components/infra/Stages/Stages.d.ts +5 -8
  305. package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
  306. package/lib/components/infra/Stages/Stages.js +3 -7
  307. package/lib/components/infra/Stages/Stages.js.map +1 -1
  308. package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.d.ts.map +1 -1
  309. package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js.map +1 -1
  310. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts +4 -10
  311. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts.map +1 -1
  312. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +4 -9
  313. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
  314. package/lib/components/infra/View/View.d.ts +13 -16
  315. package/lib/components/infra/View/View.d.ts.map +1 -1
  316. package/lib/components/infra/View/View.js +8 -54
  317. package/lib/components/infra/View/View.js.map +1 -1
  318. package/lib/components/template/AppShell/AppShell.d.ts +20 -15
  319. package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
  320. package/lib/components/template/AppShell/AppShell.js +17 -29
  321. package/lib/components/template/AppShell/AppShell.js.map +1 -1
  322. package/lib/components/template/BannerPage/BannerPage.d.ts +11 -23
  323. package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
  324. package/lib/components/template/BannerPage/BannerPage.js +4 -22
  325. package/lib/components/template/BannerPage/BannerPage.js.map +1 -1
  326. package/lib/components/template/CaseSummary/CaseSummary.d.ts +5 -7
  327. package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
  328. package/lib/components/template/CaseSummary/CaseSummary.js +6 -6
  329. package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
  330. package/lib/components/template/CaseView/CaseView.d.ts +10 -22
  331. package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
  332. package/lib/components/template/CaseView/CaseView.js +41 -45
  333. package/lib/components/template/CaseView/CaseView.js.map +1 -1
  334. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +8 -13
  335. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
  336. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +9 -16
  337. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
  338. package/lib/components/template/Confirmation/Confirmation.d.ts +10 -16
  339. package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
  340. package/lib/components/template/Confirmation/Confirmation.js +12 -23
  341. package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
  342. package/lib/components/template/DataReference/DataReference.d.ts +1 -31
  343. package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
  344. package/lib/components/template/DataReference/DataReference.js +41 -48
  345. package/lib/components/template/DataReference/DataReference.js.map +1 -1
  346. package/lib/components/template/DefaultForm/DefaultForm.d.ts +1 -11
  347. package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
  348. package/lib/components/template/DefaultForm/DefaultForm.js +18 -15
  349. package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
  350. package/lib/components/template/DefaultForm/utils/index.d.ts +3 -0
  351. package/lib/components/template/DefaultForm/utils/index.d.ts.map +1 -0
  352. package/lib/components/template/DefaultForm/utils/index.js +27 -0
  353. package/lib/components/template/DefaultForm/utils/index.js.map +1 -0
  354. package/lib/components/template/Details/Details/Details.d.ts +1 -16
  355. package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
  356. package/lib/components/template/Details/Details/Details.js +10 -15
  357. package/lib/components/template/Details/Details/Details.js.map +1 -1
  358. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +7 -15
  359. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
  360. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js +1 -13
  361. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
  362. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +1 -16
  363. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
  364. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +14 -16
  365. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
  366. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +1 -16
  367. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
  368. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +14 -16
  369. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
  370. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +12 -19
  371. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
  372. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +7 -21
  373. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
  374. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +7 -7
  375. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
  376. package/lib/components/template/InlineDashboard/InlineDashboard.js +0 -5
  377. package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
  378. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +8 -15
  379. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
  380. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js +5 -14
  381. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js.map +1 -1
  382. package/lib/components/template/ListPage/ListPage.d.ts +5 -13
  383. package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
  384. package/lib/components/template/ListPage/ListPage.js +6 -10
  385. package/lib/components/template/ListPage/ListPage.js.map +1 -1
  386. package/lib/components/template/ListView/DefaultViewMeta.d.ts +1 -90
  387. package/lib/components/template/ListView/DefaultViewMeta.d.ts.map +1 -1
  388. package/lib/components/template/ListView/DefaultViewMeta.js.map +1 -1
  389. package/lib/components/template/ListView/ListView.d.ts +1 -9
  390. package/lib/components/template/ListView/ListView.d.ts.map +1 -1
  391. package/lib/components/template/ListView/ListView.js +127 -123
  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 +0 -1
  395. package/lib/components/template/ListView/hooks.js.map +1 -1
  396. package/lib/components/template/ListView/utils.d.ts +72 -16
  397. package/lib/components/template/ListView/utils.d.ts.map +1 -1
  398. package/lib/components/template/ListView/utils.js +143 -3
  399. package/lib/components/template/ListView/utils.js.map +1 -1
  400. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +9 -13
  401. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
  402. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js +2 -13
  403. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -1
  404. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +10 -1
  405. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -1
  406. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js.map +1 -1
  407. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +1 -16
  408. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
  409. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +14 -16
  410. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
  411. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +5 -1
  412. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -1
  413. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js.map +1 -1
  414. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +7 -14
  415. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
  416. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js +4 -13
  417. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -1
  418. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +4 -7
  419. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
  420. package/lib/components/template/OneColumn/OneColumn/OneColumn.js +0 -5
  421. package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
  422. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +4 -8
  423. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
  424. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js +3 -6
  425. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -1
  426. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +4 -7
  427. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
  428. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js +0 -5
  429. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js.map +1 -1
  430. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +1 -15
  431. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
  432. package/lib/components/template/PromotedFilters/PromotedFilters.js +17 -13
  433. package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
  434. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
  435. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js +57 -5
  436. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
  437. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +18 -1
  438. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
  439. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +5 -5
  440. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
  441. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +1 -29
  442. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
  443. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js +22 -28
  444. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
  445. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +14 -26
  446. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
  447. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js +5 -26
  448. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
  449. package/lib/components/template/SubTabs/SubTabs.d.ts +4 -10
  450. package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
  451. package/lib/components/template/SubTabs/SubTabs.js +1 -8
  452. package/lib/components/template/SubTabs/SubTabs.js.map +1 -1
  453. package/lib/components/template/SubTabs/tabUtils.d.ts.map +1 -1
  454. package/lib/components/template/SubTabs/tabUtils.js.map +1 -1
  455. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts +5 -11
  456. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
  457. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +1 -12
  458. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
  459. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +4 -8
  460. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
  461. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js +3 -6
  462. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -1
  463. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +5 -11
  464. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
  465. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +1 -9
  466. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
  467. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +10 -1
  468. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
  469. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js +1 -1
  470. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js.map +1 -1
  471. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +1 -16
  472. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
  473. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +31 -23
  474. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
  475. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +5 -1
  476. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -1
  477. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js.map +1 -1
  478. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +7 -14
  479. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
  480. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js +4 -14
  481. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js.map +1 -1
  482. package/lib/components/template/WssNavBar/WssNavBar.d.ts +17 -1
  483. package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -1
  484. package/lib/components/template/WssNavBar/WssNavBar.js +2 -2
  485. package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
  486. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts +8 -17
  487. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
  488. package/lib/components/widget/AppAnnouncement/AppAnnouncement.js +4 -19
  489. package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
  490. package/lib/components/widget/Attachment/Attachment.css +15 -3
  491. package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
  492. package/lib/components/widget/Attachment/Attachment.js +44 -32
  493. package/lib/components/widget/Attachment/Attachment.js.map +1 -1
  494. package/lib/components/widget/CaseHistory/CaseHistory.d.ts +4 -7
  495. package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
  496. package/lib/components/widget/CaseHistory/CaseHistory.js +4 -8
  497. package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
  498. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +8 -1
  499. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts.map +1 -1
  500. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
  501. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +5 -1
  502. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
  503. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +33 -23
  504. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
  505. package/lib/components/widget/Followers/Followers.d.ts +4 -5
  506. package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
  507. package/lib/components/widget/Followers/Followers.js +3 -10
  508. package/lib/components/widget/Followers/Followers.js.map +1 -1
  509. package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
  510. package/lib/components/widget/QuickCreate/QuickCreate.js +12 -4
  511. package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
  512. package/lib/components/widget/SummaryItem/SummaryItem.d.ts +7 -1
  513. package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
  514. package/lib/components/widget/SummaryItem/SummaryItem.js +2 -2
  515. package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
  516. package/lib/components/widget/SummaryList/SummaryList.d.ts +7 -1
  517. package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
  518. package/lib/components/widget/SummaryList/SummaryList.js +5 -2
  519. package/lib/components/widget/SummaryList/SummaryList.js.map +1 -1
  520. package/lib/components/widget/ToDo/ToDo.d.ts +13 -27
  521. package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
  522. package/lib/components/widget/ToDo/ToDo.js +35 -67
  523. package/lib/components/widget/ToDo/ToDo.js.map +1 -1
  524. package/lib/components_map.d.ts +3 -3
  525. package/lib/components_map.d.ts.map +1 -1
  526. package/lib/components_map.js +819 -818
  527. package/lib/components_map.js.map +1 -1
  528. package/lib/doc/KeyReleaseUpdates.md +65 -9
  529. package/lib/hooks/index.d.ts +4 -0
  530. package/lib/hooks/index.d.ts.map +1 -0
  531. package/lib/hooks/index.js +4 -0
  532. package/lib/hooks/index.js.map +1 -0
  533. package/lib/hooks/useAfterInitialEffect.d.ts +9 -0
  534. package/lib/hooks/useAfterInitialEffect.d.ts.map +1 -0
  535. package/lib/hooks/useAfterInitialEffect.js +16 -0
  536. package/lib/hooks/useAfterInitialEffect.js.map +1 -0
  537. package/lib/hooks/useConsolidatedRef.d.ts +9 -0
  538. package/lib/hooks/useConsolidatedRef.d.ts.map +1 -0
  539. package/lib/hooks/useConsolidatedRef.js +30 -0
  540. package/lib/hooks/useConsolidatedRef.js.map +1 -0
  541. package/lib/hooks/useUID.d.ts +8 -0
  542. package/lib/hooks/useUID.d.ts.map +1 -0
  543. package/lib/hooks/useUID.js +14 -0
  544. package/lib/hooks/useUID.js.map +1 -0
  545. package/lib/index.d.ts +1 -0
  546. package/lib/index.d.ts.map +1 -1
  547. package/lib/index.js +2 -1
  548. package/lib/index.js.map +1 -1
  549. package/lib/sdk-pega-component-map.d.ts +15 -1
  550. package/lib/sdk-pega-component-map.js +15 -1
  551. package/lib/sdk-pega-component-map.js.map +1 -1
  552. package/lib/types/PConnProps.d.ts +42 -0
  553. package/package.json +1 -1
@@ -1,13 +1,12 @@
1
1
  import React, { useMemo, useRef, useState, useEffect, useContext, createElement } from "react";
2
2
  // import { Banner, ModalManager } from "@pega/cosmos-react-core";
3
- import PropTypes, { object } from "prop-types";
4
3
  import isEqual from 'lodash.isequal';
5
4
  // import ReAuthMessageModal from "../ReAuthenticationModal";
6
5
  import { Box, CircularProgress } from "@material-ui/core";
7
6
  import createPConnectComponent from "../../../bridge/react_pconnect";
8
7
  import { LazyMap as LazyComponentMap } from "../../../components_map";
9
8
  import StoreContext from "../../../bridge/Context/StoreContext";
10
- import Utils from '../../helpers/utils';
9
+ import { isEmptyObject } from '../../helpers/common-utils';
11
10
  //
12
11
  // WARNING: It is not expected that this file should be modified. It is part of infrastructure code that works with
13
12
  // Redux and creation/update of Redux containers and PConnect. Modifying this code could have undesireable results and
@@ -29,21 +28,18 @@ function getItemView(routingInfo, renderingMode) {
29
28
  const key = accessedOrder[accessedOrder.length - 1];
30
29
  if (items[key] &&
31
30
  items[key].view &&
32
- !Utils.isEmptyObject(items[key].view)) {
31
+ !isEmptyObject(items[key].view)) {
33
32
  viewConfigs.push(items[key]);
34
33
  }
35
34
  }
36
35
  }
37
36
  return viewConfigs;
38
37
  }
39
- const RootContainer = (props) => {
40
- const { getPConnect, renderingMode, children, skeleton, httpMessages, routingInfo } = props;
41
- const { displayOnlyFA, isMashup } = useContext(StoreContext);
38
+ export default function RootContainer(props /* : RootContainerProps */) {
39
+ const { getPConnect, renderingMode = '', children = [], skeleton, httpMessages = [], routingInfo } = props;
40
+ const { displayOnlyFA } = useContext(StoreContext);
42
41
  const pConn = getPConnect();
43
42
  const options = { "context": "app" };
44
- if (isMashup) {
45
- options["context"] = "root";
46
- }
47
43
  const [componentName, setComponentName] = useState("");
48
44
  useEffect(() => {
49
45
  // debugging/investigation help
@@ -53,13 +49,13 @@ const RootContainer = (props) => {
53
49
  // console.log(`RootContainer props.routingInfo: ${JSON.stringify(routingInfo)}`);
54
50
  let hasBanner = false;
55
51
  let banners = null;
52
+ const localizedVal = PCore.getLocaleUtils().getLocaleValue;
53
+ const localeCategory = 'Messages';
56
54
  const messages = httpMessages
57
- ? httpMessages.map((msg) => msg.message)
55
+ ? httpMessages.map((msg) => localizedVal(msg.message, localeCategory))
58
56
  : httpMessages;
59
57
  hasBanner = messages && messages.length > 0;
60
- banners = hasBanner && (React.createElement("div", null,
61
- "RootContainer: trying to emit Banner with ",
62
- messages));
58
+ banners = hasBanner && (React.createElement("div", null, localizedVal(`RootContainer: trying to emit Banner with ${messages}`, localeCategory)));
63
59
  const MemoizedModalViewContainer = useMemo(() => {
64
60
  return createElement(createPConnectComponent(), PCore.createPConnect({
65
61
  meta: {
@@ -88,7 +84,7 @@ const RootContainer = (props) => {
88
84
  let noPortalContent;
89
85
  switch (componentName) {
90
86
  case "View":
91
- noPortalContent = React.createElement("div", null, "getNoPortalContent: RootContainer wants to render View in noPortal mode");
87
+ noPortalContent = React.createElement("div", null, localizedVal('getNoPortalContent: RootContainer wants to render View in noPortal mode', localeCategory));
92
88
  break;
93
89
  case "ViewContainer": {
94
90
  const configProps = pConn.getConfigProps();
@@ -109,7 +105,7 @@ const RootContainer = (props) => {
109
105
  break;
110
106
  }
111
107
  default:
112
- noPortalContent = React.createElement("div", null, "getNoPortalContent: RootContainer wants to render NO componentName in noPortal mode");
108
+ noPortalContent = React.createElement("div", null, localizedVal('getNoPortalContent: RootContainer wants to render NO componentName in noPortal mode', localeCategory));
113
109
  break;
114
110
  }
115
111
  return noPortalContent;
@@ -158,7 +154,7 @@ const RootContainer = (props) => {
158
154
  }
159
155
  else if (renderingMode === "noPortal") {
160
156
  // eslint-disable-next-line no-console
161
- console.log(`RootContainer rendering in noPortal mode`);
157
+ console.log(`${localizedVal('RootContainer rendering in noPortal mode', localeCategory)}`);
162
158
  const theChildren = pConn.getChildren();
163
159
  if (theChildren && (theChildren.length === 1)) {
164
160
  const localPConn = theChildren[0].getPConnect();
@@ -172,7 +168,7 @@ const RootContainer = (props) => {
172
168
  }
173
169
  else if (children && children.length > 0) {
174
170
  return (React.createElement(React.Fragment, null,
175
- React.createElement("div", null, "RootContainer: Has children. Trying to show ModalManager with children, etc."),
171
+ React.createElement("div", null, localizedVal('RootContainer: Has children. Trying to show ModalManager with children, etc.', localeCategory)),
176
172
  children,
177
173
  MemoizedModalViewContainer));
178
174
  }
@@ -185,24 +181,8 @@ const RootContainer = (props) => {
185
181
  }
186
182
  else {
187
183
  return (React.createElement("div", { id: "root-container" },
188
- React.createElement("div", null, "RootContainer: Should be ModalManager, etc.")));
184
+ React.createElement("div", null, localizedVal('RootContainer: Should be ModalManager, etc.', localeCategory))));
189
185
  }
190
- };
191
- RootContainer.defaultProps = {
192
- getPConnect: null,
193
- renderingMode: null,
194
- children: null,
195
- routingInfo: object
196
- };
197
- RootContainer.propTypes = {
198
- getPConnect: PropTypes.func,
199
- renderingMode: PropTypes.string,
200
- routingInfo: PropTypes.shape({
201
- type: PropTypes.string,
202
- accessedOrder: PropTypes.array,
203
- items: PropTypes.object
204
- }),
205
- children: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.object, PropTypes.string]))
206
- };
207
- export default RootContainer;
186
+ }
187
+ ;
208
188
  //# sourceMappingURL=RootContainer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RootContainer.js","sourceRoot":"","sources":["../../../../src/components/infra/RootContainer/RootContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,O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B,GAAG,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QAEpD,OAAO,CACL,6BAAK,EAAE,EAAC,gBAAgB;YAEtB,oBAAC,GAAG,IAAC,SAAS,EAAC,QAAQ;gBAAC,oBAAC,gBAAgB,OAAG,CAAM,CAC9C,CACP,CAAC;KACH;SAAM;QACL,OAAO,CACL,6BAAK,EAAE,EAAC,gBAAgB;YACtB,+EAAsD,CAClD,CACP,CAAC;KACH;AACH,CAAC,CAAC;AAEF,aAAa,CAAC,YAAY,GAAG;IAC3B,WAAW,EAAE,IAAI;IACjB,aAAa,EAAE,IAAI;IACnB,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE,MAAM;CACpB,CAAC;AAEF,aAAa,CAAC,SAAS,GAAG;IACxB,WAAW,EAAE,SAAS,CAAC,IAAI;IAC3B,aAAa,EAAE,SAAS,CAAC,MAAM;IAC/B,WAAW,EAAE,SAAS,CAAC,KAAK,CAAC;QAC3B,IAAI,EAAE,SAAS,CAAC,MAAM;QACtB,aAAa,EAAE,SAAS,CAAC,KAAK;QAC9B,KAAK,EAAE,SAAS,CAAC,MAAM;KACxB,CAAC;IACF,QAAQ,EAAE,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,SAAS,CAAE,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAE,CAAC,CAAC;CACzF,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import React, { useMemo, useRef, useState, useEffect, useContext, createElement } from \"react\";\n// import { Banner, ModalManager } from \"@pega/cosmos-react-core\";\nimport PropTypes, { object } from \"prop-types\";\nimport isEqual from 'lodash.isequal';\n// import ReAuthMessageModal from \"../ReAuthenticationModal\";\nimport { Box, CircularProgress } from \"@material-ui/core\";\nimport createPConnectComponent from \"../../../bridge/react_pconnect\";\nimport { LazyMap as LazyComponentMap } from \"../../../components_map\";\nimport StoreContext from \"../../../bridge/Context/StoreContext\";\nimport Utils from '../../helpers/utils';\n\ndeclare const PCore;\n\n//\n// WARNING: It is not expected that this file should be modified. It is part of infrastructure code that works with\n// Redux and creation/update of Redux containers and PConnect. Modifying this code could have undesireable results and\n// is totally at your own risk.\n//\n\n\nconst renderingModes = [\"portal\", \"view\"];\n\nfunction usePrevious(value) {\n const ref = useRef(null);\n useEffect(() => {\n ref.current = value;\n });\n return ref.current;\n}\n\nfunction getItemView(routingInfo, renderingMode) {\n const viewConfigs: any = [];\n if (routingInfo && renderingModes.includes(renderingMode)) {\n const { accessedOrder, items }: {accessedOrder: any, items:any } = routingInfo;\n if (accessedOrder && items) {\n const key = accessedOrder[accessedOrder.length - 1];\n if (\n items[key] &&\n items[key].view &&\n !Utils.isEmptyObject(items[key].view)\n ) {\n viewConfigs.push(items[key]);\n }\n }\n }\n return viewConfigs;\n}\n\nconst RootContainer = (props) => {\n const {\n getPConnect,\n renderingMode,\n children,\n skeleton,\n httpMessages,\n routingInfo\n } = props;\n\n const { displayOnlyFA, isMashup } = useContext(StoreContext);\n\n\n const pConn = getPConnect();\n\n const options = { \"context\": \"app\" };\n if (isMashup) {\n options[\"context\"] = \"root\";\n }\n\n const [componentName, setComponentName] = useState(\"\");\n\n useEffect( () => {\n // debugging/investigation help\n // console.log(`componentName change: ${componentName} triggering a re-render`);\n }, [componentName] );\n\n // debugging/investigation help\n // console.log(`RootContainer props.routingInfo: ${JSON.stringify(routingInfo)}`);\n\n let hasBanner = false;\n let banners: any = null;\n const messages = httpMessages\n ? httpMessages.map((msg) => msg.message)\n : httpMessages;\n\n hasBanner = messages && messages.length > 0;\n banners = hasBanner && (<div>RootContainer: trying to emit Banner with {messages}</div>);\n\n const MemoizedModalViewContainer = useMemo(() => {\n return createElement(\n createPConnectComponent(),\n PCore.createPConnect({\n meta: {\n type: \"ModalViewContainer\",\n config: {\n name: \"modal\"\n }\n },\n options\n })\n );\n }, []);\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars\n const MemoizedPreviewViewContainer = useMemo(() => {\n return createElement(\n createPConnectComponent(),\n PCore.createPConnect({\n meta: {\n type: \"PreviewViewContainer\",\n config: {\n name: \"preview\"\n }\n },\n options\n })\n );\n }, []);\n\n\n //\n function getNoPortalContent() {\n let noPortalContent: any;\n\n switch (componentName) {\n case \"View\":\n noPortalContent = <div>getNoPortalContent: RootContainer wants to render View in noPortal mode</div>\n break;\n\n case \"ViewContainer\": {\n const configProps = pConn.getConfigProps();\n const viewContConfig = {\n \"meta\": {\n \"type\": \"ViewContainer\",\n \"config\": configProps\n },\n options\n };\n const theViewCont = PCore.createPConnect(viewContConfig);\n // Add in displayOnlyFA if prop is on RootContainer\n if (displayOnlyFA) {\n theViewCont[\"displayOnlyFA\"] = true;\n }\n\n const theViewContainerAsReact = createElement(createPConnectComponent(), theViewCont);\n\n noPortalContent = theViewContainerAsReact;\n break;\n }\n\n default:\n noPortalContent = <div>getNoPortalContent: RootContainer wants to render NO componentName in noPortal mode</div>\n break;\n\n }\n\n return noPortalContent;\n }\n\n\n let rootView : any;\n let rootViewConfig: any = null;\n\n useEffect(() => {\n const { containers } = PCore.getStore().getState();\n const items = Object.keys(containers).filter((item) =>\n item.includes(\"root\")\n );\n PCore.getContainerUtils().getContainerAPI().addContainerItems(items);\n }, [routingInfo]);\n\n const items: any = getItemView(routingInfo, renderingMode);\n\n if (items.length > 0) {\n rootViewConfig = {\n meta: items[0].view,\n options: {\n context: items[0].context\n }\n };\n }\n const prevRootConfig = usePrevious(rootViewConfig);\n\n if (\n renderingModes.includes(renderingMode) &&\n messages &&\n routingInfo &&\n routingInfo?.accessedOrder.length === 0\n ) {\n return <div id=\"root-container\">{banners}</div>;\n }\n\n if (items.length > 0) {\n const itemView = items[0].view;\n const currentRootConfig = {\n meta: itemView,\n options: {\n context: items[0].context\n }\n };\n\n if (!isEqual(currentRootConfig, prevRootConfig)) {\n rootView = createElement(\n createPConnectComponent(),\n PCore.createPConnect(currentRootConfig)\n );\n }\n\n // debugging/investigation help\n // console.log(`rootView.props.getPConnect().getComponentName(): ${rootView.props.getPConnect().getComponentName()}`);\n\n return (\n <div id=\"ModalManager\">\n {rootView}\n {MemoizedModalViewContainer}\n <div id=\"MemoizedPreviewViewContainer\"></div>\n <div id=\"ReAuthMessageModal\"></div>\n </div>\n );\n\n }\n else if (renderingMode === \"noPortal\") {\n // eslint-disable-next-line no-console\n console.log(`RootContainer rendering in noPortal mode`);\n\n const theChildren = pConn.getChildren();\n if (theChildren && (theChildren.length === 1)) {\n const localPConn = theChildren[0].getPConnect();\n const localCompName = localPConn.getComponentName()\n if (componentName !== localCompName) {\n setComponentName(localCompName);\n }\n }\n\n const noPortalContent = getNoPortalContent();\n\n return noPortalContent;\n }\n else if (children && children.length > 0) {\n return (\n <React.Fragment>\n <div>RootContainer: Has children. Trying to show ModalManager with children, etc.</div>\n {children}\n {MemoizedModalViewContainer}\n </React.Fragment>\n\n );\n } else if (skeleton) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars\n const LoadingComponent = LazyComponentMap[skeleton];\n\n return (\n <div id=\"root-container\">\n {/* <div>RootContainer: Trying to show skeleton</div> */}\n <Box textAlign=\"center\"><CircularProgress /></Box>\n </div>\n );\n } else {\n return (\n <div id=\"root-container\">\n <div>RootContainer: Should be ModalManager, etc.</div>\n </div>\n );\n }\n};\n\nRootContainer.defaultProps = {\n getPConnect: null,\n renderingMode: null,\n children: null,\n routingInfo: object\n};\n\nRootContainer.propTypes = {\n getPConnect: PropTypes.func,\n renderingMode: PropTypes.string,\n routingInfo: PropTypes.shape({\n type: PropTypes.string,\n accessedOrder: PropTypes.array,\n items: PropTypes.object\n }),\n children: PropTypes.arrayOf(PropTypes.oneOfType( [PropTypes.object, PropTypes.string ]))\n};\n\nexport default RootContainer;\n"]}
1
+ {"version":3,"file":"RootContainer.js","sourceRoot":"","sources":["../../../../src/components/infra/RootContainer/RootContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,E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ACL,oBAAC,KAAK,CAAC,QAAQ;YACb,iCAAM,YAAY,CAAC,8EAA8E,EAAE,cAAc,CAAC,CAAO;YACxH,QAAQ;YACR,0BAA0B,CACZ,CAElB,CAAC;KACH;SAAM,IAAI,QAAQ,EAAE;QACnB,6EAA6E;QAC7E,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QAEpD,OAAO,CACL,6BAAK,EAAE,EAAC,gBAAgB;YAEtB,oBAAC,GAAG,IAAC,SAAS,EAAC,QAAQ;gBAAC,oBAAC,gBAAgB,OAAG,CAAM,CAC9C,CACP,CAAC;KACH;SAAM;QACL,OAAO,CACL,6BAAK,EAAE,EAAC,gBAAgB;YACtB,iCAAM,YAAY,CAAC,6CAA6C,EAAE,cAAc,CAAC,CAAO,CACpF,CACP,CAAC;KACH;AACH,CAAC;AAAA,CAAC","sourcesContent":["import React, { useMemo, useRef, useState, useEffect, useContext, createElement } from \"react\";\n// import { Banner, ModalManager } from \"@pega/cosmos-react-core\";\nimport isEqual from 'lodash.isequal';\n// import ReAuthMessageModal from \"../ReAuthenticationModal\";\nimport { Box, CircularProgress } from \"@material-ui/core\";\nimport createPConnectComponent from \"../../../bridge/react_pconnect\";\nimport { LazyMap as LazyComponentMap } from \"../../../components_map\";\nimport StoreContext from \"../../../bridge/Context/StoreContext\";\nimport { isEmptyObject } from '../../helpers/common-utils';\n\n// import type { PConnProps } from '../../../types/PConnProps';\n\n// Can't use RootContainerProps until getChildren() typedef is fixes to not return an array of 'never'\n// interface RootContainerProps extends PConnProps {\n// // If any, enter additional props that only exist on this component\n// renderingMode?: string,\n// routingInfo: { type: string, accessedOrder: Array<any>, items: any },\n// children: Array<any>,\n// skeleton: any,\n// httpMessages: Array<any>\n// }\n\n// Remove this and use \"real\" PCore type once .d.ts is fixed (currently shows 1 error)\ndeclare const PCore: any;\n\n\n//\n// WARNING: It is not expected that this file should be modified. It is part of infrastructure code that works with\n// Redux and creation/update of Redux containers and PConnect. Modifying this code could have undesireable results and\n// is totally at your own risk.\n//\n\n\nconst renderingModes = [\"portal\", \"view\"];\n\nfunction usePrevious(value) {\n const ref = useRef(null);\n useEffect(() => {\n ref.current = value;\n });\n return ref.current;\n}\n\nfunction getItemView(routingInfo, renderingMode) {\n const viewConfigs: any = [];\n if (routingInfo && renderingModes.includes(renderingMode)) {\n const { accessedOrder, items }: {accessedOrder: any, items:any } = routingInfo;\n if (accessedOrder && items) {\n const key = accessedOrder[accessedOrder.length - 1];\n if (\n items[key] &&\n items[key].view &&\n !isEmptyObject(items[key].view)\n ) {\n viewConfigs.push(items[key]);\n }\n }\n }\n return viewConfigs;\n}\n\nexport default function RootContainer(props /* : RootContainerProps */) {\n const {\n getPConnect,\n renderingMode = '',\n children = [],\n skeleton,\n httpMessages = [],\n routingInfo\n } = props;\n\n const { displayOnlyFA } = useContext<any>(StoreContext);\n\n\n const pConn = getPConnect();\n\n const options = { \"context\": \"app\" };\n\n const [componentName, setComponentName] = useState(\"\");\n\n useEffect( () => {\n // debugging/investigation help\n // console.log(`componentName change: ${componentName} triggering a re-render`);\n }, [componentName] );\n\n // debugging/investigation help\n // console.log(`RootContainer props.routingInfo: ${JSON.stringify(routingInfo)}`);\n\n let hasBanner = false;\n let banners: any = null;\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'Messages';\n\n const messages = httpMessages\n ? httpMessages.map((msg) => localizedVal(msg.message, localeCategory))\n : httpMessages;\n\n hasBanner = messages && messages.length > 0;\n banners = hasBanner && (<div>{localizedVal(`RootContainer: trying to emit Banner with ${messages}`, localeCategory)}</div>);\n\n const MemoizedModalViewContainer = useMemo(() => {\n return createElement(\n createPConnectComponent(),\n PCore.createPConnect({\n meta: {\n type: \"ModalViewContainer\",\n config: {\n name: \"modal\"\n }\n },\n options\n })\n );\n }, []);\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars\n const MemoizedPreviewViewContainer = useMemo(() => {\n return createElement(\n createPConnectComponent(),\n PCore.createPConnect({\n meta: {\n type: \"PreviewViewContainer\",\n config: {\n name: \"preview\"\n }\n },\n options\n })\n );\n }, []);\n\n\n //\n function getNoPortalContent() {\n let noPortalContent: any;\n\n switch (componentName) {\n case \"View\":\n noPortalContent = <div>{localizedVal('getNoPortalContent: RootContainer wants to render View in noPortal mode', localeCategory)}</div>\n break;\n\n case \"ViewContainer\": {\n const configProps = pConn.getConfigProps();\n const viewContConfig = {\n \"meta\": {\n \"type\": \"ViewContainer\",\n \"config\": configProps\n },\n options\n };\n const theViewCont = PCore.createPConnect(viewContConfig);\n // Add in displayOnlyFA if prop is on RootContainer\n if (displayOnlyFA) {\n theViewCont[\"displayOnlyFA\"] = true;\n }\n\n const theViewContainerAsReact = createElement(createPConnectComponent(), theViewCont);\n\n noPortalContent = theViewContainerAsReact;\n break;\n }\n\n default:\n noPortalContent = <div>{localizedVal('getNoPortalContent: RootContainer wants to render NO componentName in noPortal mode', localeCategory)}</div>\n break;\n\n }\n\n return noPortalContent;\n }\n\n\n let rootView : any;\n let rootViewConfig: any = null;\n\n useEffect(() => {\n const { containers } = PCore.getStore().getState();\n const items = Object.keys(containers).filter((item) =>\n item.includes(\"root\")\n );\n PCore.getContainerUtils().getContainerAPI().addContainerItems(items);\n }, [routingInfo]);\n\n const items: any = getItemView(routingInfo, renderingMode);\n\n if (items.length > 0) {\n rootViewConfig = {\n meta: items[0].view,\n options: {\n context: items[0].context\n }\n };\n }\n const prevRootConfig = usePrevious(rootViewConfig);\n\n if (\n renderingModes.includes(renderingMode) &&\n messages &&\n routingInfo &&\n routingInfo?.accessedOrder.length === 0\n ) {\n return <div id=\"root-container\">{banners}</div>;\n }\n\n if (items.length > 0) {\n const itemView = items[0].view;\n const currentRootConfig = {\n meta: itemView,\n options: {\n context: items[0].context\n }\n };\n\n if (!isEqual(currentRootConfig, prevRootConfig)) {\n rootView = createElement(\n createPConnectComponent(),\n PCore.createPConnect(currentRootConfig)\n );\n }\n\n // debugging/investigation help\n // console.log(`rootView.props.getPConnect().getComponentName(): ${rootView.props.getPConnect().getComponentName()}`);\n\n return (\n <div id=\"ModalManager\">\n {rootView}\n {MemoizedModalViewContainer}\n <div id=\"MemoizedPreviewViewContainer\"></div>\n <div id=\"ReAuthMessageModal\"></div>\n </div>\n );\n\n }\n else if (renderingMode === \"noPortal\") {\n // eslint-disable-next-line no-console\n console.log(`${localizedVal('RootContainer rendering in noPortal mode', localeCategory)}`);\n\n const theChildren = pConn.getChildren();\n if (theChildren && (theChildren.length === 1)) {\n const localPConn = theChildren[0].getPConnect();\n const localCompName = localPConn.getComponentName()\n if (componentName !== localCompName) {\n setComponentName(localCompName);\n }\n }\n\n const noPortalContent = getNoPortalContent();\n\n return noPortalContent;\n }\n else if (children && children.length > 0) {\n return (\n <React.Fragment>\n <div>{localizedVal('RootContainer: Has children. Trying to show ModalManager with children, etc.', localeCategory)}</div>\n {children}\n {MemoizedModalViewContainer}\n </React.Fragment>\n\n );\n } else if (skeleton) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars\n const LoadingComponent = LazyComponentMap[skeleton];\n\n return (\n <div id=\"root-container\">\n {/* <div>RootContainer: Trying to show skeleton</div> */}\n <Box textAlign=\"center\"><CircularProgress /></Box>\n </div>\n );\n } else {\n return (\n <div id=\"root-container\">\n <div>{localizedVal('RootContainer: Should be ModalManager, etc.', localeCategory)}</div>\n </div>\n );\n }\n};\n"]}
@@ -1,11 +1,8 @@
1
1
  /// <reference types="react" />
2
- import PropTypes from "prop-types";
3
- declare function Stages(props: any): JSX.Element;
4
- declare namespace Stages {
5
- var propTypes: {
6
- getPConnect: PropTypes.Validator<(...args: any[]) => any>;
7
- stages: PropTypes.Validator<(object | null | undefined)[]>;
8
- };
2
+ import type { PConnProps } from '../../../types/PConnProps';
3
+ interface StagesProps extends PConnProps {
4
+ stages: Array<any>;
9
5
  }
10
- export default Stages;
6
+ export default function Stages(props: StagesProps): JSX.Element;
7
+ export {};
11
8
  //# sourceMappingURL=Stages.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Stages.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/Stages/Stages.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AAwDnC,iBAAwB,MAAM,CAAC,KAAK,KAAA,eAwDnC;kBAxDuB,MAAM;;;;;;eAAN,MAAM"}
1
+ {"version":3,"file":"Stages.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/Stages/Stages.tsx"],"names":[],"mappings":";AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAG5D,UAAU,WAAY,SAAQ,UAAU;IAEtC,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,CAAA;CACnB;AAuDD,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,WAAW,eA0DhD"}
@@ -1,5 +1,4 @@
1
1
  import React from "react";
2
- import PropTypes from "prop-types";
3
2
  import { Breadcrumbs, Card, Typography } from "@material-ui/core";
4
3
  import DoubleArrowIcon from '@material-ui/icons/DoubleArrow';
5
4
  import DoneIcon from '@material-ui/icons/Done';
@@ -48,12 +47,13 @@ export default function Stages(props) {
48
47
  const classes = useStyles();
49
48
  const { getPConnect, stages } = props;
50
49
  const pConn = getPConnect();
50
+ const key = `${pConn.getCaseInfo().getClassName()}!CASE!${pConn.getCaseInfo().getName()}`.toUpperCase();
51
51
  const filteredStages = getFilteredStages(stages);
52
- const currentStageID = pConn.getValue(PCore.getConstants().CASE_INFO.STAGEID);
52
+ const currentStageID = pConn.getValue(PCore.getConstants().CASE_INFO.STAGEID, ''); // 2nd arg empty string until typedef allows optional
53
53
  const stagesObj = filteredStages.map((stage, index, arr) => {
54
54
  const theID = stage.ID || stage.id;
55
55
  return {
56
- name: stage.name,
56
+ name: PCore.getLocaleUtils().getLocaleValue(stage.name, null, key),
57
57
  id: theID,
58
58
  complete: stage.visited_status === "completed",
59
59
  current: (theID === currentStageID),
@@ -86,8 +86,4 @@ export default function Stages(props) {
86
86
  }
87
87
  return (React.createElement(Card, { id: "Stages", className: classes.root }, getStages(stagesObj)));
88
88
  }
89
- Stages.propTypes = {
90
- getPConnect: PropTypes.func.isRequired,
91
- stages: PropTypes.arrayOf(PropTypes.object).isRequired
92
- };
93
89
  //# sourceMappingURL=Stages.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Stages.js","sourceRoot":"","sources":["../../../../src/components/infra/Stages/Stages.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,eAAe,MAAM,gCAAgC,CAAC;AAC7D,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAItD,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACvC,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,cAAc,EAAE;QACd,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO;KAClC;IACD,YAAY,EAAE;QACZ,KAAK,EAAE,KAAK,CAA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AE,EAAC,QAAQ,EAAC,SAAS,EAAE,OAAO,CAAC,IAAI,IAItC,SAAS,CAAC,SAAS,CAAC,CAChB,CACR,CAAA;AACH,CAAC;AAED,MAAM,CAAC,SAAS,GAAG;IACjB,WAAW,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACtC,MAAM,EAAE,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,UAAU;CACvD,CAAC","sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Breadcrumbs, Card, Typography } from \"@material-ui/core\";\nimport DoubleArrowIcon from '@material-ui/icons/DoubleArrow';\nimport DoneIcon from '@material-ui/icons/Done';\nimport { makeStyles } from '@material-ui/core/styles';\n\ndeclare const PCore: any;\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 completedStage: {\n color: theme.palette.text.primary,\n },\n currentStage: {\n color: theme.palette.info.dark,\n fontWeight: 600,\n },\n futureStage: {\n color: theme.palette.text.secondary,\n },\n separatorIcon: {\n color: theme.palette.text.disabled,\n }\n\n}));\n\n\n/**\n * API to filter out the alternate stages which are not in active and return all other stages\n * @param {Array} stages - Stages of a case type\n *\n * @returns {Array} - Returns stages which are non alternate stages and alternate stage which is active.\n */\nfunction getFilteredStages(stages) {\n if (!Array.isArray(stages)) {\n return [];\n }\n\n return stages.filter(\n (stage) =>\n stage.type !== \"Alternate\" ||\n (stage.type === \"Alternate\" && stage.visited_status === \"active\")\n );\n}\n\n/* TODO - this component should be refactored and not exposed as top level DX Component -\n the stages should be created as part of the CaseView */\nexport default function Stages(props) {\n const classes = useStyles();\n\n const { getPConnect, stages } = props;\n const pConn = getPConnect();\n\n const filteredStages = getFilteredStages(stages);\n const currentStageID = pConn.getValue(PCore.getConstants().CASE_INFO.STAGEID);\n const stagesObj = filteredStages.map((stage, index, arr) => {\n const theID = stage.ID || stage.id;\n return {\n name: stage.name,\n id: theID,\n complete: stage.visited_status === \"completed\",\n current: (theID === currentStageID),\n last: (index === arr.length - 1),\n };\n });\n\n // debugging/investigation help\n // console.log(`Stages: current: ${currentStageID} stagesObj: ${JSON.stringify(stagesObj)}`);\n\n function getStage(stage, index) {\n // Removing nested ternary for lint\n // const theClass = stage.current ? classes.currentStage : (stage.complete ? classes.completedStage : classes.futureStage);\n let theClass;\n if (stage.current) {\n theClass = classes.currentStage;\n } else if (stage.complete) {\n theClass = classes.completedStage;\n } else {\n theClass = classes.futureStage;\n }\n\n return <span key={index}>\n {stage.complete ? <DoneIcon color=\"disabled\" fontSize=\"small\" /> : null}\n <Typography variant=\"h5\" component=\"span\" display=\"inline\" className={theClass}>{stage.name}</Typography>\n </span>;\n }\n\n function getStages(inStages) {\n return <Breadcrumbs aria-label=\"stages\" separator={<DoubleArrowIcon className={classes.separatorIcon} />}>\n {inStages.map((stage, index) => {\n return getStage(stage, index);\n })}\n </Breadcrumbs>\n }\n\n return (\n <Card id=\"Stages\" className={classes.root}>\n {/* Stages<br />\n currentStageID: {currentStageID}<br />\n {JSON.stringify(stagesObj)}<br /><br /> */}\n {getStages(stagesObj)}\n </Card>\n )\n}\n\nStages.propTypes = {\n getPConnect: PropTypes.func.isRequired,\n stages: PropTypes.arrayOf(PropTypes.object).isRequired\n};\n"]}
1
+ {"version":3,"file":"Stages.js","sourceRoot":"","sources":["../../../../src/components/infra/Stages/Stages.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,eAAe,MAAM,gCAAgC,CAAC;AAC7D,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,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,IAAI,QAAQ,CAAC;QACb,IAAI,KAAK,CAAC,OAAO,EAAE;YACjB,QAAQ,GAAG,OAAO,CAAC,YAAY,CAAC;SACjC;aAAM,IAAI,KAAK,CAAC,QAAQ,EAAE;YACzB,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC;SACnC;aAAM;YACL,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC;SAChC;QAED,OAAO,8BAAM,GAAG,EAAE,KAAK;YAClB,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,oBAAC,QAAQ,IAAC,KAAK,EAAC,UAAU,EAAC,QAAQ,EAAC,OAAO,GAAG,CAAC,CAAC,CAAC,IAAI;YACvE,oBAAC,UAAU,IAAC,OAAO,EAAC,IAAI,EAAC,SAAS,EAAC,MAAM,EAAC,OAAO,EAAC,QAAQ,EAAC,SAAS,EAAE,QAAQ,IAAG,KAAK,CAAC,IAAI,CAAc,CACpG,CAAC;IACZ,CAAC;IAED,SAAS,SAAS,CAAC,QAAQ;QACzB,OAAO,oBAAC,WAAW,kBAAY,QAAQ,EAAC,SAAS,EAAE,oBAAC,eAAe,IAAC,SAAS,EAAE,OAAO,CAAC,aAAa,GAAI,IACrG,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;YAC7B,OAAO,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAChC,CAAC,CAAC,CACU,CAAA;IAChB,CAAC;IAED,OAAO,CACL,oBAAC,IAAI,IAAC,EAAE,EAAC,QAAQ,EAAC,SAAS,EAAE,OAAO,CAAC,IAAI,IAItC,SAAS,CAAC,SAAS,CAAC,CAChB,CACR,CAAA;AACH,CAAC","sourcesContent":["import React from \"react\";\nimport { Breadcrumbs, Card, Typography } from \"@material-ui/core\";\nimport DoubleArrowIcon from '@material-ui/icons/DoubleArrow';\nimport DoneIcon from '@material-ui/icons/Done';\nimport { makeStyles } from '@material-ui/core/styles';\nimport type { PConnProps } from '../../../types/PConnProps';\n\n\ninterface StagesProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n stages: Array<any>\n}\n\n\n// Remove this and use \"real\" PCore type once .d.ts is fixed (currently shows 1 error)\ndeclare const PCore: any;\n\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n paddingRight: theme.spacing(1),\n paddingLeft: theme.spacing(1),\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n marginRight: theme.spacing(1),\n marginLeft: theme.spacing(1),\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n },\n completedStage: {\n color: theme.palette.text.primary,\n },\n currentStage: {\n color: theme.palette.info.dark,\n fontWeight: 600,\n },\n futureStage: {\n color: theme.palette.text.secondary,\n },\n separatorIcon: {\n color: theme.palette.text.disabled,\n }\n\n}));\n\n\n/**\n * API to filter out the alternate stages which are not in active and return all other stages\n * @param {Array} stages - Stages of a case type\n *\n * @returns {Array} - Returns stages which are non alternate stages and alternate stage which is active.\n */\nfunction getFilteredStages(stages) {\n if (!Array.isArray(stages)) {\n return [];\n }\n\n return stages.filter(\n (stage) =>\n stage.type !== \"Alternate\" ||\n (stage.type === \"Alternate\" && stage.visited_status === \"active\")\n );\n}\n\n/* TODO - this component should be refactored and not exposed as top level DX Component -\n the stages should be created as part of the CaseView */\nexport default function Stages(props: StagesProps) {\n const classes = useStyles();\n\n const { getPConnect, stages } = props;\n const pConn = getPConnect();\n const key = `${pConn.getCaseInfo().getClassName()}!CASE!${pConn.getCaseInfo().getName()}`.toUpperCase();\n\n\n const filteredStages = getFilteredStages(stages);\n const currentStageID = pConn.getValue(PCore.getConstants().CASE_INFO.STAGEID, ''); // 2nd arg empty string until typedef allows optional\n const stagesObj = filteredStages.map((stage, index, arr) => {\n const theID = stage.ID || stage.id;\n return {\n name: PCore.getLocaleUtils().getLocaleValue(stage.name, null, key),\n id: theID,\n complete: stage.visited_status === \"completed\",\n current: (theID === currentStageID),\n last: (index === arr.length - 1),\n };\n });\n\n // debugging/investigation help\n // console.log(`Stages: current: ${currentStageID} stagesObj: ${JSON.stringify(stagesObj)}`);\n\n function getStage(stage, index) {\n // Removing nested ternary for lint\n // const theClass = stage.current ? classes.currentStage : (stage.complete ? classes.completedStage : classes.futureStage);\n let theClass;\n if (stage.current) {\n theClass = classes.currentStage;\n } else if (stage.complete) {\n theClass = classes.completedStage;\n } else {\n theClass = classes.futureStage;\n }\n\n return <span key={index}>\n {stage.complete ? <DoneIcon color=\"disabled\" fontSize=\"small\" /> : null}\n <Typography variant=\"h5\" component=\"span\" display=\"inline\" className={theClass}>{stage.name}</Typography>\n </span>;\n }\n\n function getStages(inStages) {\n return <Breadcrumbs aria-label=\"stages\" separator={<DoubleArrowIcon className={classes.separatorIcon} />}>\n {inStages.map((stage, index) => {\n return getStage(stage, index);\n })}\n </Breadcrumbs>\n }\n\n return (\n <Card id=\"Stages\" className={classes.root}>\n {/* Stages<br />\n currentStageID: {currentStageID}<br />\n {JSON.stringify(stagesObj)}<br /><br /> */}\n {getStages(stagesObj)}\n </Card>\n )\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"LeftAlignVerticalTabs.d.ts","sourceRoot":"","sources":["../../../../../src/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.tsx"],"names":[],"mappings":"AAeA,QAAA,MAAM,qBAAqB,EAAE,GAS2B,CAAC;AAEzD,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"LeftAlignVerticalTabs.d.ts","sourceRoot":"","sources":["../../../../../src/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.tsx"],"names":[],"mappings":"AAsBA,QAAA,MAAM,qBAAqB,EAAE,GASuD,CAAC;AAErF,eAAe,qBAAqB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"LeftAlignVerticalTabs.js","sourceRoot":"","sources":["../../../../../src/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,EACL,GAAG,EACH,OAAO,GACR,MAAM,mBAAmB,CAAC;AAE3B,uEAAuE;AACvE,qDAAqD;AAErD,0EAA0E;AAC1E,gIAAgI;AAEhI,8EAA8E;AAC9E,iEAAiE;AACjE,MAAM,qBAAqB,GAAQ,UAAU,CAAC,EAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IAC9D,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,MAAM;KACjB;IACD,OAAO,EAAE;QACP,OAAO,EAAE,OAAO;QAChB,SAAS,EAAE,MAAM;KAClB;CACF,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC;IAAK,oBAAC,GAAG,OAAK,KAAK,GAAI;IAAA,oBAAC,OAAO,OAAG,CAAM,CAAC,CAAC;AAEzD,eAAe,qBAAqB,CAAC","sourcesContent":["import React from \"react\";\nimport { withStyles } from '@material-ui/core/styles'\nimport {\n Tab,\n Divider,\n} from '@material-ui/core';\n\n// LeftAlignVerticalTab is a specialized Tab that has styles to make it\n// left aligned and full width of the container Tabs\n\n// Aligning the Tab labels left (with & .<class name> syntax) inspired by:\n// https://stackoverflow.com/questions/63307723/how-to-modify-the-wrapper-css-rule-of-a-tabs-component-to-make-the-text-aligned\n\n// In this styling, \"root\" is the top-level \"Tab\" object (which is the button)\n// and the button contains spans that will match on the '> span'\nconst LeftAlignVerticalTabs: any = withStyles((/* theme */) => ({\n root: {\n width: '100%',\n maxWidth: '100%',\n },\n wrapper: {\n display: 'block',\n textAlign: 'left',\n },\n}))((props) => <div><Tab {...props} /><Divider /></div>);\n\nexport default LeftAlignVerticalTabs;\n"]}
1
+ {"version":3,"file":"LeftAlignVerticalTabs.js","sourceRoot":"","sources":["../../../../../src/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,EACL,GAAG,EACH,OAAO,GACR,MAAM,mBAAmB,CAAC;AAS3B,uEAAuE;AACvE,qDAAqD;AAErD,0EAA0E;AAC1E,gIAAgI;AAEhI,8EAA8E;AAC9E,iEAAiE;AACjE,MAAM,qBAAqB,GAAQ,UAAU,CAAC,EAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IAC9D,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,MAAM;KACjB;IACD,OAAO,EAAE;QACP,OAAO,EAAE,OAAO;QAChB,SAAS,EAAE,MAAM;KAClB;CACF,CAAC,CAAC,CAAC,CAAC,KAAiC,EAAE,EAAE,CAAC;IAAK,oBAAC,GAAG,OAAK,KAAK,GAAI;IAAA,oBAAC,OAAO,OAAG,CAAM,CAAC,CAAC;AAErF,eAAe,qBAAqB,CAAC","sourcesContent":["import React from \"react\";\nimport { withStyles } from '@material-ui/core/styles'\nimport {\n Tab,\n Divider,\n} from '@material-ui/core';\n\n// LeftAlignVerticalTabs does NOT have getPConnect. So, no need to extend from PConnProps\n\ninterface LeftAlignVerticalTabsProps {\n // If any, enter additional props that only exist on this component\n}\n\n\n// LeftAlignVerticalTab is a specialized Tab that has styles to make it\n// left aligned and full width of the container Tabs\n\n// Aligning the Tab labels left (with & .<class name> syntax) inspired by:\n// https://stackoverflow.com/questions/63307723/how-to-modify-the-wrapper-css-rule-of-a-tabs-component-to-make-the-text-aligned\n\n// In this styling, \"root\" is the top-level \"Tab\" object (which is the button)\n// and the button contains spans that will match on the '> span'\nconst LeftAlignVerticalTabs: any = withStyles((/* theme */) => ({\n root: {\n width: '100%',\n maxWidth: '100%',\n },\n wrapper: {\n display: 'block',\n textAlign: 'left',\n },\n}))((props: LeftAlignVerticalTabsProps) => <div><Tab {...props} /><Divider /></div>);\n\nexport default LeftAlignVerticalTabs;\n"]}
@@ -1,13 +1,7 @@
1
1
  /// <reference types="react" />
2
- import PropTypes from "prop-types";
3
- declare function VerticalTabs(props: any): JSX.Element;
4
- declare namespace VerticalTabs {
5
- var defaultProps: {
6
- tabconfig: never[];
7
- };
8
- var propTypes: {
9
- tabconfig: PropTypes.Requireable<(object | null | undefined)[]>;
10
- };
2
+ interface VerticalTabsProps {
3
+ tabconfig: Array<any>;
11
4
  }
12
- export default VerticalTabs;
5
+ export default function VerticalTabs(props: VerticalTabsProps): JSX.Element;
6
+ export {};
13
7
  //# sourceMappingURL=VerticalTabs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"VerticalTabs.d.ts","sourceRoot":"","sources":["../../../../../src/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AAgCnC,iBAAwB,YAAY,CAAC,KAAK,KAAA,eAiCzC;kBAjCuB,YAAY;;;;;;;;eAAZ,YAAY"}
1
+ {"version":3,"file":"VerticalTabs.d.ts","sourceRoot":"","sources":["../../../../../src/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.tsx"],"names":[],"mappings":";AAOA,UAAU,iBAAiB;IAEzB,SAAS,EAAE,KAAK,CAAC,GAAG,CAAC,CAAA;CACtB;AA4BD,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,iBAAiB,eAoC5D"}
@@ -1,8 +1,7 @@
1
1
  import React, { useState, useEffect } from "react";
2
- import PropTypes from "prop-types";
3
2
  import { makeStyles } from '@material-ui/core/styles';
4
3
  import Tabs from '@material-ui/core/Tabs';
5
- import LeftAlignVerticalTab from '../LeftAlignVerticalTabs';
4
+ import { getComponentFromMap } from '../../../../bridge/helpers/sdk_component_map';
6
5
  // The MuiTabs-indicator class is in a span whose parent is div (under the Tabs root component)
7
6
  // So, we're going to make the selected vertical tab indicator use a color from our theme.
8
7
  const useStyles = makeStyles((theme) => ({
@@ -24,8 +23,10 @@ const createCustomEvent = (eventName, additionalData) => {
24
23
  return null;
25
24
  };
26
25
  export default function VerticalTabs(props) {
26
+ // Get emitted components from map (so we can get any override that may exist)
27
+ const LeftAlignVerticalTab = getComponentFromMap("LeftAlignVerticalTabs");
27
28
  // Get a React warning when we use tabConfig as mixed case. So all lowercase tabconfig
28
- const { tabconfig } = props;
29
+ const { tabconfig = [] } = props;
29
30
  const classes = useStyles();
30
31
  const [value, setValue] = useState(0);
31
32
  useEffect(() => {
@@ -41,10 +42,4 @@ export default function VerticalTabs(props) {
41
42
  return (React.createElement("div", { id: "VerticalTabs" },
42
43
  React.createElement(Tabs, { className: classes.tabs, orientation: "vertical", value: value, onChange: handleChange }, tabconfig.map((tab) => React.createElement(LeftAlignVerticalTab, { ...props, label: tab.name, key: tab.name })))));
43
44
  }
44
- VerticalTabs.defaultProps = {
45
- tabconfig: []
46
- };
47
- VerticalTabs.propTypes = {
48
- tabconfig: PropTypes.arrayOf(PropTypes.object)
49
- };
50
45
  //# sourceMappingURL=VerticalTabs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"VerticalTabs.js","sourceRoot":"","sources":["../../../../../src/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAErD,OAAO,IAAI,MAAM,wBAAwB,CAAC;AAC1C,OAAO,oBAAoB,MAAM,0BAA0B,CAAC;AAG5D,+FAA+F;AAC/F,2FAA2F;AAC3F,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CACpC;IACA,IAAI,EAAE;QACJ,cAAc,EAAE;YACd,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI;YACxC,KAAK,EAAE,KAAK;SACb;KACF;CACJ,CAAC,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,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI,GAAI,CAAC,CACvF,CACH,CACP,CAAA;AACH,CAAC;AAED,YAAY,CAAC,YAAY,GAAG;IAC1B,SAAS,EAAE,EAAE;CACd,CAAC;AAEF,YAAY,CAAC,SAAS,GAAG;IACvB,SAAS,EAAE,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC;CAC/C,CAAC","sourcesContent":["import React, { useState, useEffect } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { makeStyles } from '@material-ui/core/styles'\n\nimport Tabs from '@material-ui/core/Tabs';\nimport LeftAlignVerticalTab from '../LeftAlignVerticalTabs';\n\n\n// The MuiTabs-indicator class is in a span whose parent is div (under the Tabs root component)\n// So, we're going to make the selected vertical tab indicator use a color from our theme.\nconst useStyles = makeStyles((theme) => (\n {\n tabs: {\n '& div > span': {\n backgroundColor: theme.palette.info.dark,\n width: \"3px\"\n },\n },\n}));\n\n// Implementation of custom event inspired by:\n// https://betterprogramming.pub/master-your-react-skills-with-event-listeners-ebc01dde4fad\nconst createCustomEvent = (eventName: string, additionalData: {[key: string]: string}): CustomEvent | null => {\n if (window) {\n return new CustomEvent(eventName, {\n detail: { additionalData }\n });\n }\n\n return null;\n};\n\n\nexport default function VerticalTabs(props) {\n // Get a React warning when we use tabConfig as mixed case. So all lowercase tabconfig\n const { tabconfig } = props;\n const classes = useStyles();\n const [value, setValue] = useState(0);\n\n useEffect(() => {\n\n const eventData = {\"itemClicked\": value.toString()};\n const myEvent = createCustomEvent('VerticalTabClick', eventData);\n\n if (myEvent !== null) {\n document.dispatchEvent( myEvent );\n }\n\n }, [value]);\n\n const handleChange = (event: React.ChangeEvent<{}>, newValue: number) => {\n setValue(newValue);\n };\n\n return (\n <div id=\"VerticalTabs\">\n {/* VerticalTabs: {JSON.stringify(tabconfig)} */}\n <Tabs\n className={classes.tabs}\n orientation=\"vertical\"\n value={value}\n onChange={handleChange}>\n {tabconfig.map((tab) => <LeftAlignVerticalTab {...props} label={tab.name} key={tab.name} />)}\n </Tabs>\n </div>\n )\n}\n\nVerticalTabs.defaultProps = {\n tabconfig: []\n};\n\nVerticalTabs.propTypes = {\n tabconfig: PropTypes.arrayOf(PropTypes.object)\n};\n"]}
1
+ {"version":3,"file":"VerticalTabs.js","sourceRoot":"","sources":["../../../../../src/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAErD,OAAO,IAAI,MAAM,wBAAwB,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AASnF,+FAA+F;AAC/F,2FAA2F;AAC3F,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CACpC;IACA,IAAI,EAAE;QACJ,cAAc,EAAE;YACd,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI;YACxC,KAAK,EAAE,KAAK;SACb;KACF;CACJ,CAAC,CAAC,CAAC;AAEJ,8CAA8C;AAC9C,4FAA4F;AAC5F,MAAM,iBAAiB,GAAG,CAAC,SAAiB,EAAE,cAAuC,EAAsB,EAAE;IAC3G,IAAI,MAAM,EAAE;QACV,OAAO,IAAI,WAAW,CAAC,SAAS,EAAE;YAChC,MAAM,EAAE,EAAE,cAAc,EAAE;SAC3B,CAAC,CAAC;KACJ;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAGF,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAwB;IAC3D,8EAA8E;IAC9E,MAAM,oBAAoB,GAAG,mBAAmB,CAAC,uBAAuB,CAAC,CAAC;IAE1E,sFAAsF;IACtF,MAAM,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,KAAK,CAAC;IACjC,MAAM,OAAO,GAAG,SAAS,EAAE,CAAC;IAC5B,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAEtC,SAAS,CAAC,GAAG,EAAE;QAEb,MAAM,SAAS,GAAG,EAAC,aAAa,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAC,CAAC;QACpD,MAAM,OAAO,GAAG,iBAAiB,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC;QAEjE,IAAI,OAAO,KAAK,IAAI,EAAE;YACpB,QAAQ,CAAC,aAAa,CAAE,OAAO,CAAE,CAAC;SACnC;IAEH,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,MAAM,YAAY,GAAG,CAAC,KAA4B,EAAE,QAAgB,EAAE,EAAE;QACtE,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACrB,CAAC,CAAC;IAEF,OAAO,CACL,6BAAK,EAAE,EAAC,cAAc;QAEpB,oBAAC,IAAI,IACH,SAAS,EAAE,OAAO,CAAC,IAAI,EACvB,WAAW,EAAC,UAAU,EACtB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,YAAY,IACrB,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,oBAAC,oBAAoB,OAAK,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI,GAAI,CAAC,CACvF,CACH,CACP,CAAA;AACH,CAAC","sourcesContent":["import React, { useState, useEffect } from \"react\";\nimport { makeStyles } from '@material-ui/core/styles'\n\nimport Tabs from '@material-ui/core/Tabs';\nimport { getComponentFromMap } from '../../../../bridge/helpers/sdk_component_map';\n\n// VerticalTabs does NOT have getPConnect. So, no need to extend from PConnProps\ninterface VerticalTabsProps {\n // If any, enter additional props that only exist on this component\n tabconfig: Array<any>\n}\n\n\n// The MuiTabs-indicator class is in a span whose parent is div (under the Tabs root component)\n// So, we're going to make the selected vertical tab indicator use a color from our theme.\nconst useStyles = makeStyles((theme) => (\n {\n tabs: {\n '& div > span': {\n backgroundColor: theme.palette.info.dark,\n width: \"3px\"\n },\n },\n}));\n\n// Implementation of custom event inspired by:\n// https://betterprogramming.pub/master-your-react-skills-with-event-listeners-ebc01dde4fad\nconst createCustomEvent = (eventName: string, additionalData: {[key: string]: string}): CustomEvent | null => {\n if (window) {\n return new CustomEvent(eventName, {\n detail: { additionalData }\n });\n }\n\n return null;\n};\n\n\nexport default function VerticalTabs(props: VerticalTabsProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const LeftAlignVerticalTab = getComponentFromMap(\"LeftAlignVerticalTabs\");\n\n // Get a React warning when we use tabConfig as mixed case. So all lowercase tabconfig\n const { tabconfig = [] } = props;\n const classes = useStyles();\n const [value, setValue] = useState(0);\n\n useEffect(() => {\n\n const eventData = {\"itemClicked\": value.toString()};\n const myEvent = createCustomEvent('VerticalTabClick', eventData);\n\n if (myEvent !== null) {\n document.dispatchEvent( myEvent );\n }\n\n }, [value]);\n\n const handleChange = (event: React.ChangeEvent<{}>, newValue: number) => {\n setValue(newValue);\n };\n\n return (\n <div id=\"VerticalTabs\">\n {/* VerticalTabs: {JSON.stringify(tabconfig)} */}\n <Tabs\n className={classes.tabs}\n orientation=\"vertical\"\n value={value}\n onChange={handleChange}>\n {tabconfig.map((tab) => <LeftAlignVerticalTab {...props} label={tab.name} key={tab.name} />)}\n </Tabs>\n </div>\n )\n}\n"]}
@@ -1,22 +1,19 @@
1
1
  /// <reference types="react" />
2
- import PropTypes from 'prop-types';
3
2
  import './View.css';
4
- declare function View(props: any): "" | JSX.Element | null;
3
+ import type { PConnProps } from '../../../types/PConnProps';
4
+ interface ViewProps extends PConnProps {
5
+ children: Array<any>;
6
+ template?: string;
7
+ label?: string;
8
+ showLabel: boolean;
9
+ mode?: string;
10
+ title?: string;
11
+ visibility?: boolean;
12
+ name?: string;
13
+ bInForm?: boolean;
14
+ }
15
+ declare function View(props: ViewProps): JSX.Element | "" | null;
5
16
  declare namespace View {
6
- var defaultProps: {
7
- label: undefined;
8
- showLabel: undefined;
9
- mode: undefined;
10
- };
11
- var propTypes: {
12
- children: PropTypes.Requireable<any[]>;
13
- template: PropTypes.Requireable<string>;
14
- getPConnect: PropTypes.Validator<(...args: any[]) => any>;
15
- label: PropTypes.Requireable<string>;
16
- showLabel: PropTypes.Requireable<boolean>;
17
- mode: PropTypes.Requireable<string>;
18
- title: PropTypes.Requireable<string>;
19
- };
20
17
  var additionalProps: (state: any, getPConnect: any) => {};
21
18
  }
22
19
  export default View;
@@ -1 +1 @@
1
- {"version":3,"file":"View.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/View/View.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AAWnC,OAAO,YAAY,CAAC;AAmBpB,iBAAwB,IAAI,CAAC,KAAK,KAAA,2BA4GjC;kBA5GuB,IAAI;;;;;;;;;;;;;;;;;eAAJ,IAAI"}
1
+ {"version":3,"file":"View.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/View/View.tsx"],"names":[],"mappings":";AAUA,OAAO,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAG5D,UAAU,SAAU,SAAQ,UAAU;IAEpC,QAAQ,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAqBD,iBAAwB,IAAI,CAAC,KAAK,EAAE,SAAS,2BAkF5C;kBAlFuB,IAAI;;;eAAJ,IAAI"}
@@ -1,9 +1,7 @@
1
1
  import React from 'react';
2
- import PropTypes from 'prop-types';
3
2
  // import { FieldGroup } from "@pega/cosmos-react-core";
4
3
  // import { LazyMap as LazyComponentMap } from "../../components_map";
5
- import { SdkComponentMap } from '../../../bridge/helpers/sdk_component_map';
6
- import ErrorBoundary from '../ErrorBoundary';
4
+ import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
7
5
  import { getAllFields } from '../../helpers/template-utils';
8
6
  // Need to import any templates that we might render
9
7
  import './View.css';
@@ -25,10 +23,10 @@ const NO_HEADER_TEMPLATES = [
25
23
  ];
26
24
  export default function View(props) {
27
25
  const { children, template, getPConnect, mode, visibility, name: pageName } = props;
28
- let { label, showLabel = false } = props;
26
+ let { label = '', showLabel = false } = props;
29
27
  // Get the inherited props from the parent to determine label settings. For 8.6, this is only for embedded data form views
30
28
  // Putting this logic here instead of copy/paste in every Form template index.js
31
- const inheritedProps = getPConnect().getInheritedProps();
29
+ const inheritedProps = getPConnect().getInheritedProps(); // try to remove any when getInheritedProps typedefs are fixed
32
30
  label = inheritedProps.label || label;
33
31
  showLabel = inheritedProps.showLabel || showLabel;
34
32
  const isEmbeddedDataView = mode === 'editable'; // would be better to check the reference child for `context` attribute if possible
@@ -46,38 +44,11 @@ export default function View(props) {
46
44
  // JA - React SDK not using LazyComponentMap yet
47
45
  if (template /* && LazyComponentMap[template] */) {
48
46
  // const ViewTemplate = LazyComponentMap[template];
49
- let ViewTemplate;
50
- if (SdkComponentMap) {
51
- // This is the node_modules version of react_pconnect!
52
- const theLocalComponent = SdkComponentMap.getLocalComponentMap()[template];
53
- if (theLocalComponent !== undefined) {
54
- // eslint-disable-next-line no-console
55
- console.log(`View component found ${template}: Local`);
56
- ViewTemplate = theLocalComponent;
57
- }
58
- else {
59
- const thePegaProvidedComponent = SdkComponentMap.getPegaProvidedComponentMap()[template];
60
- if (thePegaProvidedComponent !== undefined) {
61
- // console.log(`View component found ${template}: Pega-provided`);
62
- ViewTemplate = thePegaProvidedComponent;
63
- }
64
- else {
65
- // eslint-disable-next-line no-console
66
- console.error(`View component can't find template type ${template}`);
67
- ViewTemplate = ErrorBoundary;
68
- }
69
- }
70
- if (template === 'ListView') {
71
- // special case for ListView - add in a prop
72
- const bInForm = true;
73
- props = { ...props, bInForm };
74
- }
75
- }
76
- else {
77
- // eslint-disable-next-line no-console
78
- console.warn(`View: SdkComponentMap expected but not found.`);
79
- // eslint-disable-next-line no-console
80
- console.error(`View: Trying to render an unknown template: ${template}`);
47
+ const ViewTemplate = getComponentFromMap(template);
48
+ if (template === 'ListView') {
49
+ // special case for ListView - add in a prop
50
+ const bInForm = true;
51
+ props = { ...props, bInForm };
81
52
  }
82
53
  // for debugging/investigation
83
54
  // console.log(`View rendering template: ${template}`);
@@ -105,23 +76,6 @@ export default function View(props) {
105
76
  }
106
77
  return null;
107
78
  }
108
- View.defaultProps = {
109
- label: undefined,
110
- showLabel: undefined,
111
- mode: undefined
112
- };
113
- View.propTypes = {
114
- children: PropTypes.oneOfType([
115
- PropTypes.arrayOf(PropTypes.node),
116
- PropTypes.array
117
- ]) /* array might be empty */,
118
- template: PropTypes.string /* .isRequired */,
119
- getPConnect: PropTypes.func.isRequired,
120
- label: PropTypes.string,
121
- showLabel: PropTypes.bool,
122
- mode: PropTypes.string,
123
- title: PropTypes.string
124
- };
125
79
  // Adapted from Constellation DX Component to add in additional props for some templates
126
80
  View.additionalProps = (state, getPConnect) => {
127
81
  const thePConn = getPConnect();
@@ -1 +1 @@
1
- {"version":3,"file":"View.js","sourceRoot":"","sources":["../../../../src/components/infra/View/View.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,wDAAwD;AACxD,sEAAsE;AAEtE,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAC5E,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC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QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,EAAE,QAAQ,EAAE,GAAG,QAAQ,CAAC,cAAc,EAAE,CAAC;IAE/C,IAAI,OAAO,GAAG,EAAE,CAAC;IACjB,IAAI,SAAS,GAAG,EAAE,CAAC;IAEnB,QAAQ,QAAQ,EAAE;QAChB,KAAK,aAAa;YAChB,SAAS,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;YACnC,gDAAgD;YAChD,MAAM,WAAW,GAAG;gBAClB,aAAa,EAAE,SAAS,CAAC,CAAC,CAAC;gBAC3B,eAAe,EAAE,SAAS,CAAC,CAAC,CAAC;aAC9B,CAAC;YACF,OAAO,GAAG,QAAQ,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC;YACnD,MAAM;QAER,KAAK,SAAS;YACZ,SAAS,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;YACnC,OAAO,GAAG,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;YACnC,MAAM;QAER;YACE,MAAM;KACT;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\n// import { FieldGroup } from \"@pega/cosmos-react-core\";\n// import { LazyMap as LazyComponentMap } from \"../../components_map\";\n\nimport { SdkComponentMap } from '../../../bridge/helpers/sdk_component_map';\nimport ErrorBoundary from '../ErrorBoundary';\n\nimport { getAllFields } from '../../helpers/template-utils';\n\n// Need to import any templates that we might render\n\nimport './View.css';\n//\n// WARNING: It is not expected that this file should be modified. It is part of infrastructure code that works with\n// Redux and creation/update of Redux containers and PConnect. Modifying this code could have undesireable results and\n// is totally at your own risk.\n//\n\nconst FORMTEMPLATES = ['OneColumn', 'TwoColumn', 'DefaultForm', 'WideNarrow', 'NarrowWide'];\nconst NO_HEADER_TEMPLATES = [\n 'SubTabs',\n 'SimpleTable',\n 'Details',\n 'DetailsTwoColumn',\n 'DetailsThreeColumn',\n 'NarrowWideDetails',\n 'WideNarrowDetails',\n 'Confirmation'\n];\n\nexport default function View(props) {\n const { children, template, getPConnect, mode, visibility, name: pageName } = props;\n let { label, showLabel = false } = props;\n\n // Get the inherited props from the parent to determine label settings. For 8.6, this is only for embedded data form views\n // Putting this logic here instead of copy/paste in every Form template index.js\n\n const inheritedProps = getPConnect().getInheritedProps();\n label = inheritedProps.label || label;\n showLabel = inheritedProps.showLabel || showLabel;\n\n const isEmbeddedDataView = mode === 'editable'; // would be better to check the reference child for `context` attribute if possible\n if (isEmbeddedDataView && showLabel === undefined) {\n showLabel = true;\n }\n\n const key = `${getPConnect().getContextName()}_${getPConnect().getPageReference()}_${pageName}`;\n // As long as the template is defined in the dependencies of the view\n // it will be loaded, otherwise fall back to single column\n if (visibility === false) {\n return '';\n }\n\n // As long as the template is defined in the dependencies of the view\n // it will be loaded, otherwise fall back to single column\n // JA - React SDK not using LazyComponentMap yet\n if (template /* && LazyComponentMap[template] */) {\n // const ViewTemplate = LazyComponentMap[template];\n let ViewTemplate: any;\n\n if (SdkComponentMap) {\n // This is the node_modules version of react_pconnect!\n const theLocalComponent = SdkComponentMap.getLocalComponentMap()[template];\n if (theLocalComponent !== undefined) {\n // eslint-disable-next-line no-console\n console.log(`View component found ${template}: Local`);\n ViewTemplate = theLocalComponent;\n } else {\n const thePegaProvidedComponent = SdkComponentMap.getPegaProvidedComponentMap()[template];\n if (thePegaProvidedComponent !== undefined) {\n // console.log(`View component found ${template}: Pega-provided`);\n ViewTemplate = thePegaProvidedComponent;\n } else {\n // eslint-disable-next-line no-console\n console.error(`View component can't find template type ${template}`);\n ViewTemplate = ErrorBoundary;\n }\n }\n\n if (template === 'ListView') {\n // special case for ListView - add in a prop\n const bInForm = true;\n props = { ...props, bInForm };\n }\n } else {\n // eslint-disable-next-line no-console\n console.warn(`View: SdkComponentMap expected but not found.`);\n\n // eslint-disable-next-line no-console\n console.error(`View: Trying to render an unknown template: ${template}`);\n }\n\n // for debugging/investigation\n // console.log(`View rendering template: ${template}`);\n\n // spreading because all props should go to the template\n let RenderedTemplate = <ViewTemplate key={key} {...props}>{children}</ViewTemplate>;\n\n if (FORMTEMPLATES.includes(template) && showLabel) {\n // Original:\n // RenderedTemplate = (\n // <FieldGroup name={label} style={{ marginBlockStart: \"1rem\" }}>\n // {RenderedTemplate}\n // </FieldGroup>\n // );\n RenderedTemplate = (\n <div\n data-name='RenderedTemplate'\n data-template-type={template}\n /* name */ id='label'\n style={{ marginBlockStart: '1rem' }}\n className='grid-column'\n >\n {RenderedTemplate}\n </div>\n );\n }\n\n return (\n <div className='grid-column'>\n {showLabel && !NO_HEADER_TEMPLATES.includes(template) && (\n <div className='template-title-container'>\n <span>{label}</span>\n </div>\n )}\n {RenderedTemplate}\n </div>\n );\n }\n\n // debugging/investigation help\n // console.log(`View about to render React.Fragment for children: ${children}`);\n\n if (children) {\n return <>{children}</>;\n }\n\n return null;\n}\n\nView.defaultProps = {\n label: undefined,\n showLabel: undefined,\n mode: undefined\n};\n\nView.propTypes = {\n children: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.array\n ]) /* array might be empty */,\n template: PropTypes.string /* .isRequired */,\n getPConnect: PropTypes.func.isRequired,\n label: PropTypes.string,\n showLabel: PropTypes.bool,\n mode: PropTypes.string,\n title: PropTypes.string\n};\n\n// Adapted from Constellation DX Component to add in additional props for some templates\nView.additionalProps = (state, getPConnect) => {\n const thePConn = getPConnect();\n const { template } = thePConn.getConfigProps();\n\n let propObj = {};\n let allFields = {};\n\n switch (template) {\n case 'CaseSummary':\n allFields = getAllFields(thePConn);\n // eslint-disable-next-line no-case-declarations\n const unresFields = {\n primaryFields: allFields[0],\n secondaryFields: allFields[1]\n };\n propObj = thePConn.resolveConfigProps(unresFields);\n break;\n\n case 'Details':\n allFields = getAllFields(thePConn);\n propObj = { fields: allFields[0] };\n break;\n\n default:\n break;\n }\n\n return propObj;\n};\n"]}
1
+ {"version":3,"file":"View.js","sourceRoot":"","sources":["../../../../src/components/inf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IAAI,QAAQ,EAAE;QACZ,OAAO,0CAAG,QAAQ,CAAI,CAAC;KACxB;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAGD,wFAAwF;AACxF,IAAI,CAAC,eAAe,GAAG,CAAC,KAAK,EAAE,WAAW,EAAE,EAAE;IAC5C,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,EAAE,QAAQ,EAAE,GAAG,QAAQ,CAAC,cAAc,EAAE,CAAC;IAE/C,IAAI,OAAO,GAAG,EAAE,CAAC;IACjB,IAAI,SAAS,GAAG,EAAE,CAAC;IAEnB,QAAQ,QAAQ,EAAE;QAChB,KAAK,aAAa;YAChB,SAAS,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;YACnC,gDAAgD;YAChD,MAAM,WAAW,GAAG;gBAClB,aAAa,EAAE,SAAS,CAAC,CAAC,CAAC;gBAC3B,eAAe,EAAE,SAAS,CAAC,CAAC,CAAC;aAC9B,CAAC;YACF,OAAO,GAAG,QAAQ,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC;YACnD,MAAM;QAER,KAAK,SAAS;YACZ,SAAS,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;YACnC,OAAO,GAAG,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;YACnC,MAAM;QAER;YACE,MAAM;KACT;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC","sourcesContent":["import React from 'react';\n// import { FieldGroup } from \"@pega/cosmos-react-core\";\n// import { LazyMap as LazyComponentMap } from \"../../components_map\";\n\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\n\nimport { getAllFields } from '../../helpers/template-utils';\n\n// Need to import any templates that we might render\n\nimport './View.css';\n\nimport type { PConnProps } from '../../../types/PConnProps';\n\n\ninterface ViewProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n children: Array<any>,\n template?: string,\n label?: string,\n showLabel: boolean,\n mode?: string,\n title?: string,\n visibility?: boolean,\n name?: string,\n bInForm?: boolean\n}\n\n\n//\n// WARNING: It is not expected that this file should be modified. It is part of infrastructure code that works with\n// Redux and creation/update of Redux containers and PConnect. Modifying this code could have undesireable results and\n// is totally at your own risk.\n//\n\nconst FORMTEMPLATES = ['OneColumn', 'TwoColumn', 'DefaultForm', 'WideNarrow', 'NarrowWide'];\nconst NO_HEADER_TEMPLATES = [\n 'SubTabs',\n 'SimpleTable',\n 'Details',\n 'DetailsTwoColumn',\n 'DetailsThreeColumn',\n 'NarrowWideDetails',\n 'WideNarrowDetails',\n 'Confirmation'\n];\n\nexport default function View(props: ViewProps) {\n const { children, template, getPConnect, mode, visibility, name: pageName } = props;\n let { label = '', showLabel = false } = props;\n\n // Get the inherited props from the parent to determine label settings. For 8.6, this is only for embedded data form views\n // Putting this logic here instead of copy/paste in every Form template index.js\n\n const inheritedProps: any = getPConnect().getInheritedProps(); // try to remove any when getInheritedProps typedefs are fixed\n label = inheritedProps.label || label;\n showLabel = inheritedProps.showLabel || showLabel;\n\n const isEmbeddedDataView = mode === 'editable'; // would be better to check the reference child for `context` attribute if possible\n if (isEmbeddedDataView && showLabel === undefined) {\n showLabel = true;\n }\n\n const key = `${getPConnect().getContextName()}_${getPConnect().getPageReference()}_${pageName}`;\n // As long as the template is defined in the dependencies of the view\n // it will be loaded, otherwise fall back to single column\n if (visibility === false) {\n return '';\n }\n\n // As long as the template is defined in the dependencies of the view\n // it will be loaded, otherwise fall back to single column\n // JA - React SDK not using LazyComponentMap yet\n if (template /* && LazyComponentMap[template] */) {\n // const ViewTemplate = LazyComponentMap[template];\n const ViewTemplate: any = getComponentFromMap(template);\n\n if (template === 'ListView') {\n // special case for ListView - add in a prop\n const bInForm = true;\n props = { ...props, bInForm };\n }\n\n // for debugging/investigation\n // console.log(`View rendering template: ${template}`);\n\n // spreading because all props should go to the template\n let RenderedTemplate = <ViewTemplate key={key} {...props}>{children}</ViewTemplate>;\n\n if (FORMTEMPLATES.includes(template) && showLabel) {\n // Original:\n // RenderedTemplate = (\n // <FieldGroup name={label} style={{ marginBlockStart: \"1rem\" }}>\n // {RenderedTemplate}\n // </FieldGroup>\n // );\n RenderedTemplate = (\n <div\n data-name='RenderedTemplate'\n data-template-type={template}\n /* name */ id='label'\n style={{ marginBlockStart: '1rem' }}\n className='grid-column'\n >\n {RenderedTemplate}\n </div>\n );\n }\n\n return (\n <div className='grid-column'>\n {showLabel && !NO_HEADER_TEMPLATES.includes(template) && (\n <div className='template-title-container'>\n <span>{label}</span>\n </div>\n )}\n {RenderedTemplate}\n </div>\n );\n }\n\n // debugging/investigation help\n // console.log(`View about to render React.Fragment for children: ${children}`);\n\n if (children) {\n return <>{children}</>;\n }\n\n return null;\n}\n\n\n// Adapted from Constellation DX Component to add in additional props for some templates\nView.additionalProps = (state, getPConnect) => {\n const thePConn = getPConnect();\n const { template } = thePConn.getConfigProps();\n\n let propObj = {};\n let allFields = {};\n\n switch (template) {\n case 'CaseSummary':\n allFields = getAllFields(thePConn);\n // eslint-disable-next-line no-case-declarations\n const unresFields = {\n primaryFields: allFields[0],\n secondaryFields: allFields[1]\n };\n propObj = thePConn.resolveConfigProps(unresFields);\n break;\n\n case 'Details':\n allFields = getAllFields(thePConn);\n propObj = { fields: allFields[0] };\n break;\n\n default:\n break;\n }\n\n return propObj;\n};\n"]}
@@ -1,20 +1,25 @@
1
1
  /// <reference types="react" />
2
- import PropTypes from 'prop-types';
3
2
  import './AppShell.css';
4
- declare function AppShell(props: any): JSX.Element;
5
- declare namespace AppShell {
6
- var defaultProps: {
7
- pages: never[];
8
- caseTypes: never[];
9
- children: never[];
10
- };
11
- var propTypes: {
12
- showAppName: PropTypes.Requireable<boolean>;
13
- pages: PropTypes.Requireable<(object | null | undefined)[]>;
14
- caseTypes: PropTypes.Requireable<(object | null | undefined)[]>;
15
- children: PropTypes.Requireable<PropTypes.ReactNodeLike[]>;
16
- getPConnect: PropTypes.Validator<(...args: any[]) => any>;
3
+ import type { PConnProps } from '../../../types/PConnProps';
4
+ interface AppShellProps extends PConnProps {
5
+ showAppName: boolean;
6
+ pages: Array<{
7
+ pxPageViewIcon: string;
8
+ pyClassName: string;
9
+ pyLabel: string;
10
+ pyRuleName: string;
11
+ pyURLContent: string;
12
+ }>;
13
+ caseTypes?: Array<object>;
14
+ children?: Array<any>;
15
+ portalTemplate: string;
16
+ portalName: string;
17
+ portalLogo: string;
18
+ navDisplayOptions: {
19
+ alignment: string;
20
+ position: string;
17
21
  };
18
22
  }
19
- export default AppShell;
23
+ export default function AppShell(props: AppShellProps): JSX.Element;
24
+ export {};
20
25
  //# sourceMappingURL=AppShell.d.ts.map