@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
@@ -1337,90 +1337,38 @@
1337
1337
  return QueryService;
1338
1338
  }());
1339
1339
 
1340
- /**
1341
- * Add support of "[(ngModel)]"
1342
- * HOW TO:
1343
- *
1344
- * 1. ADD: providers: [
1345
- * {provide: NG_VALUE_ACCESSOR, useExisting: FHAutoCompleteComponent, multi: true},
1346
- * ]
1347
- * 2. ADD: extends FHValueAccessor<any>
1348
- * 3. ADD: constructor() { super(); }
1349
- * 4. Add: (if not exists) getValue(){...} AND setValue(value){...}
1350
- * 5. ADD: (!!!) this.emitChanged(); (!!!) call this when you have value changed by user
1351
- *
1352
- * 6 (optional) add: @Output() change: EventEmitter<any> = new EventEmitter();
1353
- * 7 (optional) add: this.change.emit(this.getValue());
1354
- *
1355
- * Read more:
1356
- * https://blog.rangle.io/angular-2-ngmodel-and-custom-form-components/
1357
- * https://material.angular.io/guide/creating-a-custom-form-field-control#implementing-the-methods-and-properties-of-matformfieldcontrol
1358
- */
1359
- var FHValueAccessor = /** @class */ (function () {
1360
- function FHValueAccessor() {
1361
- // implement 'ControlValueAccessor
1362
- this.changed = [];
1363
- this.touched = [];
1364
- }
1365
- /**
1366
- * call this when you have value changed by user
1367
- */
1368
- FHValueAccessor.prototype.emitChanged = function () {
1369
- var value = this.getValue();
1370
- this.changed.forEach(function (f) { return f(value); });
1371
- };
1372
- Object.defineProperty(FHValueAccessor.prototype, "value", {
1373
- get: function () {
1374
- return this.getValue();
1375
- },
1376
- set: function (value) {
1377
- if (this.getValue() !== value) {
1378
- this.setValue(value);
1379
- this.changed.forEach(function (f) { return f(value); });
1380
- }
1381
- },
1382
- enumerable: true,
1383
- configurable: true
1384
- });
1385
- FHValueAccessor.prototype.writeValue = function (value) {
1386
- this.setValue(value);
1387
- };
1388
- FHValueAccessor.prototype.touch = function () {
1389
- this.touched.forEach(function (f) { return f(); });
1390
- };
1391
- FHValueAccessor.prototype.registerOnChange = function (fn) {
1392
- this.changed.push(fn);
1393
- };
1394
- FHValueAccessor.prototype.registerOnTouched = function (fn) {
1395
- this.touched.push(fn);
1396
- };
1397
- return FHValueAccessor;
1398
- }()); // -
1399
-
1400
- var FHTimePickerComponent = /** @class */ (function (_super) {
1401
- __extends(FHTimePickerComponent, _super);
1340
+ var noop = function () {
1341
+ };
1342
+ var ɵ0 = noop;
1343
+ var CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR = {
1344
+ provide: forms.NG_VALUE_ACCESSOR,
1345
+ useExisting: core.forwardRef(function () { return FHTimePickerComponent; }),
1346
+ multi: true
1347
+ };
1348
+ var FHTimePickerComponent = /** @class */ (function () {
1402
1349
  /**
1403
1350
  *
1404
1351
  */
1405
1352
  function FHTimePickerComponent(_dataService, dialog, m_appService, toastr, uti_s) {
1406
- var _this = _super.call(this) || this;
1407
- _this._dataService = _dataService;
1408
- _this.dialog = dialog;
1409
- _this.m_appService = m_appService;
1410
- _this.toastr = toastr;
1411
- _this.uti_s = uti_s;
1412
- _this.maxore = 23;
1413
- _this.label = "";
1414
- _this.enabled = true;
1415
- _this.show_picker = false;
1416
- _this.selchange = new core.EventEmitter(); // it's preferable to use standart output: '(change)'
1417
- _this.ngChange = new core.EventEmitter();
1418
- _this.h = 0;
1419
- _this.m = 0;
1420
- _this.res = "";
1421
- return _this;
1353
+ this._dataService = _dataService;
1354
+ this.dialog = dialog;
1355
+ this.m_appService = m_appService;
1356
+ this.toastr = toastr;
1357
+ this.uti_s = uti_s;
1358
+ this.maxore = 23;
1359
+ this.label = "";
1360
+ this.enabled = true;
1361
+ this.show_picker = false;
1362
+ this.selchange = new core.EventEmitter(); // it's preferable to use standart output: '(change)'
1363
+ this.ngChange = new core.EventEmitter();
1364
+ this.h = 0;
1365
+ this.m = 0;
1366
+ this.res = "";
1367
+ this.onChange = function (_) {
1368
+ };
1369
+ this.onTouched = function () {
1370
+ };
1422
1371
  }
1423
- FHTimePickerComponent_1 = FHTimePickerComponent;
1424
1372
  FHTimePickerComponent.prototype.uph = function () {
1425
1373
  if (this.h < this.maxore) {
1426
1374
  this.h++;
@@ -1510,8 +1458,7 @@
1510
1458
  this.h = parseInt(a[0]);
1511
1459
  this.m = parseInt(a[1]);
1512
1460
  if (desc_val.length != 5) {
1513
- // it will make ngModel assign value with the padding
1514
- this.emitChanged();
1461
+ this.onChange(this.getValue());
1515
1462
  }
1516
1463
  };
1517
1464
  FHTimePickerComponent.prototype.isValidVal = function () {
@@ -1549,7 +1496,7 @@
1549
1496
  .selchange
1550
1497
  .emit();
1551
1498
  this.ngChange.emit(value);
1552
- this.emitChanged();
1499
+ this.onChange(value);
1553
1500
  };
1554
1501
  FHTimePickerComponent.prototype.isCharNumeric = function (charStr) {
1555
1502
  return !!/\d/.test(charStr);
@@ -1572,7 +1519,15 @@
1572
1519
  return false;
1573
1520
  }
1574
1521
  };
1575
- var FHTimePickerComponent_1;
1522
+ FHTimePickerComponent.prototype.writeValue = function (value) {
1523
+ this.setByValue(value);
1524
+ };
1525
+ FHTimePickerComponent.prototype.registerOnChange = function (fn) {
1526
+ this.onChange = fn;
1527
+ };
1528
+ FHTimePickerComponent.prototype.registerOnTouched = function (fn) {
1529
+ this.onTouched = fn;
1530
+ };
1576
1531
  FHTimePickerComponent.ctorParameters = function () { return [
1577
1532
  { type: QueryService },
1578
1533
  { type: dialog.MatDialog },
@@ -1600,13 +1555,11 @@
1600
1555
  core.Output('change'),
1601
1556
  __metadata("design:type", core.EventEmitter)
1602
1557
  ], FHTimePickerComponent.prototype, "ngChange", void 0);
1603
- FHTimePickerComponent = FHTimePickerComponent_1 = __decorate([
1558
+ FHTimePickerComponent = __decorate([
1604
1559
  core.Component({
1605
1560
  selector: 'FHTimePicker',
1561
+ providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR],
1606
1562
  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 ",
1607
- providers: [
1608
- { provide: forms.NG_VALUE_ACCESSOR, useExisting: FHTimePickerComponent_1, multi: true },
1609
- ],
1610
1563
  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 "]
1611
1564
  }),
1612
1565
  __metadata("design:paramtypes", [QueryService,
@@ -1616,7 +1569,7 @@
1616
1569
  UtilityService])
1617
1570
  ], FHTimePickerComponent);
1618
1571
  return FHTimePickerComponent;
1619
- }(FHValueAccessor)); // -
1572
+ }()); // -
1620
1573
 
1621
1574
  var CurrencyComponent = /** @class */ (function () {
1622
1575
  function CurrencyComponent() {
@@ -2012,34 +1965,42 @@
2012
1965
  return WinWait;
2013
1966
  }());
2014
1967
 
2015
- var FHComboboxComponent = /** @class */ (function (_super) {
2016
- __extends(FHComboboxComponent, _super);
1968
+ var noop$1 = function () {
1969
+ };
1970
+ var ɵ0$1 = noop$1;
1971
+ var CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1 = {
1972
+ provide: forms.NG_VALUE_ACCESSOR,
1973
+ useExisting: core.forwardRef(function () { return FHComboboxComponent; }),
1974
+ multi: true
1975
+ };
1976
+ var FHComboboxComponent = /** @class */ (function () {
2017
1977
  function FHComboboxComponent(_dataService, _dataService_odbc) {
2018
- var _this = _super.call(this) || this;
2019
- _this._dataService = _dataService;
2020
- _this._dataService_odbc = _dataService_odbc;
2021
- _this.init_fill = true;
2022
- _this.sql = "";
2023
- _this.types = [];
2024
- _this.values = [];
2025
- _this.hidden = false;
2026
- _this.label = "";
2027
- _this.enabled = true;
2028
- _this.required = false;
2029
- _this.sel_label = "";
2030
- _this.fillend = new core.EventEmitter();
2031
- _this.selchange = new core.EventEmitter();
2032
- _this.initend = new core.EventEmitter();
2033
- _this.myData = [];
2034
- _this.valDef = "-1";
2035
- _this.selval = "-1";
2036
- _this.errorMsg = "";
2037
- _this.db_type = "1";
2038
- _this.dis_value = '';
2039
- _this.descri_val = "";
2040
- return _this;
1978
+ this._dataService = _dataService;
1979
+ this._dataService_odbc = _dataService_odbc;
1980
+ this.init_fill = true;
1981
+ this.sql = "";
1982
+ this.types = [];
1983
+ this.values = [];
1984
+ this.hidden = false;
1985
+ this.label = "";
1986
+ this.enabled = true;
1987
+ this.required = false;
1988
+ this.sel_label = "";
1989
+ this.fillend = new core.EventEmitter();
1990
+ this.selchange = new core.EventEmitter();
1991
+ this.initend = new core.EventEmitter();
1992
+ this.myData = [];
1993
+ this.valDef = "-1";
1994
+ this.selval = "-1";
1995
+ this.errorMsg = "";
1996
+ this.db_type = "1";
1997
+ this.dis_value = '';
1998
+ this.descri_val = "";
1999
+ this.onChange = function (_) {
2000
+ };
2001
+ this.onTouched = function () {
2002
+ };
2041
2003
  }
2042
- FHComboboxComponent_1 = FHComboboxComponent;
2043
2004
  FHComboboxComponent.prototype.setValue = function (desc_val) {
2044
2005
  this.setByValue(desc_val);
2045
2006
  };
@@ -2288,6 +2249,7 @@
2288
2249
  });
2289
2250
  };
2290
2251
  FHComboboxComponent.prototype.sc = function () {
2252
+ this.onChange(this.getValue());
2291
2253
  this
2292
2254
  .selchange
2293
2255
  .emit({ event: this.getObj(), valore: this.getValue(), descrizione_valore: this.getDescri() });
@@ -2296,27 +2258,15 @@
2296
2258
  var value = this.getData('valore');
2297
2259
  return value;
2298
2260
  };
2299
- FHComboboxComponent.prototype.emitChanged = function () {
2300
- var value = this.getModelValue();
2301
- this.changed.forEach(function (f) { return f(value); });
2302
- };
2303
- Object.defineProperty(FHComboboxComponent.prototype, "value", {
2304
- get: function () {
2305
- return this.getModelValue();
2306
- },
2307
- set: function (value) {
2308
- if (this.getModelValue() !== value) {
2309
- this.setByValue(value);
2310
- this.changed.forEach(function (f) { return f(value); });
2311
- }
2312
- },
2313
- enumerable: true,
2314
- configurable: true
2315
- });
2316
2261
  FHComboboxComponent.prototype.writeValue = function (value) {
2317
- this.setValue(value);
2262
+ this.setByValue(value);
2263
+ };
2264
+ FHComboboxComponent.prototype.registerOnChange = function (fn) {
2265
+ this.onChange = fn;
2266
+ };
2267
+ FHComboboxComponent.prototype.registerOnTouched = function (fn) {
2268
+ this.onTouched = fn;
2318
2269
  };
2319
- var FHComboboxComponent_1;
2320
2270
  FHComboboxComponent.ctorParameters = function () { return [
2321
2271
  { type: QueryService },
2322
2272
  { type: OdbcService }
@@ -2381,18 +2331,17 @@
2381
2331
  core.Input(),
2382
2332
  __metadata("design:type", String)
2383
2333
  ], FHComboboxComponent.prototype, "db_type", void 0);
2384
- FHComboboxComponent = FHComboboxComponent_1 = __decorate([
2334
+ FHComboboxComponent = __decorate([
2385
2335
  core.Component({
2386
- 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 ",
2387
- providers: [
2388
- { provide: forms.NG_VALUE_ACCESSOR, useExisting: FHComboboxComponent_1, multi: true },
2389
- ],
2336
+ selector: 'FHComboBox',
2337
+ providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1],
2338
+ 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 ",
2390
2339
  styles: ["\n\n "]
2391
2340
  }),
2392
2341
  __metadata("design:paramtypes", [QueryService, OdbcService])
2393
2342
  ], FHComboboxComponent);
2394
2343
  return FHComboboxComponent;
2395
- }(FHValueAccessor));
2344
+ }());
2396
2345
 
