@pega/angular-sdk-overrides 0.242.6 → 0.242.7
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/field/email/email.component.ts +17 -7
- package/lib/field/integer/integer.component.html +1 -1
- package/lib/field/integer/integer.component.ts +16 -6
- package/lib/field/text-area/text-area.component.html +1 -1
- package/lib/field/text-area/text-area.component.ts +16 -6
- package/lib/field/text-input/text-input.component.html +1 -1
- package/lib/field/text-input/text-input.component.ts +16 -6
- package/lib/field/url/url.component.html +1 -1
- package/lib/field/url/url.component.ts +16 -6
- package/lib/infra/Containers/flow-container/flow-container.component.ts +0 -8
- package/lib/infra/assignment/assignment.component.ts +1 -1
- package/lib/infra/reference/reference.component.ts +15 -12
- package/lib/template/base/form-template-base.ts +2 -2
- package/lib/template/field-group-template/field-group-template.component.ts +1 -1
- package/lib/template/simple-table-manual/simple-table-manual.component.ts +0 -1
- package/lib/widget/todo/todo.component.html +1 -1
- package/lib/widget/todo/todo.component.ts +4 -3
- package/package.json +1 -1
|
@@ -159,16 +159,26 @@ export class EmailComponent implements OnInit, OnDestroy {
|
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
fieldOnChange(event: any) {
|
|
162
|
-
const
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
162
|
+
const oldVal = this.value$ ?? '';
|
|
163
|
+
const isValueChanged = event.target.value.toString() !== oldVal.toString();
|
|
164
|
+
|
|
165
|
+
if (isValueChanged) {
|
|
166
|
+
const value = event?.target?.value;
|
|
167
|
+
handleEvent(this.actionsApi, 'changeNblur', this.propName, value);
|
|
168
|
+
this.pConn$.clearErrorMessages({
|
|
169
|
+
property: this.propName
|
|
170
|
+
});
|
|
171
|
+
}
|
|
167
172
|
}
|
|
168
173
|
|
|
169
174
|
fieldOnBlur(event: any) {
|
|
170
|
-
const
|
|
171
|
-
|
|
175
|
+
const oldVal = this.value$ ?? '';
|
|
176
|
+
const isValueChanged = event.target.value.toString() !== oldVal.toString();
|
|
177
|
+
|
|
178
|
+
if (isValueChanged) {
|
|
179
|
+
const value = event?.target?.value;
|
|
180
|
+
handleEvent(this.actionsApi, 'changeNblur', this.propName, value);
|
|
181
|
+
}
|
|
172
182
|
}
|
|
173
183
|
|
|
174
184
|
getErrorMessage() {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
[required]="bRequired$"
|
|
16
16
|
[formControl]="fieldControl"
|
|
17
17
|
[attr.data-test-id]="testId"
|
|
18
|
-
(change)="fieldOnChange()"
|
|
18
|
+
(change)="fieldOnChange($event)"
|
|
19
19
|
(blur)="fieldOnBlur($event)"
|
|
20
20
|
/>
|
|
21
21
|
<mat-error *ngIf="fieldControl.invalid">{{ getErrorMessage() }}</mat-error>
|
|
@@ -161,15 +161,25 @@ export class IntegerComponent implements OnInit, OnDestroy {
|
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
fieldOnChange() {
|
|
165
|
-
this.
|
|
166
|
-
|
|
167
|
-
|
|
164
|
+
fieldOnChange(event: any) {
|
|
165
|
+
const oldVal = this.value$ ?? '';
|
|
166
|
+
const isValueChanged = event.target.value.toString() !== oldVal.toString();
|
|
167
|
+
|
|
168
|
+
if (isValueChanged) {
|
|
169
|
+
this.pConn$.clearErrorMessages({
|
|
170
|
+
property: this.propName
|
|
171
|
+
});
|
|
172
|
+
}
|
|
168
173
|
}
|
|
169
174
|
|
|
170
175
|
fieldOnBlur(event: any) {
|
|
171
|
-
const
|
|
172
|
-
|
|
176
|
+
const oldVal = this.value$ ?? '';
|
|
177
|
+
const isValueChanged = event.target.value.toString() !== oldVal.toString();
|
|
178
|
+
|
|
179
|
+
if (isValueChanged) {
|
|
180
|
+
const value = event?.target?.value;
|
|
181
|
+
handleEvent(this.actionsApi, 'changeNblur', this.propName, value);
|
|
182
|
+
}
|
|
173
183
|
}
|
|
174
184
|
|
|
175
185
|
getErrorMessage() {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
[required]="bRequired$"
|
|
17
17
|
[disabled]="bDisabled$"
|
|
18
18
|
[formControl]="fieldControl"
|
|
19
|
-
(change)="fieldOnChange()"
|
|
19
|
+
(change)="fieldOnChange($event)"
|
|
20
20
|
(blur)="fieldOnBlur($event)"
|
|
21
21
|
></textarea>
|
|
22
22
|
<mat-error *ngIf="fieldControl.invalid">{{ getErrorMessage() }}</mat-error>
|
|
@@ -159,15 +159,25 @@ export class TextAreaComponent implements OnInit, OnDestroy {
|
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
fieldOnChange() {
|
|
163
|
-
this.
|
|
164
|
-
|
|
165
|
-
|
|
162
|
+
fieldOnChange(event: any) {
|
|
163
|
+
const oldVal = this.value$ ?? '';
|
|
164
|
+
const isValueChanged = event.target.value.toString() !== oldVal.toString();
|
|
165
|
+
|
|
166
|
+
if (isValueChanged) {
|
|
167
|
+
this.pConn$.clearErrorMessages({
|
|
168
|
+
property: this.propName
|
|
169
|
+
});
|
|
170
|
+
}
|
|
166
171
|
}
|
|
167
172
|
|
|
168
173
|
fieldOnBlur(event: any) {
|
|
169
|
-
const
|
|
170
|
-
|
|
174
|
+
const oldVal = this.value$ ?? '';
|
|
175
|
+
const isValueChanged = event.target.value.toString() !== oldVal.toString();
|
|
176
|
+
|
|
177
|
+
if (isValueChanged) {
|
|
178
|
+
const value = event?.target?.value;
|
|
179
|
+
handleEvent(this.actionsApi, 'changeNblur', this.propName, value);
|
|
180
|
+
}
|
|
171
181
|
}
|
|
172
182
|
|
|
173
183
|
getErrorMessage() {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
[required]="bRequired$"
|
|
15
15
|
[attr.data-test-id]="testId"
|
|
16
16
|
[formControl]="fieldControl"
|
|
17
|
-
(change)="fieldOnChange()"
|
|
17
|
+
(change)="fieldOnChange($event)"
|
|
18
18
|
(blur)="fieldOnBlur($event)"
|
|
19
19
|
/>
|
|
20
20
|
<mat-error *ngIf="fieldControl.invalid">{{ getErrorMessage() }}</mat-error>
|
|
@@ -161,15 +161,25 @@ export class TextInputComponent implements OnInit, OnDestroy {
|
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
fieldOnChange() {
|
|
165
|
-
this.
|
|
166
|
-
|
|
167
|
-
|
|
164
|
+
fieldOnChange(event) {
|
|
165
|
+
const oldVal = this.value$ ?? '';
|
|
166
|
+
const isValueChanged = event.target.value.toString() !== oldVal.toString();
|
|
167
|
+
|
|
168
|
+
if (isValueChanged) {
|
|
169
|
+
this.pConn$.clearErrorMessages({
|
|
170
|
+
property: this.propName
|
|
171
|
+
});
|
|
172
|
+
}
|
|
168
173
|
}
|
|
169
174
|
|
|
170
175
|
fieldOnBlur(event: any) {
|
|
171
|
-
const
|
|
172
|
-
|
|
176
|
+
const oldVal = this.value$ ?? '';
|
|
177
|
+
const isValueChanged = event.target.value.toString() !== oldVal.toString();
|
|
178
|
+
|
|
179
|
+
if (isValueChanged) {
|
|
180
|
+
const value = event?.target?.value;
|
|
181
|
+
handleEvent(this.actionsApi, 'changeNblur', this.propName, value);
|
|
182
|
+
}
|
|
173
183
|
}
|
|
174
184
|
|
|
175
185
|
getErrorMessage() {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
[required]="bRequired$"
|
|
15
15
|
[attr.data-test-id]="testId"
|
|
16
16
|
[formControl]="fieldControl"
|
|
17
|
-
(change)="fieldOnChange()"
|
|
17
|
+
(change)="fieldOnChange($event)"
|
|
18
18
|
(blur)="fieldOnBlur($event)"
|
|
19
19
|
/>
|
|
20
20
|
<mat-error *ngIf="fieldControl.invalid">{{ getErrorMessage() }}</mat-error>
|
|
@@ -159,15 +159,25 @@ export class UrlComponent implements OnInit, OnDestroy {
|
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
fieldOnChange() {
|
|
163
|
-
this.
|
|
164
|
-
|
|
165
|
-
|
|
162
|
+
fieldOnChange(event: any) {
|
|
163
|
+
const oldVal = this.value$ ?? '';
|
|
164
|
+
const isValueChanged = event.target.value.toString() !== oldVal.toString();
|
|
165
|
+
|
|
166
|
+
if (isValueChanged) {
|
|
167
|
+
this.pConn$.clearErrorMessages({
|
|
168
|
+
property: this.propName
|
|
169
|
+
});
|
|
170
|
+
}
|
|
166
171
|
}
|
|
167
172
|
|
|
168
173
|
fieldOnBlur(event: any) {
|
|
169
|
-
const
|
|
170
|
-
|
|
174
|
+
const oldVal = this.value$ ?? '';
|
|
175
|
+
const isValueChanged = event.target.value.toString() !== oldVal.toString();
|
|
176
|
+
|
|
177
|
+
if (isValueChanged) {
|
|
178
|
+
const value = event?.target?.value;
|
|
179
|
+
handleEvent(this.actionsApi, 'changeNblur', this.propName, value);
|
|
180
|
+
}
|
|
171
181
|
}
|
|
172
182
|
|
|
173
183
|
getErrorMessage() {
|
|
@@ -442,14 +442,6 @@ export class FlowContainerComponent extends FlowContainerBaseComponent implement
|
|
|
442
442
|
this.bHasCaseMessages$ = true;
|
|
443
443
|
this.bShowConfirm = true;
|
|
444
444
|
this.checkSvg$ = this.utils.getImageSrc('check', this.utils.getSDKStaticContentUrl());
|
|
445
|
-
// Temp fix for 8.7 change: confirmationNote no longer coming through in caseMessages$.
|
|
446
|
-
// So, if we get here and caseMessages$ is empty, use default value in DX API response
|
|
447
|
-
if (!this.caseMessages$) {
|
|
448
|
-
this.caseMessages$ = this.localizedVal('Thank you! The next step in this case has been routed appropriately.', this.localeCategory);
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
// publish this "assignmentFinished" for mashup, need to get approved as a standard
|
|
452
|
-
PCore.getPubSubUtils().publish('assignmentFinished');
|
|
453
445
|
|
|
454
446
|
this.psService.sendMessage(false);
|
|
455
447
|
} else {
|
|
@@ -6,9 +6,9 @@ import { FormGroup } from '@angular/forms';
|
|
|
6
6
|
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
7
7
|
import { ErrorMessagesService } from '@pega/angular-sdk-components';
|
|
8
8
|
import { ProgressSpinnerService } from '@pega/angular-sdk-components';
|
|
9
|
+
import { BannerService } from '@pega/angular-sdk-components';
|
|
9
10
|
import { ReferenceComponent } from '@pega/angular-sdk-components';
|
|
10
11
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
11
|
-
import { BannerService } from 'packages/angular-sdk-components/src/public-api';
|
|
12
12
|
|
|
13
13
|
function getRefreshProps(refreshConditions) {
|
|
14
14
|
// refreshConditions cuurently supports only "Changes" event
|
|
@@ -33,13 +33,9 @@ export class ReferenceComponent {
|
|
|
33
33
|
static createFullReferencedViewFromRef(inPConn: any) {
|
|
34
34
|
// BAIL and ERROR if inPConn is NOT a reference!
|
|
35
35
|
if (inPConn.getComponentName() !== 'reference') {
|
|
36
|
-
// debugger;
|
|
37
|
-
|
|
38
36
|
console.error(`Reference component: createFullReferencedViewFromRef inPConn is NOT a reference! ${inPConn.getComponentName()}`);
|
|
39
37
|
}
|
|
40
38
|
|
|
41
|
-
const theResolvedConfigProps = inPConn.resolveConfigProps(inPConn.getConfigProps());
|
|
42
|
-
|
|
43
39
|
const referenceConfig = { ...inPConn.getComponentConfig() } || {};
|
|
44
40
|
|
|
45
41
|
// Since SDK-A implements Reference as static methods and we don't rely on
|
|
@@ -47,8 +43,8 @@ export class ReferenceComponent {
|
|
|
47
43
|
// (and also leaving the others in for now) so the referenced View can act on
|
|
48
44
|
// the visibility prop. (The following 3 lines were carried over from React SDK)
|
|
49
45
|
delete referenceConfig?.name;
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
delete referenceConfig?.type;
|
|
47
|
+
delete referenceConfig?.visibility;
|
|
52
48
|
|
|
53
49
|
const viewMetadata = inPConn.getReferencedView();
|
|
54
50
|
|
|
@@ -68,12 +64,15 @@ export class ReferenceComponent {
|
|
|
68
64
|
}
|
|
69
65
|
};
|
|
70
66
|
|
|
67
|
+
const theResolvedConfigProps = inPConn.resolveConfigProps(inPConn.getConfigProps());
|
|
68
|
+
const { visibility = true, context, readOnly = false, displayMode = '' } = theResolvedConfigProps;
|
|
69
|
+
|
|
71
70
|
if (ReferenceComponent.bLogging) {
|
|
72
|
-
console.log(`Reference: about to call createComponent with pageReference: context: ${
|
|
71
|
+
console.log(`Reference: about to call createComponent with pageReference: context: ${inPConn.getContextName()}`);
|
|
73
72
|
}
|
|
74
73
|
|
|
75
74
|
const viewComponent = inPConn.createComponent(viewObject, null, null, {
|
|
76
|
-
pageReference:
|
|
75
|
+
pageReference: context && context.startsWith('@CLASS') ? '' : context
|
|
77
76
|
});
|
|
78
77
|
|
|
79
78
|
// updating the referencedComponent should trigger a render
|
|
@@ -81,8 +80,8 @@ export class ReferenceComponent {
|
|
|
81
80
|
|
|
82
81
|
newCompPConnect.setInheritedConfig({
|
|
83
82
|
...referenceConfig,
|
|
84
|
-
readOnly
|
|
85
|
-
displayMode
|
|
83
|
+
readOnly,
|
|
84
|
+
displayMode
|
|
86
85
|
});
|
|
87
86
|
|
|
88
87
|
if (ReferenceComponent.bLogging) {
|
|
@@ -93,7 +92,11 @@ export class ReferenceComponent {
|
|
|
93
92
|
);
|
|
94
93
|
}
|
|
95
94
|
|
|
96
|
-
|
|
95
|
+
if (visibility !== false) {
|
|
96
|
+
return newCompPConnect;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return null;
|
|
97
100
|
}
|
|
98
101
|
|
|
99
102
|
// STATIC method that other components can call to normalize
|
|
@@ -130,7 +133,7 @@ export class ReferenceComponent {
|
|
|
130
133
|
// debugger;
|
|
131
134
|
let theRefViewPConn = this.createFullReferencedViewFromRef(inPConn.getPConnect());
|
|
132
135
|
// now return its PConnect
|
|
133
|
-
theRefViewPConn = theRefViewPConn
|
|
136
|
+
theRefViewPConn = theRefViewPConn?.getComponent();
|
|
134
137
|
|
|
135
138
|
// const theFullReference = theRefViewPConn.getPConnect().getFullReference();
|
|
136
139
|
// console.log(`theFullReference: ${theFullReference}`);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Directive, OnDestroy } from '@angular/core';
|
|
2
|
-
import { AngularPConnectData } from '
|
|
2
|
+
import { AngularPConnectData } from '@pega/angular-sdk-components';
|
|
3
3
|
|
|
4
4
|
@Directive()
|
|
5
5
|
export class FormTemplateBase implements OnDestroy {
|
|
@@ -9,7 +9,7 @@ export class FormTemplateBase implements OnDestroy {
|
|
|
9
9
|
ngOnDestroy(): void {
|
|
10
10
|
PCore.getContextTreeManager().removeContextTreeNode(this.pConn$.getContextName());
|
|
11
11
|
|
|
12
|
-
if (this.angularPConnectData
|
|
12
|
+
if (this.angularPConnectData?.unsubscribeFn) {
|
|
13
13
|
this.angularPConnectData.unsubscribeFn();
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -117,7 +117,7 @@ export class FieldGroupTemplateComponent implements OnInit, OnDestroy, OnChanges
|
|
|
117
117
|
this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
118
118
|
}
|
|
119
119
|
this.referenceList = this.configProps$.referenceList;
|
|
120
|
-
if (this.prevRefLength != this.referenceList
|
|
120
|
+
if (this.prevRefLength != this.referenceList?.length) {
|
|
121
121
|
// eslint-disable-next-line sonarjs/no-collapsible-if
|
|
122
122
|
if (!this.readonlyMode) {
|
|
123
123
|
if (this.referenceList?.length === 0 && this.allowAddEdit !== false) {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
</div>
|
|
28
28
|
</div>
|
|
29
29
|
</div>
|
|
30
|
-
<div class="psdk-todo-assignment-action"
|
|
30
|
+
<div *ngIf="!isConfirm || canPerform" class="psdk-todo-assignment-action">
|
|
31
31
|
<button mat-flat-button color="primary" (click)="clickGo(assignment)">{{ localizedVal('Go', localeCategory) }}</button>
|
|
32
32
|
</div>
|
|
33
33
|
</div>
|
|
@@ -91,7 +91,6 @@ export class TodoComponent implements OnInit, OnDestroy {
|
|
|
91
91
|
localeCategory = 'Todo';
|
|
92
92
|
showlessLocalizedValue = this.localizedVal('show_less', 'CosmosFields');
|
|
93
93
|
showMoreLocalizedValue = this.localizedVal('show_more', 'CosmosFields');
|
|
94
|
-
canPerform: boolean;
|
|
95
94
|
count: number;
|
|
96
95
|
|
|
97
96
|
constructor(
|
|
@@ -119,6 +118,10 @@ export class TodoComponent implements OnInit, OnDestroy {
|
|
|
119
118
|
PCore.getPubSubUtils().unsubscribe(CREATE_STAGE_DELETED, CREATE_STAGE_DELETED);
|
|
120
119
|
}
|
|
121
120
|
|
|
121
|
+
get canPerform() {
|
|
122
|
+
return this.assignmentsSource$?.[0]?.canPerform === 'true' || this.assignmentsSource$?.[0]?.canPerform === true;
|
|
123
|
+
}
|
|
124
|
+
|
|
122
125
|
updateList() {
|
|
123
126
|
const {
|
|
124
127
|
WORK_BASKET: {
|
|
@@ -156,8 +159,6 @@ export class TodoComponent implements OnInit, OnDestroy {
|
|
|
156
159
|
}
|
|
157
160
|
}
|
|
158
161
|
|
|
159
|
-
this.canPerform = this.arAssignments$?.[0]?.canPerform === 'true' || this.arAssignments$?.[0]?.canPerform === true;
|
|
160
|
-
|
|
161
162
|
this.currentUser$ = PCore.getEnvironmentInfo().getOperatorName();
|
|
162
163
|
this.currentUserInitials$ = this.utils.getInitials(this.currentUser$ ?? '');
|
|
163
164
|
}
|