react-rails 1.5.0 → 1.6.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.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +202 -0
  3. data/README.md +23 -4
  4. data/lib/assets/javascripts/react_ujs.js.erb +4 -1
  5. data/lib/assets/react-source/development-with-addons/react-server.js +16565 -16557
  6. data/lib/assets/react-source/development-with-addons/react.js +16564 -16556
  7. data/lib/assets/react-source/development/react-addons-clone-with-props.js +888 -0
  8. data/lib/assets/react-source/development/react-addons-create-fragment.js +1656 -0
  9. data/lib/assets/react-source/development/react-addons-css-transition-group.js +20429 -0
  10. data/lib/assets/react-source/development/react-addons-linked-state-mixin.js +19872 -0
  11. data/lib/assets/react-source/development/react-addons-perf.js +7634 -0
  12. data/lib/assets/react-source/development/react-addons-pure-render-mixin.js +199 -0
  13. data/lib/assets/react-source/development/react-addons-test-utils.js +20135 -0
  14. data/lib/assets/react-source/development/react-addons-transition-group.js +19969 -0
  15. data/lib/assets/react-source/development/react-addons-update.js +424 -0
  16. data/lib/assets/react-source/development/react-server.js +10794 -10786
  17. data/lib/assets/react-source/development/react.js +10787 -10753
  18. data/lib/assets/react-source/production-with-addons/react-server.js +6 -6
  19. data/lib/assets/react-source/production-with-addons/react.js +6 -6
  20. data/lib/assets/react-source/production/react-addons-clone-with-props.js +1 -0
  21. data/lib/assets/react-source/production/react-addons-create-fragment.js +1 -0
  22. data/lib/assets/react-source/production/react-addons-css-transition-group.js +19 -0
  23. data/lib/assets/react-source/production/react-addons-linked-state-mixin.js +19 -0
  24. data/lib/assets/react-source/production/react-addons-perf.js +15 -0
  25. data/lib/assets/react-source/production/react-addons-pure-render-mixin.js +1 -0
  26. data/lib/assets/react-source/production/react-addons-test-utils.js +19 -0
  27. data/lib/assets/react-source/production/react-addons-transition-group.js +19 -0
  28. data/lib/assets/react-source/production/react-addons-update.js +1 -0
  29. data/lib/assets/react-source/production/react-server.js +6 -5
  30. data/lib/assets/react-source/production/react.js +6 -5
  31. data/lib/generators/react/install_generator.rb +4 -5
  32. data/lib/react/rails/controller_lifecycle.rb +5 -3
  33. data/lib/react/rails/version.rb +1 -1
  34. data/lib/react/server_rendering/environment_container.rb +18 -0
  35. data/lib/react/server_rendering/exec_js_renderer.rb +4 -4
  36. data/lib/react/server_rendering/manifest_container.rb +19 -0
  37. data/lib/react/server_rendering/sprockets_renderer.rb +34 -27
  38. data/lib/react/server_rendering/sprockets_renderer/console_polyfill.js +6 -0
  39. data/lib/react/server_rendering/sprockets_renderer/console_replay.js +9 -0
  40. metadata +25 -2
