@variocube/app-ui 1.15.0 → 1.16.1
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/esm/AppShell/AppShell.js +12 -12
- package/esm/AppShell/AppShell.js.map +1 -1
- package/esm/AppShell/index.js.map +1 -1
- package/esm/Input/ActionsMenu.js +1 -1
- package/esm/Input/ActionsMenu.js.map +1 -1
- package/esm/Input/EmailSenderField.js +3 -3
- package/esm/Input/EmailSenderField.js.map +1 -1
- package/esm/Input/Selector.js +2 -2
- package/esm/Input/Selector.js.map +1 -1
- package/esm/Paging/Paging.d.ts +1 -1
- package/esm/Paging/Paging.js +5 -5
- package/esm/Paging/Paging.js.map +1 -1
- package/esm/Paging/index.d.ts +2 -1
- package/esm/Paging/index.js.map +1 -1
- package/esm/VCThemeProvider/JetbrainsMonoFont.js +8 -8
- package/esm/VCThemeProvider/JetbrainsMonoFont.js.map +1 -1
- package/esm/VCThemeProvider/RobotoFont.js +8 -8
- package/esm/VCThemeProvider/RobotoFont.js.map +1 -1
- package/esm/VCThemeProvider/ThemeModeSwitcher.js +5 -5
- package/esm/VCThemeProvider/ThemeModeSwitcher.js.map +1 -1
- package/esm/VCThemeProvider/VCThemeProvider.d.ts +1 -1
- package/esm/VCThemeProvider/VCThemeProvider.js +21 -21
- package/esm/VCThemeProvider/VCThemeProvider.js.map +1 -1
- package/esm/audit/AuditChanges.js +9 -5
- package/esm/audit/AuditChanges.js.map +1 -1
- package/esm/audit/AuditTimeline.js +1 -1
- package/esm/audit/AuditTimeline.js.map +1 -1
- package/esm/audit/AuditTimelineItem.js +3 -3
- package/esm/audit/AuditTimelineItem.js.map +1 -1
- package/esm/audit/index.d.ts +1 -1
- package/esm/audit/index.js +1 -1
- package/esm/audit/index.js.map +1 -1
- package/esm/breadcrumbs.d.ts +2 -2
- package/esm/breadcrumbs.js +3 -3
- package/esm/breadcrumbs.js.map +1 -1
- package/esm/code/CodeBlock.d.ts +1 -1
- package/esm/code/CodeBlock.js +1 -1
- package/esm/code/CodeBlock.js.map +1 -1
- package/esm/confirm/ConfirmButton.js.map +1 -1
- package/esm/confirm/ConfirmDialog.js +1 -1
- package/esm/confirm/ConfirmDialog.js.map +1 -1
- package/esm/confirm/ConfirmMenuItem.js +1 -1
- package/esm/confirm/ConfirmMenuItem.js.map +1 -1
- package/esm/container/ContainerLayout.d.ts +1 -1
- package/esm/container/ContainerLayout.js +5 -5
- package/esm/container/ContainerLayout.js.map +1 -1
- package/esm/container/ContainerSettingsContext.d.ts +2 -2
- package/esm/container/ContainerSettingsContext.js +6 -6
- package/esm/container/ContainerSettingsContext.js.map +1 -1
- package/esm/container/ContainerWidthControl.js +2 -2
- package/esm/container/ContainerWidthControl.js.map +1 -1
- package/esm/container/index.d.ts +1 -1
- package/esm/container/index.js +1 -1
- package/esm/container/index.js.map +1 -1
- package/esm/content-table/ContentTable.d.ts +1 -1
- package/esm/content-table/ContentTable.js +26 -19
- package/esm/content-table/ContentTable.js.map +1 -1
- package/esm/content-table/UndrawEmpty.js.map +1 -1
- package/esm/content-table/index.js.map +1 -1
- package/esm/country/country-select.js.map +1 -1
- package/esm/country/index.d.ts +3 -3
- package/esm/country/index.js +3 -3
- package/esm/country/index.js.map +1 -1
- package/esm/country/locale-select.js +1 -1
- package/esm/country/locale-select.js.map +1 -1
- package/esm/country/locales.js +1 -1
- package/esm/country/locales.js.map +1 -1
- package/esm/country/phone-prefix-select.js +1 -1
- package/esm/country/phone-prefix-select.js.map +1 -1
- package/esm/cube/accessibility.js +2 -1
- package/esm/cube/accessibility.js.map +1 -1
- package/esm/data-table/DataTableColumnSettings.d.ts +1 -1
- package/esm/data-table/DataTableColumnSettings.js +2 -2
- package/esm/data-table/DataTableColumnSettings.js.map +1 -1
- package/esm/data-table/DataTableHeader.js +1 -1
- package/esm/data-table/DataTableHeader.js.map +1 -1
- package/esm/data-table/DataTableToolbar.js +1 -1
- package/esm/data-table/DataTableToolbar.js.map +1 -1
- package/esm/data-table/index.d.ts +4 -4
- package/esm/data-table/index.js +4 -4
- package/esm/data-table/index.js.map +1 -1
- package/esm/data-table/useDataTableColumnStorage.d.ts +9 -1
- package/esm/data-table/useDataTableColumnStorage.js +12 -5
- package/esm/data-table/useDataTableColumnStorage.js.map +1 -1
- package/esm/data-table/useDataTableStorage.d.ts +31 -6
- package/esm/data-table/useDataTableStorage.js +25 -5
- package/esm/data-table/useDataTableStorage.js.map +1 -1
- package/esm/date-pickers/PlainAdapterCommon.d.ts +1 -1
- package/esm/date-pickers/PlainAdapterCommon.js.map +1 -1
- package/esm/date-pickers/PlainDateAdapter.js.map +1 -1
- package/esm/date-pickers/PlainDatePicker.js +1 -1
- package/esm/date-pickers/PlainDatePicker.js.map +1 -1
- package/esm/date-pickers/PlainDatePicker.spec.js +2 -2
- package/esm/date-pickers/PlainDatePicker.spec.js.map +1 -1
- package/esm/date-pickers/PlainDateTimeAdapter.js.map +1 -1
- package/esm/date-pickers/PlainDateTimePicker.js +2 -2
- package/esm/date-pickers/PlainDateTimePicker.js.map +1 -1
- package/esm/date-pickers/PlainDateTimePicker.spec.js +2 -2
- package/esm/date-pickers/PlainDateTimePicker.spec.js.map +1 -1
- package/esm/date-pickers/PlainTimeAdapter.js.map +1 -1
- package/esm/date-pickers/PlainTimePicker.js +2 -2
- package/esm/date-pickers/PlainTimePicker.js.map +1 -1
- package/esm/date-pickers/PlainTimePicker.spec.js +2 -2
- package/esm/date-pickers/PlainTimePicker.spec.js.map +1 -1
- package/esm/date-pickers/TemporalAdapter.d.ts +1 -1
- package/esm/date-pickers/TemporalAdapter.js +1 -1
- package/esm/date-pickers/TemporalAdapter.js.map +1 -1
- package/esm/date-pickers/TimezoneSelect.js +348 -348
- package/esm/date-pickers/TimezoneSelect.js.map +1 -1
- package/esm/date-pickers/getFormatString.js.map +1 -1
- package/esm/date-pickers/index.d.ts +2 -1
- package/esm/date-pickers/index.js +1 -1
- package/esm/date-pickers/index.js.map +1 -1
- package/esm/date-pickers/parse.js.map +1 -1
- package/esm/date-pickers/timeframe-picker.js +7 -7
- package/esm/date-pickers/timeframe-picker.js.map +1 -1
- package/esm/date-pickers/useLocale.js.map +1 -1
- package/esm/date-pickers/useRenderInput.js +5 -3
- package/esm/date-pickers/useRenderInput.js.map +1 -1
- package/esm/formats/CompactFormat.js +1 -1
- package/esm/formats/CompactFormat.js.map +1 -1
- package/esm/formats/CompactFormat.spec.js +1 -1
- package/esm/formats/CompactFormat.spec.js.map +1 -1
- package/esm/formats/CurrencyFormat.js +1 -1
- package/esm/formats/CurrencyFormat.js.map +1 -1
- package/esm/formats/CurrencyFormat.spec.js +1 -1
- package/esm/formats/CurrencyFormat.spec.js.map +1 -1
- package/esm/formats/DecimalFormat.js +1 -1
- package/esm/formats/DecimalFormat.js.map +1 -1
- package/esm/formats/DecimalFormat.spec.js +1 -1
- package/esm/formats/DecimalFormat.spec.js.map +1 -1
- package/esm/formats/DurationFormat.js +2 -2
- package/esm/formats/DurationFormat.js.map +1 -1
- package/esm/formats/DurationFormat.spec.js +2 -2
- package/esm/formats/DurationFormat.spec.js.map +1 -1
- package/esm/formats/TemporalFormat.spec.js +2 -2
- package/esm/formats/TemporalFormat.spec.js.map +1 -1
- package/esm/formats/TemporalRangeFormat.js +1 -1
- package/esm/formats/TemporalRangeFormat.js.map +1 -1
- package/esm/formats/TemporalRangeFormat.spec.js +2 -2
- package/esm/formats/TemporalRangeFormat.spec.js.map +1 -1
- package/esm/formats/useDateTimeFormat.js +5 -2
- package/esm/formats/useDateTimeFormat.js.map +1 -1
- package/esm/formats/useNumberFormat.js +1 -1
- package/esm/formats/useNumberFormat.js.map +1 -1
- package/esm/formats/useRelativeTimeFormat.js +4 -2
- package/esm/formats/useRelativeTimeFormat.js.map +1 -1
- package/esm/forms/SearchForm.js +1 -1
- package/esm/forms/SearchForm.js.map +1 -1
- package/esm/getNavigatorLanguages.js.map +1 -1
- package/esm/getSupportedFormatLocale.js.map +1 -1
- package/esm/help/HelpDrawer.js +12 -8
- package/esm/help/HelpDrawer.js.map +1 -1
- package/esm/help/index.d.ts +1 -1
- package/esm/help/index.js +1 -1
- package/esm/help/index.js.map +1 -1
- package/esm/icons.d.ts +13 -13
- package/esm/icons.js +13 -13
- package/esm/icons.js.map +1 -1
- package/esm/layout/ErrorBoundary.js +36 -36
- package/esm/layout/ErrorBoundary.js.map +1 -1
- package/esm/layout/NotFound.js +6 -6
- package/esm/layout/NotFound.js.map +1 -1
- package/esm/layout/NotFoundSvg.js.map +1 -1
- package/esm/layout/UserNav.js +18 -18
- package/esm/layout/UserNav.js.map +1 -1
- package/esm/layout/index.d.ts +2 -2
- package/esm/layout/index.js +2 -2
- package/esm/layout/index.js.map +1 -1
- package/esm/logo/Logo.js +2 -2
- package/esm/logo/Logo.js.map +1 -1
- package/esm/logo/VCAppLogo.js +1 -1
- package/esm/logo/VCAppLogo.js.map +1 -1
- package/esm/logo/index.d.ts +3 -3
- package/esm/logo/index.js +3 -3
- package/esm/logo/index.js.map +1 -1
- package/esm/splash/index.js +2 -2
- package/esm/splash/index.js.map +1 -1
- package/esm/storage/MemoryStorage.d.ts +6 -4
- package/esm/storage/MemoryStorage.js +13 -4
- package/esm/storage/MemoryStorage.js.map +1 -1
- package/esm/storage/index.d.ts +2 -1
- package/esm/storage/index.js +1 -1
- package/esm/storage/index.js.map +1 -1
- package/esm/storage/storage.d.ts +6 -4
- package/esm/storage/storage.js +35 -15
- package/esm/storage/storage.js.map +1 -1
- package/esm/storage/types.d.ts +6 -0
- package/esm/storage/types.js +2 -0
- package/esm/storage/types.js.map +1 -0
- package/esm/storage/useStorage.d.ts +10 -1
- package/esm/storage/useStorage.js +30 -7
- package/esm/storage/useStorage.js.map +1 -1
- package/esm/tabs/Tabs.d.ts +2 -2
- package/esm/tabs/Tabs.js +15 -15
- package/esm/tabs/Tabs.js.map +1 -1
- package/esm/tabs/index.js.map +1 -1
- package/esm/temporal/index.d.ts +1 -1
- package/esm/temporal/index.js +1 -1
- package/esm/temporal/index.js.map +1 -1
- package/esm/temporal/parse.js.map +1 -1
- package/esm/temporal/polyfill.d.ts +1 -1
- package/esm/temporal/polyfill.js +3 -3
- package/esm/temporal/polyfill.js.map +1 -1
- package/esm/utils/defined.js.map +1 -1
- package/esm/utils/index.d.ts +1 -1
- package/esm/utils/index.js +1 -1
- package/esm/utils/index.js.map +1 -1
- package/esm/utils/useFlag.js.map +1 -1
- package/esm/utils/useIsMounted.js.map +1 -1
- package/package.json +8 -9
- package/src/AppShell/AppShell.tsx +147 -140
- package/src/AppShell/index.tsx +1 -1
- package/src/Input/ActionsMenu.tsx +70 -73
- package/src/Input/EmailSenderField.tsx +59 -52
- package/src/Input/Selector.tsx +15 -15
- package/src/LanguageSwitcher/index.ts +1 -1
- package/src/Paging/Paging.ts +56 -57
- package/src/Paging/index.ts +2 -1
- package/src/VCThemeProvider/JetbrainsMonoFont.tsx +52 -42
- package/src/VCThemeProvider/RobotoFont.tsx +47 -39
- package/src/VCThemeProvider/ThemeModeSwitcher.tsx +17 -17
- package/src/VCThemeProvider/VCThemeProvider.tsx +149 -145
- package/src/audit/AuditChanges.tsx +18 -12
- package/src/audit/AuditTimeline.tsx +16 -17
- package/src/audit/AuditTimelineItem.tsx +58 -61
- package/src/audit/index.ts +2 -2
- package/src/audit/types.ts +27 -28
- package/src/breadcrumbs.tsx +11 -15
- package/src/code/CodeBlock.tsx +10 -10
- package/src/confirm/ConfirmButton.tsx +56 -56
- package/src/confirm/ConfirmDialog.tsx +54 -54
- package/src/confirm/ConfirmMenuItem.tsx +51 -53
- package/src/container/ContainerLayout.tsx +7 -8
- package/src/container/ContainerSettingsContext.tsx +49 -46
- package/src/container/ContainerWidthControl.tsx +11 -9
- package/src/container/index.ts +8 -3
- package/src/content-table/ContentTable.tsx +235 -197
- package/src/content-table/UndrawEmpty.tsx +281 -281
- package/src/content-table/index.ts +1 -1
- package/src/country/country-select.tsx +0 -1
- package/src/country/index.ts +3 -3
- package/src/country/locale-select.tsx +36 -36
- package/src/country/locales.ts +185 -187
- package/src/country/phone-prefix-select.tsx +4 -5
- package/src/cube/accessibility.tsx +2 -1
- package/src/data-table/DataTableColumnSettings.tsx +181 -181
- package/src/data-table/DataTableHeader.tsx +6 -6
- package/src/data-table/DataTableToolbar.tsx +6 -6
- package/src/data-table/index.tsx +4 -4
- package/src/data-table/useDataTableColumnStorage.ts +30 -19
- package/src/data-table/useDataTableStorage.spec.ts +108 -0
- package/src/data-table/useDataTableStorage.ts +91 -36
- package/src/date-pickers/PlainAdapterCommon.ts +118 -120
- package/src/date-pickers/PlainDateAdapter.spec.ts +44 -46
- package/src/date-pickers/PlainDateAdapter.ts +130 -132
- package/src/date-pickers/PlainDatePicker.spec.tsx +17 -18
- package/src/date-pickers/PlainDatePicker.tsx +33 -36
- package/src/date-pickers/PlainDateTimeAdapter.spec.ts +44 -46
- package/src/date-pickers/PlainDateTimeAdapter.ts +141 -134
- package/src/date-pickers/PlainDateTimePicker.spec.tsx +17 -18
- package/src/date-pickers/PlainDateTimePicker.tsx +35 -36
- package/src/date-pickers/PlainTimeAdapter.ts +219 -221
- package/src/date-pickers/PlainTimePicker.spec.tsx +17 -18
- package/src/date-pickers/PlainTimePicker.tsx +35 -34
- package/src/date-pickers/TemporalAdapter.ts +110 -111
- package/src/date-pickers/TimezoneSelect.tsx +375 -375
- package/src/date-pickers/getFormatString.ts +29 -29
- package/src/date-pickers/index.ts +6 -5
- package/src/date-pickers/parse.spec.ts +37 -40
- package/src/date-pickers/parse.ts +44 -47
- package/src/date-pickers/timeframe-picker.tsx +16 -17
- package/src/date-pickers/useLocale.ts +1 -1
- package/src/date-pickers/useRenderInput.tsx +24 -15
- package/src/formats/CompactFormat.spec.tsx +18 -20
- package/src/formats/CompactFormat.tsx +30 -30
- package/src/formats/CurrencyFormat.spec.tsx +18 -20
- package/src/formats/CurrencyFormat.tsx +52 -52
- package/src/formats/DecimalFormat.spec.tsx +18 -20
- package/src/formats/DecimalFormat.tsx +47 -47
- package/src/formats/DurationFormat.spec.tsx +48 -49
- package/src/formats/DurationFormat.tsx +51 -51
- package/src/formats/TemporalFormat.spec.tsx +93 -95
- package/src/formats/TemporalRangeFormat.spec.tsx +143 -144
- package/src/formats/TemporalRangeFormat.tsx +54 -54
- package/src/formats/types.ts +1 -3
- package/src/formats/useDateTimeFormat.ts +5 -2
- package/src/formats/useNumberFormat.ts +3 -3
- package/src/formats/useRelativeTimeFormat.ts +5 -3
- package/src/forms/SearchForm.tsx +37 -38
- package/src/getNavigatorLanguages.ts +4 -5
- package/src/getSupportedFormatLocale.ts +10 -10
- package/src/help/HelpDrawer.tsx +76 -55
- package/src/help/index.ts +3 -3
- package/src/icons.ts +21 -21
- package/src/layout/ErrorBoundary.tsx +226 -215
- package/src/layout/NotFound.tsx +36 -39
- package/src/layout/NotFoundSvg.tsx +193 -169
- package/src/layout/UserNav.tsx +98 -98
- package/src/layout/index.ts +3 -3
- package/src/logo/Logo.tsx +6 -7
- package/src/logo/VCAppLogo.tsx +22 -20
- package/src/logo/index.tsx +3 -3
- package/src/splash/index.tsx +25 -25
- package/src/storage/MemoryStorage.ts +22 -15
- package/src/storage/index.ts +2 -1
- package/src/storage/storage.spec.ts +184 -0
- package/src/storage/storage.ts +37 -15
- package/src/storage/types.ts +6 -0
- package/src/storage/useStorage.ts +32 -7
- package/src/tabs/Tabs.tsx +172 -170
- package/src/tabs/index.ts +1 -1
- package/src/temporal/index.ts +1 -1
- package/src/temporal/parse.ts +1 -2
- package/src/temporal/polyfill.ts +11 -11
- package/src/utils/defined.ts +2 -3
- package/src/utils/index.ts +1 -1
- package/src/utils/useFlag.ts +5 -5
- package/src/utils/useIsMounted.ts +9 -9
|
@@ -1,150 +1,149 @@
|
|
|
1
|
-
import {DateTimeFormat, Duration, PlainDate, PlainDateTime, PlainTime} from "../temporal";
|
|
2
1
|
import {DateIOFormats, Unit} from "@date-io/core/IUtils";
|
|
2
|
+
import {DateTimeFormat, Duration, PlainDate, PlainDateTime, PlainTime} from "../temporal";
|
|
3
3
|
import {getFormatString} from "./getFormatString";
|
|
4
4
|
|
|
5
5
|
export class TemporalAdapter<T extends PlainDate | PlainDateTime | PlainTime> {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
6
|
+
formats: Record<keyof DateIOFormats, DateTimeFormat>;
|
|
7
|
+
|
|
8
|
+
constructor({locale = "default"}) {
|
|
9
|
+
this.formats = createFormats(locale);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
getCurrentLocaleCode(): string {
|
|
13
|
+
return this.formats.fullDate.resolvedOptions().locale;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
is12HourCycleInCurrentLocale(): boolean {
|
|
17
|
+
return this.formats.fullTime.resolvedOptions().hour12 ?? false;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
getFormatHelperText(format: string | DateTimeFormat): string {
|
|
21
|
+
return getFormatString(format as DateTimeFormat, {
|
|
22
|
+
year: "YYYY",
|
|
23
|
+
month: "MM",
|
|
24
|
+
day: "DD",
|
|
25
|
+
hour: "HH",
|
|
26
|
+
minute: "MM",
|
|
27
|
+
second: "SS",
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
isNull(value: T | null): boolean {
|
|
32
|
+
return Boolean(value);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
toISO(value: T): string {
|
|
36
|
+
return value.toString();
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
format(value: T, formatKey: keyof DateIOFormats) {
|
|
40
|
+
return this.formats[formatKey].format(value);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
formatByString(value: T, format: string | DateTimeFormat): string {
|
|
44
|
+
return (format as DateTimeFormat).format(value);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
formatNumber(numberToFormat: string): string {
|
|
48
|
+
return numberToFormat;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
getMeridiemText(ampm: "am" | "pm"): string {
|
|
52
|
+
return ampm.toUpperCase();
|
|
53
|
+
}
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
export function durationToUnit(duration: Duration, unit?: Unit) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
return unit == "quarters"
|
|
58
|
+
? Math.floor(duration.total("months") / 4)
|
|
59
|
+
: duration.total(unit || "milliseconds");
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
function createFormats(locale = "default") {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
const entries = Object.entries(FORMAT_OPTIONS)
|
|
64
|
+
.map(([key, options]) => [key, new DateTimeFormat(locale, options)] as const);
|
|
65
|
+
return Object.fromEntries(entries) as Record<keyof DateIOFormats<DateTimeFormat>, DateTimeFormat>;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
const FORMAT_OPTIONS = {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
/** Partially localized full date with weekday, useful for text-to-speech accessibility @example "Tuesday, January 1, 2019" */
|
|
73
|
-
fullDateWithWeekday: {dateStyle: "full"},
|
|
69
|
+
/** Localized full date @example "Jan 1, 2019" */
|
|
70
|
+
fullDate: {dateStyle: "medium"},
|
|
74
71
|
|
|
75
|
-
|
|
76
|
-
|
|
72
|
+
/** Partially localized full date with weekday, useful for text-to-speech accessibility @example "Tuesday, January 1, 2019" */
|
|
73
|
+
fullDateWithWeekday: {dateStyle: "full"},
|
|
77
74
|
|
|
78
|
-
|
|
79
|
-
|
|
75
|
+
/** Date format string with month and day of month @example "1 January" */
|
|
76
|
+
normalDate: {day: "numeric", month: "long"},
|
|
80
77
|
|
|
81
|
-
|
|
82
|
-
|
|
78
|
+
/** Date format string with weekday, month and day of month @example "Wed, Jan 1" */
|
|
79
|
+
normalDateWithWeekday: {day: "numeric", month: "long", weekday: "short"},
|
|
83
80
|
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
/** Shorter day format @example "Jan 1" */
|
|
82
|
+
shortDate: {day: "numeric", month: "short"},
|
|
86
83
|
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
/** Year format string @example "2019" */
|
|
85
|
+
year: {year: "numeric"},
|
|
89
86
|
|
|
90
|
-
|
|
91
|
-
|
|
87
|
+
/** Month format string @example "January" */
|
|
88
|
+
month: {month: "long"},
|
|
92
89
|
|
|
93
|
-
|
|
94
|
-
|
|
90
|
+
/** Short month format string @example "Jan" */
|
|
91
|
+
monthShort: {month: "short"},
|
|
95
92
|
|
|
96
|
-
|
|
97
|
-
|
|
93
|
+
/** Month with year format string @example "January 2018" */
|
|
94
|
+
monthAndYear: {month: "long", year: "numeric"},
|
|
98
95
|
|
|
99
|
-
|
|
100
|
-
|
|
96
|
+
/** Month with date format string @example "January 1" */
|
|
97
|
+
monthAndDate: {day: "numeric", month: "long"},
|
|
101
98
|
|
|
102
|
-
|
|
103
|
-
|
|
99
|
+
/** Weekday format string @example "Wednesday" */
|
|
100
|
+
weekday: {weekday: "long"},
|
|
104
101
|
|
|
105
|
-
|
|
106
|
-
|
|
102
|
+
/** Short weekday format string @example "Wed" */
|
|
103
|
+
weekdayShort: {weekday: "short"},
|
|
107
104
|
|
|
108
|
-
|
|
109
|
-
|
|
105
|
+
/** Day format string @example "1" */
|
|
106
|
+
dayOfMonth: {day: "numeric"},
|
|
110
107
|
|
|
111
|
-
|
|
112
|
-
|
|
108
|
+
/** Hours format string @example "11" */
|
|
109
|
+
hours12h: {hour: "numeric", hour12: true},
|
|
113
110
|
|
|
114
|
-
|
|
115
|
-
|
|
111
|
+
/** Hours format string @example "23" */
|
|
112
|
+
hours24h: {hour: "numeric"},
|
|
116
113
|
|
|
117
|
-
|
|
118
|
-
|
|
114
|
+
/** Minutes format string @example "44" */
|
|
115
|
+
minutes: {minute: "2-digit"},
|
|
119
116
|
|
|
120
|
-
|
|
121
|
-
|
|
117
|
+
/** Seconds format string @example "00" */
|
|
118
|
+
seconds: {second: "2-digit"},
|
|
122
119
|
|
|
123
|
-
|
|
124
|
-
|
|
120
|
+
/** Full time localized format string @example "11:44 PM" for US, "23:44" for Europe */
|
|
121
|
+
fullTime: {timeStyle: "short"},
|
|
125
122
|
|
|
126
|
-
|
|
127
|
-
|
|
123
|
+
/** Not localized full time format string @example "11:44 PM" */
|
|
124
|
+
fullTime12h: {timeStyle: "short"},
|
|
128
125
|
|
|
129
|
-
|
|
130
|
-
|
|
126
|
+
/** Not localized full time format string @example "23:44" */
|
|
127
|
+
fullTime24h: {timeStyle: "short"},
|
|
131
128
|
|
|
132
|
-
|
|
133
|
-
|
|
129
|
+
/** Date & time format string with localized time @example "Jan 1, 2018 11:44 PM" */
|
|
130
|
+
fullDateTime: {dateStyle: "medium", timeStyle: "short"},
|
|
134
131
|
|
|
135
|
-
|
|
136
|
-
|
|
132
|
+
/** Not localized date & Time format 12h @example "Jan 1, 2018 11:44 PM" */
|
|
133
|
+
fullDateTime12h: {dateStyle: "medium", timeStyle: "short"},
|
|
137
134
|
|
|
138
|
-
|
|
139
|
-
|
|
135
|
+
/** Not localized date & Time format 24h @example "Jan 1, 2018 23:44" */
|
|
136
|
+
fullDateTime24h: {dateStyle: "medium", timeStyle: "short"},
|
|
140
137
|
|
|
141
|
-
|
|
142
|
-
|
|
138
|
+
/** Localized keyboard input friendly date format @example "02/13/2020 */
|
|
139
|
+
keyboardDate: {year: "numeric", month: "2-digit", day: "2-digit"},
|
|
143
140
|
|
|
144
|
-
|
|
145
|
-
|
|
141
|
+
/** Localized keyboard input friendly date/time format @example "02/13/2020 23:44" */
|
|
142
|
+
keyboardDateTime: {year: "numeric", month: "2-digit", day: "2-digit", hour: "numeric", minute: "numeric"},
|
|
146
143
|
|
|
147
|
-
|
|
148
|
-
|
|
144
|
+
/** Partially localized keyboard input friendly date/time 12h format @example "02/13/2020 11:44 PM" */
|
|
145
|
+
keyboardDateTime12h: {year: "numeric", month: "2-digit", day: "2-digit", hour: "numeric", minute: "numeric"},
|
|
149
146
|
|
|
150
|
-
|
|
147
|
+
/** Partially localized keyboard input friendly date/time 24h format @example "02/13/2020 23:44" */
|
|
148
|
+
keyboardDateTime24h: {year: "numeric", month: "2-digit", day: "2-digit", hour: "numeric", minute: "numeric"},
|
|
149
|
+
} as const;
|