@pega/angular-sdk-overrides 0.24.9 → 0.25.1

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 (172) hide show
  1. package/lib/designSystemExtension/alert/alert.component.ts +0 -1
  2. package/lib/designSystemExtension/alert-banner/alert-banner.component.ts +1 -2
  3. package/lib/designSystemExtension/banner/banner.component.ts +0 -1
  4. package/lib/designSystemExtension/case-create-stage/case-create-stage.component.ts +1 -2
  5. package/lib/designSystemExtension/field-group/field-group.component.ts +0 -1
  6. package/lib/designSystemExtension/material-case-summary/material-case-summary.component.scss +2 -1
  7. package/lib/designSystemExtension/material-case-summary/material-case-summary.component.ts +0 -2
  8. package/lib/designSystemExtension/material-details/material-details.component.ts +0 -1
  9. package/lib/designSystemExtension/material-details-fields/material-details-fields.component.html +2 -2
  10. package/lib/designSystemExtension/material-details-fields/material-details-fields.component.ts +10 -2
  11. package/lib/designSystemExtension/material-summary-item/material-summary-item.component.ts +0 -1
  12. package/lib/designSystemExtension/material-summary-list/material-summary-list.component.ts +0 -1
  13. package/lib/designSystemExtension/material-vertical-tabs/material-vertical-tabs.component.ts +0 -1
  14. package/lib/designSystemExtension/operator/operator.component.html +1 -1
  15. package/lib/designSystemExtension/operator/operator.component.scss +10 -2
  16. package/lib/designSystemExtension/operator/operator.component.ts +5 -5
  17. package/lib/designSystemExtension/pulse/pulse.component.ts +7 -8
  18. package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.ts +0 -1
  19. package/lib/designSystemExtension/wss-quick-create/wss-quick-create.component.ts +0 -1
  20. package/lib/field/auto-complete/auto-complete.component.html +0 -1
  21. package/lib/field/auto-complete/auto-complete.component.ts +31 -16
  22. package/lib/field/cancel-alert/cancel-alert.component.ts +0 -1
  23. package/lib/field/check-box/check-box.component.html +18 -6
  24. package/lib/field/check-box/check-box.component.ts +17 -12
  25. package/lib/field/currency/currency.component.html +4 -4
  26. package/lib/field/currency/currency.component.ts +42 -20
  27. package/lib/field/date/date.component.html +3 -7
  28. package/lib/field/date/date.component.ts +22 -40
  29. package/lib/field/date-time/date-time.component.html +3 -4
  30. package/lib/field/date-time/date-time.component.ts +35 -17
  31. package/lib/field/decimal/decimal.component.html +4 -3
  32. package/lib/field/decimal/decimal.component.ts +47 -22
  33. package/lib/field/dropdown/dropdown.component.html +1 -0
  34. package/lib/field/dropdown/dropdown.component.ts +146 -19
  35. package/lib/field/email/email.component.ts +24 -5
  36. package/lib/field/group/group.component.ts +2 -3
  37. package/lib/field/integer/integer.component.ts +22 -5
  38. package/lib/field/list-view-action-buttons/list-view-action-buttons.component.html +1 -1
  39. package/lib/field/list-view-action-buttons/list-view-action-buttons.component.ts +3 -3
  40. package/lib/field/location/config-ext.json +8 -0
  41. package/lib/field/location/location.component.html +45 -0
  42. package/lib/field/location/location.component.scss +18 -0
  43. package/lib/field/location/location.component.spec.ts +22 -0
  44. package/lib/field/location/location.component.ts +385 -0
  45. package/lib/field/multiselect/multiselect.component.ts +17 -10
  46. package/lib/field/percentage/percentage.component.html +3 -3
  47. package/lib/field/percentage/percentage.component.ts +45 -21
  48. package/lib/field/phone/config-ext.json +1 -1
  49. package/lib/field/phone/phone.component.html +9 -6
  50. package/lib/field/phone/phone.component.scss +9 -0
  51. package/lib/field/phone/phone.component.ts +30 -27
  52. package/lib/field/radio-buttons/radio-buttons.component.html +17 -12
  53. package/lib/field/radio-buttons/radio-buttons.component.ts +13 -10
  54. package/lib/field/rich-text/rich-text.component.ts +19 -9
  55. package/lib/field/scalar-list/scalar-list.component.ts +3 -5
  56. package/lib/field/selectable-card/selectable-card.component.html +40 -0
  57. package/lib/field/selectable-card/selectable-card.component.scss +0 -0
  58. package/lib/field/selectable-card/selectable-card.component.spec.ts +22 -0
  59. package/lib/field/selectable-card/selectable-card.component.ts +255 -0
  60. package/lib/field/semantic-link/semantic-link.component.ts +0 -1
  61. package/lib/field/text/text.component.ts +8 -5
  62. package/lib/field/text-area/text-area.component.html +4 -1
  63. package/lib/field/text-area/text-area.component.ts +22 -6
  64. package/lib/field/text-content/text-content.component.ts +0 -1
  65. package/lib/field/text-input/text-input.component.ts +22 -5
  66. package/lib/field/time/time.component.html +2 -2
  67. package/lib/field/time/time.component.ts +35 -7
  68. package/lib/field/url/url.component.ts +22 -5
  69. package/lib/field/user-reference/user-reference.component.html +40 -46
  70. package/lib/field/user-reference/user-reference.component.ts +111 -21
  71. package/lib/infra/Containers/flow-container/flow-container.component.html +1 -1
  72. package/lib/infra/Containers/flow-container/flow-container.component.ts +25 -48
  73. package/lib/infra/Containers/flow-container/helpers.ts +2 -2
  74. package/lib/infra/Containers/hybrid-view-container/hybrid-view-container.component.ts +0 -1
  75. package/lib/infra/Containers/modal-view-container/modal-view-container.component.html +1 -11
  76. package/lib/infra/Containers/modal-view-container/modal-view-container.component.ts +1 -9
  77. package/lib/infra/Containers/preview-view-container/preview-view-container.component.ts +1 -1
  78. package/lib/infra/Containers/view-container/helper.ts +22 -0
  79. package/lib/infra/Containers/view-container/view-container.component.ts +5 -18
  80. package/lib/infra/action-buttons/action-buttons.component.html +1 -1
  81. package/lib/infra/action-buttons/action-buttons.component.ts +0 -1
  82. package/lib/infra/assignment/assignment.component.html +1 -1
  83. package/lib/infra/assignment/assignment.component.ts +82 -41
  84. package/lib/infra/assignment-card/assignment-card.component.html +1 -0
  85. package/lib/infra/assignment-card/assignment-card.component.ts +0 -1
  86. package/lib/infra/dashboard-filter/dashboard-filter.component.ts +0 -1
  87. package/lib/infra/defer-load/defer-load.component.ts +8 -6
  88. package/lib/infra/error-boundary/error-boundary.component.ts +0 -1
  89. package/lib/infra/multi-step/multi-step.component.ts +0 -1
  90. package/lib/infra/navbar/navbar.component.ts +3 -6
  91. package/lib/infra/reference/reference.component.ts +77 -90
  92. package/lib/infra/region/region.component.ts +0 -1
  93. package/lib/infra/root-container/root-container.component.html +2 -15
  94. package/lib/infra/root-container/root-container.component.ts +27 -33
  95. package/lib/infra/stages/stages.component.scss +2 -2
  96. package/lib/infra/stages/stages.component.ts +0 -1
  97. package/lib/infra/view/view.component.html +7 -20
  98. package/lib/infra/view/view.component.ts +20 -3
  99. package/lib/template/app-shell/app-shell.component.ts +20 -3
  100. package/lib/template/banner-page/banner-page.component.ts +0 -1
  101. package/lib/template/base/details-template-base.ts +67 -0
  102. package/lib/template/base/form-template-base.ts +16 -0
  103. package/lib/template/case-summary/case-summary.component.ts +7 -23
  104. package/lib/template/case-view/case-view.component.html +4 -4
  105. package/lib/template/case-view/case-view.component.ts +8 -14
  106. package/lib/template/confirmation/confirmation.component.html +1 -1
  107. package/lib/template/confirmation/confirmation.component.ts +1 -2
  108. package/lib/template/data-reference/data-reference.component.ts +36 -41
  109. package/lib/template/default-form/default-form.component.html +0 -4
  110. package/lib/template/default-form/default-form.component.ts +41 -25
  111. package/lib/template/details/details.component.ts +7 -42
  112. package/lib/template/details-narrow-wide/details-narrow-wide.component.ts +6 -40
  113. package/lib/template/details-one-column/details-one-column.component.ts +7 -43
  114. package/lib/template/details-sub-tabs/details-sub-tabs.component.html +1 -2
  115. package/lib/template/details-sub-tabs/details-sub-tabs.component.ts +5 -38
  116. package/lib/template/details-three-column/details-three-column.component.ts +7 -44
  117. package/lib/template/details-two-column/details-two-column.component.ts +8 -45
  118. package/lib/template/details-wide-narrow/details-wide-narrow.component.ts +7 -43
  119. package/lib/template/dynamic-tabs/dynamic-tabs.component.html +3 -0
  120. package/lib/template/dynamic-tabs/dynamic-tabs.component.ts +8 -4
  121. package/lib/template/field-group-list/field-group-list.component.ts +0 -1
  122. package/lib/template/field-group-template/field-group-template.component.html +7 -7
  123. package/lib/template/field-group-template/field-group-template.component.scss +8 -0
  124. package/lib/template/field-group-template/field-group-template.component.ts +68 -48
  125. package/lib/template/field-value-list/field-value-list.component.html +2 -2
  126. package/lib/template/field-value-list/field-value-list.component.scss +6 -1
  127. package/lib/template/field-value-list/field-value-list.component.ts +0 -1
  128. package/lib/template/inline-dashboard/inline-dashboard.component.ts +0 -1
  129. package/lib/template/inline-dashboard-page/inline-dashboard-page.component.ts +2 -3
  130. package/lib/template/list-page/list-page.component.ts +0 -1
  131. package/lib/template/list-view/list-view.component.html +6 -1
  132. package/lib/template/list-view/list-view.component.scss +11 -0
  133. package/lib/template/list-view/list-view.component.ts +25 -11
  134. package/lib/template/list-view/listViewHelpers.ts +4 -10
  135. package/lib/template/list-view/utils.ts +2 -5
  136. package/lib/template/multi-reference-readonly/multi-reference-readonly.component.ts +0 -1
  137. package/lib/template/narrow-wide-form/narrow-wide-form.component.ts +1 -2
  138. package/lib/template/one-column/one-column.component.ts +4 -4
  139. package/lib/template/one-column-page/one-column-page.component.ts +0 -1
  140. package/lib/template/one-column-tab/one-column-tab.component.ts +1 -2
  141. package/lib/template/page/page.component.ts +1 -2
  142. package/lib/template/promoted-filters/promoted-filters.component.ts +1 -2
  143. package/lib/template/repeating-structures/repeating-structures.component.ts +1 -2
  144. package/lib/template/simple-table/simple-table.component.ts +0 -1
  145. package/lib/template/simple-table-manual/helpers.ts +126 -10
  146. package/lib/template/simple-table-manual/simple-table-manual.component.html +25 -6
  147. package/lib/template/simple-table-manual/simple-table-manual.component.scss +12 -3
  148. package/lib/template/simple-table-manual/simple-table-manual.component.ts +110 -54
  149. package/lib/template/simple-table-select/simple-table-select.component.ts +3 -4
  150. package/lib/template/single-reference-readonly/single-reference-readonly.component.ts +0 -1
  151. package/lib/template/sub-tabs/sub-tabs.component.ts +0 -1
  152. package/lib/template/three-column/three-column.component.ts +4 -4
  153. package/lib/template/three-column-page/three-column-page.component.ts +0 -1
  154. package/lib/template/two-column/two-column.component.ts +4 -4
  155. package/lib/template/two-column-page/two-column-page.component.ts +0 -1
  156. package/lib/template/two-column-tab/two-column-tab.component.ts +1 -2
  157. package/lib/template/utils.ts +16 -0
  158. package/lib/template/wide-narrow-form/wide-narrow-form.component.ts +4 -4
  159. package/lib/template/wide-narrow-page/wide-narrow-page.component.ts +1 -2
  160. package/lib/template/wss-nav-bar/wss-nav-bar.component.ts +3 -4
  161. package/lib/widget/app-announcement/app-announcement.component.ts +0 -1
  162. package/lib/widget/attachment/attachment.component.ts +9 -13
  163. package/lib/widget/case-history/case-history.component.ts +0 -1
  164. package/lib/widget/feed-container/feed-container.component.ts +7 -10
  165. package/lib/widget/file-utility/file-utility.component.ts +2 -6
  166. package/lib/widget/list-utility/list-utility.component.ts +0 -1
  167. package/lib/widget/quick-create/quick-create.component.ts +0 -1
  168. package/lib/widget/todo/todo.component.html +5 -6
  169. package/lib/widget/todo/todo.component.scss +9 -0
  170. package/lib/widget/todo/todo.component.ts +95 -85
  171. package/lib/widget/utility/utility.component.ts +0 -1
  172. package/package.json +1 -1
