1
1
'use strict' ;
2
2
3
- var _interopRequireWildcard = function ( obj ) { if ( obj && obj . __esModule ) { return obj ; } else { var newObj = { } ; if ( typeof obj === 'object' && obj !== null ) { for ( var key in obj ) { if ( Object . prototype . hasOwnProperty . call ( obj , key ) ) newObj [ key ] = obj [ key ] ; } } newObj [ 'default' ] = obj ; return newObj ; } } ;
3
+ exports . __esModule = true ;
4
4
5
- var _interopRequireDefault = function ( obj ) { return obj && obj . __esModule ? obj : { 'default' : obj } ; } ;
5
+ function _interopRequireWildcard ( obj ) { if ( obj && obj . __esModule ) { return obj ; } else { var newObj = { } ; if ( obj != null ) { for ( var key in obj ) { if ( Object . prototype . hasOwnProperty . call ( obj , key ) ) newObj [ key ] = obj [ key ] ; } } newObj [ 'default' ] = obj ; return newObj ; } }
6
6
7
- var _classCallCheck = function ( instance , Constructor ) { if ( ! ( instance instanceof Constructor ) ) { throw new TypeError ( 'Cannot call a class as a function' ) ; } } ;
7
+ function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { 'default' : obj } ; }
8
8
9
- exports . __esModule = true ;
9
+ function _classCallCheck ( instance , Constructor ) { if ( ! ( instance instanceof Constructor ) ) { throw new TypeError ( 'Cannot call a class as a function' ) ; } }
10
10
11
- var _core = require ( 'core-js' ) ;
11
+ var _coreJs = require ( 'core-js' ) ;
12
12
13
- var _core2 = _interopRequireDefault ( _core ) ;
13
+ var _coreJs2 = _interopRequireDefault ( _coreJs ) ;
14
14
15
- var _import = require ( 'aurelia-logging' ) ;
15
+ var _aureliaLogging = require ( 'aurelia-logging' ) ;
16
16
17
- var LogManager = _interopRequireWildcard ( _import ) ;
17
+ var LogManager = _interopRequireWildcard ( _aureliaLogging ) ;
18
18
19
- var _Container = require ( 'aurelia-dependency-injection' ) ;
19
+ var _aureliaDependencyInjection = require ( 'aurelia-dependency-injection' ) ;
20
20
21
- var _Loader = require ( 'aurelia-loader' ) ;
21
+ var _aureliaLoader = require ( 'aurelia-loader' ) ;
22
22
23
- var _join$relativeToFile = require ( 'aurelia-path' ) ;
23
+ var _aureliaPath = require ( 'aurelia-path' ) ;
24
24
25
- var _Plugins = require ( './plugins' ) ;
25
+ var _plugins = require ( './plugins' ) ;
26
26
27
- var _BindingLanguage$ViewEngine$ViewSlot$ResourceRegistry$CompositionEngine$Animator = require ( 'aurelia-templating' ) ;
27
+ var _aureliaTemplating = require ( 'aurelia-templating' ) ;
28
28
29
29
var logger = LogManager . getLogger ( 'aurelia' ) ,
30
30
slice = Array . prototype . slice ;
@@ -58,7 +58,7 @@ function preventActionlessFormSubmit() {
58
58
}
59
59
60
60
function loadResources ( container , resourcesToLoad , appResources ) {
61
- var viewEngine = container . get ( _BindingLanguage$ViewEngine$ViewSlot$ResourceRegistry$CompositionEngine$Animator . ViewEngine ) ,
61
+ var viewEngine = container . get ( _aureliaTemplating . ViewEngine ) ,
62
62
importIds = Object . keys ( resourcesToLoad ) ,
63
63
names = new Array ( importIds . length ) ,
64
64
i ,
@@ -76,14 +76,14 @@ var Aurelia = (function () {
76
76
_classCallCheck ( this , Aurelia ) ;
77
77
78
78
this . loader = loader || new window . AureliaLoader ( ) ;
79
- this . container = container || new _Container . Container ( ) ;
80
- this . resources = resources || new _BindingLanguage$ViewEngine$ViewSlot$ResourceRegistry$CompositionEngine$Animator . ResourceRegistry ( ) ;
81
- this . use = new _Plugins . Plugins ( this ) ;
79
+ this . container = container || new _aureliaDependencyInjection . Container ( ) ;
80
+ this . resources = resources || new _aureliaTemplating . ResourceRegistry ( ) ;
81
+ this . use = new _plugins . Plugins ( this ) ;
82
82
this . resourcesToLoad = { } ;
83
83
84
84
this . withInstance ( Aurelia , this ) ;
85
- this . withInstance ( _Loader . Loader , this . loader ) ;
86
- this . withInstance ( _BindingLanguage$ViewEngine$ViewSlot$ResourceRegistry$CompositionEngine$Animator . ResourceRegistry , this . resources ) ;
85
+ this . withInstance ( _aureliaLoader . Loader , this . loader ) ;
86
+ this . withInstance ( _aureliaTemplating . ResourceRegistry , this . resources ) ;
87
87
}
88
88
89
89
Aurelia . prototype . withInstance = function withInstance ( type , instance ) {
@@ -111,7 +111,7 @@ var Aurelia = (function () {
111
111
throw new Error ( 'Invalid resource path [' + resource + ']. Resources must be specified as relative module IDs.' ) ;
112
112
}
113
113
114
- path = internalPlugin ? _join$relativeToFile . relativeToFile ( resource , pluginPath ) : _join$relativeToFile . join ( pluginPath , resource ) ;
114
+ path = internalPlugin ? ( 0 , _aureliaPath . relativeToFile ) ( resource , pluginPath ) : ( 0 , _aureliaPath . join ) ( pluginPath , resource ) ;
115
115
116
116
this . resourcesToLoad [ path ] = this . resourcesToLoad [ path ] ;
117
117
}
@@ -137,14 +137,14 @@ var Aurelia = (function () {
137
137
preventActionlessFormSubmit ( ) ;
138
138
139
139
return this . use . _process ( ) . then ( function ( ) {
140
- if ( ! _this . container . hasHandler ( _BindingLanguage$ViewEngine$ViewSlot$ResourceRegistry$CompositionEngine$Animator . BindingLanguage ) ) {
140
+ if ( ! _this . container . hasHandler ( _aureliaTemplating . BindingLanguage ) ) {
141
141
var message = 'You must configure Aurelia with a BindingLanguage implementation.' ;
142
142
logger . error ( message ) ;
143
143
throw new Error ( message ) ;
144
144
}
145
145
146
- if ( ! _this . container . hasHandler ( _BindingLanguage$ViewEngine$ViewSlot$ResourceRegistry$CompositionEngine$Animator . Animator ) ) {
147
- _BindingLanguage$ViewEngine$ViewSlot$ResourceRegistry$CompositionEngine$Animator . Animator . configureDefault ( _this . container ) ;
146
+ if ( ! _this . container . hasHandler ( _aureliaTemplating . Animator ) ) {
147
+ _aureliaTemplating . Animator . configureDefault ( _this . container ) ;
148
148
}
149
149
150
150
return loadResources ( _this . container , _this . resourcesToLoad , _this . resources ) . then ( function ( ) {
@@ -174,13 +174,13 @@ var Aurelia = (function () {
174
174
}
175
175
176
176
this . host . aurelia = this ;
177
- this . container . registerInstance ( Element , this . host ) ;
178
177
179
- compositionEngine = this . container . get ( _BindingLanguage$ViewEngine$ViewSlot$ResourceRegistry$CompositionEngine$Animator . CompositionEngine ) ;
178
+ compositionEngine = this . container . get ( _aureliaTemplating . CompositionEngine ) ;
180
179
instruction . viewModel = root ;
181
180
instruction . container = instruction . childContainer = this . container ;
182
- instruction . viewSlot = new _BindingLanguage$ViewEngine$ViewSlot$ResourceRegistry$CompositionEngine$Animator . ViewSlot ( this . host , true ) ;
181
+ instruction . viewSlot = new _aureliaTemplating . ViewSlot ( this . host , true ) ;
183
182
instruction . viewSlot . transformChildNodesIntoView ( ) ;
183
+ instruction . host = this . host ;
184
184
185
185
return compositionEngine . compose ( instruction ) . then ( function ( root ) {
186
186
_this2 . root = root ;
0 commit comments