@pega/angular-sdk-overrides 0.242.3 → 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.
Files changed (38) hide show
  1. package/lib/designSystemExtension/material-case-summary/material-case-summary.component.scss +2 -1
  2. package/lib/field/currency/currency.component.html +3 -3
  3. package/lib/field/currency/currency.component.ts +14 -11
  4. package/lib/field/date-time/date-time.component.ts +2 -2
  5. package/lib/field/decimal/decimal.component.html +3 -3
  6. package/lib/field/decimal/decimal.component.ts +16 -13
  7. package/lib/field/dropdown/dropdown.component.ts +122 -7
  8. package/lib/field/percentage/percentage.component.html +2 -3
  9. package/lib/field/percentage/percentage.component.ts +16 -10
  10. package/lib/field/time/time.component.ts +1 -1
  11. package/lib/infra/view/view.component.html +1 -1
  12. package/lib/infra/view/view.component.ts +5 -1
  13. package/lib/template/base/details-template-base.ts +67 -0
  14. package/lib/template/{form-template-base/form-template-base.component.ts → base/form-template-base.ts} +1 -1
  15. package/lib/template/case-view/case-view.component.html +4 -4
  16. package/lib/template/case-view/case-view.component.ts +7 -12
  17. package/lib/template/default-form/default-form.component.html +0 -4
  18. package/lib/template/default-form/default-form.component.ts +2 -21
  19. package/lib/template/details/details.component.ts +5 -39
  20. package/lib/template/details-narrow-wide/details-narrow-wide.component.ts +5 -38
  21. package/lib/template/details-one-column/details-one-column.component.ts +5 -40
  22. package/lib/template/details-sub-tabs/details-sub-tabs.component.html +1 -2
  23. package/lib/template/details-sub-tabs/details-sub-tabs.component.ts +5 -37
  24. package/lib/template/details-three-column/details-three-column.component.ts +5 -41
  25. package/lib/template/details-two-column/details-two-column.component.ts +5 -41
  26. package/lib/template/details-wide-narrow/details-wide-narrow.component.ts +5 -40
  27. package/lib/template/dynamic-tabs/dynamic-tabs.component.html +3 -0
  28. package/lib/template/dynamic-tabs/dynamic-tabs.component.ts +6 -1
  29. package/lib/template/field-value-list/field-value-list.component.scss +1 -0
  30. package/lib/template/list-view/list-view.component.html +3 -0
  31. package/lib/template/list-view/list-view.component.scss +11 -0
  32. package/lib/template/list-view/list-view.component.ts +21 -1
  33. package/lib/template/one-column/one-column.component.ts +2 -2
  34. package/lib/template/simple-table-manual/simple-table-manual.component.scss +1 -0
  35. package/lib/template/three-column/three-column.component.ts +2 -2
  36. package/lib/template/two-column/two-column.component.ts +2 -2
  37. package/lib/template/wide-narrow-form/wide-narrow-form.component.ts +2 -2
  38. package/package.json +1 -1
@@ -4,12 +4,11 @@ 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 DefaultFormProps {
10
10
  // If any, enter additional props that only exist on this component
11
11
  NumCols: string;
12
- template: string;
13
12
  instructions: string;
14
13
  }
15
14
 
@@ -20,38 +19,20 @@ interface DefaultFormProps {
20
19
  standalone: true,
21
20
  imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
22
21
  })
