@fluxhub/fluxhub-lib 1.0.306 → 1.0.310

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.
@@ -37,7 +37,7 @@ import { DomSanitizer } from '@angular/platform-browser';
37
37
  import { NgControl, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
38
38
  import { MatDialogRef, MatDialog, DateAdapter, MAT_DATE_FORMATS, MatAutocompleteModule, MatButtonModule, MatButtonToggleModule, MatPaginatorModule, MatCardModule, MatCheckboxModule, MatChipsModule, MatDatepickerModule, MatGridListModule, MatIconModule, MatInputModule, MatListModule, MatMenuModule, MatProgressBarModule, MatProgressSpinnerModule, MatRadioModule, MatSelectModule, MatSidenavModule, MatSliderModule, MatSortModule, MatSlideToggleModule, MatSnackBarModule, MatTableModule, MatTabsModule, MatToolbarModule, MatTooltipModule, MatFormFieldModule, MatExpansionModule, MatStepperModule, MatDialogModule, MatNativeDateModule } from '@angular/material';
39
39
  import { ActivatedRoute, Router } from '@angular/router';
40
- import { Injectable, Component, Directive, Pipe, Inject, PLATFORM_ID, Input, forwardRef, Output, EventEmitter, ViewChild, ViewContainerRef, ElementRef, Optional, HostListener, defineInjectable, inject, NgModule } from '@angular/core';
40
+ import { Injectable, Component, Directive, Inject, PLATFORM_ID, Pipe, Input, forwardRef, Output, EventEmitter, ViewChild, ViewContainerRef, ElementRef, Optional, HostListener, defineInjectable, inject, NgModule } from '@angular/core';
41
41
  import { Http } from '@angular/http';
42
42
  import { SlimLoadingBarService } from 'ng2-slim-loading-bar';
43
43
  import { ToastrService } from 'ngx-toastr';
@@ -8359,7 +8359,7 @@ var moment = momentNs;
8359
8359
  /** @type {?} */
8360
8360
  var MOMENT_DATE_FORMATS = {
8361
8361
  parse: {
8362
- dateInput: 'D/MM/YYYY'
8362
+ dateInput: 'DD/MM/YYYY'
8363
8363
  },
8364
8364
  display: {
8365
8365
  dateInput: 'DD/MM/YYYY',
@@ -8550,6 +8550,17 @@ var MomentDateAdapter = /** @class */ (function (_super) {
8550
8550
  * @return {?}
8551
8551
  */
8552
8552
  function (value, parseFormat) {
8553
+ if (value != null) {
8554
+ /** @type {?} */
8555
+ var arr = value.split('/');
8556
+ if (arr.length == 3) {
8557
+ if (arr[1].length == 1)
8558
+ arr[1] = "0" + arr[1];
8559
+ if (arr[0].length == 1)
8560
+ arr[0] = "0" + arr[0];
8561
+ value = arr[0] + "/" + arr[1] + "/" + arr[2];
8562
+ }
8563
+ }
8553
8564
  /** @type {?} */
8554
8565
  var m = moment(value, parseFormat, true);
8555
8566
  if (!m.isValid()) {
@@ -8771,10 +8782,16 @@ var FHDatePickerComponent = /** @class */ (function (_super) {
8771
8782
  /** @type {?} */
8772
8783
  var arr = s.split('/');
8773
8784
  if (arr.length == 3) {
8785
+ if (arr[1].length == 1)
8786
+ arr[1] = "0" + arr[1];
8787
+ if (arr[0].length == 1)
8788
+ arr[0] = "0" + arr[0];
8774
8789
  if (parseInt(arr[2]) < 3000 && parseInt(arr[0]) > 0 && parseInt(arr[0]) <= 31 && parseInt(arr[1]) > 0 && parseInt(arr[1]) <= 12) {
8790
+ console.log('arr ', arr);
8775
8791
  /** @type {?} */
8776
8792
  var dtp = new MomentDateAdapter();
8777
8793
  this.date_sel = dtp.createDate(parseInt(arr[2]), parseInt(arr[1]) - 1, parseInt(arr[0]));
8794
+ console.log('dare s', this.date_sel);
8778
8795
  }
8779
8796
  else
8780
8797
  console.log('data non valida! ', arr);
@@ -8860,7 +8877,7 @@ var FHDatePickerComponent = /** @class */ (function (_super) {
8860
8877
  /** @type {?} */
8861
8878
  var dtp = new MomentDateAdapter();
8862
8879
  this.date_sel = dtp.createDate(this.getValue().getFullYear() + 1, this.getValue().getMonth(), this.getValue().getDate());
8863
- this.v_view = this.uti_s.date2String(this.date_sel.getValue());
8880
+ this.v_view = this.uti_s.date2String(this.getValue());
8864
8881
  this.ch();
8865
8882
  };
8866
8883
  /**
@@ -8873,7 +8890,7 @@ var FHDatePickerComponent = /** @class */ (function (_super) {
8873
8890
  /** @type {?} */
8874
8891
  var dtp = new MomentDateAdapter();
8875
8892
  this.date_sel = dtp.createDate(this.getValue().getFullYear() + 1, 1, 1);
8876
- this.v_view = this.uti_s.date2String(this.date_sel.getValue());
8893
+ this.v_view = this.uti_s.date2String(this.getValue());
8877
8894
  this.ch();
8878
8895
  };
8879
8896
  /**
@@ -8886,7 +8903,7 @@ var FHDatePickerComponent = /** @class */ (function (_super) {
8886
8903
  /** @type {?} */
8887
8904
  var dtp = new MomentDateAdapter();
8888
8905
  this.date_sel = dtp.createDate(this.getValue().getFullYear() + 1, 12, 31);
8889
- this.v_view = this.uti_s.date2String(this.date_sel.getValue());
8906
+ this.v_view = this.uti_s.date2String(this.getValue());
8890
8907
  this.ch();
8891
8908
  };
8892
8909
  /**
@@ -8955,7 +8972,7 @@ var FHDatePickerComponent = /** @class */ (function (_super) {
8955
8972
  /** @type {?} */
8956
8973
  var dtp = new MomentDateAdapter();
8957
8974
  this.date_sel = dtp.createDate(d.getFullYear(), d.getMonth(), d.getDate());
8958
- this.v_view = this.uti_s.date2String(this.date_sel.getValue());
8975
+ this.v_view = this.uti_s.date2String(this.getValue());
8959
8976
  };
8960
8977
  FHDatePickerComponent.decorators = [
8961
8978
  { type: Component, args: [{