@@ -0,0 +1,888 @@
1
+ /******/ (function(modules) { // webpackBootstrap
2
+ /******/ // The module cache
3
+ /******/ var installedModules = {};
4
+
5
+ /******/ // The require function
6
+ /******/ function __webpack_require__(moduleId) {
7
+
8
+ /******/ // Check if module is in cache
9
+ /******/ if(installedModules[moduleId])
10
+ /******/ return installedModules[moduleId].exports;
11
+
12
+ /******/ // Create a new module (and put it into the cache)
13
+ /******/ var module = installedModules[moduleId] = {
14
+ /******/ exports: {},
15
+ /******/ id: moduleId,
16
+ /******/ loaded: false
17
+ /******/ };
18
+
19
+ /******/ // Execute the module function
20
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21
+
22
+ /******/ // Flag the module as loaded
23
+ /******/ module.loaded = true;
24
+
25
+ /******/ // Return the exports of the module
26
+ /******/ return module.exports;
27
+ /******/ }
28
+
29
+
30
+ /******/ // expose the modules object (__webpack_modules__)
31
+ /******/ __webpack_require__.m = modules;
32
+
33
+ /******/ // expose the module cache
34
+ /******/ __webpack_require__.c = installedModules;
35
+
36
+ /******/ // __webpack_public_path__
37
+ /******/ __webpack_require__.p = "";
38
+
39
+ /******/ // Load entry module and return exports
40
+ /******/ return __webpack_require__(0);
41
+ /******/ })
42
+ /************************************************************************/
43
+ /******/ ([
44
+ /* 0 */
45
+ /***/ function(module, exports, __webpack_require__) {
46
+
47
+ window.React.addons = window.React.addons || {};
48
+ window.React.addons.cloneWithProps = __webpack_require__(1);
49
+
50
+
51
+ /***/ },
52
+ /* 1 */
53
+ /***/ function(module, exports, __webpack_require__) {
54
+
55
+ module.exports = __webpack_require__(2);
56
+
57
+ /***/ },
58
+ /* 2 */
59
+ /***/ function(module, exports, __webpack_require__) {
60
+
61
+ /* WEBPACK VAR INJECTION */(function(process) {/**
62
+ * Copyright 2013-2015, Facebook, Inc.
63
+ * All rights reserved.
64
+ *
65
+ * This source code is licensed under the BSD-style license found in the
66
+ * LICENSE file in the root directory of this source tree. An additional grant
67
+ * of patent rights can be found in the PATENTS file in the same directory.
68
+ *
69
+ * @typechecks static-only
70
+ * @providesModule cloneWithProps
71
+ */
72
+
73
+ 'use strict';
74
+
75
+ var ReactElement = __webpack_require__(4);
76
+ var ReactPropTransferer = __webpack_require__(8);
77
+
78
+ var keyOf = __webpack_require__(11);
79
+ var warning = __webpack_require__(12);
80
+
81
+ var CHILDREN_PROP = keyOf({ children: null });
82
+
83
+ var didDeprecatedWarn = false;
84
+
85
+ /**
86
+ * Sometimes you want to change the props of a child passed to you. Usually
87
+ * this is to add a CSS class.
88
+ *
89
+ * @param {ReactElement} child child element you'd like to clone
90
+ * @param {object} props props you'd like to modify. className and style will be
91
+ * merged automatically.
92
+ * @return {ReactElement} a clone of child with props merged in.
93
+ * @deprecated
94
+ */
95
+ function cloneWithProps(child, props) {
96
+ if (process.env.NODE_ENV !== 'production') {
97
+ process.env.NODE_ENV !== 'production' ? warning(didDeprecatedWarn, 'cloneWithProps(...) is deprecated. ' + 'Please use React.cloneElement instead.') : undefined;
98
+ didDeprecatedWarn = true;
99
+ process.env.NODE_ENV !== 'production' ? warning(!child.ref, 'You are calling cloneWithProps() on a child with a ref. This is ' + 'dangerous because you\'re creating a new child which will not be ' + 'added as a ref to its parent.') : undefined;
100
+ }
101
+
102
+ var newProps = ReactPropTransferer.mergeProps(props, child.props);
103
+
104
+ // Use `child.props.children` if it is provided.
105
+ if (!newProps.hasOwnProperty(CHILDREN_PROP) && child.props.hasOwnProperty(CHILDREN_PROP)) {
106
+ newProps.children = child.props.children;
107
+ }
108
+
109
+ // The current API doesn't retain _owner, which is why this
110
+ // doesn't use ReactElement.cloneAndReplaceProps.
111
+ return ReactElement.createElement(child.type, newProps);
112
+ }
113
+
114
+ module.exports = cloneWithProps;
115
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
116
+
117
+ /***/ },
118
+ /* 3 */
119
+ /***/ function(module, exports) {
120
+
121
+ // shim for using process in browser
122
+
123
+ var process = module.exports = {};
124
+ var queue = [];
125
+ var draining = false;
126
+ var currentQueue;
127
+ var queueIndex = -1;
128
+
129
+ function cleanUpNextTick() {
130
+ draining = false;
131
+ if (currentQueue.length) {
132
+ queue = currentQueue.concat(queue);
133
+ } else {
134
+ queueIndex = -1;
135
+ }
136
+ if (queue.length) {
137
+ drainQueue();
138
+ }
139
+ }
140
+
141
+ function drainQueue() {
142
+ if (draining) {
143
+ return;
144
+ }
145
+ var timeout = setTimeout(cleanUpNextTick);
146
+ draining = true;
147
+
148
+ var len = queue.length;
149
+ while(len) {
150
+ currentQueue = queue;
151
+ queue = [];
152
+ while (++queueIndex < len) {
153
+ if (currentQueue) {
154
+ currentQueue[queueIndex].run();
155
+ }
156
+ }
157
+ queueIndex = -1;
158
+ len = queue.length;
159
+ }
160
+ currentQueue = null;
161
+ draining = false;
162
+ clearTimeout(timeout);
163
+ }
164
+
165
+ process.nextTick = function (fun) {
166
+ var args = new Array(arguments.length - 1);
167
+ if (arguments.length > 1) {
168
+ for (var i = 1; i < arguments.length; i++) {
169
+ args[i - 1] = arguments[i];
170
+ }
171
+ }
172
+ queue.push(new Item(fun, args));
173
+ if (queue.length === 1 && !draining) {
174
+ setTimeout(drainQueue, 0);
175
+ }
176
+ };
177
+
178
+ // v8 likes predictible objects
179
+ function Item(fun, array) {
180
+ this.fun = fun;
181
+ this.array = array;
182
+ }
183
+ Item.prototype.run = function () {
184
+ this.fun.apply(null, this.array);
185
+ };
186
+ process.title = 'browser';
187
+ process.browser = true;
188
+ process.env = {};
189
+ process.argv = [];
190
+ process.version = ''; // empty string to avoid regexp issues
191
+ process.versions = {};
192
+
193
+ function noop() {}
194
+
195
+ process.on = noop;
196
+ process.addListener = noop;
197
+ process.once = noop;
198
+ process.off = noop;
199
+ process.removeListener = noop;
200
+ process.removeAllListeners = noop;
201
+ process.emit = noop;
202
+
203
+ process.binding = function (name) {
204
+ throw new Error('process.binding is not supported');
205
+ };
206
+
207
+ process.cwd = function () { return '/' };
208
+ process.chdir = function (dir) {
209
+ throw new Error('process.chdir is not supported');
210
+ };
211
+ process.umask = function() { return 0; };
212
+
213
+
214
+ /***/ },
215
+ /* 4 */
216
+ /***/ function(module, exports, __webpack_require__) {
217
+
218
+ /* WEBPACK VAR INJECTION */(function(process) {/**
219
+ * Copyright 2014-2015, Facebook, Inc.
220
+ * All rights reserved.
221
+ *
222
+ * This source code is licensed under the BSD-style license found in the
223
+ * LICENSE file in the root directory of this source tree. An additional grant
224
+ * of patent rights can be found in the PATENTS file in the same directory.
225
+ *
226
+ * @providesModule ReactElement
227
+ */
228
+
229
+ 'use strict';
230
+
231
+ var ReactCurrentOwner = __webpack_require__(5);
232
+
233
+ var assign = __webpack_require__(6);
234
+ var canDefineProperty = __webpack_require__(7);
235
+
236
+ // The Symbol used to tag the ReactElement type. If there is no native Symbol
237
+ // nor polyfill, then a plain number is used for performance.
238
+ var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
239
+
240
+ var RESERVED_PROPS = {
241
+ key: true,
242
+ ref: true,
243
+ __self: true,
244
+ __source: true
245
+ };
246
+
247
+ /**
248
+ * Base constructor for all React elements. This is only used to make this
249
+ * work with a dynamic instanceof check. Nothing should live on this prototype.
250
+ *
251
+ * @param {*} type
252
+ * @param {*} key
253
+ * @param {string|object} ref
254
+ * @param {*} self A *temporary* helper to detect places where `this` is
255
+ * different from the `owner` when React.createElement is called, so that we
256
+ * can warn. We want to get rid of owner and replace string `ref`s with arrow
257
+ * functions, and as long as `this` and owner are the same, there will be no
258
+ * change in behavior.
259
+ * @param {*} source An annotation object (added by a transpiler or otherwise)
260
+ * indicating filename, line number, and/or other information.
261
+ * @param {*} owner
262
+ * @param {*} props
263
+ * @internal
264
+ */
265
+ var ReactElement = function (type, key, ref, self, source, owner, props) {
266
+ var element = {
267
+ // This tag allow us to uniquely identify this as a React Element
268
+ $$typeof: REACT_ELEMENT_TYPE,
269
+
270
+ // Built-in properties that belong on the element
271
+ type: type,
272
+ key: key,
273
+ ref: ref,
274
+ props: props,
275
+
276
+ // Record the component responsible for creating this element.
277
+ _owner: owner
278
+ };
279
+
280
+ if (process.env.NODE_ENV !== 'production') {
281
+ // The validation flag is currently mutative. We put it on
282
+ // an external backing store so that we can freeze the whole object.
283
+ // This can be replaced with a WeakMap once they are implemented in
284
+ // commonly used development environments.
285
+ element._store = {};
286
+
287
+ // To make comparing ReactElements easier for testing purposes, we make
288
+ // the validation flag non-enumerable (where possible, which should
289
+ // include every environment we run tests in), so the test framework
290
+ // ignores it.
291
+ if (canDefineProperty) {
292
+ Object.defineProperty(element._store, 'validated', {
293
+ configurable: false,
294
+ enumerable: false,
295
+ writable: true,
296
+ value: false
297
+ });
298
+ // self and source are DEV only properties.
299
+ Object.defineProperty(element, '_self', {
300
+ configurable: false,
301
+ enumerable: false,
302
+ writable: false,
303
+ value: self
304
+ });
305
+ // Two elements created in two different places should be considered
306
+ // equal for testing purposes and therefore we hide it from enumeration.
307
+ Object.defineProperty(element, '_source', {
308
+ configurable: false,
309
+ enumerable: false,
310
+ writable: false,
311
+ value: source
312
+ });
313
+ } else {
314
+ element._store.validated = false;
315
+ element._self = self;
316
+ element._source = source;
317
+ }
318
+ Object.freeze(element.props);
319
+ Object.freeze(element);
320
+ }
321
+
322
+ return element;
323
+ };
324
+
325
+ ReactElement.createElement = function (type, config, children) {
326
+ var propName;
327
+
328
+ // Reserved names are extracted
329
+ var props = {};
330
+
331
+ var key = null;
332
+ var ref = null;
333
+ var self = null;
334
+ var source = null;
335
+
336
+ if (config != null) {
337
+ ref = config.ref === undefined ? null : config.ref;
338
+ key = config.key === undefined ? null : '' + config.key;
339
+ self = config.__self === undefined ? null : config.__self;
340
+ source = config.__source === undefined ? null : config.__source;
341
+ // Remaining properties are added to a new props object
342
+ for (propName in config) {
343
+ if (config.hasOwnProperty(propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
344
+ props[propName] = config[propName];
345
+ }
346
+ }
347
+ }
348
+
349
+ // Children can be more than one argument, and those are transferred onto
350
+ // the newly allocated props object.
351
+ var childrenLength = arguments.length - 2;
352
+ if (childrenLength === 1) {
353
+ props.children = children;
354
+ } else if (childrenLength > 1) {
355
+ var childArray = Array(childrenLength);
356
+ for (var i = 0; i < childrenLength; i++) {
357
+ childArray[i] = arguments[i + 2];
358
+ }
359
+ props.children = childArray;
360
+ }
361
+
362
+ // Resolve default props
363
+ if (type && type.defaultProps) {
364
+ var defaultProps = type.defaultProps;
365
+ for (propName in defaultProps) {
366
+ if (typeof props[propName] === 'undefined') {
367
+ props[propName] = defaultProps[propName];
368
+ }
369
+ }
370
+ }
371
+
372
+ return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
373
+ };
374
+
375
+ ReactElement.createFactory = function (type) {
376
+ var factory = ReactElement.createElement.bind(null, type);
377
+ // Expose the type on the factory and the prototype so that it can be
378
+ // easily accessed on elements. E.g. `<Foo />.type === Foo`.
379
+ // This should not be named `constructor` since this may not be the function
380
+ // that created the element, and it may not even be a constructor.
381
+ // Legacy hook TODO: Warn if this is accessed
382
+ factory.type = type;
383
+ return factory;
384
+ };
385
+
386
+ ReactElement.cloneAndReplaceKey = function (oldElement, newKey) {
387
+ var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
388
+
389
+ return newElement;
390
+ };
391
+
392
+ ReactElement.cloneAndReplaceProps = function (oldElement, newProps) {
393
+ var newElement = ReactElement(oldElement.type, oldElement.key, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, newProps);
394
+
395
+ if (process.env.NODE_ENV !== 'production') {
396
+ // If the key on the original is valid, then the clone is valid
397
+ newElement._store.validated = oldElement._store.validated;
398
+ }
399
+
400
+ return newElement;
401
+ };
402
+
403
+ ReactElement.cloneElement = function (element, config, children) {
404
+ var propName;
405
+
406
+ // Original props are copied
407
+ var props = assign({}, element.props);
408
+
409
+ // Reserved names are extracted
410
+ var key = element.key;
411
+ var ref = element.ref;
412
+ // Self is preserved since the owner is preserved.
413
+ var self = element._self;
414
+ // Source is preserved since cloneElement is unlikely to be targeted by a
415
+ // transpiler, and the original source is probably a better indicator of the
416
+ // true owner.
417
+ var source = element._source;
418
+
419
+ // Owner will be preserved, unless ref is overridden
420
+ var owner = element._owner;
421
+
422
+ if (config != null) {
423
+ if (config.ref !== undefined) {
424
+ // Silently steal the ref from the parent.
425
+ ref = config.ref;
426
+ owner = ReactCurrentOwner.current;
427
+ }
428
+ if (config.key !== undefined) {
429
+ key = '' + config.key;
430
+ }
431
+ // Remaining properties override existing props
432
+ for (propName in config) {
433
+ if (config.hasOwnProperty(propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
434
+ props[propName] = config[propName];
435
+ }
436
+ }
437
+ }
438
+
439
+ // Children can be more than one argument, and those are transferred onto
440
+ // the newly allocated props object.
441
+ var childrenLength = arguments.length - 2;
442
+ if (childrenLength === 1) {
443
+ props.children = children;
444
+ } else if (childrenLength > 1) {
445
+ var childArray = Array(childrenLength);
446
+ for (var i = 0; i < childrenLength; i++) {
447
+ childArray[i] = arguments[i + 2];
448
+ }
449
+ props.children = childArray;
450
+ }
451
+
452
+ return ReactElement(element.type, key, ref, self, source, owner, props);
453
+ };
454
+
455
+ /**
456
+ * @param {?object} object
457
+ * @return {boolean} True if `object` is a valid component.
458
+ * @final
459
+ */
460
+ ReactElement.isValidElement = function (object) {
461
+ return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
462
+ };
463
+
464
+ module.exports = ReactElement;
465
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
466
+
467
+ /***/ },
468
+ /* 5 */
469
+ /***/ function(module, exports) {
470
+
471
+ /**
472
+ * Copyright 2013-2015, Facebook, Inc.
473
+ * All rights reserved.
474
+ *
475
+ * This source code is licensed under the BSD-style license found in the
476
+ * LICENSE file in the root directory of this source tree. An additional grant
477
+ * of patent rights can be found in the PATENTS file in the same directory.
478
+ *
479
+ * @providesModule ReactCurrentOwner
480
+ */
481
+
482
+ 'use strict';
483
+
484
+ /**
485
+ * Keeps track of the current owner.
486
+ *
487
+ * The current owner is the component who should own any components that are
488
+ * currently being constructed.
489
+ */
490
+ var ReactCurrentOwner = {
491
+
492
+ /**
493
+ * @internal
494
+ * @type {ReactComponent}
495
+ */
496
+ current: null
497
+
498
+ };
499
+
500
+ module.exports = ReactCurrentOwner;
501
+
502
+ /***/ },
503
+ /* 6 */
504
+ /***/ function(module, exports) {
505
+
506
+ /**
507
+ * Copyright 2014-2015, Facebook, Inc.
508
+ * All rights reserved.
509
+ *
510
+ * This source code is licensed under the BSD-style license found in the
511
+ * LICENSE file in the root directory of this source tree. An additional grant
512
+ * of patent rights can be found in the PATENTS file in the same directory.
513
+ *
514
+ * @providesModule Object.assign
515
+ */
516
+
517
+ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign
518
+
519
+ 'use strict';
520
+
521
+ function assign(target, sources) {
522
+ if (target == null) {
523
+ throw new TypeError('Object.assign target cannot be null or undefined');
524
+ }
525
+
526
+ var to = Object(target);
527
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
528
+
529
+ for (var nextIndex = 1; nextIndex < arguments.length; nextIndex++) {
530
+ var nextSource = arguments[nextIndex];
531
+ if (nextSource == null) {
532
+ continue;
533
+ }
534
+
535
+ var from = Object(nextSource);
536
+
537
+ // We don't currently support accessors nor proxies. Therefore this
538
+ // copy cannot throw. If we ever supported this then we must handle
539
+ // exceptions and side-effects. We don't support symbols so they won't
540
+ // be transferred.
541
+
542
+ for (var key in from) {
543
+ if (hasOwnProperty.call(from, key)) {
544
+ to[key] = from[key];
545
+ }
546
+ }
547
+ }
548
+
549
+ return to;
550
+ }
551
+
552
+ module.exports = assign;
553
+
554
+ /***/ },
555
+ /* 7 */
556
+ /***/ function(module, exports, __webpack_require__) {
557
+
558
+ /* WEBPACK VAR INJECTION */(function(process) {/**
559
+ * Copyright 2013-2015, Facebook, Inc.
560
+ * All rights reserved.
561
+ *
562
+ * This source code is licensed under the BSD-style license found in the
563
+ * LICENSE file in the root directory of this source tree. An additional grant
564
+ * of patent rights can be found in the PATENTS file in the same directory.
565
+ *
566
+ * @providesModule canDefineProperty
567
+ */
568
+
569
+ 'use strict';
570
+
571
+ var canDefineProperty = false;
572
+ if (process.env.NODE_ENV !== 'production') {
573
+ try {
574
+ Object.defineProperty({}, 'x', { get: function () {} });
575
+ canDefineProperty = true;
576
+ } catch (x) {
577
+ // IE will fail on defineProperty
578
+ }
579
+ }
580
+
581
+ module.exports = canDefineProperty;
582
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
583
+
584
+ /***/ },
585
+ /* 8 */
586
+ /***/ function(module, exports, __webpack_require__) {
587
+
588
+ /**
589
+ * Copyright 2013-2015, Facebook, Inc.
590
+ * All rights reserved.
591
+ *
592
+ * This source code is licensed under the BSD-style license found in the
593
+ * LICENSE file in the root directory of this source tree. An additional grant
594
+ * of patent rights can be found in the PATENTS file in the same directory.
595
+ *
596
+ * @providesModule ReactPropTransferer
597
+ */
598
+
599
+ 'use strict';
600
+
601
+ var assign = __webpack_require__(6);
602
+ var emptyFunction = __webpack_require__(9);
603
+ var joinClasses = __webpack_require__(10);
604
+
605
+ /**
606
+ * Creates a transfer strategy that will merge prop values using the supplied
607
+ * `mergeStrategy`. If a prop was previously unset, this just sets it.
608
+ *
609
+ * @param {function} mergeStrategy
610
+ * @return {function}
611
+ */
612
+ function createTransferStrategy(mergeStrategy) {
613
+ return function (props, key, value) {
614
+ if (!props.hasOwnProperty(key)) {
615
+ props[key] = value;
616
+ } else {
617
+ props[key] = mergeStrategy(props[key], value);
618
+ }
619
+ };
620
+ }
621
+
622
+ var transferStrategyMerge = createTransferStrategy(function (a, b) {
623
+ // `merge` overrides the first object's (`props[key]` above) keys using the
624
+ // second object's (`value`) keys. An object's style's existing `propA` would
625
+ // get overridden. Flip the order here.
626
+ return assign({}, b, a);
627
+ });
628
+
629
+ /**
630
+ * Transfer strategies dictate how props are transferred by `transferPropsTo`.
631
+ * NOTE: if you add any more exceptions to this list you should be sure to
632
+ * update `cloneWithProps()` accordingly.
633
+ */
634
+ var TransferStrategies = {
635
+ /**
636
+ * Never transfer `children`.
637
+ */
638
+ children: emptyFunction,
639
+ /**
640
+ * Transfer the `className` prop by merging them.
641
+ */
642
+ className: createTransferStrategy(joinClasses),
643
+ /**
644
+ * Transfer the `style` prop (which is an object) by merging them.
645
+ */
646
+ style: transferStrategyMerge
647
+ };
648
+
649
+ /**
650
+ * Mutates the first argument by transferring the properties from the second
651
+ * argument.
652
+ *
653
+ * @param {object} props
654
+ * @param {object} newProps
655
+ * @return {object}
656
+ */
657
+ function transferInto(props, newProps) {
658
+ for (var thisKey in newProps) {
659
+ if (!newProps.hasOwnProperty(thisKey)) {
660
+ continue;
661
+ }
662
+
663
+ var transferStrategy = TransferStrategies[thisKey];
664
+
665
+ if (transferStrategy && TransferStrategies.hasOwnProperty(thisKey)) {
666
+ transferStrategy(props, thisKey, newProps[thisKey]);
667
+ } else if (!props.hasOwnProperty(thisKey)) {
668
+ props[thisKey] = newProps[thisKey];
669
+ }
670
+ }
671
+ return props;
672
+ }
673
+
674
+ /**
675
+ * ReactPropTransferer are capable of transferring props to another component
676
+ * using a `transferPropsTo` method.
677
+ *
678
+ * @class ReactPropTransferer
679
+ */
680
+ var ReactPropTransferer = {
681
+
682
+ /**
683
+ * Merge two props objects using TransferStrategies.
684
+ *
685
+ * @param {object} oldProps original props (they take precedence)
686
+ * @param {object} newProps new props to merge in
687
+ * @return {object} a new object containing both sets of props merged.
688
+ */
689
+ mergeProps: function (oldProps, newProps) {
690
+ return transferInto(assign({}, oldProps), newProps);
691
+ }
692
+
693
+ };
694
+
695
+ module.exports = ReactPropTransferer;
696
+
697
+ /***/ },
698
+ /* 9 */
699
+ /***/ function(module, exports) {
700
+
701
+ /**
702
+ * Copyright 2013-2015, Facebook, Inc.
703
+ * All rights reserved.
704
+ *
705
+ * This source code is licensed under the BSD-style license found in the
706
+ * LICENSE file in the root directory of this source tree. An additional grant
707
+ * of patent rights can be found in the PATENTS file in the same directory.
708
+ *
709
+ * @providesModule emptyFunction
710
+ */
711
+
712
+ "use strict";
713
+
714
+ function makeEmptyFunction(arg) {
715
+ return function () {
716
+ return arg;
717
+ };
718
+ }
719
+
720
+ /**
721
+ * This function accepts and discards inputs; it has no side effects. This is
722
+ * primarily useful idiomatically for overridable function endpoints which
723
+ * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
724
+ */
725
+ function emptyFunction() {}
726
+
727
+ emptyFunction.thatReturns = makeEmptyFunction;
728
+ emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
729
+ emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
730
+ emptyFunction.thatReturnsNull = makeEmptyFunction(null);
731
+ emptyFunction.thatReturnsThis = function () {
732
+ return this;
733
+ };
734
+ emptyFunction.thatReturnsArgument = function (arg) {
735
+ return arg;
736
+ };
737
+
738
+ module.exports = emptyFunction;
739
+
740
+ /***/ },
741
+ /* 10 */
742
+ /***/ function(module, exports) {
743
+
744
+ /**
745
+ * Copyright 2013-2015, Facebook, Inc.
746
+ * All rights reserved.
747
+ *
748
+ * This source code is licensed under the BSD-style license found in the
749
+ * LICENSE file in the root directory of this source tree. An additional grant
750
+ * of patent rights can be found in the PATENTS file in the same directory.
751
+ *
752
+ * @providesModule joinClasses
753
+ * @typechecks static-only
754
+ */
755
+
756
+ 'use strict';
757
+
758
+ /**
759
+ * Combines multiple className strings into one.
760
+ * http://jsperf.com/joinclasses-args-vs-array
761
+ *
762
+ * @param {...?string} className
763
+ * @return {string}
764
+ */
765
+ function joinClasses(className /*, ... */) {
766
+ if (!className) {
767
+ className = '';
768
+ }
769
+ var nextClass;
770
+ var argLength = arguments.length;
771
+ if (argLength > 1) {
772
+ for (var ii = 1; ii < argLength; ii++) {
773
+ nextClass = arguments[ii];
774
+ if (nextClass) {
775
+ className = (className ? className + ' ' : '') + nextClass;
776
+ }
777
+ }
778
+ }
779
+ return className;
780
+ }
781
+
782
+ module.exports = joinClasses;
783
+
784
+ /***/ },
785
+ /* 11 */
786
+ /***/ function(module, exports) {
787
+
788
+ /**
789
+ * Copyright 2013-2015, Facebook, Inc.
790
+ * All rights reserved.
791
+ *
792
+ * This source code is licensed under the BSD-style license found in the
793
+ * LICENSE file in the root directory of this source tree. An additional grant
794
+ * of patent rights can be found in the PATENTS file in the same directory.
795
+ *
796
+ * @providesModule keyOf
797
+ */
798
+
799
+ /**
800
+ * Allows extraction of a minified key. Let's the build system minify keys
801
+ * without losing the ability to dynamically use key strings as values
802
+ * themselves. Pass in an object with a single key/val pair and it will return
803
+ * you the string key of that single record. Suppose you want to grab the
804
+ * value for a key 'className' inside of an object. Key/val minification may
805
+ * have aliased that key to be 'xa12'. keyOf({className: null}) will return
806
+ * 'xa12' in that case. Resolve keys you want to use once at startup time, then
807
+ * reuse those resolutions.
808
+ */
809
+ "use strict";
810
+
811
+ var keyOf = function (oneKeyObj) {
812
+ var key;
813
+ for (key in oneKeyObj) {
814
+ if (!oneKeyObj.hasOwnProperty(key)) {
815
+ continue;
816
+ }
817
+ return key;
818
+ }
819
+ return null;
820
+ };
821
+
822
+ module.exports = keyOf;
823
+
824
+ /***/ },
825
+ /* 12 */
826
+ /***/ function(module, exports, __webpack_require__) {
827
+
828
+ /* WEBPACK VAR INJECTION */(function(process) {/**
829
+ * Copyright 2014-2015, Facebook, Inc.
830
+ * All rights reserved.
831
+ *
832
+ * This source code is licensed under the BSD-style license found in the
833
+ * LICENSE file in the root directory of this source tree. An additional grant
834
+ * of patent rights can be found in the PATENTS file in the same directory.
835
+ *
836
+ * @providesModule warning
837
+ */
838
+
839
+ 'use strict';
840
+
841
+ var emptyFunction = __webpack_require__(9);
842
+
843
+ /**
844
+ * Similar to invariant but only logs a warning if the condition is not met.
845
+ * This can be used to log issues in development environments in critical
846
+ * paths. Removing the logging code for production environments will keep the
847
+ * same logic and follow the same code paths.
848
+ */
849
+
850
+ var warning = emptyFunction;
851
+
852
+ if (process.env.NODE_ENV !== 'production') {
853
+ warning = function (condition, format) {
854
+ for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
855
+ args[_key - 2] = arguments[_key];
856
+ }
857
+
858
+ if (format === undefined) {
859
+ throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
860
+ }
861
+
862
+ if (format.indexOf('Failed Composite propType: ') === 0) {
863
+ return; // Ignore CompositeComponent proptype check.
864
+ }
865
+
866
+ if (!condition) {
867
+ var argIndex = 0;
868
+ var message = 'Warning: ' + format.replace(/%s/g, function () {
869
+ return args[argIndex++];
870
+ });
871
+ if (typeof console !== 'undefined') {
872
+ console.error(message);
873
+ }
874
+ try {
875
+ // --- Welcome to debugging React ---
876
+ // This error was thrown as a convenience so that you can use this stack
877
+ // to find the callsite that caused this warning to fire.
878
+ throw new Error(message);
879
+ } catch (x) {}
880
+ }
881
+ };
882
+ }
883
+
884
+ module.exports = warning;
885
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
886
+
887
+ /***/ }
888
+ /******/ ]);