1 | import { TranslationWidth } from '@angular/common';
|
2 | import { NgbDateStruct } from './ngb-date-struct';
|
3 | import * as i0 from "@angular/core";
|
4 | export declare function NGB_DATEPICKER_18N_FACTORY(locale: any): NgbDatepickerI18nDefault;
|
5 | /**
|
6 | * A service supplying i18n data to the datepicker component.
|
7 | *
|
8 | * The default implementation of this service uses the Angular locale and registered locale data for
|
9 | * weekdays and month names (as explained in the Angular i18n guide).
|
10 | *
|
11 | * It also provides a way to i18n data that depends on calendar calculations, like aria labels, day, week and year
|
12 | * numerals. For other static labels the datepicker uses the default Angular i18n.
|
13 | *
|
14 | * See the [i18n demo](#/components/datepicker/examples#i18n) and
|
15 | * [Hebrew calendar demo](#/components/datepicker/calendars#hebrew) on how to extend this class and define
|
16 | * a custom provider for i18n.
|
17 | */
|
18 | export declare abstract class NgbDatepickerI18n {
|
19 | /**
|
20 | * Returns the weekday label using specified width
|
21 | *
|
22 | * @since 9.1.0
|
23 | */
|
24 | abstract getWeekdayLabel(weekday: number, width?: TranslationWidth): string;
|
25 | /**
|
26 | * Returns the short month name to display in the date picker navigation.
|
27 | *
|
28 | * With default calendar we use ISO 8601: 'month' is 1=Jan ... 12=Dec.
|
29 | */
|
30 | abstract getMonthShortName(month: number, year?: number): string;
|
31 | /**
|
32 | * Returns the full month name to display in the date picker navigation.
|
33 | *
|
34 | * With default calendar we use ISO 8601: 'month' is 1=Jan ... 12=Dec.
|
35 | */
|
36 | abstract getMonthFullName(month: number, year?: number): string;
|
37 | /**
|
38 | * Returns the text label to display above the day view.
|
39 | *
|
40 | * @since 9.1.0
|
41 | */
|
42 | getMonthLabel(date: NgbDateStruct): string;
|
43 | /**
|
44 | * Returns the value of the `aria-label` attribute for a specific date.
|
45 | *
|
46 | * @since 2.0.0
|
47 | */
|
48 | abstract getDayAriaLabel(date: NgbDateStruct): string;
|
49 | /**
|
50 | * Returns the textual representation of a day that is rendered in a day cell.
|
51 | *
|
52 | * @since 3.0.0
|
53 | */
|
54 | getDayNumerals(date: NgbDateStruct): string;
|
55 | /**
|
56 | * Returns the textual representation of a week number rendered by datepicker.
|
57 | *
|
58 | * @since 3.0.0
|
59 | */
|
60 | getWeekNumerals(weekNumber: number): string;
|
61 | /**
|
62 | * Returns the textual representation of a year that is rendered in the datepicker year select box.
|
63 | *
|
64 | * @since 3.0.0
|
65 | */
|
66 | getYearNumerals(year: number): string;
|
67 | /**
|
68 | * Returns the week label to display in the heading of the month view.
|
69 | *
|
70 | * @since 9.1.0
|
71 | */
|
72 | getWeekLabel(): string;
|
73 | static ɵfac: i0.ɵɵFactoryDeclaration<NgbDatepickerI18n, never>;
|
74 | static ɵprov: i0.ɵɵInjectableDeclaration<NgbDatepickerI18n>;
|
75 | }
|
76 | /**
|
77 | * A service providing default implementation for the datepicker i18n.
|
78 | * It can be used as a base implementation if necessary.
|
79 | *
|
80 | * @since 9.1.0
|
81 | */
|
82 | export declare class NgbDatepickerI18nDefault extends NgbDatepickerI18n {
|
83 | private _locale;
|
84 | private _monthsShort;
|
85 | private _monthsFull;
|
86 | constructor(_locale: string);
|
87 | getWeekdayLabel(weekday: number, width?: TranslationWidth): string;
|
88 | getMonthShortName(month: number): string;
|
89 | getMonthFullName(month: number): string;
|
90 | getDayAriaLabel(date: NgbDateStruct): string;
|
91 | static ɵfac: i0.ɵɵFactoryDeclaration<NgbDatepickerI18nDefault, never>;
|
92 | static ɵprov: i0.ɵɵInjectableDeclaration<NgbDatepickerI18nDefault>;
|
93 | }
|