@pega/react-sdk-overrides 0.25.1 → 0.25.3

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 (144) hide show
  1. package/lib/designSystemExtension/Banner/Banner.css +1 -1
  2. package/lib/designSystemExtension/Banner/Banner.tsx +7 -7
  3. package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
  4. package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +52 -36
  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 +7 -8
  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 +28 -3
  12. package/lib/designSystemExtension/WssQuickCreate/WssQuickCreate.css +4 -4
  13. package/lib/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx +1 -1
  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 +6 -6
  17. package/lib/field/Checkbox/Checkbox.tsx +97 -4
  18. package/lib/field/Currency/Currency.tsx +3 -3
  19. package/lib/field/Currency/currency-utils.ts +1 -2
  20. package/lib/field/Date/Date.tsx +3 -7
  21. package/lib/field/DateTime/DateTime.tsx +3 -8
  22. package/lib/field/Decimal/Decimal.tsx +3 -5
  23. package/lib/field/Dropdown/Dropdown.tsx +5 -7
  24. package/lib/field/Email/Email.tsx +11 -13
  25. package/lib/field/Group/Group.tsx +7 -7
  26. package/lib/field/Integer/Integer.tsx +5 -7
  27. package/lib/field/Location/Location.tsx +256 -0
  28. package/lib/field/Location/config-ext.json +8 -0
  29. package/lib/field/Location/index.tsx +1 -0
  30. package/lib/field/ObjectReference/ObjectReference.tsx +235 -0
  31. package/lib/field/ObjectReference/index.tsx +1 -0
  32. package/lib/field/ObjectReference/utils.ts +111 -0
  33. package/lib/field/Percentage/Percentage.tsx +3 -7
  34. package/lib/field/Phone/Phone.tsx +7 -5
  35. package/lib/field/RadioButtons/RadioButtons.tsx +47 -2
  36. package/lib/field/RichText/RichText.tsx +1 -1
  37. package/lib/field/ScalarList/ScalarList.tsx +2 -3
  38. package/lib/field/SelectableCard/SelectableCard.tsx +175 -0
  39. package/lib/field/SelectableCard/index.tsx +1 -0
  40. package/lib/field/SelectableCard/utils.tsx +226 -0
  41. package/lib/field/SemanticLink/SemanticLink.tsx +160 -28
  42. package/lib/field/SemanticLink/utils.ts +1 -1
  43. package/lib/field/TextArea/TextArea.tsx +5 -7
  44. package/lib/field/TextContent/TextContent.tsx +1 -2
  45. package/lib/field/TextInput/TextInput.tsx +5 -7
  46. package/lib/field/Time/Time.tsx +3 -7
  47. package/lib/field/URL/URL.tsx +5 -7
  48. package/lib/field/UserReference/UserReference.tsx +1 -2
  49. package/lib/helpers/attachmentHelpers.ts +56 -35
  50. package/lib/helpers/common-utils.ts +2 -2
  51. package/lib/helpers/data_page.ts +0 -1
  52. package/lib/helpers/field-group-utils.ts +1 -1
  53. package/lib/helpers/formatters/CurrencyMap.ts +0 -2
  54. package/lib/helpers/simpleTableHelpers.ts +118 -6
  55. package/lib/helpers/utils.ts +8 -1
  56. package/lib/helpers/versionHelpers.ts +0 -1
  57. package/lib/infra/ActionButtons/ActionButtons.tsx +28 -21
  58. package/lib/infra/Assignment/Assignment.tsx +4 -4
  59. package/lib/infra/AssignmentCard/AssignmentCard.tsx +2 -2
  60. package/lib/infra/Containers/FlowContainer/FlowContainer.tsx +15 -94
  61. package/lib/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx +1 -2
  62. package/lib/infra/Containers/ModalViewContainer/ModalViewContainer.tsx +3 -3
  63. package/lib/infra/Containers/ViewContainer/ViewContainer.tsx +4 -5
  64. package/lib/infra/Containers/container-helpers.ts +47 -1
  65. package/lib/infra/DashboardFilter/DashboardFilter.tsx +2 -4
  66. package/lib/infra/DashboardFilter/filterUtils.tsx +3 -4
  67. package/lib/infra/DeferLoad/DeferLoad.tsx +2 -4
  68. package/lib/infra/ErrorBoundary/ErrorBoundary.tsx +1 -3
  69. package/lib/infra/MultiStep/MultiStep.css +8 -8
  70. package/lib/infra/MultiStep/MultiStep.tsx +2 -2
  71. package/lib/infra/NavBar/NavBar.css +1 -1
  72. package/lib/infra/NavBar/NavBar.tsx +29 -27
  73. package/lib/infra/Reference/Reference.tsx +3 -4
  74. package/lib/infra/Region/Region.tsx +1 -1
  75. package/lib/infra/RootContainer/RootContainer.tsx +2 -3
  76. package/lib/infra/Stages/Stages.tsx +1 -1
  77. package/lib/infra/View/View.tsx +2 -2
  78. package/lib/template/AdvancedSearch/AdvancedSearch.tsx +0 -1
  79. package/lib/template/AdvancedSearch/SearchGroup/persistUtils.ts +3 -9
  80. package/lib/template/AdvancedSearch/SearchGroups/SearchGroups.tsx +3 -4
  81. package/lib/template/AdvancedSearch/SearchGroups/hooks.ts +1 -1
  82. package/lib/template/AppShell/AppShell.css +1 -1
  83. package/lib/template/AppShell/AppShell.tsx +6 -10
  84. package/lib/template/BannerPage/BannerPage.tsx +2 -2
  85. package/lib/template/CaseSummary/CaseSummary.tsx +2 -3
  86. package/lib/template/CaseView/CaseView.tsx +15 -21
  87. package/lib/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +1 -1
  88. package/lib/template/Confirmation/Confirmation.tsx +2 -3
  89. package/lib/template/DataReference/DataReference.tsx +9 -12
  90. package/lib/template/DataReference/SearchForm.tsx +6 -5
  91. package/lib/template/DataReference/{utils.js → utils.ts} +3 -3
  92. package/lib/template/DefaultForm/DefaultForm.tsx +3 -3
  93. package/lib/template/Details/Details/Details.tsx +11 -11
  94. package/lib/template/Details/DetailsSubTabs/DetailsSubTabs.tsx +2 -2
  95. package/lib/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx +11 -11
  96. package/lib/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx +11 -11
  97. package/lib/template/Details/DynamicTabs/DynamicTabs.tsx +1 -1
  98. package/lib/template/FieldGroupTemplate/FieldGroupTemplate.tsx +2 -3
  99. package/lib/template/InlineDashboard/InlineDashboard.tsx +14 -16
  100. package/lib/template/InlineDashboardPage/InlineDashboardPage.tsx +2 -2
  101. package/lib/template/ListPage/ListPage.tsx +1 -1
  102. package/lib/template/ListView/ListView.tsx +10 -22
  103. package/lib/template/ListView/hooks.ts +1 -5
  104. package/lib/template/ListView/utils.ts +1 -1
  105. package/lib/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +1 -1
  106. package/lib/template/NarrowWide/NarrowWide/NarrowWide.tsx +5 -5
  107. package/lib/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.tsx +11 -11
  108. package/lib/template/NarrowWide/NarrowWideForm/NarrowWideForm.tsx +2 -2
  109. package/lib/template/NarrowWide/NarrowWidePage/NarrowWidePage.tsx +2 -2
  110. package/lib/template/OneColumn/OneColumn/OneColumn.tsx +7 -7
  111. package/lib/template/OneColumn/OneColumnPage/OneColumnPage.tsx +1 -1
  112. package/lib/template/OneColumn/OneColumnTab/OneColumnTab.tsx +2 -2
  113. package/lib/template/PromotedFilters/PromotedFilters.tsx +1 -2
  114. package/lib/template/SimpleTable/SimpleTable/SimpleTable.tsx +2 -3
  115. package/lib/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +35 -32
  116. package/lib/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.tsx +1 -1
  117. package/lib/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +1 -1
  118. package/lib/template/SubTabs/SubTabs.tsx +2 -2
  119. package/lib/template/TwoColumn/TwoColumn/TwoColumn.tsx +9 -10
  120. package/lib/template/TwoColumn/TwoColumnPage/TwoColumnPage.tsx +1 -1
  121. package/lib/template/TwoColumn/TwoColumnTab/TwoColumnTab.tsx +9 -10
  122. package/lib/template/WideNarrow/WideNarrow/WideNarrow.tsx +5 -5
  123. package/lib/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.tsx +11 -11
  124. package/lib/template/WideNarrow/WideNarrowForm/WideNarrowForm.tsx +2 -2
  125. package/lib/template/WideNarrow/WideNarrowPage/WideNarrowPage.tsx +2 -2
  126. package/lib/template/WssNavBar/WssNavBar.css +1 -1
  127. package/lib/template/WssNavBar/WssNavBar.tsx +5 -5
  128. package/lib/widget/AppAnnouncement/AppAnnouncement.tsx +1 -1
  129. package/lib/widget/Attachment/Attachment.css +6 -8
  130. package/lib/widget/Attachment/Attachment.tsx +62 -58
  131. package/lib/widget/CaseHistory/CaseHistory.tsx +5 -5
  132. package/lib/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.css +0 -14
  133. package/lib/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +3 -3
  134. package/lib/widget/FileUtility/FileUtility/FileUtility.css +7 -6
  135. package/lib/widget/FileUtility/FileUtility/FileUtility.tsx +5 -7
  136. package/lib/widget/Followers/Followers.tsx +2 -4
  137. package/lib/widget/QuickCreate/QuickCreate.tsx +1 -2
  138. package/lib/widget/SummaryItem/SummaryItem.css +9 -11
  139. package/lib/widget/SummaryItem/SummaryItem.tsx +2 -2
  140. package/lib/widget/SummaryList/SummaryList.tsx +1 -1
  141. package/lib/widget/ToDo/ToDo.css +1 -13
  142. package/lib/widget/ToDo/ToDo.tsx +26 -26
  143. package/package.json +1 -1
  144. /package/lib/template/DataReference/{DataReferenceAdvancedSearchContext.js → DataReferenceAdvancedSearchContext.ts} +0 -0
