@pega/react-sdk-components 8.23.11 → 23.1.11

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 (635) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +17 -0
  3. package/SECURITY.md +10 -0
  4. package/lib/bridge/Context/StoreContext.js +3 -3
  5. package/lib/bridge/Context/StoreContext.js.map +1 -1
  6. package/lib/bridge/helpers/sdk_component_map.d.ts.map +1 -1
  7. package/lib/bridge/helpers/sdk_component_map.js +24 -47
  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 +17 -28
  11. package/lib/bridge/react_pconnect.js.map +1 -1
  12. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts +7 -10
  13. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts.map +1 -1
  14. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js +2 -9
  15. package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.map +1 -1
  16. package/lib/components/designSystemExtension/Banner/Banner.d.ts +15 -1
  17. package/lib/components/designSystemExtension/Banner/Banner.d.ts.map +1 -1
  18. package/lib/components/designSystemExtension/Banner/Banner.js +2 -10
  19. package/lib/components/designSystemExtension/Banner/Banner.js.map +1 -1
  20. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
  21. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts +6 -9
  22. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
  23. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +32 -33
  24. package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
  25. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts +4 -10
  26. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts.map +1 -1
  27. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +10 -23
  28. package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
  29. package/lib/components/designSystemExtension/DetailsFields/index.js.map +1 -1
  30. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts +8 -3
  31. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
  32. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +25 -14
  33. package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
  34. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts +7 -2
  35. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts.map +1 -1
  36. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js +6 -18
  37. package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
  38. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts +7 -2
  39. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts.map +1 -1
  40. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +6 -12
  41. package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
  42. package/lib/components/designSystemExtension/Operator/Operator.d.ts +17 -7
  43. package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
  44. package/lib/components/designSystemExtension/Operator/Operator.js +49 -67
  45. package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
  46. package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +5 -2
  47. package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
  48. package/lib/components/designSystemExtension/Pulse/Pulse.js +9 -15
  49. package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
  50. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts +19 -0
  51. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -0
  52. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +75 -0
  53. package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -0
  54. package/lib/components/designSystemExtension/RichTextEditor/index.d.ts +2 -0
  55. package/lib/components/designSystemExtension/RichTextEditor/index.d.ts.map +1 -0
  56. package/lib/components/designSystemExtension/RichTextEditor/index.js +2 -0
  57. package/lib/components/designSystemExtension/RichTextEditor/index.js.map +1 -0
  58. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts +6 -1
  59. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts.map +1 -1
  60. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js +5 -11
  61. package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
  62. package/lib/components/field/AutoComplete/AutoComplete.d.ts +15 -1
  63. package/lib/components/field/AutoComplete/AutoComplete.d.ts.map +1 -1
  64. package/lib/components/field/AutoComplete/AutoComplete.js +17 -17
  65. package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
  66. package/lib/components/field/CancelAlert/CancelAlert.d.ts +12 -2
  67. package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
  68. package/lib/components/field/CancelAlert/CancelAlert.js +78 -70
  69. package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
  70. package/lib/components/field/CancelAlert/index.js.map +1 -1
  71. package/lib/components/field/Checkbox/Checkbox.d.ts +9 -1
  72. package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
  73. package/lib/components/field/Checkbox/Checkbox.js +13 -13
  74. package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
  75. package/lib/components/field/Currency/Currency.d.ts +6 -1
  76. package/lib/components/field/Currency/Currency.d.ts.map +1 -1
  77. package/lib/components/field/Currency/Currency.js +15 -36
  78. package/lib/components/field/Currency/Currency.js.map +1 -1
  79. package/lib/components/field/Currency/currency-utils.d.ts.map +1 -1
  80. package/lib/components/field/Currency/currency-utils.js +5 -6
  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 +15 -9
  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 +15 -9
  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 +13 -29
  93. package/lib/components/field/Decimal/Decimal.js.map +1 -1
  94. package/lib/components/field/Decimal/index.js.map +1 -1
  95. package/lib/components/field/Dropdown/Dropdown.d.ts +13 -1
  96. package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
  97. package/lib/components/field/Dropdown/Dropdown.js +105 -15
  98. package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
  99. package/lib/components/field/Email/Email.d.ts +5 -1
  100. package/lib/components/field/Email/Email.d.ts.map +1 -1
  101. package/lib/components/field/Email/Email.js +12 -11
  102. package/lib/components/field/Email/Email.js.map +1 -1
  103. package/lib/components/field/Email/index.js.map +1 -1
  104. package/lib/components/field/Group/Group.d.ts +13 -0
  105. package/lib/components/field/Group/Group.d.ts.map +1 -0
  106. package/lib/components/field/Group/Group.js +15 -0
  107. package/lib/components/field/Group/Group.js.map +1 -0
  108. package/lib/components/field/Group/index.d.ts +2 -0
  109. package/lib/components/field/Group/index.d.ts.map +1 -0
  110. package/lib/components/field/Group/index.js +2 -0
  111. package/lib/components/field/Group/index.js.map +1 -0
  112. package/lib/components/field/Integer/Integer.d.ts +5 -1
  113. package/lib/components/field/Integer/Integer.d.ts.map +1 -1
  114. package/lib/components/field/Integer/Integer.js +10 -8
  115. package/lib/components/field/Integer/Integer.js.map +1 -1
  116. package/lib/components/field/Percentage/Percentage.d.ts +6 -1
  117. package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
  118. package/lib/components/field/Percentage/Percentage.js +28 -29
  119. package/lib/components/field/Percentage/Percentage.js.map +1 -1
  120. package/lib/components/field/Phone/Phone.d.ts +5 -1
  121. package/lib/components/field/Phone/Phone.d.ts.map +1 -1
  122. package/lib/components/field/Phone/Phone.js +10 -9
  123. package/lib/components/field/Phone/Phone.js.map +1 -1
  124. package/lib/components/field/Phone/index.js.map +1 -1
  125. package/lib/components/field/RadioButtons/RadioButtons.d.ts +7 -1
  126. package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
  127. package/lib/components/field/RadioButtons/RadioButtons.js +19 -15
  128. package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
  129. package/lib/components/field/RichText/RichText.d.ts +7 -0
  130. package/lib/components/field/RichText/RichText.d.ts.map +1 -0
  131. package/lib/components/field/RichText/RichText.js +54 -0
  132. package/lib/components/field/RichText/RichText.js.map +1 -0
  133. package/lib/components/field/RichText/index.d.ts +2 -0
  134. package/lib/components/field/RichText/index.d.ts.map +1 -0
  135. package/lib/components/field/RichText/index.js +2 -0
  136. package/lib/components/field/RichText/index.js.map +1 -0
  137. package/lib/components/field/ScalarList/ScalarList.d.ts +13 -0
  138. package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -0
  139. package/lib/components/field/ScalarList/ScalarList.js +32 -0
  140. package/lib/components/field/ScalarList/ScalarList.js.map +1 -0
  141. package/lib/components/field/ScalarList/index.d.ts +2 -0
  142. package/lib/components/field/ScalarList/index.d.ts.map +1 -0
  143. package/lib/components/field/ScalarList/index.js +2 -0
  144. package/lib/components/field/ScalarList/index.js.map +1 -0
  145. package/lib/components/field/SemanticLink/SemanticLink.d.ts +5 -9
  146. package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
  147. package/lib/components/field/SemanticLink/SemanticLink.js +11 -19
  148. package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
  149. package/lib/components/field/SemanticLink/utils.d.ts.map +1 -1
  150. package/lib/components/field/SemanticLink/utils.js +8 -8
  151. package/lib/components/field/SemanticLink/utils.js.map +1 -1
  152. package/lib/components/field/TextArea/TextArea.d.ts +6 -1
  153. package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
  154. package/lib/components/field/TextArea/TextArea.js +8 -6
  155. package/lib/components/field/TextArea/TextArea.js.map +1 -1
  156. package/lib/components/field/TextContent/TextContent.d.ts +7 -1
  157. package/lib/components/field/TextContent/TextContent.d.ts.map +1 -1
  158. package/lib/components/field/TextContent/TextContent.js +2 -2
  159. package/lib/components/field/TextContent/TextContent.js.map +1 -1
  160. package/lib/components/field/TextInput/TextInput.d.ts +6 -1
  161. package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
  162. package/lib/components/field/TextInput/TextInput.js +10 -7
  163. package/lib/components/field/TextInput/TextInput.js.map +1 -1
  164. package/lib/components/field/TextInput/index.js.map +1 -1
  165. package/lib/components/field/Time/Time.d.ts +5 -1
  166. package/lib/components/field/Time/Time.d.ts.map +1 -1
  167. package/lib/components/field/Time/Time.js +11 -9
  168. package/lib/components/field/Time/Time.js.map +1 -1
  169. package/lib/components/field/URL/URL.d.ts +5 -1
  170. package/lib/components/field/URL/URL.d.ts.map +1 -1
  171. package/lib/components/field/URL/URL.js +10 -8
  172. package/lib/components/field/URL/URL.js.map +1 -1
  173. package/lib/components/field/URL/index.js.map +1 -1
  174. package/lib/components/field/UserReference/UserReference.d.ts +20 -41
  175. package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
  176. package/lib/components/field/UserReference/UserReference.js +17 -46
  177. package/lib/components/field/UserReference/UserReference.js.map +1 -1
  178. package/lib/components/field/UserReference/UserReferenceUtils.js +2 -2
  179. package/lib/components/field/UserReference/UserReferenceUtils.js.map +1 -1
  180. package/lib/components/helpers/attachmentHelpers.d.ts +3 -3
  181. package/lib/components/helpers/attachmentHelpers.d.ts.map +1 -1
  182. package/lib/components/helpers/attachmentHelpers.js +6 -6
  183. package/lib/components/helpers/attachmentHelpers.js.map +1 -1
  184. package/lib/components/helpers/case-utils.d.ts.map +1 -1
  185. package/lib/components/helpers/case-utils.js +5 -4
  186. package/lib/components/helpers/case-utils.js.map +1 -1
  187. package/lib/components/helpers/common-utils.d.ts +2 -1
  188. package/lib/components/helpers/common-utils.d.ts.map +1 -1
  189. package/lib/components/helpers/common-utils.js +4 -1
  190. package/lib/components/helpers/common-utils.js.map +1 -1
  191. package/lib/components/helpers/data_page.d.ts.map +1 -1
  192. package/lib/components/helpers/data_page.js +2 -3
  193. package/lib/components/helpers/data_page.js.map +1 -1
  194. package/lib/components/helpers/date-format-utils.d.ts +1 -6
  195. package/lib/components/helpers/date-format-utils.d.ts.map +1 -1
  196. package/lib/components/helpers/date-format-utils.js.map +1 -1
  197. package/lib/components/helpers/event-utils.d.ts +1 -1
  198. package/lib/components/helpers/event-utils.d.ts.map +1 -1
  199. package/lib/components/helpers/event-utils.js +3 -3
  200. package/lib/components/helpers/event-utils.js.map +1 -1
  201. package/lib/components/helpers/field-group-utils.d.ts.map +1 -1
  202. package/lib/components/helpers/field-group-utils.js +3 -7
  203. package/lib/components/helpers/field-group-utils.js.map +1 -1
  204. package/lib/components/helpers/formatters/Boolean.d.ts.map +1 -1
  205. package/lib/components/helpers/formatters/Boolean.js +9 -20
  206. package/lib/components/helpers/formatters/Boolean.js.map +1 -1
  207. package/lib/components/helpers/formatters/Currency.d.ts +6 -6
  208. package/lib/components/helpers/formatters/Currency.d.ts.map +1 -1
  209. package/lib/components/helpers/formatters/Currency.js +13 -14
  210. package/lib/components/helpers/formatters/Currency.js.map +1 -1
  211. package/lib/components/helpers/formatters/CurrencyMap.d.ts +69 -320
  212. package/lib/components/helpers/formatters/CurrencyMap.d.ts.map +1 -1
  213. package/lib/components/helpers/formatters/CurrencyMap.js +500 -500
  214. package/lib/components/helpers/formatters/CurrencyMap.js.map +1 -1
  215. package/lib/components/helpers/formatters/Date.d.ts +5 -5
  216. package/lib/components/helpers/formatters/Date.d.ts.map +1 -1
  217. package/lib/components/helpers/formatters/Date.js +20 -20
  218. package/lib/components/helpers/formatters/Date.js.map +1 -1
  219. package/lib/components/helpers/formatters/common.d.ts +1 -1
  220. package/lib/components/helpers/formatters/common.d.ts.map +1 -1
  221. package/lib/components/helpers/formatters/common.js +1 -1
  222. package/lib/components/helpers/formatters/common.js.map +1 -1
  223. package/lib/components/helpers/formatters/index.d.ts +12 -12
  224. package/lib/components/helpers/formatters/index.d.ts.map +1 -1
  225. package/lib/components/helpers/formatters/index.js +25 -19
  226. package/lib/components/helpers/formatters/index.js.map +1 -1
  227. package/lib/components/helpers/reactContextHelpers.d.ts.map +1 -1
  228. package/lib/components/helpers/reactContextHelpers.js +1 -1
  229. package/lib/components/helpers/reactContextHelpers.js.map +1 -1
  230. package/lib/components/helpers/simpleTableHelpers.d.ts +3 -1
  231. package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
  232. package/lib/components/helpers/simpleTableHelpers.js +48 -54
  233. package/lib/components/helpers/simpleTableHelpers.js.map +1 -1
  234. package/lib/components/helpers/state-utils.d.ts.map +1 -1
  235. package/lib/components/helpers/state-utils.js +6 -8
  236. package/lib/components/helpers/state-utils.js.map +1 -1
  237. package/lib/components/helpers/template-utils.d.ts +7 -3
  238. package/lib/components/helpers/template-utils.d.ts.map +1 -1
  239. package/lib/components/helpers/template-utils.js +2 -2
  240. package/lib/components/helpers/template-utils.js.map +1 -1
  241. package/lib/components/helpers/utils.d.ts +1 -1
  242. package/lib/components/helpers/utils.d.ts.map +1 -1
  243. package/lib/components/helpers/utils.js +3 -8
  244. package/lib/components/helpers/utils.js.map +1 -1
  245. package/lib/components/helpers/versionHelpers.d.ts +6 -0
  246. package/lib/components/helpers/versionHelpers.d.ts.map +1 -1
  247. package/lib/components/helpers/versionHelpers.js +7 -1
  248. package/lib/components/helpers/versionHelpers.js.map +1 -1
  249. package/lib/components/infra/ActionButtons/ActionButtons.d.ts +6 -13
  250. package/lib/components/infra/ActionButtons/ActionButtons.d.ts.map +1 -1
  251. package/lib/components/infra/ActionButtons/ActionButtons.js +11 -27
  252. package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
  253. package/lib/components/infra/ActionButtons/index.js.map +1 -1
  254. package/lib/components/infra/Assignment/Assignment.d.ts +9 -16
  255. package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
  256. package/lib/components/infra/Assignment/Assignment.js +71 -74
  257. package/lib/components/infra/Assignment/Assignment.js.map +1 -1
  258. package/lib/components/infra/Assignment/index.js.map +1 -1
  259. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +7 -15
  260. package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
  261. package/lib/components/infra/AssignmentCard/AssignmentCard.js +6 -20
  262. package/lib/components/infra/AssignmentCard/AssignmentCard.js.map +1 -1
  263. package/lib/components/infra/AssignmentCard/index.js.map +1 -1
  264. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +10 -20
  265. package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
  266. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +63 -192
  267. package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
  268. package/lib/components/infra/Containers/FlowContainer/helpers.d.ts.map +1 -1
  269. package/lib/components/infra/Containers/FlowContainer/helpers.js +30 -30
  270. package/lib/components/infra/Containers/FlowContainer/helpers.js.map +1 -1
  271. package/lib/components/infra/Containers/FlowContainer/index.js.map +1 -1
  272. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts +9 -0
  273. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts.map +1 -0
  274. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js +36 -0
  275. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js.map +1 -0
  276. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/index.d.ts +2 -0
  277. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/index.d.ts.map +1 -0
  278. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/index.js +2 -0
  279. package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/index.js.map +1 -0
  280. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +8 -17
  281. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
  282. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +179 -172
  283. package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
  284. package/lib/components/infra/Containers/ModalViewContainer/index.js.map +1 -1
  285. package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts +9 -0
  286. package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts.map +1 -0
  287. package/lib/components/infra/Containers/SimpleView/SimpleView.js +29 -0
  288. package/lib/components/infra/Containers/SimpleView/SimpleView.js.map +1 -0
  289. package/lib/components/infra/Containers/SimpleView/helper.d.ts +10 -0
  290. package/lib/components/infra/Containers/SimpleView/helper.d.ts.map +1 -0
  291. package/lib/components/infra/Containers/SimpleView/helper.js +102 -0
  292. package/lib/components/infra/Containers/SimpleView/helper.js.map +1 -0
  293. package/lib/components/infra/Containers/SimpleView/index.d.ts +2 -0
  294. package/lib/components/infra/Containers/SimpleView/index.d.ts.map +1 -0
  295. package/lib/components/infra/Containers/SimpleView/index.js +2 -0
  296. package/lib/components/infra/Containers/SimpleView/index.js.map +1 -0
  297. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +9 -22
  298. package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
  299. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +24 -44
  300. package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
  301. package/lib/components/infra/Containers/helpers.d.ts +2 -0
  302. package/lib/components/infra/Containers/helpers.d.ts.map +1 -0
  303. package/lib/components/infra/Containers/helpers.js +7 -0
  304. package/lib/components/infra/Containers/helpers.js.map +1 -0
  305. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +9 -20
  306. package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
  307. package/lib/components/infra/DashboardFilter/DashboardFilter.js +15 -33
  308. package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
  309. package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -1
  310. package/lib/components/infra/DashboardFilter/filterUtils.js +10 -12
  311. package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
  312. package/lib/components/infra/DeferLoad/DeferLoad.d.ts +8 -13
  313. package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
  314. package/lib/components/infra/DeferLoad/DeferLoad.js +11 -22
  315. package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
  316. package/lib/components/infra/DeferLoad/index.js.map +1 -1
  317. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +5 -12
  318. package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
  319. package/lib/components/infra/ErrorBoundary/ErrorBoundary.js +17 -26
  320. package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
  321. package/lib/components/infra/MultiStep/MultiStep.css +11 -15
  322. package/lib/components/infra/MultiStep/MultiStep.d.ts +10 -18
  323. package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
  324. package/lib/components/infra/MultiStep/MultiStep.js +32 -97
  325. package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
  326. package/lib/components/infra/MultiStep/index.js.map +1 -1
  327. package/lib/components/infra/NavBar/NavBar.css +103 -105
  328. package/lib/components/infra/NavBar/NavBar.d.ts +8 -16
  329. package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
  330. package/lib/components/infra/NavBar/NavBar.js +19 -66
  331. package/lib/components/infra/NavBar/NavBar.js.map +1 -1
  332. package/lib/components/infra/Reference/Reference.d.ts +8 -17
  333. package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
  334. package/lib/components/infra/Reference/Reference.js +5 -17
  335. package/lib/components/infra/Reference/Reference.js.map +1 -1
  336. package/lib/components/infra/Region/Region.d.ts +4 -8
  337. package/lib/components/infra/Region/Region.d.ts.map +1 -1
  338. package/lib/components/infra/Region/Region.js +2 -7
  339. package/lib/components/infra/Region/Region.js.map +1 -1
  340. package/lib/components/infra/RootContainer/RootContainer.d.ts +13 -20
  341. package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
  342. package/lib/components/infra/RootContainer/RootContainer.js +41 -80
  343. package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
  344. package/lib/components/infra/RootContainer/index.js.map +1 -1
  345. package/lib/components/infra/Stages/Stages.d.ts +5 -8
  346. package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
  347. package/lib/components/infra/Stages/Stages.js +19 -27
  348. package/lib/components/infra/Stages/Stages.js.map +1 -1
  349. package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.d.ts.map +1 -1
  350. package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js +6 -8
  351. package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js.map +1 -1
  352. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts +4 -10
  353. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts.map +1 -1
  354. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +13 -17
  355. package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
  356. package/lib/components/infra/View/View.d.ts +13 -17
  357. package/lib/components/infra/View/View.d.ts.map +1 -1
  358. package/lib/components/infra/View/View.js +10 -32
  359. package/lib/components/infra/View/View.js.map +1 -1
  360. package/lib/components/template/AppShell/AppShell.css +22 -23
  361. package/lib/components/template/AppShell/AppShell.d.ts +20 -16
  362. package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
  363. package/lib/components/template/AppShell/AppShell.js +27 -45
  364. package/lib/components/template/AppShell/AppShell.js.map +1 -1
  365. package/lib/components/template/BannerPage/BannerPage.d.ts +12 -24
  366. package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
  367. package/lib/components/template/BannerPage/BannerPage.js +7 -25
  368. package/lib/components/template/BannerPage/BannerPage.js.map +1 -1
  369. package/lib/components/template/CaseSummary/CaseSummary.d.ts +5 -8
  370. package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
  371. package/lib/components/template/CaseSummary/CaseSummary.js +48 -12
  372. package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
  373. package/lib/components/template/CaseView/CaseView.d.ts +10 -23
  374. package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
  375. package/lib/components/template/CaseView/CaseView.js +22 -58
  376. package/lib/components/template/CaseView/CaseView.js.map +1 -1
  377. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +8 -15
  378. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
  379. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +37 -19
  380. package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
  381. package/lib/components/template/Confirmation/Confirmation.d.ts +10 -17
  382. package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
  383. package/lib/components/template/Confirmation/Confirmation.js +10 -28
  384. package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
  385. package/lib/components/template/DataReference/DataReference.d.ts +15 -30
  386. package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
  387. package/lib/components/template/DataReference/DataReference.js +35 -72
  388. package/lib/components/template/DataReference/DataReference.js.map +1 -1
  389. package/lib/components/template/DefaultForm/DefaultForm.css +7 -3
  390. package/lib/components/template/DefaultForm/DefaultForm.d.ts +7 -11
  391. package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
  392. package/lib/components/template/DefaultForm/DefaultForm.js +5 -15
  393. package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
  394. package/lib/components/template/Details/Details/Details.d.ts +7 -15
  395. package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
  396. package/lib/components/template/Details/Details/Details.js +8 -21
  397. package/lib/components/template/Details/Details/Details.js.map +1 -1
  398. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +7 -16
  399. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
  400. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js +6 -23
  401. package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
  402. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +7 -15
  403. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
  404. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +9 -22
  405. package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
  406. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +7 -15
  407. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
  408. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +9 -22
  409. package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
  410. package/lib/components/template/Details/DetailsTwoColumn/index.js.map +1 -1
  411. package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts +10 -0
  412. package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts.map +1 -0
  413. package/lib/components/template/Details/DynamicTabs/DynamicTabs.js +45 -0
  414. package/lib/components/template/Details/DynamicTabs/DynamicTabs.js.map +1 -0
  415. package/lib/components/template/Details/DynamicTabs/index.d.ts +2 -0
  416. package/lib/components/template/Details/DynamicTabs/index.d.ts.map +1 -0
  417. package/lib/components/template/Details/DynamicTabs/index.js +2 -0
  418. package/lib/components/template/Details/DynamicTabs/index.js.map +1 -0
  419. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +12 -19
  420. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
  421. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +11 -26
  422. package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
  423. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +7 -8
  424. package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
  425. package/lib/components/template/InlineDashboard/InlineDashboard.js +3 -14
  426. package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
  427. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +8 -16
  428. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
  429. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js +9 -17
  430. package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js.map +1 -1
  431. package/lib/components/template/ListPage/ListPage.d.ts +5 -13
  432. package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
  433. package/lib/components/template/ListPage/ListPage.js +7 -11
  434. package/lib/components/template/ListPage/ListPage.js.map +1 -1
  435. package/lib/components/template/ListView/DefaultViewMeta.d.ts.map +1 -1
  436. package/lib/components/template/ListView/DefaultViewMeta.js.map +1 -1
  437. package/lib/components/template/ListView/ListView.d.ts +15 -8
  438. package/lib/components/template/ListView/ListView.d.ts.map +1 -1
  439. package/lib/components/template/ListView/ListView.js +168 -258
  440. package/lib/components/template/ListView/ListView.js.map +1 -1
  441. package/lib/components/template/ListView/hooks.d.ts.map +1 -1
  442. package/lib/components/template/ListView/hooks.js +4 -6
  443. package/lib/components/template/ListView/hooks.js.map +1 -1
  444. package/lib/components/template/ListView/utils.d.ts +45 -1
  445. package/lib/components/template/ListView/utils.d.ts.map +1 -1
  446. package/lib/components/template/ListView/utils.js +165 -32
  447. package/lib/components/template/ListView/utils.js.map +1 -1
  448. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +9 -13
  449. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
  450. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js +5 -16
  451. package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -1
  452. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.css +0 -2
  453. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +11 -2
  454. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -1
  455. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js +2 -10
  456. package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js.map +1 -1
  457. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +7 -15
  458. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
  459. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +9 -22
  460. package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
  461. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.css +0 -2
  462. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +6 -2
  463. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -1
  464. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js +2 -5
  465. package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js.map +1 -1
  466. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +8 -15
  467. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
  468. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js +7 -18
  469. package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -1
  470. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +5 -8
  471. package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
  472. package/lib/components/template/OneColumn/OneColumn/OneColumn.js +9 -13
  473. package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
  474. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +4 -8
  475. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
  476. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js +5 -8
  477. package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -1
  478. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +5 -8
  479. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
  480. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js +2 -7
  481. package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js.map +1 -1
  482. package/lib/components/template/PromotedFilters/PromotedFilters.css +1 -1
  483. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +9 -14
  484. package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
  485. package/lib/components/template/PromotedFilters/PromotedFilters.js +14 -27
  486. package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
  487. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts +19 -1
  488. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
  489. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js +62 -13
  490. package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
  491. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +24 -2
  492. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
  493. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +120 -130
  494. package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
  495. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +14 -29
  496. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
  497. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js +15 -33
  498. package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
  499. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +14 -26
  500. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
  501. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js +8 -29
  502. package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
  503. package/lib/components/template/SubTabs/SubTabs.d.ts +5 -11
  504. package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
  505. package/lib/components/template/SubTabs/SubTabs.js +7 -17
  506. package/lib/components/template/SubTabs/SubTabs.js.map +1 -1
  507. package/lib/components/template/SubTabs/tabUtils.d.ts.map +1 -1
  508. package/lib/components/template/SubTabs/tabUtils.js +2 -4
  509. package/lib/components/template/SubTabs/tabUtils.js.map +1 -1
  510. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.css +0 -1
  511. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts +6 -12
  512. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
  513. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +15 -24
  514. package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
  515. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +4 -8
  516. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
  517. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js +5 -8
  518. package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -1
  519. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +6 -12
  520. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
  521. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +15 -21
  522. package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
  523. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.css +0 -2
  524. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +11 -2
  525. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
  526. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js +3 -11
  527. package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js.map +1 -1
  528. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +7 -15
  529. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
  530. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +23 -26
  531. package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
  532. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.css +0 -2
  533. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +6 -2
  534. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -1
  535. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js +2 -5
  536. package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js.map +1 -1
  537. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +8 -15
  538. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
  539. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js +7 -17
  540. package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js.map +1 -1
  541. package/lib/components/template/WideNarrow/WideNarrowPage/index.js.map +1 -1
  542. package/lib/components/template/WssNavBar/WssNavBar.d.ts +18 -1
  543. package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -1
  544. package/lib/components/template/WssNavBar/WssNavBar.js +20 -37
  545. package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
  546. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts +9 -17
  547. package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
  548. package/lib/components/widget/AppAnnouncement/AppAnnouncement.js +13 -37
  549. package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
  550. package/lib/components/widget/Attachment/Attachment.css +60 -1
  551. package/lib/components/widget/Attachment/Attachment.d.ts +8 -1
  552. package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
  553. package/lib/components/widget/Attachment/Attachment.js +277 -343
  554. package/lib/components/widget/Attachment/Attachment.js.map +1 -1
  555. package/lib/components/widget/Attachment/index.js.map +1 -1
  556. package/lib/components/widget/CaseHistory/CaseHistory.d.ts +4 -7
  557. package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
  558. package/lib/components/widget/CaseHistory/CaseHistory.js +38 -36
  559. package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
  560. package/lib/components/widget/CaseHistory/index.js.map +1 -1
  561. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +9 -1
  562. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts.map +1 -1
  563. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js +2 -4
  564. package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
  565. package/lib/components/widget/FileUtility/FileUtility/FileUtility.css +2 -2
  566. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +5 -1
  567. package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
  568. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +121 -140
  569. package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
  570. package/lib/components/widget/Followers/Followers.d.ts +5 -6
  571. package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
  572. package/lib/components/widget/Followers/Followers.js +10 -25
  573. package/lib/components/widget/Followers/Followers.js.map +1 -1
  574. package/lib/components/widget/QuickCreate/QuickCreate.d.ts +8 -1
  575. package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
  576. package/lib/components/widget/QuickCreate/QuickCreate.js +59 -29
  577. package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
  578. package/lib/components/widget/SummaryItem/SummaryItem.css +9 -9
  579. package/lib/components/widget/SummaryItem/SummaryItem.d.ts +8 -1
  580. package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
  581. package/lib/components/widget/SummaryItem/SummaryItem.js +8 -23
  582. package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
  583. package/lib/components/widget/SummaryItem/index.js.map +1 -1
  584. package/lib/components/widget/SummaryList/SummaryList.d.ts +8 -1
  585. package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
  586. package/lib/components/widget/SummaryList/SummaryList.js +6 -3
  587. package/lib/components/widget/SummaryList/SummaryList.js.map +1 -1
  588. package/lib/components/widget/ToDo/ToDo.css +4 -4
  589. package/lib/components/widget/ToDo/ToDo.d.ts +13 -27
  590. package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
  591. package/lib/components/widget/ToDo/ToDo.js +26 -98
  592. package/lib/components/widget/ToDo/ToDo.js.map +1 -1
  593. package/lib/components_map.d.ts +2 -2
  594. package/lib/components_map.d.ts.map +1 -1
  595. package/lib/components_map.js +4 -2
  596. package/lib/components_map.js.map +1 -1
  597. package/lib/doc/KeyReleaseUpdates.md +39 -0
  598. package/lib/hooks/index.d.ts +4 -0
  599. package/lib/hooks/index.d.ts.map +1 -0
  600. package/lib/hooks/index.js +4 -0
  601. package/lib/hooks/index.js.map +1 -0
  602. package/lib/hooks/useAfterInitialEffect.d.ts +9 -0
  603. package/lib/hooks/useAfterInitialEffect.d.ts.map +1 -0
  604. package/lib/hooks/useAfterInitialEffect.js +16 -0
  605. package/lib/hooks/useAfterInitialEffect.js.map +1 -0
  606. package/lib/hooks/useConsolidatedRef.d.ts +9 -0
  607. package/lib/hooks/useConsolidatedRef.d.ts.map +1 -0
  608. package/lib/hooks/useConsolidatedRef.js +30 -0
  609. package/lib/hooks/useConsolidatedRef.js.map +1 -0
  610. package/lib/hooks/useUID.d.ts +8 -0
  611. package/lib/hooks/useUID.d.ts.map +1 -0
  612. package/lib/hooks/useUID.js +14 -0
  613. package/lib/hooks/useUID.js.map +1 -0
  614. package/lib/index.d.ts +1 -0
  615. package/lib/index.d.ts.map +1 -1
  616. package/lib/index.js +2 -1
  617. package/lib/index.js.map +1 -1
  618. package/lib/sdk-local-component-map.js +2 -2
  619. package/lib/sdk-pega-component-map.d.ts +21 -1
  620. package/lib/sdk-pega-component-map.js +112 -92
  621. package/lib/sdk-pega-component-map.js.map +1 -1
  622. package/lib/types/PConnProps.d.ts +41 -0
  623. package/package.json +5 -2
  624. package/lib/components/helpers/auth.d.ts +0 -16
  625. package/lib/components/helpers/auth.d.ts.map +0 -1
  626. package/lib/components/helpers/auth.js +0 -437
  627. package/lib/components/helpers/auth.js.map +0 -1
  628. package/lib/components/helpers/authManager.d.ts +0 -18
  629. package/lib/components/helpers/authManager.d.ts.map +0 -1
  630. package/lib/components/helpers/authManager.js +0 -592
  631. package/lib/components/helpers/authManager.js.map +0 -1
  632. package/lib/components/helpers/config_access.d.ts +0 -3
  633. package/lib/components/helpers/config_access.d.ts.map +0 -1
  634. package/lib/components/helpers/config_access.js +0 -261
  635. package/lib/components/helpers/config_access.js.map +0 -1
