ngx-animating-datepicker 1.2.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -1
- package/fesm2022/ngx-animating-datepicker.mjs +1534 -0
- package/fesm2022/ngx-animating-datepicker.mjs.map +1 -0
- package/package.json +32 -17
- package/types/ngx-animating-datepicker.d.ts +551 -0
- package/bundles/ngx-animating-datepicker.umd.js +0 -2594
- package/bundles/ngx-animating-datepicker.umd.js.map +0 -1
- package/bundles/ngx-animating-datepicker.umd.min.js +0 -2
- package/bundles/ngx-animating-datepicker.umd.min.js.map +0 -1
- package/esm2015/lib/components/animatepicker/animatepicker.component.js +0 -468
- package/esm2015/lib/components/datepicker/datepicker.component.js +0 -703
- package/esm2015/lib/components/datepicker/datepicker.directive.js +0 -408
- package/esm2015/lib/components/datepicker/datepicker.options.js +0 -41
- package/esm2015/lib/components/navigation/navigation.component.js +0 -233
- package/esm2015/lib/components/sub-navigation/sub-navigation.component.js +0 -48
- package/esm2015/lib/models/datepicker-options.model.js +0 -35
- package/esm2015/lib/models/datepicker.model.js +0 -75
- package/esm2015/lib/models/directive-options.model.js +0 -19
- package/esm2015/lib/ngx-animating-datepicker.module.js +0 -35
- package/esm2015/lib/services/datepicker.service.js +0 -161
- package/esm2015/lib/services/utilities.service.js +0 -56
- package/esm2015/ngx-animating-datepicker.js +0 -13
- package/esm2015/public_api.js +0 -8
- package/esm5/lib/components/animatepicker/animatepicker.component.js +0 -574
- package/esm5/lib/components/datepicker/datepicker.component.js +0 -928
- package/esm5/lib/components/datepicker/datepicker.directive.js +0 -499
- package/esm5/lib/components/datepicker/datepicker.options.js +0 -41
- package/esm5/lib/components/navigation/navigation.component.js +0 -298
- package/esm5/lib/components/sub-navigation/sub-navigation.component.js +0 -48
- package/esm5/lib/models/datepicker-options.model.js +0 -35
- package/esm5/lib/models/datepicker.model.js +0 -75
- package/esm5/lib/models/directive-options.model.js +0 -19
- package/esm5/lib/ngx-animating-datepicker.module.js +0 -39
- package/esm5/lib/services/datepicker.service.js +0 -307
- package/esm5/lib/services/utilities.service.js +0 -73
- package/esm5/ngx-animating-datepicker.js +0 -13
- package/esm5/public_api.js +0 -8
- package/fesm2015/ngx-animating-datepicker.js +0 -1886
- package/fesm2015/ngx-animating-datepicker.js.map +0 -1
- package/fesm5/ngx-animating-datepicker.js +0 -2529
- package/fesm5/ngx-animating-datepicker.js.map +0 -1
- package/lib/components/animatepicker/animatepicker.component.d.ts +0 -112
- package/lib/components/datepicker/datepicker.component.d.ts +0 -191
- package/lib/components/datepicker/datepicker.directive.d.ts +0 -92
- package/lib/components/datepicker/datepicker.options.d.ts +0 -20
- package/lib/components/navigation/navigation.component.d.ts +0 -52
- package/lib/components/sub-navigation/sub-navigation.component.d.ts +0 -8
- package/lib/models/datepicker-options.model.d.ts +0 -14
- package/lib/models/datepicker.model.d.ts +0 -29
- package/lib/models/directive-options.model.d.ts +0 -6
- package/lib/ngx-animating-datepicker.module.d.ts +0 -2
- package/lib/services/datepicker.service.d.ts +0 -77
- package/lib/services/utilities.service.d.ts +0 -12
- package/ngx-animating-datepicker.d.ts +0 -8
- package/ngx-animating-datepicker.metadata.json +0 -1
- package/public_api.d.ts +0 -5
|
@@ -0,0 +1,551 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { OnInit, ElementRef, EventEmitter, AfterViewInit, ViewContainerRef, ComponentRef, ApplicationRef, Injector, Renderer2 } from '@angular/core';
|
|
3
|
+
import { NgControl } from '@angular/forms';
|
|
4
|
+
import * as i6 from '@angular/common';
|
|
5
|
+
|
|
6
|
+
interface Options {
|
|
7
|
+
selectMultiple: boolean;
|
|
8
|
+
closeOnSelect: boolean;
|
|
9
|
+
animationSpeed: number;
|
|
10
|
+
easing: string;
|
|
11
|
+
hideRestDays: boolean;
|
|
12
|
+
hideNavigation: boolean;
|
|
13
|
+
disableRestDays: boolean;
|
|
14
|
+
range: boolean;
|
|
15
|
+
currentDate: Date;
|
|
16
|
+
timeoutBeforeClosing: number;
|
|
17
|
+
weekdayFormat: string;
|
|
18
|
+
weekStart: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface DirectiveOptions {
|
|
22
|
+
appendToBody: boolean;
|
|
23
|
+
openDirection: string;
|
|
24
|
+
closeOnBlur: boolean;
|
|
25
|
+
useAnimatePicker: boolean;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
interface Week {
|
|
29
|
+
weekNumber?: number;
|
|
30
|
+
inRange?: boolean;
|
|
31
|
+
days: Day[];
|
|
32
|
+
}
|
|
33
|
+
interface Day {
|
|
34
|
+
date: Date;
|
|
35
|
+
dayNumber: number;
|
|
36
|
+
inRange?: boolean;
|
|
37
|
+
isStartRange: boolean;
|
|
38
|
+
isEndRange: boolean;
|
|
39
|
+
inDisabled?: boolean;
|
|
40
|
+
isSelected: boolean;
|
|
41
|
+
isToday: boolean;
|
|
42
|
+
}
|
|
43
|
+
interface Month {
|
|
44
|
+
weeks: Week[];
|
|
45
|
+
}
|
|
46
|
+
interface YearMonth {
|
|
47
|
+
year: number;
|
|
48
|
+
month: number;
|
|
49
|
+
}
|
|
50
|
+
interface NavigationItem extends YearMonth {
|
|
51
|
+
navigationTitle: string | number;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
declare class UtilitiesService {
|
|
55
|
+
private static getScrollOffset;
|
|
56
|
+
static getPageOffset(el: HTMLElement): {
|
|
57
|
+
top: number;
|
|
58
|
+
left: number;
|
|
59
|
+
right: number;
|
|
60
|
+
bottom: number;
|
|
61
|
+
forRight: number;
|
|
62
|
+
forBottom: number;
|
|
63
|
+
};
|
|
64
|
+
createArray(start: number, end: number): number[];
|
|
65
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UtilitiesService, never>;
|
|
66
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<UtilitiesService>;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
declare class DatepickerComponent implements OnInit {
|
|
70
|
+
utils: UtilitiesService;
|
|
71
|
+
element: ElementRef;
|
|
72
|
+
date: Date;
|
|
73
|
+
year: number;
|
|
74
|
+
month: number;
|
|
75
|
+
today: Date;
|
|
76
|
+
months: Month[];
|
|
77
|
+
weekdays: string[];
|
|
78
|
+
totalYearMonth: YearMonth[];
|
|
79
|
+
selectedRange: string;
|
|
80
|
+
startDate: Date;
|
|
81
|
+
endDate: Date;
|
|
82
|
+
initialised: boolean;
|
|
83
|
+
private weekStartArray;
|
|
84
|
+
_options: Options;
|
|
85
|
+
set options(options: Options);
|
|
86
|
+
get options(): Options;
|
|
87
|
+
/**
|
|
88
|
+
* Set the the language manualy. A string with a BCP 47 language tag
|
|
89
|
+
* @example nl-NL
|
|
90
|
+
*/
|
|
91
|
+
_language: string;
|
|
92
|
+
set language(value: string);
|
|
93
|
+
get language(): string;
|
|
94
|
+
/**
|
|
95
|
+
* Minimal Date: If set the dates before it will be disabled
|
|
96
|
+
*/
|
|
97
|
+
_minDate: any;
|
|
98
|
+
set minDate(value: Date);
|
|
99
|
+
get minDate(): Date;
|
|
100
|
+
/**
|
|
101
|
+
* Maximal Date: If set the dates after it will be disabled
|
|
102
|
+
*/
|
|
103
|
+
_maxDate: any;
|
|
104
|
+
set maxDate(value: Date);
|
|
105
|
+
get maxDate(): Date;
|
|
106
|
+
/**
|
|
107
|
+
* Selected Dates: handles the selected dates array. Can be set both internally and externally
|
|
108
|
+
*/
|
|
109
|
+
private _selectedDates;
|
|
110
|
+
selectedDatesChange: EventEmitter<any>;
|
|
111
|
+
set selectedDates(value: Date[]);
|
|
112
|
+
get selectedDates(): Date[];
|
|
113
|
+
calendarContainer: ElementRef;
|
|
114
|
+
calendarTopContainer: ElementRef;
|
|
115
|
+
theme: string;
|
|
116
|
+
isOpen: boolean;
|
|
117
|
+
asDirective: boolean;
|
|
118
|
+
animate: boolean;
|
|
119
|
+
topPosition: number;
|
|
120
|
+
leftPosition: number;
|
|
121
|
+
bottomPosition: number;
|
|
122
|
+
rightPosition: number;
|
|
123
|
+
constructor(utils: UtilitiesService, element: ElementRef);
|
|
124
|
+
ngOnInit(): void;
|
|
125
|
+
/**
|
|
126
|
+
* Creates a day array
|
|
127
|
+
*
|
|
128
|
+
* @param year
|
|
129
|
+
* @param month
|
|
130
|
+
* @param isRestDays
|
|
131
|
+
*/
|
|
132
|
+
createDayArray(year: number, month: number, isRestDays?: boolean): Day[];
|
|
133
|
+
/**
|
|
134
|
+
* Get the days from the next month
|
|
135
|
+
*
|
|
136
|
+
* @param year
|
|
137
|
+
* @param month
|
|
138
|
+
*/
|
|
139
|
+
getNextRestDays(year: number, month: number): Day[];
|
|
140
|
+
/**
|
|
141
|
+
* Get the days of the previous month
|
|
142
|
+
*
|
|
143
|
+
* @param year
|
|
144
|
+
* @param month
|
|
145
|
+
*/
|
|
146
|
+
getPreviousRestDays(year: number, month: number): Day[];
|
|
147
|
+
/**
|
|
148
|
+
* Merge all the day arrays together
|
|
149
|
+
*
|
|
150
|
+
* @param year
|
|
151
|
+
* @param month
|
|
152
|
+
*/
|
|
153
|
+
getMergedDayArrays(year: number, month: number): Day[];
|
|
154
|
+
/**
|
|
155
|
+
* Create the calendar array from the week arrays
|
|
156
|
+
*
|
|
157
|
+
* @param year
|
|
158
|
+
* @param month
|
|
159
|
+
*/
|
|
160
|
+
createCalendarArray(year: number, month: number): [{
|
|
161
|
+
weeks: Week[];
|
|
162
|
+
}];
|
|
163
|
+
/**
|
|
164
|
+
* Update value is being triggered
|
|
165
|
+
*
|
|
166
|
+
* @param date
|
|
167
|
+
*/
|
|
168
|
+
updateValue(date: Date): void;
|
|
169
|
+
/**
|
|
170
|
+
* Select range method - contains the logic to select the start- and endrange
|
|
171
|
+
*
|
|
172
|
+
* @param date
|
|
173
|
+
*/
|
|
174
|
+
selectRange(date: Date): void;
|
|
175
|
+
/**
|
|
176
|
+
* Reset the range if the selected dates change externally
|
|
177
|
+
*/
|
|
178
|
+
resetRange(): void;
|
|
179
|
+
/**
|
|
180
|
+
* Toggle a date. One in, on out.
|
|
181
|
+
*
|
|
182
|
+
* @param date - Date to be toggled on
|
|
183
|
+
* @param toggleDate - Optional set specific date to toggle off
|
|
184
|
+
* @param unshift - Optional set to unshift in the selectedDates array. is passed to selectDate method
|
|
185
|
+
*/
|
|
186
|
+
toggleDate(date: Date, toggleDate?: Date, unshift?: boolean): void;
|
|
187
|
+
/**
|
|
188
|
+
* Select a date
|
|
189
|
+
*
|
|
190
|
+
* @param date
|
|
191
|
+
* @param unshift - Optional set to unshift instead of push the date in the selectedDates array
|
|
192
|
+
*/
|
|
193
|
+
selectDate(date: Date, unshift?: boolean): void;
|
|
194
|
+
/**
|
|
195
|
+
* Deselect a date
|
|
196
|
+
*
|
|
197
|
+
* @param date
|
|
198
|
+
*/
|
|
199
|
+
deselectDate(date: Date): void;
|
|
200
|
+
/**
|
|
201
|
+
* Go to the next month
|
|
202
|
+
*/
|
|
203
|
+
goToNextMonth(): void;
|
|
204
|
+
/**
|
|
205
|
+
* Go to the previous month
|
|
206
|
+
*/
|
|
207
|
+
goToPreviousMonth(): void;
|
|
208
|
+
/**
|
|
209
|
+
* Go to a specific month. Is also used to rerender the datepicker
|
|
210
|
+
*
|
|
211
|
+
* @param date - default is the current date.
|
|
212
|
+
*/
|
|
213
|
+
goToDate(date?: Date): void;
|
|
214
|
+
/**
|
|
215
|
+
* Render weekdays when options or language changes
|
|
216
|
+
*/
|
|
217
|
+
renderWeekdays(): void;
|
|
218
|
+
/**
|
|
219
|
+
* Set the open state to true
|
|
220
|
+
*/
|
|
221
|
+
open(): void;
|
|
222
|
+
/**
|
|
223
|
+
* Close the datepicker
|
|
224
|
+
*
|
|
225
|
+
* @param useTimeout - optional timeout
|
|
226
|
+
*/
|
|
227
|
+
close(useTimeout?: boolean): void;
|
|
228
|
+
/**
|
|
229
|
+
* Select the start date - used for range functionality
|
|
230
|
+
*/
|
|
231
|
+
selectStartDate(): void;
|
|
232
|
+
/**
|
|
233
|
+
* Select the end date - used for range functionality
|
|
234
|
+
*/
|
|
235
|
+
selectEndDate(): void;
|
|
236
|
+
/**
|
|
237
|
+
* Check if date is the start date
|
|
238
|
+
*/
|
|
239
|
+
isStartDate(date: Date): boolean;
|
|
240
|
+
/**
|
|
241
|
+
* Check if date is the end date
|
|
242
|
+
*/
|
|
243
|
+
isEndDate(date: Date): boolean;
|
|
244
|
+
/**
|
|
245
|
+
* Check if date is today
|
|
246
|
+
*/
|
|
247
|
+
isToday(date: Date): boolean;
|
|
248
|
+
/**
|
|
249
|
+
* Check if date is selected
|
|
250
|
+
*/
|
|
251
|
+
isSelected(dateToCheck: Date): boolean;
|
|
252
|
+
/**
|
|
253
|
+
* Check if date is disabled
|
|
254
|
+
*/
|
|
255
|
+
isDisabled(date: Date): boolean;
|
|
256
|
+
/**
|
|
257
|
+
* Check if date is in range
|
|
258
|
+
*/
|
|
259
|
+
isInRange(date: Date): boolean;
|
|
260
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DatepickerComponent, never>;
|
|
261
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DatepickerComponent, "aa-datepicker", never, { "options": { "alias": "options"; "required": false; }; "language": { "alias": "language"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "selectedDates": { "alias": "selectedDates"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "isOpen": { "alias": "isOpen"; "required": false; }; }, { "selectedDatesChange": "selectedDatesChange"; }, never, ["*"], false, never>;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
declare class NavigationComponent implements OnInit {
|
|
265
|
+
previousClick: EventEmitter<null>;
|
|
266
|
+
nextClick: EventEmitter<null>;
|
|
267
|
+
subNavigationClick: EventEmitter<Date>;
|
|
268
|
+
private monthFormat;
|
|
269
|
+
private set language(value);
|
|
270
|
+
private get language();
|
|
271
|
+
private _totalYearMonth;
|
|
272
|
+
set totalYearMonth(totalYearMonth: YearMonth[]);
|
|
273
|
+
transition: string;
|
|
274
|
+
translateX: number;
|
|
275
|
+
leftPosition: number;
|
|
276
|
+
hideNavigation: boolean;
|
|
277
|
+
animate: boolean;
|
|
278
|
+
private _language;
|
|
279
|
+
private initialised;
|
|
280
|
+
private formatMonth;
|
|
281
|
+
private subNavigationOpen;
|
|
282
|
+
navigationItems: NavigationItem[];
|
|
283
|
+
titles: NavigationItem[];
|
|
284
|
+
ngOnInit(): void;
|
|
285
|
+
onMonthClick(title: NavigationItem): void;
|
|
286
|
+
onYearClick(title: NavigationItem): void;
|
|
287
|
+
toggleSubNavigation(): void;
|
|
288
|
+
/**
|
|
289
|
+
* Sets the title
|
|
290
|
+
*
|
|
291
|
+
* @param totalMonthYear
|
|
292
|
+
* @param monthType
|
|
293
|
+
* @param formatMonth
|
|
294
|
+
* @returns NavigationItem[]
|
|
295
|
+
*/
|
|
296
|
+
createNavigationItems(totalMonthYear: YearMonth[], monthType?: boolean, formatMonth?: any): NavigationItem[];
|
|
297
|
+
createMonthArray(navigationItem: NavigationItem): any[];
|
|
298
|
+
/**
|
|
299
|
+
* Create an array of navigation items with year as label
|
|
300
|
+
*
|
|
301
|
+
* @param navigationItem
|
|
302
|
+
* @returns NavigationItem[]
|
|
303
|
+
*/
|
|
304
|
+
createYearArray(navigationItem: NavigationItem): NavigationItem[];
|
|
305
|
+
onSubNavigationClick(date: Date): void;
|
|
306
|
+
/**
|
|
307
|
+
* Emits previous click event
|
|
308
|
+
*/
|
|
309
|
+
previous(): void;
|
|
310
|
+
/**
|
|
311
|
+
* Emits next click event
|
|
312
|
+
*/
|
|
313
|
+
next(): void;
|
|
314
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NavigationComponent, never>;
|
|
315
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NavigationComponent, "aa-navigation", never, { "monthFormat": { "alias": "monthFormat"; "required": false; }; "language": { "alias": "language"; "required": false; }; "totalYearMonth": { "alias": "totalYearMonth"; "required": false; }; "transition": { "alias": "transition"; "required": false; }; "translateX": { "alias": "translateX"; "required": false; }; "leftPosition": { "alias": "leftPosition"; "required": false; }; "hideNavigation": { "alias": "hideNavigation"; "required": false; }; "animate": { "alias": "animate"; "required": false; }; }, { "previousClick": "previousClick"; "nextClick": "nextClick"; "subNavigationClick": "subNavigationClick"; }, never, never, false, never>;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
declare class AnimatepickerComponent extends DatepickerComponent implements OnInit, AfterViewInit {
|
|
319
|
+
elementRef: ElementRef;
|
|
320
|
+
utilities: UtilitiesService;
|
|
321
|
+
animate: boolean;
|
|
322
|
+
initialWidth: number;
|
|
323
|
+
calendarWidth: number;
|
|
324
|
+
isAnimating: boolean;
|
|
325
|
+
leftInnerPosition: number;
|
|
326
|
+
transition: string;
|
|
327
|
+
translateX: number;
|
|
328
|
+
datepickerPosition: object;
|
|
329
|
+
initialised: boolean;
|
|
330
|
+
calendarHeight: number;
|
|
331
|
+
private _currentYearMonth;
|
|
332
|
+
set currentYearMonth(yearMonths: YearMonth[]);
|
|
333
|
+
get currentYearMonth(): YearMonth[];
|
|
334
|
+
/**
|
|
335
|
+
* Number of months: the number of months displayed
|
|
336
|
+
*/
|
|
337
|
+
private _numberOfMonths;
|
|
338
|
+
set numberOfMonths(value: Number[]);
|
|
339
|
+
get numberOfMonths(): Number[];
|
|
340
|
+
navigate: EventEmitter<YearMonth[]>;
|
|
341
|
+
calendarContainer: ElementRef;
|
|
342
|
+
calendarTopContainer: ElementRef;
|
|
343
|
+
footer: ElementRef;
|
|
344
|
+
datepickerWidth: number;
|
|
345
|
+
datepickerHeight: number;
|
|
346
|
+
constructor(elementRef: ElementRef, utilities: UtilitiesService);
|
|
347
|
+
ngOnInit(): void;
|
|
348
|
+
ngAfterViewInit(): void;
|
|
349
|
+
/**
|
|
350
|
+
* Set the height and the width properties
|
|
351
|
+
*/
|
|
352
|
+
setDatePickerDimension(): void;
|
|
353
|
+
/**
|
|
354
|
+
* Go to a specific month
|
|
355
|
+
*
|
|
356
|
+
* @param date - optional
|
|
357
|
+
*/
|
|
358
|
+
goToDate(date?: Date): void;
|
|
359
|
+
/**
|
|
360
|
+
* Create an array of the next year and months
|
|
361
|
+
*
|
|
362
|
+
* @param year
|
|
363
|
+
* @param month
|
|
364
|
+
*/
|
|
365
|
+
getNextYearMonthArray(year: number, month: number): YearMonth[];
|
|
366
|
+
/**
|
|
367
|
+
* Create an array of the previous year and months
|
|
368
|
+
*
|
|
369
|
+
* @param year
|
|
370
|
+
* @param month
|
|
371
|
+
*/
|
|
372
|
+
getPreviousYearMonthArray(year: number, month: number): YearMonth[];
|
|
373
|
+
/**
|
|
374
|
+
* Set the datepicker height, used when animating
|
|
375
|
+
*
|
|
376
|
+
* @param directionRight - Set optional when sliding to the right
|
|
377
|
+
*/
|
|
378
|
+
setDatepickerHeight(directionRight?: boolean): void;
|
|
379
|
+
/**
|
|
380
|
+
* Get next month array, gets multiple months.
|
|
381
|
+
* Used when the options animate is set or multiple months are visable
|
|
382
|
+
*
|
|
383
|
+
* @return Month[]
|
|
384
|
+
*/
|
|
385
|
+
getNextMonthArray(currentYearMonth: any, keepDate?: boolean, nextMonthsYearMonthArray?: any): Month[];
|
|
386
|
+
/**
|
|
387
|
+
* Gets an array of previous months.
|
|
388
|
+
* Used for animation and when more months are displayed
|
|
389
|
+
*
|
|
390
|
+
* @param currentYearMonth
|
|
391
|
+
* @param keepDate
|
|
392
|
+
*/
|
|
393
|
+
getPreviousMonthArray(currentYearMonth: any, keepDate?: boolean): Month[];
|
|
394
|
+
/**
|
|
395
|
+
* Update value is being triggered
|
|
396
|
+
*
|
|
397
|
+
* @param date
|
|
398
|
+
*/
|
|
399
|
+
updateValue(date: Date): void;
|
|
400
|
+
/**
|
|
401
|
+
* Go to the next month
|
|
402
|
+
*/
|
|
403
|
+
goToNextMonth(): void;
|
|
404
|
+
/**
|
|
405
|
+
* Go to the previous month
|
|
406
|
+
*/
|
|
407
|
+
goToPreviousMonth(): void;
|
|
408
|
+
/**
|
|
409
|
+
* Go to a specific month
|
|
410
|
+
* TODO: WIP Check if date is in current range, or if it is later or earlier
|
|
411
|
+
*/
|
|
412
|
+
goToMonth(date: Date): void;
|
|
413
|
+
/**
|
|
414
|
+
* Slide to the right
|
|
415
|
+
*/
|
|
416
|
+
slideRight(): void;
|
|
417
|
+
/**
|
|
418
|
+
* Slide to the left (criss cross)
|
|
419
|
+
*/
|
|
420
|
+
slideLeft(): void;
|
|
421
|
+
/**
|
|
422
|
+
* Set animating state
|
|
423
|
+
*/
|
|
424
|
+
setIsAnimating(): void;
|
|
425
|
+
/**
|
|
426
|
+
* Reset Style
|
|
427
|
+
*
|
|
428
|
+
* @param resetForPrevious - Optional
|
|
429
|
+
*/
|
|
430
|
+
resetStyle(resetForPrevious?: boolean): void;
|
|
431
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AnimatepickerComponent, never>;
|
|
432
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AnimatepickerComponent, "aa-animatepicker", never, { "numberOfMonths": { "alias": "numberOfMonths"; "required": false; }; }, { "navigate": "navigate"; }, never, ["header", "footer"], false, never>;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
declare class DatepickerDirective {
|
|
436
|
+
viewContainerRef: ViewContainerRef;
|
|
437
|
+
private appRef;
|
|
438
|
+
private injector;
|
|
439
|
+
private renderer;
|
|
440
|
+
formControl: NgControl;
|
|
441
|
+
datepicker: any;
|
|
442
|
+
datepickerRef: ComponentRef<DatepickerComponent | AnimatepickerComponent> | null;
|
|
443
|
+
clickListener: any;
|
|
444
|
+
_options: {
|
|
445
|
+
appendToBody: boolean;
|
|
446
|
+
openDirection: string;
|
|
447
|
+
closeOnBlur: boolean;
|
|
448
|
+
useAnimatePicker: boolean;
|
|
449
|
+
};
|
|
450
|
+
set options(options: DirectiveOptions);
|
|
451
|
+
get options(): DirectiveOptions;
|
|
452
|
+
private _datepickerOptions;
|
|
453
|
+
set datepickerOptions(options: Options);
|
|
454
|
+
get datepickerOptions(): Options;
|
|
455
|
+
/**
|
|
456
|
+
* Set the the language manualy. A string with a BCP 47 language tag
|
|
457
|
+
* @example nl-NL
|
|
458
|
+
*/
|
|
459
|
+
private _language;
|
|
460
|
+
set language(value: string);
|
|
461
|
+
get language(): string;
|
|
462
|
+
/**
|
|
463
|
+
* Minimal Date: If set the dates before it will be disabled
|
|
464
|
+
*/
|
|
465
|
+
private _minDate;
|
|
466
|
+
set minDate(value: Date);
|
|
467
|
+
get minDate(): Date;
|
|
468
|
+
/**
|
|
469
|
+
* Maximal Date: If set the dates after it will be disabled
|
|
470
|
+
*/
|
|
471
|
+
private _maxDate;
|
|
472
|
+
set maxDate(value: Date);
|
|
473
|
+
get maxDate(): Date;
|
|
474
|
+
/**
|
|
475
|
+
* Number of months: the number of months displayed
|
|
476
|
+
*/
|
|
477
|
+
private _numberOfMonths;
|
|
478
|
+
set numberOfMonths(value: any);
|
|
479
|
+
get numberOfMonths(): any;
|
|
480
|
+
/**
|
|
481
|
+
* Theme string is added to the host
|
|
482
|
+
*/
|
|
483
|
+
private _theme;
|
|
484
|
+
set theme(value: any);
|
|
485
|
+
get theme(): any;
|
|
486
|
+
/**
|
|
487
|
+
* The open state
|
|
488
|
+
*/
|
|
489
|
+
private _isOpen;
|
|
490
|
+
set isOpen(value: any);
|
|
491
|
+
get isOpen(): any;
|
|
492
|
+
/**
|
|
493
|
+
* Selected Dates: handles the selected dates array. Can be set both internally and externally
|
|
494
|
+
*/
|
|
495
|
+
private _selectedDates;
|
|
496
|
+
selectedDatesChange: EventEmitter<any>;
|
|
497
|
+
set selectedDates(value: Date[]);
|
|
498
|
+
get selectedDates(): Date[];
|
|
499
|
+
onClick(): void;
|
|
500
|
+
constructor(viewContainerRef: ViewContainerRef, appRef: ApplicationRef, injector: Injector, renderer: Renderer2, formControl: NgControl);
|
|
501
|
+
/**
|
|
502
|
+
* Add selected changes
|
|
503
|
+
*/
|
|
504
|
+
subscribeToSelectedChanges(): void;
|
|
505
|
+
/**
|
|
506
|
+
* Set all the options and inputs of the datepicker
|
|
507
|
+
*/
|
|
508
|
+
setDatepickerOptionsAndInputs(): void;
|
|
509
|
+
/**
|
|
510
|
+
* Handles the (faked) blur event
|
|
511
|
+
*
|
|
512
|
+
* @param event
|
|
513
|
+
*/
|
|
514
|
+
onBlurHandler(event: Event): void;
|
|
515
|
+
/**
|
|
516
|
+
* Returns a create DatepickerComponent method
|
|
517
|
+
*/
|
|
518
|
+
createDatepicker(): any;
|
|
519
|
+
/**
|
|
520
|
+
* Sets the position of the datepicker
|
|
521
|
+
*/
|
|
522
|
+
setPosition(): void;
|
|
523
|
+
/**
|
|
524
|
+
* Appends the DatepickerComponent to the body and returns the instance
|
|
525
|
+
*/
|
|
526
|
+
appendToBody(): any;
|
|
527
|
+
/**
|
|
528
|
+
* Appends the DatepickerComponent to the container and returns the instance
|
|
529
|
+
*/
|
|
530
|
+
appendToContainer(): any;
|
|
531
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DatepickerDirective, [null, null, null, null, { optional: true; }]>;
|
|
532
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DatepickerDirective, "[aaDatepicker]", never, { "options": { "alias": "aaDatepicker"; "required": false; }; "datepickerOptions": { "alias": "options"; "required": false; }; "language": { "alias": "language"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "numberOfMonths": { "alias": "numberOfMonths"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "isOpen": { "alias": "isOpen"; "required": false; }; "selectedDates": { "alias": "selectedDates"; "required": false; }; }, { "selectedDatesChange": "selectedDatesChange"; }, never, never, false, never>;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
declare class SubNavigationComponent {
|
|
536
|
+
close: EventEmitter<null>;
|
|
537
|
+
subNavigationClick: EventEmitter<Date>;
|
|
538
|
+
navigationItems: NavigationItem[];
|
|
539
|
+
onItemCLick(navigationItem: NavigationItem): void;
|
|
540
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SubNavigationComponent, never>;
|
|
541
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SubNavigationComponent, "aa-sub-navigation", never, { "navigationItems": { "alias": "navigationItems"; "required": false; }; }, { "close": "close"; "subNavigationClick": "subNavigationClick"; }, never, never, false, never>;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
declare class AaDatepickerModule {
|
|
545
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AaDatepickerModule, never>;
|
|
546
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AaDatepickerModule, [typeof DatepickerComponent, typeof NavigationComponent, typeof AnimatepickerComponent, typeof DatepickerDirective, typeof SubNavigationComponent], [typeof i6.CommonModule], [typeof DatepickerComponent, typeof NavigationComponent, typeof AnimatepickerComponent, typeof DatepickerDirective]>;
|
|
547
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AaDatepickerModule>;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
export { AaDatepickerModule, AnimatepickerComponent, DatepickerComponent, DatepickerDirective, NavigationComponent };
|
|
551
|
+
export type { DirectiveOptions, Options };
|