@pega/angular-sdk-overrides 0.25.1 → 0.25.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 (160) hide show
  1. package/lib/designSystemExtension/alert/alert.component.scss +3 -3
  2. package/lib/designSystemExtension/banner/banner.component.scss +12 -2
  3. package/lib/designSystemExtension/material-case-summary/material-case-summary.component.html +6 -3
  4. package/lib/designSystemExtension/material-case-summary/material-case-summary.component.scss +5 -34
  5. package/lib/designSystemExtension/material-details/material-details.component.scss +0 -5
  6. package/lib/designSystemExtension/material-details-fields/material-details-fields.component.html +2 -2
  7. package/lib/designSystemExtension/material-details-fields/material-details-fields.component.scss +4 -3
  8. package/lib/designSystemExtension/material-summary-item/material-summary-item.component.scss +2 -17
  9. package/lib/designSystemExtension/material-utility/material-utility.component.scss +1 -2
  10. package/lib/designSystemExtension/material-vertical-tabs/material-vertical-tabs.component.scss +1 -1
  11. package/lib/designSystemExtension/operator/operator.component.html +1 -1
  12. package/lib/designSystemExtension/operator/operator.component.scss +3 -10
  13. package/lib/designSystemExtension/operator/operator.component.ts +0 -1
  14. package/lib/designSystemExtension/pulse/pulse.component.scss +2 -2
  15. package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.scss +0 -1
  16. package/lib/designSystemExtension/wss-quick-create/wss-quick-create.component.scss +16 -8
  17. package/lib/field/auto-complete/auto-complete.component.html +0 -1
  18. package/lib/field/auto-complete/auto-complete.component.ts +35 -172
  19. package/lib/field/cancel-alert/cancel-alert.component.html +8 -12
  20. package/lib/field/cancel-alert/cancel-alert.component.scss +2 -3
  21. package/lib/field/cancel-alert/cancel-alert.component.ts +24 -36
  22. package/lib/field/check-box/check-box.component.html +0 -1
  23. package/lib/field/check-box/check-box.component.scss +0 -1
  24. package/lib/field/check-box/check-box.component.ts +19 -149
  25. package/lib/field/currency/currency.component.ts +36 -168
  26. package/lib/field/date/date.component.html +1 -1
  27. package/lib/field/date/date.component.ts +30 -150
  28. package/lib/field/date-time/date-time.component.ts +31 -149
  29. package/lib/field/decimal/decimal.component.ts +38 -163
  30. package/lib/field/dropdown/dropdown.component.ts +29 -151
  31. package/lib/field/email/email.component.ts +16 -155
  32. package/lib/field/field.base.ts +149 -0
  33. package/lib/field/group/group.component.ts +7 -4
  34. package/lib/field/integer/integer.component.ts +18 -157
  35. package/lib/field/location/location.component.ts +1 -1
  36. package/lib/field/multiselect/multiselect.component.ts +46 -148
  37. package/lib/field/multiselect/utils.ts +55 -47
  38. package/lib/field/object-reference/object-reference.component.html +17 -0
  39. package/lib/field/object-reference/object-reference.component.scss +0 -0
  40. package/lib/field/object-reference/object-reference.component.spec.ts +22 -0
  41. package/lib/field/object-reference/object-reference.component.ts +237 -0
  42. package/lib/field/percentage/percentage.component.ts +37 -154
  43. package/lib/field/phone/phone.component.ts +28 -142
  44. package/lib/field/radio-buttons/radio-buttons.component.scss +4 -2
  45. package/lib/field/radio-buttons/radio-buttons.component.ts +35 -161
  46. package/lib/field/rich-text/rich-text.component.ts +19 -90
  47. package/lib/field/scalar-list/scalar-list.component.ts +17 -72
  48. package/lib/field/selectable-card/selectable-card.component.html +54 -24
  49. package/lib/field/selectable-card/selectable-card.component.scss +11 -0
  50. package/lib/field/selectable-card/selectable-card.component.ts +16 -52
  51. package/lib/field/semantic-link/semantic-link.component.html +4 -8
  52. package/lib/field/semantic-link/semantic-link.component.scss +0 -13
  53. package/lib/field/semantic-link/semantic-link.component.ts +165 -5
  54. package/lib/field/text/text.component.scss +0 -1
  55. package/lib/field/text-area/text-area.component.ts +18 -152
  56. package/lib/field/text-input/text-input.component.ts +16 -155
  57. package/lib/field/time/time.component.ts +17 -151
  58. package/lib/field/url/url.component.ts +16 -154
  59. package/lib/field/user-reference/user-reference.component.scss +0 -1
  60. package/lib/field/user-reference/user-reference.component.ts +2 -3
  61. package/lib/infra/Containers/flow-container/flow-container.component.ts +5 -7
  62. package/lib/infra/Containers/modal-view-container/modal-view-container.component.ts +5 -10
  63. package/lib/infra/Containers/view-container/helper.ts +35 -2
  64. package/lib/infra/Containers/view-container/view-container.component.ts +1 -1
  65. package/lib/infra/action-buttons/action-buttons.component.html +13 -8
  66. package/lib/infra/action-buttons/action-buttons.component.scss +23 -0
  67. package/lib/infra/action-buttons/action-buttons.component.ts +1 -2
  68. package/lib/infra/assignment/assignment.component.ts +8 -6
  69. package/lib/infra/assignment-card/assignment-card.component.html +1 -2
  70. package/lib/infra/assignment-card/assignment-card.component.scss +0 -4
  71. package/lib/infra/assignment-card/assignment-card.component.ts +21 -4
  72. package/lib/infra/defer-load/defer-load.component.html +6 -2
  73. package/lib/infra/defer-load/defer-load.component.ts +16 -10
  74. package/lib/infra/multi-step/multi-step.component.scss +1 -21
  75. package/lib/infra/navbar/navbar.component.html +25 -28
  76. package/lib/infra/navbar/navbar.component.scss +16 -4
  77. package/lib/infra/navbar/navbar.component.ts +8 -3
  78. package/lib/infra/root-container/root-container.component.scss +0 -1
  79. package/lib/infra/root-container/root-container.component.ts +1 -2
  80. package/lib/infra/stages/stages.component.html +2 -2
  81. package/lib/infra/stages/stages.component.scss +7 -35
  82. package/lib/infra/stages/stages.component.ts +4 -2
  83. package/lib/infra/view/view.component.html +1 -1
  84. package/lib/infra/view/view.component.ts +0 -2
  85. package/lib/template/advanced-search/advanced-search.component.html +12 -0
  86. package/lib/template/advanced-search/advanced-search.component.scss +0 -0
  87. package/lib/template/advanced-search/advanced-search.component.spec.ts +0 -0
  88. package/lib/template/advanced-search/advanced-search.component.ts +112 -0
  89. package/lib/template/advanced-search/advanced-search.service.ts +27 -0
  90. package/lib/template/advanced-search/search-group/persist-utils.ts +56 -0
  91. package/lib/template/advanced-search/search-groups/search-groups.component.html +32 -0
  92. package/lib/template/advanced-search/search-groups/search-groups.component.scss +0 -0
  93. package/lib/template/advanced-search/search-groups/search-groups.component.spec.ts +0 -0
  94. package/lib/template/advanced-search/search-groups/search-groups.component.ts +294 -0
  95. package/lib/template/advanced-search/search-groups/utils.ts +29 -0
  96. package/lib/template/app-shell/app-shell.component.html +4 -1
  97. package/lib/template/app-shell/app-shell.component.scss +0 -3
  98. package/lib/template/app-shell/app-shell.component.ts +46 -7
  99. package/lib/template/case-summary/case-summary.component.scss +0 -2
  100. package/lib/template/case-view/case-view.component.html +3 -3
  101. package/lib/template/case-view/case-view.component.scss +18 -10
  102. package/lib/template/case-view/case-view.component.ts +1 -1
  103. package/lib/template/data-reference/data-reference-advanced-search.service.ts +16 -0
  104. package/lib/template/data-reference/data-reference.component.html +11 -8
  105. package/lib/template/data-reference/data-reference.component.ts +346 -112
  106. package/lib/template/data-reference/search-form/search-form.component.html +39 -0
  107. package/lib/template/data-reference/search-form/search-form.component.scss +11 -0
  108. package/lib/template/data-reference/search-form/search-form.component.spec.ts +0 -0
  109. package/lib/template/data-reference/search-form/search-form.component.ts +167 -0
  110. package/lib/template/data-reference/search-form/tabsData.ts +160 -0
  111. package/lib/template/data-reference/utils.ts +92 -0
  112. package/lib/template/default-form/default-form.component.ts +10 -2
  113. package/lib/template/default-page/default-page.component.html +34 -0
  114. package/lib/template/default-page/default-page.component.scss +31 -0
  115. package/lib/template/default-page/default-page.component.spec.ts +24 -0
  116. package/lib/template/default-page/default-page.component.ts +64 -0
  117. package/lib/template/field-group-list/field-group-list.component.scss +0 -1
  118. package/lib/template/inline-dashboard-page/inline-dashboard-page.component.ts +1 -1
  119. package/lib/template/list-view/list-view.component.html +9 -4
  120. package/lib/template/list-view/list-view.component.scss +21 -21
  121. package/lib/template/list-view/list-view.component.ts +154 -84
  122. package/lib/template/list-view/utils.ts +25 -2
  123. package/lib/template/object-page/object-page.component.html +1 -0
  124. package/lib/template/object-page/object-page.component.scss +0 -0
  125. package/lib/template/object-page/object-page.component.spec.ts +22 -0
  126. package/lib/template/object-page/object-page.component.ts +14 -0
  127. package/lib/template/one-column-tab/one-column-tab.component.scss +1 -1
  128. package/lib/template/repeating-structures/repeating-structures.component.ts +0 -1
  129. package/lib/template/self-service-case-view/self-service-case-view.component.html +80 -0
  130. package/lib/template/self-service-case-view/self-service-case-view.component.scss +124 -0
  131. package/lib/template/self-service-case-view/self-service-case-view.component.spec.ts +24 -0
  132. package/lib/template/self-service-case-view/self-service-case-view.component.ts +216 -0
  133. package/lib/template/simple-table/simple-table.component.ts +0 -1
  134. package/lib/template/simple-table-manual/helpers.ts +2 -2
  135. package/lib/template/simple-table-manual/simple-table-manual.component.html +4 -4
  136. package/lib/template/simple-table-manual/simple-table-manual.component.scss +4 -14
  137. package/lib/template/simple-table-manual/simple-table-manual.component.ts +8 -4
  138. package/lib/template/single-reference-readonly/single-reference-readonly.component.html +4 -1
  139. package/lib/template/single-reference-readonly/single-reference-readonly.component.scss +21 -0
  140. package/lib/template/single-reference-readonly/single-reference-readonly.component.ts +104 -3
  141. package/lib/template/utils.ts +42 -0
  142. package/lib/template/wss-nav-bar/wss-nav-bar.component.html +5 -4
  143. package/lib/template/wss-nav-bar/wss-nav-bar.component.scss +2 -8
  144. package/lib/template/wss-nav-bar/wss-nav-bar.component.ts +1 -8
  145. package/lib/widget/app-announcement/app-announcement.component.html +1 -2
  146. package/lib/widget/app-announcement/app-announcement.component.scss +2 -2
  147. package/lib/widget/attachment/Attachment.types.ts +92 -0
  148. package/lib/widget/attachment/AttachmentUtils.ts +287 -0
  149. package/lib/widget/attachment/attachment.component.html +3 -3
  150. package/lib/widget/attachment/attachment.component.scss +2 -5
  151. package/lib/widget/attachment/attachment.component.ts +255 -254
  152. package/lib/widget/feed-container/feed-container.component.scss +3 -9
  153. package/lib/widget/feed-container/feed-container.component.ts +2 -2
  154. package/lib/widget/file-utility/file-utility.component.html +3 -3
  155. package/lib/widget/file-utility/file-utility.component.scss +5 -16
  156. package/lib/widget/list-utility/list-utility.component.scss +3 -5
  157. package/lib/widget/todo/todo.component.html +8 -5
  158. package/lib/widget/todo/todo.component.scss +10 -11
  159. package/lib/widget/todo/todo.component.ts +6 -2
  160. package/package.json +1 -1
