@fluxhub/fluxhub-lib 9.0.19 → 9.0.21

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.
@@ -1,12 +1,12 @@
1
1
  import { __decorate, __metadata, __read, __extends, __param, __assign } from 'tslib';
2
- import { ɵɵdefineInjectable, Injectable, Component, ɵɵinject, ViewChild, ViewContainerRef, Directive, EventEmitter, Input, Output, ElementRef, forwardRef, HostListener, Pipe, Inject, PLATFORM_ID, Optional, NgModule } from '@angular/core';
2
+ import { ɵɵdefineInjectable, Injectable, Component, ɵɵinject, ViewChild, ViewContainerRef, Directive, EventEmitter, Input, Output, ElementRef, Inject, forwardRef, HostListener, Pipe, PLATFORM_ID, Optional, NgModule } from '@angular/core';
3
3
  import { HttpHeaders, HttpClient } from '@angular/common/http';
4
4
  import { ToastrService } from 'ngx-toastr';
5
5
  import { map, catchError, flatMap } from 'rxjs/operators';
6
6
  import { Observable } from 'rxjs';
7
7
  import { SimpleCrypt } from 'ngx-simple-crypt';
8
8
  import { AES, enc } from 'crypto-js';
9
- import { MatDialogRef, MatDialog, MatDialogModule } from '@angular/material/dialog';
9
+ import { MatDialogRef, MatDialog, MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
10
10
  import { NgControl, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
11
11
  import { FileUploader, FileUploadModule } from 'ng2-file-upload';
12
12
  import { Router, ActivatedRoute } from '@angular/router';
@@ -2874,13 +2874,28 @@ var WinAskTextBigComponent = /** @class */ (function () {
2874
2874
  }());
2875
2875
 
2876
2876
  var FHWinComboSelect = /** @class */ (function () {
2877
- function FHWinComboSelect(dialogRef, toastr) {
2877
+ function FHWinComboSelect(dialogRef, toastr, data) {
2878
2878
  this.dialogRef = dialogRef;
2879
2879
  this.toastr = toastr;
2880
+ this.data = data;
2880
2881
  this.label = "";
2881
2882
  this.width = "100%";
2882
2883
  this.nota = false;
2883
2884
  this.nota_val = "";
2885
+ if (data == null)
2886
+ return;
2887
+ if (data != null) {
2888
+ var lab = '';
2889
+ var arrd = [];
2890
+ var nota = false;
2891
+ if (data.label != null)
2892
+ lab = data.label;
2893
+ if (data.arr_option != null)
2894
+ arrd = data.arr_option;
2895
+ if (data.nota != null)
2896
+ nota = data.nota;
2897
+ this.set_selection(lab, arrd, nota);
2898
+ }
2884
2899
  }
2885
2900
  FHWinComboSelect.prototype.close = function () { this.dialogRef.close(null); };
2886
2901
  FHWinComboSelect.prototype.set_selection = function (lab, myD, nota) {
@@ -2902,7 +2917,8 @@ var FHWinComboSelect = /** @class */ (function () {
2902
2917
  };
2903
2918
  FHWinComboSelect.ctorParameters = function () { return [
2904
2919
  { type: MatDialogRef },
2905
- { type: ToastrService }
2920
+ { type: ToastrService },
2921
+ { type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] }
2906
2922
  ]; };
2907
2923
  __decorate([
2908
2924
  ViewChild('cmb_sel'),
@@ -2913,7 +2929,8 @@ var FHWinComboSelect = /** @class */ (function () {
2913
2929
  selector: 'fhwincomboselect',
2914
2930
  template: "\n <div style=\"width:100%\" fxLayout=\"row\" fxLayoutAlign=\"end start\"><img src=\"assets/icons/x.png\" style=\"cursor: pointer;\" (click)=\"close()\" /> </div>\n <hr width=\"100%\" size=\"0.5\" color=\"#DDDDDD\">\n\n <div fxLayout=\"column\">\n <mat-dialog-content style=\"font-size: 12px;\" >\n\n <div fxLayout=\"column\">\n <h3>\n {{label | uppercase}}\n </h3>\n <FHComboBox #cmb_sel [init_fill]=\"false\"></FHComboBox>\n <mat-form-field *ngIf=\"nota\" appearance=\"outline\" floatLabel=\"always\"><mat-label>Nota</mat-label>\n <textarea matInput [(ngModel)]=\"nota_val\" rows=\"12\"></textarea>\n </mat-form-field>\n </div>\n </mat-dialog-content>\n\n\n <mat-dialog-actions fxFlex=\"100\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <button mat-flat-button color=\"primary\" (click)=\"ok()\">OK</button>&nbsp;&nbsp;&nbsp;&nbsp;\n <button mat-flat-button color=\"warn\" (click)=\"close()\">ANNULLA</button>\n </mat-dialog-actions>\n </div>\n "
2915
2931
  }),
2916
- __metadata("design:paramtypes", [MatDialogRef, ToastrService])
2932
+ __param(2, Inject(MAT_DIALOG_DATA)),
2933
+ __metadata("design:paramtypes", [MatDialogRef, ToastrService, Object])
2917
2934
  ], FHWinComboSelect);
2918
2935
  return FHWinComboSelect;
2919
2936
  }());
@@ -8028,10 +8045,8 @@ var FHCurrencyFieldComponent = /** @class */ (function () {
8028
8045
  FHCurrencyFieldComponent.prototype.chg = function () {
8029
8046
  var _this = this;
8030
8047
  setTimeout(function () {
8031
- console.log(' chg() -> ', _this.formattedAmount);
8032
8048
  _this.value = parseFloat(_this.formattedAmount.split('.').join('').split(',').join('.'));
8033
- console.log('fine chg value -> ', _this.value);
8034
- // this.onChange(this.value);
8049
+ _this.onChange(_this.value);
8035
8050
  }, 50);
8036
8051
  };
8037
8052
  FHCurrencyFieldComponent.prototype.writeValue = function (value) {
@@ -8040,10 +8055,9 @@ var FHCurrencyFieldComponent = /** @class */ (function () {
8040
8055
  // if (value !== this.innerValue) {
8041
8056
  this.innerValue = value;
8042
8057
  this.value = value;
8043
- console.log(' writeValue() -> ', this.value);
8044
8058
  this.formattedAmount = this.transform(this.value, this.decimal);
8045
- console.log('fine writeValue -> ', this.formattedAmount);
8046
- //this.onChange(this.value);
8059
+ //}
8060
+ // this.onChange(this.value);
8047
8061
  };
8048
8062
  FHCurrencyFieldComponent.prototype.registerOnChange = function (fn) {
8049
8063
  this.onChange = fn;
@@ -8071,7 +8085,6 @@ var FHCurrencyFieldComponent = /** @class */ (function () {
8071
8085
  };
8072
8086
  FHCurrencyFieldComponent.prototype.transform = function (value, fractionSize) {
8073
8087
  if (fractionSize === void 0) { fractionSize = 2; }
8074
- console.log('ini trasform() -> ', value, fractionSize);
8075
8088
  var _a = __read((value || "").toString().split('.'), 2), integer = _a[0], _b = _a[1], fraction = _b === void 0 ? "" : _b;
8076
8089
  fraction = fractionSize > 0
8077
8090
  ? ',' + (fraction + '000000').substring(0, fractionSize)
@@ -8079,11 +8092,7 @@ var FHCurrencyFieldComponent = /** @class */ (function () {
8079
8092
  integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, '.');
8080
8093
  if (integer == '')
8081
8094
  integer = '0';
8082
- console.log('fine transform() -> ', value, fractionSize);
8083
- if (fractionSize > 0)
8084
- return integer + fraction;
8085
- else
8086
- return integer;
8095
+ return integer + fraction;
8087
8096
  };
8088
8097
  FHCurrencyFieldComponent.prototype.removeCurrencyPipeFormat = function (element) {
8089
8098
  try {