tg-core-components 5.4.5-bethard → 5.5.1-master

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 (105) hide show
  1. package/es/components/AcceptUpdatedTaC/index.js +8 -3
  2. package/es/components/Checkbox/index.js +93 -0
  3. package/es/components/Deposit/CardInput/index.js +1 -3
  4. package/es/components/Input/index.js +222 -22
  5. package/es/components/InputWrapper/index.js +69 -0
  6. package/es/components/Notification.js +4 -4
  7. package/es/components/Select/index.js +202 -64
  8. package/es/components/Select/test.js +111 -0
  9. package/es/index.js +2 -2
  10. package/es/lib/utils/translate.js +1 -8
  11. package/es/misc/countryEmojiFlags.js +0 -1
  12. package/es/widgets/AccountDetail/index.js +53 -77
  13. package/es/widgets/ActivateWidget/index.js +59 -293
  14. package/es/widgets/BonusWidget/BonusCode.js +24 -17
  15. package/es/widgets/BonusWidget/index.js +83 -45
  16. package/es/widgets/Cashier/Payment/index.js +2 -0
  17. package/es/widgets/CashierAccordion/Deposit/BonusCodeInput/index.js +9 -6
  18. package/es/widgets/CashierAccordion/Deposit/DepositWidget/index.js +22 -33
  19. package/es/widgets/CashierAccordion/Deposit/PaymentForm/index.js +2 -6
  20. package/es/widgets/CashierAccordion/Payment/PaymentAccountForms/astroPayBankTransaltions.js +12 -0
  21. package/es/widgets/CashierAccordion/Payment/PaymentAccountForms/index.js +163 -347
  22. package/es/widgets/CashierAccordion/Payment/PaymentAccountParser.js +0 -6
  23. package/es/widgets/CashierAccordion/Payment/PaymentMethodSelector/index.js +2 -2
  24. package/es/widgets/CashierAccordion/Payment/index.js +2 -0
  25. package/es/widgets/CashierAccordion/Withdraw/WithdrawWidget/index.js +9 -23
  26. package/es/widgets/ChangePassword/index.js +53 -40
  27. package/es/widgets/HistoryWidget/index.js +69 -51
  28. package/es/widgets/HistoryWidget/message.js +17 -20
  29. package/es/widgets/RequestResetPassword/index.js +15 -14
  30. package/es/widgets/ResetPassword/index.js +22 -18
  31. package/es/widgets/ResponsibleGamingAccordion/LimitStatus/index.js +5 -2
  32. package/es/widgets/ResponsibleGamingAccordion/PeriodItemContent/index.js +1 -2
  33. package/es/widgets/ResponsibleGamingSingleSignUp/AmountItem/index.js +1 -2
  34. package/es/widgets/ResponsibleGamingWidget/Timespan.js +14 -24
  35. package/es/widgets/ResponsibleGamingWidget/helpers.js +2 -2
  36. package/es/widgets/ResponsibleGamingWidget/validate.js +2 -6
  37. package/es/widgets/Settings/index.js +2 -2
  38. package/es/widgets/SignIn/SignInForm.js +4 -6
  39. package/es/widgets/SignIn/index.js +21 -21
  40. package/es/widgets/SignUp/ContactInfoStep.js +5 -6
  41. package/es/widgets/SportsbookSettings/index.js +10 -24
  42. package/es/widgets/Subscriptions/index.js +3 -5
  43. package/lib/components/AcceptUpdatedTaC/index.js +11 -3
  44. package/lib/components/Checkbox/index.js +106 -0
  45. package/lib/components/Deposit/CardInput/index.js +1 -3
  46. package/lib/components/Input/index.js +223 -26
  47. package/lib/components/InputWrapper/index.js +85 -0
  48. package/lib/components/Notification.js +3 -3
  49. package/lib/components/Select/index.js +209 -63
  50. package/lib/components/Select/test.js +121 -0
  51. package/lib/index.js +7 -7
  52. package/lib/lib/utils/translate.js +1 -8
  53. package/lib/misc/countryEmojiFlags.js +0 -1
  54. package/lib/widgets/AccountDetail/index.js +53 -86
  55. package/lib/widgets/ActivateWidget/index.js +58 -305
  56. package/lib/widgets/BonusWidget/BonusCode.js +24 -20
  57. package/lib/widgets/BonusWidget/index.js +85 -44
  58. package/lib/widgets/Cashier/Payment/index.js +2 -0
  59. package/lib/widgets/CashierAccordion/Deposit/BonusCodeInput/index.js +13 -7
  60. package/lib/widgets/CashierAccordion/Deposit/DepositWidget/index.js +25 -36
  61. package/lib/widgets/CashierAccordion/Deposit/PaymentForm/index.js +2 -9
  62. package/lib/widgets/CashierAccordion/Payment/PaymentAccountForms/astroPayBankTransaltions.js +12 -0
  63. package/lib/widgets/CashierAccordion/Payment/PaymentAccountForms/index.js +195 -378
  64. package/lib/widgets/CashierAccordion/Payment/PaymentAccountParser.js +0 -6
  65. package/lib/widgets/CashierAccordion/Payment/PaymentMethodSelector/index.js +2 -2
  66. package/lib/widgets/CashierAccordion/Payment/index.js +2 -0
  67. package/lib/widgets/CashierAccordion/Withdraw/WithdrawWidget/index.js +11 -25
  68. package/lib/widgets/ChangePassword/index.js +53 -43
  69. package/lib/widgets/HistoryWidget/index.js +69 -51
  70. package/lib/widgets/HistoryWidget/message.js +17 -20
  71. package/lib/widgets/RequestResetPassword/index.js +15 -17
  72. package/lib/widgets/ResetPassword/index.js +25 -21
  73. package/lib/widgets/ResponsibleGamingAccordion/LimitStatus/index.js +5 -2
  74. package/lib/widgets/ResponsibleGamingAccordion/PeriodItemContent/index.js +1 -2
  75. package/lib/widgets/ResponsibleGamingSingleSignUp/AmountItem/index.js +1 -2
  76. package/lib/widgets/ResponsibleGamingWidget/Timespan.js +14 -24
  77. package/lib/widgets/ResponsibleGamingWidget/helpers.js +2 -2
  78. package/lib/widgets/ResponsibleGamingWidget/validate.js +2 -6
  79. package/lib/widgets/Settings/index.js +6 -6
  80. package/lib/widgets/SignIn/SignInForm.js +7 -6
  81. package/lib/widgets/SignIn/index.js +25 -25
  82. package/lib/widgets/SignUp/ContactInfoStep.js +8 -6
  83. package/lib/widgets/SportsbookSettings/index.js +10 -24
  84. package/lib/widgets/Subscriptions/index.js +3 -11
  85. package/package.json +8 -3
  86. package/es/components/AutocompleteInput/index.js +0 -104
  87. package/es/components/Input/BirthdateInput.js +0 -174
  88. package/es/components/Input/Checkbox.js +0 -51
  89. package/es/components/Input/Input.js +0 -73
  90. package/es/components/Input/PasswordInput.js +0 -84
  91. package/es/components/Input/PhoneNumberInput.js +0 -113
  92. package/es/components/Input/input.test.js +0 -80
  93. package/es/components/Input/old-input.test.js +0 -100
  94. package/es/components/common.js +0 -339
  95. package/es/widgets/CashierAccordion/Deposit/PaymentForm/NewTab.js +0 -28
  96. package/lib/components/AutocompleteInput/index.js +0 -118
  97. package/lib/components/Input/BirthdateInput.js +0 -195
  98. package/lib/components/Input/Checkbox.js +0 -65
  99. package/lib/components/Input/Input.js +0 -87
  100. package/lib/components/Input/PasswordInput.js +0 -101
  101. package/lib/components/Input/PhoneNumberInput.js +0 -130
  102. package/lib/components/Input/input.test.js +0 -89
  103. package/lib/components/Input/old-input.test.js +0 -107
  104. package/lib/components/common.js +0 -359
  105. package/lib/widgets/CashierAccordion/Deposit/PaymentForm/NewTab.js +0 -44
