@pega/react-sdk-overrides 24.2.10 → 25.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/lib/designSystemExtension/Banner/Banner.css +1 -1
  2. package/lib/designSystemExtension/Banner/Banner.tsx +10 -7
  3. package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
  4. package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +53 -37
  5. package/lib/designSystemExtension/DetailsFields/DetailsFields.tsx +11 -13
  6. package/lib/designSystemExtension/FieldGroup/FieldGroup.tsx +8 -9
  7. package/lib/designSystemExtension/FieldGroupList/FieldGroupList.tsx +9 -9
  8. package/lib/designSystemExtension/FieldValueList/FieldValueList.tsx +8 -9
  9. package/lib/designSystemExtension/Operator/Operator.tsx +21 -19
  10. package/lib/designSystemExtension/Pulse/Pulse.tsx +1 -1
  11. package/lib/designSystemExtension/RichTextEditor/RichTextEditor.tsx +32 -4
  12. package/lib/designSystemExtension/WssQuickCreate/WssQuickCreate.css +7 -14
  13. package/lib/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx +13 -2
  14. package/lib/field/AutoComplete/AutoComplete.tsx +1 -1
  15. package/lib/field/CancelAlert/CancelAlert.css +4 -4
  16. package/lib/field/CancelAlert/CancelAlert.tsx +7 -10
  17. package/lib/field/Checkbox/Checkbox.tsx +97 -4
  18. package/lib/field/Currency/Currency.tsx +10 -7
  19. package/lib/field/Currency/currency-utils.ts +1 -2
  20. package/lib/field/Date/Date.tsx +8 -8
  21. package/lib/field/DateTime/DateTime.tsx +16 -13
  22. package/lib/field/Decimal/Decimal.tsx +10 -7
  23. package/lib/field/Dropdown/Dropdown.tsx +30 -25
  24. package/lib/field/Email/Email.tsx +11 -13
  25. package/lib/field/Group/Group.tsx +10 -8
  26. package/lib/field/Integer/Integer.tsx +5 -7
  27. package/lib/field/Location/Location.css +4 -0
  28. package/lib/field/Location/Location.tsx +258 -0
  29. package/lib/field/Location/config-ext.json +8 -0
  30. package/lib/field/Location/index.tsx +1 -0
  31. package/lib/field/Multiselect/utils.ts +1 -1
  32. package/lib/field/ObjectReference/ObjectReference.tsx +235 -0
  33. package/lib/field/ObjectReference/index.tsx +1 -0
  34. package/lib/field/ObjectReference/utils.ts +111 -0
  35. package/lib/field/Percentage/Percentage.tsx +9 -9
  36. package/lib/field/Phone/Phone.tsx +7 -5
  37. package/lib/field/RadioButtons/RadioButtons.tsx +47 -5
  38. package/lib/field/RichText/RichText.css +79 -0
  39. package/lib/field/RichText/RichText.tsx +3 -1
  40. package/lib/field/ScalarList/ScalarList.tsx +2 -4
  41. package/lib/field/SelectableCard/SelectableCard.tsx +175 -0
  42. package/lib/field/SelectableCard/index.tsx +1 -0
  43. package/lib/field/SelectableCard/utils.tsx +223 -0
  44. package/lib/field/SemanticLink/SemanticLink.tsx +160 -28
  45. package/lib/field/SemanticLink/utils.ts +1 -1
  46. package/lib/field/TextArea/TextArea.tsx +5 -7
  47. package/lib/field/TextContent/TextContent.tsx +1 -2
  48. package/lib/field/TextInput/TextInput.tsx +5 -7
  49. package/lib/field/Time/Time.tsx +4 -8
  50. package/lib/field/URL/URL.tsx +5 -7
  51. package/lib/field/UserReference/UserReference.tsx +3 -6
  52. package/lib/helpers/attachmentShared.ts +6 -0
  53. package/lib/helpers/common-utils.ts +24 -2
  54. package/lib/helpers/data_page.ts +0 -1
  55. package/lib/helpers/field-group-utils.ts +1 -1
  56. package/lib/helpers/formatters/Currency.ts +20 -20
  57. package/lib/helpers/formatters/CurrencyMap.ts +0 -2
  58. package/lib/helpers/formatters/common.ts +2 -1
  59. package/lib/helpers/formatters/index.ts +2 -4
  60. package/lib/helpers/object-utils.ts +10 -0
  61. package/lib/helpers/simpleTableHelpers.ts +118 -6
  62. package/lib/helpers/utils.ts +8 -1
  63. package/lib/helpers/versionHelpers.ts +0 -1
  64. package/lib/infra/ActionButtons/ActionButtons.tsx +28 -21
  65. package/lib/infra/Assignment/Assignment.tsx +39 -36
  66. package/lib/infra/AssignmentCard/AssignmentCard.tsx +2 -2
  67. package/lib/infra/Containers/FlowContainer/FlowContainer.tsx +21 -113
  68. package/lib/infra/Containers/FlowContainer/helpers.ts +1 -5
  69. package/lib/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx +4 -3
  70. package/lib/infra/Containers/ModalViewContainer/ModalViewContainer.tsx +7 -6
  71. package/lib/infra/Containers/SimpleView/helper.ts +1 -1
  72. package/lib/infra/Containers/ViewContainer/ViewContainer.tsx +4 -5
  73. package/lib/infra/Containers/container-helpers.ts +52 -0
  74. package/lib/infra/DashboardFilter/DashboardFilter.tsx +5 -9
  75. package/lib/infra/DashboardFilter/filterUtils.tsx +3 -6
  76. package/lib/infra/DeferLoad/DeferLoad.tsx +7 -9
  77. package/lib/infra/ErrorBoundary/ErrorBoundary.tsx +1 -3
  78. package/lib/infra/MultiStep/MultiStep.css +48 -70
  79. package/lib/infra/MultiStep/MultiStep.tsx +27 -58
  80. package/lib/infra/NavBar/NavBar.css +1 -1
  81. package/lib/infra/NavBar/NavBar.tsx +43 -32
  82. package/lib/infra/Reference/Reference.tsx +3 -4
  83. package/lib/infra/Region/Region.tsx +1 -1
  84. package/lib/infra/RootContainer/RootContainer.tsx +3 -4
  85. package/lib/infra/Stages/Stages.tsx +3 -4
  86. package/lib/infra/View/View.tsx +4 -3
  87. package/lib/template/AdvancedSearch/AdvancedSearch.tsx +86 -0
  88. package/lib/template/AdvancedSearch/SearchGroup/persistUtils.ts +52 -0
  89. package/lib/template/AdvancedSearch/SearchGroups/SearchGroups.tsx +244 -0
  90. package/lib/template/AdvancedSearch/SearchGroups/hooks.ts +37 -0
  91. package/lib/template/AdvancedSearch/SearchGroups/index.tsx +1 -0
  92. package/lib/template/AdvancedSearch/SearchGroups/utils.ts +29 -0
  93. package/lib/template/AdvancedSearch/TemplateContext.ts +11 -0
  94. package/lib/template/AdvancedSearch/config-ext.json +9 -0
  95. package/lib/template/AdvancedSearch/index.tsx +1 -0
  96. package/lib/template/AppShell/AppShell.css +1 -1
  97. package/lib/template/AppShell/AppShell.tsx +22 -23
  98. package/lib/template/BannerPage/BannerPage.tsx +2 -2
  99. package/lib/template/CaseSummary/CaseSummary.tsx +28 -41
  100. package/lib/template/CaseView/CaseView.tsx +32 -38
  101. package/lib/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +1 -1
  102. package/lib/template/Confirmation/Confirmation.tsx +3 -4
  103. package/lib/template/DataReference/DataReference.tsx +312 -106
  104. package/lib/template/DataReference/DataReferenceAdvancedSearchContext.ts +10 -0
  105. package/lib/template/DataReference/SearchForm.tsx +149 -0
  106. package/lib/template/DataReference/utils.ts +90 -0
  107. package/lib/template/DefaultForm/DefaultForm.tsx +3 -3
  108. package/lib/template/DefaultForm/utils/index.ts +1 -3
  109. package/lib/template/DefaultPage/DefaultPage.tsx +108 -0
  110. package/lib/template/DefaultPage/index.tsx +1 -0
  111. package/lib/template/Details/Details/Details.tsx +11 -11
  112. package/lib/template/Details/DetailsSubTabs/DetailsSubTabs.tsx +2 -2
  113. package/lib/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx +11 -11
  114. package/lib/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx +11 -11
  115. package/lib/template/Details/DynamicTabs/DynamicTabs.tsx +1 -2
  116. package/lib/template/FieldGroupTemplate/FieldGroupTemplate.tsx +2 -5
  117. package/lib/template/InlineDashboard/InlineDashboard.tsx +14 -16
  118. package/lib/template/InlineDashboardPage/InlineDashboardPage.tsx +2 -2
  119. package/lib/template/ListPage/ListPage.tsx +1 -1
  120. package/lib/template/ListView/ListView.tsx +285 -204
  121. package/lib/template/ListView/hooks.ts +1 -5
  122. package/lib/template/ListView/utils.ts +38 -6
  123. package/lib/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +1 -1
  124. package/lib/template/NarrowWide/NarrowWide/NarrowWide.tsx +5 -5
  125. package/lib/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.tsx +11 -11
  126. package/lib/template/NarrowWide/NarrowWideForm/NarrowWideForm.tsx +2 -2
  127. package/lib/template/NarrowWide/NarrowWidePage/NarrowWidePage.tsx +2 -2
  128. package/lib/template/OneColumn/OneColumn/OneColumn.tsx +7 -7
  129. package/lib/template/OneColumn/OneColumnPage/OneColumnPage.tsx +1 -1
  130. package/lib/template/OneColumn/OneColumnTab/OneColumnTab.tsx +2 -2
  131. package/lib/template/PromotedFilters/PromotedFilters.tsx +1 -3
  132. package/lib/template/SelfServiceCaseView/SelfServiceCaseView.tsx +145 -0
  133. package/lib/template/SelfServiceCaseView/index.tsx +1 -0
  134. package/lib/template/SimpleTable/SimpleTable/SimpleTable.tsx +2 -5
  135. package/lib/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +99 -84
  136. package/lib/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.tsx +3 -5
  137. package/lib/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +10 -2
  138. package/lib/template/SubTabs/SubTabs.tsx +2 -2
  139. package/lib/template/SubTabs/tabUtils.ts +118 -1
  140. package/lib/template/TwoColumn/TwoColumn/TwoColumn.tsx +9 -10
  141. package/lib/template/TwoColumn/TwoColumnPage/TwoColumnPage.tsx +1 -1
  142. package/lib/template/TwoColumn/TwoColumnTab/TwoColumnTab.tsx +9 -10
  143. package/lib/template/WideNarrow/WideNarrow/WideNarrow.tsx +5 -5
  144. package/lib/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.tsx +11 -11
  145. package/lib/template/WideNarrow/WideNarrowForm/WideNarrowForm.tsx +2 -2
  146. package/lib/template/WideNarrow/WideNarrowPage/WideNarrowPage.tsx +2 -2
  147. package/lib/template/WssNavBar/WssNavBar.css +1 -1
  148. package/lib/template/WssNavBar/WssNavBar.tsx +6 -6
  149. package/lib/template/utils.tsx +58 -0
  150. package/lib/widget/AppAnnouncement/AppAnnouncement.tsx +1 -1
  151. package/lib/widget/Attachment/Attachment.css +7 -8
  152. package/lib/widget/Attachment/Attachment.tsx +304 -231
  153. package/lib/widget/Attachment/Attachment.types.ts +96 -0
  154. package/lib/widget/Attachment/AttachmentUtils.ts +316 -0
  155. package/lib/widget/CaseHistory/CaseHistory.tsx +5 -5
  156. package/lib/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.css +0 -14
  157. package/lib/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +3 -3
  158. package/lib/widget/FileUtility/FileUtility/FileUtility.css +7 -6
  159. package/lib/widget/FileUtility/FileUtility/FileUtility.tsx +30 -23
  160. package/lib/widget/Followers/Followers.tsx +2 -4
  161. package/lib/widget/QuickCreate/QuickCreate.tsx +1 -3
  162. package/lib/widget/SummaryItem/SummaryItem.css +9 -11
  163. package/lib/widget/SummaryItem/SummaryItem.tsx +3 -3
  164. package/lib/widget/SummaryList/SummaryList.tsx +1 -1
  165. package/lib/widget/ToDo/ToDo.css +1 -13
  166. package/lib/widget/ToDo/ToDo.tsx +38 -37
  167. package/package.json +1 -1
  168. package/lib/helpers/attachmentHelpers.ts +0 -76
  169. package/lib/infra/Containers/helpers.ts +0 -6
