@pega/dx-component-builder-sdk 0.242.14 → 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.
Files changed (56) hide show
  1. package/package.json +1 -1
  2. package/src/tasks/create/index.js +7 -5
  3. package/src/tasks/quarantine/index.js +4 -2
  4. package/tests/assets/sdk-a/components/create/override-sdk/field/dropdown/dropdown.component.ts +122 -7
  5. package/tests/assets/sdk-a/components/create/override-sdk/template/case-view/case-view.component.html +4 -4
  6. package/tests/assets/sdk-a/components/create/override-sdk/template/case-view/case-view.component.ts +7 -12
  7. package/tests/assets/sdk-a/components/create/override-sdk/template/default-form/default-form.component.ts +2 -2
  8. package/tests/assets/sdk-a/components/create/override-sdk/template/details/details.component.ts +5 -39
  9. package/tests/assets/sdk-a/components/create/override-sdk/template/details-narrow-wide/details-narrow-wide.component.ts +5 -38
  10. package/tests/assets/sdk-a/components/create/override-sdk/template/details-one-column/details-one-column.component.ts +5 -40
  11. package/tests/assets/sdk-a/components/create/override-sdk/template/details-sub-tabs/details-sub-tabs.component.html +1 -2
  12. package/tests/assets/sdk-a/components/create/override-sdk/template/details-sub-tabs/details-sub-tabs.component.ts +5 -37
  13. package/tests/assets/sdk-a/components/create/override-sdk/template/details-three-column/details-three-column.component.ts +5 -41
  14. package/tests/assets/sdk-a/components/create/override-sdk/template/details-two-column/details-two-column.component.ts +5 -41
  15. package/tests/assets/sdk-a/components/create/override-sdk/template/details-wide-narrow/details-wide-narrow.component.ts +5 -40
  16. package/tests/assets/sdk-a/components/create/override-sdk/template/one-column/one-column.component.ts +2 -2
  17. package/tests/assets/sdk-a/components/create/override-sdk/template/simple-table-manual/simple-table-manual.component.scss +1 -0
  18. package/tests/assets/sdk-a/components/create/override-sdk/template/three-column/three-column.component.ts +2 -2
  19. package/tests/assets/sdk-a/components/create/override-sdk/template/two-column/two-column.component.ts +2 -2
  20. package/tests/assets/sdk-a/components/create/override-sdk/template/wide-narrow-form/wide-narrow-form.component.ts +2 -2
  21. package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-picklist/pega-dxil-my-picklist.component.ts +29 -15
  22. package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-details/pega-dxil-my-details.component.ts +5 -39
  23. package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-form/demo.stories.tsx +1 -4
  24. package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-form/pega-dxil-my-form.component.ts +2 -2
  25. 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
  26. 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
  27. package/tests/assets/sdk-a/components/createAll/override-sdk/field/dropdown/dropdown.component.ts +122 -7
  28. package/tests/assets/sdk-a/components/createAll/override-sdk/template/case-view/case-view.component.html +4 -4
  29. package/tests/assets/sdk-a/components/createAll/override-sdk/template/case-view/case-view.component.ts +7 -12
  30. package/tests/assets/sdk-a/components/createAll/override-sdk/template/default-form/default-form.component.ts +2 -2
  31. package/tests/assets/sdk-a/components/createAll/override-sdk/template/details/details.component.ts +5 -39
  32. package/tests/assets/sdk-a/components/createAll/override-sdk/template/details-narrow-wide/details-narrow-wide.component.ts +5 -38
  33. package/tests/assets/sdk-a/components/createAll/override-sdk/template/details-one-column/details-one-column.component.ts +5 -40
  34. package/tests/assets/sdk-a/components/createAll/override-sdk/template/details-sub-tabs/details-sub-tabs.component.html +1 -2
  35. package/tests/assets/sdk-a/components/createAll/override-sdk/template/details-sub-tabs/details-sub-tabs.component.ts +5 -37
  36. package/tests/assets/sdk-a/components/createAll/override-sdk/template/details-three-column/details-three-column.component.ts +5 -41
  37. package/tests/assets/sdk-a/components/createAll/override-sdk/template/details-two-column/details-two-column.component.ts +5 -41
  38. package/tests/assets/sdk-a/components/createAll/override-sdk/template/details-wide-narrow/details-wide-narrow.component.ts +5 -40
  39. package/tests/assets/sdk-a/components/createAll/override-sdk/template/one-column/one-column.component.ts +2 -2
  40. package/tests/assets/sdk-a/components/createAll/override-sdk/template/simple-table-manual/simple-table-manual.component.scss +1 -0
  41. package/tests/assets/sdk-a/components/createAll/override-sdk/template/three-column/three-column.component.ts +2 -2
  42. package/tests/assets/sdk-a/components/createAll/override-sdk/template/two-column/two-column.component.ts +2 -2
  43. package/tests/assets/sdk-a/components/createAll/override-sdk/template/wide-narrow-form/wide-narrow-form.component.ts +2 -2
  44. package/tests/functional/sdk-a/localCreateAllListDeleteAllCustom.test.js +5 -5
  45. package/tests/functional/sdk-a/localCreateAllListDeleteAllOverride.test.js +5 -5
  46. package/tests/functional/sdk-a/localCreateBuildAllDeleteAllCustom.test.js +2 -2
  47. package/tests/functional/sdk-a/localCreateBuildDeleteCustom.test.js +2 -2
  48. package/tests/functional/sdk-a/localCreateBuildDeleteOverride.test.js +2 -2
  49. package/tests/functional/sdk-a/localCreateListDeleteCustom.test.js +1 -1
  50. package/tests/functional/sdk-a/localCreateListDeleteOverride.test.js +1 -1
  51. package/tests/functional/sdk-a/localCreateMapAllClearMap.test.js +2 -2
  52. package/tests/functional/sdk-a/localCreatePublishAllDeleteAllCustom.test.js +2 -2
  53. package/tests/functional/sdk-a/localCreatePublishAllDeleteAllOverride.test.js +2 -2
  54. package/tests/functional/sdk-a/localCreatePublishDeleteCustom.test.js +2 -2
  55. package/tests/functional/sdk-a/localCreatePublishDeleteOverride.test.js +2 -2
  56. package/tests/functional/sdk-a/localCreateRenameDeleteCustom.test.js +1 -1
