@datarailsshared/datarailsshared 1.6.161 → 1.6.165
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.
- package/datarailsshared-datarailsshared-1.6.165.tgz +0 -0
- package/esm2022/lib/dr-inputs/date-pickers/dr-date-picker-with-timeframe/dr-date-picker-with-timeframe.component.mjs +14 -2
- package/esm2022/lib/dr-inputs/date-pickers/dr-date-picker_custom-header/dr-date-picker_custom-header.component.mjs +89 -69
- package/esm2022/lib/dr-inputs/date-pickers/dr-fiscal-month-calendar-picker/dr-fiscal-month-calendar-header.component.mjs +89 -67
- package/esm2022/lib/dr-inputs/date-pickers/services/dr-date-picker.service.mjs +4 -1
- package/fesm2022/datarailsshared-datarailsshared.mjs +293 -236
- package/fesm2022/datarailsshared-datarailsshared.mjs.map +1 -1
- package/lib/dr-inputs/date-pickers/dr-date-picker-with-timeframe/dr-date-picker-with-timeframe.component.d.ts +6 -1
- package/lib/dr-inputs/date-pickers/dr-date-picker_custom-header/dr-date-picker_custom-header.component.d.ts +0 -4
- package/lib/dr-inputs/date-pickers/services/dr-date-picker.service.d.ts +5 -0
- package/package.json +1 -1
- package/datarailsshared-datarailsshared-1.6.161.tgz +0 -0
|
@@ -12,10 +12,10 @@ import { NG_VALUE_ACCESSOR, FormBuilder, FormsModule, ReactiveFormsModule, FormG
|
|
|
12
12
|
import { Observable, BehaviorSubject, distinctUntilChanged, Subject, startWith, takeUntil, noop as noop$3, combineLatest, from, merge as merge$1, fromEvent, map as map$2, filter as filter$1, switchMap as switchMap$1, observeOn, asyncScheduler, withLatestFrom, first as first$1, interval, throwError, finalize as finalize$1, tap as tap$1, defer, firstValueFrom, throttleTime } from 'rxjs';
|
|
13
13
|
import * as _ from 'lodash';
|
|
14
14
|
import { isNil, isObject, cloneDeep, find, indexOf, reduce, map as map$1, isNumber, merge, forEach, some, isEqual, orderBy, filter as filter$2, includes, pull, concat, isString, isBoolean, keys } from 'lodash';
|
|
15
|
+
import { transition, style, animate, trigger, state } from '@angular/animations';
|
|
15
16
|
import { skip, debounceTime, filter, distinctUntilChanged as distinctUntilChanged$1, takeUntil as takeUntil$1, startWith as startWith$1, map, tap, shareReplay, switchMap, first, catchError, finalize, take } from 'rxjs/operators';
|
|
16
17
|
import * as i6 from '@angular/material/datepicker';
|
|
17
18
|
import { MatCalendar, DateRange, MAT_DATE_RANGE_SELECTION_STRATEGY, MatDatepickerModule } from '@angular/material/datepicker';
|
|
18
|
-
import { transition, style, animate, trigger, state } from '@angular/animations';
|
|
19
19
|
import * as i1$1 from '@angular/cdk/overlay';
|
|
20
20
|
import { OverlayConfig } from '@angular/cdk/overlay';
|
|
21
21
|
import * as i4 from '@angular/cdk/portal';
|
|
@@ -236,6 +236,103 @@ class DrSharedUtils {
|
|
|
236
236
|
}; }
|
|
237
237
|
}
|
|
238
238
|
|
|
239
|
+
const POPUP_POSITIONS = {
|
|
240
|
+
top: {
|
|
241
|
+
originX: 'center',
|
|
242
|
+
originY: 'top',
|
|
243
|
+
overlayX: 'center',
|
|
244
|
+
overlayY: 'bottom',
|
|
245
|
+
offsetY: -8,
|
|
246
|
+
},
|
|
247
|
+
'top-left': {
|
|
248
|
+
originX: 'start',
|
|
249
|
+
originY: 'top',
|
|
250
|
+
overlayX: 'start',
|
|
251
|
+
overlayY: 'bottom',
|
|
252
|
+
offsetY: -8,
|
|
253
|
+
},
|
|
254
|
+
'top-right': {
|
|
255
|
+
originX: 'end',
|
|
256
|
+
originY: 'top',
|
|
257
|
+
overlayX: 'end',
|
|
258
|
+
overlayY: 'bottom',
|
|
259
|
+
offsetY: -8,
|
|
260
|
+
},
|
|
261
|
+
bottom: {
|
|
262
|
+
originX: 'center',
|
|
263
|
+
originY: 'bottom',
|
|
264
|
+
overlayX: 'center',
|
|
265
|
+
overlayY: 'top',
|
|
266
|
+
offsetY: 7,
|
|
267
|
+
},
|
|
268
|
+
'bottom-left': {
|
|
269
|
+
originX: 'start',
|
|
270
|
+
originY: 'bottom',
|
|
271
|
+
overlayX: 'start',
|
|
272
|
+
overlayY: 'top',
|
|
273
|
+
offsetY: 7,
|
|
274
|
+
},
|
|
275
|
+
'bottom-right': {
|
|
276
|
+
originX: 'end',
|
|
277
|
+
originY: 'bottom',
|
|
278
|
+
overlayX: 'end',
|
|
279
|
+
overlayY: 'top',
|
|
280
|
+
offsetY: 7,
|
|
281
|
+
},
|
|
282
|
+
left: {
|
|
283
|
+
originX: 'start',
|
|
284
|
+
originY: 'center',
|
|
285
|
+
overlayX: 'end',
|
|
286
|
+
overlayY: 'center',
|
|
287
|
+
offsetX: -8,
|
|
288
|
+
},
|
|
289
|
+
'left-top': {
|
|
290
|
+
originX: 'start',
|
|
291
|
+
originY: 'top',
|
|
292
|
+
overlayX: 'end',
|
|
293
|
+
overlayY: 'top',
|
|
294
|
+
offsetX: -8,
|
|
295
|
+
},
|
|
296
|
+
'left-bottom': {
|
|
297
|
+
originX: 'start',
|
|
298
|
+
originY: 'bottom',
|
|
299
|
+
overlayX: 'end',
|
|
300
|
+
overlayY: 'bottom',
|
|
301
|
+
offsetX: -8,
|
|
302
|
+
},
|
|
303
|
+
right: {
|
|
304
|
+
originX: 'end',
|
|
305
|
+
originY: 'center',
|
|
306
|
+
overlayX: 'start',
|
|
307
|
+
overlayY: 'center',
|
|
308
|
+
offsetX: 8,
|
|
309
|
+
},
|
|
310
|
+
'right-top': {
|
|
311
|
+
originX: 'end',
|
|
312
|
+
originY: 'top',
|
|
313
|
+
overlayX: 'start',
|
|
314
|
+
overlayY: 'top',
|
|
315
|
+
offsetX: 8,
|
|
316
|
+
},
|
|
317
|
+
'right-bottom': {
|
|
318
|
+
originX: 'end',
|
|
319
|
+
originY: 'bottom',
|
|
320
|
+
overlayX: 'start',
|
|
321
|
+
overlayY: 'bottom',
|
|
322
|
+
offsetX: 8,
|
|
323
|
+
},
|
|
324
|
+
};
|
|
325
|
+
const POPUP_ANIMATION = [
|
|
326
|
+
transition(':enter', [style({ opacity: 0 }), animate(150, style({ opacity: 1 }))]),
|
|
327
|
+
transition(':leave', [animate(150, style({ opacity: 0 }))]),
|
|
328
|
+
];
|
|
329
|
+
const PRESET_TAGS_LIST = [
|
|
330
|
+
{ key: DateTags.TODAY, label: 'Today' },
|
|
331
|
+
{ key: DateTags.YESTERDAY, label: 'Yesterday' },
|
|
332
|
+
{ key: DateTags.THIS_MONTH, label: 'This month' },
|
|
333
|
+
{ key: DateTags.PREV_MONTH, label: 'Prev month' },
|
|
334
|
+
];
|
|
335
|
+
|
|
239
336
|
class DrDatePickerService {
|
|
240
337
|
constructor() {
|
|
241
338
|
this.isTimeframeSelectionEnabled = false;
|
|
@@ -248,10 +345,12 @@ class DrDatePickerService {
|
|
|
248
345
|
this.updatedQuarter$ = new Subject();
|
|
249
346
|
this.weekSelectionChange$ = new Subject();
|
|
250
347
|
this.updatedDateAndClose$ = new Subject();
|
|
348
|
+
this.isUsingTimeFrameSelect = true;
|
|
251
349
|
this.presetTag$ = new BehaviorSubject('');
|
|
252
350
|
this.onSameDaySelectedInCalendar$ = new Subject();
|
|
253
351
|
this.keepPresetTag = false;
|
|
254
352
|
this.isValueUpdating = false;
|
|
353
|
+
this.availableDateTagPresets = PRESET_TAGS_LIST;
|
|
255
354
|
this.availableTimeframes = [
|
|
256
355
|
TimeframeOption.DAY,
|
|
257
356
|
TimeframeOption.WEEK,
|
|
@@ -454,103 +553,6 @@ class DrDatePickerService {
|
|
|
454
553
|
type: Injectable
|
|
455
554
|
}], null, null); })();
|
|
456
555
|
|
|
457
|
-
const POPUP_POSITIONS = {
|
|
458
|
-
top: {
|
|
459
|
-
originX: 'center',
|
|
460
|
-
originY: 'top',
|
|
461
|
-
overlayX: 'center',
|
|
462
|
-
overlayY: 'bottom',
|
|
463
|
-
offsetY: -8,
|
|
464
|
-
},
|
|
465
|
-
'top-left': {
|
|
466
|
-
originX: 'start',
|
|
467
|
-
originY: 'top',
|
|
468
|
-
overlayX: 'start',
|
|
469
|
-
overlayY: 'bottom',
|
|
470
|
-
offsetY: -8,
|
|
471
|
-
},
|
|
472
|
-
'top-right': {
|
|
473
|
-
originX: 'end',
|
|
474
|
-
originY: 'top',
|
|
475
|
-
overlayX: 'end',
|
|
476
|
-
overlayY: 'bottom',
|
|
477
|
-
offsetY: -8,
|
|
478
|
-
},
|
|
479
|
-
bottom: {
|
|
480
|
-
originX: 'center',
|
|
481
|
-
originY: 'bottom',
|
|
482
|
-
overlayX: 'center',
|
|
483
|
-
overlayY: 'top',
|
|
484
|
-
offsetY: 7,
|
|
485
|
-
},
|
|
486
|
-
'bottom-left': {
|
|
487
|
-
originX: 'start',
|
|
488
|
-
originY: 'bottom',
|
|
489
|
-
overlayX: 'start',
|
|
490
|
-
overlayY: 'top',
|
|
491
|
-
offsetY: 7,
|
|
492
|
-
},
|
|
493
|
-
'bottom-right': {
|
|
494
|
-
originX: 'end',
|
|
495
|
-
originY: 'bottom',
|
|
496
|
-
overlayX: 'end',
|
|
497
|
-
overlayY: 'top',
|
|
498
|
-
offsetY: 7,
|
|
499
|
-
},
|
|
500
|
-
left: {
|
|
501
|
-
originX: 'start',
|
|
502
|
-
originY: 'center',
|
|
503
|
-
overlayX: 'end',
|
|
504
|
-
overlayY: 'center',
|
|
505
|
-
offsetX: -8,
|
|
506
|
-
},
|
|
507
|
-
'left-top': {
|
|
508
|
-
originX: 'start',
|
|
509
|
-
originY: 'top',
|
|
510
|
-
overlayX: 'end',
|
|
511
|
-
overlayY: 'top',
|
|
512
|
-
offsetX: -8,
|
|
513
|
-
},
|
|
514
|
-
'left-bottom': {
|
|
515
|
-
originX: 'start',
|
|
516
|
-
originY: 'bottom',
|
|
517
|
-
overlayX: 'end',
|
|
518
|
-
overlayY: 'bottom',
|
|
519
|
-
offsetX: -8,
|
|
520
|
-
},
|
|
521
|
-
right: {
|
|
522
|
-
originX: 'end',
|
|
523
|
-
originY: 'center',
|
|
524
|
-
overlayX: 'start',
|
|
525
|
-
overlayY: 'center',
|
|
526
|
-
offsetX: 8,
|
|
527
|
-
},
|
|
528
|
-
'right-top': {
|
|
529
|
-
originX: 'end',
|
|
530
|
-
originY: 'top',
|
|
531
|
-
overlayX: 'start',
|
|
532
|
-
overlayY: 'top',
|
|
533
|
-
offsetX: 8,
|
|
534
|
-
},
|
|
535
|
-
'right-bottom': {
|
|
536
|
-
originX: 'end',
|
|
537
|
-
originY: 'bottom',
|
|
538
|
-
overlayX: 'start',
|
|
539
|
-
overlayY: 'bottom',
|
|
540
|
-
offsetX: 8,
|
|
541
|
-
},
|
|
542
|
-
};
|
|
543
|
-
const POPUP_ANIMATION = [
|
|
544
|
-
transition(':enter', [style({ opacity: 0 }), animate(150, style({ opacity: 1 }))]),
|
|
545
|
-
transition(':leave', [animate(150, style({ opacity: 0 }))]),
|
|
546
|
-
];
|
|
547
|
-
const PRESET_TAGS_LIST = [
|
|
548
|
-
{ key: DateTags.TODAY, label: 'Today' },
|
|
549
|
-
{ key: DateTags.YESTERDAY, label: 'Yesterday' },
|
|
550
|
-
{ key: DateTags.THIS_MONTH, label: 'This month' },
|
|
551
|
-
{ key: DateTags.PREV_MONTH, label: 'Prev month' },
|
|
552
|
-
];
|
|
553
|
-
|
|
554
556
|
function WeekSelectorComponent_div_4_Template(rf, ctx) { if (rf & 1) {
|
|
555
557
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
556
558
|
i0.ɵɵelementStart(0, "div", 5);
|
|
@@ -1063,7 +1065,7 @@ class DrModelDebounceChangeDirective {
|
|
|
1063
1065
|
|
|
1064
1066
|
const _c0$K = ["prefix"];
|
|
1065
1067
|
const _c1$k = ["suffix"];
|
|
1066
|
-
const _c2$
|
|
1068
|
+
const _c2$c = ["inputRef"];
|
|
1067
1069
|
function DrInputComponent_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
1068
1070
|
const _r8 = i0.ɵɵgetCurrentView();
|
|
1069
1071
|
i0.ɵɵelementContainerStart(0);
|
|
@@ -1281,7 +1283,7 @@ class DrInputComponent {
|
|
|
1281
1283
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.prefixIcon = _t.first);
|
|
1282
1284
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.suffixIcon = _t.first);
|
|
1283
1285
|
} }, viewQuery: function DrInputComponent_Query(rf, ctx) { if (rf & 1) {
|
|
1284
|
-
i0.ɵɵviewQuery(_c2$
|
|
1286
|
+
i0.ɵɵviewQuery(_c2$c, 5);
|
|
1285
1287
|
} if (rf & 2) {
|
|
1286
1288
|
let _t;
|
|
1287
1289
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.inputElement = _t.first);
|
|
@@ -1400,7 +1402,7 @@ class DrInputComponent {
|
|
|
1400
1402
|
|
|
1401
1403
|
const _c0$J = ["labelTemplate"];
|
|
1402
1404
|
const _c1$j = ["multiLabelTemplate"];
|
|
1403
|
-
const _c2$
|
|
1405
|
+
const _c2$b = ["optionTemplate"];
|
|
1404
1406
|
const _c3$6 = ["optionHeaderTemplate"];
|
|
1405
1407
|
const _c4$4 = ["optionFooterTemplate"];
|
|
1406
1408
|
const _c5$3 = function (a0) { return { item: a0 }; };
|
|
@@ -1648,7 +1650,7 @@ class DrSelectComponent {
|
|
|
1648
1650
|
/** @nocollapse */ static { this.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: DrSelectComponent, selectors: [["dr-select"]], contentQueries: function DrSelectComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
|
|
1649
1651
|
i0.ɵɵcontentQuery(dirIndex, _c0$J, 5);
|
|
1650
1652
|
i0.ɵɵcontentQuery(dirIndex, _c1$j, 5);
|
|
1651
|
-
i0.ɵɵcontentQuery(dirIndex, _c2$
|
|
1653
|
+
i0.ɵɵcontentQuery(dirIndex, _c2$b, 5);
|
|
1652
1654
|
i0.ɵɵcontentQuery(dirIndex, _c3$6, 5);
|
|
1653
1655
|
i0.ɵɵcontentQuery(dirIndex, _c4$4, 5);
|
|
1654
1656
|
} if (rf & 2) {
|
|
@@ -1848,65 +1850,110 @@ class DrShowTimeframePipe {
|
|
|
1848
1850
|
|
|
1849
1851
|
const _c0$I = ["class", "component"];
|
|
1850
1852
|
const _c1$i = function (a0) { return { "dr-datepicker-preset-date__tags__tag--selected": a0 }; };
|
|
1851
|
-
function
|
|
1852
|
-
const
|
|
1853
|
-
i0.ɵɵelementStart(0, "div",
|
|
1854
|
-
i0.ɵɵlistener("click", function
|
|
1853
|
+
function DrDatePickerCustomHeaderComponent_div_0_div_1_div_2_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
1854
|
+
const _r8 = i0.ɵɵgetCurrentView();
|
|
1855
|
+
i0.ɵɵelementStart(0, "div", 16);
|
|
1856
|
+
i0.ɵɵlistener("click", function DrDatePickerCustomHeaderComponent_div_0_div_1_div_2_div_2_Template_div_click_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r8); const tag_r6 = restoredCtx.$implicit; const ctx_r7 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r7.onSelectPresetTag(tag_r6)); });
|
|
1855
1857
|
i0.ɵɵtext(1);
|
|
1856
1858
|
i0.ɵɵelementEnd();
|
|
1857
1859
|
} if (rf & 2) {
|
|
1858
|
-
const
|
|
1859
|
-
const
|
|
1860
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c1$i,
|
|
1860
|
+
const tag_r6 = ctx.$implicit;
|
|
1861
|
+
const ctx_r5 = i0.ɵɵnextContext(4);
|
|
1862
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c1$i, tag_r6.key === ctx_r5.selectedPresetTag))("drTooltip", ctx_r5.selectedPresetTag === tag_r6.key ? "Unselect preset" : "")("drTooltipPosition", "top");
|
|
1861
1863
|
i0.ɵɵadvance(1);
|
|
1862
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
1864
|
+
i0.ɵɵtextInterpolate1(" ", tag_r6.label, " ");
|
|
1863
1865
|
} }
|
|
1864
|
-
function
|
|
1865
|
-
i0.ɵɵelementStart(0, "div",
|
|
1866
|
-
i0.ɵɵ
|
|
1867
|
-
i0.ɵɵ
|
|
1866
|
+
function DrDatePickerCustomHeaderComponent_div_0_div_1_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
1867
|
+
i0.ɵɵelementStart(0, "div", 14);
|
|
1868
|
+
i0.ɵɵtext(1, " Preset dates ");
|
|
1869
|
+
i0.ɵɵtemplate(2, DrDatePickerCustomHeaderComponent_div_0_div_1_div_2_div_2_Template, 2, 6, "div", 15);
|
|
1870
|
+
i0.ɵɵelementEnd();
|
|
1868
1871
|
} if (rf & 2) {
|
|
1869
|
-
const
|
|
1872
|
+
const ctx_r3 = i0.ɵɵnextContext(3);
|
|
1870
1873
|
i0.ɵɵadvance(2);
|
|
1871
|
-
i0.ɵɵproperty("ngForOf",
|
|
1874
|
+
i0.ɵɵproperty("ngForOf", ctx_r3.datePickerService.availableDateTagPresets);
|
|
1872
1875
|
} }
|
|
1873
|
-
function
|
|
1874
|
-
const
|
|
1875
|
-
i0.ɵɵelementStart(0, "
|
|
1876
|
-
i0.ɵɵ
|
|
1877
|
-
i0.ɵɵ
|
|
1878
|
-
i0.ɵɵ
|
|
1879
|
-
i0.ɵɵpipe(3, "drShowTimeframePipe");
|
|
1880
|
-
i0.ɵɵelementEnd()();
|
|
1876
|
+
function DrDatePickerCustomHeaderComponent_div_0_div_1_dr_select_3_Template(rf, ctx) { if (rf & 1) {
|
|
1877
|
+
const _r10 = i0.ɵɵgetCurrentView();
|
|
1878
|
+
i0.ɵɵelementStart(0, "dr-select", 17);
|
|
1879
|
+
i0.ɵɵlistener("ngModelChange", function DrDatePickerCustomHeaderComponent_div_0_div_1_dr_select_3_Template_dr_select_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r9 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r9.setTimeframe($event)); });
|
|
1880
|
+
i0.ɵɵpipe(1, "drShowTimeframePipe");
|
|
1881
|
+
i0.ɵɵelementEnd();
|
|
1881
1882
|
} if (rf & 2) {
|
|
1882
|
-
const
|
|
1883
|
+
const ctx_r4 = i0.ɵɵnextContext(3);
|
|
1884
|
+
i0.ɵɵproperty("ngModel", ctx_r4.selectedTimeframe)("items", i0.ɵɵpipeBind2(1, 2, ctx_r4.timeframeOptions, ctx_r4.datePickerService.availableTimeframes));
|
|
1885
|
+
} }
|
|
1886
|
+
const _c2$a = function (a0) { return { "dr-datepicker-preset-date__tags--solo": a0 }; };
|
|
1887
|
+
function DrDatePickerCustomHeaderComponent_div_0_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
1888
|
+
i0.ɵɵelementStart(0, "div", 10)(1, "div", 11);
|
|
1889
|
+
i0.ɵɵtemplate(2, DrDatePickerCustomHeaderComponent_div_0_div_1_div_2_Template, 3, 1, "div", 12);
|
|
1890
|
+
i0.ɵɵelementEnd();
|
|
1891
|
+
i0.ɵɵtemplate(3, DrDatePickerCustomHeaderComponent_div_0_div_1_dr_select_3_Template, 2, 5, "dr-select", 13);
|
|
1892
|
+
i0.ɵɵelementEnd();
|
|
1893
|
+
} if (rf & 2) {
|
|
1894
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
1883
1895
|
i0.ɵɵadvance(1);
|
|
1884
|
-
i0.ɵɵproperty("
|
|
1896
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(3, _c2$a, ctx_r1.datePickerService.isUsingTimeFrameSelect));
|
|
1897
|
+
i0.ɵɵadvance(1);
|
|
1898
|
+
i0.ɵɵproperty("ngIf", ctx_r1.datePickerService.availableDateTagPresets.length > 0);
|
|
1885
1899
|
i0.ɵɵadvance(1);
|
|
1886
|
-
i0.ɵɵproperty("
|
|
1900
|
+
i0.ɵɵproperty("ngIf", ctx_r1.datePickerService.isUsingTimeFrameSelect);
|
|
1887
1901
|
} }
|
|
1888
|
-
function
|
|
1889
|
-
const
|
|
1890
|
-
i0.ɵɵelementStart(0, "div",
|
|
1891
|
-
i0.ɵɵlistener("click", function
|
|
1902
|
+
function DrDatePickerCustomHeaderComponent_div_0_div_12_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
1903
|
+
const _r15 = i0.ɵɵgetCurrentView();
|
|
1904
|
+
i0.ɵɵelementStart(0, "div", 21);
|
|
1905
|
+
i0.ɵɵlistener("click", function DrDatePickerCustomHeaderComponent_div_0_div_12_div_2_Template_div_click_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r15); const quarter_r13 = restoredCtx.$implicit; const ctx_r14 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r14.onSelectQuarter(quarter_r13)); });
|
|
1892
1906
|
i0.ɵɵtext(1);
|
|
1893
1907
|
i0.ɵɵelementEnd();
|
|
1894
1908
|
} if (rf & 2) {
|
|
1895
|
-
const
|
|
1896
|
-
const
|
|
1897
|
-
i0.ɵɵclassMap(
|
|
1898
|
-
i0.ɵɵclassProp("quarter-selector--disabled",
|
|
1909
|
+
const quarter_r13 = ctx.$implicit;
|
|
1910
|
+
const ctx_r12 = i0.ɵɵnextContext(3);
|
|
1911
|
+
i0.ɵɵclassMap(quarter_r13 === ctx_r12.selectedQuarter ? "selected" : "");
|
|
1912
|
+
i0.ɵɵclassProp("quarter-selector--disabled", ctx_r12.isQuarterDisabled(quarter_r13));
|
|
1899
1913
|
i0.ɵɵadvance(1);
|
|
1900
|
-
i0.ɵɵtextInterpolate1(" Q",
|
|
1914
|
+
i0.ɵɵtextInterpolate1(" Q", quarter_r13, " ");
|
|
1901
1915
|
} }
|
|
1902
|
-
function
|
|
1903
|
-
i0.ɵɵelementStart(0, "div",
|
|
1904
|
-
i0.ɵɵtemplate(2,
|
|
1916
|
+
function DrDatePickerCustomHeaderComponent_div_0_div_12_Template(rf, ctx) { if (rf & 1) {
|
|
1917
|
+
i0.ɵɵelementStart(0, "div", 18, 19);
|
|
1918
|
+
i0.ɵɵtemplate(2, DrDatePickerCustomHeaderComponent_div_0_div_12_div_2_Template, 2, 5, "div", 20);
|
|
1905
1919
|
i0.ɵɵelementEnd();
|
|
1906
1920
|
} if (rf & 2) {
|
|
1907
|
-
const
|
|
1921
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
1922
|
+
i0.ɵɵadvance(2);
|
|
1923
|
+
i0.ɵɵproperty("ngForOf", ctx_r2.quarters);
|
|
1924
|
+
} }
|
|
1925
|
+
function DrDatePickerCustomHeaderComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
1926
|
+
const _r17 = i0.ɵɵgetCurrentView();
|
|
1927
|
+
i0.ɵɵelementStart(0, "div", 1);
|
|
1928
|
+
i0.ɵɵtemplate(1, DrDatePickerCustomHeaderComponent_div_0_div_1_Template, 4, 5, "div", 2);
|
|
1929
|
+
i0.ɵɵelementStart(2, "div", 3)(3, "div", 4);
|
|
1930
|
+
i0.ɵɵlistener("click", function DrDatePickerCustomHeaderComponent_div_0_Template_div_click_3_listener() { i0.ɵɵrestoreView(_r17); const ctx_r16 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r16.pagingClicked(false)); });
|
|
1931
|
+
i0.ɵɵelement(4, "i", 5);
|
|
1932
|
+
i0.ɵɵelementEnd();
|
|
1933
|
+
i0.ɵɵelementStart(5, "span", 6)(6, "span", 7);
|
|
1934
|
+
i0.ɵɵlistener("click", function DrDatePickerCustomHeaderComponent_div_0_Template_span_click_6_listener() { i0.ɵɵrestoreView(_r17); const ctx_r18 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r18.switchViewOnClickOnPeriodLabel(ctx_r18.calendarView.FOR_MONTHS)); });
|
|
1935
|
+
i0.ɵɵtext(7);
|
|
1936
|
+
i0.ɵɵelementEnd();
|
|
1937
|
+
i0.ɵɵelementStart(8, "span", 7);
|
|
1938
|
+
i0.ɵɵlistener("click", function DrDatePickerCustomHeaderComponent_div_0_Template_span_click_8_listener() { i0.ɵɵrestoreView(_r17); const ctx_r19 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r19.switchViewOnClickOnPeriodLabel(ctx_r19.calendarView.FOR_YEARS)); });
|
|
1939
|
+
i0.ɵɵtext(9);
|
|
1940
|
+
i0.ɵɵelementEnd()();
|
|
1941
|
+
i0.ɵɵelementStart(10, "div", 4);
|
|
1942
|
+
i0.ɵɵlistener("click", function DrDatePickerCustomHeaderComponent_div_0_Template_div_click_10_listener() { i0.ɵɵrestoreView(_r17); const ctx_r20 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r20.pagingClicked(true)); });
|
|
1943
|
+
i0.ɵɵelement(11, "i", 8);
|
|
1944
|
+
i0.ɵɵelementEnd()();
|
|
1945
|
+
i0.ɵɵtemplate(12, DrDatePickerCustomHeaderComponent_div_0_div_12_Template, 3, 1, "div", 9);
|
|
1946
|
+
i0.ɵɵelementEnd();
|
|
1947
|
+
} if (rf & 2) {
|
|
1948
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
1949
|
+
i0.ɵɵadvance(1);
|
|
1950
|
+
i0.ɵɵproperty("ngIf", ctx_r0.datePickerService.isUsingDateTagPresets);
|
|
1951
|
+
i0.ɵɵadvance(6);
|
|
1952
|
+
i0.ɵɵtextInterpolate(ctx_r0.periodMonthLabel + " ");
|
|
1908
1953
|
i0.ɵɵadvance(2);
|
|
1909
|
-
i0.ɵɵ
|
|
1954
|
+
i0.ɵɵtextInterpolate(ctx_r0.periodYearLabel);
|
|
1955
|
+
i0.ɵɵadvance(3);
|
|
1956
|
+
i0.ɵɵproperty("ngIf", ctx_r0.currentViewIsQuarter);
|
|
1910
1957
|
} }
|
|
1911
1958
|
class DrDatePickerCustomHeaderComponent {
|
|
1912
1959
|
get selectedPresetTag() {
|
|
@@ -1974,7 +2021,6 @@ class DrDatePickerCustomHeaderComponent {
|
|
|
1974
2021
|
this.timeframeSelection = false;
|
|
1975
2022
|
this.periodMonthLabel = '';
|
|
1976
2023
|
this.periodYearLabel = '';
|
|
1977
|
-
this.presetTagList = PRESET_TAGS_LIST;
|
|
1978
2024
|
this.calendarView = CalendarView;
|
|
1979
2025
|
this.cfr = inject(ComponentFactoryResolver);
|
|
1980
2026
|
this.injector = inject(Injector);
|
|
@@ -2122,38 +2168,15 @@ class DrDatePickerCustomHeaderComponent {
|
|
|
2122
2168
|
calendar.insertBefore(selector.location.nativeElement, calendar.firstChild);
|
|
2123
2169
|
}
|
|
2124
2170
|
/** @nocollapse */ static { this.ɵfac = function DrDatePickerCustomHeaderComponent_Factory(t) { return new (t || DrDatePickerCustomHeaderComponent)(i0.ɵɵdirectiveInject(i6.MatCalendar), i0.ɵɵdirectiveInject(i1$4.DateAdapter), i0.ɵɵdirectiveInject(MAT_DATE_FORMATS), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(DrDatePickerService)); }; }
|
|
2125
|
-
/** @nocollapse */ static { this.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: DrDatePickerCustomHeaderComponent, selectors: [["dr-date-picker_custom-header", 8, "component"]], attrs: _c0$I, decls:
|
|
2126
|
-
i0.ɵɵtemplate(0, DrDatePickerCustomHeaderComponent_div_0_Template,
|
|
2127
|
-
i0.ɵɵelementStart(1, "div", 1)(2, "div", 2);
|
|
2128
|
-
i0.ɵɵlistener("click", function DrDatePickerCustomHeaderComponent_Template_div_click_2_listener() { return ctx.pagingClicked(false); });
|
|
2129
|
-
i0.ɵɵelement(3, "i", 3);
|
|
2130
|
-
i0.ɵɵelementEnd();
|
|
2131
|
-
i0.ɵɵelementStart(4, "span", 4)(5, "span", 5);
|
|
2132
|
-
i0.ɵɵlistener("click", function DrDatePickerCustomHeaderComponent_Template_span_click_5_listener() { return ctx.switchViewOnClickOnPeriodLabel(ctx.calendarView.FOR_MONTHS); });
|
|
2133
|
-
i0.ɵɵtext(6);
|
|
2134
|
-
i0.ɵɵelementEnd();
|
|
2135
|
-
i0.ɵɵelementStart(7, "span", 5);
|
|
2136
|
-
i0.ɵɵlistener("click", function DrDatePickerCustomHeaderComponent_Template_span_click_7_listener() { return ctx.switchViewOnClickOnPeriodLabel(ctx.calendarView.FOR_YEARS); });
|
|
2137
|
-
i0.ɵɵtext(8);
|
|
2138
|
-
i0.ɵɵelementEnd()();
|
|
2139
|
-
i0.ɵɵelementStart(9, "div", 2);
|
|
2140
|
-
i0.ɵɵlistener("click", function DrDatePickerCustomHeaderComponent_Template_div_click_9_listener() { return ctx.pagingClicked(true); });
|
|
2141
|
-
i0.ɵɵelement(10, "i", 6);
|
|
2142
|
-
i0.ɵɵelementEnd()();
|
|
2143
|
-
i0.ɵɵtemplate(11, DrDatePickerCustomHeaderComponent_div_11_Template, 3, 1, "div", 7);
|
|
2171
|
+
/** @nocollapse */ static { this.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: DrDatePickerCustomHeaderComponent, selectors: [["dr-date-picker_custom-header", 8, "component"]], attrs: _c0$I, decls: 1, vars: 1, consts: [["class", "dr-datepicker__timeframe-select__wrapper", 4, "ngIf"], [1, "dr-datepicker__timeframe-select__wrapper"], ["class", "dr-datepicker-preset-date", 4, "ngIf"], [1, "dr-date-paging"], [1, "dr-date-paging", "flip-page-button", 3, "click"], [1, "dr-icon-arrow-left", "presentation_buttons-navigate_input"], [1, "example-header-label"], [3, "click"], [1, "dr-icon-arrow-right", "presentation_buttons-navigate_input"], ["class", "dr-quarterly-datepicker", 4, "ngIf"], [1, "dr-datepicker-preset-date"], [1, "dr-datepicker-preset-date__tags", 3, "ngClass"], ["class", "dr-datepicker-preset-date__tags__title", 4, "ngIf"], ["class", "dr-datepicker__timeframe-select", "bindLabel", "title", "bindValue", "value", 3, "ngModel", "items", "ngModelChange", 4, "ngIf"], [1, "dr-datepicker-preset-date__tags__title"], ["id", "preset_tag", "class", "dr-datepicker-preset-date__tags__tag", 3, "ngClass", "drTooltip", "drTooltipPosition", "click", 4, "ngFor", "ngForOf"], ["id", "preset_tag", 1, "dr-datepicker-preset-date__tags__tag", 3, "ngClass", "drTooltip", "drTooltipPosition", "click"], ["bindLabel", "title", "bindValue", "value", 1, "dr-datepicker__timeframe-select", 3, "ngModel", "items", "ngModelChange"], [1, "dr-quarterly-datepicker"], ["quarterlyDatePicker", ""], ["class", "quarter-selector", 3, "class", "quarter-selector--disabled", "click", 4, "ngFor", "ngForOf"], [1, "quarter-selector", 3, "click"]], template: function DrDatePickerCustomHeaderComponent_Template(rf, ctx) { if (rf & 1) {
|
|
2172
|
+
i0.ɵɵtemplate(0, DrDatePickerCustomHeaderComponent_div_0_Template, 13, 4, "div", 0);
|
|
2144
2173
|
} if (rf & 2) {
|
|
2145
2174
|
i0.ɵɵproperty("ngIf", ctx.datePickerService.isTimeframeSelectionEnabled);
|
|
2146
|
-
|
|
2147
|
-
i0.ɵɵtextInterpolate(ctx.periodMonthLabel + " ");
|
|
2148
|
-
i0.ɵɵadvance(2);
|
|
2149
|
-
i0.ɵɵtextInterpolate(ctx.periodYearLabel);
|
|
2150
|
-
i0.ɵɵadvance(3);
|
|
2151
|
-
i0.ɵɵproperty("ngIf", ctx.currentViewIsQuarter);
|
|
2152
|
-
} }, dependencies: [i1$2.NgControlStatus, i1$2.NgModel, i1.NgClass, i1.NgForOf, i1.NgIf, DrTooltipDirective, DrSelectComponent, DrShowTimeframePipe], styles: ["[_nghost-%COMP%]{height:54px;align-items:center;font-family:Poppins;font-style:normal;font-weight:600;font-size:14px;line-height:22px}.dr-datepicker__timeframe-select__wrapper[_ngcontent-%COMP%]{background-color:#f9faff;padding:16px 32px;border-radius:18px 18px 0 0}.dr-datepicker-preset-date[_ngcontent-%COMP%]{display:flex;flex-direction:column}.dr-datepicker-preset-date__tags[_ngcontent-%COMP%]{display:flex;padding-bottom:21px;padding-top:10px;font-size:12px}.dr-datepicker-preset-date__tags__tag[_ngcontent-%COMP%]{cursor:pointer;font-weight:400;line-height:20px!important;padding:2px 8px;border:1px solid #9ea1aa;border-radius:18px;background:#fff;margin-right:4px}.dr-datepicker-preset-date__tags__tag--selected[_ngcontent-%COMP%]{color:#4646ce;background:#f2f2fb;border:1px solid #4646ce}.dr-date-paging[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:16px 32px 32px;gap:4px}.dr-date-paging.flip-page-button[_ngcontent-%COMP%]{width:20px;height:20px;padding:0;color:#4e566c}.dr-date-paging.flip-page-button[_ngcontent-%COMP%]:hover{border-radius:50%;background:#f2f2fb;color:#4646ce}.example-header-label[_ngcontent-%COMP%]{cursor:pointer}.dr-quarterly-datepicker[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:10px}.dr-quarterly-datepicker[_ngcontent-%COMP%] .quarter-selector[_ngcontent-%COMP%]{display:block;width:74px;height:40px;text-align:center;border-radius:40px;font-weight:400;padding-top:9px}.dr-quarterly-datepicker[_ngcontent-%COMP%] .quarter-selector[_ngcontent-%COMP%]:hover{background:#f2f2fb;color:#4646ce;font-weight:600;cursor:pointer}.dr-quarterly-datepicker[_ngcontent-%COMP%] .quarter-selector.selected[_ngcontent-%COMP%]{background-color:#4646ce;color:#f3f7ff;font-weight:600}.dr-quarterly-datepicker[_ngcontent-%COMP%] .quarter-selector--disabled[_ngcontent-%COMP%], .dr-quarterly-datepicker[_ngcontent-%COMP%] .quarter-selector--disabled.selected[_ngcontent-%COMP%]{pointer-events:none;background-color:transparent;color:#aeabac;font-weight:400}"], changeDetection: 0 }); }
|
|
2175
|
+
} }, dependencies: [i1$2.NgControlStatus, i1$2.NgModel, i1.NgClass, i1.NgForOf, i1.NgIf, DrTooltipDirective, DrSelectComponent, DrShowTimeframePipe], styles: ["[_nghost-%COMP%]{height:54px;align-items:center;font-family:Poppins;font-style:normal;font-weight:600;font-size:14px;line-height:22px}.dr-datepicker__timeframe-select__wrapper[_ngcontent-%COMP%]{background-color:#f9faff;padding:16px 32px;border-radius:18px 18px 0 0}.dr-datepicker-preset-date[_ngcontent-%COMP%]{display:flex;flex-direction:column}.dr-datepicker-preset-date__tags[_ngcontent-%COMP%]{display:flex;padding-bottom:21px;padding-top:10px;font-size:12px}.dr-datepicker-preset-date__tags--solo[_ngcontent-%COMP%]{padding:16px 32px;gap:16px;justify-content:center}.dr-datepicker-preset-date__tags--solo[_ngcontent-%COMP%] .dr-datepicker-preset-date__tags__tag[_ngcontent-%COMP%]{padding:4px 8px;justify-content:center;display:flex;flex:1 0 0}.dr-datepicker-preset-date__tags__tag[_ngcontent-%COMP%]{cursor:pointer;font-weight:400;line-height:20px!important;padding:2px 8px;border:1px solid #9ea1aa;border-radius:18px;background:#fff;margin-right:4px}.dr-datepicker-preset-date__tags__tag--selected[_ngcontent-%COMP%]{color:#4646ce;background:#f2f2fb;border:1px solid #4646ce}.dr-date-paging[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:16px 32px 32px;gap:4px}.dr-date-paging.flip-page-button[_ngcontent-%COMP%]{width:20px;height:20px;padding:0;color:#4e566c}.dr-date-paging.flip-page-button[_ngcontent-%COMP%]:hover{border-radius:50%;background:#f2f2fb;color:#4646ce}.example-header-label[_ngcontent-%COMP%]{cursor:pointer}.dr-quarterly-datepicker[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:10px}.dr-quarterly-datepicker[_ngcontent-%COMP%] .quarter-selector[_ngcontent-%COMP%]{display:block;width:74px;height:40px;text-align:center;border-radius:40px;font-weight:400;padding-top:9px}.dr-quarterly-datepicker[_ngcontent-%COMP%] .quarter-selector[_ngcontent-%COMP%]:hover{background:#f2f2fb;color:#4646ce;font-weight:600;cursor:pointer}.dr-quarterly-datepicker[_ngcontent-%COMP%] .quarter-selector.selected[_ngcontent-%COMP%]{background-color:#4646ce;color:#f3f7ff;font-weight:600}.dr-quarterly-datepicker[_ngcontent-%COMP%] .quarter-selector--disabled[_ngcontent-%COMP%], .dr-quarterly-datepicker[_ngcontent-%COMP%] .quarter-selector--disabled.selected[_ngcontent-%COMP%]{pointer-events:none;background-color:transparent;color:#aeabac;font-weight:400}"], changeDetection: 0 }); }
|
|
2153
2176
|
}
|
|
2154
2177
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DrDatePickerCustomHeaderComponent, [{
|
|
2155
2178
|
type: Component,
|
|
2156
|
-
args: [{ selector: 'dr-date-picker_custom-header.component', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"datePickerService.isTimeframeSelectionEnabled\" class=\"dr-datepicker__timeframe-select__wrapper\">\n <div *ngIf=\"datePickerService.isUsingDateTagPresets\" class=\"dr-datepicker-preset-date\">\n <div class=\"dr-datepicker-preset-date__tags\">\n <div\n *ngFor=\"let tag of
|
|
2179
|
+
args: [{ selector: 'dr-date-picker_custom-header.component', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"datePickerService.isTimeframeSelectionEnabled\" class=\"dr-datepicker__timeframe-select__wrapper\">\n <div *ngIf=\"datePickerService.isUsingDateTagPresets\" class=\"dr-datepicker-preset-date\">\n <div class=\"dr-datepicker-preset-date__tags\"\n [ngClass]=\"{ 'dr-datepicker-preset-date__tags--solo': datePickerService.isUsingTimeFrameSelect }\">\n <div\n *ngIf=\"datePickerService.availableDateTagPresets.length > 0\"\n class=\"dr-datepicker-preset-date__tags__title\">\n Preset dates\n <div\n *ngFor=\"let tag of datePickerService.availableDateTagPresets\"\n id=\"preset_tag\"\n class=\"dr-datepicker-preset-date__tags__tag\"\n (click)=\"onSelectPresetTag(tag)\"\n [ngClass]=\"{ 'dr-datepicker-preset-date__tags__tag--selected': tag.key === selectedPresetTag }\"\n [drTooltip]=\"selectedPresetTag === tag.key ? 'Unselect preset' : ''\"\n [drTooltipPosition]=\"'top'\">\n {{ tag.label }}\n </div>\n </div>\n </div>\n <dr-select\n *ngIf=\"datePickerService.isUsingTimeFrameSelect\"\n class=\"dr-datepicker__timeframe-select\"\n [ngModel]=\"selectedTimeframe\"\n [items]=\"timeframeOptions | drShowTimeframePipe: datePickerService.availableTimeframes\"\n bindLabel=\"title\"\n bindValue=\"value\"\n (ngModelChange)=\"setTimeframe($event)\">\n </dr-select>\n</div>\n\n<div class=\"dr-date-paging\">\n <div class=\"dr-date-paging flip-page-button\" (click)=\"pagingClicked(false)\">\n <i class=\"dr-icon-arrow-left presentation_buttons-navigate_input\"></i>\n </div>\n <span class=\"example-header-label\">\n <span (click)=\"switchViewOnClickOnPeriodLabel(calendarView.FOR_MONTHS)\">{{ periodMonthLabel + ' ' }}</span>\n <span (click)=\"switchViewOnClickOnPeriodLabel(calendarView.FOR_YEARS)\">{{ periodYearLabel }}</span>\n </span>\n <div class=\"dr-date-paging flip-page-button\" (click)=\"pagingClicked(true)\">\n <i class=\"dr-icon-arrow-right presentation_buttons-navigate_input\"></i>\n </div>\n</div>\n<div #quarterlyDatePicker class=\"dr-quarterly-datepicker\" *ngIf=\"currentViewIsQuarter\">\n <div\n *ngFor=\"let quarter of quarters\"\n class=\"quarter-selector\"\n (click)=\"onSelectQuarter(quarter)\"\n [class]=\"quarter === selectedQuarter ? 'selected' : ''\"\n [class.quarter-selector--disabled]=\"isQuarterDisabled(quarter)\">\n Q{{ quarter }}\n </div>\n</div>\n", styles: [":host{height:54px;align-items:center;font-family:Poppins;font-style:normal;font-weight:600;font-size:14px;line-height:22px}.dr-datepicker__timeframe-select__wrapper{background-color:#f9faff;padding:16px 32px;border-radius:18px 18px 0 0}.dr-datepicker-preset-date{display:flex;flex-direction:column}.dr-datepicker-preset-date__tags{display:flex;padding-bottom:21px;padding-top:10px;font-size:12px}.dr-datepicker-preset-date__tags--solo{padding:16px 32px;gap:16px;justify-content:center}.dr-datepicker-preset-date__tags--solo .dr-datepicker-preset-date__tags__tag{padding:4px 8px;justify-content:center;display:flex;flex:1 0 0}.dr-datepicker-preset-date__tags__tag{cursor:pointer;font-weight:400;line-height:20px!important;padding:2px 8px;border:1px solid #9ea1aa;border-radius:18px;background:#fff;margin-right:4px}.dr-datepicker-preset-date__tags__tag--selected{color:#4646ce;background:#f2f2fb;border:1px solid #4646ce}.dr-date-paging{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:16px 32px 32px;gap:4px}.dr-date-paging.flip-page-button{width:20px;height:20px;padding:0;color:#4e566c}.dr-date-paging.flip-page-button:hover{border-radius:50%;background:#f2f2fb;color:#4646ce}.example-header-label{cursor:pointer}.dr-quarterly-datepicker{display:flex;justify-content:space-between;padding:10px}.dr-quarterly-datepicker .quarter-selector{display:block;width:74px;height:40px;text-align:center;border-radius:40px;font-weight:400;padding-top:9px}.dr-quarterly-datepicker .quarter-selector:hover{background:#f2f2fb;color:#4646ce;font-weight:600;cursor:pointer}.dr-quarterly-datepicker .quarter-selector.selected{background-color:#4646ce;color:#f3f7ff;font-weight:600}.dr-quarterly-datepicker .quarter-selector--disabled,.dr-quarterly-datepicker .quarter-selector--disabled.selected{pointer-events:none;background-color:transparent;color:#aeabac;font-weight:400}\n"] }]
|
|
2157
2180
|
}], function () { return [{ type: i6.MatCalendar }, { type: i1$4.DateAdapter }, { type: CustomDateFormat, decorators: [{
|
|
2158
2181
|
type: Inject,
|
|
2159
2182
|
args: [MAT_DATE_FORMATS]
|
|
@@ -4919,65 +4942,110 @@ class DrLinkComponent {
|
|
|
4919
4942
|
|
|
4920
4943
|
const _c0$A = ["class", "component"];
|
|
4921
4944
|
const _c1$f = function (a0) { return { "dr-datepicker-preset-date__tags__tag--selected": a0 }; };
|
|
4922
|
-
function
|
|
4923
|
-
const
|
|
4924
|
-
i0.ɵɵelementStart(0, "div",
|
|
4925
|
-
i0.ɵɵlistener("click", function
|
|
4945
|
+
function DrFiscalMonthCalendarHeaderComponent_div_0_div_1_div_2_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
4946
|
+
const _r8 = i0.ɵɵgetCurrentView();
|
|
4947
|
+
i0.ɵɵelementStart(0, "div", 16);
|
|
4948
|
+
i0.ɵɵlistener("click", function DrFiscalMonthCalendarHeaderComponent_div_0_div_1_div_2_div_2_Template_div_click_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r8); const tag_r6 = restoredCtx.$implicit; const ctx_r7 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r7.onSelectPresetTag(tag_r6)); });
|
|
4926
4949
|
i0.ɵɵtext(1);
|
|
4927
4950
|
i0.ɵɵelementEnd();
|
|
4928
4951
|
} if (rf & 2) {
|
|
4929
|
-
const
|
|
4930
|
-
const
|
|
4931
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c1$f,
|
|
4952
|
+
const tag_r6 = ctx.$implicit;
|
|
4953
|
+
const ctx_r5 = i0.ɵɵnextContext(4);
|
|
4954
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c1$f, tag_r6.key === ctx_r5.selectedPresetTag))("drTooltip", ctx_r5.selectedPresetTag === tag_r6.key ? "Unselect preset" : "")("drTooltipPosition", "top");
|
|
4932
4955
|
i0.ɵɵadvance(1);
|
|
4933
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
4956
|
+
i0.ɵɵtextInterpolate1(" ", tag_r6.label, " ");
|
|
4934
4957
|
} }
|
|
4935
|
-
function
|
|
4936
|
-
i0.ɵɵelementStart(0, "div",
|
|
4937
|
-
i0.ɵɵ
|
|
4938
|
-
i0.ɵɵ
|
|
4958
|
+
function DrFiscalMonthCalendarHeaderComponent_div_0_div_1_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
4959
|
+
i0.ɵɵelementStart(0, "div", 14);
|
|
4960
|
+
i0.ɵɵtext(1, " Preset dates ");
|
|
4961
|
+
i0.ɵɵtemplate(2, DrFiscalMonthCalendarHeaderComponent_div_0_div_1_div_2_div_2_Template, 2, 6, "div", 15);
|
|
4962
|
+
i0.ɵɵelementEnd();
|
|
4939
4963
|
} if (rf & 2) {
|
|
4940
|
-
const
|
|
4964
|
+
const ctx_r3 = i0.ɵɵnextContext(3);
|
|
4941
4965
|
i0.ɵɵadvance(2);
|
|
4942
|
-
i0.ɵɵproperty("ngForOf",
|
|
4966
|
+
i0.ɵɵproperty("ngForOf", ctx_r3.datePickerService.availableDateTagPresets);
|
|
4943
4967
|
} }
|
|
4944
|
-
function
|
|
4945
|
-
const
|
|
4946
|
-
i0.ɵɵelementStart(0, "
|
|
4947
|
-
i0.ɵɵ
|
|
4948
|
-
i0.ɵɵ
|
|
4949
|
-
i0.ɵɵ
|
|
4950
|
-
i0.ɵɵpipe(3, "drShowTimeframePipe");
|
|
4951
|
-
i0.ɵɵelementEnd()();
|
|
4968
|
+
function DrFiscalMonthCalendarHeaderComponent_div_0_div_1_dr_select_3_Template(rf, ctx) { if (rf & 1) {
|
|
4969
|
+
const _r10 = i0.ɵɵgetCurrentView();
|
|
4970
|
+
i0.ɵɵelementStart(0, "dr-select", 17);
|
|
4971
|
+
i0.ɵɵlistener("ngModelChange", function DrFiscalMonthCalendarHeaderComponent_div_0_div_1_dr_select_3_Template_dr_select_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r9 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r9.setTimeframe($event)); });
|
|
4972
|
+
i0.ɵɵpipe(1, "drShowTimeframePipe");
|
|
4973
|
+
i0.ɵɵelementEnd();
|
|
4952
4974
|
} if (rf & 2) {
|
|
4953
|
-
const
|
|
4975
|
+
const ctx_r4 = i0.ɵɵnextContext(3);
|
|
4976
|
+
i0.ɵɵproperty("ngModel", ctx_r4.selectedTimeframe)("items", i0.ɵɵpipeBind2(1, 2, ctx_r4.timeframeOptions, ctx_r4.datePickerService.availableTimeframes));
|
|
4977
|
+
} }
|
|
4978
|
+
const _c2$9 = function (a0) { return { "dr-datepicker-preset-date__tags--solo": a0 }; };
|
|
4979
|
+
function DrFiscalMonthCalendarHeaderComponent_div_0_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
4980
|
+
i0.ɵɵelementStart(0, "div", 10)(1, "div", 11);
|
|
4981
|
+
i0.ɵɵtemplate(2, DrFiscalMonthCalendarHeaderComponent_div_0_div_1_div_2_Template, 3, 1, "div", 12);
|
|
4982
|
+
i0.ɵɵelementEnd();
|
|
4983
|
+
i0.ɵɵtemplate(3, DrFiscalMonthCalendarHeaderComponent_div_0_div_1_dr_select_3_Template, 2, 5, "dr-select", 13);
|
|
4984
|
+
i0.ɵɵelementEnd();
|
|
4985
|
+
} if (rf & 2) {
|
|
4986
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
4954
4987
|
i0.ɵɵadvance(1);
|
|
4955
|
-
i0.ɵɵproperty("
|
|
4988
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(3, _c2$9, ctx_r1.datePickerService.isUsingTimeFrameSelect));
|
|
4989
|
+
i0.ɵɵadvance(1);
|
|
4990
|
+
i0.ɵɵproperty("ngIf", ctx_r1.datePickerService.availableDateTagPresets.length > 0);
|
|
4956
4991
|
i0.ɵɵadvance(1);
|
|
4957
|
-
i0.ɵɵproperty("
|
|
4992
|
+
i0.ɵɵproperty("ngIf", ctx_r1.datePickerService.isUsingTimeFrameSelect);
|
|
4958
4993
|
} }
|
|
4959
|
-
function
|
|
4960
|
-
const
|
|
4961
|
-
i0.ɵɵelementStart(0, "div",
|
|
4962
|
-
i0.ɵɵlistener("click", function
|
|
4994
|
+
function DrFiscalMonthCalendarHeaderComponent_div_0_div_12_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
4995
|
+
const _r15 = i0.ɵɵgetCurrentView();
|
|
4996
|
+
i0.ɵɵelementStart(0, "div", 21);
|
|
4997
|
+
i0.ɵɵlistener("click", function DrFiscalMonthCalendarHeaderComponent_div_0_div_12_div_2_Template_div_click_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r15); const quarter_r13 = restoredCtx.$implicit; const ctx_r14 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r14.onSelectQuarter(quarter_r13)); });
|
|
4963
4998
|
i0.ɵɵtext(1);
|
|
4964
4999
|
i0.ɵɵelementEnd();
|
|
4965
5000
|
} if (rf & 2) {
|
|
4966
|
-
const
|
|
4967
|
-
const
|
|
4968
|
-
i0.ɵɵclassMap(
|
|
4969
|
-
i0.ɵɵclassProp("quarter-selector--disabled",
|
|
5001
|
+
const quarter_r13 = ctx.$implicit;
|
|
5002
|
+
const ctx_r12 = i0.ɵɵnextContext(3);
|
|
5003
|
+
i0.ɵɵclassMap(quarter_r13 === ctx_r12.selectedQuarter ? "selected" : "");
|
|
5004
|
+
i0.ɵɵclassProp("quarter-selector--disabled", ctx_r12.isQuarterDisabled(quarter_r13));
|
|
4970
5005
|
i0.ɵɵadvance(1);
|
|
4971
|
-
i0.ɵɵtextInterpolate1(" Q",
|
|
5006
|
+
i0.ɵɵtextInterpolate1(" Q", quarter_r13, " ");
|
|
4972
5007
|
} }
|
|
4973
|
-
function
|
|
4974
|
-
i0.ɵɵelementStart(0, "div",
|
|
4975
|
-
i0.ɵɵtemplate(2,
|
|
5008
|
+
function DrFiscalMonthCalendarHeaderComponent_div_0_div_12_Template(rf, ctx) { if (rf & 1) {
|
|
5009
|
+
i0.ɵɵelementStart(0, "div", 18, 19);
|
|
5010
|
+
i0.ɵɵtemplate(2, DrFiscalMonthCalendarHeaderComponent_div_0_div_12_div_2_Template, 2, 5, "div", 20);
|
|
4976
5011
|
i0.ɵɵelementEnd();
|
|
4977
5012
|
} if (rf & 2) {
|
|
4978
|
-
const
|
|
5013
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
4979
5014
|
i0.ɵɵadvance(2);
|
|
4980
|
-
i0.ɵɵproperty("ngForOf",
|
|
5015
|
+
i0.ɵɵproperty("ngForOf", ctx_r2.quarters);
|
|
5016
|
+
} }
|
|
5017
|
+
function DrFiscalMonthCalendarHeaderComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
5018
|
+
const _r17 = i0.ɵɵgetCurrentView();
|
|
5019
|
+
i0.ɵɵelementStart(0, "div", 1);
|
|
5020
|
+
i0.ɵɵtemplate(1, DrFiscalMonthCalendarHeaderComponent_div_0_div_1_Template, 4, 5, "div", 2);
|
|
5021
|
+
i0.ɵɵelementStart(2, "div", 3)(3, "div", 4);
|
|
5022
|
+
i0.ɵɵlistener("click", function DrFiscalMonthCalendarHeaderComponent_div_0_Template_div_click_3_listener() { i0.ɵɵrestoreView(_r17); const ctx_r16 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r16.pagingClicked(false)); });
|
|
5023
|
+
i0.ɵɵelement(4, "i", 5);
|
|
5024
|
+
i0.ɵɵelementEnd();
|
|
5025
|
+
i0.ɵɵelementStart(5, "span", 6)(6, "span", 7);
|
|
5026
|
+
i0.ɵɵlistener("click", function DrFiscalMonthCalendarHeaderComponent_div_0_Template_span_click_6_listener() { i0.ɵɵrestoreView(_r17); const ctx_r18 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r18.switchViewOnClickOnPeriodLabel(ctx_r18.calendarView.FOR_MONTHS)); });
|
|
5027
|
+
i0.ɵɵtext(7);
|
|
5028
|
+
i0.ɵɵelementEnd();
|
|
5029
|
+
i0.ɵɵelementStart(8, "span", 7);
|
|
5030
|
+
i0.ɵɵlistener("click", function DrFiscalMonthCalendarHeaderComponent_div_0_Template_span_click_8_listener() { i0.ɵɵrestoreView(_r17); const ctx_r19 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r19.switchViewOnClickOnPeriodLabel(ctx_r19.calendarView.FOR_YEARS)); });
|
|
5031
|
+
i0.ɵɵtext(9);
|
|
5032
|
+
i0.ɵɵelementEnd()();
|
|
5033
|
+
i0.ɵɵelementStart(10, "div", 4);
|
|
5034
|
+
i0.ɵɵlistener("click", function DrFiscalMonthCalendarHeaderComponent_div_0_Template_div_click_10_listener() { i0.ɵɵrestoreView(_r17); const ctx_r20 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r20.pagingClicked(true)); });
|
|
5035
|
+
i0.ɵɵelement(11, "i", 8);
|
|
5036
|
+
i0.ɵɵelementEnd()();
|
|
5037
|
+
i0.ɵɵtemplate(12, DrFiscalMonthCalendarHeaderComponent_div_0_div_12_Template, 3, 1, "div", 9);
|
|
5038
|
+
i0.ɵɵelementEnd();
|
|
5039
|
+
} if (rf & 2) {
|
|
5040
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
5041
|
+
i0.ɵɵadvance(1);
|
|
5042
|
+
i0.ɵɵproperty("ngIf", ctx_r0.datePickerService.isUsingDateTagPresets);
|
|
5043
|
+
i0.ɵɵadvance(6);
|
|
5044
|
+
i0.ɵɵtextInterpolate(ctx_r0.periodMonthLabel + " ");
|
|
5045
|
+
i0.ɵɵadvance(2);
|
|
5046
|
+
i0.ɵɵtextInterpolate(ctx_r0.periodYearLabel);
|
|
5047
|
+
i0.ɵɵadvance(3);
|
|
5048
|
+
i0.ɵɵproperty("ngIf", ctx_r0.currentViewIsQuarter);
|
|
4981
5049
|
} }
|
|
4982
5050
|
class DrFiscalMonthCalendarHeaderComponent extends DrDatePickerCustomHeaderComponent {
|
|
4983
5051
|
ngOnInit() {
|
|
@@ -5010,38 +5078,15 @@ class DrFiscalMonthCalendarHeaderComponent extends DrDatePickerCustomHeaderCompo
|
|
|
5010
5078
|
});
|
|
5011
5079
|
}
|
|
5012
5080
|
/** @nocollapse */ static { this.ɵfac = /** @pureOrBreakMyCode */ function () { let ɵDrFiscalMonthCalendarHeaderComponent_BaseFactory; return function DrFiscalMonthCalendarHeaderComponent_Factory(t) { return (ɵDrFiscalMonthCalendarHeaderComponent_BaseFactory || (ɵDrFiscalMonthCalendarHeaderComponent_BaseFactory = i0.ɵɵgetInheritedFactory(DrFiscalMonthCalendarHeaderComponent)))(t || DrFiscalMonthCalendarHeaderComponent); }; }(); }
|
|
5013
|
-
/** @nocollapse */ static { this.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: DrFiscalMonthCalendarHeaderComponent, selectors: [["dr-fiscal-month-calendar-header", 8, "component"]], features: [i0.ɵɵInheritDefinitionFeature], attrs: _c0$A, decls:
|
|
5014
|
-
i0.ɵɵtemplate(0, DrFiscalMonthCalendarHeaderComponent_div_0_Template,
|
|
5015
|
-
i0.ɵɵelementStart(1, "div", 1)(2, "div", 2);
|
|
5016
|
-
i0.ɵɵlistener("click", function DrFiscalMonthCalendarHeaderComponent_Template_div_click_2_listener() { return ctx.pagingClicked(false); });
|
|
5017
|
-
i0.ɵɵelement(3, "i", 3);
|
|
5018
|
-
i0.ɵɵelementEnd();
|
|
5019
|
-
i0.ɵɵelementStart(4, "span", 4)(5, "span", 5);
|
|
5020
|
-
i0.ɵɵlistener("click", function DrFiscalMonthCalendarHeaderComponent_Template_span_click_5_listener() { return ctx.switchViewOnClickOnPeriodLabel(ctx.calendarView.FOR_MONTHS); });
|
|
5021
|
-
i0.ɵɵtext(6);
|
|
5022
|
-
i0.ɵɵelementEnd();
|
|
5023
|
-
i0.ɵɵelementStart(7, "span", 5);
|
|
5024
|
-
i0.ɵɵlistener("click", function DrFiscalMonthCalendarHeaderComponent_Template_span_click_7_listener() { return ctx.switchViewOnClickOnPeriodLabel(ctx.calendarView.FOR_YEARS); });
|
|
5025
|
-
i0.ɵɵtext(8);
|
|
5026
|
-
i0.ɵɵelementEnd()();
|
|
5027
|
-
i0.ɵɵelementStart(9, "div", 2);
|
|
5028
|
-
i0.ɵɵlistener("click", function DrFiscalMonthCalendarHeaderComponent_Template_div_click_9_listener() { return ctx.pagingClicked(true); });
|
|
5029
|
-
i0.ɵɵelement(10, "i", 6);
|
|
5030
|
-
i0.ɵɵelementEnd()();
|
|
5031
|
-
i0.ɵɵtemplate(11, DrFiscalMonthCalendarHeaderComponent_div_11_Template, 3, 1, "div", 7);
|
|
5081
|
+
/** @nocollapse */ static { this.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: DrFiscalMonthCalendarHeaderComponent, selectors: [["dr-fiscal-month-calendar-header", 8, "component"]], features: [i0.ɵɵInheritDefinitionFeature], attrs: _c0$A, decls: 1, vars: 1, consts: [["class", "dr-datepicker__timeframe-select__wrapper", 4, "ngIf"], [1, "dr-datepicker__timeframe-select__wrapper"], ["class", "dr-datepicker-preset-date", 4, "ngIf"], [1, "dr-date-paging"], [1, "dr-date-paging", "flip-page-button", 3, "click"], [1, "dr-icon-arrow-left", "presentation_buttons-navigate_input"], [1, "example-header-label"], [3, "click"], [1, "dr-icon-arrow-right", "presentation_buttons-navigate_input"], ["class", "dr-quarterly-datepicker", 4, "ngIf"], [1, "dr-datepicker-preset-date"], [1, "dr-datepicker-preset-date__tags", 3, "ngClass"], ["class", "dr-datepicker-preset-date__tags__title", 4, "ngIf"], ["class", "dr-datepicker__timeframe-select", "bindLabel", "title", "bindValue", "value", 3, "ngModel", "items", "ngModelChange", 4, "ngIf"], [1, "dr-datepicker-preset-date__tags__title"], ["id", "preset_tag", "class", "dr-datepicker-preset-date__tags__tag", 3, "ngClass", "drTooltip", "drTooltipPosition", "click", 4, "ngFor", "ngForOf"], ["id", "preset_tag", 1, "dr-datepicker-preset-date__tags__tag", 3, "ngClass", "drTooltip", "drTooltipPosition", "click"], ["bindLabel", "title", "bindValue", "value", 1, "dr-datepicker__timeframe-select", 3, "ngModel", "items", "ngModelChange"], [1, "dr-quarterly-datepicker"], ["quarterlyDatePicker", ""], ["class", "quarter-selector", 3, "class", "quarter-selector--disabled", "click", 4, "ngFor", "ngForOf"], [1, "quarter-selector", 3, "click"]], template: function DrFiscalMonthCalendarHeaderComponent_Template(rf, ctx) { if (rf & 1) {
|
|
5082
|
+
i0.ɵɵtemplate(0, DrFiscalMonthCalendarHeaderComponent_div_0_Template, 13, 4, "div", 0);
|
|
5032
5083
|
} if (rf & 2) {
|
|
5033
5084
|
i0.ɵɵproperty("ngIf", ctx.datePickerService.isTimeframeSelectionEnabled);
|
|
5034
|
-
|
|
5035
|
-
i0.ɵɵtextInterpolate(ctx.periodMonthLabel + " ");
|
|
5036
|
-
i0.ɵɵadvance(2);
|
|
5037
|
-
i0.ɵɵtextInterpolate(ctx.periodYearLabel);
|
|
5038
|
-
i0.ɵɵadvance(3);
|
|
5039
|
-
i0.ɵɵproperty("ngIf", ctx.currentViewIsQuarter);
|
|
5040
|
-
} }, dependencies: [i1$2.NgControlStatus, i1$2.NgModel, i1.NgClass, i1.NgForOf, i1.NgIf, DrTooltipDirective, DrSelectComponent, DrShowTimeframePipe], styles: ["[_nghost-%COMP%]{height:54px;align-items:center;font-family:Poppins;font-style:normal;font-weight:600;font-size:14px;line-height:22px}.dr-datepicker__timeframe-select__wrapper[_ngcontent-%COMP%]{background-color:#f9faff;padding:16px 32px;border-radius:18px 18px 0 0}.dr-datepicker-preset-date[_ngcontent-%COMP%]{display:flex;flex-direction:column}.dr-datepicker-preset-date__tags[_ngcontent-%COMP%]{display:flex;padding-bottom:21px;padding-top:10px;font-size:12px}.dr-datepicker-preset-date__tags__tag[_ngcontent-%COMP%]{cursor:pointer;font-weight:400;line-height:20px!important;padding:2px 8px;border:1px solid #9ea1aa;border-radius:18px;background:#fff;margin-right:4px}.dr-datepicker-preset-date__tags__tag--selected[_ngcontent-%COMP%]{color:#4646ce;background:#f2f2fb;border:1px solid #4646ce}.dr-date-paging[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:16px 32px 32px;gap:4px}.dr-date-paging.flip-page-button[_ngcontent-%COMP%]{width:20px;height:20px;padding:0;color:#4e566c}.dr-date-paging.flip-page-button[_ngcontent-%COMP%]:hover{border-radius:50%;background:#f2f2fb;color:#4646ce}.example-header-label[_ngcontent-%COMP%]{cursor:pointer}.dr-quarterly-datepicker[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:10px}.dr-quarterly-datepicker[_ngcontent-%COMP%] .quarter-selector[_ngcontent-%COMP%]{display:block;width:74px;height:40px;text-align:center;border-radius:40px;font-weight:400;padding-top:9px}.dr-quarterly-datepicker[_ngcontent-%COMP%] .quarter-selector[_ngcontent-%COMP%]:hover{background:#f2f2fb;color:#4646ce;font-weight:600;cursor:pointer}.dr-quarterly-datepicker[_ngcontent-%COMP%] .quarter-selector.selected[_ngcontent-%COMP%]{background-color:#4646ce;color:#f3f7ff;font-weight:600}.dr-quarterly-datepicker[_ngcontent-%COMP%] .quarter-selector--disabled[_ngcontent-%COMP%], .dr-quarterly-datepicker[_ngcontent-%COMP%] .quarter-selector--disabled.selected[_ngcontent-%COMP%]{pointer-events:none;background-color:transparent;color:#aeabac;font-weight:400}"], changeDetection: 0 }); }
|
|
5085
|
+
} }, dependencies: [i1$2.NgControlStatus, i1$2.NgModel, i1.NgClass, i1.NgForOf, i1.NgIf, DrTooltipDirective, DrSelectComponent, DrShowTimeframePipe], styles: ["[_nghost-%COMP%]{height:54px;align-items:center;font-family:Poppins;font-style:normal;font-weight:600;font-size:14px;line-height:22px}.dr-datepicker__timeframe-select__wrapper[_ngcontent-%COMP%]{background-color:#f9faff;padding:16px 32px;border-radius:18px 18px 0 0}.dr-datepicker-preset-date[_ngcontent-%COMP%]{display:flex;flex-direction:column}.dr-datepicker-preset-date__tags[_ngcontent-%COMP%]{display:flex;padding-bottom:21px;padding-top:10px;font-size:12px}.dr-datepicker-preset-date__tags--solo[_ngcontent-%COMP%]{padding:16px 32px;gap:16px;justify-content:center}.dr-datepicker-preset-date__tags--solo[_ngcontent-%COMP%] .dr-datepicker-preset-date__tags__tag[_ngcontent-%COMP%]{padding:4px 8px;justify-content:center;display:flex;flex:1 0 0}.dr-datepicker-preset-date__tags__tag[_ngcontent-%COMP%]{cursor:pointer;font-weight:400;line-height:20px!important;padding:2px 8px;border:1px solid #9ea1aa;border-radius:18px;background:#fff;margin-right:4px}.dr-datepicker-preset-date__tags__tag--selected[_ngcontent-%COMP%]{color:#4646ce;background:#f2f2fb;border:1px solid #4646ce}.dr-date-paging[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:16px 32px 32px;gap:4px}.dr-date-paging.flip-page-button[_ngcontent-%COMP%]{width:20px;height:20px;padding:0;color:#4e566c}.dr-date-paging.flip-page-button[_ngcontent-%COMP%]:hover{border-radius:50%;background:#f2f2fb;color:#4646ce}.example-header-label[_ngcontent-%COMP%]{cursor:pointer}.dr-quarterly-datepicker[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:10px}.dr-quarterly-datepicker[_ngcontent-%COMP%] .quarter-selector[_ngcontent-%COMP%]{display:block;width:74px;height:40px;text-align:center;border-radius:40px;font-weight:400;padding-top:9px}.dr-quarterly-datepicker[_ngcontent-%COMP%] .quarter-selector[_ngcontent-%COMP%]:hover{background:#f2f2fb;color:#4646ce;font-weight:600;cursor:pointer}.dr-quarterly-datepicker[_ngcontent-%COMP%] .quarter-selector.selected[_ngcontent-%COMP%]{background-color:#4646ce;color:#f3f7ff;font-weight:600}.dr-quarterly-datepicker[_ngcontent-%COMP%] .quarter-selector--disabled[_ngcontent-%COMP%], .dr-quarterly-datepicker[_ngcontent-%COMP%] .quarter-selector--disabled.selected[_ngcontent-%COMP%]{pointer-events:none;background-color:transparent;color:#aeabac;font-weight:400}"], changeDetection: 0 }); }
|
|
5041
5086
|
}
|
|
5042
5087
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DrFiscalMonthCalendarHeaderComponent, [{
|
|
5043
5088
|
type: Component,
|
|
5044
|
-
args: [{ selector: 'dr-fiscal-month-calendar-header.component', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"datePickerService.isTimeframeSelectionEnabled\" class=\"dr-datepicker__timeframe-select__wrapper\">\n <div *ngIf=\"datePickerService.isUsingDateTagPresets\" class=\"dr-datepicker-preset-date\">\n <div class=\"dr-datepicker-preset-date__tags\">\n <div\n *ngFor=\"let tag of
|
|
5089
|
+
args: [{ selector: 'dr-fiscal-month-calendar-header.component', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"datePickerService.isTimeframeSelectionEnabled\" class=\"dr-datepicker__timeframe-select__wrapper\">\n <div *ngIf=\"datePickerService.isUsingDateTagPresets\" class=\"dr-datepicker-preset-date\">\n <div class=\"dr-datepicker-preset-date__tags\"\n [ngClass]=\"{ 'dr-datepicker-preset-date__tags--solo': datePickerService.isUsingTimeFrameSelect }\">\n <div\n *ngIf=\"datePickerService.availableDateTagPresets.length > 0\"\n class=\"dr-datepicker-preset-date__tags__title\">\n Preset dates\n <div\n *ngFor=\"let tag of datePickerService.availableDateTagPresets\"\n id=\"preset_tag\"\n class=\"dr-datepicker-preset-date__tags__tag\"\n (click)=\"onSelectPresetTag(tag)\"\n [ngClass]=\"{ 'dr-datepicker-preset-date__tags__tag--selected': tag.key === selectedPresetTag }\"\n [drTooltip]=\"selectedPresetTag === tag.key ? 'Unselect preset' : ''\"\n [drTooltipPosition]=\"'top'\">\n {{ tag.label }}\n </div>\n </div>\n </div>\n <dr-select\n *ngIf=\"datePickerService.isUsingTimeFrameSelect\"\n class=\"dr-datepicker__timeframe-select\"\n [ngModel]=\"selectedTimeframe\"\n [items]=\"timeframeOptions | drShowTimeframePipe: datePickerService.availableTimeframes\"\n bindLabel=\"title\"\n bindValue=\"value\"\n (ngModelChange)=\"setTimeframe($event)\">\n </dr-select>\n</div>\n\n<div class=\"dr-date-paging\">\n <div class=\"dr-date-paging flip-page-button\" (click)=\"pagingClicked(false)\">\n <i class=\"dr-icon-arrow-left presentation_buttons-navigate_input\"></i>\n </div>\n <span class=\"example-header-label\">\n <span (click)=\"switchViewOnClickOnPeriodLabel(calendarView.FOR_MONTHS)\">{{ periodMonthLabel + ' ' }}</span>\n <span (click)=\"switchViewOnClickOnPeriodLabel(calendarView.FOR_YEARS)\">{{ periodYearLabel }}</span>\n </span>\n <div class=\"dr-date-paging flip-page-button\" (click)=\"pagingClicked(true)\">\n <i class=\"dr-icon-arrow-right presentation_buttons-navigate_input\"></i>\n </div>\n</div>\n<div #quarterlyDatePicker class=\"dr-quarterly-datepicker\" *ngIf=\"currentViewIsQuarter\">\n <div\n *ngFor=\"let quarter of quarters\"\n class=\"quarter-selector\"\n (click)=\"onSelectQuarter(quarter)\"\n [class]=\"quarter === selectedQuarter ? 'selected' : ''\"\n [class.quarter-selector--disabled]=\"isQuarterDisabled(quarter)\">\n Q{{ quarter }}\n </div>\n</div>\n", styles: [":host{height:54px;align-items:center;font-family:Poppins;font-style:normal;font-weight:600;font-size:14px;line-height:22px}.dr-datepicker__timeframe-select__wrapper{background-color:#f9faff;padding:16px 32px;border-radius:18px 18px 0 0}.dr-datepicker-preset-date{display:flex;flex-direction:column}.dr-datepicker-preset-date__tags{display:flex;padding-bottom:21px;padding-top:10px;font-size:12px}.dr-datepicker-preset-date__tags--solo{padding:16px 32px;gap:16px;justify-content:center}.dr-datepicker-preset-date__tags--solo .dr-datepicker-preset-date__tags__tag{padding:4px 8px;justify-content:center;display:flex;flex:1 0 0}.dr-datepicker-preset-date__tags__tag{cursor:pointer;font-weight:400;line-height:20px!important;padding:2px 8px;border:1px solid #9ea1aa;border-radius:18px;background:#fff;margin-right:4px}.dr-datepicker-preset-date__tags__tag--selected{color:#4646ce;background:#f2f2fb;border:1px solid #4646ce}.dr-date-paging{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:16px 32px 32px;gap:4px}.dr-date-paging.flip-page-button{width:20px;height:20px;padding:0;color:#4e566c}.dr-date-paging.flip-page-button:hover{border-radius:50%;background:#f2f2fb;color:#4646ce}.example-header-label{cursor:pointer}.dr-quarterly-datepicker{display:flex;justify-content:space-between;padding:10px}.dr-quarterly-datepicker .quarter-selector{display:block;width:74px;height:40px;text-align:center;border-radius:40px;font-weight:400;padding-top:9px}.dr-quarterly-datepicker .quarter-selector:hover{background:#f2f2fb;color:#4646ce;font-weight:600;cursor:pointer}.dr-quarterly-datepicker .quarter-selector.selected{background-color:#4646ce;color:#f3f7ff;font-weight:600}.dr-quarterly-datepicker .quarter-selector--disabled,.dr-quarterly-datepicker .quarter-selector--disabled.selected{pointer-events:none;background-color:transparent;color:#aeabac;font-weight:400}\n"] }]
|
|
5045
5090
|
}], null, null); })();
|
|
5046
5091
|
|
|
5047
5092
|
function DrFiscalMonthCalendarPickerComponent_i_0_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -5258,9 +5303,17 @@ class DrDatePickerWithTimeframeComponent extends DrDatePickerComponent {
|
|
|
5258
5303
|
this.datePickerService.availableTimeframes = value;
|
|
5259
5304
|
}
|
|
5260
5305
|
}
|
|
5306
|
+
set availableDateTagPresets(value) {
|
|
5307
|
+
if (value && value.length) {
|
|
5308
|
+
this.datePickerService.availableDateTagPresets = value;
|
|
5309
|
+
}
|
|
5310
|
+
}
|
|
5261
5311
|
set isUsingDateTagPresets(flag) {
|
|
5262
5312
|
this.datePickerService.isUsingDateTagPresets = flag;
|
|
5263
5313
|
}
|
|
5314
|
+
set isUsingTimeFrameSelect(flag) {
|
|
5315
|
+
this.datePickerService.isUsingTimeFrameSelect = flag;
|
|
5316
|
+
}
|
|
5264
5317
|
set presetTag(tag) {
|
|
5265
5318
|
this.datePickerService.presetTag$.next(tag);
|
|
5266
5319
|
}
|
|
@@ -5391,7 +5444,7 @@ class DrDatePickerWithTimeframeComponent extends DrDatePickerComponent {
|
|
|
5391
5444
|
}
|
|
5392
5445
|
}
|
|
5393
5446
|
/** @nocollapse */ static { this.ɵfac = function DrDatePickerWithTimeframeComponent_Factory(t) { return new (t || DrDatePickerWithTimeframeComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1$4.DateAdapter), i0.ɵɵdirectiveInject(DrDatePickerService)); }; }
|
|
5394
|
-
/** @nocollapse */ static { this.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: DrDatePickerWithTimeframeComponent, selectors: [["dr-date-picker-with-timeframe"]], inputs: { dateFormatConfig: "dateFormatConfig", canSelectTimeframe: "canSelectTimeframe", availableTimeframes: "availableTimeframes", paginationDebounce: "paginationDebounce", isUsingDateTagPresets: "isUsingDateTagPresets", presetTag: "presetTag", datepickerTooltip: "datepickerTooltip", datepickerTooltipPosition: "datepickerTooltipPosition", datepickerTooltipTimeout: "datepickerTooltipTimeout", isOpen: "isOpen" }, outputs: { onChangeFormat: "onChangeFormat", onChangePresetTag: "onChangePresetTag" }, features: [i0.ɵɵProvidersFeature([
|
|
5447
|
+
/** @nocollapse */ static { this.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: DrDatePickerWithTimeframeComponent, selectors: [["dr-date-picker-with-timeframe"]], inputs: { dateFormatConfig: "dateFormatConfig", canSelectTimeframe: "canSelectTimeframe", availableTimeframes: "availableTimeframes", availableDateTagPresets: "availableDateTagPresets", paginationDebounce: "paginationDebounce", isUsingDateTagPresets: "isUsingDateTagPresets", isUsingTimeFrameSelect: "isUsingTimeFrameSelect", presetTag: "presetTag", datepickerTooltip: "datepickerTooltip", datepickerTooltipPosition: "datepickerTooltipPosition", datepickerTooltipTimeout: "datepickerTooltipTimeout", isOpen: "isOpen" }, outputs: { onChangeFormat: "onChangeFormat", onChangePresetTag: "onChangePresetTag" }, features: [i0.ɵɵProvidersFeature([
|
|
5395
5448
|
{ provide: NG_VALUE_ACCESSOR, useExisting: DrDatePickerWithTimeframeComponent, multi: true },
|
|
5396
5449
|
{ provide: DateAdapter, useClass: CustomDateAdapter },
|
|
5397
5450
|
{ provide: DrDatePickerService },
|
|
@@ -5444,10 +5497,14 @@ class DrDatePickerWithTimeframeComponent extends DrDatePickerComponent {
|
|
|
5444
5497
|
type: Input
|
|
5445
5498
|
}], availableTimeframes: [{
|
|
5446
5499
|
type: Input
|
|
5500
|
+
}], availableDateTagPresets: [{
|
|
5501
|
+
type: Input
|
|
5447
5502
|
}], paginationDebounce: [{
|
|
5448
5503
|
type: Input
|
|
5449
5504
|
}], isUsingDateTagPresets: [{
|
|
5450
5505
|
type: Input
|
|
5506
|
+
}], isUsingTimeFrameSelect: [{
|
|
5507
|
+
type: Input
|
|
5451
5508
|
}], presetTag: [{
|
|
5452
5509
|
type: Input
|
|
5453
5510
|
}], datepickerTooltip: [{
|