@pega/react-sdk-overrides 0.24.4 → 0.25.2

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 (139) hide show
  1. package/lib/designSystemExtension/AlertBanner/AlertBanner.tsx +1 -1
  2. package/lib/designSystemExtension/Banner/Banner.tsx +1 -1
  3. package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -2
  4. package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +59 -32
  5. package/lib/designSystemExtension/DetailsFields/DetailsFields.tsx +4 -4
  6. package/lib/designSystemExtension/FieldGroup/FieldGroup.tsx +5 -5
  7. package/lib/designSystemExtension/FieldGroupList/FieldGroupList.tsx +4 -4
  8. package/lib/designSystemExtension/FieldValueList/FieldValueList.tsx +6 -6
  9. package/lib/designSystemExtension/Operator/Operator.tsx +16 -12
  10. package/lib/designSystemExtension/Pulse/Pulse.tsx +3 -3
  11. package/lib/designSystemExtension/RichTextEditor/RichTextEditor.tsx +3 -2
  12. package/lib/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx +1 -1
  13. package/lib/field/AutoComplete/AutoComplete.tsx +5 -5
  14. package/lib/field/CancelAlert/CancelAlert.tsx +5 -8
  15. package/lib/field/Checkbox/Checkbox.tsx +5 -5
  16. package/lib/field/Currency/Currency.tsx +12 -9
  17. package/lib/field/Date/Date.tsx +29 -48
  18. package/lib/field/DateTime/DateTime.tsx +37 -39
  19. package/lib/field/Decimal/Decimal.tsx +12 -9
  20. package/lib/field/Dropdown/Dropdown.tsx +34 -27
  21. package/lib/field/Email/Email.tsx +39 -20
  22. package/lib/field/Group/Group.tsx +4 -4
  23. package/lib/field/Integer/Integer.tsx +27 -15
  24. package/lib/field/Multiselect/Multiselect.tsx +8 -14
  25. package/lib/field/Multiselect/utils.ts +1 -1
  26. package/lib/field/Percentage/Percentage.tsx +11 -11
  27. package/lib/field/Phone/Phone.tsx +13 -10
  28. package/lib/field/Phone/config-ext.json +8 -0
  29. package/lib/field/RadioButtons/RadioButtons.tsx +4 -7
  30. package/lib/field/RichText/RichText.tsx +2 -2
  31. package/lib/field/RichText/config-ext.json +10 -0
  32. package/lib/field/ScalarList/ScalarList.tsx +4 -5
  33. package/lib/field/SemanticLink/SemanticLink.tsx +5 -5
  34. package/lib/field/TextArea/TextArea.tsx +30 -14
  35. package/lib/field/TextContent/TextContent.tsx +2 -2
  36. package/lib/field/TextInput/TextInput.tsx +7 -9
  37. package/lib/field/Time/Time.tsx +30 -27
  38. package/lib/field/URL/URL.tsx +29 -12
  39. package/lib/field/UserReference/UserReference.tsx +4 -6
  40. package/lib/helpers/common-utils.ts +24 -1
  41. package/lib/helpers/field-group-utils.ts +3 -3
  42. package/lib/helpers/formatters/Currency.ts +11 -16
  43. package/lib/helpers/formatters/common.ts +2 -1
  44. package/lib/helpers/formatters/index.ts +2 -4
  45. package/lib/helpers/simpleTableHelpers.ts +1 -1
  46. package/lib/infra/ActionButtons/ActionButtons.tsx +3 -3
  47. package/lib/infra/Assignment/Assignment.tsx +14 -14
  48. package/lib/infra/AssignmentCard/AssignmentCard.tsx +2 -2
  49. package/lib/infra/Containers/FlowContainer/FlowContainer.tsx +17 -29
  50. package/lib/infra/Containers/FlowContainer/helpers.ts +1 -5
  51. package/lib/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx +10 -5
  52. package/lib/infra/Containers/ModalViewContainer/ModalViewContainer.tsx +9 -9
  53. package/lib/infra/Containers/SimpleView/helper.ts +1 -1
  54. package/lib/infra/Containers/ViewContainer/ViewContainer.tsx +2 -2
  55. package/lib/infra/DashboardFilter/DashboardFilter.tsx +6 -8
  56. package/lib/infra/DashboardFilter/filterUtils.tsx +3 -4
  57. package/lib/infra/DeferLoad/DeferLoad.tsx +9 -9
  58. package/lib/infra/ErrorBoundary/ErrorBoundary.tsx +1 -1
  59. package/lib/infra/MultiStep/MultiStep.tsx +17 -16
  60. package/lib/infra/NavBar/NavBar.css +1 -0
  61. package/lib/infra/NavBar/NavBar.tsx +49 -38
  62. package/lib/infra/Reference/Reference.tsx +1 -1
  63. package/lib/infra/Region/Region.tsx +1 -1
  64. package/lib/infra/RootContainer/RootContainer.tsx +7 -8
  65. package/lib/infra/Stages/Stages.tsx +5 -5
  66. package/lib/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.tsx +4 -3
  67. package/lib/infra/VerticalTabs/VerticalTabs/VerticalTabs.tsx +2 -2
  68. package/lib/infra/View/View.tsx +38 -4
  69. package/lib/template/AdvancedSearch/AdvancedSearch.tsx +87 -0
  70. package/lib/template/AdvancedSearch/SearchGroup/persistUtils.ts +58 -0
  71. package/lib/template/AdvancedSearch/SearchGroups/SearchGroups.tsx +245 -0
  72. package/lib/template/AdvancedSearch/SearchGroups/hooks.ts +37 -0
  73. package/lib/template/AdvancedSearch/SearchGroups/index.tsx +1 -0
  74. package/lib/template/AdvancedSearch/SearchGroups/utils.ts +29 -0
  75. package/lib/template/AdvancedSearch/TemplateContext.ts +11 -0
  76. package/lib/template/AdvancedSearch/config-ext.json +9 -0
  77. package/lib/template/AdvancedSearch/index.tsx +1 -0
  78. package/lib/template/AppShell/AppShell.tsx +62 -12
  79. package/lib/template/BannerPage/BannerPage.tsx +2 -2
  80. package/lib/template/BannerPage/config-ext.json +9 -0
  81. package/lib/template/CaseSummary/CaseSummary.tsx +2 -2
  82. package/lib/template/CaseView/CaseView.tsx +12 -11
  83. package/lib/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +8 -8
  84. package/lib/template/Confirmation/Confirmation.tsx +5 -4
  85. package/lib/template/DataReference/DataReference.tsx +318 -108
  86. package/lib/template/DataReference/DataReferenceAdvancedSearchContext.js +10 -0
  87. package/lib/template/DataReference/SearchForm.tsx +148 -0
  88. package/lib/template/DataReference/utils.js +90 -0
  89. package/lib/template/DefaultForm/DefaultForm.tsx +2 -2
  90. package/lib/template/DefaultForm/utils/index.ts +1 -3
  91. package/lib/template/Details/Details/Details.tsx +3 -3
  92. package/lib/template/Details/DetailsSubTabs/DetailsSubTabs.tsx +5 -5
  93. package/lib/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx +3 -3
  94. package/lib/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx +3 -3
  95. package/lib/template/Details/DynamicTabs/DynamicTabs.tsx +5 -5
  96. package/lib/template/FieldGroupTemplate/FieldGroupTemplate.tsx +11 -6
  97. package/lib/template/InlineDashboard/InlineDashboard.tsx +4 -4
  98. package/lib/template/InlineDashboardPage/InlineDashboardPage.tsx +2 -2
  99. package/lib/template/InlineDashboardPage/config-ext.json +9 -0
  100. package/lib/template/ListPage/ListPage.tsx +1 -1
  101. package/lib/template/ListView/ListView.tsx +201 -95
  102. package/lib/template/ListView/utils.ts +38 -6
  103. package/lib/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +1 -1
  104. package/lib/template/NarrowWide/NarrowWide/NarrowWide.tsx +2 -2
  105. package/lib/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.tsx +3 -3
  106. package/lib/template/NarrowWide/NarrowWideForm/NarrowWideForm.tsx +2 -2
  107. package/lib/template/NarrowWide/NarrowWidePage/NarrowWidePage.tsx +2 -2
  108. package/lib/template/OneColumn/OneColumn/OneColumn.tsx +4 -4
  109. package/lib/template/OneColumn/OneColumnPage/OneColumnPage.tsx +1 -1
  110. package/lib/template/OneColumn/OneColumnTab/OneColumnTab.tsx +2 -2
  111. package/lib/template/PromotedFilters/PromotedFilters.tsx +2 -3
  112. package/lib/template/SimpleTable/SimpleTable/SimpleTable.tsx +1 -3
  113. package/lib/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +112 -88
  114. package/lib/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.tsx +3 -5
  115. package/lib/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +1 -1
  116. package/lib/template/SubTabs/SubTabs.tsx +4 -4
  117. package/lib/template/SubTabs/tabUtils.ts +118 -1
  118. package/lib/template/TwoColumn/TwoColumn/TwoColumn.tsx +10 -10
  119. package/lib/template/TwoColumn/TwoColumnPage/TwoColumnPage.tsx +1 -1
  120. package/lib/template/TwoColumn/TwoColumnTab/TwoColumnTab.tsx +10 -10
  121. package/lib/template/WideNarrow/WideNarrow/WideNarrow.tsx +2 -2
  122. package/lib/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.tsx +3 -3
  123. package/lib/template/WideNarrow/WideNarrowForm/WideNarrowForm.tsx +2 -2
  124. package/lib/template/WideNarrow/WideNarrowPage/WideNarrowPage.tsx +2 -2
  125. package/lib/template/WssNavBar/WssNavBar.tsx +10 -10
  126. package/lib/widget/AppAnnouncement/AppAnnouncement.tsx +3 -3
  127. package/lib/widget/Attachment/Attachment.css +1 -0
  128. package/lib/widget/Attachment/Attachment.tsx +8 -10
  129. package/lib/widget/CaseHistory/CaseHistory.tsx +13 -11
  130. package/lib/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +2 -2
  131. package/lib/widget/FileUtility/FileUtility/FileUtility.tsx +6 -5
  132. package/lib/widget/Followers/Followers.tsx +4 -4
  133. package/lib/widget/QuickCreate/QuickCreate.tsx +1 -2
  134. package/lib/widget/QuickCreate/config-ext.json +9 -0
  135. package/lib/widget/SummaryItem/SummaryItem.tsx +5 -4
  136. package/lib/widget/SummaryList/SummaryList.tsx +1 -1
  137. package/lib/widget/ToDo/ToDo.tsx +102 -40
  138. package/package.json +1 -1
  139. /package/lib/infra/Containers/{helpers.ts → container-helpers.ts} +0 -0
