ember-source 4.7.0-alpha.1 → 4.7.0-alpha.2
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/build-metadata.json +3 -3
- package/dist/ember-template-compiler.js +5 -7
- 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 +30 -30
- package/dist/ember.debug.map +1 -1
- package/dist/header/license.js +1 -1
- package/dist/packages/@ember/-internals/browser-environment/index.js +2 -3
- package/dist/packages/@ember/-internals/glimmer/index.js +4 -2
- package/dist/packages/@ember/-internals/metal/index.js +1 -1
- package/dist/packages/@ember/-internals/routing/lib/location/auto_location.js +5 -5
- package/dist/packages/@ember/-internals/routing/lib/location/hash_location.js +1 -1
- package/dist/packages/@ember/-internals/routing/lib/location/util.js +1 -1
- package/dist/packages/@ember/-internals/routing/lib/services/router.js +1 -1
- package/dist/packages/@ember/-internals/routing/lib/utils.js +1 -1
- package/dist/packages/@ember/application/instance.js +1 -1
- package/dist/packages/@ember/application/lib/application.js +11 -11
- package/dist/packages/ember/version.js +1 -1
- package/docs/data.json +4 -4
- package/package.json +2 -2
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.7.0-alpha.
|
|
9
|
+
* @version 4.7.0-alpha.2
|
|
10
10
|
*/
|
|
11
11
|
/* eslint-disable no-var */
|
|
12
12
|
|
|
@@ -114,7 +114,7 @@ define("@ember/-internals/browser-environment/index", ["exports"], function (_ex
|
|
|
114
114
|
Object.defineProperty(_exports, "__esModule", {
|
|
115
115
|
value: true
|
|
116
116
|
});
|
|
117
|
-
_exports.window = _exports.userAgent = _exports.location = _exports.
|
|
117
|
+
_exports.window = _exports.userAgent = _exports.location = _exports.isFirefox = _exports.isChrome = _exports.history = _exports.hasDOM = void 0;
|
|
118
118
|
// check if window exists and actually is the global
|
|
119
119
|
var hasDom = typeof self === 'object' && self !== null && self.Object === Object && typeof Window !== 'undefined' && self.constructor === Window && typeof document === 'object' && document !== null && self.document === document && typeof location === 'object' && location !== null && self.location === location && typeof history === 'object' && history !== null && self.history === history && typeof navigator === 'object' && navigator !== null && self.navigator === navigator && typeof navigator.userAgent === 'string';
|
|
120
120
|
_exports.hasDOM = hasDom;
|
|
@@ -128,10 +128,8 @@ define("@ember/-internals/browser-environment/index", ["exports"], function (_ex
|
|
|
128
128
|
_exports.userAgent = userAgent;
|
|
129
129
|
var isChrome = hasDom ? typeof chrome === 'object' && !(typeof opera === 'object') : false;
|
|
130
130
|
_exports.isChrome = isChrome;
|
|
131
|
-
var isFirefox = hasDom ?
|
|
131
|
+
var isFirefox = hasDom ? /Firefox|FxiOS/.test(userAgent) : false;
|
|
132
132
|
_exports.isFirefox = isFirefox;
|
|
133
|
-
var isIE = hasDom ? typeof MSInputMethodContext !== 'undefined' && typeof documentMode !== 'undefined' : false;
|
|
134
|
-
_exports.isIE = isIE;
|
|
135
133
|
});
|
|
136
134
|
define("@ember/-internals/container/index", ["exports", "@ember/-internals/owner", "@ember/-internals/utils", "@ember/debug"], function (_exports, _owner, _utils, _debug) {
|
|
137
135
|
"use strict";
|
|
@@ -6472,13 +6470,15 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
|
|
|
6472
6470
|
// This code should be reasonably fast, and provide a unique value every time
|
|
6473
6471
|
// it's called, which is what we need here. It produces a string formatted as a
|
|
6474
6472
|
// standard UUID, which avoids accidentally turning Ember-specific
|
|
6475
|
-
// implementation details into an intimate API.
|
|
6473
|
+
// implementation details into an intimate API. It also ensures that the UUID
|
|
6474
|
+
// always starts with a letter, to avoid creating invalid IDs with a numeric
|
|
6475
|
+
// digit at the start.
|
|
6476
6476
|
|
|
6477
6477
|
function uniqueId$1() {
|
|
6478
6478
|
// @ts-expect-error this one-liner abuses weird JavaScript semantics that
|
|
6479
6479
|
// TypeScript (legitimately) doesn't like, but they're nonetheless valid and
|
|
6480
6480
|
// specced.
|
|
6481
|
-
return ([
|
|
6481
|
+
return ([3e7] + -1e3 + -4e3 + -2e3 + -1e11).replace(/[0-3]/g, a => (a * 4 ^ Math.random() * 16 >> (a & 2)).toString(16));
|
|
6482
6482
|
}
|
|
6483
6483
|
|
|
6484
6484
|
var MODIFIERS = ['alt', 'shift', 'meta', 'ctrl'];
|
|
@@ -9791,7 +9791,7 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
|
|
|
9791
9791
|
} else {
|
|
9792
9792
|
// use metaFor here to ensure we have the meta for the instance
|
|
9793
9793
|
var lazyChains = instanceMeta.writableLazyChainsFor(segment);
|
|
9794
|
-
var rest = path.
|
|
9794
|
+
var rest = path.substring(segmentEnd + 1);
|
|
9795
9795
|
var placeholderTag = (0, _validator.createUpdatableTag)();
|
|
9796
9796
|
lazyChains.push([placeholderTag, rest]);
|
|
9797
9797
|
chainTags.push(placeholderTag);
|
|
@@ -13450,7 +13450,7 @@ define("@ember/-internals/routing/lib/location/auto_location", ["exports", "@emb
|
|
|
13450
13450
|
|
|
13451
13451
|
if (currentPath === historyPath) {
|
|
13452
13452
|
implementation = 'history';
|
|
13453
|
-
} else if (currentPath.
|
|
13453
|
+
} else if (currentPath.substring(0, 2) === '/#') {
|
|
13454
13454
|
history.replaceState({
|
|
13455
13455
|
path: historyPath
|
|
13456
13456
|
}, '', historyPath);
|
|
@@ -13500,15 +13500,15 @@ define("@ember/-internals/routing/lib/location/auto_location", ["exports", "@emb
|
|
|
13500
13500
|
// with `#/`. Anything else should NOT be considered a route and should
|
|
13501
13501
|
// be passed straight through, without transformation.
|
|
13502
13502
|
|
|
13503
|
-
if (hash.
|
|
13503
|
+
if (hash.substring(0, 2) === '#/') {
|
|
13504
13504
|
// There could be extra hash segments after the route
|
|
13505
|
-
hashParts = hash.
|
|
13505
|
+
hashParts = hash.substring(1).split('#'); // The first one is always the route url
|
|
13506
13506
|
|
|
13507
13507
|
routeHash = hashParts.shift(); // If the path already has a trailing slash, remove the one
|
|
13508
13508
|
// from the hashed route so we don't double up.
|
|
13509
13509
|
|
|
13510
13510
|
if (path.charAt(path.length - 1) === '/') {
|
|
13511
|
-
routeHash = routeHash.
|
|
13511
|
+
routeHash = routeHash.substring(1);
|
|
13512
13512
|
} // This is the "expected" final order
|
|
13513
13513
|
|
|
13514
13514
|
|
|
@@ -13536,7 +13536,7 @@ define("@ember/-internals/routing/lib/location/auto_location", ["exports", "@emb
|
|
|
13536
13536
|
function getHashPath(rootURL, location) {
|
|
13537
13537
|
var path = rootURL;
|
|
13538
13538
|
var historyPath = getHistoryPath(rootURL, location);
|
|
13539
|
-
var routePath = historyPath.
|
|
13539
|
+
var routePath = historyPath.substring(rootURL.length);
|
|
13540
13540
|
|
|
13541
13541
|
if (routePath !== '') {
|
|
13542
13542
|
if (routePath[0] !== '/') {
|
|
@@ -13622,7 +13622,7 @@ define("@ember/-internals/routing/lib/location/hash_location", ["exports", "@emb
|
|
|
13622
13622
|
|
|
13623
13623
|
|
|
13624
13624
|
getURL() {
|
|
13625
|
-
var originalPath = this.getHash().
|
|
13625
|
+
var originalPath = this.getHash().substring(1);
|
|
13626
13626
|
var outPath = originalPath;
|
|
13627
13627
|
|
|
13628
13628
|
if (outPath[0] !== '/') {
|
|
@@ -14201,7 +14201,7 @@ define("@ember/-internals/routing/lib/location/util", ["exports"], function (_ex
|
|
|
14201
14201
|
|
|
14202
14202
|
function getHash(location) {
|
|
14203
14203
|
if (location.hash !== undefined) {
|
|
14204
|
-
return location.hash.
|
|
14204
|
+
return location.hash.substring(0);
|
|
14205
14205
|
}
|
|
14206
14206
|
|
|
14207
14207
|
return '';
|
|
@@ -14299,7 +14299,7 @@ define("@ember/-internals/routing/lib/services/router", ["exports", "@ember/-int
|
|
|
14299
14299
|
return url;
|
|
14300
14300
|
}
|
|
14301
14301
|
|
|
14302
|
-
return url.
|
|
14302
|
+
return url.substring(rootURL.length);
|
|
14303
14303
|
}
|
|
14304
14304
|
|
|
14305
14305
|
class RouterService extends _service.default.extend(_runtime.Evented) {
|
|
@@ -19148,7 +19148,7 @@ define("@ember/-internals/routing/lib/utils", ["exports", "@ember/-internals/met
|
|
|
19148
19148
|
|
|
19149
19149
|
if (values) {
|
|
19150
19150
|
if (cacheValuePrefix && cacheValuePrefix in values) {
|
|
19151
|
-
var partRemovedPrefix = part.indexOf(cacheValuePrefix) === 0 ? part.
|
|
19151
|
+
var partRemovedPrefix = part.indexOf(cacheValuePrefix) === 0 ? part.substring(cacheValuePrefix.length + 1) : part;
|
|
19152
19152
|
value = (0, _metal.get)(values[cacheValuePrefix], partRemovedPrefix);
|
|
19153
19153
|
} else {
|
|
19154
19154
|
value = (0, _metal.get)(values, part);
|
|
@@ -27042,7 +27042,7 @@ define("@ember/application/instance", ["exports", "@ember/-internals/metal", "@e
|
|
|
27042
27042
|
Navigate the instance to a particular URL. This is useful in tests, for
|
|
27043
27043
|
example, or to tell the app to start at a particular URL. This method
|
|
27044
27044
|
returns a promise that resolves with the app instance when the transition
|
|
27045
|
-
is complete, or rejects if the
|
|
27045
|
+
is complete, or rejects if the transition was aborted due to an error.
|
|
27046
27046
|
@public
|
|
27047
27047
|
@param url {String} the destination URL
|
|
27048
27048
|
@return {Promise<ApplicationInstance>}
|
|
@@ -27242,11 +27242,11 @@ define("@ember/application/lib/application", ["exports", "@ember/-internals/util
|
|
|
27242
27242
|
initialized.
|
|
27243
27243
|
|
|
27244
27244
|
```app/app.js
|
|
27245
|
-
|
|
27245
|
+
export default class App extends Application {
|
|
27246
27246
|
ready() {
|
|
27247
27247
|
// your code here
|
|
27248
27248
|
}
|
|
27249
|
-
}
|
|
27249
|
+
}
|
|
27250
27250
|
```
|
|
27251
27251
|
|
|
27252
27252
|
Because `Application` ultimately inherits from `Ember.Namespace`, any classes
|
|
@@ -27283,12 +27283,12 @@ define("@ember/application/lib/application", ["exports", "@ember/-internals/util
|
|
|
27283
27283
|
```app/app.js
|
|
27284
27284
|
import Application from '@ember/application';
|
|
27285
27285
|
|
|
27286
|
-
|
|
27287
|
-
customEvents
|
|
27286
|
+
export default class App extends Application {
|
|
27287
|
+
customEvents = {
|
|
27288
27288
|
// add support for the paste event
|
|
27289
27289
|
paste: 'paste'
|
|
27290
27290
|
}
|
|
27291
|
-
}
|
|
27291
|
+
}
|
|
27292
27292
|
```
|
|
27293
27293
|
|
|
27294
27294
|
To prevent Ember from setting up a listener for a default event,
|
|
@@ -27298,13 +27298,13 @@ define("@ember/application/lib/application", ["exports", "@ember/-internals/util
|
|
|
27298
27298
|
```app/app.js
|
|
27299
27299
|
import Application from '@ember/application';
|
|
27300
27300
|
|
|
27301
|
-
|
|
27302
|
-
customEvents
|
|
27301
|
+
export default class App extends Application {
|
|
27302
|
+
customEvents = {
|
|
27303
27303
|
// prevent listeners for mouseenter/mouseleave events
|
|
27304
27304
|
mouseenter: null,
|
|
27305
27305
|
mouseleave: null
|
|
27306
27306
|
}
|
|
27307
|
-
}
|
|
27307
|
+
}
|
|
27308
27308
|
```
|
|
27309
27309
|
|
|
27310
27310
|
By default, the application sets up these event listeners on the document
|
|
@@ -27318,9 +27318,9 @@ define("@ember/application/lib/application", ["exports", "@ember/-internals/util
|
|
|
27318
27318
|
```app/app.js
|
|
27319
27319
|
import Application from '@ember/application';
|
|
27320
27320
|
|
|
27321
|
-
|
|
27322
|
-
rootElement
|
|
27323
|
-
}
|
|
27321
|
+
export default class App extends Application {
|
|
27322
|
+
rootElement = '#ember-app'
|
|
27323
|
+
}
|
|
27324
27324
|
```
|
|
27325
27325
|
|
|
27326
27326
|
The `rootElement` can be either a DOM element or a CSS selector
|
|
@@ -54045,7 +54045,7 @@ define("ember/version", ["exports"], function (_exports) {
|
|
|
54045
54045
|
value: true
|
|
54046
54046
|
});
|
|
54047
54047
|
_exports.default = void 0;
|
|
54048
|
-
var _default = "4.7.0-alpha.
|
|
54048
|
+
var _default = "4.7.0-alpha.2";
|
|
54049
54049
|
_exports.default = _default;
|
|
54050
54050
|
});
|
|
54051
54051
|
define("route-recognizer", ["exports"], function (_exports) {
|