77exports [ "ReactRailsUJS" ] = factory ( require ( "react" ) , require ( "react-dom" ) , require ( "react-dom/server" ) ) ;
88else
99root [ "ReactRailsUJS" ] = factory ( root [ "React" ] , root [ "ReactDOM" ] , root [ "ReactDOMServer" ] ) ;
10- } ) ( this , function ( __WEBPACK_EXTERNAL_MODULE_3__ , __WEBPACK_EXTERNAL_MODULE_4__ , __WEBPACK_EXTERNAL_MODULE_5__ ) {
10+ } ) ( this , function ( __WEBPACK_EXTERNAL_MODULE_4__ , __WEBPACK_EXTERNAL_MODULE_5__ , __WEBPACK_EXTERNAL_MODULE_6__ ) {
1111return /******/ ( function ( modules ) { // webpackBootstrap
1212/******/ // The module cache
1313/******/ var installedModules = { } ;
@@ -73,7 +73,7 @@ return /******/ (function(modules) { // webpackBootstrap
7373/******/ __webpack_require__ . p = "" ;
7474/******/
7575/******/ // Load entry module and return exports
76- /******/ return __webpack_require__ ( __webpack_require__ . s = 6 ) ;
76+ /******/ return __webpack_require__ ( __webpack_require__ . s = 7 ) ;
7777/******/ } )
7878/************************************************************************/
7979/******/ ( [
@@ -106,13 +106,43 @@ module.exports = function(className) {
106106
107107/***/ } ) ,
108108/* 1 */
109+ /***/ ( function ( module , exports ) {
110+
111+ // Load React components by requiring them from "components/", for example:
112+ //
113+ // - "pages/index" -> `require("components/pages/index")`
114+ // - "pages/show.Header" -> `require("components/pages/show").Header`
115+ // - "pages/show.Body.Content" -> `require("components/pages/show").Body.Content`
116+ //
117+ module . exports = function ( reqctx ) {
118+ return function ( className ) {
119+ var parts = className . split ( "." )
120+ var filename = parts . shift ( )
121+ var keys = parts
122+ // Load the module:
123+ var component = reqctx ( "./" + filename )
124+ // Then access each key:
125+ keys . forEach ( function ( k ) {
126+ component = component [ k ]
127+ } )
128+ // support `export default`
129+ if ( component . __esModule ) {
130+ component = component [ "default" ]
131+ }
132+ return component
133+ }
134+ }
135+
136+
137+ /***/ } ) ,
138+ /* 2 */
109139/***/ ( function ( module , exports , __webpack_require__ ) {
110140
111- var nativeEvents = __webpack_require__ ( 7 )
112- var pjaxEvents = __webpack_require__ ( 8 )
113- var turbolinksEvents = __webpack_require__ ( 9 )
114- var turbolinksClassicDeprecatedEvents = __webpack_require__ ( 11 )
115- var turbolinksClassicEvents = __webpack_require__ ( 10 )
141+ var nativeEvents = __webpack_require__ ( 8 )
142+ var pjaxEvents = __webpack_require__ ( 9 )
143+ var turbolinksEvents = __webpack_require__ ( 10 )
144+ var turbolinksClassicDeprecatedEvents = __webpack_require__ ( 12 )
145+ var turbolinksClassicEvents = __webpack_require__ ( 11 )
116146
117147// see what things are globally available
118148// and setup event handlers to those things
@@ -164,14 +194,14 @@ module.exports = function(ujs) {
164194
165195
166196/***/ } ) ,
167- /* 2 */
197+ /* 3 */
168198/***/ ( function ( module , exports , __webpack_require__ ) {
169199
170200// Make a function which:
171201// - First tries to require the name
172202// - Then falls back to global lookup
173203var fromGlobal = __webpack_require__ ( 0 )
174- var fromRequireContext = __webpack_require__ ( 12 )
204+ var fromRequireContext = __webpack_require__ ( 1 )
175205
176206module . exports = function ( reqctx ) {
177207 var fromCtx = fromRequireContext ( reqctx )
@@ -194,12 +224,6 @@ module.exports = function(reqctx) {
194224}
195225
196226
197- /***/ } ) ,
198- /* 3 */
199- /***/ ( function ( module , exports ) {
200-
201- module . exports = __WEBPACK_EXTERNAL_MODULE_3__ ;
202-
203227/***/ } ) ,
204228/* 4 */
205229/***/ ( function ( module , exports ) {
@@ -214,15 +238,22 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_5__;
214238
215239/***/ } ) ,
216240/* 6 */
241+ /***/ ( function ( module , exports ) {
242+
243+ module . exports = __WEBPACK_EXTERNAL_MODULE_6__ ;
244+
245+ /***/ } ) ,
246+ /* 7 */
217247/***/ ( function ( module , exports , __webpack_require__ ) {
218248
219- var React = __webpack_require__ ( 3 )
220- var ReactDOM = __webpack_require__ ( 4 )
221- var ReactDOMServer = __webpack_require__ ( 5 )
249+ var React = __webpack_require__ ( 4 )
250+ var ReactDOM = __webpack_require__ ( 5 )
251+ var ReactDOMServer = __webpack_require__ ( 6 )
222252
223- var detectEvents = __webpack_require__ ( 1 )
253+ var detectEvents = __webpack_require__ ( 2 )
224254var constructorFromGlobal = __webpack_require__ ( 0 )
225- var constructorFromRequireContextWithGlobalFallback = __webpack_require__ ( 2 )
255+ var constructorFromRequireContext = __webpack_require__ ( 1 )
256+ var constructorFromRequireContextWithGlobalFallback = __webpack_require__ ( 3 )
226257
227258var ReactRailsUJS = {
228259 // This attribute holds the name of component which should be mounted
@@ -283,6 +314,11 @@ var ReactRailsUJS = {
283314 // the default is ReactRailsUJS.ComponentGlobal
284315 getConstructor : constructorFromGlobal ,
285316
317+ // Available for customizing `getConstructor`
318+ constructorFromGlobal : constructorFromGlobal ,
319+ constructorFromRequireContext : constructorFromRequireContext ,
320+ constructorFromRequireContextWithGlobalFallback : constructorFromRequireContextWithGlobalFallback ,
321+
286322 // Given a Webpack `require.context`,
287323 // try finding components with `require`,
288324 // then falling back to global lookup.
@@ -356,6 +392,7 @@ var ReactRailsUJS = {
356392 detectEvents : function ( ) {
357393 detectEvents ( this )
358394 } ,
395+
359396}
360397
361398// These stable references are so that handlers can be added and removed:
@@ -390,7 +427,7 @@ module.exports = ReactRailsUJS
390427
391428
392429/***/ } ) ,
393- /* 7 */
430+ /* 8 */
394431/***/ ( function ( module , exports ) {
395432
396433module . exports = {
@@ -413,7 +450,7 @@ module.exports = {
413450
414451
415452/***/ } ) ,
416- /* 8 */
453+ /* 9 */
417454/***/ ( function ( module , exports ) {
418455
419456module . exports = {
@@ -433,7 +470,7 @@ module.exports = {
433470
434471
435472/***/ } ) ,
436- /* 9 */
473+ /* 10 */
437474/***/ ( function ( module , exports ) {
438475
439476module . exports = {
@@ -451,7 +488,7 @@ module.exports = {
451488
452489
453490/***/ } ) ,
454- /* 10 */
491+ /* 11 */
455492/***/ ( function ( module , exports ) {
456493
457494module . exports = {
@@ -469,7 +506,7 @@ module.exports = {
469506
470507
471508/***/ } ) ,
472- /* 11 */
509+ /* 12 */
473510/***/ ( function ( module , exports ) {
474511
475512module . exports = {
@@ -489,36 +526,6 @@ module.exports = {
489526}
490527
491528
492- /***/ } ) ,
493- /* 12 */
494- /***/ ( function ( module , exports ) {
495-
496- // Load React components by requiring them from "components/", for example:
497- //
498- // - "pages/index" -> `require("components/pages/index")`
499- // - "pages/show.Header" -> `require("components/pages/show").Header`
500- // - "pages/show.Body.Content" -> `require("components/pages/show").Body.Content`
501- //
502- module . exports = function ( reqctx ) {
503- return function ( className ) {
504- var parts = className . split ( "." )
505- var filename = parts . shift ( )
506- var keys = parts
507- // Load the module:
508- var component = reqctx ( "./" + filename )
509- // Then access each key:
510- keys . forEach ( function ( k ) {
511- component = component [ k ]
512- } )
513- // support `export default`
514- if ( component . __esModule ) {
515- component = component [ "default" ]
516- }
517- return component
518- }
519- }
520-
521-
522529/***/ } )
523530/******/ ] ) ;
524531} ) ;
0 commit comments