@pega/react-sdk-overrides 8.8.21 → 8.23.11-debug

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 (128) hide show
  1. package/lib/designSystemExtension/AlertBanner/AlertBanner.tsx +9 -13
  2. package/lib/designSystemExtension/Banner/Banner.tsx +1 -12
  3. package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +10 -15
  4. package/lib/designSystemExtension/DetailsFields/DetailsFields.tsx +11 -10
  5. package/lib/designSystemExtension/FieldGroup/FieldGroup.tsx +3 -10
  6. package/lib/designSystemExtension/FieldGroupList/FieldGroupList.tsx +3 -11
  7. package/lib/designSystemExtension/FieldValueList/FieldValueList.tsx +3 -11
  8. package/lib/designSystemExtension/Operator/Operator.tsx +12 -16
  9. package/lib/designSystemExtension/Pulse/Pulse.tsx +7 -11
  10. package/lib/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx +1 -10
  11. package/lib/field/AutoComplete/AutoComplete.tsx +18 -37
  12. package/lib/field/CancelAlert/CancelAlert.tsx +4 -9
  13. package/lib/field/Checkbox/Checkbox.tsx +16 -39
  14. package/lib/field/Currency/Currency.tsx +15 -23
  15. package/lib/field/Currency/currency-utils.ts +5 -1
  16. package/lib/field/Date/Date.tsx +15 -22
  17. package/lib/field/DateTime/DateTime.tsx +14 -25
  18. package/lib/field/Decimal/Decimal.tsx +14 -25
  19. package/lib/field/Dropdown/Dropdown.tsx +26 -30
  20. package/lib/field/Email/Email.tsx +9 -17
  21. package/lib/field/Integer/Integer.tsx +7 -15
  22. package/lib/field/Percentage/Percentage.tsx +7 -15
  23. package/lib/field/Phone/Phone.tsx +11 -19
  24. package/lib/field/RadioButtons/RadioButtons.tsx +37 -25
  25. package/lib/field/SemanticLink/SemanticLink.tsx +25 -26
  26. package/lib/field/TextArea/TextArea.tsx +5 -14
  27. package/lib/field/TextContent/TextContent.tsx +1 -10
  28. package/lib/field/TextInput/TextInput.tsx +6 -15
  29. package/lib/field/Time/Time.tsx +27 -22
  30. package/lib/field/URL/URL.tsx +8 -16
  31. package/lib/field/UserReference/UserReference.tsx +60 -50
  32. package/lib/helpers/attachmentHelpers.ts +4 -4
  33. package/lib/helpers/auth.js +397 -741
  34. package/lib/helpers/authManager.js +634 -0
  35. package/lib/helpers/case-utils.tsx +9 -8
  36. package/lib/helpers/common-utils.ts +1 -1
  37. package/lib/helpers/config_access.js +73 -0
  38. package/lib/helpers/date-format-utils.ts +1 -1
  39. package/lib/helpers/event-utils.ts +1 -1
  40. package/lib/helpers/formatters/Currency.ts +11 -11
  41. package/lib/helpers/formatters/CurrencyMap.ts +5 -8
  42. package/lib/helpers/formatters/Date.ts +1 -1
  43. package/lib/helpers/formatters/common.ts +6 -2
  44. package/lib/helpers/formatters/index.ts +3 -3
  45. package/lib/helpers/simpleTableHelpers.ts +7 -7
  46. package/lib/helpers/state-utils.tsx +3 -0
  47. package/lib/helpers/template-utils.ts +6 -3
  48. package/lib/helpers/versionHelpers.ts +3 -0
  49. package/lib/infra/ActionButtons/ActionButtons.tsx +19 -9
  50. package/lib/infra/Assignment/Assignment.tsx +28 -21
  51. package/lib/infra/AssignmentCard/AssignmentCard.tsx +19 -15
  52. package/lib/infra/Containers/FlowContainer/FlowContainer.tsx +58 -57
  53. package/lib/infra/Containers/FlowContainer/helpers.ts +3 -0
  54. package/lib/infra/Containers/ModalViewContainer/ModalViewContainer.tsx +19 -14
  55. package/lib/infra/Containers/ViewContainer/ViewContainer.tsx +25 -14
  56. package/lib/infra/DashboardFilter/DashboardFilter.tsx +21 -13
  57. package/lib/infra/DashboardFilter/filterUtils.tsx +1 -1
  58. package/lib/infra/DeferLoad/DeferLoad.tsx +20 -14
  59. package/lib/infra/ErrorBoundary/ErrorBoundary.tsx +14 -10
  60. package/lib/infra/MultiStep/MultiStep.tsx +22 -22
  61. package/lib/infra/NavBar/NavBar.tsx +21 -14
  62. package/lib/infra/Reference/Reference.tsx +18 -13
  63. package/lib/infra/Region/Region.tsx +6 -8
  64. package/lib/infra/RootContainer/RootContainer.tsx +25 -16
  65. package/lib/infra/Stages/Stages.tsx +8 -10
  66. package/lib/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.tsx +1 -8
  67. package/lib/infra/VerticalTabs/VerticalTabs/VerticalTabs.tsx +12 -12
  68. package/lib/infra/View/View.tsx +22 -21
  69. package/lib/template/AppShell/AppShell.tsx +25 -36
  70. package/lib/template/BannerPage/BannerPage.tsx +31 -26
  71. package/lib/template/CaseSummary/CaseSummary.tsx +8 -15
  72. package/lib/template/CaseView/CaseView.tsx +25 -24
  73. package/lib/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +19 -10
  74. package/lib/template/Confirmation/Confirmation.tsx +53 -27
  75. package/lib/template/DataReference/DataReference.tsx +52 -48
  76. package/lib/template/DefaultForm/DefaultForm.tsx +12 -14
  77. package/lib/template/Details/Details/Details.tsx +17 -16
  78. package/lib/template/Details/DetailsSubTabs/DetailsSubTabs.tsx +16 -13
  79. package/lib/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx +18 -19
  80. package/lib/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx +18 -20
  81. package/lib/template/FieldGroupTemplate/FieldGroupTemplate.tsx +28 -22
  82. package/lib/template/InlineDashboard/InlineDashboard.tsx +7 -11
  83. package/lib/template/InlineDashboardPage/InlineDashboardPage.tsx +17 -19
  84. package/lib/template/ListPage/ListPage.tsx +13 -14
  85. package/lib/template/ListView/ListView.tsx +186 -189
  86. package/lib/template/ListView/utils.ts +23 -170
  87. package/lib/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +19 -10
  88. package/lib/template/NarrowWide/NarrowWide/NarrowWide.tsx +1 -16
  89. package/lib/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.tsx +18 -19
  90. package/lib/template/NarrowWide/NarrowWideForm/NarrowWideForm.tsx +1 -9
  91. package/lib/template/NarrowWide/NarrowWidePage/NarrowWidePage.tsx +17 -17
  92. package/lib/template/OneColumn/OneColumn/OneColumn.tsx +7 -8
  93. package/lib/template/OneColumn/OneColumnPage/OneColumnPage.tsx +10 -10
  94. package/lib/template/OneColumn/OneColumnTab/OneColumnTab.tsx +7 -5
  95. package/lib/template/PromotedFilters/PromotedFilters.tsx +14 -16
  96. package/lib/template/SimpleTable/SimpleTable/SimpleTable.tsx +8 -102
  97. package/lib/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +7 -24
  98. package/lib/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.tsx +33 -23
  99. package/lib/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +36 -34
  100. package/lib/template/SubTabs/SubTabs.tsx +11 -10
  101. package/lib/template/SubTabs/tabUtils.ts +4 -0
  102. package/lib/template/TwoColumn/TwoColumn/TwoColumn.tsx +15 -10
  103. package/lib/template/TwoColumn/TwoColumnPage/TwoColumnPage.tsx +10 -10
  104. package/lib/template/TwoColumn/TwoColumnTab/TwoColumnTab.tsx +12 -10
  105. package/lib/template/WideNarrow/WideNarrow/WideNarrow.tsx +3 -17
  106. package/lib/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.tsx +25 -35
  107. package/lib/template/WideNarrow/WideNarrowForm/WideNarrowForm.tsx +1 -7
  108. package/lib/template/WideNarrow/WideNarrowPage/WideNarrowPage.tsx +17 -15
  109. package/lib/template/WssNavBar/WssNavBar.tsx +1 -18
  110. package/lib/widget/AppAnnouncement/AppAnnouncement.tsx +21 -13
  111. package/lib/widget/Attachment/Attachment.tsx +16 -28
  112. package/lib/widget/CaseHistory/CaseHistory.tsx +10 -12
  113. package/lib/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +1 -13
  114. package/lib/widget/FileUtility/FileUtility/FileUtility.tsx +22 -35
  115. package/lib/widget/Followers/Followers.tsx +11 -10
  116. package/lib/widget/QuickCreate/QuickCreate.tsx +5 -11
  117. package/lib/widget/SummaryItem/SummaryItem.tsx +1 -11
  118. package/lib/widget/SummaryList/SummaryList.tsx +3 -17
  119. package/lib/widget/ToDo/ToDo.tsx +105 -62
  120. package/package.json +1 -1
  121. package/lib/designSystemExtension/RichTextEditor/RichTextEditor.tsx +0 -121
  122. package/lib/designSystemExtension/RichTextEditor/index.tsx +0 -1
  123. package/lib/field/RichText/RichText.tsx +0 -93
  124. package/lib/field/RichText/index.tsx +0 -1
  125. package/lib/field/ScalarList/ScalarList.tsx +0 -64
  126. package/lib/field/ScalarList/config-ext.json +0 -8
  127. package/lib/field/ScalarList/index.tsx +0 -1
  128. package/lib/helpers/authManager.ts +0 -933
