@pega/angular-sdk-overrides 0.24.4 → 0.24.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.
@@ -2,7 +2,7 @@
2
2
  <dl class="psdk-case-summary-fields-primary">
3
3
  <div *ngFor="let field of primaryFieldsWithStatus$" class="psdk-csf-primary-field">
4
4
  <dt class="psdk-csf-primary-field-header">
5
- {{ field.config.label }}
5
+ {{ field.config?.label }}
6
6
  </dt>
7
7
  <dd *ngIf="field.config.value === ''; else hasValue" class="psdk-csf-primary-field-data">
8
8
  <ng-container [ngSwitch]="field.type.toLowerCase()">
@@ -28,10 +28,10 @@
28
28
  <dl *ngFor="let field of secondaryFields$" class="psdk-case-summary-fields-secondary">
29
29
  <div
30
30
  *ngIf="
31
- field.config?.label?.toLowerCase() == 'create operator' ||
32
- field.displayLabel.toLowerCase() == 'create operator' ||
33
- field.config?.label?.toLowerCase() == 'update operator' ||
34
- field.displayLabel.toLowerCase() == 'update operator';
31
+ field?.config?.label?.toLowerCase() == 'create operator' ||
32
+ field?.displayLabel?.toLowerCase() == 'create operator' ||
33
+ field?.config?.label?.toLowerCase() == 'update operator' ||
34
+ field?.displayLabel?.toLowerCase() == 'update operator';
35
35
  else hasSecondaryValue
36
36
  "
37
37
  >
@@ -40,7 +40,7 @@
40
40
  <ng-template #hasSecondaryValue>
41
41
  <div class="psdk-csf-secondary-field">
42
42
  <dt class="psdk-csf-secondary-field-header">
43
- {{ field.config.displayLabel || field.config.label }}
43
+ {{ field.config?.displayLabel || field.config?.label }}
44
44
  </dt>
45
45
  <dd class="psdk-csf-secondary-field-data">
46
46
  <div [ngSwitch]="field.type">
@@ -193,15 +193,14 @@ export class CheckBoxComponent implements OnInit, OnDestroy {
193
193
  this.bDisabled$ = this.utils.getBooleanValue(this.configProps$.disabled);
194
194
  }
195
195
 
196
- if (this.bDisabled$) {
197
- this.fieldControl.disable();
198
- } else {
199
- this.fieldControl.enable();
200
- }
201
-
202
196
  if (this.configProps$.readOnly != null) {
203
197
  this.bReadonly$ = this.utils.getBooleanValue(this.configProps$.readOnly);
198
+ }
199
+
200
+ if (this.bDisabled$ || this.bReadonly$) {
204
201
  this.fieldControl.disable();
202
+ } else {
203
+ this.fieldControl.enable();
205
204
  }
206
205
 
207
206
  this.componentReference = (this.pConn$.getStateProps() as any).value;
@@ -20,11 +20,10 @@
20
20
  [matAutocomplete]="auto"
21
21
  (input)="fieldOnChange($event)"
22
22
  [matChipInputFor]="chipGrid"
23
- #trigger="matAutocompleteTrigger"
24
23
  />
25
24
  <mat-autocomplete #auto="matAutocomplete">
26
- <mat-option *ngFor="let item of itemsTree" [value]="item.primary" (click)="optionClicked($event, item, trigger)">
27
- <mat-checkbox [checked]="item.selected" (click)="optionClicked($event, item, trigger)">
25
+ <mat-option *ngFor="let item of itemsTree" [value]="item.primary" (click)="optionClicked($event, item)">
26
+ <mat-checkbox [checked]="item.selected" (click)="optionClicked($event, item)">
28
27
  <span>{{ item.primary }}</span>
29
28
  </mat-checkbox>
30
29
  </mat-option>
@@ -1,7 +1,7 @@
1
1
  import { CommonModule } from '@angular/common';
2
2
  import { Component, forwardRef, Input, OnDestroy, OnInit } from '@angular/core';
3
3
  import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
