graphiql-rails 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/graphiql/rails/application.js +3 -3
  3. data/app/assets/javascripts/graphiql/rails/{graphiql-0.7.4.js → graphiql-0.8.0.js} +13447 -14884
  4. data/app/assets/javascripts/graphiql/rails/{react-15.3.1.js → react-15.3.2.js} +171 -176
  5. data/app/assets/javascripts/graphiql/rails/{react-dom-15.3.1.js → react-dom-15.3.2.js} +1 -1
  6. data/app/assets/stylesheets/graphiql/rails/application.css +2 -2
  7. data/app/assets/stylesheets/graphiql/rails/{graphiql-0.7.4.css → graphiql-0.8.0.css} +147 -78
  8. data/lib/graphiql/rails/version.rb +1 -1
  9. data/test/dummy/log/test.log +54 -0
  10. data/test/dummy/tmp/cache/assets/sprockets/v3.0/1p/1p7_p-w3h5HoV6eexdYKPvMrxklmxdlTbabQczEEksQ.cache +1 -0
  11. data/test/dummy/tmp/cache/assets/sprockets/v3.0/35/35WBoIH_11VxISrZaBlIndZRlJ5r_hyltJiwG975Axk.cache +1 -0
  12. data/test/dummy/tmp/cache/assets/sprockets/v3.0/6-/6-LOpBZqN_WH2LDP0xjgJMLVZLESOIU9Aw2b4iHM5fs.cache +1 -0
  13. data/test/dummy/tmp/cache/assets/sprockets/v3.0/8-/8-U7zUVndW_d0FDk2U3ZDowvpisV-3yItdrbtPR0Olg.cache +1 -0
  14. data/test/dummy/tmp/cache/assets/sprockets/v3.0/83/83gJmbcd3mnIYQT740LwJbj1DaTpagwTWnfrKrqik6E.cache +0 -0
  15. data/test/dummy/tmp/cache/assets/sprockets/v3.0/BI/BILRLa6u7OJB478Lv33uNdF2CTZAtQ9UUyt40vRZyQU.cache +2 -0
  16. data/test/dummy/tmp/cache/assets/sprockets/v3.0/GD/GDTZ5oWcwSRCXPCEpSUbkX3BTWh2vhaLgPvJHxVHkZY.cache +2 -0
  17. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Gn/Gnd-um8kchIKSICy3rzI_5Aaq-C5IHuaVrLQ_Aad3mQ.cache +0 -0
  18. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Mp/Mpus175PU9DmWDNWLEUncTAcByMMSu-HhCUuIvFB7yc.cache +1 -0
  19. data/test/dummy/tmp/cache/assets/sprockets/v3.0/R0/R08BzBDkGd9g2koopOT7DT6wKzFe05szGnCgODTCjNQ.cache +0 -0
  20. data/test/dummy/tmp/cache/assets/sprockets/v3.0/SF/SFiYnWCKZ4GF8zlst1XIrwxl1WFC45BmASoohpWPd84.cache +2 -0
  21. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Ug/UgWAyTmm2Ed6U6-GLI1VvoINx_9Rdd5TnTxqBd2B5xc.cache +3 -0
  22. data/test/dummy/tmp/cache/assets/sprockets/v3.0/XZ/XZJGIsAwHoZlPXMlIx1_yABMwtbNAUp_yI7tOMbZgdU.cache +1 -0
  23. data/test/dummy/tmp/cache/assets/sprockets/v3.0/_d/_dY9njOW19cklh-ewiac5HiA65LwVYKIb6R_IrNRYzU.cache +2 -0
  24. data/test/dummy/tmp/cache/assets/sprockets/v3.0/cO/cOAueJKh9nuf3xvdIBixVT1s8N_-nLBtmjsaSzOpwg8.cache +1 -0
  25. data/test/dummy/tmp/cache/assets/sprockets/v3.0/dB/dB2Exqzi_7fBxm01Ro2DM7jnlHLFawFK3yXKou6pgyA.cache +1 -0
  26. data/test/dummy/tmp/cache/assets/sprockets/v3.0/h0/h0F1byXPciEndpvPLiSEpO8f7fw4uZjoMc9tLVxZFRU.cache +0 -0
  27. data/test/dummy/tmp/cache/assets/sprockets/v3.0/hv/hvaokpd4_23IwsM-Fl74g64vPCKPMZAaOESvixahDeY.cache +1 -0
  28. data/test/dummy/tmp/cache/assets/sprockets/v3.0/jU/jUWt19fVGluoSzwe5GfGU2j-wCQ6FNep6S8SdLAoBYc.cache +1 -0
  29. data/test/dummy/tmp/cache/assets/sprockets/v3.0/mT/mTTjPru4dxDhaJnHalf8yWwebOIR97CU4fAjuj7DwmM.cache +1 -0
  30. data/test/dummy/tmp/cache/assets/sprockets/v3.0/q-/q-bIsyv_gLCwVI56S0NDDvq2BlbpMP0WnLeiWAia_z0.cache +3 -0
  31. data/test/dummy/tmp/cache/assets/sprockets/v3.0/r6/r6zAqMlkr_LD1T4Gr3uJhi4zKLf852Y3s8y0mLoXvoI.cache +3 -0
  32. data/test/dummy/tmp/cache/assets/sprockets/v3.0/rK/RkcFwrMob29Nx93hQI1xNkEXrIuTqENPTjiPdvp8Irw.cache +1 -0
  33. data/test/dummy/tmp/cache/assets/sprockets/v3.0/rK/rKT3JEAgY2xQkZkObEvW_S-aA2-WraDur4k_8kA2Q80.cache +1 -0
  34. data/test/dummy/tmp/cache/assets/sprockets/v3.0/rR/rRP_vrHmf6n0bThLAWZOQQ58vBeGpTqWoLg9mJ8v5NE.cache +0 -0
  35. data/test/dummy/tmp/cache/assets/sprockets/v3.0/rm/rmsXQmmr8BkD3Hpc-W7bloFfMOXPcgzFpIwmrLniqHs.cache +3 -0
  36. data/test/dummy/tmp/cache/assets/sprockets/v3.0/tJ/tJN9oADWH0ryNbjWzFqhQ_HGCek6GPM0QbaghUosnWY.cache +2 -0
  37. data/test/dummy/tmp/cache/assets/sprockets/v3.0/u5/u5AuqAcq2hl6roEJteC1r1mVoR7VEqt5SV8jwzK4GZo.cache +0 -0
  38. data/test/dummy/tmp/cache/assets/sprockets/v3.0/v6/v6mxUToSmG-6J-XA_oPEO5BoF3KCwgRTrg70pqQX6xg.cache +1 -0
  39. data/test/dummy/tmp/cache/assets/sprockets/v3.0/vj/vjqmUY_h3NgLstN1Jfcau_2rGV-cdgyFdWjypBpF3x4.cache +0 -0
  40. data/test/dummy/tmp/cache/assets/sprockets/v3.0/x5/x5gk2iQTlVlt4Hk8DKJwtbGvkwxH6XMWAX3iokMIy1g.cache +0 -0
  41. data/test/dummy/tmp/cache/assets/sprockets/v3.0/xw/xwWWNBnove6mATVpvOJ7uBZkoBqXRlGnDZNR64ckNx8.cache +1 -0
  42. data/test/dummy/tmp/cache/assets/sprockets/v3.0/yL/yLVqhPCNcVTbpUt7K66-E4rXgH9sPDxfNXqMWF_eM44.cache +0 -0
  43. data/test/dummy/tmp/cache/assets/sprockets/v3.0/yP/yPvcKR8n3Xvk90hPMC4E4dlv4DizQycdzHazro5upUI.cache +0 -0
  44. data/test/dummy/tmp/cache/assets/sprockets/v3.0/zg/zg6igLfzkTq4aU8PoYWHgo2qC9Bsrpw_pl1IGJc-qQk.cache +1 -0
  45. metadata +74 -6
