@commercetools-uikit/localized-money-input 12.2.3 → 12.2.7
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.
|
@@ -74,9 +74,9 @@ var messages = reactIntl.defineMessages({
|
|
|
74
74
|
|
|
75
75
|
var _templateObject;
|
|
76
76
|
|
|
77
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default[
|
|
77
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); if (enumerableOnly) { symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
78
78
|
|
|
79
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context7; _forEachInstanceProperty__default[
|
|
79
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context7; _forEachInstanceProperty__default["default"](_context7 = ownKeys(Object(source), true)).call(_context7, function (key) { _defineProperty(target, key, source[key]); }); } else if (_Object$getOwnPropertyDescriptors__default["default"]) { _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)); } else { var _context8; _forEachInstanceProperty__default["default"](_context8 = ownKeys(Object(source))).call(_context8, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } } return target; }
|
|
80
80
|
|
|
81
81
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
82
82
|
var sequentialId = utils.createSequentialId('localized-money-input-'); // sorts the currencies with the following priority:
|
|
@@ -86,11 +86,11 @@ var sequentialId = utils.createSequentialId('localized-money-input-'); // sorts
|
|
|
86
86
|
var sortCurrencies = function sortCurrencies(selectedCurrency, allCurrencies) {
|
|
87
87
|
var _context;
|
|
88
88
|
|
|
89
|
-
var remainingCurrencies = _filterInstanceProperty__default[
|
|
89
|
+
var remainingCurrencies = _filterInstanceProperty__default["default"](allCurrencies).call(allCurrencies, function (currency) {
|
|
90
90
|
return currency !== selectedCurrency;
|
|
91
91
|
});
|
|
92
92
|
|
|
93
|
-
return _concatInstanceProperty__default[
|
|
93
|
+
return _concatInstanceProperty__default["default"](_context = [selectedCurrency]).call(_context, _toConsumableArray(_sortInstanceProperty__default["default"](remainingCurrencies).call(remainingCurrencies)));
|
|
94
94
|
};
|
|
95
95
|
|
|
96
96
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
@@ -121,11 +121,11 @@ var LocalizedInput = function LocalizedInput(props) {
|
|
|
121
121
|
event.target.currency = props.currency;
|
|
122
122
|
onChange(event);
|
|
123
123
|
}, [props.currency, onChange]);
|
|
124
|
-
return jsxRuntime.jsxs(Stack__default[
|
|
124
|
+
return jsxRuntime.jsxs(Stack__default["default"], {
|
|
125
125
|
scale: "xs",
|
|
126
126
|
children: [jsxRuntime.jsx("div", {
|
|
127
127
|
css: _ref,
|
|
128
|
-
children: jsxRuntime.jsx(MoneyInput__default[
|
|
128
|
+
children: jsxRuntime.jsx(MoneyInput__default["default"], _objectSpread({
|
|
129
129
|
id: props.id,
|
|
130
130
|
name: props.name,
|
|
131
131
|
value: props.value,
|
|
@@ -145,23 +145,23 @@ var LocalizedInput = function LocalizedInput(props) {
|
|
|
145
145
|
|
|
146
146
|
LocalizedInput.displayName = 'LocalizedInput';
|
|
147
147
|
LocalizedInput.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
148
|
-
id: PropTypes__default[
|
|
149
|
-
name: PropTypes__default[
|
|
150
|
-
value: PropTypes__default[
|
|
151
|
-
amount: PropTypes__default[
|
|
152
|
-
currencyCode: PropTypes__default[
|
|
148
|
+
id: PropTypes__default["default"].string,
|
|
149
|
+
name: PropTypes__default["default"].string,
|
|
150
|
+
value: PropTypes__default["default"].shape({
|
|
151
|
+
amount: PropTypes__default["default"].string.isRequired,
|
|
152
|
+
currencyCode: PropTypes__default["default"].string.isRequired
|
|
153
153
|
}).isRequired,
|
|
154
|
-
onChange: PropTypes__default[
|
|
155
|
-
currency: PropTypes__default[
|
|
156
|
-
onBlur: PropTypes__default[
|
|
157
|
-
onFocus: PropTypes__default[
|
|
158
|
-
isDisabled: PropTypes__default[
|
|
159
|
-
isReadOnly: PropTypes__default[
|
|
160
|
-
hasError: PropTypes__default[
|
|
161
|
-
hasWarning: PropTypes__default[
|
|
162
|
-
placeholder: PropTypes__default[
|
|
163
|
-
error: PropTypes__default[
|
|
164
|
-
warning: PropTypes__default[
|
|
154
|
+
onChange: PropTypes__default["default"].func,
|
|
155
|
+
currency: PropTypes__default["default"].string.isRequired,
|
|
156
|
+
onBlur: PropTypes__default["default"].func,
|
|
157
|
+
onFocus: PropTypes__default["default"].func,
|
|
158
|
+
isDisabled: PropTypes__default["default"].bool,
|
|
159
|
+
isReadOnly: PropTypes__default["default"].bool,
|
|
160
|
+
hasError: PropTypes__default["default"].bool,
|
|
161
|
+
hasWarning: PropTypes__default["default"].bool,
|
|
162
|
+
placeholder: PropTypes__default["default"].string,
|
|
163
|
+
error: PropTypes__default["default"].node,
|
|
164
|
+
warning: PropTypes__default["default"].node
|
|
165
165
|
} : {};
|
|
166
166
|
|
|
167
167
|
var LocalizedMoneyInput = function LocalizedMoneyInput(props) {
|
|
@@ -186,15 +186,15 @@ var LocalizedMoneyInput = function LocalizedMoneyInput(props) {
|
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
var currencies = sortCurrencies(props.selectedCurrency, _Object$keys__default[
|
|
189
|
+
var currencies = sortCurrencies(props.selectedCurrency, _Object$keys__default["default"](props.value));
|
|
190
190
|
var shouldRenderCurrencyControl = currencies.length > 1 && !props.hideCurrencyExpansionControls;
|
|
191
|
-
return jsxRuntime.jsx(Constraints__default[
|
|
191
|
+
return jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
|
|
192
192
|
max: props.horizontalConstraint,
|
|
193
|
-
children: jsxRuntime.jsxs(Stack__default[
|
|
193
|
+
children: jsxRuntime.jsxs(Stack__default["default"], {
|
|
194
194
|
scale: "xs",
|
|
195
|
-
children: [jsxRuntime.jsx(Stack__default[
|
|
195
|
+
children: [jsxRuntime.jsx(Stack__default["default"], {
|
|
196
196
|
scale: "s",
|
|
197
|
-
children: _mapInstanceProperty__default[
|
|
197
|
+
children: _mapInstanceProperty__default["default"](currencies).call(currencies, function (currency, index) {
|
|
198
198
|
var isFirstCurrency = index === 0;
|
|
199
199
|
if (!isFirstCurrency && !areCurrenciesExpanded) return null;
|
|
200
200
|
return jsxRuntime.jsx(LocalizedInput, _objectSpread({
|
|
@@ -233,20 +233,20 @@ var LocalizedMoneyInput = function LocalizedMoneyInput(props) {
|
|
|
233
233
|
|
|
234
234
|
LocalizedMoneyInput.displayName = 'LocalizedMoneyInput';
|
|
235
235
|
LocalizedMoneyInput.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
236
|
-
id: PropTypes__default[
|
|
237
|
-
name: PropTypes__default[
|
|
236
|
+
id: PropTypes__default["default"].string,
|
|
237
|
+
name: PropTypes__default["default"].string,
|
|
238
238
|
// then input doesn't accept a "currencies" prop, instead all possible
|
|
239
239
|
// currencies have to exist (with empty or filled strings) on the value:
|
|
240
240
|
// { EUR: {amount: '12.00', currencyCode: 'EUR'}, USD: {amount: '', currencyCode: 'USD'}}
|
|
241
|
-
value: PropTypes__default[
|
|
242
|
-
amount: PropTypes__default[
|
|
243
|
-
currencyCode: PropTypes__default[
|
|
241
|
+
value: PropTypes__default["default"].objectOf(PropTypes__default["default"].shape({
|
|
242
|
+
amount: PropTypes__default["default"].string.isRequired,
|
|
243
|
+
currencyCode: PropTypes__default["default"].string.isRequired
|
|
244
244
|
})).isRequired,
|
|
245
|
-
onChange: PropTypes__default[
|
|
246
|
-
selectedCurrency: PropTypes__default[
|
|
247
|
-
onBlur: PropTypes__default[
|
|
248
|
-
onFocus: PropTypes__default[
|
|
249
|
-
hideCurrencyExpansionControls: PropTypes__default[
|
|
245
|
+
onChange: PropTypes__default["default"].func,
|
|
246
|
+
selectedCurrency: PropTypes__default["default"].string.isRequired,
|
|
247
|
+
onBlur: PropTypes__default["default"].func,
|
|
248
|
+
onFocus: PropTypes__default["default"].func,
|
|
249
|
+
hideCurrencyExpansionControls: PropTypes__default["default"].bool,
|
|
250
250
|
defaultExpandCurrencies: function defaultExpandCurrencies(props, propName, componentName) {
|
|
251
251
|
var _context2;
|
|
252
252
|
|
|
@@ -258,16 +258,16 @@ LocalizedMoneyInput.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
258
258
|
rest[_key - 3] = arguments[_key];
|
|
259
259
|
}
|
|
260
260
|
|
|
261
|
-
return PropTypes__default[
|
|
261
|
+
return PropTypes__default["default"].bool.apply(PropTypes__default["default"], _concatInstanceProperty__default["default"](_context2 = [props, propName, componentName]).call(_context2, rest));
|
|
262
262
|
},
|
|
263
|
-
isDisabled: PropTypes__default[
|
|
264
|
-
isReadOnly: PropTypes__default[
|
|
265
|
-
placeholder: PropTypes__default[
|
|
266
|
-
horizontalConstraint: PropTypes__default[
|
|
267
|
-
hasError: PropTypes__default[
|
|
268
|
-
hasWarning: PropTypes__default[
|
|
269
|
-
errors: PropTypes__default[
|
|
270
|
-
warnings: PropTypes__default[
|
|
263
|
+
isDisabled: PropTypes__default["default"].bool,
|
|
264
|
+
isReadOnly: PropTypes__default["default"].bool,
|
|
265
|
+
placeholder: PropTypes__default["default"].objectOf(PropTypes__default["default"].string),
|
|
266
|
+
horizontalConstraint: PropTypes__default["default"].oneOf([3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto']),
|
|
267
|
+
hasError: PropTypes__default["default"].bool,
|
|
268
|
+
hasWarning: PropTypes__default["default"].bool,
|
|
269
|
+
errors: PropTypes__default["default"].objectOf(PropTypes__default["default"].node),
|
|
270
|
+
warnings: PropTypes__default["default"].objectOf(PropTypes__default["default"].node)
|
|
271
271
|
} : {};
|
|
272
272
|
LocalizedMoneyInput.getId = localizedUtils.getId;
|
|
273
273
|
LocalizedMoneyInput.getName = localizedUtils.getName;
|
|
@@ -278,8 +278,8 @@ LocalizedMoneyInput.defaultProps = {
|
|
|
278
278
|
LocalizedMoneyInput.convertToMoneyValues = function (values, locale) {
|
|
279
279
|
var _context3;
|
|
280
280
|
|
|
281
|
-
return _mapInstanceProperty__default[
|
|
282
|
-
return MoneyInput__default[
|
|
281
|
+
return _mapInstanceProperty__default["default"](_context3 = _Object$values__default["default"](values)).call(_context3, function (value) {
|
|
282
|
+
return MoneyInput__default["default"].convertToMoneyValue(value, locale);
|
|
283
283
|
});
|
|
284
284
|
};
|
|
285
285
|
|
|
@@ -288,8 +288,8 @@ LocalizedMoneyInput.parseMoneyValues = function () {
|
|
|
288
288
|
|
|
289
289
|
var moneyValues = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
290
290
|
var locale = arguments.length > 1 ? arguments[1] : undefined;
|
|
291
|
-
return _reduceInstanceProperty__default[
|
|
292
|
-
return MoneyInput__default[
|
|
291
|
+
return _reduceInstanceProperty__default["default"](_context4 = _mapInstanceProperty__default["default"](moneyValues).call(moneyValues, function (value) {
|
|
292
|
+
return MoneyInput__default["default"].parseMoneyValue(value, locale);
|
|
293
293
|
})).call(_context4, function (pairs, value) {
|
|
294
294
|
return _objectSpread(_objectSpread({}, pairs), {}, _defineProperty({}, value.currencyCode, value));
|
|
295
295
|
}, {});
|
|
@@ -298,23 +298,23 @@ LocalizedMoneyInput.parseMoneyValues = function () {
|
|
|
298
298
|
LocalizedMoneyInput.getHighPrecisionCurrencies = function (values, locale) {
|
|
299
299
|
var _context5;
|
|
300
300
|
|
|
301
|
-
return _filterInstanceProperty__default[
|
|
302
|
-
return MoneyInput__default[
|
|
301
|
+
return _filterInstanceProperty__default["default"](_context5 = _Object$keys__default["default"](values)).call(_context5, function (currencyCode) {
|
|
302
|
+
return MoneyInput__default["default"].isHighPrecision(values[currencyCode], locale);
|
|
303
303
|
});
|
|
304
304
|
};
|
|
305
305
|
|
|
306
306
|
LocalizedMoneyInput.getEmptyCurrencies = function (values) {
|
|
307
307
|
var _context6;
|
|
308
308
|
|
|
309
|
-
return _filterInstanceProperty__default[
|
|
310
|
-
return MoneyInput__default[
|
|
309
|
+
return _filterInstanceProperty__default["default"](_context6 = _Object$keys__default["default"](values)).call(_context6, function (currencyCode) {
|
|
310
|
+
return MoneyInput__default["default"].isEmpty(values[currencyCode]);
|
|
311
311
|
});
|
|
312
312
|
};
|
|
313
313
|
|
|
314
314
|
var LocalizedMoneyInput$1 = LocalizedMoneyInput;
|
|
315
315
|
|
|
316
|
-
// NOTE: This string will be replaced
|
|
317
|
-
var version =
|
|
316
|
+
// NOTE: This string will be replaced on build time with the package version.
|
|
317
|
+
var version = "12.2.7";
|
|
318
318
|
|
|
319
|
-
exports[
|
|
319
|
+
exports["default"] = LocalizedMoneyInput$1;
|
|
320
320
|
exports.version = version;
|
|
@@ -71,9 +71,9 @@ var messages = reactIntl.defineMessages({
|
|
|
71
71
|
}
|
|
72
72
|
});
|
|
73
73
|
|
|
74
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default[
|
|
74
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); if (enumerableOnly) { symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
75
75
|
|
|
76
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context7; _forEachInstanceProperty__default[
|
|
76
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context7; _forEachInstanceProperty__default["default"](_context7 = ownKeys(Object(source), true)).call(_context7, function (key) { _defineProperty(target, key, source[key]); }); } else if (_Object$getOwnPropertyDescriptors__default["default"]) { _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)); } else { var _context8; _forEachInstanceProperty__default["default"](_context8 = ownKeys(Object(source))).call(_context8, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } } return target; }
|
|
77
77
|
var sequentialId = utils.createSequentialId('localized-money-input-'); // sorts the currencies with the following priority:
|
|
78
78
|
// - The selected currency is placed first (e.g EUR)
|
|
79
79
|
// - All other currencies follow, sorted alphabetically as well
|
|
@@ -81,11 +81,11 @@ var sequentialId = utils.createSequentialId('localized-money-input-'); // sorts
|
|
|
81
81
|
var sortCurrencies = function sortCurrencies(selectedCurrency, allCurrencies) {
|
|
82
82
|
var _context;
|
|
83
83
|
|
|
84
|
-
var remainingCurrencies = _filterInstanceProperty__default[
|
|
84
|
+
var remainingCurrencies = _filterInstanceProperty__default["default"](allCurrencies).call(allCurrencies, function (currency) {
|
|
85
85
|
return currency !== selectedCurrency;
|
|
86
86
|
});
|
|
87
87
|
|
|
88
|
-
return _concatInstanceProperty__default[
|
|
88
|
+
return _concatInstanceProperty__default["default"](_context = [selectedCurrency]).call(_context, _toConsumableArray(_sortInstanceProperty__default["default"](remainingCurrencies).call(remainingCurrencies)));
|
|
89
89
|
};
|
|
90
90
|
|
|
91
91
|
var _ref = {
|
|
@@ -111,11 +111,11 @@ var LocalizedInput = function LocalizedInput(props) {
|
|
|
111
111
|
event.target.currency = props.currency;
|
|
112
112
|
onChange(event);
|
|
113
113
|
}, [props.currency, onChange]);
|
|
114
|
-
return jsxRuntime.jsxs(Stack__default[
|
|
114
|
+
return jsxRuntime.jsxs(Stack__default["default"], {
|
|
115
115
|
scale: "xs",
|
|
116
116
|
children: [jsxRuntime.jsx("div", {
|
|
117
117
|
css: _ref,
|
|
118
|
-
children: jsxRuntime.jsx(MoneyInput__default[
|
|
118
|
+
children: jsxRuntime.jsx(MoneyInput__default["default"], _objectSpread({
|
|
119
119
|
id: props.id,
|
|
120
120
|
name: props.name,
|
|
121
121
|
value: props.value,
|
|
@@ -158,15 +158,15 @@ var LocalizedMoneyInput = function LocalizedMoneyInput(props) {
|
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
-
var currencies = sortCurrencies(props.selectedCurrency, _Object$keys__default[
|
|
161
|
+
var currencies = sortCurrencies(props.selectedCurrency, _Object$keys__default["default"](props.value));
|
|
162
162
|
var shouldRenderCurrencyControl = currencies.length > 1 && !props.hideCurrencyExpansionControls;
|
|
163
|
-
return jsxRuntime.jsx(Constraints__default[
|
|
163
|
+
return jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
|
|
164
164
|
max: props.horizontalConstraint,
|
|
165
|
-
children: jsxRuntime.jsxs(Stack__default[
|
|
165
|
+
children: jsxRuntime.jsxs(Stack__default["default"], {
|
|
166
166
|
scale: "xs",
|
|
167
|
-
children: [jsxRuntime.jsx(Stack__default[
|
|
167
|
+
children: [jsxRuntime.jsx(Stack__default["default"], {
|
|
168
168
|
scale: "s",
|
|
169
|
-
children: _mapInstanceProperty__default[
|
|
169
|
+
children: _mapInstanceProperty__default["default"](currencies).call(currencies, function (currency, index) {
|
|
170
170
|
var isFirstCurrency = index === 0;
|
|
171
171
|
if (!isFirstCurrency && !areCurrenciesExpanded) return null;
|
|
172
172
|
return jsxRuntime.jsx(LocalizedInput, _objectSpread({
|
|
@@ -214,8 +214,8 @@ LocalizedMoneyInput.defaultProps = {
|
|
|
214
214
|
LocalizedMoneyInput.convertToMoneyValues = function (values, locale) {
|
|
215
215
|
var _context3;
|
|
216
216
|
|
|
217
|
-
return _mapInstanceProperty__default[
|
|
218
|
-
return MoneyInput__default[
|
|
217
|
+
return _mapInstanceProperty__default["default"](_context3 = _Object$values__default["default"](values)).call(_context3, function (value) {
|
|
218
|
+
return MoneyInput__default["default"].convertToMoneyValue(value, locale);
|
|
219
219
|
});
|
|
220
220
|
};
|
|
221
221
|
|
|
@@ -224,8 +224,8 @@ LocalizedMoneyInput.parseMoneyValues = function () {
|
|
|
224
224
|
|
|
225
225
|
var moneyValues = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
226
226
|
var locale = arguments.length > 1 ? arguments[1] : undefined;
|
|
227
|
-
return _reduceInstanceProperty__default[
|
|
228
|
-
return MoneyInput__default[
|
|
227
|
+
return _reduceInstanceProperty__default["default"](_context4 = _mapInstanceProperty__default["default"](moneyValues).call(moneyValues, function (value) {
|
|
228
|
+
return MoneyInput__default["default"].parseMoneyValue(value, locale);
|
|
229
229
|
})).call(_context4, function (pairs, value) {
|
|
230
230
|
return _objectSpread(_objectSpread({}, pairs), {}, _defineProperty({}, value.currencyCode, value));
|
|
231
231
|
}, {});
|
|
@@ -234,23 +234,23 @@ LocalizedMoneyInput.parseMoneyValues = function () {
|
|
|
234
234
|
LocalizedMoneyInput.getHighPrecisionCurrencies = function (values, locale) {
|
|
235
235
|
var _context5;
|
|
236
236
|
|
|
237
|
-
return _filterInstanceProperty__default[
|
|
238
|
-
return MoneyInput__default[
|
|
237
|
+
return _filterInstanceProperty__default["default"](_context5 = _Object$keys__default["default"](values)).call(_context5, function (currencyCode) {
|
|
238
|
+
return MoneyInput__default["default"].isHighPrecision(values[currencyCode], locale);
|
|
239
239
|
});
|
|
240
240
|
};
|
|
241
241
|
|
|
242
242
|
LocalizedMoneyInput.getEmptyCurrencies = function (values) {
|
|
243
243
|
var _context6;
|
|
244
244
|
|
|
245
|
-
return _filterInstanceProperty__default[
|
|
246
|
-
return MoneyInput__default[
|
|
245
|
+
return _filterInstanceProperty__default["default"](_context6 = _Object$keys__default["default"](values)).call(_context6, function (currencyCode) {
|
|
246
|
+
return MoneyInput__default["default"].isEmpty(values[currencyCode]);
|
|
247
247
|
});
|
|
248
248
|
};
|
|
249
249
|
|
|
250
250
|
var LocalizedMoneyInput$1 = LocalizedMoneyInput;
|
|
251
251
|
|
|
252
|
-
// NOTE: This string will be replaced
|
|
253
|
-
var version =
|
|
252
|
+
// NOTE: This string will be replaced on build time with the package version.
|
|
253
|
+
var version = "12.2.7";
|
|
254
254
|
|
|
255
|
-
exports[
|
|
255
|
+
exports["default"] = LocalizedMoneyInput$1;
|
|
256
256
|
exports.version = version;
|
|
@@ -289,7 +289,7 @@ LocalizedMoneyInput.getEmptyCurrencies = function (values) {
|
|
|
289
289
|
|
|
290
290
|
var LocalizedMoneyInput$1 = LocalizedMoneyInput;
|
|
291
291
|
|
|
292
|
-
// NOTE: This string will be replaced
|
|
293
|
-
var version =
|
|
292
|
+
// NOTE: This string will be replaced on build time with the package version.
|
|
293
|
+
var version = "12.2.7";
|
|
294
294
|
|
|
295
295
|
export { LocalizedMoneyInput$1 as default, version };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/localized-money-input",
|
|
3
3
|
"description": "A controlled input component for localized money values with validation states.",
|
|
4
|
-
"version": "12.2.
|
|
4
|
+
"version": "12.2.7",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
"homepage": "https://uikit.commercetools.com",
|
|
12
12
|
"keywords": ["javascript", "design system", "react", "uikit"],
|
|
13
13
|
"license": "MIT",
|
|
14
|
-
"private": false,
|
|
15
14
|
"publishConfig": {
|
|
16
15
|
"access": "public"
|
|
17
16
|
},
|
|
@@ -19,27 +18,24 @@
|
|
|
19
18
|
"main": "dist/commercetools-uikit-localized-money-input.cjs.js",
|
|
20
19
|
"module": "dist/commercetools-uikit-localized-money-input.esm.js",
|
|
21
20
|
"files": ["dist"],
|
|
22
|
-
"scripts": {
|
|
23
|
-
"prepare": "../../../../scripts/version.js replace"
|
|
24
|
-
},
|
|
25
21
|
"dependencies": {
|
|
26
|
-
"@babel/runtime": "7.
|
|
27
|
-
"@babel/runtime-corejs3": "7.
|
|
28
|
-
"@commercetools-uikit/constraints": "12.2.
|
|
29
|
-
"@commercetools-uikit/design-system": "12.2.
|
|
30
|
-
"@commercetools-uikit/flat-button": "12.2.
|
|
31
|
-
"@commercetools-uikit/hooks": "12.2.
|
|
32
|
-
"@commercetools-uikit/icons": "12.2.
|
|
33
|
-
"@commercetools-uikit/input-utils": "12.2.
|
|
34
|
-
"@commercetools-uikit/localized-utils": "12.2.
|
|
35
|
-
"@commercetools-uikit/money-input": "12.2.
|
|
36
|
-
"@commercetools-uikit/select-utils": "12.2.
|
|
37
|
-
"@commercetools-uikit/spacings-stack": "12.2.
|
|
38
|
-
"@commercetools-uikit/tooltip": "12.2.
|
|
39
|
-
"@commercetools-uikit/utils": "12.2.
|
|
22
|
+
"@babel/runtime": "7.16.3",
|
|
23
|
+
"@babel/runtime-corejs3": "7.16.3",
|
|
24
|
+
"@commercetools-uikit/constraints": "12.2.5",
|
|
25
|
+
"@commercetools-uikit/design-system": "12.2.5",
|
|
26
|
+
"@commercetools-uikit/flat-button": "12.2.5",
|
|
27
|
+
"@commercetools-uikit/hooks": "12.2.5",
|
|
28
|
+
"@commercetools-uikit/icons": "12.2.7",
|
|
29
|
+
"@commercetools-uikit/input-utils": "12.2.7",
|
|
30
|
+
"@commercetools-uikit/localized-utils": "12.2.5",
|
|
31
|
+
"@commercetools-uikit/money-input": "12.2.7",
|
|
32
|
+
"@commercetools-uikit/select-utils": "12.2.7",
|
|
33
|
+
"@commercetools-uikit/spacings-stack": "12.2.5",
|
|
34
|
+
"@commercetools-uikit/tooltip": "12.2.5",
|
|
35
|
+
"@commercetools-uikit/utils": "12.2.5",
|
|
40
36
|
"@emotion/react": "^11.4.0",
|
|
41
37
|
"@emotion/styled": "^11.3.0",
|
|
42
|
-
"common-tags": "1.8.
|
|
38
|
+
"common-tags": "1.8.2",
|
|
43
39
|
"prop-types": "15.7.2",
|
|
44
40
|
"react-required-if": "1.0.3",
|
|
45
41
|
"react-select": "4.3.1"
|
|
@@ -47,7 +43,7 @@
|
|
|
47
43
|
"devDependencies": {
|
|
48
44
|
"react": "17.0.2",
|
|
49
45
|
"react-dom": "17.0.2",
|
|
50
|
-
"react-intl": "5.
|
|
46
|
+
"react-intl": "5.21.2"
|
|
51
47
|
},
|
|
52
48
|
"peerDependencies": {
|
|
53
49
|
"react": "17.x",
|