@@ -1,7 +1,6 @@
1
- import { Component, OnInit, Input, forwardRef, OnDestroy } from '@angular/core';
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 implements OnInit, OnDestroy {
14
- constructor(private angularPConnect: AngularPConnectService) {}
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
- // Used with AngularPConnect
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, OnInit, Input, forwardRef, OnDestroy } from '@angular/core';
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 implements OnInit, OnDestroy {
14
- constructor(private angularPConnect: AngularPConnectService) {}
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
- // Used with AngularPConnect
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, OnInit, Input, forwardRef, OnDestroy } from '@angular/core';
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 implements OnInit, OnDestroy {
14
- constructor(private angularPConnect: AngularPConnectService) {}
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 { FormTemplateBaseComponent } from '@pega/angular-sdk-components';
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 FormTemplateBaseComponent implements OnInit, OnChanges {
14
+ export class OneColumnComponent extends FormTemplateBase implements OnInit, OnChanges {
15
15
  @Input() override pConn$: typeof PConnect;
16
16
  @Input() formGroup$: FormGroup;
17
17
 
@@ -4,6 +4,7 @@
4
4
  width: 100%;
5
5
  margin-top: 0.5rem;
6
6
  margin-bottom: 0.5rem;
7
+ overflow-y: auto;
7
8
  }
8
9
 
9
10
  table {
@@ -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 { FormTemplateBaseComponent } from '@pega/angular-sdk-components';
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 FormTemplateBaseComponent implements OnInit, OnChanges {
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 { FormTemplateBaseComponent } from '@pega/angular-sdk-components';
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 FormTemplateBaseComponent implements OnInit, OnChanges {
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 { FormTemplateBaseComponent } from '@pega/angular-sdk-components';
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 FormTemplateBaseComponent implements OnInit, OnChanges {
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(datasource, parameters, columns, context) {
287
- this.dataPageService.getDataPageData(datasource, parameters, context).then((results: any) => {
288
- const optionsData: any[] = [];
289
- const displayColumn = getDisplayFieldsMetaData(columns);
290
- results?.forEach(element => {
291
- const val = element[displayColumn.primary]?.toString();
292
- const obj = {
293
- key: element[displayColumn.key] || element.pyGUID,
294
- value: val
295
- };
296
- optionsData.push(obj);
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, OnInit, Input, forwardRef, OnDestroy } from '@angular/core';
2
- 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';
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 implements OnInit, OnDestroy {
12
- constructor(private angularPConnect: AngularPConnectService) {}
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
- // Used with AngularPConnect
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
 
@@ -94,8 +94,5 @@ export default meta;
94
94
  type Story = StoryObj<PegaDxilMyFormComponent>;
95
95
 
96
96
  export const PegaDxilMyForm: Story = {
97
- args: {
98
- label: 'Form',
99
- showLabel: false
100
- }
97
+ args: {}
101
98
  };
@@ -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 { FormTemplateBaseComponent } from '@pega/angular-sdk-components';
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 FormTemplateBaseComponent implements OnInit {
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, OnInit, Input, forwardRef, OnDestroy } from '@angular/core';
2
- import { FormGroup } from '@angular/forms';
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 implements OnInit, OnDestroy {
13
- constructor(private angularPConnect: AngularPConnectService) {}
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
- // Used with AngularPConnect
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.map(field => {
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 { FormTemplateBaseComponent } from '@pega/angular-sdk-components';
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 FormTemplateBaseComponent implements OnInit, OnChanges {
14
+ export class PegaDxilMyTwoColumnFormComponent extends FormTemplateBase implements OnInit, OnChanges {
15
15
  @Input() override pConn$: typeof PConnect;
16
16
  @Input() formGroup$: FormGroup;
17
17