lanes 0.6.1 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/client/lanes/Config.coffee +26 -9
  3. data/client/lanes/access/screens/user-management/UserManagement.cjsx +1 -1
  4. data/client/lanes/components/grid/EditingMixin.cjsx +8 -4
  5. data/client/lanes/components/grid/PopOverMixin.cjsx +7 -1
  6. data/client/lanes/components/modal/Modal.cjsx +11 -1
  7. data/client/lanes/components/record-finder/RecordFinder.cjsx +8 -4
  8. data/client/lanes/components/shared/DateTime.cjsx +8 -6
  9. data/client/lanes/components/shared/FieldMixin.cjsx +3 -3
  10. data/client/lanes/components/shared/Icon.cjsx +1 -1
  11. data/client/lanes/components/shared/ImageAsset.cjsx +23 -11
  12. data/client/lanes/components/shared/NetworkActivityOverlay.cjsx +2 -0
  13. data/client/lanes/extension/Base.coffee +2 -0
  14. data/client/lanes/fonts/fontawesome-webfont.woff +0 -0
  15. data/client/lanes/fonts/fontawesome-webfont.woff2 +0 -0
  16. data/client/lanes/lib/RequestAssets.coffee +30 -0
  17. data/client/lanes/lib/all.js +1 -0
  18. data/client/lanes/lib/loader.js +93 -0
  19. data/client/lanes/lib/utilFunctions.coffee +12 -0
  20. data/client/lanes/models/Asset.coffee +3 -4
  21. data/client/lanes/models/AssociationMap.coffee +17 -6
  22. data/client/lanes/models/Base.coffee +20 -13
  23. data/client/lanes/models/Collection.coffee +4 -1
  24. data/client/lanes/models/PubSub.coffee +2 -3
  25. data/client/lanes/models/SmtpSettings.coffee +7 -0
  26. data/client/lanes/models/Sync.coffee +2 -2
  27. data/client/lanes/react/Viewport.coffee +14 -10
  28. data/client/lanes/react/mixins/FieldErrors.coffee +3 -4
  29. data/client/lanes/react/mixins/ReadEditingState.coffee +1 -0
  30. data/client/lanes/remote/Bootstrap.coffee +85 -0
  31. data/client/lanes/remote/api.coffee +2 -1
  32. data/client/lanes/remote/onDocumentReady.coffee +12 -0
  33. data/client/lanes/screens/Definitions.coffee +29 -12
  34. data/client/lanes/screens/SystemSettings.cjsx +12 -3
  35. data/client/lanes/styles/fonts/_bordered-pulled.scss +9 -0
  36. data/client/lanes/styles/fonts/_core.scss +1 -2
  37. data/client/lanes/styles/fonts/_icons.scss +56 -0
  38. data/client/lanes/styles/fonts/_mixins.scss +37 -4
  39. data/client/lanes/styles/fonts/_path.scss +2 -2
  40. data/client/lanes/styles/fonts/_screen-reader.scss +5 -0
  41. data/client/lanes/styles/fonts/_variables.scss +58 -2
  42. data/client/lanes/styles/fonts/font-awesome.scss +3 -1
  43. data/client/lanes/vendor/development/calendar.js +56 -57
  44. data/client/lanes/vendor/development/commons.js +31319 -29618
  45. data/client/lanes/vendor/development/data.js +8468 -7607
  46. data/client/lanes/vendor/development/helpers.js +265 -131
  47. data/client/lanes/vendor/development/toggle.js +288 -184
  48. data/client/lanes/vendor/development/ui.js +3387 -3492
  49. data/client/lanes/vendor/development/widgets.js +972 -1229
  50. data/client/lanes/vendor/production/calendar.js +60 -61
  51. data/client/lanes/vendor/production/commons.js +30695 -29032
  52. data/client/lanes/vendor/production/data.js +8457 -7598
  53. data/client/lanes/vendor/production/toggle.js +288 -184
  54. data/client/lanes/vendor/production/ui.js +3264 -3373
  55. data/client/lanes/vendor/production/widgets.js +972 -1229
  56. data/client/lanes/vendor/standalone/index.js +21106 -18761
  57. data/client/lanes/vendor/styles/toggle.scss +4 -3
  58. data/client/lanes/workspace/ScreenView.cjsx +2 -2
  59. data/client/lanes/workspace/styles/header.scss +4 -0
  60. data/config/routes.rb +0 -2
  61. data/db/migrate/01_create_system_settings.rb +1 -1
  62. data/db/migrate/02_create_assets.rb +1 -1
  63. data/lanes.gemspec +1 -0
  64. data/lib/lanes.rb +1 -0
  65. data/lib/lanes/access/track_modifications.rb +4 -2
  66. data/lib/lanes/api.rb +1 -0
  67. data/lib/lanes/api/cable.rb +11 -3
  68. data/lib/lanes/api/controller_base.rb +23 -19
  69. data/lib/lanes/api/default_routes.rb +9 -1
  70. data/lib/lanes/api/generic_controller.rb +1 -1
  71. data/lib/lanes/api/handlers/asset.rb +2 -3
  72. data/lib/lanes/api/helper_methods.rb +5 -11
  73. data/lib/lanes/api/pub_sub.rb +13 -7
  74. data/lib/lanes/api/request_wrapper.rb +1 -1
  75. data/lib/lanes/api/routing.rb +10 -7
  76. data/lib/lanes/api/to_json.rb +7 -0
  77. data/lib/lanes/asset.rb +4 -1
  78. data/lib/lanes/concerns/set_attribute_data.rb +2 -1
  79. data/lib/lanes/extension.rb +3 -1
  80. data/lib/lanes/mailer.rb +40 -0
  81. data/lib/lanes/rake_tasks.rb +4 -0
  82. data/lib/lanes/spec_helper.rb +11 -3
  83. data/lib/lanes/system_settings.rb +22 -9
  84. data/lib/lanes/version.rb +1 -1
  85. data/lib/lanes/workspace/extension.rb +5 -0
  86. data/npm-build/package.json +2 -2
  87. data/npm-build/react-toggle.js +1 -1
  88. data/npm-build/standalone.js +3 -0
  89. data/spec/command-reference-files/initial/Gemfile +1 -1
  90. data/spec/command-reference-files/initial/client/appy-app/Extension.coffee +2 -1
  91. data/spec/command-reference-files/model/db/migrate/20150218032025_create_test_tests.rb +1 -1
  92. data/spec/command-reference-files/screen/client/appy-app/Extension.coffee +2 -1
  93. data/spec/fixtures/system_settings.yml +8 -1
  94. data/spec/server/mailer_spec.rb +33 -0
  95. data/spec/server/system_settings_spec.rb +16 -0
  96. data/templates/client/Extension.coffee +2 -1
  97. data/templates/config/database.yml +1 -1
  98. data/templates/db/create_table_migration.rb +1 -1
  99. metadata +27 -6
  100. data/client/fonts/fontawesome-webfont.woff +0 -0
  101. data/client/fonts/fontawesome-webfont.woff2 +0 -0
  102. data/client/lanes/lib/loader.coffee +0 -100
  103. data/client/lanes/workspace/Modal.cjsx +0 -47
