@fluxhub/fluxhub-lib 9.0.118 → 9.0.120

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.
@@ -332,7 +332,6 @@
332
332
  var UtilityService = /** @class */ (function () {
333
333
  function UtilityService(app_s) {
334
334
  this.app_s = app_s;
335
- this.simpleCrypt = new ngxSimpleCrypt.SimpleCrypt();
336
335
  }
337
336
  UtilityService_1 = UtilityService;
338
337
  UtilityService.prototype.set_home_title = function (s) {
@@ -856,10 +855,12 @@
856
855
  return enc;
857
856
  };
858
857
  UtilityService.prototype.encrypt_v2 = function (s) {
859
- return this.simpleCrypt.encode("prologika_fluxhub_etjda", s);
858
+ var simpleCrypt = new ngxSimpleCrypt.SimpleCrypt();
859
+ return simpleCrypt.encode("prologika_fluxhub_etjda", s);
860
860
  };
861
861
  UtilityService.prototype.decrypt_v2 = function (s) {
862
- return this.simpleCrypt.decode("prologika_fluxhub_etjda", s);
862
+ var simpleCrypt = new ngxSimpleCrypt.SimpleCrypt();
863
+ return simpleCrypt.decode("prologika_fluxhub_etjda", s);
863
864
  };
864
865
  UtilityService.prototype.string_sqlvalue = function (s) {
865
866
  if (s == null)
@@ -2179,7 +2180,7 @@
2179
2180
  FHUploadComponent = __decorate([
2180
2181
  core.Component({
2181
2182
  selector: 'FHUpload',
2182
- template: "\n\n <div *ngIf=\"loading\" fxLayout=\"row\">\n WAIT\n </div>\n <div [hidden]=\"!(enabled && !loading)\" fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <div [hidden]=\"!multi_list\" style=\"width:380px\" fxLayoutAlign=\"start center\">\n <FHComboBox [sql]=\"tipo\" #cmb_tipo [init_fill]=\"false\" label=\"Tipologia\"></FHComboBox>&nbsp;&nbsp;\n </div>\n <mat-form-field [hidden]=\"!show_descri\" style=\"width: 100%\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{label}} {{fixed_label}}</mat-label>\n <input matInput type=\"text\" name=\"descrizione\" [(ngModel)]=\"descrizione\"\n >\n </mat-form-field>\n &nbsp;&nbsp;&nbsp;&nbsp;\n <div style=\"width:140px\" fxLayout=\"row\" fxLayoutAlign=\"start start\" (click)=\"call_up()\">\n <input type=\"file\" multiple ng2FileSelect [uploader]=\"uploader\" name=\"file-fh{{App}}\" id=\"file-fh{{App}}\" class=\"inputfile inputfile-fh\" />\n <label for=\"file-fh{{App}}\" style=\"width:210px\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"17\" viewBox=\"0 0 20 17\"><path d=\"M10 0l-5.2 4.9h3.3v5.1h3.8v-5.1h3.3l-5.2-4.9zm9.3 11.5l-3.2-2.1h-2l3.4 2.6h-3.5c-.1 0-.2.1-.2.1l-.8 2.3h-6l-.8-2.2c-.1-.1-.1-.2-.2-.2h-3.6l3.4-2.6h-2l-3.2 2.1c-.4.3-.7 1-.6 1.5l.6 3.1c.1.5.7.9 1.2.9h16.3c.6 0 1.1-.4 1.3-.9l.6-3.1c.1-.5-.2-1.2-.7-1.5z\"/></svg><span style=\"font-size: 12px\">&nbsp;&nbsp;&nbsp;Upload</span></label>\n </div>\n <div fxLayout=\"row\" fxLayoutAlign=\"start start\">\n <button mat-flat-button *ngIf=\"b_edit_loaded\" (click)=\"download_all()\" style=\"font-size: 12px\">{{label_b}}</button>&nbsp;&nbsp;&nbsp;\n <button mat-flat-button *ngIf=\"id!=null && allow_delete\" (click)=\"del_doc()\" color=\"warn\">\n <mat-icon>delete</mat-icon>\n </button>\n </div>\n </div>\n <div *ngIf=\"!enabled\" fxLayout=\"row\">\n <label>{{label}}:</label>{{descrizione}}\n <button mat-flat-button *ngIf=\"b_edit_loaded\" (click)=\"download_all()\" style=\"font-size: 15px;background-color: #F5F5F5\">{{label_b}}</button>\n\n </div>\n\n ",
2183
+ template: "\n\n <div *ngIf=\"loading\" fxLayout=\"row\">\n WAIT\n </div>\n <div [hidden]=\"!(enabled && !loading)\" fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <div [hidden]=\"!multi_list\" style=\"width:380px\" fxLayoutAlign=\"start center\">\n <FHComboBox [sql]=\"tipo\" #cmb_tipo [init_fill]=\"false\" label=\"Tipologia\"></FHComboBox>&nbsp;&nbsp;\n </div>\n <mat-form-field [hidden]=\"!show_descri\" style=\"width: 100%\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{label}} {{fixed_label}}</mat-label>\n <input matInput type=\"text\" name=\"descrizione\" [(ngModel)]=\"descrizione\"\n >\n </mat-form-field>\n &nbsp;&nbsp;&nbsp;&nbsp;\n <div style=\"width:140px\" fxLayout=\"row\" fxLayoutAlign=\"start start\" (click)=\"call_up()\">\n <input type=\"file\" multiple ng2FileSelect [uploader]=\"uploader\" name=\"file-fh{{App}}\" id=\"file-fh{{App}}\" class=\"inputfile inputfile-fh\" />\n <label for=\"file-fh{{App}}\" style=\"width:210px\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"17\" viewBox=\"0 0 20 17\"><path d=\"M10 0l-5.2 4.9h3.3v5.1h3.8v-5.1h3.3l-5.2-4.9zm9.3 11.5l-3.2-2.1h-2l3.4 2.6h-3.5c-.1 0-.2.1-.2.1l-.8 2.3h-6l-.8-2.2c-.1-.1-.1-.2-.2-.2h-3.6l3.4-2.6h-2l-3.2 2.1c-.4.3-.7 1-.6 1.5l.6 3.1c.1.5.7.9 1.2.9h16.3c.6 0 1.1-.4 1.3-.9l.6-3.1c.1-.5-.2-1.2-.7-1.5z\"/></svg><span style=\"font-size: 12px\">&nbsp;&nbsp;&nbsp;Upload</span></label>\n </div>\n <div fxLayout=\"row\" fxLayoutAlign=\"start start\">\n <button mat-flat-button *ngIf=\"b_edit_loaded\" (click)=\"download_all()\" style=\"font-size: 12px\">{{label_b}}</button>&nbsp;&nbsp;&nbsp;\n <button mat-flat-button *ngIf=\"id!=null && allow_delete\" (click)=\"del_doc()\" color=\"warn\">\n <mat-icon>delete</mat-icon>\n </button>\n </div>\n </div>\n <div *ngIf=\"!enabled\" fxLayout=\"row\" fxLayoutGap=\"10px\">\n <label>{{label}}:</label><div *ngIf=\"label!=descrizione\">{{descrizione}}</div>\n <button mat-flat-button *ngIf=\"b_edit_loaded\" (click)=\"download_all()\" style=\"font-size: 12px;background-color: #F5F5F5\">{{label_b}}</button>\n </div>\n\n ",
2183
2184
  styles: ["\n\n "]
2184
2185
  }),
2185
2186
  __metadata("design:paramtypes", [QueryService, ngxToastr.ToastrService, dialog.MatDialog, AppService])
@@ -5619,7 +5620,12 @@
5619
5620
  for (var j = 0; j < p_col.length; j++) {
5620
5621
  if (str_fields != '')
5621
5622
  str_fields += ',';
5622
- str_fields += '[' + p_col[j].getColDef().field + '] [' + p_col[j].getColDef().headerName + ']';
5623
+ if (p_col[j].getColDef().headerName == null)
5624
+ str_fields += '[' + p_col[j].getColDef().field + ']';
5625
+ else if (p_col[j].getColDef().headerName == null)
5626
+ str_fields += '[' + p_col[j].getColDef().field + ']';
5627
+ else
5628
+ str_fields += '[' + p_col[j].getColDef().field + '] [' + p_col[j].getColDef().headerName + ']';
5623
5629
  }
5624
5630
  if (this.fields.indexOf('DISTINCT') != -1)
5625
5631
  str_fields = 'DISTINCT ' + str_fields;
@@ -7973,7 +7979,7 @@
7973
7979
  { provide: core$1.DateAdapter, useClass: MomentDateAdapter },
7974
7980
  { provide: core$1.MAT_DATE_LOCALE, useValue: 'it-IT' },
7975
7981
  ],
7976
- template: "\n <div [hidden]=\"!show_buttons||!enabled\">\n <button mat-flat-button style=\"background-color: #F5F5F5\" (click)=\"add_year()\">+1 Anno</button>\n <button mat-flat-button style=\"background-color: #F5F5F5\" (click)=\"ini_year()\">Inizio Anno</button>\n <button mat-flat-button style=\"background-color: #F5F5F5\" (click)=\"fin_year()\">Fine Anno</button>\n </div>\n\n <mat-form-field (click)=\"chxx($event)\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{label}}</mat-label>\n <input [disabled]=\"!enabled\" #pickerId (dateChange)=\"ch($event)\" (focusout)=\"dt_chg($event)\" (keyup)=\"checkInput($event)\"\n (click)=\"chxx($event)\" [(ngModel)]=\"date_sel\" matInput [matDatepicker]=\"picker\" >\n <mat-datepicker-toggle matSuffix [for]=\"picker\" (click)=\"chxx($event)\"></mat-datepicker-toggle>\n <mat-datepicker (click)=\"chxx($event)\" #picker></mat-datepicker>\n </mat-form-field>\n\n ",
7982
+ template: "\n <div [hidden]=\"!show_buttons||!enabled\">\n <button mat-flat-button style=\"background-color: #F5F5F5\" (click)=\"add_year()\">+1 Anno</button>\n <button mat-flat-button style=\"background-color: #F5F5F5\" (click)=\"ini_year()\">Inizio Anno</button>\n <button mat-flat-button style=\"background-color: #F5F5F5\" (click)=\"fin_year()\">Fine Anno</button>\n </div>\n\n <mat-form-field (click)=\"chxx($event)\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{label}}</mat-label>\n <input [disabled]=\"!enabled\" #pickerId (dateChange)=\"ch($event)\" (focusout)=\"dt_chg($event)\" (keyup)=\"checkInput($event)\"\n [min]=\"min_date\" [max]=\"max_date\" (click)=\"chxx($event)\" [(ngModel)]=\"date_sel\" matInput [matDatepicker]=\"picker\" >\n <mat-datepicker-toggle matSuffix [for]=\"picker\" (click)=\"chxx($event)\"></mat-datepicker-toggle>\n <mat-datepicker (click)=\"chxx($event)\" #picker></mat-datepicker>\n </mat-form-field>\n\n ",
7977
7983
  styles: ["\n .lb_small_grigia {\n font-size: 15px;\n color: #B8B8B8;\n }\n\n .label_dis {\n font-size: 14px;\n font-weight: bold;\n }\n\n :host.ng-invalid > .ng-touched ::ng-deep .mat-input-element,\n :host.ng-invalid > .ng-touched ::ng-deep .mat-form-field-label {\n color: #f44336;\n }\n\n :host.ng-invalid > .ng-touched ::ng-deep .mat-form-field-underline,\n :host.ng-invalid > .ng-touched ::ng-deep .mat-form-field-ripple {\n background-color: #f44336;\n }\n "]
7978
7984
  }),
7979
7985
  __metadata("design:paramtypes", [core$1.DateAdapter, UtilityService])
@@ -8824,32 +8830,28 @@
8824
8830
  return FHLogPanelComponent;
8825
8831
  }());
