@smartsoft001/angular 2.91.0 → 2.92.0

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,8 +6,7 @@ import * as i1 from '@ngx-translate/core';
6
6
  import { TranslateService, TranslateModule, TranslatePipe } from '@ngx-translate/core';
7
7
  import { BehaviorSubject, firstValueFrom, Subscription, Subject, isObservable } from 'rxjs';
8
8
  import { ArrayService, SPECIFICATION_ROOT_KEY, SpecificationService, PeselService, ZipCodeService, ObjectService, NipService } from '@smartsoft001/utils';
9
- import * as moment from 'moment';
10
- import moment__default from 'moment';
9
+ import moment from 'moment';
11
10
  import { jwtDecode } from 'jwt-decode';
12
11
  import { HttpClient, HttpEventType, HttpErrorResponse, HttpClientModule } from '@angular/common/http';
13
12
  import { map, filter, takeUntil, tap, delay, debounceTime, distinctUntilChanged, first, catchError } from 'rxjs/operators';
@@ -2271,7 +2270,7 @@ class DateEditComponent {
2271
2270
  if (!this.ngModel() || newValue > 9 || newValue < 0)
2272
2271
  this.ngModel.set(this.DEFAULT_DATE);
2273
2272
  this.ngModel.set(this.setCharAt(this.ngModel(), index, newValue));
2274
- this.validDate = moment__default(this.ngModel()).isValid();
2273
+ this.validDate = moment(this.ngModel()).isValid();
2275
2274
  if (this.validDate) {
2276
2275
  this.writeValue(this.ngModel());
2277
2276
  this.propagateChange(this.ngModel());
@@ -3115,9 +3114,9 @@ class DateRangeComponent {
3115
3114
  async onClick() {
3116
3115
  const ngModel = this.ngModel();
3117
3116
  if (ngModel?.start)
3118
- this.calendarData.dateFrom = moment__default(ngModel.start);
3117
+ this.calendarData.dateFrom = moment(ngModel.start);
3119
3118
  if (ngModel?.end)
3120
- this.calendarData.dateTo = moment__default(ngModel.end);
3119
+ this.calendarData.dateTo = moment(ngModel.end);
3121
3120
  this.propagateTouched();
3122
3121
  // const modal = await this.modalCtrl.create({
3123
3122
  // backdropDismiss: true,
@@ -3195,7 +3194,7 @@ class DateRangeModalComponent {
3195
3194
  showFilterBtns = input(false, ...(ngDevMode ? [{ debugName: "showFilterBtns" }] : []));
3196
3195
  restrictSelectionTo = input.required(...(ngDevMode ? [{ debugName: "restrictSelectionTo" }] : []));
3197
3196
  // @ViewChild('scrollMe', { static: true }) scrollMe!: IonContent; //TODO: to be rewritten
3198
- currentDate = moment__default().clone();
3197
+ currentDate = moment().clone();
3199
3198
  dateForm;
3200
3199
  calendar = [];
3201
3200
  selectedButtonName = "" /* FilterBtnConstants.empthyString */;
@@ -3339,8 +3338,8 @@ class DateRangeModalComponent {
3339
3338
  this.selectedButtonName = "ThisMonth" /* FilterBtnConstants.thisMonth */;
3340
3339
  this.scrollPositionValue = this.valueTop;
3341
3340
  this.scrollToBottom();
3342
- const firstDay = moment__default().clone().startOf('month');
3343
- const lastDay = moment__default().clone();
3341
+ const firstDay = moment().clone().startOf('month');
3342
+ const lastDay = moment().clone();
3344
3343
  this.setStartDate(firstDay, this.formatDate(firstDay));
3345
3344
  this.setEndDate(lastDay, this.formatDate(lastDay));
3346
3345
  }
@@ -3348,7 +3347,7 @@ class DateRangeModalComponent {
3348
3347
  this.scrollToBottom();
3349
3348
  this.selectedButtonName = "LastMonth" /* FilterBtnConstants.lastMonth */;
3350
3349
  this.scrollPositionValue = this.valueTop;
3351
- const lastMonth = moment__default().clone().subtract(1, 'month');
3350
+ const lastMonth = moment().clone().subtract(1, 'month');
3352
3351
  const firstDay = lastMonth.clone().startOf('month');
3353
3352
  const lastDay = lastMonth.clone().endOf('month');
3354
3353
  this.setStartDate(firstDay, this.formatDate(firstDay));
@@ -3367,7 +3366,7 @@ class DateRangeModalComponent {
3367
3366
  this.filterSelectionByDaysAgo(6);
3368
3367
  }
3369
3368
  filterSelectionByDaysAgo(daysAgo) {
3370
- const endDate = moment__default().clone();
3369
+ const endDate = moment().clone();
3371
3370
  const startDate = endDate.clone().subtract(daysAgo, 'days');
3372
3371
  this.setStartDate(startDate, this.formatDate(startDate));
3373
3372
  this.setEndDate(endDate, this.formatDate(endDate));
@@ -3376,7 +3375,7 @@ class DateRangeModalComponent {
3376
3375
  this.selectedButtonName = "Yesterday" /* FilterBtnConstants.yesterday */;
3377
3376
  this.scrollPositionValue = this.valueTop;
3378
3377
  this.scrollToBottom();
3379
- const yesterday = moment__default().clone().subtract(1, 'days');
3378
+ const yesterday = moment().clone().subtract(1, 'days');
3380
3379
  this.setStartDate(yesterday, this.formatDate(yesterday));
3381
3380
  this.setEndDate(yesterday, this.formatDate(yesterday));
3382
3381
  }
@@ -3384,7 +3383,7 @@ class DateRangeModalComponent {
3384
3383
  this.selectedButtonName = "Today" /* FilterBtnConstants.today */;
3385
3384
  this.scrollPositionValue = this.valueTop;
3386
3385
  this.scrollToBottom();
3387
- const today = moment__default().clone();
3386
+ const today = moment().clone();
3388
3387
  this.setStartDate(today, this.formatDate(today));
3389
3388
  this.setEndDate(today, this.formatDate(today));
3390
3389
  }