@pega/angular-sdk-overrides 0.242.1 → 0.242.3

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 (61) hide show
  1. package/lib/designSystemExtension/material-details-fields/material-details-fields.component.html +1 -1
  2. package/lib/designSystemExtension/material-details-fields/material-details-fields.component.ts +4 -1
  3. package/lib/field/auto-complete/auto-complete.component.ts +14 -11
  4. package/lib/field/check-box/check-box.component.ts +8 -7
  5. package/lib/field/currency/currency.component.html +1 -1
  6. package/lib/field/currency/currency.component.ts +15 -1
  7. package/lib/field/date/date.component.html +1 -6
  8. package/lib/field/date/date.component.ts +19 -36
  9. package/lib/field/date-time/date-time.component.html +1 -2
  10. package/lib/field/date-time/date-time.component.ts +15 -10
  11. package/lib/field/decimal/decimal.component.ts +2 -2
  12. package/lib/field/dropdown/dropdown.component.ts +9 -10
  13. package/lib/field/email/email.component.ts +13 -3
  14. package/lib/field/group/group.component.ts +2 -2
  15. package/lib/field/integer/integer.component.html +1 -1
  16. package/lib/field/integer/integer.component.ts +12 -4
  17. package/lib/field/multiselect/multiselect.component.ts +11 -3
  18. package/lib/field/percentage/percentage.component.html +3 -2
  19. package/lib/field/percentage/percentage.component.ts +21 -12
  20. package/lib/field/phone/phone.component.html +1 -1
  21. package/lib/field/phone/phone.component.ts +11 -14
  22. package/lib/field/radio-buttons/radio-buttons.component.ts +8 -8
  23. package/lib/field/rich-text/rich-text.component.ts +7 -5
  24. package/lib/field/scalar-list/scalar-list.component.ts +2 -2
  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 +6 -2
  37. package/lib/infra/Containers/view-container/view-container.component.ts +14 -9
  38. package/lib/infra/defer-load/defer-load.component.ts +1 -1
  39. package/lib/infra/root-container/root-container.component.ts +3 -0
  40. package/lib/infra/stages/stages.component.scss +2 -2
  41. package/lib/infra/view/view.component.html +6 -19
  42. package/lib/template/data-reference/data-reference.component.ts +1 -1
  43. package/lib/template/default-form/default-form.component.ts +6 -3
  44. package/lib/template/details/details.component.ts +1 -1
  45. package/lib/template/details-one-column/details-one-column.component.ts +1 -1
  46. package/lib/template/details-three-column/details-three-column.component.ts +1 -1
  47. package/lib/template/details-two-column/details-two-column.component.ts +2 -2
  48. package/lib/template/details-wide-narrow/details-wide-narrow.component.ts +1 -1
  49. package/lib/template/dynamic-tabs/dynamic-tabs.component.ts +1 -1
  50. package/lib/template/field-group-template/field-group-template.component.ts +2 -2
  51. package/lib/template/field-value-list/field-value-list.component.html +1 -1
  52. package/lib/template/field-value-list/field-value-list.component.scss +1 -1
  53. package/lib/template/form-template-base/form-template-base.component.ts +10 -0
  54. package/lib/template/list-view/list-view.component.ts +1 -1
  55. package/lib/template/one-column/one-column.component.ts +3 -2
  56. package/lib/template/page/page.component.ts +3 -0
  57. package/lib/template/simple-table-manual/helpers.ts +1 -1
  58. package/lib/template/three-column/three-column.component.ts +3 -2
  59. package/lib/template/two-column/two-column.component.ts +3 -2
  60. package/lib/template/wide-narrow-form/wide-narrow-form.component.ts +3 -2
  61. package/package.json +1 -1
@@ -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;
@@ -14,25 +14,12 @@
14
14
  </ng-container>
15
15
 
16
16
  <ng-template #noTemplate>
17
- <div *ngIf="displayOnlyFA$; else displayAll">
18
- <div *ngFor="let kid of arChildren$">
19
- <div [ngSwitch]="kid.getPConnect().getComponentName()">
20
- <component-mapper
21
- [name]="kid.getPConnect().getComponentName()"
22
- [props]="{ pConn$: kid.getPConnect() }"
23
- errorMsg="View Missing (displayOnlyFA): {{ kid.getPConnect().getComponentName() }}"
24
- ></component-mapper>
25
- </div>
26
- </div>
17
+ <div *ngFor="let kid of arChildren$">
18
+ <component-mapper
19
+ [name]="kid.getPConnect().getComponentName()"
20
+ [props]="{ pConn$: kid.getPConnect() }"
21
+ errorMsg="View Missing (displayAll): {{ kid.getPConnect().getComponentName() }}"
22
+ ></component-mapper>
27
23
  </div>
