@pega/angular-sdk-overrides 25.1.11 → 25.1.12
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/date-time/date-time.component.html +1 -1
- package/lib/infra/Containers/flow-container/flow-container.component.html +1 -1
- package/lib/infra/Containers/flow-container/flow-container.component.ts +8 -5
- package/lib/infra/Containers/flow-container/helpers.ts +1 -1
- package/lib/infra/Containers/hybrid-view-container/hybrid-view-container.component.ts +2 -3
- package/lib/infra/Containers/modal-view-container/modal-view-container.component.ts +2 -3
- package/lib/infra/Containers/preview-view-container/preview-view-container.component.ts +2 -3
- package/lib/infra/Containers/view-container/view-container.component.ts +2 -3
- package/lib/infra/assignment/assignment.component.ts +1 -1
- package/lib/infra/defer-load/defer-load.component.ts +2 -3
- package/lib/infra/reference/reference.component.ts +2 -3
- package/lib/infra/root-container/root-container.component.ts +2 -3
- package/lib/infra/view/view.component.ts +2 -3
- 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/lib/template/list-view/list-view.component.html +2 -2
- package/lib/template/multi-reference-readonly/multi-reference-readonly.component.html +1 -1
- package/lib/template/multi-reference-readonly/multi-reference-readonly.component.ts +27 -0
- package/lib/template/simple-table-manual/helpers.ts +1 -1
- package/package.json +1 -1
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
/>
|
|
19
19
|
<mat-datepicker-toggle matSuffix [owlDateTimeTrigger]="dtPicker"></mat-datepicker-toggle>
|
|
20
20
|
<owl-date-time #dtPicker [disabled]="bDisabled$" [scrollStrategy]="scrollStrategy"></owl-date-time>
|
|
21
|
-
<mat-error *ngIf="fieldControl
|
|
21
|
+
<mat-error *ngIf="fieldControl.invalid">{{ getErrorMessage() }}</mat-error>
|
|
22
22
|
</mat-form-field>
|
|
23
23
|
</div>
|
|
24
24
|
</div>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div *ngIf="!bShowConfirm">
|
|
3
3
|
<div *ngIf="!todo_showTodo$">
|
|
4
4
|
<h2 *ngIf="!isMultiStep">{{ containerName$ }}</h2>
|
|
5
|
-
<div *ngIf="banners
|
|
5
|
+
<div *ngIf="banners.length">
|
|
6
6
|
<component-mapper name="AlertBanner" [props]="{ banners }"></component-mapper>
|
|
7
7
|
</div>
|
|
8
8
|
</div>
|
|
@@ -11,9 +11,8 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
11
11
|
import { FlowContainerBaseComponent } from '@pega/angular-sdk-components';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* WARNING:
|
|
15
|
-
*
|
|
16
|
-
* is totally at your own risk.
|
|
14
|
+
* WARNING: This file is part of the infrastructure component responsible for working with Redux and managing the creation and update of Redux containers and PConnect.
|
|
15
|
+
* You may override Material components within this component if needed, but do not modify any container-related logic. Changing this logic can lead to unexpected behavior.
|
|
17
16
|
*/
|
|
18
17
|
|
|
19
18
|
interface FlowContainerProps {
|
|
@@ -66,7 +65,7 @@ export class FlowContainerComponent extends FlowContainerBaseComponent implement
|
|
|
66
65
|
localizedVal: any;
|
|
67
66
|
localeCategory = 'Messages';
|
|
68
67
|
localeReference: any;
|
|
69
|
-
banners: any[];
|
|
68
|
+
banners: any[] = [];
|
|
70
69
|
// itemKey: string = ""; // JA - this is what Nebula/Constellation uses to pass to finishAssignment, navigateToStep
|
|
71
70
|
|
|
72
71
|
pConnectOfActiveContainerItem;
|
|
@@ -547,7 +546,11 @@ export class FlowContainerComponent extends FlowContainerBaseComponent implement
|
|
|
547
546
|
const oWorkItem = configObject.getPConnect();
|
|
548
547
|
const oWorkData: any = oWorkItem.getDataObject();
|
|
549
548
|
|
|
550
|
-
this.containerName$ = this.localizedVal(
|
|
549
|
+
this.containerName$ = this.localizedVal(
|
|
550
|
+
this.getActiveViewLabel() || oWorkData.caseInfo.assignments?.[0]?.name,
|
|
551
|
+
undefined,
|
|
552
|
+
this.localeReference
|
|
553
|
+
);
|
|
551
554
|
});
|
|
552
555
|
}
|
|
553
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 => {
|
|
@@ -3,9 +3,8 @@ import { CommonModule } from '@angular/common';
|
|
|
3
3
|
import { FormGroup } from '@angular/forms';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* WARNING:
|
|
7
|
-
*
|
|
8
|
-
* is totally at your own risk.
|
|
6
|
+
* WARNING: This file is part of the infrastructure component responsible for working with Redux and managing the creation and update of Redux containers and PConnect.
|
|
7
|
+
* You may override Material components within this component if needed, but do not modify any container-related logic. Changing this logic can lead to unexpected behavior.
|
|
9
8
|
*/
|
|
10
9
|
|
|
11
10
|
// Right this is a skeleton, as Hybrid ViewContainer hasn't been implemented
|
|
@@ -9,9 +9,8 @@ import { getBanners } from '@pega/angular-sdk-components';
|
|
|
9
9
|
import { ReferenceComponent } from '@pega/angular-sdk-components';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
* WARNING:
|
|
13
|
-
*
|
|
14
|
-
* is totally at your own risk.
|
|
12
|
+
* WARNING: This file is part of the infrastructure component responsible for working with Redux and managing the creation and update of Redux containers and PConnect.
|
|
13
|
+
* You may override Material components within this component if needed, but do not modify any container-related logic. Changing this logic can lead to unexpected behavior.
|
|
15
14
|
*/
|
|
16
15
|
|
|
17
16
|
@Component({
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Component, OnInit, Input } from '@angular/core';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* WARNING:
|
|
5
|
-
*
|
|
6
|
-
* is totally at your own risk.
|
|
4
|
+
* WARNING: This file is part of the infrastructure component responsible for working with Redux and managing the creation and update of Redux containers and PConnect.
|
|
5
|
+
* You may override Material components within this component if needed, but do not modify any container-related logic. Changing this logic can lead to unexpected behavior.
|
|
7
6
|
*/
|
|
8
7
|
|
|
9
8
|
// Right this is a skeleton, as Preview hasn't been implemented
|
|
@@ -8,9 +8,8 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
8
8
|
import { configureBrowserBookmark } from './helper';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* WARNING:
|
|
12
|
-
*
|
|
13
|
-
* is totally at your own risk.
|
|
11
|
+
* WARNING: This file is part of the infrastructure component responsible for working with Redux and managing the creation and update of Redux containers and PConnect.
|
|
12
|
+
* You may override Material components within this component if needed, but do not modify any container-related logic. Changing this logic can lead to unexpected behavior.
|
|
14
13
|
*/
|
|
15
14
|
|
|
16
15
|
interface ViewContainerProps {
|
|
@@ -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;
|
|
@@ -6,9 +6,8 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
6
6
|
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* WARNING:
|
|
10
|
-
*
|
|
11
|
-
* is totally at your own risk.
|
|
9
|
+
* WARNING: This file is part of the infrastructure component responsible for working with Redux and managing the creation and update of Redux containers and PConnect.
|
|
10
|
+
* You may override Material components within this component if needed, but do not modify any container-related logic. Changing this logic can lead to unexpected behavior.
|
|
12
11
|
*/
|
|
13
12
|
|
|
14
13
|
@Component({
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Component } from '@angular/core';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* WARNING:
|
|
5
|
-
*
|
|
6
|
-
* is totally at your own risk.
|
|
4
|
+
* WARNING: This file is part of the infrastructure component responsible for working with Redux and managing the creation and update of Redux containers and PConnect.
|
|
5
|
+
* You may override Material components within this component if needed, but do not modify any container-related logic. Changing this logic can lead to unexpected behavior.
|
|
7
6
|
*/
|
|
8
7
|
|
|
9
8
|
@Component({
|
|
@@ -11,9 +11,8 @@ import { ModalViewContainerComponent } from '@pega/angular-sdk-components';
|
|
|
11
11
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* WARNING:
|
|
15
|
-
*
|
|
16
|
-
* is totally at your own risk.
|
|
14
|
+
* WARNING: This file is part of the infrastructure component responsible for working with Redux and managing the creation and update of Redux containers and PConnect.
|
|
15
|
+
* You may override Material components within this component if needed, but do not modify any container-related logic. Changing this logic can lead to unexpected behavior.
|
|
17
16
|
*/
|
|
18
17
|
|
|
19
18
|
const options = { context: 'app' };
|
|
@@ -24,9 +24,8 @@ function isDetailsTemplate(template) {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
* WARNING:
|
|
28
|
-
*
|
|
29
|
-
* is totally at your own risk.
|
|
27
|
+
* WARNING: This file is part of the infrastructure component responsible for working with Redux and managing the creation and update of Redux containers and PConnect.
|
|
28
|
+
* You may override Material components within this component if needed, but do not modify any container-related logic. Changing this logic can lead to unexpected behavior.
|
|
30
29
|
*/
|
|
31
30
|
|
|
32
31
|
/**
|
|
@@ -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
|
}
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
<tr mat-header-row *matHeaderRowDef="displayedColumns$"></tr>
|
|
177
177
|
<tr mat-row *matRowDef="let row; columns: displayedColumns$"></tr>
|
|
178
178
|
</table>
|
|
179
|
-
<div *ngIf="repeatListData
|
|
179
|
+
<div *ngIf="repeatListData.length === 0">
|
|
180
180
|
<table id="list-view" mat-table [dataSource]="[]">
|
|
181
181
|
<!-- Define columns for headers -->
|
|
182
182
|
<ng-container *ngFor="let col of displayedColumns$" [matColumnDef]="col">
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
<tr mat-header-row *matHeaderRowDef="displayedColumns$"></tr>
|
|
190
190
|
</table>
|
|
191
191
|
</div>
|
|
192
|
-
<div class="psdk-no-records" *ngIf="repeatListData
|
|
192
|
+
<div class="psdk-no-records" *ngIf="repeatListData.length === 0">
|
|
193
193
|
{{ utils.getGenericFieldsLocalizedValue('COSMOSFIELDS.lists', 'No records found.') }}
|
|
194
194
|
</div>
|
|
195
195
|
</div>
|
|
@@ -4,6 +4,8 @@ import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-c
|
|
|
4
4
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
5
5
|
|
|
6
6
|
interface MultiReferenceReadOnlyProps {
|
|
7
|
+
readonlyContextList: string;
|
|
8
|
+
referenceList: string;
|
|
7
9
|
label: string;
|
|
8
10
|
hideLabel: boolean;
|
|
9
11
|
}
|
|
@@ -21,6 +23,7 @@ export class MultiReferenceReadonlyComponent implements OnInit, OnDestroy {
|
|
|
21
23
|
angularPConnectData: AngularPConnectData = {};
|
|
22
24
|
configProps$: MultiReferenceReadOnlyProps;
|
|
23
25
|
label: string;
|
|
26
|
+
newPConn: any;
|
|
24
27
|
|
|
25
28
|
constructor(private angularPConnect: AngularPConnectService) {}
|
|
26
29
|
|
|
@@ -49,5 +52,29 @@ export class MultiReferenceReadonlyComponent implements OnInit, OnDestroy {
|
|
|
49
52
|
updateSelf() {
|
|
50
53
|
this.configProps$ = this.pConn$.getConfigProps() as MultiReferenceReadOnlyProps;
|
|
51
54
|
this.label = this.configProps$.label;
|
|
55
|
+
|
|
56
|
+
const config = (this.pConn$.getMetadata() as any)?.config;
|
|
57
|
+
const { referenceList, readonlyContextList } = config;
|
|
58
|
+
let readonlyContextObject;
|
|
59
|
+
if (!PCore.getAnnotationUtils().isProperty(referenceList)) {
|
|
60
|
+
readonlyContextObject = {
|
|
61
|
+
referenceList: readonlyContextList
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
const hideLabel = this.configProps$.hideLabel ?? false;
|
|
65
|
+
this.newPConn = this.pConn$.createComponent(
|
|
66
|
+
{
|
|
67
|
+
type: 'SimpleTable',
|
|
68
|
+
config: {
|
|
69
|
+
...config,
|
|
70
|
+
...readonlyContextObject,
|
|
71
|
+
label: this.label,
|
|
72
|
+
hideLabel
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
'',
|
|
76
|
+
0,
|
|
77
|
+
{}
|
|
78
|
+
);
|
|
52
79
|
}
|
|
53
80
|
}
|
|
@@ -46,7 +46,7 @@ export const getContext = thePConn => {
|
|
|
46
46
|
const pageReference = thePConn.getPageReference();
|
|
47
47
|
const { readonlyContextList, referenceList = readonlyContextList } = thePConn.getStateProps()?.config || thePConn.getStateProps();
|
|
48
48
|
|
|
49
|
-
const pageReferenceForRows = referenceList
|
|
49
|
+
const pageReferenceForRows = referenceList?.startsWith('.') ? `${pageReference}.${referenceList?.substring(1)}` : referenceList;
|
|
50
50
|
const viewName = thePConn.viewName;
|
|
51
51
|
|
|
52
52
|
// removing "caseInfo.content" prefix to avoid setting it as a target while preparing pageInstructions
|