@@ -0,0 +1,90 @@
1
+ const isSelfReferencedProperty = (param, referenceProp) => {
2
+ const [, parentPropName] = param.split('.');
3
+ const referencePropParent = referenceProp?.split('.').pop();
4
+ return parentPropName === referencePropParent;
5
+ };
6
+
7
+ export function getFieldMeta(getPConnect, dataRelationshipContext) {
8
+ const pConn = getPConnect();
9
+ const { selectionMode, selectionList } = pConn.getConfigProps();
10
+ const { MULTI } = PCore.getConstants().LIST_SELECTION_MODE;
11
+
12
+ const isMultiSelectMode = selectionMode === MULTI;
13
+
14
+ const pageReference = pConn.getPageReference();
15
+ let referenceProp = isMultiSelectMode ? selectionList.substring(1) : pageReference.substring(pageReference.lastIndexOf('.') + 1);
16
+ // Replace here to use the context name instead
17
+ let contextPageReference = null;
18
+ if (dataRelationshipContext !== null && selectionMode === 'single') {
19
+ referenceProp = dataRelationshipContext;
20
+ contextPageReference = pageReference.concat('.').concat(referenceProp);
21
+ }
22
+
23
+ const fieldMetadata =
24
+ (isMultiSelectMode ? pConn.getFieldMetadata(`${referenceProp}`) : pConn.getCurrentPageFieldMetadata(contextPageReference)) ?? {};
25
+ const { datasource: { parameters: fieldParameters = {} } = {} } = fieldMetadata;
26
+ const compositeKeys: any = [];
27
+ Object.values(fieldParameters).forEach((param: any) => {
28
+ if (isSelfReferencedProperty(param, referenceProp)) compositeKeys.push(param.substring(param.lastIndexOf('.') + 1));
29
+ });
30
+
31
+ return { compositeKeys, fieldMetadata };
32
+ }
33
+
34
+ /**
35
+ * returns array of self-referenced properties of the datasource
36
+ * Ex: returns ["@P .DataRef.pyGUID", "@P .DataRef.customerID"]
37
+ */
38
+ const getCompositeKeys = (pConnect, property) => {
39
+ const fieldMetadata = pConnect.getFieldMetadata(property) || {};
40
+ const { datasource: { parameters: fieldParameters = {} } = {} } = fieldMetadata;
41
+ const compositeKeys: any = [];
42
+ Object.values(fieldParameters).forEach(param => {
43
+ if (isSelfReferencedProperty(param, property)) {
44
+ compositeKeys.push(param);
45
+ }
46
+ });
47
+ return compositeKeys;
48
+ };
49
+
50
+ export const getFirstChildConfig = ({
51
+ firstChildMeta,
52
+ getPConnect,
53
+ rawViewMetadata,
54
+ contextClass,
55
+ dataReferenceConfigToChild,
56
+ isCreateNewReferenceEnabled,
57
+ disableStartingFieldsForReference,
58
+ pyID
59
+ }) => {
60
+ const config = {
61
+ ...firstChildMeta.config,
62
+ ...dataReferenceConfigToChild
63
+ };
64
+ const compositeKeys = getCompositeKeys(getPConnect(), dataReferenceConfigToChild?.dataRelationshipContext);
65
+ return {
66
+ ...config,
67
+ viewName: getPConnect().getCurrentView(),
68
+ referenceList: config.referenceList ?? rawViewMetadata.config.referenceList,
69
+ parameters: rawViewMetadata.config.parameters,
70
+ localeReference: rawViewMetadata.config.localeReference,
71
+ contextClass: config.contextClass || rawViewMetadata?.config?.contextClass || rawViewMetadata?.config?.targetObjectClass,
72
+ allowAddingNewRecords: firstChildMeta.type === 'SimpleTableSelect' && isCreateNewReferenceEnabled ? true : undefined,
73
+ actions: firstChildMeta.type === 'SimpleTableSelect' &&
74
+ isCreateNewReferenceEnabled && [
75
+ {
76
+ action: 'ADD_CASE',
77
+ config: {
78
+ label: '@L Add',
79
+ caseType: contextClass,
80
+ inputFields: disableStartingFieldsForReference
81
+ ? {}
82
+ : {
83
+ [`.pyAddCaseContextPage.${pyID}`]: `@P .${pyID}`
84
+ }
85
+ }
86
+ }
87
+ ],
88
+ compositeKeys
89
+ };
90
+ };
@@ -1,11 +1,11 @@
1
- import { createElement, PropsWithChildren } from 'react';
1
+ import { createElement, type PropsWithChildren } from 'react';
2
2
 