28
- <ng-template #displayAll>
29
- <div *ngFor="let kid of arChildren$">
30
- <component-mapper
31
- [name]="kid.getPConnect().getComponentName()"
32
- [props]="{ pConn$: kid.getPConnect() }"
33
- errorMsg="View Missing (displayAll): {{ kid.getPConnect().getComponentName() }}"
34
- ></component-mapper>
35
- </div>
36
- </ng-template>
37
24
  </ng-template>
38
25
  </div>
@@ -113,7 +113,7 @@ export class DataReferenceComponent implements OnInit, OnDestroy {
113
113
  this.refList = this.rawViewMetadata.config.referenceList;
114
114
  this.canBeChangedInReviewMode = theConfigProps.allowAndPersistChangesInReviewMode && (displayAs === 'autocomplete' || displayAs === 'dropdown');
115
115
  // this.childrenToRender = this.children;
116
- this.isDisplayModeEnabled = ['LABELS_LEFT', 'STACKED_LARGE_VAL'].includes(displayMode);
116
+ this.isDisplayModeEnabled = ['DISPLAY_ONLY', 'STACKED_LARGE_VAL'].includes(displayMode);
117
117
 
118
118
  if (this.firstChildMeta?.type !== 'Region') {
119
119
  this.firstChildPConnect = this.pConn$.getChildren()[0].getPConnect;
@@ -4,6 +4,7 @@ import { FormGroup } from '@angular/forms';
4
4
  import { ReferenceComponent } from '@pega/angular-sdk-components';
5
5
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
6
6
  import { TemplateUtils } from '@pega/angular-sdk-components';
7
+ import { FormTemplateBaseComponent } from '@pega/angular-sdk-components';
7
8
 
8
9
  interface DefaultFormProps {
9
10
  // If any, enter additional props that only exist on this component
@@ -19,8 +20,8 @@ interface DefaultFormProps {
19
20
  standalone: true,
20
21
  imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
21
22
  })
22
- export class DefaultFormComponent implements OnInit {
23
- @Input() pConn$: typeof PConnect;
23
+ export class DefaultFormComponent extends FormTemplateBaseComponent implements OnInit {
24
+ @Input() override pConn$: typeof PConnect;
24
25
  @Input() formGroup$: FormGroup;
25
26
 
26
27
  arChildren$: any[];
@@ -41,7 +42,9 @@ export class DefaultFormComponent implements OnInit {
41
42
  'Confirmation'
42
43
  ];
43
44
 
44
- constructor(private templateUtils: TemplateUtils) {}
45
+ constructor(private templateUtils: TemplateUtils) {
46
+ super();
47
+ }
45
48
 
46
49
  ngOnInit(): void {
47
50
  const configProps = this.pConn$.getConfigProps() as DefaultFormProps;
@@ -79,7 +79,7 @@ export class DetailsComponent implements OnInit, OnDestroy {
79
79
  if (theCompType === 'reference' || theCompType === 'group') {
80
80
  const configProps = thePConn.getConfigProps();
81
81
  configProps.readOnly = true;
82
- configProps.displayMode = 'LABELS_LEFT';
82
+ configProps.displayMode = 'DISPLAY_ONLY';
83
83
  const propToUse = { ...thePConn.getInheritedProps() };
84
84
  configProps.label = propToUse?.label;
85
85
  const options = {
@@ -70,7 +70,7 @@ export class DetailsOneColumnComponent implements OnInit, OnDestroy {
70
70
  });
71
71
  }
72
72
 
73
- this.pConn$.setInheritedProp('displayMode', 'LABELS_LEFT');
73
+ this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY');
74
74
  this.pConn$.setInheritedProp('readOnly', true);
75
75
 
76
76
  const kids = this.pConn$.getChildren() as any[];
@@ -75,7 +75,7 @@ export class DetailsThreeColumnComponent implements OnInit, OnDestroy {
75
75
  });
76
76
  }
77
77
 
78
- this.pConn$.setInheritedProp('displayMode', 'LABELS_LEFT');
78
+ this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY');
79
79
  this.pConn$.setInheritedProp('readOnly', true);
80
80
 
81
81
  const kids = this.pConn$.getChildren() as any[];
@@ -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') {
@@ -75,7 +75,7 @@ export class DetailsTwoColumnComponent implements OnInit, OnDestroy {
75
75
  });
76
76
  }
77
77
 
78
- this.pConn$.setInheritedProp('displayMode', 'LABELS_LEFT');
78
+ this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY');
79
79
  this.pConn$.setInheritedProp('readOnly', true);
80
80
 
81
81
  const kids = this.pConn$.getChildren() as any[];
@@ -71,7 +71,7 @@ export class DetailsWideNarrowComponent implements OnInit, OnDestroy {
71
71
  });
72
72
  }
