@pega/angular-sdk-overrides 0.23.15 → 0.23.17
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/currency/currency.component.html +0 -1
- package/lib/field/currency/currency.component.ts +8 -7
- package/lib/field/decimal/decimal.component.ts +9 -3
- package/lib/field/email/email.component.html +0 -1
- package/lib/field/email/email.component.ts +8 -7
- package/lib/field/integer/integer.component.html +0 -1
- package/lib/field/integer/integer.component.ts +8 -7
- package/lib/field/percentage/percentage.component.html +0 -1
- package/lib/field/percentage/percentage.component.ts +8 -7
- package/lib/field/phone/phone.component.ts +7 -15
- package/lib/field/text-area/text-area.component.ts +8 -3
- package/lib/field/text-input/text-input.component.html +0 -1
- package/lib/field/text-input/text-input.component.ts +8 -7
- package/lib/field/url/url.component.html +0 -1
- package/lib/field/url/url.component.ts +8 -7
- package/package.json +1 -1
|
@@ -169,16 +169,17 @@ export class CurrencyComponent implements OnInit, OnDestroy {
|
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
fieldOnChange(event: any) {
|
|
173
|
-
this.angularPConnectData.actions?.onChange(this, event);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
172
|
fieldOnBlur(event: any) {
|
|
177
173
|
// PConnect wants to use eventHandler for onBlur
|
|
178
174
|
|
|
179
|
-
const
|
|
180
|
-
const
|
|
181
|
-
|
|
175
|
+
const oldVal = this.value$ ?? '';
|
|
176
|
+
const isValueChanged = Number(event.target.value).toString() !== oldVal.toString();
|
|
177
|
+
|
|
178
|
+
if (isValueChanged) {
|
|
179
|
+
const actionsApi = this.pConn$?.getActionsApi();
|
|
180
|
+
const propName = (this.pConn$?.getStateProps() as any).value;
|
|
181
|
+
handleEvent(actionsApi, 'changeNblur', propName, event?.target?.value);
|
|
182
|
+
}
|
|
182
183
|
}
|
|
183
184
|
|
|
184
185
|
getErrorMessage() {
|
|
@@ -160,12 +160,18 @@ export class DecimalComponent implements OnInit, OnDestroy {
|
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
fieldOnBlur(event: any) {
|
|
163
|
-
const actionsApi = this.pConn$?.getActionsApi();
|
|
164
|
-
const propName = (this.pConn$?.getStateProps() as any).value;
|
|
165
163
|
let value = event?.target?.value;
|
|
166
164
|
value = value.replace(/,/g, '');
|
|
167
165
|
value = value !== '' ? Number(value) : value;
|
|
168
|
-
|
|
166
|
+
|
|
167
|
+
const oldVal = this.value$ ?? '';
|
|
168
|
+
const isValueChanged = value.toString() !== oldVal.toString();
|
|
169
|
+
|
|
170
|
+
if (isValueChanged) {
|
|
171
|
+
const actionsApi = this.pConn$?.getActionsApi();
|
|
172
|
+
const propName = (this.pConn$?.getStateProps() as any).value;
|
|
173
|
+
handleEvent(actionsApi, 'changeNblur', propName, value);
|
|
174
|
+
}
|
|
169
175
|
}
|
|
170
176
|
|
|
171
177
|
getErrorMessage() {
|
|
@@ -153,14 +153,15 @@ export class EmailComponent implements OnInit, OnDestroy {
|
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
fieldOnChange(event: any) {
|
|
157
|
-
this.angularPConnectData.actions?.onChange(this, event);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
156
|
fieldOnBlur(event: any) {
|
|
161
|
-
const
|
|
162
|
-
const
|
|
163
|
-
|
|
157
|
+
const oldVal = this.value$ ?? '';
|
|
158
|
+
const isValueChanged = event.target.value.toString() !== oldVal.toString();
|
|
159
|
+
|
|
160
|
+
if (isValueChanged) {
|
|
161
|
+
const actionsApi = this.pConn$?.getActionsApi();
|
|
162
|
+
const propName = (this.pConn$?.getStateProps() as any).value;
|
|
163
|
+
handleEvent(actionsApi, 'changeNblur', propName, event?.target?.value);
|
|
164
|
+
}
|
|
164
165
|
}
|
|
165
166
|
|
|
166
167
|
getErrorMessage() {
|
|
@@ -156,14 +156,15 @@ export class IntegerComponent implements OnInit, OnDestroy {
|
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
fieldOnChange(event: any) {
|
|
160
|
-
this.angularPConnectData.actions?.onChange(this, event);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
159
|
fieldOnBlur(event: any) {
|
|
164
|
-
const
|
|
165
|
-
const
|
|
166
|
-
|
|
160
|
+
const oldVal = this.value$ ?? '';
|
|
161
|
+
const isValueChanged = event.target.value.toString() !== oldVal.toString();
|
|
162
|
+
|
|
163
|
+
if (isValueChanged) {
|
|
164
|
+
const actionsApi = this.pConn$?.getActionsApi();
|
|
165
|
+
const propName = (this.pConn$?.getStateProps() as any).value;
|
|
166
|
+
handleEvent(actionsApi, 'changeNblur', propName, event?.target?.value);
|
|
167
|
+
}
|
|
167
168
|
}
|
|
168
169
|
|
|
169
170
|
getErrorMessage() {
|
|
@@ -154,14 +154,15 @@ export class PercentageComponent implements OnInit, OnDestroy {
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
fieldOnChange(event: any) {
|
|
158
|
-
this.angularPConnectData.actions?.onChange(this, event);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
157
|
fieldOnBlur(event: any) {
|
|
162
|
-
const
|
|
163
|
-
const
|
|
164
|
-
|
|
158
|
+
const oldVal = this.value$ ?? '';
|
|
159
|
+
const isValueChanged = event.target.value.toString() !== oldVal.toString();
|
|
160
|
+
|
|
161
|
+
if (isValueChanged) {
|
|
162
|
+
const actionsApi = this.pConn$?.getActionsApi();
|
|
163
|
+
const propName = (this.pConn$?.getStateProps() as any).value;
|
|
164
|
+
handleEvent(actionsApi, 'changeNblur', propName, event?.target?.value);
|
|
165
|
+
}
|
|
165
166
|
}
|
|
166
167
|
|
|
167
168
|
getErrorMessage() {
|
|
@@ -159,26 +159,18 @@ export class PhoneComponent implements OnInit, OnDestroy {
|
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
163
|
+
fieldOnBlur(event: Event) {}
|
|
164
|
+
|
|
162
165
|
fieldOnChange() {
|
|
163
166
|
if (this.formGroup$.controls[this.controlName$].value) {
|
|
164
|
-
const actionsApi = this.pConn$?.getActionsApi();
|
|
165
|
-
const propName = (this.pConn$?.getStateProps() as any).value;
|
|
166
167
|
const value = this.formGroup$.controls[this.controlName$].value;
|
|
167
|
-
const eventObj = {
|
|
168
|
-
target: {
|
|
169
|
-
value
|
|
170
|
-
}
|
|
171
|
-
};
|
|
172
168
|
this.afterBlur = true;
|
|
173
|
-
this.angularPConnectData.actions?.onChange(this, eventObj);
|
|
174
|
-
handleEvent(actionsApi, 'blur', propName, value);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
169
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
170
|
+
const actionsApi = this.pConn$.getActionsApi();
|
|
171
|
+
const propName = (this.pConn$.getStateProps() as any).value;
|
|
172
|
+
handleEvent(actionsApi, 'changeNblur', propName, value);
|
|
173
|
+
}
|
|
182
174
|
}
|
|
183
175
|
|
|
184
176
|
getErrorMessage() {
|
|
@@ -157,9 +157,14 @@ export class TextAreaComponent implements OnInit, OnDestroy {
|
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
fieldOnChange(event: any) {
|
|
160
|
-
const
|
|
161
|
-
const
|
|
162
|
-
|
|
160
|
+
const oldVal = this.value$ ?? '';
|
|
161
|
+
const isValueChanged = event.target.value.toString() !== oldVal.toString();
|
|
162
|
+
|
|
163
|
+
if (isValueChanged) {
|
|
164
|
+
const actionsApi = this.pConn$?.getActionsApi();
|
|
165
|
+
const propName = (this.pConn$?.getStateProps() as any).value;
|
|
166
|
+
handleEvent(actionsApi, 'changeNblur', propName, event?.target?.value);
|
|
167
|
+
}
|
|
163
168
|
}
|
|
164
169
|
|
|
165
170
|
getErrorMessage() {
|
|
@@ -156,14 +156,15 @@ export class TextInputComponent implements OnInit, OnDestroy {
|
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
fieldOnChange(event: any) {
|
|
160
|
-
this.angularPConnectData.actions?.onChange(this, event);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
159
|
fieldOnBlur(event: any) {
|
|
164
|
-
const
|
|
165
|
-
const
|
|
166
|
-
|
|
160
|
+
const oldVal = this.value$ ?? '';
|
|
161
|
+
const isValueChanged = event.target.value.toString() !== oldVal.toString();
|
|
162
|
+
|
|
163
|
+
if (isValueChanged) {
|
|
164
|
+
const actionsApi = this.pConn$?.getActionsApi();
|
|
165
|
+
const propName = (this.pConn$?.getStateProps() as any).value;
|
|
166
|
+
handleEvent(actionsApi, 'changeNblur', propName, event?.target?.value);
|
|
167
|
+
}
|
|
167
168
|
}
|
|
168
169
|
|
|
169
170
|
getErrorMessage() {
|
|
@@ -154,14 +154,15 @@ export class UrlComponent implements OnInit, OnDestroy {
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
fieldOnChange(event: any) {
|
|
158
|
-
this.angularPConnectData.actions?.onChange(this, event);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
157
|
fieldOnBlur(event: any) {
|
|
162
|
-
const
|
|
163
|
-
const
|
|
164
|
-
|
|
158
|
+
const oldVal = this.value$ ?? '';
|
|
159
|
+
const isValueChanged = event.target.value.toString() !== oldVal.toString();
|
|
160
|
+
|
|
161
|
+
if (isValueChanged) {
|
|
162
|
+
const actionsApi = this.pConn$?.getActionsApi();
|
|
163
|
+
const propName = (this.pConn$?.getStateProps() as any).value;
|
|
164
|
+
handleEvent(actionsApi, 'changeNblur', propName, event?.target?.value);
|
|
165
|
+
}
|
|
165
166
|
}
|
|
166
167
|
|
|
167
168
|
getErrorMessage() {
|