@pega/angular-sdk-overrides 0.26.2 → 0.26.3
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/field-group/field-group.component.ts +11 -3
- package/lib/designSystemExtension/material-case-summary/material-case-summary.component.html +12 -3
- package/lib/field/auto-complete/auto-complete.component.html +44 -4
- package/lib/field/auto-complete/auto-complete.component.scss +92 -0
- package/lib/field/auto-complete/auto-complete.component.ts +341 -16
- package/lib/field/cancel-alert/cancel-alert.component.ts +38 -15
- package/lib/field/group/group.component.html +1 -1
- package/lib/field/group/group.component.ts +1 -3
- package/lib/field/semantic-link/semantic-link.component.html +1 -1
- package/lib/field/semantic-link/semantic-link.component.scss +4 -0
- package/lib/infra/Containers/flow-container/flow-container.component.html +1 -1
- package/lib/infra/Containers/modal-view-container/data-view-action-buttons/data-view-action-buttons.component.html +12 -0
- package/lib/infra/Containers/modal-view-container/data-view-action-buttons/data-view-action-buttons.component.spec.ts +130 -0
- package/lib/infra/Containers/modal-view-container/data-view-action-buttons/data-view-action-buttons.component.ts +77 -0
- package/lib/infra/Containers/modal-view-container/modal-view-container.component.html +35 -8
- package/lib/infra/Containers/modal-view-container/modal-view-container.component.spec.ts +24 -11
- package/lib/infra/Containers/modal-view-container/modal-view-container.component.ts +179 -184
- package/lib/infra/assignment/assignment.component.html +2 -1
- package/lib/infra/assignment/assignment.component.ts +30 -13
- package/lib/infra/defer-load/defer-load.component.ts +6 -3
- package/lib/infra/multi-step/multi-step.component.html +25 -33
- package/lib/infra/multi-step/multi-step.component.scss +48 -0
- package/lib/infra/multi-step/multi-step.component.ts +11 -0
- package/lib/infra/view/view.component.ts +17 -39
- package/lib/template/base/details-template-base.ts +35 -54
- package/lib/template/case-summary/case-summary.component.ts +15 -1
- package/lib/template/case-view/case-view.component.html +13 -1
- package/lib/template/case-view/case-view.component.spec.ts +119 -10
- package/lib/template/case-view/case-view.component.ts +52 -3
- package/lib/template/data-reference/data-reference.component.ts +27 -18
- package/lib/template/data-reference/search-form/search-form.component.html +1 -1
- package/lib/template/data-reference/search-form/search-form.component.ts +2 -0
- package/lib/template/details/details.component.html +23 -3
- package/lib/template/details/details.component.scss +9 -2
- package/lib/template/details/details.component.ts +3 -32
- package/lib/template/details-narrow-wide/details-narrow-wide.component.html +21 -2
- package/lib/template/details-narrow-wide/details-narrow-wide.component.scss +8 -1
- package/lib/template/details-narrow-wide/details-narrow-wide.component.ts +3 -37
- package/lib/template/details-one-column/details-one-column.component.html +23 -1
- package/lib/template/details-one-column/details-one-column.component.scss +14 -0
- package/lib/template/details-one-column/details-one-column.component.ts +3 -38
- package/lib/template/details-three-column/details-three-column.component.html +21 -2
- package/lib/template/details-three-column/details-three-column.component.scss +8 -1
- package/lib/template/details-three-column/details-three-column.component.ts +3 -46
- package/lib/template/details-two-column/details-two-column.component.html +21 -2
- package/lib/template/details-two-column/details-two-column.component.scss +8 -1
- package/lib/template/details-two-column/details-two-column.component.ts +3 -44
- package/lib/template/details-wide-narrow/details-wide-narrow.component.html +21 -2
- package/lib/template/details-wide-narrow/details-wide-narrow.component.scss +8 -1
- package/lib/template/details-wide-narrow/details-wide-narrow.component.ts +3 -41
- package/lib/template/field-value-list/field-value-list.component.scss +17 -0
- package/lib/template/list-view/list-view.component.ts +39 -0
- package/lib/template/self-service-case-view/self-service-case-view.component.html +13 -1
- package/lib/template/self-service-case-view/self-service-case-view.component.spec.ts +96 -11
- package/lib/template/self-service-case-view/self-service-case-view.component.ts +52 -3
- package/lib/template/simple-table-manual/helpers.ts +27 -6
- package/lib/template/simple-table-manual/simple-table-manual.component.html +1 -3
- package/lib/template/simple-table-manual/simple-table-manual.component.scss +4 -0
- package/lib/template/simple-table-manual/simple-table-manual.component.ts +51 -20
- package/lib/template/single-reference-readonly/single-reference-readonly.component.scss +0 -4
- package/package.json +1 -1
- package/lib/designSystemExtension/material-details/material-details.component.html +0 -40
- package/lib/designSystemExtension/material-details/material-details.component.scss +0 -116
- package/lib/designSystemExtension/material-details/material-details.component.spec.ts +0 -24
- package/lib/designSystemExtension/material-details/material-details.component.ts +0 -31
- package/lib/designSystemExtension/material-details-fields/material-details-fields.component.html +0 -50
- package/lib/designSystemExtension/material-details-fields/material-details-fields.component.scss +0 -34
- package/lib/designSystemExtension/material-details-fields/material-details-fields.component.spec.ts +0 -22
- package/lib/designSystemExtension/material-details-fields/material-details-fields.component.ts +0 -61
|
@@ -58,6 +58,7 @@ export class DataReferenceComponent implements OnInit, OnDestroy {
|
|
|
58
58
|
dataRelationshipContext: any;
|
|
59
59
|
imagePosition: any;
|
|
60
60
|
showImageDescription: any;
|
|
61
|
+
private isUpdatingFromDataCallback = false;
|
|
61
62
|
|
|
62
63
|
constructor(
|
|
63
64
|
private angularPConnect: AngularPConnectService,
|
|
@@ -69,7 +70,30 @@ export class DataReferenceComponent implements OnInit, OnDestroy {
|
|
|
69
70
|
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
70
71
|
this.children = this.pConn$.getChildren();
|
|
71
72
|
this.updateSelf();
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
ngOnDestroy(): void {
|
|
76
|
+
if (this.angularPConnectData.unsubscribeFn) {
|
|
77
|
+
this.angularPConnectData.unsubscribeFn();
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Callback passed when subscribing to store change
|
|
82
|
+
onStateChange() {
|
|
83
|
+
// Should always check the bridge to see if the component should
|
|
84
|
+
// update itself (re-render)
|
|
85
|
+
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
86
|
+
|
|
87
|
+
// ONLY call updateSelf when the component should update
|
|
88
|
+
if (bUpdateSelf) {
|
|
89
|
+
this.updateSelf();
|
|
90
|
+
}
|
|
91
|
+
}
|
|
72
92
|
|
|
93
|
+
getData() {
|
|
94
|
+
if (this.isUpdatingFromDataCallback) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
73
97
|
if (
|
|
74
98
|
this.rawViewMetadata.config?.parameters &&
|
|
75
99
|
!this.isDDSourceDeferred &&
|
|
@@ -94,7 +118,9 @@ export class DataReferenceComponent implements OnInit, OnDestroy {
|
|
|
94
118
|
}))
|
|
95
119
|
.filter(item => item.key); // Filtering out undefined entries
|
|
96
120
|
this.dropDownDataSource = ddDataSource;
|
|
121
|
+
this.isUpdatingFromDataCallback = true;
|
|
97
122
|
this.updateSelf();
|
|
123
|
+
this.isUpdatingFromDataCallback = false;
|
|
98
124
|
} else {
|
|
99
125
|
const ddDataSource: any = [];
|
|
100
126
|
this.dropDownDataSource = ddDataSource;
|
|
@@ -110,24 +136,6 @@ export class DataReferenceComponent implements OnInit, OnDestroy {
|
|
|
110
136
|
}
|
|
111
137
|
}
|
|
112
138
|
|
|
113
|
-
ngOnDestroy(): void {
|
|
114
|
-
if (this.angularPConnectData.unsubscribeFn) {
|
|
115
|
-
this.angularPConnectData.unsubscribeFn();
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
// Callback passed when subscribing to store change
|
|
120
|
-
onStateChange() {
|
|
121
|
-
// Should always check the bridge to see if the component should
|
|
122
|
-
// update itself (re-render)
|
|
123
|
-
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
124
|
-
|
|
125
|
-
// ONLY call updateSelf when the component should update
|
|
126
|
-
if (bUpdateSelf) {
|
|
127
|
-
this.updateSelf();
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
139
|
updateSelf() {
|
|
132
140
|
// Update properties based on configProps
|
|
133
141
|
const theConfigProps = this.pConn$.getConfigProps();
|
|
@@ -186,6 +194,7 @@ export class DataReferenceComponent implements OnInit, OnDestroy {
|
|
|
186
194
|
|
|
187
195
|
this.generateChildrenToRender();
|
|
188
196
|
this.displayChild = !(this.displaySingleRef || this.displayMultiRef);
|
|
197
|
+
this.getData();
|
|
189
198
|
}
|
|
190
199
|
|
|
191
200
|
updatePropertiesFromProps(theConfigProps) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div class="search-form" style="display: flex; flex-direction: column">
|
|
2
|
-
<
|
|
2
|
+
<h3>{{ label$ }}</h3>
|
|
3
3
|
<div *ngIf="searchCategoriesComp === 'dropdown'">
|
|
4
4
|
<mat-form-field class="psdk-full-width">
|
|
5
5
|
<mat-select [value]="currentTabId" (selectionChange)="handleTabClick($event.value)">
|
|
@@ -48,6 +48,7 @@ export class SearchFormComponent implements OnInit, OnChanges {
|
|
|
48
48
|
tabItems: any[] = [];
|
|
49
49
|
searchCategoriesComp: any;
|
|
50
50
|
propsToUse: any;
|
|
51
|
+
label$: string;
|
|
51
52
|
tabData: any = [];
|
|
52
53
|
tabCountSources: any;
|
|
53
54
|
deferLoadedTabs: any;
|
|
@@ -59,6 +60,7 @@ export class SearchFormComponent implements OnInit, OnChanges {
|
|
|
59
60
|
this.isInitialized = true;
|
|
60
61
|
this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps());
|
|
61
62
|
this.propsToUse = { ...this.pConn$.getInheritedProps() };
|
|
63
|
+
this.label$ = this.configProps$?.label || this.propsToUse.label;
|
|
62
64
|
// When called from ObjectReference, pConn$ itself acts as deferLoadedTabs (no children[2])
|
|
63
65
|
if (this.type === 'ObjectReference') {
|
|
64
66
|
this.deferLoadedTabs = { getPConnect: () => this.pConn$ };
|
|
@@ -1,3 +1,23 @@
|
|
|
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
|
+
<ng-container *ngIf="showHighlightedData && highlightedDataArr.length > 0">
|
|
8
|
+
<div class="psdk-grid-highlighted">
|
|
9
|
+
<component-mapper
|
|
10
|
+
*ngFor="let field of highlightedDataArr"
|
|
11
|
+
[name]="field.getComponentName()"
|
|
12
|
+
[props]="{ pConn$: field, formGroup$ }"
|
|
13
|
+
></component-mapper>
|
|
14
|
+
</div>
|
|
15
|
+
</ng-container>
|
|
16
|
+
<div class="psdk-grid-filter-1">
|
|
17
|
+
<component-mapper
|
|
18
|
+
*ngFor="let child of children"
|
|
19
|
+
[name]="child.getPConnect().getComponentName()"
|
|
20
|
+
[props]="{ pConn$: child.getPConnect(), formGroup$ }"
|
|
21
|
+
></component-mapper>
|
|
22
|
+
</div>
|
|
23
|
+
</ng-template>
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
.psdk-grid-filter {
|
|
1
|
+
.psdk-grid-filter-1 {
|
|
2
2
|
display: grid;
|
|
3
|
-
grid-template-columns: repeat(
|
|
3
|
+
grid-template-columns: repeat(1, minmax(0, 1fr));
|
|
4
4
|
column-gap: calc(2 * 0.5rem);
|
|
5
5
|
row-gap: calc(2 * 0.5rem);
|
|
6
6
|
align-items: start;
|
|
7
7
|
}
|
|
8
|
+
|
|
9
|
+
.psdk-grid-highlighted {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-wrap: wrap;
|
|
12
|
+
align-items: flex-start;
|
|
13
|
+
gap: calc(0.5rem) calc(5rem);
|
|
14
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component, forwardRef } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
2
3
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
3
4
|
import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
4
5
|
|
|
@@ -6,36 +7,6 @@ import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
|
6
7
|
selector: 'app-details',
|
|
7
8
|
templateUrl: './details.component.html',
|
|
8
9
|
styleUrls: ['./details.component.scss'],
|
|
9
|
-
imports: [forwardRef(() => ComponentMapperComponent)]
|
|
10
|
+
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
10
11
|
})
|
|
11
|
-
export class DetailsComponent extends DetailsTemplateBase {
|
|
12
|
-
override pConn$: typeof PConnect;
|
|
13
|
-
|
|
14
|
-
highlightedDataArr: any[] = [];
|
|
15
|
-
showHighlightedData: boolean;
|
|
16
|
-
arFields$: any[] = [];
|
|
17
|
-
|
|
18
|
-
override updateSelf() {
|
|
19
|
-
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
20
|
-
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
21
|
-
|
|
22
|
-
if (this.showHighlightedData) {
|
|
23
|
-
const highlightedData = rawMetaData?.highlightedData;
|
|
24
|
-
this.highlightedDataArr = highlightedData.map(field => {
|
|
25
|
-
field.config.displayMode = 'STACKED_LARGE_VAL';
|
|
26
|
-
|
|
27
|
-
if (field.config.value === '@P .pyStatusWork') {
|
|
28
|
-
field.type = 'TextInput';
|
|
29
|
-
field.config.displayAsStatus = true;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
return field;
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
const kids = this.pConn$.getChildren() as any[];
|
|
37
|
-
for (const kid of kids) {
|
|
38
|
-
this.arFields$ = this.processDetailFields(kid);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
12
|
+
export class DetailsComponent extends DetailsTemplateBase {}
|
|
@@ -1,4 +1,23 @@
|
|
|
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
|
+
<ng-container *ngIf="showHighlightedData && highlightedDataArr.length > 0">
|
|
8
|
+
<div class="psdk-grid-highlighted">
|
|
9
|
+
<component-mapper
|
|
10
|
+
*ngFor="let field of highlightedDataArr"
|
|
11
|
+
[name]="field.getComponentName()"
|
|
12
|
+
[props]="{ pConn$: field, formGroup$ }"
|
|
13
|
+
></component-mapper>
|
|
14
|
+
</div>
|
|
15
|
+
</ng-container>
|
|
16
|
+
<div class="psdk-grid-filter-narrow-wide">
|
|
17
|
+
<component-mapper
|
|
18
|
+
*ngFor="let child of children"
|
|
19
|
+
[name]="child.getPConnect().getComponentName()"
|
|
20
|
+
[props]="{ pConn$: child.getPConnect(), formGroup$ }"
|
|
21
|
+
></component-mapper>
|
|
22
|
+
</div>
|
|
23
|
+
</ng-template>
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
.psdk-grid-filter {
|
|
1
|
+
.psdk-grid-filter-narrow-wide {
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-template-columns: 3fr 7fr;
|
|
4
4
|
column-gap: calc(2 * 0.5rem);
|
|
5
5
|
row-gap: calc(2 * 0.5rem);
|
|
6
6
|
align-items: start;
|
|
7
7
|
}
|
|
8
|
+
|
|
9
|
+
.psdk-grid-highlighted {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-wrap: wrap;
|
|
12
|
+
align-items: flex-start;
|
|
13
|
+
gap: calc(0.5rem) calc(5rem);
|
|
14
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component, forwardRef } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
2
3
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
3
4
|
import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
4
5
|
|
|
@@ -6,41 +7,6 @@ import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
|
6
7
|
selector: 'app-details-narrow-wide',
|
|
7
8
|
templateUrl: './details-narrow-wide.component.html',
|
|
8
9
|
styleUrls: ['./details-narrow-wide.component.scss'],
|
|
9
|
-
imports: [forwardRef(() => ComponentMapperComponent)]
|
|
10
|
+
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
10
11
|
})
|
|
11
|
-
export class DetailsNarrowWideComponent extends DetailsTemplateBase {
|
|
12
|
-
override pConn$: typeof PConnect;
|
|
13
|
-
|
|
14
|
-
arFields$: any[] = [];
|
|
15
|
-
arFields2$: any[] = [];
|
|
16
|
-
highlightedDataArr: any[] = [];
|
|
17
|
-
showHighlightedData: boolean;
|
|
18
|
-
|
|
19
|
-
override updateSelf() {
|
|
20
|
-
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
21
|
-
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
22
|
-
|
|
23
|
-
if (this.showHighlightedData) {
|
|
24
|
-
const highlightedData = rawMetaData?.highlightedData;
|
|
25
|
-
this.highlightedDataArr = highlightedData.map(field => {
|
|
26
|
-
field.config.displayMode = 'STACKED_LARGE_VAL';
|
|
27
|
-
|
|
28
|
-
if (field.config.value === '@P .pyStatusWork') {
|
|
29
|
-
field.type = 'TextInput';
|
|
30
|
-
field.config.displayAsStatus = true;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return field;
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
const kids = this.pConn$.getChildren() as any[];
|
|
38
|
-
for (const kid of kids) {
|
|
39
|
-
if (kids.indexOf(kid) == 0) {
|
|
40
|
-
this.arFields$ = this.processDetailFields(kid);
|
|
41
|
-
} else {
|
|
42
|
-
this.arFields2$ = this.processDetailFields(kid);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
12
|
+
export class DetailsNarrowWideComponent extends DetailsTemplateBase {}
|
|
@@ -1 +1,23 @@
|
|
|
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
|
+
<ng-container *ngIf="showHighlightedData && highlightedDataArr.length > 0">
|
|
8
|
+
<div class="psdk-grid-highlighted">
|
|
9
|
+
<component-mapper
|
|
10
|
+
*ngFor="let field of highlightedDataArr"
|
|
11
|
+
[name]="field.getComponentName()"
|
|
12
|
+
[props]="{ pConn$: field, formGroup$ }"
|
|
13
|
+
></component-mapper>
|
|
14
|
+
</div>
|
|
15
|
+
</ng-container>
|
|
16
|
+
<div class="psdk-grid-filter-1">
|
|
17
|
+
<component-mapper
|
|
18
|
+
*ngFor="let child of children"
|
|
19
|
+
[name]="child.getPConnect().getComponentName()"
|
|
20
|
+
[props]="{ pConn$: child.getPConnect(), formGroup$ }"
|
|
21
|
+
></component-mapper>
|
|
22
|
+
</div>
|
|
23
|
+
</ng-template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
.psdk-grid-filter-1 {
|
|
2
|
+
display: grid;
|
|
3
|
+
grid-template-columns: repeat(1, minmax(0, 1fr));
|
|
4
|
+
column-gap: calc(2 * 0.5rem);
|
|
5
|
+
row-gap: calc(2 * 0.5rem);
|
|
6
|
+
align-items: start;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.psdk-grid-highlighted {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-wrap: wrap;
|
|
12
|
+
align-items: flex-start;
|
|
13
|
+
gap: calc(0.5rem) calc(5rem);
|
|
14
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component, forwardRef } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
2
3
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
3
4
|
import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
4
5
|
|
|
@@ -6,42 +7,6 @@ import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
|
6
7
|
selector: 'app-details-one-column',
|
|
7
8
|
templateUrl: './details-one-column.component.html',
|
|
8
9
|
styleUrls: ['./details-one-column.component.scss'],
|
|
9
|
-
imports: [forwardRef(() => ComponentMapperComponent)]
|
|
10
|
+
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
10
11
|
})
|
|
11
|
-
export class DetailsOneColumnComponent extends DetailsTemplateBase {
|
|
12
|
-
override pConn$: typeof PConnect;
|
|
13
|
-
|
|
14
|
-
showHighlightedData: boolean;
|
|
15
|
-
highlightedDataArr: any;
|
|
16
|
-
|
|
17
|
-
arFields$: any[] = [];
|
|
18
|
-
|
|
19
|
-
override updateSelf() {
|
|
20
|
-
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
21
|
-
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
22
|
-
|
|
23
|
-
if (this.showHighlightedData) {
|
|
24
|
-
const highlightedData = rawMetaData?.highlightedData;
|
|
25
|
-
this.highlightedDataArr = highlightedData.map(field => {
|
|
26
|
-
field.config.displayMode = 'STACKED_LARGE_VAL';
|
|
27
|
-
|
|
28
|
-
if (field.config.value === '@P .pyStatusWork') {
|
|
29
|
-
field.type = 'TextInput';
|
|
30
|
-
field.config.displayAsStatus = true;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return field;
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
38
|
-
this.pConn$.setInheritedProp('readOnly', true);
|
|
39
|
-
|
|
40
|
-
const kids = this.pConn$.getChildren() as any[];
|
|
41
|
-
for (const kid of kids) {
|
|
42
|
-
if (kids.indexOf(kid) == 0) {
|
|
43
|
-
this.arFields$ = this.processDetailFields(kid);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
12
|
+
export class DetailsOneColumnComponent extends DetailsTemplateBase {}
|
|
@@ -1,4 +1,23 @@
|
|
|
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
|
+
<ng-container *ngIf="showHighlightedData && highlightedDataArr.length > 0">
|
|
8
|
+
<div class="psdk-grid-highlighted">
|
|
9
|
+
<component-mapper
|
|
10
|
+
*ngFor="let field of highlightedDataArr"
|
|
11
|
+
[name]="field.getComponentName()"
|
|
12
|
+
[props]="{ pConn$: field, formGroup$ }"
|
|
13
|
+
></component-mapper>
|
|
14
|
+
</div>
|
|
15
|
+
</ng-container>
|
|
16
|
+
<div class="psdk-grid-filter-3">
|
|
17
|
+
<component-mapper
|
|
18
|
+
*ngFor="let child of children"
|
|
19
|
+
[name]="child.getPConnect().getComponentName()"
|
|
20
|
+
[props]="{ pConn$: child.getPConnect(), formGroup$ }"
|
|
21
|
+
></component-mapper>
|
|
22
|
+
</div>
|
|
23
|
+
</ng-template>
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
.psdk-grid-filter {
|
|
1
|
+
.psdk-grid-filter-3 {
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
4
4
|
column-gap: calc(2 * 0.5rem);
|
|
5
5
|
row-gap: calc(2 * 0.5rem);
|
|
6
6
|
align-items: start;
|
|
7
7
|
}
|
|
8
|
+
|
|
9
|
+
.psdk-grid-highlighted {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-wrap: wrap;
|
|
12
|
+
align-items: flex-start;
|
|
13
|
+
gap: calc(0.5rem) calc(5rem);
|
|
14
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component, forwardRef } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
2
3
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
3
4
|
import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
4
5
|
|
|
@@ -6,50 +7,6 @@ import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
|
6
7
|
selector: 'app-details-three-column',
|
|
7
8
|
templateUrl: './details-three-column.component.html',
|
|
8
9
|
styleUrls: ['./details-three-column.component.scss'],
|
|
9
|
-
imports: [forwardRef(() => ComponentMapperComponent)]
|
|
10
|
+
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
10
11
|
})
|
|
11
|
-
export class DetailsThreeColumnComponent extends DetailsTemplateBase {
|
|
12
|
-
override pConn$: typeof PConnect;
|
|
13
|
-
|
|
14
|
-
showHighlightedData: boolean;
|
|
15
|
-
highlightedDataArr: any;
|
|
16
|
-
|
|
17
|
-
arFields$: any[] = [];
|
|
18
|
-
arFields2$: any[] = [];
|
|
19
|
-
arFields3$: any[] = [];
|
|
20
|
-
|
|
21
|
-
propsToUse: any = {};
|
|
22
|
-
|
|
23
|
-
override updateSelf() {
|
|
24
|
-
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
25
|
-
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
26
|
-
|
|
27
|
-
if (this.showHighlightedData) {
|
|
28
|
-
const highlightedData = rawMetaData?.highlightedData;
|
|
29
|
-
this.highlightedDataArr = highlightedData.map(field => {
|
|
30
|
-
field.config.displayMode = 'STACKED_LARGE_VAL';
|
|
31
|
-
|
|
32
|
-
if (field.config.value === '@P .pyStatusWork') {
|
|
33
|
-
field.type = 'TextInput';
|
|
34
|
-
field.config.displayAsStatus = true;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return field;
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
42
|
-
this.pConn$.setInheritedProp('readOnly', true);
|
|
43
|
-
|
|
44
|
-
const kids = this.pConn$.getChildren() as any[];
|
|
45
|
-
for (const kid of kids) {
|
|
46
|
-
if (kids.indexOf(kid) == 0) {
|
|
47
|
-
this.arFields$ = this.processDetailFields(kid);
|
|
48
|
-
} else if (kids.indexOf(kid) == 1) {
|
|
49
|
-
this.arFields2$ = this.processDetailFields(kid);
|
|
50
|
-
} else {
|
|
51
|
-
this.arFields3$ = this.processDetailFields(kid);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
12
|
+
export class DetailsThreeColumnComponent extends DetailsTemplateBase {}
|
|
@@ -1,4 +1,23 @@
|
|
|
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
|
+
<ng-container *ngIf="showHighlightedData && highlightedDataArr.length > 0">
|
|
8
|
+
<div class="psdk-grid-highlighted">
|
|
9
|
+
<component-mapper
|
|
10
|
+
*ngFor="let field of highlightedDataArr"
|
|
11
|
+
[name]="field.getComponentName()"
|
|
12
|
+
[props]="{ pConn$: field, formGroup$ }"
|
|
13
|
+
></component-mapper>
|
|
14
|
+
</div>
|
|
15
|
+
</ng-container>
|
|
16
|
+
<div class="psdk-grid-filter-2">
|
|
17
|
+
<component-mapper
|
|
18
|
+
*ngFor="let child of children"
|
|
19
|
+
[name]="child.getPConnect().getComponentName()"
|
|
20
|
+
[props]="{ pConn$: child.getPConnect(), formGroup$ }"
|
|
21
|
+
></component-mapper>
|
|
22
|
+
</div>
|
|
23
|
+
</ng-template>
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
.psdk-grid-filter {
|
|
1
|
+
.psdk-grid-filter-2 {
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
4
4
|
column-gap: calc(2 * 0.5rem);
|
|
5
5
|
row-gap: calc(2 * 0.5rem);
|
|
6
6
|
align-items: start;
|
|
7
7
|
}
|
|
8
|
+
|
|
9
|
+
.psdk-grid-highlighted {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-wrap: wrap;
|
|
12
|
+
align-items: flex-start;
|
|
13
|
+
gap: calc(0.5rem) calc(5rem);
|
|
14
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component, forwardRef } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
2
3
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
3
4
|
import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
4
5
|
|
|
@@ -6,48 +7,6 @@ import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
|
6
7
|
selector: 'app-details-two-column',
|
|
7
8
|
templateUrl: './details-two-column.component.html',
|
|
8
9
|
styleUrls: ['./details-two-column.component.scss'],
|
|
9
|
-
imports: [forwardRef(() => ComponentMapperComponent)]
|
|
10
|
+
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
10
11
|
})
|
|
11
|
-
export class DetailsTwoColumnComponent extends DetailsTemplateBase {
|
|
12
|
-
override pConn$: typeof PConnect;
|
|
13
|
-
|
|
14
|
-
showHighlightedData: boolean;
|
|
15
|
-
highlightedDataArr: any;
|
|
16
|
-
|
|
17
|
-
arFields$: any[] = [];
|
|
18
|
-
arFields2$: any[] = [];
|
|
19
|
-
arFields3$: any[] = [];
|
|
20
|
-
|
|
21
|
-
propsToUse: any = {};
|
|
22
|
-
|
|
23
|
-
override updateSelf() {
|
|
24
|
-
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
25
|
-
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
26
|
-
|
|
27
|
-
if (this.showHighlightedData) {
|
|
28
|
-
const highlightedData = rawMetaData?.highlightedData;
|
|
29
|
-
this.highlightedDataArr = highlightedData?.map(field => {
|
|
30
|
-
field.config.displayMode = 'STACKED_LARGE_VAL';
|
|
31
|
-
|
|
32
|
-
if (field.config.value === '@P .pyStatusWork') {
|
|
33
|
-
field.type = 'TextInput';
|
|
34
|
-
field.config.displayAsStatus = true;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return field;
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
42
|
-
this.pConn$.setInheritedProp('readOnly', true);
|
|
43
|
-
|
|
44
|
-
const kids = this.pConn$.getChildren() as any[];
|
|
45
|
-
for (const kid of kids) {
|
|
46
|
-
if (kids.indexOf(kid) == 0) {
|
|
47
|
-
this.arFields$ = this.processDetailFields(kid);
|
|
48
|
-
} else {
|
|
49
|
-
this.arFields2$ = this.processDetailFields(kid);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
12
|
+
export class DetailsTwoColumnComponent extends DetailsTemplateBase {}
|
|
@@ -1,4 +1,23 @@
|
|
|
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
|
+
<ng-container *ngIf="showHighlightedData && highlightedDataArr.length > 0">
|
|
8
|
+
<div class="psdk-grid-highlighted">
|
|
9
|
+
<component-mapper
|
|
10
|
+
*ngFor="let field of highlightedDataArr"
|
|
11
|
+
[name]="field.getComponentName()"
|
|
12
|
+
[props]="{ pConn$: field, formGroup$ }"
|
|
13
|
+
></component-mapper>
|
|
14
|
+
</div>
|
|
15
|
+
</ng-container>
|
|
16
|
+
<div class="psdk-grid-filter-wide-narrow">
|
|
17
|
+
<component-mapper
|
|
18
|
+
*ngFor="let child of children"
|
|
19
|
+
[name]="child.getPConnect().getComponentName()"
|
|
20
|
+
[props]="{ pConn$: child.getPConnect(), formGroup$ }"
|
|
21
|
+
></component-mapper>
|
|
22
|
+
</div>
|
|
23
|
+
</ng-template>
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
.psdk-grid-filter {
|
|
1
|
+
.psdk-grid-filter-wide-narrow {
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-template-columns: 7fr 3fr;
|
|
4
4
|
column-gap: calc(2 * 0.5rem);
|
|
5
5
|
row-gap: calc(2 * 0.5rem);
|
|
6
6
|
align-items: start;
|
|
7
7
|
}
|
|
8
|
+
|
|
9
|
+
.psdk-grid-highlighted {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-wrap: wrap;
|
|
12
|
+
align-items: flex-start;
|
|
13
|
+
gap: calc(0.5rem) calc(5rem);
|
|
14
|
+
}
|