@zohodesk/i18n 1.0.0-beta.20 → 1.0.0-beta.21

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 (52) hide show
  1. package/README.md +85 -80
  2. package/es/components/DateTimeDiffFormat.js +2 -1
  3. package/es/components/HOCI18N.js +1 -1
  4. package/es/components/PluralFormat.js +1 -1
  5. package/es/components/__tests__/I18N.spec.js +1 -1
  6. package/es/components/__tests__/__snapshots__/DateTimeDiffFormat.spec.js.snap +258 -258
  7. package/es/components/__tests__/__snapshots__/FormatText.spec.js.snap +17 -17
  8. package/es/components/__tests__/__snapshots__/HOCI18N.spec.js.snap +15 -15
  9. package/es/components/__tests__/__snapshots__/I18N.spec.js.snap +17 -17
  10. package/es/components/__tests__/__snapshots__/I18NProvider.spec.js.snap +13 -13
  11. package/es/components/__tests__/__snapshots__/PluralFormat.spec.js.snap +17 -17
  12. package/es/components/__tests__/__snapshots__/UserTimeDiffFormat.spec.js.snap +366 -366
  13. package/lib/components/DateTimeDiffFormat.js +4 -3
  14. package/lib/components/FormatText.js +2 -2
  15. package/lib/components/HOCI18N.js +3 -3
  16. package/lib/components/I18N.js +2 -2
  17. package/lib/components/I18NProvider.js +2 -2
  18. package/lib/components/PluralFormat.js +3 -3
  19. package/lib/components/UserTimeDiffFormat.js +2 -2
  20. package/lib/components/__tests__/I18N.spec.js +1 -1
  21. package/lib/components/__tests__/__snapshots__/DateTimeDiffFormat.spec.js.snap +258 -258
  22. package/lib/components/__tests__/__snapshots__/FormatText.spec.js.snap +17 -17
  23. package/lib/components/__tests__/__snapshots__/HOCI18N.spec.js.snap +15 -15
  24. package/lib/components/__tests__/__snapshots__/I18N.spec.js.snap +17 -17
  25. package/lib/components/__tests__/__snapshots__/I18NProvider.spec.js.snap +13 -13
  26. package/lib/components/__tests__/__snapshots__/PluralFormat.spec.js.snap +17 -17
  27. package/lib/components/__tests__/__snapshots__/UserTimeDiffFormat.spec.js.snap +366 -366
  28. package/package.json +29 -29
  29. package/src/I18NContext.js +2 -2
  30. package/src/components/DateTimeDiffFormat.js +256 -256
  31. package/src/components/FormatText.js +14 -14
  32. package/src/components/HOCI18N.js +37 -37
  33. package/src/components/I18N.js +72 -72
  34. package/src/components/I18NProvider.js +110 -110
  35. package/src/components/PluralFormat.js +37 -37
  36. package/src/components/UserTimeDiffFormat.js +97 -97
  37. package/src/components/__tests__/DateTimeDiffFormat.spec.js +618 -618
  38. package/src/components/__tests__/FormatText.spec.js +26 -26
  39. package/src/components/__tests__/HOCI18N.spec.js +33 -33
  40. package/src/components/__tests__/I18N.spec.js +29 -29
  41. package/src/components/__tests__/I18NProvider.spec.js +65 -65
  42. package/src/components/__tests__/PluralFormat.spec.js +27 -27
  43. package/src/components/__tests__/UserTimeDiffFormat.spec.js +1076 -1076
  44. package/src/components/__tests__/__snapshots__/DateTimeDiffFormat.spec.js.snap +258 -258
  45. package/src/components/__tests__/__snapshots__/FormatText.spec.js.snap +17 -17
  46. package/src/components/__tests__/__snapshots__/HOCI18N.spec.js.snap +15 -15
  47. package/src/components/__tests__/__snapshots__/I18N.spec.js.snap +17 -17
  48. package/src/components/__tests__/__snapshots__/I18NProvider.spec.js.snap +13 -13
  49. package/src/components/__tests__/__snapshots__/PluralFormat.spec.js.snap +17 -17
  50. package/src/components/__tests__/__snapshots__/UserTimeDiffFormat.spec.js.snap +366 -366
  51. package/src/index.js +33 -33
  52. package/src/utils.js +527 -527
