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
package/dist/ember.debug.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Portions Copyright 2008-2011 Apple Inc. All rights reserved.
|
|
7
7
|
* @license Licensed under MIT license
|
|
8
8
|
* See https://raw.github.com/emberjs/ember.js/master/LICENSE
|
|
9
|
-
* @version 4.4.0
|
|
9
|
+
* @version 4.4.0
|
|
10
10
|
*/
|
|
11
11
|
/* eslint-disable no-var */
|
|
12
12
|
|
|
@@ -564,7 +564,6 @@ define("@ember/-internals/container/index", ["exports", "@ember/-internals/owner
|
|
|
564
564
|
this.normalizedName = normalizedName;
|
|
565
565
|
this.madeToString = undefined;
|
|
566
566
|
this.injections = undefined;
|
|
567
|
-
setFactoryFor(this, this);
|
|
568
567
|
}
|
|
569
568
|
|
|
570
569
|
toString() {
|
|
@@ -4704,12 +4703,35 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
|
|
|
4704
4703
|
|
|
4705
4704
|
var lazyEventsProcessed = new WeakMap();
|
|
4706
4705
|
|
|
4707
|
-
|
|
4708
|
-
|
|
4706
|
+
class Component extends _views.CoreView.extend(_views.ChildViewsSupport, _views.ViewStateSupport, _views.ClassNamesSupport, _runtime2.TargetActionSupport, _views.ActionSupport, _views.ViewMixin, {
|
|
4707
|
+
// These need to be overridable via extend/create but should still
|
|
4708
|
+
// have a default. Defining them here is the best way to achieve that.
|
|
4709
|
+
didReceiveAttrs() {},
|
|
4709
4710
|
|
|
4710
|
-
|
|
4711
|
-
|
|
4711
|
+
didRender() {},
|
|
4712
|
+
|
|
4713
|
+
didUpdate() {},
|
|
4714
|
+
|
|
4715
|
+
didUpdateAttrs() {},
|
|
4716
|
+
|
|
4717
|
+
willRender() {},
|
|
4718
|
+
|
|
4719
|
+
willUpdate() {}
|
|
4720
|
+
|
|
4721
|
+
}) {
|
|
4722
|
+
constructor() {
|
|
4723
|
+
super(...arguments);
|
|
4724
|
+
this.isComponent = true;
|
|
4725
|
+
}
|
|
4712
4726
|
|
|
4727
|
+
init(properties) {
|
|
4728
|
+
super.init(properties); // Handle methods from ViewMixin.
|
|
4729
|
+
// The native class inheritance will not work for mixins. To work around this,
|
|
4730
|
+
// we copy the existing rerender method provided by the mixin and swap in the
|
|
4731
|
+
// new rerender method from our class.
|
|
4732
|
+
|
|
4733
|
+
this._superRerender = this.rerender;
|
|
4734
|
+
this.rerender = this._rerender;
|
|
4713
4735
|
this[IS_DISPATCHING_ATTRS] = false;
|
|
4714
4736
|
this[DIRTY_TAG] = (0, _validator.createTag)();
|
|
4715
4737
|
this[BOUNDS] = null;
|
|
@@ -4745,7 +4767,7 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
|
|
|
4745
4767
|
for (var key in events) {
|
|
4746
4768
|
var methodName = events[key];
|
|
4747
4769
|
|
|
4748
|
-
if (typeof this[methodName] === 'function') {
|
|
4770
|
+
if (methodName && typeof this[methodName] === 'function') {
|
|
4749
4771
|
eventNames.push(methodName);
|
|
4750
4772
|
}
|
|
4751
4773
|
} // If in a tagless component, assert that no event handlers are defined
|
|
@@ -4753,7 +4775,7 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
|
|
|
4753
4775
|
|
|
4754
4776
|
(true && !(!eventNames.length) && (0, _debug.assert)(`You can not define \`${eventNames}\` function(s) to handle DOM event in the \`${this}\` tagless component since it doesn't have any DOM element.`, !eventNames.length));
|
|
4755
4777
|
}
|
|
4756
|
-
}
|
|
4778
|
+
}
|
|
4757
4779
|
|
|
4758
4780
|
get _dispatcher() {
|
|
4759
4781
|
if (this.__dispatcher === undefined) {
|
|
@@ -4761,8 +4783,9 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
|
|
|
4761
4783
|
(true && !(owner) && (0, _debug.assert)('Component is unexpectedly missing an owner', owner));
|
|
4762
4784
|
|
|
4763
4785
|
if (owner.lookup('-environment:main').isInteractive) {
|
|
4764
|
-
|
|
4765
|
-
(true && !(
|
|
4786
|
+
var dispatcher = owner.lookup('event_dispatcher:main');
|
|
4787
|
+
(true && !(dispatcher instanceof _views.EventDispatcher) && (0, _debug.assert)('Expected dispatcher to be an EventDispatcher', dispatcher instanceof _views.EventDispatcher));
|
|
4788
|
+
this.__dispatcher = dispatcher;
|
|
4766
4789
|
} else {
|
|
4767
4790
|
// In FastBoot we have no EventDispatcher. Set to null to not try again to look it up.
|
|
4768
4791
|
this.__dispatcher = null;
|
|
@@ -4770,20 +4793,24 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
|
|
|
4770
4793
|
}
|
|
4771
4794
|
|
|
4772
4795
|
return this.__dispatcher;
|
|
4773
|
-
}
|
|
4796
|
+
}
|
|
4774
4797
|
|
|
4775
|
-
on(
|
|
4798
|
+
on(name, target, method) {
|
|
4776
4799
|
var _a;
|
|
4777
4800
|
|
|
4778
|
-
(_a = this._dispatcher) === null || _a === void 0 ? void 0 : _a.setupHandlerForEmberEvent(
|
|
4779
|
-
|
|
4780
|
-
|
|
4801
|
+
(_a = this._dispatcher) === null || _a === void 0 ? void 0 : _a.setupHandlerForEmberEvent(name); // The `on` method here comes from the Evented mixin. Since this mixin
|
|
4802
|
+
// is applied to the parent of this class, however, we are still able
|
|
4803
|
+
// to use `super`.
|
|
4781
4804
|
|
|
4782
|
-
|
|
4805
|
+
return super.on(name, target, method);
|
|
4806
|
+
} // Changed to `rerender` on init
|
|
4807
|
+
|
|
4808
|
+
|
|
4809
|
+
_rerender() {
|
|
4783
4810
|
(0, _validator.dirtyTag)(this[DIRTY_TAG]);
|
|
4784
4811
|
|
|
4785
|
-
this.
|
|
4786
|
-
}
|
|
4812
|
+
this._superRerender();
|
|
4813
|
+
}
|
|
4787
4814
|
|
|
4788
4815
|
[_metal.PROPERTY_DID_CHANGE](key, value) {
|
|
4789
4816
|
if (this[IS_DISPATCHING_ATTRS]) {
|
|
@@ -4796,39 +4823,40 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
|
|
|
4796
4823
|
if (reference !== undefined && (0, _reference.isUpdatableRef)(reference)) {
|
|
4797
4824
|
(0, _reference.updateRef)(reference, arguments.length === 2 ? value : (0, _metal.get)(this, key));
|
|
4798
4825
|
}
|
|
4799
|
-
}
|
|
4826
|
+
}
|
|
4800
4827
|
|
|
4801
4828
|
getAttr(key) {
|
|
4802
4829
|
// TODO Intimate API should be deprecated
|
|
4803
4830
|
return this.get(key);
|
|
4804
|
-
}
|
|
4805
|
-
|
|
4831
|
+
}
|
|
4806
4832
|
/**
|
|
4807
4833
|
Normally, Ember's component model is "write-only". The component takes a
|
|
4808
4834
|
bunch of attributes that it got passed in, and uses them to render its
|
|
4809
4835
|
template.
|
|
4810
|
-
|
|
4836
|
+
One nice thing about this model is that if you try to set a value to the
|
|
4811
4837
|
same thing as last time, Ember (through HTMLBars) will avoid doing any
|
|
4812
4838
|
work on the DOM.
|
|
4813
|
-
|
|
4839
|
+
This is not just a performance optimization. If an attribute has not
|
|
4814
4840
|
changed, it is important not to clobber the element's "hidden state".
|
|
4815
4841
|
For example, if you set an input's `value` to the same value as before,
|
|
4816
4842
|
it will clobber selection state and cursor position. In other words,
|
|
4817
4843
|
setting an attribute is not **always** idempotent.
|
|
4818
|
-
|
|
4844
|
+
This method provides a way to read an element's attribute and also
|
|
4819
4845
|
update the last value Ember knows about at the same time. This makes
|
|
4820
4846
|
setting an attribute idempotent.
|
|
4821
|
-
|
|
4847
|
+
In particular, what this means is that if you get an `<input>` element's
|
|
4822
4848
|
`value` attribute and then re-render the template with the same value,
|
|
4823
4849
|
it will avoid clobbering the cursor and selection position.
|
|
4824
4850
|
Since most attribute sets are idempotent in the browser, you typically
|
|
4825
4851
|
can get away with reading attributes using jQuery, but the most reliable
|
|
4826
4852
|
way to do so is through this method.
|
|
4827
4853
|
@method readDOMAttr
|
|
4828
|
-
|
|
4854
|
+
@param {String} name the name of the attribute
|
|
4829
4855
|
@return String
|
|
4830
4856
|
@public
|
|
4831
|
-
|
|
4857
|
+
*/
|
|
4858
|
+
|
|
4859
|
+
|
|
4832
4860
|
readDOMAttr(name) {
|
|
4833
4861
|
// TODO revisit this
|
|
4834
4862
|
var _element = (0, _views.getViewElement)(this);
|
|
@@ -4848,207 +4876,61 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
|
|
|
4848
4876
|
}
|
|
4849
4877
|
|
|
4850
4878
|
return element[normalized];
|
|
4851
|
-
}
|
|
4852
|
-
|
|
4853
|
-
/**
|
|
4854
|
-
The WAI-ARIA role of the control represented by this view. For example, a
|
|
4855
|
-
button may have a role of type 'button', or a pane may have a role of
|
|
4856
|
-
type 'alertdialog'. This property is used by assistive software to help
|
|
4857
|
-
visually challenged users navigate rich web applications.
|
|
4858
|
-
The full list of valid WAI-ARIA roles is available at:
|
|
4859
|
-
[https://www.w3.org/TR/wai-aria/#roles_categorization](https://www.w3.org/TR/wai-aria/#roles_categorization)
|
|
4860
|
-
@property ariaRole
|
|
4861
|
-
@type String
|
|
4862
|
-
@default null
|
|
4863
|
-
@public
|
|
4864
|
-
*/
|
|
4865
|
-
|
|
4866
|
-
/**
|
|
4867
|
-
Enables components to take a list of parameters as arguments.
|
|
4868
|
-
For example, a component that takes two parameters with the names
|
|
4869
|
-
`name` and `age`:
|
|
4870
|
-
```app/components/my-component.js
|
|
4871
|
-
import Component from '@ember/component';
|
|
4872
|
-
let MyComponent = Component.extend();
|
|
4873
|
-
MyComponent.reopenClass({
|
|
4874
|
-
positionalParams: ['name', 'age']
|
|
4875
|
-
});
|
|
4876
|
-
export default MyComponent;
|
|
4877
|
-
```
|
|
4878
|
-
It can then be invoked like this:
|
|
4879
|
-
```hbs
|
|
4880
|
-
{{my-component "John" 38}}
|
|
4881
|
-
```
|
|
4882
|
-
The parameters can be referred to just like named parameters:
|
|
4883
|
-
```hbs
|
|
4884
|
-
Name: {{name}}, Age: {{age}}.
|
|
4885
|
-
```
|
|
4886
|
-
Using a string instead of an array allows for an arbitrary number of
|
|
4887
|
-
parameters:
|
|
4888
|
-
```app/components/my-component.js
|
|
4889
|
-
import Component from '@ember/component';
|
|
4890
|
-
let MyComponent = Component.extend();
|
|
4891
|
-
MyComponent.reopenClass({
|
|
4892
|
-
positionalParams: 'names'
|
|
4893
|
-
});
|
|
4894
|
-
export default MyComponent;
|
|
4895
|
-
```
|
|
4896
|
-
It can then be invoked like this:
|
|
4897
|
-
```hbs
|
|
4898
|
-
{{my-component "John" "Michael" "Scott"}}
|
|
4899
|
-
```
|
|
4900
|
-
The parameters can then be referred to by enumerating over the list:
|
|
4901
|
-
```hbs
|
|
4902
|
-
{{#each names as |name|}}{{name}}{{/each}}
|
|
4903
|
-
```
|
|
4904
|
-
@static
|
|
4905
|
-
@public
|
|
4906
|
-
@property positionalParams
|
|
4907
|
-
@since 1.13.0
|
|
4908
|
-
*/
|
|
4909
|
-
|
|
4910
|
-
/**
|
|
4911
|
-
Called when the attributes passed into the component have been updated.
|
|
4912
|
-
Called both during the initial render of a container and during a rerender.
|
|
4913
|
-
Can be used in place of an observer; code placed here will be executed
|
|
4914
|
-
every time any attribute updates.
|
|
4915
|
-
@method didReceiveAttrs
|
|
4916
|
-
@public
|
|
4917
|
-
@since 1.13.0
|
|
4918
|
-
*/
|
|
4919
|
-
didReceiveAttrs() {},
|
|
4920
|
-
|
|
4921
|
-
/**
|
|
4922
|
-
Called when the attributes passed into the component have been updated.
|
|
4923
|
-
Called both during the initial render of a container and during a rerender.
|
|
4924
|
-
Can be used in place of an observer; code placed here will be executed
|
|
4925
|
-
every time any attribute updates.
|
|
4926
|
-
@event didReceiveAttrs
|
|
4927
|
-
@public
|
|
4928
|
-
@since 1.13.0
|
|
4929
|
-
*/
|
|
4930
|
-
|
|
4931
|
-
/**
|
|
4932
|
-
Called after a component has been rendered, both on initial render and
|
|
4933
|
-
in subsequent rerenders.
|
|
4934
|
-
@method didRender
|
|
4935
|
-
@public
|
|
4936
|
-
@since 1.13.0
|
|
4937
|
-
*/
|
|
4938
|
-
didRender() {},
|
|
4939
|
-
|
|
4940
|
-
/**
|
|
4941
|
-
Called after a component has been rendered, both on initial render and
|
|
4942
|
-
in subsequent rerenders.
|
|
4943
|
-
@event didRender
|
|
4944
|
-
@public
|
|
4945
|
-
@since 1.13.0
|
|
4946
|
-
*/
|
|
4947
|
-
|
|
4948
|
-
/**
|
|
4949
|
-
Called before a component has been rendered, both on initial render and
|
|
4950
|
-
in subsequent rerenders.
|
|
4951
|
-
@method willRender
|
|
4952
|
-
@public
|
|
4953
|
-
@since 1.13.0
|
|
4954
|
-
*/
|
|
4955
|
-
willRender() {},
|
|
4956
|
-
|
|
4957
|
-
/**
|
|
4958
|
-
Called before a component has been rendered, both on initial render and
|
|
4959
|
-
in subsequent rerenders.
|
|
4960
|
-
@event willRender
|
|
4961
|
-
@public
|
|
4962
|
-
@since 1.13.0
|
|
4963
|
-
*/
|
|
4964
|
-
|
|
4965
|
-
/**
|
|
4966
|
-
Called when the attributes passed into the component have been changed.
|
|
4967
|
-
Called only during a rerender, not during an initial render.
|
|
4968
|
-
@method didUpdateAttrs
|
|
4969
|
-
@public
|
|
4970
|
-
@since 1.13.0
|
|
4971
|
-
*/
|
|
4972
|
-
didUpdateAttrs() {},
|
|
4973
|
-
|
|
4974
|
-
/**
|
|
4975
|
-
Called when the attributes passed into the component have been changed.
|
|
4976
|
-
Called only during a rerender, not during an initial render.
|
|
4977
|
-
@event didUpdateAttrs
|
|
4978
|
-
@public
|
|
4979
|
-
@since 1.13.0
|
|
4980
|
-
*/
|
|
4879
|
+
}
|
|
4981
4880
|
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
@method willUpdate
|
|
4986
|
-
@public
|
|
4987
|
-
@since 1.13.0
|
|
4988
|
-
*/
|
|
4989
|
-
willUpdate() {},
|
|
4881
|
+
static toString() {
|
|
4882
|
+
return '@ember/component';
|
|
4883
|
+
}
|
|
4990
4884
|
|
|
4991
|
-
|
|
4992
|
-
Called when the component is about to update and rerender itself.
|
|
4993
|
-
Called only during a rerender, not during an initial render.
|
|
4994
|
-
@event willUpdate
|
|
4995
|
-
@public
|
|
4996
|
-
@since 1.13.0
|
|
4997
|
-
*/
|
|
4885
|
+
}
|
|
4998
4886
|
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
Called only during a rerender, not during an initial render.
|
|
5002
|
-
@method didUpdate
|
|
5003
|
-
@public
|
|
5004
|
-
@since 1.13.0
|
|
5005
|
-
*/
|
|
5006
|
-
didUpdate() {}
|
|
5007
|
-
/**
|
|
5008
|
-
Called when the component has updated and rerendered itself.
|
|
5009
|
-
Called only during a rerender, not during an initial render.
|
|
5010
|
-
@event didUpdate
|
|
5011
|
-
@public
|
|
5012
|
-
@since 1.13.0
|
|
5013
|
-
*/
|
|
4887
|
+
_exports.Component = Component;
|
|
4888
|
+
Component.isComponentFactory = true; // We continue to use reopenClass here so that positionalParams can be overridden with reopenClass in subclasses.
|
|
5014
4889
|
|
|
4890
|
+
Component.reopenClass({
|
|
5015
4891
|
/**
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
4892
|
+
Enables components to take a list of parameters as arguments.
|
|
4893
|
+
For example, a component that takes two parameters with the names
|
|
4894
|
+
`name` and `age`:
|
|
4895
|
+
```app/components/my-component.js
|
|
4896
|
+
import Component from '@ember/component';
|
|
4897
|
+
let MyComponent = Component.extend();
|
|
4898
|
+
MyComponent.reopenClass({
|
|
4899
|
+
positionalParams: ['name', 'age']
|
|
4900
|
+
});
|
|
4901
|
+
export default MyComponent;
|
|
5020
4902
|
```
|
|
5021
|
-
|
|
5022
|
-
|
|
4903
|
+
It can then be invoked like this:
|
|
4904
|
+
```hbs
|
|
4905
|
+
{{my-component "John" 38}}
|
|
5023
4906
|
```
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
}
|
|
4907
|
+
The parameters can be referred to just like named parameters:
|
|
4908
|
+
```hbs
|
|
4909
|
+
Name: {{name}}, Age: {{age}}.
|
|
4910
|
+
```
|
|
4911
|
+
Using a string instead of an array allows for an arbitrary number of
|
|
4912
|
+
parameters:
|
|
4913
|
+
```app/components/my-component.js
|
|
4914
|
+
import Component from '@ember/component';
|
|
4915
|
+
let MyComponent = Component.extend();
|
|
4916
|
+
MyComponent.reopenClass({
|
|
4917
|
+
positionalParams: 'names'
|
|
5036
4918
|
});
|
|
4919
|
+
export default MyComponent;
|
|
4920
|
+
```
|
|
4921
|
+
It can then be invoked like this:
|
|
4922
|
+
```hbs
|
|
4923
|
+
{{my-component "John" "Michael" "Scott"}}
|
|
5037
4924
|
```
|
|
5038
|
-
|
|
5039
|
-
|
|
4925
|
+
The parameters can then be referred to by enumerating over the list:
|
|
4926
|
+
```hbs
|
|
4927
|
+
{{#each names as |name|}}{{name}}{{/each}}
|
|
4928
|
+
```
|
|
4929
|
+
@static
|
|
5040
4930
|
@public
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
});
|
|
5045
|
-
|
|
5046
|
-
_exports.Component = Component;
|
|
5047
|
-
|
|
5048
|
-
Component.toString = () => '@ember/component';
|
|
5049
|
-
|
|
5050
|
-
Component.reopenClass({
|
|
5051
|
-
isComponentFactory: true,
|
|
4931
|
+
@property positionalParams
|
|
4932
|
+
@since 1.13.0
|
|
4933
|
+
*/
|
|
5052
4934
|
positionalParams: []
|
|
5053
4935
|
});
|
|
5054
4936
|
(0, _manager2.setInternalComponentManager)(CURLY_COMPONENT_MANAGER, Component);
|
|
@@ -5062,8 +4944,8 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
|
|
|
5062
4944
|
var IS_CLASSIC_HELPER = Symbol('IS_CLASSIC_HELPER');
|
|
5063
4945
|
|
|
5064
4946
|
class Helper extends _runtime2.FrameworkObject {
|
|
5065
|
-
init() {
|
|
5066
|
-
super.init();
|
|
4947
|
+
init(properties) {
|
|
4948
|
+
super.init(properties);
|
|
5067
4949
|
this[RECOMPUTE_TAG] = (0, _validator.createTag)();
|
|
5068
4950
|
}
|
|
5069
4951
|
/**
|
|
@@ -8600,7 +8482,7 @@ define("@ember/-internals/meta/lib/meta", ["exports", "@ember/-internals/utils",
|
|
|
8600
8482
|
/* ADD */
|
|
8601
8483
|
&& kind === 0
|
|
8602
8484
|
/* ADD */
|
|
8603
|
-
&& listener.sync !== sync)) && (0, _debug.assert)(`You attempted to add an observer for the same method on '${event.split(':')[0]}' twice to ${target} as both sync and async. Observers must be either sync or async, they cannot be both. This is likely a mistake, you should either remove the code that added the observer a second time, or update it to always be sync or async. The method was ${method}.`, !(listener.kind === 0 && kind === 0 && listener.sync !== sync))); // update own listener
|
|
8485
|
+
&& listener.sync !== sync)) && (0, _debug.assert)(`You attempted to add an observer for the same method on '${event.split(':')[0]}' twice to ${target} as both sync and async. Observers must be either sync or async, they cannot be both. This is likely a mistake, you should either remove the code that added the observer a second time, or update it to always be sync or async. The method was ${String(method)}.`, !(listener.kind === 0 && kind === 0 && listener.sync !== sync))); // update own listener
|
|
8604
8486
|
|
|
8605
8487
|
listener.kind = kind;
|
|
8606
8488
|
listener.sync = sync;
|
|
@@ -8959,6 +8841,7 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
|
|
|
8959
8841
|
}
|
|
8960
8842
|
});
|
|
8961
8843
|
_exports.hasListeners = hasListeners;
|
|
8844
|
+
_exports.hasUnknownProperty = hasUnknownProperty;
|
|
8962
8845
|
_exports.inject = inject;
|
|
8963
8846
|
_exports.isBlank = isBlank;
|
|
8964
8847
|
_exports.isClassicDecorator = isClassicDecorator;
|
|
@@ -10884,6 +10767,10 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
|
|
|
10884
10767
|
};
|
|
10885
10768
|
}
|
|
10886
10769
|
|
|
10770
|
+
function hasUnknownProperty(val) {
|
|
10771
|
+
return typeof val === 'object' && val !== null && typeof val.unknownProperty === 'function';
|
|
10772
|
+
}
|
|
10773
|
+
|
|
10887
10774
|
function get(obj, keyName) {
|
|
10888
10775
|
(true && !(arguments.length === 2) && (0, _debug.assert)(`Get must be called with two arguments; an object and a property key`, arguments.length === 2));
|
|
10889
10776
|
(true && !(obj !== undefined && obj !== null) && (0, _debug.assert)(`Cannot call get with '${keyName}' on an undefined object.`, obj !== undefined && obj !== null));
|
|
@@ -10908,7 +10795,7 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
|
|
|
10908
10795
|
value = obj[keyName];
|
|
10909
10796
|
}
|
|
10910
10797
|
|
|
10911
|
-
if (value === undefined && typeof obj === 'object' && !(keyName in obj) &&
|
|
10798
|
+
if (value === undefined && typeof obj === 'object' && !(keyName in obj) && hasUnknownProperty(obj)) {
|
|
10912
10799
|
value = obj.unknownProperty(keyName);
|
|
10913
10800
|
}
|
|
10914
10801
|
|
|
@@ -11309,7 +11196,7 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
|
|
|
11309
11196
|
return true;
|
|
11310
11197
|
}
|
|
11311
11198
|
|
|
11312
|
-
if (
|
|
11199
|
+
if (!hasUnknownProperty(obj) && typeof obj.size === 'number') {
|
|
11313
11200
|
return !obj.size;
|
|
11314
11201
|
}
|
|
11315
11202
|
|
|
@@ -18870,6 +18757,10 @@ define("@ember/-internals/routing/lib/system/router_state", ["exports", "@ember/
|
|
|
18870
18757
|
});
|
|
18871
18758
|
define("@ember/-internals/routing/lib/system/transition", [], function () {
|
|
18872
18759
|
"use strict";
|
|
18760
|
+
/**
|
|
18761
|
+
@module @ember/routing
|
|
18762
|
+
*/
|
|
18763
|
+
|
|
18873
18764
|
/**
|
|
18874
18765
|
A Transition is a thennable (a promise-like object) that represents
|
|
18875
18766
|
an attempt to transition to another route. It can be aborted, either
|
|
@@ -23593,6 +23484,14 @@ define("@ember/-internals/runtime/lib/system/core_object", ["exports", "@ember/-
|
|
|
23593
23484
|
/**
|
|
23594
23485
|
@module @ember/object
|
|
23595
23486
|
*/
|
|
23487
|
+
function hasSetUnknownProperty(val) {
|
|
23488
|
+
return typeof val === 'object' && val !== null && typeof val.setUnknownProperty === 'function';
|
|
23489
|
+
}
|
|
23490
|
+
|
|
23491
|
+
function hasToStringExtension(val) {
|
|
23492
|
+
return typeof val === 'object' && val !== null && typeof val.toStringExtension === 'function';
|
|
23493
|
+
}
|
|
23494
|
+
|
|
23596
23495
|
var reopen = _metal.Mixin.prototype.reopen;
|
|
23597
23496
|
var wasApplied = new _util._WeakSet();
|
|
23598
23497
|
var prototypeMixinMap = new WeakMap();
|
|
@@ -23616,12 +23515,9 @@ define("@ember/-internals/runtime/lib/system/core_object", ["exports", "@ember/-
|
|
|
23616
23515
|
(true && !(!(properties instanceof _metal.Mixin)) && (0, _debug.assert)('EmberObject.create no longer supports mixing in other ' + 'definitions, use .extend & .create separately instead.', !(properties instanceof _metal.Mixin)));
|
|
23617
23516
|
var concatenatedProperties = obj.concatenatedProperties;
|
|
23618
23517
|
var mergedProperties = obj.mergedProperties;
|
|
23619
|
-
var hasConcatenatedProps = concatenatedProperties !== undefined && concatenatedProperties.length > 0;
|
|
23620
|
-
var hasMergedProps = mergedProperties !== undefined && mergedProperties.length > 0;
|
|
23621
23518
|
var keyNames = Object.keys(properties);
|
|
23622
23519
|
|
|
23623
|
-
for (var
|
|
23624
|
-
var keyName = keyNames[i];
|
|
23520
|
+
for (var keyName of keyNames) {
|
|
23625
23521
|
var value = properties[keyName];
|
|
23626
23522
|
(true && !(!(0, _metal.isClassicDecorator)(value)) && (0, _debug.assert)('EmberObject.create no longer supports defining computed ' + 'properties. Define computed properties using extend() or reopen() ' + 'before calling create().', !(0, _metal.isClassicDecorator)(value)));
|
|
23627
23523
|
(true && !(!(typeof value === 'function' && value.toString().indexOf('._super') !== -1)) && (0, _debug.assert)('EmberObject.create no longer supports defining methods that call _super.', !(typeof value === 'function' && value.toString().indexOf('._super') !== -1)));
|
|
@@ -23630,7 +23526,7 @@ define("@ember/-internals/runtime/lib/system/core_object", ["exports", "@ember/-
|
|
|
23630
23526
|
var isDescriptor = possibleDesc !== undefined;
|
|
23631
23527
|
|
|
23632
23528
|
if (!isDescriptor) {
|
|
23633
|
-
if (
|
|
23529
|
+
if (concatenatedProperties !== undefined && concatenatedProperties.length > 0 && concatenatedProperties.includes(keyName)) {
|
|
23634
23530
|
var baseValue = obj[keyName];
|
|
23635
23531
|
|
|
23636
23532
|
if (baseValue) {
|
|
@@ -23640,7 +23536,7 @@ define("@ember/-internals/runtime/lib/system/core_object", ["exports", "@ember/-
|
|
|
23640
23536
|
}
|
|
23641
23537
|
}
|
|
23642
23538
|
|
|
23643
|
-
if (
|
|
23539
|
+
if (mergedProperties !== undefined && mergedProperties.length > 0 && mergedProperties.includes(keyName)) {
|
|
23644
23540
|
var _baseValue = obj[keyName];
|
|
23645
23541
|
value = Object.assign({}, _baseValue, value);
|
|
23646
23542
|
}
|
|
@@ -23648,7 +23544,7 @@ define("@ember/-internals/runtime/lib/system/core_object", ["exports", "@ember/-
|
|
|
23648
23544
|
|
|
23649
23545
|
if (isDescriptor) {
|
|
23650
23546
|
possibleDesc.set(obj, keyName, value);
|
|
23651
|
-
} else if (
|
|
23547
|
+
} else if (hasSetUnknownProperty(obj) && !(keyName in obj)) {
|
|
23652
23548
|
obj.setUnknownProperty(keyName, value);
|
|
23653
23549
|
} else {
|
|
23654
23550
|
if (true
|
|
@@ -23674,86 +23570,24 @@ define("@ember/-internals/runtime/lib/system/core_object", ["exports", "@ember/-
|
|
|
23674
23570
|
var observerEvents = m.observerEvents();
|
|
23675
23571
|
|
|
23676
23572
|
if (observerEvents !== undefined) {
|
|
23677
|
-
for (var
|
|
23678
|
-
(0, _metal.activateObserver)(obj, observerEvents[
|
|
23573
|
+
for (var i = 0; i < observerEvents.length; i++) {
|
|
23574
|
+
(0, _metal.activateObserver)(obj, observerEvents[i].event, observerEvents[i].sync);
|
|
23679
23575
|
}
|
|
23680
23576
|
}
|
|
23681
23577
|
|
|
23682
|
-
(0, _metal.sendEvent)(obj, 'init', undefined, undefined,
|
|
23578
|
+
(0, _metal.sendEvent)(obj, 'init', undefined, undefined, m);
|
|
23683
23579
|
}
|
|
23684
|
-
/**
|
|
23685
|
-
`CoreObject` is the base class for all Ember constructs. It establishes a
|
|
23686
|
-
class system based on Ember's Mixin system, and provides the basis for the
|
|
23687
|
-
Ember Object Model. `CoreObject` should generally not be used directly,
|
|
23688
|
-
instead you should use `EmberObject`.
|
|
23689
|
-
|
|
23690
|
-
## Usage
|
|
23691
|
-
|
|
23692
|
-
You can define a class by extending from `CoreObject` using the `extend`
|
|
23693
|
-
method:
|
|
23694
|
-
|
|
23695
|
-
```js
|
|
23696
|
-
const Person = CoreObject.extend({
|
|
23697
|
-
name: 'Tomster',
|
|
23698
|
-
});
|
|
23699
|
-
```
|
|
23700
|
-
|
|
23701
|
-
For detailed usage, see the [Object Model](https://guides.emberjs.com/release/object-model/)
|
|
23702
|
-
section of the guides.
|
|
23703
|
-
|
|
23704
|
-
## Usage with Native Classes
|
|
23705
|
-
|
|
23706
|
-
Native JavaScript `class` syntax can be used to extend from any `CoreObject`
|
|
23707
|
-
based class:
|
|
23708
|
-
|
|
23709
|
-
```js
|
|
23710
|
-
class Person extends CoreObject {
|
|
23711
|
-
init() {
|
|
23712
|
-
super.init(...arguments);
|
|
23713
|
-
this.name = 'Tomster';
|
|
23714
|
-
}
|
|
23715
|
-
}
|
|
23716
|
-
```
|
|
23717
|
-
|
|
23718
|
-
Some notes about `class` usage:
|
|
23719
|
-
|
|
23720
|
-
* `new` syntax is not currently supported with classes that extend from
|
|
23721
|
-
`EmberObject` or `CoreObject`. You must continue to use the `create` method
|
|
23722
|
-
when making new instances of classes, even if they are defined using native
|
|
23723
|
-
class syntax. If you want to use `new` syntax, consider creating classes
|
|
23724
|
-
which do _not_ extend from `EmberObject` or `CoreObject`. Ember features,
|
|
23725
|
-
such as computed properties and decorators, will still work with base-less
|
|
23726
|
-
classes.
|
|
23727
|
-
* Instead of using `this._super()`, you must use standard `super` syntax in
|
|
23728
|
-
native classes. See the [MDN docs on classes](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes#Super_class_calls_with_super)
|
|
23729
|
-
for more details.
|
|
23730
|
-
* Native classes support using [constructors](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes#Constructor)
|
|
23731
|
-
to set up newly-created instances. Ember uses these to, among other things,
|
|
23732
|
-
support features that need to retrieve other entities by name, like Service
|
|
23733
|
-
injection and `getOwner`. To ensure your custom instance setup logic takes
|
|
23734
|
-
place after this important work is done, avoid using the `constructor` in
|
|
23735
|
-
favor of `init`.
|
|
23736
|
-
* Properties passed to `create` will be available on the instance by the time
|
|
23737
|
-
`init` runs, so any code that requires these values should work at that
|
|
23738
|
-
time.
|
|
23739
|
-
* Using native classes, and switching back to the old Ember Object model is
|
|
23740
|
-
fully supported.
|
|
23741
|
-
|
|
23742
|
-
@class CoreObject
|
|
23743
|
-
@public
|
|
23744
|
-
*/
|
|
23745
|
-
|
|
23746
23580
|
|
|
23747
23581
|
class CoreObject {
|
|
23748
23582
|
constructor(owner) {
|
|
23749
23583
|
this[_owner2.OWNER] = owner; // prepare prototype...
|
|
23750
23584
|
|
|
23751
23585
|
this.constructor.proto();
|
|
23752
|
-
var self
|
|
23586
|
+
var self;
|
|
23753
23587
|
|
|
23754
23588
|
if (true
|
|
23755
23589
|
/* DEBUG */
|
|
23756
|
-
&&
|
|
23590
|
+
&& (0, _metal.hasUnknownProperty)(this)) {
|
|
23757
23591
|
var messageFor = (obj, property) => {
|
|
23758
23592
|
return `You attempted to access the \`${String(property)}\` property (of ${obj}).\n` + `Since Ember 3.1, this is usually fine as you no longer need to use \`.get()\`\n` + `to access computed properties. However, in this case, the object in question\n` + `is a special kind of Ember object (a proxy). Therefore, it is still necessary\n` + `to use \`.get('${String(property)}')\` in this case.\n\n` + `If you encountered this error because of third-party code that you don't control,\n` + `there is more information at https://github.com/emberjs/ember.js/issues/16148, and\n` + `you can help us improve this error message by telling us more about what happened in\n` + `this situation.`;
|
|
23759
23593
|
};
|
|
@@ -23777,10 +23611,13 @@ define("@ember/-internals/runtime/lib/system/core_object", ["exports", "@ember/-
|
|
|
23777
23611
|
}
|
|
23778
23612
|
|
|
23779
23613
|
});
|
|
23614
|
+
} else {
|
|
23615
|
+
self = this;
|
|
23780
23616
|
}
|
|
23781
23617
|
|
|
23618
|
+
var destroyable = self;
|
|
23782
23619
|
(0, _destroyable.registerDestructor)(self, ensureDestroyCalled, true);
|
|
23783
|
-
(0, _destroyable.registerDestructor)(self, () =>
|
|
23620
|
+
(0, _destroyable.registerDestructor)(self, () => destroyable.willDestroy()); // disable chains
|
|
23784
23621
|
|
|
23785
23622
|
var m = (0, _meta2.meta)(self);
|
|
23786
23623
|
m.setInitializing(); // only return when in debug builds and `self` is the proxy created above
|
|
@@ -23803,61 +23640,61 @@ define("@ember/-internals/runtime/lib/system/core_object", ["exports", "@ember/-
|
|
|
23803
23640
|
/**
|
|
23804
23641
|
An overridable method called when objects are instantiated. By default,
|
|
23805
23642
|
does nothing unless it is overridden during class definition.
|
|
23806
|
-
|
|
23807
|
-
|
|
23643
|
+
Example:
|
|
23644
|
+
```javascript
|
|
23808
23645
|
import EmberObject from '@ember/object';
|
|
23809
|
-
|
|
23646
|
+
const Person = EmberObject.extend({
|
|
23810
23647
|
init() {
|
|
23811
23648
|
alert(`Name is ${this.get('name')}`);
|
|
23812
23649
|
}
|
|
23813
23650
|
});
|
|
23814
|
-
|
|
23651
|
+
let steve = Person.create({
|
|
23815
23652
|
name: 'Steve'
|
|
23816
23653
|
});
|
|
23817
|
-
|
|
23654
|
+
// alerts 'Name is Steve'.
|
|
23818
23655
|
```
|
|
23819
|
-
|
|
23656
|
+
NOTE: If you do override `init` for a framework class like `Component`
|
|
23820
23657
|
from `@ember/component`, be sure to call `this._super(...arguments)`
|
|
23821
23658
|
in your `init` declaration!
|
|
23822
23659
|
If you don't, Ember may not have an opportunity to
|
|
23823
23660
|
do important setup work, and you'll see strange behavior in your
|
|
23824
23661
|
application.
|
|
23825
|
-
|
|
23662
|
+
@method init
|
|
23826
23663
|
@public
|
|
23827
23664
|
*/
|
|
23828
23665
|
|
|
23829
23666
|
|
|
23830
|
-
init() {}
|
|
23667
|
+
init(_properties) {}
|
|
23831
23668
|
/**
|
|
23832
23669
|
Defines the properties that will be concatenated from the superclass
|
|
23833
23670
|
(instead of overridden).
|
|
23834
|
-
|
|
23671
|
+
By default, when you extend an Ember class a property defined in
|
|
23835
23672
|
the subclass overrides a property with the same name that is defined
|
|
23836
23673
|
in the superclass. However, there are some cases where it is preferable
|
|
23837
23674
|
to build up a property's value by combining the superclass' property
|
|
23838
23675
|
value with the subclass' value. An example of this in use within Ember
|
|
23839
23676
|
is the `classNames` property of `Component` from `@ember/component`.
|
|
23840
|
-
|
|
23677
|
+
Here is some sample code showing the difference between a concatenated
|
|
23841
23678
|
property and a normal one:
|
|
23842
|
-
|
|
23679
|
+
```javascript
|
|
23843
23680
|
import EmberObject from '@ember/object';
|
|
23844
|
-
|
|
23681
|
+
const Bar = EmberObject.extend({
|
|
23845
23682
|
// Configure which properties to concatenate
|
|
23846
23683
|
concatenatedProperties: ['concatenatedProperty'],
|
|
23847
|
-
|
|
23684
|
+
someNonConcatenatedProperty: ['bar'],
|
|
23848
23685
|
concatenatedProperty: ['bar']
|
|
23849
23686
|
});
|
|
23850
|
-
|
|
23687
|
+
const FooBar = Bar.extend({
|
|
23851
23688
|
someNonConcatenatedProperty: ['foo'],
|
|
23852
23689
|
concatenatedProperty: ['foo']
|
|
23853
23690
|
});
|
|
23854
|
-
|
|
23691
|
+
let fooBar = FooBar.create();
|
|
23855
23692
|
fooBar.get('someNonConcatenatedProperty'); // ['foo']
|
|
23856
23693
|
fooBar.get('concatenatedProperty'); // ['bar', 'foo']
|
|
23857
23694
|
```
|
|
23858
|
-
|
|
23695
|
+
This behavior extends to object creation as well. Continuing the
|
|
23859
23696
|
above example:
|
|
23860
|
-
|
|
23697
|
+
```javascript
|
|
23861
23698
|
let fooBar = FooBar.create({
|
|
23862
23699
|
someNonConcatenatedProperty: ['baz'],
|
|
23863
23700
|
concatenatedProperty: ['baz']
|
|
@@ -23865,23 +23702,23 @@ define("@ember/-internals/runtime/lib/system/core_object", ["exports", "@ember/-
|
|
|
23865
23702
|
fooBar.get('someNonConcatenatedProperty'); // ['baz']
|
|
23866
23703
|
fooBar.get('concatenatedProperty'); // ['bar', 'foo', 'baz']
|
|
23867
23704
|
```
|
|
23868
|
-
|
|
23869
|
-
|
|
23705
|
+
Adding a single property that is not an array will just add it in the array:
|
|
23706
|
+
```javascript
|
|
23870
23707
|
let fooBar = FooBar.create({
|
|
23871
23708
|
concatenatedProperty: 'baz'
|
|
23872
23709
|
})
|
|
23873
23710
|
view.get('concatenatedProperty'); // ['bar', 'foo', 'baz']
|
|
23874
23711
|
```
|
|
23875
|
-
|
|
23712
|
+
Using the `concatenatedProperties` property, we can tell Ember to mix the
|
|
23876
23713
|
content of the properties.
|
|
23877
|
-
|
|
23714
|
+
In `Component` the `classNames`, `classNameBindings` and
|
|
23878
23715
|
`attributeBindings` properties are concatenated.
|
|
23879
|
-
|
|
23716
|
+
This feature is available for you to use throughout the Ember object model,
|
|
23880
23717
|
although typical app developers are likely to use it infrequently. Since
|
|
23881
23718
|
it changes expectations about behavior of properties, you should properly
|
|
23882
23719
|
document its usage in each individual concatenated property (to not
|
|
23883
23720
|
mislead your users to think they can override the property in a subclass).
|
|
23884
|
-
|
|
23721
|
+
@property concatenatedProperties
|
|
23885
23722
|
@type Array
|
|
23886
23723
|
@default null
|
|
23887
23724
|
@public
|
|
@@ -23890,20 +23727,20 @@ define("@ember/-internals/runtime/lib/system/core_object", ["exports", "@ember/-
|
|
|
23890
23727
|
/**
|
|
23891
23728
|
Defines the properties that will be merged from the superclass
|
|
23892
23729
|
(instead of overridden).
|
|
23893
|
-
|
|
23730
|
+
By default, when you extend an Ember class a property defined in
|
|
23894
23731
|
the subclass overrides a property with the same name that is defined
|
|
23895
23732
|
in the superclass. However, there are some cases where it is preferable
|
|
23896
23733
|
to build up a property's value by merging the superclass property value
|
|
23897
23734
|
with the subclass property's value. An example of this in use within Ember
|
|
23898
23735
|
is the `queryParams` property of routes.
|
|
23899
|
-
|
|
23736
|
+
Here is some sample code showing the difference between a merged
|
|
23900
23737
|
property and a normal one:
|
|
23901
|
-
|
|
23738
|
+
```javascript
|
|
23902
23739
|
import EmberObject from '@ember/object';
|
|
23903
|
-
|
|
23740
|
+
const Bar = EmberObject.extend({
|
|
23904
23741
|
// Configure which properties are to be merged
|
|
23905
23742
|
mergedProperties: ['mergedProperty'],
|
|
23906
|
-
|
|
23743
|
+
someNonMergedProperty: {
|
|
23907
23744
|
nonMerged: 'superclass value of nonMerged'
|
|
23908
23745
|
},
|
|
23909
23746
|
mergedProperty: {
|
|
@@ -23911,7 +23748,7 @@ define("@ember/-internals/runtime/lib/system/core_object", ["exports", "@ember/-
|
|
|
23911
23748
|
limit: { replace: true }
|
|
23912
23749
|
}
|
|
23913
23750
|
});
|
|
23914
|
-
|
|
23751
|
+
const FooBar = Bar.extend({
|
|
23915
23752
|
someNonMergedProperty: {
|
|
23916
23753
|
completelyNonMerged: 'subclass value of nonMerged'
|
|
23917
23754
|
},
|
|
@@ -23919,13 +23756,13 @@ define("@ember/-internals/runtime/lib/system/core_object", ["exports", "@ember/-
|
|
|
23919
23756
|
limit: { replace: false }
|
|
23920
23757
|
}
|
|
23921
23758
|
});
|
|
23922
|
-
|
|
23923
|
-
|
|
23759
|
+
let fooBar = FooBar.create();
|
|
23760
|
+
fooBar.get('someNonMergedProperty');
|
|
23924
23761
|
// => { completelyNonMerged: 'subclass value of nonMerged' }
|
|
23925
23762
|
//
|
|
23926
23763
|
// Note the entire object, including the nonMerged property of
|
|
23927
23764
|
// the superclass object, has been replaced
|
|
23928
|
-
|
|
23765
|
+
fooBar.get('mergedProperty');
|
|
23929
23766
|
// => {
|
|
23930
23767
|
// page: {replace: false},
|
|
23931
23768
|
// limit: {replace: false}
|
|
@@ -23935,15 +23772,15 @@ define("@ember/-internals/runtime/lib/system/core_object", ["exports", "@ember/-
|
|
|
23935
23772
|
// `limit` property's value of `false` has been merged from
|
|
23936
23773
|
// the subclass.
|
|
23937
23774
|
```
|
|
23938
|
-
|
|
23775
|
+
This behavior is not available during object `create` calls. It is only
|
|
23939
23776
|
available at `extend` time.
|
|
23940
|
-
|
|
23941
|
-
|
|
23777
|
+
In `Route` the `queryParams` property is merged.
|
|
23778
|
+
This feature is available for you to use throughout the Ember object model,
|
|
23942
23779
|
although typical app developers are likely to use it infrequently. Since
|
|
23943
23780
|
it changes expectations about behavior of properties, you should properly
|
|
23944
23781
|
document its usage in each individual merged property (to not
|
|
23945
23782
|
mislead your users to think they can override the property in a subclass).
|
|
23946
|
-
|
|
23783
|
+
@property mergedProperties
|
|
23947
23784
|
@type Array
|
|
23948
23785
|
@default null
|
|
23949
23786
|
@public
|
|
@@ -23951,9 +23788,9 @@ define("@ember/-internals/runtime/lib/system/core_object", ["exports", "@ember/-
|
|
|
23951
23788
|
|
|
23952
23789
|
/**
|
|
23953
23790
|
Destroyed object property flag.
|
|
23954
|
-
|
|
23791
|
+
if this property is `true` the observers and bindings were already
|
|
23955
23792
|
removed by the effect of calling the `destroy()` method.
|
|
23956
|
-
|
|
23793
|
+
@property isDestroyed
|
|
23957
23794
|
@default false
|
|
23958
23795
|
@public
|
|
23959
23796
|
*/
|
|
@@ -23963,14 +23800,14 @@ define("@ember/-internals/runtime/lib/system/core_object", ["exports", "@ember/-
|
|
|
23963
23800
|
return (0, _destroyable.isDestroyed)(this);
|
|
23964
23801
|
}
|
|
23965
23802
|
|
|
23966
|
-
set isDestroyed(
|
|
23803
|
+
set isDestroyed(_value) {
|
|
23967
23804
|
(true && !(false) && (0, _debug.assert)(`You cannot set \`${this}.isDestroyed\` directly, please use \`.destroy()\`.`, false));
|
|
23968
23805
|
}
|
|
23969
23806
|
/**
|
|
23970
23807
|
Destruction scheduled flag. The `destroy()` method has been called.
|
|
23971
|
-
|
|
23808
|
+
The object stays intact until the end of the run loop at which point
|
|
23972
23809
|
the `isDestroyed` flag is set.
|
|
23973
|
-
|
|
23810
|
+
@property isDestroying
|
|
23974
23811
|
@default false
|
|
23975
23812
|
@public
|
|
23976
23813
|
*/
|
|
@@ -23980,17 +23817,17 @@ define("@ember/-internals/runtime/lib/system/core_object", ["exports", "@ember/-
|
|
|
23980
23817
|
return (0, _destroyable.isDestroying)(this);
|
|
23981
23818
|
}
|
|
23982
23819
|
|
|
23983
|
-
set isDestroying(
|
|
23820
|
+
set isDestroying(_value) {
|
|
23984
23821
|
(true && !(false) && (0, _debug.assert)(`You cannot set \`${this}.isDestroying\` directly, please use \`.destroy()\`.`, false));
|
|
23985
23822
|
}
|
|
23986
23823
|
/**
|
|
23987
23824
|
Destroys an object by setting the `isDestroyed` flag and removing its
|
|
23988
23825
|
metadata, which effectively destroys observers and bindings.
|
|
23989
|
-
|
|
23826
|
+
If you try to set a property on a destroyed object, an exception will be
|
|
23990
23827
|
raised.
|
|
23991
|
-
|
|
23828
|
+
Note that destruction is scheduled for the end of the run loop and does not
|
|
23992
23829
|
happen immediately. It will set an isDestroying flag immediately.
|
|
23993
|
-
|
|
23830
|
+
@method destroy
|
|
23994
23831
|
@return {EmberObject} receiver
|
|
23995
23832
|
@public
|
|
23996
23833
|
*/
|
|
@@ -24010,7 +23847,7 @@ define("@ember/-internals/runtime/lib/system/core_object", ["exports", "@ember/-
|
|
|
24010
23847
|
}
|
|
24011
23848
|
/**
|
|
24012
23849
|
Override to implement teardown.
|
|
24013
|
-
|
|
23850
|
+
@method willDestroy
|
|
24014
23851
|
@public
|
|
24015
23852
|
*/
|
|
24016
23853
|
|
|
@@ -24020,22 +23857,22 @@ define("@ember/-internals/runtime/lib/system/core_object", ["exports", "@ember/-
|
|
|
24020
23857
|
Returns a string representation which attempts to provide more information
|
|
24021
23858
|
than Javascript's `toString` typically does, in a generic way for all Ember
|
|
24022
23859
|
objects.
|
|
24023
|
-
|
|
23860
|
+
```javascript
|
|
24024
23861
|
import EmberObject from '@ember/object';
|
|
24025
|
-
|
|
23862
|
+
const Person = EmberObject.extend();
|
|
24026
23863
|
person = Person.create();
|
|
24027
23864
|
person.toString(); //=> "<Person:ember1024>"
|
|
24028
23865
|
```
|
|
24029
|
-
|
|
23866
|
+
If the object's class is not defined on an Ember namespace, it will
|
|
24030
23867
|
indicate it is a subclass of the registered superclass:
|
|
24031
|
-
|
|
23868
|
+
```javascript
|
|
24032
23869
|
const Student = Person.extend();
|
|
24033
23870
|
let student = Student.create();
|
|
24034
23871
|
student.toString(); //=> "<(subclass of Person):ember1025>"
|
|
24035
23872
|
```
|
|
24036
|
-
|
|
23873
|
+
If the method `toStringExtension` is defined, its return value will be
|
|
24037
23874
|
included in the output.
|
|
24038
|
-
|
|
23875
|
+
```javascript
|
|
24039
23876
|
const Teacher = Person.extend({
|
|
24040
23877
|
toStringExtension() {
|
|
24041
23878
|
return this.get('fullName');
|
|
@@ -24044,133 +23881,34 @@ define("@ember/-internals/runtime/lib/system/core_object", ["exports", "@ember/-
|
|
|
24044
23881
|
teacher = Teacher.create();
|
|
24045
23882
|
teacher.toString(); //=> "<Teacher:ember1026:Tom Dale>"
|
|
24046
23883
|
```
|
|
24047
|
-
|
|
23884
|
+
@method toString
|
|
24048
23885
|
@return {String} string representation
|
|
24049
23886
|
@public
|
|
24050
23887
|
*/
|
|
24051
23888
|
|
|
24052
23889
|
|
|
24053
23890
|
toString() {
|
|
24054
|
-
var
|
|
24055
|
-
var extension = hasToStringExtension ? `:${this.toStringExtension()}` : '';
|
|
23891
|
+
var extension = hasToStringExtension(this) ? `:${this.toStringExtension()}` : '';
|
|
24056
23892
|
return `<${(0, _container.getFactoryFor)(this) || '(unknown)'}:${(0, _utils.guidFor)(this)}${extension}>`;
|
|
24057
23893
|
}
|
|
24058
|
-
/**
|
|
24059
|
-
Creates a new subclass.
|
|
24060
|
-
```javascript
|
|
24061
|
-
import EmberObject from '@ember/object';
|
|
24062
|
-
const Person = EmberObject.extend({
|
|
24063
|
-
say(thing) {
|
|
24064
|
-
alert(thing);
|
|
24065
|
-
}
|
|
24066
|
-
});
|
|
24067
|
-
```
|
|
24068
|
-
This defines a new subclass of EmberObject: `Person`. It contains one method: `say()`.
|
|
24069
|
-
You can also create a subclass from any existing class by calling its `extend()` method.
|
|
24070
|
-
For example, you might want to create a subclass of Ember's built-in `Component` class:
|
|
24071
|
-
```javascript
|
|
24072
|
-
import Component from '@ember/component';
|
|
24073
|
-
const PersonComponent = Component.extend({
|
|
24074
|
-
tagName: 'li',
|
|
24075
|
-
classNameBindings: ['isAdministrator']
|
|
24076
|
-
});
|
|
24077
|
-
```
|
|
24078
|
-
When defining a subclass, you can override methods but still access the
|
|
24079
|
-
implementation of your parent class by calling the special `_super()` method:
|
|
24080
|
-
```javascript
|
|
24081
|
-
import EmberObject from '@ember/object';
|
|
24082
|
-
const Person = EmberObject.extend({
|
|
24083
|
-
say(thing) {
|
|
24084
|
-
let name = this.get('name');
|
|
24085
|
-
alert(`${name} says: ${thing}`);
|
|
24086
|
-
}
|
|
24087
|
-
});
|
|
24088
|
-
const Soldier = Person.extend({
|
|
24089
|
-
say(thing) {
|
|
24090
|
-
this._super(`${thing}, sir!`);
|
|
24091
|
-
},
|
|
24092
|
-
march(numberOfHours) {
|
|
24093
|
-
alert(`${this.get('name')} marches for ${numberOfHours} hours.`);
|
|
24094
|
-
}
|
|
24095
|
-
});
|
|
24096
|
-
let yehuda = Soldier.create({
|
|
24097
|
-
name: 'Yehuda Katz'
|
|
24098
|
-
});
|
|
24099
|
-
yehuda.say('Yes'); // alerts "Yehuda Katz says: Yes, sir!"
|
|
24100
|
-
```
|
|
24101
|
-
The `create()` on line #17 creates an *instance* of the `Soldier` class.
|
|
24102
|
-
The `extend()` on line #8 creates a *subclass* of `Person`. Any instance
|
|
24103
|
-
of the `Person` class will *not* have the `march()` method.
|
|
24104
|
-
You can also pass `Mixin` classes to add additional properties to the subclass.
|
|
24105
|
-
```javascript
|
|
24106
|
-
import EmberObject from '@ember/object';
|
|
24107
|
-
import Mixin from '@ember/object/mixin';
|
|
24108
|
-
const Person = EmberObject.extend({
|
|
24109
|
-
say(thing) {
|
|
24110
|
-
alert(`${this.get('name')} says: ${thing}`);
|
|
24111
|
-
}
|
|
24112
|
-
});
|
|
24113
|
-
const SingingMixin = Mixin.create({
|
|
24114
|
-
sing(thing) {
|
|
24115
|
-
alert(`${this.get('name')} sings: la la la ${thing}`);
|
|
24116
|
-
}
|
|
24117
|
-
});
|
|
24118
|
-
const BroadwayStar = Person.extend(SingingMixin, {
|
|
24119
|
-
dance() {
|
|
24120
|
-
alert(`${this.get('name')} dances: tap tap tap tap `);
|
|
24121
|
-
}
|
|
24122
|
-
});
|
|
24123
|
-
```
|
|
24124
|
-
The `BroadwayStar` class contains three methods: `say()`, `sing()`, and `dance()`.
|
|
24125
|
-
@method extend
|
|
24126
|
-
@static
|
|
24127
|
-
@for @ember/object
|
|
24128
|
-
@param {Mixin} [mixins]* One or more Mixin classes
|
|
24129
|
-
@param {Object} [arguments]* Object containing values to use within the new class
|
|
24130
|
-
@public
|
|
24131
|
-
*/
|
|
24132
|
-
|
|
24133
23894
|
|
|
24134
23895
|
static extend() {
|
|
24135
23896
|
var Class = class extends this {};
|
|
24136
|
-
|
|
23897
|
+
|
|
23898
|
+
for (var _len2 = arguments.length, mixins = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
23899
|
+
mixins[_key2] = arguments[_key2];
|
|
23900
|
+
}
|
|
23901
|
+
|
|
23902
|
+
reopen.apply(Class.PrototypeMixin, mixins);
|
|
24137
23903
|
return Class;
|
|
24138
23904
|
}
|
|
24139
|
-
/**
|
|
24140
|
-
Creates an instance of a class. Accepts either no arguments, or an object
|
|
24141
|
-
containing values to initialize the newly instantiated object with.
|
|
24142
|
-
```javascript
|
|
24143
|
-
import EmberObject from '@ember/object';
|
|
24144
|
-
const Person = EmberObject.extend({
|
|
24145
|
-
helloWorld() {
|
|
24146
|
-
alert(`Hi, my name is ${this.get('name')}`);
|
|
24147
|
-
}
|
|
24148
|
-
});
|
|
24149
|
-
let tom = Person.create({
|
|
24150
|
-
name: 'Tom Dale'
|
|
24151
|
-
});
|
|
24152
|
-
tom.helloWorld(); // alerts "Hi, my name is Tom Dale".
|
|
24153
|
-
```
|
|
24154
|
-
`create` will call the `init` function if defined during
|
|
24155
|
-
`AnyObject.extend`
|
|
24156
|
-
If no arguments are passed to `create`, it will not set values to the new
|
|
24157
|
-
instance during initialization:
|
|
24158
|
-
```javascript
|
|
24159
|
-
let noName = Person.create();
|
|
24160
|
-
noName.helloWorld(); // alerts undefined
|
|
24161
|
-
```
|
|
24162
|
-
NOTE: For performance reasons, you cannot declare methods or computed
|
|
24163
|
-
properties during `create`. You should instead declare methods and computed
|
|
24164
|
-
properties when using `extend`.
|
|
24165
|
-
@method create
|
|
24166
|
-
@for @ember/object
|
|
24167
|
-
@static
|
|
24168
|
-
@param [arguments]*
|
|
24169
|
-
@public
|
|
24170
|
-
*/
|
|
24171
23905
|
|
|
23906
|
+
static create() {
|
|
23907
|
+
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
23908
|
+
args[_key3] = arguments[_key3];
|
|
23909
|
+
}
|
|
24172
23910
|
|
|
24173
|
-
|
|
23911
|
+
var props = args[0];
|
|
24174
23912
|
var instance;
|
|
24175
23913
|
|
|
24176
23914
|
if (props !== undefined) {
|
|
@@ -24180,10 +23918,10 @@ define("@ember/-internals/runtime/lib/system/core_object", ["exports", "@ember/-
|
|
|
24180
23918
|
instance = new this();
|
|
24181
23919
|
}
|
|
24182
23920
|
|
|
24183
|
-
if (
|
|
23921
|
+
if (args.length <= 1) {
|
|
24184
23922
|
initialize(instance, props);
|
|
24185
23923
|
} else {
|
|
24186
|
-
initialize(instance, flattenProps.apply(this,
|
|
23924
|
+
initialize(instance, flattenProps.apply(this, args));
|
|
24187
23925
|
}
|
|
24188
23926
|
|
|
24189
23927
|
return instance;
|
|
@@ -24191,25 +23929,25 @@ define("@ember/-internals/runtime/lib/system/core_object", ["exports", "@ember/-
|
|
|
24191
23929
|
/**
|
|
24192
23930
|
Augments a constructor's prototype with additional
|
|
24193
23931
|
properties and functions:
|
|
24194
|
-
|
|
23932
|
+
```javascript
|
|
24195
23933
|
import EmberObject from '@ember/object';
|
|
24196
|
-
|
|
23934
|
+
const MyObject = EmberObject.extend({
|
|
24197
23935
|
name: 'an object'
|
|
24198
23936
|
});
|
|
24199
|
-
|
|
23937
|
+
o = MyObject.create();
|
|
24200
23938
|
o.get('name'); // 'an object'
|
|
24201
|
-
|
|
23939
|
+
MyObject.reopen({
|
|
24202
23940
|
say(msg) {
|
|
24203
23941
|
console.log(msg);
|
|
24204
23942
|
}
|
|
24205
23943
|
});
|
|
24206
|
-
|
|
23944
|
+
o2 = MyObject.create();
|
|
24207
23945
|
o2.say('hello'); // logs "hello"
|
|
24208
|
-
|
|
23946
|
+
o.say('goodbye'); // logs "goodbye"
|
|
24209
23947
|
```
|
|
24210
|
-
|
|
23948
|
+
To add functions and properties to the constructor itself,
|
|
24211
23949
|
see `reopenClass`
|
|
24212
|
-
|
|
23950
|
+
@method reopen
|
|
24213
23951
|
@for @ember/object
|
|
24214
23952
|
@static
|
|
24215
23953
|
@public
|
|
@@ -24218,7 +23956,12 @@ define("@ember/-internals/runtime/lib/system/core_object", ["exports", "@ember/-
|
|
|
24218
23956
|
|
|
24219
23957
|
static reopen() {
|
|
24220
23958
|
this.willReopen();
|
|
24221
|
-
|
|
23959
|
+
|
|
23960
|
+
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
23961
|
+
args[_key4] = arguments[_key4];
|
|
23962
|
+
}
|
|
23963
|
+
|
|
23964
|
+
reopen.apply(this.PrototypeMixin, args);
|
|
24222
23965
|
return this;
|
|
24223
23966
|
}
|
|
24224
23967
|
|
|
@@ -24237,47 +23980,47 @@ define("@ember/-internals/runtime/lib/system/core_object", ["exports", "@ember/-
|
|
|
24237
23980
|
}
|
|
24238
23981
|
/**
|
|
24239
23982
|
Augments a constructor's own properties and functions:
|
|
24240
|
-
|
|
23983
|
+
```javascript
|
|
24241
23984
|
import EmberObject from '@ember/object';
|
|
24242
|
-
|
|
23985
|
+
const MyObject = EmberObject.extend({
|
|
24243
23986
|
name: 'an object'
|
|
24244
23987
|
});
|
|
24245
|
-
|
|
23988
|
+
MyObject.reopenClass({
|
|
24246
23989
|
canBuild: false
|
|
24247
23990
|
});
|
|
24248
|
-
|
|
23991
|
+
MyObject.canBuild; // false
|
|
24249
23992
|
o = MyObject.create();
|
|
24250
23993
|
```
|
|
24251
|
-
|
|
23994
|
+
In other words, this creates static properties and functions for the class.
|
|
24252
23995
|
These are only available on the class and not on any instance of that class.
|
|
24253
|
-
|
|
23996
|
+
```javascript
|
|
24254
23997
|
import EmberObject from '@ember/object';
|
|
24255
|
-
|
|
23998
|
+
const Person = EmberObject.extend({
|
|
24256
23999
|
name: '',
|
|
24257
24000
|
sayHello() {
|
|
24258
24001
|
alert(`Hello. My name is ${this.get('name')}`);
|
|
24259
24002
|
}
|
|
24260
24003
|
});
|
|
24261
|
-
|
|
24004
|
+
Person.reopenClass({
|
|
24262
24005
|
species: 'Homo sapiens',
|
|
24263
|
-
|
|
24006
|
+
createPerson(name) {
|
|
24264
24007
|
return Person.create({ name });
|
|
24265
24008
|
}
|
|
24266
24009
|
});
|
|
24267
|
-
|
|
24010
|
+
let tom = Person.create({
|
|
24268
24011
|
name: 'Tom Dale'
|
|
24269
24012
|
});
|
|
24270
24013
|
let yehuda = Person.createPerson('Yehuda Katz');
|
|
24271
|
-
|
|
24014
|
+
tom.sayHello(); // "Hello. My name is Tom Dale"
|
|
24272
24015
|
yehuda.sayHello(); // "Hello. My name is Yehuda Katz"
|
|
24273
24016
|
alert(Person.species); // "Homo sapiens"
|
|
24274
24017
|
```
|
|
24275
|
-
|
|
24018
|
+
Note that `species` and `createPerson` are *not* valid on the `tom` and `yehuda`
|
|
24276
24019
|
variables. They are only valid on `Person`.
|
|
24277
|
-
|
|
24020
|
+
To add functions and properties to instances of
|
|
24278
24021
|
a constructor by extending the constructor's prototype
|
|
24279
24022
|
see `reopen`
|
|
24280
|
-
|
|
24023
|
+
@method reopenClass
|
|
24281
24024
|
@for @ember/object
|
|
24282
24025
|
@static
|
|
24283
24026
|
@public
|
|
@@ -24285,7 +24028,11 @@ define("@ember/-internals/runtime/lib/system/core_object", ["exports", "@ember/-
|
|
|
24285
24028
|
|
|
24286
24029
|
|
|
24287
24030
|
static reopenClass() {
|
|
24288
|
-
(
|
|
24031
|
+
for (var _len5 = arguments.length, mixins = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
24032
|
+
mixins[_key5] = arguments[_key5];
|
|
24033
|
+
}
|
|
24034
|
+
|
|
24035
|
+
(0, _metal.applyMixin)(this, mixins);
|
|
24289
24036
|
return this;
|
|
24290
24037
|
}
|
|
24291
24038
|
|
|
@@ -24313,21 +24060,21 @@ define("@ember/-internals/runtime/lib/system/core_object", ["exports", "@ember/-
|
|
|
24313
24060
|
metadata about how they function or what values they operate on. For
|
|
24314
24061
|
example, computed property functions may close over variables that are then
|
|
24315
24062
|
no longer available for introspection.
|
|
24316
|
-
|
|
24317
|
-
|
|
24063
|
+
You can pass a hash of these values to a computed property like this:
|
|
24064
|
+
```javascript
|
|
24318
24065
|
import { computed } from '@ember/object';
|
|
24319
|
-
|
|
24066
|
+
person: computed(function() {
|
|
24320
24067
|
let personId = this.get('personId');
|
|
24321
24068
|
return Person.create({ id: personId });
|
|
24322
24069
|
}).meta({ type: Person })
|
|
24323
24070
|
```
|
|
24324
|
-
|
|
24071
|
+
Once you've done this, you can retrieve the values saved to the computed
|
|
24325
24072
|
property from your class like this:
|
|
24326
|
-
|
|
24073
|
+
```javascript
|
|
24327
24074
|
MyClass.metaForProperty('person');
|
|
24328
24075
|
```
|
|
24329
|
-
|
|
24330
|
-
|
|
24076
|
+
This will return the original hash that was passed to `meta()`.
|
|
24077
|
+
@static
|
|
24331
24078
|
@method metaForProperty
|
|
24332
24079
|
@param key {String} property name
|
|
24333
24080
|
@private
|
|
@@ -24344,7 +24091,7 @@ define("@ember/-internals/runtime/lib/system/core_object", ["exports", "@ember/-
|
|
|
24344
24091
|
/**
|
|
24345
24092
|
Iterate over each computed property for the class, passing its name
|
|
24346
24093
|
and any associated metadata (see `metaForProperty`) to the callback.
|
|
24347
|
-
|
|
24094
|
+
@static
|
|
24348
24095
|
@method eachComputedProperty
|
|
24349
24096
|
@param {Function} callback
|
|
24350
24097
|
@param {Object} binding
|
|
@@ -24417,38 +24164,19 @@ define("@ember/-internals/runtime/lib/system/core_object", ["exports", "@ember/-
|
|
|
24417
24164
|
CoreObject.isMethod = false;
|
|
24418
24165
|
|
|
24419
24166
|
function flattenProps() {
|
|
24420
|
-
var {
|
|
24421
|
-
concatenatedProperties,
|
|
24422
|
-
mergedProperties
|
|
24423
|
-
} = this;
|
|
24424
|
-
var hasConcatenatedProps = concatenatedProperties !== undefined && concatenatedProperties.length > 0;
|
|
24425
|
-
var hasMergedProps = mergedProperties !== undefined && mergedProperties.length > 0;
|
|
24426
24167
|
var initProperties = {};
|
|
24427
24168
|
|
|
24428
|
-
for (var
|
|
24429
|
-
|
|
24169
|
+
for (var _len6 = arguments.length, props = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
|
|
24170
|
+
props[_key6] = arguments[_key6];
|
|
24171
|
+
}
|
|
24172
|
+
|
|
24173
|
+
for (var properties of props) {
|
|
24430
24174
|
(true && !(!(properties instanceof _metal.Mixin)) && (0, _debug.assert)('EmberObject.create no longer supports mixing in other ' + 'definitions, use .extend & .create separately instead.', !(properties instanceof _metal.Mixin)));
|
|
24431
24175
|
var keyNames = Object.keys(properties);
|
|
24432
24176
|
|
|
24433
24177
|
for (var j = 0, k = keyNames.length; j < k; j++) {
|
|
24434
24178
|
var keyName = keyNames[j];
|
|
24435
24179
|
var value = properties[keyName];
|
|
24436
|
-
|
|
24437
|
-
if (hasConcatenatedProps && concatenatedProperties.indexOf(keyName) > -1) {
|
|
24438
|
-
var baseValue = initProperties[keyName];
|
|
24439
|
-
|
|
24440
|
-
if (baseValue) {
|
|
24441
|
-
value = (0, _utils.makeArray)(baseValue).concat(value);
|
|
24442
|
-
} else {
|
|
24443
|
-
value = (0, _utils.makeArray)(value);
|
|
24444
|
-
}
|
|
24445
|
-
}
|
|
24446
|
-
|
|
24447
|
-
if (hasMergedProps && mergedProperties.indexOf(keyName) > -1) {
|
|
24448
|
-
var _baseValue2 = initProperties[keyName];
|
|
24449
|
-
value = Object.assign({}, _baseValue2, value);
|
|
24450
|
-
}
|
|
24451
|
-
|
|
24452
24180
|
initProperties[keyName] = value;
|
|
24453
24181
|
}
|
|
24454
24182
|
}
|
|
@@ -24461,7 +24189,7 @@ define("@ember/-internals/runtime/lib/system/core_object", ["exports", "@ember/-
|
|
|
24461
24189
|
) {
|
|
24462
24190
|
/**
|
|
24463
24191
|
Provides lookup-time type validation for injected properties.
|
|
24464
|
-
|
|
24192
|
+
@private
|
|
24465
24193
|
@method _onLookup
|
|
24466
24194
|
*/
|
|
24467
24195
|
CoreObject._onLookup = function injectedPropertyAssertion(debugContainerKey) {
|
|
@@ -24479,7 +24207,7 @@ define("@ember/-internals/runtime/lib/system/core_object", ["exports", "@ember/-
|
|
|
24479
24207
|
/**
|
|
24480
24208
|
Returns a hash of property names and container names that injected
|
|
24481
24209
|
properties will lookup on the container lazily.
|
|
24482
|
-
|
|
24210
|
+
@method _lazyInjections
|
|
24483
24211
|
@return {Object} Hash of all lazy injected property keys to container names
|
|
24484
24212
|
@private
|
|
24485
24213
|
*/
|
|
@@ -24599,18 +24327,7 @@ define("@ember/-internals/runtime/lib/system/object", ["exports", "@ember/-inter
|
|
|
24599
24327
|
/**
|
|
24600
24328
|
@module @ember/object
|
|
24601
24329
|
*/
|
|
24602
|
-
|
|
24603
|
-
/**
|
|
24604
|
-
`EmberObject` is the main base class for all Ember objects. It is a subclass
|
|
24605
|
-
of `CoreObject` with the `Observable` mixin applied. For details,
|
|
24606
|
-
see the documentation for each of these.
|
|
24607
|
-
|
|
24608
|
-
@class EmberObject
|
|
24609
|
-
@extends CoreObject
|
|
24610
|
-
@uses Observable
|
|
24611
|
-
@public
|
|
24612
|
-
*/
|
|
24613
|
-
class EmberObject extends _core_object.default {
|
|
24330
|
+
class EmberObject extends _core_object.default.extend(_observable.default) {
|
|
24614
24331
|
get _debugContainerKey() {
|
|
24615
24332
|
var factory = (0, _container.getFactoryFor)(this);
|
|
24616
24333
|
return factory !== undefined && factory.fullName;
|
|
@@ -24618,21 +24335,10 @@ define("@ember/-internals/runtime/lib/system/object", ["exports", "@ember/-inter
|
|
|
24618
24335
|
|
|
24619
24336
|
}
|
|
24620
24337
|
|
|
24621
|
-
|
|
24622
|
-
|
|
24623
|
-
|
|
24624
|
-
|
|
24625
|
-
var FrameworkObject;
|
|
24338
|
+
var _default = EmberObject;
|
|
24339
|
+
_exports.default = _default;
|
|
24340
|
+
var FrameworkObject = class FrameworkObject extends EmberObject {};
|
|
24626
24341
|
_exports.FrameworkObject = FrameworkObject;
|
|
24627
|
-
_exports.FrameworkObject = FrameworkObject = class FrameworkObject extends _core_object.default {
|
|
24628
|
-
get _debugContainerKey() {
|
|
24629
|
-
var factory = (0, _container.getFactoryFor)(this);
|
|
24630
|
-
return factory !== undefined && factory.fullName;
|
|
24631
|
-
}
|
|
24632
|
-
|
|
24633
|
-
};
|
|
24634
|
-
|
|
24635
|
-
_observable.default.apply(FrameworkObject.prototype);
|
|
24636
24342
|
|
|
24637
24343
|
if (true
|
|
24638
24344
|
/* DEBUG */
|
|
@@ -24640,8 +24346,8 @@ define("@ember/-internals/runtime/lib/system/object", ["exports", "@ember/-inter
|
|
|
24640
24346
|
var INIT_WAS_CALLED = (0, _utils.symbol)('INIT_WAS_CALLED');
|
|
24641
24347
|
var ASSERT_INIT_WAS_CALLED = (0, _utils.symbol)('ASSERT_INIT_WAS_CALLED');
|
|
24642
24348
|
_exports.FrameworkObject = FrameworkObject = class DebugFrameworkObject extends EmberObject {
|
|
24643
|
-
init() {
|
|
24644
|
-
super.init(
|
|
24349
|
+
init(properties) {
|
|
24350
|
+
super.init(properties);
|
|
24645
24351
|
this[INIT_WAS_CALLED] = true;
|
|
24646
24352
|
}
|
|
24647
24353
|
|
|
@@ -27168,36 +26874,49 @@ define("@ember/-internals/views/lib/views/core_view", ["exports", "@ember/-inter
|
|
|
27168
26874
|
});
|
|
27169
26875
|
_exports.default = void 0;
|
|
27170
26876
|
|
|
27171
|
-
var
|
|
27172
|
-
|
|
27173
|
-
|
|
26877
|
+
var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
|
|
26878
|
+
var c = arguments.length,
|
|
26879
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
26880
|
+
d;
|
|
26881
|
+
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--) {
|
|
26882
|
+
if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
26883
|
+
}
|
|
26884
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
26885
|
+
};
|
|
26886
|
+
|
|
26887
|
+
class CoreView extends _runtime.FrameworkObject.extend(_runtime.Evented, _runtime.ActionHandler, {
|
|
26888
|
+
// Continue to declare `_states` here so that we have a single reference on the prototype
|
|
26889
|
+
// instead of one on each instance.
|
|
26890
|
+
_states: _states.default
|
|
26891
|
+
}) {
|
|
26892
|
+
constructor() {
|
|
26893
|
+
super(...arguments);
|
|
26894
|
+
this.isView = true;
|
|
26895
|
+
}
|
|
27174
26896
|
|
|
27175
|
-
init() {
|
|
27176
|
-
|
|
26897
|
+
init(properties) {
|
|
26898
|
+
var _a;
|
|
27177
26899
|
|
|
26900
|
+
super.init(properties); // Handle methods from Evented
|
|
26901
|
+
// The native class inheritance will not work for mixins. To work around this,
|
|
26902
|
+
// we copy the existing trigger and has methods provided by the mixin and swap in the
|
|
26903
|
+
// new ones from our class.
|
|
26904
|
+
|
|
26905
|
+
this._superTrigger = this.trigger;
|
|
26906
|
+
this.trigger = this._trigger;
|
|
26907
|
+
this._superHas = this.has;
|
|
26908
|
+
this.has = this._has;
|
|
26909
|
+
(_a = this.parentView) !== null && _a !== void 0 ? _a : this.parentView = null;
|
|
27178
26910
|
this._state = 'preRender';
|
|
27179
26911
|
this._currentState = this._states.preRender;
|
|
27180
|
-
}
|
|
27181
|
-
|
|
27182
|
-
renderer: (0, _metal.inject)('renderer', '-dom'),
|
|
27183
|
-
|
|
27184
|
-
/**
|
|
27185
|
-
If the view is currently inserted into the DOM of a parent view, this
|
|
27186
|
-
property will point to the parent of the view.
|
|
27187
|
-
@property parentView
|
|
27188
|
-
@type Ember.View
|
|
27189
|
-
@default null
|
|
27190
|
-
@private
|
|
27191
|
-
*/
|
|
27192
|
-
parentView: null,
|
|
26912
|
+
}
|
|
27193
26913
|
|
|
27194
26914
|
instrumentDetails(hash) {
|
|
27195
26915
|
hash['object'] = this.toString();
|
|
27196
26916
|
hash['containerKey'] = this._debugContainerKey;
|
|
27197
26917
|
hash['view'] = this;
|
|
27198
26918
|
return hash;
|
|
27199
|
-
}
|
|
27200
|
-
|
|
26919
|
+
}
|
|
27201
26920
|
/**
|
|
27202
26921
|
Override the default event firing from `Evented` to
|
|
27203
26922
|
also call methods with the given name.
|
|
@@ -27205,29 +26924,34 @@ define("@ember/-internals/views/lib/views/core_view", ["exports", "@ember/-inter
|
|
|
27205
26924
|
@param name {String}
|
|
27206
26925
|
@private
|
|
27207
26926
|
*/
|
|
27208
|
-
trigger
|
|
26927
|
+
// Changed to `trigger` on init
|
|
26928
|
+
|
|
26929
|
+
|
|
26930
|
+
_trigger(name) {
|
|
27209
26931
|
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
27210
26932
|
args[_key - 1] = arguments[_key];
|
|
27211
26933
|
}
|
|
27212
26934
|
|
|
27213
|
-
this.
|
|
26935
|
+
this._superTrigger(name, ...args);
|
|
27214
26936
|
|
|
27215
26937
|
var method = this[name];
|
|
27216
26938
|
|
|
27217
26939
|
if (typeof method === 'function') {
|
|
27218
26940
|
return method.apply(this, args);
|
|
27219
26941
|
}
|
|
27220
|
-
}
|
|
26942
|
+
} // Changed to `has` on init
|
|
27221
26943
|
|
|
27222
|
-
|
|
27223
|
-
|
|
26944
|
+
|
|
26945
|
+
_has(name) {
|
|
26946
|
+
return typeof this[name] === 'function' || this._superHas(name);
|
|
27224
26947
|
}
|
|
27225
26948
|
|
|
27226
|
-
}
|
|
26949
|
+
}
|
|
26950
|
+
|
|
26951
|
+
CoreView.isViewFactory = true;
|
|
26952
|
+
|
|
26953
|
+
__decorate([(0, _metal.inject)('renderer', '-dom')], CoreView.prototype, "renderer", void 0);
|
|
27227
26954
|
|
|
27228
|
-
CoreView.reopenClass({
|
|
27229
|
-
isViewFactory: true
|
|
27230
|
-
});
|
|
27231
26955
|
var _default = CoreView;
|
|
27232
26956
|
_exports.default = _default;
|
|
27233
26957
|
});
|
|
@@ -29059,8 +28783,8 @@ define("@ember/canary-features/index", ["exports", "@ember/-internals/environmen
|
|
|
29059
28783
|
@public
|
|
29060
28784
|
*/
|
|
29061
28785
|
var DEFAULT_FEATURES = {
|
|
29062
|
-
EMBER_LIBRARIES_ISREGISTERED:
|
|
29063
|
-
EMBER_IMPROVED_INSTRUMENTATION:
|
|
28786
|
+
EMBER_LIBRARIES_ISREGISTERED: false,
|
|
28787
|
+
EMBER_IMPROVED_INSTRUMENTATION: false,
|
|
29064
28788
|
EMBER_UNIQUE_ID_HELPER: true
|
|
29065
28789
|
};
|
|
29066
28790
|
/**
|
|
@@ -34076,19 +33800,6 @@ define("@ember/polyfills/lib/assign", ["exports", "@ember/debug"], function (_ex
|
|
|
34076
33800
|
return Object.assign(target, ...rest);
|
|
34077
33801
|
}
|
|
34078
33802
|
});
|
|
34079
|
-
define("@ember/renderer/index", ["exports", "@ember/-internals/glimmer"], function (_exports, _glimmer) {
|
|
34080
|
-
"use strict";
|
|
34081
|
-
|
|
34082
|
-
Object.defineProperty(_exports, "__esModule", {
|
|
34083
|
-
value: true
|
|
34084
|
-
});
|
|
34085
|
-
Object.defineProperty(_exports, "renderSettled", {
|
|
34086
|
-
enumerable: true,
|
|
34087
|
-
get: function () {
|
|
34088
|
-
return _glimmer.renderSettled;
|
|
34089
|
-
}
|
|
34090
|
-
});
|
|
34091
|
-
});
|
|
34092
33803
|
define("@ember/routing/auto-location", ["exports", "@ember/-internals/routing"], function (_exports, _routing) {
|
|
34093
33804
|
"use strict";
|
|
34094
33805
|
|
|
@@ -55051,7 +54762,7 @@ define("ember/version", ["exports"], function (_exports) {
|
|
|
55051
54762
|
value: true
|
|
55052
54763
|
});
|
|
55053
54764
|
_exports.default = void 0;
|
|
55054
|
-
var _default = "4.4.0
|
|
54765
|
+
var _default = "4.4.0";
|
|
55055
54766
|
_exports.default = _default;
|
|
55056
54767
|
});
|
|
55057
54768
|
define("route-recognizer", ["exports"], function (_exports) {
|