ember-source 3.28.4 → 3.28.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.
@@ -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.4
9
+ * @version 3.28.8
10
10
  */
11
11
  /* eslint-disable no-var */
12
12
 
@@ -391,7 +391,7 @@ define("@ember/-internals/container/index", ["exports", "@ember/-internals/owner
391
391
  _exports.privatize = privatize;
392
392
  _exports.getFactoryFor = getFactoryFor;
393
393
  _exports.setFactoryFor = setFactoryFor;
394
- _exports.INIT_FACTORY = _exports.Container = _exports.Registry = void 0;
394
+ _exports.deprecatedStoreInjections = _exports.INIT_FACTORY = _exports.Container = _exports.Registry = void 0;
395
395
  var leakTracking;
396
396
  var containers;
397
397
 
@@ -427,6 +427,10 @@ define("@ember/-internals/container/index", ["exports", "@ember/-internals/owner
427
427
  } catch (e) {// ignore
428
428
  }
429
429
  }
430
+
431
+ var deprecatedStoreInjections = true
432
+ /* DEBUG */
433
+ && window.WeakSet ? new window.WeakSet() : undefined;
430
434
  /**
431
435
  A container used to instantiate and cache objects.
432
436
 
@@ -441,6 +445,7 @@ define("@ember/-internals/container/index", ["exports", "@ember/-internals/owner
441
445
  @class Container
442
446
  */
443
447
 
448
+ _exports.deprecatedStoreInjections = deprecatedStoreInjections;
444
449
 
445
450
  class Container {
446
451
  constructor(registry, options = {}) {
@@ -798,7 +803,15 @@ define("@ember/-internals/container/index", ["exports", "@ember/-internals/owner
798
803
  var [type] = fullName.split(':');
799
804
  var typeInjections = registry.getTypeInjections(type);
800
805
  var injections = registry.getInjections(fullName);
801
- return buildInjections(container, typeInjections, injections);
806
+ var result = buildInjections(container, typeInjections, injections);
807
+
808
+ if (true
809
+ /* DEBUG */
810
+ && deprecatedStoreInjections && type === 'route' && result.injections.store) {
811
+ deprecatedStoreInjections.add(result.injections.store);
812
+ }
813
+
814
+ return result;
802
815
  }
803
816
 
804
817
  function destroyDestroyables(container) {
@@ -855,7 +868,7 @@ define("@ember/-internals/container/index", ["exports", "@ember/-internals/owner
855
868
  this.injections = undefined;
856
869
  setFactoryFor(this, this);
857
870
 
858
- if (factory && (_utils.HAS_NATIVE_SYMBOL || INIT_FACTORY in factory)) {
871
+ if (isInstantiatable(container, fullName) && (_utils.HAS_NATIVE_SYMBOL || INIT_FACTORY in factory)) {
859
872
  setFactoryFor(factory, this);
860
873
  }
861
874
  }
@@ -19064,7 +19077,7 @@ define("@ember/-internals/routing/lib/system/route-info", [], function () {
19064
19077
  @public
19065
19078
  */
19066
19079
  });
19067
- define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/polyfills", "@ember/-internals/container", "@ember/-internals/metal", "@ember/-internals/owner", "@ember/-internals/runtime", "@ember/-internals/utils", "@ember/debug", "@ember/deprecated-features", "@ember/object/compat", "@ember/runloop", "@ember/string", "router_js", "@ember/-internals/routing/lib/utils", "@ember/-internals/routing/lib/system/generate_controller"], function (_exports, _polyfills, _container, _metal, _owner, _runtime, _utils, _debug, _deprecatedFeatures, _compat, _runloop, _string, _router_js, _utils2, _generate_controller) {
19080
+ define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/polyfills", "@ember/-internals/container", "@ember/-internals/metal", "@ember/-internals/owner", "@ember/-internals/runtime", "@ember/-internals/utils", "@ember/debug", "@ember/deprecated-features", "@ember/object/compat", "@ember/runloop", "router_js", "@ember/-internals/routing/lib/utils", "@ember/-internals/routing/lib/system/generate_controller"], function (_exports, _polyfills, _container, _metal, _owner, _runtime, _utils, _debug, _deprecatedFeatures, _compat, _runloop, _router_js, _utils2, _generate_controller) {
19068
19081
  "use strict";
19069
19082
 
19070
19083
  Object.defineProperty(_exports, "__esModule", {
@@ -21066,18 +21079,17 @@ define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/polyfil
21066
21079
  get() {
21067
21080
  var owner = (0, _owner.getOwner)(this);
21068
21081
  var routeName = this.routeName;
21069
- var namespace = (0, _metal.get)(this, '_router.namespace');
21070
21082
  return {
21071
21083
  find(name, value) {
21072
21084
  var modelClass = owner.factoryFor(`model:${name}`);
21073
- (true && !(Boolean(modelClass)) && (0, _debug.assert)(`You used the dynamic segment ${name}_id in your route ${routeName}, but ${namespace}.${(0, _string.classify)(name)} did not exist and you did not override your route's \`model\` hook.`, Boolean(modelClass)));
21085
+ (true && !(Boolean(modelClass)) && (0, _debug.assert)(`You used the dynamic segment \`${name}_id\` in your route ` + `\`${routeName}\` for which Ember requires you provide a ` + `data-loading implementation. Commonly, that is done by ` + `adding a model hook implementation on the route ` + `(\`model({${name}_id}) {\`) or by injecting an implemention of ` + `a data store: \`@service store;\`.`, Boolean(modelClass)));
21074
21086
 
21075
21087
  if (!modelClass) {
21076
21088
  return;
21077
21089
  }
21078
21090
 
21079
21091
  modelClass = modelClass.class;
21080
- (true && !(typeof modelClass.find === 'function') && (0, _debug.assert)(`${(0, _string.classify)(name)} has no method \`find\`.`, typeof modelClass.find === 'function'));
21092
+ (true && !(typeof modelClass.find === 'function') && (0, _debug.assert)(`You used the dynamic segment \`${name}_id\` in your route ` + `\`${routeName}\` for which Ember requires you provide a ` + `data-loading implementation. Commonly, that is done by ` + `adding a model hook implementation on the route ` + `(\`model({${name}_id}) {\`) or by injecting an implemention of ` + `a data store: \`@service store;\`.\n\n` + `Rarely, applications may attempt to use a legacy behavior where ` + `the model class (in this case \`${name}\`) is resolved and the ` + `\`find\` method on that class is invoked to load data. In this ` + `application, a model of \`${name}\` was found but it did not ` + `provide a \`find\` method. You should not add a \`find\` ` + `method to your model. Instead, please implement an appropriate ` + `\`model\` hook on the \`${routeName}\` route.`, typeof modelClass.find === 'function'));
21081
21093
  return modelClass.find(value);
21082
21094
  }
21083
21095
 
@@ -21085,7 +21097,30 @@ define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/polyfil
21085
21097
  },
21086
21098
 
21087
21099
  set(key, value) {
21088
- (0, _metal.defineProperty)(this, key, null, value);
21100
+ if (true
21101
+ /* DEBUG */
21102
+ && (_container.deprecatedStoreInjections === null || _container.deprecatedStoreInjections === void 0 ? void 0 : _container.deprecatedStoreInjections.has(value))) {
21103
+ Object.defineProperty(this, key, {
21104
+ configurable: true,
21105
+ enumerable: false,
21106
+
21107
+ get() {
21108
+ (true && !(false) && (0, _debug.deprecate)(`A value for the \`store\` property was injected onto a route via the owner API. Implicit injection via the owner API is now deprecated, please add an explicit injection for this value. If the injected value is a service, consider using the @service decorator.`, false, {
21109
+ id: 'implicit-injections',
21110
+ until: '4.0.0',
21111
+ url: 'https://deprecations.emberjs.com/v3.x/#toc_implicit-injections',
21112
+ for: 'ember-source',
21113
+ since: {
21114
+ enabled: '3.28.7'
21115
+ }
21116
+ }));
21117
+ return value;
21118
+ }
21119
+
21120
+ });
21121
+ } else {
21122
+ (0, _metal.defineProperty)(this, key, null, value);
21123
+ }
21089
21124
  }
21090
21125
 
21091
21126
  }),
@@ -22091,8 +22126,7 @@ define("@ember/-internals/routing/lib/system/router", ["exports", "@ember/-inter
22091
22126
  this._toplevelView = null;
22092
22127
  }
22093
22128
 
22094
- this._super(...arguments);
22095
-
22129
+ super.willDestroy();
22096
22130
  this.reset();
22097
22131
  var instances = this._engineInstances;
22098
22132
 
@@ -63190,7 +63224,7 @@ define("ember/version", ["exports"], function (_exports) {
63190
63224
  value: true
63191
63225
  });
63192
63226
  _exports.default = void 0;
63193
- var _default = "3.28.4";
63227
+ var _default = "3.28.8";
63194
63228
  _exports.default = _default;
63195
63229
  });
63196
63230
  define("jquery/index", ["exports", "@ember/-internals/views"], function (_exports, _views) {