@@ -6,7 +6,6 @@ import { MatIconModule } from '@angular/material/icon';
6
6
  selector: 'app-alert',
7
7
  templateUrl: './alert.component.html',
8
8
  styleUrls: ['./alert.component.scss'],
9
- standalone: true,
10
9
  imports: [CommonModule, MatIconModule]
11
10
  })
12
11
  export class AlertComponent {
@@ -6,7 +6,6 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
6
6
  selector: 'app-alert-banner',
7
7
  templateUrl: './alert-banner.component.html',
8
8
  styleUrls: ['./alert-banner.component.scss'],
9
- standalone: true,
10
9
  imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
11
10
  })
12
11
  export class AlertBannerComponent {
@@ -22,6 +21,6 @@ export class AlertBannerComponent {
22
21
  onAlertClose(config) {
23
22
  const { PAGE, type, target } = config;
24
23
  const { clearMessages } = PCore.getMessageManager();
25
- clearMessages({ category: PAGE, type, context: target } as any);
24
+ clearMessages({ category: PAGE, type, context: target });
26
25
  }
27
26
  }
@@ -7,7 +7,6 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
7
7
  selector: 'app-banner',
8
8
  templateUrl: './banner.component.html',
9
9
  styleUrls: ['./banner.component.scss'],
10
- standalone: true,
11
10
  imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
12
11
  })
