123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- 'use strict';
-
- function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
-
- var inherits = require('./inherits-c86d64c1.js');
- var React = require('react');
- var React__default = _interopDefault(React);
-
- var WatnedPublishBase =
- /*#__PURE__*/
- function (_Component) {
- inherits._inherits(WatnedPublishBase, _Component);
-
- function WatnedPublishBase() {
- var _this;
-
- inherits._classCallCheck(this, WatnedPublishBase);
-
- _this = inherits._possibleConstructorReturn(this, inherits._getPrototypeOf(WatnedPublishBase).apply(this, arguments));
-
- _this.formatCurrentWanted = function (value) {
- var _this$props$inputWant = _this.props.inputWantedRange,
- inputWantedRange = _this$props$inputWant === void 0 ? [5, 10000] : _this$props$inputWant;
- if (!value) return null;
- var result;
- result = value;
-
- if (parseInt("".concat(value), 10) === value) {
- result = Number(value);
- }
-
- if (!result) return null;
- if (result > inputWantedRange[1]) result = inputWantedRange[1];
- if (result < inputWantedRange[0]) result = inputWantedRange[0];
- return result;
- };
-
- _this.formatResult = function (value) {
- if (!value) return null;
- return Number(value).toFixed(2);
- };
-
- return _this;
- }
-
- return WatnedPublishBase;
- }(React.Component);
-
- exports.WatnedPublishBase = WatnedPublishBase;
- //# sourceMappingURL=WantedPublish-761aab8e.js.map
|