@fluxhub/fluxhub-lib 21.0.5 → 21.0.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.
@@ -170,6 +170,65 @@ function fhHandledError() {
170
170
  function fhIsHandled(err) {
171
171
  return !!err?.fhHandled;
172
172
  }
173
+ /**
174
+ * Impostazioni comuni per Sentry.init dei portali (Rustrak): rumore da scartare e pulizia
175
+ * dei breadcrumb. Unica fonte per tutti i portali: una voce nuova si aggiunge qui e arriva
176
+ * a tutti con l'aggiornamento della libreria. Uso nel monitoring.ts del portale:
177
+ * Sentry.init({ dsn, release, ..., ...FH_MONITORING_DEFAULTS })
178
+ * Tipi volutamente generici: la libreria non dipende dall'SDK di Sentry.
179
+ * Rumore individuato analizzando le issue di tutti i portali il 21/10/2026.
180
+ */
181
+ const FH_MONITORING_IGNORE_ERRORS = [
182
+ 'ResizeObserver loop',
183
+ 'NG0100',
184
+ // sessione scaduta: l'interceptor fa logout e rilancia l'errore alle richieste in coda
185
+ 'Refresh token non valido',
186
+ 'SESSIONE SCADUTA',
187
+ // file JS della versione precedente spariti dopo una pubblicazione
188
+ 'ChunkLoadError',
189
+ /Loading chunk [\w-]+ failed/,
190
+ 'Failed to fetch dynamically imported module',
191
+ 'Importing a module script failed',
192
+ // copia di un 5xx che la libreria ha gia' segnalato come "HTTP 5xx /endpoint CHIAVE"
193
+ /^Server returned code \d+ with body/,
194
+ ];
195
+ /** Scarta un evento gia' segnalato o non azionabile; raggruppa i backend non raggiungibili. */
196
+ function fhMonitoringBeforeSend(event, hint) {
197
+ const ex = hint?.originalException;
198
+ // KO dei servizi dati rilanciato dopo essere stato mostrato e segnalato
199
+ if (fhIsHandled(ex))
200
+ return null;
201
+ // chiamata HTTP senza gestore d'errore arrivata all'ErrorHandler: 0 = rete assente o
202
+ // richiesta interrotta dal cambio pagina, 401 = sessione scaduta (li scarta anche fhHttpErrorReport)
203
+ if (ex instanceof HttpErrorResponse && (ex.status === 0 || ex.status === 401))
204
+ return null;
205
+ // backend giu' o in riavvio: una issue per portale e status, non una per chiave di query
206
+ const msg = String(event?.message || event?.exception?.values?.[0]?.value || '');
207
+ const gw = /^HTTP (502|503|504) /.exec(msg);
208
+ if (gw && event)
209
+ event.fingerprint = ['fh-gateway', gw[1]];
210
+ return event;
211
+ }
212
+ /**
213
+ * Breadcrumb: i console.log dei portali stampano record interi (anche utenti con password),
214
+ * quindi dei log di console restano solo warning ed errori, senza argomenti; via anche il
215
+ * banner di licenza di AG Grid, che riempie la coda.
216
+ */
217
+ function fhMonitoringBeforeBreadcrumb(b) {
218
+ if (!b || b.category !== 'console')
219
+ return b;
220
+ if (b.level !== 'warning' && b.level !== 'error')
221
+ return null;
222
+ if (/AG Grid/i.test(String(b.message || '')) && /licen/i.test(String(b.message || '')))
223
+ return null;
224
+ delete b.data;
225
+ return b;
226
+ }
227
+ const FH_MONITORING_DEFAULTS = {
228
+ ignoreErrors: FH_MONITORING_IGNORE_ERRORS,
229
+ beforeSend: fhMonitoringBeforeSend,
230
+ beforeBreadcrumb: fhMonitoringBeforeBreadcrumb,
231
+ };
173
232
 
174
233
  class QGResult {
175
234
  result_msg = '';
@@ -4636,7 +4695,7 @@ class FHUploadComponent {
4636
4695
  if (event.type === HttpEventType.UploadProgress && event.total) {
4637
4696
  const progress = Math.round(100 * event.loaded / event.total);
4638
4697
  if (this.dialogRef?.componentInstance) {
4639
- this.dialogRef.componentInstance.update_progess(progress);
4698
+ this.dialogRef?.componentInstance?.update_progess(progress);
4640
4699
  }
4641
4700
  }
4642
4701
  else if (event.type === HttpEventType.Response) {
@@ -4653,7 +4712,7 @@ class FHUploadComponent {
4653
4712
  this.descrizione = '';
4654
4713
  this.ref_allegato();
4655
4714
  if (this.dialogRef?.componentInstance) {
4656
- this.dialogRef.componentInstance.update_progess(100);
4715
+ this.dialogRef?.componentInstance?.update_progess(100);
4657
4716
  this.dialogRef = null;
4658
4717
  }
4659
4718
  }
@@ -9011,7 +9070,7 @@ class FileService {
9011
9070
  setTimeout(() => {
9012
9071
  if (dialogRef_W != null)
9013
9072
  if (dialogRef_W.componentInstance != null)
9014
- dialogRef_W.componentInstance.update_progess(this.eprog);
9073
+ dialogRef_W?.componentInstance?.update_progess(this.eprog);
9015
9074
  });
9016
9075
  setTimeout(() => {
9017
9076
  this.progress_update(dialogRef_W);
@@ -18803,7 +18862,7 @@ class FHUploadS3Component {
18803
18862
  this.upload_ended.emit(this.last_result);
18804
18863
  if (this.dialogRef != null)
18805
18864
  if (this.dialogRef.componentInstance != null) {
18806
- this.dialogRef.componentInstance.update_progess(100);
18865
+ this.dialogRef?.componentInstance?.update_progess(100);
18807
18866
  this.dialogRef = null;
18808
18867
  }
18809
18868
  };
@@ -18817,7 +18876,7 @@ class FHUploadS3Component {
18817
18876
  this.loading = true;
18818
18877
  if (this.dialogRef != null)
18819
18878
  if (this.dialogRef.componentInstance != null)
18820
- this.dialogRef.componentInstance.update_progess(progress);
18879
+ this.dialogRef?.componentInstance?.update_progess(progress);
18821
18880
  };
18822
18881
  this.uploader.onWhenAddingFileFailed = (item, filter, options) => {
18823
18882
  switch (filter.name) {
@@ -26409,7 +26468,7 @@ class OfficeAutomatorService {
26409
26468
  setTimeout(() => {
26410
26469
  if (dialogRef_W != null)
26411
26470
  if (dialogRef_W.componentInstance != null)
26412
- dialogRef_W.componentInstance.update_progess(this.eprog);
26471
+ dialogRef_W?.componentInstance?.update_progess(this.eprog);
26413
26472
  });
26414
26473
  setTimeout(() => {
26415
26474
  this.progress_update(dialogRef_W);
@@ -34192,7 +34251,7 @@ class FHWorkflowForm {
34192
34251
  this.chstato(trans.step_d);
34193
34252
  if (this.dialogRef_ww != null)
34194
34253
  if (this.dialogRef_ww.componentInstance != null)
34195
- this.dialogRef_ww.componentInstance.update_progess(100);
34254
+ this.dialogRef_ww?.componentInstance?.update_progess(100);
34196
34255
  this.goto_edit_doc();
34197
34256
  });
34198
34257
  });
@@ -34203,7 +34262,7 @@ class FHWorkflowForm {
34203
34262
  this.ttw += 10;
34204
34263
  if (this.dialogRef_ww != null)
34205
34264
  if (this.dialogRef_ww.componentInstance != null)
34206
- this.dialogRef_ww.componentInstance.update_progess(this.ttw);
34265
+ this.dialogRef_ww?.componentInstance?.update_progess(this.ttw);
34207
34266
  setTimeout(() => {
34208
34267
  this.reset_updw();
34209
34268
  }, 800);
@@ -36448,5 +36507,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
36448
36507
  * Generated bundle index. Do not edit.
36449
36508
  */
36450
36509
 
36451
- export { AppMakerService, AppService, ApprovaGridComponent, AuthHttpRequestInterceptor, AuthenticationService, CheckboxEditorComponent, ComboBoxEditorComponent, CurrencyComponent, FHAutoCompleteComponent, FHCheckBoxComponent, FHColorPickerComponent, FHComboboxComponent, FHConfirmValues, FHCurrencyFormatterDirective, FHCurrencyPipe, FHDatePickerComponent, FHDateRangePickerComponent, FHFieldPickListComponent, FHFilterComboboxComponent, FHFormBuilderComponent, FHFormExecuterComponent, FHFormToolBarComponent, FHGridComponent, FHGridJSONComponent, FHGridToolBarComponent, FHGuard, FHHelpButtonComponent, FHImageViewerComponent, FHListComponent, FHLogPanelComponent, FHMultiComboboxComponent, FHNotesPanelComponent, FHNumericFieldComponent, FHPickFieldComponent, FHPickUsersComponent, FHRichTextComponent, FHRoleManagerComponent, FHTableManagerComponent, FHTextAreaComponent, FHTextInputComponent, FHTimePickerComponent, FHUploadComponent, FHUploadPanelComponent, FHUploadPanelS3Component, FHUploadS3Component, FHUserFieldComponent, FHWinAppLogsComponent, FHWinAskBigTextComponent, FHWinAskButtonsComponent, FHWinAskNumberComponent, FHWinAskRichTextComponent, FHWinAskTextComponent, FHWinAutoComplete, FHWinComboComponent, FHWinConfirmComponent, FHWinErrorComponent, FHWinGridSelection, FHWinInfoComponent, FHWinListComponent, FHWinMappaComponent, FHWinOutputComponent, FHWinPicklistComponent, FHWinSalvaAnnulla, FHWinSelectByGridComponent, FHWinShowEmail, FHWinShowEmailS3, FHWinShowImage, FHWinShowLog, FHWinShowLogDett, FHWinTimeSlider, FHWinUploadComponent, FHWinUserInfo, FHWinUserPickerComponent, FHWinWaitComponent, FHWorkflowForm, FHWorkflowHeaderBar, FHWorkflowView, FH_ERROR_REPORTER, FH_EVENT_ID_HEADER, FH_ROUTE_HEADER, FSInput, FSResult, FileService, GridService, LocalDBService, MonthYearPickerComponent, NumericEditorComponent, OdbcService, OfficeAutomatorService, OfficeOperation, OfficeResult, QGParam, QGResult, QParam, QResult, QueryOpenService, QueryService, RegistrationService, ReplaceLineBreaks, SafePipe, TextAreaEditorComponent, UtilityService, WkfService, YearPickerComponent, fhHandledError, fhIsHandled };
36510
+ export { AppMakerService, AppService, ApprovaGridComponent, AuthHttpRequestInterceptor, AuthenticationService, CheckboxEditorComponent, ComboBoxEditorComponent, CurrencyComponent, FHAutoCompleteComponent, FHCheckBoxComponent, FHColorPickerComponent, FHComboboxComponent, FHConfirmValues, FHCurrencyFormatterDirective, FHCurrencyPipe, FHDatePickerComponent, FHDateRangePickerComponent, FHFieldPickListComponent, FHFilterComboboxComponent, FHFormBuilderComponent, FHFormExecuterComponent, FHFormToolBarComponent, FHGridComponent, FHGridJSONComponent, FHGridToolBarComponent, FHGuard, FHHelpButtonComponent, FHImageViewerComponent, FHListComponent, FHLogPanelComponent, FHMultiComboboxComponent, FHNotesPanelComponent, FHNumericFieldComponent, FHPickFieldComponent, FHPickUsersComponent, FHRichTextComponent, FHRoleManagerComponent, FHTableManagerComponent, FHTextAreaComponent, FHTextInputComponent, FHTimePickerComponent, FHUploadComponent, FHUploadPanelComponent, FHUploadPanelS3Component, FHUploadS3Component, FHUserFieldComponent, FHWinAppLogsComponent, FHWinAskBigTextComponent, FHWinAskButtonsComponent, FHWinAskNumberComponent, FHWinAskRichTextComponent, FHWinAskTextComponent, FHWinAutoComplete, FHWinComboComponent, FHWinConfirmComponent, FHWinErrorComponent, FHWinGridSelection, FHWinInfoComponent, FHWinListComponent, FHWinMappaComponent, FHWinOutputComponent, FHWinPicklistComponent, FHWinSalvaAnnulla, FHWinSelectByGridComponent, FHWinShowEmail, FHWinShowEmailS3, FHWinShowImage, FHWinShowLog, FHWinShowLogDett, FHWinTimeSlider, FHWinUploadComponent, FHWinUserInfo, FHWinUserPickerComponent, FHWinWaitComponent, FHWorkflowForm, FHWorkflowHeaderBar, FHWorkflowView, FH_ERROR_REPORTER, FH_EVENT_ID_HEADER, FH_MONITORING_DEFAULTS, FH_MONITORING_IGNORE_ERRORS, FH_ROUTE_HEADER, FSInput, FSResult, FileService, GridService, LocalDBService, MonthYearPickerComponent, NumericEditorComponent, OdbcService, OfficeAutomatorService, OfficeOperation, OfficeResult, QGParam, QGResult, QParam, QResult, QueryOpenService, QueryService, RegistrationService, ReplaceLineBreaks, SafePipe, TextAreaEditorComponent, UtilityService, WkfService, YearPickerComponent, fhHandledError, fhIsHandled, fhMonitoringBeforeBreadcrumb, fhMonitoringBeforeSend };
36452
36511
  //# sourceMappingURL=fluxhub-fluxhub-lib.mjs.map