@@ -1,16 +1,14 @@
1
- /* eslint-disable react/jsx-boolean-value */
2
-
3
- import { PropsWithChildren, ReactElement, useContext, useEffect, useState } from 'react';
1
+ import { type PropsWithChildren, type ReactElement, useContext, useEffect, useState } from 'react';
4
2
  import { Avatar, Card, CardHeader, Divider, Typography } from '@mui/material';
5
3
  import makeStyles from '@mui/styles/makeStyles';
6
4
  import Box from '@mui/material/Box';
7
5
  import Button from '@mui/material/Button';
8
- import Grid from '@mui/material/Grid';
6
+ import Grid2 from '@mui/material/Grid2';
9
7
 
10
8
  import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
11
9
  import StoreContext from '@pega/react-sdk-components/lib/bridge/Context/StoreContext';
12
10
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
13
- import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
11
+ import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
14
12
 
15
13
  interface CaseViewProps extends PConnProps {
16
14
  // If any, enter additional props that only exist on this component
@@ -45,7 +43,7 @@ const useStyles = makeStyles(theme => ({
45
43
  padding: theme.spacing(1)
46
44
  },
47
45
  caseViewIconImage: {
48
- filter: 'invert(100%)'
46
+ filter: 'var(--svg-color)'
49
47
  }
50
48
  }));