@@ -1,7 +1,7 @@
1
- import React, { PropsWithChildren } from 'react';
1
+ import React, { type PropsWithChildren } 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
 
6
6
  import './MultiStep.css';
7
7
 
@@ -11,7 +11,7 @@ interface MultiStepProps extends PConnProps {
11
11
  actionButtons: any[];
12
12
  onButtonPress: any;
13
13
  bIsVertical: boolean;
14
- arNavigationSteps: any[];
14
+ arNavigationSteps: any;
15
15
  }
16
16
 
17
17
  export default function MultiStep(props: PropsWithChildren<MultiStepProps>) {
@@ -21,6 +21,12 @@ export default function MultiStep(props: PropsWithChildren<MultiStepProps>) {
21
21
  const { getPConnect, children, itemKey = '', actionButtons, onButtonPress } = props;
22
22
  const { bIsVertical, arNavigationSteps } = props;
23
23
 
24
+ let currentStep = arNavigationSteps.find(({ visited_status: vs }) => vs === 'current');
25
+ if (!currentStep) {
26
+ const lastActiveStepIndex = arNavigationSteps.findLastIndex(({ visited_status: vs }) => vs === 'success');
27
+ currentStep = arNavigationSteps[lastActiveStepIndex >= 0 ? lastActiveStepIndex : 0];
28
+ }
29
+
24
30
  // const svgCurrent = Utils.getImageSrc("circle-solid", Utils.getSDKStaticConentUrl());
25
31
  // const svgNotCurrent = Utils.getImageSrc("circle-solid", Utils.getSDKStaticConentUrl());
26
32
 
@@ -48,16 +54,16 @@ export default function MultiStep(props: PropsWithChildren<MultiStepProps>) {
48
54
  return 'psdk-vertical-step-body';
49
55
  }
50
56
 
51
- function _getHIconClass(status): string {
52
- if (status === 'current') {
57
+ function _getHIconClass(step): string {
58
+ if (step.ID === currentStep?.ID) {
53
59
  return 'psdk-horizontal-step-icon-selected';
54
60
  }
55
61
 
56
62
  return 'psdk-horizontal-step-icon';
57
63
  }
58
64
 
59
- function _getHLabelClass(status): string {
60
- if (status === 'current') {
65
+ function _getHLabelClass(step): string {
66
+ if (step.ID === currentStep?.ID) {
61
67
  return 'psdk-horizontal-step-label-selected';
62
68
  }
63
69
 
@@ -65,12 +71,7 @@ export default function MultiStep(props: PropsWithChildren<MultiStepProps>) {
65
71
  }
66
72
 
67
73
  function _showHLine(index: number): boolean {
68
- // eslint-disable-next-line sonarjs/prefer-single-boolean-return
69
- if (index < arNavigationSteps.length - 1) {
70
- return true;
71
- }
72
-
73
- return false;
74
+ return index < arNavigationSteps.length - 1;
74
75
  }
75
76
 
76
77
  function buttonPress(sAction: string, sButtonType: string) {
@@ -138,12 +139,12 @@ export default function MultiStep(props: PropsWithChildren<MultiStepProps>) {
138
139
  return (
139
140
  <React.Fragment key={mainStep.actionID}>
140
141
  <div className='psdk-horizontal-step-header'>
141
- <div className={_getHIconClass(mainStep.visited_status)}>
142
+ <div className={_getHIconClass(mainStep)}>
142
143
  <div className='psdk-horizontal-step-icon-content'>
143
144
  <span>{index + 1}</span>
144
145
  </div>
145
146
  </div>
146
- <div className={_getHLabelClass(mainStep.visited_status)}>
147
+ <div className={_getHLabelClass(mainStep)}>
147
148
  <div className='psdk-horizontal-step-text-label' id='selected-label'>
148
149
  {mainStep.name}
149
150
  </div>
@@ -176,7 +177,7 @@ export default function MultiStep(props: PropsWithChildren<MultiStepProps>) {
176
177
  ))}
177
178
  </ul>
178
179
  )}
179
- {!mainStep?.steps && mainStep.visited_status === 'current' && (
180
+ {!mainStep?.steps && mainStep.ID === currentStep?.ID && (
180
181
  <AssignmentCard getPConnect={getPConnect} itemKey={itemKey} actionButtons={actionButtons} onButtonPress={buttonPress}>
181
182
  {children}
182
183
  </AssignmentCard>
@@ -165,4 +165,5 @@
165
165
 
166
166
  .scrollable {
167
167
  overflow-y: scroll !important;
168
+ min-height: 200px !important;
168
169
  }
@@ -1,38 +1,42 @@
1
1
  import { useEffect, useState } from 'react';
2
- import { makeStyles, useTheme } from '@material-ui/core/styles';
2
+ import { useTheme } from '@mui/material/styles';
3
+ import makeStyles from '@mui/styles/makeStyles';
3
4
  import clsx from 'clsx';
4
5
 
5
6
  import {
6
7
  Drawer,
7
8
  List,
8
9
  ListItem,
10
+ ListItemButton,
9
11
  ListItemIcon,
10
12
  ListItemText,
11
- ListItemSecondaryAction,
12
13
  Collapse,
13
14
  Divider,
14
15
  IconButton,
15
16
  Menu,
16
17
  MenuItem,
17
18
  Typography
18
- } from '@material-ui/core';
19
- import PersonOutlineIcon from '@material-ui/icons/PersonOutlineOutlined';
20
- import ChevronLeftIcon from '@material-ui/icons/ChevronLeft';
21
- import ChevronRightIcon from '@material-ui/icons/ChevronRight';
22
- import FlagOutlinedIcon from '@material-ui/icons/FlagOutlined';
23
- import HomeOutlinedIcon from '@material-ui/icons/HomeOutlined';
24
- import ExpandLess from '@material-ui/icons/ExpandLess';
25
- import ExpandMore from '@material-ui/icons/ExpandMore';
26
- import AddIcon from '@material-ui/icons/Add';
27
- import WorkOutlineIcon from '@material-ui/icons/WorkOutline';
28
- import ClearOutlinedIcon from '@material-ui/icons/ClearOutlined';
29
- import ArrowBackIcon from '@material-ui/icons/ArrowBack';
30
- import useMediaQuery from '@material-ui/core/useMediaQuery';
19
+ } from '@mui/material';
20
+ import PersonOutlineIcon from '@mui/icons-material/PersonOutlineOutlined';
21
+ import ChevronLeftIcon from '@mui/icons-material/ChevronLeft';
22
+ import ChevronRightIcon from '@mui/icons-material/ChevronRight';
23
+ import FlagOutlinedIcon from '@mui/icons-material/FlagOutlined';
24
+ import HomeOutlinedIcon from '@mui/icons-material/HomeOutlined';
25
+ import TabletAndroidOutlineIcon from '@mui/icons-material/TabletAndroidOutlined';
26
+ import AirportShuttleOutlinedIcon from '@mui/icons-material/AirportShuttleOutlined';
27
+ import EditOutlinedIcon from '@mui/icons-material/EditOutlined';
28
+ import ExpandLess from '@mui/icons-material/ExpandLess';
29
+ import ExpandMore from '@mui/icons-material/ExpandMore';
30
+ import AddIcon from '@mui/icons-material/Add';
31
+ import WorkOutlineIcon from '@mui/icons-material/WorkOutline';
32
+ import ClearOutlinedIcon from '@mui/icons-material/ClearOutlined';
33
+ import ArrowBackIcon from '@mui/icons-material/ArrowBack';
34
+ import useMediaQuery from '@mui/material/useMediaQuery';
31
35
  import { logout } from '@pega/auth/lib/sdk-auth-manager';
32
36
 
33
37
  import { useNavBar } from '@pega/react-sdk-components/lib/components/helpers/reactContextHelpers';
34
38
  import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
35
- import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
39
+ import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
36
40
 
37
41
  import './NavBar.css';
38
42
 
@@ -48,7 +52,11 @@ interface NavBarProps extends PConnProps {
48
52
  const iconMap = {
49
53
  'pi pi-headline': <HomeOutlinedIcon fontSize='large' />,
50
54
  'pi pi-flag-solid': <FlagOutlinedIcon fontSize='large' />,
51
- 'pi pi-home-solid': <HomeOutlinedIcon fontSize='large' />
55
+ 'pi pi-home-solid': <HomeOutlinedIcon fontSize='large' />,
56
+ 'pi pi-tablet': <TabletAndroidOutlineIcon fontSize='large' />,
57
+ 'pi pi-ambulance': <AirportShuttleOutlinedIcon fontSize='large' />,
58
+ 'pi pi-ink-solid': <EditOutlinedIcon fontSize='large' />,
59
+ 'pi pi-columns': <HomeOutlinedIcon fontSize='large' />
52
60
  };
53
61
 
54
62
  const drawerWidth = 300;
@@ -191,7 +199,14 @@ export default function NavBar(props: NavBarProps) {
191
199
  >
192
200
  {open ? (
193
201
  <List className={classes.appListItem}>
194
- <ListItem onClick={handleDrawerOpen}>
202
+ <ListItem
203
+ onClick={handleDrawerOpen}
204
+ secondaryAction={
205
+ <IconButton edge='end' onClick={handleDrawerOpen} size='large'>
206
+ <ChevronLeftIcon className={classes.appListIcon} />
207
+ </IconButton>
208
+ }
209
+ >
195
210
  <ListItemIcon>
196
211
  <img src={portalLogoImage} className={classes.appListLogo} />
197
212
  </ListItemIcon>
@@ -202,11 +217,6 @@ export default function NavBar(props: NavBarProps) {
202
217
  </Typography>
203
218
  }
204
219
  />
205
- <ListItemSecondaryAction>
206
- <IconButton edge='end' onClick={handleDrawerOpen}>
207
- <ChevronLeftIcon className={classes.appListIcon} />
208
- </IconButton>
209
- </ListItemSecondaryAction>
210
220
  </ListItem>
211
221
  </List>
212
222
  ) : (
@@ -215,17 +225,16 @@ export default function NavBar(props: NavBarProps) {
215
225
  </div>
216
226
  )}
217
227
  <List>
218
- <ListItem button onClick={handleCaseItemClick}>
228
+ <ListItemButton onClick={handleCaseItemClick}>
219
229
  <ListItemIcon>{bShowCaseTypes && open ? <ClearOutlinedIcon fontSize='large' /> : <AddIcon fontSize='large' />}</ListItemIcon>
220
230
  <ListItemText primary='Create' />
221
231
  {bShowCaseTypes ? <ExpandLess /> : <ExpandMore />}
222
- </ListItem>
232
+ </ListItemButton>
223
233
  </List>
224
234
  <Collapse in={bShowCaseTypes && open} timeout='auto' unmountOnExit className='scrollable'>
225
235
  <List component='div' disablePadding>
226
236
  {caseTypes.map(caseType => (
227
- <ListItem
228
- button
237
+ <ListItemButton
229
238
  className={classes.nested}
230
239
  onClick={() => navPanelCreateCaseType(caseType.pyClassName, caseType.pyFlowType)}
231
240
  key={caseType.pyLabel}
@@ -234,33 +243,35 @@ export default function NavBar(props: NavBarProps) {
234
243
  <WorkOutlineIcon fontSize='large' />
235
244
  </ListItemIcon>
236
245
  <ListItemText primary={localeUtils.getLocaleValue(caseType.pyLabel, '', localeReference)} />
237
- </ListItem>
246
+ </ListItemButton>
238
247
  ))}
239
248
  </List>
240
249
  </Collapse>
241
250
  <List>
242
251
  {navPages.map(page => (
243
- <ListItem button onClick={() => navPanelButtonClick(page)} key={page.pyLabel}>
252
+ <ListItemButton onClick={() => navPanelButtonClick(page)} key={page.pyLabel}>
244
253
  <ListItemIcon>{iconMap[page.pxPageViewIcon]}</ListItemIcon>
245
254
  <ListItemText primary={localeUtils.getLocaleValue(page.pyLabel, '', localeReference)} />
246
- </ListItem>
255
+ </ListItemButton>
247
256
  ))}
248
257
  </List>
249
258
  <Divider />
250
259
  <List className='marginTopAuto'>
251
260
  <>
252
- <ListItem onClick={navPanelOperatorButtonClick}>
261
+ <ListItem
262
+ onClick={navPanelOperatorButtonClick}
263
+ secondaryAction={
264
+ open ? (
265
+ <IconButton edge='end' onClick={navPanelOperatorButtonClick} size='large'>
266
+ <ChevronRightIcon />
267
+ </IconButton>
268
+ ) : null
269
+ }
270
+ >
253
271
  <ListItemIcon id='person-icon'>
254
272
  <PersonOutlineIcon fontSize='large' />
255
273
  </ListItemIcon>
256
274
  <ListItemText primary={portalOperator} />
257
- {open && (
258
- <ListItemSecondaryAction>
259
- <IconButton edge='end' onClick={navPanelOperatorButtonClick}>
260
- <ChevronRightIcon />
261
- </IconButton>
262
- </ListItemSecondaryAction>
263
- )}
264
275
  </ListItem>
265
276
  <Menu
266
277
  anchorEl={anchorEl}
@@ -1,4 +1,4 @@
1
- import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
1
+ import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
2
2
 
3
3
  interface ReferenceProps extends PConnProps {
4
4
  // If any, enter additional props that only exist on this component
@@ -1,4 +1,4 @@
1
- import { PropsWithChildren } from 'react';
1
+ import type { PropsWithChildren } from 'react';
2
2
 
3
3
  // Region does NOT have getPConnect. So, no need to extend from PConnProps
4
4
  interface RegionProps {
@@ -1,12 +1,11 @@
1
- import { Children, createElement, PropsWithChildren, useContext, useEffect, useMemo, useRef, useState } from 'react';
2
- import isEqual from 'lodash.isequal';
3
- import { Box, CircularProgress } from '@material-ui/core';
1
+ import { Children, createElement, type PropsWithChildren, useContext, useEffect, useMemo, useRef, useState } from 'react';
2
+ import { Box, CircularProgress } from '@mui/material';
4
3
 
5
4
  import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
6
5
  import StoreContext from '@pega/react-sdk-components/lib/bridge/Context/StoreContext';
7
6
  import { LazyMap as LazyComponentMap } from '@pega/react-sdk-components/lib/components_map';
8
7
  import { isEmptyObject } from '@pega/react-sdk-components/lib/components/helpers/common-utils';
9
- import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
8
+ import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
10
9
 
11
10
  interface RootContainerProps extends PConnProps {
12
11
  // If any, enter additional props that only exist on this component
@@ -54,6 +53,7 @@ export default function RootContainer(props: PropsWithChildren<RootContainerProp
54
53
  const pConn = getPConnect();
55
54
 
56
55
  const options = { context: 'app' };
56
+ const rootView = useRef(null);
57
57
 
58
58
  const [componentName, setComponentName] = useState('');
59
59
 
@@ -146,7 +146,6 @@ export default function RootContainer(props: PropsWithChildren<RootContainerProp
146
146
  return noPortalContent;
147
147
  }
148
148
 
149
- let rootView: any;
150
149
  let rootViewConfig: any = null;
151
150
 
152
151
  useEffect(() => {
@@ -180,8 +179,8 @@ export default function RootContainer(props: PropsWithChildren<RootContainerProp
180
179
  }
181
180
  };
182
181
 
183
- if (!isEqual(currentRootConfig, prevRootConfig)) {
184
- rootView = createElement(createPConnectComponent(), PCore.createPConnect(currentRootConfig));
182
+ if (prevRootConfig === null || !PCore.isDeepEqual(currentRootConfig, prevRootConfig)) {
183
+ rootView.current = createElement(createPConnectComponent(), PCore.createPConnect(currentRootConfig)) as any;
185
184
  }
186
185
 
187
186
  // debugging/investigation help
@@ -189,7 +188,7 @@ export default function RootContainer(props: PropsWithChildren<RootContainerProp
189
188
 
190
189
  return (
191
190
  <div id='ModalManager'>
192
- {rootView}
191
+ {rootView.current}
193
192
  {MemoizedModalViewContainer}
194
193
  <div id='MemoizedPreviewViewContainer' />
195
194
  <div id='ReAuthMessageModal' />
@@ -1,9 +1,9 @@
1
- import { Breadcrumbs, Card, Typography } from '@material-ui/core';
2
- import DoubleArrowIcon from '@material-ui/icons/DoubleArrow';
3
- import DoneIcon from '@material-ui/icons/Done';
4
- import { makeStyles } from '@material-ui/core/styles';
1
+ import { Breadcrumbs, Card, Typography } from '@mui/material';
2
+ import DoubleArrowIcon from '@mui/icons-material/DoubleArrow';
3
+ import DoneIcon from '@mui/icons-material/Done';
4
+ import makeStyles from '@mui/styles/makeStyles';
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
 
8
8
  interface StagesProps extends PConnProps {
9
9
  // If any, enter additional props that only exist on this component
@@ -1,5 +1,5 @@
1
- import { withStyles } from '@material-ui/core/styles';
2
- import { Tab, Divider } from '@material-ui/core';
1
+ import withStyles from '@mui/styles/withStyles';
2
+ import { Tab, Divider } from '@mui/material';
3
3
 
4
4
  // LeftAlignVerticalTabs does NOT have getPConnect. So, no need to extend from PConnProps
5
5
 
@@ -18,7 +18,8 @@ interface LeftAlignVerticalTabsProps {
18
18
  const LeftAlignVerticalTabs: any = withStyles((/* theme */) => ({
19
19
  root: {
20
20
  width: '100%',
21
- maxWidth: '100%'
21
+ maxWidth: '100%',
22
+ alignItems: 'flex-start'
22
23
  },
23
24
  wrapper: {
24
25
  display: 'block',
@@ -1,6 +1,6 @@
1
1
  import React, { useState, useEffect } from 'react';
2
- import { makeStyles } from '@material-ui/core/styles';
3
- import Tabs from '@material-ui/core/Tabs';
2
+ import makeStyles from '@mui/styles/makeStyles';
3
+ import Tabs from '@mui/material/Tabs';
4
4
 
5
5
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
6
6
 
@@ -1,8 +1,8 @@
1
- import { PropsWithChildren } from 'react';
1
+ import { type PropsWithChildren, useEffect } from 'react';
2
2
 
3
3
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
4
4
  import { getAllFields } from '@pega/react-sdk-components/lib/components/helpers/template-utils';
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
  // Need to import any templates that we might render
8
8
 
@@ -18,6 +18,7 @@ interface ViewProps extends PConnProps {
18
18
  visibility?: boolean;
19
19
  name?: string;
20
20
  bInForm?: boolean;
21
+ type?: any;
21
22
  }
22
23
 
23
24
  //
@@ -36,12 +37,14 @@ const NO_HEADER_TEMPLATES = [
36
37
  'NarrowWideDetails',
37
38
  'WideNarrowDetails',
38
39
  'Confirmation',
39
- 'DynamicTabs'
40
+ 'DynamicTabs',
41
+ 'DetailsSubTabs'
40
42
  ];
41
43
 
42
44
  export default function View(props: PropsWithChildren<ViewProps>) {
43
- const { children, template, getPConnect, mode, visibility, name: pageName } = props;
45
+ const { children, template, getPConnect, mode, visibility, name: pageName, type, title } = props;
44
46
  let { label = '', showLabel = false } = props;
47
+ const { PAGE_TYPES: { PAGE, LANDINGPAGE, LISTPAGE } = {}, MODAL } = PCore.getConstants();
45
48
 
46
49
  // Get the inherited props from the parent to determine label settings. For 8.6, this is only for embedded data form views
47
50
  // Putting this logic here instead of copy/paste in every Form template index.js
@@ -49,12 +52,43 @@ export default function View(props: PropsWithChildren<ViewProps>) {
49
52
  const inheritedProps: any = getPConnect().getInheritedProps(); // try to remove any when getInheritedProps typedefs are fixed
50
53
  label = inheritedProps.label || label;
51
54
  showLabel = inheritedProps.showLabel || showLabel;
55
+ const localeUtils = PCore.getLocaleUtils();
52
56
 
53
57
  const isEmbeddedDataView = mode === 'editable'; // would be better to check the reference child for `context` attribute if possible
54
58
  if (isEmbeddedDataView && showLabel === undefined) {
55
59
  showLabel = true;
56
60
  }
57
61
 
62
+ useEffect(() => {
63
+ // Get the localized application label
64
+ let applicationLabel = PCore.getEnvironmentInfo().getApplicationLabel();
65
+ applicationLabel = localeUtils.getLocaleValue(`${applicationLabel}`, '', '');
66
+ const caseInfo = getPConnect().getCaseInfo();
67
+ const isAssignmentInCreateStage = caseInfo && caseInfo.isAssignmentInCreateStage();
68
+ const isRenderingInModal = getPConnect().getContainerName().includes(MODAL);
69
+ const isRenderingInPreviewPanel = getPConnect().getContainerName().includes('preview');
70
+
71
+ /* If assignment is in create stage and rendering in modal don't update the title.
72
+ Title will be updated on completion of create stage and when the assignment is rendered inline to the page.
73
+ */
74
+ const canUpdateTitle =
75
+ !isRenderingInPreviewPanel &&
76
+ (type === PAGE || type === LANDINGPAGE || type === LISTPAGE) &&
77
+ !(isRenderingInModal && isAssignmentInCreateStage) &&
78
+ PCore.getEnvironmentInfo().getRenderingMode() === 'FULL_PORTAL';
79
+ // Incase of home route title is same as applicationLabel so setting to empty to just show applicationLabel
80
+ let titleVar = title === applicationLabel ? '' : title;
81
+
82
+ if (canUpdateTitle) {
83
+ if (caseInfo) {
84
+ const name = caseInfo.getName();
85
+ const id = caseInfo.getBusinessID();
86
+ titleVar = name && id ? `${name} (${id})` : titleVar;
87
+ }
88
+ document.title = titleVar ? `${titleVar} - ${applicationLabel}` : applicationLabel;
89
+ }
90
+ }, [type, title, getPConnect, PAGE, LANDINGPAGE, LISTPAGE]);
91
+
58
92
  const key = `${getPConnect().getContextName()}_${getPConnect().getPageReference()}_${pageName}`;
59
93
  // As long as the template is defined in the dependencies of the view
60
94
  // it will be loaded, otherwise fall back to single column
@@ -0,0 +1,87 @@
1
+ import { useContext, useState } from 'react';
2
+
3
+ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
4
+ import DataReferenceAdvancedSearchContext from '@pega/react-sdk-components/lib/components/template/DataReference/DataReferenceAdvancedSearchContext';
5
+ import { getFirstChildConfig } from '@pega/react-sdk-components/lib/components/template/DataReference/utils';
6
+
7
+ export default function AdvancedSearch(props) {
8
+ const { getPConnect, targetObjectClass, localeReference } = props;
9
+ const SearchGroups = getComponentFromMap('SearchGroups');
10
+ const { dataReferenceConfigToChild, isCreateNewReferenceEnabled, disableStartingFieldsForReference, pyID, searchSelectCacheKey } = useContext(
11
+ DataReferenceAdvancedSearchContext
12
+ ) as any;
13
+
14
+ const { selectionMode, value: singleSelectFieldValue, readonlyContextList: multiSelectField } = dataReferenceConfigToChild;
15
+
16
+ let isSelectionExist = false;
17
+ const { MULTI } = PCore.getConstants().LIST_SELECTION_MODE;
18
+
19
+ if (selectionMode === MULTI) {
20
+ isSelectionExist = getPConnect().getValue(multiSelectField)?.length || false;
21
+ } else {
22
+ isSelectionExist = getPConnect().getValue(singleSelectFieldValue) || false;
23
+ }
24
+
25
+ const [showRecords, setShowRecords] = useState(isSelectionExist);
26
+
27
+ const pConn = getPConnect();
28
+ const rawViewMetadata = pConn.getRawMetadata();
29
+
30
+ const searchFieldsSet = new Set();
31
+ const searchFields: any = [];
32
+ rawViewMetadata.config.searchGroups.forEach(group => {
33
+ group.children.forEach(child => {
34
+ if (!searchFieldsSet.has(child.config.value) && !child.config.validator) {
35
+ searchFields.push(child);
36
+ searchFieldsSet.add(child.config.value);
37
+ }
38
+ });
39
+ });
40
+
41
+ const firstChildPConnect = getPConnect().getChildren()[0].getPConnect;
42
+ const [firstChildMeta] = rawViewMetadata.children;
43
+
44
+ const localizedVal = PCore.getLocaleUtils().getLocaleValue;
45
+ // @ts-ignore
46
+ const cache = PCore.getNavigationUtils().getComponentCache(searchSelectCacheKey) ?? {};
47
+
48
+ const editableFieldComp = firstChildPConnect().createComponent({
49
+ type: firstChildMeta.type,
50
+ config: {
51
+ ...getFirstChildConfig({
52
+ firstChildMeta,
53
+ getPConnect,
54
+ rawViewMetadata,
55
+ contextClass: targetObjectClass,
56
+ dataReferenceConfigToChild,
57
+ isCreateNewReferenceEnabled,
58
+ disableStartingFieldsForReference,
59
+ pyID
60
+ }),
61
+ searchFields,
62
+ showRecords,
63
+ label: localizedVal('Search results', 'DataReference'),
64
+ searchSelectCacheKey,
65
+ cache
66
+ }
67
+ });
68
+
69
+ const { selectionList, dataRelationshipContext } = editableFieldComp.props.getPConnect().getConfigProps();
70
+ const editableField = selectionMode === MULTI ? selectionList.substring(1) : dataRelationshipContext;
71
+
72
+ const searchGroupsProps = {
73
+ getPConnect,
74
+ editableField,
75
+ localeReference,
76
+ setShowRecords,
77
+ searchSelectCacheKey,
78
+ cache
79
+ };
80
+
81
+ return (
82
+ <>
83
+ <SearchGroups {...searchGroupsProps} />
84
+ {editableFieldComp}
85
+ </>
86
+ );
87
+ }
@@ -0,0 +1,58 @@
1
+ const SKIP_CACHE_KEY = '';
2
+
3
+ export function getMappedKey(key) {
4
+ const mappedKey = PCore.getEnvironmentInfo().getKeyMapping(key);
5
+ if (!mappedKey) {
6
+ return key;
7
+ }
8
+ return mappedKey;
9
+ }
10
+
11
+ const getComponentStateKey = (getPConnect, propertyName: string) => {
12
+ const pConnect = getPConnect();
13
+ const caseID = `.${getMappedKey('pyID')}`; // Enhance this later when use-case arrives for data objects using S&S.
14
+ const resolvedCaseID = pConnect.getValue(caseID);
15
+
16
+ if (!resolvedCaseID) {
17
+ return SKIP_CACHE_KEY;
18
+ }
19
+
20
+ return `Search-${resolvedCaseID}-${pConnect.getPageReference()}-${propertyName}-${pConnect.getCurrentView()}`;
21
+ };
22
+
23
+ const getComponentStateOptions = getPConnect => {
24
+ return { clearOnCancelForContext: getPConnect().getContextName() };
25
+ };
26
+
27
+ interface SearchCategory {
28
+ // tabId of search category selected
29
+ selectedCategory: string;
30
+ }
31
+
32
+ interface SearchGroup {
33
+ // searchFields can be any object based on what fields are authored.
34
+ searchFields: unknown;
35
+ activeGroupId: string;
36
+ }
37
+
38
+ const setComponentCache = ({
39
+ cacheKey,
40
+ state,
41
+ options
42
+ }: {
43
+ cacheKey: string;
44
+ state: SearchCategory | SearchGroup;
45
+ options: ReturnType<typeof getComponentStateOptions>;
46
+ }) => {
47
+ if (cacheKey !== SKIP_CACHE_KEY) {
48
+ (PCore.getNavigationUtils() as any).setComponentCache(cacheKey, state, options);
49
+ }
50
+ };
51
+
52
+ const componentCachePersistUtils = {
53
+ getComponentStateKey,
54
+ getComponentStateOptions,
55
+ setComponentCache
56
+ };
57
+
58
+ export default componentCachePersistUtils;