2397
2346
  var FHUploadComponent = /** @class */ (function () {
2398
2347
  function FHUploadComponent(_dataService, toastr, dialog, app_s) {
@@ -3255,7 +3204,6 @@
3255
3204
  }, 700);
3256
3205
  _this.upc.single = false;
3257
3206
  _this.b_mobile = _this._appservice.getState().pageFullscreen;
3258
- console.log('this.m_p_tipo ', _this.m_p_tipo);
3259
3207
  _this
3260
3208
  .upc
3261
3209
  .init(_this.App, _this.K, 'Descrizione Allegato', _this.m_p_tipo, _this.m_programma_da_eseguire);
@@ -3922,7 +3870,7 @@
3922
3870
  return win_riassegna_select_user;
3923
3871
  }());
3924
3872
 
3925
- var CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR = {
3873
+ var CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2 = {
3926
3874
  provide: forms.NG_VALUE_ACCESSOR,
3927
3875
  useExisting: core.forwardRef(function () { return FHUserFieldComponent; }),
3928
3876
  multi: true
@@ -4171,7 +4119,7 @@
4171
4119
  ], FHUserFieldComponent.prototype, "userName", void 0);
4172
4120
  FHUserFieldComponent = __decorate([
4173
4121
  core.Component({
4174
- selector: 'FHUserField', providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR],
4122
+ selector: 'FHUserField', providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2],
4175
4123
  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 ",
4176
4124
  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 "]
4177
4125
  }),