@@ -30,7 +30,7 @@ export class ModalViewContainerComponent implements OnInit, OnDestroy {
30
30
  angularPConnectData: AngularPConnectData = {};
31
31
 
32
32
  arChildren$: any[];
33
- stateProps$: Object;
33
+ stateProps$: object;
34
34
  banners: any;
35
35
  templateName$: string;
36
36
  buildName$: string;
@@ -39,7 +39,7 @@ export class ModalViewContainerComponent implements OnInit, OnDestroy {
39
39
  bShowModal$ = false;
40
40
  itemKey$: string;
41
41
  formGroup$: FormGroup;
42
- oCaseInfo: Object = {};
42
+ oCaseInfo: object = {};
43
43
 
44
44
  // for causing a change on assignment
45
45
  updateToken$ = 0;
@@ -134,7 +134,7 @@ export class ModalViewContainerComponent implements OnInit, OnDestroy {
134
134
  // @ts-ignore - Property 'getLoadingStatus' is private and only accessible within class 'C11nEnv'
135
135
  loadingInfo = this.pConn$.getLoadingStatus();
136
136
  } catch (ex) {
137
- /* empty */
137
+ console.log(ex);
138
138
  }
139
139
  // const configProps = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps());
140
140
  this.stateProps$ = this.pConn$.getStateProps();
@@ -234,12 +234,7 @@ export class ModalViewContainerComponent implements OnInit, OnDestroy {
234
234
  this.title$ =
235
235
  isDataObject || this.isMultiRecord
236
236
  ? this.getModalHeading(dataObjectAction)
237
- : this.determineModalHeaderByAction(
238
- actionName,
239
- caseTypeName,
240
- ID,
241
- `${theNewCaseInfo?.getClassName()}!CASE!${theNewCaseInfo.getName()}`.toUpperCase()
242
- );
237
+ : this.determineModalHeaderByAction(actionName, caseTypeName, ID, this.createdViewPConn$?.getCaseLocaleReference());
243
238
 
244
239
  const bIsRefComponent = this.checkIfRefComponent(newComp);
245
240
 
@@ -364,7 +359,7 @@ export class ModalViewContainerComponent implements OnInit, OnDestroy {
364
359
  return {};
365
360
  }
366
361
 
367
- compareCaseInfoIsDifferent(oCurrentCaseInfo: Object): boolean {
362
+ compareCaseInfoIsDifferent(oCurrentCaseInfo: object): boolean {
368
363
  let bRet = false;
369
364
 
370
365
  // fast-deep-equal version
@@ -10,13 +10,46 @@ export const addContainerItem = pConnect => {
10
10
  export const configureBrowserBookmark = pConnect => {
11
11
  const context = pConnect.getContextName();
12
12
  const containerName = pConnect.getContainerName();
13
+ const envInfo = PCore.getEnvironmentInfo();
14
+ const { APP } = PCore.getConstants();
15
+
13
16
  const navPages = pConnect.getValue('pyPortal.pyPrimaryNavPages');
14
- const defaultViewLabel = Array.isArray(navPages) && navPages[0] ? navPages[0].pyLabel : '';
17
+ let ruleName = '';
18
+ let className = '';
19
+ let defaultViewLabel = '';
20
+
21
+ const isNextGenLandingPageRouting = (envInfo?.environmentInfoObject as any)?.pyExecutionRuntimeName === (APP as any).INFINITY_RUNTIME;
22
+
23
+ if (Array.isArray(navPages) && navPages.length > 0) {
24
+ const firstNavPage = navPages[0];
25
+ const nestedNavPage = firstNavPage.NavigationPages?.[0];
26
+
27
+ if (isNextGenLandingPageRouting) {
28
+ if (nestedNavPage?.pyRuleName) {
29
+ ruleName = nestedNavPage.pyRuleName;
30
+ className = nestedNavPage.pyClassName || '';
31
+ } else if (firstNavPage?.pyRuleName) {
32
+ ruleName = firstNavPage.pyRuleName;
33
+ className = firstNavPage.pyClassName || '';
34
+ } else if (nestedNavPage?.pyLabel) {
35
+ defaultViewLabel = nestedNavPage.pyLabel;
36
+ } else if (firstNavPage?.pyLabel) {
37
+ defaultViewLabel = firstNavPage.pyLabel;
38
+ }
39
+ } else if (nestedNavPage?.pyLabel) {
40
+ defaultViewLabel = nestedNavPage.pyLabel;
41
+ } else if (firstNavPage?.pyLabel) {
42
+ defaultViewLabel = firstNavPage.pyLabel;
43
+ }
44
+ }
45
+
15
46
  PCore.configureForBrowserBookmark({
16
47
  context,
17
48
  containerName,
18
49
  acName: containerName,
19
50
  semanticURL: '',
20
- defaultViewLabel
51
+ defaultViewLabel,
52
+ ruleName,
53
+ className
21
54
  });
22
55
  };
@@ -161,7 +161,7 @@ export class ViewContainerComponent implements OnInit, OnDestroy {
161
161
 
162
162
  this.psService.sendMessage(loadingInfo);
163
163
  } catch (ex) {
164
- /* empty */
164
+ console.log(ex);
165
165
  }
166
166
 
167
167
  // const buildName = this.buildName();
@@ -1,12 +1,17 @@
1
- <mat-grid-list *ngIf="arMainButtons$ && arSecondaryButtons$" cols="2" rowHeight="6.25rem">
2
- <mat-grid-tile>
3
- <button *ngFor="let aButton of arSecondaryButtons$" mat-raised-button color="secondary" (click)="buttonClick(aButton.jsAction, 'secondary')">
1
+ <div class="button-bar" *ngIf="arMainButtons$ && arSecondaryButtons$">
2
+ <div class="left-group">
3
+ <button
4
+ *ngFor="let aButton of arSecondaryButtons$"
5
+ mat-stroked-button
6
+ class="secondary-button"
7
+ (click)="buttonClick(aButton.jsAction, 'secondary')"
8
+ >
4
9
  {{ localizedVal(aButton.name, localeCategory) }}
5
10
  </button>
6
- </mat-grid-tile>
7
- <mat-grid-tile>
8
- <button *ngFor="let aButton of arMainButtons$" mat-raised-button color="primary" (click)="buttonClick(aButton.jsAction, 'primary')">
11
+ </div>
12
+ <div class="right-group">
13
+ <button *ngFor="let aButton of arMainButtons$" mat-flat-button (click)="buttonClick(aButton.jsAction, 'primary')">
9
14
  {{ localizedVal(aButton.name, localeCategory) }}
10
15
  </button>
11
- </mat-grid-tile>
12
- </mat-grid-list>
16
+ </div>
17
+ </div>
@@ -0,0 +1,23 @@
1
+ .button-bar {
2
+ box-sizing: border-box;
3
+ display: flex;
4
+ flex-direction: row;
5
+ align-items: center;
6
+ width: 100%;
7
+ padding: 1rem;
8
+ }
9
+
10
+ .left-group,
11
+ .right-group {
12
+ display: flex;
13
+ gap: 1rem;
14
+ }
15
+
16
+ .right-group {
17
+ margin-left: auto;
18
+ }
19
+
20
+ .secondary-button {
21
+ background-color: var(--app-sys-secondary-button-background);
22
+ border-color: var(--app-sys-secondary-button-border);
23
+ }
@@ -1,13 +1,12 @@
1
1
  import { Component, Input, Output, EventEmitter } from '@angular/core';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import { MatButtonModule } from '@angular/material/button';
4
- import { MatGridListModule } from '@angular/material/grid-list';
5
4
 
6
5
  @Component({
7
6
  selector: 'app-action-buttons',
8
7
  templateUrl: './action-buttons.component.html',
9
8
  styleUrls: ['./action-buttons.component.scss'],
10
- imports: [CommonModule, MatGridListModule, MatButtonModule]
9
+ imports: [CommonModule, MatButtonModule]
11
10
  })
12
11
  export class ActionButtonsComponent {
13
12
  @Input() arMainButtons$: any[];
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable no-case-declarations */
2
- import { Component, OnInit, Input, NgZone, forwardRef, OnDestroy, OnChanges } from '@angular/core';
2
+ import { Component, OnInit, Input, forwardRef, OnDestroy, OnChanges } from '@angular/core';
3
3
  import { CommonModule } from '@angular/common';
4
4
  import { MatSnackBarModule, MatSnackBar } from '@angular/material/snack-bar';
5
5
  import { FormGroup } from '@angular/forms';
@@ -56,6 +56,7 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
56
56
 
57
57
  bHasNavigation$ = false;
58
58
  bIsVertical$ = false;
59
+ prevNavigationSteps: any[] = [];
59
60
  arCurrentStepIndicies$: number[] = [];
60
61
  arNavigationSteps$: any[] = [];
61
62
 
@@ -82,7 +83,6 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
82
83
  private angularPConnect: AngularPConnectService,
83
84
  private psService: ProgressSpinnerService,
84
85
  private erService: ErrorMessagesService,
85
- private ngZone: NgZone,
86
86
  private snackBar: MatSnackBar,
87
87
  public bannerService: BannerService
88
88
  ) {}
@@ -128,7 +128,7 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
128
128
 
129
129
  this.psService.sendMessage(loadingInfo);
130
130
  } catch (ex) {
131
- /* empty */
131
+ console.log(ex);
132
132
  }
133
133
  }
134
134
  }
@@ -250,17 +250,19 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
250
250
 
251
251
  // iterate through steps to find current one(s)
252
252
  // immutable, so we want to change the local copy, so need to make a copy
253
- this.ngZone.run(() => {
253
+
254
+ if (!PCore.isDeepEqual(this.prevNavigationSteps, oCaseInfo.navigation.steps)) {
254
255
  // what comes back now in configObject is the children of the flowContainer
255
256
  this.arNavigationSteps$ = JSON.parse(JSON.stringify(oCaseInfo.navigation.steps));
257
+ this.prevNavigationSteps = JSON.parse(JSON.stringify(oCaseInfo.navigation.steps));
256
258
  this.arNavigationSteps$.forEach(step => {
257
259
  if (step.name) {
258
- step.name = PCore.getLocaleUtils().getLocaleValue(step.name, undefined, this.localeReference);
260
+ step.name = this.pConn$.getLocalizationService().getLocalizedText(step.name);
259
261
  }
260
262
  });
261
263
  this.arCurrentStepIndicies$ = [];
262
264
  this.arCurrentStepIndicies$ = this.findCurrentIndicies(this.arNavigationSteps$, this.arCurrentStepIndicies$, 0);
263
- });
265
+ }
264
266
  }
265
267
 
266
268
  findCurrentIndicies(arStepperSteps: any[], arIndicies: number[], depth: number): number[] {
@@ -1,5 +1,5 @@
1
1
  <form [formGroup]="formGroup$" name="flowContainer" class="psdk-flow-container">
2
- <div *ngFor="let kid of arChildren$">
2
+ <div *ngFor="let kid of childrenArray" class="psdk-assignment-card-child">
3
3
  <div [ngSwitch]="kid.getPConnect().getComponentName()">
4
4
  <component-mapper *ngSwitchCase="'View'" name="View" [props]="{ formGroup$, pConn$: kid.getPConnect() }"></component-mapper>
5
5
  <component-mapper
@@ -14,7 +14,6 @@
14
14
  </form>
15
15
 
16
16
  <div>
17
- <br />
18
17
  <div class="psdk-case-view-divider"></div>
19
18
 
20
19
  <component-mapper
@@ -1,7 +1,3 @@
1
- .psdk-case-view-divider {
2
- border-bottom: 0.0625rem solid var(--app-neutral-light-color);
3
- }
4
-
5
1
  .psdk-flow-container {
6
2
  padding: 0rem 1rem;
7
3
  }
@@ -1,9 +1,20 @@
1
- import { Component, OnInit, Input, Output, EventEmitter, forwardRef, OnChanges } from '@angular/core';
1
+ import { Component, OnInit, Input, Output, EventEmitter, forwardRef, OnChanges, SimpleChanges } from '@angular/core';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import { FormGroup, ReactiveFormsModule } from '@angular/forms';
4
4
  import { ReferenceComponent } from '@pega/angular-sdk-components';
5
5
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
6
6
 
7
+ function isChildrenUpdated(children) {
8
+ if (!children || children.firstChange) {
9
+ return false;
10
+ }
11
+ for (let i = 0; i < children.previousValue.length; i++) {
12
+ if (!PCore.isDeepEqual(children.previousValue[i].getPConnect().getConfigProps(), children.currentValue[i].getPConnect().getConfigProps())) {
13
+ return true;
14
+ }
15
+ }
16
+ return false;
17
+ }
7
18
  @Component({
8
19
  selector: 'app-assignment-card',
9
20
  templateUrl: './assignment-card.component.html',
@@ -18,18 +29,24 @@ export class AssignmentCardComponent implements OnInit, OnChanges {
18
29
  @Input() arChildren$: any[];
19
30
  @Input() updateToken$: number;
20
31
 
32
+ childrenArray: any[] = [];
33
+
21
34
  @Output() actionButtonClick: EventEmitter<any> = new EventEmitter();
22
35
 
23
36
  ngOnInit(): void {
24
37
  // Children may contain 'reference' component, so we need to
25
38
  // normalize them
26
- this.arChildren$ = ReferenceComponent.normalizePConnArray(this.arChildren$);
39
+ this.childrenArray = ReferenceComponent.normalizePConnArray(this.arChildren$);
27
40
  }
28
41
 
29
- ngOnChanges() {
42
+ ngOnChanges(changes: SimpleChanges) {
30
43
  // Children may contain 'reference' component, so we need to
31
44
  // normalize them
32
- this.arChildren$ = ReferenceComponent.normalizePConnArray(this.arChildren$);
45
+
46
+ const { arChildren$ } = changes;
47
+ if (isChildrenUpdated(arChildren$)) {
48
+ this.childrenArray = ReferenceComponent.normalizePConnArray(this.arChildren$);
49
+ }
33
50
  }
34
51
 
35
52
  onActionButtonClick(oData: any) {
@@ -1,3 +1,7 @@
1
- <div *ngIf="loadedPConn$">
2
- <component-mapper [name]="componentName$" [props]="{ pConn$: loadedPConn$ }" errorMsg="Defer Load Missing: {{ componentName$ }}"></component-mapper>
1
+ <div *ngIf="childComponentPConnect">
2
+ <component-mapper
3
+ [name]="childComponentPConnect.getComponentName()"
4
+ [props]="{ pConn$: childComponentPConnect, formGroup$ }"
5
+ errorMsg="Defer Load Missing: {{ childComponentPConnect.getComponentName() }}"
6
+ ></component-mapper>
3
7
  </div>
@@ -1,4 +1,4 @@
1
- import { Component, OnInit, Input, forwardRef, OnDestroy, OnChanges } from '@angular/core';
1
+ import { Component, OnInit, Input, forwardRef, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import { publicConstants } from '@pega/pcore-pconnect-typedefs/constants';
4
4
  import { ReferenceComponent } from '@pega/angular-sdk-components';
@@ -19,11 +19,10 @@ import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-c
19
19
  })
20
20
  export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges {
21
21
  @Input() pConn$: typeof PConnect;
22
- @Input() loadData$: any;
22
+ @Input() formGroup$;
23
23
  @Input() name;
24
24
 
25
- componentName$: string;
26
- loadedPConn$: any;
25
+ childComponentPConnect: typeof PConnect;
27
26
  bShowDefer$ = false;
28
27
 
29
28
  angularPConnectData: AngularPConnectData = {};
@@ -45,7 +44,7 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges {
45
44
  ngOnInit(): void {
46
45
  this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
47
46
  // The below call is causing an error while creating/opening a case, hence commenting it out
48
- // this.loadActiveTab();
47
+ this.updateSelf();
49
48
  }
50
49
 
51
50
  ngOnDestroy(): void {
@@ -62,11 +61,17 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges {
62
61
  if (theRequestedAssignment !== this.currentLoadedAssignment || (lastUpdateCaseTime && lastUpdateCaseTime !== this.lastUpdateCaseTime)) {
63
62
  this.currentLoadedAssignment = theRequestedAssignment;
64
63
  this.lastUpdateCaseTime = lastUpdateCaseTime;
65
- this.loadActiveTab();
64
+ this.updateSelf();
66
65
  }
67
66
  }
68
67
 
69
- ngOnChanges() {
68
+ ngOnChanges(changes: SimpleChanges) {
69
+ if (!Object.values(changes).every(val => val.firstChange === true)) {
70
+ this.updateSelf();
71
+ }
72
+ }
73
+
74
+ updateSelf() {
70
75
  this.loadViewCaseID = this.pConn$.getValue(this.constants.PZINSKEY) || this.pConn$.getValue(this.constants.CASE_INFO.CASE_INFO_ID);
71
76
  let containerItemData;
72
77
  const targetName = this.pConn$.getTarget();
@@ -92,7 +97,7 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges {
92
97
 
93
98
  getViewOptions = () => ({
94
99
  viewContext: this.resourceType,
95
- pageClass: this.loadViewCaseID ? '' : this.pConn$.getDataObject().pyPortal.classID,
100
+ pageClass: this.loadViewCaseID ? '' : this.pConn$.getDataObject()?.pyPortal?.classID,
96
101
  container: this.isContainerPreview ? 'preview' : undefined,
97
102
  containerName: this.isContainerPreview ? 'preview' : undefined,
98
103
  updateData: this.isContainerPreview
@@ -119,8 +124,9 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges {
119
124
  };
120
125
  const configObject = PCore.createPConnect(config);
121
126
  configObject.getPConnect().setInheritedProp('displayMode', 'DISPLAY_ONLY');
122
- this.loadedPConn$ = ReferenceComponent.normalizePConn(configObject.getPConnect());
123
- this.componentName$ = this.loadedPConn$.getComponentName();
127
+
128
+ this.childComponentPConnect = ReferenceComponent.normalizePConn(configObject.getPConnect());
129
+
124
130
  if (this.deferLoadId) {
125
131
  PCore.getDeferLoadManager().stop(this.deferLoadId, this.pConn$.getContextName());
126
132
  }
@@ -1,5 +1,5 @@
1
1
  .psdk-case-view-divider {
2
- border-bottom: 0.0625rem solid var(--app-neutral-light-color);
2
+ border-bottom: 0.0625rem solid var(--mat-sys-outline-variant);
3
3
  }
4
4
 
5
5
  .psdk-icon {
@@ -8,11 +8,9 @@
8
8
  }
9
9
 
10
10
  .psdk-icon-current {
11
- color: var(--app-primary-color);
12
11
  }
13
12
 
14
13
  .psdk-icon-not-current {
15
- color: var(--app-neutral-color);
16
14
  }
17
15
 
18
16
  .psdk-current-svg-icon {
@@ -35,16 +33,13 @@ mat-horizontal-stepper {
35
33
  .psdk-sub-step-current {
36
34
  padding-left: 0.625rem;
37
35
  font-weight: bold;
38
- color: var(--app-label-selected-color);
39
36
  }
40
37
 
41
38
  .psdk-sub-step-not-current {
42
39
  padding-left: 0.625rem;
43
- color: var(--app-label-color);
44
40
  }
45
41
 
46
42
  .psdk-flow-container-top {
47
- background-color: var(--app-form-color);
48
43
  padding: 0rem 0.625rem;
49
44
  border-radius: 0.3125rem;
50
45
  }
@@ -81,8 +76,6 @@ mat-horizontal-stepper {
81
76
 
82
77
  .psdk-vertical-step-icon {
83
78
  margin-right: 12px;
84
- background-color: var(--app-neutral-color);
85
- color: var(--app-form-color);
86
79
  border-radius: 50%;
87
80
  height: 24px;
88
81
  width: 24px;
@@ -95,13 +88,10 @@ mat-horizontal-stepper {
95
88
  top: 50%;
96
89
  left: 50%;
97
90
  transform: translate(-50%, -50%);
98
- color: var(--app-form-color);
99
91
  }
100
92
 
101
93
  .psdk-vertical-step-icon-selected {
102
94
  margin-right: 12px;
103
- background-color: var(--app-primary-color);
104
- color: var(--app-form-color);
105
95
  border-radius: 50%;
106
96
  height: 24px;
107
97
  width: 24px;
@@ -110,7 +100,6 @@ mat-horizontal-stepper {
110
100
  }
111
101
 
112
102
  .psdk-vertical-step-label {
113
- color: var(--app-label-color);
114
103
  display: inline-block;
115
104
  white-space: nowrap;
116
105
  overflow: hidden;
@@ -122,7 +111,6 @@ mat-horizontal-stepper {
122
111
  }
123
112
 
124
113
  .psdk-vertical-step-label-selected {
125
- color: var(--app-label-selected-color);
126
114
  display: inline-block;
127
115
  white-space: nowrap;
128
116
  overflow: hidden;
@@ -152,7 +140,6 @@ mat-horizontal-stepper {
152
140
  border-left-style: solid;
153
141
  top: -16px;
154
142
  bottom: -16px;
155
- border-left-color: var(--app-multi-step-border-color);
156
143
  }
157
144
 
158
145
  .psdk-horizontal-stepper {
@@ -182,8 +169,6 @@ mat-horizontal-stepper {
182
169
  }
183
170
 
184
171
  .psdk-horizontal-step-icon {
185
- background-color: var(--app-neutral-color);
186
- color: var(--app-form-color);
187
172
  border-radius: 50%;
188
173
  height: 24px;
189
174
  width: 24px;
@@ -203,8 +188,6 @@ mat-horizontal-stepper {
203
188
  }
204
189
 
205
190
  .psdk-horizontal-step-icon-selected {
206
- background-color: var(--app-primary-color);
207
- color: var(--app-form-color);
208
191
  border-radius: 50%;
209
192
  height: 24px;
210
193
  width: 24px;
@@ -216,7 +199,6 @@ mat-horizontal-stepper {
216
199
  }
217
200
 
218
201
  .psdk-horizontal-step-label {
219
- color: var(--app-label-color);
220
202
  display: inline-block;
221
203
  min-width: 50px;
222
204
  vertical-align: middle;
@@ -226,7 +208,6 @@ mat-horizontal-stepper {
226
208
  }
227
209
 
228
210
  .psdk-horizontal-step-label-selected {
229
- color: var(--app-label-selected-color);
230
211
  display: inline-block;
231
212
  min-width: 50px;
232
213
  vertical-align: middle;
@@ -236,7 +217,6 @@ mat-horizontal-stepper {
236
217
  }
237
218
 
238
219
  .psdk-horizontal-step-line {
239
- border-top-color: var(--app-multi-step-border-color);
240
220
  border-top-width: 1px;
241
221
  border-top-style: solid;
242
222
  flex: auto;
@@ -8,35 +8,33 @@
8
8
  </div>
9
9
  </div>
10
10
  <div class="psdk-nav-divider"></div>
11
- <div>
12
- <mat-list>
13
- <mat-list-item id="create-case-button" (click)="navPanelCreateButtonClick()">
14
- <div class="flex-box">
15
- <img class="psdk-nav-svg-icon" src="{{ navExpandCollapse$ }}" />
16
- <span class="psdk-nav-button-span">Create</span>
17
- </div>
11
+ <mat-list>
12
+ <mat-list-item id="create-case-button" (click)="navPanelCreateButtonClick()">
13
+ <div class="flex-box">
14
+ <img class="psdk-nav-svg-icon" src="{{ navExpandCollapse$ }}" />
15
+ <span class="psdk-nav-button-span">Create</span>
16
+ </div>
17
+ </mat-list-item>
18
+ <mat-list *ngIf="bShowCaseTypes$" style="margin-left: 40px">
19
+ <mat-list-item
20
+ id="case-list-item"
21
+ *ngFor="let caseType of caseTypes$"
22
+ (click)="navPanelCreateCaseType(caseType.pyClassName, caseType.pyFlowType)"
23
+ >
24
+ <span class="psdk-nav-button-span">{{
25
+ localeUtils.getLocaleValue(caseType.pyLabel, '', localeUtils.getCaseLocaleReference(caseType.pyClassName))
26
+ }}</span>
18
27
  </mat-list-item>
19
- <mat-list *ngIf="bShowCaseTypes$" style="margin-left: 40px">
20
- <mat-list-item
21
- id="case-list-item"
22
- *ngFor="let caseType of caseTypes$"
23
- (click)="navPanelCreateCaseType(caseType.pyClassName, caseType.pyFlowType)"
24
- >
25
- <span class="psdk-nav-button-span">{{ localeUtils.getLocaleValue(caseType.pyLabel, '', localeReference) }}</span>
26
- </mat-list-item>
27
- </mat-list>
28
28
  </mat-list>
29
- </div>
30
- <div style="height: 100%">
31
- <mat-list *ngFor="let page of navPages$">
32
- <mat-list-item (click)="navPanelButtonClick(page)">
33
- <div class="flex-box">
34
- <img class="psdk-nav-svg-icon" src="{{ page.iconName }}" />
35
- <span class="psdk-nav-button-span">{{ localeUtils.getLocaleValue(page.pyLabel, '', localeReference) }}</span>
36
- </div>
37
- </mat-list-item>
38
- </mat-list>
39
- </div>
29
+ </mat-list>
30
+ <mat-list *ngFor="let page of navPages$">
31
+ <mat-list-item (click)="navPanelButtonClick(page)">
32
+ <div class="flex-box">
33
+ <img class="psdk-nav-svg-icon" src="{{ page.iconName }}" />
34
+ <span class="psdk-nav-button-span">{{ page.name }}</span>
35
+ </div>
36
+ </mat-list-item>
37
+ </mat-list>
40
38
  <div class="psdk-nav-divider"></div>
41
39
  <div>
42
40
  <mat-list id="profile">
@@ -47,7 +45,6 @@
47
45
  </div>
48
46
  </mat-list-item>
49
47
  <mat-menu #menu="matMenu">
50
- <button mat-menu-item>Profile</button>
51
48
  <button mat-menu-item (click)="navPanelLogoutClick()">{{ localizedVal('Log off', localeCategory) }}</button>
52
49
  </mat-menu>
53
50
  </mat-list>
@@ -5,7 +5,7 @@ $transition-fast: 0.1s !default;
5
5
  $natural-ease: cubic-bezier(0.4, 0.6, 0.1, 1) !default;
6
6
 
7
7
  .psdk-nav-divider {
8
- border-bottom: 0.0625rem solid var(--app-divider-color);
8
+ border-bottom: 0.0625rem solid var(--mat-sys-outline-variant);
9
9
  width: 100%;
10
10
  align-items: center;
11
11
  }
@@ -119,8 +119,8 @@ $natural-ease: cubic-bezier(0.4, 0.6, 0.1, 1) !default;
119
119
  align-items: center;
120
120
  text-align: center;
121
121
  display: inline-flex;
122
- background: var(--app-neutral-color);
123
- color: var(--app-form-color);
122
+ background: var(--mat-sys-background);
123
+ color: var(--mat-sys-on-background);
124
124
  font-weight: normal;
125
125
  font-size: 1rem;
126
126
  }
@@ -140,7 +140,7 @@ mat-list-item {
140
140
  height: auto !important;
141
141
 
142
142
  &:hover {
143
- background-color: var(--app-label-color);
143
+ background-color: rgba(0, 0, 0, 0.54);
144
144
  }
145
145
 
146
146
  .flex-box {
@@ -150,3 +150,15 @@ mat-list-item {
150
150
  text-align: left;
151
151
  }
152
152
  }
153
+
154
+ .theme-menu-item {
155
+ display: flex;
156
+ align-items: center;
157
+ gap: 12px;
158
+ }
159
+
160
+ .color-preview {
161
+ width: 24px;
162
+ height: 24px;
163
+ border-radius: 50%;
164
+ }
@@ -49,7 +49,6 @@ export class NavbarComponent implements OnInit, OnDestroy {
49
49
  localizedVal: any;
50
50
  localeCategory = 'AppShell';
51
51
  localeUtils = PCore.getLocaleUtils();
52
- localeReference: any;
53
52
  constructor(
54
53
  private angularPConnect: AngularPConnectService,
55
54
  private chRef: ChangeDetectorRef,
@@ -113,11 +112,17 @@ export class NavbarComponent implements OnInit, OnDestroy {
113
112
 
114
113
  // making a copy, so can add info
115
114
  this.navPages$ = JSON.parse(JSON.stringify(this.pages$));
116
-
115
+ // @ts-ignore
116
+ const localeReference = PCore.getLocaleUtils().getPortalLocaleReference() || this.pConn$.getValue('.pyLocaleReference');
117
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);
118
124
  page.iconName = this.utils.getImageSrc(page.pxPageViewIcon, this.utils.getSDKStaticContentUrl());
119
125
  });
120
- this.localeReference = this.pConn$.getValue('.pyLocaleReference');
121
126
  this.actionsAPI = this.pConn$.getActionsApi();
122
127
  this.createWork = this.actionsAPI.createWork.bind(this.actionsAPI);
123
128
  this.showPage = this.actionsAPI.showPage.bind(this.actionsAPI);
@@ -5,7 +5,6 @@
5
5
  align-items: center;
6
6
  height: 100%;
7
7
  width: 100%;
8
- background-color: var(--app-background-color);
9
8
  position: fixed;
10
9
  z-index: 99999;
11
10
  top: 0rem;