@fluxhub/fluxhub-lib 22.0.14 → 22.0.16
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.
|
@@ -196,6 +196,11 @@ const FH_MONITORING_IGNORE_ERRORS = [
|
|
|
196
196
|
'Importing a module script failed',
|
|
197
197
|
// copia di un 5xx che la libreria ha gia' segnalato come "HTTP 5xx /endpoint CHIAVE"
|
|
198
198
|
/^Server returned code \d+ with body/,
|
|
199
|
+
// HttpErrorResponse non gestita: l'ErrorHandler di Sentry la trasforma in un messaggio di
|
|
200
|
+
// testo (non arriva come istanza a beforeSend). 0 = rete assente o richiesta interrotta,
|
|
201
|
+
// 401 = sessione scaduta: entrambi gia' gestiti dall'interceptor della libreria.
|
|
202
|
+
/Http failure response for .*: 0 /,
|
|
203
|
+
/Http failure response for .*: 401 /,
|
|
199
204
|
];
|
|
200
205
|
/** Scarta un evento gia' segnalato o non azionabile; raggruppa i backend non raggiungibili. */
|
|
201
206
|
function fhMonitoringBeforeSend(event, hint) {
|
|
@@ -15334,10 +15339,32 @@ class FHNumericFieldComponent {
|
|
|
15334
15339
|
constructor(uti_s) {
|
|
15335
15340
|
this.uti_s = uti_s;
|
|
15336
15341
|
this.modelChangeSubject.pipe(debounceTime(300)).subscribe((value) => {
|
|
15337
|
-
|
|
15342
|
+
// Al modello va sempre un numero (come in chg()), non la stringa formattata ("10.624,66"):
|
|
15343
|
+
// il testo nel campo non viene toccato. Se nel frattempo c'e' stato blur/invio/writeValue
|
|
15344
|
+
// il valore e' gia' stato propagato e questa emissione e' superata. (change) resta invariato.
|
|
15345
|
+
if (this.typingPending) {
|
|
15346
|
+
this.typingPending = false;
|
|
15347
|
+
const num = this.parseFormatted(value);
|
|
15348
|
+
if (num != null)
|
|
15349
|
+
this.onChange(num);
|
|
15350
|
+
}
|
|
15338
15351
|
this.change.emit(value.split(this.suffixSymbol).join(''));
|
|
15339
15352
|
});
|
|
15340
15353
|
}
|
|
15354
|
+
typingPending = false;
|
|
15355
|
+
// Stesso parsing di chg(); null se il testo non e' (ancora) un numero, es. solo "-"
|
|
15356
|
+
parseFormatted(text) {
|
|
15357
|
+
if (text == null || text == '')
|
|
15358
|
+
return this.uti_s.round(0, this.decimal);
|
|
15359
|
+
const num = this.uti_s.round(parseFloat(text
|
|
15360
|
+
.split('.')
|
|
15361
|
+
.join('')
|
|
15362
|
+
.split(',')
|
|
15363
|
+
.join('.')
|
|
15364
|
+
.split(this.suffixSymbol)
|
|
15365
|
+
.join('')), this.decimal);
|
|
15366
|
+
return isNaN(num) ? null : num;
|
|
15367
|
+
}
|
|
15341
15368
|
keyDownFunctioncl(event) {
|
|
15342
15369
|
if (event.keyCode == 13) {
|
|
15343
15370
|
this.chg();
|
|
@@ -15345,6 +15372,7 @@ class FHNumericFieldComponent {
|
|
|
15345
15372
|
}
|
|
15346
15373
|
}
|
|
15347
15374
|
modelch() {
|
|
15375
|
+
this.typingPending = true;
|
|
15348
15376
|
setTimeout(() => {
|
|
15349
15377
|
this.modelChangeSubject.next(this.formattedAmount);
|
|
15350
15378
|
});
|
|
@@ -15381,11 +15409,13 @@ class FHNumericFieldComponent {
|
|
|
15381
15409
|
this.transform(this.value, this.decimal) + this.suffixSymbol;
|
|
15382
15410
|
}
|
|
15383
15411
|
this.chgf = true;
|
|
15412
|
+
this.typingPending = false;
|
|
15384
15413
|
this.onChange(this.value);
|
|
15385
15414
|
}
|
|
15386
15415
|
writeValue(value) {
|
|
15387
15416
|
if (value == null)
|
|
15388
15417
|
value = 0.0;
|
|
15418
|
+
this.typingPending = false;
|
|
15389
15419
|
this.innerValue = value;
|
|
15390
15420
|
this.value = value;
|
|
15391
15421
|
this.formattedAmount =
|