cf3d3b6f58b4983275cee75f5abf92a0.json
5.74 KB
{"ast":null,"code":"var _interopRequireDefault=require(\"@babel/runtime/helpers/interopRequireDefault\");Object.defineProperty(exports,\"__esModule\",{value:true});exports.default=void 0;var _createDOMProps=_interopRequireDefault(require(\"../createDOMProps\"));var _findNodeHandle=_interopRequireDefault(require(\"../../exports/findNodeHandle\"));var _styleResolver=_interopRequireDefault(require(\"../../exports/StyleSheet/styleResolver\"));var _UIManager=_interopRequireDefault(require(\"../../exports/UIManager\"));var NativeMethodsMixin={blur:function blur(){_UIManager.default.blur((0,_findNodeHandle.default)(this));},focus:function focus(){_UIManager.default.focus((0,_findNodeHandle.default)(this));},measure:function measure(callback){_UIManager.default.measure((0,_findNodeHandle.default)(this),callback);},measureInWindow:function measureInWindow(callback){_UIManager.default.measureInWindow((0,_findNodeHandle.default)(this),callback);},measureLayout:function measureLayout(relativeToNativeNode,onSuccess,onFail){_UIManager.default.measureLayout((0,_findNodeHandle.default)(this),relativeToNativeNode,onFail,onSuccess);},setNativeProps:function setNativeProps(nativeProps){if(!nativeProps){return;}var node=(0,_findNodeHandle.default)(this);if(node){var domProps=(0,_createDOMProps.default)(null,nativeProps,function(style){return _styleResolver.default.resolveWithNode(style,node);});_UIManager.default.updateView(node,domProps,this);}}};var _default=NativeMethodsMixin;exports.default=_default;","map":{"version":3,"sources":["C:/Users/bluej/Desktop/2_2/searchGuide/searchGuide/node_modules/react-native-web/dist/modules/NativeMethodsMixin/index.js"],"names":["NativeMethodsMixin","blur","UIManager","focus","measure","callback","measureInWindow","measureLayout","relativeToNativeNode","onSuccess","onFail","setNativeProps","nativeProps","node","domProps","style","styleResolver","resolveWithNode","updateView"],"mappings":"mKASA,yEACA,oFACA,6FACA,0EACA,GAAIA,CAAAA,kBAAkB,CAAG,CAIvBC,IAAI,CAAE,QAASA,CAAAA,IAAT,EAAgB,CACpBC,mBAAUD,IAAV,CAAe,4BAAe,IAAf,CAAf,EACD,CANsB,CAYvBE,KAAK,CAAE,QAASA,CAAAA,KAAT,EAAiB,CACtBD,mBAAUC,KAAV,CAAgB,4BAAe,IAAf,CAAhB,EACD,CAdsB,CAmBvBC,OAAO,CAAE,QAASA,CAAAA,OAAT,CAAiBC,QAAjB,CAA2B,CAClCH,mBAAUE,OAAV,CAAkB,4BAAe,IAAf,CAAlB,CAAwCC,QAAxC,EACD,CArBsB,CAsCvBC,eAAe,CAAE,QAASA,CAAAA,eAAT,CAAyBD,QAAzB,CAAmC,CAClDH,mBAAUI,eAAV,CAA0B,4BAAe,IAAf,CAA1B,CAAgDD,QAAhD,EACD,CAxCsB,CA6CvBE,aAAa,CAAE,QAASA,CAAAA,aAAT,CAAuBC,oBAAvB,CAA6CC,SAA7C,CAAwDC,MAAxD,CAAgE,CAC7ER,mBAAUK,aAAV,CAAwB,4BAAe,IAAf,CAAxB,CAA8CC,oBAA9C,CAAoEE,MAApE,CAA4ED,SAA5E,EACD,CA/CsB,CAuDvBE,cAAc,CAAE,QAASA,CAAAA,cAAT,CAAwBC,WAAxB,CAAqC,CACnD,GAAI,CAACA,WAAL,CAAkB,CAChB,OACD,CAED,GAAIC,CAAAA,IAAI,CAAG,4BAAe,IAAf,CAAX,CAEA,GAAIA,IAAJ,CAAU,CAGR,GAAIC,CAAAA,QAAQ,CAAG,4BAAe,IAAf,CAAqBF,WAArB,CAAkC,SAAUG,KAAV,CAAiB,CAChE,MAAOC,wBAAcC,eAAd,CAA8BF,KAA9B,CAAqCF,IAArC,CAAP,CACD,CAFc,CAAf,CAGAX,mBAAUgB,UAAV,CAAqBL,IAArB,CAA2BC,QAA3B,CAAqC,IAArC,EACD,CACF,CAtEsB,CAAzB,C,aAwEed,kB","sourcesContent":["/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport createDOMProps from '../createDOMProps';\nimport findNodeHandle from '../../exports/findNodeHandle';\nimport styleResolver from '../../exports/StyleSheet/styleResolver';\nimport UIManager from '../../exports/UIManager';\nvar NativeMethodsMixin = {\n /**\n * Removes focus from an input or view. This is the opposite of `focus()`.\n */\n blur: function blur() {\n UIManager.blur(findNodeHandle(this));\n },\n\n /**\n * Requests focus for the given input or view.\n * The exact behavior triggered will depend the type of view.\n */\n focus: function focus() {\n UIManager.focus(findNodeHandle(this));\n },\n\n /**\n * Determines the position and dimensions of the view\n */\n measure: function measure(callback) {\n UIManager.measure(findNodeHandle(this), callback);\n },\n\n /**\n * Determines the location of the given view in the window and returns the\n * values via an async callback. If the React root view is embedded in\n * another native view, this will give you the absolute coordinates. If\n * successful, the callback will be called be called with the following\n * arguments:\n *\n * - x\n * - y\n * - width\n * - height\n *\n * Note that these measurements are not available until after the rendering\n * has been completed.\n */\n measureInWindow: function measureInWindow(callback) {\n UIManager.measureInWindow(findNodeHandle(this), callback);\n },\n\n /**\n * Measures the view relative to another view (usually an ancestor)\n */\n measureLayout: function measureLayout(relativeToNativeNode, onSuccess, onFail) {\n UIManager.measureLayout(findNodeHandle(this), relativeToNativeNode, onFail, onSuccess);\n },\n\n /**\n * This function sends props straight to the underlying DOM node.\n * This works as if all styles were set as inline styles. Since a DOM node\n * may aleady be styled with class names and inline styles, we need to get\n * the initial styles from the DOM node and merge them with incoming props.\n */\n setNativeProps: function setNativeProps(nativeProps) {\n if (!nativeProps) {\n return;\n }\n\n var node = findNodeHandle(this);\n\n if (node) {\n // Next state is determined by comparison to existing state (in the DOM).\n // Existing state has already gone through i18n transform\n var domProps = createDOMProps(null, nativeProps, function (style) {\n return styleResolver.resolveWithNode(style, node);\n });\n UIManager.updateView(node, domProps, this);\n }\n }\n};\nexport default NativeMethodsMixin;"]},"metadata":{},"sourceType":"script"}