(BaseComponent)
| 65 | var LOADING_STATE_LOADED = "LOADED" |
| 66 | |
| 67 | function withScriptjs(BaseComponent) { |
| 68 | var factory = _react2.default.createFactory(BaseComponent) |
| 69 | |
| 70 | var Container = (function(_React$PureComponent) { |
| 71 | ;(0, _inherits3.default)(Container, _React$PureComponent) |
| 72 | |
| 73 | function Container() { |
| 74 | var _ref |
| 75 | |
| 76 | var _temp, _this, _ret |
| 77 | |
| 78 | ;(0, _classCallCheck3.default)(this, Container) |
| 79 | |
| 80 | for ( |
| 81 | var _len = arguments.length, args = Array(_len), _key = 0; |
| 82 | _key < _len; |
| 83 | _key++ |
| 84 | ) { |
| 85 | args[_key] = arguments[_key] |
| 86 | } |
| 87 | |
| 88 | return ( |
| 89 | (_ret = ((_temp = ((_this = (0, _possibleConstructorReturn3.default)( |
| 90 | this, |
| 91 | (_ref = |
| 92 | Container.__proto__ || |
| 93 | (0, _getPrototypeOf2.default)(Container)).call.apply( |
| 94 | _ref, |
| 95 | [this].concat(args) |
| 96 | ) |
| 97 | )), |
| 98 | _this)), |
| 99 | (_this.state = { |
| 100 | loadingState: LOADING_STATE_NONE, |
| 101 | }), |
| 102 | (_this.isUnmounted = false), |
| 103 | (_this.handleLoaded = (0, _bind3.default)(_this.handleLoaded, _this)), |
| 104 | _temp)), |
| 105 | (0, _possibleConstructorReturn3.default)(_this, _ret) |
| 106 | ) |
| 107 | } |
| 108 | |
| 109 | ;(0, _createClass3.default)(Container, [ |
| 110 | { |
| 111 | key: "handleLoaded", |
| 112 | value: function handleLoaded() { |
| 113 | if (this.isUnmounted) { |
| 114 | return |
| 115 | } |
| 116 | this.setState({ |
| 117 | loadingState: LOADING_STATE_LOADED, |
| 118 | }) |
| 119 | }, |
| 120 | }, |
| 121 | { |
| 122 | key: "componentWillMount", |
| 123 | value: function componentWillMount() { |
| 124 | var _props = this.props, |
nothing calls this directly
no outgoing calls
no test coverage detected