ember-source 3.28.0-beta.6 → 3.28.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.
@@ -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 3.28.0-beta.6
9
+ * @version 3.28.2
10
10
  */
11
11
  /* eslint-disable no-var */
12
12
 
@@ -12157,7 +12157,7 @@ define("@ember/-internals/meta/lib/meta", ["exports", "@ember/-internals/utils",
12157
12157
  return -1;
12158
12158
  }
12159
12159
  });
12160
- define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@ember/-internals/utils", "@ember/debug", "@ember/-internals/environment", "@ember/runloop", "@glimmer/destroyable", "@glimmer/validator", "@glimmer/manager", "@glimmer/runtime", "@glimmer/util", "@ember/error", "ember/version", "@ember/-internals/container", "@ember/deprecated-features", "@ember/polyfills", "@ember/-internals/owner"], function (_exports, _meta2, _utils, _debug, _environment, _runloop, _destroyable, _validator, _manager, _runtime, _util, _error, _version, _container, _deprecatedFeatures, _polyfills, _owner) {
12160
+ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@ember/-internals/utils", "@ember/debug", "@ember/-internals/environment", "@ember/runloop", "@glimmer/destroyable", "@glimmer/validator", "@glimmer/manager", "@glimmer/util", "@ember/error", "ember/version", "@ember/-internals/container", "@ember/deprecated-features", "@ember/polyfills", "@ember/-internals/owner"], function (_exports, _meta2, _utils, _debug, _environment, _runloop, _destroyable, _validator, _manager, _util, _error, _version, _container, _deprecatedFeatures, _polyfills, _owner) {
12161
12161
  "use strict";
12162
12162
 