@@ -1,83 +1,91 @@
1
- import React, { useState } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useState } from 'react';
2
3
  import { Button, Grid, IconButton, Snackbar } from '@material-ui/core';
3
4
  import CloseIcon from '@material-ui/icons/Close';
4
5
  import './CancelAlert.css';
5
- const CancelAlert = props => {
6
- const { pConn, updateAlertState } = props;
7
- const [showSnackbar, setShowSnackbar] = useState(false);
8
- const [snackbarMessage, setSnackbarMessage] = useState('');
9
- const itemKey = pConn.getContextName();
10
- const caseInfo = pConn.getCaseInfo();
11
- const caseName = caseInfo.getName();
12
- const ID = caseInfo.getID();
6
+ export default function CancelAlert(props) {
7
+ const { heading, content, getPConnect, itemKey: containerItemID, hideDelete, isDataObject, skipReleaseLockRequest, dismiss } = props;
8
+ const actionsAPI = getPConnect().getActionsApi();
9
+ const containerManagerAPI = getPConnect().getContainerManager();
10
+ const isLocalAction = getPConnect().getValue(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION);
11
+ const isBulkAction = getPConnect()?.options?.isBulkAction;
13
12
  const localizedVal = PCore.getLocaleUtils().getLocaleValue;
13
+ const broadCastUtils = PCore.getCoexistenceManager().getBroadcastUtils();
14
+ const isReverseCoexistence = broadCastUtils.isReverseCoexistenceCaseLoaded();
14
15
  const localeCategory = 'ModalContainer';
15
- function showToast(message) {
16
- setSnackbarMessage(message);
17
- setShowSnackbar(true);
18
- }
19
- const dismissCancelAlertOnly = () => {
20
- updateAlertState(true);
21
- };
22
- const dismissModal = () => {
23
- updateAlertState(false);
16
+ const btnIds = {
17
+ SAVE_AND_CLOSE: 'saveAndClose',
18
+ CONTINUE_WORKING: 'continueWorking',
19
+ DELETE: 'delete'
24
20
  };
21
+ const [buttonsState, setButtonsState] = useState({
22
+ [btnIds.SAVE_AND_CLOSE]: false,
23
+ [btnIds.DELETE]: false
24
+ });
25
+ const [showSnackbar, setShowSnackbar] = useState(false);
26
+ const [snackbarMessage, setSnackbarMessage] = useState('');
27
+ function disableButton(id) {
28
+ setButtonsState(prevState => ({
29
+ ...prevState,
30
+ [id]: true
31
+ }));
32
+ }
33
+ function enableButton(id) {
34
+ setButtonsState(prevState => ({
35
+ ...prevState,
36
+ [id]: false
37
+ }));
38
+ }
39
+ function cancelHandler() {
40
+ if (isReverseCoexistence) {
41
+ dismiss(true);
42
+ // @ts-ignore - An argument for 'payload' was not provided.
43
+ PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD);
44
+ }
45
+ else if (!isDataObject && !isLocalAction && !isBulkAction) {
46
+ disableButton(btnIds.DELETE);
47
+ actionsAPI
48
+ .deleteCaseInCreateStage(containerItemID, hideDelete)
49
+ .then(() => {
50
+ // @ts-ignore - An argument for 'payload' was not provided.
51
+ PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.EVENT_CANCEL);
52
+ })
53
+ .catch(() => {
54
+ setSnackbarMessage(localizedVal('Delete failed.', localeCategory));
55
+ setShowSnackbar(true);
56
+ })
57
+ .finally(() => {
58
+ enableButton(btnIds.DELETE);
59
+ dismiss(true);
60
+ });
61
+ }
62
+ else if (isLocalAction) {
63
+ dismiss(true);
64
+ actionsAPI.cancelAssignment(containerItemID);
65
+ }
66
+ else if (isBulkAction) {
67
+ dismiss(true);
68
+ actionsAPI.cancelBulkAction(containerItemID);
69
+ }
70
+ else {
71
+ dismiss(true);
72
+ containerManagerAPI.removeContainerItem({ containerItemID, skipReleaseLockRequest });
73
+ }
74
+ }
25
75
  function handleSnackbarClose(event, reason) {
26
76
  if (reason === 'clickaway') {
27
77
  return;
28
78
  }
29
79
  setShowSnackbar(false);
30
80
  }
31
- const buttonClick = action => {
32
- const actionsAPI = pConn.getActionsApi();
33
- switch (action) {
34
- case 'save':
35
- // eslint-disable-next-line no-case-declarations
36
- const savePromise = actionsAPI.saveAndClose(itemKey);
37
- savePromise
38
- .then(() => {
39
- dismissModal();
40
- PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.CASE_CREATED);
41
- })
42
- .catch(() => {
43
- showToast(localizedVal('Save failed', localeCategory));
44
- });
45
- break;
46
- case 'continue':
47
- dismissCancelAlertOnly();
48
- break;
49
- case 'delete':
50
- // eslint-disable-next-line no-case-declarations
51
- const deletePromise = actionsAPI.deleteCaseInCreateStage(itemKey);
52
- deletePromise
53
- .then(() => {
54
- dismissModal();
55
- PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.EVENT_CANCEL);
56
- })
57
- .catch(() => {
58
- showToast(localizedVal('Delete failed.', localeCategory));
59
- });
60
- break;
61
- default:
62
- break;
63
- }
64
- };
65
- return (React.createElement(React.Fragment, null,
66
- React.createElement("div", { className: 'cancel-alert-background' },
67
- React.createElement("div", { className: 'cancel-alert-top' },
68
- React.createElement("h3", null, `Delete ${caseName}(${ID})`),
69
- React.createElement("div", null,
70
- React.createElement("p", null, `${localizedVal('Are you sure you want to delete', localeCategory)} ${caseName} (${ID})?`),
71
- React.createElement("p", null, localizedVal('Alternatively, you can continue working or save your work for later.', localeCategory))),
72
- React.createElement("div", { className: 'action-controls' },
73
- React.createElement(Grid, { container: true, spacing: 4, justifyContent: 'space-between' },
74
- React.createElement(Grid, { item: true },
75
- React.createElement(Button, { variant: 'outlined', color: 'primary', onClick: () => buttonClick('save') }, localizedVal('Save for later', localeCategory))),
76
- React.createElement(Grid, { item: true },
77
- React.createElement(Button, { variant: 'outlined', color: 'primary', onClick: () => buttonClick('continue') }, localizedVal('Continue Working', localeCategory)),
78
- React.createElement(Button, { variant: 'contained', color: 'primary', onClick: () => buttonClick('delete') }, localizedVal('Delete', localeCategory))))))),
79
- React.createElement(Snackbar, { open: showSnackbar, autoHideDuration: 3000, onClose: handleSnackbarClose, message: snackbarMessage, action: React.createElement(IconButton, { size: 'small', "aria-label": 'close', color: 'inherit', onClick: handleSnackbarClose },
80
- React.createElement(CloseIcon, { fontSize: 'small' })) })));
81
- };
82
- export default CancelAlert;
81
+ const leftButton = (_jsx(Button, { name: btnIds.CONTINUE_WORKING, variant: 'contained', color: 'secondary', onClick: () => {
82
+ dismiss();
83
+ if (isReverseCoexistence) {
84
+ broadCastUtils.setCallBackFunction(null);
85
+ broadCastUtils.setIsDirtyDialogActive(false);
86
+ }
87
+ }, children: localizedVal('Go back', localeCategory) }));
88
+ const rightButton = (_jsx(Button, { name: btnIds.DELETE, variant: 'contained', color: 'primary', disabled: buttonsState[btnIds.DELETE], onClick: cancelHandler, children: localizedVal('Discard', localeCategory) }));
89
+ return (_jsxs(_Fragment, { children: [_jsx("div", { className: 'cancel-alert-background', children: _jsxs("div", { className: 'cancel-alert-top', children: [_jsx("h3", { children: localizedVal(heading, localeCategory) }), _jsx("div", { children: _jsx("p", { children: localizedVal(content, localeCategory) }) }), _jsx("div", { className: 'action-controls', children: _jsxs(Grid, { container: true, spacing: 4, justifyContent: 'space-between', children: [_jsx(Grid, { item: true, children: leftButton }), _jsx(Grid, { item: true, children: rightButton })] }) })] }) }), _jsx(Snackbar, { open: showSnackbar, autoHideDuration: 3000, onClose: handleSnackbarClose, message: snackbarMessage, action: _jsx(IconButton, { size: 'small', "aria-label": 'close', color: 'inherit', onClick: handleSnackbarClose, children: _jsx(CloseIcon, { fontSize: 'small' }) }) })] }));
90
+ }
83
91
  //# sourceMappingURL=CancelAlert.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CancelAlert.js","sourceRoot":"","sources":["../../../../src/components/field/CancelAlert/CancelAlert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,SAAS,MA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E,EAAE,cAAc,CAAC,CAAK,CACzG;gBACN,6BAAK,SAAS,EAAC,iBAAiB;oBAC9B,oBAAC,IAAI,IAAC,SAAS,QAAC,OAAO,EAAE,CAAC,EAAE,cAAc,EAAC,eAAe;wBACxD,oBAAC,IAAI,IAAC,IAAI;4BACR,oBAAC,MAAM,IAAC,OAAO,EAAC,UAAU,EAAC,KAAK,EAAC,SAAS,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC,IAC1E,YAAY,CAAC,gBAAgB,EAAE,cAAc,CAAC,CACxC,CACJ;wBACP,oBAAC,IAAI,IAAC,IAAI;4BACR,oBAAC,MAAM,IAAC,OAAO,EAAC,UAAU,EAAC,KAAK,EAAC,SAAS,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,UAAU,CAAC,IAC9E,YAAY,CAAC,kBAAkB,EAAE,cAAc,CAAC,CAC1C;4BACT,oBAAC,MAAM,IAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,SAAS,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,IAC7E,YAAY,CAAC,QAAQ,EAAE,cAAc,CAAC,CAChC,CACJ,CACF,CACH,CACF,CACF;QACN,oBAAC,QAAQ,IACP,IAAI,EAAE,YAAY,EAClB,gBAAgB,EAAE,IAAI,EACtB,OAAO,EAAE,mBAAmB,EAC5B,OAAO,EAAE,eAAe,EACxB,MAAM,EACJ,oBAAC,UAAU,IAAC,IAAI,EAAC,OAAO,gBAAY,OAAO,EAAC,KAAK,EAAC,SAAS,EAAC,OAAO,EAAE,mBAAmB;gBACtF,oBAAC,SAAS,IAAC,QAAQ,EAAC,OAAO,GAAG,CACnB,GAEf,CACD,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import React, { useState } from 'react';\nimport { Button, Grid, IconButton, Snackbar } from '@material-ui/core';\nimport CloseIcon from '@material-ui/icons/Close';\n\nimport './CancelAlert.css';\n\n// Remove this and use \"real\" PCore type once .d.ts is fixed (currently shows 2 errors)\ndeclare const PCore: any;\n\n\nconst CancelAlert = props => {\n const { pConn, updateAlertState } = props;\n const [showSnackbar, setShowSnackbar] = useState(false);\n const [snackbarMessage, setSnackbarMessage] = useState('');\n\n const itemKey = pConn.getContextName();\n const caseInfo = pConn.getCaseInfo();\n const caseName = caseInfo.getName();\n const ID = caseInfo.getID();\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'ModalContainer';\n\n function showToast(message: string) {\n setSnackbarMessage(message);\n setShowSnackbar(true);\n }\n\n const dismissCancelAlertOnly = () => {\n updateAlertState(true);\n };\n\n const dismissModal = () => {\n updateAlertState(false);\n };\n\n function handleSnackbarClose(event: React.SyntheticEvent | React.MouseEvent, reason?: string) {\n if (reason === 'clickaway') {\n return;\n }\n setShowSnackbar(false);\n }\n\n const buttonClick = action => {\n const actionsAPI = pConn.getActionsApi();\n\n switch (action) {\n case 'save':\n // eslint-disable-next-line no-case-declarations\n const savePromise = actionsAPI.saveAndClose(itemKey);\n\n savePromise\n .then(() => {\n dismissModal();\n\n PCore.getPubSubUtils().publish(\n PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.CASE_CREATED\n );\n })\n .catch(() => {\n showToast(localizedVal('Save failed', localeCategory));\n });\n break;\n\n case 'continue':\n dismissCancelAlertOnly();\n break;\n\n case 'delete':\n // eslint-disable-next-line no-case-declarations\n const deletePromise = actionsAPI.deleteCaseInCreateStage(itemKey);\n\n deletePromise\n .then(() => {\n dismissModal();\n PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.EVENT_CANCEL);\n })\n .catch(() => {\n showToast(localizedVal('Delete failed.', localeCategory));\n });\n break;\n\n default:\n break;\n }\n };\n\n return (\n <>\n <div className='cancel-alert-background'>\n <div className='cancel-alert-top'>\n <h3>{`Delete ${caseName}(${ID})`}</h3>\n <div>\n <p>{`${localizedVal('Are you sure you want to delete', localeCategory)} ${caseName} (${ID})?`}</p>\n <p>{localizedVal('Alternatively, you can continue working or save your work for later.', localeCategory)}</p>\n </div>\n <div className='action-controls'>\n <Grid container spacing={4} justifyContent='space-between'>\n <Grid item>\n <Button variant='outlined' color='primary' onClick={() => buttonClick('save')}>\n {localizedVal('Save for later', localeCategory)}\n </Button>\n </Grid>\n <Grid item>\n <Button variant='outlined' color='primary' onClick={() => buttonClick('continue')}>\n {localizedVal('Continue Working', localeCategory)}\n </Button>\n <Button variant='contained' color='primary' onClick={() => buttonClick('delete')}>\n {localizedVal('Delete', localeCategory)}\n </Button>\n </Grid>\n </Grid>\n </div>\n </div>\n </div>\n <Snackbar\n open={showSnackbar}\n autoHideDuration={3000}\n onClose={handleSnackbarClose}\n message={snackbarMessage}\n action={\n <IconButton size='small' aria-label='close' color='inherit' onClick={handleSnackbarClose}>\n <CloseIcon fontSize='small' />\n </IconButton>\n }\n />\n </>\n );\n};\n\nexport default CancelAlert;\n"]}
