UNPKG

4.89 kBTypeScriptView Raw
1/**
2 * @license
3 * Copyright Akveo. All Rights Reserved.
4 * Licensed under the MIT License. See License.txt in the project root for license information.
5 */
6import { EventEmitter, OnInit, Type } from '@angular/core';
7import { NbCalendarYearModelService } from '../calendar-kit/services/calendar-year-model.service';
8import { NbCalendarCell, NbCalendarSize, NbCalendarViewMode, NbCalendarSizeValues, NbCalendarViewModeValues } from '../calendar-kit/model';
9import { NbDateService } from '../calendar-kit/services/date.service';
10import { NbBooleanInput } from '../helpers';
11import * as i0 from "@angular/core";
12/**
13 * The basis for calendar and range calendar components.
14 * Encapsulates common behavior - store calendar state and perform navigation
15 * between pickers.
16 * */
17export declare class NbBaseCalendarComponent<D, T> implements OnInit {
18 protected dateService: NbDateService<D>;
19 protected yearModelService: NbCalendarYearModelService<D>;
20 /**
21 * Defines if we should render previous and next months
22 * in the current month view.
23 * */
24 boundingMonth: boolean;
25 /**
26 * Defines active view for calendar.
27 * */
28 activeViewMode: NbCalendarViewMode;
29 static ngAcceptInputType_activeViewMode: NbCalendarViewModeValues;
30 /**
31 * Minimum available date for selection.
32 * */
33 min: D;
34 /**
35 * Maximum available date for selection.
36 * */
37 max: D;
38 /**
39 * Predicate that decides which cells will be disabled.
40 * */
41 filter: (D: any) => boolean;
42 /**
43 * Custom day cell component. Have to implement `NbCalendarCell` interface.
44 * */
45 dayCellComponent: Type<NbCalendarCell<D, T>>;
46 /**
47 * Custom month cell component. Have to implement `NbCalendarCell` interface.
48 * */
49 monthCellComponent: Type<NbCalendarCell<D, T>>;
50 /**
51 * Custom year cell component. Have to implement `NbCalendarCell` interface.
52 * */
53 yearCellComponent: Type<NbCalendarCell<D, T>>;
54 /**
55 * Size of the calendar and entire components.
56 * Can be 'medium' which is default or 'large'.
57 * */
58 size: NbCalendarSize;
59 static ngAcceptInputType_size: NbCalendarSizeValues;
60 visibleDate: D;
61 /**
62 * Determines whether we should show calendar navigation or not.
63 * */
64 showNavigation: boolean;
65 /**
66 * Value which will be rendered as selected.
67 * */
68 date: T;
69 /**
70 * Determines should we show week numbers column.
71 * False by default.
72 * */
73 get showWeekNumber(): boolean;
74 set showWeekNumber(value: boolean);
75 protected _showWeekNumber: boolean;
76 static ngAcceptInputType_showWeekNumber: NbBooleanInput;
77 /**
78 * Sets symbol used as a header for week numbers column
79 * */
80 weekNumberSymbol: string;
81 /**
82 * Sets first day of the week, it can be 1 if week starts from monday and 0 if from sunday and so on.
83 * `undefined` means that default locale setting will be used.
84 * */
85 firstDayOfWeek: number | undefined;
86 /**
87 * Emits date when selected.
88 * */
89 dateChange: EventEmitter<T>;
90 constructor(dateService: NbDateService<D>, yearModelService: NbCalendarYearModelService<D>);
91 ngOnInit(): void;
92 get large(): boolean;
93 ViewMode: typeof NbCalendarViewMode;
94 setViewMode(viewMode: NbCalendarViewMode): void;
95 setVisibleDate(visibleDate: D): void;
96 prevMonth(): void;
97 nextMonth(): void;
98 prevYear(): void;
99 nextYear(): void;
100 prevYears(): void;
101 nextYears(): void;
102 navigatePrev(): void;
103 navigateNext(): void;
104 onChangeViewMode(): void;
105 private changeVisibleMonth;
106 private changeVisibleYear;
107 private changeVisibleYears;
108 static ɵfac: i0.ɵɵFactoryDeclaration<NbBaseCalendarComponent<any, any>, never>;
109 static ɵcmp: i0.ɵɵComponentDeclaration<NbBaseCalendarComponent<any, any>, "nb-base-calendar", never, { "boundingMonth": { "alias": "boundingMonth"; "required": false; }; "activeViewMode": { "alias": "startView"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "dayCellComponent": { "alias": "dayCellComponent"; "required": false; }; "monthCellComponent": { "alias": "monthCellComponent"; "required": false; }; "yearCellComponent": { "alias": "yearCellComponent"; "required": false; }; "size": { "alias": "size"; "required": false; }; "visibleDate": { "alias": "visibleDate"; "required": false; }; "showNavigation": { "alias": "showNavigation"; "required": false; }; "date": { "alias": "date"; "required": false; }; "showWeekNumber": { "alias": "showWeekNumber"; "required": false; }; "weekNumberSymbol": { "alias": "weekNumberSymbol"; "required": false; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; }; }, { "dateChange": "dateChange"; }, never, never, false, never>;
110}