@fluxhub/fluxhub-lib 11.0.123 → 11.0.125

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.
@@ -17405,24 +17405,24 @@
17405
17405
  this.uti_s = uti_s;
17406
17406
  this._fileService = _fileService;
17407
17407
  this.clipboard = clipboard;
17408
- this.width_max = '100%';
17409
- this.browser = 'nd';
17408
+ this.width_max = "100%";
17409
+ this.browser = "nd";
17410
17410
  this.pagination = false;
17411
17411
  this.paginationPageSize = 10;
17412
17412
  this.paginationAutoPageSize = false;
17413
17413
  this.tooltipShowDelay = 2000;
17414
- this.elimina_label = 'ELIMINA';
17415
- this.export_field_aggiuntivi = '';
17416
- this.end_point = '';
17417
- this.tbl_name = '';
17414
+ this.elimina_label = "ELIMINA";
17415
+ this.export_field_aggiuntivi = "";
17416
+ this.end_point = "";
17417
+ this.tbl_name = "";
17418
17418
  this.columnDefs = [];
17419
17419
  this.num_per_pag = 35;
17420
- this.grid_key = 'PRO_H';
17421
- this.service = 'dogridn';
17420
+ this.grid_key = "PRO_H";
17421
+ this.service = "dogridn";
17422
17422
  this.enabled = true;
17423
17423
  this.show_link = false;
17424
17424
  this.show_help_bar = false;
17425
- this.help_label_bar = 'HELP';
17425
+ this.help_label_bar = "HELP";
17426
17426
  this.auto_load = true;
17427
17427
  this.auto_height = false;
17428
17428
  this.enable_export = true;
@@ -17432,7 +17432,7 @@
17432
17432
  this.private_pref = false;
17433
17433
  this.system_dest = 1;
17434
17434
  this.header_h = 35;
17435
- this.selection_mode = 'multiple';
17435
+ this.selection_mode = "multiple";
17436
17436
  this.init_fill = true;
17437
17437
  this.no_pref = false;
17438
17438
  this.pref_hidden = true;
@@ -17441,13 +17441,13 @@
17441
17441
  this.enable_copy = true;
17442
17442
  this.full_text_added_columns = [];
17443
17443
  this.autosize_at_ini = true;
17444
- this.label_elementi = ' Elementi';
17445
- this.trova_label = 'TROVA';
17446
- this.mantieni_impostazioni = 'Mantieni Imp.';
17444
+ this.label_elementi = " Elementi";
17445
+ this.trova_label = "TROVA";
17446
+ this.mantieni_impostazioni = "Mantieni Imp.";
17447
17447
  this.row_height = 25;
17448
17448
  this.master_detail = false;
17449
17449
  this.detail_cell_renderer = null;
17450
- this.curr_filter = '';
17450
+ this.curr_filter = "";
17451
17451
  this.show_buttons = true;
17452
17452
  this.fill_end = new i0.EventEmitter();
17453
17453
  this.cell_edited = new i0.EventEmitter();
@@ -17456,14 +17456,14 @@
17456
17456
  this.columndclicked = new i0.EventEmitter();
17457
17457
  this.cell_clicked = new i0.EventEmitter();
17458
17458
  this.custom_export = false;
17459
- this.toolbar_type = 'NONE';
17459
+ this.toolbar_type = "NONE";
17460
17460
  this.toolbar_custom_commands = [];
17461
17461
  this.exec_params = [];
17462
17462
  this.command = new i0.EventEmitter();
17463
17463
  this.b_ensure = false;
17464
17464
  this.gf = null;
17465
17465
  this.toggle_mantieni = null;
17466
- this.curr_config = '-1';
17466
+ this.curr_config = "-1";
17467
17467
  this.win_opt = null;
17468
17468
  /* calcola_filtro(obj_filtro, filter_v, key, add_end = true) {
17469
17469
  console.log('calcola_filtro ',key,add_end);
@@ -17717,7 +17717,7 @@
17717
17717
  this.off_set = 0;
17718
17718
  this.first_ref = true;
17719
17719
  this.b_restored = false;
17720
- this.str_curr_q_p = '';
17720
+ this.str_curr_q_p = "";
17721
17721
  this.p_fi = {};
17722
17722
  this.dataSource = {
17723
17723
  //rowCount: ???, - not setting the row count, infinite paging will be used
@@ -17731,38 +17731,39 @@
17731
17731
  _this.m_appService.start();
17732
17732
  var p = { kd: _this.tbl_name };
17733
17733
  p.num_per_pag = params.request.endRow - params.request.startRow;
17734
- p.fix_flt = (_this.fix_flt || '');
17734
+ p.fix_flt = _this.fix_flt || "";
17735
17735
  p.curr_page = Math.round(params.request.startRow / p.num_per_pag);
17736
17736
  if (p.curr_page == null)
17737
17737
  p.curr_page = 0;
17738
17738
  if (p.num_per_pag == null)
17739
17739
  p.num_per_pag = _this.num_per_pag;
17740
17740
  p.system_dest = _this.system_dest;
17741
- p.exec_params = (_this.exec_params || []);
17741
+ p.exec_params = _this.exec_params || [];
17742
17742
  p.p = JSON.stringify({
17743
17743
  sort_model: params.request.sortModel,
17744
17744
  filter_model: params.request.filterModel,
17745
17745
  free_search: _this.ric_libera,
17746
- fix_flt: (_this.fix_flt || '')
17746
+ fix_flt: _this.fix_flt || "",
17747
17747
  });
17748
17748
  if ((params.request.filterModel == null ||
17749
- JSON.stringify(params.request.filterModel) == '{}') &&
17750
- (_this.ric_libera == null || _this.ric_libera == ''))
17749
+ JSON.stringify(params.request.filterModel) == "{}") &&
17750
+ (_this.ric_libera == null || _this.ric_libera == ""))
17751
17751
  _this.show_pulisci_filtri = false;
17752
17752
  else
17753
17753
  _this.show_pulisci_filtri = true;
17754
17754
  _this.p_fi = {
17755
17755
  kd: p.kd,
17756
- system_dest: p.system_dest, exec_params: (_this.exec_params || []),
17756
+ system_dest: p.system_dest,
17757
+ exec_params: _this.exec_params || [],
17757
17758
  p: p.p,
17758
- fix_flt: (_this.fix_flt || '')
17759
+ fix_flt: _this.fix_flt || "",
17759
17760
  };
17760
17761
  _this._gridservice
17761
17762
  .doQuery(p, true, _this.m_appService.API_ENDPOINT + _this.service)
17762
17763
  .subscribe(function (data) {
17763
17764
  var ok_op = false;
17764
17765
  if (data != null)
17765
- if (data.result_msg == 'OK') {
17766
+ if (data.result_msg == "OK") {
17766
17767
  ok_op = true;
17767
17768
  // console.log(data.result_data, data.count);
17768
17769
  params.successCallback(data.result_data, data.count);
@@ -17774,29 +17775,28 @@
17774
17775
  _this.check_width();
17775
17776
  // console.log("end");
17776
17777
  // console.log(localStorage.getItem(this.grid_key+'_POS'));
17777
- localStorage.setItem(_this.grid_key + '_POS1', JSON.stringify(p));
17778
- if (localStorage.getItem(_this.grid_key + '_POS2') != null)
17778
+ localStorage.setItem(_this.grid_key + "_POS1", JSON.stringify(p));
17779
+ if (localStorage.getItem(_this.grid_key + "_POS2") != null)
17779
17780
  if (_this.gridOptions != null)
17780
17781
  if (_this.gridOptions.api != null)
17781
17782
  _this.gridOptions.api.forEachNode(function (node) {
17782
17783
  // console.log(node)
17783
17784
  if (_this.getRowNodeId(node) ===
17784
- localStorage.getItem(_this.grid_key + '_POS2')) {
17785
+ localStorage.getItem(_this.grid_key + "_POS2")) {
17785
17786
  node.setSelected(true);
17786
- localStorage.removeItem(_this.grid_key + '_POS2');
17787
- if (localStorage.getItem(_this.grid_key + '_LAST_ROW') !=
17787
+ localStorage.removeItem(_this.grid_key + "_POS2");
17788
+ if (localStorage.getItem(_this.grid_key + "_LAST_ROW") !=
17788
17789
  null)
17789
- _this.sRow = JSON.parse(localStorage.getItem(_this.grid_key + '_LAST_ROW') || '{}');
17790
+ _this.sRow = JSON.parse(localStorage.getItem(_this.grid_key + "_LAST_ROW") || "{}");
17790
17791
  else
17791
17792
  _this.sRow = null;
17792
- localStorage.removeItem(_this.grid_key + '_LAST_ROW');
17793
+ localStorage.removeItem(_this.grid_key + "_LAST_ROW");
17793
17794
  }
17794
17795
  });
17795
17796
  var b_mantieni_ck = false;
17796
17797
  if (_this.toggle_mantieni != null)
17797
17798
  b_mantieni_ck = _this.toggle_mantieni.checked;
17798
- if (_this.no_pref && !_this.b_init1 &&
17799
- _this.autosize_at_ini) {
17799
+ if (_this.no_pref && !_this.b_init1 && _this.autosize_at_ini) {
17800
17800
  _this.autoSizeAll();
17801
17801
  }
17802
17802
  _this.b_init1 = true;
@@ -17808,7 +17808,7 @@
17808
17808
  this.first_ref = false;
17809
17809
 
17810
17810
 
17811
- } else*/ if (localStorage.getItem(_this.grid_key + '_COLS') == null &&
17811
+ } else*/ if (localStorage.getItem(_this.grid_key + "_COLS") == null &&
17812
17812
  _this.autosize_at_ini)
