@fluxhub/fluxhub-lib 1.0.421 → 1.0.422

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.
@@ -6,7 +6,7 @@ import { Observable } from 'rxjs';
6
6
  import { __read, __extends, __assign } from 'tslib';
7
7
  import { SimpleCrypt } from 'ngx-simple-crypt';
8
8
  import { AES, enc } from 'crypto-js';
9
- import { MatDialogRef, MatDialog, DateAdapter, MAT_DATE_FORMATS, MatAutocompleteModule, MatDialogModule, MatButtonModule, MatButtonToggleModule, MatCardModule, MatCheckboxModule, MatChipsModule, MatDatepickerModule, MatExpansionModule, MatFormFieldModule, MatGridListModule, MatIconModule, MatInputModule, MatListModule, MatMenuModule, MatProgressBarModule, MatProgressSpinnerModule, MatRadioModule, MatSelectModule, MatSlideToggleModule, MatSliderModule, MatSidenavModule, MatSnackBarModule, MatStepperModule, MatTabsModule, MatToolbarModule, MatTooltipModule, MatPaginatorModule, MatSortModule, MatTableModule, MatNativeDateModule } from '@angular/material';
9
+ import { MatDialogRef, MatDialog, DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE, MatAutocompleteModule, MatDialogModule, MatButtonModule, MatButtonToggleModule, MatCardModule, MatCheckboxModule, MatChipsModule, MatDatepickerModule, MatExpansionModule, MatFormFieldModule, MatGridListModule, MatIconModule, MatInputModule, MatListModule, MatMenuModule, MatProgressBarModule, MatProgressSpinnerModule, MatRadioModule, MatSelectModule, MatSlideToggleModule, MatSliderModule, MatSidenavModule, MatSnackBarModule, MatStepperModule, MatTabsModule, MatToolbarModule, MatTooltipModule, MatPaginatorModule, MatSortModule, MatTableModule, MatNativeDateModule } from '@angular/material';
10
10
  import { NgControl, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
11
11
  import { FileUploader, FileUploadModule } from 'ng2-file-upload';
12
12
  import { Router, ActivatedRoute } from '@angular/router';
@@ -9393,20 +9393,42 @@ var FHDatePickerComponent = /** @class */ (function (_super) {
9393
9393
  _this.v_view = _this.uti_s.date2String(new Date());
9394
9394
  _this.date_sel = null;
9395
9395
  _this.v_date_sel = "";
9396
- _this.dateAdapter.setLocale('it');
9396
+ _this.dateAdapter.setLocale('it-IT');
9397
9397
  return _this;
9398
9398
  }
9399
9399
  /**
9400
- * @param {?} s
9400
+ * @param {?} ob
9401
+ * @return {?}
9402
+ */
9403
+ FHDatePickerComponent.prototype.checkInput = /**
9404
+ * @param {?} ob
9405
+ * @return {?}
9406
+ */
9407
+ function (ob) {
9408
+ console.log('ob ', ob);
9409
+ console.log('date_sel ', this.date_sel);
9410
+ if (ob.key == '-') {
9411
+ ob.preventDefault();
9412
+ //this.date_sel+=this.date_sel+'/';
9413
+ this.pickerId.nativeElement.value = this.pickerId.nativeElement.value.split('-').join('/');
9414
+ }
9415
+ };
9416
+ /**
9417
+ * @param {?} event
9401
9418
  * @return {?}
9402
9419
  */
9403
9420
  FHDatePickerComponent.prototype.dt_chg = /**
9404
- * @param {?} s
9421
+ * @param {?} event
9405
9422
  * @return {?}
9406
9423
  */
9407
- function (s) {
9424
+ function (event) {
9425
+ console.log('event ', event);
9426
+ /** @type {?} */
9427
+ var s = event.target.value;
9428
+ console.log('s -> ', s);
9408
9429
  /** @type {?} */
9409
9430
  var arr = s.split('-').join('/').split('/');
9431
+ console.log('arr ', arr);
9410
9432
  if (arr.length == 3) {
9411
9433
  if (arr[1].length == 1)
9412
9434
  arr[1] = "0" + arr[1];
@@ -9492,7 +9514,6 @@ var FHDatePickerComponent = /** @class */ (function (_super) {
9492
9514
  * @return {?}
9493
9515
  */
9494
9516
  function () {
9495
- console.log(_this.date_sel);
9496
9517
  _this.ch();
9497
9518
  }), 50);
9498
9519
  };
@@ -9588,7 +9609,8 @@ var FHDatePickerComponent = /** @class */ (function (_super) {
9588
9609
  * @return {?}
9589
9610
  */
9590
9611
  function (d) {
9591
- this.dateAdapter.setLocale('it');
9612
+ console.log('d ', d);
9613
+ this.dateAdapter.setLocale('it-IT');
9592
9614
  if (d == null) {
9593
9615
  this.date_sel = null;
9594
9616
  return;
@@ -9610,8 +9632,9 @@ var FHDatePickerComponent = /** @class */ (function (_super) {
9610
9632
  { provide: MAT_DATE_FORMATS, useValue: ɵ0 },
9611
9633
  { provide: DateAdapter, useClass: MomentDateAdapter },
9612
9634
  { provide: NG_VALUE_ACCESSOR, useExisting: FHDatePickerComponent, multi: true },
9635
+ { provide: MAT_DATE_LOCALE, useValue: 'it-IT' },
9613
9636
  ],
9614
- template: "\n <div [hidden]=\"!show_buttons||!enabled\">\n <button mat-flat-button style=\"background-color: #F5F5F5\" (click)=\"add_year()\">+1 Anno</button>\n <button mat-flat-button style=\"background-color: #F5F5F5\" (click)=\"ini_year()\">Inizio Anno</button>\n <button mat-flat-button style=\"background-color: #F5F5F5\" (click)=\"fin_year()\">Fine Anno</button>\n </div>\n\n <mat-form-field (click)=\"chxx($event)\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{label}}</mat-label>\n <input [disabled]=\"!enabled\" #pickerId (dateChange)=\"ch( $event)\" (focusout)=\"dt_chg($event.target.value)\"\n (click)=\"chxx($event)\" [(ngModel)]=\"date_sel\" matInput [matDatepicker]=\"picker\" >\n <mat-datepicker-toggle matSuffix [for]=\"picker\" (click)=\"chxx($event)\"></mat-datepicker-toggle>\n <mat-datepicker (click)=\"chxx($event)\" #picker></mat-datepicker>\n </mat-form-field>\n\n ",
9637
+ template: "\n <div [hidden]=\"!show_buttons||!enabled\">\n <button mat-flat-button style=\"background-color: #F5F5F5\" (click)=\"add_year()\">+1 Anno</button>\n <button mat-flat-button style=\"background-color: #F5F5F5\" (click)=\"ini_year()\">Inizio Anno</button>\n <button mat-flat-button style=\"background-color: #F5F5F5\" (click)=\"fin_year()\">Fine Anno</button>\n </div>\n\n <mat-form-field (click)=\"chxx($event)\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{label}}</mat-label>\n <input [disabled]=\"!enabled\" #pickerId (dateChange)=\"ch( $event)\" (focusout)=\"dt_chg($event)\" (keyup)=\"checkInput($event)\"\n (click)=\"chxx($event)\" [(ngModel)]=\"date_sel\" matInput [matDatepicker]=\"picker\" >\n <mat-datepicker-toggle matSuffix [for]=\"picker\" (click)=\"chxx($event)\"></mat-datepicker-toggle>\n <mat-datepicker (click)=\"chxx($event)\" #picker></mat-datepicker>\n </mat-form-field>\n\n ",
9615
9638
  styles: ["\n .lb_small_grigia {\n font-size: 12px;\n color: #B8B8B8;\n }\n\n .label_dis {\n font-size: 14px;\n font-weight: bold;\n }\n\n :host.ng-invalid > .ng-touched ::ng-deep .mat-input-element,\n :host.ng-invalid > .ng-touched ::ng-deep .mat-form-field-label {\n color: #f44336;\n }\n\n :host.ng-invalid > .ng-touched ::ng-deep .mat-form-field-underline,\n :host.ng-invalid > .ng-touched ::ng-deep .mat-form-field-ripple {\n background-color: #f44336;\n }\n "]
9616
9639
  }] }
9617
9640
  ];