@fluxhub/fluxhub-lib 21.0.4 → 21.0.6

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 = '';
@@ -9571,12 +9630,14 @@ class FHGridComponent {
9571
9630
  this.check_end(type == 'pdf' ? '.pdf' : '.xlsx');
9572
9631
  });
9573
9632
  }
9574
- check_end(format) {
9633
+ // uiid e finestra dell'export che ha avviato il controllo: con un secondo export
9634
+ // partito nel frattempo (doppio clic) this.uiid_stampa/dialogRef_W sono gia' dell'altro
9635
+ check_end(format, uiid = this.uiid_stampa, dialogRef = this.dialogRef_W) {
9575
9636
  let p = new FSInput();
9576
9637
  p.p1 =
9577
9638
  this.m_appService.LOCAL_PATH +
9578
9639
  'grid_reports\\' +
9579
- this.uiid_stampa +
9640
+ uiid +
9580
9641
  '_' +
9581
9642
  this.m_appService.user +
9582
9643
  format;
@@ -9585,20 +9646,20 @@ class FHGridComponent {
9585
9646
  if (data != null)
9586
9647
  if (data.msg == 'N') {
9587
9648
  setTimeout(() => {
9588
- this.check_end(format);
9649
+ this.check_end(format, uiid, dialogRef);
9589
9650
  }, 1000);
9590
9651
  }
9591
9652
  else {
9592
9653
  setTimeout(() => {
9593
- this.dialogRef_W.componentInstance.update_progess(100);
9654
+ dialogRef?.componentInstance?.update_progess(100);
9594
9655
  });
9595
9656
  setTimeout(() => {
9596
9657
  this.downloadFile(this.m_appService.COMPANY_SITE_ROOT +
9597
9658
  '/grid_reports/' +
9598
- this.uiid_stampa +
9659
+ uiid +
9599
9660
  '_' +
9600
9661
  this.m_appService.user +
9601
- format, this.uiid_stampa +
9662
+ format, uiid +
9602
9663
  '_' +
9603
9664
  this.m_appService.user +
9604
9665
  format);
@@ -28172,12 +28233,14 @@ class FHGridInternalComponent {
28172
28233
  this.check_end(format);
28173
28234
  });
28174
28235
  }
28175
- check_end(format) {
28236
+ // uiid e finestra dell'export che ha avviato il controllo: con un secondo export
28237
+ // partito nel frattempo (doppio clic) this.uiid_stampa/dialogRef_W sono gia' dell'altro
28238
+ check_end(format, uiid = this.uiid_stampa, dialogRef = this.dialogRef_W) {
28176
28239
  let p = new FSInput();
28177
28240
  p.p1 =
28178
28241
  this.m_appService.LOCAL_PATH +
28179
28242
  'grid_reports\\' +
28180
- this.uiid_stampa +
28243
+ uiid +
28181
28244
  '_' +
28182
28245
  this.m_appService.user +
28183
28246
  format;
@@ -28186,20 +28249,20 @@ class FHGridInternalComponent {
28186
28249
  if (data != null)
28187
28250
  if (data.msg == 'N') {
28188
28251
  setTimeout(() => {
28189
- this.check_end(format);
28252
+ this.check_end(format, uiid, dialogRef);
28190
28253
  }, 5000);
28191
28254
  }
28192
28255
  else {
28193
28256
  setTimeout(() => {
28194
- this.dialogRef_W.componentInstance.update_progess(100);
28257
+ dialogRef?.componentInstance?.update_progess(100);
28195
28258
  });
28196
28259
  setTimeout(() => {
28197
28260
  this.downloadFile(this.m_appService.COMPANY_SITE_ROOT +
28198
28261
  '/grid_reports/' +
28199
- this.uiid_stampa +
28262
+ uiid +
28200
28263
  '_' +
28201
28264
  this.m_appService.user +
28202
- format, this.uiid_stampa +
28265
+ format, uiid +
28203
28266
  '_' +
28204
28267
  this.m_appService.user +
28205
28268
  format);
@@ -36444,5 +36507,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
36444
36507
  * Generated bundle index. Do not edit.
36445
36508
  */
36446
36509
 
36447
- 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 };
36448
36511
  //# sourceMappingURL=fluxhub-fluxhub-lib.mjs.map