1 | import { ɵɵdefineInjectable, Injectable, EventEmitter, Component, Renderer2, ElementRef, Directive, ViewContainerRef, Input, Output, forwardRef, Host, ChangeDetectorRef, ViewChild, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
2 | import { filter, map, take, takeUntil, distinctUntilChanged } from 'rxjs/operators';
|
3 | import { isFirstDayOfWeek, getDay, shiftDate, isBefore, endOf, isAfter, startOf, isArray, isSame, getFirstDayOfMonth, formatDate, getLocale, isSameMonth, isSameDay, isDisabledDay, isSameYear, isDateValid, setFullDate, getMonth, getFullYear, isDate, parseDate, utcAsLocal } from 'ngx-bootstrap/chronos';
|
4 | import { PositioningService } from 'ngx-bootstrap/positioning';
|
5 | import { trigger, state, style, transition, animate } from '@angular/animations';
|
6 | import { Subscription, BehaviorSubject, combineLatest, Subject } from 'rxjs';
|
7 | import { MiniStore, MiniState } from 'ngx-bootstrap/mini-ngrx';
|
8 | import { ComponentLoaderFactory } from 'ngx-bootstrap/component-loader';
|
9 | import { NG_VALUE_ACCESSOR, NG_VALIDATORS, FormsModule } from '@angular/forms';
|
10 | import { isBs3 } from 'ngx-bootstrap/utils';
|
11 | import { CommonModule } from '@angular/common';
|
12 | import { TooltipModule } from 'ngx-bootstrap/tooltip';
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 | import * as ɵngcc0 from '@angular/core';
|
19 | import * as ɵngcc1 from 'ngx-bootstrap/positioning';
|
20 | import * as ɵngcc2 from '@angular/common';
|
21 | import * as ɵngcc3 from 'ngx-bootstrap/component-loader';
|
22 | import * as ɵngcc4 from 'ngx-bootstrap/tooltip';
|
23 |
|
24 | function BsDatepickerContainerComponent_div_0_div_4_bs_days_calendar_view_1_Template(rf, ctx) { if (rf & 1) {
|
25 | const _r10 = ɵngcc0.ɵɵgetCurrentView();
|
26 | ɵngcc0.ɵɵelementStart(0, "bs-days-calendar-view", 9);
|
27 | ɵngcc0.ɵɵlistener("onNavigate", function BsDatepickerContainerComponent_div_0_div_4_bs_days_calendar_view_1_Template_bs_days_calendar_view_onNavigate_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r10); const ctx_r9 = ɵngcc0.ɵɵnextContext(3); return ctx_r9.navigateTo($event); })("onViewMode", function BsDatepickerContainerComponent_div_0_div_4_bs_days_calendar_view_1_Template_bs_days_calendar_view_onViewMode_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r10); const ctx_r11 = ɵngcc0.ɵɵnextContext(3); return ctx_r11.setViewMode($event); })("onHover", function BsDatepickerContainerComponent_div_0_div_4_bs_days_calendar_view_1_Template_bs_days_calendar_view_onHover_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r10); const ctx_r12 = ɵngcc0.ɵɵnextContext(3); return ctx_r12.dayHoverHandler($event); })("onHoverWeek", function BsDatepickerContainerComponent_div_0_div_4_bs_days_calendar_view_1_Template_bs_days_calendar_view_onHoverWeek_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r10); const ctx_r13 = ɵngcc0.ɵɵnextContext(3); return ctx_r13.weekHoverHandler($event); })("onSelect", function BsDatepickerContainerComponent_div_0_div_4_bs_days_calendar_view_1_Template_bs_days_calendar_view_onSelect_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r10); const ctx_r14 = ɵngcc0.ɵɵnextContext(3); return ctx_r14.daySelectHandler($event); });
|
28 | ɵngcc0.ɵɵpipe(1, "async");
|
29 | ɵngcc0.ɵɵelementEnd();
|
30 | } if (rf & 2) {
|
31 | const calendar_r8 = ctx.$implicit;
|
32 | const ctx_r7 = ɵngcc0.ɵɵnextContext(3);
|
33 | ɵngcc0.ɵɵclassProp("bs-datepicker-multiple", ctx_r7.multipleCalendars);
|
34 | ɵngcc0.ɵɵproperty("calendar", calendar_r8)("options", ɵngcc0.ɵɵpipeBind1(1, 4, ctx_r7.options$));
|
35 | } }
|
36 | function BsDatepickerContainerComponent_div_0_div_4_Template(rf, ctx) { if (rf & 1) {
|
37 | ɵngcc0.ɵɵelementStart(0, "div", 7);
|
38 | ɵngcc0.ɵɵtemplate(1, BsDatepickerContainerComponent_div_0_div_4_bs_days_calendar_view_1_Template, 2, 6, "bs-days-calendar-view", 8);
|
39 | ɵngcc0.ɵɵpipe(2, "async");
|
40 | ɵngcc0.ɵɵelementEnd();
|
41 | } if (rf & 2) {
|
42 | const ctx_r1 = ɵngcc0.ɵɵnextContext(2);
|
43 | ɵngcc0.ɵɵadvance(1);
|
44 | ɵngcc0.ɵɵproperty("ngForOf", ɵngcc0.ɵɵpipeBind1(2, 1, ctx_r1.daysCalendar$));
|
45 | } }
|
46 | function BsDatepickerContainerComponent_div_0_div_5_bs_month_calendar_view_1_Template(rf, ctx) { if (rf & 1) {
|
47 | const _r18 = ɵngcc0.ɵɵgetCurrentView();
|
48 | ɵngcc0.ɵɵelementStart(0, "bs-month-calendar-view", 11);
|
49 | ɵngcc0.ɵɵlistener("onNavigate", function BsDatepickerContainerComponent_div_0_div_5_bs_month_calendar_view_1_Template_bs_month_calendar_view_onNavigate_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r18); const ctx_r17 = ɵngcc0.ɵɵnextContext(3); return ctx_r17.navigateTo($event); })("onViewMode", function BsDatepickerContainerComponent_div_0_div_5_bs_month_calendar_view_1_Template_bs_month_calendar_view_onViewMode_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r18); const ctx_r19 = ɵngcc0.ɵɵnextContext(3); return ctx_r19.setViewMode($event); })("onHover", function BsDatepickerContainerComponent_div_0_div_5_bs_month_calendar_view_1_Template_bs_month_calendar_view_onHover_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r18); const ctx_r20 = ɵngcc0.ɵɵnextContext(3); return ctx_r20.monthHoverHandler($event); })("onSelect", function BsDatepickerContainerComponent_div_0_div_5_bs_month_calendar_view_1_Template_bs_month_calendar_view_onSelect_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r18); const ctx_r21 = ɵngcc0.ɵɵnextContext(3); return ctx_r21.monthSelectHandler($event); });
|
50 | ɵngcc0.ɵɵelementEnd();
|
51 | } if (rf & 2) {
|
52 | const calendar_r16 = ctx.$implicit;
|
53 | const ctx_r15 = ɵngcc0.ɵɵnextContext(3);
|
54 | ɵngcc0.ɵɵclassProp("bs-datepicker-multiple", ctx_r15.multipleCalendars);
|
55 | ɵngcc0.ɵɵproperty("calendar", calendar_r16);
|
56 | } }
|
57 | function BsDatepickerContainerComponent_div_0_div_5_Template(rf, ctx) { if (rf & 1) {
|
58 | ɵngcc0.ɵɵelementStart(0, "div", 7);
|
59 | ɵngcc0.ɵɵtemplate(1, BsDatepickerContainerComponent_div_0_div_5_bs_month_calendar_view_1_Template, 1, 3, "bs-month-calendar-view", 10);
|
60 | ɵngcc0.ɵɵpipe(2, "async");
|
61 | ɵngcc0.ɵɵelementEnd();
|
62 | } if (rf & 2) {
|
63 | const ctx_r2 = ɵngcc0.ɵɵnextContext(2);
|
64 | ɵngcc0.ɵɵadvance(1);
|
65 | ɵngcc0.ɵɵproperty("ngForOf", ɵngcc0.ɵɵpipeBind1(2, 1, ctx_r2.monthsCalendar));
|
66 | } }
|
67 | function BsDatepickerContainerComponent_div_0_div_6_bs_years_calendar_view_1_Template(rf, ctx) { if (rf & 1) {
|
68 | const _r25 = ɵngcc0.ɵɵgetCurrentView();
|
69 | ɵngcc0.ɵɵelementStart(0, "bs-years-calendar-view", 11);
|
70 | ɵngcc0.ɵɵlistener("onNavigate", function BsDatepickerContainerComponent_div_0_div_6_bs_years_calendar_view_1_Template_bs_years_calendar_view_onNavigate_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r25); const ctx_r24 = ɵngcc0.ɵɵnextContext(3); return ctx_r24.navigateTo($event); })("onViewMode", function BsDatepickerContainerComponent_div_0_div_6_bs_years_calendar_view_1_Template_bs_years_calendar_view_onViewMode_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r25); const ctx_r26 = ɵngcc0.ɵɵnextContext(3); return ctx_r26.setViewMode($event); })("onHover", function BsDatepickerContainerComponent_div_0_div_6_bs_years_calendar_view_1_Template_bs_years_calendar_view_onHover_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r25); const ctx_r27 = ɵngcc0.ɵɵnextContext(3); return ctx_r27.yearHoverHandler($event); })("onSelect", function BsDatepickerContainerComponent_div_0_div_6_bs_years_calendar_view_1_Template_bs_years_calendar_view_onSelect_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r25); const ctx_r28 = ɵngcc0.ɵɵnextContext(3); return ctx_r28.yearSelectHandler($event); });
|
71 | ɵngcc0.ɵɵelementEnd();
|
72 | } if (rf & 2) {
|
73 | const calendar_r23 = ctx.$implicit;
|
74 | const ctx_r22 = ɵngcc0.ɵɵnextContext(3);
|
75 | ɵngcc0.ɵɵclassProp("bs-datepicker-multiple", ctx_r22.multipleCalendars);
|
76 | ɵngcc0.ɵɵproperty("calendar", calendar_r23);
|
77 | } }
|
78 | function BsDatepickerContainerComponent_div_0_div_6_Template(rf, ctx) { if (rf & 1) {
|
79 | ɵngcc0.ɵɵelementStart(0, "div", 7);
|
80 | ɵngcc0.ɵɵtemplate(1, BsDatepickerContainerComponent_div_0_div_6_bs_years_calendar_view_1_Template, 1, 3, "bs-years-calendar-view", 10);
|
81 | ɵngcc0.ɵɵpipe(2, "async");
|
82 | ɵngcc0.ɵɵelementEnd();
|
83 | } if (rf & 2) {
|
84 | const ctx_r3 = ɵngcc0.ɵɵnextContext(2);
|
85 | ɵngcc0.ɵɵadvance(1);
|
86 | ɵngcc0.ɵɵproperty("ngForOf", ɵngcc0.ɵɵpipeBind1(2, 1, ctx_r3.yearsCalendar));
|
87 | } }
|
88 | function BsDatepickerContainerComponent_div_0_div_7_Template(rf, ctx) { if (rf & 1) {
|
89 | ɵngcc0.ɵɵelementStart(0, "div", 12);
|
90 | ɵngcc0.ɵɵelementStart(1, "button", 13);
|
91 | ɵngcc0.ɵɵtext(2, "Apply");
|
92 | ɵngcc0.ɵɵelementEnd();
|
93 | ɵngcc0.ɵɵelementStart(3, "button", 14);
|
94 | ɵngcc0.ɵɵtext(4, "Cancel");
|
95 | ɵngcc0.ɵɵelementEnd();
|
96 | ɵngcc0.ɵɵelementEnd();
|
97 | } }
|
98 | function BsDatepickerContainerComponent_div_0_div_8_div_1_Template(rf, ctx) { if (rf & 1) {
|
99 | const _r32 = ɵngcc0.ɵɵgetCurrentView();
|
100 | ɵngcc0.ɵɵelementStart(0, "div", 17);
|
101 | ɵngcc0.ɵɵelementStart(1, "button", 18);
|
102 | ɵngcc0.ɵɵlistener("click", function BsDatepickerContainerComponent_div_0_div_8_div_1_Template_button_click_1_listener() { ɵngcc0.ɵɵrestoreView(_r32); const ctx_r31 = ɵngcc0.ɵɵnextContext(3); return ctx_r31.setToday(); });
|
103 | ɵngcc0.ɵɵtext(2);
|
104 | ɵngcc0.ɵɵelementEnd();
|
105 | ɵngcc0.ɵɵelementEnd();
|
106 | } if (rf & 2) {
|
107 | const ctx_r29 = ɵngcc0.ɵɵnextContext(3);
|
108 | ɵngcc0.ɵɵclassProp("today-left", ctx_r29.todayPos === "left")("today-right", ctx_r29.todayPos === "right")("today-center", ctx_r29.todayPos === "center");
|
109 | ɵngcc0.ɵɵadvance(2);
|
110 | ɵngcc0.ɵɵtextInterpolate(ctx_r29.todayBtnLbl);
|
111 | } }
|
112 | function BsDatepickerContainerComponent_div_0_div_8_div_2_Template(rf, ctx) { if (rf & 1) {
|
113 | const _r34 = ɵngcc0.ɵɵgetCurrentView();
|
114 | ɵngcc0.ɵɵelementStart(0, "div", 19);
|
115 | ɵngcc0.ɵɵelementStart(1, "button", 18);
|
116 | ɵngcc0.ɵɵlistener("click", function BsDatepickerContainerComponent_div_0_div_8_div_2_Template_button_click_1_listener() { ɵngcc0.ɵɵrestoreView(_r34); const ctx_r33 = ɵngcc0.ɵɵnextContext(3); return ctx_r33.clearDate(); });
|
117 | ɵngcc0.ɵɵtext(2);
|
118 | ɵngcc0.ɵɵelementEnd();
|
119 | ɵngcc0.ɵɵelementEnd();
|
120 | } if (rf & 2) {
|
121 | const ctx_r30 = ɵngcc0.ɵɵnextContext(3);
|
122 | ɵngcc0.ɵɵclassProp("clear-left", ctx_r30.clearPos === "left")("clear-right", ctx_r30.clearPos === "right")("clear-center", ctx_r30.clearPos === "center");
|
123 | ɵngcc0.ɵɵadvance(2);
|
124 | ɵngcc0.ɵɵtextInterpolate(ctx_r30.clearBtnLbl);
|
125 | } }
|
126 | function BsDatepickerContainerComponent_div_0_div_8_Template(rf, ctx) { if (rf & 1) {
|
127 | ɵngcc0.ɵɵelementStart(0, "div", 12);
|
128 | ɵngcc0.ɵɵtemplate(1, BsDatepickerContainerComponent_div_0_div_8_div_1_Template, 3, 7, "div", 15);
|
129 | ɵngcc0.ɵɵtemplate(2, BsDatepickerContainerComponent_div_0_div_8_div_2_Template, 3, 7, "div", 16);
|
130 | ɵngcc0.ɵɵelementEnd();
|
131 | } if (rf & 2) {
|
132 | const ctx_r5 = ɵngcc0.ɵɵnextContext(2);
|
133 | ɵngcc0.ɵɵadvance(1);
|
134 | ɵngcc0.ɵɵproperty("ngIf", ctx_r5.showTodayBtn);
|
135 | ɵngcc0.ɵɵadvance(1);
|
136 | ɵngcc0.ɵɵproperty("ngIf", ctx_r5.showClearBtn);
|
137 | } }
|
138 | function BsDatepickerContainerComponent_div_0_div_9_Template(rf, ctx) { if (rf & 1) {
|
139 | const _r36 = ɵngcc0.ɵɵgetCurrentView();
|
140 | ɵngcc0.ɵɵelementStart(0, "div", 20);
|
141 | ɵngcc0.ɵɵelementStart(1, "bs-custom-date-view", 21);
|
142 | ɵngcc0.ɵɵlistener("onSelect", function BsDatepickerContainerComponent_div_0_div_9_Template_bs_custom_date_view_onSelect_1_listener($event) { ɵngcc0.ɵɵrestoreView(_r36); const ctx_r35 = ɵngcc0.ɵɵnextContext(2); return ctx_r35.setRangeOnCalendar($event); });
|
143 | ɵngcc0.ɵɵelementEnd();
|
144 | ɵngcc0.ɵɵelementEnd();
|
145 | } if (rf & 2) {
|
146 | const ctx_r6 = ɵngcc0.ɵɵnextContext(2);
|
147 | ɵngcc0.ɵɵadvance(1);
|
148 | ɵngcc0.ɵɵproperty("selectedRange", ctx_r6.chosenRange)("ranges", ctx_r6.customRanges)("customRangeLabel", ctx_r6.customRangeBtnLbl);
|
149 | } }
|
150 | function BsDatepickerContainerComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
151 | const _r38 = ɵngcc0.ɵɵgetCurrentView();
|
152 | ɵngcc0.ɵɵelementStart(0, "div", 1);
|
153 | ɵngcc0.ɵɵelementStart(1, "div", 2);
|
154 | ɵngcc0.ɵɵlistener("@datepickerAnimation.done", function BsDatepickerContainerComponent_div_0_Template_div_animation_datepickerAnimation_done_1_listener() { ɵngcc0.ɵɵrestoreView(_r38); const ctx_r37 = ɵngcc0.ɵɵnextContext(); return ctx_r37.positionServiceEnable(); });
|
155 | ɵngcc0.ɵɵelementStart(2, "div", 3);
|
156 | ɵngcc0.ɵɵpipe(3, "async");
|
157 | ɵngcc0.ɵɵtemplate(4, BsDatepickerContainerComponent_div_0_div_4_Template, 3, 3, "div", 4);
|
158 | ɵngcc0.ɵɵtemplate(5, BsDatepickerContainerComponent_div_0_div_5_Template, 3, 3, "div", 4);
|
159 | ɵngcc0.ɵɵtemplate(6, BsDatepickerContainerComponent_div_0_div_6_Template, 3, 3, "div", 4);
|
160 | ɵngcc0.ɵɵelementEnd();
|
161 | ɵngcc0.ɵɵtemplate(7, BsDatepickerContainerComponent_div_0_div_7_Template, 5, 0, "div", 5);
|
162 | ɵngcc0.ɵɵtemplate(8, BsDatepickerContainerComponent_div_0_div_8_Template, 3, 2, "div", 5);
|
163 | ɵngcc0.ɵɵelementEnd();
|
164 | ɵngcc0.ɵɵtemplate(9, BsDatepickerContainerComponent_div_0_div_9_Template, 2, 3, "div", 6);
|
165 | ɵngcc0.ɵɵelementEnd();
|
166 | } if (rf & 2) {
|
167 | const ctx_r0 = ɵngcc0.ɵɵnextContext();
|
168 | ɵngcc0.ɵɵproperty("ngClass", ctx_r0.containerClass);
|
169 | ɵngcc0.ɵɵadvance(1);
|
170 | ɵngcc0.ɵɵproperty("@datepickerAnimation", ctx_r0.animationState);
|
171 | ɵngcc0.ɵɵadvance(1);
|
172 | ɵngcc0.ɵɵproperty("ngSwitch", ɵngcc0.ɵɵpipeBind1(3, 9, ctx_r0.viewMode));
|
173 | ɵngcc0.ɵɵadvance(2);
|
174 | ɵngcc0.ɵɵproperty("ngSwitchCase", "day");
|
175 | ɵngcc0.ɵɵadvance(1);
|
176 | ɵngcc0.ɵɵproperty("ngSwitchCase", "month");
|
177 | ɵngcc0.ɵɵadvance(1);
|
178 | ɵngcc0.ɵɵproperty("ngSwitchCase", "year");
|
179 | ɵngcc0.ɵɵadvance(1);
|
180 | ɵngcc0.ɵɵproperty("ngIf", false);
|
181 | ɵngcc0.ɵɵadvance(1);
|
182 | ɵngcc0.ɵɵproperty("ngIf", ctx_r0.showTodayBtn || ctx_r0.showClearBtn);
|
183 | ɵngcc0.ɵɵadvance(1);
|
184 | ɵngcc0.ɵɵproperty("ngIf", ctx_r0.customRanges && ctx_r0.customRanges.length > 0);
|
185 | } }
|
186 | function BsDatepickerInlineContainerComponent_div_0_div_4_bs_days_calendar_view_1_Template(rf, ctx) { if (rf & 1) {
|
187 | const _r10 = ɵngcc0.ɵɵgetCurrentView();
|
188 | ɵngcc0.ɵɵelementStart(0, "bs-days-calendar-view", 9);
|
189 | ɵngcc0.ɵɵlistener("onNavigate", function BsDatepickerInlineContainerComponent_div_0_div_4_bs_days_calendar_view_1_Template_bs_days_calendar_view_onNavigate_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r10); const ctx_r9 = ɵngcc0.ɵɵnextContext(3); return ctx_r9.navigateTo($event); })("onViewMode", function BsDatepickerInlineContainerComponent_div_0_div_4_bs_days_calendar_view_1_Template_bs_days_calendar_view_onViewMode_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r10); const ctx_r11 = ɵngcc0.ɵɵnextContext(3); return ctx_r11.setViewMode($event); })("onHover", function BsDatepickerInlineContainerComponent_div_0_div_4_bs_days_calendar_view_1_Template_bs_days_calendar_view_onHover_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r10); const ctx_r12 = ɵngcc0.ɵɵnextContext(3); return ctx_r12.dayHoverHandler($event); })("onHoverWeek", function BsDatepickerInlineContainerComponent_div_0_div_4_bs_days_calendar_view_1_Template_bs_days_calendar_view_onHoverWeek_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r10); const ctx_r13 = ɵngcc0.ɵɵnextContext(3); return ctx_r13.weekHoverHandler($event); })("onSelect", function BsDatepickerInlineContainerComponent_div_0_div_4_bs_days_calendar_view_1_Template_bs_days_calendar_view_onSelect_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r10); const ctx_r14 = ɵngcc0.ɵɵnextContext(3); return ctx_r14.daySelectHandler($event); });
|
190 | ɵngcc0.ɵɵpipe(1, "async");
|
191 | ɵngcc0.ɵɵelementEnd();
|
192 | } if (rf & 2) {
|
193 | const calendar_r8 = ctx.$implicit;
|
194 | const ctx_r7 = ɵngcc0.ɵɵnextContext(3);
|
195 | ɵngcc0.ɵɵclassProp("bs-datepicker-multiple", ctx_r7.multipleCalendars);
|
196 | ɵngcc0.ɵɵproperty("calendar", calendar_r8)("options", ɵngcc0.ɵɵpipeBind1(1, 4, ctx_r7.options$));
|
197 | } }
|
198 | function BsDatepickerInlineContainerComponent_div_0_div_4_Template(rf, ctx) { if (rf & 1) {
|
199 | ɵngcc0.ɵɵelementStart(0, "div", 7);
|
200 | ɵngcc0.ɵɵtemplate(1, BsDatepickerInlineContainerComponent_div_0_div_4_bs_days_calendar_view_1_Template, 2, 6, "bs-days-calendar-view", 8);
|
201 | ɵngcc0.ɵɵpipe(2, "async");
|
202 | ɵngcc0.ɵɵelementEnd();
|
203 | } if (rf & 2) {
|
204 | const ctx_r1 = ɵngcc0.ɵɵnextContext(2);
|
205 | ɵngcc0.ɵɵadvance(1);
|
206 | ɵngcc0.ɵɵproperty("ngForOf", ɵngcc0.ɵɵpipeBind1(2, 1, ctx_r1.daysCalendar$));
|
207 | } }
|
208 | function BsDatepickerInlineContainerComponent_div_0_div_5_bs_month_calendar_view_1_Template(rf, ctx) { if (rf & 1) {
|
209 | const _r18 = ɵngcc0.ɵɵgetCurrentView();
|
210 | ɵngcc0.ɵɵelementStart(0, "bs-month-calendar-view", 11);
|
211 | ɵngcc0.ɵɵlistener("onNavigate", function BsDatepickerInlineContainerComponent_div_0_div_5_bs_month_calendar_view_1_Template_bs_month_calendar_view_onNavigate_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r18); const ctx_r17 = ɵngcc0.ɵɵnextContext(3); return ctx_r17.navigateTo($event); })("onViewMode", function BsDatepickerInlineContainerComponent_div_0_div_5_bs_month_calendar_view_1_Template_bs_month_calendar_view_onViewMode_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r18); const ctx_r19 = ɵngcc0.ɵɵnextContext(3); return ctx_r19.setViewMode($event); })("onHover", function BsDatepickerInlineContainerComponent_div_0_div_5_bs_month_calendar_view_1_Template_bs_month_calendar_view_onHover_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r18); const ctx_r20 = ɵngcc0.ɵɵnextContext(3); return ctx_r20.monthHoverHandler($event); })("onSelect", function BsDatepickerInlineContainerComponent_div_0_div_5_bs_month_calendar_view_1_Template_bs_month_calendar_view_onSelect_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r18); const ctx_r21 = ɵngcc0.ɵɵnextContext(3); return ctx_r21.monthSelectHandler($event); });
|
212 | ɵngcc0.ɵɵelementEnd();
|
213 | } if (rf & 2) {
|
214 | const calendar_r16 = ctx.$implicit;
|
215 | const ctx_r15 = ɵngcc0.ɵɵnextContext(3);
|
216 | ɵngcc0.ɵɵclassProp("bs-datepicker-multiple", ctx_r15.multipleCalendars);
|
217 | ɵngcc0.ɵɵproperty("calendar", calendar_r16);
|
218 | } }
|
219 | function BsDatepickerInlineContainerComponent_div_0_div_5_Template(rf, ctx) { if (rf & 1) {
|
220 | ɵngcc0.ɵɵelementStart(0, "div", 7);
|
221 | ɵngcc0.ɵɵtemplate(1, BsDatepickerInlineContainerComponent_div_0_div_5_bs_month_calendar_view_1_Template, 1, 3, "bs-month-calendar-view", 10);
|
222 | ɵngcc0.ɵɵpipe(2, "async");
|
223 | ɵngcc0.ɵɵelementEnd();
|
224 | } if (rf & 2) {
|
225 | const ctx_r2 = ɵngcc0.ɵɵnextContext(2);
|
226 | ɵngcc0.ɵɵadvance(1);
|
227 | ɵngcc0.ɵɵproperty("ngForOf", ɵngcc0.ɵɵpipeBind1(2, 1, ctx_r2.monthsCalendar));
|
228 | } }
|
229 | function BsDatepickerInlineContainerComponent_div_0_div_6_bs_years_calendar_view_1_Template(rf, ctx) { if (rf & 1) {
|
230 | const _r25 = ɵngcc0.ɵɵgetCurrentView();
|
231 | ɵngcc0.ɵɵelementStart(0, "bs-years-calendar-view", 11);
|
232 | ɵngcc0.ɵɵlistener("onNavigate", function BsDatepickerInlineContainerComponent_div_0_div_6_bs_years_calendar_view_1_Template_bs_years_calendar_view_onNavigate_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r25); const ctx_r24 = ɵngcc0.ɵɵnextContext(3); return ctx_r24.navigateTo($event); })("onViewMode", function BsDatepickerInlineContainerComponent_div_0_div_6_bs_years_calendar_view_1_Template_bs_years_calendar_view_onViewMode_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r25); const ctx_r26 = ɵngcc0.ɵɵnextContext(3); return ctx_r26.setViewMode($event); })("onHover", function BsDatepickerInlineContainerComponent_div_0_div_6_bs_years_calendar_view_1_Template_bs_years_calendar_view_onHover_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r25); const ctx_r27 = ɵngcc0.ɵɵnextContext(3); return ctx_r27.yearHoverHandler($event); })("onSelect", function BsDatepickerInlineContainerComponent_div_0_div_6_bs_years_calendar_view_1_Template_bs_years_calendar_view_onSelect_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r25); const ctx_r28 = ɵngcc0.ɵɵnextContext(3); return ctx_r28.yearSelectHandler($event); });
|
233 | ɵngcc0.ɵɵelementEnd();
|
234 | } if (rf & 2) {
|
235 | const calendar_r23 = ctx.$implicit;
|
236 | const ctx_r22 = ɵngcc0.ɵɵnextContext(3);
|
237 | ɵngcc0.ɵɵclassProp("bs-datepicker-multiple", ctx_r22.multipleCalendars);
|
238 | ɵngcc0.ɵɵproperty("calendar", calendar_r23);
|
239 | } }
|
240 | function BsDatepickerInlineContainerComponent_div_0_div_6_Template(rf, ctx) { if (rf & 1) {
|
241 | ɵngcc0.ɵɵelementStart(0, "div", 7);
|
242 | ɵngcc0.ɵɵtemplate(1, BsDatepickerInlineContainerComponent_div_0_div_6_bs_years_calendar_view_1_Template, 1, 3, "bs-years-calendar-view", 10);
|
243 | ɵngcc0.ɵɵpipe(2, "async");
|
244 | ɵngcc0.ɵɵelementEnd();
|
245 | } if (rf & 2) {
|
246 | const ctx_r3 = ɵngcc0.ɵɵnextContext(2);
|
247 | ɵngcc0.ɵɵadvance(1);
|
248 | ɵngcc0.ɵɵproperty("ngForOf", ɵngcc0.ɵɵpipeBind1(2, 1, ctx_r3.yearsCalendar));
|
249 | } }
|
250 | function BsDatepickerInlineContainerComponent_div_0_div_7_Template(rf, ctx) { if (rf & 1) {
|
251 | ɵngcc0.ɵɵelementStart(0, "div", 12);
|
252 | ɵngcc0.ɵɵelementStart(1, "button", 13);
|
253 | ɵngcc0.ɵɵtext(2, "Apply");
|
254 | ɵngcc0.ɵɵelementEnd();
|
255 | ɵngcc0.ɵɵelementStart(3, "button", 14);
|
256 | ɵngcc0.ɵɵtext(4, "Cancel");
|
257 | ɵngcc0.ɵɵelementEnd();
|
258 | ɵngcc0.ɵɵelementEnd();
|
259 | } }
|
260 | function BsDatepickerInlineContainerComponent_div_0_div_8_div_1_Template(rf, ctx) { if (rf & 1) {
|
261 | const _r32 = ɵngcc0.ɵɵgetCurrentView();
|
262 | ɵngcc0.ɵɵelementStart(0, "div", 17);
|
263 | ɵngcc0.ɵɵelementStart(1, "button", 18);
|
264 | ɵngcc0.ɵɵlistener("click", function BsDatepickerInlineContainerComponent_div_0_div_8_div_1_Template_button_click_1_listener() { ɵngcc0.ɵɵrestoreView(_r32); const ctx_r31 = ɵngcc0.ɵɵnextContext(3); return ctx_r31.setToday(); });
|
265 | ɵngcc0.ɵɵtext(2);
|
266 | ɵngcc0.ɵɵelementEnd();
|
267 | ɵngcc0.ɵɵelementEnd();
|
268 | } if (rf & 2) {
|
269 | const ctx_r29 = ɵngcc0.ɵɵnextContext(3);
|
270 | ɵngcc0.ɵɵclassProp("today-left", ctx_r29.todayPos === "left")("today-right", ctx_r29.todayPos === "right")("today-center", ctx_r29.todayPos === "center");
|
271 | ɵngcc0.ɵɵadvance(2);
|
272 | ɵngcc0.ɵɵtextInterpolate(ctx_r29.todayBtnLbl);
|
273 | } }
|
274 | function BsDatepickerInlineContainerComponent_div_0_div_8_div_2_Template(rf, ctx) { if (rf & 1) {
|
275 | const _r34 = ɵngcc0.ɵɵgetCurrentView();
|
276 | ɵngcc0.ɵɵelementStart(0, "div", 19);
|
277 | ɵngcc0.ɵɵelementStart(1, "button", 18);
|
278 | ɵngcc0.ɵɵlistener("click", function BsDatepickerInlineContainerComponent_div_0_div_8_div_2_Template_button_click_1_listener() { ɵngcc0.ɵɵrestoreView(_r34); const ctx_r33 = ɵngcc0.ɵɵnextContext(3); return ctx_r33.clearDate(); });
|
279 | ɵngcc0.ɵɵtext(2);
|
280 | ɵngcc0.ɵɵelementEnd();
|
281 | ɵngcc0.ɵɵelementEnd();
|
282 | } if (rf & 2) {
|
283 | const ctx_r30 = ɵngcc0.ɵɵnextContext(3);
|
284 | ɵngcc0.ɵɵclassProp("clear-left", ctx_r30.clearPos === "left")("clear-right", ctx_r30.clearPos === "right")("clear-center", ctx_r30.clearPos === "center");
|
285 | ɵngcc0.ɵɵadvance(2);
|
286 | ɵngcc0.ɵɵtextInterpolate(ctx_r30.clearBtnLbl);
|
287 | } }
|
288 | function BsDatepickerInlineContainerComponent_div_0_div_8_Template(rf, ctx) { if (rf & 1) {
|
289 | ɵngcc0.ɵɵelementStart(0, "div", 12);
|
290 | ɵngcc0.ɵɵtemplate(1, BsDatepickerInlineContainerComponent_div_0_div_8_div_1_Template, 3, 7, "div", 15);
|
291 | ɵngcc0.ɵɵtemplate(2, BsDatepickerInlineContainerComponent_div_0_div_8_div_2_Template, 3, 7, "div", 16);
|
292 | ɵngcc0.ɵɵelementEnd();
|
293 | } if (rf & 2) {
|
294 | const ctx_r5 = ɵngcc0.ɵɵnextContext(2);
|
295 | ɵngcc0.ɵɵadvance(1);
|
296 | ɵngcc0.ɵɵproperty("ngIf", ctx_r5.showTodayBtn);
|
297 | ɵngcc0.ɵɵadvance(1);
|
298 | ɵngcc0.ɵɵproperty("ngIf", ctx_r5.showClearBtn);
|
299 | } }
|
300 | function BsDatepickerInlineContainerComponent_div_0_div_9_Template(rf, ctx) { if (rf & 1) {
|
301 | const _r36 = ɵngcc0.ɵɵgetCurrentView();
|
302 | ɵngcc0.ɵɵelementStart(0, "div", 20);
|
303 | ɵngcc0.ɵɵelementStart(1, "bs-custom-date-view", 21);
|
304 | ɵngcc0.ɵɵlistener("onSelect", function BsDatepickerInlineContainerComponent_div_0_div_9_Template_bs_custom_date_view_onSelect_1_listener($event) { ɵngcc0.ɵɵrestoreView(_r36); const ctx_r35 = ɵngcc0.ɵɵnextContext(2); return ctx_r35.setRangeOnCalendar($event); });
|
305 | ɵngcc0.ɵɵelementEnd();
|
306 | ɵngcc0.ɵɵelementEnd();
|
307 | } if (rf & 2) {
|
308 | const ctx_r6 = ɵngcc0.ɵɵnextContext(2);
|
309 | ɵngcc0.ɵɵadvance(1);
|
310 | ɵngcc0.ɵɵproperty("selectedRange", ctx_r6.chosenRange)("ranges", ctx_r6.customRanges)("customRangeLabel", ctx_r6.customRangeBtnLbl);
|
311 | } }
|
312 | function BsDatepickerInlineContainerComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
313 | const _r38 = ɵngcc0.ɵɵgetCurrentView();
|
314 | ɵngcc0.ɵɵelementStart(0, "div", 1);
|
315 | ɵngcc0.ɵɵelementStart(1, "div", 2);
|
316 | ɵngcc0.ɵɵlistener("@datepickerAnimation.done", function BsDatepickerInlineContainerComponent_div_0_Template_div_animation_datepickerAnimation_done_1_listener() { ɵngcc0.ɵɵrestoreView(_r38); const ctx_r37 = ɵngcc0.ɵɵnextContext(); return ctx_r37.positionServiceEnable(); });
|
317 | ɵngcc0.ɵɵelementStart(2, "div", 3);
|
318 | ɵngcc0.ɵɵpipe(3, "async");
|
319 | ɵngcc0.ɵɵtemplate(4, BsDatepickerInlineContainerComponent_div_0_div_4_Template, 3, 3, "div", 4);
|
320 | ɵngcc0.ɵɵtemplate(5, BsDatepickerInlineContainerComponent_div_0_div_5_Template, 3, 3, "div", 4);
|
321 | ɵngcc0.ɵɵtemplate(6, BsDatepickerInlineContainerComponent_div_0_div_6_Template, 3, 3, "div", 4);
|
322 | ɵngcc0.ɵɵelementEnd();
|
323 | ɵngcc0.ɵɵtemplate(7, BsDatepickerInlineContainerComponent_div_0_div_7_Template, 5, 0, "div", 5);
|
324 | ɵngcc0.ɵɵtemplate(8, BsDatepickerInlineContainerComponent_div_0_div_8_Template, 3, 2, "div", 5);
|
325 | ɵngcc0.ɵɵelementEnd();
|
326 | ɵngcc0.ɵɵtemplate(9, BsDatepickerInlineContainerComponent_div_0_div_9_Template, 2, 3, "div", 6);
|
327 | ɵngcc0.ɵɵelementEnd();
|
328 | } if (rf & 2) {
|
329 | const ctx_r0 = ɵngcc0.ɵɵnextContext();
|
330 | ɵngcc0.ɵɵproperty("ngClass", ctx_r0.containerClass);
|
331 | ɵngcc0.ɵɵadvance(1);
|
332 | ɵngcc0.ɵɵproperty("@datepickerAnimation", ctx_r0.animationState);
|
333 | ɵngcc0.ɵɵadvance(1);
|
334 | ɵngcc0.ɵɵproperty("ngSwitch", ɵngcc0.ɵɵpipeBind1(3, 9, ctx_r0.viewMode));
|
335 | ɵngcc0.ɵɵadvance(2);
|
336 | ɵngcc0.ɵɵproperty("ngSwitchCase", "day");
|
337 | ɵngcc0.ɵɵadvance(1);
|
338 | ɵngcc0.ɵɵproperty("ngSwitchCase", "month");
|
339 | ɵngcc0.ɵɵadvance(1);
|
340 | ɵngcc0.ɵɵproperty("ngSwitchCase", "year");
|
341 | ɵngcc0.ɵɵadvance(1);
|
342 | ɵngcc0.ɵɵproperty("ngIf", false);
|
343 | ɵngcc0.ɵɵadvance(1);
|
344 | ɵngcc0.ɵɵproperty("ngIf", ctx_r0.showTodayBtn || ctx_r0.showClearBtn);
|
345 | ɵngcc0.ɵɵadvance(1);
|
346 | ɵngcc0.ɵɵproperty("ngIf", ctx_r0.customRanges && ctx_r0.customRanges.length > 0);
|
347 | } }
|
348 | function BsDaterangepickerContainerComponent_div_0_div_4_bs_days_calendar_view_1_Template(rf, ctx) { if (rf & 1) {
|
349 | const _r10 = ɵngcc0.ɵɵgetCurrentView();
|
350 | ɵngcc0.ɵɵelementStart(0, "bs-days-calendar-view", 9);
|
351 | ɵngcc0.ɵɵlistener("onNavigate", function BsDaterangepickerContainerComponent_div_0_div_4_bs_days_calendar_view_1_Template_bs_days_calendar_view_onNavigate_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r10); const ctx_r9 = ɵngcc0.ɵɵnextContext(3); return ctx_r9.navigateTo($event); })("onViewMode", function BsDaterangepickerContainerComponent_div_0_div_4_bs_days_calendar_view_1_Template_bs_days_calendar_view_onViewMode_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r10); const ctx_r11 = ɵngcc0.ɵɵnextContext(3); return ctx_r11.setViewMode($event); })("onHover", function BsDaterangepickerContainerComponent_div_0_div_4_bs_days_calendar_view_1_Template_bs_days_calendar_view_onHover_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r10); const ctx_r12 = ɵngcc0.ɵɵnextContext(3); return ctx_r12.dayHoverHandler($event); })("onHoverWeek", function BsDaterangepickerContainerComponent_div_0_div_4_bs_days_calendar_view_1_Template_bs_days_calendar_view_onHoverWeek_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r10); const ctx_r13 = ɵngcc0.ɵɵnextContext(3); return ctx_r13.weekHoverHandler($event); })("onSelect", function BsDaterangepickerContainerComponent_div_0_div_4_bs_days_calendar_view_1_Template_bs_days_calendar_view_onSelect_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r10); const ctx_r14 = ɵngcc0.ɵɵnextContext(3); return ctx_r14.daySelectHandler($event); });
|
352 | ɵngcc0.ɵɵpipe(1, "async");
|
353 | ɵngcc0.ɵɵelementEnd();
|
354 | } if (rf & 2) {
|
355 | const calendar_r8 = ctx.$implicit;
|
356 | const ctx_r7 = ɵngcc0.ɵɵnextContext(3);
|
357 | ɵngcc0.ɵɵclassProp("bs-datepicker-multiple", ctx_r7.multipleCalendars);
|
358 | ɵngcc0.ɵɵproperty("calendar", calendar_r8)("options", ɵngcc0.ɵɵpipeBind1(1, 4, ctx_r7.options$));
|
359 | } }
|
360 | function BsDaterangepickerContainerComponent_div_0_div_4_Template(rf, ctx) { if (rf & 1) {
|
361 | ɵngcc0.ɵɵelementStart(0, "div", 7);
|
362 | ɵngcc0.ɵɵtemplate(1, BsDaterangepickerContainerComponent_div_0_div_4_bs_days_calendar_view_1_Template, 2, 6, "bs-days-calendar-view", 8);
|
363 | ɵngcc0.ɵɵpipe(2, "async");
|
364 | ɵngcc0.ɵɵelementEnd();
|
365 | } if (rf & 2) {
|
366 | const ctx_r1 = ɵngcc0.ɵɵnextContext(2);
|
367 | ɵngcc0.ɵɵadvance(1);
|
368 | ɵngcc0.ɵɵproperty("ngForOf", ɵngcc0.ɵɵpipeBind1(2, 1, ctx_r1.daysCalendar$));
|
369 | } }
|
370 | function BsDaterangepickerContainerComponent_div_0_div_5_bs_month_calendar_view_1_Template(rf, ctx) { if (rf & 1) {
|
371 | const _r18 = ɵngcc0.ɵɵgetCurrentView();
|
372 | ɵngcc0.ɵɵelementStart(0, "bs-month-calendar-view", 11);
|
373 | ɵngcc0.ɵɵlistener("onNavigate", function BsDaterangepickerContainerComponent_div_0_div_5_bs_month_calendar_view_1_Template_bs_month_calendar_view_onNavigate_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r18); const ctx_r17 = ɵngcc0.ɵɵnextContext(3); return ctx_r17.navigateTo($event); })("onViewMode", function BsDaterangepickerContainerComponent_div_0_div_5_bs_month_calendar_view_1_Template_bs_month_calendar_view_onViewMode_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r18); const ctx_r19 = ɵngcc0.ɵɵnextContext(3); return ctx_r19.setViewMode($event); })("onHover", function BsDaterangepickerContainerComponent_div_0_div_5_bs_month_calendar_view_1_Template_bs_month_calendar_view_onHover_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r18); const ctx_r20 = ɵngcc0.ɵɵnextContext(3); return ctx_r20.monthHoverHandler($event); })("onSelect", function BsDaterangepickerContainerComponent_div_0_div_5_bs_month_calendar_view_1_Template_bs_month_calendar_view_onSelect_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r18); const ctx_r21 = ɵngcc0.ɵɵnextContext(3); return ctx_r21.monthSelectHandler($event); });
|
374 | ɵngcc0.ɵɵelementEnd();
|
375 | } if (rf & 2) {
|
376 | const calendar_r16 = ctx.$implicit;
|
377 | const ctx_r15 = ɵngcc0.ɵɵnextContext(3);
|
378 | ɵngcc0.ɵɵclassProp("bs-datepicker-multiple", ctx_r15.multipleCalendars);
|
379 | ɵngcc0.ɵɵproperty("calendar", calendar_r16);
|
380 | } }
|
381 | function BsDaterangepickerContainerComponent_div_0_div_5_Template(rf, ctx) { if (rf & 1) {
|
382 | ɵngcc0.ɵɵelementStart(0, "div", 7);
|
383 | ɵngcc0.ɵɵtemplate(1, BsDaterangepickerContainerComponent_div_0_div_5_bs_month_calendar_view_1_Template, 1, 3, "bs-month-calendar-view", 10);
|
384 | ɵngcc0.ɵɵpipe(2, "async");
|
385 | ɵngcc0.ɵɵelementEnd();
|
386 | } if (rf & 2) {
|
387 | const ctx_r2 = ɵngcc0.ɵɵnextContext(2);
|
388 | ɵngcc0.ɵɵadvance(1);
|
389 | ɵngcc0.ɵɵproperty("ngForOf", ɵngcc0.ɵɵpipeBind1(2, 1, ctx_r2.monthsCalendar));
|
390 | } }
|
391 | function BsDaterangepickerContainerComponent_div_0_div_6_bs_years_calendar_view_1_Template(rf, ctx) { if (rf & 1) {
|
392 | const _r25 = ɵngcc0.ɵɵgetCurrentView();
|
393 | ɵngcc0.ɵɵelementStart(0, "bs-years-calendar-view", 11);
|
394 | ɵngcc0.ɵɵlistener("onNavigate", function BsDaterangepickerContainerComponent_div_0_div_6_bs_years_calendar_view_1_Template_bs_years_calendar_view_onNavigate_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r25); const ctx_r24 = ɵngcc0.ɵɵnextContext(3); return ctx_r24.navigateTo($event); })("onViewMode", function BsDaterangepickerContainerComponent_div_0_div_6_bs_years_calendar_view_1_Template_bs_years_calendar_view_onViewMode_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r25); const ctx_r26 = ɵngcc0.ɵɵnextContext(3); return ctx_r26.setViewMode($event); })("onHover", function BsDaterangepickerContainerComponent_div_0_div_6_bs_years_calendar_view_1_Template_bs_years_calendar_view_onHover_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r25); const ctx_r27 = ɵngcc0.ɵɵnextContext(3); return ctx_r27.yearHoverHandler($event); })("onSelect", function BsDaterangepickerContainerComponent_div_0_div_6_bs_years_calendar_view_1_Template_bs_years_calendar_view_onSelect_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r25); const ctx_r28 = ɵngcc0.ɵɵnextContext(3); return ctx_r28.yearSelectHandler($event); });
|
395 | ɵngcc0.ɵɵelementEnd();
|
396 | } if (rf & 2) {
|
397 | const calendar_r23 = ctx.$implicit;
|
398 | const ctx_r22 = ɵngcc0.ɵɵnextContext(3);
|
399 | ɵngcc0.ɵɵclassProp("bs-datepicker-multiple", ctx_r22.multipleCalendars);
|
400 | ɵngcc0.ɵɵproperty("calendar", calendar_r23);
|
401 | } }
|
402 | function BsDaterangepickerContainerComponent_div_0_div_6_Template(rf, ctx) { if (rf & 1) {
|
403 | ɵngcc0.ɵɵelementStart(0, "div", 7);
|
404 | ɵngcc0.ɵɵtemplate(1, BsDaterangepickerContainerComponent_div_0_div_6_bs_years_calendar_view_1_Template, 1, 3, "bs-years-calendar-view", 10);
|
405 | ɵngcc0.ɵɵpipe(2, "async");
|
406 | ɵngcc0.ɵɵelementEnd();
|
407 | } if (rf & 2) {
|
408 | const ctx_r3 = ɵngcc0.ɵɵnextContext(2);
|
409 | ɵngcc0.ɵɵadvance(1);
|
410 | ɵngcc0.ɵɵproperty("ngForOf", ɵngcc0.ɵɵpipeBind1(2, 1, ctx_r3.yearsCalendar));
|
411 | } }
|
412 | function BsDaterangepickerContainerComponent_div_0_div_7_Template(rf, ctx) { if (rf & 1) {
|
413 | ɵngcc0.ɵɵelementStart(0, "div", 12);
|
414 | ɵngcc0.ɵɵelementStart(1, "button", 13);
|
415 | ɵngcc0.ɵɵtext(2, "Apply");
|
416 | ɵngcc0.ɵɵelementEnd();
|
417 | ɵngcc0.ɵɵelementStart(3, "button", 14);
|
418 | ɵngcc0.ɵɵtext(4, "Cancel");
|
419 | ɵngcc0.ɵɵelementEnd();
|
420 | ɵngcc0.ɵɵelementEnd();
|
421 | } }
|
422 | function BsDaterangepickerContainerComponent_div_0_div_8_div_1_Template(rf, ctx) { if (rf & 1) {
|
423 | const _r32 = ɵngcc0.ɵɵgetCurrentView();
|
424 | ɵngcc0.ɵɵelementStart(0, "div", 17);
|
425 | ɵngcc0.ɵɵelementStart(1, "button", 18);
|
426 | ɵngcc0.ɵɵlistener("click", function BsDaterangepickerContainerComponent_div_0_div_8_div_1_Template_button_click_1_listener() { ɵngcc0.ɵɵrestoreView(_r32); const ctx_r31 = ɵngcc0.ɵɵnextContext(3); return ctx_r31.setToday(); });
|
427 | ɵngcc0.ɵɵtext(2);
|
428 | ɵngcc0.ɵɵelementEnd();
|
429 | ɵngcc0.ɵɵelementEnd();
|
430 | } if (rf & 2) {
|
431 | const ctx_r29 = ɵngcc0.ɵɵnextContext(3);
|
432 | ɵngcc0.ɵɵclassProp("today-left", ctx_r29.todayPos === "left")("today-right", ctx_r29.todayPos === "right")("today-center", ctx_r29.todayPos === "center");
|
433 | ɵngcc0.ɵɵadvance(2);
|
434 | ɵngcc0.ɵɵtextInterpolate(ctx_r29.todayBtnLbl);
|
435 | } }
|
436 | function BsDaterangepickerContainerComponent_div_0_div_8_div_2_Template(rf, ctx) { if (rf & 1) {
|
437 | const _r34 = ɵngcc0.ɵɵgetCurrentView();
|
438 | ɵngcc0.ɵɵelementStart(0, "div", 19);
|
439 | ɵngcc0.ɵɵelementStart(1, "button", 18);
|
440 | ɵngcc0.ɵɵlistener("click", function BsDaterangepickerContainerComponent_div_0_div_8_div_2_Template_button_click_1_listener() { ɵngcc0.ɵɵrestoreView(_r34); const ctx_r33 = ɵngcc0.ɵɵnextContext(3); return ctx_r33.clearDate(); });
|
441 | ɵngcc0.ɵɵtext(2);
|
442 | ɵngcc0.ɵɵelementEnd();
|
443 | ɵngcc0.ɵɵelementEnd();
|
444 | } if (rf & 2) {
|
445 | const ctx_r30 = ɵngcc0.ɵɵnextContext(3);
|
446 | ɵngcc0.ɵɵclassProp("clear-left", ctx_r30.clearPos === "left")("clear-right", ctx_r30.clearPos === "right")("clear-center", ctx_r30.clearPos === "center");
|
447 | ɵngcc0.ɵɵadvance(2);
|
448 | ɵngcc0.ɵɵtextInterpolate(ctx_r30.clearBtnLbl);
|
449 | } }
|
450 | function BsDaterangepickerContainerComponent_div_0_div_8_Template(rf, ctx) { if (rf & 1) {
|
451 | ɵngcc0.ɵɵelementStart(0, "div", 12);
|
452 | ɵngcc0.ɵɵtemplate(1, BsDaterangepickerContainerComponent_div_0_div_8_div_1_Template, 3, 7, "div", 15);
|
453 | ɵngcc0.ɵɵtemplate(2, BsDaterangepickerContainerComponent_div_0_div_8_div_2_Template, 3, 7, "div", 16);
|
454 | ɵngcc0.ɵɵelementEnd();
|
455 | } if (rf & 2) {
|
456 | const ctx_r5 = ɵngcc0.ɵɵnextContext(2);
|
457 | ɵngcc0.ɵɵadvance(1);
|
458 | ɵngcc0.ɵɵproperty("ngIf", ctx_r5.showTodayBtn);
|
459 | ɵngcc0.ɵɵadvance(1);
|
460 | ɵngcc0.ɵɵproperty("ngIf", ctx_r5.showClearBtn);
|
461 | } }
|
462 | function BsDaterangepickerContainerComponent_div_0_div_9_Template(rf, ctx) { if (rf & 1) {
|
463 | const _r36 = ɵngcc0.ɵɵgetCurrentView();
|
464 | ɵngcc0.ɵɵelementStart(0, "div", 20);
|
465 | ɵngcc0.ɵɵelementStart(1, "bs-custom-date-view", 21);
|
466 | ɵngcc0.ɵɵlistener("onSelect", function BsDaterangepickerContainerComponent_div_0_div_9_Template_bs_custom_date_view_onSelect_1_listener($event) { ɵngcc0.ɵɵrestoreView(_r36); const ctx_r35 = ɵngcc0.ɵɵnextContext(2); return ctx_r35.setRangeOnCalendar($event); });
|
467 | ɵngcc0.ɵɵelementEnd();
|
468 | ɵngcc0.ɵɵelementEnd();
|
469 | } if (rf & 2) {
|
470 | const ctx_r6 = ɵngcc0.ɵɵnextContext(2);
|
471 | ɵngcc0.ɵɵadvance(1);
|
472 | ɵngcc0.ɵɵproperty("selectedRange", ctx_r6.chosenRange)("ranges", ctx_r6.customRanges)("customRangeLabel", ctx_r6.customRangeBtnLbl);
|
473 | } }
|
474 | function BsDaterangepickerContainerComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
475 | const _r38 = ɵngcc0.ɵɵgetCurrentView();
|
476 | ɵngcc0.ɵɵelementStart(0, "div", 1);
|
477 | ɵngcc0.ɵɵelementStart(1, "div", 2);
|
478 | ɵngcc0.ɵɵlistener("@datepickerAnimation.done", function BsDaterangepickerContainerComponent_div_0_Template_div_animation_datepickerAnimation_done_1_listener() { ɵngcc0.ɵɵrestoreView(_r38); const ctx_r37 = ɵngcc0.ɵɵnextContext(); return ctx_r37.positionServiceEnable(); });
|
479 | ɵngcc0.ɵɵelementStart(2, "div", 3);
|
480 | ɵngcc0.ɵɵpipe(3, "async");
|
481 | ɵngcc0.ɵɵtemplate(4, BsDaterangepickerContainerComponent_div_0_div_4_Template, 3, 3, "div", 4);
|
482 | ɵngcc0.ɵɵtemplate(5, BsDaterangepickerContainerComponent_div_0_div_5_Template, 3, 3, "div", 4);
|
483 | ɵngcc0.ɵɵtemplate(6, BsDaterangepickerContainerComponent_div_0_div_6_Template, 3, 3, "div", 4);
|
484 | ɵngcc0.ɵɵelementEnd();
|
485 | ɵngcc0.ɵɵtemplate(7, BsDaterangepickerContainerComponent_div_0_div_7_Template, 5, 0, "div", 5);
|
486 | ɵngcc0.ɵɵtemplate(8, BsDaterangepickerContainerComponent_div_0_div_8_Template, 3, 2, "div", 5);
|
487 | ɵngcc0.ɵɵelementEnd();
|
488 | ɵngcc0.ɵɵtemplate(9, BsDaterangepickerContainerComponent_div_0_div_9_Template, 2, 3, "div", 6);
|
489 | ɵngcc0.ɵɵelementEnd();
|
490 | } if (rf & 2) {
|
491 | const ctx_r0 = ɵngcc0.ɵɵnextContext();
|
492 | ɵngcc0.ɵɵproperty("ngClass", ctx_r0.containerClass);
|
493 | ɵngcc0.ɵɵadvance(1);
|
494 | ɵngcc0.ɵɵproperty("@datepickerAnimation", ctx_r0.animationState);
|
495 | ɵngcc0.ɵɵadvance(1);
|
496 | ɵngcc0.ɵɵproperty("ngSwitch", ɵngcc0.ɵɵpipeBind1(3, 9, ctx_r0.viewMode));
|
497 | ɵngcc0.ɵɵadvance(2);
|
498 | ɵngcc0.ɵɵproperty("ngSwitchCase", "day");
|
499 | ɵngcc0.ɵɵadvance(1);
|
500 | ɵngcc0.ɵɵproperty("ngSwitchCase", "month");
|
501 | ɵngcc0.ɵɵadvance(1);
|
502 | ɵngcc0.ɵɵproperty("ngSwitchCase", "year");
|
503 | ɵngcc0.ɵɵadvance(1);
|
504 | ɵngcc0.ɵɵproperty("ngIf", false);
|
505 | ɵngcc0.ɵɵadvance(1);
|
506 | ɵngcc0.ɵɵproperty("ngIf", ctx_r0.showTodayBtn || ctx_r0.showClearBtn);
|
507 | ɵngcc0.ɵɵadvance(1);
|
508 | ɵngcc0.ɵɵproperty("ngIf", ctx_r0.customRanges && ctx_r0.customRanges.length > 0);
|
509 | } }
|
510 | function BsDaterangepickerInlineContainerComponent_div_0_div_4_bs_days_calendar_view_1_Template(rf, ctx) { if (rf & 1) {
|
511 | const _r10 = ɵngcc0.ɵɵgetCurrentView();
|
512 | ɵngcc0.ɵɵelementStart(0, "bs-days-calendar-view", 9);
|
513 | ɵngcc0.ɵɵlistener("onNavigate", function BsDaterangepickerInlineContainerComponent_div_0_div_4_bs_days_calendar_view_1_Template_bs_days_calendar_view_onNavigate_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r10); const ctx_r9 = ɵngcc0.ɵɵnextContext(3); return ctx_r9.navigateTo($event); })("onViewMode", function BsDaterangepickerInlineContainerComponent_div_0_div_4_bs_days_calendar_view_1_Template_bs_days_calendar_view_onViewMode_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r10); const ctx_r11 = ɵngcc0.ɵɵnextContext(3); return ctx_r11.setViewMode($event); })("onHover", function BsDaterangepickerInlineContainerComponent_div_0_div_4_bs_days_calendar_view_1_Template_bs_days_calendar_view_onHover_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r10); const ctx_r12 = ɵngcc0.ɵɵnextContext(3); return ctx_r12.dayHoverHandler($event); })("onHoverWeek", function BsDaterangepickerInlineContainerComponent_div_0_div_4_bs_days_calendar_view_1_Template_bs_days_calendar_view_onHoverWeek_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r10); const ctx_r13 = ɵngcc0.ɵɵnextContext(3); return ctx_r13.weekHoverHandler($event); })("onSelect", function BsDaterangepickerInlineContainerComponent_div_0_div_4_bs_days_calendar_view_1_Template_bs_days_calendar_view_onSelect_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r10); const ctx_r14 = ɵngcc0.ɵɵnextContext(3); return ctx_r14.daySelectHandler($event); });
|
514 | ɵngcc0.ɵɵpipe(1, "async");
|
515 | ɵngcc0.ɵɵelementEnd();
|
516 | } if (rf & 2) {
|
517 | const calendar_r8 = ctx.$implicit;
|
518 | const ctx_r7 = ɵngcc0.ɵɵnextContext(3);
|
519 | ɵngcc0.ɵɵclassProp("bs-datepicker-multiple", ctx_r7.multipleCalendars);
|
520 | ɵngcc0.ɵɵproperty("calendar", calendar_r8)("options", ɵngcc0.ɵɵpipeBind1(1, 4, ctx_r7.options$));
|
521 | } }
|
522 | function BsDaterangepickerInlineContainerComponent_div_0_div_4_Template(rf, ctx) { if (rf & 1) {
|
523 | ɵngcc0.ɵɵelementStart(0, "div", 7);
|
524 | ɵngcc0.ɵɵtemplate(1, BsDaterangepickerInlineContainerComponent_div_0_div_4_bs_days_calendar_view_1_Template, 2, 6, "bs-days-calendar-view", 8);
|
525 | ɵngcc0.ɵɵpipe(2, "async");
|
526 | ɵngcc0.ɵɵelementEnd();
|
527 | } if (rf & 2) {
|
528 | const ctx_r1 = ɵngcc0.ɵɵnextContext(2);
|
529 | ɵngcc0.ɵɵadvance(1);
|
530 | ɵngcc0.ɵɵproperty("ngForOf", ɵngcc0.ɵɵpipeBind1(2, 1, ctx_r1.daysCalendar$));
|
531 | } }
|
532 | function BsDaterangepickerInlineContainerComponent_div_0_div_5_bs_month_calendar_view_1_Template(rf, ctx) { if (rf & 1) {
|
533 | const _r18 = ɵngcc0.ɵɵgetCurrentView();
|
534 | ɵngcc0.ɵɵelementStart(0, "bs-month-calendar-view", 11);
|
535 | ɵngcc0.ɵɵlistener("onNavigate", function BsDaterangepickerInlineContainerComponent_div_0_div_5_bs_month_calendar_view_1_Template_bs_month_calendar_view_onNavigate_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r18); const ctx_r17 = ɵngcc0.ɵɵnextContext(3); return ctx_r17.navigateTo($event); })("onViewMode", function BsDaterangepickerInlineContainerComponent_div_0_div_5_bs_month_calendar_view_1_Template_bs_month_calendar_view_onViewMode_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r18); const ctx_r19 = ɵngcc0.ɵɵnextContext(3); return ctx_r19.setViewMode($event); })("onHover", function BsDaterangepickerInlineContainerComponent_div_0_div_5_bs_month_calendar_view_1_Template_bs_month_calendar_view_onHover_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r18); const ctx_r20 = ɵngcc0.ɵɵnextContext(3); return ctx_r20.monthHoverHandler($event); })("onSelect", function BsDaterangepickerInlineContainerComponent_div_0_div_5_bs_month_calendar_view_1_Template_bs_month_calendar_view_onSelect_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r18); const ctx_r21 = ɵngcc0.ɵɵnextContext(3); return ctx_r21.monthSelectHandler($event); });
|
536 | ɵngcc0.ɵɵelementEnd();
|
537 | } if (rf & 2) {
|
538 | const calendar_r16 = ctx.$implicit;
|
539 | const ctx_r15 = ɵngcc0.ɵɵnextContext(3);
|
540 | ɵngcc0.ɵɵclassProp("bs-datepicker-multiple", ctx_r15.multipleCalendars);
|
541 | ɵngcc0.ɵɵproperty("calendar", calendar_r16);
|
542 | } }
|
543 | function BsDaterangepickerInlineContainerComponent_div_0_div_5_Template(rf, ctx) { if (rf & 1) {
|
544 | ɵngcc0.ɵɵelementStart(0, "div", 7);
|
545 | ɵngcc0.ɵɵtemplate(1, BsDaterangepickerInlineContainerComponent_div_0_div_5_bs_month_calendar_view_1_Template, 1, 3, "bs-month-calendar-view", 10);
|
546 | ɵngcc0.ɵɵpipe(2, "async");
|
547 | ɵngcc0.ɵɵelementEnd();
|
548 | } if (rf & 2) {
|
549 | const ctx_r2 = ɵngcc0.ɵɵnextContext(2);
|
550 | ɵngcc0.ɵɵadvance(1);
|
551 | ɵngcc0.ɵɵproperty("ngForOf", ɵngcc0.ɵɵpipeBind1(2, 1, ctx_r2.monthsCalendar));
|
552 | } }
|
553 | function BsDaterangepickerInlineContainerComponent_div_0_div_6_bs_years_calendar_view_1_Template(rf, ctx) { if (rf & 1) {
|
554 | const _r25 = ɵngcc0.ɵɵgetCurrentView();
|
555 | ɵngcc0.ɵɵelementStart(0, "bs-years-calendar-view", 11);
|
556 | ɵngcc0.ɵɵlistener("onNavigate", function BsDaterangepickerInlineContainerComponent_div_0_div_6_bs_years_calendar_view_1_Template_bs_years_calendar_view_onNavigate_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r25); const ctx_r24 = ɵngcc0.ɵɵnextContext(3); return ctx_r24.navigateTo($event); })("onViewMode", function BsDaterangepickerInlineContainerComponent_div_0_div_6_bs_years_calendar_view_1_Template_bs_years_calendar_view_onViewMode_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r25); const ctx_r26 = ɵngcc0.ɵɵnextContext(3); return ctx_r26.setViewMode($event); })("onHover", function BsDaterangepickerInlineContainerComponent_div_0_div_6_bs_years_calendar_view_1_Template_bs_years_calendar_view_onHover_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r25); const ctx_r27 = ɵngcc0.ɵɵnextContext(3); return ctx_r27.yearHoverHandler($event); })("onSelect", function BsDaterangepickerInlineContainerComponent_div_0_div_6_bs_years_calendar_view_1_Template_bs_years_calendar_view_onSelect_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r25); const ctx_r28 = ɵngcc0.ɵɵnextContext(3); return ctx_r28.yearSelectHandler($event); });
|
557 | ɵngcc0.ɵɵelementEnd();
|
558 | } if (rf & 2) {
|
559 | const calendar_r23 = ctx.$implicit;
|
560 | const ctx_r22 = ɵngcc0.ɵɵnextContext(3);
|
561 | ɵngcc0.ɵɵclassProp("bs-datepicker-multiple", ctx_r22.multipleCalendars);
|
562 | ɵngcc0.ɵɵproperty("calendar", calendar_r23);
|
563 | } }
|
564 | function BsDaterangepickerInlineContainerComponent_div_0_div_6_Template(rf, ctx) { if (rf & 1) {
|
565 | ɵngcc0.ɵɵelementStart(0, "div", 7);
|
566 | ɵngcc0.ɵɵtemplate(1, BsDaterangepickerInlineContainerComponent_div_0_div_6_bs_years_calendar_view_1_Template, 1, 3, "bs-years-calendar-view", 10);
|
567 | ɵngcc0.ɵɵpipe(2, "async");
|
568 | ɵngcc0.ɵɵelementEnd();
|
569 | } if (rf & 2) {
|
570 | const ctx_r3 = ɵngcc0.ɵɵnextContext(2);
|
571 | ɵngcc0.ɵɵadvance(1);
|
572 | ɵngcc0.ɵɵproperty("ngForOf", ɵngcc0.ɵɵpipeBind1(2, 1, ctx_r3.yearsCalendar));
|
573 | } }
|
574 | function BsDaterangepickerInlineContainerComponent_div_0_div_7_Template(rf, ctx) { if (rf & 1) {
|
575 | ɵngcc0.ɵɵelementStart(0, "div", 12);
|
576 | ɵngcc0.ɵɵelementStart(1, "button", 13);
|
577 | ɵngcc0.ɵɵtext(2, "Apply");
|
578 | ɵngcc0.ɵɵelementEnd();
|
579 | ɵngcc0.ɵɵelementStart(3, "button", 14);
|
580 | ɵngcc0.ɵɵtext(4, "Cancel");
|
581 | ɵngcc0.ɵɵelementEnd();
|
582 | ɵngcc0.ɵɵelementEnd();
|
583 | } }
|
584 | function BsDaterangepickerInlineContainerComponent_div_0_div_8_div_1_Template(rf, ctx) { if (rf & 1) {
|
585 | const _r32 = ɵngcc0.ɵɵgetCurrentView();
|
586 | ɵngcc0.ɵɵelementStart(0, "div", 17);
|
587 | ɵngcc0.ɵɵelementStart(1, "button", 18);
|
588 | ɵngcc0.ɵɵlistener("click", function BsDaterangepickerInlineContainerComponent_div_0_div_8_div_1_Template_button_click_1_listener() { ɵngcc0.ɵɵrestoreView(_r32); const ctx_r31 = ɵngcc0.ɵɵnextContext(3); return ctx_r31.setToday(); });
|
589 | ɵngcc0.ɵɵtext(2);
|
590 | ɵngcc0.ɵɵelementEnd();
|
591 | ɵngcc0.ɵɵelementEnd();
|
592 | } if (rf & 2) {
|
593 | const ctx_r29 = ɵngcc0.ɵɵnextContext(3);
|
594 | ɵngcc0.ɵɵclassProp("today-left", ctx_r29.todayPos === "left")("today-right", ctx_r29.todayPos === "right")("today-center", ctx_r29.todayPos === "center");
|
595 | ɵngcc0.ɵɵadvance(2);
|
596 | ɵngcc0.ɵɵtextInterpolate(ctx_r29.todayBtnLbl);
|
597 | } }
|
598 | function BsDaterangepickerInlineContainerComponent_div_0_div_8_div_2_Template(rf, ctx) { if (rf & 1) {
|
599 | const _r34 = ɵngcc0.ɵɵgetCurrentView();
|
600 | ɵngcc0.ɵɵelementStart(0, "div", 19);
|
601 | ɵngcc0.ɵɵelementStart(1, "button", 18);
|
602 | ɵngcc0.ɵɵlistener("click", function BsDaterangepickerInlineContainerComponent_div_0_div_8_div_2_Template_button_click_1_listener() { ɵngcc0.ɵɵrestoreView(_r34); const ctx_r33 = ɵngcc0.ɵɵnextContext(3); return ctx_r33.clearDate(); });
|
603 | ɵngcc0.ɵɵtext(2);
|
604 | ɵngcc0.ɵɵelementEnd();
|
605 | ɵngcc0.ɵɵelementEnd();
|
606 | } if (rf & 2) {
|
607 | const ctx_r30 = ɵngcc0.ɵɵnextContext(3);
|
608 | ɵngcc0.ɵɵclassProp("clear-left", ctx_r30.clearPos === "left")("clear-right", ctx_r30.clearPos === "right")("clear-center", ctx_r30.clearPos === "center");
|
609 | ɵngcc0.ɵɵadvance(2);
|
610 | ɵngcc0.ɵɵtextInterpolate(ctx_r30.clearBtnLbl);
|
611 | } }
|
612 | function BsDaterangepickerInlineContainerComponent_div_0_div_8_Template(rf, ctx) { if (rf & 1) {
|
613 | ɵngcc0.ɵɵelementStart(0, "div", 12);
|
614 | ɵngcc0.ɵɵtemplate(1, BsDaterangepickerInlineContainerComponent_div_0_div_8_div_1_Template, 3, 7, "div", 15);
|
615 | ɵngcc0.ɵɵtemplate(2, BsDaterangepickerInlineContainerComponent_div_0_div_8_div_2_Template, 3, 7, "div", 16);
|
616 | ɵngcc0.ɵɵelementEnd();
|
617 | } if (rf & 2) {
|
618 | const ctx_r5 = ɵngcc0.ɵɵnextContext(2);
|
619 | ɵngcc0.ɵɵadvance(1);
|
620 | ɵngcc0.ɵɵproperty("ngIf", ctx_r5.showTodayBtn);
|
621 | ɵngcc0.ɵɵadvance(1);
|
622 | ɵngcc0.ɵɵproperty("ngIf", ctx_r5.showClearBtn);
|
623 | } }
|
624 | function BsDaterangepickerInlineContainerComponent_div_0_div_9_Template(rf, ctx) { if (rf & 1) {
|
625 | const _r36 = ɵngcc0.ɵɵgetCurrentView();
|
626 | ɵngcc0.ɵɵelementStart(0, "div", 20);
|
627 | ɵngcc0.ɵɵelementStart(1, "bs-custom-date-view", 21);
|
628 | ɵngcc0.ɵɵlistener("onSelect", function BsDaterangepickerInlineContainerComponent_div_0_div_9_Template_bs_custom_date_view_onSelect_1_listener($event) { ɵngcc0.ɵɵrestoreView(_r36); const ctx_r35 = ɵngcc0.ɵɵnextContext(2); return ctx_r35.setRangeOnCalendar($event); });
|
629 | ɵngcc0.ɵɵelementEnd();
|
630 | ɵngcc0.ɵɵelementEnd();
|
631 | } if (rf & 2) {
|
632 | const ctx_r6 = ɵngcc0.ɵɵnextContext(2);
|
633 | ɵngcc0.ɵɵadvance(1);
|
634 | ɵngcc0.ɵɵproperty("selectedRange", ctx_r6.chosenRange)("ranges", ctx_r6.customRanges)("customRangeLabel", ctx_r6.customRangeBtnLbl);
|
635 | } }
|
636 | function BsDaterangepickerInlineContainerComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
637 | const _r38 = ɵngcc0.ɵɵgetCurrentView();
|
638 | ɵngcc0.ɵɵelementStart(0, "div", 1);
|
639 | ɵngcc0.ɵɵelementStart(1, "div", 2);
|
640 | ɵngcc0.ɵɵlistener("@datepickerAnimation.done", function BsDaterangepickerInlineContainerComponent_div_0_Template_div_animation_datepickerAnimation_done_1_listener() { ɵngcc0.ɵɵrestoreView(_r38); const ctx_r37 = ɵngcc0.ɵɵnextContext(); return ctx_r37.positionServiceEnable(); });
|
641 | ɵngcc0.ɵɵelementStart(2, "div", 3);
|
642 | ɵngcc0.ɵɵpipe(3, "async");
|
643 | ɵngcc0.ɵɵtemplate(4, BsDaterangepickerInlineContainerComponent_div_0_div_4_Template, 3, 3, "div", 4);
|
644 | ɵngcc0.ɵɵtemplate(5, BsDaterangepickerInlineContainerComponent_div_0_div_5_Template, 3, 3, "div", 4);
|
645 | ɵngcc0.ɵɵtemplate(6, BsDaterangepickerInlineContainerComponent_div_0_div_6_Template, 3, 3, "div", 4);
|
646 | ɵngcc0.ɵɵelementEnd();
|
647 | ɵngcc0.ɵɵtemplate(7, BsDaterangepickerInlineContainerComponent_div_0_div_7_Template, 5, 0, "div", 5);
|
648 | ɵngcc0.ɵɵtemplate(8, BsDaterangepickerInlineContainerComponent_div_0_div_8_Template, 3, 2, "div", 5);
|
649 | ɵngcc0.ɵɵelementEnd();
|
650 | ɵngcc0.ɵɵtemplate(9, BsDaterangepickerInlineContainerComponent_div_0_div_9_Template, 2, 3, "div", 6);
|
651 | ɵngcc0.ɵɵelementEnd();
|
652 | } if (rf & 2) {
|
653 | const ctx_r0 = ɵngcc0.ɵɵnextContext();
|
654 | ɵngcc0.ɵɵproperty("ngClass", ctx_r0.containerClass);
|
655 | ɵngcc0.ɵɵadvance(1);
|
656 | ɵngcc0.ɵɵproperty("@datepickerAnimation", ctx_r0.animationState);
|
657 | ɵngcc0.ɵɵadvance(1);
|
658 | ɵngcc0.ɵɵproperty("ngSwitch", ɵngcc0.ɵɵpipeBind1(3, 9, ctx_r0.viewMode));
|
659 | ɵngcc0.ɵɵadvance(2);
|
660 | ɵngcc0.ɵɵproperty("ngSwitchCase", "day");
|
661 | ɵngcc0.ɵɵadvance(1);
|
662 | ɵngcc0.ɵɵproperty("ngSwitchCase", "month");
|
663 | ɵngcc0.ɵɵadvance(1);
|
664 | ɵngcc0.ɵɵproperty("ngSwitchCase", "year");
|
665 | ɵngcc0.ɵɵadvance(1);
|
666 | ɵngcc0.ɵɵproperty("ngIf", false);
|
667 | ɵngcc0.ɵɵadvance(1);
|
668 | ɵngcc0.ɵɵproperty("ngIf", ctx_r0.showTodayBtn || ctx_r0.showClearBtn);
|
669 | ɵngcc0.ɵɵadvance(1);
|
670 | ɵngcc0.ɵɵproperty("ngIf", ctx_r0.customRanges && ctx_r0.customRanges.length > 0);
|
671 | } }
|
672 | function DatePickerInnerComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
673 | ɵngcc0.ɵɵelementStart(0, "div", 1);
|
674 | ɵngcc0.ɵɵprojection(1);
|
675 | ɵngcc0.ɵɵelementEnd();
|
676 | } }
|
677 | const _c0 = ["*"];
|
678 | function DayPickerComponent_table_0_button_4_Template(rf, ctx) { if (rf & 1) {
|
679 | const _r9 = ɵngcc0.ɵɵgetCurrentView();
|
680 | ɵngcc0.ɵɵelementStart(0, "button", 8);
|
681 | ɵngcc0.ɵɵlistener("click", function DayPickerComponent_table_0_button_4_Template_button_click_0_listener() { ɵngcc0.ɵɵrestoreView(_r9); const ctx_r8 = ɵngcc0.ɵɵnextContext(2); return ctx_r8.datePicker.move(-1); });
|
682 | ɵngcc0.ɵɵtext(1, "\u2039");
|
683 | ɵngcc0.ɵɵelementEnd();
|
684 | } }
|
685 | function DayPickerComponent_table_0_button_5_Template(rf, ctx) { if (rf & 1) {
|
686 | const _r11 = ɵngcc0.ɵɵgetCurrentView();
|
687 | ɵngcc0.ɵɵelementStart(0, "button", 8);
|
688 | ɵngcc0.ɵɵlistener("click", function DayPickerComponent_table_0_button_5_Template_button_click_0_listener() { ɵngcc0.ɵɵrestoreView(_r11); const ctx_r10 = ɵngcc0.ɵɵnextContext(2); return ctx_r10.datePicker.move(-1); });
|
689 | ɵngcc0.ɵɵtext(1, "<");
|
690 | ɵngcc0.ɵɵelementEnd();
|
691 | } }
|
692 | function DayPickerComponent_table_0_button_11_Template(rf, ctx) { if (rf & 1) {
|
693 | const _r13 = ɵngcc0.ɵɵgetCurrentView();
|
694 | ɵngcc0.ɵɵelementStart(0, "button", 9);
|
695 | ɵngcc0.ɵɵlistener("click", function DayPickerComponent_table_0_button_11_Template_button_click_0_listener() { ɵngcc0.ɵɵrestoreView(_r13); const ctx_r12 = ɵngcc0.ɵɵnextContext(2); return ctx_r12.datePicker.move(1); });
|
696 | ɵngcc0.ɵɵtext(1, "\u203A");
|
697 | ɵngcc0.ɵɵelementEnd();
|
698 | } }
|
699 | function DayPickerComponent_table_0_button_12_Template(rf, ctx) { if (rf & 1) {
|
700 | const _r15 = ɵngcc0.ɵɵgetCurrentView();
|
701 | ɵngcc0.ɵɵelementStart(0, "button", 9);
|
702 | ɵngcc0.ɵɵlistener("click", function DayPickerComponent_table_0_button_12_Template_button_click_0_listener() { ɵngcc0.ɵɵrestoreView(_r15); const ctx_r14 = ɵngcc0.ɵɵnextContext(2); return ctx_r14.datePicker.move(1); });
|
703 | ɵngcc0.ɵɵtext(1, "> ");
|
704 | ɵngcc0.ɵɵelementEnd();
|
705 | } }
|
706 | function DayPickerComponent_table_0_th_14_Template(rf, ctx) { if (rf & 1) {
|
707 | ɵngcc0.ɵɵelement(0, "th");
|
708 | } }
|
709 | function DayPickerComponent_table_0_th_15_Template(rf, ctx) { if (rf & 1) {
|
710 | ɵngcc0.ɵɵelementStart(0, "th", 10);
|
711 | ɵngcc0.ɵɵelementStart(1, "small", 11);
|
712 | ɵngcc0.ɵɵelementStart(2, "b");
|
713 | ɵngcc0.ɵɵtext(3);
|
714 | ɵngcc0.ɵɵelementEnd();
|
715 | ɵngcc0.ɵɵelementEnd();
|
716 | ɵngcc0.ɵɵelementEnd();
|
717 | } if (rf & 2) {
|
718 | const labelz_r16 = ctx.$implicit;
|
719 | ɵngcc0.ɵɵadvance(3);
|
720 | ɵngcc0.ɵɵtextInterpolate(labelz_r16.abbr);
|
721 | } }
|
722 | function DayPickerComponent_table_0_ng_template_17_tr_0_td_1_Template(rf, ctx) { if (rf & 1) {
|
723 | ɵngcc0.ɵɵelementStart(0, "td", 10);
|
724 | ɵngcc0.ɵɵelementStart(1, "em");
|
725 | ɵngcc0.ɵɵtext(2);
|
726 | ɵngcc0.ɵɵelementEnd();
|
727 | ɵngcc0.ɵɵelementEnd();
|
728 | } if (rf & 2) {
|
729 | const index_r18 = ɵngcc0.ɵɵnextContext(2).index;
|
730 | const ctx_r20 = ɵngcc0.ɵɵnextContext(2);
|
731 | ɵngcc0.ɵɵadvance(2);
|
732 | ɵngcc0.ɵɵtextInterpolate(ctx_r20.weekNumbers[index_r18]);
|
733 | } }
|
734 | const _c1 = function (a0, a1, a2, a3, a4) { return { "btn-secondary": a0, "btn-info": a1, disabled: a2, active: a3, "btn-default": a4 }; };
|
735 | const _c2 = function (a0, a1) { return { "text-muted": a0, "text-info": a1 }; };
|
736 | function DayPickerComponent_table_0_ng_template_17_tr_0_td_2_button_1_Template(rf, ctx) { if (rf & 1) {
|
737 | const _r27 = ɵngcc0.ɵɵgetCurrentView();
|
738 | ɵngcc0.ɵɵelementStart(0, "button", 16);
|
739 | ɵngcc0.ɵɵlistener("click", function DayPickerComponent_table_0_ng_template_17_tr_0_td_2_button_1_Template_button_click_0_listener() { ɵngcc0.ɵɵrestoreView(_r27); const dtz_r23 = ɵngcc0.ɵɵnextContext().$implicit; const ctx_r25 = ɵngcc0.ɵɵnextContext(4); return ctx_r25.datePicker.select(dtz_r23.date); });
|
740 | ɵngcc0.ɵɵelementStart(1, "span", 17);
|
741 | ɵngcc0.ɵɵtext(2);
|
742 | ɵngcc0.ɵɵelementEnd();
|
743 | ɵngcc0.ɵɵelementEnd();
|
744 | } if (rf & 2) {
|
745 | const dtz_r23 = ɵngcc0.ɵɵnextContext().$implicit;
|
746 | const ctx_r24 = ɵngcc0.ɵɵnextContext(4);
|
747 | ɵngcc0.ɵɵclassMapInterpolate1("btn btn-sm ", dtz_r23.customClass, "");
|
748 | ɵngcc0.ɵɵproperty("ngClass", ɵngcc0.ɵɵpureFunction5(7, _c1, ctx_r24.isBs4 && !dtz_r23.selected && !ctx_r24.datePicker.isActive(dtz_r23), dtz_r23.selected, dtz_r23.disabled, !ctx_r24.isBs4 && ctx_r24.datePicker.isActive(dtz_r23), !ctx_r24.isBs4))("disabled", dtz_r23.disabled);
|
749 | ɵngcc0.ɵɵadvance(1);
|
750 | ɵngcc0.ɵɵproperty("ngClass", ɵngcc0.ɵɵpureFunction2(13, _c2, dtz_r23.secondary || dtz_r23.current, !ctx_r24.isBs4 && dtz_r23.current));
|
751 | ɵngcc0.ɵɵadvance(1);
|
752 | ɵngcc0.ɵɵtextInterpolate(dtz_r23.label);
|
753 | } }
|
754 | function DayPickerComponent_table_0_ng_template_17_tr_0_td_2_Template(rf, ctx) { if (rf & 1) {
|
755 | ɵngcc0.ɵɵelementStart(0, "td", 14);
|
756 | ɵngcc0.ɵɵtemplate(1, DayPickerComponent_table_0_ng_template_17_tr_0_td_2_button_1_Template, 3, 16, "button", 15);
|
757 | ɵngcc0.ɵɵelementEnd();
|
758 | } if (rf & 2) {
|
759 | const dtz_r23 = ctx.$implicit;
|
760 | const ctx_r21 = ɵngcc0.ɵɵnextContext(4);
|
761 | ɵngcc0.ɵɵproperty("id", dtz_r23.uid);
|
762 | ɵngcc0.ɵɵadvance(1);
|
763 | ɵngcc0.ɵɵproperty("ngIf", !(ctx_r21.datePicker.onlyCurrentMonth && dtz_r23.secondary));
|
764 | } }
|
765 | function DayPickerComponent_table_0_ng_template_17_tr_0_Template(rf, ctx) { if (rf & 1) {
|
766 | ɵngcc0.ɵɵelementStart(0, "tr");
|
767 | ɵngcc0.ɵɵtemplate(1, DayPickerComponent_table_0_ng_template_17_tr_0_td_1_Template, 3, 1, "td", 12);
|
768 | ɵngcc0.ɵɵtemplate(2, DayPickerComponent_table_0_ng_template_17_tr_0_td_2_Template, 2, 2, "td", 13);
|
769 | ɵngcc0.ɵɵelementEnd();
|
770 | } if (rf & 2) {
|
771 | const rowz_r17 = ɵngcc0.ɵɵnextContext().$implicit;
|
772 | const ctx_r19 = ɵngcc0.ɵɵnextContext(2);
|
773 | ɵngcc0.ɵɵadvance(1);
|
774 | ɵngcc0.ɵɵproperty("ngIf", ctx_r19.datePicker.showWeeks);
|
775 | ɵngcc0.ɵɵadvance(1);
|
776 | ɵngcc0.ɵɵproperty("ngForOf", rowz_r17);
|
777 | } }
|
778 | function DayPickerComponent_table_0_ng_template_17_Template(rf, ctx) { if (rf & 1) {
|
779 | ɵngcc0.ɵɵtemplate(0, DayPickerComponent_table_0_ng_template_17_tr_0_Template, 3, 2, "tr", 5);
|
780 | } if (rf & 2) {
|
781 | const rowz_r17 = ctx.$implicit;
|
782 | const ctx_r7 = ɵngcc0.ɵɵnextContext(2);
|
783 | ɵngcc0.ɵɵproperty("ngIf", !(ctx_r7.datePicker.onlyCurrentMonth && rowz_r17[0].secondary && rowz_r17[6].secondary));
|
784 | } }
|
785 | const _c3 = function (a0) { return { disabled: a0 }; };
|
786 | function DayPickerComponent_table_0_Template(rf, ctx) { if (rf & 1) {
|
787 | const _r31 = ɵngcc0.ɵɵgetCurrentView();
|
788 | ɵngcc0.ɵɵelementStart(0, "table", 1);
|
789 | ɵngcc0.ɵɵelementStart(1, "thead");
|
790 | ɵngcc0.ɵɵelementStart(2, "tr");
|
791 | ɵngcc0.ɵɵelementStart(3, "th");
|
792 | ɵngcc0.ɵɵtemplate(4, DayPickerComponent_table_0_button_4_Template, 2, 0, "button", 2);
|
793 | ɵngcc0.ɵɵtemplate(5, DayPickerComponent_table_0_button_5_Template, 2, 0, "button", 2);
|
794 | ɵngcc0.ɵɵelementEnd();
|
795 | ɵngcc0.ɵɵelementStart(6, "th");
|
796 | ɵngcc0.ɵɵelementStart(7, "button", 3);
|
797 | ɵngcc0.ɵɵlistener("click", function DayPickerComponent_table_0_Template_button_click_7_listener() { ɵngcc0.ɵɵrestoreView(_r31); const ctx_r30 = ɵngcc0.ɵɵnextContext(); return ctx_r30.datePicker.toggleMode(0); });
|
798 | ɵngcc0.ɵɵelementStart(8, "strong");
|
799 | ɵngcc0.ɵɵtext(9);
|
800 | ɵngcc0.ɵɵelementEnd();
|
801 | ɵngcc0.ɵɵelementEnd();
|
802 | ɵngcc0.ɵɵelementEnd();
|
803 | ɵngcc0.ɵɵelementStart(10, "th");
|
804 | ɵngcc0.ɵɵtemplate(11, DayPickerComponent_table_0_button_11_Template, 2, 0, "button", 4);
|
805 | ɵngcc0.ɵɵtemplate(12, DayPickerComponent_table_0_button_12_Template, 2, 0, "button", 4);
|
806 | ɵngcc0.ɵɵelementEnd();
|
807 | ɵngcc0.ɵɵelementEnd();
|
808 | ɵngcc0.ɵɵelementStart(13, "tr");
|
809 | ɵngcc0.ɵɵtemplate(14, DayPickerComponent_table_0_th_14_Template, 1, 0, "th", 5);
|
810 | ɵngcc0.ɵɵtemplate(15, DayPickerComponent_table_0_th_15_Template, 4, 1, "th", 6);
|
811 | ɵngcc0.ɵɵelementEnd();
|
812 | ɵngcc0.ɵɵelementEnd();
|
813 | ɵngcc0.ɵɵelementStart(16, "tbody");
|
814 | ɵngcc0.ɵɵtemplate(17, DayPickerComponent_table_0_ng_template_17_Template, 1, 1, "ng-template", 7);
|
815 | ɵngcc0.ɵɵelementEnd();
|
816 | ɵngcc0.ɵɵelementEnd();
|
817 | } if (rf & 2) {
|
818 | const ctx_r0 = ɵngcc0.ɵɵnextContext();
|
819 | ɵngcc0.ɵɵattribute("aria-labelledby", ctx_r0.datePicker.uniqueId + "-title");
|
820 | ɵngcc0.ɵɵadvance(4);
|
821 | ɵngcc0.ɵɵproperty("ngIf", !ctx_r0.isBs4);
|
822 | ɵngcc0.ɵɵadvance(1);
|
823 | ɵngcc0.ɵɵproperty("ngIf", ctx_r0.isBs4);
|
824 | ɵngcc0.ɵɵadvance(1);
|
825 | ɵngcc0.ɵɵattribute("colspan", 5 + (ctx_r0.datePicker.showWeeks ? 1 : 0));
|
826 | ɵngcc0.ɵɵadvance(1);
|
827 | ɵngcc0.ɵɵproperty("id", ctx_r0.datePicker.uniqueId + "-title")("disabled", ctx_r0.datePicker.datepickerMode === ctx_r0.datePicker.maxMode)("ngClass", ɵngcc0.ɵɵpureFunction1(13, _c3, ctx_r0.datePicker.datepickerMode === ctx_r0.datePicker.maxMode));
|
828 | ɵngcc0.ɵɵadvance(2);
|
829 | ɵngcc0.ɵɵtextInterpolate(ctx_r0.title);
|
830 | ɵngcc0.ɵɵadvance(2);
|
831 | ɵngcc0.ɵɵproperty("ngIf", !ctx_r0.isBs4);
|
832 | ɵngcc0.ɵɵadvance(1);
|
833 | ɵngcc0.ɵɵproperty("ngIf", ctx_r0.isBs4);
|
834 | ɵngcc0.ɵɵadvance(2);
|
835 | ɵngcc0.ɵɵproperty("ngIf", ctx_r0.datePicker.showWeeks);
|
836 | ɵngcc0.ɵɵadvance(1);
|
837 | ɵngcc0.ɵɵproperty("ngForOf", ctx_r0.labels);
|
838 | ɵngcc0.ɵɵadvance(2);
|
839 | ɵngcc0.ɵɵproperty("ngForOf", ctx_r0.rows);
|
840 | } }
|
841 | const _c4 = function (a0, a1, a2, a3) { return { "btn-link": a0, "btn-info": a1, disabled: a2, active: a3 }; };
|
842 | const _c5 = function (a0, a1) { return { "text-success": a0, "text-info": a1 }; };
|
843 | function MonthPickerComponent_table_0_tr_14_td_1_Template(rf, ctx) { if (rf & 1) {
|
844 | const _r6 = ɵngcc0.ɵɵgetCurrentView();
|
845 | ɵngcc0.ɵɵelementStart(0, "td", 7);
|
846 | ɵngcc0.ɵɵelementStart(1, "button", 8);
|
847 | ɵngcc0.ɵɵlistener("click", function MonthPickerComponent_table_0_tr_14_td_1_Template_button_click_1_listener() { ɵngcc0.ɵɵrestoreView(_r6); const dtz_r4 = ctx.$implicit; const ctx_r5 = ɵngcc0.ɵɵnextContext(3); return ctx_r5.datePicker.select(dtz_r4.date); });
|
848 | ɵngcc0.ɵɵelementStart(2, "span", 9);
|
849 | ɵngcc0.ɵɵtext(3);
|
850 | ɵngcc0.ɵɵelementEnd();
|
851 | ɵngcc0.ɵɵelementEnd();
|
852 | ɵngcc0.ɵɵelementEnd();
|
853 | } if (rf & 2) {
|
854 | const dtz_r4 = ctx.$implicit;
|
855 | const ctx_r3 = ɵngcc0.ɵɵnextContext(3);
|
856 | ɵngcc0.ɵɵproperty("ngClass", dtz_r4.customClass);
|
857 | ɵngcc0.ɵɵattribute("id", dtz_r4.uid);
|
858 | ɵngcc0.ɵɵadvance(1);
|
859 | ɵngcc0.ɵɵproperty("ngClass", ɵngcc0.ɵɵpureFunction4(6, _c4, ctx_r3.isBs4 && !dtz_r4.selected && !ctx_r3.datePicker.isActive(dtz_r4), dtz_r4.selected || ctx_r3.isBs4 && !dtz_r4.selected && ctx_r3.datePicker.isActive(dtz_r4), dtz_r4.disabled, !ctx_r3.isBs4 && ctx_r3.datePicker.isActive(dtz_r4)))("disabled", dtz_r4.disabled);
|
860 | ɵngcc0.ɵɵadvance(1);
|
861 | ɵngcc0.ɵɵproperty("ngClass", ɵngcc0.ɵɵpureFunction2(11, _c5, ctx_r3.isBs4 && dtz_r4.current, !ctx_r3.isBs4 && dtz_r4.current));
|
862 | ɵngcc0.ɵɵadvance(1);
|
863 | ɵngcc0.ɵɵtextInterpolate(dtz_r4.label);
|
864 | } }
|
865 | function MonthPickerComponent_table_0_tr_14_Template(rf, ctx) { if (rf & 1) {
|
866 | ɵngcc0.ɵɵelementStart(0, "tr");
|
867 | ɵngcc0.ɵɵtemplate(1, MonthPickerComponent_table_0_tr_14_td_1_Template, 4, 14, "td", 6);
|
868 | ɵngcc0.ɵɵelementEnd();
|
869 | } if (rf & 2) {
|
870 | const rowz_r2 = ctx.$implicit;
|
871 | ɵngcc0.ɵɵadvance(1);
|
872 | ɵngcc0.ɵɵproperty("ngForOf", rowz_r2);
|
873 | } }
|
874 | function MonthPickerComponent_table_0_Template(rf, ctx) { if (rf & 1) {
|
875 | const _r8 = ɵngcc0.ɵɵgetCurrentView();
|
876 | ɵngcc0.ɵɵelementStart(0, "table", 1);
|
877 | ɵngcc0.ɵɵelementStart(1, "thead");
|
878 | ɵngcc0.ɵɵelementStart(2, "tr");
|
879 | ɵngcc0.ɵɵelementStart(3, "th");
|
880 | ɵngcc0.ɵɵelementStart(4, "button", 2);
|
881 | ɵngcc0.ɵɵlistener("click", function MonthPickerComponent_table_0_Template_button_click_4_listener() { ɵngcc0.ɵɵrestoreView(_r8); const ctx_r7 = ɵngcc0.ɵɵnextContext(); return ctx_r7.datePicker.move(-1); });
|
882 | ɵngcc0.ɵɵtext(5, "\u2039");
|
883 | ɵngcc0.ɵɵelementEnd();
|
884 | ɵngcc0.ɵɵelementEnd();
|
885 | ɵngcc0.ɵɵelementStart(6, "th");
|
886 | ɵngcc0.ɵɵelementStart(7, "button", 3);
|
887 | ɵngcc0.ɵɵlistener("click", function MonthPickerComponent_table_0_Template_button_click_7_listener() { ɵngcc0.ɵɵrestoreView(_r8); const ctx_r9 = ɵngcc0.ɵɵnextContext(); return ctx_r9.datePicker.toggleMode(0); });
|
888 | ɵngcc0.ɵɵelementStart(8, "strong");
|
889 | ɵngcc0.ɵɵtext(9);
|
890 | ɵngcc0.ɵɵelementEnd();
|
891 | ɵngcc0.ɵɵelementEnd();
|
892 | ɵngcc0.ɵɵelementEnd();
|
893 | ɵngcc0.ɵɵelementStart(10, "th");
|
894 | ɵngcc0.ɵɵelementStart(11, "button", 4);
|
895 | ɵngcc0.ɵɵlistener("click", function MonthPickerComponent_table_0_Template_button_click_11_listener() { ɵngcc0.ɵɵrestoreView(_r8); const ctx_r10 = ɵngcc0.ɵɵnextContext(); return ctx_r10.datePicker.move(1); });
|
896 | ɵngcc0.ɵɵtext(12, "\u203A");
|
897 | ɵngcc0.ɵɵelementEnd();
|
898 | ɵngcc0.ɵɵelementEnd();
|
899 | ɵngcc0.ɵɵelementEnd();
|
900 | ɵngcc0.ɵɵelementEnd();
|
901 | ɵngcc0.ɵɵelementStart(13, "tbody");
|
902 | ɵngcc0.ɵɵtemplate(14, MonthPickerComponent_table_0_tr_14_Template, 2, 1, "tr", 5);
|
903 | ɵngcc0.ɵɵelementEnd();
|
904 | ɵngcc0.ɵɵelementEnd();
|
905 | } if (rf & 2) {
|
906 | const ctx_r0 = ɵngcc0.ɵɵnextContext();
|
907 | ɵngcc0.ɵɵadvance(6);
|
908 | ɵngcc0.ɵɵattribute("colspan", ctx_r0.datePicker.monthColLimit - 2 <= 0 ? 1 : ctx_r0.datePicker.monthColLimit - 2);
|
909 | ɵngcc0.ɵɵadvance(1);
|
910 | ɵngcc0.ɵɵproperty("id", ctx_r0.datePicker.uniqueId + "-title")("disabled", ctx_r0.datePicker.datepickerMode === ctx_r0.maxMode)("ngClass", ɵngcc0.ɵɵpureFunction1(6, _c3, ctx_r0.datePicker.datepickerMode === ctx_r0.maxMode));
|
911 | ɵngcc0.ɵɵadvance(2);
|
912 | ɵngcc0.ɵɵtextInterpolate(ctx_r0.title);
|
913 | ɵngcc0.ɵɵadvance(5);
|
914 | ɵngcc0.ɵɵproperty("ngForOf", ctx_r0.rows);
|
915 | } }
|
916 | function YearPickerComponent_table_0_tr_14_td_1_Template(rf, ctx) { if (rf & 1) {
|
917 | const _r6 = ɵngcc0.ɵɵgetCurrentView();
|
918 | ɵngcc0.ɵɵelementStart(0, "td", 7);
|
919 | ɵngcc0.ɵɵelementStart(1, "button", 8);
|
920 | ɵngcc0.ɵɵlistener("click", function YearPickerComponent_table_0_tr_14_td_1_Template_button_click_1_listener() { ɵngcc0.ɵɵrestoreView(_r6); const dtz_r4 = ctx.$implicit; const ctx_r5 = ɵngcc0.ɵɵnextContext(3); return ctx_r5.datePicker.select(dtz_r4.date); });
|
921 | ɵngcc0.ɵɵelementStart(2, "span", 9);
|
922 | ɵngcc0.ɵɵtext(3);
|
923 | ɵngcc0.ɵɵelementEnd();
|
924 | ɵngcc0.ɵɵelementEnd();
|
925 | ɵngcc0.ɵɵelementEnd();
|
926 | } if (rf & 2) {
|
927 | const dtz_r4 = ctx.$implicit;
|
928 | const ctx_r3 = ɵngcc0.ɵɵnextContext(3);
|
929 | ɵngcc0.ɵɵattribute("id", dtz_r4.uid);
|
930 | ɵngcc0.ɵɵadvance(1);
|
931 | ɵngcc0.ɵɵproperty("ngClass", ɵngcc0.ɵɵpureFunction4(5, _c4, ctx_r3.isBs4 && !dtz_r4.selected && !ctx_r3.datePicker.isActive(dtz_r4), dtz_r4.selected || ctx_r3.isBs4 && !dtz_r4.selected && ctx_r3.datePicker.isActive(dtz_r4), dtz_r4.disabled, !ctx_r3.isBs4 && ctx_r3.datePicker.isActive(dtz_r4)))("disabled", dtz_r4.disabled);
|
932 | ɵngcc0.ɵɵadvance(1);
|
933 | ɵngcc0.ɵɵproperty("ngClass", ɵngcc0.ɵɵpureFunction2(10, _c5, ctx_r3.isBs4 && dtz_r4.current, !ctx_r3.isBs4 && dtz_r4.current));
|
934 | ɵngcc0.ɵɵadvance(1);
|
935 | ɵngcc0.ɵɵtextInterpolate(dtz_r4.label);
|
936 | } }
|
937 | function YearPickerComponent_table_0_tr_14_Template(rf, ctx) { if (rf & 1) {
|
938 | ɵngcc0.ɵɵelementStart(0, "tr");
|
939 | ɵngcc0.ɵɵtemplate(1, YearPickerComponent_table_0_tr_14_td_1_Template, 4, 13, "td", 6);
|
940 | ɵngcc0.ɵɵelementEnd();
|
941 | } if (rf & 2) {
|
942 | const rowz_r2 = ctx.$implicit;
|
943 | ɵngcc0.ɵɵadvance(1);
|
944 | ɵngcc0.ɵɵproperty("ngForOf", rowz_r2);
|
945 | } }
|
946 | function YearPickerComponent_table_0_Template(rf, ctx) { if (rf & 1) {
|
947 | const _r8 = ɵngcc0.ɵɵgetCurrentView();
|
948 | ɵngcc0.ɵɵelementStart(0, "table", 1);
|
949 | ɵngcc0.ɵɵelementStart(1, "thead");
|
950 | ɵngcc0.ɵɵelementStart(2, "tr");
|
951 | ɵngcc0.ɵɵelementStart(3, "th");
|
952 | ɵngcc0.ɵɵelementStart(4, "button", 2);
|
953 | ɵngcc0.ɵɵlistener("click", function YearPickerComponent_table_0_Template_button_click_4_listener() { ɵngcc0.ɵɵrestoreView(_r8); const ctx_r7 = ɵngcc0.ɵɵnextContext(); return ctx_r7.datePicker.move(-1); });
|
954 | ɵngcc0.ɵɵtext(5, "\u2039 ");
|
955 | ɵngcc0.ɵɵelementEnd();
|
956 | ɵngcc0.ɵɵelementEnd();
|
957 | ɵngcc0.ɵɵelementStart(6, "th");
|
958 | ɵngcc0.ɵɵelementStart(7, "button", 3);
|
959 | ɵngcc0.ɵɵlistener("click", function YearPickerComponent_table_0_Template_button_click_7_listener() { ɵngcc0.ɵɵrestoreView(_r8); const ctx_r9 = ɵngcc0.ɵɵnextContext(); return ctx_r9.datePicker.toggleMode(0); });
|
960 | ɵngcc0.ɵɵelementStart(8, "strong");
|
961 | ɵngcc0.ɵɵtext(9);
|
962 | ɵngcc0.ɵɵelementEnd();
|
963 | ɵngcc0.ɵɵelementEnd();
|
964 | ɵngcc0.ɵɵelementEnd();
|
965 | ɵngcc0.ɵɵelementStart(10, "th");
|
966 | ɵngcc0.ɵɵelementStart(11, "button", 4);
|
967 | ɵngcc0.ɵɵlistener("click", function YearPickerComponent_table_0_Template_button_click_11_listener() { ɵngcc0.ɵɵrestoreView(_r8); const ctx_r10 = ɵngcc0.ɵɵnextContext(); return ctx_r10.datePicker.move(1); });
|
968 | ɵngcc0.ɵɵtext(12, "\u203A ");
|
969 | ɵngcc0.ɵɵelementEnd();
|
970 | ɵngcc0.ɵɵelementEnd();
|
971 | ɵngcc0.ɵɵelementEnd();
|
972 | ɵngcc0.ɵɵelementEnd();
|
973 | ɵngcc0.ɵɵelementStart(13, "tbody");
|
974 | ɵngcc0.ɵɵtemplate(14, YearPickerComponent_table_0_tr_14_Template, 2, 1, "tr", 5);
|
975 | ɵngcc0.ɵɵelementEnd();
|
976 | ɵngcc0.ɵɵelementEnd();
|
977 | } if (rf & 2) {
|
978 | const ctx_r0 = ɵngcc0.ɵɵnextContext();
|
979 | ɵngcc0.ɵɵadvance(6);
|
980 | ɵngcc0.ɵɵattribute("colspan", ctx_r0.datePicker.yearColLimit - 2 <= 0 ? 1 : ctx_r0.datePicker.yearColLimit - 2);
|
981 | ɵngcc0.ɵɵadvance(1);
|
982 | ɵngcc0.ɵɵproperty("id", ctx_r0.datePicker.uniqueId + "-title")("disabled", ctx_r0.datePicker.datepickerMode === ctx_r0.datePicker.maxMode)("ngClass", ɵngcc0.ɵɵpureFunction1(6, _c3, ctx_r0.datePicker.datepickerMode === ctx_r0.datePicker.maxMode));
|
983 | ɵngcc0.ɵɵadvance(2);
|
984 | ɵngcc0.ɵɵtextInterpolate(ctx_r0.title);
|
985 | ɵngcc0.ɵɵadvance(5);
|
986 | ɵngcc0.ɵɵproperty("ngForOf", ctx_r0.rows);
|
987 | } }
|
988 | function BsCalendarLayoutComponent_bs_current_date_0_Template(rf, ctx) { if (rf & 1) {
|
989 | ɵngcc0.ɵɵelement(0, "bs-current-date", 4);
|
990 | } }
|
991 | function BsCalendarLayoutComponent_bs_timepicker_5_Template(rf, ctx) { if (rf & 1) {
|
992 | ɵngcc0.ɵɵelement(0, "bs-timepicker");
|
993 | } }
|
994 | const _c6 = [[["bs-datepicker-navigation-view"]], "*"];
|
995 | const _c7 = ["bs-datepicker-navigation-view", "*"];
|
996 | function BsCustomDatesViewComponent_button_1_Template(rf, ctx) { if (rf & 1) {
|
997 | const _r3 = ɵngcc0.ɵɵgetCurrentView();
|
998 | ɵngcc0.ɵɵelementStart(0, "button", 2);
|
999 | ɵngcc0.ɵɵlistener("click", function BsCustomDatesViewComponent_button_1_Template_button_click_0_listener() { ɵngcc0.ɵɵrestoreView(_r3); const range_r1 = ctx.$implicit; const ctx_r2 = ɵngcc0.ɵɵnextContext(); return ctx_r2.selectFromRanges(range_r1); });
|
1000 | ɵngcc0.ɵɵtext(1);
|
1001 | ɵngcc0.ɵɵelementEnd();
|
1002 | } if (rf & 2) {
|
1003 | const range_r1 = ctx.$implicit;
|
1004 | const ctx_r0 = ɵngcc0.ɵɵnextContext();
|
1005 | ɵngcc0.ɵɵclassProp("selected", range_r1.value === ctx_r0.selectedRange);
|
1006 | ɵngcc0.ɵɵadvance(1);
|
1007 | ɵngcc0.ɵɵtextInterpolate1(" ", range_r1.label, " ");
|
1008 | } }
|
1009 | const _c8 = ["bsDatepickerDayDecorator", ""];
|
1010 | function BsDatepickerNavigationViewComponent_ng_container_3_Template(rf, ctx) { if (rf & 1) {
|
1011 | const _r2 = ɵngcc0.ɵɵgetCurrentView();
|
1012 | ɵngcc0.ɵɵelementContainerStart(0);
|
1013 | ɵngcc0.ɵɵtext(1, " \u200B ");
|
1014 | ɵngcc0.ɵɵelementStart(2, "button", 2);
|
1015 | ɵngcc0.ɵɵlistener("click", function BsDatepickerNavigationViewComponent_ng_container_3_Template_button_click_2_listener() { ɵngcc0.ɵɵrestoreView(_r2); const ctx_r1 = ɵngcc0.ɵɵnextContext(); return ctx_r1.view("month"); });
|
1016 | ɵngcc0.ɵɵelementStart(3, "span");
|
1017 | ɵngcc0.ɵɵtext(4);
|
1018 | ɵngcc0.ɵɵelementEnd();
|
1019 | ɵngcc0.ɵɵelementEnd();
|
1020 | ɵngcc0.ɵɵelementContainerEnd();
|
1021 | } if (rf & 2) {
|
1022 | const ctx_r0 = ɵngcc0.ɵɵnextContext();
|
1023 | ɵngcc0.ɵɵadvance(4);
|
1024 | ɵngcc0.ɵɵtextInterpolate(ctx_r0.calendar.monthTitle);
|
1025 | } }
|
1026 | function BsDaysCalendarViewComponent_th_5_Template(rf, ctx) { if (rf & 1) {
|
1027 | ɵngcc0.ɵɵelement(0, "th");
|
1028 | } }
|
1029 | function BsDaysCalendarViewComponent_th_6_Template(rf, ctx) { if (rf & 1) {
|
1030 | ɵngcc0.ɵɵelementStart(0, "th", 5);
|
1031 | ɵngcc0.ɵɵtext(1);
|
1032 | ɵngcc0.ɵɵelementEnd();
|
1033 | } if (rf & 2) {
|
1034 | const i_r4 = ctx.index;
|
1035 | const ctx_r1 = ɵngcc0.ɵɵnextContext();
|
1036 | ɵngcc0.ɵɵadvance(1);
|
1037 | ɵngcc0.ɵɵtextInterpolate1("", ctx_r1.calendar.weekdays[i_r4], " ");
|
1038 | } }
|
1039 | function BsDaysCalendarViewComponent_tr_8_td_1_span_1_Template(rf, ctx) { if (rf & 1) {
|
1040 | const _r13 = ɵngcc0.ɵɵgetCurrentView();
|
1041 | ɵngcc0.ɵɵelementStart(0, "span", 11);
|
1042 | ɵngcc0.ɵɵlistener("click", function BsDaysCalendarViewComponent_tr_8_td_1_span_1_Template_span_click_0_listener() { ɵngcc0.ɵɵrestoreView(_r13); const week_r5 = ɵngcc0.ɵɵnextContext(2).$implicit; const ctx_r11 = ɵngcc0.ɵɵnextContext(); return ctx_r11.selectWeek(week_r5); });
|
1043 | ɵngcc0.ɵɵtext(1);
|
1044 | ɵngcc0.ɵɵelementEnd();
|
1045 | } if (rf & 2) {
|
1046 | const i_r6 = ɵngcc0.ɵɵnextContext(2).index;
|
1047 | const ctx_r9 = ɵngcc0.ɵɵnextContext();
|
1048 | ɵngcc0.ɵɵadvance(1);
|
1049 | ɵngcc0.ɵɵtextInterpolate(ctx_r9.calendar.weekNumbers[i_r6]);
|
1050 | } }
|
1051 | function BsDaysCalendarViewComponent_tr_8_td_1_span_2_Template(rf, ctx) { if (rf & 1) {
|
1052 | const _r17 = ɵngcc0.ɵɵgetCurrentView();
|
1053 | ɵngcc0.ɵɵelementStart(0, "span", 12);
|
1054 | ɵngcc0.ɵɵlistener("click", function BsDaysCalendarViewComponent_tr_8_td_1_span_2_Template_span_click_0_listener() { ɵngcc0.ɵɵrestoreView(_r17); const week_r5 = ɵngcc0.ɵɵnextContext(2).$implicit; const ctx_r15 = ɵngcc0.ɵɵnextContext(); return ctx_r15.selectWeek(week_r5); })("mouseenter", function BsDaysCalendarViewComponent_tr_8_td_1_span_2_Template_span_mouseenter_0_listener() { ɵngcc0.ɵɵrestoreView(_r17); const week_r5 = ɵngcc0.ɵɵnextContext(2).$implicit; const ctx_r18 = ɵngcc0.ɵɵnextContext(); return ctx_r18.weekHoverHandler(week_r5, true); })("mouseleave", function BsDaysCalendarViewComponent_tr_8_td_1_span_2_Template_span_mouseleave_0_listener() { ɵngcc0.ɵɵrestoreView(_r17); const week_r5 = ɵngcc0.ɵɵnextContext(2).$implicit; const ctx_r20 = ɵngcc0.ɵɵnextContext(); return ctx_r20.weekHoverHandler(week_r5, false); });
|
1055 | ɵngcc0.ɵɵtext(1);
|
1056 | ɵngcc0.ɵɵelementEnd();
|
1057 | } if (rf & 2) {
|
1058 | const i_r6 = ɵngcc0.ɵɵnextContext(2).index;
|
1059 | const ctx_r10 = ɵngcc0.ɵɵnextContext();
|
1060 | ɵngcc0.ɵɵadvance(1);
|
1061 | ɵngcc0.ɵɵtextInterpolate(ctx_r10.calendar.weekNumbers[i_r6]);
|
1062 | } }
|
1063 | function BsDaysCalendarViewComponent_tr_8_td_1_Template(rf, ctx) { if (rf & 1) {
|
1064 | ɵngcc0.ɵɵelementStart(0, "td", 8);
|
1065 | ɵngcc0.ɵɵtemplate(1, BsDaysCalendarViewComponent_tr_8_td_1_span_1_Template, 2, 1, "span", 9);
|
1066 | ɵngcc0.ɵɵtemplate(2, BsDaysCalendarViewComponent_tr_8_td_1_span_2_Template, 2, 1, "span", 10);
|
1067 | ɵngcc0.ɵɵelementEnd();
|
1068 | } if (rf & 2) {
|
1069 | const ctx_r7 = ɵngcc0.ɵɵnextContext(2);
|
1070 | ɵngcc0.ɵɵclassProp("active-week", ctx_r7.isWeekHovered);
|
1071 | ɵngcc0.ɵɵadvance(1);
|
1072 | ɵngcc0.ɵɵproperty("ngIf", ctx_r7.isiOS);
|
1073 | ɵngcc0.ɵɵadvance(1);
|
1074 | ɵngcc0.ɵɵproperty("ngIf", !ctx_r7.isiOS);
|
1075 | } }
|
1076 | function BsDaysCalendarViewComponent_tr_8_td_2_span_1_Template(rf, ctx) { if (rf & 1) {
|
1077 | const _r29 = ɵngcc0.ɵɵgetCurrentView();
|
1078 | ɵngcc0.ɵɵelementStart(0, "span", 17);
|
1079 | ɵngcc0.ɵɵlistener("click", function BsDaysCalendarViewComponent_tr_8_td_2_span_1_Template_span_click_0_listener() { ɵngcc0.ɵɵrestoreView(_r29); const day_r23 = ɵngcc0.ɵɵnextContext().$implicit; const ctx_r27 = ɵngcc0.ɵɵnextContext(2); return ctx_r27.selectDay(day_r23); })("mouseenter", function BsDaysCalendarViewComponent_tr_8_td_2_span_1_Template_span_mouseenter_0_listener() { ɵngcc0.ɵɵrestoreView(_r29); const day_r23 = ɵngcc0.ɵɵnextContext().$implicit; const ctx_r30 = ɵngcc0.ɵɵnextContext(2); return ctx_r30.hoverDay(day_r23, true); })("mouseleave", function BsDaysCalendarViewComponent_tr_8_td_2_span_1_Template_span_mouseleave_0_listener() { ɵngcc0.ɵɵrestoreView(_r29); const day_r23 = ɵngcc0.ɵɵnextContext().$implicit; const ctx_r32 = ɵngcc0.ɵɵnextContext(2); return ctx_r32.hoverDay(day_r23, false); });
|
1080 | ɵngcc0.ɵɵtext(1);
|
1081 | ɵngcc0.ɵɵelementEnd();
|
1082 | } if (rf & 2) {
|
1083 | const day_r23 = ɵngcc0.ɵɵnextContext().$implicit;
|
1084 | ɵngcc0.ɵɵpropertyInterpolate("tooltip", day_r23.tooltipText);
|
1085 | ɵngcc0.ɵɵproperty("day", day_r23);
|
1086 | ɵngcc0.ɵɵadvance(1);
|
1087 | ɵngcc0.ɵɵtextInterpolate1("", day_r23.label, " 3");
|
1088 | } }
|
1089 | function BsDaysCalendarViewComponent_tr_8_td_2_span_2_Template(rf, ctx) { if (rf & 1) {
|
1090 | const _r37 = ɵngcc0.ɵɵgetCurrentView();
|
1091 | ɵngcc0.ɵɵelementStart(0, "span", 18);
|
1092 | ɵngcc0.ɵɵlistener("click", function BsDaysCalendarViewComponent_tr_8_td_2_span_2_Template_span_click_0_listener() { ɵngcc0.ɵɵrestoreView(_r37); const day_r23 = ɵngcc0.ɵɵnextContext().$implicit; const ctx_r35 = ɵngcc0.ɵɵnextContext(2); return ctx_r35.selectDay(day_r23); })("mouseenter", function BsDaysCalendarViewComponent_tr_8_td_2_span_2_Template_span_mouseenter_0_listener() { ɵngcc0.ɵɵrestoreView(_r37); const day_r23 = ɵngcc0.ɵɵnextContext().$implicit; const ctx_r38 = ɵngcc0.ɵɵnextContext(2); return ctx_r38.hoverDay(day_r23, true); })("mouseleave", function BsDaysCalendarViewComponent_tr_8_td_2_span_2_Template_span_mouseleave_0_listener() { ɵngcc0.ɵɵrestoreView(_r37); const day_r23 = ɵngcc0.ɵɵnextContext().$implicit; const ctx_r40 = ɵngcc0.ɵɵnextContext(2); return ctx_r40.hoverDay(day_r23, false); });
|
1093 | ɵngcc0.ɵɵtext(1);
|
1094 | ɵngcc0.ɵɵelementEnd();
|
1095 | } if (rf & 2) {
|
1096 | const day_r23 = ɵngcc0.ɵɵnextContext().$implicit;
|
1097 | ɵngcc0.ɵɵproperty("day", day_r23);
|
1098 | ɵngcc0.ɵɵadvance(1);
|
1099 | ɵngcc0.ɵɵtextInterpolate1("", day_r23.label, " 2");
|
1100 | } }
|
1101 | function BsDaysCalendarViewComponent_tr_8_td_2_span_3_Template(rf, ctx) { if (rf & 1) {
|
1102 | const _r45 = ɵngcc0.ɵɵgetCurrentView();
|
1103 | ɵngcc0.ɵɵelementStart(0, "span", 19);
|
1104 | ɵngcc0.ɵɵlistener("click", function BsDaysCalendarViewComponent_tr_8_td_2_span_3_Template_span_click_0_listener() { ɵngcc0.ɵɵrestoreView(_r45); const day_r23 = ɵngcc0.ɵɵnextContext().$implicit; const ctx_r43 = ɵngcc0.ɵɵnextContext(2); return ctx_r43.selectDay(day_r23); });
|
1105 | ɵngcc0.ɵɵtext(1);
|
1106 | ɵngcc0.ɵɵelementEnd();
|
1107 | } if (rf & 2) {
|
1108 | const day_r23 = ɵngcc0.ɵɵnextContext().$implicit;
|
1109 | ɵngcc0.ɵɵproperty("day", day_r23);
|
1110 | ɵngcc0.ɵɵadvance(1);
|
1111 | ɵngcc0.ɵɵtextInterpolate1("", day_r23.label, " 1");
|
1112 | } }
|
1113 | function BsDaysCalendarViewComponent_tr_8_td_2_Template(rf, ctx) { if (rf & 1) {
|
1114 | ɵngcc0.ɵɵelementStart(0, "td", 13);
|
1115 | ɵngcc0.ɵɵtemplate(1, BsDaysCalendarViewComponent_tr_8_td_2_span_1_Template, 2, 3, "span", 14);
|
1116 | ɵngcc0.ɵɵtemplate(2, BsDaysCalendarViewComponent_tr_8_td_2_span_2_Template, 2, 2, "span", 15);
|
1117 | ɵngcc0.ɵɵtemplate(3, BsDaysCalendarViewComponent_tr_8_td_2_span_3_Template, 2, 2, "span", 16);
|
1118 | ɵngcc0.ɵɵelementEnd();
|
1119 | } if (rf & 2) {
|
1120 | const ctx_r8 = ɵngcc0.ɵɵnextContext(2);
|
1121 | ɵngcc0.ɵɵadvance(1);
|
1122 | ɵngcc0.ɵɵproperty("ngIf", !ctx_r8.isiOS && ctx_r8.isShowTooltip);
|
1123 | ɵngcc0.ɵɵadvance(1);
|
1124 | ɵngcc0.ɵɵproperty("ngIf", !ctx_r8.isiOS && !ctx_r8.isShowTooltip);
|
1125 | ɵngcc0.ɵɵadvance(1);
|
1126 | ɵngcc0.ɵɵproperty("ngIf", ctx_r8.isiOS);
|
1127 | } }
|
1128 | function BsDaysCalendarViewComponent_tr_8_Template(rf, ctx) { if (rf & 1) {
|
1129 | ɵngcc0.ɵɵelementStart(0, "tr");
|
1130 | ɵngcc0.ɵɵtemplate(1, BsDaysCalendarViewComponent_tr_8_td_1_Template, 3, 4, "td", 6);
|
1131 | ɵngcc0.ɵɵtemplate(2, BsDaysCalendarViewComponent_tr_8_td_2_Template, 4, 3, "td", 7);
|
1132 | ɵngcc0.ɵɵelementEnd();
|
1133 | } if (rf & 2) {
|
1134 | const week_r5 = ctx.$implicit;
|
1135 | const ctx_r2 = ɵngcc0.ɵɵnextContext();
|
1136 | ɵngcc0.ɵɵadvance(1);
|
1137 | ɵngcc0.ɵɵproperty("ngIf", ctx_r2.options && ctx_r2.options.showWeekNumbers);
|
1138 | ɵngcc0.ɵɵadvance(1);
|
1139 | ɵngcc0.ɵɵproperty("ngForOf", week_r5.days);
|
1140 | } }
|
1141 | function BsMonthCalendarViewComponent_tr_4_td_1_Template(rf, ctx) { if (rf & 1) {
|
1142 | const _r5 = ɵngcc0.ɵɵgetCurrentView();
|
1143 | ɵngcc0.ɵɵelementStart(0, "td", 4);
|
1144 | ɵngcc0.ɵɵlistener("click", function BsMonthCalendarViewComponent_tr_4_td_1_Template_td_click_0_listener() { ɵngcc0.ɵɵrestoreView(_r5); const month_r3 = ctx.$implicit; const ctx_r4 = ɵngcc0.ɵɵnextContext(2); return ctx_r4.viewMonth(month_r3); })("mouseenter", function BsMonthCalendarViewComponent_tr_4_td_1_Template_td_mouseenter_0_listener() { ɵngcc0.ɵɵrestoreView(_r5); const month_r3 = ctx.$implicit; const ctx_r6 = ɵngcc0.ɵɵnextContext(2); return ctx_r6.hoverMonth(month_r3, true); })("mouseleave", function BsMonthCalendarViewComponent_tr_4_td_1_Template_td_mouseleave_0_listener() { ɵngcc0.ɵɵrestoreView(_r5); const month_r3 = ctx.$implicit; const ctx_r7 = ɵngcc0.ɵɵnextContext(2); return ctx_r7.hoverMonth(month_r3, false); });
|
1145 | ɵngcc0.ɵɵelementStart(1, "span");
|
1146 | ɵngcc0.ɵɵtext(2);
|
1147 | ɵngcc0.ɵɵelementEnd();
|
1148 | ɵngcc0.ɵɵelementEnd();
|
1149 | } if (rf & 2) {
|
1150 | const month_r3 = ctx.$implicit;
|
1151 | ɵngcc0.ɵɵclassProp("disabled", month_r3.isDisabled)("is-highlighted", month_r3.isHovered);
|
1152 | ɵngcc0.ɵɵadvance(1);
|
1153 | ɵngcc0.ɵɵclassProp("selected", month_r3.isSelected);
|
1154 | ɵngcc0.ɵɵadvance(1);
|
1155 | ɵngcc0.ɵɵtextInterpolate(month_r3.label);
|
1156 | } }
|
1157 | function BsMonthCalendarViewComponent_tr_4_Template(rf, ctx) { if (rf & 1) {
|
1158 | ɵngcc0.ɵɵelementStart(0, "tr");
|
1159 | ɵngcc0.ɵɵtemplate(1, BsMonthCalendarViewComponent_tr_4_td_1_Template, 3, 7, "td", 3);
|
1160 | ɵngcc0.ɵɵelementEnd();
|
1161 | } if (rf & 2) {
|
1162 | const row_r1 = ctx.$implicit;
|
1163 | ɵngcc0.ɵɵadvance(1);
|
1164 | ɵngcc0.ɵɵproperty("ngForOf", row_r1);
|
1165 | } }
|
1166 | function BsYearsCalendarViewComponent_tr_4_td_1_Template(rf, ctx) { if (rf & 1) {
|
1167 | const _r5 = ɵngcc0.ɵɵgetCurrentView();
|
1168 | ɵngcc0.ɵɵelementStart(0, "td", 4);
|
1169 | ɵngcc0.ɵɵlistener("click", function BsYearsCalendarViewComponent_tr_4_td_1_Template_td_click_0_listener() { ɵngcc0.ɵɵrestoreView(_r5); const year_r3 = ctx.$implicit; const ctx_r4 = ɵngcc0.ɵɵnextContext(2); return ctx_r4.viewYear(year_r3); })("mouseenter", function BsYearsCalendarViewComponent_tr_4_td_1_Template_td_mouseenter_0_listener() { ɵngcc0.ɵɵrestoreView(_r5); const year_r3 = ctx.$implicit; const ctx_r6 = ɵngcc0.ɵɵnextContext(2); return ctx_r6.hoverYear(year_r3, true); })("mouseleave", function BsYearsCalendarViewComponent_tr_4_td_1_Template_td_mouseleave_0_listener() { ɵngcc0.ɵɵrestoreView(_r5); const year_r3 = ctx.$implicit; const ctx_r7 = ɵngcc0.ɵɵnextContext(2); return ctx_r7.hoverYear(year_r3, false); });
|
1170 | ɵngcc0.ɵɵelementStart(1, "span");
|
1171 | ɵngcc0.ɵɵtext(2);
|
1172 | ɵngcc0.ɵɵelementEnd();
|
1173 | ɵngcc0.ɵɵelementEnd();
|
1174 | } if (rf & 2) {
|
1175 | const year_r3 = ctx.$implicit;
|
1176 | ɵngcc0.ɵɵclassProp("disabled", year_r3.isDisabled)("is-highlighted", year_r3.isHovered);
|
1177 | ɵngcc0.ɵɵadvance(1);
|
1178 | ɵngcc0.ɵɵclassProp("selected", year_r3.isSelected);
|
1179 | ɵngcc0.ɵɵadvance(1);
|
1180 | ɵngcc0.ɵɵtextInterpolate(year_r3.label);
|
1181 | } }
|
1182 | function BsYearsCalendarViewComponent_tr_4_Template(rf, ctx) { if (rf & 1) {
|
1183 | ɵngcc0.ɵɵelementStart(0, "tr");
|
1184 | ɵngcc0.ɵɵtemplate(1, BsYearsCalendarViewComponent_tr_4_td_1_Template, 3, 7, "td", 3);
|
1185 | ɵngcc0.ɵɵelementEnd();
|
1186 | } if (rf & 2) {
|
1187 | const row_r1 = ctx.$implicit;
|
1188 | ɵngcc0.ɵɵadvance(1);
|
1189 | ɵngcc0.ɵɵproperty("ngForOf", row_r1);
|
1190 | } }
|
1191 | class BsDatepickerConfig {
|
1192 | constructor() {
|
1193 |
|
1194 | this.adaptivePosition = false;
|
1195 |
|
1196 | this.useUtc = false;
|
1197 |
|
1198 | this.isAnimated = false;
|
1199 | |
1200 |
|
1201 |
|
1202 | this.startView = 'day';
|
1203 | |
1204 |
|
1205 |
|
1206 | this.returnFocusToInput = false;
|
1207 | |
1208 |
|
1209 |
|
1210 | this.containerClass = 'theme-green';
|
1211 |
|
1212 | this.displayMonths = 1;
|
1213 | |
1214 |
|
1215 |
|
1216 | this.showWeekNumbers = true;
|
1217 | this.dateInputFormat = 'L';
|
1218 |
|
1219 | this.rangeSeparator = ' - ';
|
1220 | |
1221 |
|
1222 |
|
1223 | this.rangeInputFormat = 'L';
|
1224 |
|
1225 | this.monthTitle = 'MMMM';
|
1226 | this.yearTitle = 'YYYY';
|
1227 | this.dayLabel = 'D';
|
1228 | this.monthLabel = 'MMMM';
|
1229 | this.yearLabel = 'YYYY';
|
1230 | this.weekNumbers = 'w';
|
1231 | |
1232 |
|
1233 |
|
1234 | this.showTodayButton = false;
|
1235 | |
1236 |
|
1237 |
|
1238 | this.showClearButton = false;
|
1239 | |
1240 |
|
1241 |
|
1242 | this.todayPosition = 'center';
|
1243 | |
1244 |
|
1245 |
|
1246 | this.clearPosition = 'right';
|
1247 | |
1248 |
|
1249 |
|
1250 | this.todayButtonLabel = 'Today';
|
1251 | |
1252 |
|
1253 |
|
1254 | this.clearButtonLabel = 'Clear';
|
1255 | |
1256 |
|
1257 |
|
1258 | this.customRangeButtonLabel = 'Custom Range';
|
1259 | }
|
1260 | }
|
1261 | BsDatepickerConfig.ɵfac = function BsDatepickerConfig_Factory(t) { return new (t || BsDatepickerConfig)(); };
|
1262 | BsDatepickerConfig.ɵprov = ɵɵdefineInjectable({ factory: function BsDatepickerConfig_Factory() { return new BsDatepickerConfig(); }, token: BsDatepickerConfig, providedIn: "root" });
|
1263 | (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BsDatepickerConfig, [{
|
1264 | type: Injectable,
|
1265 | args: [{
|
1266 | providedIn: 'root'
|
1267 | }]
|
1268 | }], function () { return []; }, null); })();
|
1269 |
|
1270 | const DATEPICKER_ANIMATION_TIMING = '220ms cubic-bezier(0, 0, 0.2, 1)';
|
1271 | const datepickerAnimation = trigger('datepickerAnimation', [
|
1272 | state('animated-down', style({ height: '*', overflow: 'hidden' })),
|
1273 | transition('* => animated-down', [
|
1274 | style({ height: 0, overflow: 'hidden' }),
|
1275 | animate(DATEPICKER_ANIMATION_TIMING)
|
1276 | ]),
|
1277 | state('animated-up', style({ height: '*', overflow: 'hidden' })),
|
1278 | transition('* => animated-up', [
|
1279 | style({ height: '*', overflow: 'hidden' }),
|
1280 | animate(DATEPICKER_ANIMATION_TIMING)
|
1281 | ]),
|
1282 | transition('* => unanimated', animate('0s'))
|
1283 | ]);
|
1284 |
|
1285 | class BsDatepickerAbstractComponent {
|
1286 | constructor() {
|
1287 | this.containerClass = '';
|
1288 | this.customRanges = [];
|
1289 | this.chosenRange = [];
|
1290 | this._daysCalendarSub = new Subscription();
|
1291 | }
|
1292 | set minDate(value) {
|
1293 | var _a;
|
1294 | (_a = this._effects) === null || _a === void 0 ? void 0 : _a.setMinDate(value);
|
1295 | }
|
1296 | set maxDate(value) {
|
1297 | var _a;
|
1298 | (_a = this._effects) === null || _a === void 0 ? void 0 : _a.setMaxDate(value);
|
1299 | }
|
1300 | set daysDisabled(value) {
|
1301 | var _a;
|
1302 | (_a = this._effects) === null || _a === void 0 ? void 0 : _a.setDaysDisabled(value);
|
1303 | }
|
1304 | set datesDisabled(value) {
|
1305 | var _a;
|
1306 | (_a = this._effects) === null || _a === void 0 ? void 0 : _a.setDatesDisabled(value);
|
1307 | }
|
1308 | set datesEnabled(value) {
|
1309 | var _a;
|
1310 | (_a = this._effects) === null || _a === void 0 ? void 0 : _a.setDatesEnabled(value);
|
1311 | }
|
1312 | set isDisabled(value) {
|
1313 | var _a;
|
1314 | (_a = this._effects) === null || _a === void 0 ? void 0 : _a.setDisabled(value);
|
1315 | }
|
1316 | set dateCustomClasses(value) {
|
1317 | var _a;
|
1318 | (_a = this._effects) === null || _a === void 0 ? void 0 : _a.setDateCustomClasses(value);
|
1319 | }
|
1320 | set dateTooltipTexts(value) {
|
1321 | var _a;
|
1322 | (_a = this._effects) === null || _a === void 0 ? void 0 : _a.setDateTooltipTexts(value);
|
1323 | }
|
1324 | set daysCalendar$(value) {
|
1325 | this._daysCalendar$ = value;
|
1326 | this._daysCalendarSub.unsubscribe();
|
1327 | this._daysCalendarSub.add(this._daysCalendar$.subscribe(value => {
|
1328 | this.multipleCalendars = !!value && value.length > 1;
|
1329 | }));
|
1330 | }
|
1331 | get daysCalendar$() {
|
1332 | return this._daysCalendar$;
|
1333 | }
|
1334 |
|
1335 |
|
1336 | setViewMode(event) { }
|
1337 |
|
1338 | navigateTo(event) { }
|
1339 |
|
1340 | dayHoverHandler(event) { }
|
1341 |
|
1342 | weekHoverHandler(event) { }
|
1343 |
|
1344 | monthHoverHandler(event) { }
|
1345 |
|
1346 | yearHoverHandler(event) { }
|
1347 |
|
1348 | daySelectHandler(day) { }
|
1349 |
|
1350 | monthSelectHandler(event) { }
|
1351 |
|
1352 | yearSelectHandler(event) { }
|
1353 |
|
1354 | setRangeOnCalendar(dates) { }
|
1355 |
|
1356 | setToday() { }
|
1357 |
|
1358 | clearDate() { }
|
1359 |
|
1360 | _stopPropagation(event) {
|
1361 | event.stopPropagation();
|
1362 | }
|
1363 | }
|
1364 |
|
1365 | class BsDatepickerActions {
|
1366 | calculate() {
|
1367 | return { type: BsDatepickerActions.CALCULATE };
|
1368 | }
|
1369 | format() {
|
1370 | return { type: BsDatepickerActions.FORMAT };
|
1371 | }
|
1372 | flag() {
|
1373 | return { type: BsDatepickerActions.FLAG };
|
1374 | }
|
1375 | select(date) {
|
1376 | return {
|
1377 | type: BsDatepickerActions.SELECT,
|
1378 | payload: date
|
1379 | };
|
1380 | }
|
1381 | changeViewMode(event) {
|
1382 | return {
|
1383 | type: BsDatepickerActions.CHANGE_VIEWMODE,
|
1384 | payload: event
|
1385 | };
|
1386 | }
|
1387 | navigateTo(event) {
|
1388 | return {
|
1389 | type: BsDatepickerActions.NAVIGATE_TO,
|
1390 | payload: event
|
1391 | };
|
1392 | }
|
1393 | navigateStep(step) {
|
1394 | return {
|
1395 | type: BsDatepickerActions.NAVIGATE_OFFSET,
|
1396 | payload: step
|
1397 | };
|
1398 | }
|
1399 | setOptions(options) {
|
1400 | return {
|
1401 | type: BsDatepickerActions.SET_OPTIONS,
|
1402 | payload: options
|
1403 | };
|
1404 | }
|
1405 |
|
1406 | selectRange(value) {
|
1407 | return {
|
1408 | type: BsDatepickerActions.SELECT_RANGE,
|
1409 | payload: value
|
1410 | };
|
1411 | }
|
1412 | hoverDay(event) {
|
1413 | return {
|
1414 | type: BsDatepickerActions.HOVER,
|
1415 | payload: event.isHovered ? event.cell.date : null
|
1416 | };
|
1417 | }
|
1418 | minDate(date) {
|
1419 | return {
|
1420 | type: BsDatepickerActions.SET_MIN_DATE,
|
1421 | payload: date
|
1422 | };
|
1423 | }
|
1424 | maxDate(date) {
|
1425 | return {
|
1426 | type: BsDatepickerActions.SET_MAX_DATE,
|
1427 | payload: date
|
1428 | };
|
1429 | }
|
1430 | daysDisabled(days) {
|
1431 | return {
|
1432 | type: BsDatepickerActions.SET_DAYSDISABLED,
|
1433 | payload: days
|
1434 | };
|
1435 | }
|
1436 | datesDisabled(dates) {
|
1437 | return {
|
1438 | type: BsDatepickerActions.SET_DATESDISABLED,
|
1439 | payload: dates
|
1440 | };
|
1441 | }
|
1442 | datesEnabled(dates) {
|
1443 | return {
|
1444 | type: BsDatepickerActions.SET_DATESENABLED,
|
1445 | payload: dates
|
1446 | };
|
1447 | }
|
1448 | isDisabled(value) {
|
1449 | return {
|
1450 | type: BsDatepickerActions.SET_IS_DISABLED,
|
1451 | payload: value
|
1452 | };
|
1453 | }
|
1454 | setDateCustomClasses(value) {
|
1455 | return {
|
1456 | type: BsDatepickerActions.SET_DATE_CUSTOM_CLASSES,
|
1457 | payload: value
|
1458 | };
|
1459 | }
|
1460 | setDateTooltipTexts(value) {
|
1461 | return {
|
1462 | type: BsDatepickerActions.SET_DATE_TOOLTIP_TEXTS,
|
1463 | payload: value
|
1464 | };
|
1465 | }
|
1466 | setLocale(locale) {
|
1467 | return {
|
1468 | type: BsDatepickerActions.SET_LOCALE,
|
1469 | payload: locale
|
1470 | };
|
1471 | }
|
1472 | }
|
1473 | BsDatepickerActions.ɵfac = function BsDatepickerActions_Factory(t) { return new (t || BsDatepickerActions)(); };
|
1474 | BsDatepickerActions.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: BsDatepickerActions, factory: BsDatepickerActions.ɵfac });
|
1475 | BsDatepickerActions.CALCULATE = '[datepicker] calculate dates matrix';
|
1476 | BsDatepickerActions.FORMAT = '[datepicker] format datepicker values';
|
1477 | BsDatepickerActions.FLAG = '[datepicker] set flags';
|
1478 | BsDatepickerActions.SELECT = '[datepicker] select date';
|
1479 | BsDatepickerActions.NAVIGATE_OFFSET = '[datepicker] shift view date';
|
1480 | BsDatepickerActions.NAVIGATE_TO = '[datepicker] change view date';
|
1481 | BsDatepickerActions.SET_OPTIONS = '[datepicker] update render options';
|
1482 | BsDatepickerActions.HOVER = '[datepicker] hover date';
|
1483 | BsDatepickerActions.CHANGE_VIEWMODE = '[datepicker] switch view mode';
|
1484 | BsDatepickerActions.SET_MIN_DATE = '[datepicker] set min date';
|
1485 | BsDatepickerActions.SET_MAX_DATE = '[datepicker] set max date';
|
1486 | BsDatepickerActions.SET_DAYSDISABLED = '[datepicker] set days disabled';
|
1487 | BsDatepickerActions.SET_DATESDISABLED = '[datepicker] set dates disabled';
|
1488 | BsDatepickerActions.SET_DATESENABLED = '[datepicker] set dates enabled';
|
1489 | BsDatepickerActions.SET_IS_DISABLED = '[datepicker] set is disabled';
|
1490 | BsDatepickerActions.SET_DATE_CUSTOM_CLASSES = '[datepicker] set date custom classes';
|
1491 | BsDatepickerActions.SET_DATE_TOOLTIP_TEXTS = '[datepicker] set date tooltip texts';
|
1492 | BsDatepickerActions.SET_LOCALE = '[datepicker] set datepicker locale';
|
1493 | BsDatepickerActions.SELECT_RANGE = '[daterangepicker] select dates range';
|
1494 | (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BsDatepickerActions, [{
|
1495 | type: Injectable
|
1496 | }], null, null); })();
|
1497 |
|
1498 | class BsLocaleService {
|
1499 | constructor() {
|
1500 | this._defaultLocale = 'en';
|
1501 | this._locale = new BehaviorSubject(this._defaultLocale);
|
1502 | this._localeChange = this._locale.asObservable();
|
1503 | }
|
1504 | get locale() {
|
1505 | return this._locale;
|
1506 | }
|
1507 | get localeChange() {
|
1508 | return this._localeChange;
|
1509 | }
|
1510 | get currentLocale() {
|
1511 | return this._locale.getValue();
|
1512 | }
|
1513 | use(locale) {
|
1514 | if (locale === this.currentLocale) {
|
1515 | return;
|
1516 | }
|
1517 | this._locale.next(locale);
|
1518 | }
|
1519 | }
|
1520 | BsLocaleService.ɵfac = function BsLocaleService_Factory(t) { return new (t || BsLocaleService)(); };
|
1521 | BsLocaleService.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: BsLocaleService, factory: BsLocaleService.ɵfac });
|
1522 | (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BsLocaleService, [{
|
1523 | type: Injectable
|
1524 | }], function () { return []; }, null); })();
|
1525 |
|
1526 | class BsDatepickerEffects {
|
1527 | constructor(_actions, _localeService) {
|
1528 | this._actions = _actions;
|
1529 | this._localeService = _localeService;
|
1530 | this._subs = [];
|
1531 | }
|
1532 | init(_bsDatepickerStore) {
|
1533 | this._store = _bsDatepickerStore;
|
1534 | return this;
|
1535 | }
|
1536 |
|
1537 | setValue(value) {
|
1538 | var _a;
|
1539 | (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.select(value));
|
1540 | }
|
1541 | setRangeValue(value) {
|
1542 | var _a;
|
1543 | (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.selectRange(value));
|
1544 | }
|
1545 | setMinDate(value) {
|
1546 | var _a;
|
1547 | (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.minDate(value));
|
1548 | return this;
|
1549 | }
|
1550 | setMaxDate(value) {
|
1551 | var _a;
|
1552 | (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.maxDate(value));
|
1553 | return this;
|
1554 | }
|
1555 | setDaysDisabled(value) {
|
1556 | var _a;
|
1557 | (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.daysDisabled(value));
|
1558 | return this;
|
1559 | }
|
1560 | setDatesDisabled(value) {
|
1561 | var _a;
|
1562 | (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.datesDisabled(value));
|
1563 | return this;
|
1564 | }
|
1565 | setDatesEnabled(value) {
|
1566 | var _a;
|
1567 | (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.datesEnabled(value));
|
1568 | return this;
|
1569 | }
|
1570 | setDisabled(value) {
|
1571 | var _a;
|
1572 | (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.isDisabled(value));
|
1573 | return this;
|
1574 | }
|
1575 | setDateCustomClasses(value) {
|
1576 | var _a;
|
1577 | (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.setDateCustomClasses(value));
|
1578 | return this;
|
1579 | }
|
1580 | setDateTooltipTexts(value) {
|
1581 | var _a;
|
1582 | (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.setDateTooltipTexts(value));
|
1583 | return this;
|
1584 | }
|
1585 |
|
1586 | setOptions(_config) {
|
1587 | var _a;
|
1588 | const _options = Object.assign({ locale: this._localeService.currentLocale }, _config);
|
1589 | (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.setOptions(_options));
|
1590 | return this;
|
1591 | }
|
1592 |
|
1593 | setBindings(container) {
|
1594 | if (!this._store) {
|
1595 | return this;
|
1596 | }
|
1597 | container.daysCalendar$ = this._store.select(state => state.flaggedMonths)
|
1598 | .pipe(filter(months => !!months));
|
1599 |
|
1600 | container.monthsCalendar = this._store.select(state => state.flaggedMonthsCalendar)
|
1601 | .pipe(filter(months => !!months));
|
1602 |
|
1603 | container.yearsCalendar = this._store.select(state => state.yearsCalendarFlagged)
|
1604 | .pipe(filter(years => !!years));
|
1605 | container.viewMode = this._store.select(state => { var _a; return (_a = state.view) === null || _a === void 0 ? void 0 : _a.mode; });
|
1606 | container.options$ = combineLatest([
|
1607 | this._store.select(state => state.showWeekNumbers),
|
1608 | this._store.select(state => state.displayMonths)
|
1609 | ])
|
1610 | .pipe(map((latest) => ({
|
1611 | showWeekNumbers: latest[0],
|
1612 | displayMonths: latest[1]
|
1613 | })));
|
1614 | return this;
|
1615 | }
|
1616 |
|
1617 | setEventHandlers(container) {
|
1618 | container.setViewMode = (event) => {
|
1619 | var _a;
|
1620 | (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.changeViewMode(event));
|
1621 | };
|
1622 | container.navigateTo = (event) => {
|
1623 | var _a;
|
1624 | (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.navigateStep(event.step));
|
1625 | };
|
1626 | container.dayHoverHandler = (event) => {
|
1627 | var _a;
|
1628 | const _cell = event.cell;
|
1629 | if (_cell.isOtherMonth || _cell.isDisabled) {
|
1630 | return;
|
1631 | }
|
1632 | (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.hoverDay(event));
|
1633 | _cell.isHovered = event.isHovered;
|
1634 | };
|
1635 | container.monthHoverHandler = (event) => {
|
1636 | event.cell.isHovered = event.isHovered;
|
1637 | };
|
1638 | container.yearHoverHandler = (event) => {
|
1639 | event.cell.isHovered = event.isHovered;
|
1640 | };
|
1641 | return this;
|
1642 | }
|
1643 | registerDatepickerSideEffects() {
|
1644 | if (!this._store) {
|
1645 | return this;
|
1646 | }
|
1647 | this._subs.push(this._store.select(state => state.view).subscribe(() => {
|
1648 | var _a;
|
1649 | (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.calculate());
|
1650 | }));
|
1651 |
|
1652 | this._subs.push(this._store
|
1653 | .select(state => state.monthsModel)
|
1654 | .pipe(filter(monthModel => !!monthModel))
|
1655 | .subscribe(() => { var _a; return (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.format()); }));
|
1656 |
|
1657 | this._subs.push(this._store
|
1658 | .select(state => state.formattedMonths)
|
1659 | .pipe(filter(month => !!month))
|
1660 | .subscribe(() => { var _a; return (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.flag()); }));
|
1661 |
|
1662 | this._subs.push(this._store
|
1663 | .select(state => state.selectedDate)
|
1664 | .pipe(filter(selectedDate => !!selectedDate))
|
1665 | .subscribe(() => { var _a; return (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.flag()); }));
|
1666 |
|
1667 | this._subs.push(this._store
|
1668 | .select(state => state.selectedRange)
|
1669 | .pipe(filter(selectedRange => !!selectedRange))
|
1670 | .subscribe(() => { var _a; return (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.flag()); }));
|
1671 |
|
1672 | this._subs.push(this._store
|
1673 | .select(state => state.monthsCalendar)
|
1674 | .subscribe(() => { var _a; return (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.flag()); }));
|
1675 |
|
1676 | this._subs.push(this._store
|
1677 | .select(state => state.yearsCalendarModel)
|
1678 | .pipe(filter(state => !!state))
|
1679 | .subscribe(() => { var _a; return (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.flag()); }));
|
1680 |
|
1681 | this._subs.push(this._store
|
1682 | .select(state => state.hoveredDate)
|
1683 | .pipe(filter(hoveredDate => !!hoveredDate))
|
1684 | .subscribe(() => { var _a; return (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.flag()); }));
|
1685 |
|
1686 | this._subs.push(this._store
|
1687 | .select(state => state.dateCustomClasses)
|
1688 | .pipe(filter(dateCustomClasses => !!dateCustomClasses))
|
1689 | .subscribe(() => { var _a; return (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.flag()); }));
|
1690 |
|
1691 | this._subs.push(this._store
|
1692 | .select(state => state.dateTooltipTexts)
|
1693 | .pipe(filter(dateTooltipTexts => !!dateTooltipTexts))
|
1694 | .subscribe(() => { var _a; return (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.flag()); }));
|
1695 |
|
1696 | this._subs.push(this._localeService.localeChange
|
1697 | .subscribe(locale => { var _a; return (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.setLocale(locale)); }));
|
1698 | return this;
|
1699 | }
|
1700 | destroy() {
|
1701 | for (const sub of this._subs) {
|
1702 | sub.unsubscribe();
|
1703 | }
|
1704 | }
|
1705 | }
|
1706 | BsDatepickerEffects.ɵfac = function BsDatepickerEffects_Factory(t) { return new (t || BsDatepickerEffects)(ɵngcc0.ɵɵinject(BsDatepickerActions), ɵngcc0.ɵɵinject(BsLocaleService)); };
|
1707 | BsDatepickerEffects.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: BsDatepickerEffects, factory: BsDatepickerEffects.ɵfac });
|
1708 | BsDatepickerEffects.ctorParameters = () => [
|
1709 | { type: BsDatepickerActions },
|
1710 | { type: BsLocaleService }
|
1711 | ];
|
1712 | (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BsDatepickerEffects, [{
|
1713 | type: Injectable
|
1714 | }], function () { return [{ type: BsDatepickerActions }, { type: BsLocaleService }]; }, null); })();
|
1715 |
|
1716 | const defaultMonthOptions = {
|
1717 | width: 7,
|
1718 | height: 6
|
1719 | };
|
1720 | const dayInMilliseconds = 24 * 60 * 60 * 1000;
|
1721 |
|
1722 | class BsDatepickerState {
|
1723 | constructor() {
|
1724 |
|
1725 | this.showWeekNumbers = true;
|
1726 | this.displayMonths = 1;
|
1727 | }
|
1728 | }
|
1729 | const _initialView = { date: new Date(), mode: 'day' };
|
1730 | const initialDatepickerState = Object.assign(new BsDatepickerConfig(), {
|
1731 | locale: 'en',
|
1732 | view: _initialView,
|
1733 | selectedRange: [],
|
1734 | monthViewOptions: defaultMonthOptions
|
1735 | });
|
1736 |
|
1737 | function getStartingDayOfCalendar(date, options) {
|
1738 | if (isFirstDayOfWeek(date, options.firstDayOfWeek)) {
|
1739 | return date;
|
1740 | }
|
1741 | const weekDay = getDay(date);
|
1742 | const offset = calculateDateOffset(weekDay, options.firstDayOfWeek);
|
1743 | return shiftDate(date, { day: -offset });
|
1744 | }
|
1745 | function calculateDateOffset(weekday, startingDayOffset) {
|
1746 | const _startingDayOffset = Number(startingDayOffset);
|
1747 | if (isNaN(_startingDayOffset)) {
|
1748 | return 0;
|
1749 | }
|
1750 | if (_startingDayOffset === 0) {
|
1751 | return weekday;
|
1752 | }
|
1753 | const offset = weekday - _startingDayOffset % 7;
|
1754 | return offset < 0 ? offset + 7 : offset;
|
1755 | }
|
1756 | function isMonthDisabled(date, min, max) {
|
1757 | const minBound = min && isBefore(endOf(date, 'month'), min, 'day');
|
1758 | const maxBound = max && isAfter(startOf(date, 'month'), max, 'day');
|
1759 | return minBound || maxBound || false;
|
1760 | }
|
1761 | function isYearDisabled(date, min, max) {
|
1762 | const minBound = min && isBefore(endOf(date, 'year'), min, 'day');
|
1763 | const maxBound = max && isAfter(startOf(date, 'year'), max, 'day');
|
1764 | return minBound || maxBound || false;
|
1765 | }
|
1766 | function isDisabledDate(date, datesDisabled) {
|
1767 | if (!datesDisabled || !isArray(datesDisabled) || !datesDisabled.length) {
|
1768 | return false;
|
1769 | }
|
1770 | return datesDisabled.some((dateDisabled) => isSame(date, dateDisabled, 'date'));
|
1771 | }
|
1772 | function isEnabledDate(date, datesEnabled) {
|
1773 | if (!datesEnabled || !isArray(datesEnabled) || !datesEnabled.length) {
|
1774 | return false;
|
1775 | }
|
1776 | return !datesEnabled.some((enabledDate) => isSame(date, enabledDate, 'date'));
|
1777 | }
|
1778 | function getYearsCalendarInitialDate(state, calendarIndex = 0) {
|
1779 | const model = state && state.yearsCalendarModel && state.yearsCalendarModel[calendarIndex];
|
1780 | return (model === null || model === void 0 ? void 0 : model.years[0]) && model.years[0][0] && model.years[0][0].date;
|
1781 | }
|
1782 | function checkRangesWithMaxDate(ranges, maxDate) {
|
1783 | if (!ranges)
|
1784 | return ranges;
|
1785 | if (!maxDate)
|
1786 | return ranges;
|
1787 | if (!ranges.length && !ranges[0].value)
|
1788 | return ranges;
|
1789 | ranges.forEach((item) => {
|
1790 | if (!item || !item.value)
|
1791 | return ranges;
|
1792 | if (item.value instanceof Date)
|
1793 | return ranges;
|
1794 | if (!(item.value instanceof Array && item.value.length))
|
1795 | return ranges;
|
1796 | item.value = compareDateWithMaxDateHelper(item.value, maxDate);
|
1797 | return ranges;
|
1798 | });
|
1799 | return ranges;
|
1800 | }
|
1801 | function checkBsValue(date, maxDate) {
|
1802 | if (!date)
|
1803 | return date;
|
1804 | if (!maxDate)
|
1805 | return date;
|
1806 | if (date instanceof Array && !date.length)
|
1807 | return date;
|
1808 | if (date instanceof Date)
|
1809 | return date;
|
1810 | return compareDateWithMaxDateHelper(date, maxDate);
|
1811 | }
|
1812 | function compareDateWithMaxDateHelper(date, maxDate) {
|
1813 | if (date instanceof Array) {
|
1814 | const editedValues = date.map(item => {
|
1815 | if (!item)
|
1816 | return item;
|
1817 | if (isAfter(item, maxDate, 'date'))
|
1818 | item = maxDate;
|
1819 | return item;
|
1820 | });
|
1821 | return editedValues;
|
1822 | }
|
1823 | return date;
|
1824 | }
|
1825 |
|
1826 | function createMatrix(options, fn) {
|
1827 | let prevValue = options.initialDate;
|
1828 | const matrix = new Array(options.height);
|
1829 | for (let i = 0; i < options.height; i++) {
|
1830 | matrix[i] = new Array(options.width);
|
1831 | for (let j = 0; j < options.width; j++) {
|
1832 | matrix[i][j] = fn(prevValue);
|
1833 | prevValue = shiftDate(prevValue, options.shift);
|
1834 | }
|
1835 | }
|
1836 | return matrix;
|
1837 | }
|
1838 |
|
1839 |
|
1840 | function calcDaysCalendar(startingDate, options) {
|
1841 | const firstDay = getFirstDayOfMonth(startingDate);
|
1842 | const initialDate = getStartingDayOfCalendar(firstDay, options);
|
1843 |
|
1844 | const matrixOptions = {
|
1845 | width: options.width || 0,
|
1846 | height: options.height || 0,
|
1847 | initialDate,
|
1848 | shift: { day: 1 }
|
1849 | };
|
1850 | const daysMatrix = createMatrix(matrixOptions, date => date);
|
1851 | return {
|
1852 | daysMatrix,
|
1853 | month: firstDay
|
1854 | };
|
1855 | }
|
1856 |
|
1857 | function formatDaysCalendar(daysCalendar, formatOptions, monthIndex) {
|
1858 | return {
|
1859 | month: daysCalendar.month,
|
1860 | monthTitle: formatDate(daysCalendar.month, formatOptions.monthTitle, formatOptions.locale),
|
1861 | yearTitle: formatDate(daysCalendar.month, formatOptions.yearTitle, formatOptions.locale),
|
1862 | weekNumbers: getWeekNumbers(daysCalendar.daysMatrix, formatOptions.weekNumbers, formatOptions.locale),
|
1863 | weekdays: getShiftedWeekdays(formatOptions.locale),
|
1864 | weeks: daysCalendar.daysMatrix.map((week, weekIndex) => ({
|
1865 | days: week.map((date, dayIndex) => ({
|
1866 | date,
|
1867 | label: formatDate(date, formatOptions.dayLabel, formatOptions.locale),
|
1868 | monthIndex,
|
1869 | weekIndex,
|
1870 | dayIndex
|
1871 | }))
|
1872 | })),
|
1873 | hideLeftArrow: false,
|
1874 | hideRightArrow: false,
|
1875 | disableLeftArrow: false,
|
1876 | disableRightArrow: false
|
1877 | };
|
1878 | }
|
1879 | function getWeekNumbers(daysMatrix, format, locale) {
|
1880 | return daysMatrix.map((days) => (days[0] ? formatDate(days[0], format, locale) : ''));
|
1881 | }
|
1882 | function getShiftedWeekdays(locale) {
|
1883 | const _locale = getLocale(locale);
|
1884 | const weekdays = _locale.weekdaysShort();
|
1885 | const firstDayOfWeek = _locale.firstDayOfWeek();
|
1886 | return [...weekdays.slice(firstDayOfWeek), ...weekdays.slice(0, firstDayOfWeek)];
|
1887 | }
|
1888 |
|
1889 | function flagDaysCalendar(formattedMonth, options) {
|
1890 | formattedMonth.weeks.forEach((week) => {
|
1891 | week.days.forEach((day, dayIndex) => {
|
1892 |
|
1893 | const isOtherMonth = !isSameMonth(day.date, formattedMonth.month);
|
1894 | const isHovered = !isOtherMonth && isSameDay(day.date, options.hoveredDate);
|
1895 |
|
1896 | const isSelectionStart = !isOtherMonth &&
|
1897 | options.selectedRange &&
|
1898 | isSameDay(day.date, options.selectedRange[0]);
|
1899 | const isSelectionEnd = !isOtherMonth &&
|
1900 | options.selectedRange &&
|
1901 | isSameDay(day.date, options.selectedRange[1]);
|
1902 | const isSelected = (!isOtherMonth && isSameDay(day.date, options.selectedDate)) ||
|
1903 | isSelectionStart ||
|
1904 | isSelectionEnd;
|
1905 | const isInRange = !isOtherMonth &&
|
1906 | options.selectedRange &&
|
1907 | isDateInRange(day.date, options.selectedRange, options.hoveredDate);
|
1908 | const isDisabled = options.isDisabled ||
|
1909 | isBefore(day.date, options.minDate, 'day') ||
|
1910 | isAfter(day.date, options.maxDate, 'day') ||
|
1911 | isDisabledDay(day.date, options.daysDisabled) ||
|
1912 | isDisabledDate(day.date, options.datesDisabled) ||
|
1913 | isEnabledDate(day.date, options.datesEnabled);
|
1914 | const currentDate = new Date();
|
1915 | const isToday = !isOtherMonth && isSameDay(day.date, currentDate);
|
1916 | const customClasses = options.dateCustomClasses && options.dateCustomClasses
|
1917 | .map(dcc => isSameDay(day.date, dcc.date) ? dcc.classes : [])
|
1918 | .reduce((previousValue, currentValue) => previousValue.concat(currentValue), [])
|
1919 | .join(' ')
|
1920 | || '';
|
1921 | const tooltipText = options.dateTooltipTexts && options.dateTooltipTexts
|
1922 | .map(tt => isSameDay(day.date, tt.date) ? tt.tooltipText : '')
|
1923 | .reduce((previousValue, currentValue) => {
|
1924 | previousValue.push(currentValue);
|
1925 | return previousValue;
|
1926 | }, [])
|
1927 | .join(' ')
|
1928 | || '';
|
1929 |
|
1930 | const newDay = Object.assign({}, day, {
|
1931 | isOtherMonth,
|
1932 | isHovered,
|
1933 | isSelected,
|
1934 | isSelectionStart,
|
1935 | isSelectionEnd,
|
1936 | isInRange,
|
1937 | isDisabled,
|
1938 | isToday,
|
1939 | customClasses,
|
1940 | tooltipText
|
1941 | });
|
1942 | if (day.isOtherMonth !== newDay.isOtherMonth ||
|
1943 | day.isHovered !== newDay.isHovered ||
|
1944 | day.isSelected !== newDay.isSelected ||
|
1945 | day.isSelectionStart !== newDay.isSelectionStart ||
|
1946 | day.isSelectionEnd !== newDay.isSelectionEnd ||
|
1947 | day.isDisabled !== newDay.isDisabled ||
|
1948 | day.isInRange !== newDay.isInRange ||
|
1949 | day.customClasses !== newDay.customClasses ||
|
1950 | day.tooltipText !== newDay.tooltipText) {
|
1951 | week.days[dayIndex] = newDay;
|
1952 | }
|
1953 | });
|
1954 | });
|
1955 |
|
1956 | formattedMonth.hideLeftArrow =
|
1957 | options.isDisabled ||
|
1958 | (!!options.monthIndex && options.monthIndex > 0 && options.monthIndex !== options.displayMonths);
|
1959 | formattedMonth.hideRightArrow =
|
1960 | options.isDisabled ||
|
1961 | ((!!options.monthIndex || options.monthIndex === 0) && !!options.displayMonths && options.monthIndex < options.displayMonths &&
|
1962 | options.monthIndex + 1 !== options.displayMonths);
|
1963 | formattedMonth.disableLeftArrow = isMonthDisabled(shiftDate(formattedMonth.month, { month: -1 }), options.minDate, options.maxDate);
|
1964 | formattedMonth.disableRightArrow = isMonthDisabled(shiftDate(formattedMonth.month, { month: 1 }), options.minDate, options.maxDate);
|
1965 | return formattedMonth;
|
1966 | }
|
1967 | function isDateInRange(date, selectedRange, hoveredDate) {
|
1968 | if (!date || !selectedRange || !selectedRange[0]) {
|
1969 | return false;
|
1970 | }
|
1971 | if (selectedRange[1]) {
|
1972 | return date > selectedRange[0] && date <= selectedRange[1];
|
1973 | }
|
1974 | if (hoveredDate) {
|
1975 | return date > selectedRange[0] && date <= hoveredDate;
|
1976 | }
|
1977 | return false;
|
1978 | }
|
1979 |
|
1980 | function canSwitchMode(mode, minMode) {
|
1981 | return minMode ? mode >= minMode : true;
|
1982 | }
|
1983 |
|
1984 | const height = 4;
|
1985 | const width = 3;
|
1986 | const shift = { month: 1 };
|
1987 | function formatMonthsCalendar(viewDate, formatOptions) {
|
1988 | const initialDate = startOf(viewDate, 'year');
|
1989 | const matrixOptions = { width, height, initialDate, shift };
|
1990 | const monthMatrix = createMatrix(matrixOptions, date => ({
|
1991 | date,
|
1992 | label: formatDate(date, formatOptions.monthLabel, formatOptions.locale)
|
1993 | }));
|
1994 | return {
|
1995 | months: monthMatrix,
|
1996 | monthTitle: '',
|
1997 | yearTitle: formatDate(viewDate, formatOptions.yearTitle, formatOptions.locale),
|
1998 | hideRightArrow: false,
|
1999 | hideLeftArrow: false,
|
2000 | disableRightArrow: false,
|
2001 | disableLeftArrow: false
|
2002 | };
|
2003 | }
|
2004 |
|
2005 | function flagMonthsCalendar(monthCalendar, options) {
|
2006 | monthCalendar.months.forEach((months, rowIndex) => {
|
2007 | months.forEach((month, monthIndex) => {
|
2008 | let isSelected;
|
2009 | const isHovered = isSameMonth(month.date, options.hoveredMonth);
|
2010 | const isDisabled = options.isDisabled ||
|
2011 | isMonthDisabled(month.date, options.minDate, options.maxDate);
|
2012 | if (!options.selectedDate && options.selectedRange) {
|
2013 | isSelected = isSameMonth(month.date, options.selectedRange[0]);
|
2014 | if (!isSelected) {
|
2015 | isSelected = isSameMonth(month.date, options.selectedRange[1]);
|
2016 | }
|
2017 | }
|
2018 | else {
|
2019 | isSelected = isSameMonth(month.date, options.selectedDate);
|
2020 | }
|
2021 | const newMonth = Object.assign( month, {
|
2022 | isHovered,
|
2023 | isDisabled,
|
2024 | isSelected
|
2025 | });
|
2026 | if (month.isHovered !== newMonth.isHovered ||
|
2027 | month.isDisabled !== newMonth.isDisabled ||
|
2028 | month.isSelected !== newMonth.isSelected) {
|
2029 | monthCalendar.months[rowIndex][monthIndex] = newMonth;
|
2030 | }
|
2031 | });
|
2032 | });
|
2033 |
|
2034 | monthCalendar.hideLeftArrow =
|
2035 | !!options.monthIndex && options.monthIndex > 0 && options.monthIndex !== options.displayMonths;
|
2036 | monthCalendar.hideRightArrow =
|
2037 | (!!options.monthIndex || options.monthIndex === 0)
|
2038 | && (!!options.displayMonths || options.displayMonths === 0)
|
2039 | && options.monthIndex < options.displayMonths
|
2040 | && options.monthIndex + 1 !== options.displayMonths;
|
2041 | monthCalendar.disableLeftArrow = isYearDisabled(shiftDate(monthCalendar.months[0][0].date, { year: -1 }), options.minDate, options.maxDate);
|
2042 | monthCalendar.disableRightArrow = isYearDisabled(shiftDate(monthCalendar.months[0][0].date, { year: 1 }), options.minDate, options.maxDate);
|
2043 | return monthCalendar;
|
2044 | }
|
2045 |
|
2046 | const height$1 = 4;
|
2047 | const width$1 = 4;
|
2048 | const yearsPerCalendar = height$1 * width$1;
|
2049 | const initialYearShift = (Math.floor(yearsPerCalendar / 2) - 1) * -1;
|
2050 | const shift$1 = { year: 1 };
|
2051 | function formatYearsCalendar(viewDate, formatOptions, previousInitialDate) {
|
2052 | const initialDate = calculateInitialDate(viewDate, previousInitialDate);
|
2053 | const matrixOptions = { width: width$1, height: height$1, initialDate, shift: shift$1 };
|
2054 | const yearsMatrix = createMatrix(matrixOptions, date => ({
|
2055 | date,
|
2056 | label: formatDate(date, formatOptions.yearLabel, formatOptions.locale)
|
2057 | }));
|
2058 | const yearTitle = formatYearRangeTitle(yearsMatrix, formatOptions);
|
2059 | return {
|
2060 | years: yearsMatrix,
|
2061 | monthTitle: '',
|
2062 | yearTitle,
|
2063 | hideLeftArrow: false,
|
2064 | hideRightArrow: false,
|
2065 | disableLeftArrow: false,
|
2066 | disableRightArrow: false
|
2067 | };
|
2068 | }
|
2069 | function calculateInitialDate(viewDate, previousInitialDate) {
|
2070 | if (previousInitialDate
|
2071 | && viewDate.getFullYear() >= previousInitialDate.getFullYear()
|
2072 | && viewDate.getFullYear() < previousInitialDate.getFullYear() + yearsPerCalendar) {
|
2073 | return previousInitialDate;
|
2074 | }
|
2075 | return shiftDate(viewDate, { year: initialYearShift });
|
2076 | }
|
2077 | function formatYearRangeTitle(yearsMatrix, formatOptions) {
|
2078 | const from = formatDate(yearsMatrix[0][0].date, formatOptions.yearTitle, formatOptions.locale);
|
2079 | const to = formatDate(yearsMatrix[height$1 - 1][width$1 - 1].date, formatOptions.yearTitle, formatOptions.locale);
|
2080 | return `${from} - ${to}`;
|
2081 | }
|
2082 |
|
2083 | function flagYearsCalendar(yearsCalendar, options) {
|
2084 | yearsCalendar.years.forEach((years, rowIndex) => {
|
2085 | years.forEach((year, yearIndex) => {
|
2086 | let isSelected;
|
2087 | const isHovered = isSameYear(year.date, options.hoveredYear);
|
2088 | const isDisabled = options.isDisabled ||
|
2089 | isYearDisabled(year.date, options.minDate, options.maxDate);
|
2090 | if (!options.selectedDate && options.selectedRange) {
|
2091 | isSelected = isSameYear(year.date, options.selectedRange[0]);
|
2092 | if (!isSelected) {
|
2093 | isSelected = isSameYear(year.date, options.selectedRange[1]);
|
2094 | }
|
2095 | }
|
2096 | else {
|
2097 | isSelected = isSameYear(year.date, options.selectedDate);
|
2098 | }
|
2099 | const newMonth = Object.assign( year, { isHovered, isDisabled, isSelected });
|
2100 | if (year.isHovered !== newMonth.isHovered ||
|
2101 | year.isDisabled !== newMonth.isDisabled ||
|
2102 | year.isSelected !== newMonth.isSelected) {
|
2103 | yearsCalendar.years[rowIndex][yearIndex] = newMonth;
|
2104 | }
|
2105 | });
|
2106 | });
|
2107 |
|
2108 | yearsCalendar.hideLeftArrow =
|
2109 | !!options.yearIndex && options.yearIndex > 0 && options.yearIndex !== options.displayMonths;
|
2110 | yearsCalendar.hideRightArrow =
|
2111 | !!options.yearIndex && !!options.displayMonths &&
|
2112 | options.yearIndex < options.displayMonths &&
|
2113 | options.yearIndex + 1 !== options.displayMonths;
|
2114 | yearsCalendar.disableLeftArrow = isYearDisabled(shiftDate(yearsCalendar.years[0][0].date, { year: -1 }), options.minDate, options.maxDate);
|
2115 | const i = yearsCalendar.years.length - 1;
|
2116 | const j = yearsCalendar.years[i].length - 1;
|
2117 | yearsCalendar.disableRightArrow = isYearDisabled(shiftDate(yearsCalendar.years[i][j].date, { year: 1 }), options.minDate, options.maxDate);
|
2118 | return yearsCalendar;
|
2119 | }
|
2120 |
|
2121 | function bsDatepickerReducer(state = initialDatepickerState, action) {
|
2122 | switch (action.type) {
|
2123 | case BsDatepickerActions.CALCULATE: {
|
2124 | return calculateReducer(state);
|
2125 | }
|
2126 | case BsDatepickerActions.FORMAT: {
|
2127 | return formatReducer(state);
|
2128 | }
|
2129 | case BsDatepickerActions.FLAG: {
|
2130 | return flagReducer(state);
|
2131 | }
|
2132 | case BsDatepickerActions.NAVIGATE_OFFSET: {
|
2133 | return navigateOffsetReducer(state, action);
|
2134 | }
|
2135 | case BsDatepickerActions.NAVIGATE_TO: {
|
2136 | const payload = action.payload;
|
2137 | if (!state.view || !payload.unit) {
|
2138 | return state;
|
2139 | }
|
2140 | const date = setFullDate(state.view.date, payload.unit);
|
2141 | let newState;
|
2142 | let mode;
|
2143 | if (canSwitchMode(payload.viewMode, state.minMode)) {
|
2144 | mode = payload.viewMode;
|
2145 | newState = { view: { date, mode } };
|
2146 | }
|
2147 | else {
|
2148 | mode = state.view.mode;
|
2149 | newState = { selectedDate: date, view: { date, mode } };
|
2150 | }
|
2151 | return Object.assign({}, state, newState);
|
2152 | }
|
2153 | case BsDatepickerActions.CHANGE_VIEWMODE: {
|
2154 | if (!canSwitchMode(action.payload, state.minMode) || !state.view) {
|
2155 | return state;
|
2156 | }
|
2157 | const date = state.view.date;
|
2158 | const mode = action.payload;
|
2159 | const newState = { view: { date, mode } };
|
2160 | return Object.assign({}, state, newState);
|
2161 | }
|
2162 | case BsDatepickerActions.HOVER: {
|
2163 | return Object.assign({}, state, { hoveredDate: action.payload });
|
2164 | }
|
2165 | case BsDatepickerActions.SELECT: {
|
2166 | if (!state.view) {
|
2167 | return state;
|
2168 | }
|
2169 | const newState = {
|
2170 | selectedDate: action.payload,
|
2171 | view: state.view
|
2172 | };
|
2173 | const mode = state.view.mode;
|
2174 | const _date = action.payload || state.view.date;
|
2175 | const date = getViewDate(_date, state.minDate, state.maxDate);
|
2176 | newState.view = { mode, date };
|
2177 | return Object.assign({}, state, newState);
|
2178 | }
|
2179 | case BsDatepickerActions.SET_OPTIONS: {
|
2180 | if (!state.view) {
|
2181 | return state;
|
2182 | }
|
2183 | const newState = action.payload;
|
2184 |
|
2185 | const mode = newState.minMode ? newState.minMode : state.view.mode;
|
2186 | const _viewDate = isDateValid(newState.value) && newState.value
|
2187 | || isArray(newState.value) && isDateValid(newState.value[0]) && newState.value[0]
|
2188 | || state.view.date;
|
2189 | const date = getViewDate(_viewDate, newState.minDate, newState.maxDate);
|
2190 | newState.view = { mode, date };
|
2191 |
|
2192 | if (newState.value) {
|
2193 |
|
2194 | if (isArray(newState.value)) {
|
2195 | newState.selectedRange = newState.value;
|
2196 | }
|
2197 |
|
2198 | if (newState.value instanceof Date) {
|
2199 | newState.selectedDate = newState.value;
|
2200 | }
|
2201 |
|
2202 |
|
2203 | }
|
2204 | return Object.assign({}, state, newState);
|
2205 | }
|
2206 |
|
2207 | case BsDatepickerActions.SELECT_RANGE: {
|
2208 | if (!state.view) {
|
2209 | return state;
|
2210 | }
|
2211 | const newState = {
|
2212 | selectedRange: action.payload,
|
2213 | view: state.view
|
2214 | };
|
2215 | const mode = state.view.mode;
|
2216 | const _date = action.payload && action.payload[0] || state.view.date;
|
2217 | const date = getViewDate(_date, state.minDate, state.maxDate);
|
2218 | newState.view = { mode, date };
|
2219 | return Object.assign({}, state, newState);
|
2220 | }
|
2221 | case BsDatepickerActions.SET_MIN_DATE: {
|
2222 | return Object.assign({}, state, {
|
2223 | minDate: action.payload
|
2224 | });
|
2225 | }
|
2226 | case BsDatepickerActions.SET_MAX_DATE: {
|
2227 | return Object.assign({}, state, {
|
2228 | maxDate: action.payload
|
2229 | });
|
2230 | }
|
2231 | case BsDatepickerActions.SET_IS_DISABLED: {
|
2232 | return Object.assign({}, state, {
|
2233 | isDisabled: action.payload
|
2234 | });
|
2235 | }
|
2236 | case BsDatepickerActions.SET_DATE_CUSTOM_CLASSES: {
|
2237 | return Object.assign({}, state, {
|
2238 | dateCustomClasses: action.payload
|
2239 | });
|
2240 | }
|
2241 | case BsDatepickerActions.SET_DATE_TOOLTIP_TEXTS: {
|
2242 | return Object.assign({}, state, {
|
2243 | dateTooltipTexts: action.payload
|
2244 | });
|
2245 | }
|
2246 | default:
|
2247 | return state;
|
2248 | }
|
2249 | }
|
2250 | function calculateReducer(state) {
|
2251 | if (!state.view) {
|
2252 | return state;
|
2253 | }
|
2254 |
|
2255 | let displayMonths;
|
2256 | if (state.displayOneMonthRange &&
|
2257 | isDisplayOneMonth(state.view.date, state.minDate, state.maxDate)) {
|
2258 | displayMonths = 1;
|
2259 | }
|
2260 | else {
|
2261 | displayMonths = state.displayMonths || 1;
|
2262 | }
|
2263 |
|
2264 | let viewDate = state.view.date;
|
2265 | if (state.view.mode === 'day' && state.monthViewOptions) {
|
2266 | if (state.showPreviousMonth && state.selectedRange && state.selectedRange.length === 0) {
|
2267 | viewDate = shiftDate(viewDate, { month: -1 });
|
2268 | }
|
2269 | state.monthViewOptions.firstDayOfWeek = getLocale(state.locale).firstDayOfWeek();
|
2270 | let monthsModel = new Array(displayMonths);
|
2271 | for (let monthIndex = 0; monthIndex < displayMonths; monthIndex++) {
|
2272 |
|
2273 | monthsModel[monthIndex] = calcDaysCalendar(viewDate, state.monthViewOptions);
|
2274 | viewDate = shiftDate(viewDate, { month: 1 });
|
2275 | }
|
2276 |
|
2277 | if (state.preventChangeToNextMonth && state.flaggedMonths && state.hoveredDate) {
|
2278 | const viewMonth = calcDaysCalendar(state.view.date, state.monthViewOptions);
|
2279 |
|
2280 | if (state.flaggedMonths.length && state.flaggedMonths[1].month.getMonth() === viewMonth.month.getMonth()) {
|
2281 | monthsModel = state.flaggedMonths
|
2282 | .map(item => {
|
2283 | if (state.monthViewOptions) {
|
2284 | return calcDaysCalendar(item.month, state.monthViewOptions);
|
2285 | }
|
2286 | return null;
|
2287 | })
|
2288 | .filter(item => item !== null);
|
2289 | }
|
2290 | }
|
2291 | return Object.assign({}, state, { monthsModel });
|
2292 | }
|
2293 | if (state.view.mode === 'month') {
|
2294 | const monthsCalendar = new Array(displayMonths);
|
2295 | for (let calendarIndex = 0; calendarIndex < displayMonths; calendarIndex++) {
|
2296 |
|
2297 | monthsCalendar[calendarIndex] = formatMonthsCalendar(viewDate, getFormatOptions(state));
|
2298 | viewDate = shiftDate(viewDate, { year: 1 });
|
2299 | }
|
2300 | return Object.assign({}, state, { monthsCalendar });
|
2301 | }
|
2302 | if (state.view.mode === 'year') {
|
2303 | const yearsCalendarModel = new Array(displayMonths);
|
2304 | for (let calendarIndex = 0; calendarIndex < displayMonths; calendarIndex++) {
|
2305 |
|
2306 | yearsCalendarModel[calendarIndex] = formatYearsCalendar(viewDate, getFormatOptions(state), state.minMode === 'year' ? getYearsCalendarInitialDate(state, calendarIndex) : undefined);
|
2307 | viewDate = shiftDate(viewDate, { year: yearsPerCalendar });
|
2308 | }
|
2309 | return Object.assign({}, state, { yearsCalendarModel });
|
2310 | }
|
2311 | return state;
|
2312 | }
|
2313 | function formatReducer(state) {
|
2314 | if (!state.view) {
|
2315 | return state;
|
2316 | }
|
2317 | if (state.view.mode === 'day' && state.monthsModel) {
|
2318 | const formattedMonths = state.monthsModel.map((month, monthIndex) => formatDaysCalendar(month, getFormatOptions(state), monthIndex));
|
2319 | return Object.assign({}, state, { formattedMonths });
|
2320 | }
|
2321 |
|
2322 | const displayMonths = state.displayMonths || 1;
|
2323 |
|
2324 |
|
2325 | let viewDate = state.view.date;
|
2326 | if (state.view.mode === 'month') {
|
2327 | const monthsCalendar = new Array(displayMonths);
|
2328 | for (let calendarIndex = 0; calendarIndex < displayMonths; calendarIndex++) {
|
2329 |
|
2330 | monthsCalendar[calendarIndex] = formatMonthsCalendar(viewDate, getFormatOptions(state));
|
2331 | viewDate = shiftDate(viewDate, { year: 1 });
|
2332 | }
|
2333 | return Object.assign({}, state, { monthsCalendar });
|
2334 | }
|
2335 | if (state.view.mode === 'year') {
|
2336 | const yearsCalendarModel = new Array(displayMonths);
|
2337 | for (let calendarIndex = 0; calendarIndex < displayMonths; calendarIndex++) {
|
2338 |
|
2339 | yearsCalendarModel[calendarIndex] = formatYearsCalendar(viewDate, getFormatOptions(state));
|
2340 | viewDate = shiftDate(viewDate, { year: 16 });
|
2341 | }
|
2342 | return Object.assign({}, state, { yearsCalendarModel });
|
2343 | }
|
2344 | return state;
|
2345 | }
|
2346 | function flagReducer(state) {
|
2347 | if (!state.view) {
|
2348 | return state;
|
2349 | }
|
2350 | const displayMonths = isDisplayOneMonth(state.view.date, state.minDate, state.maxDate) ? 1 : state.displayMonths;
|
2351 | if (state.formattedMonths && state.view.mode === 'day') {
|
2352 | const flaggedMonths = state.formattedMonths.map((formattedMonth, monthIndex) => flagDaysCalendar(formattedMonth, {
|
2353 | isDisabled: state.isDisabled,
|
2354 | minDate: state.minDate,
|
2355 | maxDate: state.maxDate,
|
2356 | daysDisabled: state.daysDisabled,
|
2357 | datesDisabled: state.datesDisabled,
|
2358 | datesEnabled: state.datesEnabled,
|
2359 | hoveredDate: state.hoveredDate,
|
2360 | selectedDate: state.selectedDate,
|
2361 | selectedRange: state.selectedRange,
|
2362 | displayMonths,
|
2363 | dateCustomClasses: state.dateCustomClasses,
|
2364 | dateTooltipTexts: state.dateTooltipTexts,
|
2365 | monthIndex
|
2366 | }));
|
2367 | return Object.assign({}, state, { flaggedMonths });
|
2368 | }
|
2369 | if (state.view.mode === 'month' && state.monthsCalendar) {
|
2370 | const flaggedMonthsCalendar = state.monthsCalendar.map((formattedMonth, monthIndex) => flagMonthsCalendar(formattedMonth, {
|
2371 | isDisabled: state.isDisabled,
|
2372 | minDate: state.minDate,
|
2373 | maxDate: state.maxDate,
|
2374 | hoveredMonth: state.hoveredMonth,
|
2375 | selectedDate: state.selectedDate,
|
2376 | selectedRange: state.selectedRange,
|
2377 | displayMonths,
|
2378 | monthIndex
|
2379 | }));
|
2380 | return Object.assign({}, state, { flaggedMonthsCalendar });
|
2381 | }
|
2382 | if (state.view.mode === 'year' && state.yearsCalendarModel) {
|
2383 | const yearsCalendarFlagged = state.yearsCalendarModel.map((formattedMonth, yearIndex) => flagYearsCalendar(formattedMonth, {
|
2384 | isDisabled: state.isDisabled,
|
2385 | minDate: state.minDate,
|
2386 | maxDate: state.maxDate,
|
2387 | hoveredYear: state.hoveredYear,
|
2388 | selectedDate: state.selectedDate,
|
2389 | selectedRange: state.selectedRange,
|
2390 | displayMonths,
|
2391 | yearIndex
|
2392 | }));
|
2393 | return Object.assign({}, state, { yearsCalendarFlagged });
|
2394 | }
|
2395 | return state;
|
2396 | }
|
2397 | function navigateOffsetReducer(state, action) {
|
2398 | if (!state.view) {
|
2399 | return state;
|
2400 | }
|
2401 | const date = shiftViewDate(state, action);
|
2402 | if (!date) {
|
2403 | return state;
|
2404 | }
|
2405 | const newState = {
|
2406 | view: {
|
2407 | mode: state.view.mode,
|
2408 | date
|
2409 | }
|
2410 | };
|
2411 | return Object.assign({}, state, newState);
|
2412 | }
|
2413 | function shiftViewDate(state, action) {
|
2414 | if (!state.view) {
|
2415 | return undefined;
|
2416 | }
|
2417 | if (state.view.mode === 'year' && state.minMode === 'year') {
|
2418 | const initialDate = getYearsCalendarInitialDate(state, 0);
|
2419 | if (initialDate) {
|
2420 | const middleDate = shiftDate(initialDate, { year: -initialYearShift });
|
2421 | return shiftDate(middleDate, action.payload);
|
2422 | }
|
2423 | }
|
2424 | return shiftDate(startOf(state.view.date, 'month'), action.payload);
|
2425 | }
|
2426 | function getFormatOptions(state) {
|
2427 | return {
|
2428 | locale: state.locale,
|
2429 | monthTitle: state.monthTitle,
|
2430 | yearTitle: state.yearTitle,
|
2431 | dayLabel: state.dayLabel,
|
2432 | monthLabel: state.monthLabel,
|
2433 | yearLabel: state.yearLabel,
|
2434 | weekNumbers: state.weekNumbers
|
2435 | };
|
2436 | }
|
2437 |
|
2438 |
|
2439 |
|
2440 |
|
2441 |
|
2442 |
|
2443 | function getViewDate(viewDate, minDate, maxDate) {
|
2444 | const _date = Array.isArray(viewDate) ? viewDate[0] : viewDate;
|
2445 | if (minDate && isAfter(minDate, _date, 'day')) {
|
2446 | return minDate;
|
2447 | }
|
2448 | if (maxDate && isBefore(maxDate, _date, 'day')) {
|
2449 | return maxDate;
|
2450 | }
|
2451 | return _date;
|
2452 | }
|
2453 | function isDisplayOneMonth(viewDate, minDate, maxDate) {
|
2454 | if (maxDate && isSame(maxDate, viewDate, 'day')) {
|
2455 | return true;
|
2456 | }
|
2457 | return minDate && maxDate && minDate.getMonth() === maxDate.getMonth();
|
2458 | }
|
2459 |
|
2460 | class BsDatepickerStore extends MiniStore {
|
2461 | constructor() {
|
2462 | const _dispatcher = new BehaviorSubject({
|
2463 | type: '[datepicker] dispatcher init'
|
2464 | });
|
2465 | const state = new MiniState(initialDatepickerState, _dispatcher, bsDatepickerReducer);
|
2466 | super(_dispatcher, bsDatepickerReducer, state);
|
2467 | }
|
2468 | }
|
2469 | BsDatepickerStore.ɵfac = function BsDatepickerStore_Factory(t) { return new (t || BsDatepickerStore)(); };
|
2470 | BsDatepickerStore.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: BsDatepickerStore, factory: BsDatepickerStore.ɵfac });
|
2471 | BsDatepickerStore.ctorParameters = () => [];
|
2472 | (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BsDatepickerStore, [{
|
2473 | type: Injectable
|
2474 | }], function () { return []; }, null); })();
|
2475 |
|
2476 | class BsDatepickerContainerComponent extends BsDatepickerAbstractComponent {
|
2477 | constructor(_renderer, _config, _store, _element, _actions, _effects, _positionService) {
|
2478 | super();
|
2479 | this._config = _config;
|
2480 | this._store = _store;
|
2481 | this._element = _element;
|
2482 | this._actions = _actions;
|
2483 | this._positionService = _positionService;
|
2484 | this.valueChange = new EventEmitter();
|
2485 | this.animationState = 'void';
|
2486 | this._subs = [];
|
2487 | this._effects = _effects;
|
2488 | _renderer.setStyle(_element.nativeElement, 'display', 'block');
|
2489 | _renderer.setStyle(_element.nativeElement, 'position', 'absolute');
|
2490 | }
|
2491 | set value(value) {
|
2492 | var _a;
|
2493 | (_a = this._effects) === null || _a === void 0 ? void 0 : _a.setValue(value);
|
2494 | }
|
2495 | ngOnInit() {
|
2496 | var _a, _b;
|
2497 | this._positionService.setOptions({
|
2498 | modifiers: { flip: { enabled: this._config.adaptivePosition } },
|
2499 | allowedPositions: ['top', 'bottom']
|
2500 | });
|
2501 | (_a = this._positionService.event$) === null || _a === void 0 ? void 0 : _a.pipe(take(1)).subscribe(() => {
|
2502 | this._positionService.disable();
|
2503 | if (this._config.isAnimated) {
|
2504 | this.animationState = this.isTopPosition ? 'animated-up' : 'animated-down';
|
2505 | return;
|
2506 | }
|
2507 | this.animationState = 'unanimated';
|
2508 | });
|
2509 | this.isOtherMonthsActive = this._config.selectFromOtherMonth;
|
2510 | this.containerClass = this._config.containerClass;
|
2511 | this.showTodayBtn = this._config.showTodayButton;
|
2512 | this.todayBtnLbl = this._config.todayButtonLabel;
|
2513 | this.todayPos = this._config.todayPosition;
|
2514 | this.showClearBtn = this._config.showClearButton;
|
2515 | this.clearBtnLbl = this._config.clearButtonLabel;
|
2516 | this.clearPos = this._config.clearPosition;
|
2517 | this.customRangeBtnLbl = this._config.customRangeButtonLabel;
|
2518 | (_b = this._effects) === null || _b === void 0 ? void 0 : _b.init(this._store).setOptions(this._config).setBindings(this).setEventHandlers(this).registerDatepickerSideEffects();
|
2519 |
|
2520 |
|
2521 | this._subs.push(this._store
|
2522 |
|
2523 | .select((state) => state.selectedDate)
|
2524 |
|
2525 | .subscribe((date) => this.valueChange.emit(date)));
|
2526 | this._store.dispatch(this._actions.changeViewMode(this._config.startView));
|
2527 | }
|
2528 | get isTopPosition() {
|
2529 | return this._element.nativeElement.classList.contains('top');
|
2530 | }
|
2531 | positionServiceEnable() {
|
2532 | this._positionService.enable();
|
2533 | }
|
2534 | daySelectHandler(day) {
|
2535 | if (!day) {
|
2536 | return;
|
2537 | }
|
2538 | const isDisabled = this.isOtherMonthsActive ? day.isDisabled : (day.isOtherMonth || day.isDisabled);
|
2539 | if (isDisabled) {
|
2540 | return;
|
2541 | }
|
2542 | this._store.dispatch(this._actions.select(day.date));
|
2543 | }
|
2544 | monthSelectHandler(day) {
|
2545 | if (!day || day.isDisabled) {
|
2546 | return;
|
2547 | }
|
2548 | this._store.dispatch(this._actions.navigateTo({
|
2549 | unit: {
|
2550 | month: getMonth(day.date),
|
2551 | year: getFullYear(day.date)
|
2552 | },
|
2553 | viewMode: 'day'
|
2554 | }));
|
2555 | }
|
2556 | yearSelectHandler(day) {
|
2557 | if (!day || day.isDisabled) {
|
2558 | return;
|
2559 | }
|
2560 | this._store.dispatch(this._actions.navigateTo({
|
2561 | unit: {
|
2562 | year: getFullYear(day.date)
|
2563 | },
|
2564 | viewMode: 'month'
|
2565 | }));
|
2566 | }
|
2567 | setToday() {
|
2568 | this._store.dispatch(this._actions.select(new Date()));
|
2569 | }
|
2570 | clearDate() {
|
2571 | this._store.dispatch(this._actions.select(undefined));
|
2572 | }
|
2573 | ngOnDestroy() {
|
2574 | var _a;
|
2575 | for (const sub of this._subs) {
|
2576 | sub.unsubscribe();
|
2577 | }
|
2578 | (_a = this._effects) === null || _a === void 0 ? void 0 : _a.destroy();
|
2579 | }
|
2580 | }
|
2581 | BsDatepickerContainerComponent.ɵfac = function BsDatepickerContainerComponent_Factory(t) { return new (t || BsDatepickerContainerComponent)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(BsDatepickerConfig), ɵngcc0.ɵɵdirectiveInject(BsDatepickerStore), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(BsDatepickerActions), ɵngcc0.ɵɵdirectiveInject(BsDatepickerEffects), ɵngcc0.ɵɵdirectiveInject(ɵngcc1.PositioningService)); };
|
2582 | BsDatepickerContainerComponent.ɵcmp = ɵngcc0.ɵɵdefineComponent({ type: BsDatepickerContainerComponent, selectors: [["bs-datepicker-container"]], hostAttrs: ["role", "dialog", "aria-label", "calendar", 1, "bottom"], hostBindings: function BsDatepickerContainerComponent_HostBindings(rf, ctx) { if (rf & 1) {
|
2583 | ɵngcc0.ɵɵlistener("click", function BsDatepickerContainerComponent_click_HostBindingHandler($event) { return ctx._stopPropagation($event); });
|
2584 | } }, features: [ɵngcc0.ɵɵProvidersFeature([BsDatepickerStore, BsDatepickerEffects]), ɵngcc0.ɵɵInheritDefinitionFeature], decls: 2, vars: 3, consts: [["class", "bs-datepicker", 3, "ngClass", 4, "ngIf"], [1, "bs-datepicker", 3, "ngClass"], [1, "bs-datepicker-container"], ["role", "application", 1, "bs-calendar-container", 3, "ngSwitch"], ["class", "bs-media-container", 4, "ngSwitchCase"], ["class", "bs-datepicker-buttons", 4, "ngIf"], ["class", "bs-datepicker-custom-range", 4, "ngIf"], [1, "bs-media-container"], [3, "bs-datepicker-multiple", "calendar", "options", "onNavigate", "onViewMode", "onHover", "onHoverWeek", "onSelect", 4, "ngFor", "ngForOf"], [3, "calendar", "options", "onNavigate", "onViewMode", "onHover", "onHoverWeek", "onSelect"], [3, "bs-datepicker-multiple", "calendar", "onNavigate", "onViewMode", "onHover", "onSelect", 4, "ngFor", "ngForOf"], [3, "calendar", "onNavigate", "onViewMode", "onHover", "onSelect"], [1, "bs-datepicker-buttons"], ["type", "button", 1, "btn", "btn-success"], ["type", "button", 1, "btn", "btn-default"], ["class", "btn-today-wrapper", 3, "today-left", "today-right", "today-center", 4, "ngIf"], ["class", "btn-clear-wrapper", 3, "clear-left", "clear-right", "clear-center", 4, "ngIf"], [1, "btn-today-wrapper"], [1, "btn", "btn-success", 3, "click"], [1, "btn-clear-wrapper"], [1, "bs-datepicker-custom-range"], [3, "selectedRange", "ranges", "customRangeLabel", "onSelect"]], template: function BsDatepickerContainerComponent_Template(rf, ctx) { if (rf & 1) {
|
2585 | ɵngcc0.ɵɵtemplate(0, BsDatepickerContainerComponent_div_0_Template, 10, 11, "div", 0);
|
2586 | ɵngcc0.ɵɵpipe(1, "async");
|
2587 | } if (rf & 2) {
|
2588 | ɵngcc0.ɵɵproperty("ngIf", ɵngcc0.ɵɵpipeBind1(1, 1, ctx.viewMode));
|
2589 | } }, directives: function () { return [ɵngcc2.NgIf, ɵngcc2.NgClass, ɵngcc2.NgSwitch, ɵngcc2.NgSwitchCase, ɵngcc2.NgForOf, BsDaysCalendarViewComponent, BsMonthCalendarViewComponent, BsYearsCalendarViewComponent, BsCustomDatesViewComponent]; }, pipes: function () { return [ɵngcc2.AsyncPipe]; }, encapsulation: 2, data: { animation: [datepickerAnimation] } });
|
2590 | BsDatepickerContainerComponent.ctorParameters = () => [
|
2591 | { type: Renderer2 },
|
2592 | { type: BsDatepickerConfig },
|
2593 | { type: BsDatepickerStore },
|
2594 | { type: ElementRef },
|
2595 | { type: BsDatepickerActions },
|
2596 | { type: BsDatepickerEffects },
|
2597 | { type: PositioningService }
|
2598 | ];
|
2599 | (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BsDatepickerContainerComponent, [{
|
2600 | type: Component,
|
2601 | args: [{
|
2602 | selector: 'bs-datepicker-container',
|
2603 | providers: [BsDatepickerStore, BsDatepickerEffects],
|
2604 | template: "<!-- days calendar view mode -->\n<div class=\"bs-datepicker\" [ngClass]=\"containerClass\" *ngIf=\"viewMode | async\">\n <div class=\"bs-datepicker-container\"\n [@datepickerAnimation]=\"animationState\"\n (@datepickerAnimation.done)=\"positionServiceEnable()\">\n <!--calendars-->\n <div class=\"bs-calendar-container\" [ngSwitch]=\"viewMode | async\" role=\"application\">\n <!--days calendar-->\n <div *ngSwitchCase=\"'day'\" class=\"bs-media-container\">\n <bs-days-calendar-view\n *ngFor=\"let calendar of daysCalendar$ | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n [options]=\"options$ | async\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"dayHoverHandler($event)\"\n (onHoverWeek)=\"weekHoverHandler($event)\"\n (onSelect)=\"daySelectHandler($event)\">\n </bs-days-calendar-view>\n </div>\n\n <!--months calendar-->\n <div *ngSwitchCase=\"'month'\" class=\"bs-media-container\">\n <bs-month-calendar-view\n *ngFor=\"let calendar of monthsCalendar | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"monthHoverHandler($event)\"\n (onSelect)=\"monthSelectHandler($event)\">\n </bs-month-calendar-view>\n </div>\n\n <!--years calendar-->\n <div *ngSwitchCase=\"'year'\" class=\"bs-media-container\">\n <bs-years-calendar-view\n *ngFor=\"let calendar of yearsCalendar | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"yearHoverHandler($event)\"\n (onSelect)=\"yearSelectHandler($event)\">\n </bs-years-calendar-view>\n </div>\n </div>\n\n <!--applycancel buttons-->\n <div class=\"bs-datepicker-buttons\" *ngIf=\"false\">\n <button class=\"btn btn-success\" type=\"button\">Apply</button>\n <button class=\"btn btn-default\" type=\"button\">Cancel</button>\n </div>\n\n <div class=\"bs-datepicker-buttons\" *ngIf=\"showTodayBtn || showClearBtn\">\n <div class=\"btn-today-wrapper\"\n [class.today-left]=\"todayPos === 'left'\"\n [class.today-right]=\"todayPos === 'right'\"\n [class.today-center]=\"todayPos === 'center'\"\n *ngIf=\"showTodayBtn\">\n <button class=\"btn btn-success\" (click)=\"setToday()\">{{todayBtnLbl}}</button>\n </div>\n\n <div class=\"btn-clear-wrapper\"\n [class.clear-left]=\"clearPos === 'left'\"\n [class.clear-right]=\"clearPos === 'right'\"\n [class.clear-center]=\"clearPos === 'center'\"\n *ngIf=\"showClearBtn\">\n <button class=\"btn btn-success\" (click)=\"clearDate()\">{{clearBtnLbl}}</button>\n </div>\n </div>\n\n </div>\n\n <!--custom dates or date ranges picker-->\n <div class=\"bs-datepicker-custom-range\" *ngIf=\"customRanges && customRanges.length > 0\">\n <bs-custom-date-view\n [selectedRange]=\"chosenRange\"\n [ranges]=\"customRanges\"\n [customRangeLabel]=\"customRangeBtnLbl\"\n (onSelect)=\"setRangeOnCalendar($event)\">\n </bs-custom-date-view>\n </div>\n</div>\n",
|
2605 | host: {
|
2606 | class: 'bottom',
|
2607 | '(click)': '_stopPropagation($event)',
|
2608 | role: 'dialog',
|
2609 | 'aria-label': 'calendar'
|
2610 | },
|
2611 | animations: [datepickerAnimation]
|
2612 | }]
|
2613 | }], function () { return [{ type: ɵngcc0.Renderer2 }, { type: BsDatepickerConfig }, { type: BsDatepickerStore }, { type: ɵngcc0.ElementRef }, { type: BsDatepickerActions }, { type: BsDatepickerEffects }, { type: ɵngcc1.PositioningService }]; }, null); })();
|
2614 |
|
2615 | class BsDatepickerDirective {
|
2616 | constructor(_config, _elementRef, _renderer, _viewContainerRef, cis) {
|
2617 | this._config = _config;
|
2618 | this._elementRef = _elementRef;
|
2619 | this._renderer = _renderer;
|
2620 | |
2621 |
|
2622 |
|
2623 | this.placement = 'bottom';
|
2624 | |
2625 |
|
2626 |
|
2627 |
|
2628 | this.triggers = 'click';
|
2629 | |
2630 |
|
2631 |
|
2632 | this.outsideClick = true;
|
2633 | |
2634 |
|
2635 |
|
2636 | this.container = 'body';
|
2637 | this.outsideEsc = true;
|
2638 | this.isDestroy$ = new Subject();
|
2639 | |
2640 |
|
2641 |
|
2642 | this.isDisabled = false;
|
2643 | |
2644 |
|
2645 |
|
2646 | this.bsValueChange = new EventEmitter();
|
2647 | this._subs = [];
|
2648 | this._dateInputFormat$ = new Subject();
|
2649 |
|
2650 | Object.assign(this, this._config);
|
2651 | this._datepicker = cis.createLoader(_elementRef, _viewContainerRef, _renderer);
|
2652 | this.onShown = this._datepicker.onShown;
|
2653 | this.onHidden = this._datepicker.onHidden;
|
2654 | this.isOpen$ = new BehaviorSubject(this.isOpen);
|
2655 | }
|
2656 | |
2657 |
|
2658 |
|
2659 | get isOpen() {
|
2660 | return this._datepicker.isShown;
|
2661 | }
|
2662 | set isOpen(value) {
|
2663 | this.isOpen$.next(value);
|
2664 | }
|
2665 | |
2666 |
|
2667 |
|
2668 | set bsValue(value) {
|
2669 | if (this._bsValue && value && this._bsValue.getTime() === value.getTime()) {
|
2670 | return;
|
2671 | }
|
2672 | if (!this._bsValue && value) {
|
2673 | const now = new Date();
|
2674 | value.setMilliseconds(now.getMilliseconds());
|
2675 | value.setSeconds(now.getSeconds());
|
2676 | value.setMinutes(now.getMinutes());
|
2677 | value.setHours(now.getHours());
|
2678 | }
|
2679 | this._bsValue = value;
|
2680 | this.bsValueChange.emit(value);
|
2681 | }
|
2682 | get dateInputFormat$() {
|
2683 | return this._dateInputFormat$;
|
2684 | }
|
2685 | get bsConfig() {
|
2686 | return this._bsConfig;
|
2687 | }
|
2688 | |
2689 |
|
2690 |
|
2691 | set bsConfig(bsConfig) {
|
2692 | this._bsConfig = bsConfig;
|
2693 | this.setConfig();
|
2694 | this._dateInputFormat$.next(bsConfig && bsConfig.dateInputFormat);
|
2695 | }
|
2696 | ngOnInit() {
|
2697 | this._datepicker.listen({
|
2698 | outsideClick: this.outsideClick,
|
2699 | outsideEsc: this.outsideEsc,
|
2700 | triggers: this.triggers,
|
2701 | show: () => this.show()
|
2702 | });
|
2703 | this.setConfig();
|
2704 | }
|
2705 | ngOnChanges(changes) {
|
2706 | if (!this._datepickerRef || !this._datepickerRef.instance) {
|
2707 | return;
|
2708 | }
|
2709 | if (changes.minDate) {
|
2710 | this._datepickerRef.instance.minDate = this.minDate;
|
2711 | }
|
2712 | if (changes.maxDate) {
|
2713 | this._datepickerRef.instance.maxDate = this.maxDate;
|
2714 | }
|
2715 | if (changes.daysDisabled) {
|
2716 | this._datepickerRef.instance.daysDisabled = this.daysDisabled;
|
2717 | }
|
2718 | if (changes.datesDisabled) {
|
2719 | this._datepickerRef.instance.datesDisabled = this.datesDisabled;
|
2720 | }
|
2721 | if (changes.datesEnabled) {
|
2722 | this._datepickerRef.instance.datesEnabled = this.datesEnabled;
|
2723 | }
|
2724 | if (changes.isDisabled) {
|
2725 | this._datepickerRef.instance.isDisabled = this.isDisabled;
|
2726 | }
|
2727 | if (changes.dateCustomClasses) {
|
2728 | this._datepickerRef.instance.dateCustomClasses = this.dateCustomClasses;
|
2729 | }
|
2730 | if (changes.dateTooltipTexts) {
|
2731 | this._datepickerRef.instance.dateTooltipTexts = this.dateTooltipTexts;
|
2732 | }
|
2733 | }
|
2734 | ngAfterViewInit() {
|
2735 | this.isOpen$.pipe(filter(isOpen => isOpen !== this.isOpen), takeUntil(this.isDestroy$))
|
2736 | .subscribe(() => this.toggle());
|
2737 | }
|
2738 | |
2739 |
|
2740 |
|
2741 |
|
2742 | show() {
|
2743 | if (this._datepicker.isShown) {
|
2744 | return;
|
2745 | }
|
2746 | this.setConfig();
|
2747 | this._datepickerRef = this._datepicker
|
2748 | .provide({ provide: BsDatepickerConfig, useValue: this._config })
|
2749 | .attach(BsDatepickerContainerComponent)
|
2750 | .to(this.container)
|
2751 | .position({ attachment: this.placement })
|
2752 | .show({ placement: this.placement });
|
2753 |
|
2754 | this._subs.push(this.bsValueChange.subscribe((value) => {
|
2755 | if (this._datepickerRef) {
|
2756 | this._datepickerRef.instance.value = value;
|
2757 | }
|
2758 | }));
|
2759 |
|
2760 | if (this._datepickerRef) {
|
2761 | this._subs.push(this._datepickerRef.instance.valueChange.subscribe((value) => {
|
2762 | this.bsValue = value;
|
2763 | this.hide();
|
2764 | }));
|
2765 | }
|
2766 | }
|
2767 | |
2768 |
|
2769 |
|
2770 |
|
2771 | hide() {
|
2772 | if (this.isOpen) {
|
2773 | this._datepicker.hide();
|
2774 | }
|
2775 | for (const sub of this._subs) {
|
2776 | sub.unsubscribe();
|
2777 | }
|
2778 | if (this._config.returnFocusToInput) {
|
2779 | this._renderer.selectRootElement(this._elementRef.nativeElement).focus();
|
2780 | }
|
2781 | }
|
2782 | |
2783 |
|
2784 |
|
2785 |
|
2786 | toggle() {
|
2787 | if (this.isOpen) {
|
2788 | return this.hide();
|
2789 | }
|
2790 | this.show();
|
2791 | }
|
2792 | |
2793 |
|
2794 |
|
2795 | setConfig() {
|
2796 | this._config = Object.assign({}, this._config, this.bsConfig, {
|
2797 | value: checkBsValue(this._bsValue, this.maxDate || this.bsConfig && this.bsConfig.maxDate),
|
2798 | isDisabled: this.isDisabled,
|
2799 | minDate: this.minDate || this.bsConfig && this.bsConfig.minDate,
|
2800 | maxDate: this.maxDate || this.bsConfig && this.bsConfig.maxDate,
|
2801 | daysDisabled: this.daysDisabled || this.bsConfig && this.bsConfig.daysDisabled,
|
2802 | dateCustomClasses: this.dateCustomClasses || this.bsConfig && this.bsConfig.dateCustomClasses,
|
2803 | dateTooltipTexts: this.dateTooltipTexts || this.bsConfig && this.bsConfig.dateTooltipTexts,
|
2804 | datesDisabled: this.datesDisabled || this.bsConfig && this.bsConfig.datesDisabled,
|
2805 | datesEnabled: this.datesEnabled || this.bsConfig && this.bsConfig.datesEnabled,
|
2806 | minMode: this.minMode || this.bsConfig && this.bsConfig.minMode
|
2807 | });
|
2808 | }
|
2809 | ngOnDestroy() {
|
2810 | this._datepicker.dispose();
|
2811 | this.isOpen$.next(false);
|
2812 | if (this.isDestroy$) {
|
2813 | this.isDestroy$.next();
|
2814 | this.isDestroy$.complete();
|
2815 | }
|
2816 | }
|
2817 | }
|
2818 | BsDatepickerDirective.ɵfac = function BsDatepickerDirective_Factory(t) { return new (t || BsDatepickerDirective)(ɵngcc0.ɵɵdirectiveInject(BsDatepickerConfig), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ViewContainerRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc3.ComponentLoaderFactory)); };
|
2819 | BsDatepickerDirective.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: BsDatepickerDirective, selectors: [["", "bsDatepicker", ""]], inputs: { placement: "placement", triggers: "triggers", outsideClick: "outsideClick", container: "container", outsideEsc: "outsideEsc", isDisabled: "isDisabled", isOpen: "isOpen", bsValue: "bsValue", bsConfig: "bsConfig", minDate: "minDate", maxDate: "maxDate", minMode: "minMode", daysDisabled: "daysDisabled", datesDisabled: "datesDisabled", datesEnabled: "datesEnabled", dateCustomClasses: "dateCustomClasses", dateTooltipTexts: "dateTooltipTexts" }, outputs: { bsValueChange: "bsValueChange", onShown: "onShown", onHidden: "onHidden" }, exportAs: ["bsDatepicker"], features: [ɵngcc0.ɵɵNgOnChangesFeature] });
|
2820 | BsDatepickerDirective.ctorParameters = () => [
|
2821 | { type: BsDatepickerConfig },
|
2822 | { type: ElementRef },
|
2823 | { type: Renderer2 },
|
2824 | { type: ViewContainerRef },
|
2825 | { type: ComponentLoaderFactory }
|
2826 | ];
|
2827 | BsDatepickerDirective.propDecorators = {
|
2828 | placement: [{ type: Input }],
|
2829 | triggers: [{ type: Input }],
|
2830 | outsideClick: [{ type: Input }],
|
2831 | container: [{ type: Input }],
|
2832 | outsideEsc: [{ type: Input }],
|
2833 | onShown: [{ type: Output }],
|
2834 | onHidden: [{ type: Output }],
|
2835 | isDisabled: [{ type: Input }],
|
2836 | minDate: [{ type: Input }],
|
2837 | maxDate: [{ type: Input }],
|
2838 | minMode: [{ type: Input }],
|
2839 | daysDisabled: [{ type: Input }],
|
2840 | datesDisabled: [{ type: Input }],
|
2841 | datesEnabled: [{ type: Input }],
|
2842 | dateCustomClasses: [{ type: Input }],
|
2843 | dateTooltipTexts: [{ type: Input }],
|
2844 | bsValueChange: [{ type: Output }],
|
2845 | isOpen: [{ type: Input }],
|
2846 | bsValue: [{ type: Input }],
|
2847 | bsConfig: [{ type: Input }]
|
2848 | };
|
2849 | (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BsDatepickerDirective, [{
|
2850 | type: Directive,
|
2851 | args: [{
|
2852 | selector: '[bsDatepicker]',
|
2853 | exportAs: 'bsDatepicker'
|
2854 | }]
|
2855 | }], function () { return [{ type: BsDatepickerConfig }, { type: ɵngcc0.ElementRef }, { type: ɵngcc0.Renderer2 }, { type: ɵngcc0.ViewContainerRef }, { type: ɵngcc3.ComponentLoaderFactory }]; }, { placement: [{
|
2856 | type: Input
|
2857 | }], triggers: [{
|
2858 | type: Input
|
2859 | }], outsideClick: [{
|
2860 | type: Input
|
2861 | }], container: [{
|
2862 | type: Input
|
2863 | }], outsideEsc: [{
|
2864 | type: Input
|
2865 | }], isDisabled: [{
|
2866 | type: Input
|
2867 | }], bsValueChange: [{
|
2868 | type: Output
|
2869 | }], onShown: [{
|
2870 | type: Output
|
2871 | }], onHidden: [{
|
2872 | type: Output
|
2873 | }], isOpen: [{
|
2874 | type: Input
|
2875 | }], bsValue: [{
|
2876 | type: Input
|
2877 | }], bsConfig: [{
|
2878 | type: Input
|
2879 | }], minDate: [{
|
2880 | type: Input
|
2881 | }], maxDate: [{
|
2882 | type: Input
|
2883 | }], minMode: [{
|
2884 | type: Input
|
2885 | }], daysDisabled: [{
|
2886 | type: Input
|
2887 | }], datesDisabled: [{
|
2888 | type: Input
|
2889 | }], datesEnabled: [{
|
2890 | type: Input
|
2891 | }], dateCustomClasses: [{
|
2892 | type: Input
|
2893 | }], dateTooltipTexts: [{
|
2894 | type: Input
|
2895 | }] }); })();
|
2896 |
|
2897 | class BsDatepickerInlineConfig extends BsDatepickerConfig {
|
2898 | }
|
2899 | BsDatepickerInlineConfig.ɵfac = function BsDatepickerInlineConfig_Factory(t) { return ɵBsDatepickerInlineConfig_BaseFactory(t || BsDatepickerInlineConfig); };
|
2900 | BsDatepickerInlineConfig.ɵprov = ɵɵdefineInjectable({ factory: function BsDatepickerInlineConfig_Factory() { return new BsDatepickerInlineConfig(); }, token: BsDatepickerInlineConfig, providedIn: "root" });
|
2901 | const ɵBsDatepickerInlineConfig_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(BsDatepickerInlineConfig);
|
2902 | (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BsDatepickerInlineConfig, [{
|
2903 | type: Injectable,
|
2904 | args: [{
|
2905 | providedIn: 'root'
|
2906 | }]
|
2907 | }], null, null); })();
|
2908 |
|
2909 | class BsDatepickerInlineContainerComponent extends BsDatepickerContainerComponent {
|
2910 | constructor(_renderer, _config, _store, _element, _actions, _effects, _positioningService) {
|
2911 | super(_renderer, _config, _store, _element, _actions, _effects, _positioningService);
|
2912 | _renderer.setStyle(_element.nativeElement, 'display', 'inline-block');
|
2913 | _renderer.setStyle(_element.nativeElement, 'position', 'static');
|
2914 | }
|
2915 | }
|
2916 | BsDatepickerInlineContainerComponent.ɵfac = function BsDatepickerInlineContainerComponent_Factory(t) { return new (t || BsDatepickerInlineContainerComponent)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(BsDatepickerConfig), ɵngcc0.ɵɵdirectiveInject(BsDatepickerStore), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(BsDatepickerActions), ɵngcc0.ɵɵdirectiveInject(BsDatepickerEffects), ɵngcc0.ɵɵdirectiveInject(ɵngcc1.PositioningService)); };
|
2917 | BsDatepickerInlineContainerComponent.ɵcmp = ɵngcc0.ɵɵdefineComponent({ type: BsDatepickerInlineContainerComponent, selectors: [["bs-datepicker-inline-container"]], hostBindings: function BsDatepickerInlineContainerComponent_HostBindings(rf, ctx) { if (rf & 1) {
|
2918 | ɵngcc0.ɵɵlistener("click", function BsDatepickerInlineContainerComponent_click_HostBindingHandler($event) { return ctx._stopPropagation($event); });
|
2919 | } }, features: [ɵngcc0.ɵɵProvidersFeature([BsDatepickerStore, BsDatepickerEffects]), ɵngcc0.ɵɵInheritDefinitionFeature], decls: 2, vars: 3, consts: [["class", "bs-datepicker", 3, "ngClass", 4, "ngIf"], [1, "bs-datepicker", 3, "ngClass"], [1, "bs-datepicker-container"], ["role", "application", 1, "bs-calendar-container", 3, "ngSwitch"], ["class", "bs-media-container", 4, "ngSwitchCase"], ["class", "bs-datepicker-buttons", 4, "ngIf"], ["class", "bs-datepicker-custom-range", 4, "ngIf"], [1, "bs-media-container"], [3, "bs-datepicker-multiple", "calendar", "options", "onNavigate", "onViewMode", "onHover", "onHoverWeek", "onSelect", 4, "ngFor", "ngForOf"], [3, "calendar", "options", "onNavigate", "onViewMode", "onHover", "onHoverWeek", "onSelect"], [3, "bs-datepicker-multiple", "calendar", "onNavigate", "onViewMode", "onHover", "onSelect", 4, "ngFor", "ngForOf"], [3, "calendar", "onNavigate", "onViewMode", "onHover", "onSelect"], [1, "bs-datepicker-buttons"], ["type", "button", 1, "btn", "btn-success"], ["type", "button", 1, "btn", "btn-default"], ["class", "btn-today-wrapper", 3, "today-left", "today-right", "today-center", 4, "ngIf"], ["class", "btn-clear-wrapper", 3, "clear-left", "clear-right", "clear-center", 4, "ngIf"], [1, "btn-today-wrapper"], [1, "btn", "btn-success", 3, "click"], [1, "btn-clear-wrapper"], [1, "bs-datepicker-custom-range"], [3, "selectedRange", "ranges", "customRangeLabel", "onSelect"]], template: function BsDatepickerInlineContainerComponent_Template(rf, ctx) { if (rf & 1) {
|
2920 | ɵngcc0.ɵɵtemplate(0, BsDatepickerInlineContainerComponent_div_0_Template, 10, 11, "div", 0);
|
2921 | ɵngcc0.ɵɵpipe(1, "async");
|
2922 | } if (rf & 2) {
|
2923 | ɵngcc0.ɵɵproperty("ngIf", ɵngcc0.ɵɵpipeBind1(1, 1, ctx.viewMode));
|
2924 | } }, directives: function () { return [ɵngcc2.NgIf, ɵngcc2.NgClass, ɵngcc2.NgSwitch, ɵngcc2.NgSwitchCase, ɵngcc2.NgForOf, BsDaysCalendarViewComponent, BsMonthCalendarViewComponent, BsYearsCalendarViewComponent, BsCustomDatesViewComponent]; }, pipes: function () { return [ɵngcc2.AsyncPipe]; }, encapsulation: 2, data: { animation: [datepickerAnimation] } });
|
2925 | BsDatepickerInlineContainerComponent.ctorParameters = () => [
|
2926 | { type: Renderer2 },
|
2927 | { type: BsDatepickerConfig },
|
2928 | { type: BsDatepickerStore },
|
2929 | { type: ElementRef },
|
2930 | { type: BsDatepickerActions },
|
2931 | { type: BsDatepickerEffects },
|
2932 | { type: PositioningService }
|
2933 | ];
|
2934 | (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BsDatepickerInlineContainerComponent, [{
|
2935 | type: Component,
|
2936 | args: [{
|
2937 | selector: 'bs-datepicker-inline-container',
|
2938 | providers: [BsDatepickerStore, BsDatepickerEffects],
|
2939 | template: "<!-- days calendar view mode -->\n<div class=\"bs-datepicker\" [ngClass]=\"containerClass\" *ngIf=\"viewMode | async\">\n <div class=\"bs-datepicker-container\"\n [@datepickerAnimation]=\"animationState\"\n (@datepickerAnimation.done)=\"positionServiceEnable()\">\n <!--calendars-->\n <div class=\"bs-calendar-container\" [ngSwitch]=\"viewMode | async\" role=\"application\">\n <!--days calendar-->\n <div *ngSwitchCase=\"'day'\" class=\"bs-media-container\">\n <bs-days-calendar-view\n *ngFor=\"let calendar of daysCalendar$ | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n [options]=\"options$ | async\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"dayHoverHandler($event)\"\n (onHoverWeek)=\"weekHoverHandler($event)\"\n (onSelect)=\"daySelectHandler($event)\">\n </bs-days-calendar-view>\n </div>\n\n <!--months calendar-->\n <div *ngSwitchCase=\"'month'\" class=\"bs-media-container\">\n <bs-month-calendar-view\n *ngFor=\"let calendar of monthsCalendar | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"monthHoverHandler($event)\"\n (onSelect)=\"monthSelectHandler($event)\">\n </bs-month-calendar-view>\n </div>\n\n <!--years calendar-->\n <div *ngSwitchCase=\"'year'\" class=\"bs-media-container\">\n <bs-years-calendar-view\n *ngFor=\"let calendar of yearsCalendar | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"yearHoverHandler($event)\"\n (onSelect)=\"yearSelectHandler($event)\">\n </bs-years-calendar-view>\n </div>\n </div>\n\n <!--applycancel buttons-->\n <div class=\"bs-datepicker-buttons\" *ngIf=\"false\">\n <button class=\"btn btn-success\" type=\"button\">Apply</button>\n <button class=\"btn btn-default\" type=\"button\">Cancel</button>\n </div>\n\n <div class=\"bs-datepicker-buttons\" *ngIf=\"showTodayBtn || showClearBtn\">\n <div class=\"btn-today-wrapper\"\n [class.today-left]=\"todayPos === 'left'\"\n [class.today-right]=\"todayPos === 'right'\"\n [class.today-center]=\"todayPos === 'center'\"\n *ngIf=\"showTodayBtn\">\n <button class=\"btn btn-success\" (click)=\"setToday()\">{{todayBtnLbl}}</button>\n </div>\n\n <div class=\"btn-clear-wrapper\"\n [class.clear-left]=\"clearPos === 'left'\"\n [class.clear-right]=\"clearPos === 'right'\"\n [class.clear-center]=\"clearPos === 'center'\"\n *ngIf=\"showClearBtn\">\n <button class=\"btn btn-success\" (click)=\"clearDate()\">{{clearBtnLbl}}</button>\n </div>\n </div>\n\n </div>\n\n <!--custom dates or date ranges picker-->\n <div class=\"bs-datepicker-custom-range\" *ngIf=\"customRanges && customRanges.length > 0\">\n <bs-custom-date-view\n [selectedRange]=\"chosenRange\"\n [ranges]=\"customRanges\"\n [customRangeLabel]=\"customRangeBtnLbl\"\n (onSelect)=\"setRangeOnCalendar($event)\">\n </bs-custom-date-view>\n </div>\n</div>\n",
|
2940 | host: {
|
2941 | '(click)': '_stopPropagation($event)'
|
2942 | },
|
2943 | animations: [datepickerAnimation]
|
2944 | }]
|
2945 | }], function () { return [{ type: ɵngcc0.Renderer2 }, { type: BsDatepickerConfig }, { type: BsDatepickerStore }, { type: ɵngcc0.ElementRef }, { type: BsDatepickerActions }, { type: BsDatepickerEffects }, { type: ɵngcc1.PositioningService }]; }, null); })();
|
2946 |
|
2947 | class BsDatepickerInlineDirective {
|
2948 | constructor(_config, _elementRef, _renderer, _viewContainerRef, cis) {
|
2949 | this._config = _config;
|
2950 | this._elementRef = _elementRef;
|
2951 | |
2952 |
|
2953 |
|
2954 | this.isDisabled = false;
|
2955 | |
2956 |
|
2957 |
|
2958 | this.bsValueChange = new EventEmitter();
|
2959 | this._subs = [];
|
2960 |
|
2961 | Object.assign(this, this._config);
|
2962 | this._datepicker = cis.createLoader(_elementRef, _viewContainerRef, _renderer);
|
2963 | }
|
2964 | |
2965 |
|
2966 |
|
2967 | set bsValue(value) {
|
2968 | if (this._bsValue === value) {
|
2969 | return;
|
2970 | }
|
2971 | if (!this._bsValue && value) {
|
2972 | const now = new Date();
|
2973 | value.setMilliseconds(now.getMilliseconds());
|
2974 | value.setSeconds(now.getSeconds());
|
2975 | value.setMinutes(now.getMinutes());
|
2976 | value.setHours(now.getHours());
|
2977 | }
|
2978 | this._bsValue = value;
|
2979 | this.bsValueChange.emit(value);
|
2980 | }
|
2981 | ngOnInit() {
|
2982 | this.setConfig();
|
2983 |
|
2984 | this._subs.push(this.bsValueChange.subscribe((value) => {
|
2985 | if (this._datepickerRef) {
|
2986 | this._datepickerRef.instance.value = value;
|
2987 | }
|
2988 | }));
|
2989 |
|
2990 | if (this._datepickerRef) {
|
2991 | this._subs.push(this._datepickerRef.instance.valueChange.subscribe((value) => {
|
2992 | this.bsValue = value;
|
2993 | }));
|
2994 | }
|
2995 | }
|
2996 | ngOnChanges(changes) {
|
2997 | if (!this._datepickerRef || !this._datepickerRef.instance) {
|
2998 | return;
|
2999 | }
|
3000 | if (changes.minDate) {
|
3001 | this._datepickerRef.instance.minDate = this.minDate;
|
3002 | this.setConfig();
|
3003 | }
|
3004 | if (changes.maxDate) {
|
3005 | this._datepickerRef.instance.maxDate = this.maxDate;
|
3006 | this.setConfig();
|
3007 | }
|
3008 | if (changes.datesDisabled) {
|
3009 | this._datepickerRef.instance.datesDisabled = this.datesDisabled;
|
3010 | this.setConfig();
|
3011 | }
|
3012 | if (changes.datesEnabled) {
|
3013 | this._datepickerRef.instance.datesEnabled = this.datesEnabled;
|
3014 | this._datepickerRef.instance.value = this._bsValue;
|
3015 | }
|
3016 | if (changes.isDisabled) {
|
3017 | this._datepickerRef.instance.isDisabled = this.isDisabled;
|
3018 | this.setConfig();
|
3019 | }
|
3020 | if (changes.dateCustomClasses) {
|
3021 | this._datepickerRef.instance.dateCustomClasses = this.dateCustomClasses;
|
3022 | this.setConfig();
|
3023 | }
|
3024 | if (changes.dateTooltipTexts) {
|
3025 | this._datepickerRef.instance.dateTooltipTexts = this.dateTooltipTexts;
|
3026 | this.setConfig();
|
3027 | }
|
3028 | }
|
3029 | |
3030 |
|
3031 |
|
3032 | setConfig() {
|
3033 | if (this._datepicker) {
|
3034 | this._datepicker.hide();
|
3035 | }
|
3036 | this._config = Object.assign({}, this._config, this.bsConfig, {
|
3037 | value: checkBsValue(this._bsValue, this.maxDate || this.bsConfig && this.bsConfig.maxDate),
|
3038 | isDisabled: this.isDisabled,
|
3039 | minDate: this.minDate || this.bsConfig && this.bsConfig.minDate,
|
3040 | maxDate: this.maxDate || this.bsConfig && this.bsConfig.maxDate,
|
3041 | dateCustomClasses: this.dateCustomClasses || this.bsConfig && this.bsConfig.dateCustomClasses,
|
3042 | dateTooltipTexts: this.dateTooltipTexts || this.bsConfig && this.bsConfig.dateTooltipTexts,
|
3043 | datesDisabled: this.datesDisabled || this.bsConfig && this.bsConfig.datesDisabled,
|
3044 | datesEnabled: this.datesEnabled || this.bsConfig && this.bsConfig.datesEnabled
|
3045 | });
|
3046 | this._datepickerRef = this._datepicker
|
3047 | .provide({ provide: BsDatepickerConfig, useValue: this._config })
|
3048 | .attach(BsDatepickerInlineContainerComponent)
|
3049 | .to(this._elementRef)
|
3050 | .show();
|
3051 | }
|
3052 | ngOnDestroy() {
|
3053 | this._datepicker.dispose();
|
3054 | }
|
3055 | }
|
3056 | BsDatepickerInlineDirective.ɵfac = function BsDatepickerInlineDirective_Factory(t) { return new (t || BsDatepickerInlineDirective)(ɵngcc0.ɵɵdirectiveInject(BsDatepickerInlineConfig), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ViewContainerRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc3.ComponentLoaderFactory)); };
|
3057 | BsDatepickerInlineDirective.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: BsDatepickerInlineDirective, selectors: [["bs-datepicker-inline"]], inputs: { isDisabled: "isDisabled", bsValue: "bsValue", bsConfig: "bsConfig", minDate: "minDate", maxDate: "maxDate", dateCustomClasses: "dateCustomClasses", dateTooltipTexts: "dateTooltipTexts", datesEnabled: "datesEnabled", datesDisabled: "datesDisabled" }, outputs: { bsValueChange: "bsValueChange" }, exportAs: ["bsDatepickerInline"], features: [ɵngcc0.ɵɵNgOnChangesFeature] });
|
3058 | BsDatepickerInlineDirective.ctorParameters = () => [
|
3059 | { type: BsDatepickerInlineConfig },
|
3060 | { type: ElementRef },
|
3061 | { type: Renderer2 },
|
3062 | { type: ViewContainerRef },
|
3063 | { type: ComponentLoaderFactory }
|
3064 | ];
|
3065 | BsDatepickerInlineDirective.propDecorators = {
|
3066 | bsConfig: [{ type: Input }],
|
3067 | isDisabled: [{ type: Input }],
|
3068 | minDate: [{ type: Input }],
|
3069 | maxDate: [{ type: Input }],
|
3070 | dateCustomClasses: [{ type: Input }],
|
3071 | dateTooltipTexts: [{ type: Input }],
|
3072 | datesEnabled: [{ type: Input }],
|
3073 | datesDisabled: [{ type: Input }],
|
3074 | bsValueChange: [{ type: Output }],
|
3075 | bsValue: [{ type: Input }]
|
3076 | };
|
3077 | (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BsDatepickerInlineDirective, [{
|
3078 | type: Directive,
|
3079 | args: [{
|
3080 | selector: 'bs-datepicker-inline',
|
3081 | exportAs: 'bsDatepickerInline'
|
3082 | }]
|
3083 | }], function () { return [{ type: BsDatepickerInlineConfig }, { type: ɵngcc0.ElementRef }, { type: ɵngcc0.Renderer2 }, { type: ɵngcc0.ViewContainerRef }, { type: ɵngcc3.ComponentLoaderFactory }]; }, { isDisabled: [{
|
3084 | type: Input
|
3085 | }], bsValueChange: [{
|
3086 | type: Output
|
3087 | }], bsValue: [{
|
3088 | type: Input
|
3089 | }], bsConfig: [{
|
3090 | type: Input
|
3091 | }], minDate: [{
|
3092 | type: Input
|
3093 | }], maxDate: [{
|
3094 | type: Input
|
3095 | }], dateCustomClasses: [{
|
3096 | type: Input
|
3097 | }], dateTooltipTexts: [{
|
3098 | type: Input
|
3099 | }], datesEnabled: [{
|
3100 | type: Input
|
3101 | }], datesDisabled: [{
|
3102 | type: Input
|
3103 | }] }); })();
|
3104 |
|
3105 | class BsDaterangepickerInlineConfig extends BsDatepickerConfig {
|
3106 | constructor() {
|
3107 | super(...arguments);
|
3108 |
|
3109 | this.displayMonths = 2;
|
3110 |
|
3111 | this.isAnimated = false;
|
3112 | }
|
3113 | }
|
3114 | BsDaterangepickerInlineConfig.ɵfac = function BsDaterangepickerInlineConfig_Factory(t) { return ɵBsDaterangepickerInlineConfig_BaseFactory(t || BsDaterangepickerInlineConfig); };
|
3115 | BsDaterangepickerInlineConfig.ɵprov = ɵɵdefineInjectable({ factory: function BsDaterangepickerInlineConfig_Factory() { return new BsDaterangepickerInlineConfig(); }, token: BsDaterangepickerInlineConfig, providedIn: "root" });
|
3116 | const ɵBsDaterangepickerInlineConfig_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(BsDaterangepickerInlineConfig);
|
3117 | (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BsDaterangepickerInlineConfig, [{
|
3118 | type: Injectable,
|
3119 | args: [{
|
3120 | providedIn: 'root'
|
3121 | }]
|
3122 | }], null, null); })();
|
3123 |
|
3124 | class BsDaterangepickerContainerComponent extends BsDatepickerAbstractComponent {
|
3125 | constructor(_renderer, _config, _store, _element, _actions, _effects, _positionService) {
|
3126 | super();
|
3127 | this._config = _config;
|
3128 | this._store = _store;
|
3129 | this._element = _element;
|
3130 | this._actions = _actions;
|
3131 | this._positionService = _positionService;
|
3132 | this.valueChange = new EventEmitter();
|
3133 | this.animationState = 'void';
|
3134 | this._rangeStack = [];
|
3135 | this.chosenRange = [];
|
3136 | this._subs = [];
|
3137 | this._effects = _effects;
|
3138 | this.customRanges = this._config.ranges || [];
|
3139 | this.customRangeBtnLbl = this._config.customRangeButtonLabel;
|
3140 | _renderer.setStyle(_element.nativeElement, 'display', 'block');
|
3141 | _renderer.setStyle(_element.nativeElement, 'position', 'absolute');
|
3142 | }
|
3143 | set value(value) {
|
3144 | var _a;
|
3145 | (_a = this._effects) === null || _a === void 0 ? void 0 : _a.setRangeValue(value);
|
3146 | }
|
3147 | ngOnInit() {
|
3148 | var _a, _b;
|
3149 | this._positionService.setOptions({
|
3150 | modifiers: { flip: { enabled: this._config.adaptivePosition } },
|
3151 | allowedPositions: ['top', 'bottom']
|
3152 | });
|
3153 | (_a = this._positionService.event$) === null || _a === void 0 ? void 0 : _a.pipe(take(1)).subscribe(() => {
|
3154 | this._positionService.disable();
|
3155 | if (this._config.isAnimated) {
|
3156 | this.animationState = this.isTopPosition ? 'animated-up' : 'animated-down';
|
3157 | return;
|
3158 | }
|
3159 | this.animationState = 'unanimated';
|
3160 | });
|
3161 | this.containerClass = this._config.containerClass;
|
3162 | this.isOtherMonthsActive = this._config.selectFromOtherMonth;
|
3163 | (_b = this._effects) === null || _b === void 0 ? void 0 : _b.init(this._store).setOptions(this._config).setBindings(this).setEventHandlers(this).registerDatepickerSideEffects();
|
3164 |
|
3165 |
|
3166 | this._subs.push(this._store
|
3167 | .select(state => state.selectedRange)
|
3168 | .subscribe(dateRange => {
|
3169 | this.valueChange.emit(dateRange);
|
3170 | this.chosenRange = dateRange || [];
|
3171 | }));
|
3172 | }
|
3173 | get isTopPosition() {
|
3174 | return this._element.nativeElement.classList.contains('top');
|
3175 | }
|
3176 | positionServiceEnable() {
|
3177 | this._positionService.enable();
|
3178 | }
|
3179 | daySelectHandler(day) {
|
3180 | if (!day) {
|
3181 | return;
|
3182 | }
|
3183 | const isDisabled = this.isOtherMonthsActive ? day.isDisabled : (day.isOtherMonth || day.isDisabled);
|
3184 | if (isDisabled) {
|
3185 | return;
|
3186 | }
|
3187 | this.rangesProcessing(day);
|
3188 | }
|
3189 | monthSelectHandler(day) {
|
3190 | if (!day || day.isDisabled) {
|
3191 | return;
|
3192 | }
|
3193 | day.isSelected = true;
|
3194 | if (this._config.minMode !== 'month') {
|
3195 | if (day.isDisabled) {
|
3196 | return;
|
3197 | }
|
3198 | this._store.dispatch(this._actions.navigateTo({
|
3199 | unit: {
|
3200 | month: getMonth(day.date),
|
3201 | year: getFullYear(day.date)
|
3202 | },
|
3203 | viewMode: 'day'
|
3204 | }));
|
3205 | return;
|
3206 | }
|
3207 | this.rangesProcessing(day);
|
3208 | }
|
3209 | yearSelectHandler(day) {
|
3210 | if (!day || day.isDisabled) {
|
3211 | return;
|
3212 | }
|
3213 | day.isSelected = true;
|
3214 | if (this._config.minMode !== 'year') {
|
3215 | if (day.isDisabled) {
|
3216 | return;
|
3217 | }
|
3218 | this._store.dispatch(this._actions.navigateTo({
|
3219 | unit: {
|
3220 | year: getFullYear(day.date)
|
3221 | },
|
3222 | viewMode: 'month'
|
3223 | }));
|
3224 | return;
|
3225 | }
|
3226 | this.rangesProcessing(day);
|
3227 | }
|
3228 | rangesProcessing(day) {
|
3229 |
|
3230 |
|
3231 |
|
3232 |
|
3233 |
|
3234 | if (this._rangeStack.length === 1) {
|
3235 | this._rangeStack =
|
3236 | day.date >= this._rangeStack[0]
|
3237 | ? [this._rangeStack[0], day.date]
|
3238 | : [day.date];
|
3239 | }
|
3240 | if (this._config.maxDateRange) {
|
3241 | this.setMaxDateRangeOnCalendar(day.date);
|
3242 | }
|
3243 | if (this._rangeStack.length === 0) {
|
3244 | this._rangeStack = [day.date];
|
3245 | if (this._config.maxDateRange) {
|
3246 | this.setMaxDateRangeOnCalendar(day.date);
|
3247 | }
|
3248 | }
|
3249 | this._store.dispatch(this._actions.selectRange(this._rangeStack));
|
3250 | if (this._rangeStack.length === 2) {
|
3251 | this._rangeStack = [];
|
3252 | }
|
3253 | }
|
3254 | ngOnDestroy() {
|
3255 | var _a;
|
3256 | for (const sub of this._subs) {
|
3257 | sub.unsubscribe();
|
3258 | }
|
3259 | (_a = this._effects) === null || _a === void 0 ? void 0 : _a.destroy();
|
3260 | }
|
3261 | setRangeOnCalendar(dates) {
|
3262 | if (dates) {
|
3263 | this._rangeStack = dates.value instanceof Date ? [dates.value] : dates.value;
|
3264 | }
|
3265 | this._store.dispatch(this._actions.selectRange(this._rangeStack));
|
3266 | }
|
3267 | setMaxDateRangeOnCalendar(currentSelection) {
|
3268 | var _a;
|
3269 | let maxDateRange = new Date(currentSelection);
|
3270 | if (this._config.maxDate) {
|
3271 | const maxDateValueInMilliseconds = this._config.maxDate.getTime();
|
3272 | const maxDateRangeInMilliseconds = currentSelection.getTime() + ((this._config.maxDateRange || 0) * dayInMilliseconds);
|
3273 | maxDateRange = maxDateRangeInMilliseconds > maxDateValueInMilliseconds ?
|
3274 | new Date(this._config.maxDate) :
|
3275 | new Date(maxDateRangeInMilliseconds);
|
3276 | }
|
3277 | else {
|
3278 | maxDateRange.setDate(currentSelection.getDate() + (this._config.maxDateRange || 0));
|
3279 | }
|
3280 | (_a = this._effects) === null || _a === void 0 ? void 0 : _a.setMaxDate(maxDateRange);
|
3281 | }
|
3282 | }
|
3283 | BsDaterangepickerContainerComponent.ɵfac = function BsDaterangepickerContainerComponent_Factory(t) { return new (t || BsDaterangepickerContainerComponent)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(BsDatepickerConfig), ɵngcc0.ɵɵdirectiveInject(BsDatepickerStore), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(BsDatepickerActions), ɵngcc0.ɵɵdirectiveInject(BsDatepickerEffects), ɵngcc0.ɵɵdirectiveInject(ɵngcc1.PositioningService)); };
|
3284 | BsDaterangepickerContainerComponent.ɵcmp = ɵngcc0.ɵɵdefineComponent({ type: BsDaterangepickerContainerComponent, selectors: [["bs-daterangepicker-container"]], hostAttrs: ["role", "dialog", "aria-label", "calendar", 1, "bottom"], hostBindings: function BsDaterangepickerContainerComponent_HostBindings(rf, ctx) { if (rf & 1) {
|
3285 | ɵngcc0.ɵɵlistener("click", function BsDaterangepickerContainerComponent_click_HostBindingHandler($event) { return ctx._stopPropagation($event); });
|
3286 | } }, features: [ɵngcc0.ɵɵProvidersFeature([BsDatepickerStore, BsDatepickerEffects]), ɵngcc0.ɵɵInheritDefinitionFeature], decls: 2, vars: 3, consts: [["class", "bs-datepicker", 3, "ngClass", 4, "ngIf"], [1, "bs-datepicker", 3, "ngClass"], [1, "bs-datepicker-container"], ["role", "application", 1, "bs-calendar-container", 3, "ngSwitch"], ["class", "bs-media-container", 4, "ngSwitchCase"], ["class", "bs-datepicker-buttons", 4, "ngIf"], ["class", "bs-datepicker-custom-range", 4, "ngIf"], [1, "bs-media-container"], [3, "bs-datepicker-multiple", "calendar", "options", "onNavigate", "onViewMode", "onHover", "onHoverWeek", "onSelect", 4, "ngFor", "ngForOf"], [3, "calendar", "options", "onNavigate", "onViewMode", "onHover", "onHoverWeek", "onSelect"], [3, "bs-datepicker-multiple", "calendar", "onNavigate", "onViewMode", "onHover", "onSelect", 4, "ngFor", "ngForOf"], [3, "calendar", "onNavigate", "onViewMode", "onHover", "onSelect"], [1, "bs-datepicker-buttons"], ["type", "button", 1, "btn", "btn-success"], ["type", "button", 1, "btn", "btn-default"], ["class", "btn-today-wrapper", 3, "today-left", "today-right", "today-center", 4, "ngIf"], ["class", "btn-clear-wrapper", 3, "clear-left", "clear-right", "clear-center", 4, "ngIf"], [1, "btn-today-wrapper"], [1, "btn", "btn-success", 3, "click"], [1, "btn-clear-wrapper"], [1, "bs-datepicker-custom-range"], [3, "selectedRange", "ranges", "customRangeLabel", "onSelect"]], template: function BsDaterangepickerContainerComponent_Template(rf, ctx) { if (rf & 1) {
|
3287 | ɵngcc0.ɵɵtemplate(0, BsDaterangepickerContainerComponent_div_0_Template, 10, 11, "div", 0);
|
3288 | ɵngcc0.ɵɵpipe(1, "async");
|
3289 | } if (rf & 2) {
|
3290 | ɵngcc0.ɵɵproperty("ngIf", ɵngcc0.ɵɵpipeBind1(1, 1, ctx.viewMode));
|
3291 | } }, directives: function () { return [ɵngcc2.NgIf, ɵngcc2.NgClass, ɵngcc2.NgSwitch, ɵngcc2.NgSwitchCase, ɵngcc2.NgForOf, BsDaysCalendarViewComponent, BsMonthCalendarViewComponent, BsYearsCalendarViewComponent, BsCustomDatesViewComponent]; }, pipes: function () { return [ɵngcc2.AsyncPipe]; }, encapsulation: 2, data: { animation: [datepickerAnimation] } });
|
3292 | BsDaterangepickerContainerComponent.ctorParameters = () => [
|
3293 | { type: Renderer2 },
|
3294 | { type: BsDatepickerConfig },
|
3295 | { type: BsDatepickerStore },
|
3296 | { type: ElementRef },
|
3297 | { type: BsDatepickerActions },
|
3298 | { type: BsDatepickerEffects },
|
3299 | { type: PositioningService }
|
3300 | ];
|
3301 | (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BsDaterangepickerContainerComponent, [{
|
3302 | type: Component,
|
3303 | args: [{
|
3304 | selector: 'bs-daterangepicker-container',
|
3305 | providers: [BsDatepickerStore, BsDatepickerEffects],
|
3306 | template: "<!-- days calendar view mode -->\n<div class=\"bs-datepicker\" [ngClass]=\"containerClass\" *ngIf=\"viewMode | async\">\n <div class=\"bs-datepicker-container\"\n [@datepickerAnimation]=\"animationState\"\n (@datepickerAnimation.done)=\"positionServiceEnable()\">\n <!--calendars-->\n <div class=\"bs-calendar-container\" [ngSwitch]=\"viewMode | async\" role=\"application\">\n <!--days calendar-->\n <div *ngSwitchCase=\"'day'\" class=\"bs-media-container\">\n <bs-days-calendar-view\n *ngFor=\"let calendar of daysCalendar$ | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n [options]=\"options$ | async\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"dayHoverHandler($event)\"\n (onHoverWeek)=\"weekHoverHandler($event)\"\n (onSelect)=\"daySelectHandler($event)\">\n </bs-days-calendar-view>\n </div>\n\n <!--months calendar-->\n <div *ngSwitchCase=\"'month'\" class=\"bs-media-container\">\n <bs-month-calendar-view\n *ngFor=\"let calendar of monthsCalendar | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"monthHoverHandler($event)\"\n (onSelect)=\"monthSelectHandler($event)\">\n </bs-month-calendar-view>\n </div>\n\n <!--years calendar-->\n <div *ngSwitchCase=\"'year'\" class=\"bs-media-container\">\n <bs-years-calendar-view\n *ngFor=\"let calendar of yearsCalendar | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"yearHoverHandler($event)\"\n (onSelect)=\"yearSelectHandler($event)\">\n </bs-years-calendar-view>\n </div>\n </div>\n\n <!--applycancel buttons-->\n <div class=\"bs-datepicker-buttons\" *ngIf=\"false\">\n <button class=\"btn btn-success\" type=\"button\">Apply</button>\n <button class=\"btn btn-default\" type=\"button\">Cancel</button>\n </div>\n\n <div class=\"bs-datepicker-buttons\" *ngIf=\"showTodayBtn || showClearBtn\">\n <div class=\"btn-today-wrapper\"\n [class.today-left]=\"todayPos === 'left'\"\n [class.today-right]=\"todayPos === 'right'\"\n [class.today-center]=\"todayPos === 'center'\"\n *ngIf=\"showTodayBtn\">\n <button class=\"btn btn-success\" (click)=\"setToday()\">{{todayBtnLbl}}</button>\n </div>\n\n <div class=\"btn-clear-wrapper\"\n [class.clear-left]=\"clearPos === 'left'\"\n [class.clear-right]=\"clearPos === 'right'\"\n [class.clear-center]=\"clearPos === 'center'\"\n *ngIf=\"showClearBtn\">\n <button class=\"btn btn-success\" (click)=\"clearDate()\">{{clearBtnLbl}}</button>\n </div>\n </div>\n\n </div>\n\n <!--custom dates or date ranges picker-->\n <div class=\"bs-datepicker-custom-range\" *ngIf=\"customRanges && customRanges.length > 0\">\n <bs-custom-date-view\n [selectedRange]=\"chosenRange\"\n [ranges]=\"customRanges\"\n [customRangeLabel]=\"customRangeBtnLbl\"\n (onSelect)=\"setRangeOnCalendar($event)\">\n </bs-custom-date-view>\n </div>\n</div>\n",
|
3307 | host: {
|
3308 | class: 'bottom',
|
3309 | '(click)': '_stopPropagation($event)',
|
3310 | role: 'dialog',
|
3311 | 'aria-label': 'calendar'
|
3312 | },
|
3313 | animations: [datepickerAnimation]
|
3314 | }]
|
3315 | }], function () { return [{ type: ɵngcc0.Renderer2 }, { type: BsDatepickerConfig }, { type: BsDatepickerStore }, { type: ɵngcc0.ElementRef }, { type: BsDatepickerActions }, { type: BsDatepickerEffects }, { type: ɵngcc1.PositioningService }]; }, null); })();
|
3316 |
|
3317 | class BsDaterangepickerInlineContainerComponent extends BsDaterangepickerContainerComponent {
|
3318 | constructor(_renderer, _config, _store, _element, _actions, _effects, _positioningService) {
|
3319 | super(_renderer, _config, _store, _element, _actions, _effects, _positioningService);
|
3320 | _renderer.setStyle(_element.nativeElement, 'display', 'inline-block');
|
3321 | _renderer.setStyle(_element.nativeElement, 'position', 'static');
|
3322 | }
|
3323 | }
|
3324 | BsDaterangepickerInlineContainerComponent.ɵfac = function BsDaterangepickerInlineContainerComponent_Factory(t) { return new (t || BsDaterangepickerInlineContainerComponent)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(BsDatepickerConfig), ɵngcc0.ɵɵdirectiveInject(BsDatepickerStore), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(BsDatepickerActions), ɵngcc0.ɵɵdirectiveInject(BsDatepickerEffects), ɵngcc0.ɵɵdirectiveInject(ɵngcc1.PositioningService)); };
|
3325 | BsDaterangepickerInlineContainerComponent.ɵcmp = ɵngcc0.ɵɵdefineComponent({ type: BsDaterangepickerInlineContainerComponent, selectors: [["bs-daterangepicker-inline-container"]], hostBindings: function BsDaterangepickerInlineContainerComponent_HostBindings(rf, ctx) { if (rf & 1) {
|
3326 | ɵngcc0.ɵɵlistener("click", function BsDaterangepickerInlineContainerComponent_click_HostBindingHandler($event) { return ctx._stopPropagation($event); });
|
3327 | } }, features: [ɵngcc0.ɵɵProvidersFeature([BsDatepickerStore, BsDatepickerEffects]), ɵngcc0.ɵɵInheritDefinitionFeature], decls: 2, vars: 3, consts: [["class", "bs-datepicker", 3, "ngClass", 4, "ngIf"], [1, "bs-datepicker", 3, "ngClass"], [1, "bs-datepicker-container"], ["role", "application", 1, "bs-calendar-container", 3, "ngSwitch"], ["class", "bs-media-container", 4, "ngSwitchCase"], ["class", "bs-datepicker-buttons", 4, "ngIf"], ["class", "bs-datepicker-custom-range", 4, "ngIf"], [1, "bs-media-container"], [3, "bs-datepicker-multiple", "calendar", "options", "onNavigate", "onViewMode", "onHover", "onHoverWeek", "onSelect", 4, "ngFor", "ngForOf"], [3, "calendar", "options", "onNavigate", "onViewMode", "onHover", "onHoverWeek", "onSelect"], [3, "bs-datepicker-multiple", "calendar", "onNavigate", "onViewMode", "onHover", "onSelect", 4, "ngFor", "ngForOf"], [3, "calendar", "onNavigate", "onViewMode", "onHover", "onSelect"], [1, "bs-datepicker-buttons"], ["type", "button", 1, "btn", "btn-success"], ["type", "button", 1, "btn", "btn-default"], ["class", "btn-today-wrapper", 3, "today-left", "today-right", "today-center", 4, "ngIf"], ["class", "btn-clear-wrapper", 3, "clear-left", "clear-right", "clear-center", 4, "ngIf"], [1, "btn-today-wrapper"], [1, "btn", "btn-success", 3, "click"], [1, "btn-clear-wrapper"], [1, "bs-datepicker-custom-range"], [3, "selectedRange", "ranges", "customRangeLabel", "onSelect"]], template: function BsDaterangepickerInlineContainerComponent_Template(rf, ctx) { if (rf & 1) {
|
3328 | ɵngcc0.ɵɵtemplate(0, BsDaterangepickerInlineContainerComponent_div_0_Template, 10, 11, "div", 0);
|
3329 | ɵngcc0.ɵɵpipe(1, "async");
|
3330 | } if (rf & 2) {
|
3331 | ɵngcc0.ɵɵproperty("ngIf", ɵngcc0.ɵɵpipeBind1(1, 1, ctx.viewMode));
|
3332 | } }, directives: function () { return [ɵngcc2.NgIf, ɵngcc2.NgClass, ɵngcc2.NgSwitch, ɵngcc2.NgSwitchCase, ɵngcc2.NgForOf, BsDaysCalendarViewComponent, BsMonthCalendarViewComponent, BsYearsCalendarViewComponent, BsCustomDatesViewComponent]; }, pipes: function () { return [ɵngcc2.AsyncPipe]; }, encapsulation: 2, data: { animation: [datepickerAnimation] } });
|
3333 | BsDaterangepickerInlineContainerComponent.ctorParameters = () => [
|
3334 | { type: Renderer2 },
|
3335 | { type: BsDatepickerConfig },
|
3336 | { type: BsDatepickerStore },
|
3337 | { type: ElementRef },
|
3338 | { type: BsDatepickerActions },
|
3339 | { type: BsDatepickerEffects },
|
3340 | { type: PositioningService }
|
3341 | ];
|
3342 | (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BsDaterangepickerInlineContainerComponent, [{
|
3343 | type: Component,
|
3344 | args: [{
|
3345 | selector: 'bs-daterangepicker-inline-container',
|
3346 | providers: [BsDatepickerStore, BsDatepickerEffects],
|
3347 | template: "<!-- days calendar view mode -->\n<div class=\"bs-datepicker\" [ngClass]=\"containerClass\" *ngIf=\"viewMode | async\">\n <div class=\"bs-datepicker-container\"\n [@datepickerAnimation]=\"animationState\"\n (@datepickerAnimation.done)=\"positionServiceEnable()\">\n <!--calendars-->\n <div class=\"bs-calendar-container\" [ngSwitch]=\"viewMode | async\" role=\"application\">\n <!--days calendar-->\n <div *ngSwitchCase=\"'day'\" class=\"bs-media-container\">\n <bs-days-calendar-view\n *ngFor=\"let calendar of daysCalendar$ | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n [options]=\"options$ | async\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"dayHoverHandler($event)\"\n (onHoverWeek)=\"weekHoverHandler($event)\"\n (onSelect)=\"daySelectHandler($event)\">\n </bs-days-calendar-view>\n </div>\n\n <!--months calendar-->\n <div *ngSwitchCase=\"'month'\" class=\"bs-media-container\">\n <bs-month-calendar-view\n *ngFor=\"let calendar of monthsCalendar | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"monthHoverHandler($event)\"\n (onSelect)=\"monthSelectHandler($event)\">\n </bs-month-calendar-view>\n </div>\n\n <!--years calendar-->\n <div *ngSwitchCase=\"'year'\" class=\"bs-media-container\">\n <bs-years-calendar-view\n *ngFor=\"let calendar of yearsCalendar | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"yearHoverHandler($event)\"\n (onSelect)=\"yearSelectHandler($event)\">\n </bs-years-calendar-view>\n </div>\n </div>\n\n <!--applycancel buttons-->\n <div class=\"bs-datepicker-buttons\" *ngIf=\"false\">\n <button class=\"btn btn-success\" type=\"button\">Apply</button>\n <button class=\"btn btn-default\" type=\"button\">Cancel</button>\n </div>\n\n <div class=\"bs-datepicker-buttons\" *ngIf=\"showTodayBtn || showClearBtn\">\n <div class=\"btn-today-wrapper\"\n [class.today-left]=\"todayPos === 'left'\"\n [class.today-right]=\"todayPos === 'right'\"\n [class.today-center]=\"todayPos === 'center'\"\n *ngIf=\"showTodayBtn\">\n <button class=\"btn btn-success\" (click)=\"setToday()\">{{todayBtnLbl}}</button>\n </div>\n\n <div class=\"btn-clear-wrapper\"\n [class.clear-left]=\"clearPos === 'left'\"\n [class.clear-right]=\"clearPos === 'right'\"\n [class.clear-center]=\"clearPos === 'center'\"\n *ngIf=\"showClearBtn\">\n <button class=\"btn btn-success\" (click)=\"clearDate()\">{{clearBtnLbl}}</button>\n </div>\n </div>\n\n </div>\n\n <!--custom dates or date ranges picker-->\n <div class=\"bs-datepicker-custom-range\" *ngIf=\"customRanges && customRanges.length > 0\">\n <bs-custom-date-view\n [selectedRange]=\"chosenRange\"\n [ranges]=\"customRanges\"\n [customRangeLabel]=\"customRangeBtnLbl\"\n (onSelect)=\"setRangeOnCalendar($event)\">\n </bs-custom-date-view>\n </div>\n</div>\n",
|
3348 | host: {
|
3349 | '(click)': '_stopPropagation($event)'
|
3350 | },
|
3351 | animations: [datepickerAnimation]
|
3352 | }]
|
3353 | }], function () { return [{ type: ɵngcc0.Renderer2 }, { type: BsDatepickerConfig }, { type: BsDatepickerStore }, { type: ɵngcc0.ElementRef }, { type: BsDatepickerActions }, { type: BsDatepickerEffects }, { type: ɵngcc1.PositioningService }]; }, null); })();
|
3354 |
|
3355 | class BsDaterangepickerInlineDirective {
|
3356 | constructor(_config, _elementRef, _renderer, _viewContainerRef, cis) {
|
3357 | this._config = _config;
|
3358 | this._elementRef = _elementRef;
|
3359 | |
3360 |
|
3361 |
|
3362 | this.isDisabled = false;
|
3363 | |
3364 |
|
3365 |
|
3366 | this.bsValueChange = new EventEmitter();
|
3367 | this._subs = [];
|
3368 |
|
3369 | Object.assign(this, this._config);
|
3370 | this._datepicker = cis.createLoader(_elementRef, _viewContainerRef, _renderer);
|
3371 | }
|
3372 | |
3373 |
|
3374 |
|
3375 | set bsValue(value) {
|
3376 | if (this._bsValue === value) {
|
3377 | return;
|
3378 | }
|
3379 | this._bsValue = value;
|
3380 | this.bsValueChange.emit(value);
|
3381 | }
|
3382 | ngOnInit() {
|
3383 | this.setConfig();
|
3384 |
|
3385 | this._subs.push(this.bsValueChange.subscribe((value) => {
|
3386 | if (this._datepickerRef) {
|
3387 | this._datepickerRef.instance.value = value;
|
3388 | }
|
3389 | }));
|
3390 |
|
3391 | if (this._datepickerRef) {
|
3392 | this._subs.push(this._datepickerRef.instance.valueChange
|
3393 | .pipe(filter((range) => range && range[0] && !!range[1]))
|
3394 | .subscribe((value) => {
|
3395 | this.bsValue = value;
|
3396 | }));
|
3397 | }
|
3398 | }
|
3399 | ngOnChanges(changes) {
|
3400 | if (!this._datepickerRef || !this._datepickerRef.instance) {
|
3401 | return;
|
3402 | }
|
3403 | if (changes.minDate) {
|
3404 | this._datepickerRef.instance.minDate = this.minDate;
|
3405 | this.setConfig();
|
3406 | }
|
3407 | if (changes.maxDate) {
|
3408 | this._datepickerRef.instance.maxDate = this.maxDate;
|
3409 | this.setConfig();
|
3410 | }
|
3411 | if (changes.datesEnabled) {
|
3412 | this._datepickerRef.instance.datesEnabled = this.datesEnabled;
|
3413 | }
|
3414 | if (changes.datesDisabled) {
|
3415 | this._datepickerRef.instance.datesDisabled = this.datesDisabled;
|
3416 | this.setConfig();
|
3417 | }
|
3418 | if (changes.daysDisabled) {
|
3419 | this._datepickerRef.instance.daysDisabled = this.daysDisabled;
|
3420 | this.setConfig();
|
3421 | }
|
3422 | if (changes.isDisabled) {
|
3423 | this._datepickerRef.instance.isDisabled = this.isDisabled;
|
3424 | this.setConfig();
|
3425 | }
|
3426 | if (changes.dateCustomClasses) {
|
3427 | this._datepickerRef.instance.dateCustomClasses = this.dateCustomClasses;
|
3428 | this.setConfig();
|
3429 | }
|
3430 | }
|
3431 | |
3432 |
|
3433 |
|
3434 | setConfig() {
|
3435 | if (this._datepicker) {
|
3436 | this._datepicker.hide();
|
3437 | }
|
3438 | this._config = Object.assign({}, this._config, this.bsConfig, {
|
3439 | value: checkBsValue(this._bsValue, this.maxDate || this.bsConfig && this.bsConfig.maxDate),
|
3440 | isDisabled: this.isDisabled,
|
3441 | minDate: this.minDate || this.bsConfig && this.bsConfig.minDate,
|
3442 | maxDate: this.maxDate || this.bsConfig && this.bsConfig.maxDate,
|
3443 | daysDisabled: this.daysDisabled || this.bsConfig && this.bsConfig.daysDisabled,
|
3444 | dateCustomClasses: this.dateCustomClasses || this.bsConfig && this.bsConfig.dateCustomClasses,
|
3445 | datesDisabled: this.datesDisabled || this.bsConfig && this.bsConfig.datesDisabled,
|
3446 | datesEnabled: this.datesEnabled || this.bsConfig && this.bsConfig.datesEnabled,
|
3447 | ranges: checkRangesWithMaxDate(this.bsConfig && this.bsConfig.ranges, this.maxDate || this.bsConfig && this.bsConfig.maxDate),
|
3448 | maxDateRange: this.bsConfig && this.bsConfig.maxDateRange
|
3449 | });
|
3450 | this._datepickerRef = this._datepicker
|
3451 | .provide({ provide: BsDatepickerConfig, useValue: this._config })
|
3452 | .attach(BsDaterangepickerInlineContainerComponent)
|
3453 | .to(this._elementRef)
|
3454 | .show();
|
3455 | }
|
3456 | ngOnDestroy() {
|
3457 | this._datepicker.dispose();
|
3458 | }
|
3459 | }
|
3460 | BsDaterangepickerInlineDirective.ɵfac = function BsDaterangepickerInlineDirective_Factory(t) { return new (t || BsDaterangepickerInlineDirective)(ɵngcc0.ɵɵdirectiveInject(BsDaterangepickerInlineConfig), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ViewContainerRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc3.ComponentLoaderFactory)); };
|
3461 | BsDaterangepickerInlineDirective.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: BsDaterangepickerInlineDirective, selectors: [["bs-daterangepicker-inline"]], inputs: { isDisabled: "isDisabled", bsValue: "bsValue", bsConfig: "bsConfig", minDate: "minDate", maxDate: "maxDate", dateCustomClasses: "dateCustomClasses", daysDisabled: "daysDisabled", datesDisabled: "datesDisabled", datesEnabled: "datesEnabled" }, outputs: { bsValueChange: "bsValueChange" }, exportAs: ["bsDaterangepickerInline"], features: [ɵngcc0.ɵɵNgOnChangesFeature] });
|
3462 | BsDaterangepickerInlineDirective.ctorParameters = () => [
|
3463 | { type: BsDaterangepickerInlineConfig },
|
3464 | { type: ElementRef },
|
3465 | { type: Renderer2 },
|
3466 | { type: ViewContainerRef },
|
3467 | { type: ComponentLoaderFactory }
|
3468 | ];
|
3469 | BsDaterangepickerInlineDirective.propDecorators = {
|
3470 | bsValue: [{ type: Input }],
|
3471 | bsConfig: [{ type: Input }],
|
3472 | isDisabled: [{ type: Input }],
|
3473 | minDate: [{ type: Input }],
|
3474 | maxDate: [{ type: Input }],
|
3475 | dateCustomClasses: [{ type: Input }],
|
3476 | daysDisabled: [{ type: Input }],
|
3477 | datesDisabled: [{ type: Input }],
|
3478 | datesEnabled: [{ type: Input }],
|
3479 | bsValueChange: [{ type: Output }]
|
3480 | };
|
3481 | (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BsDaterangepickerInlineDirective, [{
|
3482 | type: Directive,
|
3483 | args: [{
|
3484 | selector: 'bs-daterangepicker-inline',
|
3485 | exportAs: 'bsDaterangepickerInline'
|
3486 | }]
|
3487 | }], function () { return [{ type: BsDaterangepickerInlineConfig }, { type: ɵngcc0.ElementRef }, { type: ɵngcc0.Renderer2 }, { type: ɵngcc0.ViewContainerRef }, { type: ɵngcc3.ComponentLoaderFactory }]; }, { isDisabled: [{
|
3488 | type: Input
|
3489 | }], bsValueChange: [{
|
3490 | type: Output
|
3491 | }], bsValue: [{
|
3492 | type: Input
|
3493 | }], bsConfig: [{
|
3494 | type: Input
|
3495 | }], minDate: [{
|
3496 | type: Input
|
3497 | }], maxDate: [{
|
3498 | type: Input
|
3499 | }], dateCustomClasses: [{
|
3500 | type: Input
|
3501 | }], daysDisabled: [{
|
3502 | type: Input
|
3503 | }], datesDisabled: [{
|
3504 | type: Input
|
3505 | }], datesEnabled: [{
|
3506 | type: Input
|
3507 | }] }); })();
|
3508 |
|
3509 | const BS_DATEPICKER_VALUE_ACCESSOR = {
|
3510 | provide: NG_VALUE_ACCESSOR,
|
3511 | useExisting: forwardRef(() => BsDatepickerInputDirective),
|
3512 | multi: true
|
3513 | };
|
3514 | const BS_DATEPICKER_VALIDATOR = {
|
3515 | provide: NG_VALIDATORS,
|
3516 | useExisting: forwardRef(() => BsDatepickerInputDirective),
|
3517 | multi: true
|
3518 | };
|
3519 | class BsDatepickerInputDirective {
|
3520 | constructor(_picker, _localeService, _renderer, _elRef, changeDetection) {
|
3521 | this._picker = _picker;
|
3522 | this._localeService = _localeService;
|
3523 | this._renderer = _renderer;
|
3524 | this._elRef = _elRef;
|
3525 | this.changeDetection = changeDetection;
|
3526 | this._onChange = Function.prototype;
|
3527 | this._onTouched = Function.prototype;
|
3528 | this._validatorChange = Function.prototype;
|
3529 | this._subs = new Subscription();
|
3530 | }
|
3531 | ngOnInit() {
|
3532 | const setBsValue = (value) => {
|
3533 | this._setInputValue(value);
|
3534 | if (this._value !== value) {
|
3535 | this._value = value;
|
3536 | this._onChange(value);
|
3537 | this._onTouched();
|
3538 | }
|
3539 | this.changeDetection.markForCheck();
|
3540 | };
|
3541 |
|
3542 | if (this._picker._bsValue) {
|
3543 | setBsValue(this._picker._bsValue);
|
3544 | }
|
3545 |
|
3546 | this._subs.add(this._picker.bsValueChange.subscribe(setBsValue));
|
3547 |
|
3548 | this._subs.add(this._localeService.localeChange.subscribe(() => {
|
3549 | this._setInputValue(this._value);
|
3550 | }));
|
3551 | this._subs.add(this._picker.dateInputFormat$.pipe(distinctUntilChanged()).subscribe(() => {
|
3552 | this._setInputValue(this._value);
|
3553 | }));
|
3554 | }
|
3555 | ngOnDestroy() {
|
3556 | this._subs.unsubscribe();
|
3557 | }
|
3558 | onKeydownEvent(event) {
|
3559 | if (event.keyCode === 13 || event.code === 'Enter') {
|
3560 | this.hide();
|
3561 | }
|
3562 | }
|
3563 | _setInputValue(value) {
|
3564 | const initialDate = !value ? ''
|
3565 | : formatDate(value, this._picker._config.dateInputFormat, this._localeService.currentLocale);
|
3566 | this._renderer.setProperty(this._elRef.nativeElement, 'value', initialDate);
|
3567 | }
|
3568 | onChange(event) {
|
3569 |
|
3570 | this.writeValue(event.target.value);
|
3571 | this._onChange(this._value);
|
3572 | if (this._picker._config.returnFocusToInput) {
|
3573 | this._renderer.selectRootElement(this._elRef.nativeElement).focus();
|
3574 | }
|
3575 | this._onTouched();
|
3576 | }
|
3577 | validate(c) {
|
3578 | const _value = c.value;
|
3579 | if (_value === null || _value === undefined || _value === '') {
|
3580 | return null;
|
3581 | }
|
3582 | if (isDate(_value)) {
|
3583 | const _isDateValid = isDateValid(_value);
|
3584 | if (!_isDateValid) {
|
3585 | return { bsDate: { invalid: _value } };
|
3586 | }
|
3587 | if (this._picker && this._picker.minDate && isBefore(_value, this._picker.minDate, 'date')) {
|
3588 | this.writeValue(this._picker.minDate);
|
3589 | return { bsDate: { minDate: this._picker.minDate } };
|
3590 | }
|
3591 | if (this._picker && this._picker.maxDate && isAfter(_value, this._picker.maxDate, 'date')) {
|
3592 | this.writeValue(this._picker.maxDate);
|
3593 | return { bsDate: { maxDate: this._picker.maxDate } };
|
3594 | }
|
3595 | }
|
3596 | return null;
|
3597 | }
|
3598 | registerOnValidatorChange(fn) {
|
3599 | this._validatorChange = fn;
|
3600 | }
|
3601 | writeValue(value) {
|
3602 | if (!value) {
|
3603 | this._value = void 0;
|
3604 | }
|
3605 | else {
|
3606 | const _localeKey = this._localeService.currentLocale;
|
3607 | const _locale = getLocale(_localeKey);
|
3608 | if (!_locale) {
|
3609 | throw new Error(`Locale "${_localeKey}" is not defined, please add it with "defineLocale(...)"`);
|
3610 | }
|
3611 | this._value = parseDate(value, this._picker._config.dateInputFormat, this._localeService.currentLocale);
|
3612 | if (this._picker._config.useUtc) {
|
3613 | this._value = utcAsLocal(this._value);
|
3614 | }
|
3615 | }
|
3616 | this._picker.bsValue = this._value;
|
3617 | }
|
3618 | setDisabledState(isDisabled) {
|
3619 | this._picker.isDisabled = isDisabled;
|
3620 | if (isDisabled) {
|
3621 | this._renderer.setAttribute(this._elRef.nativeElement, 'disabled', 'disabled');
|
3622 | return;
|
3623 | }
|
3624 | this._renderer.removeAttribute(this._elRef.nativeElement, 'disabled');
|
3625 | }
|
3626 | registerOnChange(fn) {
|
3627 | this._onChange = fn;
|
3628 | }
|
3629 | registerOnTouched(fn) {
|
3630 | this._onTouched = fn;
|
3631 | }
|
3632 | onBlur() {
|
3633 | this._onTouched();
|
3634 | }
|
3635 | hide() {
|
3636 | this._picker.hide();
|
3637 | this._renderer.selectRootElement(this._elRef.nativeElement).blur();
|
3638 | if (this._picker._config.returnFocusToInput) {
|
3639 | this._renderer.selectRootElement(this._elRef.nativeElement).focus();
|
3640 | }
|
3641 | }
|
3642 | }
|
3643 | BsDatepickerInputDirective.ɵfac = function BsDatepickerInputDirective_Factory(t) { return new (t || BsDatepickerInputDirective)(ɵngcc0.ɵɵdirectiveInject(BsDatepickerDirective, 1), ɵngcc0.ɵɵdirectiveInject(BsLocaleService), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ChangeDetectorRef)); };
|
3644 | BsDatepickerInputDirective.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: BsDatepickerInputDirective, selectors: [["input", "bsDatepicker", ""]], hostBindings: function BsDatepickerInputDirective_HostBindings(rf, ctx) { if (rf & 1) {
|
3645 | ɵngcc0.ɵɵlistener("change", function BsDatepickerInputDirective_change_HostBindingHandler($event) { return ctx.onChange($event); })("keyup.esc", function BsDatepickerInputDirective_keyup_esc_HostBindingHandler() { return ctx.hide(); })("keydown", function BsDatepickerInputDirective_keydown_HostBindingHandler($event) { return ctx.onKeydownEvent($event); })("blur", function BsDatepickerInputDirective_blur_HostBindingHandler() { return ctx.onBlur(); });
|
3646 | } }, features: [ɵngcc0.ɵɵProvidersFeature([BS_DATEPICKER_VALUE_ACCESSOR, BS_DATEPICKER_VALIDATOR])] });
|
3647 | BsDatepickerInputDirective.ctorParameters = () => [
|
3648 | { type: BsDatepickerDirective, decorators: [{ type: Host }] },
|
3649 | { type: BsLocaleService },
|
3650 | { type: Renderer2 },
|
3651 | { type: ElementRef },
|
3652 | { type: ChangeDetectorRef }
|
3653 | ];
|
3654 | (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BsDatepickerInputDirective, [{
|
3655 | type: Directive,
|
3656 | args: [{
|
3657 | selector: `input[bsDatepicker]`,
|
3658 |
|
3659 | host: {
|
3660 | '(change)': 'onChange($event)',
|
3661 | '(keyup.esc)': 'hide()',
|
3662 | '(keydown)': 'onKeydownEvent($event)',
|
3663 | '(blur)': 'onBlur()'
|
3664 | },
|
3665 | providers: [BS_DATEPICKER_VALUE_ACCESSOR, BS_DATEPICKER_VALIDATOR]
|
3666 | }]
|
3667 | }], function () { return [{ type: BsDatepickerDirective, decorators: [{
|
3668 | type: Host
|
3669 | }] }, { type: BsLocaleService }, { type: ɵngcc0.Renderer2 }, { type: ɵngcc0.ElementRef }, { type: ɵngcc0.ChangeDetectorRef }]; }, null); })();
|
3670 |
|
3671 | class BsDaterangepickerConfig extends BsDatepickerConfig {
|
3672 | constructor() {
|
3673 | super(...arguments);
|
3674 |
|
3675 | this.displayMonths = 2;
|
3676 | }
|
3677 | }
|
3678 | BsDaterangepickerConfig.ɵfac = function BsDaterangepickerConfig_Factory(t) { return ɵBsDaterangepickerConfig_BaseFactory(t || BsDaterangepickerConfig); };
|
3679 | BsDaterangepickerConfig.ɵprov = ɵɵdefineInjectable({ factory: function BsDaterangepickerConfig_Factory() { return new BsDaterangepickerConfig(); }, token: BsDaterangepickerConfig, providedIn: "root" });
|
3680 | const ɵBsDaterangepickerConfig_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(BsDaterangepickerConfig);
|
3681 | (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BsDaterangepickerConfig, [{
|
3682 | type: Injectable,
|
3683 | args: [{
|
3684 | providedIn: 'root'
|
3685 | }]
|
3686 | }], null, null); })();
|
3687 |
|
3688 | class BsDaterangepickerDirective {
|
3689 | constructor(_config, _elementRef, _renderer, _viewContainerRef, cis) {
|
3690 | this._config = _config;
|
3691 | this._elementRef = _elementRef;
|
3692 | this._renderer = _renderer;
|
3693 | |
3694 |
|
3695 |
|
3696 | this.placement = 'bottom';
|
3697 | |
3698 |
|
3699 |
|
3700 |
|
3701 | this.triggers = 'click';
|
3702 | |
3703 |
|
3704 |
|
3705 | this.outsideClick = true;
|
3706 | |
3707 |
|
3708 |
|
3709 | this.container = 'body';
|
3710 | this.outsideEsc = true;
|
3711 | this.isDestroy$ = new Subject();
|
3712 | |
3713 |
|
3714 |
|
3715 | this.isDisabled = false;
|
3716 | |
3717 |
|
3718 |
|
3719 | this.bsValueChange = new EventEmitter();
|
3720 | this._subs = [];
|
3721 | this._rangeInputFormat$ = new Subject();
|
3722 | this._datepicker = cis.createLoader(_elementRef, _viewContainerRef, _renderer);
|
3723 | Object.assign(this, _config);
|
3724 | this.onShown = this._datepicker.onShown;
|
3725 | this.onHidden = this._datepicker.onHidden;
|
3726 | this.isOpen$ = new BehaviorSubject(this.isOpen);
|
3727 | }
|
3728 | |
3729 |
|
3730 |
|
3731 | get isOpen() {
|
3732 | return this._datepicker.isShown;
|
3733 | }
|
3734 | set isOpen(value) {
|
3735 | this.isOpen$.next(value);
|
3736 | }
|
3737 | |
3738 |
|
3739 |
|
3740 | set bsValue(value) {
|
3741 | if (this._bsValue === value) {
|
3742 | return;
|
3743 | }
|
3744 | this._bsValue = value;
|
3745 | this.bsValueChange.emit(value);
|
3746 | }
|
3747 | |
3748 |
|
3749 |
|
3750 | set bsConfig(bsConfig) {
|
3751 | this._bsConfig = bsConfig;
|
3752 | this.setConfig();
|
3753 | this._rangeInputFormat$.next(bsConfig && bsConfig.rangeInputFormat);
|
3754 | }
|
3755 | get bsConfig() {
|
3756 | return this._bsConfig;
|
3757 | }
|
3758 | get rangeInputFormat$() {
|
3759 | return this._rangeInputFormat$;
|
3760 | }
|
3761 | ngOnInit() {
|
3762 | this.isDestroy$ = new Subject();
|
3763 | this._datepicker.listen({
|
3764 | outsideClick: this.outsideClick,
|
3765 | outsideEsc: this.outsideEsc,
|
3766 | triggers: this.triggers,
|
3767 | show: () => this.show()
|
3768 | });
|
3769 | this.setConfig();
|
3770 | }
|
3771 | ngOnChanges(changes) {
|
3772 | if (!this._datepickerRef || !this._datepickerRef.instance) {
|
3773 | return;
|
3774 | }
|
3775 | if (changes.minDate) {
|
3776 | this._datepickerRef.instance.minDate = this.minDate;
|
3777 | }
|
3778 | if (changes.maxDate) {
|
3779 | this._datepickerRef.instance.maxDate = this.maxDate;
|
3780 | }
|
3781 | if (changes.datesDisabled) {
|
3782 | this._datepickerRef.instance.datesDisabled = this.datesDisabled;
|
3783 | }
|
3784 | if (changes.datesEnabled) {
|
3785 | this._datepickerRef.instance.datesEnabled = this.datesEnabled;
|
3786 | }
|
3787 | if (changes.daysDisabled) {
|
3788 | this._datepickerRef.instance.daysDisabled = this.daysDisabled;
|
3789 | }
|
3790 | if (changes.isDisabled) {
|
3791 | this._datepickerRef.instance.isDisabled = this.isDisabled;
|
3792 | }
|
3793 | if (changes.dateCustomClasses) {
|
3794 | this._datepickerRef.instance.dateCustomClasses = this.dateCustomClasses;
|
3795 | }
|
3796 | }
|
3797 | ngAfterViewInit() {
|
3798 | this.isOpen$.pipe(filter(isOpen => isOpen !== this.isOpen), takeUntil(this.isDestroy$))
|
3799 | .subscribe(() => this.toggle());
|
3800 | }
|
3801 | |
3802 |
|
3803 |
|
3804 |
|
3805 | show() {
|
3806 | if (this._datepicker.isShown) {
|
3807 | return;
|
3808 | }
|
3809 | this.setConfig();
|
3810 | this._datepickerRef = this._datepicker
|
3811 | .provide({ provide: BsDatepickerConfig, useValue: this._config })
|
3812 | .attach(BsDaterangepickerContainerComponent)
|
3813 | .to(this.container)
|
3814 | .position({ attachment: this.placement })
|
3815 | .show({ placement: this.placement });
|
3816 |
|
3817 | this._subs.push(this.bsValueChange.subscribe((value) => {
|
3818 | if (this._datepickerRef) {
|
3819 | this._datepickerRef.instance.value = value;
|
3820 | }
|
3821 | }));
|
3822 |
|
3823 | if (this._datepickerRef) {
|
3824 | this._subs.push(this._datepickerRef.instance.valueChange
|
3825 | .pipe(filter((range) => range && range[0] && !!range[1]))
|
3826 | .subscribe((value) => {
|
3827 | this.bsValue = value;
|
3828 | this.hide();
|
3829 | }));
|
3830 | }
|
3831 | }
|
3832 | |
3833 |
|
3834 |
|
3835 | setConfig() {
|
3836 | this._config = Object.assign({}, this._config, this.bsConfig, {
|
3837 | value: checkBsValue(this._bsValue, this.maxDate || this.bsConfig && this.bsConfig.maxDate),
|
3838 | isDisabled: this.isDisabled,
|
3839 | minDate: this.minDate || this.bsConfig && this.bsConfig.minDate,
|
3840 | maxDate: this.maxDate || this.bsConfig && this.bsConfig.maxDate,
|
3841 | daysDisabled: this.daysDisabled || this.bsConfig && this.bsConfig.daysDisabled,
|
3842 | dateCustomClasses: this.dateCustomClasses || this.bsConfig && this.bsConfig.dateCustomClasses,
|
3843 | datesDisabled: this.datesDisabled || this.bsConfig && this.bsConfig.datesDisabled,
|
3844 | datesEnabled: this.datesEnabled || this.bsConfig && this.bsConfig.datesEnabled,
|
3845 | ranges: checkRangesWithMaxDate(this.bsConfig && this.bsConfig.ranges, this.maxDate || this.bsConfig && this.bsConfig.maxDate),
|
3846 | maxDateRange: this.bsConfig && this.bsConfig.maxDateRange
|
3847 | });
|
3848 | }
|
3849 | |
3850 |
|
3851 |
|
3852 |
|
3853 | hide() {
|
3854 | if (this.isOpen) {
|
3855 | this._datepicker.hide();
|
3856 | }
|
3857 | for (const sub of this._subs) {
|
3858 | sub.unsubscribe();
|
3859 | }
|
3860 | if (this._config.returnFocusToInput) {
|
3861 | this._renderer.selectRootElement(this._elementRef.nativeElement).focus();
|
3862 | }
|
3863 | }
|
3864 | |
3865 |
|
3866 |
|
3867 |
|
3868 | toggle() {
|
3869 | if (this.isOpen) {
|
3870 | return this.hide();
|
3871 | }
|
3872 | this.show();
|
3873 | }
|
3874 | ngOnDestroy() {
|
3875 | this._datepicker.dispose();
|
3876 | this.isOpen$.next(false);
|
3877 | if (this.isDestroy$) {
|
3878 | this.isDestroy$.next();
|
3879 | this.isDestroy$.complete();
|
3880 | }
|
3881 | }
|
3882 | }
|
3883 | BsDaterangepickerDirective.ɵfac = function BsDaterangepickerDirective_Factory(t) { return new (t || BsDaterangepickerDirective)(ɵngcc0.ɵɵdirectiveInject(BsDaterangepickerConfig), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ViewContainerRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc3.ComponentLoaderFactory)); };
|
3884 | BsDaterangepickerDirective.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: BsDaterangepickerDirective, selectors: [["", "bsDaterangepicker", ""]], inputs: { placement: "placement", triggers: "triggers", outsideClick: "outsideClick", container: "container", outsideEsc: "outsideEsc", isDisabled: "isDisabled", isOpen: "isOpen", bsValue: "bsValue", bsConfig: "bsConfig", minDate: "minDate", maxDate: "maxDate", dateCustomClasses: "dateCustomClasses", daysDisabled: "daysDisabled", datesDisabled: "datesDisabled", datesEnabled: "datesEnabled" }, outputs: { bsValueChange: "bsValueChange", onShown: "onShown", onHidden: "onHidden" }, exportAs: ["bsDaterangepicker"], features: [ɵngcc0.ɵɵNgOnChangesFeature] });
|
3885 | BsDaterangepickerDirective.ctorParameters = () => [
|
3886 | { type: BsDaterangepickerConfig },
|
3887 | { type: ElementRef },
|
3888 | { type: Renderer2 },
|
3889 | { type: ViewContainerRef },
|
3890 | { type: ComponentLoaderFactory }
|
3891 | ];
|
3892 | BsDaterangepickerDirective.propDecorators = {
|
3893 | placement: [{ type: Input }],
|
3894 | triggers: [{ type: Input }],
|
3895 | outsideClick: [{ type: Input }],
|
3896 | container: [{ type: Input }],
|
3897 | outsideEsc: [{ type: Input }],
|
3898 | isOpen: [{ type: Input }],
|
3899 | onShown: [{ type: Output }],
|
3900 | onHidden: [{ type: Output }],
|
3901 | bsValue: [{ type: Input }],
|
3902 | bsConfig: [{ type: Input }],
|
3903 | isDisabled: [{ type: Input }],
|
3904 | minDate: [{ type: Input }],
|
3905 | maxDate: [{ type: Input }],
|
3906 | dateCustomClasses: [{ type: Input }],
|
3907 | daysDisabled: [{ type: Input }],
|
3908 | datesDisabled: [{ type: Input }],
|
3909 | datesEnabled: [{ type: Input }],
|
3910 | bsValueChange: [{ type: Output }]
|
3911 | };
|
3912 | (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BsDaterangepickerDirective, [{
|
3913 | type: Directive,
|
3914 | args: [{
|
3915 | selector: '[bsDaterangepicker]',
|
3916 | exportAs: 'bsDaterangepicker'
|
3917 | }]
|
3918 | }], function () { return [{ type: BsDaterangepickerConfig }, { type: ɵngcc0.ElementRef }, { type: ɵngcc0.Renderer2 }, { type: ɵngcc0.ViewContainerRef }, { type: ɵngcc3.ComponentLoaderFactory }]; }, { placement: [{
|
3919 | type: Input
|
3920 | }], triggers: [{
|
3921 | type: Input
|
3922 | }], outsideClick: [{
|
3923 | type: Input
|
3924 | }], container: [{
|
3925 | type: Input
|
3926 | }], outsideEsc: [{
|
3927 | type: Input
|
3928 | }], isDisabled: [{
|
3929 | type: Input
|
3930 | }], bsValueChange: [{
|
3931 | type: Output
|
3932 | }], onShown: [{
|
3933 | type: Output
|
3934 | }], onHidden: [{
|
3935 | type: Output
|
3936 | }], isOpen: [{
|
3937 | type: Input
|
3938 | }], bsValue: [{
|
3939 | type: Input
|
3940 | }], bsConfig: [{
|
3941 | type: Input
|
3942 | }], minDate: [{
|
3943 | type: Input
|
3944 | }], maxDate: [{
|
3945 | type: Input
|
3946 | }], dateCustomClasses: [{
|
3947 | type: Input
|
3948 | }], daysDisabled: [{
|
3949 | type: Input
|
3950 | }], datesDisabled: [{
|
3951 | type: Input
|
3952 | }], datesEnabled: [{
|
3953 | type: Input
|
3954 | }] }); })();
|
3955 |
|
3956 | const BS_DATERANGEPICKER_VALUE_ACCESSOR = {
|
3957 | provide: NG_VALUE_ACCESSOR,
|
3958 | useExisting: forwardRef(() => BsDaterangepickerInputDirective),
|
3959 | multi: true
|
3960 | };
|
3961 | const BS_DATERANGEPICKER_VALIDATOR = {
|
3962 | provide: NG_VALIDATORS,
|
3963 | useExisting: forwardRef(() => BsDaterangepickerInputDirective),
|
3964 | multi: true
|
3965 | };
|
3966 | class BsDaterangepickerInputDirective {
|
3967 | constructor(_picker, _localeService, _renderer, _elRef, changeDetection) {
|
3968 | this._picker = _picker;
|
3969 | this._localeService = _localeService;
|
3970 | this._renderer = _renderer;
|
3971 | this._elRef = _elRef;
|
3972 | this.changeDetection = changeDetection;
|
3973 | this._onChange = Function.prototype;
|
3974 | this._onTouched = Function.prototype;
|
3975 | this._validatorChange = Function.prototype;
|
3976 | this._subs = new Subscription();
|
3977 | }
|
3978 | ngOnInit() {
|
3979 | const setBsValue = (value) => {
|
3980 | this._setInputValue(value);
|
3981 | if (this._value !== value) {
|
3982 | this._value = value;
|
3983 | this._onChange(value);
|
3984 | this._onTouched();
|
3985 | }
|
3986 | this.changeDetection.markForCheck();
|
3987 | };
|
3988 |
|
3989 | if (this._picker._bsValue) {
|
3990 | setBsValue(this._picker._bsValue);
|
3991 | }
|
3992 |
|
3993 | this._subs.add(this._picker.bsValueChange.subscribe((value) => {
|
3994 | this._setInputValue(value);
|
3995 | if (this._value !== value) {
|
3996 | this._value = value;
|
3997 | this._onChange(value);
|
3998 | this._onTouched();
|
3999 | }
|
4000 | this.changeDetection.markForCheck();
|
4001 | }));
|
4002 |
|
4003 | this._subs.add(this._localeService.localeChange.subscribe(() => {
|
4004 | this._setInputValue(this._value);
|
4005 | }));
|
4006 | this._subs.add(
|
4007 |
|
4008 | this._picker.rangeInputFormat$.pipe(distinctUntilChanged()).subscribe(() => {
|
4009 | this._setInputValue(this._value);
|
4010 | }));
|
4011 | }
|
4012 | ngOnDestroy() {
|
4013 | this._subs.unsubscribe();
|
4014 | }
|
4015 | onKeydownEvent(event) {
|
4016 | if (event.keyCode === 13 || event.code === 'Enter') {
|
4017 | this.hide();
|
4018 | }
|
4019 | }
|
4020 | _setInputValue(date) {
|
4021 | let range = '';
|
4022 | if (date) {
|
4023 | const start = !date[0] ? ''
|
4024 | : formatDate(date[0], this._picker._config.rangeInputFormat, this._localeService.currentLocale);
|
4025 | const end = !date[1] ? ''
|
4026 | : formatDate(date[1], this._picker._config.rangeInputFormat, this._localeService.currentLocale);
|
4027 | range = (start && end) ? start + this._picker._config.rangeSeparator + end : '';
|
4028 | }
|
4029 | this._renderer.setProperty(this._elRef.nativeElement, 'value', range);
|
4030 | }
|
4031 | onChange(event) {
|
4032 |
|
4033 | this.writeValue(event.target.value);
|
4034 | this._onChange(this._value);
|
4035 | if (this._picker._config.returnFocusToInput) {
|
4036 | this._renderer.selectRootElement(this._elRef.nativeElement).focus();
|
4037 | }
|
4038 | this._onTouched();
|
4039 | }
|
4040 | validate(c) {
|
4041 | let _value = c.value;
|
4042 | const errors = [];
|
4043 | if (_value === null || _value === undefined || !isArray(_value)) {
|
4044 | return null;
|
4045 | }
|
4046 | _value = _value.slice().sort((a, b) => a.getTime() - b.getTime());
|
4047 | const _isFirstDateValid = isDateValid(_value[0]);
|
4048 | const _isSecondDateValid = isDateValid(_value[1]);
|
4049 | if (!_isFirstDateValid) {
|
4050 | return { bsDate: { invalid: _value[0] } };
|
4051 | }
|
4052 | if (!_isSecondDateValid) {
|
4053 | return { bsDate: { invalid: _value[1] } };
|
4054 | }
|
4055 | if (this._picker && this._picker.minDate && isBefore(_value[0], this._picker.minDate, 'date')) {
|
4056 | _value[0] = this._picker.minDate;
|
4057 | errors.push({ bsDate: { minDate: this._picker.minDate } });
|
4058 | }
|
4059 | if (this._picker && this._picker.maxDate && isAfter(_value[1], this._picker.maxDate, 'date')) {
|
4060 | _value[1] = this._picker.maxDate;
|
4061 | errors.push({ bsDate: { maxDate: this._picker.maxDate } });
|
4062 | }
|
4063 | if (errors.length > 0) {
|
4064 | this.writeValue(_value);
|
4065 | return errors;
|
4066 | }
|
4067 | return null;
|
4068 | }
|
4069 | registerOnValidatorChange(fn) {
|
4070 | this._validatorChange = fn;
|
4071 | }
|
4072 | writeValue(value) {
|
4073 | if (!value) {
|
4074 | this._value = void 0;
|
4075 | }
|
4076 | else {
|
4077 | const _localeKey = this._localeService.currentLocale;
|
4078 | const _locale = getLocale(_localeKey);
|
4079 | if (!_locale) {
|
4080 | throw new Error(`Locale "${_localeKey}" is not defined, please add it with "defineLocale(...)"`);
|
4081 | }
|
4082 | let _input = [];
|
4083 | if (typeof value === 'string') {
|
4084 | const trimmedSeparator = this._picker._config.rangeSeparator.trim();
|
4085 | _input = value
|
4086 | .split(trimmedSeparator.length > 0 ? trimmedSeparator : this._picker._config.rangeSeparator)
|
4087 | .map(_val => _val.trim());
|
4088 | }
|
4089 | if (Array.isArray(value)) {
|
4090 | _input = value;
|
4091 | }
|
4092 | this._value = _input
|
4093 | .map((_val) => {
|
4094 | if (this._picker._config.useUtc) {
|
4095 | return utcAsLocal(parseDate(_val, this._picker._config.rangeInputFormat, this._localeService.currentLocale));
|
4096 | }
|
4097 | return parseDate(_val, this._picker._config.rangeInputFormat, this._localeService.currentLocale);
|
4098 | })
|
4099 | .map((date) => (isNaN(date.valueOf()) ? void 0 : date));
|
4100 | }
|
4101 | this._picker.bsValue = this._value;
|
4102 | }
|
4103 | setDisabledState(isDisabled) {
|
4104 | this._picker.isDisabled = isDisabled;
|
4105 | if (isDisabled) {
|
4106 | this._renderer.setAttribute(this._elRef.nativeElement, 'disabled', 'disabled');
|
4107 | return;
|
4108 | }
|
4109 | this._renderer.removeAttribute(this._elRef.nativeElement, 'disabled');
|
4110 | }
|
4111 |
|
4112 | registerOnChange(fn) {
|
4113 | this._onChange = fn;
|
4114 | }
|
4115 |
|
4116 | registerOnTouched(fn) {
|
4117 | this._onTouched = fn;
|
4118 | }
|
4119 | onBlur() {
|
4120 | this._onTouched();
|
4121 | }
|
4122 | hide() {
|
4123 | this._picker.hide();
|
4124 | this._renderer.selectRootElement(this._elRef.nativeElement).blur();
|
4125 | if (this._picker._config.returnFocusToInput) {
|
4126 | this._renderer.selectRootElement(this._elRef.nativeElement).focus();
|
4127 | }
|
4128 | }
|
4129 | }
|
4130 | BsDaterangepickerInputDirective.ɵfac = function BsDaterangepickerInputDirective_Factory(t) { return new (t || BsDaterangepickerInputDirective)(ɵngcc0.ɵɵdirectiveInject(BsDaterangepickerDirective, 1), ɵngcc0.ɵɵdirectiveInject(BsLocaleService), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ChangeDetectorRef)); };
|
4131 | BsDaterangepickerInputDirective.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: BsDaterangepickerInputDirective, selectors: [["input", "bsDaterangepicker", ""]], hostBindings: function BsDaterangepickerInputDirective_HostBindings(rf, ctx) { if (rf & 1) {
|
4132 | ɵngcc0.ɵɵlistener("change", function BsDaterangepickerInputDirective_change_HostBindingHandler($event) { return ctx.onChange($event); })("keyup.esc", function BsDaterangepickerInputDirective_keyup_esc_HostBindingHandler() { return ctx.hide(); })("keydown", function BsDaterangepickerInputDirective_keydown_HostBindingHandler($event) { return ctx.onKeydownEvent($event); })("blur", function BsDaterangepickerInputDirective_blur_HostBindingHandler() { return ctx.onBlur(); });
|
4133 | } }, features: [ɵngcc0.ɵɵProvidersFeature([BS_DATERANGEPICKER_VALUE_ACCESSOR, BS_DATERANGEPICKER_VALIDATOR])] });
|
4134 | BsDaterangepickerInputDirective.ctorParameters = () => [
|
4135 | { type: BsDaterangepickerDirective, decorators: [{ type: Host }] },
|
4136 | { type: BsLocaleService },
|
4137 | { type: Renderer2 },
|
4138 | { type: ElementRef },
|
4139 | { type: ChangeDetectorRef }
|
4140 | ];
|
4141 | (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BsDaterangepickerInputDirective, [{
|
4142 | type: Directive,
|
4143 | args: [{
|
4144 | selector: `input[bsDaterangepicker]`,
|
4145 |
|
4146 | host: {
|
4147 | '(change)': 'onChange($event)',
|
4148 | '(keyup.esc)': 'hide()',
|
4149 | '(keydown)': 'onKeydownEvent($event)',
|
4150 | '(blur)': 'onBlur()'
|
4151 | },
|
4152 | providers: [BS_DATERANGEPICKER_VALUE_ACCESSOR, BS_DATERANGEPICKER_VALIDATOR]
|
4153 | }]
|
4154 | }], function () { return [{ type: BsDaterangepickerDirective, decorators: [{
|
4155 | type: Host
|
4156 | }] }, { type: BsLocaleService }, { type: ɵngcc0.Renderer2 }, { type: ɵngcc0.ElementRef }, { type: ɵngcc0.ChangeDetectorRef }]; }, null); })();
|
4157 |
|
4158 | class DateFormatter {
|
4159 | format(date, format, locale) {
|
4160 | return formatDate(date, format, locale);
|
4161 | }
|
4162 | }
|
4163 |
|
4164 | class DatePickerInnerComponent {
|
4165 | constructor() {
|
4166 | this.monthColLimit = 0;
|
4167 | this.yearColLimit = 0;
|
4168 | this.selectionDone = new EventEmitter(undefined);
|
4169 | this.update = new EventEmitter(false);
|
4170 | this.activeDateChange = new EventEmitter(undefined);
|
4171 | this.stepDay = {};
|
4172 | this.stepMonth = {};
|
4173 | this.stepYear = {};
|
4174 | this.modes = ['day', 'month', 'year'];
|
4175 | this.dateFormatter = new DateFormatter();
|
4176 | }
|
4177 | get activeDate() {
|
4178 | return this._activeDate;
|
4179 | }
|
4180 | set activeDate(value) {
|
4181 | this._activeDate = value;
|
4182 | }
|
4183 |
|
4184 | ngOnInit() {
|
4185 |
|
4186 | this.uniqueId = `datepicker--${Math.floor(Math.random() * 10000)}`;
|
4187 | if (this.initDate) {
|
4188 | this.activeDate = this.initDate;
|
4189 | this.selectedDate = new Date(this.activeDate.valueOf());
|
4190 | this.update.emit(this.activeDate);
|
4191 | }
|
4192 | else if (this.activeDate === undefined) {
|
4193 | this.activeDate = new Date();
|
4194 | }
|
4195 | }
|
4196 |
|
4197 | ngOnChanges(changes) {
|
4198 | this.refreshView();
|
4199 | this.checkIfActiveDateGotUpdated(changes.activeDate);
|
4200 | }
|
4201 |
|
4202 |
|
4203 | checkIfActiveDateGotUpdated(activeDate) {
|
4204 | if (activeDate && !activeDate.firstChange) {
|
4205 | const previousValue = activeDate.previousValue;
|
4206 | if (previousValue &&
|
4207 | previousValue instanceof Date &&
|
4208 | previousValue.getTime() !== activeDate.currentValue.getTime()) {
|
4209 | this.activeDateChange.emit(this.activeDate);
|
4210 | }
|
4211 | }
|
4212 | }
|
4213 | setCompareHandler(handler, type) {
|
4214 | if (type === 'day') {
|
4215 | this.compareHandlerDay = handler;
|
4216 | }
|
4217 | if (type === 'month') {
|
4218 | this.compareHandlerMonth = handler;
|
4219 | }
|
4220 | if (type === 'year') {
|
4221 | this.compareHandlerYear = handler;
|
4222 | }
|
4223 | }
|
4224 | compare(date1, date2) {
|
4225 | if (date1 === undefined || date2 === undefined) {
|
4226 | return undefined;
|
4227 | }
|
4228 | if (this.datepickerMode === 'day' && this.compareHandlerDay) {
|
4229 | return this.compareHandlerDay(date1, date2);
|
4230 | }
|
4231 | if (this.datepickerMode === 'month' && this.compareHandlerMonth) {
|
4232 | return this.compareHandlerMonth(date1, date2);
|
4233 | }
|
4234 | if (this.datepickerMode === 'year' && this.compareHandlerYear) {
|
4235 | return this.compareHandlerYear(date1, date2);
|
4236 | }
|
4237 | return void 0;
|
4238 | }
|
4239 | setRefreshViewHandler(handler, type) {
|
4240 | if (type === 'day') {
|
4241 | this.refreshViewHandlerDay = handler;
|
4242 | }
|
4243 | if (type === 'month') {
|
4244 | this.refreshViewHandlerMonth = handler;
|
4245 | }
|
4246 | if (type === 'year') {
|
4247 | this.refreshViewHandlerYear = handler;
|
4248 | }
|
4249 | }
|
4250 | refreshView() {
|
4251 | if (this.datepickerMode === 'day' && this.refreshViewHandlerDay) {
|
4252 | this.refreshViewHandlerDay();
|
4253 | }
|
4254 | if (this.datepickerMode === 'month' && this.refreshViewHandlerMonth) {
|
4255 | this.refreshViewHandlerMonth();
|
4256 | }
|
4257 | if (this.datepickerMode === 'year' && this.refreshViewHandlerYear) {
|
4258 | this.refreshViewHandlerYear();
|
4259 | }
|
4260 | }
|
4261 | dateFilter(date, format) {
|
4262 | return this.dateFormatter.format(date, format, this.locale);
|
4263 | }
|
4264 |
|
4265 | isActive(dateObject) {
|
4266 | if (this.compare(dateObject.date, this.activeDate) === 0) {
|
4267 | this.activeDateId = dateObject.uid;
|
4268 | return true;
|
4269 | }
|
4270 | return false;
|
4271 | }
|
4272 |
|
4273 | createDateObject(date, format) {
|
4274 |
|
4275 | const dateObject = {};
|
4276 | dateObject.date = new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
4277 | dateObject.date = this.fixTimeZone(dateObject.date);
|
4278 | dateObject.label = this.dateFilter(date, format);
|
4279 | dateObject.selected = this.compare(date, this.selectedDate) === 0;
|
4280 | dateObject.disabled = this.isDisabled(date);
|
4281 | dateObject.current = this.compare(date, new Date()) === 0;
|
4282 | dateObject.customClass = this.getCustomClassForDate(dateObject.date);
|
4283 | return dateObject;
|
4284 | }
|
4285 |
|
4286 | split(arr, size) {
|
4287 |
|
4288 | const arrays = [];
|
4289 | while (arr.length > 0) {
|
4290 | arrays.push(arr.splice(0, size));
|
4291 | }
|
4292 | return arrays;
|
4293 | }
|
4294 |
|
4295 |
|
4296 |
|
4297 |
|
4298 |
|
4299 |
|
4300 | fixTimeZone(date) {
|
4301 | const hours = date.getHours();
|
4302 | return new Date(date.getFullYear(), date.getMonth(), date.getDate(), hours === 23 ? hours + 2 : 0);
|
4303 | }
|
4304 | select(date, isManual = true) {
|
4305 | if (this.datepickerMode === this.minMode) {
|
4306 | if (!this.activeDate) {
|
4307 | this.activeDate = new Date(0, 0, 0, 0, 0, 0, 0);
|
4308 | }
|
4309 | this.activeDate = new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
4310 | this.activeDate = this.fixTimeZone(this.activeDate);
|
4311 | if (isManual) {
|
4312 | this.selectionDone.emit(this.activeDate);
|
4313 | }
|
4314 | }
|
4315 | else {
|
4316 | this.activeDate = new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
4317 | this.activeDate = this.fixTimeZone(this.activeDate);
|
4318 | if (isManual && this.datepickerMode) {
|
4319 | this.datepickerMode = this.modes[this.modes.indexOf(this.datepickerMode) - 1];
|
4320 | }
|
4321 | }
|
4322 | this.selectedDate = new Date(this.activeDate.valueOf());
|
4323 | this.update.emit(this.activeDate);
|
4324 | this.refreshView();
|
4325 | }
|
4326 | move(direction) {
|
4327 |
|
4328 | let expectedStep;
|
4329 | if (this.datepickerMode === 'day') {
|
4330 | expectedStep = this.stepDay;
|
4331 | }
|
4332 | if (this.datepickerMode === 'month') {
|
4333 | expectedStep = this.stepMonth;
|
4334 | }
|
4335 | if (this.datepickerMode === 'year') {
|
4336 | expectedStep = this.stepYear;
|
4337 | }
|
4338 | if (expectedStep && this.activeDate) {
|
4339 | const year = this.activeDate.getFullYear() + direction * (expectedStep.years || 0);
|
4340 | const month = this.activeDate.getMonth() + direction * (expectedStep.months || 0);
|
4341 | this.activeDate = new Date(year, month, 1);
|
4342 | this.refreshView();
|
4343 | this.activeDateChange.emit(this.activeDate);
|
4344 | }
|
4345 | }
|
4346 | toggleMode(_direction) {
|
4347 | const direction = _direction || 1;
|
4348 | if ((this.datepickerMode === this.maxMode && direction === 1) ||
|
4349 | (this.datepickerMode === this.minMode && direction === -1)) {
|
4350 | return;
|
4351 | }
|
4352 | if (this.datepickerMode) {
|
4353 | this.datepickerMode = this.modes[this.modes.indexOf(this.datepickerMode) + direction];
|
4354 | }
|
4355 | this.refreshView();
|
4356 | }
|
4357 | getCustomClassForDate(date) {
|
4358 | if (!this.customClass) {
|
4359 | return '';
|
4360 | }
|
4361 |
|
4362 | const customClassObject = this.customClass.find((customClass) => {
|
4363 | return (customClass.date.valueOf() === date.valueOf() &&
|
4364 | customClass.mode === this.datepickerMode);
|
4365 | }, this);
|
4366 | return customClassObject === undefined ? '' : customClassObject.clazz;
|
4367 | }
|
4368 | compareDateDisabled(date1Disabled, date2) {
|
4369 | if (date1Disabled === undefined || date2 === undefined) {
|
4370 | return undefined;
|
4371 | }
|
4372 | if (date1Disabled.mode === 'day' && this.compareHandlerDay) {
|
4373 | return this.compareHandlerDay(date1Disabled.date, date2);
|
4374 | }
|
4375 | if (date1Disabled.mode === 'month' && this.compareHandlerMonth) {
|
4376 | return this.compareHandlerMonth(date1Disabled.date, date2);
|
4377 | }
|
4378 | if (date1Disabled.mode === 'year' && this.compareHandlerYear) {
|
4379 | return this.compareHandlerYear(date1Disabled.date, date2);
|
4380 | }
|
4381 | return undefined;
|
4382 | }
|
4383 | isDisabled(date) {
|
4384 | let isDateDisabled = false;
|
4385 | if (this.dateDisabled) {
|
4386 | this.dateDisabled.forEach((disabledDate) => {
|
4387 | if (this.compareDateDisabled(disabledDate, date) === 0) {
|
4388 | isDateDisabled = true;
|
4389 | }
|
4390 | });
|
4391 | }
|
4392 | if (this.dayDisabled) {
|
4393 | isDateDisabled =
|
4394 | isDateDisabled ||
|
4395 | this.dayDisabled.indexOf(date.getDay()) > -1;
|
4396 | }
|
4397 | if (isDateDisabled) {
|
4398 | return isDateDisabled;
|
4399 | }
|
4400 | const minDate = Number(this.minDate && this.compare(date, this.minDate));
|
4401 | if (!isNaN(minDate)) {
|
4402 | return minDate < 0;
|
4403 | }
|
4404 | const maxDate = Number(this.maxDate && this.compare(date, this.maxDate));
|
4405 | if (!isNaN(maxDate)) {
|
4406 | return maxDate > 0;
|
4407 | }
|
4408 | return false;
|
4409 | }
|
4410 | }
|
4411 | DatePickerInnerComponent.ɵfac = function DatePickerInnerComponent_Factory(t) { return new (t || DatePickerInnerComponent)(); };
|
4412 | DatePickerInnerComponent.ɵcmp = ɵngcc0.ɵɵdefineComponent({ type: DatePickerInnerComponent, selectors: [["datepicker-inner"]], inputs: { monthColLimit: "monthColLimit", yearColLimit: "yearColLimit", activeDate: "activeDate", datepickerMode: "datepickerMode", locale: "locale", startingDay: "startingDay", yearRange: "yearRange", minDate: "minDate", maxDate: "maxDate", minMode: "minMode", maxMode: "maxMode", showWeeks: "showWeeks", formatDay: "formatDay", formatMonth: "formatMonth", formatYear: "formatYear", formatDayHeader: "formatDayHeader", formatDayTitle: "formatDayTitle", formatMonthTitle: "formatMonthTitle", onlyCurrentMonth: "onlyCurrentMonth", shortcutPropagation: "shortcutPropagation", customClass: "customClass", dateDisabled: "dateDisabled", dayDisabled: "dayDisabled", initDate: "initDate" }, outputs: { selectionDone: "selectionDone", update: "update", activeDateChange: "activeDateChange" }, features: [ɵngcc0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 1, consts: [["class", "well well-sm bg-faded p-a card", "role", "application", 4, "ngIf"], ["role", "application", 1, "well", "well-sm", "bg-faded", "p-a", "card"]], template: function DatePickerInnerComponent_Template(rf, ctx) { if (rf & 1) {
|
4413 | ɵngcc0.ɵɵprojectionDef();
|
4414 | ɵngcc0.ɵɵtemplate(0, DatePickerInnerComponent_div_0_Template, 2, 0, "div", 0);
|
4415 | } if (rf & 2) {
|
4416 | ɵngcc0.ɵɵproperty("ngIf", ctx.datepickerMode);
|
4417 | } }, directives: [ɵngcc2.NgIf], encapsulation: 2 });
|
4418 | DatePickerInnerComponent.propDecorators = {
|
4419 | locale: [{ type: Input }],
|
4420 | datepickerMode: [{ type: Input }],
|
4421 | startingDay: [{ type: Input }],
|
4422 | yearRange: [{ type: Input }],
|
4423 | minDate: [{ type: Input }],
|
4424 | maxDate: [{ type: Input }],
|
4425 | minMode: [{ type: Input }],
|
4426 | maxMode: [{ type: Input }],
|
4427 | showWeeks: [{ type: Input }],
|
4428 | formatDay: [{ type: Input }],
|
4429 | formatMonth: [{ type: Input }],
|
4430 | formatYear: [{ type: Input }],
|
4431 | formatDayHeader: [{ type: Input }],
|
4432 | formatDayTitle: [{ type: Input }],
|
4433 | formatMonthTitle: [{ type: Input }],
|
4434 | onlyCurrentMonth: [{ type: Input }],
|
4435 | shortcutPropagation: [{ type: Input }],
|
4436 | customClass: [{ type: Input }],
|
4437 | monthColLimit: [{ type: Input }],
|
4438 | yearColLimit: [{ type: Input }],
|
4439 | dateDisabled: [{ type: Input }],
|
4440 | dayDisabled: [{ type: Input }],
|
4441 | initDate: [{ type: Input }],
|
4442 | selectionDone: [{ type: Output }],
|
4443 | update: [{ type: Output }],
|
4444 | activeDateChange: [{ type: Output }],
|
4445 | activeDate: [{ type: Input }]
|
4446 | };
|
4447 | (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(DatePickerInnerComponent, [{
|
4448 | type: Component,
|
4449 | args: [{
|
4450 | selector: 'datepicker-inner',
|
4451 | template: `
|
4452 | <!--<!–ng-keydown="keydown($event)"–>-->
|
4453 | <div *ngIf='datepickerMode' class='well well-sm bg-faded p-a card' role='application'>
|
4454 | <ng-content></ng-content>
|
4455 | </div>
|
4456 | `
|
4457 | }]
|
4458 | }], function () { return []; }, { monthColLimit: [{
|
4459 | type: Input
|
4460 | }], yearColLimit: [{
|
4461 | type: Input
|
4462 | }], selectionDone: [{
|
4463 | type: Output
|
4464 | }], update: [{
|
4465 | type: Output
|
4466 | }], activeDateChange: [{
|
4467 | type: Output
|
4468 | }], activeDate: [{
|
4469 | type: Input
|
4470 | }], datepickerMode: [{
|
4471 | type: Input
|
4472 | }], locale: [{
|
4473 | type: Input
|
4474 | }], startingDay: [{
|
4475 | type: Input
|
4476 | }], yearRange: [{
|
4477 | type: Input
|
4478 | }], minDate: [{
|
4479 | type: Input
|
4480 | }], maxDate: [{
|
4481 | type: Input
|
4482 | }], minMode: [{
|
4483 | type: Input
|
4484 | }], maxMode: [{
|
4485 | type: Input
|
4486 | }], showWeeks: [{
|
4487 | type: Input
|
4488 | }], formatDay: [{
|
4489 | type: Input
|
4490 | }], formatMonth: [{
|
4491 | type: Input
|
4492 | }], formatYear: [{
|
4493 | type: Input
|
4494 | }], formatDayHeader: [{
|
4495 | type: Input
|
4496 | }], formatDayTitle: [{
|
4497 | type: Input
|
4498 | }], formatMonthTitle: [{
|
4499 | type: Input
|
4500 | }], onlyCurrentMonth: [{
|
4501 | type: Input
|
4502 | }], shortcutPropagation: [{
|
4503 | type: Input
|
4504 | }], customClass: [{
|
4505 | type: Input
|
4506 | }], dateDisabled: [{
|
4507 | type: Input
|
4508 | }], dayDisabled: [{
|
4509 | type: Input
|
4510 | }], initDate: [{
|
4511 | type: Input
|
4512 | }] }); })();
|
4513 |
|
4514 | class DatepickerConfig {
|
4515 | constructor() {
|
4516 | this.locale = 'en';
|
4517 | this.datepickerMode = 'day';
|
4518 | this.startingDay = 0;
|
4519 | this.yearRange = 20;
|
4520 | this.minMode = 'day';
|
4521 | this.maxMode = 'year';
|
4522 | this.showWeeks = true;
|
4523 | this.formatDay = 'DD';
|
4524 | this.formatMonth = 'MMMM';
|
4525 | this.formatYear = 'YYYY';
|
4526 | this.formatDayHeader = 'dd';
|
4527 | this.formatDayTitle = 'MMMM YYYY';
|
4528 | this.formatMonthTitle = 'YYYY';
|
4529 | this.onlyCurrentMonth = false;
|
4530 | this.monthColLimit = 3;
|
4531 | this.yearColLimit = 5;
|
4532 | this.shortcutPropagation = false;
|
4533 | }
|
4534 | }
|
4535 | DatepickerConfig.ɵfac = function DatepickerConfig_Factory(t) { return new (t || DatepickerConfig)(); };
|
4536 | DatepickerConfig.ɵprov = ɵɵdefineInjectable({ factory: function DatepickerConfig_Factory() { return new DatepickerConfig(); }, token: DatepickerConfig, providedIn: "root" });
|
4537 | (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(DatepickerConfig, [{
|
4538 | type: Injectable,
|
4539 | args: [{
|
4540 | providedIn: 'root'
|
4541 | }]
|
4542 | }], function () { return []; }, null); })();
|
4543 |
|
4544 | const DATEPICKER_CONTROL_VALUE_ACCESSOR = {
|
4545 | provide: NG_VALUE_ACCESSOR,
|
4546 | useExisting: forwardRef(() => DatePickerComponent),
|
4547 | multi: true
|
4548 | };
|
4549 | class DatePickerComponent {
|
4550 | constructor(config) {
|
4551 |
|
4552 | this.datepickerMode = 'day';
|
4553 |
|
4554 | this.showWeeks = true;
|
4555 |
|
4556 | this.monthColLimit = 3;
|
4557 |
|
4558 | this.yearColLimit = 5;
|
4559 | this.selectionDone = new EventEmitter(undefined);
|
4560 |
|
4561 | this.activeDateChange = new EventEmitter(undefined);
|
4562 |
|
4563 | this.onChange = Function.prototype;
|
4564 |
|
4565 | this.onTouched = Function.prototype;
|
4566 | this._now = new Date();
|
4567 | this.config = config;
|
4568 | this.configureOptions();
|
4569 | }
|
4570 |
|
4571 | get activeDate() {
|
4572 | return this._activeDate || this._now;
|
4573 | }
|
4574 | set activeDate(value) {
|
4575 | this._activeDate = value;
|
4576 | }
|
4577 | configureOptions() {
|
4578 | Object.assign(this, this.config);
|
4579 | }
|
4580 | onUpdate(event) {
|
4581 | this.activeDate = event;
|
4582 | this.onChange(event);
|
4583 | }
|
4584 | onSelectionDone(event) {
|
4585 | this.selectionDone.emit(event);
|
4586 | }
|
4587 | onActiveDateChange(event) {
|
4588 | this.activeDateChange.emit(event);
|
4589 | }
|
4590 |
|
4591 |
|
4592 | writeValue(value) {
|
4593 | var _a, _b;
|
4594 | if (((_a = this._datePicker) === null || _a === void 0 ? void 0 : _a.compare(value, this._activeDate)) === 0) {
|
4595 | return;
|
4596 | }
|
4597 | if (value && value instanceof Date) {
|
4598 | this.activeDate = value;
|
4599 | (_b = this._datePicker) === null || _b === void 0 ? void 0 : _b.select(value, false);
|
4600 | return;
|
4601 | }
|
4602 | this.activeDate = value ? new Date(value) : void 0;
|
4603 | }
|
4604 | registerOnChange(fn) {
|
4605 | this.onChange = fn;
|
4606 | }
|
4607 | registerOnTouched(fn) {
|
4608 | this.onTouched = fn;
|
4609 | }
|
4610 | }
|
4611 | DatePickerComponent.ɵfac = function DatePickerComponent_Factory(t) { return new (t || DatePickerComponent)(ɵngcc0.ɵɵdirectiveInject(DatepickerConfig)); };
|
4612 | DatePickerComponent.ɵcmp = ɵngcc0.ɵɵdefineComponent({ type: DatePickerComponent, selectors: [["datepicker"]], viewQuery: function DatePickerComponent_Query(rf, ctx) { if (rf & 1) {
|
4613 | ɵngcc0.ɵɵviewQuery(DatePickerInnerComponent, 3);
|
4614 | } if (rf & 2) {
|
4615 | let _t;
|
4616 | ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx._datePicker = _t.first);
|
4617 | } }, inputs: { datepickerMode: "datepickerMode", showWeeks: "showWeeks", monthColLimit: "monthColLimit", yearColLimit: "yearColLimit", activeDate: "activeDate", initDate: "initDate", minDate: "minDate", maxDate: "maxDate", minMode: "minMode", maxMode: "maxMode", formatDay: "formatDay", formatMonth: "formatMonth", formatYear: "formatYear", formatDayHeader: "formatDayHeader", formatDayTitle: "formatDayTitle", formatMonthTitle: "formatMonthTitle", startingDay: "startingDay", yearRange: "yearRange", onlyCurrentMonth: "onlyCurrentMonth", shortcutPropagation: "shortcutPropagation", customClass: "customClass", dateDisabled: "dateDisabled", dayDisabled: "dayDisabled" }, outputs: { selectionDone: "selectionDone", activeDateChange: "activeDateChange" }, features: [ɵngcc0.ɵɵProvidersFeature([DATEPICKER_CONTROL_VALUE_ACCESSOR])], decls: 4, vars: 24, consts: [[3, "activeDate", "locale", "datepickerMode", "initDate", "minDate", "maxDate", "minMode", "maxMode", "showWeeks", "formatDay", "formatMonth", "formatYear", "formatDayHeader", "formatDayTitle", "formatMonthTitle", "startingDay", "yearRange", "customClass", "dateDisabled", "dayDisabled", "onlyCurrentMonth", "shortcutPropagation", "monthColLimit", "yearColLimit", "update", "selectionDone", "activeDateChange"], ["tabindex", "0"]], template: function DatePickerComponent_Template(rf, ctx) { if (rf & 1) {
|
4618 | ɵngcc0.ɵɵelementStart(0, "datepicker-inner", 0);
|
4619 | ɵngcc0.ɵɵlistener("update", function DatePickerComponent_Template_datepicker_inner_update_0_listener($event) { return ctx.onUpdate($event); })("selectionDone", function DatePickerComponent_Template_datepicker_inner_selectionDone_0_listener($event) { return ctx.onSelectionDone($event); })("activeDateChange", function DatePickerComponent_Template_datepicker_inner_activeDateChange_0_listener($event) { return ctx.onActiveDateChange($event); });
|
4620 | ɵngcc0.ɵɵelement(1, "daypicker", 1);
|
4621 | ɵngcc0.ɵɵelement(2, "monthpicker", 1);
|
4622 | ɵngcc0.ɵɵelement(3, "yearpicker", 1);
|
4623 | ɵngcc0.ɵɵelementEnd();
|
4624 | } if (rf & 2) {
|
4625 | ɵngcc0.ɵɵproperty("activeDate", ctx.activeDate)("locale", ctx.config.locale)("datepickerMode", ctx.datepickerMode)("initDate", ctx.initDate)("minDate", ctx.minDate)("maxDate", ctx.maxDate)("minMode", ctx.minMode)("maxMode", ctx.maxMode)("showWeeks", ctx.showWeeks)("formatDay", ctx.formatDay)("formatMonth", ctx.formatMonth)("formatYear", ctx.formatYear)("formatDayHeader", ctx.formatDayHeader)("formatDayTitle", ctx.formatDayTitle)("formatMonthTitle", ctx.formatMonthTitle)("startingDay", ctx.startingDay)("yearRange", ctx.yearRange)("customClass", ctx.customClass)("dateDisabled", ctx.dateDisabled)("dayDisabled", ctx.dayDisabled)("onlyCurrentMonth", ctx.onlyCurrentMonth)("shortcutPropagation", ctx.shortcutPropagation)("monthColLimit", ctx.monthColLimit)("yearColLimit", ctx.yearColLimit);
|
4626 | } }, directives: function () { return [DatePickerInnerComponent, DayPickerComponent, MonthPickerComponent, YearPickerComponent]; }, encapsulation: 2 });
|
4627 | DatePickerComponent.ctorParameters = () => [
|
4628 | { type: DatepickerConfig }
|
4629 | ];
|
4630 | DatePickerComponent.propDecorators = {
|
4631 | datepickerMode: [{ type: Input }],
|
4632 | initDate: [{ type: Input }],
|
4633 | minDate: [{ type: Input }],
|
4634 | maxDate: [{ type: Input }],
|
4635 | minMode: [{ type: Input }],
|
4636 | maxMode: [{ type: Input }],
|
4637 | showWeeks: [{ type: Input }],
|
4638 | formatDay: [{ type: Input }],
|
4639 | formatMonth: [{ type: Input }],
|
4640 | formatYear: [{ type: Input }],
|
4641 | formatDayHeader: [{ type: Input }],
|
4642 | formatDayTitle: [{ type: Input }],
|
4643 | formatMonthTitle: [{ type: Input }],
|
4644 | startingDay: [{ type: Input }],
|
4645 | yearRange: [{ type: Input }],
|
4646 | onlyCurrentMonth: [{ type: Input }],
|
4647 | shortcutPropagation: [{ type: Input }],
|
4648 | monthColLimit: [{ type: Input }],
|
4649 | yearColLimit: [{ type: Input }],
|
4650 | customClass: [{ type: Input }],
|
4651 | dateDisabled: [{ type: Input }],
|
4652 | dayDisabled: [{ type: Input }],
|
4653 | activeDate: [{ type: Input }],
|
4654 | selectionDone: [{ type: Output }],
|
4655 | activeDateChange: [{ type: Output }],
|
4656 | _datePicker: [{ type: ViewChild, args: [DatePickerInnerComponent, { static: true },] }]
|
4657 | };
|
4658 | (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(DatePickerComponent, [{
|
4659 | type: Component,
|
4660 | args: [{
|
4661 | selector: 'datepicker',
|
4662 | template: `
|
4663 | <datepicker-inner [activeDate]="activeDate"
|
4664 | (update)="onUpdate($event)"
|
4665 | [locale]="config.locale"
|
4666 | [datepickerMode]="datepickerMode"
|
4667 | [initDate]="initDate"
|
4668 | [minDate]="minDate"
|
4669 | [maxDate]="maxDate"
|
4670 | [minMode]="minMode"
|
4671 | [maxMode]="maxMode"
|
4672 | [showWeeks]="showWeeks"
|
4673 | [formatDay]="formatDay"
|
4674 | [formatMonth]="formatMonth"
|
4675 | [formatYear]="formatYear"
|
4676 | [formatDayHeader]="formatDayHeader"
|
4677 | [formatDayTitle]="formatDayTitle"
|
4678 | [formatMonthTitle]="formatMonthTitle"
|
4679 | [startingDay]="startingDay"
|
4680 | [yearRange]="yearRange"
|
4681 | [customClass]="customClass"
|
4682 | [dateDisabled]="dateDisabled"
|
4683 | [dayDisabled]="dayDisabled"
|
4684 | [onlyCurrentMonth]="onlyCurrentMonth"
|
4685 | [shortcutPropagation]="shortcutPropagation"
|
4686 | [monthColLimit]="monthColLimit"
|
4687 | [yearColLimit]="yearColLimit"
|
4688 | (selectionDone)="onSelectionDone($event)"
|
4689 | (activeDateChange)="onActiveDateChange($event)">
|
4690 | <daypicker tabindex="0"></daypicker>
|
4691 | <monthpicker tabindex="0"></monthpicker>
|
4692 | <yearpicker tabindex="0"></yearpicker>
|
4693 | </datepicker-inner>
|
4694 | `,
|
4695 | providers: [DATEPICKER_CONTROL_VALUE_ACCESSOR]
|
4696 | }]
|
4697 | }], function () { return [{ type: DatepickerConfig }]; }, { datepickerMode: [{
|
4698 | type: Input
|
4699 | }], showWeeks: [{
|
4700 | type: Input
|
4701 | }], monthColLimit: [{
|
4702 | type: Input
|
4703 | }], yearColLimit: [{
|
4704 | type: Input
|
4705 | }], selectionDone: [{
|
4706 | type: Output
|
4707 | }], activeDateChange: [{
|
4708 | type: Output
|
4709 | }], activeDate: [{
|
4710 | type: Input
|
4711 | }], initDate: [{
|
4712 | type: Input
|
4713 | }], minDate: [{
|
4714 | type: Input
|
4715 | }], maxDate: [{
|
4716 | type: Input
|
4717 | }], minMode: [{
|
4718 | type: Input
|
4719 | }], maxMode: [{
|
4720 | type: Input
|
4721 | }], formatDay: [{
|
4722 | type: Input
|
4723 | }], formatMonth: [{
|
4724 | type: Input
|
4725 | }], formatYear: [{
|
4726 | type: Input
|
4727 | }], formatDayHeader: [{
|
4728 | type: Input
|
4729 | }], formatDayTitle: [{
|
4730 | type: Input
|
4731 | }], formatMonthTitle: [{
|
4732 | type: Input
|
4733 | }], startingDay: [{
|
4734 | type: Input
|
4735 | }], yearRange: [{
|
4736 | type: Input
|
4737 | }], onlyCurrentMonth: [{
|
4738 | type: Input
|
4739 | }], shortcutPropagation: [{
|
4740 | type: Input
|
4741 | }], customClass: [{
|
4742 | type: Input
|
4743 | }], dateDisabled: [{
|
4744 | type: Input
|
4745 | }], dayDisabled: [{
|
4746 | type: Input
|
4747 | }], _datePicker: [{
|
4748 | type: ViewChild,
|
4749 | args: [DatePickerInnerComponent, { static: true }]
|
4750 | }] }); })();
|
4751 |
|
4752 |
|
4753 | class DayPickerComponent {
|
4754 | constructor(datePicker) {
|
4755 | this.labels = [];
|
4756 |
|
4757 |
|
4758 |
|
4759 | this.rows = [];
|
4760 | this.weekNumbers = [];
|
4761 | this.datePicker = datePicker;
|
4762 | }
|
4763 | get isBs4() {
|
4764 | return !isBs3();
|
4765 | }
|
4766 | |
4767 |
|
4768 |
|
4769 |
|
4770 | ngOnInit() {
|
4771 |
|
4772 | const self = this;
|
4773 | this.datePicker.stepDay = { months: 1 };
|
4774 |
|
4775 | this.datePicker.setRefreshViewHandler(function () {
|
4776 |
|
4777 |
|
4778 |
|
4779 | const that = this;
|
4780 | const year = that.activeDate.getFullYear();
|
4781 | const month = that.activeDate.getMonth();
|
4782 | const firstDayOfMonth = new Date(year, month, 1);
|
4783 | const difference = that.startingDay - firstDayOfMonth.getDay();
|
4784 | const numDisplayedFromPreviousMonth = difference > 0 ? 7 - difference : -difference;
|
4785 | const firstDate = new Date(firstDayOfMonth.getTime());
|
4786 | if (numDisplayedFromPreviousMonth > 0) {
|
4787 | firstDate.setDate(-numDisplayedFromPreviousMonth + 1);
|
4788 | }
|
4789 |
|
4790 | const _days = self.getDates(firstDate, 42);
|
4791 | const days = [];
|
4792 | for (let i = 0; i < 42; i++) {
|
4793 | const _dateObject = that.createDateObject(_days[i], that.formatDay);
|
4794 | _dateObject.secondary = _days[i].getMonth() !== month;
|
4795 | _dateObject.uid = that.uniqueId + '-' + i;
|
4796 | days[i] = _dateObject;
|
4797 | }
|
4798 | self.labels = [];
|
4799 | for (let j = 0; j < 7; j++) {
|
4800 | self.labels[j] = {};
|
4801 | self.labels[j].abbr = that.dateFilter(days[j].date, that.formatDayHeader);
|
4802 | self.labels[j].full = that.dateFilter(days[j].date, 'EEEE');
|
4803 | }
|
4804 | self.title = that.dateFilter(that.activeDate, that.formatDayTitle);
|
4805 | self.rows = that.split(days, 7);
|
4806 | if (that.showWeeks) {
|
4807 | self.weekNumbers = [];
|
4808 | const thursdayIndex = (4 + 7 - that.startingDay) % 7;
|
4809 | const numWeeks = self.rows.length;
|
4810 | for (let curWeek = 0; curWeek < numWeeks; curWeek++) {
|
4811 | const _date = self.rows[curWeek][thursdayIndex].date;
|
4812 | if (_date) {
|
4813 | self.weekNumbers.push(self.getISO8601WeekNumber(_date));
|
4814 | }
|
4815 | }
|
4816 | }
|
4817 | }, 'day');
|
4818 | this.datePicker.setCompareHandler(function (date1, date2) {
|
4819 | const d1 = new Date(date1.getFullYear(), date1.getMonth(), date1.getDate());
|
4820 | const d2 = new Date(date2.getFullYear(), date2.getMonth(), date2.getDate());
|
4821 | return d1.getTime() - d2.getTime();
|
4822 | }, 'day');
|
4823 | this.datePicker.refreshView();
|
4824 | }
|
4825 | getDates(startDate, n) {
|
4826 | const dates = new Array(n);
|
4827 | let current = new Date(startDate.getTime());
|
4828 | let i = 0;
|
4829 | let date;
|
4830 | while (i < n) {
|
4831 | date = new Date(current.getTime());
|
4832 | date = this.datePicker.fixTimeZone(date);
|
4833 | dates[i++] = date;
|
4834 | current = new Date(date.getFullYear(), date.getMonth(), date.getDate() + 1);
|
4835 | }
|
4836 | return dates;
|
4837 | }
|
4838 | getISO8601WeekNumber(date) {
|
4839 | const checkDate = new Date(date.getTime());
|
4840 |
|
4841 | checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));
|
4842 | const time = checkDate.getTime();
|
4843 |
|
4844 | checkDate.setMonth(0);
|
4845 | checkDate.setDate(1);
|
4846 | return (Math.floor(Math.round((time - checkDate.getTime()) / 86400000) / 7) + 1);
|
4847 | }
|
4848 | }
|
4849 | DayPickerComponent.ɵfac = function DayPickerComponent_Factory(t) { return new (t || DayPickerComponent)(ɵngcc0.ɵɵdirectiveInject(DatePickerInnerComponent)); };
|
4850 | DayPickerComponent.ɵcmp = ɵngcc0.ɵɵdefineComponent({ type: DayPickerComponent, selectors: [["daypicker"]], decls: 1, vars: 1, consts: [["role", "grid", "aria-activedescendant", "activeDateId", 4, "ngIf"], ["role", "grid", "aria-activedescendant", "activeDateId"], ["type", "button", "class", "btn btn-default btn-secondary btn-sm pull-left float-left", "tabindex", "-1", 3, "click", 4, "ngIf"], ["type", "button", "tabindex", "-1", 1, "btn", "btn-default", "btn-secondary", "btn-sm", 2, "width", "100%", 3, "id", "disabled", "ngClass", "click"], ["type", "button", "class", "btn btn-default btn-secondary btn-sm pull-right float-right", "tabindex", "-1", 3, "click", 4, "ngIf"], [4, "ngIf"], ["class", "text-center", 4, "ngFor", "ngForOf"], ["ngFor", "", 3, "ngForOf"], ["type", "button", "tabindex", "-1", 1, "btn", "btn-default", "btn-secondary", "btn-sm", "pull-left", "float-left", 3, "click"], ["type", "button", "tabindex", "-1", 1, "btn", "btn-default", "btn-secondary", "btn-sm", "pull-right", "float-right", 3, "click"], [1, "text-center"], ["aria-label", "labelz.full"], ["class", "h6", "class", "text-center", 4, "ngIf"], ["class", "text-center", "role", "gridcell", 3, "id", 4, "ngFor", "ngForOf"], ["role", "gridcell", 1, "text-center", 3, "id"], ["type", "button", "style", "min-width:100%;", "tabindex", "-1", 3, "class", "ngClass", "disabled", "click", 4, "ngIf"], ["type", "button", "tabindex", "-1", 2, "min-width", "100%", 3, "ngClass", "disabled", "click"], [3, "ngClass"]], template: function DayPickerComponent_Template(rf, ctx) { if (rf & 1) {
|
4851 | ɵngcc0.ɵɵtemplate(0, DayPickerComponent_table_0_Template, 18, 15, "table", 0);
|
4852 | } if (rf & 2) {
|
4853 | ɵngcc0.ɵɵproperty("ngIf", ctx.datePicker.datepickerMode === "day");
|
4854 | } }, directives: [ɵngcc2.NgIf, ɵngcc2.NgClass, ɵngcc2.NgForOf], styles: ["[_nghost-%COMP%] .btn-secondary[_ngcontent-%COMP%] {\n color: #292b2c;\n background-color: #fff;\n border-color: #ccc;\n }\n [_nghost-%COMP%] .btn-info[_ngcontent-%COMP%] .text-muted[_ngcontent-%COMP%] {\n color: #292b2c !important;\n }"] });
|
4855 | DayPickerComponent.ctorParameters = () => [
|
4856 | { type: DatePickerInnerComponent }
|
4857 | ];
|
4858 | (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(DayPickerComponent, [{
|
4859 | type: Component,
|
4860 | args: [{
|
4861 | selector: 'daypicker',
|
4862 | template: `
|
4863 | <table *ngIf="datePicker.datepickerMode === 'day'" role="grid" [attr.aria-labelledby]="datePicker.uniqueId + '-title'" aria-activedescendant="activeDateId">
|
4864 | <thead>
|
4865 | <tr>
|
4866 | <th>
|
4867 | <button *ngIf="!isBs4"
|
4868 | type="button"
|
4869 | class="btn btn-default btn-secondary btn-sm pull-left float-left"
|
4870 | (click)="datePicker.move(-1)"
|
4871 | tabindex="-1">‹</button>
|
4872 | <button *ngIf="isBs4"
|
4873 | type="button"
|
4874 | class="btn btn-default btn-secondary btn-sm pull-left float-left"
|
4875 | (click)="datePicker.move(-1)"
|
4876 | tabindex="-1"><</button>
|
4877 | </th>
|
4878 | <th [attr.colspan]="5 + (datePicker.showWeeks ? 1 : 0)">
|
4879 | <button [id]="datePicker.uniqueId + '-title'"
|
4880 | type="button" class="btn btn-default btn-secondary btn-sm"
|
4881 | (click)="datePicker.toggleMode(0)"
|
4882 | [disabled]="datePicker.datepickerMode === datePicker.maxMode"
|
4883 | [ngClass]="{disabled: datePicker.datepickerMode === datePicker.maxMode}" tabindex="-1" style="width:100%;">
|
4884 | <strong>{{ title }}</strong>
|
4885 | </button>
|
4886 | </th>
|
4887 | <th>
|
4888 | <button *ngIf="!isBs4"
|
4889 | type="button"
|
4890 | class="btn btn-default btn-secondary btn-sm pull-right float-right"
|
4891 | (click)="datePicker.move(1)"
|
4892 | tabindex="-1">›</button>
|
4893 | <button *ngIf="isBs4"
|
4894 | type="button"
|
4895 | class="btn btn-default btn-secondary btn-sm pull-right float-right"
|
4896 | (click)="datePicker.move(1)"
|
4897 | tabindex="-1">>
|
4898 | </button>
|
4899 | </th>
|
4900 | </tr>
|
4901 | <tr>
|
4902 | <th *ngIf="datePicker.showWeeks"></th>
|
4903 | <th *ngFor="let labelz of labels" class="text-center">
|
4904 | <small aria-label="labelz.full"><b>{{ labelz.abbr }}</b></small>
|
4905 | </th>
|
4906 | </tr>
|
4907 | </thead>
|
4908 | <tbody>
|
4909 | <ng-template ngFor [ngForOf]="rows" let-rowz="$implicit" let-index="index">
|
4910 | <tr *ngIf="!(datePicker.onlyCurrentMonth && rowz[0].secondary && rowz[6].secondary)">
|
4911 | <td *ngIf="datePicker.showWeeks" class="h6" class="text-center">
|
4912 | <em>{{ weekNumbers[index] }}</em>
|
4913 | </td>
|
4914 | <td *ngFor="let dtz of rowz" class="text-center" role="gridcell" [id]="dtz.uid">
|
4915 | <button type="button" style="min-width:100%;" class="btn btn-sm {{dtz.customClass}}"
|
4916 | *ngIf="!(datePicker.onlyCurrentMonth && dtz.secondary)"
|
4917 | [ngClass]="{'btn-secondary': isBs4 && !dtz.selected && !datePicker.isActive(dtz), 'btn-info': dtz.selected, disabled: dtz.disabled, active: !isBs4 && datePicker.isActive(dtz), 'btn-default': !isBs4}"
|
4918 | [disabled]="dtz.disabled"
|
4919 | (click)="datePicker.select(dtz.date)" tabindex="-1">
|
4920 | <span [ngClass]="{'text-muted': dtz.secondary || dtz.current, 'text-info': !isBs4 && dtz.current}">{{ dtz.label }}</span>
|
4921 | </button>
|
4922 | </td>
|
4923 | </tr>
|
4924 | </ng-template>
|
4925 | </tbody>
|
4926 | </table>
|
4927 | `,
|
4928 | styles: [`
|
4929 | :host .btn-secondary {
|
4930 | color: #292b2c;
|
4931 | background-color: #fff;
|
4932 | border-color: #ccc;
|
4933 | }
|
4934 | :host .btn-info .text-muted {
|
4935 | color: #292b2c !important;
|
4936 | }
|
4937 | `]
|
4938 | }]
|
4939 | }], function () { return [{ type: DatePickerInnerComponent }]; }, null); })();
|
4940 |
|
4941 |
|
4942 | class MonthPickerComponent {
|
4943 | constructor(datePicker) {
|
4944 | this.rows = [];
|
4945 | this.datePicker = datePicker;
|
4946 | }
|
4947 | get isBs4() {
|
4948 | return !isBs3();
|
4949 | }
|
4950 | ngOnInit() {
|
4951 |
|
4952 | const self = this;
|
4953 | this.datePicker.stepMonth = { years: 1 };
|
4954 | this.datePicker.setRefreshViewHandler(function () {
|
4955 |
|
4956 |
|
4957 |
|
4958 | const that = this;
|
4959 | const months = new Array(12);
|
4960 | const year = that.activeDate.getFullYear();
|
4961 | let date;
|
4962 | for (let i = 0; i < 12; i++) {
|
4963 | date = new Date(year, i, 1);
|
4964 | date = that.fixTimeZone(date);
|
4965 | months[i] = that.createDateObject(date, that.formatMonth);
|
4966 | months[i].uid = that.uniqueId + '-' + i;
|
4967 | }
|
4968 | self.title = that.dateFilter(that.activeDate, that.formatMonthTitle);
|
4969 | self.rows = that.split(months, self.datePicker.monthColLimit);
|
4970 | }, 'month');
|
4971 | this.datePicker.setCompareHandler(function (date1, date2) {
|
4972 | const d1 = new Date(date1.getFullYear(), date1.getMonth());
|
4973 | const d2 = new Date(date2.getFullYear(), date2.getMonth());
|
4974 | return d1.getTime() - d2.getTime();
|
4975 | }, 'month');
|
4976 | this.datePicker.refreshView();
|
4977 | }
|
4978 | }
|
4979 | MonthPickerComponent.ɵfac = function MonthPickerComponent_Factory(t) { return new (t || MonthPickerComponent)(ɵngcc0.ɵɵdirectiveInject(DatePickerInnerComponent)); };
|
4980 | MonthPickerComponent.ɵcmp = ɵngcc0.ɵɵdefineComponent({ type: MonthPickerComponent, selectors: [["monthpicker"]], decls: 1, vars: 1, consts: [["role", "grid", 4, "ngIf"], ["role", "grid"], ["type", "button", "tabindex", "-1", 1, "btn", "btn-default", "btn-sm", "pull-left", "float-left", 3, "click"], ["type", "button", "tabindex", "-1", 1, "btn", "btn-default", "btn-sm", 2, "width", "100%", 3, "id", "disabled", "ngClass", "click"], ["type", "button", "tabindex", "-1", 1, "btn", "btn-default", "btn-sm", "pull-right", "float-right", 3, "click"], [4, "ngFor", "ngForOf"], ["class", "text-center", "role", "gridcell", 3, "ngClass", 4, "ngFor", "ngForOf"], ["role", "gridcell", 1, "text-center", 3, "ngClass"], ["type", "button", "tabindex", "-1", 1, "btn", "btn-default", 2, "min-width", "100%", 3, "ngClass", "disabled", "click"], [3, "ngClass"]], template: function MonthPickerComponent_Template(rf, ctx) { if (rf & 1) {
|
4981 | ɵngcc0.ɵɵtemplate(0, MonthPickerComponent_table_0_Template, 15, 8, "table", 0);
|
4982 | } if (rf & 2) {
|
4983 | ɵngcc0.ɵɵproperty("ngIf", ctx.datePicker.datepickerMode === "month");
|
4984 | } }, directives: [ɵngcc2.NgIf, ɵngcc2.NgClass, ɵngcc2.NgForOf], styles: ["[_nghost-%COMP%] .btn-info[_ngcontent-%COMP%] .text-success[_ngcontent-%COMP%] {\n color: #fff !important;\n }"] });
|
4985 | MonthPickerComponent.ctorParameters = () => [
|
4986 | { type: DatePickerInnerComponent }
|
4987 | ];
|
4988 | (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(MonthPickerComponent, [{
|
4989 | type: Component,
|
4990 | args: [{
|
4991 | selector: 'monthpicker',
|
4992 | template: `
|
4993 | <table *ngIf="datePicker.datepickerMode==='month'" role="grid">
|
4994 | <thead>
|
4995 | <tr>
|
4996 | <th>
|
4997 | <button type="button" class="btn btn-default btn-sm pull-left float-left"
|
4998 | (click)="datePicker.move(-1)" tabindex="-1">‹</button></th>
|
4999 | <th [attr.colspan]="((datePicker.monthColLimit - 2) <= 0) ? 1 : datePicker.monthColLimit - 2">
|
5000 | <button [id]="datePicker.uniqueId + '-title'"
|
5001 | type="button" class="btn btn-default btn-sm"
|
5002 | (click)="datePicker.toggleMode(0)"
|
5003 | [disabled]="datePicker.datepickerMode === maxMode"
|
5004 | [ngClass]="{disabled: datePicker.datepickerMode === maxMode}" tabindex="-1" style="width:100%;">
|
5005 | <strong>{{ title }}</strong>
|
5006 | </button>
|
5007 | </th>
|
5008 | <th>
|
5009 | <button type="button" class="btn btn-default btn-sm pull-right float-right"
|
5010 | (click)="datePicker.move(1)" tabindex="-1">›</button>
|
5011 | </th>
|
5012 | </tr>
|
5013 | </thead>
|
5014 | <tbody>
|
5015 | <tr *ngFor="let rowz of rows">
|
5016 | <td *ngFor="let dtz of rowz" class="text-center" role="gridcell" [attr.id]="dtz.uid" [ngClass]="dtz.customClass">
|
5017 | <button type="button" style="min-width:100%;" class="btn btn-default"
|
5018 | [ngClass]="{'btn-link': isBs4 && !dtz.selected && !datePicker.isActive(dtz), 'btn-info': dtz.selected || (isBs4 && !dtz.selected && datePicker.isActive(dtz)), disabled: dtz.disabled, active: !isBs4 && datePicker.isActive(dtz)}"
|
5019 | [disabled]="dtz.disabled"
|
5020 | (click)="datePicker.select(dtz.date)" tabindex="-1">
|
5021 | <span [ngClass]="{'text-success': isBs4 && dtz.current, 'text-info': !isBs4 && dtz.current}">{{ dtz.label }}</span>
|
5022 | </button>
|
5023 | </td>
|
5024 | </tr>
|
5025 | </tbody>
|
5026 | </table>
|
5027 | `,
|
5028 | styles: [`
|
5029 | :host .btn-info .text-success {
|
5030 | color: #fff !important;
|
5031 | }
|
5032 | `]
|
5033 | }]
|
5034 | }], function () { return [{ type: DatePickerInnerComponent }]; }, null); })();
|
5035 |
|
5036 |
|
5037 | class YearPickerComponent {
|
5038 | constructor(datePicker) {
|
5039 | this.rows = [];
|
5040 | this.datePicker = datePicker;
|
5041 | }
|
5042 | get isBs4() {
|
5043 | return !isBs3();
|
5044 | }
|
5045 | ngOnInit() {
|
5046 |
|
5047 | const self = this;
|
5048 | this.datePicker.stepYear = { years: this.datePicker.yearRange };
|
5049 | this.datePicker.setRefreshViewHandler(function () {
|
5050 |
|
5051 |
|
5052 |
|
5053 | const that = this;
|
5054 | const years = new Array(that.yearRange);
|
5055 | let date;
|
5056 | const start = self.getStartingYear(that.activeDate.getFullYear()) || 0;
|
5057 | for (let i = 0; i < that.yearRange; i++) {
|
5058 | date = new Date(start + i, 0, 1);
|
5059 | date = that.fixTimeZone(date);
|
5060 | years[i] = that.createDateObject(date, that.formatYear);
|
5061 | years[i].uid = that.uniqueId + '-' + i;
|
5062 | }
|
5063 | self.title = [years[0].label, years[that.yearRange - 1].label].join(' - ');
|
5064 | self.rows = that.split(years, self.datePicker.yearColLimit);
|
5065 | }, 'year');
|
5066 | this.datePicker.setCompareHandler(function (date1, date2) {
|
5067 | return date1.getFullYear() - date2.getFullYear();
|
5068 | }, 'year');
|
5069 | this.datePicker.refreshView();
|
5070 | }
|
5071 | getStartingYear(year) {
|
5072 |
|
5073 | if (this.datePicker && this.datePicker.yearRange) {
|
5074 | return ((year - 1) / this.datePicker.yearRange * this.datePicker.yearRange + 1);
|
5075 | }
|
5076 | return undefined;
|
5077 | }
|
5078 | }
|
5079 | YearPickerComponent.ɵfac = function YearPickerComponent_Factory(t) { return new (t || YearPickerComponent)(ɵngcc0.ɵɵdirectiveInject(DatePickerInnerComponent)); };
|
5080 | YearPickerComponent.ɵcmp = ɵngcc0.ɵɵdefineComponent({ type: YearPickerComponent, selectors: [["yearpicker"]], decls: 1, vars: 1, consts: [["role", "grid", 4, "ngIf"], ["role", "grid"], ["type", "button", "tabindex", "-1", 1, "btn", "btn-default", "btn-sm", "pull-left", "float-left", 3, "click"], ["role", "heading", "type", "button", "tabindex", "-1", 1, "btn", "btn-default", "btn-sm", 2, "width", "100%", 3, "id", "disabled", "ngClass", "click"], ["type", "button", "tabindex", "-1", 1, "btn", "btn-default", "btn-sm", "pull-right", "float-right", 3, "click"], [4, "ngFor", "ngForOf"], ["class", "text-center", "role", "gridcell", 4, "ngFor", "ngForOf"], ["role", "gridcell", 1, "text-center"], ["type", "button", "tabindex", "-1", 1, "btn", "btn-default", 2, "min-width", "100%", 3, "ngClass", "disabled", "click"], [3, "ngClass"]], template: function YearPickerComponent_Template(rf, ctx) { if (rf & 1) {
|
5081 | ɵngcc0.ɵɵtemplate(0, YearPickerComponent_table_0_Template, 15, 8, "table", 0);
|
5082 | } if (rf & 2) {
|
5083 | ɵngcc0.ɵɵproperty("ngIf", ctx.datePicker.datepickerMode === "year");
|
5084 | } }, directives: [ɵngcc2.NgIf, ɵngcc2.NgClass, ɵngcc2.NgForOf], styles: ["[_nghost-%COMP%] .btn-info[_ngcontent-%COMP%] .text-success[_ngcontent-%COMP%] {\n color: #fff !important;\n }"] });
|
5085 | YearPickerComponent.ctorParameters = () => [
|
5086 | { type: DatePickerInnerComponent }
|
5087 | ];
|
5088 | (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(YearPickerComponent, [{
|
5089 | type: Component,
|
5090 | args: [{
|
5091 | selector: 'yearpicker',
|
5092 | template: `
|
5093 | <table *ngIf="datePicker.datepickerMode==='year'" role='grid'>
|
5094 | <thead>
|
5095 | <tr>
|
5096 | <th>
|
5097 | <button type='button' class='btn btn-default btn-sm pull-left float-left'
|
5098 | (click)='datePicker.move(-1)' tabindex='-1'>‹
|
5099 | </button>
|
5100 | </th>
|
5101 | <th [attr.colspan]='((datePicker.yearColLimit - 2) <= 0) ? 1 : datePicker.yearColLimit - 2'>
|
5102 | <button [id]="datePicker.uniqueId + '-title'" role='heading'
|
5103 | type='button' class='btn btn-default btn-sm'
|
5104 | (click)='datePicker.toggleMode(0)'
|
5105 | [disabled]='datePicker.datepickerMode === datePicker.maxMode'
|
5106 | [ngClass]='{disabled: datePicker.datepickerMode === datePicker.maxMode}' tabindex='-1'
|
5107 | style='width:100%;'>
|
5108 | <strong>{{ title }}</strong>
|
5109 | </button>
|
5110 | </th>
|
5111 | <th>
|
5112 | <button type='button' class='btn btn-default btn-sm pull-right float-right'
|
5113 | (click)='datePicker.move(1)' tabindex='-1'>›
|
5114 | </button>
|
5115 | </th>
|
5116 | </tr>
|
5117 | </thead>
|
5118 | <tbody>
|
5119 | <tr *ngFor='let rowz of rows'>
|
5120 | <td *ngFor='let dtz of rowz' class='text-center' role='gridcell' [attr.id]='dtz.uid'>
|
5121 | <button type='button' style='min-width:100%;' class='btn btn-default'
|
5122 | [ngClass]="{'btn-link': isBs4 && !dtz.selected && !datePicker.isActive(dtz), 'btn-info': dtz.selected || (isBs4 && !dtz.selected && datePicker.isActive(dtz)), disabled: dtz.disabled, active: !isBs4 && datePicker.isActive(dtz)}"
|
5123 | [disabled]='dtz.disabled'
|
5124 | (click)='datePicker.select(dtz.date)' tabindex='-1'>
|
5125 | <span
|
5126 | [ngClass]="{'text-success': isBs4 && dtz.current, 'text-info': !isBs4 && dtz.current}">{{ dtz.label }}</span>
|
5127 | </button>
|
5128 | </td>
|
5129 | </tr>
|
5130 | </tbody>
|
5131 | </table>
|
5132 | `,
|
5133 | styles: [`
|
5134 | :host .btn-info .text-success {
|
5135 | color: #fff !important;
|
5136 | }
|
5137 | `]
|
5138 | }]
|
5139 | }], function () { return [{ type: DatePickerInnerComponent }]; }, null); })();
|
5140 |
|
5141 | class BsCalendarLayoutComponent {
|
5142 | }
|
5143 | BsCalendarLayoutComponent.ɵfac = function BsCalendarLayoutComponent_Factory(t) { return new (t || BsCalendarLayoutComponent)(); };
|
5144 | BsCalendarLayoutComponent.ɵcmp = ɵngcc0.ɵɵdefineComponent({ type: BsCalendarLayoutComponent, selectors: [["bs-calendar-layout"]], ngContentSelectors: _c7, decls: 6, vars: 2, consts: [["title", "hey there", 4, "ngIf"], [1, "bs-datepicker-head"], [1, "bs-datepicker-body"], [4, "ngIf"], ["title", "hey there"]], template: function BsCalendarLayoutComponent_Template(rf, ctx) { if (rf & 1) {
|
5145 | ɵngcc0.ɵɵprojectionDef(_c6);
|
5146 | ɵngcc0.ɵɵtemplate(0, BsCalendarLayoutComponent_bs_current_date_0_Template, 1, 0, "bs-current-date", 0);
|
5147 | ɵngcc0.ɵɵelementStart(1, "div", 1);
|
5148 | ɵngcc0.ɵɵprojection(2);
|
5149 | ɵngcc0.ɵɵelementEnd();
|
5150 | ɵngcc0.ɵɵelementStart(3, "div", 2);
|
5151 | ɵngcc0.ɵɵprojection(4, 1);
|
5152 | ɵngcc0.ɵɵelementEnd();
|
5153 | ɵngcc0.ɵɵtemplate(5, BsCalendarLayoutComponent_bs_timepicker_5_Template, 1, 0, "bs-timepicker", 3);
|
5154 | } if (rf & 2) {
|
5155 | ɵngcc0.ɵɵproperty("ngIf", false);
|
5156 | ɵngcc0.ɵɵadvance(5);
|
5157 | ɵngcc0.ɵɵproperty("ngIf", false);
|
5158 | } }, directives: function () { return [ɵngcc2.NgIf, BsCurrentDateViewComponent, BsTimepickerViewComponent]; }, encapsulation: 2 });
|
5159 | (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BsCalendarLayoutComponent, [{
|
5160 | type: Component,
|
5161 | args: [{
|
5162 | selector: 'bs-calendar-layout',
|
5163 | template: `
|
5164 | <!-- current date, will be added in nearest releases -->
|
5165 | <bs-current-date title="hey there" *ngIf="false"></bs-current-date>
|
5166 |
|
5167 | <!--navigation-->
|
5168 | <div class="bs-datepicker-head">
|
5169 | <ng-content select="bs-datepicker-navigation-view"></ng-content>
|
5170 | </div>
|
5171 |
|
5172 | <div class="bs-datepicker-body">
|
5173 | <ng-content></ng-content>
|
5174 | </div>
|
5175 |
|
5176 | <!--timepicker-->
|
5177 | <bs-timepicker *ngIf="false"></bs-timepicker>
|
5178 | `
|
5179 | }]
|
5180 | }], null, null); })();
|
5181 |
|
5182 | class BsCurrentDateViewComponent {
|
5183 | }
|
5184 | BsCurrentDateViewComponent.ɵfac = function BsCurrentDateViewComponent_Factory(t) { return new (t || BsCurrentDateViewComponent)(); };
|
5185 | BsCurrentDateViewComponent.ɵcmp = ɵngcc0.ɵɵdefineComponent({ type: BsCurrentDateViewComponent, selectors: [["bs-current-date"]], inputs: { title: "title" }, decls: 3, vars: 1, consts: [[1, "current-timedate"]], template: function BsCurrentDateViewComponent_Template(rf, ctx) { if (rf & 1) {
|
5186 | ɵngcc0.ɵɵelementStart(0, "div", 0);
|
5187 | ɵngcc0.ɵɵelementStart(1, "span");
|
5188 | ɵngcc0.ɵɵtext(2);
|
5189 | ɵngcc0.ɵɵelementEnd();
|
5190 | ɵngcc0.ɵɵelementEnd();
|
5191 | } if (rf & 2) {
|
5192 | ɵngcc0.ɵɵadvance(2);
|
5193 | ɵngcc0.ɵɵtextInterpolate(ctx.title);
|
5194 | } }, encapsulation: 2 });
|
5195 | BsCurrentDateViewComponent.propDecorators = {
|
5196 | title: [{ type: Input }]
|
5197 | };
|
5198 | (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BsCurrentDateViewComponent, [{
|
5199 | type: Component,
|
5200 | args: [{
|
5201 | selector: 'bs-current-date',
|
5202 | template: `<div class="current-timedate"><span>{{ title }}</span></div>`
|
5203 | }]
|
5204 | }], null, { title: [{
|
5205 | type: Input
|
5206 | }] }); })();
|
5207 |
|
5208 | class BsCustomDatesViewComponent {
|
5209 | constructor() {
|
5210 | this.onSelect = new EventEmitter();
|
5211 | }
|
5212 | selectFromRanges(range) {
|
5213 | this.onSelect.emit(range);
|
5214 | }
|
5215 | }
|
5216 | BsCustomDatesViewComponent.ɵfac = function BsCustomDatesViewComponent_Factory(t) { return new (t || BsCustomDatesViewComponent)(); };
|
5217 | BsCustomDatesViewComponent.ɵcmp = ɵngcc0.ɵɵdefineComponent({ type: BsCustomDatesViewComponent, selectors: [["bs-custom-date-view"]], inputs: { ranges: "ranges", selectedRange: "selectedRange", customRangeLabel: "customRangeLabel" }, outputs: { onSelect: "onSelect" }, decls: 2, vars: 1, consts: [[1, "bs-datepicker-predefined-btns"], ["type", "button", "class", "btn", 3, "selected", "click", 4, "ngFor", "ngForOf"], ["type", "button", 1, "btn", 3, "click"]], template: function BsCustomDatesViewComponent_Template(rf, ctx) { if (rf & 1) {
|
5218 | ɵngcc0.ɵɵelementStart(0, "div", 0);
|
5219 | ɵngcc0.ɵɵtemplate(1, BsCustomDatesViewComponent_button_1_Template, 2, 3, "button", 1);
|
5220 | ɵngcc0.ɵɵelementEnd();
|
5221 | } if (rf & 2) {
|
5222 | ɵngcc0.ɵɵadvance(1);
|
5223 | ɵngcc0.ɵɵproperty("ngForOf", ctx.ranges);
|
5224 | } }, directives: [ɵngcc2.NgForOf], encapsulation: 2, changeDetection: 0 });
|
5225 | BsCustomDatesViewComponent.propDecorators = {
|
5226 | ranges: [{ type: Input }],
|
5227 | selectedRange: [{ type: Input }],
|
5228 | customRangeLabel: [{ type: Input }],
|
5229 | onSelect: [{ type: Output }]
|
5230 | };
|
5231 | (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BsCustomDatesViewComponent, [{
|
5232 | type: Component,
|
5233 | args: [{
|
5234 | selector: 'bs-custom-date-view',
|
5235 | template: `
|
5236 | <div class="bs-datepicker-predefined-btns">
|
5237 | <button *ngFor="let range of ranges"
|
5238 | type="button"
|
5239 | class="btn"
|
5240 | (click)="selectFromRanges(range)"
|
5241 | [class.selected]="range.value === selectedRange">
|
5242 | {{ range.label }}
|
5243 | </button>
|
5244 | </div>
|
5245 | `,
|
5246 | changeDetection: ChangeDetectionStrategy.OnPush
|
5247 | }]
|
5248 | }], function () { return []; }, { onSelect: [{
|
5249 | type: Output
|
5250 | }], ranges: [{
|
5251 | type: Input
|
5252 | }], selectedRange: [{
|
5253 | type: Input
|
5254 | }], customRangeLabel: [{
|
5255 | type: Input
|
5256 | }] }); })();
|
5257 |
|
5258 | class BsDatepickerDayDecoratorComponent {
|
5259 | constructor(_config, _elRef, _renderer) {
|
5260 | this._config = _config;
|
5261 | this._elRef = _elRef;
|
5262 | this._renderer = _renderer;
|
5263 | this.day = { date: new Date(), label: '' };
|
5264 | }
|
5265 | ngOnInit() {
|
5266 | var _a, _b, _c;
|
5267 | if (((_a = this.day) === null || _a === void 0 ? void 0 : _a.isToday) && this._config && this._config.customTodayClass) {
|
5268 | this._renderer.addClass(this._elRef.nativeElement, this._config.customTodayClass);
|
5269 | }
|
5270 | if (typeof ((_b = this.day) === null || _b === void 0 ? void 0 : _b.customClasses) === 'string') {
|
5271 | (_c = this.day) === null || _c === void 0 ? void 0 : _c.customClasses.split(' ').filter((className) => className).forEach((className) => {
|
5272 | this._renderer.addClass(this._elRef.nativeElement, className);
|
5273 | });
|
5274 | }
|
5275 | }
|
5276 | }
|
5277 | BsDatepickerDayDecoratorComponent.ɵfac = function BsDatepickerDayDecoratorComponent_Factory(t) { return new (t || BsDatepickerDayDecoratorComponent)(ɵngcc0.ɵɵdirectiveInject(BsDatepickerConfig), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2)); };
|
5278 | BsDatepickerDayDecoratorComponent.ɵcmp = ɵngcc0.ɵɵdefineComponent({ type: BsDatepickerDayDecoratorComponent, selectors: [["", "bsDatepickerDayDecorator", ""]], hostVars: 16, hostBindings: function BsDatepickerDayDecoratorComponent_HostBindings(rf, ctx) { if (rf & 2) {
|
5279 | ɵngcc0.ɵɵclassProp("disabled", ctx.day.isDisabled)("is-highlighted", ctx.day.isHovered)("is-other-month", ctx.day.isOtherMonth)("is-active-other-month", ctx.day.isOtherMonthHovered)("in-range", ctx.day.isInRange)("select-start", ctx.day.isSelectionStart)("select-end", ctx.day.isSelectionEnd)("selected", ctx.day.isSelected);
|
5280 | } }, inputs: { day: "day" }, attrs: _c8, decls: 1, vars: 1, template: function BsDatepickerDayDecoratorComponent_Template(rf, ctx) { if (rf & 1) {
|
5281 | ɵngcc0.ɵɵtext(0);
|
5282 | } if (rf & 2) {
|
5283 | ɵngcc0.ɵɵtextInterpolate(ctx.day && ctx.day.label || "");
|
5284 | } }, encapsulation: 2, changeDetection: 0 });
|
5285 | BsDatepickerDayDecoratorComponent.ctorParameters = () => [
|
5286 | { type: BsDatepickerConfig },
|
5287 | { type: ElementRef },
|
5288 | { type: Renderer2 }
|
5289 | ];
|
5290 | BsDatepickerDayDecoratorComponent.propDecorators = {
|
5291 | day: [{ type: Input }]
|
5292 | };
|
5293 | (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BsDatepickerDayDecoratorComponent, [{
|
5294 | type: Component,
|
5295 | args: [{
|
5296 | selector: '[bsDatepickerDayDecorator]',
|
5297 | changeDetection: ChangeDetectionStrategy.OnPush,
|
5298 | host: {
|
5299 | '[class.disabled]': 'day.isDisabled',
|
5300 | '[class.is-highlighted]': 'day.isHovered',
|
5301 | '[class.is-other-month]': 'day.isOtherMonth',
|
5302 | '[class.is-active-other-month]': 'day.isOtherMonthHovered',
|
5303 | '[class.in-range]': 'day.isInRange',
|
5304 | '[class.select-start]': 'day.isSelectionStart',
|
5305 | '[class.select-end]': 'day.isSelectionEnd',
|
5306 | '[class.selected]': 'day.isSelected'
|
5307 | },
|
5308 | template: `{{ day && day.label || '' }}`
|
5309 | }]
|
5310 | }], function () { return [{ type: BsDatepickerConfig }, { type: ɵngcc0.ElementRef }, { type: ɵngcc0.Renderer2 }]; }, { day: [{
|
5311 | type: Input
|
5312 | }] }); })();
|
5313 |
|
5314 |
|
5315 |
|
5316 |
|
5317 | var BsNavigationDirection;
|
5318 | (function (BsNavigationDirection) {
|
5319 | BsNavigationDirection[BsNavigationDirection["UP"] = 0] = "UP";
|
5320 | BsNavigationDirection[BsNavigationDirection["DOWN"] = 1] = "DOWN";
|
5321 | })(BsNavigationDirection || (BsNavigationDirection = {}));
|
5322 |
|
5323 | class BsDatepickerNavigationViewComponent {
|
5324 | constructor() {
|
5325 | this.onNavigate = new EventEmitter();
|
5326 | this.onViewMode = new EventEmitter();
|
5327 | }
|
5328 | navTo(down) {
|
5329 | this.onNavigate.emit(down ? BsNavigationDirection.DOWN : BsNavigationDirection.UP);
|
5330 | }
|
5331 | view(viewMode) {
|
5332 | this.onViewMode.emit(viewMode);
|
5333 | }
|
5334 | }
|
5335 | BsDatepickerNavigationViewComponent.ɵfac = function BsDatepickerNavigationViewComponent_Factory(t) { return new (t || BsDatepickerNavigationViewComponent)(); };
|
5336 | BsDatepickerNavigationViewComponent.ɵcmp = ɵngcc0.ɵɵdefineComponent({ type: BsDatepickerNavigationViewComponent, selectors: [["bs-datepicker-navigation-view"]], inputs: { calendar: "calendar" }, outputs: { onNavigate: "onNavigate", onViewMode: "onViewMode" }, decls: 12, vars: 8, consts: [["type", "button", 1, "previous", 3, "disabled", "click"], [4, "ngIf"], ["type", "button", 1, "current", 3, "click"], ["type", "button", 1, "next", 3, "disabled", "click"]], template: function BsDatepickerNavigationViewComponent_Template(rf, ctx) { if (rf & 1) {
|
5337 | ɵngcc0.ɵɵelementStart(0, "button", 0);
|
5338 | ɵngcc0.ɵɵlistener("click", function BsDatepickerNavigationViewComponent_Template_button_click_0_listener() { return ctx.navTo(true); });
|
5339 | ɵngcc0.ɵɵelementStart(1, "span");
|
5340 | ɵngcc0.ɵɵtext(2, "\u2039");
|
5341 | ɵngcc0.ɵɵelementEnd();
|
5342 | ɵngcc0.ɵɵelementEnd();
|
5343 | ɵngcc0.ɵɵtemplate(3, BsDatepickerNavigationViewComponent_ng_container_3_Template, 5, 1, "ng-container", 1);
|
5344 | ɵngcc0.ɵɵtext(4, " \u200B ");
|
5345 | ɵngcc0.ɵɵelementStart(5, "button", 2);
|
5346 | ɵngcc0.ɵɵlistener("click", function BsDatepickerNavigationViewComponent_Template_button_click_5_listener() { return ctx.view("year"); });
|
5347 | ɵngcc0.ɵɵelementStart(6, "span");
|
5348 | ɵngcc0.ɵɵtext(7);
|
5349 | ɵngcc0.ɵɵelementEnd();
|
5350 | ɵngcc0.ɵɵelementEnd();
|
5351 | ɵngcc0.ɵɵtext(8, " \u200B ");
|
5352 | ɵngcc0.ɵɵelementStart(9, "button", 3);
|
5353 | ɵngcc0.ɵɵlistener("click", function BsDatepickerNavigationViewComponent_Template_button_click_9_listener() { return ctx.navTo(false); });
|
5354 | ɵngcc0.ɵɵelementStart(10, "span");
|
5355 | ɵngcc0.ɵɵtext(11, "\u203A");
|
5356 | ɵngcc0.ɵɵelementEnd();
|
5357 | ɵngcc0.ɵɵelementEnd();
|
5358 | } if (rf & 2) {
|
5359 | ɵngcc0.ɵɵstyleProp("visibility", ctx.calendar.hideLeftArrow ? "hidden" : "visible");
|
5360 | ɵngcc0.ɵɵproperty("disabled", ctx.calendar.disableLeftArrow);
|
5361 | ɵngcc0.ɵɵadvance(3);
|
5362 | ɵngcc0.ɵɵproperty("ngIf", ctx.calendar && ctx.calendar.monthTitle);
|
5363 | ɵngcc0.ɵɵadvance(4);
|
5364 | ɵngcc0.ɵɵtextInterpolate(ctx.calendar.yearTitle);
|
5365 | ɵngcc0.ɵɵadvance(2);
|
5366 | ɵngcc0.ɵɵstyleProp("visibility", ctx.calendar.hideRightArrow ? "hidden" : "visible");
|
5367 | ɵngcc0.ɵɵproperty("disabled", ctx.calendar.disableRightArrow);
|
5368 | } }, directives: [ɵngcc2.NgIf], encapsulation: 2, changeDetection: 0 });
|
5369 | BsDatepickerNavigationViewComponent.propDecorators = {
|
5370 | calendar: [{ type: Input }],
|
5371 | onNavigate: [{ type: Output }],
|
5372 | onViewMode: [{ type: Output }]
|
5373 | };
|
5374 | (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BsDatepickerNavigationViewComponent, [{
|
5375 | type: Component,
|
5376 | args: [{
|
5377 | selector: 'bs-datepicker-navigation-view',
|
5378 | changeDetection: ChangeDetectionStrategy.OnPush,
|
5379 | template: `
|
5380 | <button class="previous"
|
5381 | [disabled]="calendar.disableLeftArrow"
|
5382 | [style.visibility]="calendar.hideLeftArrow ? 'hidden' : 'visible'"
|
5383 | type="button"
|
5384 | (click)="navTo(true)">
|
5385 | <span>‹</span>
|
5386 | </button>
|
5387 |
|
5388 | <ng-container *ngIf="calendar && calendar.monthTitle">
|
5389 | ​ <!-- zero-width space needed for correct alignment
|
5390 | with preserveWhitespaces: false in Angular -->
|
5391 |
|
5392 | <button class="current"
|
5393 | type="button"
|
5394 | (click)="view('month')"
|
5395 | ><span>{{ calendar.monthTitle }}</span>
|
5396 | </button>
|
5397 | </ng-container>
|
5398 |
|
5399 | ​ <!-- zero-width space needed for correct alignment
|
5400 | with preserveWhitespaces: false in Angular -->
|
5401 |
|
5402 | <button class="current" (click)="view('year')" type="button">
|
5403 | <span>{{ calendar.yearTitle }}</span>
|
5404 | </button>
|
5405 |
|
5406 | ​ <!-- zero-width space needed for correct alignment
|
5407 | with preserveWhitespaces: false in Angular -->
|
5408 |
|
5409 | <button class="next"
|
5410 | [disabled]="calendar.disableRightArrow"
|
5411 | [style.visibility]="calendar.hideRightArrow ? 'hidden' : 'visible'"
|
5412 | type="button"
|
5413 | (click)="navTo(false)"><span>›</span>
|
5414 | </button>
|
5415 | `
|
5416 | }]
|
5417 | }], function () { return []; }, { onNavigate: [{
|
5418 | type: Output
|
5419 | }], onViewMode: [{
|
5420 | type: Output
|
5421 | }], calendar: [{
|
5422 | type: Input
|
5423 | }] }); })();
|
5424 |
|
5425 | class BsDaysCalendarViewComponent {
|
5426 | constructor(_config) {
|
5427 | this._config = _config;
|
5428 | this.onNavigate = new EventEmitter();
|
5429 | this.onViewMode = new EventEmitter();
|
5430 | this.onSelect = new EventEmitter();
|
5431 | this.onHover = new EventEmitter();
|
5432 | this.onHoverWeek = new EventEmitter();
|
5433 | this.isiOS = (/iPad|iPhone|iPod/.test(navigator.platform) ||
|
5434 | (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1));
|
5435 | if (this._config.dateTooltipTexts && this._config.dateTooltipTexts.length > 0) {
|
5436 | this.isShowTooltip = true;
|
5437 | }
|
5438 | }
|
5439 | navigateTo(event) {
|
5440 | const step = BsNavigationDirection.DOWN === event ? -1 : 1;
|
5441 | this.onNavigate.emit({ step: { month: step } });
|
5442 | }
|
5443 | changeViewMode(event) {
|
5444 | this.onViewMode.emit(event);
|
5445 | }
|
5446 | selectDay(event) {
|
5447 | this.onSelect.emit(event);
|
5448 | }
|
5449 | selectWeek(week) {
|
5450 | if (!this._config.selectWeek && !this._config.selectWeekDateRange) {
|
5451 | return;
|
5452 | }
|
5453 | if (week.days.length === 0) {
|
5454 | return;
|
5455 | }
|
5456 | if (this._config.selectWeek && week.days[0]
|
5457 | && !week.days[0].isDisabled
|
5458 | && this._config.selectFromOtherMonth) {
|
5459 | this.onSelect.emit(week.days[0]);
|
5460 | return;
|
5461 | }
|
5462 | const selectedDay = week.days.find((day) => {
|
5463 | return this._config.selectFromOtherMonth
|
5464 | ? !day.isDisabled
|
5465 | : !day.isOtherMonth && !day.isDisabled;
|
5466 | });
|
5467 | this.onSelect.emit(selectedDay);
|
5468 | if (this._config.selectWeekDateRange) {
|
5469 | const days = week.days.slice(0);
|
5470 | const lastDayOfRange = days.reverse().find((day) => {
|
5471 | return this._config.selectFromOtherMonth
|
5472 | ? !day.isDisabled
|
5473 | : !day.isOtherMonth && !day.isDisabled;
|
5474 | });
|
5475 | this.onSelect.emit(lastDayOfRange);
|
5476 | }
|
5477 | }
|
5478 | weekHoverHandler(cell, isHovered) {
|
5479 | if (!this._config.selectWeek && !this._config.selectWeekDateRange) {
|
5480 | return;
|
5481 | }
|
5482 | const hasActiveDays = cell.days.find((day) => {
|
5483 | return this._config.selectFromOtherMonth
|
5484 | ? !day.isDisabled
|
5485 | : !day.isOtherMonth && !day.isDisabled;
|
5486 | });
|
5487 | if (hasActiveDays) {
|
5488 | cell.isHovered = isHovered;
|
5489 | this.isWeekHovered = isHovered;
|
5490 | this.onHoverWeek.emit(cell);
|
5491 | }
|
5492 | }
|
5493 | hoverDay(cell, isHovered) {
|
5494 | if (this._config.selectFromOtherMonth && cell.isOtherMonth) {
|
5495 | cell.isOtherMonthHovered = isHovered;
|
5496 | }
|
5497 | if (this._config.dateTooltipTexts) {
|
5498 | cell.tooltipText = '';
|
5499 | this._config.dateTooltipTexts.forEach((dateData) => {
|
5500 | if (isSameDay(dateData.date, cell.date)) {
|
5501 | cell.tooltipText = dateData.tooltipText;
|
5502 | return;
|
5503 | }
|
5504 | });
|
5505 | }
|
5506 | this.onHover.emit({ cell, isHovered });
|
5507 | }
|
5508 | }
|
5509 | BsDaysCalendarViewComponent.ɵfac = function BsDaysCalendarViewComponent_Factory(t) { return new (t || BsDaysCalendarViewComponent)(ɵngcc0.ɵɵdirectiveInject(BsDatepickerConfig)); };
|
5510 | BsDaysCalendarViewComponent.ɵcmp = ɵngcc0.ɵɵdefineComponent({ type: BsDaysCalendarViewComponent, selectors: [["bs-days-calendar-view"]], inputs: { calendar: "calendar", options: "options" }, outputs: { onNavigate: "onNavigate", onViewMode: "onViewMode", onSelect: "onSelect", onHover: "onHover", onHoverWeek: "onHoverWeek" }, decls: 9, vars: 4, consts: [[3, "calendar", "onNavigate", "onViewMode"], ["role", "grid", 1, "days", "weeks"], [4, "ngIf"], ["aria-label", "weekday", 4, "ngFor", "ngForOf"], [4, "ngFor", "ngForOf"], ["aria-label", "weekday"], ["class", "week", 3, "active-week", 4, "ngIf"], ["role", "gridcell", 4, "ngFor", "ngForOf"], [1, "week"], [3, "click", 4, "ngIf"], [3, "click", "mouseenter", "mouseleave", 4, "ngIf"], [3, "click"], [3, "click", "mouseenter", "mouseleave"], ["role", "gridcell"], ["bsDatepickerDayDecorator", "", 3, "day", "tooltip", "click", "mouseenter", "mouseleave", 4, "ngIf"], ["bsDatepickerDayDecorator", "", 3, "day", "click", "mouseenter", "mouseleave", 4, "ngIf"], ["bsDatepickerDayDecorator", "", 3, "day", "click", 4, "ngIf"], ["bsDatepickerDayDecorator", "", 3, "day", "tooltip", "click", "mouseenter", "mouseleave"], ["bsDatepickerDayDecorator", "", 3, "day", "click", "mouseenter", "mouseleave"], ["bsDatepickerDayDecorator", "", 3, "day", "click"]], template: function BsDaysCalendarViewComponent_Template(rf, ctx) { if (rf & 1) {
|
5511 | ɵngcc0.ɵɵelementStart(0, "bs-calendar-layout");
|
5512 | ɵngcc0.ɵɵelementStart(1, "bs-datepicker-navigation-view", 0);
|
5513 | ɵngcc0.ɵɵlistener("onNavigate", function BsDaysCalendarViewComponent_Template_bs_datepicker_navigation_view_onNavigate_1_listener($event) { return ctx.navigateTo($event); })("onViewMode", function BsDaysCalendarViewComponent_Template_bs_datepicker_navigation_view_onViewMode_1_listener($event) { return ctx.changeViewMode($event); });
|
5514 | ɵngcc0.ɵɵelementEnd();
|
5515 | ɵngcc0.ɵɵelementStart(2, "table", 1);
|
5516 | ɵngcc0.ɵɵelementStart(3, "thead");
|
5517 | ɵngcc0.ɵɵelementStart(4, "tr");
|
5518 | ɵngcc0.ɵɵtemplate(5, BsDaysCalendarViewComponent_th_5_Template, 1, 0, "th", 2);
|
5519 | ɵngcc0.ɵɵtemplate(6, BsDaysCalendarViewComponent_th_6_Template, 2, 1, "th", 3);
|
5520 | ɵngcc0.ɵɵelementEnd();
|
5521 | ɵngcc0.ɵɵelementEnd();
|
5522 | ɵngcc0.ɵɵelementStart(7, "tbody");
|
5523 | ɵngcc0.ɵɵtemplate(8, BsDaysCalendarViewComponent_tr_8_Template, 3, 2, "tr", 4);
|
5524 | ɵngcc0.ɵɵelementEnd();
|
5525 | ɵngcc0.ɵɵelementEnd();
|
5526 | ɵngcc0.ɵɵelementEnd();
|
5527 | } if (rf & 2) {
|
5528 | ɵngcc0.ɵɵadvance(1);
|
5529 | ɵngcc0.ɵɵproperty("calendar", ctx.calendar);
|
5530 | ɵngcc0.ɵɵadvance(4);
|
5531 | ɵngcc0.ɵɵproperty("ngIf", ctx.options && ctx.options.showWeekNumbers);
|
5532 | ɵngcc0.ɵɵadvance(1);
|
5533 | ɵngcc0.ɵɵproperty("ngForOf", ctx.calendar.weekdays);
|
5534 | ɵngcc0.ɵɵadvance(2);
|
5535 | ɵngcc0.ɵɵproperty("ngForOf", ctx.calendar.weeks);
|
5536 | } }, directives: [BsCalendarLayoutComponent, BsDatepickerNavigationViewComponent, ɵngcc2.NgIf, ɵngcc2.NgForOf, BsDatepickerDayDecoratorComponent, ɵngcc4.TooltipDirective], encapsulation: 2 });
|
5537 | BsDaysCalendarViewComponent.ctorParameters = () => [
|
5538 | { type: BsDatepickerConfig }
|
5539 | ];
|
5540 | BsDaysCalendarViewComponent.propDecorators = {
|
5541 | calendar: [{ type: Input }],
|
5542 | options: [{ type: Input }],
|
5543 | onNavigate: [{ type: Output }],
|
5544 | onViewMode: [{ type: Output }],
|
5545 | onSelect: [{ type: Output }],
|
5546 | onHover: [{ type: Output }],
|
5547 | onHoverWeek: [{ type: Output }]
|
5548 | };
|
5549 | (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BsDaysCalendarViewComponent, [{
|
5550 | type: Component,
|
5551 | args: [{
|
5552 | selector: 'bs-days-calendar-view',
|
5553 |
|
5554 | template: `
|
5555 | <bs-calendar-layout>
|
5556 | <bs-datepicker-navigation-view
|
5557 | [calendar]="calendar"
|
5558 | (onNavigate)="navigateTo($event)"
|
5559 | (onViewMode)="changeViewMode($event)"
|
5560 | ></bs-datepicker-navigation-view>
|
5561 | <!--days matrix-->
|
5562 | <table role="grid" class="days weeks">
|
5563 | <thead>
|
5564 | <tr>
|
5565 | <!--if show weeks-->
|
5566 | <th *ngIf="options && options.showWeekNumbers"></th>
|
5567 | <th *ngFor="let weekday of calendar.weekdays; let i = index"
|
5568 | aria-label="weekday">{{ calendar.weekdays[i] }}
|
5569 | </th>
|
5570 | </tr>
|
5571 | </thead>
|
5572 | <tbody>
|
5573 | <tr *ngFor="let week of calendar.weeks; let i = index">
|
5574 | <td class="week" [class.active-week]="isWeekHovered" *ngIf="options && options.showWeekNumbers">
|
5575 | <span *ngIf="isiOS" (click)="selectWeek(week)">{{ calendar.weekNumbers[i] }}</span>
|
5576 | <span *ngIf="!isiOS"
|
5577 | (click)="selectWeek(week)"
|
5578 | (mouseenter)="weekHoverHandler(week, true)"
|
5579 | (mouseleave)="weekHoverHandler(week, false)">{{ calendar.weekNumbers[i] }}</span>
|
5580 | </td>
|
5581 | <td *ngFor="let day of week.days" role="gridcell">
|
5582 |
|
5583 | <!-- When we want to show tooltips for dates -->
|
5584 | <span *ngIf="!isiOS && isShowTooltip" bsDatepickerDayDecorator
|
5585 | [day]="day"
|
5586 | (click)="selectDay(day)"
|
5587 | tooltip="{{day.tooltipText}}"
|
5588 | (mouseenter)="hoverDay(day, true)"
|
5589 | (mouseleave)="hoverDay(day, false)">{{ day.label }} 3</span>
|
5590 | <!-- When tooltips for dates are disabled -->
|
5591 | <span *ngIf="!isiOS && !isShowTooltip" bsDatepickerDayDecorator
|
5592 | [day]="day"
|
5593 | (click)="selectDay(day)"
|
5594 | (mouseenter)="hoverDay(day, true)"
|
5595 | (mouseleave)="hoverDay(day, false)">{{ day.label }} 2</span>
|
5596 |
|
5597 | <!-- For mobile iOS view, tooltips are not needed -->
|
5598 | <span *ngIf="isiOS" bsDatepickerDayDecorator
|
5599 | [day]="day"
|
5600 | (click)="selectDay(day)">{{ day.label }} 1</span>
|
5601 | </td>
|
5602 | </tr>
|
5603 | </tbody>
|
5604 | </table>
|
5605 |
|
5606 | </bs-calendar-layout>
|
5607 | `
|
5608 | }]
|
5609 | }], function () { return [{ type: BsDatepickerConfig }]; }, { onNavigate: [{
|
5610 | type: Output
|
5611 | }], onViewMode: [{
|
5612 | type: Output
|
5613 | }], onSelect: [{
|
5614 | type: Output
|
5615 | }], onHover: [{
|
5616 | type: Output
|
5617 | }], onHoverWeek: [{
|
5618 | type: Output
|
5619 | }], calendar: [{
|
5620 | type: Input
|
5621 | }], options: [{
|
5622 | type: Input
|
5623 | }] }); })();
|
5624 |
|
5625 | class BsMonthCalendarViewComponent {
|
5626 | constructor() {
|
5627 | this.onNavigate = new EventEmitter();
|
5628 | this.onViewMode = new EventEmitter();
|
5629 | this.onSelect = new EventEmitter();
|
5630 | this.onHover = new EventEmitter();
|
5631 | }
|
5632 | navigateTo(event) {
|
5633 | const step = BsNavigationDirection.DOWN === event ? -1 : 1;
|
5634 | this.onNavigate.emit({ step: { year: step } });
|
5635 | }
|
5636 | viewMonth(month) {
|
5637 | this.onSelect.emit(month);
|
5638 | }
|
5639 | hoverMonth(cell, isHovered) {
|
5640 | this.onHover.emit({ cell, isHovered });
|
5641 | }
|
5642 | changeViewMode(event) {
|
5643 | this.onViewMode.emit(event);
|
5644 | }
|
5645 | }
|
5646 | BsMonthCalendarViewComponent.ɵfac = function BsMonthCalendarViewComponent_Factory(t) { return new (t || BsMonthCalendarViewComponent)(); };
|
5647 | BsMonthCalendarViewComponent.ɵcmp = ɵngcc0.ɵɵdefineComponent({ type: BsMonthCalendarViewComponent, selectors: [["bs-month-calendar-view"]], inputs: { calendar: "calendar" }, outputs: { onNavigate: "onNavigate", onViewMode: "onViewMode", onSelect: "onSelect", onHover: "onHover" }, decls: 5, vars: 2, consts: [[3, "calendar", "onNavigate", "onViewMode"], ["role", "grid", 1, "months"], [4, "ngFor", "ngForOf"], ["role", "gridcell", 3, "disabled", "is-highlighted", "click", "mouseenter", "mouseleave", 4, "ngFor", "ngForOf"], ["role", "gridcell", 3, "click", "mouseenter", "mouseleave"]], template: function BsMonthCalendarViewComponent_Template(rf, ctx) { if (rf & 1) {
|
5648 | ɵngcc0.ɵɵelementStart(0, "bs-calendar-layout");
|
5649 | ɵngcc0.ɵɵelementStart(1, "bs-datepicker-navigation-view", 0);
|
5650 | ɵngcc0.ɵɵlistener("onNavigate", function BsMonthCalendarViewComponent_Template_bs_datepicker_navigation_view_onNavigate_1_listener($event) { return ctx.navigateTo($event); })("onViewMode", function BsMonthCalendarViewComponent_Template_bs_datepicker_navigation_view_onViewMode_1_listener($event) { return ctx.changeViewMode($event); });
|
5651 | ɵngcc0.ɵɵelementEnd();
|
5652 | ɵngcc0.ɵɵelementStart(2, "table", 1);
|
5653 | ɵngcc0.ɵɵelementStart(3, "tbody");
|
5654 | ɵngcc0.ɵɵtemplate(4, BsMonthCalendarViewComponent_tr_4_Template, 2, 1, "tr", 2);
|
5655 | ɵngcc0.ɵɵelementEnd();
|
5656 | ɵngcc0.ɵɵelementEnd();
|
5657 | ɵngcc0.ɵɵelementEnd();
|
5658 | } if (rf & 2) {
|
5659 | ɵngcc0.ɵɵadvance(1);
|
5660 | ɵngcc0.ɵɵproperty("calendar", ctx.calendar);
|
5661 | ɵngcc0.ɵɵadvance(3);
|
5662 | ɵngcc0.ɵɵproperty("ngForOf", ctx.calendar == null ? null : ctx.calendar.months);
|
5663 | } }, directives: [BsCalendarLayoutComponent, BsDatepickerNavigationViewComponent, ɵngcc2.NgForOf], encapsulation: 2 });
|
5664 | BsMonthCalendarViewComponent.propDecorators = {
|
5665 | calendar: [{ type: Input }],
|
5666 | onNavigate: [{ type: Output }],
|
5667 | onViewMode: [{ type: Output }],
|
5668 | onSelect: [{ type: Output }],
|
5669 | onHover: [{ type: Output }]
|
5670 | };
|
5671 | (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BsMonthCalendarViewComponent, [{
|
5672 | type: Component,
|
5673 | args: [{
|
5674 | selector: 'bs-month-calendar-view',
|
5675 | template: `
|
5676 | <bs-calendar-layout>
|
5677 | <bs-datepicker-navigation-view
|
5678 | [calendar]="calendar"
|
5679 | (onNavigate)="navigateTo($event)"
|
5680 | (onViewMode)="changeViewMode($event)"
|
5681 | ></bs-datepicker-navigation-view>
|
5682 |
|
5683 | <table role="grid" class="months">
|
5684 | <tbody>
|
5685 | <tr *ngFor="let row of calendar?.months">
|
5686 | <td *ngFor="let month of row" role="gridcell"
|
5687 | (click)="viewMonth(month)"
|
5688 | (mouseenter)="hoverMonth(month, true)"
|
5689 | (mouseleave)="hoverMonth(month, false)"
|
5690 | [class.disabled]="month.isDisabled"
|
5691 | [class.is-highlighted]="month.isHovered">
|
5692 | <span [class.selected]="month.isSelected">{{ month.label }}</span>
|
5693 | </td>
|
5694 | </tr>
|
5695 | </tbody>
|
5696 | </table>
|
5697 | </bs-calendar-layout>
|
5698 | `
|
5699 | }]
|
5700 | }], function () { return []; }, { onNavigate: [{
|
5701 | type: Output
|
5702 | }], onViewMode: [{
|
5703 | type: Output
|
5704 | }], onSelect: [{
|
5705 | type: Output
|
5706 | }], onHover: [{
|
5707 | type: Output
|
5708 | }], calendar: [{
|
5709 | type: Input
|
5710 | }] }); })();
|
5711 |
|
5712 | class BsTimepickerViewComponent {
|
5713 | constructor() {
|
5714 | this.ampm = 'ok';
|
5715 | this.hours = 0;
|
5716 | this.minutes = 0;
|
5717 | }
|
5718 | }
|
5719 | BsTimepickerViewComponent.ɵfac = function BsTimepickerViewComponent_Factory(t) { return new (t || BsTimepickerViewComponent)(); };
|
5720 | BsTimepickerViewComponent.ɵcmp = ɵngcc0.ɵɵdefineComponent({ type: BsTimepickerViewComponent, selectors: [["bs-timepicker"]], decls: 16, vars: 3, consts: [[1, "bs-timepicker-container"], [1, "bs-timepicker-controls"], ["type", "button", 1, "bs-decrease"], ["type", "text", "placeholder", "00", 3, "value"], ["type", "button", 1, "bs-increase"], ["type", "button", 1, "switch-time-format"], ["src", "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAKCAYAAABi8KSDAAABSElEQVQYV3XQPUvDUBQG4HNuagtVqc6KgouCv6GIuIntYBLB9hcIQpLStCAIV7DYmpTcRWcXqZio3Vwc/UCc/QEqfgyKGbr0I7nS1EiHeqYzPO/h5SD0jaxUZjmSLCB+OFb+UFINFwASAEAdpu9gaGXVyAHHFQBkHpKHc6a9dzECvADyY9sqlAMsK9W0jzxDXqeytr3mhQckxSji27TJJ5/rPmIpwJJq3HrtduriYOurv1a4i1p5HnhkG9OFymi0ReoO05cGwb+ayv4dysVygjeFmsP05f8wpZQ8fsdvfmuY9zjWSNqUtgYFVnOVReILYoBFzdQI5/GGFzNHhGbeZnopDGU29sZbscgldmC99w35VOATTycIMMcBXIfpSVGzZhA6C8hh00conln6VQ9TGgV32OEAKQC4DrBq7CJwd0ggR7Vq/rPrfgB+C3sGypY5DAAAAABJRU5ErkJggg==", "alt", ""]], template: function BsTimepickerViewComponent_Template(rf, ctx) { if (rf & 1) {
|
5721 | ɵngcc0.ɵɵelementStart(0, "div", 0);
|
5722 | ɵngcc0.ɵɵelementStart(1, "div", 1);
|
5723 | ɵngcc0.ɵɵelementStart(2, "button", 2);
|
5724 | ɵngcc0.ɵɵtext(3, "-");
|
5725 | ɵngcc0.ɵɵelementEnd();
|
5726 | ɵngcc0.ɵɵelement(4, "input", 3);
|
5727 | ɵngcc0.ɵɵelementStart(5, "button", 4);
|
5728 | ɵngcc0.ɵɵtext(6, "+");
|
5729 | ɵngcc0.ɵɵelementEnd();
|
5730 | ɵngcc0.ɵɵelementEnd();
|
5731 | ɵngcc0.ɵɵelementStart(7, "div", 1);
|
5732 | ɵngcc0.ɵɵelementStart(8, "button", 2);
|
5733 | ɵngcc0.ɵɵtext(9, "-");
|
5734 | ɵngcc0.ɵɵelementEnd();
|
5735 | ɵngcc0.ɵɵelement(10, "input", 3);
|
5736 | ɵngcc0.ɵɵelementStart(11, "button", 4);
|
5737 | ɵngcc0.ɵɵtext(12, "+");
|
5738 | ɵngcc0.ɵɵelementEnd();
|
5739 | ɵngcc0.ɵɵelementEnd();
|
5740 | ɵngcc0.ɵɵelementStart(13, "button", 5);
|
5741 | ɵngcc0.ɵɵtext(14);
|
5742 | ɵngcc0.ɵɵelement(15, "img", 6);
|
5743 | ɵngcc0.ɵɵelementEnd();
|
5744 | ɵngcc0.ɵɵelementEnd();
|
5745 | } if (rf & 2) {
|
5746 | ɵngcc0.ɵɵadvance(4);
|
5747 | ɵngcc0.ɵɵproperty("value", ctx.hours);
|
5748 | ɵngcc0.ɵɵadvance(6);
|
5749 | ɵngcc0.ɵɵproperty("value", ctx.minutes);
|
5750 | ɵngcc0.ɵɵadvance(4);
|
5751 | ɵngcc0.ɵɵtextInterpolate1("", ctx.ampm, " ");
|
5752 | } }, encapsulation: 2 });
|
5753 | (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BsTimepickerViewComponent, [{
|
5754 | type: Component,
|
5755 | args: [{
|
5756 | selector: 'bs-timepicker',
|
5757 | template: `
|
5758 | <div class="bs-timepicker-container">
|
5759 | <div class="bs-timepicker-controls">
|
5760 | <button class="bs-decrease" type="button">-</button>
|
5761 | <input type="text" [value]="hours" placeholder="00">
|
5762 | <button class="bs-increase" type="button">+</button>
|
5763 | </div>
|
5764 | <div class="bs-timepicker-controls">
|
5765 | <button class="bs-decrease" type="button">-</button>
|
5766 | <input type="text" [value]="minutes" placeholder="00">
|
5767 | <button class="bs-increase" type="button">+</button>
|
5768 | </div>
|
5769 | <button class="switch-time-format" type="button">{{ ampm }}
|
5770 | <img
|
5771 | src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAKCAYAAABi8KSDAAABSElEQVQYV3XQPUvDUBQG4HNuagtVqc6KgouCv6GIuIntYBLB9hcIQpLStCAIV7DYmpTcRWcXqZio3Vwc/UCc/QEqfgyKGbr0I7nS1EiHeqYzPO/h5SD0jaxUZjmSLCB+OFb+UFINFwASAEAdpu9gaGXVyAHHFQBkHpKHc6a9dzECvADyY9sqlAMsK9W0jzxDXqeytr3mhQckxSji27TJJ5/rPmIpwJJq3HrtduriYOurv1a4i1p5HnhkG9OFymi0ReoO05cGwb+ayv4dysVygjeFmsP05f8wpZQ8fsdvfmuY9zjWSNqUtgYFVnOVReILYoBFzdQI5/GGFzNHhGbeZnopDGU29sZbscgldmC99w35VOATTycIMMcBXIfpSVGzZhA6C8hh00conln6VQ9TGgV32OEAKQC4DrBq7CJwd0ggR7Vq/rPrfgB+C3sGypY5DAAAAABJRU5ErkJggg=="
|
5772 | alt="">
|
5773 | </button>
|
5774 | </div>
|
5775 | `
|
5776 | }]
|
5777 | }], function () { return []; }, null); })();
|
5778 |
|
5779 | class BsYearsCalendarViewComponent {
|
5780 | constructor() {
|
5781 | this.onNavigate = new EventEmitter();
|
5782 | this.onViewMode = new EventEmitter();
|
5783 | this.onSelect = new EventEmitter();
|
5784 | this.onHover = new EventEmitter();
|
5785 | }
|
5786 | navigateTo(event) {
|
5787 | const step = BsNavigationDirection.DOWN === event ? -1 : 1;
|
5788 | this.onNavigate.emit({ step: { year: step * yearsPerCalendar } });
|
5789 | }
|
5790 | viewYear(year) {
|
5791 | this.onSelect.emit(year);
|
5792 | }
|
5793 | hoverYear(cell, isHovered) {
|
5794 | this.onHover.emit({ cell, isHovered });
|
5795 | }
|
5796 | changeViewMode(event) {
|
5797 | this.onViewMode.emit(event);
|
5798 | }
|
5799 | }
|
5800 | BsYearsCalendarViewComponent.ɵfac = function BsYearsCalendarViewComponent_Factory(t) { return new (t || BsYearsCalendarViewComponent)(); };
|
5801 | BsYearsCalendarViewComponent.ɵcmp = ɵngcc0.ɵɵdefineComponent({ type: BsYearsCalendarViewComponent, selectors: [["bs-years-calendar-view"]], inputs: { calendar: "calendar" }, outputs: { onNavigate: "onNavigate", onViewMode: "onViewMode", onSelect: "onSelect", onHover: "onHover" }, decls: 5, vars: 2, consts: [[3, "calendar", "onNavigate", "onViewMode"], ["role", "grid", 1, "years"], [4, "ngFor", "ngForOf"], ["role", "gridcell", 3, "disabled", "is-highlighted", "click", "mouseenter", "mouseleave", 4, "ngFor", "ngForOf"], ["role", "gridcell", 3, "click", "mouseenter", "mouseleave"]], template: function BsYearsCalendarViewComponent_Template(rf, ctx) { if (rf & 1) {
|
5802 | ɵngcc0.ɵɵelementStart(0, "bs-calendar-layout");
|
5803 | ɵngcc0.ɵɵelementStart(1, "bs-datepicker-navigation-view", 0);
|
5804 | ɵngcc0.ɵɵlistener("onNavigate", function BsYearsCalendarViewComponent_Template_bs_datepicker_navigation_view_onNavigate_1_listener($event) { return ctx.navigateTo($event); })("onViewMode", function BsYearsCalendarViewComponent_Template_bs_datepicker_navigation_view_onViewMode_1_listener($event) { return ctx.changeViewMode($event); });
|
5805 | ɵngcc0.ɵɵelementEnd();
|
5806 | ɵngcc0.ɵɵelementStart(2, "table", 1);
|
5807 | ɵngcc0.ɵɵelementStart(3, "tbody");
|
5808 | ɵngcc0.ɵɵtemplate(4, BsYearsCalendarViewComponent_tr_4_Template, 2, 1, "tr", 2);
|
5809 | ɵngcc0.ɵɵelementEnd();
|
5810 | ɵngcc0.ɵɵelementEnd();
|
5811 | ɵngcc0.ɵɵelementEnd();
|
5812 | } if (rf & 2) {
|
5813 | ɵngcc0.ɵɵadvance(1);
|
5814 | ɵngcc0.ɵɵproperty("calendar", ctx.calendar);
|
5815 | ɵngcc0.ɵɵadvance(3);
|
5816 | ɵngcc0.ɵɵproperty("ngForOf", ctx.calendar == null ? null : ctx.calendar.years);
|
5817 | } }, directives: [BsCalendarLayoutComponent, BsDatepickerNavigationViewComponent, ɵngcc2.NgForOf], encapsulation: 2 });
|
5818 | BsYearsCalendarViewComponent.propDecorators = {
|
5819 | calendar: [{ type: Input }],
|
5820 | onNavigate: [{ type: Output }],
|
5821 | onViewMode: [{ type: Output }],
|
5822 | onSelect: [{ type: Output }],
|
5823 | onHover: [{ type: Output }]
|
5824 | };
|
5825 | (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BsYearsCalendarViewComponent, [{
|
5826 | type: Component,
|
5827 | args: [{
|
5828 | selector: 'bs-years-calendar-view',
|
5829 | template: `
|
5830 | <bs-calendar-layout>
|
5831 | <bs-datepicker-navigation-view
|
5832 | [calendar]="calendar"
|
5833 | (onNavigate)="navigateTo($event)"
|
5834 | (onViewMode)="changeViewMode($event)"
|
5835 | ></bs-datepicker-navigation-view>
|
5836 |
|
5837 | <table role="grid" class="years">
|
5838 | <tbody>
|
5839 | <tr *ngFor="let row of calendar?.years">
|
5840 | <td *ngFor="let year of row" role="gridcell"
|
5841 | (click)="viewYear(year)"
|
5842 | (mouseenter)="hoverYear(year, true)"
|
5843 | (mouseleave)="hoverYear(year, false)"
|
5844 | [class.disabled]="year.isDisabled"
|
5845 | [class.is-highlighted]="year.isHovered">
|
5846 | <span [class.selected]="year.isSelected">{{ year.label }}</span>
|
5847 | </td>
|
5848 | </tr>
|
5849 | </tbody>
|
5850 | </table>
|
5851 | </bs-calendar-layout>
|
5852 | `
|
5853 | }]
|
5854 | }], function () { return []; }, { onNavigate: [{
|
5855 | type: Output
|
5856 | }], onViewMode: [{
|
5857 | type: Output
|
5858 | }], onSelect: [{
|
5859 | type: Output
|
5860 | }], onHover: [{
|
5861 | type: Output
|
5862 | }], calendar: [{
|
5863 | type: Input
|
5864 | }] }); })();
|
5865 |
|
5866 | class BsDatepickerModule {
|
5867 | static forRoot() {
|
5868 | return {
|
5869 | ngModule: BsDatepickerModule,
|
5870 | providers: [
|
5871 | ComponentLoaderFactory,
|
5872 | PositioningService,
|
5873 | BsDatepickerStore,
|
5874 | BsDatepickerActions,
|
5875 | BsDatepickerEffects,
|
5876 | BsLocaleService
|
5877 | ]
|
5878 | };
|
5879 | }
|
5880 | }
|
5881 | BsDatepickerModule.ɵmod = ɵngcc0.ɵɵdefineNgModule({ type: BsDatepickerModule });
|
5882 | BsDatepickerModule.ɵinj = ɵngcc0.ɵɵdefineInjector({ factory: function BsDatepickerModule_Factory(t) { return new (t || BsDatepickerModule)(); }, imports: [[CommonModule, TooltipModule]] });
|
5883 | (function () { (typeof ngJitMode === "undefined" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(BsDatepickerModule, { declarations: function () { return [BsCalendarLayoutComponent, BsCurrentDateViewComponent, BsCustomDatesViewComponent, BsDatepickerDayDecoratorComponent, BsDatepickerNavigationViewComponent, BsDaysCalendarViewComponent, BsMonthCalendarViewComponent, BsTimepickerViewComponent, BsYearsCalendarViewComponent, BsDatepickerContainerComponent, BsDatepickerDirective, BsDatepickerInlineContainerComponent, BsDatepickerInlineDirective, BsDatepickerInputDirective, BsDaterangepickerContainerComponent, BsDaterangepickerDirective, BsDaterangepickerInlineContainerComponent, BsDaterangepickerInlineDirective, BsDaterangepickerInputDirective]; }, imports: function () { return [CommonModule, TooltipModule]; }, exports: function () { return [BsDatepickerContainerComponent, BsDatepickerDirective, BsDatepickerInlineContainerComponent, BsDatepickerInlineDirective, BsDatepickerInputDirective, BsDaterangepickerContainerComponent, BsDaterangepickerDirective, BsDaterangepickerInlineContainerComponent, BsDaterangepickerInlineDirective, BsDaterangepickerInputDirective]; } }); })();
|
5884 | (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BsDatepickerModule, [{
|
5885 | type: NgModule,
|
5886 | args: [{
|
5887 | imports: [CommonModule, TooltipModule],
|
5888 | declarations: [
|
5889 | BsCalendarLayoutComponent,
|
5890 | BsCurrentDateViewComponent,
|
5891 | BsCustomDatesViewComponent,
|
5892 | BsDatepickerDayDecoratorComponent,
|
5893 | BsDatepickerNavigationViewComponent,
|
5894 | BsDaysCalendarViewComponent,
|
5895 | BsMonthCalendarViewComponent,
|
5896 | BsTimepickerViewComponent,
|
5897 | BsYearsCalendarViewComponent,
|
5898 | BsDatepickerContainerComponent,
|
5899 | BsDatepickerDirective,
|
5900 | BsDatepickerInlineContainerComponent,
|
5901 | BsDatepickerInlineDirective,
|
5902 | BsDatepickerInputDirective,
|
5903 | BsDaterangepickerContainerComponent,
|
5904 | BsDaterangepickerDirective,
|
5905 | BsDaterangepickerInlineContainerComponent,
|
5906 | BsDaterangepickerInlineDirective,
|
5907 | BsDaterangepickerInputDirective
|
5908 | ],
|
5909 | entryComponents: [
|
5910 | BsDatepickerContainerComponent,
|
5911 | BsDaterangepickerContainerComponent,
|
5912 | BsDatepickerInlineContainerComponent,
|
5913 | BsDaterangepickerInlineContainerComponent
|
5914 | ],
|
5915 | exports: [
|
5916 | BsDatepickerContainerComponent,
|
5917 | BsDatepickerDirective,
|
5918 | BsDatepickerInlineContainerComponent,
|
5919 | BsDatepickerInlineDirective,
|
5920 | BsDatepickerInputDirective,
|
5921 | BsDaterangepickerContainerComponent,
|
5922 | BsDaterangepickerDirective,
|
5923 | BsDaterangepickerInlineContainerComponent,
|
5924 | BsDaterangepickerInlineDirective,
|
5925 | BsDaterangepickerInputDirective
|
5926 | ]
|
5927 | }]
|
5928 | }], null, null); })();
|
5929 |
|
5930 | class DatepickerModule {
|
5931 | static forRoot() {
|
5932 | return { ngModule: DatepickerModule, providers: [DatepickerConfig] };
|
5933 | }
|
5934 | }
|
5935 | DatepickerModule.ɵmod = ɵngcc0.ɵɵdefineNgModule({ type: DatepickerModule });
|
5936 | DatepickerModule.ɵinj = ɵngcc0.ɵɵdefineInjector({ factory: function DatepickerModule_Factory(t) { return new (t || DatepickerModule)(); }, imports: [[CommonModule, FormsModule]] });
|
5937 | (function () { (typeof ngJitMode === "undefined" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(DatepickerModule, { declarations: function () { return [DatePickerComponent, DatePickerInnerComponent, DayPickerComponent, MonthPickerComponent, YearPickerComponent]; }, imports: function () { return [CommonModule, FormsModule]; }, exports: function () { return [DatePickerComponent, DatePickerInnerComponent, DayPickerComponent, MonthPickerComponent, YearPickerComponent]; } }); })();
|
5938 | (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(DatepickerModule, [{
|
5939 | type: NgModule,
|
5940 | args: [{
|
5941 | imports: [CommonModule, FormsModule],
|
5942 | declarations: [
|
5943 | DatePickerComponent,
|
5944 | DatePickerInnerComponent,
|
5945 | DayPickerComponent,
|
5946 | MonthPickerComponent,
|
5947 | YearPickerComponent
|
5948 | ],
|
5949 | exports: [
|
5950 | DatePickerComponent,
|
5951 | DatePickerInnerComponent,
|
5952 | DayPickerComponent,
|
5953 | MonthPickerComponent,
|
5954 | YearPickerComponent
|
5955 | ],
|
5956 | entryComponents: [DatePickerComponent]
|
5957 | }]
|
5958 | }], null, null); })();
|
5959 |
|
5960 |
|
5961 |
|
5962 |
|
5963 |
|
5964 | export { BsDatepickerConfig, BsDatepickerContainerComponent, BsDatepickerDirective, BsDatepickerInlineConfig, BsDatepickerInlineContainerComponent, BsDatepickerInlineDirective, BsDatepickerInputDirective, BsDatepickerModule, BsDaterangepickerConfig, BsDaterangepickerContainerComponent, BsDaterangepickerDirective, BsDaterangepickerInlineConfig, BsDaterangepickerInlineContainerComponent, BsDaterangepickerInlineDirective, BsDaterangepickerInputDirective, BsLocaleService, DateFormatter, DatePickerComponent, DatePickerInnerComponent, DatepickerConfig, DatepickerModule, DayPickerComponent, MonthPickerComponent, YearPickerComponent, DATEPICKER_CONTROL_VALUE_ACCESSOR as ɵa, BsDatepickerAbstractComponent as ɵb, BsDatepickerStore as ɵc, BsDatepickerEffects as ɵd, BsDatepickerActions as ɵe, datepickerAnimation as ɵf, BsCalendarLayoutComponent as ɵg, BsCurrentDateViewComponent as ɵh, BsCustomDatesViewComponent as ɵi, BsDatepickerDayDecoratorComponent as ɵj, BsDatepickerNavigationViewComponent as ɵk, BsDaysCalendarViewComponent as ɵl, BsMonthCalendarViewComponent as ɵm, BsTimepickerViewComponent as ɵn, BsYearsCalendarViewComponent as ɵo };
|
5965 |
|
5966 |
|
\ | No newline at end of file |