react-intl 4.6.4 → 4.6.9
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/CHANGELOG.md +43 -0
- package/dist/formatters/dateTime.d.ts.map +1 -1
- package/dist/formatters/dateTime.js +7 -0
- package/dist/formatters/dateTime.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/react-intl.api.md +21 -3
- package/dist/react-intl.d.ts +13 -3
- package/dist/react-intl.js +12 -2
- package/dist/react-intl.js.map +1 -1
- package/dist/react-intl.min.js +1 -1
- package/dist/react-intl.min.js.map +1 -1
- package/dist/types.d.ts +10 -1
- package/dist/types.d.ts.map +1 -1
- package/lib/formatters/dateTime.d.ts.map +1 -1
- package/lib/formatters/dateTime.js +7 -0
- package/lib/formatters/dateTime.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/react-intl.d.ts +13 -3
- package/lib/types.d.ts +10 -1
- package/lib/types.d.ts.map +1 -1
- package/package.json +11 -11
- package/src/formatters/dateTime.ts +14 -2
- package/src/types.ts +25 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,49 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [4.6.9](https://github.com/formatjs/formatjs/compare/react-intl@4.6.8...react-intl@4.6.9) (2020-06-06)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package react-intl
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [4.6.8](https://github.com/formatjs/formatjs/compare/react-intl@4.6.7...react-intl@4.6.8) (2020-06-06)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package react-intl
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [4.6.7](https://github.com/formatjs/formatjs/compare/react-intl@4.6.6...react-intl@4.6.7) (2020-06-06)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* **react-intl:** Allow ES2020 options for DateTimeFormat, fix [#1695](https://github.com/formatjs/formatjs/issues/1695) ([27d02ee](https://github.com/formatjs/formatjs/commit/27d02ee6a34a67b0dca00b66a4cafbd5b628108c))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## [4.6.6](https://github.com/formatjs/formatjs/compare/react-intl@4.6.5...react-intl@4.6.6) (2020-06-04)
|
|
34
|
+
|
|
35
|
+
**Note:** Version bump only for package react-intl
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## [4.6.5](https://github.com/formatjs/formatjs/compare/react-intl@4.6.4...react-intl@4.6.5) (2020-06-04)
|
|
42
|
+
|
|
43
|
+
**Note:** Version bump only for package react-intl
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
6
49
|
## [4.6.4](https://github.com/formatjs/formatjs/compare/react-intl@4.6.3...react-intl@4.6.4) (2020-06-03)
|
|
7
50
|
|
|
8
51
|
**Note:** Version bump only for package react-intl
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dateTime.d.ts","sourceRoot":"","sources":["../../src/formatters/dateTime.ts"],"names":[],"mappings":"AAMA,OAAO,
|
|
1
|
+
{"version":3,"file":"dateTime.d.ts","sourceRoot":"","sources":["../../src/formatters/dateTime.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,UAAU,EACV,UAAU,EACV,cAAc,EAEf,MAAM,UAAU,CAAC;AA8BlB,wBAAgB,YAAY,CAC1B,EACE,MAAM,EACN,OAAO,EACP,OAAO,EACP,QAAQ,GACT,EAAE,IAAI,CAAC,UAAU,EAAE,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC,EA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B;AAED,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC,EACvE,iBAAiB,EAAE,UAAU,CAAC,mBAAmB,CAAC,EAClD,KAAK,CAAC,EAAE,UAAU,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,EACnD,OAAO,GAAE,UAAU,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAM,GACxD,IAAI,CAAC,kBAAkB,EAAE,CAqB3B"}
|
|
@@ -32,6 +32,13 @@ var DATE_TIME_FORMAT_OPTIONS = [
|
|
|
32
32
|
'minute',
|
|
33
33
|
'second',
|
|
34
34
|
'timeZoneName',
|
|
35
|
+
'hourCycle',
|
|
36
|
+
'dateStyle',
|
|
37
|
+
'timeStyle',
|
|
38
|
+
'fractionalSecondDigits',
|
|
39
|
+
'calendar',
|
|
40
|
+
'dayPeriod',
|
|
41
|
+
'numberingSystem',
|
|
35
42
|
];
|
|
36
43
|
function getFormatter(_a, type, getDateTimeFormat, options) {
|
|
37
44
|
var locale = _a.locale, formats = _a.formats, onError = _a.onError, timeZone = _a.timeZone;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dateTime.js","sourceRoot":"","sources":["../../src/formatters/dateTime.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"dateTime.js","sourceRoot":"","sources":["../../src/formatters/dateTime.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;AASH,kCAAqD;AACrD,kCAA4D;AAE5D,IAAM,wBAAwB,GAA6C;IACzE,eAAe;IACf,eAAe;IAEf,UAAU;IACV,QAAQ;IAER,SAAS;IACT,KAAK;IACL,MAAM;IACN,OAAO;IACP,KAAK;IACL,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,cAAc;IACd,WAAW;IACX,WAAW;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AED,SAAgB,iBAAiB,CAC/B,MAAuE,EACvE,iBAAkD,EAClD,KAAmD,EACnD,OAAyD;IAAzD,wBAAA,EAAA,YAAyD;IAEzD,IAAM,IAAI,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAEtE,IAAI;QACF,OAAO,YAAY,CACjB,MAAM,EACN,MAAM,EACN,iBAAiB,EACjB,OAAO,CACR,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;KACvB;IAAC,OAAO,CAAC,EAAE;QACV,MAAM,CAAC,OAAO,CACZ,IAAI,sBAAc,oCAEhB,wBAAwB,EACxB,CAAC,CACF,CACF,CAAC;KACH;IAED,OAAO,EAAE,CAAC;AACZ,CAAC;AA1BD,8CA0BC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -24,11 +24,11 @@ export declare const FormattedList: React.FC<IntlListFormatOptions & {
|
|
|
24
24
|
export declare const FormattedDisplayName: React.FC<DisplayNamesOptions & {
|
|
25
25
|
value: string | number | object;
|
|
26
26
|
}>;
|
|
27
|
-
export declare const FormattedDateParts: React.FC<
|
|
27
|
+
export declare const FormattedDateParts: React.FC<import("./types").DateTimeFormatOptionsES2020 & CustomFormatConfig & {
|
|
28
28
|
value: string | number | Date | undefined;
|
|
29
29
|
children(val: Intl.DateTimeFormatPart[]): React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | null;
|
|
30
30
|
}>;
|
|
31
|
-
export declare const FormattedTimeParts: React.FC<
|
|
31
|
+
export declare const FormattedTimeParts: React.FC<import("./types").DateTimeFormatOptionsES2020 & CustomFormatConfig & {
|
|
32
32
|
value: string | number | Date | undefined;
|
|
33
33
|
children(val: Intl.DateTimeFormatPart[]): React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | null;
|
|
34
34
|
}>;
|
package/dist/react-intl.api.md
CHANGED
|
@@ -30,6 +30,24 @@ export interface CustomFormats extends Partial<Formats> {
|
|
|
30
30
|
relative?: Record<string, IntlRelativeTimeFormatOptions>;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
// @public (undocumented)
|
|
34
|
+
export interface DateTimeFormatOptionsES2020 extends Intl.DateTimeFormatOptions {
|
|
35
|
+
// (undocumented)
|
|
36
|
+
calendar?: 'buddhist' | 'chinese' | 'coptic' | 'ethiopia' | 'ethiopic' | 'gregory' | 'hebrew' | 'indian' | 'islamic' | 'iso8601' | 'japanese' | 'persian' | 'roc';
|
|
37
|
+
// (undocumented)
|
|
38
|
+
dateStyle?: 'full' | 'long' | 'medium' | 'short';
|
|
39
|
+
// (undocumented)
|
|
40
|
+
dayPeriod?: 'narrow' | 'short' | 'long';
|
|
41
|
+
// (undocumented)
|
|
42
|
+
fractionalSecondDigits?: number;
|
|
43
|
+
// (undocumented)
|
|
44
|
+
hourCycle?: 'h11' | 'h12' | 'h23' | 'h24';
|
|
45
|
+
// (undocumented)
|
|
46
|
+
numberingSystem?: string;
|
|
47
|
+
// (undocumented)
|
|
48
|
+
timeStyle?: 'full' | 'long' | 'medium' | 'short';
|
|
49
|
+
}
|
|
50
|
+
|
|
33
51
|
// @public (undocumented)
|
|
34
52
|
export function defineMessage<T>(msg: T): T;
|
|
35
53
|
|
|
@@ -37,7 +55,7 @@ export function defineMessage<T>(msg: T): T;
|
|
|
37
55
|
export function defineMessages<T, U extends Record<string, T>>(msgs: U): U;
|
|
38
56
|
|
|
39
57
|
// @public (undocumented)
|
|
40
|
-
export type FormatDateOptions = Exclude<
|
|
58
|
+
export type FormatDateOptions = Exclude<DateTimeFormatOptionsES2020, 'localeMatcher'> & CustomFormatConfig;
|
|
41
59
|
|
|
42
60
|
// Warning: (ae-forgotten-export) The symbol "DisplayNamesOptions" needs to be exported by the entry point index.d.ts
|
|
43
61
|
//
|
|
@@ -66,7 +84,7 @@ export const FormattedDate: React_2.FC<Intl.DateTimeFormatOptions & CustomFormat
|
|
|
66
84
|
}>;
|
|
67
85
|
|
|
68
86
|
// @public (undocumented)
|
|
69
|
-
export const FormattedDateParts: React_2.FC<
|
|
87
|
+
export const FormattedDateParts: React_2.FC<import("./types").DateTimeFormatOptionsES2020 & CustomFormatConfig & {
|
|
70
88
|
value: string | number | Date | undefined;
|
|
71
89
|
children(val: Intl.DateTimeFormatPart[]): React_2.ReactElement<any, string | ((props: any) => React_2.ReactElement<any, string | any | (new (props: any) => React_2.Component<any, any, any>)> | null) | (new (props: any) => React_2.Component<any, any, any>)> | null;
|
|
72
90
|
}>;
|
|
@@ -155,7 +173,7 @@ export const FormattedTime: React_2.FC<Intl.DateTimeFormatOptions & CustomFormat
|
|
|
155
173
|
}>;
|
|
156
174
|
|
|
157
175
|
// @public (undocumented)
|
|
158
|
-
export const FormattedTimeParts: React_2.FC<
|
|
176
|
+
export const FormattedTimeParts: React_2.FC<import("./types").DateTimeFormatOptionsES2020 & CustomFormatConfig & {
|
|
159
177
|
value: string | number | Date | undefined;
|
|
160
178
|
children(val: Intl.DateTimeFormatPart[]): React_2.ReactElement<any, string | ((props: any) => React_2.ReactElement<any, string | any | (new (props: any) => React_2.Component<any, any, any>)> | null) | (new (props: any) => React_2.Component<any, any, any>)> | null;
|
|
161
179
|
}>;
|
package/dist/react-intl.d.ts
CHANGED
|
@@ -29,6 +29,16 @@ export declare interface CustomFormats extends Partial<Formats> {
|
|
|
29
29
|
|
|
30
30
|
declare type DateElement = SimpleFormatElement<TYPE.date, DateTimeSkeleton>;
|
|
31
31
|
|
|
32
|
+
export declare interface DateTimeFormatOptionsES2020 extends Intl.DateTimeFormatOptions {
|
|
33
|
+
hourCycle?: 'h11' | 'h12' | 'h23' | 'h24';
|
|
34
|
+
dateStyle?: 'full' | 'long' | 'medium' | 'short';
|
|
35
|
+
timeStyle?: 'full' | 'long' | 'medium' | 'short';
|
|
36
|
+
fractionalSecondDigits?: number;
|
|
37
|
+
calendar?: 'buddhist' | 'chinese' | 'coptic' | 'ethiopia' | 'ethiopic' | 'gregory' | 'hebrew' | 'indian' | 'islamic' | 'iso8601' | 'japanese' | 'persian' | 'roc';
|
|
38
|
+
dayPeriod?: 'narrow' | 'short' | 'long';
|
|
39
|
+
numberingSystem?: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
32
42
|
declare interface DateTimeSkeleton {
|
|
33
43
|
type: SKELETON_TYPE.dateTime;
|
|
34
44
|
pattern: string;
|
|
@@ -133,7 +143,7 @@ declare interface FieldData {
|
|
|
133
143
|
past: RelativeTimeData;
|
|
134
144
|
}
|
|
135
145
|
|
|
136
|
-
export declare type FormatDateOptions = Exclude<
|
|
146
|
+
export declare type FormatDateOptions = Exclude<DateTimeFormatOptionsES2020, 'localeMatcher'> & CustomFormatConfig;
|
|
137
147
|
|
|
138
148
|
export declare type FormatDisplayNameOptions = Exclude<DisplayNamesOptions, 'localeMatcher'>;
|
|
139
149
|
|
|
@@ -171,7 +181,7 @@ export declare const FormattedDate: React_2.FC<Intl.DateTimeFormatOptions & Cust
|
|
|
171
181
|
value: string | number | Date | undefined;
|
|
172
182
|
}>;
|
|
173
183
|
|
|
174
|
-
export declare const FormattedDateParts: React_2.FC<
|
|
184
|
+
export declare const FormattedDateParts: React_2.FC<import("./types").DateTimeFormatOptionsES2020 & CustomFormatConfig & {
|
|
175
185
|
value: string | number | Date | undefined;
|
|
176
186
|
children(val: Intl.DateTimeFormatPart[]): React_2.ReactElement<any, string | ((props: any) => React_2.ReactElement<any, string | any | (new (props: any) => React_2.Component<any, any, any>)> | null) | (new (props: any) => React_2.Component<any, any, any>)> | null;
|
|
177
187
|
}>;
|
|
@@ -226,7 +236,7 @@ export declare const FormattedTime: React_2.FC<Intl.DateTimeFormatOptions & Cust
|
|
|
226
236
|
value: string | number | Date | undefined;
|
|
227
237
|
}>;
|
|
228
238
|
|
|
229
|
-
export declare const FormattedTimeParts: React_2.FC<
|
|
239
|
+
export declare const FormattedTimeParts: React_2.FC<import("./types").DateTimeFormatOptionsES2020 & CustomFormatConfig & {
|
|
230
240
|
value: string | number | Date | undefined;
|
|
231
241
|
children(val: Intl.DateTimeFormatPart[]): React_2.ReactElement<any, string | ((props: any) => React_2.ReactElement<any, string | any | (new (props: any) => React_2.Component<any, any, any>)> | null) | (new (props: any) => React_2.Component<any, any, any>)> | null;
|
|
232
242
|
}>;
|
package/dist/react-intl.js
CHANGED
|
@@ -384,11 +384,11 @@
|
|
|
384
384
|
return escapedChar + quotedChars.replace("''", "'");
|
|
385
385
|
};
|
|
386
386
|
var peg$c94 = function (x) {
|
|
387
|
-
return (x !== '<' &&
|
|
387
|
+
return ((ignoreTag() || x !== '<') &&
|
|
388
388
|
x !== '{' &&
|
|
389
389
|
!(isInPluralOption() && x === '#') &&
|
|
390
390
|
!(isNestedMessageText() && x === '}') &&
|
|
391
|
-
!(isNestedMessageText() && x === '>'));
|
|
391
|
+
!(!ignoreTag() && isNestedMessageText() && x === '>'));
|
|
392
392
|
};
|
|
393
393
|
var peg$c95 = "\n";
|
|
394
394
|
var peg$c96 = peg$literalExpectation("\n", false);
|
|
@@ -3085,6 +3085,9 @@
|
|
|
3085
3085
|
location: location()
|
|
3086
3086
|
} : {};
|
|
3087
3087
|
}
|
|
3088
|
+
function ignoreTag() {
|
|
3089
|
+
return options && options.ignoreTag;
|
|
3090
|
+
}
|
|
3088
3091
|
peg$result = peg$startRuleFunction();
|
|
3089
3092
|
if (peg$result !== peg$FAILED && peg$currPos === input.length) {
|
|
3090
3093
|
return peg$result;
|
|
@@ -4462,6 +4465,13 @@
|
|
|
4462
4465
|
'minute',
|
|
4463
4466
|
'second',
|
|
4464
4467
|
'timeZoneName',
|
|
4468
|
+
'hourCycle',
|
|
4469
|
+
'dateStyle',
|
|
4470
|
+
'timeStyle',
|
|
4471
|
+
'fractionalSecondDigits',
|
|
4472
|
+
'calendar',
|
|
4473
|
+
'dayPeriod',
|
|
4474
|
+
'numberingSystem',
|
|
4465
4475
|
];
|
|
4466
4476
|
function getFormatter$2(_a, type, getDateTimeFormat, options) {
|
|
4467
4477
|
var locale = _a.locale, formats = _a.formats, onError = _a.onError, timeZone = _a.timeZone;
|