@nanahoshi/mona-ui 0.19.0 → 0.20.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/THIRD_PARTY_NOTICES.md +60 -0
- package/fesm2022/nanahoshi-mona-ui-calendar.mjs +120 -99
- package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +16 -10
- package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +24 -14
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-cell.component-Bg7rckst.mjs → nanahoshi-mona-ui-grid-grid-footer-cell.component-BuybF7tX.mjs} +2 -2
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-BSSpaCLL.mjs → nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-Dj-SaNzk.mjs} +2 -2
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-D9AwQFDV.mjs → nanahoshi-mona-ui-grid-grid-list.component-CYAm4l84.mjs} +5 -5
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-toggle.component-Byb9iTes.mjs → nanahoshi-mona-ui-grid-grid-toggle.component-B_Gm--X6.mjs} +28 -17
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-CBmdtrXm.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-X0X487Rm.mjs} +5 -5
- package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-DPmJmCap.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CyzJFQIy.mjs} +18 -9
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-i18n.mjs +3722 -16
- package/fesm2022/nanahoshi-mona-ui-locales.mjs +4973 -0
- package/fesm2022/nanahoshi-mona-ui-pager.mjs +23 -13
- package/fesm2022/nanahoshi-mona-ui-stepper.mjs +14 -5
- package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +22 -13
- package/locales/package.json +4 -0
- package/package.json +5 -1
- package/types/nanahoshi-mona-ui-calendar.d.ts +25 -21
- package/types/nanahoshi-mona-ui-date-picker.d.ts +7 -4
- package/types/nanahoshi-mona-ui-datetime-picker.d.ts +8 -5
- package/types/nanahoshi-mona-ui-grid.d.ts +12 -1
- package/types/nanahoshi-mona-ui-i18n.d.ts +49 -2
- package/types/nanahoshi-mona-ui-locales.d.ts +4889 -0
- package/types/nanahoshi-mona-ui-pager.d.ts +1 -0
- package/types/nanahoshi-mona-ui-stepper.d.ts +2 -1
- package/types/nanahoshi-mona-ui-time-picker.d.ts +4 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _mirei_ts_collections from '@mirei/ts-collections';
|
|
2
|
-
import * as _angular_core from '@angular/core';
|
|
3
|
-
import { TemplateRef } from '@angular/core';
|
|
4
2
|
import * as _nanahoshi_mona_ui_i18n from '@nanahoshi/mona-ui/i18n';
|
|
5
3
|
import { MonaCalendarMessages } from '@nanahoshi/mona-ui/i18n';
|
|
4
|
+
import * as _angular_core from '@angular/core';
|
|
5
|
+
import { TemplateRef } from '@angular/core';
|
|
6
6
|
import { FormValueControl } from '@angular/forms/signals';
|
|
7
7
|
import { CalendarView, DateDisabledType } from '@nanahoshi/mona-ui/date-input';
|
|
8
8
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
@@ -56,7 +56,7 @@ declare class CalendarYearCellTemplateDirective {
|
|
|
56
56
|
|
|
57
57
|
type CalendarSelection = "multiple" | "range" | "single";
|
|
58
58
|
|
|
59
|
-
type FirstDayOfWeek = "monday" | "sunday";
|
|
59
|
+
type FirstDayOfWeek = "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday";
|
|
60
60
|
|
|
61
61
|
declare const calendarBaseThemeVariants: (props?: ({
|
|
62
62
|
disabled?: boolean | null | undefined;
|
|
@@ -108,7 +108,6 @@ type CalendarVariantInput = CalendarBaseVariantInput & CalendarHeaderVariantInpu
|
|
|
108
108
|
|
|
109
109
|
declare class CalendarComponent implements CalendarVariantInput, FormValueControl<Date | Date[] | null> {
|
|
110
110
|
#private;
|
|
111
|
-
protected readonly messages: _angular_core.Signal<_nanahoshi_mona_ui_i18n.MonaCalendarMessages>;
|
|
112
111
|
protected readonly ariaLabel: _angular_core.Signal<string>;
|
|
113
112
|
protected readonly baseClass: _angular_core.Signal<string>;
|
|
114
113
|
protected readonly calendarView: _angular_core.WritableSignal<CalendarView>;
|
|
@@ -117,9 +116,13 @@ declare class CalendarComponent implements CalendarVariantInput, FormValueContro
|
|
|
117
116
|
protected readonly decadeGridClass: _angular_core.Signal<string>;
|
|
118
117
|
protected readonly decadeStart: _angular_core.Signal<number>;
|
|
119
118
|
protected readonly decadeYears: _angular_core.Signal<number[][]>;
|
|
119
|
+
protected readonly effectiveFirstDay: _angular_core.Signal<FirstDayOfWeek>;
|
|
120
120
|
protected readonly gridId: string;
|
|
121
121
|
protected readonly headerClass: _angular_core.Signal<string>;
|
|
122
|
+
protected readonly headerMonthYear: _angular_core.Signal<string>;
|
|
123
|
+
protected readonly headerYear: _angular_core.Signal<string>;
|
|
122
124
|
protected readonly invalidState: _angular_core.Signal<boolean>;
|
|
125
|
+
protected readonly messages: _angular_core.Signal<_nanahoshi_mona_ui_i18n.MonaCalendarMessages>;
|
|
123
126
|
protected readonly monthBounds: _angular_core.Signal<{
|
|
124
127
|
start: Date;
|
|
125
128
|
end: Date;
|
|
@@ -128,13 +131,11 @@ declare class CalendarComponent implements CalendarVariantInput, FormValueContro
|
|
|
128
131
|
protected readonly monthDictChunked: _angular_core.Signal<_mirei_ts_collections.ImmutableSet<_mirei_ts_collections.ImmutableDictionary<Date, number>>>;
|
|
129
132
|
protected readonly monthGridClass: _angular_core.Signal<string>;
|
|
130
133
|
protected readonly monthGridHeaderClass: _angular_core.Signal<string>;
|
|
131
|
-
protected readonly headerMonthYear: _angular_core.Signal<string>;
|
|
132
|
-
protected readonly headerYear: _angular_core.Signal<string>;
|
|
133
134
|
protected readonly months: _angular_core.Signal<_mirei_ts_collections.ImmutableSet<_mirei_ts_collections.ImmutableSet<readonly [number, string]>>>;
|
|
134
135
|
protected readonly navigatedDate: _angular_core.WritableSignal<Date>;
|
|
135
136
|
protected readonly nextButtonLabel: _angular_core.Signal<string>;
|
|
136
|
-
protected readonly prevButtonLabel: _angular_core.Signal<string>;
|
|
137
137
|
protected readonly pendingRangeStart: _angular_core.WritableSignal<Date | null>;
|
|
138
|
+
protected readonly prevButtonLabel: _angular_core.Signal<string>;
|
|
138
139
|
protected readonly rangePreviewDate: _angular_core.WritableSignal<Date | null>;
|
|
139
140
|
protected readonly rangePreviewDates: _angular_core.Signal<Date[]>;
|
|
140
141
|
protected readonly selectedDates: _angular_core.WritableSignal<Date[]>;
|
|
@@ -142,7 +143,9 @@ declare class CalendarComponent implements CalendarVariantInput, FormValueContro
|
|
|
142
143
|
protected readonly todayButtonLabel: _angular_core.Signal<string>;
|
|
143
144
|
protected readonly viewSwitchButtonLabel: _angular_core.Signal<string>;
|
|
144
145
|
protected readonly weekdays: _angular_core.Signal<{
|
|
146
|
+
display: string;
|
|
145
147
|
short: string;
|
|
148
|
+
narrow: string;
|
|
146
149
|
full: string;
|
|
147
150
|
}[]>;
|
|
148
151
|
protected readonly yearCellTemplate: _angular_core.Signal<CalendarYearCellTemplateDirective | undefined>;
|
|
@@ -157,10 +160,10 @@ declare class CalendarComponent implements CalendarVariantInput, FormValueContro
|
|
|
157
160
|
*/
|
|
158
161
|
readonly disabledDates: _angular_core.InputSignal<DateDisabledType>;
|
|
159
162
|
/**
|
|
160
|
-
* @description Sets the first day of the week.
|
|
161
|
-
* @default
|
|
163
|
+
* @description Sets the first day of the week. If not specified, derives from the active locale.
|
|
164
|
+
* @default null
|
|
162
165
|
*/
|
|
163
|
-
readonly firstDay: _angular_core.InputSignal<FirstDayOfWeek>;
|
|
166
|
+
readonly firstDay: _angular_core.InputSignal<FirstDayOfWeek | null>;
|
|
164
167
|
/**
|
|
165
168
|
* @description Marks the calendar as invalid. When bound to a signal form field via `[formField]`,
|
|
166
169
|
* this is written by the `FormField` directive.
|
|
@@ -180,6 +183,12 @@ declare class CalendarComponent implements CalendarVariantInput, FormValueContro
|
|
|
180
183
|
* @default false
|
|
181
184
|
*/
|
|
182
185
|
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
186
|
+
/**
|
|
187
|
+
* @description Sets whether the calendar is required. When bound to a signal form field via `[formField]`,
|
|
188
|
+
* this is written by the `FormField` directive.
|
|
189
|
+
* @default false
|
|
190
|
+
*/
|
|
191
|
+
readonly required: _angular_core.InputSignal<boolean>;
|
|
183
192
|
/**
|
|
184
193
|
* @description Sets the border radius of the calendar.
|
|
185
194
|
* @default "medium"
|
|
@@ -195,12 +204,6 @@ declare class CalendarComponent implements CalendarVariantInput, FormValueContro
|
|
|
195
204
|
* The `FormField` directive listens to this to mark the field as touched.
|
|
196
205
|
*/
|
|
197
206
|
readonly touch: _angular_core.OutputEmitterRef<void>;
|
|
198
|
-
/**
|
|
199
|
-
* @description Sets whether the calendar is required. When bound to a signal form field via `[formField]`,
|
|
200
|
-
* this is written by the `FormField` directive.
|
|
201
|
-
* @default false
|
|
202
|
-
*/
|
|
203
|
-
readonly required: _angular_core.InputSignal<boolean>;
|
|
204
207
|
/**
|
|
205
208
|
* @description Sets the touched state of the calendar. When bound to a signal form field via `[formField]`,
|
|
206
209
|
* this is written by the `FormField` directive.
|
|
@@ -222,18 +225,19 @@ declare class CalendarComponent implements CalendarVariantInput, FormValueContro
|
|
|
222
225
|
*/
|
|
223
226
|
readonly weekNumber: _angular_core.InputSignal<boolean>;
|
|
224
227
|
constructor();
|
|
228
|
+
protected formatInteger(value: number): string;
|
|
229
|
+
protected getWeekNumber(date: Date): number;
|
|
225
230
|
protected onDayClick(date: Date, event: MouseEvent): void;
|
|
226
231
|
protected onDayPointerEnter(date: Date): void;
|
|
227
232
|
protected onMonthClick(month: number): void;
|
|
228
233
|
protected onMonthGridPointerLeave(): void;
|
|
229
234
|
protected onNavigationClick(direction: "prev" | "next"): void;
|
|
230
|
-
protected getWeekNumber(date: Date): number;
|
|
231
235
|
protected onTodayButtonClick(): void;
|
|
232
236
|
protected onViewChangeClick(view: CalendarView): void;
|
|
233
237
|
protected onYearClick(year: number): void;
|
|
234
|
-
private extendSelection;
|
|
235
238
|
private clearPendingRange;
|
|
236
239
|
private commitUserSelection;
|
|
240
|
+
private extendSelection;
|
|
237
241
|
private focusActiveCell;
|
|
238
242
|
private getDateArray;
|
|
239
243
|
private getDatesForMultipleSelection;
|
|
@@ -243,10 +247,10 @@ declare class CalendarComponent implements CalendarVariantInput, FormValueContro
|
|
|
243
247
|
private handleMultipleSelectionKeyboard;
|
|
244
248
|
private handleRangeSelection;
|
|
245
249
|
private handleSingleSelection;
|
|
246
|
-
private isDateDisabled;
|
|
247
|
-
private isEmptyValue;
|
|
248
250
|
private horizontalCellDelta;
|
|
249
251
|
private horizontalPeriodDirection;
|
|
252
|
+
private isDateDisabled;
|
|
253
|
+
private isEmptyValue;
|
|
250
254
|
private navigateByDaysOrCells;
|
|
251
255
|
private navigateByPeriod;
|
|
252
256
|
private navigateByWeeksOrRows;
|
|
@@ -262,7 +266,7 @@ declare class CalendarComponent implements CalendarVariantInput, FormValueContro
|
|
|
262
266
|
private switchToUpperView;
|
|
263
267
|
private toggleFocusedDateInSelection;
|
|
264
268
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CalendarComponent, never>;
|
|
265
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CalendarComponent, "mona-calendar", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "disabledDates": { "alias": "disabledDates"; "required": false; "isSignal": true; }; "firstDay": { "alias": "firstDay"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "
|
|
269
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CalendarComponent, "mona-calendar", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "disabledDates": { "alias": "disabledDates"; "required": false; "isSignal": true; }; "firstDay": { "alias": "firstDay"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "weekNumber": { "alias": "weekNumber"; "required": false; "isSignal": true; }; }, { "disabled": "disabledChange"; "touch": "touch"; "value": "valueChange"; }, ["decadeCellTemplate", "monthCellTemplate", "yearCellTemplate"], never, true, never>;
|
|
266
270
|
}
|
|
267
271
|
|
|
268
272
|
declare const CALENDAR_DEFAULT_MESSAGES: MonaCalendarMessages;
|
|
@@ -29,6 +29,7 @@ declare class DatePickerComponent implements FormValueControl<Date | null>, Drop
|
|
|
29
29
|
protected readonly baseClass: _angular_core.Signal<string>;
|
|
30
30
|
protected readonly currentDateString: _angular_core.WritableSignal<string>;
|
|
31
31
|
protected readonly decadeCellTemplate: _angular_core.Signal<CalendarDecadeCellTemplateDirective | undefined>;
|
|
32
|
+
protected readonly effectiveFormat: _angular_core.Signal<string>;
|
|
32
33
|
protected readonly expanded: _angular_core.Signal<boolean>;
|
|
33
34
|
protected readonly inputAttributes: _angular_core.Signal<AttributeConfig>;
|
|
34
35
|
protected readonly invalidState: _angular_core.Signal<boolean>;
|
|
@@ -58,13 +59,15 @@ declare class DatePickerComponent implements FormValueControl<Date | null>, Drop
|
|
|
58
59
|
*/
|
|
59
60
|
readonly disabledDates: _angular_core.InputSignal<DateDisabledType>;
|
|
60
61
|
/**
|
|
61
|
-
* @description Sets the first day of the week.
|
|
62
|
+
* @description Sets the first day of the week. If not specified, derives from the active locale.
|
|
63
|
+
* @default null
|
|
62
64
|
*/
|
|
63
|
-
readonly firstDay: _angular_core.InputSignal<FirstDayOfWeek>;
|
|
65
|
+
readonly firstDay: _angular_core.InputSignal<FirstDayOfWeek | null>;
|
|
64
66
|
/**
|
|
65
|
-
* @description Sets the date format of the date picker.
|
|
67
|
+
* @description Sets the date format of the date picker. If not specified, derives from the active locale.
|
|
68
|
+
* @default null
|
|
66
69
|
*/
|
|
67
|
-
readonly format: _angular_core.InputSignal<string>;
|
|
70
|
+
readonly format: _angular_core.InputSignal<string | null>;
|
|
68
71
|
/**
|
|
69
72
|
* @description Marks the date picker as invalid. When bound to a signal form field via `[formField]`,
|
|
70
73
|
* this is written by the `FormField` directive.
|
|
@@ -18,16 +18,17 @@ type ActiveView = "date" | "time";
|
|
|
18
18
|
|
|
19
19
|
declare class DateTimePickerComponent implements FormValueControl<Date | null>, DropdownPopupInput {
|
|
20
20
|
#private;
|
|
21
|
-
protected readonly isRtl: _angular_core.Signal<boolean>;
|
|
22
21
|
protected readonly activeView: _angular_core.WritableSignal<ActiveView>;
|
|
23
22
|
protected readonly baseClass: _angular_core.Signal<string>;
|
|
24
23
|
protected readonly currentDateString: _angular_core.WritableSignal<string>;
|
|
25
24
|
protected readonly decadeCellTemplate: _angular_core.Signal<CalendarDecadeCellTemplateDirective | undefined>;
|
|
25
|
+
protected readonly effectiveFormat: _angular_core.Signal<string>;
|
|
26
26
|
protected readonly expanded: _angular_core.Signal<boolean>;
|
|
27
27
|
protected readonly footerClass: _angular_core.Signal<string>;
|
|
28
28
|
protected readonly headerClass: _angular_core.Signal<string>;
|
|
29
29
|
protected readonly inputAttributes: _angular_core.Signal<AttributeConfig>;
|
|
30
30
|
protected readonly invalidState: _angular_core.Signal<boolean>;
|
|
31
|
+
protected readonly isRtl: _angular_core.Signal<boolean>;
|
|
31
32
|
protected readonly messages: _angular_core.Signal<_nanahoshi_mona_ui_i18n.MonaDateTimePickerMessages>;
|
|
32
33
|
protected readonly monthCellTemplate: _angular_core.Signal<CalendarMonthCellTemplateDirective | undefined>;
|
|
33
34
|
protected readonly navigatedDate: _angular_core.WritableSignal<Date>;
|
|
@@ -56,13 +57,15 @@ declare class DateTimePickerComponent implements FormValueControl<Date | null>,
|
|
|
56
57
|
*/
|
|
57
58
|
readonly disabledDates: _angular_core.InputSignal<DateDisabledType>;
|
|
58
59
|
/**
|
|
59
|
-
* @description Sets the first day of the week.
|
|
60
|
+
* @description Sets the first day of the week. If not specified, derives from the active locale.
|
|
61
|
+
* @default null
|
|
60
62
|
*/
|
|
61
|
-
readonly firstDay: _angular_core.InputSignal<FirstDayOfWeek>;
|
|
63
|
+
readonly firstDay: _angular_core.InputSignal<FirstDayOfWeek | null>;
|
|
62
64
|
/**
|
|
63
|
-
* @description Sets the date format of the date time picker.
|
|
65
|
+
* @description Sets the date format of the date time picker. If not specified, derives from the active locale, hourFormat, and showSeconds.
|
|
66
|
+
* @default null
|
|
64
67
|
*/
|
|
65
|
-
readonly format: _angular_core.InputSignal<string>;
|
|
68
|
+
readonly format: _angular_core.InputSignal<string | null>;
|
|
66
69
|
/**
|
|
67
70
|
* @description Sets the hour format of the time picker.
|
|
68
71
|
* @default 24
|
|
@@ -514,7 +514,9 @@ interface RowReorderableOptions {
|
|
|
514
514
|
*/
|
|
515
515
|
enabled?: boolean;
|
|
516
516
|
/**
|
|
517
|
-
* Returns the accessible label for a row's reorder handle.
|
|
517
|
+
* Returns the accessible label fragment for a row's reorder handle.
|
|
518
|
+
* Locale-aware composition supplies sentence punctuation, keyboard instructions,
|
|
519
|
+
* and disabled reasons around this fragment.
|
|
518
520
|
*
|
|
519
521
|
* The default must be positional, such as:
|
|
520
522
|
* "Reorder row 3"
|
|
@@ -1298,7 +1300,16 @@ declare const GRID_DEFAULT_MESSAGES: {
|
|
|
1298
1300
|
reorderRow: (rowNumber: number) => string;
|
|
1299
1301
|
resizeColumn: string;
|
|
1300
1302
|
rowReorder: string;
|
|
1303
|
+
rowReorderDisabled: string;
|
|
1304
|
+
rowReorderDisabledEditing: string;
|
|
1305
|
+
rowReorderDisabledFiltered: string;
|
|
1306
|
+
rowReorderDisabledGrouped: string;
|
|
1307
|
+
rowReorderDisabledSingleRow: string;
|
|
1308
|
+
rowReorderDisabledSorted: string;
|
|
1309
|
+
rowReorderDisabledVirtualScroll: string;
|
|
1310
|
+
rowReorderHandleAriaLabel: (rowLabel: string, keyboardHint: string, disabledReason?: string) => string;
|
|
1301
1311
|
rowReorderKeyboardHint: string;
|
|
1312
|
+
rowReorderMoved: (fromRowNumber: number, toPosition: number) => string;
|
|
1302
1313
|
rowValidationError: string;
|
|
1303
1314
|
save: string;
|
|
1304
1315
|
saveRow: string;
|
|
@@ -252,7 +252,16 @@ interface MonaGridMessages {
|
|
|
252
252
|
reorderRow(rowNumber: number): string;
|
|
253
253
|
readonly resizeColumn: string;
|
|
254
254
|
readonly rowReorder: string;
|
|
255
|
+
readonly rowReorderDisabled: string;
|
|
256
|
+
readonly rowReorderDisabledEditing: string;
|
|
257
|
+
readonly rowReorderDisabledFiltered: string;
|
|
258
|
+
readonly rowReorderDisabledGrouped: string;
|
|
259
|
+
readonly rowReorderDisabledSingleRow: string;
|
|
260
|
+
readonly rowReorderDisabledSorted: string;
|
|
261
|
+
readonly rowReorderDisabledVirtualScroll: string;
|
|
262
|
+
rowReorderHandleAriaLabel(rowLabel: string, keyboardHint: string, disabledReason?: string): string;
|
|
255
263
|
readonly rowReorderKeyboardHint: string;
|
|
264
|
+
rowReorderMoved(fromRowNumber: number, toPosition: number): string;
|
|
256
265
|
readonly rowValidationError: string;
|
|
257
266
|
readonly save: string;
|
|
258
267
|
readonly saveRow: string;
|
|
@@ -595,12 +604,50 @@ declare function gregorianDateTimeFromObject(obj: {
|
|
|
595
604
|
* Formats a date using locale-native token ordering and explicit Gregorian calendar.
|
|
596
605
|
*/
|
|
597
606
|
declare function formatGregorianDateToLocaleString(date: Date, localeId: string, options: Intl.DateTimeFormatOptions): string;
|
|
607
|
+
/**
|
|
608
|
+
* Regular expression matching Unicode bidirectional formatting controls
|
|
609
|
+
* (such as LRM, RLM, ALM, embeddings, overrides, and isolates).
|
|
610
|
+
*/
|
|
611
|
+
declare const BIDI_CONTROL_REGEX: RegExp;
|
|
612
|
+
/**
|
|
613
|
+
* Strips Unicode bidirectional formatting controls from a string.
|
|
614
|
+
*/
|
|
615
|
+
declare function stripBidiControls(value: string): string;
|
|
616
|
+
/**
|
|
617
|
+
* Sanitizes date/time text by stripping invisible bidi controls and
|
|
618
|
+
* normalizing typographic/non-breaking spaces to standard ASCII spaces.
|
|
619
|
+
*/
|
|
620
|
+
declare function sanitizeDateText(value: string): string;
|
|
598
621
|
/**
|
|
599
622
|
* Parses a date string using the specified format and locale, forcing Gregorian calendar.
|
|
600
623
|
* Localized digits are normalized first to support locales that use native numbering systems.
|
|
601
624
|
*/
|
|
602
625
|
declare function parseGregorianDate(text: string, format: string, localeId: string): DateTime;
|
|
603
626
|
|
|
627
|
+
type LocaleFirstDayOfWeek = "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday";
|
|
628
|
+
|
|
629
|
+
interface LocaleTimeFormatOptions {
|
|
630
|
+
readonly hourFormat?: "12" | "24";
|
|
631
|
+
readonly showSeconds?: boolean;
|
|
632
|
+
}
|
|
633
|
+
/**
|
|
634
|
+
* Derives a localized numeric date format (e.g. "yyyy/MM/dd" or "dd/MM/yyyy") for the given locale.
|
|
635
|
+
*/
|
|
636
|
+
declare function getLocaleDateInputFormat(localeId: string): string;
|
|
637
|
+
/**
|
|
638
|
+
* Derives a localized time format (e.g. "HH:mm", "ahh:mm", "hh:mm a") for the given locale.
|
|
639
|
+
*/
|
|
640
|
+
declare function getLocaleTimeInputFormat(localeId: string, options?: LocaleTimeFormatOptions): string;
|
|
641
|
+
/**
|
|
642
|
+
* Derives a localized date-time format for the given locale.
|
|
643
|
+
*/
|
|
644
|
+
declare function getLocaleDateTimeInputFormat(localeId: string, options?: LocaleTimeFormatOptions): string;
|
|
645
|
+
/**
|
|
646
|
+
* Resolves the first day of the week for the given locale using Intl.Locale.weekInfo,
|
|
647
|
+
* Intl.Locale.getWeekInfo(), or CLDR fallbacks.
|
|
648
|
+
*/
|
|
649
|
+
declare function getLocaleFirstDayOfWeek(localeId: string): LocaleFirstDayOfWeek;
|
|
650
|
+
|
|
604
651
|
interface PseudoLocalizationOptions {
|
|
605
652
|
readonly prefix?: string;
|
|
606
653
|
readonly suffix?: string;
|
|
@@ -629,5 +676,5 @@ declare function pseudoLocalizeCatalog<T extends object>(catalog: T, options?: P
|
|
|
629
676
|
*/
|
|
630
677
|
declare function generatePseudoLocale(catalogs: DeepPartial<MonaLocaleMessages>, options?: GeneratePseudoLocaleOptions): MonaLocale;
|
|
631
678
|
|
|
632
|
-
export { MONA_DEFAULT_LOCALE, MONA_I18N_CONFIG, MonaDirectionService, MonaI18nService, formatGregorianDateToLocaleString, formatNumber, generatePseudoLocale, getNumberFormatter, getNumberGroupingPattern, getNumberSymbols, gregorianDateTime, gregorianDateTimeFromObject, injectComponentDirection, mergeMessages, mergeTwo, normalizeGregorianLocale, normalizeLocalizedDigits, normalizeLocalizedInput, normalizeLocalizedMinus, observeComponentDirection, parseGregorianDate, parseLocalizedNumber, provideMonaI18n, pseudoLocalize, pseudoLocalizeCatalog, resolveComponentDirection, validateLocalizedNumber, validateLocalizedNumberEdit };
|
|
633
|
-
export type { CalendarMessages, DatePickerMessages, DateTimePickerMessages, DeepPartial, DialogMessages, DirectionObserverHandle, FilterMessages, GeneratePseudoLocaleOptions, LocalizedNumberEditValidationResult, LocalizedNumberParseMode, LocalizedNumberValidationResult, MonaAutoCompleteMessages, MonaBreadcrumbMessages, MonaButtonGroupMessages, MonaCalendarMessages, MonaCardMessages, MonaChartMessages, MonaChipMessages, MonaColorGradientMessages, MonaColorPaletteMessages, MonaColorPickerMessages, MonaComboBoxMessages, MonaDatePickerMessages, MonaDateTimePickerMessages, MonaDialogMessages, MonaDropdownListMessages, MonaDropdownsMessages, MonaEditorMessages, MonaFilterMessages, MonaGridMessages, MonaI18nConfig, MonaListBoxMessages, MonaListMessages, MonaLocale, MonaLocaleMessages, MonaMessageNamespace, MonaMultiSelectMessages, MonaNotificationMessages, MonaNumericTextBoxMessages, MonaOtpInputMessages, MonaPagerMessages, MonaRatingMessages, MonaScrollViewMessages, MonaSheetMessages, MonaSliderMessages, MonaSpinnerMessages, MonaSplitButtonMessages, MonaSplitterMessages, MonaStepperMessages, MonaTabsMessages, MonaTextBoxMessages, MonaTextDirection, MonaTimePickerMessages, MonaTimeSelectorMessages, MonaTreeViewMessages, MonaWindowMessages, NotificationMessages, NumberGroupingPattern, NumberSymbols, ParseLocalizedNumberOptions, PseudoLocalizationOptions, SheetMessages, TimePickerMessages, TimeSelectorMessages, ValidateLocalizedNumberEditOptions, WindowMessages };
|
|
679
|
+
export { BIDI_CONTROL_REGEX, MONA_DEFAULT_LOCALE, MONA_I18N_CONFIG, MonaDirectionService, MonaI18nService, formatGregorianDateToLocaleString, formatNumber, generatePseudoLocale, getLocaleDateInputFormat, getLocaleDateTimeInputFormat, getLocaleFirstDayOfWeek, getLocaleTimeInputFormat, getNumberFormatter, getNumberGroupingPattern, getNumberSymbols, gregorianDateTime, gregorianDateTimeFromObject, injectComponentDirection, mergeMessages, mergeTwo, normalizeGregorianLocale, normalizeLocalizedDigits, normalizeLocalizedInput, normalizeLocalizedMinus, observeComponentDirection, parseGregorianDate, parseLocalizedNumber, provideMonaI18n, pseudoLocalize, pseudoLocalizeCatalog, resolveComponentDirection, sanitizeDateText, stripBidiControls, validateLocalizedNumber, validateLocalizedNumberEdit };
|
|
680
|
+
export type { CalendarMessages, DatePickerMessages, DateTimePickerMessages, DeepPartial, DialogMessages, DirectionObserverHandle, FilterMessages, GeneratePseudoLocaleOptions, LocaleFirstDayOfWeek, LocaleTimeFormatOptions, LocalizedNumberEditValidationResult, LocalizedNumberParseMode, LocalizedNumberValidationResult, MonaAutoCompleteMessages, MonaBreadcrumbMessages, MonaButtonGroupMessages, MonaCalendarMessages, MonaCardMessages, MonaChartMessages, MonaChipMessages, MonaColorGradientMessages, MonaColorPaletteMessages, MonaColorPickerMessages, MonaComboBoxMessages, MonaDatePickerMessages, MonaDateTimePickerMessages, MonaDialogMessages, MonaDropdownListMessages, MonaDropdownsMessages, MonaEditorMessages, MonaFilterMessages, MonaGridMessages, MonaI18nConfig, MonaListBoxMessages, MonaListMessages, MonaLocale, MonaLocaleMessages, MonaMessageNamespace, MonaMultiSelectMessages, MonaNotificationMessages, MonaNumericTextBoxMessages, MonaOtpInputMessages, MonaPagerMessages, MonaRatingMessages, MonaScrollViewMessages, MonaSheetMessages, MonaSliderMessages, MonaSpinnerMessages, MonaSplitButtonMessages, MonaSplitterMessages, MonaStepperMessages, MonaTabsMessages, MonaTextBoxMessages, MonaTextDirection, MonaTimePickerMessages, MonaTimeSelectorMessages, MonaTreeViewMessages, MonaWindowMessages, NotificationMessages, NumberGroupingPattern, NumberSymbols, ParseLocalizedNumberOptions, PseudoLocalizationOptions, SheetMessages, TimePickerMessages, TimeSelectorMessages, ValidateLocalizedNumberEditOptions, WindowMessages };
|