-
Notifications
You must be signed in to change notification settings - Fork 45.6k
/
react-linked-input.min.js
1 lines (1 loc) · 12.5 KB
/
react-linked-input.min.js
1
!function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{var g;g="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,g.ReactLinkedInput=f()}}(function(){return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n||e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){(function(process){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}function makeEmptyFunction(arg){return function(){return arg}}function invariant(condition,format,a,b,c,d,e,f){if(validateFormat(format),!condition){var error;if(void 0===format)error=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var args=[a,b,c,d,e,f],argIndex=0;error=new Error(format.replace(/%s/g,function(){return args[argIndex++]})),error.name="Invariant Violation"}throw error.framesToPop=1,error}}function _assertSingleLink(inputProps){invariant(null==inputProps.checkedLink||null==inputProps.valueLink,"Cannot provide a checkedLink and a valueLink. If you want to use checkedLink, you probably don't want to use valueLink and vice versa.")}function _assertValueLink(inputProps){_assertSingleLink(inputProps),invariant(null==inputProps.value&&null==inputProps.onChange,"Cannot provide a valueLink and a value or onChange event. If you want to use value or onChange, you probably don't want to use valueLink.")}function _assertCheckedLink(inputProps){_assertSingleLink(inputProps),invariant(null==inputProps.checked&&null==inputProps.onChange,"Cannot provide a checkedLink and a checked property or onChange event. If you want to use checked or onChange, you probably don't want to use checkedLink")}function getDeclarationErrorAddendum(owner){if(owner){var name=owner.getName();if(name)return" Check the render method of `"+name+"`."}return""}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),React=require("react"),PropTypes=require("prop-types"),emptyFunction=function(){};emptyFunction.thatReturns=makeEmptyFunction,emptyFunction.thatReturnsFalse=makeEmptyFunction(!1),emptyFunction.thatReturnsTrue=makeEmptyFunction(!0),emptyFunction.thatReturnsNull=makeEmptyFunction(null),emptyFunction.thatReturnsThis=function(){return this},emptyFunction.thatReturnsArgument=function(arg){return arg};var validateFormat=function(format){},warning=emptyFunction,hasReadOnlyValue={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},propTypes={value:function(props,propName,componentName){return!props[propName]||hasReadOnlyValue[props.type]||props.onChange||props.readOnly||props.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(props,propName,componentName){return!props[propName]||props.onChange||props.readOnly||props.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:PropTypes.func},loggedTypeFailures={},LinkedValueUtils={checkPropTypes:function(tagName,props,owner){for(var propName in propTypes){if(propTypes.hasOwnProperty(propName))var error=propTypes[propName](props,propName,tagName,"prop",null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");if(error instanceof Error&&!(error.message in loggedTypeFailures)){loggedTypeFailures[error.message]=!0;var addendum=getDeclarationErrorAddendum(owner);warning(!1,"Failed form propType: %s%s",error.message,addendum)}}},getValue:function(inputProps){return inputProps.valueLink?(_assertValueLink(inputProps),inputProps.valueLink.value):inputProps.value},getChecked:function(inputProps){return inputProps.checkedLink?(_assertCheckedLink(inputProps),inputProps.checkedLink.value):inputProps.checked},executeOnChange:function(inputProps,event){return inputProps.valueLink?(_assertValueLink(inputProps),inputProps.valueLink.requestChange(event.target.value)):inputProps.checkedLink?(_assertCheckedLink(inputProps),inputProps.checkedLink.requestChange(event.target.checked)):inputProps.onChange?inputProps.onChange.call(void 0,event):void 0}},LinkedInput=function(_React$Component){function LinkedInput(){return _classCallCheck(this,LinkedInput),_possibleConstructorReturn(this,(LinkedInput.__proto__||Object.getPrototypeOf(LinkedInput)).apply(this,arguments))}return _inherits(LinkedInput,_React$Component),_createClass(LinkedInput,[{key:"render",value:function(){var newProps=Object.assign({},this.props);return newProps.value=LinkedValueUtils.getValue(this.props),newProps.checked=LinkedValueUtils.getChecked(this.props),delete newProps.valueLink,delete newProps.checkedLink,React.createElement("input",newProps)}}]),LinkedInput}(React.Component);module.exports=LinkedInput}).call(this,require("_process"))},{_process:5,"prop-types":8,react:"react"}],2:[function(require,module,exports){"use strict";function makeEmptyFunction(arg){return function(){return arg}}var emptyFunction=function(){};emptyFunction.thatReturns=makeEmptyFunction,emptyFunction.thatReturnsFalse=makeEmptyFunction(!1),emptyFunction.thatReturnsTrue=makeEmptyFunction(!0),emptyFunction.thatReturnsNull=makeEmptyFunction(null),emptyFunction.thatReturnsThis=function(){return this},emptyFunction.thatReturnsArgument=function(arg){return arg},module.exports=emptyFunction},{}],3:[function(require,module,exports){(function(process){"use strict";function invariant(condition,format,a,b,c,d,e,f){if(validateFormat(format),!condition){var error;if(void 0===format)error=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var args=[a,b,c,d,e,f],argIndex=0;error=new Error(format.replace(/%s/g,function(){return args[argIndex++]})),error.name="Invariant Violation"}throw error.framesToPop=1,error}}var validateFormat=function(format){};module.exports=invariant}).call(this,require("_process"))},{_process:5}],4:[function(require,module,exports){(function(process){"use strict";var emptyFunction=require("./emptyFunction"),warning=emptyFunction;module.exports=warning}).call(this,require("_process"))},{"./emptyFunction":2,_process:5}],5:[function(require,module,exports){function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}function runTimeout(fun){if(cachedSetTimeout===setTimeout)return setTimeout(fun,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(fun,0);try{return cachedSetTimeout(fun,0)}catch(e){try{return cachedSetTimeout.call(null,fun,0)}catch(e){return cachedSetTimeout.call(this,fun,0)}}}function runClearTimeout(marker){if(cachedClearTimeout===clearTimeout)return clearTimeout(marker);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(marker);try{return cachedClearTimeout(marker)}catch(e){try{return cachedClearTimeout.call(null,marker)}catch(e){return cachedClearTimeout.call(this,marker)}}}function cleanUpNextTick(){draining&¤tQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var timeout=runTimeout(cleanUpNextTick);draining=!0;for(var len=queue.length;len;){for(currentQueue=queue,queue=[];++queueIndex<len;)currentQueue&¤tQueue[queueIndex].run();queueIndex=-1,len=queue.length}currentQueue=null,draining=!1,runClearTimeout(timeout)}}function Item(fun,array){this.fun=fun,this.array=array}function noop(){}var cachedSetTimeout,cachedClearTimeout,process=module.exports={};!function(){try{cachedSetTimeout="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){cachedSetTimeout=defaultSetTimout}try{cachedClearTimeout="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){cachedClearTimeout=defaultClearTimeout}}();var currentQueue,queue=[],draining=!1,queueIndex=-1;process.nextTick=function(fun){var args=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)args[i-1]=arguments[i];queue.push(new Item(fun,args)),1!==queue.length||draining||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},process.title="browser",process.browser=!0,process.env={},process.argv=[],process.version="",process.versions={},process.on=noop,process.addListener=noop,process.once=noop,process.off=noop,process.removeListener=noop,process.removeAllListeners=noop,process.emit=noop,process.binding=function(name){throw new Error("process.binding is not supported")},process.cwd=function(){return"/"},process.chdir=function(dir){throw new Error("process.chdir is not supported")},process.umask=function(){return 0}},{}],6:[function(require,module,exports){(function(process){"use strict";function checkPropTypes(typeSpecs,values,location,componentName,getStack){}require("fbjs/lib/invariant"),require("fbjs/lib/warning"),require("./lib/ReactPropTypesSecret");module.exports=checkPropTypes}).call(this,require("_process"))},{"./lib/ReactPropTypesSecret":9,_process:5,"fbjs/lib/invariant":3,"fbjs/lib/warning":4}],7:[function(require,module,exports){(function(process){"use strict";var invariant=(require("fbjs/lib/emptyFunction"),require("fbjs/lib/invariant")),checkPropTypes=(require("fbjs/lib/warning"),require("./lib/ReactPropTypesSecret"),require("./checkPropTypes"));module.exports=function(isValidElement){function PropTypeError(message){this.message=message,this.stack=""}var ReactPropTypes,productionTypeChecker=("function"==typeof Symbol&&Symbol.iterator,function(){invariant(!1,"React.PropTypes type checking code is stripped in production.")});productionTypeChecker.isRequired=productionTypeChecker;var getProductionTypeChecker=function(){return productionTypeChecker};return ReactPropTypes={array:productionTypeChecker,bool:productionTypeChecker,func:productionTypeChecker,number:productionTypeChecker,object:productionTypeChecker,string:productionTypeChecker,symbol:productionTypeChecker,any:productionTypeChecker,arrayOf:getProductionTypeChecker,element:productionTypeChecker,instanceOf:getProductionTypeChecker,node:productionTypeChecker,objectOf:getProductionTypeChecker,oneOf:getProductionTypeChecker,oneOfType:getProductionTypeChecker,shape:getProductionTypeChecker},PropTypeError.prototype=Error.prototype,ReactPropTypes.checkPropTypes=checkPropTypes,ReactPropTypes.PropTypes=ReactPropTypes,ReactPropTypes}}).call(this,require("_process"))},{"./checkPropTypes":6,"./lib/ReactPropTypesSecret":9,_process:5,"fbjs/lib/emptyFunction":2,"fbjs/lib/invariant":3,"fbjs/lib/warning":4}],8:[function(require,module,exports){var React=require("react"),factory=require("./factory");module.exports=factory(React.isValidElement)},{"./factory":7,react:"react"}],9:[function(require,module,exports){"use strict";module.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},{}]},{},[1])(1)});