@@ -6655,38 +6603,46 @@
6655
6603
  return FHGridComponent;
6656
6604
  }());
6657
6605
 
6658
- var FHAutoCompleteComponent = /** @class */ (function (_super) {
6659
- __extends(FHAutoCompleteComponent, _super);
6606
+ var noop$2 = function () {
6607
+ };
6608
+ var ɵ0$2 = noop$2;
6609
+ var CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$3 = {
6610
+ provide: forms.NG_VALUE_ACCESSOR,
6611
+ useExisting: core.forwardRef(function () { return FHAutoCompleteComponent; }),
6612
+ multi: true
6613
+ };
6614
+ var FHAutoCompleteComponent = /** @class */ (function () {
6660
6615
  function FHAutoCompleteComponent(_dataService, _dataService_odbc) {
6661
- var _this = _super.call(this) || this;
6662
- _this._dataService = _dataService;
6663
- _this._dataService_odbc = _dataService_odbc;
6664
- _this.init_fill = true; //automatic load data from database default is true
6665
- _this.sql = "";
6666
- _this.label = "";
6667
- _this.types = [];
6668
- _this.values = [];
6669
- _this.hidden = false;
6670
- _this.db_type = "1";
6671
- _this.enabled = true;
6672
- _this.required = false;
6673
- _this.only_from_list = false;
6674
- _this.fillend = new core.EventEmitter();
6675
- _this.selchange = new core.EventEmitter(); // it's preferable to use standart output: '(change)'
6676
- _this.change = new core.EventEmitter();
6677
- _this.initend = new core.EventEmitter();
6678
- _this.focusout = new core.EventEmitter();
6679
- _this.descri_val = "";
6680
- _this.sItem = "";
6681
- _this.searchItemsFiltered = [];
6682
- _this.is_loaded = false;
6683
- _this.selval = null;
6684
- _this.errorMsg = "";
6685
- _this.valDef = "";
6686
- _this.table_hidden = true;
6687
- return _this;
6616
+ this._dataService = _dataService;
6617
+ this._dataService_odbc = _dataService_odbc;
6618
+ this.init_fill = true; //automatic load data from database default is true
6619
+ this.sql = "";
6620
+ this.label = "";
6621
+ this.types = [];
6622
+ this.values = [];
6623
+ this.hidden = false;
6624
+ this.db_type = "1";
6625
+ this.enabled = true;
6626
+ this.required = false;
6627
+ this.only_from_list = false;
6628
+ this.fillend = new core.EventEmitter();
6629
+ this.selchange = new core.EventEmitter(); // it's preferable to use standart output: '(change)'
6630
+ this.change = new core.EventEmitter();
6631
+ this.initend = new core.EventEmitter();
6632
+ this.focusout = new core.EventEmitter();
6633
+ this.descri_val = "";
6634
+ this.sItem = "";
6635
+ this.searchItemsFiltered = [];
6636
+ this.is_loaded = false;
6637
+ this.selval = null;
6638
+ this.errorMsg = "";
6639
+ this.valDef = "";
6640
+ this.table_hidden = true;
6641
+ this.onChange = function (_) {
6642
+ };
6643
+ this.onTouched = function () {
6644
+ };
6688
6645
  }
6689
- FHAutoCompleteComponent_1 = FHAutoCompleteComponent;
6690
6646
  FHAutoCompleteComponent.prototype.fi_search = function () {
6691
6647
  if (this.sItem == null) {
6692
6648
  this.sItem = '';
@@ -6694,11 +6650,16 @@
6694
6650
  }
6695
6651
  };
6696
6652
  FHAutoCompleteComponent.prototype.fo_search = function (o) {
6653
+ var _this = this;
6654
+ setTimeout(function () {
6655
+ _this.onChange(_this.sItem);
6656
+ _this.change.emit(_this.sItem);
6657
+ });
6697
6658
  this
6698
6659
  .focusout
6699
6660
  .emit();
6700
6661
  };
6701
- FHAutoCompleteComponent.prototype.onChange = function (e) {
6662
+ FHAutoCompleteComponent.prototype.onChange_up = function (e) {
6702
6663
  // console.log('onChange()');
6703
6664
  this.searchItemsFiltered = [];
6704
6665
  if (this.sItem != null) {
@@ -6740,7 +6701,7 @@
6740
6701
  this
6741
6702
  .change
6742
6703
  .emit(value);
6743
- this.emitChanged();
6704
+ this.onChange(value);
6744
6705
  };
6745
6706
  FHAutoCompleteComponent.prototype.myListFormatter = function (data) {
6746
6707
  return data['descrizione_valore'];
@@ -6942,31 +6903,15 @@
6942
6903
  .emit();
6943
6904
  });
6944
6905
  };
6945
- /// override some FHValueAccessor implementation
6946
- /**
6947
- * call this when you have value changed by user
6948
- */
6949
- FHAutoCompleteComponent.prototype.emitChanged = function () {
6950
- var value = this.getModelValue();
6951
- this.changed.forEach(function (f) { return f(value); });
6952
- };
6953
- Object.defineProperty(FHAutoCompleteComponent.prototype, "value", {
6954
- get: function () {
6955
- return this.getModelValue();
6956
- },
6957
- set: function (value) {
6958
- if (this.getModelValue() !== value) {
6959
- this.setValue(value);
6960
- this.changed.forEach(function (f) { return f(value); });
6961
- }
6962
- },
6963
- enumerable: true,
6964
- configurable: true
6965
- });
6966
6906
  FHAutoCompleteComponent.prototype.writeValue = function (value) {
6967
6907
  this.setValue(value);
6968
6908
  };
6969
- var FHAutoCompleteComponent_1;
6909
+ FHAutoCompleteComponent.prototype.registerOnChange = function (fn) {
6910
+ this.onChange = fn;
6911
+ };
6912
+ FHAutoCompleteComponent.prototype.registerOnTouched = function (fn) {
6913
+ this.onTouched = fn;
6914
+ };
6970
6915
  FHAutoCompleteComponent.ctorParameters = function () { return [
6971
6916
  { type: QueryService },
6972
6917
  { type: OdbcService }
@@ -7039,19 +6984,17 @@
7039
6984
  core.ViewChild('auto'),
7040
6985
  __metadata("design:type", autocomplete.MatAutocomplete)
7041
6986
  ], FHAutoCompleteComponent.prototype, "auto", void 0);
7042
- FHAutoCompleteComponent = FHAutoCompleteComponent_1 = __decorate([
6987
+ FHAutoCompleteComponent = __decorate([
7043
6988
  core.Component({
7044
6989
  selector: 'FHAutoComplete',
7045
- 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 ",
7046
- providers: [
7047
- { provide: forms.NG_VALUE_ACCESSOR, useExisting: FHAutoCompleteComponent_1, multi: true },
7048
- ],
6990
+ providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$3],
6991
+ 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 ",
7049
6992
  styles: ["\n\n "]
7050
6993
  }),
7051
6994
  __metadata("design:paramtypes", [QueryService, OdbcService])
7052
6995
  ], FHAutoCompleteComponent);
7053
6996
  return FHAutoCompleteComponent;
7054
- }(FHValueAccessor)); //
6997
+ }());
7055
6998
 
7056
6999
  var moment = momentNs;
7057
7000
  var MOMENT_DATE_FORMATS = {
@@ -7228,25 +7171,34 @@
7228
7171
  return MomentDateAdapter;
7229
7172
  }(core$1.DateAdapter));
