tg-core-components 6.1.4 → 6.1.9-intl-test.0
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.
- package/es/lib/utils/translate.js +2 -4
- package/es/widgets/Cashier/Deposit/PaymentForm/index.js +5 -1
- package/es/widgets/CashierAccordion/Payment/PaymentAccountForms/index.js +5 -5
- package/lib/lib/utils/translate.js +2 -4
- package/lib/widgets/Cashier/Deposit/PaymentForm/index.js +5 -1
- package/lib/widgets/CashierAccordion/Payment/PaymentAccountForms/index.js +5 -5
- package/package.json +2 -2
|
@@ -2,15 +2,13 @@ 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
|
-
|
|
7
5
|
var translate = function translate(_ref, intl) {
|
|
8
6
|
var id = _ref.id,
|
|
9
7
|
values = _ref.values,
|
|
10
8
|
rest = _objectWithoutProperties(_ref, ['id', 'values']);
|
|
11
9
|
|
|
12
10
|
var cacheId = id + (JSON.stringify(values) || '');
|
|
13
|
-
if (cache[cacheId]) return cache[cacheId];
|
|
11
|
+
if (cache[intl.locale][cacheId]) return cache[cacheId];
|
|
14
12
|
|
|
15
13
|
var g = typeof window !== 'undefined' && window || typeof global !== 'undefined' && global || {};
|
|
16
14
|
|
|
@@ -19,7 +17,7 @@ var translate = function translate(_ref, intl) {
|
|
|
19
17
|
if (g.showTranslations || !intl || !intl.formatMessage) return id;
|
|
20
18
|
|
|
21
19
|
var message = intl.formatMessage(_extends({ id: id }, rest), values);
|
|
22
|
-
cache[cacheId] = message;
|
|
20
|
+
cache[intl.locale][cacheId] = message;
|
|
23
21
|
return message;
|
|
24
22
|
};
|
|
25
23
|
|
|
@@ -133,7 +133,11 @@ var PaymentForm = function (_Component) {
|
|
|
133
133
|
|
|
134
134
|
if (data.redirectOutput == null) {
|
|
135
135
|
if (onSuccess) {
|
|
136
|
-
onSuccess(
|
|
136
|
+
onSuccess({
|
|
137
|
+
amount: data.amount,
|
|
138
|
+
currency: data.currency,
|
|
139
|
+
tx: Number(data.transactionId)
|
|
140
|
+
});
|
|
137
141
|
return null;
|
|
138
142
|
}
|
|
139
143
|
|
|
@@ -542,12 +542,12 @@ var BankIntl = function BankIntl(_ref9) {
|
|
|
542
542
|
{ className: 'payment-account-info' },
|
|
543
543
|
React.createElement(Input, {
|
|
544
544
|
required: true,
|
|
545
|
-
name: '
|
|
546
|
-
value: account.accountId ? account.maskedAccount.replace(/\d*-/g, '') : values['
|
|
547
|
-
onChange: function onChange(e,
|
|
548
|
-
return change('
|
|
545
|
+
name: 'iban',
|
|
546
|
+
value: account.accountId ? account.maskedAccount.replace(/\d*-/g, '') : values['iban'],
|
|
547
|
+
onChange: function onChange(e, iban) {
|
|
548
|
+
return change('iban', iban);
|
|
549
549
|
},
|
|
550
|
-
label: translate({ id: 'cashier.details.
|
|
550
|
+
label: translate({ id: 'cashier.details.iban' }, intl),
|
|
551
551
|
disabled: account.accountId
|
|
552
552
|
}),
|
|
553
553
|
React.createElement(Input, {
|
|
@@ -8,15 +8,13 @@ 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
|
-
|
|
13
11
|
var translate = function translate(_ref, intl) {
|
|
14
12
|
var id = _ref.id,
|
|
15
13
|
values = _ref.values,
|
|
16
14
|
rest = _objectWithoutProperties(_ref, ['id', 'values']);
|
|
17
15
|
|
|
18
16
|
var cacheId = id + (JSON.stringify(values) || '');
|
|
19
|
-
if (cache[cacheId]) return cache[cacheId];
|
|
17
|
+
if (cache[intl.locale][cacheId]) return cache[cacheId];
|
|
20
18
|
|
|
21
19
|
var g = typeof window !== 'undefined' && window || typeof global !== 'undefined' && global || {};
|
|
22
20
|
|
|
@@ -25,7 +23,7 @@ var translate = function translate(_ref, intl) {
|
|
|
25
23
|
if (g.showTranslations || !intl || !intl.formatMessage) return id;
|
|
26
24
|
|
|
27
25
|
var message = intl.formatMessage(_extends({ id: id }, rest), values);
|
|
28
|
-
cache[cacheId] = message;
|
|
26
|
+
cache[intl.locale][cacheId] = message;
|
|
29
27
|
return message;
|
|
30
28
|
};
|
|
31
29
|
|
|
@@ -165,7 +165,11 @@ var PaymentForm = function (_Component) {
|
|
|
165
165
|
|
|
166
166
|
if (data.redirectOutput == null) {
|
|
167
167
|
if (onSuccess) {
|
|
168
|
-
onSuccess(
|
|
168
|
+
onSuccess({
|
|
169
|
+
amount: data.amount,
|
|
170
|
+
currency: data.currency,
|
|
171
|
+
tx: Number(data.transactionId)
|
|
172
|
+
});
|
|
169
173
|
return null;
|
|
170
174
|
}
|
|
171
175
|
|
|
@@ -585,12 +585,12 @@ var BankIntl = function BankIntl(_ref9) {
|
|
|
585
585
|
{ className: 'payment-account-info' },
|
|
586
586
|
_react2.default.createElement(_Input2.default, {
|
|
587
587
|
required: true,
|
|
588
|
-
name: '
|
|
589
|
-
value: account.accountId ? account.maskedAccount.replace(/\d*-/g, '') : values['
|
|
590
|
-
onChange: function onChange(e,
|
|
591
|
-
return change('
|
|
588
|
+
name: 'iban',
|
|
589
|
+
value: account.accountId ? account.maskedAccount.replace(/\d*-/g, '') : values['iban'],
|
|
590
|
+
onChange: function onChange(e, iban) {
|
|
591
|
+
return change('iban', iban);
|
|
592
592
|
},
|
|
593
|
-
label: (0, _translate2.default)({ id: 'cashier.details.
|
|
593
|
+
label: (0, _translate2.default)({ id: 'cashier.details.iban' }, intl),
|
|
594
594
|
disabled: account.accountId
|
|
595
595
|
}),
|
|
596
596
|
_react2.default.createElement(_Input2.default, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tg-core-components",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.9-intl-test.0",
|
|
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": "bd658b78122bffa4c97e4e9bcb7a6577b319b265"
|
|
80
80
|
}
|