3
3
  import { getInstructions } from '@pega/react-sdk-components/lib/components/helpers/template-utils';
4
4
  import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
5
5
  import connectToState from '@pega/react-sdk-components/lib/components/helpers/state-utils';
6
6
 
7
7
  import { getKeyForMappedField, mapStateToProps } from './utils';
8
- import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
8
+ import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
9
9
 
10
10
  import './DefaultForm.css';
11
11
 
@@ -56,7 +56,7 @@ export default function DefaultForm(props: PropsWithChildren<DefaultFormProps>)
56
56
  {instructions && (
57
57
  <div className='psdk-default-form-instruction-text'>
58
58
  {/* server performs sanitization method for instructions html content */}
59
- {/* eslint-disable react/no-danger */}
59
+ {}
60
60
  <div key='instructions' id='instruction-text' dangerouslySetInnerHTML={{ __html: instructions }} />
61
61
  </div>
62
62
  )}
@@ -1,5 +1,3 @@
1
- import { v4 as uuidv4 } from 'uuid';
2
-
3
1
  export const mapStateToProps: any = (_, ownProps) => {
4
2
  const { getPConnect } = ownProps;
5
3
 
@@ -24,5 +22,5 @@ export const getKeyForMappedField = field => {
24
22
  return JSON.stringify(pConnect.meta);
25
23
  }
26
24
 
27
- return uuidv4();
25
+ return crypto.randomUUID();
28
26
  };
