Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

Commit

Permalink
FEATURE: Update Ember to version 3.10.2
Browse files Browse the repository at this point in the history
  • Loading branch information
CvX committed Jan 15, 2020
1 parent 34d1f45 commit c676dd7
Show file tree
Hide file tree
Showing 43 changed files with 2,344 additions and 1,608 deletions.
170 changes: 139 additions & 31 deletions dist/ember-all.debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -7246,7 +7246,7 @@ enifed("@ember/-internals/glimmer/lib/components/link-to", ["exports", "@ember/-
_currentRoute: (0, _metal.alias)('_routing.currentRouteName'),
_currentRouterState: (0, _metal.alias)('_routing.currentState'),
_targetRouterState: (0, _metal.alias)('_routing.targetState'),
_route: (0, _metal.computed)('route', '_currentRoute', function computeLinkToComponentRoute() {
_route: (0, _metal.computed)('route', '_currentRouterState', function computeLinkToComponentRoute() {
let {
route
} = this;
Expand Down Expand Up @@ -10893,7 +10893,7 @@ enifed("@ember/-internals/glimmer/lib/modifiers/action", ["exports", "@ember/-in

_exports.default = ActionModifierManager;
});
enifed("@ember/-internals/glimmer/lib/modifiers/custom", ["exports"], function (_exports) {
enifed("@ember/-internals/glimmer/lib/modifiers/custom", ["exports", "@glimmer/reference"], function (_exports, _reference) {
"use strict";

_exports.__esModule = true;
Expand All @@ -10906,16 +10906,16 @@ enifed("@ember/-internals/glimmer/lib/modifiers/custom", ["exports"], function (
}

class CustomModifierDefinition {
constructor(name, ModifierClass, delegate) {
constructor(name, ModifierClass, delegate, isInteractive) {
this.name = name;
this.ModifierClass = ModifierClass;
this.delegate = delegate;
this.manager = CUSTOM_MODIFIER_MANAGER;
this.state = {
ModifierClass,
name,
delegate
};
this.manager = isInteractive ? CUSTOM_INTERACTIVE_MODIFIER_MANAGER : CUSTOM_NON_INTERACTIVE_MODIFIER_MANAGER;
}

}
Expand Down Expand Up @@ -10947,12 +10947,15 @@ enifed("@ember/-internals/glimmer/lib/modifiers/custom", ["exports"], function (
implements a set of hooks that determine modifier behavior.
To create a custom modifier manager, instantiate a new CustomModifierManager
class and pass the delegate as the first argument:

```js
let manager = new CustomModifierManager({
// ...delegate implementation...
});
```

## Delegate Hooks

Throughout the lifecycle of a modifier, the modifier manager will invoke
delegate hooks that are responsible for surfacing those lifecycle changes to
the end developer.
Expand All @@ -10965,7 +10968,7 @@ enifed("@ember/-internals/glimmer/lib/modifiers/custom", ["exports"], function (

_exports.CustomModifierState = CustomModifierState;

class CustomModifierManager {
class InteractiveCustomModifierManager {
create(element, definition, args) {
const capturedArgs = args.capture();
let instance = definition.delegate.createModifier(definition.ModifierClass, capturedArgs.value());
Expand Down Expand Up @@ -11003,7 +11006,27 @@ enifed("@ember/-internals/glimmer/lib/modifiers/custom", ["exports"], function (

}

const CUSTOM_MODIFIER_MANAGER = new CustomModifierManager();
class NonInteractiveCustomModifierManager {
create() {
return null;
}

getTag() {
return _reference.CONSTANT_TAG;
}

install() {}

update() {}

getDestructor() {
return null;
}

}

const CUSTOM_INTERACTIVE_MODIFIER_MANAGER = new InteractiveCustomModifierManager();
const CUSTOM_NON_INTERACTIVE_MODIFIER_MANAGER = new NonInteractiveCustomModifierManager();
});
enifed("@ember/-internals/glimmer/lib/protocol-for-url", ["exports", "node-module", "@ember/-internals/browser-environment"], function (_exports, _nodeModule, _browserEnvironment) {
"use strict";
Expand Down Expand Up @@ -11614,7 +11637,7 @@ enifed("@ember/-internals/glimmer/lib/resolver", ["exports", "@ember/-internals/
};

class RuntimeResolver {
constructor() {
constructor(isInteractive) {
this.handles = [undefined];
this.objToHandle = new WeakMap();
this.builtInHelpers = BUILTINS_HELPERS;
Expand All @@ -11630,6 +11653,7 @@ enifed("@ember/-internals/glimmer/lib/resolver", ["exports", "@ember/-internals/
let macros = new _opcodeCompiler.Macros();
(0, _syntax.populateMacros)(macros);
this.compiler = new _opcodeCompiler.LazyCompiler(new _compileTimeLookup.default(this), this, macros);
this.isInteractive = isInteractive;
}
/*** IRuntimeResolver ***/

Expand Down Expand Up @@ -11825,7 +11849,7 @@ enifed("@ember/-internals/glimmer/lib/resolver", ["exports", "@ember/-internals/
if (modifier !== undefined) {
let managerFactory = (0, _customModifierManager.getModifierManager)(modifier.class);
let manager = managerFactory(owner);
return new _custom2.CustomModifierDefinition(name, modifier, manager);
return new _custom2.CustomModifierDefinition(name, modifier, manager, this.isInteractive);
}
}

Expand Down Expand Up @@ -11936,9 +11960,19 @@ enifed("@ember/-internals/glimmer/lib/setup-registry", ["exports", "@ember/-inte
_exports.setupApplicationRegistry = setupApplicationRegistry;
_exports.setupEngineRegistry = setupEngineRegistry;

function _templateObject6() {
function _templateObject7() {
const data = _taggedTemplateLiteralLoose(["component:-default"]);

_templateObject7 = function () {
return data;
};

return data;
}

function _templateObject6() {
const data = _taggedTemplateLiteralLoose(["template-compiler:main"]);

_templateObject6 = function () {
return data;
};
Expand Down Expand Up @@ -12064,7 +12098,8 @@ enifed("@ember/-internals/glimmer/lib/setup-registry", ["exports", "@ember/-inte
registry.register((0, _container.privatize)(_templateObject3()), _component2.default);
registry.register('service:-glimmer-environment', _environment2.default);
registry.register((0, _container.privatize)(_templateObject4()), _templateCompiler.default);
registry.injection('template', 'compiler', (0, _container.privatize)(_templateObject5()));
registry.injection((0, _container.privatize)(_templateObject5()), 'environment', '-environment:main');
registry.injection('template', 'compiler', (0, _container.privatize)(_templateObject6()));
registry.optionsForType('helper', {
instantiate: false
});
Expand All @@ -12082,7 +12117,7 @@ enifed("@ember/-internals/glimmer/lib/setup-registry", ["exports", "@ember/-inte
}

if (!_environment.ENV._TEMPLATE_ONLY_GLIMMER_COMPONENTS) {
registry.register((0, _container.privatize)(_templateObject6()), _component.default);
registry.register((0, _container.privatize)(_templateObject7()), _component.default);
}
}
});
Expand Down Expand Up @@ -12698,8 +12733,10 @@ enifed("@ember/-internals/glimmer/lib/template-compiler", ["exports", "@ember/-i
_exports.default = void 0;
// factory for DI
var _default = {
create() {
return new _resolver.default().compiler;
create({
environment
}) {
return new _resolver.default(environment.isInteractive).compiler;
}

};
Expand Down Expand Up @@ -29891,6 +29928,43 @@ enifed("@ember/-internals/glimmer/tests/integration/components/link-to/query-par
});
}

['@test generates proper href for `LinkTo` with no @route after transitioning to an error route GH#17963'](assert) {
this.router.map(function () {
this.route('bad');
});
this.add('controller:application', _controller.default.extend({
queryParams: ['baz']
}));
this.add('route:bad', _routing.Route.extend({
model() {
throw new Error('bad!');
}

}));
this.addTemplate('error', "Error: {{model.message}}");
this.addTemplate('application', "\n <LinkTo id=\"bad-link\" @route=\"bad\">\n Bad\n </LinkTo>\n\n <LinkTo id=\"good-link\" @query={{hash baz='lol'}}>\n Good\n </LinkTo>\n\n {{outlet}}\n ");
return this.visit('/').then(() => {
assert.equal(this.$('#good-link').length, 1, 'good-link should be in the DOM');
assert.equal(this.$('#bad-link').length, 1, 'bad-link should be in the DOM');
let goodLink = this.$('#good-link');
assert.equal(goodLink.attr('href'), '/?baz=lol');
return this.visit('/bad');
}).then(() => {
assert.equal(this.$('#good-link').length, 1, 'good-link should be in the DOM');
assert.equal(this.$('#bad-link').length, 1, 'bad-link should be in the DOM');
let goodLink = this.$('#good-link'); // should still be / because we never entered /bad (it errored before being fully entered)
// and error states do not get represented in the URL, so we are _effectively_ still
// on /

assert.equal(goodLink.attr('href'), '/?baz=lol');
(0, _internalTestHelpers.runTask)(() => this.click('#good-link'));
let applicationController = this.getController('application');
assert.deepEqual(applicationController.getProperties('baz'), {
baz: 'lol'
}, 'index controller QP properties updated');
});
}

['@test supplied QP properties can be bound'](assert) {
this.addTemplate('index', "\n <LinkTo id=\"the-link\" @query={{hash foo=boundThing}}>\n Index\n </LinkTo>\n ");
return this.visit('/').then(() => {
Expand Down Expand Up @@ -39023,6 +39097,26 @@ enifed("@ember/-internals/glimmer/tests/integration/event-dispatcher-test", ["in
assert.notOk(receivedEvent.originalEvent, 'event is not a jQuery.Event');
}

['@test native event on text node does not throw on hasAttribute [ISSUE #16730]'](assert) {
this.registerComponent('x-foo', {
ComponentClass: _helpers.Component.extend({
actions: {
someAction() {}

}
}),
template: "<a id=\"inner\" href=\"#\" {{action 'someAction'}}>test</a>"
});
this.render("{{x-foo id=\"outer\"}}");
let node = this.$('#inner')[0].childNodes[0];
(0, _internalTestHelpers.runTask)(() => {
let event = document.createEvent('HTMLEvents');
event.initEvent('mousemove', true, true);
node.dispatchEvent(event);
});
assert.ok(true);
}

});
} else {
(0, _internalTestHelpers.moduleFor)('EventDispatcher#jquery-events', class extends _internalTestHelpers.RenderingTestCase {
Expand Down Expand Up @@ -66356,7 +66450,7 @@ enifed("@ember/-internals/routing/lib/services/router", ["exports", "@ember/-int
The `rootURL` property represents the URL of the root of
the application, '/' by default.
This prefix is assumed on all routes defined on this app.
IF you change the `rootURL` in your environment configuration
If you change the `rootURL` in your environment configuration
like so:
```config/environment.js
'use strict';
Expand All @@ -66377,10 +66471,23 @@ enifed("@ember/-internals/routing/lib/services/router", ["exports", "@ember/-int
rootURL: (0, _computed.readOnly)('_router.rootURL'),

/**
A `RouteInfo` that represents the current leaf route.
It is guaranteed to change whenever a route transition
happens (even when that transition only changes parameters
and doesn't change the active route)
The `currentRoute` property contains metadata about the current leaf route.
It returns a `RouteInfo` object that has information like the route name,
params, query params and more.
See [RouteInfo](/ember/release/classes/RouteInfo) for more info.
This property is guaranteed to change whenever a route transition
happens (even when that transition only changes parameters
and doesn't change the active route).
Usage example:
```app/components/header.js
import Component from '@ember/component';
import { inject as service } from '@ember/service';
import { computed } from '@ember/object';
export default Component.extend({
router: service(),
isChildRoute: computed.notEmpty('router.currentRoute.child')
});
```
@property currentRoute
@type RouteInfo
@public
Expand Down Expand Up @@ -90576,7 +90683,7 @@ enifed("@ember/-internals/views/lib/system/event_dispatcher", ["exports", "@embe
} else if (event.cancelBubble === true) {
break;
}
} else if (target.hasAttribute('data-ember-action')) {
} else if (typeof target.hasAttribute === 'function' && target.hasAttribute('data-ember-action')) {
if (actionHandler(target, event) === false) {
break;
}
Expand Down Expand Up @@ -106825,15 +106932,20 @@ enifed("@ember/runloop/index", ["exports", "@ember/debug", "@ember/-internals/er
```javascript
import { schedule } from '@ember/runloop';

schedule('afterRender', this, function() {
// this will be executed in the 'afterRender' queue
console.log('scheduled on afterRender queue');
});

schedule('actions', this, function() {
// this will be executed in the 'actions' queue, after bindings have synced.
// this will be executed in the 'actions' queue
console.log('scheduled on actions queue');
});

// Note the functions will be run in order based on the run queues order.
// Output would be:
// scheduled on sync queue
// scheduled on actions queue
// scheduled on afterRender queue
```

@method schedule
Expand Down Expand Up @@ -126101,17 +126213,13 @@ enifed("ember-template-compiler/lib/system/initializer", ["require", "ember-temp
name: 'domTemplates',

initialize() {
let context;

if (hasDOM) {
context = document;
(0, _bootstrap.default)({
context: document,
hasTemplate,
setTemplate
});
}

(0, _bootstrap.default)({
context,
hasTemplate,
setTemplate
});
}

});
Expand Down Expand Up @@ -142861,7 +142969,7 @@ enifed("ember/version", ["exports"], function (_exports) {

_exports.__esModule = true;
_exports.default = void 0;
var _default = "3.10.0";
var _default = "3.10.2";
_exports.default = _default;
});
enifed("handlebars", ["exports"], function (_exports) {
Expand Down
2 changes: 1 addition & 1 deletion dist/ember-all.debug.map

Large diffs are not rendered by default.

18 changes: 7 additions & 11 deletions dist/ember-template-compiler.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/ember-template-compiler.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ember-testing.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/ember-testing.map

Large diffs are not rendered by default.

0 comments on commit c676dd7

Please sign in to comment.