@pega/angular-sdk-overrides 25.1.12 → 26.1.10

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 (168) hide show
  1. package/lib/designSystemExtension/alert/alert.component.html +4 -1
  2. package/lib/designSystemExtension/alert/alert.component.scss +9 -10
  3. package/lib/designSystemExtension/alert/alert.component.ts +6 -2
  4. package/lib/designSystemExtension/field-group/field-group.component.ts +11 -3
  5. package/lib/designSystemExtension/material-case-summary/material-case-summary.component.html +51 -36
  6. package/lib/designSystemExtension/material-case-summary/material-case-summary.component.scss +12 -0
  7. package/lib/designSystemExtension/material-case-summary/material-case-summary.component.ts +11 -0
  8. package/lib/designSystemExtension/operator/operator.component.html +5 -3
  9. package/lib/designSystemExtension/operator/operator.component.scss +7 -0
  10. package/lib/designSystemExtension/operator/operator.component.ts +2 -1
  11. package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.html +100 -10
  12. package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.scss +141 -1
  13. package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.spec.ts +1 -1
  14. package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.ts +240 -72
  15. package/lib/field/auto-complete/auto-complete.component.html +46 -5
  16. package/lib/field/auto-complete/auto-complete.component.scss +92 -0
  17. package/lib/field/auto-complete/auto-complete.component.ts +350 -23
  18. package/lib/field/cancel-alert/cancel-alert.component.ts +38 -15
  19. package/lib/field/check-box/check-box.component.html +8 -6
  20. package/lib/field/check-box/check-box.component.ts +9 -2
  21. package/lib/field/currency/currency.component.html +2 -1
  22. package/lib/field/currency/currency.component.ts +10 -1
  23. package/lib/field/date/date.component.html +2 -1
  24. package/lib/field/date/date.component.ts +2 -0
  25. package/lib/field/date-time/date-time.component.html +2 -1
  26. package/lib/field/date-time/date-time.component.scss +46 -40
  27. package/lib/field/date-time/date-time.component.ts +29 -0
  28. package/lib/field/decimal/decimal.component.html +2 -1
  29. package/lib/field/decimal/decimal.component.ts +2 -0
  30. package/lib/field/dropdown/dropdown.component.html +4 -1
  31. package/lib/field/dropdown/dropdown.component.ts +18 -19
  32. package/lib/field/email/email.component.html +2 -1
  33. package/lib/field/email/email.component.ts +2 -2
  34. package/lib/field/embedded-data-multi/embedded-data-multi.component.html +3 -0
  35. package/lib/field/embedded-data-multi/embedded-data-multi.component.scss +0 -0
  36. package/lib/field/embedded-data-multi/embedded-data-multi.component.ts +173 -0
  37. package/lib/field/field.base.ts +27 -1
  38. package/lib/field/group/group.component.html +1 -1
  39. package/lib/field/group/group.component.ts +16 -7
  40. package/lib/field/integer/integer.component.html +2 -1
  41. package/lib/field/integer/integer.component.ts +4 -2
  42. package/lib/field/location/location.component.html +2 -1
  43. package/lib/field/location/location.component.ts +3 -1
  44. package/lib/field/multiselect/multiselect.component.html +1 -1
  45. package/lib/field/multiselect/multiselect.component.ts +23 -4
  46. package/lib/field/multiselect/utils.ts +5 -3
  47. package/lib/field/object-reference/object-reference.component.html +30 -15
  48. package/lib/field/object-reference/object-reference.component.ts +818 -94
  49. package/lib/field/percentage/percentage.component.html +2 -1
  50. package/lib/field/percentage/percentage.component.ts +10 -1
  51. package/lib/field/phone/phone.component.html +2 -1
  52. package/lib/field/phone/phone.component.ts +2 -1
  53. package/lib/field/radio-buttons/radio-buttons.component.html +2 -1
  54. package/lib/field/radio-buttons/radio-buttons.component.ts +10 -1
  55. package/lib/field/rich-text/rich-text.component.scss +1 -166
  56. package/lib/field/rich-text/rich-text.component.spec.ts +1 -1
  57. package/lib/field/rich-text/rich-text.component.ts +1 -1
  58. package/lib/field/selectable-card/selectable-card.component.html +1 -0
  59. package/lib/field/selectable-card/selectable-card.component.ts +31 -16
  60. package/lib/field/semantic-link/semantic-link.component.html +1 -1
  61. package/lib/field/semantic-link/semantic-link.component.scss +4 -0
  62. package/lib/field/semantic-link/semantic-link.component.ts +13 -7
  63. package/lib/field/text-area/text-area.component.html +2 -1
  64. package/lib/field/text-area/text-area.component.ts +2 -1
  65. package/lib/field/text-input/text-input.component.html +2 -1
  66. package/lib/field/text-input/text-input.component.ts +2 -1
  67. package/lib/field/time/time.component.html +2 -1
  68. package/lib/field/time/time.component.ts +2 -1
  69. package/lib/field/url/url.component.html +2 -1
  70. package/lib/field/url/url.component.ts +2 -1
  71. package/lib/field/user-reference/user-reference.component.html +4 -2
  72. package/lib/field/user-reference/user-reference.component.ts +11 -6
  73. package/lib/infra/Containers/flow-container/flow-container.component.html +2 -2
  74. package/lib/infra/Containers/flow-container/flow-container.component.ts +34 -42
  75. package/lib/infra/Containers/modal-view-container/data-view-action-buttons/data-view-action-buttons.component.html +12 -0
  76. package/lib/infra/Containers/modal-view-container/data-view-action-buttons/data-view-action-buttons.component.spec.ts +130 -0
  77. package/lib/infra/Containers/modal-view-container/data-view-action-buttons/data-view-action-buttons.component.ts +77 -0
  78. package/lib/infra/Containers/modal-view-container/modal-view-container.component.html +35 -8
  79. package/lib/infra/Containers/modal-view-container/modal-view-container.component.ts +185 -196
  80. package/lib/infra/Containers/view-container/view-container.component.html +1 -1
  81. package/lib/infra/Containers/view-container/view-container.component.ts +36 -43
  82. package/lib/infra/assignment/assignment.component.html +2 -1
  83. package/lib/infra/assignment/assignment.component.ts +44 -22
  84. package/lib/infra/assignment-card/assignment-card.component.html +1 -0
  85. package/lib/infra/assignment-card/assignment-card.component.ts +2 -8
  86. package/lib/infra/defer-load/defer-load.component.ts +7 -5
  87. package/lib/infra/multi-step/multi-step.component.html +25 -33
  88. package/lib/infra/multi-step/multi-step.component.scss +67 -125
  89. package/lib/infra/multi-step/multi-step.component.ts +11 -0
  90. package/lib/infra/navbar/navbar.component.ts +33 -36
  91. package/lib/infra/reference/reference.component.html +7 -1
  92. package/lib/infra/reference/reference.component.ts +63 -109
  93. package/lib/infra/region/region.component.ts +1 -3
  94. package/lib/infra/root-container/root-container.component.html +1 -0
  95. package/lib/infra/root-container/root-container.component.ts +34 -42
  96. package/lib/infra/view/view.component.ts +22 -46
  97. package/lib/template/advanced-search/advanced-search.component.ts +0 -1
  98. package/lib/template/advanced-search/search-groups/search-groups.component.ts +2 -3
  99. package/lib/template/app-shell/app-shell.component.ts +13 -13
  100. package/lib/template/banner-page/banner-page.component.ts +1 -2
  101. package/lib/template/base/details-template-base.ts +41 -14
  102. package/lib/template/base/form-template-base.ts +0 -2
  103. package/lib/template/case-summary/case-summary.component.ts +15 -7
  104. package/lib/template/case-view/case-view.component.html +14 -2
  105. package/lib/template/case-view/case-view.component.spec.ts +119 -10
  106. package/lib/template/case-view/case-view.component.ts +52 -3
  107. package/lib/template/data-reference/data-reference.component.ts +29 -22
  108. package/lib/template/data-reference/search-form/search-form.component.html +1 -1
  109. package/lib/template/data-reference/search-form/search-form.component.ts +9 -1
  110. package/lib/template/data-reference/search-form/tabsData.ts +0 -1
  111. package/lib/template/default-form/default-form.component.html +20 -4
  112. package/lib/template/default-form/default-form.component.ts +14 -5
  113. package/lib/template/default-page/default-page.component.ts +1 -2
  114. package/lib/template/details/details.component.html +23 -3
  115. package/lib/template/details/details.component.scss +9 -2
  116. package/lib/template/details/details.component.ts +3 -70
  117. package/lib/template/details-narrow-wide/details-narrow-wide.component.html +21 -2
  118. package/lib/template/details-narrow-wide/details-narrow-wide.component.scss +8 -1
  119. package/lib/template/details-narrow-wide/details-narrow-wide.component.ts +3 -39
  120. package/lib/template/details-one-column/details-one-column.component.html +23 -1
  121. package/lib/template/details-one-column/details-one-column.component.scss +14 -0
  122. package/lib/template/details-one-column/details-one-column.component.ts +3 -40
  123. package/lib/template/details-three-column/details-three-column.component.html +21 -2
  124. package/lib/template/details-three-column/details-three-column.component.scss +8 -1
  125. package/lib/template/details-three-column/details-three-column.component.ts +3 -48
  126. package/lib/template/details-two-column/details-two-column.component.html +21 -2
  127. package/lib/template/details-two-column/details-two-column.component.scss +8 -1
  128. package/lib/template/details-two-column/details-two-column.component.ts +3 -46
  129. package/lib/template/details-wide-narrow/details-wide-narrow.component.html +21 -2
  130. package/lib/template/details-wide-narrow/details-wide-narrow.component.scss +8 -1
  131. package/lib/template/details-wide-narrow/details-wide-narrow.component.ts +3 -43
  132. package/lib/template/dynamic-tabs/dynamic-tabs.component.html +1 -0
  133. package/lib/template/field-group-template/field-group-template.component.ts +19 -6
  134. package/lib/template/field-value-list/field-value-list.component.scss +17 -0
  135. package/lib/template/inline-dashboard-page/inline-dashboard-page.component.ts +2 -10
  136. package/lib/template/list-view/list-view.component.ts +47 -11
  137. package/lib/template/one-column/one-column.component.html +3 -0
  138. package/lib/template/one-column-tab/one-column-tab.component.html +1 -0
  139. package/lib/template/page/page.component.html +1 -0
  140. package/lib/template/self-service-case-view/self-service-case-view.component.html +13 -1
  141. package/lib/template/self-service-case-view/self-service-case-view.component.spec.ts +96 -11
  142. package/lib/template/self-service-case-view/self-service-case-view.component.ts +52 -3
  143. package/lib/template/simple-table/simple-table.component.ts +11 -1
  144. package/lib/template/simple-table-manual/helpers.ts +84 -16
  145. package/lib/template/simple-table-manual/simple-table-manual.component.html +30 -14
  146. package/lib/template/simple-table-manual/simple-table-manual.component.scss +8 -2
  147. package/lib/template/simple-table-manual/simple-table-manual.component.ts +142 -46
  148. package/lib/template/single-reference-readonly/single-reference-readonly.component.html +0 -0
  149. package/lib/template/single-reference-readonly/single-reference-readonly.component.scss +2 -3
  150. package/lib/template/single-reference-readonly/single-reference-readonly.component.ts +7 -8
  151. package/lib/template/wide-narrow-page/wide-narrow-page.component.ts +0 -3
  152. package/lib/template/wss-nav-bar/wss-nav-bar.component.ts +19 -21
  153. package/lib/widget/attachment/AttachmentUtils.ts +19 -11
  154. package/lib/widget/attachment/attachment.component.html +16 -6
  155. package/lib/widget/attachment/attachment.component.ts +14 -4
  156. package/lib/widget/case-history/case-history.component.ts +6 -2
  157. package/lib/widget/feed-container/feed-container.component.ts +1 -199
  158. package/lib/widget/file-utility/file-utility.component.ts +26 -30
  159. package/lib/widget/todo/todo.component.ts +7 -2
  160. package/package.json +2 -2
  161. package/lib/designSystemExtension/material-details/material-details.component.html +0 -40
  162. package/lib/designSystemExtension/material-details/material-details.component.scss +0 -116
  163. package/lib/designSystemExtension/material-details/material-details.component.spec.ts +0 -24
  164. package/lib/designSystemExtension/material-details/material-details.component.ts +0 -31
  165. package/lib/designSystemExtension/material-details-fields/material-details-fields.component.html +0 -29
  166. package/lib/designSystemExtension/material-details-fields/material-details-fields.component.scss +0 -34
  167. package/lib/designSystemExtension/material-details-fields/material-details-fields.component.spec.ts +0 -22
  168. package/lib/designSystemExtension/material-details-fields/material-details-fields.component.ts +0 -37