8826
8832
 
8827
- var noop$6 = function () {
8828
- };
8833
+ var noop$6 = function () { };
8829
8834
  var ɵ0$6 = noop$6;
8830
8835
  var CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$7 = {
8831
8836
  provide: forms.NG_VALUE_ACCESSOR,
8832
8837
  useExisting: core.forwardRef(function () { return FHCurrencyFieldComponent; }),
8833
- multi: true
8838
+ multi: true,
8834
8839
  };
8835
8840
  var FHCurrencyFieldComponent = /** @class */ (function () {
8836
8841
  function FHCurrencyFieldComponent() {
8837
8842
  this.decimal = 2;
8838
- this.label = '';
8843
+ this.label = "";
8839
8844
  this.required = false;
8840
8845
  this.enabled = true;
8841
8846
  this.hidden = false;
8842
- this.color = '';
8843
- this.m_color = '';
8847
+ this.color = "";
8848
+ this.m_color = "";
8844
8849
  this.label_width = "";
8845
8850
  this.change = new core.EventEmitter();
8846
8851
  this.enter_pressed = new core.EventEmitter();
8847
- this.innerValue = 0;
8848
- this.onChange = function (_) {
8849
- };
8850
- this.onTouched = function () {
8851
- };
8852
- this.formattedAmount = '0,00';
8852
+ this.onChange = function (_) { };
8853
+ this.onTouched = function () { };
8854
+ this.formattedAmount = "0,00";
8853
8855
  this.value = 0;
8854
8856
  }
8855
8857
  FHCurrencyFieldComponent.prototype.kd = function (event) {
@@ -8857,6 +8859,15 @@
8857
8859
  this.enter_pressed.emit();
8858
8860
  }
8859
8861
  };
8862
+ FHCurrencyFieldComponent.prototype.click_select_allf = function (element) {
8863
+ var _this = this;
8864
+ setTimeout(function () {
8865
+ _this.el.nativeElement.select();
8866
+ }, 200);
8867
+ };
8868
+ FHCurrencyFieldComponent.prototype.select_allf = function (element) {
8869
+ this.el.nativeElement.select();
8870
+ };
8860
8871
  FHCurrencyFieldComponent.prototype.getStyle_color = function () {
8861
8872
  return this.m_color;
8862
8873
  };
@@ -8869,15 +8880,21 @@
8869
8880
  FHCurrencyFieldComponent.prototype.chg = function () {
8870
8881
  var _this = this;
8871
8882
  setTimeout(function () {
8872
- _this.value = parseFloat(_this.formattedAmount.split('.').join('').split(',').join('.'));
8883
+ _this.value = parseFloat(_this.formattedAmount.split(".").join("").split(",").join("."));
8873
8884
  _this.onChange(_this.value);
8874
8885
  }, 50);
8875
8886
  };
8876
8887
  FHCurrencyFieldComponent.prototype.writeValue = function (value) {
8888
+ if (this.value == parseFloat(this.formattedAmount.split(".").join("").split(",").join("."))) {
8889
+ this.formattedAmount = this.transform(this.value, this.decimal);
8890
+ return;
8891
+ }
8877
8892
  if (value == null)
8878
8893
  value = 0;
8879
8894
  // if (value !== this.innerValue) {
8880
- this.innerValue = value;
8895
+ if (typeof (value) == 'string') {
8896
+ value = parseFloat(value.split(".").join("").split(",").join("."));
8897
+ }
8881
8898
  this.value = value;
8882
8899
  this.formattedAmount = this.transform(this.value, this.decimal);
8883
8900
  //}
@@ -8895,7 +8912,7 @@
8895
8912
  // if (typeof (element.target.value) !== 'number')
8896
8913
  // this.formattedAmount = this.currencyPipe.transform(this.value);
8897
8914
  setTimeout(function () {
8898
- _this.value = parseFloat(_this.formattedAmount.split('.').join('').split(',').join('.'));
8915
+ _this.value = parseFloat(_this.formattedAmount.split(".").join("").split(",").join("."));
8899
8916
  // this.writeValue(this.value);
8900
8917
  _this.formattedAmount = _this.transform(_this.value, _this.decimal);
8901
8918
  }, 50);
@@ -8909,13 +8926,17 @@
8909
8926
  };
8910
8927
  FHCurrencyFieldComponent.prototype.transform = function (value, fractionSize) {
8911
8928
  if (fractionSize === void 0) { fractionSize = 2; }
8912
- var _a = __read((value || "").toString().split('.'), 2), integer = _a[0], _b = _a[1], fraction = _b === void 0 ? "" : _b;
8913
- fraction = fractionSize > 0
8914
- ? ',' + (fraction + '000000').substring(0, fractionSize)
8915
- : "";
8916
- integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, '.');
8917
- if (integer == '')
8918
- integer = '0';
8929
+ if (typeof (value) == 'string') {
8930
+ value = parseFloat(value.split(".").join("").split(",").join("."));
8931
+ }
8932
+ var _a = __read((value || "").toString().split("."), 2), integer = _a[0], _b = _a[1], fraction = _b === void 0 ? "" : _b;
8933
+ fraction =
8934
+ fractionSize > 0
8935
+ ? "," + (fraction + "000000").substring(0, fractionSize)
8936
+ : "";
8937
+ integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, ".");
8938
+ if (integer == "")
8939
+ integer = "0";
8919
8940
  return integer + fraction;
