@pega/dx-component-builder-sdk 0.242.13 → 0.242.15
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/package.json +1 -1
- package/src/tasks/create/index.js +7 -5
- package/src/tasks/create/templates/SDK-Angular/field/Picklist/picklist.component.ts.mustache +29 -15
- package/src/tasks/create/templates/SDK-Angular/template/FORM/demo.stories.tsx.mustache +1 -4
- package/src/tasks/quarantine/index.js +4 -2
- package/tests/assets/sdk-a/components/create/override-sdk/field/dropdown/dropdown.component.ts +122 -7
- package/tests/assets/sdk-a/components/create/override-sdk/template/case-view/case-view.component.html +4 -4
- package/tests/assets/sdk-a/components/create/override-sdk/template/case-view/case-view.component.ts +7 -12
- package/tests/assets/sdk-a/components/create/override-sdk/template/default-form/default-form.component.ts +2 -2
- package/tests/assets/sdk-a/components/create/override-sdk/template/details/details.component.ts +5 -39
- package/tests/assets/sdk-a/components/create/override-sdk/template/details-narrow-wide/details-narrow-wide.component.ts +5 -38
- package/tests/assets/sdk-a/components/create/override-sdk/template/details-one-column/details-one-column.component.ts +5 -40
- package/tests/assets/sdk-a/components/create/override-sdk/template/details-sub-tabs/details-sub-tabs.component.html +1 -2
- package/tests/assets/sdk-a/components/create/override-sdk/template/details-sub-tabs/details-sub-tabs.component.ts +5 -37
- package/tests/assets/sdk-a/components/create/override-sdk/template/details-three-column/details-three-column.component.ts +5 -41
- package/tests/assets/sdk-a/components/create/override-sdk/template/details-two-column/details-two-column.component.ts +5 -41
- package/tests/assets/sdk-a/components/create/override-sdk/template/details-wide-narrow/details-wide-narrow.component.ts +5 -40
- package/tests/assets/sdk-a/components/create/override-sdk/template/one-column/one-column.component.ts +2 -2
- package/tests/assets/sdk-a/components/create/override-sdk/template/simple-table-manual/simple-table-manual.component.scss +1 -0
- package/tests/assets/sdk-a/components/create/override-sdk/template/three-column/three-column.component.ts +2 -2
- package/tests/assets/sdk-a/components/create/override-sdk/template/two-column/two-column.component.ts +2 -2
- package/tests/assets/sdk-a/components/create/override-sdk/template/wide-narrow-form/wide-narrow-form.component.ts +2 -2
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-picklist/pega-dxil-my-picklist.component.ts +29 -15
- package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-details/pega-dxil-my-details.component.ts +5 -39
- package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-form/demo.stories.tsx +1 -4
- package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-form/pega-dxil-my-form.component.ts +2 -2
- package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-two-column-details/pega-dxil-my-two-column-details.component.ts +6 -42
- package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-two-column-form/pega-dxil-my-two-column-form.component.ts +2 -2
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/dropdown/dropdown.component.ts +122 -7
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/case-view/case-view.component.html +4 -4
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/case-view/case-view.component.ts +7 -12
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/default-form/default-form.component.ts +2 -2
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/details/details.component.ts +5 -39
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/details-narrow-wide/details-narrow-wide.component.ts +5 -38
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/details-one-column/details-one-column.component.ts +5 -40
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/details-sub-tabs/details-sub-tabs.component.html +1 -2
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/details-sub-tabs/details-sub-tabs.component.ts +5 -37
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/details-three-column/details-three-column.component.ts +5 -41
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/details-two-column/details-two-column.component.ts +5 -41
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/details-wide-narrow/details-wide-narrow.component.ts +5 -40
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/one-column/one-column.component.ts +2 -2
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/simple-table-manual/simple-table-manual.component.scss +1 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/three-column/three-column.component.ts +2 -2
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/two-column/two-column.component.ts +2 -2
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/wide-narrow-form/wide-narrow-form.component.ts +2 -2
- package/tests/functional/sdk-a/localCreateAllListDeleteAllCustom.test.js +5 -5
- package/tests/functional/sdk-a/localCreateAllListDeleteAllOverride.test.js +5 -5
- package/tests/functional/sdk-a/localCreateBuildAllDeleteAllCustom.test.js +2 -2
- package/tests/functional/sdk-a/localCreateBuildDeleteCustom.test.js +2 -2
- package/tests/functional/sdk-a/localCreateBuildDeleteOverride.test.js +2 -2
- package/tests/functional/sdk-a/localCreateListDeleteCustom.test.js +1 -1
- package/tests/functional/sdk-a/localCreateListDeleteOverride.test.js +1 -1
- package/tests/functional/sdk-a/localCreateMapAllClearMap.test.js +2 -2
- package/tests/functional/sdk-a/localCreatePublishAllDeleteAllCustom.test.js +2 -2
- package/tests/functional/sdk-a/localCreatePublishAllDeleteAllOverride.test.js +2 -2
- package/tests/functional/sdk-a/localCreatePublishDeleteCustom.test.js +2 -2
- package/tests/functional/sdk-a/localCreatePublishDeleteOverride.test.js +2 -2
- package/tests/functional/sdk-a/localCreateRenameDeleteCustom.test.js +1 -1
|
@@ -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
|
|
|
@@ -279,25 +279,39 @@ export class PegaDxilMyPicklistComponent 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 {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Component,
|
|
2
|
-
import {
|
|
1
|
+
import { Component, forwardRef } from '@angular/core';
|
|
2
|
+
import { ComponentMapperComponent, DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
3
3
|
|
|
4
4
|
@Component({
|
|
5
5
|
selector: 'app-pega-dxil-my-details',
|
|
@@ -8,48 +8,14 @@ import { AngularPConnectData, AngularPConnectService, ComponentMapperComponent }
|
|
|
8
8
|
standalone: true,
|
|
9
9
|
imports: [forwardRef(() => ComponentMapperComponent)]
|
|
10
10
|
})
|
|
11
|
-
export class PegaDxilMyDetailsComponent
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
@Input() pConn$: typeof PConnect;
|
|
11
|
+
export class PegaDxilMyDetailsComponent extends DetailsTemplateBase {
|
|
12
|
+
override pConn$: typeof PConnect;
|
|
15
13
|
|
|
16
14
|
highlightedDataArr: any[] = [];
|
|
17
15
|
showHighlightedData: boolean;
|
|
18
16
|
arFields$: any[] = [];
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
angularPConnectData: AngularPConnectData = {};
|
|
22
|
-
|
|
23
|
-
ngOnInit(): void {
|
|
24
|
-
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
25
|
-
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
26
|
-
|
|
27
|
-
// this.updateSelf();
|
|
28
|
-
this.checkAndUpdate();
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
ngOnDestroy() {
|
|
32
|
-
if (this.angularPConnectData.unsubscribeFn) {
|
|
33
|
-
this.angularPConnectData.unsubscribeFn();
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
onStateChange() {
|
|
38
|
-
this.checkAndUpdate();
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
checkAndUpdate() {
|
|
42
|
-
// Should always check the bridge to see if the component should
|
|
43
|
-
// update itself (re-render)
|
|
44
|
-
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
45
|
-
|
|
46
|
-
// ONLY call updateSelf when the component should update
|
|
47
|
-
if (bUpdateSelf) {
|
|
48
|
-
this.updateSelf();
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
updateSelf() {
|
|
18
|
+
override updateSelf() {
|
|
53
19
|
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
54
20
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
55
21
|
|
|
@@ -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 PegaDxilMyFormProps {
|
|
10
10
|
// If any, enter additional props that only exist on this component
|
|
@@ -19,7 +19,7 @@ interface PegaDxilMyFormProps {
|
|
|
19
19
|
standalone: true,
|
|
20
20
|
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
21
21
|
})
|
|
22
|
-
export class PegaDxilMyFormComponent extends
|
|
22
|
+
export class PegaDxilMyFormComponent extends FormTemplateBase implements OnInit {
|
|
23
23
|
@Input() override pConn$: typeof PConnect;
|
|
24
24
|
@Input() formGroup$: FormGroup;
|
|
25
25
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { Component,
|
|
2
|
-
import {
|
|
3
|
-
import { AngularPConnectData, AngularPConnectService, ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
1
|
+
import { Component, forwardRef } from '@angular/core';
|
|
2
|
+
import { ComponentMapperComponent, DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
4
3
|
|
|
5
4
|
@Component({
|
|
6
5
|
selector: 'app-pega-dxil-my-two-column-details',
|
|
@@ -9,11 +8,8 @@ import { AngularPConnectData, AngularPConnectService, ComponentMapperComponent }
|
|
|
9
8
|
standalone: true,
|
|
10
9
|
imports: [forwardRef(() => ComponentMapperComponent)]
|
|
11
10
|
})
|
|
12
|
-
export class PegaDxilMyTwoColumnDetailsComponent
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
@Input() pConn$: typeof PConnect;
|
|
16
|
-
@Input() formGroup$: FormGroup;
|
|
11
|
+
export class PegaDxilMyTwoColumnDetailsComponent extends DetailsTemplateBase {
|
|
12
|
+
override pConn$: typeof PConnect;
|
|
17
13
|
|
|
18
14
|
showHighlightedData: boolean;
|
|
19
15
|
highlightedDataArr: any;
|
|
@@ -24,45 +20,13 @@ export class PegaDxilMyTwoColumnDetailsComponent implements OnInit, OnDestroy {
|
|
|
24
20
|
|
|
25
21
|
propsToUse: any = {};
|
|
26
22
|
|
|
27
|
-
|
|
28
|
-
angularPConnectData: AngularPConnectData = {};
|
|
29
|
-
|
|
30
|
-
ngOnInit(): void {
|
|
31
|
-
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
32
|
-
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
33
|
-
|
|
34
|
-
// this.updateSelf();
|
|
35
|
-
this.checkAndUpdate();
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
ngOnDestroy() {
|
|
39
|
-
if (this.angularPConnectData.unsubscribeFn) {
|
|
40
|
-
this.angularPConnectData.unsubscribeFn();
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
onStateChange() {
|
|
45
|
-
this.checkAndUpdate();
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
checkAndUpdate() {
|
|
49
|
-
// Should always check the bridge to see if the component should
|
|
50
|
-
// update itself (re-render)
|
|
51
|
-
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
52
|
-
|
|
53
|
-
// ONLY call updateSelf when the component should update
|
|
54
|
-
if (bUpdateSelf) {
|
|
55
|
-
this.updateSelf();
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
updateSelf() {
|
|
23
|
+
override updateSelf() {
|
|
60
24
|
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
61
25
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
62
26
|
|
|
63
27
|
if (this.showHighlightedData) {
|
|
64
28
|
const highlightedData = rawMetaData?.highlightedData;
|
|
65
|
-
this.highlightedDataArr = highlightedData
|
|
29
|
+
this.highlightedDataArr = highlightedData?.map(field => {
|
|
66
30
|
field.config.displayMode = 'STACKED_LARGE_VAL';
|
|
67
31
|
|
|
68
32
|
if (field.config.value === '@P .pyStatusWork') {
|
|
@@ -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-pega-dxil-my-two-column-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 PegaDxilMyTwoColumnFormComponent extends
|
|
14
|
+
export class PegaDxilMyTwoColumnFormComponent extends FormTemplateBase implements OnInit, OnChanges {
|
|
15
15
|
@Input() override pConn$: typeof PConnect;
|
|
16
16
|
@Input() formGroup$: FormGroup;
|
|
17
17
|
|