@zohodesk/i18n 1.0.0-beta.4 → 1.0.0-beta.41-murphy

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 (70) hide show
  1. package/README.md +130 -4
  2. package/docs/murphy/01-MURPHY_OVERVIEW.md +148 -0
  3. package/docs/murphy/02-MURPHY_ARCHITECTURE.md +283 -0
  4. package/docs/murphy/03-MURPHY_BACKEND_CONFIG.md +337 -0
  5. package/docs/murphy/04-MURPHY_FRONTEND_INIT.md +437 -0
  6. package/docs/murphy/05-MURPHY_DESK_CLIENT_USAGE.md +467 -0
  7. package/docs/murphy/06-MURPHY_I18N_INTEGRATION.md +402 -0
  8. package/docs/murphy/07-MURPHY_WHY_I18N_APPROACH.md +391 -0
  9. package/es/I18NContext.js +1 -2
  10. package/es/components/DateTimeDiffFormat.js +185 -209
  11. package/es/components/FormatText.js +7 -27
  12. package/es/components/HOCI18N.js +35 -58
  13. package/es/components/I18N.js +48 -74
  14. package/es/components/I18NProvider.js +59 -93
  15. package/es/components/PluralFormat.js +28 -51
  16. package/es/components/UserTimeDiffFormat.js +66 -81
  17. package/es/components/__tests__/DateTimeDiffFormat.spec.js +810 -663
  18. package/es/components/__tests__/FormatText.spec.js +22 -19
  19. package/es/components/__tests__/HOCI18N.spec.js +19 -25
  20. package/es/components/__tests__/I18N.spec.js +23 -21
  21. package/es/components/__tests__/I18NProvider.spec.js +38 -47
  22. package/es/components/__tests__/PluralFormat.spec.js +23 -20
  23. package/es/components/__tests__/UserTimeDiffFormat.spec.js +1259 -1110
  24. package/es/index.js +13 -15
  25. package/es/utils/__tests__/jsxTranslations.spec.js +170 -0
  26. package/es/utils/errorReporter.js +41 -0
  27. package/es/utils/index.js +543 -0
  28. package/es/utils/jsxTranslations.js +185 -0
  29. package/lib/I18NContext.js +5 -10
  30. package/lib/components/DateTimeDiffFormat.js +131 -146
  31. package/lib/components/FormatText.js +29 -42
  32. package/lib/components/HOCI18N.js +34 -45
  33. package/lib/components/I18N.js +46 -57
  34. package/lib/components/I18NProvider.js +72 -95
  35. package/lib/components/PluralFormat.js +39 -55
  36. package/lib/components/UserTimeDiffFormat.js +76 -84
  37. package/lib/components/__tests__/DateTimeDiffFormat.spec.js +751 -635
  38. package/lib/components/__tests__/FormatText.spec.js +21 -30
  39. package/lib/components/__tests__/HOCI18N.spec.js +22 -41
  40. package/lib/components/__tests__/I18N.spec.js +20 -33
  41. package/lib/components/__tests__/I18NProvider.spec.js +40 -63
  42. package/lib/components/__tests__/PluralFormat.spec.js +23 -35
  43. package/lib/components/__tests__/UserTimeDiffFormat.spec.js +1195 -1046
  44. package/lib/index.js +83 -104
  45. package/lib/utils/__tests__/jsxTranslations.spec.js +172 -0
  46. package/lib/utils/errorReporter.js +49 -0
  47. package/lib/utils/index.js +583 -0
  48. package/lib/utils/jsxTranslations.js +216 -0
  49. package/package.json +4 -3
  50. package/src/components/DateTimeDiffFormat.js +84 -55
  51. package/src/components/I18N.js +2 -0
  52. package/src/components/I18NProvider.js +44 -33
  53. package/src/components/UserTimeDiffFormat.js +22 -18
  54. package/src/index.js +12 -9
  55. package/src/utils/__tests__/jsxTranslations.spec.js +213 -0
  56. package/src/utils/errorReporter.js +48 -0
  57. package/src/utils/index.js +644 -0
  58. package/src/utils/jsxTranslations.js +199 -0
  59. package/es/components/NewDateFormat.js +0 -50
  60. package/es/offset.js +0 -629
  61. package/es/timezones.js +0 -118
  62. package/es/utils.js +0 -621
  63. package/lib/components/NewDateFormat.js +0 -68
  64. package/lib/offset.js +0 -634
  65. package/lib/timezones.js +0 -129
  66. package/lib/utils.js +0 -651
  67. package/src/components/NewDateFormat.js +0 -60
  68. package/src/offset.js +0 -629
  69. package/src/timezones.js +0 -113
  70. package/src/utils.js +0 -648
