react-rails 1.10.0 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -45,7 +45,7 @@
45
45
  /***/ function(module, exports, __webpack_require__) {
46
46
 
47
47
  /* WEBPACK VAR INJECTION */(function(global) {var React = __webpack_require__(1);
48
- var ReactDOMServer = __webpack_require__(206);
48
+ var ReactDOMServer = __webpack_require__(199);
49
49
 
50
50
  global.React = React;
51
51
  global.ReactDOMServer = ReactDOMServer;
@@ -344,8 +344,15 @@
344
344
  /* 4 */
345
345
  /***/ function(module, exports) {
346
346
 
347
+ /*
348
+ object-assign
349
+ (c) Sindre Sorhus
350
+ @license MIT
351
+ */
352
+
347
353
  'use strict';
348
354
  /* eslint-disable no-unused-vars */
355
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
349
356
  var hasOwnProperty = Object.prototype.hasOwnProperty;
350
357
  var propIsEnumerable = Object.prototype.propertyIsEnumerable;
351
358
 
@@ -366,7 +373,7 @@
366
373
  // Detect buggy property enumeration order in older V8 versions.
367
374
 
368
375
  // https://bugs.chromium.org/p/v8/issues/detail?id=4118
369
- var test1 = new String('abc'); // eslint-disable-line
376
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
370
377
  test1[5] = 'de';
371
378
  if (Object.getOwnPropertyNames(test1)[0] === '5') {
372
379
  return false;
@@ -395,7 +402,7 @@
395
402
  }
396
403
 
397
404
  return true;
398
- } catch (e) {
405
+ } catch (err) {
399
406
  // We don't expect any of the above to throw, but better to be safe.
400
407
  return false;
401
408
  }
@@ -415,8 +422,8 @@
415
422
  }
416
423
  }
417
424
 
418
- if (Object.getOwnPropertySymbols) {
419
- symbols = Object.getOwnPropertySymbols(from);
425
+ if (getOwnPropertySymbols) {
426
+ symbols = getOwnPropertySymbols(from);
420
427
  for (var i = 0; i < symbols.length; i++) {
421
428
  if (propIsEnumerable.call(from, symbols[i])) {
422
429
  to[symbols[i]] = from[symbols[i]];
@@ -696,17 +703,6 @@
696
703
  }
697
704
  };
698
705
 
699
- var fiveArgumentPooler = function (a1, a2, a3, a4, a5) {
700
- var Klass = this;
701
- if (Klass.instancePool.length) {
702
- var instance = Klass.instancePool.pop();
703
- Klass.call(instance, a1, a2, a3, a4, a5);
704
- return instance;
705
- } else {
706
- return new Klass(a1, a2, a3, a4, a5);
707
- }
708
- };
709
-
710
706
  var standardReleaser = function (instance) {
711
707
  var Klass = this;
712
708
  !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;
@@ -746,8 +742,7 @@
746
742
  oneArgumentPooler: oneArgumentPooler,
747
743
  twoArgumentPooler: twoArgumentPooler,
748
744
  threeArgumentPooler: threeArgumentPooler,
749
- fourArgumentPooler: fourArgumentPooler,
750
- fiveArgumentPooler: fiveArgumentPooler
745
+ fourArgumentPooler: fourArgumentPooler
751
746
  };
752
747
 
753
748
  module.exports = PooledClass;
@@ -823,12 +818,18 @@
823
818
  * will remain to ensure logic does not differ in production.
824
819
  */
825
820
 
826
- function invariant(condition, format, a, b, c, d, e, f) {
827
- if (process.env.NODE_ENV !== 'production') {
821
+ var validateFormat = function validateFormat(format) {};
822
+
823
+ if (process.env.NODE_ENV !== 'production') {
824
+ validateFormat = function validateFormat(format) {
828
825
  if (format === undefined) {
829
826
  throw new Error('invariant requires an error message argument');
830
827
  }
831
- }
828
+ };
829
+ }
830
+
831
+ function invariant(condition, format, a, b, c, d, e, f) {
832
+ validateFormat(format);
832
833
 
833
834
  if (!condition) {
834
835
  var error;
@@ -3081,7 +3082,14 @@
3081
3082
  // We warn in this case but don't throw. We expect the element creation to
3082
3083
  // succeed and there will likely be errors in render.
3083
3084
  if (!validType) {
3084
- process.env.NODE_ENV !== 'production' ? warning(false, 'React.createElement: type should not be null, undefined, boolean, or ' + 'number. It should be a string (for DOM elements) or a ReactClass ' + '(for composite components).%s', getDeclarationErrorAddendum()) : void 0;
3085
+ if (typeof type !== 'function' && typeof type !== 'string') {
3086
+ var info = '';
3087
+ if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
3088
+ info += ' You likely forgot to export your component from the file ' + 'it\'s defined in.';
3089
+ }
3090
+ info += getDeclarationErrorAddendum();
3091
+ process.env.NODE_ENV !== 'production' ? warning(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', type == null ? type : typeof type, info) : void 0;
3092
+ }
3085
3093
  }
3086
3094
 
3087
3095
  var element = ReactElement.createElement.apply(this, arguments);
@@ -4052,7 +4060,7 @@
4052
4060
 
4053
4061
  'use strict';
4054
4062
 
4055
- module.exports = '15.4.1';
4063
+ module.exports = '15.4.2';
4056
4064
 
4057
4065
  /***/ },
4058
4066
  /* 31 */
@@ -4127,6 +4135,13 @@
4127
4135
 
4128
4136
  var internalInstanceKey = '__reactInternalInstance$' + Math.random().toString(36).slice(2);
4129
4137
 
4138
+ /**
4139
+ * Check if a given node should be cached.
4140
+ */
4141
+ function shouldPrecacheNode(node, nodeID) {
4142
+ return node.nodeType === 1 && node.getAttribute(ATTR_NAME) === String(nodeID) || node.nodeType === 8 && node.nodeValue === ' react-text: ' + nodeID + ' ' || node.nodeType === 8 && node.nodeValue === ' react-empty: ' + nodeID + ' ';
4143
+ }
4144
+
4130
4145
  /**
4131
4146
  * Drill down (through composites and empty components) until we get a host or
4132
4147
  * host text component.
@@ -4192,7 +4207,7 @@
4192
4207
  }
4193
4208
  // We assume the child nodes are in the same order as the child instances.
4194
4209
  for (; childNode !== null; childNode = childNode.nextSibling) {
4195
- if (childNode.nodeType === 1 && childNode.getAttribute(ATTR_NAME) === String(childID) || childNode.nodeType === 8 && childNode.nodeValue === ' react-text: ' + childID + ' ' || childNode.nodeType === 8 && childNode.nodeValue === ' react-empty: ' + childID + ' ') {
4210
+ if (shouldPrecacheNode(childNode, childID)) {
4196
4211
  precacheNode(childInst, childNode);
4197
4212
  continue outer;
4198
4213
  }
@@ -6433,17 +6448,6 @@
6433
6448
  }
6434
6449
  };
6435
6450
 
6436
- var fiveArgumentPooler = function (a1, a2, a3, a4, a5) {
6437
- var Klass = this;
6438
- if (Klass.instancePool.length) {
6439
- var instance = Klass.instancePool.pop();
6440
- Klass.call(instance, a1, a2, a3, a4, a5);
6441
- return instance;
6442
- } else {
6443
- return new Klass(a1, a2, a3, a4, a5);
6444
- }
6445
- };
6446
-
6447
6451
  var standardReleaser = function (instance) {
6448
6452
  var Klass = this;
6449
6453
  !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;
@@ -6483,8 +6487,7 @@
6483
6487
  oneArgumentPooler: oneArgumentPooler,
6484
6488
  twoArgumentPooler: twoArgumentPooler,
6485
6489
  threeArgumentPooler: threeArgumentPooler,
6486
- fourArgumentPooler: fourArgumentPooler,
6487
- fiveArgumentPooler: fiveArgumentPooler
6490
+ fourArgumentPooler: fourArgumentPooler
6488
6491
  };
6489
6492
 
6490
6493
  module.exports = PooledClass;
@@ -11302,12 +11305,18 @@
11302
11305
  } else {
11303
11306
  var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null;
11304
11307
  var childrenToUse = contentToUse != null ? null : props.children;
11308
+ // TODO: Validate that text is allowed as a child of this node
11305
11309
  if (contentToUse != null) {
11306
- // TODO: Validate that text is allowed as a child of this node
11307
- if (process.env.NODE_ENV !== 'production') {
11308
- setAndValidateContentChildDev.call(this, contentToUse);
11310
+ // Avoid setting textContent when the text is empty. In IE11 setting
11311
+ // textContent on a text area will cause the placeholder to not
11312
+ // show within the textarea until it has been focused and blurred again.
11313
+ // https://github.com/facebook/react/issues/6731#issuecomment-254874553
11314
+ if (contentToUse !== '') {
11315
+ if (process.env.NODE_ENV !== 'production') {
11316
+ setAndValidateContentChildDev.call(this, contentToUse);
11317
+ }
11318
+ DOMLazyTree.queueText(lazyTree, contentToUse);
11309
11319
  }
11310
- DOMLazyTree.queueText(lazyTree, contentToUse);
11311
11320
  } else if (childrenToUse != null) {
11312
11321
  var mountImages = this.mountChildren(childrenToUse, transaction, context);
11313
11322
  for (var i = 0; i < mountImages.length; i++) {
@@ -13227,7 +13236,17 @@
13227
13236
  }
13228
13237
  } else {
13229
13238
  if (props.value == null && props.defaultValue != null) {
13230
- node.defaultValue = '' + props.defaultValue;
13239
+ // In Chrome, assigning defaultValue to certain input types triggers input validation.
13240
+ // For number inputs, the display value loses trailing decimal points. For email inputs,
13241
+ // Chrome raises "The specified value <x> is not a valid email address".
13242
+ //
13243
+ // Here we check to see if the defaultValue has actually changed, avoiding these problems
13244
+ // when the user is inputting text
13245
+ //
13246
+ // https://github.com/facebook/react/issues/7253
13247
+ if (node.defaultValue !== '' + props.defaultValue) {
13248
+ node.defaultValue = '' + props.defaultValue;
13249
+ }
13231
13250
  }
13232
13251
  if (props.checked == null && props.defaultChecked != null) {
13233
13252
  node.defaultChecked = !!props.defaultChecked;
@@ -13974,9 +13993,15 @@
13974
13993
  // This is in postMount because we need access to the DOM node, which is not
13975
13994
  // available until after the component has mounted.
13976
13995
  var node = ReactDOMComponentTree.getNodeFromInstance(inst);
13996
+ var textContent = node.textContent;
13977
13997
 
13978
- // Warning: node.value may be the empty string at this point (IE11) if placeholder is set.
13979
- node.value = node.textContent; // Detach value from defaultValue
13998
+ // Only set node.value if textContent is equal to the expected
13999
+ // initial value. In IE10/IE11 there is a bug where the placeholder attribute
14000
+ // will populate textContent as well.
14001
+ // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/
14002
+ if (textContent === inst._wrapperState.initialValue) {
14003
+ node.value = textContent;
14004
+ }
13980
14005
  }
13981
14006
  };
13982
14007
 
@@ -14778,7 +14803,17 @@
14778
14803
  instance = ReactEmptyComponent.create(instantiateReactComponent);
14779
14804
  } else if (typeof node === 'object') {
14780
14805
  var element = node;
14781
- !(element && (typeof element.type === 'function' || typeof element.type === 'string')) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', element.type == null ? element.type : typeof element.type, getDeclarationErrorAddendum(element._owner)) : _prodInvariant('130', element.type == null ? element.type : typeof element.type, getDeclarationErrorAddendum(element._owner)) : void 0;
14806
+ var type = element.type;
14807
+ if (typeof type !== 'function' && typeof type !== 'string') {
14808
+ var info = '';
14809
+ if (process.env.NODE_ENV !== 'production') {
14810
+ if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
14811
+ info += ' You likely forgot to export your component from the file ' + 'it\'s defined in.';
14812
+ }
14813
+ }
14814
+ info += getDeclarationErrorAddendum(element._owner);
14815
+ true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', type == null ? type : typeof type, info) : _prodInvariant('130', type == null ? type : typeof type, info) : void 0;
14816
+ }
14782
14817
 
14783
14818
  // Special case string values
14784
14819
  if (typeof element.type === 'string') {
@@ -15068,7 +15103,7 @@
15068
15103
  // Since plain JS classes are defined without any special initialization
15069
15104
  // logic, we can not catch common errors early. Therefore, we have to
15070
15105
  // catch them here, at initialization time, instead.
15071
- process.env.NODE_ENV !== 'production' ? warning(!inst.getInitialState || inst.getInitialState.isReactClassApproved, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', this.getName() || 'a component') : void 0;
15106
+ process.env.NODE_ENV !== 'production' ? warning(!inst.getInitialState || inst.getInitialState.isReactClassApproved || inst.state, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', this.getName() || 'a component') : void 0;
15072
15107
  process.env.NODE_ENV !== 'production' ? warning(!inst.getDefaultProps || inst.getDefaultProps.isReactClassApproved, 'getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', this.getName() || 'a component') : void 0;
15073
15108
  process.env.NODE_ENV !== 'production' ? warning(!inst.propTypes, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', this.getName() || 'a component') : void 0;
15074
15109
  process.env.NODE_ENV !== 'production' ? warning(!inst.contextTypes, 'contextTypes was defined as an instance property on %s. Use a ' + 'static property to define contextTypes instead.', this.getName() || 'a component') : void 0;
@@ -16072,14 +16107,11 @@
16072
16107
 
16073
16108
  'use strict';
16074
16109
 
16075
- var _prodInvariant = __webpack_require__(35),
16076
- _assign = __webpack_require__(4);
16110
+ var _prodInvariant = __webpack_require__(35);
16077
16111
 
16078
16112
  var invariant = __webpack_require__(8);
16079
16113
 
16080
16114
  var genericComponentClass = null;
16081
- // This registry keeps track of wrapper classes around host tags.
16082
- var tagToComponentClass = {};
16083
16115
  var textComponentClass = null;
16084
16116
 
16085
16117
  var ReactHostComponentInjection = {
@@ -16092,11 +16124,6 @@
16092
16124
  // rendered as props.
16093
16125
  injectTextComponentClass: function (componentClass) {
16094
16126
  textComponentClass = componentClass;
16095
- },
16096
- // This accepts a keyed object with classes as values. Each key represents a
16097
- // tag. That particular tag will use this class instead of the generic one.
16098
- injectComponentClasses: function (componentClasses) {
16099
- _assign(tagToComponentClass, componentClasses);
16100
16127
  }
16101
16128
  };
16102
16129
 
@@ -18136,10 +18163,10 @@
18136
18163
  */
18137
18164
 
18138
18165
  function getUnboundedScrollPosition(scrollable) {
18139
- if (scrollable === window) {
18166
+ if (scrollable.Window && scrollable instanceof scrollable.Window) {
18140
18167
  return {
18141
- x: window.pageXOffset || document.documentElement.scrollLeft,
18142
- y: window.pageYOffset || document.documentElement.scrollTop
18168
+ x: scrollable.pageXOffset || scrollable.document.documentElement.scrollLeft,
18169
+ y: scrollable.pageYOffset || scrollable.document.documentElement.scrollTop
18143
18170
  };
18144
18171
  }
18145
18172
  return {
@@ -18888,7 +18915,9 @@
18888
18915
  * @return {boolean} Whether or not the object is a DOM node.
18889
18916
  */
18890
18917
  function isNode(object) {
18891
- return !!(object && (typeof Node === 'function' ? object instanceof Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));
18918
+ var doc = object ? object.ownerDocument || object : document;
18919
+ var defaultView = doc.defaultView || window;
18920
+ return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));
18892
18921
  }
18893
18922
 
18894
18923
  module.exports = isNode;
@@ -18918,15 +18947,19 @@
18918
18947
  *
18919
18948
  * The activeElement will be null only if the document or document body is not
18920
18949
  * yet defined.
18950
+ *
18951
+ * @param {?DOMDocument} doc Defaults to current document.
18952
+ * @return {?DOMElement}
18921
18953
  */
18922
- function getActiveElement() /*?DOMElement*/{
18923
- if (typeof document === 'undefined') {
18954
+ function getActiveElement(doc) /*?DOMElement*/{
18955
+ doc = doc || (typeof document !== 'undefined' ? document : undefined);
18956
+ if (typeof doc === 'undefined') {
18924
18957
  return null;
18925
18958
  }
18926
18959
  try {
18927
- return document.activeElement || document.body;
18960
+ return doc.activeElement || doc.body;
18928
18961
  } catch (e) {
18929
- return document.body;
18962
+ return doc.body;
18930
18963
  }
18931
18964
  }
18932
18965
 
@@ -20387,7 +20420,7 @@
20387
20420
 
20388
20421
  'use strict';
20389
20422
 
20390
- module.exports = '15.4.1';
20423
+ module.exports = '15.4.2';
20391
20424
 
20392
20425
  /***/ },
20393
20426
  /* 172 */,
@@ -20417,23 +20450,16 @@
20417
20450
  /* 196 */,
20418
20451
  /* 197 */,
20419
20452
  /* 198 */,
20420
- /* 199 */,
20421
- /* 200 */,
20422
- /* 201 */,
20423
- /* 202 */,
20424
- /* 203 */,
20425
- /* 204 */,
20426
- /* 205 */,
20427
- /* 206 */
20453
+ /* 199 */
20428
20454
  /***/ function(module, exports, __webpack_require__) {
20429
20455
 
20430
20456
  'use strict';
20431
20457
 
20432
- module.exports = __webpack_require__(207);
20458
+ module.exports = __webpack_require__(200);
20433
20459
 
20434
20460
 
20435
20461
  /***/ },
20436
- /* 207 */
20462
+ /* 200 */
20437
20463
  /***/ function(module, exports, __webpack_require__) {
20438
20464
 
20439
20465
  /**
@@ -20449,7 +20475,7 @@
20449
20475
  'use strict';
20450
20476
 
20451
20477
  var ReactDefaultInjection = __webpack_require__(38);
20452
- var ReactServerRendering = __webpack_require__(208);
20478
+ var ReactServerRendering = __webpack_require__(201);
20453
20479
  var ReactVersion = __webpack_require__(171);
20454
20480
 
20455
20481
  ReactDefaultInjection.inject();
@@ -20463,7 +20489,7 @@
20463
20489
  module.exports = ReactDOMServer;
20464
20490
 
20465
20491
  /***/ },
20466
- /* 208 */
20492
+ /* 201 */
20467
20493
  /***/ function(module, exports, __webpack_require__) {
20468
20494
 
20469
20495
  /* WEBPACK VAR INJECTION */(function(process) {/**
@@ -20485,7 +20511,7 @@
20485
20511
  var ReactInstrumentation = __webpack_require__(62);
20486
20512
  var ReactMarkupChecksum = __webpack_require__(169);
20487
20513
  var ReactReconciler = __webpack_require__(59);
20488
- var ReactServerBatchingStrategy = __webpack_require__(209);
20514
+ var ReactServerBatchingStrategy = __webpack_require__(202);
20489
20515
  var ReactServerRenderingTransaction = __webpack_require__(133);
20490
20516
  var ReactUpdates = __webpack_require__(56);
20491
20517
 
@@ -20558,7 +20584,7 @@
20558
20584
  /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
20559
20585
 
20560
20586
  /***/ },
20561
- /* 209 */
20587
+ /* 202 */
20562
20588
  /***/ function(module, exports) {
20563
20589
 
20564
20590
  /**
@@ -344,8 +344,15 @@
344
344
  /* 4 */
345
345
  /***/ function(module, exports) {
346
346
 
347
+ /*
348
+ object-assign
349
+ (c) Sindre Sorhus
350
+ @license MIT
351
+ */
352
+
347
353
  'use strict';
348
354
  /* eslint-disable no-unused-vars */
355
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
349
356
  var hasOwnProperty = Object.prototype.hasOwnProperty;
350
357
  var propIsEnumerable = Object.prototype.propertyIsEnumerable;
351
358
 
@@ -366,7 +373,7 @@
366
373
  // Detect buggy property enumeration order in older V8 versions.
367
374
 
368
375
  // https://bugs.chromium.org/p/v8/issues/detail?id=4118
369
- var test1 = new String('abc'); // eslint-disable-line
376
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
370
377
  test1[5] = 'de';
371
378
  if (Object.getOwnPropertyNames(test1)[0] === '5') {
372
379
  return false;
@@ -395,7 +402,7 @@
395
402
  }
396
403
 
397
404
  return true;
398
- } catch (e) {
405
+ } catch (err) {
399
406
  // We don't expect any of the above to throw, but better to be safe.
400
407
  return false;
401
408
  }
@@ -415,8 +422,8 @@
415
422
  }
416
423
  }
417
424
 
418
- if (Object.getOwnPropertySymbols) {
419
- symbols = Object.getOwnPropertySymbols(from);
425
+ if (getOwnPropertySymbols) {
426
+ symbols = getOwnPropertySymbols(from);
420
427
  for (var i = 0; i < symbols.length; i++) {
421
428
  if (propIsEnumerable.call(from, symbols[i])) {
422
429
  to[symbols[i]] = from[symbols[i]];
@@ -696,17 +703,6 @@
696
703
  }
697
704
  };
698
705
 
699
- var fiveArgumentPooler = function (a1, a2, a3, a4, a5) {
700
- var Klass = this;
701
- if (Klass.instancePool.length) {
702
- var instance = Klass.instancePool.pop();
703
- Klass.call(instance, a1, a2, a3, a4, a5);
704
- return instance;
705
- } else {
706
- return new Klass(a1, a2, a3, a4, a5);
707
- }
708
- };
709
-
710
706
  var standardReleaser = function (instance) {
711
707
  var Klass = this;
712
708
  !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;
@@ -746,8 +742,7 @@
746
742
  oneArgumentPooler: oneArgumentPooler,
747
743
  twoArgumentPooler: twoArgumentPooler,
748
744
  threeArgumentPooler: threeArgumentPooler,
749
- fourArgumentPooler: fourArgumentPooler,
750
- fiveArgumentPooler: fiveArgumentPooler
745
+ fourArgumentPooler: fourArgumentPooler
751
746
  };
752
747
 
753
748
  module.exports = PooledClass;
@@ -823,12 +818,18 @@
823
818
  * will remain to ensure logic does not differ in production.
824
819
  */
825
820
 
826
- function invariant(condition, format, a, b, c, d, e, f) {
827
- if (process.env.NODE_ENV !== 'production') {
821
+ var validateFormat = function validateFormat(format) {};
822
+
823
+ if (process.env.NODE_ENV !== 'production') {
824
+ validateFormat = function validateFormat(format) {
828
825
  if (format === undefined) {
829
826
  throw new Error('invariant requires an error message argument');
830
827
  }
831
- }
828
+ };
829
+ }
830
+
831
+ function invariant(condition, format, a, b, c, d, e, f) {
832
+ validateFormat(format);
832
833
 
833
834
  if (!condition) {
834
835
  var error;
@@ -3081,7 +3082,14 @@
3081
3082
  // We warn in this case but don't throw. We expect the element creation to
3082
3083
  // succeed and there will likely be errors in render.
3083
3084
  if (!validType) {
3084
- process.env.NODE_ENV !== 'production' ? warning(false, 'React.createElement: type should not be null, undefined, boolean, or ' + 'number. It should be a string (for DOM elements) or a ReactClass ' + '(for composite components).%s', getDeclarationErrorAddendum()) : void 0;
3085
+ if (typeof type !== 'function' && typeof type !== 'string') {
3086
+ var info = '';
3087
+ if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
3088
+ info += ' You likely forgot to export your component from the file ' + 'it\'s defined in.';
3089
+ }
3090
+ info += getDeclarationErrorAddendum();
3091
+ process.env.NODE_ENV !== 'production' ? warning(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', type == null ? type : typeof type, info) : void 0;
3092
+ }
3085
3093
  }
3086
3094
 
3087
3095
  var element = ReactElement.createElement.apply(this, arguments);
@@ -4052,7 +4060,7 @@
4052
4060
 
4053
4061
  'use strict';
4054
4062
 
4055
- module.exports = '15.4.1';
4063
+ module.exports = '15.4.2';
4056
4064
 
4057
4065
  /***/ },
4058
4066
  /* 31 */
@@ -4250,6 +4258,13 @@
4250
4258
 
4251
4259
  var internalInstanceKey = '__reactInternalInstance$' + Math.random().toString(36).slice(2);
4252
4260
 
4261
+ /**
4262
+ * Check if a given node should be cached.
4263
+ */
4264
+ function shouldPrecacheNode(node, nodeID) {
4265
+ return node.nodeType === 1 && node.getAttribute(ATTR_NAME) === String(nodeID) || node.nodeType === 8 && node.nodeValue === ' react-text: ' + nodeID + ' ' || node.nodeType === 8 && node.nodeValue === ' react-empty: ' + nodeID + ' ';
4266
+ }
4267
+
4253
4268
  /**
4254
4269
  * Drill down (through composites and empty components) until we get a host or
4255
4270
  * host text component.
@@ -4315,7 +4330,7 @@
4315
4330
  }
4316
4331
  // We assume the child nodes are in the same order as the child instances.
4317
4332
  for (; childNode !== null; childNode = childNode.nextSibling) {
4318
- if (childNode.nodeType === 1 && childNode.getAttribute(ATTR_NAME) === String(childID) || childNode.nodeType === 8 && childNode.nodeValue === ' react-text: ' + childID + ' ' || childNode.nodeType === 8 && childNode.nodeValue === ' react-empty: ' + childID + ' ') {
4333
+ if (shouldPrecacheNode(childNode, childID)) {
4319
4334
  precacheNode(childInst, childNode);
4320
4335
  continue outer;
4321
4336
  }
@@ -6556,17 +6571,6 @@
6556
6571
  }
6557
6572
  };
6558
6573
 
6559
- var fiveArgumentPooler = function (a1, a2, a3, a4, a5) {
6560
- var Klass = this;
6561
- if (Klass.instancePool.length) {
6562
- var instance = Klass.instancePool.pop();
6563
- Klass.call(instance, a1, a2, a3, a4, a5);
6564
- return instance;
6565
- } else {
6566
- return new Klass(a1, a2, a3, a4, a5);
6567
- }
6568
- };
6569
-
6570
6574
  var standardReleaser = function (instance) {
6571
6575
  var Klass = this;
6572
6576
  !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;
@@ -6606,8 +6610,7 @@
6606
6610
  oneArgumentPooler: oneArgumentPooler,
6607
6611
  twoArgumentPooler: twoArgumentPooler,
6608
6612
  threeArgumentPooler: threeArgumentPooler,
6609
- fourArgumentPooler: fourArgumentPooler,
6610
- fiveArgumentPooler: fiveArgumentPooler
6613
+ fourArgumentPooler: fourArgumentPooler
6611
6614
  };
6612
6615
 
6613
6616
  module.exports = PooledClass;
@@ -11425,12 +11428,18 @@
11425
11428
  } else {
11426
11429
  var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null;
11427
11430
  var childrenToUse = contentToUse != null ? null : props.children;
11431
+ // TODO: Validate that text is allowed as a child of this node
11428
11432
  if (contentToUse != null) {
11429
- // TODO: Validate that text is allowed as a child of this node
11430
- if (process.env.NODE_ENV !== 'production') {
11431
- setAndValidateContentChildDev.call(this, contentToUse);
11433
+ // Avoid setting textContent when the text is empty. In IE11 setting
11434
+ // textContent on a text area will cause the placeholder to not
11435
+ // show within the textarea until it has been focused and blurred again.
11436
+ // https://github.com/facebook/react/issues/6731#issuecomment-254874553
11437
+ if (contentToUse !== '') {
11438
+ if (process.env.NODE_ENV !== 'production') {
11439
+ setAndValidateContentChildDev.call(this, contentToUse);
11440
+ }
11441
+ DOMLazyTree.queueText(lazyTree, contentToUse);
11432
11442
  }
11433
- DOMLazyTree.queueText(lazyTree, contentToUse);
11434
11443
  } else if (childrenToUse != null) {
11435
11444
  var mountImages = this.mountChildren(childrenToUse, transaction, context);
11436
11445
  for (var i = 0; i < mountImages.length; i++) {
@@ -13350,7 +13359,17 @@
13350
13359
  }
13351
13360
  } else {
13352
13361
  if (props.value == null && props.defaultValue != null) {
13353
- node.defaultValue = '' + props.defaultValue;
13362
+ // In Chrome, assigning defaultValue to certain input types triggers input validation.
13363
+ // For number inputs, the display value loses trailing decimal points. For email inputs,
13364
+ // Chrome raises "The specified value <x> is not a valid email address".
13365
+ //
13366
+ // Here we check to see if the defaultValue has actually changed, avoiding these problems
13367
+ // when the user is inputting text
13368
+ //
13369
+ // https://github.com/facebook/react/issues/7253
13370
+ if (node.defaultValue !== '' + props.defaultValue) {
13371
+ node.defaultValue = '' + props.defaultValue;
13372
+ }
13354
13373
  }
13355
13374
  if (props.checked == null && props.defaultChecked != null) {
13356
13375
  node.defaultChecked = !!props.defaultChecked;
@@ -14097,9 +14116,15 @@
14097
14116
  // This is in postMount because we need access to the DOM node, which is not
14098
14117
  // available until after the component has mounted.
14099
14118
  var node = ReactDOMComponentTree.getNodeFromInstance(inst);
14119
+ var textContent = node.textContent;
14100
14120
 
14101
- // Warning: node.value may be the empty string at this point (IE11) if placeholder is set.
14102
- node.value = node.textContent; // Detach value from defaultValue
14121
+ // Only set node.value if textContent is equal to the expected
14122
+ // initial value. In IE10/IE11 there is a bug where the placeholder attribute
14123
+ // will populate textContent as well.
14124
+ // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/
14125
+ if (textContent === inst._wrapperState.initialValue) {
14126
+ node.value = textContent;
14127
+ }
14103
14128
  }
14104
14129
  };
14105
14130
 
@@ -14901,7 +14926,17 @@
14901
14926
  instance = ReactEmptyComponent.create(instantiateReactComponent);
14902
14927
  } else if (typeof node === 'object') {
14903
14928
  var element = node;
14904
- !(element && (typeof element.type === 'function' || typeof element.type === 'string')) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', element.type == null ? element.type : typeof element.type, getDeclarationErrorAddendum(element._owner)) : _prodInvariant('130', element.type == null ? element.type : typeof element.type, getDeclarationErrorAddendum(element._owner)) : void 0;
14929
+ var type = element.type;
14930
+ if (typeof type !== 'function' && typeof type !== 'string') {
14931
+ var info = '';
14932
+ if (process.env.NODE_ENV !== 'production') {
14933
+ if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
14934
+ info += ' You likely forgot to export your component from the file ' + 'it\'s defined in.';
14935
+ }
14936
+ }
14937
+ info += getDeclarationErrorAddendum(element._owner);
14938
+ true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', type == null ? type : typeof type, info) : _prodInvariant('130', type == null ? type : typeof type, info) : void 0;
14939
+ }
14905
14940
 
14906
14941
  // Special case string values
14907
14942
  if (typeof element.type === 'string') {
@@ -15191,7 +15226,7 @@
15191
15226
  // Since plain JS classes are defined without any special initialization
15192
15227
  // logic, we can not catch common errors early. Therefore, we have to
15193
15228
  // catch them here, at initialization time, instead.
15194
- process.env.NODE_ENV !== 'production' ? warning(!inst.getInitialState || inst.getInitialState.isReactClassApproved, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', this.getName() || 'a component') : void 0;
15229
+ process.env.NODE_ENV !== 'production' ? warning(!inst.getInitialState || inst.getInitialState.isReactClassApproved || inst.state, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', this.getName() || 'a component') : void 0;
15195
15230
  process.env.NODE_ENV !== 'production' ? warning(!inst.getDefaultProps || inst.getDefaultProps.isReactClassApproved, 'getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', this.getName() || 'a component') : void 0;
15196
15231
  process.env.NODE_ENV !== 'production' ? warning(!inst.propTypes, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', this.getName() || 'a component') : void 0;
15197
15232
  process.env.NODE_ENV !== 'production' ? warning(!inst.contextTypes, 'contextTypes was defined as an instance property on %s. Use a ' + 'static property to define contextTypes instead.', this.getName() || 'a component') : void 0;
@@ -16195,14 +16230,11 @@
16195
16230
 
16196
16231
  'use strict';
16197
16232
 
16198
- var _prodInvariant = __webpack_require__(35),
16199
- _assign = __webpack_require__(4);
16233
+ var _prodInvariant = __webpack_require__(35);
16200
16234
 
16201
16235
  var invariant = __webpack_require__(8);
16202
16236
 
16203
16237
  var genericComponentClass = null;
16204
- // This registry keeps track of wrapper classes around host tags.
16205
- var tagToComponentClass = {};
16206
16238
  var textComponentClass = null;
16207
16239
 
16208
16240
  var ReactHostComponentInjection = {
@@ -16215,11 +16247,6 @@
16215
16247
  // rendered as props.
16216
16248
  injectTextComponentClass: function (componentClass) {
16217
16249
  textComponentClass = componentClass;
16218
- },
16219
- // This accepts a keyed object with classes as values. Each key represents a
16220
- // tag. That particular tag will use this class instead of the generic one.
16221
- injectComponentClasses: function (componentClasses) {
16222
- _assign(tagToComponentClass, componentClasses);
16223
16250
  }
16224
16251
  };
16225
16252
 
@@ -18259,10 +18286,10 @@
18259
18286
  */
18260
18287
 
18261
18288
  function getUnboundedScrollPosition(scrollable) {
18262
- if (scrollable === window) {
18289
+ if (scrollable.Window && scrollable instanceof scrollable.Window) {
18263
18290
  return {
18264
- x: window.pageXOffset || document.documentElement.scrollLeft,
18265
- y: window.pageYOffset || document.documentElement.scrollTop
18291
+ x: scrollable.pageXOffset || scrollable.document.documentElement.scrollLeft,
18292
+ y: scrollable.pageYOffset || scrollable.document.documentElement.scrollTop
18266
18293
  };
18267
18294
  }
18268
18295
  return {
@@ -19011,7 +19038,9 @@
19011
19038
  * @return {boolean} Whether or not the object is a DOM node.
19012
19039
  */
19013
19040
  function isNode(object) {
19014
- return !!(object && (typeof Node === 'function' ? object instanceof Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));
19041
+ var doc = object ? object.ownerDocument || object : document;
19042
+ var defaultView = doc.defaultView || window;
19043
+ return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));
19015
19044
  }
19016
19045
 
19017
19046
  module.exports = isNode;
@@ -19041,15 +19070,19 @@
19041
19070
  *
19042
19071
  * The activeElement will be null only if the document or document body is not
19043
19072
  * yet defined.
19073
+ *
19074
+ * @param {?DOMDocument} doc Defaults to current document.
19075
+ * @return {?DOMElement}
19044
19076
  */
19045
- function getActiveElement() /*?DOMElement*/{
19046
- if (typeof document === 'undefined') {
19077
+ function getActiveElement(doc) /*?DOMElement*/{
19078
+ doc = doc || (typeof document !== 'undefined' ? document : undefined);
19079
+ if (typeof doc === 'undefined') {
19047
19080
  return null;
19048
19081
  }
19049
19082
  try {
19050
- return document.activeElement || document.body;
19083
+ return doc.activeElement || doc.body;
19051
19084
  } catch (e) {
19052
- return document.body;
19085
+ return doc.body;
19053
19086
  }
19054
19087
  }
19055
19088
 
@@ -21074,7 +21107,7 @@
21074
21107
 
21075
21108
  'use strict';
21076
21109
 
21077
- module.exports = '15.4.1';
21110
+ module.exports = '15.4.2';
21078
21111
 
21079
21112
  /***/ },
21080
21113
  /* 172 */