@zohodesk/i18n 1.0.0-beta.23 → 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 (44) hide show
  1. package/README.md +97 -92
  2. package/es/components/__tests__/__snapshots__/DateTimeDiffFormat.spec.js.snap +258 -258
  3. package/es/components/__tests__/__snapshots__/FormatText.spec.js.snap +17 -17
  4. package/es/components/__tests__/__snapshots__/HOCI18N.spec.js.snap +15 -15
  5. package/es/components/__tests__/__snapshots__/I18N.spec.js.snap +17 -17
  6. package/es/components/__tests__/__snapshots__/I18NProvider.spec.js.snap +13 -13
  7. package/es/components/__tests__/__snapshots__/PluralFormat.spec.js.snap +17 -17
  8. package/es/components/__tests__/__snapshots__/UserTimeDiffFormat.spec.js.snap +366 -366
  9. package/es/index.js +1 -1
  10. package/es/utils.js +62 -9
  11. package/lib/components/__tests__/__snapshots__/DateTimeDiffFormat.spec.js.snap +258 -258
  12. package/lib/components/__tests__/__snapshots__/FormatText.spec.js.snap +17 -17
  13. package/lib/components/__tests__/__snapshots__/HOCI18N.spec.js.snap +15 -15
  14. package/lib/components/__tests__/__snapshots__/I18N.spec.js.snap +17 -17
  15. package/lib/components/__tests__/__snapshots__/I18NProvider.spec.js.snap +13 -13
  16. package/lib/components/__tests__/__snapshots__/PluralFormat.spec.js.snap +17 -17
  17. package/lib/components/__tests__/__snapshots__/UserTimeDiffFormat.spec.js.snap +366 -366
  18. package/lib/index.js +18 -0
  19. package/lib/utils.js +65 -9
  20. package/package.json +29 -29
  21. package/src/I18NContext.js +2 -2
  22. package/src/components/DateTimeDiffFormat.js +256 -256
  23. package/src/components/FormatText.js +14 -14
  24. package/src/components/HOCI18N.js +37 -37
  25. package/src/components/I18N.js +74 -74
  26. package/src/components/I18NProvider.js +110 -110
  27. package/src/components/PluralFormat.js +37 -37
  28. package/src/components/UserTimeDiffFormat.js +97 -97
  29. package/src/components/__tests__/DateTimeDiffFormat.spec.js +618 -618
  30. package/src/components/__tests__/FormatText.spec.js +26 -26
  31. package/src/components/__tests__/HOCI18N.spec.js +33 -33
  32. package/src/components/__tests__/I18N.spec.js +29 -29
  33. package/src/components/__tests__/I18NProvider.spec.js +65 -65
  34. package/src/components/__tests__/PluralFormat.spec.js +27 -27
  35. package/src/components/__tests__/UserTimeDiffFormat.spec.js +1076 -1076
  36. package/src/components/__tests__/__snapshots__/DateTimeDiffFormat.spec.js.snap +258 -258
  37. package/src/components/__tests__/__snapshots__/FormatText.spec.js.snap +17 -17
  38. package/src/components/__tests__/__snapshots__/HOCI18N.spec.js.snap +15 -15
  39. package/src/components/__tests__/__snapshots__/I18N.spec.js.snap +17 -17
  40. package/src/components/__tests__/__snapshots__/I18NProvider.spec.js.snap +13 -13
  41. package/src/components/__tests__/__snapshots__/PluralFormat.spec.js.snap +17 -17
  42. package/src/components/__tests__/__snapshots__/UserTimeDiffFormat.spec.js.snap +366 -366
  43. package/src/index.js +36 -33
  44. 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);