@@ -0,0 +1,108 @@
1
+ import { useMemo, Children } from 'react';
2
+ import type { ReactNode } from 'react';
3
+ import { Grid2 } from '@mui/material';
4
+ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
5
+
6
+ export interface CommonPageProps {
7
+ /** Page title */
8
+ title: string;
9
+
10
+ /** Page icon */
11
+ icon: string;
12
+
13
+ /** Region children */
14
+ children: ReactNode | ReactNode[];
15
+
16
+ /** Dynamic page pconnect object */
17
+ // getPConnect: () => PConnect;
18
+
19
+ /** Enable GetNextWork in page */
20
+ enableGetNextWork?: boolean;
21
+
22
+ /** GetAI coaches configured in page */
23
+ // coaches?: GenAICoach[];
24
+
25
+ /** Locale reference */
26
+ localeReference: string;
27
+ }
28
+ interface DefaultPageProps extends CommonPageProps {
29
+ /** Default page layout one or two columns */
30
+ layout: 'one-column' | 'two-column' | 'wide-narrow' | 'narrow-wide' | 'dynamic';
31
+
32
+ /** Flag to enable banner/hero */
33
+ enableBanner?: boolean;
34
+
35
+ /** Banner - Heading displayed */
36
+ heading?: string;
37
+
38
+ /** Banner - Message displayed */
39
+ message?: string;
40
+
41
+ /** Banner - Theme of the image */
42
+ imageTheme?: 'light' | 'dark' | undefined;
43
+
44
+ /** Banner - Background image */
45
+ backgroundImage?: string;
46
+
47
+ /** Banner - Background color */
48
+ backgroundColor?: string;
49
+
50
+ /** Banner - Tint image */
51
+ tintImage?: boolean;
52
+
53
+ /** Flag to enable layout model */
54
+ // layoutModel?: GridLayoutModel | undefined;
55
+ }
56
+
57
+ const COLUMNS_WIDTHS = {
58
+ 'one-column': [12],
59
+ 'two-column': [6, 6],
60
+ 'narrow-wide': [4, 8],
61
+ 'wide-narrow': [8, 4]
62
+ };
63
+
64
+ export default function DefaultPage({
65
+ layout = 'one-column',
66
+ children,
67
+ enableBanner,
68
+ heading = '',
69
+ message = '',
70
+ imageTheme,
71
+ backgroundImage = '',
72
+ backgroundColor = '',
73
+ tintImage
74
+ }: DefaultPageProps) {
75
+ const Banner = getComponentFromMap('Banner');
76
+
77
+ const childArray = useMemo(() => {
78
+ return Children.toArray(children);
79
+ }, [children]);
80
+
81
+ if (enableBanner) {
82
+ return (
83
+ <Banner
84
+ variant={layout === 'one-column' ? 'two-column' : layout}
85
+ a={[childArray[0]]}
86
+ b={[childArray[1]]}
87
+ banner={{
88
+ variant: imageTheme,
89
+ backgroundColor,
90
+ title: heading,
91
+ message,
92
+ backgroundImage,
93
+ tintImage
94
+ }}
95
+ />
96
+ );
97
+ }
98
+
99
+ return (
100
+ <Grid2 container spacing={1}>
101
+ {childArray.map((child, index) => (
102
+ <Grid2 key={index} size={COLUMNS_WIDTHS[layout][index]}>
103
+ {child}
104
+ </Grid2>
105
+ ))}
106
+ </Grid2>
107
+ );
108
+ }
@@ -0,0 +1 @@
1
+ export { default } from './DefaultPage';
@@ -1,9 +1,9 @@
1
1
  import { createElement } from 'react';