13
12
  export class BannerComponent {
@@ -8,7 +8,6 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
8
8
  selector: 'app-case-create-stage',
9
9
  templateUrl: './case-create-stage.component.html',
10
10
  styleUrls: ['./case-create-stage.component.scss'],
11
- standalone: true,
12
11
  imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
13
12
  })
14
13
  export class CaseCreateStageComponent implements OnInit, OnDestroy {
@@ -53,6 +52,6 @@ export class CaseCreateStageComponent implements OnInit, OnDestroy {
53
52
  }
54
53
 
55
54
  updateSelf() {
56
- this.arChildren$ = this.pConn$.getChildren() as any[];
55
+ this.arChildren$ = this.pConn$.getChildren();
57
56
  }
58
57
  }
@@ -7,7 +7,6 @@ import { MatIconModule } from '@angular/material/icon';
7
7
  selector: 'app-field-group',
8
8
  templateUrl: './field-group.component.html',
9
9
  styleUrls: ['./field-group.component.scss'],
10
- standalone: true,
11
10
  imports: [CommonModule, MatGridListModule, MatIconModule]
12
11
  })
13
12
  export class FieldGroupComponent {
@@ -49,7 +49,7 @@
49
49
  }
50
50
 
51
51
  .psdk-case-summary-fields {
52
- padding: calc(2 * 0.5rem);
52
+ // padding: calc(2 * 0.5rem);
53
53
  display: grid;
54
54
  grid-row-gap: calc(2 * 0.5rem);
55
55
  }
@@ -90,6 +90,7 @@
90
90
  grid-template-columns: 1fr;
91
91
  grid-column-gap: calc(2 * 0.5rem);
92
92
  grid-row-gap: calc(1 * 0.5rem);
93
+ margin: 0;
93
94
  }
94
95
 
