@pega/react-sdk-overrides 0.25.2 → 0.25.4
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.
- package/lib/designSystemExtension/Banner/Banner.css +1 -1
- package/lib/designSystemExtension/Banner/Banner.tsx +7 -7
- package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +8 -10
- package/lib/designSystemExtension/DetailsFields/DetailsFields.tsx +11 -13
- package/lib/designSystemExtension/FieldGroup/FieldGroup.tsx +7 -8
- package/lib/designSystemExtension/FieldGroupList/FieldGroupList.tsx +9 -9
- package/lib/designSystemExtension/FieldValueList/FieldValueList.tsx +7 -8
- package/lib/designSystemExtension/Operator/Operator.tsx +11 -12
- package/lib/designSystemExtension/RichTextEditor/RichTextEditor.tsx +28 -3
- package/lib/designSystemExtension/WssQuickCreate/WssQuickCreate.css +4 -4
- package/lib/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx +1 -1
- package/lib/field/CancelAlert/CancelAlert.css +4 -4
- package/lib/field/CancelAlert/CancelAlert.tsx +5 -5
- package/lib/field/Checkbox/Checkbox.tsx +96 -3
- package/lib/field/Currency/currency-utils.ts +1 -2
- package/lib/field/Dropdown/Dropdown.tsx +0 -2
- package/lib/field/Group/Group.tsx +5 -5
- package/lib/field/Location/Location.tsx +256 -0
- package/lib/field/Location/config-ext.json +8 -0
- package/lib/field/Location/index.tsx +1 -0
- package/lib/field/ObjectReference/ObjectReference.tsx +235 -0
- package/lib/field/ObjectReference/index.tsx +1 -0
- package/lib/field/ObjectReference/utils.ts +111 -0
- package/lib/field/RadioButtons/RadioButtons.tsx +46 -1
- package/lib/field/ScalarList/ScalarList.tsx +1 -2
- package/lib/field/SelectableCard/SelectableCard.tsx +175 -0
- package/lib/field/SelectableCard/index.tsx +1 -0
- package/lib/field/SelectableCard/utils.tsx +226 -0
- package/lib/field/SemanticLink/SemanticLink.tsx +159 -27
- package/lib/field/SemanticLink/utils.ts +1 -1
- package/lib/field/TextContent/TextContent.tsx +0 -1
- package/lib/field/UserReference/UserReference.tsx +0 -1
- package/lib/helpers/attachmentHelpers.ts +56 -35
- package/lib/helpers/common-utils.ts +2 -2
- package/lib/helpers/data_page.ts +0 -1
- package/lib/helpers/formatters/CurrencyMap.ts +0 -2
- package/lib/helpers/simpleTableHelpers.ts +117 -5
- package/lib/helpers/utils.ts +8 -1
- package/lib/helpers/versionHelpers.ts +0 -1
- package/lib/infra/ActionButtons/ActionButtons.tsx +28 -21
- package/lib/infra/Assignment/Assignment.tsx +2 -2
- package/lib/infra/Containers/FlowContainer/FlowContainer.tsx +14 -93
- package/lib/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx +0 -1
- package/lib/infra/Containers/ModalViewContainer/ModalViewContainer.tsx +2 -2
- package/lib/infra/Containers/ViewContainer/ViewContainer.tsx +3 -4
- package/lib/infra/Containers/container-helpers.ts +47 -1
- package/lib/infra/DashboardFilter/DashboardFilter.tsx +0 -2
- package/lib/infra/DashboardFilter/filterUtils.tsx +3 -4
- package/lib/infra/DeferLoad/DeferLoad.tsx +1 -3
- package/lib/infra/ErrorBoundary/ErrorBoundary.tsx +0 -2
- package/lib/infra/MultiStep/MultiStep.css +8 -8
- package/lib/infra/NavBar/NavBar.css +1 -1
- package/lib/infra/NavBar/NavBar.tsx +3 -4
- package/lib/infra/Reference/Reference.tsx +2 -3
- package/lib/infra/RootContainer/RootContainer.tsx +0 -1
- package/lib/template/AdvancedSearch/AdvancedSearch.tsx +0 -1
- package/lib/template/AdvancedSearch/SearchGroup/persistUtils.ts +3 -9
- package/lib/template/AdvancedSearch/SearchGroups/SearchGroups.tsx +3 -4
- package/lib/template/AdvancedSearch/SearchGroups/hooks.ts +1 -1
- package/lib/template/AppShell/AppShell.css +1 -1
- package/lib/template/AppShell/AppShell.tsx +4 -8
- package/lib/template/CaseSummary/CaseSummary.tsx +0 -1
- package/lib/template/CaseView/CaseView.tsx +13 -19
- package/lib/template/Confirmation/Confirmation.tsx +0 -1
- package/lib/template/DataReference/DataReference.tsx +7 -10
- package/lib/template/DataReference/SearchForm.tsx +6 -5
- package/lib/template/DataReference/{utils.js → utils.ts} +3 -3
- package/lib/template/DefaultForm/DefaultForm.tsx +1 -1
- package/lib/template/DefaultPage/DefaultPage.tsx +88 -0
- package/lib/template/DefaultPage/index.tsx +1 -0
- package/lib/template/Details/Details/Details.tsx +10 -10
- package/lib/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx +10 -10
- package/lib/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx +10 -10
- package/lib/template/FieldGroupTemplate/FieldGroupTemplate.tsx +1 -2
- package/lib/template/InlineDashboard/InlineDashboard.tsx +12 -14
- package/lib/template/ListView/ListView.tsx +8 -20
- package/lib/template/ListView/hooks.ts +1 -5
- package/lib/template/ListView/utils.ts +1 -1
- package/lib/template/NarrowWide/NarrowWide/NarrowWide.tsx +3 -3
- package/lib/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.tsx +10 -10
- package/lib/template/OneColumn/OneColumn/OneColumn.tsx +5 -5
- package/lib/template/PromotedFilters/PromotedFilters.tsx +0 -1
- package/lib/template/SelfServiceCaseView/SelfServiceCaseView.tsx +3 -0
- package/lib/template/SelfServiceCaseView/index.tsx +1 -0
- package/lib/template/SimpleTable/SimpleTable/SimpleTable.tsx +1 -2
- package/lib/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +33 -30
- package/lib/template/TwoColumn/TwoColumn/TwoColumn.tsx +1 -2
- package/lib/template/TwoColumn/TwoColumnTab/TwoColumnTab.tsx +1 -2
- package/lib/template/WideNarrow/WideNarrow/WideNarrow.tsx +3 -3
- package/lib/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.tsx +10 -10
- package/lib/template/WssNavBar/WssNavBar.css +1 -1
- package/lib/template/WssNavBar/WssNavBar.tsx +4 -4
- package/lib/widget/Attachment/Attachment.css +6 -8
- package/lib/widget/Attachment/Attachment.tsx +61 -57
- package/lib/widget/CaseHistory/CaseHistory.tsx +3 -3
- package/lib/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.css +0 -14
- package/lib/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +2 -2
- package/lib/widget/FileUtility/FileUtility/FileUtility.css +7 -6
- package/lib/widget/FileUtility/FileUtility/FileUtility.tsx +4 -6
- package/lib/widget/Followers/Followers.tsx +0 -2
- package/lib/widget/QuickCreate/QuickCreate.tsx +0 -1
- package/lib/widget/SummaryItem/SummaryItem.css +9 -11
- package/lib/widget/SummaryItem/SummaryItem.tsx +1 -1
- package/lib/widget/ToDo/ToDo.css +1 -13
- package/lib/widget/ToDo/ToDo.tsx +15 -7
- package/package.json +1 -1
- /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'
|
|
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-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
245
|
-
|
|
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'
|
|
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
|
-
|
|
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;
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 {
|
|
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
|
-
<
|
|
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
|
-
</
|
|
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-
|
|
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(--
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
204
|
+
color: var(--app-text-color);
|
|
205
205
|
border-radius: 50%;
|
|
206
206
|
height: 24px;
|
|
207
207
|
width: 24px;
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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-
|
|
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
|
-
|
|
1
|
+
import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
2
2
|
|
|
3
|
-
|
|
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,
|
|
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
|
-
<
|
|
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
|
-
</
|
|
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
|
-
|
|
12
|
+
|
|
13
13
|
export function useCacheWhenListViewReady(
|
|
14
14
|
cache: { searchFields: unknown },
|
|
15
15
|
viewName: string,
|
|
@@ -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-
|
|
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();
|