@@ -1,25 +1,11 @@
1
1
  import React, { createElement } from 'react';
2
+ import PropTypes from 'prop-types';
2
3
  import Grid from '@material-ui/core/Grid';
3
4
  import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
4
- import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
5
+ import FieldGroup from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldGroup';
5
6
 
6
- // import type { PConnProps } from '../../../../types/PConnProps';
7
-
8
-
9
- // Can't use PConnProps until getPConnect().getChildren() type is ok
10
- // interface DetailsTwoColumnProps extends PConnProps {
11
- // // If any, enter additional props that only exist on this component
12
- // showLabel: boolean,
13
- // label: string,
14
- // showHighlightedData: boolean
15
- // }
16
-
17
-
18
- export default function DetailsTwoColumn(props /* : DetailsTwoColumnProps */) {
19
- // Get emitted components from map (so we can get any override that may exist)
20
- const FieldGroup = getComponentFromMap('FieldGroup');
21
-
22
- const { label, showLabel = true, getPConnect, showHighlightedData = false } = props;
7
+ export default function DetailsTwoColumn(props) {
8
+ const { label, showLabel, getPConnect, showHighlightedData } = props;
23
9
 
24
10
  // Get the inherited props from the parent to determine label settings
25
11
  const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };
@@ -51,8 +37,7 @@ export default function DetailsTwoColumn(props /* : DetailsTwoColumnProps */) {
51
37
  field.config.displayAsStatus = true;
52
38
  }
53
39
 
54
- return getPConnect().createComponent(field,
55
- '', '', {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional
40
+ return getPConnect().createComponent(field);
56
41
  });
57
42
  }
