mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
80b862395d
* Add missing object-assign dep to create-react-class * Remove unnecessary inlines and irrelevant tests in createFragment * Uninline shallowEqual in shallowCompare * Uninline invariant in update * Uninline invariant/warning and remove unreachable code in react-linked-input * Envify and collapse createClass UMD * Envify and collapse createFragment * ReactLink doesn't really need PropTypes dep It is unnecessary because it is not explicitly exposed and was never public API. * Rebuild, envify and collapse LinkedStateMixin UMD * Collapse PureRenderMixin UMD * Rebuild shallowCompare * Envify and collapse update UMD * Remove unused prop-types dep from linked-input * Fix change handling in LinkedInput * Compile LinkedInput to ES5 * Rebuild, collapse, and fix LinkedInput UMD * Add full README for react-addons-create-fragment * Mention compat version of transition-group so we can delete those docs * README for react-addons-linked-state-mixin * More docs * Fix devDeps for createClass * docs
2 lines
4.9 KiB
JavaScript
2 lines
4.9 KiB
JavaScript
!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.LinkedInput=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){"use strict";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 _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)}var invariant=(require(2),require(3)),LinkedValueUtils=(require(4),{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(){_classCallCheck(this,LinkedInput);var _this=_possibleConstructorReturn(this,_React$Component.call(this));return _this.handleChange=_this.handleChange.bind(_this),_this}return _inherits(LinkedInput,_React$Component),LinkedInput.prototype.handleChange=function(e){LinkedValueUtils.executeOnChange(this.props,e)},LinkedInput.prototype.render=function(){var newProps=Object.assign({},this.props);return newProps.value=LinkedValueUtils.getValue(this.props),newProps.checked=LinkedValueUtils.getChecked(this.props),newProps.onChange=this.handleChange,delete newProps.valueLink,delete newProps.checkedLink,React.createElement("input",newProps)},LinkedInput}(React.Component);module.exports=LinkedInput},{2:2,3:3,4:4}],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){"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},{}],4:[function(require,module,exports){"use strict";var emptyFunction=require(2),warning=emptyFunction;module.exports=warning},{2:2}]},{},[1])(1)});
|