1
+ {"version":3,"file":"CancelAlert.js","sourceRoot":"","sources":["../../../../src/components/field/CancelAlert/CancelAlert.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,SAAS,MAAM,0BAA0B,CAAC;AAGjD,OAAO,mBAAmB,CAAC;AAa3B,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAuB;IACzD,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,YAAY,EAAE,sBAAsB,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACrI,MAAM,UAAU,GAAG,WAAW,EAAE,CAAC,aAAa,EAAE,CAAC;IACjD,MAAM,mBAAmB,GAAG,WAAW,EAAE,CAAC,mBAAmB,EAAE,CAAC;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ACF,GACF,EACN,KAAC,QAAQ,IACP,IAAI,EAAE,YAAY,EAClB,gBAAgB,EAAE,IAAI,EACtB,OAAO,EAAE,mBAAmB,EAC5B,OAAO,EAAE,eAAe,EACxB,MAAM,EACJ,KAAC,UAAU,IAAC,IAAI,EAAC,OAAO,gBAAY,OAAO,EAAC,KAAK,EAAC,SAAS,EAAC,OAAO,EAAE,mBAAmB,YACtF,KAAC,SAAS,IAAC,QAAQ,EAAC,OAAO,GAAG,GACnB,GAEf,IACD,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import React, { useState } from 'react';\nimport { Button, Grid, IconButton, Snackbar } from '@material-ui/core';\nimport CloseIcon from '@material-ui/icons/Close';\n\nimport { PConnFieldProps } from '../../../types/PConnProps';\nimport './CancelAlert.css';\n\ninterface CancelAlertProps extends PConnFieldProps {\n // If any, enter additional props that only exist on CancelAlert here\n heading: string;\n content: string;\n itemKey: string;\n hideDelete: boolean;\n isDataObject: boolean;\n skipReleaseLockRequest: any;\n dismiss: Function;\n}\n\nexport default function CancelAlert(props: CancelAlertProps) {\n const { heading, content, getPConnect, itemKey: containerItemID, hideDelete, isDataObject, skipReleaseLockRequest, dismiss } = props;\n const actionsAPI = getPConnect().getActionsApi();\n const containerManagerAPI = getPConnect().getContainerManager();\n const isLocalAction = getPConnect().getValue(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION);\n const isBulkAction = getPConnect()?.options?.isBulkAction;\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const broadCastUtils: any = PCore.getCoexistenceManager().getBroadcastUtils();\n const isReverseCoexistence = broadCastUtils.isReverseCoexistenceCaseLoaded();\n const localeCategory = 'ModalContainer';\n const btnIds = {\n SAVE_AND_CLOSE: 'saveAndClose',\n CONTINUE_WORKING: 'continueWorking',\n DELETE: 'delete'\n };\n\n const [buttonsState, setButtonsState] = useState({\n [btnIds.SAVE_AND_CLOSE]: false,\n [btnIds.DELETE]: false\n });\n\n const [showSnackbar, setShowSnackbar] = useState(false);\n const [snackbarMessage, setSnackbarMessage] = useState('');\n\n function disableButton(id) {\n setButtonsState(prevState => ({\n ...prevState,\n [id]: true\n }));\n }\n\n function enableButton(id) {\n setButtonsState(prevState => ({\n ...prevState,\n [id]: false\n }));\n }\n\n function cancelHandler() {\n if (isReverseCoexistence) {\n dismiss(true);\n // @ts-ignore - An argument for 'payload' was not provided.\n PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD);\n } else if (!isDataObject && !isLocalAction && !isBulkAction) {\n disableButton(btnIds.DELETE);\n actionsAPI\n .deleteCaseInCreateStage(containerItemID, hideDelete)\n .then(() => {\n // @ts-ignore - An argument for 'payload' was not provided.\n PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.EVENT_CANCEL);\n })\n .catch(() => {\n setSnackbarMessage(localizedVal('Delete failed.', localeCategory));\n setShowSnackbar(true);\n })\n .finally(() => {\n enableButton(btnIds.DELETE);\n dismiss(true);\n });\n } else if (isLocalAction) {\n dismiss(true);\n actionsAPI.cancelAssignment(containerItemID);\n } else if (isBulkAction) {\n dismiss(true);\n actionsAPI.cancelBulkAction(containerItemID);\n } else {\n dismiss(true);\n containerManagerAPI.removeContainerItem({ containerItemID, skipReleaseLockRequest });\n }\n }\n\n function handleSnackbarClose(event: React.SyntheticEvent | React.MouseEvent, reason?: string) {\n if (reason === 'clickaway') {\n return;\n }\n setShowSnackbar(false);\n }\n\n const leftButton = (\n <Button\n name={btnIds.CONTINUE_WORKING}\n variant='contained'\n color='secondary'\n onClick={() => {\n dismiss();\n if (isReverseCoexistence) {\n broadCastUtils.setCallBackFunction(null);\n broadCastUtils.setIsDirtyDialogActive(false);\n }\n }}\n >\n {localizedVal('Go back', localeCategory)}\n </Button>\n );\n\n const rightButton = (\n <Button name={btnIds.DELETE} variant='contained' color='primary' disabled={buttonsState[btnIds.DELETE]} onClick={cancelHandler}>\n {localizedVal('Discard', localeCategory)}\n </Button>\n );\n\n return (\n <>\n <div className='cancel-alert-background'>\n <div className='cancel-alert-top'>\n <h3>{localizedVal(heading, localeCategory)}</h3>\n <div>\n <p>{localizedVal(content, localeCategory)}</p>\n </div>\n <div className='action-controls'>\n <Grid container spacing={4} justifyContent='space-between'>\n <Grid item>{leftButton}</Grid>\n <Grid item>{rightButton}</Grid>\n </Grid>\n </div>\n </div>\n </div>\n <Snackbar\n open={showSnackbar}\n autoHideDuration={3000}\n onClose={handleSnackbarClose}\n message={snackbarMessage}\n action={\n <IconButton size='small' aria-label='close' color='inherit' onClick={handleSnackbarClose}>\n <CloseIcon fontSize='small' />\n </IconButton>\n }\n />\n </>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/field/CancelAlert/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC","sourcesContent":["export { default } from './CancelAlert';"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/field/CancelAlert/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC","sourcesContent":["export { default } from './CancelAlert';\n"]}
@@ -1,3 +1,11 @@
1
1
  /// <reference types="react" />
2
- export default function CheckboxComponent(props: any): JSX.Element;
2
+ import { PConnFieldProps } from '../../../types/PConnProps';
3
+ interface CheckboxProps extends Omit<PConnFieldProps, 'value'> {
4
+ value?: boolean;
5
+ caption?: string;
6
+ trueLabel?: string;
7
+ falseLabel?: string;
8
+ }
9
+ export default function CheckboxComponent(props: CheckboxProps): JSX.Element;
10
+ export {};
3
11
  //# sourceMappingURL=Checkbox.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Checkbox/Checkbox.tsx"],"names":[],"mappings":";AAWA,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAAK,KAAA,eAqE9C"}
1
+ {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Checkbox/Checkbox.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,UAAU,aAAc,SAAQ,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC;IAE5D,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAAK,EAAE,aAAa,eA2E7D"}
@@ -1,13 +1,16 @@
1
- import React, { useState, useEffect } from 'react';
2
- import { Checkbox, FormControl, FormControlLabel, FormGroup, FormHelperText } from '@material-ui/core';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState, useEffect } from 'react';
3
+ import { Checkbox, FormControl, FormControlLabel, FormGroup, FormHelperText, FormLabel } from '@material-ui/core';
3
4
  import handleEvent from '../../helpers/event-utils';
4
- import FieldValueList from '../../designSystemExtension/FieldValueList';
5
+ import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
5
6
  export default function CheckboxComponent(props) {
6
- const { getPConnect, label, value = false, readOnly, testId, required, disabled, status, helperText, validatemessage, displayMode, hideLabel } = props;
7
+ // Get emitted components from map (so we can get any override that may exist)
8
+ const FieldValueList = getComponentFromMap('FieldValueList');
9
+ const { getPConnect, label, value = false, readOnly, testId, required, disabled, status, helperText, validatemessage, displayMode, hideLabel, trueLabel, falseLabel } = props;
7
10
  const helperTextToDisplay = validatemessage || helperText;
8
11
  const thePConn = getPConnect();
9
12
  const theConfigProps = thePConn.getConfigProps();
10
- const { caption } = theConfigProps;
13
+ const caption = theConfigProps.caption;
11
14
  const actionsApi = thePConn.getActionsApi();
12
15
  const propName = thePConn.getStateProps().value;
13
16
  const [checked, setChecked] = useState(false);
@@ -16,10 +19,10 @@ export default function CheckboxComponent(props) {
16
19
  setChecked(value);
17
20
  }, [value]);
18
21
  if (displayMode === 'LABELS_LEFT') {
19
- return React.createElement(FieldValueList, { name: hideLabel ? '' : label, value: value });
22
+ return _jsx(FieldValueList, { name: hideLabel ? '' : caption, value: value ? trueLabel : falseLabel });
20
23
  }
21
24
  if (displayMode === 'STACKED_LARGE_VAL') {
22
- return React.createElement(FieldValueList, { name: hideLabel ? '' : label, value: value, variant: 'stacked' });
25
+ return _jsx(FieldValueList, { name: hideLabel ? '' : caption, value: value ? trueLabel : falseLabel, variant: 'stacked' });
23
26
  }
24
27
  const handleChange = event => {
25
28
  handleEvent(actionsApi, 'changeNblur', propName, event.target.checked);
@@ -27,15 +30,12 @@ export default function CheckboxComponent(props) {
27
30
  const handleBlur = event => {
28
31
  thePConn.getValidationApi().validate(event.target.checked);
29
32
  };
30
- let theCheckbox = React.createElement(Checkbox, { color: 'primary', disabled: disabled });
33
+ let theCheckbox = _jsx(Checkbox, { color: 'primary', disabled: disabled });
31
34
  if (readOnly) {
32
35
  // Workaround for lack of InputProps readOnly from https://github.com/mui-org/material-ui/issues/17043
33
36
  // Also note that we need to turn off the onChange call in the FormControlLabel wrapper, too. See below!
34
- theCheckbox = React.createElement(Checkbox, { value: value || false, readOnly: readOnly });
37
+ theCheckbox = _jsx(Checkbox, { value: value || false, readOnly: readOnly });
35
38
  }
36
- return (React.createElement(FormControl, { required: required, error: status === 'error' },
37
- React.createElement(FormGroup, null,
38
- React.createElement(FormControlLabel, { control: theCheckbox, checked: checked, onChange: !readOnly ? handleChange : undefined, onBlur: !readOnly ? handleBlur : undefined, label: caption, labelPlacement: 'end', "data-test-id": testId })),
39
- React.createElement(FormHelperText, null, helperTextToDisplay)));
39
+ return (_jsxs(FormControl, { required: required, error: status === 'error', children: [!hideLabel && _jsx(FormLabel, { component: 'legend', children: label }), _jsx(FormGroup, { children: _jsx(FormControlLabel, { control: theCheckbox, checked: checked, onChange: !readOnly ? handleChange : undefined, onBlur: !readOnly ? handleBlur : undefined, label: caption, labelPlacement: 'end', "data-test-id": testId }) }), _jsx(FormHelperText, { children: helperTextToDisplay })] }));
40
40
  }
41
41
  //# sourceMappingURL=Checkbox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../../src/components/field/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EACL,QAAQ,EACR,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,cAAc,EACf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,cAAc,MAAM,4CAA4C,CAAC;AAExE,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAAK;IAC7C,MAAM,EACJ,WAAW,EACX,KAAK,EACL,KAAK,GAAG,KAAK,EACb,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,UAAU,EACV,eAAe,EACf,WAAW,EACX,SAAS,EACV,GAAG,KAAK,CAAC;IACV,MAAM,mBAAmB,GAAG,eAAe,IAAI,UAAU,CAAC;IAE1D,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,cAAc,GAAG,QAAQ,CAAC,cAAc,EAAE,CAAC;IACjD,MAAM,EAAE,OAAO,EAAE,GAAG,cAAc,CAAC;IACnC,MAAM,UAAU,GAAG,QAAQ,CAAC,aAAa,EAAE,CAAC;IAC5C,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,EAAE,CAAC,KAAK,CAAC;IAEhD,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9C,SAAS,CAAC,GAAG,EAAE;QACb,+FAA+F;QAC/F,UAAU,CAAC,KAAK,CAAC,CAAC;IACpB,CA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AY,CAAC,CAAC,CAAC,SAAS,EAC9C,MAAM,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,EAC1C,KAAK,EAAE,OAAO,EACd,cAAc,EAAC,KAAK,kBACN,MAAM,GACpB,CACQ;QACZ,oBAAC,cAAc,QAAE,mBAAmB,CAAkB,CAC1C,CACf,CAAC;AACJ,CAAC","sourcesContent":["import React, { useState, useEffect } from 'react';\nimport {\n Checkbox,\n FormControl,\n FormControlLabel,\n FormGroup,\n FormHelperText\n} from '@material-ui/core';\nimport handleEvent from '../../helpers/event-utils';\nimport FieldValueList from '../../designSystemExtension/FieldValueList';\n\nexport default function CheckboxComponent(props) {\n const {\n getPConnect,\n label,\n value = false,\n readOnly,\n testId,\n required,\n disabled,\n status,\n helperText,\n validatemessage,\n displayMode,\n hideLabel\n } = props;\n const helperTextToDisplay = validatemessage || helperText;\n\n const thePConn = getPConnect();\n const theConfigProps = thePConn.getConfigProps();\n const { caption } = theConfigProps;\n const actionsApi = thePConn.getActionsApi();\n const propName = thePConn.getStateProps().value;\n\n const [checked, setChecked] = useState(false);\n useEffect(() => {\n // This update theSelectedButton which will update the UI to show the selected button correctly\n setChecked(value);\n }, [value]);\n\n if (displayMode === 'LABELS_LEFT') {\n return <FieldValueList name={hideLabel ? '' : label} value={value} />;\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n return <FieldValueList name={hideLabel ? '' : label} value={value} variant='stacked' />;\n }\n\n const handleChange = event => {\n handleEvent(actionsApi, 'changeNblur', propName, event.target.checked);\n };\n\n const handleBlur = event => {\n thePConn.getValidationApi().validate(event.target.checked);\n };\n\n let theCheckbox = <Checkbox color='primary' disabled={disabled} />;\n\n if (readOnly) {\n // Workaround for lack of InputProps readOnly from https://github.com/mui-org/material-ui/issues/17043\n // Also note that we need to turn off the onChange call in the FormControlLabel wrapper, too. See below!\n theCheckbox = <Checkbox value={value || false} readOnly={readOnly} />;\n }\n\n return (\n <FormControl required={required} error={status === 'error'}>\n <FormGroup>\n <FormControlLabel\n control={theCheckbox}\n checked={checked}\n onChange={!readOnly ? handleChange : undefined}\n onBlur={!readOnly ? handleBlur : undefined}\n label={caption}\n labelPlacement='end'\n data-test-id={testId}\n />\n </FormGroup>\n <FormHelperText>{helperTextToDisplay}</FormHelperText>\n </FormControl>\n );\n}\n"]}
1
+ {"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../../src/components/field/Checkbox/Checkbox.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,gBAAgB,EAAE,SAAS,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAElH,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAYhF,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAAoB;IAC5D,8EAA8E;IAC9E,MAAM,cAAc,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAE7D,MAAM,EACJ,WAAW,EACX,KAAK,EACL,KAAK,GAAG,KAAK,EACb,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,UAAU,EACV,eAAe,EACf,WAAW,EACX,SAAS,EACT,SAAS,EACT,UAAU,EACX,GAAG,KAAK,CAAC;IACV,MAAM,mBAAmB,GAAG,eAAe,IAAI,UAAU,CAAC;IAE1D,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,cAAc,GAAG,QAAQ,CAAC,cAAc,EAAmB,CAAC;IAClE,MAAM,OAAO,GAAG,cAAc,CAAC,OAAO,CAAC;IACvC,MAAM,UAAU,GAAG,QAAQ,CAAC,aAAa,EAAE,CAAC;IAC5C,MAAM,QAAQ,GAAI,QAAQ,CAAC,aAAa,EAAU,CAAC,KAAK,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AAQ,EAAE,QAAQ,GAAI,CAAC;KACvE;IAED,OAAO,CACL,MAAC,WAAW,IAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,aACvD,CAAC,SAAS,IAAI,KAAC,SAAS,IAAC,SAAS,EAAC,QAAQ,YAAE,KAAK,GAAa,EAChE,KAAC,SAAS,cACR,KAAC,gBAAgB,IACf,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,EAC9C,MAAM,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,EAC1C,KAAK,EAAE,OAAO,EACd,cAAc,EAAC,KAAK,kBACN,MAAM,GACpB,GACQ,EACZ,KAAC,cAAc,cAAE,mBAAmB,GAAkB,IAC1C,CACf,CAAC;AACJ,CAAC","sourcesContent":["import { useState, useEffect } from 'react';\nimport { Checkbox, FormControl, FormControlLabel, FormGroup, FormHelperText, FormLabel } from '@material-ui/core';\n\nimport handleEvent from '../../helpers/event-utils';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { PConnFieldProps } from '../../../types/PConnProps';\n\ninterface CheckboxProps extends Omit<PConnFieldProps, 'value'> {\n // If any, enter additional props that only exist on Checkbox here\n value?: boolean;\n // eslint-disable-next-line react/no-unused-prop-types\n caption?: string;\n trueLabel?: string;\n falseLabel?: string;\n}\n\nexport default function CheckboxComponent(props: CheckboxProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const FieldValueList = getComponentFromMap('FieldValueList');\n\n const {\n getPConnect,\n label,\n value = false,\n readOnly,\n testId,\n required,\n disabled,\n status,\n helperText,\n validatemessage,\n displayMode,\n hideLabel,\n trueLabel,\n falseLabel\n } = props;\n const helperTextToDisplay = validatemessage || helperText;\n\n const thePConn = getPConnect();\n const theConfigProps = thePConn.getConfigProps() as CheckboxProps;\n const caption = theConfigProps.caption;\n const actionsApi = thePConn.getActionsApi();\n const propName = (thePConn.getStateProps() as any).value;\n\n const [checked, setChecked] = useState(false);\n useEffect(() => {\n // This update theSelectedButton which will update the UI to show the selected button correctly\n setChecked(value);\n }, [value]);\n\n if (displayMode === 'LABELS_LEFT') {\n return <FieldValueList name={hideLabel ? '' : caption} value={value ? trueLabel : falseLabel} />;\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n return <FieldValueList name={hideLabel ? '' : caption} value={value ? trueLabel : falseLabel} variant='stacked' />;\n }\n\n const handleChange = event => {\n handleEvent(actionsApi, 'changeNblur', propName, event.target.checked);\n };\n\n const handleBlur = event => {\n thePConn.getValidationApi().validate(event.target.checked);\n };\n\n let theCheckbox = <Checkbox color='primary' disabled={disabled} />;\n\n if (readOnly) {\n // Workaround for lack of InputProps readOnly from https://github.com/mui-org/material-ui/issues/17043\n // Also note that we need to turn off the onChange call in the FormControlLabel wrapper, too. See below!\n theCheckbox = <Checkbox value={value || false} readOnly={readOnly} />;\n }\n\n return (\n <FormControl required={required} error={status === 'error'}>\n {!hideLabel && <FormLabel component='legend'>{label}</FormLabel>}\n <FormGroup>\n <FormControlLabel\n control={theCheckbox}\n checked={checked}\n onChange={!readOnly ? handleChange : undefined}\n onBlur={!readOnly ? handleBlur : undefined}\n label={caption}\n labelPlacement='end'\n data-test-id={testId}\n />\n </FormGroup>\n <FormHelperText>{helperTextToDisplay}</FormHelperText>\n </FormControl>\n );\n}\n"]}
@@ -1,3 +1,8 @@
1
1
  /// <reference types="react" />
2
- export default function Currency(props: any): JSX.Element;
2
+ import { PConnFieldProps } from '../../../types/PConnProps';
3
+ interface CurrrencyProps extends PConnFieldProps {
4
+ currencyISOCode?: string;
5
+ }
6
+ export default function Currency(props: CurrrencyProps): JSX.Element;
7
+ export {};
3
8
  //# sourceMappingURL=Currency.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Currency.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Currency/Currency.tsx"],"names":[],"mappings":";AAUA,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,KAAA,eAwGrC"}
1
+ {"version":3,"file":"Currency.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Currency/Currency.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAS5D,UAAU,cAAe,SAAQ,eAAe;IAE9C,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,cAAc,eAgFrD"}
@@ -1,62 +1,41 @@
1
- import React, { useState, useEffect } from 'react';
2
- // import { TextField } from "@material-ui/core";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
3
2
  import CurrencyTextField from '@unicef/material-ui-currency-textfield';
3
+ import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
4
4
  import handleEvent from '../../helpers/event-utils';
5
- import FieldValueList from '../../designSystemExtension/FieldValueList';
6
- import { format } from "../../helpers/formatters";
5
+ import { format } from '../../helpers/formatters';
7
6
  import { getCurrencyCharacters, getCurrencyOptions } from './currency-utils';
8
- // Using control from: https://github.com/unicef/material-ui-currency-textfield
9
7
  export default function Currency(props) {
8
+ // Get emitted components from map (so we can get any override that may exist)
9
+ const FieldValueList = getComponentFromMap('FieldValueList');
10
10
  const { getPConnect, label, required, disabled, value = '', validatemessage, status,
11
11
  /* onChange, onBlur, */
12
- readOnly, testId, helperText, displayMode, hideLabel, currencyISOCode = "USD" } = props;
12
+ readOnly, testId, helperText, displayMode, hideLabel, currencyISOCode = 'USD', placeholder } = props;
13
13
  const pConn = getPConnect();
14
14
  const actions = pConn.getActionsApi();
15
15
  const propName = pConn.getStateProps().value;
16
16
  const helperTextToDisplay = validatemessage || helperText;
17
17
  // console.log(`Currency: label: ${label} value: ${value}`);
18
- let readOnlyProp = {}; // Note: empty if NOT ReadOnly
19
- if (readOnly) {
20
- readOnlyProp = { readOnly: true };
21
- }
22
- let testProp = {};
23
- testProp = {
18
+ const testProp = {
24
19
  'data-test-id': testId
25
20
  };
26
- const [currValue, setCurrValue] = useState();
27
- const [theCurrSym, setCurrSym] = useState("$");
28
- const [theCurrDec, setCurrDec] = useState(".");
29
- const [theCurrSep, setCurrSep] = useState(",");
30
- useEffect(() => {
31
- // currencySymbols looks like this: { theCurrencySymbol: '$', theDecimalIndicator: '.', theSeparator: ',' }
32
- const theSymbols = getCurrencyCharacters(currencyISOCode);
33
- setCurrSym(theSymbols.theCurrencySymbol);
34
- setCurrDec(theSymbols.theDecimalIndicator);
35
- setCurrSep(theSymbols.theDigitGroupSeparator);
36
- }, [currencyISOCode]);
37
- useEffect(() => {
38
- // const testVal = value;
39
- setCurrValue(value.toString());
40
- }, [value]);
21
+ // currencySymbols looks like this: { theCurrencySymbol: '$', theDecimalIndicator: '.', theSeparator: ',' }
22
+ const theSymbols = getCurrencyCharacters(currencyISOCode);
23
+ const theCurrSym = theSymbols.theCurrencySymbol;
24
+ const theCurrDec = theSymbols.theDecimalIndicator;
25
+ const theCurrSep = theSymbols.theDigitGroupSeparator;
41
26
  const theCurrencyOptions = getCurrencyOptions(currencyISOCode);
42
27
  const formattedValue = format(value, pConn.getComponentName().toLowerCase(), theCurrencyOptions);
43
28
  if (displayMode === 'LABELS_LEFT') {
44
- return React.createElement(FieldValueList, { name: hideLabel ? '' : label, value: formattedValue });
29
+ return _jsx(FieldValueList, { name: hideLabel ? '' : label, value: formattedValue });
45
30
  }
46
31
  if (displayMode === 'STACKED_LARGE_VAL') {
47
- return React.createElement(FieldValueList, { name: hideLabel ? '' : label, value: formattedValue, variant: 'stacked' });
48
- }
49
- // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
50
- function currOnChange(event, inValue) {
51
- // console.log(`Currency currOnChange inValue: ${inValue}`);
52
- // update internal value
53
- setCurrValue(event?.target?.value);
32
+ return _jsx(FieldValueList, { name: hideLabel ? '' : label, value: formattedValue, variant: 'stacked' });
54
33
  }
55
34
  function currOnBlur(event, inValue) {
56
35
  // console.log(`Currency currOnBlur inValue: ${inValue}`);
57
36
  handleEvent(actions, 'changeNblur', propName, inValue !== '' ? Number(inValue) : inValue);
58
37
  }
59
38
  // console.log(`theCurrSym: ${theCurrSym} | theCurrDec: ${theCurrDec} | theCurrSep: ${theCurrSep}`);
60
- return (React.createElement(CurrencyTextField, { fullWidth: true, variant: readOnly ? 'standard' : 'outlined', helperText: helperTextToDisplay, placeholder: '', size: 'small', required: required, disabled: disabled, onChange: currOnChange, onBlur: !readOnly ? currOnBlur : undefined, error: status === 'error', label: label, value: currValue, type: 'text', outputFormat: 'number', textAlign: 'left', InputProps: { ...readOnlyProp, inputProps: { ...testProp, value: currValue } }, currencySymbol: theCurrSym, decimalCharacter: theCurrDec, digitGroupSeparator: theCurrSep }));
39
+ return (_jsx(CurrencyTextField, { fullWidth: true, variant: readOnly ? 'standard' : 'outlined', helperText: helperTextToDisplay, placeholder: placeholder ?? '', size: 'small', required: required, disabled: disabled, readOnly: !!readOnly, error: status === 'error', label: label, value: value, type: 'text', outputFormat: 'number', textAlign: 'left', InputProps: { inputProps: { ...testProp } }, currencySymbol: theCurrSym, decimalCharacter: theCurrDec, digitGroupSeparator: theCurrSep, onBlur: !readOnly ? currOnBlur : undefined }));
61
40
  }
62
41
  //# sourceMappingURL=Currency.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Currency.js","sourceRoot":"","sources":["../../../../src/components/field/Currency/Currency.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,iDAAiD;AACjD,OAAO,iBAAiB,MAAM,wCAAwC,CAAC;AACvE,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,cAAc,MAAM,4CAA4C,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,kB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C;IAC5F,CAAC;IAED,oGAAoG;IAEpG,OAAO,CACL,oBAAC,iBAAiB,IAChB,SAAS,QACT,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,EAC3C,UAAU,EAAE,mBAAmB,EAC/B,WAAW,EAAC,EAAE,EACd,IAAI,EAAC,OAAO,EACZ,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,YAAY,EACtB,MAAM,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,EAC1C,KAAK,EAAE,MAAM,KAAK,OAAO,EACzB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,SAAS,EAChB,IAAI,EAAC,MAAM,EACX,YAAY,EAAC,QAAQ,EACrB,SAAS,EAAC,MAAM,EAChB,UAAU,EAAE,EAAE,GAAG,YAAY,EAAE,UAAU,EAAE,EAAE,GAAG,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAC9E,cAAc,EAAE,UAAU,EAC1B,gBAAgB,EAAE,UAAU,EAC5B,mBAAmB,EAAE,UAAU,GAC/B,CACH,CAAC;AACJ,CAAC","sourcesContent":["import React, { useState, useEffect } from 'react';\n// import { TextField } from \"@material-ui/core\";\nimport CurrencyTextField from '@unicef/material-ui-currency-textfield';\nimport handleEvent from '../../helpers/event-utils';\nimport FieldValueList from '../../designSystemExtension/FieldValueList';\nimport { format } from \"../../helpers/formatters\";\nimport { getCurrencyCharacters, getCurrencyOptions } from './currency-utils';\n\n// Using control from: https://github.com/unicef/material-ui-currency-textfield\n\nexport default function Currency(props) {\n const {\n getPConnect,\n label,\n required,\n disabled,\n value = '',\n validatemessage,\n status,\n /* onChange, onBlur, */\n readOnly,\n testId,\n helperText,\n displayMode,\n hideLabel,\n currencyISOCode = \"USD\"\n } = props;\n\n const pConn = getPConnect();\n const actions = pConn.getActionsApi();\n const propName = pConn.getStateProps().value;\n const helperTextToDisplay = validatemessage || helperText;\n\n // console.log(`Currency: label: ${label} value: ${value}`);\n\n let readOnlyProp = {}; // Note: empty if NOT ReadOnly\n\n if (readOnly) {\n readOnlyProp = { readOnly: true };\n }\n\n let testProp = {};\n\n testProp = {\n 'data-test-id': testId\n };\n\n const [currValue, setCurrValue] = useState();\n const [theCurrSym, setCurrSym] = useState(\"$\");\n const [theCurrDec, setCurrDec] = useState(\".\");\n const [theCurrSep, setCurrSep] = useState(\",\");\n\n useEffect(() => {\n // currencySymbols looks like this: { theCurrencySymbol: '$', theDecimalIndicator: '.', theSeparator: ',' }\n const theSymbols = getCurrencyCharacters(currencyISOCode);\n setCurrSym(theSymbols.theCurrencySymbol);\n setCurrDec(theSymbols.theDecimalIndicator);\n setCurrSep(theSymbols.theDigitGroupSeparator);\n }, [currencyISOCode]);\n\n useEffect(() => {\n // const testVal = value;\n setCurrValue(value.toString());\n }, [value]);\n\n const theCurrencyOptions = getCurrencyOptions(currencyISOCode);\n const formattedValue = format(value, pConn.getComponentName().toLowerCase(), theCurrencyOptions);\n\n if (displayMode === 'LABELS_LEFT') {\n return <FieldValueList name={hideLabel ? '' : label} value={formattedValue} />;\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n return <FieldValueList name={hideLabel ? '' : label} value={formattedValue} variant='stacked' />;\n }\n\n // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars\n function currOnChange(event, inValue) {\n // console.log(`Currency currOnChange inValue: ${inValue}`);\n\n // update internal value\n setCurrValue(event?.target?.value);\n }\n\n function currOnBlur(event, inValue) {\n // console.log(`Currency currOnBlur inValue: ${inValue}`);\n handleEvent(actions, 'changeNblur', propName, inValue !== '' ? Number(inValue) : inValue);\n }\n\n // console.log(`theCurrSym: ${theCurrSym} | theCurrDec: ${theCurrDec} | theCurrSep: ${theCurrSep}`);\n\n return (\n <CurrencyTextField\n fullWidth\n variant={readOnly ? 'standard' : 'outlined'}\n helperText={helperTextToDisplay}\n placeholder=''\n size='small'\n required={required}\n disabled={disabled}\n onChange={currOnChange}\n onBlur={!readOnly ? currOnBlur : undefined}\n error={status === 'error'}\n label={label}\n value={currValue}\n type='text'\n outputFormat='number'\n textAlign='left'\n InputProps={{ ...readOnlyProp, inputProps: { ...testProp, value: currValue } }}\n currencySymbol={theCurrSym}\n decimalCharacter={theCurrDec}\n digitGroupSeparator={theCurrSep}\n />\n );\n}\n"]}
1
+ {"version":3,"file":"Currency.js","sourceRoot":"","sources":["../../../../src/components/field/Currency/Currency.tsx"],"names":[],"mappings":";AAAA,OAAO,iBAAiB,MAAM,wCAAwC,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAW7E,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAqB;IACpD,8EAA8E;IAC9E,MAAM,cAAc,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAE7D,MAAM,EACJ,WAAW,EACX,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,KAAK,GAAG,EAAE,EACV,eAAe,EACf,MAAM;IACN,uBAAuB;IACvB,QAAQ,EACR,MAAM,EACN,UAAU,EACV,WAAW,EACX,SAAS,EACT,eAAe,GAAG,KAAK,EACvB,WAAW,EACZ,GAAG,KAAK,CAAC;IAEV,MAAM,KAAK,GAAG,WAAW,EAAE,CAAC;IAC5B,MAAM,OAAO,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC;IACtC,MAAM,QAAQ,GAAI,KAAK,CAAC,aAAa,EAAU,CAAC,KAAK,CAAC;IACtD,MAAM,mBAAmB,GAAG,eAAe,IAAI,UAAU,CAAC;IAE1D,4DAA4D;IAE5D,MAAM,QAAQ,GAAG;QACf,cAAc,EAAE,MAAM;KAC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ACZ,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,CAAC,CAAC,QAAQ,EACpB,KAAK,EAAE,MAAM,KAAK,OAAO,EACzB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,EACZ,IAAI,EAAC,MAAM,EACX,YAAY,EAAC,QAAQ,EACrB,SAAS,EAAC,MAAM,EAChB,UAAU,EAAE,EAAE,UAAU,EAAE,EAAE,GAAG,QAAQ,EAAE,EAAE,EAC3C,cAAc,EAAE,UAAU,EAC1B,gBAAgB,EAAE,UAAU,EAC5B,mBAAmB,EAAE,UAAU,EAC/B,MAAM,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,GAC1C,CACH,CAAC;AACJ,CAAC","sourcesContent":["import CurrencyTextField from '@unicef/material-ui-currency-textfield';\n\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { PConnFieldProps } from '../../../types/PConnProps';\nimport handleEvent from '../../helpers/event-utils';\nimport { format } from '../../helpers/formatters';\nimport { getCurrencyCharacters, getCurrencyOptions } from './currency-utils';\n\n/* Using @unicef/material-ui-currency-textfield component here, since it allows formatting decimal values,\nas per the locale.\n*/\n\ninterface CurrrencyProps extends PConnFieldProps {\n // If any, enter additional props that only exist on Currency here\n currencyISOCode?: string;\n}\n\nexport default function Currency(props: CurrrencyProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const FieldValueList = getComponentFromMap('FieldValueList');\n\n const {\n getPConnect,\n label,\n required,\n disabled,\n value = '',\n validatemessage,\n status,\n /* onChange, onBlur, */\n readOnly,\n testId,\n helperText,\n displayMode,\n hideLabel,\n currencyISOCode = 'USD',\n placeholder\n } = props;\n\n const pConn = getPConnect();\n const actions = pConn.getActionsApi();\n const propName = (pConn.getStateProps() as any).value;\n const helperTextToDisplay = validatemessage || helperText;\n\n // console.log(`Currency: label: ${label} value: ${value}`);\n\n const testProp = {\n 'data-test-id': testId\n };\n\n // currencySymbols looks like this: { theCurrencySymbol: '$', theDecimalIndicator: '.', theSeparator: ',' }\n const theSymbols = getCurrencyCharacters(currencyISOCode);\n const theCurrSym = theSymbols.theCurrencySymbol;\n const theCurrDec = theSymbols.theDecimalIndicator;\n const theCurrSep = theSymbols.theDigitGroupSeparator;\n\n const theCurrencyOptions = getCurrencyOptions(currencyISOCode);\n const formattedValue = format(value, pConn.getComponentName().toLowerCase(), theCurrencyOptions);\n\n if (displayMode === 'LABELS_LEFT') {\n return <FieldValueList name={hideLabel ? '' : label} value={formattedValue} />;\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n return <FieldValueList name={hideLabel ? '' : label} value={formattedValue} variant='stacked' />;\n }\n\n function currOnBlur(event, inValue) {\n // console.log(`Currency currOnBlur inValue: ${inValue}`);\n handleEvent(actions, 'changeNblur', propName, inValue !== '' ? Number(inValue) : inValue);\n }\n\n // console.log(`theCurrSym: ${theCurrSym} | theCurrDec: ${theCurrDec} | theCurrSep: ${theCurrSep}`);\n\n return (\n <CurrencyTextField\n fullWidth\n variant={readOnly ? 'standard' : 'outlined'}\n helperText={helperTextToDisplay}\n placeholder={placeholder ?? ''}\n size='small'\n required={required}\n disabled={disabled}\n readOnly={!!readOnly}\n error={status === 'error'}\n label={label}\n value={value}\n type='text'\n outputFormat='number'\n textAlign='left'\n InputProps={{ inputProps: { ...testProp } }}\n currencySymbol={theCurrSym}\n decimalCharacter={theCurrDec}\n digitGroupSeparator={theCurrSep}\n onBlur={!readOnly ? currOnBlur : undefined}\n />\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"currency-utils.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Currency/currency-utils.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,kBAAkB,cAAe,MAAM;;;;CAsCnD,CAAA;AAGD,eAAO,MAAM,qBAAqB,cAAe,MAAM;;;;CA2BtD,CAAA"}
1
+ {"version":3,"file":"currency-utils.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Currency/currency-utils.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,kBAAkB,cAAe,MAAM;;;;CAkCnD,CAAC;AAEF,eAAO,MAAM,qBAAqB,cAAe,MAAM;;;;CA0BtD,CAAC"}
@@ -3,16 +3,16 @@ import { default as CurrencyAlias } from '../../helpers/formatters/Currency';
3
3
  // eslint-disable-next-line import/no-named-default
4
4
  import { default as CurrencyMapAlias } from '../../helpers/formatters/CurrencyMap';
5
5
  export const getCurrencyOptions = (inISOCode) => {
6
- const operatorLocale = PCore.getEnvironmentInfo().getUseLocale() || 'en-US';
6
+ const operatorLocale = PCore.getEnvironmentInfo().getUseLocale() || PCore.getEnvironmentInfo().getLocale() || 'en-US';
7
7
  let currMapToUse = CurrencyMapAlias.US;
8
8
  let localeToUse = operatorLocale;
9
9
  // Determine CurrencyMap lookup based on ISO code (if specified).
10
10
  // If no ISO code, use locale
11
11
  // If no locale, default to US
12
12
  if (inISOCode) {
13
- if (inISOCode === "EUR") {
13
+ if (inISOCode === 'EUR') {
14
14
  currMapToUse = CurrencyMapAlias.NL;
15
- localeToUse = "nl-NL";
15
+ localeToUse = 'nl-NL';
16
16
  }
17
17
  else {
18
18
  // For all other ISO codes, use first 2 characters as the lookup from CurrencyMap
@@ -31,11 +31,10 @@ export const getCurrencyOptions = (inISOCode) => {
31
31
  }
32
32
  // If no currMapToUse at this point, default to US as a failsafe
33
33
  if (!currMapToUse) {
34
- currMapToUse = CurrencyMapAlias['US'];
34
+ currMapToUse = CurrencyMapAlias.US;
35
35
  }
36
36
  const theCode = currMapToUse.currencyCode.substring(0, 3);
37
- const currencyOptions = { locale: localeToUse, style: "currency", currency: theCode };
38
- return currencyOptions;
37
+ return { locale: localeToUse, style: 'currency', currency: theCode };
39
38
  };
40
39
  export const getCurrencyCharacters = (inISOCode) => {
41
40
  const theCurrencyChars = {
@@ -1 +1 @@
1
- {"version":3,"file":"currency-utils.js","sourceRoot":"","sources":["../../../../src/components/field/Currency/curr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AAG,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAA;IAErF,OAAO,eAAe,CAAC;AAEzB,CAAC,CAAA;AAGD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,SAAiB,EAAE,EAAE;IACzD,MAAM,gBAAgB,GAAG;QACvB,iBAAiB,EAAE,GAAG;QACtB,mBAAmB,EAAE,GAAG;QACxB,sBAAsB,EAAE,GAAG;KAC5B,CAAA;IAED,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAEzD,MAAM,SAAS,GAAG,OAAO,CAAC;IAC1B,MAAM,eAAe,GAAG,aAAa,CAAC,QAAQ,CAAC,SAAS,EAAE,kBAAkB,CAAC,CAAC;IAE9E,sDAAsD;IAEtD,4DAA4D;IAC5D,wCAAwC;IACxC,kCAAkC;IAClC,0CAA0C;IAE1C,gBAAgB,CAAC,iBAAiB,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;IACxD,gBAAgB,CAAC,sBAAsB,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;IAC7D,gBAAgB,CAAC,mBAAmB,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;IAE1D,sNAAsN;IAEtN,OAAO,gBAAgB,CAAC;AAE1B,CAAC,CAAA","sourcesContent":["// eslint-disable-next-line import/no-named-default\nimport { default as CurrencyAlias} from '../../helpers/formatters/Currency';\n// eslint-disable-next-line import/no-named-default\nimport { default as CurrencyMapAlias } from '../../helpers/formatters/CurrencyMap';\n\nimport PCoreType from '@pega/pcore-pconnect-typedefs/types/pcore';\n\ndeclare const PCore: typeof PCoreType;\n\n\nexport const getCurrencyOptions = (inISOCode: string) => {\n\n const operatorLocale = PCore.getEnvironmentInfo().getUseLocale() || 'en-US';\n\n let currMapToUse = CurrencyMapAlias.US;\n let localeToUse = operatorLocale;\n\n // Determine CurrencyMap lookup based on ISO code (if specified).\n // If no ISO code, use locale\n // If no locale, default to US\n if (inISOCode) {\n if (inISOCode === \"EUR\") {\n currMapToUse = CurrencyMapAlias.NL;\n localeToUse = \"nl-NL\";\n } else {\n // For all other ISO codes, use first 2 characters as the lookup from CurrencyMap\n const countryCode = inISOCode.substring(0,2);\n currMapToUse = CurrencyMapAlias[countryCode];\n }\n } else if (operatorLocale) {\n // No ISO Code so check for operator locale (and force upper case for lookup)\n const countryCode = operatorLocale.substring(3).toUpperCase();\n currMapToUse = CurrencyMapAlias[countryCode];\n } else {\n // no ISO code and no operator locale, default to US\n currMapToUse = CurrencyMapAlias.US;\n }\n\n // If no currMapToUse at this point, default to US as a failsafe\n if (!currMapToUse) {\n currMapToUse = CurrencyMapAlias['US'];\n }\n\n const theCode = currMapToUse.currencyCode.substring(0, 3);\n const currencyOptions = { locale: localeToUse, style: \"currency\", currency: theCode }\n\n return currencyOptions;\n\n}\n\n\nexport const getCurrencyCharacters = (inISOCode: string) => {\n const theCurrencyChars = {\n theCurrencySymbol: '$',\n theDecimalIndicator: '.',\n theDigitGroupSeparator: ','\n }\n\n const theCurrencyOptions = getCurrencyOptions(inISOCode);\n\n const testValue = 1234.56;\n const formattedString = CurrencyAlias.Currency(testValue, theCurrencyOptions);\n\n // console.log(`formattedString: ${formattedString}`);\n\n // Here, we have the formatted string (ex: $1,234.56) where:\n // Currency symbol = formattedString[0]\n // Separator = formattedString[2]\n // DecimalIndicator = formattedString[6];\n\n theCurrencyChars.theCurrencySymbol = formattedString[0];\n theCurrencyChars.theDigitGroupSeparator = formattedString[2];\n theCurrencyChars.theDecimalIndicator = formattedString[6];\n\n // console.log(`theCurrencyChars: symbol: ${theCurrencyChars.theCurrencySymbol} | theDigitGroupSeparator: ${theCurrencyChars.theDigitGroupSeparator} | theDecimalIndicator: ${theCurrencyChars.theDecimalIndicator}`);\n\n return theCurrencyChars;\n\n}\n"]}
1
+ {"version":3,"file":"currency-utils.js","sourceRoot":"","sources":["../../../../src/components/field/Currency/currency-utils.ts"],"names":[],"mappings":"AA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1D,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;AACvE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,SAAiB,EAAE,EAAE;IACzD,MAAM,gBAAgB,GAAG;QACvB,iBAAiB,EAAE,GAAG;QACtB,mBAAmB,EAAE,GAAG;QACxB,sBAAsB,EAAE,GAAG;KAC5B,CAAC;IAEF,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAEzD,MAAM,SAAS,GAAG,OAAO,CAAC;IAC1B,MAAM,eAAe,GAAG,aAAa,CAAC,QAAQ,CAAC,SAAS,EAAE,kBAAkB,CAAC,CAAC;IAE9E,sDAAsD;IAEtD,4DAA4D;IAC5D,wCAAwC;IACxC,kCAAkC;IAClC,0CAA0C;IAE1C,gBAAgB,CAAC,iBAAiB,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;IACxD,gBAAgB,CAAC,sBAAsB,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;IAC7D,gBAAgB,CAAC,mBAAmB,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;IAE1D,sNAAsN;IAEtN,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC","sourcesContent":["// eslint-disable-next-line import/no-named-default\nimport { default as CurrencyAlias } from '../../helpers/formatters/Currency';\n// eslint-disable-next-line import/no-named-default\nimport { default as CurrencyMapAlias } from '../../helpers/formatters/CurrencyMap';\n\nexport const getCurrencyOptions = (inISOCode: string) => {\n const operatorLocale = PCore.getEnvironmentInfo().getUseLocale() || PCore.getEnvironmentInfo().getLocale() || 'en-US';\n\n let currMapToUse = CurrencyMapAlias.US;\n let localeToUse = operatorLocale;\n\n // Determine CurrencyMap lookup based on ISO code (if specified).\n // If no ISO code, use locale\n // If no locale, default to US\n if (inISOCode) {\n if (inISOCode === 'EUR') {\n currMapToUse = CurrencyMapAlias.NL;\n localeToUse = 'nl-NL';\n } else {\n // For all other ISO codes, use first 2 characters as the lookup from CurrencyMap\n const countryCode = inISOCode.substring(0, 2);\n currMapToUse = CurrencyMapAlias[countryCode];\n }\n } else if (operatorLocale) {\n // No ISO Code so check for operator locale (and force upper case for lookup)\n const countryCode = operatorLocale.substring(3).toUpperCase();\n currMapToUse = CurrencyMapAlias[countryCode];\n } else {\n // no ISO code and no operator locale, default to US\n currMapToUse = CurrencyMapAlias.US;\n }\n\n // If no currMapToUse at this point, default to US as a failsafe\n if (!currMapToUse) {\n currMapToUse = CurrencyMapAlias.US;\n }\n\n const theCode = currMapToUse.currencyCode.substring(0, 3);\n return { locale: localeToUse, style: 'currency', currency: theCode };\n};\n\nexport const getCurrencyCharacters = (inISOCode: string) => {\n const theCurrencyChars = {\n theCurrencySymbol: '$',\n theDecimalIndicator: '.',\n theDigitGroupSeparator: ','\n };\n\n const theCurrencyOptions = getCurrencyOptions(inISOCode);\n\n const testValue = 1234.56;\n const formattedString = CurrencyAlias.Currency(testValue, theCurrencyOptions);\n\n // console.log(`formattedString: ${formattedString}`);\n\n // Here, we have the formatted string (ex: $1,234.56) where:\n // Currency symbol = formattedString[0]\n // Separator = formattedString[2]\n // DecimalIndicator = formattedString[6];\n\n theCurrencyChars.theCurrencySymbol = formattedString[0];\n theCurrencyChars.theDigitGroupSeparator = formattedString[2];\n theCurrencyChars.theDecimalIndicator = formattedString[6];\n\n // console.log(`theCurrencyChars: symbol: ${theCurrencyChars.theCurrencySymbol} | theDigitGroupSeparator: ${theCurrencyChars.theDigitGroupSeparator} | theDecimalIndicator: ${theCurrencyChars.theDecimalIndicator}`);\n\n return theCurrencyChars;\n};\n"]}
@@ -1,3 +1,7 @@
1
1
  /// <reference types="react" />
2
- export default function Date(props: any): JSX.Element;
2
+ import { PConnFieldProps } from '../../../types/PConnProps';
3
+ interface DateProps extends PConnFieldProps {
4
+ }
5
+ export default function Date(props: DateProps): JSX.Element;
6
+ export {};
3
7
  //# sourceMappingURL=Date.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Date.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Date/Date.tsx"],"names":[],"mappings":";AAaA,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAK,KAAA,eAwFjC"}
1
+ {"version":3,"file":"Date.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Date/Date.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAO5D,UAAU,SAAU,SAAQ,eAAe;CAE1C;AAED,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAK,EAAE,SAAS,eA+F5C"}