@pega/angular-sdk-overrides 0.242.4 → 0.242.5
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/dropdown/dropdown.component.ts +29 -15
- package/lib/template/base/details-template-base.ts +67 -0
- package/lib/template/{form-template-base/form-template-base.component.ts → base/form-template-base.ts} +1 -1
- package/lib/template/case-view/case-view.component.html +4 -4
- package/lib/template/case-view/case-view.component.ts +7 -12
- package/lib/template/default-form/default-form.component.ts +2 -2
- package/lib/template/details/details.component.ts +5 -39
- package/lib/template/details-narrow-wide/details-narrow-wide.component.ts +5 -38
- package/lib/template/details-one-column/details-one-column.component.ts +5 -40
- package/lib/template/details-sub-tabs/details-sub-tabs.component.html +1 -2
- package/lib/template/details-sub-tabs/details-sub-tabs.component.ts +5 -37
- package/lib/template/details-three-column/details-three-column.component.ts +5 -41
- package/lib/template/details-two-column/details-two-column.component.ts +5 -41
- package/lib/template/details-wide-narrow/details-wide-narrow.component.ts +5 -40
- package/lib/template/one-column/one-column.component.ts +2 -2
- package/lib/template/three-column/three-column.component.ts +2 -2
- package/lib/template/two-column/two-column.component.ts +2 -2
- package/lib/template/wide-narrow-form/wide-narrow-form.component.ts +2 -2
- package/package.json +1 -1
|
@@ -279,25 +279,39 @@ export class DropdownComponent implements OnInit, OnDestroy {
|
|
|
279
279
|
|
|
280
280
|
columns = preProcessColumns(columns) || [];
|
|
281
281
|
if (!this.displayMode$ && listType !== 'associated' && typeof datasource === 'string') {
|
|
282
|
-
this.getData(datasource, parameters, columns, context);
|
|
282
|
+
this.getData(datasource, parameters, columns, context, listType);
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
285
|
|
|
286
|
-
getData(
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
286
|
+
getData(dataSource, parameters, columns, context, listType) {
|
|
287
|
+
const dataConfig: any = {
|
|
288
|
+
columns,
|
|
289
|
+
dataSource,
|
|
290
|
+
deferDatasource: true,
|
|
291
|
+
listType,
|
|
292
|
+
parameters,
|
|
293
|
+
matchPosition: 'contains',
|
|
294
|
+
maxResultsDisplay: '5000',
|
|
295
|
+
cacheLifeSpan: 'form'
|
|
296
|
+
};
|
|
297
|
+
PCore.getDataApi()
|
|
298
|
+
.init(dataConfig, context)
|
|
299
|
+
.then((dataApiObj: any) => {
|
|
300
|
+
const optionsData: any[] = [];
|
|
301
|
+
const displayColumn = getDisplayFieldsMetaData(columns);
|
|
302
|
+
dataApiObj?.fetchData('').then(response => {
|
|
303
|
+
response.data?.forEach(element => {
|
|
304
|
+
const val = element[displayColumn.primary]?.toString();
|
|
305
|
+
const obj = {
|
|
306
|
+
key: element[displayColumn.key] || element.pyGUID,
|
|
307
|
+
value: val
|
|
308
|
+
};
|
|
309
|
+
optionsData.push(obj);
|
|
310
|
+
});
|
|
311
|
+
optionsData?.unshift({ key: 'Select', value: this.pConn$.getLocalizedValue('Select...', '', '') });
|
|
312
|
+
this.options$ = optionsData;
|
|
313
|
+
});
|
|
297
314
|
});
|
|
298
|
-
optionsData?.unshift({ key: 'Select', value: this.pConn$.getLocalizedValue('Select...', '', '') });
|
|
299
|
-
this.options$ = optionsData;
|
|
300
|
-
});
|
|
301
315
|
}
|
|
302
316
|
|
|
303
317
|
isSelected(buttonValue: string): boolean {
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Directive, OnInit, OnDestroy, Injector, Input } from '@angular/core';
|
|
2
|
+
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
3
|
+
|
|
4
|
+
@Directive()
|
|
5
|
+
export class DetailsTemplateBase implements OnInit, OnDestroy {
|
|
6
|
+
@Input() pConn$: typeof PConnect;
|
|
7
|
+
|
|
8
|
+
// For interaction with AngularPConnect
|
|
9
|
+
protected angularPConnectData: AngularPConnectData = {};
|
|
10
|
+
protected angularPConnect;
|
|
11
|
+
|
|
12
|
+
childrenMetadataOld;
|
|
13
|
+
|
|
14
|
+
constructor(injector: Injector) {
|
|
15
|
+
this.angularPConnect = injector.get(AngularPConnectService);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
ngOnInit(): void {
|
|
19
|
+
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
20
|
+
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
21
|
+
|
|
22
|
+
this.checkAndUpdate();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
ngOnDestroy() {
|
|
26
|
+
if (this.angularPConnectData.unsubscribeFn) {
|
|
27
|
+
this.angularPConnectData.unsubscribeFn();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
onStateChange() {
|
|
32
|
+
this.checkAndUpdate();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
checkAndUpdate() {
|
|
36
|
+
// Should always check the bridge to see if the component should update itself (re-render)
|
|
37
|
+
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
38
|
+
|
|
39
|
+
// Only call updateSelf when the component should update
|
|
40
|
+
if (bUpdateSelf || this.hasRawMetadataChanged()) {
|
|
41
|
+
this.updateSelf();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// this method will get overriden by the child component
|
|
46
|
+
updateSelf() {}
|
|
47
|
+
|
|
48
|
+
hasRawMetadataChanged(): boolean {
|
|
49
|
+
const newChildrenMetadata = this.fetchChildrenMetadata();
|
|
50
|
+
|
|
51
|
+
if (!PCore.isDeepEqual(newChildrenMetadata, this.childrenMetadataOld)) {
|
|
52
|
+
this.childrenMetadataOld = newChildrenMetadata;
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
fetchChildrenMetadata() {
|
|
60
|
+
const children = this.pConn$.getChildren() || [];
|
|
61
|
+
|
|
62
|
+
return children.map(child => {
|
|
63
|
+
const pConnect = child.getPConnect();
|
|
64
|
+
return pConnect.resolveConfigProps(pConnect.getRawMetadata());
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div class="psdk-case-view" id="case-view">
|
|
2
|
-
<div
|
|
2
|
+
<div class="psdk-case-view-info">
|
|
3
3
|
<mat-toolbar color="primary" class="psdk-case-view-toolbar">
|
|
4
4
|
<mat-toolbar-row style="padding-left: 1rem">
|
|
5
5
|
<div class="psdk-case-icon-div">
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
></component-mapper>
|
|
48
48
|
</div>
|
|
49
49
|
<div class="psdk-case-view-main">
|
|
50
|
-
<div
|
|
50
|
+
<div>
|
|
51
51
|
<div *ngFor="let kid of arChildren$">
|
|
52
52
|
<div
|
|
53
53
|
*ngIf="
|
|
@@ -73,11 +73,11 @@
|
|
|
73
73
|
</div>
|
|
74
74
|
</div>
|
|
75
75
|
|
|
76
|
-
<div
|
|
76
|
+
<div>
|
|
77
77
|
<component-mapper name="DeferLoad" [props]="{ pConn$, loadData$: tabData$, name: tabData$?.config?.name }"></component-mapper>
|
|
78
78
|
</div>
|
|
79
79
|
</div>
|
|
80
|
-
<div
|
|
80
|
+
<div>
|
|
81
81
|
<div *ngIf="arChildren$" class="psdk-case-view-utilities">
|
|
82
82
|
<div *ngFor="let kid of arChildren$">
|
|
83
83
|
<div *ngIf="kid.getPConnect().getRawMetadata()?.type.toLowerCase() == 'region' && kid.getPConnect().getRawMetadata()?.name == 'Utilities'">
|
|
@@ -27,7 +27,6 @@ interface CaseViewProps {
|
|
|
27
27
|
export class CaseViewComponent implements OnInit, OnDestroy {
|
|
28
28
|
@Input() pConn$: typeof PConnect;
|
|
29
29
|
@Input() formGroup$: FormGroup;
|
|
30
|
-
@Input() displayOnlyFA$: boolean;
|
|
31
30
|
|
|
32
31
|
// Used with AngularPConnect
|
|
33
32
|
angularPConnectData: AngularPConnectData = {};
|
|
@@ -161,19 +160,15 @@ export class CaseViewComponent implements OnInit, OnDestroy {
|
|
|
161
160
|
|
|
162
161
|
this.svgCase$ = this.utils.getImageSrc(this.configProps$.icon, this.utils.getSDKStaticContentUrl());
|
|
163
162
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
if (kidPConn.getRawMetadata().name == 'Tabs') {
|
|
170
|
-
this.mainTabs = kid;
|
|
171
|
-
this.mainTabData = this.mainTabs.getPConnect().getChildren();
|
|
172
|
-
}
|
|
163
|
+
for (const kid of this.arChildren$) {
|
|
164
|
+
const kidPConn = kid.getPConnect();
|
|
165
|
+
if (kidPConn.getRawMetadata().name == 'Tabs') {
|
|
166
|
+
this.mainTabs = kid;
|
|
167
|
+
this.mainTabData = this.mainTabs.getPConnect().getChildren();
|
|
173
168
|
}
|
|
174
|
-
|
|
175
|
-
this.generateTabsData();
|
|
176
169
|
}
|
|
170
|
+
|
|
171
|
+
this.generateTabsData();
|
|
177
172
|
}
|
|
178
173
|
|
|
179
174
|
generateTabsData() {
|
|
@@ -4,7 +4,7 @@ import { FormGroup } from '@angular/forms';
|
|
|
4
4
|
import { ReferenceComponent } from '@pega/angular-sdk-components';
|
|
5
5
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
6
6
|
import { TemplateUtils } from '@pega/angular-sdk-components';
|
|
7
|
-
import {
|
|
7
|
+
import { FormTemplateBase } from '@pega/angular-sdk-components';
|
|
8
8
|
|
|
9
9
|
interface DefaultFormProps {
|
|
10
10
|
// If any, enter additional props that only exist on this component
|
|
@@ -19,7 +19,7 @@ interface DefaultFormProps {
|
|
|
19
19
|
standalone: true,
|
|
20
20
|
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
21
21
|
})
|
|
22
|
-
export class DefaultFormComponent extends
|
|
22
|
+
export class DefaultFormComponent extends FormTemplateBase implements OnInit {
|
|
23
23
|
@Input() override pConn$: typeof PConnect;
|
|
24
24
|
@Input() formGroup$: FormGroup;
|
|
25
25
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Component,
|
|
2
|
-
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
1
|
+
import { Component, forwardRef } from '@angular/core';
|
|
3
2
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
3
|
+
import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
4
4
|
|
|
5
5
|
@Component({
|
|
6
6
|
selector: 'app-details',
|
|
@@ -9,48 +9,14 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
9
9
|
standalone: true,
|
|
10
10
|
imports: [forwardRef(() => ComponentMapperComponent)]
|
|
11
11
|
})
|
|
12
|
-
export class DetailsComponent
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
@Input() pConn$: typeof PConnect;
|
|
12
|
+
export class DetailsComponent extends DetailsTemplateBase {
|
|
13
|
+
override pConn$: typeof PConnect;
|
|
16
14
|
|
|
17
15
|
highlightedDataArr: any[] = [];
|
|
18
16
|
showHighlightedData: boolean;
|
|
19
17
|
arFields$: any[] = [];
|
|
20
18
|
|
|
21
|
-
|
|
22
|
-
angularPConnectData: AngularPConnectData = {};
|
|
23
|
-
|
|
24
|
-
ngOnInit(): void {
|
|
25
|
-
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
26
|
-
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
27
|
-
|
|
28
|
-
// this.updateSelf();
|
|
29
|
-
this.checkAndUpdate();
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
ngOnDestroy() {
|
|
33
|
-
if (this.angularPConnectData.unsubscribeFn) {
|
|
34
|
-
this.angularPConnectData.unsubscribeFn();
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
onStateChange() {
|
|
39
|
-
this.checkAndUpdate();
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
checkAndUpdate() {
|
|
43
|
-
// Should always check the bridge to see if the component should
|
|
44
|
-
// update itself (re-render)
|
|
45
|
-
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
46
|
-
|
|
47
|
-
// ONLY call updateSelf when the component should update
|
|
48
|
-
if (bUpdateSelf) {
|
|
49
|
-
this.updateSelf();
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
updateSelf() {
|
|
19
|
+
override updateSelf() {
|
|
54
20
|
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
55
21
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
56
22
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Component,
|
|
2
|
-
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
1
|
+
import { Component, forwardRef } from '@angular/core';
|
|
3
2
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
3
|
+
import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
4
4
|
|
|
5
5
|
@Component({
|
|
6
6
|
selector: 'app-details-narrow-wide',
|
|
@@ -9,48 +9,15 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
9
9
|
standalone: true,
|
|
10
10
|
imports: [forwardRef(() => ComponentMapperComponent)]
|
|
11
11
|
})
|
|
12
|
-
export class DetailsNarrowWideComponent
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
@Input() pConn$: typeof PConnect;
|
|
12
|
+
export class DetailsNarrowWideComponent extends DetailsTemplateBase {
|
|
13
|
+
override pConn$: typeof PConnect;
|
|
16
14
|
|
|
17
15
|
arFields$: any[] = [];
|
|
18
16
|
arFields2$: any[] = [];
|
|
19
17
|
highlightedDataArr: any[] = [];
|
|
20
18
|
showHighlightedData: boolean;
|
|
21
|
-
// Used with AngularPConnect
|
|
22
|
-
angularPConnectData: AngularPConnectData = {};
|
|
23
|
-
|
|
24
|
-
ngOnInit(): void {
|
|
25
|
-
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
26
|
-
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
27
|
-
|
|
28
|
-
// this.updateSelf();
|
|
29
|
-
this.checkAndUpdate();
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
ngOnDestroy() {
|
|
33
|
-
if (this.angularPConnectData.unsubscribeFn) {
|
|
34
|
-
this.angularPConnectData.unsubscribeFn();
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
onStateChange() {
|
|
39
|
-
this.checkAndUpdate();
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
checkAndUpdate() {
|
|
43
|
-
// Should always check the bridge to see if the component should
|
|
44
|
-
// update itself (re-render)
|
|
45
|
-
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
46
|
-
|
|
47
|
-
// ONLY call updateSelf when the component should update
|
|
48
|
-
if (bUpdateSelf) {
|
|
49
|
-
this.updateSelf();
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
19
|
|
|
53
|
-
updateSelf() {
|
|
20
|
+
override updateSelf() {
|
|
54
21
|
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
55
22
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
56
23
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Component,
|
|
2
|
-
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
3
|
-
import { FormGroup } from '@angular/forms';
|
|
1
|
+
import { Component, forwardRef } from '@angular/core';
|
|
4
2
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
3
|
+
import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
5
4
|
|
|
6
5
|
@Component({
|
|
7
6
|
selector: 'app-details-one-column',
|
|
@@ -10,49 +9,15 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
10
9
|
standalone: true,
|
|
11
10
|
imports: [forwardRef(() => ComponentMapperComponent)]
|
|
12
11
|
})
|
|
13
|
-
export class DetailsOneColumnComponent
|
|
14
|
-
|
|
12
|
+
export class DetailsOneColumnComponent extends DetailsTemplateBase {
|
|
13
|
+
override pConn$: typeof PConnect;
|
|
15
14
|
|
|
16
|
-
@Input() pConn$: typeof PConnect;
|
|
17
|
-
@Input() formGroup$: FormGroup;
|
|
18
15
|
showHighlightedData: boolean;
|
|
19
16
|
highlightedDataArr: any;
|
|
20
17
|
|
|
21
18
|
arFields$: any[] = [];
|
|
22
19
|
|
|
23
|
-
|
|
24
|
-
angularPConnectData: AngularPConnectData = {};
|
|
25
|
-
|
|
26
|
-
ngOnInit(): void {
|
|
27
|
-
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
28
|
-
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
29
|
-
|
|
30
|
-
// this.updateSelf();
|
|
31
|
-
this.checkAndUpdate();
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
ngOnDestroy() {
|
|
35
|
-
if (this.angularPConnectData.unsubscribeFn) {
|
|
36
|
-
this.angularPConnectData.unsubscribeFn();
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
onStateChange() {
|
|
41
|
-
this.checkAndUpdate();
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
checkAndUpdate() {
|
|
45
|
-
// Should always check the bridge to see if the component should
|
|
46
|
-
// update itself (re-render)
|
|
47
|
-
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
48
|
-
|
|
49
|
-
// ONLY call updateSelf when the component should update
|
|
50
|
-
if (bUpdateSelf) {
|
|
51
|
-
this.updateSelf();
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
updateSelf() {
|
|
20
|
+
override updateSelf() {
|
|
56
21
|
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
57
22
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
58
23
|
|
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
*ngIf="tab.content?.getPConnect()"
|
|
6
6
|
[name]="tab.content?.getPConnect().getComponentName()"
|
|
7
7
|
[props]="{
|
|
8
|
-
pConn$: tab.content?.getPConnect()
|
|
9
|
-
formGroup$: formGroup$
|
|
8
|
+
pConn$: tab.content?.getPConnect()
|
|
10
9
|
}"
|
|
11
10
|
errorMsg="Details Sub tabs wants component not yet available: {{ tab.content?.getPConnect().getComponentName() }}"
|
|
12
11
|
></component-mapper>
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { Component,
|
|
1
|
+
import { Component, forwardRef } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { FormGroup } from '@angular/forms';
|
|
4
3
|
import { MatTabsModule } from '@angular/material/tabs';
|
|
5
|
-
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
6
4
|
import { getTransientTabs, getVisibleTabs, tabClick } from '@pega/angular-sdk-components';
|
|
7
5
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
6
|
+
import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
8
7
|
|
|
9
8
|
@Component({
|
|
10
9
|
selector: 'app-details-sub-tabs',
|
|
@@ -13,45 +12,14 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
13
12
|
standalone: true,
|
|
14
13
|
imports: [MatTabsModule, CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
15
14
|
})
|
|
16
|
-
export class DetailsSubTabsComponent
|
|
17
|
-
|
|
18
|
-
@Input() formGroup$: FormGroup;
|
|
15
|
+
export class DetailsSubTabsComponent extends DetailsTemplateBase {
|
|
16
|
+
override pConn$: typeof PConnect;
|
|
19
17
|
|
|
20
|
-
angularPConnectData: AngularPConnectData = {};
|
|
21
18
|
currentTabId = '0';
|
|
22
19
|
tabItems: any[];
|
|
23
20
|
availableTabs: any[];
|
|
24
21
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
ngOnInit(): void {
|
|
28
|
-
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
29
|
-
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
30
|
-
this.checkAndUpdate();
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
ngOnDestroy() {
|
|
34
|
-
if (this.angularPConnectData.unsubscribeFn) {
|
|
35
|
-
this.angularPConnectData.unsubscribeFn();
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
onStateChange() {
|
|
40
|
-
this.checkAndUpdate();
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
checkAndUpdate() {
|
|
44
|
-
// Should always check the bridge to see if the component should
|
|
45
|
-
// update itself (re-render)
|
|
46
|
-
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
47
|
-
|
|
48
|
-
// ONLY call updateSelf when the component should update
|
|
49
|
-
if (bUpdateSelf) {
|
|
50
|
-
this.updateSelf();
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
updateSelf() {
|
|
22
|
+
override updateSelf() {
|
|
55
23
|
const children = this.pConn$?.getChildren();
|
|
56
24
|
const deferLoadedTabs = children[0];
|
|
57
25
|
this.availableTabs = getVisibleTabs(deferLoadedTabs, 'tabsSubs');
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Component,
|
|
2
|
-
import { FormGroup } from '@angular/forms';
|
|
3
|
-
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
1
|
+
import { Component, forwardRef } from '@angular/core';
|
|
4
2
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
3
|
+
import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
5
4
|
|
|
6
5
|
@Component({
|
|
7
6
|
selector: 'app-details-three-column',
|
|
@@ -10,11 +9,8 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
10
9
|
standalone: true,
|
|
11
10
|
imports: [forwardRef(() => ComponentMapperComponent)]
|
|
12
11
|
})
|
|
13
|
-
export class DetailsThreeColumnComponent
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
@Input() pConn$: typeof PConnect;
|
|
17
|
-
@Input() formGroup$: FormGroup;
|
|
12
|
+
export class DetailsThreeColumnComponent extends DetailsTemplateBase {
|
|
13
|
+
override pConn$: typeof PConnect;
|
|
18
14
|
|
|
19
15
|
showHighlightedData: boolean;
|
|
20
16
|
highlightedDataArr: any;
|
|
@@ -25,39 +21,7 @@ export class DetailsThreeColumnComponent implements OnInit, OnDestroy {
|
|
|
25
21
|
|
|
26
22
|
propsToUse: any = {};
|
|
27
23
|
|
|
28
|
-
|
|
29
|
-
angularPConnectData: AngularPConnectData = {};
|
|
30
|
-
|
|
31
|
-
ngOnInit(): void {
|
|
32
|
-
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
33
|
-
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
34
|
-
|
|
35
|
-
// this.updateSelf();
|
|
36
|
-
this.checkAndUpdate();
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
ngOnDestroy() {
|
|
40
|
-
if (this.angularPConnectData.unsubscribeFn) {
|
|
41
|
-
this.angularPConnectData.unsubscribeFn();
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
onStateChange() {
|
|
46
|
-
this.checkAndUpdate();
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
checkAndUpdate() {
|
|
50
|
-
// Should always check the bridge to see if the component should
|
|
51
|
-
// update itself (re-render)
|
|
52
|
-
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
53
|
-
|
|
54
|
-
// ONLY call updateSelf when the component should update
|
|
55
|
-
if (bUpdateSelf) {
|
|
56
|
-
this.updateSelf();
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
updateSelf() {
|
|
24
|
+
override updateSelf() {
|
|
61
25
|
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
62
26
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
63
27
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Component,
|
|
2
|
-
import { FormGroup } from '@angular/forms';
|
|
3
|
-
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
1
|
+
import { Component, forwardRef } from '@angular/core';
|
|
4
2
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
3
|
+
import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
5
4
|
|
|
6
5
|
@Component({
|
|
7
6
|
selector: 'app-details-two-column',
|
|
@@ -10,11 +9,8 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
10
9
|
standalone: true,
|
|
11
10
|
imports: [forwardRef(() => ComponentMapperComponent)]
|
|
12
11
|
})
|
|
13
|
-
export class DetailsTwoColumnComponent
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
@Input() pConn$: typeof PConnect;
|
|
17
|
-
@Input() formGroup$: FormGroup;
|
|
12
|
+
export class DetailsTwoColumnComponent extends DetailsTemplateBase {
|
|
13
|
+
override pConn$: typeof PConnect;
|
|
18
14
|
|
|
19
15
|
showHighlightedData: boolean;
|
|
20
16
|
highlightedDataArr: any;
|
|
@@ -25,39 +21,7 @@ export class DetailsTwoColumnComponent implements OnInit, OnDestroy {
|
|
|
25
21
|
|
|
26
22
|
propsToUse: any = {};
|
|
27
23
|
|
|
28
|
-
|
|
29
|
-
angularPConnectData: AngularPConnectData = {};
|
|
30
|
-
|
|
31
|
-
ngOnInit(): void {
|
|
32
|
-
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
33
|
-
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
34
|
-
|
|
35
|
-
// this.updateSelf();
|
|
36
|
-
this.checkAndUpdate();
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
ngOnDestroy() {
|
|
40
|
-
if (this.angularPConnectData.unsubscribeFn) {
|
|
41
|
-
this.angularPConnectData.unsubscribeFn();
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
onStateChange() {
|
|
46
|
-
this.checkAndUpdate();
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
checkAndUpdate() {
|
|
50
|
-
// Should always check the bridge to see if the component should
|
|
51
|
-
// update itself (re-render)
|
|
52
|
-
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
53
|
-
|
|
54
|
-
// ONLY call updateSelf when the component should update
|
|
55
|
-
if (bUpdateSelf) {
|
|
56
|
-
this.updateSelf();
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
updateSelf() {
|
|
24
|
+
override updateSelf() {
|
|
61
25
|
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
62
26
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
63
27
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Component,
|
|
2
|
-
import { FormGroup } from '@angular/forms';
|
|
3
|
-
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
1
|
+
import { Component, forwardRef } from '@angular/core';
|
|
4
2
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
3
|
+
import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
5
4
|
|
|
6
5
|
@Component({
|
|
7
6
|
selector: 'app-details-wide-narrow',
|
|
@@ -10,50 +9,16 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
10
9
|
standalone: true,
|
|
11
10
|
imports: [forwardRef(() => ComponentMapperComponent)]
|
|
12
11
|
})
|
|
13
|
-
export class DetailsWideNarrowComponent
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
@Input() pConn$: typeof PConnect;
|
|
17
|
-
@Input() formGroup$: FormGroup;
|
|
12
|
+
export class DetailsWideNarrowComponent extends DetailsTemplateBase {
|
|
13
|
+
override pConn$: typeof PConnect;
|
|
18
14
|
|
|
19
15
|
highlightedDataArr: any[] = [];
|
|
20
16
|
showHighlightedData: boolean;
|
|
21
17
|
arFields$: any[] = [];
|
|
22
18
|
arFields2$: any[] = [];
|
|
23
19
|
propsToUse: any = {};
|
|
24
|
-
// Used with AngularPConnect
|
|
25
|
-
angularPConnectData: AngularPConnectData = {};
|
|
26
|
-
|
|
27
|
-
ngOnInit(): void {
|
|
28
|
-
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
29
|
-
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
30
|
-
|
|
31
|
-
// this.updateSelf();
|
|
32
|
-
this.checkAndUpdate();
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
ngOnDestroy() {
|
|
36
|
-
if (this.angularPConnectData.unsubscribeFn) {
|
|
37
|
-
this.angularPConnectData.unsubscribeFn();
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
onStateChange() {
|
|
42
|
-
this.checkAndUpdate();
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
checkAndUpdate() {
|
|
46
|
-
// Should always check the bridge to see if the component should
|
|
47
|
-
// update itself (re-render)
|
|
48
|
-
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
49
|
-
|
|
50
|
-
// ONLY call updateSelf when the component should update
|
|
51
|
-
if (bUpdateSelf) {
|
|
52
|
-
this.updateSelf();
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
20
|
|
|
56
|
-
updateSelf() {
|
|
21
|
+
override updateSelf() {
|
|
57
22
|
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
58
23
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
59
24
|
|
|
@@ -2,7 +2,7 @@ import { Component, OnInit, Input, forwardRef, OnChanges, SimpleChanges } from '
|
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { FormGroup } from '@angular/forms';
|
|
4
4
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
5
|
-
import {
|
|
5
|
+
import { FormTemplateBase } from '@pega/angular-sdk-components';
|
|
6
6
|
|
|
7
7
|
@Component({
|
|
8
8
|
selector: 'app-one-column',
|
|
@@ -11,7 +11,7 @@ import { FormTemplateBaseComponent } from '@pega/angular-sdk-components';
|
|
|
11
11
|
standalone: true,
|
|
12
12
|
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
13
13
|
})
|
|
14
|
-
export class OneColumnComponent extends
|
|
14
|
+
export class OneColumnComponent extends FormTemplateBase implements OnInit, OnChanges {
|
|
15
15
|
@Input() override pConn$: typeof PConnect;
|
|
16
16
|
@Input() formGroup$: FormGroup;
|
|
17
17
|
|
|
@@ -2,7 +2,7 @@ import { Component, OnInit, Input, forwardRef, OnChanges, SimpleChanges } from '
|
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { FormGroup } from '@angular/forms';
|
|
4
4
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
5
|
-
import {
|
|
5
|
+
import { FormTemplateBase } from '@pega/angular-sdk-components';
|
|
6
6
|
|
|
7
7
|
@Component({
|
|
8
8
|
selector: 'app-three-column',
|
|
@@ -11,7 +11,7 @@ import { FormTemplateBaseComponent } from '@pega/angular-sdk-components';
|
|
|
11
11
|
standalone: true,
|
|
12
12
|
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
13
13
|
})
|
|
14
|
-
export class ThreeColumnComponent extends
|
|
14
|
+
export class ThreeColumnComponent extends FormTemplateBase implements OnInit, OnChanges {
|
|
15
15
|
@Input() override pConn$: typeof PConnect;
|
|
16
16
|
@Input() formGroup$: FormGroup;
|
|
17
17
|
|
|
@@ -2,7 +2,7 @@ import { Component, OnInit, Input, forwardRef, SimpleChanges, OnChanges } from '
|
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { FormGroup } from '@angular/forms';
|
|
4
4
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
5
|
-
import {
|
|
5
|
+
import { FormTemplateBase } from '@pega/angular-sdk-components';
|
|
6
6
|
|
|
7
7
|
@Component({
|
|
8
8
|
selector: 'app-two-column',
|
|
@@ -11,7 +11,7 @@ import { FormTemplateBaseComponent } from '@pega/angular-sdk-components';
|
|
|
11
11
|
standalone: true,
|
|
12
12
|
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
13
13
|
})
|
|
14
|
-
export class TwoColumnComponent extends
|
|
14
|
+
export class TwoColumnComponent extends FormTemplateBase implements OnInit, OnChanges {
|
|
15
15
|
@Input() override pConn$: typeof PConnect;
|
|
16
16
|
@Input() formGroup$: FormGroup;
|
|
17
17
|
|
|
@@ -2,7 +2,7 @@ import { Component, OnInit, Input, forwardRef, OnChanges, SimpleChanges } from '
|
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { FormGroup } from '@angular/forms';
|
|
4
4
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
5
|
-
import {
|
|
5
|
+
import { FormTemplateBase } from '@pega/angular-sdk-components';
|
|
6
6
|
|
|
7
7
|
@Component({
|
|
8
8
|
selector: 'app-wide-narrow-form',
|
|
@@ -11,7 +11,7 @@ import { FormTemplateBaseComponent } from '@pega/angular-sdk-components';
|
|
|
11
11
|
standalone: true,
|
|
12
12
|
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
13
13
|
})
|
|
14
|
-
export class WideNarrowFormComponent extends
|
|
14
|
+
export class WideNarrowFormComponent extends FormTemplateBase implements OnInit, OnChanges {
|
|
15
15
|
@Input() override pConn$: typeof PConnect;
|
|
16
16
|
@Input() formGroup$: FormGroup;
|
|
17
17
|
|