@@ -1,4 +1,4 @@
1
- import { Component, OnInit, Input, ChangeDetectorRef, NgZone, OnDestroy } from '@angular/core';
1
+ import { Component, OnInit, Input, ChangeDetectorRef, OnDestroy } from '@angular/core';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import { MatMenuModule } from '@angular/material/menu';
4
4
  import { MatListModule } from '@angular/material/list';
@@ -34,7 +34,7 @@ export class NavbarComponent implements OnInit, OnDestroy {
34
34
  bShowCaseTypes$ = false;
35
35
 
36
36
  portalApp$: string | undefined = '';
37
- portalLogoImage$: string;
37
+ portalLogoImage$: string | Blob | null;
38
38
  showAppName$?: boolean = false;
39
39
 
40
40
  portalOperator$: string | undefined;
@@ -53,7 +53,6 @@ export class NavbarComponent implements OnInit, OnDestroy {
53
53
  private angularPConnect: AngularPConnectService,
54
54
  private chRef: ChangeDetectorRef,
55
55
  private psService: ProgressSpinnerService,
56
- private ngZone: NgZone,
57
56
  private utils: Utils
58
57
  ) {}
59
58
 
@@ -104,40 +103,38 @@ export class NavbarComponent implements OnInit, OnDestroy {
104
103
  }
105
104
 
106
105
  initComponent() {
107
- this.ngZone.run(() => {
108
- this.navIcon$ = this.utils.getSDKStaticContentUrl().concat('assets/pzpega-logo-mark.svg');
109
- this.navExpandCollapse$ = this.utils.getImageSrc('plus', this.utils.getSDKStaticContentUrl());
110
-
111
- // Then, continue on with other initialization
112
-
113
- // making a copy, so can add info
114
- this.navPages$ = JSON.parse(JSON.stringify(this.pages$));
115
- // @ts-ignore
116
- const localeReference = PCore.getLocaleUtils().getPortalLocaleReference() || this.pConn$.getValue('.pyLocaleReference');
117
- this.navPages$.forEach(page => {
118
- const destinationObject: any = {};
119
- this.pConn$.resolveConfigProps(
120
- { defaultHeading: page.pyDefaultHeading || page.pyLabel, localeReference: page.pyLocalizationReference },
121
- destinationObject
122
- );
123
- page.name = this.localeUtils.getLocaleValue(destinationObject.defaultHeading, '', destinationObject.localeReference || localeReference);
124
- page.iconName = this.utils.getImageSrc(page.pxPageViewIcon, this.utils.getSDKStaticContentUrl());
125
- });
126
- this.actionsAPI = this.pConn$.getActionsApi();
127
- this.createWork = this.actionsAPI.createWork.bind(this.actionsAPI);
128
- this.showPage = this.actionsAPI.showPage.bind(this.actionsAPI);
129
- this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as NavBarProps;
130
- this.logout = this.actionsAPI.logout.bind(this.actionsAPI);
131
-
132
- // const oData = this.pConn$.getDataObject();
133
-
134
- this.portalLogoImage$ = this.utils.getSDKStaticContentUrl().concat('assets/pzpega-logo-mark.svg');
135
- this.portalOperator$ = PCore.getEnvironmentInfo().getOperatorName();
136
- this.portalOperatorInitials$ = this.utils.getInitials(this.portalOperator$ ?? '');
137
- this.showAppName$ = this.configProps$.showAppName;
138
-
139
- this.portalApp$ = PCore.getEnvironmentInfo().getApplicationLabel();
106
+ this.navIcon$ = this.utils.getSDKStaticContentUrl().concat('assets/pzpega-logo-mark.svg');
107
+ this.navExpandCollapse$ = this.utils.getImageSrc('plus', this.utils.getSDKStaticContentUrl());
108
+
109
+ // Then, continue on with other initialization
110
+
111
+ // making a copy, so can add info
112
+ this.navPages$ = JSON.parse(JSON.stringify(this.pages$));
113
+ const localeReference = PCore.getLocaleUtils().getPortalLocaleReference() || this.pConn$.getValue('.pyLocaleReference');
114
+ this.navPages$.forEach(page => {
115
+ const destinationObject: any = {};
116
+ this.pConn$.resolveConfigProps(
117
+ { defaultHeading: page.pyDefaultHeading || page.pyLabel, localeReference: page.pyLocalizationReference },
118
+ destinationObject
119
+ );
120
+ page.name = this.localeUtils.getLocaleValue(destinationObject.defaultHeading, '', destinationObject.localeReference || localeReference);
121
+ page.iconName = this.utils.getImageSrc(page.pxPageViewIcon, this.utils.getSDKStaticContentUrl());
140
122
  });
123
+ this.actionsAPI = this.pConn$.getActionsApi();
124
+ this.createWork = this.actionsAPI.createWork.bind(this.actionsAPI);
125
+ this.showPage = this.actionsAPI.showPage.bind(this.actionsAPI);
126
+ this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as NavBarProps;
127
+ this.logout = this.actionsAPI.logout.bind(this.actionsAPI);
128
+
129
+ // const oData = this.pConn$.getDataObject();
130
+
131
+ this.portalLogoImage$ = this.utils.getSDKStaticContentUrl().concat('assets/pzpega-logo-mark.svg');
132
+ this.portalOperator$ = PCore.getEnvironmentInfo().getOperatorName();
133
+ this.portalOperatorInitials$ = this.utils.getInitials(this.portalOperator$ ?? '');
134
+ this.showAppName$ = this.configProps$.showAppName;
135
+
136
+ this.portalApp$ = PCore.getEnvironmentInfo().getApplicationLabel();
137
+ this.chRef.markForCheck();
141
138
  }
142
139
 
143
140
  navPanelButtonClick(oPageData: any) {
@@ -1 +1,7 @@
1
- <!-- Reference component is all static methods so .html not used -->
1
+ <div *ngIf="viewComponentPConnect">
2
+ <component-mapper
3
+ [name]="viewComponentPConnect.getComponentName()"
4
+ [props]="{ pConn$: viewComponentPConnect, formGroup$ }"
5
+ errorMsg="Reference Missing: {{ viewComponentPConnect.getComponentName() }}"
6
+ ></component-mapper>
7
+ </div>
@@ -1,4 +1,7 @@
1
- import { Component } from '@angular/core';
1
+ import { Component, OnInit, Input, forwardRef, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
4
+ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
2
5
 
3
6
  /**
4
7
  * WARNING: This file is part of the infrastructure component responsible for working with Redux and managing the creation and update of Redux containers and PConnect.
@@ -9,45 +12,74 @@ import { Component } from '@angular/core';
9
12
  selector: 'app-reference',
10
13
  templateUrl: './reference.component.html',
11
14
  styleUrls: ['./reference.component.scss'],
12
- standalone: true
15
+ imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
13
16
  })
14
- export class ReferenceComponent {
15
- /* Used to toggle some class-wide logging */
16
- private static bLogging = false;
17
-
18
- /**
19
- * Creates a normalized PConn from a reference component.
20
- * Resolves the reference to its fully realized View with proper configuration.
21
- *
22
- * @param inPConn - The PConn object that represents a reference component
23
- * @returns The dereferenced PConnect object, or null if reference can't be resolved
24
- */
25
- static createFullReferencedViewFromRef(inPConn: any): any {
26
- // Validate that inPConn is a reference component
27
- if (inPConn.getComponentName() !== 'reference') {
28
- console.error(`Reference component: createFullReferencedViewFromRef inPConn is NOT a reference! ${inPConn.getComponentName()}`);
29
- return null;
17
+ export class ReferenceComponent implements OnInit, OnDestroy, OnChanges {
18
+ @Input() pConn$: typeof PConnect;
19
+ @Input() formGroup$: any;
20
+
21
+ angularPConnectData: AngularPConnectData = {};
22
+ viewComponentPConnect: typeof PConnect | null = null;
23
+
24
+ constructor(private angularPConnect: AngularPConnectService) {}
25
+
26
+ ngOnInit(): void {
27
+ this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
28
+ this.updateSelf();
29
+ }
30
+
31
+ ngOnDestroy(): void {
32
+ if (this.angularPConnectData.unsubscribeFn) {
33
+ this.angularPConnectData.unsubscribeFn();
34
+ }
35
+ }
36
+
37
+ ngOnChanges(changes: SimpleChanges) {
38
+ const { pConn$ } = changes;
39
+ if (!pConn$.firstChange && pConn$.previousValue !== pConn$.currentValue) {
40
+ this.checkAndUpdate();
41
+ }
42
+ }
43
+
44
+ onStateChange() {
45
+ this.checkAndUpdate();
46
+ }
47
+
48
+ // Should always check the bridge to see if the component should update itself (re-render)
49
+ checkAndUpdate() {
50
+ const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
51
+
52
+ // ONLY call updateSelf when the component should update
53
+ if (bUpdateSelf) {
54
+ this.updateSelf();
30
55
  }
56
+ }
31
57
 
32
- // Get reference configuration and make a copy
33
- const referenceConfig = { ...inPConn.getComponentConfig() };
58
+ updateSelf() {
59
+ const pConnect = this.pConn$;
60
+
61
+ const resolvedConfigProps = pConnect.resolveConfigProps(pConnect.getConfigProps()) as {
62
+ visibility?: boolean;
63
+ context?: string;
64
+ readOnly?: boolean;
65
+ displayMode?: string;
66
+ };
67
+
68
+ const { visibility = true, context = '', readOnly = false, displayMode = '' } = resolvedConfigProps;
69
+
70
+ const referenceConfig = { ...pConnect.getComponentConfig() };
34
71
 
35
- // Remove properties that should not be inherited by the referenced view
36
- // (Maintained from React SDK implementation)
37
72
  delete referenceConfig?.name;
38
73
  delete referenceConfig?.type;
39
74
  delete referenceConfig?.visibility;
40
75
 
41
- // Get the metadata for the referenced view
42
- const viewMetadata = inPConn.getReferencedView();
76
+ const viewMetadata: any = pConnect.getReferencedView();
43
77
 
44
- // Return null if view metadata is not found
45
78
  if (!viewMetadata) {
46
- console.log('View not found ', inPConn.getComponentConfig());
47
- return null;
79
+ this.viewComponentPConnect = null;
80
+ return;
48
81
  }
49
82
 
50
- // Create the view object by merging metadata with reference config
51
83
  const viewObject = {
52
84
  ...viewMetadata,
53
85
  config: {
@@ -56,101 +88,23 @@ export class ReferenceComponent {
56
88
  }
57
89
  };
58
90
 
59
- // Resolve configuration properties
60
- const resolvedConfigProps = inPConn.resolveConfigProps(inPConn.getConfigProps());
61
- const { visibility = true, context, readOnly = false, displayMode = '' } = resolvedConfigProps;
62
-
63
- // Log debug information if logging is enabled
64
- if (ReferenceComponent.bLogging) {
65
- console.log(`Reference: about to call createComponent with pageReference: context: ${inPConn.getContextName()}`);
66
- }
67
-
68
- // Create the component with the right context
69
- const viewComponent = inPConn.createComponent(viewObject, null, null, {
91
+ const viewComponent: any = pConnect.createComponent(viewObject, '', 0, {
70
92
  pageReference: context && context.startsWith('@CLASS') ? '' : context
71
93
  });
72
94
 
73
95
  if (referenceConfig.inheritedProps && referenceConfig.inheritedProps.length > 0) {
74
- const inheritedProps = inPConn.getInheritedProps();
96
+ const inheritedProps = pConnect.getInheritedProps();
75
97
  referenceConfig.inheritedProps = Object.keys(inheritedProps).map(prop => ({ prop, value: inheritedProps[prop] }));
76
98
  }
77
99
 
78
- // Get the PConnect object from the created component
79
100
  const newCompPConnect = viewComponent.getPConnect();
80
101
 
81
- // Set inherited configuration on the new component
82
102
  newCompPConnect.setInheritedConfig({
83
103
  ...referenceConfig,
84
104
  readOnly,
85
105
  displayMode
86
106
  });
87
107
 
88
- // Log debug information if logging is enabled
89
- if (ReferenceComponent.bLogging) {
90
- console.log(
91
- `Angular Reference component: createFullReferencedViewFromRef -> newCompPConnect configProps: ${JSON.stringify(
92
- newCompPConnect.getConfigProps()
93
- )}`
94
- );
95
- }
96
-
97
- // Return the component if it should be visible, otherwise null
98
- return visibility !== false ? newCompPConnect : null;
99
- }
100
-
101
- /**
102
- * Normalizes a PConn object that might be a 'reference'.
103
- * If the incoming PConn is a reference, returns its dereferenced View.
104
- * Otherwise, returns the passed in PConn unchanged.
105
- *
106
- * @param inPConn - A PConn object (ex: { getPConnect() } or direct PConnect)
107
- * @returns The normalized PConn object with references resolved
108
- */
109
- static normalizePConn(inPConn: any): any {
110
- // Early return for null or undefined input
111
- if (!inPConn) {
112
- return inPConn;
113
- }
114
-
115
- // Determine if we have an object with getPConnect method or direct PConnect
116
- const hasGetPConnectMethod = !!inPConn.getPConnect;
117
-
118
- // Get the component name in the appropriate way based on the object type
119
- const componentName = hasGetPConnectMethod ? inPConn.getPConnect().getComponentName() : inPConn.getComponentName();
120
-
121
- // Only process if this is a reference component
122
- if (componentName === 'reference') {
123
- if (hasGetPConnectMethod) {
124
- // For objects with getPConnect method, get the referenced view and its component
125
- const refViewPConn = this.createFullReferencedViewFromRef(inPConn.getPConnect());
126
- return refViewPConn?.getComponent();
127
- }
128
-
129
- // For direct PConnect objects, just create the referenced view
130
- return this.createFullReferencedViewFromRef(inPConn);
131
- }
132
-
133
- // Not a reference component, return unchanged
134
- return inPConn;
135
- }
136
-
137
- /**
138
- * Normalizes an array of PConn objects by replacing any 'reference' components
139
- * with their referenced views.
140
- *
141
- * @param inPConnArray - Array of PConn objects to normalize
142
- * @returns Normalized array with references resolved, or empty array if input is invalid
143
- */
144
- static normalizePConnArray(inPConnArray: any[]): any[] {
145
- // Handle null, undefined, or empty array case
146
- if (!inPConnArray?.length) {
147
- return inPConnArray || [];
148
- }
149
-
150
- // Process array: normalize each item and filter out any null/undefined results
151
- const normalizedArray = inPConnArray.map(child => ReferenceComponent.normalizePConn(child)).filter(Boolean);
152
-
153
- // Ensure we always return an array (even if filter removes all items)
154
- return normalizedArray || [];
108
+ this.viewComponentPConnect = visibility !== false ? newCompPConnect : null;
155
109
  }
156
110
  }
@@ -1,7 +1,6 @@
1
1
  import { Component, OnInit, Input, forwardRef, OnChanges, SimpleChanges } from '@angular/core';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import { FormGroup } from '@angular/forms';
4
- import { ReferenceComponent } from '@pega/angular-sdk-components';
5
4
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
6
5
 
7
6
  @Component({
@@ -30,7 +29,6 @@ export class RegionComponent implements OnInit, OnChanges {
30
29
  }
31
30
 
32
31
  updateSelf() {
33
- // The children may contain 'reference' components, so normalize the children...
34
- this.arChildren$ = ReferenceComponent.normalizePConnArray(this.pConn$.getChildren());
32
+ this.arChildren$ = this.pConn$.getChildren();
35
33
  }
36
34
  }
@@ -10,6 +10,7 @@
10
10
  name="ViewContainer"
11
11
  [props]="{ pConn$: viewContainerPConn$, displayOnlyFA$ }"
12
12
  ></component-mapper>
13
+ <component-mapper *ngSwitchCase="'reference'" name="reference" [props]="{ pConn$ }"></component-mapper>
13
14
  <div *ngSwitchDefault>{{ localizedVal('RootContainer Missing: ' + componentName$, localeCategory) }}.</div>
14
15
  </div>
15
16
  </div>
@@ -1,11 +1,10 @@
1
- import { Component, OnInit, Input, NgZone, forwardRef, OnDestroy, inject } from '@angular/core';
1
+ import { ChangeDetectorRef, Component, OnInit, Input, forwardRef, OnDestroy, inject } from '@angular/core';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
4
4
  import { interval, Subscription } from 'rxjs';
5
5
  import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
6
6
  import { ServerConfigService } from '@pega/angular-sdk-components';
7
7
  import { ProgressSpinnerService } from '@pega/angular-sdk-components';
8
- import { ReferenceComponent } from '@pega/angular-sdk-components';
9
8
  import { PreviewViewContainerComponent } from '@pega/angular-sdk-components';
10
9
  import { ModalViewContainerComponent } from '@pega/angular-sdk-components';
11
10
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
@@ -39,7 +38,7 @@ export class RootContainerComponent implements OnInit, OnDestroy {
39
38
  // For interaction with AngularPConnect
40
39
  angularPConnectData: AngularPConnectData = {};
41
40
 
42
- componentName$ = '';
41
+ componentName$: any;
43
42
  bIsProgress$ = false;
44
43
 
45
44
  // preview and modalview pConn
@@ -57,7 +56,7 @@ export class RootContainerComponent implements OnInit, OnDestroy {
57
56
  constructor(
58
57
  private angularPConnect: AngularPConnectService,
59
58
  private psService: ProgressSpinnerService,
60
- private ngZone: NgZone
59
+ private cdRef: ChangeDetectorRef
61
60
  ) {}
62
61
 
63
62
  ngOnInit(): void {
@@ -138,20 +137,16 @@ export class RootContainerComponent implements OnInit, OnDestroy {
138
137
  });
139
138
 
140
139
  setTimeout(() => {
141
- // makes sure Angular tracks these changes
142
- this.ngZone.run(() => {
143
- // the new rootObject may be a 'reference'. So,
144
- // normalize it to get the referencedView if that's the case
145
- const theNewPConn = ReferenceComponent.normalizePConn(rootObject.getPConnect());
146
- // update ComponentName$ before we update pConn$ to make sure they're in sync
147
- // when rendering...
148
- this.componentName$ = theNewPConn.getComponentName();
149
-
150
- this.pConn$ = theNewPConn;
151
- // this.pConn$ = rootObject.getPConnect();
152
-
153
- console.log(`RootContainer updated pConn$ to be: ${this.componentName$}`);
154
- });
140
+ const theNewPConn = rootObject.getPConnect();
141
+ // update ComponentName$ before we update pConn$ to make sure they're in sync
142
+ // when rendering...
143
+ this.componentName$ = theNewPConn.getComponentName();
144
+
145
+ this.pConn$ = theNewPConn;
146
+ // this.pConn$ = rootObject.getPConnect();
147
+
148
+ console.log(`RootContainer updated pConn$ to be: ${this.componentName$}`);
149
+ this.cdRef.markForCheck();
155
150
  });
156
151
  }
157
152
  }
@@ -190,24 +185,23 @@ export class RootContainerComponent implements OnInit, OnDestroy {
190
185
  if (arChildren && arChildren.length == 1) {
191
186
  // have to have a quick timeout or get an "expressions changed" angular error
192
187
  setTimeout(() => {
193
- this.ngZone.run(() => {
194
- const localPConn = arChildren[0].getPConnect();
195
-
196
- this.componentName$ = localPConn.getComponentName();
197
- if (this.componentName$ === 'ViewContainer') {
198
- const configProps = this.pConn$.getConfigProps();
199
- const viewContConfig = {
200
- meta: {
201
- type: 'ViewContainer',
202
- config: configProps
203
- },
204
- options
205
- };
206
-
207
- this.viewContainerPConn$ = PCore.createPConnect(viewContConfig).getPConnect();
208
- }
209
- this.bShowRoot$ = true;
210
- });
188
+ const localPConn = arChildren[0].getPConnect();
189
+
190
+ this.componentName$ = localPConn.getComponentName();
191
+ if (this.componentName$ === 'ViewContainer') {
192
+ const configProps = this.pConn$.getConfigProps();
193
+ const viewContConfig = {
194
+ meta: {
195
+ type: 'ViewContainer',
196
+ config: configProps
197
+ },
198
+ options
199
+ };
200
+
201
+ this.viewContainerPConn$ = PCore.createPConnect(viewContConfig).getPConnect();
202
+ }
203
+ this.bShowRoot$ = true;
204
+ this.cdRef.markForCheck();
211
205
  });
212
206
  }
213
207
  }
@@ -225,9 +219,8 @@ export class RootContainerComponent implements OnInit, OnDestroy {
225
219
  console.log(ex);
226
220
  }
227
221
 
228
- this.ngZone.run(() => {
229
- this.bIsProgress$ = true;
230
- });
222
+ this.bIsProgress$ = true;
223
+ this.cdRef.markForCheck();
231
224
  });
232
225
  }
233
226
  }
@@ -239,9 +232,8 @@ export class RootContainerComponent implements OnInit, OnDestroy {
239
232
  // don't touch bIsProgress$ unless differnent
240
233
  if (bShow != this.bIsProgress$) {
241
234
  // makes sure Angular tracks these changes
242
- this.ngZone.run(() => {
243
- this.bIsProgress$ = bShow;
244
- });
235
+ this.bIsProgress$ = bShow;
236
+ this.cdRef.markForCheck();
245
237
  }
246
238
  }
247
239
  }
@@ -3,18 +3,29 @@ import { CommonModule } from '@angular/common';
3
3
  import { FormGroup } from '@angular/forms';
4
4
  import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
5
5
  import { Utils } from '@pega/angular-sdk-components';
6
- import { getAllFields } from '@pega/angular-sdk-components';
7
- import { ReferenceComponent } from '@pega/angular-sdk-components';
8
6
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
9
7
 
10
- const NO_HEADER_TEMPLATES = ['SubTabs', 'SimpleTable', 'Confirmation', 'DynamicTabs', 'DetailsSubTabs', 'ListView'];
8
+ const NO_HEADER_TEMPLATES = [
9
+ 'SubTabs',
10
+ 'SimpleTable',
11
+ 'Details',
12
+ 'DetailsTwoColumn',
13
+ 'DetailsThreeColumn',
14
+ 'NarrowWideDetails',
15
+ 'WideNarrowDetails',
16
+ 'Confirmation',
17
+ 'DynamicTabs',
18
+ 'DetailsSubTabs',
19
+ 'ListView',
20
+ 'DataReference'
21
+ ];
22
+
11
23
  const DETAILS_TEMPLATES = [
12
24
  'Details',
13
- 'DetailsFields',
14
25
  'DetailsOneColumn',
15
- 'DetailsSubTabs',
16
- 'DetailsThreeColumn',
17
26
  'DetailsTwoColumn',
27
+ 'DetailsThreeColumn',
28
+ 'DetailsSubTabs',
18
29
  'NarrowWideDetails',
19
30
  'WideNarrowDetails'
20
31
  ];
@@ -145,12 +156,8 @@ export class ViewComponent implements OnInit, OnDestroy, OnChanges {
145
156
 
146
157
  // debugger;
147
158
 
148
- // normalize this.pConn$ in case it contains a 'reference'
149
- this.pConn$ = ReferenceComponent.normalizePConn(this.pConn$);
150
-
151
159
  this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as ViewProps;
152
160
  this.inheritedProps$ = this.pConn$.getInheritedProps();
153
-
154
161
  // NOTE: this.configProps$.visibility'] is used in view.component.ts such that
155
162
  // the View will only be rendered when this.configProps$.visibility'] is false.
156
163
  // It WILL render if true or undefined.
@@ -159,9 +166,11 @@ export class ViewComponent implements OnInit, OnDestroy, OnChanges {
159
166
  this.title$ = this.configProps$.title || '';
160
167
  // label & showLabel within inheritedProps takes precedence over configProps
161
168
  this.label$ = this.inheritedProps$.label || this.configProps$.label || '';
162
- this.showLabel$ = this.inheritedProps$.showLabel || this.configProps$.showLabel || isDetailsTemplate(this.templateName$);
163
- // children may have a 'reference' so normalize the children array
164
- this.arChildren$ = ReferenceComponent.normalizePConnArray(this.pConn$.getChildren());
169
+ this.showLabel$ =
170
+ this.inheritedProps$.showLabel !== undefined
171
+ ? this.inheritedProps$.showLabel
172
+ : (this.configProps$.showLabel ?? isDetailsTemplate(this.templateName$));
173
+ this.arChildren$ = this.pConn$.getChildren();
165
174
  this.visibility$ = this.configProps$.visibility ?? this.visibility$;
166
175
 
167
176
  /**
@@ -186,39 +195,6 @@ export class ViewComponent implements OnInit, OnDestroy, OnChanges {
186
195
  // console.log("-->view update: " + this.angularPConnect.getComponentID(this) + ", template: " + this.templateName$ + ", kids: " + kidList);
187
196
  }
188
197
 
189
- // JA - adapting additionalProps from Nebula/Constellation version which uses static methods
190
- // on the component classes stored in PComponents (that Angular doesn't have)...
191
- additionalProps(state: any, getPConnect: any) {
192
- let propObj = {};
193
-
194
- // We already have the template name in this.templateName$
195
- if (this.templateName$ !== '') {
196
- let allFields = {};
197
-
198
- // These uses are adapted from Nebula/Constellation CaseSummary.additionalProps
199
- switch (this.templateName$) {
200
- case 'CaseSummary':
201
- allFields = getAllFields(getPConnect);
202
- // eslint-disable-next-line no-case-declarations
203
- const unresFields = {
204
- primaryFields: allFields[0],
205
- secondaryFields: allFields[1]
206
- };
207
- propObj = getPConnect.resolveConfigProps(unresFields);
208
- break;
209
-
210
- case 'Details':
211
- allFields = getAllFields(getPConnect);
212
- propObj = { fields: allFields[0] };
213
- break;
214
- default:
215
- break;
216
- }
217
- }
218
-
219
- return propObj;
220
- }
221
-
222
198
  ngOnDestroy(): void {
223
199
  if (this.angularPConnectData.unsubscribeFn) {
224
200
  this.angularPConnectData.unsubscribeFn();
@@ -71,7 +71,6 @@ export class AdvancedSearchComponent implements OnInit, OnChanges {
71
71
  const [firstChildMeta] = rawViewMetadata.children;
72
72
 
73
73
  const localizedVal = PCore.getLocaleUtils().getLocaleValue;
74
- // @ts-ignore
75
74
  const cache = PCore.getNavigationUtils().getComponentCache(searchSelectCacheKey) ?? {};
76
75
 
77
76
  this.editableFieldComp = firstChildPConnect().createComponent({
@@ -37,7 +37,7 @@ export function flattenObj(obj: any): any {
37
37
  export const initializeSearchFields = (searchFields, getPConnect, referenceListClassID, searchFieldRestoreValues = {}) => {
38
38
  const filtersProperties = {};
39
39
  searchFields?.forEach(field => {
40
- let val = '';
40
+ let val;
41
41
  const { value, defaultValue = '' } = field.config;
42
42
  const propPath = PCore.getAnnotationUtils().getPropertyName(value);
43
43
 
@@ -210,8 +210,7 @@ export class SearchGroupsComponent implements OnInit, OnDestroy, OnChanges {
210
210
  isValidInput(formValues)
211
211
  ) {
212
212
  if (this.isValidatorField) {
213
- // @ts-ignore
214
- PCore.getMessageManager().clearContextMessages({ context: transientItemID });
213
+ PCore.getMessageManager().clearContextMessages({ context: this.transientItemID });
215
214
  }
216
215
 
217
216
  this.previousFormValues = formValues;