ember-source 3.28.6 → 3.28.9

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.6
9
+ * @version 3.28.9
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) {
@@ -853,11 +866,6 @@ define("@ember/-internals/container/index", ["exports", "@ember/-internals/owner
853
866
  this.normalizedName = normalizedName;
854
867
  this.madeToString = undefined;
855
868
  this.injections = undefined;
856
- setFactoryFor(this, this);
857
-
858
- if (isInstantiatable(container, fullName) && (_utils.HAS_NATIVE_SYMBOL || INIT_FACTORY in factory)) {
859
- setFactoryFor(factory, this);
860
- }
861
869
  }
862
870
 
863
871
  toString() {
@@ -19064,7 +19072,7 @@ define("@ember/-internals/routing/lib/system/route-info", [], function () {
19064
19072
  @public
19065
19073
  */
19066
19074
  });
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) {
19075
+ 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
19076
  "use strict";
19069
19077
 
19070
19078
  Object.defineProperty(_exports, "__esModule", {
@@ -21066,18 +21074,17 @@ define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/polyfil
21066
21074
  get() {
21067
21075
  var owner = (0, _owner.getOwner)(this);
21068
21076
  var routeName = this.routeName;
21069
- var namespace = (0, _metal.get)(this, '_router.namespace');
21070
21077
  return {
21071
21078
  find(name, value) {
21072
21079
  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)));
21080
+ (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
21081
 
21075
21082
  if (!modelClass) {
21076
21083
  return;
21077
21084
  }
21078
21085
 
21079
21086
  modelClass = modelClass.class;
21080
- (true && !(typeof modelClass.find === 'function') && (0, _debug.assert)(`${(0, _string.classify)(name)} has no method \`find\`.`, typeof modelClass.find === 'function'));
21087
+ (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
21088
  return modelClass.find(value);
21082
21089
  }
21083
21090
 
@@ -21085,7 +21092,30 @@ define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/polyfil
21085
21092
  },
21086
21093
 
21087
21094
  set(key, value) {
21088
- (0, _metal.defineProperty)(this, key, null, value);
21095
+ if (true
21096
+ /* DEBUG */
21097
+ && (_container.deprecatedStoreInjections === null || _container.deprecatedStoreInjections === void 0 ? void 0 : _container.deprecatedStoreInjections.has(value))) {
21098
+ Object.defineProperty(this, key, {
21099
+ configurable: true,
21100
+ enumerable: false,
21101
+
21102
+ get() {
21103
+ (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, {
21104
+ id: 'implicit-injections',
21105
+ until: '4.0.0',
21106
+ url: 'https://deprecations.emberjs.com/v3.x/#toc_implicit-injections',
21107
+ for: 'ember-source',
21108
+ since: {
21109
+ enabled: '3.28.7'
21110
+ }
21111
+ }));
21112
+ return value;
21113
+ }
21114
+
21115
+ });
21116
+ } else {
21117
+ (0, _metal.defineProperty)(this, key, null, value);
21118
+ }
21089
21119
  }
21090
21120
 
21091
21121
  }),
@@ -63189,7 +63219,7 @@ define("ember/version", ["exports"], function (_exports) {
63189
63219
  value: true
63190
63220
  });
63191
63221
  _exports.default = void 0;
63192
- var _default = "3.28.6";
63222
+ var _default = "3.28.9";
63193
63223
  _exports.default = _default;
63194
63224
  });
63195
63225
  define("jquery/index", ["exports", "@ember/-internals/views"], function (_exports, _views) {