95
96
  .psdk-csf-secondary-field {
@@ -7,7 +7,6 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
7
7
  selector: 'app-material-case-summary',
8
8
  templateUrl: './material-case-summary.component.html',
9
9
  styleUrls: ['./material-case-summary.component.scss'],
10
- standalone: true,
11
10
  imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
12
11
  })
13
12
  export class MaterialCaseSummaryComponent implements OnInit, OnChanges {
@@ -27,7 +26,6 @@ export class MaterialCaseSummaryComponent implements OnInit, OnChanges {
27
26
  this.updateLabelAndDate(this.secondaryFields$);
28
27
  }
29
28
 
30
- // eslint-disable-next-line sonarjs/no-identical-functions
31
29
  ngOnChanges() {
32
30
  this.updatePrimaryWithStatus();
33
31
  this.updateLabelAndDate(this.primaryFieldsWithStatus$);
@@ -7,7 +7,6 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
7
7
  selector: 'app-material-details',
8
8
  templateUrl: './material-details.component.html',
9
9
  styleUrls: ['./material-details.component.scss'],
10
- standalone: true,
11
10
  imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
12
11
  })
13
12
  export class MaterialDetailsComponent {
@@ -10,7 +10,7 @@
10
10
  </ng-template>
11
11
 
12
12
  <ng-template #showDetails>
13
- <div class="psdk-grid-filter" *ngIf="field.config.label">
13
+ <div class="psdk-grid-filter" *ngIf="field.config.label && getVisibility(field.config)">
14
14
  <div class="psdk-details-fields-label">
15
15
  {{ field.config.label }}
16
16
  </div>
@@ -21,7 +21,7 @@
21
21
  <a *ngSwitchCase="'email'" href="mailto: {{ field.config.value }}">{{ _getValue(field.config.value) }}</a>
22
22
  <span *ngSwitchCase="'date'" class="psdk-details-text-style">{{ _formatDate(field.config.value, field.type) }}</span>
23
23
  <span *ngSwitchCase="'caseoperator'"></span>
24
- <span *ngSwitchDefault>{{ _getValue(field.config.value) }}</span>
24
+ <span *ngSwitchDefault>{{ _getValue(field.config.value, field) }}</span>
25
25
  </div>
26
26
  </div>
27
27
  </ng-template>
@@ -7,7 +7,6 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
7
7
  selector: 'app-material-details-fields',
8
8
  templateUrl: './material-details-fields.component.html',
9
9
  styleUrls: ['./material-details-fields.component.scss'],
10
- standalone: true,
11
10
  imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
12
11
  })
13
12
  export class MaterialDetailsFieldsComponent {
@@ -16,7 +15,10 @@ export class MaterialDetailsFieldsComponent {
16
15
  @Input() arFields$: any[];
17
16
  @Input() arHighlightedFields: any[];
18
17
 
19
- _getValue(configValue) {
18
+ _getValue(configValue, field: any = {}) {
19
+ if (field?.type === 'userreference') {
20
+ return configValue.userName;
21
+ }
20
22
  if (configValue && configValue != '') {
21
23
  return configValue;
22
24
  }
@@ -26,4 +28,10 @@ export class MaterialDetailsFieldsComponent {
26
28
  _formatDate(dateValue: string, dateFormat: string): string {
27
29
  return this.utils.generateDate(dateValue, dateFormat);
28
30
  }
31
+
32
+ getVisibility(config): boolean {
33
+ const { visibility = true } = config;
34
+
35
+ return this.utils.getBooleanValue(visibility);
36
+ }
29
37
  }
@@ -8,7 +8,6 @@ import { Utils } from '@pega/angular-sdk-components';
8
8
  selector: 'app-material-summary-item',
9
9
  templateUrl: './material-summary-item.component.html',
10
10
  styleUrls: ['./material-summary-item.component.scss'],
11
- standalone: true,
12
11
  imports: [CommonModule, MatButtonModule, MatMenuModule]
13
12
  })
14
13
  export class MaterialSummaryItemComponent implements OnInit {
@@ -6,7 +6,6 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
6
6
  selector: 'app-material-summary-list',
7
7
  templateUrl: './material-summary-list.component.html',
8
8
  styleUrls: ['./material-summary-list.component.scss'],
9
- standalone: true,
10
9
  imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
11
10
  })
12
11
  export class MaterialSummaryListComponent {
@@ -7,7 +7,6 @@ import { MatButtonToggleModule } from '@angular/material/button-toggle';
7
7
  selector: 'app-material-vertical-tabs',
8
8
  templateUrl: './material-vertical-tabs.component.html',
9
9
  styleUrls: ['./material-vertical-tabs.component.scss'],
10
- standalone: true,
11
10
  imports: [CommonModule, MatButtonToggleModule, MatBadgeModule]
12
11
  })