73
73
 
74
- this.pConn$.setInheritedProp('displayMode', 'LABELS_LEFT');
74
+ this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY');
75
75
  this.pConn$.setInheritedProp('readOnly', true);
76
76
 
77
77
  const kids = this.pConn$.getChildren() as any[];
@@ -59,7 +59,7 @@ export class DynamicTabsComponent implements OnInit, OnDestroy {
59
59
  const { tablabel } = this.pConn$.getComponentConfig();
60
60
  const tablabelProp = PCore.getAnnotationUtils().getPropertyName(tablabel);
61
61
 
62
- this.pConn$.setInheritedProp('displayMode', 'LABELS_LEFT');
62
+ this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY');
63
63
  this.pConn$.setInheritedProp('readOnly', true);
64
64
 
65
65
  const referenceListData = this.pConn$.getValue(`${referenceList}.pxResults`, ''); // 2nd arg empty string until typedefs properly allow optional
@@ -105,7 +105,7 @@ export class FieldGroupTemplateComponent implements OnInit, OnDestroy, OnChanges
105
105
 
106
106
  const renderMode = this.configProps$.renderMode;
107
107
  const displayMode = this.configProps$.displayMode;
108
- this.readonlyMode = renderMode === 'ReadOnly' || displayMode === 'LABELS_LEFT';
108
+ this.readonlyMode = renderMode === 'ReadOnly' || displayMode === 'DISPLAY_ONLY';
109
109
  this.contextClass = this.configProps$.contextClass;
110
110
  const lookForChildInConfig = this.configProps$.lookForChildInConfig;
111
111
  this.heading = this.configProps$.heading ?? 'Row';
@@ -114,7 +114,7 @@ export class FieldGroupTemplateComponent implements OnInit, OnDestroy, OnChanges
114
114
  this.pageReference = `${this.pConn$.getPageReference()}${resolvedList}`;
115
115
  this.pConn$.setReferenceList(resolvedList);
116
116
  if (this.readonlyMode) {
117
- this.pConn$.setInheritedProp('displayMode', 'LABELS_LEFT');
117
+ this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY');
118
118
  }
119
119
  this.referenceList = this.configProps$.referenceList;
120
120
  if (this.prevRefLength != this.referenceList.length) {
@@ -1,4 +1,4 @@
1
- <div *ngIf="displayMode$ === 'LABELS_LEFT'; else STACKED_LARGE_VAL" class="psdk-container-labels-left">
1
+ <div *ngIf="displayMode$ === 'DISPLAY_ONLY'; else STACKED_LARGE_VAL" class="psdk-container-labels-left">
2
2
  <div class="psdk-grid-label">{{ label$ }}</div>
3
3
  <div class="psdk-val-labels-left">
4
4
  <ng-container *ngTemplateOutlet="valueTemplate"></ng-container>
@@ -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,4 @@
14
15
  font-size: 1.25rem;
15
16
  }
16
17
  .psdk-val-labels-left {
17
- margin: 8px 0px;
18
18
  }
@@ -0,0 +1,10 @@
1
+ import { Directive, OnDestroy } from '@angular/core';
2
+
3
+ @Directive()
4
+ export class FormTemplateBaseComponent implements OnDestroy {
5
+ pConn$: any;
6
+
7
+ ngOnDestroy(): void {
8
+ PCore.getContextTreeManager().removeContextTreeNode(this.pConn$.getContextName());
9
+ }
10
+ }
@@ -961,7 +961,7 @@ export class ListViewComponent implements OnInit, OnDestroy {
961
961
 
962
962
  filterDataWithDate(item, filterObj, filterValue) {
963
963
  let bKeep;
964
- let value = item[filterObj.ref] != null ?? item[filterObj.ref] != '' ? getSeconds(item[filterObj.ref]) : null;
964
+ let value = item[filterObj.ref] != null || item[filterObj.ref] != '' ? getSeconds(item[filterObj.ref]) : null;
965
965
  filterValue = filterObj.containsFilterValue != null && filterObj.containsFilterValue != '' ? getSeconds(filterObj.containsFilterValue) : null;
966
966
 
967
967
  switch (filterObj.containsFilter) {
@@ -2,6 +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
6
 
6
7
  @Component({
7
8
  selector: 'app-one-column',
@@ -10,8 +11,8 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
10
11
  standalone: true,
11
12
  imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
12
13
  })
13
- export class OneColumnComponent implements OnInit, OnChanges {
14
- @Input() pConn$: typeof PConnect;
14
+ export class OneColumnComponent extends FormTemplateBaseComponent implements OnInit, OnChanges {
15
+ @Input() override pConn$: typeof PConnect;
15
16
  @Input() formGroup$: FormGroup;
16
17
 
17
18
  arChildren$: any[];
@@ -42,6 +42,9 @@ export class PageComponent implements OnInit, OnDestroy {
42
42
  if (operator && operator != '') {
43
43
  this.title$ += `, ${operator}`;
44
44
  }
45
+
46
+ // when showing a page, similar to updating root, need to cause viewContainer to call "initContainer"
47
+ sessionStorage.setItem('hasViewContainer', 'false');
45
48
  }
46
49
 
47
50
  ngOnDestroy(): void {
@@ -190,7 +190,7 @@ export const createMetaForTable = (fields, renderMode) => {
190
190
 
191
191
  export const filterDataByDate = (item, filterObj) => {
192
192
  let bKeep;
193
- let value = item[filterObj.ref] != null ?? item[filterObj.ref] != '' ? getSeconds(item[filterObj.ref]) : null;
193
+ let value = item[filterObj.ref] != null || item[filterObj.ref] != '' ? getSeconds(item[filterObj.ref]) : null;
194
194
  let filterValue = filterObj.containsFilterValue != null && filterObj.containsFilterValue != '' ? getSeconds(filterObj.containsFilterValue) : null;
195
195
 
196
196
  switch (filterObj.containsFilter) {
@@ -2,6 +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
6
 
6
7
  @Component({
7
8
  selector: 'app-three-column',
@@ -10,8 +11,8 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
10
11
  standalone: true,
11
12
  imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
12
13
  })
13
- export class ThreeColumnComponent implements OnInit, OnChanges {
14
- @Input() pConn$: typeof PConnect;
14
+ export class ThreeColumnComponent extends FormTemplateBaseComponent implements OnInit, OnChanges {
15
+ @Input() override pConn$: typeof PConnect;
15
16
  @Input() formGroup$: FormGroup;
16
17
 
17
18
  arChildren$: any[];
@@ -2,6 +2,7 @@ import { Component, OnInit, Input, forwardRef, SimpleChanges, OnChanges } from '
2
2
  import { CommonModule } from '@angular/common';
3
3
  import { FormGroup } from '@angular/forms';
4
4
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
5
+ import { FormTemplateBaseComponent } from '@pega/angular-sdk-components';
5
6
 
6
7
  @Component({
7
8
  selector: 'app-two-column',
@@ -10,8 +11,8 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
10
11
  standalone: true,
11
12
  imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
12
13
  })
13
- export class TwoColumnComponent implements OnInit, OnChanges {
14
- @Input() pConn$: typeof PConnect;
14
+ export class TwoColumnComponent extends FormTemplateBaseComponent implements OnInit, OnChanges {
15
+ @Input() override pConn$: typeof PConnect;
15
16
  @Input() formGroup$: FormGroup;
16
17
 
17
18
  arChildren$: any[];
@@ -2,6 +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
6
 
6
7
  @Component({
7
8
  selector: 'app-wide-narrow-form',
@@ -10,8 +11,8 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
10
11
  standalone: true,
11
12
  imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
12
13
  })
13
- export class WideNarrowFormComponent implements OnInit, OnChanges {
14
- @Input() pConn$: typeof PConnect;
14
+ export class WideNarrowFormComponent extends FormTemplateBaseComponent implements OnInit, OnChanges {
15
+ @Input() override pConn$: typeof PConnect;
15
16
  @Input() formGroup$: FormGroup;
16
17
 
17
18
  arChildren$: any[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/angular-sdk-overrides",
3
- "version": "0.242.1",
3
+ "version": "0.242.3",
4
4
  "description": "Angular SDK - Code for overriding components",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"