@@ -1,89 +1,63 @@
1
- import _Object$assign from 'babel-runtime/core-js/object/assign';
2
- import _Object$keys from 'babel-runtime/core-js/object/keys';
3
- import _Object$getPrototypeOf from 'babel-runtime/core-js/object/get-prototype-of';
4
- import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
5
- import _createClass from 'babel-runtime/helpers/createClass';
6
- import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
7
- import _inherits from 'babel-runtime/helpers/inherits';
8
1
  import React, { Children } from 'react';
9
2
  import PropTypes from 'prop-types';
10
- import { replaceI18NValuesWithRegex, unescapeUnicode } from '../utils';
3
+ import { replaceI18NValuesWithRegex, unescapeUnicode } from "../utils";
11
4
  import { HTMLPurifier } from '@zoho/SecurityJS';
12
- import { I18NContext } from '../I18NContext';
13
-
14
- var I18N = function (_React$Component) {
15
- _inherits(I18N, _React$Component);
16
-
17
- function I18N(props) {
18
- _classCallCheck(this, I18N);
19
-
20
- var _this = _possibleConstructorReturn(this, (I18N.__proto__ || _Object$getPrototypeOf(I18N)).call(this, props));
21
-
22
- _this.getI18NValue = _this.getI18NValue.bind(_this);
23
- _this.createElement = _this.createElement.bind(_this);
24
- return _this;
5
+ import { I18NContext } from "../I18NContext";
6
+ export default class I18N extends React.Component {
7
+ constructor(props) {
8
+ super(props);
9
+ this.getI18NValue = this.getI18NValue.bind(this);
10
+ this.createElement = this.createElement.bind(this);
25
11
  }
26
-
27
- _createClass(I18N, [{
28
- key: 'getI18NValue',
29
- value: function getI18NValue() {
30
- var _props = this.props,
31
- key = _props.i18NKey,
32
- values = _props.values;
33
-
34
- var _ref = this.context || {},
35
- i18n = _ref.i18n;
36
-
37
- if (typeof i18n === 'undefined') {
38
- return key;
39
- }
40
- var i18nStr = i18n[key];
41
- if (i18nStr === undefined) {
42
- return key;
43
- }
44
- i18nStr = replaceI18NValuesWithRegex(i18nStr, values);
45
- return unescapeUnicode(i18nStr);
12
+ getI18NValue() {
13
+ const {
14
+ i18NKey: key,
15
+ values
16
+ } = this.props;
17
+ const {
18
+ i18n
19
+ } = this.context || {};
20
+ if (typeof i18n === 'undefined') {
21
+ return key;
46
22
  }
47
- }, {
48
- key: 'createElement',
49
- value: function createElement() {
50
- var _this2 = this;
51
-
52
- var props = _Object$keys(this.props).reduce(function (result, nextKey) {
53
- if (nextKey != 'i18NKey' && nextKey != 'tag' && nextKey != 'values' && nextKey != 'isHtml' && nextKey != 'dataId') {
54
- result[nextKey] = _this2.props[nextKey];
55
- }
56
- return result;
57
- }, {});
58
- //const child=this.getI18NValue();
59
- if (this.props.dataId) {
60
- props['data-id'] = this.props.dataId;
61
- }
62
- if (this.props.isHtml) {
63
- var dangerouslySetInnerHTML = {
64
- __html: HTMLPurifier.sanitize(this.getI18NValue())
65
- };
66
-
67
- return React.createElement(this.props.tag, _Object$assign(props, { dangerouslySetInnerHTML: dangerouslySetInnerHTML }));
23
+ let i18nStr = i18n[key];
24
+ if (i18nStr === undefined) {
25
+ return key;
26
+ }
27
+ i18nStr = replaceI18NValuesWithRegex(i18nStr, values);
28
+ return unescapeUnicode(i18nStr);
29
+ }
30
+ createElement() {
31
+ const props = Object.keys(this.props).reduce((result, nextKey) => {
32
+ if (nextKey != 'i18NKey' && nextKey != 'tag' && nextKey != 'values' && nextKey != 'isHtml' && nextKey != 'dataId') {
33
+ result[nextKey] = this.props[nextKey];
68
34
  }
69
- return React.createElement(this.props.tag, props, this.getI18NValue());
35
+ return result;
36
+ }, {});
37
+ //const child=this.getI18NValue();
38
+ if (this.props.dataId) {
39
+ props['data-id'] = this.props.dataId;
40
+ props['data-test-id'] = this.props.dataId;
70
41
  }
71
- }, {
72
- key: 'render',
73
- value: function render() {
74
- return this.createElement();
42
+ if (this.props.isHtml) {
43
+ let dangerouslySetInnerHTML = {
44
+ __html: HTMLPurifier.sanitize(this.getI18NValue())
45
+ };
46
+ return /*#__PURE__*/React.createElement(this.props.tag, Object.assign(props, {
47
+ dangerouslySetInnerHTML
48
+ }));
75
49
  }
76
- }]);
77
-
78
- return I18N;
79
- }(React.Component);
80
-
81
- export default I18N;
82
-
50
+ return /*#__PURE__*/React.createElement(this.props.tag, props, this.getI18NValue());
51
+ }
52
+ render() {
53
+ return this.createElement();
54
+ }
55
+ }
83
56
  I18N.propTypes = {
84
57
  i18NKey: PropTypes.string.isRequired,
85
58
  isHtml: PropTypes.bool,
86
59
  tag: PropTypes.string,
60
+ dataId: PropTypes.string,
87
61
  values: PropTypes.oneOfType([PropTypes.string, PropTypes.array])
88
62
  };
89
63
  I18N.defaultProps = {
@@ -1,116 +1,82 @@
1
- import _Promise from 'babel-runtime/core-js/promise';
2
- import _Object$getPrototypeOf from 'babel-runtime/core-js/object/get-prototype-of';
3
- import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
4
- import _createClass from 'babel-runtime/helpers/createClass';
5
- import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
6
- import _inherits from 'babel-runtime/helpers/inherits';
7
1
  import React from 'react';
8
2
  import PropTypes from 'prop-types';
9
- import { getI18NValue, userDateFormat } from '../utils';
10
- import { unpack } from '../timezones';
11
- import { createSelector } from 'reselect';
12
- import { I18NContext } from '../I18NContext';
13
-
14
- var emptyObj = {};
15
- var dummy = function dummy(key, values) {
16
- return key;
17
- };
18
- var getTzData = createSelector([function (tzStr) {
19
- return tzStr;
20
- }], function (tzStr) {
21
- return unpack(tzStr);
22
- });
23
- export var i18NProviderUtils = {
3
+ import { getI18NValue, userDateFormat } from "../utils";
4
+ import { getI18NComponent } from "../utils/jsxTranslations";
5
+ import { I18NContext } from "../I18NContext";
6
+ const emptyObj = {};
7
+ const dummy = (key, values) => key;
8
+ export const i18NProviderUtils = {
24
9
  getI18NValue: dummy,
25
- userDateFormat: dummy
10
+ userDateFormat: dummy,
11
+ getI18NComponent: dummy
26
12
  };
27
-
28
- var I18NProvider = function (_React$Component) {
29
- _inherits(I18NProvider, _React$Component);
30
-
31
- function I18NProvider(props, context) {
32
- _classCallCheck(this, I18NProvider);
33
-
34
- var _this = _possibleConstructorReturn(this, (I18NProvider.__proto__ || _Object$getPrototypeOf(I18NProvider)).call(this, props, context));
35
-
13
+ export default class I18NProvider extends React.Component {
14
+ constructor(props, context) {
15
+ super(props, context);
36
16
  i18NProviderUtils.getI18NValue = getI18NValue(props.i18n);
37
- i18NProviderUtils.userDateFormat = userDateFormat(i18NProviderUtils.getI18NValue, unpack(props.tzData));
38
- return _this;
39
- }
40
-
41
- _createClass(I18NProvider, [{
42
- key: 'componentDidUpdate',
43
- value: function componentDidUpdate(next) {
44
- var _this2 = this;
45
-
46
- var _props = this.props,
47
- i18n = _props.i18n,
48
- timeZone = _props.timeZone,
49
- datePattern = _props.datePattern,
50
- timeFormat = _props.timeFormat,
51
- dateTimeFormat = _props.dateTimeFormat,
52
- direction = _props.direction,
53
- onChange = _props.onChange,
54
- tzData = _props.tzData;
55
-
56
- if (i18n !== next.i18n || timeZone !== next.timeZone || datePattern !== next.datePattern || timeFormat !== next.timeFormat || dateTimeFormat !== next.dateTimeFormat || direction !== next.direction || tzData !== next.tzData) {
57
- this.promise = new _Promise(function (res, rej) {
58
- _this2.resolve = res;
59
- _this2.reject = rej;
60
- }).then(function () {
61
- i18NProviderUtils.getI18NValue = getI18NValue(nextProps.i18n);
62
- i18NProviderUtils.userDateFormat = userDateFormat(i18NProviderUtils.getI18NValue, unpack(tzData));
63
- _this2.promise = null;
64
- }, function () {
65
- _this2.promise = null;
66
- });
67
- onChange && onChange(this.resolve, this.reject);
68
- }
17
+ i18NProviderUtils.getI18NComponent = getI18NComponent(props.i18n);
18
+ if (props.tzData) {
19
+ i18NProviderUtils.userDateFormat = userDateFormat(i18NProviderUtils.getI18NValue, props.tzData, props.timeFormat, props.datePattern, props.isEnabledCurrentYear);
69
20
  }
70
- }, {
71
- key: 'render',
72
- value: function render() {
73
- return React.createElement(
74
- I18NContext.Provider,
75
- {
76
- value: {
77
- i18n: this.props.i18n,
78
- direction: this.props.direction,
79
- timeZone: this.props.timeZone,
80
- tzData: getTzData(this.props.tzData),
81
- datePattern: this.props.datePattern,
82
- timeFormat: this.props.timeFormat,
83
- dateTimeFormat: this.props.dateTimeFormat
84
- }
85
- },
86
- this.props.children
87
- );
21
+ }
22
+ componentDidUpdate(prevProps) {
23
+ let {
24
+ i18n,
25
+ timeZone,
26
+ datePattern,
27
+ timeFormat,
28
+ direction,
29
+ onChange,
30
+ tzData,
31
+ isEnabledCurrentYear
32
+ } = this.props;
33
+ if (i18n !== prevProps.i18n || timeZone !== prevProps.timeZone || datePattern !== prevProps.datePattern || timeFormat !== prevProps.timeFormat || direction !== prevProps.direction || tzData !== prevProps.tzData || isEnabledCurrentYear !== prevProps.isEnabledCurrentYear) {
34
+ this.promise = new Promise((res, rej) => {
35
+ this.resolve = res;
36
+ this.reject = rej;
37
+ }).then(() => {
38
+ i18NProviderUtils.getI18NValue = getI18NValue(this.props.i18n);
39
+ i18NProviderUtils.getI18NComponent = getI18NComponent(this.props.i18n);
40
+ if (this.props.tzData) {
41
+ i18NProviderUtils.userDateFormat = userDateFormat(i18NProviderUtils.getI18NValue, this.props.tzData, this.props.timeFormat, this.props.datePattern, this.props.isEnabledCurrentYear);
42
+ }
43
+ this.promise = null;
44
+ }, () => {
45
+ this.promise = null;
46
+ });
47
+ onChange && onChange(this.resolve, this.reject);
88
48
  }
89
- }]);
90
-
91
- return I18NProvider;
92
- }(React.Component);
93
-
94
- export default I18NProvider;
95
-
96
-
49
+ }
50
+ render() {
51
+ return /*#__PURE__*/React.createElement(I18NContext.Provider, {
52
+ value: {
53
+ i18n: this.props.i18n,
54
+ direction: this.props.direction,
55
+ timeZone: this.props.timeZone,
56
+ datePattern: this.props.datePattern,
57
+ timeFormat: this.props.timeFormat,
58
+ isEnabledCurrentYear: this.props.isEnabledCurrentYear,
59
+ tzData: this.props.tzData
60
+ }
61
+ }, this.props.children);
62
+ }
63
+ }
97
64
  I18NProvider.defaultProps = {
98
65
  i18n: emptyObj,
99
66
  timeZone: '',
100
67
  datePattern: '',
101
68
  timeFormat: '',
102
- dateTimeFormat: '',
69
+ isEnabledCurrentYear: '',
103
70
  direction: 'ltr'
104
71
  };
105
-
106
72
  I18NProvider.propTypes = {
107
73
  children: PropTypes.element.isRequired,
108
74
  datePattern: PropTypes.string,
109
- dateTimeFormat: PropTypes.string,
75
+ isEnabledCurrentYear: PropTypes.string,
110
76
  direction: PropTypes.string,
111
77
  i18n: PropTypes.oneOfType([PropTypes.object, PropTypes.func]),
112
78
  onChange: PropTypes.func,
113
79
  timeFormat: PropTypes.string,
114
80
  timeZone: PropTypes.string,
115
- tzData: PropTypes.string
81
+ tzData: PropTypes.object
116
82
  };
@@ -1,57 +1,34 @@
1
- import _extends from 'babel-runtime/helpers/extends';
2
- import _Object$getPrototypeOf from 'babel-runtime/core-js/object/get-prototype-of';
3
- import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
4
- import _createClass from 'babel-runtime/helpers/createClass';
5
- import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
6
- import _inherits from 'babel-runtime/helpers/inherits';
7
1
  import React from 'react';
8
2
  import PropTypes from 'prop-types';
9
- import FormatText from './FormatText';
10
-
11
- var PluralFormat = function (_React$Component) {
12
- _inherits(PluralFormat, _React$Component);
13
-
14
- function PluralFormat() {
15
- _classCallCheck(this, PluralFormat);
16
-
17
- return _possibleConstructorReturn(this, (PluralFormat.__proto__ || _Object$getPrototypeOf(PluralFormat)).apply(this, arguments));
18
- }
19
-
20
- _createClass(PluralFormat, [{
21
- key: 'render',
22
- value: function render() {
23
- var _props = this.props,
24
- one = _props.one,
25
- many = _props.many,
26
- zero = _props.zero,
27
- value = _props.value;
28
-
29
- var key = '',
30
- values = '';
31
- if (value > 1) {
32
- key = many;
33
- } else if (value == 1) {
34
- key = one;
35
- } else if (value == 0) {
36
- key = zero;
37
- }
38
- values = '' + value;
39
-
40
- return React.createElement(FormatText, _extends({}, this.props, {
41
- i18NKey: key,
42
- values: values,
43
- one: null,
44
- many: null,
45
- zero: null
46
- }));
3
+ import FormatText from "./FormatText";
4
+ export default class PluralFormat extends React.Component {
5
+ render() {
6
+ const {
7
+ one,
8
+ many,
9
+ zero,
10
+ value
11
+ } = this.props;
12
+ let key = '',
13
+ values = '';
14
+ if (value > 1) {
15
+ key = many;
16
+ } else if (value == 1) {
17
+ key = one;
18
+ } else if (value == 0) {
19
+ key = zero;
47
20
  }
48
- }]);
49
-
50
- return PluralFormat;
51
- }(React.Component);
52
-
53
- export default PluralFormat;
54
-
21
+ values = `${value}`;
22
+ return /*#__PURE__*/React.createElement(FormatText, {
23
+ ...this.props,
24
+ i18NKey: key,
25
+ values: values,
26
+ one: null,
27
+ many: null,
28
+ zero: null
29
+ });
30
+ }
31
+ }
55
32
  PluralFormat.propTypes = {
56
33
  many: PropTypes.string,
57
34
  one: PropTypes.string,
@@ -1,93 +1,78 @@
1
- import _Object$getPrototypeOf from 'babel-runtime/core-js/object/get-prototype-of';
2
- import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
3
- import _createClass from 'babel-runtime/helpers/createClass';
4
- import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
5
- import _inherits from 'babel-runtime/helpers/inherits';
6
1
  import React, { Component } from 'react';
7
2
  import PropTypes from 'prop-types';
8
- import DateTimeDiffFormat from './DateTimeDiffFormat';
9
- import { I18NContext } from '../I18NContext';
10
-
11
- var UserTimeDiffFormat = function (_Component) {
12
- _inherits(UserTimeDiffFormat, _Component);
13
-
14
- function UserTimeDiffFormat() {
15
- _classCallCheck(this, UserTimeDiffFormat);
16
-
17
- return _possibleConstructorReturn(this, (UserTimeDiffFormat.__proto__ || _Object$getPrototypeOf(UserTimeDiffFormat)).apply(this, arguments));
18
- }
19
-
20
- _createClass(UserTimeDiffFormat, [{
21
- key: 'render',
22
- value: function render() {
23
- var currentTime = new Date();
24
- var currentTimeUTCString = currentTime.toISOString();
25
- var _props = this.props,
26
- type = _props.type,
27
- page = _props.page,
28
- to = _props.to,
29
- today = _props.today,
30
- yesterday = _props.yesterday,
31
- tomorrow = _props.tomorrow,
32
- others = _props.others,
33
- ago = _props.ago,
34
- later = _props.later,
35
- format = _props.format,
36
- title = _props.title,
37
- className = _props.className,
38
- displayType = _props.displayType,
39
- dataId = _props.dataId,
40
- isOverdue = _props.isOverdue;
41
-
42
- var _ref = this.context || {},
43
- tzData = _ref.tzData,
44
- timeFormat = _ref.timeFormat,
45
- datePattern = _ref.datePattern,
46
- dateTimeFormat = _ref.dateTimeFormat,
47
- timeZone = _ref.timeZone;
48
-
49
- if (!format && !others) {
50
- var pattern = displayType === 'date' ? datePattern : displayType === 'time' ? timeFormat : displayType === 'dateTime' ? dateTimeFormat : '';
51
- format = function format() {
52
- return pattern;
53
- };
54
- }
55
-
56
- var tz = tzData || timeZone;
57
-
58
- return React.createElement(DateTimeDiffFormat, {
59
- type: type,
60
- page: page,
61
- from: currentTimeUTCString,
62
- fromTzData: tz,
63
- to: to,
64
- toTzData: tz,
65
- today: today,
66
- yesterday: yesterday,
67
- tomorrow: tomorrow,
68
- others: others,
69
- ago: ago,
70
- later: later,
71
- format: format,
72
- title: title,
73
- className: className,
74
- dataId: dataId,
75
- isOverdue: isOverdue
76
- });
3
+ import DateTimeDiffFormat from "./DateTimeDiffFormat";
4
+ import { I18NContext } from "../I18NContext";
5
+ export default class UserTimeDiffFormat extends Component {
6
+ render() {
7
+ let currentTime = new Date();
8
+ let currentTimeUTCString = currentTime.toISOString();
9
+ let {
10
+ type,
11
+ page,
12
+ isNeedTime,
13
+ to,
14
+ today,
15
+ yesterday,
16
+ tomorrow,
17
+ others,
18
+ ago,
19
+ later,
20
+ format,
21
+ title,
22
+ className,
23
+ displayType,
24
+ dataId,
25
+ isOverdue,
26
+ isDateField
27
+ } = this.props;
28
+ let {
29
+ tzData,
30
+ timeFormat,
31
+ datePattern,
32
+ isEnabledCurrentYear
33
+ } = this.context || {};
34
+ if (!format && !others) {
35
+ format = ({
36
+ dateTimeFormat,
37
+ dateFormat,
38
+ timeFormat
39
+ }) => {
40
+ displayType === 'dateTime' ? dateTimeFormat : displayType === 'date' ? dateFormat : timeFormat;
41
+ };
77
42
  }
78
- }]);
79
-
80
- return UserTimeDiffFormat;
81
- }(Component);
82
-
83
- export default UserTimeDiffFormat;
84
-
43
+ return /*#__PURE__*/React.createElement(DateTimeDiffFormat, {
44
+ type: type,
45
+ page: page,
46
+ isNeedTime: isNeedTime,
47
+ from: currentTimeUTCString,
48
+ fromTzData: tzData,
49
+ to: to,
50
+ toTzData: tzData,
51
+ today: today,
52
+ yesterday: yesterday,
53
+ tomorrow: tomorrow,
54
+ others: others,
55
+ ago: ago,
56
+ later: later,
57
+ format: format,
58
+ title: title,
59
+ className: className,
60
+ dataId: dataId,
61
+ isOverdue: isOverdue,
62
+ timeFormat: timeFormat,
63
+ datePattern: datePattern,
64
+ isEnabledCurrentYear: isEnabledCurrentYear,
65
+ isDateField: isDateField
66
+ });
67
+ }
68
+ }
85
69
  UserTimeDiffFormat.propTypes = {
86
70
  ago: PropTypes.string,
87
71
  className: PropTypes.string,
88
72
  dataId: PropTypes.string,
89
73
  displayType: PropTypes.oneOf(['date', 'time', 'dateTime']),
90
74
  format: PropTypes.func,
75
+ isDateField: PropTypes.bool,
91
76
  later: PropTypes.string,
92
77
  others: PropTypes.func,
93
78
  title: PropTypes.string,