12163
12163
  Object.defineProperty(_exports, "__esModule", {
@@ -13065,7 +13065,21 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
13065
13065
 
13066
13066
  var propertyTag = tagForProperty(current, segment, true, currentTagMeta);
13067
13067
  descriptor = currentMeta !== null ? currentMeta.peekDescriptors(segment) : undefined;
13068
- chainTags.push(propertyTag);
13068
+ chainTags.push(propertyTag); // If we're at the end of the path, processing the last segment, and it's
13069
+ // not an alias, we should _not_ get the last value, since we already have
13070
+ // its tag. There's no reason to access it and do more work.
13071
+
13072
+ if (segmentEnd === pathLength) {
13073
+ // If the key was an alias, we should always get the next value in order to
13074
+ // bootstrap the alias. This is because aliases, unlike other CPs, should
13075
+ // always be in sync with the aliased value.
13076
+ if (CHAIN_PASS_THROUGH.has(descriptor)) {
13077
+ // tslint:disable-next-line: no-unused-expression
13078
+ current[segment];
13079
+ }
13080
+
13081
+ break;
13082
+ }
13069
13083
 
13070
13084
  if (descriptor === undefined) {
13071
13085
  // If the descriptor is undefined, then its a normal property, so we should
@@ -13099,15 +13113,8 @@ define("@ember/-internals/metal/index", ["exports", "@ember/-internals/meta", "@
13099
13113
  }
13100
13114
  }
13101
13115
 
13102
- if (segmentEnd === pathLength || !(0, _utils.isObject)(current)) {
13116
+ if (!(0, _utils.isObject)(current)) {
13103
13117
  // we've hit the end of the chain for now, break out
13104
- // If the last value is a HashProxy, then entangle all of its tags
13105
- if ((0, _runtime.isHashProxy)(current)) {
13106
- for (var key in current) {
13107
- chainTags.push(tagForProperty(current, key));
13108
- }
13109
- }
13110
-
13111
13118
  break;
13112
13119
  }
13113
13120
 
@@ -17864,6 +17871,11 @@ define("@ember/-internals/routing/lib/services/router", ["exports", "@ember/-int
17864
17871
  router = owner.lookup('router:main');
17865
17872
  return this[ROUTER] = router;
17866
17873
  }
17874
+
17875
+ willDestroy() {
17876
+ super.willDestroy(...arguments);
17877
+ this[ROUTER] = null;
17878
+ }
17867
17879
  /**
17868
17880
  Transition the application into another route. The route may
17869
17881
  be either a single route or route path:
@@ -18022,6 +18034,8 @@ define("@ember/-internals/routing/lib/services/router", ["exports", "@ember/-int
18022
18034
 
18023
18035
 
18024
18036
  urlFor(routeName, ...args) {
18037
+ this._router.setupRouter();
18038
+
18025
18039
  return this._router.generate(routeName, ...args);
18026
18040
  }
18027
18041
  /**
@@ -18141,6 +18155,9 @@ define("@ember/-internals/routing/lib/services/router", ["exports", "@ember/-int
18141
18155
 
18142
18156
  recognize(url) {
18143
18157
  (true && !(url.indexOf(this.rootURL) === 0) && (0, _debug.assert)(`You must pass a url that begins with the application's rootURL "${this.rootURL}"`, url.indexOf(this.rootURL) === 0));
18158
+
18159
+ this._router.setupRouter();
18160
+
18144
18161
  var internalURL = cleanURL(url, this.rootURL);
18145
18162
  return this._router._routerMicrolib.recognize(internalURL);
18146
18163
  }
@@ -18158,6 +18175,9 @@ define("@ember/-internals/routing/lib/services/router", ["exports", "@ember/-int
18158
18175
 
18159
18176
  recognizeAndLoad(url) {
18160
18177
  (true && !(url.indexOf(this.rootURL) === 0) && (0, _debug.assert)(`You must pass a url that begins with the application's rootURL "${this.rootURL}"`, url.indexOf(this.rootURL) === 0));
18178
+
18179
+ this._router.setupRouter();
18180
+
18161
18181
  var internalURL = cleanURL(url, this.rootURL);
18162
18182
  return this._router._routerMicrolib.recognizeAndLoad(internalURL);
18163
18183
  }
@@ -20771,12 +20791,20 @@ define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/polyfil
20771
20791
  return state['fullQueryParams'];
20772
20792
  }
20773
20793
 
20774
- state['fullQueryParams'] = {};
20775
- (0, _polyfills.assign)(state['fullQueryParams'], state.queryParams);
20794
+ var fullQueryParamsState = {};
20795
+ var haveAllRouteInfosResolved = state.routeInfos.every(routeInfo => routeInfo.route);
20796
+ (0, _polyfills.assign)(fullQueryParamsState, state.queryParams);
20797
+
20798
+ router._deserializeQueryParams(state.routeInfos, fullQueryParamsState); // only cache query params state if all routeinfos have resolved; it's possible
20799
+ // for lazy routes to not have resolved when `getFullQueryParams` is called, so
20800
+ // we wait until all routes have resolved prior to caching query params state
20776
20801
 
20777
- router._deserializeQueryParams(state.routeInfos, state['fullQueryParams']);
20778
20802
 
20779
- return state['fullQueryParams'];
20803
+ if (haveAllRouteInfosResolved) {
20804
+ state['fullQueryParams'] = fullQueryParamsState;
20805
+ }
20806
+
20807
+ return fullQueryParamsState;
20780
20808
  }
20781
20809
 
20782
20810
  function getQueryParamsFor(route, state) {
@@ -49228,7 +49256,6 @@ define("@glimmer/runtime", ["exports", "@glimmer/util", "@glimmer/reference", "@
49228
49256
  _exports.isSerializationFirstNode = isSerializationFirstNode;
49229
49257
  _exports.rehydrationBuilder = rehydrationBuilder;
49230
49258
  _exports.invokeHelper = invokeHelper;
49231
- _exports.isHashProxy = isHashProxy;
49232
49259
  Object.defineProperty(_exports, "destroy", {
49233
49260
  enumerable: true,
49234
49261
  get: function () {
@@ -56094,129 +56121,22 @@ define("@glimmer/runtime", ["exports", "@glimmer/util", "@glimmer/reference", "@
56094
56121
  }
56095
56122
  }
56096
56123
 
56097
- var HASH_PROXIES = new _util._WeakSet();
56098
-
56099
- function isHashProxy(obj) {
56100
- return HASH_PROXIES.has(obj);
56101
- }
56102
-
56103
- function tagForKey(namedArgs, key) {
56104
- return (0, _validator.track)(() => {
56105
- if (key in namedArgs) {
56106
- (0, _reference.valueForRef)(namedArgs[key]);
56107
- }
56108
- });
56109
- }
56110
-
56111
- var hashProxyFor;
56112
-
56113
- class HashProxy {
56114
- constructor(named, target) {
56115
- this.named = named;
56116
- this.target = target;
56117
- this.argsCaches = (0, _util.dict)();
56118
- }
56119
-
56120
- syncKey(key) {
56121
- var {
56122
- argsCaches,
56123
- named
56124
- } = this;
56125
- if (!(key in named)) return;
56126
- var cache = argsCaches[key];
56127
-
56128
- if (cache === undefined) {
56129
- var ref = this.named[key];
56130
- argsCaches[key] = cache = (0, _reference.createComputeRef)(() => {
56131
- this.target[key] = (0, _reference.valueForRef)(ref);
56132
- });
56133
- }
56134
-
56135
- (0, _reference.valueForRef)(cache);
56136
- }
56137
-
56138
- get(target, prop) {
56139
- this.syncKey(prop);
56140
- return target[prop];
56141
- }
56142
-
56143
- set(target, prop, value) {
56144
- (true && !(false) && (0, _globalContext.deprecate)(`You set the '${prop}' property on a {{hash}} object. Setting properties on objects generated by {{hash}} is deprecated. Please update to use an object created with a tracked property or getter, or with a custom helper.`, false, {
56145
- id: 'setting-on-hash'
56146
- }));
56147
- this.syncKey(prop);
56148
- target[prop] = value;
56149
- return true;
56150
- }
56151
-
56152
- has(target, prop) {
56153
- return prop in this.named || prop in target;
56154
- }
56155
-
56156
- ownKeys(target) {
56157
- for (var key in this.named) {
56158
- this.syncKey(key);
56159
- }
56160
-
56161
- return Object.getOwnPropertyNames(target);
56162
- }
56163
-
56164
- getOwnPropertyDescriptor(target, prop) {
56165
- if (prop in this.named) {
56166
- return {
56167
- enumerable: true,
56168
- configurable: true,
56169
- writable: true
56170
- };
56171
- }
56172
-
56173
- return Object.getOwnPropertyDescriptor(target, prop);
56174
- }
56175
-
56176
- }
56177
-
56178
- if (_util.HAS_NATIVE_PROXY) {
56179
- hashProxyFor = named => {
56180
- var target = (0, _util.dict)();
56181
- var proxy = new Proxy(target, new HashProxy(named, target));
56182
- (0, _manager5.setCustomTagFor)(proxy, (_obj, key) => {
56183
- var argTag = tagForKey(named, key);
56184
- var proxyTag = (0, _validator.tagFor)(proxy, key);
56185
- return (0, _validator.combine)([argTag, proxyTag]);
56186
- });
56187
- HASH_PROXIES.add(proxy);
56188
- return proxy;
56189
- };
56190
- } else {
56191
- hashProxyFor = named => {
56192
- var proxy = (0, _util.dict)(); // Create a HashProxy handler to store the local state in case anyone
56193
- // overrides a named value. It handles all of the details in terms of
56194
- // syncing state up and returning the correct value based on autotracking.
56195
-
56196
- var localState = (0, _util.dict)();
56197
- var proxyHandler = new HashProxy(named, localState);
56198
- Object.keys(named).forEach(name => {
56199
- Object.defineProperty(proxy, name, {
56200
- enumerable: true,
56201
- configurable: true,
56202
-
56203
- get() {
56204
- return proxyHandler.get(localState, name);
56205
- },
56124
+ var wrapHashProxy;
56206
56125
 
56207
- set(value) {
56208
- return proxyHandler.set(localState, name, value);
56209
- }
56126
+ if (true
56127
+ /* DEBUG */
56128
+ ) {
56129
+ wrapHashProxy = hash => {
56130
+ return new Proxy(hash, {
56131
+ set(target, key, value) {
56132
+ (true && !(false) && (0, _globalContext.deprecate)(`You set the '${String(key)}' property on a {{hash}} object. Setting properties on objects generated by {{hash}} is deprecated. Please update to use an object created with a tracked property or getter, or with a custom helper.`, false, {
56133
+ id: 'setting-on-hash'
56134
+ }));
56135
+ target[key] = value;
56136
+ return true;
56137
+ }
56210
56138
 
56211
- });
56212
- });
56213
- (0, _manager5.setCustomTagFor)(proxy, (_obj, key) => {
56214
- var argTag = tagForKey(named, key);
56215
- var proxyTag = (0, _validator.tagFor)(proxy, key);
56216
- return (0, _validator.combine)([argTag, proxyTag]);
56217
56139
  });
56218
- HASH_PROXIES.add(proxy);
56219
- return proxy;
56220
56140
  };
56221
56141
  }
56222
56142
  /**
@@ -56260,7 +56180,27 @@ define("@glimmer/runtime", ["exports", "@glimmer/util", "@glimmer/reference", "@
56260
56180
  var hash = internalHelper(({
56261
56181
  named
56262
56182
  }) => {
56263
- return (0, _reference.createConstRef)(hashProxyFor(named), 'hash');
56183
+ var ref = (0, _reference.createComputeRef)(() => {
56184
+ var hash = (0, _runtime.reifyNamed)(named);
56185
+
56186
+ if (true
56187
+ /* DEBUG */
56188
+ && _util.HAS_NATIVE_PROXY) {
56189
+ hash = wrapHashProxy(hash);
56190
+ }
56191
+
56192
+ return hash;
56193
+ }, null, 'hash'); // Setup the children so that templates can bypass getting the value of
56194
+ // the reference and treat children lazily
56195
+
56196
+ var children = new Map();
56197
+
56198
+ for (var name in named) {
56199
+ children.set(name, named[name]);
56200
+ }
56201
+
56202
+ ref.children = children;
56203
+ return ref;
56264
56204
  });
