@smartsoft001/angular 1.1.811 → 1.1.814

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.
@@ -22,7 +22,6 @@ import { HttpErrorResponse, HttpEventType, HttpClientModule } from '@angular/com
22
22
  import * as i2 from '@ionic-native/fingerprint-aio/ngx';
23
23
  import { FingerprintAIO } from '@ionic-native/fingerprint-aio/ngx';
24
24
  import { App, Plugins, CameraResultType } from '@capacitor/core';
25
- import * as moment from 'moment';
26
25
  import { __decorate, __metadata } from 'tslib';
27
26
  import { Memoize } from 'lodash-decorators';
28
27
  import { of, Subject, BehaviorSubject, Subscription, isObservable } from 'rxjs';
@@ -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 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';
@@ -1175,101 +1175,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImpor
1175
1175
  args: [FILE_SERVICE_CONFIG]
1176
1176
  }] }, { type: i1$2.HttpClient }]; } });
1177
1177
 
1178
- class CalendarService {
1179
- constructor() {
1180
- this.state = {
1181
- date: moment().add(2, 'year'),
1182
- calendar: [
1183
- {
1184
- dates: null,
1185
- monthName: null,
1186
- number: null,
1187
- year: null
1188
- }
1189
- ]
1190
- };
1191
- this.setState = (nextState) => {
1192
- this.state = { ...this.state, ...nextState };
1193
- };
1194
- //this service is a singleton therefore its constructor will only
1195
- //be called once during the application life cycle
1196
- this.initCalendar();
1197
- }
1198
- getCalendar() {
1199
- return [...this.state.calendar];
1200
- }
1201
- generatePrevMonths() {
1202
- const calendar = this.state.calendar;
1203
- let date = moment(calendar[0].year + '-' + calendar[0].number + '-01');
1204
- const dateYearAgo = date.clone().subtract(1, 'year');
1205
- while (date.isSameOrAfter(dateYearAgo)) {
1206
- date = date.clone().subtract(1, 'month');
1207
- calendar.unshift(this.generateMonth(date));
1208
- }
1209
- }
1210
- generateNextMonths() {
1211
- const calendar = this.state.calendar;
1212
- const dateString = calendar[calendar.length - 1].year + '-' + calendar[calendar.length - 1].number + '-01';
1213
- let date = moment(dateString);
1214
- const dateYearNext = date.clone().add(1, 'year');
1215
- while (date.isSameOrBefore(dateYearNext)) {
1216
- date = date.clone().add(1, 'month');
1217
- calendar.push(this.generateMonth(date));
1218
- }
1219
- }
1220
- initCalendar() {
1221
- const { date } = this.state;
1222
- const firstMonth = this.generateMonth(date);
1223
- const calendar = [firstMonth];
1224
- const currentDate = moment().clone();
1225
- const dateYearAgo = currentDate.clone().subtract(2, 'year');
1226
- while (date.isSameOrAfter(dateYearAgo)) { // creating one year calendar
1227
- calendar.unshift(this.previousMonth());
1228
- }
1229
- this.state.date = moment();
1230
- const currentMonthIndex = calendar.length - 13;
1231
- calendar[currentMonthIndex].dates = calendar[currentMonthIndex].dates.filter(this.filterFutureDates);
1232
- this.setState({ calendar: calendar });
1233
- }
1234
- previousMonth() {
1235
- const { date } = this.state;
1236
- const newDate = date.subtract(1, 'month');
1237
- const m = this.generateMonth(newDate);
1238
- this.setState({ date: newDate });
1239
- return m;
1240
- }
1241
- filterFutureDates(date) {
1242
- if (!date) {
1243
- return true;
1244
- }
1245
- return date.isSameOrBefore(moment());
1246
- }
1247
- generateMonth(date) {
1248
- const firstDay = moment(date).startOf('month');
1249
- const monthName = moment(date).format('MMMM');
1250
- const year = moment(date).format('YYYY');
1251
- const number = moment(date).format('MM');
1252
- const monthLength = date.daysInMonth();
1253
- const totalDatesInMonth = this.generateMonthDates(firstDay, monthLength);
1254
- const emptyCellsBeforeFirstDay = Array(firstDay.weekday()).fill(null);
1255
- const dates = [...emptyCellsBeforeFirstDay, ...totalDatesInMonth];
1256
- return {
1257
- dates,
1258
- monthName,
1259
- number,
1260
- year
1261
- };
1262
- }
1263
- generateMonthDates(firstDay, length) {
1264
- return Array(length).fill(null).map((v, i) => moment(firstDay).add(i, 'day'));
1265
- }
1266
- }
1267
- /** @nocollapse */ /** @nocollapse */ CalendarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CalendarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1268
- /** @nocollapse */ /** @nocollapse */ CalendarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CalendarService });
1269
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CalendarService, decorators: [{
1270
- type: Injectable
1271
- }], ctorParameters: function () { return []; } });
1272
-
1273
1178
  class UIService {
1274
1179
  constructor(loadingController, alertController, toastController) {
1275
1180
  this.loadingController = loadingController;
@@ -1353,7 +1258,6 @@ class SharedServicesModule {
1353
1258
  FingerprintAIO,
1354
1259
  CameraService,
1355
1260
  FileService,
1356
- CalendarService,
1357
1261
  UIService,
1358
1262
  AlertService,
1359
1263
  DetailsService
@@ -1384,7 +1288,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImpor
1384
1288
  FingerprintAIO,
1385
1289
  CameraService,
1386
1290
  FileService,
1387
- CalendarService,
1388
1291
  UIService,
1389
1292
  AlertService,
1390
1293
  DetailsService
@@ -3176,6 +3079,99 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImpor
3176
3079
  type: Injectable
3177
3080
  }] });