7230
7173
 
7231
- var ɵ0 = MOMENT_DATE_FORMATS;
7232
- var FHDatePickerComponent = /** @class */ (function (_super) {
7233
- __extends(FHDatePickerComponent, _super);
7174
+ var noop$3 = function () {
7175
+ };
7176
+ var ɵ0$3 = noop$3;
7177
+ var CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$4 = {
7178
+ provide: forms.NG_VALUE_ACCESSOR,
7179
+ useExisting: core.forwardRef(function () { return FHDatePickerComponent; }),
7180
+ multi: true
7181
+ };
7182
+ var ɵ1 = MOMENT_DATE_FORMATS;
7183
+ var FHDatePickerComponent = /** @class */ (function () {
7234
7184
  function FHDatePickerComponent(dateAdapter, uti_s) {
7235
- var _this = _super.call(this) || this;
7236
- _this.dateAdapter = dateAdapter;
7237
- _this.uti_s = uti_s;
7238
- _this.label = '';
7239
- _this.required = false;
7240
- _this.show_buttons = false;
7241
- _this.enabled = true;
7242
- _this.min_date = null;
7243
- _this.max_date = null;
7244
- _this.change = new core.EventEmitter();
7245
- _this.v_view = _this.uti_s.date2String(new Date());
7246
- _this.date_sel = null;
7247
- _this.v_date_sel = "";
7248
- _this.dateAdapter.setLocale('it-IT');
7249
- return _this;
7185
+ this.dateAdapter = dateAdapter;
7186
+ this.uti_s = uti_s;
7187
+ this.label = '';
7188
+ this.required = false;
7189
+ this.show_buttons = false;
7190
+ this.enabled = true;
7191
+ this.min_date = null;
7192
+ this.max_date = null;
7193
+ this.change = new core.EventEmitter();
7194
+ this.v_view = this.uti_s.date2String(new Date());
7195
+ this.date_sel = null;
7196
+ this.v_date_sel = "";
7197
+ this.onChange = function (_) {
7198
+ };
7199
+ this.onTouched = function () {
7200
+ };
7201
+ this.dateAdapter.setLocale('it-IT');
7250
7202
  }
7251
7203
  FHDatePickerComponent_1 = FHDatePickerComponent;
7252
7204
  FHDatePickerComponent.prototype.checkInput = function (ob) {
@@ -7298,8 +7250,8 @@
7298
7250
  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' }
7299
7251
  };*/
7300
7252
  FHDatePickerComponent.prototype.ch = function (event) {
7253
+ this.onChange(this.getValue());
7301
7254
  this.change.emit(this.getValue());
7302
- this.emitChanged();
7303
7255
  };
7304
7256
  FHDatePickerComponent.prototype.setFocus = function () {
7305
7257
  this.pickerId.nativeElement.focus();
@@ -7362,10 +7314,23 @@
7362
7314
  d = new Date(d.value);
7363
7315
  }
7364
7316
  }
7317
+ if (d.getFullYear() == 1970) {
7318
+ this.date_sel = null;
7319
+ return;
7320
+ }
7365
7321
  var dtp = new MomentDateAdapter();
7366
7322
  this.date_sel = dtp.createDate(d.getFullYear(), d.getMonth(), d.getDate());
7367
7323
  this.v_view = this.uti_s.date2String(this.getValue());
7368
7324
  };
7325
+ FHDatePickerComponent.prototype.writeValue = function (value) {
7326
+ this.setValue(value);
7327
+ };
7328
+ FHDatePickerComponent.prototype.registerOnChange = function (fn) {
7329
+ this.onChange = fn;
7330
+ };
7331
+ FHDatePickerComponent.prototype.registerOnTouched = function (fn) {
7332
+ this.onTouched = fn;
7333
+ };
7369
7334
  var FHDatePickerComponent_1;
7370
7335
  FHDatePickerComponent.ctorParameters = function () { return [
7371
7336
  { type: core$1.DateAdapter },
@@ -7406,8 +7371,8 @@
7406
7371
  FHDatePickerComponent = FHDatePickerComponent_1 = __decorate([
7407
7372
  core.Component({
7408
7373
  selector: 'FHDatePicker',
7409
- providers: [
7410
- { provide: core$1.MAT_DATE_FORMATS, useValue: ɵ0 },
7374
+ providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$4,
7375
+ { provide: core$1.MAT_DATE_FORMATS, useValue: ɵ1 },
7411
7376
  { provide: core$1.DateAdapter, useClass: MomentDateAdapter },
7412
7377
  { provide: forms.NG_VALUE_ACCESSOR, useExisting: FHDatePickerComponent_1, multi: true },
7413
7378
  { provide: core$1.MAT_DATE_LOCALE, useValue: 'it-IT' },
@@ -7418,23 +7383,31 @@
7418
7383
  __metadata("design:paramtypes", [core$1.DateAdapter, UtilityService])
7419
7384
  ], FHDatePickerComponent);
7420
7385
  return FHDatePickerComponent;
7421
- }(FHValueAccessor));
7386
+ }());
7422
7387
 
7423
- var FHTextInput = /** @class */ (function (_super) {
7424
- __extends(FHTextInput, _super);
7388
+ var noop$4 = function () {
7389
+ };
7390
+ var ɵ0$4 = noop$4;
7391
+ var CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$5 = {
7392
+ provide: forms.NG_VALUE_ACCESSOR,
7393
+ useExisting: core.forwardRef(function () { return FHTextInput; }),
7394
+ multi: true
7395
+ };
7396
+ var FHTextInput = /** @class */ (function () {
7425
7397
  function FHTextInput() {
7426
- var _this = _super.call(this) || this;
7427
- _this.hidden = false;
7428
- _this.label = "";
7429
- _this.enabled = true;
7430
- _this.required = false;
7431
- _this.change = new core.EventEmitter();
7432
- _this.focusout = new core.EventEmitter();
7433
- _this.focusin = new core.EventEmitter();
7434
- _this.text_v = '';
7435
- return _this;
7398
+ this.hidden = false;
7399
+ this.label = "";
7400
+ this.enabled = true;
7401
+ this.required = false;
7402
+ this.change = new core.EventEmitter();
7403
+ this.focusout = new core.EventEmitter();
7404
+ this.focusin = new core.EventEmitter();
7405
+ this.text_v = '';
7406
+ this.onChange = function (_) {
7407
+ };
7408
+ this.onTouched = function () {
7409
+ };
7436
7410
  }
7437
- FHTextInput_1 = FHTextInput;
7438
7411
  FHTextInput.prototype.onFi = function () {
7439
7412
  var _this = this;
7440
7413
  setTimeout(function () {
@@ -7450,41 +7423,20 @@
7450
7423
  FHTextInput.prototype.modelch = function () {
7451
7424
  var _this = this;
7452
7425
  setTimeout(function () {
7426
+ _this.onChange(_this.text_v);
7453
7427
  _this.change.emit(_this.text_v);
7454
7428
  });
7455
7429
  };
7456
7430
  FHTextInput.prototype.ngAfterViewInit = function () { };
7457
- FHTextInput.prototype.getValue = function () {
7458
- return this.text_v;
7459
- };
7460
- FHTextInput.prototype.setValue = function (v) {
7461
- this.text_v = v;
7462
- };
7463
- FHTextInput.prototype.getModelValue = function () {
7464
- var value = this.text_v;
7465
- return value;
7431
+ FHTextInput.prototype.writeValue = function (value) {
7432
+ this.text_v = value;
7466
7433
  };
7467
- FHTextInput.prototype.emitChanged = function () {
7468
- var value = this.getModelValue();
7469
- this.changed.forEach(function (f) { return f(value); });
7434
+ FHTextInput.prototype.registerOnChange = function (fn) {
7435
+ this.onChange = fn;
7470
7436
  };
7471
- Object.defineProperty(FHTextInput.prototype, "value", {
7472
- get: function () {
7473
- return this.getModelValue();
7474
- },
7475
- set: function (value) {
7476
- if (this.getModelValue() !== value) {
7477
- this.text_v = value;
7478
- this.changed.forEach(function (f) { return f(value); });
7479
- }
7480
- },
7481
- enumerable: true,
7482
- configurable: true
7483
- });
7484
- FHTextInput.prototype.writeValue = function (value) {
7485
- this.setValue(value);
7437
+ FHTextInput.prototype.registerOnTouched = function (fn) {
7438
+ this.onTouched = fn;
7486
7439
  };
7487
- var FHTextInput_1;
7488
7440
  __decorate([
7489
7441
  core.Input(),
7490
7442
  __metadata("design:type", Boolean)
@@ -7513,21 +7465,17 @@
7513
7465
  core.Output(),
7514
7466
  __metadata("design:type", core.EventEmitter)
7515
7467
  ], FHTextInput.prototype, "focusin", void 0);
7516
- FHTextInput = FHTextInput_1 = __decorate([
7468
+ FHTextInput = __decorate([
7517
7469
  core.Component({
7518
7470
  selector: 'FHTextInput',
7471
+ providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$5],
7519
7472
  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 ",
7520
- providers: [{
7521
- provide: forms.NG_VALUE_ACCESSOR,
7522
- useExisting: FHTextInput_1,
7523
- multi: true
7524
- },],
7525
7473
  styles: ["\n\n "]
7526
7474
  }),
7527
7475
  __metadata("design:paramtypes", [])
7528
7476
  ], FHTextInput);
7529
7477
  return FHTextInput;
7530
- }(FHValueAccessor));
7478
+ }());
7531
7479
 
7532
7480
  var ApprovaGridComponent = /** @class */ (function () {
7533
7481
  function ApprovaGridComponent() {
@@ -8278,10 +8226,10 @@
8278
8226
  return FHLogPanelComponent;
8279
8227
  }());
8280
8228
 
8281
- var noop = function () {
8229
+ var noop$5 = function () {
8282
8230
  };
8283
- var ɵ0$1 = noop;
8284
- var CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1 = {
8231
+ var ɵ0$5 = noop$5;
8232
+ var CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$6 = {
8285
8233
  provide: forms.NG_VALUE_ACCESSOR,
8286
8234
  useExisting: core.forwardRef(function () { return FHCurrencyFieldComponent; }),
8287
8235
  multi: true
@@ -8442,7 +8390,7 @@
8442
8390
  FHCurrencyFieldComponent = __decorate([
8443
8391
  core.Component({
8444
8392
  selector: 'FHCurrencyField',
8445
- providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1],
8393
+ providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$6],
8446
8394
  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 ",
8447
8395
  styles: ["\n\n "]
8448
8396
  }),
@@ -8451,9 +8399,9 @@
8451
8399
  return FHCurrencyFieldComponent;
8452
8400
  }());
8453
8401
 
8454
- var noop$1 = function () {
8402
+ var noop$6 = function () {
8455
8403
  };
8456
- var ɵ0$2 = noop$1;
8404
+ var ɵ0$6 = noop$6;
8457
8405
  var CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_RT = {
8458
8406
  provide: forms.NG_VALUE_ACCESSOR,
8459
8407
  useExisting: core.forwardRef(function () { return FHRichText; }),
@@ -8612,9 +8560,9 @@
8612
8560
  return WinOutputComponent;
8613
8561
  }());
8614
8562
 
8615
- var noop$2 = function () {
8563
+ var noop$7 = function () {
8616
8564
  };
8617
- var ɵ0$3 = noop$2;
8565
+ var ɵ0$7 = noop$7;
8618
8566
  var CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_NUMERIC = {
8619
8567
  provide: forms.NG_VALUE_ACCESSOR,
8620
8568
  useExisting: core.forwardRef(function () { return FHNumericFieldComponent; }),
@@ -13242,7 +13190,7 @@
13242
13190
  return SafePipe;
13243
13191
  }());
13244
13192
 
13245
- var CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2 = {
13193
+ var CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$7 = {
13246
13194
  provide: forms.NG_VALUE_ACCESSOR,
13247
13195
  useExisting: core.forwardRef(function () { return FHFieldPickListComponent; }),
13248
13196
  multi: true
@@ -13366,7 +13314,7 @@
13366
13314
  ], FHFieldPickListComponent.prototype, "value", void 0);
13367
13315
  FHFieldPickListComponent = __decorate([
13368
13316
  core.Component({
13369
- providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2],
13317
+ providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$7],
13370
13318
  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 ",
13371
13319
  styles: ["\n\n "]
13372
13320
  }),
@@ -14305,30 +14253,39 @@
14305
14253
  return FHHelpButton;
14306
14254
  }());
14307
14255
 
14308
- var FHCheckBox = /** @class */ (function (_super) {
14309
- __extends(FHCheckBox, _super);
14256
+ var noop$8 = function () {
14257
+ };
14258
+ var ɵ0$8 = noop$8;
14259
+ var CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$8 = {
14260
+ provide: forms.NG_VALUE_ACCESSOR,
14261
+ useExisting: core.forwardRef(function () { return FHCheckBox; }),
14262
+ multi: true
14263
+ };
14264
+ var FHCheckBox = /** @class */ (function () {
14310
14265
  function FHCheckBox() {
14311
- var _this = _super.call(this) || this;
14312
- _this.hidden = false;
14313
- _this.label = "";
14314
- _this.enabled = true;
14315
- _this.required = false;
14316
- _this.change = new core.EventEmitter();
14317
- _this.click = new core.EventEmitter();
14318
- _this.value_b = false;
14319
- return _this;
14266
+ this.hidden = false;
14267
+ this.label = "";
14268
+ this.enabled = true;
14269
+ this.required = false;
14270
+ this.change = new core.EventEmitter();
14271
+ this.click = new core.EventEmitter();
14272
+ this.value_b = false;
14273
+ this.onChange = function (_) {
14274
+ };
14275
+ this.onTouched = function () {
14276
+ };
14320
14277
  }
14321
- FHCheckBox_1 = FHCheckBox;
14322
14278
  FHCheckBox.prototype.onCl = function () {
14323
14279
  var _this = this;
14324
14280
  setTimeout(function () {
14325
- _this.click.emit(_this.value_b);
14281
+ _this.click.emit(_this.value_b ? 1 : 0);
14326
14282
  });
14327
14283
  };
14328
14284
  FHCheckBox.prototype.modelch = function () {
14329
14285
  var _this = this;
14330
14286
  setTimeout(function () {
14331
- _this.change.emit(_this.value_b);
14287
+ _this.onChange(_this.value_b ? 1 : 0);
14288
+ _this.change.emit(_this.value_b ? 1 : 0);
14332
14289
  });
14333
14290
  };
14334
14291
  FHCheckBox.prototype.ngAfterViewInit = function () { };
@@ -14338,10 +14295,7 @@
14338
14295
  else
14339
14296
  return 0;
14340
14297
  };
14341
- FHCheckBox.prototype.getValue = function () {
14342
- return this.getModelValue();
14343
- };
14344
- FHCheckBox.prototype.setValue = function (value) {
14298
+ FHCheckBox.prototype.writeValue = function (value) {
14345
14299
  if (this.getModelValue() !== value) {
14346
14300
  if (value != null)
14347
14301
  if (value == 1)
@@ -14350,31 +14304,12 @@
14350
14304
  this.value_b = false;
14351
14305
  }
14352
14306
  };
14353
- FHCheckBox.prototype.emitChanged = function () {
14354
- var value = this.getModelValue();
14355
- this.changed.forEach(function (f) { return f(value); });
14307
+ FHCheckBox.prototype.registerOnChange = function (fn) {
14308
+ this.onChange = fn;
14356
14309
  };
14357
- Object.defineProperty(FHCheckBox.prototype, "value", {
14358
- get: function () {
14359
- return this.getModelValue();
14360
- },
14361
- set: function (value) {
14362
- if (this.getModelValue() !== value) {
14363
- if (value != null)
14364
- if (value == 1)
14365
- this.value_b = true;
14366
- else
14367
- this.value_b = false;
14368
- this.changed.forEach(function (f) { return f(value); });
14369
- }
14370
- },
14371
- enumerable: true,
14372
- configurable: true
14373
- });
14374
- FHCheckBox.prototype.writeValue = function (value) {
14375
- this.setValue(value);
14310
+ FHCheckBox.prototype.registerOnTouched = function (fn) {
14311
+ this.onTouched = fn;
14376
14312
  };
14377
- var FHCheckBox_1;
14378
14313
  __decorate([
14379
14314
  core.Input(),
14380
14315
  __metadata("design:type", Boolean)
@@ -14399,21 +14334,17 @@
14399
14334
  core.Output(),
14400
14335
  __metadata("design:type", core.EventEmitter)
14401
14336
  ], FHCheckBox.prototype, "click", void 0);
14402
- FHCheckBox = FHCheckBox_1 = __decorate([
14337
+ FHCheckBox = __decorate([
14403
14338
  core.Component({
14404
14339
  selector: 'FHCheckBox',
14340
+ providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$8],
14405
14341
  template: "\n\n <mat-checkbox [(ngModel)]=\"value_b\" (click)=\"onCl()\" [disabled]=\"!enabled\" [required]=\"required\" (ngModelChange)=\"modelch()\">{{label}}\n </mat-checkbox>\n ",
14406
- providers: [{
14407
- provide: forms.NG_VALUE_ACCESSOR,
14408
- useExisting: FHCheckBox_1,
14409
- multi: true
14410
- },],
14411
14342
  styles: ["\n\n "]
14412
14343
  }),
14413
14344
  __metadata("design:paramtypes", [])
14414
14345
  ], FHCheckBox);
14415
14346
  return FHCheckBox;
14416
- }(FHValueAccessor));
14347
+ }());
14417
14348
 
14418
14349
  var FluxhubLibModule = /** @class */ (function () {
14419
14350
  function FluxhubLibModule() {
@@ -14743,37 +14674,42 @@
14743
14674
  exports.win_user_info = win_user_info;
14744
14675
  exports.wkf_header_bar = wkf_header_bar;
14745
14676
  exports.wkfapp = wkfapp;
14746
- exports.ɵa = CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2;
14747
- exports.ɵb = CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1;
14748
- exports.ɵba = win_riassegna_select_user;
14749
- exports.ɵbb = win_sostituisci_utente;
14750
- exports.ɵbc = win_commento_sel_notif;
14751
- exports.ɵbd = win_manage_values;
14752
- exports.ɵbe = win_manage_roles;
14753
- exports.ɵbf = FHComboboxComponentFilter;
14754
- exports.ɵc = CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_NUMERIC;
14755
- exports.ɵd = CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_RT;
14756
- exports.ɵe = CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR;
14757
- exports.ɵf = FHValueAccessor;
14758
- exports.ɵg = FHHelpButton;
14759
- exports.ɵh = SafePipe;
14760
- exports.ɵi = DecimalMask;
14761
- exports.ɵj = MOMENT_DATE_FORMATS;
14762
- exports.ɵk = MomentDateAdapter;
14763
- exports.ɵl = win_grid_help;
14764
- exports.ɵm = HighlightService;
14765
- exports.ɵn = FHViewerComponent;
14766
- exports.ɵp = FHGridToolBarComponent;
14767
- exports.ɵq = win_assegna;
14768
- exports.ɵr = win_conferma;
14769
- exports.ɵs = win_select_canale;
14770
- exports.ɵt = win_select_level;
14771
- exports.ɵu = win_uploads;
14772
- exports.ɵv = win_commenti;
14773
- exports.ɵw = win_info_doc;
14774
- exports.ɵx = win_log;
14775
- exports.ɵy = win_recupera_doc;
14776
- exports.ɵz = win_riassegna_select_level;
14677
+ exports.ɵa = CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$7;
14678
+ exports.ɵb = CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$3;
14679
+ exports.ɵba = win_commenti;
14680
+ exports.ɵbb = win_info_doc;
14681
+ exports.ɵbc = win_log;
14682
+ exports.ɵbd = win_recupera_doc;
14683
+ exports.ɵbe = win_riassegna_select_level;
14684
+ exports.ɵbf = win_riassegna_select_user;
14685
+ exports.ɵbg = win_sostituisci_utente;
14686
+ exports.ɵbh = win_commento_sel_notif;
14687
+ exports.ɵbi = win_manage_values;
14688
+ exports.ɵbj = win_manage_roles;
14689
+ exports.ɵbk = FHComboboxComponentFilter;
14690
+ exports.ɵc = CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1;
14691
+ exports.ɵd = CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$6;
14692
+ exports.ɵe = CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$4;
14693
+ exports.ɵf = CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_NUMERIC;
14694
+ exports.ɵg = CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_RT;
14695
+ exports.ɵh = CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR;
14696
+ exports.ɵi = CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2;
14697
+ exports.ɵj = CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$5;
14698
+ exports.ɵk = CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$8;
14699
+ exports.ɵl = FHHelpButton;
14700
+ exports.ɵm = SafePipe;
14701
+ exports.ɵn = DecimalMask;
14702
+ exports.ɵo = MOMENT_DATE_FORMATS;
14703
+ exports.ɵp = MomentDateAdapter;
14704
+ exports.ɵq = win_grid_help;
14705
+ exports.ɵr = HighlightService;
14706
+ exports.ɵs = FHViewerComponent;
14707
+ exports.ɵu = FHGridToolBarComponent;
14708
+ exports.ɵv = win_assegna;
14709
+ exports.ɵw = win_conferma;
14710
+ exports.ɵx = win_select_canale;
14711
+ exports.ɵy = win_select_level;
14712
+ exports.ɵz = win_uploads;
14777
14713
 
14778
14714
  Object.defineProperty(exports, '__esModule', { value: true });
14779
14715