@pega/angular-sdk-overrides 0.242.2 → 0.242.4

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 (50) hide show
  1. package/lib/designSystemExtension/material-case-summary/material-case-summary.component.scss +2 -1
  2. package/lib/designSystemExtension/material-details-fields/material-details-fields.component.html +1 -1
  3. package/lib/designSystemExtension/material-details-fields/material-details-fields.component.ts +4 -1
  4. package/lib/field/auto-complete/auto-complete.component.ts +14 -11
  5. package/lib/field/check-box/check-box.component.ts +8 -7
  6. package/lib/field/currency/currency.component.html +4 -4
  7. package/lib/field/currency/currency.component.ts +29 -12
  8. package/lib/field/date/date.component.html +1 -6
  9. package/lib/field/date/date.component.ts +19 -36
  10. package/lib/field/date-time/date-time.component.html +1 -2
  11. package/lib/field/date-time/date-time.component.ts +16 -11
  12. package/lib/field/decimal/decimal.component.html +3 -3
  13. package/lib/field/decimal/decimal.component.ts +18 -15
  14. package/lib/field/dropdown/dropdown.component.ts +117 -17
  15. package/lib/field/email/email.component.ts +13 -3
  16. package/lib/field/integer/integer.component.html +1 -1
  17. package/lib/field/integer/integer.component.ts +12 -4
  18. package/lib/field/multiselect/multiselect.component.ts +11 -3
  19. package/lib/field/percentage/percentage.component.html +4 -4
  20. package/lib/field/percentage/percentage.component.ts +33 -18
  21. package/lib/field/phone/phone.component.html +1 -1
  22. package/lib/field/phone/phone.component.ts +11 -14
  23. package/lib/field/radio-buttons/radio-buttons.component.ts +8 -8
  24. package/lib/field/rich-text/rich-text.component.ts +7 -5
  25. package/lib/field/text/text.component.ts +2 -0
  26. package/lib/field/text-area/text-area.component.html +2 -1
  27. package/lib/field/text-area/text-area.component.ts +12 -5
  28. package/lib/field/text-input/text-input.component.html +1 -1
  29. package/lib/field/text-input/text-input.component.ts +12 -4
  30. package/lib/field/time/time.component.html +2 -2
  31. package/lib/field/time/time.component.ts +20 -6
  32. package/lib/field/url/url.component.html +1 -1
  33. package/lib/field/url/url.component.ts +12 -4
  34. package/lib/field/user-reference/user-reference.component.ts +10 -4
  35. package/lib/infra/Containers/flow-container/flow-container.component.html +1 -1
  36. package/lib/infra/Containers/flow-container/flow-container.component.ts +1 -0
  37. package/lib/infra/stages/stages.component.scss +2 -2
  38. package/lib/infra/view/view.component.html +1 -1
  39. package/lib/infra/view/view.component.ts +5 -1
  40. package/lib/template/default-form/default-form.component.html +0 -4
  41. package/lib/template/default-form/default-form.component.ts +0 -19
  42. package/lib/template/details-two-column/details-two-column.component.ts +1 -1
  43. package/lib/template/dynamic-tabs/dynamic-tabs.component.html +3 -0
  44. package/lib/template/dynamic-tabs/dynamic-tabs.component.ts +6 -1
  45. package/lib/template/field-value-list/field-value-list.component.scss +2 -1
  46. package/lib/template/list-view/list-view.component.html +3 -0
  47. package/lib/template/list-view/list-view.component.scss +11 -0
  48. package/lib/template/list-view/list-view.component.ts +21 -1
  49. package/lib/template/simple-table-manual/simple-table-manual.component.scss +1 -0
  50. package/package.json +1 -1
@@ -16,7 +16,8 @@
16
16
  [required]="bRequired$"
17
17
  [disabled]="bDisabled$"
18
18
  [formControl]="fieldControl"