2
- import Grid from '@mui/material/Grid';
2
+ import Grid2 from '@mui/material/Grid2';
3
3
 
4
4
  import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
5
5
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
6
- import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
6
+ import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
7
7
 
8
8
  interface DetailsProps extends PConnProps {
9
9
  // If any, enter additional props that only exist on this component
@@ -28,7 +28,7 @@ export default function Details(props: DetailsProps) {
28
28
  const children = (getPConnect().getChildren() as any[]).map((configObject, index) =>
29
29
  createElement(createPConnectComponent(), {
30
30
  ...configObject,
31
- // eslint-disable-next-line react/no-array-index-key
31
+
32
32
  key: index.toString()
33
33
  })
34
34
  );
@@ -53,21 +53,21 @@ export default function Details(props: DetailsProps) {
53
53
  return (
54
54
  <FieldGroup name={propsToUse.showLabel ? propsToUse.label : ''}>
55
55
  {showHighlightedData && highlightedDataArr.length > 0 && (
56
- <Grid container spacing={1} style={{ padding: '0 0 1em' }}>
56
+ <Grid2 container spacing={1} style={{ padding: '0 0 1em' }}>
57
57
  {highlightedDataArr.map((child, i) => (
58
- <Grid item xs={12} key={`hf-${i + 1}`}>
58
+ <Grid2 size={{ xs: 12 }} key={`hf-${i + 1}`}>
59
59
  {child}
60
- </Grid>
60
+ </Grid2>
61
61
  ))}
62
- </Grid>
62
+ </Grid2>
63
63
  )}
64
- <Grid container spacing={1}>
64
+ <Grid2 container spacing={1}>
65
65
  {children.map((child, i) => (
66
- <Grid item xs={12} key={`r-${i + 1}`}>
66
+ <Grid2 size={{ xs: 12 }} key={`r-${i + 1}`}>
67
67
  {child}
68
- </Grid>
68
+ </Grid2>
69
69
  ))}
70
- </Grid>
70
+ </Grid2>
71
71
  </FieldGroup>
72
72
  );
73
73
  }
@@ -1,9 +1,9 @@
1
- import { Children, PropsWithChildren, useEffect, useState } from 'react';
1
+ import { Children, type PropsWithChildren, useEffect, useState } from 'react';
2
2
  import { Tab, Tabs } from '@mui/material';
3
3
  import { TabContext, TabPanel } from '@mui/lab';
4
4
 
5
5
  import { getTransientTabs, getVisibleTabs, tabClick } from '@pega/react-sdk-components/lib/components/template/SubTabs/tabUtils';
6
- import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
6
+ import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
7
7
 
8
8
  interface DetailsSubTabsProps extends PConnProps {
9
9
  // If any, enter additional props that only exist on this component
@@ -1,9 +1,9 @@
1
1
  import { createElement } from 'react';
2
- import Grid from '@mui/material/Grid';
2
+ import Grid2 from '@mui/material/Grid2';
3
3
 
4
4
  import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
5
5
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
6
- import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
6
+ import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
7
7
 
8
8
  interface DetailsThreeColumnProps extends PConnProps {
9
9
  // If any, enter additional props that only exist on this component
@@ -28,7 +28,7 @@ export default function DetailsThreeColumn(props: DetailsThreeColumnProps) {
28
28
  const children = (getPConnect().getChildren() as any[]).map((configObject, index) =>
29
29
  createElement(createPConnectComponent(), {
30
30
  ...configObject,
31
- // eslint-disable-next-line react/no-array-index-key
31
+
32
32
  key: index.toString()
33
33
  })
34
34
  );
@@ -53,21 +53,21 @@ export default function DetailsThreeColumn(props: DetailsThreeColumnProps) {
53
53
  return (
54
54
  <FieldGroup name={propsToUse.showLabel ? propsToUse.label : ''}>
55
55
  {showHighlightedData && highlightedDataArr.length > 0 && (
56
- <Grid container spacing={1} style={{ padding: '0 0 1em' }}>
56
+ <Grid2 container spacing={1} style={{ padding: '0 0 1em' }}>
57
57
  {highlightedDataArr.map((child, i) => (
58
- <Grid item xs={4} key={`hf-${i + 1}`}>
58
+ <Grid2 size={{ xs: 4 }} key={`hf-${i + 1}`}>
59
59
  {child}
60
- </Grid>
60
+ </Grid2>
61
61
  ))}
62
- </Grid>
62
+ </Grid2>
63
63
  )}
64
- <Grid container spacing={1}>
64
+ <Grid2 container spacing={1}>
65
65
  {children.map((child, i) => (
66
- <Grid item xs={4} key={`r-${i + 1}`}>
66
+ <Grid2 size={{ xs: 4 }} key={`r-${i + 1}`}>
67
67
  {child}
68
- </Grid>
68
+ </Grid2>
69
69
  ))}
70
- </Grid>
70
+ </Grid2>
71
71
  </FieldGroup>
72
72
  );
73
73
  }
@@ -1,9 +1,9 @@
1
1
  import { createElement } from 'react';
2
- import Grid from '@mui/material/Grid';
2
+ import Grid2 from '@mui/material/Grid2';
3
3
 
4
4
  import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
5
5
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
6
- import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
6
+ import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
7
7
 
8
8
  interface DetailsTwoColumnProps extends PConnProps {
9
9
  // If any, enter additional props that only exist on this component
@@ -28,7 +28,7 @@ export default function DetailsTwoColumn(props: DetailsTwoColumnProps) {
28
28
  const children = (getPConnect().getChildren() as any[]).map((configObject, index) =>
29
29
  createElement(createPConnectComponent(), {
30
30
  ...configObject,
31
- // eslint-disable-next-line react/no-array-index-key
31
+
32
32
  key: index.toString()
33
33
  })
34
34
  );
@@ -53,21 +53,21 @@ export default function DetailsTwoColumn(props: DetailsTwoColumnProps) {
53
53
  return (
54
54
  <FieldGroup name={propsToUse.showLabel ? propsToUse.label : ''}>
55
55
  {showHighlightedData && highlightedDataArr.length > 0 && (
56
- <Grid container spacing={1} style={{ padding: '0 0 1em' }}>
56
+ <Grid2 container spacing={1} style={{ padding: '0 0 1em' }}>
57
57
  {highlightedDataArr.map((child, i) => (
58
- <Grid item xs={6} key={`hf-${i + 1}`}>
58
+ <Grid2 size={{ xs: 6 }} key={`hf-${i + 1}`}>
59
59
  {child}
60
- </Grid>
60
+ </Grid2>
61
61
  ))}
62
- </Grid>
62
+ </Grid2>
63
63
  )}
64
- <Grid container spacing={1}>
64
+ <Grid2 container spacing={1}>
65
65
  {children.map((child, i) => (
66
- <Grid item xs={6} key={`r-${i + 1}`}>
66
+ <Grid2 size={{ xs: 6 }} key={`r-${i + 1}`}>
67
67
  {child}
68
- </Grid>
68
+ </Grid2>
69
69
  ))}
70
- </Grid>
70
+ </Grid2>
71
71
  </FieldGroup>
72
72
  );
73
73
  }
@@ -4,7 +4,7 @@ import { TabContext, TabPanel } from '@mui/lab';
4
4
  import makeStyles from '@mui/styles/makeStyles';
5
5
 
6
6
  import { buildView } from '@pega/react-sdk-components/lib/components/helpers/field-group-utils';
7
- import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
7
+ import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
8
8
 
9
9
  const useStyles = makeStyles(() => ({
10
10
  tab: {
@@ -26,7 +26,6 @@ function DynamicTabs(props: DynamicTabsProps) {
26
26
  // Get the inherited props from the parent to determine label settings
27
27
  const propsToUse = { label, showLabel, ...pConnect.getInheritedProps() };
28
28
  const defaultTabIndex = 0;
29
- // @ts-ignore - Property 'getComponentConfig' is private and only accessible within class 'C11nEnv'.
30
29
  const { tablabel } = pConnect.getComponentConfig();
31
30
  const tablabelProp = PCore.getAnnotationUtils().getPropertyName(tablabel);
32
31
  const referenceListData: any = pConnect.getValue(`${referenceList}.pxResults`, ''); // 2nd arg empty string until typedefs properly allow optional
@@ -1,9 +1,8 @@
1
- /* eslint-disable react-hooks/rules-of-hooks */
2
1
  import { useLayoutEffect, useMemo } from 'react';
3
2
 
4
3
  import { getReferenceList, buildView } from '@pega/react-sdk-components/lib/components/helpers/field-group-utils';
5
4
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
6
- import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
5
+ import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
7
6
 
8
7
  interface FieldGroupTemplateProps extends PConnProps {
9
8
  // If any, enter additional props that only exist on this component
@@ -42,7 +41,7 @@ export default function FieldGroupTemplate(props: FieldGroupTemplateProps) {
42
41
 
43
42
  useLayoutEffect(() => {
44
43
  if (!isReadonlyMode) {
45
- // @ts-ignore - Expected 3 arguments, but got 1
44
+ // @ts-expect-error - Expected 3 arguments, but got 1
46
45
  pConn.getListActions().initDefaultPageInstructions(resolvedList);
47
46
  }
48
47
  }, [referenceList?.length]);
@@ -58,7 +57,6 @@ export default function FieldGroupTemplate(props: FieldGroupTemplateProps) {
58
57
  if (PCore.getPCoreVersion()?.includes('8.7')) {
59
58
  pConn.getListActions().insert({ classID: contextClass }, referenceList.length, pageReference);
60
59
  } else {
61
- // @ts-ignore - An argument for 'pageRef' was not provided.
62
60
  pConn.getListActions().insert({}, referenceList.length);
63
61
  }
64
62
  };
@@ -71,7 +69,6 @@ export default function FieldGroupTemplate(props: FieldGroupTemplateProps) {
71
69
  if (PCore.getPCoreVersion()?.includes('8.7')) {
72
70
  pConn.getListActions().deleteEntry(index, pageReference);
73
71
  } else {
74
- // @ts-ignore - An argument for 'pageRef' was not provided.
75
72
  pConn.getListActions().deleteEntry(index);
76
73
  }
77
74
  };
@@ -1,7 +1,7 @@
1
- import { PropsWithChildren, ReactElement } from 'react';
2
- import { Grid, Typography } from '@mui/material';
1
+ import type { PropsWithChildren, ReactElement } from 'react';
2
+ import { Grid2, Typography } from '@mui/material';
3
3
  import makeStyles from '@mui/styles/makeStyles';
4
- import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
4
+ import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
5
5
 
6
6
  interface InlineDashboardProps extends PConnProps {
7
7
  // If any, enter additional props that only exist on this component
@@ -50,24 +50,22 @@ export default function InlineDashboard(props: PropsWithChildren<InlineDashboard
50
50
  </Typography>
51
51
 
52
52
  {filterPosition === 'block-start' && (
53
- <Grid container spacing={2} direction='column-reverse' className={classes.containerStyles}>
54
- <Grid item xs={12} className={classes.colStyles}>
53
+ <Grid2 container spacing={2} direction='column-reverse' className={classes.containerStyles}>
54
+ <Grid2 size={{ xs: 12 }} className={classes.colStyles}>
55
55
  {childrenToRender[0]}
56
- </Grid>
57
- <Grid id='filters' item xs={12} className={classes.filterContainerStyles}>
56
+ </Grid2>
57
+ <Grid2 id='filters' size={{ xs: 12 }} className={classes.filterContainerStyles}>
58
58
  {childrenToRender[1]}
59
- </Grid>
60
- </Grid>
59
+ </Grid2>
60
+ </Grid2>
61
61
  )}
62
62
  {filterPosition !== 'block-start' && (
63
- <Grid container spacing={2} direction={direction} className={classes.containerStyles}>
64
- <Grid item xs={9}>
65
- {childrenToRender[0]}
66
- </Grid>
67
- <Grid id='filters' item xs={3} className={classes.inlineStyles}>
63
+ <Grid2 container spacing={2} direction={direction} className={classes.containerStyles}>
64
+ <Grid2 size={{ xs: 9 }}>{childrenToRender[0]}</Grid2>
65
+ <Grid2 id='filters' size={{ xs: 3 }} className={classes.inlineStyles}>
68
66
  {childrenToRender[1]}
69
- </Grid>
70
- </Grid>
67
+ </Grid2>
68
+ </Grid2>
71
69
  )}
72
70
  </>
73
71
  );
@@ -1,8 +1,8 @@
1
- import { useMemo, Children, useEffect, useState, PropsWithChildren } from 'react';
1
+ import { useMemo, Children, useEffect, useState, type PropsWithChildren } from 'react';
2
2
 
3
3
  import { buildFilterComponents } from '@pega/react-sdk-components/lib/components/infra/DashboardFilter/filterUtils';
4
4
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
5
- import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
5
+ import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
6
6
 
7
7
  interface InlineDashboardPageProps extends PConnProps {
8
8
  // If any, enter additional props that only exist on this component
@@ -1,5 +1,5 @@
1
1
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
2
- import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
2
+ import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
3
3
 
4
4
  interface ListPageProps extends PConnProps {
5
5
  // If any, enter additional props that only exist on this component