@fluxhub/fluxhub-lib 9.0.33 → 9.0.34

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.
Files changed (36) hide show
  1. package/bundles/fluxhub-fluxhub-lib.umd.js +297 -361
  2. package/bundles/fluxhub-fluxhub-lib.umd.js.map +1 -1
  3. package/bundles/fluxhub-fluxhub-lib.umd.min.js +2 -2
  4. package/bundles/fluxhub-fluxhub-lib.umd.min.js.map +1 -1
  5. package/esm2015/fluxhub-fluxhub-lib.js +35 -30
  6. package/esm2015/lib/controls/fhautocomplete.js +32 -31
  7. package/esm2015/lib/controls/fhcheckbox.js +26 -36
  8. package/esm2015/lib/controls/fhcombobox.js +27 -24
  9. package/esm2015/lib/controls/fhdatepicker.js +33 -10
  10. package/esm2015/lib/controls/fhtextinput.js +25 -35
  11. package/esm2015/lib/controls/fhtimepicker.js +29 -13
  12. package/esm2015/lib/controls/fhuploadpanel.js +1 -2
  13. package/esm5/fluxhub-fluxhub-lib.js +35 -30
  14. package/esm5/lib/controls/fhautocomplete.js +59 -64
  15. package/esm5/lib/controls/fhcheckbox.js +35 -52
  16. package/esm5/lib/controls/fhcombobox.js +51 -55
  17. package/esm5/lib/controls/fhdatepicker.js +48 -27
  18. package/esm5/lib/controls/fhtextinput.js +35 -52
  19. package/esm5/lib/controls/fhtimepicker.js +45 -32
  20. package/esm5/lib/controls/fhuploadpanel.js +1 -2
  21. package/fesm2015/fluxhub-fluxhub-lib.js +168 -200
  22. package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
  23. package/fesm5/fluxhub-fluxhub-lib.js +264 -333
  24. package/fesm5/fluxhub-fluxhub-lib.js.map +1 -1
  25. package/fluxhub-fluxhub-lib.d.ts +35 -30
  26. package/fluxhub-fluxhub-lib.metadata.json +1 -1
  27. package/lib/controls/fhautocomplete.d.ts +8 -9
  28. package/lib/controls/fhcheckbox.d.ts +7 -7
  29. package/lib/controls/fhcombobox.d.ts +7 -5
  30. package/lib/controls/fhdatepicker.d.ts +8 -2
  31. package/lib/controls/fhtextinput.d.ts +7 -8
  32. package/lib/controls/fhtimepicker.d.ts +8 -2
  33. package/package.json +1 -1
  34. package/esm2015/lib/models/FHValueAccessor.js +0 -55
  35. package/esm5/lib/models/FHValueAccessor.js +0 -61
  36. package/lib/models/FHValueAccessor.d.ts +0 -36