4
- import { MatAutocompleteModule, MatAutocompleteSelectedEvent, MatAutocompleteTrigger } from '@angular/material/autocomplete';
4
+ import { MatAutocompleteModule, MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
5
5
  import { MatChipsModule } from '@angular/material/chips';
6
6
  import { MatCheckboxModule } from '@angular/material/checkbox';
7
7
  import { MatOptionModule } from '@angular/material/core';
@@ -273,9 +273,6 @@ export class MultiselectComponent implements OnInit, OnDestroy {
273
273
  selectedRows || []
274
274
  ).then(res => {
275
275
  this.itemsTree = res || [];
276
- if (this.trigger) {
277
- this.trigger.openPanel();
278
- }
279
276
  });
280
277
  });
281
278
  }
@@ -290,14 +287,13 @@ export class MultiselectComponent implements OnInit, OnDestroy {
290
287
  this.angularPConnectData.actions?.onChange(this, event);
291
288
  }
292
289
 
293
- optionClicked = (event: Event, data: any, trigger?: MatAutocompleteTrigger): void => {
290
+ optionClicked = (event: Event, data: any): void => {
294
291
  event.stopPropagation();
295
- this.toggleSelection(data, trigger);
292
+ this.toggleSelection(data);
296
293
  };
297
294
 
298
- toggleSelection = (data: any, trigger?: MatAutocompleteTrigger): void => {
295
+ toggleSelection = (data: any): void => {
299
296
  data.selected = !data.selected;
300
- this.trigger = trigger;
301
297
  this.itemsTree.map((ele: any) => {
302
298
  if (ele.id === data.id) {
303
299
  ele.selected = data.selected;
@@ -17,7 +17,6 @@
17
17
  headerText$: todo_headerText$,
18
18
  type$: 'TODO',
19
19
  context$: todo_context$,
20
- itemKey$: itemKey$,
21
20
  isConfirm: true
22
21
  }"
23
22
  ></component-mapper>
@@ -159,7 +159,7 @@ export class ViewComponent implements OnInit, OnDestroy, OnChanges {
159
159
  * The resolution lies in transferring this responsibility to the Reference component, eliminating the need for this code when Reference
160
160
  * component is able to handle it.
161
161
  */
162
- if (this.pConn$.getPageReference().length > 'caseInfo.content'.length) {
162
+ if (!this.configProps$.visibility && this.pConn$.getPageReference().length > 'caseInfo.content'.length) {
163
163
  this.visibility$ = evaluateVisibility(this.pConn$);
164
164
  }
165
165
 
@@ -172,7 +172,7 @@ export class ListViewComponent implements OnInit, OnDestroy {
172
172
  /** If compositeKeys is defined, use dynamic value, else fallback to pyID or pyGUID. */
173
173
  this.compositeKeys = this.configProps$?.compositeKeys;
174
174
  this.rowID = this.compositeKeys && this.compositeKeys?.length === 1 ? this.compositeKeys[0] : defRowID;
175
- this.bShowSearch$ = this.utils.getBooleanValue(this.configProps$.globalSearch ? this.configProps$.globalSearch : this.payload.globalSearch);
175
+ this.bShowSearch$ = this.utils.getBooleanValue(this.configProps$?.globalSearch ? this.configProps$.globalSearch : this.payload?.globalSearch);
176
176
  this.bColumnReorder$ = this.utils.getBooleanValue(this.configProps$.reorderFields);
177
177
  this.bGrouping$ = this.utils.getBooleanValue(this.configProps$.grouping);
178
178
  this.showDynamicFields = this.configProps$?.showDynamicFields;
@@ -960,9 +960,7 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
960
960
  this.rawFields?.forEach(item => {
961
961
  const referenceListData = getReferenceList(this.pConn$);
962
962
  const isDatapage = referenceListData.startsWith('D_');
963
- const pageReferenceValue = isDatapage
964
- ? `${referenceListData}[${index}]`
965
- : `${this.pConn$.getPageReference()}${referenceListData.substring(referenceListData.lastIndexOf('.'))}[${index}]`;
963
+ const pageReferenceValue = isDatapage ? `${referenceListData}[${index}]` : `${this.pConn$.getPageReference()}${referenceListData}[${index}]`;
966
964
  const config = {
967
965
  meta: item,
968
966
  options: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/angular-sdk-overrides",
3
- "version": "0.24.4",
3
+ "version": "0.24.5",
4
4
  "description": "Angular SDK - Code for overriding components",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"