@fluxhub/fluxhub-lib 9.0.118 → 9.0.119

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,23 @@
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("."));
8884
+ console.log('onChange ', _this.value);
8873
8885
  _this.onChange(_this.value);
8874
8886
  }, 50);
8875
8887
  };
8876
8888
  FHCurrencyFieldComponent.prototype.writeValue = function (value) {
8889
+ if (this.value == parseFloat(this.formattedAmount.split(".").join("").split(",").join("."))) {
8890
+ this.formattedAmount = this.transform(this.value, this.decimal);
8891
+ return;
8892
+ }
8877
8893
  if (value == null)
8878
8894
  value = 0;
8879
8895
  // if (value !== this.innerValue) {
8880
- this.innerValue = value;
8896
+ if (typeof (value) == 'string') {
8897
+ value = parseFloat(value.split(".").join("").split(",").join("."));
8898
+ }
8899
+ console.log('value ', value);
8881
8900
  this.value = value;
8882
8901
  this.formattedAmount = this.transform(this.value, this.decimal);
8883
8902
  //}
@@ -8895,7 +8914,7 @@
8895
8914
  // if (typeof (element.target.value) !== 'number')
8896
8915
  // this.formattedAmount = this.currencyPipe.transform(this.value);
8897
8916
  setTimeout(function () {
8898
- _this.value = parseFloat(_this.formattedAmount.split('.').join('').split(',').join('.'));
8917
+ _this.value = parseFloat(_this.formattedAmount.split(".").join("").split(",").join("."));
8899
8918
  // this.writeValue(this.value);
8900
8919
  _this.formattedAmount = _this.transform(_this.value, _this.decimal);
8901
8920
  }, 50);
@@ -8909,13 +8928,21 @@
8909
8928
  };
8910
8929
  FHCurrencyFieldComponent.prototype.transform = function (value, fractionSize) {
8911
8930
  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';
8931
+ console.log('b', typeof (value));
8932
+ if (typeof (value) == 'string') {
8933
+ value = parseFloat(value.split(".").join("").split(",").join("."));
8934
+ }
8935
+ console.log('a', typeof (value));
8936
+ var _a = __read((value || "").toString().split("."), 2), integer = _a[0], _b = _a[1], fraction = _b === void 0 ? "" : _b;
8937
+ console.log('transform ', value);
8938
+ fraction =
8939
+ fractionSize > 0
8940
+ ? "," + (fraction + "000000").substring(0, fractionSize)
8941
+ : "";
8942
+ integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, ".");
8943
+ if (integer == "")
8944
+ integer = "0";
8945
+ console.log('transform end ', integer + fraction);
8919
8946
  return integer + fraction;
8920
8947
  };
8921
8948
  FHCurrencyFieldComponent.prototype.removeCurrencyPipeFormat = function (element) {
@@ -8942,7 +8969,7 @@
8942
8969
  });
8943
8970
  };
8944
8971
  __decorate([
8945
- core.ViewChild('el'),
8972
+ core.ViewChild("el"),
8946
8973
  __metadata("design:type", core.ElementRef)
8947
8974
  ], FHCurrencyFieldComponent.prototype, "el", void 0);
8948
8975
  __decorate([
@@ -8987,10 +9014,10 @@
8987
9014
  ], FHCurrencyFieldComponent.prototype, "value", void 0);
8988
9015
  FHCurrencyFieldComponent = __decorate([
8989
9016
  core.Component({
8990
- selector: 'FHCurrencyField',
9017
+ selector: "FHCurrencyField",
8991
9018
  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 "]
9019
+ 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\n (click)=\"click_select_allf($event)\"\n (focus)=\"removeCurrencyPipeFormat($event); select_allf($event)\"\n\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 ",
9020
+ styles: [""]
8994
9021
  }),
8995
9022
  __metadata("design:paramtypes", [])
8996
9023
  ], FHCurrencyFieldComponent);
@@ -10475,7 +10502,14 @@
10475
10502
  }
10476
10503
  if (crypt) {
10477
10504
  if (json_format) {
10478
- resolve(JSON.parse(_this.uti.decrypt_v2(localStorage.getItem(key))));
10505
+ try {
10506
+ resolve(JSON.parse(_this.uti.decrypt_v2(localStorage.getItem(key))));
10507
+ }
10508
+ catch (e) {
10509
+ console.log(e, 'Errore JSON ' + ' ' + _this.uti.decrypt_v2(localStorage.getItem(key)));
10510
+ resolve({});
10511
+ return;
10512
+ }
10479
10513
  return;
10480
10514
  }
10481
10515
  else {
@@ -10485,7 +10519,14 @@
10485
10519
  }
10486
10520
  else {
10487
10521
  if (json_format) {
10488
- resolve(JSON.parse('' + localStorage.getItem(key)));
10522
+ try {
10523
+ resolve(JSON.parse('' + localStorage.getItem(key)));
10524
+ }
10525
+ catch (e) {
10526
+ console.log(e, 'Errore JSON ' + localStorage.getItem(key));
10527
+ resolve({});
10528
+ return;
10529
+ }
10489
10530
  return;
10490
10531
  }
10491
10532
  else {
@@ -10493,8 +10534,6 @@
10493
10534
  return;
10494
10535
  }
10495
10536
  }
10496
- resolve(null);
10497
- return;
10498
10537
  });
10499
10538
  };
10500
10539
  LocalDBService.prototype.write = function (k, obj, crypt, json_format) {
@@ -12841,8 +12880,8 @@
12841
12880
  console.log('min_liv ', min_liv);
12842
12881
  for (var i = 0; i < this.livs.length; i++)
12843
12882
  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());
12883
+ //console.log('this.user_idp.toUpperCase() ',this.user_idp.toUpperCase());
12884
+ //console.log('this.livs[i].idp.toUpperCase() ',this.livs[i].idp.toUpperCase() );
12846
12885
  if (this.user_idp.toUpperCase() == this.livs[i].idp.toUpperCase() || this.livs[i].gruppo_parallelo == '*ALLUSERS') {
12847
12886
  if (this.livs[i].abilita_indietro == 1)
12848
12887
  this.respingi_enabled = true;