b265f8a4c9be5b6526c8f8048995a92c.json 10.7 KB
{"ast":null,"code":"var _interopRequireDefault=require(\"@babel/runtime/helpers/interopRequireDefault\");Object.defineProperty(exports,\"__esModule\",{value:true});exports.default=void 0;var _getBoundingClientRect=_interopRequireDefault(require(\"../../modules/getBoundingClientRect\"));var _setValueForStyles=_interopRequireDefault(require(\"../../vendor/react-dom/setValueForStyles\"));var getRect=function getRect(node){var _getBoundingClientRec=(0,_getBoundingClientRect.default)(node),x=_getBoundingClientRec.x,y=_getBoundingClientRec.y,top=_getBoundingClientRec.top,left=_getBoundingClientRec.left;var width=node.offsetWidth;var height=node.offsetHeight;return{x:x,y:y,width:width,height:height,top:top,left:left};};var _measureLayout=function measureLayout(node,relativeToNativeNode,callback){var relativeNode=relativeToNativeNode||node&&node.parentNode;if(node&&relativeNode){setTimeout(function(){var relativeRect=(0,_getBoundingClientRect.default)(relativeNode);var _getRect=getRect(node),height=_getRect.height,left=_getRect.left,top=_getRect.top,width=_getRect.width;var x=left-relativeRect.left;var y=top-relativeRect.top;callback(x,y,width,height,left,top);},0);}};var focusableElements={A:true,INPUT:true,SELECT:true,TEXTAREA:true};var UIManager={blur:function blur(node){try{node.blur();}catch(err){}},focus:function focus(node){try{var name=node.nodeName;if(node.getAttribute('tabIndex')==null&&focusableElements[name]==null){node.setAttribute('tabIndex','-1');}node.focus();}catch(err){}},measure:function measure(node,callback){_measureLayout(node,null,callback);},measureInWindow:function measureInWindow(node,callback){if(node){setTimeout(function(){var _getRect2=getRect(node),height=_getRect2.height,left=_getRect2.left,top=_getRect2.top,width=_getRect2.width;callback(left,top,width,height);},0);}},measureLayout:function measureLayout(node,relativeToNativeNode,onFail,onSuccess){_measureLayout(node,relativeToNativeNode,onSuccess);},updateView:function updateView(node,props,component){for(var prop in props){if(!Object.prototype.hasOwnProperty.call(props,prop)){continue;}var value=props[prop];switch(prop){case'style':{(0,_setValueForStyles.default)(node,value,component._reactInternalInstance);break;}case'class':case'className':{node.setAttribute('class',value);break;}case'text':case'value':node.value=value;break;default:node.setAttribute(prop,value);}}},configureNextLayoutAnimation:function configureNextLayoutAnimation(config,onAnimationDidEnd){onAnimationDidEnd();},setLayoutAnimationEnabledExperimental:function setLayoutAnimationEnabledExperimental(){}};var _default=UIManager;exports.default=_default;","map":{"version":3,"sources":["C:/Users/bluej/Desktop/2_2/searchGuide/searchGuide/node_modules/react-native-web/dist/exports/UIManager/index.js"],"names":["getRect","node","_getBoundingClientRec","x","y","top","left","width","offsetWidth","height","offsetHeight","_measureLayout","measureLayout","relativeToNativeNode","callback","relativeNode","parentNode","setTimeout","relativeRect","_getRect","focusableElements","A","INPUT","SELECT","TEXTAREA","UIManager","blur","err","focus","name","nodeName","getAttribute","setAttribute","measure","measureInWindow","_getRect2","onFail","onSuccess","updateView","props","component","prop","Object","prototype","hasOwnProperty","call","value","_reactInternalInstance","configureNextLayoutAnimation","config","onAnimationDidEnd","setLayoutAnimationEnabledExperimental"],"mappings":"mKAQA,kGACA,mGAEA,GAAIA,CAAAA,OAAO,CAAG,QAASA,CAAAA,OAAT,CAAiBC,IAAjB,CAAuB,CAInC,GAAIC,CAAAA,qBAAqB,CAAG,mCAAsBD,IAAtB,CAA5B,CACIE,CAAC,CAAGD,qBAAqB,CAACC,CAD9B,CAEIC,CAAC,CAAGF,qBAAqB,CAACE,CAF9B,CAGIC,GAAG,CAAGH,qBAAqB,CAACG,GAHhC,CAIIC,IAAI,CAAGJ,qBAAqB,CAACI,IAJjC,CAMA,GAAIC,CAAAA,KAAK,CAAGN,IAAI,CAACO,WAAjB,CACA,GAAIC,CAAAA,MAAM,CAAGR,IAAI,CAACS,YAAlB,CACA,MAAO,CACLP,CAAC,CAAEA,CADE,CAELC,CAAC,CAAEA,CAFE,CAGLG,KAAK,CAAEA,KAHF,CAILE,MAAM,CAAEA,MAJH,CAKLJ,GAAG,CAAEA,GALA,CAMLC,IAAI,CAAEA,IAND,CAAP,CAQD,CApBD,CAsBA,GAAIK,CAAAA,cAAc,CAAG,QA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,CAAwB,CACtB,GAAI,CAACG,MAAM,CAACC,SAAP,CAAiBC,cAAjB,CAAgCC,IAAhC,CAAqCN,KAArC,CAA4CE,IAA5C,CAAL,CAAwD,CACtD,SACD,CAED,GAAIK,CAAAA,KAAK,CAAGP,KAAK,CAACE,IAAD,CAAjB,CAEA,OAAQA,IAAR,EACE,IAAK,OAAL,CACE,CACE,+BAAkBxC,IAAlB,CAAwB6C,KAAxB,CAA+BN,SAAS,CAACO,sBAAzC,EACA,MACD,CAEH,IAAK,OAAL,CACA,IAAK,WAAL,CACE,CACE9C,IAAI,CAAC+B,YAAL,CAAkB,OAAlB,CAA2Bc,KAA3B,EACA,MACD,CAEH,IAAK,MAAL,CACA,IAAK,OAAL,CAEE7C,IAAI,CAAC6C,KAAL,CAAaA,KAAb,CACA,MAEF,QACE7C,IAAI,CAAC+B,YAAL,CAAkBS,IAAlB,CAAwBK,KAAxB,EArBJ,CAuBD,CACF,CAxEa,CAyEdE,4BAA4B,CAAE,QAASA,CAAAA,4BAAT,CAAsCC,MAAtC,CAA8CC,iBAA9C,CAAiE,CAC7FA,iBAAiB,GAClB,CA3Ea,CA6EdC,qCAAqC,CAAE,QAASA,CAAAA,qCAAT,EAAiD,CAAE,CA7E5E,CAAhB,C,aA+Ee1B,S","sourcesContent":["/**\n * Copyright (c) Nicolas Gallagher.\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 getBoundingClientRect from '../../modules/getBoundingClientRect';\nimport setValueForStyles from '../../vendor/react-dom/setValueForStyles';\n\nvar getRect = function getRect(node) {\n  // Unlike the DOM's getBoundingClientRect, React Native layout measurements\n  // for \"height\" and \"width\" ignore scale transforms.\n  // https://developer.mozilla.org/en-US/docs/Web/API/CSS_Object_Model/Determining_the_dimensions_of_elements\n  var _getBoundingClientRec = getBoundingClientRect(node),\n      x = _getBoundingClientRec.x,\n      y = _getBoundingClientRec.y,\n      top = _getBoundingClientRec.top,\n      left = _getBoundingClientRec.left;\n\n  var width = node.offsetWidth;\n  var height = node.offsetHeight;\n  return {\n    x: x,\n    y: y,\n    width: width,\n    height: height,\n    top: top,\n    left: left\n  };\n};\n\nvar _measureLayout = function measureLayout(node, relativeToNativeNode, callback) {\n  var relativeNode = relativeToNativeNode || node && node.parentNode;\n\n  if (node && relativeNode) {\n    setTimeout(function () {\n      var relativeRect = getBoundingClientRect(relativeNode);\n\n      var _getRect = getRect(node),\n          height = _getRect.height,\n          left = _getRect.left,\n          top = _getRect.top,\n          width = _getRect.width;\n\n      var x = left - relativeRect.left;\n      var y = top - relativeRect.top;\n      callback(x, y, width, height, left, top);\n    }, 0);\n  }\n};\n\nvar focusableElements = {\n  A: true,\n  INPUT: true,\n  SELECT: true,\n  TEXTAREA: true\n};\nvar UIManager = {\n  blur: function blur(node) {\n    try {\n      node.blur();\n    } catch (err) {}\n  },\n  focus: function focus(node) {\n    try {\n      var name = node.nodeName; // A tabIndex of -1 allows element to be programmatically focused but\n      // prevents keyboard focus, so we don't want to set the value on elements\n      // that support keyboard focus by default.\n\n      if (node.getAttribute('tabIndex') == null && focusableElements[name] == null) {\n        node.setAttribute('tabIndex', '-1');\n      }\n\n      node.focus();\n    } catch (err) {}\n  },\n  measure: function measure(node, callback) {\n    _measureLayout(node, null, callback);\n  },\n  measureInWindow: function measureInWindow(node, callback) {\n    if (node) {\n      setTimeout(function () {\n        var _getRect2 = getRect(node),\n            height = _getRect2.height,\n            left = _getRect2.left,\n            top = _getRect2.top,\n            width = _getRect2.width;\n\n        callback(left, top, width, height);\n      }, 0);\n    }\n  },\n  measureLayout: function measureLayout(node, relativeToNativeNode, onFail, onSuccess) {\n    _measureLayout(node, relativeToNativeNode, onSuccess);\n  },\n  updateView: function updateView(node, props, component\n  /* only needed to surpress React errors in development */\n  ) {\n    for (var prop in props) {\n      if (!Object.prototype.hasOwnProperty.call(props, prop)) {\n        continue;\n      }\n\n      var value = props[prop];\n\n      switch (prop) {\n        case 'style':\n          {\n            setValueForStyles(node, value, component._reactInternalInstance);\n            break;\n          }\n\n        case 'class':\n        case 'className':\n          {\n            node.setAttribute('class', value);\n            break;\n          }\n\n        case 'text':\n        case 'value':\n          // native platforms use `text` prop to replace text input value\n          node.value = value;\n          break;\n\n        default:\n          node.setAttribute(prop, value);\n      }\n    }\n  },\n  configureNextLayoutAnimation: function configureNextLayoutAnimation(config, onAnimationDidEnd) {\n    onAnimationDidEnd();\n  },\n  // mocks\n  setLayoutAnimationEnabledExperimental: function setLayoutAnimationEnabledExperimental() {}\n};\nexport default UIManager;"]},"metadata":{},"sourceType":"script"}