@fluxhub/fluxhub-lib 10.0.511 → 10.0.513

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.
@@ -5373,8 +5373,10 @@
5373
5373
  this.clipboard = clipboard;
5374
5374
  this.width_max = '100%';
5375
5375
  this.browser = 'nd';
5376
- this.exec_ft = new i0.EventEmitter();
5377
5376
  this.over_fulltext = false;
5377
+ this.over_fulltext_types = [];
5378
+ this.over_fulltext_values = [];
5379
+ this.over_fulltext_sql = '';
5378
5380
  this.tooltipShowDelay = 2000;
5379
5381
  this.elimina_label = 'ELIMINA';
5380
5382
  this.export_field_aggiuntivi = '';
@@ -5532,79 +5534,162 @@
5532
5534
  if (p.sort_field != "")
5533
5535
  _this.str_curr_q_p = _this.str_curr_q_p + " order by " + p.sort_field;
5534
5536
  _this.curr_filter = p.filter;
5535
- _this._gridservice.doQuery(p, true, _this.end_point).subscribe(function (data) {
5536
- var ok_op = false;
5537
- if (data != null)
5538
- if (data.result_msg == "OK") {
5539
- ok_op = true;
5540
- // console.log(data.result_data);
5541
- params.successCallback(data.result_data, data.count);
5542
- _this.b_init = true;
5543
- _this.myData = data.result_data.slice();
5544
- _this.num_r = data.count;
5545
- _this.slimLoadingBarService.complete();
5546
- _this.fill_end.emit();
5547
- // console.log("end");
5548
- // console.log(localStorage.getItem(this.grid_key+'_POS'));
5549
- localStorage.setItem(_this.grid_key + "_POS1", JSON.stringify(p));
5550
- if (localStorage.getItem(_this.grid_key + "_POS2") != null)
5551
- if (_this.gridOptions != null)
5552
- if (_this.gridOptions.api != null)
5553
- _this.gridOptions.api.forEachNode(function (node) {
5554
- // console.log(node)
5555
- if (_this.getRowNodeId(node) ===
5556
- localStorage.getItem(_this.grid_key + "_POS2")) {
5557
- node.setSelected(true);
5558
- localStorage.removeItem(_this.grid_key + "_POS2");
5559
- if (localStorage.getItem(_this.grid_key + "_LAST_ROW") != null)
5560
- _this.sRow = JSON.parse(localStorage.getItem(_this.grid_key + "_LAST_ROW"));
5561
- localStorage.removeItem(_this.grid_key + "_LAST_ROW");
5562
- }
5563
- });
5564
- var b_mantieni_ck = false;
5565
- if (_this.toggle_mantieni != null)
5566
- b_mantieni_ck = _this.toggle_mantieni.checked;
5567
- if (_this.no_pref && !_this.b_init1) {
5568
- _this.autoSizeAll();
5537
+ if (_this.ric_libera == '' || !_this.over_fulltext) {
5538
+ _this._gridservice.doQuery(p, true, _this.end_point).subscribe(function (data) {
5539
+ var ok_op = false;
5540
+ if (data != null)
5541
+ if (data.result_msg == "OK") {
5542
+ ok_op = true;
5543
+ // console.log(data.result_data);
5544
+ params.successCallback(data.result_data, data.count);
5545
+ _this.b_init = true;
5546
+ _this.myData = data.result_data.slice();
5547
+ _this.num_r = data.count;
5548
+ _this.slimLoadingBarService.complete();
5549
+ _this.fill_end.emit();
5550
+ // console.log("end");
5551
+ // console.log(localStorage.getItem(this.grid_key+'_POS'));
5552
+ localStorage.setItem(_this.grid_key + "_POS1", JSON.stringify(p));
5553
+ if (localStorage.getItem(_this.grid_key + "_POS2") != null)
5554
+ if (_this.gridOptions != null)
5555
+ if (_this.gridOptions.api != null)
5556
+ _this.gridOptions.api.forEachNode(function (node) {
5557
+ // console.log(node)
5558
+ if (_this.getRowNodeId(node) ===
5559
+ localStorage.getItem(_this.grid_key + "_POS2")) {
5560
+ node.setSelected(true);
5561
+ localStorage.removeItem(_this.grid_key + "_POS2");
5562
+ if (localStorage.getItem(_this.grid_key + "_LAST_ROW") != null)
5563
+ _this.sRow = JSON.parse(localStorage.getItem(_this.grid_key + "_LAST_ROW"));
5564
+ localStorage.removeItem(_this.grid_key + "_LAST_ROW");
5565
+ }
5566
+ });
5567
+ var b_mantieni_ck = false;
5568
+ if (_this.toggle_mantieni != null)
5569
+ b_mantieni_ck = _this.toggle_mantieni.checked;
5570
+ if (_this.no_pref && !_this.b_init1) {
5571
+ _this.autoSizeAll();
5572
+ }
5573
+ _this.b_init1 = true;
5574
+ _this.ensure_visible();
5575
+ /*if (localStorage.getItem(this.grid_key + '_COLS')==null && this.first_ref) {
5576
+ setTimeout(() => {
5577
+ this.autoSizeAll();
5578
+ }, 300);
5579
+ this.first_ref = false;
5580
+
5581
+
5582
+ } else*/ if (localStorage.getItem(_this.grid_key + "_COLS") == null &&
5583
+ _this.autosize_at_ini)
5584
+ setTimeout(function () {
5585
+ _this.autoSizeAll();
5586
+ }, 300);
5587
+ //console.log('xxxxxxxxxxxxxxxxxxx');
5588
+ // console.log(this.m_appService.getState().grid_obj[this.grid_key+'_NODE'].id);
5589
+ //if(this.m_appService.getState().grid_obj[this.grid_key+'_NODE']!=null)
5590
+ /*
5591
+
5592
+ this.gridOptions.api.forEachNode( (node) =>{
5593
+ // select the node
5594
+ // console.log(node.id+' '+this.m_appService.getState().grid_obj[this.grid_key+'_NODE'].id);
5595
+ if(node.rowIndex==parseInt(localStorage.getItem(this.grid_key+'_POS'))){
5596
+ // console.log(node.id+' '+this.m_appService.getState().grid_obj[this.grid_key+'_NODE'].id);
5597
+ node.setSelected(true);
5598
+
5599
+ }}*/
5600
+ // if(this.m_appService.getState().grid_obj[this.grid_key+'_NODE']!=null)
5601
+ //this.gridOptions.api.get(parseInt(localStorage.getItem(this.grid_key+'_POS'))).setSelected(true);
5602
+ // console.log(this.myData);
5569
5603
  }
5570
- _this.b_init1 = true;
5571
- _this.ensure_visible();
5572
- /*if (localStorage.getItem(this.grid_key + '_COLS')==null && this.first_ref) {
5573
- setTimeout(() => {
5574
- this.autoSizeAll();
5575
- }, 300);
5576
- this.first_ref = false;
5577
-
5578
-
5579
- } else*/ if (localStorage.getItem(_this.grid_key + "_COLS") == null &&
5580
- _this.autosize_at_ini)
5581
- setTimeout(function () {
5604
+ if (!ok_op) {
5605
+ _this.errorMsg = data.msg + " [" + data.result_msg + "]";
5606
+ }
5607
+ }, function (err) {
5608
+ _this.errorMsg =
5609
+ "ERRORE DI CONNESSIONE CON IL SERVER. RITENTARE PIU' TARDI";
5610
+ });
5611
+ }
5612
+ else {
5613
+ var px = new QParam();
5614
+ px.sql = _this.over_fulltext_sql;
5615
+ px.types = ['string'];
5616
+ px.values = [_this.ric_libera];
5617
+ _this.over_fulltext_types.map(function (v) { px.types.push(v); });
5618
+ _this.over_fulltext_values.map(function (v) { px.values.push(v); });
5619
+ _this._dataService.doQuery(px).subscribe(function (data) {
5620
+ var ok_op = false;
5621
+ if (data != null)
5622
+ if (data.result_msg == "OK") {
5623
+ ok_op = true;
5624
+ // console.log(data.result_data);
5625
+ params.successCallback(data.result_data, data.result_data.length);
5626
+ _this.b_init = true;
5627
+ _this.myData = data.result_data.slice();
5628
+ _this.num_r = data.result_data.length;
5629
+ _this.slimLoadingBarService.complete();
5630
+ _this.fill_end.emit();
5631
+ // console.log("end");
5632
+ // console.log(localStorage.getItem(this.grid_key+'_POS'));
5633
+ localStorage.setItem(_this.grid_key + "_POS1", JSON.stringify(p));
5634
+ if (localStorage.getItem(_this.grid_key + "_POS2") != null)
5635
+ if (_this.gridOptions != null)
5636
+ if (_this.gridOptions.api != null)
5637
+ _this.gridOptions.api.forEachNode(function (node) {
5638
+ // console.log(node)
5639
+ if (_this.getRowNodeId(node) ===
5640
+ localStorage.getItem(_this.grid_key + "_POS2")) {
5641
+ node.setSelected(true);
5642
+ localStorage.removeItem(_this.grid_key + "_POS2");
5643
+ if (localStorage.getItem(_this.grid_key + "_LAST_ROW") != null)
5644
+ _this.sRow = JSON.parse(localStorage.getItem(_this.grid_key + "_LAST_ROW"));
5645
+ localStorage.removeItem(_this.grid_key + "_LAST_ROW");
5646
+ }
5647
+ });
5648
+ var b_mantieni_ck = false;
5649
+ if (_this.toggle_mantieni != null)
5650
+ b_mantieni_ck = _this.toggle_mantieni.checked;
5651
+ if (_this.no_pref && !_this.b_init1) {
5582
5652
  _this.autoSizeAll();
5583
- }, 300);
5584
- //console.log('xxxxxxxxxxxxxxxxxxx');
5585
- // console.log(this.m_appService.getState().grid_obj[this.grid_key+'_NODE'].id);
5586
- //if(this.m_appService.getState().grid_obj[this.grid_key+'_NODE']!=null)
5587
- /*
5588
-
5589
- this.gridOptions.api.forEachNode( (node) =>{
5590
- // select the node
5591
- // console.log(node.id+' '+this.m_appService.getState().grid_obj[this.grid_key+'_NODE'].id);
5592
- if(node.rowIndex==parseInt(localStorage.getItem(this.grid_key+'_POS'))){
5593
- // console.log(node.id+' '+this.m_appService.getState().grid_obj[this.grid_key+'_NODE'].id);
5594
- node.setSelected(true);
5595
-
5596
- }}*/
5597
- // if(this.m_appService.getState().grid_obj[this.grid_key+'_NODE']!=null)
5598
- //this.gridOptions.api.get(parseInt(localStorage.getItem(this.grid_key+'_POS'))).setSelected(true);
5599
- // console.log(this.myData);
5653
+ }
5654
+ _this.b_init1 = true;
5655
+ _this.ensure_visible();
5656
+ /*if (localStorage.getItem(this.grid_key + '_COLS')==null && this.first_ref) {
5657
+ setTimeout(() => {
5658
+ this.autoSizeAll();
5659
+ }, 300);
5660
+ this.first_ref = false;
5661
+
5662
+
5663
+ } else*/ if (localStorage.getItem(_this.grid_key + "_COLS") == null &&
5664
+ _this.autosize_at_ini)
5665
+ setTimeout(function () {
5666
+ _this.autoSizeAll();
5667
+ }, 300);
5668
+ //console.log('xxxxxxxxxxxxxxxxxxx');
5669
+ // console.log(this.m_appService.getState().grid_obj[this.grid_key+'_NODE'].id);
5670
+ //if(this.m_appService.getState().grid_obj[this.grid_key+'_NODE']!=null)
5671
+ /*
5672
+
5673
+ this.gridOptions.api.forEachNode( (node) =>{
5674
+ // select the node
5675
+ // console.log(node.id+' '+this.m_appService.getState().grid_obj[this.grid_key+'_NODE'].id);
5676
+ if(node.rowIndex==parseInt(localStorage.getItem(this.grid_key+'_POS'))){
5677
+ // console.log(node.id+' '+this.m_appService.getState().grid_obj[this.grid_key+'_NODE'].id);
5678
+ node.setSelected(true);
5679
+
5680
+ }}*/
5681
+ // if(this.m_appService.getState().grid_obj[this.grid_key+'_NODE']!=null)
5682
+ //this.gridOptions.api.get(parseInt(localStorage.getItem(this.grid_key+'_POS'))).setSelected(true);
5683
+ // console.log(this.myData);
5684
+ }
5685
+ if (!ok_op) {
5686
+ _this.errorMsg = data.msg + " [" + data.result_msg + "]";
5600
5687
  }
5601
- if (!ok_op) {
5602
- _this.errorMsg = data.msg + " [" + data.result_msg + "]";
5603
- }
5604
- }, function (err) {
5605
- _this.errorMsg =
5606
- "ERRORE DI CONNESSIONE CON IL SERVER. RITENTARE PIU' TARDI";
5607
- });
5688
+ }, function (err) {
5689
+ _this.errorMsg =
5690
+ "ERRORE DI CONNESSIONE CON IL SERVER. RITENTARE PIU' TARDI";
5691
+ });
5692
+ }
5608
5693
  // this.gridOptions.api.setDatasource(this.dataSource);
5609
5694
  },
5610
5695
  };
