Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rc-input

Package Overview
Dependencies
Maintainers
3
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-input - npm Package Compare versions

Comparing version 1.3.5 to 1.3.6

2

es/BaseInput.js

@@ -39,3 +39,3 @@ import _extends from "@babel/runtime/helpers/esm/extends";

if ((_containerRef$current = containerRef.current) !== null && _containerRef$current !== void 0 && _containerRef$current.contains(e.target)) {
triggerFocus === null || triggerFocus === void 0 ? void 0 : triggerFocus();
triggerFocus === null || triggerFocus === void 0 || triggerFocus();
}

@@ -42,0 +42,0 @@ };

@@ -78,11 +78,11 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";

var _inputRef$current;
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.blur();
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.blur();
},
setSelectionRange: function setSelectionRange(start, end, direction) {
var _inputRef$current2;
(_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.setSelectionRange(start, end, direction);
(_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 || _inputRef$current2.setSelectionRange(start, end, direction);
},
select: function select() {
var _inputRef$current3;
(_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 ? void 0 : _inputRef$current3.select();
(_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 || _inputRef$current3.select();
},

@@ -116,3 +116,3 @@ input: inputRef.current

var _inputRef$current6;
(_inputRef$current6 = inputRef.current) === null || _inputRef$current6 === void 0 ? void 0 : _inputRef$current6.setSelectionRange.apply(_inputRef$current6, _toConsumableArray(selection));
(_inputRef$current6 = inputRef.current) === null || _inputRef$current6 === void 0 || _inputRef$current6.setSelectionRange.apply(_inputRef$current6, _toConsumableArray(selection));
}

@@ -126,3 +126,3 @@ }, [selection]);

triggerChange(e, e.currentTarget.value);
onCompositionEnd === null || onCompositionEnd === void 0 ? void 0 : onCompositionEnd(e);
onCompositionEnd === null || onCompositionEnd === void 0 || onCompositionEnd(e);
};

@@ -133,11 +133,11 @@ var handleKeyDown = function handleKeyDown(e) {

}
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
onKeyDown === null || onKeyDown === void 0 || onKeyDown(e);
};
var handleFocus = function handleFocus(e) {
setFocused(true);
onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
onFocus === null || onFocus === void 0 || onFocus(e);
};
var handleBlur = function handleBlur(e) {
setFocused(false);
onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
onBlur === null || onBlur === void 0 || onBlur(e);
};

@@ -174,3 +174,3 @@ var handleReset = function handleReset(e) {

compositionRef.current = true;
_onCompositionStart === null || _onCompositionStart === void 0 ? void 0 : _onCompositionStart(e);
_onCompositionStart === null || _onCompositionStart === void 0 || _onCompositionStart(e);
},

@@ -177,0 +177,0 @@ onCompositionEnd: onInternalCompositionEnd

@@ -51,3 +51,6 @@ export function hasAddon(props) {

});
target.value = targetValue;
// https://github.com/ant-design/ant-design/issues/45737
if (target.type !== 'file') {
target.value = targetValue;
}
onChange(event);

@@ -54,0 +57,0 @@ return;

@@ -16,4 +16,4 @@ "use strict";

var _commonUtils = require("./utils/commonUtils");
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof3(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
var BaseInput = function BaseInput(props) {

@@ -50,3 +50,3 @@ var _inputElement$props, _inputElement$props2;

if ((_containerRef$current = containerRef.current) !== null && _containerRef$current !== void 0 && _containerRef$current.contains(e.target)) {
triggerFocus === null || triggerFocus === void 0 ? void 0 : triggerFocus();
triggerFocus === null || triggerFocus === void 0 || triggerFocus();
}

@@ -134,3 +134,2 @@ };

};
var _default = BaseInput;
exports.default = _default;
var _default = exports.default = BaseInput;

@@ -15,4 +15,4 @@ "use strict";

var _excluded = ["show"];
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof3(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
/**

@@ -19,0 +19,0 @@ * Cut `value` by the `count.max` prop.

@@ -16,3 +16,2 @@ "use strict";

var _Input = _interopRequireDefault(require("./Input"));
var _default = _Input.default;
exports.default = _default;
var _default = exports.default = _Input.default;

@@ -23,4 +23,4 @@ "use strict";

var _excluded = ["autoComplete", "onChange", "onFocus", "onBlur", "onPressEnter", "onKeyDown", "prefixCls", "disabled", "htmlSize", "className", "maxLength", "suffix", "showCount", "count", "type", "classes", "classNames", "styles", "onCompositionStart", "onCompositionEnd"];
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
var Input = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {

@@ -89,11 +89,11 @@ var autoComplete = props.autoComplete,

var _inputRef$current;
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.blur();
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.blur();
},
setSelectionRange: function setSelectionRange(start, end, direction) {
var _inputRef$current2;
(_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.setSelectionRange(start, end, direction);
(_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 || _inputRef$current2.setSelectionRange(start, end, direction);
},
select: function select() {
var _inputRef$current3;
(_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 ? void 0 : _inputRef$current3.select();
(_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 || _inputRef$current3.select();
},

@@ -127,3 +127,3 @@ input: inputRef.current

var _inputRef$current6;
(_inputRef$current6 = inputRef.current) === null || _inputRef$current6 === void 0 ? void 0 : _inputRef$current6.setSelectionRange.apply(_inputRef$current6, (0, _toConsumableArray2.default)(selection));
(_inputRef$current6 = inputRef.current) === null || _inputRef$current6 === void 0 || _inputRef$current6.setSelectionRange.apply(_inputRef$current6, (0, _toConsumableArray2.default)(selection));
}

@@ -137,3 +137,3 @@ }, [selection]);

triggerChange(e, e.currentTarget.value);
onCompositionEnd === null || onCompositionEnd === void 0 ? void 0 : onCompositionEnd(e);
onCompositionEnd === null || onCompositionEnd === void 0 || onCompositionEnd(e);
};

@@ -144,11 +144,11 @@ var handleKeyDown = function handleKeyDown(e) {

}
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
onKeyDown === null || onKeyDown === void 0 || onKeyDown(e);
};
var handleFocus = function handleFocus(e) {
setFocused(true);
onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
onFocus === null || onFocus === void 0 || onFocus(e);
};
var handleBlur = function handleBlur(e) {
setFocused(false);
onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
onBlur === null || onBlur === void 0 || onBlur(e);
};

@@ -185,3 +185,3 @@ var handleReset = function handleReset(e) {

compositionRef.current = true;
_onCompositionStart === null || _onCompositionStart === void 0 ? void 0 : _onCompositionStart(e);
_onCompositionStart === null || _onCompositionStart === void 0 || _onCompositionStart(e);
},

@@ -224,3 +224,2 @@ onCompositionEnd: onInternalCompositionEnd

});
var _default = Input;
exports.default = _default;
var _default = exports.default = Input;

@@ -60,3 +60,6 @@ "use strict";

});
target.value = targetValue;
// https://github.com/ant-design/ant-design/issues/45737
if (target.type !== 'file') {
target.value = targetValue;
}
onChange(event);

@@ -63,0 +66,0 @@ return;

{
"name": "rc-input",
"version": "1.3.5",
"version": "1.3.6",
"description": "React input component",

@@ -64,3 +64,3 @@ "keywords": [

"eslint": "^7.0.0",
"father": "^4",
"father": "^4.3.7",
"gh-pages": "^3.1.0",

@@ -67,0 +67,0 @@ "husky": "^8.0.1",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc