@fluxhub/fluxhub-lib 19.0.245 → 19.0.247

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.
@@ -9416,9 +9416,15 @@ class FHGridComponent {
9416
9416
  return;
9417
9417
  setTimeout(() => {
9418
9418
  //get columns size
9419
+ // se nel frattempo si e' lasciata la pagina la griglia e' gia' distrutta:
9420
+ // getColumnState() torna undefined
9419
9421
  let go = this.gridApi;
9420
- if (go.getColumnState()[0].width < 24) {
9422
+ if (!go || go.isDestroyed?.())
9423
+ return;
9424
+ if (go.getColumnState()?.[0]?.width < 24) {
9421
9425
  setTimeout(() => {
9426
+ if (this.gridApi?.isDestroyed?.())
9427
+ return;
9422
9428
  this.autoSizeAll();
9423
9429
  }, 1000);
9424
9430
  }
@@ -10223,6 +10229,9 @@ class FHGridComponent {
10223
10229
  * (pulsante in toolbar): in quel caso la grid è per definizione a video, quindi
10224
10230
  * si salta l'euristica di visibilità e non si rimanda mai. */
10225
10231
  autoSizeAll(force = false) {
10232
+ // richiamata anche da setTimeout: la griglia puo' essere gia' distrutta
10233
+ if (!this.gridApi || this.gridApi.isDestroyed?.())
10234
+ return;
10226
10235
  if (this.gridOptions == null)
10227
10236
  return;
10228
10237
  if (this.gridApi == null)
@@ -10252,6 +10261,9 @@ class FHGridComponent {
10252
10261
  this.save_cfg();
10253
10262
  }
10254
10263
  fitSizeAll() {
10264
+ // richiamata anche da setTimeout: la griglia puo' essere gia' distrutta
10265
+ if (!this.gridApi || this.gridApi.isDestroyed?.())
10266
+ return;
10255
10267
  console.log('fitSizeAll called');
10256
10268
  if (this.gridApi)
10257
10269
  this.gridApi.sizeColumnsToFit();
@@ -18208,7 +18220,17 @@ class FHUploadPanelComponent {
18208
18220
  return;
18209
18221
  if (o.response == null)
18210
18222
  return;
18211
- let obj_r = JSON.parse(o.response);
18223
+ // FHUpload passa il body di HttpClient, gia' deserializzato: il JSON.parse resta solo
18224
+ // per chi emette ancora la risposta come stringa.
18225
+ let obj_r = o.response;
18226
+ if (typeof obj_r === 'string') {
18227
+ try {
18228
+ obj_r = JSON.parse(obj_r);
18229
+ }
18230
+ catch {
18231
+ return;
18232
+ }
18233
+ }
18212
18234
  if (obj_r != null)
18213
18235
  if (obj_r.msg != null)
18214
18236
  if (obj_r.msg != '') {
@@ -24399,6 +24421,9 @@ class FHWinGridSelection {
24399
24421
  }, 100);
24400
24422
  }
24401
24423
  autoSizeAll() {
24424
+ // richiamata anche da setTimeout: la griglia puo' essere gia' distrutta
24425
+ if (!this.gridApi || this.gridApi.isDestroyed?.())
24426
+ return;
24402
24427
  if (this.gridOptions == null)
24403
24428
  return;
24404
24429
  if (this.gridApi == null)
@@ -24417,6 +24442,9 @@ class FHWinGridSelection {
24417
24442
  }
24418
24443
  }
24419
24444
  fitSizeAll() {
24445
+ // richiamata anche da setTimeout: la griglia puo' essere gia' distrutta
24446
+ if (!this.gridApi || this.gridApi.isDestroyed?.())
24447
+ return;
24420
24448
  if (this.gridApi)
24421
24449
  this.gridApi.sizeColumnsToFit();
24422
24450
  }