8920
8941
  };
8921
8942
  FHCurrencyFieldComponent.prototype.removeCurrencyPipeFormat = function (element) {
@@ -8942,7 +8963,7 @@
8942
8963
  });
8943
8964
  };
8944
8965
  __decorate([
8945
- core.ViewChild('el'),
8966
+ core.ViewChild("el"),
8946
8967
  __metadata("design:type", core.ElementRef)
8947
8968
  ], FHCurrencyFieldComponent.prototype, "el", void 0);
8948
8969
  __decorate([
@@ -8987,10 +9008,10 @@
8987
9008
  ], FHCurrencyFieldComponent.prototype, "value", void 0);
8988
9009
  FHCurrencyFieldComponent = __decorate([
8989
9010
  core.Component({
8990
- selector: 'FHCurrencyField',
9011
+ selector: "FHCurrencyField",
8991
9012
  providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$7],
8992
- template: "\n <mat-form-field [hidden]=\"!enabled || hidden\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{label}}</mat-label>\n <input type=\"text\" style=\"text-align:right\" #el matInput\n [disabled]=\"!enabled\" [(ngModel)]=\"formattedAmount\"\n (blur)=\"transformAmount($event)\" [style.color]=\"getStyle_color()\" (keydown)=\"kd($event)\"\n (focus)=\"removeCurrencyPipeFormat($event)\" (keyup)=\"chg()\"\n pattern=\"[-+]?[0-9]*[.,]?[0-9]+\">\n </mat-form-field>\n <mat-form-field [hidden]=\"enabled || hidden\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{label}}</mat-label>\n <input type=\"text\" style=\"text-align:right\" [style.color]=\"getStyle_color()\" #el1 matInput [disabled]=\"true\"\n [(ngModel)]=\"formattedAmount\"\n >\n </mat-form-field>\n ",
8993
- styles: ["\n\n "]
9013
+ template: "\n <mat-form-field\n [hidden]=\"!enabled || hidden\"\n appearance=\"outline\"\n floatLabel=\"always\"\n ><mat-label>{{ label }}</mat-label>\n <input\n type=\"text\"\n style=\"text-align:right\"\n #el\n matInput\n [disabled]=\"!enabled\"\n [(ngModel)]=\"formattedAmount\"\n (focusout)=\"chg()\"\n [style.color]=\"getStyle_color()\"\n (keydown)=\"kd($event)\"\n (click)=\"click_select_allf($event)\"\n (focus)=\"removeCurrencyPipeFormat($event); select_allf($event)\"\n />\n </mat-form-field>\n <mat-form-field\n [hidden]=\"enabled || hidden\"\n appearance=\"outline\"\n floatLabel=\"always\"\n ><mat-label>{{ label }}</mat-label>\n <input\n type=\"text\"\n style=\"text-align:right\"\n [style.color]=\"getStyle_color()\"\n #el1\n matInput\n [disabled]=\"true\"\n [(ngModel)]=\"formattedAmount\"\n />\n </mat-form-field>\n ",
9014
+ styles: [""]
8994
9015
  }),
8995
9016
  __metadata("design:paramtypes", [])
8996
9017
  ], FHCurrencyFieldComponent);