58
43
 
@@ -77,3 +62,16 @@ export default function DetailsTwoColumn(props /* : DetailsTwoColumnProps */) {
77
62
  </FieldGroup>
78
63
  );
79
64
  }
65
+
66
+ DetailsTwoColumn.defaultProps = {
67
+ label: undefined,
68
+ showLabel: true,
69
+ showHighlightedData: false
70
+ };
71
+
72
+ DetailsTwoColumn.propTypes = {
73
+ showLabel: PropTypes.bool,
74
+ label: PropTypes.string,
75
+ getPConnect: PropTypes.func.isRequired,
76
+ showHighlightedData: PropTypes.bool
77
+ };
@@ -1,35 +1,24 @@
1
1
  /* eslint-disable react-hooks/rules-of-hooks */
2
2
  import React, { useMemo } from 'react';
3
- import { getReferenceList, buildView } from '@pega/react-sdk-components/lib/components/helpers/field-group-utils';
4
- import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
3
+ import PropTypes from 'prop-types';
5
4
 
6
- import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
5
+ import FieldGroup from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldGroup';
6
+ import FieldGroupList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldGroupList';
7
+ import { getReferenceList, buildView } from '@pega/react-sdk-components/lib/components/helpers/field-group-utils';
7
8
 
8
- interface FieldGroupTemplateProps extends PConnProps {
9
- // If any, enter additional props that only exist on this component
10
- referenceList?: Array<any>,
11
- contextClass: string,
12
- renderMode?: string,
13
- heading?: string,
14
- lookForChildInConfig?: boolean,
15
- displayMode?: string,
16
- fieldHeader?: string,
17
- allowTableEdit: boolean
18
- }
9
+ import PCoreType from '@pega/pcore-pconnect-typedefs/types/pcore';
19
10
 