3178
3081
 
3082
+ class CalendarService {
3083
+ constructor() {
3084
+ this.setState = (nextState) => {
3085
+ this.state = { ...this.state, ...nextState };
3086
+ };
3087
+ this.state = {
3088
+ date: moment().add(2, 'year'),
3089
+ calendar: [
3090
+ {
3091
+ dates: null,
3092
+ monthName: null,
3093
+ number: null,
3094
+ year: null
3095
+ }
3096
+ ]
3097
+ };
3098
+ this.initCalendar();
3099
+ }
3100
+ getCalendar() {
3101
+ return [...this.state.calendar];
3102
+ }
3103
+ generatePrevMonths() {
3104
+ const calendar = this.state.calendar;
3105
+ let date = moment(calendar[0].year + '-' + calendar[0].number + '-01');
3106
+ const dateYearAgo = date.clone().subtract(1, 'year');
3107
+ while (date.isSameOrAfter(dateYearAgo)) {
3108
+ date = date.clone().subtract(1, 'month');
3109
+ calendar.unshift(this.generateMonth(date));
3110
+ }
3111
+ }
3112
+ generateNextMonths() {
3113
+ const calendar = this.state.calendar;
3114
+ const dateString = calendar[calendar.length - 1].year + '-' + calendar[calendar.length - 1].number + '-01';
3115
+ let date = moment(dateString);
3116
+ const dateYearNext = date.clone().add(1, 'year');
3117
+ while (date.isSameOrBefore(dateYearNext)) {
3118
+ date = date.clone().add(1, 'month');
3119
+ calendar.push(this.generateMonth(date));
3120
+ }
3121
+ }
3122
+ initCalendar() {
3123
+ const { date } = this.state;
3124
+ const firstMonth = this.generateMonth(date);
3125
+ const calendar = [firstMonth];
3126
+ const currentDate = moment().clone();
3127
+ const dateYearAgo = currentDate.clone().subtract(2, 'year');
3128
+ while (date.isSameOrAfter(dateYearAgo)) { // creating one year calendar
3129
+ calendar.unshift(this.previousMonth());
3130
+ }
3131
+ this.state.date = moment();
3132
+ const currentMonthIndex = calendar.length - 13;
3133
+ calendar[currentMonthIndex].dates = calendar[currentMonthIndex].dates.filter(this.filterFutureDates);
3134
+ this.setState({ calendar: calendar });
3135
+ }
3136
+ previousMonth() {
3137
+ const { date } = this.state;
3138
+ const newDate = date.subtract(1, 'month');
3139
+ const m = this.generateMonth(newDate);
3140
+ this.setState({ date: newDate });
3141
+ return m;
3142
+ }
3143
+ filterFutureDates(date) {
3144
+ if (!date) {
3145
+ return true;
3146
+ }
3147
+ return date.isSameOrBefore(moment());
3148
+ }
3149
+ generateMonth(date) {
3150
+ const firstDay = moment(date).startOf('month');
3151
+ const monthName = moment(date).format('MMMM');
3152
+ const year = moment(date).format('YYYY');
3153
+ const number = moment(date).format('MM');
3154
+ const monthLength = date.daysInMonth();
3155
+ const totalDatesInMonth = this.generateMonthDates(firstDay, monthLength);
3156
+ const emptyCellsBeforeFirstDay = Array(firstDay.weekday()).fill(null);
3157
+ const dates = [...emptyCellsBeforeFirstDay, ...totalDatesInMonth];
3158
+ return {
3159
+ dates,
3160
+ monthName,
3161
+ number,
3162
+ year
3163
+ };
3164
+ }
3165
+ generateMonthDates(firstDay, length) {
3166
+ return Array(length).fill(null).map((v, i) => moment(firstDay).add(i, 'day'));
3167
+ }
3168
+ }
3169
+ /** @nocollapse */ /** @nocollapse */ CalendarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CalendarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3170
+ /** @nocollapse */ /** @nocollapse */ CalendarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CalendarService });
3171
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CalendarService, decorators: [{
3172
+ type: Injectable
3173
+ }], ctorParameters: function () { return []; } });
3174
+
3179
3175
  class LoaderComponent {
3180
3176
  }
3181
3177
  /** @nocollapse */ /** @nocollapse */ LoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: LoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
@@ -4510,12 +4506,12 @@ class DateRangeComponent {
4510
4506
  /** @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 });
4511
4507
  /** @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: [
4512
4508
  { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef((() => DateRangeComponent)), multi: true }
4513
- ], 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 } });
4509
+ ], 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 } });
4514
4510
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: DateRangeComponent, decorators: [{
4515
4511
  type: Component,
4516
4512
  args: [{ selector: "smart-date-range", providers: [
4517
4513
  { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef((() => DateRangeComponent)), multi: true }
4518
- ], 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: [""] }]
4514
+ ], 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: [""] }]
4519
4515
  }], ctorParameters: function () { return [{ type: i1$1.ModalController }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { ngModel: [{
4520
4516
  type: Input
4521
4517
  }], ngModelChange: [{
@@ -4767,10 +4763,10 @@ class DateRangeModalComponent {
4767
4763
  }
4768
4764
  }
4769
4765
  /** @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 });
4770
- /** @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 });
4766
+ /** @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 });
4771
4767
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: DateRangeModalComponent, decorators: [{
4772
4768
  type: Component,
4773
- 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"] }]
4769
+ 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"] }]
4774
4770
  }], 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: [{
4775
4771
  type: Input
4776
4772
  }], restrictSelectionTo: [{