17813
17813
  setTimeout(function () {
17814
17814
  _this.autoSizeAll();
@@ -17831,7 +17831,7 @@
17831
17831
  // console.log(this.myData);
17832
17832
  }
17833
17833
  if (!ok_op) {
17834
- _this.errorMsg = data.msg + ' [' + data.result_msg + ']';
17834
+ _this.errorMsg = data.msg + " [" + data.result_msg + "]";
17835
17835
  }
17836
17836
  }, function (err) {
17837
17837
  _this.errorMsg =
@@ -17841,23 +17841,23 @@
17841
17841
  },
17842
17842
  };
17843
17843
  this.getContextMenuItems_n_e = function () { return [
17844
- 'autoSizeAll',
17845
- 'expandAll',
17846
- 'contractAll',
17847
- 'copy',
17848
- 'copyWithHeaders',
17849
- 'paste',
17844
+ "autoSizeAll",
17845
+ "expandAll",
17846
+ "contractAll",
17847
+ "copy",
17848
+ "copyWithHeaders",
17849
+ "paste",
17850
17850
  ]; };
17851
17851
  this.getContextMenuItems_e = function () { return [
17852
- 'autoSizeAll',
17853
- 'expandAll',
17854
- 'contractAll',
17855
- 'copy',
17856
- 'copyWithHeaders',
17857
- 'paste',
17852
+ "autoSizeAll",
17853
+ "expandAll",
17854
+ "contractAll",
17855
+ "copy",
17856
+ "copyWithHeaders",
17857
+ "paste",
17858
17858
  // 'resetColumns',
17859
17859
  {
17860
- name: 'Esporta',
17860
+ name: "Esporta",
17861
17861
  action: function () {
17862
17862
  _this.export_excel();
17863
17863
  },
@@ -17865,49 +17865,49 @@
17865
17865
  },
17866
17866
  ]; };
17867
17867
  this.gridOptions = {};
17868
- this.last_copy = '';
17868
+ this.last_copy = "";
17869
17869
  this.showGrid = true;
17870
17870
  this.rowData = [];
17871
17871
  this.rowCount = null;
17872
17872
  this.b_init = false;
17873
17873
  this.b_init1 = false;
17874
- this.errorMsg = '';
17874
+ this.errorMsg = "";
17875
17875
  this.innerWidth = 750;
17876
17876
  this.init_opt = false;
17877
17877
  this.show_pulisci_filtri = false;
17878
- this.uiid_stampa = '';
17878
+ this.uiid_stampa = "";
17879
17879
  this.xxopx = 0;
17880
17880
  this.num_r = 0;
17881
17881
  this.ready = false;
17882
17882
  this.ckk_ed = false;
17883
17883
  this.myData = new Array();
17884
17884
  this.b_iniended = false;
17885
- this.ric_libera = '';
17886
- this.fix_flt = '';
17887
- this.fix_flt_temp = '';
17885
+ this.ric_libera = "";
17886
+ this.fix_flt = "";
17887
+ this.fix_flt_temp = "";
17888
17888
  if (this.m_appService.getState().grid_obj == null)
17889
17889
  this.m_appService.getState().grid_obj = {};
17890
17890
  this.browser = this.getBrowserName();
17891
- if (this.browser == 'ie')
17892
- this.width_max = '';
17891
+ if (this.browser == "ie")
17892
+ this.width_max = "";
17893
17893
  }
17894
17894
  FHGridComponentN.prototype.getBrowserName = function () {
17895
17895
  var agent = window.navigator.userAgent.toLowerCase();
17896
17896
  switch (true) {
17897
- case agent.indexOf('edge') > -1:
17898
- return 'edge';
17899
- case agent.indexOf('opr') > -1 && !!window.opr:
17900
- return 'opera';
17901
- case agent.indexOf('chrome') > -1 && !!window.chrome:
17902
- return 'chrome';
17903
- case agent.indexOf('trident') > -1:
17904
- return 'ie';
17905
- case agent.indexOf('firefox') > -1:
17906
- return 'firefox';
17907
- case agent.indexOf('safari') > -1:
17908
- return 'safari';
17897
+ case agent.indexOf("edge") > -1:
17898
+ return "edge";
17899
+ case agent.indexOf("opr") > -1 && !!window.opr:
17900
+ return "opera";
17901
+ case agent.indexOf("chrome") > -1 && !!window.chrome:
17902
+ return "chrome";
17903
+ case agent.indexOf("trident") > -1:
17904
+ return "ie";
17905
+ case agent.indexOf("firefox") > -1:
17906
+ return "firefox";
17907
+ case agent.indexOf("safari") > -1:
17908
+ return "safari";
17909
17909
  default:
17910
- return 'other';
17910
+ return "other";
17911
17911
  }
17912
17912
  };
