@pega/angular-sdk-overrides 0.25.14 → 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/material-details-fields/material-details-fields.component.html +13 -1
- package/lib/designSystemExtension/material-details-fields/material-details-fields.component.ts +25 -1
- package/lib/designSystemExtension/operator/operator.component.ts +2 -1
- package/lib/field/auto-complete/auto-complete.component.ts +6 -6
- package/lib/field/group/group.component.ts +14 -2
- package/lib/field/multiselect/multiselect.component.html +1 -1
- package/lib/infra/Containers/flow-container/flow-container.component.ts +39 -42
- 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 +18 -37
- package/lib/template/app-shell/app-shell.component.ts +12 -11
- package/lib/template/base/details-template-base.ts +54 -0
- package/lib/template/case-summary/case-summary.component.ts +14 -0
- package/lib/template/data-reference/data-reference.component.ts +27 -18
- package/lib/template/details/details.component.html +11 -3
- package/lib/template/details/details.component.ts +2 -39
- package/lib/template/details-narrow-wide/details-narrow-wide.component.html +9 -2
- package/lib/template/details-narrow-wide/details-narrow-wide.component.ts +3 -4
- package/lib/template/details-one-column/details-one-column.component.html +11 -1
- package/lib/template/details-one-column/details-one-column.component.ts +2 -3
- package/lib/template/details-three-column/details-three-column.component.html +15 -2
- package/lib/template/details-three-column/details-three-column.component.ts +4 -7
- package/lib/template/details-two-column/details-two-column.component.html +9 -2
- package/lib/template/details-two-column/details-two-column.component.ts +3 -6
- package/lib/template/details-wide-narrow/details-wide-narrow.component.html +9 -2
- package/lib/template/details-wide-narrow/details-wide-narrow.component.ts +3 -6
- package/lib/template/field-group-template/field-group-template.component.ts +18 -4
- package/lib/template/simple-table-manual/simple-table-manual.component.ts +1 -1
- 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
package/lib/designSystemExtension/material-details-fields/material-details-fields.component.html
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
</ng-template>
|
|
11
11
|
|
|
12
12
|
<ng-template #showDetails>
|
|
13
|
-
<div class="psdk-grid-filter" *ngIf="field.config.label &&
|
|
13
|
+
<div class="psdk-grid-filter" *ngIf="field.config.label && _getVisibility(field.config)">
|
|
14
14
|
<div class="psdk-details-fields-label">
|
|
15
15
|
{{ field.config.label }}
|
|
16
16
|
</div>
|
|
@@ -20,6 +20,18 @@
|
|
|
20
20
|
<a *ngSwitchCase="'phone'" class="psdk-primary-color" as="a" href="tel: {{ field.config.value }}">{{ _getValue(field.config.value) }}</a>
|
|
21
21
|
<a *ngSwitchCase="'email'" class="psdk-primary-color" href="mailto: {{ field.config.value }}">{{ _getValue(field.config.value) }}</a>
|
|
22
22
|
<span *ngSwitchCase="'date'" class="psdk-details-text-style">{{ _formatDate(field.config.value, field.type) }}</span>
|
|
23
|
+
<span *ngSwitchCase="'decimal'" class="psdk-details-text-style">{{ _formatDecimal(field) }}</span>
|
|
24
|
+
<span *ngSwitchCase="'currency'" class="psdk-details-text-style">{{ _formatCurrency(field) }}</span>
|
|
25
|
+
<span *ngSwitchCase="'richtext'" class="psdk-details-text-style" [innerHTML]="_getValue(field.config.value)"></span>
|
|
26
|
+
<ng-container *ngSwitchCase="'scalarlist'">
|
|
27
|
+
<span *ngIf="field.config.componentType?.toLowerCase() === 'decimal'" class="psdk-details-text-style">{{ _formatDecimal(field) }}</span>
|
|
28
|
+
<span *ngIf="field.config.componentType?.toLowerCase() === 'currency'" class="psdk-details-text-style">{{ _formatCurrency(field) }}</span>
|
|
29
|
+
<span
|
|
30
|
+
*ngIf="field.config.componentType?.toLowerCase() !== 'decimal' && field.config.componentType?.toLowerCase() !== 'currency'"
|
|
31
|
+
class="psdk-details-text-style"
|
|
32
|
+
>{{ _getValue(field.config.value) }}</span
|
|
33
|
+
>
|
|
34
|
+
</ng-container>
|
|
23
35
|
<span *ngSwitchCase="'caseoperator'"></span>
|
|
24
36
|
<span *ngSwitchDefault>{{ _getValue(field.config.value, field) }}</span>
|
|
25
37
|
</div>
|
package/lib/designSystemExtension/material-details-fields/material-details-fields.component.ts
CHANGED
|
@@ -2,6 +2,8 @@ import { Component, Input, forwardRef } from '@angular/core';
|
|
|
2
2
|
import { Utils } from '@pega/angular-sdk-components';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
5
|
+
import { getCurrencyOptions } from '@pega/angular-sdk-components';
|
|
6
|
+
import { format } from '@pega/angular-sdk-components';
|
|
5
7
|
|
|
6
8
|
@Component({
|
|
7
9
|
selector: 'app-material-details-fields',
|
|
@@ -29,7 +31,29 @@ export class MaterialDetailsFieldsComponent {
|
|
|
29
31
|
return this.utils.generateDate(dateValue, dateFormat);
|
|
30
32
|
}
|
|
31
33
|
|
|
32
|
-
|
|
34
|
+
_formatDecimal(field: any): string {
|
|
35
|
+
const { currencyISOCode = '', formatter } = field.config;
|
|
36
|
+
|
|
37
|
+
const theCurrencyOptions = getCurrencyOptions(currencyISOCode);
|
|
38
|
+
const formatterLower = formatter?.toLowerCase() || 'decimal';
|
|
39
|
+
const formattedValue = format(field.config.value, formatterLower, theCurrencyOptions);
|
|
40
|
+
|
|
41
|
+
return formattedValue;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
_formatCurrency(field: any): string {
|
|
45
|
+
const { currencyISOCode = 'USD', formatter } = field.config;
|
|
46
|
+
|
|
47
|
+
const formattedValue = format(
|
|
48
|
+
field.config.value,
|
|
49
|
+
formatter ? (formatter.toLowerCase() === 'defaultcurrency' ? 'currency' : formatter.toLowerCase()) : 'currency',
|
|
50
|
+
getCurrencyOptions(currencyISOCode)
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
return formattedValue;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
_getVisibility(config): boolean {
|
|
33
57
|
const { visibility = true } = config;
|
|
34
58
|
|
|
35
59
|
return this.utils.getBooleanValue(visibility);
|
|
@@ -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
|
}
|
|
@@ -94,12 +94,6 @@ export class AutoCompleteComponent extends FieldBase implements OnInit {
|
|
|
94
94
|
// Set component specific properties
|
|
95
95
|
const { value, listType, parameters } = this.configProps$;
|
|
96
96
|
|
|
97
|
-
if (value != undefined) {
|
|
98
|
-
const index = this.options$?.findIndex(element => element.key === value);
|
|
99
|
-
this.value$ = index > -1 ? this.options$[index].value : value;
|
|
100
|
-
this.fieldControl.setValue(this.value$);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
97
|
this.listType = listType;
|
|
104
98
|
this.parameters = parameters;
|
|
105
99
|
|
|
@@ -119,6 +113,12 @@ export class AutoCompleteComponent extends FieldBase implements OnInit {
|
|
|
119
113
|
const results = await this.dataPageService.getDataPageData(datasource, this.parameters, context);
|
|
120
114
|
this.fillOptions(results);
|
|
121
115
|
}
|
|
116
|
+
|
|
117
|
+
if (value != undefined) {
|
|
118
|
+
const index = this.options$?.findIndex(element => element.key === value);
|
|
119
|
+
this.value$ = index > -1 ? this.options$[index].value : value;
|
|
120
|
+
this.fieldControl.setValue(this.value$);
|
|
121
|
+
}
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
generateColumnsAndDataSource() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CommonModule } from '@angular/common';
|
|
2
|
-
import { Component, forwardRef, Input, OnInit } from '@angular/core';
|
|
2
|
+
import { Component, forwardRef, Input, OnDestroy, OnInit } from '@angular/core';
|
|
3
3
|
import { FormGroup } from '@angular/forms';
|
|
4
4
|
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
5
5
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
@@ -19,7 +19,7 @@ interface GroupProps extends PConnFieldProps {
|
|
|
19
19
|
styleUrls: ['./group.component.scss'],
|
|
20
20
|
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
21
21
|
})
|
|
22
|
-
export class GroupComponent implements OnInit {
|
|
22
|
+
export class GroupComponent implements OnInit, OnDestroy {
|
|
23
23
|
@Input() pConn$: typeof PConnect;
|
|
24
24
|
@Input() formGroup$: FormGroup;
|
|
25
25
|
|
|
@@ -42,6 +42,12 @@ export class GroupComponent implements OnInit {
|
|
|
42
42
|
this.checkAndUpdate();
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
additionalProps() {
|
|
46
|
+
return {
|
|
47
|
+
visibility: this.pConn$.getComputedVisibility()
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
45
51
|
// Callback passed when subscribing to store change
|
|
46
52
|
onStateChange() {
|
|
47
53
|
this.checkAndUpdate();
|
|
@@ -86,4 +92,10 @@ export class GroupComponent implements OnInit {
|
|
|
86
92
|
});
|
|
87
93
|
}
|
|
88
94
|
}
|
|
95
|
+
|
|
96
|
+
ngOnDestroy(): void {
|
|
97
|
+
if (this.angularPConnectData.unsubscribeFn) {
|
|
98
|
+
this.angularPConnectData.unsubscribeFn();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
89
101
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<div [formGroup]="formGroup$">
|
|
2
2
|
<mat-form-field class="psdk-full-width" subscriptSizing="dynamic">
|
|
3
3
|
<mat-label>{{ label$ }}</mat-label>
|
|
4
|
-
<mat-chip-grid #chipGrid>
|
|
4
|
+
<mat-chip-grid #chipGrid [required]="bRequired$">
|
|
5
5
|
<ng-container *ngFor="let select of selectedItems">
|
|
6
6
|
<mat-chip-row (removed)="removeChip(select)">
|
|
7
7
|
{{ select.primary }}
|
|
@@ -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() {
|
|
@@ -279,8 +278,12 @@ export class FlowContainerComponent extends FlowContainerBaseComponent implement
|
|
|
279
278
|
|
|
280
279
|
// this.containerName$ = oWorkMeta["name"];
|
|
281
280
|
if (bLoadChildren && oWorkData) {
|
|
282
|
-
this.containerName$ = this.localizedVal(
|
|
283
|
-
|
|
281
|
+
this.containerName$ = this.localizedVal(
|
|
282
|
+
this.getActiveViewLabel() || oWorkData.caseInfo.assignments?.[0]?.name,
|
|
283
|
+
undefined,
|
|
284
|
+
this.localeReference
|
|
285
|
+
);
|
|
286
|
+
this.isMultiStep = this.utils.getBooleanValue(oWorkData.caseInfo.assignments?.[0]?.isMultiStep);
|
|
284
287
|
}
|
|
285
288
|
|
|
286
289
|
// turn off spinner
|
|
@@ -384,8 +387,7 @@ export class FlowContainerComponent extends FlowContainerBaseComponent implement
|
|
|
384
387
|
const { CASE_INFO: CASE_CONSTS } = PCore.getConstants();
|
|
385
388
|
|
|
386
389
|
setTimeout(() => {
|
|
387
|
-
|
|
388
|
-
/*
|
|
390
|
+
/*
|
|
389
391
|
*** renove this commmented out code when React/WC is updated
|
|
390
392
|
*** this code is replace with the call to "getToDoAssigments" function below
|
|
391
393
|
|
|
@@ -403,32 +405,32 @@ export class FlowContainerComponent extends FlowContainerBaseComponent implement
|
|
|
403
405
|
const caseActions = localPConn.getValue(CASE_CONSTS.CASE_INFO_ACTIONS);
|
|
404
406
|
*/
|
|
405
407
|
|
|
406
|
-
|
|
408
|
+
const todoAssignments = getToDoAssignments(this.pConn$);
|
|
407
409
|
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
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
|
+
}
|
|
412
414
|
|
|
413
|
-
|
|
414
|
-
|
|
415
|
+
/* remove this commented out code when update React/WC */
|
|
416
|
+
// let kid = this.pConn$.getChildren()[0];
|
|
415
417
|
|
|
416
|
-
|
|
417
|
-
|
|
418
|
+
// kid.getPConnect() can be a Reference component. So normalize it just in case
|
|
419
|
+
// let todoKid = kid.getPConnect().getChildren()[0];
|
|
418
420
|
|
|
419
|
-
|
|
421
|
+
// this.todo_pConn$ = todoKid.getPConnect();
|
|
420
422
|
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
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$;
|
|
424
426
|
|
|
425
|
-
|
|
426
|
-
|
|
427
|
+
// still needs the context of the original work item
|
|
428
|
+
this.todo_context$ = localPConn.getContextName();
|
|
427
429
|
|
|
428
|
-
|
|
430
|
+
this.todo_showTodo$ = true;
|
|
429
431
|
|
|
430
|
-
|
|
431
|
-
|
|
432
|
+
this.psService.sendMessage(false);
|
|
433
|
+
this.cdRef.markForCheck();
|
|
432
434
|
});
|
|
433
435
|
}
|
|
434
436
|
|
|
@@ -533,24 +535,19 @@ export class FlowContainerComponent extends FlowContainerBaseComponent implement
|
|
|
533
535
|
const normalizedConfigObjectAsPConnect = normalizedConfigObject.getComponent();
|
|
534
536
|
|
|
535
537
|
// makes sure Angular tracks these changes
|
|
536
|
-
this.
|
|
537
|
-
|
|
538
|
-
// 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
|
|
539
540
|
|
|
540
|
-
|
|
541
|
-
|
|
541
|
+
this.arChildren$ = [];
|
|
542
|
+
this.arChildren$.push(normalizedConfigObjectAsPConnect);
|
|
542
543
|
|
|
543
|
-
|
|
544
|
+
this.psService.sendMessage(false);
|
|
544
545
|
|
|
545
|
-
|
|
546
|
-
|
|
546
|
+
const oWorkItem = configObject.getPConnect();
|
|
547
|
+
const oWorkData: any = oWorkItem.getDataObject();
|
|
547
548
|
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
undefined,
|
|
551
|
-
this.localeReference
|
|
552
|
-
);
|
|
553
|
-
});
|
|
549
|
+
this.containerName$ = this.localizedVal(this.getActiveViewLabel() || oWorkData.caseInfo.assignments?.[0]?.name, undefined, this.localeReference);
|
|
550
|
+
this.cdRef.markForCheck();
|
|
554
551
|
}
|
|
555
552
|
|
|
556
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() {
|