@pega/react-sdk-overrides 0.25.2 → 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 (103) 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.tsx +8 -10
  4. package/lib/designSystemExtension/DetailsFields/DetailsFields.tsx +11 -13
  5. package/lib/designSystemExtension/FieldGroup/FieldGroup.tsx +7 -8
  6. package/lib/designSystemExtension/FieldGroupList/FieldGroupList.tsx +9 -9
  7. package/lib/designSystemExtension/FieldValueList/FieldValueList.tsx +7 -8
  8. package/lib/designSystemExtension/Operator/Operator.tsx +11 -12
  9. package/lib/designSystemExtension/RichTextEditor/RichTextEditor.tsx +28 -3
  10. package/lib/designSystemExtension/WssQuickCreate/WssQuickCreate.css +4 -4
  11. package/lib/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx +1 -1
  12. package/lib/field/CancelAlert/CancelAlert.css +4 -4
  13. package/lib/field/CancelAlert/CancelAlert.tsx +5 -5
  14. package/lib/field/Checkbox/Checkbox.tsx +96 -3
  15. package/lib/field/Currency/currency-utils.ts +1 -2
  16. package/lib/field/Dropdown/Dropdown.tsx +0 -2
  17. package/lib/field/Group/Group.tsx +5 -5
  18. package/lib/field/Location/Location.tsx +256 -0
  19. package/lib/field/Location/config-ext.json +8 -0
  20. package/lib/field/Location/index.tsx +1 -0
  21. package/lib/field/ObjectReference/ObjectReference.tsx +235 -0
  22. package/lib/field/ObjectReference/index.tsx +1 -0
  23. package/lib/field/ObjectReference/utils.ts +111 -0
  24. package/lib/field/RadioButtons/RadioButtons.tsx +46 -1
  25. package/lib/field/ScalarList/ScalarList.tsx +1 -2
  26. package/lib/field/SelectableCard/SelectableCard.tsx +175 -0
  27. package/lib/field/SelectableCard/index.tsx +1 -0
  28. package/lib/field/SelectableCard/utils.tsx +226 -0
  29. package/lib/field/SemanticLink/SemanticLink.tsx +159 -27
  30. package/lib/field/SemanticLink/utils.ts +1 -1
  31. package/lib/field/TextContent/TextContent.tsx +0 -1
  32. package/lib/field/UserReference/UserReference.tsx +0 -1
  33. package/lib/helpers/attachmentHelpers.ts +56 -35
  34. package/lib/helpers/common-utils.ts +2 -2
  35. package/lib/helpers/data_page.ts +0 -1
  36. package/lib/helpers/formatters/CurrencyMap.ts +0 -2
  37. package/lib/helpers/simpleTableHelpers.ts +117 -5
  38. package/lib/helpers/utils.ts +8 -1
  39. package/lib/helpers/versionHelpers.ts +0 -1
  40. package/lib/infra/ActionButtons/ActionButtons.tsx +28 -21
  41. package/lib/infra/Assignment/Assignment.tsx +2 -2
  42. package/lib/infra/Containers/FlowContainer/FlowContainer.tsx +14 -93
  43. package/lib/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx +0 -1
  44. package/lib/infra/Containers/ModalViewContainer/ModalViewContainer.tsx +2 -2
  45. package/lib/infra/Containers/ViewContainer/ViewContainer.tsx +3 -4
  46. package/lib/infra/Containers/container-helpers.ts +47 -1
  47. package/lib/infra/DashboardFilter/DashboardFilter.tsx +0 -2
  48. package/lib/infra/DashboardFilter/filterUtils.tsx +3 -4
  49. package/lib/infra/DeferLoad/DeferLoad.tsx +1 -3
  50. package/lib/infra/ErrorBoundary/ErrorBoundary.tsx +0 -2
  51. package/lib/infra/MultiStep/MultiStep.css +8 -8
  52. package/lib/infra/NavBar/NavBar.css +1 -1
  53. package/lib/infra/NavBar/NavBar.tsx +3 -4
  54. package/lib/infra/Reference/Reference.tsx +2 -3
  55. package/lib/infra/RootContainer/RootContainer.tsx +0 -1
  56. package/lib/template/AdvancedSearch/AdvancedSearch.tsx +0 -1
  57. package/lib/template/AdvancedSearch/SearchGroup/persistUtils.ts +3 -9
  58. package/lib/template/AdvancedSearch/SearchGroups/SearchGroups.tsx +3 -4
  59. package/lib/template/AdvancedSearch/SearchGroups/hooks.ts +1 -1
  60. package/lib/template/AppShell/AppShell.css +1 -1
  61. package/lib/template/AppShell/AppShell.tsx +4 -8
  62. package/lib/template/CaseSummary/CaseSummary.tsx +0 -1
  63. package/lib/template/CaseView/CaseView.tsx +13 -19
  64. package/lib/template/Confirmation/Confirmation.tsx +0 -1
  65. package/lib/template/DataReference/DataReference.tsx +7 -10
  66. package/lib/template/DataReference/SearchForm.tsx +6 -5
  67. package/lib/template/DataReference/{utils.js → utils.ts} +3 -3
  68. package/lib/template/DefaultForm/DefaultForm.tsx +1 -1
  69. package/lib/template/Details/Details/Details.tsx +10 -10
  70. package/lib/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx +10 -10
  71. package/lib/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx +10 -10
  72. package/lib/template/FieldGroupTemplate/FieldGroupTemplate.tsx +1 -2
  73. package/lib/template/InlineDashboard/InlineDashboard.tsx +12 -14
  74. package/lib/template/ListView/ListView.tsx +8 -20
  75. package/lib/template/ListView/hooks.ts +1 -5
  76. package/lib/template/ListView/utils.ts +1 -1
  77. package/lib/template/NarrowWide/NarrowWide/NarrowWide.tsx +3 -3
  78. package/lib/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.tsx +10 -10
  79. package/lib/template/OneColumn/OneColumn/OneColumn.tsx +5 -5
  80. package/lib/template/PromotedFilters/PromotedFilters.tsx +0 -1
  81. package/lib/template/SimpleTable/SimpleTable/SimpleTable.tsx +1 -2
  82. package/lib/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +33 -30
  83. package/lib/template/TwoColumn/TwoColumn/TwoColumn.tsx +1 -2
  84. package/lib/template/TwoColumn/TwoColumnTab/TwoColumnTab.tsx +1 -2
  85. package/lib/template/WideNarrow/WideNarrow/WideNarrow.tsx +3 -3
  86. package/lib/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.tsx +10 -10
  87. package/lib/template/WssNavBar/WssNavBar.css +1 -1
  88. package/lib/template/WssNavBar/WssNavBar.tsx +4 -4
  89. package/lib/widget/Attachment/Attachment.css +6 -8
  90. package/lib/widget/Attachment/Attachment.tsx +61 -57
  91. package/lib/widget/CaseHistory/CaseHistory.tsx +3 -3
  92. package/lib/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.css +0 -14
  93. package/lib/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +2 -2
  94. package/lib/widget/FileUtility/FileUtility/FileUtility.css +7 -6
  95. package/lib/widget/FileUtility/FileUtility/FileUtility.tsx +4 -6
  96. package/lib/widget/Followers/Followers.tsx +0 -2
  97. package/lib/widget/QuickCreate/QuickCreate.tsx +0 -1
  98. package/lib/widget/SummaryItem/SummaryItem.css +9 -11
  99. package/lib/widget/SummaryItem/SummaryItem.tsx +1 -1
  100. package/lib/widget/ToDo/ToDo.css +1 -13
  101. package/lib/widget/ToDo/ToDo.tsx +15 -7
  102. package/package.json +1 -1
  103. /package/lib/template/DataReference/{DataReferenceAdvancedSearchContext.js → DataReferenceAdvancedSearchContext.ts} +0 -0