package/README.md CHANGED
@@ -1,80 +1,85 @@
1
- # i18n
2
-
3
- # 1.0.0-beta.20
4
-
5
- - Date field issue fixed in UserTimeDiffFormat component
6
-
7
- # 1.0.0-beta.19
8
-
9
- - In this version we have made changes in i18n provider to call user date format function only if the time zone data is available.
10
- # 1.0.0-beta.18
11
-
12
- - Localization feature added and incorporated into getI18NValue Method.
13
-
14
- # 1.0.0-beta.17
15
-
16
- - There was some i18n changes done in live before moving the date format build to live. Since we need these changes we have published it as new version.
17
-
18
- # 1.0.0-beta.16
19
-
20
- - DatePattern and dateTimePattern key has been changed for the date format build.
21
-
22
- # 1.0.0-beta.15.1
23
-
24
- - Zoho security version updated.
25
-
26
- # 1.0.0-beta.15
27
-
28
- - When working on date format build we have published I18n. Also, before moving date format build to master we had a emergency fix that need to be sent, so when publishing I18n we have published the date format changes with the next version.
29
-
30
- # 1.0.0-beta.14
31
-
32
- - Issue fixed in enable current year.
33
-
34
- # 1.0.0-beta.13
35
-
36
- - Issue fixed in due date.
37
-
38
- # 1.0.0-beta.12
39
-
40
- - Issue fixed in date Format Pattern.
41
-
42
- # 1.0.0-beta.11
43
-
44
- - Date Format Changes
45
-
46
- # 1.0.0-beta.10
47
-
48
- - Date Format Issue Fixes
49
-
50
- # 1.0.0-beta.9
51
-
52
- - Date Format Changes
53
-
54
- # 1.0.0-beta.8
55
-
56
- - ES Module Support Changes
57
-
58
- # 1.0.0-beta.7
59
-
60
- - 'userDateFormat' util method - 'others' function fix
61
-
62
- # 1.0.0-beta.6
63
-
64
- - Added new prop 'isNeedTime' for DateTimeDiffFormat Component
65
-
66
- # 1.0.0-beta.5
67
-
68
- - Timezone logic moved to @zohodesk/datetimejs
69
-
70
- # 1.0.0-beta.4
71
-
72
- - Added new prop 'page' for DateTimeDiffFormat Component
73
-
74
- # 1.0.0-beta.3
75
-
76
- - Added support for exact times along with relative times in format() function
77
-
78
- # 1.0.0-beta.0
79
-
80
- - Test Publish
1
+ # i18n
2
+
3
+ # 1.0.0-beta.21
4
+
5
+ Data test id added for dateTimedifformat.js
6
+
7
+ # 1.0.0-beta.20
8
+
9
+ - Date field issue fixed in UserTimeDiffFormat component
10
+
11
+ # 1.0.0-beta.19
12
+
13
+ - In this version we have made changes in i18n provider to call user date format function only if the time zone data is available.
14
+
15
+ # 1.0.0-beta.18
16
+
17
+ - Localization feature added and incorporated into getI18NValue Method.
18
+
19
+ # 1.0.0-beta.17
20
+
21
+ - There was some i18n changes done in live before moving the date format build to live. Since we need these changes we have published it as new version.
22
+
23
+ # 1.0.0-beta.16
24
+
25
+ - DatePattern and dateTimePattern key has been changed for the date format build.
26
+
27
+ # 1.0.0-beta.15.1
28
+
29
+ - Zoho security version updated.
30
+
31
+ # 1.0.0-beta.15
32
+
33
+ - When working on date format build we have published I18n. Also, before moving date format build to master we had a emergency fix that need to be sent, so when publishing I18n we have published the date format changes with the next version.
34
+
35
+ # 1.0.0-beta.14
36
+
37
+ - Issue fixed in enable current year.
38
+
39
+ # 1.0.0-beta.13
40
+
41
+ - Issue fixed in due date.
42
+
43
+ # 1.0.0-beta.12
44
+
45
+ - Issue fixed in date Format Pattern.
46
+
47
+ # 1.0.0-beta.11
48
+
49
+ - Date Format Changes
50
+
51
+ # 1.0.0-beta.10
52
+
53
+ - Date Format Issue Fixes
54
+
55
+ # 1.0.0-beta.9
56
+
57
+ - Date Format Changes
58
+
59
+ # 1.0.0-beta.8
60
+
61
+ - ES Module Support Changes
62
+
63
+ # 1.0.0-beta.7
64
+
65
+ - 'userDateFormat' util method - 'others' function fix
66
+
67
+ # 1.0.0-beta.6
68
+
69
+ - Added new prop 'isNeedTime' for DateTimeDiffFormat Component
70
+
71
+ # 1.0.0-beta.5
72
+
73
+ - Timezone logic moved to @zohodesk/datetimejs
74
+
75
+ # 1.0.0-beta.4
76
+
77
+ - Added new prop 'page' for DateTimeDiffFormat Component
78
+
79
+ # 1.0.0-beta.3
80
+
81
+ - Added support for exact times along with relative times in format() function
82
+
83
+ # 1.0.0-beta.0
84
+
85
+ - Test Publish
@@ -195,7 +195,8 @@ export default class DateTimeDiffFormat extends React.Component {
195
195
  return text ? /*#__PURE__*/React.createElement("span", {
196
196
  className: className,
197
197
  "data-title": title,
198
- "data-id": dataId
198
+ "data-id": dataId,
199
+ "data-test-id": dataId
199
200
  }, text) : /*#__PURE__*/React.createElement(FormatText, {
200
201
  i18NKey: isSuffixEnable && suffix !== '' ? `${key}.${suffix}` : key,
201
202
  values: values,
@@ -1,4 +1,4 @@
1
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
2
 
3
3
  import React, { Children } from 'react';
4
4
  import PropTypes from 'prop-types';
@@ -1,4 +1,4 @@
1
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
2
 
3
3
  import React from 'react';
4
4
  import PropTypes from 'prop-types';
@@ -1,4 +1,4 @@
1
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
2
 
3
3
  import I18N from '../I18N';
4
4
  import I18NProvider from '../I18NProvider';