19
- (change)="fieldOnChange($event)"
19
+ (change)="fieldOnChange()"
20
+ (blur)="fieldOnBlur($event)"
20
21
  ></textarea>
21
22
  <mat-error *ngIf="fieldControl.invalid">{{ getErrorMessage() }}</mat-error>
22
23
  </mat-form-field>
@@ -8,6 +8,7 @@ import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-c
8
8
  import { Utils } from '@pega/angular-sdk-components';
9
9
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
10
10
  import { PConnFieldProps } from '@pega/angular-sdk-components';
11
+ import { handleEvent } from '@pega/angular-sdk-components';
11
12
 
12
13
  interface TextAreaProps extends PConnFieldProps {
13
14
  // If any, enter additional props that only exist on TextArea here
@@ -44,6 +45,8 @@ export class TextAreaComponent implements OnInit, OnDestroy {
44
45
  helperText: string;
45
46
 
46
47
  fieldControl = new FormControl('', null);
48
+ actionsApi: Object;
49
+ propName: string;
47
50
 
48
51
  constructor(
49
52
  private angularPConnect: AngularPConnectService,
@@ -113,6 +116,9 @@ export class TextAreaComponent implements OnInit, OnDestroy {
113
116
  this.label$ = this.configProps$.label;
114
117
  this.helperText = this.configProps$.helperText;
115
118
 
119
+ this.actionsApi = this.pConn$.getActionsApi();
120
+ this.propName = this.pConn$.getStateProps().value;
121
+
116
122
  // timeout and detectChanges to avoid ExpressionChangedAfterItHasBeenCheckedError
117
123
  setTimeout(() => {
118
124
  if (this.configProps$.required != null) {
@@ -153,14 +159,15 @@ export class TextAreaComponent implements OnInit, OnDestroy {
153
159
  }
154
160
  }
155
161
 
156
- fieldOnChange(event: any) {
157
- // PConnect wants to use changeHandler for onChange
158
- this.angularPConnectData.actions?.onChange(this, event);
162
+ fieldOnChange() {
163
+ this.pConn$.clearErrorMessages({
164
+ property: this.propName
165
+ });
159
166
  }
160
167
 
161
168
  fieldOnBlur(event: any) {
162
- // PConnect wants to use eventHandler for onBlur
163
- this.angularPConnectData.actions?.onBlur(this, event);
169
+ const value = event?.target?.value;
170
+ handleEvent(this.actionsApi, 'changeNblur', this.propName, value);
164
171
  }
165
172
 
166
173
  getErrorMessage() {
@@ -14,7 +14,7 @@
14
14
  [required]="bRequired$"
15
15
  [attr.data-test-id]="testId"
16
16
  [formControl]="fieldControl"
17
- (change)="fieldOnChange($event)"
17
+ (change)="fieldOnChange()"
18
18
  (blur)="fieldOnBlur($event)"
19
19
  />
20
20
  <mat-error *ngIf="fieldControl.invalid">{{ getErrorMessage() }}</mat-error>
@@ -8,6 +8,7 @@ import { AngularPConnectService, AngularPConnectData } from '@pega/angular-sdk-c
8
8
  import { Utils } from '@pega/angular-sdk-components';
9
9
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
10
10
  import { PConnFieldProps } from '@pega/angular-sdk-components';
11
+ import { handleEvent } from '@pega/angular-sdk-components';
11
12
 
12
13
  interface TextInputProps extends PConnFieldProps {
13
14
  // If any, enter additional props that only exist on TextInput here
@@ -44,6 +45,8 @@ export class TextInputComponent implements OnInit, OnDestroy {
44
45
  placeholder: string;
45
46
 
46
47
  fieldControl = new FormControl('', null);
48
+ actionsApi: Object;
49
+ propName: string;
47
50
 
48
51
  constructor(
49
52
  private angularPConnect: AngularPConnectService,
@@ -115,6 +118,9 @@ export class TextInputComponent implements OnInit, OnDestroy {
115
118
 
116
119
  this.componentReference = this.pConn$.getStateProps().value;
117
120
 
121
+ this.actionsApi = this.pConn$.getActionsApi();
122
+ this.propName = this.pConn$.getStateProps().value;
123
+
118
124
  if (this.configProps$.visibility != null) {
119
125
  this.bVisible$ = this.utils.getBooleanValue(this.configProps$.visibility);
120
126
  }
@@ -155,13 +161,15 @@ export class TextInputComponent implements OnInit, OnDestroy {
155
161
  }
156
162
  }
157
163
 
158
- fieldOnChange(event: any) {
159
- this.angularPConnectData.actions?.onChange(this, event);
164
+ fieldOnChange() {
165
+ this.pConn$.clearErrorMessages({
166
+ property: this.propName
167
+ });
160
168
  }
161
169
 
162
170
  fieldOnBlur(event: any) {
163
- // PConnect wants to use eventHandler for onBlur
164
- this.angularPConnectData.actions?.onBlur(this, event);
171
+ const value = event?.target?.value;
172
+ handleEvent(this.actionsApi, 'changeNblur', this.propName, value);
165
173
  }
166
174
 
167
175
  getErrorMessage() {
@@ -1,5 +1,5 @@
1
1
  <div *ngIf="displayMode$; else noDisplayMode">
2
- <component-mapper *ngIf="bVisible$ !== false" name="FieldValueList" [props]="{ label$, value$, displayMode$ }"></component-mapper>
2
+ <component-mapper *ngIf="bVisible$ !== false" name="FieldValueList" [props]="{ label$, value$: formattedValue$, displayMode$ }"></component-mapper>
3
3
  </div>
4
4
  <ng-template #noDisplayMode>
5
5
  <div *ngIf="!bReadonly$ && bHasForm$; else noEdit">
@@ -14,7 +14,7 @@
14
14
  [required]="bRequired$"
15
15
  [attr.data-test-id]="testId"
16
16
  [formControl]="fieldControl"
17
- (change)="fieldOnChange($event)"
17
+ (change)="fieldOnChange()"
18
18
  (blur)="fieldOnBlur($event)"
19
19
  />
20
20
  <mat-error *ngIf="fieldControl.invalid">{{ getErrorMessage() }}</mat-error>
@@ -8,6 +8,8 @@ import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-c
8
8
  import { Utils } from '@pega/angular-sdk-components';
9
9
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
10
10
  import { PConnFieldProps } from '@pega/angular-sdk-components';
11
+ import { handleEvent } from '@pega/angular-sdk-components';
12
+ import { format } from '@pega/angular-sdk-components';
11
13
 
12
14
  interface TimeProps extends PConnFieldProps {
13
15
  // If any, enter additional props that only exist on Time here
@@ -43,6 +45,9 @@ export class TimeComponent implements OnInit, OnDestroy {
43
45
  placeholder: string;
44
46
 
45
47
  fieldControl = new FormControl('', null);
48
+ actionsApi: Object;
49
+ propName: string;
50
+ formattedValue$: any;
46
51
 
47
52
  constructor(
48
53
  private angularPConnect: AngularPConnectService,
@@ -111,6 +116,9 @@ export class TimeComponent implements OnInit, OnDestroy {
111
116
  this.helperText = this.configProps$.helperText;
112
117
  this.placeholder = this.configProps$.placeholder || '';
113
118
 
119
+ this.actionsApi = this.pConn$.getActionsApi();
120
+ this.propName = this.pConn$.getStateProps().value;
121
+
114
122
  // timeout and detectChanges to avoid ExpressionChangedAfterItHasBeenCheckedError
115
123
  setTimeout(() => {
116
124
  if (this.configProps$.required != null) {
@@ -119,6 +127,12 @@ export class TimeComponent implements OnInit, OnDestroy {
119
127
  this.cdRef.detectChanges();
120
128
  });
121
129
 
130
+ if (this.displayMode$ === 'DISPLAY_ONLY' || this.displayMode$ === 'STACKED_LARGE_VAL') {
131
+ this.formattedValue$ = format(this.value$, 'timeonly', {
132
+ format: 'hh:mm A'
133
+ });
134
+ }
135
+
122
136
  if (this.configProps$.visibility != null) {
123
137
  this.bVisible$ = this.utils.getBooleanValue(this.configProps$.visibility);
124
138
  }
@@ -151,15 +165,15 @@ export class TimeComponent implements OnInit, OnDestroy {
151
165
  }
152
166
  }
153
167
 
154
- fieldOnChange(event: any) {
155
- event.value = event.target.value;
156
- this.angularPConnectData.actions?.onChange(this, event);
168
+ fieldOnChange() {
169
+ this.pConn$.clearErrorMessages({
170
+ property: this.propName
171
+ });
157
172
  }
158
173
 
159
174
  fieldOnBlur(event: any) {
160
- // PConnect wants to use eventHandler for onBlur
161
- event.value = event.target.value;
162
- this.angularPConnectData.actions?.onBlur(this, event);
175
+ const value = event?.target?.value;
176
+ handleEvent(this.actionsApi, 'changeNblur', this.propName, value);
163
177
  }
164
178
 
165
179
  getErrorMessage() {
@@ -14,7 +14,7 @@
14
14
  [required]="bRequired$"
15
15
  [attr.data-test-id]="testId"
16
16
  [formControl]="fieldControl"
17
- (change)="fieldOnChange($event)"
17
+ (change)="fieldOnChange()"
18
18
  (blur)="fieldOnBlur($event)"
19
19
  />
20
20
  <mat-error *ngIf="fieldControl.invalid">{{ getErrorMessage() }}</mat-error>
@@ -8,6 +8,7 @@ import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-c
8
8
  import { Utils } from '@pega/angular-sdk-components';
9
9
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
10
10
  import { PConnFieldProps } from '@pega/angular-sdk-components';
11
+ import { handleEvent } from '@pega/angular-sdk-components';
11
12
 
12
13
  interface URLProps extends PConnFieldProps {
13
14
  // If any, enter additional props that only exist on URL here
@@ -43,6 +44,8 @@ export class UrlComponent implements OnInit, OnDestroy {
43
44
  placeholder: string;
44
45
 
45
46
  fieldControl = new FormControl('', null);
47
+ actionsApi: Object;
48
+ propName: string;
46
49
 
47
50
  constructor(
48
51
  private angularPConnect: AngularPConnectService,
@@ -113,6 +116,9 @@ export class UrlComponent implements OnInit, OnDestroy {
113
116
  this.helperText = this.configProps$.helperText;
114
117
  this.placeholder = this.configProps$.placeholder || '';
115
118
 
119
+ this.actionsApi = this.pConn$.getActionsApi();
120
+ this.propName = this.pConn$.getStateProps().value;
121
+
116
122
  // timeout and detectChanges to avoid ExpressionChangedAfterItHasBeenCheckedError
117
123
  setTimeout(() => {
118
124
  if (this.configProps$.required != null) {
@@ -153,13 +159,15 @@ export class UrlComponent implements OnInit, OnDestroy {
153
159
  }
154
160
  }
155
161
 
156
- fieldOnChange(event: any) {
157
- this.angularPConnectData.actions?.onChange(this, event);
162
+ fieldOnChange() {
163
+ this.pConn$.clearErrorMessages({
164
+ property: this.propName
165
+ });
158
166
  }
159
167
 
160
168
  fieldOnBlur(event: any) {
161
- // PConnect wants to use eventHandler for onBlur
162
- this.angularPConnectData.actions?.onBlur(this, event);
169
+ const value = event?.target?.value;
170
+ handleEvent(this.actionsApi, 'changeNblur', this.propName, value);
163
171
  }
164
172
 
165
173
  getErrorMessage() {
@@ -11,6 +11,7 @@ import { Utils } from '@pega/angular-sdk-components';
11
11
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
12
12
  import { PConnFieldProps } from '@pega/angular-sdk-components';
13
13
  import { map, Observable, startWith } from 'rxjs';
14
+ import { handleEvent } from '@pega/angular-sdk-components';
14
15
 
15
16
  const OPERATORS_DP = 'D_pyGetOperatorsForCurrentApplication';
16
17
  const DROPDOWN_LIST = 'Drop-down list';
@@ -63,6 +64,8 @@ export class UserReferenceComponent implements OnInit, OnDestroy {
63
64
  filterValue = '';
64
65
 
65
66
  fieldControl = new FormControl('', null);
67
+ actionsApi: Object;
68
+ propName: string;
66
69
 
67
70
  constructor(
68
71
  private angularPConnect: AngularPConnectService,
@@ -150,6 +153,9 @@ export class UserReferenceComponent implements OnInit, OnDestroy {
150
153
  const { readOnly, required } = props;
151
154
  [this.bReadonly$, this.bRequired$] = [readOnly, required].map(prop => prop === true || (typeof prop === 'string' && prop === 'true'));
152
155
 
156
+ this.actionsApi = this.pConn$.getActionsApi();
157
+ this.propName = this.pConn$.getStateProps().value;
158
+
153
159
  const isUserNameAvailable = user => {
154
160
  return typeof user === 'object' && user !== null && user.userName;
155
161
  };
@@ -195,7 +201,8 @@ export class UserReferenceComponent implements OnInit, OnDestroy {
195
201
  if (event?.target) {
196
202
  this.filterValue = (event.target as HTMLInputElement).value;
197
203
  }
198
- this.angularPConnectData.actions?.onChange(this, event);
204
+ const value = event?.target?.value;
205
+ handleEvent(this.actionsApi, 'change', this.propName, value);
199
206
  }
200
207
 
201
208
  fieldOnBlur(event: any) {
@@ -205,11 +212,10 @@ export class UserReferenceComponent implements OnInit, OnDestroy {
205
212
  key = index > -1 ? (key = this.options$[index].key) : event.target.value;
206
213
  }
207
214
 
208
- const eve = {
215
+ const value = {
209
216
  value: key
210
217
  };
211
- // PConnect wants to use eventHandler for onBlur
212
- this.angularPConnectData.actions?.onChange(this, eve);
218
+ handleEvent(this.actionsApi, 'changeNblur', this.propName, value);
213
219
  }
214
220
 
215
221
  getErrorMessage() {
@@ -38,7 +38,7 @@
38
38
  </div>
39
39
  </mat-card>
40
40
  </div>
41
- <div *ngIf="bShowBanner && bShowConfirm">
41
+ <div *ngIf="bShowBanner && bShowConfirm && confirm_pconn">
42
42
  <component-mapper name="View" [props]="{ formGroup$, pConn$: confirm_pconn }"></component-mapper>
43
43
  </div>
44
44
  </div>
@@ -484,6 +484,7 @@ export class FlowContainerComponent extends FlowContainerBaseComponent implement
484
484
  updateFlowContainerChildren() {
485
485
  // routingInfo was added as component prop in populateAdditionalProps
486
486
  const routingInfo = this.angularPConnect.getComponentProp(this, 'routingInfo');
487
+ this.confirm_pconn = null;
487
488
 
488
489
  let loadingInfo: any;
489
490
  try {
@@ -59,13 +59,13 @@
59
59
  border-radius: 0.5rem;
60
60
  border: 0.0625rem solid var(--app-neutral-light-color);
61
61
  overflow: hidden;
62
- height: 2rem;
63
62
  display: flex;
63
+ flex-wrap: wrap;
64
64
  }
65
65
 
66
66
  .psdk-stages-chevron {
67
67
  position: relative;
68
- padding: calc(1rem);
68
+ padding: calc(0.5rem);
69
69
  display: flex;
70
70
  justify-content: center;
71
71
  align-items: center;
@@ -1,5 +1,5 @@
1
1
  <div *ngIf="visibility$ !== false" class="ng-view-top">
2
- <div *ngIf="showLabel$ && label$ && templateName$ !== 'SimpleTable' && templateName$ !== 'DefaultForm'" class="template-title-container">
2
+ <div *ngIf="showLabel$ && label$ && !noHeaderTemplates.includes(templateName$)" class="template-title-container">
3
3
  <span>{{ label$ }}</span>
4
4
  </div>
5
5
 
@@ -7,6 +7,8 @@ import { getAllFields } from '@pega/angular-sdk-components';
7
7
  import { ReferenceComponent } from '@pega/angular-sdk-components';
8
8
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
9
9
 
10
+ const NO_HEADER_TEMPLATES = ['SubTabs', 'SimpleTable', 'Confirmation', 'DynamicTabs', 'DetailsSubTabs'];
11
+
10
12
  /**
11
13
  * WARNING: It is not expected that this file should be modified. It is part of infrastructure code that works with
12
14
  * Redux and creation/update of Redux containers and PConnect. Modifying this code could have undesireable results and
@@ -77,13 +79,15 @@ export class ViewComponent implements OnInit, OnDestroy, OnChanges {
77
79
 
78
80
  angularPConnectData: AngularPConnectData = {};
79
81
 
82
+ noHeaderTemplates = NO_HEADER_TEMPLATES;
83
+
80
84
  configProps$: ViewProps;
81
85
  inheritedProps$: any;
82
86
  arChildren$: any[];
83
87
  templateName$: string;
84
88
  title$ = '';
85
89
  label$ = '';
86
- showLabel$ = true;
90
+ showLabel$ = false;
87
91
  visibility$ = true;
88
92
 
89
93
  constructor(
@@ -1,7 +1,3 @@
1
- <!-- When adding a component here, add the same component in 'region' template as well -->
2
- <div *ngIf="!NO_HEADER_TEMPLATES.includes(template) && showLabel">
3
- <div class="template-title-container">{{ label }}</div>
4
- </div>
5
1
  <div *ngIf="instructions" class="psdk-default-form-instruction-text">
6
2
  <div key="instructions" id="instruction-text" [innerHTML]="instructions"></div>
7
3
  </div>
@@ -9,7 +9,6 @@ import { FormTemplateBaseComponent } from '@pega/angular-sdk-components';
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
 
@@ -26,32 +25,14 @@ export class DefaultFormComponent extends FormTemplateBaseComponent implements O
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
 
@@ -63,7 +63,7 @@ export class DetailsTwoColumnComponent implements OnInit, OnDestroy {
63
63
 
64
64
  if (this.showHighlightedData) {
65
65
  const highlightedData = rawMetaData?.highlightedData;
66
- this.highlightedDataArr = highlightedData.map(field => {
66
+ this.highlightedDataArr = highlightedData?.map(field => {
67
67
  field.config.displayMode = 'STACKED_LARGE_VAL';
68
68
 
69
69
  if (field.config.value === '@P .pyStatusWork') {
@@ -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);
@@ -4,6 +4,7 @@
4
4
  column-gap: calc(2 * 0.5rem);
5
5
  row-gap: calc(2 * 0.5rem);
6
6
  align-items: start;
7
+ padding-block: 8px;
7
8
  }
8
9
  .psdk-value {
9
10
  margin: 8px 0px;
@@ -14,5 +15,5 @@
14
15
  font-size: 1.25rem;
15
16
  }
16
17
  .psdk-val-labels-left {
17
- margin: 8px 0px;
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);
@@ -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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/angular-sdk-overrides",
3
- "version": "0.242.2",
3
+ "version": "0.242.4",
4
4
  "description": "Angular SDK - Code for overriding components",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"