@smartsoft001/angular 1.1.811 → 1.1.812

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.
@@ -23,7 +23,6 @@ import { HttpErrorResponse, HttpEventType, HttpClientModule } from '@angular/com
23
23
  import * as i2 from '@ionic-native/fingerprint-aio/ngx';
24
24
  import { FingerprintAIO } from '@ionic-native/fingerprint-aio/ngx';
25
25
  import { App, Plugins, CameraResultType } from '@capacitor/core';
26
- import * as moment from 'moment';
27
26
  import { Memoize } from 'lodash-decorators';
28
27
  import { of, Subject, BehaviorSubject, Subscription, isObservable } from 'rxjs';
29
28
  import { TableVirtualScrollDataSource } from 'ng-table-virtual-scroll';
@@ -57,6 +56,7 @@ import { DateAdapter, MAT_DATE_LOCALE, MAT_DATE_FORMATS, MatNativeDateModule } f
57
56
  import { MomentDateAdapter, MAT_MOMENT_DATE_ADAPTER_OPTIONS, MomentDateModule } from '@angular/material-moment-adapter';
58
57
  import * as i6 from '@angular/cdk/table';
59
58
  import { CdkTableModule } from '@angular/cdk/table';
59
+ import * as moment from 'moment';
60
60
  import * as i5$2 from '@angular/cdk/overlay';
61
61
  import * as i1$5 from '@ngrx/effects';
62
62
  import { createEffect, EffectsModule } from '@ngrx/effects';
@@ -1199,101 +1199,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImpor
1199
1199
  }] }, { type: i1$2.HttpClient }];
1200
1200
  } });
1201
1201
 
1202
- class CalendarService {
1203
- constructor() {
1204
- this.state = {
1205
- date: moment().add(2, 'year'),
1206
- calendar: [
1207
- {
1208
- dates: null,
1209
- monthName: null,
1210
- number: null,
1211
- year: null
1212
- }
1213
- ]
1214
- };
1215
- this.setState = (nextState) => {
1216
- this.state = Object.assign(Object.assign({}, this.state), nextState);
1217
- };
1218
- //this service is a singleton therefore its constructor will only
1219
- //be called once during the application life cycle
1220
- this.initCalendar();
1221
- }
1222
- getCalendar() {
1223
- return [...this.state.calendar];
1224
- }
1225
- generatePrevMonths() {
1226
- const calendar = this.state.calendar;
1227
- let date = moment(calendar[0].year + '-' + calendar[0].number + '-01');
1228
- const dateYearAgo = date.clone().subtract(1, 'year');
1229
- while (date.isSameOrAfter(dateYearAgo)) {
1230
- date = date.clone().subtract(1, 'month');
1231
- calendar.unshift(this.generateMonth(date));
1232
- }
1233
- }
1234
- generateNextMonths() {
1235
- const calendar = this.state.calendar;
1236
- const dateString = calendar[calendar.length - 1].year + '-' + calendar[calendar.length - 1].number + '-01';
1237
- let date = moment(dateString);
1238
- const dateYearNext = date.clone().add(1, 'year');
1239
- while (date.isSameOrBefore(dateYearNext)) {
1240
- date = date.clone().add(1, 'month');
1241
- calendar.push(this.generateMonth(date));
1242
- }
1243
- }
1244
- initCalendar() {
1245
- const { date } = this.state;
1246
- const firstMonth = this.generateMonth(date);
1247
- const calendar = [firstMonth];
1248
- const currentDate = moment().clone();
1249
- const dateYearAgo = currentDate.clone().subtract(2, 'year');
1250
- while (date.isSameOrAfter(dateYearAgo)) { // creating one year calendar
1251
- calendar.unshift(this.previousMonth());
1252
- }
1253
- this.state.date = moment();
1254
- const currentMonthIndex = calendar.length - 13;
1255
- calendar[currentMonthIndex].dates = calendar[currentMonthIndex].dates.filter(this.filterFutureDates);
1256
- this.setState({ calendar: calendar });
1257
- }
1258
- previousMonth() {
1259
- const { date } = this.state;
1260
- const newDate = date.subtract(1, 'month');
1261
- const m = this.generateMonth(newDate);
1262
- this.setState({ date: newDate });
1263
- return m;
1264
- }
1265
- filterFutureDates(date) {
1266
- if (!date) {
1267
- return true;
1268
- }
1269
- return date.isSameOrBefore(moment());
1270
- }
1271
- generateMonth(date) {
1272
- const firstDay = moment(date).startOf('month');
1273
- const monthName = moment(date).format('MMMM');
1274
- const year = moment(date).format('YYYY');
1275
- const number = moment(date).format('MM');
1276
- const monthLength = date.daysInMonth();
1277
- const totalDatesInMonth = this.generateMonthDates(firstDay, monthLength);
1278
- const emptyCellsBeforeFirstDay = Array(firstDay.weekday()).fill(null);
1279
- const dates = [...emptyCellsBeforeFirstDay, ...totalDatesInMonth];
1280
- return {
1281
- dates,
1282
- monthName,
1283
- number,
1284
- year
1285
- };
1286
- }
1287
- generateMonthDates(firstDay, length) {
1288
- return Array(length).fill(null).map((v, i) => moment(firstDay).add(i, 'day'));
1289
- }
1290
- }
1291
- /** @nocollapse */ /** @nocollapse */ CalendarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CalendarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1292
- /** @nocollapse */ /** @nocollapse */ CalendarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CalendarService });
1293
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CalendarService, decorators: [{
1294
- type: Injectable
1295
- }], ctorParameters: function () { return []; } });
1296
-
1297
1202
  class UIService {
1298
1203
  constructor(loadingController, alertController, toastController) {
1299
1204
  this.loadingController = loadingController;
@@ -1387,7 +1292,6 @@ class SharedServicesModule {
1387
1292
  FingerprintAIO,
1388
1293
  CameraService,
1389
1294
  FileService,
1390
- CalendarService,
1391
1295
  UIService,
1392
1296
  AlertService,
1393
1297
  DetailsService
@@ -1418,7 +1322,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImpor
1418
1322
  FingerprintAIO,
1419
1323
  CameraService,
1420
1324
  FileService,
1421
- CalendarService,
1422
1325
  UIService,
1423
1326
  AlertService,
1424
1327
  DetailsService
@@ -3249,6 +3152,101 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImpor
3249
3152
  type: Injectable
3250
3153
  }] });