23
- export class DefaultFormComponent extends FormTemplateBaseComponent implements OnInit {
22
+ export class DefaultFormComponent extends FormTemplateBase implements OnInit {
24
23
  @Input() override pConn$: typeof PConnect;
25
24
  @Input() formGroup$: FormGroup;
26
25
 
27
26
  arChildren$: any[];
28
27
  divClass$: string;
29
- template: any;
30
- showLabel: any;
31
- label: any;
32
28
  instructions: string;
33
29
 
34
- NO_HEADER_TEMPLATES = [
35
- 'SubTabs',
36
- 'SimpleTable',
37
- 'Details',
38
- 'DetailsTwoColumn',
39
- 'DetailsThreeColumn',
40
- 'NarrowWideDetails',
41
- 'WideNarrowDetails',
42
- 'Confirmation'
43
- ];
44
-
45
30
  constructor(private templateUtils: TemplateUtils) {
46
31
  super();
47
32
  }
48
33
 
49
34
  ngOnInit(): void {
50
35
  const configProps = this.pConn$.getConfigProps() as DefaultFormProps;
51
- this.template = configProps?.template;
52
- const propToUse: any = { ...this.pConn$.getInheritedProps() };
53
- this.showLabel = propToUse?.showLabel;
54
- this.label = propToUse?.label;
55
36
  const kids = this.pConn$.getChildren();
56
37
  this.instructions = this.templateUtils.getInstructions(this.pConn$, configProps?.instructions);
57
38
 
@@ -1,6 +1,6 @@
1
- import { Component, OnInit, Input, forwardRef, OnDestroy } from '@angular/core';
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 implements OnInit, OnDestroy {
13
- constructor(private angularPConnect: AngularPConnectService) {}
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
- // 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
-
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, OnInit, Input, forwardRef, OnDestroy } from '@angular/core';
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 implements OnInit, OnDestroy {
13
- constructor(private angularPConnect: AngularPConnectService) {}
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, OnInit, Input, forwardRef, OnDestroy } from '@angular/core';
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 implements OnInit, OnDestroy {
14
- constructor(private angularPConnect: AngularPConnectService) {}
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
- // Used with AngularPConnect
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, OnInit, Input, forwardRef, OnDestroy } from '@angular/core';
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 implements OnInit, OnDestroy {
17
- @Input() pConn$: typeof PConnect;
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
- constructor(private angularPConnect: AngularPConnectService) {}
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, 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
 
@@ -1,3 +1,6 @@
1
+ <div *ngIf="propsToUse.showLabel && propsToUse.label" class="template-title-container">
2
+ <span>{{ propsToUse.label }}</span>
3
+ </div>
1
4
  <mat-tab-group id="dynamic-tabs" mat-stretch-tabs="false" animationDuration="0">
2
5
  <mat-tab *ngFor="let tab of tabsItems" [label]="tab.name">
3
6
  <component-mapper name="View" [props]="{ pConn$: tab.content.getPConnect() }"></component-mapper>
@@ -9,6 +9,8 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
9
9
  interface DynamicTabsProps {
10
10
  referenceList: string;
11
11
  template: string;
12
+ label?: string;
13
+ showLabel?: boolean;
12
14
  }
13
15
 
14
16
  @Component({
@@ -24,6 +26,7 @@ export class DynamicTabsComponent implements OnInit, OnDestroy {
24
26
 
25
27
  angularPConnectData: AngularPConnectData = {};
26
28
  tabsItems: any[];
29
+ propsToUse: any;
27
30
 
28
31
  constructor(private angularPConnect: AngularPConnectService) {}
29
32
 
@@ -54,7 +57,9 @@ export class DynamicTabsComponent implements OnInit, OnDestroy {
54
57
  }
55
58
 
56
59
  updateSelf() {
57
- const { referenceList } = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as DynamicTabsProps;
60
+ const { referenceList, label, showLabel } = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as DynamicTabsProps;
61
+
62
+ this.propsToUse = { label, showLabel, ...this.pConn$.getInheritedProps() };
58
63
 
59
64
  const { tablabel } = this.pConn$.getComponentConfig();
60
65
  const tablabelProp = PCore.getAnnotationUtils().getPropertyName(tablabel);
@@ -15,4 +15,5 @@
15
15
  font-size: 1.25rem;
16
16
  }
17
17
  .psdk-val-labels-left {
18
+ white-space: break-spaces;
18
19
  }
@@ -1,5 +1,8 @@
1
1
  <div class="psdk-list-header">
2
2
  <div>
3
+ <h3 *ngIf="label" class="label" style="font-weight: bold">
4
+ {{ label }} <span class="results-count">{{ getResultsText() }}</span>
5
+ </h3>
3
6
  <mat-form-field class="psdk-search" *ngIf="bShowSearch$">
4
7
  <mat-label><img class="psdk-icon-search" src="{{ searchIcon$ }}" /> <span class="psdk-search-label">Search</span> </mat-label>
5
8
  <input matInput id="search" (keyup)="applySearch($event)" placeholder="" />
@@ -165,3 +165,14 @@ tr.mat-mdc-row {
165
165
  background-color: transparent;
166
166
  align-items: center;
167
167
  }
168
+
169
+ .results-count {
170
+ opacity: 0.7;
171
+ font-size: 0.8rem;
172
+ font-weight: bold;
173
+ margin-inline-start: 0.625rem;
174
+ }
175
+
176
+ .label {
177
+ margin: 8px;
178
+ }
@@ -1,4 +1,3 @@
1
- /* eslint-disable max-classes-per-file */
2
1
  import { Component, OnInit, Input, ViewChild, forwardRef, OnDestroy } from '@angular/core';
3
2
  import { CommonModule } from '@angular/common';
4
3
  import { MatDatepickerModule } from '@angular/material/datepicker';
@@ -29,6 +28,8 @@ declare const window: any;
29
28
  const SELECTION_MODE = { SINGLE: 'single', MULTI: 'multi' };
30
29
 
31
30
  interface ListViewProps {
31
+ inheritedProps: any;
32
+ title: string | undefined;
32
33
  // If any, enter additional props that only exist on this component
33
34
  globalSearch?: boolean;
34
35
  referenceList?: any;
@@ -42,6 +43,7 @@ interface ListViewProps {
42
43
  grouping: string | boolean;
43
44
  value: any;
44
45
  readonlyContextList: any;
46
+ label?: string;
45
47
  }
46
48
 
47
49
  export class Group {
@@ -159,6 +161,7 @@ export class ListViewComponent implements OnInit, OnDestroy {
159
161
  xRayApis = PCore.getDebugger().getXRayRuntime();
160
162
  xRayUid = this.xRayApis.startXRay();
161
163
  checkBoxValue: string;
164
+ label?: string = '';
162
165
 
163
166
  constructor(
164
167
  private psService: ProgressSpinnerService,
@@ -192,6 +195,18 @@ export class ListViewComponent implements OnInit, OnDestroy {
192
195
  this.arFilterMainButtons$.push({ actionID: 'submit', jsAction: 'submit', name: 'Submit' });
193
196
  this.arFilterSecondaryButtons$.push({ actionID: 'cancel', jsAction: 'cancel', name: 'Cancel' });
194
197
 
198
+ let title = this.configProps$?.title || this.configProps$?.label || 'List';
199
+ const inheritedProps = this.configProps$?.inheritedProps;
200
+ if (title === 'List' && inheritedProps) {
201
+ for (const inheritedProp of inheritedProps) {
202
+ if (inheritedProp?.prop === 'label') {
203
+ title = inheritedProp?.value;
204
+ break;
205
+ }
206
+ }
207
+ }
208
+ this.label = title;
209
+
195
210
  this.searchIcon$ = this.utils.getImageSrc('search', this.utils.getSDKStaticContentUrl());
196
211
  setTimeout(() => {
197
212
  PCore.getPubSubUtils().subscribe(
@@ -1380,6 +1395,11 @@ export class ListViewComponent implements OnInit, OnDestroy {
1380
1395
  return listFields;
1381
1396
  }
1382
1397
 
1398
+ getResultsText() {
1399
+ const recordsCount = this.repeatList$?.paginator?.length || 0;
1400
+ return `${recordsCount || 0} result${recordsCount > 1 ? 's' : ''}`;
1401
+ }
1402
+
1383
1403
  getField(fieldDefs, columnId) {
1384
1404
  const fieldsMap = this.getFieldsMap(fieldDefs);
1385
1405
  return fieldsMap.get(columnId);
@@ -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 {