@@ -6830,7 +6915,6 @@
6830
6915
  };
6831
6916
  FHGridComponent.prototype.free_search = function () {
6832
6917
  var _this = this;
6833
- console.log('free_search !!!! ', this.over_fulltext);
6834
6918
  if (this.ric_libera == "") {
6835
6919
  this.pulisci_filtri();
6836
6920
  this.fix_flt_temp = "";
@@ -6839,11 +6923,6 @@
6839
6923
  return;
6840
6924
  }
6841
6925
  localStorage.setItem(this.grid_key + "_FILTER_UP", this.ric_libera);
6842
- if (this.over_fulltext) {
6843
- console.log('this.over_fulltext ', this.ric_libera);
6844
- this.exec_ft.emit(this.ric_libera);
6845
- return;
6846
- }
6847
6926
  var arr = this.ric_libera.split(" ");
6848
6927
  var arr_F = new Array();
6849
6928
  for (var i = 0; i < arr.length; i++)
@@ -7073,8 +7152,10 @@
7073
7152
  { type: clipboard.Clipboard }
7074
7153
  ]; };
7075
7154
  FHGridComponent.propDecorators = {
7076
- exec_ft: [{ type: i0.Output }],
7077
7155
  over_fulltext: [{ type: i0.Input }],
7156
+ over_fulltext_types: [{ type: i0.Input }],
7157
+ over_fulltext_values: [{ type: i0.Input }],
7158
+ over_fulltext_sql: [{ type: i0.Input }],
7078
7159
  tooltipShowDelay: [{ type: i0.Input }],
7079
7160
  elimina_label: [{ type: i0.Input }],
7080
7161
  export_field_aggiuntivi: [{ type: i0.Input }],