@@ -1,5 +1,3 @@
1
- /* eslint-disable no-nested-ternary */
2
-
3
1
  import { useState, useEffect, useContext } from 'react';
4
2
  import makeStyles from '@mui/styles/makeStyles';
5
3
  import { Alert, Card, CardHeader, Avatar, Typography } from '@mui/material';
@@ -58,7 +56,6 @@ export const FlowContainer = (props: FlowContainerProps) => {
58
56
  const AlertBanner = getComponentFromMap('AlertBanner');
59
57
 
60
58
  const pCoreConstants = PCore.getConstants();
61
- const PCoreVersion = PCore.getPCoreVersion();
62
59
  const { TODO } = pCoreConstants;
63
60
  const todo_headerText = 'To do';
64
61
 
@@ -78,6 +75,7 @@ export const FlowContainer = (props: FlowContainerProps) => {
78
75
  const getPConnect = getPConnectOfActiveContainerItem || getPConnectOfFlowContainer;
79
76
  const thePConn = getPConnect();
80
77
  const containerName = assignmentNames && assignmentNames.length > 0 ? assignmentNames[0] : '';
78
+ const bShowBanner = showBanner(getPConnect);
81
79
  // const [init, setInit] = useState(true);
82
80
  // const [fcState, setFCState] = useState({ hasError: false });
83
81
 
@@ -104,7 +102,6 @@ export const FlowContainer = (props: FlowContainerProps) => {
104
102
  function getBuildName(): string {
105
103
  const ourPConn = getPConnect();
106
104
 
107
- // let { getPConnect, name } = this.pConn$.pConn;
108
105
  const context = ourPConn.getContextName();
109
106
  let viewContainerName = ourPConn.getContainerName();
110
107
 
@@ -113,7 +110,7 @@ export const FlowContainer = (props: FlowContainerProps) => {
113
110
  }
114
111
 
115
112
  function getTodoVisibility() {
116
- const caseViewMode = getPConnect().getValue('context_data.caseViewMode', ''); // 2nd arg empty string until typedefs properly allow optional
113
+ const caseViewMode = getPConnect().getValue('context_data.caseViewMode');
117
114
  if (caseViewMode && caseViewMode === 'review') {
118
115
  return true;
119
116
  }
@@ -123,16 +120,6 @@ export const FlowContainer = (props: FlowContainerProps) => {
123
120
  function initComponent() {
124
121
  const ourPConn = getPConnect();
125
122
 
126
- // debugging/investigation help
127
- // console.log(`${ourPConn.getComponentName()}: children update for main draw`);
128
-
129
- // const oData = ourPConn.getDataObject();
130
-
131
- // const activeActionLabel = "";
132
- // const child0_getPConnect = arNewChildren[0].getPConnect();
133
-
134
- // this.templateName$ = this.configProps$["template"];
135
-
136
123
  // debugger;
137
124
  setShowTodo(getTodoVisibility());
138
125
 
@@ -148,7 +135,7 @@ export const FlowContainer = (props: FlowContainerProps) => {
148
135
  }, []);
149
136
 
150
137
  useEffect(() => {
151
- // @ts-ignore - Property 'getMetadata' is private and only accessible within class 'C11nEnv'
138
+ // @ts-expect-error - Property 'getMetadata' is private and only accessible within class 'C11nEnv'
152
139
  if (isInitialized && pConnectOfFlowContainer.getMetadata().children && !hasItems) {
153
140
  // ensuring not to add container items, if container already has items
154
141
  // because during multi doc mode, we will have container items already in store
@@ -156,63 +143,6 @@ export const FlowContainer = (props: FlowContainerProps) => {
156
143
  }
157
144
  }, [isInitialized, hasItems]);
158
145
 
159
- function isCaseWideLocalAction() {
160
- const ourPConn = getPConnect();
161
-
162
- const actionID = ourPConn.getValue(pCoreConstants.CASE_INFO.ACTIVE_ACTION_ID, ''); // 2nd arg empty string until typedefs properly allow optional
163
- const caseActions = ourPConn.getValue(pCoreConstants.CASE_INFO.AVAILABLEACTIONS, ''); // 2nd arg empty string until typedefs properly allow optional
164
- let bCaseWideAction = false;
165
- if (caseActions && actionID) {
166
- const actionObj = caseActions.find(caseAction => caseAction.ID === actionID);
167
- if (actionObj) {
168
- bCaseWideAction = actionObj.type === 'Case';
169
- }
170
- }
171
- return bCaseWideAction;
172
- }
173
-
174
- function hasChildCaseAssignments() {
175
- const ourPConn = getPConnect();
176
-
177
- const childCases = ourPConn.getValue(pCoreConstants.CASE_INFO.CHILD_ASSIGNMENTS, ''); // 2nd arg empty string until typedefs properly allow optional
178
- // const allAssignments = [];
179
- return !!(childCases && childCases.length > 0);
180
- }
181
-
182
- function hasAssignments() {
183
- const ourPConn = getPConnect();
184
-
185
- let bHasAssignments = false;
186
- const assignmentsList: any[] = ourPConn.getValue(pCoreConstants.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS, ''); // 2nd arg empty string until typedefs properly allow optional
187
- const isEmbedded = window.location.href.includes('embedded');
188
- let bAssignmentsForThisOperator = false;
189
- // 8.7 includes assignments in Assignments List that may be assigned to
190
- // a different operator. So, see if there are any assignments for
191
- // the current operator
192
- if (PCoreVersion?.includes('8.7') || isEmbedded) {
193
- const thisOperator = PCore.getEnvironmentInfo().getOperatorIdentifier();
194
- for (const assignment of assignmentsList) {
195
- if (assignment.assigneeInfo.ID === thisOperator) {
196
- bAssignmentsForThisOperator = true;
197
- }
198
- }
199
- } else {
200
- bAssignmentsForThisOperator = true;
201
- }
202
- // Bail out if there isn't an assignmentsList
203
- if (!assignmentsList) {
204
- return bHasAssignments;
205
- }
206
-
207
- const bHasChildCaseAssignments = hasChildCaseAssignments();
208
-
209
- if (bAssignmentsForThisOperator || bHasChildCaseAssignments || isCaseWideLocalAction()) {
210
- bHasAssignments = true;
211
- }
212
-
213
- return bHasAssignments;
214
- }
215
-
216
146
  // From SDK-WC updateSelf - so do this in useEffect that's run only when the props change...
217
147
  useEffect(() => {
218
148
  setBuildName(getBuildName());
@@ -222,29 +152,21 @@ export const FlowContainer = (props: FlowContainerProps) => {
222
152
 
223
153
  let loadingInfo: any;
224
154
  try {
225
- loadingInfo = thePConn.getLoadingStatus(''); // 1st arg empty string until typedefs properly allow optional
155
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
156
+ loadingInfo = thePConn.getLoadingStatus();
157
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
226
158
  } catch (ex) {
227
- // eslint-disable-next-line no-console
228
159
  console.error(`${thePConn.getComponentName()}: loadingInfo catch block`);
229
160
  }
230
161
 
231
- // let configProps = this.thePConn.resolveConfigProps(this.thePConn.getConfigProps());
232
-
233
- if (!loadingInfo) {
234
- // turn off spinner
235
- // this.psService.sendMessage(false);
236
- }
237
-
238
- const caseViewMode = thePConn.getValue('context_data.caseViewMode', ''); // 2nd arg empty string until typedefs properly allow optional
162
+ const caseViewMode = thePConn.getValue('context_data.caseViewMode');
239
163
  const { CASE_INFO: CASE_CONSTS } = pCoreConstants;
240
164
  if (caseViewMode && caseViewMode === 'review') {
241
165
  setTimeout(() => {
242
166
  // updated for 8.7 - 30-Mar-2022
243
167
  const todoAssignments = getToDoAssignments(thePConn);
244
- if (todoAssignments && todoAssignments.length > 0) {
245
- setCaseInfoID(thePConn.getValue(CASE_CONSTS.CASE_INFO_ID, '')); // 2nd arg empty string until typedefs properly allow optional
246
- setTodoDatasource({ source: todoAssignments });
247
- }
168
+ setCaseInfoID(thePConn.getValue(CASE_CONSTS.CASE_INFO_ID));
169
+ setTodoDatasource({ source: todoAssignments });
248
170
  setShowTodo(true);
249
171
  setShowTodoList(false);
250
172
  }, 100);
@@ -255,11 +177,12 @@ export const FlowContainer = (props: FlowContainerProps) => {
255
177
  }
256
178
 
257
179
  // if have caseMessage show message and end
258
- const theCaseMessages = localizedVal(thePConn.getValue('caseMessages', ''), localeCategory); // 2nd arg empty string until typedefs properly allow optional
180
+ const theCaseMessages = localizedVal(thePConn.getValue('caseMessages'), localeCategory);
181
+
182
+ const rootInfo = PCore.getContainerUtils().getContainerItemData(getPConnect().getTarget(), itemKey);
183
+ const bConfirmView = rootInfo && bShowBanner;
259
184
 
260
- // caseMessages's behavior has changed in 24.2, and hence it doesn't let Optional Action work.
261
- // Changing the below condition for now. Was: (theCaseMessages || !hasAssignments())
262
- if (!hasAssignments()) {
185
+ if (bConfirmView) {
263
186
  // Temp fix for 8.7 change: confirmationNote no longer coming through in caseMessages$.
264
187
  // So, if we get here and caseMessages$ is empty, use default value in DX API response
265
188
  setCaseMessages(theCaseMessages || localizedVal('Thank you! The next step in this case has been routed appropriately.', localeCategory));
@@ -279,8 +202,6 @@ export const FlowContainer = (props: FlowContainerProps) => {
279
202
  const urgency = getPConnect().getCaseSummary().assignments ? getPConnect().getCaseSummary().assignments?.[0].urgency : '';
280
203
  const operatorInitials = Utils.getInitials(PCore.getEnvironmentInfo().getOperatorName() || '');
281
204
 
282
- const bShowBanner = showBanner(getPConnect);
283
-
284
205
  const displayPageMessages = () => {
285
206
  let hasBanner = false;
286
207
  const messages = pageMessages ? pageMessages.map(msg => localizedVal(msg.message, 'Messages')) : pageMessages;
@@ -53,7 +53,6 @@ function ListViewActionButtons(props: ListViewActionButtonsProps) {
53
53
  closeActionsDialog();
54
54
  })
55
55
  .catch(err => {
56
- // eslint-disable-next-line no-console
57
56
  console.log(err);
58
57
  })
59
58
  .finally(() => {
@@ -43,7 +43,7 @@ function getKeyAndLatestItem(routinginfo, pConn, options) {
43
43
  if (PCore.getContainerUtils().hasContainerItems(buildName(pConn, containerName))) {
44
44
  const { accessedOrder, items } = routinginfo;
45
45
  let key;
46
- // eslint-disable-next-line no-plusplus
46
+
47
47
  for (let i = accessedOrder.length - 1; i >= 0; i--) {
48
48
  const tempkey = accessedOrder[i];
49
49
  if ((acTertiary && items[tempkey].acTertiary) || (!acTertiary && !items[tempkey].acTertiary)) {
@@ -216,7 +216,7 @@ export default function ModalViewContainer(props: ModalViewContainerProps) {
216
216
  ERROR_WHILE_RENDERING,
217
217
  error => {
218
218
  // setError(true);
219
- // eslint-disable-next-line no-console
219
+
220
220
  console.error(error);
221
221
  },
222
222
  `${ERROR_WHILE_RENDERING}-mc-${getPConnect().getContextName()}`,
@@ -1,3 +1,4 @@
1
+ /* eslint-disable @typescript-eslint/no-unused-vars */
1
2
  import React, { createElement, useContext, useEffect, useState } from 'react';
2
3
  import { Box, CircularProgress } from '@mui/material';
3
4
 
@@ -5,6 +6,7 @@ import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react
5
6
  import StoreContext from '@pega/react-sdk-components/lib/bridge/Context/StoreContext';
6
7
  import { isEmptyObject } from '@pega/react-sdk-components/lib/components/helpers/common-utils';
7
8
  import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
9
+ import { configureBrowserBookmark } from '@pega/react-sdk-components/lib/components/infra/Containers/container-helpers';
8
10
 
9
11
  interface ViewContainerProps extends PConnProps {
10
12
  // If any, enter additional props that only exist on this component
@@ -131,10 +133,7 @@ export default function ViewContainer(props: ViewContainerProps) {
131
133
 
132
134
  if (!displayOnlyFA) {
133
135
  // configureForBrowserBookmark not applicable in Embedded mode
134
- PCore.configureForBrowserBookmark({
135
- ...objectForAddContainer,
136
- defaultViewLabel
137
- });
136
+ configureBrowserBookmark(pConn);
138
137
  }
139
138
  }, []);
140
139
 
@@ -1,6 +1,52 @@
1
- // eslint-disable-next-line import/prefer-default-export
2
1
  export const isContainerInitialized = pConnect => {
3
2
  const context = pConnect.getContextName();
4
3
  const containerName = pConnect.getContainerName();
5
4
  return PCore.getContainerUtils().isContainerInitialized(context, containerName);
6
5
  };
6
+
7
+ export const configureBrowserBookmark = pConnect => {
8
+ const context = pConnect.getContextName();
9
+ const containerName = pConnect.getContainerName();
10
+ const envInfo = PCore.getEnvironmentInfo();
11
+ const { APP } = PCore.getConstants();
12
+
13
+ const navPages = pConnect.getValue('pyPortal.pyPrimaryNavPages');
14
+ let ruleName = '';
15
+ let className = '';
16
+ let defaultViewLabel = '';
17
+
18
+ const isNextGenLandingPageRouting = (envInfo?.environmentInfoObject as any)?.pyExecutionRuntimeName === (APP as any).INFINITY_RUNTIME;
19
+
20
+ if (Array.isArray(navPages) && navPages.length > 0) {
21
+ const firstNavPage = navPages[0];
22
+ const nestedNavPage = firstNavPage.NavigationPages?.[0];
23
+
24
+ if (isNextGenLandingPageRouting) {
25
+ if (nestedNavPage?.pyRuleName) {
26
+ ruleName = nestedNavPage.pyRuleName;
27
+ className = nestedNavPage.pyClassName || '';
28
+ } else if (firstNavPage?.pyRuleName) {
29
+ ruleName = firstNavPage.pyRuleName;
30
+ className = firstNavPage.pyClassName || '';
31
+ } else if (nestedNavPage?.pyLabel) {
32
+ defaultViewLabel = nestedNavPage.pyLabel;
33
+ } else if (firstNavPage?.pyLabel) {
34
+ defaultViewLabel = firstNavPage.pyLabel;
35
+ }
36
+ } else if (nestedNavPage?.pyLabel) {
37
+ defaultViewLabel = nestedNavPage.pyLabel;
38
+ } else if (firstNavPage?.pyLabel) {
39
+ defaultViewLabel = firstNavPage.pyLabel;
40
+ }
41
+ }
42
+
43
+ PCore.configureForBrowserBookmark({
44
+ context,
45
+ containerName,
46
+ acName: containerName,
47
+ semanticURL: '',
48
+ defaultViewLabel,
49
+ ruleName,
50
+ className
51
+ });
52
+ };
@@ -1,4 +1,3 @@
1
- /* eslint-disable @typescript-eslint/no-shadow */
2
1
  import { forwardRef, type PropsWithChildren, useEffect, useRef, useState } from 'react';
3
2
  import { TextField } from '@mui/material';
4
3
  import { debounce } from 'throttle-debounce';
@@ -109,7 +108,6 @@ export default function DashboardFilter(props: PropsWithChildren<DashboardFilter
109
108
 
110
109
  const label = metadata.config.label.substring(3);
111
110
 
112
- // eslint-disable-next-line react/no-unstable-nested-components
113
111
  const CustomDateInput = forwardRef<HTMLInputElement, TextProps>(({ value, onClick }, ref: any) => (
114
112
  <TextField label={label} variant='outlined' fullWidth value={value} size='small' onClick={onClick} ref={ref}>
115
113
  {value}
@@ -1,7 +1,6 @@
1
- /* eslint-disable prefer-template */
2
1
  /** This file contains various utility methods to generate filter components, regionLayout data, filter expressions, etc. */
3
2
 
4
- import { Grid, Link } from '@mui/material';
3
+ import { Grid2, Link } from '@mui/material';
5
4
 
6
5
  import DashboardFilter from './DashboardFilter';
7
6
 
@@ -77,7 +76,7 @@ export const buildFilterComponents = (getPConnect, allFilters) => {
77
76
  const filterComponents = allFilters.children.map((filter, index) => createFilterComponent(getPConnect, filter, index));
78
77
  if (filterComponents && filterComponents.length > 0) {
79
78
  filterComponents.push(
80
- <Grid style={{ display: 'flex', alignItems: 'center' }}>
79
+ <Grid2 style={{ display: 'flex', alignItems: 'center' }}>
81
80
  <Link
82
81
  style={{ cursor: 'pointer' }}
83
82
  onClick={() => {
@@ -87,7 +86,7 @@ export const buildFilterComponents = (getPConnect, allFilters) => {
87
86
  >
88
87
  Clear All
89
88
  </Link>
90
- </Grid>
89
+ </Grid2>
91
90
  );
92
91
  }
93
92
  return filterComponents;
@@ -115,14 +115,13 @@ export default function DeferLoad(props: DeferLoadProps) {
115
115
  .getActionsApi()
116
116
  .showData(name, dataContext, dataContextParameters, {
117
117
  skipSemanticUrl: true,
118
- // @ts-ignore
118
+ // @ts-expect-error
119
119
  isDeferLoaded: true
120
120
  })
121
121
  .then(data => {
122
122
  onResponse(data);
123
123
  });
124
124
  } else {
125
- // eslint-disable-next-line no-console
126
125
  console.error('Cannot load the defer loaded view without container information');
127
126
  }
128
127
  } else if (resourceType === PAGE) {
@@ -141,7 +140,6 @@ export default function DeferLoad(props: DeferLoadProps) {
141
140
  onResponse(data.root);
142
141
  })
143
142
  .catch(error => {
144
- // eslint-disable-next-line no-console
145
143
  console.log(`deferload: ${error}`);
146
144
  });
147
145
  }
@@ -23,7 +23,6 @@ export default function ErrorBoundary(props: ErrorBoundaryProps) {
23
23
  const pConn = getPConnect();
24
24
 
25
25
  if (!isInternalError) {
26
- // eslint-disable-next-line no-console
27
26
  console.error(`
28
27
  ${localizedVal('Unable to load the component', localeCategory)} ${pConn.getComponentName()}
29
28
  ${localizedVal('This might be due to the view metadata getting corrupted or the component file missing.', localeCategory)}
@@ -37,7 +36,6 @@ export default function ErrorBoundary(props: ErrorBoundaryProps) {
37
36
 
38
37
  if (pConn.getContainerName() === WORK_AREA || pConn.isInsideList() === true || pConn.getContainerName() === 'modal') {
39
38
  const { publish } = PCore.getPubSubUtils();
40
- // @ts-ignore - second parameter “payload” for publish method should be optional
41
39
  publish(ERROR_WHILE_RENDERING);
42
40
  return null;
43
41
  }
@@ -17,7 +17,7 @@
17
17
 
18
18
  .psdk-current-svg-icon {
19
19
  width: 1rem;
20
- filter: var(--app-primary-color-filter);
20
+ filter: var(--svg-color);
21
21
  }
22
22
 
23
23
  .psdk-not-current-svg-icon {
@@ -40,7 +40,7 @@ mat-horizontal-stepper {
40
40
 
41
41
  .psdk-sub-step-not-current {
42
42
  padding-left: 0.625rem;
43
- color: rgba(0, 0, 0, 0.54);
43
+ color: var(--step-label-color);
44
44
  }
45
45
 
46
46
  .psdk-flow-container-top {
@@ -80,7 +80,7 @@ mat-horizontal-stepper {
80
80
  .psdk-vertical-step-icon {
81
81
  margin-right: 12px;
82
82
  background-color: var(--app-neutral-color);
83
- color: #fff;
83
+ color: var(--app-text-color);
84
84
  border-radius: 50%;
85
85
  height: 24px;
86
86
  width: 24px;
@@ -93,13 +93,13 @@ mat-horizontal-stepper {
93
93
  top: 50%;
94
94
  left: 50%;
95
95
  transform: translate(-50%, -50%);
96
- color: #fff;
96
+ color: var(--app-text-color);
97
97
  }
98
98
 
99
99
  .psdk-vertical-step-icon-selected {
100
100
  margin-right: 12px;
101
101
  background-color: var(--app-primary-color);
102
- color: #fff;
102
+ color: var(--app-text-color);
103
103
  border-radius: 50%;
104
104
  height: 24px;
105
105
  width: 24px;
@@ -108,7 +108,7 @@ mat-horizontal-stepper {
108
108
  }
109
109
 
110
110
  .psdk-vertical-step-label {
111
- color: rgba(0, 0, 0, 0.54);
111
+ color: var(--step-label-color);
112
112
  display: inline-block;
113
113
  white-space: nowrap;
114
114
  overflow: hidden;
@@ -180,7 +180,7 @@ mat-horizontal-stepper {
180
180
 
181
181
  .psdk-horizontal-step-icon {
182
182
  background-color: var(--app-neutral-color);
183
- color: #fff;
183
+ color: var(--app-text-color);
184
184
  border-radius: 50%;
185
185
  height: 24px;
186
186
  width: 24px;
@@ -201,7 +201,7 @@ mat-horizontal-stepper {
201
201
 
202
202
  .psdk-horizontal-step-icon-selected {
203
203
  background-color: var(--app-primary-color);
204
- color: #fff;
204
+ color: var(--app-text-color);
205
205
  border-radius: 50%;
206
206
  height: 24px;
207
207
  width: 24px;
@@ -154,7 +154,7 @@
154
154
  text-align: center;
155
155
  display: inline-flex;
156
156
  background: var(--app-neutral-color);
157
- color: white;
157
+ color: var(--app-text-color);
158
158
  font-weight: normal;
159
159
  font-size: 1rem;
160
160
  }
@@ -42,7 +42,7 @@ import './NavBar.css';
42
42
 
43
43
  interface NavBarProps extends PConnProps {
44
44
  // If any, enter additional props that only exist on this component
45
- // eslint-disable-next-line react/no-unused-prop-types
45
+
46
46
  appName?: string;
47
47
  pages?: any[];
48
48
  caseTypes: any[];
@@ -93,7 +93,8 @@ const useStyles = makeStyles(theme => ({
93
93
  },
94
94
  appListLogo: {
95
95
  marginRight: theme.spacing(2),
96
- width: '3.6rem'
96
+ width: '3.6rem',
97
+ filter: 'var(--svg-color)'
97
98
  },
98
99
  appListIcon: {
99
100
  color: theme.palette.getContrastText(theme.palette.primary.light)
@@ -145,7 +146,6 @@ export default function NavBar(props: NavBarProps) {
145
146
  .getActionsApi()
146
147
  .showPage(pyRuleName, pyClassName)
147
148
  .then(() => {
148
- // eslint-disable-next-line no-console
149
149
  console.log(`${localizedVal('showPage completed', localeCategory)}`);
150
150
  });
151
151
  }
@@ -161,7 +161,6 @@ export default function NavBar(props: NavBarProps) {
161
161
  .getActionsApi()
162
162
  .createWork(sCaseType, actionInfo)
163
163
  .then(() => {
164
- // eslint-disable-next-line no-console
165
164
  console.log(`${localizedVal('createWork completed', localeCategory)}`);
166
165
  });
167
166
  }
@@ -12,8 +12,7 @@ export default function Reference(props: ReferenceProps) {
12
12
  const { visibility = true, context = '', getPConnect, readOnly = false, displayMode = '' } = props;
13
13
 
14
14
  const pConnect = getPConnect();
15
- // @ts-ignore - Property 'getComponentConfig' is private and only accessible within class 'C11nEnv'.
16
- const referenceConfig = { ...pConnect.getComponentConfig() } || {};
15
+ const referenceConfig = { ...pConnect.getComponentConfig() };
17
16
 
18
17
  delete referenceConfig?.name;
19
18
  delete referenceConfig?.type;
@@ -34,7 +33,7 @@ export default function Reference(props: ReferenceProps) {
34
33
  }
35
34
  };
36
35
 
37
- // @ts-ignore - Argument of type 'null' is not assignable to parameter of type 'string'.
36
+ // @ts-expect-error - Argument of type 'null' is not assignable to parameter of type 'string'.
38
37
  const viewComponent: any = pConnect.createComponent(viewObject, null, null, {
39
38
  pageReference: context && context.startsWith('@CLASS') ? '' : context
40
39
  });
@@ -196,7 +196,6 @@ export default function RootContainer(props: PropsWithChildren<RootContainerProp
196
196
  );
197
197
  }
198
198
  if (renderingMode === 'noPortal') {
199
- // eslint-disable-next-line no-console
200
199
  console.log(`${localizedVal('RootContainer rendering in noPortal mode', localeCategory)}`);
201
200
 
202
201
  const theChildren = pConn.getChildren() as any[];
@@ -42,7 +42,6 @@ export default function AdvancedSearch(props) {
42
42
  const [firstChildMeta] = rawViewMetadata.children;
43
43
 
44
44
  const localizedVal = PCore.getLocaleUtils().getLocaleValue;
45
- // @ts-ignore
46
45
  const cache = PCore.getNavigationUtils().getComponentCache(searchSelectCacheKey) ?? {};
47
46
 
48
47
  const editableFieldComp = firstChildPConnect().createComponent({
@@ -1,16 +1,10 @@
1
- const SKIP_CACHE_KEY = '';
1
+ import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
2
2
 
3
- export function getMappedKey(key) {
4
- const mappedKey = PCore.getEnvironmentInfo().getKeyMapping(key);
5
- if (!mappedKey) {
6
- return key;
7
- }
8
- return mappedKey;
9
- }
3
+ const SKIP_CACHE_KEY = '';
10
4
 
11
5
  const getComponentStateKey = (getPConnect, propertyName: string) => {
12
6
  const pConnect = getPConnect();
13
- const caseID = `.${getMappedKey('pyID')}`; // Enhance this later when use-case arrives for data objects using S&S.
7
+ const caseID = `.${Utils.getMappedKey('pyID')}`; // Enhance this later when use-case arrives for data objects using S&S.
14
8
  const resolvedCaseID = pConnect.getValue(caseID);
15
9
 
16
10
  if (!resolvedCaseID) {
@@ -1,5 +1,5 @@
1
1
  import React, { createElement, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
2
- import { Button, Grid, Select, MenuItem, Box } from '@mui/material';
2
+ import { Button, Grid2, Select, MenuItem, Box } from '@mui/material';
3
3
 
4
4
  import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
5
5
  import TemplateContext from '@pega/react-sdk-components/lib/components/template/AdvancedSearch/TemplateContext';
@@ -173,7 +173,7 @@ export default function SearchGroups(props) {
173
173
  useCacheWhenListViewReady(cache, viewName, useCache, getFilterData, searchSelectCacheKey);
174
174
 
175
175
  const searchDropdown = groups.length > 1 && (
176
- <Grid container spacing={2}>
176
+ <Grid2 container spacing={2}>
177
177
  <Select value={activeGroupId} onChange={e => setActiveGroupId(e.target.value)} ref={searchByRef} fullWidth>
178
178
  {groups.map(group => (
179
179
  <MenuItem key={group.config.id} value={group.config.id}>
@@ -181,7 +181,7 @@ export default function SearchGroups(props) {
181
181
  </MenuItem>
182
182
  ))}
183
183
  </Select>
184
- </Grid>
184
+ </Grid2>
185
185
  );
186
186
 
187
187
  const actionButtons = (
@@ -237,7 +237,6 @@ export default function SearchGroups(props) {
237
237
  return (
238
238
  <Box display='flex' flexDirection='column' gap={2}>
239
239
  {childrenToRender.map((child, index) => (
240
- // eslint-disable-next-line react/no-array-index-key
241
240
  <React.Fragment key={index}>{child}</React.Fragment>
242
241
  ))}
243
242
  </Box>
@@ -9,7 +9,7 @@ const listViewConstants = {
9
9
  * This hook registers a callback for the whenever list view component is ready
10
10
  * then makes a call to get the data using the search fields pre-filled with cache data.
11
11
  */
12
- // eslint-disable-next-line import/prefer-default-export
12
+
13
13
  export function useCacheWhenListViewReady(
14
14
  cache: { searchFields: unknown },
15
15
  viewName: string,
@@ -22,7 +22,7 @@
22
22
  align-items: center;
23
23
  height: 100%;
24
24
  width: 100%;
25
- background-color: whitesmoke;
25
+ background-color: 'var(--app-background-color)';
26
26
  position: fixed;
27
27
  z-index: 999;
28
28
  top: 0rem;
@@ -29,9 +29,7 @@ interface AppShellProps extends PConnProps {
29
29
  }
30
30
 
31
31
  const useStyles = makeStyles(theme => ({
32
- root: {
33
- display: 'flex'
34
- },
32
+ root: {},
35
33
  content: {
36
34
  flexGrow: 1,
37
35
  height: '100vh',
@@ -117,7 +115,7 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
117
115
  }, []);
118
116
 
119
117
  useEffect(() => {
120
- // @ts-ignore
118
+ // @ts-expect-error
121
119
  const caseTypesAvailableToCreateDP = PCore.getEnvironmentInfo().environmentInfoObject?.pxApplication?.pyCaseTypesAvailableToCreateDP;
122
120
  if (caseTypesAvailableToCreateDP) {
123
121
  const portalID = pConn.getValue('.pyOwner');
@@ -159,7 +157,6 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
159
157
  setFullIconURL(data);
160
158
  })
161
159
  .catch(() => {
162
- // eslint-disable-next-line no-console
163
160
  console.error(`${localizedVal('Unable to load the image for the portal logo/icon with the insName', 'AppShell')}:${portalLogo}`);
164
161
  });
165
162
  }
@@ -213,7 +210,7 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
213
210
 
214
211
  if (portalTemplate === 'wss') {
215
212
  return (
216
- <div id='AppShell'>
213
+ <div id='AppShell' className={classes.root}>
217
214
  <WssNavBar
218
215
  portalName={portalName}
219
216
  imageSrc={iconURL}
@@ -239,9 +236,8 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
239
236
  }
240
237
 
241
238
  return (
242
- // eslint-disable-next-line react/jsx-no-constructed-context-values
243
239
  <NavContext.Provider value={{ open, setOpen }}>
244
- <div id='AppShell' className={classes.root}>
240
+ <div id='AppShell' className={classes.root} style={{ display: 'flex' }}>
245
241
  <NavBar
246
242
  getPConnect={getPConnect}
247
243
  pConn={getPConnect()}
@@ -30,7 +30,6 @@ export default function CaseSummary(props: PropsWithChildren<CaseSummaryProps>)
30
30
  let arPrimaryFields: any[] = [];
31
31
  let arSecondaryFields: any[] = [];
32
32
 
33
- /* eslint-disable @typescript-eslint/no-shadow */
34
33
  function prepareComponentInCaseSummary(pConnectMeta, getPConnect) {
35
34
  const { config, children } = pConnectMeta;
36
35
  const pConnect = getPConnect();