@@ -1,5 +1,5 @@
1
1
  /**
2
- * React v15.3.1
2
+ * React v15.3.2
3
3
  */
4
4
  (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.React = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&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?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
5
5
  /**
@@ -316,8 +316,10 @@ function getNativeBeforeInputChars(topLevelType, nativeEvent) {
316
316
  function getFallbackBeforeInputChars(topLevelType, nativeEvent) {
317
317
  // If we are currently composing (IME) and using a fallback to do so,
318
318
  // try to extract the composed characters from the fallback object.
319
+ // If composition event is available, we extract a string only at
320
+ // compositionevent, otherwise extract it at fallback events.
319
321
  if (currentComposition) {
320
- if (topLevelType === topLevelTypes.topCompositionEnd || isFallbackCompositionEnd(topLevelType, nativeEvent)) {
322
+ if (topLevelType === topLevelTypes.topCompositionEnd || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) {
321
323
  var chars = currentComposition.getData();
322
324
  FallbackCompositionState.release(currentComposition);
323
325
  currentComposition = null;
@@ -935,7 +937,7 @@ function shouldUseChangeEvent(elem) {
935
937
  var doesChangeEventBubble = false;
936
938
  if (ExecutionEnvironment.canUseDOM) {
937
939
  // See `handleChange` comment below
938
- doesChangeEventBubble = isEventSupported('change') && (!('documentMode' in document) || document.documentMode > 8);
940
+ doesChangeEventBubble = isEventSupported('change') && (!document.documentMode || document.documentMode > 8);
939
941
  }
940
942
 
941
943
  function manualDispatchChangeEvent(nativeEvent) {
@@ -1001,7 +1003,7 @@ if (ExecutionEnvironment.canUseDOM) {
1001
1003
  // deleting text, so we ignore its input events.
1002
1004
  // IE10+ fire input events to often, such when a placeholder
1003
1005
  // changes or when an input with a placeholder is focused.
1004
- isInputEventSupported = isEventSupported('input') && (!('documentMode' in document) || document.documentMode > 11);
1006
+ isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 11);
1005
1007
  }
1006
1008
 
1007
1009
  /**
@@ -3298,6 +3300,8 @@ var HTMLDOMPropertyConfig = {
3298
3300
  allowFullScreen: HAS_BOOLEAN_VALUE,
3299
3301
  allowTransparency: 0,
3300
3302
  alt: 0,
3303
+ // specifies target context for links with `preload` type
3304
+ as: 0,
3301
3305
  async: HAS_BOOLEAN_VALUE,
3302
3306
  autoComplete: 0,
3303
3307
  // autoFocus is polyfilled/normalized by AutoFocusUtils
@@ -3378,6 +3382,7 @@ var HTMLDOMPropertyConfig = {
3378
3382
  optimum: 0,
3379
3383
  pattern: 0,
3380
3384
  placeholder: 0,
3385
+ playsInline: HAS_BOOLEAN_VALUE,
3381
3386
  poster: 0,
3382
3387
  preload: 0,
3383
3388
  profile: 0,
@@ -4175,6 +4180,19 @@ var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {
4175
4180
  return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelType, handlerBaseName, handle);
4176
4181
  },
4177
4182
 
4183
+ /**
4184
+ * Protect against document.createEvent() returning null
4185
+ * Some popup blocker extensions appear to do this:
4186
+ * https://github.com/facebook/react/issues/6887
4187
+ */
4188
+ supportsEventPageXY: function () {
4189
+ if (!document.createEvent) {
4190
+ return false;
4191
+ }
4192
+ var ev = document.createEvent('MouseEvent');
4193
+ return ev != null && 'pageX' in ev;
4194
+ },
4195
+
4178
4196
  /**
4179
4197
  * Listens to window scroll and resize events. We cache scroll values so that
4180
4198
  * application code can access them without triggering reflows.
@@ -4188,7 +4206,7 @@ var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {
4188
4206
  */
4189
4207
  ensureScrollValueMonitoring: function () {
4190
4208
  if (hasEventPageXY === undefined) {
4191
- hasEventPageXY = document.createEvent && 'pageX' in document.createEvent('MouseEvent');
4209
+ hasEventPageXY = ReactBrowserEventEmitter.supportsEventPageXY();
4192
4210
  }
4193
4211
  if (!hasEventPageXY && !isMonitoringScrollValue) {
4194
4212
  var refresh = ViewportMetrics.refreshScrollValues;
@@ -5931,28 +5949,6 @@ function warnIfInvalidElement(Component, element) {
5931
5949
  }
5932
5950
  }
5933
5951
 
5934
- function invokeComponentDidMountWithTimer() {
5935
- var publicInstance = this._instance;
5936
- if (this._debugID !== 0) {
5937
- ReactInstrumentation.debugTool.onBeginLifeCycleTimer(this._debugID, 'componentDidMount');
5938
- }
5939
- publicInstance.componentDidMount();
5940
- if (this._debugID !== 0) {
5941
- ReactInstrumentation.debugTool.onEndLifeCycleTimer(this._debugID, 'componentDidMount');
5942
- }
5943
- }
5944
-
5945
- function invokeComponentDidUpdateWithTimer(prevProps, prevState, prevContext) {
5946
- var publicInstance = this._instance;
5947
- if (this._debugID !== 0) {
5948
- ReactInstrumentation.debugTool.onBeginLifeCycleTimer(this._debugID, 'componentDidUpdate');
5949
- }
5950
- publicInstance.componentDidUpdate(prevProps, prevState, prevContext);
5951
- if (this._debugID !== 0) {
5952
- ReactInstrumentation.debugTool.onEndLifeCycleTimer(this._debugID, 'componentDidUpdate');
5953
- }
5954
- }
5955
-
5956
5952
  function shouldConstruct(Component) {
5957
5953
  return !!(Component.prototype && Component.prototype.isReactComponent);
5958
5954
  }
@@ -5961,6 +5957,23 @@ function isPureComponent(Component) {
5961
5957
  return !!(Component.prototype && Component.prototype.isPureReactComponent);
5962
5958
  }
5963
5959
 
5960
+ // Separated into a function to contain deoptimizations caused by try/finally.
5961
+ function measureLifeCyclePerf(fn, debugID, timerType) {
5962
+ if (debugID === 0) {
5963
+ // Top-level wrappers (see ReactMount) and empty components (see
5964
+ // ReactDOMEmptyComponent) are invisible to hooks and devtools.
5965
+ // Both are implementation details that should go away in the future.
5966
+ return fn();
5967
+ }
5968
+
5969
+ ReactInstrumentation.debugTool.onBeginLifeCycleTimer(debugID, timerType);
5970
+ try {
5971
+ return fn();
5972
+ } finally {
5973
+ ReactInstrumentation.debugTool.onEndLifeCycleTimer(debugID, timerType);
5974
+ }
5975
+ }
5976
+
5964
5977
  /**
5965
5978
  * ------------------ The Life-Cycle of a Composite Component ------------------
5966
5979
  *
@@ -6052,6 +6065,8 @@ var ReactCompositeComponentMixin = {
6052
6065
  * @internal
6053
6066
  */
6054
6067
  mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
6068
+ var _this = this;
6069
+
6055
6070
  this._context = context;
6056
6071
  this._mountOrder = nextMountID++;
6057
6072
  this._hostParent = hostParent;
@@ -6141,7 +6156,11 @@ var ReactCompositeComponentMixin = {
6141
6156
 
6142
6157
  if (inst.componentDidMount) {
6143
6158
  if ("development" !== 'production') {
6144
- transaction.getReactMountReady().enqueue(invokeComponentDidMountWithTimer, this);
6159
+ transaction.getReactMountReady().enqueue(function () {
6160
+ measureLifeCyclePerf(function () {
6161
+ return inst.componentDidMount();
6162
+ }, _this._debugID, 'componentDidMount');
6163
+ });
6145
6164
  } else {
6146
6165
  transaction.getReactMountReady().enqueue(inst.componentDidMount, inst);
6147
6166
  }
@@ -6165,35 +6184,26 @@ var ReactCompositeComponentMixin = {
6165
6184
 
6166
6185
  _constructComponentWithoutOwner: function (doConstruct, publicProps, publicContext, updateQueue) {
6167
6186
  var Component = this._currentElement.type;
6168
- var instanceOrElement;
6187
+
6169
6188
  if (doConstruct) {
6170
6189
  if ("development" !== 'production') {
6171
- if (this._debugID !== 0) {
6172
- ReactInstrumentation.debugTool.onBeginLifeCycleTimer(this._debugID, 'ctor');
6173
- }
6174
- }
6175
- instanceOrElement = new Component(publicProps, publicContext, updateQueue);
6176
- if ("development" !== 'production') {
6177
- if (this._debugID !== 0) {
6178
- ReactInstrumentation.debugTool.onEndLifeCycleTimer(this._debugID, 'ctor');
6179
- }
6190
+ return measureLifeCyclePerf(function () {
6191
+ return new Component(publicProps, publicContext, updateQueue);
6192
+ }, this._debugID, 'ctor');
6193
+ } else {
6194
+ return new Component(publicProps, publicContext, updateQueue);
6180
6195
  }
6196
+ }
6197
+
6198
+ // This can still be an instance in case of factory components
6199
+ // but we'll count this as time spent rendering as the more common case.
6200
+ if ("development" !== 'production') {
6201
+ return measureLifeCyclePerf(function () {
6202
+ return Component(publicProps, publicContext, updateQueue);
6203
+ }, this._debugID, 'render');
6181
6204
  } else {
6182
- // This can still be an instance in case of factory components
6183
- // but we'll count this as time spent rendering as the more common case.
6184
- if ("development" !== 'production') {
6185
- if (this._debugID !== 0) {
6186
- ReactInstrumentation.debugTool.onBeginLifeCycleTimer(this._debugID, 'render');
6187
- }
6188
- }
6189
- instanceOrElement = Component(publicProps, publicContext, updateQueue);
6190
- if ("development" !== 'production') {
6191
- if (this._debugID !== 0) {
6192
- ReactInstrumentation.debugTool.onEndLifeCycleTimer(this._debugID, 'render');
6193
- }
6194
- }
6205
+ return Component(publicProps, publicContext, updateQueue);
6195
6206
  }
6196
- return instanceOrElement;
6197
6207
  },
6198
6208
 
6199
6209
  performInitialMountWithErrorHandling: function (renderedElement, hostParent, hostContainerInfo, transaction, context) {
@@ -6202,11 +6212,6 @@ var ReactCompositeComponentMixin = {
6202
6212
  try {
6203
6213
  markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
6204
6214
  } catch (e) {
6205
- if ("development" !== 'production') {
6206
- if (this._debugID !== 0) {
6207
- ReactInstrumentation.debugTool.onError();
6208
- }
6209
- }
6210
6215
  // Roll back to checkpoint, handle error (which may add items to the transaction), and take a new checkpoint
6211
6216
  transaction.rollback(checkpoint);
6212
6217
  this._instance.unstable_handleError(e);
@@ -6227,17 +6232,19 @@ var ReactCompositeComponentMixin = {
6227
6232
 
6228
6233
  performInitialMount: function (renderedElement, hostParent, hostContainerInfo, transaction, context) {
6229
6234
  var inst = this._instance;
6235
+
6236
+ var debugID = 0;
6237
+ if ("development" !== 'production') {
6238
+ debugID = this._debugID;
6239
+ }
6240
+
6230
6241
  if (inst.componentWillMount) {
6231
6242
  if ("development" !== 'production') {
6232
- if (this._debugID !== 0) {
6233
- ReactInstrumentation.debugTool.onBeginLifeCycleTimer(this._debugID, 'componentWillMount');
6234
- }
6235
- }
6236
- inst.componentWillMount();
6237
- if ("development" !== 'production') {
6238
- if (this._debugID !== 0) {
6239
- ReactInstrumentation.debugTool.onEndLifeCycleTimer(this._debugID, 'componentWillMount');
6240
- }
6243
+ measureLifeCyclePerf(function () {
6244
+ return inst.componentWillMount();
6245
+ }, debugID, 'componentWillMount');
6246
+ } else {
6247
+ inst.componentWillMount();
6241
6248
  }
6242
6249
  // When mounting, calls to `setState` by `componentWillMount` will set
6243
6250
  // `this._pendingStateQueue` without triggering a re-render.
@@ -6257,15 +6264,12 @@ var ReactCompositeComponentMixin = {
6257
6264
  );
6258
6265
  this._renderedComponent = child;
6259
6266
 
6260
- var selfDebugID = 0;
6261
- if ("development" !== 'production') {
6262
- selfDebugID = this._debugID;
6263
- }
6264
- var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), selfDebugID);
6267
+ var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), debugID);
6265
6268
 
6266
6269
  if ("development" !== 'production') {
6267
- if (this._debugID !== 0) {
6268
- ReactInstrumentation.debugTool.onSetChildren(this._debugID, child._debugID !== 0 ? [child._debugID] : []);
6270
+ if (debugID !== 0) {
6271
+ var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];
6272
+ ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);
6269
6273
  }
6270
6274
  }
6271
6275
 
@@ -6286,24 +6290,22 @@ var ReactCompositeComponentMixin = {
6286
6290
  if (!this._renderedComponent) {
6287
6291
  return;
6288
6292
  }
6293
+
6289
6294
  var inst = this._instance;
6290
6295
 
6291
6296
  if (inst.componentWillUnmount && !inst._calledComponentWillUnmount) {
6292
6297
  inst._calledComponentWillUnmount = true;
6293
- if ("development" !== 'production') {
6294
- if (this._debugID !== 0) {
6295
- ReactInstrumentation.debugTool.onBeginLifeCycleTimer(this._debugID, 'componentWillUnmount');
6296
- }
6297
- }
6298
+
6298
6299
  if (safely) {
6299
6300
  var name = this.getName() + '.componentWillUnmount()';
6300
6301
  ReactErrorUtils.invokeGuardedCallback(name, inst.componentWillUnmount.bind(inst));
6301
6302
  } else {
6302
- inst.componentWillUnmount();
6303
- }
6304
- if ("development" !== 'production') {
6305
- if (this._debugID !== 0) {
6306
- ReactInstrumentation.debugTool.onEndLifeCycleTimer(this._debugID, 'componentWillUnmount');
6303
+ if ("development" !== 'production') {
6304
+ measureLifeCyclePerf(function () {
6305
+ return inst.componentWillUnmount();
6306
+ }, this._debugID, 'componentWillUnmount');
6307
+ } else {
6308
+ inst.componentWillUnmount();
6307
6309
  }
6308
6310
  }
6309
6311
  }
@@ -6390,13 +6392,21 @@ var ReactCompositeComponentMixin = {
6390
6392
  _processChildContext: function (currentContext) {
6391
6393
  var Component = this._currentElement.type;
6392
6394
  var inst = this._instance;
6393
- if ("development" !== 'production') {
6394
- ReactInstrumentation.debugTool.onBeginProcessingChildContext();
6395
- }
6396
- var childContext = inst.getChildContext && inst.getChildContext();
6397
- if ("development" !== 'production') {
6398
- ReactInstrumentation.debugTool.onEndProcessingChildContext();
6395
+ var childContext;
6396
+
6397
+ if (inst.getChildContext) {
6398
+ if ("development" !== 'production') {
6399
+ ReactInstrumentation.debugTool.onBeginProcessingChildContext();
6400
+ try {
6401
+ childContext = inst.getChildContext();
6402
+ } finally {
6403
+ ReactInstrumentation.debugTool.onEndProcessingChildContext();
6404
+ }
6405
+ } else {
6406
+ childContext = inst.getChildContext();
6407
+ }
6399
6408
  }
6409
+
6400
6410
  if (childContext) {
6401
6411
  !(typeof Component.childContextTypes === 'object') ? "development" !== 'production' ? invariant(false, '%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().', this.getName() || 'ReactCompositeComponent') : _prodInvariant('107', this.getName() || 'ReactCompositeComponent') : void 0;
6402
6412
  if ("development" !== 'production') {
@@ -6491,15 +6501,11 @@ var ReactCompositeComponentMixin = {
6491
6501
  // immediately reconciled instead of waiting for the next batch.
6492
6502
  if (willReceive && inst.componentWillReceiveProps) {
6493
6503
  if ("development" !== 'production') {
6494
- if (this._debugID !== 0) {
6495
- ReactInstrumentation.debugTool.onBeginLifeCycleTimer(this._debugID, 'componentWillReceiveProps');
6496
- }
6497
- }
6498
- inst.componentWillReceiveProps(nextProps, nextContext);
6499
- if ("development" !== 'production') {
6500
- if (this._debugID !== 0) {
6501
- ReactInstrumentation.debugTool.onEndLifeCycleTimer(this._debugID, 'componentWillReceiveProps');
6502
- }
6504
+ measureLifeCyclePerf(function () {
6505
+ return inst.componentWillReceiveProps(nextProps, nextContext);
6506
+ }, this._debugID, 'componentWillReceiveProps');
6507
+ } else {
6508
+ inst.componentWillReceiveProps(nextProps, nextContext);
6503
6509
  }
6504
6510
  }
6505
6511
 
@@ -6509,15 +6515,11 @@ var ReactCompositeComponentMixin = {
6509
6515
  if (!this._pendingForceUpdate) {
6510
6516
  if (inst.shouldComponentUpdate) {
6511
6517
  if ("development" !== 'production') {
6512
- if (this._debugID !== 0) {
6513
- ReactInstrumentation.debugTool.onBeginLifeCycleTimer(this._debugID, 'shouldComponentUpdate');
6514
- }
6515
- }
6516
- shouldUpdate = inst.shouldComponentUpdate(nextProps, nextState, nextContext);
6517
- if ("development" !== 'production') {
6518
- if (this._debugID !== 0) {
6519
- ReactInstrumentation.debugTool.onEndLifeCycleTimer(this._debugID, 'shouldComponentUpdate');
6520
- }
6518
+ shouldUpdate = measureLifeCyclePerf(function () {
6519
+ return inst.shouldComponentUpdate(nextProps, nextState, nextContext);
6520
+ }, this._debugID, 'shouldComponentUpdate');
6521
+ } else {
6522
+ shouldUpdate = inst.shouldComponentUpdate(nextProps, nextState, nextContext);
6521
6523
  }
6522
6524
  } else {
6523
6525
  if (this._compositeType === CompositeTypes.PureClass) {
@@ -6583,6 +6585,8 @@ var ReactCompositeComponentMixin = {
6583
6585
  * @private
6584
6586
  */
6585
6587
  _performComponentUpdate: function (nextElement, nextProps, nextState, nextContext, transaction, unmaskedContext) {
6588
+ var _this2 = this;
6589
+
6586
6590
  var inst = this._instance;
6587
6591
 
6588
6592
  var hasComponentDidUpdate = Boolean(inst.componentDidUpdate);
@@ -6597,15 +6601,11 @@ var ReactCompositeComponentMixin = {
6597
6601
 
6598
6602
  if (inst.componentWillUpdate) {
6599
6603
  if ("development" !== 'production') {
6600
- if (this._debugID !== 0) {
6601
- ReactInstrumentation.debugTool.onBeginLifeCycleTimer(this._debugID, 'componentWillUpdate');
6602
- }
6603
- }
6604
- inst.componentWillUpdate(nextProps, nextState, nextContext);
6605
- if ("development" !== 'production') {
6606
- if (this._debugID !== 0) {
6607
- ReactInstrumentation.debugTool.onEndLifeCycleTimer(this._debugID, 'componentWillUpdate');
6608
- }
6604
+ measureLifeCyclePerf(function () {
6605
+ return inst.componentWillUpdate(nextProps, nextState, nextContext);
6606
+ }, this._debugID, 'componentWillUpdate');
6607
+ } else {
6608
+ inst.componentWillUpdate(nextProps, nextState, nextContext);
6609
6609
  }
6610
6610
  }
6611
6611
 
@@ -6619,7 +6619,9 @@ var ReactCompositeComponentMixin = {
6619
6619
 
6620
6620
  if (hasComponentDidUpdate) {
6621
6621
  if ("development" !== 'production') {
6622
- transaction.getReactMountReady().enqueue(invokeComponentDidUpdateWithTimer.bind(this, prevProps, prevState, prevContext), this);
6622
+ transaction.getReactMountReady().enqueue(function () {
6623
+ measureLifeCyclePerf(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), _this2._debugID, 'componentDidUpdate');
6624
+ });
6623
6625
  } else {
6624
6626
  transaction.getReactMountReady().enqueue(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), inst);
6625
6627
  }
@@ -6636,6 +6638,12 @@ var ReactCompositeComponentMixin = {
6636
6638
  var prevComponentInstance = this._renderedComponent;
6637
6639
  var prevRenderedElement = prevComponentInstance._currentElement;
6638
6640
  var nextRenderedElement = this._renderValidatedComponent();
6641
+
6642
+ var debugID = 0;
6643
+ if ("development" !== 'production') {
6644
+ debugID = this._debugID;
6645
+ }
6646
+
6639
6647
  if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) {
6640
6648
  ReactReconciler.receiveComponent(prevComponentInstance, nextRenderedElement, transaction, this._processChildContext(context));
6641
6649
  } else {
@@ -6648,15 +6656,12 @@ var ReactCompositeComponentMixin = {
6648
6656
  );
6649
6657
  this._renderedComponent = child;
6650
6658
 
6651
- var selfDebugID = 0;
6652
- if ("development" !== 'production') {
6653
- selfDebugID = this._debugID;
6654
- }
6655
- var nextMarkup = ReactReconciler.mountComponent(child, transaction, this._hostParent, this._hostContainerInfo, this._processChildContext(context), selfDebugID);
6659
+ var nextMarkup = ReactReconciler.mountComponent(child, transaction, this._hostParent, this._hostContainerInfo, this._processChildContext(context), debugID);
6656
6660
 
6657
6661
  if ("development" !== 'production') {
6658
- if (this._debugID !== 0) {
6659
- ReactInstrumentation.debugTool.onSetChildren(this._debugID, child._debugID !== 0 ? [child._debugID] : []);
6662
+ if (debugID !== 0) {
6663
+ var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];
6664
+ ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);
6660
6665
  }
6661
6666
  }
6662
6667
 
@@ -6678,17 +6683,14 @@ var ReactCompositeComponentMixin = {
6678
6683
  */
6679
6684
  _renderValidatedComponentWithoutOwnerOrContext: function () {
6680
6685
  var inst = this._instance;
6686
+ var renderedComponent;
6681
6687
 
6682
6688
  if ("development" !== 'production') {
6683
- if (this._debugID !== 0) {
6684
- ReactInstrumentation.debugTool.onBeginLifeCycleTimer(this._debugID, 'render');
6685
- }
6686
- }
6687
- var renderedComponent = inst.render();
6688
- if ("development" !== 'production') {
6689
- if (this._debugID !== 0) {
6690
- ReactInstrumentation.debugTool.onEndLifeCycleTimer(this._debugID, 'render');
6691
- }
6689
+ renderedComponent = measureLifeCyclePerf(function () {
6690
+ return inst.render();
6691
+ }, this._debugID, 'render');
6692
+ } else {
6693
+ renderedComponent = inst.render();
6692
6694
  }
6693
6695
 
6694
6696
  if ("development" !== 'production') {
@@ -6739,7 +6741,7 @@ var ReactCompositeComponentMixin = {
6739
6741
  var publicComponentInstance = component.getPublicInstance();
6740
6742
  if ("development" !== 'production') {
6741
6743
  var componentName = component && component.getName ? component.getName() : 'a component';
6742
- "development" !== 'production' ? warning(publicComponentInstance != null, 'Stateless function components cannot be given refs ' + '(See ref "%s" in %s created by %s). ' + 'Attempts to access this ref will fail.', ref, componentName, this.getName()) : void 0;
6744
+ "development" !== 'production' ? warning(publicComponentInstance != null || component._compositeType !== CompositeTypes.StatelessFunctional, 'Stateless function components cannot be given refs ' + '(See ref "%s" in %s created by %s). ' + 'Attempts to access this ref will fail.', ref, componentName, this.getName()) : void 0;
6743
6745
  }
6744
6746
  var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs;
6745
6747
  refs[ref] = publicComponentInstance;
@@ -7163,9 +7165,9 @@ function optionPostMount() {
7163
7165
  ReactDOMOption.postMountWrapper(inst);
7164
7166
  }
7165
7167
 
7166
- var setContentChildForInstrumentation = emptyFunction;
7168
+ var setAndValidateContentChildDev = emptyFunction;
7167
7169
  if ("development" !== 'production') {
7168
- setContentChildForInstrumentation = function (content) {
7170
+ setAndValidateContentChildDev = function (content) {
7169
7171
  var hasExistingContent = this._contentDebugID != null;
7170
7172
  var debugID = this._debugID;
7171
7173
  // This ID represents the inlined child that has no backing instance:
@@ -7179,6 +7181,7 @@ if ("development" !== 'production') {
7179
7181
  return;
7180
7182
  }
7181
7183
 
7184
+ validateDOMNesting(null, String(content), this, this._ancestorInfo);
7182
7185
  this._contentDebugID = contentDebugID;
7183
7186
  if (hasExistingContent) {
7184
7187
  ReactInstrumentation.debugTool.onBeforeUpdateComponent(contentDebugID, content);
@@ -7353,7 +7356,7 @@ function ReactDOMComponent(element) {
7353
7356
  this._flags = 0;
7354
7357
  if ("development" !== 'production') {
7355
7358
  this._ancestorInfo = null;
7356
- setContentChildForInstrumentation.call(this, null);
7359
+ setAndValidateContentChildDev.call(this, null);
7357
7360
  }
7358
7361
  }
7359
7362
 
@@ -7453,7 +7456,7 @@ ReactDOMComponent.Mixin = {
7453
7456
  if (parentInfo) {
7454
7457
  // parentInfo should always be present except for the top-level
7455
7458
  // component when server rendering
7456
- validateDOMNesting(this._tag, this, parentInfo);
7459
+ validateDOMNesting(this._tag, null, this, parentInfo);
7457
7460
  }
7458
7461
  this._ancestorInfo = validateDOMNesting.updatedAncestorInfo(parentInfo, this._tag, this);
7459
7462
  }
@@ -7622,7 +7625,7 @@ ReactDOMComponent.Mixin = {
7622
7625
  // TODO: Validate that text is allowed as a child of this node
7623
7626
  ret = escapeTextContentForBrowser(contentToUse);
7624
7627
  if ("development" !== 'production') {
7625
- setContentChildForInstrumentation.call(this, contentToUse);
7628
+ setAndValidateContentChildDev.call(this, contentToUse);
7626
7629
  }
7627
7630
  } else if (childrenToUse != null) {
7628
7631
  var mountImages = this.mountChildren(childrenToUse, transaction, context);
@@ -7659,7 +7662,7 @@ ReactDOMComponent.Mixin = {
7659
7662
  if (contentToUse != null) {
7660
7663
  // TODO: Validate that text is allowed as a child of this node
7661
7664
  if ("development" !== 'production') {
7662
- setContentChildForInstrumentation.call(this, contentToUse);
7665
+ setAndValidateContentChildDev.call(this, contentToUse);
7663
7666
  }
7664
7667
  DOMLazyTree.queueText(lazyTree, contentToUse);
7665
7668
  } else if (childrenToUse != null) {
@@ -7891,7 +7894,7 @@ ReactDOMComponent.Mixin = {
7891
7894
  if (lastContent !== nextContent) {
7892
7895
  this.updateTextContent('' + nextContent);
7893
7896
  if ("development" !== 'production') {
7894
- setContentChildForInstrumentation.call(this, nextContent);
7897
+ setAndValidateContentChildDev.call(this, nextContent);
7895
7898
  }
7896
7899
  }
7897
7900
  } else if (nextHtml != null) {
@@ -7903,7 +7906,7 @@ ReactDOMComponent.Mixin = {
7903
7906
  }
7904
7907
  } else if (nextChildren != null) {
7905
7908
  if ("development" !== 'production') {
7906
- setContentChildForInstrumentation.call(this, null);
7909
+ setAndValidateContentChildDev.call(this, null);
7907
7910
  }
7908
7911
 
7909
7912
  this.updateChildren(nextChildren, transaction, context);
@@ -7958,7 +7961,7 @@ ReactDOMComponent.Mixin = {
7958
7961
  this._wrapperState = null;
7959
7962
 
7960
7963
  if ("development" !== 'production') {
7961
- setContentChildForInstrumentation.call(this, null);
7964
+ setAndValidateContentChildDev.call(this, null);
7962
7965
  }
7963
7966
  },
7964
7967
 
@@ -8541,7 +8544,7 @@ function forceUpdateIfMounted() {
8541
8544
 
8542
8545
  function isControlled(props) {
8543
8546
  var usesChecked = props.type === 'checkbox' || props.type === 'radio';
8544
- return usesChecked ? props.checked !== undefined : props.value !== undefined;
8547
+ return usesChecked ? props.checked != null : props.value != null;
8545
8548
  }
8546
8549
 
8547
8550
  /**
@@ -9455,7 +9458,7 @@ _assign(ReactDOMTextComponent.prototype, {
9455
9458
  if (parentInfo) {
9456
9459
  // parentInfo should always be present except for the top-level
9457
9460
  // component when server rendering
9458
- validateDOMNesting('#text', this, parentInfo);
9461
+ validateDOMNesting(null, this._stringText, this, parentInfo);
9459
9462
  }
9460
9463
  }
9461
9464
 
@@ -10191,12 +10194,6 @@ var ReactDebugTool = {
10191
10194
  endLifeCycleTimer(debugID, timerType);
10192
10195
  emitEvent('onEndLifeCycleTimer', debugID, timerType);
10193
10196
  },
10194
- onError: function (debugID) {
10195
- if (currentTimerDebugID != null) {
10196
- endLifeCycleTimer(currentTimerDebugID, currentTimerType);
10197
- }
10198
- emitEvent('onError', debugID);
10199
- },
10200
10197
  onBeginProcessingChildContext: function () {
10201
10198
  emitEvent('onBeginProcessingChildContext');
10202
10199
  },
@@ -10605,14 +10602,6 @@ ReactElement.createElement = function (type, config, children) {
10605
10602
  var source = null;
10606
10603
 
10607
10604
  if (config != null) {
10608
- if ("development" !== 'production') {
10609
- "development" !== 'production' ? warning(
10610
- /* eslint-disable no-proto */
10611
- config.__proto__ == null || config.__proto__ === Object.prototype,
10612
- /* eslint-enable no-proto */
10613
- 'React.createElement(...): Expected props argument to be a plain object. ' + 'Properties defined in its prototype chain will be ignored.') : void 0;
10614
- }
10615
-
10616
10605
  if (hasValidRef(config)) {
10617
10606
  ref = config.ref;
10618
10607
  }
@@ -10713,14 +10702,6 @@ ReactElement.cloneElement = function (element, config, children) {
10713
10702
  var owner = element._owner;
10714
10703
 
10715
10704
  if (config != null) {
10716
- if ("development" !== 'production') {
10717
- "development" !== 'production' ? warning(
10718
- /* eslint-disable no-proto */
10719
- config.__proto__ == null || config.__proto__ === Object.prototype,
10720
- /* eslint-enable no-proto */
10721
- 'React.cloneElement(...): Expected props argument to be a plain object. ' + 'Properties defined in its prototype chain will be ignored.') : void 0;
10722
- }
10723
-
10724
10705
  if (hasValidRef(config)) {
10725
10706
  // Silently steal the ref from the parent.
10726
10707
  ref = config.ref;
@@ -14854,7 +14835,7 @@ module.exports = ReactUpdates;
14854
14835
 
14855
14836
  'use strict';
14856
14837
 
14857
- module.exports = '15.3.1';
14838
+ module.exports = '15.3.2';
14858
14839
  },{}],98:[function(_dereq_,module,exports){
14859
14840
  /**
14860
14841
  * Copyright 2013-present, Facebook, Inc.
@@ -15194,7 +15175,7 @@ var eventTypes = {
15194
15175
  bubbled: keyOf({ onSelect: null }),
15195
15176
  captured: keyOf({ onSelectCapture: null })
15196
15177
  },
15197
- dependencies: [topLevelTypes.topBlur, topLevelTypes.topContextMenu, topLevelTypes.topFocus, topLevelTypes.topKeyDown, topLevelTypes.topMouseDown, topLevelTypes.topMouseUp, topLevelTypes.topSelectionChange]
15178
+ dependencies: [topLevelTypes.topBlur, topLevelTypes.topContextMenu, topLevelTypes.topFocus, topLevelTypes.topKeyDown, topLevelTypes.topKeyUp, topLevelTypes.topMouseDown, topLevelTypes.topMouseUp, topLevelTypes.topSelectionChange]
15198
15179
  }
15199
15180
  };
15200
15181
 
@@ -16260,7 +16241,8 @@ _assign(SyntheticEvent.prototype, {
16260
16241
 
16261
16242
  if (event.preventDefault) {
16262
16243
  event.preventDefault();
16263
- } else {
16244
+ } else if (typeof event.returnValue !== 'unknown') {
16245
+ // eslint-disable-line valid-typeof
16264
16246
  event.returnValue = false;
16265
16247
  }
16266
16248
  this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
@@ -18650,9 +18632,9 @@ var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {
18650
18632
  if (node.namespaceURI === DOMNamespaces.svg && !('innerHTML' in node)) {
18651
18633
  reusableSVGContainer = reusableSVGContainer || document.createElement('div');
18652
18634
  reusableSVGContainer.innerHTML = '<svg>' + html + '</svg>';
18653
- var newNodes = reusableSVGContainer.firstChild.childNodes;
18654
- for (var i = 0; i < newNodes.length; i++) {
18655
- node.appendChild(newNodes[i]);
18635
+ var svgNode = reusableSVGContainer.firstChild;
18636
+ while (svgNode.firstChild) {
18637
+ node.appendChild(svgNode.firstChild);
18656
18638
  }
18657
18639
  } else {
18658
18640
  node.innerHTML = html;
@@ -19259,11 +19241,16 @@ if ("development" !== 'production') {
19259
19241
 
19260
19242
  var didWarn = {};
19261
19243
 
19262
- validateDOMNesting = function (childTag, childInstance, ancestorInfo) {
19244
+ validateDOMNesting = function (childTag, childText, childInstance, ancestorInfo) {
19263
19245
  ancestorInfo = ancestorInfo || emptyAncestorInfo;
19264
19246
  var parentInfo = ancestorInfo.current;
19265
19247
  var parentTag = parentInfo && parentInfo.tag;
19266
19248
 
19249
+ if (childText != null) {
19250
+ "development" !== 'production' ? warning(childTag == null, 'validateDOMNesting: when childText is passed, childTag should be null') : void 0;
19251
+ childTag = '#text';
19252
+ }
19253
+
19267
19254
  var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;
19268
19255
  var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);
19269
19256
  var problematic = invalidParent || invalidAncestor;
@@ -19311,7 +19298,15 @@ if ("development" !== 'production') {
19311
19298
  didWarn[warnKey] = true;
19312
19299
 
19313
19300
  var tagDisplayName = childTag;
19314
- if (childTag !== '#text') {
19301
+ var whitespaceInfo = '';
19302
+ if (childTag === '#text') {
19303
+ if (/\S/.test(childText)) {
19304
+ tagDisplayName = 'Text nodes';
19305
+ } else {
19306
+ tagDisplayName = 'Whitespace text nodes';
19307
+ whitespaceInfo = ' Make sure you don\'t have any extra whitespace between tags on ' + 'each line of your source code.';
19308
+ }
19309
+ } else {
19315
19310
  tagDisplayName = '<' + childTag + '>';
19316
19311
  }
19317
19312
 
@@ -19320,7 +19315,7 @@ if ("development" !== 'production') {
19320
19315
  if (ancestorTag === 'table' && childTag === 'tr') {
19321
19316
  info += ' Add a <tbody> to your code to match the DOM tree generated by ' + 'the browser.';
19322
19317
  }
19323
- "development" !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a child of <%s>. ' + 'See %s.%s', tagDisplayName, ancestorTag, ownerInfo, info) : void 0;
19318
+ "development" !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s ' + 'See %s.%s', tagDisplayName, ancestorTag, whitespaceInfo, ownerInfo, info) : void 0;
19324
19319
  } else {
19325
19320
  "development" !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>. See %s.', tagDisplayName, ancestorTag, ownerInfo) : void 0;
19326
19321
  }