@pega/react-sdk-overrides 23.1.10 → 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 (228) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +17 -0
  3. package/SECURITY.md +10 -0
  4. package/lib/designSystemExtension/AlertBanner/AlertBanner.tsx +6 -14
  5. package/lib/designSystemExtension/Banner/Banner.tsx +14 -11
  6. package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
  7. package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +27 -22
  8. package/lib/designSystemExtension/DetailsFields/DetailsFields.tsx +14 -20
  9. package/lib/designSystemExtension/DetailsFields/index.tsx +1 -1
  10. package/lib/designSystemExtension/FieldGroup/FieldGroup.tsx +44 -19
  11. package/lib/designSystemExtension/FieldGroupList/FieldGroupList.tsx +7 -12
  12. package/lib/designSystemExtension/FieldValueList/FieldValueList.tsx +12 -29
  13. package/lib/designSystemExtension/Operator/Operator.tsx +94 -82
  14. package/lib/designSystemExtension/Pulse/Pulse.tsx +14 -16
  15. package/lib/designSystemExtension/RichTextEditor/RichTextEditor.tsx +6 -5
  16. package/lib/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx +14 -14
  17. package/lib/field/AutoComplete/AutoComplete.tsx +24 -26
  18. package/lib/field/AutoComplete/config-ext.json +2 -3
  19. package/lib/field/CancelAlert/CancelAlert.tsx +98 -84
  20. package/lib/field/CancelAlert/index.tsx +1 -1
  21. package/lib/field/Checkbox/Checkbox.tsx +23 -44
  22. package/lib/field/Checkbox/config-ext.json +2 -3
  23. package/lib/field/Currency/Currency.tsx +25 -50
  24. package/lib/field/Currency/config-ext.json +2 -3
  25. package/lib/field/Currency/currency-utils.ts +9 -16
  26. package/lib/field/Date/Date.tsx +15 -11
  27. package/lib/field/Date/config-ext.json +2 -3
  28. package/lib/field/DateTime/DateTime.tsx +9 -9
  29. package/lib/field/DateTime/config-ext.json +1 -2
  30. package/lib/field/Decimal/Decimal.tsx +23 -43
  31. package/lib/field/Decimal/config-ext.json +1 -2
  32. package/lib/field/Decimal/index.tsx +1 -1
  33. package/lib/field/Dropdown/Dropdown.tsx +122 -31
  34. package/lib/field/Dropdown/config-ext.json +1 -2
  35. package/lib/field/Email/Email.tsx +11 -10
  36. package/lib/field/Email/config-ext.json +1 -2
  37. package/lib/field/Email/index.tsx +1 -1
  38. package/lib/field/Group/Group.tsx +39 -0
  39. package/lib/field/Group/config-ext.json +7 -0
  40. package/lib/field/Group/index.tsx +1 -0
  41. package/lib/field/Integer/Integer.tsx +8 -7
  42. package/lib/field/Integer/config-ext.json +1 -2
  43. package/lib/field/Percentage/Percentage.tsx +46 -41
  44. package/lib/field/Percentage/config-ext.json +1 -2
  45. package/lib/field/Phone/Phone.tsx +13 -12
  46. package/lib/field/Phone/index.tsx +1 -1
  47. package/lib/field/RadioButtons/RadioButtons.tsx +20 -18
  48. package/lib/field/RadioButtons/config-ext.json +1 -2
  49. package/lib/field/RichText/RichText.tsx +7 -6
  50. package/lib/field/ScalarList/ScalarList.tsx +3 -13
  51. package/lib/field/ScalarList/config-ext.json +1 -2
  52. package/lib/field/SemanticLink/SemanticLink.tsx +7 -7
  53. package/lib/field/SemanticLink/config-ext.json +1 -2
  54. package/lib/field/SemanticLink/utils.ts +8 -11
  55. package/lib/field/TextArea/TextArea.tsx +7 -6
  56. package/lib/field/TextArea/config-ext.json +1 -2
  57. package/lib/field/TextContent/TextContent.tsx +4 -6
  58. package/lib/field/TextContent/config-ext.json +1 -2
  59. package/lib/field/TextInput/TextInput.tsx +9 -7
  60. package/lib/field/TextInput/config-ext.json +1 -2
  61. package/lib/field/TextInput/index.tsx +1 -1
  62. package/lib/field/Time/Time.tsx +11 -11
  63. package/lib/field/Time/config-ext.json +1 -2
  64. package/lib/field/URL/URL.tsx +9 -8
  65. package/lib/field/URL/config-ext.json +1 -2
  66. package/lib/field/URL/index.tsx +1 -1
  67. package/lib/field/UserReference/UserReference.tsx +18 -16
  68. package/lib/field/UserReference/UserReferenceUtils.ts +2 -2
  69. package/lib/field/UserReference/config-ext.json +1 -2
  70. package/lib/helpers/attachmentHelpers.ts +13 -8
  71. package/lib/helpers/case-utils.tsx +4 -8
  72. package/lib/helpers/common-utils.ts +5 -1
  73. package/lib/helpers/data_page.ts +3 -7
  74. package/lib/helpers/date-format-utils.ts +3 -3
  75. package/lib/helpers/event-utils.ts +3 -3
  76. package/lib/helpers/field-group-utils.ts +1 -1
  77. package/lib/helpers/formatters/Boolean.ts +9 -26
  78. package/lib/helpers/formatters/Currency.ts +15 -21
  79. package/lib/helpers/formatters/CurrencyMap.ts +505 -501
  80. package/lib/helpers/formatters/Date.ts +20 -26
  81. package/lib/helpers/formatters/common.ts +1 -2
  82. package/lib/helpers/formatters/index.ts +26 -19
  83. package/lib/helpers/reactContextHelpers.ts +2 -2
  84. package/lib/helpers/simpleTableHelpers.ts +59 -83
  85. package/lib/helpers/state-utils.tsx +5 -9
  86. package/lib/helpers/template-utils.ts +3 -6
  87. package/lib/helpers/utils.ts +5 -5
  88. package/lib/helpers/versionHelpers.ts +1 -4
  89. package/lib/infra/ActionButtons/ActionButtons.tsx +38 -29
  90. package/lib/infra/ActionButtons/index.tsx +1 -1
  91. package/lib/infra/Assignment/Assignment.tsx +99 -79
  92. package/lib/infra/Assignment/index.tsx +1 -1
  93. package/lib/infra/AssignmentCard/AssignmentCard.tsx +13 -16
  94. package/lib/infra/AssignmentCard/index.tsx +1 -1
  95. package/lib/infra/Containers/FlowContainer/FlowContainer.tsx +67 -213
  96. package/lib/infra/Containers/FlowContainer/helpers.ts +34 -45
  97. package/lib/infra/Containers/FlowContainer/index.tsx +1 -1
  98. package/lib/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx +65 -0
  99. package/lib/infra/Containers/ModalViewContainer/ListViewActionButtons/index.tsx +1 -0
  100. package/lib/infra/Containers/ModalViewContainer/ModalViewContainer.tsx +227 -218
  101. package/lib/infra/Containers/ModalViewContainer/index.tsx +1 -1
  102. package/lib/infra/Containers/SimpleView/SimpleView.tsx +48 -0
  103. package/lib/infra/Containers/SimpleView/helper.ts +125 -0
  104. package/lib/infra/Containers/SimpleView/index.tsx +1 -0
  105. package/lib/infra/Containers/ViewContainer/ViewContainer.tsx +36 -46
  106. package/lib/infra/Containers/helpers.ts +6 -0
  107. package/lib/infra/DashboardFilter/DashboardFilter.tsx +21 -42
  108. package/lib/infra/DashboardFilter/filterUtils.tsx +12 -43
  109. package/lib/infra/DeferLoad/DeferLoad.tsx +22 -28
  110. package/lib/infra/DeferLoad/index.tsx +1 -1
  111. package/lib/infra/ErrorBoundary/ErrorBoundary.tsx +16 -30
  112. package/lib/infra/MultiStep/MultiStep.css +11 -15
  113. package/lib/infra/MultiStep/MultiStep.tsx +176 -212
  114. package/lib/infra/MultiStep/index.tsx +1 -1
  115. package/lib/infra/NavBar/NavBar.css +103 -105
  116. package/lib/infra/NavBar/NavBar.tsx +18 -30
  117. package/lib/infra/Reference/Reference.tsx +15 -17
  118. package/lib/infra/Region/Region.tsx +4 -6
  119. package/lib/infra/RootContainer/RootContainer.tsx +75 -111
  120. package/lib/infra/RootContainer/index.tsx +1 -1
  121. package/lib/infra/Stages/Stages.tsx +32 -39
  122. package/lib/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.tsx +11 -11
  123. package/lib/infra/VerticalTabs/VerticalTabs/VerticalTabs.tsx +21 -28
  124. package/lib/infra/View/View.tsx +17 -21
  125. package/lib/template/AppShell/AppShell.css +22 -23
  126. package/lib/template/AppShell/AppShell.tsx +39 -74
  127. package/lib/template/BannerPage/BannerPage.tsx +12 -14
  128. package/lib/template/CaseSummary/CaseSummary.tsx +58 -18
  129. package/lib/template/CaseSummary/config-ext.json +1 -2
  130. package/lib/template/CaseView/CaseView.tsx +34 -63
  131. package/lib/template/CaseView/config-ext.json +1 -2
  132. package/lib/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +63 -19
  133. package/lib/template/Confirmation/Confirmation.tsx +12 -17
  134. package/lib/template/Confirmation/config-ext.json +1 -2
  135. package/lib/template/DataReference/DataReference.tsx +95 -121
  136. package/lib/template/DataReference/config-ext.json +1 -2
  137. package/lib/template/DefaultForm/DefaultForm.css +7 -3
  138. package/lib/template/DefaultForm/DefaultForm.tsx +13 -16
  139. package/lib/template/DefaultForm/config-ext.json +1 -2
  140. package/lib/template/Details/Details/Details.tsx +19 -22
  141. package/lib/template/Details/DetailsSubTabs/DetailsSubTabs.tsx +9 -13
  142. package/lib/template/Details/DetailsSubTabs/config-ext.json +1 -2
  143. package/lib/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx +19 -24
  144. package/lib/template/Details/DetailsThreeColumn/config-ext.json +1 -2
  145. package/lib/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx +19 -25
  146. package/lib/template/Details/DetailsTwoColumn/config-ext.json +1 -2
  147. package/lib/template/Details/DetailsTwoColumn/index.tsx +1 -1
  148. package/lib/template/Details/DynamicTabs/DynamicTabs.tsx +15 -14
  149. package/lib/template/FieldGroupTemplate/FieldGroupTemplate.tsx +15 -22
  150. package/lib/template/InlineDashboard/InlineDashboard.tsx +12 -14
  151. package/lib/template/InlineDashboardPage/InlineDashboardPage.tsx +12 -16
  152. package/lib/template/ListPage/ListPage.tsx +5 -10
  153. package/lib/template/ListPage/config-ext.json +1 -2
  154. package/lib/template/ListView/DefaultViewMeta.ts +1 -3
  155. package/lib/template/ListView/ListView.tsx +179 -169
  156. package/lib/template/ListView/config-ext.json +1 -2
  157. package/lib/template/ListView/hooks.ts +24 -26
  158. package/lib/template/ListView/utils.ts +51 -87
  159. package/lib/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +20 -20
  160. package/lib/template/NarrowWide/NarrowWide/NarrowWide.css +0 -2
  161. package/lib/template/NarrowWide/NarrowWide/NarrowWide.tsx +25 -38
  162. package/lib/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.tsx +20 -25
  163. package/lib/template/NarrowWide/NarrowWideDetails/config-ext.json +1 -2
  164. package/lib/template/NarrowWide/NarrowWideForm/NarrowWideForm.css +0 -2
  165. package/lib/template/NarrowWide/NarrowWideForm/NarrowWideForm.tsx +14 -24
  166. package/lib/template/NarrowWide/NarrowWideForm/config-ext.json +1 -2
  167. package/lib/template/NarrowWide/NarrowWidePage/NarrowWidePage.tsx +9 -19
  168. package/lib/template/NarrowWide/NarrowWidePage/config-ext.json +1 -2
  169. package/lib/template/OneColumn/OneColumn/OneColumn.tsx +14 -15
  170. package/lib/template/OneColumn/OneColumn/config-ext.json +1 -2
  171. package/lib/template/OneColumn/OneColumnPage/OneColumnPage.tsx +3 -10
  172. package/lib/template/OneColumn/OneColumnPage/config-ext.json +1 -2
  173. package/lib/template/OneColumn/OneColumnTab/OneColumnTab.tsx +6 -10
  174. package/lib/template/OneColumn/OneColumnTab/config-ext.json +1 -2
  175. package/lib/template/PromotedFilters/PromotedFilters.css +1 -1
  176. package/lib/template/PromotedFilters/PromotedFilters.tsx +32 -28
  177. package/lib/template/SimpleTable/SimpleTable/SimpleTable.tsx +37 -33
  178. package/lib/template/SimpleTable/SimpleTable/config-ext.json +1 -2
  179. package/lib/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +184 -118
  180. package/lib/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.tsx +24 -25
  181. package/lib/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +30 -30
  182. package/lib/template/SubTabs/SubTabs.tsx +22 -40
  183. package/lib/template/SubTabs/config-ext.json +1 -2
  184. package/lib/template/SubTabs/tabUtils.ts +2 -5
  185. package/lib/template/TwoColumn/TwoColumn/TwoColumn.css +0 -1
  186. package/lib/template/TwoColumn/TwoColumn/TwoColumn.tsx +30 -28
  187. package/lib/template/TwoColumn/TwoColumn/config-ext.json +1 -2
  188. package/lib/template/TwoColumn/TwoColumnPage/TwoColumnPage.tsx +3 -10
  189. package/lib/template/TwoColumn/TwoColumnPage/config-ext.json +1 -2
  190. package/lib/template/TwoColumn/TwoColumnTab/TwoColumnTab.tsx +30 -28
  191. package/lib/template/TwoColumn/TwoColumnTab/config-ext.json +1 -2
  192. package/lib/template/WideNarrow/WideNarrow/WideNarrow.css +0 -2
  193. package/lib/template/WideNarrow/WideNarrow/WideNarrow.tsx +22 -34
  194. package/lib/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.tsx +24 -28
  195. package/lib/template/WideNarrow/WideNarrowDetails/config-ext.json +1 -2
  196. package/lib/template/WideNarrow/WideNarrowForm/WideNarrowForm.css +0 -2
  197. package/lib/template/WideNarrow/WideNarrowForm/WideNarrowForm.tsx +13 -21
  198. package/lib/template/WideNarrow/WideNarrowForm/config-ext.json +1 -2
  199. package/lib/template/WideNarrow/WideNarrowPage/WideNarrowPage.tsx +8 -16
  200. package/lib/template/WideNarrow/WideNarrowPage/config-ext.json +1 -2
  201. package/lib/template/WideNarrow/WideNarrowPage/index.tsx +1 -1
  202. package/lib/template/WssNavBar/WssNavBar.tsx +18 -21
  203. package/lib/widget/AppAnnouncement/AppAnnouncement.tsx +29 -28
  204. package/lib/widget/AppAnnouncement/config-ext.json +1 -2
  205. package/lib/widget/Attachment/Attachment.css +60 -1
  206. package/lib/widget/Attachment/Attachment.tsx +378 -405
  207. package/lib/widget/Attachment/index.tsx +1 -1
  208. package/lib/widget/CaseHistory/CaseHistory.tsx +64 -66
  209. package/lib/widget/CaseHistory/config-ext.json +1 -2
  210. package/lib/widget/CaseHistory/index.tsx +1 -1
  211. package/lib/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +16 -18
  212. package/lib/widget/FileUtility/FileUtility/FileUtility.css +2 -2
  213. package/lib/widget/FileUtility/FileUtility/FileUtility.tsx +310 -246
  214. package/lib/widget/FileUtility/FileUtility/config-ext.json +1 -2
  215. package/lib/widget/Followers/Followers.tsx +23 -20
  216. package/lib/widget/Followers/config-ext.json +1 -2
  217. package/lib/widget/QuickCreate/QuickCreate.tsx +68 -42
  218. package/lib/widget/SummaryItem/SummaryItem.css +9 -9
  219. package/lib/widget/SummaryItem/SummaryItem.tsx +58 -58
  220. package/lib/widget/SummaryItem/index.tsx +1 -1
  221. package/lib/widget/SummaryList/SummaryList.tsx +7 -10
  222. package/lib/widget/ToDo/ToDo.css +4 -4
  223. package/lib/widget/ToDo/ToDo.tsx +52 -53
  224. package/lib/widget/ToDo/config-ext.json +1 -2
  225. package/package.json +5 -2
  226. package/lib/helpers/auth.js +0 -834
  227. package/lib/helpers/authManager.ts +0 -933
  228. package/lib/helpers/config_access.js +0 -186
