tg-core-components 6.1.9-intl-test.0 → 6.1.9
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.
|
@@ -2,13 +2,15 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
|
|
|
2
2
|
|
|
3
3
|
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
|
4
4
|
|
|
5
|
+
var cache = {};
|
|
6
|
+
|
|
5
7
|
var translate = function translate(_ref, intl) {
|
|
6
8
|
var id = _ref.id,
|
|
7
9
|
values = _ref.values,
|
|
8
10
|
rest = _objectWithoutProperties(_ref, ['id', 'values']);
|
|
9
11
|
|
|
10
12
|
var cacheId = id + (JSON.stringify(values) || '');
|
|
11
|
-
if (cache[
|
|
13
|
+
if (cache[cacheId]) return cache[cacheId];
|
|
12
14
|
|
|
13
15
|
var g = typeof window !== 'undefined' && window || typeof global !== 'undefined' && global || {};
|
|
14
16
|
|
|
@@ -17,7 +19,7 @@ var translate = function translate(_ref, intl) {
|
|
|
17
19
|
if (g.showTranslations || !intl || !intl.formatMessage) return id;
|
|
18
20
|
|
|
19
21
|
var message = intl.formatMessage(_extends({ id: id }, rest), values);
|
|
20
|
-
cache[
|
|
22
|
+
cache[cacheId] = message;
|
|
21
23
|
return message;
|
|
22
24
|
};
|
|
23
25
|
|
|
@@ -54,7 +54,7 @@ var ActivationCode = function ActivationCode(_ref) {
|
|
|
54
54
|
}, [autoFocus, code]);
|
|
55
55
|
|
|
56
56
|
useEffect(function () {
|
|
57
|
-
|
|
57
|
+
inputRef.current.value = code;
|
|
58
58
|
}, [code]);
|
|
59
59
|
|
|
60
60
|
var setCaretPosition = function setCaretPosition(from, to) {
|
|
@@ -8,13 +8,15 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
|
|
|
8
8
|
|
|
9
9
|
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
|
10
10
|
|
|
11
|
+
var cache = {};
|
|
12
|
+
|
|
11
13
|
var translate = function translate(_ref, intl) {
|
|
12
14
|
var id = _ref.id,
|
|
13
15
|
values = _ref.values,
|
|
14
16
|
rest = _objectWithoutProperties(_ref, ['id', 'values']);
|
|
15
17
|
|
|
16
18
|
var cacheId = id + (JSON.stringify(values) || '');
|
|
17
|
-
if (cache[
|
|
19
|
+
if (cache[cacheId]) return cache[cacheId];
|
|
18
20
|
|
|
19
21
|
var g = typeof window !== 'undefined' && window || typeof global !== 'undefined' && global || {};
|
|
20
22
|
|
|
@@ -23,7 +25,7 @@ var translate = function translate(_ref, intl) {
|
|
|
23
25
|
if (g.showTranslations || !intl || !intl.formatMessage) return id;
|
|
24
26
|
|
|
25
27
|
var message = intl.formatMessage(_extends({ id: id }, rest), values);
|
|
26
|
-
cache[
|
|
28
|
+
cache[cacheId] = message;
|
|
27
29
|
return message;
|
|
28
30
|
};
|
|
29
31
|
|
|
@@ -93,7 +93,7 @@ var ActivationCode = function ActivationCode(_ref) {
|
|
|
93
93
|
}, [autoFocus, code]);
|
|
94
94
|
|
|
95
95
|
(0, _react.useEffect)(function () {
|
|
96
|
-
|
|
96
|
+
inputRef.current.value = code;
|
|
97
97
|
}, [code]);
|
|
98
98
|
|
|
99
99
|
var setCaretPosition = function setCaretPosition(from, to) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tg-core-components",
|
|
3
|
-
"version": "6.1.9
|
|
3
|
+
"version": "6.1.9",
|
|
4
4
|
"description": "tg-core-components",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"webpack": "^3.0.0",
|
|
77
77
|
"webpack-blocks": "^1.0.0"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "18858f7706eb4bb71d9d1585741eb6fb2b60cb72"
|
|
80
80
|
}
|