ember-source 4.4.0-alpha.6 → 4.4.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.
- package/CHANGELOG.md +15 -5
- package/build-metadata.json +3 -3
- package/dist/ember-template-compiler.js +4 -4
- package/dist/ember-template-compiler.map +1 -1
- package/dist/ember-testing.js +1 -1
- package/dist/ember-testing.map +1 -1
- package/dist/ember.debug.js +306 -595
- package/dist/ember.debug.map +1 -1
- package/dist/header/license.js +1 -1
- package/dist/packages/@ember/-internals/container/index.js +0 -1
- package/dist/packages/@ember/-internals/glimmer/index.js +102 -217
- package/dist/packages/@ember/-internals/meta/lib/meta.js +1 -1
- package/dist/packages/@ember/-internals/metal/index.js +6 -3
- package/dist/packages/@ember/-internals/routing/lib/system/route-info.js +4 -0
- package/dist/packages/@ember/-internals/routing/lib/system/transition.js +4 -0
- package/dist/packages/@ember/-internals/runtime/lib/system/core_object.js +118 -302
- package/dist/packages/@ember/-internals/runtime/lib/system/object.js +8 -23
- package/dist/packages/@ember/-internals/views/lib/views/core_view.js +47 -29
- package/dist/packages/@ember/canary-features/index.js +2 -2
- package/dist/packages/ember/version.js +1 -1
- package/docs/data.json +401 -760
- package/package.json +17 -20
- package/dist/packages/@ember/renderer/index.js +0 -21
|
@@ -8,41 +8,24 @@ import CoreObject from './core_object';
|
|
|
8
8
|
import Observable from '../mixins/observable';
|
|
9
9
|
import { assert } from '@ember/debug';
|
|
10
10
|
import { DEBUG } from '@glimmer/env';
|
|
11
|
-
/**
|
|
12
|
-
`EmberObject` is the main base class for all Ember objects. It is a subclass
|
|
13
|
-
of `CoreObject` with the `Observable` mixin applied. For details,
|
|
14
|
-
see the documentation for each of these.
|
|
15
|
-
|
|
16
|
-
@class EmberObject
|
|
17
|
-
@extends CoreObject
|
|
18
|
-
@uses Observable
|
|
19
|
-
@public
|
|
20
|
-
*/
|
|
21
11
|
|
|
22
|
-
|
|
12
|
+
class EmberObject extends CoreObject.extend(Observable) {
|
|
23
13
|
get _debugContainerKey() {
|
|
24
14
|
let factory = getFactoryFor(this);
|
|
25
15
|
return factory !== undefined && factory.fullName;
|
|
26
16
|
}
|
|
27
17
|
|
|
28
18
|
}
|
|
29
|
-
Observable.apply(EmberObject.prototype);
|
|
30
|
-
export let FrameworkObject;
|
|
31
|
-
FrameworkObject = class FrameworkObject extends CoreObject {
|
|
32
|
-
get _debugContainerKey() {
|
|
33
|
-
let factory = getFactoryFor(this);
|
|
34
|
-
return factory !== undefined && factory.fullName;
|
|
35
|
-
}
|
|
36
19
|
|
|
37
|
-
|
|
38
|
-
|
|
20
|
+
export default EmberObject;
|
|
21
|
+
let FrameworkObject = class FrameworkObject extends EmberObject {};
|
|
39
22
|
|
|
40
23
|
if (DEBUG) {
|
|
41
24
|
let INIT_WAS_CALLED = symbol('INIT_WAS_CALLED');
|
|
42
25
|
let ASSERT_INIT_WAS_CALLED = symbol('ASSERT_INIT_WAS_CALLED');
|
|
43
26
|
FrameworkObject = class DebugFrameworkObject extends EmberObject {
|
|
44
|
-
init() {
|
|
45
|
-
super.init(
|
|
27
|
+
init(properties) {
|
|
28
|
+
super.init(properties);
|
|
46
29
|
this[INIT_WAS_CALLED] = true;
|
|
47
30
|
}
|
|
48
31
|
|
|
@@ -52,4 +35,6 @@ if (DEBUG) {
|
|
|
52
35
|
|
|
53
36
|
};
|
|
54
37
|
addListener(FrameworkObject.prototype, 'init', null, ASSERT_INIT_WAS_CALLED);
|
|
55
|
-
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export { FrameworkObject };
|
|
@@ -1,36 +1,48 @@
|
|
|
1
|
+
var __decorate = this && this.__decorate || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length,
|
|
3
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
4
|
+
d;
|
|
5
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
|
|
1
9
|
import { inject } from '@ember/-internals/metal';
|
|
2
10
|
import { ActionHandler, Evented, FrameworkObject } from '@ember/-internals/runtime';
|
|
3
11
|
import states from './states';
|
|
4
|
-
const CoreView = FrameworkObject.extend(Evented, ActionHandler, {
|
|
5
|
-
isView: true,
|
|
6
|
-
_states: states,
|
|
7
12
|
|
|
8
|
-
|
|
9
|
-
|
|
13
|
+
class CoreView extends FrameworkObject.extend(Evented, ActionHandler, {
|
|
14
|
+
// Continue to declare `_states` here so that we have a single reference on the prototype
|
|
15
|
+
// instead of one on each instance.
|
|
16
|
+
_states: states
|
|
17
|
+
}) {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
this.isView = true;
|
|
21
|
+
}
|
|
10
22
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
},
|
|
23
|
+
init(properties) {
|
|
24
|
+
var _a;
|
|
14
25
|
|
|
15
|
-
|
|
26
|
+
super.init(properties); // Handle methods from Evented
|
|
27
|
+
// The native class inheritance will not work for mixins. To work around this,
|
|
28
|
+
// we copy the existing trigger and has methods provided by the mixin and swap in the
|
|
29
|
+
// new ones from our class.
|
|
16
30
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
parentView: null,
|
|
31
|
+
this._superTrigger = this.trigger;
|
|
32
|
+
this.trigger = this._trigger;
|
|
33
|
+
this._superHas = this.has;
|
|
34
|
+
this.has = this._has;
|
|
35
|
+
(_a = this.parentView) !== null && _a !== void 0 ? _a : this.parentView = null;
|
|
36
|
+
this._state = 'preRender';
|
|
37
|
+
this._currentState = this._states.preRender;
|
|
38
|
+
}
|
|
26
39
|
|
|
27
40
|
instrumentDetails(hash) {
|
|
28
41
|
hash['object'] = this.toString();
|
|
29
42
|
hash['containerKey'] = this._debugContainerKey;
|
|
30
43
|
hash['view'] = this;
|
|
31
44
|
return hash;
|
|
32
|
-
}
|
|
33
|
-
|
|
45
|
+
}
|
|
34
46
|
/**
|
|
35
47
|
Override the default event firing from `Evented` to
|
|
36
48
|
also call methods with the given name.
|
|
@@ -38,22 +50,28 @@ const CoreView = FrameworkObject.extend(Evented, ActionHandler, {
|
|
|
38
50
|
@param name {String}
|
|
39
51
|
@private
|
|
40
52
|
*/
|
|
41
|
-
trigger
|
|
42
|
-
|
|
53
|
+
// Changed to `trigger` on init
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
_trigger(name, ...args) {
|
|
57
|
+
this._superTrigger(name, ...args);
|
|
43
58
|
|
|
44
59
|
let method = this[name];
|
|
45
60
|
|
|
46
61
|
if (typeof method === 'function') {
|
|
47
62
|
return method.apply(this, args);
|
|
48
63
|
}
|
|
49
|
-
}
|
|
64
|
+
} // Changed to `has` on init
|
|
50
65
|
|
|
51
|
-
|
|
52
|
-
|
|
66
|
+
|
|
67
|
+
_has(name) {
|
|
68
|
+
return typeof this[name] === 'function' || this._superHas(name);
|
|
53
69
|
}
|
|
54
70
|
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
CoreView.isViewFactory = true;
|
|
74
|
+
|
|
75
|
+
__decorate([inject('renderer', '-dom')], CoreView.prototype, "renderer", void 0);
|
|
76
|
+
|
|
59
77
|
export default CoreView;
|
|
@@ -11,8 +11,8 @@ import { ENV } from '@ember/-internals/environment';
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
export const DEFAULT_FEATURES = {
|
|
14
|
-
EMBER_LIBRARIES_ISREGISTERED:
|
|
15
|
-
EMBER_IMPROVED_INSTRUMENTATION:
|
|
14
|
+
EMBER_LIBRARIES_ISREGISTERED: false,
|
|
15
|
+
EMBER_IMPROVED_INSTRUMENTATION: false,
|
|
16
16
|
EMBER_UNIQUE_ID_HELPER: true
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default "4.4.0
|
|
1
|
+
export default "4.4.0";
|