@@ -9,21 +9,21 @@ webpackJsonp([2],{
9
9
  // "react-proxy": "git@github.com:gaearon/react-proxy.git#react-0.15",
10
10
  // Lanes.Vendor.ReactProxy = require("react-proxy");
11
11
 
12
- Lanes.Vendor.ReactTestUtils = __webpack_require__(693);
13
- Lanes.Vendor.deepForceUpdate = __webpack_require__(695);
12
+ Lanes.Vendor.ReactTestUtils = __webpack_require__(732);
13
+ Lanes.Vendor.deepForceUpdate = __webpack_require__(736);
14
14
 
15
15
  /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
16
16
 
17
17
  /***/ },
18
18
 
19
- /***/ 693:
19
+ /***/ 732:
20
20
  /***/ function(module, exports, __webpack_require__) {
21
21
 
22
- module.exports = __webpack_require__(694);
22
+ module.exports = __webpack_require__(733);
23
23
 
24
24
  /***/ },
25
25
 
26
- /***/ 694:
26
+ /***/ 733:
27
27
  /***/ function(module, exports, __webpack_require__) {
28
28
 
29
29
  /**
@@ -34,33 +34,27 @@ webpackJsonp([2],{
34
34
  * LICENSE file in the root directory of this source tree. An additional grant
35
35
  * of patent rights can be found in the PATENTS file in the same directory.
36
36
  *
37
- * @providesModule ReactTestUtils
38
37
  */
39
38
 
40
39
  'use strict';
41
40
 
42
- var _prodInvariant = __webpack_require__(16),
41
+ var _prodInvariant = __webpack_require__(220),
43
42
  _assign = __webpack_require__(13);
44
43
 
45
- var EventConstants = __webpack_require__(276);
46
- var EventPluginHub = __webpack_require__(278);
47
- var EventPluginRegistry = __webpack_require__(279);
48
- var EventPropagators = __webpack_require__(277);
44
+ var EventConstants = __webpack_require__(734);
45
+ var EventPluginHub = __webpack_require__(227);
46
+ var EventPluginRegistry = __webpack_require__(228);
47
+ var EventPropagators = __webpack_require__(226);
49
48
  var React = __webpack_require__(12);
50
- var ReactDefaultInjection = __webpack_require__(274);
51
- var ReactDOM = __webpack_require__(270);
52
- var ReactDOMComponentTree = __webpack_require__(271);
53
- var ReactElement = __webpack_require__(18);
54
- var ReactBrowserEventEmitter = __webpack_require__(345);
55
- var ReactCompositeComponent = __webpack_require__(360);
56
- var ReactInstanceMap = __webpack_require__(357);
57
- var ReactInstrumentation = __webpack_require__(297);
58
- var ReactReconciler = __webpack_require__(294);
59
- var ReactUpdates = __webpack_require__(291);
60
- var SyntheticEvent = __webpack_require__(288);
61
-
62
- var emptyObject = __webpack_require__(28);
63
- var findDOMNode = __webpack_require__(405);
49
+ var ReactDOM = __webpack_require__(218);
50
+ var ReactDOMComponentTree = __webpack_require__(219);
51
+ var ReactBrowserEventEmitter = __webpack_require__(290);
52
+ var ReactInstanceMap = __webpack_require__(301);
53
+ var ReactUpdates = __webpack_require__(241);
54
+ var SyntheticEvent = __webpack_require__(238);
55
+ var ReactShallowRenderer = __webpack_require__(735);
56
+
57
+ var findDOMNode = __webpack_require__(357);
64
58
  var invariant = __webpack_require__(17);
65
59
 
66
60
  var topLevelTypes = EventConstants.topLevelTypes;
@@ -87,7 +81,7 @@ webpackJsonp([2],{
87
81
  }
88
82
  ret = ret.concat(findAllInRenderedTreeInternal(renderedChildren[key], test));
89
83
  }
90
- } else if (ReactElement.isValidElement(currentElement) && typeof currentElement.type === 'function') {
84
+ } else if (React.isValidElement(currentElement) && typeof currentElement.type === 'function') {
91
85
  ret = ret.concat(findAllInRenderedTreeInternal(inst._renderedComponent, test));
92
86
  }
93
87
  return ret;
@@ -103,22 +97,22 @@ webpackJsonp([2],{
103
97
  * @lends ReactTestUtils
104
98
  */
105
99
  var ReactTestUtils = {
106
- renderIntoDocument: function (instance) {
100
+ renderIntoDocument: function (element) {
107
101
  var div = document.createElement('div');
108
102
  // None of our tests actually require attaching the container to the
109
103
  // DOM, and doing so creates a mess that we rely on test isolation to
110
104
  // clean up, so we're going to stop honoring the name of this method
111
105
  // (and probably rename it eventually) if no problems arise.
112
106
  // document.documentElement.appendChild(div);
113
- return ReactDOM.render(instance, div);
107
+ return ReactDOM.render(element, div);
114
108
  },
115
109
 
116
110
  isElement: function (element) {
117
- return ReactElement.isValidElement(element);
111
+ return React.isValidElement(element);
118
112
  },
119
113
 
120
114
  isElementOfType: function (inst, convenienceConstructor) {
121
- return ReactElement.isValidElement(inst) && inst.type === convenienceConstructor;
115
+ return React.isValidElement(inst) && inst.type === convenienceConstructor;
122
116
  },
123
117
 
124
118
  isDOMComponent: function (inst) {
@@ -126,7 +120,7 @@ webpackJsonp([2],{
126
120
  },
127
121
 
128
122
  isDOMComponentElement: function (inst) {
129
- return !!(inst && ReactElement.isValidElement(inst) && !!inst.tagName);
123
+ return !!(inst && React.isValidElement(inst) && !!inst.tagName);
130
124
  },
131
125
 
132
126
  isCompositeComponent: function (inst) {
@@ -149,7 +143,7 @@ webpackJsonp([2],{
149
143
  },
150
144
 
151
145
  isCompositeComponentElement: function (inst) {
152
- if (!ReactElement.isValidElement(inst)) {
146
+ if (!React.isValidElement(inst)) {
153
147
  return false;
154
148
  }
155
149
  // We check the prototype of the type that will get mounted, not the
@@ -331,105 +325,6 @@ webpackJsonp([2],{
331
325
  SimulateNative: {}
332
326
  };
333
327
 
334
- /**
335
- * @class ReactShallowRenderer
336
- */
337
- var ReactShallowRenderer = function () {
338
- this._instance = null;
339
- };
340
-
341
- ReactShallowRenderer.prototype.getMountedInstance = function () {
342
- return this._instance ? this._instance._instance : null;
343
- };
344
-
345
- var nextDebugID = 1;
346
-
347
- var NoopInternalComponent = function (element) {
348
- this._renderedOutput = element;
349
- this._currentElement = element;
350
- this._debugID = nextDebugID++;
351
- };
352
-
353
- NoopInternalComponent.prototype = {
354
-
355
- mountComponent: function () {},
356
-
357
- receiveComponent: function (element) {
358
- this._renderedOutput = element;
359
- this._currentElement = element;
360
- },
361
-
362
- getHostNode: function () {
363
- return undefined;
364
- },
365
-
366
- unmountComponent: function () {},
367
-
368
- getPublicInstance: function () {
369
- return null;
370
- }
371
- };
372
-
373
- var ShallowComponentWrapper = function (element) {
374
- // TODO: Consolidate with instantiateReactComponent
375
- this._debugID = nextDebugID++;
376
- var displayName = element.type.displayName || element.type.name || 'Unknown';
377
- ReactInstrumentation.debugTool.onSetDisplayName(this._debugID, displayName);
378
-
379
- this.construct(element);
380
- };
381
- _assign(ShallowComponentWrapper.prototype, ReactCompositeComponent.Mixin, {
382
- _constructComponent: ReactCompositeComponent.Mixin._constructComponentWithoutOwner,
383
- _instantiateReactComponent: function (element) {
384
- return new NoopInternalComponent(element);
385
- },
386
- _replaceNodeWithMarkup: function () {},
387
- _renderValidatedComponent: ReactCompositeComponent.Mixin._renderValidatedComponentWithoutOwnerOrContext
388
- });
389
-
390
- ReactShallowRenderer.prototype.render = function (element, context) {
391
- // Ensure we've done the default injections. This might not be true in the
392
- // case of a simple test that only requires React and the TestUtils in
393
- // conjunction with an inline-requires transform.
394
- ReactDefaultInjection.inject();
395
-
396
- !ReactElement.isValidElement(element) ? true ? invariant(false, 'ReactShallowRenderer render(): Invalid component element.%s', typeof element === 'function' ? ' Instead of passing a component class, make sure to instantiate ' + 'it by passing it to React.createElement.' : '') : _prodInvariant('12', typeof element === 'function' ? ' Instead of passing a component class, make sure to instantiate ' + 'it by passing it to React.createElement.' : '') : void 0;
397
- !(typeof element.type !== 'string') ? true ? invariant(false, 'ReactShallowRenderer render(): Shallow rendering works only with custom components, not primitives (%s). Instead of calling `.render(el)` and inspecting the rendered output, look at `el.props` directly instead.', element.type) : _prodInvariant('13', element.type) : void 0;
398
-
399
- if (!context) {
400
- context = emptyObject;
401
- }
402
- ReactUpdates.batchedUpdates(_batchedRender, this, element, context);
403
-
404
- return this.getRenderOutput();
405
- };
406
-
407
- function _batchedRender(renderer, element, context) {
408
- var transaction = ReactUpdates.ReactReconcileTransaction.getPooled(true);
409
- renderer._render(element, transaction, context);
410
- ReactUpdates.ReactReconcileTransaction.release(transaction);
411
- }
412
-
413
- ReactShallowRenderer.prototype.getRenderOutput = function () {
414
- return this._instance && this._instance._renderedComponent && this._instance._renderedComponent._renderedOutput || null;
415
- };
416
-
417
- ReactShallowRenderer.prototype.unmount = function () {
418
- if (this._instance) {
419
- ReactReconciler.unmountComponent(this._instance, false);
420
- }
421
- };
422
-
423
- ReactShallowRenderer.prototype._render = function (element, transaction, context) {
424
- if (this._instance) {
425
- ReactReconciler.receiveComponent(this._instance, element, transaction, context);
426
- } else {
427
- var instance = new ShallowComponentWrapper(element);
428
- ReactReconciler.mountComponent(instance, transaction, null, null, context);
429
- this._instance = instance;
430
- }
431
- };
432
-
433
328
  /**
434
329
  * Exports:
435
330
  *
@@ -452,6 +347,8 @@ webpackJsonp([2],{
452
347
 
453
348
  var fakeNativeEvent = new Event();
454
349
  fakeNativeEvent.target = node;
350
+ fakeNativeEvent.type = eventType.toLowerCase();
351
+
455
352
  // We don't use SyntheticEvent.getPooled in order to not have to worry about
456
353
  // properly destroying any properties assigned from `eventData` upon release
457
354
  var event = new SyntheticEvent(dispatchConfig, ReactDOMComponentTree.getInstanceFromNode(node), fakeNativeEvent, node);
@@ -541,6 +438,243 @@ webpackJsonp([2],{
541
438
 
542
439
  module.exports = ReactTestUtils;
543
440
 
441
+ /***/ },
442
+
443
+ /***/ 734:
444
+ /***/ function(module, exports) {
445
+
446
+ /**
447
+ * Copyright 2013-present, Facebook, Inc.
448
+ * All rights reserved.
449
+ *
450
+ * This source code is licensed under the BSD-style license found in the
451
+ * LICENSE file in the root directory of this source tree. An additional grant
452
+ * of patent rights can be found in the PATENTS file in the same directory.
453
+ *
454
+ */
455
+
456
+ 'use strict';
457
+
458
+ /**
459
+ * Types of raw signals from the browser caught at the top level.
460
+ */
461
+ var topLevelTypes = {
462
+ topAbort: null,
463
+ topAnimationEnd: null,
464
+ topAnimationIteration: null,
465
+ topAnimationStart: null,
466
+ topBlur: null,
467
+ topCanPlay: null,
468
+ topCanPlayThrough: null,
469
+ topChange: null,
470
+ topClick: null,
471
+ topCompositionEnd: null,
472
+ topCompositionStart: null,
473
+ topCompositionUpdate: null,
474
+ topContextMenu: null,
475
+ topCopy: null,
476
+ topCut: null,
477
+ topDoubleClick: null,
478
+ topDrag: null,
479
+ topDragEnd: null,
480
+ topDragEnter: null,
481
+ topDragExit: null,
482
+ topDragLeave: null,
483
+ topDragOver: null,
484
+ topDragStart: null,
485
+ topDrop: null,
486
+ topDurationChange: null,
487
+ topEmptied: null,
488
+ topEncrypted: null,
489
+ topEnded: null,
490
+ topError: null,
491
+ topFocus: null,
492
+ topInput: null,
493
+ topInvalid: null,
494
+ topKeyDown: null,
495
+ topKeyPress: null,
496
+ topKeyUp: null,
497
+ topLoad: null,
498
+ topLoadedData: null,
499
+ topLoadedMetadata: null,
500
+ topLoadStart: null,
501
+ topMouseDown: null,
502
+ topMouseMove: null,
503
+ topMouseOut: null,
504
+ topMouseOver: null,
505
+ topMouseUp: null,
506
+ topPaste: null,
507
+ topPause: null,
508
+ topPlay: null,
509
+ topPlaying: null,
510
+ topProgress: null,
511
+ topRateChange: null,
512
+ topReset: null,
513
+ topScroll: null,
514
+ topSeeked: null,
515
+ topSeeking: null,
516
+ topSelectionChange: null,
517
+ topStalled: null,
518
+ topSubmit: null,
519
+ topSuspend: null,
520
+ topTextInput: null,
521
+ topTimeUpdate: null,
522
+ topTouchCancel: null,
523
+ topTouchEnd: null,
524
+ topTouchMove: null,
525
+ topTouchStart: null,
526
+ topTransitionEnd: null,
527
+ topVolumeChange: null,
528
+ topWaiting: null,
529
+ topWheel: null
530
+ };
531
+
532
+ var EventConstants = {
533
+ topLevelTypes: topLevelTypes
534
+ };
535
+
536
+ module.exports = EventConstants;
537
+
538
+ /***/ },
539
+
540
+ /***/ 735:
541
+ /***/ function(module, exports, __webpack_require__) {
542
+
543
+ /**
544
+ * Copyright 2013-present, Facebook, Inc.
545
+ * All rights reserved.
546
+ *
547
+ * This source code is licensed under the BSD-style license found in the
548
+ * LICENSE file in the root directory of this source tree. An additional grant
549
+ * of patent rights can be found in the PATENTS file in the same directory.
550
+ *
551
+ */
552
+
553
+ 'use strict';
554
+
555
+ var _prodInvariant = __webpack_require__(220),
556
+ _assign = __webpack_require__(13);
557
+
558
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
559
+
560
+ var React = __webpack_require__(12);
561
+ var ReactDefaultInjection = __webpack_require__(223);
562
+ var ReactCompositeComponent = __webpack_require__(304);
563
+ var ReactReconciler = __webpack_require__(244);
564
+ var ReactUpdates = __webpack_require__(241);
565
+
566
+ var emptyObject = __webpack_require__(29);
567
+ var getNextDebugID = __webpack_require__(312);
568
+ var invariant = __webpack_require__(17);
569
+
570
+ var NoopInternalComponent = function () {
571
+ function NoopInternalComponent(element) {
572
+ _classCallCheck(this, NoopInternalComponent);
573
+
574
+ this._renderedOutput = element;
575
+ this._currentElement = element;
576
+
577
+ if (true) {
578
+ this._debugID = getNextDebugID();
579
+ }
580
+ }
581
+
582
+ NoopInternalComponent.prototype.mountComponent = function mountComponent() {};
583
+
584
+ NoopInternalComponent.prototype.receiveComponent = function receiveComponent(element) {
585
+ this._renderedOutput = element;
586
+ this._currentElement = element;
587
+ };
588
+
589
+ NoopInternalComponent.prototype.unmountComponent = function unmountComponent() {};
590
+
591
+ NoopInternalComponent.prototype.getHostNode = function getHostNode() {
592
+ return undefined;
593
+ };
594
+
595
+ NoopInternalComponent.prototype.getPublicInstance = function getPublicInstance() {
596
+ return null;
597
+ };
598
+
599
+ return NoopInternalComponent;
600
+ }();
601
+
602
+ var ShallowComponentWrapper = function (element) {
603
+ // TODO: Consolidate with instantiateReactComponent
604
+ if (true) {
605
+ this._debugID = getNextDebugID();
606
+ }
607
+
608
+ this.construct(element);
609
+ };
610
+ _assign(ShallowComponentWrapper.prototype, ReactCompositeComponent, {
611
+ _constructComponent: ReactCompositeComponent._constructComponentWithoutOwner,
612
+ _instantiateReactComponent: function (element) {
613
+ return new NoopInternalComponent(element);
614
+ },
615
+ _replaceNodeWithMarkup: function () {},
616
+ _renderValidatedComponent: ReactCompositeComponent._renderValidatedComponentWithoutOwnerOrContext
617
+ });
618
+
619
+ function _batchedRender(renderer, element, context) {
620
+ var transaction = ReactUpdates.ReactReconcileTransaction.getPooled(true);
621
+ renderer._render(element, transaction, context);
622
+ ReactUpdates.ReactReconcileTransaction.release(transaction);
623
+ }
624
+
625
+ var ReactShallowRenderer = function () {
626
+ function ReactShallowRenderer() {
627
+ _classCallCheck(this, ReactShallowRenderer);
628
+
629
+ this._instance = null;
630
+ }
631
+
632
+ ReactShallowRenderer.prototype.getMountedInstance = function getMountedInstance() {
633
+ return this._instance ? this._instance._instance : null;
634
+ };
635
+
636
+ ReactShallowRenderer.prototype.render = function render(element, context) {
637
+ // Ensure we've done the default injections. This might not be true in the
638
+ // case of a simple test that only requires React and the TestUtils in
639
+ // conjunction with an inline-requires transform.
640
+ ReactDefaultInjection.inject();
641
+
642
+ !React.isValidElement(element) ? true ? invariant(false, 'ReactShallowRenderer render(): Invalid component element.%s', typeof element === 'function' ? ' Instead of passing a component class, make sure to instantiate ' + 'it by passing it to React.createElement.' : '') : _prodInvariant('12', typeof element === 'function' ? ' Instead of passing a component class, make sure to instantiate ' + 'it by passing it to React.createElement.' : '') : void 0;
643
+ !(typeof element.type !== 'string') ? true ? invariant(false, 'ReactShallowRenderer render(): Shallow rendering works only with custom components, not primitives (%s). Instead of calling `.render(el)` and inspecting the rendered output, look at `el.props` directly instead.', element.type) : _prodInvariant('13', element.type) : void 0;
644
+
645
+ if (!context) {
646
+ context = emptyObject;
647
+ }
648
+ ReactUpdates.batchedUpdates(_batchedRender, this, element, context);
649
+
650
+ return this.getRenderOutput();
651
+ };
652
+
653
+ ReactShallowRenderer.prototype.getRenderOutput = function getRenderOutput() {
654
+ return this._instance && this._instance._renderedComponent && this._instance._renderedComponent._renderedOutput || null;
655
+ };
656
+
657
+ ReactShallowRenderer.prototype.unmount = function unmount() {
658
+ if (this._instance) {
659
+ ReactReconciler.unmountComponent(this._instance, false);
660
+ }
661
+ };
662
+
663
+ ReactShallowRenderer.prototype._render = function _render(element, transaction, context) {
664
+ if (this._instance) {
665
+ ReactReconciler.receiveComponent(this._instance, element, transaction, context);
666
+ } else {
667
+ var instance = new ShallowComponentWrapper(element);
668
+ ReactReconciler.mountComponent(instance, transaction, null, null, context, 0);
669
+ this._instance = instance;
670
+ }
671
+ };
672
+
673
+ return ReactShallowRenderer;
674
+ }();
675
+
676
+ module.exports = ReactShallowRenderer;
677
+
544
678
  /***/ }
545
679
 
546
680
  });