13
12
  export class MaterialVerticalTabsComponent implements OnInit {
@@ -1,4 +1,4 @@
1
- <div class="psdk-operator psdk-double">
1
+ <div class="psdk-operator psdk-double" [ngClass]="{ 'flex-row': displayLabel }">
2
2
  <div class="psdk-label">
3
3
  {{ label$ }}
4
4
  </div>
@@ -1,9 +1,18 @@
1
1
  .psdk-operator {
2
2
  display: flex;
3
- flex-direction: row;
3
+ flex-direction: column;
4
4
  font-size: 0.8rem;
5
5
  color: var(--app-neutral-color);
6
+ padding-left: 0.625rem;
7
+ margin: 16px 0 8px 0;
8
+ }
9
+
10
+ .psdk-operator.flex-row {
11
+ flex-direction: row;
6
12
  align-items: center;
13
+ text-align: center;
14
+ padding-left: 0;
15
+ margin: 0;
7
16
  }
8
17
 
9
18
  .psdk-operator-popover {
@@ -35,7 +44,6 @@
35
44
 
36
45
  .psdk-double {
37
46
  column-gap: 1rem;
38
- text-align: center;
39
47
  }
40
48
 
41
49
  .psdk-top-pad {
@@ -7,16 +7,16 @@ import { Utils } from '@pega/angular-sdk-components';
7
7
  selector: 'app-operator',
8
8
  templateUrl: './operator.component.html',
9
9
  styleUrls: ['./operator.component.scss'],
10
- standalone: true,
11
10
  imports: [CommonModule, MatButtonModule]
12
11
  })
13
12
  export class OperatorComponent implements OnInit, OnChanges, OnDestroy {
14
13
  @Input() pConn$: typeof PConnect;
15
14
  @Input() displayLabel;
15
+ @Input() name$?: string;
16
+
16
17
  fields$: any[] = [];
17
18
  bShowPopover$: boolean;
18
19
  date$: string;
19
- name$: string;
20
20
  label$: string;
21
21
  id$: string;
22
22
  constructor(
@@ -40,7 +40,7 @@ export class OperatorComponent implements OnInit, OnChanges, OnDestroy {
40
40
 
41
41
  ngOnChanges(changes: SimpleChanges): void {
42
42
  const { pConn$ } = changes;
43
- if (pConn$.previousValue !== pConn$.currentValue) {
43
+ if (pConn$ && pConn$.previousValue !== pConn$.currentValue) {
44
44
  this.updateSelf();
45
45
  }
46
46
  }
@@ -53,7 +53,7 @@ export class OperatorComponent implements OnInit, OnChanges, OnDestroy {
53
53
  }
54
54
 
55
55
  updateSelf(): void {
56
- const configProps$ = this.pConn$.getConfigProps() as any;
56
+ const configProps$ = this.pConn$.getConfigProps();
57
57
  this.displayLabel = this.displayLabel?.toLowerCase();
58
58
  const label = configProps$?.label?.toLowerCase();
59
59
  if (label === 'create operator' || this.displayLabel === 'create operator') {
@@ -69,7 +69,7 @@ export class OperatorComponent implements OnInit, OnChanges, OnDestroy {
69
69
  this.id$ = configProps$.resolveOperator.userId;
70
70
  this.label$ = configProps$.resolveLabel;
71
71
  } else {
72
- this.name$ = configProps$?.value.userName;
72
+ this.name$ = this.name$ || configProps$?.value.userName;
73
73
  this.id$ = configProps$?.value.userId;
74
74
  this.label$ = configProps$.label;
75
75
  }
@@ -10,15 +10,14 @@ interface PulseProps {
10
10
  selector: 'app-pulse',
11
11
  templateUrl: './pulse.component.html',
12
12
  styleUrls: ['./pulse.component.scss'],
13
- standalone: true,
14
13
  imports: [forwardRef(() => ComponentMapperComponent)]
15
14
  })
16
15
  export class PulseComponent implements OnInit {
17
16
  @Input() pConn$: typeof PConnect;
18
17
 
19
18
  configProps$: PulseProps;
20
- currentUser$: string;
21
- currentUserInitials$ = '--';
19
+ currentUser$: string | undefined;
20
+ currentUserInitials$: string | undefined = '--';
22
21
 
23
22
  ngOnInit() {
24
23
  this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps());
@@ -26,13 +25,13 @@ export class PulseComponent implements OnInit {
26
25
  this.currentUser$ = PCore.getEnvironmentInfo().getOperatorName();
27
26
 
28
27
  if (this.currentUser$ != '') {
29
- this.currentUserInitials$ = this.currentUser$.charAt(0);
28
+ this.currentUserInitials$ = this.currentUser$?.charAt(0);
30
29
 
31
- if (this.currentUser$.lastIndexOf(' ') > 0) {
32
- const lastName = this.currentUser$.substring(this.currentUser$.lastIndexOf(' ') + 1);
30
+ if (this.currentUser$ && this.currentUser$.lastIndexOf(' ') > 0) {
31
+ const lastName = this.currentUser$?.substring(this.currentUser$.lastIndexOf(' ') + 1);
33
32
  this.currentUserInitials$ += lastName.charAt(0);
34
- } else if (this.currentUser$.lastIndexOf('.') > 0) {
35
- const lastName = this.currentUser$.substring(this.currentUser$.lastIndexOf('.') + 1);
33
+ } else if (this.currentUser$ && this.currentUser$.lastIndexOf('.') > 0) {
34
+ const lastName = this.currentUser$?.substring(this.currentUser$.lastIndexOf('.') + 1);
36
35
  this.currentUserInitials$ += lastName.charAt(0);
37
36
  }
38
37
  }
@@ -9,7 +9,6 @@ declare let tinymce: any;
9
9
  selector: 'app-rich-text-editor',
10
10
  templateUrl: './rich-text-editor.component.html',
11
11
  styleUrls: ['./rich-text-editor.component.scss'],
12
- standalone: true,
13
12
  imports: [CommonModule, EditorModule, ReactiveFormsModule],
14
13
  providers: [{ provide: TINYMCE_SCRIPT_SRC, useValue: 'tinymce/tinymce.min.js' }]
15
14
  })
@@ -6,7 +6,6 @@ import { Component, Input } from '@angular/core';
6
6
  selector: 'wss-quick-create',
7
7
  templateUrl: './wss-quick-create.component.html',
8
8
  styleUrls: ['./wss-quick-create.component.scss'],
9
- standalone: true,
10
9
  imports: [CommonModule]
11
10
  })
12
11
  export class WssQuickCreateComponent {
@@ -11,7 +11,6 @@
11
11
  [placeholder]="placeholder"
12
12
  [formControl]="fieldControl"
13
13
  [attr.data-test-id]="testId"
14
- [value]="value$"
15
14
  [required]="bRequired$"
16
15
  [matAutocomplete]="auto"
17
16
  (input)="fieldOnChange($event)"
@@ -2,7 +2,7 @@ import { Component, OnInit, Input, ChangeDetectorRef, forwardRef, OnDestroy } fr
2
2
  import { CommonModule } from '@angular/common';
3
3
  import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
4
4
  import { MatOptionModule } from '@angular/material/core';
5
- import { MatAutocompleteModule, MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
5
+ import { MatAutocompleteModule } from '@angular/material/autocomplete';
6
6
  import { MatInputModule } from '@angular/material/input';
7
7
  import { MatFormFieldModule } from '@angular/material/form-field';
8
8
  import { interval, Observable } from 'rxjs';
@@ -14,6 +14,10 @@ import { DatapageService } from '@pega/angular-sdk-components';
14
14
  import { handleEvent } from '@pega/angular-sdk-components';
15
15
  import { PConnFieldProps } from '@pega/angular-sdk-components';
16
16
 
17
+ interface IOption {
18
+ key: string;
19
+ value: string;
20
+ }
17
21
  interface AutoCompleteProps extends PConnFieldProps {
18
22
  // If any, enter additional props that only exist on AutoComplete here
19
23
  deferDatasource?: boolean;
@@ -30,7 +34,6 @@ interface AutoCompleteProps extends PConnFieldProps {
30
34
  selector: 'app-auto-complete',
31
35
  templateUrl: './auto-complete.component.html',
32
36
  styleUrls: ['./auto-complete.component.scss'],
33
- standalone: true,
34
37
  imports: [
35
38
  CommonModule,
36
39
  ReactiveFormsModule,
@@ -71,6 +74,8 @@ export class AutoCompleteComponent implements OnInit, OnDestroy {
71
74
  hideLabel: boolean;
72
75
  filteredOptions: Observable<any[]>;
73
76
  filterValue = '';
77
+ actionsApi: Object;
78
+ propName: string;
74
79
 
75
80
  constructor(
76
81
  private angularPConnect: AngularPConnectService,
@@ -102,10 +107,17 @@ export class AutoCompleteComponent implements OnInit, OnDestroy {
102
107
 
103
108
  this.filteredOptions = this.fieldControl.valueChanges.pipe(
104
109
  startWith(''),
105
- map(value => this._filter(value || ''))
110
+ map(value => this._filter((value as string) || ''))
106
111
  );
107
112
  }
108
113
 
114
+ setOptions(options: IOption[]) {
115
+ this.options$ = options;
116
+ const index = this.options$?.findIndex(element => element.key === this.configProps$.value);
117
+ this.value$ = index > -1 ? this.options$[index].value : this.configProps$.value;
118
+ this.fieldControl.setValue(this.value$);
119
+ }
120
+
109
121
  ngOnDestroy(): void {
110
122
  if (this.formGroup$) {
111
123
  this.formGroup$.removeControl(this.controlName$);
@@ -147,10 +159,14 @@ export class AutoCompleteComponent implements OnInit, OnDestroy {
147
159
  if (this.configProps$.value != undefined) {
148
160
  const index = this.options$?.findIndex(element => element.key === this.configProps$.value);
149
161
  this.value$ = index > -1 ? this.options$[index].value : this.configProps$.value;
162
+ this.fieldControl.setValue(this.value$);
150
163
  }
151
164
 
152
165
  this.setPropertyValuesFromProps();
153
166
 
167
+ this.actionsApi = this.pConn$.getActionsApi();
168
+ this.propName = this.pConn$.getStateProps().value;
169
+
154
170
  const context = this.pConn$.getContextName();
155
171
  const { columns, datasource } = this.generateColumnsAndDataSource();
156
172
 
@@ -184,9 +200,10 @@ export class AutoCompleteComponent implements OnInit, OnDestroy {
184
200
  this.bReadonly$ = this.utils.getBooleanValue(this.configProps$.readOnly);
185
201
  }
186
202
 
187
- this.componentReference = (this.pConn$.getStateProps() as any).value;
203
+ this.componentReference = this.pConn$.getStateProps().value;
188
204
  if (this.listType === 'associated') {
189
- this.options$ = this.utils.getOptionList(this.configProps$, this.pConn$.getDataObject('')); // 1st arg empty string until typedef marked correctly
205
+ const optionsList = this.utils.getOptionList(this.configProps$, this.pConn$.getDataObject('')); // 1st arg empty string until typedef marked correctly
206
+ this.setOptions(optionsList);
190
207
  }
191
208
 
192
209
  if (!this.displayMode$ && this.listType !== 'associated') {
@@ -220,7 +237,7 @@ export class AutoCompleteComponent implements OnInit, OnDestroy {
220
237
  let datasource = this.configProps$.datasource;
221
238
  let columns = this.configProps$.columns;
222
239
  // const { deferDatasource, datasourceMetadata } = this.configProps$;
223
- const { deferDatasource, datasourceMetadata }: any = this.pConn$.getConfigProps();
240
+ const { deferDatasource, datasourceMetadata } = this.pConn$.getConfigProps();
224
241
  // convert associated to datapage listtype and transform props
225
242
  // Process deferDatasource when datapage name is present. WHhen tableType is promptList / localList
226
243
  if (deferDatasource && datasourceMetadata?.datasource?.name) {
@@ -258,7 +275,7 @@ export class AutoCompleteComponent implements OnInit, OnDestroy {
258
275
  };
259
276
  optionsData.push(obj);
260
277
  });
261
- this.options$ = optionsData;
278
+ this.setOptions(optionsData);
262
279
  }
263
280
 
264
281
  flattenParameters(params = {}) {
@@ -299,13 +316,14 @@ export class AutoCompleteComponent implements OnInit, OnDestroy {
299
316
  // this works - this.pConn$.setValue( this.componentReference, this.fieldControl.value);
300
317
  // PConnect wants to use changeHandler for onChange
301
318
  // this.angularPConnect.changeHandler( this, event);
302
- this.filterValue = (event.target as HTMLInputElement).value;
303
-
304
- this.angularPConnectData.actions?.onChange(this, event);
319
+ const value = (event.target as HTMLInputElement).value;
320
+ this.filterValue = value;
321
+ handleEvent(this.actionsApi, 'change', this.propName, value);
305
322
  }
306
323
 
307
- optionChanged(event: MatAutocompleteSelectedEvent) {
308
- this.angularPConnectData.actions?.onChange(this, event);
324
+ optionChanged(event: any) {
325
+ const value = event?.option?.value;
326
+ handleEvent(this.actionsApi, 'change', this.propName, value);
309
327
  }
310
328
 
311
329
  fieldOnBlur(event: Event) {
@@ -315,11 +333,8 @@ export class AutoCompleteComponent implements OnInit, OnDestroy {
315
333
  const index = this.options$?.findIndex(element => element.value === el.value);
316
334
  key = index > -1 ? (key = this.options$[index].key) : el.value;
317
335
  }
318
-
319
336
  const value = key;
320
- const actionsApi = this.pConn$?.getActionsApi();
321
- const propName = (this.pConn$?.getStateProps() as any).value;
322
- handleEvent(actionsApi, 'changeNblur', propName, value);
337
+ handleEvent(this.actionsApi, 'changeNblur', this.propName, value);
323
338
  if (this.configProps$?.onRecordChange) {
324
339
  el.value = value;
325
340
  this.configProps$.onRecordChange(event);
@@ -8,7 +8,6 @@ import { ProgressSpinnerService } from '@pega/angular-sdk-components';
8
8
  selector: 'app-cancel-alert',
9
9
  templateUrl: './cancel-alert.component.html',
10
10
  styleUrls: ['./cancel-alert.component.scss'],
11
- standalone: true,
12
11
  imports: [CommonModule, MatGridListModule, MatButtonModule]
13
12
  })
14
13
  export class CancelAlertComponent implements OnChanges {
@@ -1,9 +1,11 @@
1
- <div *ngIf="displayMode$; else noDisplayMode">
2
- <component-mapper
3
- *ngIf="bVisible$ !== false"
4
- name="FieldValueList"
5
- [props]="{ label$: caption$, value$: value$ ? trueLabel$ : falseLabel$, displayMode$ }"
6
- ></component-mapper>
1
+ <div *ngIf="variant !== 'card'; else cardMode">
2
+ <div *ngIf="displayMode$; else noDisplayMode">
3
+ <component-mapper
4
+ *ngIf="bVisible$ !== false"
5
+ name="FieldValueList"
6
+ [props]="{ label$: caption$, value$: value$ ? trueLabel$ : falseLabel$, displayMode$ }"
7
+ ></component-mapper>
8
+ </div>
7
9
  </div>
8
10
  <ng-template #noDisplayMode>
9
11
  <div *ngIf="bHasForm$; else noEdit">
@@ -18,6 +20,8 @@
18
20
  <mat-checkbox
19
21
  [labelPosition]="'after'"
20
22
  [checked]="item.selected"
23
+ [disabled]="bDisabled$ || bReadonly$"
24
+ [required]="bRequired$"
21
25
  [attr.data-test-id]="testId + ':' + item.value"
22
26
  (change)="handleChangeMultiMode($event, item)"
23
27
  (blur)="fieldOnBlur($event)"
@@ -29,6 +33,8 @@
29
33
  <mat-checkbox
30
34
  [labelPosition]="'after'"
31
35
  [checked]="isChecked$"
36
+ [disabled]="bDisabled$ || bReadonly$"
37
+ [required]="bRequired$"
32
38
  [attr.data-test-id]="testId"
33
39
  [formControl]="fieldControl"
34
40
  (change)="fieldOnChange($event)"
@@ -44,3 +50,9 @@
44
50
  <ng-template #noEdit>
45
51
  <component-mapper *ngIf="bVisible$ !== false" name="Text" [props]="{ pConn$, formatAs$: 'text' }"></component-mapper>
46
52
  </ng-template>
53
+ <ng-template #cardMode>
54
+ <h4>{{ label$ }}</h4>
55
+ <div>
56
+ <component-mapper name="SelectableCard" [props]="{ pConn$: pConn$, type: 'checkbox' }" [parent]="this"></component-mapper>
57
+ </div>
58
+ </ng-template>
@@ -26,13 +26,14 @@ interface CheckboxProps extends Omit<PConnFieldProps, 'value'> {
26
26
  primaryField: string;
27
27
  readonlyContextList: any;
28
28
  referenceList: string;
29
+ variant?: string;
30
+ renderMode: string;
29
31
  }
30
32
 
31
33
  @Component({
32
34
  selector: 'app-check-box',
33
35
  templateUrl: './check-box.component.html',
34
36
  styleUrls: ['./check-box.component.scss'],
35
- standalone: true,
36
37
  imports: [CommonModule, ReactiveFormsModule, MatCheckboxModule, MatFormFieldModule, MatOptionModule, forwardRef(() => ComponentMapperComponent)]
37
38
  })
38
39
  export class CheckBoxComponent implements OnInit, OnDestroy {
@@ -69,8 +70,9 @@ export class CheckBoxComponent implements OnInit, OnDestroy {
69
70
  selectedvalues: any;
70
71
  referenceList: string;
71
72
  listOfCheckboxes: any[] = [];
72
- actionsApi: any;
73
- propName: any;
73
+ actionsApi: Object;
74
+ propName: string;
75
+ variant?: string;
74
76
 
75
77
  fieldControl = new FormControl('', null);
76
78
 
@@ -91,7 +93,7 @@ export class CheckBoxComponent implements OnInit, OnDestroy {
91
93
  // this.updateSelf();
92
94
  this.checkAndUpdate();
93
95
 
94
- if (this.selectionMode === 'multi' && this.referenceList?.length > 0) {
96
+ if (this.selectionMode === 'multi' && this.referenceList?.length > 0 && !this.bReadonly$) {
95
97
  this.pConn$.setReferenceList(this.selectionList);
96
98
  updateNewInstructions(this.pConn$, this.selectionList);
97
99
  }
@@ -146,7 +148,8 @@ export class CheckBoxComponent implements OnInit, OnDestroy {
146
148
  }
147
149
 
148
150
  this.actionsApi = this.pConn$.getActionsApi();
149
- this.propName = (this.pConn$.getStateProps() as any).value;
151
+ this.propName = this.pConn$.getStateProps().value;
152
+ this.variant = this.configProps$.variant;
150
153
 
151
154
  // multi case
152
155
  this.selectionMode = this.configProps$.selectionMode;
@@ -155,11 +158,12 @@ export class CheckBoxComponent implements OnInit, OnDestroy {
155
158
  this.selectionList = this.configProps$.selectionList;
156
159
  this.selectedvalues = this.configProps$.readonlyContextList;
157
160
  this.primaryField = this.configProps$.primaryField;
161
+ this.bReadonly$ = this.configProps$.renderMode === 'ReadOnly' || this.displayMode$ === 'DISPLAY_ONLY' || this.configProps$.readOnly;
158
162
 
159
163
  this.datasource = this.configProps$.datasource;
160
164
  this.selectionKey = this.configProps$.selectionKey;
161
165
  const listSourceItems = this.datasource?.source ?? [];
162
- const dataField: any = this.selectionKey?.split?.('.')[1];
166
+ const dataField = this.selectionKey?.split?.('.')[1] ?? '';
163
167
  const listToDisplay: any[] = [];
164
168
  listSourceItems.forEach(element => {
165
169
  element.selected = this.selectedvalues?.some?.(data => data[dataField] === element.key);
@@ -173,8 +177,8 @@ export class CheckBoxComponent implements OnInit, OnDestroy {
173
177
 
174
178
  this.caption$ = this.configProps$.caption;
175
179
  this.helperText = this.configProps$.helperText;
176
- this.trueLabel$ = this.configProps$.trueLabel;
177
- this.falseLabel$ = this.configProps$.falseLabel;
180
+ this.trueLabel$ = this.configProps$.trueLabel || 'Yes';
181
+ this.falseLabel$ = this.configProps$.falseLabel || 'No';
178
182
 
179
183
  // timeout and detectChanges to avoid ExpressionChangedAfterItHasBeenCheckedError
180
184
  setTimeout(() => {
@@ -203,7 +207,7 @@ export class CheckBoxComponent implements OnInit, OnDestroy {
203
207
  this.fieldControl.enable();
204
208
  }
205
209
 
206
- this.componentReference = (this.pConn$.getStateProps() as any).value;
210
+ this.componentReference = this.pConn$.getStateProps().value;
207
211
 
208
212
  // eslint-disable-next-line sonarjs/no-redundant-boolean
209
213
  if (this.value$ === 'true' || this.value$ == true) {
@@ -225,16 +229,17 @@ export class CheckBoxComponent implements OnInit, OnDestroy {
225
229
 
226
230
  fieldOnChange(event: any) {
227
231
  event.value = event.checked;
228
-
229
232
  handleEvent(this.actionsApi, 'changeNblur', this.propName, event.checked);
233
+ this.pConn$.clearErrorMessages({
234
+ property: this.propName
235
+ });
230
236
  }
231
237
 
232
238
  fieldOnBlur(event: any) {
233
239
  if (this.selectionMode === 'multi') {
234
240
  this.pConn$.getValidationApi().validate(this.selectedvalues, this.selectionList);
235
241
  } else {
236
- event.value = event.checked;
237
- this.angularPConnectData.actions?.onBlur(this, event);
242
+ this.pConn$.getValidationApi().validate(event.target.checked);
238
243
  }
239
244
  }
240
245
 
@@ -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="bHasForm$; else noEdit">
@@ -13,9 +13,9 @@
13
13
  matInput
14
14
  currencyMask
15
15
  [options]="{
16
- prefix: currSym,
17
- thousands: currSep,
18
- decimal: currDec,
16
+ prefix: currencySymbol,
17
+ thousands: thousandSeparator,
18
+ decimal: decimalSeparator,
19
19
  align: 'left',
20
20
  nullable: true,
21
21
  precision: decimalPrecision,