17913
17913
  FHGridComponentN.prototype.check_width = function () {
@@ -17932,10 +17932,10 @@
17932
17932
  return;
17933
17933
  this.b_ensure = true;
17934
17934
  try {
17935
- if (localStorage.getItem(this.grid_key + '_POS') != null) {
17935
+ if (localStorage.getItem(this.grid_key + "_POS") != null) {
17936
17936
  if (this.gridOptions.api)
17937
- this.gridOptions.api.ensureIndexVisible(parseInt(localStorage.getItem(this.grid_key + '_POS') || '0'));
17938
- localStorage.removeItem(this.grid_key + '_POS');
17937
+ this.gridOptions.api.ensureIndexVisible(parseInt(localStorage.getItem(this.grid_key + "_POS") || "0"));
17938
+ localStorage.removeItem(this.grid_key + "_POS");
17939
17939
  }
17940
17940
  }
17941
17941
  catch (e) {
@@ -17945,10 +17945,10 @@
17945
17945
  FHGridComponentN.prototype.ck_flag = function () {
17946
17946
  if (this.toggle_mantieni)
17947
17947
  if (!this.toggle_mantieni.checked) {
17948
- localStorage.setItem(this.grid_key + '_MANTIENI', 'SI');
17948
+ localStorage.setItem(this.grid_key + "_MANTIENI", "SI");
17949
17949
  }
17950
17950
  else {
17951
- localStorage.setItem(this.grid_key + '_MANTIENI', 'NO');
17951
+ localStorage.setItem(this.grid_key + "_MANTIENI", "NO");
17952
17952
  }
17953
17953
  };
17954
17954
  FHGridComponentN.prototype.refresh_all_rows = function () {
@@ -17965,27 +17965,27 @@
17965
17965
  return;
17966
17966
  if (this.gf)
17967
17967
  this.curr_config = this.gf.getValue();
17968
- if (this.curr_config == '-1')
17968
+ if (this.curr_config == "-1")
17969
17969
  return;
17970
- localStorage.removeItem(this.grid_key + '_COLS');
17971
- localStorage.removeItem(this.grid_key + '_FILTER');
17972
- localStorage.removeItem(this.grid_key + '_CFG_DEFAULT');
17973
- localStorage.removeItem(this.grid_key + '_FILTER_UP');
17970
+ localStorage.removeItem(this.grid_key + "_COLS");
17971
+ localStorage.removeItem(this.grid_key + "_FILTER");
17972
+ localStorage.removeItem(this.grid_key + "_CFG_DEFAULT");
17973
+ localStorage.removeItem(this.grid_key + "_FILTER_UP");
17974
17974
  if (this.gf)
17975
17975
  if (this.gf.getObj().COL != null)
17976
- if (this.gf.getObj().COL != '')
17977
- localStorage.setItem(this.grid_key + '_COLS', this.gf.getObj().COL);
17976
+ if (this.gf.getObj().COL != "")
17977
+ localStorage.setItem(this.grid_key + "_COLS", this.gf.getObj().COL);
17978
17978
  // if (this.gf.getObj().SORT != null)
17979
17979
  // if (this.gf.getObj().SORT != "")
17980
17980
  // localStorage.setItem(this.grid_key + "_SORT", this.gf.getObj().SORT);
17981
17981
  if (this.gf)
17982
17982
  if (this.gf.getObj().FILTER != null)
17983
- if (this.gf.getObj().FILTER != '')
17984
- localStorage.setItem(this.grid_key + '_FILTER', this.gf.getObj().FILTER);
17983
+ if (this.gf.getObj().FILTER != "")
17984
+ localStorage.setItem(this.grid_key + "_FILTER", this.gf.getObj().FILTER);
17985
17985
  if (this.gf)
17986
17986
  if (this.gf.getDescri() != null)
17987
- if (this.gf.getDescri() != '-1')
17988
- localStorage.setItem(this.grid_key + '_CFG_DEFAULT', (this.gf.getDescri() || ''));
17987
+ if (this.gf.getDescri() != "-1")
17988
+ localStorage.setItem(this.grid_key + "_CFG_DEFAULT", this.gf.getDescri() || "");
17989
17989
  if (this.gf)
17990
17990
  this.curr_config = this.gf.getValue();
17991
17991
  this.res_columns(true);
@@ -17995,14 +17995,14 @@
17995
17995
  if (this.gf)
17996
17996
  if (this.gf.getObj().username != null)
17997
17997
  if (this.m_appService.user != this.gf.getObj().username) {
17998
- this._toast.error('Configurazione gestibile da: ' + this.gf.getObj().username);
17998
+ this._toast.error("Configurazione gestibile da: " + this.gf.getObj().username);
17999
17999
  return;
18000
18000
  }
18001
- localStorage.setItem(this.m_appService.COMPANY_KEY + 'title_dialog', 'Conferma Operazione');
18001
+ localStorage.setItem(this.m_appService.COMPANY_KEY + "title_dialog", "Conferma Operazione");
18002
18002
  if (this.gf)
18003
- localStorage.setItem(this.m_appService.COMPANY_KEY + 'msg_dialog', 'Confermi di voler cancellare la configurazione ' +
18003
+ localStorage.setItem(this.m_appService.COMPANY_KEY + "msg_dialog", "Confermi di voler cancellare la configurazione " +
18004
18004
  this.gf.getDescri() +
18005
- '?');
18005
+ "?");
18006
18006
  var dialogRef = this.m_dialog.open(fh_win_confirm, {
18007
18007
  disableClose: true,
18008
18008
  });
@@ -18010,21 +18010,21 @@
18010
18010
  if (result) {
18011
18011
  if (_this.gf) {
18012
18012
  var p = new QParam();
18013
- p.sql = 'DELETE_CFG_GRID';
18014
- p.types = ['string', 'string'];
18013
+ p.sql = "DELETE_CFG_GRID";
18014
+ p.types = ["string", "string"];
18015
18015
  p.values = [_this.gf.getDescri(), _this.grid_key];
18016
18016
  var ok_op = false;
18017
18017
  _this._dataService.doQuery(p).subscribe(function (data) {
18018
18018
  var ok_op = false;
18019
18019
  if (data != null)
18020
- if (data.result_msg == 'OK') {
18021
- _this._toast.info('Configurazione eliminata');
18020
+ if (data.result_msg == "OK") {
18021
+ _this._toast.info("Configurazione eliminata");
18022
18022
  if (_this.gf) {
18023
- _this.gf.types = ['string'];
18023
+ _this.gf.types = ["string"];
18024
18024
  _this.gf.values = [_this.grid_key];
18025
18025
  _this.gf.fillCombo();
18026
18026
  }
18027
- _this.curr_config = '-1';
18027
+ _this.curr_config = "-1";
18028
18028
  }
18029
18029
  });
18030
18030
  }
@@ -18036,37 +18036,44 @@
18036
18036
  if (this.gf)
18037
18037
  if (this.gf.getObj().username != null)
18038
18038
  if (this.m_appService.user != this.gf.getObj().username) {
18039
- this._toast.error('Configurazione gestibile da: ' + this.gf.getObj().username);
18039
+ this._toast.error("Configurazione gestibile da: " + this.gf.getObj().username);
18040
18040
  return;
18041
18041
  }
18042
- localStorage.setItem(this.m_appService.COMPANY_KEY + 'title_dialog', 'Conferma Operazione');
18042
+ localStorage.setItem(this.m_appService.COMPANY_KEY + "title_dialog", "Conferma Operazione");
18043
18043
  if (this.gf) {
18044
- localStorage.setItem(this.m_appService.COMPANY_KEY + 'msg_dialog', 'Confermi di voler sovrascrivere la configurazione ' +
18044
+ localStorage.setItem(this.m_appService.COMPANY_KEY + "msg_dialog", "Confermi di voler sovrascrivere la configurazione " +
18045
18045
  this.gf.getDescri() +
18046
- '?');
18046
+ "?");
18047
18047
  var dialogRef = this.m_dialog.open(fh_win_confirm, {
18048
18048
  disableClose: true,
18049
18049
  });
18050
18050
  dialogRef.afterClosed().subscribe(function (result) {
18051
18051
  if (result) {
18052
18052
  var p = new QParam();
18053
- p.sql = 'INSERT_UPDATE_CFG_GRID';
18053
+ p.sql = "INSERT_UPDATE_CFG_GRID";
18054
18054
  var p_col = void 0;
18055
18055
  // let p_sort: string = "";
18056
18056
  var p_filter = void 0;
18057
- if (localStorage.getItem(_this.grid_key + '_COLS') != null)
18058
- p_col = localStorage.getItem(_this.grid_key + '_COLS');
18057
+ if (localStorage.getItem(_this.grid_key + "_COLS") != null)
18058
+ p_col = localStorage.getItem(_this.grid_key + "_COLS");
18059
18059
  // if (localStorage.getItem(this.grid_key + "_SORT") != null)
18060
18060
  // p_sort = localStorage.getItem(this.grid_key + "_SORT");
18061
- if (localStorage.getItem(_this.grid_key + '_FILTER') != null)
18062
- p_filter = localStorage.getItem(_this.grid_key + '_FILTER');
18063
- p.types = ['string', 'string', 'string', 'string', 'string', 'string'];
18061
+ if (localStorage.getItem(_this.grid_key + "_FILTER") != null)
18062
+ p_filter = localStorage.getItem(_this.grid_key + "_FILTER");
18063
+ p.types = [
18064
+ "string",
18065
+ "string",
18066
+ "string",
18067
+ "string",
18068
+ "string",
18069
+ "string",
18070
+ ];
18064
18071
  if (_this.gf)
18065
18072
  p.values = [
18066
18073
  _this.gf.getDescri(),
18067
18074
  _this.grid_key,
18068
18075
  p_col,
18069
- '',
18076
+ "",
18070
18077
  p_filter,
18071
18078
  _this.m_appService.user,
18072
18079
  ];
@@ -18074,14 +18081,14 @@
18074
18081
  _this._dataService.doQuery(p).subscribe(function (data) {
18075
18082
  var ok_op = false;
18076
18083
  if (data != null)
18077
- if (data.result_msg == 'OK') {
18078
- _this._toast.info('Configurazione salvata');
18084
+ if (data.result_msg == "OK") {
18085
+ _this._toast.info("Configurazione salvata");
18079
18086
  if (_this.gf) {
18080
- _this.gf.types = ['string'];
18087
+ _this.gf.types = ["string"];
18081
18088
  _this.gf.values = [_this.grid_key];
18082
18089
  _this.gf.fillCombo();
18083
18090
  }
18084
- _this.curr_config = '-1';
18091
+ _this.curr_config = "-1";
18085
18092
  }
18086
18093
  if (!ok_op) {
18087
18094
  }
@@ -18106,37 +18113,37 @@
18106
18113
  });
18107
18114
  setTimeout(function () {
18108
18115
  if (_this.win_opt) {
18109
- _this.win_opt.componentInstance.title = 'Salva Configurazione';
18110
- _this.win_opt.componentInstance.label = 'Nome';
18116
+ _this.win_opt.componentInstance.title = "Salva Configurazione";
18117
+ _this.win_opt.componentInstance.label = "Nome";
18111
18118
  }
18112
18119
  });
18113
18120
  this.win_opt.afterClosed().subscribe(function (result) {
18114
18121
  if (result)
18115
18122
  if (result != null) {
18116
18123
  var p = new QParam();
18117
- p.sql = 'INSERT_UPDATE_CFG_GRID';
18124
+ p.sql = "INSERT_UPDATE_CFG_GRID";
18118
18125
  var p_col = void 0;
18119
18126
  // let p_sort: string = "";
18120
18127
  var p_filter = void 0;
18121
- if (localStorage.getItem(_this.grid_key + '_COLS') != null)
18122
- p_col = localStorage.getItem(_this.grid_key + '_COLS');
18128
+ if (localStorage.getItem(_this.grid_key + "_COLS") != null)
18129
+ p_col = localStorage.getItem(_this.grid_key + "_COLS");
18123
18130
  // if (localStorage.getItem(this.grid_key + "_SORT") != null)
18124
18131
  // p_sort = localStorage.getItem(this.grid_key + "_SORT");
18125
- if (localStorage.getItem(_this.grid_key + '_FILTER') != null)
18126
- p_filter = localStorage.getItem(_this.grid_key + '_FILTER');
18132
+ if (localStorage.getItem(_this.grid_key + "_FILTER") != null)
18133
+ p_filter = localStorage.getItem(_this.grid_key + "_FILTER");
18127
18134
  p.types = [
18128
- 'string',
18129
- 'string',
18130
- 'string',
18131
- 'string',
18132
- 'string',
18133
- 'string',
18135
+ "string",
18136
+ "string",
18137
+ "string",
18138
+ "string",
18139
+ "string",
18140
+ "string",
18134
18141
  ];
18135
18142
  p.values = [
18136
18143
  result,
18137
18144
  _this.grid_key,
18138
18145
  p_col,
18139
- '',
18146
+ "",
18140
18147
  p_filter,
18141
18148
  _this.m_appService.user,
18142
18149
  ];
@@ -18144,11 +18151,11 @@
18144
18151
  _this._dataService.doQuery(p).subscribe(function (data) {
18145
18152
  var ok_op = false;
18146
18153
  if (data != null)
18147
- if (data.result_msg == 'OK') {
18148
- _this._toast.info('Configurazione salvata');
18154
+ if (data.result_msg == "OK") {
18155
+ _this._toast.info("Configurazione salvata");
18149
18156
  ok_op = true;
18150
18157
  if (_this.gf) {
18151
- _this.gf.types = ['string'];
18158
+ _this.gf.types = ["string"];
18152
18159
  _this.gf.values = [_this.grid_key];
18153
18160
  _this.gf.fillCombo();
18154
18161
  }
@@ -18199,21 +18206,21 @@
18199
18206
  };
18200
18207
  FHGridComponentN.prototype.export_excel = function (type) {
18201
18208
  var _this = this;
18202
- if (type === void 0) { type = 'excel'; }
18209
+ if (type === void 0) { type = "excel"; }
18203
18210
  this.dialogRef_W = this.m_dialog.open(fh_win_wait, {
18204
18211
  disableClose: true,
18205
18212
  });
18206
18213
  setTimeout(function () {
18207
- _this.dialogRef_W.componentInstance.label = 'EXPORT IN CORSO';
18214
+ _this.dialogRef_W.componentInstance.label = "EXPORT IN CORSO";
18208
18215
  });
18209
18216
  // this._toast.info('da implementare lato server');
18210
18217
  this.p_fi.type = type;
18211
18218
  this.p_fi.uiid_stampa = this.uti_s.newGuid();
18212
18219
  this.uiid_stampa = this.p_fi.uiid_stampa;
18213
18220
  this._gridservice
18214
- .doQuery(this.p_fi, true, this.m_appService.API_ENDPOINT + 'doexportn')
18221
+ .doQuery(this.p_fi, true, this.m_appService.API_ENDPOINT + "doexportn")
18215
18222
  .subscribe(function (data) {
18216
- _this.check_end(type == 'pdf' ? '.pdf' : '.xlsx');
18223
+ _this.check_end(type == "pdf" ? ".pdf" : ".xlsx");
18217
18224
  });
18218
18225
  };
18219
18226
  FHGridComponentN.prototype.check_end = function (format) {
@@ -18221,15 +18228,15 @@
18221
18228
  var p = new FSInput();
18222
18229
  p.p1 =
18223
18230
  this.m_appService.LOCAL_PATH +
18224
- 'grid_reports\\' +
18231
+ "grid_reports\\" +
18225
18232
  this.uiid_stampa +
18226
- '_' +
18233
+ "_" +
18227
18234
  this.m_appService.user +
18228
18235
  format;
18229
- p.command = 'check_file';
18236
+ p.command = "check_file";
18230
18237
  this._fileService.doQuery(p).subscribe(function (data) {
18231
18238
  if (data != null)
18232
- if (data.msg == 'N') {
18239
+ if (data.msg == "N") {
18233
18240
  setTimeout(function () {
18234
18241
  _this.check_end(format);
18235
18242
  }, 1000);
@@ -18240,9 +18247,9 @@
18240
18247
  });
18241
18248
  setTimeout(function () {
18242
18249
  window.open(_this.m_appService.COMPANY_SITE_ROOT +
18243
- '/grid_reports/' +
18250
+ "/grid_reports/" +
18244
18251
  _this.uiid_stampa +
18245
- '_' +
18252
+ "_" +
18246
18253
  _this.m_appService.user +
18247
18254
  format);
18248
18255
  }, 2000);
@@ -18260,7 +18267,7 @@
18260
18267
  if (_this.enable_copy)
18261
18268
  _this.gridApi.copySelectedRangeToClipboard();
18262
18269
  {
18263
- _this.clipboard.copy(v.data.split('\n')[0]);
18270
+ _this.clipboard.copy(v.data.split("\n")[0]);
18264
18271
  }
18265
18272
  };
18266
18273
  };
@@ -18276,7 +18283,7 @@
18276
18283
  return item.data.uiid;
18277
18284
  if (item.data.codice != null)
18278
18285
  return item.data.codice;
18279
- return 'NA';
18286
+ return "NA";
18280
18287
  };
18281
18288
  FHGridComponentN.prototype.ngAfterViewInit = function () {
18282
18289
  var _this = this;
@@ -18291,77 +18298,77 @@
18291
18298
  enableRangeSelection: true,
18292
18299
  defaultColDef: { resizable: true, sortable: true, floatingFilter: true },
18293
18300
  allowContextMenuWithControlKey: true,
18294
- rowModelType: 'serverSide',
18301
+ rowModelType: "serverSide",
18295
18302
  localeText: {
18296
18303
  // for filter panel
18297
- page: 'pagina',
18298
- more: 'altre',
18299
- to: 'a',
18300
- of: 'di',
18301
- next: 'prossima',
18302
- last: 'ultima',
18303
- first: 'prima',
18304
- previous: 'precedente',
18305
- loadingOoo: 'Caricamento...',
18304
+ page: "pagina",
18305
+ more: "altre",
18306
+ to: "a",
18307
+ of: "di",
18308
+ next: "prossima",
18309
+ last: "ultima",
18310
+ first: "prima",
18311
+ previous: "precedente",
18312
+ loadingOoo: "Caricamento...",
18306
18313
  // for set filter
18307
- selectAll: 'Seleziona Tutto',
18308
- searchOoo: 'Trova...',
18309
- blanks: 'Vuoto',
18314
+ selectAll: "Seleziona Tutto",
18315
+ searchOoo: "Trova...",
18316
+ blanks: "Vuoto",
18310
18317
  // for number filter and text filter
18311
- filterOoo: 'Filtro...',
18312
- applyFilter: 'Applica Filtro...',
18318
+ filterOoo: "Filtro...",
18319
+ applyFilter: "Applica Filtro...",
18313
18320
  // for number filter
18314
- equals: 'Uguale',
18315
- notEqual: 'Diverso',
18316
- lessThan: 'Minore o Uguale',
18317
- greaterThan: 'Maggiore o Uguale',
18321
+ equals: "Uguale",
18322
+ notEqual: "Diverso",
18323
+ lessThan: "Minore o Uguale",
18324
+ greaterThan: "Maggiore o Uguale",
18318
18325
  // for text filter
18319
- notContains: 'Non Contiene',
18320
- contains: 'Contiene',
18321
- startsWith: 'Inizia Con',
18322
- endsWith: 'Finisce Con',
18326
+ notContains: "Non Contiene",
18327
+ contains: "Contiene",
18328
+ startsWith: "Inizia Con",
18329
+ endsWith: "Finisce Con",
18323
18330
  // the header of the default group column
18324
- group: 'Gruppo',
18331
+ group: "Gruppo",
18325
18332
  // tool panel
18326
- columns: 'Colonne',
18327
- rowGroupColumns: 'Colonne Pivot',
18328
- rowGroupColumnsEmptyMessage: 'trascina le colonne per raggrupparle',
18329
- valueColumns: 'Colonne Valore',
18330
- pivotMode: 'Modalità Pivot',
18331
- groups: 'Gruppi',
18332
- values: 'Valori',
18333
- pivots: 'Pivots',
18334
- valueColumnsEmptyMessage: 'trascina le colonne per aggreare',
18335
- pivotColumnsEmptyMessage: 'trascina le colonne per pivot',
18333
+ columns: "Colonne",
18334
+ rowGroupColumns: "Colonne Pivot",
18335
+ rowGroupColumnsEmptyMessage: "trascina le colonne per raggrupparle",
18336
+ valueColumns: "Colonne Valore",
18337
+ pivotMode: "Modalità Pivot",
18338
+ groups: "Gruppi",
18339
+ values: "Valori",
18340
+ pivots: "Pivots",
18341
+ valueColumnsEmptyMessage: "trascina le colonne per aggreare",
18342
+ pivotColumnsEmptyMessage: "trascina le colonne per pivot",
18336
18343
  // other
18337
- noRowsToShow: 'nessun dato',
18344
+ noRowsToShow: "nessun dato",
18338
18345
  // enterprise menu
18339
- pinColumn: 'Sposta Colonna',
18340
- valueAggregation: 'Aggregazione',
18341
- autosizeThiscolumn: 'Autosize colonna',
18342
- autosizeAllColumns: 'Autosize tutte le colonne',
18343
- groupBy: 'Raggruppa per',
18344
- ungroupBy: 'Spacca per',
18345
- resetColumns: 'Resetta queste colonna',
18346
- expandAll: 'Espandi',
18347
- collapseAll: 'Chiudi',
18348
- toolPanel: 'Impostazioni',
18346
+ pinColumn: "Sposta Colonna",
18347
+ valueAggregation: "Aggregazione",
18348
+ autosizeThiscolumn: "Autosize colonna",
18349
+ autosizeAllColumns: "Autosize tutte le colonne",
18350
+ groupBy: "Raggruppa per",
18351
+ ungroupBy: "Spacca per",
18352
+ resetColumns: "Resetta queste colonna",
18353
+ expandAll: "Espandi",
18354
+ collapseAll: "Chiudi",
18355
+ toolPanel: "Impostazioni",
18349
18356
  // enterprise menu pinning
18350
- pinLeft: 'Sposta <<',
18351
- pinRight: 'Sposta >>',
18352
- noPin: 'Sposta <>',
18357
+ pinLeft: "Sposta <<",
18358
+ pinRight: "Sposta >>",
18359
+ noPin: "Sposta <>",
18353
18360
  // enterprise menu aggregation and status panel
18354
- sum: 'Somma',
18355
- min: 'Minimo',
18356
- max: 'Massimo',
18357
- none: 'Nessuno',
18358
- count: 'Numero',
18359
- average: 'Media',
18361
+ sum: "Somma",
18362
+ min: "Minimo",
18363
+ max: "Massimo",
18364
+ none: "Nessuno",
18365
+ count: "Numero",
18366
+ average: "Media",
18360
18367
  // standard menu
18361
- copy: 'Copia',
18362
- ctrlC: 'ctrl n C',
18363
- paste: 'Incolla',
18364
- ctrlV: 'ctrl n C',
18368
+ copy: "Copia",
18369
+ ctrlC: "ctrl n C",
18370
+ paste: "Incolla",
18371
+ ctrlV: "ctrl n C",
18365
18372
  },
18366
18373
  getRowNodeId: function (item) {
18367
18374
  // console.log(item);
@@ -18381,16 +18388,17 @@
18381
18388
  return item.ord;
18382
18389
  },
18383
18390
  };
18391
+ console.log('gridOptions ', this.gridOptions);
18384
18392
  this.init_opt = true;
18385
- if (this.grid_key == 'PRO_H')
18393
+ if (this.grid_key == "PRO_H")
18386
18394
  this.no_pref = true;
18387
18395
  setTimeout(function () {
18388
18396
  if (_this.end_point == null)
18389
18397
  _this.end_point =
18390
18398
  _this.m_appService.API_ENDPOINT + _this.m_appService.GRID_ENDPOINT;
18391
- if (localStorage.getItem(_this.grid_key + '_FILTER_UP') != null)
18399
+ if (localStorage.getItem(_this.grid_key + "_FILTER_UP") != null)
18392
18400
  _this.ric_libera =
18393
- localStorage.getItem(_this.grid_key + '_FILTER_UP') || '';
18401
+ localStorage.getItem(_this.grid_key + "_FILTER_UP") || "";
18394
18402
  _this.onResize();
18395
18403
  });
18396
18404
  };
@@ -18463,27 +18471,27 @@
18463
18471
  return i;
18464
18472
  };
18465
18473
  FHGridComponentN.prototype.getquerySelected = function (f, t) {
18466
- var s = '';
18467
- if (t == 'String') {
18474
+ var s = "";
18475
+ if (t == "String") {
18468
18476
  if (this.gridOptions.api)
18469
18477
  this.gridOptions.api.forEachNode(function (node) {
18470
18478
  if (node.isSelected())
18471
18479
  if (node.data[f] != null) {
18472
- if (s != '')
18473
- s = s + ',';
18480
+ if (s != "")
18481
+ s = s + ",";
18474
18482
  s = s + "'" + node.data[f] + "'";
18475
18483
  }
18476
18484
  });
18477
18485
  }
18478
18486
  // console.log('ENTRO '+f+" "+t);
18479
- if (t == 'Number') {
18487
+ if (t == "Number") {
18480
18488
  if (this.gridOptions.api)
18481
18489
  this.gridOptions.api.forEachNode(function (node) {
18482
18490
  if (node.isSelected())
18483
18491
  if (node.data[f] != null) {
18484
18492
  // console.log('selected');
18485
- if (s != '')
18486
- s = s + ',';
18493
+ if (s != "")
18494
+ s = s + ",";
18487
18495
  s = s + node.data[f];
18488
18496
  }
18489
18497
  });
@@ -18508,14 +18516,14 @@
18508
18516
  };
18509
18517
  FHGridComponentN.prototype.pulisci_filtri = function (resetr) {
18510
18518
  if (resetr === void 0) { resetr = true; }
18511
- localStorage.removeItem(this.grid_key + '_FILTER');
18519
+ localStorage.removeItem(this.grid_key + "_FILTER");
18512
18520
  if (resetr) {
18513
- if (this.ric_libera != '')
18514
- this.doFill('', true, false);
18515
- this.ric_libera = '';
18516
- localStorage.removeItem(this.grid_key + '_FILTER_UP');
18521
+ if (this.ric_libera != "")
18522
+ this.doFill("", true, false);
18523
+ this.ric_libera = "";
18524
+ localStorage.removeItem(this.grid_key + "_FILTER_UP");
18517
18525
  }
18518
- this.fix_flt_temp = '';
18526
+ this.fix_flt_temp = "";
18519
18527
  if (this.gridOptions.api)
18520
18528
  this.gridOptions.api.setFilterModel(null);
18521
18529
  var filtrtm = {}; /*
@@ -18529,9 +18537,9 @@
18529
18537
  };
18530
18538
  FHGridComponentN.prototype.print = function () {
18531
18539
  if (this.custom_export)
18532
- this.command.emit({ cmd: 'print_pdf' });
18540
+ this.command.emit({ cmd: "print_pdf" });
18533
18541
  else
18534
- this.export_excel('pdf');
18542
+ this.export_excel("pdf");
18535
18543
  };
18536
18544
  FHGridComponentN.prototype.init_conf = function () {
18537
18545
  // console.log(" init_conf()");
@@ -18559,18 +18567,19 @@
18559
18567
  this.ckk_ed = true;
18560
18568
  if (this.toggle_mantieni != null) {
18561
18569
  this.toggle_mantieni.checked = true;
18562
- if (localStorage.getItem(this.grid_key + '_MANTIENI') != null)
18563
- if (localStorage.getItem(this.grid_key + '_MANTIENI') == 'NO') {
18570
+ if (localStorage.getItem(this.grid_key + "_MANTIENI") != null)
18571
+ if (localStorage.getItem(this.grid_key + "_MANTIENI") == "NO") {
18564
18572
  this.toggle_mantieni.checked = false;
18565
18573
  }
18566
18574
  }
18567
18575
  this.res_columns();
18568
- if (localStorage.getItem(this.grid_key + '_POS') != null)
18576
+ if (localStorage.getItem(this.grid_key + "_POS") != null)
18569
18577
  this.b_restored = true;
18570
- if (localStorage.getItem(this.grid_key + '_FILTER_UP') != null)
18571
- if (localStorage.getItem(this.grid_key + '_FILTER_UP') != '') {
18572
- this.ric_libera = (localStorage.getItem(this.grid_key + '_FILTER_UP') || '');
18573
- var arr = this.ric_libera.split(' ');
18578
+ if (localStorage.getItem(this.grid_key + "_FILTER_UP") != null)
18579
+ if (localStorage.getItem(this.grid_key + "_FILTER_UP") != "") {
18580
+ this.ric_libera =
18581
+ localStorage.getItem(this.grid_key + "_FILTER_UP") || "";
18582
+ var arr = this.ric_libera.split(" ");
18574
18583
  var arr_F_1 = new Array();
18575
18584
  for (var i = 0; i < arr.length; i++)
18576
18585
  arr_F_1.push(arr[i]);
@@ -18579,27 +18588,27 @@
18579
18588
  // this._toast.error("ignorato termine: " + arr[i] + " troppo corto");
18580
18589
  if (arr_F_1.length == 0)
18581
18590
  return;
18582
- var ss = '';
18591
+ var ss = "";
18583
18592
  var _loop_1 = function (i) {
18584
- var ss_r = '';
18593
+ var ss_r = "";
18585
18594
  for (var y = 0; y < this_1.columnDefs.length; y++) {
18586
18595
  if (this_1.columnDefs[y] != null)
18587
18596
  if (this_1.columnDefs[y].no_filter == null)
18588
18597
  if (this_1.columnDefs[y].field != null)
18589
- if (this_1.columnDefs[y].field != '')
18590
- if (this_1.columnDefs[y].filter != 'agDateColumnFilter') {
18591
- if (ss_r != '')
18592
- ss_r += ' or ';
18598
+ if (this_1.columnDefs[y].field != "")
18599
+ if (this_1.columnDefs[y].filter != "agDateColumnFilter") {
18600
+ if (ss_r != "")
18601
+ ss_r += " or ";
18593
18602
  ss_r +=
18594
18603
  this_1.columnDefs[y].field +
18595
18604
  " LIKE '%" +
18596
18605
  arr_F_1[i]
18597
18606
  .replace("'", "$'")
18598
- .replace('*', '$*')
18599
- .replace('?', '$?')
18600
- .replace('[', '$[')
18601
- .replace(']', '$]')
18602
- .replace('!', "'$")
18607
+ .replace("*", "$*")
18608
+ .replace("?", "$?")
18609
+ .replace("[", "$[")
18610
+ .replace("]", "$]")
18611
+ .replace("!", "'$")
18603
18612
  .toUpperCase() +
18604
18613
  "%' ESCAPE '$'";
18605
18614
  }
@@ -18607,27 +18616,27 @@
18607
18616
  if (this_1.full_text_added_columns != null)
18608
18617
  this_1.full_text_added_columns.map(function (v) {
18609
18618
  if (v != null)
18610
- if (v != '') {
18611
- if (ss_r != '')
18612
- ss_r += ' or ';
18619
+ if (v != "") {
18620
+ if (ss_r != "")
18621
+ ss_r += " or ";
18613
18622
  ss_r +=
18614
18623
  v +
18615
18624
  " LIKE '%" +
18616
18625
  arr_F_1[i]
18617
18626
  .replace("'", "$'")
18618
- .replace('*', '$*')
18619
- .replace('?', '$?')
18620
- .replace('[', '$[')
18621
- .replace(']', '$]')
18622
- .replace('!', "'$")
18627
+ .replace("*", "$*")
18628
+ .replace("?", "$?")
18629
+ .replace("[", "$[")
18630
+ .replace("]", "$]")
18631
+ .replace("!", "'$")
18623
18632
  .toUpperCase() +
18624
18633
  "%' ESCAPE '$'";
18625
18634
  }
18626
18635
  });
18627
- if (ss_r != '') {
18628
- if (ss != '')
18629
- ss += ' and ';
18630
- ss += '(' + ss_r + ')';
18636
+ if (ss_r != "") {
18637
+ if (ss != "")
18638
+ ss += " and ";
18639
+ ss += "(" + ss_r + ")";
18631
18640
  }
18632
18641
  };
18633
18642
  var this_1 = this;
@@ -18641,13 +18650,6 @@
18641
18650
  _this.ref_dt();
18642
18651
  }, 100);
18643
18652
  }
18644
- // this.createNewDatasource();
18645
- /*
18646
- if(this.m_appService.getState().grid_obj[this.grid_key+'_startPage']!=null)
18647
- {
18648
- //console.log('setto pag: '+this.m_appService.getState().grid_obj[this.grid_key+'_startPage']);
18649
- this.gridOptions.api.paginationGoToPage(this.m_appService.getState().grid_obj[this.grid_key+'_startPage']);
18650
- } */
18651
18653
  };
18652
18654
  FHGridComponentN.prototype.set_init_size = function () {
18653
18655
  var _this = this;
@@ -18665,7 +18667,6 @@
18665
18667
  FHGridComponentN.prototype.res_columns = function (forza) {
18666
18668
  var _this = this;
18667
18669
  if (forza === void 0) { forza = false; }
18668
- console.log("🚀 ~ file: fhgridn.ts:1370 ~ FHGridComponentN ~ res_columns ~ res_columns:", forza);
18669
18670
  if (this.columnDefs == null) {
18670
18671
  setTimeout(function () {
18671
18672
  _this.res_columns(forza);
@@ -18682,19 +18683,19 @@
18682
18683
  var b_rip = false;
18683
18684
  if (this.toggle_mantieni != null)
18684
18685
  b_mantieni_ck = this.toggle_mantieni.checked;
18685
- if (localStorage.getItem(this.grid_key + '_COLS') == null ||
18686
- localStorage.getItem(this.grid_key + '_COLS') == '') {
18686
+ if (localStorage.getItem(this.grid_key + "_COLS") == null ||
18687
+ localStorage.getItem(this.grid_key + "_COLS") == "") {
18687
18688
  this.set_init_size();
18688
18689
  return;
18689
18690
  }
18690
- if (localStorage.getItem(this.grid_key + '_COLS') != null &&
18691
+ if (localStorage.getItem(this.grid_key + "_COLS") != null &&
18691
18692
  (b_mantieni_ck || forza)) {
18692
18693
  // console.log('qqqqq1111');
18693
- if (localStorage.getItem(this.grid_key + '_COLS') != '') {
18694
+ if (localStorage.getItem(this.grid_key + "_COLS") != "") {
18694
18695
  b_rip = true;
18695
18696
  // console.log('qqqqq2222');
18696
18697
  try {
18697
- var a = JSON.parse((localStorage.getItem(this.grid_key + '_COLS') || '[]'));
18698
+ var a = JSON.parse(localStorage.getItem(this.grid_key + "_COLS") || "[]");
18698
18699
  var annulla = true;
18699
18700
  for (var i = 0; i < a.length; i++) {
18700
18701
  if (!a[i].hide)
@@ -18702,13 +18703,15 @@
18702
18703
  }
18703
18704
  // console.log('qqqqq3333 ',annulla);
18704
18705
  if (annulla)
18705
- localStorage.getItem(this.grid_key + '_COLS');
18706
+ localStorage.getItem(this.grid_key + "_COLS");
18706
18707
  else {
18707
18708
  // console.log('qqqqq4444');
18708
- if (localStorage.getItem(this.grid_key + '_COLS'))
18709
+ if (localStorage.getItem(this.grid_key + "_COLS"))
18709
18710
  if (this.gridOptions.columnApi) {
18710
18711
  // console.log('qqqqq5555',JSON.parse(localStorage.getItem(this.grid_key + '_COLS')||'{}'));
18711
- var colState = { state: JSON.parse(localStorage.getItem(this.grid_key + '_COLS') || '{}') };
18712
+ var colState = {
18713
+ state: JSON.parse(localStorage.getItem(this.grid_key + "_COLS") || "{}"),
18714
+ };
18712
18715
  this.gridOptions.columnApi.applyColumnState(colState);
18713
18716
  }
18714
18717
  }
@@ -18718,37 +18721,12 @@
18718
18721
  }
18719
18722
  }
18720
18723
  }
18721
- /* try {
18722
- this.gridOptions.api.setSortModel(null);
18723
- } catch (eer) {
18724
- console.log(eer);
18725
- }
18726
- if (
18727
- localStorage.getItem(this.grid_key + "_SORT") != null &&
18728
- (b_mantieni_ck || forza)
18729
- )
18730
- if (localStorage.getItem(this.grid_key + "_SORT") != "") {
18731
- // console.log('setto sort: '+localStorage.getItem(this.grid_key+'_SORT'));
18732
- // console.log(localStorage.getItem(this.grid_key+'_SORT'));
18733
- try {
18734
- this.gridOptions.api.setSortModel(
18735
- JSON.parse(localStorage.getItem(this.grid_key + "_SORT"))
18736
- );
18737
- } catch (eer) {
18738
- console.log(eer);
18739
- }
18740
- }
18741
- try {
18742
- this.gridOptions.api.setFilterModel(null);
18743
- } catch (eer) {
18744
- console.log(eer);
18745
- }*/
18746
- if (localStorage.getItem(this.grid_key + '_FILTER') != null &&
18724
+ if (localStorage.getItem(this.grid_key + "_FILTER") != null &&
18747
18725
  (b_mantieni_ck || forza))
18748
- if (localStorage.getItem(this.grid_key + '_FILTER') != '') {
18726
+ if (localStorage.getItem(this.grid_key + "_FILTER") != "") {
18749
18727
  try {
18750
18728
  if (this.gridOptions.api)
18751
- this.gridOptions.api.setFilterModel(JSON.parse((localStorage.getItem(this.grid_key + '_FILTER')) || ''));
18729
+ this.gridOptions.api.setFilterModel(JSON.parse(localStorage.getItem(this.grid_key + "_FILTER") || ""));
18752
18730
  }
18753
18731
  catch (eer) {
18754
18732
  console.log(eer);
@@ -18756,13 +18734,14 @@
18756
18734
  }
18757
18735
  };
18758
18736
  FHGridComponentN.prototype.getRows = function () {
18759
- return (this.gridOptions.rowData || []);
18737
+ return this.gridOptions.rowData || [];
18760
18738
  };
18761
18739
  FHGridComponentN.prototype.sortAndFilter = function (sortModel, filterModel) {
18762
18740
  // return sortData(sortModel, filterData(filterModel, allOfTheData))
18763
18741
  };
18764
18742
  FHGridComponentN.prototype.ref_dt = function () {
18765
18743
  var _this = this;
18744
+ console.log("🚀 ~ file: fhgridn.ts:1460 ~ FHGridComponentN ~ ref_dt ~ ref_dt: try init!!!!", this.gridOptions, this.gridOptions.api);
18766
18745
  if (this.gridOptions == null)
18767
18746
  setTimeout(function () {
18768
18747
  _this.ref_dt();
@@ -18773,7 +18752,7 @@
18773
18752
  _this.ref_dt();
18774
18753
  }, 500);
18775
18754
  else {
18776
- console.log('ref_dt!!!!');
18755
+ console.log("ref_dt!!!!");
18777
18756
  this.gridOptions.api.setServerSideDatasource(this.dataSource);
18778
18757
  }
18779
18758
  }
@@ -18795,14 +18774,14 @@
18795
18774
  this.setHeaderHeight(this.header_h);
18796
18775
  if (this.gf != null && this.show_buttons && !this.pref_hidden) {
18797
18776
  if (!this.private_pref)
18798
- this.gf.sql = 'SELECT_CFG_GRID';
18777
+ this.gf.sql = "SELECT_CFG_GRID";
18799
18778
  else
18800
- this.gf.sql = 'SELECT_CFG_GRID_BY_USER';
18801
- this.gf.types = ['string'];
18779
+ this.gf.sql = "SELECT_CFG_GRID_BY_USER";
18780
+ this.gf.types = ["string"];
18802
18781
  this.gf.values = [this.grid_key];
18803
18782
  this.gf.fillCombo();
18804
- if (localStorage.getItem(this.grid_key + '_MANTIENI') != 'NO')
18805
- if (localStorage.getItem(this.grid_key + '_CFG_DEFAULT') != null) {
18783
+ if (localStorage.getItem(this.grid_key + "_MANTIENI") != "NO")
18784
+ if (localStorage.getItem(this.grid_key + "_CFG_DEFAULT") != null) {
18806
18785
  return;
18807
18786
  }
18808
18787
  }
@@ -18817,16 +18796,16 @@
18817
18796
  };
18818
18797
  FHGridComponentN.prototype.save_cfg = function () {
18819
18798
  if (this.gridOptions.columnApi)
18820
- localStorage.setItem(this.grid_key + '_COLS', JSON.stringify(this.gridOptions.columnApi.getColumnState()));
18799
+ localStorage.setItem(this.grid_key + "_COLS", JSON.stringify(this.gridOptions.columnApi.getColumnState()));
18821
18800
  };
18822
18801
  FHGridComponentN.prototype.fe_cfg = function () {
18823
18802
  if (this.gf != null)
18824
18803
  if (this.gf.getObj() != null)
18825
- if (localStorage.getItem(this.grid_key + '_MANTIENI') != 'NO') {
18826
- this.gf.setByDescri((localStorage.getItem(this.grid_key + '_CFG_DEFAULT') || ''));
18827
- localStorage.setItem(this.grid_key + '_COLS', this.gf.getObj().COLS);
18804
+ if (localStorage.getItem(this.grid_key + "_MANTIENI") != "NO") {
18805
+ this.gf.setByDescri(localStorage.getItem(this.grid_key + "_CFG_DEFAULT") || "");
18806
+ localStorage.setItem(this.grid_key + "_COLS", this.gf.getObj().COLS);
18828
18807
  // localStorage.setItem(this.grid_key + "_SORT", this.gf.getObj().SORT);
18829
- localStorage.setItem(this.grid_key + '_FILTER', this.gf.getObj().FILTER);
18808
+ localStorage.setItem(this.grid_key + "_FILTER", this.gf.getObj().FILTER);
18830
18809
  this.curr_config = this.gf.getValue();
18831
18810
  }
18832
18811
  this.onready_go();
@@ -18852,15 +18831,15 @@
18852
18831
  }
18853
18832
  };
18854
18833
  FHGridComponentN.prototype.free_search = function () {
18855
- if (this.ric_libera == '') {
18834
+ if (this.ric_libera == "") {
18856
18835
  this.pulisci_filtri();
18857
- this.fix_flt_temp = '';
18858
- this.doFill('', true, false);
18859
- localStorage.removeItem(this.grid_key + '_FILTER_UP');
18836
+ this.fix_flt_temp = "";
18837
+ this.doFill("", true, false);
18838
+ localStorage.removeItem(this.grid_key + "_FILTER_UP");
18860
18839
  return;
18861
18840
  }
18862
- localStorage.setItem(this.grid_key + '_FILTER_UP', this.ric_libera);
18863
- var arr = this.ric_libera.split(' ');
18841
+ localStorage.setItem(this.grid_key + "_FILTER_UP", this.ric_libera);
18842
+ var arr = this.ric_libera.split(" ");
18864
18843
  var arr_F = new Array();
18865
18844
  for (var i = 0; i < arr.length; i++)
18866
18845
  arr_F.push(arr[i]);
@@ -18868,27 +18847,27 @@
18868
18847
  // else this._toast.error("ignorato termine: " + arr[i] + " troppo corto");
18869
18848
  if (arr_F.length == 0)
18870
18849
  return;
18871
- var ss = '';
18850
+ var ss = "";
18872
18851
  var _loop_2 = function (i) {
18873
- var ss_r = '';
18852
+ var ss_r = "";
18874
18853
  for (var y = 0; y < this_2.columnDefs.length; y++) {
18875
18854
  if (this_2.columnDefs[y] != null)
18876
18855
  if (this_2.columnDefs[y].no_filter == null)
18877
18856
  if (this_2.columnDefs[y].field != null)
18878
- if (this_2.columnDefs[y].field != '')
18879
- if (this_2.columnDefs[y].filter != 'agDateColumnFilter') {
18880
- if (ss_r != '')
18881
- ss_r += ' or ';
18857
+ if (this_2.columnDefs[y].field != "")
18858
+ if (this_2.columnDefs[y].filter != "agDateColumnFilter") {
18859
+ if (ss_r != "")
18860
+ ss_r += " or ";
18882
18861
  ss_r +=
18883
18862
  this_2.columnDefs[y].field +
18884
18863
  " LIKE '%" +
18885
18864
  arr_F[i]
18886
18865
  .replace("'", "$'")
18887
- .replace('*', '$*')
18888
- .replace('?', '$?')
18889
- .replace('[', '$[')
18890
- .replace(']', '$]')
18891
- .replace('!', "'$")
18866
+ .replace("*", "$*")
18867
+ .replace("?", "$?")
18868
+ .replace("[", "$[")
18869
+ .replace("]", "$]")
18870
+ .replace("!", "'$")
18892
18871
  .toUpperCase() +
18893
18872
  "%' ESCAPE '$'";
18894
18873
  }
@@ -18896,28 +18875,28 @@
18896
18875
  if (this_2.full_text_added_columns != null)
18897
18876
  this_2.full_text_added_columns.map(function (v) {
18898
18877
  if (v != null)
18899
- if (v != '') {
18900
- if (ss_r != '')
18901
- ss_r += ' or ';
18878
+ if (v != "") {
18879
+ if (ss_r != "")
18880
+ ss_r += " or ";
18902
18881
  ss_r +=
18903
18882
  v +
18904
18883
  " LIKE '%" +
18905
18884
  arr_F[i]
18906
18885
  .replace("'", "$'")
18907
- .replace('*', '$*')
18908
- .replace('?', '$?')
18909
- .replace('[', '$[')
18910
- .replace(']', '$]')
18911
- .replace('!', "'$")
18886
+ .replace("*", "$*")
18887
+ .replace("?", "$?")
18888
+ .replace("[", "$[")
18889
+ .replace("]", "$]")
18890
+ .replace("!", "'$")
18912
18891
  .toUpperCase() +
18913
18892
  "%' ESCAPE '$'";
18914
18893
  }
18915
18894
  });
18916
- if (ss_r != '') {
18895
+ if (ss_r != "") {
18917
18896
  // console.log('ADDO '), ss_r;
18918
- if (ss != '')
18919
- ss += ' and ';
18920
- ss += '(' + ss_r + ')';
18897
+ if (ss != "")
18898
+ ss += " and ";
18899
+ ss += "(" + ss_r + ")";
18921
18900
  }
18922
18901
  };
18923
18902
  var this_2 = this;
@@ -18961,7 +18940,7 @@
18961
18940
  if (this.b_init) {
18962
18941
  // console.log('salvo f: '+JSON.stringify(this.gridOptions.columnApi.getColumnState()));
18963
18942
  if (this.gridOptions.columnApi)
18964
- localStorage.setItem(this.grid_key + '_COLS', JSON.stringify(this.gridOptions.columnApi.getColumnState()));
18943
+ localStorage.setItem(this.grid_key + "_COLS", JSON.stringify(this.gridOptions.columnApi.getColumnState()));
18965
18944
  }
18966
18945
  };
18967
18946
  FHGridComponentN.prototype.onFilterModified = function () {
@@ -18973,7 +18952,7 @@
18973
18952
  setTimeout(function () {
18974
18953
  if (_this.b_init) {
18975
18954
  if (_this.gridOptions.api)
18976
- localStorage.setItem(_this.grid_key + '_FILTER', JSON.stringify(_this.gridOptions.api.getFilterModel()));
18955
+ localStorage.setItem(_this.grid_key + "_FILTER", JSON.stringify(_this.gridOptions.api.getFilterModel()));
18977
18956
  }
18978
18957
  }, 200);
18979
18958
  };
@@ -18986,7 +18965,7 @@
18986
18965
  return;
18987
18966
  if (this.b_init) {
18988
18967
  if (this.gridOptions.columnApi)
18989
- localStorage.setItem(this.grid_key + '_COLS', JSON.stringify(this.gridOptions.columnApi.getColumnState()));
18968
+ localStorage.setItem(this.grid_key + "_COLS", JSON.stringify(this.gridOptions.columnApi.getColumnState()));
18990
18969
  // console.log('salvo s: '+this.gridOptions.api.getSortModel());
18991
18970
  /*
18992
18971
 
@@ -19011,15 +18990,15 @@
19011
18990
  if (selectedInGrid != null)
19012
18991
  if (selectedInGrid[0] != null) {
19013
18992
  // console.log((this.gridOptions.api.getVerticalPixelRange()));
19014
- localStorage.setItem(this.grid_key + '_POS', String(selectedInGrid[0].rowIndex));
18993
+ localStorage.setItem(this.grid_key + "_POS", String(selectedInGrid[0].rowIndex));
19015
18994
  if (this.gridOptions.api)
19016
- localStorage.setItem(this.grid_key + '_POS_BAR', JSON.stringify(this.gridOptions.api.getVerticalPixelRange()));
19017
- localStorage.setItem(this.grid_key + '_POS2', this.getRowNodeId(selectedInGrid[0]));
18995
+ localStorage.setItem(this.grid_key + "_POS_BAR", JSON.stringify(this.gridOptions.api.getVerticalPixelRange()));
18996
+ localStorage.setItem(this.grid_key + "_POS2", this.getRowNodeId(selectedInGrid[0]));
19018
18997
  // this.m_appService.getState().grid_obj=new Object();
19019
18998
  // this.m_appService.getState().grid_obj[this.grid_key+'_NODE']=this.gridOptions.api.getSelectedRows[0];
19020
18999
  }
19021
19000
  this.sRow = $event.data;
19022
- localStorage.setItem(this.grid_key + '_LAST_ROW', JSON.stringify(this.sRow));
19001
+ localStorage.setItem(this.grid_key + "_LAST_ROW", JSON.stringify(this.sRow));
19023
19002
  this.clicked.emit($event.data);
19024
19003
  var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent);
19025
19004
  if (iOS) {
@@ -19083,6 +19062,7 @@
19083
19062
  }, 10);
19084
19063
  };
19085
19064
  FHGridComponentN.prototype.Refresh = function () {
19065
+ console.log("🚀 ~ file: fhgridn.ts:1831 ~ FHGridComponentN ~ Refresh ~ Refresh:");
19086
19066
  this.ref_dt();
19087
19067
  };
19088
19068
  FHGridComponentN.prototype.RefreshOnlyMemory = function () {
@@ -19092,7 +19072,7 @@
19092
19072
  }());
19093
19073
  FHGridComponentN.decorators = [
19094
19074
  { type: i0.Component, args: [{
19095
- selector: 'FHGridN',
19075
+ selector: "FHGridN",
19096
19076
  template: "<div fxLayout=\"column\" fxFlexFill>\n <div\n fxLayout=\"row\"\n fxLayout.xs=\"column\"\n fxLayoutAlign=\"center start\"\n fxLayoutGap=\"3px\"\n style=\"min-height: 55px;\"\n [hidden]=\"!show_buttons\"\n >\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n <div fxLayout=\"row\" fxLayoutGap=\"3px\" fxLayoutAlign=\"start center\">\n <div>\n <h5>{{num_r}}&nbsp;{{label_elementi | translate}}</h5>\n </div>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <input\n matInput\n [placeholder]=\"trova_label | translate\"\n (keydown)=\"keyDownFunctioncl($event)\"\n [(ngModel)]=\"ric_libera\"\n style=\"\n width: 200px;\n border: 1px solid;\n min-height: 30px;\n \"\n />\n </div>\n\n <div\n matTooltip=\"REMOVE FILTER\"\n matTooltipPosition=\"above\"\n *ngIf=\"show_pulisci_filtri\"\n >\n <button mat-flat-button (click)=\"pulisci_filtri()\" color=\"warn\">\n <mat-icon>filter_none</mat-icon>&nbsp;\n </button>\n </div>\n <div matTooltip=\"AUTO SIZE\" matTooltipPosition=\"above\">\n <button\n mat-flat-button\n (click)=\"autoSizeAll()\"\n color=\"accent\"\n *ngIf=\"show_buttons\"\n >\n <mat-icon>swap_horiz</mat-icon>\n </button>\n </div>\n <div fxHide fxShow.gt-sm matTooltip=\"FIT SIZE\" matTooltipPosition=\"above\">\n <button\n mat-flat-button\n (click)=\"fitSizeAll()\"\n color=\"accent\"\n *ngIf=\"show_buttons\"\n >\n <mat-icon>keyboard_tab</mat-icon>\n </button>\n </div>\n <div fxHide fxShow.gt-sm matTooltip=\"Refresh\" matTooltipPosition=\"above\">\n <button\n mat-flat-button\n (click)=\"Refresh()\"\n color=\"accent\"\n *ngIf=\"show_buttons\"\n >\n <mat-icon>autorenew</mat-icon>\n </button>\n </div>\n <FHFilterComboBox\n fxHide\n fxShow.gt-sm\n [hidden]=\"!show_buttons || pref_hidden\"\n (selchange)=\"ch_config()\"\n (fillend)=\"fe_cfg()\"\n #gf\n [init_fill]=\"false\"\n ></FHFilterComboBox>\n <div\n matTooltip=\"Modifica Preferenza\"\n matTooltipPosition=\"above\"\n *ngIf=\"curr_config!='-1'\"\n >\n <button\n mat-icon-button\n *ngIf=\"show_buttons && !pref_hidden\"\n style=\"color: rgb(248, 105, 10);\"\n >\n <mat-icon (click)=\"edit_config()\">save</mat-icon>\n </button>\n </div>\n <div\n matTooltip=\"Elimina Preferenza\"\n matTooltipPosition=\"above\"\n *ngIf=\"curr_config!='-1'\"\n >\n <button\n mat-icon-button\n *ngIf=\"show_buttons && !pref_hidden\"\n style=\"color: rgb(248, 105, 10);\"\n >\n <mat-icon (click)=\"elimina_config()\">delete</mat-icon>\n </button>\n </div>\n <div\n fxHide\n fxShow.gt-sm\n matTooltip=\"Crea Nuova Preferenza\"\n matTooltipPosition=\"above\"\n >\n <button\n mat-icon-button\n style=\"color: rgb(16, 98, 16);\"\n *ngIf=\"show_buttons && !pref_hidden\"\n >\n <mat-icon (click)=\"insert_config()\">library_add</mat-icon>\n </button>\n </div>\n\n <mat-slide-toggle\n fxHide\n fxShow.gt-sm\n [hidden]=\"!show_buttons || pref_hidden\"\n (click)=\"ck_flag()\"\n #toggle_mantieni\n >\n {{mantieni_impostazioni}}\n </mat-slide-toggle>\n\n &nbsp;\n <div fxHide fxShow.gt-sm matTooltip=\"HELP\" matTooltipPosition=\"above\">\n <button\n mat-flat-button\n (click)=\"help_window()\"\n color=\"primary\"\n *ngIf=\"show_buttons && show_help\"\n >\n <mat-icon>help</mat-icon>\n </button>\n </div>\n &nbsp;&nbsp;&nbsp;&nbsp;\n\n <img\n *ngIf=\"enable_export && enable_export_pdf\"\n matTooltip=\"EXPORT PDF\"\n matTooltipPosition=\"above\"\n src=\"assets/icons/square-o/pdf.svg\"\n style=\"width: 24px; height: 24px; cursor: pointer\"\n (click)=\"print()\"\n alt=\"Export PDF\"\n width=\"24\" height=\"24\"\n />\n\n\n <img *ngIf=\"enable_export && enable_export_xls\"\n matTooltip=\"EXPORT EXCEL\"\n matTooltipPosition=\"above\"\n src=\"assets/icons/square-o/xlsx.svg\"\n style=\"width: 24px; height: 24px; cursor: pointer\"\n (click)=\"export_excel()\"\n alt=\"Export Excel\"\n width=\"24\" height=\"24\"\n />\n\n </div>\n <div\n fxLayout=\"row\"\n fxLayoutAlign=\"end center\"\n\n [style.width]=\"width_max\"\n *ngIf=\"enabled\"\n >\n\n <FHGridToolBar\n (command)=\"docmd($event)\"\n [type]=\"toolbar_type\"\n [show_link]=\"show_link\"\n [show_help]=\"show_help_bar\"\n [help_label]=\"help_label_bar\"\n [custom_commands]=\"toolbar_custom_commands\"\n [toolbar_wkfapp]=\"toolbar_wkfapp\"\n [elimina_label]=\"elimina_label\"\n [sRow]=\"sRow\"\n ></FHGridToolBar>\n </div>\n </div>\n\n\n <div fxLayout=\"row\" style=\"width: 100%;\" [fxFlex]=\"show_buttons ? 100:95\">\n <ag-grid-angular\n ref-agGrid\n style=\"width: 100%; height: 100%;\"\n id=\"myGrid\"\n (cellDoubleClicked)=\"onColumnEvent($event)\"\n (cellClicked)=\"onCellClicked($event)\"\n [headerHeight]=\"header_h\"\n [groupHeaderHeight]=\"header_h\"\n class=\"ag-theme-balham\"\n [singleClickEdit]=\"true\"\n [gridOptions]=\"gridOptions\"\n [columnDefs]=\"columnDefs\"\n [rowData]=\"rowData\"\n [rowSelection]=\"selection_mode\"\n [tooltipShowDelay]=\"tooltipShowDelay\"\n [getContextMenuItems]=\"enable_export ? getContextMenuItems_e:getContextMenuItems_n_e\"\n (filterModified)=\"onFilterModified()\"\n (rowDoubleClicked)=\"onRowDClicked($event)\"\n (rowClicked)=\"onRowClicked($event)\"\n (columnVisible)=\"oncolumnEverythingChanged($event)\"\n (columnResized)=\"oncolumnEverythingChanged($event)\"\n (columnMoved)=\"oncolumnEverythingChanged($event)\"\n (cellValueChanged)=\"okr($event)\"\n (sortChanged)=\"onAfterSortChanged()\"\n [paginationPageSize]=\"num_per_pag\"\n (gridReady)=\"onReady($event)\"\n >\n </ag-grid-angular>\n </div>\n</div>\n",
19097
19077
  styles: [""]
19098
19078
  },] }
@@ -19162,11 +19142,11 @@
19162
19142
  toolbar_custom_commands: [{ type: i0.Input }],
19163
19143
  exec_params: [{ type: i0.Input }],
19164
19144
  command: [{ type: i0.Output }],
19165
- gf: [{ type: i0.ViewChild, args: ['gf',] }],
19166
- toggle_mantieni: [{ type: i0.ViewChild, args: ['toggle_mantieni',] }],
19145
+ gf: [{ type: i0.ViewChild, args: ["gf",] }],
19146
+ toggle_mantieni: [{ type: i0.ViewChild, args: ["toggle_mantieni",] }],
19167
19147
  init_end: [{ type: i0.Output }],
19168
19148
  off_set: [{ type: i0.Input }],
19169
- onResize: [{ type: i0.HostListener, args: ['window:resize', ['event'],] }]
19149
+ onResize: [{ type: i0.HostListener, args: ["window:resize", ["event"],] }]
19170
19150
  };
19171
19151
 
19172
19152
  var win_assegna_a = /** @class */ (function () {