@zohodesk/i18n 1.0.0-beta.17 → 1.0.0-beta.18
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/README.md +73 -69
- package/es/components/HOCI18N.js +33 -30
- package/es/components/UserTimeDiffFormat.js +6 -5
- package/es/components/__tests__/DateTimeDiffFormat.spec.js +177 -136
- package/es/components/__tests__/FormatText.spec.js +0 -1
- package/es/components/__tests__/HOCI18N.spec.js +0 -1
- package/es/components/__tests__/I18N.spec.js +0 -2
- package/es/components/__tests__/I18NProvider.spec.js +0 -1
- package/es/components/__tests__/PluralFormat.spec.js +0 -1
- package/es/components/__tests__/UserTimeDiffFormat.spec.js +287 -206
- package/es/components/__tests__/__snapshots__/DateTimeDiffFormat.spec.js.snap +258 -258
- package/es/components/__tests__/__snapshots__/FormatText.spec.js.snap +17 -17
- package/es/components/__tests__/__snapshots__/HOCI18N.spec.js.snap +15 -15
- package/es/components/__tests__/__snapshots__/I18N.spec.js.snap +17 -17
- package/es/components/__tests__/__snapshots__/I18NProvider.spec.js.snap +13 -13
- package/es/components/__tests__/__snapshots__/PluralFormat.spec.js.snap +17 -17
- package/es/components/__tests__/__snapshots__/UserTimeDiffFormat.spec.js.snap +366 -366
- package/es/index.js +1 -1
- package/es/utils.js +51 -12
- package/lib/components/DateTimeDiffFormat.js +3 -3
- package/lib/components/FormatText.js +3 -3
- package/lib/components/HOCI18N.js +3 -3
- package/lib/components/I18N.js +3 -3
- package/lib/components/I18NProvider.js +4 -4
- package/lib/components/PluralFormat.js +3 -3
- package/lib/components/UserTimeDiffFormat.js +3 -3
- package/lib/components/__tests__/I18NProvider.spec.js +1 -1
- package/lib/components/__tests__/UserTimeDiffFormat.spec.js +1 -1
- package/lib/components/__tests__/__snapshots__/DateTimeDiffFormat.spec.js.snap +258 -258
- package/lib/components/__tests__/__snapshots__/FormatText.spec.js.snap +17 -17
- package/lib/components/__tests__/__snapshots__/HOCI18N.spec.js.snap +15 -15
- package/lib/components/__tests__/__snapshots__/I18N.spec.js.snap +17 -17
- package/lib/components/__tests__/__snapshots__/I18NProvider.spec.js.snap +13 -13
- package/lib/components/__tests__/__snapshots__/PluralFormat.spec.js.snap +17 -17
- package/lib/components/__tests__/__snapshots__/UserTimeDiffFormat.spec.js.snap +366 -366
- package/lib/index.js +58 -52
- package/lib/utils.js +58 -20
- package/package.json +28 -28
- package/src/I18NContext.js +2 -2
- package/src/components/DateTimeDiffFormat.js +254 -254
- package/src/components/FormatText.js +14 -14
- package/src/components/HOCI18N.js +37 -37
- package/src/components/I18N.js +72 -72
- package/src/components/I18NProvider.js +106 -106
- package/src/components/PluralFormat.js +37 -37
- package/src/components/UserTimeDiffFormat.js +94 -94
- package/src/components/__tests__/DateTimeDiffFormat.spec.js +618 -618
- package/src/components/__tests__/FormatText.spec.js +26 -26
- package/src/components/__tests__/HOCI18N.spec.js +33 -33
- package/src/components/__tests__/I18N.spec.js +29 -29
- package/src/components/__tests__/I18NProvider.spec.js +65 -65
- package/src/components/__tests__/PluralFormat.spec.js +27 -27
- package/src/components/__tests__/UserTimeDiffFormat.spec.js +1076 -1076
- package/src/components/__tests__/__snapshots__/DateTimeDiffFormat.spec.js.snap +258 -258
- package/src/components/__tests__/__snapshots__/FormatText.spec.js.snap +17 -17
- package/src/components/__tests__/__snapshots__/HOCI18N.spec.js.snap +15 -15
- package/src/components/__tests__/__snapshots__/I18N.spec.js.snap +17 -17
- package/src/components/__tests__/__snapshots__/I18NProvider.spec.js.snap +13 -13
- package/src/components/__tests__/__snapshots__/PluralFormat.spec.js.snap +17 -17
- package/src/components/__tests__/__snapshots__/UserTimeDiffFormat.spec.js.snap +366 -366
- package/src/index.js +33 -32
- package/src/utils.js +527 -497
package/src/index.js
CHANGED
|
@@ -1,32 +1,33 @@
|
|
|
1
|
-
export {
|
|
2
|
-
formatDate,
|
|
3
|
-
pad,
|
|
4
|
-
replaceI18NValuesWithRegex,
|
|
5
|
-
unescapeUnicode,
|
|
6
|
-
getValues,
|
|
7
|
-
getI18NInfo,
|
|
8
|
-
isToday,
|
|
9
|
-
isYesterday,
|
|
10
|
-
isTomorrow,
|
|
11
|
-
isWithinAWeek,
|
|
12
|
-
isTwoWeeksOrMore,
|
|
13
|
-
userDateFormat,
|
|
14
|
-
getDiffObj,
|
|
15
|
-
getLyears,
|
|
16
|
-
getSuffix,
|
|
17
|
-
getDatePatternWithoutYear
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
export {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
export { default as
|
|
27
|
-
export { default as
|
|
28
|
-
export { default as
|
|
29
|
-
export { default as
|
|
30
|
-
export { default as
|
|
31
|
-
export
|
|
32
|
-
|
|
1
|
+
export {
|
|
2
|
+
formatDate,
|
|
3
|
+
pad,
|
|
4
|
+
replaceI18NValuesWithRegex,
|
|
5
|
+
unescapeUnicode,
|
|
6
|
+
getValues,
|
|
7
|
+
getI18NInfo,
|
|
8
|
+
isToday,
|
|
9
|
+
isYesterday,
|
|
10
|
+
isTomorrow,
|
|
11
|
+
isWithinAWeek,
|
|
12
|
+
isTwoWeeksOrMore,
|
|
13
|
+
userDateFormat,
|
|
14
|
+
getDiffObj,
|
|
15
|
+
getLyears,
|
|
16
|
+
getSuffix,
|
|
17
|
+
getDatePatternWithoutYear,
|
|
18
|
+
setLocalizedData
|
|
19
|
+
} from './utils';
|
|
20
|
+
import { getI18NValue as getI18NValue1 } from './utils';
|
|
21
|
+
export { I18NContext } from './I18NContext';
|
|
22
|
+
export {
|
|
23
|
+
default as I18NProvider,
|
|
24
|
+
i18NProviderUtils,
|
|
25
|
+
} from './components/I18NProvider';
|
|
26
|
+
export { default as I18N } from './components/I18N';
|
|
27
|
+
export { default as HOCI18N } from './components/HOCI18N';
|
|
28
|
+
export { default as FormatText } from './components/FormatText';
|
|
29
|
+
export { default as PluralFormat } from './components/PluralFormat';
|
|
30
|
+
export { default as DateTimeDiffFormat } from './components/DateTimeDiffFormat';
|
|
31
|
+
export { default as UserTimeDiffFormat } from './components/UserTimeDiffFormat';
|
|
32
|
+
export const getI18NValue = (i18n, key, values) =>
|
|
33
|
+
getI18NValue1(i18n)(key, values);
|