@zohodesk/i18n 1.0.0-beta.22 → 1.0.0-beta.24

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.
Files changed (46) hide show
  1. package/README.md +97 -89
  2. package/es/components/I18N.js +1 -0
  3. package/es/components/__tests__/__snapshots__/DateTimeDiffFormat.spec.js.snap +258 -258
  4. package/es/components/__tests__/__snapshots__/FormatText.spec.js.snap +17 -17
  5. package/es/components/__tests__/__snapshots__/HOCI18N.spec.js.snap +15 -15
  6. package/es/components/__tests__/__snapshots__/I18N.spec.js.snap +17 -17
  7. package/es/components/__tests__/__snapshots__/I18NProvider.spec.js.snap +13 -13
  8. package/es/components/__tests__/__snapshots__/PluralFormat.spec.js.snap +17 -17
  9. package/es/components/__tests__/__snapshots__/UserTimeDiffFormat.spec.js.snap +366 -366
  10. package/es/index.js +1 -1
  11. package/es/utils.js +62 -9
  12. package/lib/components/I18N.js +1 -0
  13. package/lib/components/__tests__/__snapshots__/DateTimeDiffFormat.spec.js.snap +258 -258
  14. package/lib/components/__tests__/__snapshots__/FormatText.spec.js.snap +17 -17
  15. package/lib/components/__tests__/__snapshots__/HOCI18N.spec.js.snap +15 -15
  16. package/lib/components/__tests__/__snapshots__/I18N.spec.js.snap +17 -17
  17. package/lib/components/__tests__/__snapshots__/I18NProvider.spec.js.snap +13 -13
  18. package/lib/components/__tests__/__snapshots__/PluralFormat.spec.js.snap +17 -17
  19. package/lib/components/__tests__/__snapshots__/UserTimeDiffFormat.spec.js.snap +366 -366
  20. package/lib/index.js +18 -0
  21. package/lib/utils.js +65 -9
  22. package/package.json +29 -29
  23. package/src/I18NContext.js +2 -2
  24. package/src/components/DateTimeDiffFormat.js +256 -256
  25. package/src/components/FormatText.js +14 -14
  26. package/src/components/HOCI18N.js +37 -37
  27. package/src/components/I18N.js +74 -73
  28. package/src/components/I18NProvider.js +110 -110
  29. package/src/components/PluralFormat.js +37 -37
  30. package/src/components/UserTimeDiffFormat.js +97 -97
  31. package/src/components/__tests__/DateTimeDiffFormat.spec.js +618 -618
  32. package/src/components/__tests__/FormatText.spec.js +26 -26
  33. package/src/components/__tests__/HOCI18N.spec.js +33 -33
  34. package/src/components/__tests__/I18N.spec.js +29 -29
  35. package/src/components/__tests__/I18NProvider.spec.js +65 -65
  36. package/src/components/__tests__/PluralFormat.spec.js +27 -27
  37. package/src/components/__tests__/UserTimeDiffFormat.spec.js +1076 -1076
  38. package/src/components/__tests__/__snapshots__/DateTimeDiffFormat.spec.js.snap +258 -258
  39. package/src/components/__tests__/__snapshots__/FormatText.spec.js.snap +17 -17
  40. package/src/components/__tests__/__snapshots__/HOCI18N.spec.js.snap +15 -15
  41. package/src/components/__tests__/__snapshots__/I18N.spec.js.snap +17 -17
  42. package/src/components/__tests__/__snapshots__/I18NProvider.spec.js.snap +13 -13
  43. package/src/components/__tests__/__snapshots__/PluralFormat.spec.js.snap +17 -17
  44. package/src/components/__tests__/__snapshots__/UserTimeDiffFormat.spec.js.snap +366 -366
  45. package/src/index.js +36 -33
  46. package/src/utils.js +585 -527
package/src/index.js CHANGED
@@ -1,33 +1,36 @@
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);
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
+ dayi18n,
20
+ monthi18n,
21
+ timei18n
22
+ } from './utils';
23
+ import { getI18NValue as getI18NValue1 } from './utils';
24
+ export { I18NContext } from './I18NContext';
25
+ export {
26
+ default as I18NProvider,
27
+ i18NProviderUtils,
28
+ } from './components/I18NProvider';
29
+ export { default as I18N } from './components/I18N';
30
+ export { default as HOCI18N } from './components/HOCI18N';
31
+ export { default as FormatText } from './components/FormatText';
32
+ export { default as PluralFormat } from './components/PluralFormat';
33
+ export { default as DateTimeDiffFormat } from './components/DateTimeDiffFormat';
34
+ export { default as UserTimeDiffFormat } from './components/UserTimeDiffFormat';
35
+ export const getI18NValue = (i18n, key, values) =>
36
+ getI18NValue1(i18n)(key, values);