@fluxhub/fluxhub-lib 11.0.122 → 11.0.124

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);
@@ -18382,15 +18389,15 @@
18382
18389
  },
18383
18390
  };
18384
18391
  this.init_opt = true;
18385
- if (this.grid_key == 'PRO_H')
18392
+ if (this.grid_key == "PRO_H")
18386
18393
  this.no_pref = true;
18387
18394
  setTimeout(function () {
18388
18395
  if (_this.end_point == null)
18389
18396
  _this.end_point =
18390
18397
  _this.m_appService.API_ENDPOINT + _this.m_appService.GRID_ENDPOINT;
18391
- if (localStorage.getItem(_this.grid_key + '_FILTER_UP') != null)
18398
+ if (localStorage.getItem(_this.grid_key + "_FILTER_UP") != null)
18392
18399
  _this.ric_libera =
18393
- localStorage.getItem(_this.grid_key + '_FILTER_UP') || '';
18400
+ localStorage.getItem(_this.grid_key + "_FILTER_UP") || "";
18394
18401
  _this.onResize();
18395
18402
  });
18396
18403
  };
@@ -18463,27 +18470,27 @@
18463
18470
  return i;
18464
18471
  };
18465
18472
  FHGridComponentN.prototype.getquerySelected = function (f, t) {
18466
- var s = '';
18467
- if (t == 'String') {
18473
+ var s = "";
18474
+ if (t == "String") {
18468
18475
  if (this.gridOptions.api)
18469
18476
  this.gridOptions.api.forEachNode(function (node) {
18470
18477
  if (node.isSelected())
18471
18478
  if (node.data[f] != null) {
18472
- if (s != '')
18473
- s = s + ',';
18479
+ if (s != "")
18480
+ s = s + ",";
18474
18481
  s = s + "'" + node.data[f] + "'";
18475
18482
  }
18476
18483
  });
18477
18484
  }
18478
18485
  // console.log('ENTRO '+f+" "+t);
18479
- if (t == 'Number') {
18486
+ if (t == "Number") {
18480
18487
  if (this.gridOptions.api)
18481
18488
  this.gridOptions.api.forEachNode(function (node) {
18482
18489
  if (node.isSelected())
18483
18490
  if (node.data[f] != null) {
18484
18491
  // console.log('selected');
18485
- if (s != '')
18486
- s = s + ',';
18492
+ if (s != "")
18493
+ s = s + ",";
18487
18494
  s = s + node.data[f];
18488
18495
  }
18489
18496
  });
@@ -18508,14 +18515,14 @@
18508
18515
  };
18509
18516
  FHGridComponentN.prototype.pulisci_filtri = function (resetr) {
18510
18517
  if (resetr === void 0) { resetr = true; }
18511
- localStorage.removeItem(this.grid_key + '_FILTER');
18518
+ localStorage.removeItem(this.grid_key + "_FILTER");
18512
18519
  if (resetr) {
18513
- if (this.ric_libera != '')
18514
- this.doFill('', true, false);
18515
- this.ric_libera = '';
18516
- localStorage.removeItem(this.grid_key + '_FILTER_UP');
18520
+ if (this.ric_libera != "")
18521
+ this.doFill("", true, false);
18522
+ this.ric_libera = "";
18523
+ localStorage.removeItem(this.grid_key + "_FILTER_UP");
18517
18524
  }
18518
- this.fix_flt_temp = '';
18525
+ this.fix_flt_temp = "";
18519
18526
  if (this.gridOptions.api)
18520
18527
  this.gridOptions.api.setFilterModel(null);
18521
18528
  var filtrtm = {}; /*
@@ -18529,9 +18536,9 @@
18529
18536
  };
18530
18537
  FHGridComponentN.prototype.print = function () {
18531
18538
  if (this.custom_export)
18532
- this.command.emit({ cmd: 'print_pdf' });
18539
+ this.command.emit({ cmd: "print_pdf" });
18533
18540
  else
18534
- this.export_excel('pdf');
18541
+ this.export_excel("pdf");
18535
18542
  };
18536
18543
  FHGridComponentN.prototype.init_conf = function () {
18537
18544
  // console.log(" init_conf()");
@@ -18559,18 +18566,19 @@
18559
18566
  this.ckk_ed = true;
18560
18567
  if (this.toggle_mantieni != null) {
18561
18568
  this.toggle_mantieni.checked = true;
18562
- if (localStorage.getItem(this.grid_key + '_MANTIENI') != null)
18563
- if (localStorage.getItem(this.grid_key + '_MANTIENI') == 'NO') {
18569
+ if (localStorage.getItem(this.grid_key + "_MANTIENI") != null)
18570
+ if (localStorage.getItem(this.grid_key + "_MANTIENI") == "NO") {
18564
18571
  this.toggle_mantieni.checked = false;
18565
18572
  }
18566
18573
  }
18567
18574
  this.res_columns();
18568
- if (localStorage.getItem(this.grid_key + '_POS') != null)
18575
+ if (localStorage.getItem(this.grid_key + "_POS") != null)
18569
18576
  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(' ');
18577
+ if (localStorage.getItem(this.grid_key + "_FILTER_UP") != null)
18578
+ if (localStorage.getItem(this.grid_key + "_FILTER_UP") != "") {
18579
+ this.ric_libera =
18580
+ localStorage.getItem(this.grid_key + "_FILTER_UP") || "";
18581
+ var arr = this.ric_libera.split(" ");
18574
18582
  var arr_F_1 = new Array();
18575
18583
  for (var i = 0; i < arr.length; i++)
18576
18584
  arr_F_1.push(arr[i]);
@@ -18579,27 +18587,27 @@
18579
18587
  // this._toast.error("ignorato termine: " + arr[i] + " troppo corto");
18580
18588
  if (arr_F_1.length == 0)
18581
18589
  return;
18582
- var ss = '';
18590
+ var ss = "";
18583
18591
  var _loop_1 = function (i) {
18584
- var ss_r = '';
18592
+ var ss_r = "";
18585
18593
  for (var y = 0; y < this_1.columnDefs.length; y++) {
18586
18594
  if (this_1.columnDefs[y] != null)
18587
18595
  if (this_1.columnDefs[y].no_filter == null)
18588
18596
  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 ';
18597
+ if (this_1.columnDefs[y].field != "")
18598
+ if (this_1.columnDefs[y].filter != "agDateColumnFilter") {
18599
+ if (ss_r != "")
18600
+ ss_r += " or ";
18593
18601
  ss_r +=
18594
18602
  this_1.columnDefs[y].field +
18595
18603
  " LIKE '%" +
18596
18604
  arr_F_1[i]
18597
18605
  .replace("'", "$'")
18598
- .replace('*', '$*')
18599
- .replace('?', '$?')
18600
- .replace('[', '$[')
18601
- .replace(']', '$]')
18602
- .replace('!', "'$")
18606
+ .replace("*", "$*")
18607
+ .replace("?", "$?")
18608
+ .replace("[", "$[")
18609
+ .replace("]", "$]")
18610
+ .replace("!", "'$")
18603
18611
  .toUpperCase() +
18604
18612
  "%' ESCAPE '$'";
18605
18613
  }
@@ -18607,27 +18615,27 @@
18607
18615
  if (this_1.full_text_added_columns != null)
18608
18616
  this_1.full_text_added_columns.map(function (v) {
18609
18617
  if (v != null)
18610
- if (v != '') {
18611
- if (ss_r != '')
18612
- ss_r += ' or ';
18618
+ if (v != "") {
18619
+ if (ss_r != "")
18620
+ ss_r += " or ";
18613
18621
  ss_r +=
18614
18622
  v +
18615
18623
  " LIKE '%" +
18616
18624
  arr_F_1[i]
18617
18625
  .replace("'", "$'")
18618
- .replace('*', '$*')
18619
- .replace('?', '$?')
18620
- .replace('[', '$[')
18621
- .replace(']', '$]')
18622
- .replace('!', "'$")
18626
+ .replace("*", "$*")
18627
+ .replace("?", "$?")
18628
+ .replace("[", "$[")
18629
+ .replace("]", "$]")
18630
+ .replace("!", "'$")
18623
18631
  .toUpperCase() +
18624
18632
  "%' ESCAPE '$'";
18625
18633
  }
18626
18634
  });
18627
- if (ss_r != '') {
18628
- if (ss != '')
18629
- ss += ' and ';
18630
- ss += '(' + ss_r + ')';
18635
+ if (ss_r != "") {
18636
+ if (ss != "")
18637
+ ss += " and ";
18638
+ ss += "(" + ss_r + ")";
18631
18639
  }
18632
18640
  };
18633
18641
  var this_1 = this;
@@ -18641,13 +18649,6 @@
18641
18649
  _this.ref_dt();
18642
18650
  }, 100);
18643
18651
  }
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
18652
  };
18652
18653
  FHGridComponentN.prototype.set_init_size = function () {
18653
18654
  var _this = this;
@@ -18665,7 +18666,6 @@
18665
18666
  FHGridComponentN.prototype.res_columns = function (forza) {
18666
18667
  var _this = this;
18667
18668
  if (forza === void 0) { forza = false; }
18668
- console.log("🚀 ~ file: fhgridn.ts:1370 ~ FHGridComponentN ~ res_columns ~ res_columns:", forza);
18669
18669
  if (this.columnDefs == null) {
18670
18670
  setTimeout(function () {
18671
18671
  _this.res_columns(forza);
@@ -18682,19 +18682,19 @@
18682
18682
  var b_rip = false;
18683
18683
  if (this.toggle_mantieni != null)
18684
18684
  b_mantieni_ck = this.toggle_mantieni.checked;
18685
- if (localStorage.getItem(this.grid_key + '_COLS') == null ||
18686
- localStorage.getItem(this.grid_key + '_COLS') == '') {
18685
+ if (localStorage.getItem(this.grid_key + "_COLS") == null ||
18686
+ localStorage.getItem(this.grid_key + "_COLS") == "") {
18687
18687
  this.set_init_size();
18688
18688
  return;
18689
18689
  }
18690
- if (localStorage.getItem(this.grid_key + '_COLS') != null &&
18690
+ if (localStorage.getItem(this.grid_key + "_COLS") != null &&
18691
18691
  (b_mantieni_ck || forza)) {
18692
18692
  // console.log('qqqqq1111');
18693
- if (localStorage.getItem(this.grid_key + '_COLS') != '') {
18693
+ if (localStorage.getItem(this.grid_key + "_COLS") != "") {
18694
18694
  b_rip = true;
18695
18695
  // console.log('qqqqq2222');
18696
18696
  try {
18697
- var a = JSON.parse((localStorage.getItem(this.grid_key + '_COLS') || '[]'));
18697
+ var a = JSON.parse(localStorage.getItem(this.grid_key + "_COLS") || "[]");
18698
18698
  var annulla = true;
18699
18699
  for (var i = 0; i < a.length; i++) {
18700
18700
  if (!a[i].hide)
@@ -18702,13 +18702,15 @@
18702
18702
  }
18703
18703
  // console.log('qqqqq3333 ',annulla);
18704
18704
  if (annulla)
18705
- localStorage.getItem(this.grid_key + '_COLS');
18705
+ localStorage.getItem(this.grid_key + "_COLS");
18706
18706
  else {
18707
18707
  // console.log('qqqqq4444');
18708
- if (localStorage.getItem(this.grid_key + '_COLS'))
18708
+ if (localStorage.getItem(this.grid_key + "_COLS"))
18709
18709
  if (this.gridOptions.columnApi) {
18710
18710
  // console.log('qqqqq5555',JSON.parse(localStorage.getItem(this.grid_key + '_COLS')||'{}'));
18711
- var colState = { state: JSON.parse(localStorage.getItem(this.grid_key + '_COLS') || '{}') };
18711
+ var colState = {
18712
+ state: JSON.parse(localStorage.getItem(this.grid_key + "_COLS") || "{}"),
18713
+ };
18712
18714
  this.gridOptions.columnApi.applyColumnState(colState);
18713
18715
  }
18714
18716
  }
@@ -18718,37 +18720,12 @@
18718
18720
  }
18719
18721
  }
18720
18722
  }
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 &&
18723
+ if (localStorage.getItem(this.grid_key + "_FILTER") != null &&
18747
18724
  (b_mantieni_ck || forza))
18748
- if (localStorage.getItem(this.grid_key + '_FILTER') != '') {
18725
+ if (localStorage.getItem(this.grid_key + "_FILTER") != "") {
18749
18726
  try {
18750
18727
  if (this.gridOptions.api)
18751
- this.gridOptions.api.setFilterModel(JSON.parse((localStorage.getItem(this.grid_key + '_FILTER')) || ''));
18728
+ this.gridOptions.api.setFilterModel(JSON.parse(localStorage.getItem(this.grid_key + "_FILTER") || ""));
18752
18729
  }
18753
18730
  catch (eer) {
18754
18731
  console.log(eer);
@@ -18756,13 +18733,14 @@
18756
18733
  }
18757
18734
  };
18758
18735
  FHGridComponentN.prototype.getRows = function () {
18759
- return (this.gridOptions.rowData || []);
18736
+ return this.gridOptions.rowData || [];
18760
18737
  };
18761
18738
  FHGridComponentN.prototype.sortAndFilter = function (sortModel, filterModel) {
18762
18739
  // return sortData(sortModel, filterData(filterModel, allOfTheData))
18763
18740
  };
18764
18741
  FHGridComponentN.prototype.ref_dt = function () {
18765
18742
  var _this = this;
18743
+ console.log("🚀 ~ file: fhgridn.ts:1460 ~ FHGridComponentN ~ ref_dt ~ ref_dt: try init!!!!");
18766
18744
  if (this.gridOptions == null)
18767
18745
  setTimeout(function () {
18768
18746
  _this.ref_dt();
@@ -18772,8 +18750,10 @@
18772
18750
  setTimeout(function () {
18773
18751
  _this.ref_dt();
18774
18752
  }, 500);
18775
- else
18753
+ else {
18754
+ console.log("ref_dt!!!!");
18776
18755
  this.gridOptions.api.setServerSideDatasource(this.dataSource);
18756
+ }
18777
18757
  }
18778
18758
  };
18779
18759
  FHGridComponentN.prototype.updateRow = function () {
@@ -18793,14 +18773,14 @@
18793
18773
  this.setHeaderHeight(this.header_h);
18794
18774
  if (this.gf != null && this.show_buttons && !this.pref_hidden) {
18795
18775
  if (!this.private_pref)
18796
- this.gf.sql = 'SELECT_CFG_GRID';
18776
+ this.gf.sql = "SELECT_CFG_GRID";
18797
18777
  else
18798
- this.gf.sql = 'SELECT_CFG_GRID_BY_USER';
18799
- this.gf.types = ['string'];
18778
+ this.gf.sql = "SELECT_CFG_GRID_BY_USER";
18779
+ this.gf.types = ["string"];
18800
18780
  this.gf.values = [this.grid_key];
18801
18781
  this.gf.fillCombo();
18802
- if (localStorage.getItem(this.grid_key + '_MANTIENI') != 'NO')
18803
- if (localStorage.getItem(this.grid_key + '_CFG_DEFAULT') != null) {
18782
+ if (localStorage.getItem(this.grid_key + "_MANTIENI") != "NO")
18783
+ if (localStorage.getItem(this.grid_key + "_CFG_DEFAULT") != null) {
18804
18784
  return;
18805
18785
  }
18806
18786
  }
@@ -18815,16 +18795,16 @@
18815
18795
  };
18816
18796
  FHGridComponentN.prototype.save_cfg = function () {
18817
18797
  if (this.gridOptions.columnApi)
18818
- localStorage.setItem(this.grid_key + '_COLS', JSON.stringify(this.gridOptions.columnApi.getColumnState()));
18798
+ localStorage.setItem(this.grid_key + "_COLS", JSON.stringify(this.gridOptions.columnApi.getColumnState()));
18819
18799
  };
18820
18800
  FHGridComponentN.prototype.fe_cfg = function () {
18821
18801
  if (this.gf != null)
18822
18802
  if (this.gf.getObj() != null)
18823
- if (localStorage.getItem(this.grid_key + '_MANTIENI') != 'NO') {
18824
- this.gf.setByDescri((localStorage.getItem(this.grid_key + '_CFG_DEFAULT') || ''));
18825
- localStorage.setItem(this.grid_key + '_COLS', this.gf.getObj().COLS);
18803
+ if (localStorage.getItem(this.grid_key + "_MANTIENI") != "NO") {
18804
+ this.gf.setByDescri(localStorage.getItem(this.grid_key + "_CFG_DEFAULT") || "");
18805
+ localStorage.setItem(this.grid_key + "_COLS", this.gf.getObj().COLS);
18826
18806
  // localStorage.setItem(this.grid_key + "_SORT", this.gf.getObj().SORT);
18827
- localStorage.setItem(this.grid_key + '_FILTER', this.gf.getObj().FILTER);
18807
+ localStorage.setItem(this.grid_key + "_FILTER", this.gf.getObj().FILTER);
18828
18808
  this.curr_config = this.gf.getValue();
18829
18809
  }
18830
18810
  this.onready_go();
@@ -18850,15 +18830,15 @@
18850
18830
  }
18851
18831
  };
18852
18832
  FHGridComponentN.prototype.free_search = function () {
18853
- if (this.ric_libera == '') {
18833
+ if (this.ric_libera == "") {
18854
18834
  this.pulisci_filtri();
18855
- this.fix_flt_temp = '';
18856
- this.doFill('', true, false);
18857
- localStorage.removeItem(this.grid_key + '_FILTER_UP');
18835
+ this.fix_flt_temp = "";
18836
+ this.doFill("", true, false);
18837
+ localStorage.removeItem(this.grid_key + "_FILTER_UP");
18858
18838
  return;
18859
18839
  }
18860
- localStorage.setItem(this.grid_key + '_FILTER_UP', this.ric_libera);
18861
- var arr = this.ric_libera.split(' ');
18840
+ localStorage.setItem(this.grid_key + "_FILTER_UP", this.ric_libera);
18841
+ var arr = this.ric_libera.split(" ");
18862
18842
  var arr_F = new Array();
18863
18843
  for (var i = 0; i < arr.length; i++)
18864
18844
  arr_F.push(arr[i]);
@@ -18866,27 +18846,27 @@
18866
18846
  // else this._toast.error("ignorato termine: " + arr[i] + " troppo corto");
18867
18847
  if (arr_F.length == 0)
18868
18848
  return;
18869
- var ss = '';
18849
+ var ss = "";
18870
18850
  var _loop_2 = function (i) {
18871
- var ss_r = '';
18851
+ var ss_r = "";
18872
18852
  for (var y = 0; y < this_2.columnDefs.length; y++) {
18873
18853
  if (this_2.columnDefs[y] != null)
18874
18854
  if (this_2.columnDefs[y].no_filter == null)
18875
18855
  if (this_2.columnDefs[y].field != null)
18876
- if (this_2.columnDefs[y].field != '')
18877
- if (this_2.columnDefs[y].filter != 'agDateColumnFilter') {
18878
- if (ss_r != '')
18879
- ss_r += ' or ';
18856
+ if (this_2.columnDefs[y].field != "")
18857
+ if (this_2.columnDefs[y].filter != "agDateColumnFilter") {
18858
+ if (ss_r != "")
18859
+ ss_r += " or ";
18880
18860
  ss_r +=
18881
18861
  this_2.columnDefs[y].field +
18882
18862
  " LIKE '%" +
18883
18863
  arr_F[i]
18884
18864
  .replace("'", "$'")
18885
- .replace('*', '$*')
18886
- .replace('?', '$?')
18887
- .replace('[', '$[')
18888
- .replace(']', '$]')
18889
- .replace('!', "'$")
18865
+ .replace("*", "$*")
18866
+ .replace("?", "$?")
18867
+ .replace("[", "$[")
18868
+ .replace("]", "$]")
18869
+ .replace("!", "'$")
18890
18870
  .toUpperCase() +
18891
18871
  "%' ESCAPE '$'";
18892
18872
  }
@@ -18894,28 +18874,28 @@
18894
18874
  if (this_2.full_text_added_columns != null)
18895
18875
  this_2.full_text_added_columns.map(function (v) {
18896
18876
  if (v != null)
18897
- if (v != '') {
18898
- if (ss_r != '')
18899
- ss_r += ' or ';
18877
+ if (v != "") {
18878
+ if (ss_r != "")
18879
+ ss_r += " or ";
18900
18880
  ss_r +=
18901
18881
  v +
18902
18882
  " LIKE '%" +
18903
18883
  arr_F[i]
18904
18884
  .replace("'", "$'")
18905
- .replace('*', '$*')
18906
- .replace('?', '$?')
18907
- .replace('[', '$[')
18908
- .replace(']', '$]')
18909
- .replace('!', "'$")
18885
+ .replace("*", "$*")
18886
+ .replace("?", "$?")
18887
+ .replace("[", "$[")
18888
+ .replace("]", "$]")
18889
+ .replace("!", "'$")
18910
18890
  .toUpperCase() +
18911
18891
  "%' ESCAPE '$'";
18912
18892
  }
18913
18893
  });
18914
- if (ss_r != '') {
18894
+ if (ss_r != "") {
18915
18895
  // console.log('ADDO '), ss_r;
18916
- if (ss != '')
18917
- ss += ' and ';
18918
- ss += '(' + ss_r + ')';
18896
+ if (ss != "")
18897
+ ss += " and ";
18898
+ ss += "(" + ss_r + ")";
18919
18899
  }
18920
18900
  };
18921
18901
  var this_2 = this;
@@ -18959,7 +18939,7 @@
18959
18939
  if (this.b_init) {
18960
18940
  // console.log('salvo f: '+JSON.stringify(this.gridOptions.columnApi.getColumnState()));
18961
18941
  if (this.gridOptions.columnApi)
18962
- localStorage.setItem(this.grid_key + '_COLS', JSON.stringify(this.gridOptions.columnApi.getColumnState()));
18942
+ localStorage.setItem(this.grid_key + "_COLS", JSON.stringify(this.gridOptions.columnApi.getColumnState()));
18963
18943
  }
18964
18944
  };
18965
18945
  FHGridComponentN.prototype.onFilterModified = function () {
@@ -18971,7 +18951,7 @@
18971
18951
  setTimeout(function () {
18972
18952
  if (_this.b_init) {
18973
18953
  if (_this.gridOptions.api)
18974
- localStorage.setItem(_this.grid_key + '_FILTER', JSON.stringify(_this.gridOptions.api.getFilterModel()));
18954
+ localStorage.setItem(_this.grid_key + "_FILTER", JSON.stringify(_this.gridOptions.api.getFilterModel()));
18975
18955
  }
18976
18956
  }, 200);
18977
18957
  };
@@ -18984,7 +18964,7 @@
18984
18964
  return;
18985
18965
  if (this.b_init) {
18986
18966
  if (this.gridOptions.columnApi)
18987
- localStorage.setItem(this.grid_key + '_COLS', JSON.stringify(this.gridOptions.columnApi.getColumnState()));
18967
+ localStorage.setItem(this.grid_key + "_COLS", JSON.stringify(this.gridOptions.columnApi.getColumnState()));
18988
18968
  // console.log('salvo s: '+this.gridOptions.api.getSortModel());
18989
18969
  /*
18990
18970
 
@@ -19009,15 +18989,15 @@
19009
18989
  if (selectedInGrid != null)
19010
18990
  if (selectedInGrid[0] != null) {
19011
18991
  // console.log((this.gridOptions.api.getVerticalPixelRange()));
19012
- localStorage.setItem(this.grid_key + '_POS', String(selectedInGrid[0].rowIndex));
18992
+ localStorage.setItem(this.grid_key + "_POS", String(selectedInGrid[0].rowIndex));
19013
18993
  if (this.gridOptions.api)
19014
- localStorage.setItem(this.grid_key + '_POS_BAR', JSON.stringify(this.gridOptions.api.getVerticalPixelRange()));
19015
- localStorage.setItem(this.grid_key + '_POS2', this.getRowNodeId(selectedInGrid[0]));
18994
+ localStorage.setItem(this.grid_key + "_POS_BAR", JSON.stringify(this.gridOptions.api.getVerticalPixelRange()));
18995
+ localStorage.setItem(this.grid_key + "_POS2", this.getRowNodeId(selectedInGrid[0]));
19016
18996
  // this.m_appService.getState().grid_obj=new Object();
19017
18997
  // this.m_appService.getState().grid_obj[this.grid_key+'_NODE']=this.gridOptions.api.getSelectedRows[0];
19018
18998
  }
19019
18999
  this.sRow = $event.data;
19020
- localStorage.setItem(this.grid_key + '_LAST_ROW', JSON.stringify(this.sRow));
19000
+ localStorage.setItem(this.grid_key + "_LAST_ROW", JSON.stringify(this.sRow));
19021
19001
  this.clicked.emit($event.data);
19022
19002
  var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent);
19023
19003
  if (iOS) {
@@ -19081,6 +19061,7 @@
19081
19061
  }, 10);
19082
19062
  };
19083
19063
  FHGridComponentN.prototype.Refresh = function () {
19064
+ console.log("🚀 ~ file: fhgridn.ts:1831 ~ FHGridComponentN ~ Refresh ~ Refresh:");
19084
19065
  this.ref_dt();
19085
19066
  };
19086
19067
  FHGridComponentN.prototype.RefreshOnlyMemory = function () {
@@ -19090,7 +19071,7 @@
19090
19071
  }());
19091
19072
  FHGridComponentN.decorators = [
19092
19073
  { type: i0.Component, args: [{
19093
- selector: 'FHGridN',
19074
+ selector: "FHGridN",
19094
19075
  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",
19095
19076
  styles: [""]
19096
19077
  },] }
@@ -19160,11 +19141,11 @@
19160
19141
  toolbar_custom_commands: [{ type: i0.Input }],
19161
19142
  exec_params: [{ type: i0.Input }],
19162
19143
  command: [{ type: i0.Output }],
19163
- gf: [{ type: i0.ViewChild, args: ['gf',] }],
19164
- toggle_mantieni: [{ type: i0.ViewChild, args: ['toggle_mantieni',] }],
19144
+ gf: [{ type: i0.ViewChild, args: ["gf",] }],
19145
+ toggle_mantieni: [{ type: i0.ViewChild, args: ["toggle_mantieni",] }],
19165
19146
  init_end: [{ type: i0.Output }],
19166
19147
  off_set: [{ type: i0.Input }],
19167
- onResize: [{ type: i0.HostListener, args: ['window:resize', ['event'],] }]
19148
+ onResize: [{ type: i0.HostListener, args: ["window:resize", ["event"],] }]
19168
19149
  };
19169
19150
 
19170
19151
  var win_assegna_a = /** @class */ (function () {