@pega/react-sdk-overrides 24.2.10 → 25.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/designSystemExtension/Banner/Banner.css +1 -1
- package/lib/designSystemExtension/Banner/Banner.tsx +10 -7
- package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
- package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +53 -37
- package/lib/designSystemExtension/DetailsFields/DetailsFields.tsx +11 -13
- package/lib/designSystemExtension/FieldGroup/FieldGroup.tsx +8 -9
- package/lib/designSystemExtension/FieldGroupList/FieldGroupList.tsx +9 -9
- package/lib/designSystemExtension/FieldValueList/FieldValueList.tsx +8 -9
- package/lib/designSystemExtension/Operator/Operator.tsx +21 -19
- package/lib/designSystemExtension/Pulse/Pulse.tsx +1 -1
- package/lib/designSystemExtension/RichTextEditor/RichTextEditor.tsx +32 -4
- package/lib/designSystemExtension/WssQuickCreate/WssQuickCreate.css +7 -14
- package/lib/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx +13 -2
- package/lib/field/AutoComplete/AutoComplete.tsx +1 -1
- package/lib/field/CancelAlert/CancelAlert.css +4 -4
- package/lib/field/CancelAlert/CancelAlert.tsx +7 -10
- package/lib/field/Checkbox/Checkbox.tsx +97 -4
- package/lib/field/Currency/Currency.tsx +10 -7
- package/lib/field/Currency/currency-utils.ts +1 -2
- package/lib/field/Date/Date.tsx +8 -8
- package/lib/field/DateTime/DateTime.tsx +16 -13
- package/lib/field/Decimal/Decimal.tsx +10 -7
- package/lib/field/Dropdown/Dropdown.tsx +30 -25
- package/lib/field/Email/Email.tsx +11 -13
- package/lib/field/Group/Group.tsx +10 -8
- package/lib/field/Integer/Integer.tsx +5 -7
- package/lib/field/Location/Location.css +4 -0
- package/lib/field/Location/Location.tsx +258 -0
- package/lib/field/Location/config-ext.json +8 -0
- package/lib/field/Location/index.tsx +1 -0
- package/lib/field/Multiselect/utils.ts +1 -1
- 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/Percentage/Percentage.tsx +9 -9
- package/lib/field/Phone/Phone.tsx +7 -5
- package/lib/field/RadioButtons/RadioButtons.tsx +47 -5
- package/lib/field/RichText/RichText.css +79 -0
- package/lib/field/RichText/RichText.tsx +3 -1
- package/lib/field/ScalarList/ScalarList.tsx +2 -4
- package/lib/field/SelectableCard/SelectableCard.tsx +175 -0
- package/lib/field/SelectableCard/index.tsx +1 -0
- package/lib/field/SelectableCard/utils.tsx +223 -0
- package/lib/field/SemanticLink/SemanticLink.tsx +160 -28
- package/lib/field/SemanticLink/utils.ts +1 -1
- package/lib/field/TextArea/TextArea.tsx +5 -7
- package/lib/field/TextContent/TextContent.tsx +1 -2
- package/lib/field/TextInput/TextInput.tsx +5 -7
- package/lib/field/Time/Time.tsx +4 -8
- package/lib/field/URL/URL.tsx +5 -7
- package/lib/field/UserReference/UserReference.tsx +3 -6
- package/lib/helpers/attachmentShared.ts +6 -0
- package/lib/helpers/common-utils.ts +24 -2
- package/lib/helpers/data_page.ts +0 -1
- package/lib/helpers/field-group-utils.ts +1 -1
- package/lib/helpers/formatters/Currency.ts +20 -20
- package/lib/helpers/formatters/CurrencyMap.ts +0 -2
- package/lib/helpers/formatters/common.ts +2 -1
- package/lib/helpers/formatters/index.ts +2 -4
- package/lib/helpers/object-utils.ts +10 -0
- package/lib/helpers/simpleTableHelpers.ts +118 -6
- 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 +39 -36
- package/lib/infra/AssignmentCard/AssignmentCard.tsx +2 -2
- package/lib/infra/Containers/FlowContainer/FlowContainer.tsx +21 -113
- package/lib/infra/Containers/FlowContainer/helpers.ts +1 -5
- package/lib/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx +4 -3
- package/lib/infra/Containers/ModalViewContainer/ModalViewContainer.tsx +7 -6
- package/lib/infra/Containers/SimpleView/helper.ts +1 -1
- package/lib/infra/Containers/ViewContainer/ViewContainer.tsx +4 -5
- package/lib/infra/Containers/container-helpers.ts +52 -0
- package/lib/infra/DashboardFilter/DashboardFilter.tsx +5 -9
- package/lib/infra/DashboardFilter/filterUtils.tsx +3 -6
- package/lib/infra/DeferLoad/DeferLoad.tsx +7 -9
- package/lib/infra/ErrorBoundary/ErrorBoundary.tsx +1 -3
- package/lib/infra/MultiStep/MultiStep.css +48 -70
- package/lib/infra/MultiStep/MultiStep.tsx +27 -58
- package/lib/infra/NavBar/NavBar.css +1 -1
- package/lib/infra/NavBar/NavBar.tsx +43 -32
- package/lib/infra/Reference/Reference.tsx +3 -4
- package/lib/infra/Region/Region.tsx +1 -1
- package/lib/infra/RootContainer/RootContainer.tsx +3 -4
- package/lib/infra/Stages/Stages.tsx +3 -4
- package/lib/infra/View/View.tsx +4 -3
- package/lib/template/AdvancedSearch/AdvancedSearch.tsx +86 -0
- package/lib/template/AdvancedSearch/SearchGroup/persistUtils.ts +52 -0
- package/lib/template/AdvancedSearch/SearchGroups/SearchGroups.tsx +244 -0
- package/lib/template/AdvancedSearch/SearchGroups/hooks.ts +37 -0
- package/lib/template/AdvancedSearch/SearchGroups/index.tsx +1 -0
- package/lib/template/AdvancedSearch/SearchGroups/utils.ts +29 -0
- package/lib/template/AdvancedSearch/TemplateContext.ts +11 -0
- package/lib/template/AdvancedSearch/config-ext.json +9 -0
- package/lib/template/AdvancedSearch/index.tsx +1 -0
- package/lib/template/AppShell/AppShell.css +1 -1
- package/lib/template/AppShell/AppShell.tsx +22 -23
- package/lib/template/BannerPage/BannerPage.tsx +2 -2
- package/lib/template/CaseSummary/CaseSummary.tsx +28 -41
- package/lib/template/CaseView/CaseView.tsx +32 -38
- package/lib/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +1 -1
- package/lib/template/Confirmation/Confirmation.tsx +3 -4
- package/lib/template/DataReference/DataReference.tsx +312 -106
- package/lib/template/DataReference/DataReferenceAdvancedSearchContext.ts +10 -0
- package/lib/template/DataReference/SearchForm.tsx +149 -0
- package/lib/template/DataReference/utils.ts +90 -0
- package/lib/template/DefaultForm/DefaultForm.tsx +3 -3
- package/lib/template/DefaultForm/utils/index.ts +1 -3
- package/lib/template/DefaultPage/DefaultPage.tsx +108 -0
- package/lib/template/DefaultPage/index.tsx +1 -0
- package/lib/template/Details/Details/Details.tsx +11 -11
- package/lib/template/Details/DetailsSubTabs/DetailsSubTabs.tsx +2 -2
- package/lib/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx +11 -11
- package/lib/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx +11 -11
- package/lib/template/Details/DynamicTabs/DynamicTabs.tsx +1 -2
- package/lib/template/FieldGroupTemplate/FieldGroupTemplate.tsx +2 -5
- package/lib/template/InlineDashboard/InlineDashboard.tsx +14 -16
- package/lib/template/InlineDashboardPage/InlineDashboardPage.tsx +2 -2
- package/lib/template/ListPage/ListPage.tsx +1 -1
- package/lib/template/ListView/ListView.tsx +285 -204
- package/lib/template/ListView/hooks.ts +1 -5
- package/lib/template/ListView/utils.ts +38 -6
- package/lib/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +1 -1
- package/lib/template/NarrowWide/NarrowWide/NarrowWide.tsx +5 -5
- package/lib/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.tsx +11 -11
- package/lib/template/NarrowWide/NarrowWideForm/NarrowWideForm.tsx +2 -2
- package/lib/template/NarrowWide/NarrowWidePage/NarrowWidePage.tsx +2 -2
- package/lib/template/OneColumn/OneColumn/OneColumn.tsx +7 -7
- package/lib/template/OneColumn/OneColumnPage/OneColumnPage.tsx +1 -1
- package/lib/template/OneColumn/OneColumnTab/OneColumnTab.tsx +2 -2
- package/lib/template/PromotedFilters/PromotedFilters.tsx +1 -3
- package/lib/template/SelfServiceCaseView/SelfServiceCaseView.tsx +145 -0
- package/lib/template/SelfServiceCaseView/index.tsx +1 -0
- package/lib/template/SimpleTable/SimpleTable/SimpleTable.tsx +2 -5
- package/lib/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +99 -84
- package/lib/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.tsx +3 -5
- package/lib/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +10 -2
- package/lib/template/SubTabs/SubTabs.tsx +2 -2
- package/lib/template/SubTabs/tabUtils.ts +118 -1
- package/lib/template/TwoColumn/TwoColumn/TwoColumn.tsx +9 -10
- package/lib/template/TwoColumn/TwoColumnPage/TwoColumnPage.tsx +1 -1
- package/lib/template/TwoColumn/TwoColumnTab/TwoColumnTab.tsx +9 -10
- package/lib/template/WideNarrow/WideNarrow/WideNarrow.tsx +5 -5
- package/lib/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.tsx +11 -11
- package/lib/template/WideNarrow/WideNarrowForm/WideNarrowForm.tsx +2 -2
- package/lib/template/WideNarrow/WideNarrowPage/WideNarrowPage.tsx +2 -2
- package/lib/template/WssNavBar/WssNavBar.css +1 -1
- package/lib/template/WssNavBar/WssNavBar.tsx +6 -6
- package/lib/template/utils.tsx +58 -0
- package/lib/widget/AppAnnouncement/AppAnnouncement.tsx +1 -1
- package/lib/widget/Attachment/Attachment.css +7 -8
- package/lib/widget/Attachment/Attachment.tsx +304 -231
- package/lib/widget/Attachment/Attachment.types.ts +96 -0
- package/lib/widget/Attachment/AttachmentUtils.ts +316 -0
- package/lib/widget/CaseHistory/CaseHistory.tsx +5 -5
- package/lib/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.css +0 -14
- package/lib/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +3 -3
- package/lib/widget/FileUtility/FileUtility/FileUtility.css +7 -6
- package/lib/widget/FileUtility/FileUtility/FileUtility.tsx +30 -23
- package/lib/widget/Followers/Followers.tsx +2 -4
- package/lib/widget/QuickCreate/QuickCreate.tsx +1 -3
- package/lib/widget/SummaryItem/SummaryItem.css +9 -11
- package/lib/widget/SummaryItem/SummaryItem.tsx +3 -3
- package/lib/widget/SummaryList/SummaryList.tsx +1 -1
- package/lib/widget/ToDo/ToDo.css +1 -13
- package/lib/widget/ToDo/ToDo.tsx +38 -37
- package/package.json +1 -1
- package/lib/helpers/attachmentHelpers.ts +0 -76
- package/lib/infra/Containers/helpers.ts +0 -6
|
@@ -1,17 +1,15 @@
|
|
|
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';
|
|
6
4
|
|
|
7
5
|
import StoreContext from '@pega/react-sdk-components/lib/bridge/Context/StoreContext';
|
|
8
6
|
import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
9
|
-
import { isContainerInitialized } from '@pega/react-sdk-components/lib/components/helpers';
|
|
7
|
+
import { isContainerInitialized } from '@pega/react-sdk-components/lib/components/infra/Containers/container-helpers';
|
|
10
8
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
11
|
-
import { withSimpleViewContainerRenderer } from '
|
|
9
|
+
import { withSimpleViewContainerRenderer } from '@pega/react-sdk-components/lib/components/infra/Containers/SimpleView/SimpleView';
|
|
12
10
|
|
|
13
11
|
import { addContainerItem, getToDoAssignments, showBanner, hasContainerItems } from './helpers';
|
|
14
|
-
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
12
|
+
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
15
13
|
import { LocalizationProvider } from '@mui/x-date-pickers';
|
|
16
14
|
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
|
|
17
15
|
|
|
@@ -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
|
|
|
@@ -98,13 +96,12 @@ export const FlowContainer = (props: FlowContainerProps) => {
|
|
|
98
96
|
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
99
97
|
const localeCategory = 'Messages';
|
|
100
98
|
|
|
101
|
-
const key =
|
|
99
|
+
const key = getPConnect()?.getCaseLocaleReference();
|
|
102
100
|
const classes = useStyles();
|
|
103
101
|
|
|
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,31 +110,16 @@ 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
|
}
|
|
120
|
-
|
|
121
|
-
if (caseViewMode && caseViewMode === 'perform') {
|
|
122
|
-
return false;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
return true;
|
|
117
|
+
return !(caseViewMode && caseViewMode === 'perform');
|
|
126
118
|
}
|
|
127
119
|
|
|
128
120
|
function initComponent() {
|
|
129
121
|
const ourPConn = getPConnect();
|
|
130
122
|
|
|
131
|
-
// debugging/investigation help
|
|
132
|
-
// console.log(`${ourPConn.getComponentName()}: children update for main draw`);
|
|
133
|
-
|
|
134
|
-
// const oData = ourPConn.getDataObject();
|
|
135
|
-
|
|
136
|
-
// const activeActionLabel = "";
|
|
137
|
-
// const child0_getPConnect = arNewChildren[0].getPConnect();
|
|
138
|
-
|
|
139
|
-
// this.templateName$ = this.configProps$["template"];
|
|
140
|
-
|
|
141
123
|
// debugger;
|
|
142
124
|
setShowTodo(getTodoVisibility());
|
|
143
125
|
|
|
@@ -153,7 +135,7 @@ export const FlowContainer = (props: FlowContainerProps) => {
|
|
|
153
135
|
}, []);
|
|
154
136
|
|
|
155
137
|
useEffect(() => {
|
|
156
|
-
// @ts-
|
|
138
|
+
// @ts-expect-error - Property 'getMetadata' is private and only accessible within class 'C11nEnv'
|
|
157
139
|
if (isInitialized && pConnectOfFlowContainer.getMetadata().children && !hasItems) {
|
|
158
140
|
// ensuring not to add container items, if container already has items
|
|
159
141
|
// because during multi doc mode, we will have container items already in store
|
|
@@ -161,67 +143,6 @@ export const FlowContainer = (props: FlowContainerProps) => {
|
|
|
161
143
|
}
|
|
162
144
|
}, [isInitialized, hasItems]);
|
|
163
145
|
|
|
164
|
-
function isCaseWideLocalAction() {
|
|
165
|
-
const ourPConn = getPConnect();
|
|
166
|
-
|
|
167
|
-
const actionID = ourPConn.getValue(pCoreConstants.CASE_INFO.ACTIVE_ACTION_ID, ''); // 2nd arg empty string until typedefs properly allow optional
|
|
168
|
-
const caseActions = ourPConn.getValue(pCoreConstants.CASE_INFO.AVAILABLEACTIONS, ''); // 2nd arg empty string until typedefs properly allow optional
|
|
169
|
-
let bCaseWideAction = false;
|
|
170
|
-
if (caseActions && actionID) {
|
|
171
|
-
const actionObj = caseActions.find(caseAction => caseAction.ID === actionID);
|
|
172
|
-
if (actionObj) {
|
|
173
|
-
bCaseWideAction = actionObj.type === 'Case';
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
return bCaseWideAction;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
function hasChildCaseAssignments() {
|
|
180
|
-
const ourPConn = getPConnect();
|
|
181
|
-
|
|
182
|
-
const childCases = ourPConn.getValue(pCoreConstants.CASE_INFO.CHILD_ASSIGNMENTS, ''); // 2nd arg empty string until typedefs properly allow optional
|
|
183
|
-
// const allAssignments = [];
|
|
184
|
-
// eslint-disable-next-line sonarjs/prefer-single-boolean-return
|
|
185
|
-
if (childCases && childCases.length > 0) {
|
|
186
|
-
return true;
|
|
187
|
-
}
|
|
188
|
-
return false;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
function hasAssignments() {
|
|
192
|
-
const ourPConn = getPConnect();
|
|
193
|
-
|
|
194
|
-
let bHasAssignments = false;
|
|
195
|
-
const assignmentsList: any[] = ourPConn.getValue(pCoreConstants.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS, ''); // 2nd arg empty string until typedefs properly allow optional
|
|
196
|
-
const isEmbedded = window.location.href.includes('embedded');
|
|
197
|
-
let bAssignmentsForThisOperator = false;
|
|
198
|
-
// 8.7 includes assignments in Assignments List that may be assigned to
|
|
199
|
-
// a different operator. So, see if there are any assignments for
|
|
200
|
-
// the current operator
|
|
201
|
-
if (PCoreVersion?.includes('8.7') || isEmbedded) {
|
|
202
|
-
const thisOperator = PCore.getEnvironmentInfo().getOperatorIdentifier();
|
|
203
|
-
for (const assignment of assignmentsList) {
|
|
204
|
-
if (assignment.assigneeInfo.ID === thisOperator) {
|
|
205
|
-
bAssignmentsForThisOperator = true;
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
} else {
|
|
209
|
-
bAssignmentsForThisOperator = true;
|
|
210
|
-
}
|
|
211
|
-
// Bail out if there isn't an assignmentsList
|
|
212
|
-
if (!assignmentsList) {
|
|
213
|
-
return bHasAssignments;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
const bHasChildCaseAssignments = hasChildCaseAssignments();
|
|
217
|
-
|
|
218
|
-
if (bAssignmentsForThisOperator || bHasChildCaseAssignments || isCaseWideLocalAction()) {
|
|
219
|
-
bHasAssignments = true;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
return bHasAssignments;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
146
|
// From SDK-WC updateSelf - so do this in useEffect that's run only when the props change...
|
|
226
147
|
useEffect(() => {
|
|
227
148
|
setBuildName(getBuildName());
|
|
@@ -231,29 +152,21 @@ export const FlowContainer = (props: FlowContainerProps) => {
|
|
|
231
152
|
|
|
232
153
|
let loadingInfo: any;
|
|
233
154
|
try {
|
|
234
|
-
|
|
155
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
156
|
+
loadingInfo = thePConn.getLoadingStatus();
|
|
157
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
235
158
|
} catch (ex) {
|
|
236
|
-
// eslint-disable-next-line no-console
|
|
237
159
|
console.error(`${thePConn.getComponentName()}: loadingInfo catch block`);
|
|
238
160
|
}
|
|
239
161
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
if (!loadingInfo) {
|
|
243
|
-
// turn off spinner
|
|
244
|
-
// this.psService.sendMessage(false);
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
const caseViewMode = thePConn.getValue('context_data.caseViewMode', ''); // 2nd arg empty string until typedefs properly allow optional
|
|
162
|
+
const caseViewMode = thePConn.getValue('context_data.caseViewMode');
|
|
248
163
|
const { CASE_INFO: CASE_CONSTS } = pCoreConstants;
|
|
249
164
|
if (caseViewMode && caseViewMode === 'review') {
|
|
250
165
|
setTimeout(() => {
|
|
251
166
|
// updated for 8.7 - 30-Mar-2022
|
|
252
167
|
const todoAssignments = getToDoAssignments(thePConn);
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
setTodoDatasource({ source: todoAssignments });
|
|
256
|
-
}
|
|
168
|
+
setCaseInfoID(thePConn.getValue(CASE_CONSTS.CASE_INFO_ID));
|
|
169
|
+
setTodoDatasource({ source: todoAssignments });
|
|
257
170
|
setShowTodo(true);
|
|
258
171
|
setShowTodoList(false);
|
|
259
172
|
}, 100);
|
|
@@ -264,21 +177,18 @@ export const FlowContainer = (props: FlowContainerProps) => {
|
|
|
264
177
|
}
|
|
265
178
|
|
|
266
179
|
// if have caseMessage show message and end
|
|
267
|
-
const theCaseMessages = localizedVal(thePConn.getValue('caseMessages'
|
|
180
|
+
const theCaseMessages = localizedVal(thePConn.getValue('caseMessages'), localeCategory);
|
|
268
181
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
182
|
+
const rootInfo = PCore.getContainerUtils().getContainerItemData(getPConnect().getTarget(), itemKey);
|
|
183
|
+
const bConfirmView = rootInfo && bShowBanner;
|
|
184
|
+
|
|
185
|
+
if (bConfirmView) {
|
|
272
186
|
// Temp fix for 8.7 change: confirmationNote no longer coming through in caseMessages$.
|
|
273
187
|
// So, if we get here and caseMessages$ is empty, use default value in DX API response
|
|
274
188
|
setCaseMessages(theCaseMessages || localizedVal('Thank you! The next step in this case has been routed appropriately.', localeCategory));
|
|
275
189
|
setHasCaseMessages(true);
|
|
276
190
|
setShowConfirm(true);
|
|
277
191
|
|
|
278
|
-
// publish this "assignmentFinished" for mashup, need to get approved as a standard
|
|
279
|
-
// @ts-ignore - second parameter “payload” for publish method should be optional
|
|
280
|
-
PCore.getPubSubUtils().publish('assignmentFinished');
|
|
281
|
-
|
|
282
192
|
// debugger;
|
|
283
193
|
setCheckSvg(Utils.getImageSrc('check', Utils.getSDKStaticConentUrl()));
|
|
284
194
|
} else {
|
|
@@ -290,9 +200,7 @@ export const FlowContainer = (props: FlowContainerProps) => {
|
|
|
290
200
|
|
|
291
201
|
const caseId = thePConn.getCaseSummary().content.pyID;
|
|
292
202
|
const urgency = getPConnect().getCaseSummary().assignments ? getPConnect().getCaseSummary().assignments?.[0].urgency : '';
|
|
293
|
-
const operatorInitials = Utils.getInitials(PCore.getEnvironmentInfo().getOperatorName());
|
|
294
|
-
|
|
295
|
-
const bShowBanner = showBanner(getPConnect);
|
|
203
|
+
const operatorInitials = Utils.getInitials(PCore.getEnvironmentInfo().getOperatorName() || '');
|
|
296
204
|
|
|
297
205
|
const displayPageMessages = () => {
|
|
298
206
|
let hasBanner = false;
|
|
@@ -310,7 +218,7 @@ export const FlowContainer = (props: FlowContainerProps) => {
|
|
|
310
218
|
<CardHeader
|
|
311
219
|
id='assignment-header'
|
|
312
220
|
title={<Typography variant='h6'>{localizedVal(containerName, undefined, key)}</Typography>}
|
|
313
|
-
subheader={`${localizedVal('
|
|
221
|
+
subheader={`${localizedVal('In', 'Todo')} ${caseId} \u2022 ${localizedVal('Priority', 'Todo')} ${urgency}`}
|
|
314
222
|
avatar={<Avatar className={`${classes.avatar} psdk-avatar`}>{operatorInitials}</Avatar>}
|
|
315
223
|
/>
|
|
316
224
|
{displayPageMessages()}
|
|
@@ -88,11 +88,7 @@ export const hasAssignments = pConnect => {
|
|
|
88
88
|
const assignments = pConnect.getValue(CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS);
|
|
89
89
|
const childCasesAssignments = getChildCaseAssignments(pConnect);
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
if (assignments || childCasesAssignments || isCaseWideLocalAction(pConnect)) {
|
|
93
|
-
return true;
|
|
94
|
-
}
|
|
95
|
-
return false;
|
|
91
|
+
return !!(assignments || childCasesAssignments || isCaseWideLocalAction(pConnect));
|
|
96
92
|
};
|
|
97
93
|
|
|
98
94
|
export const showBanner = getPConnect => {
|
package/lib/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
2
|
import Button from '@mui/material/Button';
|
|
3
3
|
import makeStyles from '@mui/styles/makeStyles';
|
|
4
|
-
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
4
|
+
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
5
5
|
|
|
6
6
|
const useStyles = makeStyles((/* theme */) => ({
|
|
7
7
|
button: {
|
|
@@ -50,12 +50,13 @@ function ListViewActionButtons(props: ListViewActionButtonsProps) {
|
|
|
50
50
|
.getActionsApi()
|
|
51
51
|
.submitEmbeddedDataModal(context)
|
|
52
52
|
.then(() => {
|
|
53
|
-
setIsDisabled(false);
|
|
54
53
|
closeActionsDialog();
|
|
55
54
|
})
|
|
56
55
|
.catch(err => {
|
|
57
|
-
// eslint-disable-next-line no-console
|
|
58
56
|
console.log(err);
|
|
57
|
+
})
|
|
58
|
+
.finally(() => {
|
|
59
|
+
setIsDisabled(false);
|
|
59
60
|
});
|
|
60
61
|
}}
|
|
61
62
|
>
|
|
@@ -11,7 +11,7 @@ import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react
|
|
|
11
11
|
// Need to get correct implementation from component map for Assignment and CancelAlert
|
|
12
12
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
13
13
|
import { getBanners } from '@pega/react-sdk-components/lib/components/helpers/case-utils';
|
|
14
|
-
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
14
|
+
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
15
15
|
|
|
16
16
|
interface ModalViewContainerProps extends PConnProps {
|
|
17
17
|
// If any, enter additional props that only exist on this component
|
|
@@ -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)) {
|
|
@@ -96,6 +96,7 @@ const useStyles = makeStyles(theme => ({
|
|
|
96
96
|
marginBottom: theme.spacing(0)
|
|
97
97
|
},
|
|
98
98
|
dlgContent: {
|
|
99
|
+
paddingTop: `${theme.spacing(1)} !important`,
|
|
99
100
|
marginLeft: theme.spacing(2),
|
|
100
101
|
marginRight: theme.spacing(2),
|
|
101
102
|
marginTop: theme.spacing(0),
|
|
@@ -130,7 +131,7 @@ export default function ModalViewContainer(props: ModalViewContainerProps) {
|
|
|
130
131
|
const [cancelAlertProps, setCancelAlertProps] = useState({});
|
|
131
132
|
const [isMultiRecordData, setMultiRecordData] = useState(false);
|
|
132
133
|
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
133
|
-
const localeCategory = '
|
|
134
|
+
const localeCategory = 'ModalContainer';
|
|
134
135
|
|
|
135
136
|
const ERROR_WHILE_RENDERING = 'ERROR_WHILE_RENDERING';
|
|
136
137
|
|
|
@@ -216,7 +217,7 @@ export default function ModalViewContainer(props: ModalViewContainerProps) {
|
|
|
216
217
|
ERROR_WHILE_RENDERING,
|
|
217
218
|
error => {
|
|
218
219
|
// setError(true);
|
|
219
|
-
|
|
220
|
+
|
|
220
221
|
console.error(error);
|
|
221
222
|
},
|
|
222
223
|
`${ERROR_WHILE_RENDERING}-mc-${getPConnect().getContextName()}`,
|
|
@@ -254,7 +255,7 @@ export default function ModalViewContainer(props: ModalViewContainerProps) {
|
|
|
254
255
|
const headingValue =
|
|
255
256
|
isDataObject || isMultiRecord
|
|
256
257
|
? getModalHeading(dataObjectAction)
|
|
257
|
-
: determineModalHeaderByAction(actionName, caseTypeName, ID,
|
|
258
|
+
: determineModalHeaderByAction(actionName, caseTypeName, ID, pConnect?.getCaseLocaleReference());
|
|
258
259
|
|
|
259
260
|
let arChildrenAsReact: any[] = [];
|
|
260
261
|
|
|
@@ -309,7 +310,7 @@ export default function ModalViewContainer(props: ModalViewContainerProps) {
|
|
|
309
310
|
|
|
310
311
|
return (
|
|
311
312
|
<>
|
|
312
|
-
<Dialog open={bShowModal} aria-labelledby='form-dialog-title'>
|
|
313
|
+
<Dialog open={bShowModal} aria-labelledby='form-dialog-title' maxWidth={false}>
|
|
313
314
|
<DialogTitle id='form-dialog-title' className={`${classes.dlgTitle} psdk-dialog-title`}>
|
|
314
315
|
{title}
|
|
315
316
|
</DialogTitle>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect, createElement } from 'react';
|
|
2
2
|
|
|
3
3
|
import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
|
|
4
|
-
import { isContainerInitialized } from '@pega/react-sdk-components/lib/components/helpers';
|
|
4
|
+
import { isContainerInitialized } from '@pega/react-sdk-components/lib/components/infra/Containers/container-helpers';
|
|
5
5
|
|
|
6
6
|
const processRootViewDetails = (rootView, containerItem, options) => {
|
|
7
7
|
const {
|
|
@@ -1,10 +1,12 @@
|
|
|
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
|
|
|
4
5
|
import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
|
|
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
|
-
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
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
|
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export const isContainerInitialized = pConnect => {
|
|
2
|
+
const context = pConnect.getContextName();
|
|
3
|
+
const containerName = pConnect.getContainerName();
|
|
4
|
+
return PCore.getContainerUtils().isContainerInitialized(context, containerName);
|
|
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,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
/* eslint-disable operator-assignment */
|
|
3
|
-
import { forwardRef, PropsWithChildren, useEffect, useRef, useState } from 'react';
|
|
1
|
+
import { forwardRef, type PropsWithChildren, useEffect, useRef, useState } from 'react';
|
|
4
2
|
import { TextField } from '@mui/material';
|
|
5
|
-
import { v4 as uuidv4 } from 'uuid';
|
|
6
3
|
import { debounce } from 'throttle-debounce';
|
|
7
4
|
import DatePicker from 'react-datepicker';
|
|
8
5
|
|
|
9
6
|
import { createFilter, combineFilters, getFormattedDate, getFilterExpression } from './filterUtils';
|
|
10
|
-
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
7
|
+
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
11
8
|
|
|
12
9
|
import 'react-datepicker/dist/react-datepicker.css';
|
|
13
10
|
|
|
@@ -20,8 +17,8 @@ interface DashboardFilterProps extends PConnProps {
|
|
|
20
17
|
}
|
|
21
18
|
|
|
22
19
|
export default function DashboardFilter(props: PropsWithChildren<DashboardFilterProps>) {
|
|
23
|
-
const { children
|
|
24
|
-
const { current: filterId } = useRef(
|
|
20
|
+
const { children, name, filterProp, type = '', metadata = null, getPConnect } = props;
|
|
21
|
+
const { current: filterId } = useRef(crypto.randomUUID());
|
|
25
22
|
|
|
26
23
|
const [startDate, setStartDate] = useState(null);
|
|
27
24
|
const [endDate, setEndDate] = useState(null);
|
|
@@ -35,7 +32,7 @@ export default function DashboardFilter(props: PropsWithChildren<DashboardFilter
|
|
|
35
32
|
} else if (type === 'RadioButtons') {
|
|
36
33
|
const reference = getPConnect().getFullReference() + filterProp;
|
|
37
34
|
const radList = document.getElementsByName(reference);
|
|
38
|
-
for (let i = 0; i < radList.length; i
|
|
35
|
+
for (let i = 0; i < radList.length; i += 1) {
|
|
39
36
|
if ((radList[i] as HTMLInputElement).value === '') {
|
|
40
37
|
(radList[i] as HTMLInputElement).checked = true;
|
|
41
38
|
} else {
|
|
@@ -111,7 +108,6 @@ export default function DashboardFilter(props: PropsWithChildren<DashboardFilter
|
|
|
111
108
|
|
|
112
109
|
const label = metadata.config.label.substring(3);
|
|
113
110
|
|
|
114
|
-
// eslint-disable-next-line react/no-unstable-nested-components
|
|
115
111
|
const CustomDateInput = forwardRef<HTMLInputElement, TextProps>(({ value, onClick }, ref: any) => (
|
|
116
112
|
<TextField label={label} variant='outlined' fullWidth value={value} size='small' onClick={onClick} ref={ref}>
|
|
117
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
|
|
|
@@ -46,7 +45,6 @@ export const createFilterComponent = (getPConnect, filterMeta, index) => {
|
|
|
46
45
|
}
|
|
47
46
|
let propInfo: any = PCore.getMetadataUtils().getPropertyMetadata(cleanedName, filterMeta.config.ruleClass);
|
|
48
47
|
if (!propInfo) {
|
|
49
|
-
// @ts-ignore - PCore.getMetadataUtils().getPropertyMetadata - An argument for 'currentClassID' was not provided.
|
|
50
48
|
propInfo = PCore.getMetadataUtils().getPropertyMetadata(cleanedName);
|
|
51
49
|
}
|
|
52
50
|
const { type: propertyType } = propInfo || { type: 'Text' };
|
|
@@ -78,18 +76,17 @@ export const buildFilterComponents = (getPConnect, allFilters) => {
|
|
|
78
76
|
const filterComponents = allFilters.children.map((filter, index) => createFilterComponent(getPConnect, filter, index));
|
|
79
77
|
if (filterComponents && filterComponents.length > 0) {
|
|
80
78
|
filterComponents.push(
|
|
81
|
-
<
|
|
79
|
+
<Grid2 style={{ display: 'flex', alignItems: 'center' }}>
|
|
82
80
|
<Link
|
|
83
81
|
style={{ cursor: 'pointer' }}
|
|
84
82
|
onClick={() => {
|
|
85
|
-
// @ts-ignore - second parameter “payload” for publish method should be optional
|
|
86
83
|
PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.EVENT_DASHBOARD_FILTER_CLEAR_ALL);
|
|
87
84
|
}}
|
|
88
85
|
underline='hover'
|
|
89
86
|
>
|
|
90
87
|
Clear All
|
|
91
88
|
</Link>
|
|
92
|
-
</
|
|
89
|
+
</Grid2>
|
|
93
90
|
);
|
|
94
91
|
}
|
|
95
92
|
return filterComponents;
|
|
@@ -4,7 +4,7 @@ import makeStyles from '@mui/styles/makeStyles';
|
|
|
4
4
|
|
|
5
5
|
import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
|
|
6
6
|
|
|
7
|
-
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
7
|
+
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
8
8
|
|
|
9
9
|
interface DeferLoadProps extends PConnProps {
|
|
10
10
|
// If any, enter additional props that only exist on this component
|
|
@@ -12,6 +12,7 @@ interface DeferLoadProps extends PConnProps {
|
|
|
12
12
|
isChildDeferLoad?: boolean;
|
|
13
13
|
isTab: boolean;
|
|
14
14
|
deferLoadId: string;
|
|
15
|
+
lastUpdateCaseTime: any;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
//
|
|
@@ -34,7 +35,7 @@ const useStyles = makeStyles(theme => ({
|
|
|
34
35
|
}));
|
|
35
36
|
|
|
36
37
|
export default function DeferLoad(props: DeferLoadProps) {
|
|
37
|
-
const { getPConnect, name, deferLoadId, isTab } = props;
|
|
38
|
+
const { getPConnect, name, deferLoadId, isTab, lastUpdateCaseTime } = props;
|
|
38
39
|
const [content, setContent] = useState<any>(null);
|
|
39
40
|
const [isLoading, setLoading] = useState(true);
|
|
40
41
|
const [currentLoadedAssignment, setCurrentLoadedAssignment] = useState('');
|
|
@@ -69,8 +70,8 @@ export default function DeferLoad(props: DeferLoadProps) {
|
|
|
69
70
|
const getViewOptions = () => ({
|
|
70
71
|
viewContext: resourceType,
|
|
71
72
|
pageClass: loadViewCaseID ? '' : (pConnect.getDataObject('') as any).pyPortal.classID, // 2nd arg empty string until typedef allows optional
|
|
72
|
-
container: isContainerPreview ? 'preview' :
|
|
73
|
-
containerName: isContainerPreview ? 'preview' :
|
|
73
|
+
container: isContainerPreview ? 'preview' : undefined,
|
|
74
|
+
containerName: isContainerPreview ? 'preview' : undefined,
|
|
74
75
|
updateData: isContainerPreview
|
|
75
76
|
});
|
|
76
77
|
|
|
@@ -113,16 +114,14 @@ export default function DeferLoad(props: DeferLoadProps) {
|
|
|
113
114
|
getPConnect()
|
|
114
115
|
.getActionsApi()
|
|
115
116
|
.showData(name, dataContext, dataContextParameters, {
|
|
116
|
-
// @ts-ignore - Type 'boolean' is not assignable to type 'string'
|
|
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,11 +140,10 @@ 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
|
}
|
|
148
|
-
}, [name, getPConnect, currentLoadedAssignment]);
|
|
146
|
+
}, [name, getPConnect, currentLoadedAssignment, lastUpdateCaseTime]);
|
|
149
147
|
/* TODO Cosmos need to handle for now added a wrapper div with pos relative */
|
|
150
148
|
let deferLoadContent;
|
|
151
149
|
if (isLoading) {
|
|
@@ -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 ErrorBoundaryProps extends PConnProps {
|
|
4
4
|
// If any, enter additional props that only exist on this component
|
|
@@ -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
|
}
|