@pega/angular-sdk-overrides 0.25.11 → 0.25.13
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/field/phone/phone.component.html +2 -2
- package/lib/field/phone/phone.component.ts +2 -2
- package/lib/infra/Containers/flow-container/flow-container.component.ts +5 -1
- package/lib/infra/Containers/flow-container/helpers.ts +1 -1
- package/lib/infra/assignment/assignment.component.ts +1 -1
- package/lib/template/field-group-template/field-group-template.component.html +1 -1
- package/lib/template/field-group-template/field-group-template.component.scss +1 -0
- package/lib/template/field-group-template/field-group-template.component.ts +24 -19
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<ng-template #noDisplayMode>
|
|
5
5
|
<div *ngIf="bHasForm$ && bVisible$; else noEdit">
|
|
6
6
|
<mat-form-field class="psdk-full-width" subscriptSizing="dynamic" [hintLabel]="helperText" floatLabel="always">
|
|
7
|
-
<
|
|
7
|
+
<mat-tel-input
|
|
8
8
|
[attr.data-test-id]="testId"
|
|
9
9
|
[formControl]="fieldControl"
|
|
10
10
|
[preferredCountries]="preferredCountries"
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
(change)="fieldOnChange()"
|
|
17
17
|
(blur)="fieldOnBlur()"
|
|
18
18
|
>
|
|
19
|
-
</
|
|
19
|
+
</mat-tel-input>
|
|
20
20
|
<mat-label>{{ label$ }}</mat-label>
|
|
21
21
|
<mat-error *ngIf="fieldControl.invalid">{{ getErrorMessage() }}</mat-error>
|
|
22
22
|
</mat-form-field>
|
|
@@ -2,7 +2,7 @@ import { Component, forwardRef } from '@angular/core';
|
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { ReactiveFormsModule } from '@angular/forms';
|
|
4
4
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
5
|
-
import {
|
|
5
|
+
import { MatTelInput } from 'mat-tel-input';
|
|
6
6
|
import { parsePhoneNumberFromString } from 'libphonenumber-js';
|
|
7
7
|
|
|
8
8
|
import { FieldBase } from '@pega/angular-sdk-components';
|
|
@@ -18,7 +18,7 @@ interface PhoneProps extends PConnFieldProps {
|
|
|
18
18
|
selector: 'app-phone',
|
|
19
19
|
templateUrl: './phone.component.html',
|
|
20
20
|
styleUrls: ['./phone.component.scss'],
|
|
21
|
-
imports: [CommonModule, ReactiveFormsModule, MatFormFieldModule,
|
|
21
|
+
imports: [CommonModule, ReactiveFormsModule, MatFormFieldModule, MatTelInput, forwardRef(() => ComponentMapperComponent)]
|
|
22
22
|
})
|
|
23
23
|
export class PhoneComponent extends FieldBase {
|
|
24
24
|
configProps$: PhoneProps;
|
|
@@ -546,7 +546,11 @@ export class FlowContainerComponent extends FlowContainerBaseComponent implement
|
|
|
546
546
|
const oWorkItem = configObject.getPConnect();
|
|
547
547
|
const oWorkData: any = oWorkItem.getDataObject();
|
|
548
548
|
|
|
549
|
-
this.containerName$ = this.localizedVal(
|
|
549
|
+
this.containerName$ = this.localizedVal(
|
|
550
|
+
this.getActiveViewLabel() || oWorkData.caseInfo.assignments?.[0]?.name,
|
|
551
|
+
undefined,
|
|
552
|
+
this.localeReference
|
|
553
|
+
);
|
|
550
554
|
});
|
|
551
555
|
}
|
|
552
556
|
|
|
@@ -33,7 +33,7 @@ export function hasAssignments(pConnect) {
|
|
|
33
33
|
const assignments = pConnect.getValue(CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS);
|
|
34
34
|
const childCasesAssignments = getChildCaseAssignments(pConnect);
|
|
35
35
|
|
|
36
|
-
return assignments || childCasesAssignments?.length || isCaseWideLocalAction(pConnect);
|
|
36
|
+
return assignments?.length || childCasesAssignments?.length || isCaseWideLocalAction(pConnect);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
export const showBanner = getPConnect => {
|
|
@@ -225,7 +225,7 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
225
225
|
// this.containerName$ = oWorkMeta["name"];
|
|
226
226
|
|
|
227
227
|
if (oWorkData.caseInfo && oWorkData.caseInfo.assignments !== null) {
|
|
228
|
-
this.containerName$ = oWorkData.caseInfo.assignments?.[0]
|
|
228
|
+
this.containerName$ = oWorkData.caseInfo.assignments?.[0]?.name;
|
|
229
229
|
|
|
230
230
|
// get caseInfo
|
|
231
231
|
const oCaseInfo = oData.caseInfo;
|
|
@@ -28,6 +28,6 @@
|
|
|
28
28
|
</div>
|
|
29
29
|
</div>
|
|
30
30
|
</div>
|
|
31
|
-
<button *ngIf="allowAdd" mat-button color="primary" style="font-size: 16px" (click)="addFieldGroupItem()">{{ getAddBtnLabel() }}</button>
|
|
31
|
+
<button *ngIf="allowAdd()" mat-button color="primary" style="font-size: 16px" (click)="addFieldGroupItem()">{{ getAddBtnLabel() }}</button>
|
|
32
32
|
</ng-template>
|
|
33
33
|
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, OnInit, Input, forwardRef, OnDestroy, OnChanges, signal } from '@angular/core';
|
|
1
|
+
import { Component, OnInit, Input, forwardRef, OnDestroy, OnChanges, signal, effect } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { FormGroup } from '@angular/forms';
|
|
4
4
|
import { MatButtonModule } from '@angular/material/button';
|
|
@@ -48,32 +48,26 @@ export class FieldGroupTemplateComponent implements OnInit, OnDestroy, OnChanges
|
|
|
48
48
|
referenceListLength = signal<number | null>(null);
|
|
49
49
|
fieldHeader: any;
|
|
50
50
|
|
|
51
|
-
allowAdd = true;
|
|
52
|
-
allowEdit = true;
|
|
51
|
+
allowAdd = signal(true);
|
|
52
|
+
allowEdit = signal(true);
|
|
53
53
|
allowDelete = true;
|
|
54
54
|
|
|
55
55
|
constructor(
|
|
56
56
|
private angularPConnect: AngularPConnectService,
|
|
57
57
|
private utils: Utils
|
|
58
|
-
) {
|
|
58
|
+
) {
|
|
59
|
+
effect(() => {
|
|
60
|
+
const allowAdd = this.allowAdd();
|
|
61
|
+
const allowEdit = this.allowEdit();
|
|
62
|
+
const referenceList = this.configProps$?.referenceList;
|
|
63
|
+
if (referenceList?.length === 0 && (allowAdd || allowEdit)) {
|
|
64
|
+
this.pConn$.getListActions().insert({ classID: this.contextClass }, referenceList.length);
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
}
|
|
59
68
|
|
|
60
69
|
ngOnInit(): void {
|
|
61
70
|
this.menuIconOverride$ = this.utils.getImageSrc('trash', this.utils.getSDKStaticContentUrl());
|
|
62
|
-
|
|
63
|
-
const { allowActions, allowTableEdit, referenceList } = this.configProps$;
|
|
64
|
-
|
|
65
|
-
if (allowActions && Object.keys(allowActions).length > 0) {
|
|
66
|
-
this.allowAdd = allowActions.allowAdd ?? allowTableEdit ?? true;
|
|
67
|
-
this.allowEdit = allowActions.allowEdit ?? true;
|
|
68
|
-
this.allowDelete = allowActions.allowDelete ?? allowTableEdit ?? true;
|
|
69
|
-
} else {
|
|
70
|
-
this.allowAdd = allowTableEdit ?? true;
|
|
71
|
-
this.allowDelete = allowTableEdit ?? true;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
if (referenceList?.length === 0 && (this.allowAdd || this.allowEdit)) {
|
|
75
|
-
this.pConn$.getListActions().insert({ classID: this.contextClass }, referenceList.length);
|
|
76
|
-
}
|
|
77
71
|
}
|
|
78
72
|
|
|
79
73
|
ngOnDestroy(): void {
|
|
@@ -121,6 +115,17 @@ export class FieldGroupTemplateComponent implements OnInit, OnDestroy, OnChanges
|
|
|
121
115
|
const resolvedList = getReferenceList(this.pConn$);
|
|
122
116
|
this.pConn$.setReferenceList(resolvedList);
|
|
123
117
|
|
|
118
|
+
const { allowActions, allowTableEdit } = this.configProps$;
|
|
119
|
+
|
|
120
|
+
if (allowActions && Object.keys(allowActions).length > 0) {
|
|
121
|
+
this.allowAdd.set(allowActions.allowAdd ?? allowTableEdit ?? true);
|
|
122
|
+
this.allowEdit.set(allowActions.allowEdit ?? true);
|
|
123
|
+
this.allowDelete = allowActions.allowDelete ?? allowTableEdit ?? true;
|
|
124
|
+
} else {
|
|
125
|
+
this.allowAdd.set(allowTableEdit ?? true);
|
|
126
|
+
this.allowDelete = allowTableEdit ?? true;
|
|
127
|
+
}
|
|
128
|
+
|
|
124
129
|
if (this.readonlyMode) {
|
|
125
130
|
this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
126
131
|
}
|