3251
3154
 
3155
+ class CalendarService {
3156
+ constructor() {
3157
+ this.state = {
3158
+ date: moment().add(2, 'year'),
3159
+ calendar: [
3160
+ {
3161
+ dates: null,
3162
+ monthName: null,
3163
+ number: null,
3164
+ year: null
3165
+ }
3166
+ ]
3167
+ };
3168
+ this.setState = (nextState) => {
3169
+ this.state = Object.assign(Object.assign({}, this.state), nextState);
3170
+ };
3171
+ //this service is a singleton therefore its constructor will only
3172
+ //be called once during the application life cycle
3173
+ this.initCalendar();
3174
+ }
3175
+ getCalendar() {
3176
+ return [...this.state.calendar];
3177
+ }
3178
+ generatePrevMonths() {
3179
+ const calendar = this.state.calendar;
3180
+ let date = moment(calendar[0].year + '-' + calendar[0].number + '-01');
3181
+ const dateYearAgo = date.clone().subtract(1, 'year');
3182
+ while (date.isSameOrAfter(dateYearAgo)) {
3183
+ date = date.clone().subtract(1, 'month');
3184
+ calendar.unshift(this.generateMonth(date));
3185
+ }
3186
+ }
3187
+ generateNextMonths() {
3188
+ const calendar = this.state.calendar;
3189
+ const dateString = calendar[calendar.length - 1].year + '-' + calendar[calendar.length - 1].number + '-01';
3190
+ let date = moment(dateString);
3191
+ const dateYearNext = date.clone().add(1, 'year');
3192
+ while (date.isSameOrBefore(dateYearNext)) {
3193
+ date = date.clone().add(1, 'month');
3194
+ calendar.push(this.generateMonth(date));
3195
+ }
3196
+ }
3197
+ initCalendar() {
3198
+ const { date } = this.state;
3199
+ const firstMonth = this.generateMonth(date);
3200
+ const calendar = [firstMonth];
3201
+ const currentDate = moment().clone();
3202
+ const dateYearAgo = currentDate.clone().subtract(2, 'year');
3203
+ while (date.isSameOrAfter(dateYearAgo)) { // creating one year calendar
3204
+ calendar.unshift(this.previousMonth());
3205
+ }
3206
+ this.state.date = moment();
3207
+ const currentMonthIndex = calendar.length - 13;
3208
+ calendar[currentMonthIndex].dates = calendar[currentMonthIndex].dates.filter(this.filterFutureDates);
3209
+ this.setState({ calendar: calendar });
3210
+ }
3211
+ previousMonth() {
3212
+ const { date } = this.state;
3213
+ const newDate = date.subtract(1, 'month');
3214
+ const m = this.generateMonth(newDate);
3215
+ this.setState({ date: newDate });
3216
+ return m;
3217
+ }
3218
+ filterFutureDates(date) {
3219
+ if (!date) {
3220
+ return true;
3221
+ }
3222
+ return date.isSameOrBefore(moment());
3223
+ }
3224
+ generateMonth(date) {
3225
+ const firstDay = moment(date).startOf('month');
3226
+ const monthName = moment(date).format('MMMM');
3227
+ const year = moment(date).format('YYYY');
3228
+ const number = moment(date).format('MM');
3229
+ const monthLength = date.daysInMonth();
3230
+ const totalDatesInMonth = this.generateMonthDates(firstDay, monthLength);
3231
+ const emptyCellsBeforeFirstDay = Array(firstDay.weekday()).fill(null);
3232
+ const dates = [...emptyCellsBeforeFirstDay, ...totalDatesInMonth];
3233
+ return {
3234
+ dates,
3235
+ monthName,
3236
+ number,
3237
+ year
3238
+ };
3239
+ }
3240
+ generateMonthDates(firstDay, length) {
3241
+ return Array(length).fill(null).map((v, i) => moment(firstDay).add(i, 'day'));
3242
+ }
3243
+ }
3244
+ /** @nocollapse */ /** @nocollapse */ CalendarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CalendarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3245
+ /** @nocollapse */ /** @nocollapse */ CalendarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CalendarService });
3246
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CalendarService, decorators: [{
3247
+ type: Injectable
3248
+ }], ctorParameters: function () { return []; } });
3249
+
3252
3250
  class LoaderComponent {
3253
3251
  }
3254
3252
  /** @nocollapse */ /** @nocollapse */ LoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: LoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
