@pega/react-sdk-components 8.23.10 → 23.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (558) 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 +18 -16
  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.map +1 -1
  72. package/lib/components/field/Checkbox/Checkbox.js +38 -10
  73. package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
  74. package/lib/components/field/Currency/Currency.d.ts +6 -1
  75. package/lib/components/field/Currency/Currency.d.ts.map +1 -1
  76. package/lib/components/field/Currency/Currency.js +12 -12
  77. package/lib/components/field/Currency/Currency.js.map +1 -1
  78. package/lib/components/field/Currency/currency-utils.d.ts +1 -1
  79. package/lib/components/field/Currency/currency-utils.d.ts.map +1 -1
  80. package/lib/components/field/Currency/currency-utils.js +1 -1
  81. package/lib/components/field/Currency/currency-utils.js.map +1 -1
  82. package/lib/components/field/Date/Date.d.ts +5 -1
  83. package/lib/components/field/Date/Date.d.ts.map +1 -1
  84. package/lib/components/field/Date/Date.js +20 -12
  85. package/lib/components/field/Date/Date.js.map +1 -1
  86. package/lib/components/field/DateTime/DateTime.d.ts +5 -1
  87. package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
  88. package/lib/components/field/DateTime/DateTime.js +16 -10
  89. package/lib/components/field/DateTime/DateTime.js.map +1 -1
  90. package/lib/components/field/Decimal/Decimal.d.ts +8 -1
  91. package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
  92. package/lib/components/field/Decimal/Decimal.js +43 -9
  93. package/lib/components/field/Decimal/Decimal.js.map +1 -1
  94. package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
  95. package/lib/components/field/Dropdown/Dropdown.js +39 -11
  96. package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
  97. package/lib/components/field/Email/Email.d.ts +5 -1
  98. package/lib/components/field/Email/Email.d.ts.map +1 -1
  99. package/lib/components/field/Email/Email.js +7 -5
  100. package/lib/components/field/Email/Email.js.map +1 -1
  101. package/lib/components/field/Integer/Integer.d.ts +5 -1
  102. package/lib/components/field/Integer/Integer.d.ts.map +1 -1
  103. package/lib/components/field/Integer/Integer.js +6 -4
  104. package/lib/components/field/Integer/Integer.js.map +1 -1
  105. package/lib/components/field/Percentage/Percentage.d.ts +5 -1
  106. package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
  107. package/lib/components/field/Percentage/Percentage.js +6 -4
  108. package/lib/components/field/Percentage/Percentage.js.map +1 -1
  109. package/lib/components/field/Phone/Phone.d.ts +5 -1
  110. package/lib/components/field/Phone/Phone.d.ts.map +1 -1
  111. package/lib/components/field/Phone/Phone.js +10 -7
  112. package/lib/components/field/Phone/Phone.js.map +1 -1
  113. package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
  114. package/lib/components/field/RadioButtons/RadioButtons.js +33 -13
  115. package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
  116. package/lib/components/field/RichText/RichText.d.ts +7 -0
  117. package/lib/components/field/RichText/RichText.d.ts.map +1 -0
  118. package/lib/components/field/RichText/RichText.js +53 -0
  119. package/lib/components/field/RichText/RichText.js.map +1 -0
  120. package/lib/components/field/RichText/index.d.ts +2 -0
  121. package/lib/components/field/RichText/index.d.ts.map +1 -0
  122. package/lib/components/field/RichText/index.js +2 -0
  123. package/lib/components/field/RichText/index.js.map +1 -0
  124. package/lib/components/field/ScalarList/ScalarList.d.ts +13 -0
  125. package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -0
  126. package/lib/components/field/ScalarList/ScalarList.js +34 -0
  127. package/lib/components/field/ScalarList/ScalarList.js.map +1 -0
  128. package/lib/components/field/ScalarList/index.d.ts +2 -0
  129. package/lib/components/field/ScalarList/index.d.ts.map +1 -0
  130. package/lib/components/field/ScalarList/index.js +2 -0
  131. package/lib/components/field/ScalarList/index.js.map +1 -0
  132. package/lib/components/field/SemanticLink/SemanticLink.d.ts +5 -9
  133. package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
  134. package/lib/components/field/SemanticLink/SemanticLink.js +10 -14
  135. package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
  136. package/lib/components/field/SemanticLink/utils.d.ts.map +1 -1
  137. package/lib/components/field/SemanticLink/utils.js.map +1 -1
  138. package/lib/components/field/TextArea/TextArea.d.ts +6 -1
  139. package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
  140. package/lib/components/field/TextArea/TextArea.js +5 -3
  141. package/lib/components/field/TextArea/TextArea.js.map +1 -1
  142. package/lib/components/field/TextContent/TextContent.d.ts +7 -1
  143. package/lib/components/field/TextContent/TextContent.d.ts.map +1 -1
  144. package/lib/components/field/TextContent/TextContent.js.map +1 -1
  145. package/lib/components/field/TextInput/TextInput.d.ts +6 -1
  146. package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
  147. package/lib/components/field/TextInput/TextInput.js +24 -5
  148. package/lib/components/field/TextInput/TextInput.js.map +1 -1
  149. package/lib/components/field/Time/Time.d.ts +5 -1
  150. package/lib/components/field/Time/Time.d.ts.map +1 -1
  151. package/lib/components/field/Time/Time.js +14 -8
  152. package/lib/components/field/Time/Time.js.map +1 -1
  153. package/lib/components/field/URL/URL.d.ts +5 -1
  154. package/lib/components/field/URL/URL.d.ts.map +1 -1
  155. package/lib/components/field/URL/URL.js +11 -5
  156. package/lib/components/field/URL/URL.js.map +1 -1
  157. package/lib/components/field/UserReference/UserReference.d.ts +19 -40
  158. package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
  159. package/lib/components/field/UserReference/UserReference.js +16 -45
  160. package/lib/components/field/UserReference/UserReference.js.map +1 -1
  161. package/lib/components/helpers/attachmentHelpers.d.ts +6 -6
  162. package/lib/components/helpers/attachmentHelpers.d.ts.map +1 -1
  163. package/lib/components/helpers/attachmentHelpers.js +2 -2
  164. package/lib/components/helpers/attachmentHelpers.js.map +1 -1
  165. package/lib/components/helpers/auth.d.ts +8 -6
  166. package/lib/components/helpers/auth.d.ts.map +1 -1
  167. package/lib/components/helpers/auth.js +642 -327
  168. package/lib/components/helpers/auth.js.map +1 -1
  169. package/lib/components/helpers/authManager.d.ts +20 -17
  170. package/lib/components/helpers/authManager.d.ts.map +1 -1
  171. package/lib/components/helpers/authManager.js +713 -438
  172. package/lib/components/helpers/authManager.js.map +1 -1
  173. package/lib/components/helpers/case-utils.d.ts +20 -0
  174. package/lib/components/helpers/case-utils.d.ts.map +1 -0
  175. package/lib/components/helpers/case-utils.js +82 -0
  176. package/lib/components/helpers/case-utils.js.map +1 -0
  177. package/lib/components/helpers/common-utils.d.ts +2 -0
  178. package/lib/components/helpers/common-utils.d.ts.map +1 -0
  179. package/lib/components/helpers/common-utils.js +5 -0
  180. package/lib/components/helpers/common-utils.js.map +1 -0
  181. package/lib/components/helpers/config_access.d.ts.map +1 -1
  182. package/lib/components/helpers/config_access.js +28 -98
  183. package/lib/components/helpers/config_access.js.map +1 -1
  184. package/lib/components/helpers/data_page.d.ts.map +1 -1
  185. package/lib/components/helpers/data_page.js.map +1 -1
  186. package/lib/components/helpers/date-format-utils.d.ts +1 -6
  187. package/lib/components/helpers/date-format-utils.d.ts.map +1 -1
  188. package/lib/components/helpers/date-format-utils.js +23 -14
  189. package/lib/components/helpers/date-format-utils.js.map +1 -1
  190. package/lib/components/helpers/event-utils.d.ts +1 -1
  191. package/lib/components/helpers/event-utils.d.ts.map +1 -1
  192. package/lib/components/helpers/event-utils.js.map +1 -1
  193. package/lib/components/helpers/field-group-utils.d.ts +15 -2
  194. package/lib/components/helpers/field-group-utils.d.ts.map +1 -1
  195. package/lib/components/helpers/field-group-utils.js +6 -10
  196. package/lib/components/helpers/field-group-utils.js.map +1 -1
  197. package/lib/components/helpers/formatters/Boolean.d.ts +3 -3
  198. package/lib/components/helpers/formatters/Boolean.d.ts.map +1 -1
  199. package/lib/components/helpers/formatters/Boolean.js.map +1 -1
  200. package/lib/components/helpers/formatters/Currency.d.ts +6 -6
  201. package/lib/components/helpers/formatters/Currency.d.ts.map +1 -1
  202. package/lib/components/helpers/formatters/Currency.js +6 -5
  203. package/lib/components/helpers/formatters/Currency.js.map +1 -1
  204. package/lib/components/helpers/formatters/CurrencyMap.d.ts +881 -1399
  205. package/lib/components/helpers/formatters/CurrencyMap.d.ts.map +1 -1
  206. package/lib/components/helpers/formatters/CurrencyMap.js.map +1 -1
  207. package/lib/components/helpers/formatters/Date.d.ts +4 -4
  208. package/lib/components/helpers/formatters/Date.d.ts.map +1 -1
  209. package/lib/components/helpers/formatters/Date.js +1 -1
  210. package/lib/components/helpers/formatters/Date.js.map +1 -1
  211. package/lib/components/helpers/formatters/common.d.ts +2 -2
  212. package/lib/components/helpers/formatters/common.d.ts.map +1 -1
  213. package/lib/components/helpers/formatters/common.js +4 -5
  214. package/lib/components/helpers/formatters/common.js.map +1 -1
  215. package/lib/components/helpers/formatters/index.d.ts +11 -11
  216. package/lib/components/helpers/formatters/index.d.ts.map +1 -1
  217. package/lib/components/helpers/formatters/index.js.map +1 -1
  218. package/lib/components/helpers/reactContextHelpers.d.ts +3 -2
  219. package/lib/components/helpers/reactContextHelpers.d.ts.map +1 -1
  220. package/lib/components/helpers/reactContextHelpers.js.map +1 -1
  221. package/lib/components/helpers/simpleTableHelpers.d.ts +5 -3
  222. package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
  223. package/lib/components/helpers/simpleTableHelpers.js +10 -5
  224. package/lib/components/helpers/simpleTableHelpers.js.map +1 -1
  225. package/lib/components/helpers/state-utils.d.ts +4 -0
  226. package/lib/components/helpers/state-utils.d.ts.map +1 -0
  227. package/lib/components/helpers/state-utils.js +36 -0
  228. package/lib/components/helpers/state-utils.js.map +1 -0
  229. package/lib/components/helpers/template-utils.d.ts +7 -3
  230. package/lib/components/helpers/template-utils.d.ts.map +1 -1
  231. package/lib/components/helpers/template-utils.js.map +1 -1
  232. package/lib/components/helpers/utils.d.ts +1 -1
  233. package/lib/components/helpers/utils.d.ts.map +1 -1
  234. package/lib/components/helpers/utils.js +9 -3
  235. package/lib/components/helpers/utils.js.map +1 -1
  236. package/lib/components/helpers/versionHelpers.d.ts.map +1 -1
  237. package/lib/components/helpers/versionHelpers.js.map +1 -1
  238. package/lib/components/infra/ActionButtons/ActionButtons.d.ts +6 -13
  239. package/lib/components/infra/ActionButtons/ActionButtons.d.ts.map +1 -1
  240. package/lib/components/infra/ActionButtons/ActionButtons.js +5 -15
  241. package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
  242. package/lib/components/infra/Assignment/Assignment.d.ts +1 -15
  243. package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
  244. package/lib/components/infra/Assignment/Assignment.js +47 -35
  245. package/lib/components/infra/Assignment/Assignment.js.map +1 -1
  246. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +8 -14
  247. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
  248. package/lib/components/infra/AssignmentCard/AssignmentCard.js +3 -16
  249. package/lib/components/infra/AssignmentCard/AssignmentCard.js.map +1 -1
  250. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +1 -21
  251. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
  252. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +53 -52
  253. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
  254. package/lib/components/infra/Containers/FlowContainer/helpers.d.ts +12 -12
  255. package/lib/components/infra/Containers/FlowContainer/helpers.d.ts.map +1 -1
  256. package/lib/components/infra/Containers/FlowContainer/helpers.js +17 -16
  257. package/lib/components/infra/Containers/FlowContainer/helpers.js.map +1 -1
  258. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +1 -17
  259. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
  260. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +20 -22
  261. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
  262. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +9 -22
  263. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
  264. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +13 -24
  265. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
  266. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +9 -19
  267. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
  268. package/lib/components/infra/DashboardFilter/DashboardFilter.js +2 -16
  269. package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
  270. package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -1
  271. package/lib/components/infra/DashboardFilter/filterUtils.js +1 -1
  272. package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
  273. package/lib/components/infra/DeferLoad/DeferLoad.d.ts +1 -14
  274. package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
  275. package/lib/components/infra/DeferLoad/DeferLoad.js +13 -15
  276. package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
  277. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +5 -12
  278. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
  279. package/lib/components/infra/ErrorBoundary/ErrorBoundary.js +10 -17
  280. package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
  281. package/lib/components/infra/MultiStep/MultiStep.d.ts +11 -17
  282. package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
  283. package/lib/components/infra/MultiStep/MultiStep.js +6 -20
  284. package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
  285. package/lib/components/infra/NavBar/NavBar.d.ts +8 -16
  286. package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
  287. package/lib/components/infra/NavBar/NavBar.js +9 -20
  288. package/lib/components/infra/NavBar/NavBar.js.map +1 -1
  289. package/lib/components/infra/Reference/Reference.d.ts +1 -18
  290. package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
  291. package/lib/components/infra/Reference/Reference.js +11 -16
  292. package/lib/components/infra/Reference/Reference.js.map +1 -1
  293. package/lib/components/infra/Region/Region.d.ts +4 -7
  294. package/lib/components/infra/Region/Region.d.ts.map +1 -1
  295. package/lib/components/infra/Region/Region.js +0 -4
  296. package/lib/components/infra/Region/Region.js.map +1 -1
  297. package/lib/components/infra/RootContainer/RootContainer.d.ts +1 -21
  298. package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
  299. package/lib/components/infra/RootContainer/RootContainer.js +16 -36
  300. package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
  301. package/lib/components/infra/Stages/Stages.d.ts +5 -8
  302. package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
  303. package/lib/components/infra/Stages/Stages.js +3 -7
  304. package/lib/components/infra/Stages/Stages.js.map +1 -1
  305. package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.d.ts.map +1 -1
  306. package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js.map +1 -1
  307. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts +4 -10
  308. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts.map +1 -1
  309. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +4 -9
  310. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
  311. package/lib/components/infra/View/View.d.ts +13 -16
  312. package/lib/components/infra/View/View.d.ts.map +1 -1
  313. package/lib/components/infra/View/View.js +10 -55
  314. package/lib/components/infra/View/View.js.map +1 -1
  315. package/lib/components/template/AppShell/AppShell.d.ts +20 -15
  316. package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
  317. package/lib/components/template/AppShell/AppShell.js +17 -29
  318. package/lib/components/template/AppShell/AppShell.js.map +1 -1
  319. package/lib/components/template/BannerPage/BannerPage.d.ts +11 -23
  320. package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
  321. package/lib/components/template/BannerPage/BannerPage.js +4 -22
  322. package/lib/components/template/BannerPage/BannerPage.js.map +1 -1
  323. package/lib/components/template/CaseSummary/CaseSummary.d.ts +5 -7
  324. package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
  325. package/lib/components/template/CaseSummary/CaseSummary.js +6 -6
  326. package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
  327. package/lib/components/template/CaseView/CaseView.d.ts +10 -22
  328. package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
  329. package/lib/components/template/CaseView/CaseView.js +41 -45
  330. package/lib/components/template/CaseView/CaseView.js.map +1 -1
  331. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +8 -13
  332. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
  333. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +9 -16
  334. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
  335. package/lib/components/template/Confirmation/Confirmation.d.ts +10 -16
  336. package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
  337. package/lib/components/template/Confirmation/Confirmation.js +12 -23
  338. package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
  339. package/lib/components/template/DataReference/DataReference.d.ts +15 -30
  340. package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
  341. package/lib/components/template/DataReference/DataReference.js +25 -48
  342. package/lib/components/template/DataReference/DataReference.js.map +1 -1
  343. package/lib/components/template/DefaultForm/DefaultForm.d.ts +1 -11
  344. package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
  345. package/lib/components/template/DefaultForm/DefaultForm.js +18 -15
  346. package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
  347. package/lib/components/template/DefaultForm/utils/index.d.ts +3 -0
  348. package/lib/components/template/DefaultForm/utils/index.d.ts.map +1 -0
  349. package/lib/components/template/DefaultForm/utils/index.js +27 -0
  350. package/lib/components/template/DefaultForm/utils/index.js.map +1 -0
  351. package/lib/components/template/Details/Details/Details.d.ts +1 -16
  352. package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
  353. package/lib/components/template/Details/Details/Details.js +10 -15
  354. package/lib/components/template/Details/Details/Details.js.map +1 -1
  355. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +7 -15
  356. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
  357. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js +1 -13
  358. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
  359. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +1 -16
  360. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
  361. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +14 -16
  362. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
  363. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +1 -16
  364. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
  365. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +14 -16
  366. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
  367. package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts +4 -0
  368. package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts.map +1 -0
  369. package/lib/components/template/Details/DynamicTabs/DynamicTabs.js +56 -0
  370. package/lib/components/template/Details/DynamicTabs/DynamicTabs.js.map +1 -0
  371. package/lib/components/template/Details/DynamicTabs/index.d.ts +2 -0
  372. package/lib/components/template/Details/DynamicTabs/index.d.ts.map +1 -0
  373. package/lib/components/template/Details/DynamicTabs/index.js +2 -0
  374. package/lib/components/template/Details/DynamicTabs/index.js.map +1 -0
  375. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +12 -19
  376. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
  377. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +7 -21
  378. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
  379. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +7 -7
  380. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
  381. package/lib/components/template/InlineDashboard/InlineDashboard.js +0 -5
  382. package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
  383. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +8 -15
  384. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
  385. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js +6 -15
  386. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js.map +1 -1
  387. package/lib/components/template/ListPage/ListPage.d.ts +5 -13
  388. package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
  389. package/lib/components/template/ListPage/ListPage.js +6 -10
  390. package/lib/components/template/ListPage/ListPage.js.map +1 -1
  391. package/lib/components/template/ListView/DefaultViewMeta.d.ts +1 -90
  392. package/lib/components/template/ListView/DefaultViewMeta.d.ts.map +1 -1
  393. package/lib/components/template/ListView/DefaultViewMeta.js.map +1 -1
  394. package/lib/components/template/ListView/ListView.d.ts +1 -9
  395. package/lib/components/template/ListView/ListView.d.ts.map +1 -1
  396. package/lib/components/template/ListView/ListView.js +177 -192
  397. package/lib/components/template/ListView/ListView.js.map +1 -1
  398. package/lib/components/template/ListView/hooks.d.ts.map +1 -1
  399. package/lib/components/template/ListView/hooks.js +0 -1
  400. package/lib/components/template/ListView/hooks.js.map +1 -1
  401. package/lib/components/template/ListView/utils.d.ts +72 -16
  402. package/lib/components/template/ListView/utils.d.ts.map +1 -1
  403. package/lib/components/template/ListView/utils.js +143 -3
  404. package/lib/components/template/ListView/utils.js.map +1 -1
  405. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +9 -13
  406. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
  407. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js +2 -13
  408. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -1
  409. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +10 -1
  410. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -1
  411. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js.map +1 -1
  412. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +1 -16
  413. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
  414. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +14 -16
  415. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
  416. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +5 -1
  417. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -1
  418. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js.map +1 -1
  419. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +7 -14
  420. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
  421. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js +4 -13
  422. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -1
  423. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +4 -7
  424. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
  425. package/lib/components/template/OneColumn/OneColumn/OneColumn.js +0 -5
  426. package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
  427. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +4 -8
  428. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
  429. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js +3 -6
  430. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -1
  431. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +4 -7
  432. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
  433. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js +0 -5
  434. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js.map +1 -1
  435. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +1 -15
  436. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
  437. package/lib/components/template/PromotedFilters/PromotedFilters.js +17 -13
  438. package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
  439. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
  440. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js +57 -5
  441. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
  442. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +18 -1
  443. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
  444. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +6 -6
  445. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
  446. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +1 -29
  447. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
  448. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js +22 -28
  449. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
  450. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +14 -26
  451. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
  452. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js +5 -26
  453. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
  454. package/lib/components/template/SubTabs/SubTabs.d.ts +4 -10
  455. package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
  456. package/lib/components/template/SubTabs/SubTabs.js +1 -8
  457. package/lib/components/template/SubTabs/SubTabs.js.map +1 -1
  458. package/lib/components/template/SubTabs/tabUtils.d.ts.map +1 -1
  459. package/lib/components/template/SubTabs/tabUtils.js.map +1 -1
  460. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts +5 -11
  461. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
  462. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +1 -12
  463. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
  464. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +4 -8
  465. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
  466. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js +3 -6
  467. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -1
  468. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +5 -11
  469. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
  470. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +1 -9
  471. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
  472. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +10 -1
  473. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
  474. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js +1 -1
  475. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js.map +1 -1
  476. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +1 -16
  477. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
  478. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +31 -23
  479. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
  480. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +5 -1
  481. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -1
  482. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js.map +1 -1
  483. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +7 -14
  484. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
  485. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js +4 -14
  486. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js.map +1 -1
  487. package/lib/components/template/WssNavBar/WssNavBar.d.ts +17 -1
  488. package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -1
  489. package/lib/components/template/WssNavBar/WssNavBar.js +2 -2
  490. package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
  491. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts +8 -17
  492. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
  493. package/lib/components/widget/AppAnnouncement/AppAnnouncement.js +4 -19
  494. package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
  495. package/lib/components/widget/Attachment/Attachment.css +15 -3
  496. package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
  497. package/lib/components/widget/Attachment/Attachment.js +44 -32
  498. package/lib/components/widget/Attachment/Attachment.js.map +1 -1
  499. package/lib/components/widget/CaseHistory/CaseHistory.d.ts +4 -7
  500. package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
  501. package/lib/components/widget/CaseHistory/CaseHistory.js +4 -8
  502. package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
  503. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +8 -1
  504. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts.map +1 -1
  505. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
  506. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +5 -1
  507. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
  508. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +33 -23
  509. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
  510. package/lib/components/widget/Followers/Followers.d.ts +4 -5
  511. package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
  512. package/lib/components/widget/Followers/Followers.js +3 -10
  513. package/lib/components/widget/Followers/Followers.js.map +1 -1
  514. package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
  515. package/lib/components/widget/QuickCreate/QuickCreate.js +12 -4
  516. package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
  517. package/lib/components/widget/SummaryItem/SummaryItem.d.ts +7 -1
  518. package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
  519. package/lib/components/widget/SummaryItem/SummaryItem.js +2 -2
  520. package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
  521. package/lib/components/widget/SummaryList/SummaryList.d.ts +7 -1
  522. package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
  523. package/lib/components/widget/SummaryList/SummaryList.js +5 -2
  524. package/lib/components/widget/SummaryList/SummaryList.js.map +1 -1
  525. package/lib/components/widget/ToDo/ToDo.d.ts +13 -27
  526. package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
  527. package/lib/components/widget/ToDo/ToDo.js +35 -67
  528. package/lib/components/widget/ToDo/ToDo.js.map +1 -1
  529. package/lib/components_map.d.ts +3 -3
  530. package/lib/components_map.d.ts.map +1 -1
  531. package/lib/components_map.js +819 -818
  532. package/lib/components_map.js.map +1 -1
  533. package/lib/doc/KeyReleaseUpdates.md +66 -9
  534. package/lib/hooks/index.d.ts +4 -0
  535. package/lib/hooks/index.d.ts.map +1 -0
  536. package/lib/hooks/index.js +4 -0
  537. package/lib/hooks/index.js.map +1 -0
  538. package/lib/hooks/useAfterInitialEffect.d.ts +9 -0
  539. package/lib/hooks/useAfterInitialEffect.d.ts.map +1 -0
  540. package/lib/hooks/useAfterInitialEffect.js +16 -0
  541. package/lib/hooks/useAfterInitialEffect.js.map +1 -0
  542. package/lib/hooks/useConsolidatedRef.d.ts +9 -0
  543. package/lib/hooks/useConsolidatedRef.d.ts.map +1 -0
  544. package/lib/hooks/useConsolidatedRef.js +30 -0
  545. package/lib/hooks/useConsolidatedRef.js.map +1 -0
  546. package/lib/hooks/useUID.d.ts +8 -0
  547. package/lib/hooks/useUID.d.ts.map +1 -0
  548. package/lib/hooks/useUID.js +14 -0
  549. package/lib/hooks/useUID.js.map +1 -0
  550. package/lib/index.d.ts +1 -0
  551. package/lib/index.d.ts.map +1 -1
  552. package/lib/index.js +2 -1
  553. package/lib/index.js.map +1 -1
  554. package/lib/sdk-pega-component-map.d.ts +17 -1
  555. package/lib/sdk-pega-component-map.js +17 -1
  556. package/lib/sdk-pega-component-map.js.map +1 -1
  557. package/lib/types/PConnProps.d.ts +42 -0
  558. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"config_access.js","sourceRoot":"","sources":["../../../src/components/helpers/config_access.js"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,uBAAuB;AACvB,OAAO,EAAC,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B,sFAAsF;AACtF,kGAAkG;AAClG,+FAA+F;AAC/F,IAAI,eAAe,CAAC;AACpB,IAAI,+BAA+B,GAAG,KAAK,CAAC;AAG5C,MAAM,YAAY;IAEhB;QA6DA;;;WAGG;QACH;;;;mBAAe,KAAK,IAAI,EAAE;gBACxB,IAAG,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;oBACtC,MAAM,YAAY,EAAE,CAAC;iBACtB;gBACD,OAAO,IAAI,CAAC,SAAS,CAAC;YACxB,CAAC;WAAA;QAGD;;;WAGG;QACH;;;;mBAAmB,GAAG,EAAE;gBACtB,IAAG,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,SAA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;SACJ;aAAM;YACL,MAAM,gBAAgB,GAAG,GAAG,EAAE;gBAC5B,IAAI,eAAe,EAAG;oBACpB,IAAI,WAAW,EAAG;wBAChB,aAAa,CAAC,WAAW,CAAC,CAAC;qBAC5B;oBACD,OAAO,OAAO,CAAE,eAAe,CAAC,SAAS,CAAE,CAAC;iBAC7C;gBACD,WAAW,GAAG,WAAW,CAAC,gBAAgB,EAAE,GAAG,CAAC,CAAC;YACnD,CAAC,CAAC;YACF,IAAI,eAAe,EAAG;gBACpB,OAAO,OAAO,CAAE,eAAe,CAAC,SAAS,CAAE,CAAC;aAC7C;iBAAM;gBACL,WAAW,GAAG,WAAW,CAAC,gBAAgB,EAAE,GAAG,CAAC,CAAC;aAClD;SACF;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAED,IAAI,IAAI,EAAG;IACT,IAAI,MAAM,GAAG,YAAY,EAAE,CAAC;CAC7B;AAED,OAAO,EAAC,eAAe,EAAE,YAAY,EAAC,CAAC","sourcesContent":["// Helper singleton class to assist with loading and accessing\n// the SDK Config JSON\nimport {sdkGetAuthHeader} from './authManager';\nimport Utils from './utils';\n\n// Create a singleton for this class (with async loading of config file) and export it\n// Note: Initialzing SdkConfigAccess to null seems to cause lots of compile issues with references\n// within other components and the value potentially being null (so try to leave it undefined)\nlet SdkConfigAccess;\nlet SdkConfigAccessCreateInProgress = false;\n\n\nclass ConfigAccess {\n\n constructor() {\n // sdkConfig is the JSON object read from the sdk-config.json file\n this.sdkConfig = {};\n // isConfigLoaded will be updated to true after the async load is complete\n this.isConfigLoaded = false;\n\n // The \"work\" to load the config file is done (asynchronously) via the initialize\n // (Factory function) below)\n }\n\n /**\n * Asynchronous initialization of the config file contents.\n * @returns Promise of config file fetch\n */\n async readSdkConfig() {\n if(Utils.isEmptyObject(this.sdkConfig)) {\n return fetch(\"./sdk-config.json\")\n .then ( (response) => {\n if( response.ok ) {\n return response.json();\n } else {\n throw new Error(`Failed with status:${response.status}`);\n }\n })\n .then ( (data) => {\n this.sdkConfig = data;\n this.fixupConfigSettings();\n return Promise.resolve(this.sdkConfig);\n }).catch(err => {\n console.error(\"Fetch for sdk-config.js failed.\");\n console.error(err);\n return Promise.reject(err);\n });\n } else {\n return Promise.resolve(this.sdkConfig);\n }\n }\n\n // Adjust any settings like setting up defaults or making sure URIs have a trailing slash\n fixupConfigSettings() {\n const oServerConfig = this.sdkConfig[\"serverConfig\"];\n // If not present, then use current root path\n oServerConfig.sdkContentServerUrl = oServerConfig.sdkContentServerUrl || window.location.origin;\n // Needs a trailing slash so add one if not there\n if( !oServerConfig.sdkContentServerUrl.endsWith('/') ) {\n oServerConfig.sdkContentServerUrl = `${oServerConfig.sdkContentServerUrl}/`;\n }\n console.log(`Using sdkContentServerUrl: ${this.sdkConfig[\"serverConfig\"].sdkContentServerUrl}`);\n\n // Don't want a trailing slash for infinityRestServerUrl\n if( oServerConfig.infinityRestServerUrl.endsWith('/') ) {\n oServerConfig.infinityRestServerUrl = oServerConfig.infinityRestServerUrl.slice(0, -1)\n }\n\n // Specify our own internal list of well known portals to exclude (if one not specified)\n if( !oServerConfig.excludePortals ) {\n oServerConfig.excludePortals = [\"pxExpress\", \"Developer\", \"pxPredictionStudio\", \"pxAdminStudio\", \"pyCaseWorker\", \"pyCaseManager7\"];\n console.warn(`No exludePortals entry found within serverConfig section of sdk-config.json. Using the following default list: [\"pxExpress\", \"Developer\", \"pxPredictionStudio\", \"pxAdminStudio\", \"pyCaseWorker\", \"pyCaseManager7\"]`);\n }\n }\n\n /**\n *\n * @returns the sdk-config JSON object\n */\n getSdkConfig = async () => {\n if(Utils.isEmptyObject(this.sdkConfig)) {\n await getSdkConfig();\n }\n return this.sdkConfig;\n }\n\n\n /**\n *\n * @returns the authConfig block in the SDK Config object\n */\n getSdkConfigAuth = () => {\n if(Utils.isEmptyObject(this.sdkConfig)) {\n const config = this.getSdkConfig();\n }\n return this.sdkConfig[\"authConfig\"];\n }\n\n /**\n *\n * @returns the serverConfig bloc from the sdk-config.json file\n */\n getSdkConfigServer = () => {\n if(Utils.isEmptyObject(this.sdkConfig)) {\n const config = this.getSdkConfig();\n }\n return this.sdkConfig[\"serverConfig\"];\n }\n\n\n /**\n * @param {String} key the key to be inserted/updated in serverConfig\n * @param {String} value the value to be assigned to the given key\n */\n setSdkConfigServer = (key, value) => {\n\n this.sdkConfig.serverConfig[key] = value;\n\n }\n\n /**\n * If this.sdkConfig.serverConfig.appPortal is set, leave it and the specified portal will be used.\n * If not set, set this.sdkConfig.serverConfig.appPortal to default portal of currently logged in user\n */\n async selectPortal() {\n\n if(Utils.isEmptyObject(this.sdkConfig)) {\n await getSdkConfig();\n }\n\n const serverConfig = this.sdkConfig.serverConfig;\n\n if ((serverConfig.appPortal !== \"\") &&\n (serverConfig.appPortal !== undefined) ) {\n // use the specified portal\n console.log(`Using appPortal: ${serverConfig.appPortal}`);\n return;\n }\n\n const userAccessGroup = PCore.getEnvironmentInfo().getAccessGroup();\n const dataPageName = \"D_OperatorAccessGroups\";\n const serverUrl = serverConfig.infinityRestServerUrl;\n const appAlias = serverConfig.appAlias;\n const appAliasPath = appAlias ? `/app/${appAlias}` : '';\n const arExcludedPortals = serverConfig[\"excludePortals\"];\n\n // Using v1 API here as v2 data_views is not able to access same data page currently. Should move to avoid having this logic to find\n // a default portal or constellation portal and rather have Constellation JS Engine API just load the default portal\n await fetch ( `${serverUrl}${appAliasPath}/api/v1/data/${dataPageName}`,\n {\n method: 'GET',\n headers: {\n 'Content-Type' : 'application/json',\n 'Authorization' : sdkGetAuthHeader()\n }\n })\n .then( response => {\n if( response.ok && response.status === 200) {\n return response.json();\n } else {\n if( response.status === 401 ) {\n // Might be either a real token expiration or revoke, but more likely that the \"api\" service package is misconfigured\n throw( new Error(`Attempt to access ${dataPageName} failed. The \"api\" service package is likely not configured to use \"OAuth 2.0\"`));\n };\n throw( new Error(`HTTP Error: ${response.status}`));\n }\n })\n .then( async (agData) => {\n\n let arAccessGroups = agData.pxResults;\n let selectedPortal = null;\n\n for (let ag of arAccessGroups) {\n if (ag.pyAccessGroup === userAccessGroup) {\n // Check if default portal works\n if( !arExcludedPortals.includes(ag.pyPortal) ) {\n selectedPortal = ag.pyPortal;\n } else {\n console.error(`Default portal for current operator (${ag.pyPortal}) is not compatible with SDK.\\nConsider using a different operator, adjusting the default portal for this operator, or using \"appPortal\" setting within sdk-config.json to specify a specific portal to load.`);\n // Find first portal that is not excluded (might work)\n for (let portal of ag.pyUserPortals ) {\n if( !arExcludedPortals.includes(portal.pyPortalLayout) ) {\n selectedPortal = portal.pyPortalLayout;\n break;\n }\n }\n }\n break;\n }\n }\n if( selectedPortal ) {\n // Found operator's current access group. Use its portal\n this.setSdkConfigServer(\"appPortal\", selectedPortal);\n console.log(`Using non-excluded portal: ${serverConfig.appPortal}`);\n }\n })\n .catch( e => {\n console.error(e.message);\n // check specific error if 401, and wiped out if so stored token is stale. Fetch new tokens.\n });\n\n }\n\n /**\n * Path to the BootstrapCSS\n * @returns the locBootstrapCSS from the serverConfig block of the sdk-config.json file\n */\n getSdkConfigBootstrapCSS = () => {\n const serverConfig = this.getSdkConfigServer();\n const locBootstrapCSS = serverConfig.locBootstrapCSS;\n if (locBootstrapCSS === undefined) {\n console.error(`locBootstrapCSS: ${locBootstrapCSS}`);\n }\n return locBootstrapCSS;\n }\n\n}\n\n\n// Implement Factory function to allow async load\n// See https://stackoverflow.com/questions/49905178/asynchronous-operations-in-constructor/49906064#49906064 for inspiration\nasync function createSdkConfigAccess() {\n // Note that our initialize function returns a promise...\n let singleton = new ConfigAccess();\n await singleton.readSdkConfig();\n return singleton;\n};\n\n// Initialize exported SdkConfigAccess structure\nasync function getSdkConfig() {\n return new Promise( (resolve) => {\n let idNextCheck = null;\n if( !SdkConfigAccess && !SdkConfigAccessCreateInProgress ) {\n SdkConfigAccessCreateInProgress = true;\n createSdkConfigAccess().then( theConfigAccess => {\n // Key initialization of SdkConfigAccess\n SdkConfigAccess = theConfigAccess;\n SdkConfigAccessCreateInProgress = false;\n // console.log(`SdkConfigAccess: ${JSON.stringify(SdkConfigAccess)}`);\n // Create and dispatch the SdkConfigAccessReady event\n const event = new CustomEvent(\"SdkConfigAccessReady\", { });\n document.dispatchEvent(event);\n return resolve( SdkConfigAccess.sdkConfig );\n });\n } else {\n const fnCheckForConfig = () => {\n if( SdkConfigAccess ) {\n if( idNextCheck ) {\n clearInterval(idNextCheck);\n }\n return resolve( SdkConfigAccess.sdkConfig );\n }\n idNextCheck = setInterval(fnCheckForConfig, 500);\n };\n if( SdkConfigAccess ) {\n return resolve( SdkConfigAccess.sdkConfig );\n } else {\n idNextCheck = setInterval(fnCheckForConfig, 500);\n }\n }\n });\n}\n\nif( true ) {\n let ignore = getSdkConfig();\n}\n\nexport {SdkConfigAccess, getSdkConfig};\n"]}
1
+ {"version":3,"file":"config_access.js","sourceRoot":"","sources":["../../../src/components/helpers/config_access.js"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,uBAAuB;AACvB,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,sFAAsF;AACtF,kGAAkG;AAClG,+FAA+F;AAC/F,IAAI,eAAe,CAAC;AACpB,IAAI,+BAA+B,GAAG,KAAK,CAAC;AAE5C,MAAM,YAAY;IAChB;QAuEA;;;WAGG;QACH;;;;mBAAe,KAAK,IAAI,EAAE;gBACxB,IAAI,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;oBACjC,MAAM,YAAY,EAAE,CAAC;iBACtB;gBACD,OAAO,IAAI,CAAC,SAAS,CAAC;YACxB,CAAC;WAAC;QAEF;;;WAGG;QACH;;;;mBAAmB,GAAG,EAAE;gBACtB,IAAI,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;oBACjC,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;iBACpC;gBACD,OAAO,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;YACtC,CAAC;WAAC;QAEF;;;WAGG;QACH;;;;mBAAqB,GAAG,E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,IAAI,eAAe,EAAE;gBACnB,OAAO,OAAO,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;aAC3C;iBAAM;gBACL,WAAW,GAAG,WAAW,CAAC,gBAAgB,EAAE,GAAG,CAAC,CAAC;aAClD;SACF;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAED,IAAI,IAAI,EAAE;IACR,IAAI,MAAM,GAAG,YAAY,EAAE,CAAC;CAC7B;AAED,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,CAAC","sourcesContent":["// Helper singleton class to assist with loading and accessing\n// the SDK Config JSON\nimport { isEmptyObject } from './common-utils';\n\n// Create a singleton for this class (with async loading of config file) and export it\n// Note: Initialzing SdkConfigAccess to null seems to cause lots of compile issues with references\n// within other components and the value potentially being null (so try to leave it undefined)\nlet SdkConfigAccess;\nlet SdkConfigAccessCreateInProgress = false;\n\nclass ConfigAccess {\n constructor() {\n // sdkConfig is the JSON object read from the sdk-config.json file\n this.sdkConfig = {};\n // isConfigLoaded will be updated to true after the async load is complete\n this.isConfigLoaded = false;\n\n // The \"work\" to load the config file is done (asynchronously) via the initialize\n // (Factory function) below)\n }\n\n /**\n * Asynchronous initialization of the config file contents.\n * @returns Promise of config file fetch\n */\n async readSdkConfig() {\n if (isEmptyObject(this.sdkConfig)) {\n return fetch('./sdk-config.json')\n .then(response => {\n if (response.ok) {\n return response.json();\n } else {\n throw new Error(`Failed with status:${response.status}`);\n }\n })\n .then(data => {\n this.sdkConfig = data;\n this.fixupConfigSettings();\n return Promise.resolve(this.sdkConfig);\n })\n .catch(err => {\n console.error('Fetch for sdk-config.js failed.');\n console.error(err);\n return Promise.reject(err);\n });\n } else {\n return Promise.resolve(this.sdkConfig);\n }\n }\n\n // Adjust any settings like setting up defaults or making sure URIs have a trailing slash\n fixupConfigSettings() {\n const oServerConfig = this.sdkConfig['serverConfig'];\n // If not present, then use current root path\n oServerConfig.sdkContentServerUrl = oServerConfig.sdkContentServerUrl || window.location.origin;\n // Needs a trailing slash so add one if not there\n if (!oServerConfig.sdkContentServerUrl.endsWith('/')) {\n oServerConfig.sdkContentServerUrl = `${oServerConfig.sdkContentServerUrl}/`;\n }\n console.log(`Using sdkContentServerUrl: ${this.sdkConfig['serverConfig'].sdkContentServerUrl}`);\n\n // Don't want a trailing slash for infinityRestServerUrl\n if (oServerConfig.infinityRestServerUrl.endsWith('/')) {\n oServerConfig.infinityRestServerUrl = oServerConfig.infinityRestServerUrl.slice(0, -1);\n }\n\n // Specify our own internal list of well known portals to exclude (if one not specified)\n if (!oServerConfig.excludePortals) {\n oServerConfig.excludePortals = [\n 'pxExpress',\n 'Developer',\n 'pxPredictionStudio',\n 'pxAdminStudio',\n 'pyCaseWorker',\n 'pyCaseManager7'\n ];\n console.warn(\n `No exludePortals entry found within serverConfig section of sdk-config.json. Using the following default list: [\"pxExpress\", \"Developer\", \"pxPredictionStudio\", \"pxAdminStudio\", \"pyCaseWorker\", \"pyCaseManager7\"]`\n );\n }\n }\n\n /**\n *\n * @returns the sdk-config JSON object\n */\n getSdkConfig = async () => {\n if (isEmptyObject(this.sdkConfig)) {\n await getSdkConfig();\n }\n return this.sdkConfig;\n };\n\n /**\n *\n * @returns the authConfig block in the SDK Config object\n */\n getSdkConfigAuth = () => {\n if (isEmptyObject(this.sdkConfig)) {\n const config = this.getSdkConfig();\n }\n return this.sdkConfig['authConfig'];\n };\n\n /**\n *\n * @returns the serverConfig bloc from the sdk-config.json file\n */\n getSdkConfigServer = () => {\n if (isEmptyObject(this.sdkConfig)) {\n const config = this.getSdkConfig();\n }\n return this.sdkConfig['serverConfig'];\n };\n\n /**\n * @param {String} key the key to be inserted/updated in serverConfig\n * @param {String} value the value to be assigned to the given key\n */\n setSdkConfigServer = (key, value) => {\n this.sdkConfig.serverConfig[key] = value;\n };\n\n /**\n * Path to the BootstrapCSS\n * @returns the locBootstrapCSS from the serverConfig block of the sdk-config.json file\n */\n getSdkConfigBootstrapCSS = () => {\n const serverConfig = this.getSdkConfigServer();\n const locBootstrapCSS = serverConfig.locBootstrapCSS;\n if (locBootstrapCSS === undefined) {\n console.error(`locBootstrapCSS: ${locBootstrapCSS}`);\n }\n return locBootstrapCSS;\n };\n}\n\n// Implement Factory function to allow async load\n// See https://stackoverflow.com/questions/49905178/asynchronous-operations-in-constructor/49906064#49906064 for inspiration\nasync function createSdkConfigAccess() {\n // Note that our initialize function returns a promise...\n let singleton = new ConfigAccess();\n await singleton.readSdkConfig();\n return singleton;\n}\n\n// Initialize exported SdkConfigAccess structure\nasync function getSdkConfig() {\n return new Promise(resolve => {\n let idNextCheck = null;\n if (!SdkConfigAccess && !SdkConfigAccessCreateInProgress) {\n SdkConfigAccessCreateInProgress = true;\n createSdkConfigAccess().then(theConfigAccess => {\n // Key initialization of SdkConfigAccess\n SdkConfigAccess = theConfigAccess;\n SdkConfigAccessCreateInProgress = false;\n // console.log(`SdkConfigAccess: ${JSON.stringify(SdkConfigAccess)}`);\n // Create and dispatch the SdkConfigAccessReady event\n const event = new CustomEvent('SdkConfigAccessReady', {});\n document.dispatchEvent(event);\n return resolve(SdkConfigAccess.sdkConfig);\n });\n } else {\n const fnCheckForConfig = () => {\n if (SdkConfigAccess) {\n if (idNextCheck) {\n clearInterval(idNextCheck);\n }\n return resolve(SdkConfigAccess.sdkConfig);\n }\n idNextCheck = setInterval(fnCheckForConfig, 500);\n };\n if (SdkConfigAccess) {\n return resolve(SdkConfigAccess.sdkConfig);\n } else {\n idNextCheck = setInterval(fnCheckForConfig, 500);\n }\n }\n });\n}\n\nif (true) {\n let ignore = getSdkConfig();\n}\n\nexport { SdkConfigAccess, getSdkConfig };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"data_page.d.ts","sourceRoot":"","sources":["../../../src/components/helpers/data_page.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,wEAoBvB,CAAC"}
1
+ {"version":3,"file":"data_page.d.ts","sourceRoot":"","sources":["../../../src/components/helpers/data_page.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,wEAoBvB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"data_page.js","sourceRoot":"","sources":["../../../src/components/helpers/data_page.ts"],"names":[],"mappings":"AAEA,wDAAwD;AACxD,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,YAAY,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE;IAC/D,IAAI,cAAc,CAAC;IACnB,IAAG,UAAU,EAAC;QACZ,cAAc,GAAG;YACf,oBAAoB,EAAE,UAAU;SACjC,CAAC;KACH;IACD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,KAAK,CAAC,eAAe,EAAE;aACpB,OAAO,CAAC,YAAY,EAAE,cAAc,EAAE,OAAO,CAAC;aAC9C,IAAI,CAAC,QAAQ,CAAC,EAAE;YACf,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC9B,CAAC,CAAC;aACD,KAAK,CAAC,CAAC,CAAC,EAAE;YACT,IAAI,CAAC,EAAE;gBACL,8FAA8F;gBAC9F,MAAM,CAAC,CAAC,CAAC,CAAC;aACX;QACH,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["declare const PCore;\n\n// eslint-disable-next-line import/prefer-default-export\nexport const getDataPage = (dataPageName, parameters, context) => {\n let dataViewParams;\n if(parameters){\n dataViewParams = {\n 'dataViewParameters': parameters\n };\n }\n return new Promise((resolve, reject) => {\n PCore.getDataApiUtils()\n .getData(dataPageName, dataViewParams, context)\n .then(response => {\n resolve(response.data.data);\n })\n .catch(e => {\n if (e) {\n // check specific error if 401, and wiped out if so stored token is stale. Fetcch new tokens.\n reject(e);\n }\n });\n });\n};\n"]}
1
+ {"version":3,"file":"data_page.js","sourceRoot":"","sources":["../../../src/components/helpers/data_page.ts"],"names":[],"mappings":"AAGA,wDAAwD;AACxD,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,YAAY,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE;IAC/D,IAAI,cAAc,CAAC;IACnB,IAAG,UAAU,EAAC;QACZ,cAAc,GAAG;YACf,oBAAoB,EAAE,UAAU;SACjC,CAAC;KACH;IACD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,KAAK,CAAC,eAAe,EAAE;aACpB,OAAO,CAAC,YAAY,EAAE,cAAc,EAAE,OAAO,CAAC;aAC9C,IAAI,CAAC,QAAQ,CAAC,EAAE;YACf,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC9B,CAAC,CAAC;aACD,KAAK,CAAC,CAAC,CAAC,EAAE;YACT,IAAI,CAAC,EAAE;gBACL,8FAA8F;gBAC9F,MAAM,CAAC,CAAC,CAAC,CAAC;aACX;QACH,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["// Remove this and use \"real\" PCore type once .d.ts is fixed (currently shows 1 error)\ndeclare const PCore: any;\n\n// eslint-disable-next-line import/prefer-default-export\nexport const getDataPage = (dataPageName, parameters, context) => {\n let dataViewParams;\n if(parameters){\n dataViewParams = {\n 'dataViewParameters': parameters\n };\n }\n return new Promise((resolve, reject) => {\n PCore.getDataApiUtils()\n .getData(dataPageName, dataViewParams, context)\n .then(response => {\n resolve(response.data.data);\n })\n .catch(e => {\n if (e) {\n // check specific error if 401, and wiped out if so stored token is stale. Fetcch new tokens.\n reject(e);\n }\n });\n });\n};\n"]}
@@ -4,10 +4,5 @@ export declare const dateFormatInfoDefault: {
4
4
  dateFormatStringLC: string;
5
5
  dateFormatMask: string;
6
6
  };
7
- export declare const getDateFormatInfo: () => {
8
- dateFormatString: string;
9
- dateFormatStringLong: string;
10
- dateFormatStringLC: string;
11
- dateFormatMask: string;
12
- };
7
+ export declare const getDateFormatInfo: () => typeof dateFormatInfoDefault;
13
8
  //# sourceMappingURL=date-format-utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-format-utils.d.ts","sourceRoot":"","sources":["../../../src/components/helpers/date-format-utils.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,qBAAqB;;;;;CAKjC,CAAA;AAED,eAAO,MAAM,iBAAiB;;;;;CAuD7B,CAAA"}
1
+ {"version":3,"file":"date-format-utils.d.ts","sourceRoot":"","sources":["../../../src/components/helpers/date-format-utils.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,qBAAqB;;;;;CAKjC,CAAC;AAEF,eAAO,MAAM,iBAAiB,QAAO,4BAkEpC,CAAC"}
@@ -1,13 +1,15 @@
1
1
  import { getLocale } from './formatters/common';
2
2
  export const dateFormatInfoDefault = {
3
- dateFormatString: "MM/DD/YYYY",
4
- dateFormatStringLong: "MMM DD, YYYY",
5
- dateFormatStringLC: "mm/dd/yyyy",
6
- dateFormatMask: "__/__/____"
3
+ dateFormatString: 'MM/DD/YYYY',
4
+ dateFormatStringLong: 'MMM DD, YYYY',
5
+ dateFormatStringLC: 'mm/dd/yyyy',
6
+ dateFormatMask: '__/__/____'
7
7
  };
8
8
  export const getDateFormatInfo = () => {
9
+ const localizedVal = PCore.getLocaleUtils().getLocaleValue;
10
+ const localeCategory = 'CosmosFields';
9
11
  const theDateFormatInfo = dateFormatInfoDefault;
10
- const theLocale = getLocale(); // PCore.getEnvironmentInfo().getUseLocale() || "US-en";
12
+ const theLocale = getLocale();
11
13
  // NOTE: this date was chosen since it has a day larger than 12. If you change it,
12
14
  // you'll need to change the indexOf values below!
13
15
  const theTestDate = new Date(Date.parse('30 November 2023 12:00:00 GMT'));
@@ -18,27 +20,34 @@ export const getDateFormatInfo = () => {
18
20
  const locMM = theTestDateLocaleString.indexOf('11');
19
21
  const locDD = theTestDateLocaleString.indexOf('30');
20
22
  const locYYYY = theTestDateLocaleString.indexOf('2023');
23
+ // If localized placeholder exists for one of day/month/year then show it otherwise fall back to ddmmyyyy
24
+ const localizedPlaceholderExists = localizedVal('month_placeholder', localeCategory) !== 'month_placeholder' ||
25
+ localizedVal('day_placeholder', localeCategory) !== 'day_placeholder' ||
26
+ localizedVal('year_placeholder', localeCategory) !== 'year_placeholder';
21
27
  const arrPieces = [
22
28
  {
23
29
  loc: locMM,
24
30
  format: 'MM',
25
31
  longFormat: 'MMM',
26
- placeholder: 'mm',
27
- mask: '__'
32
+ placeholder: localizedPlaceholderExists ? localizedVal('month_placeholder', localeCategory) : 'mm',
33
+ mask: '__',
34
+ separator: theTestDateLocaleString[locMM + 2]
28
35
  },
29
36
  {
30
37
  loc: locDD,
31
38
  format: 'DD',
32
39
  longFormat: 'DD',
33
- placeholder: 'dd',
34
- mask: '__'
40
+ placeholder: localizedPlaceholderExists ? localizedVal('day_placeholder', localeCategory) : 'dd',
41
+ mask: '__',
42
+ separator: theTestDateLocaleString[locDD + 2]
35
43
  },
36
44
  {
37
45
  loc: locYYYY,
38
46
  format: 'YYYY',
39
47
  longFormat: 'YYYY',
40
- placeholder: 'yyyy',
41
- mask: '____'
48
+ placeholder: localizedPlaceholderExists ? localizedVal('year_placeholder', localeCategory) : 'yyyy',
49
+ mask: '____',
50
+ separator: theTestDateLocaleString[locYYYY + 4]
42
51
  }
43
52
  ];
44
53
  // Sort the associative array by order of appearance (loc) of each piece
@@ -50,10 +59,10 @@ export const getDateFormatInfo = () => {
50
59
  return 0;
51
60
  });
52
61
  // Construct the structure to return...
53
- theDateFormatInfo.dateFormatString = `${arrPieces[0].format}/${arrPieces[1].format}/${arrPieces[2].format}`;
62
+ theDateFormatInfo.dateFormatString = `${arrPieces[0].format}${arrPieces[0].separator}${arrPieces[1].format}${arrPieces[1].separator}${arrPieces[2].format}`;
54
63
  theDateFormatInfo.dateFormatStringLong = `${arrPieces[0].longFormat} ${arrPieces[1].longFormat}, ${arrPieces[2].longFormat}`;
55
- theDateFormatInfo.dateFormatStringLC = `${arrPieces[0].placeholder}/${arrPieces[1].placeholder}/${arrPieces[2].placeholder}`;
56
- theDateFormatInfo.dateFormatMask = `${arrPieces[0].mask}/${arrPieces[1].mask}/${arrPieces[2].mask}`;
64
+ theDateFormatInfo.dateFormatStringLC = `${arrPieces[0].placeholder}${arrPieces[0].separator}${arrPieces[1].placeholder}${arrPieces[1].separator}${arrPieces[2].placeholder}`;
65
+ theDateFormatInfo.dateFormatMask = `${arrPieces[0].mask}${arrPieces[0].separator}${arrPieces[1].mask}${arrPieces[1].separator}${arrPieces[2].mask}`;
57
66
  return theDateFormatInfo;
58
67
  };
59
68
  //# sourceMappingURL=date-format-utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-format-utils.js","sourceRoot":"","sources":["../../../src/components/helpers/date-format-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAGhD,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,gBAAgB,EAAE,YAAY;IAC9B,oBAAoB,EAAE,cAAc;IACpC,kBAAkB,EAAE,YAAY;IAChC,cAAc,EAAE,YAAY;CAC7B,CAAA;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,EAAE;IACpC,MAAM,iBAAiB,GAAG,qBAAqB,CAAC;IAChD,MAAM,SAAS,GAAG,SAAS,EAAE,CAAC,CAAC,wDAAwD;IAEvF,kFAAkF;IAClF,mDAAmD;IACnD,MAAM,WAAW,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC,CAAC;IAC1E,MAAM,uBAAuB,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IAEvF,8FAA8F;IAE9F,qFAAqF;IACrF,sEAAsE;IACtE,MAAM,KAAK,GAAG,uBAAuB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,MAAM,KAAK,GAAG,uBAAuB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,MAAM,OAAO,GAAG,uBAAuB,CAAC,OAAO,CAAC,M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C,CAAC,CAAC,WAAW,EAAE,CAAC;IAC7H,iBAAiB,CAAC,cAAc,GAAG,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAEpG,OAAO,iBAAiB,CAAC;AAC3B,CAAC,CAAA","sourcesContent":["import { getLocale } from './formatters/common';\n\n\nexport const dateFormatInfoDefault = {\n dateFormatString: \"MM/DD/YYYY\",\n dateFormatStringLong: \"MMM DD, YYYY\",\n dateFormatStringLC: \"mm/dd/yyyy\",\n dateFormatMask: \"__/__/____\"\n}\n\nexport const getDateFormatInfo = () => {\n const theDateFormatInfo = dateFormatInfoDefault;\n const theLocale = getLocale(); // PCore.getEnvironmentInfo().getUseLocale() || \"US-en\";\n\n // NOTE: this date was chosen since it has a day larger than 12. If you change it,\n // you'll need to change the indexOf values below!\n const theTestDate = new Date(Date.parse('30 November 2023 12:00:00 GMT'));\n const theTestDateLocaleString = new Intl.DateTimeFormat(theLocale).format(theTestDate);\n\n // console.log(`theLocale: ${theLocale} theTestDateLocaleString: ${theTestDateLocaleString}`);\n\n // Build the format string based on where '11' (mm), '30' (dd), and '2023' (yyyy) are\n // Example: US locations are 0, 3, 6 but for NL locations are 3, 0, 6\n const locMM = theTestDateLocaleString.indexOf('11');\n const locDD = theTestDateLocaleString.indexOf('30');\n const locYYYY = theTestDateLocaleString.indexOf('2023');\n\n const arrPieces = [\n {\n loc: locMM,\n format: 'MM',\n longFormat: 'MMM',\n placeholder: 'mm',\n mask: '__'\n },\n {\n loc: locDD,\n format: 'DD',\n longFormat: 'DD',\n placeholder: 'dd',\n mask: '__'\n },\n {\n loc: locYYYY,\n format: 'YYYY',\n longFormat: 'YYYY',\n placeholder: 'yyyy',\n mask: '____'\n }\n ];\n\n // Sort the associative array by order of appearance (loc) of each piece\n arrPieces.sort((a, b) => {\n if (a.loc < b.loc) return -1;\n if (a.loc > b.loc) return 1;\n return 0;\n });\n\n // Construct the structure to return...\n theDateFormatInfo.dateFormatString = `${arrPieces[0].format}/${arrPieces[1].format}/${arrPieces[2].format}`;\n theDateFormatInfo.dateFormatStringLong = `${arrPieces[0].longFormat} ${arrPieces[1].longFormat}, ${arrPieces[2].longFormat}`;\n theDateFormatInfo.dateFormatStringLC = `${arrPieces[0].placeholder}/${arrPieces[1].placeholder}/${arrPieces[2].placeholder}`;\n theDateFormatInfo.dateFormatMask = `${arrPieces[0].mask}/${arrPieces[1].mask}/${arrPieces[2].mask}`;\n\n return theDateFormatInfo;\n}\n"]}
1
+ {"version":3,"file":"date-format-utils.js","sourceRoot":"","sources":["../../../src/components/helpers/date-format-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,gBAAgB,EAAE,YAAY;IAC9B,oBAAoB,EAAE,cAAc;IACpC,kBAAkB,EAAE,YAAY;IAChC,cAAc,EAAE,YAAY;CAC7B,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAiC,EAAE;IAClE,MAAM,YAAY,GAAG,KAAK,CAAC,cAAc,EAAE,CAAC,cAAc,CAAC;IAC3D,MAAM,cAAc,GAAG,cAAc,CAAC;IACtC,MAAM,iBAAiB,GAAG,qBAAqB,CAAC;IAChD,MAAM,SAAS,GAAG,SAAS,EAAE,CAAC;IAE9B,kFAAkF;IAClF,mDAAmD;IACnD,MAAM,WAAW,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC,CAAC;IAC1E,MAAM,uBAAuB,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IAEvF,8FAA8F;IAE9F,qFAAqF;IACrF,sEAAsE;IACtE,MAAM,KAAK,GAAG,uBAAuB,CAAC,OAAO,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,EAAE,CAAC;IAEpJ,OAAO,iBAAiB,CAAC;AAC3B,CAAC,CAAC","sourcesContent":["import { getLocale } from './formatters/common';\n\nexport const dateFormatInfoDefault = {\n dateFormatString: 'MM/DD/YYYY',\n dateFormatStringLong: 'MMM DD, YYYY',\n dateFormatStringLC: 'mm/dd/yyyy',\n dateFormatMask: '__/__/____'\n};\n\nexport const getDateFormatInfo = (): typeof dateFormatInfoDefault => {\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'CosmosFields';\n const theDateFormatInfo = dateFormatInfoDefault;\n const theLocale = getLocale();\n\n // NOTE: this date was chosen since it has a day larger than 12. If you change it,\n // you'll need to change the indexOf values below!\n const theTestDate = new Date(Date.parse('30 November 2023 12:00:00 GMT'));\n const theTestDateLocaleString = new Intl.DateTimeFormat(theLocale).format(theTestDate);\n\n // console.log(`theLocale: ${theLocale} theTestDateLocaleString: ${theTestDateLocaleString}`);\n\n // Build the format string based on where '11' (mm), '30' (dd), and '2023' (yyyy) are\n // Example: US locations are 0, 3, 6 but for NL locations are 3, 0, 6\n const locMM = theTestDateLocaleString.indexOf('11');\n const locDD = theTestDateLocaleString.indexOf('30');\n const locYYYY = theTestDateLocaleString.indexOf('2023');\n\n // If localized placeholder exists for one of day/month/year then show it otherwise fall back to ddmmyyyy\n const localizedPlaceholderExists =\n localizedVal('month_placeholder', localeCategory) !== 'month_placeholder' ||\n localizedVal('day_placeholder', localeCategory) !== 'day_placeholder' ||\n localizedVal('year_placeholder', localeCategory) !== 'year_placeholder';\n\n const arrPieces = [\n {\n loc: locMM,\n format: 'MM',\n longFormat: 'MMM',\n placeholder: localizedPlaceholderExists ? localizedVal('month_placeholder', localeCategory) : 'mm',\n mask: '__',\n separator: theTestDateLocaleString[locMM+2]\n },\n {\n loc: locDD,\n format: 'DD',\n longFormat: 'DD',\n placeholder: localizedPlaceholderExists ? localizedVal('day_placeholder', localeCategory) : 'dd',\n mask: '__',\n separator: theTestDateLocaleString[locDD+2]\n },\n {\n loc: locYYYY,\n format: 'YYYY',\n longFormat: 'YYYY',\n placeholder: localizedPlaceholderExists ? localizedVal('year_placeholder', localeCategory) : 'yyyy',\n mask: '____',\n separator: theTestDateLocaleString[locYYYY+4]\n }\n ];\n\n // Sort the associative array by order of appearance (loc) of each piece\n arrPieces.sort((a, b) => {\n if (a.loc < b.loc) return -1;\n if (a.loc > b.loc) return 1;\n return 0;\n });\n\n // Construct the structure to return...\n theDateFormatInfo.dateFormatString = `${arrPieces[0].format}${arrPieces[0].separator}${arrPieces[1].format}${arrPieces[1].separator}${arrPieces[2].format}`;\n theDateFormatInfo.dateFormatStringLong = `${arrPieces[0].longFormat} ${arrPieces[1].longFormat}, ${arrPieces[2].longFormat}`;\n theDateFormatInfo.dateFormatStringLC = `${arrPieces[0].placeholder}${arrPieces[0].separator}${arrPieces[1].placeholder}${arrPieces[1].separator}${arrPieces[2].placeholder}`;\n theDateFormatInfo.dateFormatMask = `${arrPieces[0].mask}${arrPieces[0].separator}${arrPieces[1].mask}${arrPieces[1].separator}${arrPieces[2].mask}`;\n\n return theDateFormatInfo;\n};\n"]}
@@ -1,3 +1,3 @@
1
+ declare const handleEvent: (actions: any, eventType: string, propName: string, value: string) => void;
1
2
  export default handleEvent;
2
- declare function handleEvent(actions: any, eventType: any, propName: any, value: any): void;
3
3
  //# sourceMappingURL=event-utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"event-utils.d.ts","sourceRoot":"","sources":["../../../src/components/helpers/event-utils.js"],"names":[],"mappings":";AAEA,4FAeC"}
1
+ {"version":3,"file":"event-utils.d.ts","sourceRoot":"","sources":["../../../src/components/helpers/event-utils.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,WAAW,YAAa,GAAG,aAAa,MAAM,YAAY,MAAM,SAAS,MAAM,SAepF,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"event-utils.js","sourceRoot":"","sources":["../../../src/components/helpers/event-utils.js"],"names":[],"mappings":"AAAA,8CAA8C;AAE9C,MAAM,WAAW,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE;IAC1D,QAAQ,SAAS,EAAE;QACjB,KAAK,QAAQ;YACX,OAAO,CAAC,gBAAgB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;YAC1C,MAAM;QACR,KAAK,MAAM;YACT,OAAO,CAAC,kBAAkB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;YAC5C,MAAM;QACR,KAAK,aAAa;YAChB,OAAO,CAAC,gBAAgB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;YAC1C,OAAO,CAAC,kBAAkB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;YAC5C,MAAM;QACR;YACE,MAAM;KACT;AACH,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["// From DX Components src/utils/event-utils.js\n\nconst handleEvent = (actions, eventType, propName, value) => {\n switch (eventType) {\n case \"change\":\n actions.updateFieldValue(propName, value);\n break;\n case \"blur\":\n actions.triggerFieldChange(propName, value);\n break;\n case \"changeNblur\":\n actions.updateFieldValue(propName, value);\n actions.triggerFieldChange(propName, value);\n break;\n default:\n break;\n }\n};\n\nexport default handleEvent;\n"]}
1
+ {"version":3,"file":"event-utils.js","sourceRoot":"","sources":["../../../src/components/helpers/event-utils.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAE9C,MAAM,WAAW,GAAG,CAAC,OAAY,EAAE,SAAiB,EAAE,QAAgB,EAAE,KAAa,EAAE,EAAE;IACvF,QAAQ,SAAS,EAAE;QACjB,KAAK,QAAQ;YACX,OAAO,CAAC,gBAAgB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;YAC1C,MAAM;QACR,KAAK,MAAM;YACT,OAAO,CAAC,kBAAkB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;YAC5C,MAAM;QACR,KAAK,aAAa;YAChB,OAAO,CAAC,gBAAgB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;YAC1C,OAAO,CAAC,kBAAkB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;YAC5C,MAAM;QACR;YACE,MAAM;KACT;AACH,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["// From DX Components src/utils/event-utils.js\n\nconst handleEvent = (actions: any, eventType: string, propName: string, value: string) => {\n switch (eventType) {\n case \"change\":\n actions.updateFieldValue(propName, value);\n break;\n case \"blur\":\n actions.triggerFieldChange(propName, value);\n break;\n case \"changeNblur\":\n actions.updateFieldValue(propName, value);\n actions.triggerFieldChange(propName, value);\n break;\n default:\n break;\n }\n};\n\nexport default handleEvent;\n"]}
@@ -1,3 +1,16 @@
1
- export function getReferenceList(pConn: any): string;
2
- export function buildView(pConn: any, index: any, viewConfigPath: any): any;
1
+ import { ReactElement } from 'react';
2
+ /**
3
+ *
4
+ * @param {*} pConn - pConnect object of the view
5
+ * @returns {string} - returns the name of referenceList
6
+ */
7
+ export declare const getReferenceList: (pConn: any) => any;
8
+ /**
9
+ * creates and returns react element of the view
10
+ * @param {*} pConn - pConnect object of the view
11
+ * @param {*} index - index of the fieldGroup item
12
+ * @param {*} viewConfigPath - boolean value to check for children in config
13
+ * @returns {*} - return the react element of the view
14
+ */
15
+ export declare function buildView(pConn: any, index: any, viewConfigPath: any): ReactElement;
3
16
  //# sourceMappingURL=field-group-utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"field-group-utils.d.ts","sourceRoot":"","sources":["../../../src/components/helpers/field-group-utils.js"],"names":[],"mappings":"AAUO,8CAHM,MAAM,CAclB;AASM,4EA0BN"}
1
+ {"version":3,"file":"field-group-utils.d.ts","sourceRoot":"","sources":["../../../src/components/helpers/field-group-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAC;AAIpD;;;;GAIG;AAEH,eAAO,MAAM,gBAAgB,qBAW5B,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,KAAK,KAAA,EAAE,KAAK,KAAA,EAAE,cAAc,KAAA,GAAG,YAAY,CAyBpE"}
@@ -5,7 +5,7 @@ import createPConnectComponent from '../../bridge/react_pconnect';
5
5
  * @param {*} pConn - pConnect object of the view
6
6
  * @returns {string} - returns the name of referenceList
7
7
  */
8
- export const getReferenceList = pConn => {
8
+ export const getReferenceList = (pConn) => {
9
9
  let resolvePage = pConn.getComponentConfig().referenceList.replace('@P ', '');
10
10
  if (resolvePage.includes('D_')) {
11
11
  resolvePage = pConn.resolveDatasourceReference(resolvePage);
@@ -25,16 +25,13 @@ export const getReferenceList = pConn => {
25
25
  * @param {*} viewConfigPath - boolean value to check for children in config
26
26
  * @returns {*} - return the react element of the view
27
27
  */
28
- export const buildView = (pConn, index, viewConfigPath) => {
28
+ export function buildView(pConn, index, viewConfigPath) {
29
29
  const context = pConn.getContextName();
30
30
  const referenceList = getReferenceList(pConn);
31
31
  const isDatapage = referenceList.startsWith('D_');
32
- const pageReference = isDatapage
33
- ? `${referenceList}[${index}]`
34
- : `${pConn.getPageReference()}${referenceList}[${index}]`;
35
- const meta = viewConfigPath
36
- ? pConn.getRawMetadata().children[0].children[0]
37
- : pConn.getRawMetadata().children[0];
32
+ const pageReference = isDatapage ? `${referenceList}[${index}]` : `${pConn.getPageReference()}${referenceList}[${index}]`;
33
+ const meta = viewConfigPath ? pConn.getRawMetadata().children[0].children[0] : pConn.getRawMetadata().children[0];
34
+ delete meta?.config?.ruleClass;
38
35
  const config = {
39
36
  meta,
40
37
  options: {
@@ -44,11 +41,10 @@ export const buildView = (pConn, index, viewConfigPath) => {
44
41
  hasForm: true
45
42
  }
46
43
  };
47
- // eslint-disable-next-line no-undef
48
44
  const view = PCore.createPConnect(config);
49
45
  if (pConn.getConfigProps()?.displayMode === 'LABELS_LEFT') {
50
46
  view.getPConnect()?.setInheritedProp('displayMode', 'LABELS_LEFT');
51
47
  }
52
48
  return createElement(createPConnectComponent(), view);
53
- };
49
+ }
54
50
  //# sourceMappingURL=field-group-utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"field-group-utils.js","sourceRoot":"","sources":["../../../src/components/helpers/field-group-utils.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,uBAAuB,MAAM,6BAA6B,CAAC;AAElE;;;;GAIG;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC,EAAE;IACtC,IAAI,WAAW,GAAG,KAAK,CAAC,kBAAkB,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAC9E,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;QAC9B,WAAW,GAAG,KAAK,CAAC,0BAA0B,CAAC,WAAW,CAAC,CAAC;QAC5D,IAAI,WAAW,EAAE,SAAS,EAAE;YAC1B,WAAW,GAAG,WAAW,EAAE,SAAS,CAAC;SACtC;aAAM,IAAI,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE;YAC9E,WAAW,GAAG,GAAG,WAAW,YAAY,CAAC;SAC1C;KACF;IACD,OAAO,WAAW,CAAC;AACrB,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE;IACxD,MAAM,OAAO,GAAG,KAAK,CAAC,cAAc,EAAE,CAAC;IACvC,MAAM,aAAa,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAE9C,MAAM,UAAU,GAAG,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAClD,MAAM,aAAa,GAAG,UAAU;QAC9B,CAAC,CAAC,GAAG,aAAa,IAAI,KAAK,GAAG;QAC9B,CAAC,CAAC,GAAG,KAAK,CAAC,gBAAgB,EAAE,GAAG,aAAa,IAAI,KAAK,GAAG,CAAC;IAC5D,MAAM,IAAI,GAAG,cAAc;QACzB,CAAC,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;QAChD,CAAC,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACvC,MAAM,MAAM,GAAG;QACb,IAAI;QACJ,OAAO,EAAE;YACP,OAAO;YACP,aAAa;YACb,aAAa;YACb,OAAO,EAAE,IAAI;SACd;KACF,CAAC;IACF,oCAAoC;IACpC,MAAM,IAAI,GAAG,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;IAC1C,IAAI,KAAK,CAAC,cAAc,EAAE,EAAE,WAAW,KAAK,aAAa,EAAE;QACzD,IAAI,CAAC,WAAW,EAAE,EAAE,gBAAgB,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;KACpE;IACD,OAAO,aAAa,CAAC,uBAAuB,EAAE,EAAE,IAAI,CAAC,CAAC;AACxD,CAAC,CAAC","sourcesContent":["import { createElement } from 'react';\n\nimport createPConnectComponent from '../../bridge/react_pconnect';\n\n/**\n *\n * @param {*} pConn - pConnect object of the view\n * @returns {string} - returns the name of referenceList\n */\n\nexport const getReferenceList = pConn => {\n let resolvePage = pConn.getComponentConfig().referenceList.replace('@P ', '');\n if (resolvePage.includes('D_')) {\n resolvePage = pConn.resolveDatasourceReference(resolvePage);\n if (resolvePage?.pxResults) {\n resolvePage = resolvePage?.pxResults;\n } else if (resolvePage.startsWith('D_') && !resolvePage.endsWith('.pxResults')) {\n resolvePage = `${resolvePage}.pxResults`;\n }\n }\n return resolvePage;\n};\n\n/**\n * creates and returns react element of the view\n * @param {*} pConn - pConnect object of the view\n * @param {*} index - index of the fieldGroup item\n * @param {*} viewConfigPath - boolean value to check for children in config\n * @returns {*} - return the react element of the view\n */\nexport const buildView = (pConn, index, viewConfigPath) => {\n const context = pConn.getContextName();\n const referenceList = getReferenceList(pConn);\n\n const isDatapage = referenceList.startsWith('D_');\n const pageReference = isDatapage\n ? `${referenceList}[${index}]`\n : `${pConn.getPageReference()}${referenceList}[${index}]`;\n const meta = viewConfigPath\n ? pConn.getRawMetadata().children[0].children[0]\n : pConn.getRawMetadata().children[0];\n const config = {\n meta,\n options: {\n context,\n pageReference,\n referenceList,\n hasForm: true\n }\n };\n // eslint-disable-next-line no-undef\n const view = PCore.createPConnect(config);\n if (pConn.getConfigProps()?.displayMode === 'LABELS_LEFT') {\n view.getPConnect()?.setInheritedProp('displayMode', 'LABELS_LEFT');\n }\n return createElement(createPConnectComponent(), view);\n};\n"]}
1
+ {"version":3,"file":"field-group-utils.js","sourceRoot":"","sources":["../../../src/components/helpers/field-group-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAgB,MAAM,OAAO,CAAC;AAEpD,OAAO,uBAAuB,MAAM,6BAA6B,CAAC;AAElE;;;;GAIG;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,EAAE;IACxC,IAAI,WAAW,GAAG,KAAK,CAAC,kBAAkB,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAC9E,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;QAC9B,WAAW,GAAG,KAAK,CAAC,0BAA0B,CAAC,WAAW,CAAC,CAAC;QAC5D,IAAI,WAAW,EAAE,SAAS,EAAE;YAC1B,WAAW,GAAG,WAAW,EAAE,SAAS,CAAC;SACtC;aAAM,IAAI,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE;YAC9E,WAAW,GAAG,GAAG,WAAW,YAAY,CAAC;SAC1C;KACF;IACD,OAAO,WAAW,CAAC;AACrB,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,cAAc;IACpD,MAAM,OAAO,GAAG,KAAK,CAAC,cAAc,EAAE,CAAC;IACvC,MAAM,aAAa,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAE9C,MAAM,UAAU,GAAG,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAClD,MAAM,aAAa,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,aAAa,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,gBAAgB,EAAE,GAAG,aAAa,IAAI,KAAK,GAAG,CAAC;IAC1H,MAAM,IAAI,GAAG,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAElH,OAAO,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC;IAE/B,MAAM,MAAM,GAAG;QACb,IAAI;QACJ,OAAO,EAAE;YACP,OAAO;YACP,aAAa;YACb,aAAa;YACb,OAAO,EAAE,IAAI;SACd;KACF,CAAC;IAEF,MAAM,IAAI,GAAG,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;IAC1C,IAAI,KAAK,CAAC,cAAc,EAAE,EAAE,WAAW,KAAK,aAAa,EAAE;QACzD,IAAI,CAAC,WAAW,EAAE,EAAE,gBAAgB,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;KACpE;IACD,OAAO,aAAa,CAAC,uBAAuB,EAAE,EAAE,IAAI,CAAC,CAAC;AACxD,CAAC","sourcesContent":["import { createElement, ReactElement } from 'react';\n\nimport createPConnectComponent from '../../bridge/react_pconnect';\n\n/**\n *\n * @param {*} pConn - pConnect object of the view\n * @returns {string} - returns the name of referenceList\n */\n\nexport const getReferenceList = (pConn) => {\n let resolvePage = pConn.getComponentConfig().referenceList.replace('@P ', '');\n if (resolvePage.includes('D_')) {\n resolvePage = pConn.resolveDatasourceReference(resolvePage);\n if (resolvePage?.pxResults) {\n resolvePage = resolvePage?.pxResults;\n } else if (resolvePage.startsWith('D_') && !resolvePage.endsWith('.pxResults')) {\n resolvePage = `${resolvePage}.pxResults`;\n }\n }\n return resolvePage;\n};\n\n/**\n * creates and returns react element of the view\n * @param {*} pConn - pConnect object of the view\n * @param {*} index - index of the fieldGroup item\n * @param {*} viewConfigPath - boolean value to check for children in config\n * @returns {*} - return the react element of the view\n */\nexport function buildView(pConn, index, viewConfigPath): ReactElement {\n const context = pConn.getContextName();\n const referenceList = getReferenceList(pConn);\n\n const isDatapage = referenceList.startsWith('D_');\n const pageReference = isDatapage ? `${referenceList}[${index}]` : `${pConn.getPageReference()}${referenceList}[${index}]`;\n const meta = viewConfigPath ? pConn.getRawMetadata().children[0].children[0] : pConn.getRawMetadata().children[0];\n\n delete meta?.config?.ruleClass;\n\n const config = {\n meta,\n options: {\n context,\n pageReference,\n referenceList,\n hasForm: true\n }\n };\n\n const view = PCore.createPConnect(config);\n if (pConn.getConfigProps()?.displayMode === 'LABELS_LEFT') {\n view.getPConnect()?.setInheritedProp('displayMode', 'LABELS_LEFT');\n }\n return createElement(createPConnectComponent(), view);\n}\n"]}
@@ -1,5 +1,5 @@
1
- declare namespace _default {
2
- function TrueFalse(value: any, options: any): any;
3
- }
1
+ declare const _default: {
2
+ TrueFalse: (value: any, options: any) => any;
3
+ };
4
4
  export default _default;
5
5
  //# sourceMappingURL=Boolean.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Boolean.d.ts","sourceRoot":"","sources":["../../../../src/components/helpers/formatters/Boolean.js"],"names":[],"mappings":";IA+Ba,kDAKP"}
1
+ {"version":3,"file":"Boolean.d.ts","sourceRoot":"","sources":["../../../../src/components/helpers/formatters/Boolean.ts"],"names":[],"mappings":";;;AA8BA,wBAOE"}
@@ -1 +1 @@
1
- {"version":3,"file":"Boolean.js","sourceRoot":"","sources":["../../../../src/components/helpers/formatters/Boolean.js"],"names":[],"mappings":"AAAA,SAAS,OAAO,CAAC,KAAK,EAAE,EAAE,UAAU,GAAG,IAAI,EAAE,IAAI,GAAG,EAAE,EAAE,KAAK,GAAG,EAAE,EAAE,GAAG,EAAE;IACvE,IACE,CAAC,CAAC,UAAU,IAAI,CAAC,KAAK,CAAC;QACvB,KAAK,KAAK,KAAK;QACf,KAAK,EAAE,QAAQ,EAAE,EAAE,WAAW,EAAE,KAAK,OAAO;QAC5C,KAAK,KAAK,CAAC;QACX,KAAK,KAAK,GAAG,EACb;QACA,OAAO,KAAK,IAAI,EAAE,CAAC;KACpB;IACD,IACE,KAAK,KAAK,IAAI;QACd,KAAK,EAAE,QAAQ,EAAE,EAAE,WAAW,EAAE,KAAK,MAAM;QAC3C,KAAK,KAAK,CAAC;QACX,KAAK,KAAK,GAAG,EACb;QACA,OAAO,IAAI,IAAI,EAAE,CAAC;KACnB;IACD,IACE,UAAU;QACV,CAAC,KAAK,KAAK,MAAM;YACf,KAAK,KAAK,EAAE;YACZ,KAAK,KAAK,IAAI;YACd,OAAO,KAAK,KAAK,WAAW,CAAC,EAC/B;QACA,OAAO,KAAK,CAAC;KACd;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,eAAe;IACb,SAAS,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAC5B,OAAO,CAAC,KAAK,EAAE;QACb,GAAG,OAAO;QACV,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,OAAO;KACf,CAAC;CACL,CAAC","sourcesContent":["function Boolean(value, { allowEmpty = true, tick = \"\", cross = \"\" } = {}) {\n if (\n (!allowEmpty && !value) ||\n value === false ||\n value?.toString()?.toLowerCase() === \"false\" ||\n value === 0 ||\n value === \"0\"\n ) {\n return cross || \"\";\n }\n if (\n value === true ||\n value?.toString()?.toLowerCase() === \"true\" ||\n value === 1 ||\n value === \"1\"\n ) {\n return tick || \"\";\n }\n if (\n allowEmpty &&\n (value === \"null\" ||\n value === \"\" ||\n value === null ||\n typeof value === \"undefined\")\n ) {\n return \"- -\";\n }\n return value;\n}\n\nexport default {\n TrueFalse: (value, options) =>\n Boolean(value, {\n ...options,\n tick: \"True\",\n cross: \"False\"\n })\n};\n"]}
1
+ {"version":3,"file":"Boolean.js","sourceRoot":"","sources":["../../../../src/components/helpers/formatters/Boolean.ts"],"names":[],"mappings":"AAAA,SAAS,OAAO,CAAC,KAAK,EAAE,EAAE,UAAU,GAAG,IAAI,EAAE,IAAI,GAAG,EAAE,EAAE,KAAK,GAAG,EAAE,EAAE,GAAG,EAAE;IACvE,IACE,CAAC,CAAC,UAAU,IAAI,CAAC,KAAK,CAAC;QACvB,KAAK,KAAK,KAAK;QACf,KAAK,EAAE,QAAQ,EAAE,EAAE,WAAW,EAAE,KAAK,OAAO;QAC5C,KAAK,KAAK,CAAC;QACX,KAAK,KAAK,GAAG,EACb;QACA,OAAO,KAAK,IAAI,EAAE,CAAC;KACpB;IACD,IACE,KAAK,KAAK,IAAI;QACd,KAAK,EAAE,QAAQ,EAAE,EAAE,WAAW,EAAE,KAAK,MAAM;QAC3C,KAAK,KAAK,CAAC;QACX,KAAK,KAAK,GAAG,EACb;QACA,OAAO,IAAI,IAAI,EAAE,CAAC;KACnB;IACD,IACE,UAAU;QACV,CAAC,KAAK,KAAK,MAAM;YACf,KAAK,KAAK,EAAE;YACZ,KAAK,KAAK,IAAI;YACd,OAAO,KAAK,KAAK,WAAW,CAAC,EAC/B;QACA,OAAO,KAAK,CAAC;KACd;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,eAAe;IACb,SAAS,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAC5B,OAAO,CAAC,KAAK,EAAE;QACb,GAAG,OAAO;QACV,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,OAAO;KACf,CAAC;CACL,CAAC","sourcesContent":["function Boolean(value, { allowEmpty = true, tick = \"\", cross = \"\" } = {}) {\n if (\n (!allowEmpty && !value) ||\n value === false ||\n value?.toString()?.toLowerCase() === \"false\" ||\n value === 0 ||\n value === \"0\"\n ) {\n return cross || \"\";\n }\n if (\n value === true ||\n value?.toString()?.toLowerCase() === \"true\" ||\n value === 1 ||\n value === \"1\"\n ) {\n return tick || \"\";\n }\n if (\n allowEmpty &&\n (value === \"null\" ||\n value === \"\" ||\n value === null ||\n typeof value === \"undefined\")\n ) {\n return \"- -\";\n }\n return value;\n}\n\nexport default {\n TrueFalse: (value, options) =>\n Boolean(value, {\n ...options,\n tick: \"True\",\n cross: \"False\"\n })\n};\n"]}
@@ -1,10 +1,10 @@
1
1
  declare const _default: {
2
- Currency: (value: any, options: any) => any;
3
- "Currency-Code": (value: any, options: any) => any;
4
- Decimal: (value: any, options: any) => any;
5
- "Decimal-Auto": (value: any, options: any) => any;
6
- Integer: (value: any, options: any) => any;
7
- Percentage: (value: any, options: any) => any;
2
+ Currency: (value: any, options: any) => string;
3
+ "Currency-Code": (value: any, options: any) => string;
4
+ Decimal: (value: any, options: any) => string;
5
+ "Decimal-Auto": (value: any, options: any) => string;
6
+ Integer: (value: any, options: any) => string;
7
+ Percentage: (value: any, options: any) => string;
8
8
  };
9
9
  export default _default;
10
10
  //# sourceMappingURL=Currency.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Currency.d.ts","sourceRoot":"","sources":["../../../../src/components/helpers/formatters/Currency.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"Currency.d.ts","sourceRoot":"","sources":["../../../../src/components/helpers/formatters/Currency.ts"],"names":[],"mappings":";;;;;;;;AAoEA,wBAcE"}
@@ -1,6 +1,7 @@
1
1
  import { getLocale } from "./common";
2
2
  import CurrencyMap from "./CurrencyMap";
3
- function NumberFormatter(value, { locale, decPlaces = 2 } = {}) {
3
+ // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
4
+ function NumberFormatter(value, { locale = "en-US", decPlaces = 2, style = "", currency = "USD" } = {}) {
4
5
  const currentLocale = getLocale(locale);
5
6
  if (value !== null && value !== undefined) {
6
7
  return Number(value).toLocaleString(currentLocale, {
@@ -10,7 +11,7 @@ function NumberFormatter(value, { locale, decPlaces = 2 } = {}) {
10
11
  }
11
12
  return value;
12
13
  }
13
- function CurrencyFormatter(value, { symbol = true, position, locale, decPlaces = 2, style = "currency", currency = "USD" } = {}) {
14
+ function CurrencyFormatter(value, { symbol = true, position = "before", locale = "en-US", decPlaces = 2, style = "currency", currency = "USD" } = {}) {
14
15
  const currentLocale = getLocale(locale);
15
16
  let formattedValue = value;
16
17
  if (value !== null && value !== undefined && value !== '') {
@@ -20,7 +21,7 @@ function CurrencyFormatter(value, { symbol = true, position, locale, decPlaces =
20
21
  style,
21
22
  currency
22
23
  });
23
- let countryCode = currentLocale.split("-")[1].toUpperCase();
24
+ let countryCode = currentLocale?.split("-")[1].toUpperCase();
24
25
  // If countryCode is still undefined, setting it as US
25
26
  if (!countryCode) {
26
27
  countryCode = 'US';
@@ -34,7 +35,7 @@ function CurrencyFormatter(value, { symbol = true, position, locale, decPlaces =
34
35
  }
35
36
  // if position is provided, change placeholder accordingly.
36
37
  if (position && code) {
37
- if (position.toLowerCase() === "before" && code.indexOf("{#}") === 0) {
38
+ if (position.toLowerCase() === "before" && code.startsWith("{#}")) {
38
39
  code = code.slice(3) + code.slice(0, 3);
39
40
  }
40
41
  else if (position.toLowerCase() === "after" &&
@@ -46,7 +47,7 @@ function CurrencyFormatter(value, { symbol = true, position, locale, decPlaces =
46
47
  }
47
48
  return formattedValue;
48
49
  }
49
- function SymbolFormatter(value, { symbol, suffix = true, locale } = {}) {
50
+ function SymbolFormatter(value, { symbol = "$", suffix = true, locale = "en-US" } = {}) {
50
51
  let formattedValue = value;
51
52
  if (value !== null && value !== undefined) {
52
53
  formattedValue = NumberFormatter(value, { locale });
@@ -1 +1 @@
1
- {"version":3,"file":"Currency.js","sourceRoot":"","sources":["../../../../src/components/helpers/formatters/Currency.js"],"names":[],"mappings":"AAA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,EAAE,EAAE,CAAC,iBAAiB,CAAC,KAAK,EAAE,OAAO,CAAC;IAC/D,eAAe,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAClC,iBAAiB,CAAC,KAAK,EAAE,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IACzD,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,eAAe,CAAC,KAAK,EAAE,OAAO,CAAC;IAC5D,cAAc,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CACjC,eAAe,CAAC,KAAK,EAAE;QACrB,GAAG,OAAO;QACV,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KAC3C,CAAC;IACJ,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAC1B,eAAe,CAAC,KAAK,EAAE,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IACtD,UAAU,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAC7B,eAAe,CAAC,KAAK,EAAE,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;CACtD,CAAC","sourcesContent":["import { getLocale } from \"./common\";\nimport CurrencyMap from \"./CurrencyMap\";\n\nfunction NumberFormatter(value, { locale, decPlaces = 2 } = {}) {\n const currentLocale = getLocale(locale);\n if (value !== null && value !== undefined) {\n return Number(value).toLocaleString(currentLocale, {\n minimumFractionDigits: decPlaces,\n maximumFractionDigits: decPlaces\n });\n }\n return value;\n}\n\nfunction CurrencyFormatter(\n value,\n { symbol = true, position, locale, decPlaces = 2, style = \"currency\", currency = \"USD\" } = {}\n) {\n const currentLocale = getLocale(locale);\n let formattedValue = value;\n if (value !== null && value !== undefined && value !== '') {\n formattedValue = NumberFormatter(value, {\n locale: currentLocale,\n decPlaces,\n style,\n currency\n });\n\n let countryCode = currentLocale.split(\"-\")[1].toUpperCase();\n\n // If countryCode is still undefined, setting it as US\n if( !countryCode ){\n countryCode = 'US';\n }\n\n let code;\n if (symbol) {\n code = CurrencyMap[countryCode]?.symbolFormat;\n } else {\n code = CurrencyMap[countryCode]?.currencyCode;\n }\n\n // if position is provided, change placeholder accordingly.\n if (position && code) {\n if (position.toLowerCase() === \"before\" && code.indexOf(\"{#}\") === 0) {\n code = code.slice(3) + code.slice(0, 3);\n } else if (\n position.toLowerCase() === \"after\" &&\n code.indexOf(\"{#}\") === code.length - 3\n ) {\n code = code.slice(-3) + code.slice(0, -3);\n }\n }\n return code?.replace(\"{#}\", formattedValue) || formattedValue;\n }\n return formattedValue;\n}\n\nfunction SymbolFormatter(value, { symbol, suffix = true, locale } = {}) {\n let formattedValue = value;\n if (value !== null && value !== undefined) {\n formattedValue = NumberFormatter(value, { locale });\n return suffix ? `${formattedValue}${symbol}` : `${symbol}${formattedValue}`;\n }\n return formattedValue;\n}\n\nexport default {\n Currency: (value, options) => CurrencyFormatter(value, options),\n \"Currency-Code\": (value, options) =>\n CurrencyFormatter(value, { ...options, symbol: false }),\n Decimal: (value, options) => NumberFormatter(value, options),\n \"Decimal-Auto\": (value, options) =>\n NumberFormatter(value, {\n ...options,\n decPlaces: Number.isInteger(value) ? 0 : 2\n }),\n Integer: (value, options) =>\n NumberFormatter(value, { ...options, decPlaces: 0 }),\n Percentage: (value, options) =>\n SymbolFormatter(value, { ...options, symbol: \"%\" })\n};\n"]}
1
+ {"version":3,"file":"Currency.js","sourceRoot":"","sources":["../../../../src/components/helpers/formatters/Currency.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC,6EAA6E;AAC7E,SAAS,eAAe,CAAC,KAAK,EAAE,EAAE,MAAM,GAAG,OAAO,EAAE,SAAS,GAAG,CAAC,EAAE,KAAK,GAAC,EAAE,EAAE,Q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OAAO,EAAE,EAAE,CAClC,iBAAiB,CAAC,KAAK,EAAE,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IACzD,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,eAAe,CAAC,KAAK,EAAE,OAAO,CAAC;IAC5D,cAAc,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CACjC,eAAe,CAAC,KAAK,EAAE;QACrB,GAAG,OAAO;QACV,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KAC3C,CAAC;IACJ,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAC1B,eAAe,CAAC,KAAK,EAAE,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IACtD,UAAU,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAC7B,eAAe,CAAC,KAAK,EAAE,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;CACtD,CAAC","sourcesContent":["import { getLocale } from \"./common\";\nimport CurrencyMap from \"./CurrencyMap\";\n\n// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars\nfunction NumberFormatter(value, { locale = \"en-US\", decPlaces = 2, style=\"\", currency=\"USD\" } = {}): string {\n const currentLocale: string | undefined = getLocale(locale);\n if (value !== null && value !== undefined) {\n return Number(value).toLocaleString(currentLocale, {\n minimumFractionDigits: decPlaces,\n maximumFractionDigits: decPlaces\n });\n }\n return value;\n}\n\nfunction CurrencyFormatter(\n value: string,\n { symbol = true, position=\"before\", locale=\"en-US\", decPlaces = 2, style = \"currency\", currency = \"USD\" } = {}\n): string {\n const currentLocale: string | undefined = getLocale(locale);\n let formattedValue: string = value;\n if (value !== null && value !== undefined && value !== '') {\n formattedValue = NumberFormatter(value, {\n locale: currentLocale,\n decPlaces,\n style,\n currency\n });\n\n let countryCode: string | undefined = currentLocale?.split(\"-\")[1].toUpperCase();\n\n // If countryCode is still undefined, setting it as US\n if( !countryCode ){\n countryCode = 'US';\n }\n\n let code: string;\n if (symbol) {\n code = CurrencyMap[countryCode]?.symbolFormat;\n } else {\n code = CurrencyMap[countryCode]?.currencyCode;\n }\n\n // if position is provided, change placeholder accordingly.\n if (position && code) {\n if (position.toLowerCase() === \"before\" && code.startsWith(\"{#}\")) {\n code = code.slice(3) + code.slice(0, 3);\n } else if (\n position.toLowerCase() === \"after\" &&\n code.indexOf(\"{#}\") === code.length - 3\n ) {\n code = code.slice(-3) + code.slice(0, -3);\n }\n }\n return code?.replace(\"{#}\", formattedValue) || formattedValue;\n }\n return formattedValue;\n}\n\nfunction SymbolFormatter(value, { symbol=\"$\", suffix = true, locale=\"en-US\" } = {}): string {\n let formattedValue: string = value;\n if (value !== null && value !== undefined) {\n formattedValue = NumberFormatter(value, { locale });\n return suffix ? `${formattedValue}${symbol}` : `${symbol}${formattedValue}`;\n }\n return formattedValue;\n}\n\nexport default {\n Currency: (value, options) => CurrencyFormatter(value, options),\n \"Currency-Code\": (value, options) =>\n CurrencyFormatter(value, { ...options, symbol: false }),\n Decimal: (value, options) => NumberFormatter(value, options),\n \"Decimal-Auto\": (value, options) =>\n NumberFormatter(value, {\n ...options,\n decPlaces: Number.isInteger(value) ? 0 : 2\n }),\n Integer: (value, options) =>\n NumberFormatter(value, { ...options, decPlaces: 0 }),\n Percentage: (value, options) =>\n SymbolFormatter(value, { ...options, symbol: \"%\" })\n};\n"]}