@fluxhub/fluxhub-lib 9.0.32 → 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 (41) hide show
  1. package/bundles/fluxhub-fluxhub-lib.umd.js +424 -267
  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 +101 -0
  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 +99 -0
  11. package/esm2015/lib/controls/fhtimepicker.js +29 -13
  12. package/esm2015/lib/controls/fhuploadpanel.js +1 -2
  13. package/esm2015/lib/fluxhub-lib.module.js +5 -3
  14. package/esm2015/public_api.js +3 -1
  15. package/esm5/fluxhub-fluxhub-lib.js +35 -30
  16. package/esm5/lib/controls/fhautocomplete.js +59 -64
  17. package/esm5/lib/controls/fhcheckbox.js +98 -0
  18. package/esm5/lib/controls/fhcombobox.js +51 -55
  19. package/esm5/lib/controls/fhdatepicker.js +48 -27
  20. package/esm5/lib/controls/fhtextinput.js +97 -0
  21. package/esm5/lib/controls/fhtimepicker.js +45 -32
  22. package/esm5/lib/controls/fhuploadpanel.js +1 -2
  23. package/esm5/lib/fluxhub-lib.module.js +5 -3
  24. package/esm5/public_api.js +3 -1
  25. package/fesm2015/fluxhub-fluxhub-lib.js +315 -137
  26. package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
  27. package/fesm5/fluxhub-fluxhub-lib.js +389 -239
  28. package/fesm5/fluxhub-fluxhub-lib.js.map +1 -1
  29. package/fluxhub-fluxhub-lib.d.ts +35 -30
  30. package/fluxhub-fluxhub-lib.metadata.json +1 -1
  31. package/lib/controls/fhautocomplete.d.ts +8 -9
  32. package/lib/controls/fhcheckbox.d.ts +22 -0
  33. package/lib/controls/fhcombobox.d.ts +7 -5
  34. package/lib/controls/fhdatepicker.d.ts +8 -2
  35. package/lib/controls/fhtextinput.d.ts +23 -0
  36. package/lib/controls/fhtimepicker.d.ts +8 -2
  37. package/package.json +1 -1
  38. package/public_api.d.ts +2 -0
  39. package/esm2015/lib/models/FHValueAccessor.js +0 -55
  40. package/esm5/lib/models/FHValueAccessor.js +0 -61
  41. 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,6 +7838,100 @@ FHDatePickerComponent = FHDatePickerComponent_1 = __decorate([
7850
7838
  __metadata("design:paramtypes", [DateAdapter, UtilityService])
7851
7839
  ], FHDatePickerComponent);
