react-intl-number-input 0.3.2 → 0.5.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/README.md +58 -21
- package/dist/index.js +87 -89
- package/jest.config.cjs +6 -0
- package/jest.setup.js +1 -0
- package/package.json +28 -22
package/README.md
CHANGED
|
@@ -1,20 +1,41 @@
|
|
|
1
|
-
# react-intl-number-input
|
|
2
|
-
A React component for masked and formatted number input.
|
|
3
|
-
|
|
4
|
-
[Demo](https://nandorip.github.io/react-intl-number-input/example/dist/)
|
|
5
|
-
|
|
6
|
-
##
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
# react-intl-number-input
|
|
2
|
+
A React component for masked and formatted number input.
|
|
3
|
+
|
|
4
|
+
[Demo](https://nandorip.github.io/react-intl-number-input/example/dist/)
|
|
5
|
+
|
|
6
|
+
## Requirements
|
|
7
|
+
|
|
8
|
+
- Node.js 18+ (recommended: latest LTS)
|
|
9
|
+
- React / ReactDOM: `>=16.8.0 <20`
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
npm install react-intl-number-input
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Development
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
npm install
|
|
21
|
+
npm start
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Open `http://localhost:3001`.
|
|
25
|
+
|
|
26
|
+
## Scripts
|
|
27
|
+
|
|
28
|
+
- `npm start`: runs webpack dev server
|
|
29
|
+
- `npm run build`: builds the demo bundle in `example/dist`
|
|
30
|
+
- `npm run transpile`: transpiles library source from `src` to `dist`
|
|
31
|
+
- `npm test`: runs unit tests with Jest
|
|
32
|
+
- `npm run publish-demo`: builds and deploys demo to GitHub Pages
|
|
33
|
+
|
|
34
|
+
## Usage
|
|
35
|
+
|
|
36
|
+
```javascript
|
|
37
|
+
import React from 'react'
|
|
38
|
+
import IntlNumberInput from 'react-intl-number-input';
|
|
18
39
|
|
|
19
40
|
class App extends React.Component {
|
|
20
41
|
constructor(props) {
|
|
@@ -48,10 +69,26 @@ class App extends React.Component {
|
|
|
48
69
|
</div>
|
|
49
70
|
);
|
|
50
71
|
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
React 18+:
|
|
77
|
+
|
|
78
|
+
```javascript
|
|
79
|
+
import { createRoot } from 'react-dom/client';
|
|
80
|
+
|
|
81
|
+
const root = createRoot(document.getElementById("root"));
|
|
82
|
+
root.render(<App />);
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
React 16/17:
|
|
86
|
+
|
|
87
|
+
```javascript
|
|
88
|
+
import ReactDOM from 'react-dom';
|
|
89
|
+
|
|
90
|
+
ReactDOM.render(<App />, document.getElementById("root"));
|
|
91
|
+
```
|
|
55
92
|
|
|
56
93
|
## Properties
|
|
57
94
|
|
package/dist/index.js
CHANGED
|
@@ -1,130 +1,135 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
function
|
|
22
|
-
|
|
23
|
-
function
|
|
24
|
-
|
|
25
|
-
function
|
|
26
|
-
|
|
27
|
-
function
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
12
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
13
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
15
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
16
|
+
function _readOnlyError(r) { throw new TypeError('"' + r + '" is read-only'); }
|
|
17
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
18
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
19
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
20
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
21
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
22
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
23
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
24
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
25
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
26
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
27
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
28
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
29
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
30
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
31
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
32
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
33
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
34
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
35
|
+
var IntlNumberInput = /*#__PURE__*/function (_Component) {
|
|
32
36
|
function IntlNumberInput(props) {
|
|
37
|
+
var _this;
|
|
33
38
|
_classCallCheck(this, IntlNumberInput);
|
|
34
|
-
|
|
35
|
-
var _this = _possibleConstructorReturn(this, (IntlNumberInput.__proto__ || Object.getPrototypeOf(IntlNumberInput)).call(this, props));
|
|
36
|
-
|
|
39
|
+
_this = _callSuper(this, IntlNumberInput, [props]);
|
|
37
40
|
_this.state = {
|
|
38
|
-
maskedValue: '0'
|
|
41
|
+
maskedValue: '0',
|
|
42
|
+
value: 0
|
|
39
43
|
};
|
|
40
44
|
return _this;
|
|
41
45
|
}
|
|
42
|
-
|
|
43
|
-
_createClass(IntlNumberInput, [{
|
|
44
|
-
key:
|
|
46
|
+
_inherits(IntlNumberInput, _Component);
|
|
47
|
+
return _createClass(IntlNumberInput, [{
|
|
48
|
+
key: "componentDidMount",
|
|
45
49
|
value: function componentDidMount() {
|
|
46
50
|
this.setMaskedValue(this.props.value);
|
|
47
51
|
}
|
|
48
52
|
}, {
|
|
49
|
-
key:
|
|
53
|
+
key: "componentDidUpdate",
|
|
50
54
|
value: function componentDidUpdate(prevProps) {
|
|
51
55
|
if (prevProps.value !== this.props.value) {
|
|
52
56
|
this.setMaskedValue(this.props.value);
|
|
53
57
|
}
|
|
54
58
|
}
|
|
55
59
|
}, {
|
|
56
|
-
key:
|
|
60
|
+
key: "setMaskedValue",
|
|
57
61
|
value: function setMaskedValue() {
|
|
58
62
|
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
59
|
-
|
|
60
63
|
this.setState({
|
|
61
64
|
maskedValue: this.formatNumber(value)
|
|
62
65
|
});
|
|
63
66
|
}
|
|
64
67
|
}, {
|
|
65
|
-
key:
|
|
68
|
+
key: "getMaskedValue",
|
|
66
69
|
value: function getMaskedValue() {
|
|
67
70
|
return this.state.maskedValue;
|
|
68
71
|
}
|
|
69
72
|
}, {
|
|
70
|
-
key:
|
|
73
|
+
key: "getValue",
|
|
74
|
+
value: function getValue() {
|
|
75
|
+
return this.state.value;
|
|
76
|
+
}
|
|
77
|
+
}, {
|
|
78
|
+
key: "getPrecisionValue",
|
|
79
|
+
value: function getPrecisionValue(precision) {
|
|
80
|
+
return Math.pow(10, precision);
|
|
81
|
+
}
|
|
82
|
+
}, {
|
|
83
|
+
key: "getNumberValue",
|
|
84
|
+
value: function getNumberValue(strValue) {
|
|
85
|
+
var numberValue = Number(strValue.replace(/[^0-9]/g, ''));
|
|
86
|
+
return numberValue / this.getPrecisionValue(this.props.precision);
|
|
87
|
+
}
|
|
88
|
+
}, {
|
|
89
|
+
key: "formatNumber",
|
|
71
90
|
value: function formatNumber() {
|
|
72
91
|
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
73
|
-
|
|
74
92
|
var numberValue = value;
|
|
75
93
|
if (typeof numberValue === 'string') {
|
|
76
94
|
numberValue = this.getNumberValue(numberValue);
|
|
77
95
|
}
|
|
78
|
-
|
|
79
96
|
var formattedNumber = new Intl.NumberFormat(this.props.locale, {
|
|
80
97
|
style: 'decimal',
|
|
81
98
|
minimumFractionDigits: this.props.precision,
|
|
82
99
|
maximumFractionDigits: this.props.precision
|
|
83
100
|
}).format(numberValue);
|
|
84
|
-
|
|
85
|
-
return '' + this.props.prefix + formattedNumber + this.props.suffix;
|
|
86
|
-
}
|
|
87
|
-
}, {
|
|
88
|
-
key: 'getPrecisionValue',
|
|
89
|
-
value: function getPrecisionValue(precision) {
|
|
90
|
-
return Math.pow(10, precision);
|
|
91
|
-
}
|
|
92
|
-
}, {
|
|
93
|
-
key: 'getNumberValue',
|
|
94
|
-
value: function getNumberValue(strValue) {
|
|
95
|
-
var numberValue = Number(strValue.replace(/[^0-9-]/g, ''));
|
|
96
|
-
|
|
97
|
-
return numberValue / this.getPrecisionValue(this.props.precision);
|
|
101
|
+
return "".concat(this.props.prefix).concat(formattedNumber).concat(this.props.suffix);
|
|
98
102
|
}
|
|
99
103
|
}, {
|
|
100
|
-
key:
|
|
104
|
+
key: "updateValues",
|
|
101
105
|
value: function updateValues(event) {
|
|
102
106
|
var value = this.getNumberValue(event.target.value);
|
|
103
107
|
var maskedValue = this.formatNumber(value);
|
|
104
|
-
|
|
105
|
-
this.setState({ maskedValue: maskedValue });
|
|
106
|
-
|
|
107
108
|
return [value, maskedValue];
|
|
108
109
|
}
|
|
109
110
|
}, {
|
|
110
|
-
key:
|
|
111
|
+
key: "handleChange",
|
|
111
112
|
value: function handleChange(event) {
|
|
113
|
+
var _this2 = this;
|
|
112
114
|
event.preventDefault();
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
115
|
+
var _this$updateValues = this.updateValues(event),
|
|
116
|
+
_this$updateValues2 = _slicedToArray(_this$updateValues, 2),
|
|
117
|
+
value = _this$updateValues2[0],
|
|
118
|
+
maskedValue = _this$updateValues2[1];
|
|
119
|
+
event.persist();
|
|
119
120
|
if (this.props.onChange && maskedValue) {
|
|
120
|
-
this.
|
|
121
|
+
this.setState({
|
|
122
|
+
value: value,
|
|
123
|
+
maskedValue: maskedValue
|
|
124
|
+
}, function () {
|
|
125
|
+
_this2.props.onChange(event, value, maskedValue);
|
|
126
|
+
});
|
|
121
127
|
}
|
|
122
128
|
}
|
|
123
129
|
}, {
|
|
124
|
-
key:
|
|
130
|
+
key: "customProps",
|
|
125
131
|
value: function customProps() {
|
|
126
|
-
var customProps =
|
|
127
|
-
|
|
132
|
+
var customProps = _objectSpread({}, this.props);
|
|
128
133
|
delete customProps.locale;
|
|
129
134
|
delete customProps.prefix;
|
|
130
135
|
delete customProps.suffix;
|
|
@@ -132,42 +137,35 @@ var IntlNumberInput = function (_Component) {
|
|
|
132
137
|
delete customProps.autoFocus;
|
|
133
138
|
delete customProps.value;
|
|
134
139
|
delete customProps.onChange;
|
|
135
|
-
|
|
136
140
|
return customProps;
|
|
137
141
|
}
|
|
138
142
|
}, {
|
|
139
|
-
key:
|
|
143
|
+
key: "render",
|
|
140
144
|
value: function render() {
|
|
141
|
-
var
|
|
142
|
-
|
|
143
|
-
return _react2.default.createElement('input', _extends({
|
|
145
|
+
var _this3 = this;
|
|
146
|
+
return /*#__PURE__*/_react["default"].createElement("input", _extends({
|
|
144
147
|
value: this.state.maskedValue,
|
|
145
148
|
disabled: this.props.disabled,
|
|
146
149
|
onChange: function onChange(e) {
|
|
147
|
-
return
|
|
150
|
+
return _this3.handleChange(e);
|
|
148
151
|
}
|
|
149
152
|
}, this.customProps()));
|
|
150
153
|
}
|
|
151
154
|
}]);
|
|
152
|
-
|
|
153
|
-
return IntlNumberInput;
|
|
154
155
|
}(_react.Component);
|
|
155
|
-
|
|
156
156
|
IntlNumberInput.propTypes = {
|
|
157
|
-
locale:
|
|
158
|
-
prefix:
|
|
159
|
-
suffix:
|
|
160
|
-
precision:
|
|
161
|
-
value:
|
|
162
|
-
disabled:
|
|
163
|
-
onChange:
|
|
157
|
+
locale: _propTypes["default"].string.isRequired,
|
|
158
|
+
prefix: _propTypes["default"].string.isRequired,
|
|
159
|
+
suffix: _propTypes["default"].string.isRequired,
|
|
160
|
+
precision: _propTypes["default"].number.isRequired,
|
|
161
|
+
value: _propTypes["default"].oneOfType([_propTypes["default"].number, _propTypes["default"].string]),
|
|
162
|
+
disabled: _propTypes["default"].bool,
|
|
163
|
+
onChange: _propTypes["default"].func
|
|
164
164
|
};
|
|
165
|
-
|
|
166
165
|
IntlNumberInput.defaultProps = {
|
|
167
166
|
locale: 'en-US',
|
|
168
167
|
prefix: '',
|
|
169
168
|
suffix: '',
|
|
170
169
|
precision: 2
|
|
171
170
|
};
|
|
172
|
-
|
|
173
|
-
exports.default = IntlNumberInput;
|
|
171
|
+
var _default = exports["default"] = IntlNumberInput;
|
package/jest.config.cjs
ADDED
package/jest.setup.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@testing-library/jest-dom";
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-intl-number-input",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "A React component for masked and formatted number input.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"test": "
|
|
8
|
-
"start": "webpack
|
|
9
|
-
"transpile": "babel src -d dist --copy-files",
|
|
7
|
+
"test": "jest --runInBand",
|
|
8
|
+
"start": "webpack serve --mode development",
|
|
9
|
+
"transpile": "babel src -d dist --copy-files --no-copy-ignored --ignore \"**/*.test.jsx\"",
|
|
10
10
|
"prepublishOnly": "npm run transpile",
|
|
11
11
|
"build": "webpack --mode production",
|
|
12
12
|
"deploy": "gh-pages -d example/dist",
|
|
@@ -34,24 +34,30 @@
|
|
|
34
34
|
},
|
|
35
35
|
"homepage": "https://github.com/nandorip/react-intl-number-input#readme",
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"react": "
|
|
38
|
-
"react-dom": "
|
|
37
|
+
"react": ">=16.8.0 <20",
|
|
38
|
+
"react-dom": ">=16.8.0 <20"
|
|
39
39
|
},
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"babel-core": "^6.26.3",
|
|
43
|
-
"babel-loader": "^7.1.4",
|
|
44
|
-
"babel-plugin-transform-object-rest-spread": "^6.26.0",
|
|
45
|
-
"babel-preset-env": "^1.7.0",
|
|
46
|
-
"babel-preset-react": "^6.24.1",
|
|
47
|
-
"gh-pages": "^2.0.0",
|
|
48
|
-
"html-webpack-plugin": "^3.2.0",
|
|
49
|
-
"prop-types": "^15.6.2",
|
|
50
|
-
"react": "^16.5.2",
|
|
51
|
-
"react-dom": "^16.5.2",
|
|
52
|
-
"webpack": "^4.19.1",
|
|
53
|
-
"webpack-cli": "^3.1.0",
|
|
54
|
-
"webpack-dev-server": "^3.1.8"
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"prop-types": "^15.8.1"
|
|
55
42
|
},
|
|
56
|
-
"
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@babel/cli": "^7.27.2",
|
|
45
|
+
"@babel/core": "^7.27.4",
|
|
46
|
+
"@babel/plugin-transform-object-rest-spread": "^7.28.4",
|
|
47
|
+
"@babel/preset-env": "^7.28.3",
|
|
48
|
+
"@babel/preset-react": "^7.27.1",
|
|
49
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
50
|
+
"@testing-library/react": "^16.3.0",
|
|
51
|
+
"babel-jest": "^30.2.0",
|
|
52
|
+
"babel-loader": "^10.0.0",
|
|
53
|
+
"gh-pages": "^6.3.0",
|
|
54
|
+
"html-webpack-plugin": "^5.6.4",
|
|
55
|
+
"jest": "^30.2.0",
|
|
56
|
+
"jest-environment-jsdom": "^30.2.0",
|
|
57
|
+
"react": "^19.2.0",
|
|
58
|
+
"react-dom": "^19.2.0",
|
|
59
|
+
"webpack": "^5.101.3",
|
|
60
|
+
"webpack-cli": "^6.0.1",
|
|
61
|
+
"webpack-dev-server": "^5.2.2"
|
|
62
|
+
}
|
|
57
63
|
}
|