@fluxhub/fluxhub-lib 18.0.50 → 18.0.52

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.
@@ -9680,9 +9680,18 @@ class FHGridComponent {
9680
9680
  if (p.filter != '' && (b_init || this.include_always == ''))
9681
9681
  p.filter += ' and ';
9682
9682
  p.filter += ' (';
9683
- p.filter += this.calcola_filtro(params.request.filterModel[key].condition1, '', key, false);
9684
- p.filter += ' ' + obj_filtro_test.operator + ' ';
9685
- p.filter += this.calcola_filtro(params.request.filterModel[key].condition2, '', key, false);
9683
+ // ag-grid >= 29 manda "conditions", le versioni precedenti condition1/condition2
9684
+ const conds = (obj_filtro_test.conditions ?? [
9685
+ obj_filtro_test.condition1,
9686
+ obj_filtro_test.condition2,
9687
+ ]).filter((c) => c != null);
9688
+ const flt_conds = conds
9689
+ .map((c) => this.calcola_filtro(c, '', key, false))
9690
+ .filter((s) => s.trim() != '');
9691
+ p.filter +=
9692
+ flt_conds.length > 0
9693
+ ? flt_conds.join(' ' + obj_filtro_test.operator + ' ')
9694
+ : '1=1';
9686
9695
  p.filter += ')';
9687
9696
  }
9688
9697
  b_init = true;
@@ -27351,9 +27360,18 @@ class FHGridInternalComponent {
27351
27360
  if (p.filter != '' && (b_init || this.include_always == ''))
27352
27361
  p.filter += ' and ';
27353
27362
  p.filter += ' (';
27354
- p.filter += this.calcola_filtro(params.request.filterModel[key].condition1, '', key, false);
27355
- p.filter += ' ' + obj_filtro_test.operator + ' ';
27356
- p.filter += this.calcola_filtro(params.request.filterModel[key].condition2, '', key, false);
27363
+ // ag-grid >= 29 manda "conditions", le versioni precedenti condition1/condition2
27364
+ const conds = (obj_filtro_test.conditions ?? [
27365
+ obj_filtro_test.condition1,
27366
+ obj_filtro_test.condition2,
27367
+ ]).filter((c) => c != null);
27368
+ const flt_conds = conds
27369
+ .map((c) => this.calcola_filtro(c, '', key, false))
27370
+ .filter((s) => s.trim() != '');
27371
+ p.filter +=
27372
+ flt_conds.length > 0
27373
+ ? flt_conds.join(' ' + obj_filtro_test.operator + ' ')
27374
+ : '1=1';
27357
27375
  p.filter += ')';
27358
27376
  }
27359
27377
  b_init = true;
@@ -41323,7 +41341,7 @@ class dati_aggiuntivi {
41323
41341
  c_canale = "";
41324
41342
  open_info() {
41325
41343
  this.s_uto = '';
41326
- let aut = this.m_obj.autori.split(",");
41344
+ let aut = (this.m_obj.autori ?? "").split(",");
41327
41345
  for (let i = 0; i < aut.length; i++)
41328
41346
  for (let y = 0; y < this.livs.length; y++)
41329
41347
  if (this.livs[y].idp == aut[i]) {
@@ -41757,7 +41775,7 @@ class dati_aggiuntivi {
41757
41775
  }
41758
41776
  this.r_count();
41759
41777
  this.s_uto = '';
41760
- let aut = this.m_obj.autori.split(",");
41778
+ let aut = (this.m_obj.autori ?? "").split(",");
41761
41779
  for (let i = 0; i < aut.length; i++)
41762
41780
  for (let y = 0; y < this.livs.length; y++)
41763
41781
  if (this.livs[y].idp == aut[i]) {
@@ -44689,7 +44707,7 @@ class dati_aggiuntivi_v2 {
44689
44707
  }
44690
44708
  open_info() {
44691
44709
  this.s_uto = '';
44692
- let aut = this.m_obj.autori.split(',');
44710
+ let aut = (this.m_obj.autori ?? '').split(',');
44693
44711
  for (let i = 0; i < aut.length; i++)
44694
44712
  for (let y = 0; y < this.livs.length; y++)
44695
44713
  if (this.livs[y].idp == aut[i]) {