7852
7840
 
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 {
7850
+ constructor() {
7851
+ this.hidden = false;
7852
+ this.label = "";
7853
+ this.enabled = true;
7854
+ this.required = false;
7855
+ this.change = new EventEmitter();
7856
+ this.focusout = new EventEmitter();
7857
+ this.focusin = new EventEmitter();
7858
+ this.text_v = '';
7859
+ this.onChange = (_) => {
7860
+ };
7861
+ this.onTouched = () => {
7862
+ };
7863
+ }
7864
+ onFi() {
7865
+ setTimeout(() => {
7866
+ this.focusin.emit(this.text_v);
7867
+ });
7868
+ }
7869
+ onFu() {
7870
+ setTimeout(() => {
7871
+ this.focusout.emit(this.text_v);
7872
+ });
7873
+ }
7874
+ modelch() {
7875
+ setTimeout(() => {
7876
+ this.onChange(this.text_v);
7877
+ this.change.emit(this.text_v);
7878
+ });
7879
+ }
7880
+ ngAfterViewInit() { }
7881
+ writeValue(value) {
7882
+ this.text_v = value;
7883
+ }
7884
+ registerOnChange(fn) {
7885
+ this.onChange = fn;
7886
+ }
7887
+ registerOnTouched(fn) {
7888
+ this.onTouched = fn;
7889
+ }
7890
+ };
7891
+ __decorate([
7892
+ Input(),
7893
+ __metadata("design:type", Boolean)
7894
+ ], FHTextInput.prototype, "hidden", void 0);
7895
+ __decorate([
7896
+ Input(),
7897
+ __metadata("design:type", String)
7898
+ ], FHTextInput.prototype, "label", void 0);
7899
+ __decorate([
7900
+ Input(),
7901
+ __metadata("design:type", Boolean)
7902
+ ], FHTextInput.prototype, "enabled", void 0);
7903
+ __decorate([
7904
+ Input(),
7905
+ __metadata("design:type", Boolean)
7906
+ ], FHTextInput.prototype, "required", void 0);
7907
+ __decorate([
7908
+ Output(),
7909
+ __metadata("design:type", EventEmitter)
7910
+ ], FHTextInput.prototype, "change", void 0);
7911
+ __decorate([
7912
+ Output(),
7913
+ __metadata("design:type", EventEmitter)
7914
+ ], FHTextInput.prototype, "focusout", void 0);
7915
+ __decorate([
7916
+ Output(),
7917
+ __metadata("design:type", EventEmitter)
7918
+ ], FHTextInput.prototype, "focusin", void 0);
7919
+ FHTextInput = __decorate([
7920
+ Component({
7921
+ selector: 'FHTextInput',
7922
+ providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$5],
7923
+ template: `
7924
+ <mat-form-field [hidden]="hidden" appearance="outline" floatLabel="always"><mat-label>{{label}}</mat-label>
7925
+ <input matInput type="text" [(ngModel)]="text_v" [disabled]="!enabled" [required]="required" (focusout)="onFu()" (focusin)="onFi()" (ngModelChange)="modelch()">
7926
+ </mat-form-field>
7927
+ `,
7928
+ styles: [`
7929
+
7930
+ `]
7931
+ }),
7932
+ __metadata("design:paramtypes", [])
7933
+ ], FHTextInput);
7934
+
7853
7935
  let ApprovaGridComponent = class ApprovaGridComponent {
7854
7936
  constructor() {
7855
7937
  this.val_app = -1;
@@ -8840,10 +8922,10 @@ FHLogPanelComponent = __decorate([
8840
8922
  __metadata("design:paramtypes", [UtilityService])
8841
8923
  ], FHLogPanelComponent);
8842
8924
 
8843
- const noop = () => {
8925
+ const noop$5 = () => {
8844
8926
  };
8845
- const ɵ0$1 = noop;
8846
- const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1 = {
8927
+ const ɵ0$5 = noop$5;
8928
+ const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$6 = {
8847
8929
  provide: NG_VALUE_ACCESSOR,
8848
8930
  useExisting: forwardRef(() => FHCurrencyFieldComponent),
8849
8931
  multi: true
@@ -9001,7 +9083,7 @@ __decorate([
9001
9083
  FHCurrencyFieldComponent = __decorate([
9002
9084
  Component({
9003
9085
  selector: 'FHCurrencyField',
9004
- providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1],
9086
+ providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$6],
9005
9087
  template: `
9006
9088
  <mat-form-field [hidden]="!enabled || hidden" appearance="outline" floatLabel="always"><mat-label>{{label}}</mat-label>
9007
9089
  <input type="text" style="text-align:right" #el matInput
@@ -9023,9 +9105,9 @@ FHCurrencyFieldComponent = __decorate([
9023
9105
  __metadata("design:paramtypes", [])
9024
9106
  ], FHCurrencyFieldComponent);
9025
9107
 
9026
- const noop$1 = () => {
9108
+ const noop$6 = () => {
9027
9109
  };
9028
- const ɵ0$2 = noop$1;
9110
+ const ɵ0$6 = noop$6;
9029
9111
  const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_RT = {
9030
9112
  provide: NG_VALUE_ACCESSOR,
9031
9113
  useExisting: forwardRef(() => FHRichText),
@@ -9211,9 +9293,9 @@ WinOutputComponent = __decorate([
9211
9293
  __metadata("design:paramtypes", [MatDialogRef, ToastrService])
9212
9294
  ], WinOutputComponent);
9213
9295
 
9214
- const noop$2 = () => {
9296
+ const noop$7 = () => {
9215
9297
  };
9216
- const ɵ0$3 = noop$2;
9298
+ const ɵ0$7 = noop$7;
9217
9299
  const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_NUMERIC = {
9218
9300
  provide: NG_VALUE_ACCESSOR,
9219
9301
  useExisting: forwardRef(() => FHNumericFieldComponent),
@@ -14474,7 +14556,7 @@ SafePipe = __decorate([
14474
14556
  __metadata("design:paramtypes", [DomSanitizer])
14475
14557
  ], SafePipe);
14476
14558
 
14477
- const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2 = {
14559
+ const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$7 = {
14478
14560
  provide: NG_VALUE_ACCESSOR,
14479
14561
  useExisting: forwardRef(() => FHFieldPickListComponent),
14480
14562
  multi: true
@@ -14598,7 +14680,7 @@ __decorate([
14598
14680
  ], FHFieldPickListComponent.prototype, "value", void 0);
14599
14681
  FHFieldPickListComponent = __decorate([
14600
14682
  Component({
14601
- providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2],
14683
+ providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$7],
14602
14684
  selector: 'FHFieldPickList', template: `
14603
14685
  <div fxLayout="row" style="width: 100%" fxLayoutAlign="start center" [hidden]="hidden"><div style="width: 100%">
14604
14686
  <mat-form-field appearance="outline" floatLabel="always"><mat-label>{{label}}</mat-label>
@@ -15779,6 +15861,102 @@ FHHelpButton = __decorate([
15779
15861
  __metadata("design:paramtypes", [QueryService, ToastrService])
15780
15862
  ], FHHelpButton);
15781
15863
 
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 {
15873
+ constructor() {
15874
+ this.hidden = false;
15875
+ this.label = "";
15876
+ this.enabled = true;
15877
+ this.required = false;
15878
+ this.change = new EventEmitter();
15879
+ this.click = new EventEmitter();
15880
+ this.value_b = false;
15881
+ this.onChange = (_) => {
15882
+ };
15883
+ this.onTouched = () => {
15884
+ };
15885
+ }
15886
+ onCl() {
15887
+ setTimeout(() => {
15888
+ this.click.emit(this.value_b ? 1 : 0);
15889
+ });
15890
+ }
15891
+ modelch() {
15892
+ setTimeout(() => {
15893
+ this.onChange(this.value_b ? 1 : 0);
15894
+ this.change.emit(this.value_b ? 1 : 0);
15895
+ });
15896
+ }
15897
+ ngAfterViewInit() { }
15898
+ getModelValue() {
15899
+ if (this.value_b)
15900
+ return 1;
15901
+ else
15902
+ return 0;
15903
+ }
15904
+ writeValue(value) {
15905
+ if (this.getModelValue() !== value) {
15906
+ if (value != null)
15907
+ if (value == 1)
15908
+ this.value_b = true;
15909
+ else
15910
+ this.value_b = false;
15911
+ }
15912
+ }
15913
+ registerOnChange(fn) {
15914
+ this.onChange = fn;
15915
+ }
15916
+ registerOnTouched(fn) {
15917
+ this.onTouched = fn;
15918
+ }
15919
+ };
15920
+ __decorate([
15921
+ Input(),
15922
+ __metadata("design:type", Boolean)
15923
+ ], FHCheckBox.prototype, "hidden", void 0);
15924
+ __decorate([
15925
+ Input(),
15926
+ __metadata("design:type", String)
15927
+ ], FHCheckBox.prototype, "label", void 0);
15928
+ __decorate([
15929
+ Input(),
15930
+ __metadata("design:type", Boolean)
15931
+ ], FHCheckBox.prototype, "enabled", void 0);
15932
+ __decorate([
15933
+ Input(),
15934
+ __metadata("design:type", Boolean)
15935
+ ], FHCheckBox.prototype, "required", void 0);
15936
+ __decorate([
15937
+ Output(),
15938
+ __metadata("design:type", EventEmitter)
15939
+ ], FHCheckBox.prototype, "change", void 0);
15940
+ __decorate([
15941
+ Output(),
15942
+ __metadata("design:type", EventEmitter)
15943
+ ], FHCheckBox.prototype, "click", void 0);
15944
+ FHCheckBox = __decorate([
15945
+ Component({
15946
+ selector: 'FHCheckBox',
15947
+ providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$8],
15948
+ template: `
15949
+
15950
+ <mat-checkbox [(ngModel)]="value_b" (click)="onCl()" [disabled]="!enabled" [required]="required" (ngModelChange)="modelch()">{{label}}
15951
+ </mat-checkbox>
15952
+ `,
15953
+ styles: [`
15954
+
15955
+ `]
15956
+ }),
15957
+ __metadata("design:paramtypes", [])
15958
+ ], FHCheckBox);
15959
+
15782
15960
  var FluxhubLibModule_1;
15783
15961
  let FluxhubLibModule = FluxhubLibModule_1 = class FluxhubLibModule {
15784
15962
  static forRoot() {
@@ -15832,13 +16010,13 @@ FluxhubLibModule = FluxhubLibModule_1 = __decorate([
15832
16010
  apiKey: 'AIzaSyD3-g3b_QqxUruxBY4PGJKaH2fubIVXvN4'
15833
16011
  }),
15834
16012
  FlexLayoutModule, MarkdownModule, CKEditorModule],
15835
- exports: [FHHelpButton, win_user_info, win_insert_commento, FHRoleManager, FHFieldPickListComponent, SafePipe, fhimagepreview, win_show_image, WinAskButtonsComponent, win_time_slider, DecimalMask, FHTimePickerComponent, CurrencyComponent, FHUploadPanelComponent, FHUploadComponent,
16013
+ exports: [FHCheckBox, FHTextInput, FHHelpButton, win_user_info, win_insert_commento, FHRoleManager, FHFieldPickListComponent, SafePipe, fhimagepreview, win_show_image, WinAskButtonsComponent, win_time_slider, DecimalMask, FHTimePickerComponent, CurrencyComponent, FHUploadPanelComponent, FHUploadComponent,
15836
16014
  FHGridComponent, FHComboboxComponent, FHConfirmComponent, FHAutoCompleteComponent, FHDatePickerComponent, NumericEditorComponent,
15837
16015
  FHUserPickerComponent, ApprovaGridComponent, FHCurrencyFormatterDirective, FHCurrencyPipe, win_mappa, win_grid_help, TextAreaEditor,
15838
16016
  ComboBoxEditor, FHListComponent, FHWinComboSelect, ReplaceLineBreaks, WinAskTextComponent, FHPickListComponent, WinAskNumberComponent,
15839
16017
  FHMdReader, FHLogPanelComponent, WinAskTextBigComponent, FHCurrencyFieldComponent, FHRichText, WinOutputComponent, FHNumericFieldComponent, wkf_header_bar,
15840
16018
  FHListPick, WinWait, FHUserFieldComponent, FHGridJSONComponent, win_salva_annulla, FormBuilderComponent, FormExecuterComponent, FHTableManager],
15841
- declarations: [FHHelpButton, win_user_info, win_insert_commento, FHRoleManager, FHFieldPickListComponent, SafePipe, FHViewerComponent,
16019
+ declarations: [FHCheckBox, FHTextInput, FHHelpButton, win_user_info, win_insert_commento, FHRoleManager, FHFieldPickListComponent, SafePipe, FHViewerComponent,
15842
16020
  fhimagepreview, win_show_image, WinAskButtonsComponent, FHGridToolBarComponent, win_time_slider, DecimalMask, FHTimePickerComponent, CurrencyComponent, FHUploadPanelComponent, FHUploadComponent, wkf_header_bar,
15843
16021
  FHGridComponent, FHComboboxComponent, FHConfirmComponent, FHAutoCompleteComponent, FHDatePickerComponent, NumericEditorComponent,
15844
16022
  FHUserPickerComponent, ApprovaGridComponent, FHCurrencyFormatterDirective, FHCurrencyPipe, win_mappa, win_grid_help, TextAreaEditor,
@@ -16036,5 +16214,5 @@ class FSResult {
16036
16214
  * Generated bundle index. Do not edit.
16037
16215
  */
16038
16216
 
16039
- export { AppMakerService, AppService, ApprovaGridComponent, AuthenticationService, ComboBoxEditor, CurrencyComponent, FHAutoCompleteComponent, FHComboboxComponent, FHConfirmComponent, FHConfirmValues, FHCurrencyFieldComponent, FHCurrencyFormatterDirective, FHCurrencyPipe, FHDatePickerComponent, FHFieldPickListComponent, FHGridComponent, FHGridJSONComponent, FHGuard, FHListComponent, FHListPick, FHLogPanelComponent, FHMdReader, FHNumericFieldComponent, FHPickListComponent, FHRichText, FHRoleManager, FHTableManager, 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, FHHelpButton as ɵf, SafePipe as ɵg, DecimalMask as ɵh, FHValueAccessor 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 };
16040
16218
  //# sourceMappingURL=fluxhub-fluxhub-lib.js.map