@commercetools-uikit/money-field 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.
|
@@ -55,19 +55,19 @@ var FieldLabel__default = /*#__PURE__*/_interopDefault(FieldLabel);
|
|
|
55
55
|
var MoneyInput__default = /*#__PURE__*/_interopDefault(MoneyInput);
|
|
56
56
|
var FieldErrors__default = /*#__PURE__*/_interopDefault(FieldErrors);
|
|
57
57
|
|
|
58
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default[
|
|
58
|
+
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; }
|
|
59
59
|
|
|
60
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context4; _forEachInstanceProperty__default[
|
|
60
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context4; _forEachInstanceProperty__default["default"](_context4 = ownKeys(Object(source), true)).call(_context4, 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 _context5; _forEachInstanceProperty__default["default"](_context5 = ownKeys(Object(source))).call(_context5, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } } return target; }
|
|
61
61
|
|
|
62
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default[
|
|
62
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default["default"](Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
63
63
|
|
|
64
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct__default[
|
|
64
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
65
65
|
var sequentialId = utils.createSequentialId('money-field-');
|
|
66
66
|
|
|
67
67
|
var hasErrors = function hasErrors(errors) {
|
|
68
68
|
var _context;
|
|
69
69
|
|
|
70
|
-
return errors && _someInstanceProperty__default[
|
|
70
|
+
return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
|
|
71
71
|
};
|
|
72
72
|
|
|
73
73
|
var MoneyField = /*#__PURE__*/function (_Component) {
|
|
@@ -86,7 +86,7 @@ var MoneyField = /*#__PURE__*/function (_Component) {
|
|
|
86
86
|
args[_key] = arguments[_key];
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
_this = _super.call.apply(_super, _concatInstanceProperty__default[
|
|
89
|
+
_this = _super.call.apply(_super, _concatInstanceProperty__default["default"](_context2 = [this]).call(_context2, args));
|
|
90
90
|
_this.state = {
|
|
91
91
|
// We generate an id in case no id is provided by the parent to attach the
|
|
92
92
|
// label to the input component.
|
|
@@ -101,12 +101,12 @@ var MoneyField = /*#__PURE__*/function (_Component) {
|
|
|
101
101
|
// MoneyInput.isTouched() ensures both fields have been touched.
|
|
102
102
|
// This avoids showing an error when the user just selected a language but
|
|
103
103
|
// didn't add an amount yet.
|
|
104
|
-
var hasError = MoneyInput__default[
|
|
105
|
-
return jsxRuntime.jsx(Constraints__default[
|
|
104
|
+
var hasError = MoneyInput__default["default"].isTouched(this.props.touched) && hasErrors(this.props.errors);
|
|
105
|
+
return jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
|
|
106
106
|
max: this.props.horizontalConstraint,
|
|
107
|
-
children: jsxRuntime.jsxs(Spacings__default[
|
|
107
|
+
children: jsxRuntime.jsxs(Spacings__default["default"].Stack, {
|
|
108
108
|
scale: "xs",
|
|
109
|
-
children: [jsxRuntime.jsx(FieldLabel__default[
|
|
109
|
+
children: [jsxRuntime.jsx(FieldLabel__default["default"], {
|
|
110
110
|
title: this.props.title,
|
|
111
111
|
hint: this.props.hint,
|
|
112
112
|
description: this.props.description,
|
|
@@ -114,7 +114,7 @@ var MoneyField = /*#__PURE__*/function (_Component) {
|
|
|
114
114
|
hintIcon: this.props.hintIcon,
|
|
115
115
|
hasRequiredIndicator: this.props.isRequired,
|
|
116
116
|
htmlFor: this.state.id
|
|
117
|
-
}), jsxRuntime.jsx(MoneyInput__default[
|
|
117
|
+
}), jsxRuntime.jsx(MoneyInput__default["default"], _objectSpread({
|
|
118
118
|
id: this.state.id,
|
|
119
119
|
name: this.props.name,
|
|
120
120
|
autoComplete: this.props.autoComplete,
|
|
@@ -132,7 +132,7 @@ var MoneyField = /*#__PURE__*/function (_Component) {
|
|
|
132
132
|
menuPortalTarget: this.props.menuPortalTarget,
|
|
133
133
|
menuPortalZIndex: this.props.menuPortalZIndex,
|
|
134
134
|
menuShouldBlockScroll: this.props.menuShouldBlockScroll
|
|
135
|
-
}, utils.filterDataAttributes(this.props))), jsxRuntime.jsx(FieldErrors__default[
|
|
135
|
+
}, utils.filterDataAttributes(this.props))), jsxRuntime.jsx(FieldErrors__default["default"], {
|
|
136
136
|
errors: this.props.errors,
|
|
137
137
|
isVisible: hasError,
|
|
138
138
|
renderError: this.props.renderError
|
|
@@ -162,20 +162,20 @@ MoneyField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
162
162
|
/**
|
|
163
163
|
* Used as HTML id property. An id is auto-generated when it is not specified.
|
|
164
164
|
*/
|
|
165
|
-
id: PropTypes__default[
|
|
165
|
+
id: PropTypes__default["default"].string,
|
|
166
166
|
|
|
167
167
|
/**
|
|
168
168
|
* Horizontal size limit of the input fields.
|
|
169
169
|
*/
|
|
170
|
-
horizontalConstraint: PropTypes__default[
|
|
170
|
+
horizontalConstraint: PropTypes__default["default"].oneOf([3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto']),
|
|
171
171
|
|
|
172
172
|
/**
|
|
173
173
|
* A map of errors. Error messages for known errors are rendered automatically.
|
|
174
174
|
* <br />
|
|
175
175
|
* Unknown errors will be forwarded to `renderError`
|
|
176
176
|
*/
|
|
177
|
-
errors: PropTypes__default[
|
|
178
|
-
missing: PropTypes__default[
|
|
177
|
+
errors: PropTypes__default["default"].shape({
|
|
178
|
+
missing: PropTypes__default["default"].bool
|
|
179
179
|
}),
|
|
180
180
|
|
|
181
181
|
/**
|
|
@@ -183,31 +183,31 @@ MoneyField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
183
183
|
* <br />
|
|
184
184
|
* Signature: `(key, error) => React.node`
|
|
185
185
|
*/
|
|
186
|
-
renderError: PropTypes__default[
|
|
186
|
+
renderError: PropTypes__default["default"].func,
|
|
187
187
|
|
|
188
188
|
/**
|
|
189
189
|
* Indicates if the value is required. Shows an the "required asterisk" if so.
|
|
190
190
|
*/
|
|
191
|
-
isRequired: PropTypes__default[
|
|
191
|
+
isRequired: PropTypes__default["default"].bool,
|
|
192
192
|
|
|
193
193
|
/**
|
|
194
194
|
* Indicates whether the `currencyCode` or `amount` fields were touched.
|
|
195
195
|
* <br />
|
|
196
196
|
* Errors will only be shown when the field was touched.
|
|
197
197
|
*/
|
|
198
|
-
touched: PropTypes__default[
|
|
199
|
-
amount: PropTypes__default[
|
|
200
|
-
currencyCode: PropTypes__default[
|
|
198
|
+
touched: PropTypes__default["default"].shape({
|
|
199
|
+
amount: PropTypes__default["default"].bool,
|
|
200
|
+
currencyCode: PropTypes__default["default"].bool
|
|
201
201
|
}),
|
|
202
202
|
// Some other fields use isTouched, but the check isn't as simple here.
|
|
203
203
|
// isTouched accepts a boolean, whereas touched takes an object.
|
|
204
204
|
// Maybe we should upgrade them all to just be "touched"?
|
|
205
205
|
// eslint-disable-next-line react/no-unused-prop-types
|
|
206
206
|
isTouched: function isTouched(props, propName, componentName) {
|
|
207
|
-
if (has__default[
|
|
207
|
+
if (has__default["default"](props, propName)) {
|
|
208
208
|
var _context3;
|
|
209
209
|
|
|
210
|
-
return new Error(_concatInstanceProperty__default[
|
|
210
|
+
return new Error(_concatInstanceProperty__default["default"](_context3 = "Invalid prop `".concat(propName, "` supplied to `")).call(_context3, componentName, "`. Use `touched` instead."));
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
return undefined;
|
|
@@ -217,95 +217,95 @@ MoneyField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
217
217
|
/**
|
|
218
218
|
* Used as HTML `autocomplete` property
|
|
219
219
|
*/
|
|
220
|
-
autoComplete: PropTypes__default[
|
|
220
|
+
autoComplete: PropTypes__default["default"].string,
|
|
221
221
|
|
|
222
222
|
/**
|
|
223
223
|
* The prefix used to create a HTML `name` property for the amount input field (`${name}.amount`) and the currency dropdown (`${name}.currencyCode`).
|
|
224
224
|
*/
|
|
225
|
-
name: PropTypes__default[
|
|
225
|
+
name: PropTypes__default["default"].string,
|
|
226
226
|
|
|
227
227
|
/**
|
|
228
228
|
* Value of the input. Consists of the currency code and an amount. `amount` is a string representing the amount. A dot has to be used as the decimal separator.
|
|
229
229
|
*/
|
|
230
|
-
value: PropTypes__default[
|
|
231
|
-
amount: PropTypes__default[
|
|
232
|
-
currencyCode: PropTypes__default[
|
|
230
|
+
value: PropTypes__default["default"].shape({
|
|
231
|
+
amount: PropTypes__default["default"].string.isRequired,
|
|
232
|
+
currencyCode: PropTypes__default["default"].string.isRequired
|
|
233
233
|
}).isRequired,
|
|
234
234
|
|
|
235
235
|
/**
|
|
236
236
|
* List of possible currencies. When not provided or empty, the component renders a label with the value's currency instead of a dropdown.
|
|
237
237
|
*/
|
|
238
|
-
currencies: PropTypes__default[
|
|
238
|
+
currencies: PropTypes__default["default"].arrayOf(PropTypes__default["default"].string),
|
|
239
239
|
|
|
240
240
|
/**
|
|
241
241
|
* Placeholder text for the amount input
|
|
242
242
|
*/
|
|
243
|
-
placeholder: PropTypes__default[
|
|
243
|
+
placeholder: PropTypes__default["default"].string,
|
|
244
244
|
|
|
245
245
|
/**
|
|
246
246
|
* Called when input is blurred
|
|
247
247
|
*/
|
|
248
|
-
onBlur: PropTypes__default[
|
|
248
|
+
onBlur: PropTypes__default["default"].func,
|
|
249
249
|
|
|
250
250
|
/**
|
|
251
251
|
* Called when input is focused
|
|
252
252
|
*/
|
|
253
|
-
onFocus: PropTypes__default[
|
|
253
|
+
onFocus: PropTypes__default["default"].func,
|
|
254
254
|
|
|
255
255
|
/**
|
|
256
256
|
* Indicates that the input cannot be modified (e.g not authorized, or changes currently saving).
|
|
257
257
|
*/
|
|
258
|
-
isDisabled: PropTypes__default[
|
|
258
|
+
isDisabled: PropTypes__default["default"].bool,
|
|
259
259
|
|
|
260
260
|
/**
|
|
261
261
|
* Indicates that the field is displaying read-only content
|
|
262
262
|
*/
|
|
263
|
-
isReadOnly: PropTypes__default[
|
|
263
|
+
isReadOnly: PropTypes__default["default"].bool,
|
|
264
264
|
|
|
265
265
|
/**
|
|
266
266
|
* Focus the input on initial render
|
|
267
267
|
*/
|
|
268
|
-
isAutofocussed: PropTypes__default[
|
|
268
|
+
isAutofocussed: PropTypes__default["default"].bool,
|
|
269
269
|
|
|
270
270
|
/**
|
|
271
271
|
* Called with the event of the input or dropdown when either the currency or the amount have changed.
|
|
272
272
|
* <br />
|
|
273
273
|
* Signature: `(event) => void`
|
|
274
274
|
*/
|
|
275
|
-
onChange: PropTypes__default[
|
|
275
|
+
onChange: PropTypes__default["default"].func.isRequired,
|
|
276
276
|
|
|
277
277
|
/**
|
|
278
278
|
* Dom element to portal the currency select menu to
|
|
279
279
|
*/
|
|
280
|
-
menuPortalTarget: PropTypes__default[
|
|
280
|
+
menuPortalTarget: PropTypes__default["default"].instanceOf(utils.SafeHTMLElement),
|
|
281
281
|
|
|
282
282
|
/**
|
|
283
283
|
* z-index value for the currency select menu portal
|
|
284
284
|
*/
|
|
285
|
-
menuPortalZIndex: PropTypes__default[
|
|
285
|
+
menuPortalZIndex: PropTypes__default["default"].number,
|
|
286
286
|
|
|
287
287
|
/**
|
|
288
288
|
* whether the menu should block scroll while open
|
|
289
289
|
*/
|
|
290
|
-
menuShouldBlockScroll: PropTypes__default[
|
|
290
|
+
menuShouldBlockScroll: PropTypes__default["default"].bool,
|
|
291
291
|
// LabelField
|
|
292
292
|
|
|
293
293
|
/**
|
|
294
294
|
* Title of the label
|
|
295
295
|
*/
|
|
296
|
-
title: PropTypes__default[
|
|
296
|
+
title: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].node]).isRequired,
|
|
297
297
|
|
|
298
298
|
/**
|
|
299
299
|
* Hint for the label. Provides a supplementary but important information regarding the behaviour of the input (e.g warn about uniqueness of a field, when it can only be set once), whereas `description` can describe it in more depth. Can also receive a `hintIcon`.
|
|
300
300
|
*/
|
|
301
|
-
hint: requiredIf__default[
|
|
301
|
+
hint: requiredIf__default["default"](PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].node]), function (props) {
|
|
302
302
|
return props.hintIcon;
|
|
303
303
|
}),
|
|
304
304
|
|
|
305
305
|
/**
|
|
306
306
|
* Provides a description for the title.
|
|
307
307
|
*/
|
|
308
|
-
description: PropTypes__default[
|
|
308
|
+
description: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].node]),
|
|
309
309
|
|
|
310
310
|
/**
|
|
311
311
|
* Function called when info button is pressed.
|
|
@@ -314,24 +314,24 @@ MoneyField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
314
314
|
* <br />
|
|
315
315
|
* Signature: `(event) => void`
|
|
316
316
|
*/
|
|
317
|
-
onInfoButtonClick: PropTypes__default[
|
|
317
|
+
onInfoButtonClick: PropTypes__default["default"].func,
|
|
318
318
|
|
|
319
319
|
/**
|
|
320
320
|
* Icon to be displayed beside the hint text.
|
|
321
321
|
* <br />
|
|
322
322
|
* Will only get rendered when `hint` is passed as well.
|
|
323
323
|
*/
|
|
324
|
-
hintIcon: PropTypes__default[
|
|
324
|
+
hintIcon: PropTypes__default["default"].node,
|
|
325
325
|
|
|
326
326
|
/**
|
|
327
327
|
* Shows high precision badge in case current value uses high precision.
|
|
328
328
|
*/
|
|
329
|
-
hasHighPrecisionBadge: PropTypes__default[
|
|
329
|
+
hasHighPrecisionBadge: PropTypes__default["default"].bool
|
|
330
330
|
} : {};
|
|
331
331
|
var MoneyField$1 = MoneyField;
|
|
332
332
|
|
|
333
|
-
// NOTE: This string will be replaced
|
|
334
|
-
var version =
|
|
333
|
+
// NOTE: This string will be replaced on build time with the package version.
|
|
334
|
+
var version = "12.2.7";
|
|
335
335
|
|
|
336
|
-
exports[
|
|
336
|
+
exports["default"] = MoneyField$1;
|
|
337
337
|
exports.version = version;
|
|
@@ -52,19 +52,19 @@ var FieldLabel__default = /*#__PURE__*/_interopDefault(FieldLabel);
|
|
|
52
52
|
var MoneyInput__default = /*#__PURE__*/_interopDefault(MoneyInput);
|
|
53
53
|
var FieldErrors__default = /*#__PURE__*/_interopDefault(FieldErrors);
|
|
54
54
|
|
|
55
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default[
|
|
55
|
+
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; }
|
|
56
56
|
|
|
57
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context4; _forEachInstanceProperty__default[
|
|
57
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context4; _forEachInstanceProperty__default["default"](_context4 = ownKeys(Object(source), true)).call(_context4, 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 _context5; _forEachInstanceProperty__default["default"](_context5 = ownKeys(Object(source))).call(_context5, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } } return target; }
|
|
58
58
|
|
|
59
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default[
|
|
59
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default["default"](Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
60
60
|
|
|
61
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct__default[
|
|
61
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
62
62
|
var sequentialId = utils.createSequentialId('money-field-');
|
|
63
63
|
|
|
64
64
|
var hasErrors = function hasErrors(errors) {
|
|
65
65
|
var _context;
|
|
66
66
|
|
|
67
|
-
return errors && _someInstanceProperty__default[
|
|
67
|
+
return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
|
|
68
68
|
};
|
|
69
69
|
|
|
70
70
|
var MoneyField = /*#__PURE__*/function (_Component) {
|
|
@@ -83,7 +83,7 @@ var MoneyField = /*#__PURE__*/function (_Component) {
|
|
|
83
83
|
args[_key] = arguments[_key];
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
_this = _super.call.apply(_super, _concatInstanceProperty__default[
|
|
86
|
+
_this = _super.call.apply(_super, _concatInstanceProperty__default["default"](_context2 = [this]).call(_context2, args));
|
|
87
87
|
_this.state = {
|
|
88
88
|
// We generate an id in case no id is provided by the parent to attach the
|
|
89
89
|
// label to the input component.
|
|
@@ -98,12 +98,12 @@ var MoneyField = /*#__PURE__*/function (_Component) {
|
|
|
98
98
|
// MoneyInput.isTouched() ensures both fields have been touched.
|
|
99
99
|
// This avoids showing an error when the user just selected a language but
|
|
100
100
|
// didn't add an amount yet.
|
|
101
|
-
var hasError = MoneyInput__default[
|
|
102
|
-
return jsxRuntime.jsx(Constraints__default[
|
|
101
|
+
var hasError = MoneyInput__default["default"].isTouched(this.props.touched) && hasErrors(this.props.errors);
|
|
102
|
+
return jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
|
|
103
103
|
max: this.props.horizontalConstraint,
|
|
104
|
-
children: jsxRuntime.jsxs(Spacings__default[
|
|
104
|
+
children: jsxRuntime.jsxs(Spacings__default["default"].Stack, {
|
|
105
105
|
scale: "xs",
|
|
106
|
-
children: [jsxRuntime.jsx(FieldLabel__default[
|
|
106
|
+
children: [jsxRuntime.jsx(FieldLabel__default["default"], {
|
|
107
107
|
title: this.props.title,
|
|
108
108
|
hint: this.props.hint,
|
|
109
109
|
description: this.props.description,
|
|
@@ -111,7 +111,7 @@ var MoneyField = /*#__PURE__*/function (_Component) {
|
|
|
111
111
|
hintIcon: this.props.hintIcon,
|
|
112
112
|
hasRequiredIndicator: this.props.isRequired,
|
|
113
113
|
htmlFor: this.state.id
|
|
114
|
-
}), jsxRuntime.jsx(MoneyInput__default[
|
|
114
|
+
}), jsxRuntime.jsx(MoneyInput__default["default"], _objectSpread({
|
|
115
115
|
id: this.state.id,
|
|
116
116
|
name: this.props.name,
|
|
117
117
|
autoComplete: this.props.autoComplete,
|
|
@@ -129,7 +129,7 @@ var MoneyField = /*#__PURE__*/function (_Component) {
|
|
|
129
129
|
menuPortalTarget: this.props.menuPortalTarget,
|
|
130
130
|
menuPortalZIndex: this.props.menuPortalZIndex,
|
|
131
131
|
menuShouldBlockScroll: this.props.menuShouldBlockScroll
|
|
132
|
-
}, utils.filterDataAttributes(this.props))), jsxRuntime.jsx(FieldErrors__default[
|
|
132
|
+
}, utils.filterDataAttributes(this.props))), jsxRuntime.jsx(FieldErrors__default["default"], {
|
|
133
133
|
errors: this.props.errors,
|
|
134
134
|
isVisible: hasError,
|
|
135
135
|
renderError: this.props.renderError
|
|
@@ -156,8 +156,8 @@ MoneyField.getDerivedStateFromProps = function (props, state) {
|
|
|
156
156
|
MoneyField.propTypes = {};
|
|
157
157
|
var MoneyField$1 = MoneyField;
|
|
158
158
|
|
|
159
|
-
// NOTE: This string will be replaced
|
|
160
|
-
var version =
|
|
159
|
+
// NOTE: This string will be replaced on build time with the package version.
|
|
160
|
+
var version = "12.2.7";
|
|
161
161
|
|
|
162
|
-
exports[
|
|
162
|
+
exports["default"] = MoneyField$1;
|
|
163
163
|
exports.version = version;
|
|
@@ -303,7 +303,7 @@ MoneyField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
303
303
|
} : {};
|
|
304
304
|
var MoneyField$1 = MoneyField;
|
|
305
305
|
|
|
306
|
-
// NOTE: This string will be replaced
|
|
307
|
-
var version =
|
|
306
|
+
// NOTE: This string will be replaced on build time with the package version.
|
|
307
|
+
var version = "12.2.7";
|
|
308
308
|
|
|
309
309
|
export { MoneyField$1 as default, version };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/money-field",
|
|
3
3
|
"description": "A controlled input component for money values with validation states and a label.",
|
|
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,19 +18,16 @@
|
|
|
19
18
|
"main": "dist/commercetools-uikit-money-field.cjs.js",
|
|
20
19
|
"module": "dist/commercetools-uikit-money-field.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/field-errors": "12.2.
|
|
31
|
-
"@commercetools-uikit/field-label": "12.2.
|
|
32
|
-
"@commercetools-uikit/money-input": "12.2.
|
|
33
|
-
"@commercetools-uikit/spacings": "12.2.
|
|
34
|
-
"@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/field-errors": "12.2.5",
|
|
27
|
+
"@commercetools-uikit/field-label": "12.2.7",
|
|
28
|
+
"@commercetools-uikit/money-input": "12.2.7",
|
|
29
|
+
"@commercetools-uikit/spacings": "12.2.5",
|
|
30
|
+
"@commercetools-uikit/utils": "12.2.5",
|
|
35
31
|
"@emotion/react": "^11.4.0",
|
|
36
32
|
"@emotion/styled": "^11.3.0",
|
|
37
33
|
"lodash": "4.17.21",
|