@fluxhub/fluxhub-lib 1.0.421 → 1.0.423

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';
@@ -9176,17 +9176,37 @@ var MomentDateAdapter = /** @class */ (function (_super) {
9176
9176
  * @return {?}
9177
9177
  */
9178
9178
  function (value, parseFormat) {
9179
+ console.log('prima value ', value, 'parseFormat ', parseFormat);
9179
9180
  if (value != null) {
9180
9181
  /** @type {?} */
9181
9182
  var arr = value.split('/');
9183
+ console.log('arr ', arr);
9182
9184
  if (arr.length == 3) {
9185
+ /** @type {?} */
9186
+ var yy = parseInt(arr[2]);
9187
+ if (yy < 100)
9188
+ yy += 2000;
9189
+ if (arr[1].length == 1)
9190
+ arr[1] = "0" + arr[1];
9191
+ if (arr[0].length == 1)
9192
+ arr[0] = "0" + arr[0];
9193
+ value = arr[0] + "/" + arr[1] + "/" + yy;
9194
+ }
9195
+ arr = value.split('-');
9196
+ console.log('arr ', arr);
9197
+ if (arr.length == 3) {
9198
+ /** @type {?} */
9199
+ var yy = parseInt(arr[2]);
9200
+ if (yy < 100)
9201
+ yy += 2000;
9183
9202
  if (arr[1].length == 1)
9184
9203
  arr[1] = "0" + arr[1];
9185
9204
  if (arr[0].length == 1)
9186
9205
  arr[0] = "0" + arr[0];
9187
- value = arr[0] + "/" + arr[1] + "/" + arr[2];
9206
+ value = arr[0] + "/" + arr[1] + "/" + yy;
9188
9207
  }
9189
9208
  }
9209
+ console.log('fine value ', value, 'parseFormat ', parseFormat);
9190
9210
  /** @type {?} */
9191
9211
  var m = moment(value, parseFormat, true);
9192
9212
  if (!m.isValid()) {
@@ -9393,20 +9413,52 @@ var FHDatePickerComponent = /** @class */ (function (_super) {
9393
9413
  _this.v_view = _this.uti_s.date2String(new Date());
9394
9414
  _this.date_sel = null;
9395
9415
  _this.v_date_sel = "";
9396
- _this.dateAdapter.setLocale('it');
9416
+ _this.dateAdapter.setLocale('it-IT');
9397
9417
  return _this;
9398
9418
  }
9399
9419
  /**
9400
- * @param {?} s
9420
+ * @param {?} ob
9421
+ * @return {?}
9422
+ */
9423
+ FHDatePickerComponent.prototype.checkInput = /**
9424
+ * @param {?} ob
9425
+ * @return {?}
9426
+ */
9427
+ function (ob) {
9428
+ console.log('ob ', ob);
9429
+ console.log('date_sel ', this.date_sel);
9430
+ /* if(ob.key=='-')
9431
+ {
9432
+ ob.preventDefault();
9433
+ //this.date_sel+=this.date_sel+'/';
9434
+ this.pickerId.nativeElement.value=this.pickerId.nativeElement.value.split('-').join('/');
9435
+
9436
+ }
9437
+ let arr: Array<string> = this.pickerId.nativeElement.value.split('-').join('/').split('/');
9438
+ console.log(arr);
9439
+ if (arr.length == 3) {
9440
+ let yy=parseInt(arr[2]);
9441
+
9442
+ if(yy<25 && yy!=20){yy+=2000;
9443
+ this.pickerId.nativeElement.value=arr[0]+'/'+arr[1]+'/'+yy;}
9444
+ }*/
9445
+ };
9446
+ /**
9447
+ * @param {?} event
9401
9448
  * @return {?}
9402
9449
  */
9403
9450
  FHDatePickerComponent.prototype.dt_chg = /**
9404
- * @param {?} s
9451
+ * @param {?} event
9405
9452
  * @return {?}
9406
9453
  */
9407
- function (s) {
9454
+ function (event) {
9455
+ console.log('event ', event);
9456
+ /** @type {?} */
9457
+ var s = event.target.value;
9458
+ console.log('s -> ', s);
9408
9459
  /** @type {?} */
9409
9460
  var arr = s.split('-').join('/').split('/');
9461
+ console.log('arr ', arr);
9410
9462
  if (arr.length == 3) {
9411
9463
  if (arr[1].length == 1)
9412
9464
  arr[1] = "0" + arr[1];
@@ -9492,7 +9544,6 @@ var FHDatePickerComponent = /** @class */ (function (_super) {
9492
9544
  * @return {?}
9493
9545
  */
9494
9546
  function () {
9495
- console.log(_this.date_sel);
9496
9547
  _this.ch();
9497
9548
  }), 50);
9498
9549
  };
@@ -9588,7 +9639,8 @@ var FHDatePickerComponent = /** @class */ (function (_super) {
9588
9639
  * @return {?}
9589
9640
  */
9590
9641
  function (d) {
9591
- this.dateAdapter.setLocale('it');
9642
+ console.log('d ', d);
9643
+ this.dateAdapter.setLocale('it-IT');
9592
9644
  if (d == null) {
9593
9645
  this.date_sel = null;
9594
9646
  return;
@@ -9610,8 +9662,9 @@ var FHDatePickerComponent = /** @class */ (function (_super) {
9610
9662
  { provide: MAT_DATE_FORMATS, useValue: ɵ0 },
9611
9663
  { provide: DateAdapter, useClass: MomentDateAdapter },
9612
9664
  { provide: NG_VALUE_ACCESSOR, useExisting: FHDatePickerComponent, multi: true },
9665
+ { provide: MAT_DATE_LOCALE, useValue: 'it-IT' },
9613
9666
  ],
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 ",
9667
+ 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
9668
  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
9669
  }] }
9617
9670
  ];