@@ -1,8 +1,8 @@
1
- import { getLocale } from "./common";
2
- import CurrencyMap from "./CurrencyMap";
1
+ import { getLocale } from './common';
2
+ import CurrencyMap from './CurrencyMap';
3
3
 
4
- // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
5
- function NumberFormatter(value, { locale = "en-US", decPlaces = 2, style="", currency="USD" } = {}): string {
4
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
5
+ function NumberFormatter(value, { locale = 'en-US', decPlaces = 2, style = '', currency = 'USD' } = {}): string {
6
6
  const currentLocale: string | undefined = getLocale(locale);
7
7
  if (value !== null && value !== undefined) {
8
8
  return Number(value).toLocaleString(currentLocale, {
@@ -15,7 +15,7 @@ function NumberFormatter(value, { locale = "en-US", decPlaces = 2, style="", cur
15
15
 
16
16
  function CurrencyFormatter(
17
17
  value: string,
18
- { symbol = true, position="before", locale="en-US", decPlaces = 2, style = "currency", currency = "USD" } = {}
18
+ { symbol = true, position = 'before', locale = 'en-US', decPlaces = 2, style = 'currency', currency = 'USD' } = {}
19
19
  ): string {
20
20
  const currentLocale: string | undefined = getLocale(locale);
21
21
  let formattedValue: string = value;
@@ -27,10 +27,10 @@ function CurrencyFormatter(
27
27
  currency
28
28
  });
29
29
 
30
- let countryCode: string | undefined = currentLocale?.split("-")[1].toUpperCase();
30
+ let countryCode: string | undefined = currentLocale?.split('-')[1].toUpperCase();
31
31
 
32
32
  // If countryCode is still undefined, setting it as US
33
- if( !countryCode ){
33
+ if (!countryCode) {
34
34
  countryCode = 'US';
35
35
  }
36
36
 
@@ -43,21 +43,18 @@ function CurrencyFormatter(
43
43
 
44
44
  // if position is provided, change placeholder accordingly.
45
45
  if (position && code) {
46
- if (position.toLowerCase() === "before" && code.startsWith("{#}")) {
46
+ if (position.toLowerCase() === 'before' && code.startsWith('{#}')) {
47
47
  code = code.slice(3) + code.slice(0, 3);
48
- } else if (
49
- position.toLowerCase() === "after" &&
50
- code.indexOf("{#}") === code.length - 3
51
- ) {
48
+ } else if (position.toLowerCase() === 'after' && code.indexOf('{#}') === code.length - 3) {
52
49
  code = code.slice(-3) + code.slice(0, -3);
53
50
  }
54
51
  }
55
- return code?.replace("{#}", formattedValue) || formattedValue;
52
+ return code?.replace('{#}', formattedValue) || formattedValue;
56
53
  }
57
54
  return formattedValue;
58
55
  }
59
56
 
60
- function SymbolFormatter(value, { symbol="$", suffix = true, locale="en-US" } = {}): string {
57
+ function SymbolFormatter(value, { symbol = '$', suffix = true, locale = 'en-US' } = {}): string {
61
58
  let formattedValue: string = value;
62
59
  if (value !== null && value !== undefined) {
63
60
  formattedValue = NumberFormatter(value, { locale });
@@ -68,16 +65,13 @@ function SymbolFormatter(value, { symbol="$", suffix = true, locale="en-US" } =
68
65
 
69
66
  export default {
70
67
  Currency: (value, options) => CurrencyFormatter(value, options),
71
- "Currency-Code": (value, options) =>
72
- CurrencyFormatter(value, { ...options, symbol: false }),
68
+ 'Currency-Code': (value, options) => CurrencyFormatter(value, { ...options, symbol: false }),
73
69
  Decimal: (value, options) => NumberFormatter(value, options),
74
- "Decimal-Auto": (value, options) =>
70
+ 'Decimal-Auto': (value, options) =>
75
71
  NumberFormatter(value, {
76
72
  ...options,
77
73
  decPlaces: Number.isInteger(value) ? 0 : 2
78
74
  }),
79
- Integer: (value, options) =>
80
- NumberFormatter(value, { ...options, decPlaces: 0 }),
81
- Percentage: (value, options) =>
82
- SymbolFormatter(value, { ...options, symbol: "%" })
75
+ Integer: (value, options) => NumberFormatter(value, { ...options, decPlaces: 0 }),
76
+ Percentage: (value, options) => SymbolFormatter(value, { ...options, symbol: '%' })
83
77
  };