@@ -10475,7 +10496,14 @@
10475
10496
  }
10476
10497
  if (crypt) {
10477
10498
  if (json_format) {
10478
- resolve(JSON.parse(_this.uti.decrypt_v2(localStorage.getItem(key))));
10499
+ try {
10500
+ resolve(JSON.parse(_this.uti.decrypt_v2(localStorage.getItem(key))));
10501
+ }
10502
+ catch (e) {
10503
+ console.log(e, 'Errore JSON ' + ' ' + _this.uti.decrypt_v2(localStorage.getItem(key)));
10504
+ resolve({});
10505
+ return;
10506
+ }
10479
10507
  return;
10480
10508
  }
10481
10509
  else {
@@ -10485,7 +10513,14 @@
10485
10513
  }
10486
10514
  else {
10487
10515
  if (json_format) {
10488
- resolve(JSON.parse('' + localStorage.getItem(key)));
10516
+ try {
10517
+ resolve(JSON.parse('' + localStorage.getItem(key)));
10518
+ }
10519
+ catch (e) {
10520
+ console.log(e, 'Errore JSON ' + localStorage.getItem(key));
10521
+ resolve({});
10522
+ return;
10523
+ }
10489
10524
  return;
10490
10525
  }
10491
10526
  else {
@@ -10493,8 +10528,6 @@
10493
10528
  return;
10494
10529
  }
10495
10530
  }
10496
- resolve(null);
10497
- return;
10498
10531
  });
10499
10532
  };
10500
10533
  LocalDBService.prototype.write = function (k, obj, crypt, json_format) {
@@ -12841,8 +12874,8 @@
12841
12874
  console.log('min_liv ', min_liv);
12842
12875
  for (var i = 0; i < this.livs.length; i++)
12843
12876
  if (min_liv == this.livs[i].livello) {
12844
- console.log('this.user_idp.toUpperCase() ', this.user_idp.toUpperCase());
12845
- console.log('this.livs[i].idp.toUpperCase() ', this.livs[i].idp.toUpperCase());
12877
+ //console.log('this.user_idp.toUpperCase() ',this.user_idp.toUpperCase());
12878
+ //console.log('this.livs[i].idp.toUpperCase() ',this.livs[i].idp.toUpperCase() );
12846
12879
  if (this.user_idp.toUpperCase() == this.livs[i].idp.toUpperCase() || this.livs[i].gruppo_parallelo == '*ALLUSERS') {
12847
12880
  if (this.livs[i].abilita_indietro == 1)
12848
12881
  this.respingi_enabled = true;