56265
56205
  /**
56266
56206
  Use the `{{array}}` helper to create an array to pass as an option to your
@@ -63006,6 +62946,15 @@ define("ember/index", ["exports", "require", "@ember/-internals/environment", "@
63006
62946
 
63007
62947
  if (_environment.ENV.EXTEND_PROTOTYPES.String) {
63008
62948
  String.prototype.htmlSafe = function () {
62949
+ (true && !(false) && (0, EmberDebug.deprecate)(`String prototype extensions are deprecated. Please import htmlSafe from '@ember/template' instead.`, false, {
62950
+ id: 'ember-string.prototype-extensions',
62951
+ for: 'ember-source',
62952
+ since: {
62953
+ enabled: '3.27.6'
62954
+ },
62955
+ until: '4.0.0',
62956
+ url: 'https://deprecations.emberjs.com/v3.x/#toc_ember-string-htmlsafe-ishtmlsafe'
62957
+ }));
63009
62958
  return (0, _glimmer.htmlSafe)(this);
63010
62959
  };
63011
62960
  }
@@ -63241,7 +63190,7 @@ define("ember/version", ["exports"], function (_exports) {
63241
63190
  value: true
63242
63191
  });
63243
63192
  _exports.default = void 0;
63244
- var _default = "3.28.0-beta.6";
63193
+ var _default = "3.28.2";
63245
63194
  _exports.default = _default;
63246
63195
  });
63247
63196
  define("jquery/index", ["exports", "@ember/-internals/views"], function (_exports, _views) {