51
49
 
@@ -114,7 +112,7 @@ export default function CaseView(props: PropsWithChildren<CaseViewProps>) {
114
112
  const theTabsRegionChildren = theTabsRegion.props.getPConnect().getChildren();
115
113
 
116
114
  // vertTabInfo is sent to VerticalTabs component
117
- const vertTabInfo: Object[] = [];
115
+ const vertTabInfo: object[] = [];
118
116
 
119
117
  // deferLoadInfo is sent to DeferLoad component (currently selected entry)
120
118
  const deferLoadInfo: any[] = [];
@@ -208,8 +206,8 @@ export default function CaseView(props: PropsWithChildren<CaseViewProps>) {
208
206
  if (!displayOnlyFA) {
209
207
  // show full portal
210
208
  return (
211
- <Grid container>
212
- <Grid item xs={3}>
209
+ <Grid2 container>
210
+ <Grid2 size={{ xs: 3 }}>
213
211
  <div hidden={true} id='current-caseID'>
214
212
  {currentCaseID}
215
213
  </div>
@@ -238,29 +236,25 @@ export default function CaseView(props: PropsWithChildren<CaseViewProps>) {
238
236
  <Divider />
239
237
  {vertTabInfo.length > 1 && <VerticalTabs tabconfig={vertTabInfo} />}
240
238
  </Card>
241
- </Grid>
239
+ </Grid2>
242
240
 
243
- <Grid item xs={6}>
241
+ <Grid2 size={{ xs: 6 }}>
244
242
  {theStagesRegion}
245
243
  {theTodoRegion}
246
244
  {deferLoadInfo.length > 0 && (
247
245
  <DeferLoad getPConnect={getPConnect} name={deferLoadInfo[activeVertTab].config.name} isTab lastUpdateCaseTime={lastUpdateCaseTime} />
248
246
  )}
249
- </Grid>
247
+ </Grid2>
250
248
 
251
- <Grid item xs={3}>
252
- {theUtilitiesRegion}
253
- </Grid>
254
- </Grid>
249
+ <Grid2 size={{ xs: 3 }}>{theUtilitiesRegion}</Grid2>
250
+ </Grid2>
255
251
  );
256
252
  }
257
253
  // displayOnlyFA - only show the "todo" region
258
254
  return (
259
- <Grid container>
260
- <Grid item xs={12}>
261
- {theTodoRegion}
262
- </Grid>
263
- </Grid>
255
+ <Grid2 container>
256
+ <Grid2 size={{ xs: 12 }}>{theTodoRegion}</Grid2>
257
+ </Grid2>
264
258
  );
265
259
  }
266
260
 
@@ -3,7 +3,7 @@ import Button from '@mui/material/Button';
3
3
  import Menu from '@mui/material/Menu';
4
4
  import MenuItem from '@mui/material/MenuItem';
5
5
 
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
  import Snackbar from '@mui/material/Snackbar';
8
8
  import IconButton from '@mui/material/IconButton';
9
9
  import CloseIcon from '@mui/icons-material/Close';
@@ -1,11 +1,10 @@
1
- /* eslint-disable no-nested-ternary */
2
- import { PropsWithChildren, useState } from 'react';
1
+ import { type PropsWithChildren, useState } from 'react';
3
2
  import { Button, Card } from '@mui/material';
4
3
  import makeStyles from '@mui/styles/makeStyles';
5
4
 
6
5
  import { getToDoAssignments } from '@pega/react-sdk-components/lib/components/infra/Containers/FlowContainer/helpers';
7
6
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
8
- import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
7
+ import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
9
8
 
10
9
  interface ConfirmationProps extends PConnProps {
11
10
  // If any, enter additional props that only exist on this component
@@ -1,11 +1,11 @@
1
- import React, { PropsWithChildren, ReactElement, useEffect, useMemo, useState } from 'react';
1
+ import React, { type PropsWithChildren, type ReactElement, useEffect, useMemo, useState } from 'react';
2
2
 
3
3
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
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
  import useIsMount from '@pega/react-sdk-components/lib/hooks/useIsMount';
6
6
  import componentCachePersistUtils from '@pega/react-sdk-components/lib/components/template/AdvancedSearch/SearchGroup/persistUtils';
7
- import { getMappedKey } from '@pega/react-sdk-components/lib/components/template/AdvancedSearch/SearchGroup/persistUtils';
8
7
  import DataReferenceAdvancedSearchContext from './DataReferenceAdvancedSearchContext';
8
+ import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
9
9
  import { getFirstChildConfig } from './utils';
10
10
 
11
11
  // ReferenceProps can't be used until getComponentConfig() is NOT private
@@ -77,7 +77,7 @@ export default function DataReference(props: PropsWithChildren<DataReferenceProp
77
77
  const isDDSourceDeferred =
78
78
  (firstChildMeta?.type === 'Dropdown' && selectionMode === SELECTION_MODE.SINGLE && refFieldMetadata?.descriptors) ||
79
79
  firstChildMeta.config.deferDatasource;
80
- const pyID = getMappedKey('pyID');
80
+ const pyID = Utils.getMappedKey('pyID');
81
81
  const isInfinity = pyID === 'pyID';
82
82
  const { allowImplicitRefresh } = isInfinity
83
83
  ? PCore.getFieldDefaultUtils().fieldDefaults.DataReference || {}
@@ -139,7 +139,6 @@ export default function DataReference(props: PropsWithChildren<DataReferenceProp
139
139
  }
140
140
  })
141
141
  .catch(err => {
142
- // eslint-disable-next-line no-console
143
142
  console.error(err?.stack);
144
143
  return Promise.resolve({
145
144
  data: { data: [] }
@@ -177,8 +176,9 @@ export default function DataReference(props: PropsWithChildren<DataReferenceProp
177
176
  const caseKey = pConn.getCaseInfo().getKey();
178
177
  const refreshOptions: any = { autoDetectRefresh: true };
179
178
 
180
- if (pConn.getRawMetadata()?.children?.length > 0 && pConn.getRawMetadata()?.children[0].config?.value) {
181
- refreshOptions.propertyName = pConn.getRawMetadata()?.children[0].config.value;
179
+ const children: any = pConn.getRawMetadata()?.children;
180
+ if (children?.length > 0 && children[0].config?.value) {
181
+ refreshOptions.propertyName = children[0].config.value;
182
182
  refreshOptions.classID = (pConn.getRawMetadata() as any).classID;
183
183
  }
184
184
 
@@ -342,13 +342,12 @@ export default function DataReference(props: PropsWithChildren<DataReferenceProp
342
342
  : firstChildMeta?.config?.datasource?.fields?.value;
343
343
  fieldMetaData.datasourceMetadata.datasource.name = rawViewMetadata.config?.referenceList;
344
344
  }
345
- // @ts-ignore
345
+ // @ts-expect-error
346
346
  const { disableStartingFieldsForReference = false } = PCore.getEnvironmentInfo().environmentInfoObject?.features?.form || {};
347
- // @ts-ignore
347
+ // @ts-expect-error
348
348
  let { isCreateNewReferenceEnabled = false } = PCore.getEnvironmentInfo().environmentInfoObject?.features?.form || {};
349
349
 
350
350
  if (isCreateNewReferenceEnabled) {
351
- // @ts-ignore
352
351
  isCreateNewReferenceEnabled = isCreationOfNewRecordAllowedForReference && PCore.getAccessPrivilege().hasCreateAccess(contextClass);
353
352
  }
354
353
 
@@ -358,7 +357,6 @@ export default function DataReference(props: PropsWithChildren<DataReferenceProp
358
357
  if (!disableStartingFieldsForReference) {
359
358
  startingFields.pyAddCaseContextPage = { pyID: pConn.getCaseInfo().getKey()?.split(' ')?.pop() };
360
359
  }
361
- // @ts-ignore
362
360
  return pConn.getActionsApi().createWork(contextClass, {
363
361
  openCaseViewAfterCreate: false,
364
362
  startingFields
@@ -464,7 +462,6 @@ export default function DataReference(props: PropsWithChildren<DataReferenceProp
464
462
  ) : (
465
463
  <div>
466
464
  {childrenToRender.map((child, index) => (
467
- // eslint-disable-next-line react/no-array-index-key
468
465
  <React.Fragment key={index}>{child}</React.Fragment>
469
466
  ))}
470
467
  </div>
@@ -1,5 +1,6 @@
1
1
  import { useState } from 'react';
2
- import { Tab, Tabs, Typography, RadioGroup, FormControlLabel, Radio, Select, MenuItem, Grid, Box } from '@mui/material';
2
+ import { Tab, Tabs, Typography, RadioGroup, FormControlLabel, Radio, MenuItem, Box, TextField } from '@mui/material';
3
+ import Grid2 from '@mui/material/Grid2';
3
4
  import { TabContext, TabPanel } from '@mui/lab';
4
5
  import { Dialog, DialogTitle, DialogContent, DialogActions, Button } from '@mui/material';
5
6
 
@@ -91,15 +92,15 @@ const SearchForm = props => {
91
92
  let searchCategoriesComp;
92
93
  if (tabItems.length > 3) {
93
94
  searchCategoriesComp = (
94
- <Grid container spacing={2}>
95
- <Select value={currentTabId} onChange={handleTabClick} fullWidth>
95
+ <Grid2 container spacing={2}>
96
+ <TextField value={currentTabId} select onChange={handleTabClick} fullWidth>
96
97
  {tabItems.map(tab => (
97
98
  <MenuItem key={tab.id} value={tab.id}>
98
99
  {tab.name}
99
100
  </MenuItem>
100
101
  ))}
101
- </Select>
102
- </Grid>
102
+ </TextField>
103
+ </Grid2>
103
104
  );
104
105
  } else if (tabItems.length > 1) {
105
106
  searchCategoriesComp = (
@@ -23,8 +23,8 @@ export function getFieldMeta(getPConnect, dataRelationshipContext) {
23
23
  const fieldMetadata =
24
24
  (isMultiSelectMode ? pConn.getFieldMetadata(`${referenceProp}`) : pConn.getCurrentPageFieldMetadata(contextPageReference)) ?? {};
25
25
  const { datasource: { parameters: fieldParameters = {} } = {} } = fieldMetadata;
26
- const compositeKeys = [];
27
- Object.values(fieldParameters).forEach(param => {
26
+ const compositeKeys: any = [];
27
+ Object.values(fieldParameters).forEach((param: any) => {
28
28
  if (isSelfReferencedProperty(param, referenceProp)) compositeKeys.push(param.substring(param.lastIndexOf('.') + 1));
29
29
  });
30
30
 
@@ -38,7 +38,7 @@ export function getFieldMeta(getPConnect, dataRelationshipContext) {
38
38
  const getCompositeKeys = (pConnect, property) => {
39
39
  const fieldMetadata = pConnect.getFieldMetadata(property) || {};
40
40
  const { datasource: { parameters: fieldParameters = {} } = {} } = fieldMetadata;
41
- const compositeKeys = [];
41
+ const compositeKeys: any = [];
42
42
  Object.values(fieldParameters).forEach(param => {
43
43
  if (isSelfReferencedProperty(param, property)) {
44
44
  compositeKeys.push(param);
@@ -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,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: {
@@ -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]);
@@ -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
@@ -1,10 +1,5 @@
1
- /* eslint-disable no-plusplus */
2
-
3
- /* eslint-disable @typescript-eslint/no-use-before-define */
4
- /* eslint-disable @typescript-eslint/no-shadow */
5
-
6
1
  import React, { useState, useEffect, useRef, useCallback } from 'react';
7
- import { Theme } from '@mui/material/styles';
2
+ import type { Theme } from '@mui/material/styles';
8
3
  import createStyles from '@mui/styles/createStyles';
9
4
  import makeStyles from '@mui/styles/makeStyles';
10
5
  import Table from '@mui/material/Table';
@@ -21,7 +16,7 @@ import FilterListIcon from '@mui/icons-material/FilterList';
21
16
  import SubjectIcon from '@mui/icons-material/Subject';
22
17
  import SearchIcon from '@mui/icons-material/Search';
23
18
  import TextField from '@mui/material/TextField';
24
- import Grid from '@mui/material/Grid';
19
+ import Grid2 from '@mui/material/Grid2';
25
20
  import Menu from '@mui/material/Menu';
26
21
  import MenuItem from '@mui/material/MenuItem';
27
22
  import Dialog from '@mui/material/Dialog';
@@ -46,7 +41,7 @@ import { getGenericFieldsLocalizedValue } from '@pega/react-sdk-components/lib/c
46
41
  import { format } from '@pega/react-sdk-components/lib/components/helpers/formatters';
47
42
 
48
43
  import useInit from './hooks';
49
- import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
44
+ import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
50
45
 
51
46
  interface ListViewProps extends PConnProps {
52
47
  // If any, enter additional props that only exist on this component
@@ -102,8 +97,6 @@ export default function ListView(props: ListViewProps) {
102
97
  // List component context
103
98
  const [listContext, setListContext] = useState<any>({});
104
99
  const { meta } = listContext;
105
- const xRayApis = PCore.getDebugger().getXRayRuntime();
106
- const xRayUid = xRayApis.startXRay();
107
100
  const { current: uniqueId } = useRef(crypto.randomUUID());
108
101
 
109
102
  useInit({
@@ -111,7 +104,6 @@ export default function ListView(props: ListViewProps) {
111
104
  setListContext,
112
105
  ref,
113
106
  showDynamicFields,
114
- xRayUid,
115
107
  cosmosTableRef
116
108
  });
117
109
 
@@ -330,7 +322,6 @@ export default function ListView(props: ListViewProps) {
330
322
  if (selectionMode === SELECTION_MODE.SINGLE || selectionMode === SELECTION_MODE.MULTI) {
331
323
  const record = arTableData?.length > 0 ? arTableData[0] : '';
332
324
  if (typeof record === 'object' && !('pyGUID' in record) && !('pyID' in record)) {
333
- // eslint-disable-next-line no-console
334
325
  console.error('pyGUID or pyID values are mandatory to select the required row from the list');
335
326
  }
336
327
  }
@@ -398,7 +389,6 @@ export default function ListView(props: ListViewProps) {
398
389
  const filter = filters.current[filterExp];
399
390
  // If the filter is null then we can skip this iteration
400
391
  if (filter === null) {
401
- // eslint-disable-next-line no-continue
402
392
  continue;
403
393
  }
404
394
 
@@ -407,7 +397,6 @@ export default function ListView(props: ListViewProps) {
407
397
  field = getFieldFromFilter(filter, isDateRange);
408
398
 
409
399
  if (!(columnList.current.length && columnList.current.includes(field))) {
410
- // eslint-disable-next-line no-continue
411
400
  continue;
412
401
  }
413
402
  // If we reach here that implies we've at least one valid filter, hence setting the flag
@@ -726,7 +715,7 @@ export default function ListView(props: ListViewProps) {
726
715
 
727
716
  function showToast(message: string) {
728
717
  const theMessage = `Assignment: ${message}`;
729
- // eslint-disable-next-line no-console
718
+
730
719
  console.error(theMessage);
731
720
  setSnackbarMessage(message);
732
721
  setShowSnackbar(true);
@@ -856,7 +845,6 @@ export default function ListView(props: ListViewProps) {
856
845
  function _showFilteredIcon(columnId) {
857
846
  for (const filterObj of filterByColumns) {
858
847
  if (filterObj.ref === columnId) {
859
- // eslint-disable-next-line sonarjs/prefer-single-boolean-return
860
848
  if (filterObj.containsFilterValue !== '') {
861
849
  return true;
862
850
  }
@@ -1081,11 +1069,11 @@ export default function ListView(props: ListViewProps) {
1081
1069
  {_listTitle()}
1082
1070
  </Typography>
1083
1071
  {globalSearch && (
1084
- <Grid container spacing={1} alignItems='flex-end' className={classes.search}>
1085
- <Grid item>
1072
+ <Grid2 container spacing={1} alignItems='flex-end' className={classes.search}>
1073
+ <Grid2>
1086
1074
  <SearchIcon />
1087
- </Grid>
1088
- <Grid item>
1075
+ </Grid2>
1076
+ <Grid2>
1089
1077
  <TextField
1090
1078
  label={PCore.getLocaleUtils().getLocaleValue('Search', 'Search')}
1091
1079
  fullWidth
@@ -1095,8 +1083,8 @@ export default function ListView(props: ListViewProps) {
1095
1083
  id='search'
1096
1084
  onChange={_onSearch}
1097
1085
  />
1098
- </Grid>
1099
- </Grid>
1086
+ </Grid2>
1087
+ </Grid2>
1100
1088
  )}
1101
1089
  <>
1102
1090
  {!bInForm ? (