@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
1
  import { __decorate, __metadata, __param } 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';
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';
@@ -1214,68 +1214,19 @@ QueryService = __decorate([
1214
1214
  ToastrService, AppService, UtilityService])
1215
1215
  ], QueryService);
1216
1216
 
1217
- /**
1218
- * Add support of "[(ngModel)]"
1219
- * HOW TO:
1220
- *
1221
- * 1. ADD: providers: [
1222
- * {provide: NG_VALUE_ACCESSOR, useExisting: FHAutoCompleteComponent, multi: true},
1223
- * ]
1224
- * 2. ADD: extends FHValueAccessor<any>
1225
- * 3. ADD: constructor() { super(); }
1226
- * 4. Add: (if not exists) getValue(){...} AND setValue(value){...}
1227
- * 5. ADD: (!!!) this.emitChanged(); (!!!) call this when you have value changed by user
1228
- *
1229
- * 6 (optional) add: @Output() change: EventEmitter<any> = new EventEmitter();
1230
- * 7 (optional) add: this.change.emit(this.getValue());
1231
- *
1232
- * Read more:
1233
- * https://blog.rangle.io/angular-2-ngmodel-and-custom-form-components/
1234
- * https://material.angular.io/guide/creating-a-custom-form-field-control#implementing-the-methods-and-properties-of-matformfieldcontrol
1235
- */
1236
- class FHValueAccessor {
1237
- constructor() {
1238
- // implement 'ControlValueAccessor
1239
- this.changed = [];
1240
- this.touched = [];
1241
- }
1242
- /**
1243
- * call this when you have value changed by user
1244
- */
1245
- emitChanged() {
1246
- const value = this.getValue();
1247
- this.changed.forEach(f => f(value));
1248
- }
1249
- get value() {
1250
- return this.getValue();
1251
- }
1252
- set value(value) {
1253
- if (this.getValue() !== value) {
1254
- this.setValue(value);
1255
- this.changed.forEach(f => f(value));
1256
- }
1257
- }
1258
- writeValue(value) {
1259
- this.setValue(value);
1260
- }
1261
- touch() {
1262
- this.touched.forEach(f => f());
1263
- }
1264
- registerOnChange(fn) {
1265
- this.changed.push(fn);
1266
- }
1267
- registerOnTouched(fn) {
1268
- this.touched.push(fn);
1269
- }
1270
- } // -
1271
-
1272
- var FHTimePickerComponent_1;
1273
- let FHTimePickerComponent = FHTimePickerComponent_1 = class FHTimePickerComponent extends FHValueAccessor {
1217
+ const noop = () => {
1218
+ };
1219
+ const ɵ0 = noop;
1220
+ const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR = {
1221
+ provide: NG_VALUE_ACCESSOR,
1222
+ useExisting: forwardRef(() => FHTimePickerComponent),
1223
+ multi: true
1224
+ };
1225
+ let FHTimePickerComponent = class FHTimePickerComponent {
1274
1226
  /**
1275
1227
  *
1276
1228
  */
1277
1229
  constructor(_dataService, dialog, m_appService, toastr, uti_s) {
1278
- super();
1279
1230
  this._dataService = _dataService;
1280
1231
  this.dialog = dialog;
1281
1232
  this.m_appService = m_appService;
@@ -1290,6 +1241,10 @@ let FHTimePickerComponent = FHTimePickerComponent_1 = class FHTimePickerComponen
1290
1241
  this.h = 0;
1291
1242
  this.m = 0;
1292
1243
  this.res = "";
1244
+ this.onChange = (_) => {
1245
+ };
1246
+ this.onTouched = () => {
1247
+ };
1293
1248
  }
1294
1249
  uph() {
1295
1250
  if (this.h < this.maxore) {
@@ -1380,8 +1335,7 @@ let FHTimePickerComponent = FHTimePickerComponent_1 = class FHTimePickerComponen
1380
1335
  this.h = parseInt(a[0]);
1381
1336
  this.m = parseInt(a[1]);
1382
1337
  if (desc_val.length != 5) {
1383
- // it will make ngModel assign value with the padding
1384
- this.emitChanged();
1338
+ this.onChange(this.getValue());
1385
1339
  }
1386
1340
  }
1387
1341
  isValidVal() {
@@ -1419,7 +1373,7 @@ let FHTimePickerComponent = FHTimePickerComponent_1 = class FHTimePickerComponen
1419
1373
  .selchange
1420
1374
  .emit();
1421
1375
  this.ngChange.emit(value);
1422
- this.emitChanged();
1376
+ this.onChange(value);
1423
1377
  }
1424
1378
  isCharNumeric(charStr) {
1425
1379
  return !!/\d/.test(charStr);
@@ -1442,6 +1396,15 @@ let FHTimePickerComponent = FHTimePickerComponent_1 = class FHTimePickerComponen
1442
1396
  return false;
1443
1397
  }
1444
1398
  }
1399
+ writeValue(value) {
1400
+ this.setByValue(value);
1401
+ }
1402
+ registerOnChange(fn) {
1403
+ this.onChange = fn;
1404
+ }
1405
+ registerOnTouched(fn) {
1406
+ this.onTouched = fn;
1407
+ }
1445
1408
  }; // -
1446
1409
  FHTimePickerComponent.ctorParameters = () => [
1447
1410
  { type: QueryService },
@@ -1470,9 +1433,10 @@ __decorate([
1470
1433
  Output('change'),
1471
1434
  __metadata("design:type", EventEmitter)
1472
1435
  ], FHTimePickerComponent.prototype, "ngChange", void 0);
1473
- FHTimePickerComponent = FHTimePickerComponent_1 = __decorate([
1436
+ FHTimePickerComponent = __decorate([
1474
1437
  Component({
1475
1438
  selector: 'FHTimePicker',
1439
+ providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR],
1476
1440
  template: `
1477
1441
  <div fxLayout="row" fxLayoutAlign="center center"><b>{{label}}</b>&nbsp;&nbsp;
1478
1442
  <div fxLayout="column" fxLayoutAlign="center center">
@@ -1504,9 +1468,6 @@ FHTimePickerComponent = FHTimePickerComponent_1 = __decorate([
1504
1468
  </div>
1505
1469
  </div>
1506
1470
  `,
1507
- providers: [
1508
- { provide: NG_VALUE_ACCESSOR, useExisting: FHTimePickerComponent_1, multi: true },
1509
- ],
1510
1471
  styles: [`
1511
1472
  .hhh {
1512
1473
  height: 63px;
@@ -1966,10 +1927,16 @@ WinWait = __decorate([
1966
1927
  __metadata("design:paramtypes", [MatDialogRef, ToastrService, AppService])
1967
1928
  ], WinWait);
1968
1929
 
1969
- var FHComboboxComponent_1;
1970
- let FHComboboxComponent = FHComboboxComponent_1 = class FHComboboxComponent extends FHValueAccessor {
1930
+ const noop$1 = () => {
1931
+ };
1932
+ const ɵ0$1 = noop$1;
1933
+ const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1 = {
1934
+ provide: NG_VALUE_ACCESSOR,
1935
+ useExisting: forwardRef(() => FHComboboxComponent),
1936
+ multi: true
1937
+ };
1938
+ let FHComboboxComponent = class FHComboboxComponent {
1971
1939
  constructor(_dataService, _dataService_odbc) {
1972
- super();
1973
1940
  this._dataService = _dataService;
1974
1941
  this._dataService_odbc = _dataService_odbc;
1975
1942
  this.init_fill = true;
@@ -1991,6 +1958,10 @@ let FHComboboxComponent = FHComboboxComponent_1 = class FHComboboxComponent exte
1991
1958
  this.db_type = "1";
1992
1959
  this.dis_value = '';
1993
1960
  this.descri_val = "";
1961
+ this.onChange = (_) => {
1962
+ };
1963
+ this.onTouched = () => {
1964
+ };
1994
1965
  }
1995
1966
  setValue(desc_val) {
1996
1967
  this.setByValue(desc_val);
@@ -2238,6 +2209,7 @@ let FHComboboxComponent = FHComboboxComponent_1 = class FHComboboxComponent exte
2238
2209
  });
2239
2210
  }
2240
2211
  sc() {
2212
+ this.onChange(this.getValue());
2241
2213
  this
2242
2214
  .selchange
2243
2215
  .emit({ event: this.getObj(), valore: this.getValue(), descrizione_valore: this.getDescri() });
@@ -2246,21 +2218,14 @@ let FHComboboxComponent = FHComboboxComponent_1 = class FHComboboxComponent exte
2246
2218
  const value = this.getData('valore');
2247
2219
  return value;
2248
2220
  }
2249
- emitChanged() {
2250
- const value = this.getModelValue();
2251
- this.changed.forEach(f => f(value));
2252
- }
2253
- get value() {
2254
- return this.getModelValue();
2221
+ writeValue(value) {
2222
+ this.setByValue(value);
2255
2223
  }
2256
- set value(value) {
2257
- if (this.getModelValue() !== value) {
2258
- this.setByValue(value);
2259
- this.changed.forEach(f => f(value));
2260
- }
2224
+ registerOnChange(fn) {
2225
+ this.onChange = fn;
2261
2226
  }
2262
- writeValue(value) {
2263
- this.setValue(value);
2227
+ registerOnTouched(fn) {
2228
+ this.onTouched = fn;
2264
2229
  }
2265
2230
  };
2266
2231
  FHComboboxComponent.ctorParameters = () => [
@@ -2327,9 +2292,11 @@ __decorate([
2327
2292
  Input(),
2328
2293
  __metadata("design:type", String)
2329
2294
  ], FHComboboxComponent.prototype, "db_type", void 0);
2330
- FHComboboxComponent = FHComboboxComponent_1 = __decorate([
2295
+ FHComboboxComponent = __decorate([
2331
2296
  Component({
2332
- selector: 'FHComboBox', template: `
2297
+ selector: 'FHComboBox',
2298
+ providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1],
2299
+ template: `
2333
2300
  <mat-form-field [hidden]="!enabled || hidden" appearance="outline" floatLabel="always"><mat-label>{{label}}</mat-label>
2334
2301
  <mat-select #cmb [(ngModel)]="selval" (selectionChange)="sc()" [required]="required">
2335
2302
  <mat-option value="-1">{{sel_label}}</mat-option>
@@ -2341,9 +2308,6 @@ FHComboboxComponent = FHComboboxComponent_1 = __decorate([
2341
2308
  <input type="text" #el1 matInput [disabled]="true" [(ngModel)]="dis_value">
2342
2309
  </mat-form-field>
2343
2310
  `,
2344
- providers: [
2345
- { provide: NG_VALUE_ACCESSOR, useExisting: FHComboboxComponent_1, multi: true },
2346
- ],
2347
2311
  styles: [`
2348
2312
 
2349
2313
  `]
@@ -3261,7 +3225,6 @@ let FHUploadPanelComponent = class FHUploadPanelComponent {
3261
3225
  }, 700);
3262
3226
  this.upc.single = false;
3263
3227
  this.b_mobile = this._appservice.getState().pageFullscreen;
3264
- console.log('this.m_p_tipo ', this.m_p_tipo);
3265
3228
  this
3266
3229
  .upc
3267
3230
  .init(this.App, this.K, 'Descrizione Allegato', this.m_p_tipo, this.m_programma_da_eseguire);
@@ -4309,7 +4272,7 @@ win_riassegna_select_user = __decorate([
4309
4272
  __metadata("design:paramtypes", [MatDialogRef, AppService, ToastrService, QueryService])
4310
4273
  ], win_riassegna_select_user);
4311
4274
 
4312
- const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR = {
4275
+ const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2 = {
4313
4276
  provide: NG_VALUE_ACCESSOR,
4314
4277
  useExisting: forwardRef(() => FHUserFieldComponent),
4315
4278
  multi: true
@@ -4554,7 +4517,7 @@ __decorate([
4554
4517
  ], FHUserFieldComponent.prototype, "userName", void 0);
4555
4518
  FHUserFieldComponent = __decorate([
4556
4519
  Component({
4557
- selector: 'FHUserField', providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR],
4520
+ selector: 'FHUserField', providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2],
4558
4521
  template: `
4559
4522
  <div fxLayout="row" [hidden]="!enabled || hidden">
4560
4523
  <mat-form-field style="clickable-field" (click)="open_pick()" appearance="outline" floatLabel="always"><mat-label>{{label}}</mat-label>
@@ -7045,10 +7008,16 @@ FHGridComponent = __decorate([
7045
7008
  __metadata("design:paramtypes", [GridService, ToastrService, QueryService, AppService, SlimLoadingBarService, MatDialog, UtilityService, OfficeAutomatorService, FileService])
7046
7009
  ], FHGridComponent);
7047
7010
 
7048
- var FHAutoCompleteComponent_1;
7049
- let FHAutoCompleteComponent = FHAutoCompleteComponent_1 = class FHAutoCompleteComponent extends FHValueAccessor {
7011
+ const noop$2 = () => {
7012
+ };
7013
+ const ɵ0$2 = noop$2;
7014
+ const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$3 = {
7015
+ provide: NG_VALUE_ACCESSOR,
7016
+ useExisting: forwardRef(() => FHAutoCompleteComponent),
7017
+ multi: true
7018
+ };
7019
+ let FHAutoCompleteComponent = class FHAutoCompleteComponent {
7050
7020
  constructor(_dataService, _dataService_odbc) {
7051
- super();
7052
7021
  this._dataService = _dataService;
7053
7022
  this._dataService_odbc = _dataService_odbc;
7054
7023
  this.init_fill = true; //automatic load data from database default is true
@@ -7074,6 +7043,10 @@ let FHAutoCompleteComponent = FHAutoCompleteComponent_1 = class FHAutoCompleteCo
7074
7043
  this.errorMsg = "";
7075
7044
  this.valDef = "";
7076
7045
  this.table_hidden = true;
7046
+ this.onChange = (_) => {
7047
+ };
7048
+ this.onTouched = () => {
7049
+ };
7077
7050
  }
7078
7051
  fi_search() {
7079
7052
  if (this.sItem == null) {
@@ -7082,11 +7055,15 @@ let FHAutoCompleteComponent = FHAutoCompleteComponent_1 = class FHAutoCompleteCo
7082
7055
  }
7083
7056
  }
7084
7057
  fo_search(o) {
7058
+ setTimeout(() => {
7059
+ this.onChange(this.sItem);
7060
+ this.change.emit(this.sItem);
7061
+ });
7085
7062
  this
7086
7063
  .focusout
7087
7064
  .emit();
7088
7065
  }
7089
- onChange(e) {
7066
+ onChange_up(e) {
7090
7067
  // console.log('onChange()');
7091
7068
  this.searchItemsFiltered = [];
7092
7069
  if (this.sItem != null) {
@@ -7128,7 +7105,7 @@ let FHAutoCompleteComponent = FHAutoCompleteComponent_1 = class FHAutoCompleteCo
7128
7105
  this
7129
7106
  .change
7130
7107
  .emit(value);
7131
- this.emitChanged();
7108
+ this.onChange(value);
7132
7109
  }
7133
7110
  myListFormatter(data) {
7134
7111
  return data['descrizione_valore'];
@@ -7327,27 +7304,16 @@ let FHAutoCompleteComponent = FHAutoCompleteComponent_1 = class FHAutoCompleteCo
7327
7304
  .emit();
7328
7305
  });
7329
7306
  }
7330
- /// override some FHValueAccessor implementation
7331
- /**
7332
- * call this when you have value changed by user
7333
- */
7334
- emitChanged() {
7335
- const value = this.getModelValue();
7336
- this.changed.forEach(f => f(value));
7337
- }
7338
- get value() {
7339
- return this.getModelValue();
7340
- }
7341
- set value(value) {
7342
- if (this.getModelValue() !== value) {
7343
- this.setValue(value);
7344
- this.changed.forEach(f => f(value));
7345
- }
7346
- }
7347
7307
  writeValue(value) {
7348
7308
  this.setValue(value);
7349
7309
  }
7350
- }; //
7310
+ registerOnChange(fn) {
7311
+ this.onChange = fn;
7312
+ }
7313
+ registerOnTouched(fn) {
7314
+ this.onTouched = fn;
7315
+ }
7316
+ };
7351
7317
  FHAutoCompleteComponent.ctorParameters = () => [
7352
7318
  { type: QueryService },
7353
7319
  { type: OdbcService }
@@ -7420,14 +7386,15 @@ __decorate([
7420
7386
  ViewChild('auto'),
7421
7387
  __metadata("design:type", MatAutocomplete)
7422
7388
  ], FHAutoCompleteComponent.prototype, "auto", void 0);
7423
- FHAutoCompleteComponent = FHAutoCompleteComponent_1 = __decorate([
7389
+ FHAutoCompleteComponent = __decorate([
7424
7390
  Component({
7425
7391
  selector: 'FHAutoComplete',
7392
+ providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$3],
7426
7393
  template: `
7427
7394
  <mat-form-field [hidden]="!enabled || hidden" appearance="outline" floatLabel="always"><mat-label>{{label}}</mat-label>
7428
7395
  <input matInput
7429
7396
  [disabled]="!enabled || hidden" [matAutocomplete]="auto" [required]="required"
7430
- (keyup)="onChange($event)" [(ngModel)]="sItem" (focus)="fi_search()" (focusout)="fo_search($event)"
7397
+ (keyup)="onChange_up($event)" [(ngModel)]="sItem" (focus)="fi_search()" (focusout)="fo_search($event)"
7431
7398
  #searchp>
7432
7399
  </mat-form-field>
7433
7400
  <mat-autocomplete #auto="matAutocomplete" (optionSelected)="selectedSearchItem($event)" autoActiveFirstOption >
@@ -7448,9 +7415,6 @@ FHAutoCompleteComponent = FHAutoCompleteComponent_1 = __decorate([
7448
7415
  >
7449
7416
  </mat-form-field>
7450
7417
  `,
7451
- providers: [
7452
- { provide: NG_VALUE_ACCESSOR, useExisting: FHAutoCompleteComponent_1, multi: true },
7453
- ],
7454
7418
  styles: [`
7455
7419
 
7456
7420
  `]
@@ -7631,10 +7595,17 @@ class MomentDateAdapter extends DateAdapter {
7631
7595
  }
7632
7596
 
7633
7597
  var FHDatePickerComponent_1;
7634
- const ɵ0 = MOMENT_DATE_FORMATS;
7635
- let FHDatePickerComponent = FHDatePickerComponent_1 = class FHDatePickerComponent extends FHValueAccessor {
7598
+ const noop$3 = () => {
7599
+ };
7600
+ const ɵ0$3 = noop$3;
7601
+ const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$4 = {
7602
+ provide: NG_VALUE_ACCESSOR,
7603
+ useExisting: forwardRef(() => FHDatePickerComponent),
7604
+ multi: true
7605
+ };
7606
+ const ɵ1 = MOMENT_DATE_FORMATS;
7607
+ let FHDatePickerComponent = FHDatePickerComponent_1 = class FHDatePickerComponent {
7636
7608
  constructor(dateAdapter, uti_s) {
7637
- super();
7638
7609
  this.dateAdapter = dateAdapter;
7639
7610
  this.uti_s = uti_s;
7640
7611
  this.label = '';
@@ -7647,6 +7618,10 @@ let FHDatePickerComponent = FHDatePickerComponent_1 = class FHDatePickerComponen
7647
7618
  this.v_view = this.uti_s.date2String(new Date());
7648
7619
  this.date_sel = null;
7649
7620
  this.v_date_sel = "";
7621
+ this.onChange = (_) => {
7622
+ };
7623
+ this.onTouched = () => {
7624
+ };
7650
7625
  this.dateAdapter.setLocale('it-IT');
7651
7626
  }
7652
7627
  checkInput(ob) {
@@ -7698,8 +7673,8 @@ let FHDatePickerComponent = FHDatePickerComponent_1 = class FHDatePickerComponen
7698
7673
  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' }
7699
7674
  };*/
7700
7675
  ch(event) {
7676
+ this.onChange(this.getValue());
7701
7677
  this.change.emit(this.getValue());
7702
- this.emitChanged();
7703
7678
  }
7704
7679
  setFocus() {
7705
7680
  this.pickerId.nativeElement.focus();
@@ -7760,10 +7735,23 @@ let FHDatePickerComponent = FHDatePickerComponent_1 = class FHDatePickerComponen
7760
7735
  d = new Date(d.value);
7761
7736
  }
7762
7737
  }
7738
+ if (d.getFullYear() == 1970) {
7739
+ this.date_sel = null;
7740
+ return;
7741
+ }
7763
7742
  let dtp = new MomentDateAdapter();
7764
7743
  this.date_sel = dtp.createDate(d.getFullYear(), d.getMonth(), d.getDate());
7765
7744
  this.v_view = this.uti_s.date2String(this.getValue());
7766
7745
  }
7746
+ writeValue(value) {
7747
+ this.setValue(value);
7748
+ }
7749
+ registerOnChange(fn) {
7750
+ this.onChange = fn;
7751
+ }
7752
+ registerOnTouched(fn) {
7753
+ this.onTouched = fn;
7754
+ }
7767
7755
  };
7768
7756
  FHDatePickerComponent.ctorParameters = () => [
7769
7757
  { type: DateAdapter },
@@ -7804,8 +7792,8 @@ __decorate([
7804
7792
  FHDatePickerComponent = FHDatePickerComponent_1 = __decorate([
7805
7793
  Component({
7806
7794
  selector: 'FHDatePicker',
7807
- providers: [
7808
- { provide: MAT_DATE_FORMATS, useValue: ɵ0 },
7795
+ providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$4,
7796
+ { provide: MAT_DATE_FORMATS, useValue: ɵ1 },
7809
7797
  { provide: DateAdapter, useClass: MomentDateAdapter },
7810
7798
  { provide: NG_VALUE_ACCESSOR, useExisting: FHDatePickerComponent_1, multi: true },
7811
7799
  { provide: MAT_DATE_LOCALE, useValue: 'it-IT' },
@@ -7850,10 +7838,16 @@ FHDatePickerComponent = FHDatePickerComponent_1 = __decorate([
7850
7838
  __metadata("design:paramtypes", [DateAdapter, UtilityService])
7851
7839
  ], FHDatePickerComponent);
7852
7840
 
7853
- var FHTextInput_1;
7854
- let FHTextInput = FHTextInput_1 = class FHTextInput extends FHValueAccessor {
7841
+ const noop$4 = () => {
7842
+ };
7843
+ const ɵ0$4 = noop$4;
7844
+ const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$5 = {
7845
+ provide: NG_VALUE_ACCESSOR,
7846
+ useExisting: forwardRef(() => FHTextInput),
7847
+ multi: true
7848
+ };
7849
+ let FHTextInput = class FHTextInput {
7855
7850
  constructor() {
7856
- super();
7857
7851
  this.hidden = false;
7858
7852
  this.label = "";
7859
7853
  this.enabled = true;
@@ -7862,6 +7856,10 @@ let FHTextInput = FHTextInput_1 = class FHTextInput extends FHValueAccessor {
7862
7856
  this.focusout = new EventEmitter();
7863
7857
  this.focusin = new EventEmitter();
7864
7858
  this.text_v = '';
7859
+ this.onChange = (_) => {
7860
+ };
7861
+ this.onTouched = () => {
7862
+ };
7865
7863
  }
7866
7864
  onFi() {
7867
7865
  setTimeout(() => {
@@ -7875,35 +7873,19 @@ let FHTextInput = FHTextInput_1 = class FHTextInput extends FHValueAccessor {
7875
7873
  }
7876
7874
  modelch() {
7877
7875
  setTimeout(() => {
7876
+ this.onChange(this.text_v);
7878
7877
  this.change.emit(this.text_v);
7879
7878
  });
7880
7879
  }
7881
7880
  ngAfterViewInit() { }
7882
- getValue() {
7883
- return this.text_v;
7884
- }
7885
- setValue(v) {
7886
- this.text_v = v;
7887
- }
7888
- getModelValue() {
7889
- const value = this.text_v;
7890
- return value;
7891
- }
7892
- emitChanged() {
7893
- const value = this.getModelValue();
7894
- this.changed.forEach(f => f(value));
7895
- }
7896
- get value() {
7897
- return this.getModelValue();
7881
+ writeValue(value) {
7882
+ this.text_v = value;
7898
7883
  }
7899
- set value(value) {
7900
- if (this.getModelValue() !== value) {
7901
- this.text_v = value;
7902
- this.changed.forEach(f => f(value));
7903
- }
7884
+ registerOnChange(fn) {
7885
+ this.onChange = fn;
7904
7886
  }
7905
- writeValue(value) {
7906
- this.setValue(value);
7887
+ registerOnTouched(fn) {
7888
+ this.onTouched = fn;
7907
7889
  }
7908
7890
  };
7909
7891
  __decorate([
@@ -7934,19 +7916,15 @@ __decorate([
7934
7916
  Output(),
7935
7917
  __metadata("design:type", EventEmitter)
7936
7918
  ], FHTextInput.prototype, "focusin", void 0);
7937
- FHTextInput = FHTextInput_1 = __decorate([
7919
+ FHTextInput = __decorate([
7938
7920
  Component({
7939
7921
  selector: 'FHTextInput',
7922
+ providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$5],
7940
7923
  template: `
7941
7924
  <mat-form-field [hidden]="hidden" appearance="outline" floatLabel="always"><mat-label>{{label}}</mat-label>
7942
7925
  <input matInput type="text" [(ngModel)]="text_v" [disabled]="!enabled" [required]="required" (focusout)="onFu()" (focusin)="onFi()" (ngModelChange)="modelch()">
7943
7926
  </mat-form-field>
7944
7927
  `,
7945
- providers: [{
7946
- provide: NG_VALUE_ACCESSOR,
7947
- useExisting: FHTextInput_1,
7948
- multi: true
7949
- },],
7950
7928
  styles: [`
7951
7929
 
7952
7930
  `]
@@ -8944,10 +8922,10 @@ FHLogPanelComponent = __decorate([
8944
8922
  __metadata("design:paramtypes", [UtilityService])
8945
8923
  ], FHLogPanelComponent);
8946
8924
 
8947
- const noop = () => {
8925
+ const noop$5 = () => {
8948
8926
  };
8949
- const ɵ0$1 = noop;
8950
- const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1 = {
8927
+ const ɵ0$5 = noop$5;
8928
+ const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$6 = {
8951
8929
  provide: NG_VALUE_ACCESSOR,
8952
8930
  useExisting: forwardRef(() => FHCurrencyFieldComponent),
8953
8931
  multi: true
@@ -9105,7 +9083,7 @@ __decorate([
9105
9083
  FHCurrencyFieldComponent = __decorate([
9106
9084
  Component({
9107
9085
  selector: 'FHCurrencyField',
9108
- providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1],
9086
+ providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$6],
9109
9087
  template: `
9110
9088
  <mat-form-field [hidden]="!enabled || hidden" appearance="outline" floatLabel="always"><mat-label>{{label}}</mat-label>
9111
9089
  <input type="text" style="text-align:right" #el matInput
@@ -9127,9 +9105,9 @@ FHCurrencyFieldComponent = __decorate([
9127
9105
  __metadata("design:paramtypes", [])
9128
9106
  ], FHCurrencyFieldComponent);
9129
9107
 
9130
- const noop$1 = () => {
9108
+ const noop$6 = () => {
9131
9109
  };
9132
- const ɵ0$2 = noop$1;
9110
+ const ɵ0$6 = noop$6;
9133
9111
  const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_RT = {
9134
9112
  provide: NG_VALUE_ACCESSOR,
9135
9113
  useExisting: forwardRef(() => FHRichText),
@@ -9315,9 +9293,9 @@ WinOutputComponent = __decorate([
9315
9293
  __metadata("design:paramtypes", [MatDialogRef, ToastrService])
9316
9294
  ], WinOutputComponent);
9317
9295
 
9318
- const noop$2 = () => {
9296
+ const noop$7 = () => {
9319
9297
  };
9320
- const ɵ0$3 = noop$2;
9298
+ const ɵ0$7 = noop$7;
9321
9299
  const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_NUMERIC = {
9322
9300
  provide: NG_VALUE_ACCESSOR,
9323
9301
  useExisting: forwardRef(() => FHNumericFieldComponent),
@@ -14578,7 +14556,7 @@ SafePipe = __decorate([
14578
14556
  __metadata("design:paramtypes", [DomSanitizer])
14579
14557
  ], SafePipe);
14580
14558
 
14581
- const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2 = {
14559
+ const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$7 = {
14582
14560
  provide: NG_VALUE_ACCESSOR,
14583
14561
  useExisting: forwardRef(() => FHFieldPickListComponent),
14584
14562
  multi: true
@@ -14702,7 +14680,7 @@ __decorate([
14702
14680
  ], FHFieldPickListComponent.prototype, "value", void 0);
14703
14681
  FHFieldPickListComponent = __decorate([
14704
14682
  Component({
14705
- providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2],
14683
+ providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$7],
14706
14684
  selector: 'FHFieldPickList', template: `
14707
14685
  <div fxLayout="row" style="width: 100%" fxLayoutAlign="start center" [hidden]="hidden"><div style="width: 100%">
14708
14686
  <mat-form-field appearance="outline" floatLabel="always"><mat-label>{{label}}</mat-label>
@@ -15883,10 +15861,16 @@ FHHelpButton = __decorate([
15883
15861
  __metadata("design:paramtypes", [QueryService, ToastrService])
15884
15862
  ], FHHelpButton);
15885
15863
 
15886
- var FHCheckBox_1;
15887
- let FHCheckBox = FHCheckBox_1 = class FHCheckBox extends FHValueAccessor {
15864
+ const noop$8 = () => {
15865
+ };
15866
+ const ɵ0$8 = noop$8;
15867
+ const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$8 = {
15868
+ provide: NG_VALUE_ACCESSOR,
15869
+ useExisting: forwardRef(() => FHCheckBox),
15870
+ multi: true
15871
+ };
15872
+ let FHCheckBox = class FHCheckBox {
15888
15873
  constructor() {
15889
- super();
15890
15874
  this.hidden = false;
15891
15875
  this.label = "";
15892
15876
  this.enabled = true;
@@ -15894,15 +15878,20 @@ let FHCheckBox = FHCheckBox_1 = class FHCheckBox extends FHValueAccessor {
15894
15878
  this.change = new EventEmitter();
15895
15879
  this.click = new EventEmitter();
15896
15880
  this.value_b = false;
15881
+ this.onChange = (_) => {
15882
+ };
15883
+ this.onTouched = () => {
15884
+ };
15897
15885
  }
15898
15886
  onCl() {
15899
15887
  setTimeout(() => {
15900
- this.click.emit(this.value_b);
15888
+ this.click.emit(this.value_b ? 1 : 0);
15901
15889
  });
15902
15890
  }
15903
15891
  modelch() {
15904
15892
  setTimeout(() => {
15905
- this.change.emit(this.value_b);
15893
+ this.onChange(this.value_b ? 1 : 0);
15894
+ this.change.emit(this.value_b ? 1 : 0);
15906
15895
  });
15907
15896
  }
15908
15897
  ngAfterViewInit() { }
@@ -15912,10 +15901,7 @@ let FHCheckBox = FHCheckBox_1 = class FHCheckBox extends FHValueAccessor {
15912
15901
  else
15913
15902
  return 0;
15914
15903
  }
15915
- getValue() {
15916
- return this.getModelValue();
15917
- }
15918
- setValue(value) {
15904
+ writeValue(value) {
15919
15905
  if (this.getModelValue() !== value) {
15920
15906
  if (value != null)
15921
15907
  if (value == 1)
@@ -15924,25 +15910,11 @@ let FHCheckBox = FHCheckBox_1 = class FHCheckBox extends FHValueAccessor {
15924
15910
  this.value_b = false;
15925
15911
  }
15926
15912
  }
15927
- emitChanged() {
15928
- const value = this.getModelValue();
15929
- this.changed.forEach(f => f(value));
15930
- }
15931
- get value() {
15932
- return this.getModelValue();
15933
- }
15934
- set value(value) {
15935
- if (this.getModelValue() !== value) {
15936
- if (value != null)
15937
- if (value == 1)
15938
- this.value_b = true;
15939
- else
15940
- this.value_b = false;
15941
- this.changed.forEach(f => f(value));
15942
- }
15913
+ registerOnChange(fn) {
15914
+ this.onChange = fn;
15943
15915
  }
15944
- writeValue(value) {
15945
- this.setValue(value);
15916
+ registerOnTouched(fn) {
15917
+ this.onTouched = fn;
15946
15918
  }
15947
15919
  };
15948
15920
  __decorate([
@@ -15969,19 +15941,15 @@ __decorate([
15969
15941
  Output(),
15970
15942
  __metadata("design:type", EventEmitter)
15971
15943
  ], FHCheckBox.prototype, "click", void 0);
15972
- FHCheckBox = FHCheckBox_1 = __decorate([
15944
+ FHCheckBox = __decorate([
15973
15945
  Component({
15974
15946
  selector: 'FHCheckBox',
15947
+ providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$8],
15975
15948
  template: `
15976
15949
 
15977
15950
  <mat-checkbox [(ngModel)]="value_b" (click)="onCl()" [disabled]="!enabled" [required]="required" (ngModelChange)="modelch()">{{label}}
15978
15951
  </mat-checkbox>
15979
15952
  `,
15980
- providers: [{
15981
- provide: NG_VALUE_ACCESSOR,
15982
- useExisting: FHCheckBox_1,
15983
- multi: true
15984
- },],
15985
15953
  styles: [`
15986
15954
 
15987
15955
  `]
@@ -16246,5 +16214,5 @@ class FSResult {
16246
16214
  * Generated bundle index. Do not edit.
16247
16215
  */
16248
16216
 
16249
- 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 };
16217
+ 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 };
16250
16218
  //# sourceMappingURL=fluxhub-fluxhub-lib.js.map