@pega/angular-sdk-overrides 0.25.15 → 0.25.16
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/operator/operator.component.ts +2 -1
- package/lib/infra/Containers/flow-container/flow-container.component.ts +33 -40
- package/lib/infra/Containers/modal-view-container/modal-view-container.component.ts +46 -50
- package/lib/infra/Containers/view-container/view-container.component.ts +29 -30
- package/lib/infra/defer-load/defer-load.component.ts +6 -3
- package/lib/infra/navbar/navbar.component.ts +33 -35
- package/lib/infra/root-container/root-container.component.ts +33 -38
- package/lib/infra/view/view.component.ts +15 -36
- package/lib/template/app-shell/app-shell.component.ts +12 -11
- package/lib/template/base/details-template-base.ts +10 -1
- package/lib/template/case-summary/case-summary.component.ts +14 -0
- package/lib/template/details/details.component.html +11 -3
- package/lib/template/details/details.component.ts +1 -0
- package/lib/template/details-narrow-wide/details-narrow-wide.component.html +9 -2
- package/lib/template/details-narrow-wide/details-narrow-wide.component.ts +1 -0
- package/lib/template/details-one-column/details-one-column.component.html +11 -1
- package/lib/template/details-one-column/details-one-column.component.ts +1 -0
- package/lib/template/details-three-column/details-three-column.component.html +15 -2
- package/lib/template/details-three-column/details-three-column.component.ts +1 -2
- package/lib/template/details-two-column/details-two-column.component.html +9 -2
- package/lib/template/details-two-column/details-two-column.component.ts +1 -2
- package/lib/template/details-wide-narrow/details-wide-narrow.component.html +9 -2
- package/lib/template/details-wide-narrow/details-wide-narrow.component.ts +1 -2
- package/lib/template/wss-nav-bar/wss-nav-bar.component.ts +18 -20
- package/lib/widget/attachment/attachment.component.ts +5 -2
- package/lib/widget/case-history/case-history.component.ts +6 -2
- package/lib/widget/file-utility/file-utility.component.ts +25 -29
- package/lib/widget/todo/todo.component.ts +7 -2
- package/package.json +1 -1
|
@@ -112,7 +112,7 @@ export class OperatorComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
112
112
|
];
|
|
113
113
|
|
|
114
114
|
this.bShowPopover$ = true;
|
|
115
|
-
this.cdRef.
|
|
115
|
+
this.cdRef.markForCheck();
|
|
116
116
|
} else {
|
|
117
117
|
console.log(
|
|
118
118
|
`Operator: PCore.getUserApi().getOperatorDetails(${this.id$}); returned empty res.data.pyOperatorInfo.pyUserName - adding default`
|
|
@@ -144,6 +144,7 @@ export class OperatorComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
144
144
|
value: fillerString
|
|
145
145
|
}
|
|
146
146
|
];
|
|
147
|
+
this.cdRef.markForCheck();
|
|
147
148
|
}
|
|
148
149
|
});
|
|
149
150
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, OnInit, Input, ChangeDetectorRef,
|
|
1
|
+
import { Component, OnInit, Input, ChangeDetectorRef, forwardRef, OnDestroy, Injector } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { FormBuilder, FormGroup } from '@angular/forms';
|
|
4
4
|
import { MatCardModule } from '@angular/material/card';
|
|
@@ -75,7 +75,6 @@ export class FlowContainerComponent extends FlowContainerBaseComponent implement
|
|
|
75
75
|
private cdRef: ChangeDetectorRef,
|
|
76
76
|
private psService: ProgressSpinnerService,
|
|
77
77
|
private fb: FormBuilder,
|
|
78
|
-
private ngZone: NgZone,
|
|
79
78
|
private utils: Utils
|
|
80
79
|
) {
|
|
81
80
|
super(injector);
|
|
@@ -123,6 +122,7 @@ export class FlowContainerComponent extends FlowContainerBaseComponent implement
|
|
|
123
122
|
'clearBannerMessages',
|
|
124
123
|
() => {
|
|
125
124
|
this.banners = [];
|
|
125
|
+
this.cdRef.markForCheck();
|
|
126
126
|
},
|
|
127
127
|
'clearBannerMessages'
|
|
128
128
|
);
|
|
@@ -188,10 +188,9 @@ export class FlowContainerComponent extends FlowContainerBaseComponent implement
|
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
showPageMessages(completeProps: FlowContainerProps) {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
});
|
|
191
|
+
const pageMessages = completeProps.pageMessages;
|
|
192
|
+
this.banners = [{ messages: pageMessages?.map(msg => this.localizedVal(msg.message, 'Messages')), variant: 'urgent' }];
|
|
193
|
+
this.cdRef.markForCheck();
|
|
195
194
|
}
|
|
196
195
|
|
|
197
196
|
getTodoVisibilty() {
|
|
@@ -388,8 +387,7 @@ export class FlowContainerComponent extends FlowContainerBaseComponent implement
|
|
|
388
387
|
const { CASE_INFO: CASE_CONSTS } = PCore.getConstants();
|
|
389
388
|
|
|
390
389
|
setTimeout(() => {
|
|
391
|
-
|
|
392
|
-
/*
|
|
390
|
+
/*
|
|
393
391
|
*** renove this commmented out code when React/WC is updated
|
|
394
392
|
*** this code is replace with the call to "getToDoAssigments" function below
|
|
395
393
|
|
|
@@ -407,32 +405,32 @@ export class FlowContainerComponent extends FlowContainerBaseComponent implement
|
|
|
407
405
|
const caseActions = localPConn.getValue(CASE_CONSTS.CASE_INFO_ACTIONS);
|
|
408
406
|
*/
|
|
409
407
|
|
|
410
|
-
|
|
408
|
+
const todoAssignments = getToDoAssignments(this.pConn$);
|
|
411
409
|
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
410
|
+
if (todoAssignments && todoAssignments.length > 0) {
|
|
411
|
+
this.todo_caseInfoID$ = this.pConn$.getValue(CASE_CONSTS.CASE_INFO_ID);
|
|
412
|
+
this.todo_datasource$ = { source: todoAssignments };
|
|
413
|
+
}
|
|
416
414
|
|
|
417
|
-
|
|
418
|
-
|
|
415
|
+
/* remove this commented out code when update React/WC */
|
|
416
|
+
// let kid = this.pConn$.getChildren()[0];
|
|
419
417
|
|
|
420
|
-
|
|
421
|
-
|
|
418
|
+
// kid.getPConnect() can be a Reference component. So normalize it just in case
|
|
419
|
+
// let todoKid = kid.getPConnect().getChildren()[0];
|
|
422
420
|
|
|
423
|
-
|
|
421
|
+
// this.todo_pConn$ = todoKid.getPConnect();
|
|
424
422
|
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
423
|
+
/* code change here to note for React/WC */
|
|
424
|
+
// todo now needs pConn to open the work item on click "go"
|
|
425
|
+
this.todo_pConn$ = this.pConn$;
|
|
428
426
|
|
|
429
|
-
|
|
430
|
-
|
|
427
|
+
// still needs the context of the original work item
|
|
428
|
+
this.todo_context$ = localPConn.getContextName();
|
|
431
429
|
|
|
432
|
-
|
|
430
|
+
this.todo_showTodo$ = true;
|
|
433
431
|
|
|
434
|
-
|
|
435
|
-
|
|
432
|
+
this.psService.sendMessage(false);
|
|
433
|
+
this.cdRef.markForCheck();
|
|
436
434
|
});
|
|
437
435
|
}
|
|
438
436
|
|
|
@@ -537,24 +535,19 @@ export class FlowContainerComponent extends FlowContainerBaseComponent implement
|
|
|
537
535
|
const normalizedConfigObjectAsPConnect = normalizedConfigObject.getComponent();
|
|
538
536
|
|
|
539
537
|
// makes sure Angular tracks these changes
|
|
540
|
-
this.
|
|
541
|
-
|
|
542
|
-
// what comes back now in configObject is the children of the flowContainer
|
|
538
|
+
this.buildName$ = this.getBuildName();
|
|
539
|
+
// what comes back now in configObject is the children of the flowContainer
|
|
543
540
|
|
|
544
|
-
|
|
545
|
-
|
|
541
|
+
this.arChildren$ = [];
|
|
542
|
+
this.arChildren$.push(normalizedConfigObjectAsPConnect);
|
|
546
543
|
|
|
547
|
-
|
|
544
|
+
this.psService.sendMessage(false);
|
|
548
545
|
|
|
549
|
-
|
|
550
|
-
|
|
546
|
+
const oWorkItem = configObject.getPConnect();
|
|
547
|
+
const oWorkData: any = oWorkItem.getDataObject();
|
|
551
548
|
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
undefined,
|
|
555
|
-
this.localeReference
|
|
556
|
-
);
|
|
557
|
-
});
|
|
549
|
+
this.containerName$ = this.localizedVal(this.getActiveViewLabel() || oWorkData.caseInfo.assignments?.[0]?.name, undefined, this.localeReference);
|
|
550
|
+
this.cdRef.markForCheck();
|
|
558
551
|
}
|
|
559
552
|
|
|
560
553
|
getBuildName(): string {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, OnInit, Input, Output, EventEmitter,
|
|
1
|
+
import { ChangeDetectorRef, Component, OnInit, Input, Output, EventEmitter, forwardRef, OnDestroy } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { FormBuilder, FormGroup } from '@angular/forms';
|
|
4
4
|
import isEqual from 'fast-deep-equal';
|
|
@@ -59,7 +59,7 @@ export class ModalViewContainerComponent implements OnInit, OnDestroy {
|
|
|
59
59
|
|
|
60
60
|
constructor(
|
|
61
61
|
private angularPConnect: AngularPConnectService,
|
|
62
|
-
private
|
|
62
|
+
private cdRef: ChangeDetectorRef,
|
|
63
63
|
private psService: ProgressSpinnerService,
|
|
64
64
|
private fb: FormBuilder
|
|
65
65
|
) {
|
|
@@ -214,46 +214,45 @@ export class ModalViewContainerComponent implements OnInit, OnDestroy {
|
|
|
214
214
|
if (newComp && caseInfo && this.compareCaseInfoIsDifferent(caseInfo)) {
|
|
215
215
|
this.psService.sendMessage(false);
|
|
216
216
|
|
|
217
|
-
this.
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
this.
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
}
|
|
217
|
+
this.createdViewPConn$ = newComp;
|
|
218
|
+
const newConfigProps = newComp.getConfigProps();
|
|
219
|
+
this.templateName$ = 'template' in newConfigProps ? (newConfigProps.template as string) : '';
|
|
220
|
+
|
|
221
|
+
const { actionName } = latestItem;
|
|
222
|
+
const theNewCaseInfo = newComp.getCaseInfo();
|
|
223
|
+
// const caseName = theNewCaseInfo.getName();
|
|
224
|
+
const ID = theNewCaseInfo.getBusinessID() || theNewCaseInfo.getID();
|
|
225
|
+
|
|
226
|
+
const caseTypeName = theNewCaseInfo.getCaseTypeName();
|
|
227
|
+
const isDataObject = routingInfo.items[latestItem.context].resourceType === PCore.getConstants().RESOURCE_TYPES.DATA;
|
|
228
|
+
const dataObjectAction = routingInfo.items[latestItem.context].resourceStatus;
|
|
229
|
+
this.isMultiRecord = routingInfo.items[latestItem.context].isMultiRecordData;
|
|
230
|
+
this.context$ = latestItem.context;
|
|
231
|
+
this.title$ =
|
|
232
|
+
isDataObject || this.isMultiRecord
|
|
233
|
+
? this.getModalHeading(dataObjectAction)
|
|
234
|
+
: this.determineModalHeaderByAction(actionName, caseTypeName, ID, this.createdViewPConn$?.getCaseLocaleReference());
|
|
235
|
+
|
|
236
|
+
const bIsRefComponent = this.checkIfRefComponent(newComp);
|
|
237
|
+
|
|
238
|
+
if (bIsRefComponent) {
|
|
239
|
+
this.arChildren$ = [newComp.getComponent()];
|
|
240
|
+
} else {
|
|
241
|
+
// update children with new view's children
|
|
242
|
+
this.arChildren$ = newComp.getChildren();
|
|
243
|
+
}
|
|
245
244
|
|
|
246
|
-
|
|
245
|
+
this.bShowModal$ = true;
|
|
247
246
|
|
|
248
|
-
|
|
249
|
-
|
|
247
|
+
// for when non modal
|
|
248
|
+
this.modalVisibleChange.emit(this.bShowModal$);
|
|
250
249
|
|
|
251
|
-
|
|
252
|
-
|
|
250
|
+
// save off itemKey to be used for finishAssignment, etc.
|
|
251
|
+
this.itemKey$ = key;
|
|
253
252
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
253
|
+
// cause a change for assignment
|
|
254
|
+
this.updateToken$ = new Date().getTime();
|
|
255
|
+
this.cdRef.markForCheck();
|
|
257
256
|
}
|
|
258
257
|
}
|
|
259
258
|
|
|
@@ -263,14 +262,13 @@ export class ModalViewContainerComponent implements OnInit, OnDestroy {
|
|
|
263
262
|
// should put here
|
|
264
263
|
}
|
|
265
264
|
|
|
266
|
-
this.
|
|
267
|
-
this.bShowModal$ = false;
|
|
265
|
+
this.bShowModal$ = false;
|
|
268
266
|
|
|
269
|
-
|
|
270
|
-
|
|
267
|
+
// for when non modal
|
|
268
|
+
this.modalVisibleChange.emit(this.bShowModal$);
|
|
271
269
|
|
|
272
|
-
|
|
273
|
-
|
|
270
|
+
this.oCaseInfo = {};
|
|
271
|
+
this.cdRef.markForCheck();
|
|
274
272
|
}
|
|
275
273
|
|
|
276
274
|
getConfigObject(item, pConnect, isReverseCoexistence = false) {
|
|
@@ -331,10 +329,9 @@ export class ModalViewContainerComponent implements OnInit, OnDestroy {
|
|
|
331
329
|
*/
|
|
332
330
|
if (latestItem && isModalAction && !this.actionsDialog) {
|
|
333
331
|
const configObject = this.getConfigObject(latestItem, this.pConn$);
|
|
334
|
-
this.
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
});
|
|
332
|
+
this.cancelPConn$ = configObject?.getPConnect();
|
|
333
|
+
this.bShowCancelAlert$ = true;
|
|
334
|
+
this.cdRef.markForCheck();
|
|
338
335
|
}
|
|
339
336
|
}
|
|
340
337
|
|
|
@@ -398,13 +395,12 @@ export class ModalViewContainerComponent implements OnInit, OnDestroy {
|
|
|
398
395
|
|
|
399
396
|
closeActionsDialog = () => {
|
|
400
397
|
this.actionsDialog = true;
|
|
401
|
-
// this.ngZone.run(() => {
|
|
402
398
|
this.bShowModal$ = false;
|
|
403
399
|
|
|
404
400
|
// for when non modal
|
|
405
401
|
this.modalVisibleChange.emit(this.bShowModal$);
|
|
406
402
|
|
|
407
403
|
this.oCaseInfo = {};
|
|
408
|
-
|
|
404
|
+
this.cdRef.markForCheck();
|
|
409
405
|
};
|
|
410
406
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, OnInit, Input,
|
|
1
|
+
import { ChangeDetectorRef, Component, OnInit, Input, forwardRef, OnDestroy } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { FormGroup } from '@angular/forms';
|
|
4
4
|
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
@@ -56,7 +56,7 @@ export class ViewContainerComponent implements OnInit, OnDestroy {
|
|
|
56
56
|
constructor(
|
|
57
57
|
private angularPConnect: AngularPConnectService,
|
|
58
58
|
private psService: ProgressSpinnerService,
|
|
59
|
-
private
|
|
59
|
+
private cdRef: ChangeDetectorRef
|
|
60
60
|
) {}
|
|
61
61
|
|
|
62
62
|
ngOnInit() {
|
|
@@ -201,23 +201,22 @@ export class ViewContainerComponent implements OnInit, OnDestroy {
|
|
|
201
201
|
// ViewContainer HTML template to guide what's rendered similar to what
|
|
202
202
|
// the Nebula/Constellation return of React.Fragment does
|
|
203
203
|
|
|
204
|
-
|
|
205
|
-
if
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
this.viewPConn$ = newComp;
|
|
204
|
+
if (newComp.getComponentName() === 'reference') {
|
|
205
|
+
// if a refernece, it will de reference to a "view"
|
|
206
|
+
// so hand this off to the "View" component to do that
|
|
207
|
+
this.isViewContainer$ = false;
|
|
208
|
+
this.viewPConn$ = newComp;
|
|
210
209
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
210
|
+
/*
|
|
211
|
+
*** this commmented out code should be removed, once we test out that
|
|
212
|
+
*** handing off refernce to View component always works
|
|
213
|
+
*/
|
|
215
214
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
215
|
+
// When newComp is a reference, we want to de-reference
|
|
216
|
+
// it (to get the View) and then use that View to get the
|
|
217
|
+
// template, title, children, etc.
|
|
219
218
|
|
|
220
|
-
|
|
219
|
+
/*
|
|
221
220
|
|
|
222
221
|
const theDereferencedView = newComp;
|
|
223
222
|
const newConfigProps = theDereferencedView.getConfigProps();
|
|
@@ -230,20 +229,20 @@ export class ViewContainerComponent implements OnInit, OnDestroy {
|
|
|
230
229
|
this.arChildren$ = theDereferencedViewChildren;
|
|
231
230
|
this.createdViewPConn$ = theDereferencedView;
|
|
232
231
|
*/
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
232
|
+
} else {
|
|
233
|
+
// old style when newComp is NOT a 'reference'
|
|
234
|
+
this.isViewContainer$ = true;
|
|
235
|
+
|
|
236
|
+
console.error(`ViewContainer has a newComp that is NOT a reference!`);
|
|
237
|
+
|
|
238
|
+
this.createdViewPConn$ = newComp;
|
|
239
|
+
const newConfigProps = newComp.getConfigProps();
|
|
240
|
+
this.templateName$ = newConfigProps.template || '';
|
|
241
|
+
this.title$ = newConfigProps.title || '';
|
|
242
|
+
// update children with new view's children
|
|
243
|
+
this.arChildren$ = newComp.getChildren();
|
|
244
|
+
}
|
|
245
|
+
this.cdRef.markForCheck();
|
|
247
246
|
}
|
|
248
247
|
}
|
|
249
248
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, OnInit, Input, forwardRef, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';
|
|
1
|
+
import { Component, OnInit, Input, forwardRef, OnDestroy, OnChanges, SimpleChanges, ChangeDetectorRef } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { publicConstants } from '@pega/pcore-pconnect-typedefs/constants';
|
|
4
4
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
@@ -35,7 +35,10 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
35
35
|
PAGE: any;
|
|
36
36
|
DATA: any;
|
|
37
37
|
lastUpdateCaseTime;
|
|
38
|
-
constructor(
|
|
38
|
+
constructor(
|
|
39
|
+
private angularPConnect: AngularPConnectService,
|
|
40
|
+
private cdRef: ChangeDetectorRef
|
|
41
|
+
) {
|
|
39
42
|
this.constants = PCore.getConstants();
|
|
40
43
|
}
|
|
41
44
|
|
|
@@ -132,7 +135,7 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
132
135
|
PCore.getDeferLoadManager().stop(this.deferLoadId, this.pConn$.getContextName());
|
|
133
136
|
}
|
|
134
137
|
}
|
|
135
|
-
|
|
138
|
+
this.cdRef.detectChanges();
|
|
136
139
|
}
|
|
137
140
|
|
|
138
141
|
loadActiveTab() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, OnInit, Input, ChangeDetectorRef,
|
|
1
|
+
import { Component, OnInit, Input, ChangeDetectorRef, OnDestroy } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { MatMenuModule } from '@angular/material/menu';
|
|
4
4
|
import { MatListModule } from '@angular/material/list';
|
|
@@ -53,7 +53,6 @@ export class NavbarComponent implements OnInit, OnDestroy {
|
|
|
53
53
|
private angularPConnect: AngularPConnectService,
|
|
54
54
|
private chRef: ChangeDetectorRef,
|
|
55
55
|
private psService: ProgressSpinnerService,
|
|
56
|
-
private ngZone: NgZone,
|
|
57
56
|
private utils: Utils
|
|
58
57
|
) {}
|
|
59
58
|
|
|
@@ -104,40 +103,39 @@ export class NavbarComponent implements OnInit, OnDestroy {
|
|
|
104
103
|
}
|
|
105
104
|
|
|
106
105
|
initComponent() {
|
|
107
|
-
this.
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
page.iconName = this.utils.getImageSrc(page.pxPageViewIcon, this.utils.getSDKStaticContentUrl());
|
|
125
|
-
});
|
|
126
|
-
this.actionsAPI = this.pConn$.getActionsApi();
|
|
127
|
-
this.createWork = this.actionsAPI.createWork.bind(this.actionsAPI);
|
|
128
|
-
this.showPage = this.actionsAPI.showPage.bind(this.actionsAPI);
|
|
129
|
-
this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as NavBarProps;
|
|
130
|
-
this.logout = this.actionsAPI.logout.bind(this.actionsAPI);
|
|
131
|
-
|
|
132
|
-
// const oData = this.pConn$.getDataObject();
|
|
133
|
-
|
|
134
|
-
this.portalLogoImage$ = this.utils.getSDKStaticContentUrl().concat('assets/pzpega-logo-mark.svg');
|
|
135
|
-
this.portalOperator$ = PCore.getEnvironmentInfo().getOperatorName();
|
|
136
|
-
this.portalOperatorInitials$ = this.utils.getInitials(this.portalOperator$ ?? '');
|
|
137
|
-
this.showAppName$ = this.configProps$.showAppName;
|
|
138
|
-
|
|
139
|
-
this.portalApp$ = PCore.getEnvironmentInfo().getApplicationLabel();
|
|
106
|
+
this.navIcon$ = this.utils.getSDKStaticContentUrl().concat('assets/pzpega-logo-mark.svg');
|
|
107
|
+
this.navExpandCollapse$ = this.utils.getImageSrc('plus', this.utils.getSDKStaticContentUrl());
|
|
108
|
+
|
|
109
|
+
// Then, continue on with other initialization
|
|
110
|
+
|
|
111
|
+
// making a copy, so can add info
|
|
112
|
+
this.navPages$ = JSON.parse(JSON.stringify(this.pages$));
|
|
113
|
+
// @ts-ignore
|
|
114
|
+
const localeReference = PCore.getLocaleUtils().getPortalLocaleReference() || this.pConn$.getValue('.pyLocaleReference');
|
|
115
|
+
this.navPages$.forEach(page => {
|
|
116
|
+
const destinationObject: any = {};
|
|
117
|
+
this.pConn$.resolveConfigProps(
|
|
118
|
+
{ defaultHeading: page.pyDefaultHeading || page.pyLabel, localeReference: page.pyLocalizationReference },
|
|
119
|
+
destinationObject
|
|
120
|
+
);
|
|
121
|
+
page.name = this.localeUtils.getLocaleValue(destinationObject.defaultHeading, '', destinationObject.localeReference || localeReference);
|
|
122
|
+
page.iconName = this.utils.getImageSrc(page.pxPageViewIcon, this.utils.getSDKStaticContentUrl());
|
|
140
123
|
});
|
|
124
|
+
this.actionsAPI = this.pConn$.getActionsApi();
|
|
125
|
+
this.createWork = this.actionsAPI.createWork.bind(this.actionsAPI);
|
|
126
|
+
this.showPage = this.actionsAPI.showPage.bind(this.actionsAPI);
|
|
127
|
+
this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as NavBarProps;
|
|
128
|
+
this.logout = this.actionsAPI.logout.bind(this.actionsAPI);
|
|
129
|
+
|
|
130
|
+
// const oData = this.pConn$.getDataObject();
|
|
131
|
+
|
|
132
|
+
this.portalLogoImage$ = this.utils.getSDKStaticContentUrl().concat('assets/pzpega-logo-mark.svg');
|
|
133
|
+
this.portalOperator$ = PCore.getEnvironmentInfo().getOperatorName();
|
|
134
|
+
this.portalOperatorInitials$ = this.utils.getInitials(this.portalOperator$ ?? '');
|
|
135
|
+
this.showAppName$ = this.configProps$.showAppName;
|
|
136
|
+
|
|
137
|
+
this.portalApp$ = PCore.getEnvironmentInfo().getApplicationLabel();
|
|
138
|
+
this.chRef.markForCheck();
|
|
141
139
|
}
|
|
142
140
|
|
|
143
141
|
navPanelButtonClick(oPageData: any) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, OnInit, Input,
|
|
1
|
+
import { ChangeDetectorRef, Component, OnInit, Input, forwardRef, OnDestroy, inject } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
4
4
|
import { interval, Subscription } from 'rxjs';
|
|
@@ -56,7 +56,7 @@ export class RootContainerComponent implements OnInit, OnDestroy {
|
|
|
56
56
|
constructor(
|
|
57
57
|
private angularPConnect: AngularPConnectService,
|
|
58
58
|
private psService: ProgressSpinnerService,
|
|
59
|
-
private
|
|
59
|
+
private cdRef: ChangeDetectorRef
|
|
60
60
|
) {}
|
|
61
61
|
|
|
62
62
|
ngOnInit(): void {
|
|
@@ -137,18 +137,16 @@ export class RootContainerComponent implements OnInit, OnDestroy {
|
|
|
137
137
|
});
|
|
138
138
|
|
|
139
139
|
setTimeout(() => {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
console.log(`RootContainer updated pConn$ to be: ${this.componentName$}`);
|
|
151
|
-
});
|
|
140
|
+
const theNewPConn = rootObject.getPConnect();
|
|
141
|
+
// update ComponentName$ before we update pConn$ to make sure they're in sync
|
|
142
|
+
// when rendering...
|
|
143
|
+
this.componentName$ = theNewPConn.getComponentName();
|
|
144
|
+
|
|
145
|
+
this.pConn$ = theNewPConn;
|
|
146
|
+
// this.pConn$ = rootObject.getPConnect();
|
|
147
|
+
|
|
148
|
+
console.log(`RootContainer updated pConn$ to be: ${this.componentName$}`);
|
|
149
|
+
this.cdRef.markForCheck();
|
|
152
150
|
});
|
|
153
151
|
}
|
|
154
152
|
}
|
|
@@ -187,24 +185,23 @@ export class RootContainerComponent implements OnInit, OnDestroy {
|
|
|
187
185
|
if (arChildren && arChildren.length == 1) {
|
|
188
186
|
// have to have a quick timeout or get an "expressions changed" angular error
|
|
189
187
|
setTimeout(() => {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
});
|
|
188
|
+
const localPConn = arChildren[0].getPConnect();
|
|
189
|
+
|
|
190
|
+
this.componentName$ = localPConn.getComponentName();
|
|
191
|
+
if (this.componentName$ === 'ViewContainer') {
|
|
192
|
+
const configProps = this.pConn$.getConfigProps();
|
|
193
|
+
const viewContConfig = {
|
|
194
|
+
meta: {
|
|
195
|
+
type: 'ViewContainer',
|
|
196
|
+
config: configProps
|
|
197
|
+
},
|
|
198
|
+
options
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
this.viewContainerPConn$ = PCore.createPConnect(viewContConfig).getPConnect();
|
|
202
|
+
}
|
|
203
|
+
this.bShowRoot$ = true;
|
|
204
|
+
this.cdRef.markForCheck();
|
|
208
205
|
});
|
|
209
206
|
}
|
|
210
207
|
}
|
|
@@ -222,9 +219,8 @@ export class RootContainerComponent implements OnInit, OnDestroy {
|
|
|
222
219
|
console.log(ex);
|
|
223
220
|
}
|
|
224
221
|
|
|
225
|
-
this.
|
|
226
|
-
|
|
227
|
-
});
|
|
222
|
+
this.bIsProgress$ = true;
|
|
223
|
+
this.cdRef.markForCheck();
|
|
228
224
|
});
|
|
229
225
|
}
|
|
230
226
|
}
|
|
@@ -236,9 +232,8 @@ export class RootContainerComponent implements OnInit, OnDestroy {
|
|
|
236
232
|
// don't touch bIsProgress$ unless differnent
|
|
237
233
|
if (bShow != this.bIsProgress$) {
|
|
238
234
|
// makes sure Angular tracks these changes
|
|
239
|
-
this.
|
|
240
|
-
|
|
241
|
-
});
|
|
235
|
+
this.bIsProgress$ = bShow;
|
|
236
|
+
this.cdRef.markForCheck();
|
|
242
237
|
}
|
|
243
238
|
}
|
|
244
239
|
}
|
|
@@ -3,10 +3,22 @@ import { CommonModule } from '@angular/common';
|
|
|
3
3
|
import { FormGroup } from '@angular/forms';
|
|
4
4
|
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
5
5
|
import { Utils } from '@pega/angular-sdk-components';
|
|
6
|
-
import { getAllFields } from '@pega/angular-sdk-components';
|
|
7
6
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
8
7
|
|
|
9
|
-
const NO_HEADER_TEMPLATES = [
|
|
8
|
+
const NO_HEADER_TEMPLATES = [
|
|
9
|
+
'SubTabs',
|
|
10
|
+
'SimpleTable',
|
|
11
|
+
'Details',
|
|
12
|
+
'DetailsTwoColumn',
|
|
13
|
+
'DetailsThreeColumn',
|
|
14
|
+
'NarrowWideDetails',
|
|
15
|
+
'WideNarrowDetails',
|
|
16
|
+
'Confirmation',
|
|
17
|
+
'DynamicTabs',
|
|
18
|
+
'DetailsSubTabs',
|
|
19
|
+
'ListView'
|
|
20
|
+
];
|
|
21
|
+
|
|
10
22
|
const DETAILS_TEMPLATES = [
|
|
11
23
|
'Details',
|
|
12
24
|
'DetailsFields',
|
|
@@ -157,7 +169,7 @@ export class ViewComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
157
169
|
this.showLabel$ =
|
|
158
170
|
this.inheritedProps$.showLabel !== undefined
|
|
159
171
|
? this.inheritedProps$.showLabel
|
|
160
|
-
: this.configProps$.showLabel
|
|
172
|
+
: (this.configProps$.showLabel ?? isDetailsTemplate(this.templateName$));
|
|
161
173
|
this.arChildren$ = this.pConn$.getChildren();
|
|
162
174
|
this.visibility$ = this.configProps$.visibility ?? this.visibility$;
|
|
163
175
|
|
|
@@ -183,39 +195,6 @@ export class ViewComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
183
195
|
// console.log("-->view update: " + this.angularPConnect.getComponentID(this) + ", template: " + this.templateName$ + ", kids: " + kidList);
|
|
184
196
|
}
|
|
185
197
|
|
|
186
|
-
// JA - adapting additionalProps from Nebula/Constellation version which uses static methods
|
|
187
|
-
// on the component classes stored in PComponents (that Angular doesn't have)...
|
|
188
|
-
additionalProps(state: any, getPConnect: any) {
|
|
189
|
-
let propObj = {};
|
|
190
|
-
|
|
191
|
-
// We already have the template name in this.templateName$
|
|
192
|
-
if (this.templateName$ !== '') {
|
|
193
|
-
let allFields = {};
|
|
194
|
-
|
|
195
|
-
// These uses are adapted from Nebula/Constellation CaseSummary.additionalProps
|
|
196
|
-
switch (this.templateName$) {
|
|
197
|
-
case 'CaseSummary':
|
|
198
|
-
allFields = getAllFields(getPConnect);
|
|
199
|
-
// eslint-disable-next-line no-case-declarations
|
|
200
|
-
const unresFields = {
|
|
201
|
-
primaryFields: allFields[0],
|
|
202
|
-
secondaryFields: allFields[1]
|
|
203
|
-
};
|
|
204
|
-
propObj = getPConnect.resolveConfigProps(unresFields);
|
|
205
|
-
break;
|
|
206
|
-
|
|
207
|
-
case 'Details':
|
|
208
|
-
allFields = getAllFields(getPConnect);
|
|
209
|
-
propObj = { fields: allFields[0] };
|
|
210
|
-
break;
|
|
211
|
-
default:
|
|
212
|
-
break;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
return propObj;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
198
|
ngOnDestroy(): void {
|
|
220
199
|
if (this.angularPConnectData.unsubscribeFn) {
|
|
221
200
|
this.angularPConnectData.unsubscribeFn();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, OnInit, Input,
|
|
1
|
+
import { ChangeDetectorRef, Component, OnInit, Input, forwardRef, OnDestroy } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { MatSnackBarModule, MatSnackBar } from '@angular/material/snack-bar';
|
|
4
4
|
import { Subscription } from 'rxjs';
|
|
@@ -59,7 +59,7 @@ export class AppShellComponent implements OnInit, OnDestroy {
|
|
|
59
59
|
private angularPConnect: AngularPConnectService,
|
|
60
60
|
private erService: ErrorMessagesService,
|
|
61
61
|
private snackBar: MatSnackBar,
|
|
62
|
-
private
|
|
62
|
+
private cdRef: ChangeDetectorRef,
|
|
63
63
|
private utils: Utils
|
|
64
64
|
) {}
|
|
65
65
|
|
|
@@ -152,17 +152,15 @@ export class AppShellComponent implements OnInit, OnDestroy {
|
|
|
152
152
|
const portalClass = this.pConn$.getValue('.classID', ''); // 2nd arg empty string until typedef marked correctly
|
|
153
153
|
const envPortalName = envInfo.getPortalName();
|
|
154
154
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
this.pages$ = this.configProps$.pages;
|
|
155
|
+
// making a copy, so can add info
|
|
156
|
+
this.pages$ = this.configProps$.pages;
|
|
158
157
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
158
|
+
if (this.pages$) {
|
|
159
|
+
this.bShowAppShell$ = true;
|
|
160
|
+
}
|
|
162
161
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
});
|
|
162
|
+
this.caseTypes$ = this.configProps$.caseTypes;
|
|
163
|
+
this.arChildren$ = this.pConn$.getChildren();
|
|
166
164
|
|
|
167
165
|
const portalLogo = this.configProps$.portalLogo;
|
|
168
166
|
// using the default icon then fetch it from the static folder (not auth involved)
|
|
@@ -181,12 +179,14 @@ export class AppShellComponent implements OnInit, OnDestroy {
|
|
|
181
179
|
.getSvcImageUrl(portalLogo)
|
|
182
180
|
.then(data => {
|
|
183
181
|
this.imageURL = data;
|
|
182
|
+
this.cdRef.markForCheck();
|
|
184
183
|
})
|
|
185
184
|
.catch(() => {
|
|
186
185
|
console.error(`${this.localizedVal('Unable to load the image for the portal logo/icon with the insName', 'AppShell')}:${portalLogo}`);
|
|
187
186
|
});
|
|
188
187
|
}
|
|
189
188
|
this.appName$ = this.localizedVal(appNameToDisplay || '', '', `${portalClass}!PORTAL!${envPortalName}`.toUpperCase());
|
|
189
|
+
this.cdRef.markForCheck();
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
// fpr show/hiding error messages in the SnackBar component
|
|
@@ -244,5 +244,6 @@ export class AppShellComponent implements OnInit, OnDestroy {
|
|
|
244
244
|
default:
|
|
245
245
|
break;
|
|
246
246
|
}
|
|
247
|
+
this.cdRef.markForCheck();
|
|
247
248
|
}
|
|
248
249
|
}
|
|
@@ -10,6 +10,7 @@ export class DetailsTemplateBase implements OnInit, OnDestroy {
|
|
|
10
10
|
// For interaction with AngularPConnect
|
|
11
11
|
protected angularPConnectData: AngularPConnectData = {};
|
|
12
12
|
protected angularPConnect;
|
|
13
|
+
propsToUse: any = {};
|
|
13
14
|
|
|
14
15
|
childrenMetadataOld;
|
|
15
16
|
|
|
@@ -67,6 +68,11 @@ export class DetailsTemplateBase implements OnInit, OnDestroy {
|
|
|
67
68
|
});
|
|
68
69
|
}
|
|
69
70
|
|
|
71
|
+
updateDetailsProps() {
|
|
72
|
+
const { label, showLabel } = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps());
|
|
73
|
+
this.propsToUse = { label, showLabel, ...this.pConn$.getInheritedProps() };
|
|
74
|
+
}
|
|
75
|
+
|
|
70
76
|
processDetailFields(kid: any): any[] {
|
|
71
77
|
const pKid = kid.getPConnect();
|
|
72
78
|
const fields = pKid.getChildren();
|
|
@@ -100,9 +106,12 @@ export class DetailsTemplateBase implements OnInit, OnDestroy {
|
|
|
100
106
|
pConn: theViewCont?.getPConnect()
|
|
101
107
|
});
|
|
102
108
|
} else {
|
|
109
|
+
thePConn.setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
110
|
+
thePConn.setInheritedProp('readOnly', true);
|
|
103
111
|
processedFields.push({
|
|
104
112
|
type: theCompType,
|
|
105
|
-
config: thePConn.getConfigProps()
|
|
113
|
+
config: thePConn.getConfigProps(),
|
|
114
|
+
pConn: thePConn
|
|
106
115
|
});
|
|
107
116
|
}
|
|
108
117
|
});
|
|
@@ -3,6 +3,7 @@ import { FormGroup } from '@angular/forms';
|
|
|
3
3
|
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
4
4
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
5
5
|
import { Utils } from '@pega/angular-sdk-components';
|
|
6
|
+
import { getAllFields } from '@pega/angular-sdk-components';
|
|
6
7
|
|
|
7
8
|
interface CaseSummaryProps {
|
|
8
9
|
// If any, enter additional props that only exist on this component
|
|
@@ -73,7 +74,20 @@ export class CaseSummaryComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
73
74
|
}
|
|
74
75
|
|
|
75
76
|
updateSelf() {
|
|
77
|
+
this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as CaseSummaryProps;
|
|
76
78
|
this.generatePrimaryAndSecondaryFields();
|
|
79
|
+
this.status$ = this.configProps$.status;
|
|
80
|
+
this.bShowStatus$ = this.configProps$.showStatus;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
additionalProps() {
|
|
84
|
+
const allFields = getAllFields(this.pConn$);
|
|
85
|
+
const fields = {
|
|
86
|
+
primaryFields: allFields[0],
|
|
87
|
+
secondaryFields: allFields[1]
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
return this.pConn$.resolveConfigProps(fields);
|
|
77
91
|
}
|
|
78
92
|
|
|
79
93
|
ngOnChanges() {
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
<component-mapper
|
|
2
|
+
name="FieldGroup"
|
|
3
|
+
[props]="{ name: propsToUse.showLabel ? propsToUse.label : '', childrenTemplate: detailsContent }"
|
|
4
|
+
></component-mapper>
|
|
5
|
+
|
|
6
|
+
<ng-template #detailsContent>
|
|
7
|
+
<component-mapper
|
|
8
|
+
name="MaterialDetails"
|
|
9
|
+
[props]="{ arFields$: arFields$, arHighlightedFields: highlightedDataArr, layout: 'one-column' }"
|
|
10
|
+
></component-mapper>
|
|
11
|
+
</ng-template>
|
|
@@ -16,6 +16,7 @@ export class DetailsComponent extends DetailsTemplateBase {
|
|
|
16
16
|
arFields$: any[] = [];
|
|
17
17
|
|
|
18
18
|
override updateSelf() {
|
|
19
|
+
this.updateDetailsProps();
|
|
19
20
|
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
20
21
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
21
22
|
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
<component-mapper
|
|
2
|
-
name="
|
|
3
|
-
[props]="{
|
|
2
|
+
name="FieldGroup"
|
|
3
|
+
[props]="{ name: propsToUse.showLabel ? propsToUse.label : '', childrenTemplate: detailsContent }"
|
|
4
4
|
></component-mapper>
|
|
5
|
+
|
|
6
|
+
<ng-template #detailsContent>
|
|
7
|
+
<component-mapper
|
|
8
|
+
name="MaterialDetails"
|
|
9
|
+
[props]="{ arFields$: arFields$, arFields2$: arFields2$, arHighlightedFields: highlightedDataArr, layout: 'narrow-wide' }"
|
|
10
|
+
></component-mapper>
|
|
11
|
+
</ng-template>
|
|
@@ -17,6 +17,7 @@ export class DetailsNarrowWideComponent extends DetailsTemplateBase {
|
|
|
17
17
|
showHighlightedData: boolean;
|
|
18
18
|
|
|
19
19
|
override updateSelf() {
|
|
20
|
+
this.updateDetailsProps();
|
|
20
21
|
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
21
22
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
22
23
|
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
<component-mapper
|
|
1
|
+
<component-mapper
|
|
2
|
+
name="FieldGroup"
|
|
3
|
+
[props]="{ name: propsToUse.showLabel ? propsToUse.label : '', childrenTemplate: detailsContent }"
|
|
4
|
+
></component-mapper>
|
|
5
|
+
|
|
6
|
+
<ng-template #detailsContent>
|
|
7
|
+
<component-mapper
|
|
8
|
+
name="MaterialDetails"
|
|
9
|
+
[props]="{ arFields$: arFields$, arHighlightedFields: highlightedDataArr, layout: 'one-column' }"
|
|
10
|
+
></component-mapper>
|
|
11
|
+
</ng-template>
|
|
@@ -17,6 +17,7 @@ export class DetailsOneColumnComponent extends DetailsTemplateBase {
|
|
|
17
17
|
arFields$: any[] = [];
|
|
18
18
|
|
|
19
19
|
override updateSelf() {
|
|
20
|
+
this.updateDetailsProps();
|
|
20
21
|
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
21
22
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
22
23
|
|
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
<component-mapper
|
|
2
|
-
name="
|
|
3
|
-
[props]="{
|
|
2
|
+
name="FieldGroup"
|
|
3
|
+
[props]="{ name: propsToUse.showLabel ? propsToUse.label : '', childrenTemplate: detailsContent }"
|
|
4
4
|
></component-mapper>
|
|
5
|
+
|
|
6
|
+
<ng-template #detailsContent>
|
|
7
|
+
<component-mapper
|
|
8
|
+
name="MaterialDetails"
|
|
9
|
+
[props]="{
|
|
10
|
+
arFields$: arFields$,
|
|
11
|
+
arFields2$: arFields2$,
|
|
12
|
+
arFields3$: arFields3$,
|
|
13
|
+
arHighlightedFields: highlightedDataArr,
|
|
14
|
+
layout: 'three-column'
|
|
15
|
+
}"
|
|
16
|
+
></component-mapper>
|
|
17
|
+
</ng-template>
|
|
@@ -18,9 +18,8 @@ export class DetailsThreeColumnComponent extends DetailsTemplateBase {
|
|
|
18
18
|
arFields2$: any[] = [];
|
|
19
19
|
arFields3$: any[] = [];
|
|
20
20
|
|
|
21
|
-
propsToUse: any = {};
|
|
22
|
-
|
|
23
21
|
override updateSelf() {
|
|
22
|
+
this.updateDetailsProps();
|
|
24
23
|
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
25
24
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
26
25
|
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
<component-mapper
|
|
2
|
-
name="
|
|
3
|
-
[props]="{
|
|
2
|
+
name="FieldGroup"
|
|
3
|
+
[props]="{ name: propsToUse.showLabel ? propsToUse.label : '', childrenTemplate: detailsContent }"
|
|
4
4
|
></component-mapper>
|
|
5
|
+
|
|
6
|
+
<ng-template #detailsContent>
|
|
7
|
+
<component-mapper
|
|
8
|
+
name="MaterialDetails"
|
|
9
|
+
[props]="{ arFields$: arFields$, arFields2$: arFields2$, arHighlightedFields: highlightedDataArr, layout: 'two-column' }"
|
|
10
|
+
></component-mapper>
|
|
11
|
+
</ng-template>
|
|
@@ -18,9 +18,8 @@ export class DetailsTwoColumnComponent extends DetailsTemplateBase {
|
|
|
18
18
|
arFields2$: any[] = [];
|
|
19
19
|
arFields3$: any[] = [];
|
|
20
20
|
|
|
21
|
-
propsToUse: any = {};
|
|
22
|
-
|
|
23
21
|
override updateSelf() {
|
|
22
|
+
this.updateDetailsProps();
|
|
24
23
|
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
25
24
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
26
25
|
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
<component-mapper
|
|
2
|
-
name="
|
|
3
|
-
[props]="{
|
|
2
|
+
name="FieldGroup"
|
|
3
|
+
[props]="{ name: propsToUse.showLabel ? propsToUse.label : '', childrenTemplate: detailsContent }"
|
|
4
4
|
></component-mapper>
|
|
5
|
+
|
|
6
|
+
<ng-template #detailsContent>
|
|
7
|
+
<component-mapper
|
|
8
|
+
name="MaterialDetails"
|
|
9
|
+
[props]="{ arFields$: arFields$, arFields2$: arFields2$, arHighlightedFields: highlightedDataArr, layout: 'wide-narrow' }"
|
|
10
|
+
></component-mapper>
|
|
11
|
+
</ng-template>
|
|
@@ -15,9 +15,8 @@ export class DetailsWideNarrowComponent extends DetailsTemplateBase {
|
|
|
15
15
|
showHighlightedData: boolean;
|
|
16
16
|
arFields$: any[] = [];
|
|
17
17
|
arFields2$: any[] = [];
|
|
18
|
-
propsToUse: any = {};
|
|
19
|
-
|
|
20
18
|
override updateSelf() {
|
|
19
|
+
this.updateDetailsProps();
|
|
21
20
|
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
22
21
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
23
22
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeDetectorRef, Component, Input,
|
|
1
|
+
import { ChangeDetectorRef, Component, Input, OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { MatMenuModule } from '@angular/material/menu';
|
|
4
4
|
import { MatListModule } from '@angular/material/list';
|
|
@@ -52,7 +52,6 @@ export class WssNavBarComponent implements OnInit, OnDestroy {
|
|
|
52
52
|
private angularPConnect: AngularPConnectService,
|
|
53
53
|
private cdRef: ChangeDetectorRef,
|
|
54
54
|
private psService: ProgressSpinnerService,
|
|
55
|
-
private ngZone: NgZone,
|
|
56
55
|
private utils: Utils
|
|
57
56
|
) {}
|
|
58
57
|
|
|
@@ -102,30 +101,29 @@ export class WssNavBarComponent implements OnInit, OnDestroy {
|
|
|
102
101
|
}
|
|
103
102
|
|
|
104
103
|
initComponent() {
|
|
105
|
-
this.
|
|
106
|
-
|
|
107
|
-
this.navExpandCollapse$ = this.utils.getImageSrc('plus', this.utils.getSDKStaticContentUrl());
|
|
104
|
+
this.navIcon$ = this.utils.getSDKStaticContentUrl().concat('assets/pzpega-logo-mark.svg');
|
|
105
|
+
this.navExpandCollapse$ = this.utils.getImageSrc('plus', this.utils.getSDKStaticContentUrl());
|
|
108
106
|
|
|
109
|
-
|
|
107
|
+
// Then, continue on with other initialization
|
|
110
108
|
|
|
111
|
-
|
|
112
|
-
|
|
109
|
+
// making a copy, so can add info
|
|
110
|
+
this.navPages$ = JSON.parse(JSON.stringify(this.pages$));
|
|
113
111
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
112
|
+
this.navPages$.forEach(page => {
|
|
113
|
+
page.iconName = this.utils.getImageSrc(page.pxPageViewIcon, this.utils.getSDKStaticContentUrl());
|
|
114
|
+
});
|
|
117
115
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
116
|
+
this.actionsAPI = this.pConn$.getActionsApi();
|
|
117
|
+
this.createWork = this.actionsAPI.createWork.bind(this.actionsAPI);
|
|
118
|
+
this.showPage = this.actionsAPI.showPage.bind(this.actionsAPI);
|
|
119
|
+
this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as WssNavBarProps;
|
|
120
|
+
this.logout = this.actionsAPI.logout.bind(this.actionsAPI);
|
|
123
121
|
|
|
124
|
-
|
|
122
|
+
// const oData = this.pConn$.getDataObject();
|
|
125
123
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
124
|
+
this.portalOperator$ = PCore.getEnvironmentInfo().getOperatorName();
|
|
125
|
+
this.portalOperatorInitials$ = this.utils.getInitials(this.portalOperator$ ?? '');
|
|
126
|
+
this.cdRef.markForCheck();
|
|
129
127
|
}
|
|
130
128
|
|
|
131
129
|
navPanelButtonClick(oPageData: any) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, OnInit, Input, OnDestroy, ViewChild, ElementRef } from '@angular/core';
|
|
1
|
+
import { ChangeDetectorRef, Component, OnInit, Input, OnDestroy, ViewChild, ElementRef } from '@angular/core';
|
|
2
2
|
import { FormGroup } from '@angular/forms';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
import { MatButtonModule } from '@angular/material/button';
|
|
@@ -76,7 +76,8 @@ export class AttachmentComponent implements OnInit, OnDestroy {
|
|
|
76
76
|
|
|
77
77
|
constructor(
|
|
78
78
|
private angularPConnect: AngularPConnectService,
|
|
79
|
-
private utils: Utils
|
|
79
|
+
private utils: Utils,
|
|
80
|
+
private cdRef: ChangeDetectorRef
|
|
80
81
|
) {}
|
|
81
82
|
|
|
82
83
|
ngOnInit(): void {
|
|
@@ -96,6 +97,7 @@ export class AttachmentComponent implements OnInit, OnDestroy {
|
|
|
96
97
|
PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION,
|
|
97
98
|
() => {
|
|
98
99
|
this.overrideLocalState = true;
|
|
100
|
+
this.cdRef.markForCheck();
|
|
99
101
|
},
|
|
100
102
|
this.caseID
|
|
101
103
|
);
|
|
@@ -336,6 +338,7 @@ export class AttachmentComponent implements OnInit, OnDestroy {
|
|
|
336
338
|
}
|
|
337
339
|
return localFile;
|
|
338
340
|
});
|
|
341
|
+
this.cdRef.markForCheck();
|
|
339
342
|
}
|
|
340
343
|
|
|
341
344
|
populateErrorAndUpdateRedux(file) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, OnInit, Input } from '@angular/core';
|
|
1
|
+
import { ChangeDetectorRef, Component, OnInit, Input } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { MatTableDataSource, MatTableModule } from '@angular/material/table';
|
|
4
4
|
import { Utils } from '@pega/angular-sdk-components';
|
|
@@ -23,7 +23,10 @@ export class CaseHistoryComponent implements OnInit {
|
|
|
23
23
|
displayedColumns$ = Array<any>();
|
|
24
24
|
waitingForData = false;
|
|
25
25
|
|
|
26
|
-
constructor(
|
|
26
|
+
constructor(
|
|
27
|
+
private utils: Utils,
|
|
28
|
+
private cdRef: ChangeDetectorRef
|
|
29
|
+
) {}
|
|
27
30
|
|
|
28
31
|
ngOnInit(): void {
|
|
29
32
|
this.configProps$ = this.pConn$.getConfigProps();
|
|
@@ -54,6 +57,7 @@ export class CaseHistoryComponent implements OnInit {
|
|
|
54
57
|
this.repeatList$ = new MatTableDataSource(tableDataResults);
|
|
55
58
|
|
|
56
59
|
this.waitingForData = false;
|
|
60
|
+
this.cdRef.markForCheck();
|
|
57
61
|
});
|
|
58
62
|
}
|
|
59
63
|
// This method isn't being used anywhere, keeping it as a reference for now
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, OnInit, Input,
|
|
1
|
+
import { ChangeDetectorRef, Component, OnInit, Input, forwardRef, OnDestroy } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { MatButtonModule } from '@angular/material/button';
|
|
4
4
|
import { MatInputModule } from '@angular/material/input';
|
|
@@ -74,7 +74,7 @@ export class FileUtilityComponent implements OnInit, OnDestroy {
|
|
|
74
74
|
constructor(
|
|
75
75
|
private angularPConnect: AngularPConnectService,
|
|
76
76
|
private utils: Utils,
|
|
77
|
-
private
|
|
77
|
+
private cdRef: ChangeDetectorRef
|
|
78
78
|
) {}
|
|
79
79
|
|
|
80
80
|
ngOnInit(): void {
|
|
@@ -273,9 +273,8 @@ export class FileUtilityComponent implements OnInit, OnDestroy {
|
|
|
273
273
|
for (let fileIndex = 0; fileIndex < arFileList.length; fileIndex++) {
|
|
274
274
|
if (arFileList[fileIndex].id == itemId) {
|
|
275
275
|
// remove the file from the list and redraw
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
});
|
|
276
|
+
arFileList.splice(fileIndex, 1);
|
|
277
|
+
this.cdRef.markForCheck();
|
|
279
278
|
break;
|
|
280
279
|
}
|
|
281
280
|
}
|
|
@@ -293,9 +292,8 @@ export class FileUtilityComponent implements OnInit, OnDestroy {
|
|
|
293
292
|
// remove the file from the list and redraw
|
|
294
293
|
localLinksList.splice(linkIndex, 1);
|
|
295
294
|
|
|
296
|
-
this.
|
|
297
|
-
|
|
298
|
-
});
|
|
295
|
+
this.arLinksList$ = localLinksList.slice();
|
|
296
|
+
this.cdRef.markForCheck();
|
|
299
297
|
|
|
300
298
|
break;
|
|
301
299
|
}
|
|
@@ -482,24 +480,23 @@ export class FileUtilityComponent implements OnInit, OnDestroy {
|
|
|
482
480
|
oLink.primary.icon = 'open';
|
|
483
481
|
oLink.secondary.text = url;
|
|
484
482
|
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
this.arLinksList$.push(oLink);
|
|
483
|
+
// need to create a new array or summary list won't detect changes
|
|
484
|
+
this.arLinksList$ = localList.slice();
|
|
485
|
+
this.arLinksList$.push(oLink);
|
|
489
486
|
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
487
|
+
// list for actually attachments
|
|
488
|
+
const link: any = {};
|
|
489
|
+
link.id = oLink.id;
|
|
490
|
+
link.linkTitle = this.link_title$;
|
|
491
|
+
link.type = oLink.type;
|
|
492
|
+
link.url = url;
|
|
496
493
|
|
|
497
|
-
|
|
494
|
+
this.arLinks$.push(link);
|
|
498
495
|
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
496
|
+
// clear values
|
|
497
|
+
this.link_title$ = '';
|
|
498
|
+
this.link_url$ = '';
|
|
499
|
+
this.cdRef.markForCheck();
|
|
503
500
|
}
|
|
504
501
|
|
|
505
502
|
_changeTitle(event: any) {
|
|
@@ -575,15 +572,13 @@ export class FileUtilityComponent implements OnInit, OnDestroy {
|
|
|
575
572
|
createModal(modalType: string) {
|
|
576
573
|
switch (modalType) {
|
|
577
574
|
case 'addLocalFile':
|
|
578
|
-
this.
|
|
579
|
-
|
|
580
|
-
});
|
|
575
|
+
this.bShowFileModal$ = true;
|
|
576
|
+
this.cdRef.markForCheck();
|
|
581
577
|
|
|
582
578
|
break;
|
|
583
579
|
case 'addLocalLink':
|
|
584
|
-
this.
|
|
585
|
-
|
|
586
|
-
});
|
|
580
|
+
this.bShowLinkModal$ = true;
|
|
581
|
+
this.cdRef.markForCheck();
|
|
587
582
|
break;
|
|
588
583
|
default:
|
|
589
584
|
break;
|
|
@@ -716,6 +711,7 @@ export class FileUtilityComponent implements OnInit, OnDestroy {
|
|
|
716
711
|
})
|
|
717
712
|
.finally(() => {
|
|
718
713
|
this.lu_bLoading$ = false;
|
|
714
|
+
this.cdRef.markForCheck();
|
|
719
715
|
});
|
|
720
716
|
}
|
|
721
717
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, OnInit, Input, OnDestroy } from '@angular/core';
|
|
1
|
+
import { ChangeDetectorRef, Component, OnInit, Input, OnDestroy } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { MatButtonModule } from '@angular/material/button';
|
|
4
4
|
import { publicConstants } from '@pega/pcore-pconnect-typedefs/constants';
|
|
@@ -97,7 +97,8 @@ export class TodoComponent implements OnInit, OnDestroy {
|
|
|
97
97
|
constructor(
|
|
98
98
|
private psService: ProgressSpinnerService,
|
|
99
99
|
private erService: ErrorMessagesService,
|
|
100
|
-
private utils: Utils
|
|
100
|
+
private utils: Utils,
|
|
101
|
+
private cdRef: ChangeDetectorRef
|
|
101
102
|
) {}
|
|
102
103
|
|
|
103
104
|
ngOnInit() {
|
|
@@ -167,6 +168,7 @@ export class TodoComponent implements OnInit, OnDestroy {
|
|
|
167
168
|
deferLoadWorklistItems(responseData) {
|
|
168
169
|
this.count = responseData.totalCount;
|
|
169
170
|
this.arAssignments$ = responseData.data;
|
|
171
|
+
this.cdRef.markForCheck();
|
|
170
172
|
}
|
|
171
173
|
|
|
172
174
|
getID(assignment: any) {
|
|
@@ -221,6 +223,7 @@ export class TodoComponent implements OnInit, OnDestroy {
|
|
|
221
223
|
fetchMyWorkList(this.myWorkList$.datapage, this.pConn$.getComponentConfig()?.myWorkList.fields, this.count, false, this.context$).then(
|
|
222
224
|
response => {
|
|
223
225
|
this.arAssignments$ = response.data;
|
|
226
|
+
this.cdRef.markForCheck();
|
|
224
227
|
}
|
|
225
228
|
);
|
|
226
229
|
} else {
|
|
@@ -268,6 +271,7 @@ export class TodoComponent implements OnInit, OnDestroy {
|
|
|
268
271
|
.openAssignment(id, classname, options)
|
|
269
272
|
.then(() => {
|
|
270
273
|
this.psService.sendMessage(false);
|
|
274
|
+
this.cdRef.markForCheck();
|
|
271
275
|
if (this.bLogging) {
|
|
272
276
|
console.log(`openAssignment completed`);
|
|
273
277
|
}
|
|
@@ -275,6 +279,7 @@ export class TodoComponent implements OnInit, OnDestroy {
|
|
|
275
279
|
.catch(() => {
|
|
276
280
|
this.psService.sendMessage(false);
|
|
277
281
|
this.erService.sendMessage('show', 'Failed to open');
|
|
282
|
+
this.cdRef.markForCheck();
|
|
278
283
|
});
|
|
279
284
|
}
|
|
280
285
|
}
|