ember-source 4.0.0-beta.7 → 4.0.0-beta.8
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 +11 -0
- package/blueprints/acceptance-test/qunit-files/tests/acceptance/__name__-test.js +1 -1
- package/blueprints/acceptance-test/qunit-rfc-232-files/tests/acceptance/__name__-test.js +1 -1
- package/blueprints/component-test/qunit-files/__root__/__testType__/__path__/__test__.js +3 -3
- package/blueprints/helper-test/index.js +4 -22
- package/blueprints/helper-test/mocha-0.12-files/__root__/__testType__/__collection__/__name__-test.js +1 -13
- package/blueprints/helper-test/mocha-files/__root__/__testType__/__collection__/__name__-test.js +0 -13
- package/blueprints/helper-test/mocha-rfc-232-files/__root__/__testType__/__collection__/__name__-test.js +2 -12
- package/blueprints/helper-test/qunit-files/__root__/__testType__/__collection__/__name__-test.js +2 -13
- package/blueprints/helper-test/qunit-rfc-232-files/__root__/__testType__/__collection__/__name__-test.js +2 -14
- package/build-metadata.json +3 -3
- package/dist/ember-template-compiler.js +2 -5
- 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 +28 -40
- package/dist/ember.debug.map +1 -1
- package/dist/header/license.js +1 -1
- package/dist/packages/@ember/-internals/container/index.js +1 -1
- package/dist/packages/@ember/-internals/glimmer/index.js +7 -7
- package/dist/packages/@ember/-internals/utils/index.js +0 -3
- package/dist/packages/@ember/-internals/views/lib/mixins/view_support.js +4 -4
- package/dist/packages/@ember/application/lib/application.js +7 -8
- package/dist/packages/@ember/engine/index.js +1 -2
- package/dist/packages/ember/index.js +7 -13
- package/dist/packages/ember/version.js +1 -1
- package/docs/data.json +44 -68
- package/package.json +2 -2
package/dist/header/license.js
CHANGED
|
@@ -2020,10 +2020,10 @@ setInternalComponentManager(CURLY_COMPONENT_MANAGER, Component);
|
|
|
2020
2020
|
id: 'ember.component.reopen',
|
|
2021
2021
|
for: 'ember-source',
|
|
2022
2022
|
since: {
|
|
2023
|
-
enabled: '
|
|
2023
|
+
enabled: '3.27.0'
|
|
2024
2024
|
},
|
|
2025
|
-
url: 'https://deprecations.emberjs.com/
|
|
2026
|
-
until: '
|
|
2025
|
+
url: 'https://deprecations.emberjs.com/v3.x#toc_ember-component-reopen',
|
|
2026
|
+
until: '4.0.0'
|
|
2027
2027
|
});
|
|
2028
2028
|
Component._wasReopened = true;
|
|
2029
2029
|
}
|
|
@@ -2040,11 +2040,11 @@ setInternalComponentManager(CURLY_COMPONENT_MANAGER, Component);
|
|
|
2040
2040
|
deprecate('Reopening the Ember.Component super class itself is deprecated. ' + 'Consider alternatives such as installing event listeners on ' + 'the document or add the customizations to specific subclasses.', false, {
|
|
2041
2041
|
id: 'ember.component.reopen',
|
|
2042
2042
|
for: 'ember-source',
|
|
2043
|
-
url: 'https://deprecations.emberjs.com/
|
|
2043
|
+
url: 'https://deprecations.emberjs.com/v3.x#toc_ember-component-reopen',
|
|
2044
2044
|
since: {
|
|
2045
|
-
enabled: '
|
|
2045
|
+
enabled: '3.27.0'
|
|
2046
2046
|
},
|
|
2047
|
-
until: '
|
|
2047
|
+
until: '4.0.0'
|
|
2048
2048
|
});
|
|
2049
2049
|
Component._wasReopened = true;
|
|
2050
2050
|
}
|
|
@@ -2076,7 +2076,7 @@ var layout = templateFactory({
|
|
|
2076
2076
|
The `checked` attribute of an `Checkbox` object should always be set
|
|
2077
2077
|
through the Ember object or by interacting with its rendered element
|
|
2078
2078
|
representation via the mouse, keyboard, or touch. Updating the value of the
|
|
2079
|
-
checkbox
|
|
2079
|
+
checkbox programmatically will result in the checked value of the object and its
|
|
2080
2080
|
element losing synchronization.
|
|
2081
2081
|
|
|
2082
2082
|
## Layout and LayoutName properties
|
|
@@ -146,7 +146,7 @@ let mixin = {
|
|
|
146
146
|
the target element you are providing is associated with an `Application`
|
|
147
147
|
and does not have an ancestor element that is associated with an Ember view.
|
|
148
148
|
@method appendTo
|
|
149
|
-
@param {String|DOMElement
|
|
149
|
+
@param {String|DOMElement} A selector, element, HTML string
|
|
150
150
|
@return {Ember.View} receiver
|
|
151
151
|
@private
|
|
152
152
|
*/
|
|
@@ -172,8 +172,8 @@ let mixin = {
|
|
|
172
172
|
})());
|
|
173
173
|
} else {
|
|
174
174
|
target = selector;
|
|
175
|
-
assert(`You tried to append to a selector string (${selector}) in an environment without
|
|
176
|
-
assert(`You tried to append to a non-Element (${selector}) in an environment without
|
|
175
|
+
assert(`You tried to append to a selector string (${selector}) in an environment without a DOM`, typeof target !== 'string');
|
|
176
|
+
assert(`You tried to append to a non-Element (${selector}) in an environment without a DOM`, typeof selector.appendChild === 'function');
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
this.renderer.appendTo(this, target);
|
|
@@ -303,7 +303,7 @@ let mixin = {
|
|
|
303
303
|
Component properties that depend on the presence of an outer element, such
|
|
304
304
|
as `classNameBindings` and `attributeBindings`, do not work with tagless
|
|
305
305
|
components. Tagless components cannot implement methods to handle events,
|
|
306
|
-
and
|
|
306
|
+
and their `element` property has a `null` value.
|
|
307
307
|
@property tagName
|
|
308
308
|
@type String
|
|
309
309
|
@default null
|
|
@@ -110,7 +110,7 @@ import { RouterService } from '@ember/-internals/routing';
|
|
|
110
110
|
});
|
|
111
111
|
```
|
|
112
112
|
|
|
113
|
-
The `rootElement` can be either a DOM element or a
|
|
113
|
+
The `rootElement` can be either a DOM element or a CSS selector
|
|
114
114
|
string. Note that *views appended to the DOM outside the root element will
|
|
115
115
|
not receive events.* If you specify a custom root element, make sure you only
|
|
116
116
|
append views inside it!
|
|
@@ -174,8 +174,7 @@ import { RouterService } from '@ember/-internals/routing';
|
|
|
174
174
|
const Application = Engine.extend({
|
|
175
175
|
/**
|
|
176
176
|
The root DOM element of the Application. This can be specified as an
|
|
177
|
-
element or a
|
|
178
|
-
[jQuery-compatible selector string](http://api.jquery.com/category/selectors/).
|
|
177
|
+
element or a [selector string](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Selectors#reference_table_of_selectors).
|
|
179
178
|
This is the element that will be passed to the Application's,
|
|
180
179
|
`eventDispatcher`, which sets up the listeners for event delegation. Every
|
|
181
180
|
view in your application should be a child of the element you specify here.
|
|
@@ -481,10 +480,10 @@ const Application = Engine.extend({
|
|
|
481
480
|
import Application from '@ember/application';
|
|
482
481
|
let App = Application.create();
|
|
483
482
|
App.deferReadiness();
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
App.token = token;
|
|
483
|
+
fetch('/auth-token')
|
|
484
|
+
.then(response => response.json())
|
|
485
|
+
.then(data => {
|
|
486
|
+
App.token = data.token;
|
|
488
487
|
App.advanceReadiness();
|
|
489
488
|
});
|
|
490
489
|
```
|
|
@@ -831,7 +830,7 @@ const Application = Engine.extend({
|
|
|
831
830
|
in the non-browser environment, the stand-in `document` object only needs to
|
|
832
831
|
implement a limited subset of the full DOM API. The `SimpleDOM` library is known
|
|
833
832
|
to work.
|
|
834
|
-
Since there is no access
|
|
833
|
+
Since there is no DOM access in the non-browser environment, you must also
|
|
835
834
|
specify a DOM `Element` object in the same `document` for the `rootElement` option
|
|
836
835
|
(as opposed to a selector string like `"body"`).
|
|
837
836
|
See the documentation on the `isBrowser`, `document` and `rootElement` properties
|
|
@@ -292,7 +292,6 @@ Engine.reopenClass({
|
|
|
292
292
|
and after.
|
|
293
293
|
Example instanceInitializer to preload data into the store.
|
|
294
294
|
```app/initializer/preload-data.js
|
|
295
|
-
import $ from 'jquery';
|
|
296
295
|
export function initialize(application) {
|
|
297
296
|
var userConfig, userConfigEncoded, store;
|
|
298
297
|
// We have a HTML escaped JSON representation of the user's basic
|
|
@@ -303,7 +302,7 @@ Engine.reopenClass({
|
|
|
303
302
|
// like all local models and data can be manipulated by the user, so it
|
|
304
303
|
// should not be relied upon for security or authorization.
|
|
305
304
|
// Grab the encoded data from the meta tag
|
|
306
|
-
userConfigEncoded =
|
|
305
|
+
userConfigEncoded = document.querySelector('head meta[name=app-user-config]').attr('content');
|
|
307
306
|
// Unescape the text, then parse the resulting JSON into a real object
|
|
308
307
|
userConfig = JSON.parse(unescape(userConfigEncoded));
|
|
309
308
|
// Lookup the store
|
|
@@ -164,12 +164,16 @@ Ember._isDestroyed = isDestroyed;
|
|
|
164
164
|
and reporting code.
|
|
165
165
|
|
|
166
166
|
```javascript
|
|
167
|
-
import $ from 'jquery';
|
|
168
167
|
|
|
169
168
|
Ember.onerror = function(error) {
|
|
170
|
-
|
|
169
|
+
const payload = {
|
|
171
170
|
stack: error.stack,
|
|
172
171
|
otherInformation: 'whatever app state you want to provide'
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
fetch('/report-error', {
|
|
175
|
+
method: 'POST',
|
|
176
|
+
body: JSON.stringify(payload)
|
|
173
177
|
});
|
|
174
178
|
};
|
|
175
179
|
```
|
|
@@ -553,14 +557,4 @@ Ember.__loader = {
|
|
|
553
557
|
// eslint-disable-next-line no-undef
|
|
554
558
|
registry: typeof requirejs !== 'undefined' ? requirejs.entries : require.entries
|
|
555
559
|
};
|
|
556
|
-
export default Ember;
|
|
557
|
-
/**
|
|
558
|
-
@module jquery
|
|
559
|
-
@public
|
|
560
|
-
*/
|
|
561
|
-
|
|
562
|
-
/**
|
|
563
|
-
@class jquery
|
|
564
|
-
@public
|
|
565
|
-
@static
|
|
566
|
-
*/
|
|
560
|
+
export default Ember;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default "4.0.0-beta.
|
|
1
|
+
export default "4.0.0-beta.8";
|