11
+ declare const PCore: typeof PCoreType;
20
12
 
21
- export default function FieldGroupTemplate(props: FieldGroupTemplateProps) {
22
- // Get emitted components from map (so we can get any override that may exist)
23
- const FieldGroup = getComponentFromMap('FieldGroup');
24
- const FieldGroupList = getComponentFromMap('FieldGroupList');
25
13
 
14
+ export default function FieldGroupTemplate(props) {
26
15
  const {
27
- referenceList = [],
16
+ referenceList,
28
17
  renderMode,
29
18
  contextClass,
30
19
  getPConnect,
31
20
  lookForChildInConfig,
32
- heading = '',
21
+ heading,
33
22
  displayMode,
34
23
  fieldHeader,
35
24
  allowTableEdit: allowAddEdit
@@ -52,7 +41,7 @@ export default function FieldGroupTemplate(props: FieldGroupTemplateProps) {
52
41
  if (PCore.getPCoreVersion()?.includes('8.7')) {
53
42
  pConn.getListActions().insert({ classID: contextClass }, referenceList.length, pageReference);
54
43
  } else {
55
- pConn.getListActions().insert({}, referenceList.length, null); // 3rd arg null until typedef marked correctly as optional
44
+ pConn.getListActions().insert({}, referenceList.length);
56
45
  }
57
46
  };
58
47
 
@@ -64,7 +53,7 @@ export default function FieldGroupTemplate(props: FieldGroupTemplateProps) {
64
53
  if (PCore.getPCoreVersion()?.includes('8.7')) {
65
54
  pConn.getListActions().deleteEntry(index, pageReference);
66
55
  } else {
67
- pConn.getListActions().deleteEntry(index, null); // 2nd arg null until typedef marked correctly as optional
56
+ pConn.getListActions().deleteEntry(index);
68
57
  }
69
58
  };
70
59
  if (referenceList.length === 0 && allowAddEdit !== false) {
@@ -108,3 +97,20 @@ export default function FieldGroupTemplate(props: FieldGroupTemplateProps) {
108
97
 
109
98
  return <div>{memoisedReadOnlyList}</div>;
110
99
  }
100
+
101
+ FieldGroupTemplate.defaultProps = {
102
+ referenceList: [],
103
+ heading: undefined,
104
+ contextClass: null,
105
+ displayMode: undefined
106
+ };
107
+
108
+ FieldGroupTemplate.propTypes = {
109
+ referenceList: PropTypes.arrayOf(Object),
110
+ contextClass: PropTypes.string,
111
+ getPConnect: PropTypes.func.isRequired,
112
+ renderMode: PropTypes.string.isRequired,
113
+ heading: PropTypes.string,
114
+ lookForChildInConfig: PropTypes.bool,
115
+ displayMode: PropTypes.string
116
+ };
@@ -1,16 +1,7 @@
1
1
  import React from 'react';
2
+ import PropTypes from 'prop-types';
2
3
  import { Grid, Typography } from '@material-ui/core';
3
4
  import { makeStyles } from '@material-ui/core/styles';
4
- import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
5
-
6
- // InlineDashboard does NOT have getPConnect. So, no need to extend from PConnProps
7
- interface InlineDashboardProps extends PConnProps {
8
- // If any, enter additional props that only exist on this component
9
- children: Array<any>,
10
- title: string,
11
- filterPosition?: string
12
- }
13
-
14
5
 
15
6
  const useStyles = makeStyles((/* theme */) => ({
16
7
  headerStyles: {
@@ -39,7 +30,7 @@ const useStyles = makeStyles((/* theme */) => ({
39
30
  }
40
31
  }));
41
32
 
42
- export default function InlineDashboard(props: InlineDashboardProps) {
33
+ export default function InlineDashboard(props) {
43
34
  const classes = useStyles();
44
35
 
45
36
  const { children, title, filterPosition } = props;
@@ -74,3 +65,8 @@ export default function InlineDashboard(props: InlineDashboardProps) {
74
65
  </>
75
66
  );
76
67
  }
68
+
69
+ InlineDashboard.propTypes = {
70
+ children: PropTypes.arrayOf(PropTypes.node).isRequired
71
+ // template: PropTypes.string.isRequired
72
+ };
@@ -1,27 +1,12 @@
1
1
  import React from 'react';
2
2
  import { useMemo, Children, useEffect, useState } from 'react';
3
+ import PropTypes from 'prop-types';
3
4
 
4
5
  import { buildFilterComponents } from '@pega/react-sdk-components/lib/components/infra/DashboardFilter/filterUtils';
5
- import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
6
+ import InlineDashboard from '@pega/react-sdk-components/lib/components/template/InlineDashboard';
6
7
 
7
- import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
8
-
9
-
10
- interface InlineDashboardPageProps extends PConnProps {
11
- // If any, enter additional props that only exist on this component
12
- children: Array<any>,
13
- title: string,
14
- icon?: string,
15
- filterPosition?: string
16
- }
17
-
18
-
19
- export default function InlineDashboardPage(props: InlineDashboardPageProps) {
20
- // Get emitted components from map (so we can get any override that may exist)
21
- const InlineDashboard = getComponentFromMap("InlineDashboard");
22
-
23
- // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
24
- const { children, getPConnect, icon = '', filterPosition = 'block-start' } = props;
8
+ export default function InlineDashboardPage(props) {
9
+ const { children, getPConnect } = props;
25
10
  const [filterComponents, setFilterComponents] = useState([]);
26
11
  const childArray = useMemo(() => {
27
12
  return Children.toArray(children);
@@ -41,3 +26,16 @@ export default function InlineDashboardPage(props: InlineDashboardPageProps) {
41
26
 
42
27
  return <InlineDashboard {...inlineProps} />;
43
28
  }
29
+
30
+ InlineDashboardPage.propTypes = {
31
+ children: PropTypes.arrayOf(PropTypes.node).isRequired,
32
+ getPConnect: PropTypes.func.isRequired,
33
+ title: PropTypes.string.isRequired,
34
+ icon: PropTypes.string,
35
+ filterPosition: PropTypes.string
36
+ };
37
+
38
+ InlineDashboardPage.defaultProps = {
39
+ icon: '',
40
+ filterPosition: 'block-start'
41
+ };
@@ -1,21 +1,20 @@
1
1
  import React from "react";
2
- import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
2
+ import PropTypes from "prop-types";
3
3
 
4
- import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
4
+ import ListView from '@pega/react-sdk-components/lib/components/template/ListView';
5
5
 
6
- interface ListPageProps extends PConnProps {
7
- // If any, enter additional props that only exist on this component
8
- parameters: object
9
- }
10
-
11
-
12
- export default function ListPage(props: ListPageProps) {
13
- // Get emitted components from map (so we can get any override that may exist)
14
- const ListView = getComponentFromMap('ListView');
6
+ export default function ListPage(props) {
15
7
 
16
- // special case for ListView - add in a prop
17
- const listViewProps = {...props, bInForm: false};
18
8
  return (
19
- <ListView {...listViewProps}></ListView>
9
+ <ListView {...props}></ListView>
20
10
  )
21
11
  }
12
+
13
+ ListPage.defaultProps = {
14
+ parameters: undefined
15
+ };
16
+
17
+ ListPage.propTypes = {
18
+ getPConnect: PropTypes.func.isRequired,
19
+ parameters: PropTypes.objectOf(PropTypes.any)
20
+ };