@commercetools-uikit/money-input 17.0.0 → 17.1.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/dist/commercetools-uikit-money-input.cjs.d.ts +1 -1
- package/dist/commercetools-uikit-money-input.cjs.dev.js +8 -8
- package/dist/commercetools-uikit-money-input.cjs.prod.js +8 -8
- package/dist/commercetools-uikit-money-input.esm.js +8 -8
- package/package.json +9 -9
- package/dist/commercetools-uikit-money-input.cjs.d.ts.map +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export * from "./declarations/src/index";
|
|
2
2
|
export { default } from "./declarations/src/index";
|
|
3
|
-
//# sourceMappingURL=
|
|
3
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWVyY2V0b29scy11aWtpdC1tb25leS1pbnB1dC5janMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4vZGVjbGFyYXRpb25zL3NyYy9pbmRleC5kLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBIn0=
|
|
@@ -756,8 +756,8 @@ var messages = reactIntl.defineMessages({
|
|
|
756
756
|
});
|
|
757
757
|
|
|
758
758
|
const _excluded = ["id"];
|
|
759
|
-
function ownKeys(
|
|
760
|
-
function _objectSpread(
|
|
759
|
+
function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
760
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context14, _context15; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context14 = ownKeys(Object(t), !0)).call(_context14, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context15 = ownKeys(Object(t))).call(_context15, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
761
761
|
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)."; }
|
|
762
762
|
const TooltipWrapper = /*#__PURE__*/_styled__default["default"]("div", process.env.NODE_ENV === "production" ? {
|
|
763
763
|
target: "e1u90zjc0"
|
|
@@ -1134,13 +1134,13 @@ const MoneyInput = props => {
|
|
|
1134
1134
|
value: formattedAmount
|
|
1135
1135
|
}
|
|
1136
1136
|
};
|
|
1137
|
-
onChange === null || onChange === void 0
|
|
1137
|
+
onChange === null || onChange === void 0 || onChange(fakeEvent);
|
|
1138
1138
|
}
|
|
1139
1139
|
}
|
|
1140
1140
|
}, [intl.locale, onChange, moneyInputId, props.name, props.value.amount, props.value.currencyCode, toggleAmountHasFocus]);
|
|
1141
1141
|
const handleAmountChange = react$1.useCallback(event => {
|
|
1142
1142
|
if (utils.isNumberish(event.target.value)) {
|
|
1143
|
-
onChange === null || onChange === void 0
|
|
1143
|
+
onChange === null || onChange === void 0 || onChange({
|
|
1144
1144
|
persist: () => {},
|
|
1145
1145
|
target: {
|
|
1146
1146
|
id: MoneyInput.getAmountInputId(moneyInputId),
|
|
@@ -1175,11 +1175,11 @@ const MoneyInput = props => {
|
|
|
1175
1175
|
value: currencyCode || ''
|
|
1176
1176
|
}
|
|
1177
1177
|
};
|
|
1178
|
-
onChange === null || onChange === void 0
|
|
1178
|
+
onChange === null || onChange === void 0 || onChange(fakeCurrencyEvent);
|
|
1179
1179
|
|
|
1180
1180
|
// change amount if necessary
|
|
1181
1181
|
if (props.value.amount !== nextAmount) {
|
|
1182
|
-
onChange === null || onChange === void 0
|
|
1182
|
+
onChange === null || onChange === void 0 || onChange({
|
|
1183
1183
|
persist: () => {},
|
|
1184
1184
|
target: {
|
|
1185
1185
|
id: MoneyInput.getAmountInputId(moneyInputId),
|
|
@@ -1188,7 +1188,7 @@ const MoneyInput = props => {
|
|
|
1188
1188
|
}
|
|
1189
1189
|
});
|
|
1190
1190
|
}
|
|
1191
|
-
(_amountInputRef$curre = amountInputRef.current) === null || _amountInputRef$curre === void 0
|
|
1191
|
+
(_amountInputRef$curre = amountInputRef.current) === null || _amountInputRef$curre === void 0 || _amountInputRef$curre.focus();
|
|
1192
1192
|
}
|
|
1193
1193
|
}, [intl.locale, onChange, moneyInputId, props.name, props.value.amount, props.value.currencyCode]);
|
|
1194
1194
|
const handleCurrencyFocus = react$1.useCallback(() => {
|
|
@@ -1412,7 +1412,7 @@ MoneyInput.defaultProps = defaultProps;
|
|
|
1412
1412
|
var MoneyInput$1 = MoneyInput;
|
|
1413
1413
|
|
|
1414
1414
|
// NOTE: This string will be replaced on build time with the package version.
|
|
1415
|
-
var version = "17.
|
|
1415
|
+
var version = "17.1.0";
|
|
1416
1416
|
|
|
1417
1417
|
exports["default"] = MoneyInput$1;
|
|
1418
1418
|
exports.version = version;
|
|
@@ -755,8 +755,8 @@ var messages = reactIntl.defineMessages({
|
|
|
755
755
|
});
|
|
756
756
|
|
|
757
757
|
const _excluded = ["id"];
|
|
758
|
-
function ownKeys(
|
|
759
|
-
function _objectSpread(
|
|
758
|
+
function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
759
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context14, _context15; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context14 = ownKeys(Object(t), !0)).call(_context14, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context15 = ownKeys(Object(t))).call(_context15, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
760
760
|
const TooltipWrapper = /*#__PURE__*/_styled__default["default"]("div", {
|
|
761
761
|
target: "e1u90zjc0"
|
|
762
762
|
} )({
|
|
@@ -1103,13 +1103,13 @@ const MoneyInput = props => {
|
|
|
1103
1103
|
value: formattedAmount
|
|
1104
1104
|
}
|
|
1105
1105
|
};
|
|
1106
|
-
onChange === null || onChange === void 0
|
|
1106
|
+
onChange === null || onChange === void 0 || onChange(fakeEvent);
|
|
1107
1107
|
}
|
|
1108
1108
|
}
|
|
1109
1109
|
}, [intl.locale, onChange, moneyInputId, props.name, props.value.amount, props.value.currencyCode, toggleAmountHasFocus]);
|
|
1110
1110
|
const handleAmountChange = react$1.useCallback(event => {
|
|
1111
1111
|
if (utils.isNumberish(event.target.value)) {
|
|
1112
|
-
onChange === null || onChange === void 0
|
|
1112
|
+
onChange === null || onChange === void 0 || onChange({
|
|
1113
1113
|
persist: () => {},
|
|
1114
1114
|
target: {
|
|
1115
1115
|
id: MoneyInput.getAmountInputId(moneyInputId),
|
|
@@ -1144,11 +1144,11 @@ const MoneyInput = props => {
|
|
|
1144
1144
|
value: currencyCode || ''
|
|
1145
1145
|
}
|
|
1146
1146
|
};
|
|
1147
|
-
onChange === null || onChange === void 0
|
|
1147
|
+
onChange === null || onChange === void 0 || onChange(fakeCurrencyEvent);
|
|
1148
1148
|
|
|
1149
1149
|
// change amount if necessary
|
|
1150
1150
|
if (props.value.amount !== nextAmount) {
|
|
1151
|
-
onChange === null || onChange === void 0
|
|
1151
|
+
onChange === null || onChange === void 0 || onChange({
|
|
1152
1152
|
persist: () => {},
|
|
1153
1153
|
target: {
|
|
1154
1154
|
id: MoneyInput.getAmountInputId(moneyInputId),
|
|
@@ -1157,7 +1157,7 @@ const MoneyInput = props => {
|
|
|
1157
1157
|
}
|
|
1158
1158
|
});
|
|
1159
1159
|
}
|
|
1160
|
-
(_amountInputRef$curre = amountInputRef.current) === null || _amountInputRef$curre === void 0
|
|
1160
|
+
(_amountInputRef$curre = amountInputRef.current) === null || _amountInputRef$curre === void 0 || _amountInputRef$curre.focus();
|
|
1161
1161
|
}
|
|
1162
1162
|
}, [intl.locale, onChange, moneyInputId, props.name, props.value.amount, props.value.currencyCode]);
|
|
1163
1163
|
const handleCurrencyFocus = react$1.useCallback(() => {
|
|
@@ -1350,7 +1350,7 @@ MoneyInput.defaultProps = defaultProps;
|
|
|
1350
1350
|
var MoneyInput$1 = MoneyInput;
|
|
1351
1351
|
|
|
1352
1352
|
// NOTE: This string will be replaced on build time with the package version.
|
|
1353
|
-
var version = "17.
|
|
1353
|
+
var version = "17.1.0";
|
|
1354
1354
|
|
|
1355
1355
|
exports["default"] = MoneyInput$1;
|
|
1356
1356
|
exports.version = version;
|
|
@@ -725,8 +725,8 @@ var messages = defineMessages({
|
|
|
725
725
|
});
|
|
726
726
|
|
|
727
727
|
const _excluded = ["id"];
|
|
728
|
-
function ownKeys(
|
|
729
|
-
function _objectSpread(
|
|
728
|
+
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
729
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context14, _context15; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context14 = ownKeys(Object(t), !0)).call(_context14, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context15 = ownKeys(Object(t))).call(_context15, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
730
730
|
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)."; }
|
|
731
731
|
const TooltipWrapper = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "production" ? {
|
|
732
732
|
target: "e1u90zjc0"
|
|
@@ -1103,13 +1103,13 @@ const MoneyInput = props => {
|
|
|
1103
1103
|
value: formattedAmount
|
|
1104
1104
|
}
|
|
1105
1105
|
};
|
|
1106
|
-
onChange === null || onChange === void 0
|
|
1106
|
+
onChange === null || onChange === void 0 || onChange(fakeEvent);
|
|
1107
1107
|
}
|
|
1108
1108
|
}
|
|
1109
1109
|
}, [intl.locale, onChange, moneyInputId, props.name, props.value.amount, props.value.currencyCode, toggleAmountHasFocus]);
|
|
1110
1110
|
const handleAmountChange = useCallback(event => {
|
|
1111
1111
|
if (isNumberish(event.target.value)) {
|
|
1112
|
-
onChange === null || onChange === void 0
|
|
1112
|
+
onChange === null || onChange === void 0 || onChange({
|
|
1113
1113
|
persist: () => {},
|
|
1114
1114
|
target: {
|
|
1115
1115
|
id: MoneyInput.getAmountInputId(moneyInputId),
|
|
@@ -1144,11 +1144,11 @@ const MoneyInput = props => {
|
|
|
1144
1144
|
value: currencyCode || ''
|
|
1145
1145
|
}
|
|
1146
1146
|
};
|
|
1147
|
-
onChange === null || onChange === void 0
|
|
1147
|
+
onChange === null || onChange === void 0 || onChange(fakeCurrencyEvent);
|
|
1148
1148
|
|
|
1149
1149
|
// change amount if necessary
|
|
1150
1150
|
if (props.value.amount !== nextAmount) {
|
|
1151
|
-
onChange === null || onChange === void 0
|
|
1151
|
+
onChange === null || onChange === void 0 || onChange({
|
|
1152
1152
|
persist: () => {},
|
|
1153
1153
|
target: {
|
|
1154
1154
|
id: MoneyInput.getAmountInputId(moneyInputId),
|
|
@@ -1157,7 +1157,7 @@ const MoneyInput = props => {
|
|
|
1157
1157
|
}
|
|
1158
1158
|
});
|
|
1159
1159
|
}
|
|
1160
|
-
(_amountInputRef$curre = amountInputRef.current) === null || _amountInputRef$curre === void 0
|
|
1160
|
+
(_amountInputRef$curre = amountInputRef.current) === null || _amountInputRef$curre === void 0 || _amountInputRef$curre.focus();
|
|
1161
1161
|
}
|
|
1162
1162
|
}, [intl.locale, onChange, moneyInputId, props.name, props.value.amount, props.value.currencyCode]);
|
|
1163
1163
|
const handleCurrencyFocus = useCallback(() => {
|
|
@@ -1381,6 +1381,6 @@ MoneyInput.defaultProps = defaultProps;
|
|
|
1381
1381
|
var MoneyInput$1 = MoneyInput;
|
|
1382
1382
|
|
|
1383
1383
|
// NOTE: This string will be replaced on build time with the package version.
|
|
1384
|
-
var version = "17.
|
|
1384
|
+
var version = "17.1.0";
|
|
1385
1385
|
|
|
1386
1386
|
export { MoneyInput$1 as default, version };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/money-input",
|
|
3
3
|
"description": "A controlled input component for money values with validation states.",
|
|
4
|
-
"version": "17.
|
|
4
|
+
"version": "17.1.0",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@babel/runtime": "^7.20.13",
|
|
23
23
|
"@babel/runtime-corejs3": "^7.20.13",
|
|
24
|
-
"@commercetools-uikit/constraints": "17.
|
|
25
|
-
"@commercetools-uikit/design-system": "17.
|
|
26
|
-
"@commercetools-uikit/hooks": "17.
|
|
27
|
-
"@commercetools-uikit/icons": "17.
|
|
28
|
-
"@commercetools-uikit/input-utils": "17.
|
|
29
|
-
"@commercetools-uikit/select-utils": "17.
|
|
30
|
-
"@commercetools-uikit/tooltip": "17.
|
|
31
|
-
"@commercetools-uikit/utils": "17.
|
|
24
|
+
"@commercetools-uikit/constraints": "17.1.0",
|
|
25
|
+
"@commercetools-uikit/design-system": "17.1.0",
|
|
26
|
+
"@commercetools-uikit/hooks": "17.1.0",
|
|
27
|
+
"@commercetools-uikit/icons": "17.1.0",
|
|
28
|
+
"@commercetools-uikit/input-utils": "17.1.0",
|
|
29
|
+
"@commercetools-uikit/select-utils": "17.1.0",
|
|
30
|
+
"@commercetools-uikit/tooltip": "17.1.0",
|
|
31
|
+
"@commercetools-uikit/utils": "17.1.0",
|
|
32
32
|
"@emotion/react": "^11.10.5",
|
|
33
33
|
"@emotion/styled": "^11.10.5",
|
|
34
34
|
"lodash": "4.17.21",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"commercetools-uikit-money-input.cjs.d.ts","sourceRoot":"","sources":["./declarations/src/index.d.ts"],"names":[],"mappings":"AAAA"}
|