@@ -4605,12 +4603,12 @@ class DateRangeComponent {
4605
4603
  /** @nocollapse */ /** @nocollapse */ DateRangeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: DateRangeComponent, deps: [{ token: i1$1.ModalController }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
4606
4604
  /** @nocollapse */ /** @nocollapse */ DateRangeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: DateRangeComponent, selector: "smart-date-range", inputs: { ngModel: "ngModel" }, outputs: { ngModelChange: "ngModelChange" }, providers: [
4607
4605
  { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef((() => DateRangeComponent)), multi: true }
4608
- ], ngImport: i0, template: "<ion-button (click)=\"onClick()\">\n {{ value ? value.start + ' - ' + value.end : ('select' | translate) }}\n</ion-button>\n\n<ion-button *ngIf=\"value\" (click)=\"onClear()\">X</ion-button>", styles: [""], components: [{ type: i1$1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }], directives: [{ type: i2$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i3$1.TranslatePipe } });
4606
+ ], ngImport: i0, template: "<ion-button (click)=\"onClick()\">\n {{ (value?.start && value?.end) ? value.start + ' - ' + value.end : ('select' | translate) }}\n</ion-button>\n\n<ion-button *ngIf=\"value\" (click)=\"onClear()\">X</ion-button>", styles: [""], components: [{ type: i1$1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }], directives: [{ type: i2$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i3$1.TranslatePipe } });
4609
4607
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: DateRangeComponent, decorators: [{
4610
4608
  type: Component,
4611
4609
  args: [{ selector: "smart-date-range", providers: [
4612
4610
  { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef((() => DateRangeComponent)), multi: true }
4613
- ], template: "<ion-button (click)=\"onClick()\">\n {{ value ? value.start + ' - ' + value.end : ('select' | translate) }}\n</ion-button>\n\n<ion-button *ngIf=\"value\" (click)=\"onClear()\">X</ion-button>", styles: [""] }]
4611
+ ], template: "<ion-button (click)=\"onClick()\">\n {{ (value?.start && value?.end) ? value.start + ' - ' + value.end : ('select' | translate) }}\n</ion-button>\n\n<ion-button *ngIf=\"value\" (click)=\"onClear()\">X</ion-button>", styles: [""] }]
4614
4612
  }], ctorParameters: function () { return [{ type: i1$1.ModalController }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { ngModel: [{
4615
4613
  type: Input
4616
4614
  }], ngModelChange: [{
@@ -4862,10 +4860,10 @@ class DateRangeModalComponent {
4862
4860
  }
4863
4861
  }
4864
4862
  /** @nocollapse */ /** @nocollapse */ DateRangeModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: DateRangeModalComponent, deps: [{ token: i3.FormBuilder }, { token: i1$1.ModalController }, { token: i1$1.NavParams }, { token: UIService }, { token: i0.ChangeDetectorRef }, { token: i1$1.DomController }, { token: CalendarService }, { token: i0.NgZone }, { token: StyleService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
4865
- /** @nocollapse */ /** @nocollapse */ DateRangeModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: DateRangeModalComponent, selector: "smart-date-range-modal", inputs: { showFilterBtns: "showFilterBtns", restrictSelectionTo: "restrictSelectionTo" }, viewQueries: [{ propertyName: "scrollMe", first: true, predicate: ["scrollMe"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"heading-container\" padding>\n <div>\n <!-- <p>Selected Date Range</p>-->\n <span style=\"font-size: 12px;\">\n &nbsp;{{dateForm.value.dateFrom ? dateForm.value.dateFrom + ' - ' + dateForm.value.dateTo : ''}}\n </span>\n </div>\n <div id=\"dismiss-div\" (click)=\"dismissPage()\">\n <ion-icon name=\"close-outline\"></ion-icon>\n </div>\n <div id='border-bottom'></div>\n</div>\n\n<div class=\"grid-filter-btns\" *ngIf=\"showFilterBtns\">\n <div (click)=\"selectToday()\">\n <span class=\"span-filter\" [ngClass]=\"{'selected-filter': selectedButtonName==='Today'}\">\n {{ 'CALENDAR.Today' | translate }}\n </span>\n </div>\n\n <div (click)=\"selectLastSevenDays()\" style=\"text-align: center;\">\n <span class=\"span-filter\" [ngClass]=\"{'selected-filter': selectedButtonName==='LastSevenDays'}\">\n {{ 'CALENDAR.LastSevenDays' | translate }}\n </span>\n </div>\n\n <div (click)=\"selectThisMonth()\" style=\"text-align: right;\">\n <span class=\"span-filter\" [ngClass]=\"{'selected-filter': selectedButtonName==='ThisMonth'}\">\n {{ 'CALENDAR.ThisMonth' | translate }}\n </span>\n </div>\n\n <div (click)=\"selectYesterday()\">\n <span class=\"span-filter\" [ngClass]=\"{'selected-filter': selectedButtonName==='Yesterday'}\">\n {{ 'CALENDAR.Yesterday' | translate }}\n </span>\n </div>\n\n <div (click)=\"selectLastThirtyDays()\" style=\"text-align: center;\">\n <span class=\"span-filter\" [ngClass]=\"{'selected-filter': selectedButtonName==='LastThirtyDays'}\">\n {{ 'CALENDAR.LastThirtyDays' | translate }}\n </span>\n </div>\n\n <div (click)=\"selectLastMonth()\" style=\"text-align: right;\">\n <span class=\"span-filter\" [ngClass]=\"{'selected-filter': selectedButtonName==='LastMonth'}\">\n {{ 'CALENDAR.LastMonth' | translate }}\n </span>\n </div>\n\n</div>\n\n<div class=\"day-of-week sizeOf-div\" style=\"background: #fbfcfc; color: #a6aaaf;\">\n <div>{{ 'CALENDAR.DAY_OF_WEEK.Sun' | translate }}</div>\n <div>{{ 'CALENDAR.DAY_OF_WEEK.Mon' | translate }}</div>\n <div>{{ 'CALENDAR.DAY_OF_WEEK.Tue' | translate }}</div>\n <div>{{ 'CALENDAR.DAY_OF_WEEK.Wed' | translate }}</div>\n <div>{{ 'CALENDAR.DAY_OF_WEEK.Thu' | translate }}</div>\n <div>{{ 'CALENDAR.DAY_OF_WEEK.Fri' | translate }}</div>\n <div>{{ 'CALENDAR.DAY_OF_WEEK.Sat' | translate }}</div>\n</div>\n\n<ion-content #scrollMe>\n <ion-refresher slot=\"fixed\" (ionRefresh)=\"loadDataPrev($event)\">\n <ion-refresher-content\n pullingIcon=\"chevron-down-circle-outline\"\n refreshingSpinner=\"circles\">\n </ion-refresher-content>\n </ion-refresher>\n\n <ng-container *ngFor=\"let month of calendar\">\n <p class=\"heading-month-year\">\n {{ ('CALENDAR.MONTH.' + month.monthName) | translate }} {{month.year}}\n </p>\n <div class=\"date-grid\">\n <div *ngFor=\"let day of month.dates\" class=\"sizeOf-div span-day\" [ngClass]=\"{\n 'selection-start': isSelectionStart(day) ,\n 'selection-end': isSelectionEnd(day) ,\n 'in-range': isInRange(day) ,\n 'same-date':isStartAndEndDateSame()\n }\" id=\"dateRef\" (click)=\"subject$.next({date:day,event:$event})\">\n {{day?.date()}}\n </div>\n </div>\n </ng-container>\n <ion-infinite-scroll threshold=\"100px\" (ionInfinite)=\"loadDataNext($event)\">\n <ion-infinite-scroll-content loadingSpinner=\"bubbles\"></ion-infinite-scroll-content>\n </ion-infinite-scroll>\n</ion-content>\n<ion-footer>\n <ion-toolbar>\n <ion-button style=\"margin: 0 1.2rem;\" expand=\"block\" (click)=\"applyDates()\" [disabled]=\"restrictSelectionTo && !isSelectionInRestrictedRange()\">\n {{ 'select' | translate }}\n </ion-button>\n </ion-toolbar>\n</ion-footer>", styles: [".heading-container{padding:1.2rem;display:flex;flex-direction:column;justify-content:center;align-items:center;background:var(--ion-color-tertiary);color:#fff}.heading-container #dismiss-div{position:absolute;right:0px;top:5px;font-size:22px;width:50px;padding:0 10px;text-align:center}.heading-container #dismiss-div:active{opacity:.5}.heading-container p{font-size:16px;margin-bottom:10px}.heading-container #border-bottom{height:2px;background:rgba(255,255,255,.16);width:60%;margin-top:10px}.day-of-week,.date-grid{display:grid;grid-template-columns:repeat(7,1fr);grid-row-gap:10px;grid-column-gap:1px;align-items:center}.day-of-week{border-bottom:.1rem solid #ededed}.sizeOf-div{height:30px;text-align:center}.heading-month-year{margin-left:0;padding:1.2rem;font-size:16px;font-weight:500;color:var(--ion-color-primary);background-color:#fdfdfd;border-top:.1rem solid #efefef;border-bottom:.1rem solid #efefef}.span-day{display:flex;flex-direction:column;justify-content:center;align-items:center;color:#36485b}.grid-filter-btns{display:grid;grid-template-rows:1fr 1fr;grid-template-columns:repeat(3,1fr);width:100%;margin:0 auto;grid-column-gap:10px;grid-row-gap:20px;padding:20px;background-color:var(--ion-color-tertiary)}.span-filter{margin:0;padding:7px;height:auto;color:#fff;border-radius:15px;font-size:.8em;text-align:center}.selected-filter{background:white;color:var(--ion-color-tertiary)}@media (max-width: 320px){.span-filter{font-size:3.5vw}}.selection-start{background-color:var(--ion-color-tertiary);color:#fff;border-top-left-radius:25%;border-bottom-left-radius:25%}.selection-end{background-color:var(--ion-color-tertiary);color:#fff;border-top-right-radius:25%;border-bottom-right-radius:25%}.same-date{border-radius:25%}.in-range{font-weight:700;background-color:#e9eaea}\n"], components: [{ type: i1$1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { type: i1$1.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { type: i1$1.IonRefresher, selector: "ion-refresher", inputs: ["closeDuration", "disabled", "pullFactor", "pullMax", "pullMin", "snapbackDuration"] }, { type: i1$1.IonRefresherContent, selector: "ion-refresher-content", inputs: ["pullingIcon", "pullingText", "refreshingSpinner", "refreshingText"] }, { type: i1$1.IonInfiniteScroll, selector: "ion-infinite-scroll", inputs: ["disabled", "position", "threshold"] }, { type: i1$1.IonInfiniteScrollContent, selector: "ion-infinite-scroll-content", inputs: ["loadingSpinner", "loadingText"] }, { type: i1$1.IonFooter, selector: "ion-footer", inputs: ["collapse", "mode", "translucent"] }, { type: i1$1.IonToolbar, selector: "ion-toolbar", inputs: ["color", "mode"] }, { type: i1$1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }], directives: [{ type: i2$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i3$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
4863
+ /** @nocollapse */ /** @nocollapse */ DateRangeModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: DateRangeModalComponent, selector: "smart-date-range-modal", inputs: { showFilterBtns: "showFilterBtns", restrictSelectionTo: "restrictSelectionTo" }, providers: [CalendarService], viewQueries: [{ propertyName: "scrollMe", first: true, predicate: ["scrollMe"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"heading-container\" padding>\n <div>\n <!-- <p>Selected Date Range</p>-->\n <span style=\"font-size: 12px;\">\n &nbsp;{{dateForm.value.dateFrom ? dateForm.value.dateFrom + ' - ' + dateForm.value.dateTo : ''}}\n </span>\n </div>\n <div id=\"dismiss-div\" (click)=\"dismissPage()\">\n <ion-icon name=\"close-outline\"></ion-icon>\n </div>\n <div id='border-bottom'></div>\n</div>\n\n<div class=\"grid-filter-btns\" *ngIf=\"showFilterBtns\">\n <div (click)=\"selectToday()\">\n <span class=\"span-filter\" [ngClass]=\"{'selected-filter': selectedButtonName==='Today'}\">\n {{ 'CALENDAR.Today' | translate }}\n </span>\n </div>\n\n <div (click)=\"selectLastSevenDays()\" style=\"text-align: center;\">\n <span class=\"span-filter\" [ngClass]=\"{'selected-filter': selectedButtonName==='LastSevenDays'}\">\n {{ 'CALENDAR.LastSevenDays' | translate }}\n </span>\n </div>\n\n <div (click)=\"selectThisMonth()\" style=\"text-align: right;\">\n <span class=\"span-filter\" [ngClass]=\"{'selected-filter': selectedButtonName==='ThisMonth'}\">\n {{ 'CALENDAR.ThisMonth' | translate }}\n </span>\n </div>\n\n <div (click)=\"selectYesterday()\">\n <span class=\"span-filter\" [ngClass]=\"{'selected-filter': selectedButtonName==='Yesterday'}\">\n {{ 'CALENDAR.Yesterday' | translate }}\n </span>\n </div>\n\n <div (click)=\"selectLastThirtyDays()\" style=\"text-align: center;\">\n <span class=\"span-filter\" [ngClass]=\"{'selected-filter': selectedButtonName==='LastThirtyDays'}\">\n {{ 'CALENDAR.LastThirtyDays' | translate }}\n </span>\n </div>\n\n <div (click)=\"selectLastMonth()\" style=\"text-align: right;\">\n <span class=\"span-filter\" [ngClass]=\"{'selected-filter': selectedButtonName==='LastMonth'}\">\n {{ 'CALENDAR.LastMonth' | translate }}\n </span>\n </div>\n\n</div>\n\n<div class=\"day-of-week sizeOf-div\" style=\"background: #fbfcfc; color: #a6aaaf;\">\n <div>{{ 'CALENDAR.DAY_OF_WEEK.Sun' | translate }}</div>\n <div>{{ 'CALENDAR.DAY_OF_WEEK.Mon' | translate }}</div>\n <div>{{ 'CALENDAR.DAY_OF_WEEK.Tue' | translate }}</div>\n <div>{{ 'CALENDAR.DAY_OF_WEEK.Wed' | translate }}</div>\n <div>{{ 'CALENDAR.DAY_OF_WEEK.Thu' | translate }}</div>\n <div>{{ 'CALENDAR.DAY_OF_WEEK.Fri' | translate }}</div>\n <div>{{ 'CALENDAR.DAY_OF_WEEK.Sat' | translate }}</div>\n</div>\n\n<ion-content #scrollMe>\n <ion-refresher slot=\"fixed\" (ionRefresh)=\"loadDataPrev($event)\">\n <ion-refresher-content\n pullingIcon=\"chevron-down-circle-outline\"\n refreshingSpinner=\"circles\">\n </ion-refresher-content>\n </ion-refresher>\n\n <ng-container *ngFor=\"let month of calendar\">\n <p class=\"heading-month-year\">\n {{ ('CALENDAR.MONTH.' + month.monthName) | translate }} {{month.year}}\n </p>\n <div class=\"date-grid\">\n <div *ngFor=\"let day of month.dates\" class=\"sizeOf-div span-day\" [ngClass]=\"{\n 'selection-start': isSelectionStart(day) ,\n 'selection-end': isSelectionEnd(day) ,\n 'in-range': isInRange(day) ,\n 'same-date':isStartAndEndDateSame()\n }\" id=\"dateRef\" (click)=\"subject$.next({date:day,event:$event})\">\n {{day?.date()}}\n </div>\n </div>\n </ng-container>\n <ion-infinite-scroll threshold=\"100px\" (ionInfinite)=\"loadDataNext($event)\">\n <ion-infinite-scroll-content loadingSpinner=\"bubbles\"></ion-infinite-scroll-content>\n </ion-infinite-scroll>\n</ion-content>\n<ion-footer>\n <ion-toolbar>\n <ion-button style=\"margin: 0 1.2rem;\" expand=\"block\" (click)=\"applyDates()\" [disabled]=\"restrictSelectionTo && !isSelectionInRestrictedRange()\">\n {{ 'select' | translate }}\n </ion-button>\n </ion-toolbar>\n</ion-footer>", styles: [".heading-container{padding:1.2rem;display:flex;flex-direction:column;justify-content:center;align-items:center;background:var(--ion-color-tertiary);color:#fff}.heading-container #dismiss-div{position:absolute;right:0px;top:5px;font-size:22px;width:50px;padding:0 10px;text-align:center}.heading-container #dismiss-div:active{opacity:.5}.heading-container p{font-size:16px;margin-bottom:10px}.heading-container #border-bottom{height:2px;background:rgba(255,255,255,.16);width:60%;margin-top:10px}.day-of-week,.date-grid{display:grid;grid-template-columns:repeat(7,1fr);grid-row-gap:10px;grid-column-gap:1px;align-items:center}.day-of-week{border-bottom:.1rem solid #ededed}.sizeOf-div{height:30px;text-align:center}.heading-month-year{margin-left:0;padding:1.2rem;font-size:16px;font-weight:500;color:var(--ion-color-primary);background-color:#fdfdfd;border-top:.1rem solid #efefef;border-bottom:.1rem solid #efefef}.span-day{display:flex;flex-direction:column;justify-content:center;align-items:center;color:#36485b}.grid-filter-btns{display:grid;grid-template-rows:1fr 1fr;grid-template-columns:repeat(3,1fr);width:100%;margin:0 auto;grid-column-gap:10px;grid-row-gap:20px;padding:20px;background-color:var(--ion-color-tertiary)}.span-filter{margin:0;padding:7px;height:auto;color:#fff;border-radius:15px;font-size:.8em;text-align:center}.selected-filter{background:white;color:var(--ion-color-tertiary)}@media (max-width: 320px){.span-filter{font-size:3.5vw}}.selection-start{background-color:var(--ion-color-tertiary);color:#fff;border-top-left-radius:25%;border-bottom-left-radius:25%}.selection-end{background-color:var(--ion-color-tertiary);color:#fff;border-top-right-radius:25%;border-bottom-right-radius:25%}.same-date{border-radius:25%}.in-range{font-weight:700;background-color:#e9eaea}\n"], components: [{ type: i1$1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { type: i1$1.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { type: i1$1.IonRefresher, selector: "ion-refresher", inputs: ["closeDuration", "disabled", "pullFactor", "pullMax", "pullMin", "snapbackDuration"] }, { type: i1$1.IonRefresherContent, selector: "ion-refresher-content", inputs: ["pullingIcon", "pullingText", "refreshingSpinner", "refreshingText"] }, { type: i1$1.IonInfiniteScroll, selector: "ion-infinite-scroll", inputs: ["disabled", "position", "threshold"] }, { type: i1$1.IonInfiniteScrollContent, selector: "ion-infinite-scroll-content", inputs: ["loadingSpinner", "loadingText"] }, { type: i1$1.IonFooter, selector: "ion-footer", inputs: ["collapse", "mode", "translucent"] }, { type: i1$1.IonToolbar, selector: "ion-toolbar", inputs: ["color", "mode"] }, { type: i1$1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }], directives: [{ type: i2$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i3$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
4866
4864
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: DateRangeModalComponent, decorators: [{
4867
4865
  type: Component,
4868
- args: [{ selector: "smart-date-range-modal", changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"heading-container\" padding>\n <div>\n <!-- <p>Selected Date Range</p>-->\n <span style=\"font-size: 12px;\">\n &nbsp;{{dateForm.value.dateFrom ? dateForm.value.dateFrom + ' - ' + dateForm.value.dateTo : ''}}\n </span>\n </div>\n <div id=\"dismiss-div\" (click)=\"dismissPage()\">\n <ion-icon name=\"close-outline\"></ion-icon>\n </div>\n <div id='border-bottom'></div>\n</div>\n\n<div class=\"grid-filter-btns\" *ngIf=\"showFilterBtns\">\n <div (click)=\"selectToday()\">\n <span class=\"span-filter\" [ngClass]=\"{'selected-filter': selectedButtonName==='Today'}\">\n {{ 'CALENDAR.Today' | translate }}\n </span>\n </div>\n\n <div (click)=\"selectLastSevenDays()\" style=\"text-align: center;\">\n <span class=\"span-filter\" [ngClass]=\"{'selected-filter': selectedButtonName==='LastSevenDays'}\">\n {{ 'CALENDAR.LastSevenDays' | translate }}\n </span>\n </div>\n\n <div (click)=\"selectThisMonth()\" style=\"text-align: right;\">\n <span class=\"span-filter\" [ngClass]=\"{'selected-filter': selectedButtonName==='ThisMonth'}\">\n {{ 'CALENDAR.ThisMonth' | translate }}\n </span>\n </div>\n\n <div (click)=\"selectYesterday()\">\n <span class=\"span-filter\" [ngClass]=\"{'selected-filter': selectedButtonName==='Yesterday'}\">\n {{ 'CALENDAR.Yesterday' | translate }}\n </span>\n </div>\n\n <div (click)=\"selectLastThirtyDays()\" style=\"text-align: center;\">\n <span class=\"span-filter\" [ngClass]=\"{'selected-filter': selectedButtonName==='LastThirtyDays'}\">\n {{ 'CALENDAR.LastThirtyDays' | translate }}\n </span>\n </div>\n\n <div (click)=\"selectLastMonth()\" style=\"text-align: right;\">\n <span class=\"span-filter\" [ngClass]=\"{'selected-filter': selectedButtonName==='LastMonth'}\">\n {{ 'CALENDAR.LastMonth' | translate }}\n </span>\n </div>\n\n</div>\n\n<div class=\"day-of-week sizeOf-div\" style=\"background: #fbfcfc; color: #a6aaaf;\">\n <div>{{ 'CALENDAR.DAY_OF_WEEK.Sun' | translate }}</div>\n <div>{{ 'CALENDAR.DAY_OF_WEEK.Mon' | translate }}</div>\n <div>{{ 'CALENDAR.DAY_OF_WEEK.Tue' | translate }}</div>\n <div>{{ 'CALENDAR.DAY_OF_WEEK.Wed' | translate }}</div>\n <div>{{ 'CALENDAR.DAY_OF_WEEK.Thu' | translate }}</div>\n <div>{{ 'CALENDAR.DAY_OF_WEEK.Fri' | translate }}</div>\n <div>{{ 'CALENDAR.DAY_OF_WEEK.Sat' | translate }}</div>\n</div>\n\n<ion-content #scrollMe>\n <ion-refresher slot=\"fixed\" (ionRefresh)=\"loadDataPrev($event)\">\n <ion-refresher-content\n pullingIcon=\"chevron-down-circle-outline\"\n refreshingSpinner=\"circles\">\n </ion-refresher-content>\n </ion-refresher>\n\n <ng-container *ngFor=\"let month of calendar\">\n <p class=\"heading-month-year\">\n {{ ('CALENDAR.MONTH.' + month.monthName) | translate }} {{month.year}}\n </p>\n <div class=\"date-grid\">\n <div *ngFor=\"let day of month.dates\" class=\"sizeOf-div span-day\" [ngClass]=\"{\n 'selection-start': isSelectionStart(day) ,\n 'selection-end': isSelectionEnd(day) ,\n 'in-range': isInRange(day) ,\n 'same-date':isStartAndEndDateSame()\n }\" id=\"dateRef\" (click)=\"subject$.next({date:day,event:$event})\">\n {{day?.date()}}\n </div>\n </div>\n </ng-container>\n <ion-infinite-scroll threshold=\"100px\" (ionInfinite)=\"loadDataNext($event)\">\n <ion-infinite-scroll-content loadingSpinner=\"bubbles\"></ion-infinite-scroll-content>\n </ion-infinite-scroll>\n</ion-content>\n<ion-footer>\n <ion-toolbar>\n <ion-button style=\"margin: 0 1.2rem;\" expand=\"block\" (click)=\"applyDates()\" [disabled]=\"restrictSelectionTo && !isSelectionInRestrictedRange()\">\n {{ 'select' | translate }}\n </ion-button>\n </ion-toolbar>\n</ion-footer>", styles: [".heading-container{padding:1.2rem;display:flex;flex-direction:column;justify-content:center;align-items:center;background:var(--ion-color-tertiary);color:#fff}.heading-container #dismiss-div{position:absolute;right:0px;top:5px;font-size:22px;width:50px;padding:0 10px;text-align:center}.heading-container #dismiss-div:active{opacity:.5}.heading-container p{font-size:16px;margin-bottom:10px}.heading-container #border-bottom{height:2px;background:rgba(255,255,255,.16);width:60%;margin-top:10px}.day-of-week,.date-grid{display:grid;grid-template-columns:repeat(7,1fr);grid-row-gap:10px;grid-column-gap:1px;align-items:center}.day-of-week{border-bottom:.1rem solid #ededed}.sizeOf-div{height:30px;text-align:center}.heading-month-year{margin-left:0;padding:1.2rem;font-size:16px;font-weight:500;color:var(--ion-color-primary);background-color:#fdfdfd;border-top:.1rem solid #efefef;border-bottom:.1rem solid #efefef}.span-day{display:flex;flex-direction:column;justify-content:center;align-items:center;color:#36485b}.grid-filter-btns{display:grid;grid-template-rows:1fr 1fr;grid-template-columns:repeat(3,1fr);width:100%;margin:0 auto;grid-column-gap:10px;grid-row-gap:20px;padding:20px;background-color:var(--ion-color-tertiary)}.span-filter{margin:0;padding:7px;height:auto;color:#fff;border-radius:15px;font-size:.8em;text-align:center}.selected-filter{background:white;color:var(--ion-color-tertiary)}@media (max-width: 320px){.span-filter{font-size:3.5vw}}.selection-start{background-color:var(--ion-color-tertiary);color:#fff;border-top-left-radius:25%;border-bottom-left-radius:25%}.selection-end{background-color:var(--ion-color-tertiary);color:#fff;border-top-right-radius:25%;border-bottom-right-radius:25%}.same-date{border-radius:25%}.in-range{font-weight:700;background-color:#e9eaea}\n"] }]
4866
+ args: [{ selector: "smart-date-range-modal", providers: [CalendarService], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"heading-container\" padding>\n <div>\n <!-- <p>Selected Date Range</p>-->\n <span style=\"font-size: 12px;\">\n &nbsp;{{dateForm.value.dateFrom ? dateForm.value.dateFrom + ' - ' + dateForm.value.dateTo : ''}}\n </span>\n </div>\n <div id=\"dismiss-div\" (click)=\"dismissPage()\">\n <ion-icon name=\"close-outline\"></ion-icon>\n </div>\n <div id='border-bottom'></div>\n</div>\n\n<div class=\"grid-filter-btns\" *ngIf=\"showFilterBtns\">\n <div (click)=\"selectToday()\">\n <span class=\"span-filter\" [ngClass]=\"{'selected-filter': selectedButtonName==='Today'}\">\n {{ 'CALENDAR.Today' | translate }}\n </span>\n </div>\n\n <div (click)=\"selectLastSevenDays()\" style=\"text-align: center;\">\n <span class=\"span-filter\" [ngClass]=\"{'selected-filter': selectedButtonName==='LastSevenDays'}\">\n {{ 'CALENDAR.LastSevenDays' | translate }}\n </span>\n </div>\n\n <div (click)=\"selectThisMonth()\" style=\"text-align: right;\">\n <span class=\"span-filter\" [ngClass]=\"{'selected-filter': selectedButtonName==='ThisMonth'}\">\n {{ 'CALENDAR.ThisMonth' | translate }}\n </span>\n </div>\n\n <div (click)=\"selectYesterday()\">\n <span class=\"span-filter\" [ngClass]=\"{'selected-filter': selectedButtonName==='Yesterday'}\">\n {{ 'CALENDAR.Yesterday' | translate }}\n </span>\n </div>\n\n <div (click)=\"selectLastThirtyDays()\" style=\"text-align: center;\">\n <span class=\"span-filter\" [ngClass]=\"{'selected-filter': selectedButtonName==='LastThirtyDays'}\">\n {{ 'CALENDAR.LastThirtyDays' | translate }}\n </span>\n </div>\n\n <div (click)=\"selectLastMonth()\" style=\"text-align: right;\">\n <span class=\"span-filter\" [ngClass]=\"{'selected-filter': selectedButtonName==='LastMonth'}\">\n {{ 'CALENDAR.LastMonth' | translate }}\n </span>\n </div>\n\n</div>\n\n<div class=\"day-of-week sizeOf-div\" style=\"background: #fbfcfc; color: #a6aaaf;\">\n <div>{{ 'CALENDAR.DAY_OF_WEEK.Sun' | translate }}</div>\n <div>{{ 'CALENDAR.DAY_OF_WEEK.Mon' | translate }}</div>\n <div>{{ 'CALENDAR.DAY_OF_WEEK.Tue' | translate }}</div>\n <div>{{ 'CALENDAR.DAY_OF_WEEK.Wed' | translate }}</div>\n <div>{{ 'CALENDAR.DAY_OF_WEEK.Thu' | translate }}</div>\n <div>{{ 'CALENDAR.DAY_OF_WEEK.Fri' | translate }}</div>\n <div>{{ 'CALENDAR.DAY_OF_WEEK.Sat' | translate }}</div>\n</div>\n\n<ion-content #scrollMe>\n <ion-refresher slot=\"fixed\" (ionRefresh)=\"loadDataPrev($event)\">\n <ion-refresher-content\n pullingIcon=\"chevron-down-circle-outline\"\n refreshingSpinner=\"circles\">\n </ion-refresher-content>\n </ion-refresher>\n\n <ng-container *ngFor=\"let month of calendar\">\n <p class=\"heading-month-year\">\n {{ ('CALENDAR.MONTH.' + month.monthName) | translate }} {{month.year}}\n </p>\n <div class=\"date-grid\">\n <div *ngFor=\"let day of month.dates\" class=\"sizeOf-div span-day\" [ngClass]=\"{\n 'selection-start': isSelectionStart(day) ,\n 'selection-end': isSelectionEnd(day) ,\n 'in-range': isInRange(day) ,\n 'same-date':isStartAndEndDateSame()\n }\" id=\"dateRef\" (click)=\"subject$.next({date:day,event:$event})\">\n {{day?.date()}}\n </div>\n </div>\n </ng-container>\n <ion-infinite-scroll threshold=\"100px\" (ionInfinite)=\"loadDataNext($event)\">\n <ion-infinite-scroll-content loadingSpinner=\"bubbles\"></ion-infinite-scroll-content>\n </ion-infinite-scroll>\n</ion-content>\n<ion-footer>\n <ion-toolbar>\n <ion-button style=\"margin: 0 1.2rem;\" expand=\"block\" (click)=\"applyDates()\" [disabled]=\"restrictSelectionTo && !isSelectionInRestrictedRange()\">\n {{ 'select' | translate }}\n </ion-button>\n </ion-toolbar>\n</ion-footer>", styles: [".heading-container{padding:1.2rem;display:flex;flex-direction:column;justify-content:center;align-items:center;background:var(--ion-color-tertiary);color:#fff}.heading-container #dismiss-div{position:absolute;right:0px;top:5px;font-size:22px;width:50px;padding:0 10px;text-align:center}.heading-container #dismiss-div:active{opacity:.5}.heading-container p{font-size:16px;margin-bottom:10px}.heading-container #border-bottom{height:2px;background:rgba(255,255,255,.16);width:60%;margin-top:10px}.day-of-week,.date-grid{display:grid;grid-template-columns:repeat(7,1fr);grid-row-gap:10px;grid-column-gap:1px;align-items:center}.day-of-week{border-bottom:.1rem solid #ededed}.sizeOf-div{height:30px;text-align:center}.heading-month-year{margin-left:0;padding:1.2rem;font-size:16px;font-weight:500;color:var(--ion-color-primary);background-color:#fdfdfd;border-top:.1rem solid #efefef;border-bottom:.1rem solid #efefef}.span-day{display:flex;flex-direction:column;justify-content:center;align-items:center;color:#36485b}.grid-filter-btns{display:grid;grid-template-rows:1fr 1fr;grid-template-columns:repeat(3,1fr);width:100%;margin:0 auto;grid-column-gap:10px;grid-row-gap:20px;padding:20px;background-color:var(--ion-color-tertiary)}.span-filter{margin:0;padding:7px;height:auto;color:#fff;border-radius:15px;font-size:.8em;text-align:center}.selected-filter{background:white;color:var(--ion-color-tertiary)}@media (max-width: 320px){.span-filter{font-size:3.5vw}}.selection-start{background-color:var(--ion-color-tertiary);color:#fff;border-top-left-radius:25%;border-bottom-left-radius:25%}.selection-end{background-color:var(--ion-color-tertiary);color:#fff;border-top-right-radius:25%;border-bottom-right-radius:25%}.same-date{border-radius:25%}.in-range{font-weight:700;background-color:#e9eaea}\n"] }]
4869
4867
  }], ctorParameters: function () { return [{ type: i3.FormBuilder }, { type: i1$1.ModalController }, { type: i1$1.NavParams }, { type: UIService }, { type: i0.ChangeDetectorRef }, { type: i1$1.DomController }, { type: CalendarService }, { type: i0.NgZone }, { type: StyleService }, { type: i0.ElementRef }]; }, propDecorators: { showFilterBtns: [{
4870
4868
  type: Input
4871
4869
  }], restrictSelectionTo: [{