@@ -1,5 +1,5 @@
1
- import { __decorate, __metadata, __read, __extends, __param, __assign } from 'tslib';
2
- import { ɵɵdefineInjectable, Injectable, ɵɵinject, ViewChild, ViewContainerRef, Component, Directive, EventEmitter, Input, Output, Inject, ElementRef, forwardRef, HostListener, Pipe, PLATFORM_ID, Optional, NgModule } from '@angular/core';
1
+ import { __decorate, __metadata, __read, __param, __extends, __assign } from 'tslib';
2
+ import { ɵɵdefineInjectable, Injectable, ɵɵinject, ViewChild, ViewContainerRef, Component, Directive, forwardRef, EventEmitter, Input, Output, Inject, ElementRef, 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';
@@ -1204,90 +1204,38 @@ var QueryService = /** @class */ (function () {
1204
1204
  return QueryService;
1205
1205
  }());
1206
1206
 
1207
- /**
1208
- * Add support of "[(ngModel)]"
1209
- * HOW TO:
1210
- *
1211
- * 1. ADD: providers: [
1212
- * {provide: NG_VALUE_ACCESSOR, useExisting: FHAutoCompleteComponent, multi: true},
1213
- * ]
1214
- * 2. ADD: extends FHValueAccessor<any>
1215
- * 3. ADD: constructor() { super(); }
1216
- * 4. Add: (if not exists) getValue(){...} AND setValue(value){...}
1217
- * 5. ADD: (!!!) this.emitChanged(); (!!!) call this when you have value changed by user
1218
- *
1219
- * 6 (optional) add: @Output() change: EventEmitter<any> = new EventEmitter();
1220
- * 7 (optional) add: this.change.emit(this.getValue());
1221
- *
1222
- * Read more:
1223
- * https://blog.rangle.io/angular-2-ngmodel-and-custom-form-components/
1224
- * https://material.angular.io/guide/creating-a-custom-form-field-control#implementing-the-methods-and-properties-of-matformfieldcontrol
1225
- */
1226
- var FHValueAccessor = /** @class */ (function () {
1227
- function FHValueAccessor() {
1228
- // implement 'ControlValueAccessor
1229
- this.changed = [];
1230
- this.touched = [];
1231
- }
1232
- /**
1233
- * call this when you have value changed by user
1234
- */
1235
- FHValueAccessor.prototype.emitChanged = function () {
1236
- var value = this.getValue();
1237
- this.changed.forEach(function (f) { return f(value); });
1238
- };
1239
- Object.defineProperty(FHValueAccessor.prototype, "value", {
1240
- get: function () {
1241
- return this.getValue();
1242
- },
1243
- set: function (value) {
1244
- if (this.getValue() !== value) {
1245
- this.setValue(value);
1246
- this.changed.forEach(function (f) { return f(value); });
1247
- }
1248
- },
1249
- enumerable: true,
1250
- configurable: true
1251
- });
1252
- FHValueAccessor.prototype.writeValue = function (value) {
1253
- this.setValue(value);
1254
- };
1255
- FHValueAccessor.prototype.touch = function () {
1256
- this.touched.forEach(function (f) { return f(); });
1257
- };
1258
- FHValueAccessor.prototype.registerOnChange = function (fn) {
1259
- this.changed.push(fn);
1260
- };
1261
- FHValueAccessor.prototype.registerOnTouched = function (fn) {
1262
- this.touched.push(fn);
1263
- };
1264
- return FHValueAccessor;
1265
- }()); // -
1266
-
1267
- var FHTimePickerComponent = /** @class */ (function (_super) {
1268
- __extends(FHTimePickerComponent, _super);
1207
+ var noop = function () {
1208
+ };
1209
+ var ɵ0 = noop;
1210
+ var CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR = {
1211
+ provide: NG_VALUE_ACCESSOR,
1212
+ useExisting: forwardRef(function () { return FHTimePickerComponent; }),
1213
+ multi: true
1214
+ };
1215
+ var FHTimePickerComponent = /** @class */ (function () {
1269
1216
  /**
1270
1217
  *
1271
1218
  */
1272
1219
  function FHTimePickerComponent(_dataService, dialog, m_appService, toastr, uti_s) {
1273
- var _this = _super.call(this) || this;
1274
- _this._dataService = _dataService;
1275
- _this.dialog = dialog;
1276
- _this.m_appService = m_appService;
1277
- _this.toastr = toastr;
1278
- _this.uti_s = uti_s;
1279
- _this.maxore = 23;
1280
- _this.label = "";
1281
- _this.enabled = true;
1282
- _this.show_picker = false;
1283
- _this.selchange = new EventEmitter(); // it's preferable to use standart output: '(change)'
1284
- _this.ngChange = new EventEmitter();
1285
- _this.h = 0;
1286
- _this.m = 0;
1287
- _this.res = "";
1288
- return _this;
1220
+ this._dataService = _dataService;
1221
+ this.dialog = dialog;
1222
+ this.m_appService = m_appService;
1223
+ this.toastr = toastr;
1224
+ this.uti_s = uti_s;
1225
+ this.maxore = 23;
1226
+ this.label = "";
1227
+ this.enabled = true;
1228
+ this.show_picker = false;
1229
+ this.selchange = new EventEmitter(); // it's preferable to use standart output: '(change)'
1230
+ this.ngChange = new EventEmitter();
1231
+ this.h = 0;
1232
+ this.m = 0;
1233
+ this.res = "";
1234
+ this.onChange = function (_) {
1235
+ };
1236
+ this.onTouched = function () {
1237
+ };
1289
1238
  }
1290
- FHTimePickerComponent_1 = FHTimePickerComponent;
1291
1239
  FHTimePickerComponent.prototype.uph = function () {
1292
1240
  if (this.h < this.maxore) {
1293
1241
  this.h++;
@@ -1377,8 +1325,7 @@ var FHTimePickerComponent = /** @class */ (function (_super) {
1377
1325
  this.h = parseInt(a[0]);
1378
1326
  this.m = parseInt(a[1]);
1379
1327
  if (desc_val.length != 5) {
1380
- // it will make ngModel assign value with the padding
1381
- this.emitChanged();
1328
+ this.onChange(this.getValue());
1382
1329
  }
1383
1330
  };
1384
1331
  FHTimePickerComponent.prototype.isValidVal = function () {
@@ -1416,7 +1363,7 @@ var FHTimePickerComponent = /** @class */ (function (_super) {
1416
1363
  .selchange
1417
1364
  .emit();
1418
1365
  this.ngChange.emit(value);
1419
- this.emitChanged();
1366
+ this.onChange(value);
1420
1367
  };
1421
1368
  FHTimePickerComponent.prototype.isCharNumeric = function (charStr) {
1422
1369
  return !!/\d/.test(charStr);
@@ -1439,7 +1386,15 @@ var FHTimePickerComponent = /** @class */ (function (_super) {
1439
1386
  return false;
1440
1387
  }
1441
1388
  };
1442
- var FHTimePickerComponent_1;
1389
+ FHTimePickerComponent.prototype.writeValue = function (value) {
1390
+ this.setByValue(value);
1391
+ };
1392
+ FHTimePickerComponent.prototype.registerOnChange = function (fn) {
1393
+ this.onChange = fn;
1394
+ };
1395
+ FHTimePickerComponent.prototype.registerOnTouched = function (fn) {
1396
+ this.onTouched = fn;
1397
+ };
1443
1398
  FHTimePickerComponent.ctorParameters = function () { return [
1444
1399
  { type: QueryService },
1445
1400
  { type: MatDialog },
@@ -1467,13 +1422,11 @@ var FHTimePickerComponent = /** @class */ (function (_super) {
1467
1422
  Output('change'),
1468
1423
  __metadata("design:type", EventEmitter)
1469
1424
  ], FHTimePickerComponent.prototype, "ngChange", void 0);
1470
- FHTimePickerComponent = FHTimePickerComponent_1 = __decorate([
1425
+ FHTimePickerComponent = __decorate([
1471
1426
  Component({
1472
1427
  selector: 'FHTimePicker',
1428
+ providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR],
1473
1429
  template: "\n <div fxLayout=\"row\" fxLayoutAlign=\"center center\"><b>{{label}}</b>&nbsp;&nbsp;\n <div fxLayout=\"column\" fxLayoutAlign=\"center center\">\n <div *ngIf=\"enabled\" class=\"yourClass\">\n <mat-icon (click)=\"uph()\">keyboard_arrow_up</mat-icon>\n </div>\n\n <input\n style=\"width:40px;text-align:center;\" (keydown)=\"onKeyDown($event)\" (focusout)=\"onFu()\" [disabled]=\"!enabled\"\n [(ngModel)]=\"h\">\n <div class=\"yourClass\" *ngIf=\"enabled\">\n <mat-icon class=\"yourClass\" (click)=\"doh()\">keyboard_arrow_down</mat-icon>\n </div>\n </div>\n\n &nbsp;&nbsp;<b style=\"font-size:28px\">:</b>&nbsp;&nbsp;\n\n <div fxLayout=\"column\" fxLayoutAlign=\"center center\">\n <div class=\"yourClass\" *ngIf=\"enabled\">\n <mat-icon class=\"yourClass\" (click)=\"upm()\">keyboard_arrow_up</mat-icon>\n </div>\n\n <input\n style=\"width:40px;text-align:center;\" (keydown)=\"onKeyDown1($event)\" (focusout)=\"onMi()\" [disabled]=\"!enabled\"\n [(ngModel)]=\"m\">\n <div class=\"yourClass\" *ngIf=\"enabled\">\n <mat-icon class=\"yourClass\" (click)=\"dom()\">keyboard_arrow_down</mat-icon>\n </div>\n </div>\n </div>\n ",
1474
- providers: [
1475
- { provide: NG_VALUE_ACCESSOR, useExisting: FHTimePickerComponent_1, multi: true },
1476
- ],
1477
1430
  styles: ["\n .hhh {\n height: 63px;\n width: 100px;\n background-color: rgba(255, 0, 0, .1);\n }\n\n .yourClass {\n cursor: pointer;\n user-select: none;\n }\n "]
1478
1431
  }),
1479
1432
  __metadata("design:paramtypes", [QueryService,
@@ -1483,7 +1436,7 @@ var FHTimePickerComponent = /** @class */ (function (_super) {
1483
1436
  UtilityService])
1484
1437
  ], FHTimePickerComponent);
1485
1438
  return FHTimePickerComponent;
1486
- }(FHValueAccessor)); // -
1439
+ }()); // -
1487
1440
 
1488
1441
  var CurrencyComponent = /** @class */ (function () {
1489
1442
  function CurrencyComponent() {
@@ -1879,34 +1832,42 @@ var WinWait = /** @class */ (function () {
1879
1832
  return WinWait;
1880
1833
  }());
1881
1834
 
1882
- var FHComboboxComponent = /** @class */ (function (_super) {
1883
- __extends(FHComboboxComponent, _super);
1835
+ var noop$1 = function () {
1836
+ };
1837
+ var ɵ0$1 = noop$1;
1838
+ var CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1 = {
1839
+ provide: NG_VALUE_ACCESSOR,
1840
+ useExisting: forwardRef(function () { return FHComboboxComponent; }),
1841
+ multi: true
1842
+ };
1843
+ var FHComboboxComponent = /** @class */ (function () {
1884
1844
  function FHComboboxComponent(_dataService, _dataService_odbc) {
1885
- var _this = _super.call(this) || this;
1886
- _this._dataService = _dataService;
1887
- _this._dataService_odbc = _dataService_odbc;
1888
- _this.init_fill = true;
1889
- _this.sql = "";
1890
- _this.types = [];
1891
- _this.values = [];
1892
- _this.hidden = false;
1893
- _this.label = "";
1894
- _this.enabled = true;
1895
- _this.required = false;
1896
- _this.sel_label = "";
1897
- _this.fillend = new EventEmitter();
1898
- _this.selchange = new EventEmitter();
1899
- _this.initend = new EventEmitter();
1900
- _this.myData = [];
1901
- _this.valDef = "-1";
1902
- _this.selval = "-1";
1903
- _this.errorMsg = "";
1904
- _this.db_type = "1";
1905
- _this.dis_value = '';
1906
- _this.descri_val = "";
1907
- return _this;
1845
+ this._dataService = _dataService;
1846
+ this._dataService_odbc = _dataService_odbc;
1847
+ this.init_fill = true;
1848
+ this.sql = "";
1849
+ this.types = [];
1850
+ this.values = [];
1851
+ this.hidden = false;
1852
+ this.label = "";
1853
+ this.enabled = true;
1854
+ this.required = false;
1855
+ this.sel_label = "";
1856
+ this.fillend = new EventEmitter();
1857
+ this.selchange = new EventEmitter();
1858
+ this.initend = new EventEmitter();
1859
+ this.myData = [];
1860
+ this.valDef = "-1";
1861
+ this.selval = "-1";
1862
+ this.errorMsg = "";
1863
+ this.db_type = "1";
1864
+ this.dis_value = '';
1865
+ this.descri_val = "";
1866
+ this.onChange = function (_) {
1867
+ };
1868
+ this.onTouched = function () {
1869
+ };
1908
1870
  }
1909
- FHComboboxComponent_1 = FHComboboxComponent;
1910
1871
  FHComboboxComponent.prototype.setValue = function (desc_val) {
1911
1872
  this.setByValue(desc_val);
1912
1873
  };
@@ -2155,6 +2116,7 @@ var FHComboboxComponent = /** @class */ (function (_super) {
2155
2116
  });
2156
2117
  };
2157
2118
  FHComboboxComponent.prototype.sc = function () {
2119
+ this.onChange(this.getValue());
2158
2120
  this
2159
2121
  .selchange
2160
2122
  .emit({ event: this.getObj(), valore: this.getValue(), descrizione_valore: this.getDescri() });
@@ -2163,27 +2125,15 @@ var FHComboboxComponent = /** @class */ (function (_super) {
2163
2125
  var value = this.getData('valore');
2164
2126
  return value;
2165
2127
  };
2166
- FHComboboxComponent.prototype.emitChanged = function () {
2167
- var value = this.getModelValue();
2168
- this.changed.forEach(function (f) { return f(value); });
2169
- };
2170
- Object.defineProperty(FHComboboxComponent.prototype, "value", {
2171
- get: function () {
2172
- return this.getModelValue();
2173
- },
2174
- set: function (value) {
2175
- if (this.getModelValue() !== value) {
2176
- this.setByValue(value);
2177
- this.changed.forEach(function (f) { return f(value); });
2178
- }
2179
- },
2180
- enumerable: true,
2181
- configurable: true
2182
- });
2183
2128
  FHComboboxComponent.prototype.writeValue = function (value) {
2184
- this.setValue(value);
2129
+ this.setByValue(value);
2130
+ };
2131
+ FHComboboxComponent.prototype.registerOnChange = function (fn) {
2132
+ this.onChange = fn;
2133
+ };
2134
+ FHComboboxComponent.prototype.registerOnTouched = function (fn) {
2135
+ this.onTouched = fn;
2185
2136
  };
2186
- var FHComboboxComponent_1;
2187
2137
  FHComboboxComponent.ctorParameters = function () { return [
2188
2138
  { type: QueryService },
2189
2139
  { type: OdbcService }
@@ -2248,18 +2198,17 @@ var FHComboboxComponent = /** @class */ (function (_super) {
2248
2198
  Input(),
2249
2199
  __metadata("design:type", String)
2250
2200
  ], FHComboboxComponent.prototype, "db_type", void 0);
2251
- FHComboboxComponent = FHComboboxComponent_1 = __decorate([
2201
+ FHComboboxComponent = __decorate([
2252
2202
  Component({
2253
- selector: 'FHComboBox', template: "\n <mat-form-field [hidden]=\"!enabled || hidden\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{label}}</mat-label>\n <mat-select #cmb [(ngModel)]=\"selval\" (selectionChange)=\"sc()\" [required]=\"required\">\n <mat-option value=\"-1\">{{sel_label}}</mat-option>\n <mat-option value=\"{{app.valore}}\" *ngFor=\"let app of myData\">{{app.descrizione_valore}}</mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-form-field [hidden]=\"enabled || hidden\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{label}}</mat-label>\n <input type=\"text\" #el1 matInput [disabled]=\"true\" [(ngModel)]=\"dis_value\">\n </mat-form-field>\n ",
2254
- providers: [
2255
- { provide: NG_VALUE_ACCESSOR, useExisting: FHComboboxComponent_1, multi: true },
2256
- ],
2203
+ selector: 'FHComboBox',
2204
+ providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1],
2205
+ template: "\n <mat-form-field [hidden]=\"!enabled || hidden\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{label}}</mat-label>\n <mat-select #cmb [(ngModel)]=\"selval\" (selectionChange)=\"sc()\" [required]=\"required\">\n <mat-option value=\"-1\">{{sel_label}}</mat-option>\n <mat-option value=\"{{app.valore}}\" *ngFor=\"let app of myData\">{{app.descrizione_valore}}</mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-form-field [hidden]=\"enabled || hidden\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{label}}</mat-label>\n <input type=\"text\" #el1 matInput [disabled]=\"true\" [(ngModel)]=\"dis_value\">\n </mat-form-field>\n ",
2257
2206
  styles: ["\n\n "]
2258
2207
  }),
2259
2208
  __metadata("design:paramtypes", [QueryService, OdbcService])
2260
2209
  ], FHComboboxComponent);
2261
2210
  return FHComboboxComponent;
2262
- }(FHValueAccessor));
2211
+ }());
2263
2212
 
2264
2213
  var FHUploadComponent = /** @class */ (function () {
2265
2214
  function FHUploadComponent(_dataService, toastr, dialog, app_s) {
@@ -3122,7 +3071,6 @@ var FHUploadPanelComponent = /** @class */ (function () {
3122
3071
  }, 700);
3123
3072
  _this.upc.single = false;
3124
3073
  _this.b_mobile = _this._appservice.getState().pageFullscreen;
3125
- console.log('this.m_p_tipo ', _this.m_p_tipo);
3126
3074
  _this
3127
3075
  .upc
3128
3076
  .init(_this.App, _this.K, 'Descrizione Allegato', _this.m_p_tipo, _this.m_programma_da_eseguire);
@@ -3789,7 +3737,7 @@ var win_riassegna_select_user = /** @class */ (function () {
3789
3737
  return win_riassegna_select_user;
3790
3738
  }());
3791
3739
 
3792
- var CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR = {
3740
+ var CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2 = {
3793
3741
  provide: NG_VALUE_ACCESSOR,
3794
3742
  useExisting: forwardRef(function () { return FHUserFieldComponent; }),
3795
3743
  multi: true
@@ -4038,7 +3986,7 @@ var FHUserFieldComponent = /** @class */ (function () {
4038
3986
  ], FHUserFieldComponent.prototype, "userName", void 0);
4039
3987
  FHUserFieldComponent = __decorate([
4040
3988
  Component({
4041
- selector: 'FHUserField', providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR],
3989
+ selector: 'FHUserField', providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2],
4042
3990
  template: "\n <div fxLayout=\"row\" [hidden]=\"!enabled || hidden\">\n <mat-form-field style=\"clickable-field\" (click)=\"open_pick()\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{label}}</mat-label>\n\n <input matInput\n [hidden]=\"hidden\"\n\n type=\"text\"\n [ngModel]=\"userName\"\n [disabled]=\"false\" readonly>\n\n </mat-form-field>\n <button mat-icon-button matSuffix\n [hidden]=\"selectedUser.length==0\"\n (click)=\"clear()\">\n <mat-icon>clear</mat-icon>\n </button>\n </div>\n <mat-form-field [hidden]=\"enabled || hidden\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{label}}</mat-label>\n <input type=\"text\" #el1 matInput [disabled]=\"true\" [(ngModel)]=\"userName\"\n >\n </mat-form-field>\n ",
4043
3991
  styles: ["\n .clickable-field {\n border: 1px solid #000000;\n color: #000000;\n }\n\n .clickable-field:focus {\n outline: none;\n }\n\n :host ::ng-deep .mat-input-element {\n cursor: pointer !important;\n }\n "]
4044
3992
  }),
@@ -6522,38 +6470,46 @@ var FHGridComponent = /** @class */ (function () {
6522
6470
  return FHGridComponent;
6523
6471
  }());
6524
6472
 
6525
- var FHAutoCompleteComponent = /** @class */ (function (_super) {
6526
- __extends(FHAutoCompleteComponent, _super);
6473
+ var noop$2 = function () {
6474
+ };
6475
+ var ɵ0$2 = noop$2;
6476
+ var CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$3 = {
6477
+ provide: NG_VALUE_ACCESSOR,
6478
+ useExisting: forwardRef(function () { return FHAutoCompleteComponent; }),
6479
+ multi: true
6480
+ };
6481
+ var FHAutoCompleteComponent = /** @class */ (function () {
6527
6482
  function FHAutoCompleteComponent(_dataService, _dataService_odbc) {
6528
- var _this = _super.call(this) || this;
6529
- _this._dataService = _dataService;
6530
- _this._dataService_odbc = _dataService_odbc;
6531
- _this.init_fill = true; //automatic load data from database default is true
6532
- _this.sql = "";
6533
- _this.label = "";
6534
- _this.types = [];
6535
- _this.values = [];
6536
- _this.hidden = false;
6537
- _this.db_type = "1";
6538
- _this.enabled = true;
6539
- _this.required = false;
6540
- _this.only_from_list = false;
6541
- _this.fillend = new EventEmitter();
6542
- _this.selchange = new EventEmitter(); // it's preferable to use standart output: '(change)'
6543
- _this.change = new EventEmitter();
6544
- _this.initend = new EventEmitter();
6545
- _this.focusout = new EventEmitter();
6546
- _this.descri_val = "";
6547
- _this.sItem = "";
6548
- _this.searchItemsFiltered = [];
6549
- _this.is_loaded = false;
6550
- _this.selval = null;
6551
- _this.errorMsg = "";
6552
- _this.valDef = "";
6553
- _this.table_hidden = true;
6554
- return _this;
6483
+ this._dataService = _dataService;
6484
+ this._dataService_odbc = _dataService_odbc;
6485
+ this.init_fill = true; //automatic load data from database default is true
6486
+ this.sql = "";
6487
+ this.label = "";
6488
+ this.types = [];
6489
+ this.values = [];
6490
+ this.hidden = false;
6491
+ this.db_type = "1";
6492
+ this.enabled = true;
6493
+ this.required = false;
6494
+ this.only_from_list = false;
6495
+ this.fillend = new EventEmitter();
6496
+ this.selchange = new EventEmitter(); // it's preferable to use standart output: '(change)'
6497
+ this.change = new EventEmitter();
6498
+ this.initend = new EventEmitter();
6499
+ this.focusout = new EventEmitter();
6500
+ this.descri_val = "";
6501
+ this.sItem = "";
6502
+ this.searchItemsFiltered = [];
6503
+ this.is_loaded = false;
6504
+ this.selval = null;
6505
+ this.errorMsg = "";
6506
+ this.valDef = "";
6507
+ this.table_hidden = true;
6508
+ this.onChange = function (_) {
6509
+ };
6510
+ this.onTouched = function () {
6511
+ };
6555
6512
  }
6556
- FHAutoCompleteComponent_1 = FHAutoCompleteComponent;
6557
6513
  FHAutoCompleteComponent.prototype.fi_search = function () {
6558
6514
  if (this.sItem == null) {
6559
6515
  this.sItem = '';
@@ -6561,11 +6517,16 @@ var FHAutoCompleteComponent = /** @class */ (function (_super) {
6561
6517
  }
6562
6518
  };
6563
6519
  FHAutoCompleteComponent.prototype.fo_search = function (o) {
6520
+ var _this = this;
6521
+ setTimeout(function () {
6522
+ _this.onChange(_this.sItem);
6523
+ _this.change.emit(_this.sItem);
6524
+ });
6564
6525
  this
6565
6526
  .focusout
6566
6527
  .emit();
6567
6528
  };
6568
- FHAutoCompleteComponent.prototype.onChange = function (e) {
6529
+ FHAutoCompleteComponent.prototype.onChange_up = function (e) {
6569
6530
  // console.log('onChange()');
6570
6531
  this.searchItemsFiltered = [];
6571
6532
  if (this.sItem != null) {
@@ -6607,7 +6568,7 @@ var FHAutoCompleteComponent = /** @class */ (function (_super) {
6607
6568
  this
6608
6569
  .change
6609
6570
  .emit(value);
6610
- this.emitChanged();
6571
+ this.onChange(value);
6611
6572
  };
6612
6573
  FHAutoCompleteComponent.prototype.myListFormatter = function (data) {
6613
6574
  return data['descrizione_valore'];
@@ -6809,31 +6770,15 @@ var FHAutoCompleteComponent = /** @class */ (function (_super) {
6809
6770
  .emit();
6810
6771
  });
6811
6772
  };
6812
- /// override some FHValueAccessor implementation
6813
- /**
6814
- * call this when you have value changed by user
6815
- */
6816
- FHAutoCompleteComponent.prototype.emitChanged = function () {
6817
- var value = this.getModelValue();
6818
- this.changed.forEach(function (f) { return f(value); });
6819
- };
6820
- Object.defineProperty(FHAutoCompleteComponent.prototype, "value", {
6821
- get: function () {
6822
- return this.getModelValue();
6823
- },
6824
- set: function (value) {
6825
- if (this.getModelValue() !== value) {
6826
- this.setValue(value);
6827
- this.changed.forEach(function (f) { return f(value); });
6828
- }
6829
- },
6830
- enumerable: true,
6831
- configurable: true
6832
- });
6833
6773
  FHAutoCompleteComponent.prototype.writeValue = function (value) {
6834
6774
  this.setValue(value);
6835
6775
  };
6836
- var FHAutoCompleteComponent_1;
6776
+ FHAutoCompleteComponent.prototype.registerOnChange = function (fn) {
6777
+ this.onChange = fn;
6778
+ };
6779
+ FHAutoCompleteComponent.prototype.registerOnTouched = function (fn) {
6780
+ this.onTouched = fn;
6781
+ };
6837
6782
  FHAutoCompleteComponent.ctorParameters = function () { return [
6838
6783
  { type: QueryService },
6839
6784
  { type: OdbcService }
@@ -6906,19 +6851,17 @@ var FHAutoCompleteComponent = /** @class */ (function (_super) {
6906
6851
  ViewChild('auto'),
6907
6852
  __metadata("design:type", MatAutocomplete)
6908
6853
  ], FHAutoCompleteComponent.prototype, "auto", void 0);
6909
- FHAutoCompleteComponent = FHAutoCompleteComponent_1 = __decorate([
6854
+ FHAutoCompleteComponent = __decorate([
6910
6855
  Component({
6911
6856
  selector: 'FHAutoComplete',
6912
- template: "\n <mat-form-field [hidden]=\"!enabled || hidden\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{label}}</mat-label>\n <input matInput\n [disabled]=\"!enabled || hidden\" [matAutocomplete]=\"auto\" [required]=\"required\"\n (keyup)=\"onChange($event)\" [(ngModel)]=\"sItem\" (focus)=\"fi_search()\" (focusout)=\"fo_search($event)\"\n #searchp>\n </mat-form-field>\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"selectedSearchItem($event)\" autoActiveFirstOption >\n <mat-option *ngFor=\"let objx of searchItemsFiltered\" [value]=\"objx.descrizione_valore\">\n {{ objx.descrizione_valore }}\n </mat-option>\n </mat-autocomplete>\n\n\n <div class=\"ui negative message\" *ngIf=\"errorMsg != ''\">\n <i class=\"close icon\"></i>\n <div class=\"header\">\n {{errorMsg}}\n </div>\n </div>\n <mat-form-field [hidden]=\"enabled || hidden\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{label}}</mat-label>\n <input type=\"text\" #el1 matInput [disabled]=\"true\" [(ngModel)]=\"sItem\"\n >\n </mat-form-field>\n ",
6913
- providers: [
6914
- { provide: NG_VALUE_ACCESSOR, useExisting: FHAutoCompleteComponent_1, multi: true },
6915
- ],
6857
+ providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$3],
6858
+ template: "\n <mat-form-field [hidden]=\"!enabled || hidden\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{label}}</mat-label>\n <input matInput\n [disabled]=\"!enabled || hidden\" [matAutocomplete]=\"auto\" [required]=\"required\"\n (keyup)=\"onChange_up($event)\" [(ngModel)]=\"sItem\" (focus)=\"fi_search()\" (focusout)=\"fo_search($event)\"\n #searchp>\n </mat-form-field>\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"selectedSearchItem($event)\" autoActiveFirstOption >\n <mat-option *ngFor=\"let objx of searchItemsFiltered\" [value]=\"objx.descrizione_valore\">\n {{ objx.descrizione_valore }}\n </mat-option>\n </mat-autocomplete>\n\n\n <div class=\"ui negative message\" *ngIf=\"errorMsg != ''\">\n <i class=\"close icon\"></i>\n <div class=\"header\">\n {{errorMsg}}\n </div>\n </div>\n <mat-form-field [hidden]=\"enabled || hidden\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{label}}</mat-label>\n <input type=\"text\" #el1 matInput [disabled]=\"true\" [(ngModel)]=\"sItem\"\n >\n </mat-form-field>\n ",
6916
6859
  styles: ["\n\n "]
6917
6860
  }),
6918
6861
  __metadata("design:paramtypes", [QueryService, OdbcService])
6919
6862
  ], FHAutoCompleteComponent);
6920
6863
  return FHAutoCompleteComponent;
6921
- }(FHValueAccessor)); //
6864
+ }());
6922
6865
 
6923
6866
  var moment = momentNs;
6924
6867
  var MOMENT_DATE_FORMATS = {
@@ -7095,25 +7038,34 @@ var MomentDateAdapter = /** @class */ (function (_super) {
7095
7038
  return MomentDateAdapter;
7096
7039
  }(DateAdapter));
7097
7040
 
7098
- var ɵ0 = MOMENT_DATE_FORMATS;
7099
- var FHDatePickerComponent = /** @class */ (function (_super) {
7100
- __extends(FHDatePickerComponent, _super);
7041
+ var noop$3 = function () {
7042
+ };
7043
+ var ɵ0$3 = noop$3;
7044
+ var CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$4 = {
7045
+ provide: NG_VALUE_ACCESSOR,
7046
+ useExisting: forwardRef(function () { return FHDatePickerComponent; }),
7047
+ multi: true
7048
+ };
7049
+ var ɵ1 = MOMENT_DATE_FORMATS;
7050
+ var FHDatePickerComponent = /** @class */ (function () {
7101
7051
  function FHDatePickerComponent(dateAdapter, uti_s) {
7102
- var _this = _super.call(this) || this;
7103
- _this.dateAdapter = dateAdapter;
7104
- _this.uti_s = uti_s;
7105
- _this.label = '';
7106
- _this.required = false;
7107
- _this.show_buttons = false;
7108
- _this.enabled = true;
7109
- _this.min_date = null;
7110
- _this.max_date = null;
7111
- _this.change = new EventEmitter();
7112
- _this.v_view = _this.uti_s.date2String(new Date());
7113
- _this.date_sel = null;
7114
- _this.v_date_sel = "";
7115
- _this.dateAdapter.setLocale('it-IT');
7116
- return _this;
7052
+ this.dateAdapter = dateAdapter;
7053
+ this.uti_s = uti_s;
7054
+ this.label = '';
7055
+ this.required = false;
7056
+ this.show_buttons = false;
7057
+ this.enabled = true;
7058
+ this.min_date = null;
7059
+ this.max_date = null;
7060
+ this.change = new EventEmitter();
7061
+ this.v_view = this.uti_s.date2String(new Date());
7062
+ this.date_sel = null;
7063
+ this.v_date_sel = "";
7064
+ this.onChange = function (_) {
7065
+ };
7066
+ this.onTouched = function () {
7067
+ };
7068
+ this.dateAdapter.setLocale('it-IT');
7117
7069
  }
7118
7070
  FHDatePickerComponent_1 = FHDatePickerComponent;
7119
7071
  FHDatePickerComponent.prototype.checkInput = function (ob) {
@@ -7165,8 +7117,8 @@ var FHDatePickerComponent = /** @class */ (function (_super) {
7165
7117
  monthLabels: { 1: 'Gen', 2: 'Feb', 3: 'Mar', 4: 'Apr', 5: 'Mag', 6: 'Giu', 7: 'Lug', 8: 'Ago', 9: 'Set', 10: 'Ott', 11: 'Nov', 12: 'Dic' }
7166
7118
  };*/
7167
7119
  FHDatePickerComponent.prototype.ch = function (event) {
7120
+ this.onChange(this.getValue());
7168
7121
  this.change.emit(this.getValue());
7169
- this.emitChanged();
7170
7122
  };
7171
7123
  FHDatePickerComponent.prototype.setFocus = function () {
7172
7124
  this.pickerId.nativeElement.focus();
@@ -7229,10 +7181,23 @@ var FHDatePickerComponent = /** @class */ (function (_super) {
7229
7181
  d = new Date(d.value);
7230
7182
  }
7231
7183
  }
7184
+ if (d.getFullYear() == 1970) {
7185
+ this.date_sel = null;
7186
+ return;
7187
+ }
7232
7188
  var dtp = new MomentDateAdapter();
7233
7189
  this.date_sel = dtp.createDate(d.getFullYear(), d.getMonth(), d.getDate());
7234
7190
  this.v_view = this.uti_s.date2String(this.getValue());
7235
7191
  };
7192
+ FHDatePickerComponent.prototype.writeValue = function (value) {
7193
+ this.setValue(value);
7194
+ };
7195
+ FHDatePickerComponent.prototype.registerOnChange = function (fn) {
7196
+ this.onChange = fn;
7197
+ };
7198
+ FHDatePickerComponent.prototype.registerOnTouched = function (fn) {
7199
+ this.onTouched = fn;
7200
+ };
7236
7201
  var FHDatePickerComponent_1;
7237
7202
  FHDatePickerComponent.ctorParameters = function () { return [
7238
7203
  { type: DateAdapter },
@@ -7273,8 +7238,8 @@ var FHDatePickerComponent = /** @class */ (function (_super) {
7273
7238
  FHDatePickerComponent = FHDatePickerComponent_1 = __decorate([
7274
7239
  Component({
7275
7240
  selector: 'FHDatePicker',
7276
- providers: [
7277
- { provide: MAT_DATE_FORMATS, useValue: ɵ0 },
7241
+ providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$4,
7242
+ { provide: MAT_DATE_FORMATS, useValue: ɵ1 },
7278
7243
  { provide: DateAdapter, useClass: MomentDateAdapter },
7279
7244
  { provide: NG_VALUE_ACCESSOR, useExisting: FHDatePickerComponent_1, multi: true },
7280
7245
  { provide: MAT_DATE_LOCALE, useValue: 'it-IT' },
@@ -7285,23 +7250,31 @@ var FHDatePickerComponent = /** @class */ (function (_super) {
7285
7250
  __metadata("design:paramtypes", [DateAdapter, UtilityService])
7286
7251
  ], FHDatePickerComponent);
7287
7252
  return FHDatePickerComponent;
7288
- }(FHValueAccessor));
7253
+ }());
7289
7254
 
7290
- var FHTextInput = /** @class */ (function (_super) {
7291
- __extends(FHTextInput, _super);
7255
+ var noop$4 = function () {
7256
+ };
7257
+ var ɵ0$4 = noop$4;
7258
+ var CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$5 = {
7259
+ provide: NG_VALUE_ACCESSOR,
7260
+ useExisting: forwardRef(function () { return FHTextInput; }),
7261
+ multi: true
7262
+ };
7263
+ var FHTextInput = /** @class */ (function () {
7292
7264
  function FHTextInput() {
7293
- var _this = _super.call(this) || this;
7294
- _this.hidden = false;
7295
- _this.label = "";
7296
- _this.enabled = true;
7297
- _this.required = false;
7298
- _this.change = new EventEmitter();
7299
- _this.focusout = new EventEmitter();
7300
- _this.focusin = new EventEmitter();
7301
- _this.text_v = '';
7302
- return _this;
7265
+ this.hidden = false;
7266
+ this.label = "";
7267
+ this.enabled = true;
7268
+ this.required = false;
7269
+ this.change = new EventEmitter();
7270
+ this.focusout = new EventEmitter();
7271
+ this.focusin = new EventEmitter();
7272
+ this.text_v = '';
7273
+ this.onChange = function (_) {
7274
+ };
7275
+ this.onTouched = function () {
7276
+ };
7303
7277
  }
7304
- FHTextInput_1 = FHTextInput;
7305
7278
  FHTextInput.prototype.onFi = function () {
7306
7279
  var _this = this;
7307
7280
  setTimeout(function () {
@@ -7317,41 +7290,20 @@ var FHTextInput = /** @class */ (function (_super) {
7317
7290
  FHTextInput.prototype.modelch = function () {
7318
7291
  var _this = this;
7319
7292
  setTimeout(function () {
7293
+ _this.onChange(_this.text_v);
7320
7294
  _this.change.emit(_this.text_v);
7321
7295
  });
7322
7296
  };
7323
7297
  FHTextInput.prototype.ngAfterViewInit = function () { };
7324
- FHTextInput.prototype.getValue = function () {
7325
- return this.text_v;
7326
- };
7327
- FHTextInput.prototype.setValue = function (v) {
7328
- this.text_v = v;
7329
- };
7330
- FHTextInput.prototype.getModelValue = function () {
7331
- var value = this.text_v;
7332
- return value;
7298
+ FHTextInput.prototype.writeValue = function (value) {
7299
+ this.text_v = value;
7333
7300
  };
7334
- FHTextInput.prototype.emitChanged = function () {
7335
- var value = this.getModelValue();
7336
- this.changed.forEach(function (f) { return f(value); });
7301
+ FHTextInput.prototype.registerOnChange = function (fn) {
7302
+ this.onChange = fn;
7337
7303
  };
7338
- Object.defineProperty(FHTextInput.prototype, "value", {
7339
- get: function () {
7340
- return this.getModelValue();
7341
- },
7342
- set: function (value) {
7343
- if (this.getModelValue() !== value) {
7344
- this.text_v = value;
7345
- this.changed.forEach(function (f) { return f(value); });
7346
- }
7347
- },
7348
- enumerable: true,
7349
- configurable: true
7350
- });
7351
- FHTextInput.prototype.writeValue = function (value) {
7352
- this.setValue(value);
7304
+ FHTextInput.prototype.registerOnTouched = function (fn) {
7305
+ this.onTouched = fn;
7353
7306
  };
7354
- var FHTextInput_1;
7355
7307
  __decorate([
7356
7308
  Input(),
7357
7309
  __metadata("design:type", Boolean)
@@ -7380,21 +7332,17 @@ var FHTextInput = /** @class */ (function (_super) {
7380
7332
  Output(),
7381
7333
  __metadata("design:type", EventEmitter)
7382
7334
  ], FHTextInput.prototype, "focusin", void 0);
7383
- FHTextInput = FHTextInput_1 = __decorate([
7335
+ FHTextInput = __decorate([
7384
7336
  Component({
7385
7337
  selector: 'FHTextInput',
7338
+ providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$5],
7386
7339
  template: "\n <mat-form-field [hidden]=\"hidden\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{label}}</mat-label>\n <input matInput type=\"text\" [(ngModel)]=\"text_v\" [disabled]=\"!enabled\" [required]=\"required\" (focusout)=\"onFu()\" (focusin)=\"onFi()\" (ngModelChange)=\"modelch()\">\n </mat-form-field>\n ",
7387
- providers: [{
7388
- provide: NG_VALUE_ACCESSOR,
7389
- useExisting: FHTextInput_1,
7390
- multi: true
7391
- },],
7392
7340
  styles: ["\n\n "]
7393
7341
  }),
7394
7342
  __metadata("design:paramtypes", [])
7395
7343
  ], FHTextInput);
7396
7344
  return FHTextInput;
7397
- }(FHValueAccessor));
7345
+ }());
7398
7346
 
7399
7347
  var ApprovaGridComponent = /** @class */ (function () {
7400
7348
  function ApprovaGridComponent() {
@@ -8145,10 +8093,10 @@ var FHLogPanelComponent = /** @class */ (function () {
8145
8093
  return FHLogPanelComponent;
8146
8094
  }());
8147
8095
 
8148
- var noop = function () {
8096
+ var noop$5 = function () {
8149
8097
  };
8150
- var ɵ0$1 = noop;
8151
- var CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1 = {
8098
+ var ɵ0$5 = noop$5;
8099
+ var CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$6 = {
8152
8100
  provide: NG_VALUE_ACCESSOR,
8153
8101
  useExisting: forwardRef(function () { return FHCurrencyFieldComponent; }),
8154
8102
  multi: true
@@ -8309,7 +8257,7 @@ var FHCurrencyFieldComponent = /** @class */ (function () {
8309
8257
  FHCurrencyFieldComponent = __decorate([
8310
8258
  Component({
8311
8259
  selector: 'FHCurrencyField',
8312
- providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1],
8260
+ providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$6],
8313
8261
  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 ",
8314
8262
  styles: ["\n\n "]
8315
8263
  }),
@@ -8318,9 +8266,9 @@ var FHCurrencyFieldComponent = /** @class */ (function () {
8318
8266
  return FHCurrencyFieldComponent;
8319
8267
  }());
8320
8268
 
8321
- var noop$1 = function () {
8269
+ var noop$6 = function () {
8322
8270
  };
8323
- var ɵ0$2 = noop$1;
8271
+ var ɵ0$6 = noop$6;
8324
8272
  var CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_RT = {
8325
8273
  provide: NG_VALUE_ACCESSOR,
8326
8274
  useExisting: forwardRef(function () { return FHRichText; }),
@@ -8479,9 +8427,9 @@ var WinOutputComponent = /** @class */ (function () {
8479
8427
  return WinOutputComponent;
8480
8428
  }());
8481
8429
 
8482
- var noop$2 = function () {
8430
+ var noop$7 = function () {
8483
8431
  };
8484
- var ɵ0$3 = noop$2;
8432
+ var ɵ0$7 = noop$7;
8485
8433
  var CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_NUMERIC = {
8486
8434
  provide: NG_VALUE_ACCESSOR,
8487
8435
  useExisting: forwardRef(function () { return FHNumericFieldComponent; }),
@@ -13109,7 +13057,7 @@ var SafePipe = /** @class */ (function () {
13109
13057
  return SafePipe;
13110
13058
  }());
13111
13059
 
13112
- var CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2 = {
13060
+ var CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$7 = {
13113
13061
  provide: NG_VALUE_ACCESSOR,
13114
13062
  useExisting: forwardRef(function () { return FHFieldPickListComponent; }),
13115
13063
  multi: true
@@ -13233,7 +13181,7 @@ var FHFieldPickListComponent = /** @class */ (function () {
13233
13181
  ], FHFieldPickListComponent.prototype, "value", void 0);
13234
13182
  FHFieldPickListComponent = __decorate([
13235
13183
  Component({
13236
- providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2],
13184
+ providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$7],
13237
13185
  selector: 'FHFieldPickList', template: "\n<div fxLayout=\"row\" style=\"width: 100%\" fxLayoutAlign=\"start center\" [hidden]=\"hidden\"><div style=\"width: 100%\">\n <mat-form-field appearance=\"outline\" floatLabel=\"always\"><mat-label>{{label}}</mat-label>\n <input type=\"text\" #el1 matInput [readonly]=\"!enabled || only_in_list\" [(ngModel)]=\"value\">\n </mat-form-field></div>&nbsp;&nbsp;\n <div style=\"min-width: 160px\"> <button mat-flat-button color=\"primary\" (click)=\"open_pick_list()\" [disabled]=\"!enabled\">SELEZIONA</button></div>\n</div>\n ",
13238
13186
  styles: ["\n\n "]
13239
13187
  }),
@@ -14172,30 +14120,39 @@ var FHHelpButton = /** @class */ (function () {
14172
14120
  return FHHelpButton;
14173
14121
  }());
14174
14122
 
14175
- var FHCheckBox = /** @class */ (function (_super) {
14176
- __extends(FHCheckBox, _super);
14123
+ var noop$8 = function () {
14124
+ };
14125
+ var ɵ0$8 = noop$8;
14126
+ var CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$8 = {
14127
+ provide: NG_VALUE_ACCESSOR,
14128
+ useExisting: forwardRef(function () { return FHCheckBox; }),
14129
+ multi: true
14130
+ };
14131
+ var FHCheckBox = /** @class */ (function () {
14177
14132
  function FHCheckBox() {
14178
- var _this = _super.call(this) || this;
14179
- _this.hidden = false;
14180
- _this.label = "";
14181
- _this.enabled = true;
14182
- _this.required = false;
14183
- _this.change = new EventEmitter();
14184
- _this.click = new EventEmitter();
14185
- _this.value_b = false;
14186
- return _this;
14133
+ this.hidden = false;
14134
+ this.label = "";
14135
+ this.enabled = true;
14136
+ this.required = false;
14137
+ this.change = new EventEmitter();
14138
+ this.click = new EventEmitter();
14139
+ this.value_b = false;
14140
+ this.onChange = function (_) {
14141
+ };
14142
+ this.onTouched = function () {
14143
+ };
14187
14144
  }
14188
- FHCheckBox_1 = FHCheckBox;
14189
14145
  FHCheckBox.prototype.onCl = function () {
14190
14146
  var _this = this;
14191
14147
  setTimeout(function () {
14192
- _this.click.emit(_this.value_b);
14148
+ _this.click.emit(_this.value_b ? 1 : 0);
14193
14149
  });
14194
14150
  };
14195
14151
  FHCheckBox.prototype.modelch = function () {
14196
14152
  var _this = this;
14197
14153
  setTimeout(function () {
14198
- _this.change.emit(_this.value_b);
14154
+ _this.onChange(_this.value_b ? 1 : 0);
14155
+ _this.change.emit(_this.value_b ? 1 : 0);
14199
14156
  });
14200
14157
  };
14201
14158
  FHCheckBox.prototype.ngAfterViewInit = function () { };
@@ -14205,10 +14162,7 @@ var FHCheckBox = /** @class */ (function (_super) {
14205
14162
  else
14206
14163
  return 0;
14207
14164
  };
14208
- FHCheckBox.prototype.getValue = function () {
14209
- return this.getModelValue();
14210
- };
14211
- FHCheckBox.prototype.setValue = function (value) {
14165
+ FHCheckBox.prototype.writeValue = function (value) {
14212
14166
  if (this.getModelValue() !== value) {
14213
14167
  if (value != null)
14214
14168
  if (value == 1)
@@ -14217,31 +14171,12 @@ var FHCheckBox = /** @class */ (function (_super) {
14217
14171
  this.value_b = false;
14218
14172
  }
14219
14173
  };
14220
- FHCheckBox.prototype.emitChanged = function () {
14221
- var value = this.getModelValue();
14222
- this.changed.forEach(function (f) { return f(value); });
14174
+ FHCheckBox.prototype.registerOnChange = function (fn) {
14175
+ this.onChange = fn;
14223
14176
  };
14224
- Object.defineProperty(FHCheckBox.prototype, "value", {
14225
- get: function () {
14226
- return this.getModelValue();
14227
- },
14228
- set: function (value) {
14229
- if (this.getModelValue() !== value) {
14230
- if (value != null)
14231
- if (value == 1)
14232
- this.value_b = true;
14233
- else
14234
- this.value_b = false;
14235
- this.changed.forEach(function (f) { return f(value); });
14236
- }
14237
- },
14238
- enumerable: true,
14239
- configurable: true
14240
- });
14241
- FHCheckBox.prototype.writeValue = function (value) {
14242
- this.setValue(value);
14177
+ FHCheckBox.prototype.registerOnTouched = function (fn) {
14178
+ this.onTouched = fn;
14243
14179
  };
14244
- var FHCheckBox_1;
14245
14180
  __decorate([
14246
14181
  Input(),
14247
14182
  __metadata("design:type", Boolean)
@@ -14266,21 +14201,17 @@ var FHCheckBox = /** @class */ (function (_super) {
14266
14201
  Output(),
14267
14202
  __metadata("design:type", EventEmitter)
14268
14203
  ], FHCheckBox.prototype, "click", void 0);
14269
- FHCheckBox = FHCheckBox_1 = __decorate([
14204
+ FHCheckBox = __decorate([
14270
14205
  Component({
14271
14206
  selector: 'FHCheckBox',
14207
+ providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$8],
14272
14208
  template: "\n\n <mat-checkbox [(ngModel)]=\"value_b\" (click)=\"onCl()\" [disabled]=\"!enabled\" [required]=\"required\" (ngModelChange)=\"modelch()\">{{label}}\n </mat-checkbox>\n ",
14273
- providers: [{
14274
- provide: NG_VALUE_ACCESSOR,
14275
- useExisting: FHCheckBox_1,
14276
- multi: true
14277
- },],
14278
14209
  styles: ["\n\n "]
14279
14210
  }),
14280
14211
  __metadata("design:paramtypes", [])
14281
14212
  ], FHCheckBox);
14282
14213
  return FHCheckBox;
14283
- }(FHValueAccessor));
14214
+ }());
14284
14215
 
14285
14216
  var FluxhubLibModule = /** @class */ (function () {
14286
14217
  function FluxhubLibModule() {
@@ -14547,5 +14478,5 @@ var FSResult = /** @class */ (function () {
14547
14478
  * Generated bundle index. Do not edit.
14548
14479
  */
14549
14480
 
14550
- export { AppMakerService, AppService, ApprovaGridComponent, AuthenticationService, ComboBoxEditor, CurrencyComponent, FHAutoCompleteComponent, FHCheckBox, FHComboboxComponent, FHConfirmComponent, FHConfirmValues, FHCurrencyFieldComponent, FHCurrencyFormatterDirective, FHCurrencyPipe, FHDatePickerComponent, FHFieldPickListComponent, FHGridComponent, FHGridJSONComponent, FHGuard, FHListComponent, FHListPick, FHLogPanelComponent, FHMdReader, FHNumericFieldComponent, FHPickListComponent, FHRichText, FHRoleManager, FHTableManager, FHTextInput, FHTimePickerComponent, FHUploadComponent, FHUploadPanelComponent, FHUserFieldComponent, FHUserPickerComponent, FHWinComboSelect, FSInput, FSResult, FileService, FluxhubLibModule, FormBuilderComponent, FormExecuterComponent, GridService, LocalDBService, NumericEditorComponent, OdbcService, OfficeAutomatorService, QGParam, QGResult, QParam, QResult, QueryService, ReplaceLineBreaks, TextAreaEditor, UtilityService, WinAskButtonsComponent, WinAskNumberComponent, WinAskTextBigComponent, WinAskTextComponent, WinOutputComponent, WinWait, WkfService, dati_aggiuntivi, fhimagepreview, win_insert_commento, win_mappa, win_salva_annulla, win_show_image, win_time_slider, win_user_info, wkf_header_bar, wkfapp, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2 as ɵa, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1 as ɵb, win_riassegna_select_user as ɵba, win_sostituisci_utente as ɵbb, win_commento_sel_notif as ɵbc, win_manage_values as ɵbd, win_manage_roles as ɵbe, FHComboboxComponentFilter as ɵbf, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_NUMERIC as ɵc, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_RT as ɵd, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR as ɵe, FHValueAccessor as ɵf, FHHelpButton as ɵg, SafePipe as ɵh, DecimalMask as ɵi, MOMENT_DATE_FORMATS as ɵj, MomentDateAdapter as ɵk, win_grid_help as ɵl, HighlightService as ɵm, FHViewerComponent as ɵn, FHGridToolBarComponent as ɵp, win_assegna as ɵq, win_conferma as ɵr, win_select_canale as ɵs, win_select_level as ɵt, win_uploads as ɵu, win_commenti as ɵv, win_info_doc as ɵw, win_log as ɵx, win_recupera_doc as ɵy, win_riassegna_select_level as ɵz };
14481
+ export { AppMakerService, AppService, ApprovaGridComponent, AuthenticationService, ComboBoxEditor, CurrencyComponent, FHAutoCompleteComponent, FHCheckBox, FHComboboxComponent, FHConfirmComponent, FHConfirmValues, FHCurrencyFieldComponent, FHCurrencyFormatterDirective, FHCurrencyPipe, FHDatePickerComponent, FHFieldPickListComponent, FHGridComponent, FHGridJSONComponent, FHGuard, FHListComponent, FHListPick, FHLogPanelComponent, FHMdReader, FHNumericFieldComponent, FHPickListComponent, FHRichText, FHRoleManager, FHTableManager, FHTextInput, FHTimePickerComponent, FHUploadComponent, FHUploadPanelComponent, FHUserFieldComponent, FHUserPickerComponent, FHWinComboSelect, FSInput, FSResult, FileService, FluxhubLibModule, FormBuilderComponent, FormExecuterComponent, GridService, LocalDBService, NumericEditorComponent, OdbcService, OfficeAutomatorService, QGParam, QGResult, QParam, QResult, QueryService, ReplaceLineBreaks, TextAreaEditor, UtilityService, WinAskButtonsComponent, WinAskNumberComponent, WinAskTextBigComponent, WinAskTextComponent, WinOutputComponent, WinWait, WkfService, dati_aggiuntivi, fhimagepreview, win_insert_commento, win_mappa, win_salva_annulla, win_show_image, win_time_slider, win_user_info, wkf_header_bar, wkfapp, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$7 as ɵa, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$3 as ɵb, win_commenti as ɵba, win_info_doc as ɵbb, win_log as ɵbc, win_recupera_doc as ɵbd, win_riassegna_select_level as ɵbe, win_riassegna_select_user as ɵbf, win_sostituisci_utente as ɵbg, win_commento_sel_notif as ɵbh, win_manage_values as ɵbi, win_manage_roles as ɵbj, FHComboboxComponentFilter as ɵbk, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1 as ɵc, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$6 as ɵd, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$4 as ɵe, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_NUMERIC as ɵf, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_RT as ɵg, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR as ɵh, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2 as ɵi, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$5 as ɵj, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$8 as ɵk, FHHelpButton as ɵl, SafePipe as ɵm, DecimalMask as ɵn, MOMENT_DATE_FORMATS as ɵo, MomentDateAdapter as ɵp, win_grid_help as ɵq, HighlightService as ɵr, FHViewerComponent as ɵs, FHGridToolBarComponent as ɵu, win_assegna as ɵv, win_conferma as ɵw, win_select_canale as ɵx, win_select_level as ɵy, win_uploads as ɵz };
14551
14482
  //# sourceMappingURL=fluxhub-fluxhub-lib.js.map