@pega/angular-sdk-overrides 0.26.1 → 0.26.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.
- package/lib/designSystemExtension/alert/alert.component.html +4 -1
- package/lib/designSystemExtension/alert/alert.component.scss +9 -10
- package/lib/designSystemExtension/alert/alert.component.ts +6 -2
- package/lib/designSystemExtension/field-group/field-group.component.ts +11 -3
- package/lib/designSystemExtension/material-case-summary/material-case-summary.component.html +12 -3
- package/lib/designSystemExtension/operator/operator.component.ts +2 -1
- package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.html +104 -10
- package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.scss +141 -1
- package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.ts +224 -72
- package/lib/field/auto-complete/auto-complete.component.html +46 -5
- package/lib/field/auto-complete/auto-complete.component.scss +92 -0
- package/lib/field/auto-complete/auto-complete.component.ts +349 -22
- package/lib/field/cancel-alert/cancel-alert.component.ts +38 -15
- package/lib/field/check-box/check-box.component.html +3 -1
- package/lib/field/check-box/check-box.component.ts +10 -1
- package/lib/field/currency/currency.component.html +2 -1
- package/lib/field/currency/currency.component.ts +10 -1
- package/lib/field/date/date.component.html +2 -1
- package/lib/field/date/date.component.ts +2 -0
- package/lib/field/date-time/date-time.component.html +2 -1
- package/lib/field/date-time/date-time.component.scss +46 -40
- package/lib/field/date-time/date-time.component.ts +2 -0
- package/lib/field/decimal/decimal.component.html +2 -1
- package/lib/field/decimal/decimal.component.ts +2 -0
- package/lib/field/dropdown/dropdown.component.html +2 -1
- package/lib/field/dropdown/dropdown.component.ts +10 -1
- package/lib/field/email/email.component.html +2 -1
- package/lib/field/email/email.component.ts +2 -2
- package/lib/field/field.base.ts +27 -1
- package/lib/field/group/group.component.html +1 -1
- package/lib/field/group/group.component.ts +1 -3
- package/lib/field/integer/integer.component.html +2 -1
- package/lib/field/integer/integer.component.ts +4 -2
- package/lib/field/location/location.component.html +2 -1
- package/lib/field/location/location.component.ts +3 -1
- package/lib/field/object-reference/object-reference.component.html +1 -1
- package/lib/field/object-reference/object-reference.component.ts +3 -0
- package/lib/field/percentage/percentage.component.html +2 -1
- package/lib/field/percentage/percentage.component.ts +10 -1
- package/lib/field/phone/phone.component.html +2 -1
- package/lib/field/phone/phone.component.ts +2 -1
- package/lib/field/radio-buttons/radio-buttons.component.html +2 -1
- package/lib/field/radio-buttons/radio-buttons.component.ts +10 -1
- package/lib/field/rich-text/rich-text.component.scss +1 -166
- package/lib/field/rich-text/rich-text.component.ts +1 -1
- package/lib/field/semantic-link/semantic-link.component.html +1 -1
- package/lib/field/semantic-link/semantic-link.component.scss +4 -0
- package/lib/field/semantic-link/semantic-link.component.ts +9 -5
- package/lib/field/text-area/text-area.component.html +2 -1
- package/lib/field/text-area/text-area.component.ts +2 -1
- package/lib/field/text-input/text-input.component.html +2 -1
- package/lib/field/text-input/text-input.component.ts +2 -1
- package/lib/field/time/time.component.html +2 -1
- package/lib/field/time/time.component.ts +2 -1
- package/lib/field/url/url.component.html +2 -1
- package/lib/field/url/url.component.ts +2 -1
- package/lib/field/user-reference/user-reference.component.html +4 -2
- package/lib/field/user-reference/user-reference.component.ts +10 -5
- package/lib/infra/Containers/flow-container/flow-container.component.html +1 -1
- package/lib/infra/Containers/flow-container/flow-container.component.ts +33 -40
- package/lib/infra/Containers/modal-view-container/data-view-action-buttons/data-view-action-buttons.component.html +12 -0
- package/lib/infra/Containers/modal-view-container/data-view-action-buttons/data-view-action-buttons.component.spec.ts +130 -0
- package/lib/infra/Containers/modal-view-container/data-view-action-buttons/data-view-action-buttons.component.ts +77 -0
- package/lib/infra/Containers/modal-view-container/modal-view-container.component.html +35 -8
- package/lib/infra/Containers/modal-view-container/modal-view-container.component.spec.ts +24 -11
- package/lib/infra/Containers/modal-view-container/modal-view-container.component.ts +185 -194
- package/lib/infra/Containers/view-container/view-container.component.ts +32 -31
- package/lib/infra/assignment/assignment.component.html +2 -1
- package/lib/infra/assignment/assignment.component.ts +30 -13
- package/lib/infra/defer-load/defer-load.component.ts +6 -3
- package/lib/infra/multi-step/multi-step.component.html +25 -33
- package/lib/infra/multi-step/multi-step.component.scss +48 -0
- package/lib/infra/multi-step/multi-step.component.ts +11 -0
- package/lib/infra/navbar/navbar.component.ts +33 -35
- package/lib/infra/root-container/root-container.component.ts +33 -38
- package/lib/infra/view/view.component.ts +17 -39
- package/lib/template/app-shell/app-shell.component.ts +12 -11
- package/lib/template/base/details-template-base.ts +35 -53
- package/lib/template/case-summary/case-summary.component.ts +15 -1
- package/lib/template/case-view/case-view.component.html +13 -1
- package/lib/template/case-view/case-view.component.spec.ts +119 -10
- package/lib/template/case-view/case-view.component.ts +52 -3
- package/lib/template/data-reference/data-reference.component.ts +27 -18
- package/lib/template/data-reference/search-form/search-form.component.html +1 -1
- package/lib/template/data-reference/search-form/search-form.component.ts +2 -0
- package/lib/template/default-form/default-form.component.html +19 -3
- package/lib/template/default-form/default-form.component.ts +13 -3
- package/lib/template/details/details.component.html +23 -3
- package/lib/template/details/details.component.scss +9 -2
- package/lib/template/details/details.component.ts +3 -32
- package/lib/template/details-narrow-wide/details-narrow-wide.component.html +21 -2
- package/lib/template/details-narrow-wide/details-narrow-wide.component.scss +8 -1
- package/lib/template/details-narrow-wide/details-narrow-wide.component.ts +3 -37
- package/lib/template/details-one-column/details-one-column.component.html +23 -1
- package/lib/template/details-one-column/details-one-column.component.scss +14 -0
- package/lib/template/details-one-column/details-one-column.component.ts +3 -38
- package/lib/template/details-three-column/details-three-column.component.html +21 -2
- package/lib/template/details-three-column/details-three-column.component.scss +8 -1
- package/lib/template/details-three-column/details-three-column.component.ts +3 -46
- package/lib/template/details-two-column/details-two-column.component.html +21 -2
- package/lib/template/details-two-column/details-two-column.component.scss +8 -1
- package/lib/template/details-two-column/details-two-column.component.ts +3 -44
- package/lib/template/details-wide-narrow/details-wide-narrow.component.html +21 -2
- package/lib/template/details-wide-narrow/details-wide-narrow.component.scss +8 -1
- package/lib/template/details-wide-narrow/details-wide-narrow.component.ts +3 -41
- package/lib/template/field-value-list/field-value-list.component.scss +17 -0
- package/lib/template/list-view/list-view.component.ts +39 -0
- package/lib/template/self-service-case-view/self-service-case-view.component.html +13 -1
- package/lib/template/self-service-case-view/self-service-case-view.component.spec.ts +96 -11
- package/lib/template/self-service-case-view/self-service-case-view.component.ts +52 -3
- package/lib/template/simple-table-manual/helpers.ts +30 -9
- package/lib/template/simple-table-manual/simple-table-manual.component.html +30 -14
- package/lib/template/simple-table-manual/simple-table-manual.component.scss +4 -0
- package/lib/template/simple-table-manual/simple-table-manual.component.ts +118 -29
- package/lib/template/single-reference-readonly/single-reference-readonly.component.html +1 -1
- package/lib/template/single-reference-readonly/single-reference-readonly.component.scss +2 -2
- package/lib/template/single-reference-readonly/single-reference-readonly.component.ts +4 -4
- package/lib/template/wss-nav-bar/wss-nav-bar.component.ts +18 -20
- package/lib/widget/attachment/AttachmentUtils.ts +18 -10
- package/lib/widget/attachment/attachment.component.html +16 -6
- package/lib/widget/attachment/attachment.component.ts +12 -2
- package/lib/widget/case-history/case-history.component.ts +6 -2
- package/lib/widget/file-utility/file-utility.component.ts +25 -29
- package/lib/widget/todo/todo.component.ts +7 -2
- package/package.json +1 -1
- package/lib/designSystemExtension/material-details/material-details.component.html +0 -40
- package/lib/designSystemExtension/material-details/material-details.component.scss +0 -116
- package/lib/designSystemExtension/material-details/material-details.component.spec.ts +0 -24
- package/lib/designSystemExtension/material-details/material-details.component.ts +0 -31
- package/lib/designSystemExtension/material-details-fields/material-details-fields.component.html +0 -41
- package/lib/designSystemExtension/material-details-fields/material-details-fields.component.scss +0 -34
- package/lib/designSystemExtension/material-details-fields/material-details-fields.component.spec.ts +0 -22
- package/lib/designSystemExtension/material-details-fields/material-details-fields.component.ts +0 -61
|
@@ -27,6 +27,8 @@ interface AssignmentProps {
|
|
|
27
27
|
template: string;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
type StepIndicator = 'horizontal' | 'vertical' | 'vertical-start';
|
|
31
|
+
|
|
30
32
|
@Component({
|
|
31
33
|
selector: 'app-assignment',
|
|
32
34
|
templateUrl: './assignment.component.html',
|
|
@@ -60,6 +62,7 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
60
62
|
|
|
61
63
|
bHasNavigation$ = false;
|
|
62
64
|
bIsVertical$ = false;
|
|
65
|
+
stepIndicator$: StepIndicator = 'horizontal';
|
|
63
66
|
prevNavigationSteps: any[] = [];
|
|
64
67
|
arCurrentStepIndicies$: number[] = [];
|
|
65
68
|
arNavigationSteps$: any[] = [];
|
|
@@ -108,6 +111,8 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
108
111
|
if (this.angularPConnectData.unsubscribeFn) {
|
|
109
112
|
this.angularPConnectData.unsubscribeFn();
|
|
110
113
|
}
|
|
114
|
+
|
|
115
|
+
this.bannerService.clearBanners(this.itemKey$);
|
|
111
116
|
}
|
|
112
117
|
|
|
113
118
|
// Callback passed when subscribing to store change
|
|
@@ -240,14 +245,22 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
240
245
|
}
|
|
241
246
|
|
|
242
247
|
createButtonsForMultiStepForm(oCaseInfo) {
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
248
|
+
const navigationTemplate = oCaseInfo.navigation.template?.toLowerCase();
|
|
249
|
+
const stepCount = oCaseInfo.navigation.steps?.length ?? 0;
|
|
250
|
+
const shouldHideNavigation = navigationTemplate === 'standard' || stepCount <= 1;
|
|
251
|
+
|
|
252
|
+
this.bHasNavigation$ = !shouldHideNavigation;
|
|
253
|
+
this.bIsVertical$ = false;
|
|
254
|
+
this.stepIndicator$ = 'horizontal';
|
|
255
|
+
|
|
256
|
+
if (!shouldHideNavigation) {
|
|
257
|
+
if (navigationTemplate === 'vertical') {
|
|
258
|
+
this.bIsVertical$ = true;
|
|
259
|
+
this.stepIndicator$ = 'vertical';
|
|
260
|
+
} else if (navigationTemplate === 'vertical-left') {
|
|
261
|
+
this.bIsVertical$ = true;
|
|
262
|
+
this.stepIndicator$ = 'vertical-start';
|
|
263
|
+
}
|
|
251
264
|
}
|
|
252
265
|
|
|
253
266
|
// iterate through steps to find current one(s)
|
|
@@ -304,7 +317,7 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
304
317
|
|
|
305
318
|
buttonClick(sAction, sButtonType) {
|
|
306
319
|
this.snackBarRef?.dismiss();
|
|
307
|
-
this.bannerService.clearBanners();
|
|
320
|
+
this.bannerService.clearBanners(this.itemKey$);
|
|
308
321
|
PCore.getPubSubUtils().publish('clearBannerMessages');
|
|
309
322
|
// right now, done on an individual basis, setting bReInit to true
|
|
310
323
|
// upon the next flow container state change, will cause the flow container
|
|
@@ -496,10 +509,14 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
496
509
|
refreshProps.forEach(prop => {
|
|
497
510
|
PCore.getRefreshManager().registerForRefresh(
|
|
498
511
|
'PROP_CHANGE',
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
512
|
+
// The registered prop is an authored pattern with an empty list index (ex: ".Addons().Type"),
|
|
513
|
+
// which the server rejects. The refresh manager hands back the concrete path that changed.
|
|
514
|
+
(matchedPath?: string) => {
|
|
515
|
+
this.pConn$.getActionsApi().refreshCaseView(caseKey, '', pageReference, {
|
|
516
|
+
...refreshOptions,
|
|
517
|
+
refreshFor: matchedPath || prop[0]
|
|
518
|
+
});
|
|
519
|
+
},
|
|
503
520
|
`${pageReference}.${prop[1]}`,
|
|
504
521
|
`${context}/${pageReference}`,
|
|
505
522
|
context
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, OnInit, Input, forwardRef, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';
|
|
1
|
+
import { Component, OnInit, Input, forwardRef, OnDestroy, OnChanges, SimpleChanges, ChangeDetectorRef } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { publicConstants } from '@pega/pcore-pconnect-typedefs/constants';
|
|
4
4
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
@@ -35,7 +35,10 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
35
35
|
PAGE: any;
|
|
36
36
|
DATA: any;
|
|
37
37
|
lastUpdateCaseTime;
|
|
38
|
-
constructor(
|
|
38
|
+
constructor(
|
|
39
|
+
private angularPConnect: AngularPConnectService,
|
|
40
|
+
private cdRef: ChangeDetectorRef
|
|
41
|
+
) {
|
|
39
42
|
this.constants = PCore.getConstants();
|
|
40
43
|
}
|
|
41
44
|
|
|
@@ -132,7 +135,7 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
132
135
|
PCore.getDeferLoadManager().stop(this.deferLoadId, this.pConn$.getContextName());
|
|
133
136
|
}
|
|
134
137
|
}
|
|
135
|
-
|
|
138
|
+
this.cdRef.detectChanges();
|
|
136
139
|
}
|
|
137
140
|
|
|
138
141
|
loadActiveTab() {
|
|
@@ -1,43 +1,35 @@
|
|
|
1
1
|
<div *ngIf="bShow$">
|
|
2
|
-
<div
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<div class="
|
|
11
|
-
{{ mainStep.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<div class="{{ _getVBodyClass(i) }}">
|
|
15
|
-
<ng-container *ngIf="mainStep?.steps && mainStep.visited_status == 'current'">
|
|
16
|
-
<div *ngFor="let subStep of mainStep.steps">
|
|
17
|
-
<div *ngIf="subStep.visited_status == 'current'">
|
|
18
|
-
<component-mapper
|
|
19
|
-
name="AssignmentCard"
|
|
20
|
-
[props]="{ pConn$, formGroup$, arChildren$, arMainButtons$, arSecondaryButtons$ }"
|
|
21
|
-
[parent]="this"
|
|
22
|
-
[outputEvents]="{ actionButtonClick: onActionButtonClick }"
|
|
23
|
-
></component-mapper>
|
|
2
|
+
<div
|
|
3
|
+
*ngIf="isVerticalLayout()"
|
|
4
|
+
class="psdk-vertical-stepper-container"
|
|
5
|
+
[class.stepper-start]="stepIndicator$ === 'vertical-start'"
|
|
6
|
+
[class.stepper-end]="stepIndicator$ === 'vertical'"
|
|
7
|
+
>
|
|
8
|
+
<div class="psdk-stepper-rail">
|
|
9
|
+
<div *ngFor="let mainStep of arNavigationSteps$; let i = index" class="psdk-vertical-step">
|
|
10
|
+
<div class="psdk-vertical-step-header">
|
|
11
|
+
<div class="{{ _getVIconClass(mainStep.visited_status) }}">
|
|
12
|
+
<div class="psdk-vertical-step-icon-content">
|
|
13
|
+
<span>{{ i + 1 }}</span>
|
|
24
14
|
</div>
|
|
25
15
|
</div>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
name="AssignmentCard"
|
|
31
|
-
[props]="{ pConn$, formGroup$, arChildren$, arMainButtons$, arSecondaryButtons$ }"
|
|
32
|
-
[parent]="this"
|
|
33
|
-
[outputEvents]="{ actionButtonClick: onActionButtonClick }"
|
|
34
|
-
></component-mapper>
|
|
35
|
-
</ng-container>
|
|
16
|
+
<div class="{{ _getVLabelClass(mainStep.visited_status) }}">
|
|
17
|
+
{{ mainStep.name }}
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
36
20
|
</div>
|
|
37
21
|
</div>
|
|
22
|
+
<div class="psdk-stepper-content">
|
|
23
|
+
<component-mapper
|
|
24
|
+
name="AssignmentCard"
|
|
25
|
+
[props]="{ pConn$, formGroup$, arChildren$, arMainButtons$, arSecondaryButtons$ }"
|
|
26
|
+
[parent]="this"
|
|
27
|
+
[outputEvents]="{ actionButtonClick: onActionButtonClick }"
|
|
28
|
+
></component-mapper>
|
|
29
|
+
</div>
|
|
38
30
|
</div>
|
|
39
31
|
|
|
40
|
-
<div *ngIf="
|
|
32
|
+
<div *ngIf="isHorizontalLayout()" class="psdk-horizontal-stepper">
|
|
41
33
|
<div class="psdk-horizontal-stepper-header-container">
|
|
42
34
|
<ng-container *ngFor="let mainStep of arNavigationSteps$; let i = index">
|
|
43
35
|
<div class="psdk-horizontal-step-header">
|
|
@@ -143,6 +143,54 @@ mat-horizontal-stepper {
|
|
|
143
143
|
bottom: -16px;
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
+
.psdk-vertical-stepper-container {
|
|
147
|
+
display: grid;
|
|
148
|
+
gap: 2rem;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.psdk-vertical-stepper-container.stepper-end {
|
|
152
|
+
grid-template-columns: 1fr minmax(12rem, auto);
|
|
153
|
+
grid-template-areas: 'content stepper';
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.psdk-vertical-stepper-container.stepper-start {
|
|
157
|
+
grid-template-columns: minmax(12rem, auto) 1fr;
|
|
158
|
+
grid-template-areas: 'stepper content';
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.psdk-stepper-rail {
|
|
162
|
+
grid-area: stepper;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.psdk-stepper-content {
|
|
166
|
+
grid-area: content;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.psdk-stepper-rail .psdk-vertical-step {
|
|
170
|
+
position: relative;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.psdk-stepper-rail .psdk-vertical-step-header {
|
|
174
|
+
height: auto;
|
|
175
|
+
overflow: visible;
|
|
176
|
+
padding: 0.75rem 0;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.psdk-stepper-rail .psdk-vertical-step:not(:last-child)::after {
|
|
180
|
+
content: '';
|
|
181
|
+
position: absolute;
|
|
182
|
+
left: 0.75rem;
|
|
183
|
+
top: calc(0.75rem + 1.75rem);
|
|
184
|
+
bottom: -0.25rem;
|
|
185
|
+
width: 0.0625rem;
|
|
186
|
+
background-color: var(--mat-sys-outline-variant);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.psdk-stepper-rail .psdk-vertical-step-label,
|
|
190
|
+
.psdk-stepper-rail .psdk-vertical-step-label-selected {
|
|
191
|
+
font-size: 0.875rem;
|
|
192
|
+
}
|
|
193
|
+
|
|
146
194
|
.psdk-horizontal-stepper {
|
|
147
195
|
background-color: transparent;
|
|
148
196
|
display: block;
|
|
@@ -4,6 +4,8 @@ import { FormGroup } from '@angular/forms';
|
|
|
4
4
|
import { Utils } from '@pega/angular-sdk-components';
|
|
5
5
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
6
6
|
|
|
7
|
+
type StepIndicator = 'horizontal' | 'vertical' | 'vertical-start';
|
|
8
|
+
|
|
7
9
|
@Component({
|
|
8
10
|
selector: 'app-multi-step',
|
|
9
11
|
templateUrl: './multi-step.component.html',
|
|
@@ -18,6 +20,7 @@ export class MultiStepComponent implements OnInit {
|
|
|
18
20
|
@Input() arSecondaryButtons$: any[];
|
|
19
21
|
@Input() arChildren$: any[];
|
|
20
22
|
@Input() bIsVertical$: boolean;
|
|
23
|
+
@Input() stepIndicator$?: StepIndicator;
|
|
21
24
|
@Input() arCurrentStepIndicies$: number[];
|
|
22
25
|
@Input() arNavigationSteps$: any[];
|
|
23
26
|
@Output() actionButtonClick: EventEmitter<any> = new EventEmitter();
|
|
@@ -38,6 +41,14 @@ export class MultiStepComponent implements OnInit {
|
|
|
38
41
|
this.actionButtonClick.emit(oData);
|
|
39
42
|
}
|
|
40
43
|
|
|
44
|
+
isVerticalLayout(): boolean {
|
|
45
|
+
return this.stepIndicator$ === 'vertical' || this.stepIndicator$ === 'vertical-start';
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
isHorizontalLayout(): boolean {
|
|
49
|
+
return !this.isVerticalLayout();
|
|
50
|
+
}
|
|
51
|
+
|
|
41
52
|
_getVIconClass(status): string {
|
|
42
53
|
if (status == 'current') {
|
|
43
54
|
return 'psdk-vertical-step-icon-selected';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, OnInit, Input, ChangeDetectorRef,
|
|
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';
|
|
@@ -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,39 @@ export class NavbarComponent implements OnInit, OnDestroy {
|
|
|
104
103
|
}
|
|
105
104
|
|
|
106
105
|
initComponent() {
|
|
107
|
-
this.
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
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
|
+
// @ts-ignore
|
|
114
|
+
const localeReference = PCore.getLocaleUtils().getPortalLocaleReference() || this.pConn$.getValue('.pyLocaleReference');
|
|
115
|
+
this.navPages$.forEach(page => {
|
|
116
|
+
const destinationObject: any = {};
|
|
117
|
+
this.pConn$.resolveConfigProps(
|
|
118
|
+
{ defaultHeading: page.pyDefaultHeading || page.pyLabel, localeReference: page.pyLocalizationReference },
|
|
119
|
+
destinationObject
|
|
120
|
+
);
|
|
121
|
+
page.name = this.localeUtils.getLocaleValue(destinationObject.defaultHeading, '', destinationObject.localeReference || localeReference);
|
|
122
|
+
page.iconName = this.utils.getImageSrc(page.pxPageViewIcon, this.utils.getSDKStaticContentUrl());
|
|
140
123
|
});
|
|
124
|
+
this.actionsAPI = this.pConn$.getActionsApi();
|
|
125
|
+
this.createWork = this.actionsAPI.createWork.bind(this.actionsAPI);
|
|
126
|
+
this.showPage = this.actionsAPI.showPage.bind(this.actionsAPI);
|
|
127
|
+
this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as NavBarProps;
|
|
128
|
+
this.logout = this.actionsAPI.logout.bind(this.actionsAPI);
|
|
129
|
+
|
|
130
|
+
// const oData = this.pConn$.getDataObject();
|
|
131
|
+
|
|
132
|
+
this.portalLogoImage$ = this.utils.getSDKStaticContentUrl().concat('assets/pzpega-logo-mark.svg');
|
|
133
|
+
this.portalOperator$ = PCore.getEnvironmentInfo().getOperatorName();
|
|
134
|
+
this.portalOperatorInitials$ = this.utils.getInitials(this.portalOperator$ ?? '');
|
|
135
|
+
this.showAppName$ = this.configProps$.showAppName;
|
|
136
|
+
|
|
137
|
+
this.portalApp$ = PCore.getEnvironmentInfo().getApplicationLabel();
|
|
138
|
+
this.chRef.markForCheck();
|
|
141
139
|
}
|
|
142
140
|
|
|
143
141
|
navPanelButtonClick(oPageData: any) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, OnInit, Input,
|
|
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';
|
|
@@ -56,7 +56,7 @@ export class RootContainerComponent implements OnInit, OnDestroy {
|
|
|
56
56
|
constructor(
|
|
57
57
|
private angularPConnect: AngularPConnectService,
|
|
58
58
|
private psService: ProgressSpinnerService,
|
|
59
|
-
private
|
|
59
|
+
private cdRef: ChangeDetectorRef
|
|
60
60
|
) {}
|
|
61
61
|
|
|
62
62
|
ngOnInit(): void {
|
|
@@ -137,18 +137,16 @@ export class RootContainerComponent implements OnInit, OnDestroy {
|
|
|
137
137
|
});
|
|
138
138
|
|
|
139
139
|
setTimeout(() => {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
console.log(`RootContainer updated pConn$ to be: ${this.componentName$}`);
|
|
151
|
-
});
|
|
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();
|
|
152
150
|
});
|
|
153
151
|
}
|
|
154
152
|
}
|
|
@@ -187,24 +185,23 @@ export class RootContainerComponent implements OnInit, OnDestroy {
|
|
|
187
185
|
if (arChildren && arChildren.length == 1) {
|
|
188
186
|
// have to have a quick timeout or get an "expressions changed" angular error
|
|
189
187
|
setTimeout(() => {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
});
|
|
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();
|
|
208
205
|
});
|
|
209
206
|
}
|
|
210
207
|
}
|
|
@@ -222,9 +219,8 @@ export class RootContainerComponent implements OnInit, OnDestroy {
|
|
|
222
219
|
console.log(ex);
|
|
223
220
|
}
|
|
224
221
|
|
|
225
|
-
this.
|
|
226
|
-
|
|
227
|
-
});
|
|
222
|
+
this.bIsProgress$ = true;
|
|
223
|
+
this.cdRef.markForCheck();
|
|
228
224
|
});
|
|
229
225
|
}
|
|
230
226
|
}
|
|
@@ -236,9 +232,8 @@ export class RootContainerComponent implements OnInit, OnDestroy {
|
|
|
236
232
|
// don't touch bIsProgress$ unless differnent
|
|
237
233
|
if (bShow != this.bIsProgress$) {
|
|
238
234
|
// makes sure Angular tracks these changes
|
|
239
|
-
this.
|
|
240
|
-
|
|
241
|
-
});
|
|
235
|
+
this.bIsProgress$ = bShow;
|
|
236
|
+
this.cdRef.markForCheck();
|
|
242
237
|
}
|
|
243
238
|
}
|
|
244
239
|
}
|
|
@@ -3,17 +3,28 @@ 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
6
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
8
7
|
|
|
9
|
-
const NO_HEADER_TEMPLATES = [
|
|
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
|
+
];
|
|
21
|
+
|
|
10
22
|
const DETAILS_TEMPLATES = [
|
|
11
23
|
'Details',
|
|
12
|
-
'DetailsFields',
|
|
13
24
|
'DetailsOneColumn',
|
|
14
|
-
'DetailsSubTabs',
|
|
15
|
-
'DetailsThreeColumn',
|
|
16
25
|
'DetailsTwoColumn',
|
|
26
|
+
'DetailsThreeColumn',
|
|
27
|
+
'DetailsSubTabs',
|
|
17
28
|
'NarrowWideDetails',
|
|
18
29
|
'WideNarrowDetails'
|
|
19
30
|
];
|
|
@@ -157,7 +168,7 @@ export class ViewComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
157
168
|
this.showLabel$ =
|
|
158
169
|
this.inheritedProps$.showLabel !== undefined
|
|
159
170
|
? this.inheritedProps$.showLabel
|
|
160
|
-
: this.configProps$.showLabel
|
|
171
|
+
: (this.configProps$.showLabel ?? isDetailsTemplate(this.templateName$));
|
|
161
172
|
this.arChildren$ = this.pConn$.getChildren();
|
|
162
173
|
this.visibility$ = this.configProps$.visibility ?? this.visibility$;
|
|
163
174
|
|
|
@@ -183,39 +194,6 @@ export class ViewComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
183
194
|
// console.log("-->view update: " + this.angularPConnect.getComponentID(this) + ", template: " + this.templateName$ + ", kids: " + kidList);
|
|
184
195
|
}
|
|
185
196
|
|
|
186
|
-
// JA - adapting additionalProps from Nebula/Constellation version which uses static methods
|
|
187
|
-
// on the component classes stored in PComponents (that Angular doesn't have)...
|
|
188
|
-
additionalProps(state: any, getPConnect: any) {
|
|
189
|
-
let propObj = {};
|
|
190
|
-
|
|
191
|
-
// We already have the template name in this.templateName$
|
|
192
|
-
if (this.templateName$ !== '') {
|
|
193
|
-
let allFields = {};
|
|
194
|
-
|
|
195
|
-
// These uses are adapted from Nebula/Constellation CaseSummary.additionalProps
|
|
196
|
-
switch (this.templateName$) {
|
|
197
|
-
case 'CaseSummary':
|
|
198
|
-
allFields = getAllFields(getPConnect);
|
|
199
|
-
// eslint-disable-next-line no-case-declarations
|
|
200
|
-
const unresFields = {
|
|
201
|
-
primaryFields: allFields[0],
|
|
202
|
-
secondaryFields: allFields[1]
|
|
203
|
-
};
|
|
204
|
-
propObj = getPConnect.resolveConfigProps(unresFields);
|
|
205
|
-
break;
|
|
206
|
-
|
|
207
|
-
case 'Details':
|
|
208
|
-
allFields = getAllFields(getPConnect);
|
|
209
|
-
propObj = { fields: allFields[0] };
|
|
210
|
-
break;
|
|
211
|
-
default:
|
|
212
|
-
break;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
return propObj;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
197
|
ngOnDestroy(): void {
|
|
220
198
|
if (this.angularPConnectData.unsubscribeFn) {
|
|
221
199
|
this.angularPConnectData.unsubscribeFn();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, OnInit, Input,
|
|
1
|
+
import { ChangeDetectorRef, Component, OnInit, Input, forwardRef, OnDestroy } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { MatSnackBarModule, MatSnackBar } from '@angular/material/snack-bar';
|
|
4
4
|
import { Subscription } from 'rxjs';
|
|
@@ -59,7 +59,7 @@ export class AppShellComponent implements OnInit, OnDestroy {
|
|
|
59
59
|
private angularPConnect: AngularPConnectService,
|
|
60
60
|
private erService: ErrorMessagesService,
|
|
61
61
|
private snackBar: MatSnackBar,
|
|
62
|
-
private
|
|
62
|
+
private cdRef: ChangeDetectorRef,
|
|
63
63
|
private utils: Utils
|
|
64
64
|
) {}
|
|
65
65
|
|
|
@@ -152,17 +152,15 @@ export class AppShellComponent implements OnInit, OnDestroy {
|
|
|
152
152
|
const portalClass = this.pConn$.getValue('.classID', ''); // 2nd arg empty string until typedef marked correctly
|
|
153
153
|
const envPortalName = envInfo.getPortalName();
|
|
154
154
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
this.pages$ = this.configProps$.pages;
|
|
155
|
+
// making a copy, so can add info
|
|
156
|
+
this.pages$ = this.configProps$.pages;
|
|
158
157
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
158
|
+
if (this.pages$) {
|
|
159
|
+
this.bShowAppShell$ = true;
|
|
160
|
+
}
|
|
162
161
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
});
|
|
162
|
+
this.caseTypes$ = this.configProps$.caseTypes;
|
|
163
|
+
this.arChildren$ = this.pConn$.getChildren();
|
|
166
164
|
|
|
167
165
|
const portalLogo = this.configProps$.portalLogo;
|
|
168
166
|
// using the default icon then fetch it from the static folder (not auth involved)
|
|
@@ -181,12 +179,14 @@ export class AppShellComponent implements OnInit, OnDestroy {
|
|
|
181
179
|
.getSvcImageUrl(portalLogo)
|
|
182
180
|
.then(data => {
|
|
183
181
|
this.imageURL = data;
|
|
182
|
+
this.cdRef.markForCheck();
|
|
184
183
|
})
|
|
185
184
|
.catch(() => {
|
|
186
185
|
console.error(`${this.localizedVal('Unable to load the image for the portal logo/icon with the insName', 'AppShell')}:${portalLogo}`);
|
|
187
186
|
});
|
|
188
187
|
}
|
|
189
188
|
this.appName$ = this.localizedVal(appNameToDisplay || '', '', `${portalClass}!PORTAL!${envPortalName}`.toUpperCase());
|
|
189
|
+
this.cdRef.markForCheck();
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
// fpr show/hiding error messages in the SnackBar component
|
|
@@ -244,5 +244,6 @@ export class AppShellComponent implements OnInit, OnDestroy {
|
|
|
244
244
|
default:
|
|
245
245
|
break;
|
|
246
246
|
}
|
|
247
|
+
this.cdRef.markForCheck();
|
|
247
248
|
}
|
|
248
249
|
}
|