yeet
This commit is contained in:
72
node_modules/react-native-web/dist/cjs/exports/KeyboardAvoidingView/index.js
generated
vendored
Normal file
72
node_modules/react-native-web/dist/cjs/exports/KeyboardAvoidingView/index.js
generated
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.default = void 0;
|
||||
|
||||
var _View = _interopRequireDefault(require("../View"));
|
||||
|
||||
var _react = _interopRequireDefault(require("react"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||||
|
||||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
||||
|
||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
||||
|
||||
var KeyboardAvoidingView =
|
||||
/*#__PURE__*/
|
||||
function (_React$Component) {
|
||||
_inheritsLoose(KeyboardAvoidingView, _React$Component);
|
||||
|
||||
function KeyboardAvoidingView() {
|
||||
var _this;
|
||||
|
||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
||||
_this.frame = null;
|
||||
|
||||
_this.onLayout = function (event) {
|
||||
_this.frame = event.nativeEvent.layout;
|
||||
};
|
||||
|
||||
return _this;
|
||||
}
|
||||
|
||||
var _proto = KeyboardAvoidingView.prototype;
|
||||
|
||||
_proto.relativeKeyboardHeight = function relativeKeyboardHeight(keyboardFrame) {
|
||||
var frame = this.frame;
|
||||
|
||||
if (!frame || !keyboardFrame) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
var keyboardY = keyboardFrame.screenY - (this.props.keyboardVerticalOffset || 0);
|
||||
return Math.max(frame.y + frame.height - keyboardY, 0);
|
||||
};
|
||||
|
||||
_proto.onKeyboardChange = function onKeyboardChange(event) {};
|
||||
|
||||
_proto.render = function render() {
|
||||
var _this$props = this.props,
|
||||
behavior = _this$props.behavior,
|
||||
contentContainerStyle = _this$props.contentContainerStyle,
|
||||
keyboardVerticalOffset = _this$props.keyboardVerticalOffset,
|
||||
rest = _objectWithoutPropertiesLoose(_this$props, ["behavior", "contentContainerStyle", "keyboardVerticalOffset"]);
|
||||
|
||||
return _react.default.createElement(_View.default, _extends({
|
||||
onLayout: this.onLayout
|
||||
}, rest));
|
||||
};
|
||||
|
||||
return KeyboardAvoidingView;
|
||||
}(_react.default.Component);
|
||||
|
||||
var _default = KeyboardAvoidingView;
|
||||
exports.default = _default;
|
||||
module.exports = exports.default;
|
Reference in New Issue
Block a user