@@ -1,69 +1,207 @@
1
- var _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; };
1
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
2
2
 
3
- import React from 'react';
4
- import { Select, useId, useValue, useFocus, useTouched, useAutofill, createClassName, statusIcons, flatObj } from '../common';
3
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4
+
5
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
6
+
7
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
8
+
9
+ import React, { PureComponent } from 'react';
10
+ import Icon from '../Icon';
11
+ import InputWrapper from '../InputWrapper';
12
+ import PropTypes from 'prop-types';
5
13
  import cn from 'classnames';
6
14
 
7
- var TGSelect = function TGSelect(props) {
8
- var select = {
9
- id: useId(),
10
- value: useValue(props.value),
11
- focus: useFocus(),
12
- touched: useTouched(),
13
- autofill: useAutofill()
14
- };
15
-
16
- var _onChange = function _onChange(e) {
17
- return props.onChange && props.onChange(e, e.target.value);
18
- };
19
-
20
- var _onBlur = function _onBlur(e) {
21
- return props.onBlur && props.onBlur(e, e.target.value);
22
- };
23
-
24
- var className = createClassName('tg-select', {
25
- hasValue: select.value.hasValue,
26
- hasLabel: Boolean(props.label),
27
- hasFocus: select.focus.hasFocus,
28
- hasAutofill: select.autofill.hasAutofill,
29
- disabled: props.disabled,
30
- status: props.status
31
- });
32
-
33
- return React.createElement(
34
- 'div',
35
- { className: cn(props.className, className) },
36
- React.createElement(
37
- Select,
38
- _extends({}, props, flatObj(select), {
39
- onChange: function onChange(e) {
40
- select.value.onChange(e.target.value);
41
- _onChange(e);
42
- },
43
- onFocus: function onFocus() {
44
- select.focus.onFocus();
45
- select.touched.onFocus();
46
- },
47
- onBlur: function onBlur(e) {
48
- select.focus.onBlur();
49
- _onBlur(e);
50
- },
51
- leadingLane: [props.icon].filter(function (i) {
52
- return i;
53
- }),
54
- trailingLane: [statusIcons[props.status]].filter(function (i) {
55
- return i;
56
- }) }),
57
- props.children
58
- ),
59
- React.createElement(
60
- 'div',
61
- { className: 'tg-select__status-text' },
62
- props.statusText
63
- )
64
- );
15
+ var Select = function (_PureComponent) {
16
+ _inherits(Select, _PureComponent);
17
+
18
+ function Select(props) {
19
+ _classCallCheck(this, Select);
20
+
21
+ var _this = _possibleConstructorReturn(this, (Select.__proto__ || Object.getPrototypeOf(Select)).call(this, props));
22
+
23
+ _this._generateOptions = function () {
24
+ var _this$props = _this.props,
25
+ options = _this$props.options,
26
+ require = _this$props.require,
27
+ placeholder = _this$props.placeholder;
28
+ var isFocusing = _this.state.isFocusing;
29
+
30
+
31
+ if (!options) return false;
32
+
33
+ var selectOptions = options.map(function (item, index) {
34
+ if (Array.isArray(item.value)) {
35
+ return React.createElement(
36
+ 'optgroup',
37
+ { label: item.label },
38
+ item.value.map(function (v, i) {
39
+ return React.createElement(
40
+ 'option',
41
+ { key: i, value: v.value },
42
+ v.label || v
43
+ );
44
+ })
45
+ );
46
+ }
47
+
48
+ return React.createElement(
49
+ 'option',
50
+ { key: index, value: item.value },
51
+ item.label || item
52
+ );
53
+ });
54
+
55
+ if (placeholder) selectOptions.unshift(React.createElement(
56
+ 'option',
57
+ { key: 'placeholder', disabled: isFocusing && require },
58
+ placeholder
59
+ ));
60
+
61
+ return selectOptions;
62
+ };
63
+
64
+ _this._handleChange = function (e) {
65
+ var _this$props2 = _this.props,
66
+ onChange = _this$props2.onChange,
67
+ name = _this$props2.name;
68
+
69
+ var value = e.currentTarget.value;
70
+
71
+ _this.setState({
72
+ value: value,
73
+ hasValue: !!value
74
+ });
75
+
76
+ onChange && onChange(e, name, value);
77
+ };
78
+
79
+ _this._handleFocus = function () {
80
+ _this.setState({
81
+ isFocusing: true
82
+ });
83
+ };
84
+
85
+ _this._handleBlur = function () {
86
+ var onBlur = _this.props.onBlur;
87
+ var value = _this.state.value;
88
+
89
+
90
+ _this.setState({
91
+ isFocusing: false
92
+ });
93
+
94
+ onBlur && onBlur(value);
95
+ };
96
+
97
+ _this.state = {
98
+ isFocusing: false,
99
+ value: '',
100
+ hasValue: false
101
+ };
102
+ return _this;
103
+ }
104
+
105
+ _createClass(Select, [{
106
+ key: 'componentDidMount',
107
+ value: function componentDidMount() {
108
+ var _props = this.props,
109
+ placeholder = _props.placeholder,
110
+ options = _props.options;
111
+
112
+
113
+ var value = this.props.value;
114
+
115
+ if (!value && !placeholder && options) {
116
+ value = options[0].value || options[0];
117
+ }
118
+
119
+ this.setState({ value: value, hasValue: !!value });
120
+ }
121
+ }, {
122
+ key: 'componentDidUpdate',
123
+ value: function componentDidUpdate(prevProps) {
124
+ if (this.props.value !== prevProps.value) {
125
+ this.setState({ value: this.props.value, hasValue: !!this.props.value });
126
+ }
127
+ }
128
+ }, {
129
+ key: 'render',
130
+ value: function render() {
131
+ var _props2 = this.props,
132
+ className = _props2.className,
133
+ title = _props2.title,
134
+ name = _props2.name,
135
+ error = _props2.error,
136
+ disabled = _props2.disabled,
137
+ require = _props2.require;
138
+ var _state = this.state,
139
+ hasValue = _state.hasValue,
140
+ value = _state.value,
141
+ isFocusing = _state.isFocusing;
142
+
143
+
144
+ return React.createElement(
145
+ InputWrapper,
146
+ {
147
+ title: title,
148
+ className: className,
149
+ hasValue: hasValue,
150
+ isFocusing: isFocusing,
151
+ error: error,
152
+ disabled: disabled,
153
+ require: require },
154
+ React.createElement(
155
+ 'select',
156
+ {
157
+ disabled: disabled,
158
+ name: name,
159
+ value: value,
160
+ onChange: this._handleChange,
161
+ onFocus: this._handleFocus,
162
+ onBlur: this._handleBlur },
163
+ this._generateOptions()
164
+ ),
165
+ React.createElement(
166
+ 'div',
167
+ { className: cn('select-icon', { 'opa-d5': disabled }) },
168
+ React.createElement(Icon, { icon: 'angle-down' })
169
+ )
170
+ );
171
+ }
172
+ }]);
173
+
174
+ return Select;
175
+ }(PureComponent);
176
+
177
+ Select.propTypes = {
178
+ /** Determine if select is disable */
179
+ disabled: PropTypes.bool,
180
+ /** Title to show above the select */
181
+ title: PropTypes.string,
182
+ /** Error message to display */
183
+ error: PropTypes.string,
184
+ /** Name of the element */
185
+ name: PropTypes.string,
186
+ /** Determine if the select is required */
187
+ require: PropTypes.bool,
188
+ /** Optional className passed in as props */
189
+ className: PropTypes.string,
190
+ /** Placeholder */
191
+ placeholder: PropTypes.string,
192
+ /** Manually pick the default selected option */
193
+ value: PropTypes.string
194
+ };
195
+
196
+ Select.defaultProps = {
197
+ disabled: false,
198
+ title: '',
199
+ error: '',
200
+ name: '',
201
+ require: false,
202
+ className: '',
203
+ value: '',
204
+ placeholder: ''
65
205
  };
66
- TGSelect.Option = Select.Option;
67
- TGSelect.OptGroup = Select.OptGroup;
68
206
 
69
- export default TGSelect;
207
+ export default Select;
@@ -0,0 +1,111 @@
1
+ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
2
+
3
+ import React from 'react';
4
+ import { render, unmountComponentAtNode } from 'react-dom';
5
+ import { act } from 'react-dom/test-utils';
6
+
7
+ import Select from './index';
8
+
9
+ var container = null;
10
+ beforeEach(function () {
11
+ // setup a DOM element as a render target
12
+ container = document.createElement('div');
13
+ document.body.appendChild(container);
14
+ });
15
+
16
+ afterEach(function () {
17
+ // cleanup on exiting
18
+ unmountComponentAtNode(container);
19
+ container.remove();
20
+ container = null;
21
+ });
22
+
23
+ describe('renders with correct options', function () {
24
+ it('with only options', function () {
25
+ act(function () {
26
+ render(React.createElement(Select, { options: ['Male', 'Female'] }), container);
27
+ });
28
+ expect([].concat(_toConsumableArray(container.querySelectorAll('option'))).map(function (o) {
29
+ return o.textContent;
30
+ }).join(',')).toBe('Male,Female');
31
+ });
32
+
33
+ it('with preset value and placeholder', function () {
34
+ act(function () {
35
+ render(React.createElement(Select, {
36
+ options: ['Male', 'Female'],
37
+ value: 'Female',
38
+ placeholder: 'Gender'
39
+ }), container);
40
+ });
41
+ expect([].concat(_toConsumableArray(container.querySelectorAll('option'))).map(function (o) {
42
+ return o.textContent;
43
+ }).join(',')).toBe('Gender,Male,Female');
44
+ });
45
+ });
46
+
47
+ describe('renders with correct initial value', function () {
48
+ it('with only options', function () {
49
+ act(function () {
50
+ render(React.createElement(Select, { options: ['Male', 'Female'] }), container);
51
+ });
52
+ expect(container.querySelector('select').value).toBe('Male');
53
+ });
54
+
55
+ it('with preset value', function () {
56
+ act(function () {
57
+ render(React.createElement(Select, { options: ['Male', 'Female'], value: 'Female' }), container);
58
+ });
59
+ expect(container.querySelector('select').value).toBe('Female');
60
+ });
61
+ });
62
+
63
+ describe('renders with correct placeholder value', function () {
64
+ it('with placeholder', function () {
65
+ act(function () {
66
+ render(React.createElement(Select, { options: ['Male', 'Female'], placeholder: 'Gender' }), container);
67
+ });
68
+ expect(container.querySelector('select').value).toBe('Gender');
69
+ });
70
+
71
+ it('with preset value title and placeholder', function () {
72
+ act(function () {
73
+ render(React.createElement(Select, {
74
+ options: ['Male', 'Female'],
75
+ value: 'Female',
76
+ title: 'What is your gender',
77
+ placeholder: 'gender'
78
+ }), container);
79
+ });
80
+ expect(container.querySelector('select').value).toBe('Female');
81
+ });
82
+ });
83
+
84
+ describe('renders with correct placeholder value', function () {
85
+ it('with placeholder and require', function () {
86
+ act(function () {
87
+ render(React.createElement(Select, { options: ['Male', 'Female'], placeholder: 'Gender', require: true }), container);
88
+ });
89
+ expect(container.querySelector('select').value).toBe('Gender');
90
+ });
91
+
92
+ it('with preset value, title, placeholder and require', function () {
93
+ act(function () {
94
+ render(React.createElement(Select, {
95
+ options: ['Male', 'Female'],
96
+ value: 'Male',
97
+ title: 'What is your gender',
98
+ placeholder: 'gender',
99
+ require: true
100
+ }), container);
101
+ });
102
+ expect(container.querySelector('select').value).toBe('Male');
103
+ });
104
+
105
+ it('with placeholder and require', function () {
106
+ act(function () {
107
+ render(React.createElement(Select, { options: ['Male', 'Female'], placeholder: 'Gender', require: true }), container);
108
+ });
109
+ expect(container.querySelector('select').value).toBe('Gender');
110
+ });
111
+ });
package/es/index.js CHANGED
@@ -3,6 +3,7 @@ import AcceptUpdatedTaC from './components/AcceptUpdatedTaC';
3
3
  import Alert from './components/Alert';
4
4
  import Button from './components/Button';
5
5
  import ButtonLoader from './components/ButtonLoader';
6
+ import Checkbox from './components/Checkbox';
6
7
  import Checklist from './components/Checklist';
7
8
  import Icon from './components/Icon';
8
9
  import Image from './components/Image';
@@ -20,7 +21,6 @@ import List from './components/List';
20
21
  import Translate from './components/Translate';
21
22
  import Picture from './components/Picture';
22
23
  import Skeleton from './components/Skeleton';
23
- import AutocompleteInput from './components/AutocompleteInput';
24
24
 
25
25
  // widgets
26
26
  import AccordionWidget from './widgets/AccordionWidget';
@@ -55,4 +55,4 @@ import VerifyAccordionWidget from './widgets/VerifyAccordionWidget';
55
55
  // misc
56
56
  import countryEmojiFlags from './misc/countryEmojiFlags';
57
57
 
58
- export { AcceptUpdatedTaC, Alert, Button, ButtonLoader, Checklist, Icon, Image, Input, InternalMessagesInbox, Loader, Money, Notification, Radio, Select, Single, Textarea, Uploader, AccordionWidget, AccountDetail, ActivateWidget, Balance, Bonus, Deposit, Withdraw, SignUp, ChangeUsername, ChangePassword, ResetPassword, RequestResetPassword, SignIn, Pagination, Settings, TableWidget, Verify, Subscriptions, CasinoHistoryTable, PaymentHistoryTable, SportsbookHistoryTable, DepositWidgetAccordion, WithdrawWidgetAccordion, ResponsibleGamingAccordion, ResponsibleGamingAccordionSignUp, ResponsibleGamingSingleSignUp, ResponsibleGamingWidget, List, VerifyAccordionWidget, Translate, Picture, countryEmojiFlags, Skeleton, AutocompleteInput };
58
+ export { AcceptUpdatedTaC, Alert, Button, ButtonLoader, Checkbox, Checklist, Icon, Image, Input, InternalMessagesInbox, Loader, Money, Notification, Radio, Select, Single, Textarea, Uploader, AccordionWidget, AccountDetail, ActivateWidget, Balance, Bonus, Deposit, Withdraw, SignUp, ChangeUsername, ChangePassword, ResetPassword, RequestResetPassword, SignIn, Pagination, Settings, TableWidget, Verify, Subscriptions, CasinoHistoryTable, PaymentHistoryTable, SportsbookHistoryTable, DepositWidgetAccordion, WithdrawWidgetAccordion, ResponsibleGamingAccordion, ResponsibleGamingAccordionSignUp, ResponsibleGamingSingleSignUp, ResponsibleGamingWidget, List, VerifyAccordionWidget, Translate, Picture, Skeleton, countryEmojiFlags };
@@ -2,25 +2,18 @@ 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
- var cacheId = id + (JSON.stringify(values) || '');
13
- if (cache[cacheId]) return cache[cacheId];
14
-
15
10
  var g = typeof window !== 'undefined' && window || typeof global !== 'undefined' && global || {};
16
11
 
17
12
  if (!intl) console.error('Missing intl object for "' + id + '"');
18
13
 
19
14
  if (g.showTranslations || !intl || !intl.formatMessage) return id;
20
15
 
21
- var message = intl.formatMessage(_extends({ id: id }, rest), values);
22
- cache[cacheId] = message;
23
- return message;
16
+ return intl.formatMessage(_extends({ id: id }, rest), values);
24
17
  };
25
18
 
26
19
  export default translate;
@@ -93,7 +93,6 @@ export default {
93
93
  KI: '🇰🇮',
94
94
  KN: '🇰🇳',
95
95
  KR: '🇰🇷',
96
- KY: '🇰🇾',
97
96
  KW: '🇰🇼',
98
97
  LA: '🇱🇦',
99
98
  LB: '🇱🇧',