@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.
@@ -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 * 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';
@@ -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,101 @@ 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.state = {
3085
+ date: moment().add(2, 'year'),
3086
+ calendar: [
3087
+ {
3088
+ dates: null,
3089
+ monthName: null,
3090
+ number: null,
3091
+ year: null
3092
+ }
3093
+ ]
3094
+ };
3095
+ this.setState = (nextState) => {
3096
+ this.state = { ...this.state, ...nextState };
3097
+ };
3098
+ //this service is a singleton therefore its constructor will only
3099
+ //be called once during the application life cycle
3100
+ this.initCalendar();
3101
+ }
3102
+ getCalendar() {
3103
+ return [...this.state.calendar];
3104
+ }
3105
+ generatePrevMonths() {
3106
+ const calendar = this.state.calendar;
3107
+ let date = moment(calendar[0].year + '-' + calendar[0].number + '-01');
3108
+ const dateYearAgo = date.clone().subtract(1, 'year');
3109
+ while (date.isSameOrAfter(dateYearAgo)) {
3110
+ date = date.clone().subtract(1, 'month');
3111
+ calendar.unshift(this.generateMonth(date));
3112
+ }
3113
+ }
3114
+ generateNextMonths() {
3115
+ const calendar = this.state.calendar;
3116
+ const dateString = calendar[calendar.length - 1].year + '-' + calendar[calendar.length - 1].number + '-01';
3117
+ let date = moment(dateString);
3118
+ const dateYearNext = date.clone().add(1, 'year');
3119
+ while (date.isSameOrBefore(dateYearNext)) {
3120
+ date = date.clone().add(1, 'month');
3121
+ calendar.push(this.generateMonth(date));
3122
+ }
3123
+ }
3124
+ initCalendar() {
3125
+ const { date } = this.state;
3126
+ const firstMonth = this.generateMonth(date);
3127
+ const calendar = [firstMonth];
3128
+ const currentDate = moment().clone();
3129
+ const dateYearAgo = currentDate.clone().subtract(2, 'year');
3130
+ while (date.isSameOrAfter(dateYearAgo)) { // creating one year calendar
3131
+ calendar.unshift(this.previousMonth());
3132
+ }
3133
+ this.state.date = moment();
3134
+ const currentMonthIndex = calendar.length - 13;
3135
+ calendar[currentMonthIndex].dates = calendar[currentMonthIndex].dates.filter(this.filterFutureDates);
3136
+ this.setState({ calendar: calendar });
3137
+ }
3138
+ previousMonth() {
3139
+ const { date } = this.state;
3140
+ const newDate = date.subtract(1, 'month');
3141
+ const m = this.generateMonth(newDate);
3142
+ this.setState({ date: newDate });
3143
+ return m;
3144
+ }
3145
+ filterFutureDates(date) {
3146
+ if (!date) {
3147
+ return true;
3148
+ }
3149
+ return date.isSameOrBefore(moment());
3150
+ }
3151
+ generateMonth(date) {
3152
+ const firstDay = moment(date).startOf('month');
3153
+ const monthName = moment(date).format('MMMM');
3154
+ const year = moment(date).format('YYYY');
3155
+ const number = moment(date).format('MM');
3156
+ const monthLength = date.daysInMonth();
3157
+ const totalDatesInMonth = this.generateMonthDates(firstDay, monthLength);
3158
+ const emptyCellsBeforeFirstDay = Array(firstDay.weekday()).fill(null);
3159
+ const dates = [...emptyCellsBeforeFirstDay, ...totalDatesInMonth];
3160
+ return {
3161
+ dates,
3162
+ monthName,
3163
+ number,
3164
+ year
3165
+ };
3166
+ }
3167
+ generateMonthDates(firstDay, length) {
3168
+ return Array(length).fill(null).map((v, i) => moment(firstDay).add(i, 'day'));
3169
+ }
3170
+ }
3171
+ /** @nocollapse */ /** @nocollapse */ CalendarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CalendarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3172
+ /** @nocollapse */ /** @nocollapse */ CalendarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CalendarService });
3173
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CalendarService, decorators: [{
3174
+ type: Injectable
3175
+ }], ctorParameters: function () { return []; } });
3176
+
3179
3177
  class LoaderComponent {
3180
3178
  }
3181
3179
  /** @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 +4508,12 @@ class DateRangeComponent {
4510
4508
  /** @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
4509
  /** @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
4510
  { 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 } });
4511
+ ], 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
4512
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: DateRangeComponent, decorators: [{
4515
4513
  type: Component,
4516
4514
  args: [{ selector: "smart-date-range", providers: [
4517
4515
  { 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: [""] }]
4516
+ ], 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
4517
  }], ctorParameters: function () { return [{ type: i1$1.ModalController }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { ngModel: [{
4520
4518
  type: Input
4521
4519
  }], ngModelChange: [{
@@ -4767,10 +4765,10 @@ class DateRangeModalComponent {
4767
4765
  }
4768
4766
  }
4769
4767
  /** @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 });
4768
+ /** @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
4769
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: DateRangeModalComponent, decorators: [{
4772
4770
  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"] }]
4771
+ 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
4772
  }], 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
4773
  type: Input
4776
4774
  }], restrictSelectionTo: [{