diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/application.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/application.json new file mode 100644 index 000000000..4117488ee --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/application.json @@ -0,0 +1,89 @@ +{ + "data": { + "id": "ember-5.12.0-@ember/application", + "type": "class", + "attributes": { + "name": "@ember/application", + "shortname": "@ember/application", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/application", + "namespace": "", + "methods": [ + { + "file": "packages/@ember/application/lib/lazy_load.ts", + "line": 14, + "description": "Detects when a specific package of Ember (e.g. 'Application')\nhas fully loaded and is available for extension.\n\nThe provided `callback` will be called with the `name` passed\nresolved from a string into the object:\n\n``` javascript\nimport { onLoad } from '@ember/application';\n\nonLoad('Ember.Application' function(hbars) {\n hbars.registerHelper(...);\n});\n```", + "itemtype": "method", + "name": "onLoad", + "static": 1, + "params": [ + { + "name": "name", + "description": "name of hook", + "type": "String" + }, + { + "name": "callback", + "description": "callback to be called", + "type": "Function" + } + ], + "access": "private", + "tagname": "", + "class": "@ember/application", + "module": "@ember/application" + }, + { + "file": "packages/@ember/application/lib/lazy_load.ts", + "line": 47, + "description": "Called when an Ember.js package (e.g Application) has finished\nloading. Triggers any callbacks registered for this event.", + "itemtype": "method", + "name": "runLoadHooks", + "static": 1, + "params": [ + { + "name": "name", + "description": "name of hook", + "type": "String" + }, + { + "name": "object", + "description": "object to pass to callbacks", + "type": "Object" + } + ], + "access": "private", + "tagname": "", + "class": "@ember/application", + "module": "@ember/application" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/application", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/array.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/array.json new file mode 100644 index 000000000..3a1c0e8e7 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/array.json @@ -0,0 +1,189 @@ +{ + "data": { + "id": "ember-5.12.0-@ember/array", + "type": "class", + "attributes": { + "name": "@ember/array", + "shortname": "@ember/array", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "ember", + "namespace": "", + "methods": [ + { + "file": "packages/@ember/array/lib/make-array.ts", + "line": 5, + "description": "Forces the passed object to be part of an array. If the object is already\nan array, it will return the object. Otherwise, it will add the object to\nan array. If object is `null` or `undefined`, it will return an empty array.\n\n```javascript\nimport { makeArray } from '@ember/array';\nimport ArrayProxy from '@ember/array/proxy';\n\nmakeArray(); // []\nmakeArray(null); // []\nmakeArray(undefined); // []\nmakeArray('lindsay'); // ['lindsay']\nmakeArray([1, 2, 42]); // [1, 2, 42]\n\nlet proxy = ArrayProxy.create({ content: [] });\n\nmakeArray(proxy) === proxy; // false\n```", + "itemtype": "method", + "name": "makeArray", + "static": 1, + "params": [ + { + "name": "obj", + "description": "the object", + "type": "Object" + } + ], + "return": { + "description": "", + "type": "Array" + }, + "access": "private", + "tagname": "", + "class": "@ember/array", + "module": "@ember/array" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 140, + "description": "Returns true if the passed object is an array or Array-like.\n\nObjects are considered Array-like if any of the following are true:\n\n - the object is a native Array\n - the object has an objectAt property\n - the object is an Object, and has a length property\n\nUnlike `typeOf` this method returns true even if the passed object is\nnot formally an array but appears to be array-like (i.e. implements `Array`)\n\n```javascript\nimport { isArray } from '@ember/array';\nimport ArrayProxy from '@ember/array/proxy';\n\nisArray(); // false\nisArray([]); // true\nisArray(ArrayProxy.create({ content: [] })); // true\n```", + "itemtype": "method", + "name": "isArray", + "static": 1, + "params": [ + { + "name": "obj", + "description": "The object to test", + "type": "Object" + } + ], + "return": { + "description": "true if the passed object is an array or Array-like", + "type": "Boolean" + }, + "access": "public", + "tagname": "", + "class": "@ember/array", + "module": "@ember/array" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1859, + "description": "Creates an `Ember.NativeArray` from an Array-like object.\nDoes not modify the original object's contents. `A()` is not needed if\n`EmberENV.EXTEND_PROTOTYPES` is `true` (the default value). However,\nit is recommended that you use `A()` when creating addons for\nember or when you can not guarantee that `EmberENV.EXTEND_PROTOTYPES`\nwill be `true`.\n\nExample\n\n```js {data-filename=app/components/my-component.js}\nimport Component from '@ember/component';\nimport { A } from '@ember/array';\n\nexport default Component.extend({\n tagName: 'ul',\n classNames: ['pagination'],\n\n init() {\n this._super(...arguments);\n\n if (!this.get('content')) {\n this.set('content', A());\n this.set('otherContent', A([1,2,3]));\n }\n }\n});\n```", + "itemtype": "method", + "name": "A", + "static": 1, + "return": { + "description": "", + "type": "Ember.NativeArray" + }, + "access": "public", + "tagname": "", + "class": "@ember/array", + "module": "@ember/array" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1978, + "description": "Remove all occurrences of an object in the array.\n\n```javascript\nlet cities = ['Chicago', 'Berlin', 'Lima', 'Chicago'];\n\ncities.removeObject('Chicago'); // ['Berlin', 'Lima']\ncities.removeObject('Lima'); // ['Berlin']\ncities.removeObject('Tokyo') // ['Berlin']\n```", + "itemtype": "method", + "name": "removeObject", + "params": [ + { + "name": "obj", + "description": "object to remove", + "type": "*" + } + ], + "return": { + "description": "receiver", + "type": "EmberArray" + }, + "access": "public", + "tagname": "", + "class": "@ember/array", + "module": "ember" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1999, + "description": "Push the object onto the end of the array if it is not already\npresent in the array.\n\n```javascript\nlet cities = ['Chicago', 'Berlin'];\n\ncities.addObject('Lima'); // ['Chicago', 'Berlin', 'Lima']\ncities.addObject('Berlin'); // ['Chicago', 'Berlin', 'Lima']\n```", + "itemtype": "method", + "name": "addObject", + "params": [ + { + "name": "obj", + "description": "object to add, if not already present", + "type": "*" + } + ], + "return": { + "description": "receiver", + "type": "EmberArray" + }, + "access": "public", + "tagname": "", + "class": "@ember/array", + "module": "ember" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 2020, + "description": "Sets the value on the named property for each member. This is more\nergonomic than using other methods defined on this helper. If the object\nimplements Observable, the value will be changed to `set(),` otherwise\nit will be set directly. `null` objects are skipped.\n\n```javascript\nlet people = [{name: 'Joe'}, {name: 'Matt'}];\n\npeople.setEach('zipCode', '10011');\n// [{name: 'Joe', zipCode: '10011'}, {name: 'Matt', zipCode: '10011'}];\n```", + "itemtype": "method", + "name": "setEach", + "params": [ + { + "name": "key", + "description": "The key to set", + "type": "String" + }, + { + "name": "value", + "description": "The object to set", + "type": "Object" + } + ], + "return": { + "description": "receiver", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "@ember/array", + "module": "ember" + } + ], + "events": [], + "properties": [ + { + "file": "packages/@ember/array/index.ts", + "line": 2040, + "description": "This is the handler for the special array content property. If you get\nthis property, it will return this. If you set this property to a new\narray, it will replace the current content.\n\n```javascript\nlet peopleToMoon = ['Armstrong', 'Aldrin'];\n\npeopleToMoon.get('[]'); // ['Armstrong', 'Aldrin']\n\npeopleToMoon.set('[]', ['Collins']); // ['Collins']\npeopleToMoon.get('[]'); // ['Collins']\n```", + "itemtype": "property", + "name": "[]", + "return": { + "description": "this" + }, + "access": "public", + "tagname": "", + "class": "@ember/array", + "module": "ember" + } + ] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-ember", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/component.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/component.json new file mode 100644 index 000000000..3defaf691 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/component.json @@ -0,0 +1,164 @@ +{ + "data": { + "id": "ember-5.12.0-@ember/component", + "type": "class", + "attributes": { + "name": "@ember/component", + "shortname": "@ember/component", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/component", + "namespace": "", + "methods": [ + { + "file": "packages/@ember/-internals/glimmer/lib/components/input.ts", + "line": 55, + "description": "An opaque interface which can be imported and used in strict-mode\ntemplates to call .\n\nSee [Ember.Templates.components.Input](/ember/release/classes/Ember.Templates.components/methods/Input?anchor=Input).", + "itemtype": "method", + "name": "Input", + "see": [ + "{Ember.Templates.components.Input}" + ], + "access": "public", + "tagname": "", + "class": "@ember/component", + "module": "@ember/component" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/components/textarea.ts", + "line": 132, + "description": "An opaque interface which can be imported and used in strict-mode\ntemplates to call .\n\nSee [Ember.Templates.components.Textarea](/ember/release/classes/Ember.Templates.components/methods/Textarea?anchor=Textarea).", + "itemtype": "method", + "name": "Textarea", + "see": [ + "{Ember.Templates.components.Textarea}" + ], + "access": "public", + "tagname": "", + "class": "@ember/component", + "module": "@ember/component" + }, + { + "file": "packages/@ember/component/index.ts", + "line": 14, + "description": "Assigns a TemplateFactory to a component class.", + "itemtype": "method", + "name": "setComponentTemplate", + "static": 1, + "access": "public", + "tagname": "```js\nimport Component from '---AT-PLACEHOLDER---glimmer/component';\nimport { hbs } from 'ember-cli-htmlbars';\nimport { setComponentTemplate } from '---AT-PLACEHOLDER---ember/component';\n\nexport default class Demo extends Component {\n // ...\n}\n\nsetComponentTemplate(hbs`\n my template\n`, Demo);\n```", + "params": [ + { + "name": "templateFactory", + "description": "", + "type": "TemplateFactory" + }, + { + "name": "componentDefinition", + "description": "", + "type": "Object" + } + ], + "class": "@ember/component", + "module": "@ember/component" + }, + { + "file": "packages/@ember/component/index.ts", + "line": 40, + "description": "Returns the TemplateFactory associated with a component", + "itemtype": "method", + "name": "getComponentTemplate", + "static": 1, + "access": "public", + "tagname": "```js\nimport Component from '---AT-PLACEHOLDER---glimmer/component';\nimport { hbs } from 'ember-cli-htmlbars';\nimport { getComponentTemplate } from '---AT-PLACEHOLDER---ember/component';\n\nexport default class Demo extends Component {\n // ...\n}\n\nlet theTemplateFactory = getTemplateFactory(Demo)\n```", + "params": [ + { + "name": "componentDefinition", + "description": "", + "type": "Object" + } + ], + "return": { + "description": "", + "type": "TemplateFactory" + }, + "class": "@ember/component", + "module": "@ember/component" + }, + { + "file": "packages/@ember/component/index.ts", + "line": 64, + "description": "Tell the VM how manage a type of object / class when encountered\nvia component-invocation.\n\nA Component Manager, must implement this interface:\n- static create()\n- createComponent()\n- updateComponent()\n- destroyComponent()\n- getContext()", + "itemtype": "method", + "name": "setComponentManager", + "static": 1, + "access": "public", + "tagname": "After a component manager is registered via `setComponentManager`,\n\n```js\nimport { StateNode } from 'xstate';\nimport ComponentManager from './-private/statechart-manager';\n\nsetComponentManager((owner) => ComponentManager.create(owner), StateNode.prototype);\n```\n\nInstances of the class can be used as component.\nNo need to extend from `@glimmer/component`.\n\n```js\n// app/components/my-component.js\nimport { createMachine } from 'xstate';\n\nexport default createMachine({ ... });\n```\n```hbs\n{{!-- app/templates/application.hbs}}\n\n```", + "params": [ + { + "name": "managerFactory", + "description": "", + "type": "(owner: Owner) => import('@glimmer/interfaces').ComponentManager" + }, + { + "name": "object", + "description": "that will be managed by the return value of `managerFactory`", + "type": "Object" + } + ], + "class": "@ember/component", + "module": "@ember/component" + }, + { + "file": "packages/@ember/component/index.ts", + "line": 109, + "description": "Tells Glimmer what capabilities a Component Manager will have\n\n```js\nimport { capabilities } from '@ember/component';\n\nexport class MyComponentManager {\n capabilities = capabilities('3.13', {\n // capabilities listed here\n })\n}\n```\n\n\nFor a full list of capabilities, their defaults, and how they are used, see [@glimmer/manager](https://github.com/glimmerjs/glimmer-vm/blob/4f1bef0d9a8a3c3ebd934c5b6e09de4c5f6e4468/packages/%40glimmer/manager/lib/public/component.ts#L26)", + "itemtype": "method", + "name": "capabilities", + "static": 1, + "access": "public", + "tagname": "", + "params": [ + { + "name": "managerApiVersion", + "description": "", + "type": "'3.13'" + }, + { + "name": "options", + "description": "", + "type": "Parameters[1]" + } + ], + "class": "@ember/component", + "module": "@ember/component" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/component", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/component/helper.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/component/helper.json new file mode 100644 index 000000000..c76468501 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/component/helper.json @@ -0,0 +1,61 @@ +{ + "data": { + "id": "ember-5.12.0-@ember/component/helper", + "type": "class", + "attributes": { + "name": "@ember/component/helper", + "shortname": "@ember/component/helper", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/component", + "namespace": "", + "methods": [ + { + "file": "packages/@ember/-internals/glimmer/lib/helper.ts", + "line": 333, + "description": "In many cases it is not necessary to use the full `Helper` class.\nThe `helper` method create pure-function helpers without instances.\nFor example:\n\n```js {data-filename=app/helpers/format-currency.js}\nimport { helper } from '@ember/component/helper';\n\nexport default helper(function([cents], {currency}) {\n return `${currency}${cents * 0.01}`;\n});\n```", + "static": 1, + "params": [ + { + "name": "helper", + "description": "The helper function", + "type": "Function" + } + ], + "itemtype": "method", + "name": "helper", + "access": "public", + "tagname": "", + "since": "1.13.0", + "class": "@ember/component/helper", + "module": "@ember/component" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/component", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/component/template-only.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/component/template-only.json new file mode 100644 index 000000000..77d451744 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/component/template-only.json @@ -0,0 +1,66 @@ +{ + "data": { + "id": "ember-5.12.0-@ember/component/template-only", + "type": "class", + "attributes": { + "name": "@ember/component/template-only", + "shortname": "@ember/component/template-only", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/component/template-only", + "namespace": "", + "methods": [ + { + "file": "packages/@ember/component/template-only.ts", + "line": 6, + "description": "This utility function is used to declare a given component has no backing class. When the rendering engine detects this it\nis able to perform a number of optimizations. Templates that are associated with `templateOnly()` will be rendered _as is_\nwithout adding a wrapping `` (or any of the other element customization behaviors of [@ember/component](/ember/release/classes/Component)).\nSpecifically, this means that the template will be rendered as \"outer HTML\".\n\nIn apps, this method will usually be inserted by build-time tooling the handles converting `.hbs` files into component Javascript modules and\nwould not be directly written by the application author.\n\nAddons may want to use this method directly to ensure that a template-only component is treated consistently in all Ember versions (Ember versions\nbefore 4.0 have a \"template-only-glimmer-components\" optional feature that causes a standalone `.hbs` file to be interpreted differently).", + "example": [ + "\n\n```js\nimport templateOnly from '@ember/component/template-only';\n\nexport default templateOnly();\n```" + ], + "access": "public", + "tagname": "", + "static": 1, + "itemtype": "method", + "name": "templateOnly", + "params": [ + { + "name": "moduleName", + "description": "the module name that the template only component represents, this will be used for debugging purposes", + "type": "String" + } + ], + "category": [ + "EMBER_GLIMMER_SET_COMPONENT_TEMPLATE" + ], + "class": "@ember/component/template-only", + "module": "@ember/component/template-only" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/component/template-only", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/debug.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/debug.json new file mode 100644 index 000000000..440741312 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/debug.json @@ -0,0 +1,341 @@ +{ + "data": { + "id": "ember-5.12.0-@ember/debug", + "type": "class", + "attributes": { + "name": "@ember/debug", + "shortname": "@ember/debug", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/debug", + "namespace": "", + "methods": [ + { + "file": "packages/@ember/-internals/metal/lib/computed.ts", + "line": 919, + "description": "Allows checking if a given property on an object is a computed property. For the most part,\nthis doesn't matter (you would normally just access the property directly and use its value),\nbut for some tooling specific scenarios (e.g. the ember-inspector) it is important to\ndifferentiate if a property is a computed property or a \"normal\" property.\n\nThis will work on either a class's prototype or an instance itself.", + "static": 1, + "itemtype": "method", + "name": "isComputed", + "access": "private", + "tagname": "", + "class": "@ember/debug", + "module": "@ember/object" + }, + { + "file": "packages/@ember/debug/lib/assert.ts", + "line": 16, + "description": "Verify that a certain expectation is met, or throw a exception otherwise.\nThis is useful for communicating assumptions in the code to other human\nreaders as well as catching bugs that accidentally violates these\nexpectations.\nAssertions are removed from production builds, so they can be freely added\nfor documentation and debugging purposes without worries of incuring any\nperformance penalty. However, because of that, they should not be used for\nchecks that could reasonably fail during normal usage. Furthermore, care\nshould be taken to avoid accidentally relying on side-effects produced from\nevaluating the condition itself, since the code will not run in production.\n```javascript\nimport { assert } from '@ember/debug';\n// Test for truthiness\nassert('Must pass a string', typeof str === 'string');\n// Fail unconditionally\nassert('This code path should never be run');\n```", + "itemtype": "method", + "name": "assert", + "static": 1, + "params": [ + { + "name": "description", + "description": "Describes the expectation. This will become the\n text of the Error thrown if the assertion fails.", + "type": "String" + }, + { + "name": "condition", + "description": "Must be truthy for the assertion to pass. If\n falsy, an exception will be thrown.", + "type": "Any" + } + ], + "access": "public", + "tagname": "", + "since": "1.0.0", + "class": "@ember/debug", + "module": "@ember/controller" + }, + { + "file": "packages/@ember/debug/lib/capture-render-tree.ts", + "line": 9, + "description": "Ember Inspector calls this function to capture the current render tree.\n\nIn production mode, this requires turning on `ENV._DEBUG_RENDER_TREE`\nbefore loading Ember.", + "access": "private", + "tagname": "", + "static": 1, + "itemtype": "method", + "name": "captureRenderTree", + "params": [ + { + "name": "app", + "description": "An `ApplicationInstance`.", + "type": "ApplicationInstance" + } + ], + "since": "3.14.0", + "class": "@ember/debug", + "module": "@ember/debug" + }, + { + "file": "packages/@ember/debug/lib/deprecate.ts", + "line": 39, + "description": "Allows for runtime registration of handler functions that override the default deprecation behavior.\nDeprecations are invoked by calls to [@ember/debug/deprecate](/ember/release/classes/@ember%2Fdebug/methods/deprecate?anchor=deprecate).\nThe following example demonstrates its usage by registering a handler that throws an error if the\nmessage contains the word \"should\", otherwise defers to the default handler.\n\n```javascript\nimport { registerDeprecationHandler } from '@ember/debug';\n\nregisterDeprecationHandler((message, options, next) => {\n if (message.indexOf('should') !== -1) {\n throw new Error(`Deprecation message with should: ${message}`);\n } else {\n // defer to whatever handler was registered before this one\n next(message, options);\n }\n});\n```\n\nThe handler function takes the following arguments:\n\n\n message - The message received from the deprecation call.\n options - An object passed in with the deprecation call containing additional information including:\n \n id - An id of the deprecation in the form of package-name.specific-deprecation.\n until - The Ember version number the feature and deprecation will be removed in.\n \n next - A function that calls into the previously registered handler.\n", + "access": "public", + "tagname": "", + "static": 1, + "itemtype": "method", + "name": "registerDeprecationHandler", + "params": [ + { + "name": "handler", + "description": "A function to handle deprecation calls.", + "type": "Function" + } + ], + "since": "2.1.0", + "class": "@ember/debug", + "module": "@ember/debug" + }, + { + "file": "packages/@ember/debug/lib/deprecate.ts", + "line": 185, + "description": "Display a deprecation warning with the provided message and a stack trace\n(Chrome and Firefox only).\n\nEmber itself leverages [Semantic Versioning](https://semver.org) to aid\nprojects in keeping up with changes to the framework. Before any\nfunctionality or API is removed, it first flows linearly through a\ndeprecation staging process. The staging process currently contains two\nstages: available and enabled.\n\nDeprecations are initially released into the 'available' stage.\nDeprecations will stay in this stage until the replacement API has been\nmarked as a recommended practice via the RFC process and the addon\necosystem has generally adopted the change.\n\nOnce a deprecation meets the above criteria, it will move into the\n'enabled' stage where it will remain until the functionality or API is\neventually removed.\n\nFor application and addon developers, \"available\" deprecations are not\nurgent and \"enabled\" deprecations require action.\n\n* In a production build, this method is defined as an empty function (NOP).\nUses of this method in Ember itself are stripped from the ember.prod.js build.\n\n```javascript\nimport { deprecate } from '@ember/debug';\n\ndeprecate(\n 'Use of `assign` has been deprecated. Please use `Object.assign` or the spread operator instead.',\n false,\n {\n id: 'ember-polyfills.deprecate-assign',\n until: '5.0.0',\n url: 'https://deprecations.emberjs.com/v4.x/#toc_ember-polyfills-deprecate-assign',\n for: 'ember-source',\n since: {\n available: '4.0.0',\n enabled: '4.0.0',\n },\n }\n);\n```", + "itemtype": "method", + "name": "deprecate", + "params": [ + { + "name": "message", + "description": "A description of the deprecation.", + "type": "String" + }, + { + "name": "test", + "description": "A boolean. If falsy, the deprecation will be displayed.", + "type": "Boolean" + }, + { + "name": "options", + "description": "", + "type": "Object", + "props": [ + { + "name": "id", + "description": "A unique id for this deprecation. The id can be\n used by Ember debugging tools to change the behavior (raise, log or silence)\n for that specific deprecation. The id should be namespaced by dots, e.g.\n \"view.helper.select\".", + "type": "String" + }, + { + "name": "until", + "description": "The version of Ember when this deprecation\n warning will be removed.", + "type": "String" + }, + { + "name": "for", + "description": "A namespace for the deprecation, usually the package name", + "type": "String" + }, + { + "name": "since", + "description": "Describes when the deprecation became available and enabled.", + "type": "Object" + }, + { + "name": "url", + "description": "An optional url to the transition guide on the\n emberjs.com website.", + "type": "String", + "optional": true + } + ] + } + ], + "static": 1, + "access": "public", + "tagname": "", + "since": "1.0.0", + "class": "@ember/debug", + "module": "@ember/debug" + }, + { + "file": "packages/@ember/debug/lib/inspect.ts", + "line": 14, + "description": "Convenience method to inspect an object. This method will attempt to\nconvert the object into a useful string description.\n\nIt is a pretty simple implementation. If you want something more robust,\nuse something like JSDump: https://github.com/NV/jsDump", + "itemtype": "method", + "name": "inspect", + "static": 1, + "params": [ + { + "name": "obj", + "description": "The object you want to inspect.", + "type": "Object" + } + ], + "return": { + "description": "A description of the object", + "type": "String" + }, + "since": "1.4.0", + "access": "private", + "tagname": "", + "class": "@ember/debug", + "module": "@ember/debug" + }, + { + "file": "packages/@ember/debug/lib/warn.ts", + "line": 29, + "description": "Allows for runtime registration of handler functions that override the default warning behavior.\nWarnings are invoked by calls made to [@ember/debug/warn](/ember/release/classes/@ember%2Fdebug/methods/warn?anchor=warn).\nThe following example demonstrates its usage by registering a handler that does nothing overriding Ember's\ndefault warning behavior.\n\n```javascript\nimport { registerWarnHandler } from '@ember/debug';\n\n// next is not called, so no warnings get the default behavior\nregisterWarnHandler(() => {});\n```\n\nThe handler function takes the following arguments:\n\n\n message - The message received from the warn call. \n options - An object passed in with the warn call containing additional information including:\n \n id - An id of the warning in the form of package-name.specific-warning.\n \n next - A function that calls into the previously registered handler.\n", + "access": "public", + "tagname": "", + "static": 1, + "itemtype": "method", + "name": "registerWarnHandler", + "params": [ + { + "name": "handler", + "description": "A function to handle warnings.", + "type": "Function" + } + ], + "since": "2.1.0", + "class": "@ember/debug", + "module": "@ember/debug" + }, + { + "file": "packages/@ember/debug/lib/warn.ts", + "line": 76, + "description": "Display a warning with the provided message.\n\n* In a production build, this method is defined as an empty function (NOP).\nUses of this method in Ember itself are stripped from the ember.prod.js build.\n\n```javascript\nimport { warn } from '@ember/debug';\nimport tomsterCount from './tomster-counter'; // a module in my project\n\n// Log a warning if we have more than 3 tomsters\nwarn('Too many tomsters!', tomsterCount <= 3, {\n id: 'ember-debug.too-many-tomsters'\n});\n```", + "itemtype": "method", + "name": "warn", + "static": 1, + "params": [ + { + "name": "message", + "description": "A warning to display.", + "type": "String" + }, + { + "name": "test", + "description": "An optional boolean. If falsy, the warning\n will be displayed. If `test` is an object, the `test` parameter can\n be used as the `options` parameter and the warning is displayed.", + "type": "Boolean|Object" + }, + { + "name": "options", + "description": "", + "type": "Object", + "props": [ + { + "name": "id", + "description": "The `id` can be used by Ember debugging tools\n to change the behavior (raise, log, or silence) for that specific warning.\n The `id` should be namespaced by dots, e.g. \"ember-debug.feature-flag-with-features-stripped\"", + "type": "String" + } + ] + } + ], + "access": "public", + "tagname": "", + "since": "1.0.0", + "class": "@ember/debug", + "module": "@ember/debug" + }, + { + "file": "packages/@ember/debug/index.ts", + "line": 142, + "description": "Display a debug notice.\n\nCalls to this function are not invoked in production builds.\n\n```javascript\nimport { debug } from '@ember/debug';\n\ndebug('I\\'m a debug notice!');\n```", + "itemtype": "method", + "name": "debug", + "static": 1, + "params": [ + { + "name": "message", + "description": "A debug message to display.", + "type": "String" + } + ], + "access": "public", + "tagname": "", + "class": "@ember/debug", + "module": "@ember/debug" + }, + { + "file": "packages/@ember/debug/index.ts", + "line": 163, + "description": "Display an info notice.\n\nCalls to this function are removed from production builds, so they can be\nfreely added for documentation and debugging purposes without worries of\nincuring any performance penalty.", + "itemtype": "method", + "name": "info", + "access": "private", + "tagname": "", + "class": "@ember/debug", + "module": "@ember/debug" + }, + { + "file": "packages/@ember/debug/index.ts", + "line": 182, + "description": "Alias an old, deprecated method with its new counterpart.\n\nDisplay a deprecation warning with the provided message and a stack trace\n(Chrome and Firefox only) when the assigned method is called.\n\nCalls to this function are removed from production builds, so they can be\nfreely added for documentation and debugging purposes without worries of\nincuring any performance penalty.\n\n```javascript\nimport { deprecateFunc } from '@ember/debug';\n\nEmber.oldMethod = deprecateFunc('Please use the new, updated method', options, Ember.newMethod);\n```", + "itemtype": "method", + "name": "deprecateFunc", + "static": 1, + "params": [ + { + "name": "message", + "description": "A description of the deprecation.", + "type": "String" + }, + { + "name": "options", + "description": "The options object for `deprecate`.", + "type": "Object", + "optional": true + }, + { + "name": "func", + "description": "The new function called to replace its deprecated counterpart.", + "type": "Function" + } + ], + "return": { + "description": "A new function that wraps the original function with a deprecation warning", + "type": "Function" + }, + "access": "private", + "tagname": "", + "class": "@ember/debug", + "module": "@ember/debug" + }, + { + "file": "packages/@ember/debug/index.ts", + "line": 227, + "description": "Run a function meant for debugging.\n\nCalls to this function are removed from production builds, so they can be\nfreely added for documentation and debugging purposes without worries of\nincuring any performance penalty.\n\n```javascript\nimport Component from '@ember/component';\nimport { runInDebug } from '@ember/debug';\n\nrunInDebug(() => {\n Component.reopen({\n didInsertElement() {\n console.log(\"I'm happy\");\n }\n });\n});\n```", + "itemtype": "method", + "name": "runInDebug", + "static": 1, + "params": [ + { + "name": "func", + "description": "The function to be executed.", + "type": "Function" + } + ], + "since": "1.5.0", + "access": "public", + "tagname": "", + "class": "@ember/debug", + "module": "@ember/debug" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/debug", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/destroyable.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/destroyable.json new file mode 100644 index 000000000..9c11eb83a --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/destroyable.json @@ -0,0 +1,206 @@ +{ + "data": { + "id": "ember-5.12.0-@ember/destroyable", + "type": "class", + "attributes": { + "name": "@ember/destroyable", + "shortname": "@ember/destroyable", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/destroyable", + "namespace": "", + "methods": [ + { + "file": "packages/@ember/destroyable/index.ts", + "line": 31, + "description": "This function is used to associate a destroyable object with a parent. When the parent\nis destroyed, all registered children will also be destroyed.\n\n```js\nclass CustomSelect extends Component {\n constructor(...args) {\n super(...args);\n\n // obj is now a child of the component. When the component is destroyed,\n // obj will also be destroyed, and have all of its destructors triggered.\n this.obj = associateDestroyableChild(this, {});\n }\n}\n```\n\nReturns the associated child for convenience.", + "itemtype": "method", + "name": "associateDestroyableChild", + "params": [ + { + "name": "parent", + "description": "the destroyable to entangle the child destroyables lifetime with", + "type": "Object|Function" + }, + { + "name": "child", + "description": "the destroyable to be entangled with the parents lifetime", + "type": "Object|Function" + } + ], + "return": { + "description": "the child argument", + "type": "Object|Function" + }, + "static": 1, + "access": "public", + "tagname": "", + "class": "@ember/destroyable", + "module": "@ember/destroyable" + }, + { + "file": "packages/@ember/destroyable/index.ts", + "line": 58, + "description": "Receives a destroyable, and returns true if the destroyable has begun destroying. Otherwise returns\nfalse.\n\n ```js\n let obj = {};\n isDestroying(obj); // false\n destroy(obj);\n isDestroying(obj); // true\n // ...sometime later, after scheduled destruction\n isDestroyed(obj); // true\n isDestroying(obj); // true\n ```", + "itemtype": "method", + "name": "isDestroying", + "params": [ + { + "name": "destroyable", + "description": "the object to check", + "type": "Object|Function" + } + ], + "return": { + "description": "", + "type": "Boolean" + }, + "static": 1, + "access": "public", + "tagname": "", + "class": "@ember/destroyable", + "module": "@ember/destroyable" + }, + { + "file": "packages/@ember/destroyable/index.ts", + "line": 80, + "description": "Receives a destroyable, and returns true if the destroyable has finished destroying. Otherwise\nreturns false.\n\n```js\nlet obj = {};\n\nisDestroyed(obj); // false\ndestroy(obj);\n\n// ...sometime later, after scheduled destruction\n\nisDestroyed(obj); // true\n```", + "itemtype": "method", + "name": "isDestroyed", + "params": [ + { + "name": "destroyable", + "description": "the object to check", + "type": "Object|Function" + } + ], + "return": { + "description": "", + "type": "Boolean" + }, + "static": 1, + "access": "public", + "tagname": "", + "class": "@ember/destroyable", + "module": "@ember/destroyable" + }, + { + "file": "packages/@ember/destroyable/index.ts", + "line": 103, + "description": "Initiates the destruction of a destroyable object. It runs all associated destructors, and then\ndestroys all children recursively.\n\n```js\nlet obj = {};\n\nregisterDestructor(obj, () => console.log('destroyed!'));\n\ndestroy(obj); // this will schedule the destructor to be called\n\n// ...some time later, during scheduled destruction\n\n// destroyed!\n```\n\nDestruction via `destroy()` follows these steps:\n\n1, Mark the destroyable such that `isDestroying(destroyable)` returns `true`\n2, Call `destroy()` on each of the destroyable's associated children\n3, Schedule calling the destroyable's destructors\n4, Schedule setting destroyable such that `isDestroyed(destroyable)` returns `true`\n\nThis results in the entire tree of destroyables being first marked as destroying,\nthen having all of their destructors called, and finally all being marked as isDestroyed.\nThere won't be any in between states where some items are marked as `isDestroying` while\ndestroying, while others are not.", + "itemtype": "method", + "name": "destroy", + "params": [ + { + "name": "destroyable", + "description": "the object to destroy", + "type": "Object|Function" + } + ], + "static": 1, + "access": "public", + "tagname": "", + "class": "@ember/destroyable", + "module": "@ember/destroyable" + }, + { + "file": "packages/@ember/destroyable/index.ts", + "line": 138, + "description": "This function asserts that all objects which have associated destructors or associated children\nhave been destroyed at the time it is called. It is meant to be a low level hook that testing\nframeworks can use to hook into and validate that all destroyables have in fact been destroyed.\n\nThis function requires that `enableDestroyableTracking` was called previously, and is only\navailable in non-production builds.", + "itemtype": "method", + "name": "assertDestroyablesDestroyed", + "static": 1, + "access": "public", + "tagname": "", + "class": "@ember/destroyable", + "module": "@ember/destroyable" + }, + { + "file": "packages/@ember/destroyable/index.ts", + "line": 152, + "description": "This function instructs the destroyable system to keep track of all destroyables (their\nchildren, destructors, etc). This enables a future usage of `assertDestroyablesDestroyed`\nto be used to ensure that all destroyable tasks (registered destructors and associated children)\nhave completed when `assertDestroyablesDestroyed` is called.", + "itemtype": "method", + "name": "enableDestroyableTracking", + "static": 1, + "access": "public", + "tagname": "", + "class": "@ember/destroyable", + "module": "@ember/destroyable" + }, + { + "file": "packages/@ember/destroyable/index.ts", + "line": 164, + "description": "Receives a destroyable object and a destructor function, and associates the\nfunction with it. When the destroyable is destroyed with destroy, or when its\nparent is destroyed, the destructor function will be called.\n\n```js\nimport Component from '@glimmer/component';\nimport { registerDestructor } from '@ember/destroyable';\n\nclass Modal extends Component {\n @service resize;\n\n constructor(...args) {\n super(...args);\n\n this.resize.register(this, this.layout);\n\n registerDestructor(this, () => this.resize.unregister(this));\n }\n}\n```\n\nMultiple destructors can be associated with a given destroyable, and they can be\nassociated over time, allowing libraries to dynamically add destructors as needed.\n`registerDestructor` also returns the associated destructor function, for convenience.\n\nThe destructor function is passed a single argument, which is the destroyable itself.\nThis allows the function to be reused multiple times for many destroyables, rather\nthan creating a closure function per destroyable.\n\n```js\nimport Component from '@glimmer/component';\nimport { registerDestructor } from '@ember/destroyable';\n\nfunction unregisterResize(instance) {\n instance.resize.unregister(instance);\n}\n\nclass Modal extends Component {\n @service resize;\n\n constructor(...args) {\n super(...args);\n\n this.resize.register(this, this.layout);\n\n registerDestructor(this, unregisterResize);\n }\n}\n```", + "itemtype": "method", + "name": "registerDestructor", + "params": [ + { + "name": "destroyable", + "description": "the destroyable to register the destructor function with", + "type": "Object|Function" + }, + { + "name": "destructor", + "description": "the destructor to run when the destroyable object is destroyed", + "type": "Function" + } + ], + "static": 1, + "access": "public", + "tagname": "", + "class": "@ember/destroyable", + "module": "@ember/destroyable" + }, + { + "file": "packages/@ember/destroyable/index.ts", + "line": 229, + "description": "Receives a destroyable and a destructor function, and de-associates the destructor\nfrom the destroyable.\n\n```js\nimport Component from '@glimmer/component';\nimport { registerDestructor, unregisterDestructor } from '@ember/destroyable';\n\nclass Modal extends Component {\n @service modals;\n\n constructor(...args) {\n super(...args);\n\n this.modals.add(this);\n\n this.modalDestructor = registerDestructor(this, () => this.modals.remove(this));\n }\n\n @action pinModal() {\n unregisterDestructor(this, this.modalDestructor);\n }\n}\n```", + "itemtype": "method", + "name": "unregisterDestructor", + "params": [ + { + "name": "destroyable", + "description": "the destroyable to unregister the destructor function from", + "type": "Object|Function" + }, + { + "name": "destructor", + "description": "the destructor to remove from the destroyable", + "type": "Function" + } + ], + "static": 1, + "access": "public", + "tagname": "", + "class": "@ember/destroyable", + "module": "@ember/destroyable" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/destroyable", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/engine.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/engine.json new file mode 100644 index 000000000..fbcfda672 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/engine.json @@ -0,0 +1,87 @@ +{ + "data": { + "id": "ember-5.12.0-@ember/engine", + "type": "class", + "attributes": { + "name": "@ember/engine", + "shortname": "@ember/engine", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/engine", + "namespace": "", + "methods": [ + { + "file": "packages/@ember/engine/lib/engine-parent.ts", + "line": 8, + "description": "`getEngineParent` retrieves an engine instance's parent instance.", + "itemtype": "method", + "name": "getEngineParent", + "params": [ + { + "name": "engine", + "description": "An engine instance.", + "type": "EngineInstance" + } + ], + "return": { + "description": "The parent engine instance.", + "type": "EngineInstance" + }, + "static": 1, + "access": "private", + "tagname": "", + "class": "@ember/engine", + "module": "@ember/engine" + }, + { + "file": "packages/@ember/engine/lib/engine-parent.ts", + "line": 22, + "description": "`setEngineParent` sets an engine instance's parent instance.", + "itemtype": "method", + "name": "setEngineParent", + "params": [ + { + "name": "engine", + "description": "An engine instance.", + "type": "EngineInstance" + }, + { + "name": "parent", + "description": "The parent engine instance.", + "type": "EngineInstance" + } + ], + "access": "private", + "tagname": "", + "class": "@ember/engine", + "module": "@ember/engine" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/engine", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/helper.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/helper.json new file mode 100644 index 000000000..33fabf06b --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/helper.json @@ -0,0 +1,210 @@ +{ + "data": { + "id": "ember-5.12.0-@ember/helper", + "type": "class", + "attributes": { + "name": "@ember/helper", + "shortname": "@ember/helper", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "ember", + "namespace": "", + "methods": [ + { + "file": "packages/@ember/-internals/glimmer/lib/helpers/array.ts", + "line": 5, + "description": "Use the `{{array}}` helper to create an array to pass as an option to your\ncomponents.\n\n```handlebars\n\n```\n or\n```handlebars\n{{my-component people=(array\n 'Tom Dale'\n 'Yehuda Katz'\n this.myOtherPerson)\n}}\n```\n\nWould result in an object such as:\n\n```js\n['Tom Dale', 'Yehuda Katz', this.get('myOtherPerson')]\n```\n\nWhere the 3rd item in the array is bound to updates of the `myOtherPerson` property.", + "itemtype": "method", + "name": "array", + "params": [ + { + "name": "options", + "description": "", + "type": "Array" + } + ], + "return": { + "description": "Array", + "type": "Array" + }, + "since": "3.8.0", + "access": "public", + "tagname": "", + "class": "@ember/helper", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/helpers/concat.ts", + "line": 5, + "description": "Concatenates the given arguments into a string.\n\nExample:\n\n```handlebars\n{{some-component name=(concat firstName \" \" lastName)}}\n\n{{! would pass name=\" \" to the component}}\n```\n\nor for angle bracket invocation, you actually don't need concat at all.\n\n```handlebars\n\n```", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "concat", + "since": "1.13.0", + "class": "@ember/helper", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/helpers/fn.ts", + "line": 5, + "description": "The `fn` helper allows you to ensure a function that you are passing off\nto another component, helper, or modifier has access to arguments that are\navailable in the template.\n\nFor example, if you have an `each` helper looping over a number of items, you\nmay need to pass a function that expects to receive the item as an argument\nto a component invoked within the loop. Here's how you could use the `fn`\nhelper to pass both the function and its arguments together:\n\n ```handlebars {data-filename=app/templates/components/items-listing.hbs}\n{{#each @items as |item|}}\n \n{{/each}}\n```\n\n```js {data-filename=app/components/items-list.js}\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\n\nexport default class ItemsList extends Component {\n @action\n handleSelected(item) {\n // ...snip...\n }\n}\n```\n\nIn this case the `display-item` component will receive a normal function\nthat it can invoke. When it invokes the function, the `handleSelected`\nfunction will receive the `item` and any arguments passed, thanks to the\n`fn` helper.\n\nLet's take look at what that means in a couple circumstances:\n\n- When invoked as `this.args.select()` the `handleSelected` function will\n receive the `item` from the loop as its first and only argument.\n- When invoked as `this.args.select('foo')` the `handleSelected` function\n will receive the `item` from the loop as its first argument and the\n string `'foo'` as its second argument.\n\nIn the example above, we used `@action` to ensure that `handleSelected` is\nproperly bound to the `items-list`, but let's explore what happens if we\nleft out `@action`:\n\n```js {data-filename=app/components/items-list.js}\nimport Component from '@glimmer/component';\n\nexport default class ItemsList extends Component {\n handleSelected(item) {\n // ...snip...\n }\n}\n```\n\nIn this example, when `handleSelected` is invoked inside the `display-item`\ncomponent, it will **not** have access to the component instance. In other\nwords, it will have no `this` context, so please make sure your functions\nare bound (via `@action` or other means) before passing into `fn`!\n\nSee also [partial application](https://en.wikipedia.org/wiki/Partial_application).", + "itemtype": "method", + "name": "fn", + "access": "public", + "tagname": "", + "since": "3.11.0", + "class": "@ember/helper", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/helpers/get.ts", + "line": 5, + "description": "Dynamically look up a property on an object or an element in an array.\nThe second argument to `{{get}}` should have a string or number value,\nalthough it can be bound.\n\nFor example, these two usages are equivalent:\n\n```js {data-filename=app/components/developer-detail.js}\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\n\nexport default class extends Component {\n @tracked developer = {\n name: \"Sandi Metz\",\n language: \"Ruby\"\n }\n}\n```\n\n```handlebars\n{{this.developer.name}}\n{{get this.developer \"name\"}}\n```\n\nIf there were several facts about a person, the `{{get}}` helper can dynamically\npick one:\n\n```handlebars {data-filename=app/templates/application.hbs}\n\n```\n\n```handlebars\n{{get this.developer @factName}}\n```\n\nFor a more complex example, this template would allow the user to switch\nbetween showing the user's name and preferred coding language with a click:\n\n```js {data-filename=app/components/developer-detail.js}\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\n\nexport default class extends Component {\n @tracked developer = {\n name: \"Sandi Metz\",\n language: \"Ruby\"\n }\n\n @tracked currentFact = 'name'\n\n @action\n showFact(fact) {\n this.currentFact = fact;\n }\n}\n```\n\n```js {data-filename=app/components/developer-detail.js}\n{{get this.developer this.currentFact}}\n\nShow name\nShow language\n```\n\nThe `{{get}}` helper can also respect mutable values itself. For example:\n\n```js {data-filename=app/components/developer-detail.js}\n\n\nShow name\nShow language\n```\n\nWould allow the user to swap what fact is being displayed, and also edit\nthat fact via a two-way mutable binding.\n\nThe `{{get}}` helper can also be used for array element access via index.\nThis would display the value of the first element in the array `this.names`:\n\n```handlebars\n{{get this.names 0}}\n```\n\nArray element access also works with a dynamic second argument:\n\n```handlebars\n{{get this.names @index}}\n```", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "get", + "since": "2.1.0", + "class": "@ember/helper", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/helpers/hash.ts", + "line": 5, + "description": "Use the `{{hash}}` helper to create a hash to pass as an option to your\ncomponents. This is specially useful for contextual components where you can\njust yield a hash:\n\n```handlebars\n{{yield (hash\n name='Sarah'\n title=office\n)}}\n```\n\nWould result in an object such as:\n\n```js\n{ name: 'Sarah', title: this.get('office') }\n```\n\nWhere the `title` is bound to updates of the `office` property.\n\nNote that the hash is an empty object with no prototype chain, therefore\ncommon methods like `toString` are not available in the resulting hash.\nIf you need to use such a method, you can use the `call` or `apply`\napproach:\n\n```js\nfunction toString(obj) {\n return Object.prototype.toString.apply(obj);\n}\n```", + "itemtype": "method", + "name": "hash", + "params": [ + { + "name": "options", + "description": "", + "type": "Object" + } + ], + "return": { + "description": "Hash", + "type": "Object" + }, + "since": "2.3.0", + "access": "public", + "tagname": "", + "class": "@ember/helper", + "module": "ember" + }, + { + "file": "packages/@ember/helper/index.ts", + "line": 17, + "description": "`capabilities` returns a capabilities configuration which can be used to modify\nthe behavior of the manager. Manager capabilities _must_ be provided using the\n`capabilities` function, as the underlying implementation can change over time.\n\nThe first argument to capabilities is a version string, which is the version of\nEmber that the capabilities were defined in. Ember can add new versions at any\ntime, and these may have entirely different behaviors, but it will not remove\nold versions until the next major version.\n\n```js\ncapabilities('3.23');\n```\n\nThe second argument is an object of capabilities and boolean values indicating\nwhether they are enabled or disabled.\n\n```js\ncapabilities('3.23', {\n hasValue: true,\n hasDestructor: true,\n});\n```\n\nIf no value is specified, then the default value will be used.\n\n### `3.23` capabilities\n\n#### `hasDestroyable`\n\n- Default value: false\n\nDetermines if the helper has a destroyable to include in the destructor\nhierarchy. If enabled, the `getDestroyable` hook will be called, and its result\nwill be associated with the destroyable parent block.\n\n#### `hasValue`\n\n- Default value: false\n\nDetermines if the helper has a value which can be used externally. The helper's\n`getValue` hook will be run whenever the value of the helper is accessed if this\ncapability is enabled.", + "itemtype": "method", + "name": "capabilities", + "static": 1, + "params": [ + { + "name": "managerApiVersion", + "description": "The version of capabilities that are being used", + "type": "String" + }, + { + "name": "options", + "description": "The capabilities values" + } + ], + "return": { + "description": "The capabilities object instance", + "type": "Capabilities" + }, + "access": "public", + "tagname": "", + "class": "@ember/helper", + "module": "@ember/helper" + }, + { + "file": "packages/@ember/helper/index.ts", + "line": 71, + "description": "Sets the helper manager for an object or function.\n\n```js\nsetHelperManager((owner) => new ClassHelperManager(owner), Helper)\n```\n\nWhen a value is used as a helper in a template, the helper manager is looked up\non the object by walking up its prototype chain and finding the first helper\nmanager. This manager then receives the value and can create and manage an\ninstance of a helper from it. This provides a layer of indirection that allows\nusers to design high-level helper APIs, without Ember needing to worry about the\ndetails. High-level APIs can be experimented with and iterated on while the\ncore of Ember helpers remains stable, and new APIs can be introduced gradually\nover time to existing code bases.\n\n`setHelperManager` receives two arguments:\n\n1. A factory function, which receives the `owner` and returns an instance of a\n helper manager.\n2. A helper definition, which is the object or function to associate the factory function with.\n\nThe first time the object is looked up, the factory function will be called to\ncreate the helper manager. It will be cached, and in subsequent lookups the\ncached helper manager will be used instead.\n\nOnly one helper manager is guaranteed to exist per `owner` and per usage of\n`setHelperManager`, so many helpers will end up using the same instance of the\nhelper manager. As such, you should only store state that is related to the\nmanager itself. If you want to store state specific to a particular helper\ndefinition, you should assign a unique helper manager to that helper. In\ngeneral, most managers should either be stateless, or only have the `owner` they\nwere created with as state.\n\nHelper managers must fulfill the following interface (This example uses\n[TypeScript interfaces](https://www.typescriptlang.org/docs/handbook/interfaces.html)\nfor precision, you do not need to write helper managers using TypeScript):\n\n```ts\ninterface HelperManager {\n capabilities: HelperCapabilities;\n\n createHelper(definition: HelperDefinition, args: TemplateArgs): HelperStateBucket;\n\n getValue?(bucket: HelperStateBucket): unknown;\n\n runEffect?(bucket: HelperStateBucket): void;\n\n getDestroyable?(bucket: HelperStateBucket): object;\n}\n```\n\nThe capabilities property _must_ be provided using the `capabilities()` function\nimported from the same module as `setHelperManager`:\n\n```js\nimport { capabilities } from '@ember/helper';\n\nclass MyHelperManager {\n capabilities = capabilities('3.21.0', { hasValue: true });\n\n // ...snip...\n}\n```\n\nBelow is a description of each of the methods on the interface and their\nfunctions.\n\n#### `createHelper`\n\n`createHelper` is a required hook on the HelperManager interface. The hook is\npassed the definition of the helper that is currently being created, and is\nexpected to return a _state bucket_. This state bucket is what represents the\ncurrent state of the helper, and will be passed to the other lifecycle hooks at\nappropriate times. It is not necessarily related to the definition of the\nhelper itself - for instance, you could return an object _containing_ an\ninstance of the helper:\n\n```js\nclass MyManager {\n createHelper(Definition, args) {\n return {\n instance: new Definition(args);\n };\n }\n}\n```\n\nThis allows the manager to store metadata that it doesn't want to expose to the\nuser.\n\nThis hook is _not_ autotracked - changes to tracked values used within this hook\nwill _not_ result in a call to any of the other lifecycle hooks. This is because\nit is unclear what should happen if it invalidates, and rather than make a\ndecision at this point, the initial API is aiming to allow as much expressivity\nas possible. This could change in the future with changes to capabilities and\ntheir behaviors.\n\nIf users do want to autotrack some values used during construction, they can\neither create the instance of the helper in `runEffect` or `getValue`, or they\ncan use the `cache` API to autotrack the `createHelper` hook themselves. This\nprovides maximum flexibility and expressiveness to manager authors.\n\nThis hook has the following timing semantics:\n\n**Always**\n- called as discovered during DOM construction\n- called in definition order in the template\n\n#### `getValue`\n\n`getValue` is an optional hook that should return the value of the helper. This\nis the value that is returned from the helper and passed into the template.\n\nThis hook is called when the value is requested from the helper (e.g. when the\ntemplate is rendering and the helper value is needed). The hook is autotracked,\nand will rerun whenever any tracked values used inside of it are updated.\nOtherwise it does not rerun.\n\n> Note: This means that arguments which are not _consumed_ within the hook will\n> not trigger updates.\n\nThis hook is only called for helpers with the `hasValue` capability enabled.\nThis hook has the following timing semantics:\n\n**Always**\n- called the first time the helper value is requested\n- called after autotracked state has changed\n\n**Never**\n- called if the `hasValue` capability is disabled\n\n#### `runEffect`\n\n`runEffect` is an optional hook that should run the effect that the helper is\napplying, setting it up or updating it.\n\nThis hook is scheduled to be called some time after render and prior to paint.\nThere is not a guaranteed, 1-to-1 relationship between a render pass and this\nhook firing. For instance, multiple render passes could occur, and the hook may\nonly trigger once. It may also never trigger if it was dirtied in one render\npass and then destroyed in the next.\n\nThe hook is autotracked, and will rerun whenever any tracked values used inside\nof it are updated. Otherwise it does not rerun.\n\nThe hook is also run during a time period where state mutations are _disabled_\nin Ember. Any tracked state mutation will throw an error during this time,\nincluding changes to tracked properties, changes made using `Ember.set`, updates\nto computed properties, etc. This is meant to prevent infinite rerenders and\nother antipatterns.\n\nThis hook is only called for helpers with the `hasScheduledEffect` capability\nenabled. This hook is also not called in SSR currently, though this could be\nadded as a capability in the future. It has the following timing semantics:\n\n**Always**\n- called after the helper was first created, if the helper has not been\n destroyed since creation\n- called after autotracked state has changed, if the helper has not been\n destroyed during render\n\n**Never**\n- called if the `hasScheduledEffect` capability is disabled\n- called in SSR\n\n#### `getDestroyable`\n\n`getDestroyable` is an optional hook that users can use to register a\ndestroyable object for the helper. This destroyable will be registered to the\ncontaining block or template parent, and will be destroyed when it is destroyed.\nSee the [Destroyables RFC](https://github.com/emberjs/rfcs/blob/master/text/0580-destroyables.md)\nfor more details.\n\n`getDestroyable` is only called if the `hasDestroyable` capability is enabled.\n\nThis hook has the following timing semantics:\n\n**Always**\n- called immediately after the `createHelper` hook is called\n\n**Never**\n- called if the `hasDestroyable` capability is disabled", + "itemtype": "method", + "name": "setHelperManager", + "static": 1, + "params": [ + { + "name": "factory", + "description": "A factory function which receives an optional owner, and returns a helper manager", + "type": "Function" + }, + { + "name": "definition", + "description": "The definition to associate the manager factory with", + "type": "Object" + } + ], + "return": { + "description": "The definition passed into setHelperManager", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "@ember/helper", + "module": "@ember/helper" + }, + { + "file": "packages/@ember/helper/index.ts", + "line": 265, + "description": "The `invokeHelper` function can be used to create a helper instance in\nJavaScript.\n\nTo access a helper's value you have to use `getValue` from\n`@glimmer/tracking/primitives/cache`.\n\n```js\n// app/components/data-loader.js\nimport Component from '@glimmer/component';\nimport { getValue } from '@glimmer/tracking/primitives/cache';\nimport Helper from '@ember/component/helper';\nimport { invokeHelper } from '@ember/helper';\n\nclass PlusOne extends Helper {\n compute([number]) {\n return number + 1;\n }\n}\n\nexport default class PlusOneComponent extends Component {\n plusOne = invokeHelper(this, PlusOne, () => {\n return {\n positional: [this.args.number],\n };\n });\n\n get value() {\n return getValue(this.plusOne);\n }\n}\n```\n```js\n{{this.value}}\n```\n\nIt receives three arguments:\n\n* `context`: The parent context of the helper. When the parent is torn down and\n removed, the helper will be as well.\n* `definition`: The definition of the helper.\n* `computeArgs`: An optional function that produces the arguments to the helper.\n The function receives the parent context as an argument, and must return an\n object with a `positional` property that is an array and/or a `named`\n property that is an object.\n\nAnd it returns a Cache instance that contains the most recent value of the\nhelper. You can access the helper using `getValue()` like any other cache. The\ncache is also destroyable, and using the `destroy()` function on it will cause\nthe helper to be torn down.\n\nNote that using `getValue()` on helpers that have scheduled effects will not\ntrigger the effect early. Effects will continue to run at their scheduled time.", + "itemtype": "method", + "name": "invokeHelper", + "static": 1, + "params": [ + { + "name": "context", + "description": "The parent context of the helper", + "type": "Object" + }, + { + "name": "definition", + "description": "The helper definition", + "type": "Object" + }, + { + "name": "computeArgs", + "description": "An optional function that produces args", + "type": "Function" + } + ], + "return": { + "description": "" + }, + "access": "public", + "tagname": "", + "class": "@ember/helper", + "module": "@ember/helper" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-ember", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/instrumentation.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/instrumentation.json new file mode 100644 index 000000000..ad463ce99 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/instrumentation.json @@ -0,0 +1,138 @@ +{ + "data": { + "id": "ember-5.12.0-@ember/instrumentation", + "type": "class", + "attributes": { + "name": "@ember/instrumentation", + "shortname": "@ember/instrumentation", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/instrumentation", + "namespace": "", + "methods": [ + { + "file": "packages/@ember/instrumentation/index.ts", + "line": 120, + "description": "Notifies event's subscribers, calls `before` and `after` hooks.", + "itemtype": "method", + "name": "instrument", + "static": 1, + "params": [ + { + "name": "name", + "description": "Namespaced event name.", + "type": "String", + "optional": true + }, + { + "name": "payload", + "description": "", + "type": "Object" + }, + { + "name": "callback", + "description": "Function that you're instrumenting.", + "type": "Function" + }, + { + "name": "binding", + "description": "Context that instrument function is called with.", + "type": "Object" + } + ], + "access": "private", + "tagname": "", + "class": "@ember/instrumentation", + "module": "@ember/instrumentation" + }, + { + "file": "packages/@ember/instrumentation/index.ts", + "line": 273, + "description": "Subscribes to a particular event or instrumented block of code.", + "itemtype": "method", + "name": "subscribe", + "static": 1, + "params": [ + { + "name": "pattern", + "description": "Namespaced event name.", + "type": "String", + "optional": true + }, + { + "name": "object", + "description": "Before and After hooks.", + "type": "Object", + "optional": true + } + ], + "return": { + "description": "", + "type": "Subscriber" + }, + "access": "private", + "tagname": "", + "class": "@ember/instrumentation", + "module": "@ember/instrumentation" + }, + { + "file": "packages/@ember/instrumentation/index.ts", + "line": 313, + "description": "Unsubscribes from a particular event or instrumented block of code.", + "itemtype": "method", + "name": "unsubscribe", + "static": 1, + "params": [ + { + "name": "subscriber", + "description": "", + "type": "Object", + "optional": true + } + ], + "access": "private", + "tagname": "", + "class": "@ember/instrumentation", + "module": "@ember/instrumentation" + }, + { + "file": "packages/@ember/instrumentation/index.ts", + "line": 336, + "description": "Resets `Instrumentation` by flushing list of subscribers.", + "itemtype": "method", + "name": "reset", + "static": 1, + "access": "private", + "tagname": "", + "class": "@ember/instrumentation", + "module": "@ember/instrumentation" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/instrumentation", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/object.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/object.json new file mode 100644 index 000000000..1799fa78c --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/object.json @@ -0,0 +1,521 @@ +{ + "data": { + "id": "ember-5.12.0-@ember/object", + "type": "class", + "attributes": { + "name": "@ember/object", + "shortname": "@ember/object", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/object", + "namespace": "", + "methods": [ + { + "file": "packages/@ember/-internals/metal/lib/computed.ts", + "line": 731, + "description": "This helper returns a new property descriptor that wraps the passed\ncomputed property function. You can use this helper to define properties with\nnative decorator syntax, mixins, or via `defineProperty()`.\n\nExample:\n\n```js\nimport { computed, set } from '@ember/object';\n\nclass Person {\n constructor() {\n this.firstName = 'Betty';\n this.lastName = 'Jones';\n },\n\n @computed('firstName', 'lastName')\n get fullName() {\n return `${this.firstName} ${this.lastName}`;\n }\n}\n\nlet client = new Person();\n\nclient.fullName; // 'Betty Jones'\n\nset(client, 'lastName', 'Fuller');\nclient.fullName; // 'Betty Fuller'\n```\n\nClassic Class Example:\n\n```js\nimport EmberObject, { computed } from '@ember/object';\n\nlet Person = EmberObject.extend({\n init() {\n this._super(...arguments);\n\n this.firstName = 'Betty';\n this.lastName = 'Jones';\n },\n\n fullName: computed('firstName', 'lastName', function() {\n return `${this.get('firstName')} ${this.get('lastName')}`;\n })\n});\n\nlet client = Person.create();\n\nclient.get('fullName'); // 'Betty Jones'\n\nclient.set('lastName', 'Fuller');\nclient.get('fullName'); // 'Betty Fuller'\n```\n\nYou can also provide a setter, either directly on the class using native class\nsyntax, or by passing a hash with `get` and `set` functions.\n\nExample:\n\n```js\nimport { computed, set } from '@ember/object';\n\nclass Person {\n constructor() {\n this.firstName = 'Betty';\n this.lastName = 'Jones';\n },\n\n @computed('firstName', 'lastName')\n get fullName() {\n return `${this.firstName} ${this.lastName}`;\n }\n\n set fullName(value) {\n let [firstName, lastName] = value.split(/\\s+/);\n\n set(this, 'firstName', firstName);\n set(this, 'lastName', lastName);\n\n return value;\n }\n}\n\nlet client = new Person();\n\nclient.fullName; // 'Betty Jones'\n\nset(client, 'lastName', 'Fuller');\nclient.fullName; // 'Betty Fuller'\n```\n\nClassic Class Example:\n\n```js\nimport EmberObject, { computed } from '@ember/object';\n\nlet Person = EmberObject.extend({\n init() {\n this._super(...arguments);\n\n this.firstName = 'Betty';\n this.lastName = 'Jones';\n },\n\n fullName: computed('firstName', 'lastName', {\n get(key) {\n return `${this.get('firstName')} ${this.get('lastName')}`;\n },\n set(key, value) {\n let [firstName, lastName] = value.split(/\\s+/);\n this.setProperties({ firstName, lastName });\n return value;\n }\n })\n});\n\nlet client = Person.create();\nclient.get('firstName'); // 'Betty'\n\nclient.set('fullName', 'Carroll Fuller');\nclient.get('firstName'); // 'Carroll'\n```\n\nWhen passed as an argument, the `set` function should accept two parameters,\n`key` and `value`. The value returned from `set` will be the new value of the\nproperty.\n\n_Note: This is the preferred way to define computed properties when writing third-party\nlibraries that depend on or use Ember, since there is no guarantee that the user\nwill have [prototype Extensions](https://guides.emberjs.com/release/configuring-ember/disabling-prototype-extensions/) enabled._", + "itemtype": "method", + "name": "computed", + "static": 1, + "params": [ + { + "name": "dependentKeys*", + "description": "Optional dependent keys that trigger this computed property.", + "type": "String", + "optional": true + }, + { + "name": "func", + "description": "The computed property function.", + "type": "Function" + } + ], + "return": { + "description": "property decorator instance", + "type": "ComputedDecorator" + }, + "access": "public", + "tagname": "", + "class": "@ember/object", + "module": "@ember/object" + }, + { + "file": "packages/@ember/-internals/metal/lib/get_properties.ts", + "line": 6, + "description": "To get multiple properties at once, call `getProperties`\nwith an object followed by a list of strings or an array:\n\n```javascript\nimport { getProperties } from '@ember/object';\n\ngetProperties(record, 'firstName', 'lastName', 'zipCode');\n// { firstName: 'John', lastName: 'Doe', zipCode: '10011' }\n```\n\nis equivalent to:\n\n```javascript\nimport { getProperties } from '@ember/object';\n\ngetProperties(record, ['firstName', 'lastName', 'zipCode']);\n// { firstName: 'John', lastName: 'Doe', zipCode: '10011' }\n```", + "itemtype": "method", + "name": "getProperties", + "static": 1, + "params": [ + { + "name": "obj", + "description": "", + "type": "Object" + }, + { + "name": "list", + "description": "of keys to get", + "type": "String...|Array" + } + ], + "return": { + "description": "", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "@ember/object", + "module": "@ember/object" + }, + { + "file": "packages/@ember/-internals/metal/lib/properties.ts", + "line": 13, + "description": "NOTE: This is a low-level method used by other parts of the API. You almost\nnever want to call this method directly. Instead you should use\n`mixin()` to define new properties.\n\nDefines a property on an object. This method works much like the ES5\n`Object.defineProperty()` method except that it can also accept computed\nproperties and other special descriptors.\n\nNormally this method takes only three parameters. However if you pass an\ninstance of `Descriptor` as the third param then you can pass an\noptional value as the fourth parameter. This is often more efficient than\ncreating new descriptor hashes for each property.\n\n## Examples\n\n```javascript\nimport { defineProperty, computed } from '@ember/object';\n\n// ES5 compatible mode\ndefineProperty(contact, 'firstName', {\n writable: true,\n configurable: false,\n enumerable: true,\n value: 'Charles'\n});\n\n// define a simple property\ndefineProperty(contact, 'lastName', undefined, 'Jolley');\n\n// define a computed property\ndefineProperty(contact, 'fullName', computed('firstName', 'lastName', function() {\n return this.firstName+' '+this.lastName;\n}));\n```", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "defineProperty", + "static": 1, + "params": [ + { + "name": "obj", + "description": "the object to define this property on. This may be a prototype.", + "type": "Object" + }, + { + "name": "keyName", + "description": "the name of the property", + "type": "String" + }, + { + "name": "desc", + "description": "an instance of `Descriptor` (typically a\n computed property) or an ES5 descriptor.\n You must provide this or `data` but not both.", + "type": "Descriptor", + "optional": true + }, + { + "name": "data", + "description": "something other than a descriptor, that will\n become the explicit value of this property.", + "type": "*", + "optional": true + } + ], + "class": "@ember/object", + "module": "@ember/object" + }, + { + "file": "packages/@ember/-internals/metal/lib/property_events.ts", + "line": 32, + "description": "This function is called just after an object property has changed.\nIt will notify any observers and clear caches among other things.\n\nNormally you will not need to call this method directly but if for some\nreason you can't directly watch a property you can invoke this method\nmanually.", + "itemtype": "method", + "name": "notifyPropertyChange", + "params": [ + { + "name": "obj", + "description": "The object with the property that will change", + "type": "Object" + }, + { + "name": "keyName", + "description": "The property key (or path) that will change.", + "type": "String" + }, + { + "name": "_meta", + "description": "The objects meta.", + "type": "Meta", + "optional": true + }, + { + "name": "value", + "description": "The new value to set for the property", + "type": "Unknown", + "optional": true + } + ], + "return": { + "description": "", + "type": "Void" + }, + "since": "3.1.0", + "access": "public", + "tagname": "", + "class": "@ember/object", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/metal/lib/property_events.ts", + "line": 83, + "itemtype": "method", + "name": "beginPropertyChanges", + "chainable": 1, + "access": "private", + "tagname": "", + "class": "@ember/object", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/metal/lib/property_events.ts", + "line": 93, + "itemtype": "method", + "name": "endPropertyChanges", + "access": "private", + "tagname": "", + "class": "@ember/object", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/metal/lib/property_events.ts", + "line": 105, + "description": "Make a series of property changes together in an\nexception-safe way.\n\n```javascript\nEmber.changeProperties(function() {\n obj1.set('foo', mayBlowUpWhenSet);\n obj2.set('bar', baz);\n});\n```", + "itemtype": "method", + "name": "changeProperties", + "params": [ + { + "name": "callback", + "description": "", + "type": "Function" + } + ], + "access": "private", + "tagname": "", + "class": "@ember/object", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/metal/lib/property_get.ts", + "line": 51, + "description": "Gets the value of a property on an object. If the property is computed,\nthe function will be invoked. If the property is not defined but the\nobject implements the `unknownProperty` method then that will be invoked.\n\n```javascript\nimport { get } from '@ember/object';\nget(obj, \"name\");\n```\n\nIf you plan to run on IE8 and older browsers then you should use this\nmethod anytime you want to retrieve a property on an object that you don't\nknow for sure is private. (Properties beginning with an underscore '_'\nare considered private.)\n\nOn all newer browsers, you only need to use this method to retrieve\nproperties if the property might not be defined on the object and you want\nto respect the `unknownProperty` handler. Otherwise you can ignore this\nmethod.\n\nNote that if the object itself is `undefined`, this method will throw\nan error.", + "itemtype": "method", + "name": "get", + "static": 1, + "params": [ + { + "name": "obj", + "description": "The object to retrieve from.", + "type": "Object" + }, + { + "name": "keyName", + "description": "The property key to retrieve", + "type": "String" + } + ], + "return": { + "description": "the property value or `null`.", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "@ember/object", + "module": "@ember/object" + }, + { + "file": "packages/@ember/-internals/metal/lib/property_set.ts", + "line": 17, + "description": "Sets the value of a property on an object, respecting computed properties\nand notifying observers and other listeners of the change.\nIf the specified property is not defined on the object and the object\nimplements the `setUnknownProperty` method, then instead of setting the\nvalue of the property on the object, its `setUnknownProperty` handler\nwill be invoked with the two parameters `keyName` and `value`.\n\n```javascript\nimport { set } from '@ember/object';\nset(obj, \"name\", value);\n```", + "itemtype": "method", + "name": "set", + "static": 1, + "params": [ + { + "name": "obj", + "description": "The object to modify.", + "type": "Object" + }, + { + "name": "keyName", + "description": "The property key to set", + "type": "String" + }, + { + "name": "value", + "description": "The value to set", + "type": "Object" + } + ], + "return": { + "description": "the passed value.", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "@ember/object", + "module": "@ember/object" + }, + { + "file": "packages/@ember/-internals/metal/lib/property_set.ts", + "line": 121, + "description": "Error-tolerant form of `set`. Will not blow up if any part of the\nchain is `undefined`, `null`, or destroyed.\n\nThis is primarily used when syncing bindings, which may try to update after\nan object has been destroyed.\n\n```javascript\nimport { trySet } from '@ember/object';\n\nlet obj = { name: \"Zoey\" };\ntrySet(obj, \"contacts.twitter\", \"@emberjs\");\n```", + "itemtype": "method", + "name": "trySet", + "static": 1, + "params": [ + { + "name": "root", + "description": "The object to modify.", + "type": "Object" + }, + { + "name": "path", + "description": "The property path to set", + "type": "String" + }, + { + "name": "value", + "description": "The value to set", + "type": "Object" + } + ], + "access": "public", + "tagname": "", + "class": "@ember/object", + "module": "@ember/object" + }, + { + "file": "packages/@ember/-internals/metal/lib/set_properties.ts", + "line": 6, + "description": "Set a list of properties on an object. These properties are set inside\na single `beginPropertyChanges` and `endPropertyChanges` batch, so\nobservers will be buffered.\n\n```javascript\nimport EmberObject from '@ember/object';\nlet anObject = EmberObject.create();\n\nanObject.setProperties({\n firstName: 'Stanley',\n lastName: 'Stuart',\n age: 21\n});\n```", + "itemtype": "method", + "name": "setProperties", + "static": 1, + "params": [ + { + "name": "obj", + "description": "" + }, + { + "name": "properties", + "description": "", + "type": "Object" + } + ], + "return": { + "description": "properties" + }, + "access": "public", + "tagname": "", + "class": "@ember/object", + "module": "@ember/object" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 620, + "description": "Creates a new subclass.\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Person = EmberObject.extend({\n say(thing) {\n alert(thing);\n }\n});\n```\n\nThis defines a new subclass of EmberObject: `Person`. It contains one method: `say()`.\n\nYou can also create a subclass from any existing class by calling its `extend()` method.\nFor example, you might want to create a subclass of Ember's built-in `Component` class:\n\n```javascript\nimport Component from '@ember/component';\n\nconst PersonComponent = Component.extend({\n tagName: 'li',\n classNameBindings: ['isAdministrator']\n});\n```\n\nWhen defining a subclass, you can override methods but still access the\nimplementation of your parent class by calling the special `_super()` method:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Person = EmberObject.extend({\n say(thing) {\n let name = this.get('name');\n alert(`${name} says: ${thing}`);\n }\n});\n\nconst Soldier = Person.extend({\n say(thing) {\n this._super(`${thing}, sir!`);\n },\n march(numberOfHours) {\n alert(`${this.get('name')} marches for ${numberOfHours} hours.`);\n }\n});\n\nlet yehuda = Soldier.create({\n name: 'Yehuda Katz'\n});\n\nyehuda.say('Yes'); // alerts \"Yehuda Katz says: Yes, sir!\"\n```\n\nThe `create()` on line #17 creates an *instance* of the `Soldier` class.\nThe `extend()` on line #8 creates a *subclass* of `Person`. Any instance\nof the `Person` class will *not* have the `march()` method.\n\nYou can also pass `Mixin` classes to add additional properties to the subclass.\n\n```javascript\nimport EmberObject from '@ember/object';\nimport Mixin from '@ember/object/mixin';\n\nconst Person = EmberObject.extend({\n say(thing) {\n alert(`${this.get('name')} says: ${thing}`);\n }\n});\n\nconst SingingMixin = Mixin.create({\n sing(thing) {\n alert(`${this.get('name')} sings: la la la ${thing}`);\n }\n});\n\nconst BroadwayStar = Person.extend(SingingMixin, {\n dance() {\n alert(`${this.get('name')} dances: tap tap tap tap `);\n }\n});\n```\n\nThe `BroadwayStar` class contains three methods: `say()`, `sing()`, and `dance()`.", + "itemtype": "method", + "name": "extend", + "static": 1, + "params": [ + { + "name": "mixins", + "description": "One or more Mixin classes", + "type": "Mixin", + "optional": true, + "multiple": true + }, + { + "name": "arguments", + "description": "Object containing values to use within the new class", + "type": "Object", + "optional": true, + "multiple": true + } + ], + "access": "public", + "tagname": "", + "class": "@ember/object", + "module": "@ember/object/core" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 724, + "description": "Creates an instance of a class. Accepts either no arguments, or an object\ncontaining values to initialize the newly instantiated object with.\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Person = EmberObject.extend({\n helloWorld() {\n alert(`Hi, my name is ${this.get('name')}`);\n }\n});\n\nlet tom = Person.create({\n name: 'Tom Dale'\n});\n\ntom.helloWorld(); // alerts \"Hi, my name is Tom Dale\".\n```\n\n`create` will call the `init` function if defined during\n`AnyObject.extend`\n\nIf no arguments are passed to `create`, it will not set values to the new\ninstance during initialization:\n\n```javascript\nlet noName = Person.create();\nnoName.helloWorld(); // alerts undefined\n```\n\nNOTE: For performance reasons, you cannot declare methods or computed\nproperties during `create`. You should instead declare methods and computed\nproperties when using `extend`.", + "itemtype": "method", + "name": "create", + "static": 1, + "params": [ + { + "name": "arguments", + "description": "", + "optional": true, + "multiple": true + } + ], + "access": "public", + "tagname": "", + "class": "@ember/object", + "module": "@ember/object/core" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 809, + "description": "Augments a constructor's prototype with additional\nproperties and functions:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst MyObject = EmberObject.extend({\n name: 'an object'\n});\n\no = MyObject.create();\no.get('name'); // 'an object'\n\nMyObject.reopen({\n say(msg) {\n console.log(msg);\n }\n});\n\no2 = MyObject.create();\no2.say('hello'); // logs \"hello\"\n\no.say('goodbye'); // logs \"goodbye\"\n```\n\nTo add functions and properties to the constructor itself,\nsee `reopenClass`", + "itemtype": "method", + "name": "reopen", + "static": 1, + "access": "public", + "tagname": "", + "class": "@ember/object", + "module": "@ember/object/core" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 863, + "description": "Augments a constructor's own properties and functions:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst MyObject = EmberObject.extend({\n name: 'an object'\n});\n\nMyObject.reopenClass({\n canBuild: false\n});\n\nMyObject.canBuild; // false\no = MyObject.create();\n```\n\nIn other words, this creates static properties and functions for the class.\nThese are only available on the class and not on any instance of that class.\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Person = EmberObject.extend({\n name: '',\n sayHello() {\n alert(`Hello. My name is ${this.get('name')}`);\n }\n});\n\nPerson.reopenClass({\n species: 'Homo sapiens',\n\n createPerson(name) {\n return Person.create({ name });\n }\n});\n\nlet tom = Person.create({\n name: 'Tom Dale'\n});\nlet yehuda = Person.createPerson('Yehuda Katz');\n\ntom.sayHello(); // \"Hello. My name is Tom Dale\"\nyehuda.sayHello(); // \"Hello. My name is Yehuda Katz\"\nalert(Person.species); // \"Homo sapiens\"\n```\n\nNote that `species` and `createPerson` are *not* valid on the `tom` and `yehuda`\nvariables. They are only valid on `Person`.\n\nTo add functions and properties to instances of\na constructor by extending the constructor's prototype\nsee `reopen`", + "itemtype": "method", + "name": "reopenClass", + "static": 1, + "access": "public", + "tagname": "", + "class": "@ember/object", + "module": "@ember/object/core" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 949, + "description": "In some cases, you may want to annotate computed properties with additional\nmetadata about how they function or what values they operate on. For\nexample, computed property functions may close over variables that are then\nno longer available for introspection.\n\nYou can pass a hash of these values to a computed property like this:\n\n```javascript\nimport { computed } from '@ember/object';\n\nperson: computed(function() {\n let personId = this.get('personId');\n return Person.create({ id: personId });\n}).meta({ type: Person })\n```\n\nOnce you've done this, you can retrieve the values saved to the computed\nproperty from your class like this:\n\n```javascript\nMyClass.metaForProperty('person');\n```\n\nThis will return the original hash that was passed to `meta()`.", + "static": 1, + "itemtype": "method", + "name": "metaForProperty", + "params": [ + { + "name": "key", + "description": "property name", + "type": "String" + } + ], + "access": "private", + "tagname": "", + "class": "@ember/object", + "module": "@ember/object/core" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 992, + "description": "Iterate over each computed property for the class, passing its name\nand any associated metadata (see `metaForProperty`) to the callback.", + "static": 1, + "itemtype": "method", + "name": "eachComputedProperty", + "params": [ + { + "name": "callback", + "description": "", + "type": "Function" + }, + { + "name": "binding", + "description": "", + "type": "Object" + } + ], + "access": "private", + "tagname": "", + "class": "@ember/object", + "module": "@ember/object/core" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 1084, + "description": "Provides lookup-time type validation for injected properties.", + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "_onLookup", + "class": "@ember/object", + "module": "@ember/object/core" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 1105, + "description": "Returns a hash of property names and container names that injected\nproperties will lookup on the container lazily.", + "itemtype": "method", + "name": "_lazyInjections", + "return": { + "description": "Hash of all lazy injected property keys to container names", + "type": "Object" + }, + "access": "private", + "tagname": "", + "class": "@ember/object", + "module": "@ember/object/core" + }, + { + "file": "packages/@ember/object/index.ts", + "line": 51, + "description": "Decorator that turns the target function into an Action which can be accessed\ndirectly by reference.\n\n```js\nimport Component from '@ember/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\n\nexport default class Tooltip extends Component {\n @tracked isShowing = false;\n\n @action\n toggleShowing() {\n this.isShowing = !this.isShowing;\n }\n}\n```\n```handlebars\n\nShow tooltip\n\n{{#if isShowing}}\n \n I'm a tooltip!\n \n{{/if}}\n```\n\nIt also binds the function directly to the instance, so it can be used in any\ncontext and will correctly refer to the class it came from:\n\n```js\nimport Component from '@ember/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\n\nexport default class Tooltip extends Component {\n constructor() {\n super(...arguments);\n\n // this.toggleShowing is still bound correctly when added to\n // the event listener\n document.addEventListener('click', this.toggleShowing);\n }\n\n @tracked isShowing = false;\n\n @action\n toggleShowing() {\n this.isShowing = !this.isShowing;\n }\n}\n```", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "action", + "static": 1, + "params": [ + { + "name": "callback", + "description": "The function to turn into an action,\n when used in classic classes", + "type": "Function|undefined" + } + ], + "return": { + "description": "property decorator instance", + "type": "PropertyDecorator" + }, + "class": "@ember/object", + "module": "@ember/object" + }, + { + "file": "packages/@ember/object/index.ts", + "line": 240, + "description": "Specify a method that observes property changes.\n\n```javascript\nimport EmberObject from '@ember/object';\nimport { observer } from '@ember/object';\n\nexport default EmberObject.extend({\n valueObserver: observer('value', function() {\n // Executes whenever the \"value\" property changes\n })\n});\n```\n\nAlso available as `Function.prototype.observes` if prototype extensions are\nenabled.", + "itemtype": "method", + "name": "observer", + "params": [ + { + "name": "propertyNames", + "description": "", + "type": "String", + "multiple": true + }, + { + "name": "func", + "description": "", + "type": "Function" + } + ], + "return": { + "description": "func" + }, + "access": "public", + "tagname": "", + "static": 1, + "class": "@ember/object", + "module": "@ember/object" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/object", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/object/compat.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/object/compat.json new file mode 100644 index 000000000..384bdba81 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/object/compat.json @@ -0,0 +1,64 @@ +{ + "data": { + "id": "ember-5.12.0-@ember/object/compat", + "type": "class", + "attributes": { + "name": "@ember/object/compat", + "shortname": "@ember/object/compat", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/object", + "namespace": "", + "methods": [ + { + "file": "packages/@ember/object/compat.ts", + "line": 40, + "description": "`@dependentKeyCompat` is decorator that can be used on _native getters_ that\nuse tracked properties. It exposes the getter to Ember's classic computed\nproperty and observer systems, so they can watch it for changes. It can be\nused in both native and classic classes.\n\nNative Example:\n\n```js\nimport { tracked } from '@glimmer/tracking';\nimport { dependentKeyCompat } from '@ember/object/compat';\nimport { computed, set } from '@ember/object';\n\nclass Person {\n @tracked firstName;\n @tracked lastName;\n\n @dependentKeyCompat\n get fullName() {\n return `${this.firstName} ${this.lastName}`;\n }\n}\n\nclass Profile {\n constructor(person) {\n set(this, 'person', person);\n }\n\n @computed('person.fullName')\n get helloMessage() {\n return `Hello, ${this.person.fullName}!`;\n }\n}\n```\n\nClassic Example:\n\n```js\nimport { tracked } from '@glimmer/tracking';\nimport { dependentKeyCompat } from '@ember/object/compat';\nimport EmberObject, { computed, observer, set } from '@ember/object';\n\nconst Person = EmberObject.extend({\n firstName: tracked(),\n lastName: tracked(),\n\n fullName: dependentKeyCompat(function() {\n return `${this.firstName} ${this.lastName}`;\n }),\n});\n\nconst Profile = EmberObject.extend({\n person: null,\n\n helloMessage: computed('person.fullName', function() {\n return `Hello, ${this.person.fullName}!`;\n }),\n\n onNameUpdated: observer('person.fullName', function() {\n console.log('person name updated!');\n }),\n});\n```\n\n`dependentKeyCompat()` can receive a getter function or an object containing\n`get`/`set` methods when used in classic classes, like computed properties.\n\nIn general, only properties which you _expect_ to be watched by older,\nuntracked clases should be marked as dependency compatible. The decorator is\nmeant as an interop layer for parts of Ember's older classic APIs, and should\nnot be applied to every possible getter/setter in classes. The number of\ndependency compatible getters should be _minimized_ wherever possible. New\napplication code should not need to use `@dependentKeyCompat`, since it is\nonly for interoperation with older code.", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "dependentKeyCompat", + "static": 1, + "params": [ + { + "name": "desc", + "description": "A property descriptor containing\n the getter and setter (when used in\n classic classes)", + "type": "PropertyDescriptor|undefined" + } + ], + "return": { + "description": "property decorator instance", + "type": "PropertyDecorator" + }, + "class": "@ember/object/compat", + "module": "@ember/object" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/object", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/object/computed.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/object/computed.json new file mode 100644 index 000000000..ffc6852fe --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/object/computed.json @@ -0,0 +1,903 @@ +{ + "data": { + "id": "ember-5.12.0-@ember/object/computed", + "type": "class", + "attributes": { + "name": "@ember/object/computed", + "shortname": "@ember/object/computed", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/object", + "namespace": "", + "methods": [ + { + "file": "packages/@ember/-internals/metal/lib/expand_properties.ts", + "line": 9, + "description": "Expands `pattern`, invoking `callback` for each expansion.\n\nThe only pattern supported is brace-expansion, anything else will be passed\nonce to `callback` directly.\n\nExample\n\n```js\nimport { expandProperties } from '@ember/object/computed';\n\nfunction echo(arg){ console.log(arg); }\n\nexpandProperties('foo.bar', echo); //=> 'foo.bar'\nexpandProperties('{foo,bar}', echo); //=> 'foo', 'bar'\nexpandProperties('foo.{bar,baz}', echo); //=> 'foo.bar', 'foo.baz'\nexpandProperties('{foo,bar}.baz', echo); //=> 'foo.baz', 'bar.baz'\nexpandProperties('foo.{bar,baz}.[]', echo) //=> 'foo.bar.[]', 'foo.baz.[]'\nexpandProperties('{foo,bar}.{spam,eggs}', echo) //=> 'foo.spam', 'foo.eggs', 'bar.spam', 'bar.eggs'\nexpandProperties('{foo}.bar.{baz}') //=> 'foo.bar.baz'\n```", + "itemtype": "method", + "name": "expandProperties", + "static": 1, + "access": "public", + "tagname": "", + "params": [ + { + "name": "pattern", + "description": "The property pattern to expand.", + "type": "String" + }, + { + "name": "callback", + "description": "The callback to invoke. It is invoked once per\nexpansion, and is passed the expansion.", + "type": "Function" + } + ], + "class": "@ember/object/computed", + "module": "@ember/object" + }, + { + "file": "packages/@ember/object/lib/computed/computed_macros.ts", + "line": 60, + "description": "A computed property macro that returns true if the value of the dependent\nproperty is null, an empty string, empty array, or empty function.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { empty } from '@ember/object/computed';\n\nclass ToDoList {\n constructor(todos) {\n set(this, 'todos', todos);\n }\n\n @empty('todos') isDone;\n}\n\nlet todoList = new ToDoList(\n ['Unit Test', 'Documentation', 'Release']\n);\n\ntodoList.isDone; // false\nset(todoList, 'todos', []);\ntodoList.isDone; // true\n```", + "since": "1.6.0", + "itemtype": "method", + "name": "empty", + "static": 1, + "params": [ + { + "name": "dependentKey", + "description": "", + "type": "String" + } + ], + "return": { + "description": "computed property which returns true if the value\nof the dependent property is null, an empty string, empty array, or empty\nfunction and false if the underlying value is not empty.", + "type": "ComputedProperty" + }, + "access": "public", + "tagname": "", + "class": "@ember/object/computed", + "module": "@ember/object" + }, + { + "file": "packages/@ember/object/lib/computed/computed_macros.ts", + "line": 109, + "description": "A computed property that returns true if the value of the dependent property\nis NOT null, an empty string, empty array, or empty function.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { notEmpty } from '@ember/object/computed';\n\nclass Hamster {\n constructor(backpack) {\n set(this, 'backpack', backpack);\n }\n\n @notEmpty('backpack') hasStuff\n}\n\nlet hamster = new Hamster(\n ['Food', 'Sleeping Bag', 'Tent']\n);\n\nhamster.hasStuff; // true\nset(hamster, 'backpack', []);\nhamster.hasStuff; // false\n```", + "itemtype": "method", + "name": "notEmpty", + "static": 1, + "params": [ + { + "name": "dependentKey", + "description": "", + "type": "String" + } + ], + "return": { + "description": "computed property which returns true if original\nvalue for property is not empty.", + "type": "ComputedProperty" + }, + "access": "public", + "tagname": "", + "class": "@ember/object/computed", + "module": "@ember/object" + }, + { + "file": "packages/@ember/object/lib/computed/computed_macros.ts", + "line": 155, + "description": "A computed property that returns true if the value of the dependent property\nis null or undefined. This avoids errors from JSLint complaining about use of\n==, which can be technically confusing.\n\n```javascript\nimport { set } from '@ember/object';\nimport { none } from '@ember/object/computed';\n\nclass Hamster {\n @none('food') isHungry;\n}\n\nlet hamster = new Hamster();\n\nhamster.isHungry; // true\n\nset(hamster, 'food', 'Banana');\nhamster.isHungry; // false\n\nset(hamster, 'food', null);\nhamster.isHungry; // true\n```", + "itemtype": "method", + "name": "none", + "static": 1, + "params": [ + { + "name": "dependentKey", + "description": "", + "type": "String" + } + ], + "return": { + "description": "computed property which returns true if original\nvalue for property is null or undefined.", + "type": "ComputedProperty" + }, + "access": "public", + "tagname": "", + "class": "@ember/object/computed", + "module": "@ember/object" + }, + { + "file": "packages/@ember/object/lib/computed/computed_macros.ts", + "line": 198, + "description": "A computed property that returns the inverse boolean value of the original\nvalue for the dependent property.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { not } from '@ember/object/computed';\n\nclass User {\n loggedIn = false;\n\n @not('loggedIn') isAnonymous;\n}\n\nlet user = new User();\n\nuser.isAnonymous; // true\nset(user, 'loggedIn', true);\nuser.isAnonymous; // false\n```", + "itemtype": "method", + "name": "not", + "static": 1, + "params": [ + { + "name": "dependentKey", + "description": "", + "type": "String" + } + ], + "return": { + "description": "computed property which returns inverse of the\noriginal value for property", + "type": "ComputedProperty" + }, + "access": "public", + "tagname": "", + "class": "@ember/object/computed", + "module": "@ember/object" + }, + { + "file": "packages/@ember/object/lib/computed/computed_macros.ts", + "line": 240, + "description": "A computed property that converts the provided dependent property into a\nboolean value.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { bool } from '@ember/object/computed';\n\n\nclass Hamster {\n @bool('numBananas') hasBananas\n}\n\nlet hamster = new Hamster();\n\nhamster.hasBananas; // false\n\nset(hamster, 'numBananas', 0);\nhamster.hasBananas; // false\n\nset(hamster, 'numBananas', 1);\nhamster.hasBananas; // true\n\nset(hamster, 'numBananas', null);\nhamster.hasBananas; // false\n```", + "itemtype": "method", + "name": "bool", + "static": 1, + "params": [ + { + "name": "dependentKey", + "description": "", + "type": "String" + } + ], + "return": { + "description": "computed property which converts to boolean the\noriginal value for property", + "type": "ComputedProperty" + }, + "access": "public", + "tagname": "", + "class": "@ember/object/computed", + "module": "@ember/object" + }, + { + "file": "packages/@ember/object/lib/computed/computed_macros.ts", + "line": 288, + "description": "A computed property which matches the original value for the dependent\nproperty against a given RegExp, returning `true` if the value matches the\nRegExp and `false` if it does not.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { match } from '@ember/object/computed';\n\nclass User {\n @match('email', /^.+@.+\\..+$/) hasValidEmail;\n}\n\nlet user = new User();\n\nuser.hasValidEmail; // false\n\nset(user, 'email', '');\nuser.hasValidEmail; // false\n\nset(user, 'email', 'ember_hamster@example.com');\nuser.hasValidEmail; // true\n```", + "itemtype": "method", + "name": "match", + "static": 1, + "params": [ + { + "name": "dependentKey", + "description": "", + "type": "String" + }, + { + "name": "regexp", + "description": "", + "type": "RegExp" + } + ], + "return": { + "description": "computed property which match the original value\nfor property against a given RegExp", + "type": "ComputedProperty" + }, + "access": "public", + "tagname": "", + "class": "@ember/object/computed", + "module": "@ember/object" + }, + { + "file": "packages/@ember/object/lib/computed/computed_macros.ts", + "line": 335, + "description": "A computed property that returns true if the provided dependent property is\nequal to the given value.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { equal } from '@ember/object/computed';\n\nclass Hamster {\n @equal('percentCarrotsEaten', 100) satisfied;\n}\n\nlet hamster = new Hamster();\n\nhamster.satisfied; // false\n\nset(hamster, 'percentCarrotsEaten', 100);\nhamster.satisfied; // true\n\nset(hamster, 'percentCarrotsEaten', 50);\nhamster.satisfied; // false\n```", + "itemtype": "method", + "name": "equal", + "static": 1, + "params": [ + { + "name": "dependentKey", + "description": "", + "type": "String" + }, + { + "name": "value", + "description": "", + "type": "String|Number|Object" + } + ], + "return": { + "description": "computed property which returns true if the\noriginal value for property is equal to the given value.", + "type": "ComputedProperty" + }, + "access": "public", + "tagname": "", + "class": "@ember/object/computed", + "module": "@ember/object" + }, + { + "file": "packages/@ember/object/lib/computed/computed_macros.ts", + "line": 380, + "description": "A computed property that returns true if the provided dependent property is\ngreater than the provided value.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { gt } from '@ember/object/computed';\n\nclass Hamster {\n @gt('numBananas', 10) hasTooManyBananas;\n}\n\nlet hamster = new Hamster();\n\nhamster.hasTooManyBananas; // false\n\nset(hamster, 'numBananas', 3);\nhamster.hasTooManyBananas; // false\n\nset(hamster, 'numBananas', 11);\nhamster.hasTooManyBananas; // true\n```", + "itemtype": "method", + "name": "gt", + "static": 1, + "params": [ + { + "name": "dependentKey", + "description": "", + "type": "String" + }, + { + "name": "value", + "description": "", + "type": "Number" + } + ], + "return": { + "description": "computed property which returns true if the\noriginal value for property is greater than given value.", + "type": "ComputedProperty" + }, + "access": "public", + "tagname": "", + "class": "@ember/object/computed", + "module": "@ember/object" + }, + { + "file": "packages/@ember/object/lib/computed/computed_macros.ts", + "line": 425, + "description": "A computed property that returns true if the provided dependent property is\ngreater than or equal to the provided value.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { gte } from '@ember/object/computed';\n\nclass Hamster {\n @gte('numBananas', 10) hasTooManyBananas;\n}\n\nlet hamster = new Hamster();\n\nhamster.hasTooManyBananas; // false\n\nset(hamster, 'numBananas', 3);\nhamster.hasTooManyBananas; // false\n\nset(hamster, 'numBananas', 10);\nhamster.hasTooManyBananas; // true\n```", + "itemtype": "method", + "name": "gte", + "static": 1, + "params": [ + { + "name": "dependentKey", + "description": "", + "type": "String" + }, + { + "name": "value", + "description": "", + "type": "Number" + } + ], + "return": { + "description": "computed property which returns true if the\noriginal value for property is greater or equal then given value.", + "type": "ComputedProperty" + }, + "access": "public", + "tagname": "", + "class": "@ember/object/computed", + "module": "@ember/object" + }, + { + "file": "packages/@ember/object/lib/computed/computed_macros.ts", + "line": 470, + "description": "A computed property that returns true if the provided dependent property is\nless than the provided value.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { lt } from '@ember/object/computed';\n\nclass Hamster {\n @lt('numBananas', 3) needsMoreBananas;\n}\n\nlet hamster = new Hamster();\n\nhamster.needsMoreBananas; // true\n\nset(hamster, 'numBananas', 3);\nhamster.needsMoreBananas; // false\n\nset(hamster, 'numBananas', 2);\nhamster.needsMoreBananas; // true\n```", + "itemtype": "method", + "name": "lt", + "static": 1, + "params": [ + { + "name": "dependentKey", + "description": "", + "type": "String" + }, + { + "name": "value", + "description": "", + "type": "Number" + } + ], + "return": { + "description": "computed property which returns true if the\noriginal value for property is less then given value.", + "type": "ComputedProperty" + }, + "access": "public", + "tagname": "", + "class": "@ember/object/computed", + "module": "@ember/object" + }, + { + "file": "packages/@ember/object/lib/computed/computed_macros.ts", + "line": 515, + "description": "A computed property that returns true if the provided dependent property is\nless than or equal to the provided value.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { lte } from '@ember/object/computed';\n\nclass Hamster {\n @lte('numBananas', 3) needsMoreBananas;\n}\n\nlet hamster = new Hamster();\n\nhamster.needsMoreBananas; // true\n\nset(hamster, 'numBananas', 5);\nhamster.needsMoreBananas; // false\n\nset(hamster, 'numBananas', 3);\nhamster.needsMoreBananas; // true\n```", + "itemtype": "method", + "name": "lte", + "static": 1, + "params": [ + { + "name": "dependentKey", + "description": "", + "type": "String" + }, + { + "name": "value", + "description": "", + "type": "Number" + } + ], + "return": { + "description": "computed property which returns true if the\noriginal value for property is less or equal than given value.", + "type": "ComputedProperty" + }, + "access": "public", + "tagname": "", + "class": "@ember/object/computed", + "module": "@ember/object" + }, + { + "file": "packages/@ember/object/lib/computed/computed_macros.ts", + "line": 560, + "description": "A computed property that performs a logical `and` on the original values for\nthe provided dependent properties.\n\nYou may pass in more than two properties and even use property brace\nexpansion. The computed property will return the first falsy value or last\ntruthy value just like JavaScript's `&&` operator.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { and } from '@ember/object/computed';\n\nclass Hamster {\n @and('hasTent', 'hasBackpack') readyForCamp;\n @and('hasWalkingStick', 'hasBackpack') readyForHike;\n}\n\nlet tomster = new Hamster();\n\ntomster.readyForCamp; // false\n\nset(tomster, 'hasTent', true);\ntomster.readyForCamp; // false\n\nset(tomster, 'hasBackpack', true);\ntomster.readyForCamp; // true\n\nset(tomster, 'hasBackpack', 'Yes');\ntomster.readyForCamp; // 'Yes'\n\nset(tomster, 'hasWalkingStick', null);\ntomster.readyForHike; // null\n```", + "itemtype": "method", + "name": "and", + "static": 1, + "params": [ + { + "name": "dependentKey", + "description": "", + "type": "String", + "multiple": true + } + ], + "return": { + "description": "computed property which performs a logical `and` on\nthe values of all the original values for properties.", + "type": "ComputedProperty" + }, + "access": "public", + "tagname": "", + "class": "@ember/object/computed", + "module": "@ember/object" + }, + { + "file": "packages/@ember/object/lib/computed/computed_macros.ts", + "line": 606, + "description": "A computed property which performs a logical `or` on the original values for\nthe provided dependent properties.\n\nYou may pass in more than two properties and even use property brace\nexpansion. The computed property will return the first truthy value or last\nfalsy value just like JavaScript's `||` operator.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { or } from '@ember/object/computed';\n\nclass Hamster {\n @or('hasJacket', 'hasUmbrella') readyForRain;\n @or('hasSunscreen', 'hasUmbrella') readyForBeach;\n}\n\nlet tomster = new Hamster();\n\ntomster.readyForRain; // undefined\n\nset(tomster, 'hasUmbrella', true);\ntomster.readyForRain; // true\n\nset(tomster, 'hasJacket', 'Yes');\ntomster.readyForRain; // 'Yes'\n\nset(tomster, 'hasSunscreen', 'Check');\ntomster.readyForBeach; // 'Check'\n```", + "itemtype": "method", + "name": "or", + "static": 1, + "params": [ + { + "name": "dependentKey", + "description": "", + "type": "String", + "multiple": true + } + ], + "return": { + "description": "computed property which performs a logical `or` on\nthe values of all the original values for properties.", + "type": "ComputedProperty" + }, + "access": "public", + "tagname": "", + "class": "@ember/object/computed", + "module": "@ember/object" + }, + { + "file": "packages/@ember/object/lib/computed/computed_macros.ts", + "line": 649, + "description": "Creates a new property that is an alias for another property on an object.\nCalls to `get` or `set` this property behave as though they were called on the\noriginal property.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { alias } from '@ember/object/computed';\n\nclass Person {\n name = 'Alex Matchneer';\n\n @alias('name') nomen;\n}\n\nlet alex = new Person();\n\nalex.nomen; // 'Alex Matchneer'\nalex.name; // 'Alex Matchneer'\n\nset(alex, 'nomen', '@machty');\nalex.name; // '@machty'\n```", + "itemtype": "method", + "name": "alias", + "static": 1, + "params": [ + { + "name": "dependentKey", + "description": "", + "type": "String" + } + ], + "return": { + "description": "computed property which creates an alias to the\noriginal value for property.", + "type": "ComputedProperty" + }, + "access": "public", + "tagname": "", + "class": "@ember/object/computed", + "module": "@ember/object" + }, + { + "file": "packages/@ember/object/lib/computed/computed_macros.ts", + "line": 684, + "description": "Where the `alias` computed macro aliases `get` and `set`, and allows for\nbidirectional data flow, the `oneWay` computed macro only provides an aliased\n`get`. The `set` will not mutate the upstream property, rather causes the\ncurrent property to become the value set. This causes the downstream property\nto permanently diverge from the upstream property.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { oneWay }from '@ember/object/computed';\n\nclass User {\n constructor(firstName, lastName) {\n set(this, 'firstName', firstName);\n set(this, 'lastName', lastName);\n }\n\n @oneWay('firstName') nickName;\n}\n\nlet teddy = new User('Teddy', 'Zeenny');\n\nteddy.nickName; // 'Teddy'\n\nset(teddy, 'nickName', 'TeddyBear');\nteddy.firstName; // 'Teddy'\nteddy.nickName; // 'TeddyBear'\n```", + "itemtype": "method", + "name": "oneWay", + "static": 1, + "params": [ + { + "name": "dependentKey", + "description": "", + "type": "String" + } + ], + "return": { + "description": "computed property which creates a one way computed\nproperty to the original value for property.", + "type": "ComputedProperty" + }, + "access": "public", + "tagname": "", + "class": "@ember/object/computed", + "module": "@ember/object" + }, + { + "file": "packages/@ember/object/lib/computed/computed_macros.ts", + "line": 732, + "description": "This is a more semantically meaningful alias of the `oneWay` computed macro,\nwhose name is somewhat ambiguous as to which direction the data flows.", + "itemtype": "method", + "name": "reads", + "static": 1, + "params": [ + { + "name": "dependentKey", + "description": "", + "type": "String" + } + ], + "return": { + "description": "computed property which creates a one way computed\n property to the original value for property.", + "type": "ComputedProperty" + }, + "access": "public", + "tagname": "", + "class": "@ember/object/computed", + "module": "@ember/object" + }, + { + "file": "packages/@ember/object/lib/computed/computed_macros.ts", + "line": 745, + "description": "Where `oneWay` computed macro provides oneWay bindings, the `readOnly`\ncomputed macro provides a readOnly one way binding. Very often when using\nthe `oneWay` macro one does not also want changes to propagate back up, as\nthey will replace the value.\n\nThis prevents the reverse flow, and also throws an exception when it occurs.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { readOnly } from '@ember/object/computed';\n\nclass User {\n constructor(firstName, lastName) {\n set(this, 'firstName', firstName);\n set(this, 'lastName', lastName);\n }\n\n @readOnly('firstName') nickName;\n});\n\nlet teddy = new User('Teddy', 'Zeenny');\n\nteddy.nickName; // 'Teddy'\n\nset(teddy, 'nickName', 'TeddyBear'); // throws Exception\n// throw new EmberError('Cannot Set: nickName on: ' );`\n\nteddy.firstName; // 'Teddy'\n```", + "itemtype": "method", + "name": "readOnly", + "static": 1, + "params": [ + { + "name": "dependentKey", + "description": "", + "type": "String" + } + ], + "return": { + "description": "computed property which creates a one way computed\nproperty to the original value for property.", + "type": "ComputedProperty" + }, + "since": "1.5.0", + "access": "public", + "tagname": "", + "class": "@ember/object/computed", + "module": "@ember/object" + }, + { + "file": "packages/@ember/object/lib/computed/computed_macros.ts", + "line": 796, + "description": "Creates a new property that is an alias for another property on an object.\nCalls to `get` or `set` this property behave as though they were called on the\noriginal property, but also print a deprecation warning.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { deprecatingAlias } from '@ember/object/computed';\n\nclass Hamster {\n @deprecatingAlias('cavendishCount', {\n id: 'hamster.deprecate-banana',\n until: '3.0.0'\n })\n bananaCount;\n}\n\nlet hamster = new Hamster();\n\nset(hamster, 'bananaCount', 5); // Prints a deprecation warning.\nhamster.cavendishCount; // 5\n```", + "itemtype": "method", + "name": "deprecatingAlias", + "static": 1, + "params": [ + { + "name": "dependentKey", + "description": "", + "type": "String" + }, + { + "name": "options", + "description": "Options for `deprecate`.", + "type": "Object" + } + ], + "return": { + "description": "computed property which creates an alias with a\ndeprecation to the original value for property.", + "type": "ComputedProperty" + }, + "since": "1.7.0", + "access": "public", + "tagname": "", + "class": "@ember/object/computed", + "module": "@ember/object" + }, + { + "file": "packages/@ember/object/lib/computed/reduce_computed_macros.ts", + "line": 76, + "description": "A computed property that returns the sum of the values in the dependent array.\n\nExample:\n\n```javascript\nimport { sum } from '@ember/object/computed';\n\nclass Invoice {\n lineItems = [1.00, 2.50, 9.99];\n\n @sum('lineItems') total;\n}\n\nlet invoice = new Invoice();\n\ninvoice.total; // 13.49\n```", + "itemtype": "method", + "name": "sum", + "static": 1, + "params": [ + { + "name": "dependentKey", + "description": "", + "type": "String" + } + ], + "return": { + "description": "computes the sum of all values in the\ndependentKey's array", + "type": "ComputedProperty" + }, + "since": "1.4.0", + "access": "public", + "tagname": "", + "class": "@ember/object/computed", + "module": "@ember/object" + }, + { + "file": "packages/@ember/object/lib/computed/reduce_computed_macros.ts", + "line": 113, + "description": "A computed property that calculates the maximum value in the dependent array.\nThis will return `-Infinity` when the dependent array is empty.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { mapBy, max } from '@ember/object/computed';\n\nclass Person {\n children = [];\n\n @mapBy('children', 'age') childAges;\n @max('childAges') maxChildAge;\n}\n\nlet lordByron = new Person();\n\nlordByron.maxChildAge; // -Infinity\n\nset(lordByron, 'children', [\n {\n name: 'Augusta Ada Byron',\n age: 7\n }\n]);\nlordByron.maxChildAge; // 7\n\nset(lordByron, 'children', [\n ...lordByron.children,\n {\n name: 'Allegra Byron',\n age: 5\n }, {\n name: 'Elizabeth Medora Leigh',\n age: 8\n }\n]);\nlordByron.maxChildAge; // 8\n```\n\nIf the types of the arguments are not numbers, they will be converted to\nnumbers and the type of the return value will always be `Number`. For example,\nthe max of a list of Date objects will be the highest timestamp as a `Number`.\nThis behavior is consistent with `Math.max`.", + "itemtype": "method", + "name": "max", + "static": 1, + "params": [ + { + "name": "dependentKey", + "description": "", + "type": "String" + } + ], + "return": { + "description": "computes the largest value in the dependentKey's\narray", + "type": "ComputedProperty" + }, + "access": "public", + "tagname": "", + "class": "@ember/object/computed", + "module": "@ember/object" + }, + { + "file": "packages/@ember/object/lib/computed/reduce_computed_macros.ts", + "line": 177, + "description": "A computed property that calculates the minimum value in the dependent array.\nThis will return `Infinity` when the dependent array is empty.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { mapBy, min } from '@ember/object/computed';\n\nclass Person {\n children = [];\n\n @mapBy('children', 'age') childAges;\n @min('childAges') minChildAge;\n}\n\nlet lordByron = Person.create({ children: [] });\n\nlordByron.minChildAge; // Infinity\n\nset(lordByron, 'children', [\n {\n name: 'Augusta Ada Byron',\n age: 7\n }\n]);\nlordByron.minChildAge; // 7\n\nset(lordByron, 'children', [\n ...lordByron.children,\n {\n name: 'Allegra Byron',\n age: 5\n }, {\n name: 'Elizabeth Medora Leigh',\n age: 8\n }\n]);\nlordByron.minChildAge; // 5\n```\n\nIf the types of the arguments are not numbers, they will be converted to\nnumbers and the type of the return value will always be `Number`. For example,\nthe min of a list of Date objects will be the lowest timestamp as a `Number`.\nThis behavior is consistent with `Math.min`.", + "itemtype": "method", + "name": "min", + "static": 1, + "params": [ + { + "name": "dependentKey", + "description": "", + "type": "String" + } + ], + "return": { + "description": "computes the smallest value in the dependentKey's array", + "type": "ComputedProperty" + }, + "access": "public", + "tagname": "", + "class": "@ember/object/computed", + "module": "@ember/object" + }, + { + "file": "packages/@ember/object/lib/computed/reduce_computed_macros.ts", + "line": 240, + "description": "Returns an array mapped via the callback\n\nThe callback method you provide should have the following signature:\n- `item` is the current item in the iteration.\n- `index` is the integer index of the current item in the iteration.\n\n```javascript\nfunction mapCallback(item, index);\n```\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { map } from '@ember/object/computed';\n\nclass Hamster {\n constructor(chores) {\n set(this, 'chores', chores);\n }\n\n @map('chores', function(chore, index) {\n return `${chore.toUpperCase()}!`;\n })\n excitingChores;\n});\n\nlet hamster = new Hamster(['clean', 'write more unit tests']);\n\nhamster.excitingChores; // ['CLEAN!', 'WRITE MORE UNIT TESTS!']\n```\n\nYou can optionally pass an array of additional dependent keys as the second\nparameter to the macro, if your map function relies on any external values:\n\n```javascript\nimport { set } from '@ember/object';\nimport { map } from '@ember/object/computed';\n\nclass Hamster {\n shouldUpperCase = false;\n\n constructor(chores) {\n set(this, 'chores', chores);\n }\n\n @map('chores', ['shouldUpperCase'], function(chore, index) {\n if (this.shouldUpperCase) {\n return `${chore.toUpperCase()}!`;\n } else {\n return `${chore}!`;\n }\n })\n excitingChores;\n}\n\nlet hamster = new Hamster(['clean', 'write more unit tests']);\n\nhamster.excitingChores; // ['clean!', 'write more unit tests!']\n\nset(hamster, 'shouldUpperCase', true);\nhamster.excitingChores; // ['CLEAN!', 'WRITE MORE UNIT TESTS!']\n```", + "itemtype": "method", + "name": "map", + "static": 1, + "params": [ + { + "name": "dependentKey", + "description": "", + "type": "String" + }, + { + "name": "additionalDependentKeys", + "description": "optional array of additional\ndependent keys", + "type": "Array", + "optional": true + }, + { + "name": "callback", + "description": "", + "type": "Function" + } + ], + "return": { + "description": "an array mapped via the callback", + "type": "ComputedProperty" + }, + "access": "public", + "tagname": "", + "class": "@ember/object/computed", + "module": "@ember/object" + }, + { + "file": "packages/@ember/object/lib/computed/reduce_computed_macros.ts", + "line": 364, + "description": "Returns an array mapped to the specified key.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { mapBy } from '@ember/object/computed';\n\nclass Person {\n children = [];\n\n @mapBy('children', 'age') childAges;\n}\n\nlet lordByron = new Person();\n\nlordByron.childAges; // []\n\nset(lordByron, 'children', [\n {\n name: 'Augusta Ada Byron',\n age: 7\n }\n]);\nlordByron.childAges; // [7]\n\nset(lordByron, 'children', [\n ...lordByron.children,\n {\n name: 'Allegra Byron',\n age: 5\n }, {\n name: 'Elizabeth Medora Leigh',\n age: 8\n }\n]);\nlordByron.childAges; // [7, 5, 8]\n```", + "itemtype": "method", + "name": "mapBy", + "static": 1, + "params": [ + { + "name": "dependentKey", + "description": "", + "type": "String" + }, + { + "name": "propertyKey", + "description": "", + "type": "String" + } + ], + "return": { + "description": "an array mapped to the specified key", + "type": "ComputedProperty" + }, + "access": "public", + "tagname": "", + "class": "@ember/object/computed", + "module": "@ember/object" + }, + { + "file": "packages/@ember/object/lib/computed/reduce_computed_macros.ts", + "line": 431, + "description": "Filters the array by the callback, like the `Array.prototype.filter` method.\n\nThe callback method you provide should have the following signature:\n- `item` is the current item in the iteration.\n- `index` is the integer index of the current item in the iteration.\n- `array` is the dependant array itself.\n\n```javascript\nfunction filterCallback(item, index, array);\n```\n\nIn the callback, return a truthy value that coerces to true to keep the\nelement, or a falsy to reject it.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { filter } from '@ember/object/computed';\n\nclass Hamster {\n constructor(chores) {\n set(this, 'chores', chores);\n }\n\n @filter('chores', function(chore, index, array) {\n return !chore.done;\n })\n remainingChores;\n}\n\nlet hamster = Hamster.create([\n { name: 'cook', done: true },\n { name: 'clean', done: true },\n { name: 'write more unit tests', done: false }\n]);\n\nhamster.remainingChores; // [{name: 'write more unit tests', done: false}]\n```\n\nYou can also use `@each.property` in your dependent key, the callback will\nstill use the underlying array:\n\n```javascript\nimport { set } from '@ember/object';\nimport { filter } from '@ember/object/computed';\n\nclass Hamster {\n constructor(chores) {\n set(this, 'chores', chores);\n }\n\n @filter('chores.@each.done', function(chore, index, array) {\n return !chore.done;\n })\n remainingChores;\n}\n\nlet hamster = new Hamster([\n { name: 'cook', done: true },\n { name: 'clean', done: true },\n { name: 'write more unit tests', done: false }\n]);\nhamster.remainingChores; // [{name: 'write more unit tests', done: false}]\n\nset(hamster.chores[2], 'done', true);\nhamster.remainingChores; // []\n```\n\nFinally, you can optionally pass an array of additional dependent keys as the\nsecond parameter to the macro, if your filter function relies on any external\nvalues:\n\n```javascript\nimport { filter } from '@ember/object/computed';\n\nclass Hamster {\n constructor(chores) {\n set(this, 'chores', chores);\n }\n\n doneKey = 'finished';\n\n @filter('chores', ['doneKey'], function(chore, index, array) {\n return !chore[this.doneKey];\n })\n remainingChores;\n}\n\nlet hamster = new Hamster([\n { name: 'cook', finished: true },\n { name: 'clean', finished: true },\n { name: 'write more unit tests', finished: false }\n]);\n\nhamster.remainingChores; // [{name: 'write more unit tests', finished: false}]\n```", + "itemtype": "method", + "name": "filter", + "static": 1, + "params": [ + { + "name": "dependentKey", + "description": "", + "type": "String" + }, + { + "name": "additionalDependentKeys", + "description": "optional array of additional dependent keys", + "type": "Array", + "optional": true + }, + { + "name": "callback", + "description": "", + "type": "Function" + } + ], + "return": { + "description": "the filtered array", + "type": "ComputedProperty" + }, + "access": "public", + "tagname": "", + "class": "@ember/object/computed", + "module": "@ember/object" + }, + { + "file": "packages/@ember/object/lib/computed/reduce_computed_macros.ts", + "line": 601, + "description": "Filters the array by the property and value.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { filterBy } from '@ember/object/computed';\n\nclass Hamster {\n constructor(chores) {\n set(this, 'chores', chores);\n }\n\n @filterBy('chores', 'done', false) remainingChores;\n}\n\nlet hamster = new Hamster([\n { name: 'cook', done: true },\n { name: 'clean', done: true },\n { name: 'write more unit tests', done: false }\n]);\n\nhamster.remainingChores; // [{ name: 'write more unit tests', done: false }]\n```", + "itemtype": "method", + "name": "filterBy", + "static": 1, + "params": [ + { + "name": "dependentKey", + "description": "", + "type": "String" + }, + { + "name": "propertyKey", + "description": "", + "type": "String" + }, + { + "name": "value", + "description": "", + "type": "*" + } + ], + "return": { + "description": "the filtered array", + "type": "ComputedProperty" + }, + "access": "public", + "tagname": "", + "class": "@ember/object/computed", + "module": "@ember/object" + }, + { + "file": "packages/@ember/object/lib/computed/reduce_computed_macros.ts", + "line": 657, + "description": "A computed property which returns a new array with all the unique elements\nfrom one or more dependent arrays.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { uniq } from '@ember/object/computed';\n\nclass Hamster {\n constructor(fruits) {\n set(this, 'fruits', fruits);\n }\n\n @uniq('fruits') uniqueFruits;\n}\n\nlet hamster = new Hamster([\n 'banana',\n 'grape',\n 'kale',\n 'banana'\n]);\n\nhamster.uniqueFruits; // ['banana', 'grape', 'kale']\n```", + "itemtype": "method", + "name": "uniq", + "static": 1, + "params": [ + { + "name": "propertyKey", + "description": "", + "type": "String", + "multiple": true + } + ], + "return": { + "description": "computes a new array with all the\nunique elements from the dependent array", + "type": "ComputedProperty" + }, + "access": "public", + "tagname": "", + "class": "@ember/object/computed", + "module": "@ember/object" + }, + { + "file": "packages/@ember/object/lib/computed/reduce_computed_macros.ts", + "line": 728, + "description": "A computed property which returns a new array with all the unique elements\nfrom an array, with uniqueness determined by specific key.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { uniqBy } from '@ember/object/computed';\n\nclass Hamster {\n constructor(fruits) {\n set(this, 'fruits', fruits);\n }\n\n @uniqBy('fruits', 'id') uniqueFruits;\n}\n\nlet hamster = new Hamster([\n { id: 1, 'banana' },\n { id: 2, 'grape' },\n { id: 3, 'peach' },\n { id: 1, 'banana' }\n]);\n\nhamster.uniqueFruits; // [ { id: 1, 'banana' }, { id: 2, 'grape' }, { id: 3, 'peach' }]\n```", + "itemtype": "method", + "name": "uniqBy", + "static": 1, + "params": [ + { + "name": "dependentKey", + "description": "", + "type": "String" + }, + { + "name": "propertyKey", + "description": "", + "type": "String" + } + ], + "return": { + "description": "computes a new array with all the\nunique elements from the dependent array", + "type": "ComputedProperty" + }, + "access": "public", + "tagname": "", + "class": "@ember/object/computed", + "module": "@ember/object" + }, + { + "file": "packages/@ember/object/lib/computed/reduce_computed_macros.ts", + "line": 782, + "description": "A computed property which returns a new array with all the unique elements\nfrom one or more dependent arrays.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { union } from '@ember/object/computed';\n\nclass Hamster {\n constructor(fruits, vegetables) {\n set(this, 'fruits', fruits);\n set(this, 'vegetables', vegetables);\n }\n\n @union('fruits', 'vegetables') uniqueFruits;\n});\n\nlet hamster = new, Hamster(\n [\n 'banana',\n 'grape',\n 'kale',\n 'banana',\n 'tomato'\n ],\n [\n 'tomato',\n 'carrot',\n 'lettuce'\n ]\n);\n\nhamster.uniqueFruits; // ['banana', 'grape', 'kale', 'tomato', 'carrot', 'lettuce']\n```", + "itemtype": "method", + "name": "union", + "static": 1, + "params": [ + { + "name": "propertyKey", + "description": "", + "type": "String", + "multiple": true + } + ], + "return": { + "description": "computes a new array with all the unique elements\nfrom one or more dependent arrays.", + "type": "ComputedProperty" + }, + "access": "public", + "tagname": "", + "class": "@ember/object/computed", + "module": "@ember/object" + }, + { + "file": "packages/@ember/object/lib/computed/reduce_computed_macros.ts", + "line": 829, + "description": "A computed property which returns a new array with all the elements\ntwo or more dependent arrays have in common.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { intersect } from '@ember/object/computed';\n\nclass FriendGroups {\n constructor(adaFriends, charlesFriends) {\n set(this, 'adaFriends', adaFriends);\n set(this, 'charlesFriends', charlesFriends);\n }\n\n @intersect('adaFriends', 'charlesFriends') friendsInCommon;\n}\n\nlet groups = new FriendGroups(\n ['Charles Babbage', 'John Hobhouse', 'William King', 'Mary Somerville'],\n ['William King', 'Mary Somerville', 'Ada Lovelace', 'George Peacock']\n);\n\ngroups.friendsInCommon; // ['William King', 'Mary Somerville']\n```", + "itemtype": "method", + "name": "intersect", + "static": 1, + "params": [ + { + "name": "propertyKey", + "description": "", + "type": "String", + "multiple": true + } + ], + "return": { + "description": "computes a new array with all the duplicated\nelements from the dependent arrays", + "type": "ComputedProperty" + }, + "access": "public", + "tagname": "", + "class": "@ember/object/computed", + "module": "@ember/object" + }, + { + "file": "packages/@ember/object/lib/computed/reduce_computed_macros.ts", + "line": 910, + "description": "A computed property which returns a new array with all the properties from the\nfirst dependent array that are not in the second dependent array.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { setDiff } from '@ember/object/computed';\n\nclass Hamster {\n constructor(likes, fruits) {\n set(this, 'likes', likes);\n set(this, 'fruits', fruits);\n }\n\n @setDiff('likes', 'fruits') wants;\n}\n\nlet hamster = new Hamster(\n [\n 'banana',\n 'grape',\n 'kale'\n ],\n [\n 'grape',\n 'kale',\n ]\n);\n\nhamster.wants; // ['banana']\n```", + "itemtype": "method", + "name": "setDiff", + "static": 1, + "params": [ + { + "name": "setAProperty", + "description": "", + "type": "String" + }, + { + "name": "setBProperty", + "description": "", + "type": "String" + } + ], + "return": { + "description": "computes a new array with all the items from the\nfirst dependent array that are not in the second dependent array", + "type": "ComputedProperty" + }, + "access": "public", + "tagname": "", + "class": "@ember/object/computed", + "module": "@ember/object" + }, + { + "file": "packages/@ember/object/lib/computed/reduce_computed_macros.ts", + "line": 980, + "description": "A computed property that returns the array of values for the provided\ndependent properties.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { collect } from '@ember/object/computed';\n\nclass Hamster {\n @collect('hat', 'shirt') clothes;\n}\n\nlet hamster = new Hamster();\n\nhamster.clothes; // [null, null]\n\nset(hamster, 'hat', 'Camp Hat');\nset(hamster, 'shirt', 'Camp Shirt');\nhamster.clothes; // ['Camp Hat', 'Camp Shirt']\n```", + "itemtype": "method", + "name": "collect", + "static": 1, + "params": [ + { + "name": "dependentKey", + "description": "", + "type": "String", + "multiple": true + } + ], + "return": { + "description": "computed property which maps values of all passed\nin properties to an array.", + "type": "ComputedProperty" + }, + "access": "public", + "tagname": "", + "class": "@ember/object/computed", + "module": "@ember/object" + }, + { + "file": "packages/@ember/object/lib/computed/reduce_computed_macros.ts", + "line": 1039, + "description": "A computed property which returns a new array with all the properties from the\nfirst dependent array sorted based on a property or sort function. The sort\nmacro can be used in two different ways:\n\n1. By providing a sort callback function\n2. By providing an array of keys to sort the array\n\nIn the first form, the callback method you provide should have the following\nsignature:\n\n```javascript\nfunction sortCallback(itemA, itemB);\n```\n\n- `itemA` the first item to compare.\n- `itemB` the second item to compare.\n\nThis function should return negative number (e.g. `-1`) when `itemA` should\ncome before `itemB`. It should return positive number (e.g. `1`) when `itemA`\nshould come after `itemB`. If the `itemA` and `itemB` are equal this function\nshould return `0`.\n\nTherefore, if this function is comparing some numeric values, simple `itemA -\nitemB` or `itemA.get( 'foo' ) - itemB.get( 'foo' )` can be used instead of\nseries of `if`.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { sort } from '@ember/object/computed';\n\nclass ToDoList {\n constructor(todos) {\n set(this, 'todos', todos);\n }\n\n // using a custom sort function\n @sort('todos', function(a, b){\n if (a.priority > b.priority) {\n return 1;\n } else if (a.priority < b.priority) {\n return -1;\n }\n\n return 0;\n })\n priorityTodos;\n}\n\nlet todoList = new ToDoList([\n { name: 'Unit Test', priority: 2 },\n { name: 'Documentation', priority: 3 },\n { name: 'Release', priority: 1 }\n]);\n\ntodoList.priorityTodos; // [{ name:'Release', priority:1 }, { name:'Unit Test', priority:2 }, { name:'Documentation', priority:3 }]\n```\n\nYou can also optionally pass an array of additional dependent keys as the\nsecond parameter, if your sort function is dependent on additional values that\ncould changes:\n\n```js\nimport EmberObject, { set } from '@ember/object';\nimport { sort } from '@ember/object/computed';\n\nclass ToDoList {\n sortKey = 'priority';\n\n constructor(todos) {\n set(this, 'todos', todos);\n }\n\n // using a custom sort function\n @sort('todos', ['sortKey'], function(a, b){\n if (a[this.sortKey] > b[this.sortKey]) {\n return 1;\n } else if (a[this.sortKey] < b[this.sortKey]) {\n return -1;\n }\n\n return 0;\n })\n sortedTodos;\n});\n\nlet todoList = new ToDoList([\n { name: 'Unit Test', priority: 2 },\n { name: 'Documentation', priority: 3 },\n { name: 'Release', priority: 1 }\n]);\n\ntodoList.priorityTodos; // [{ name:'Release', priority:1 }, { name:'Unit Test', priority:2 }, { name:'Documentation', priority:3 }]\n```\n\nIn the second form, you should provide the key of the array of sort values as\nthe second parameter:\n\n```javascript\nimport { set } from '@ember/object';\nimport { sort } from '@ember/object/computed';\n\nclass ToDoList {\n constructor(todos) {\n set(this, 'todos', todos);\n }\n\n // using standard ascending sort\n todosSorting = ['name'];\n @sort('todos', 'todosSorting') sortedTodos;\n\n // using descending sort\n todosSortingDesc = ['name:desc'];\n @sort('todos', 'todosSortingDesc') sortedTodosDesc;\n}\n\nlet todoList = new ToDoList([\n { name: 'Unit Test', priority: 2 },\n { name: 'Documentation', priority: 3 },\n { name: 'Release', priority: 1 }\n]);\n\ntodoList.sortedTodos; // [{ name:'Documentation', priority:3 }, { name:'Release', priority:1 }, { name:'Unit Test', priority:2 }]\ntodoList.sortedTodosDesc; // [{ name:'Unit Test', priority:2 }, { name:'Release', priority:1 }, { name:'Documentation', priority:3 }]\n```", + "itemtype": "method", + "name": "sort", + "static": 1, + "params": [ + { + "name": "itemsKey", + "description": "", + "type": "String" + }, + { + "name": "sortDefinitionOrDependentKeys", + "description": "The key of the sort definition (an array of sort properties),\nthe sort function, or an array of additional dependent keys", + "type": "String|Function|Array" + }, + { + "name": "sortDefinition", + "description": "the sort function (when used with additional dependent keys)", + "type": "Function?" + } + ], + "return": { + "description": "computes a new sorted array based on the sort\nproperty array or callback function", + "type": "ComputedProperty" + }, + "access": "public", + "tagname": "", + "class": "@ember/object/computed", + "module": "@ember/object" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/object", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/object/evented.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/object/evented.json new file mode 100644 index 000000000..e1e447724 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/object/evented.json @@ -0,0 +1,70 @@ +{ + "data": { + "id": "ember-5.12.0-@ember/object/evented", + "type": "class", + "attributes": { + "name": "@ember/object/evented", + "shortname": "@ember/object/evented", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/object", + "namespace": "", + "methods": [ + { + "file": "packages/@ember/-internals/metal/lib/events.ts", + "line": 180, + "description": "Define a property as a function that should be executed when\na specified event or events are triggered.\n\n``` javascript\nimport EmberObject from '@ember/object';\nimport { on } from '@ember/object/evented';\nimport { sendEvent } from '@ember/object/events';\n\nlet Job = EmberObject.extend({\n logCompleted: on('completed', function() {\n console.log('Job completed!');\n })\n});\n\nlet job = Job.create();\n\nsendEvent(job, 'completed'); // Logs 'Job completed!'\n ```", + "itemtype": "method", + "name": "on", + "static": 1, + "params": [ + { + "name": "eventNames", + "description": "", + "type": "String", + "multiple": true + }, + { + "name": "func", + "description": "", + "type": "Function" + } + ], + "return": { + "description": "the listener function, passed as last argument to on(...)", + "type": "Function" + }, + "access": "public", + "tagname": "", + "class": "@ember/object/evented", + "module": "@ember/object" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/object", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/object/events.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/object/events.json new file mode 100644 index 000000000..21b1e2909 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/object/events.json @@ -0,0 +1,199 @@ +{ + "data": { + "id": "ember-5.12.0-@ember/object/events", + "type": "class", + "attributes": { + "name": "@ember/object/events", + "shortname": "@ember/object/events", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/object", + "namespace": "", + "methods": [ + { + "file": "packages/@ember/-internals/metal/lib/deprecate_property.ts", + "line": 10, + "description": "Used internally to allow changing properties in a backwards compatible way, and print a helpful\ndeprecation warning.", + "itemtype": "method", + "name": "deprecateProperty", + "params": [ + { + "name": "object", + "description": "The object to add the deprecated property to.", + "type": "Object" + }, + { + "name": "deprecatedKey", + "description": "The property to add (and print deprecation warnings upon accessing).", + "type": "String" + }, + { + "name": "newKey", + "description": "The property that will be aliased.", + "type": "String" + } + ], + "access": "private", + "tagname": "", + "since": "1.7.0", + "class": "@ember/object/events", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/metal/lib/events.ts", + "line": 28, + "description": "Add an event listener", + "itemtype": "method", + "name": "addListener", + "static": 1, + "params": [ + { + "name": "obj", + "description": "" + }, + { + "name": "eventName", + "description": "", + "type": "String" + }, + { + "name": "target", + "description": "A target object or a function", + "type": "Object|Function" + }, + { + "name": "method", + "description": "A function or the name of a function to be called on `target`", + "type": "Function|String" + }, + { + "name": "once", + "description": "A flag whether a function should only be called once", + "type": "Boolean" + } + ], + "access": "public", + "tagname": "", + "class": "@ember/object/events", + "module": "@ember/object" + }, + { + "file": "packages/@ember/-internals/metal/lib/events.ts", + "line": 62, + "description": "Remove an event listener\n\nArguments should match those passed to `addListener`.", + "itemtype": "method", + "name": "removeListener", + "static": 1, + "params": [ + { + "name": "obj", + "description": "" + }, + { + "name": "eventName", + "description": "", + "type": "String" + }, + { + "name": "target", + "description": "A target object or a function", + "type": "Object|Function" + }, + { + "name": "method", + "description": "A function or the name of a function to be called on `target`", + "type": "Function|String" + } + ], + "access": "public", + "tagname": "", + "class": "@ember/object/events", + "module": "@ember/object" + }, + { + "file": "packages/@ember/-internals/metal/lib/events.ts", + "line": 105, + "description": "Send an event. The execution of suspended listeners\nis skipped, and once listeners are removed. A listener without\na target is executed on the passed object. If an array of actions\nis not passed, the actions stored on the passed object are invoked.", + "itemtype": "method", + "name": "sendEvent", + "static": 1, + "params": [ + { + "name": "obj", + "description": "" + }, + { + "name": "eventName", + "description": "", + "type": "String" + }, + { + "name": "params", + "description": "Optional parameters for each listener.", + "type": "Array" + } + ], + "return": { + "description": "if the event was delivered to one or more actions", + "type": "Boolean" + }, + "access": "public", + "tagname": "", + "class": "@ember/object/events", + "module": "@ember/object" + }, + { + "file": "packages/@ember/-internals/metal/lib/events.ts", + "line": 162, + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "hasListeners", + "static": 1, + "params": [ + { + "name": "obj", + "description": "" + }, + { + "name": "eventName", + "description": "", + "type": "String" + } + ], + "return": { + "description": "if `obj` has listeners for event `eventName`", + "type": "Boolean" + }, + "class": "@ember/object/events", + "module": "@ember/object" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/object", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/object/internals.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/object/internals.json new file mode 100644 index 000000000..9301facf1 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/object/internals.json @@ -0,0 +1,94 @@ +{ + "data": { + "id": "ember-5.12.0-@ember/object/internals", + "type": "class", + "attributes": { + "name": "@ember/object/internals", + "shortname": "@ember/object/internals", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/object", + "namespace": "", + "methods": [ + { + "file": "packages/@ember/-internals/utils/lib/guid.ts", + "line": 55, + "description": "Generates a new guid, optionally saving the guid to the object that you\npass in. You will rarely need to use this method. Instead you should\ncall `guidFor(obj)`, which return an existing guid if available.", + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "generateGuid", + "static": 1, + "params": [ + { + "name": "obj", + "description": "Object the guid will be used for. If passed in, the guid will\n be saved on the object and reused whenever you pass the same object\n again.\n\n If no object is passed, just generate a new guid.", + "type": "Object", + "optional": true + }, + { + "name": "prefix", + "description": "Prefix to place in front of the guid. Useful when you want to\n separate the guid into separate namespaces.", + "type": "String", + "optional": true + } + ], + "return": { + "description": "the guid", + "type": "String" + }, + "class": "@ember/object/internals", + "module": "@ember/object" + }, + { + "file": "packages/@ember/-internals/utils/lib/guid.ts", + "line": 83, + "description": "Returns a unique id for the object. If the object does not yet have a guid,\none will be assigned to it. You can call this on any object,\n`EmberObject`-based or not.\n\nYou can also use this method on DOM Element objects.", + "access": "public", + "tagname": "", + "static": 1, + "itemtype": "method", + "name": "guidFor", + "params": [ + { + "name": "obj", + "description": "any object, string, number, Element, or primitive", + "type": "Object" + } + ], + "return": { + "description": "the unique guid for this instance.", + "type": "String" + }, + "class": "@ember/object/internals", + "module": "@ember/object" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/object", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/object/mixin.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/object/mixin.json new file mode 100644 index 000000000..c0b6a2cb4 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/object/mixin.json @@ -0,0 +1,118 @@ +{ + "data": { + "id": "ember-5.12.0-@ember/object/mixin", + "type": "class", + "attributes": { + "name": "@ember/object/mixin", + "shortname": "@ember/object/mixin", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/object/mixin", + "namespace": "", + "methods": [ + { + "file": "packages/@ember/object/mixin.ts", + "line": 580, + "itemtype": "method", + "name": "create", + "static": 1, + "params": [ + { + "name": "arguments", + "description": "", + "multiple": true + } + ], + "access": "public", + "tagname": "", + "class": "@ember/object/mixin", + "module": "@ember/object/mixin" + }, + { + "file": "packages/@ember/object/mixin.ts", + "line": 613, + "itemtype": "method", + "name": "reopen", + "params": [ + { + "name": "arguments", + "description": "", + "multiple": true + } + ], + "access": "private", + "tagname": "", + "internal": "", + "class": "@ember/object/mixin", + "module": "@ember/object/mixin" + }, + { + "file": "packages/@ember/object/mixin.ts", + "line": 636, + "itemtype": "method", + "name": "apply", + "params": [ + { + "name": "obj", + "description": "" + } + ], + "return": { + "description": "applied object" + }, + "access": "private", + "tagname": "", + "internal": "", + "class": "@ember/object/mixin", + "module": "@ember/object/mixin" + }, + { + "file": "packages/@ember/object/mixin.ts", + "line": 657, + "itemtype": "method", + "name": "detect", + "params": [ + { + "name": "obj", + "description": "" + } + ], + "return": { + "description": "", + "type": "Boolean" + }, + "access": "private", + "tagname": "", + "internal": "", + "class": "@ember/object/mixin", + "module": "@ember/object/mixin" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/object/mixin", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/object/observers.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/object/observers.json new file mode 100644 index 000000000..4933bc28d --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/object/observers.json @@ -0,0 +1,107 @@ +{ + "data": { + "id": "ember-5.12.0-@ember/object/observers", + "type": "class", + "attributes": { + "name": "@ember/object/observers", + "shortname": "@ember/object/observers", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/object", + "namespace": "", + "methods": [ + { + "file": "packages/@ember/-internals/metal/lib/observer.ts", + "line": 27, + "itemtype": "method", + "name": "addObserver", + "static": 1, + "params": [ + { + "name": "obj", + "description": "" + }, + { + "name": "path", + "description": "", + "type": "String" + }, + { + "name": "target", + "description": "", + "type": "Object|Function" + }, + { + "name": "method", + "description": "", + "type": "Function|String", + "optional": true + } + ], + "access": "public", + "tagname": "", + "class": "@ember/object/observers", + "module": "@ember/object" + }, + { + "file": "packages/@ember/-internals/metal/lib/observer.ts", + "line": 55, + "itemtype": "method", + "name": "removeObserver", + "static": 1, + "params": [ + { + "name": "obj", + "description": "" + }, + { + "name": "path", + "description": "", + "type": "String" + }, + { + "name": "target", + "description": "", + "type": "Object|Function" + }, + { + "name": "method", + "description": "", + "type": "Function|String", + "optional": true + } + ], + "access": "public", + "tagname": "", + "class": "@ember/object/observers", + "module": "@ember/object" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/object", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/owner.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/owner.json new file mode 100644 index 000000000..861c88b31 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/owner.json @@ -0,0 +1,285 @@ +{ + "data": { + "id": "ember-5.12.0-@ember/owner", + "type": "class", + "attributes": { + "name": "@ember/owner", + "shortname": "@ember/owner", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/owner", + "namespace": "", + "methods": [ + { + "file": "packages/@ember/-internals/owner/index.ts", + "line": 544, + "description": "`setOwner` forces a new owner on a given object instance. This is primarily\nuseful in some testing cases.", + "itemtype": "method", + "name": "setOwner", + "static": 1, + "params": [ + { + "name": "object", + "description": "An object instance.", + "type": "Object" + }, + { + "name": "object", + "description": "The new owner object of the object instance.", + "type": "Owner" + } + ], + "since": "2.3.0", + "access": "public", + "tagname": "", + "class": "@ember/owner", + "module": "@ember/owner" + }, + { + "file": "packages/@ember/-internals/owner/index.ts", + "line": 574, + "description": "Returns an object that can be used to provide an owner to a\nmanually created instance.\n\nExample:\n\n```\nimport { getOwner } from '@ember/application';\n\nlet owner = getOwner(this);\n\nUser.create(\n owner.ownerInjection(),\n { username: 'rwjblue' }\n)\n```", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "ownerInjection", + "since": "2.3.0", + "return": { + "description": "", + "type": "Object" + }, + "class": "@ember/owner", + "module": "@ember/owner" + }, + { + "file": "packages/@ember/-internals/owner/index.ts", + "line": 606, + "description": "Given a fullName return the corresponding factory.", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "resolveRegistration", + "params": [ + { + "name": "fullName", + "description": "", + "type": "String" + } + ], + "return": { + "description": "fullName's factory", + "type": "Function" + }, + "class": "@ember/owner", + "module": "@ember/owner" + }, + { + "file": "packages/@ember/-internals/owner/index.ts", + "line": 616, + "description": "Unregister a factory.\n\n```javascript\nimport Application from '@ember/application';\nimport EmberObject from '@ember/object';\n\nlet App = Application.create();\nlet User = EmberObject.extend();\nApp.register('model:user', User);\n\nApp.resolveRegistration('model:user').create() instanceof User //=> true\n\nApp.unregister('model:user')\nApp.resolveRegistration('model:user') === undefined //=> true\n```", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "unregister", + "params": [ + { + "name": "fullName", + "description": "", + "type": "String" + } + ], + "class": "@ember/owner", + "module": "@ember/owner" + }, + { + "file": "packages/@ember/-internals/owner/index.ts", + "line": 639, + "description": "Check if a factory is registered.", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "hasRegistration", + "params": [ + { + "name": "fullName", + "description": "", + "type": "String" + } + ], + "return": { + "description": "", + "type": "Boolean" + }, + "class": "@ember/owner", + "module": "@ember/owner" + }, + { + "file": "packages/@ember/-internals/owner/index.ts", + "line": 649, + "description": "Return a specific registered option for a particular factory.", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "registeredOption", + "params": [ + { + "name": "fullName", + "description": "", + "type": "String" + }, + { + "name": "optionName", + "description": "", + "type": "String" + } + ], + "return": { + "description": "options", + "type": "Object" + }, + "class": "@ember/owner", + "module": "@ember/owner" + }, + { + "file": "packages/@ember/-internals/owner/index.ts", + "line": 663, + "description": "Register options for a particular factory.", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "registerOptions", + "params": [ + { + "name": "fullName", + "description": "", + "type": "String" + }, + { + "name": "options", + "description": "", + "type": "Object" + } + ], + "class": "@ember/owner", + "module": "@ember/owner" + }, + { + "file": "packages/@ember/-internals/owner/index.ts", + "line": 673, + "description": "Return registered options for a particular factory.", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "registeredOptions", + "params": [ + { + "name": "fullName", + "description": "", + "type": "String" + } + ], + "return": { + "description": "options", + "type": "Object" + }, + "class": "@ember/owner", + "module": "@ember/owner" + }, + { + "file": "packages/@ember/-internals/owner/index.ts", + "line": 683, + "description": "Allow registering options for all factories of a type.\n\n```javascript\nimport Application from '@ember/application';\n\nlet App = Application.create();\nlet appInstance = App.buildInstance();\n\n// if all of type `connection` must not be singletons\nappInstance.registerOptionsForType('connection', { singleton: false });\n\nappInstance.register('connection:twitter', TwitterConnection);\nappInstance.register('connection:facebook', FacebookConnection);\n\nlet twitter = appInstance.lookup('connection:twitter');\nlet twitter2 = appInstance.lookup('connection:twitter');\n\ntwitter === twitter2; // => false\n\nlet facebook = appInstance.lookup('connection:facebook');\nlet facebook2 = appInstance.lookup('connection:facebook');\n\nfacebook === facebook2; // => false\n```", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "registerOptionsForType", + "params": [ + { + "name": "type", + "description": "", + "type": "String" + }, + { + "name": "options", + "description": "", + "type": "Object" + } + ], + "class": "@ember/owner", + "module": "@ember/owner" + }, + { + "file": "packages/@ember/-internals/owner/index.ts", + "line": 716, + "description": "Return the registered options for all factories of a type.", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "registeredOptionsForType", + "params": [ + { + "name": "type", + "description": "", + "type": "String" + } + ], + "return": { + "description": "options", + "type": "Object" + }, + "class": "@ember/owner", + "module": "@ember/owner" + }, + { + "file": "packages/@ember/owner/index.ts", + "line": 41, + "description": "Framework objects in an Ember application (components, services, routes, etc.)\nare created via a factory and dependency injection system. Each of these\nobjects is the responsibility of an \"owner\", which handled its\ninstantiation and manages its lifetime.\n\n`getOwner` fetches the owner object responsible for an instance. This can\nbe used to lookup or resolve other class instances, or register new factories\ninto the owner.\n\nFor example, this component dynamically looks up a service based on the\n`audioType` passed as an argument:\n\n```js {data-filename=app/components/play-audio.js}\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { getOwner } from '@ember/owner';\n\n// Usage:\n//\n// \n//\nexport default class extends Component {\n get audioService() {\n return getOwner(this)?.lookup(`service:${this.args.audioType}`);\n }\n\n @action\n onPlay() {\n this.audioService?.play(this.args.audioFile);\n }\n}\n```", + "itemtype": "method", + "name": "getOwner", + "static": 1, + "params": [ + { + "name": "object", + "description": "An object with an owner.", + "type": "Object" + } + ], + "return": { + "description": "An owner object.", + "type": "Object" + }, + "since": "2.3.0", + "access": "public", + "tagname": "", + "class": "@ember/owner", + "module": "@ember/owner" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/owner", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/routing.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/routing.json new file mode 100644 index 000000000..09e394a6d --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/routing.json @@ -0,0 +1,55 @@ +{ + "data": { + "id": "ember-5.12.0-@ember/routing", + "type": "class", + "attributes": { + "name": "@ember/routing", + "shortname": "@ember/routing", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/routing", + "namespace": "", + "methods": [ + { + "file": "packages/@ember/-internals/glimmer/lib/components/link-to.ts", + "line": 265, + "description": "An opaque interface which can be imported and used in strict-mode\ntemplates to call .\n\nSee [Ember.Templates.components.LinkTo](/ember/release/classes/Ember.Templates.components/methods/input?anchor=LinkTo).", + "itemtype": "method", + "name": "LinkTo", + "see": [ + "{Ember.Templates.components.LinkTo}" + ], + "access": "public", + "tagname": "", + "class": "@ember/routing", + "module": "@ember/routing" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/routing", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/routing/location.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/routing/location.json new file mode 100644 index 000000000..4c97e715a --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/routing/location.json @@ -0,0 +1,40 @@ +{ + "data": { + "id": "ember-5.12.0-@ember/routing/location", + "type": "class", + "attributes": { + "name": "@ember/routing/location", + "shortname": "@ember/routing/location", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/routing/location", + "namespace": "", + "methods": [], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/routing/location", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/runloop.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/runloop.json new file mode 100644 index 000000000..aec5caaab --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/runloop.json @@ -0,0 +1,498 @@ +{ + "data": { + "id": "ember-5.12.0-@ember/runloop", + "type": "class", + "attributes": { + "name": "@ember/runloop", + "shortname": "@ember/runloop", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/runloop", + "namespace": "", + "methods": [ + { + "file": "packages/@ember/runloop/index.ts", + "line": 108, + "description": "Runs the passed target and method inside of a RunLoop, ensuring any\ndeferred actions including bindings and views updates are flushed at the\nend.\n\nNormally you should not need to invoke this method yourself. However if\nyou are implementing raw event handlers when interfacing with other\nlibraries or plugins, you should probably wrap all of your code inside this\ncall.\n\n```javascript\nimport { run } from '@ember/runloop';\n\nrun(function() {\n // code to be executed within a RunLoop\n});\n```", + "itemtype": "method", + "name": "run", + "static": 1, + "params": [ + { + "name": "target", + "description": "target of method to call", + "type": "Object", + "optional": true + }, + { + "name": "method", + "description": "Method to invoke.\n May be a function or a string. If you pass a string\n then it will be looked up on the passed target.", + "type": "Function|String" + }, + { + "name": "args*", + "description": "Any additional arguments you wish to pass to the method.", + "type": "Object", + "optional": true + } + ], + "return": { + "description": "return value from invoking the passed function.", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "@ember/runloop", + "module": "@ember/runloop" + }, + { + "file": "packages/@ember/runloop/index.ts", + "line": 153, + "description": "If no run-loop is present, it creates a new one. If a run loop is\npresent it will queue itself to run on the existing run-loops action\nqueue.\n\nPlease note: This is not for normal usage, and should be used sparingly.\n\nIf invoked when not within a run loop:\n\n```javascript\nimport { join } from '@ember/runloop';\n\njoin(function() {\n // creates a new run-loop\n});\n```\n\nAlternatively, if called within an existing run loop:\n\n```javascript\nimport { run, join } from '@ember/runloop';\n\nrun(function() {\n // creates a new run-loop\n\n join(function() {\n // joins with the existing run-loop, and queues for invocation on\n // the existing run-loops action queue.\n });\n});\n```", + "itemtype": "method", + "name": "join", + "static": 1, + "params": [ + { + "name": "target", + "description": "target of method to call", + "type": "Object", + "optional": true + }, + { + "name": "method", + "description": "Method to invoke.\n May be a function or a string. If you pass a string\n then it will be looked up on the passed target.", + "type": "Function|String" + }, + { + "name": "args*", + "description": "Any additional arguments you wish to pass to the method.", + "type": "Object", + "optional": true + } + ], + "return": { + "description": "Return value from invoking the passed function. Please note,\nwhen called within an existing loop, no return value is possible.", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "@ember/runloop", + "module": "@ember/runloop" + }, + { + "file": "packages/@ember/runloop/index.ts", + "line": 212, + "description": "Allows you to specify which context to call the specified function in while\nadding the execution of that function to the Ember run loop. This ability\nmakes this method a great way to asynchronously integrate third-party libraries\ninto your Ember application.\n\n`bind` takes two main arguments, the desired context and the function to\ninvoke in that context. Any additional arguments will be supplied as arguments\nto the function that is passed in.\n\nLet's use the creation of a TinyMCE component as an example. Currently,\nTinyMCE provides a setup configuration option we can use to do some processing\nafter the TinyMCE instance is initialized but before it is actually rendered.\nWe can use that setup option to do some additional setup for our component.\nThe component itself could look something like the following:\n\n```js {data-filename=app/components/rich-text-editor.js}\nimport Component from '@ember/component';\nimport { on } from '@ember/object/evented';\nimport { bind } from '@ember/runloop';\n\nexport default Component.extend({\n initializeTinyMCE: on('didInsertElement', function() {\n tinymce.init({\n selector: '#' + this.$().prop('id'),\n setup: bind(this, this.setupEditor)\n });\n }),\n\n didInsertElement() {\n tinymce.init({\n selector: '#' + this.$().prop('id'),\n setup: bind(this, this.setupEditor)\n });\n }\n\n setupEditor(editor) {\n this.set('editor', editor);\n\n editor.on('change', function() {\n console.log('content changed!');\n });\n }\n});\n```\n\nIn this example, we use `bind` to bind the setupEditor method to the\ncontext of the RichTextEditor component and to have the invocation of that\nmethod be safely handled and executed by the Ember run loop.", + "itemtype": "method", + "name": "bind", + "static": 1, + "params": [ + { + "name": "target", + "description": "target of method to call", + "type": "Object", + "optional": true + }, + { + "name": "method", + "description": "Method to invoke.\n May be a function or a string. If you pass a string\n then it will be looked up on the passed target.", + "type": "Function|String" + }, + { + "name": "args*", + "description": "Any additional arguments you wish to pass to the method.", + "type": "Object", + "optional": true + } + ], + "return": { + "description": "returns a new function that will always have a particular context", + "type": "Function" + }, + "since": "1.4.0", + "access": "public", + "tagname": "", + "class": "@ember/runloop", + "module": "@ember/runloop" + }, + { + "file": "packages/@ember/runloop/index.ts", + "line": 334, + "description": "Begins a new RunLoop. Any deferred actions invoked after the begin will\nbe buffered until you invoke a matching call to `end()`. This is\na lower-level way to use a RunLoop instead of using `run()`.\n\n```javascript\nimport { begin, end } from '@ember/runloop';\n\nbegin();\n// code to be executed within a RunLoop\nend();\n```", + "itemtype": "method", + "name": "begin", + "static": 1, + "return": { + "description": "", + "type": "Void" + }, + "access": "public", + "tagname": "", + "class": "@ember/runloop", + "module": "@ember/runloop" + }, + { + "file": "packages/@ember/runloop/index.ts", + "line": 357, + "description": "Ends a RunLoop. This must be called sometime after you call\n`begin()` to flush any deferred actions. This is a lower-level way\nto use a RunLoop instead of using `run()`.\n\n```javascript\nimport { begin, end } from '@ember/runloop';\n\nbegin();\n// code to be executed within a RunLoop\nend();\n```", + "itemtype": "method", + "name": "end", + "static": 1, + "return": { + "description": "", + "type": "Void" + }, + "access": "public", + "tagname": "", + "class": "@ember/runloop", + "module": "@ember/runloop" + }, + { + "file": "packages/@ember/runloop/index.ts", + "line": 380, + "description": "Adds the passed target/method and any optional arguments to the named\nqueue to be executed at the end of the RunLoop. If you have not already\nstarted a RunLoop when calling this method one will be started for you\nautomatically.\n\nAt the end of a RunLoop, any methods scheduled in this way will be invoked.\nMethods will be invoked in an order matching the named queues defined in\nthe `queues` property.\n\n```javascript\nimport { schedule } from '@ember/runloop';\n\nschedule('afterRender', this, function() {\n // this will be executed in the 'afterRender' queue\n console.log('scheduled on afterRender queue');\n});\n\nschedule('actions', this, function() {\n // this will be executed in the 'actions' queue\n console.log('scheduled on actions queue');\n});\n\n// Note the functions will be run in order based on the run queues order.\n// Output would be:\n// scheduled on actions queue\n// scheduled on afterRender queue\n```", + "itemtype": "method", + "name": "schedule", + "static": 1, + "params": [ + { + "name": "queue", + "description": "The name of the queue to schedule against. Default queues is 'actions'", + "type": "String" + }, + { + "name": "target", + "description": "target object to use as the context when invoking a method.", + "type": "Object", + "optional": true + }, + { + "name": "method", + "description": "The method to invoke. If you pass a string it\n will be resolved on the target object at the time the scheduled item is\n invoked allowing you to change the target function.", + "type": "String|Function" + }, + { + "name": "arguments*", + "description": "Optional arguments to be passed to the queued method.", + "type": "Object", + "optional": true + } + ], + "return": { + "description": "Timer information for use in canceling, see `cancel`.", + "type": "*" + }, + "access": "public", + "tagname": "", + "class": "@ember/runloop", + "module": "@ember/runloop" + }, + { + "file": "packages/@ember/runloop/index.ts", + "line": 453, + "description": "Invokes the passed target/method and optional arguments after a specified\nperiod of time. The last parameter of this method must always be a number\nof milliseconds.\n\nYou should use this method whenever you need to run some action after a\nperiod of time instead of using `setTimeout()`. This method will ensure that\nitems that expire during the same script execution cycle all execute\ntogether, which is often more efficient than using a real setTimeout.\n\n```javascript\nimport { later } from '@ember/runloop';\n\nlater(myContext, function() {\n // code here will execute within a RunLoop in about 500ms with this == myContext\n}, 500);\n```", + "itemtype": "method", + "name": "later", + "static": 1, + "params": [ + { + "name": "target", + "description": "target of method to invoke", + "type": "Object", + "optional": true + }, + { + "name": "method", + "description": "The method to invoke.\n If you pass a string it will be resolved on the\n target at the time the method is invoked.", + "type": "Function|String" + }, + { + "name": "args*", + "description": "Optional arguments to pass to the timeout.", + "type": "Object", + "optional": true + }, + { + "name": "wait", + "description": "Number of milliseconds to wait.", + "type": "Number" + } + ], + "return": { + "description": "Timer information for use in canceling, see `cancel`.", + "type": "*" + }, + "access": "public", + "tagname": "", + "class": "@ember/runloop", + "module": "@ember/runloop" + }, + { + "file": "packages/@ember/runloop/index.ts", + "line": 501, + "description": "Schedule a function to run one time during the current RunLoop. This is equivalent\n to calling `scheduleOnce` with the \"actions\" queue.", + "itemtype": "method", + "name": "once", + "static": 1, + "params": [ + { + "name": "target", + "description": "The target of the method to invoke.", + "type": "Object", + "optional": true + }, + { + "name": "method", + "description": "The method to invoke.\n If you pass a string it will be resolved on the\n target at the time the method is invoked.", + "type": "Function|String" + }, + { + "name": "args*", + "description": "Optional arguments to pass to the timeout.", + "type": "Object", + "optional": true + } + ], + "return": { + "description": "Timer information for use in canceling, see `cancel`.", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "@ember/runloop", + "module": "@ember/runloop" + }, + { + "file": "packages/@ember/runloop/index.ts", + "line": 532, + "description": "Schedules a function to run one time in a given queue of the current RunLoop.\nCalling this method with the same queue/target/method combination will have\nno effect (past the initial call).\n\nNote that although you can pass optional arguments these will not be\nconsidered when looking for duplicates. New arguments will replace previous\ncalls.\n\n```javascript\nimport { run, scheduleOnce } from '@ember/runloop';\n\nfunction sayHi() {\n console.log('hi');\n}\n\nrun(function() {\n scheduleOnce('afterRender', myContext, sayHi);\n scheduleOnce('afterRender', myContext, sayHi);\n // sayHi will only be executed once, in the afterRender queue of the RunLoop\n});\n```\n\nAlso note that for `scheduleOnce` to prevent additional calls, you need to\npass the same function instance. The following case works as expected:\n\n```javascript\nfunction log() {\n console.log('Logging only once');\n}\n\nfunction scheduleIt() {\n scheduleOnce('actions', myContext, log);\n}\n\nscheduleIt();\nscheduleIt();\n```\n\nBut this other case will schedule the function multiple times:\n\n```javascript\nimport { scheduleOnce } from '@ember/runloop';\n\nfunction scheduleIt() {\n scheduleOnce('actions', myContext, function() {\n console.log('Closure');\n });\n}\n\nscheduleIt();\nscheduleIt();\n\n// \"Closure\" will print twice, even though we're using `scheduleOnce`,\n// because the function we pass to it won't match the\n// previously scheduled operation.\n```\n\nAvailable queues, and their order, can be found at `queues`", + "itemtype": "method", + "name": "scheduleOnce", + "static": 1, + "params": [ + { + "name": "queue", + "description": "The name of the queue to schedule against. Default queues is 'actions'.", + "type": "String", + "optional": true + }, + { + "name": "target", + "description": "The target of the method to invoke.", + "type": "Object", + "optional": true + }, + { + "name": "method", + "description": "The method to invoke.\n If you pass a string it will be resolved on the\n target at the time the method is invoked.", + "type": "Function|String" + }, + { + "name": "args*", + "description": "Optional arguments to pass to the timeout.", + "type": "Object", + "optional": true + } + ], + "return": { + "description": "Timer information for use in canceling, see `cancel`.", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "@ember/runloop", + "module": "@ember/runloop" + }, + { + "file": "packages/@ember/runloop/index.ts", + "line": 626, + "description": "Schedules an item to run from within a separate run loop, after\ncontrol has been returned to the system. This is equivalent to calling\n`later` with a wait time of 1ms.\n\n```javascript\nimport { next } from '@ember/runloop';\n\nnext(myContext, function() {\n // code to be executed in the next run loop,\n // which will be scheduled after the current one\n});\n```\n\nMultiple operations scheduled with `next` will coalesce\ninto the same later run loop, along with any other operations\nscheduled by `later` that expire right around the same\ntime that `next` operations will fire.\n\nNote that there are often alternatives to using `next`.\nFor instance, if you'd like to schedule an operation to happen\nafter all DOM element operations have completed within the current\nrun loop, you can make use of the `afterRender` run loop queue (added\nby the `ember-views` package, along with the preceding `render` queue\nwhere all the DOM element operations happen).\n\nExample:\n\n```js {data-filename=app/components/my-component.js}\nimport Component from '@ember/component';\nimport { scheduleOnce } from '@ember/runloop';\n\nexport Component.extend({\n didInsertElement() {\n this._super(...arguments);\n scheduleOnce('afterRender', this, 'processChildElements');\n },\n\n processChildElements() {\n // ... do something with component's child component\n // elements after they've finished rendering, which\n // can't be done within this component's\n // `didInsertElement` hook because that gets run\n // before the child elements have been added to the DOM.\n }\n});\n```\n\nOne benefit of the above approach compared to using `next` is\nthat you will be able to perform DOM/CSS operations before unprocessed\nelements are rendered to the screen, which may prevent flickering or\nother artifacts caused by delaying processing until after rendering.\n\nThe other major benefit to the above approach is that `next`\nintroduces an element of non-determinism, which can make things much\nharder to test, due to its reliance on `setTimeout`; it's much harder\nto guarantee the order of scheduled operations when they are scheduled\noutside of the current run loop, i.e. with `next`.", + "itemtype": "method", + "name": "next", + "static": 1, + "params": [ + { + "name": "target", + "description": "target of method to invoke", + "type": "Object", + "optional": true + }, + { + "name": "method", + "description": "The method to invoke.\n If you pass a string it will be resolved on the\n target at the time the method is invoked.", + "type": "Function|String" + }, + { + "name": "args*", + "description": "Optional arguments to pass to the timeout.", + "type": "Object", + "optional": true + } + ], + "return": { + "description": "Timer information for use in canceling, see `cancel`.", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "@ember/runloop", + "module": "@ember/runloop" + }, + { + "file": "packages/@ember/runloop/index.ts", + "line": 711, + "description": "Cancels a scheduled item. Must be a value returned by `later()`,\n`once()`, `scheduleOnce()`, `next()`, `debounce()`, or\n`throttle()`.\n\n```javascript\nimport {\n next,\n cancel,\n later,\n scheduleOnce,\n once,\n throttle,\n debounce\n} from '@ember/runloop';\n\nlet runNext = next(myContext, function() {\n // will not be executed\n});\n\ncancel(runNext);\n\nlet runLater = later(myContext, function() {\n // will not be executed\n}, 500);\n\ncancel(runLater);\n\nlet runScheduleOnce = scheduleOnce('afterRender', myContext, function() {\n // will not be executed\n});\n\ncancel(runScheduleOnce);\n\nlet runOnce = once(myContext, function() {\n // will not be executed\n});\n\ncancel(runOnce);\n\nlet throttle = throttle(myContext, function() {\n // will not be executed\n}, 1, false);\n\ncancel(throttle);\n\nlet debounce = debounce(myContext, function() {\n // will not be executed\n}, 1);\n\ncancel(debounce);\n\nlet debounceImmediate = debounce(myContext, function() {\n // will be executed since we passed in true (immediate)\n}, 100, true);\n\n// the 100ms delay until this method can be called again will be canceled\ncancel(debounceImmediate);\n```", + "itemtype": "method", + "name": "cancel", + "static": 1, + "params": [ + { + "name": "timer", + "description": "Timer object to cancel", + "type": "Object", + "optional": true + } + ], + "return": { + "description": "true if canceled or false/undefined if it wasn't found", + "type": "Boolean" + }, + "access": "public", + "tagname": "", + "class": "@ember/runloop", + "module": "@ember/runloop" + }, + { + "file": "packages/@ember/runloop/index.ts", + "line": 782, + "description": "Delay calling the target method until the debounce period has elapsed\nwith no additional debounce calls. If `debounce` is called again before\nthe specified time has elapsed, the timer is reset and the entire period\nmust pass again before the target method is called.\n\nThis method should be used when an event may be called multiple times\nbut the action should only be called once when the event is done firing.\nA common example is for scroll events where you only want updates to\nhappen once scrolling has ceased.\n\n```javascript\nimport { debounce } from '@ember/runloop';\n\nfunction whoRan() {\n console.log(this.name + ' ran.');\n}\n\nlet myContext = { name: 'debounce' };\n\ndebounce(myContext, whoRan, 150);\n\n// less than 150ms passes\ndebounce(myContext, whoRan, 150);\n\n// 150ms passes\n// whoRan is invoked with context myContext\n// console logs 'debounce ran.' one time.\n```\n\nImmediate allows you to run the function immediately, but debounce\nother calls for this function until the wait time has elapsed. If\n`debounce` is called again before the specified time has elapsed,\nthe timer is reset and the entire period must pass again before\nthe method can be called again.\n\n```javascript\nimport { debounce } from '@ember/runloop';\n\nfunction whoRan() {\n console.log(this.name + ' ran.');\n}\n\nlet myContext = { name: 'debounce' };\n\ndebounce(myContext, whoRan, 150, true);\n\n// console logs 'debounce ran.' one time immediately.\n// 100ms passes\ndebounce(myContext, whoRan, 150, true);\n\n// 150ms passes and nothing else is logged to the console and\n// the debouncee is no longer being watched\ndebounce(myContext, whoRan, 150, true);\n\n// console logs 'debounce ran.' one time immediately.\n// 150ms passes and nothing else is logged to the console and\n// the debouncee is no longer being watched\n```", + "itemtype": "method", + "name": "debounce", + "static": 1, + "params": [ + { + "name": "target", + "description": "target of method to invoke", + "type": "Object", + "optional": true + }, + { + "name": "method", + "description": "The method to invoke.\n May be a function or a string. If you pass a string\n then it will be looked up on the passed target.", + "type": "Function|String" + }, + { + "name": "args*", + "description": "Optional arguments to pass to the timeout.", + "type": "Object", + "optional": true + }, + { + "name": "wait", + "description": "Number of milliseconds to wait.", + "type": "Number" + }, + { + "name": "immediate", + "description": "Trigger the function on the leading instead\n of the trailing edge of the wait interval. Defaults to false.", + "type": "Boolean" + } + ], + "return": { + "description": "Timer information for use in canceling, see `cancel`.", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "@ember/runloop", + "module": "@ember/runloop" + }, + { + "file": "packages/@ember/runloop/index.ts", + "line": 879, + "description": "Ensure that the target method is never called more frequently than\nthe specified spacing period. The target method is called immediately.\n\n```javascript\nimport { throttle } from '@ember/runloop';\n\nfunction whoRan() {\n console.log(this.name + ' ran.');\n}\n\nlet myContext = { name: 'throttle' };\n\nthrottle(myContext, whoRan, 150);\n// whoRan is invoked with context myContext\n// console logs 'throttle ran.'\n\n// 50ms passes\nthrottle(myContext, whoRan, 150);\n\n// 50ms passes\nthrottle(myContext, whoRan, 150);\n\n// 150ms passes\nthrottle(myContext, whoRan, 150);\n// whoRan is invoked with context myContext\n// console logs 'throttle ran.'\n```", + "itemtype": "method", + "name": "throttle", + "static": 1, + "params": [ + { + "name": "target", + "description": "target of method to invoke", + "type": "Object", + "optional": true + }, + { + "name": "method", + "description": "The method to invoke.\n May be a function or a string. If you pass a string\n then it will be looked up on the passed target.", + "type": "Function|String" + }, + { + "name": "args*", + "description": "Optional arguments to pass to the timeout.", + "type": "Object", + "optional": true + }, + { + "name": "spacing", + "description": "Number of milliseconds to space out requests.", + "type": "Number" + }, + { + "name": "immediate", + "description": "Trigger the function on the leading instead\n of the trailing edge of the wait interval. Defaults to true.", + "type": "Boolean" + } + ], + "return": { + "description": "Timer information for use in canceling, see `cancel`.", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "@ember/runloop", + "module": "@ember/runloop" + } + ], + "events": [], + "properties": [ + { + "file": "packages/@ember/runloop/index.ts", + "line": 61, + "description": "Array of named queues. This array determines the order in which queues\nare flushed at the end of the RunLoop. You can define your own queues by\nsimply adding the queue name to this array. Normally you should not need\nto inspect or modify this property.", + "itemtype": "property", + "name": "queues", + "type": "Array", + "default": "['actions', 'destroy']", + "access": "private", + "tagname": "", + "class": "@ember/runloop", + "module": "@ember/routing/transition" + } + ] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/runloop", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/service.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/service.json new file mode 100644 index 000000000..09f8fec30 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/service.json @@ -0,0 +1,88 @@ +{ + "data": { + "id": "ember-5.12.0-@ember/service", + "type": "class", + "attributes": { + "name": "@ember/service", + "shortname": "@ember/service", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/service", + "namespace": "", + "methods": [ + { + "file": "packages/@ember/service/index.ts", + "line": 10, + "itemtype": "method", + "name": "inject", + "static": 1, + "since": "1.10.0", + "params": [ + { + "name": "name", + "description": "(optional) name of the service to inject, defaults to\n the property's name", + "type": "String" + } + ], + "return": { + "description": "injection decorator instance", + "type": "ComputedDecorator" + }, + "access": "public", + "tagname": "", + "class": "@ember/service", + "module": "@ember/service" + }, + { + "file": "packages/@ember/service/index.ts", + "line": 30, + "description": "Creates a property that lazily looks up a service in the container. There are\nno restrictions as to what objects a service can be injected into.\n\nExample:\n\n```js {data-filename=app/routes/application.js}\nimport Route from '@ember/routing/route';\nimport { service } from '@ember/service';\n\nexport default class ApplicationRoute extends Route {\n @service('auth') authManager;\n\n model() {\n return this.authManager.findCurrentUser();\n }\n}\n```\n\nClassic Class Example:\n\n```js {data-filename=app/routes/application.js}\nimport Route from '@ember/routing/route';\nimport { service } from '@ember/service';\n\nexport default Route.extend({\n authManager: service('auth'),\n\n model() {\n return this.get('authManager').findCurrentUser();\n }\n});\n```\n\nThis example will create an `authManager` property on the application route\nthat looks up the `auth` service in the container, making it easily accessible\nin the `model` hook.", + "itemtype": "method", + "name": "service", + "static": 1, + "since": "4.1.0", + "params": [ + { + "name": "name", + "description": "(optional) name of the service to inject, defaults to\n the property's name", + "type": "String" + } + ], + "return": { + "description": "injection decorator instance", + "type": "ComputedDecorator" + }, + "access": "public", + "tagname": "", + "class": "@ember/service", + "module": "@ember/service" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/service", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/template.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/template.json new file mode 100644 index 000000000..411e58fbe --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/template.json @@ -0,0 +1,107 @@ +{ + "data": { + "id": "ember-5.12.0-@ember/template", + "type": "class", + "attributes": { + "name": "@ember/template", + "shortname": "@ember/template", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/template", + "namespace": "", + "methods": [ + { + "file": "packages/@ember/-internals/glimmer/lib/utils/managers.ts", + "line": 6, + "description": "Associate a class with a component manager (an object that is responsible for\ncoordinating the lifecycle events that occurs when invoking, rendering and\nre-rendering a component).", + "itemtype": "method", + "name": "setComponentManager", + "params": [ + { + "name": "factory", + "description": "a function to create the owner for an object", + "type": "Function" + }, + { + "name": "obj", + "description": "the object to associate with the componetn manager", + "type": "Object" + } + ], + "return": { + "description": "the same object passed in", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "@ember/template", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/utils/string.ts", + "line": 121, + "description": "Use this method to indicate that a string should be rendered as HTML\nwhen the string is used in a template. To say this another way,\nstrings marked with `htmlSafe` will not be HTML escaped.\n\nA word of warning - The `htmlSafe` method does not make the string safe;\nit only tells the framework to treat the string as if it is safe to render\nas HTML. If a string contains user inputs or other untrusted\ndata, you must sanitize the string before using the `htmlSafe` method.\nOtherwise your code is vulnerable to\n[Cross-Site Scripting](https://owasp.org/www-community/attacks/DOM_Based_XSS).\nThere are many open source sanitization libraries to choose from,\nboth for front end and server-side sanitization.\n\n```javascript\nimport { htmlSafe } from '@ember/template';\n\nconst someTrustedOrSanitizedString = \"Hello!\"\n\nhtmlSafe(someTrustedorSanitizedString)\n```", + "itemtype": "method", + "name": "htmlSafe", + "params": [ + { + "name": "str", + "description": "The string to treat as trusted.", + "type": "String" + } + ], + "static": 1, + "return": { + "description": "A string that will not be HTML escaped by Handlebars.", + "type": "SafeString" + }, + "access": "public", + "tagname": "", + "class": "@ember/template", + "module": "@ember/template" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/utils/string.ts", + "line": 159, + "description": "Detects if a string was decorated using `htmlSafe`.\n\n```javascript\nimport { htmlSafe, isHTMLSafe } from '@ember/template';\n\nlet plainString = 'plain string';\nlet safeString = htmlSafe('someValue');\n\nisHTMLSafe(plainString); // false\nisHTMLSafe(safeString); // true\n```", + "itemtype": "method", + "name": "isHTMLSafe", + "static": 1, + "return": { + "description": "`true` if the string was decorated with `htmlSafe`, `false` otherwise.", + "type": "Boolean" + }, + "access": "public", + "tagname": "", + "class": "@ember/template", + "module": "@ember/template" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/template", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/test.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/test.json new file mode 100644 index 000000000..fa5821371 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/test.json @@ -0,0 +1,395 @@ +{ + "data": { + "id": "ember-5.12.0-@ember/test", + "type": "class", + "attributes": { + "name": "@ember/test", + "shortname": "@ember/test", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/test", + "namespace": "", + "methods": [ + { + "file": "packages/ember-testing/lib/ext/application.ts", + "line": 64, + "description": "This hook defers the readiness of the application, so that you can start\nthe app when your tests are ready to run. It also sets the router's\nlocation to 'none', so that the window's location will not be modified\n(preventing both accidental leaking of state between tests and interference\nwith your testing framework). `setupForTesting` should only be called after\nsetting a custom `router` class (for example `App.Router = Router.extend(`).\n\nExample:\n\n```\nApp.setupForTesting();\n```", + "itemtype": "method", + "name": "setupForTesting", + "access": "public", + "tagname": "", + "class": "@ember/test", + "module": "ember", + "namespace": "Ember.Test" + }, + { + "file": "packages/ember-testing/lib/ext/application.ts", + "line": 103, + "description": "This injects the test helpers into the `helperContainer` object. If an object is provided\nit will be used as the helperContainer. If `helperContainer` is not set it will default\nto `window`. If a function of the same name has already been defined it will be cached\n(so that it can be reset if the helper is removed with `unregisterHelper` or\n`removeTestHelpers`).\n\nAny callbacks registered with `onInjectHelpers` will be called once the\nhelpers have been injected.\n\nExample:\n```\nApp.injectTestHelpers();\n```", + "itemtype": "method", + "name": "injectTestHelpers", + "access": "public", + "tagname": "", + "class": "@ember/test", + "module": "ember", + "namespace": "Ember.Test" + }, + { + "file": "packages/ember-testing/lib/ext/application.ts", + "line": 148, + "description": "This removes all helpers that have been registered, and resets and functions\nthat were overridden by the helpers.\n\nExample:\n\n```javascript\nApp.removeTestHelpers();\n```", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "removeTestHelpers", + "class": "@ember/test", + "module": "ember", + "namespace": "Ember.Test" + }, + { + "file": "packages/ember-testing/lib/helpers/current_path.ts", + "line": 9, + "description": "Returns the current path.\n\nExample:\n\n```javascript\nfunction validateURL() {\nequal(currentPath(), 'some.path.index', \"correct path was transitioned into.\");\n}\n\nclick('#some-link-id').then(validateURL);\n```", + "itemtype": "method", + "name": "currentPath", + "return": { + "description": "The currently active path.", + "type": "Object" + }, + "since": "1.5.0", + "access": "public", + "tagname": "", + "class": "@ember/test", + "module": "ember" + }, + { + "file": "packages/ember-testing/lib/helpers/current_route_name.ts", + "line": 8, + "description": "Returns the currently active route name.\n\nExample:\n\n```javascript\nfunction validateRouteName() {\nequal(currentRouteName(), 'some.path', \"correct route was transitioned into.\");\n}\nvisit('/some/path').then(validateRouteName)\n```", + "itemtype": "method", + "name": "currentRouteName", + "return": { + "description": "The name of the currently active route.", + "type": "Object" + }, + "since": "1.5.0", + "access": "public", + "tagname": "", + "class": "@ember/test", + "module": "ember" + }, + { + "file": "packages/ember-testing/lib/helpers/current_url.ts", + "line": 9, + "description": "Returns the current URL.\n\nExample:\n\n```javascript\nfunction validateURL() {\nequal(currentURL(), '/some/path', \"correct URL was transitioned into.\");\n}\n\nclick('#some-link-id').then(validateURL);\n```", + "itemtype": "method", + "name": "currentURL", + "return": { + "description": "The currently active URL.", + "type": "Object" + }, + "since": "1.5.0", + "access": "public", + "tagname": "", + "class": "@ember/test", + "module": "ember" + }, + { + "file": "packages/ember-testing/lib/helpers/pause_test.ts", + "line": 9, + "description": "Resumes a test paused by `pauseTest`.", + "itemtype": "method", + "name": "resumeTest", + "return": { + "description": "", + "type": "Void" + }, + "access": "public", + "tagname": "", + "class": "@ember/test", + "module": "ember" + }, + { + "file": "packages/ember-testing/lib/helpers/pause_test.ts", + "line": 22, + "description": "Pauses the current test - this is useful for debugging while testing or for test-driving.\nIt allows you to inspect the state of your application at any point.\nExample (The test will pause before clicking the button):\n\n```javascript\nvisit('/')\nreturn pauseTest();\nclick('.btn');\n```\n\nYou may want to turn off the timeout before pausing.\n\nqunit (timeout available to use as of 2.4.0):\n\n```\nvisit('/');\nassert.timeout(0);\nreturn pauseTest();\nclick('.btn');\n```\n\nmocha (timeout happens automatically as of ember-mocha v0.14.0):\n\n```\nvisit('/');\nthis.timeout(0);\nreturn pauseTest();\nclick('.btn');\n```", + "since": "1.9.0", + "itemtype": "method", + "name": "pauseTest", + "return": { + "description": "A promise that will never resolve", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "@ember/test", + "module": "ember" + }, + { + "file": "packages/ember-testing/lib/helpers/visit.ts", + "line": 6, + "description": "Loads a route, sets up any controllers, and renders any templates associated\nwith the route as though a real user had triggered the route change while\nusing your app.\n\nExample:\n\n```javascript\nvisit('posts/index').then(function() {\n // assert something\n});\n```", + "itemtype": "method", + "name": "visit", + "params": [ + { + "name": "url", + "description": "the name of the route", + "type": "String" + } + ], + "return": { + "description": "", + "type": "RSVP.Promise" + }, + "access": "public", + "tagname": "", + "class": "@ember/test", + "module": "ember" + }, + { + "file": "packages/ember-testing/lib/helpers/wait.ts", + "line": 12, + "description": "Causes the run loop to process any pending events. This is used to ensure that\nany async operations from other helpers (or your assertions) have been processed.\n\nThis is most often used as the return value for the helper functions (see 'click',\n'fillIn','visit',etc). However, there is a method to register a test helper which\nutilizes this method without the need to actually call `wait()` in your helpers.\n\nThe `wait` helper is built into `registerAsyncHelper` by default. You will not need\nto `return app.testHelpers.wait();` - the wait behavior is provided for you.\n\nExample:\n\n```javascript\nimport { registerAsyncHelper } from '@ember/test';\n\nregisterAsyncHelper('loginUser', function(app, username, password) {\n visit('secured/path/here')\n .fillIn('#username', username)\n .fillIn('#password', password)\n .click('.submit');\n});\n```", + "itemtype": "method", + "name": "wait", + "params": [ + { + "name": "value", + "description": "The value to be returned.", + "type": "Object" + } + ], + "return": { + "description": "Promise that resolves to the passed value.", + "type": "RSVP.Promise" + }, + "access": "public", + "tagname": "", + "since": "1.0.0", + "class": "@ember/test", + "module": "ember" + }, + { + "file": "packages/ember-testing/lib/test/helpers.ts", + "line": 16, + "description": "`registerHelper` is used to register a test helper that will be injected\nwhen `App.injectTestHelpers` is called.\n\nThe helper method will always be called with the current Application as\nthe first parameter.\n\nFor example:\n\n```javascript\nimport { registerHelper } from '@ember/test';\nimport { run } from '@ember/runloop';\n\nregisterHelper('boot', function(app) {\n run(app, app.advanceReadiness);\n});\n```\n\nThis helper can later be called without arguments because it will be\ncalled with `app` as the first parameter.\n\n```javascript\nimport Application from '@ember/application';\n\nApp = Application.create();\nApp.injectTestHelpers();\nboot();\n```", + "access": "public", + "tagname": "", + "static": 1, + "itemtype": "method", + "name": "registerHelper", + "params": [ + { + "name": "name", + "description": "The name of the helper method to add.", + "type": "String" + }, + { + "name": "helperMethod", + "description": "", + "type": "Function" + }, + { + "name": "options", + "description": "", + "type": "Object" + } + ], + "class": "@ember/test", + "module": "@ember/test" + }, + { + "file": "packages/ember-testing/lib/test/helpers.ts", + "line": 63, + "description": "`registerAsyncHelper` is used to register an async test helper that will be injected\nwhen `App.injectTestHelpers` is called.\n\nThe helper method will always be called with the current Application as\nthe first parameter.\n\nFor example:\n\n```javascript\nimport { registerAsyncHelper } from '@ember/test';\nimport { run } from '@ember/runloop';\n\nregisterAsyncHelper('boot', function(app) {\n run(app, app.advanceReadiness);\n});\n```\n\nThe advantage of an async helper is that it will not run\nuntil the last async helper has completed. All async helpers\nafter it will wait for it complete before running.\n\n\nFor example:\n\n```javascript\nimport { registerAsyncHelper } from '@ember/test';\n\nregisterAsyncHelper('deletePost', function(app, postId) {\n click('.delete-' + postId);\n});\n\n// ... in your test\nvisit('/post/2');\ndeletePost(2);\nvisit('/post/3');\ndeletePost(3);\n```", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "registerAsyncHelper", + "params": [ + { + "name": "name", + "description": "The name of the helper method to add.", + "type": "String" + }, + { + "name": "helperMethod", + "description": "", + "type": "Function" + } + ], + "since": "1.2.0", + "class": "@ember/test", + "module": "@ember/test" + }, + { + "file": "packages/ember-testing/lib/test/helpers.ts", + "line": 116, + "description": "Remove a previously added helper method.\n\nExample:\n\n```javascript\nimport { unregisterHelper } from '@ember/test';\n\nunregisterHelper('wait');\n```", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "unregisterHelper", + "static": 1, + "params": [ + { + "name": "name", + "description": "The helper to remove.", + "type": "String" + } + ], + "class": "@ember/test", + "module": "@ember/test" + }, + { + "file": "packages/ember-testing/lib/test/waiters.ts", + "line": 7, + "description": "This allows ember-testing to play nicely with other asynchronous\nevents, such as an application that is waiting for a CSS3\ntransition or an IndexDB transaction. The waiter runs periodically\nafter each async helper (i.e. `click`, `andThen`, `visit`, etc) has executed,\nuntil the returning result is truthy. After the waiters finish, the next async helper\nis executed and the process repeats.\n\nFor example:\n\n```javascript\nimport { registerWaiter } from '@ember/test';\n\nregisterWaiter(function() {\n return myPendingTransactions() === 0;\n});\n```\nThe `context` argument allows you to optionally specify the `this`\nwith which your callback will be invoked.\n\nFor example:\n\n```javascript\nimport { registerWaiter } from '@ember/test';\n\nregisterWaiter(MyDB, MyDB.hasPendingTransactions);\n```", + "access": "public", + "tagname": "", + "static": 1, + "itemtype": "method", + "name": "registerWaiter", + "params": [ + { + "name": "context", + "description": "(optional)", + "type": "Object" + }, + { + "name": "callback", + "description": "", + "type": "Function" + } + ], + "since": "1.2.0", + "class": "@ember/test", + "module": "@ember/test" + }, + { + "file": "packages/ember-testing/lib/test/waiters.ts", + "line": 70, + "description": "`unregisterWaiter` is used to unregister a callback that was\nregistered with `registerWaiter`.", + "access": "public", + "tagname": "", + "static": 1, + "itemtype": "method", + "name": "unregisterWaiter", + "params": [ + { + "name": "context", + "description": "(optional)", + "type": "Object" + }, + { + "name": "callback", + "description": "", + "type": "Function" + } + ], + "since": "1.2.0", + "class": "@ember/test", + "module": "@ember/test" + }, + { + "file": "packages/ember-testing/lib/test/waiters.ts", + "line": 98, + "description": "Iterates through each registered test waiter, and invokes\nits callback. If any waiter returns false, this method will return\ntrue indicating that the waiters have not settled yet.\n\nThis is generally used internally from the acceptance/integration test\ninfrastructure.", + "access": "public", + "tagname": "", + "static": 1, + "itemtype": "method", + "name": "checkWaiters", + "class": "@ember/test", + "module": "@ember/test" + } + ], + "events": [], + "properties": [ + { + "file": "packages/ember-testing/lib/ext/application.ts", + "line": 23, + "description": "This property contains the testing helpers for the current application. These\nare created once you call `injectTestHelpers` on your `Application`\ninstance. The included helpers are also available on the `window` object by\ndefault, but can be used from this object on the individual application also.", + "itemtype": "property", + "name": "testHelpers", + "type": "{Object}", + "default": "{}", + "access": "public", + "tagname": "", + "class": "@ember/test", + "module": "ember", + "namespace": "Ember.Test" + }, + { + "file": "packages/ember-testing/lib/ext/application.ts", + "line": 36, + "description": "This property will contain the original methods that were registered\non the `helperContainer` before `injectTestHelpers` is called.\n\nWhen `removeTestHelpers` is called, these methods are restored to the\n`helperContainer`.", + "itemtype": "property", + "name": "originalMethods", + "type": "{Object}", + "default": "{}", + "access": "private", + "tagname": "", + "since": "1.3.0", + "class": "@ember/test", + "module": "ember", + "namespace": "Ember.Test" + }, + { + "file": "packages/ember-testing/lib/ext/application.ts", + "line": 51, + "description": "This property indicates whether or not this application is currently in\ntesting mode. This is set when `setupForTesting` is called on the current\napplication.", + "itemtype": "property", + "name": "testing", + "type": "{Boolean}", + "default": "false", + "since": "1.3.0", + "access": "public", + "tagname": "", + "class": "@ember/test", + "module": "ember", + "namespace": "Ember.Test" + }, + { + "file": "packages/ember-testing/lib/ext/application.ts", + "line": 91, + "description": "This will be used as the container to inject the test helpers into. By\ndefault the helpers are injected into `window`.", + "itemtype": "property", + "name": "helperContainer", + "type": "{Object} The object to be used for test helpers.", + "default": "window", + "since": "1.2.0", + "access": "private", + "tagname": "", + "class": "@ember/test", + "module": "ember", + "namespace": "Ember.Test" + } + ] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/test", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/utils.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/utils.json new file mode 100644 index 000000000..81827000e --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-@ember/utils.json @@ -0,0 +1,213 @@ +{ + "data": { + "id": "ember-5.12.0-@ember/utils", + "type": "class", + "attributes": { + "name": "@ember/utils", + "shortname": "@ember/utils", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/utils", + "namespace": "", + "methods": [ + { + "file": "packages/@ember/utils/lib/compare.ts", + "line": 53, + "description": "Compares two javascript values and returns:\n\n - -1 if the first is smaller than the second,\n - 0 if both are equal,\n - 1 if the first is greater than the second.\n\n ```javascript\n import { compare } from '@ember/utils';\n\n compare('hello', 'hello'); // 0\n compare('abc', 'dfg'); // -1\n compare(2, 1); // 1\n ```\n\nIf the types of the two objects are different precedence occurs in the\nfollowing order, with types earlier in the list considered `<` types\nlater in the list:\n\n - undefined\n - null\n - boolean\n - number\n - string\n - array\n - object\n - instance\n - function\n - class\n - date\n\n ```javascript\n import { compare } from '@ember/utils';\n\n compare('hello', 50); // 1\n compare(50, 'hello'); // -1\n ```", + "itemtype": "method", + "name": "compare", + "static": 1, + "params": [ + { + "name": "v", + "description": "First value to compare", + "type": "Object" + }, + { + "name": "w", + "description": "Second value to compare", + "type": "Object" + } + ], + "return": { + "description": "-1 if v < w, 0 if v = w and 1 if v > w.", + "type": "Number" + }, + "access": "public", + "tagname": "", + "class": "@ember/utils", + "module": "@ember/utils" + }, + { + "file": "packages/@ember/utils/lib/is-equal.ts", + "line": 4, + "description": "Compares two objects, returning true if they are equal.\n\n```javascript\nimport { isEqual } from '@ember/utils';\n\nisEqual('hello', 'hello'); // true\nisEqual(1, 2); // false\n```\n\n`isEqual` is a more specific comparison than a triple equal comparison.\nIt will call the `isEqual` instance method on the objects being\ncompared, allowing finer control over when objects should be considered\nequal to each other.\n\n```javascript\nimport { isEqual } from '@ember/utils';\nimport EmberObject from '@ember/object';\n\nlet Person = EmberObject.extend({\n isEqual(other) { return this.ssn == other.ssn; }\n});\n\nlet personA = Person.create({name: 'Muhammad Ali', ssn: '123-45-6789'});\nlet personB = Person.create({name: 'Cassius Clay', ssn: '123-45-6789'});\n\nisEqual(personA, personB); // true\n```\n\nDue to the expense of array comparisons, collections will never be equal to\neach other even if each of their items are equal to each other.\n\n```javascript\nimport { isEqual } from '@ember/utils';\n\nisEqual([4, 2], [4, 2]); // false\n```", + "itemtype": "method", + "name": "isEqual", + "static": 1, + "params": [ + { + "name": "a", + "description": "first object to compare", + "type": "Object" + }, + { + "name": "b", + "description": "second object to compare", + "type": "Object" + } + ], + "return": { + "description": "", + "type": "Boolean" + }, + "access": "public", + "tagname": "", + "class": "@ember/utils", + "module": "@ember/utils" + }, + { + "file": "packages/@ember/utils/lib/is_blank.ts", + "line": 5, + "description": "A value is blank if it is empty or a whitespace string.\n\n```javascript\nimport { isBlank } from '@ember/utils';\n\nisBlank(null); // true\nisBlank(undefined); // true\nisBlank(''); // true\nisBlank([]); // true\nisBlank('\\n\\t'); // true\nisBlank(' '); // true\nisBlank({}); // false\nisBlank('\\n\\t Hello'); // false\nisBlank('Hello world'); // false\nisBlank([1,2,3]); // false\n```", + "itemtype": "method", + "name": "isBlank", + "static": 1, + "params": [ + { + "name": "obj", + "description": "Value to test", + "type": "Object" + } + ], + "return": { + "description": "", + "type": "Boolean" + }, + "since": "1.5.0", + "access": "public", + "tagname": "", + "class": "@ember/utils", + "module": "@ember/utils" + }, + { + "file": "packages/@ember/utils/lib/is_empty.ts", + "line": 6, + "description": "Verifies that a value is `null` or `undefined`, an empty string, or an empty\narray.\n\nConstrains the rules on `isNone` by returning true for empty strings and\nempty arrays.\n\nIf the value is an object with a `size` property of type number, it is used\nto check emptiness.\n\n```javascript\nisEmpty(null); // true\nisEmpty(undefined); // true\nisEmpty(''); // true\nisEmpty([]); // true\nisEmpty({ size: 0}); // true\nisEmpty({}); // false\nisEmpty('Adam Hawkins'); // false\nisEmpty([0,1,2]); // false\nisEmpty('\\n\\t'); // false\nisEmpty(' '); // false\nisEmpty({ size: 1 }) // false\nisEmpty({ size: () => 0 }) // false\n```", + "itemtype": "method", + "name": "isEmpty", + "static": 1, + "params": [ + { + "name": "obj", + "description": "Value to test", + "type": "Object" + } + ], + "return": { + "description": "", + "type": "Boolean" + }, + "access": "public", + "tagname": "", + "class": "@ember/utils", + "module": "@ember/utils" + }, + { + "file": "packages/@ember/utils/lib/is_none.ts", + "line": 4, + "description": "Returns true if the passed value is null or undefined. This avoids errors\nfrom JSLint complaining about use of ==, which can be technically\nconfusing.\n\n```javascript\nisNone(null); // true\nisNone(undefined); // true\nisNone(''); // false\nisNone([]); // false\nisNone(function() {}); // false\n```", + "itemtype": "method", + "name": "isNone", + "static": 1, + "params": [ + { + "name": "obj", + "description": "Value to test", + "type": "Object" + } + ], + "return": { + "description": "", + "type": "Boolean" + }, + "access": "public", + "tagname": "", + "class": "@ember/utils", + "module": "@ember/utils" + }, + { + "file": "packages/@ember/utils/lib/is_present.ts", + "line": 5, + "description": "A value is present if it not `isBlank`.\n\n```javascript\nisPresent(null); // false\nisPresent(undefined); // false\nisPresent(''); // false\nisPresent(' '); // false\nisPresent('\\n\\t'); // false\nisPresent([]); // false\nisPresent({ length: 0 }); // false\nisPresent(false); // true\nisPresent(true); // true\nisPresent('string'); // true\nisPresent(0); // true\nisPresent(function() {}); // true\nisPresent({}); // true\nisPresent('\\n\\t Hello'); // true\nisPresent([1, 2, 3]); // true\n```", + "itemtype": "method", + "name": "isPresent", + "static": 1, + "params": [ + { + "name": "obj", + "description": "Value to test", + "type": "Object" + } + ], + "return": { + "description": "", + "type": "Boolean" + }, + "since": "1.8.0", + "access": "public", + "tagname": "", + "class": "@ember/utils", + "module": "@ember/utils" + }, + { + "file": "packages/@ember/utils/lib/type-of.ts", + "line": 40, + "description": "Returns a consistent type for the passed object.\n\nUse this instead of the built-in `typeof` to get the type of an item.\nIt will return the same result across all browsers and includes a bit\nmore detail. Here is what will be returned:\n\n | Return Value | Meaning |\n |---------------|------------------------------------------------------|\n | 'string' | String primitive or String object. |\n | 'number' | Number primitive or Number object. |\n | 'boolean' | Boolean primitive or Boolean object. |\n | 'null' | Null value |\n | 'undefined' | Undefined value |\n | 'function' | A function |\n | 'array' | An instance of Array |\n | 'regexp' | An instance of RegExp |\n | 'date' | An instance of Date |\n | 'filelist' | An instance of FileList |\n | 'class' | An Ember class (created using EmberObject.extend()) |\n | 'instance' | An Ember object instance |\n | 'error' | An instance of the Error object |\n | 'object' | A JavaScript object not inheriting from EmberObject |\n\nExamples:\n\n```javascript\nimport { A } from '@ember/array';\nimport { typeOf } from '@ember/utils';\nimport EmberObject from '@ember/object';\n\ntypeOf(); // 'undefined'\ntypeOf(null); // 'null'\ntypeOf(undefined); // 'undefined'\ntypeOf('michael'); // 'string'\ntypeOf(new String('michael')); // 'string'\ntypeOf(101); // 'number'\ntypeOf(new Number(101)); // 'number'\ntypeOf(true); // 'boolean'\ntypeOf(new Boolean(true)); // 'boolean'\ntypeOf(A); // 'function'\ntypeOf(A()); // 'array'\ntypeOf([1, 2, 90]); // 'array'\ntypeOf(/abc/); // 'regexp'\ntypeOf(new Date()); // 'date'\ntypeOf(event.target.files); // 'filelist'\ntypeOf(EmberObject.extend()); // 'class'\ntypeOf(EmberObject.create()); // 'instance'\ntypeOf(new Error('teamocil')); // 'error'\n\n// 'normal' JavaScript object\ntypeOf({ a: 'b' }); // 'object'\n```", + "itemtype": "method", + "name": "typeOf", + "params": [ + { + "name": "item", + "description": "the item to check" + } + ], + "return": { + "description": "the type", + "type": "String" + }, + "access": "public", + "tagname": "", + "static": 1, + "class": "@ember/utils", + "module": "@ember/utils" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/utils", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-@glimmer/tracking.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-@glimmer/tracking.json new file mode 100644 index 000000000..3195a5f45 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-@glimmer/tracking.json @@ -0,0 +1,77 @@ +{ + "data": { + "id": "ember-5.12.0-@glimmer/tracking", + "type": "class", + "attributes": { + "name": "@glimmer/tracking", + "shortname": "@glimmer/tracking", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@glimmer/tracking", + "namespace": "", + "methods": [ + { + "file": "packages/@ember/-internals/glimmer/lib/glimmer-tracking-docs.ts", + "line": 22, + "description": "Marks a property as tracked. By default, values that are rendered in Ember app\ntemplates are _static_, meaning that updates to them won't cause the\napplication to rerender. Marking a property as tracked means that when that\nproperty changes, any templates that used that property, directly or\nindirectly, will rerender. For instance, consider this component:\n\n```handlebars\nCount: {{this.count}}\nTimes Ten: {{this.timesTen}}\n\n \n Plus One\n \n\n```\n\n```javascript\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\n\nexport default class CounterComponent extends Component {\n @tracked count = 0;\n\n get timesTen() {\n return this.count * 10;\n }\n\n @action\n plusOne() {\n this.count += 1;\n }\n}\n```\n\nBoth the `{{this.count}}` and the `{{this.timesTen}}` properties in the\ntemplate will update whenever the button is clicked. Any tracked properties\nthat are used in any way to calculate a value that is used in the template\nwill cause a rerender when updated - this includes through method calls and\nother means:\n\n```javascript\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\n\nclass Entry {\n @tracked name;\n @tracked phoneNumber;\n\n constructor(name, phoneNumber) {\n this.name = name;\n this.phoneNumber = phoneNumber;\n }\n}\n\nexport default class PhoneBookComponent extends Component {\n entries = [\n new Entry('Pizza Palace', 5551234),\n new Entry('1st Street Cleaners', 5554321),\n new Entry('Plants R Us', 5552468),\n ];\n\n // Any usage of this property will update whenever any of the names in the\n // entries arrays are updated\n get names() {\n return this.entries.map(e => e.name);\n }\n\n // Any usage of this property will update whenever any of the numbers in the\n // entries arrays are updated\n get numbers() {\n return this.getFormattedNumbers();\n }\n\n getFormattedNumbers() {\n return this.entries\n .map(e => e.phoneNumber)\n .map(number => {\n let numberString = '' + number;\n\n return numberString.slice(0, 3) + '-' + numberString.slice(3);\n });\n }\n}\n```\n\nIt's important to note that setting tracked properties will always trigger an\nupdate, even if the property is set to the same value as it was before.\n\n```js\nlet entry = new Entry('Pizza Palace', 5551234);\n\n// if entry was used when rendering, this would cause a rerender, even though\n// the name is being set to the same value as it was before\nentry.name = entry.name;\n```\n\n`tracked` can also be used with the classic Ember object model in a similar\nmanner to classic computed properties:\n\n```javascript\nimport EmberObject from '@ember/object';\nimport { tracked } from '@glimmer/tracking';\n\nconst Entry = EmberObject.extend({\n name: tracked(),\n phoneNumber: tracked()\n});\n```\n\nOften this is unnecessary, but to ensure robust auto-tracking behavior it is\nadvisable to mark tracked state appropriately wherever possible.\n\nThis form of `tracked` also accepts an optional configuration object\ncontaining either an initial `value` or an `initializer` function (but not\nboth).\n\n```javascript\nimport EmberObject from '@ember/object';\nimport { tracked } from '@glimmer/tracking';\n\nconst Entry = EmberObject.extend({\n name: tracked({ value: 'Zoey' }),\n favoriteSongs: tracked({\n initializer: () => ['Raspberry Beret', 'Time After Time']\n })\n});\n```", + "itemtype": "method", + "name": "tracked", + "static": 1, + "access": "public", + "tagname": "", + "class": "@glimmer/tracking", + "module": "@glimmer/tracking" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/glimmer-tracking-docs.ts", + "line": 158, + "description": "Gives the getter a caching behavior. The return value of the getter\nwill be cached until any of the properties it is entangled with\nare invalidated. This is useful when a getter is expensive and\nused very often.\n\nFor instance, in this `GuestList` class, we have the `sortedGuests`\ngetter that sorts the guests alphabetically:\n\n```javascript\n import { tracked } from '@glimmer/tracking';\n\n class GuestList {\n @tracked guests = ['Zoey', 'Tomster'];\n\n get sortedGuests() {\n return this.guests.slice().sort()\n }\n }\n```\n\nEvery time `sortedGuests` is accessed, a new array will be created and sorted,\nbecause JavaScript getters do not cache by default. When the guest list\nis small, like the one in the example, this is not a problem. However, if\nthe guest list were to grow very large, it would mean that we would be doing\na large amount of work each time we accessed `sortedGuests`. With `@cached`,\nwe can cache the value instead:\n\n```javascript\n import { tracked, cached } from '@glimmer/tracking';\n\n class GuestList {\n @tracked guests = ['Zoey', 'Tomster'];\n\n @cached\n get sortedGuests() {\n return this.guests.slice().sort()\n }\n }\n```\n\nNow the `sortedGuests` getter will be cached based on autotracking.\nIt will only rerun and create a new sorted array when the guests tracked\nproperty is updated.\n\n\n### Tradeoffs\n\nOveruse is discouraged.\n\nIn general, you should avoid using `@cached` unless you have confirmed that\nthe getter you are decorating is computationally expensive, since `@cached`\nadds a small amount of overhead to the getter.\nWhile the individual costs are small, a systematic use of the `@cached`\ndecorator can add up to a large impact overall in your app.\nMany getters and tracked properties are only accessed once during rendering,\nand then never rerendered, so adding `@cached` when unnecessary can\nnegatively impact performance.\n\nAlso, `@cached` may rerun even if the values themselves have not changed,\nsince tracked properties will always invalidate.\nFor example updating an integer value from `5` to an other `5` will trigger\na rerun of the cached properties building from this integer.\n\nAvoiding a cache invalidation in this case is not something that can\nbe achieved on the `@cached` decorator itself, but rather when updating\nthe underlying tracked values, by applying some diff checking mechanisms:\n\n```javascript\nif (nextValue !== this.trackedProp) {\n this.trackedProp = nextValue;\n}\n```\n\nHere equal values won't update the property, therefore not triggering\nthe subsequent cache invalidations of the `@cached` properties who were\nusing this `trackedProp`.\n\nRemember that setting tracked data should only be done during initialization,\nor as the result of a user action. Setting tracked data during render\n(such as in a getter), is not supported.", + "itemtype": "method", + "name": "cached", + "static": 1, + "access": "public", + "tagname": "", + "class": "@glimmer/tracking", + "module": "@glimmer/tracking" + }, + { + "file": "packages/@ember/-internals/metal/lib/cached.ts", + "line": 7, + "decorator": "Gives the getter a caching behavior. The return value of the getter\n will be cached until any of the properties it is entangled with\n are invalidated. This is useful when a getter is expensive and\n used very often.\n\n For instance, in this `GuestList` class, we have the `sortedGuests`\n getter that sorts the guests alphabetically:\n\n ```javascript\n import { tracked } from '---AT-PLACEHOLDER---glimmer/tracking';\n\n class GuestList {\n ---AT-PLACEHOLDER---tracked guests = ['Zoey', 'Tomster'];\n\n get sortedGuests() {\n return this.guests.slice().sort()\n }\n }\n ```\n\n Every time `sortedGuests` is accessed, a new array will be created and sorted,\n because JavaScript getters do not cache by default. When the guest list\n is small, like the one in the example, this is not a problem. However, if\n the guest list were to grow very large, it would mean that we would be doing\n a large amount of work each time we accessed `sortedGuests`. With `@cached`,\n we can cache the value instead:\n\n ```javascript\n import { tracked, cached } from '---AT-PLACEHOLDER---glimmer/tracking';\n\n class GuestList {\n ---AT-PLACEHOLDER---tracked guests = ['Zoey', 'Tomster'];\n\n ---AT-PLACEHOLDER---cached\n get sortedGuests() {\n return this.guests.slice().sort()\n }\n }\n ```\n\n Now the `sortedGuests` getter will be cached based on autotracking.\n It will only rerun and create a new sorted array when the guests tracked\n property is updated.\n\n\n ### Tradeoffs\n\n Overuse is discouraged.\n\n In general, you should avoid using `@cached` unless you have confirmed that\n the getter you are decorating is computationally expensive, since `@cached`\n adds a small amount of overhead to the getter.\n While the individual costs are small, a systematic use of the `@cached`\n decorator can add up to a large impact overall in your app.\n Many getters and tracked properties are only accessed once during rendering,\n and then never rerendered, so adding `@cached` when unnecessary can\n negatively impact performance.\n\n Also, `@cached` may rerun even if the values themselves have not changed,\n since tracked properties will always invalidate.\n For example updating an integer value from `5` to an other `5` will trigger\n a rerun of the cached properties building from this integer.\n\n Avoiding a cache invalidation in this case is not something that can\n be achieved on the `@cached` decorator itself, but rather when updating\n the underlying tracked values, by applying some diff checking mechanisms:\n\n ```javascript\n if (nextValue !== this.trackedProp) {\n this.trackedProp = nextValue;\n }\n ```\n\n Here equal values won't update the property, therefore not triggering\n the subsequent cache invalidations of the `@cached` properties who were\n using this `trackedProp`.\n\n Remember that setting tracked data should only be done during initialization, \n or as the result of a user action. Setting tracked data during render\n (such as in a getter), is not supported.", + "itemtype": "method", + "name": "cached", + "static": 1, + "access": "public", + "tagname": "", + "class": "@glimmer/tracking", + "module": "@glimmer/tracking/primitives/cache" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@glimmer/tracking", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-@glimmer/tracking/primitives/cache.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-@glimmer/tracking/primitives/cache.json new file mode 100644 index 000000000..55a700c39 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-@glimmer/tracking/primitives/cache.json @@ -0,0 +1,77 @@ +{ + "data": { + "id": "ember-5.12.0-@glimmer/tracking/primitives/cache", + "type": "class", + "attributes": { + "name": "@glimmer/tracking/primitives/cache", + "shortname": "@glimmer/tracking/primitives/cache", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@glimmer/tracking/primitives/cache", + "namespace": "", + "methods": [ + { + "file": "packages/@ember/-internals/metal/lib/cache.ts", + "line": 14, + "description": "Receives a function, and returns a wrapped version of it that memoizes based on\n_autotracking_. The function will only rerun whenever any tracked values used\nwithin it have changed. Otherwise, it will return the previous value.\n\n```js\nimport { tracked } from '@glimmer/tracking';\nimport { createCache, getValue } from '@glimmer/tracking/primitives/cache';\n\nclass State {\n @tracked value;\n}\n\nlet state = new State();\nlet computeCount = 0;\n\nlet counter = createCache(() => {\n // consume the state. Now, `counter` will\n // only rerun if `state.value` changes.\n state.value;\n\n return ++computeCount;\n});\n\ngetValue(counter); // 1\n\n// returns the same value because no tracked state has changed\ngetValue(counter); // 1\n\nstate.value = 'foo';\n\n// reruns because a tracked value used in the function has changed,\n// incermenting the counter\ngetValue(counter); // 2\n```", + "itemtype": "method", + "name": "createCache", + "static": 1, + "access": "public", + "tagname": "", + "class": "@glimmer/tracking/primitives/cache", + "module": "@glimmer/tracking/primitives/cache" + }, + { + "file": "packages/@ember/-internals/metal/lib/cache.ts", + "line": 56, + "description": "Gets the value of a cache created with `createCache`.\n\n```js\nimport { tracked } from '@glimmer/tracking';\nimport { createCache, getValue } from '@glimmer/tracking/primitives/cache';\n\nlet computeCount = 0;\n\nlet counter = createCache(() => {\n return ++computeCount;\n});\n\ngetValue(counter); // 1\n```", + "itemtype": "method", + "name": "getValue", + "static": 1, + "access": "public", + "tagname": "", + "class": "@glimmer/tracking/primitives/cache", + "module": "@glimmer/tracking/primitives/cache" + }, + { + "file": "packages/@ember/-internals/metal/lib/cache.ts", + "line": 78, + "description": "Can be used to check if a memoized function is _constant_. If no tracked state\nwas used while running a memoized function, it will never rerun, because nothing\ncan invalidate its result. `isConst` can be used to determine if a memoized\nfunction is constant or not, in order to optimize code surrounding that\nfunction.\n\n```js\nimport { tracked } from '@glimmer/tracking';\nimport { createCache, getValue, isConst } from '@glimmer/tracking/primitives/cache';\n\nclass State {\n @tracked value;\n}\n\nlet state = new State();\nlet computeCount = 0;\n\nlet counter = createCache(() => {\n // consume the state\n state.value;\n\n return computeCount++;\n});\n\nlet constCounter = createCache(() => {\n return computeCount++;\n});\n\ngetValue(counter);\ngetValue(constCounter);\n\nisConst(counter); // false\nisConst(constCounter); // true\n```\n\nIf called on a cache that hasn't been accessed yet, it will throw an\nerror. This is because there's no way to know if the function will be constant\nor not yet, and so this helps prevent missing an optimization opportunity on\naccident.", + "itemtype": "method", + "name": "isConst", + "static": 1, + "access": "public", + "tagname": "", + "class": "@glimmer/tracking/primitives/cache", + "module": "@glimmer/tracking/primitives/cache" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@glimmer/tracking/primitives/cache", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-Application.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-Application.json new file mode 100644 index 000000000..dd1ce26f6 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-Application.json @@ -0,0 +1,573 @@ +{ + "data": { + "id": "ember-5.12.0-Application", + "type": "class", + "attributes": { + "name": "Application", + "shortname": "Application", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/application", + "namespace": "", + "file": "packages/@ember/application/index.ts", + "line": 42, + "description": "An instance of `Application` is the starting point for every Ember\napplication. It instantiates, initializes and coordinates the\nobjects that make up your app.\n\nEach Ember app has one and only one `Application` object. Although\nEmber CLI creates this object implicitly, the `Application` class\nis defined in the `app/app.js`. You can define a `ready` method on the\n`Application` class, which will be run by Ember when the application is\ninitialized.\n\n```js {data-filename=app/app.js}\nexport default class App extends Application {\n ready() {\n // your code here\n }\n}\n```\n\nBecause `Application` ultimately inherits from `Ember.Namespace`, any classes\nyou create will have useful string representations when calling `toString()`.\nSee the `Ember.Namespace` documentation for more information.\n\nWhile you can think of your `Application` as a container that holds the\nother classes in your application, there are several other responsibilities\ngoing on under-the-hood that you may want to understand. It is also important\nto understand that an `Application` is different from an `ApplicationInstance`.\nRefer to the Guides to understand the difference between these.\n\n### Event Delegation\n\nEmber uses a technique called _event delegation_. This allows the framework\nto set up a global, shared event listener instead of requiring each view to\ndo it manually. For example, instead of each view registering its own\n`mousedown` listener on its associated element, Ember sets up a `mousedown`\nlistener on the `body`.\n\nIf a `mousedown` event occurs, Ember will look at the target of the event and\nstart walking up the DOM node tree, finding corresponding views and invoking\ntheir `mouseDown` method as it goes.\n\n`Application` has a number of default events that it listens for, as\nwell as a mapping from lowercase events to camel-cased view method names. For\nexample, the `keypress` event causes the `keyPress` method on the view to be\ncalled, the `dblclick` event causes `doubleClick` to be called, and so on.\n\nIf there is a bubbling browser event that Ember does not listen for by\ndefault, you can specify custom events and their corresponding view method\nnames by setting the application's `customEvents` property:\n\n```js {data-filename=app/app.js}\nimport Application from '@ember/application';\n\nexport default class App extends Application {\n customEvents = {\n // add support for the paste event\n paste: 'paste'\n }\n}\n```\n\nTo prevent Ember from setting up a listener for a default event,\nspecify the event name with a `null` value in the `customEvents`\nproperty:\n\n```js {data-filename=app/app.js}\nimport Application from '@ember/application';\n\nexport default class App extends Application {\n customEvents = {\n // prevent listeners for mouseenter/mouseleave events\n mouseenter: null,\n mouseleave: null\n }\n}\n```\n\nBy default, the application sets up these event listeners on the document\nbody. However, in cases where you are embedding an Ember application inside\nan existing page, you may want it to set up the listeners on an element\ninside the body.\n\nFor example, if only events inside a DOM element with the ID of `ember-app`\nshould be delegated, set your application's `rootElement` property:\n\n```js {data-filename=app/app.js}\nimport Application from '@ember/application';\n\nexport default class App extends Application {\n rootElement = '#ember-app'\n}\n```\n\nThe `rootElement` can be either a DOM element or a CSS selector\nstring. Note that *views appended to the DOM outside the root element will\nnot receive events.* If you specify a custom root element, make sure you only\nappend views inside it!\n\nTo learn more about the events Ember components use, see\n\n[components/handling-events](https://guides.emberjs.com/release/components/handling-events/#toc_event-names).\n\n### Initializers\n\nTo add behavior to the Application's boot process, you can define initializers in\nthe `app/initializers` directory, or with `ember generate initializer` using Ember CLI.\nThese files should export a named `initialize` function which will receive the created `application`\nobject as its first argument.\n\n```javascript\nexport function initialize(application) {\n // application.inject('route', 'foo', 'service:foo');\n}\n```\n\nApplication initializers can be used for a variety of reasons including:\n\n- setting up external libraries\n- injecting dependencies\n- setting up event listeners in embedded apps\n- deferring the boot process using the `deferReadiness` and `advanceReadiness` APIs.\n\n### Routing\n\nIn addition to creating your application's router, `Application` is\nalso responsible for telling the router when to start routing. Transitions\nbetween routes can be logged with the `LOG_TRANSITIONS` flag, and more\ndetailed intra-transition logging can be logged with\nthe `LOG_TRANSITIONS_INTERNAL` flag:\n\n```javascript\nimport Application from '@ember/application';\n\nlet App = Application.create({\n LOG_TRANSITIONS: true, // basic logging of successful transitions\n LOG_TRANSITIONS_INTERNAL: true // detailed logging of all routing steps\n});\n```\n\nBy default, the router will begin trying to translate the current URL into\napplication state once the browser emits the `DOMContentReady` event. If you\nneed to defer routing, you can call the application's `deferReadiness()`\nmethod. Once routing can begin, call the `advanceReadiness()` method.\n\nIf there is any setup required before routing begins, you can implement a\n`ready()` method on your app that will be invoked immediately before routing\nbegins.", + "extends": "Engine", + "access": "public", + "tagname": "", + "methods": [ + { + "file": "packages/@ember/application/index.ts", + "line": 196, + "description": "This creates a registry with the default Ember naming conventions.\n\nIt also configures the registry:\n\n* registered views are created every time they are looked up (they are\n not singletons)\n* registered templates are not factories; the registered value is\n returned directly.\n* the router receives the application as its `namespace` property\n* all controllers receive the router as their `target` and `controllers`\n properties\n* all controllers receive the application as their `namespace` property\n* the application view receives the application controller as its\n `controller` property\n* the application view receives the application template as its\n `defaultTemplate` property", + "itemtype": "method", + "name": "buildRegistry", + "static": 1, + "params": [ + { + "name": "namespace", + "description": "the application for which to\n build the registry", + "type": "Application" + } + ], + "return": { + "description": "the built registry", + "type": "Ember.Registry" + }, + "access": "private", + "tagname": "", + "class": "Application", + "module": "@ember/application" + }, + { + "file": "packages/@ember/application/index.ts", + "line": 443, + "description": "Create an ApplicationInstance for this application.", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "buildInstance", + "return": { + "description": "the application instance", + "type": "ApplicationInstance" + }, + "class": "Application", + "module": "@ember/application" + }, + { + "file": "packages/@ember/application/index.ts", + "line": 468, + "description": "Start tracking an ApplicationInstance for this application.\nUsed when the ApplicationInstance is created.", + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "_watchInstance", + "class": "Application", + "module": "@ember/application" + }, + { + "file": "packages/@ember/application/index.ts", + "line": 479, + "description": "Stop tracking an ApplicationInstance for this application.\nUsed when the ApplicationInstance is about to be destroyed.", + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "_unwatchInstance", + "class": "Application", + "module": "@ember/application" + }, + { + "file": "packages/@ember/application/index.ts", + "line": 492, + "description": "Enable the legacy globals mode by allowing this application to act\nas a global namespace. See the docs on the `_globalsMode` property\nfor details.\n\nMost of these features are already deprecated in 1.x, so we can\nstop using them internally and try to remove them.", + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "_prepareForGlobalsMode", + "class": "Application", + "module": "@ember/application" + }, + { + "file": "packages/@ember/application/index.ts", + "line": 539, + "description": "Automatically kick-off the boot process for the application once the\nDOM has become ready.\n\nThe initialization itself is scheduled on the actions queue which\nensures that code-loading finishes before booting.\n\nIf you are asynchronously loading code, you should call `deferReadiness()`\nto defer booting, and then call `advanceReadiness()` once all of your code\nhas finished loading.", + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "waitForDOMReady", + "class": "Application", + "module": "@ember/application" + }, + { + "file": "packages/@ember/application/index.ts", + "line": 579, + "description": "This is the autoboot flow:\n\n1. Boot the app by calling `this.boot()`\n2. Create an instance (or use the `__deprecatedInstance__` in globals mode)\n3. Boot the instance by calling `instance.boot()`\n4. Invoke the `App.ready()` callback\n5. Kick-off routing on the instance\n\nIdeally, this is all we would need to do:\n\n```javascript\n_autoBoot() {\n this.boot().then(() => {\n let instance = (this._globalsMode) ? this.__deprecatedInstance__ : this.buildInstance();\n return instance.boot();\n }).then((instance) => {\n App.ready();\n instance.startRouting();\n });\n}\n```\n\nUnfortunately, we cannot actually write this because we need to participate\nin the \"synchronous\" boot process. While the code above would work fine on\nthe initial boot (i.e. DOM ready), when `App.reset()` is called, we need to\nboot a new instance synchronously (see the documentation on `_bootSync()`\nfor details).\n\nBecause of this restriction, the actual logic of this method is located\ninside `didBecomeReady()`.", + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "domReady", + "class": "Application", + "module": "@ember/application" + }, + { + "file": "packages/@ember/application/index.ts", + "line": 624, + "description": "Use this to defer readiness until some condition is true.\n\nExample:\n\n```javascript\nimport Application from '@ember/application';\n\nlet App = Application.create();\n\nApp.deferReadiness();\n\nfetch('/auth-token')\n.then(response => response.json())\n.then(data => {\n App.token = data.token;\n App.advanceReadiness();\n});\n```\n\nThis allows you to perform asynchronous setup logic and defer\nbooting your application until the setup has finished.\n\nHowever, if the setup requires a loading UI, it might be better\nto use the router for this purpose.", + "itemtype": "method", + "name": "deferReadiness", + "access": "public", + "tagname": "", + "class": "Application", + "module": "@ember/application" + }, + { + "file": "packages/@ember/application/index.ts", + "line": 674, + "description": "Call `advanceReadiness` after any asynchronous setup logic has completed.\nEach call to `deferReadiness` must be matched by a call to `advanceReadiness`\nor the application will never become ready and routing will not begin.", + "itemtype": "method", + "name": "advanceReadiness", + "see": [ + "{Application#deferReadiness}" + ], + "access": "public", + "tagname": "", + "class": "Application", + "module": "@ember/application" + }, + { + "file": "packages/@ember/application/index.ts", + "line": 713, + "description": "Initialize the application and return a promise that resolves with the `Application`\nobject when the boot process is complete.\n\nRun any application initializers and run the application load hook. These hooks may\nchoose to defer readiness. For example, an authentication hook might want to defer\nreadiness until the auth token has been retrieved.\n\nBy default, this method is called automatically on \"DOM ready\"; however, if autoboot\nis disabled, this is automatically called when the first application instance is\ncreated via `visit`.", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "boot", + "return": { + "description": "", + "type": "Promise" + }, + "class": "Application", + "module": "@ember/application" + }, + { + "file": "packages/@ember/application/index.ts", + "line": 794, + "description": "Reset the application. This is typically used only in tests. It cleans up\nthe application in the following order:\n\n1. Deactivate existing routes\n2. Destroy all objects in the container\n3. Create a new application container\n4. Re-route to the existing url\n\nTypical Example:\n\n```javascript\nimport Application from '@ember/application';\nlet App;\n\nrun(function() {\n App = Application.create();\n});\n\nmodule('acceptance test', {\n setup: function() {\n App.reset();\n }\n});\n\ntest('first test', function() {\n // App is freshly reset\n});\n\ntest('second test', function() {\n // App is again freshly reset\n});\n```\n\nAdvanced Example:\n\nOccasionally you may want to prevent the app from initializing during\nsetup. This could enable extra configuration, or enable asserting prior\nto the app becoming ready.\n\n```javascript\nimport Application from '@ember/application';\nlet App;\n\nrun(function() {\n App = Application.create();\n});\n\nmodule('acceptance test', {\n setup: function() {\n run(function() {\n App.reset();\n App.deferReadiness();\n });\n }\n});\n\ntest('first test', function() {\n ok(true, 'something before app is initialized');\n\n run(function() {\n App.advanceReadiness();\n });\n\n ok(true, 'something after app is initialized');\n});\n```", + "itemtype": "method", + "name": "reset", + "access": "public", + "tagname": "", + "class": "Application", + "module": "@ember/application" + }, + { + "file": "packages/@ember/application/index.ts", + "line": 898, + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "didBecomeReady", + "class": "Application", + "module": "@ember/application" + }, + { + "file": "packages/@ember/application/index.ts", + "line": 976, + "description": "Boot a new instance of `ApplicationInstance` for the current\napplication and navigate it to the given `url`. Returns a `Promise` that\nresolves with the instance when the initial routing and rendering is\ncomplete, or rejects with any error that occurred during the boot process.\n\nWhen `autoboot` is disabled, calling `visit` would first cause the\napplication to boot, which runs the application initializers.\n\nThis method also takes a hash of boot-time configuration options for\ncustomizing the instance's behavior. See the documentation on\n`ApplicationInstance.BootOptions` for details.\n\n`ApplicationInstance.BootOptions` is an interface class that exists\npurely to document the available options; you do not need to construct it\nmanually. Simply pass a regular JavaScript object containing of the\ndesired options:\n\n```javascript\nMyApp.visit(\"/\", { location: \"none\", rootElement: \"#container\" });\n```\n\n### Supported Scenarios\n\nWhile the `BootOptions` class exposes a large number of knobs, not all\ncombinations of them are valid; certain incompatible combinations might\nresult in unexpected behavior.\n\nFor example, booting the instance in the full browser environment\nwhile specifying a foreign `document` object (e.g. `{ isBrowser: true,\ndocument: iframe.contentDocument }`) does not work correctly today,\nlargely due to Ember's jQuery dependency.\n\nCurrently, there are three officially supported scenarios/configurations.\nUsages outside of these scenarios are not guaranteed to work, but please\nfeel free to file bug reports documenting your experience and any issues\nyou encountered to help expand support.\n\n#### Browser Applications (Manual Boot)\n\nThe setup is largely similar to how Ember works out-of-the-box. Normally,\nEmber will boot a default instance for your Application on \"DOM ready\".\nHowever, you can customize this behavior by disabling `autoboot`.\n\nFor example, this allows you to render a miniture demo of your application\ninto a specific area on your marketing website:\n\n```javascript\nimport MyApp from 'my-app';\n\n$(function() {\n let App = MyApp.create({ autoboot: false });\n\n let options = {\n // Override the router's location adapter to prevent it from updating\n // the URL in the address bar\n location: 'none',\n\n // Override the default `rootElement` on the app to render into a\n // specific `div` on the page\n rootElement: '#demo'\n };\n\n // Start the app at the special demo URL\n App.visit('/demo', options);\n});\n```\n\nOr perhaps you might want to boot two instances of your app on the same\npage for a split-screen multiplayer experience:\n\n```javascript\nimport MyApp from 'my-app';\n\n$(function() {\n let App = MyApp.create({ autoboot: false });\n\n let sessionId = MyApp.generateSessionID();\n\n let player1 = App.visit(`/matches/join?name=Player+1&session=${sessionId}`, { rootElement: '#left', location: 'none' });\n let player2 = App.visit(`/matches/join?name=Player+2&session=${sessionId}`, { rootElement: '#right', location: 'none' });\n\n Promise.all([player1, player2]).then(() => {\n // Both apps have completed the initial render\n $('#loading').fadeOut();\n });\n});\n```\n\nDo note that each app instance maintains their own registry/container, so\nthey will run in complete isolation by default.\n\n#### Server-Side Rendering (also known as FastBoot)\n\nThis setup allows you to run your Ember app in a server environment using\nNode.js and render its content into static HTML for SEO purposes.\n\n```javascript\nconst HTMLSerializer = new SimpleDOM.HTMLSerializer(SimpleDOM.voidMap);\n\nfunction renderURL(url) {\n let dom = new SimpleDOM.Document();\n let rootElement = dom.body;\n let options = { isBrowser: false, document: dom, rootElement: rootElement };\n\n return MyApp.visit(options).then(instance => {\n try {\n return HTMLSerializer.serialize(rootElement.firstChild);\n } finally {\n instance.destroy();\n }\n });\n}\n```\n\nIn this scenario, because Ember does not have access to a global `document`\nobject in the Node.js environment, you must provide one explicitly. In practice,\nin the non-browser environment, the stand-in `document` object only needs to\nimplement a limited subset of the full DOM API. The `SimpleDOM` library is known\nto work.\n\nSince there is no DOM access in the non-browser environment, you must also\nspecify a DOM `Element` object in the same `document` for the `rootElement` option\n(as opposed to a selector string like `\"body\"`).\n\nSee the documentation on the `isBrowser`, `document` and `rootElement` properties\non `ApplicationInstance.BootOptions` for details.\n\n#### Server-Side Resource Discovery\n\nThis setup allows you to run the routing layer of your Ember app in a server\nenvironment using Node.js and completely disable rendering. This allows you\nto simulate and discover the resources (i.e. AJAX requests) needed to fulfill\na given request and eagerly \"push\" these resources to the client.\n\n```js {data-filename=app/initializers/network-service.js}\nimport BrowserNetworkService from 'app/services/network/browser';\nimport NodeNetworkService from 'app/services/network/node';\n\n// Inject a (hypothetical) service for abstracting all AJAX calls and use\n// the appropriate implementation on the client/server. This also allows the\n// server to log all the AJAX calls made during a particular request and use\n// that for resource-discovery purpose.\n\nexport function initialize(application) {\n if (window) { // browser\n application.register('service:network', BrowserNetworkService);\n } else { // node\n application.register('service:network', NodeNetworkService);\n }\n};\n\nexport default {\n name: 'network-service',\n initialize: initialize\n};\n```\n\n```js {data-filename=app/routes/post.js}\nimport Route from '@ember/routing/route';\nimport { service } from '@ember/service';\n\n// An example of how the (hypothetical) service is used in routes.\n\nexport default class IndexRoute extends Route {\n @service network;\n\n model(params) {\n return this.network.fetch(`/api/posts/${params.post_id}.json`);\n }\n\n afterModel(post) {\n if (post.isExternalContent) {\n return this.network.fetch(`/api/external/?url=${post.externalURL}`);\n } else {\n return post;\n }\n }\n}\n```\n\n```javascript\n// Finally, put all the pieces together\n\nfunction discoverResourcesFor(url) {\n return MyApp.visit(url, { isBrowser: false, shouldRender: false }).then(instance => {\n let networkService = instance.lookup('service:network');\n return networkService.requests; // => { \"/api/posts/123.json\": \"...\" }\n });\n}\n```", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "visit", + "params": [ + { + "name": "url", + "description": "The initial URL to navigate to", + "type": "String" + }, + { + "name": "options", + "description": "", + "type": "ApplicationInstance.BootOptions" + } + ], + "return": { + "description": "", + "type": "Promise" + }, + "class": "Application", + "module": "@ember/application" + }, + { + "file": "packages/@ember/engine/index.ts", + "line": 62, + "description": "The goal of initializers should be to register dependencies and injections.\nThis phase runs once. Because these initializers may load code, they are\nallowed to defer application readiness and advance it. If you need to access\nthe container or store you should use an InstanceInitializer that will be run\nafter all initializers and therefore after all code is loaded and the app is\nready.\n\nInitializer receives an object which has the following attributes:\n`name`, `before`, `after`, `initialize`. The only required attribute is\n`initialize`, all others are optional.\n\n* `name` allows you to specify under which name the initializer is registered.\nThis must be a unique name, as trying to register two initializers with the\nsame name will result in an error.\n\n```js {data-filename=app/initializer/named-initializer.js}\nimport { debug } from '@ember/debug';\n\nexport function initialize() {\n debug('Running namedInitializer!');\n}\n\nexport default {\n name: 'named-initializer',\n initialize\n};\n```\n\n* `before` and `after` are used to ensure that this initializer is ran prior\nor after the one identified by the value. This value can be a single string\nor an array of strings, referencing the `name` of other initializers.\n\nAn example of ordering initializers, we create an initializer named `first`:\n\n```js {data-filename=app/initializer/first.js}\nimport { debug } from '@ember/debug';\n\nexport function initialize() {\n debug('First initializer!');\n}\n\nexport default {\n name: 'first',\n initialize\n};\n```\n\n```bash\n// DEBUG: First initializer!\n```\n\nWe add another initializer named `second`, specifying that it should run\nafter the initializer named `first`:\n\n```js {data-filename=app/initializer/second.js}\nimport { debug } from '@ember/debug';\n\nexport function initialize() {\n debug('Second initializer!');\n}\n\nexport default {\n name: 'second',\n after: 'first',\n initialize\n};\n```\n\n```\n// DEBUG: First initializer!\n// DEBUG: Second initializer!\n```\n\nAfterwards we add a further initializer named `pre`, this time specifying\nthat it should run before the initializer named `first`:\n\n```js {data-filename=app/initializer/pre.js}\nimport { debug } from '@ember/debug';\n\nexport function initialize() {\n debug('Pre initializer!');\n}\n\nexport default {\n name: 'pre',\n before: 'first',\n initialize\n};\n```\n\n```bash\n// DEBUG: Pre initializer!\n// DEBUG: First initializer!\n// DEBUG: Second initializer!\n```\n\nFinally we add an initializer named `post`, specifying it should run after\nboth the `first` and the `second` initializers:\n\n```js {data-filename=app/initializer/post.js}\nimport { debug } from '@ember/debug';\n\nexport function initialize() {\n debug('Post initializer!');\n}\n\nexport default {\n name: 'post',\n after: ['first', 'second'],\n initialize\n};\n```\n\n```bash\n// DEBUG: Pre initializer!\n// DEBUG: First initializer!\n// DEBUG: Second initializer!\n// DEBUG: Post initializer!\n```\n\n* `initialize` is a callback function that receives one argument,\n `application`, on which you can operate.\n\nExample of using `application` to register an adapter:\n\n```js {data-filename=app/initializer/api-adapter.js}\nimport ApiAdapter from '../utils/api-adapter';\n\nexport function initialize(application) {\n application.register('api-adapter:main', ApiAdapter);\n}\n\nexport default {\n name: 'post',\n after: ['first', 'second'],\n initialize\n};\n```", + "itemtype": "method", + "name": "initializer", + "params": [ + { + "name": "initializer", + "description": "", + "type": "Object" + } + ], + "access": "public", + "tagname": "", + "class": "Application", + "module": "@ember/engine", + "inherited": true, + "inheritedFrom": "Engine" + }, + { + "file": "packages/@ember/engine/index.ts", + "line": 209, + "description": "Instance initializers run after all initializers have run. Because\ninstance initializers run after the app is fully set up. We have access\nto the store, container, and other items. However, these initializers run\nafter code has loaded and are not allowed to defer readiness.\n\nInstance initializer receives an object which has the following attributes:\n`name`, `before`, `after`, `initialize`. The only required attribute is\n`initialize`, all others are optional.\n\n* `name` allows you to specify under which name the instanceInitializer is\nregistered. This must be a unique name, as trying to register two\ninstanceInitializer with the same name will result in an error.\n\n```js {data-filename=app/initializer/named-instance-initializer.js}\nimport { debug } from '@ember/debug';\n\nexport function initialize() {\n debug('Running named-instance-initializer!');\n}\n\nexport default {\n name: 'named-instance-initializer',\n initialize\n};\n```\n\n* `before` and `after` are used to ensure that this initializer is ran prior\nor after the one identified by the value. This value can be a single string\nor an array of strings, referencing the `name` of other initializers.\n\n* See Application.initializer for discussion on the usage of before\nand after.\n\nExample instanceInitializer to preload data into the store.\n\n```js {data-filename=app/initializer/preload-data.js}\n\nexport function initialize(application) {\n var userConfig, userConfigEncoded, store;\n // We have a HTML escaped JSON representation of the user's basic\n // configuration generated server side and stored in the DOM of the main\n // index.html file. This allows the app to have access to a set of data\n // without making any additional remote calls. Good for basic data that is\n // needed for immediate rendering of the page. Keep in mind, this data,\n // like all local models and data can be manipulated by the user, so it\n // should not be relied upon for security or authorization.\n\n // Grab the encoded data from the meta tag\n userConfigEncoded = document.querySelector('head meta[name=app-user-config]').attr('content');\n\n // Unescape the text, then parse the resulting JSON into a real object\n userConfig = JSON.parse(unescape(userConfigEncoded));\n\n // Lookup the store\n store = application.lookup('service:store');\n\n // Push the encoded JSON into the store\n store.pushPayload(userConfig);\n}\n\nexport default {\n name: 'named-instance-initializer',\n initialize\n};\n```", + "itemtype": "method", + "name": "instanceInitializer", + "params": [ + { + "name": "instanceInitializer", + "description": "" + } + ], + "access": "public", + "tagname": "", + "class": "Application", + "module": "@ember/engine", + "inherited": true, + "inheritedFrom": "Engine" + }, + { + "file": "packages/@ember/engine/index.ts", + "line": 285, + "description": "This creates a registry with the default Ember naming conventions.\n\nIt also configures the registry:\n\n* registered views are created every time they are looked up (they are\n not singletons)\n* registered templates are not factories; the registered value is\n returned directly.\n* the router receives the application as its `namespace` property\n* all controllers receive the router as their `target` and `controllers`\n properties\n* all controllers receive the application as their `namespace` property\n* the application view receives the application controller as its\n `controller` property\n* the application view receives the application template as its\n `defaultTemplate` property", + "itemtype": "method", + "name": "buildRegistry", + "static": 1, + "params": [ + { + "name": "namespace", + "description": "the application for which to\n build the registry", + "type": "Application" + } + ], + "return": { + "description": "the built registry", + "type": "Ember.Registry" + }, + "access": "private", + "tagname": "", + "class": "Application", + "module": "@ember/engine", + "inherited": true, + "inheritedFrom": "Engine" + }, + { + "file": "packages/@ember/engine/index.ts", + "line": 346, + "description": "Ensure that initializers are run once, and only once, per engine.", + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "ensureInitializers", + "class": "Application", + "module": "@ember/engine", + "inherited": true, + "inheritedFrom": "Engine" + }, + { + "file": "packages/@ember/engine/index.ts", + "line": 359, + "description": "Create an EngineInstance for this engine.", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "buildInstance", + "return": { + "description": "the engine instance", + "type": "EngineInstance" + }, + "class": "Application", + "module": "@ember/engine", + "inherited": true, + "inheritedFrom": "Engine" + }, + { + "file": "packages/@ember/engine/index.ts", + "line": 371, + "description": "Build and configure the registry for the current engine.", + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "buildRegistry", + "return": { + "description": "the configured registry", + "type": "Ember.Registry" + }, + "class": "Application", + "module": "@ember/engine", + "inherited": true, + "inheritedFrom": "Engine" + }, + { + "file": "packages/@ember/engine/index.ts", + "line": 384, + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "initializer", + "class": "Application", + "module": "@ember/engine", + "inherited": true, + "inheritedFrom": "Engine" + }, + { + "file": "packages/@ember/engine/index.ts", + "line": 392, + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "instanceInitializer", + "class": "Application", + "module": "@ember/engine", + "inherited": true, + "inheritedFrom": "Engine" + }, + { + "file": "packages/@ember/engine/index.ts", + "line": 400, + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "runInitializers", + "class": "Application", + "module": "@ember/engine", + "inherited": true, + "inheritedFrom": "Engine" + }, + { + "file": "packages/@ember/engine/index.ts", + "line": 414, + "access": "private", + "tagname": "", + "since": "1.12.0", + "itemtype": "method", + "name": "runInstanceInitializers", + "class": "Application", + "module": "@ember/engine", + "inherited": true, + "inheritedFrom": "Engine" + }, + { + "file": "packages/@ember/engine/index.ts", + "line": 448, + "description": "This function defines the default lookup rules for container lookups:\n\n* templates are looked up on `Ember.TEMPLATES`\n* other names are looked up on the application after classifying the name.\n For example, `controller:post` looks up `App.PostController` by default.\n* if the default lookup fails, look for registered classes on the container\n\nThis allows the application to register default injections in the container\nthat could be overridden by the normal naming convention.", + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "resolverFor", + "params": [ + { + "name": "namespace", + "description": "the namespace to look for classes", + "type": "Ember.Enginer" + } + ], + "return": { + "description": "the resolved value for a given lookup", + "type": "*" + }, + "class": "Application", + "module": "@ember/engine", + "inherited": true, + "inheritedFrom": "Engine" + }, + { + "file": "packages/@ember/-internals/owner/index.ts", + "line": 107, + "description": "Registers a factory that can be used for dependency injection (with\n`inject`) or for service lookup. Each factory is registered with\na full name including two parts: `type:name`.\n\nA simple example:\n\n```javascript\nimport Application from '@ember/application';\nimport EmberObject from '@ember/object';\n\nlet App = Application.create();\n\nApp.Orange = EmberObject.extend();\nApp.register('fruit:favorite', App.Orange);\n```\n\nEmber will resolve factories from the `App` namespace automatically.\nFor example `App.CarsController` will be discovered and returned if\nan application requests `controller:cars`.\n\nAn example of registering a controller with a non-standard name:\n\n```javascript\nimport Application from '@ember/application';\nimport Controller from '@ember/controller';\n\nlet App = Application.create();\nlet Session = Controller.extend();\n\nApp.register('controller:session', Session);\n\n// The Session controller can now be treated like a normal controller,\n// despite its non-standard name.\nApp.ApplicationController = Controller.extend({\n needs: ['session']\n});\n```\n\nRegistered factories are **instantiated** by having `create`\ncalled on them. Additionally they are **singletons**, each time\nthey are looked up they return the same instance.\n\nSome examples modifying that default behavior:\n\n```javascript\nimport Application from '@ember/application';\nimport EmberObject from '@ember/object';\n\nlet App = Application.create();\n\nApp.Person = EmberObject.extend();\nApp.Orange = EmberObject.extend();\nApp.Email = EmberObject.extend();\nApp.session = EmberObject.create();\n\nApp.register('model:user', App.Person, { singleton: false });\nApp.register('fruit:favorite', App.Orange);\nApp.register('communication:main', App.Email, { singleton: false });\nApp.register('session', App.session, { instantiate: false });\n```", + "itemtype": "method", + "name": "register", + "params": [ + { + "name": "fullName", + "description": "type:name (e.g., 'model:user')", + "type": "String" + }, + { + "name": "factory", + "description": "(e.g., App.Person)", + "type": "Factory|object" + }, + { + "name": "options", + "description": "(optional) disable instantiation or singleton usage", + "type": "Object" + } + ], + "access": "public", + "tagname": "", + "class": "Application", + "module": "@ember/owner", + "inherited": true, + "inheritedFrom": "BasicRegistry" + } + ], + "events": [ + { + "file": "packages/@ember/application/index.ts", + "line": 951, + "description": "Called when the Application has become ready, immediately before routing\nbegins. The call will be delayed until the DOM has become ready.", + "itemtype": "event", + "name": "ready", + "access": "public", + "tagname": "", + "class": "Application", + "module": "@ember/application" + } + ], + "properties": [ + { + "file": "packages/@ember/application/index.ts", + "line": 241, + "description": "The root DOM element of the Application. This can be specified as an\nelement or a [selector string](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Selectors#reference_table_of_selectors).\n\nThis is the element that will be passed to the Application's,\n`eventDispatcher`, which sets up the listeners for event delegation. Every\nview in your application should be a child of the element you specify here.", + "itemtype": "property", + "name": "rootElement", + "type": "DOMElement", + "default": "'body'", + "access": "public", + "tagname": "", + "class": "Application", + "module": "@ember/application" + }, + { + "file": "packages/@ember/application/index.ts", + "line": 256, + "itemtype": "property", + "name": "_document", + "type": "Document | null", + "default": "'window.document'", + "access": "private", + "tagname": "", + "class": "Application", + "module": "@ember/application" + }, + { + "file": "packages/@ember/application/index.ts", + "line": 265, + "description": "The `Ember.EventDispatcher` responsible for delegating events to this\napplication's views.\n\nThe event dispatcher is created by the application at initialization time\nand sets up event listeners on the DOM element described by the\napplication's `rootElement` property.\n\nSee the documentation for `Ember.EventDispatcher` for more information.", + "itemtype": "property", + "name": "eventDispatcher", + "type": "Ember.EventDispatcher", + "default": "null", + "access": "public", + "tagname": "", + "class": "Application", + "module": "@ember/application" + }, + { + "file": "packages/@ember/application/index.ts", + "line": 282, + "description": "The DOM events for which the event dispatcher should listen.\n\nBy default, the application's `Ember.EventDispatcher` listens\nfor a set of standard DOM events, such as `mousedown` and\n`keyup`, and delegates them to your application's `Ember.View`\ninstances.\n\nIf you would like additional bubbling events to be delegated to your\nviews, set your `Application`'s `customEvents` property\nto a hash containing the DOM event name as the key and the\ncorresponding view method name as the value. Setting an event to\na value of `null` will prevent a default event listener from being\nadded for that event.\n\nTo add new events to be listened to:\n\n```js {data-filename=app/app.js}\nimport Application from '@ember/application';\n\nlet App = Application.extend({\n customEvents: {\n // add support for the paste event\n paste: 'paste'\n }\n});\n```\n\nTo prevent default events from being listened to:\n\n```js {data-filename=app/app.js}\nimport Application from '@ember/application';\n\nlet App = Application.extend({\n customEvents: {\n // remove support for mouseenter / mouseleave events\n mouseenter: null,\n mouseleave: null\n }\n});\n```", + "itemtype": "property", + "name": "customEvents", + "type": "Object", + "default": "null", + "access": "public", + "tagname": "", + "class": "Application", + "module": "@ember/application" + }, + { + "file": "packages/@ember/application/index.ts", + "line": 330, + "description": "Whether the application should automatically start routing and render\ntemplates to the `rootElement` on DOM ready. While default by true,\nother environments such as FastBoot or a testing harness can set this\nproperty to `false` and control the precise timing and behavior of the boot\nprocess.", + "itemtype": "property", + "name": "autoboot", + "type": "Boolean", + "default": "true", + "access": "private", + "tagname": "", + "class": "Application", + "module": "@ember/application" + }, + { + "file": "packages/@ember/application/index.ts", + "line": 344, + "description": "Whether the application should be configured for the legacy \"globals mode\".\nUnder this mode, the Application object serves as a global namespace for all\nclasses.\n\n```javascript\nimport Application from '@ember/application';\nimport Component from '@ember/component';\n\nlet App = Application.create({\n ...\n});\n\nApp.Router.reopen({\n location: 'none'\n});\n\nApp.Router.map({\n ...\n});\n\nApp.MyComponent = Component.extend({\n ...\n});\n```\n\nThis flag also exposes other internal APIs that assumes the existence of\na special \"default instance\", like `App.__container__.lookup(...)`.\n\nThis option is currently not configurable, its value is derived from\nthe `autoboot` flag – disabling `autoboot` also implies opting-out of\nglobals mode support, although they are ultimately orthogonal concerns.\n\nSome of the global modes features are already deprecated in 1.x. The\nexistence of this flag is to untangle the globals mode code paths from\nthe autoboot code paths, so that these legacy features can be reviewed\nfor deprecation/removal separately.\n\nForcing the (autoboot=true, _globalsMode=false) here and running the tests\nwould reveal all the places where we are still relying on these legacy\nbehavior internally (mostly just tests).", + "itemtype": "property", + "name": "_globalsMode", + "type": "Boolean", + "default": "true", + "access": "private", + "tagname": "", + "class": "Application", + "module": "@ember/application" + }, + { + "file": "packages/@ember/application/index.ts", + "line": 393, + "description": "An array of application instances created by `buildInstance()`. Used\ninternally to ensure that all instances get destroyed.", + "itemtype": "property", + "name": "_applicationInstances", + "type": "Array", + "access": "private", + "tagname": "", + "class": "Application", + "module": "@ember/application" + }, + { + "file": "packages/@ember/engine/index.ts", + "line": 325, + "description": "Set this to provide an alternate class to `DefaultResolver`", + "itemtype": "property", + "name": "resolver", + "access": "public", + "tagname": "", + "class": "Application", + "module": "@ember/engine", + "inherited": true, + "inheritedFrom": "Engine" + }, + { + "file": "packages/@ember/engine/index.ts", + "line": 338, + "description": "A private flag indicating whether an engine's initializers have run yet.", + "access": "private", + "tagname": "", + "itemtype": "property", + "name": "_initializersRan", + "class": "Application", + "module": "@ember/engine", + "inherited": true, + "inheritedFrom": "Engine" + } + ] + }, + "relationships": { + "parent-class": { + "data": { + "id": "ember-5.12.0-Engine", + "type": "class" + } + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/application", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-ApplicationInstance.BootOptions.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-ApplicationInstance.BootOptions.json new file mode 100644 index 000000000..3aa12917a --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-ApplicationInstance.BootOptions.json @@ -0,0 +1,143 @@ +{ + "data": { + "id": "ember-5.12.0-ApplicationInstance.BootOptions", + "type": "class", + "attributes": { + "name": "ApplicationInstance.BootOptions", + "shortname": "ApplicationInstance.BootOptions", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/application", + "namespace": "ApplicationInstance", + "file": "packages/@ember/application/instance.ts", + "line": 316, + "description": "A list of boot-time configuration options for customizing the behavior of\nan `ApplicationInstance`.\n\nThis is an interface class that exists purely to document the available\noptions; you do not need to construct it manually. Simply pass a regular\nJavaScript object containing the desired options into methods that require\none of these options object:\n\n```javascript\nMyApp.visit(\"/\", { location: \"none\", rootElement: \"#container\" });\n```\n\nNot all combinations of the supported options are valid. See the documentation\non `Application#visit` for the supported configurations.\n\nInternal, experimental or otherwise unstable flags are marked as private.", + "access": "public", + "tagname": "", + "methods": [], + "events": [], + "properties": [ + { + "file": "packages/@ember/application/instance.ts", + "line": 339, + "description": "Interactive mode: whether we need to set up event delegation and invoke\nlifecycle callbacks on Components.", + "itemtype": "property", + "name": "isInteractive", + "type": "boolean", + "default": "auto-detected", + "access": "private", + "tagname": "", + "class": "ApplicationInstance.BootOptions", + "module": "@ember/application", + "namespace": "ApplicationInstance" + }, + { + "file": "packages/@ember/application/instance.ts", + "line": 350, + "itemtype": "property", + "name": "_renderMode", + "type": "string", + "default": "undefined", + "access": "private", + "tagname": "", + "class": "ApplicationInstance.BootOptions", + "module": "@ember/application", + "namespace": "ApplicationInstance" + }, + { + "file": "packages/@ember/application/instance.ts", + "line": 358, + "description": "Run in a full browser environment.\n\nWhen this flag is set to `false`, it will disable most browser-specific\nand interactive features. Specifically:\n\n* It does not use `jQuery` to append the root view; the `rootElement`\n (either specified as a subsequent option or on the application itself)\n must already be an `Element` in the given `document` (as opposed to a\n string selector).\n\n* It does not set up an `EventDispatcher`.\n\n* It does not run any `Component` lifecycle hooks (such as `didInsertElement`).\n\n* It sets the `location` option to `\"none\"`. (If you would like to use\n the location adapter specified in the app's router instead, you can also\n specify `{ location: null }` to specifically opt-out.)", + "itemtype": "property", + "name": "isBrowser", + "type": "boolean", + "default": "auto-detected", + "access": "public", + "tagname": "", + "class": "ApplicationInstance.BootOptions", + "module": "@ember/application", + "namespace": "ApplicationInstance" + }, + { + "file": "packages/@ember/application/instance.ts", + "line": 384, + "description": "If present, overrides the router's `location` property with this\nvalue. This is useful for environments where trying to modify the\nURL would be inappropriate.", + "itemtype": "property", + "name": "location", + "type": "string", + "default": "null", + "access": "public", + "tagname": "", + "class": "ApplicationInstance.BootOptions", + "module": "@ember/application", + "namespace": "ApplicationInstance" + }, + { + "file": "packages/@ember/application/instance.ts", + "line": 396, + "description": "Disable rendering completely.\n\nWhen this flag is set to `false`, it will disable the entire rendering\npipeline. Essentially, this puts the app into \"routing-only\" mode. No\ntemplates will be rendered, and no Components will be created.", + "itemtype": "property", + "name": "shouldRender", + "type": "boolean", + "default": "true", + "access": "public", + "tagname": "", + "class": "ApplicationInstance.BootOptions", + "module": "@ember/application", + "namespace": "ApplicationInstance" + }, + { + "file": "packages/@ember/application/instance.ts", + "line": 410, + "description": "If present, render into the given `Document` object instead of the\nglobal `window.document` object.\n\nIn practice, this is only useful in non-browser environment or in\nnon-interactive mode, because Ember's `jQuery` dependency is\nimplicitly bound to the current document, causing event delegation\nto not work properly when the app is rendered into a foreign\ndocument object (such as an iframe's `contentDocument`).\n\nIn non-browser mode, this could be a \"`Document`-like\" object as\nEmber only interact with a small subset of the DOM API in non-\ninteractive mode. While the exact requirements have not yet been\nformalized, the `SimpleDOM` library's implementation is known to\nwork.", + "itemtype": "property", + "name": "document", + "type": "Document", + "default": "the global `document` object", + "access": "public", + "tagname": "", + "class": "ApplicationInstance.BootOptions", + "module": "@ember/application", + "namespace": "ApplicationInstance" + }, + { + "file": "packages/@ember/application/instance.ts", + "line": 433, + "description": "If present, overrides the application's `rootElement` property on\nthe instance. This is useful for testing environment, where you\nmight want to append the root view to a fixture area.\n\nIn non-browser mode, because Ember does not have access to jQuery,\nthis options must be specified as a DOM `Element` object instead of\na selector string.\n\nSee the documentation on `Application`'s `rootElement` for\ndetails.", + "itemtype": "property", + "name": "rootElement", + "type": "String|Element", + "default": "null", + "access": "public", + "tagname": "", + "class": "ApplicationInstance.BootOptions", + "module": "@ember/application", + "namespace": "ApplicationInstance" + } + ] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/application", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-ApplicationInstance.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-ApplicationInstance.json new file mode 100644 index 000000000..eca5515a5 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-ApplicationInstance.json @@ -0,0 +1,803 @@ +{ + "data": { + "id": "ember-5.12.0-ApplicationInstance", + "type": "class", + "attributes": { + "name": "ApplicationInstance", + "shortname": "ApplicationInstance", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/application", + "namespace": "", + "file": "packages/@ember/application/instance.ts", + "line": 19, + "description": "The `ApplicationInstance` encapsulates all of the stateful aspects of a\nrunning `Application`.\n\nAt a high-level, we break application boot into two distinct phases:\n\n* Definition time, where all of the classes, templates, and other\n dependencies are loaded (typically in the browser).\n* Run time, where we begin executing the application once everything\n has loaded.\n\nDefinition time can be expensive and only needs to happen once since it is\nan idempotent operation. For example, between test runs and FastBoot\nrequests, the application stays the same. It is only the state that we want\nto reset.\n\nThat state is what the `ApplicationInstance` manages: it is responsible for\ncreating the container that contains all application state, and disposing of\nit once the particular test run or FastBoot request has finished.", + "access": "public", + "tagname": "", + "extends": "EngineInstance", + "methods": [ + { + "file": "packages/@ember/application/instance.ts", + "line": 296, + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "setupRegistry", + "params": [ + { + "name": "registry", + "description": "", + "type": "Registry" + }, + { + "name": "options", + "description": "", + "type": "BootOptions" + } + ], + "class": "ApplicationInstance", + "module": "@ember/application" + }, + { + "file": "packages/@ember/engine/instance.ts", + "line": 56, + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "setupRegistry", + "params": [ + { + "name": "registry", + "description": "", + "type": "Registry" + }, + { + "name": "options", + "description": "", + "type": "BootOptions" + } + ], + "class": "ApplicationInstance", + "module": "@ember/engine", + "inherited": true, + "inheritedFrom": "EngineInstance" + }, + { + "file": "packages/@ember/engine/instance.ts", + "line": 106, + "description": "Initialize the `EngineInstance` and return a promise that resolves\nwith the instance itself when the boot process is complete.\n\nThe primary task here is to run any registered instance initializers.\n\nSee the documentation on `BootOptions` for the options it takes.", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "boot", + "params": [ + { + "name": "options", + "description": "", + "type": "Object" + } + ], + "return": { + "description": "", + "type": "Promise" + }, + "class": "ApplicationInstance", + "module": "@ember/engine", + "inherited": true, + "inheritedFrom": "EngineInstance" + }, + { + "file": "packages/@ember/engine/instance.ts", + "line": 172, + "description": "Unregister a factory.\n\nOverrides `RegistryProxy#unregister` in order to clear any cached instances\nof the unregistered factory.", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "unregister", + "params": [ + { + "name": "fullName", + "description": "", + "type": "String" + } + ], + "class": "ApplicationInstance", + "module": "@ember/engine", + "inherited": true, + "inheritedFrom": "EngineInstance" + }, + { + "file": "packages/@ember/engine/instance.ts", + "line": 189, + "description": "Build a new `EngineInstance` that's a child of this instance.\n\nEngines must be registered by name with their parent engine\n(or application).", + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "buildChildEngineInstance", + "params": [ + { + "name": "name", + "description": "the registered name of the engine.", + "type": "String" + }, + { + "name": "options", + "description": "options provided to the engine instance.", + "type": "Object" + } + ], + "return": { + "description": "", + "type": "EngineInstance,Error" + }, + "class": "ApplicationInstance", + "module": "@ember/engine", + "inherited": true, + "inheritedFrom": "EngineInstance" + }, + { + "file": "packages/@ember/engine/instance.ts", + "line": 217, + "description": "Clone dependencies shared between an engine instance and its parent.", + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "cloneParentDependencies", + "class": "ApplicationInstance", + "module": "@ember/engine", + "inherited": true, + "inheritedFrom": "EngineInstance" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 321, + "description": "An overridable method called when objects are instantiated. By default,\ndoes nothing unless it is overridden during class definition.\n\nExample:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Person = EmberObject.extend({\n init() {\n alert(`Name is ${this.get('name')}`);\n }\n});\n\nlet steve = Person.create({\n name: 'Steve'\n});\n\n// alerts 'Name is Steve'.\n```\n\nNOTE: If you do override `init` for a framework class like `Component`\nfrom `@ember/component`, be sure to call `this._super(...arguments)`\nin your `init` declaration!\nIf you don't, Ember may not have an opportunity to\ndo important setup work, and you'll see strange behavior in your\napplication.", + "itemtype": "method", + "name": "init", + "access": "public", + "tagname": "", + "class": "ApplicationInstance", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 540, + "description": "Destroys an object by setting the `isDestroyed` flag and removing its\nmetadata, which effectively destroys observers and bindings.\n\nIf you try to set a property on a destroyed object, an exception will be\nraised.\n\nNote that destruction is scheduled for the end of the run loop and does not\nhappen immediately. It will set an isDestroying flag immediately.", + "itemtype": "method", + "name": "destroy", + "return": { + "description": "receiver", + "type": "EmberObject" + }, + "access": "public", + "tagname": "", + "class": "ApplicationInstance", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 567, + "description": "Override to implement teardown.", + "itemtype": "method", + "name": "willDestroy", + "access": "public", + "tagname": "", + "class": "ApplicationInstance", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 575, + "description": "Returns a string representation which attempts to provide more information\nthan Javascript's `toString` typically does, in a generic way for all Ember\nobjects.\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Person = EmberObject.extend();\nperson = Person.create();\nperson.toString(); //=> \"\"\n```\n\nIf the object's class is not defined on an Ember namespace, it will\nindicate it is a subclass of the registered superclass:\n\n```javascript\nconst Student = Person.extend();\nlet student = Student.create();\nstudent.toString(); //=> \"<(subclass of Person):ember1025>\"\n```\n\nIf the method `toStringExtension` is defined, its return value will be\nincluded in the output.\n\n```javascript\nconst Teacher = Person.extend({\n toStringExtension() {\n return this.get('fullName');\n }\n});\nteacher = Teacher.create();\nteacher.toString(); //=> \"\"\n```", + "itemtype": "method", + "name": "toString", + "return": { + "description": "string representation", + "type": "String" + }, + "access": "public", + "tagname": "", + "class": "ApplicationInstance", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 97, + "description": "Retrieves the value of a property from the object.\n\nThis method is usually similar to using `object[keyName]` or `object.keyName`,\nhowever it supports both computed properties and the unknownProperty\nhandler.\n\nBecause `get` unifies the syntax for accessing all these kinds\nof properties, it can make many refactorings easier, such as replacing a\nsimple property with a computed property, or vice versa.\n\n### Computed Properties\n\nComputed properties are methods defined with the `property` modifier\ndeclared at the end, such as:\n\n```javascript\nimport { computed } from '@ember/object';\n\nfullName: computed('firstName', 'lastName', function() {\n return this.get('firstName') + ' ' + this.get('lastName');\n})\n```\n\nWhen you call `get` on a computed property, the function will be\ncalled and the return value will be returned instead of the function\nitself.\n\n### Unknown Properties\n\nLikewise, if you try to call `get` on a property whose value is\n`undefined`, the `unknownProperty()` method will be called on the object.\nIf this method returns any value other than `undefined`, it will be returned\ninstead. This allows you to implement \"virtual\" properties that are\nnot defined upfront.", + "itemtype": "method", + "name": "get", + "params": [ + { + "name": "keyName", + "description": "The property to retrieve", + "type": "String" + } + ], + "return": { + "description": "The property value or undefined.", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "ApplicationInstance", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 141, + "description": "To get the values of multiple properties at once, call `getProperties`\nwith a list of strings or an array:\n\n```javascript\nrecord.getProperties('firstName', 'lastName', 'zipCode');\n// { firstName: 'John', lastName: 'Doe', zipCode: '10011' }\n```\n\nis equivalent to:\n\n```javascript\nrecord.getProperties(['firstName', 'lastName', 'zipCode']);\n// { firstName: 'John', lastName: 'Doe', zipCode: '10011' }\n```", + "itemtype": "method", + "name": "getProperties", + "params": [ + { + "name": "list", + "description": "of keys to get", + "type": "String...|Array" + } + ], + "return": { + "description": "", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "ApplicationInstance", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 168, + "description": "Sets the provided key or path to the value.\n\n```javascript\nrecord.set(\"key\", value);\n```\n\nThis method is generally very similar to calling `object[\"key\"] = value` or\n`object.key = value`, except that it provides support for computed\nproperties, the `setUnknownProperty()` method and property observers.\n\n### Computed Properties\n\nIf you try to set a value on a key that has a computed property handler\ndefined (see the `get()` method for an example), then `set()` will call\nthat method, passing both the value and key instead of simply changing\nthe value itself. This is useful for those times when you need to\nimplement a property that is composed of one or more member\nproperties.\n\n### Unknown Properties\n\nIf you try to set a value on a key that is undefined in the target\nobject, then the `setUnknownProperty()` handler will be called instead. This\ngives you an opportunity to implement complex \"virtual\" properties that\nare not predefined on the object. If `setUnknownProperty()` returns\nundefined, then `set()` will simply set the value on the object.\n\n### Property Observers\n\nIn addition to changing the property, `set()` will also register a property\nchange with the object. Unless you have placed this call inside of a\n`beginPropertyChanges()` and `endPropertyChanges(),` any \"local\" observers\n(i.e. observer methods declared on the same object), will be called\nimmediately. Any \"remote\" observers (i.e. observer methods declared on\nanother object) will be placed in a queue and called at a later time in a\ncoalesced manner.", + "itemtype": "method", + "name": "set", + "params": [ + { + "name": "keyName", + "description": "The property to set", + "type": "String" + }, + { + "name": "value", + "description": "The value to set or `null`.", + "type": "Object" + } + ], + "return": { + "description": "The passed value", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "ApplicationInstance", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 216, + "description": "Sets a list of properties at once. These properties are set inside\na single `beginPropertyChanges` and `endPropertyChanges` batch, so\nobservers will be buffered.\n\n```javascript\nrecord.setProperties({ firstName: 'Charles', lastName: 'Jolley' });\n```", + "itemtype": "method", + "name": "setProperties", + "params": [ + { + "name": "hash", + "description": "the hash of keys and values to set", + "type": "Object" + } + ], + "return": { + "description": "The passed in hash", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "ApplicationInstance", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 233, + "description": "Convenience method to call `propertyWillChange` and `propertyDidChange` in\nsuccession.\n\nNotify the observer system that a property has just changed.\n\nSometimes you need to change a value directly or indirectly without\nactually calling `get()` or `set()` on it. In this case, you can use this\nmethod instead. Calling this method will notify all observers that the\nproperty has potentially changed value.", + "itemtype": "method", + "name": "notifyPropertyChange", + "params": [ + { + "name": "keyName", + "description": "The property key to be notified about.", + "type": "String" + } + ], + "return": { + "description": "", + "type": "Observable" + }, + "access": "public", + "tagname": "", + "class": "ApplicationInstance", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 251, + "description": "Adds an observer on a property.\n\nThis is the core method used to register an observer for a property.\n\nOnce you call this method, any time the key's value is set, your observer\nwill be notified. Note that the observers are triggered any time the\nvalue is set, regardless of whether it has actually changed. Your\nobserver should be prepared to handle that.\n\nThere are two common invocation patterns for `.addObserver()`:\n\n- Passing two arguments:\n - the name of the property to observe (as a string)\n - the function to invoke (an actual function)\n- Passing three arguments:\n - the name of the property to observe (as a string)\n - the target object (will be used to look up and invoke a\n function on)\n - the name of the function to invoke on the target object\n (as a string).\n\n```js {data-filename=app/components/my-component.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n init() {\n this._super(...arguments);\n\n // the following are equivalent:\n\n // using three arguments\n this.addObserver('foo', this, 'fooDidChange');\n\n // using two arguments\n this.addObserver('foo', (...args) => {\n this.fooDidChange(...args);\n });\n },\n\n fooDidChange() {\n // your custom logic code\n }\n});\n```\n\n### Observer Methods\n\nObserver methods have the following signature:\n\n```js {data-filename=app/components/my-component.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n init() {\n this._super(...arguments);\n this.addObserver('foo', this, 'fooDidChange');\n },\n\n fooDidChange(sender, key, value, rev) {\n // your code\n }\n});\n```\n\nThe `sender` is the object that changed. The `key` is the property that\nchanges. The `value` property is currently reserved and unused. The `rev`\nis the last property revision of the object when it changed, which you can\nuse to detect if the key value has really changed or not.\n\nUsually you will not need the value or revision parameters at\nthe end. In this case, it is common to write observer methods that take\nonly a sender and key value as parameters or, if you aren't interested in\nany of these values, to write an observer that has no parameters at all.", + "itemtype": "method", + "name": "addObserver", + "params": [ + { + "name": "key", + "description": "The key to observe", + "type": "String" + }, + { + "name": "target", + "description": "The target object to invoke", + "type": "Object" + }, + { + "name": "method", + "description": "The method to invoke", + "type": "String|Function" + }, + { + "name": "sync", + "description": "Whether the observer is sync or not", + "type": "Boolean" + } + ], + "return": { + "description": "", + "type": "Observable" + }, + "access": "public", + "tagname": "", + "class": "ApplicationInstance", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 337, + "description": "Remove an observer you have previously registered on this object. Pass\nthe same key, target, and method you passed to `addObserver()` and your\ntarget will no longer receive notifications.", + "itemtype": "method", + "name": "removeObserver", + "params": [ + { + "name": "key", + "description": "The key to observe", + "type": "String" + }, + { + "name": "target", + "description": "The target object to invoke", + "type": "Object" + }, + { + "name": "method", + "description": "The method to invoke", + "type": "String|Function" + }, + { + "name": "sync", + "description": "Whether the observer is async or not", + "type": "Boolean" + } + ], + "return": { + "description": "", + "type": "Observable" + }, + "access": "public", + "tagname": "", + "class": "ApplicationInstance", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 358, + "description": "Set the value of a property to the current value plus some amount.\n\n```javascript\nperson.incrementProperty('age');\nteam.incrementProperty('score', 2);\n```", + "itemtype": "method", + "name": "incrementProperty", + "params": [ + { + "name": "keyName", + "description": "The name of the property to increment", + "type": "String" + }, + { + "name": "increment", + "description": "The amount to increment by. Defaults to 1", + "type": "Number" + } + ], + "return": { + "description": "The new property value", + "type": "Number" + }, + "access": "public", + "tagname": "", + "class": "ApplicationInstance", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 375, + "description": "Set the value of a property to the current value minus some amount.\n\n```javascript\nplayer.decrementProperty('lives');\norc.decrementProperty('health', 5);\n```", + "itemtype": "method", + "name": "decrementProperty", + "params": [ + { + "name": "keyName", + "description": "The name of the property to decrement", + "type": "String" + }, + { + "name": "decrement", + "description": "The amount to decrement by. Defaults to 1", + "type": "Number" + } + ], + "return": { + "description": "The new property value", + "type": "Number" + }, + "access": "public", + "tagname": "", + "class": "ApplicationInstance", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 392, + "description": "Set the value of a boolean property to the opposite of its\ncurrent value.\n\n```javascript\nstarship.toggleProperty('warpDriveEngaged');\n```", + "itemtype": "method", + "name": "toggleProperty", + "params": [ + { + "name": "keyName", + "description": "The name of the property to toggle", + "type": "String" + } + ], + "return": { + "description": "The new property value", + "type": "Boolean" + }, + "access": "public", + "tagname": "", + "class": "ApplicationInstance", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 407, + "description": "Returns the cached value of a computed property, if it exists.\nThis allows you to inspect the value of a computed property\nwithout accidentally invoking it if it is intended to be\ngenerated lazily.", + "itemtype": "method", + "name": "cacheFor", + "params": [ + { + "name": "keyName", + "description": "", + "type": "String" + } + ], + "return": { + "description": "The cached value of the computed property, if any", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "ApplicationInstance", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 437, + "description": "Begins a grouping of property changes.\n\nYou can use this method to group property changes so that notifications\nwill not be sent until the changes are finished. If you plan to make a\nlarge number of changes to an object at one time, you should call this\nmethod at the beginning of the changes to begin deferring change\nnotifications. When you are done making changes, call\n`endPropertyChanges()` to deliver the deferred change notifications and end\ndeferring.", + "itemtype": "method", + "name": "beginPropertyChanges", + "return": { + "description": "", + "type": "Observable" + }, + "access": "private", + "tagname": "", + "class": "ApplicationInstance", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 457, + "description": "Ends a grouping of property changes.\n\nYou can use this method to group property changes so that notifications\nwill not be sent until the changes are finished. If you plan to make a\nlarge number of changes to an object at one time, you should call\n`beginPropertyChanges()` at the beginning of the changes to defer change\nnotifications. When you are done making changes, call this method to\ndeliver the deferred change notifications and end deferring.", + "itemtype": "method", + "name": "endPropertyChanges", + "return": { + "description": "", + "type": "Observable" + }, + "access": "private", + "tagname": "", + "class": "ApplicationInstance", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 501, + "description": "Returns `true` if the object currently has observers registered for a\nparticular key. You can use this method to potentially defer performing\nan expensive action until someone begins observing a particular property\non the object.", + "itemtype": "method", + "name": "hasObserverFor", + "params": [ + { + "name": "key", + "description": "Key to check", + "type": "String" + } + ], + "return": { + "description": "", + "type": "Boolean" + }, + "access": "private", + "tagname": "", + "class": "ApplicationInstance", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/-internals/owner/index.ts", + "line": 198, + "description": "Given a fullName return a corresponding instance.\n\nThe default behavior is for lookup to return a singleton instance.\nThe singleton is scoped to the container, allowing multiple containers\nto all have their own locally scoped singletons.\n\n```javascript\nlet registry = new Registry();\nlet container = registry.container();\n\nregistry.register('api:twitter', Twitter);\n\nlet twitter = container.lookup('api:twitter');\n\ntwitter instanceof Twitter; // => true\n\n// by default the container will return singletons\nlet twitter2 = container.lookup('api:twitter');\ntwitter2 instanceof Twitter; // => true\n\ntwitter === twitter2; //=> true\n```\n\nIf singletons are not wanted an optional flag can be provided at lookup.\n\n```javascript\nlet registry = new Registry();\nlet container = registry.container();\n\nregistry.register('api:twitter', Twitter);\n\nlet twitter = container.lookup('api:twitter', { singleton: false });\nlet twitter2 = container.lookup('api:twitter', { singleton: false });\n\ntwitter === twitter2; //=> false\n```", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "lookup", + "params": [ + { + "name": "fullName", + "description": "", + "type": "String" + }, + { + "name": "options", + "description": "", + "type": "RegisterOptions" + } + ], + "return": { + "description": "", + "type": "Any" + }, + "class": "ApplicationInstance", + "module": "@ember/owner", + "inherited": true, + "inheritedFrom": "BasicContainer" + }, + { + "file": "packages/@ember/-internals/owner/index.ts", + "line": 247, + "description": "Given a `FullName`, of the form `\"type:name\"` return a `FactoryManager`.\n\nThis method returns a manager which can be used for introspection of the\nfactory's class or for the creation of factory instances with initial\nproperties. The manager is an object with the following properties:\n\n* `class` - The registered or resolved class.\n* `create` - A function that will create an instance of the class with\n any dependencies injected.\n\nFor example:\n\n```javascript\nimport { getOwner } from '@ember/application';\n\nlet owner = getOwner(otherInstance);\n// the owner is commonly the `applicationInstance`, and can be accessed via\n// an instance initializer.\n\nlet factory = owner.factoryFor('service:bespoke');\n\nfactory.class;\n// The registered or resolved class. For example when used with an Ember-CLI\n// app, this would be the default export from `app/services/bespoke.js`.\n\nlet instance = factory.create({\n someProperty: 'an initial property value'\n});\n// Create an instance with any injections and the passed options as\n// initial properties.\n```\n\nAny instances created via the factory's `.create()` method *must* be destroyed\nmanually by the caller of `.create()`. Typically, this is done during the creating\nobjects own `destroy` or `willDestroy` methods.", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "factoryFor", + "params": [ + { + "name": "fullName", + "description": "", + "type": "String" + } + ], + "return": { + "description": "", + "type": "FactoryManager" + }, + "class": "ApplicationInstance", + "module": "@ember/owner", + "inherited": true, + "inheritedFrom": "BasicContainer" + }, + { + "file": "packages/@ember/-internals/owner/index.ts", + "line": 107, + "description": "Registers a factory that can be used for dependency injection (with\n`inject`) or for service lookup. Each factory is registered with\na full name including two parts: `type:name`.\n\nA simple example:\n\n```javascript\nimport Application from '@ember/application';\nimport EmberObject from '@ember/object';\n\nlet App = Application.create();\n\nApp.Orange = EmberObject.extend();\nApp.register('fruit:favorite', App.Orange);\n```\n\nEmber will resolve factories from the `App` namespace automatically.\nFor example `App.CarsController` will be discovered and returned if\nan application requests `controller:cars`.\n\nAn example of registering a controller with a non-standard name:\n\n```javascript\nimport Application from '@ember/application';\nimport Controller from '@ember/controller';\n\nlet App = Application.create();\nlet Session = Controller.extend();\n\nApp.register('controller:session', Session);\n\n// The Session controller can now be treated like a normal controller,\n// despite its non-standard name.\nApp.ApplicationController = Controller.extend({\n needs: ['session']\n});\n```\n\nRegistered factories are **instantiated** by having `create`\ncalled on them. Additionally they are **singletons**, each time\nthey are looked up they return the same instance.\n\nSome examples modifying that default behavior:\n\n```javascript\nimport Application from '@ember/application';\nimport EmberObject from '@ember/object';\n\nlet App = Application.create();\n\nApp.Person = EmberObject.extend();\nApp.Orange = EmberObject.extend();\nApp.Email = EmberObject.extend();\nApp.session = EmberObject.create();\n\nApp.register('model:user', App.Person, { singleton: false });\nApp.register('fruit:favorite', App.Orange);\nApp.register('communication:main', App.Email, { singleton: false });\nApp.register('session', App.session, { instantiate: false });\n```", + "itemtype": "method", + "name": "register", + "params": [ + { + "name": "fullName", + "description": "type:name (e.g., 'model:user')", + "type": "String" + }, + { + "name": "factory", + "description": "(e.g., App.Person)", + "type": "Factory|object" + }, + { + "name": "options", + "description": "(optional) disable instantiation or singleton usage", + "type": "Object" + } + ], + "access": "public", + "tagname": "", + "class": "ApplicationInstance", + "module": "@ember/owner", + "inherited": true, + "inheritedFrom": "BasicRegistry" + } + ], + "events": [], + "properties": [ + { + "file": "packages/@ember/application/instance.ts", + "line": 45, + "description": "The `Application` for which this is an instance.", + "itemtype": "property", + "name": "application", + "type": "Application", + "access": "private", + "tagname": "", + "class": "ApplicationInstance", + "module": "@ember/application" + }, + { + "file": "packages/@ember/application/instance.ts", + "line": 53, + "description": "The root DOM element of the Application as an element or a\nCSS selector.", + "access": "private", + "tagname": "", + "itemtype": "property", + "name": "rootElement", + "type": "String|DOMElement", + "class": "ApplicationInstance", + "module": "@ember/application" + }, + { + "file": "packages/@ember/engine/instance.ts", + "line": 67, + "description": "The base `Engine` for which this is an instance.", + "itemtype": "property", + "name": "engine", + "type": "Engine", + "access": "private", + "tagname": "", + "class": "ApplicationInstance", + "module": "@ember/engine", + "inherited": true, + "inheritedFrom": "EngineInstance" + }, + { + "file": "packages/@ember/-internals/runtime/lib/mixins/container_proxy.ts", + "line": 25, + "description": "The container stores state.", + "access": "private", + "tagname": "", + "itemtype": "property", + "name": "__container__", + "type": "Ember.Container", + "class": "ApplicationInstance", + "module": "ember", + "inherited": true, + "inheritedFrom": "ContainerProxyMixin" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 355, + "description": "Defines the properties that will be concatenated from the superclass\n(instead of overridden).\n\nBy default, when you extend an Ember class a property defined in\nthe subclass overrides a property with the same name that is defined\nin the superclass. However, there are some cases where it is preferable\nto build up a property's value by combining the superclass' property\nvalue with the subclass' value. An example of this in use within Ember\nis the `classNames` property of `Component` from `@ember/component`.\n\nHere is some sample code showing the difference between a concatenated\nproperty and a normal one:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Bar = EmberObject.extend({\n // Configure which properties to concatenate\n concatenatedProperties: ['concatenatedProperty'],\n\n someNonConcatenatedProperty: ['bar'],\n concatenatedProperty: ['bar']\n});\n\nconst FooBar = Bar.extend({\n someNonConcatenatedProperty: ['foo'],\n concatenatedProperty: ['foo']\n});\n\nlet fooBar = FooBar.create();\nfooBar.get('someNonConcatenatedProperty'); // ['foo']\nfooBar.get('concatenatedProperty'); // ['bar', 'foo']\n```\n\nThis behavior extends to object creation as well. Continuing the\nabove example:\n\n```javascript\nlet fooBar = FooBar.create({\n someNonConcatenatedProperty: ['baz'],\n concatenatedProperty: ['baz']\n})\nfooBar.get('someNonConcatenatedProperty'); // ['baz']\nfooBar.get('concatenatedProperty'); // ['bar', 'foo', 'baz']\n```\n\nAdding a single property that is not an array will just add it in the array:\n\n```javascript\nlet fooBar = FooBar.create({\n concatenatedProperty: 'baz'\n})\nview.get('concatenatedProperty'); // ['bar', 'foo', 'baz']\n```\n\nUsing the `concatenatedProperties` property, we can tell Ember to mix the\ncontent of the properties.\n\nIn `Component` the `classNames`, `classNameBindings` and\n`attributeBindings` properties are concatenated.\n\nThis feature is available for you to use throughout the Ember object model,\nalthough typical app developers are likely to use it infrequently. Since\nit changes expectations about behavior of properties, you should properly\ndocument its usage in each individual concatenated property (to not\nmislead your users to think they can override the property in a subclass).", + "itemtype": "property", + "name": "concatenatedProperties", + "type": "Array", + "default": "null", + "access": "public", + "tagname": "", + "class": "ApplicationInstance", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 429, + "description": "Defines the properties that will be merged from the superclass\n(instead of overridden).\n\nBy default, when you extend an Ember class a property defined in\nthe subclass overrides a property with the same name that is defined\nin the superclass. However, there are some cases where it is preferable\nto build up a property's value by merging the superclass property value\nwith the subclass property's value. An example of this in use within Ember\nis the `queryParams` property of routes.\n\nHere is some sample code showing the difference between a merged\nproperty and a normal one:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Bar = EmberObject.extend({\n // Configure which properties are to be merged\n mergedProperties: ['mergedProperty'],\n\n someNonMergedProperty: {\n nonMerged: 'superclass value of nonMerged'\n },\n mergedProperty: {\n page: { replace: false },\n limit: { replace: true }\n }\n});\n\nconst FooBar = Bar.extend({\n someNonMergedProperty: {\n completelyNonMerged: 'subclass value of nonMerged'\n },\n mergedProperty: {\n limit: { replace: false }\n }\n});\n\nlet fooBar = FooBar.create();\n\nfooBar.get('someNonMergedProperty');\n// => { completelyNonMerged: 'subclass value of nonMerged' }\n//\n// Note the entire object, including the nonMerged property of\n// the superclass object, has been replaced\n\nfooBar.get('mergedProperty');\n// => {\n// page: {replace: false},\n// limit: {replace: false}\n// }\n//\n// Note the page remains from the superclass, and the\n// `limit` property's value of `false` has been merged from\n// the subclass.\n```\n\nThis behavior is not available during object `create` calls. It is only\navailable at `extend` time.\n\nIn `Route` the `queryParams` property is merged.\n\nThis feature is available for you to use throughout the Ember object model,\nalthough typical app developers are likely to use it infrequently. Since\nit changes expectations about behavior of properties, you should properly\ndocument its usage in each individual merged property (to not\nmislead your users to think they can override the property in a subclass).", + "itemtype": "property", + "name": "mergedProperties", + "type": "Array", + "default": "null", + "access": "public", + "tagname": "", + "class": "ApplicationInstance", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 504, + "description": "Destroyed object property flag.\n\nif this property is `true` the observers and bindings were already\nremoved by the effect of calling the `destroy()` method.", + "itemtype": "property", + "name": "isDestroyed", + "default": "false", + "access": "public", + "tagname": "", + "class": "ApplicationInstance", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 522, + "description": "Destruction scheduled flag. The `destroy()` method has been called.\n\nThe object stays intact until the end of the run loop at which point\nthe `isDestroyed` flag is set.", + "itemtype": "property", + "name": "isDestroying", + "default": "false", + "access": "public", + "tagname": "", + "class": "ApplicationInstance", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + } + ] + }, + "relationships": { + "parent-class": { + "data": { + "id": "ember-5.12.0-EngineInstance", + "type": "class" + } + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/application", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-ArrayProxy.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-ArrayProxy.json new file mode 100644 index 000000000..c78c6cf92 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-ArrayProxy.json @@ -0,0 +1,1834 @@ +{ + "data": { + "id": "ember-5.12.0-ArrayProxy", + "type": "class", + "attributes": { + "name": "ArrayProxy", + "shortname": "ArrayProxy", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/array/proxy", + "namespace": "", + "file": "packages/@ember/array/proxy.ts", + "line": 59, + "description": "An ArrayProxy wraps any other object that implements `Array` and/or\n`MutableArray,` forwarding all requests. This makes it very useful for\na number of binding use cases or other cases where being able to swap\nout the underlying array is useful.\n\nA simple example of usage:\n\n```javascript\nimport { A } from '@ember/array';\nimport ArrayProxy from '@ember/array/proxy';\n\nlet pets = ['dog', 'cat', 'fish'];\nlet ap = ArrayProxy.create({ content: A(pets) });\n\nap.get('firstObject'); // 'dog'\nap.set('content', ['amoeba', 'paramecium']);\nap.get('firstObject'); // 'amoeba'\n```\n\nThis class can also be useful as a layer to transform the contents of\nan array, as they are accessed. This can be done by overriding\n`objectAtContent`:\n\n```javascript\nimport { A } from '@ember/array';\nimport ArrayProxy from '@ember/array/proxy';\n\nlet pets = ['dog', 'cat', 'fish'];\nlet ap = ArrayProxy.create({\n content: A(pets),\n objectAtContent: function(idx) {\n return this.get('content').objectAt(idx).toUpperCase();\n }\n});\n\nap.get('firstObject'); // . 'DOG'\n```\n\nWhen overriding this class, it is important to place the call to\n`_super` *after* setting `content` so the internal observers have\na chance to fire properly:\n\n```javascript\nimport { A } from '@ember/array';\nimport ArrayProxy from '@ember/array/proxy';\n\nexport default ArrayProxy.extend({\n init() {\n this.set('content', A(['dog', 'cat', 'fish']));\n this._super(...arguments);\n }\n});\n```", + "extends": "EmberObject", + "uses": [ + "MutableArray" + ], + "access": "public", + "tagname": "", + "methods": [ + { + "file": "packages/@ember/array/proxy.ts", + "line": 138, + "description": "Should actually retrieve the object at the specified index from the\ncontent. You can override this method in subclasses to transform the\ncontent item to something new.\n\nThis method will only be called if content is non-`null`.", + "itemtype": "method", + "name": "objectAtContent", + "params": [ + { + "name": "idx", + "description": "The index to retrieve.", + "type": "Number" + } + ], + "return": { + "description": "the value or undefined if none found", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array/proxy" + }, + { + "file": "packages/@ember/array/proxy.ts", + "line": 151, + "description": "Should actually replace the specified objects on the content array.\nYou can override this method in subclasses to transform the content item\ninto something new.\n\nThis method will only be called if content is non-`null`.", + "itemtype": "method", + "name": "replaceContent", + "params": [ + { + "name": "idx", + "description": "The starting index", + "type": "Number" + }, + { + "name": "amt", + "description": "The number of items to remove from the content.", + "type": "Number" + }, + { + "name": "objects", + "description": "Optional array of objects to insert.", + "type": "Array" + } + ], + "return": { + "description": "", + "type": "Void" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array/proxy" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1484, + "description": "__Required.__ You must implement this method to apply this mixin.\n\nThis is one of the primitives you must implement to support `Array`.\nYou should replace amt objects started at idx with the objects in the\npassed array.\n\nNote that this method is expected to validate the type(s) of objects that it expects.", + "itemtype": "method", + "name": "replace", + "params": [ + { + "name": "idx", + "description": "Starting index in the array to replace. If\n idx >= length, then append to the end of the array.", + "type": "Number" + }, + { + "name": "amt", + "description": "Number of elements that should be removed from\n the array, starting at *idx*.", + "type": "Number" + }, + { + "name": "objects", + "description": "An optional array of zero or more objects that should be\n inserted into the array at *idx*", + "type": "EmberArray", + "optional": true + } + ], + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "MutableArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1503, + "description": "Remove all elements from the array. This is useful if you\nwant to reuse an existing array without having to recreate it.\n\n```javascript\nlet colors = ['red', 'green', 'blue'];\n\ncolors.length; // 3\ncolors.clear(); // []\ncolors.length; // 0\n```", + "itemtype": "method", + "name": "clear", + "return": { + "description": "An empty Array.", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "MutableArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1520, + "description": "This will use the primitive `replace()` method to insert an object at the\nspecified index.\n\n```javascript\nlet colors = ['red', 'green', 'blue'];\n\ncolors.insertAt(2, 'yellow'); // ['red', 'green', 'yellow', 'blue']\ncolors.insertAt(5, 'orange'); // Error: Index out of range\n```", + "itemtype": "method", + "name": "insertAt", + "params": [ + { + "name": "idx", + "description": "index of insert the object at.", + "type": "Number" + }, + { + "name": "object", + "description": "object to insert", + "type": "Object" + } + ], + "return": { + "description": "receiver", + "type": "EmberArray" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "MutableArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1538, + "description": "Remove an object at the specified index using the `replace()` primitive\nmethod. You can pass either a single index, or a start and a length.\n\nIf you pass a start and length that is beyond the\nlength this method will throw an assertion.\n\n```javascript\nlet colors = ['red', 'green', 'blue', 'yellow', 'orange'];\n\ncolors.removeAt(0); // ['green', 'blue', 'yellow', 'orange']\ncolors.removeAt(2, 2); // ['green', 'blue']\ncolors.removeAt(4, 2); // Error: Index out of range\n```", + "itemtype": "method", + "name": "removeAt", + "params": [ + { + "name": "start", + "description": "index, start of range", + "type": "Number" + }, + { + "name": "len", + "description": "length of passing range", + "type": "Number" + } + ], + "return": { + "description": "receiver", + "type": "EmberArray" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "MutableArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1560, + "description": "Push the object onto the end of the array. Works just like `push()` but it\nis KVO-compliant.\n\n```javascript\nlet colors = ['red', 'green'];\n\ncolors.pushObject('black'); // ['red', 'green', 'black']\ncolors.pushObject(['yellow']); // ['red', 'green', ['yellow']]\n```", + "itemtype": "method", + "name": "pushObject", + "params": [ + { + "name": "obj", + "description": "object to push", + "type": "*" + } + ], + "return": { + "description": "object same object passed as a param" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "MutableArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1577, + "description": "Add the objects in the passed array to the end of the array. Defers\nnotifying observers of the change until all objects are added.\n\n```javascript\nlet colors = ['red'];\n\ncolors.pushObjects(['yellow', 'orange']); // ['red', 'yellow', 'orange']\n```", + "itemtype": "method", + "name": "pushObjects", + "params": [ + { + "name": "objects", + "description": "the objects to add", + "type": "Array" + } + ], + "return": { + "description": "receiver", + "type": "MutableArray" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "MutableArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1593, + "description": "Pop object from array or nil if none are left. Works just like `pop()` but\nit is KVO-compliant.\n\n```javascript\nlet colors = ['red', 'green', 'blue'];\n\ncolors.popObject(); // 'blue'\nconsole.log(colors); // ['red', 'green']\n```", + "itemtype": "method", + "name": "popObject", + "return": { + "description": "object" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "MutableArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1609, + "description": "Shift an object from start of array or nil if none are left. Works just\nlike `shift()` but it is KVO-compliant.\n\n```javascript\nlet colors = ['red', 'green', 'blue'];\n\ncolors.shiftObject(); // 'red'\nconsole.log(colors); // ['green', 'blue']\n```", + "itemtype": "method", + "name": "shiftObject", + "return": { + "description": "object" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "MutableArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1625, + "description": "Unshift an object to start of array. Works just like `unshift()` but it is\nKVO-compliant.\n\n```javascript\nlet colors = ['red'];\n\ncolors.unshiftObject('yellow'); // ['yellow', 'red']\ncolors.unshiftObject(['black']); // [['black'], 'yellow', 'red']\n```", + "itemtype": "method", + "name": "unshiftObject", + "params": [ + { + "name": "obj", + "description": "object to unshift", + "type": "*" + } + ], + "return": { + "description": "object same object passed as a param" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "MutableArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1642, + "description": "Adds the named objects to the beginning of the array. Defers notifying\nobservers until all objects have been added.\n\n```javascript\nlet colors = ['red'];\n\ncolors.unshiftObjects(['black', 'white']); // ['black', 'white', 'red']\ncolors.unshiftObjects('yellow'); // Type Error: 'undefined' is not a function\n```", + "itemtype": "method", + "name": "unshiftObjects", + "params": [ + { + "name": "objects", + "description": "the objects to add", + "type": "Enumerable" + } + ], + "return": { + "description": "receiver", + "type": "EmberArray" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "MutableArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1659, + "description": "Reverse objects in the array. Works just like `reverse()` but it is\nKVO-compliant.", + "itemtype": "method", + "name": "reverseObjects", + "return": { + "description": "receiver", + "type": "EmberArray" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "MutableArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1668, + "description": "Replace all the receiver's content with content of the argument.\nIf argument is an empty array receiver will be cleared.\n\n```javascript\nlet colors = ['red', 'green', 'blue'];\n\ncolors.setObjects(['black', 'white']); // ['black', 'white']\ncolors.setObjects([]); // []\n```", + "itemtype": "method", + "name": "setObjects", + "params": [ + { + "name": "objects", + "description": "array whose content will be used for replacing\n the content of the receiver", + "type": "EmberArray" + } + ], + "return": { + "description": "receiver with the new content", + "type": "EmberArray" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "MutableArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1686, + "description": "Remove all occurrences of an object in the array.\n\n```javascript\nlet cities = ['Chicago', 'Berlin', 'Lima', 'Chicago'];\n\ncities.removeObject('Chicago'); // ['Berlin', 'Lima']\ncities.removeObject('Lima'); // ['Berlin']\ncities.removeObject('Tokyo') // ['Berlin']\n```", + "itemtype": "method", + "name": "removeObject", + "params": [ + { + "name": "obj", + "description": "object to remove", + "type": "*" + } + ], + "return": { + "description": "receiver", + "type": "EmberArray" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "MutableArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1703, + "description": "Removes each object in the passed array from the receiver.", + "itemtype": "method", + "name": "removeObjects", + "params": [ + { + "name": "objects", + "description": "the objects to remove", + "type": "EmberArray" + } + ], + "return": { + "description": "receiver", + "type": "EmberArray" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "MutableArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1712, + "description": "Push the object onto the end of the array if it is not already\npresent in the array.\n\n```javascript\nlet cities = ['Chicago', 'Berlin'];\n\ncities.addObject('Lima'); // ['Chicago', 'Berlin', 'Lima']\ncities.addObject('Berlin'); // ['Chicago', 'Berlin', 'Lima']\n```", + "itemtype": "method", + "name": "addObject", + "params": [ + { + "name": "obj", + "description": "object to add, if not already present", + "type": "*" + } + ], + "return": { + "description": "receiver", + "type": "EmberArray" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "MutableArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1729, + "description": "Adds each object in the passed array to the receiver.", + "itemtype": "method", + "name": "addObjects", + "params": [ + { + "name": "objects", + "description": "the objects to add.", + "type": "EmberArray" + } + ], + "return": { + "description": "receiver", + "type": "EmberArray" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "MutableArray" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 321, + "description": "An overridable method called when objects are instantiated. By default,\ndoes nothing unless it is overridden during class definition.\n\nExample:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Person = EmberObject.extend({\n init() {\n alert(`Name is ${this.get('name')}`);\n }\n});\n\nlet steve = Person.create({\n name: 'Steve'\n});\n\n// alerts 'Name is Steve'.\n```\n\nNOTE: If you do override `init` for a framework class like `Component`\nfrom `@ember/component`, be sure to call `this._super(...arguments)`\nin your `init` declaration!\nIf you don't, Ember may not have an opportunity to\ndo important setup work, and you'll see strange behavior in your\napplication.", + "itemtype": "method", + "name": "init", + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 540, + "description": "Destroys an object by setting the `isDestroyed` flag and removing its\nmetadata, which effectively destroys observers and bindings.\n\nIf you try to set a property on a destroyed object, an exception will be\nraised.\n\nNote that destruction is scheduled for the end of the run loop and does not\nhappen immediately. It will set an isDestroying flag immediately.", + "itemtype": "method", + "name": "destroy", + "return": { + "description": "receiver", + "type": "EmberObject" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 567, + "description": "Override to implement teardown.", + "itemtype": "method", + "name": "willDestroy", + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 575, + "description": "Returns a string representation which attempts to provide more information\nthan Javascript's `toString` typically does, in a generic way for all Ember\nobjects.\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Person = EmberObject.extend();\nperson = Person.create();\nperson.toString(); //=> \"\"\n```\n\nIf the object's class is not defined on an Ember namespace, it will\nindicate it is a subclass of the registered superclass:\n\n```javascript\nconst Student = Person.extend();\nlet student = Student.create();\nstudent.toString(); //=> \"<(subclass of Person):ember1025>\"\n```\n\nIf the method `toStringExtension` is defined, its return value will be\nincluded in the output.\n\n```javascript\nconst Teacher = Person.extend({\n toStringExtension() {\n return this.get('fullName');\n }\n});\nteacher = Teacher.create();\nteacher.toString(); //=> \"\"\n```", + "itemtype": "method", + "name": "toString", + "return": { + "description": "string representation", + "type": "String" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 97, + "description": "Retrieves the value of a property from the object.\n\nThis method is usually similar to using `object[keyName]` or `object.keyName`,\nhowever it supports both computed properties and the unknownProperty\nhandler.\n\nBecause `get` unifies the syntax for accessing all these kinds\nof properties, it can make many refactorings easier, such as replacing a\nsimple property with a computed property, or vice versa.\n\n### Computed Properties\n\nComputed properties are methods defined with the `property` modifier\ndeclared at the end, such as:\n\n```javascript\nimport { computed } from '@ember/object';\n\nfullName: computed('firstName', 'lastName', function() {\n return this.get('firstName') + ' ' + this.get('lastName');\n})\n```\n\nWhen you call `get` on a computed property, the function will be\ncalled and the return value will be returned instead of the function\nitself.\n\n### Unknown Properties\n\nLikewise, if you try to call `get` on a property whose value is\n`undefined`, the `unknownProperty()` method will be called on the object.\nIf this method returns any value other than `undefined`, it will be returned\ninstead. This allows you to implement \"virtual\" properties that are\nnot defined upfront.", + "itemtype": "method", + "name": "get", + "params": [ + { + "name": "keyName", + "description": "The property to retrieve", + "type": "String" + } + ], + "return": { + "description": "The property value or undefined.", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 141, + "description": "To get the values of multiple properties at once, call `getProperties`\nwith a list of strings or an array:\n\n```javascript\nrecord.getProperties('firstName', 'lastName', 'zipCode');\n// { firstName: 'John', lastName: 'Doe', zipCode: '10011' }\n```\n\nis equivalent to:\n\n```javascript\nrecord.getProperties(['firstName', 'lastName', 'zipCode']);\n// { firstName: 'John', lastName: 'Doe', zipCode: '10011' }\n```", + "itemtype": "method", + "name": "getProperties", + "params": [ + { + "name": "list", + "description": "of keys to get", + "type": "String...|Array" + } + ], + "return": { + "description": "", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 168, + "description": "Sets the provided key or path to the value.\n\n```javascript\nrecord.set(\"key\", value);\n```\n\nThis method is generally very similar to calling `object[\"key\"] = value` or\n`object.key = value`, except that it provides support for computed\nproperties, the `setUnknownProperty()` method and property observers.\n\n### Computed Properties\n\nIf you try to set a value on a key that has a computed property handler\ndefined (see the `get()` method for an example), then `set()` will call\nthat method, passing both the value and key instead of simply changing\nthe value itself. This is useful for those times when you need to\nimplement a property that is composed of one or more member\nproperties.\n\n### Unknown Properties\n\nIf you try to set a value on a key that is undefined in the target\nobject, then the `setUnknownProperty()` handler will be called instead. This\ngives you an opportunity to implement complex \"virtual\" properties that\nare not predefined on the object. If `setUnknownProperty()` returns\nundefined, then `set()` will simply set the value on the object.\n\n### Property Observers\n\nIn addition to changing the property, `set()` will also register a property\nchange with the object. Unless you have placed this call inside of a\n`beginPropertyChanges()` and `endPropertyChanges(),` any \"local\" observers\n(i.e. observer methods declared on the same object), will be called\nimmediately. Any \"remote\" observers (i.e. observer methods declared on\nanother object) will be placed in a queue and called at a later time in a\ncoalesced manner.", + "itemtype": "method", + "name": "set", + "params": [ + { + "name": "keyName", + "description": "The property to set", + "type": "String" + }, + { + "name": "value", + "description": "The value to set or `null`.", + "type": "Object" + } + ], + "return": { + "description": "The passed value", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 216, + "description": "Sets a list of properties at once. These properties are set inside\na single `beginPropertyChanges` and `endPropertyChanges` batch, so\nobservers will be buffered.\n\n```javascript\nrecord.setProperties({ firstName: 'Charles', lastName: 'Jolley' });\n```", + "itemtype": "method", + "name": "setProperties", + "params": [ + { + "name": "hash", + "description": "the hash of keys and values to set", + "type": "Object" + } + ], + "return": { + "description": "The passed in hash", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 233, + "description": "Convenience method to call `propertyWillChange` and `propertyDidChange` in\nsuccession.\n\nNotify the observer system that a property has just changed.\n\nSometimes you need to change a value directly or indirectly without\nactually calling `get()` or `set()` on it. In this case, you can use this\nmethod instead. Calling this method will notify all observers that the\nproperty has potentially changed value.", + "itemtype": "method", + "name": "notifyPropertyChange", + "params": [ + { + "name": "keyName", + "description": "The property key to be notified about.", + "type": "String" + } + ], + "return": { + "description": "", + "type": "Observable" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 251, + "description": "Adds an observer on a property.\n\nThis is the core method used to register an observer for a property.\n\nOnce you call this method, any time the key's value is set, your observer\nwill be notified. Note that the observers are triggered any time the\nvalue is set, regardless of whether it has actually changed. Your\nobserver should be prepared to handle that.\n\nThere are two common invocation patterns for `.addObserver()`:\n\n- Passing two arguments:\n - the name of the property to observe (as a string)\n - the function to invoke (an actual function)\n- Passing three arguments:\n - the name of the property to observe (as a string)\n - the target object (will be used to look up and invoke a\n function on)\n - the name of the function to invoke on the target object\n (as a string).\n\n```js {data-filename=app/components/my-component.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n init() {\n this._super(...arguments);\n\n // the following are equivalent:\n\n // using three arguments\n this.addObserver('foo', this, 'fooDidChange');\n\n // using two arguments\n this.addObserver('foo', (...args) => {\n this.fooDidChange(...args);\n });\n },\n\n fooDidChange() {\n // your custom logic code\n }\n});\n```\n\n### Observer Methods\n\nObserver methods have the following signature:\n\n```js {data-filename=app/components/my-component.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n init() {\n this._super(...arguments);\n this.addObserver('foo', this, 'fooDidChange');\n },\n\n fooDidChange(sender, key, value, rev) {\n // your code\n }\n});\n```\n\nThe `sender` is the object that changed. The `key` is the property that\nchanges. The `value` property is currently reserved and unused. The `rev`\nis the last property revision of the object when it changed, which you can\nuse to detect if the key value has really changed or not.\n\nUsually you will not need the value or revision parameters at\nthe end. In this case, it is common to write observer methods that take\nonly a sender and key value as parameters or, if you aren't interested in\nany of these values, to write an observer that has no parameters at all.", + "itemtype": "method", + "name": "addObserver", + "params": [ + { + "name": "key", + "description": "The key to observe", + "type": "String" + }, + { + "name": "target", + "description": "The target object to invoke", + "type": "Object" + }, + { + "name": "method", + "description": "The method to invoke", + "type": "String|Function" + }, + { + "name": "sync", + "description": "Whether the observer is sync or not", + "type": "Boolean" + } + ], + "return": { + "description": "", + "type": "Observable" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 337, + "description": "Remove an observer you have previously registered on this object. Pass\nthe same key, target, and method you passed to `addObserver()` and your\ntarget will no longer receive notifications.", + "itemtype": "method", + "name": "removeObserver", + "params": [ + { + "name": "key", + "description": "The key to observe", + "type": "String" + }, + { + "name": "target", + "description": "The target object to invoke", + "type": "Object" + }, + { + "name": "method", + "description": "The method to invoke", + "type": "String|Function" + }, + { + "name": "sync", + "description": "Whether the observer is async or not", + "type": "Boolean" + } + ], + "return": { + "description": "", + "type": "Observable" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 358, + "description": "Set the value of a property to the current value plus some amount.\n\n```javascript\nperson.incrementProperty('age');\nteam.incrementProperty('score', 2);\n```", + "itemtype": "method", + "name": "incrementProperty", + "params": [ + { + "name": "keyName", + "description": "The name of the property to increment", + "type": "String" + }, + { + "name": "increment", + "description": "The amount to increment by. Defaults to 1", + "type": "Number" + } + ], + "return": { + "description": "The new property value", + "type": "Number" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 375, + "description": "Set the value of a property to the current value minus some amount.\n\n```javascript\nplayer.decrementProperty('lives');\norc.decrementProperty('health', 5);\n```", + "itemtype": "method", + "name": "decrementProperty", + "params": [ + { + "name": "keyName", + "description": "The name of the property to decrement", + "type": "String" + }, + { + "name": "decrement", + "description": "The amount to decrement by. Defaults to 1", + "type": "Number" + } + ], + "return": { + "description": "The new property value", + "type": "Number" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 392, + "description": "Set the value of a boolean property to the opposite of its\ncurrent value.\n\n```javascript\nstarship.toggleProperty('warpDriveEngaged');\n```", + "itemtype": "method", + "name": "toggleProperty", + "params": [ + { + "name": "keyName", + "description": "The name of the property to toggle", + "type": "String" + } + ], + "return": { + "description": "The new property value", + "type": "Boolean" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 407, + "description": "Returns the cached value of a computed property, if it exists.\nThis allows you to inspect the value of a computed property\nwithout accidentally invoking it if it is intended to be\ngenerated lazily.", + "itemtype": "method", + "name": "cacheFor", + "params": [ + { + "name": "keyName", + "description": "", + "type": "String" + } + ], + "return": { + "description": "The cached value of the computed property, if any", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 437, + "description": "Begins a grouping of property changes.\n\nYou can use this method to group property changes so that notifications\nwill not be sent until the changes are finished. If you plan to make a\nlarge number of changes to an object at one time, you should call this\nmethod at the beginning of the changes to begin deferring change\nnotifications. When you are done making changes, call\n`endPropertyChanges()` to deliver the deferred change notifications and end\ndeferring.", + "itemtype": "method", + "name": "beginPropertyChanges", + "return": { + "description": "", + "type": "Observable" + }, + "access": "private", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 457, + "description": "Ends a grouping of property changes.\n\nYou can use this method to group property changes so that notifications\nwill not be sent until the changes are finished. If you plan to make a\nlarge number of changes to an object at one time, you should call\n`beginPropertyChanges()` at the beginning of the changes to defer change\nnotifications. When you are done making changes, call this method to\ndeliver the deferred change notifications and end deferring.", + "itemtype": "method", + "name": "endPropertyChanges", + "return": { + "description": "", + "type": "Observable" + }, + "access": "private", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 501, + "description": "Returns `true` if the object currently has observers registered for a\nparticular key. You can use this method to potentially defer performing\nan expensive action until someone begins observing a particular property\non the object.", + "itemtype": "method", + "name": "hasObserverFor", + "params": [ + { + "name": "key", + "description": "Key to check", + "type": "String" + } + ], + "return": { + "description": "", + "type": "Boolean" + }, + "access": "private", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 263, + "description": "Returns the object at the given `index`. If the given `index` is negative\nor is greater or equal than the array length, returns `undefined`.\n\nThis is one of the primitives you must implement to support `EmberArray`.\nIf your object supports retrieving the value of an array item using `get()`\n(i.e. `myArray.get(0)`), then you do not need to implement this method\nyourself.\n\n```javascript\nlet arr = ['a', 'b', 'c', 'd'];\n\narr.objectAt(0); // 'a'\narr.objectAt(3); // 'd'\narr.objectAt(-1); // undefined\narr.objectAt(4); // undefined\narr.objectAt(5); // undefined\n```", + "itemtype": "method", + "name": "objectAt", + "params": [ + { + "name": "idx", + "description": "The index of the item to return.", + "type": "Number" + } + ], + "return": { + "description": "item at index or undefined", + "type": "*" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 288, + "description": "This returns the objects at the specified indexes, using `objectAt`.\n\n```javascript\nlet arr = ['a', 'b', 'c', 'd'];\n\narr.objectsAt([0, 1, 2]); // ['a', 'b', 'c']\narr.objectsAt([2, 3, 4]); // ['c', 'd', undefined]\n```", + "itemtype": "method", + "name": "objectsAt", + "params": [ + { + "name": "indexes", + "description": "An array of indexes of items to return.", + "type": "Array" + } + ], + "return": { + "description": "", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 354, + "description": "Returns a new array that is a slice of the receiver. This implementation\nuses the observable array methods to retrieve the objects for the new\nslice.\n\n```javascript\nlet arr = ['red', 'green', 'blue'];\n\narr.slice(0); // ['red', 'green', 'blue']\narr.slice(0, 2); // ['red', 'green']\narr.slice(1, 100); // ['green', 'blue']\n```", + "itemtype": "method", + "name": "slice", + "params": [ + { + "name": "beginIndex", + "description": "(Optional) index to begin slicing from.", + "type": "Number" + }, + { + "name": "endIndex", + "description": "(Optional) index to end the slice at (but not included).", + "type": "Number" + } + ], + "return": { + "description": "New array with specified slice", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 374, + "description": "Used to determine the passed object's first occurrence in the array.\nReturns the index if found, -1 if no match is found.\n\nThe optional `startAt` argument can be used to pass a starting\nindex to search from, effectively slicing the searchable portion\nof the array. If it's negative it will add the array length to\nthe startAt value passed in as the index to search from. If less\nthan or equal to `-1 * array.length` the entire array is searched.\n\n```javascript\nlet arr = ['a', 'b', 'c', 'd', 'a'];\n\narr.indexOf('a'); // 0\narr.indexOf('z'); // -1\narr.indexOf('a', 2); // 4\narr.indexOf('a', -1); // 4, equivalent to indexOf('a', 4)\narr.indexOf('a', -100); // 0, searches entire array\narr.indexOf('b', 3); // -1\narr.indexOf('a', 100); // -1\n\nlet people = [{ name: 'Zoey' }, { name: 'Bob' }]\nlet newPerson = { name: 'Tom' };\npeople = [newPerson, ...people, newPerson];\n\npeople.indexOf(newPerson); // 0\npeople.indexOf(newPerson, 1); // 3\npeople.indexOf(newPerson, -4); // 0\npeople.indexOf(newPerson, 10); // -1\n```", + "itemtype": "method", + "name": "indexOf", + "params": [ + { + "name": "object", + "description": "the item to search for", + "type": "Object" + }, + { + "name": "startAt", + "description": "optional starting location to search, default 0", + "type": "Number" + } + ], + "return": { + "description": "index or -1 if not found", + "type": "Number" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 412, + "description": "Returns the index of the given `object`'s last occurrence.\n\n- If no `startAt` argument is given, the search starts from\nthe last position.\n- If it's greater than or equal to the length of the array,\nthe search starts from the last position.\n- If it's negative, it is taken as the offset from the end\nof the array i.e. `startAt + array.length`.\n- If it's any other positive number, will search backwards\nfrom that index of the array.\n\nReturns -1 if no match is found.\n\n```javascript\nlet arr = ['a', 'b', 'c', 'd', 'a'];\n\narr.lastIndexOf('a'); // 4\narr.lastIndexOf('z'); // -1\narr.lastIndexOf('a', 2); // 0\narr.lastIndexOf('a', -1); // 4\narr.lastIndexOf('a', -3); // 0\narr.lastIndexOf('b', 3); // 1\narr.lastIndexOf('a', 100); // 4\n```", + "itemtype": "method", + "name": "lastIndexOf", + "params": [ + { + "name": "object", + "description": "the item to search for", + "type": "Object" + }, + { + "name": "startAt", + "description": "optional starting location to search from\nbackwards, defaults to `(array.length - 1)`", + "type": "Number" + } + ], + "return": { + "description": "The last index of the `object` in the array or -1\nif not found", + "type": "Number" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 447, + "description": "Iterates through the array, calling the passed function on each\nitem. This method corresponds to the `forEach()` method defined in\nJavaScript 1.6.\n\nThe callback method you provide should have the following signature (all\nparameters are optional):\n\n```javascript\nfunction(item, index, array);\n```\n\n- `item` is the current item in the iteration.\n- `index` is the current index in the iteration.\n- `array` is the array itself.\n\nNote that in addition to a callback, you can also pass an optional target\nobject that will be set as `this` on the context. This is a good way\nto give your iterator function access to the current object.\n\nExample Usage:\n\n```javascript\nlet foods = [\n { name: 'apple', eaten: false },\n { name: 'banana', eaten: false },\n { name: 'carrot', eaten: false }\n];\n\nfoods.forEach((food) => food.eaten = true);\n\nlet output = '';\nfoods.forEach((item, index, array) =>\n output += `${index + 1}/${array.length} ${item.name}\\n`;\n);\nconsole.log(output);\n// 1/3 apple\n// 2/3 banana\n// 3/3 carrot\n```", + "itemtype": "method", + "name": "forEach", + "params": [ + { + "name": "callback", + "description": "The callback to execute", + "type": "Function" + }, + { + "name": "target", + "description": "The target object to use", + "type": "Object", + "optional": true + } + ], + "return": { + "description": "receiver", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 498, + "description": "Alias for `mapBy`.\n\nReturns the value of the named\nproperty on all items in the enumeration.\n\n```javascript\nlet people = [{name: 'Joe'}, {name: 'Matt'}];\n\npeople.getEach('name');\n// ['Joe', 'Matt'];\n\npeople.getEach('nonexistentProperty');\n// [undefined, undefined];\n```", + "itemtype": "method", + "name": "getEach", + "params": [ + { + "name": "key", + "description": "name of the property", + "type": "String" + } + ], + "return": { + "description": "The mapped array.", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 520, + "description": "Sets the value on the named property for each member. This is more\nergonomic than using other methods defined on this helper. If the object\nimplements Observable, the value will be changed to `set(),` otherwise\nit will be set directly. `null` objects are skipped.\n\n```javascript\nlet people = [{name: 'Joe'}, {name: 'Matt'}];\n\npeople.setEach('zipCode', '10011');\n// [{name: 'Joe', zipCode: '10011'}, {name: 'Matt', zipCode: '10011'}];\n```", + "itemtype": "method", + "name": "setEach", + "params": [ + { + "name": "key", + "description": "The key to set", + "type": "String" + }, + { + "name": "value", + "description": "The object to set", + "type": "Object" + } + ], + "return": { + "description": "receiver", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 540, + "description": "Maps all of the items in the enumeration to another value, returning\na new array. This method corresponds to `map()` defined in JavaScript 1.6.\n\nThe callback method you provide should have the following signature (all\nparameters are optional):\n\n```javascript\nfunction(item, index, array);\nlet arr = [1, 2, 3, 4, 5, 6];\n\narr.map(element => element * element);\n// [1, 4, 9, 16, 25, 36];\n\narr.map((element, index) => element + index);\n// [1, 3, 5, 7, 9, 11];\n```\n\n- `item` is the current item in the iteration.\n- `index` is the current index in the iteration.\n- `array` is the array itself.\n\nIt should return the mapped value.\n\nNote that in addition to a callback, you can also pass an optional target\nobject that will be set as `this` on the context. This is a good way\nto give your iterator function access to the current object.", + "itemtype": "method", + "name": "map", + "params": [ + { + "name": "callback", + "description": "The callback to execute", + "type": "Function" + }, + { + "name": "target", + "description": "The target object to use", + "type": "Object", + "optional": true + } + ], + "return": { + "description": "The mapped array.", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 578, + "description": "Similar to map, this specialized function returns the value of the named\nproperty on all items in the enumeration.\n\n```javascript\nlet people = [{name: 'Joe'}, {name: 'Matt'}];\n\npeople.mapBy('name');\n// ['Joe', 'Matt'];\n\npeople.mapBy('unknownProperty');\n// [undefined, undefined];\n```", + "itemtype": "method", + "name": "mapBy", + "params": [ + { + "name": "key", + "description": "name of the property", + "type": "String" + } + ], + "return": { + "description": "The mapped array.", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 599, + "description": "Returns a new array with all of the items in the enumeration that the provided\ncallback function returns true for. This method corresponds to [Array.prototype.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).\n\nThe callback method should have the following signature:\n\n```javascript\nfunction(item, index, array);\n```\n\n- `item` is the current item in the iteration.\n- `index` is the current index in the iteration.\n- `array` is the array itself.\n\nAll parameters are optional. The function should return `true` to include the item\nin the results, and `false` otherwise.\n\nExample:\n\n```javascript\nfunction isAdult(person) {\n return person.age > 18;\n};\n\nlet people = Ember.A([{ name: 'John', age: 14 }, { name: 'Joan', age: 45 }]);\n\npeople.filter(isAdult); // returns [{ name: 'Joan', age: 45 }];\n```\n\nNote that in addition to a callback, you can pass an optional target object\nthat will be set as `this` on the context. This is a good way to give your\niterator function access to the current object. For example:\n\n```javascript\nfunction isAdultAndEngineer(person) {\n return person.age > 18 && this.engineering;\n}\n\nclass AdultsCollection {\n engineering = false;\n\n constructor(opts = {}) {\n super(...arguments);\n\n this.engineering = opts.engineering;\n this.people = Ember.A([{ name: 'John', age: 14 }, { name: 'Joan', age: 45 }]);\n }\n}\n\nlet collection = new AdultsCollection({ engineering: true });\ncollection.people.filter(isAdultAndEngineer, { target: collection });\n```", + "itemtype": "method", + "name": "filter", + "params": [ + { + "name": "callback", + "description": "The callback to execute", + "type": "Function" + }, + { + "name": "target", + "description": "The target object to use", + "type": "Object", + "optional": true + } + ], + "return": { + "description": "A filtered array.", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 662, + "description": "Returns an array with all of the items in the enumeration where the passed\nfunction returns false. This method is the inverse of filter().\n\nThe callback method you provide should have the following signature (all\nparameters are optional):\n\n```javascript\nfunction(item, index, array);\n```\n\n- *item* is the current item in the iteration.\n- *index* is the current index in the iteration\n- *array* is the array itself.\n\nIt should return a falsey value to include the item in the results.\n\nNote that in addition to a callback, you can also pass an optional target\nobject that will be set as \"this\" on the context. This is a good way\nto give your iterator function access to the current object.\n\nExample Usage:\n\n```javascript\nconst food = [\n { food: 'apple', isFruit: true },\n { food: 'bread', isFruit: false },\n { food: 'banana', isFruit: true }\n];\nconst nonFruits = food.reject(function(thing) {\n return thing.isFruit;\n}); // [{food: 'bread', isFruit: false}]\n```", + "itemtype": "method", + "name": "reject", + "params": [ + { + "name": "callback", + "description": "The callback to execute", + "type": "Function" + }, + { + "name": "target", + "description": "The target object to use", + "type": "Object", + "optional": true + } + ], + "return": { + "description": "A rejected array.", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 706, + "description": "Filters the array by the property and an optional value. If a value is given, it returns\nthe items that have said value for the property. If not, it returns all the items that\nhave a truthy value for the property.\n\nExample Usage:\n\n```javascript\nlet things = Ember.A([{ food: 'apple', isFruit: true }, { food: 'beans', isFruit: false }]);\n\nthings.filterBy('food', 'beans'); // [{ food: 'beans', isFruit: false }]\nthings.filterBy('isFruit'); // [{ food: 'apple', isFruit: true }]\n```", + "itemtype": "method", + "name": "filterBy", + "params": [ + { + "name": "key", + "description": "the property to test", + "type": "String" + }, + { + "name": "value", + "description": "optional value to test against.", + "type": "*", + "optional": true + } + ], + "return": { + "description": "filtered array", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 727, + "description": "Returns an array with the items that do not have truthy values for the provided key.\nYou can pass an optional second argument with a target value to reject for the key.\nOtherwise this will reject objects where the provided property evaluates to false.\n\nExample Usage:\n\n```javascript\n let food = [\n { name: \"apple\", isFruit: true },\n { name: \"carrot\", isFruit: false },\n { name: \"bread\", isFruit: false },\n ];\n food.rejectBy('isFruit'); // [{ name: \"carrot\", isFruit: false }, { name: \"bread\", isFruit: false }]\n food.rejectBy('name', 'carrot'); // [{ name: \"apple\", isFruit: true }}, { name: \"bread\", isFruit: false }]\n```", + "itemtype": "method", + "name": "rejectBy", + "params": [ + { + "name": "key", + "description": "the property to test", + "type": "String" + }, + { + "name": "value", + "description": "optional value to test against.", + "type": "*", + "optional": true + } + ], + "return": { + "description": "rejected array", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 751, + "description": "Returns the first item in the array for which the callback returns true.\nThis method is similar to the `find()` method defined in ECMAScript 2015.\n\nThe callback method you provide should have the following signature (all\nparameters are optional):\n\n```javascript\nfunction(item, index, array);\n```\n\n- `item` is the current item in the iteration.\n- `index` is the current index in the iteration.\n- `array` is the array itself.\n\nIt should return the `true` to include the item in the results, `false`\notherwise.\n\nNote that in addition to a callback, you can also pass an optional target\nobject that will be set as `this` on the context. This is a good way\nto give your iterator function access to the current object.\n\nExample Usage:\n\n```javascript\nlet users = [\n { id: 1, name: 'Yehuda' },\n { id: 2, name: 'Tom' },\n { id: 3, name: 'Melanie' },\n { id: 4, name: 'Leah' }\n];\n\nusers.find((user) => user.name == 'Tom'); // [{ id: 2, name: 'Tom' }]\nusers.find(({ id }) => id == 3); // [{ id: 3, name: 'Melanie' }]\n```", + "itemtype": "method", + "name": "find", + "params": [ + { + "name": "callback", + "description": "The callback to execute", + "type": "Function" + }, + { + "name": "target", + "description": "The target object to use", + "type": "Object", + "optional": true + } + ], + "return": { + "description": "Found item or `undefined`.", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 801, + "description": "Returns the first item with a property matching the passed value. You\ncan pass an optional second argument with the target value. Otherwise\nthis will match any property that evaluates to `true`.\n\nThis method works much like the more generic `find()` method.\n\nUsage Example:\n\n```javascript\nlet users = [\n { id: 1, name: 'Yehuda', isTom: false },\n { id: 2, name: 'Tom', isTom: true },\n { id: 3, name: 'Melanie', isTom: false },\n { id: 4, name: 'Leah', isTom: false }\n];\n\nusers.findBy('id', 4); // { id: 4, name: 'Leah', isTom: false }\nusers.findBy('name', 'Melanie'); // { id: 3, name: 'Melanie', isTom: false }\nusers.findBy('isTom'); // { id: 2, name: 'Tom', isTom: true }\n```", + "itemtype": "method", + "name": "findBy", + "params": [ + { + "name": "key", + "description": "the property to test", + "type": "String" + }, + { + "name": "value", + "description": "optional value to test against.", + "type": "String", + "optional": true + } + ], + "return": { + "description": "found item or `undefined`", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 831, + "description": "Returns `true` if the passed function returns true for every item in the\nenumeration. This corresponds with the `Array.prototype.every()` method defined in ES5.\n\nThe callback method should have the following signature:\n\n```javascript\nfunction(item, index, array);\n```\n\n- `item` is the current item in the iteration.\n- `index` is the current index in the iteration.\n- `array` is the array itself.\n\nAll params are optional. The method should return `true` or `false`.\n\nNote that in addition to a callback, you can also pass an optional target\nobject that will be set as `this` on the context. This is a good way\nto give your iterator function access to the current object.\n\nUsage example:\n\n```javascript\nfunction isAdult(person) {\n return person.age > 18;\n};\n\nconst people = Ember.A([{ name: 'John', age: 24 }, { name: 'Joan', age: 45 }]);\nconst areAllAdults = people.every(isAdult);\n```", + "itemtype": "method", + "name": "every", + "params": [ + { + "name": "callback", + "description": "The callback to execute", + "type": "Function" + }, + { + "name": "target", + "description": "The target object to use", + "type": "Object", + "optional": true + } + ], + "return": { + "description": "", + "type": "Boolean" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 872, + "description": "Returns `true` if the passed property resolves to the value of the second\nargument for all items in the array. This method is often simpler/faster\nthan using a callback.\n\nNote that like the native `Array.every`, `isEvery` will return true when called\non any empty array.\n```javascript\nclass Language {\n constructor(name, isProgrammingLanguage) {\n this.name = name;\n this.programmingLanguage = isProgrammingLanguage;\n }\n}\n\nconst compiledLanguages = [\n new Language('Java', true),\n new Language('Go', true),\n new Language('Rust', true)\n]\n\nconst languagesKnownByMe = [\n new Language('Javascript', true),\n new Language('English', false),\n new Language('Ruby', true)\n]\n\ncompiledLanguages.isEvery('programmingLanguage'); // true\nlanguagesKnownByMe.isEvery('programmingLanguage'); // false\n```", + "itemtype": "method", + "name": "isEvery", + "params": [ + { + "name": "key", + "description": "the property to test", + "type": "String" + }, + { + "name": "value", + "description": "optional value to test against. Defaults to `true`", + "type": "String", + "optional": true + } + ], + "return": { + "description": "", + "type": "Boolean" + }, + "since": "1.3.0", + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 912, + "description": "The any() method executes the callback function once for each element\npresent in the array until it finds the one where callback returns a truthy\nvalue (i.e. `true`). If such an element is found, any() immediately returns\ntrue. Otherwise, any() returns false.\n\n```javascript\nfunction(item, index, array);\n```\n\n- `item` is the current item in the iteration.\n- `index` is the current index in the iteration.\n- `array` is the array object itself.\n\nNote that in addition to a callback, you can also pass an optional target\nobject that will be set as `this` on the context. It can be a good way\nto give your iterator function access to an object in cases where an ES6\narrow function would not be appropriate.\n\nUsage Example:\n\n```javascript\nlet includesManager = people.any(this.findPersonInManagersList, this);\n\nlet includesStockHolder = people.any(person => {\n return this.findPersonInStockHoldersList(person)\n});\n\nif (includesManager || includesStockHolder) {\n Paychecks.addBiggerBonus();\n}\n```", + "itemtype": "method", + "name": "any", + "params": [ + { + "name": "callback", + "description": "The callback to execute", + "type": "Function" + }, + { + "name": "target", + "description": "The target object to use", + "type": "Object", + "optional": true + } + ], + "return": { + "description": "`true` if the passed function returns `true` for any item", + "type": "Boolean" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 955, + "description": "Returns `true` if the passed property resolves to the value of the second\nargument for any item in the array. This method is often simpler/faster\nthan using a callback.\n\nExample usage:\n\n```javascript\nconst food = [\n { food: 'apple', isFruit: true },\n { food: 'bread', isFruit: false },\n { food: 'banana', isFruit: true }\n];\n\nfood.isAny('isFruit'); // true\n```", + "itemtype": "method", + "name": "isAny", + "params": [ + { + "name": "key", + "description": "the property to test", + "type": "String" + }, + { + "name": "value", + "description": "optional value to test against. Defaults to `true`", + "type": "String", + "optional": true + } + ], + "return": { + "description": "", + "type": "Boolean" + }, + "since": "1.3.0", + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 981, + "description": "This will combine the values of the array into a single value. It\nis a useful way to collect a summary value from an array. This\ncorresponds to the `reduce()` method defined in JavaScript 1.8.\n\nThe callback method you provide should have the following signature (all\nparameters are optional):\n\n```javascript\nfunction(previousValue, item, index, array);\n```\n\n- `previousValue` is the value returned by the last call to the iterator.\n- `item` is the current item in the iteration.\n- `index` is the current index in the iteration.\n- `array` is the array itself.\n\nReturn the new cumulative value.\n\nIn addition to the callback you can also pass an `initialValue`. An error\nwill be raised if you do not pass an initial value and the enumerator is\nempty.\n\nNote that unlike the other methods, this method does not allow you to\npass a target object to set as this for the callback. It's part of the\nspec. Sorry.\n\nExample Usage:\n\n```javascript\n let numbers = [1, 2, 3, 4, 5];\n\n numbers.reduce(function(summation, current) {\n return summation + current;\n }); // 15 (1 + 2 + 3 + 4 + 5)\n\n numbers.reduce(function(summation, current) {\n return summation + current;\n }, -15); // 0 (-15 + 1 + 2 + 3 + 4 + 5)\n\n\n let binaryValues = [true, false, false];\n\n binaryValues.reduce(function(truthValue, current) {\n return truthValue && current;\n }); // false (true && false && false)\n```", + "itemtype": "method", + "name": "reduce", + "params": [ + { + "name": "callback", + "description": "The callback to execute", + "type": "Function" + }, + { + "name": "initialValue", + "description": "Initial value for the reduce", + "type": "Object" + } + ], + "return": { + "description": "The reduced value.", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1039, + "description": "Invokes the named method on every object in the receiver that\nimplements it. This method corresponds to the implementation in\nPrototype 1.6.\n\n```javascript\nclass Person {\n name = null;\n\n constructor(name) {\n this.name = name;\n }\n\n greet(prefix='Hello') {\n return `${prefix} ${this.name}`;\n }\n}\n\nlet people = [new Person('Joe'), new Person('Matt')];\n\npeople.invoke('greet'); // ['Hello Joe', 'Hello Matt']\npeople.invoke('greet', 'Bonjour'); // ['Bonjour Joe', 'Bonjour Matt']\n```", + "itemtype": "method", + "name": "invoke", + "params": [ + { + "name": "methodName", + "description": "the name of the method", + "type": "String" + }, + { + "name": "args", + "description": "optional arguments to pass as well.", + "type": "Object..." + } + ], + "return": { + "description": "return values from calling invoke.", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1073, + "description": "Simply converts the object into a genuine array. The order is not\nguaranteed. Corresponds to the method implemented by Prototype.", + "itemtype": "method", + "name": "toArray", + "return": { + "description": "the object as an array.", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1082, + "description": "Returns a copy of the array with all `null` and `undefined` elements removed.\n\n```javascript\nlet arr = ['a', null, 'c', undefined];\narr.compact(); // ['a', 'c']\n```", + "itemtype": "method", + "name": "compact", + "return": { + "description": "the array without null and undefined elements.", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1095, + "description": "Used to determine if the array contains the passed object.\nReturns `true` if found, `false` otherwise.\n\nThe optional `startAt` argument can be used to pass a starting\nindex to search from, effectively slicing the searchable portion\nof the array. If it's negative it will add the array length to\nthe startAt value passed in as the index to search from. If less\nthan or equal to `-1 * array.length` the entire array is searched.\n\nThis method has the same behavior of JavaScript's [Array.includes](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes).\n\n```javascript\n[1, 2, 3].includes(2); // true\n[1, 2, 3].includes(4); // false\n[1, 2, 3].includes(3, 2); // true\n[1, 2, 3].includes(3, 3); // false\n[1, 2, 3].includes(3, -1); // true\n[1, 2, 3].includes(1, -1); // false\n[1, 2, 3].includes(1, -4); // true\n[1, 2, NaN].includes(NaN); // true\n```", + "itemtype": "method", + "name": "includes", + "params": [ + { + "name": "object", + "description": "The object to search for.", + "type": "Object" + }, + { + "name": "startAt", + "description": "optional starting location to search, default 0", + "type": "Number" + } + ], + "return": { + "description": "`true` if object is found in the array.", + "type": "Boolean" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1125, + "description": "Sorts the array by the keys specified in the argument.\n\nYou may provide multiple arguments to sort by multiple properties.\n\n```javascript\n let colors = [\n { name: 'red', weight: 500 },\n { name: 'green', weight: 600 },\n { name: 'blue', weight: 500 }\n];\n\n colors.sortBy('name');\n // [{name: 'blue', weight: 500}, {name: 'green', weight: 600}, {name: 'red', weight: 500}]\n\n colors.sortBy('weight', 'name');\n // [{name: 'blue', weight: 500}, {name: 'red', weight: 500}, {name: 'green', weight: 600}]\n ```", + "itemtype": "method", + "name": "sortBy", + "params": [ + { + "name": "property", + "description": "name(s) to sort on", + "type": "String" + } + ], + "return": { + "description": "The sorted array.", + "type": "Array" + }, + "since": "1.2.0", + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1150, + "description": "Returns a new array that contains only unique values. The default\nimplementation returns an array regardless of the receiver type.\n\n```javascript\nlet arr = ['a', 'a', 'b', 'b'];\narr.uniq(); // ['a', 'b']\n```\n\nThis only works on primitive data types, e.g. Strings, Numbers, etc.", + "itemtype": "method", + "name": "uniq", + "return": { + "description": "", + "type": "EmberArray" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1166, + "description": "Returns a new array that contains only items containing a unique property value.\nThe default implementation returns an array regardless of the receiver type.\n\n```javascript\nlet arr = [{ value: 'a' }, { value: 'a' }, { value: 'b' }, { value: 'b' }];\narr.uniqBy('value'); // [{ value: 'a' }, { value: 'b' }]\n\nlet arr = [2.2, 2.1, 3.2, 3.3];\narr.uniqBy(Math.floor); // [2.2, 3.2];\n```", + "itemtype": "method", + "name": "uniqBy", + "params": [ + { + "name": "key", + "description": "", + "type": "String,Function" + } + ], + "return": { + "description": "", + "type": "EmberArray" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1185, + "description": "Returns a new array that excludes the passed value. The default\nimplementation returns an array regardless of the receiver type.\nIf the receiver does not contain the value it returns the original array.\n\n```javascript\nlet arr = ['a', 'b', 'a', 'c'];\narr.without('a'); // ['b', 'c']\n```", + "itemtype": "method", + "name": "without", + "params": [ + { + "name": "value", + "description": "", + "type": "Object" + } + ], + "return": { + "description": "", + "type": "EmberArray" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + } + ], + "events": [], + "properties": [ + { + "file": "packages/@ember/array/proxy.ts", + "line": 120, + "description": "The content array. Must be an object that implements `Array` and/or\n`MutableArray.`", + "itemtype": "property", + "name": "content", + "type": "EmberArray", + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array/proxy" + }, + { + "file": "packages/@ember/array/proxy.ts", + "line": 129, + "description": "The array that the proxy pretends to be. In the default `ArrayProxy`\nimplementation, this and `content` are the same. Subclasses of `ArrayProxy`\ncan override this property to provide things like sorting and filtering.", + "itemtype": "property", + "name": "arrangedContent", + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array/proxy" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 355, + "description": "Defines the properties that will be concatenated from the superclass\n(instead of overridden).\n\nBy default, when you extend an Ember class a property defined in\nthe subclass overrides a property with the same name that is defined\nin the superclass. However, there are some cases where it is preferable\nto build up a property's value by combining the superclass' property\nvalue with the subclass' value. An example of this in use within Ember\nis the `classNames` property of `Component` from `@ember/component`.\n\nHere is some sample code showing the difference between a concatenated\nproperty and a normal one:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Bar = EmberObject.extend({\n // Configure which properties to concatenate\n concatenatedProperties: ['concatenatedProperty'],\n\n someNonConcatenatedProperty: ['bar'],\n concatenatedProperty: ['bar']\n});\n\nconst FooBar = Bar.extend({\n someNonConcatenatedProperty: ['foo'],\n concatenatedProperty: ['foo']\n});\n\nlet fooBar = FooBar.create();\nfooBar.get('someNonConcatenatedProperty'); // ['foo']\nfooBar.get('concatenatedProperty'); // ['bar', 'foo']\n```\n\nThis behavior extends to object creation as well. Continuing the\nabove example:\n\n```javascript\nlet fooBar = FooBar.create({\n someNonConcatenatedProperty: ['baz'],\n concatenatedProperty: ['baz']\n})\nfooBar.get('someNonConcatenatedProperty'); // ['baz']\nfooBar.get('concatenatedProperty'); // ['bar', 'foo', 'baz']\n```\n\nAdding a single property that is not an array will just add it in the array:\n\n```javascript\nlet fooBar = FooBar.create({\n concatenatedProperty: 'baz'\n})\nview.get('concatenatedProperty'); // ['bar', 'foo', 'baz']\n```\n\nUsing the `concatenatedProperties` property, we can tell Ember to mix the\ncontent of the properties.\n\nIn `Component` the `classNames`, `classNameBindings` and\n`attributeBindings` properties are concatenated.\n\nThis feature is available for you to use throughout the Ember object model,\nalthough typical app developers are likely to use it infrequently. Since\nit changes expectations about behavior of properties, you should properly\ndocument its usage in each individual concatenated property (to not\nmislead your users to think they can override the property in a subclass).", + "itemtype": "property", + "name": "concatenatedProperties", + "type": "Array", + "default": "null", + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 429, + "description": "Defines the properties that will be merged from the superclass\n(instead of overridden).\n\nBy default, when you extend an Ember class a property defined in\nthe subclass overrides a property with the same name that is defined\nin the superclass. However, there are some cases where it is preferable\nto build up a property's value by merging the superclass property value\nwith the subclass property's value. An example of this in use within Ember\nis the `queryParams` property of routes.\n\nHere is some sample code showing the difference between a merged\nproperty and a normal one:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Bar = EmberObject.extend({\n // Configure which properties are to be merged\n mergedProperties: ['mergedProperty'],\n\n someNonMergedProperty: {\n nonMerged: 'superclass value of nonMerged'\n },\n mergedProperty: {\n page: { replace: false },\n limit: { replace: true }\n }\n});\n\nconst FooBar = Bar.extend({\n someNonMergedProperty: {\n completelyNonMerged: 'subclass value of nonMerged'\n },\n mergedProperty: {\n limit: { replace: false }\n }\n});\n\nlet fooBar = FooBar.create();\n\nfooBar.get('someNonMergedProperty');\n// => { completelyNonMerged: 'subclass value of nonMerged' }\n//\n// Note the entire object, including the nonMerged property of\n// the superclass object, has been replaced\n\nfooBar.get('mergedProperty');\n// => {\n// page: {replace: false},\n// limit: {replace: false}\n// }\n//\n// Note the page remains from the superclass, and the\n// `limit` property's value of `false` has been merged from\n// the subclass.\n```\n\nThis behavior is not available during object `create` calls. It is only\navailable at `extend` time.\n\nIn `Route` the `queryParams` property is merged.\n\nThis feature is available for you to use throughout the Ember object model,\nalthough typical app developers are likely to use it infrequently. Since\nit changes expectations about behavior of properties, you should properly\ndocument its usage in each individual merged property (to not\nmislead your users to think they can override the property in a subclass).", + "itemtype": "property", + "name": "mergedProperties", + "type": "Array", + "default": "null", + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 504, + "description": "Destroyed object property flag.\n\nif this property is `true` the observers and bindings were already\nremoved by the effect of calling the `destroy()` method.", + "itemtype": "property", + "name": "isDestroyed", + "default": "false", + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 522, + "description": "Destruction scheduled flag. The `destroy()` method has been called.\n\nThe object stays intact until the end of the run loop at which point\nthe `isDestroyed` flag is set.", + "itemtype": "property", + "name": "isDestroying", + "default": "false", + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 253, + "description": "__Required.__ You must implement this method to apply this mixin.\n\nYour array must support the `length` property. Your replace methods should\nset this property whenever it changes.", + "itemtype": "property", + "name": "length", + "type": "Number", + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 304, + "description": "This is the handler for the special array content property. If you get\nthis property, it will return this. If you set this property to a new\narray, it will replace the current content.\n\n```javascript\nlet peopleToMoon = ['Armstrong', 'Aldrin'];\n\npeopleToMoon.get('[]'); // ['Armstrong', 'Aldrin']\n\npeopleToMoon.set('[]', ['Collins']); // ['Collins']\npeopleToMoon.get('[]'); // ['Collins']\n```", + "itemtype": "property", + "name": "[]", + "return": { + "description": "this" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 324, + "description": "The first object in the array, or `undefined` if the array is empty.\n\n```javascript\nlet vowels = ['a', 'e', 'i', 'o', 'u'];\nvowels.firstObject; // 'a'\n\nvowels.shiftObject();\nvowels.firstObject; // 'e'\n\nvowels.reverseObjects();\nvowels.firstObject; // 'u'\n\nvowels.clear();\nvowels.firstObject; // undefined\n```", + "itemtype": "property", + "name": "firstObject", + "return": { + "description": "The first object in the array", + "type": "Object | undefined" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 346, + "description": "The last object in the array, or `undefined` if the array is empty.", + "itemtype": "property", + "name": "lastObject", + "return": { + "description": "The last object in the array", + "type": "Object | undefined" + }, + "access": "public", + "tagname": "", + "class": "ArrayProxy", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + } + ] + }, + "relationships": { + "parent-class": { + "data": { + "id": "ember-5.12.0-EmberObject", + "type": "class" + } + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/array/proxy", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-BasicContainer.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-BasicContainer.json new file mode 100644 index 000000000..773690e6d --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-BasicContainer.json @@ -0,0 +1,102 @@ +{ + "data": { + "id": "ember-5.12.0-BasicContainer", + "type": "class", + "attributes": { + "name": "BasicContainer", + "shortname": "BasicContainer", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [ + "Owner" + ], + "module": "@ember/owner", + "namespace": "", + "file": "packages/@ember/-internals/owner/index.ts", + "line": 189, + "description": "The common interface for the ability to `lookup()` or get the `factoryFor` an\nitem, shared by the `Owner` and `ContainerProxy` interfaces.", + "access": "private", + "tagname": "", + "methods": [ + { + "file": "packages/@ember/-internals/owner/index.ts", + "line": 198, + "description": "Given a fullName return a corresponding instance.\n\nThe default behavior is for lookup to return a singleton instance.\nThe singleton is scoped to the container, allowing multiple containers\nto all have their own locally scoped singletons.\n\n```javascript\nlet registry = new Registry();\nlet container = registry.container();\n\nregistry.register('api:twitter', Twitter);\n\nlet twitter = container.lookup('api:twitter');\n\ntwitter instanceof Twitter; // => true\n\n// by default the container will return singletons\nlet twitter2 = container.lookup('api:twitter');\ntwitter2 instanceof Twitter; // => true\n\ntwitter === twitter2; //=> true\n```\n\nIf singletons are not wanted an optional flag can be provided at lookup.\n\n```javascript\nlet registry = new Registry();\nlet container = registry.container();\n\nregistry.register('api:twitter', Twitter);\n\nlet twitter = container.lookup('api:twitter', { singleton: false });\nlet twitter2 = container.lookup('api:twitter', { singleton: false });\n\ntwitter === twitter2; //=> false\n```", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "lookup", + "params": [ + { + "name": "fullName", + "description": "", + "type": "String" + }, + { + "name": "options", + "description": "", + "type": "RegisterOptions" + } + ], + "return": { + "description": "", + "type": "Any" + }, + "class": "BasicContainer", + "module": "@ember/owner" + }, + { + "file": "packages/@ember/-internals/owner/index.ts", + "line": 247, + "description": "Given a `FullName`, of the form `\"type:name\"` return a `FactoryManager`.\n\nThis method returns a manager which can be used for introspection of the\nfactory's class or for the creation of factory instances with initial\nproperties. The manager is an object with the following properties:\n\n* `class` - The registered or resolved class.\n* `create` - A function that will create an instance of the class with\n any dependencies injected.\n\nFor example:\n\n```javascript\nimport { getOwner } from '@ember/application';\n\nlet owner = getOwner(otherInstance);\n// the owner is commonly the `applicationInstance`, and can be accessed via\n// an instance initializer.\n\nlet factory = owner.factoryFor('service:bespoke');\n\nfactory.class;\n// The registered or resolved class. For example when used with an Ember-CLI\n// app, this would be the default export from `app/services/bespoke.js`.\n\nlet instance = factory.create({\n someProperty: 'an initial property value'\n});\n// Create an instance with any injections and the passed options as\n// initial properties.\n```\n\nAny instances created via the factory's `.create()` method *must* be destroyed\nmanually by the caller of `.create()`. Typically, this is done during the creating\nobjects own `destroy` or `willDestroy` methods.", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "factoryFor", + "params": [ + { + "name": "fullName", + "description": "", + "type": "String" + } + ], + "return": { + "description": "", + "type": "FactoryManager" + }, + "class": "BasicContainer", + "module": "@ember/owner" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [ + { + "type": "class", + "id": "ember-5.12.0-ContainerProxy" + } + ] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/owner", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-BasicRegistry.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-BasicRegistry.json new file mode 100644 index 000000000..baf133f10 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-BasicRegistry.json @@ -0,0 +1,81 @@ +{ + "data": { + "id": "ember-5.12.0-BasicRegistry", + "type": "class", + "attributes": { + "name": "BasicRegistry", + "shortname": "BasicRegistry", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [ + "Owner" + ], + "module": "@ember/owner", + "namespace": "", + "file": "packages/@ember/-internals/owner/index.ts", + "line": 98, + "description": "The common interface for the ability to `register()` an item, shared by the\n`Owner` and `RegistryProxy` interfaces.", + "access": "private", + "tagname": "", + "methods": [ + { + "file": "packages/@ember/-internals/owner/index.ts", + "line": 107, + "description": "Registers a factory that can be used for dependency injection (with\n`inject`) or for service lookup. Each factory is registered with\na full name including two parts: `type:name`.\n\nA simple example:\n\n```javascript\nimport Application from '@ember/application';\nimport EmberObject from '@ember/object';\n\nlet App = Application.create();\n\nApp.Orange = EmberObject.extend();\nApp.register('fruit:favorite', App.Orange);\n```\n\nEmber will resolve factories from the `App` namespace automatically.\nFor example `App.CarsController` will be discovered and returned if\nan application requests `controller:cars`.\n\nAn example of registering a controller with a non-standard name:\n\n```javascript\nimport Application from '@ember/application';\nimport Controller from '@ember/controller';\n\nlet App = Application.create();\nlet Session = Controller.extend();\n\nApp.register('controller:session', Session);\n\n// The Session controller can now be treated like a normal controller,\n// despite its non-standard name.\nApp.ApplicationController = Controller.extend({\n needs: ['session']\n});\n```\n\nRegistered factories are **instantiated** by having `create`\ncalled on them. Additionally they are **singletons**, each time\nthey are looked up they return the same instance.\n\nSome examples modifying that default behavior:\n\n```javascript\nimport Application from '@ember/application';\nimport EmberObject from '@ember/object';\n\nlet App = Application.create();\n\nApp.Person = EmberObject.extend();\nApp.Orange = EmberObject.extend();\nApp.Email = EmberObject.extend();\nApp.session = EmberObject.create();\n\nApp.register('model:user', App.Person, { singleton: false });\nApp.register('fruit:favorite', App.Orange);\nApp.register('communication:main', App.Email, { singleton: false });\nApp.register('session', App.session, { instantiate: false });\n```", + "itemtype": "method", + "name": "register", + "params": [ + { + "name": "fullName", + "description": "type:name (e.g., 'model:user')", + "type": "String" + }, + { + "name": "factory", + "description": "(e.g., App.Person)", + "type": "Factory|object" + }, + { + "name": "options", + "description": "(optional) disable instantiation or singleton usage", + "type": "Object" + } + ], + "access": "public", + "tagname": "", + "class": "BasicRegistry", + "module": "@ember/owner" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [ + { + "type": "class", + "id": "ember-5.12.0-RegistryProxy" + } + ] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/owner", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-BucketCache.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-BucketCache.json new file mode 100644 index 000000000..16c75603e --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-BucketCache.json @@ -0,0 +1,45 @@ +{ + "data": { + "id": "ember-5.12.0-BucketCache", + "type": "class", + "attributes": { + "name": "BucketCache", + "shortname": "BucketCache", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/renderer", + "namespace": "", + "file": "packages/@ember/routing/lib/cache.ts", + "line": 1, + "description": "A two-tiered cache with support for fallback values when doing lookups.\nUses \"buckets\" and then \"keys\" to cache values.", + "access": "private", + "tagname": "", + "methods": [], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/renderer", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-Component.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-Component.json new file mode 100644 index 000000000..da51e4e83 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-Component.json @@ -0,0 +1,1587 @@ +{ + "data": { + "id": "ember-5.12.0-Component", + "type": "class", + "attributes": { + "name": "Component", + "shortname": "Component", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/component", + "namespace": "", + "file": "packages/@ember/-internals/glimmer/lib/component.ts", + "line": 187, + "description": "A component is a reusable UI element that consists of a `.hbs` template and an\noptional JavaScript class that defines its behavior. For example, someone\nmight make a `button` in the template and handle the click behavior in the\nJavaScript file that shares the same name as the template.\n\nComponents are broken down into two categories:\n\n- Components _without_ JavaScript, that are based only on a template. These\n are called Template-only or TO components.\n- Components _with_ JavaScript, which consist of a template and a backing\n class.\n\nEmber ships with two types of JavaScript classes for components:\n\n1. Glimmer components, imported from `@glimmer/component`, which are the\n default component's for Ember Octane (3.15) and more recent editions.\n2. Classic components, imported from `@ember/component`, which were the\n default for older editions of Ember (pre 3.15).\n\nBelow is the documentation for Classic components. If you are looking for the\nAPI documentation for Template-only or Glimmer components, it is [available\nhere](/ember/release/modules/@glimmer%2Fcomponent).\n\n## Defining a Classic Component\n\nIf you want to customize the component in order to handle events, transform\narguments or maintain internal state, you implement a subclass of `Component`.\n\nOne example is to add computed properties to your component:\n\n```js {data-filename=app/components/person-profile.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n displayName: computed('person.title', 'person.firstName', 'person.lastName', function() {\n let { title, firstName, lastName } = this.person;\n\n if (title) {\n return `${title} ${lastName}`;\n } else {\n return `${firstName} ${lastName}`;\n }\n })\n});\n```\n\nAnd then use it in the component's template:\n\n```handlebars {data-filename=app/templates/components/person-profile.hbs}\n{{this.displayName}}\n{{yield}}\n```\n\n## Customizing a Classic Component's HTML Element in JavaScript\n\n### HTML Tag\n\nThe default HTML tag name used for a component's HTML representation is `div`.\nThis can be customized by setting the `tagName` property.\n\nConsider the following component class:\n\n```js {data-filename=app/components/emphasized-paragraph.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n tagName: 'em'\n});\n```\n\nWhen invoked, this component would produce output that looks something like\nthis:\n\n```html\n\n```\n\n### HTML `class` Attribute\n\nThe HTML `class` attribute of a component's tag can be set by providing a\n`classNames` property that is set to an array of strings:\n\n```js {data-filename=app/components/my-widget.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n classNames: ['my-class', 'my-other-class']\n});\n```\n\nInvoking this component will produce output that looks like this:\n\n```html\n\n```\n\n`class` attribute values can also be set by providing a `classNameBindings`\nproperty set to an array of properties names for the component. The return\nvalue of these properties will be added as part of the value for the\ncomponents's `class` attribute. These properties can be computed properties:\n\n```js {data-filename=app/components/my-widget.js}\nimport Component from '@ember/component';\nimport { computed } from '@ember/object';\n\nexport default Component.extend({\n classNames: ['my-class', 'my-other-class'],\n classNameBindings: ['propertyA', 'propertyB'],\n\n propertyA: 'from-a',\n propertyB: computed(function() {\n if (someLogic) { return 'from-b'; }\n })\n});\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n\n```\n\nNote that `classNames` and `classNameBindings` is in addition to the `class`\nattribute passed with the angle bracket invocation syntax. Therefore, if this\ncomponent was invoked like so:\n\n```handlebars\n\n```\n\nThe resulting HTML will look similar to this:\n\n```html\n\n```\n\nIf the value of a class name binding returns a boolean the property name\nitself will be used as the class name if the property is true. The class name\nwill not be added if the value is `false` or `undefined`.\n\n```js {data-filename=app/components/my-widget.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n classNameBindings: ['hovered'],\n\n hovered: true\n});\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n\n```\n\n### Custom Class Names for Boolean Values\n\nWhen using boolean class name bindings you can supply a string value other\nthan the property name for use as the `class` HTML attribute by appending the\npreferred value after a \":\" character when defining the binding:\n\n```js {data-filename=app/components/my-widget.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n classNameBindings: ['awesome:so-very-cool'],\n\n awesome: true\n});\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n\n```\n\nBoolean value class name bindings whose property names are in a\ncamelCase-style format will be converted to a dasherized format:\n\n```js {data-filename=app/components/my-widget.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n classNameBindings: ['isUrgent'],\n\n isUrgent: true\n});\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n\n```\n\nClass name bindings can also refer to object values that are found by\ntraversing a path relative to the component itself:\n\n```js {data-filename=app/components/my-widget.js}\nimport Component from '@ember/component';\nimport EmberObject from '@ember/object';\n\nexport default Component.extend({\n classNameBindings: ['messages.empty'],\n\n messages: EmberObject.create({\n empty: true\n })\n});\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n\n```\n\nIf you want to add a class name for a property which evaluates to true and and\na different class name if it evaluates to false, you can pass a binding like\nthis:\n\n```js {data-filename=app/components/my-widget.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n classNameBindings: ['isEnabled:enabled:disabled'],\n isEnabled: true\n});\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n\n```\n\nWhen isEnabled is `false`, the resulting HTML representation looks like this:\n\n```html\n\n```\n\nThis syntax offers the convenience to add a class if a property is `false`:\n\n```js {data-filename=app/components/my-widget.js}\nimport Component from '@ember/component';\n\n// Applies no class when isEnabled is true and class 'disabled' when isEnabled is false\nexport default Component.extend({\n classNameBindings: ['isEnabled::disabled'],\n isEnabled: true\n});\n```\n\nInvoking this component when the `isEnabled` property is true will produce\nHTML that looks like:\n\n```html\n\n```\n\nInvoking it when the `isEnabled` property on the component is `false` will\nproduce HTML that looks like:\n\n```html\n\n```\n\nUpdates to the value of a class name binding will result in automatic update\nof the HTML `class` attribute in the component's rendered HTML\nrepresentation. If the value becomes `false` or `undefined` the class name\nwill be removed.\n\nBoth `classNames` and `classNameBindings` are concatenated properties. See\n[EmberObject](/ember/release/classes/EmberObject) documentation for more\ninformation about concatenated properties.\n\n### Other HTML Attributes\n\nThe HTML attribute section of a component's tag can be set by providing an\n`attributeBindings` property set to an array of property names on the\ncomponent. The return value of these properties will be used as the value of\nthe component's HTML associated attribute:\n\n```js {data-filename=app/components/my-anchor.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n tagName: 'a',\n attributeBindings: ['href'],\n\n href: 'http://google.com'\n});\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n\n```\n\nOne property can be mapped on to another by placing a \":\" between the source\nproperty and the destination property:\n\n```js {data-filename=app/components/my-anchor.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n tagName: 'a',\n attributeBindings: ['url:href'],\n\n url: 'http://google.com'\n});\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n\n```\n\nHTML attributes passed with angle bracket invocations will take precedence\nover those specified in `attributeBindings`. Therefore, if this component was\ninvoked like so:\n\n```handlebars\n\n```\n\nThe resulting HTML will looks like this:\n\n```html\n\n```\n\nNote that the `href` attribute is ultimately set to `http://bing.com`, despite\nit having attribute binidng to the `url` property, which was set to\n`http://google.com`.\n\nNamespaced attributes (e.g. `xlink:href`) are supported, but have to be\nmapped, since `:` is not a valid character for properties in Javascript:\n\n```js {data-filename=app/components/my-use.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n tagName: 'use',\n attributeBindings: ['xlinkHref:xlink:href'],\n\n xlinkHref: '#triangle'\n});\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n\n```\n\nIf the value of a property monitored by `attributeBindings` is a boolean, the\nattribute will be present or absent depending on the value:\n\n```js {data-filename=app/components/my-text-input.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n tagName: 'input',\n attributeBindings: ['disabled'],\n\n disabled: false\n});\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n\n```\n\n`attributeBindings` can refer to computed properties:\n\n```js {data-filename=app/components/my-text-input.js}\nimport Component from '@ember/component';\nimport { computed } from '@ember/object';\n\nexport default Component.extend({\n tagName: 'input',\n attributeBindings: ['disabled'],\n\n disabled: computed(function() {\n if (someLogic) {\n return true;\n } else {\n return false;\n }\n })\n});\n```\n\nTo prevent setting an attribute altogether, use `null` or `undefined` as the\nvalue of the property used in `attributeBindings`:\n\n```js {data-filename=app/components/my-text-input.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n tagName: 'form',\n attributeBindings: ['novalidate'],\n novalidate: null\n});\n```\n\nUpdates to the property of an attribute binding will result in automatic\nupdate of the HTML attribute in the component's HTML output.\n\n`attributeBindings` is a concatenated property. See\n[EmberObject](/ember/release/classes/EmberObject) documentation for more\ninformation about concatenated properties.\n\n## Layouts\n\nThe `layout` property can be used to dynamically specify a template associated\nwith a component class, instead of relying on Ember to link together a\ncomponent class and a template based on file names.\n\nIn general, applications should not use this feature, but it's commonly used\nin addons for historical reasons.\n\nThe `layout` property should be set to the default export of a template\nmodule, which is the name of a template file without the `.hbs` extension.\n\n```handlebars {data-filename=app/templates/components/person-profile.hbs}\nPerson's Title\n{{yield}}\n```\n\n```js {data-filename=app/components/person-profile.js}\n import Component from '@ember/component';\n import layout from '../templates/components/person-profile';\n\n export default Component.extend({\n layout\n });\n```\n\nIf you invoke the component:\n\n```handlebars\n\n Chief Basket Weaver\n Fisherman Industries\n\n```\n\nor\n\n```handlebars\n{{#person-profile}}\n Chief Basket Weaver\n Fisherman Industries\n{{/person-profile}}\n```\n\nIt will result in the following HTML output:\n\n```html\nPerson's Title\n \n Chief Basket Weaver\n Fisherman Industries\n\n```\n\n## Handling Browser Events\n\nThere are two ways to handle user-initiated events:\n\n### Using the `on` modifier to capture browser events\n\nIn a component's template, you can attach an event handler to any element with the `on` modifier:\n\n```handlebars\n\n```\n\nThis will call the function on your component:\n\n```js\nimport Component from '@ember/component';\n\nexport default class ExampleComponent extends Component {\n doSomething = (event) => {\n // `event` is the native click Event\n console.log('clicked on the button');\n };\n});\n```\n\nSee the [Guide on Component event\nhandlers](https://guides.emberjs.com/release/components/component-state-and-actions/#toc_html-modifiers-and-actions)\nand the [API docs for `on`](../Ember.Templates.helpers/methods/on?anchor=on)\nfor more details.\n\n### Event Handler Methods\n\nComponents can also respond to user-initiated events by implementing a method\nthat matches the event name. This approach is appropriate when the same event\nshould be handled by all instances of the same component.\n\nAn event object will be passed as the argument to the event handler method.\n\n```js {data-filename=app/components/my-widget.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n click(event) {\n // `event.target` is either the component's element or one of its children\n let tag = event.target.tagName.toLowerCase();\n console.log('clicked on a `<${tag}>` HTML element!');\n }\n});\n```\n\nIn this example, whenever the user clicked anywhere inside the component, it\nwill log a message to the console.\n\nIt is possible to handle event types other than `click` by implementing the\nfollowing event handler methods. In addition, custom events can be registered\nby using `Application.customEvents`.\n\nTouch events:\n\n* `touchStart`\n* `touchMove`\n* `touchEnd`\n* `touchCancel`\n\nKeyboard events:\n\n* `keyDown`\n* `keyUp`\n* `keyPress`\n\nMouse events:\n\n* `mouseDown`\n* `mouseUp`\n* `contextMenu`\n* `click`\n* `doubleClick`\n* `focusIn`\n* `focusOut`\n\nForm events:\n\n* `submit`\n* `change`\n* `focusIn`\n* `focusOut`\n* `input`\n\nDrag and drop events:\n\n* `dragStart`\n* `drag`\n* `dragEnter`\n* `dragLeave`\n* `dragOver`\n* `dragEnd`\n* `drop`", + "extends": "Ember.CoreView", + "uses": [ + "Ember.ViewStateSupport", + "Ember.ViewMixin", + "Ember.ActionSupport", + "Ember.ClassNamesSupport", + "Ember.TargetActionSupport" + ], + "access": "public", + "tagname": "", + "methods": [ + { + "file": "packages/@ember/-internals/glimmer/lib/component.ts", + "line": 42, + "description": "Called when the attributes passed into the component have been updated.\n Called both during the initial render of a container and during a rerender.\n Can be used in place of an observer; code placed here will be executed\n every time any attribute updates.", + "itemtype": "method", + "name": "didReceiveAttrs", + "access": "public", + "tagname": "", + "since": "1.13.0", + "class": "Component", + "module": "@ember/component" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/component.ts", + "line": 63, + "description": "Called after a component has been rendered, both on initial render and\n in subsequent rerenders.", + "itemtype": "method", + "name": "didRender", + "access": "public", + "tagname": "", + "since": "1.13.0", + "class": "Component", + "module": "@ember/component" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/component.ts", + "line": 80, + "description": "Called before a component has been rendered, both on initial render and\n in subsequent rerenders.", + "itemtype": "method", + "name": "willRender", + "access": "public", + "tagname": "", + "since": "1.13.0", + "class": "Component", + "module": "@ember/component" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/component.ts", + "line": 97, + "description": "Called when the attributes passed into the component have been changed.\n Called only during a rerender, not during an initial render.", + "itemtype": "method", + "name": "didUpdateAttrs", + "access": "public", + "tagname": "", + "since": "1.13.0", + "class": "Component", + "module": "@ember/component" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/component.ts", + "line": 114, + "description": "Called when the component is about to update and rerender itself.\n Called only during a rerender, not during an initial render.", + "itemtype": "method", + "name": "willUpdate", + "access": "public", + "tagname": "", + "since": "1.13.0", + "class": "Component", + "module": "@ember/component" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/component.ts", + "line": 131, + "description": "Called when the component has updated and rerendered itself.\n Called only during a rerender, not during an initial render.", + "itemtype": "method", + "name": "didUpdate", + "access": "public", + "tagname": "", + "since": "1.13.0", + "class": "Component", + "module": "@ember/component" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/component.ts", + "line": 931, + "description": "Normally, Ember's component model is \"write-only\". The component takes a\nbunch of attributes that it got passed in, and uses them to render its\ntemplate.\n\nOne nice thing about this model is that if you try to set a value to the\nsame thing as last time, Ember (through HTMLBars) will avoid doing any\nwork on the DOM.\n\nThis is not just a performance optimization. If an attribute has not\nchanged, it is important not to clobber the element's \"hidden state\".\nFor example, if you set an input's `value` to the same value as before,\nit will clobber selection state and cursor position. In other words,\nsetting an attribute is not **always** idempotent.\n\nThis method provides a way to read an element's attribute and also\nupdate the last value Ember knows about at the same time. This makes\nsetting an attribute idempotent.\n\nIn particular, what this means is that if you get an `` element's\n`value` attribute and then re-render the template with the same value,\nit will avoid clobbering the cursor and selection position.\nSince most attribute sets are idempotent in the browser, you typically\ncan get away with reading attributes using jQuery, but the most reliable\nway to do so is through this method.", + "itemtype": "method", + "name": "readDOMAttr", + "params": [ + { + "name": "name", + "description": "the name of the attribute", + "type": "String" + } + ], + "return": { + "description": "String" + }, + "access": "public", + "tagname": "", + "class": "Component", + "module": "@ember/component" + }, + { + "file": "packages/@ember/-internals/views/lib/system/utils.ts", + "line": 37, + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "getRootViews", + "params": [ + { + "name": "owner", + "description": "", + "type": "Object" + } + ], + "class": "Component", + "module": "ember", + "inherited": true, + "inheritedFrom": "Ember.CoreView" + }, + { + "file": "packages/@ember/-internals/views/lib/system/utils.ts", + "line": 59, + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "getViewId", + "params": [ + { + "name": "view", + "description": "", + "type": "Ember.View" + } + ], + "class": "Component", + "module": "ember", + "inherited": true, + "inheritedFrom": "Ember.CoreView" + }, + { + "file": "packages/@ember/-internals/views/lib/system/utils.ts", + "line": 79, + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "getViewElement", + "params": [ + { + "name": "view", + "description": "", + "type": "Ember.View" + } + ], + "class": "Component", + "module": "ember", + "inherited": true, + "inheritedFrom": "Ember.CoreView" + }, + { + "file": "packages/@ember/-internals/views/lib/system/utils.ts", + "line": 111, + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "getChildViews", + "params": [ + { + "name": "view", + "description": "", + "type": "Ember.View" + } + ], + "class": "Component", + "module": "ember", + "inherited": true, + "inheritedFrom": "Ember.CoreView" + }, + { + "file": "packages/@ember/-internals/views/lib/system/utils.ts", + "line": 154, + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "getViewBounds", + "params": [ + { + "name": "view", + "description": "", + "type": "Ember.View" + } + ], + "class": "Component", + "module": "ember", + "inherited": true, + "inheritedFrom": "Ember.CoreView" + }, + { + "file": "packages/@ember/-internals/views/lib/system/utils.ts", + "line": 163, + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "getViewRange", + "params": [ + { + "name": "view", + "description": "", + "type": "Ember.View" + } + ], + "class": "Component", + "module": "ember", + "inherited": true, + "inheritedFrom": "Ember.CoreView" + }, + { + "file": "packages/@ember/-internals/views/lib/system/utils.ts", + "line": 178, + "description": "`getViewClientRects` provides information about the position of the border\nbox edges of a view relative to the viewport.\n\nIt is only intended to be used by development tools like the Ember Inspector\nand may not work on older browsers.", + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "getViewClientRects", + "params": [ + { + "name": "view", + "description": "", + "type": "Ember.View" + } + ], + "class": "Component", + "module": "ember", + "inherited": true, + "inheritedFrom": "Ember.CoreView" + }, + { + "file": "packages/@ember/-internals/views/lib/system/utils.ts", + "line": 194, + "description": "`getViewBoundingClientRect` provides information about the position of the\nbounding border box edges of a view relative to the viewport.\n\nIt is only intended to be used by development tools like the Ember Inspector\nand may not work on older browsers.", + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "getViewBoundingClientRect", + "params": [ + { + "name": "view", + "description": "", + "type": "Ember.View" + } + ], + "class": "Component", + "module": "ember", + "inherited": true, + "inheritedFrom": "Ember.CoreView" + }, + { + "file": "packages/@ember/-internals/views/lib/system/utils.ts", + "line": 210, + "description": "Determines if the element matches the specified selector.", + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "matches", + "params": [ + { + "name": "el", + "description": "", + "type": "DOMElement" + }, + { + "name": "selector", + "description": "", + "type": "String" + } + ], + "class": "Component", + "module": "ember", + "inherited": true, + "inheritedFrom": "Ember.CoreView" + }, + { + "file": "packages/@ember/-internals/views/lib/views/core_view.ts", + "line": 77, + "description": "Override the default event firing from `Evented` to\nalso call methods with the given name.", + "itemtype": "method", + "name": "trigger", + "params": [ + { + "name": "name", + "description": "", + "type": "String" + } + ], + "access": "private", + "tagname": "", + "class": "Component", + "module": "ember", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.CoreView" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 93, + "description": "Return the nearest ancestor that is an instance of the provided\nclass or mixin.", + "itemtype": "method", + "name": "nearestOfType", + "params": [ + { + "name": "klass", + "description": "Subclass of Ember.View (or Ember.View itself),\nor an instance of Mixin.", + "type": "Class,Mixin" + } + ], + "return": { + "description": "Ember.View" + }, + "deprecated": true, + "deprecationMessage": "use `yield` and contextual components for composition instead.", + "access": "private", + "tagname": "", + "class": "Component", + "module": "ember", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.ViewMixin" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 121, + "description": "Return the nearest ancestor that has a given property.", + "itemtype": "method", + "name": "nearestWithProperty", + "params": [ + { + "name": "property", + "description": "A property name", + "type": "String" + } + ], + "return": { + "description": "Ember.View" + }, + "deprecated": true, + "deprecationMessage": "use `yield` and contextual components for composition instead.", + "access": "private", + "tagname": "", + "class": "Component", + "module": "ember", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.ViewMixin" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 141, + "description": "Renders the view again. This will work regardless of whether the\nview is already in the DOM or not. If the view is in the DOM, the\nrendering process will be deferred to give bindings a chance\nto synchronize.\n\nIf children were added during the rendering process using `appendChild`,\n`rerender` will remove them, because they will be added again\nif needed by the next `render`.\n\nIn general, if the display of your view changes, you should modify\nthe DOM element directly instead of manually calling `rerender`, which can\nbe slow.", + "itemtype": "method", + "name": "rerender", + "access": "public", + "tagname": "", + "class": "Component", + "module": "ember", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.ViewMixin" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 181, + "description": "Appends the view's element to the specified parent element.\n\nNote that this method just schedules the view to be appended; the DOM\nelement will not be appended to the given element until all bindings have\nfinished synchronizing.\n\nThis is not typically a function that you will need to call directly when\nbuilding your application. If you do need to use `appendTo`, be sure that\nthe target element you are providing is associated with an `Application`\nand does not have an ancestor element that is associated with an Ember view.", + "itemtype": "method", + "name": "appendTo", + "params": [ + { + "name": "A", + "description": "selector, element, HTML string", + "type": "String|DOMElement" + } + ], + "return": { + "description": "receiver", + "type": "Ember.View" + }, + "access": "private", + "tagname": "", + "class": "Component", + "module": "ember", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.ViewMixin" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 246, + "description": "Appends the view's element to the document body. If the view does\nnot have an HTML representation yet\nthe element will be generated automatically.\n\nIf your application uses the `rootElement` property, you must append\nthe view within that element. Rendering views outside of the `rootElement`\nis not supported.\n\nNote that this method just schedules the view to be appended; the DOM\nelement will not be appended to the document body until all bindings have\nfinished synchronizing.", + "itemtype": "method", + "name": "append", + "return": { + "description": "receiver", + "type": "Ember.View" + }, + "access": "private", + "tagname": "", + "class": "Component", + "module": "ember", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.ViewMixin" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 331, + "description": "You must call `destroy` on a view to destroy the view (and all of its\nchild views). This will remove the view from any parent node, then make\nsure that the DOM element managed by the view can be released by the\nmemory manager.", + "itemtype": "method", + "name": "destroy", + "access": "private", + "tagname": "", + "class": "Component", + "module": "ember", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.ViewMixin" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 405, + "description": "Setup a view, but do not finish waking it up.\n\n* configure `childViews`\n* register the view with the global views hash, which is used for event\ndispatch", + "itemtype": "method", + "name": "init", + "access": "private", + "tagname": "", + "class": "Component", + "module": "ember", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.ViewMixin" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 439, + "description": "Handle events from `EventDispatcher`", + "itemtype": "method", + "name": "handleEvent", + "params": [ + { + "name": "eventName", + "description": "", + "type": "String" + }, + { + "name": "evt", + "description": "", + "type": "Event" + } + ], + "access": "private", + "tagname": "", + "class": "Component", + "module": "ember", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.ViewMixin" + }, + { + "file": "packages/@ember/-internals/runtime/lib/mixins/target_action_support.ts", + "line": 52, + "description": "Send an `action` with an `actionContext` to a `target`. The action, actionContext\nand target will be retrieved from properties of the object. For example:\n\n```javascript\nimport { alias } from '@ember/object/computed';\n\nApp.SaveButtonView = Ember.View.extend(Ember.TargetActionSupport, {\n target: alias('controller'),\n action: 'save',\n actionContext: alias('context'),\n click() {\n this.triggerAction(); // Sends the `save` action, along with the current context\n // to the current controller\n }\n});\n```\n\nThe `target`, `action`, and `actionContext` can be provided as properties of\nan optional object argument to `triggerAction` as well.\n\n```javascript\nApp.SaveButtonView = Ember.View.extend(Ember.TargetActionSupport, {\n click() {\n this.triggerAction({\n action: 'save',\n target: this.get('controller'),\n actionContext: this.get('context')\n }); // Sends the `save` action, along with the current context\n // to the current controller\n }\n});\n```\n\nThe `actionContext` defaults to the object you are mixing `TargetActionSupport` into.\nBut `target` and `action` must be specified either as properties or with the argument\nto `triggerAction`, or a combination:\n\n```javascript\nimport { alias } from '@ember/object/computed';\n\nApp.SaveButtonView = Ember.View.extend(Ember.TargetActionSupport, {\n target: alias('controller'),\n click() {\n this.triggerAction({\n action: 'save'\n }); // Sends the `save` action, along with a reference to `this`,\n // to the current controller\n }\n});\n```", + "itemtype": "method", + "name": "triggerAction", + "params": [ + { + "name": "opts", + "description": "(optional, with the optional keys action, target and/or actionContext)", + "type": "Object" + } + ], + "return": { + "description": "true if the action was sent successfully and did not return false", + "type": "Boolean" + }, + "access": "private", + "tagname": "", + "class": "Component", + "module": "ember", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.TargetActionSupport" + }, + { + "file": "packages/@ember/-internals/runtime/lib/mixins/action_handler.ts", + "line": 172, + "description": "Triggers a named action on the `ActionHandler`. Any parameters\nsupplied after the `actionName` string will be passed as arguments\nto the action target function.\n\nIf the `ActionHandler` has its `target` property set, actions may\nbubble to the `target`. Bubbling happens when an `actionName` can\nnot be found in the `ActionHandler`'s `actions` hash or if the\naction target function returns `true`.\n\nExample\n\n```js {data-filename=app/routes/welcome.js}\nimport Route from '@ember/routing/route';\n\nexport default Route.extend({\n actions: {\n playTheme() {\n this.send('playMusic', 'theme.mp3');\n },\n playMusic(track) {\n // ...\n }\n }\n});\n```", + "itemtype": "method", + "name": "send", + "params": [ + { + "name": "actionName", + "description": "The action to trigger", + "type": "String" + }, + { + "name": "context", + "description": "a context to send with the action", + "type": "*" + } + ], + "access": "public", + "tagname": "", + "class": "Component", + "module": "ember", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.ActionHandler" + }, + { + "file": "packages/@ember/object/evented.ts", + "line": 51, + "description": "Subscribes to a named event with given function.\n\n```javascript\nperson.on('didLoad', function() {\n // fired once the person has loaded\n});\n```\n\nAn optional target can be passed in as the 2nd argument that will\nbe set as the \"this\" for the callback. This is a good way to give your\nfunction access to the object triggering the event. When the target\nparameter is used the callback method becomes the third argument.", + "itemtype": "method", + "name": "on", + "params": [ + { + "name": "name", + "description": "The name of the event", + "type": "String" + }, + { + "name": "target", + "description": "The \"this\" binding for the callback", + "type": "Object", + "optional": true + }, + { + "name": "method", + "description": "A function or the name of a function to be called on `target`", + "type": "Function|String" + } + ], + "return": { + "description": "this" + }, + "access": "public", + "tagname": "", + "class": "Component", + "module": "@ember/object/evented", + "inherited": true, + "inheritedFrom": "Evented" + }, + { + "file": "packages/@ember/object/evented.ts", + "line": 78, + "description": "Subscribes a function to a named event and then cancels the subscription\nafter the first time the event is triggered. It is good to use ``one`` when\nyou only care about the first time an event has taken place.\n\nThis function takes an optional 2nd argument that will become the \"this\"\nvalue for the callback. When the target parameter is used the callback method\nbecomes the third argument.", + "itemtype": "method", + "name": "one", + "params": [ + { + "name": "name", + "description": "The name of the event", + "type": "String" + }, + { + "name": "target", + "description": "The \"this\" binding for the callback", + "type": "Object", + "optional": true + }, + { + "name": "method", + "description": "A function or the name of a function to be called on `target`", + "type": "Function|String" + } + ], + "return": { + "description": "this" + }, + "access": "public", + "tagname": "", + "class": "Component", + "module": "@ember/object/evented", + "inherited": true, + "inheritedFrom": "Evented" + }, + { + "file": "packages/@ember/object/evented.ts", + "line": 100, + "description": "Triggers a named event for the object. Any additional arguments\nwill be passed as parameters to the functions that are subscribed to the\nevent.\n\n```javascript\nperson.on('didEat', function(food) {\n console.log('person ate some ' + food);\n});\n\nperson.trigger('didEat', 'broccoli');\n\n// outputs: person ate some broccoli\n```", + "itemtype": "method", + "name": "trigger", + "params": [ + { + "name": "name", + "description": "The name of the event", + "type": "String" + }, + { + "name": "args", + "description": "Optional arguments to pass on", + "type": "Object..." + } + ], + "access": "public", + "tagname": "", + "class": "Component", + "module": "@ember/object/evented", + "inherited": true, + "inheritedFrom": "Evented" + }, + { + "file": "packages/@ember/object/evented.ts", + "line": 121, + "description": "Cancels subscription for given name, target, and method.", + "itemtype": "method", + "name": "off", + "params": [ + { + "name": "name", + "description": "The name of the event", + "type": "String" + }, + { + "name": "target", + "description": "The target of the subscription", + "type": "Object" + }, + { + "name": "method", + "description": "The function or the name of a function of the subscription", + "type": "Function|String" + } + ], + "return": { + "description": "this" + }, + "access": "public", + "tagname": "", + "class": "Component", + "module": "@ember/object/evented", + "inherited": true, + "inheritedFrom": "Evented" + }, + { + "file": "packages/@ember/object/evented.ts", + "line": 137, + "description": "Checks to see if object has any subscriptions for named event.", + "itemtype": "method", + "name": "has", + "params": [ + { + "name": "name", + "description": "The name of the event", + "type": "String" + } + ], + "return": { + "description": "does the object have a subscription for event", + "type": "Boolean" + }, + "access": "public", + "tagname": "", + "class": "Component", + "module": "@ember/object/evented", + "inherited": true, + "inheritedFrom": "Evented" + }, + { + "file": "packages/@ember/object/mixin.ts", + "line": 440, + "itemtype": "method", + "name": "mixin", + "params": [ + { + "name": "obj", + "description": "" + }, + { + "name": "mixins", + "description": "", + "multiple": true + } + ], + "return": { + "description": "obj" + }, + "access": "private", + "tagname": "", + "class": "Component", + "module": "@ember/object/mixin", + "inherited": true, + "inheritedFrom": "Mixin" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 321, + "description": "An overridable method called when objects are instantiated. By default,\ndoes nothing unless it is overridden during class definition.\n\nExample:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Person = EmberObject.extend({\n init() {\n alert(`Name is ${this.get('name')}`);\n }\n});\n\nlet steve = Person.create({\n name: 'Steve'\n});\n\n// alerts 'Name is Steve'.\n```\n\nNOTE: If you do override `init` for a framework class like `Component`\nfrom `@ember/component`, be sure to call `this._super(...arguments)`\nin your `init` declaration!\nIf you don't, Ember may not have an opportunity to\ndo important setup work, and you'll see strange behavior in your\napplication.", + "itemtype": "method", + "name": "init", + "access": "public", + "tagname": "", + "class": "Component", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 540, + "description": "Destroys an object by setting the `isDestroyed` flag and removing its\nmetadata, which effectively destroys observers and bindings.\n\nIf you try to set a property on a destroyed object, an exception will be\nraised.\n\nNote that destruction is scheduled for the end of the run loop and does not\nhappen immediately. It will set an isDestroying flag immediately.", + "itemtype": "method", + "name": "destroy", + "return": { + "description": "receiver", + "type": "EmberObject" + }, + "access": "public", + "tagname": "", + "class": "Component", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 567, + "description": "Override to implement teardown.", + "itemtype": "method", + "name": "willDestroy", + "access": "public", + "tagname": "", + "class": "Component", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 575, + "description": "Returns a string representation which attempts to provide more information\nthan Javascript's `toString` typically does, in a generic way for all Ember\nobjects.\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Person = EmberObject.extend();\nperson = Person.create();\nperson.toString(); //=> \"\"\n```\n\nIf the object's class is not defined on an Ember namespace, it will\nindicate it is a subclass of the registered superclass:\n\n```javascript\nconst Student = Person.extend();\nlet student = Student.create();\nstudent.toString(); //=> \"<(subclass of Person):ember1025>\"\n```\n\nIf the method `toStringExtension` is defined, its return value will be\nincluded in the output.\n\n```javascript\nconst Teacher = Person.extend({\n toStringExtension() {\n return this.get('fullName');\n }\n});\nteacher = Teacher.create();\nteacher.toString(); //=> \"\"\n```", + "itemtype": "method", + "name": "toString", + "return": { + "description": "string representation", + "type": "String" + }, + "access": "public", + "tagname": "", + "class": "Component", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 97, + "description": "Retrieves the value of a property from the object.\n\nThis method is usually similar to using `object[keyName]` or `object.keyName`,\nhowever it supports both computed properties and the unknownProperty\nhandler.\n\nBecause `get` unifies the syntax for accessing all these kinds\nof properties, it can make many refactorings easier, such as replacing a\nsimple property with a computed property, or vice versa.\n\n### Computed Properties\n\nComputed properties are methods defined with the `property` modifier\ndeclared at the end, such as:\n\n```javascript\nimport { computed } from '@ember/object';\n\nfullName: computed('firstName', 'lastName', function() {\n return this.get('firstName') + ' ' + this.get('lastName');\n})\n```\n\nWhen you call `get` on a computed property, the function will be\ncalled and the return value will be returned instead of the function\nitself.\n\n### Unknown Properties\n\nLikewise, if you try to call `get` on a property whose value is\n`undefined`, the `unknownProperty()` method will be called on the object.\nIf this method returns any value other than `undefined`, it will be returned\ninstead. This allows you to implement \"virtual\" properties that are\nnot defined upfront.", + "itemtype": "method", + "name": "get", + "params": [ + { + "name": "keyName", + "description": "The property to retrieve", + "type": "String" + } + ], + "return": { + "description": "The property value or undefined.", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "Component", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 141, + "description": "To get the values of multiple properties at once, call `getProperties`\nwith a list of strings or an array:\n\n```javascript\nrecord.getProperties('firstName', 'lastName', 'zipCode');\n// { firstName: 'John', lastName: 'Doe', zipCode: '10011' }\n```\n\nis equivalent to:\n\n```javascript\nrecord.getProperties(['firstName', 'lastName', 'zipCode']);\n// { firstName: 'John', lastName: 'Doe', zipCode: '10011' }\n```", + "itemtype": "method", + "name": "getProperties", + "params": [ + { + "name": "list", + "description": "of keys to get", + "type": "String...|Array" + } + ], + "return": { + "description": "", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "Component", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 168, + "description": "Sets the provided key or path to the value.\n\n```javascript\nrecord.set(\"key\", value);\n```\n\nThis method is generally very similar to calling `object[\"key\"] = value` or\n`object.key = value`, except that it provides support for computed\nproperties, the `setUnknownProperty()` method and property observers.\n\n### Computed Properties\n\nIf you try to set a value on a key that has a computed property handler\ndefined (see the `get()` method for an example), then `set()` will call\nthat method, passing both the value and key instead of simply changing\nthe value itself. This is useful for those times when you need to\nimplement a property that is composed of one or more member\nproperties.\n\n### Unknown Properties\n\nIf you try to set a value on a key that is undefined in the target\nobject, then the `setUnknownProperty()` handler will be called instead. This\ngives you an opportunity to implement complex \"virtual\" properties that\nare not predefined on the object. If `setUnknownProperty()` returns\nundefined, then `set()` will simply set the value on the object.\n\n### Property Observers\n\nIn addition to changing the property, `set()` will also register a property\nchange with the object. Unless you have placed this call inside of a\n`beginPropertyChanges()` and `endPropertyChanges(),` any \"local\" observers\n(i.e. observer methods declared on the same object), will be called\nimmediately. Any \"remote\" observers (i.e. observer methods declared on\nanother object) will be placed in a queue and called at a later time in a\ncoalesced manner.", + "itemtype": "method", + "name": "set", + "params": [ + { + "name": "keyName", + "description": "The property to set", + "type": "String" + }, + { + "name": "value", + "description": "The value to set or `null`.", + "type": "Object" + } + ], + "return": { + "description": "The passed value", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "Component", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 216, + "description": "Sets a list of properties at once. These properties are set inside\na single `beginPropertyChanges` and `endPropertyChanges` batch, so\nobservers will be buffered.\n\n```javascript\nrecord.setProperties({ firstName: 'Charles', lastName: 'Jolley' });\n```", + "itemtype": "method", + "name": "setProperties", + "params": [ + { + "name": "hash", + "description": "the hash of keys and values to set", + "type": "Object" + } + ], + "return": { + "description": "The passed in hash", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "Component", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 233, + "description": "Convenience method to call `propertyWillChange` and `propertyDidChange` in\nsuccession.\n\nNotify the observer system that a property has just changed.\n\nSometimes you need to change a value directly or indirectly without\nactually calling `get()` or `set()` on it. In this case, you can use this\nmethod instead. Calling this method will notify all observers that the\nproperty has potentially changed value.", + "itemtype": "method", + "name": "notifyPropertyChange", + "params": [ + { + "name": "keyName", + "description": "The property key to be notified about.", + "type": "String" + } + ], + "return": { + "description": "", + "type": "Observable" + }, + "access": "public", + "tagname": "", + "class": "Component", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 251, + "description": "Adds an observer on a property.\n\nThis is the core method used to register an observer for a property.\n\nOnce you call this method, any time the key's value is set, your observer\nwill be notified. Note that the observers are triggered any time the\nvalue is set, regardless of whether it has actually changed. Your\nobserver should be prepared to handle that.\n\nThere are two common invocation patterns for `.addObserver()`:\n\n- Passing two arguments:\n - the name of the property to observe (as a string)\n - the function to invoke (an actual function)\n- Passing three arguments:\n - the name of the property to observe (as a string)\n - the target object (will be used to look up and invoke a\n function on)\n - the name of the function to invoke on the target object\n (as a string).\n\n```js {data-filename=app/components/my-component.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n init() {\n this._super(...arguments);\n\n // the following are equivalent:\n\n // using three arguments\n this.addObserver('foo', this, 'fooDidChange');\n\n // using two arguments\n this.addObserver('foo', (...args) => {\n this.fooDidChange(...args);\n });\n },\n\n fooDidChange() {\n // your custom logic code\n }\n});\n```\n\n### Observer Methods\n\nObserver methods have the following signature:\n\n```js {data-filename=app/components/my-component.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n init() {\n this._super(...arguments);\n this.addObserver('foo', this, 'fooDidChange');\n },\n\n fooDidChange(sender, key, value, rev) {\n // your code\n }\n});\n```\n\nThe `sender` is the object that changed. The `key` is the property that\nchanges. The `value` property is currently reserved and unused. The `rev`\nis the last property revision of the object when it changed, which you can\nuse to detect if the key value has really changed or not.\n\nUsually you will not need the value or revision parameters at\nthe end. In this case, it is common to write observer methods that take\nonly a sender and key value as parameters or, if you aren't interested in\nany of these values, to write an observer that has no parameters at all.", + "itemtype": "method", + "name": "addObserver", + "params": [ + { + "name": "key", + "description": "The key to observe", + "type": "String" + }, + { + "name": "target", + "description": "The target object to invoke", + "type": "Object" + }, + { + "name": "method", + "description": "The method to invoke", + "type": "String|Function" + }, + { + "name": "sync", + "description": "Whether the observer is sync or not", + "type": "Boolean" + } + ], + "return": { + "description": "", + "type": "Observable" + }, + "access": "public", + "tagname": "", + "class": "Component", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 337, + "description": "Remove an observer you have previously registered on this object. Pass\nthe same key, target, and method you passed to `addObserver()` and your\ntarget will no longer receive notifications.", + "itemtype": "method", + "name": "removeObserver", + "params": [ + { + "name": "key", + "description": "The key to observe", + "type": "String" + }, + { + "name": "target", + "description": "The target object to invoke", + "type": "Object" + }, + { + "name": "method", + "description": "The method to invoke", + "type": "String|Function" + }, + { + "name": "sync", + "description": "Whether the observer is async or not", + "type": "Boolean" + } + ], + "return": { + "description": "", + "type": "Observable" + }, + "access": "public", + "tagname": "", + "class": "Component", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 358, + "description": "Set the value of a property to the current value plus some amount.\n\n```javascript\nperson.incrementProperty('age');\nteam.incrementProperty('score', 2);\n```", + "itemtype": "method", + "name": "incrementProperty", + "params": [ + { + "name": "keyName", + "description": "The name of the property to increment", + "type": "String" + }, + { + "name": "increment", + "description": "The amount to increment by. Defaults to 1", + "type": "Number" + } + ], + "return": { + "description": "The new property value", + "type": "Number" + }, + "access": "public", + "tagname": "", + "class": "Component", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 375, + "description": "Set the value of a property to the current value minus some amount.\n\n```javascript\nplayer.decrementProperty('lives');\norc.decrementProperty('health', 5);\n```", + "itemtype": "method", + "name": "decrementProperty", + "params": [ + { + "name": "keyName", + "description": "The name of the property to decrement", + "type": "String" + }, + { + "name": "decrement", + "description": "The amount to decrement by. Defaults to 1", + "type": "Number" + } + ], + "return": { + "description": "The new property value", + "type": "Number" + }, + "access": "public", + "tagname": "", + "class": "Component", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 392, + "description": "Set the value of a boolean property to the opposite of its\ncurrent value.\n\n```javascript\nstarship.toggleProperty('warpDriveEngaged');\n```", + "itemtype": "method", + "name": "toggleProperty", + "params": [ + { + "name": "keyName", + "description": "The name of the property to toggle", + "type": "String" + } + ], + "return": { + "description": "The new property value", + "type": "Boolean" + }, + "access": "public", + "tagname": "", + "class": "Component", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 407, + "description": "Returns the cached value of a computed property, if it exists.\nThis allows you to inspect the value of a computed property\nwithout accidentally invoking it if it is intended to be\ngenerated lazily.", + "itemtype": "method", + "name": "cacheFor", + "params": [ + { + "name": "keyName", + "description": "", + "type": "String" + } + ], + "return": { + "description": "The cached value of the computed property, if any", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "Component", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 437, + "description": "Begins a grouping of property changes.\n\nYou can use this method to group property changes so that notifications\nwill not be sent until the changes are finished. If you plan to make a\nlarge number of changes to an object at one time, you should call this\nmethod at the beginning of the changes to begin deferring change\nnotifications. When you are done making changes, call\n`endPropertyChanges()` to deliver the deferred change notifications and end\ndeferring.", + "itemtype": "method", + "name": "beginPropertyChanges", + "return": { + "description": "", + "type": "Observable" + }, + "access": "private", + "tagname": "", + "class": "Component", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 457, + "description": "Ends a grouping of property changes.\n\nYou can use this method to group property changes so that notifications\nwill not be sent until the changes are finished. If you plan to make a\nlarge number of changes to an object at one time, you should call\n`beginPropertyChanges()` at the beginning of the changes to defer change\nnotifications. When you are done making changes, call this method to\ndeliver the deferred change notifications and end deferring.", + "itemtype": "method", + "name": "endPropertyChanges", + "return": { + "description": "", + "type": "Observable" + }, + "access": "private", + "tagname": "", + "class": "Component", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 501, + "description": "Returns `true` if the object currently has observers registered for a\nparticular key. You can use this method to potentially defer performing\nan expensive action until someone begins observing a particular property\non the object.", + "itemtype": "method", + "name": "hasObserverFor", + "params": [ + { + "name": "key", + "description": "Key to check", + "type": "String" + } + ], + "return": { + "description": "", + "type": "Boolean" + }, + "access": "private", + "tagname": "", + "class": "Component", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + } + ], + "events": [ + { + "file": "packages/@ember/-internals/glimmer/lib/component.ts", + "line": 53, + "description": "Called when the attributes passed into the component have been updated.\n Called both during the initial render of a container and during a rerender.\n Can be used in place of an observer; code placed here will be executed\n every time any attribute updates.", + "itemtype": "event", + "name": "didReceiveAttrs", + "access": "public", + "tagname": "", + "since": "1.13.0", + "class": "Component", + "module": "@ember/component" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/component.ts", + "line": 72, + "description": "Called after a component has been rendered, both on initial render and\n in subsequent rerenders.", + "itemtype": "event", + "name": "didRender", + "access": "public", + "tagname": "", + "since": "1.13.0", + "class": "Component", + "module": "@ember/component" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/component.ts", + "line": 89, + "description": "Called before a component has been rendered, both on initial render and\n in subsequent rerenders.", + "itemtype": "event", + "name": "willRender", + "access": "public", + "tagname": "", + "since": "1.13.0", + "class": "Component", + "module": "@ember/component" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/component.ts", + "line": 106, + "description": "Called when the attributes passed into the component have been changed.\n Called only during a rerender, not during an initial render.", + "itemtype": "event", + "name": "didUpdateAttrs", + "access": "public", + "tagname": "", + "since": "1.13.0", + "class": "Component", + "module": "@ember/component" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/component.ts", + "line": 123, + "description": "Called when the component is about to update and rerender itself.\n Called only during a rerender, not during an initial render.", + "itemtype": "event", + "name": "willUpdate", + "access": "public", + "tagname": "", + "since": "1.13.0", + "class": "Component", + "module": "@ember/component" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/component.ts", + "line": 140, + "description": "Called when the component has updated and rerendered itself.\n Called only during a rerender, not during an initial render.", + "itemtype": "event", + "name": "didUpdate", + "access": "public", + "tagname": "", + "since": "1.13.0", + "class": "Component", + "module": "@ember/component" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 300, + "description": "Called when a view is going to insert an element into the DOM.", + "itemtype": "event", + "name": "willInsertElement", + "access": "public", + "tagname": "", + "class": "Component", + "module": "ember", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.ViewMixin" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 308, + "description": "Called when the element of the view has been inserted into the DOM.\nOverride this function to do any set up that requires an element\nin the document body.\n\nWhen a view has children, didInsertElement will be called on the\nchild view(s) first and on itself afterwards.", + "itemtype": "event", + "name": "didInsertElement", + "access": "public", + "tagname": "", + "class": "Component", + "module": "ember", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.ViewMixin" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 321, + "description": "Called when the view is about to rerender, but before anything has\nbeen torn down. This is a good opportunity to tear down any manual\nobservers you have installed based on the DOM state", + "itemtype": "event", + "name": "willClearRender", + "access": "public", + "tagname": "", + "class": "Component", + "module": "ember", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.ViewMixin" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 345, + "description": "Called when the element of the view is going to be destroyed. Override\nthis function to do any teardown that requires an element, like removing\nevent listeners.\n\nPlease note: any property changes made during this event will have no\neffect on object observers.", + "itemtype": "event", + "name": "willDestroyElement", + "access": "public", + "tagname": "", + "class": "Component", + "module": "ember", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.ViewMixin" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 358, + "description": "Called after the element of the view is destroyed.", + "itemtype": "event", + "name": "willDestroyElement", + "access": "public", + "tagname": "", + "class": "Component", + "module": "ember", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.ViewMixin" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 366, + "description": "Called when the parentView property has changed.", + "itemtype": "event", + "name": "parentViewDidChange", + "access": "private", + "tagname": "", + "class": "Component", + "module": "ember", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.ViewMixin" + } + ], + "properties": [ + { + "file": "packages/@ember/-internals/glimmer/lib/component.ts", + "line": 148, + "description": "The HTML `id` of the component's element in the DOM. You can provide this\nvalue yourself but it must be unique (just as in HTML):\n\n```handlebars\n{{my-component elementId=\"a-really-cool-id\"}}\n```\n\n```handlebars\n\n```\nIf not manually set a default value will be provided by the framework.\nOnce rendered an element's `elementId` is considered immutable and you\nshould never change it. If you need to compute a dynamic value for the\n`elementId`, you should do this when the component or element is being\ninstantiated:\n\n```javascript\nexport default Component.extend({\n init() {\n this._super(...arguments);\n\n var index = this.get('index');\n this.set('elementId', `component-id${index}`);\n }\n});\n```", + "itemtype": "property", + "name": "elementId", + "type": "String", + "access": "public", + "tagname": "", + "class": "Component", + "module": "@ember/component" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/component.ts", + "line": 991, + "description": "Enables components to take a list of parameters as arguments.\n For example, a component that takes two parameters with the names\n `name` and `age`:\n\n ```js {data-filename=app/components/my-component.js}\n import Component from '@ember/component';\n\n let MyComponent = Component.extend();\n\n MyComponent.reopenClass({\n positionalParams: ['name', 'age']\n });\n\n export default MyComponent;\n ```\n\n It can then be invoked like this:\n\n ```handlebars\n {{my-component \"John\" 38}}\n ```\n\n The parameters can be referred to just like named parameters:\n\n ```handlebars\n Name: {{name}}, Age: {{age}}.\n ```\n\n Using a string instead of an array allows for an arbitrary number of\n parameters:\n\n ```js {data-filename=app/components/my-component.js}\n import Component from '@ember/component';\n\n let MyComponent = Component.extend();\n\n MyComponent.reopenClass({\n positionalParams: 'names'\n });\n\n export default MyComponent;\n ```\n\n It can then be invoked like this:\n\n ```handlebars\n {{my-component \"John\" \"Michael\" \"Scott\"}}\n ```\n The parameters can then be referred to by enumerating over the list:\n\n ```handlebars\n {{#each names as |name|}}{{name}}{{/each}}\n ```", + "static": 1, + "access": "public", + "tagname": "", + "itemtype": "property", + "name": "positionalParams", + "since": "1.13.0", + "class": "Component", + "module": "@ember/component" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/component.ts", + "line": 1112, + "description": "Layout can be used to wrap content in a component.", + "itemtype": "property", + "name": "layout", + "type": "Function", + "access": "public", + "tagname": "", + "class": "Component", + "module": "@ember/component" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/component.ts", + "line": 1120, + "description": "The name of the layout to lookup if no layout is provided.\nBy default `Component` will lookup a template with this name in\n`Ember.TEMPLATES` (a shared global object).", + "itemtype": "property", + "name": "layoutName", + "type": "String", + "default": "undefined", + "access": "private", + "tagname": "", + "class": "Component", + "module": "@ember/component" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/component.ts", + "line": 1131, + "description": "The WAI-ARIA role of the control represented by this view. For example, a\n button may have a role of type 'button', or a pane may have a role of\n type 'alertdialog'. This property is used by assistive software to help\n visually challenged users navigate rich web applications.\n\n The full list of valid WAI-ARIA roles is available at:\n [https://www.w3.org/TR/wai-aria/#roles_categorization](https://www.w3.org/TR/wai-aria/#roles_categorization)", + "itemtype": "property", + "name": "ariaRole", + "type": "String", + "default": "undefined", + "access": "public", + "tagname": "", + "class": "Component", + "module": "@ember/component" + }, + { + "file": "packages/@ember/-internals/views/lib/views/core_view.ts", + "line": 38, + "description": "If the view is currently inserted into the DOM of a parent view, this\nproperty will point to the parent of the view.", + "itemtype": "property", + "name": "parentView", + "type": "Ember.View", + "default": "null", + "access": "private", + "tagname": "", + "class": "Component", + "module": "ember", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.CoreView" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 35, + "description": "A list of properties of the view to apply as attributes. If the property\nis a string value, the value of that string will be applied as the value\nfor an attribute of the property's name.\n\nThe following example creates a tag like ``.\n\n```js {data-filename=app/components/my-component.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n attributeBindings: ['priority'],\n priority: 'high'\n });\n```\n\nIf the value of the property is a Boolean, the attribute is treated as\nan HTML Boolean attribute. It will be present if the property is `true`\nand omitted if the property is `false`.\n\nThe following example creates markup like ``.\n\n```js {data-filename=app/components/my-component.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n attributeBindings: ['visible'],\n visible: true\n });\n```\n\nIf you would prefer to use a custom value instead of the property name,\nyou can create the same markup as the last example with a binding like\nthis:\n\n```js {data-filename=app/components/my-component.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n attributeBindings: ['isVisible:visible'],\n isVisible: true\n });\n```\n\nThis list of attributes is inherited from the component's superclasses,\nas well.", + "itemtype": "property", + "name": "attributeBindings", + "type": "Array", + "default": "[]", + "access": "public", + "tagname": "", + "class": "Component", + "module": "ember", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.ViewMixin" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 166, + "description": "Returns the current DOM element for the view.", + "itemtype": "property", + "name": "element", + "type": "DOMElement", + "access": "public", + "tagname": "", + "class": "Component", + "module": "ember", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.ViewMixin" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 267, + "description": "The HTML `id` of the view's element in the DOM. You can provide this\nvalue yourself but it must be unique (just as in HTML):\n\n```handlebars\n{{my-component elementId=\"a-really-cool-id\"}}\n```\n\nIf not manually set a default value will be provided by the framework.\n\nOnce rendered an element's `elementId` is considered immutable and you\nshould never change it. If you need to compute a dynamic value for the\n`elementId`, you should do this when the component or element is being\ninstantiated:\n\n```js {data-filename=app/components/my-component.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n init() {\n this._super(...arguments);\n let index = this.get('index');\n this.set('elementId', 'component-id' + index);\n }\n });\n```", + "itemtype": "property", + "name": "elementId", + "type": "String", + "access": "public", + "tagname": "", + "class": "Component", + "module": "ember", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.ViewMixin" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 378, + "description": "Tag name for the view's outer element. The tag name is only used when an\nelement is first created. If you change the `tagName` for an element, you\nmust destroy and recreate the view element.\n\nBy default, the render buffer will use a `` tag for views.\n\nIf the tagName is `''`, the view will be tagless, with no outer element.\nComponent properties that depend on the presence of an outer element, such\nas `classNameBindings` and `attributeBindings`, do not work with tagless\ncomponents. Tagless components cannot implement methods to handle events,\nand their `element` property has a `null` value.", + "itemtype": "property", + "name": "tagName", + "type": "String", + "default": "null", + "access": "public", + "tagname": "", + "class": "Component", + "module": "ember", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.ViewMixin" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/child_views_support.ts", + "line": 14, + "description": "Array of child views. You should never edit this array directly.", + "itemtype": "property", + "name": "childViews", + "type": "Array", + "default": "[]", + "access": "private", + "tagname": "", + "class": "Component", + "module": "ember", + "inherited": true, + "inheritedFrom": "Ember.ClassNamesSupport" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/class_names_support.ts", + "line": 36, + "description": "Standard CSS class names to apply to the view's outer element. This\nproperty automatically inherits any class names defined by the view's\nsuperclasses as well.", + "itemtype": "property", + "name": "classNames", + "type": "Array", + "default": "['ember-view']", + "access": "public", + "tagname": "", + "class": "Component", + "module": "ember", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.ClassNamesSupport" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/class_names_support.ts", + "line": 48, + "description": "A list of properties of the view to apply as class names. If the property\nis a string value, the value of that string will be applied as a class\nname.\n\n```javascript\n// Applies the 'high' class to the view element\nimport Component from '@ember/component';\nComponent.extend({\n classNameBindings: ['priority'],\n priority: 'high'\n});\n```\n\nIf the value of the property is a Boolean, the name of that property is\nadded as a dasherized class name.\n\n```javascript\n// Applies the 'is-urgent' class to the view element\nimport Component from '@ember/component';\nComponent.extend({\n classNameBindings: ['isUrgent'],\n isUrgent: true\n});\n```\n\nIf you would prefer to use a custom value instead of the dasherized\nproperty name, you can pass a binding like this:\n\n```javascript\n// Applies the 'urgent' class to the view element\nimport Component from '@ember/component';\nComponent.extend({\n classNameBindings: ['isUrgent:urgent'],\n isUrgent: true\n});\n```\n\nIf you would like to specify a class that should only be added when the\nproperty is false, you can declare a binding like this:\n\n```javascript\n// Applies the 'disabled' class to the view element\nimport Component from '@ember/component';\nComponent.extend({\n classNameBindings: ['isEnabled::disabled'],\n isEnabled: false\n});\n```\n\nThis list of properties is inherited from the component's superclasses as well.", + "itemtype": "property", + "name": "classNameBindings", + "type": "Array", + "default": "[]", + "access": "public", + "tagname": "", + "class": "Component", + "module": "ember", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.ClassNamesSupport" + }, + { + "file": "packages/@ember/-internals/runtime/lib/mixins/action_handler.ts", + "line": 27, + "description": "The collection of functions, keyed by name, available on this\n`ActionHandler` as action targets.\n\nThese functions will be invoked when a matching `{{action}}` is triggered\nfrom within a template and the application's current route is this route.\n\nActions can also be invoked from other parts of your application\nvia `ActionHandler#send`.\n\nThe `actions` hash will inherit action handlers from\nthe `actions` hash defined on extended parent classes\nor mixins rather than just replace the entire hash, e.g.:\n\n```js {data-filename=app/mixins/can-display-banner.js}\nimport Mixin from '@ember/object/mixin';\n\nexport default Mixin.create({\n actions: {\n displayBanner(msg) {\n // ...\n }\n }\n});\n```\n\n```js {data-filename=app/routes/welcome.js}\nimport Route from '@ember/routing/route';\nimport CanDisplayBanner from '../mixins/can-display-banner';\n\nexport default Route.extend(CanDisplayBanner, {\n actions: {\n playMusic() {\n // ...\n }\n }\n});\n\n// `WelcomeRoute`, when active, will be able to respond\n// to both actions, since the actions hash is merged rather\n// then replaced when extending mixins / parent classes.\nthis.send('displayBanner');\nthis.send('playMusic');\n```\n\nWithin a Controller, Route or Component's action handler,\nthe value of the `this` context is the Controller, Route or\nComponent object:\n\n```js {data-filename=app/routes/song.js}\nimport Route from '@ember/routing/route';\n\nexport default Route.extend({\n actions: {\n myAction() {\n this.controllerFor(\"song\");\n this.transitionTo(\"other.route\");\n ...\n }\n }\n});\n```\n\nIt is also possible to call `this._super(...arguments)` from within an\naction handler if it overrides a handler defined on a parent\nclass or mixin:\n\nTake for example the following routes:\n\n```js {data-filename=app/mixins/debug-route.js}\nimport Mixin from '@ember/object/mixin';\n\nexport default Mixin.create({\n actions: {\n debugRouteInformation() {\n console.debug(\"It's a-me, console.debug!\");\n }\n }\n});\n```\n\n```js {data-filename=app/routes/annoying-debug.js}\nimport Route from '@ember/routing/route';\nimport DebugRoute from '../mixins/debug-route';\n\nexport default Route.extend(DebugRoute, {\n actions: {\n debugRouteInformation() {\n // also call the debugRouteInformation of mixed in DebugRoute\n this._super(...arguments);\n\n // show additional annoyance\n window.alert(...);\n }\n }\n});\n```\n\n## Bubbling\n\nBy default, an action will stop bubbling once a handler defined\non the `actions` hash handles it. To continue bubbling the action,\nyou must return `true` from the handler:\n\n```js {data-filename=app/router.js}\nRouter.map(function() {\n this.route(\"album\", function() {\n this.route(\"song\");\n });\n});\n```\n\n```js {data-filename=app/routes/album.js}\nimport Route from '@ember/routing/route';\n\nexport default Route.extend({\n actions: {\n startPlaying: function() {\n }\n }\n});\n```\n\n```js {data-filename=app/routes/album-song.js}\nimport Route from '@ember/routing/route';\n\nexport default Route.extend({\n actions: {\n startPlaying() {\n // ...\n\n if (actionShouldAlsoBeTriggeredOnParentRoute) {\n return true;\n }\n }\n }\n});\n```", + "itemtype": "property", + "name": "actions", + "type": "Object", + "default": "null", + "access": "public", + "tagname": "", + "class": "Component", + "module": "ember", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.ActionHandler" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 355, + "description": "Defines the properties that will be concatenated from the superclass\n(instead of overridden).\n\nBy default, when you extend an Ember class a property defined in\nthe subclass overrides a property with the same name that is defined\nin the superclass. However, there are some cases where it is preferable\nto build up a property's value by combining the superclass' property\nvalue with the subclass' value. An example of this in use within Ember\nis the `classNames` property of `Component` from `@ember/component`.\n\nHere is some sample code showing the difference between a concatenated\nproperty and a normal one:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Bar = EmberObject.extend({\n // Configure which properties to concatenate\n concatenatedProperties: ['concatenatedProperty'],\n\n someNonConcatenatedProperty: ['bar'],\n concatenatedProperty: ['bar']\n});\n\nconst FooBar = Bar.extend({\n someNonConcatenatedProperty: ['foo'],\n concatenatedProperty: ['foo']\n});\n\nlet fooBar = FooBar.create();\nfooBar.get('someNonConcatenatedProperty'); // ['foo']\nfooBar.get('concatenatedProperty'); // ['bar', 'foo']\n```\n\nThis behavior extends to object creation as well. Continuing the\nabove example:\n\n```javascript\nlet fooBar = FooBar.create({\n someNonConcatenatedProperty: ['baz'],\n concatenatedProperty: ['baz']\n})\nfooBar.get('someNonConcatenatedProperty'); // ['baz']\nfooBar.get('concatenatedProperty'); // ['bar', 'foo', 'baz']\n```\n\nAdding a single property that is not an array will just add it in the array:\n\n```javascript\nlet fooBar = FooBar.create({\n concatenatedProperty: 'baz'\n})\nview.get('concatenatedProperty'); // ['bar', 'foo', 'baz']\n```\n\nUsing the `concatenatedProperties` property, we can tell Ember to mix the\ncontent of the properties.\n\nIn `Component` the `classNames`, `classNameBindings` and\n`attributeBindings` properties are concatenated.\n\nThis feature is available for you to use throughout the Ember object model,\nalthough typical app developers are likely to use it infrequently. Since\nit changes expectations about behavior of properties, you should properly\ndocument its usage in each individual concatenated property (to not\nmislead your users to think they can override the property in a subclass).", + "itemtype": "property", + "name": "concatenatedProperties", + "type": "Array", + "default": "null", + "access": "public", + "tagname": "", + "class": "Component", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 429, + "description": "Defines the properties that will be merged from the superclass\n(instead of overridden).\n\nBy default, when you extend an Ember class a property defined in\nthe subclass overrides a property with the same name that is defined\nin the superclass. However, there are some cases where it is preferable\nto build up a property's value by merging the superclass property value\nwith the subclass property's value. An example of this in use within Ember\nis the `queryParams` property of routes.\n\nHere is some sample code showing the difference between a merged\nproperty and a normal one:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Bar = EmberObject.extend({\n // Configure which properties are to be merged\n mergedProperties: ['mergedProperty'],\n\n someNonMergedProperty: {\n nonMerged: 'superclass value of nonMerged'\n },\n mergedProperty: {\n page: { replace: false },\n limit: { replace: true }\n }\n});\n\nconst FooBar = Bar.extend({\n someNonMergedProperty: {\n completelyNonMerged: 'subclass value of nonMerged'\n },\n mergedProperty: {\n limit: { replace: false }\n }\n});\n\nlet fooBar = FooBar.create();\n\nfooBar.get('someNonMergedProperty');\n// => { completelyNonMerged: 'subclass value of nonMerged' }\n//\n// Note the entire object, including the nonMerged property of\n// the superclass object, has been replaced\n\nfooBar.get('mergedProperty');\n// => {\n// page: {replace: false},\n// limit: {replace: false}\n// }\n//\n// Note the page remains from the superclass, and the\n// `limit` property's value of `false` has been merged from\n// the subclass.\n```\n\nThis behavior is not available during object `create` calls. It is only\navailable at `extend` time.\n\nIn `Route` the `queryParams` property is merged.\n\nThis feature is available for you to use throughout the Ember object model,\nalthough typical app developers are likely to use it infrequently. Since\nit changes expectations about behavior of properties, you should properly\ndocument its usage in each individual merged property (to not\nmislead your users to think they can override the property in a subclass).", + "itemtype": "property", + "name": "mergedProperties", + "type": "Array", + "default": "null", + "access": "public", + "tagname": "", + "class": "Component", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 504, + "description": "Destroyed object property flag.\n\nif this property is `true` the observers and bindings were already\nremoved by the effect of calling the `destroy()` method.", + "itemtype": "property", + "name": "isDestroyed", + "default": "false", + "access": "public", + "tagname": "", + "class": "Component", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 522, + "description": "Destruction scheduled flag. The `destroy()` method has been called.\n\nThe object stays intact until the end of the run loop at which point\nthe `isDestroyed` flag is set.", + "itemtype": "property", + "name": "isDestroying", + "default": "false", + "access": "public", + "tagname": "", + "class": "Component", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + } + ] + }, + "relationships": { + "parent-class": { + "data": { + "id": "ember-5.12.0-Ember.CoreView", + "type": "class" + } + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/component", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-ComponentStateBucket.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-ComponentStateBucket.json new file mode 100644 index 000000000..dfad22b6d --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-ComponentStateBucket.json @@ -0,0 +1,45 @@ +{ + "data": { + "id": "ember-5.12.0-ComponentStateBucket", + "type": "class", + "attributes": { + "name": "ComponentStateBucket", + "shortname": "ComponentStateBucket", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "ember", + "namespace": "", + "file": "packages/@ember/-internals/glimmer/lib/utils/curly-component-state-bucket.ts", + "line": 17, + "description": "Represents the internal state of the component.", + "access": "private", + "tagname": "", + "methods": [], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-ember", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-ComputedProperty.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-ComputedProperty.json new file mode 100644 index 000000000..e3773a900 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-ComputedProperty.json @@ -0,0 +1,81 @@ +{ + "data": { + "id": "ember-5.12.0-ComputedProperty", + "type": "class", + "attributes": { + "name": "ComputedProperty", + "shortname": "ComputedProperty", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/object", + "namespace": "", + "file": "packages/@ember/-internals/metal/lib/computed.ts", + "line": 76, + "description": "`@computed` is a decorator that turns a JavaScript getter and setter into a\ncomputed property, which is a _cached, trackable value_. By default the getter\nwill only be called once and the result will be cached. You can specify\nvarious properties that your computed property depends on. This will force the\ncached result to be cleared if the dependencies are modified, and lazily recomputed the next time something asks for it.\n\nIn the following example we decorate a getter - `fullName` - by calling\n`computed` with the property dependencies (`firstName` and `lastName`) as\narguments. The `fullName` getter will be called once (regardless of how many\ntimes it is accessed) as long as its dependencies do not change. Once\n`firstName` or `lastName` are updated any future calls to `fullName` will\nincorporate the new values, and any watchers of the value such as templates\nwill be updated:\n\n```javascript\nimport { computed, set } from '@ember/object';\n\nclass Person {\n constructor(firstName, lastName) {\n set(this, 'firstName', firstName);\n set(this, 'lastName', lastName);\n }\n\n @computed('firstName', 'lastName')\n get fullName() {\n return `${this.firstName} ${this.lastName}`;\n }\n});\n\nlet tom = new Person('Tom', 'Dale');\n\ntom.fullName; // 'Tom Dale'\n```\n\nYou can also provide a setter, which will be used when updating the computed\nproperty. Ember's `set` function must be used to update the property\nsince it will also notify observers of the property:\n\n```javascript\nimport { computed, set } from '@ember/object';\n\nclass Person {\n constructor(firstName, lastName) {\n set(this, 'firstName', firstName);\n set(this, 'lastName', lastName);\n }\n\n @computed('firstName', 'lastName')\n get fullName() {\n return `${this.firstName} ${this.lastName}`;\n }\n\n set fullName(value) {\n let [firstName, lastName] = value.split(' ');\n\n set(this, 'firstName', firstName);\n set(this, 'lastName', lastName);\n }\n});\n\nlet person = new Person();\n\nset(person, 'fullName', 'Peter Wagenet');\nperson.firstName; // 'Peter'\nperson.lastName; // 'Wagenet'\n```\n\nYou can also pass a getter function or object with `get` and `set` functions\nas the last argument to the computed decorator. This allows you to define\ncomputed property _macros_:\n\n```js\nimport { computed } from '@ember/object';\n\nfunction join(...keys) {\n return computed(...keys, function() {\n return keys.map(key => this[key]).join(' ');\n });\n}\n\nclass Person {\n @join('firstName', 'lastName')\n fullName;\n}\n```\n\nNote that when defined this way, getters and setters receive the _key_ of the\nproperty they are decorating as the first argument. Setters receive the value\nthey are setting to as the second argument instead. Additionally, setters must\n_return_ the value that should be cached:\n\n```javascript\nimport { computed, set } from '@ember/object';\n\nfunction fullNameMacro(firstNameKey, lastNameKey) {\n return computed(firstNameKey, lastNameKey, {\n get() {\n return `${this[firstNameKey]} ${this[lastNameKey]}`;\n }\n\n set(key, value) {\n let [firstName, lastName] = value.split(' ');\n\n set(this, firstNameKey, firstName);\n set(this, lastNameKey, lastName);\n\n return value;\n }\n });\n}\n\nclass Person {\n constructor(firstName, lastName) {\n set(this, 'firstName', firstName);\n set(this, 'lastName', lastName);\n }\n\n @fullNameMacro('firstName', 'lastName') fullName;\n});\n\nlet person = new Person();\n\nset(person, 'fullName', 'Peter Wagenet');\nperson.firstName; // 'Peter'\nperson.lastName; // 'Wagenet'\n```\n\nComputed properties can also be used in classic classes. To do this, we\nprovide the getter and setter as the last argument like we would for a macro,\nand we assign it to a property on the class definition. This is an _anonymous_\ncomputed macro:\n\n```javascript\nimport EmberObject, { computed, set } from '@ember/object';\n\nlet Person = EmberObject.extend({\n // these will be supplied by `create`\n firstName: null,\n lastName: null,\n\n fullName: computed('firstName', 'lastName', {\n get() {\n return `${this.firstName} ${this.lastName}`;\n }\n\n set(key, value) {\n let [firstName, lastName] = value.split(' ');\n\n set(this, 'firstName', firstName);\n set(this, 'lastName', lastName);\n\n return value;\n }\n })\n});\n\nlet tom = Person.create({\n firstName: 'Tom',\n lastName: 'Dale'\n});\n\ntom.get('fullName') // 'Tom Dale'\n```\n\nYou can overwrite computed property without setters with a normal property (no\nlonger computed) that won't change if dependencies change. You can also mark\ncomputed property as `.readOnly()` and block all attempts to set it.\n\n```javascript\nimport { computed, set } from '@ember/object';\n\nclass Person {\n constructor(firstName, lastName) {\n set(this, 'firstName', firstName);\n set(this, 'lastName', lastName);\n }\n\n @computed('firstName', 'lastName').readOnly()\n get fullName() {\n return `${this.firstName} ${this.lastName}`;\n }\n});\n\nlet person = new Person();\nperson.set('fullName', 'Peter Wagenet'); // Uncaught Error: Cannot set read-only property \"fullName\" on object: <(...):emberXXX>\n```\n\nAdditional resources:\n- [Decorators RFC](https://github.com/emberjs/rfcs/blob/master/text/0408-decorators.md)\n- [New CP syntax RFC](https://github.com/emberjs/rfcs/blob/master/text/0011-improved-cp-syntax.md)\n- [New computed syntax explained in \"Ember 1.12 released\" ](https://emberjs.com/blog/2015/05/13/ember-1-12-released.html#toc_new-computed-syntax)", + "access": "public", + "tagname": "", + "methods": [ + { + "file": "packages/@ember/-internals/metal/lib/computed.ts", + "line": 606, + "description": "Call on a computed property to set it into read-only mode. When in this\nmode the computed property will throw an error when set.\n\nExample:\n\n```javascript\nimport { computed, set } from '@ember/object';\n\nclass Person {\n @computed().readOnly()\n get guid() {\n return 'guid-guid-guid';\n }\n}\n\nlet person = new Person();\nset(person, 'guid', 'new-guid'); // will throw an exception\n```\n\nClassic Class Example:\n\n```javascript\nimport EmberObject, { computed } from '@ember/object';\n\nlet Person = EmberObject.extend({\n guid: computed(function() {\n return 'guid-guid-guid';\n }).readOnly()\n});\n\nlet person = Person.create();\nperson.set('guid', 'new-guid'); // will throw an exception\n```", + "itemtype": "method", + "name": "readOnly", + "return": { + "description": "this", + "type": "ComputedProperty" + }, + "chainable": 1, + "access": "public", + "tagname": "", + "class": "ComputedProperty", + "module": "@ember/object" + }, + { + "file": "packages/@ember/-internals/metal/lib/computed.ts", + "line": 656, + "description": "In some cases, you may want to annotate computed properties with additional\nmetadata about how they function or what values they operate on. For example,\ncomputed property functions may close over variables that are then no longer\navailable for introspection. You can pass a hash of these values to a\ncomputed property.\n\nExample:\n\n```javascript\nimport { computed } from '@ember/object';\nimport Person from 'my-app/utils/person';\n\nclass Store {\n @computed().meta({ type: Person })\n get person() {\n let personId = this.personId;\n return Person.create({ id: personId });\n }\n}\n```\n\nClassic Class Example:\n\n```javascript\nimport { computed } from '@ember/object';\nimport Person from 'my-app/utils/person';\n\nconst Store = EmberObject.extend({\n person: computed(function() {\n let personId = this.get('personId');\n return Person.create({ id: personId });\n }).meta({ type: Person })\n});\n```\n\nThe hash that you pass to the `meta()` function will be saved on the\ncomputed property descriptor under the `_meta` key. Ember runtime\nexposes a public API for retrieving these values from classes,\nvia the `metaForProperty()` function.", + "itemtype": "method", + "name": "meta", + "params": [ + { + "name": "meta", + "description": "", + "type": "Object" + } + ], + "chainable": 1, + "access": "public", + "tagname": "", + "class": "ComputedProperty", + "module": "@ember/object" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/object", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-Container.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-Container.json new file mode 100644 index 000000000..0bdeda274 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-Container.json @@ -0,0 +1,175 @@ +{ + "data": { + "id": "ember-5.12.0-Container", + "type": "class", + "attributes": { + "name": "Container", + "shortname": "Container", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "rsvp", + "namespace": "", + "file": "packages/@ember/-internals/container/lib/container.ts", + "line": 63, + "description": "A container used to instantiate and cache objects.\n\nEvery `Container` must be associated with a `Registry`, which is referenced\nto determine the factory and options that should be used to instantiate\nobjects.\n\nThe public API for `Container` is still in flux and should not be considered\nstable.", + "access": "private", + "tagname": "", + "methods": [ + { + "file": "packages/@ember/-internals/container/lib/container.ts", + "line": 122, + "description": "Given a fullName return a corresponding instance.\n The default behavior is for lookup to return a singleton instance.\nThe singleton is scoped to the container, allowing multiple containers\nto all have their own locally scoped singletons.\n ```javascript\nlet registry = new Registry();\nlet container = registry.container();\n registry.register('api:twitter', Twitter);\n let twitter = container.lookup('api:twitter');\n twitter instanceof Twitter; // => true\n // by default the container will return singletons\nlet twitter2 = container.lookup('api:twitter');\ntwitter2 instanceof Twitter; // => true\n twitter === twitter2; //=> true\n```\n If singletons are not wanted, an optional flag can be provided at lookup.\n ```javascript\nlet registry = new Registry();\nlet container = registry.container();\n registry.register('api:twitter', Twitter);\n let twitter = container.lookup('api:twitter', { singleton: false });\nlet twitter2 = container.lookup('api:twitter', { singleton: false });\n twitter === twitter2; //=> false\n```", + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "lookup", + "params": [ + { + "name": "fullName", + "description": "", + "type": "String" + }, + { + "name": "options", + "description": "", + "type": "RegisterOptions", + "optional": true + } + ], + "return": { + "description": "", + "type": "Any" + }, + "class": "Container", + "module": "rsvp" + }, + { + "file": "packages/@ember/-internals/container/lib/container.ts", + "line": 164, + "description": "A depth first traversal, destroying the container, its descendant containers and all\ntheir managed objects.", + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "destroy", + "class": "Container", + "module": "rsvp" + }, + { + "file": "packages/@ember/-internals/container/lib/container.ts", + "line": 181, + "description": "Clear either the entire cache or just the cache for a particular key.", + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "reset", + "params": [ + { + "name": "fullName", + "description": "optional key to reset; if missing, resets everything", + "type": "String" + } + ], + "class": "Container", + "module": "rsvp" + }, + { + "file": "packages/@ember/-internals/container/lib/container.ts", + "line": 198, + "description": "Returns an object that can be used to provide an owner to a\nmanually created instance.", + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "ownerInjection", + "return": { + "description": "", + "type": "Object" + }, + "class": "Container", + "module": "rsvp" + }, + { + "file": "packages/@ember/-internals/container/lib/container.ts", + "line": 211, + "description": "Given a fullName, return the corresponding factory. The consumer of the factory\nis responsible for the destruction of any factory instances, as there is no\nway for the container to ensure instances are destroyed when it itself is\ndestroyed.", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "factoryFor", + "params": [ + { + "name": "fullName", + "description": "", + "type": "String" + } + ], + "return": { + "description": "", + "type": "Any" + }, + "class": "Container", + "module": "rsvp" + } + ], + "events": [], + "properties": [ + { + "file": "packages/@ember/-internals/container/lib/container.ts", + "line": 103, + "access": "private", + "tagname": "", + "itemtype": "property", + "name": "registry", + "type": "Registry", + "since": "1.11.0", + "class": "Container", + "module": "rsvp" + }, + { + "file": "packages/@ember/-internals/container/lib/container.ts", + "line": 110, + "access": "private", + "tagname": "", + "itemtype": "property", + "name": "cache", + "type": "InheritingDict", + "class": "Container", + "module": "rsvp" + }, + { + "file": "packages/@ember/-internals/container/lib/container.ts", + "line": 116, + "access": "private", + "tagname": "", + "itemtype": "property", + "name": "validationCache", + "type": "InheritingDict", + "class": "Container", + "module": "rsvp" + } + ] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-rsvp", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-ContainerDebugAdapter.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-ContainerDebugAdapter.json new file mode 100644 index 000000000..7f34b8e6d --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-ContainerDebugAdapter.json @@ -0,0 +1,592 @@ +{ + "data": { + "id": "ember-5.12.0-ContainerDebugAdapter", + "type": "class", + "attributes": { + "name": "ContainerDebugAdapter", + "shortname": "ContainerDebugAdapter", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/debug/container-debug-adapter", + "namespace": "", + "file": "packages/@ember/debug/container-debug-adapter.ts", + "line": 13, + "description": "The `ContainerDebugAdapter` helps the container and resolver interface\nwith tools that debug Ember such as the\n[Ember Inspector](https://github.com/emberjs/ember-inspector)\nfor Chrome and Firefox.\n\nThis class can be extended by a custom resolver implementer\nto override some of the methods with library-specific code.\n\nThe methods likely to be overridden are:\n\n* `canCatalogEntriesByType`\n* `catalogEntriesByType`\n\nThe adapter will need to be registered\nin the application's container as `container-debug-adapter:main`.\n\nExample:\n\n```javascript\nApplication.initializer({\n name: \"containerDebugAdapter\",\n\n initialize(application) {\n application.register('container-debug-adapter:main', require('app/container-debug-adapter'));\n }\n});\n```", + "extends": "EmberObject", + "since": "1.5.0", + "access": "public", + "tagname": "", + "methods": [ + { + "file": "packages/@ember/debug/container-debug-adapter.ts", + "line": 64, + "description": "Returns true if it is possible to catalog a list of available\nclasses in the resolver for a given type.", + "itemtype": "method", + "name": "canCatalogEntriesByType", + "params": [ + { + "name": "type", + "description": "The type. e.g. \"model\", \"controller\", \"route\".", + "type": "String" + } + ], + "return": { + "description": "whether a list is available for this type.", + "type": "Boolean" + }, + "access": "public", + "tagname": "", + "class": "ContainerDebugAdapter", + "module": "@ember/debug/container-debug-adapter" + }, + { + "file": "packages/@ember/debug/container-debug-adapter.ts", + "line": 81, + "description": "Returns the available classes a given type.", + "itemtype": "method", + "name": "catalogEntriesByType", + "params": [ + { + "name": "type", + "description": "The type. e.g. \"model\", \"controller\", \"route\".", + "type": "String" + } + ], + "return": { + "description": "An array of strings.", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "ContainerDebugAdapter", + "module": "@ember/debug/container-debug-adapter" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 321, + "description": "An overridable method called when objects are instantiated. By default,\ndoes nothing unless it is overridden during class definition.\n\nExample:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Person = EmberObject.extend({\n init() {\n alert(`Name is ${this.get('name')}`);\n }\n});\n\nlet steve = Person.create({\n name: 'Steve'\n});\n\n// alerts 'Name is Steve'.\n```\n\nNOTE: If you do override `init` for a framework class like `Component`\nfrom `@ember/component`, be sure to call `this._super(...arguments)`\nin your `init` declaration!\nIf you don't, Ember may not have an opportunity to\ndo important setup work, and you'll see strange behavior in your\napplication.", + "itemtype": "method", + "name": "init", + "access": "public", + "tagname": "", + "class": "ContainerDebugAdapter", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 540, + "description": "Destroys an object by setting the `isDestroyed` flag and removing its\nmetadata, which effectively destroys observers and bindings.\n\nIf you try to set a property on a destroyed object, an exception will be\nraised.\n\nNote that destruction is scheduled for the end of the run loop and does not\nhappen immediately. It will set an isDestroying flag immediately.", + "itemtype": "method", + "name": "destroy", + "return": { + "description": "receiver", + "type": "EmberObject" + }, + "access": "public", + "tagname": "", + "class": "ContainerDebugAdapter", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 567, + "description": "Override to implement teardown.", + "itemtype": "method", + "name": "willDestroy", + "access": "public", + "tagname": "", + "class": "ContainerDebugAdapter", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 575, + "description": "Returns a string representation which attempts to provide more information\nthan Javascript's `toString` typically does, in a generic way for all Ember\nobjects.\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Person = EmberObject.extend();\nperson = Person.create();\nperson.toString(); //=> \"\"\n```\n\nIf the object's class is not defined on an Ember namespace, it will\nindicate it is a subclass of the registered superclass:\n\n```javascript\nconst Student = Person.extend();\nlet student = Student.create();\nstudent.toString(); //=> \"<(subclass of Person):ember1025>\"\n```\n\nIf the method `toStringExtension` is defined, its return value will be\nincluded in the output.\n\n```javascript\nconst Teacher = Person.extend({\n toStringExtension() {\n return this.get('fullName');\n }\n});\nteacher = Teacher.create();\nteacher.toString(); //=> \"\"\n```", + "itemtype": "method", + "name": "toString", + "return": { + "description": "string representation", + "type": "String" + }, + "access": "public", + "tagname": "", + "class": "ContainerDebugAdapter", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 97, + "description": "Retrieves the value of a property from the object.\n\nThis method is usually similar to using `object[keyName]` or `object.keyName`,\nhowever it supports both computed properties and the unknownProperty\nhandler.\n\nBecause `get` unifies the syntax for accessing all these kinds\nof properties, it can make many refactorings easier, such as replacing a\nsimple property with a computed property, or vice versa.\n\n### Computed Properties\n\nComputed properties are methods defined with the `property` modifier\ndeclared at the end, such as:\n\n```javascript\nimport { computed } from '@ember/object';\n\nfullName: computed('firstName', 'lastName', function() {\n return this.get('firstName') + ' ' + this.get('lastName');\n})\n```\n\nWhen you call `get` on a computed property, the function will be\ncalled and the return value will be returned instead of the function\nitself.\n\n### Unknown Properties\n\nLikewise, if you try to call `get` on a property whose value is\n`undefined`, the `unknownProperty()` method will be called on the object.\nIf this method returns any value other than `undefined`, it will be returned\ninstead. This allows you to implement \"virtual\" properties that are\nnot defined upfront.", + "itemtype": "method", + "name": "get", + "params": [ + { + "name": "keyName", + "description": "The property to retrieve", + "type": "String" + } + ], + "return": { + "description": "The property value or undefined.", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "ContainerDebugAdapter", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 141, + "description": "To get the values of multiple properties at once, call `getProperties`\nwith a list of strings or an array:\n\n```javascript\nrecord.getProperties('firstName', 'lastName', 'zipCode');\n// { firstName: 'John', lastName: 'Doe', zipCode: '10011' }\n```\n\nis equivalent to:\n\n```javascript\nrecord.getProperties(['firstName', 'lastName', 'zipCode']);\n// { firstName: 'John', lastName: 'Doe', zipCode: '10011' }\n```", + "itemtype": "method", + "name": "getProperties", + "params": [ + { + "name": "list", + "description": "of keys to get", + "type": "String...|Array" + } + ], + "return": { + "description": "", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "ContainerDebugAdapter", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 168, + "description": "Sets the provided key or path to the value.\n\n```javascript\nrecord.set(\"key\", value);\n```\n\nThis method is generally very similar to calling `object[\"key\"] = value` or\n`object.key = value`, except that it provides support for computed\nproperties, the `setUnknownProperty()` method and property observers.\n\n### Computed Properties\n\nIf you try to set a value on a key that has a computed property handler\ndefined (see the `get()` method for an example), then `set()` will call\nthat method, passing both the value and key instead of simply changing\nthe value itself. This is useful for those times when you need to\nimplement a property that is composed of one or more member\nproperties.\n\n### Unknown Properties\n\nIf you try to set a value on a key that is undefined in the target\nobject, then the `setUnknownProperty()` handler will be called instead. This\ngives you an opportunity to implement complex \"virtual\" properties that\nare not predefined on the object. If `setUnknownProperty()` returns\nundefined, then `set()` will simply set the value on the object.\n\n### Property Observers\n\nIn addition to changing the property, `set()` will also register a property\nchange with the object. Unless you have placed this call inside of a\n`beginPropertyChanges()` and `endPropertyChanges(),` any \"local\" observers\n(i.e. observer methods declared on the same object), will be called\nimmediately. Any \"remote\" observers (i.e. observer methods declared on\nanother object) will be placed in a queue and called at a later time in a\ncoalesced manner.", + "itemtype": "method", + "name": "set", + "params": [ + { + "name": "keyName", + "description": "The property to set", + "type": "String" + }, + { + "name": "value", + "description": "The value to set or `null`.", + "type": "Object" + } + ], + "return": { + "description": "The passed value", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "ContainerDebugAdapter", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 216, + "description": "Sets a list of properties at once. These properties are set inside\na single `beginPropertyChanges` and `endPropertyChanges` batch, so\nobservers will be buffered.\n\n```javascript\nrecord.setProperties({ firstName: 'Charles', lastName: 'Jolley' });\n```", + "itemtype": "method", + "name": "setProperties", + "params": [ + { + "name": "hash", + "description": "the hash of keys and values to set", + "type": "Object" + } + ], + "return": { + "description": "The passed in hash", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "ContainerDebugAdapter", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 233, + "description": "Convenience method to call `propertyWillChange` and `propertyDidChange` in\nsuccession.\n\nNotify the observer system that a property has just changed.\n\nSometimes you need to change a value directly or indirectly without\nactually calling `get()` or `set()` on it. In this case, you can use this\nmethod instead. Calling this method will notify all observers that the\nproperty has potentially changed value.", + "itemtype": "method", + "name": "notifyPropertyChange", + "params": [ + { + "name": "keyName", + "description": "The property key to be notified about.", + "type": "String" + } + ], + "return": { + "description": "", + "type": "Observable" + }, + "access": "public", + "tagname": "", + "class": "ContainerDebugAdapter", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 251, + "description": "Adds an observer on a property.\n\nThis is the core method used to register an observer for a property.\n\nOnce you call this method, any time the key's value is set, your observer\nwill be notified. Note that the observers are triggered any time the\nvalue is set, regardless of whether it has actually changed. Your\nobserver should be prepared to handle that.\n\nThere are two common invocation patterns for `.addObserver()`:\n\n- Passing two arguments:\n - the name of the property to observe (as a string)\n - the function to invoke (an actual function)\n- Passing three arguments:\n - the name of the property to observe (as a string)\n - the target object (will be used to look up and invoke a\n function on)\n - the name of the function to invoke on the target object\n (as a string).\n\n```js {data-filename=app/components/my-component.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n init() {\n this._super(...arguments);\n\n // the following are equivalent:\n\n // using three arguments\n this.addObserver('foo', this, 'fooDidChange');\n\n // using two arguments\n this.addObserver('foo', (...args) => {\n this.fooDidChange(...args);\n });\n },\n\n fooDidChange() {\n // your custom logic code\n }\n});\n```\n\n### Observer Methods\n\nObserver methods have the following signature:\n\n```js {data-filename=app/components/my-component.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n init() {\n this._super(...arguments);\n this.addObserver('foo', this, 'fooDidChange');\n },\n\n fooDidChange(sender, key, value, rev) {\n // your code\n }\n});\n```\n\nThe `sender` is the object that changed. The `key` is the property that\nchanges. The `value` property is currently reserved and unused. The `rev`\nis the last property revision of the object when it changed, which you can\nuse to detect if the key value has really changed or not.\n\nUsually you will not need the value or revision parameters at\nthe end. In this case, it is common to write observer methods that take\nonly a sender and key value as parameters or, if you aren't interested in\nany of these values, to write an observer that has no parameters at all.", + "itemtype": "method", + "name": "addObserver", + "params": [ + { + "name": "key", + "description": "The key to observe", + "type": "String" + }, + { + "name": "target", + "description": "The target object to invoke", + "type": "Object" + }, + { + "name": "method", + "description": "The method to invoke", + "type": "String|Function" + }, + { + "name": "sync", + "description": "Whether the observer is sync or not", + "type": "Boolean" + } + ], + "return": { + "description": "", + "type": "Observable" + }, + "access": "public", + "tagname": "", + "class": "ContainerDebugAdapter", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 337, + "description": "Remove an observer you have previously registered on this object. Pass\nthe same key, target, and method you passed to `addObserver()` and your\ntarget will no longer receive notifications.", + "itemtype": "method", + "name": "removeObserver", + "params": [ + { + "name": "key", + "description": "The key to observe", + "type": "String" + }, + { + "name": "target", + "description": "The target object to invoke", + "type": "Object" + }, + { + "name": "method", + "description": "The method to invoke", + "type": "String|Function" + }, + { + "name": "sync", + "description": "Whether the observer is async or not", + "type": "Boolean" + } + ], + "return": { + "description": "", + "type": "Observable" + }, + "access": "public", + "tagname": "", + "class": "ContainerDebugAdapter", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 358, + "description": "Set the value of a property to the current value plus some amount.\n\n```javascript\nperson.incrementProperty('age');\nteam.incrementProperty('score', 2);\n```", + "itemtype": "method", + "name": "incrementProperty", + "params": [ + { + "name": "keyName", + "description": "The name of the property to increment", + "type": "String" + }, + { + "name": "increment", + "description": "The amount to increment by. Defaults to 1", + "type": "Number" + } + ], + "return": { + "description": "The new property value", + "type": "Number" + }, + "access": "public", + "tagname": "", + "class": "ContainerDebugAdapter", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 375, + "description": "Set the value of a property to the current value minus some amount.\n\n```javascript\nplayer.decrementProperty('lives');\norc.decrementProperty('health', 5);\n```", + "itemtype": "method", + "name": "decrementProperty", + "params": [ + { + "name": "keyName", + "description": "The name of the property to decrement", + "type": "String" + }, + { + "name": "decrement", + "description": "The amount to decrement by. Defaults to 1", + "type": "Number" + } + ], + "return": { + "description": "The new property value", + "type": "Number" + }, + "access": "public", + "tagname": "", + "class": "ContainerDebugAdapter", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 392, + "description": "Set the value of a boolean property to the opposite of its\ncurrent value.\n\n```javascript\nstarship.toggleProperty('warpDriveEngaged');\n```", + "itemtype": "method", + "name": "toggleProperty", + "params": [ + { + "name": "keyName", + "description": "The name of the property to toggle", + "type": "String" + } + ], + "return": { + "description": "The new property value", + "type": "Boolean" + }, + "access": "public", + "tagname": "", + "class": "ContainerDebugAdapter", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 407, + "description": "Returns the cached value of a computed property, if it exists.\nThis allows you to inspect the value of a computed property\nwithout accidentally invoking it if it is intended to be\ngenerated lazily.", + "itemtype": "method", + "name": "cacheFor", + "params": [ + { + "name": "keyName", + "description": "", + "type": "String" + } + ], + "return": { + "description": "The cached value of the computed property, if any", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "ContainerDebugAdapter", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 437, + "description": "Begins a grouping of property changes.\n\nYou can use this method to group property changes so that notifications\nwill not be sent until the changes are finished. If you plan to make a\nlarge number of changes to an object at one time, you should call this\nmethod at the beginning of the changes to begin deferring change\nnotifications. When you are done making changes, call\n`endPropertyChanges()` to deliver the deferred change notifications and end\ndeferring.", + "itemtype": "method", + "name": "beginPropertyChanges", + "return": { + "description": "", + "type": "Observable" + }, + "access": "private", + "tagname": "", + "class": "ContainerDebugAdapter", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 457, + "description": "Ends a grouping of property changes.\n\nYou can use this method to group property changes so that notifications\nwill not be sent until the changes are finished. If you plan to make a\nlarge number of changes to an object at one time, you should call\n`beginPropertyChanges()` at the beginning of the changes to defer change\nnotifications. When you are done making changes, call this method to\ndeliver the deferred change notifications and end deferring.", + "itemtype": "method", + "name": "endPropertyChanges", + "return": { + "description": "", + "type": "Observable" + }, + "access": "private", + "tagname": "", + "class": "ContainerDebugAdapter", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 501, + "description": "Returns `true` if the object currently has observers registered for a\nparticular key. You can use this method to potentially defer performing\nan expensive action until someone begins observing a particular property\non the object.", + "itemtype": "method", + "name": "hasObserverFor", + "params": [ + { + "name": "key", + "description": "Key to check", + "type": "String" + } + ], + "return": { + "description": "", + "type": "Boolean" + }, + "access": "private", + "tagname": "", + "class": "ContainerDebugAdapter", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + } + ], + "events": [], + "properties": [ + { + "file": "packages/@ember/debug/container-debug-adapter.ts", + "line": 54, + "description": "The resolver instance of the application\nbeing debugged. This property will be injected\non creation.", + "itemtype": "property", + "name": "resolver", + "access": "public", + "tagname": "", + "class": "ContainerDebugAdapter", + "module": "@ember/debug/container-debug-adapter" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 355, + "description": "Defines the properties that will be concatenated from the superclass\n(instead of overridden).\n\nBy default, when you extend an Ember class a property defined in\nthe subclass overrides a property with the same name that is defined\nin the superclass. However, there are some cases where it is preferable\nto build up a property's value by combining the superclass' property\nvalue with the subclass' value. An example of this in use within Ember\nis the `classNames` property of `Component` from `@ember/component`.\n\nHere is some sample code showing the difference between a concatenated\nproperty and a normal one:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Bar = EmberObject.extend({\n // Configure which properties to concatenate\n concatenatedProperties: ['concatenatedProperty'],\n\n someNonConcatenatedProperty: ['bar'],\n concatenatedProperty: ['bar']\n});\n\nconst FooBar = Bar.extend({\n someNonConcatenatedProperty: ['foo'],\n concatenatedProperty: ['foo']\n});\n\nlet fooBar = FooBar.create();\nfooBar.get('someNonConcatenatedProperty'); // ['foo']\nfooBar.get('concatenatedProperty'); // ['bar', 'foo']\n```\n\nThis behavior extends to object creation as well. Continuing the\nabove example:\n\n```javascript\nlet fooBar = FooBar.create({\n someNonConcatenatedProperty: ['baz'],\n concatenatedProperty: ['baz']\n})\nfooBar.get('someNonConcatenatedProperty'); // ['baz']\nfooBar.get('concatenatedProperty'); // ['bar', 'foo', 'baz']\n```\n\nAdding a single property that is not an array will just add it in the array:\n\n```javascript\nlet fooBar = FooBar.create({\n concatenatedProperty: 'baz'\n})\nview.get('concatenatedProperty'); // ['bar', 'foo', 'baz']\n```\n\nUsing the `concatenatedProperties` property, we can tell Ember to mix the\ncontent of the properties.\n\nIn `Component` the `classNames`, `classNameBindings` and\n`attributeBindings` properties are concatenated.\n\nThis feature is available for you to use throughout the Ember object model,\nalthough typical app developers are likely to use it infrequently. Since\nit changes expectations about behavior of properties, you should properly\ndocument its usage in each individual concatenated property (to not\nmislead your users to think they can override the property in a subclass).", + "itemtype": "property", + "name": "concatenatedProperties", + "type": "Array", + "default": "null", + "access": "public", + "tagname": "", + "class": "ContainerDebugAdapter", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 429, + "description": "Defines the properties that will be merged from the superclass\n(instead of overridden).\n\nBy default, when you extend an Ember class a property defined in\nthe subclass overrides a property with the same name that is defined\nin the superclass. However, there are some cases where it is preferable\nto build up a property's value by merging the superclass property value\nwith the subclass property's value. An example of this in use within Ember\nis the `queryParams` property of routes.\n\nHere is some sample code showing the difference between a merged\nproperty and a normal one:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Bar = EmberObject.extend({\n // Configure which properties are to be merged\n mergedProperties: ['mergedProperty'],\n\n someNonMergedProperty: {\n nonMerged: 'superclass value of nonMerged'\n },\n mergedProperty: {\n page: { replace: false },\n limit: { replace: true }\n }\n});\n\nconst FooBar = Bar.extend({\n someNonMergedProperty: {\n completelyNonMerged: 'subclass value of nonMerged'\n },\n mergedProperty: {\n limit: { replace: false }\n }\n});\n\nlet fooBar = FooBar.create();\n\nfooBar.get('someNonMergedProperty');\n// => { completelyNonMerged: 'subclass value of nonMerged' }\n//\n// Note the entire object, including the nonMerged property of\n// the superclass object, has been replaced\n\nfooBar.get('mergedProperty');\n// => {\n// page: {replace: false},\n// limit: {replace: false}\n// }\n//\n// Note the page remains from the superclass, and the\n// `limit` property's value of `false` has been merged from\n// the subclass.\n```\n\nThis behavior is not available during object `create` calls. It is only\navailable at `extend` time.\n\nIn `Route` the `queryParams` property is merged.\n\nThis feature is available for you to use throughout the Ember object model,\nalthough typical app developers are likely to use it infrequently. Since\nit changes expectations about behavior of properties, you should properly\ndocument its usage in each individual merged property (to not\nmislead your users to think they can override the property in a subclass).", + "itemtype": "property", + "name": "mergedProperties", + "type": "Array", + "default": "null", + "access": "public", + "tagname": "", + "class": "ContainerDebugAdapter", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 504, + "description": "Destroyed object property flag.\n\nif this property is `true` the observers and bindings were already\nremoved by the effect of calling the `destroy()` method.", + "itemtype": "property", + "name": "isDestroyed", + "default": "false", + "access": "public", + "tagname": "", + "class": "ContainerDebugAdapter", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 522, + "description": "Destruction scheduled flag. The `destroy()` method has been called.\n\nThe object stays intact until the end of the run loop at which point\nthe `isDestroyed` flag is set.", + "itemtype": "property", + "name": "isDestroying", + "default": "false", + "access": "public", + "tagname": "", + "class": "ContainerDebugAdapter", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + } + ] + }, + "relationships": { + "parent-class": { + "data": { + "id": "ember-5.12.0-EmberObject", + "type": "class" + } + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/debug/container-debug-adapter", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-ContainerProxy.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-ContainerProxy.json new file mode 100644 index 000000000..f67d39e17 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-ContainerProxy.json @@ -0,0 +1,108 @@ +{ + "data": { + "id": "ember-5.12.0-ContainerProxy", + "type": "class", + "attributes": { + "name": "ContainerProxy", + "shortname": "ContainerProxy", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/owner", + "namespace": "", + "file": "packages/@ember/-internals/owner/index.ts", + "line": 563, + "description": "The interface for a container proxy, which is itself a private API used\nby the private `ContainerProxyMixin` as part of the base definition of\n`EngineInstance`.", + "access": "private", + "tagname": "", + "extends": "BasicContainer", + "methods": [ + { + "file": "packages/@ember/-internals/owner/index.ts", + "line": 198, + "description": "Given a fullName return a corresponding instance.\n\nThe default behavior is for lookup to return a singleton instance.\nThe singleton is scoped to the container, allowing multiple containers\nto all have their own locally scoped singletons.\n\n```javascript\nlet registry = new Registry();\nlet container = registry.container();\n\nregistry.register('api:twitter', Twitter);\n\nlet twitter = container.lookup('api:twitter');\n\ntwitter instanceof Twitter; // => true\n\n// by default the container will return singletons\nlet twitter2 = container.lookup('api:twitter');\ntwitter2 instanceof Twitter; // => true\n\ntwitter === twitter2; //=> true\n```\n\nIf singletons are not wanted an optional flag can be provided at lookup.\n\n```javascript\nlet registry = new Registry();\nlet container = registry.container();\n\nregistry.register('api:twitter', Twitter);\n\nlet twitter = container.lookup('api:twitter', { singleton: false });\nlet twitter2 = container.lookup('api:twitter', { singleton: false });\n\ntwitter === twitter2; //=> false\n```", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "lookup", + "params": [ + { + "name": "fullName", + "description": "", + "type": "String" + }, + { + "name": "options", + "description": "", + "type": "RegisterOptions" + } + ], + "return": { + "description": "", + "type": "Any" + }, + "class": "ContainerProxy", + "module": "@ember/owner", + "inherited": true, + "inheritedFrom": "BasicContainer" + }, + { + "file": "packages/@ember/-internals/owner/index.ts", + "line": 247, + "description": "Given a `FullName`, of the form `\"type:name\"` return a `FactoryManager`.\n\nThis method returns a manager which can be used for introspection of the\nfactory's class or for the creation of factory instances with initial\nproperties. The manager is an object with the following properties:\n\n* `class` - The registered or resolved class.\n* `create` - A function that will create an instance of the class with\n any dependencies injected.\n\nFor example:\n\n```javascript\nimport { getOwner } from '@ember/application';\n\nlet owner = getOwner(otherInstance);\n// the owner is commonly the `applicationInstance`, and can be accessed via\n// an instance initializer.\n\nlet factory = owner.factoryFor('service:bespoke');\n\nfactory.class;\n// The registered or resolved class. For example when used with an Ember-CLI\n// app, this would be the default export from `app/services/bespoke.js`.\n\nlet instance = factory.create({\n someProperty: 'an initial property value'\n});\n// Create an instance with any injections and the passed options as\n// initial properties.\n```\n\nAny instances created via the factory's `.create()` method *must* be destroyed\nmanually by the caller of `.create()`. Typically, this is done during the creating\nobjects own `destroy` or `willDestroy` methods.", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "factoryFor", + "params": [ + { + "name": "fullName", + "description": "", + "type": "String" + } + ], + "return": { + "description": "", + "type": "FactoryManager" + }, + "class": "ContainerProxy", + "module": "@ember/owner", + "inherited": true, + "inheritedFrom": "BasicContainer" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": { + "id": "ember-5.12.0-BasicContainer", + "type": "class" + } + }, + "descendants": { + "data": [ + { + "type": "class", + "id": "ember-5.12.0-ContainerProxyMixin" + } + ] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/owner", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-ContainerProxyMixin.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-ContainerProxyMixin.json new file mode 100644 index 000000000..e9b1f3ec3 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-ContainerProxyMixin.json @@ -0,0 +1,118 @@ +{ + "data": { + "id": "ember-5.12.0-ContainerProxyMixin", + "type": "class", + "attributes": { + "name": "ContainerProxyMixin", + "shortname": "ContainerProxyMixin", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [ + "EngineInstance" + ], + "module": "ember", + "namespace": "", + "file": "packages/@ember/-internals/runtime/lib/mixins/container_proxy.ts", + "line": 12, + "description": "ContainerProxyMixin is used to provide public access to specific\ncontainer functionality.", + "extends": "ContainerProxy", + "access": "private", + "tagname": "", + "methods": [ + { + "file": "packages/@ember/-internals/owner/index.ts", + "line": 198, + "description": "Given a fullName return a corresponding instance.\n\nThe default behavior is for lookup to return a singleton instance.\nThe singleton is scoped to the container, allowing multiple containers\nto all have their own locally scoped singletons.\n\n```javascript\nlet registry = new Registry();\nlet container = registry.container();\n\nregistry.register('api:twitter', Twitter);\n\nlet twitter = container.lookup('api:twitter');\n\ntwitter instanceof Twitter; // => true\n\n// by default the container will return singletons\nlet twitter2 = container.lookup('api:twitter');\ntwitter2 instanceof Twitter; // => true\n\ntwitter === twitter2; //=> true\n```\n\nIf singletons are not wanted an optional flag can be provided at lookup.\n\n```javascript\nlet registry = new Registry();\nlet container = registry.container();\n\nregistry.register('api:twitter', Twitter);\n\nlet twitter = container.lookup('api:twitter', { singleton: false });\nlet twitter2 = container.lookup('api:twitter', { singleton: false });\n\ntwitter === twitter2; //=> false\n```", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "lookup", + "params": [ + { + "name": "fullName", + "description": "", + "type": "String" + }, + { + "name": "options", + "description": "", + "type": "RegisterOptions" + } + ], + "return": { + "description": "", + "type": "Any" + }, + "class": "ContainerProxyMixin", + "module": "@ember/owner", + "inherited": true, + "inheritedFrom": "BasicContainer" + }, + { + "file": "packages/@ember/-internals/owner/index.ts", + "line": 247, + "description": "Given a `FullName`, of the form `\"type:name\"` return a `FactoryManager`.\n\nThis method returns a manager which can be used for introspection of the\nfactory's class or for the creation of factory instances with initial\nproperties. The manager is an object with the following properties:\n\n* `class` - The registered or resolved class.\n* `create` - A function that will create an instance of the class with\n any dependencies injected.\n\nFor example:\n\n```javascript\nimport { getOwner } from '@ember/application';\n\nlet owner = getOwner(otherInstance);\n// the owner is commonly the `applicationInstance`, and can be accessed via\n// an instance initializer.\n\nlet factory = owner.factoryFor('service:bespoke');\n\nfactory.class;\n// The registered or resolved class. For example when used with an Ember-CLI\n// app, this would be the default export from `app/services/bespoke.js`.\n\nlet instance = factory.create({\n someProperty: 'an initial property value'\n});\n// Create an instance with any injections and the passed options as\n// initial properties.\n```\n\nAny instances created via the factory's `.create()` method *must* be destroyed\nmanually by the caller of `.create()`. Typically, this is done during the creating\nobjects own `destroy` or `willDestroy` methods.", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "factoryFor", + "params": [ + { + "name": "fullName", + "description": "", + "type": "String" + } + ], + "return": { + "description": "", + "type": "FactoryManager" + }, + "class": "ContainerProxyMixin", + "module": "@ember/owner", + "inherited": true, + "inheritedFrom": "BasicContainer" + } + ], + "events": [], + "properties": [ + { + "file": "packages/@ember/-internals/runtime/lib/mixins/container_proxy.ts", + "line": 25, + "description": "The container stores state.", + "access": "private", + "tagname": "", + "itemtype": "property", + "name": "__container__", + "type": "Ember.Container", + "class": "ContainerProxyMixin", + "module": "ember" + } + ] + }, + "relationships": { + "parent-class": { + "data": { + "id": "ember-5.12.0-ContainerProxy", + "type": "class" + } + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-ember", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-CoreObject.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-CoreObject.json new file mode 100644 index 000000000..c1b00a07c --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-CoreObject.json @@ -0,0 +1,158 @@ +{ + "data": { + "id": "ember-5.12.0-CoreObject", + "type": "class", + "attributes": { + "name": "CoreObject", + "shortname": "CoreObject", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/object/core", + "namespace": "", + "file": "packages/@ember/object/core.ts", + "line": 174, + "description": "`CoreObject` is the base class for all Ember constructs. It establishes a\nclass system based on Ember's Mixin system, and provides the basis for the\nEmber Object Model. `CoreObject` should generally not be used directly,\ninstead you should use `EmberObject`.\n\n## Usage\n\nYou can define a class by extending from `CoreObject` using the `extend`\nmethod:\n\n```js\nconst Person = CoreObject.extend({\n name: 'Tomster',\n});\n```\n\nFor detailed usage, see the [Object Model](https://guides.emberjs.com/release/object-model/)\nsection of the guides.\n\n## Usage with Native Classes\n\nNative JavaScript `class` syntax can be used to extend from any `CoreObject`\nbased class:\n\n```js\nclass Person extends CoreObject {\n init() {\n super.init(...arguments);\n this.name = 'Tomster';\n }\n}\n```\n\nSome notes about `class` usage:\n\n* `new` syntax is not currently supported with classes that extend from\n `EmberObject` or `CoreObject`. You must continue to use the `create` method\n when making new instances of classes, even if they are defined using native\n class syntax. If you want to use `new` syntax, consider creating classes\n which do _not_ extend from `EmberObject` or `CoreObject`. Ember features,\n such as computed properties and decorators, will still work with base-less\n classes.\n* Instead of using `this._super()`, you must use standard `super` syntax in\n native classes. See the [MDN docs on classes](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes#Super_class_calls_with_super)\n for more details.\n* Native classes support using [constructors](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes#Constructor)\n to set up newly-created instances. Ember uses these to, among other things,\n support features that need to retrieve other entities by name, like Service\n injection and `getOwner`. To ensure your custom instance setup logic takes\n place after this important work is done, avoid using the `constructor` in\n favor of `init`.\n* Properties passed to `create` will be available on the instance by the time\n `init` runs, so any code that requires these values should work at that\n time.\n* Using native classes, and switching back to the old Ember Object model is\n fully supported.", + "access": "public", + "tagname": "", + "methods": [ + { + "file": "packages/@ember/object/core.ts", + "line": 321, + "description": "An overridable method called when objects are instantiated. By default,\ndoes nothing unless it is overridden during class definition.\n\nExample:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Person = EmberObject.extend({\n init() {\n alert(`Name is ${this.get('name')}`);\n }\n});\n\nlet steve = Person.create({\n name: 'Steve'\n});\n\n// alerts 'Name is Steve'.\n```\n\nNOTE: If you do override `init` for a framework class like `Component`\nfrom `@ember/component`, be sure to call `this._super(...arguments)`\nin your `init` declaration!\nIf you don't, Ember may not have an opportunity to\ndo important setup work, and you'll see strange behavior in your\napplication.", + "itemtype": "method", + "name": "init", + "access": "public", + "tagname": "", + "class": "CoreObject", + "module": "@ember/object/core" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 540, + "description": "Destroys an object by setting the `isDestroyed` flag and removing its\nmetadata, which effectively destroys observers and bindings.\n\nIf you try to set a property on a destroyed object, an exception will be\nraised.\n\nNote that destruction is scheduled for the end of the run loop and does not\nhappen immediately. It will set an isDestroying flag immediately.", + "itemtype": "method", + "name": "destroy", + "return": { + "description": "receiver", + "type": "EmberObject" + }, + "access": "public", + "tagname": "", + "class": "CoreObject", + "module": "@ember/object/core" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 567, + "description": "Override to implement teardown.", + "itemtype": "method", + "name": "willDestroy", + "access": "public", + "tagname": "", + "class": "CoreObject", + "module": "@ember/object/core" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 575, + "description": "Returns a string representation which attempts to provide more information\nthan Javascript's `toString` typically does, in a generic way for all Ember\nobjects.\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Person = EmberObject.extend();\nperson = Person.create();\nperson.toString(); //=> \"\"\n```\n\nIf the object's class is not defined on an Ember namespace, it will\nindicate it is a subclass of the registered superclass:\n\n```javascript\nconst Student = Person.extend();\nlet student = Student.create();\nstudent.toString(); //=> \"<(subclass of Person):ember1025>\"\n```\n\nIf the method `toStringExtension` is defined, its return value will be\nincluded in the output.\n\n```javascript\nconst Teacher = Person.extend({\n toStringExtension() {\n return this.get('fullName');\n }\n});\nteacher = Teacher.create();\nteacher.toString(); //=> \"\"\n```", + "itemtype": "method", + "name": "toString", + "return": { + "description": "string representation", + "type": "String" + }, + "access": "public", + "tagname": "", + "class": "CoreObject", + "module": "@ember/object/core" + } + ], + "events": [], + "properties": [ + { + "file": "packages/@ember/object/core.ts", + "line": 355, + "description": "Defines the properties that will be concatenated from the superclass\n(instead of overridden).\n\nBy default, when you extend an Ember class a property defined in\nthe subclass overrides a property with the same name that is defined\nin the superclass. However, there are some cases where it is preferable\nto build up a property's value by combining the superclass' property\nvalue with the subclass' value. An example of this in use within Ember\nis the `classNames` property of `Component` from `@ember/component`.\n\nHere is some sample code showing the difference between a concatenated\nproperty and a normal one:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Bar = EmberObject.extend({\n // Configure which properties to concatenate\n concatenatedProperties: ['concatenatedProperty'],\n\n someNonConcatenatedProperty: ['bar'],\n concatenatedProperty: ['bar']\n});\n\nconst FooBar = Bar.extend({\n someNonConcatenatedProperty: ['foo'],\n concatenatedProperty: ['foo']\n});\n\nlet fooBar = FooBar.create();\nfooBar.get('someNonConcatenatedProperty'); // ['foo']\nfooBar.get('concatenatedProperty'); // ['bar', 'foo']\n```\n\nThis behavior extends to object creation as well. Continuing the\nabove example:\n\n```javascript\nlet fooBar = FooBar.create({\n someNonConcatenatedProperty: ['baz'],\n concatenatedProperty: ['baz']\n})\nfooBar.get('someNonConcatenatedProperty'); // ['baz']\nfooBar.get('concatenatedProperty'); // ['bar', 'foo', 'baz']\n```\n\nAdding a single property that is not an array will just add it in the array:\n\n```javascript\nlet fooBar = FooBar.create({\n concatenatedProperty: 'baz'\n})\nview.get('concatenatedProperty'); // ['bar', 'foo', 'baz']\n```\n\nUsing the `concatenatedProperties` property, we can tell Ember to mix the\ncontent of the properties.\n\nIn `Component` the `classNames`, `classNameBindings` and\n`attributeBindings` properties are concatenated.\n\nThis feature is available for you to use throughout the Ember object model,\nalthough typical app developers are likely to use it infrequently. Since\nit changes expectations about behavior of properties, you should properly\ndocument its usage in each individual concatenated property (to not\nmislead your users to think they can override the property in a subclass).", + "itemtype": "property", + "name": "concatenatedProperties", + "type": "Array", + "default": "null", + "access": "public", + "tagname": "", + "class": "CoreObject", + "module": "@ember/object/core" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 429, + "description": "Defines the properties that will be merged from the superclass\n(instead of overridden).\n\nBy default, when you extend an Ember class a property defined in\nthe subclass overrides a property with the same name that is defined\nin the superclass. However, there are some cases where it is preferable\nto build up a property's value by merging the superclass property value\nwith the subclass property's value. An example of this in use within Ember\nis the `queryParams` property of routes.\n\nHere is some sample code showing the difference between a merged\nproperty and a normal one:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Bar = EmberObject.extend({\n // Configure which properties are to be merged\n mergedProperties: ['mergedProperty'],\n\n someNonMergedProperty: {\n nonMerged: 'superclass value of nonMerged'\n },\n mergedProperty: {\n page: { replace: false },\n limit: { replace: true }\n }\n});\n\nconst FooBar = Bar.extend({\n someNonMergedProperty: {\n completelyNonMerged: 'subclass value of nonMerged'\n },\n mergedProperty: {\n limit: { replace: false }\n }\n});\n\nlet fooBar = FooBar.create();\n\nfooBar.get('someNonMergedProperty');\n// => { completelyNonMerged: 'subclass value of nonMerged' }\n//\n// Note the entire object, including the nonMerged property of\n// the superclass object, has been replaced\n\nfooBar.get('mergedProperty');\n// => {\n// page: {replace: false},\n// limit: {replace: false}\n// }\n//\n// Note the page remains from the superclass, and the\n// `limit` property's value of `false` has been merged from\n// the subclass.\n```\n\nThis behavior is not available during object `create` calls. It is only\navailable at `extend` time.\n\nIn `Route` the `queryParams` property is merged.\n\nThis feature is available for you to use throughout the Ember object model,\nalthough typical app developers are likely to use it infrequently. Since\nit changes expectations about behavior of properties, you should properly\ndocument its usage in each individual merged property (to not\nmislead your users to think they can override the property in a subclass).", + "itemtype": "property", + "name": "mergedProperties", + "type": "Array", + "default": "null", + "access": "public", + "tagname": "", + "class": "CoreObject", + "module": "@ember/object/core" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 504, + "description": "Destroyed object property flag.\n\nif this property is `true` the observers and bindings were already\nremoved by the effect of calling the `destroy()` method.", + "itemtype": "property", + "name": "isDestroyed", + "default": "false", + "access": "public", + "tagname": "", + "class": "CoreObject", + "module": "@ember/object/core" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 522, + "description": "Destruction scheduled flag. The `destroy()` method has been called.\n\nThe object stays intact until the end of the run loop at which point\nthe `isDestroyed` flag is set.", + "itemtype": "property", + "name": "isDestroying", + "default": "false", + "access": "public", + "tagname": "", + "class": "CoreObject", + "module": "@ember/object/core" + } + ] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [ + { + "type": "class", + "id": "ember-5.12.0-Helper" + }, + { + "type": "class", + "id": "ember-5.12.0-EmberObject" + } + ] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/object/core", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-DataAdapter.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-DataAdapter.json new file mode 100644 index 000000000..d327c79a2 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-DataAdapter.json @@ -0,0 +1,935 @@ +{ + "data": { + "id": "ember-5.12.0-DataAdapter", + "type": "class", + "attributes": { + "name": "DataAdapter", + "shortname": "DataAdapter", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/debug/data-adapter", + "namespace": "", + "file": "packages/@ember/debug/data-adapter.ts", + "line": 178, + "description": "The `DataAdapter` helps a data persistence library\ninterface with tools that debug Ember such\nas the [Ember Inspector](https://github.com/emberjs/ember-inspector)\nfor Chrome and Firefox.\n\nThis class will be extended by a persistence library\nwhich will override some of the methods with\nlibrary-specific code.\n\nThe methods likely to be overridden are:\n\n* `getFilters`\n* `detect`\n* `columnsForType`\n* `getRecords`\n* `getRecordColumnValues`\n* `getRecordKeywords`\n* `getRecordFilterValues`\n* `getRecordColor`\n\nThe adapter will need to be registered\nin the application's container as `dataAdapter:main`.\n\nExample:\n\n```javascript\nApplication.initializer({\n name: \"data-adapter\",\n\n initialize: function(application) {\n application.register('data-adapter:main', DS.DataAdapter);\n }\n});\n```", + "extends": "EmberObject", + "access": "public", + "tagname": "", + "methods": [ + { + "file": "packages/@ember/debug/data-adapter.ts", + "line": 305, + "description": "Specifies how records can be filtered.\nRecords returned will need to have a `filterValues`\nproperty with a key for every name in the returned array.", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "getFilters", + "return": { + "description": "List of objects defining filters.\n The object should have a `name` and `desc` property.", + "type": "Array" + }, + "class": "DataAdapter", + "module": "@ember/debug/data-adapter" + }, + { + "file": "packages/@ember/debug/data-adapter.ts", + "line": 322, + "description": "Fetch the model types and observe them for changes.", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "watchModelTypes", + "params": [ + { + "name": "typesAdded", + "description": "Callback to call to add types.\nTakes an array of objects containing wrapped types (returned from `wrapModelType`).", + "type": "Function" + }, + { + "name": "typesUpdated", + "description": "Callback to call when a type has changed.\nTakes an array of objects containing wrapped types.", + "type": "Function" + } + ], + "return": { + "description": "Method to call to remove all observers", + "type": "Function" + }, + "class": "DataAdapter", + "module": "@ember/debug/data-adapter" + }, + { + "file": "packages/@ember/debug/data-adapter.ts", + "line": 370, + "description": "Fetch the records of a given type and observe them for changes.", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "watchRecords", + "params": [ + { + "name": "modelName", + "description": "The model name.", + "type": "String" + }, + { + "name": "recordsAdded", + "description": "Callback to call to add records.\nTakes an array of objects containing wrapped records.\nThe object should have the following properties:\n columnValues: {Object} The key and value of a table cell.\n object: {Object} The actual record object.", + "type": "Function" + }, + { + "name": "recordsUpdated", + "description": "Callback to call when a record has changed.\nTakes an array of objects containing wrapped records.", + "type": "Function" + }, + { + "name": "recordsRemoved", + "description": "Callback to call when a record has removed.\nTakes an array of objects containing wrapped records.", + "type": "Function" + } + ], + "return": { + "description": "Method to call to remove all observers.", + "type": "Function" + }, + "class": "DataAdapter", + "module": "@ember/debug/data-adapter" + }, + { + "file": "packages/@ember/debug/data-adapter.ts", + "line": 442, + "description": "Clear all observers before destruction", + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "willDestroy", + "class": "DataAdapter", + "module": "@ember/debug/data-adapter" + }, + { + "file": "packages/@ember/debug/data-adapter.ts", + "line": 460, + "description": "Detect whether a class is a model.\n\nTest that against the model class\nof your persistence library.", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "detect", + "return": { + "description": "boolean Whether the class is a model class or not." + }, + "class": "DataAdapter", + "module": "@ember/debug/data-adapter" + }, + { + "file": "packages/@ember/debug/data-adapter.ts", + "line": 474, + "description": "Get the columns for a given model type.", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "columnsForType", + "return": { + "description": "An array of columns of the following format:\n name: {String} The name of the column.\n desc: {String} Humanized description (what would show in a table column name).", + "type": "Array" + }, + "class": "DataAdapter", + "module": "@ember/debug/data-adapter" + }, + { + "file": "packages/@ember/debug/data-adapter.ts", + "line": 487, + "description": "Adds observers to a model type class.", + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "observeModelType", + "params": [ + { + "name": "modelName", + "description": "The model type name.", + "type": "String" + }, + { + "name": "typesUpdated", + "description": "Called when a type is modified.", + "type": "Function" + } + ], + "return": { + "description": "The function to call to remove observers.", + "type": "Function" + }, + "class": "DataAdapter", + "module": "@ember/debug/data-adapter" + }, + { + "file": "packages/@ember/debug/data-adapter.ts", + "line": 524, + "description": "Wraps a given model type and observes changes to it.", + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "wrapModelType", + "params": [ + { + "name": "klass", + "description": "A model class.", + "type": "Class" + }, + { + "name": "modelName", + "description": "Name of the class.", + "type": "String" + } + ], + "return": { + "description": "The wrapped type has the following format:\n name: {String} The name of the type.\n count: {Integer} The number of records available.\n columns: {Columns} An array of columns to describe the record.\n object: {Class} The actual Model type class.", + "type": "Object" + }, + "class": "DataAdapter", + "module": "@ember/debug/data-adapter" + }, + { + "file": "packages/@ember/debug/data-adapter.ts", + "line": 548, + "description": "Fetches all models defined in the application.", + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "getModelTypes", + "return": { + "description": "Array of model types.", + "type": "Array" + }, + "class": "DataAdapter", + "module": "@ember/debug/data-adapter" + }, + { + "file": "packages/@ember/debug/data-adapter.ts", + "line": 573, + "description": "Loops over all namespaces and all objects\nattached to them.", + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "_getObjectsOnNamespaces", + "return": { + "description": "Array of model type strings.", + "type": "Array" + }, + "class": "DataAdapter", + "module": "@ember/debug/data-adapter" + }, + { + "file": "packages/@ember/debug/data-adapter.ts", + "line": 602, + "description": "Fetches all loaded records for a given type.", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "getRecords", + "return": { + "description": "An array of records.\n This array will be observed for changes,\n so it should update when new records are added/removed.", + "type": "Array" + }, + "class": "DataAdapter", + "module": "@ember/debug/data-adapter" + }, + { + "file": "packages/@ember/debug/data-adapter.ts", + "line": 615, + "description": "Wraps a record and observers changes to it.", + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "wrapRecord", + "params": [ + { + "name": "record", + "description": "The record instance.", + "type": "Object" + } + ], + "return": { + "description": "The wrapped record. Format:\ncolumnValues: {Array}\nsearchKeywords: {Array}", + "type": "Object" + }, + "class": "DataAdapter", + "module": "@ember/debug/data-adapter" + }, + { + "file": "packages/@ember/debug/data-adapter.ts", + "line": 635, + "description": "Gets the values for each column.", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "getRecordColumnValues", + "return": { + "description": "Keys should match column names defined\nby the model type.", + "type": "Object" + }, + "class": "DataAdapter", + "module": "@ember/debug/data-adapter" + }, + { + "file": "packages/@ember/debug/data-adapter.ts", + "line": 647, + "description": "Returns keywords to match when searching records.", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "getRecordKeywords", + "return": { + "description": "Relevant keywords for search.", + "type": "Array" + }, + "class": "DataAdapter", + "module": "@ember/debug/data-adapter" + }, + { + "file": "packages/@ember/debug/data-adapter.ts", + "line": 658, + "description": "Returns the values of filters defined by `getFilters`.", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "getRecordFilterValues", + "params": [ + { + "name": "record", + "description": "The record instance.", + "type": "Object" + } + ], + "return": { + "description": "The filter values.", + "type": "Object" + }, + "class": "DataAdapter", + "module": "@ember/debug/data-adapter" + }, + { + "file": "packages/@ember/debug/data-adapter.ts", + "line": 670, + "description": "Each record can have a color that represents its state.", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "getRecordColor", + "params": [ + { + "name": "record", + "description": "The record instance", + "type": "Object" + } + ], + "return": { + "description": "The records color.\n Possible options: black, red, blue, green.", + "type": "String" + }, + "class": "DataAdapter", + "module": "@ember/debug/data-adapter" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 321, + "description": "An overridable method called when objects are instantiated. By default,\ndoes nothing unless it is overridden during class definition.\n\nExample:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Person = EmberObject.extend({\n init() {\n alert(`Name is ${this.get('name')}`);\n }\n});\n\nlet steve = Person.create({\n name: 'Steve'\n});\n\n// alerts 'Name is Steve'.\n```\n\nNOTE: If you do override `init` for a framework class like `Component`\nfrom `@ember/component`, be sure to call `this._super(...arguments)`\nin your `init` declaration!\nIf you don't, Ember may not have an opportunity to\ndo important setup work, and you'll see strange behavior in your\napplication.", + "itemtype": "method", + "name": "init", + "access": "public", + "tagname": "", + "class": "DataAdapter", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 540, + "description": "Destroys an object by setting the `isDestroyed` flag and removing its\nmetadata, which effectively destroys observers and bindings.\n\nIf you try to set a property on a destroyed object, an exception will be\nraised.\n\nNote that destruction is scheduled for the end of the run loop and does not\nhappen immediately. It will set an isDestroying flag immediately.", + "itemtype": "method", + "name": "destroy", + "return": { + "description": "receiver", + "type": "EmberObject" + }, + "access": "public", + "tagname": "", + "class": "DataAdapter", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 567, + "description": "Override to implement teardown.", + "itemtype": "method", + "name": "willDestroy", + "access": "public", + "tagname": "", + "class": "DataAdapter", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 575, + "description": "Returns a string representation which attempts to provide more information\nthan Javascript's `toString` typically does, in a generic way for all Ember\nobjects.\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Person = EmberObject.extend();\nperson = Person.create();\nperson.toString(); //=> \"\"\n```\n\nIf the object's class is not defined on an Ember namespace, it will\nindicate it is a subclass of the registered superclass:\n\n```javascript\nconst Student = Person.extend();\nlet student = Student.create();\nstudent.toString(); //=> \"<(subclass of Person):ember1025>\"\n```\n\nIf the method `toStringExtension` is defined, its return value will be\nincluded in the output.\n\n```javascript\nconst Teacher = Person.extend({\n toStringExtension() {\n return this.get('fullName');\n }\n});\nteacher = Teacher.create();\nteacher.toString(); //=> \"\"\n```", + "itemtype": "method", + "name": "toString", + "return": { + "description": "string representation", + "type": "String" + }, + "access": "public", + "tagname": "", + "class": "DataAdapter", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 97, + "description": "Retrieves the value of a property from the object.\n\nThis method is usually similar to using `object[keyName]` or `object.keyName`,\nhowever it supports both computed properties and the unknownProperty\nhandler.\n\nBecause `get` unifies the syntax for accessing all these kinds\nof properties, it can make many refactorings easier, such as replacing a\nsimple property with a computed property, or vice versa.\n\n### Computed Properties\n\nComputed properties are methods defined with the `property` modifier\ndeclared at the end, such as:\n\n```javascript\nimport { computed } from '@ember/object';\n\nfullName: computed('firstName', 'lastName', function() {\n return this.get('firstName') + ' ' + this.get('lastName');\n})\n```\n\nWhen you call `get` on a computed property, the function will be\ncalled and the return value will be returned instead of the function\nitself.\n\n### Unknown Properties\n\nLikewise, if you try to call `get` on a property whose value is\n`undefined`, the `unknownProperty()` method will be called on the object.\nIf this method returns any value other than `undefined`, it will be returned\ninstead. This allows you to implement \"virtual\" properties that are\nnot defined upfront.", + "itemtype": "method", + "name": "get", + "params": [ + { + "name": "keyName", + "description": "The property to retrieve", + "type": "String" + } + ], + "return": { + "description": "The property value or undefined.", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "DataAdapter", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 141, + "description": "To get the values of multiple properties at once, call `getProperties`\nwith a list of strings or an array:\n\n```javascript\nrecord.getProperties('firstName', 'lastName', 'zipCode');\n// { firstName: 'John', lastName: 'Doe', zipCode: '10011' }\n```\n\nis equivalent to:\n\n```javascript\nrecord.getProperties(['firstName', 'lastName', 'zipCode']);\n// { firstName: 'John', lastName: 'Doe', zipCode: '10011' }\n```", + "itemtype": "method", + "name": "getProperties", + "params": [ + { + "name": "list", + "description": "of keys to get", + "type": "String...|Array" + } + ], + "return": { + "description": "", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "DataAdapter", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 168, + "description": "Sets the provided key or path to the value.\n\n```javascript\nrecord.set(\"key\", value);\n```\n\nThis method is generally very similar to calling `object[\"key\"] = value` or\n`object.key = value`, except that it provides support for computed\nproperties, the `setUnknownProperty()` method and property observers.\n\n### Computed Properties\n\nIf you try to set a value on a key that has a computed property handler\ndefined (see the `get()` method for an example), then `set()` will call\nthat method, passing both the value and key instead of simply changing\nthe value itself. This is useful for those times when you need to\nimplement a property that is composed of one or more member\nproperties.\n\n### Unknown Properties\n\nIf you try to set a value on a key that is undefined in the target\nobject, then the `setUnknownProperty()` handler will be called instead. This\ngives you an opportunity to implement complex \"virtual\" properties that\nare not predefined on the object. If `setUnknownProperty()` returns\nundefined, then `set()` will simply set the value on the object.\n\n### Property Observers\n\nIn addition to changing the property, `set()` will also register a property\nchange with the object. Unless you have placed this call inside of a\n`beginPropertyChanges()` and `endPropertyChanges(),` any \"local\" observers\n(i.e. observer methods declared on the same object), will be called\nimmediately. Any \"remote\" observers (i.e. observer methods declared on\nanother object) will be placed in a queue and called at a later time in a\ncoalesced manner.", + "itemtype": "method", + "name": "set", + "params": [ + { + "name": "keyName", + "description": "The property to set", + "type": "String" + }, + { + "name": "value", + "description": "The value to set or `null`.", + "type": "Object" + } + ], + "return": { + "description": "The passed value", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "DataAdapter", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 216, + "description": "Sets a list of properties at once. These properties are set inside\na single `beginPropertyChanges` and `endPropertyChanges` batch, so\nobservers will be buffered.\n\n```javascript\nrecord.setProperties({ firstName: 'Charles', lastName: 'Jolley' });\n```", + "itemtype": "method", + "name": "setProperties", + "params": [ + { + "name": "hash", + "description": "the hash of keys and values to set", + "type": "Object" + } + ], + "return": { + "description": "The passed in hash", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "DataAdapter", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 233, + "description": "Convenience method to call `propertyWillChange` and `propertyDidChange` in\nsuccession.\n\nNotify the observer system that a property has just changed.\n\nSometimes you need to change a value directly or indirectly without\nactually calling `get()` or `set()` on it. In this case, you can use this\nmethod instead. Calling this method will notify all observers that the\nproperty has potentially changed value.", + "itemtype": "method", + "name": "notifyPropertyChange", + "params": [ + { + "name": "keyName", + "description": "The property key to be notified about.", + "type": "String" + } + ], + "return": { + "description": "", + "type": "Observable" + }, + "access": "public", + "tagname": "", + "class": "DataAdapter", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 251, + "description": "Adds an observer on a property.\n\nThis is the core method used to register an observer for a property.\n\nOnce you call this method, any time the key's value is set, your observer\nwill be notified. Note that the observers are triggered any time the\nvalue is set, regardless of whether it has actually changed. Your\nobserver should be prepared to handle that.\n\nThere are two common invocation patterns for `.addObserver()`:\n\n- Passing two arguments:\n - the name of the property to observe (as a string)\n - the function to invoke (an actual function)\n- Passing three arguments:\n - the name of the property to observe (as a string)\n - the target object (will be used to look up and invoke a\n function on)\n - the name of the function to invoke on the target object\n (as a string).\n\n```js {data-filename=app/components/my-component.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n init() {\n this._super(...arguments);\n\n // the following are equivalent:\n\n // using three arguments\n this.addObserver('foo', this, 'fooDidChange');\n\n // using two arguments\n this.addObserver('foo', (...args) => {\n this.fooDidChange(...args);\n });\n },\n\n fooDidChange() {\n // your custom logic code\n }\n});\n```\n\n### Observer Methods\n\nObserver methods have the following signature:\n\n```js {data-filename=app/components/my-component.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n init() {\n this._super(...arguments);\n this.addObserver('foo', this, 'fooDidChange');\n },\n\n fooDidChange(sender, key, value, rev) {\n // your code\n }\n});\n```\n\nThe `sender` is the object that changed. The `key` is the property that\nchanges. The `value` property is currently reserved and unused. The `rev`\nis the last property revision of the object when it changed, which you can\nuse to detect if the key value has really changed or not.\n\nUsually you will not need the value or revision parameters at\nthe end. In this case, it is common to write observer methods that take\nonly a sender and key value as parameters or, if you aren't interested in\nany of these values, to write an observer that has no parameters at all.", + "itemtype": "method", + "name": "addObserver", + "params": [ + { + "name": "key", + "description": "The key to observe", + "type": "String" + }, + { + "name": "target", + "description": "The target object to invoke", + "type": "Object" + }, + { + "name": "method", + "description": "The method to invoke", + "type": "String|Function" + }, + { + "name": "sync", + "description": "Whether the observer is sync or not", + "type": "Boolean" + } + ], + "return": { + "description": "", + "type": "Observable" + }, + "access": "public", + "tagname": "", + "class": "DataAdapter", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 337, + "description": "Remove an observer you have previously registered on this object. Pass\nthe same key, target, and method you passed to `addObserver()` and your\ntarget will no longer receive notifications.", + "itemtype": "method", + "name": "removeObserver", + "params": [ + { + "name": "key", + "description": "The key to observe", + "type": "String" + }, + { + "name": "target", + "description": "The target object to invoke", + "type": "Object" + }, + { + "name": "method", + "description": "The method to invoke", + "type": "String|Function" + }, + { + "name": "sync", + "description": "Whether the observer is async or not", + "type": "Boolean" + } + ], + "return": { + "description": "", + "type": "Observable" + }, + "access": "public", + "tagname": "", + "class": "DataAdapter", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 358, + "description": "Set the value of a property to the current value plus some amount.\n\n```javascript\nperson.incrementProperty('age');\nteam.incrementProperty('score', 2);\n```", + "itemtype": "method", + "name": "incrementProperty", + "params": [ + { + "name": "keyName", + "description": "The name of the property to increment", + "type": "String" + }, + { + "name": "increment", + "description": "The amount to increment by. Defaults to 1", + "type": "Number" + } + ], + "return": { + "description": "The new property value", + "type": "Number" + }, + "access": "public", + "tagname": "", + "class": "DataAdapter", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 375, + "description": "Set the value of a property to the current value minus some amount.\n\n```javascript\nplayer.decrementProperty('lives');\norc.decrementProperty('health', 5);\n```", + "itemtype": "method", + "name": "decrementProperty", + "params": [ + { + "name": "keyName", + "description": "The name of the property to decrement", + "type": "String" + }, + { + "name": "decrement", + "description": "The amount to decrement by. Defaults to 1", + "type": "Number" + } + ], + "return": { + "description": "The new property value", + "type": "Number" + }, + "access": "public", + "tagname": "", + "class": "DataAdapter", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 392, + "description": "Set the value of a boolean property to the opposite of its\ncurrent value.\n\n```javascript\nstarship.toggleProperty('warpDriveEngaged');\n```", + "itemtype": "method", + "name": "toggleProperty", + "params": [ + { + "name": "keyName", + "description": "The name of the property to toggle", + "type": "String" + } + ], + "return": { + "description": "The new property value", + "type": "Boolean" + }, + "access": "public", + "tagname": "", + "class": "DataAdapter", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 407, + "description": "Returns the cached value of a computed property, if it exists.\nThis allows you to inspect the value of a computed property\nwithout accidentally invoking it if it is intended to be\ngenerated lazily.", + "itemtype": "method", + "name": "cacheFor", + "params": [ + { + "name": "keyName", + "description": "", + "type": "String" + } + ], + "return": { + "description": "The cached value of the computed property, if any", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "DataAdapter", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 437, + "description": "Begins a grouping of property changes.\n\nYou can use this method to group property changes so that notifications\nwill not be sent until the changes are finished. If you plan to make a\nlarge number of changes to an object at one time, you should call this\nmethod at the beginning of the changes to begin deferring change\nnotifications. When you are done making changes, call\n`endPropertyChanges()` to deliver the deferred change notifications and end\ndeferring.", + "itemtype": "method", + "name": "beginPropertyChanges", + "return": { + "description": "", + "type": "Observable" + }, + "access": "private", + "tagname": "", + "class": "DataAdapter", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 457, + "description": "Ends a grouping of property changes.\n\nYou can use this method to group property changes so that notifications\nwill not be sent until the changes are finished. If you plan to make a\nlarge number of changes to an object at one time, you should call\n`beginPropertyChanges()` at the beginning of the changes to defer change\nnotifications. When you are done making changes, call this method to\ndeliver the deferred change notifications and end deferring.", + "itemtype": "method", + "name": "endPropertyChanges", + "return": { + "description": "", + "type": "Observable" + }, + "access": "private", + "tagname": "", + "class": "DataAdapter", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 501, + "description": "Returns `true` if the object currently has observers registered for a\nparticular key. You can use this method to potentially defer performing\nan expensive action until someone begins observing a particular property\non the object.", + "itemtype": "method", + "name": "hasObserverFor", + "params": [ + { + "name": "key", + "description": "Key to check", + "type": "String" + } + ], + "return": { + "description": "", + "type": "Boolean" + }, + "access": "private", + "tagname": "", + "class": "DataAdapter", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + } + ], + "events": [], + "properties": [ + { + "file": "packages/@ember/debug/data-adapter.ts", + "line": 234, + "description": "The container-debug-adapter which is used\nto list all models.", + "itemtype": "property", + "name": "containerDebugAdapter", + "default": "undefined", + "since": "1.5.0", + "access": "public", + "tagname": "", + "class": "DataAdapter", + "module": "@ember/debug/data-adapter" + }, + { + "file": "packages/@ember/debug/data-adapter.ts", + "line": 244, + "description": "The number of attributes to send\nas columns. (Enough to make the record\nidentifiable).", + "access": "private", + "tagname": "", + "itemtype": "property", + "name": "attributeLimit", + "default": "3", + "since": "1.3.0", + "class": "DataAdapter", + "module": "@ember/debug/data-adapter" + }, + { + "file": "packages/@ember/debug/data-adapter.ts", + "line": 256, + "description": "Ember Data > v1.0.0-beta.18\nrequires string model names to be passed\naround instead of the actual factories.\n\nThis is a stamp for the Ember Inspector\nto differentiate between the versions\nto be able to support older versions too.", + "access": "public", + "tagname": "", + "itemtype": "property", + "name": "acceptsModelName", + "class": "DataAdapter", + "module": "@ember/debug/data-adapter" + }, + { + "file": "packages/@ember/debug/data-adapter.ts", + "line": 270, + "description": "Map from records arrays to RecordsWatcher instances", + "access": "private", + "tagname": "", + "itemtype": "property", + "name": "recordsWatchers", + "since": "3.26.0", + "class": "DataAdapter", + "module": "@ember/debug/data-adapter" + }, + { + "file": "packages/@ember/debug/data-adapter.ts", + "line": 278, + "description": "Map from records arrays to TypeWatcher instances", + "access": "private", + "tagname": "", + "itemtype": "property", + "name": "typeWatchers", + "since": "3.26.0", + "class": "DataAdapter", + "module": "@ember/debug/data-adapter" + }, + { + "file": "packages/@ember/debug/data-adapter.ts", + "line": 286, + "description": "Callback that is currently scheduled on backburner end to flush and check\nall active watchers.", + "access": "private", + "tagname": "", + "itemtype": "property", + "name": "flushWatchers", + "since": "3.26.0", + "class": "DataAdapter", + "module": "@ember/debug/data-adapter" + }, + { + "file": "packages/@ember/debug/data-adapter.ts", + "line": 296, + "description": "Stores all methods that clear observers.\nThese methods will be called on destruction.", + "access": "private", + "tagname": "", + "itemtype": "property", + "name": "releaseMethods", + "since": "1.3.0", + "class": "DataAdapter", + "module": "@ember/debug/data-adapter" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 355, + "description": "Defines the properties that will be concatenated from the superclass\n(instead of overridden).\n\nBy default, when you extend an Ember class a property defined in\nthe subclass overrides a property with the same name that is defined\nin the superclass. However, there are some cases where it is preferable\nto build up a property's value by combining the superclass' property\nvalue with the subclass' value. An example of this in use within Ember\nis the `classNames` property of `Component` from `@ember/component`.\n\nHere is some sample code showing the difference between a concatenated\nproperty and a normal one:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Bar = EmberObject.extend({\n // Configure which properties to concatenate\n concatenatedProperties: ['concatenatedProperty'],\n\n someNonConcatenatedProperty: ['bar'],\n concatenatedProperty: ['bar']\n});\n\nconst FooBar = Bar.extend({\n someNonConcatenatedProperty: ['foo'],\n concatenatedProperty: ['foo']\n});\n\nlet fooBar = FooBar.create();\nfooBar.get('someNonConcatenatedProperty'); // ['foo']\nfooBar.get('concatenatedProperty'); // ['bar', 'foo']\n```\n\nThis behavior extends to object creation as well. Continuing the\nabove example:\n\n```javascript\nlet fooBar = FooBar.create({\n someNonConcatenatedProperty: ['baz'],\n concatenatedProperty: ['baz']\n})\nfooBar.get('someNonConcatenatedProperty'); // ['baz']\nfooBar.get('concatenatedProperty'); // ['bar', 'foo', 'baz']\n```\n\nAdding a single property that is not an array will just add it in the array:\n\n```javascript\nlet fooBar = FooBar.create({\n concatenatedProperty: 'baz'\n})\nview.get('concatenatedProperty'); // ['bar', 'foo', 'baz']\n```\n\nUsing the `concatenatedProperties` property, we can tell Ember to mix the\ncontent of the properties.\n\nIn `Component` the `classNames`, `classNameBindings` and\n`attributeBindings` properties are concatenated.\n\nThis feature is available for you to use throughout the Ember object model,\nalthough typical app developers are likely to use it infrequently. Since\nit changes expectations about behavior of properties, you should properly\ndocument its usage in each individual concatenated property (to not\nmislead your users to think they can override the property in a subclass).", + "itemtype": "property", + "name": "concatenatedProperties", + "type": "Array", + "default": "null", + "access": "public", + "tagname": "", + "class": "DataAdapter", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 429, + "description": "Defines the properties that will be merged from the superclass\n(instead of overridden).\n\nBy default, when you extend an Ember class a property defined in\nthe subclass overrides a property with the same name that is defined\nin the superclass. However, there are some cases where it is preferable\nto build up a property's value by merging the superclass property value\nwith the subclass property's value. An example of this in use within Ember\nis the `queryParams` property of routes.\n\nHere is some sample code showing the difference between a merged\nproperty and a normal one:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Bar = EmberObject.extend({\n // Configure which properties are to be merged\n mergedProperties: ['mergedProperty'],\n\n someNonMergedProperty: {\n nonMerged: 'superclass value of nonMerged'\n },\n mergedProperty: {\n page: { replace: false },\n limit: { replace: true }\n }\n});\n\nconst FooBar = Bar.extend({\n someNonMergedProperty: {\n completelyNonMerged: 'subclass value of nonMerged'\n },\n mergedProperty: {\n limit: { replace: false }\n }\n});\n\nlet fooBar = FooBar.create();\n\nfooBar.get('someNonMergedProperty');\n// => { completelyNonMerged: 'subclass value of nonMerged' }\n//\n// Note the entire object, including the nonMerged property of\n// the superclass object, has been replaced\n\nfooBar.get('mergedProperty');\n// => {\n// page: {replace: false},\n// limit: {replace: false}\n// }\n//\n// Note the page remains from the superclass, and the\n// `limit` property's value of `false` has been merged from\n// the subclass.\n```\n\nThis behavior is not available during object `create` calls. It is only\navailable at `extend` time.\n\nIn `Route` the `queryParams` property is merged.\n\nThis feature is available for you to use throughout the Ember object model,\nalthough typical app developers are likely to use it infrequently. Since\nit changes expectations about behavior of properties, you should properly\ndocument its usage in each individual merged property (to not\nmislead your users to think they can override the property in a subclass).", + "itemtype": "property", + "name": "mergedProperties", + "type": "Array", + "default": "null", + "access": "public", + "tagname": "", + "class": "DataAdapter", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 504, + "description": "Destroyed object property flag.\n\nif this property is `true` the observers and bindings were already\nremoved by the effect of calling the `destroy()` method.", + "itemtype": "property", + "name": "isDestroyed", + "default": "false", + "access": "public", + "tagname": "", + "class": "DataAdapter", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 522, + "description": "Destruction scheduled flag. The `destroy()` method has been called.\n\nThe object stays intact until the end of the run loop at which point\nthe `isDestroyed` flag is set.", + "itemtype": "property", + "name": "isDestroying", + "default": "false", + "access": "public", + "tagname": "", + "class": "DataAdapter", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + } + ] + }, + "relationships": { + "parent-class": { + "data": { + "id": "ember-5.12.0-EmberObject", + "type": "class" + } + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/debug/data-adapter", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-Descriptor.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-Descriptor.json new file mode 100644 index 000000000..7687c8c74 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-Descriptor.json @@ -0,0 +1,113 @@ +{ + "data": { + "id": "ember-5.12.0-Descriptor", + "type": "class", + "attributes": { + "name": "Descriptor", + "shortname": "Descriptor", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/object", + "namespace": "", + "file": "packages/@ember/-internals/metal/lib/decorator.ts", + "line": 49, + "description": "Objects of this type can implement an interface to respond to requests to\nget and set. The default implementation handles simple properties.", + "access": "private", + "tagname": "", + "methods": [ + { + "file": "packages/@ember/-internals/metal/lib/decorator.ts", + "line": 156, + "description": "Returns the CP descriptor associated with `obj` and `keyName`, if any.", + "itemtype": "method", + "name": "descriptorForProperty", + "params": [ + { + "name": "obj", + "description": "the object to check", + "type": "Object" + }, + { + "name": "keyName", + "description": "the key to check", + "type": "String" + } + ], + "return": { + "description": "", + "type": "Descriptor" + }, + "access": "private", + "tagname": "", + "class": "Descriptor", + "module": "@ember/object" + }, + { + "file": "packages/@ember/-internals/metal/lib/decorator.ts", + "line": 184, + "description": "Check whether a value is a decorator", + "itemtype": "method", + "name": "isClassicDecorator", + "params": [ + { + "name": "possibleDesc", + "description": "the value to check", + "type": "Any" + } + ], + "return": { + "description": "", + "type": "Boolean" + }, + "access": "private", + "tagname": "", + "class": "Descriptor", + "module": "@ember/object" + }, + { + "file": "packages/@ember/-internals/metal/lib/decorator.ts", + "line": 196, + "description": "Set a value as a decorator", + "itemtype": "method", + "name": "setClassicDecorator", + "params": [ + { + "name": "decorator", + "description": "the value to mark as a decorator", + "type": "Function" + } + ], + "access": "private", + "tagname": "", + "class": "Descriptor", + "module": "@ember/object" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/object", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.@ember/controller.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.@ember/controller.json new file mode 100644 index 000000000..745e5e03e --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.@ember/controller.json @@ -0,0 +1,65 @@ +{ + "data": { + "id": "ember-5.12.0-Ember.@ember/controller", + "type": "class", + "attributes": { + "name": "Ember.@ember/controller", + "shortname": "@ember/controller", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/controller", + "namespace": "Ember", + "methods": [ + { + "file": "packages/@ember/controller/index.ts", + "line": 317, + "description": "Creates a property that lazily looks up another controller in the container.\nCan only be used when defining another controller.\n\nExample:\n\n```js {data-filename=app/controllers/post.js}\nimport Controller, {\n inject as controller\n} from '@ember/controller';\n\nexport default class PostController extends Controller {\n @controller posts;\n}\n```\n\nClassic Class Example:\n\n```js {data-filename=app/controllers/post.js}\nimport Controller, {\n inject as controller\n} from '@ember/controller';\n\nexport default Controller.extend({\n posts: controller()\n});\n```\n\nThis example will create a `posts` property on the `post` controller that\nlooks up the `posts` controller in the container, making it easy to reference\nother controllers.", + "itemtype": "method", + "name": "inject", + "static": 1, + "since": "1.10.0", + "params": [ + { + "name": "name", + "description": "(optional) name of the controller to inject, defaults to\n the property's name", + "type": "String" + } + ], + "return": { + "description": "injection decorator instance", + "type": "ComputedDecorator" + }, + "access": "public", + "tagname": "", + "class": "Ember.@ember/controller", + "module": "@ember/controller" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/controller", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.ActionHandler.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.ActionHandler.json new file mode 100644 index 000000000..bf127b3c5 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.ActionHandler.json @@ -0,0 +1,88 @@ +{ + "data": { + "id": "ember-5.12.0-Ember.ActionHandler", + "type": "class", + "attributes": { + "name": "Ember.ActionHandler", + "shortname": "Ember.ActionHandler", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [ + "Ember.CoreView", + "Ember.ControllerMixin" + ], + "module": "ember", + "namespace": "Ember", + "file": "packages/@ember/-internals/runtime/lib/mixins/action_handler.ts", + "line": 9, + "description": "`Ember.ActionHandler` is available on some familiar classes including\n`Route`, `Component`, and `Controller`.\n(Internally the mixin is used by `Ember.CoreView`, `Ember.ControllerMixin`,\nand `Route` and available to the above classes through\ninheritance.)", + "access": "private", + "tagname": "", + "methods": [ + { + "file": "packages/@ember/-internals/runtime/lib/mixins/action_handler.ts", + "line": 172, + "description": "Triggers a named action on the `ActionHandler`. Any parameters\nsupplied after the `actionName` string will be passed as arguments\nto the action target function.\n\nIf the `ActionHandler` has its `target` property set, actions may\nbubble to the `target`. Bubbling happens when an `actionName` can\nnot be found in the `ActionHandler`'s `actions` hash or if the\naction target function returns `true`.\n\nExample\n\n```js {data-filename=app/routes/welcome.js}\nimport Route from '@ember/routing/route';\n\nexport default Route.extend({\n actions: {\n playTheme() {\n this.send('playMusic', 'theme.mp3');\n },\n playMusic(track) {\n // ...\n }\n }\n});\n```", + "itemtype": "method", + "name": "send", + "params": [ + { + "name": "actionName", + "description": "The action to trigger", + "type": "String" + }, + { + "name": "context", + "description": "a context to send with the action", + "type": "*" + } + ], + "access": "public", + "tagname": "", + "class": "Ember.ActionHandler", + "module": "ember", + "namespace": "Ember" + } + ], + "events": [], + "properties": [ + { + "file": "packages/@ember/-internals/runtime/lib/mixins/action_handler.ts", + "line": 27, + "description": "The collection of functions, keyed by name, available on this\n`ActionHandler` as action targets.\n\nThese functions will be invoked when a matching `{{action}}` is triggered\nfrom within a template and the application's current route is this route.\n\nActions can also be invoked from other parts of your application\nvia `ActionHandler#send`.\n\nThe `actions` hash will inherit action handlers from\nthe `actions` hash defined on extended parent classes\nor mixins rather than just replace the entire hash, e.g.:\n\n```js {data-filename=app/mixins/can-display-banner.js}\nimport Mixin from '@ember/object/mixin';\n\nexport default Mixin.create({\n actions: {\n displayBanner(msg) {\n // ...\n }\n }\n});\n```\n\n```js {data-filename=app/routes/welcome.js}\nimport Route from '@ember/routing/route';\nimport CanDisplayBanner from '../mixins/can-display-banner';\n\nexport default Route.extend(CanDisplayBanner, {\n actions: {\n playMusic() {\n // ...\n }\n }\n});\n\n// `WelcomeRoute`, when active, will be able to respond\n// to both actions, since the actions hash is merged rather\n// then replaced when extending mixins / parent classes.\nthis.send('displayBanner');\nthis.send('playMusic');\n```\n\nWithin a Controller, Route or Component's action handler,\nthe value of the `this` context is the Controller, Route or\nComponent object:\n\n```js {data-filename=app/routes/song.js}\nimport Route from '@ember/routing/route';\n\nexport default Route.extend({\n actions: {\n myAction() {\n this.controllerFor(\"song\");\n this.transitionTo(\"other.route\");\n ...\n }\n }\n});\n```\n\nIt is also possible to call `this._super(...arguments)` from within an\naction handler if it overrides a handler defined on a parent\nclass or mixin:\n\nTake for example the following routes:\n\n```js {data-filename=app/mixins/debug-route.js}\nimport Mixin from '@ember/object/mixin';\n\nexport default Mixin.create({\n actions: {\n debugRouteInformation() {\n console.debug(\"It's a-me, console.debug!\");\n }\n }\n});\n```\n\n```js {data-filename=app/routes/annoying-debug.js}\nimport Route from '@ember/routing/route';\nimport DebugRoute from '../mixins/debug-route';\n\nexport default Route.extend(DebugRoute, {\n actions: {\n debugRouteInformation() {\n // also call the debugRouteInformation of mixed in DebugRoute\n this._super(...arguments);\n\n // show additional annoyance\n window.alert(...);\n }\n }\n});\n```\n\n## Bubbling\n\nBy default, an action will stop bubbling once a handler defined\non the `actions` hash handles it. To continue bubbling the action,\nyou must return `true` from the handler:\n\n```js {data-filename=app/router.js}\nRouter.map(function() {\n this.route(\"album\", function() {\n this.route(\"song\");\n });\n});\n```\n\n```js {data-filename=app/routes/album.js}\nimport Route from '@ember/routing/route';\n\nexport default Route.extend({\n actions: {\n startPlaying: function() {\n }\n }\n});\n```\n\n```js {data-filename=app/routes/album-song.js}\nimport Route from '@ember/routing/route';\n\nexport default Route.extend({\n actions: {\n startPlaying() {\n // ...\n\n if (actionShouldAlsoBeTriggeredOnParentRoute) {\n return true;\n }\n }\n }\n});\n```", + "itemtype": "property", + "name": "actions", + "type": "Object", + "default": "null", + "access": "public", + "tagname": "", + "class": "Ember.ActionHandler", + "module": "ember", + "namespace": "Ember" + } + ] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-ember", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.ActionSupport.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.ActionSupport.json new file mode 100644 index 000000000..7faadbd41 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.ActionSupport.json @@ -0,0 +1,46 @@ +{ + "data": { + "id": "ember-5.12.0-Ember.ActionSupport", + "type": "class", + "attributes": { + "name": "Ember.ActionSupport", + "shortname": "Ember.ActionSupport", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [ + "Component" + ], + "module": "ember", + "namespace": "Ember", + "file": "packages/@ember/-internals/views/lib/mixins/action_support.ts", + "line": 8, + "access": "private", + "tagname": "", + "methods": [], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-ember", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.ClassNamesSupport.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.ClassNamesSupport.json new file mode 100644 index 000000000..b13d44c15 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.ClassNamesSupport.json @@ -0,0 +1,88 @@ +{ + "data": { + "id": "ember-5.12.0-Ember.ClassNamesSupport", + "type": "class", + "attributes": { + "name": "Ember.ClassNamesSupport", + "shortname": "Ember.ClassNamesSupport", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [ + "Component" + ], + "module": "ember", + "namespace": "Ember", + "file": "packages/@ember/-internals/views/lib/mixins/class_names_support.ts", + "line": 10, + "access": "private", + "tagname": "", + "methods": [], + "events": [], + "properties": [ + { + "file": "packages/@ember/-internals/views/lib/mixins/child_views_support.ts", + "line": 14, + "description": "Array of child views. You should never edit this array directly.", + "itemtype": "property", + "name": "childViews", + "type": "Array", + "default": "[]", + "access": "private", + "tagname": "", + "class": "Ember.ClassNamesSupport", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/class_names_support.ts", + "line": 36, + "description": "Standard CSS class names to apply to the view's outer element. This\nproperty automatically inherits any class names defined by the view's\nsuperclasses as well.", + "itemtype": "property", + "name": "classNames", + "type": "Array", + "default": "['ember-view']", + "access": "public", + "tagname": "", + "class": "Ember.ClassNamesSupport", + "module": "ember", + "namespace": "Ember" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/class_names_support.ts", + "line": 48, + "description": "A list of properties of the view to apply as class names. If the property\nis a string value, the value of that string will be applied as a class\nname.\n\n```javascript\n// Applies the 'high' class to the view element\nimport Component from '@ember/component';\nComponent.extend({\n classNameBindings: ['priority'],\n priority: 'high'\n});\n```\n\nIf the value of the property is a Boolean, the name of that property is\nadded as a dasherized class name.\n\n```javascript\n// Applies the 'is-urgent' class to the view element\nimport Component from '@ember/component';\nComponent.extend({\n classNameBindings: ['isUrgent'],\n isUrgent: true\n});\n```\n\nIf you would prefer to use a custom value instead of the dasherized\nproperty name, you can pass a binding like this:\n\n```javascript\n// Applies the 'urgent' class to the view element\nimport Component from '@ember/component';\nComponent.extend({\n classNameBindings: ['isUrgent:urgent'],\n isUrgent: true\n});\n```\n\nIf you would like to specify a class that should only be added when the\nproperty is false, you can declare a binding like this:\n\n```javascript\n// Applies the 'disabled' class to the view element\nimport Component from '@ember/component';\nComponent.extend({\n classNameBindings: ['isEnabled::disabled'],\n isEnabled: false\n});\n```\n\nThis list of properties is inherited from the component's superclasses as well.", + "itemtype": "property", + "name": "classNameBindings", + "type": "Array", + "default": "[]", + "access": "public", + "tagname": "", + "class": "Ember.ClassNamesSupport", + "module": "ember", + "namespace": "Ember" + } + ] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-ember", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.Comparable.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.Comparable.json new file mode 100644 index 000000000..2eb5bde88 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.Comparable.json @@ -0,0 +1,75 @@ +{ + "data": { + "id": "ember-5.12.0-Ember.Comparable", + "type": "class", + "attributes": { + "name": "Ember.Comparable", + "shortname": "Ember.Comparable", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "ember", + "namespace": "Ember", + "file": "packages/@ember/-internals/runtime/lib/mixins/comparable.ts", + "line": 7, + "description": "Implements some standard methods for comparing objects. Add this mixin to\nany class you create that can compare its instances.\n\nYou should implement the `compare()` method.", + "since": "Ember 0.9", + "access": "private", + "tagname": "", + "methods": [ + { + "file": "packages/@ember/-internals/runtime/lib/mixins/comparable.ts", + "line": 22, + "description": "__Required.__ You must implement this method to apply this mixin.\n\nOverride to return the result of the comparison of the two parameters. The\ncompare method should return:\n\n- `-1` if `a < b`\n- `0` if `a == b`\n- `1` if `a > b`\n\nDefault implementation raises an exception.", + "itemtype": "method", + "name": "compare", + "params": [ + { + "name": "a", + "description": "the first object to compare", + "type": "Object" + }, + { + "name": "b", + "description": "the second object to compare", + "type": "Object" + } + ], + "return": { + "description": "the result of the comparison", + "type": "Number" + }, + "access": "private", + "tagname": "", + "class": "Ember.Comparable", + "module": "ember", + "namespace": "Ember" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-ember", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.Controller.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.Controller.json new file mode 100644 index 000000000..a43df6f80 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.Controller.json @@ -0,0 +1,729 @@ +{ + "data": { + "id": "ember-5.12.0-Ember.Controller", + "type": "class", + "attributes": { + "name": "Ember.Controller", + "shortname": "Controller", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/controller", + "namespace": "Ember", + "file": "packages/@ember/controller/index.ts", + "line": 308, + "extends": "EmberObject", + "uses": [ + "Ember.ControllerMixin" + ], + "access": "public", + "tagname": "", + "methods": [ + { + "file": "packages/@ember/controller/index.ts", + "line": 91, + "description": "Transition the application into another route. The route may\nbe either a single route or route path:\n\n```javascript\naController.transitionToRoute('blogPosts');\naController.transitionToRoute('blogPosts.recentEntries');\n```\n\nOptionally supply a model for the route in question. The model\nwill be serialized into the URL using the `serialize` hook of\nthe route:\n\n```javascript\naController.transitionToRoute('blogPost', aPost);\n```\n\nIf a literal is passed (such as a number or a string), it will\nbe treated as an identifier instead. In this case, the `model`\nhook of the route will be triggered:\n\n```javascript\naController.transitionToRoute('blogPost', 1);\n```\n\nMultiple models will be applied last to first recursively up the\nroute tree.\n\n```js {data-filename=app/router.js}\nRouter.map(function() {\n this.route('blogPost', { path: ':blogPostId' }, function() {\n this.route('blogComment', { path: ':blogCommentId', resetNamespace: true });\n });\n});\n```\n\n```javascript\naController.transitionToRoute('blogComment', aPost, aComment);\naController.transitionToRoute('blogComment', 1, 13);\n```\n\nIt is also possible to pass a URL (a string that starts with a\n`/`).\n\n```javascript\naController.transitionToRoute('/');\naController.transitionToRoute('/blog/post/1/comment/13');\naController.transitionToRoute('/blog/posts?sort=title');\n```\n\nAn options hash with a `queryParams` property may be provided as\nthe final argument to add query parameters to the destination URL.\n\n```javascript\naController.transitionToRoute('blogPost', 1, {\n queryParams: { showComments: 'true' }\n});\n\n// if you just want to transition the query parameters without changing the route\naController.transitionToRoute({ queryParams: { sort: 'date' } });\n```\n\nSee also [replaceRoute](/ember/release/classes/Ember.ControllerMixin/methods/replaceRoute?anchor=replaceRoute).", + "itemtype": "method", + "name": "transitionToRoute", + "deprecated": true, + "deprecationMessage": "Use transitionTo from the Router service instead.", + "params": [ + { + "name": "name", + "description": "the name of the route or a URL", + "type": "String", + "optional": true + }, + { + "name": "models", + "description": "the model(s) or identifier(s) to be used\n while transitioning to the route.", + "type": "...Object" + }, + { + "name": "options", + "description": "optional hash with a queryParams property\n containing a mapping of query parameters", + "type": "Object", + "optional": true + } + ], + "return": { + "description": "the transition object associated with this\n attempted transition", + "type": "Transition" + }, + "access": "public", + "tagname": "", + "class": "Ember.Controller", + "module": "@ember/controller", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.ControllerMixin" + }, + { + "file": "packages/@ember/controller/index.ts", + "line": 169, + "description": "Transition into another route while replacing the current URL, if possible.\nThis will replace the current history entry instead of adding a new one.\nBeside that, it is identical to `transitionToRoute` in all other respects.\n\n```javascript\naController.replaceRoute('blogPosts');\naController.replaceRoute('blogPosts.recentEntries');\n```\n\nOptionally supply a model for the route in question. The model\nwill be serialized into the URL using the `serialize` hook of\nthe route:\n\n```javascript\naController.replaceRoute('blogPost', aPost);\n```\n\nIf a literal is passed (such as a number or a string), it will\nbe treated as an identifier instead. In this case, the `model`\nhook of the route will be triggered:\n\n```javascript\naController.replaceRoute('blogPost', 1);\n```\n\nMultiple models will be applied last to first recursively up the\nroute tree.\n\n```js {data-filename=app/router.js}\nRouter.map(function() {\n this.route('blogPost', { path: ':blogPostId' }, function() {\n this.route('blogComment', { path: ':blogCommentId', resetNamespace: true });\n });\n});\n```\n\n```\naController.replaceRoute('blogComment', aPost, aComment);\naController.replaceRoute('blogComment', 1, 13);\n```\n\nIt is also possible to pass a URL (a string that starts with a\n`/`).\n\n```javascript\naController.replaceRoute('/');\naController.replaceRoute('/blog/post/1/comment/13');\n```", + "itemtype": "method", + "name": "replaceRoute", + "deprecated": true, + "deprecationMessage": "Use replaceWith from the Router service instead.", + "params": [ + { + "name": "name", + "description": "the name of the route or a URL", + "type": "String", + "optional": true + }, + { + "name": "models", + "description": "the model(s) or identifier(s) to be used\nwhile transitioning to the route.", + "type": "...Object" + }, + { + "name": "options", + "description": "optional hash with a queryParams property\ncontaining a mapping of query parameters", + "type": "Object", + "optional": true + } + ], + "return": { + "description": "the transition object associated with this\n attempted transition", + "type": "Transition" + }, + "access": "public", + "tagname": "", + "class": "Ember.Controller", + "module": "@ember/controller", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.ControllerMixin" + }, + { + "file": "packages/@ember/controller/index.ts", + "line": 264, + "description": "This property is updated to various different callback functions depending on\nthe current \"state\" of the backing route. It is used by\n`Controller.prototype._qpChanged`.\n\nThe methods backing each state can be found in the `Route.prototype._qp` computed\nproperty return value (the `.states` property). The current values are listed here for\nthe sanity of future travelers:\n\n* `inactive` - This state is used when this controller instance is not part of the active\n route hierarchy. Set in `Route.prototype._reset` (a `router.js` microlib hook) and\n `Route.prototype.actions.finalizeQueryParamChange`.\n* `active` - This state is used when this controller instance is part of the active\n route hierarchy. Set in `Route.prototype.actions.finalizeQueryParamChange`.\n* `allowOverrides` - This state is used in `Route.prototype.setup` (`route.js` microlib hook).", + "itemtype": "method", + "name": "_qpDelegate", + "access": "private", + "tagname": "", + "class": "Ember.Controller", + "module": "@ember/controller", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.ControllerMixin" + }, + { + "file": "packages/@ember/controller/index.ts", + "line": 285, + "description": "During `Route#setup` observers are created to invoke this method\nwhen any of the query params declared in `Controller#queryParams` property\nare changed.\n\nWhen invoked this method uses the currently active query param update delegate\n(see `Controller.prototype._qpDelegate` for details) and invokes it with\nthe QP key/value being changed.", + "itemtype": "method", + "name": "_qpChanged", + "access": "private", + "tagname": "", + "class": "Ember.Controller", + "module": "@ember/controller", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.ControllerMixin" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 321, + "description": "An overridable method called when objects are instantiated. By default,\ndoes nothing unless it is overridden during class definition.\n\nExample:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Person = EmberObject.extend({\n init() {\n alert(`Name is ${this.get('name')}`);\n }\n});\n\nlet steve = Person.create({\n name: 'Steve'\n});\n\n// alerts 'Name is Steve'.\n```\n\nNOTE: If you do override `init` for a framework class like `Component`\nfrom `@ember/component`, be sure to call `this._super(...arguments)`\nin your `init` declaration!\nIf you don't, Ember may not have an opportunity to\ndo important setup work, and you'll see strange behavior in your\napplication.", + "itemtype": "method", + "name": "init", + "access": "public", + "tagname": "", + "class": "Ember.Controller", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 540, + "description": "Destroys an object by setting the `isDestroyed` flag and removing its\nmetadata, which effectively destroys observers and bindings.\n\nIf you try to set a property on a destroyed object, an exception will be\nraised.\n\nNote that destruction is scheduled for the end of the run loop and does not\nhappen immediately. It will set an isDestroying flag immediately.", + "itemtype": "method", + "name": "destroy", + "return": { + "description": "receiver", + "type": "EmberObject" + }, + "access": "public", + "tagname": "", + "class": "Ember.Controller", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 567, + "description": "Override to implement teardown.", + "itemtype": "method", + "name": "willDestroy", + "access": "public", + "tagname": "", + "class": "Ember.Controller", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 575, + "description": "Returns a string representation which attempts to provide more information\nthan Javascript's `toString` typically does, in a generic way for all Ember\nobjects.\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Person = EmberObject.extend();\nperson = Person.create();\nperson.toString(); //=> \"\"\n```\n\nIf the object's class is not defined on an Ember namespace, it will\nindicate it is a subclass of the registered superclass:\n\n```javascript\nconst Student = Person.extend();\nlet student = Student.create();\nstudent.toString(); //=> \"<(subclass of Person):ember1025>\"\n```\n\nIf the method `toStringExtension` is defined, its return value will be\nincluded in the output.\n\n```javascript\nconst Teacher = Person.extend({\n toStringExtension() {\n return this.get('fullName');\n }\n});\nteacher = Teacher.create();\nteacher.toString(); //=> \"\"\n```", + "itemtype": "method", + "name": "toString", + "return": { + "description": "string representation", + "type": "String" + }, + "access": "public", + "tagname": "", + "class": "Ember.Controller", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 97, + "description": "Retrieves the value of a property from the object.\n\nThis method is usually similar to using `object[keyName]` or `object.keyName`,\nhowever it supports both computed properties and the unknownProperty\nhandler.\n\nBecause `get` unifies the syntax for accessing all these kinds\nof properties, it can make many refactorings easier, such as replacing a\nsimple property with a computed property, or vice versa.\n\n### Computed Properties\n\nComputed properties are methods defined with the `property` modifier\ndeclared at the end, such as:\n\n```javascript\nimport { computed } from '@ember/object';\n\nfullName: computed('firstName', 'lastName', function() {\n return this.get('firstName') + ' ' + this.get('lastName');\n})\n```\n\nWhen you call `get` on a computed property, the function will be\ncalled and the return value will be returned instead of the function\nitself.\n\n### Unknown Properties\n\nLikewise, if you try to call `get` on a property whose value is\n`undefined`, the `unknownProperty()` method will be called on the object.\nIf this method returns any value other than `undefined`, it will be returned\ninstead. This allows you to implement \"virtual\" properties that are\nnot defined upfront.", + "itemtype": "method", + "name": "get", + "params": [ + { + "name": "keyName", + "description": "The property to retrieve", + "type": "String" + } + ], + "return": { + "description": "The property value or undefined.", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "Ember.Controller", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 141, + "description": "To get the values of multiple properties at once, call `getProperties`\nwith a list of strings or an array:\n\n```javascript\nrecord.getProperties('firstName', 'lastName', 'zipCode');\n// { firstName: 'John', lastName: 'Doe', zipCode: '10011' }\n```\n\nis equivalent to:\n\n```javascript\nrecord.getProperties(['firstName', 'lastName', 'zipCode']);\n// { firstName: 'John', lastName: 'Doe', zipCode: '10011' }\n```", + "itemtype": "method", + "name": "getProperties", + "params": [ + { + "name": "list", + "description": "of keys to get", + "type": "String...|Array" + } + ], + "return": { + "description": "", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "Ember.Controller", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 168, + "description": "Sets the provided key or path to the value.\n\n```javascript\nrecord.set(\"key\", value);\n```\n\nThis method is generally very similar to calling `object[\"key\"] = value` or\n`object.key = value`, except that it provides support for computed\nproperties, the `setUnknownProperty()` method and property observers.\n\n### Computed Properties\n\nIf you try to set a value on a key that has a computed property handler\ndefined (see the `get()` method for an example), then `set()` will call\nthat method, passing both the value and key instead of simply changing\nthe value itself. This is useful for those times when you need to\nimplement a property that is composed of one or more member\nproperties.\n\n### Unknown Properties\n\nIf you try to set a value on a key that is undefined in the target\nobject, then the `setUnknownProperty()` handler will be called instead. This\ngives you an opportunity to implement complex \"virtual\" properties that\nare not predefined on the object. If `setUnknownProperty()` returns\nundefined, then `set()` will simply set the value on the object.\n\n### Property Observers\n\nIn addition to changing the property, `set()` will also register a property\nchange with the object. Unless you have placed this call inside of a\n`beginPropertyChanges()` and `endPropertyChanges(),` any \"local\" observers\n(i.e. observer methods declared on the same object), will be called\nimmediately. Any \"remote\" observers (i.e. observer methods declared on\nanother object) will be placed in a queue and called at a later time in a\ncoalesced manner.", + "itemtype": "method", + "name": "set", + "params": [ + { + "name": "keyName", + "description": "The property to set", + "type": "String" + }, + { + "name": "value", + "description": "The value to set or `null`.", + "type": "Object" + } + ], + "return": { + "description": "The passed value", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "Ember.Controller", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 216, + "description": "Sets a list of properties at once. These properties are set inside\na single `beginPropertyChanges` and `endPropertyChanges` batch, so\nobservers will be buffered.\n\n```javascript\nrecord.setProperties({ firstName: 'Charles', lastName: 'Jolley' });\n```", + "itemtype": "method", + "name": "setProperties", + "params": [ + { + "name": "hash", + "description": "the hash of keys and values to set", + "type": "Object" + } + ], + "return": { + "description": "The passed in hash", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "Ember.Controller", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 233, + "description": "Convenience method to call `propertyWillChange` and `propertyDidChange` in\nsuccession.\n\nNotify the observer system that a property has just changed.\n\nSometimes you need to change a value directly or indirectly without\nactually calling `get()` or `set()` on it. In this case, you can use this\nmethod instead. Calling this method will notify all observers that the\nproperty has potentially changed value.", + "itemtype": "method", + "name": "notifyPropertyChange", + "params": [ + { + "name": "keyName", + "description": "The property key to be notified about.", + "type": "String" + } + ], + "return": { + "description": "", + "type": "Observable" + }, + "access": "public", + "tagname": "", + "class": "Ember.Controller", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 251, + "description": "Adds an observer on a property.\n\nThis is the core method used to register an observer for a property.\n\nOnce you call this method, any time the key's value is set, your observer\nwill be notified. Note that the observers are triggered any time the\nvalue is set, regardless of whether it has actually changed. Your\nobserver should be prepared to handle that.\n\nThere are two common invocation patterns for `.addObserver()`:\n\n- Passing two arguments:\n - the name of the property to observe (as a string)\n - the function to invoke (an actual function)\n- Passing three arguments:\n - the name of the property to observe (as a string)\n - the target object (will be used to look up and invoke a\n function on)\n - the name of the function to invoke on the target object\n (as a string).\n\n```js {data-filename=app/components/my-component.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n init() {\n this._super(...arguments);\n\n // the following are equivalent:\n\n // using three arguments\n this.addObserver('foo', this, 'fooDidChange');\n\n // using two arguments\n this.addObserver('foo', (...args) => {\n this.fooDidChange(...args);\n });\n },\n\n fooDidChange() {\n // your custom logic code\n }\n});\n```\n\n### Observer Methods\n\nObserver methods have the following signature:\n\n```js {data-filename=app/components/my-component.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n init() {\n this._super(...arguments);\n this.addObserver('foo', this, 'fooDidChange');\n },\n\n fooDidChange(sender, key, value, rev) {\n // your code\n }\n});\n```\n\nThe `sender` is the object that changed. The `key` is the property that\nchanges. The `value` property is currently reserved and unused. The `rev`\nis the last property revision of the object when it changed, which you can\nuse to detect if the key value has really changed or not.\n\nUsually you will not need the value or revision parameters at\nthe end. In this case, it is common to write observer methods that take\nonly a sender and key value as parameters or, if you aren't interested in\nany of these values, to write an observer that has no parameters at all.", + "itemtype": "method", + "name": "addObserver", + "params": [ + { + "name": "key", + "description": "The key to observe", + "type": "String" + }, + { + "name": "target", + "description": "The target object to invoke", + "type": "Object" + }, + { + "name": "method", + "description": "The method to invoke", + "type": "String|Function" + }, + { + "name": "sync", + "description": "Whether the observer is sync or not", + "type": "Boolean" + } + ], + "return": { + "description": "", + "type": "Observable" + }, + "access": "public", + "tagname": "", + "class": "Ember.Controller", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 337, + "description": "Remove an observer you have previously registered on this object. Pass\nthe same key, target, and method you passed to `addObserver()` and your\ntarget will no longer receive notifications.", + "itemtype": "method", + "name": "removeObserver", + "params": [ + { + "name": "key", + "description": "The key to observe", + "type": "String" + }, + { + "name": "target", + "description": "The target object to invoke", + "type": "Object" + }, + { + "name": "method", + "description": "The method to invoke", + "type": "String|Function" + }, + { + "name": "sync", + "description": "Whether the observer is async or not", + "type": "Boolean" + } + ], + "return": { + "description": "", + "type": "Observable" + }, + "access": "public", + "tagname": "", + "class": "Ember.Controller", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 358, + "description": "Set the value of a property to the current value plus some amount.\n\n```javascript\nperson.incrementProperty('age');\nteam.incrementProperty('score', 2);\n```", + "itemtype": "method", + "name": "incrementProperty", + "params": [ + { + "name": "keyName", + "description": "The name of the property to increment", + "type": "String" + }, + { + "name": "increment", + "description": "The amount to increment by. Defaults to 1", + "type": "Number" + } + ], + "return": { + "description": "The new property value", + "type": "Number" + }, + "access": "public", + "tagname": "", + "class": "Ember.Controller", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 375, + "description": "Set the value of a property to the current value minus some amount.\n\n```javascript\nplayer.decrementProperty('lives');\norc.decrementProperty('health', 5);\n```", + "itemtype": "method", + "name": "decrementProperty", + "params": [ + { + "name": "keyName", + "description": "The name of the property to decrement", + "type": "String" + }, + { + "name": "decrement", + "description": "The amount to decrement by. Defaults to 1", + "type": "Number" + } + ], + "return": { + "description": "The new property value", + "type": "Number" + }, + "access": "public", + "tagname": "", + "class": "Ember.Controller", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 392, + "description": "Set the value of a boolean property to the opposite of its\ncurrent value.\n\n```javascript\nstarship.toggleProperty('warpDriveEngaged');\n```", + "itemtype": "method", + "name": "toggleProperty", + "params": [ + { + "name": "keyName", + "description": "The name of the property to toggle", + "type": "String" + } + ], + "return": { + "description": "The new property value", + "type": "Boolean" + }, + "access": "public", + "tagname": "", + "class": "Ember.Controller", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 407, + "description": "Returns the cached value of a computed property, if it exists.\nThis allows you to inspect the value of a computed property\nwithout accidentally invoking it if it is intended to be\ngenerated lazily.", + "itemtype": "method", + "name": "cacheFor", + "params": [ + { + "name": "keyName", + "description": "", + "type": "String" + } + ], + "return": { + "description": "The cached value of the computed property, if any", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "Ember.Controller", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 437, + "description": "Begins a grouping of property changes.\n\nYou can use this method to group property changes so that notifications\nwill not be sent until the changes are finished. If you plan to make a\nlarge number of changes to an object at one time, you should call this\nmethod at the beginning of the changes to begin deferring change\nnotifications. When you are done making changes, call\n`endPropertyChanges()` to deliver the deferred change notifications and end\ndeferring.", + "itemtype": "method", + "name": "beginPropertyChanges", + "return": { + "description": "", + "type": "Observable" + }, + "access": "private", + "tagname": "", + "class": "Ember.Controller", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 457, + "description": "Ends a grouping of property changes.\n\nYou can use this method to group property changes so that notifications\nwill not be sent until the changes are finished. If you plan to make a\nlarge number of changes to an object at one time, you should call\n`beginPropertyChanges()` at the beginning of the changes to defer change\nnotifications. When you are done making changes, call this method to\ndeliver the deferred change notifications and end deferring.", + "itemtype": "method", + "name": "endPropertyChanges", + "return": { + "description": "", + "type": "Observable" + }, + "access": "private", + "tagname": "", + "class": "Ember.Controller", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 501, + "description": "Returns `true` if the object currently has observers registered for a\nparticular key. You can use this method to potentially defer performing\nan expensive action until someone begins observing a particular property\non the object.", + "itemtype": "method", + "name": "hasObserverFor", + "params": [ + { + "name": "key", + "description": "Key to check", + "type": "String" + } + ], + "return": { + "description": "", + "type": "Boolean" + }, + "access": "private", + "tagname": "", + "class": "Ember.Controller", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/-internals/runtime/lib/mixins/action_handler.ts", + "line": 172, + "description": "Triggers a named action on the `ActionHandler`. Any parameters\nsupplied after the `actionName` string will be passed as arguments\nto the action target function.\n\nIf the `ActionHandler` has its `target` property set, actions may\nbubble to the `target`. Bubbling happens when an `actionName` can\nnot be found in the `ActionHandler`'s `actions` hash or if the\naction target function returns `true`.\n\nExample\n\n```js {data-filename=app/routes/welcome.js}\nimport Route from '@ember/routing/route';\n\nexport default Route.extend({\n actions: {\n playTheme() {\n this.send('playMusic', 'theme.mp3');\n },\n playMusic(track) {\n // ...\n }\n }\n});\n```", + "itemtype": "method", + "name": "send", + "params": [ + { + "name": "actionName", + "description": "The action to trigger", + "type": "String" + }, + { + "name": "context", + "description": "a context to send with the action", + "type": "*" + } + ], + "access": "public", + "tagname": "", + "class": "Ember.Controller", + "module": "ember", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.ActionHandler" + } + ], + "events": [], + "properties": [ + { + "file": "packages/@ember/controller/index.ts", + "line": 36, + "description": "The object to which actions from the view should be sent.\n\nFor example, when a Handlebars template uses the `{{action}}` helper,\nit will attempt to send the action to the view's controller's `target`.\n\nBy default, the value of the target property is set to the router, and\nis injected when a controller is instantiated. This injection is applied\nas part of the application's initialization process. In most cases the\n`target` property will automatically be set to the logical consumer of\nactions for the controller.", + "itemtype": "property", + "name": "target", + "default": "null", + "access": "public", + "tagname": "", + "class": "Ember.Controller", + "module": "@ember/controller", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.ControllerMixin" + }, + { + "file": "packages/@ember/controller/index.ts", + "line": 54, + "description": "The controller's current model. When retrieving or modifying a controller's\nmodel, this property should be used instead of the `content` property.", + "itemtype": "property", + "name": "model", + "access": "public", + "tagname": "", + "class": "Ember.Controller", + "module": "@ember/controller", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.ControllerMixin" + }, + { + "file": "packages/@ember/controller/index.ts", + "line": 63, + "description": "Defines which query parameters the controller accepts.\nIf you give the names `['category','page']` it will bind\nthe values of these query parameters to the variables\n`this.category` and `this.page`.\n\nBy default, query parameters are parsed as strings. This\nmay cause unexpected behavior if a query parameter is used with `toggleProperty`,\nbecause the initial value set for `param=false` will be the string `\"false\"`, which is truthy.\n\nTo avoid this, you may specify that the query parameter should be parsed as a boolean\nby using the following verbose form with a `type` property:\n```javascript\n queryParams: [{\n category: {\n type: 'boolean'\n }\n }]\n```\nAvailable values for the `type` parameter are `'boolean'`, `'number'`, `'array'`, and `'string'`.\nIf query param type is not specified, it will default to `'string'`.", + "itemtype": "property", + "name": "queryParams", + "access": "public", + "tagname": "", + "class": "Ember.Controller", + "module": "@ember/controller", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.ControllerMixin" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 355, + "description": "Defines the properties that will be concatenated from the superclass\n(instead of overridden).\n\nBy default, when you extend an Ember class a property defined in\nthe subclass overrides a property with the same name that is defined\nin the superclass. However, there are some cases where it is preferable\nto build up a property's value by combining the superclass' property\nvalue with the subclass' value. An example of this in use within Ember\nis the `classNames` property of `Component` from `@ember/component`.\n\nHere is some sample code showing the difference between a concatenated\nproperty and a normal one:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Bar = EmberObject.extend({\n // Configure which properties to concatenate\n concatenatedProperties: ['concatenatedProperty'],\n\n someNonConcatenatedProperty: ['bar'],\n concatenatedProperty: ['bar']\n});\n\nconst FooBar = Bar.extend({\n someNonConcatenatedProperty: ['foo'],\n concatenatedProperty: ['foo']\n});\n\nlet fooBar = FooBar.create();\nfooBar.get('someNonConcatenatedProperty'); // ['foo']\nfooBar.get('concatenatedProperty'); // ['bar', 'foo']\n```\n\nThis behavior extends to object creation as well. Continuing the\nabove example:\n\n```javascript\nlet fooBar = FooBar.create({\n someNonConcatenatedProperty: ['baz'],\n concatenatedProperty: ['baz']\n})\nfooBar.get('someNonConcatenatedProperty'); // ['baz']\nfooBar.get('concatenatedProperty'); // ['bar', 'foo', 'baz']\n```\n\nAdding a single property that is not an array will just add it in the array:\n\n```javascript\nlet fooBar = FooBar.create({\n concatenatedProperty: 'baz'\n})\nview.get('concatenatedProperty'); // ['bar', 'foo', 'baz']\n```\n\nUsing the `concatenatedProperties` property, we can tell Ember to mix the\ncontent of the properties.\n\nIn `Component` the `classNames`, `classNameBindings` and\n`attributeBindings` properties are concatenated.\n\nThis feature is available for you to use throughout the Ember object model,\nalthough typical app developers are likely to use it infrequently. Since\nit changes expectations about behavior of properties, you should properly\ndocument its usage in each individual concatenated property (to not\nmislead your users to think they can override the property in a subclass).", + "itemtype": "property", + "name": "concatenatedProperties", + "type": "Array", + "default": "null", + "access": "public", + "tagname": "", + "class": "Ember.Controller", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 429, + "description": "Defines the properties that will be merged from the superclass\n(instead of overridden).\n\nBy default, when you extend an Ember class a property defined in\nthe subclass overrides a property with the same name that is defined\nin the superclass. However, there are some cases where it is preferable\nto build up a property's value by merging the superclass property value\nwith the subclass property's value. An example of this in use within Ember\nis the `queryParams` property of routes.\n\nHere is some sample code showing the difference between a merged\nproperty and a normal one:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Bar = EmberObject.extend({\n // Configure which properties are to be merged\n mergedProperties: ['mergedProperty'],\n\n someNonMergedProperty: {\n nonMerged: 'superclass value of nonMerged'\n },\n mergedProperty: {\n page: { replace: false },\n limit: { replace: true }\n }\n});\n\nconst FooBar = Bar.extend({\n someNonMergedProperty: {\n completelyNonMerged: 'subclass value of nonMerged'\n },\n mergedProperty: {\n limit: { replace: false }\n }\n});\n\nlet fooBar = FooBar.create();\n\nfooBar.get('someNonMergedProperty');\n// => { completelyNonMerged: 'subclass value of nonMerged' }\n//\n// Note the entire object, including the nonMerged property of\n// the superclass object, has been replaced\n\nfooBar.get('mergedProperty');\n// => {\n// page: {replace: false},\n// limit: {replace: false}\n// }\n//\n// Note the page remains from the superclass, and the\n// `limit` property's value of `false` has been merged from\n// the subclass.\n```\n\nThis behavior is not available during object `create` calls. It is only\navailable at `extend` time.\n\nIn `Route` the `queryParams` property is merged.\n\nThis feature is available for you to use throughout the Ember object model,\nalthough typical app developers are likely to use it infrequently. Since\nit changes expectations about behavior of properties, you should properly\ndocument its usage in each individual merged property (to not\nmislead your users to think they can override the property in a subclass).", + "itemtype": "property", + "name": "mergedProperties", + "type": "Array", + "default": "null", + "access": "public", + "tagname": "", + "class": "Ember.Controller", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 504, + "description": "Destroyed object property flag.\n\nif this property is `true` the observers and bindings were already\nremoved by the effect of calling the `destroy()` method.", + "itemtype": "property", + "name": "isDestroyed", + "default": "false", + "access": "public", + "tagname": "", + "class": "Ember.Controller", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 522, + "description": "Destruction scheduled flag. The `destroy()` method has been called.\n\nThe object stays intact until the end of the run loop at which point\nthe `isDestroyed` flag is set.", + "itemtype": "property", + "name": "isDestroying", + "default": "false", + "access": "public", + "tagname": "", + "class": "Ember.Controller", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/-internals/runtime/lib/mixins/action_handler.ts", + "line": 27, + "description": "The collection of functions, keyed by name, available on this\n`ActionHandler` as action targets.\n\nThese functions will be invoked when a matching `{{action}}` is triggered\nfrom within a template and the application's current route is this route.\n\nActions can also be invoked from other parts of your application\nvia `ActionHandler#send`.\n\nThe `actions` hash will inherit action handlers from\nthe `actions` hash defined on extended parent classes\nor mixins rather than just replace the entire hash, e.g.:\n\n```js {data-filename=app/mixins/can-display-banner.js}\nimport Mixin from '@ember/object/mixin';\n\nexport default Mixin.create({\n actions: {\n displayBanner(msg) {\n // ...\n }\n }\n});\n```\n\n```js {data-filename=app/routes/welcome.js}\nimport Route from '@ember/routing/route';\nimport CanDisplayBanner from '../mixins/can-display-banner';\n\nexport default Route.extend(CanDisplayBanner, {\n actions: {\n playMusic() {\n // ...\n }\n }\n});\n\n// `WelcomeRoute`, when active, will be able to respond\n// to both actions, since the actions hash is merged rather\n// then replaced when extending mixins / parent classes.\nthis.send('displayBanner');\nthis.send('playMusic');\n```\n\nWithin a Controller, Route or Component's action handler,\nthe value of the `this` context is the Controller, Route or\nComponent object:\n\n```js {data-filename=app/routes/song.js}\nimport Route from '@ember/routing/route';\n\nexport default Route.extend({\n actions: {\n myAction() {\n this.controllerFor(\"song\");\n this.transitionTo(\"other.route\");\n ...\n }\n }\n});\n```\n\nIt is also possible to call `this._super(...arguments)` from within an\naction handler if it overrides a handler defined on a parent\nclass or mixin:\n\nTake for example the following routes:\n\n```js {data-filename=app/mixins/debug-route.js}\nimport Mixin from '@ember/object/mixin';\n\nexport default Mixin.create({\n actions: {\n debugRouteInformation() {\n console.debug(\"It's a-me, console.debug!\");\n }\n }\n});\n```\n\n```js {data-filename=app/routes/annoying-debug.js}\nimport Route from '@ember/routing/route';\nimport DebugRoute from '../mixins/debug-route';\n\nexport default Route.extend(DebugRoute, {\n actions: {\n debugRouteInformation() {\n // also call the debugRouteInformation of mixed in DebugRoute\n this._super(...arguments);\n\n // show additional annoyance\n window.alert(...);\n }\n }\n});\n```\n\n## Bubbling\n\nBy default, an action will stop bubbling once a handler defined\non the `actions` hash handles it. To continue bubbling the action,\nyou must return `true` from the handler:\n\n```js {data-filename=app/router.js}\nRouter.map(function() {\n this.route(\"album\", function() {\n this.route(\"song\");\n });\n});\n```\n\n```js {data-filename=app/routes/album.js}\nimport Route from '@ember/routing/route';\n\nexport default Route.extend({\n actions: {\n startPlaying: function() {\n }\n }\n});\n```\n\n```js {data-filename=app/routes/album-song.js}\nimport Route from '@ember/routing/route';\n\nexport default Route.extend({\n actions: {\n startPlaying() {\n // ...\n\n if (actionShouldAlsoBeTriggeredOnParentRoute) {\n return true;\n }\n }\n }\n});\n```", + "itemtype": "property", + "name": "actions", + "type": "Object", + "default": "null", + "access": "public", + "tagname": "", + "class": "Ember.Controller", + "module": "ember", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.ActionHandler" + } + ] + }, + "relationships": { + "parent-class": { + "data": { + "id": "ember-5.12.0-EmberObject", + "type": "class" + } + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/controller", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.ControllerMixin.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.ControllerMixin.json new file mode 100644 index 000000000..6db2dc38c --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.ControllerMixin.json @@ -0,0 +1,228 @@ +{ + "data": { + "id": "ember-5.12.0-Ember.ControllerMixin", + "type": "class", + "attributes": { + "name": "Ember.ControllerMixin", + "shortname": "Ember.ControllerMixin", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [ + "Ember.Controller" + ], + "module": "@ember/controller", + "namespace": "Ember", + "file": "packages/@ember/controller/index.ts", + "line": 24, + "uses": [ + "Ember.ActionHandler" + ], + "access": "private", + "tagname": "", + "methods": [ + { + "file": "packages/@ember/controller/index.ts", + "line": 91, + "description": "Transition the application into another route. The route may\nbe either a single route or route path:\n\n```javascript\naController.transitionToRoute('blogPosts');\naController.transitionToRoute('blogPosts.recentEntries');\n```\n\nOptionally supply a model for the route in question. The model\nwill be serialized into the URL using the `serialize` hook of\nthe route:\n\n```javascript\naController.transitionToRoute('blogPost', aPost);\n```\n\nIf a literal is passed (such as a number or a string), it will\nbe treated as an identifier instead. In this case, the `model`\nhook of the route will be triggered:\n\n```javascript\naController.transitionToRoute('blogPost', 1);\n```\n\nMultiple models will be applied last to first recursively up the\nroute tree.\n\n```js {data-filename=app/router.js}\nRouter.map(function() {\n this.route('blogPost', { path: ':blogPostId' }, function() {\n this.route('blogComment', { path: ':blogCommentId', resetNamespace: true });\n });\n});\n```\n\n```javascript\naController.transitionToRoute('blogComment', aPost, aComment);\naController.transitionToRoute('blogComment', 1, 13);\n```\n\nIt is also possible to pass a URL (a string that starts with a\n`/`).\n\n```javascript\naController.transitionToRoute('/');\naController.transitionToRoute('/blog/post/1/comment/13');\naController.transitionToRoute('/blog/posts?sort=title');\n```\n\nAn options hash with a `queryParams` property may be provided as\nthe final argument to add query parameters to the destination URL.\n\n```javascript\naController.transitionToRoute('blogPost', 1, {\n queryParams: { showComments: 'true' }\n});\n\n// if you just want to transition the query parameters without changing the route\naController.transitionToRoute({ queryParams: { sort: 'date' } });\n```\n\nSee also [replaceRoute](/ember/release/classes/Ember.ControllerMixin/methods/replaceRoute?anchor=replaceRoute).", + "itemtype": "method", + "name": "transitionToRoute", + "deprecated": true, + "deprecationMessage": "Use transitionTo from the Router service instead.", + "params": [ + { + "name": "name", + "description": "the name of the route or a URL", + "type": "String", + "optional": true + }, + { + "name": "models", + "description": "the model(s) or identifier(s) to be used\n while transitioning to the route.", + "type": "...Object" + }, + { + "name": "options", + "description": "optional hash with a queryParams property\n containing a mapping of query parameters", + "type": "Object", + "optional": true + } + ], + "return": { + "description": "the transition object associated with this\n attempted transition", + "type": "Transition" + }, + "access": "public", + "tagname": "", + "class": "Ember.ControllerMixin", + "module": "@ember/controller", + "namespace": "Ember" + }, + { + "file": "packages/@ember/controller/index.ts", + "line": 169, + "description": "Transition into another route while replacing the current URL, if possible.\nThis will replace the current history entry instead of adding a new one.\nBeside that, it is identical to `transitionToRoute` in all other respects.\n\n```javascript\naController.replaceRoute('blogPosts');\naController.replaceRoute('blogPosts.recentEntries');\n```\n\nOptionally supply a model for the route in question. The model\nwill be serialized into the URL using the `serialize` hook of\nthe route:\n\n```javascript\naController.replaceRoute('blogPost', aPost);\n```\n\nIf a literal is passed (such as a number or a string), it will\nbe treated as an identifier instead. In this case, the `model`\nhook of the route will be triggered:\n\n```javascript\naController.replaceRoute('blogPost', 1);\n```\n\nMultiple models will be applied last to first recursively up the\nroute tree.\n\n```js {data-filename=app/router.js}\nRouter.map(function() {\n this.route('blogPost', { path: ':blogPostId' }, function() {\n this.route('blogComment', { path: ':blogCommentId', resetNamespace: true });\n });\n});\n```\n\n```\naController.replaceRoute('blogComment', aPost, aComment);\naController.replaceRoute('blogComment', 1, 13);\n```\n\nIt is also possible to pass a URL (a string that starts with a\n`/`).\n\n```javascript\naController.replaceRoute('/');\naController.replaceRoute('/blog/post/1/comment/13');\n```", + "itemtype": "method", + "name": "replaceRoute", + "deprecated": true, + "deprecationMessage": "Use replaceWith from the Router service instead.", + "params": [ + { + "name": "name", + "description": "the name of the route or a URL", + "type": "String", + "optional": true + }, + { + "name": "models", + "description": "the model(s) or identifier(s) to be used\nwhile transitioning to the route.", + "type": "...Object" + }, + { + "name": "options", + "description": "optional hash with a queryParams property\ncontaining a mapping of query parameters", + "type": "Object", + "optional": true + } + ], + "return": { + "description": "the transition object associated with this\n attempted transition", + "type": "Transition" + }, + "access": "public", + "tagname": "", + "class": "Ember.ControllerMixin", + "module": "@ember/controller", + "namespace": "Ember" + }, + { + "file": "packages/@ember/controller/index.ts", + "line": 264, + "description": "This property is updated to various different callback functions depending on\nthe current \"state\" of the backing route. It is used by\n`Controller.prototype._qpChanged`.\n\nThe methods backing each state can be found in the `Route.prototype._qp` computed\nproperty return value (the `.states` property). The current values are listed here for\nthe sanity of future travelers:\n\n* `inactive` - This state is used when this controller instance is not part of the active\n route hierarchy. Set in `Route.prototype._reset` (a `router.js` microlib hook) and\n `Route.prototype.actions.finalizeQueryParamChange`.\n* `active` - This state is used when this controller instance is part of the active\n route hierarchy. Set in `Route.prototype.actions.finalizeQueryParamChange`.\n* `allowOverrides` - This state is used in `Route.prototype.setup` (`route.js` microlib hook).", + "itemtype": "method", + "name": "_qpDelegate", + "access": "private", + "tagname": "", + "class": "Ember.ControllerMixin", + "module": "@ember/controller", + "namespace": "Ember" + }, + { + "file": "packages/@ember/controller/index.ts", + "line": 285, + "description": "During `Route#setup` observers are created to invoke this method\nwhen any of the query params declared in `Controller#queryParams` property\nare changed.\n\nWhen invoked this method uses the currently active query param update delegate\n(see `Controller.prototype._qpDelegate` for details) and invokes it with\nthe QP key/value being changed.", + "itemtype": "method", + "name": "_qpChanged", + "access": "private", + "tagname": "", + "class": "Ember.ControllerMixin", + "module": "@ember/controller", + "namespace": "Ember" + }, + { + "file": "packages/@ember/-internals/runtime/lib/mixins/action_handler.ts", + "line": 172, + "description": "Triggers a named action on the `ActionHandler`. Any parameters\nsupplied after the `actionName` string will be passed as arguments\nto the action target function.\n\nIf the `ActionHandler` has its `target` property set, actions may\nbubble to the `target`. Bubbling happens when an `actionName` can\nnot be found in the `ActionHandler`'s `actions` hash or if the\naction target function returns `true`.\n\nExample\n\n```js {data-filename=app/routes/welcome.js}\nimport Route from '@ember/routing/route';\n\nexport default Route.extend({\n actions: {\n playTheme() {\n this.send('playMusic', 'theme.mp3');\n },\n playMusic(track) {\n // ...\n }\n }\n});\n```", + "itemtype": "method", + "name": "send", + "params": [ + { + "name": "actionName", + "description": "The action to trigger", + "type": "String" + }, + { + "name": "context", + "description": "a context to send with the action", + "type": "*" + } + ], + "access": "public", + "tagname": "", + "class": "Ember.ControllerMixin", + "module": "ember", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.ActionHandler" + } + ], + "events": [], + "properties": [ + { + "file": "packages/@ember/controller/index.ts", + "line": 36, + "description": "The object to which actions from the view should be sent.\n\nFor example, when a Handlebars template uses the `{{action}}` helper,\nit will attempt to send the action to the view's controller's `target`.\n\nBy default, the value of the target property is set to the router, and\nis injected when a controller is instantiated. This injection is applied\nas part of the application's initialization process. In most cases the\n`target` property will automatically be set to the logical consumer of\nactions for the controller.", + "itemtype": "property", + "name": "target", + "default": "null", + "access": "public", + "tagname": "", + "class": "Ember.ControllerMixin", + "module": "@ember/controller", + "namespace": "Ember" + }, + { + "file": "packages/@ember/controller/index.ts", + "line": 54, + "description": "The controller's current model. When retrieving or modifying a controller's\nmodel, this property should be used instead of the `content` property.", + "itemtype": "property", + "name": "model", + "access": "public", + "tagname": "", + "class": "Ember.ControllerMixin", + "module": "@ember/controller", + "namespace": "Ember" + }, + { + "file": "packages/@ember/controller/index.ts", + "line": 63, + "description": "Defines which query parameters the controller accepts.\nIf you give the names `['category','page']` it will bind\nthe values of these query parameters to the variables\n`this.category` and `this.page`.\n\nBy default, query parameters are parsed as strings. This\nmay cause unexpected behavior if a query parameter is used with `toggleProperty`,\nbecause the initial value set for `param=false` will be the string `\"false\"`, which is truthy.\n\nTo avoid this, you may specify that the query parameter should be parsed as a boolean\nby using the following verbose form with a `type` property:\n```javascript\n queryParams: [{\n category: {\n type: 'boolean'\n }\n }]\n```\nAvailable values for the `type` parameter are `'boolean'`, `'number'`, `'array'`, and `'string'`.\nIf query param type is not specified, it will default to `'string'`.", + "itemtype": "property", + "name": "queryParams", + "access": "public", + "tagname": "", + "class": "Ember.ControllerMixin", + "module": "@ember/controller", + "namespace": "Ember" + }, + { + "file": "packages/@ember/-internals/runtime/lib/mixins/action_handler.ts", + "line": 27, + "description": "The collection of functions, keyed by name, available on this\n`ActionHandler` as action targets.\n\nThese functions will be invoked when a matching `{{action}}` is triggered\nfrom within a template and the application's current route is this route.\n\nActions can also be invoked from other parts of your application\nvia `ActionHandler#send`.\n\nThe `actions` hash will inherit action handlers from\nthe `actions` hash defined on extended parent classes\nor mixins rather than just replace the entire hash, e.g.:\n\n```js {data-filename=app/mixins/can-display-banner.js}\nimport Mixin from '@ember/object/mixin';\n\nexport default Mixin.create({\n actions: {\n displayBanner(msg) {\n // ...\n }\n }\n});\n```\n\n```js {data-filename=app/routes/welcome.js}\nimport Route from '@ember/routing/route';\nimport CanDisplayBanner from '../mixins/can-display-banner';\n\nexport default Route.extend(CanDisplayBanner, {\n actions: {\n playMusic() {\n // ...\n }\n }\n});\n\n// `WelcomeRoute`, when active, will be able to respond\n// to both actions, since the actions hash is merged rather\n// then replaced when extending mixins / parent classes.\nthis.send('displayBanner');\nthis.send('playMusic');\n```\n\nWithin a Controller, Route or Component's action handler,\nthe value of the `this` context is the Controller, Route or\nComponent object:\n\n```js {data-filename=app/routes/song.js}\nimport Route from '@ember/routing/route';\n\nexport default Route.extend({\n actions: {\n myAction() {\n this.controllerFor(\"song\");\n this.transitionTo(\"other.route\");\n ...\n }\n }\n});\n```\n\nIt is also possible to call `this._super(...arguments)` from within an\naction handler if it overrides a handler defined on a parent\nclass or mixin:\n\nTake for example the following routes:\n\n```js {data-filename=app/mixins/debug-route.js}\nimport Mixin from '@ember/object/mixin';\n\nexport default Mixin.create({\n actions: {\n debugRouteInformation() {\n console.debug(\"It's a-me, console.debug!\");\n }\n }\n});\n```\n\n```js {data-filename=app/routes/annoying-debug.js}\nimport Route from '@ember/routing/route';\nimport DebugRoute from '../mixins/debug-route';\n\nexport default Route.extend(DebugRoute, {\n actions: {\n debugRouteInformation() {\n // also call the debugRouteInformation of mixed in DebugRoute\n this._super(...arguments);\n\n // show additional annoyance\n window.alert(...);\n }\n }\n});\n```\n\n## Bubbling\n\nBy default, an action will stop bubbling once a handler defined\non the `actions` hash handles it. To continue bubbling the action,\nyou must return `true` from the handler:\n\n```js {data-filename=app/router.js}\nRouter.map(function() {\n this.route(\"album\", function() {\n this.route(\"song\");\n });\n});\n```\n\n```js {data-filename=app/routes/album.js}\nimport Route from '@ember/routing/route';\n\nexport default Route.extend({\n actions: {\n startPlaying: function() {\n }\n }\n});\n```\n\n```js {data-filename=app/routes/album-song.js}\nimport Route from '@ember/routing/route';\n\nexport default Route.extend({\n actions: {\n startPlaying() {\n // ...\n\n if (actionShouldAlsoBeTriggeredOnParentRoute) {\n return true;\n }\n }\n }\n});\n```", + "itemtype": "property", + "name": "actions", + "type": "Object", + "default": "null", + "access": "public", + "tagname": "", + "class": "Ember.ControllerMixin", + "module": "ember", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.ActionHandler" + } + ] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/controller", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.CoreView.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.CoreView.json new file mode 100644 index 000000000..58afdb019 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.CoreView.json @@ -0,0 +1,933 @@ +{ + "data": { + "id": "ember-5.12.0-Ember.CoreView", + "type": "class", + "attributes": { + "name": "Ember.CoreView", + "shortname": "Ember.CoreView", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "ember", + "namespace": "Ember", + "file": "packages/@ember/-internals/views/lib/views/core_view.ts", + "line": 9, + "description": "`Ember.CoreView` is an abstract class that exists to give view-like behavior\nto both Ember's main view class `Component` and other classes that don't need\nthe full functionality of `Component`.\n\nUnless you have specific needs for `CoreView`, you will use `Component`\nin your applications.", + "extends": "EmberObject", + "deprecated": true, + "deprecationMessage": "Use `Component` instead.", + "uses": [ + "Evented", + "Ember.ActionHandler" + ], + "access": "private", + "tagname": "", + "methods": [ + { + "file": "packages/@ember/-internals/views/lib/system/utils.ts", + "line": 37, + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "getRootViews", + "params": [ + { + "name": "owner", + "description": "", + "type": "Object" + } + ], + "class": "Ember.CoreView", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/views/lib/system/utils.ts", + "line": 59, + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "getViewId", + "params": [ + { + "name": "view", + "description": "", + "type": "Ember.View" + } + ], + "class": "Ember.CoreView", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/views/lib/system/utils.ts", + "line": 79, + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "getViewElement", + "params": [ + { + "name": "view", + "description": "", + "type": "Ember.View" + } + ], + "class": "Ember.CoreView", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/views/lib/system/utils.ts", + "line": 111, + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "getChildViews", + "params": [ + { + "name": "view", + "description": "", + "type": "Ember.View" + } + ], + "class": "Ember.CoreView", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/views/lib/system/utils.ts", + "line": 154, + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "getViewBounds", + "params": [ + { + "name": "view", + "description": "", + "type": "Ember.View" + } + ], + "class": "Ember.CoreView", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/views/lib/system/utils.ts", + "line": 163, + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "getViewRange", + "params": [ + { + "name": "view", + "description": "", + "type": "Ember.View" + } + ], + "class": "Ember.CoreView", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/views/lib/system/utils.ts", + "line": 178, + "description": "`getViewClientRects` provides information about the position of the border\nbox edges of a view relative to the viewport.\n\nIt is only intended to be used by development tools like the Ember Inspector\nand may not work on older browsers.", + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "getViewClientRects", + "params": [ + { + "name": "view", + "description": "", + "type": "Ember.View" + } + ], + "class": "Ember.CoreView", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/views/lib/system/utils.ts", + "line": 194, + "description": "`getViewBoundingClientRect` provides information about the position of the\nbounding border box edges of a view relative to the viewport.\n\nIt is only intended to be used by development tools like the Ember Inspector\nand may not work on older browsers.", + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "getViewBoundingClientRect", + "params": [ + { + "name": "view", + "description": "", + "type": "Ember.View" + } + ], + "class": "Ember.CoreView", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/views/lib/system/utils.ts", + "line": 210, + "description": "Determines if the element matches the specified selector.", + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "matches", + "params": [ + { + "name": "el", + "description": "", + "type": "DOMElement" + }, + { + "name": "selector", + "description": "", + "type": "String" + } + ], + "class": "Ember.CoreView", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/views/lib/views/core_view.ts", + "line": 77, + "description": "Override the default event firing from `Evented` to\nalso call methods with the given name.", + "itemtype": "method", + "name": "trigger", + "params": [ + { + "name": "name", + "description": "", + "type": "String" + } + ], + "access": "private", + "tagname": "", + "class": "Ember.CoreView", + "module": "ember", + "namespace": "Ember" + }, + { + "file": "packages/@ember/object/evented.ts", + "line": 51, + "description": "Subscribes to a named event with given function.\n\n```javascript\nperson.on('didLoad', function() {\n // fired once the person has loaded\n});\n```\n\nAn optional target can be passed in as the 2nd argument that will\nbe set as the \"this\" for the callback. This is a good way to give your\nfunction access to the object triggering the event. When the target\nparameter is used the callback method becomes the third argument.", + "itemtype": "method", + "name": "on", + "params": [ + { + "name": "name", + "description": "The name of the event", + "type": "String" + }, + { + "name": "target", + "description": "The \"this\" binding for the callback", + "type": "Object", + "optional": true + }, + { + "name": "method", + "description": "A function or the name of a function to be called on `target`", + "type": "Function|String" + } + ], + "return": { + "description": "this" + }, + "access": "public", + "tagname": "", + "class": "Ember.CoreView", + "module": "@ember/object/evented", + "inherited": true, + "inheritedFrom": "Evented" + }, + { + "file": "packages/@ember/object/evented.ts", + "line": 78, + "description": "Subscribes a function to a named event and then cancels the subscription\nafter the first time the event is triggered. It is good to use ``one`` when\nyou only care about the first time an event has taken place.\n\nThis function takes an optional 2nd argument that will become the \"this\"\nvalue for the callback. When the target parameter is used the callback method\nbecomes the third argument.", + "itemtype": "method", + "name": "one", + "params": [ + { + "name": "name", + "description": "The name of the event", + "type": "String" + }, + { + "name": "target", + "description": "The \"this\" binding for the callback", + "type": "Object", + "optional": true + }, + { + "name": "method", + "description": "A function or the name of a function to be called on `target`", + "type": "Function|String" + } + ], + "return": { + "description": "this" + }, + "access": "public", + "tagname": "", + "class": "Ember.CoreView", + "module": "@ember/object/evented", + "inherited": true, + "inheritedFrom": "Evented" + }, + { + "file": "packages/@ember/object/evented.ts", + "line": 100, + "description": "Triggers a named event for the object. Any additional arguments\nwill be passed as parameters to the functions that are subscribed to the\nevent.\n\n```javascript\nperson.on('didEat', function(food) {\n console.log('person ate some ' + food);\n});\n\nperson.trigger('didEat', 'broccoli');\n\n// outputs: person ate some broccoli\n```", + "itemtype": "method", + "name": "trigger", + "params": [ + { + "name": "name", + "description": "The name of the event", + "type": "String" + }, + { + "name": "args", + "description": "Optional arguments to pass on", + "type": "Object..." + } + ], + "access": "public", + "tagname": "", + "class": "Ember.CoreView", + "module": "@ember/object/evented", + "inherited": true, + "inheritedFrom": "Evented" + }, + { + "file": "packages/@ember/object/evented.ts", + "line": 121, + "description": "Cancels subscription for given name, target, and method.", + "itemtype": "method", + "name": "off", + "params": [ + { + "name": "name", + "description": "The name of the event", + "type": "String" + }, + { + "name": "target", + "description": "The target of the subscription", + "type": "Object" + }, + { + "name": "method", + "description": "The function or the name of a function of the subscription", + "type": "Function|String" + } + ], + "return": { + "description": "this" + }, + "access": "public", + "tagname": "", + "class": "Ember.CoreView", + "module": "@ember/object/evented", + "inherited": true, + "inheritedFrom": "Evented" + }, + { + "file": "packages/@ember/object/evented.ts", + "line": 137, + "description": "Checks to see if object has any subscriptions for named event.", + "itemtype": "method", + "name": "has", + "params": [ + { + "name": "name", + "description": "The name of the event", + "type": "String" + } + ], + "return": { + "description": "does the object have a subscription for event", + "type": "Boolean" + }, + "access": "public", + "tagname": "", + "class": "Ember.CoreView", + "module": "@ember/object/evented", + "inherited": true, + "inheritedFrom": "Evented" + }, + { + "file": "packages/@ember/-internals/runtime/lib/mixins/action_handler.ts", + "line": 172, + "description": "Triggers a named action on the `ActionHandler`. Any parameters\nsupplied after the `actionName` string will be passed as arguments\nto the action target function.\n\nIf the `ActionHandler` has its `target` property set, actions may\nbubble to the `target`. Bubbling happens when an `actionName` can\nnot be found in the `ActionHandler`'s `actions` hash or if the\naction target function returns `true`.\n\nExample\n\n```js {data-filename=app/routes/welcome.js}\nimport Route from '@ember/routing/route';\n\nexport default Route.extend({\n actions: {\n playTheme() {\n this.send('playMusic', 'theme.mp3');\n },\n playMusic(track) {\n // ...\n }\n }\n});\n```", + "itemtype": "method", + "name": "send", + "params": [ + { + "name": "actionName", + "description": "The action to trigger", + "type": "String" + }, + { + "name": "context", + "description": "a context to send with the action", + "type": "*" + } + ], + "access": "public", + "tagname": "", + "class": "Ember.CoreView", + "module": "ember", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.ActionHandler" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 321, + "description": "An overridable method called when objects are instantiated. By default,\ndoes nothing unless it is overridden during class definition.\n\nExample:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Person = EmberObject.extend({\n init() {\n alert(`Name is ${this.get('name')}`);\n }\n});\n\nlet steve = Person.create({\n name: 'Steve'\n});\n\n// alerts 'Name is Steve'.\n```\n\nNOTE: If you do override `init` for a framework class like `Component`\nfrom `@ember/component`, be sure to call `this._super(...arguments)`\nin your `init` declaration!\nIf you don't, Ember may not have an opportunity to\ndo important setup work, and you'll see strange behavior in your\napplication.", + "itemtype": "method", + "name": "init", + "access": "public", + "tagname": "", + "class": "Ember.CoreView", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 540, + "description": "Destroys an object by setting the `isDestroyed` flag and removing its\nmetadata, which effectively destroys observers and bindings.\n\nIf you try to set a property on a destroyed object, an exception will be\nraised.\n\nNote that destruction is scheduled for the end of the run loop and does not\nhappen immediately. It will set an isDestroying flag immediately.", + "itemtype": "method", + "name": "destroy", + "return": { + "description": "receiver", + "type": "EmberObject" + }, + "access": "public", + "tagname": "", + "class": "Ember.CoreView", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 567, + "description": "Override to implement teardown.", + "itemtype": "method", + "name": "willDestroy", + "access": "public", + "tagname": "", + "class": "Ember.CoreView", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 575, + "description": "Returns a string representation which attempts to provide more information\nthan Javascript's `toString` typically does, in a generic way for all Ember\nobjects.\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Person = EmberObject.extend();\nperson = Person.create();\nperson.toString(); //=> \"\"\n```\n\nIf the object's class is not defined on an Ember namespace, it will\nindicate it is a subclass of the registered superclass:\n\n```javascript\nconst Student = Person.extend();\nlet student = Student.create();\nstudent.toString(); //=> \"<(subclass of Person):ember1025>\"\n```\n\nIf the method `toStringExtension` is defined, its return value will be\nincluded in the output.\n\n```javascript\nconst Teacher = Person.extend({\n toStringExtension() {\n return this.get('fullName');\n }\n});\nteacher = Teacher.create();\nteacher.toString(); //=> \"\"\n```", + "itemtype": "method", + "name": "toString", + "return": { + "description": "string representation", + "type": "String" + }, + "access": "public", + "tagname": "", + "class": "Ember.CoreView", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 97, + "description": "Retrieves the value of a property from the object.\n\nThis method is usually similar to using `object[keyName]` or `object.keyName`,\nhowever it supports both computed properties and the unknownProperty\nhandler.\n\nBecause `get` unifies the syntax for accessing all these kinds\nof properties, it can make many refactorings easier, such as replacing a\nsimple property with a computed property, or vice versa.\n\n### Computed Properties\n\nComputed properties are methods defined with the `property` modifier\ndeclared at the end, such as:\n\n```javascript\nimport { computed } from '@ember/object';\n\nfullName: computed('firstName', 'lastName', function() {\n return this.get('firstName') + ' ' + this.get('lastName');\n})\n```\n\nWhen you call `get` on a computed property, the function will be\ncalled and the return value will be returned instead of the function\nitself.\n\n### Unknown Properties\n\nLikewise, if you try to call `get` on a property whose value is\n`undefined`, the `unknownProperty()` method will be called on the object.\nIf this method returns any value other than `undefined`, it will be returned\ninstead. This allows you to implement \"virtual\" properties that are\nnot defined upfront.", + "itemtype": "method", + "name": "get", + "params": [ + { + "name": "keyName", + "description": "The property to retrieve", + "type": "String" + } + ], + "return": { + "description": "The property value or undefined.", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "Ember.CoreView", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 141, + "description": "To get the values of multiple properties at once, call `getProperties`\nwith a list of strings or an array:\n\n```javascript\nrecord.getProperties('firstName', 'lastName', 'zipCode');\n// { firstName: 'John', lastName: 'Doe', zipCode: '10011' }\n```\n\nis equivalent to:\n\n```javascript\nrecord.getProperties(['firstName', 'lastName', 'zipCode']);\n// { firstName: 'John', lastName: 'Doe', zipCode: '10011' }\n```", + "itemtype": "method", + "name": "getProperties", + "params": [ + { + "name": "list", + "description": "of keys to get", + "type": "String...|Array" + } + ], + "return": { + "description": "", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "Ember.CoreView", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 168, + "description": "Sets the provided key or path to the value.\n\n```javascript\nrecord.set(\"key\", value);\n```\n\nThis method is generally very similar to calling `object[\"key\"] = value` or\n`object.key = value`, except that it provides support for computed\nproperties, the `setUnknownProperty()` method and property observers.\n\n### Computed Properties\n\nIf you try to set a value on a key that has a computed property handler\ndefined (see the `get()` method for an example), then `set()` will call\nthat method, passing both the value and key instead of simply changing\nthe value itself. This is useful for those times when you need to\nimplement a property that is composed of one or more member\nproperties.\n\n### Unknown Properties\n\nIf you try to set a value on a key that is undefined in the target\nobject, then the `setUnknownProperty()` handler will be called instead. This\ngives you an opportunity to implement complex \"virtual\" properties that\nare not predefined on the object. If `setUnknownProperty()` returns\nundefined, then `set()` will simply set the value on the object.\n\n### Property Observers\n\nIn addition to changing the property, `set()` will also register a property\nchange with the object. Unless you have placed this call inside of a\n`beginPropertyChanges()` and `endPropertyChanges(),` any \"local\" observers\n(i.e. observer methods declared on the same object), will be called\nimmediately. Any \"remote\" observers (i.e. observer methods declared on\nanother object) will be placed in a queue and called at a later time in a\ncoalesced manner.", + "itemtype": "method", + "name": "set", + "params": [ + { + "name": "keyName", + "description": "The property to set", + "type": "String" + }, + { + "name": "value", + "description": "The value to set or `null`.", + "type": "Object" + } + ], + "return": { + "description": "The passed value", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "Ember.CoreView", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 216, + "description": "Sets a list of properties at once. These properties are set inside\na single `beginPropertyChanges` and `endPropertyChanges` batch, so\nobservers will be buffered.\n\n```javascript\nrecord.setProperties({ firstName: 'Charles', lastName: 'Jolley' });\n```", + "itemtype": "method", + "name": "setProperties", + "params": [ + { + "name": "hash", + "description": "the hash of keys and values to set", + "type": "Object" + } + ], + "return": { + "description": "The passed in hash", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "Ember.CoreView", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 233, + "description": "Convenience method to call `propertyWillChange` and `propertyDidChange` in\nsuccession.\n\nNotify the observer system that a property has just changed.\n\nSometimes you need to change a value directly or indirectly without\nactually calling `get()` or `set()` on it. In this case, you can use this\nmethod instead. Calling this method will notify all observers that the\nproperty has potentially changed value.", + "itemtype": "method", + "name": "notifyPropertyChange", + "params": [ + { + "name": "keyName", + "description": "The property key to be notified about.", + "type": "String" + } + ], + "return": { + "description": "", + "type": "Observable" + }, + "access": "public", + "tagname": "", + "class": "Ember.CoreView", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 251, + "description": "Adds an observer on a property.\n\nThis is the core method used to register an observer for a property.\n\nOnce you call this method, any time the key's value is set, your observer\nwill be notified. Note that the observers are triggered any time the\nvalue is set, regardless of whether it has actually changed. Your\nobserver should be prepared to handle that.\n\nThere are two common invocation patterns for `.addObserver()`:\n\n- Passing two arguments:\n - the name of the property to observe (as a string)\n - the function to invoke (an actual function)\n- Passing three arguments:\n - the name of the property to observe (as a string)\n - the target object (will be used to look up and invoke a\n function on)\n - the name of the function to invoke on the target object\n (as a string).\n\n```js {data-filename=app/components/my-component.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n init() {\n this._super(...arguments);\n\n // the following are equivalent:\n\n // using three arguments\n this.addObserver('foo', this, 'fooDidChange');\n\n // using two arguments\n this.addObserver('foo', (...args) => {\n this.fooDidChange(...args);\n });\n },\n\n fooDidChange() {\n // your custom logic code\n }\n});\n```\n\n### Observer Methods\n\nObserver methods have the following signature:\n\n```js {data-filename=app/components/my-component.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n init() {\n this._super(...arguments);\n this.addObserver('foo', this, 'fooDidChange');\n },\n\n fooDidChange(sender, key, value, rev) {\n // your code\n }\n});\n```\n\nThe `sender` is the object that changed. The `key` is the property that\nchanges. The `value` property is currently reserved and unused. The `rev`\nis the last property revision of the object when it changed, which you can\nuse to detect if the key value has really changed or not.\n\nUsually you will not need the value or revision parameters at\nthe end. In this case, it is common to write observer methods that take\nonly a sender and key value as parameters or, if you aren't interested in\nany of these values, to write an observer that has no parameters at all.", + "itemtype": "method", + "name": "addObserver", + "params": [ + { + "name": "key", + "description": "The key to observe", + "type": "String" + }, + { + "name": "target", + "description": "The target object to invoke", + "type": "Object" + }, + { + "name": "method", + "description": "The method to invoke", + "type": "String|Function" + }, + { + "name": "sync", + "description": "Whether the observer is sync or not", + "type": "Boolean" + } + ], + "return": { + "description": "", + "type": "Observable" + }, + "access": "public", + "tagname": "", + "class": "Ember.CoreView", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 337, + "description": "Remove an observer you have previously registered on this object. Pass\nthe same key, target, and method you passed to `addObserver()` and your\ntarget will no longer receive notifications.", + "itemtype": "method", + "name": "removeObserver", + "params": [ + { + "name": "key", + "description": "The key to observe", + "type": "String" + }, + { + "name": "target", + "description": "The target object to invoke", + "type": "Object" + }, + { + "name": "method", + "description": "The method to invoke", + "type": "String|Function" + }, + { + "name": "sync", + "description": "Whether the observer is async or not", + "type": "Boolean" + } + ], + "return": { + "description": "", + "type": "Observable" + }, + "access": "public", + "tagname": "", + "class": "Ember.CoreView", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 358, + "description": "Set the value of a property to the current value plus some amount.\n\n```javascript\nperson.incrementProperty('age');\nteam.incrementProperty('score', 2);\n```", + "itemtype": "method", + "name": "incrementProperty", + "params": [ + { + "name": "keyName", + "description": "The name of the property to increment", + "type": "String" + }, + { + "name": "increment", + "description": "The amount to increment by. Defaults to 1", + "type": "Number" + } + ], + "return": { + "description": "The new property value", + "type": "Number" + }, + "access": "public", + "tagname": "", + "class": "Ember.CoreView", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 375, + "description": "Set the value of a property to the current value minus some amount.\n\n```javascript\nplayer.decrementProperty('lives');\norc.decrementProperty('health', 5);\n```", + "itemtype": "method", + "name": "decrementProperty", + "params": [ + { + "name": "keyName", + "description": "The name of the property to decrement", + "type": "String" + }, + { + "name": "decrement", + "description": "The amount to decrement by. Defaults to 1", + "type": "Number" + } + ], + "return": { + "description": "The new property value", + "type": "Number" + }, + "access": "public", + "tagname": "", + "class": "Ember.CoreView", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 392, + "description": "Set the value of a boolean property to the opposite of its\ncurrent value.\n\n```javascript\nstarship.toggleProperty('warpDriveEngaged');\n```", + "itemtype": "method", + "name": "toggleProperty", + "params": [ + { + "name": "keyName", + "description": "The name of the property to toggle", + "type": "String" + } + ], + "return": { + "description": "The new property value", + "type": "Boolean" + }, + "access": "public", + "tagname": "", + "class": "Ember.CoreView", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 407, + "description": "Returns the cached value of a computed property, if it exists.\nThis allows you to inspect the value of a computed property\nwithout accidentally invoking it if it is intended to be\ngenerated lazily.", + "itemtype": "method", + "name": "cacheFor", + "params": [ + { + "name": "keyName", + "description": "", + "type": "String" + } + ], + "return": { + "description": "The cached value of the computed property, if any", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "Ember.CoreView", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 437, + "description": "Begins a grouping of property changes.\n\nYou can use this method to group property changes so that notifications\nwill not be sent until the changes are finished. If you plan to make a\nlarge number of changes to an object at one time, you should call this\nmethod at the beginning of the changes to begin deferring change\nnotifications. When you are done making changes, call\n`endPropertyChanges()` to deliver the deferred change notifications and end\ndeferring.", + "itemtype": "method", + "name": "beginPropertyChanges", + "return": { + "description": "", + "type": "Observable" + }, + "access": "private", + "tagname": "", + "class": "Ember.CoreView", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 457, + "description": "Ends a grouping of property changes.\n\nYou can use this method to group property changes so that notifications\nwill not be sent until the changes are finished. If you plan to make a\nlarge number of changes to an object at one time, you should call\n`beginPropertyChanges()` at the beginning of the changes to defer change\nnotifications. When you are done making changes, call this method to\ndeliver the deferred change notifications and end deferring.", + "itemtype": "method", + "name": "endPropertyChanges", + "return": { + "description": "", + "type": "Observable" + }, + "access": "private", + "tagname": "", + "class": "Ember.CoreView", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 501, + "description": "Returns `true` if the object currently has observers registered for a\nparticular key. You can use this method to potentially defer performing\nan expensive action until someone begins observing a particular property\non the object.", + "itemtype": "method", + "name": "hasObserverFor", + "params": [ + { + "name": "key", + "description": "Key to check", + "type": "String" + } + ], + "return": { + "description": "", + "type": "Boolean" + }, + "access": "private", + "tagname": "", + "class": "Ember.CoreView", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + } + ], + "events": [], + "properties": [ + { + "file": "packages/@ember/-internals/views/lib/views/core_view.ts", + "line": 38, + "description": "If the view is currently inserted into the DOM of a parent view, this\nproperty will point to the parent of the view.", + "itemtype": "property", + "name": "parentView", + "type": "Ember.View", + "default": "null", + "access": "private", + "tagname": "", + "class": "Ember.CoreView", + "module": "ember", + "namespace": "Ember" + }, + { + "file": "packages/@ember/-internals/runtime/lib/mixins/action_handler.ts", + "line": 27, + "description": "The collection of functions, keyed by name, available on this\n`ActionHandler` as action targets.\n\nThese functions will be invoked when a matching `{{action}}` is triggered\nfrom within a template and the application's current route is this route.\n\nActions can also be invoked from other parts of your application\nvia `ActionHandler#send`.\n\nThe `actions` hash will inherit action handlers from\nthe `actions` hash defined on extended parent classes\nor mixins rather than just replace the entire hash, e.g.:\n\n```js {data-filename=app/mixins/can-display-banner.js}\nimport Mixin from '@ember/object/mixin';\n\nexport default Mixin.create({\n actions: {\n displayBanner(msg) {\n // ...\n }\n }\n});\n```\n\n```js {data-filename=app/routes/welcome.js}\nimport Route from '@ember/routing/route';\nimport CanDisplayBanner from '../mixins/can-display-banner';\n\nexport default Route.extend(CanDisplayBanner, {\n actions: {\n playMusic() {\n // ...\n }\n }\n});\n\n// `WelcomeRoute`, when active, will be able to respond\n// to both actions, since the actions hash is merged rather\n// then replaced when extending mixins / parent classes.\nthis.send('displayBanner');\nthis.send('playMusic');\n```\n\nWithin a Controller, Route or Component's action handler,\nthe value of the `this` context is the Controller, Route or\nComponent object:\n\n```js {data-filename=app/routes/song.js}\nimport Route from '@ember/routing/route';\n\nexport default Route.extend({\n actions: {\n myAction() {\n this.controllerFor(\"song\");\n this.transitionTo(\"other.route\");\n ...\n }\n }\n});\n```\n\nIt is also possible to call `this._super(...arguments)` from within an\naction handler if it overrides a handler defined on a parent\nclass or mixin:\n\nTake for example the following routes:\n\n```js {data-filename=app/mixins/debug-route.js}\nimport Mixin from '@ember/object/mixin';\n\nexport default Mixin.create({\n actions: {\n debugRouteInformation() {\n console.debug(\"It's a-me, console.debug!\");\n }\n }\n});\n```\n\n```js {data-filename=app/routes/annoying-debug.js}\nimport Route from '@ember/routing/route';\nimport DebugRoute from '../mixins/debug-route';\n\nexport default Route.extend(DebugRoute, {\n actions: {\n debugRouteInformation() {\n // also call the debugRouteInformation of mixed in DebugRoute\n this._super(...arguments);\n\n // show additional annoyance\n window.alert(...);\n }\n }\n});\n```\n\n## Bubbling\n\nBy default, an action will stop bubbling once a handler defined\non the `actions` hash handles it. To continue bubbling the action,\nyou must return `true` from the handler:\n\n```js {data-filename=app/router.js}\nRouter.map(function() {\n this.route(\"album\", function() {\n this.route(\"song\");\n });\n});\n```\n\n```js {data-filename=app/routes/album.js}\nimport Route from '@ember/routing/route';\n\nexport default Route.extend({\n actions: {\n startPlaying: function() {\n }\n }\n});\n```\n\n```js {data-filename=app/routes/album-song.js}\nimport Route from '@ember/routing/route';\n\nexport default Route.extend({\n actions: {\n startPlaying() {\n // ...\n\n if (actionShouldAlsoBeTriggeredOnParentRoute) {\n return true;\n }\n }\n }\n});\n```", + "itemtype": "property", + "name": "actions", + "type": "Object", + "default": "null", + "access": "public", + "tagname": "", + "class": "Ember.CoreView", + "module": "ember", + "namespace": "Ember", + "inherited": true, + "inheritedFrom": "Ember.ActionHandler" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 355, + "description": "Defines the properties that will be concatenated from the superclass\n(instead of overridden).\n\nBy default, when you extend an Ember class a property defined in\nthe subclass overrides a property with the same name that is defined\nin the superclass. However, there are some cases where it is preferable\nto build up a property's value by combining the superclass' property\nvalue with the subclass' value. An example of this in use within Ember\nis the `classNames` property of `Component` from `@ember/component`.\n\nHere is some sample code showing the difference between a concatenated\nproperty and a normal one:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Bar = EmberObject.extend({\n // Configure which properties to concatenate\n concatenatedProperties: ['concatenatedProperty'],\n\n someNonConcatenatedProperty: ['bar'],\n concatenatedProperty: ['bar']\n});\n\nconst FooBar = Bar.extend({\n someNonConcatenatedProperty: ['foo'],\n concatenatedProperty: ['foo']\n});\n\nlet fooBar = FooBar.create();\nfooBar.get('someNonConcatenatedProperty'); // ['foo']\nfooBar.get('concatenatedProperty'); // ['bar', 'foo']\n```\n\nThis behavior extends to object creation as well. Continuing the\nabove example:\n\n```javascript\nlet fooBar = FooBar.create({\n someNonConcatenatedProperty: ['baz'],\n concatenatedProperty: ['baz']\n})\nfooBar.get('someNonConcatenatedProperty'); // ['baz']\nfooBar.get('concatenatedProperty'); // ['bar', 'foo', 'baz']\n```\n\nAdding a single property that is not an array will just add it in the array:\n\n```javascript\nlet fooBar = FooBar.create({\n concatenatedProperty: 'baz'\n})\nview.get('concatenatedProperty'); // ['bar', 'foo', 'baz']\n```\n\nUsing the `concatenatedProperties` property, we can tell Ember to mix the\ncontent of the properties.\n\nIn `Component` the `classNames`, `classNameBindings` and\n`attributeBindings` properties are concatenated.\n\nThis feature is available for you to use throughout the Ember object model,\nalthough typical app developers are likely to use it infrequently. Since\nit changes expectations about behavior of properties, you should properly\ndocument its usage in each individual concatenated property (to not\nmislead your users to think they can override the property in a subclass).", + "itemtype": "property", + "name": "concatenatedProperties", + "type": "Array", + "default": "null", + "access": "public", + "tagname": "", + "class": "Ember.CoreView", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 429, + "description": "Defines the properties that will be merged from the superclass\n(instead of overridden).\n\nBy default, when you extend an Ember class a property defined in\nthe subclass overrides a property with the same name that is defined\nin the superclass. However, there are some cases where it is preferable\nto build up a property's value by merging the superclass property value\nwith the subclass property's value. An example of this in use within Ember\nis the `queryParams` property of routes.\n\nHere is some sample code showing the difference between a merged\nproperty and a normal one:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Bar = EmberObject.extend({\n // Configure which properties are to be merged\n mergedProperties: ['mergedProperty'],\n\n someNonMergedProperty: {\n nonMerged: 'superclass value of nonMerged'\n },\n mergedProperty: {\n page: { replace: false },\n limit: { replace: true }\n }\n});\n\nconst FooBar = Bar.extend({\n someNonMergedProperty: {\n completelyNonMerged: 'subclass value of nonMerged'\n },\n mergedProperty: {\n limit: { replace: false }\n }\n});\n\nlet fooBar = FooBar.create();\n\nfooBar.get('someNonMergedProperty');\n// => { completelyNonMerged: 'subclass value of nonMerged' }\n//\n// Note the entire object, including the nonMerged property of\n// the superclass object, has been replaced\n\nfooBar.get('mergedProperty');\n// => {\n// page: {replace: false},\n// limit: {replace: false}\n// }\n//\n// Note the page remains from the superclass, and the\n// `limit` property's value of `false` has been merged from\n// the subclass.\n```\n\nThis behavior is not available during object `create` calls. It is only\navailable at `extend` time.\n\nIn `Route` the `queryParams` property is merged.\n\nThis feature is available for you to use throughout the Ember object model,\nalthough typical app developers are likely to use it infrequently. Since\nit changes expectations about behavior of properties, you should properly\ndocument its usage in each individual merged property (to not\nmislead your users to think they can override the property in a subclass).", + "itemtype": "property", + "name": "mergedProperties", + "type": "Array", + "default": "null", + "access": "public", + "tagname": "", + "class": "Ember.CoreView", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 504, + "description": "Destroyed object property flag.\n\nif this property is `true` the observers and bindings were already\nremoved by the effect of calling the `destroy()` method.", + "itemtype": "property", + "name": "isDestroyed", + "default": "false", + "access": "public", + "tagname": "", + "class": "Ember.CoreView", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 522, + "description": "Destruction scheduled flag. The `destroy()` method has been called.\n\nThe object stays intact until the end of the run loop at which point\nthe `isDestroyed` flag is set.", + "itemtype": "property", + "name": "isDestroying", + "default": "false", + "access": "public", + "tagname": "", + "class": "Ember.CoreView", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + } + ] + }, + "relationships": { + "parent-class": { + "data": { + "id": "ember-5.12.0-EmberObject", + "type": "class" + } + }, + "descendants": { + "data": [ + { + "type": "class", + "id": "ember-5.12.0-Component" + } + ] + }, + "module": { + "data": { + "id": "ember-5.12.0-ember", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.EventDispatcher.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.EventDispatcher.json new file mode 100644 index 000000000..2c21868ec --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.EventDispatcher.json @@ -0,0 +1,659 @@ +{ + "data": { + "id": "ember-5.12.0-Ember.EventDispatcher", + "type": "class", + "attributes": { + "name": "Ember.EventDispatcher", + "shortname": "Ember.EventDispatcher", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "ember", + "namespace": "Ember", + "file": "packages/@ember/-internals/views/lib/system/event_dispatcher.ts", + "line": 18, + "description": "`Ember.EventDispatcher` handles delegating browser events to their\ncorresponding `Ember.Views.` For example, when you click on a view,\n`Ember.EventDispatcher` ensures that that view's `mouseDown` method gets\ncalled.", + "access": "private", + "tagname": "", + "extends": "EmberObject", + "methods": [ + { + "file": "packages/@ember/-internals/views/lib/system/event_dispatcher.ts", + "line": 113, + "description": "Sets up event listeners for standard browser events.\n\nThis will be called after the browser sends a `DOMContentReady` event. By\ndefault, it will set up all of the listeners on the document body. If you\nwould like to register the listeners on a different element, set the event\ndispatcher's `root` property.", + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "setup", + "params": [ + { + "name": "addedEvents", + "description": "", + "type": "Object" + } + ], + "class": "Ember.EventDispatcher", + "module": "ember", + "namespace": "Ember" + }, + { + "file": "packages/@ember/-internals/views/lib/system/event_dispatcher.ts", + "line": 207, + "description": "Setup event listeners for the given browser event name", + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "setupHandlerForBrowserEvent", + "params": [ + { + "name": "event", + "description": "the name of the event in the browser" + } + ], + "class": "Ember.EventDispatcher", + "module": "ember", + "namespace": "Ember" + }, + { + "file": "packages/@ember/-internals/views/lib/system/event_dispatcher.ts", + "line": 220, + "description": "Setup event listeners for the given Ember event name (camel case)", + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "setupHandlerForEmberEvent", + "params": [ + { + "name": "eventName", + "description": "" + } + ], + "class": "Ember.EventDispatcher", + "module": "ember", + "namespace": "Ember" + }, + { + "file": "packages/@ember/-internals/views/lib/system/event_dispatcher.ts", + "line": 237, + "description": "Registers an event listener on the rootElement. If the given event is\ntriggered, the provided event handler will be triggered on the target view.\n\nIf the target view does not implement the event handler, or if the handler\nreturns `false`, the parent view will be called. The event will continue to\nbubble to each successive parent view until it reaches the top.", + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "setupHandler", + "params": [ + { + "name": "rootElement", + "description": "", + "type": "Element" + }, + { + "name": "event", + "description": "the name of the event in the browser", + "type": "String" + }, + { + "name": "eventName", + "description": "the name of the method to call on the view", + "type": "String" + } + ], + "class": "Ember.EventDispatcher", + "module": "ember", + "namespace": "Ember" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 321, + "description": "An overridable method called when objects are instantiated. By default,\ndoes nothing unless it is overridden during class definition.\n\nExample:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Person = EmberObject.extend({\n init() {\n alert(`Name is ${this.get('name')}`);\n }\n});\n\nlet steve = Person.create({\n name: 'Steve'\n});\n\n// alerts 'Name is Steve'.\n```\n\nNOTE: If you do override `init` for a framework class like `Component`\nfrom `@ember/component`, be sure to call `this._super(...arguments)`\nin your `init` declaration!\nIf you don't, Ember may not have an opportunity to\ndo important setup work, and you'll see strange behavior in your\napplication.", + "itemtype": "method", + "name": "init", + "access": "public", + "tagname": "", + "class": "Ember.EventDispatcher", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 540, + "description": "Destroys an object by setting the `isDestroyed` flag and removing its\nmetadata, which effectively destroys observers and bindings.\n\nIf you try to set a property on a destroyed object, an exception will be\nraised.\n\nNote that destruction is scheduled for the end of the run loop and does not\nhappen immediately. It will set an isDestroying flag immediately.", + "itemtype": "method", + "name": "destroy", + "return": { + "description": "receiver", + "type": "EmberObject" + }, + "access": "public", + "tagname": "", + "class": "Ember.EventDispatcher", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 567, + "description": "Override to implement teardown.", + "itemtype": "method", + "name": "willDestroy", + "access": "public", + "tagname": "", + "class": "Ember.EventDispatcher", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 575, + "description": "Returns a string representation which attempts to provide more information\nthan Javascript's `toString` typically does, in a generic way for all Ember\nobjects.\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Person = EmberObject.extend();\nperson = Person.create();\nperson.toString(); //=> \"\"\n```\n\nIf the object's class is not defined on an Ember namespace, it will\nindicate it is a subclass of the registered superclass:\n\n```javascript\nconst Student = Person.extend();\nlet student = Student.create();\nstudent.toString(); //=> \"<(subclass of Person):ember1025>\"\n```\n\nIf the method `toStringExtension` is defined, its return value will be\nincluded in the output.\n\n```javascript\nconst Teacher = Person.extend({\n toStringExtension() {\n return this.get('fullName');\n }\n});\nteacher = Teacher.create();\nteacher.toString(); //=> \"\"\n```", + "itemtype": "method", + "name": "toString", + "return": { + "description": "string representation", + "type": "String" + }, + "access": "public", + "tagname": "", + "class": "Ember.EventDispatcher", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 97, + "description": "Retrieves the value of a property from the object.\n\nThis method is usually similar to using `object[keyName]` or `object.keyName`,\nhowever it supports both computed properties and the unknownProperty\nhandler.\n\nBecause `get` unifies the syntax for accessing all these kinds\nof properties, it can make many refactorings easier, such as replacing a\nsimple property with a computed property, or vice versa.\n\n### Computed Properties\n\nComputed properties are methods defined with the `property` modifier\ndeclared at the end, such as:\n\n```javascript\nimport { computed } from '@ember/object';\n\nfullName: computed('firstName', 'lastName', function() {\n return this.get('firstName') + ' ' + this.get('lastName');\n})\n```\n\nWhen you call `get` on a computed property, the function will be\ncalled and the return value will be returned instead of the function\nitself.\n\n### Unknown Properties\n\nLikewise, if you try to call `get` on a property whose value is\n`undefined`, the `unknownProperty()` method will be called on the object.\nIf this method returns any value other than `undefined`, it will be returned\ninstead. This allows you to implement \"virtual\" properties that are\nnot defined upfront.", + "itemtype": "method", + "name": "get", + "params": [ + { + "name": "keyName", + "description": "The property to retrieve", + "type": "String" + } + ], + "return": { + "description": "The property value or undefined.", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "Ember.EventDispatcher", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 141, + "description": "To get the values of multiple properties at once, call `getProperties`\nwith a list of strings or an array:\n\n```javascript\nrecord.getProperties('firstName', 'lastName', 'zipCode');\n// { firstName: 'John', lastName: 'Doe', zipCode: '10011' }\n```\n\nis equivalent to:\n\n```javascript\nrecord.getProperties(['firstName', 'lastName', 'zipCode']);\n// { firstName: 'John', lastName: 'Doe', zipCode: '10011' }\n```", + "itemtype": "method", + "name": "getProperties", + "params": [ + { + "name": "list", + "description": "of keys to get", + "type": "String...|Array" + } + ], + "return": { + "description": "", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "Ember.EventDispatcher", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 168, + "description": "Sets the provided key or path to the value.\n\n```javascript\nrecord.set(\"key\", value);\n```\n\nThis method is generally very similar to calling `object[\"key\"] = value` or\n`object.key = value`, except that it provides support for computed\nproperties, the `setUnknownProperty()` method and property observers.\n\n### Computed Properties\n\nIf you try to set a value on a key that has a computed property handler\ndefined (see the `get()` method for an example), then `set()` will call\nthat method, passing both the value and key instead of simply changing\nthe value itself. This is useful for those times when you need to\nimplement a property that is composed of one or more member\nproperties.\n\n### Unknown Properties\n\nIf you try to set a value on a key that is undefined in the target\nobject, then the `setUnknownProperty()` handler will be called instead. This\ngives you an opportunity to implement complex \"virtual\" properties that\nare not predefined on the object. If `setUnknownProperty()` returns\nundefined, then `set()` will simply set the value on the object.\n\n### Property Observers\n\nIn addition to changing the property, `set()` will also register a property\nchange with the object. Unless you have placed this call inside of a\n`beginPropertyChanges()` and `endPropertyChanges(),` any \"local\" observers\n(i.e. observer methods declared on the same object), will be called\nimmediately. Any \"remote\" observers (i.e. observer methods declared on\nanother object) will be placed in a queue and called at a later time in a\ncoalesced manner.", + "itemtype": "method", + "name": "set", + "params": [ + { + "name": "keyName", + "description": "The property to set", + "type": "String" + }, + { + "name": "value", + "description": "The value to set or `null`.", + "type": "Object" + } + ], + "return": { + "description": "The passed value", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "Ember.EventDispatcher", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 216, + "description": "Sets a list of properties at once. These properties are set inside\na single `beginPropertyChanges` and `endPropertyChanges` batch, so\nobservers will be buffered.\n\n```javascript\nrecord.setProperties({ firstName: 'Charles', lastName: 'Jolley' });\n```", + "itemtype": "method", + "name": "setProperties", + "params": [ + { + "name": "hash", + "description": "the hash of keys and values to set", + "type": "Object" + } + ], + "return": { + "description": "The passed in hash", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "Ember.EventDispatcher", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 233, + "description": "Convenience method to call `propertyWillChange` and `propertyDidChange` in\nsuccession.\n\nNotify the observer system that a property has just changed.\n\nSometimes you need to change a value directly or indirectly without\nactually calling `get()` or `set()` on it. In this case, you can use this\nmethod instead. Calling this method will notify all observers that the\nproperty has potentially changed value.", + "itemtype": "method", + "name": "notifyPropertyChange", + "params": [ + { + "name": "keyName", + "description": "The property key to be notified about.", + "type": "String" + } + ], + "return": { + "description": "", + "type": "Observable" + }, + "access": "public", + "tagname": "", + "class": "Ember.EventDispatcher", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 251, + "description": "Adds an observer on a property.\n\nThis is the core method used to register an observer for a property.\n\nOnce you call this method, any time the key's value is set, your observer\nwill be notified. Note that the observers are triggered any time the\nvalue is set, regardless of whether it has actually changed. Your\nobserver should be prepared to handle that.\n\nThere are two common invocation patterns for `.addObserver()`:\n\n- Passing two arguments:\n - the name of the property to observe (as a string)\n - the function to invoke (an actual function)\n- Passing three arguments:\n - the name of the property to observe (as a string)\n - the target object (will be used to look up and invoke a\n function on)\n - the name of the function to invoke on the target object\n (as a string).\n\n```js {data-filename=app/components/my-component.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n init() {\n this._super(...arguments);\n\n // the following are equivalent:\n\n // using three arguments\n this.addObserver('foo', this, 'fooDidChange');\n\n // using two arguments\n this.addObserver('foo', (...args) => {\n this.fooDidChange(...args);\n });\n },\n\n fooDidChange() {\n // your custom logic code\n }\n});\n```\n\n### Observer Methods\n\nObserver methods have the following signature:\n\n```js {data-filename=app/components/my-component.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n init() {\n this._super(...arguments);\n this.addObserver('foo', this, 'fooDidChange');\n },\n\n fooDidChange(sender, key, value, rev) {\n // your code\n }\n});\n```\n\nThe `sender` is the object that changed. The `key` is the property that\nchanges. The `value` property is currently reserved and unused. The `rev`\nis the last property revision of the object when it changed, which you can\nuse to detect if the key value has really changed or not.\n\nUsually you will not need the value or revision parameters at\nthe end. In this case, it is common to write observer methods that take\nonly a sender and key value as parameters or, if you aren't interested in\nany of these values, to write an observer that has no parameters at all.", + "itemtype": "method", + "name": "addObserver", + "params": [ + { + "name": "key", + "description": "The key to observe", + "type": "String" + }, + { + "name": "target", + "description": "The target object to invoke", + "type": "Object" + }, + { + "name": "method", + "description": "The method to invoke", + "type": "String|Function" + }, + { + "name": "sync", + "description": "Whether the observer is sync or not", + "type": "Boolean" + } + ], + "return": { + "description": "", + "type": "Observable" + }, + "access": "public", + "tagname": "", + "class": "Ember.EventDispatcher", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 337, + "description": "Remove an observer you have previously registered on this object. Pass\nthe same key, target, and method you passed to `addObserver()` and your\ntarget will no longer receive notifications.", + "itemtype": "method", + "name": "removeObserver", + "params": [ + { + "name": "key", + "description": "The key to observe", + "type": "String" + }, + { + "name": "target", + "description": "The target object to invoke", + "type": "Object" + }, + { + "name": "method", + "description": "The method to invoke", + "type": "String|Function" + }, + { + "name": "sync", + "description": "Whether the observer is async or not", + "type": "Boolean" + } + ], + "return": { + "description": "", + "type": "Observable" + }, + "access": "public", + "tagname": "", + "class": "Ember.EventDispatcher", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 358, + "description": "Set the value of a property to the current value plus some amount.\n\n```javascript\nperson.incrementProperty('age');\nteam.incrementProperty('score', 2);\n```", + "itemtype": "method", + "name": "incrementProperty", + "params": [ + { + "name": "keyName", + "description": "The name of the property to increment", + "type": "String" + }, + { + "name": "increment", + "description": "The amount to increment by. Defaults to 1", + "type": "Number" + } + ], + "return": { + "description": "The new property value", + "type": "Number" + }, + "access": "public", + "tagname": "", + "class": "Ember.EventDispatcher", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 375, + "description": "Set the value of a property to the current value minus some amount.\n\n```javascript\nplayer.decrementProperty('lives');\norc.decrementProperty('health', 5);\n```", + "itemtype": "method", + "name": "decrementProperty", + "params": [ + { + "name": "keyName", + "description": "The name of the property to decrement", + "type": "String" + }, + { + "name": "decrement", + "description": "The amount to decrement by. Defaults to 1", + "type": "Number" + } + ], + "return": { + "description": "The new property value", + "type": "Number" + }, + "access": "public", + "tagname": "", + "class": "Ember.EventDispatcher", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 392, + "description": "Set the value of a boolean property to the opposite of its\ncurrent value.\n\n```javascript\nstarship.toggleProperty('warpDriveEngaged');\n```", + "itemtype": "method", + "name": "toggleProperty", + "params": [ + { + "name": "keyName", + "description": "The name of the property to toggle", + "type": "String" + } + ], + "return": { + "description": "The new property value", + "type": "Boolean" + }, + "access": "public", + "tagname": "", + "class": "Ember.EventDispatcher", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 407, + "description": "Returns the cached value of a computed property, if it exists.\nThis allows you to inspect the value of a computed property\nwithout accidentally invoking it if it is intended to be\ngenerated lazily.", + "itemtype": "method", + "name": "cacheFor", + "params": [ + { + "name": "keyName", + "description": "", + "type": "String" + } + ], + "return": { + "description": "The cached value of the computed property, if any", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "Ember.EventDispatcher", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 437, + "description": "Begins a grouping of property changes.\n\nYou can use this method to group property changes so that notifications\nwill not be sent until the changes are finished. If you plan to make a\nlarge number of changes to an object at one time, you should call this\nmethod at the beginning of the changes to begin deferring change\nnotifications. When you are done making changes, call\n`endPropertyChanges()` to deliver the deferred change notifications and end\ndeferring.", + "itemtype": "method", + "name": "beginPropertyChanges", + "return": { + "description": "", + "type": "Observable" + }, + "access": "private", + "tagname": "", + "class": "Ember.EventDispatcher", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 457, + "description": "Ends a grouping of property changes.\n\nYou can use this method to group property changes so that notifications\nwill not be sent until the changes are finished. If you plan to make a\nlarge number of changes to an object at one time, you should call\n`beginPropertyChanges()` at the beginning of the changes to defer change\nnotifications. When you are done making changes, call this method to\ndeliver the deferred change notifications and end deferring.", + "itemtype": "method", + "name": "endPropertyChanges", + "return": { + "description": "", + "type": "Observable" + }, + "access": "private", + "tagname": "", + "class": "Ember.EventDispatcher", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 501, + "description": "Returns `true` if the object currently has observers registered for a\nparticular key. You can use this method to potentially defer performing\nan expensive action until someone begins observing a particular property\non the object.", + "itemtype": "method", + "name": "hasObserverFor", + "params": [ + { + "name": "key", + "description": "Key to check", + "type": "String" + } + ], + "return": { + "description": "", + "type": "Boolean" + }, + "access": "private", + "tagname": "", + "class": "Ember.EventDispatcher", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + } + ], + "events": [], + "properties": [ + { + "file": "packages/@ember/-internals/views/lib/system/action_manager.ts", + "line": 9, + "description": "Global action id hash.", + "access": "private", + "tagname": "", + "itemtype": "property", + "name": "registeredActions", + "type": "Object", + "class": "Ember.EventDispatcher", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/views/lib/system/event_dispatcher.ts", + "line": 30, + "description": "The set of events names (and associated handler function names) to be setup\nand dispatched by the `EventDispatcher`. Modifications to this list can be done\nat setup time, generally via the `Application.customEvents` hash.\n\nTo add new events to be listened to:\n\n```javascript\nimport Application from '@ember/application';\n\nlet App = Application.create({\n customEvents: {\n paste: 'paste'\n }\n});\n```\n\nTo prevent default events from being listened to:\n\n```javascript\nimport Application from '@ember/application';\n\nlet App = Application.create({\n customEvents: {\n mouseenter: null,\n mouseleave: null\n }\n});\n```", + "itemtype": "property", + "name": "events", + "type": "Object", + "access": "private", + "tagname": "", + "class": "Ember.EventDispatcher", + "module": "ember", + "namespace": "Ember" + }, + { + "file": "packages/@ember/-internals/views/lib/system/event_dispatcher.ts", + "line": 90, + "description": "The root DOM element to which event listeners should be attached. Event\nlisteners will be attached to the document unless this is overridden.\n\nCan be specified as a DOMElement or a selector string.\n\nThe default body is a string since this may be evaluated before document.body\nexists in the DOM.", + "access": "private", + "tagname": "", + "itemtype": "property", + "name": "rootElement", + "type": "DOMElement", + "default": "'body'", + "class": "Ember.EventDispatcher", + "module": "ember", + "namespace": "Ember" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 355, + "description": "Defines the properties that will be concatenated from the superclass\n(instead of overridden).\n\nBy default, when you extend an Ember class a property defined in\nthe subclass overrides a property with the same name that is defined\nin the superclass. However, there are some cases where it is preferable\nto build up a property's value by combining the superclass' property\nvalue with the subclass' value. An example of this in use within Ember\nis the `classNames` property of `Component` from `@ember/component`.\n\nHere is some sample code showing the difference between a concatenated\nproperty and a normal one:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Bar = EmberObject.extend({\n // Configure which properties to concatenate\n concatenatedProperties: ['concatenatedProperty'],\n\n someNonConcatenatedProperty: ['bar'],\n concatenatedProperty: ['bar']\n});\n\nconst FooBar = Bar.extend({\n someNonConcatenatedProperty: ['foo'],\n concatenatedProperty: ['foo']\n});\n\nlet fooBar = FooBar.create();\nfooBar.get('someNonConcatenatedProperty'); // ['foo']\nfooBar.get('concatenatedProperty'); // ['bar', 'foo']\n```\n\nThis behavior extends to object creation as well. Continuing the\nabove example:\n\n```javascript\nlet fooBar = FooBar.create({\n someNonConcatenatedProperty: ['baz'],\n concatenatedProperty: ['baz']\n})\nfooBar.get('someNonConcatenatedProperty'); // ['baz']\nfooBar.get('concatenatedProperty'); // ['bar', 'foo', 'baz']\n```\n\nAdding a single property that is not an array will just add it in the array:\n\n```javascript\nlet fooBar = FooBar.create({\n concatenatedProperty: 'baz'\n})\nview.get('concatenatedProperty'); // ['bar', 'foo', 'baz']\n```\n\nUsing the `concatenatedProperties` property, we can tell Ember to mix the\ncontent of the properties.\n\nIn `Component` the `classNames`, `classNameBindings` and\n`attributeBindings` properties are concatenated.\n\nThis feature is available for you to use throughout the Ember object model,\nalthough typical app developers are likely to use it infrequently. Since\nit changes expectations about behavior of properties, you should properly\ndocument its usage in each individual concatenated property (to not\nmislead your users to think they can override the property in a subclass).", + "itemtype": "property", + "name": "concatenatedProperties", + "type": "Array", + "default": "null", + "access": "public", + "tagname": "", + "class": "Ember.EventDispatcher", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 429, + "description": "Defines the properties that will be merged from the superclass\n(instead of overridden).\n\nBy default, when you extend an Ember class a property defined in\nthe subclass overrides a property with the same name that is defined\nin the superclass. However, there are some cases where it is preferable\nto build up a property's value by merging the superclass property value\nwith the subclass property's value. An example of this in use within Ember\nis the `queryParams` property of routes.\n\nHere is some sample code showing the difference between a merged\nproperty and a normal one:\n\n```javascript\nimport EmberObject from '@ember/object';\n\nconst Bar = EmberObject.extend({\n // Configure which properties are to be merged\n mergedProperties: ['mergedProperty'],\n\n someNonMergedProperty: {\n nonMerged: 'superclass value of nonMerged'\n },\n mergedProperty: {\n page: { replace: false },\n limit: { replace: true }\n }\n});\n\nconst FooBar = Bar.extend({\n someNonMergedProperty: {\n completelyNonMerged: 'subclass value of nonMerged'\n },\n mergedProperty: {\n limit: { replace: false }\n }\n});\n\nlet fooBar = FooBar.create();\n\nfooBar.get('someNonMergedProperty');\n// => { completelyNonMerged: 'subclass value of nonMerged' }\n//\n// Note the entire object, including the nonMerged property of\n// the superclass object, has been replaced\n\nfooBar.get('mergedProperty');\n// => {\n// page: {replace: false},\n// limit: {replace: false}\n// }\n//\n// Note the page remains from the superclass, and the\n// `limit` property's value of `false` has been merged from\n// the subclass.\n```\n\nThis behavior is not available during object `create` calls. It is only\navailable at `extend` time.\n\nIn `Route` the `queryParams` property is merged.\n\nThis feature is available for you to use throughout the Ember object model,\nalthough typical app developers are likely to use it infrequently. Since\nit changes expectations about behavior of properties, you should properly\ndocument its usage in each individual merged property (to not\nmislead your users to think they can override the property in a subclass).", + "itemtype": "property", + "name": "mergedProperties", + "type": "Array", + "default": "null", + "access": "public", + "tagname": "", + "class": "Ember.EventDispatcher", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 504, + "description": "Destroyed object property flag.\n\nif this property is `true` the observers and bindings were already\nremoved by the effect of calling the `destroy()` method.", + "itemtype": "property", + "name": "isDestroyed", + "default": "false", + "access": "public", + "tagname": "", + "class": "Ember.EventDispatcher", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + }, + { + "file": "packages/@ember/object/core.ts", + "line": 522, + "description": "Destruction scheduled flag. The `destroy()` method has been called.\n\nThe object stays intact until the end of the run loop at which point\nthe `isDestroyed` flag is set.", + "itemtype": "property", + "name": "isDestroying", + "default": "false", + "access": "public", + "tagname": "", + "class": "Ember.EventDispatcher", + "module": "@ember/object/core", + "inherited": true, + "inheritedFrom": "CoreObject" + } + ] + }, + "relationships": { + "parent-class": { + "data": { + "id": "ember-5.12.0-EmberObject", + "type": "class" + } + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-ember", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.InjectedProperty.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.InjectedProperty.json new file mode 100644 index 000000000..90ce2be6f --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.InjectedProperty.json @@ -0,0 +1,58 @@ +{ + "data": { + "id": "ember-5.12.0-Ember.InjectedProperty", + "type": "class", + "attributes": { + "name": "Ember.InjectedProperty", + "shortname": "Ember.InjectedProperty", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "ember", + "namespace": "Ember", + "file": "packages/@ember/-internals/metal/lib/injected_property.ts", + "line": 20, + "description": "Read-only property that returns the result of a container lookup.", + "is_constructor": 1, + "params": [ + { + "name": "type", + "description": "The container type the property will lookup", + "type": "String" + }, + { + "name": "nameOrDesc", + "description": "(optional) The name the property will lookup, defaults\n to the property's name", + "type": "String" + } + ], + "access": "private", + "tagname": "", + "methods": [], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-ember", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.MutableEnumerable.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.MutableEnumerable.json new file mode 100644 index 000000000..df431e461 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.MutableEnumerable.json @@ -0,0 +1,48 @@ +{ + "data": { + "id": "ember-5.12.0-Ember.MutableEnumerable", + "type": "class", + "attributes": { + "name": "Ember.MutableEnumerable", + "shortname": "Ember.MutableEnumerable", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "ember", + "namespace": "Ember", + "file": "packages/@ember/enumerable/mutable.ts", + "line": 8, + "description": "The methods in this mixin have been moved to MutableArray. This mixin has\nbeen intentionally preserved to avoid breaking MutableEnumerable.detect\nchecks until the community migrates away from them.", + "uses": [ + "Enumerable" + ], + "access": "private", + "tagname": "", + "methods": [], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-ember", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.NativeArray.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.NativeArray.json new file mode 100644 index 000000000..56af433a0 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.NativeArray.json @@ -0,0 +1,1636 @@ +{ + "data": { + "id": "ember-5.12.0-Ember.NativeArray", + "type": "class", + "attributes": { + "name": "Ember.NativeArray", + "shortname": "Ember.NativeArray", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "ember", + "namespace": "", + "file": "packages/@ember/array/index.ts", + "line": 2062, + "description": "The NativeArray mixin contains the properties needed to make the native\nArray support MutableArray and all of its dependent APIs. Unless you\nhave `EmberENV.EXTEND_PROTOTYPES` or `EmberENV.EXTEND_PROTOTYPES.Array` set to\nfalse, this will be applied automatically. Otherwise you can apply the mixin\nat anytime by calling `Ember.NativeArray.apply(Array.prototype)`.", + "uses": [ + "Observable", + "MutableArray" + ], + "access": "public", + "tagname": "", + "methods": [ + { + "file": "packages/@ember/object/observable.ts", + "line": 97, + "description": "Retrieves the value of a property from the object.\n\nThis method is usually similar to using `object[keyName]` or `object.keyName`,\nhowever it supports both computed properties and the unknownProperty\nhandler.\n\nBecause `get` unifies the syntax for accessing all these kinds\nof properties, it can make many refactorings easier, such as replacing a\nsimple property with a computed property, or vice versa.\n\n### Computed Properties\n\nComputed properties are methods defined with the `property` modifier\ndeclared at the end, such as:\n\n```javascript\nimport { computed } from '@ember/object';\n\nfullName: computed('firstName', 'lastName', function() {\n return this.get('firstName') + ' ' + this.get('lastName');\n})\n```\n\nWhen you call `get` on a computed property, the function will be\ncalled and the return value will be returned instead of the function\nitself.\n\n### Unknown Properties\n\nLikewise, if you try to call `get` on a property whose value is\n`undefined`, the `unknownProperty()` method will be called on the object.\nIf this method returns any value other than `undefined`, it will be returned\ninstead. This allows you to implement \"virtual\" properties that are\nnot defined upfront.", + "itemtype": "method", + "name": "get", + "params": [ + { + "name": "keyName", + "description": "The property to retrieve", + "type": "String" + } + ], + "return": { + "description": "The property value or undefined.", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 141, + "description": "To get the values of multiple properties at once, call `getProperties`\nwith a list of strings or an array:\n\n```javascript\nrecord.getProperties('firstName', 'lastName', 'zipCode');\n// { firstName: 'John', lastName: 'Doe', zipCode: '10011' }\n```\n\nis equivalent to:\n\n```javascript\nrecord.getProperties(['firstName', 'lastName', 'zipCode']);\n// { firstName: 'John', lastName: 'Doe', zipCode: '10011' }\n```", + "itemtype": "method", + "name": "getProperties", + "params": [ + { + "name": "list", + "description": "of keys to get", + "type": "String...|Array" + } + ], + "return": { + "description": "", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 168, + "description": "Sets the provided key or path to the value.\n\n```javascript\nrecord.set(\"key\", value);\n```\n\nThis method is generally very similar to calling `object[\"key\"] = value` or\n`object.key = value`, except that it provides support for computed\nproperties, the `setUnknownProperty()` method and property observers.\n\n### Computed Properties\n\nIf you try to set a value on a key that has a computed property handler\ndefined (see the `get()` method for an example), then `set()` will call\nthat method, passing both the value and key instead of simply changing\nthe value itself. This is useful for those times when you need to\nimplement a property that is composed of one or more member\nproperties.\n\n### Unknown Properties\n\nIf you try to set a value on a key that is undefined in the target\nobject, then the `setUnknownProperty()` handler will be called instead. This\ngives you an opportunity to implement complex \"virtual\" properties that\nare not predefined on the object. If `setUnknownProperty()` returns\nundefined, then `set()` will simply set the value on the object.\n\n### Property Observers\n\nIn addition to changing the property, `set()` will also register a property\nchange with the object. Unless you have placed this call inside of a\n`beginPropertyChanges()` and `endPropertyChanges(),` any \"local\" observers\n(i.e. observer methods declared on the same object), will be called\nimmediately. Any \"remote\" observers (i.e. observer methods declared on\nanother object) will be placed in a queue and called at a later time in a\ncoalesced manner.", + "itemtype": "method", + "name": "set", + "params": [ + { + "name": "keyName", + "description": "The property to set", + "type": "String" + }, + { + "name": "value", + "description": "The value to set or `null`.", + "type": "Object" + } + ], + "return": { + "description": "The passed value", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 216, + "description": "Sets a list of properties at once. These properties are set inside\na single `beginPropertyChanges` and `endPropertyChanges` batch, so\nobservers will be buffered.\n\n```javascript\nrecord.setProperties({ firstName: 'Charles', lastName: 'Jolley' });\n```", + "itemtype": "method", + "name": "setProperties", + "params": [ + { + "name": "hash", + "description": "the hash of keys and values to set", + "type": "Object" + } + ], + "return": { + "description": "The passed in hash", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 233, + "description": "Convenience method to call `propertyWillChange` and `propertyDidChange` in\nsuccession.\n\nNotify the observer system that a property has just changed.\n\nSometimes you need to change a value directly or indirectly without\nactually calling `get()` or `set()` on it. In this case, you can use this\nmethod instead. Calling this method will notify all observers that the\nproperty has potentially changed value.", + "itemtype": "method", + "name": "notifyPropertyChange", + "params": [ + { + "name": "keyName", + "description": "The property key to be notified about.", + "type": "String" + } + ], + "return": { + "description": "", + "type": "Observable" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 251, + "description": "Adds an observer on a property.\n\nThis is the core method used to register an observer for a property.\n\nOnce you call this method, any time the key's value is set, your observer\nwill be notified. Note that the observers are triggered any time the\nvalue is set, regardless of whether it has actually changed. Your\nobserver should be prepared to handle that.\n\nThere are two common invocation patterns for `.addObserver()`:\n\n- Passing two arguments:\n - the name of the property to observe (as a string)\n - the function to invoke (an actual function)\n- Passing three arguments:\n - the name of the property to observe (as a string)\n - the target object (will be used to look up and invoke a\n function on)\n - the name of the function to invoke on the target object\n (as a string).\n\n```js {data-filename=app/components/my-component.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n init() {\n this._super(...arguments);\n\n // the following are equivalent:\n\n // using three arguments\n this.addObserver('foo', this, 'fooDidChange');\n\n // using two arguments\n this.addObserver('foo', (...args) => {\n this.fooDidChange(...args);\n });\n },\n\n fooDidChange() {\n // your custom logic code\n }\n});\n```\n\n### Observer Methods\n\nObserver methods have the following signature:\n\n```js {data-filename=app/components/my-component.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n init() {\n this._super(...arguments);\n this.addObserver('foo', this, 'fooDidChange');\n },\n\n fooDidChange(sender, key, value, rev) {\n // your code\n }\n});\n```\n\nThe `sender` is the object that changed. The `key` is the property that\nchanges. The `value` property is currently reserved and unused. The `rev`\nis the last property revision of the object when it changed, which you can\nuse to detect if the key value has really changed or not.\n\nUsually you will not need the value or revision parameters at\nthe end. In this case, it is common to write observer methods that take\nonly a sender and key value as parameters or, if you aren't interested in\nany of these values, to write an observer that has no parameters at all.", + "itemtype": "method", + "name": "addObserver", + "params": [ + { + "name": "key", + "description": "The key to observe", + "type": "String" + }, + { + "name": "target", + "description": "The target object to invoke", + "type": "Object" + }, + { + "name": "method", + "description": "The method to invoke", + "type": "String|Function" + }, + { + "name": "sync", + "description": "Whether the observer is sync or not", + "type": "Boolean" + } + ], + "return": { + "description": "", + "type": "Observable" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 337, + "description": "Remove an observer you have previously registered on this object. Pass\nthe same key, target, and method you passed to `addObserver()` and your\ntarget will no longer receive notifications.", + "itemtype": "method", + "name": "removeObserver", + "params": [ + { + "name": "key", + "description": "The key to observe", + "type": "String" + }, + { + "name": "target", + "description": "The target object to invoke", + "type": "Object" + }, + { + "name": "method", + "description": "The method to invoke", + "type": "String|Function" + }, + { + "name": "sync", + "description": "Whether the observer is async or not", + "type": "Boolean" + } + ], + "return": { + "description": "", + "type": "Observable" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 358, + "description": "Set the value of a property to the current value plus some amount.\n\n```javascript\nperson.incrementProperty('age');\nteam.incrementProperty('score', 2);\n```", + "itemtype": "method", + "name": "incrementProperty", + "params": [ + { + "name": "keyName", + "description": "The name of the property to increment", + "type": "String" + }, + { + "name": "increment", + "description": "The amount to increment by. Defaults to 1", + "type": "Number" + } + ], + "return": { + "description": "The new property value", + "type": "Number" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 375, + "description": "Set the value of a property to the current value minus some amount.\n\n```javascript\nplayer.decrementProperty('lives');\norc.decrementProperty('health', 5);\n```", + "itemtype": "method", + "name": "decrementProperty", + "params": [ + { + "name": "keyName", + "description": "The name of the property to decrement", + "type": "String" + }, + { + "name": "decrement", + "description": "The amount to decrement by. Defaults to 1", + "type": "Number" + } + ], + "return": { + "description": "The new property value", + "type": "Number" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 392, + "description": "Set the value of a boolean property to the opposite of its\ncurrent value.\n\n```javascript\nstarship.toggleProperty('warpDriveEngaged');\n```", + "itemtype": "method", + "name": "toggleProperty", + "params": [ + { + "name": "keyName", + "description": "The name of the property to toggle", + "type": "String" + } + ], + "return": { + "description": "The new property value", + "type": "Boolean" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 407, + "description": "Returns the cached value of a computed property, if it exists.\nThis allows you to inspect the value of a computed property\nwithout accidentally invoking it if it is intended to be\ngenerated lazily.", + "itemtype": "method", + "name": "cacheFor", + "params": [ + { + "name": "keyName", + "description": "", + "type": "String" + } + ], + "return": { + "description": "The cached value of the computed property, if any", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 437, + "description": "Begins a grouping of property changes.\n\nYou can use this method to group property changes so that notifications\nwill not be sent until the changes are finished. If you plan to make a\nlarge number of changes to an object at one time, you should call this\nmethod at the beginning of the changes to begin deferring change\nnotifications. When you are done making changes, call\n`endPropertyChanges()` to deliver the deferred change notifications and end\ndeferring.", + "itemtype": "method", + "name": "beginPropertyChanges", + "return": { + "description": "", + "type": "Observable" + }, + "access": "private", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 457, + "description": "Ends a grouping of property changes.\n\nYou can use this method to group property changes so that notifications\nwill not be sent until the changes are finished. If you plan to make a\nlarge number of changes to an object at one time, you should call\n`beginPropertyChanges()` at the beginning of the changes to defer change\nnotifications. When you are done making changes, call this method to\ndeliver the deferred change notifications and end deferring.", + "itemtype": "method", + "name": "endPropertyChanges", + "return": { + "description": "", + "type": "Observable" + }, + "access": "private", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/object/observable.ts", + "line": 501, + "description": "Returns `true` if the object currently has observers registered for a\nparticular key. You can use this method to potentially defer performing\nan expensive action until someone begins observing a particular property\non the object.", + "itemtype": "method", + "name": "hasObserverFor", + "params": [ + { + "name": "key", + "description": "Key to check", + "type": "String" + } + ], + "return": { + "description": "", + "type": "Boolean" + }, + "access": "private", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/object/observable", + "inherited": true, + "inheritedFrom": "Observable" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1484, + "description": "__Required.__ You must implement this method to apply this mixin.\n\nThis is one of the primitives you must implement to support `Array`.\nYou should replace amt objects started at idx with the objects in the\npassed array.\n\nNote that this method is expected to validate the type(s) of objects that it expects.", + "itemtype": "method", + "name": "replace", + "params": [ + { + "name": "idx", + "description": "Starting index in the array to replace. If\n idx >= length, then append to the end of the array.", + "type": "Number" + }, + { + "name": "amt", + "description": "Number of elements that should be removed from\n the array, starting at *idx*.", + "type": "Number" + }, + { + "name": "objects", + "description": "An optional array of zero or more objects that should be\n inserted into the array at *idx*", + "type": "EmberArray", + "optional": true + } + ], + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "MutableArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1503, + "description": "Remove all elements from the array. This is useful if you\nwant to reuse an existing array without having to recreate it.\n\n```javascript\nlet colors = ['red', 'green', 'blue'];\n\ncolors.length; // 3\ncolors.clear(); // []\ncolors.length; // 0\n```", + "itemtype": "method", + "name": "clear", + "return": { + "description": "An empty Array.", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "MutableArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1520, + "description": "This will use the primitive `replace()` method to insert an object at the\nspecified index.\n\n```javascript\nlet colors = ['red', 'green', 'blue'];\n\ncolors.insertAt(2, 'yellow'); // ['red', 'green', 'yellow', 'blue']\ncolors.insertAt(5, 'orange'); // Error: Index out of range\n```", + "itemtype": "method", + "name": "insertAt", + "params": [ + { + "name": "idx", + "description": "index of insert the object at.", + "type": "Number" + }, + { + "name": "object", + "description": "object to insert", + "type": "Object" + } + ], + "return": { + "description": "receiver", + "type": "EmberArray" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "MutableArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1538, + "description": "Remove an object at the specified index using the `replace()` primitive\nmethod. You can pass either a single index, or a start and a length.\n\nIf you pass a start and length that is beyond the\nlength this method will throw an assertion.\n\n```javascript\nlet colors = ['red', 'green', 'blue', 'yellow', 'orange'];\n\ncolors.removeAt(0); // ['green', 'blue', 'yellow', 'orange']\ncolors.removeAt(2, 2); // ['green', 'blue']\ncolors.removeAt(4, 2); // Error: Index out of range\n```", + "itemtype": "method", + "name": "removeAt", + "params": [ + { + "name": "start", + "description": "index, start of range", + "type": "Number" + }, + { + "name": "len", + "description": "length of passing range", + "type": "Number" + } + ], + "return": { + "description": "receiver", + "type": "EmberArray" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "MutableArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1560, + "description": "Push the object onto the end of the array. Works just like `push()` but it\nis KVO-compliant.\n\n```javascript\nlet colors = ['red', 'green'];\n\ncolors.pushObject('black'); // ['red', 'green', 'black']\ncolors.pushObject(['yellow']); // ['red', 'green', ['yellow']]\n```", + "itemtype": "method", + "name": "pushObject", + "params": [ + { + "name": "obj", + "description": "object to push", + "type": "*" + } + ], + "return": { + "description": "object same object passed as a param" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "MutableArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1577, + "description": "Add the objects in the passed array to the end of the array. Defers\nnotifying observers of the change until all objects are added.\n\n```javascript\nlet colors = ['red'];\n\ncolors.pushObjects(['yellow', 'orange']); // ['red', 'yellow', 'orange']\n```", + "itemtype": "method", + "name": "pushObjects", + "params": [ + { + "name": "objects", + "description": "the objects to add", + "type": "Array" + } + ], + "return": { + "description": "receiver", + "type": "MutableArray" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "MutableArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1593, + "description": "Pop object from array or nil if none are left. Works just like `pop()` but\nit is KVO-compliant.\n\n```javascript\nlet colors = ['red', 'green', 'blue'];\n\ncolors.popObject(); // 'blue'\nconsole.log(colors); // ['red', 'green']\n```", + "itemtype": "method", + "name": "popObject", + "return": { + "description": "object" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "MutableArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1609, + "description": "Shift an object from start of array or nil if none are left. Works just\nlike `shift()` but it is KVO-compliant.\n\n```javascript\nlet colors = ['red', 'green', 'blue'];\n\ncolors.shiftObject(); // 'red'\nconsole.log(colors); // ['green', 'blue']\n```", + "itemtype": "method", + "name": "shiftObject", + "return": { + "description": "object" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "MutableArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1625, + "description": "Unshift an object to start of array. Works just like `unshift()` but it is\nKVO-compliant.\n\n```javascript\nlet colors = ['red'];\n\ncolors.unshiftObject('yellow'); // ['yellow', 'red']\ncolors.unshiftObject(['black']); // [['black'], 'yellow', 'red']\n```", + "itemtype": "method", + "name": "unshiftObject", + "params": [ + { + "name": "obj", + "description": "object to unshift", + "type": "*" + } + ], + "return": { + "description": "object same object passed as a param" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "MutableArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1642, + "description": "Adds the named objects to the beginning of the array. Defers notifying\nobservers until all objects have been added.\n\n```javascript\nlet colors = ['red'];\n\ncolors.unshiftObjects(['black', 'white']); // ['black', 'white', 'red']\ncolors.unshiftObjects('yellow'); // Type Error: 'undefined' is not a function\n```", + "itemtype": "method", + "name": "unshiftObjects", + "params": [ + { + "name": "objects", + "description": "the objects to add", + "type": "Enumerable" + } + ], + "return": { + "description": "receiver", + "type": "EmberArray" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "MutableArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1659, + "description": "Reverse objects in the array. Works just like `reverse()` but it is\nKVO-compliant.", + "itemtype": "method", + "name": "reverseObjects", + "return": { + "description": "receiver", + "type": "EmberArray" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "MutableArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1668, + "description": "Replace all the receiver's content with content of the argument.\nIf argument is an empty array receiver will be cleared.\n\n```javascript\nlet colors = ['red', 'green', 'blue'];\n\ncolors.setObjects(['black', 'white']); // ['black', 'white']\ncolors.setObjects([]); // []\n```", + "itemtype": "method", + "name": "setObjects", + "params": [ + { + "name": "objects", + "description": "array whose content will be used for replacing\n the content of the receiver", + "type": "EmberArray" + } + ], + "return": { + "description": "receiver with the new content", + "type": "EmberArray" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "MutableArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1686, + "description": "Remove all occurrences of an object in the array.\n\n```javascript\nlet cities = ['Chicago', 'Berlin', 'Lima', 'Chicago'];\n\ncities.removeObject('Chicago'); // ['Berlin', 'Lima']\ncities.removeObject('Lima'); // ['Berlin']\ncities.removeObject('Tokyo') // ['Berlin']\n```", + "itemtype": "method", + "name": "removeObject", + "params": [ + { + "name": "obj", + "description": "object to remove", + "type": "*" + } + ], + "return": { + "description": "receiver", + "type": "EmberArray" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "MutableArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1703, + "description": "Removes each object in the passed array from the receiver.", + "itemtype": "method", + "name": "removeObjects", + "params": [ + { + "name": "objects", + "description": "the objects to remove", + "type": "EmberArray" + } + ], + "return": { + "description": "receiver", + "type": "EmberArray" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "MutableArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1712, + "description": "Push the object onto the end of the array if it is not already\npresent in the array.\n\n```javascript\nlet cities = ['Chicago', 'Berlin'];\n\ncities.addObject('Lima'); // ['Chicago', 'Berlin', 'Lima']\ncities.addObject('Berlin'); // ['Chicago', 'Berlin', 'Lima']\n```", + "itemtype": "method", + "name": "addObject", + "params": [ + { + "name": "obj", + "description": "object to add, if not already present", + "type": "*" + } + ], + "return": { + "description": "receiver", + "type": "EmberArray" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "MutableArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1729, + "description": "Adds each object in the passed array to the receiver.", + "itemtype": "method", + "name": "addObjects", + "params": [ + { + "name": "objects", + "description": "the objects to add.", + "type": "EmberArray" + } + ], + "return": { + "description": "receiver", + "type": "EmberArray" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "MutableArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 263, + "description": "Returns the object at the given `index`. If the given `index` is negative\nor is greater or equal than the array length, returns `undefined`.\n\nThis is one of the primitives you must implement to support `EmberArray`.\nIf your object supports retrieving the value of an array item using `get()`\n(i.e. `myArray.get(0)`), then you do not need to implement this method\nyourself.\n\n```javascript\nlet arr = ['a', 'b', 'c', 'd'];\n\narr.objectAt(0); // 'a'\narr.objectAt(3); // 'd'\narr.objectAt(-1); // undefined\narr.objectAt(4); // undefined\narr.objectAt(5); // undefined\n```", + "itemtype": "method", + "name": "objectAt", + "params": [ + { + "name": "idx", + "description": "The index of the item to return.", + "type": "Number" + } + ], + "return": { + "description": "item at index or undefined", + "type": "*" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 288, + "description": "This returns the objects at the specified indexes, using `objectAt`.\n\n```javascript\nlet arr = ['a', 'b', 'c', 'd'];\n\narr.objectsAt([0, 1, 2]); // ['a', 'b', 'c']\narr.objectsAt([2, 3, 4]); // ['c', 'd', undefined]\n```", + "itemtype": "method", + "name": "objectsAt", + "params": [ + { + "name": "indexes", + "description": "An array of indexes of items to return.", + "type": "Array" + } + ], + "return": { + "description": "", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 354, + "description": "Returns a new array that is a slice of the receiver. This implementation\nuses the observable array methods to retrieve the objects for the new\nslice.\n\n```javascript\nlet arr = ['red', 'green', 'blue'];\n\narr.slice(0); // ['red', 'green', 'blue']\narr.slice(0, 2); // ['red', 'green']\narr.slice(1, 100); // ['green', 'blue']\n```", + "itemtype": "method", + "name": "slice", + "params": [ + { + "name": "beginIndex", + "description": "(Optional) index to begin slicing from.", + "type": "Number" + }, + { + "name": "endIndex", + "description": "(Optional) index to end the slice at (but not included).", + "type": "Number" + } + ], + "return": { + "description": "New array with specified slice", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 374, + "description": "Used to determine the passed object's first occurrence in the array.\nReturns the index if found, -1 if no match is found.\n\nThe optional `startAt` argument can be used to pass a starting\nindex to search from, effectively slicing the searchable portion\nof the array. If it's negative it will add the array length to\nthe startAt value passed in as the index to search from. If less\nthan or equal to `-1 * array.length` the entire array is searched.\n\n```javascript\nlet arr = ['a', 'b', 'c', 'd', 'a'];\n\narr.indexOf('a'); // 0\narr.indexOf('z'); // -1\narr.indexOf('a', 2); // 4\narr.indexOf('a', -1); // 4, equivalent to indexOf('a', 4)\narr.indexOf('a', -100); // 0, searches entire array\narr.indexOf('b', 3); // -1\narr.indexOf('a', 100); // -1\n\nlet people = [{ name: 'Zoey' }, { name: 'Bob' }]\nlet newPerson = { name: 'Tom' };\npeople = [newPerson, ...people, newPerson];\n\npeople.indexOf(newPerson); // 0\npeople.indexOf(newPerson, 1); // 3\npeople.indexOf(newPerson, -4); // 0\npeople.indexOf(newPerson, 10); // -1\n```", + "itemtype": "method", + "name": "indexOf", + "params": [ + { + "name": "object", + "description": "the item to search for", + "type": "Object" + }, + { + "name": "startAt", + "description": "optional starting location to search, default 0", + "type": "Number" + } + ], + "return": { + "description": "index or -1 if not found", + "type": "Number" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 412, + "description": "Returns the index of the given `object`'s last occurrence.\n\n- If no `startAt` argument is given, the search starts from\nthe last position.\n- If it's greater than or equal to the length of the array,\nthe search starts from the last position.\n- If it's negative, it is taken as the offset from the end\nof the array i.e. `startAt + array.length`.\n- If it's any other positive number, will search backwards\nfrom that index of the array.\n\nReturns -1 if no match is found.\n\n```javascript\nlet arr = ['a', 'b', 'c', 'd', 'a'];\n\narr.lastIndexOf('a'); // 4\narr.lastIndexOf('z'); // -1\narr.lastIndexOf('a', 2); // 0\narr.lastIndexOf('a', -1); // 4\narr.lastIndexOf('a', -3); // 0\narr.lastIndexOf('b', 3); // 1\narr.lastIndexOf('a', 100); // 4\n```", + "itemtype": "method", + "name": "lastIndexOf", + "params": [ + { + "name": "object", + "description": "the item to search for", + "type": "Object" + }, + { + "name": "startAt", + "description": "optional starting location to search from\nbackwards, defaults to `(array.length - 1)`", + "type": "Number" + } + ], + "return": { + "description": "The last index of the `object` in the array or -1\nif not found", + "type": "Number" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 447, + "description": "Iterates through the array, calling the passed function on each\nitem. This method corresponds to the `forEach()` method defined in\nJavaScript 1.6.\n\nThe callback method you provide should have the following signature (all\nparameters are optional):\n\n```javascript\nfunction(item, index, array);\n```\n\n- `item` is the current item in the iteration.\n- `index` is the current index in the iteration.\n- `array` is the array itself.\n\nNote that in addition to a callback, you can also pass an optional target\nobject that will be set as `this` on the context. This is a good way\nto give your iterator function access to the current object.\n\nExample Usage:\n\n```javascript\nlet foods = [\n { name: 'apple', eaten: false },\n { name: 'banana', eaten: false },\n { name: 'carrot', eaten: false }\n];\n\nfoods.forEach((food) => food.eaten = true);\n\nlet output = '';\nfoods.forEach((item, index, array) =>\n output += `${index + 1}/${array.length} ${item.name}\\n`;\n);\nconsole.log(output);\n// 1/3 apple\n// 2/3 banana\n// 3/3 carrot\n```", + "itemtype": "method", + "name": "forEach", + "params": [ + { + "name": "callback", + "description": "The callback to execute", + "type": "Function" + }, + { + "name": "target", + "description": "The target object to use", + "type": "Object", + "optional": true + } + ], + "return": { + "description": "receiver", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 498, + "description": "Alias for `mapBy`.\n\nReturns the value of the named\nproperty on all items in the enumeration.\n\n```javascript\nlet people = [{name: 'Joe'}, {name: 'Matt'}];\n\npeople.getEach('name');\n// ['Joe', 'Matt'];\n\npeople.getEach('nonexistentProperty');\n// [undefined, undefined];\n```", + "itemtype": "method", + "name": "getEach", + "params": [ + { + "name": "key", + "description": "name of the property", + "type": "String" + } + ], + "return": { + "description": "The mapped array.", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 520, + "description": "Sets the value on the named property for each member. This is more\nergonomic than using other methods defined on this helper. If the object\nimplements Observable, the value will be changed to `set(),` otherwise\nit will be set directly. `null` objects are skipped.\n\n```javascript\nlet people = [{name: 'Joe'}, {name: 'Matt'}];\n\npeople.setEach('zipCode', '10011');\n// [{name: 'Joe', zipCode: '10011'}, {name: 'Matt', zipCode: '10011'}];\n```", + "itemtype": "method", + "name": "setEach", + "params": [ + { + "name": "key", + "description": "The key to set", + "type": "String" + }, + { + "name": "value", + "description": "The object to set", + "type": "Object" + } + ], + "return": { + "description": "receiver", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 540, + "description": "Maps all of the items in the enumeration to another value, returning\na new array. This method corresponds to `map()` defined in JavaScript 1.6.\n\nThe callback method you provide should have the following signature (all\nparameters are optional):\n\n```javascript\nfunction(item, index, array);\nlet arr = [1, 2, 3, 4, 5, 6];\n\narr.map(element => element * element);\n// [1, 4, 9, 16, 25, 36];\n\narr.map((element, index) => element + index);\n// [1, 3, 5, 7, 9, 11];\n```\n\n- `item` is the current item in the iteration.\n- `index` is the current index in the iteration.\n- `array` is the array itself.\n\nIt should return the mapped value.\n\nNote that in addition to a callback, you can also pass an optional target\nobject that will be set as `this` on the context. This is a good way\nto give your iterator function access to the current object.", + "itemtype": "method", + "name": "map", + "params": [ + { + "name": "callback", + "description": "The callback to execute", + "type": "Function" + }, + { + "name": "target", + "description": "The target object to use", + "type": "Object", + "optional": true + } + ], + "return": { + "description": "The mapped array.", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 578, + "description": "Similar to map, this specialized function returns the value of the named\nproperty on all items in the enumeration.\n\n```javascript\nlet people = [{name: 'Joe'}, {name: 'Matt'}];\n\npeople.mapBy('name');\n// ['Joe', 'Matt'];\n\npeople.mapBy('unknownProperty');\n// [undefined, undefined];\n```", + "itemtype": "method", + "name": "mapBy", + "params": [ + { + "name": "key", + "description": "name of the property", + "type": "String" + } + ], + "return": { + "description": "The mapped array.", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 599, + "description": "Returns a new array with all of the items in the enumeration that the provided\ncallback function returns true for. This method corresponds to [Array.prototype.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).\n\nThe callback method should have the following signature:\n\n```javascript\nfunction(item, index, array);\n```\n\n- `item` is the current item in the iteration.\n- `index` is the current index in the iteration.\n- `array` is the array itself.\n\nAll parameters are optional. The function should return `true` to include the item\nin the results, and `false` otherwise.\n\nExample:\n\n```javascript\nfunction isAdult(person) {\n return person.age > 18;\n};\n\nlet people = Ember.A([{ name: 'John', age: 14 }, { name: 'Joan', age: 45 }]);\n\npeople.filter(isAdult); // returns [{ name: 'Joan', age: 45 }];\n```\n\nNote that in addition to a callback, you can pass an optional target object\nthat will be set as `this` on the context. This is a good way to give your\niterator function access to the current object. For example:\n\n```javascript\nfunction isAdultAndEngineer(person) {\n return person.age > 18 && this.engineering;\n}\n\nclass AdultsCollection {\n engineering = false;\n\n constructor(opts = {}) {\n super(...arguments);\n\n this.engineering = opts.engineering;\n this.people = Ember.A([{ name: 'John', age: 14 }, { name: 'Joan', age: 45 }]);\n }\n}\n\nlet collection = new AdultsCollection({ engineering: true });\ncollection.people.filter(isAdultAndEngineer, { target: collection });\n```", + "itemtype": "method", + "name": "filter", + "params": [ + { + "name": "callback", + "description": "The callback to execute", + "type": "Function" + }, + { + "name": "target", + "description": "The target object to use", + "type": "Object", + "optional": true + } + ], + "return": { + "description": "A filtered array.", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 662, + "description": "Returns an array with all of the items in the enumeration where the passed\nfunction returns false. This method is the inverse of filter().\n\nThe callback method you provide should have the following signature (all\nparameters are optional):\n\n```javascript\nfunction(item, index, array);\n```\n\n- *item* is the current item in the iteration.\n- *index* is the current index in the iteration\n- *array* is the array itself.\n\nIt should return a falsey value to include the item in the results.\n\nNote that in addition to a callback, you can also pass an optional target\nobject that will be set as \"this\" on the context. This is a good way\nto give your iterator function access to the current object.\n\nExample Usage:\n\n```javascript\nconst food = [\n { food: 'apple', isFruit: true },\n { food: 'bread', isFruit: false },\n { food: 'banana', isFruit: true }\n];\nconst nonFruits = food.reject(function(thing) {\n return thing.isFruit;\n}); // [{food: 'bread', isFruit: false}]\n```", + "itemtype": "method", + "name": "reject", + "params": [ + { + "name": "callback", + "description": "The callback to execute", + "type": "Function" + }, + { + "name": "target", + "description": "The target object to use", + "type": "Object", + "optional": true + } + ], + "return": { + "description": "A rejected array.", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 706, + "description": "Filters the array by the property and an optional value. If a value is given, it returns\nthe items that have said value for the property. If not, it returns all the items that\nhave a truthy value for the property.\n\nExample Usage:\n\n```javascript\nlet things = Ember.A([{ food: 'apple', isFruit: true }, { food: 'beans', isFruit: false }]);\n\nthings.filterBy('food', 'beans'); // [{ food: 'beans', isFruit: false }]\nthings.filterBy('isFruit'); // [{ food: 'apple', isFruit: true }]\n```", + "itemtype": "method", + "name": "filterBy", + "params": [ + { + "name": "key", + "description": "the property to test", + "type": "String" + }, + { + "name": "value", + "description": "optional value to test against.", + "type": "*", + "optional": true + } + ], + "return": { + "description": "filtered array", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 727, + "description": "Returns an array with the items that do not have truthy values for the provided key.\nYou can pass an optional second argument with a target value to reject for the key.\nOtherwise this will reject objects where the provided property evaluates to false.\n\nExample Usage:\n\n```javascript\n let food = [\n { name: \"apple\", isFruit: true },\n { name: \"carrot\", isFruit: false },\n { name: \"bread\", isFruit: false },\n ];\n food.rejectBy('isFruit'); // [{ name: \"carrot\", isFruit: false }, { name: \"bread\", isFruit: false }]\n food.rejectBy('name', 'carrot'); // [{ name: \"apple\", isFruit: true }}, { name: \"bread\", isFruit: false }]\n```", + "itemtype": "method", + "name": "rejectBy", + "params": [ + { + "name": "key", + "description": "the property to test", + "type": "String" + }, + { + "name": "value", + "description": "optional value to test against.", + "type": "*", + "optional": true + } + ], + "return": { + "description": "rejected array", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 751, + "description": "Returns the first item in the array for which the callback returns true.\nThis method is similar to the `find()` method defined in ECMAScript 2015.\n\nThe callback method you provide should have the following signature (all\nparameters are optional):\n\n```javascript\nfunction(item, index, array);\n```\n\n- `item` is the current item in the iteration.\n- `index` is the current index in the iteration.\n- `array` is the array itself.\n\nIt should return the `true` to include the item in the results, `false`\notherwise.\n\nNote that in addition to a callback, you can also pass an optional target\nobject that will be set as `this` on the context. This is a good way\nto give your iterator function access to the current object.\n\nExample Usage:\n\n```javascript\nlet users = [\n { id: 1, name: 'Yehuda' },\n { id: 2, name: 'Tom' },\n { id: 3, name: 'Melanie' },\n { id: 4, name: 'Leah' }\n];\n\nusers.find((user) => user.name == 'Tom'); // [{ id: 2, name: 'Tom' }]\nusers.find(({ id }) => id == 3); // [{ id: 3, name: 'Melanie' }]\n```", + "itemtype": "method", + "name": "find", + "params": [ + { + "name": "callback", + "description": "The callback to execute", + "type": "Function" + }, + { + "name": "target", + "description": "The target object to use", + "type": "Object", + "optional": true + } + ], + "return": { + "description": "Found item or `undefined`.", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 801, + "description": "Returns the first item with a property matching the passed value. You\ncan pass an optional second argument with the target value. Otherwise\nthis will match any property that evaluates to `true`.\n\nThis method works much like the more generic `find()` method.\n\nUsage Example:\n\n```javascript\nlet users = [\n { id: 1, name: 'Yehuda', isTom: false },\n { id: 2, name: 'Tom', isTom: true },\n { id: 3, name: 'Melanie', isTom: false },\n { id: 4, name: 'Leah', isTom: false }\n];\n\nusers.findBy('id', 4); // { id: 4, name: 'Leah', isTom: false }\nusers.findBy('name', 'Melanie'); // { id: 3, name: 'Melanie', isTom: false }\nusers.findBy('isTom'); // { id: 2, name: 'Tom', isTom: true }\n```", + "itemtype": "method", + "name": "findBy", + "params": [ + { + "name": "key", + "description": "the property to test", + "type": "String" + }, + { + "name": "value", + "description": "optional value to test against.", + "type": "String", + "optional": true + } + ], + "return": { + "description": "found item or `undefined`", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 831, + "description": "Returns `true` if the passed function returns true for every item in the\nenumeration. This corresponds with the `Array.prototype.every()` method defined in ES5.\n\nThe callback method should have the following signature:\n\n```javascript\nfunction(item, index, array);\n```\n\n- `item` is the current item in the iteration.\n- `index` is the current index in the iteration.\n- `array` is the array itself.\n\nAll params are optional. The method should return `true` or `false`.\n\nNote that in addition to a callback, you can also pass an optional target\nobject that will be set as `this` on the context. This is a good way\nto give your iterator function access to the current object.\n\nUsage example:\n\n```javascript\nfunction isAdult(person) {\n return person.age > 18;\n};\n\nconst people = Ember.A([{ name: 'John', age: 24 }, { name: 'Joan', age: 45 }]);\nconst areAllAdults = people.every(isAdult);\n```", + "itemtype": "method", + "name": "every", + "params": [ + { + "name": "callback", + "description": "The callback to execute", + "type": "Function" + }, + { + "name": "target", + "description": "The target object to use", + "type": "Object", + "optional": true + } + ], + "return": { + "description": "", + "type": "Boolean" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 872, + "description": "Returns `true` if the passed property resolves to the value of the second\nargument for all items in the array. This method is often simpler/faster\nthan using a callback.\n\nNote that like the native `Array.every`, `isEvery` will return true when called\non any empty array.\n```javascript\nclass Language {\n constructor(name, isProgrammingLanguage) {\n this.name = name;\n this.programmingLanguage = isProgrammingLanguage;\n }\n}\n\nconst compiledLanguages = [\n new Language('Java', true),\n new Language('Go', true),\n new Language('Rust', true)\n]\n\nconst languagesKnownByMe = [\n new Language('Javascript', true),\n new Language('English', false),\n new Language('Ruby', true)\n]\n\ncompiledLanguages.isEvery('programmingLanguage'); // true\nlanguagesKnownByMe.isEvery('programmingLanguage'); // false\n```", + "itemtype": "method", + "name": "isEvery", + "params": [ + { + "name": "key", + "description": "the property to test", + "type": "String" + }, + { + "name": "value", + "description": "optional value to test against. Defaults to `true`", + "type": "String", + "optional": true + } + ], + "return": { + "description": "", + "type": "Boolean" + }, + "since": "1.3.0", + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 912, + "description": "The any() method executes the callback function once for each element\npresent in the array until it finds the one where callback returns a truthy\nvalue (i.e. `true`). If such an element is found, any() immediately returns\ntrue. Otherwise, any() returns false.\n\n```javascript\nfunction(item, index, array);\n```\n\n- `item` is the current item in the iteration.\n- `index` is the current index in the iteration.\n- `array` is the array object itself.\n\nNote that in addition to a callback, you can also pass an optional target\nobject that will be set as `this` on the context. It can be a good way\nto give your iterator function access to an object in cases where an ES6\narrow function would not be appropriate.\n\nUsage Example:\n\n```javascript\nlet includesManager = people.any(this.findPersonInManagersList, this);\n\nlet includesStockHolder = people.any(person => {\n return this.findPersonInStockHoldersList(person)\n});\n\nif (includesManager || includesStockHolder) {\n Paychecks.addBiggerBonus();\n}\n```", + "itemtype": "method", + "name": "any", + "params": [ + { + "name": "callback", + "description": "The callback to execute", + "type": "Function" + }, + { + "name": "target", + "description": "The target object to use", + "type": "Object", + "optional": true + } + ], + "return": { + "description": "`true` if the passed function returns `true` for any item", + "type": "Boolean" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 955, + "description": "Returns `true` if the passed property resolves to the value of the second\nargument for any item in the array. This method is often simpler/faster\nthan using a callback.\n\nExample usage:\n\n```javascript\nconst food = [\n { food: 'apple', isFruit: true },\n { food: 'bread', isFruit: false },\n { food: 'banana', isFruit: true }\n];\n\nfood.isAny('isFruit'); // true\n```", + "itemtype": "method", + "name": "isAny", + "params": [ + { + "name": "key", + "description": "the property to test", + "type": "String" + }, + { + "name": "value", + "description": "optional value to test against. Defaults to `true`", + "type": "String", + "optional": true + } + ], + "return": { + "description": "", + "type": "Boolean" + }, + "since": "1.3.0", + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 981, + "description": "This will combine the values of the array into a single value. It\nis a useful way to collect a summary value from an array. This\ncorresponds to the `reduce()` method defined in JavaScript 1.8.\n\nThe callback method you provide should have the following signature (all\nparameters are optional):\n\n```javascript\nfunction(previousValue, item, index, array);\n```\n\n- `previousValue` is the value returned by the last call to the iterator.\n- `item` is the current item in the iteration.\n- `index` is the current index in the iteration.\n- `array` is the array itself.\n\nReturn the new cumulative value.\n\nIn addition to the callback you can also pass an `initialValue`. An error\nwill be raised if you do not pass an initial value and the enumerator is\nempty.\n\nNote that unlike the other methods, this method does not allow you to\npass a target object to set as this for the callback. It's part of the\nspec. Sorry.\n\nExample Usage:\n\n```javascript\n let numbers = [1, 2, 3, 4, 5];\n\n numbers.reduce(function(summation, current) {\n return summation + current;\n }); // 15 (1 + 2 + 3 + 4 + 5)\n\n numbers.reduce(function(summation, current) {\n return summation + current;\n }, -15); // 0 (-15 + 1 + 2 + 3 + 4 + 5)\n\n\n let binaryValues = [true, false, false];\n\n binaryValues.reduce(function(truthValue, current) {\n return truthValue && current;\n }); // false (true && false && false)\n```", + "itemtype": "method", + "name": "reduce", + "params": [ + { + "name": "callback", + "description": "The callback to execute", + "type": "Function" + }, + { + "name": "initialValue", + "description": "Initial value for the reduce", + "type": "Object" + } + ], + "return": { + "description": "The reduced value.", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1039, + "description": "Invokes the named method on every object in the receiver that\nimplements it. This method corresponds to the implementation in\nPrototype 1.6.\n\n```javascript\nclass Person {\n name = null;\n\n constructor(name) {\n this.name = name;\n }\n\n greet(prefix='Hello') {\n return `${prefix} ${this.name}`;\n }\n}\n\nlet people = [new Person('Joe'), new Person('Matt')];\n\npeople.invoke('greet'); // ['Hello Joe', 'Hello Matt']\npeople.invoke('greet', 'Bonjour'); // ['Bonjour Joe', 'Bonjour Matt']\n```", + "itemtype": "method", + "name": "invoke", + "params": [ + { + "name": "methodName", + "description": "the name of the method", + "type": "String" + }, + { + "name": "args", + "description": "optional arguments to pass as well.", + "type": "Object..." + } + ], + "return": { + "description": "return values from calling invoke.", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1073, + "description": "Simply converts the object into a genuine array. The order is not\nguaranteed. Corresponds to the method implemented by Prototype.", + "itemtype": "method", + "name": "toArray", + "return": { + "description": "the object as an array.", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1082, + "description": "Returns a copy of the array with all `null` and `undefined` elements removed.\n\n```javascript\nlet arr = ['a', null, 'c', undefined];\narr.compact(); // ['a', 'c']\n```", + "itemtype": "method", + "name": "compact", + "return": { + "description": "the array without null and undefined elements.", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1095, + "description": "Used to determine if the array contains the passed object.\nReturns `true` if found, `false` otherwise.\n\nThe optional `startAt` argument can be used to pass a starting\nindex to search from, effectively slicing the searchable portion\nof the array. If it's negative it will add the array length to\nthe startAt value passed in as the index to search from. If less\nthan or equal to `-1 * array.length` the entire array is searched.\n\nThis method has the same behavior of JavaScript's [Array.includes](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes).\n\n```javascript\n[1, 2, 3].includes(2); // true\n[1, 2, 3].includes(4); // false\n[1, 2, 3].includes(3, 2); // true\n[1, 2, 3].includes(3, 3); // false\n[1, 2, 3].includes(3, -1); // true\n[1, 2, 3].includes(1, -1); // false\n[1, 2, 3].includes(1, -4); // true\n[1, 2, NaN].includes(NaN); // true\n```", + "itemtype": "method", + "name": "includes", + "params": [ + { + "name": "object", + "description": "The object to search for.", + "type": "Object" + }, + { + "name": "startAt", + "description": "optional starting location to search, default 0", + "type": "Number" + } + ], + "return": { + "description": "`true` if object is found in the array.", + "type": "Boolean" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1125, + "description": "Sorts the array by the keys specified in the argument.\n\nYou may provide multiple arguments to sort by multiple properties.\n\n```javascript\n let colors = [\n { name: 'red', weight: 500 },\n { name: 'green', weight: 600 },\n { name: 'blue', weight: 500 }\n];\n\n colors.sortBy('name');\n // [{name: 'blue', weight: 500}, {name: 'green', weight: 600}, {name: 'red', weight: 500}]\n\n colors.sortBy('weight', 'name');\n // [{name: 'blue', weight: 500}, {name: 'red', weight: 500}, {name: 'green', weight: 600}]\n ```", + "itemtype": "method", + "name": "sortBy", + "params": [ + { + "name": "property", + "description": "name(s) to sort on", + "type": "String" + } + ], + "return": { + "description": "The sorted array.", + "type": "Array" + }, + "since": "1.2.0", + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1150, + "description": "Returns a new array that contains only unique values. The default\nimplementation returns an array regardless of the receiver type.\n\n```javascript\nlet arr = ['a', 'a', 'b', 'b'];\narr.uniq(); // ['a', 'b']\n```\n\nThis only works on primitive data types, e.g. Strings, Numbers, etc.", + "itemtype": "method", + "name": "uniq", + "return": { + "description": "", + "type": "EmberArray" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1166, + "description": "Returns a new array that contains only items containing a unique property value.\nThe default implementation returns an array regardless of the receiver type.\n\n```javascript\nlet arr = [{ value: 'a' }, { value: 'a' }, { value: 'b' }, { value: 'b' }];\narr.uniqBy('value'); // [{ value: 'a' }, { value: 'b' }]\n\nlet arr = [2.2, 2.1, 3.2, 3.3];\narr.uniqBy(Math.floor); // [2.2, 3.2];\n```", + "itemtype": "method", + "name": "uniqBy", + "params": [ + { + "name": "key", + "description": "", + "type": "String,Function" + } + ], + "return": { + "description": "", + "type": "EmberArray" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1185, + "description": "Returns a new array that excludes the passed value. The default\nimplementation returns an array regardless of the receiver type.\nIf the receiver does not contain the value it returns the original array.\n\n```javascript\nlet arr = ['a', 'b', 'a', 'c'];\narr.without('a'); // ['b', 'c']\n```", + "itemtype": "method", + "name": "without", + "params": [ + { + "name": "value", + "description": "", + "type": "Object" + } + ], + "return": { + "description": "", + "type": "EmberArray" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + } + ], + "events": [], + "properties": [ + { + "file": "packages/@ember/array/index.ts", + "line": 253, + "description": "__Required.__ You must implement this method to apply this mixin.\n\nYour array must support the `length` property. Your replace methods should\nset this property whenever it changes.", + "itemtype": "property", + "name": "length", + "type": "Number", + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 304, + "description": "This is the handler for the special array content property. If you get\nthis property, it will return this. If you set this property to a new\narray, it will replace the current content.\n\n```javascript\nlet peopleToMoon = ['Armstrong', 'Aldrin'];\n\npeopleToMoon.get('[]'); // ['Armstrong', 'Aldrin']\n\npeopleToMoon.set('[]', ['Collins']); // ['Collins']\npeopleToMoon.get('[]'); // ['Collins']\n```", + "itemtype": "property", + "name": "[]", + "return": { + "description": "this" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 324, + "description": "The first object in the array, or `undefined` if the array is empty.\n\n```javascript\nlet vowels = ['a', 'e', 'i', 'o', 'u'];\nvowels.firstObject; // 'a'\n\nvowels.shiftObject();\nvowels.firstObject; // 'e'\n\nvowels.reverseObjects();\nvowels.firstObject; // 'u'\n\nvowels.clear();\nvowels.firstObject; // undefined\n```", + "itemtype": "property", + "name": "firstObject", + "return": { + "description": "The first object in the array", + "type": "Object | undefined" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 346, + "description": "The last object in the array, or `undefined` if the array is empty.", + "itemtype": "property", + "name": "lastObject", + "return": { + "description": "The last object in the array", + "type": "Object | undefined" + }, + "access": "public", + "tagname": "", + "class": "Ember.NativeArray", + "module": "@ember/array", + "inherited": true, + "inheritedFrom": "EmberArray" + } + ] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-ember", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.ProxyMixin.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.ProxyMixin.json new file mode 100644 index 000000000..e820192c8 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.ProxyMixin.json @@ -0,0 +1,76 @@ +{ + "data": { + "id": "ember-5.12.0-Ember.ProxyMixin", + "type": "class", + "attributes": { + "name": "Ember.ProxyMixin", + "shortname": "Ember.ProxyMixin", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [ + "ObjectProxy" + ], + "module": "ember", + "namespace": "Ember", + "file": "packages/@ember/-internals/runtime/lib/mixins/-proxy.ts", + "line": 63, + "description": "`Ember.ProxyMixin` forwards all properties not defined by the proxy itself\nto a proxied `content` object. See ObjectProxy for more details.", + "access": "private", + "tagname": "", + "methods": [], + "events": [], + "properties": [ + { + "file": "packages/@ember/-internals/runtime/lib/mixins/-proxy.ts", + "line": 72, + "description": "The object whose properties will be forwarded.", + "itemtype": "property", + "name": "content", + "type": "{unknown}", + "default": "null", + "access": "public", + "tagname": "", + "class": "Ember.ProxyMixin", + "module": "ember", + "namespace": "Ember" + }, + { + "file": "packages/@ember/-internals/runtime/lib/mixins/-proxy.ts", + "line": 94, + "description": "The object whose properties will be forwarded.", + "itemtype": "property", + "name": "content", + "type": "{unknown}", + "default": "null", + "access": "public", + "tagname": "", + "class": "Ember.ProxyMixin", + "module": "ember", + "namespace": "Ember" + } + ] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-ember", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.String.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.String.json new file mode 100644 index 000000000..2d2875859 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.String.json @@ -0,0 +1,92 @@ +{ + "data": { + "id": "ember-5.12.0-Ember.String", + "type": "class", + "attributes": { + "name": "Ember.String", + "shortname": "String", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "ember", + "namespace": "Ember", + "file": "packages/@ember/-internals/string/index.ts", + "line": 42, + "description": "Defines string helper methods used internally in ember-source.", + "access": "private", + "tagname": "", + "methods": [ + { + "file": "packages/@ember/-internals/string/index.ts", + "line": 49, + "description": "Replaces underscores, spaces, or camelCase with dashes.\n\n```javascript\nimport { dasherize } from '@ember/-internals/string';\n\ndasherize('innerHTML'); // 'inner-html'\ndasherize('action_name'); // 'action-name'\ndasherize('css-class-name'); // 'css-class-name'\ndasherize('my favorite items'); // 'my-favorite-items'\ndasherize('privateDocs/ownerInvoice'; // 'private-docs/owner-invoice'\n```", + "itemtype": "method", + "name": "dasherize", + "params": [ + { + "name": "str", + "description": "The string to dasherize.", + "type": "String" + } + ], + "return": { + "description": "the dasherized string.", + "type": "String" + }, + "access": "private", + "tagname": "", + "class": "Ember.String", + "module": "ember", + "namespace": "Ember" + }, + { + "file": "packages/@ember/-internals/string/index.ts", + "line": 71, + "description": "Returns the UpperCamelCase form of a string.\n\n```javascript\nimport { classify } from '@ember/string';\n\nclassify('innerHTML'); // 'InnerHTML'\nclassify('action_name'); // 'ActionName'\nclassify('css-class-name'); // 'CssClassName'\nclassify('my favorite items'); // 'MyFavoriteItems'\nclassify('private-docs/owner-invoice'); // 'PrivateDocs/OwnerInvoice'\n```", + "itemtype": "method", + "name": "classify", + "params": [ + { + "name": "str", + "description": "the string to classify", + "type": "String" + } + ], + "return": { + "description": "the classified string", + "type": "String" + }, + "access": "private", + "tagname": "", + "class": "Ember.String", + "module": "ember", + "namespace": "Ember" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-ember", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.TargetActionSupport.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.TargetActionSupport.json new file mode 100644 index 000000000..7bf22b699 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.TargetActionSupport.json @@ -0,0 +1,101 @@ +{ + "data": { + "id": "ember-5.12.0-Ember.TargetActionSupport", + "type": "class", + "attributes": { + "name": "Ember.TargetActionSupport", + "shortname": "Ember.TargetActionSupport", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [ + "Component" + ], + "module": "ember", + "namespace": "Ember", + "file": "packages/@ember/-internals/runtime/lib/mixins/target_action_support.ts", + "line": 11, + "description": "`Ember.TargetActionSupport` is a mixin that can be included in a class\nto add a `triggerAction` method with semantics similar to the Handlebars\n`{{action}}` helper. In normal Ember usage, the `{{action}}` helper is\nusually the best choice. This mixin is most often useful when you are\ndoing more complex event handling in Components.", + "extends": "Mixin", + "access": "private", + "tagname": "", + "methods": [ + { + "file": "packages/@ember/-internals/runtime/lib/mixins/target_action_support.ts", + "line": 52, + "description": "Send an `action` with an `actionContext` to a `target`. The action, actionContext\nand target will be retrieved from properties of the object. For example:\n\n```javascript\nimport { alias } from '@ember/object/computed';\n\nApp.SaveButtonView = Ember.View.extend(Ember.TargetActionSupport, {\n target: alias('controller'),\n action: 'save',\n actionContext: alias('context'),\n click() {\n this.triggerAction(); // Sends the `save` action, along with the current context\n // to the current controller\n }\n});\n```\n\nThe `target`, `action`, and `actionContext` can be provided as properties of\nan optional object argument to `triggerAction` as well.\n\n```javascript\nApp.SaveButtonView = Ember.View.extend(Ember.TargetActionSupport, {\n click() {\n this.triggerAction({\n action: 'save',\n target: this.get('controller'),\n actionContext: this.get('context')\n }); // Sends the `save` action, along with the current context\n // to the current controller\n }\n});\n```\n\nThe `actionContext` defaults to the object you are mixing `TargetActionSupport` into.\nBut `target` and `action` must be specified either as properties or with the argument\nto `triggerAction`, or a combination:\n\n```javascript\nimport { alias } from '@ember/object/computed';\n\nApp.SaveButtonView = Ember.View.extend(Ember.TargetActionSupport, {\n target: alias('controller'),\n click() {\n this.triggerAction({\n action: 'save'\n }); // Sends the `save` action, along with a reference to `this`,\n // to the current controller\n }\n});\n```", + "itemtype": "method", + "name": "triggerAction", + "params": [ + { + "name": "opts", + "description": "(optional, with the optional keys action, target and/or actionContext)", + "type": "Object" + } + ], + "return": { + "description": "true if the action was sent successfully and did not return false", + "type": "Boolean" + }, + "access": "private", + "tagname": "", + "class": "Ember.TargetActionSupport", + "module": "ember", + "namespace": "Ember" + }, + { + "file": "packages/@ember/object/mixin.ts", + "line": 440, + "itemtype": "method", + "name": "mixin", + "params": [ + { + "name": "obj", + "description": "" + }, + { + "name": "mixins", + "description": "", + "multiple": true + } + ], + "return": { + "description": "obj" + }, + "access": "private", + "tagname": "", + "class": "Ember.TargetActionSupport", + "module": "@ember/object/mixin", + "inherited": true, + "inheritedFrom": "Mixin" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": { + "id": "ember-5.12.0-Mixin", + "type": "class" + } + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-ember", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.Templates.components.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.Templates.components.json new file mode 100644 index 000000000..5cfdc7038 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.Templates.components.json @@ -0,0 +1,81 @@ +{ + "data": { + "id": "ember-5.12.0-Ember.Templates.components", + "type": "class", + "attributes": { + "name": "Ember.Templates.components", + "shortname": "Ember.Templates.components", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/routing", + "namespace": "", + "methods": [ + { + "file": "packages/@ember/-internals/glimmer/lib/components/input.ts", + "line": 67, + "description": "The `Input` component lets you create an HTML `` element.\n\n```handlebars\n\n```\n\ncreates an `` element with `type=\"text\"` and value set to 987.\n\n### Text field\n\nIf no `type` argument is specified, a default of type 'text' is used.\n\n```handlebars\nSearch:\n\n```\n\nIn this example, the initial value in the `` will be set to the value of\n`this.searchWord`. If the user changes the text, the value of `this.searchWord` will also be\nupdated.\n\n### Actions\n\nThe `Input` component takes a number of arguments with callbacks that are invoked in response to\nuser events.\n\n* `enter`\n* `insert-newline`\n* `escape-press`\n* `focus-in`\n* `focus-out`\n* `key-down`\n* `key-press`\n* `key-up`\n\nThese callbacks are passed to `Input` like this:\n\n```handlebars\n\n```\n\nStarting with Ember Octane, we recommend using the `{{on}}` modifier to call actions\non specific events, such as the input event.\n\n```handlebars\nName:\n\n```\n\nThe event name (e.g. `focusout`, `input`, `keydown`) always follows the casing\nthat the HTML standard uses.\n\n### `` HTML Attributes to Avoid\n\nIn most cases, if you want to pass an attribute to the underlying HTML `` element, you\ncan pass the attribute directly, just like any other Ember component.\n\n```handlebars\n\n```\n\nIn this example, the `size` attribute will be applied to the underlying `` element in the\noutputted HTML.\n\nHowever, there are a few attributes where you **must** use the `@` version.\n\n* `@type`: This argument is used to control which Ember component is used under the hood\n* `@value`: The `@value` argument installs a two-way binding onto the element. If you wanted a\n one-way binding, use `` with the `value` property and the `input` event instead.\n* `@checked` (for checkboxes): like `@value`, the `@checked` argument installs a two-way binding\n onto the element. If you wanted a one-way binding, use `` with\n `checked` and the `input` event instead.\n\n### Checkbox\n\nTo create an ``:\n\n```handlebars\nEmberize Everything:\n\n```\n\nThis will bind the checked state of this checkbox to the value of `isEmberized` -- if either one\nchanges, it will be reflected in the other.", + "itemtype": "method", + "name": "Input", + "params": [ + { + "name": "options", + "description": "", + "type": "Hash" + } + ], + "access": "public", + "tagname": "", + "class": "Ember.Templates.components", + "module": "@ember/component" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/components/link-to.ts", + "line": 44, + "description": "The `LinkTo` component renders a link to the supplied `routeName` passing an optionally\nsupplied model to the route as its `model` context of the route. The block for `LinkTo`\nbecomes the contents of the rendered element:\n\n```handlebars\n\n Great Hamster Photos\n\n```\n\nThis will result in:\n\n```html\n\n Great Hamster Photos\n\n```\n\n### Disabling the `LinkTo` component\n\nThe `LinkTo` component can be disabled by using the `disabled` argument. A disabled link\ndoesn't result in a transition when activated, and adds the `disabled` class to the ``\nelement.\n\n(The class name to apply to the element can be overridden by using the `disabledClass`\nargument)\n\n```handlebars\n\n Great Hamster Photos\n\n```\n\n### Handling `href`\n\n`` will use your application's Router to fill the element's `href` property with a URL\nthat matches the path to the supplied `routeName`.\n\n### Handling current route\n\nThe `LinkTo` component will apply a CSS class name of 'active' when the application's current\nroute matches the supplied routeName. For example, if the application's current route is\n'photoGallery.recent', then the following invocation of `LinkTo`:\n\n```handlebars\n\n Great Hamster Photos\n\n```\n\nwill result in\n\n```html\n\n Great Hamster Photos\n\n```\n\nThe CSS class used for active classes can be customized by passing an `activeClass` argument:\n\n```handlebars\n\n Great Hamster Photos\n\n```\n\n```html\n\n Great Hamster Photos\n\n```\n\n### Keeping a link active for other routes\n\nIf you need a link to be 'active' even when it doesn't match the current route, you can use the\n`current-when` argument.\n\n```handlebars\n\n Photo Gallery\n\n```\n\nThis may be helpful for keeping links active for:\n\n* non-nested routes that are logically related\n* some secondary menu approaches\n* 'top navigation' with 'sub navigation' scenarios\n\nA link will be active if `current-when` is `true` or the current\nroute is the route this link would transition to.\n\nTo match multiple routes 'space-separate' the routes:\n\n```handlebars\n\n Art Gallery\n\n```\n\n### Supplying a model\n\nAn optional `model` argument can be used for routes whose\npaths contain dynamic segments. This argument will become\nthe model context of the linked route:\n\n```javascript\nRouter.map(function() {\n this.route(\"photoGallery\", {path: \"hamster-photos/:photo_id\"});\n});\n```\n\n```handlebars\n\n {{aPhoto.title}}\n\n```\n\n```html\n\n Tomster\n\n```\n\n### Supplying multiple models\n\nFor deep-linking to route paths that contain multiple\ndynamic segments, the `models` argument can be used.\n\nAs the router transitions through the route path, each\nsupplied model argument will become the context for the\nroute with the dynamic segments:\n\n```javascript\nRouter.map(function() {\n this.route(\"photoGallery\", { path: \"hamster-photos/:photo_id\" }, function() {\n this.route(\"comment\", {path: \"comments/:comment_id\"});\n });\n});\n```\n\nThis argument will become the model context of the linked route:\n\n```handlebars\n\n {{comment.body}}\n\n```\n\n```html\n\n A+++ would snuggle again.\n\n```\n\n### Supplying an explicit dynamic segment value\n\nIf you don't have a model object available to pass to `LinkTo`,\nan optional string or integer argument can be passed for routes whose\npaths contain dynamic segments. This argument will become the value\nof the dynamic segment:\n\n```javascript\nRouter.map(function() {\n this.route(\"photoGallery\", { path: \"hamster-photos/:photo_id\" });\n});\n```\n\n```handlebars\n\n {{this.aPhoto.title}}\n\n```\n\n```html\n\n Tomster\n\n```\n\nWhen transitioning into the linked route, the `model` hook will\nbe triggered with parameters including this passed identifier.\n\n### Supplying query parameters\n\nIf you need to add optional key-value pairs that appear to the right of the ? in a URL,\nyou can use the `query` argument.\n\n```handlebars\n\n Great Hamster Photos\n\n```\n\nThis will result in:\n\n```html\n\n Great Hamster Photos\n\n```", + "itemtype": "method", + "name": "LinkTo", + "access": "public", + "tagname": "", + "class": "Ember.Templates.components", + "module": "@ember/component" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/components/textarea.ts", + "line": 10, + "description": "The `Textarea` component inserts a new instance of `` tag into the template.\n\nThe `@value` argument provides the content of the ``.\n\nThis template:\n\n```handlebars\n\n```\n\nWould result in the following HTML:\n\n```html\n\n A bunch of text\n\n```\n\nThe `@value` argument is two-way bound. If the user types text into the textarea, the `@value`\nargument is updated. If the `@value` argument is updated, the text in the textarea is updated.\n\nIn the following example, the `writtenWords` property on the component will be updated as the user\ntypes 'Lots of text' into the text area of their browser's window.\n\n```js {data-filename=app/components/word-editor.js}\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\n\nexport default class WordEditorComponent extends Component {\n @tracked writtenWords = \"Lots of text that IS bound\";\n}\n```\n\n```handlebars\n\n```\n\nWould result in the following HTML:\n\n```html\n\n Lots of text that IS bound\n\n```\n\nIf you wanted a one way binding, you could use the `` element directly, and use the\n`value` DOM property and the `input` event.\n\n### Actions\n\nThe `Textarea` component takes a number of arguments with callbacks that are invoked in\nresponse to user events.\n\n* `enter`\n* `insert-newline`\n* `escape-press`\n* `focus-in`\n* `focus-out`\n* `key-press`\n\nThese callbacks are passed to `Textarea` like this:\n\n```handlebars\n\n```\n\n## Classic Invocation Syntax\n\nThe `Textarea` component can also be invoked using curly braces, just like any other Ember\ncomponent.\n\nFor example, this is an invocation using angle-bracket notation:\n\n```handlebars\n\n```\n\nYou could accomplish the same thing using classic invocation:\n\n```handlebars\n{{textarea value=this.searchWord enter=this.query}}\n```\n\nThe main difference is that angle-bracket invocation supports any HTML attribute using HTML\nattribute syntax, because attributes and arguments have different syntax when using angle-bracket\ninvocation. Curly brace invocation, on the other hand, only has a single syntax for arguments,\nand components must manually map attributes onto component arguments.\n\nWhen using classic invocation with `{{textarea}}`, only the following attributes are mapped onto\narguments:\n\n* rows\n* cols\n* name\n* selectionEnd\n* selectionStart\n* autocomplete\n* wrap\n* lang\n* dir\n* value\n\n## Classic `layout` and `layoutName` properties\n\nBecause HTML `textarea` elements do not contain inner HTML the `layout` and\n`layoutName` properties will not be applied.", + "itemtype": "method", + "name": "Textarea", + "access": "public", + "tagname": "", + "class": "Ember.Templates.components", + "module": "@ember/component" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/routing", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.Templates.helpers.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.Templates.helpers.json new file mode 100644 index 000000000..bb76069ec --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.Templates.helpers.json @@ -0,0 +1,427 @@ +{ + "data": { + "id": "ember-5.12.0-Ember.Templates.helpers", + "type": "class", + "attributes": { + "name": "Ember.Templates.helpers", + "shortname": "Ember.Templates.helpers", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "ember", + "namespace": "", + "file": "packages/@ember/-internals/glimmer/index.ts", + "line": 86, + "access": "public", + "tagname": "", + "methods": [ + { + "file": "packages/@ember/-internals/glimmer/lib/components/input.ts", + "line": 46, + "description": "See [Ember.Templates.components.Input](/ember/release/classes/Ember.Templates.components/methods/Input?anchor=Input).", + "itemtype": "method", + "name": "input", + "params": [ + { + "name": "options", + "description": "", + "type": "Hash" + } + ], + "access": "public", + "tagname": "", + "class": "Ember.Templates.helpers", + "module": "@ember/component" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/components/link-to.ts", + "line": 256, + "description": "See [Ember.Templates.components.LinkTo](/ember/release/classes/Ember.Templates.components/methods/input?anchor=LinkTo).", + "itemtype": "method", + "name": "link-to", + "see": [ + "{Ember.Templates.components.LinkTo}" + ], + "access": "public", + "tagname": "", + "class": "Ember.Templates.helpers", + "module": "@ember/routing" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/components/textarea.ts", + "line": 123, + "description": "See [Ember.Templates.components.Textarea](/ember/release/classes/Ember.Templates.components/methods/Textarea?anchor=Textarea)", + "itemtype": "method", + "name": "textarea", + "see": [ + "{Ember.Templates.components.Textarea}" + ], + "access": "public", + "tagname": "", + "class": "Ember.Templates.helpers", + "module": "@ember/component" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/helpers/action.ts", + "line": 18, + "description": "The `{{action}}` helper provides a way to pass triggers for behavior (usually\njust a function) between components, and into components from controllers.\n\n### Passing functions with the action helper\n\nThere are three contexts an action helper can be used in. The first two\ncontexts to discuss are attribute context, and Handlebars value context.\n\n```handlebars\n{{! An example of attribute context }}\n\n{{! Examples of Handlebars value context }}\n{{input on-input=(action \"save\")}}\n{{yield (action \"refreshData\") andAnotherParam}}\n```\n\nIn these contexts,\nthe helper is called a \"closure action\" helper. Its behavior is simple:\nIf passed a function name, read that function off the `actions` property\nof the current context. Once that function is read, or immediately if a function was\npassed, create a closure over that function and any arguments.\nThe resulting value of an action helper used this way is simply a function.\n\nFor example, in the attribute context:\n\n```handlebars\n{{! An example of attribute context }}\n\n```\n\nThe resulting template render logic would be:\n\n```js\nvar div = document.createElement('div');\nvar actionFunction = (function(context){\n return function() {\n return context.actions.save.apply(context, arguments);\n };\n})(context);\ndiv.onclick = actionFunction;\n```\n\nThus when the div is clicked, the action on that context is called.\nBecause the `actionFunction` is just a function, closure actions can be\npassed between components and still execute in the correct context.\n\nHere is an example action handler on a component:\n\n```js {data-filename=app/components/my-component.js}\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\n\nexport default class extends Component {\n @action\n save() {\n this.model.save();\n }\n}\n```\n\nActions are always looked up on the `actions` property of the current context.\nThis avoids collisions in the naming of common actions, such as `destroy`.\nTwo options can be passed to the `action` helper when it is used in this way.\n\n* `target=someProperty` will look to `someProperty` instead of the current\n context for the `actions` hash. This can be useful when targeting a\n service for actions.\n* `value=\"target.value\"` will read the path `target.value` off the first\n argument to the action when it is called and rewrite the first argument\n to be that value. This is useful when attaching actions to event listeners.\n\n### Invoking an action\n\nClosure actions curry both their scope and any arguments. When invoked, any\nadditional arguments are added to the already curried list.\nActions are presented in JavaScript as callbacks, and are\ninvoked like any other JavaScript function.\n\nFor example\n\n```js {data-filename=app/components/update-name.js}\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\n\nexport default class extends Component {\n @action\n setName(model, name) {\n model.set('name', name);\n }\n}\n```\n\n```handlebars {data-filename=app/components/update-name.hbs}\n{{input on-input=(action (action 'setName' @model) value=\"target.value\")}}\n```\n\nThe first argument (`@model`) was curried over, and the run-time argument (`event`)\nbecomes a second argument. Action calls can be nested this way because each simply\nreturns a function. Any function can be passed to the `{{action}}` helper, including\nother actions.\n\nActions invoked with `sendAction` have the same currying behavior as demonstrated\nwith `on-input` above. For example:\n\n```js {data-filename=app/components/my-input.js}\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\n\nexport default class extends Component {\n @action\n setName(model, name) {\n model.set('name', name);\n }\n}\n```\n\n```handlebars\n\n```\n\nor\n\n```handlebars\n{{my-input submit=(action 'setName' @model)}}\n```\n\n```js {data-filename=app/components/my-component.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n click() {\n // Note that model is not passed, it was curried in the template\n this.submit('bob');\n }\n});\n```\n\n### Attaching actions to DOM elements\n\nThe third context of the `{{action}}` helper can be called \"element space\".\nFor example:\n\n```handlebars\n{{! An example of element space }}\n\n```\n\nUsed this way, the `{{action}}` helper provides a useful shortcut for\nregistering an HTML element in a template for a single DOM event and\nforwarding that interaction to the template's context (controller or component).\nIf the context of a template is a controller, actions used this way will\nbubble to routes when the controller does not implement the specified action.\nOnce an action hits a route, it will bubble through the route hierarchy.\n\n### Event Propagation\n\n`{{action}}` helpers called in element space can control event bubbling. Note\nthat the closure style actions cannot.\n\nEvents triggered through the action helper will automatically have\n`.preventDefault()` called on them. You do not need to do so in your event\nhandlers. If you need to allow event propagation (to handle file inputs for\nexample) you can supply the `preventDefault=false` option to the `{{action}}` helper:\n\n```handlebars\n\n \n \n\n```\n\nTo disable bubbling, pass `bubbles=false` to the helper:\n\n```handlebars\nEdit\n```\n\nTo disable bubbling with closure style actions you must create your own\nwrapper helper that makes use of `event.stopPropagation()`:\n\n```handlebars\nHello\n```\n\n```js {data-filename=app/helpers/disable-bubbling.js}\nimport { helper } from '@ember/component/helper';\n\nexport function disableBubbling([action]) {\n return function(event) {\n event.stopPropagation();\n return action(event);\n };\n}\nexport default helper(disableBubbling);\n```\n\nIf you need the default handler to trigger you should either register your\nown event handler, or use event methods on your view class. See\n[\"Responding to Browser Events\"](/ember/release/classes/Component)\nin the documentation for `Component` for more information.\n\n### Specifying DOM event type\n\n`{{action}}` helpers called in element space can specify an event type.\nBy default the `{{action}}` helper registers for DOM `click` events. You can\nsupply an `on` option to the helper to specify a different DOM event name:\n\n```handlebars\n\n click me\n\n```\n\nSee [\"Event Names\"](/ember/release/classes/Component) for a list of\nacceptable DOM event names.\n\n### Specifying whitelisted modifier keys\n\n`{{action}}` helpers called in element space can specify modifier keys.\nBy default the `{{action}}` helper will ignore click events with pressed modifier\nkeys. You can supply an `allowedKeys` option to specify which keys should not be ignored.\n\n```handlebars\n\n click me\n\n```\n\nThis way the action will fire when clicking with the alt key pressed down.\nAlternatively, supply \"any\" to the `allowedKeys` option to accept any combination of modifier keys.\n\n```handlebars\n\n click me with any key pressed\n\n```\n\n### Specifying a Target\n\nA `target` option can be provided to the helper to change\nwhich object will receive the method call. This option must be a path\nto an object, accessible in the current context:\n\n```handlebars {data-filename=app/templates/application.hbs}\n\n click me\n\n```\n\n```js {data-filename=app/controllers/application.js}\nimport Controller from '@ember/controller';\nimport { service } from '@ember/service';\n\nexport default class extends Controller {\n @service someService;\n}\n```", + "itemtype": "method", + "name": "action", + "deprecated": true, + "access": "public", + "tagname": "", + "class": "Ember.Templates.helpers", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/helpers/component.ts", + "line": 5, + "description": "The `{{component}}` helper lets you add instances of `Component` to a\ntemplate. See [Component](/ember/release/classes/Component) for\nadditional information on how a `Component` functions.\n`{{component}}`'s primary use is for cases where you want to dynamically\nchange which type of component is rendered as the state of your application\nchanges. This helper has three modes: inline, block, and nested.\n\n### Inline Form\n\nGiven the following template:\n\n```handlebars {data-filename=app/application.hbs}\n{{component this.infographicComponentName}}\n```\n\nAnd the following application code:\n\n```js {data-filename=app/controllers/application.js}\nimport Controller from '@ember/controller';\nimport { tracked } from '@glimmer/tracking';\n\nexport default class ApplicationController extends Controller {\n @tracked isMarketOpen = 'live-updating-chart'\n\n get infographicComponentName() {\n return this.isMarketOpen ? 'live-updating-chart' : 'market-close-summary';\n }\n}\n```\n\nThe `live-updating-chart` component will be appended when `isMarketOpen` is\n`true`, and the `market-close-summary` component will be appended when\n`isMarketOpen` is `false`. If the value changes while the app is running,\nthe component will be automatically swapped out accordingly.\nNote: You should not use this helper when you are consistently rendering the same\ncomponent. In that case, use standard component syntax, for example:\n\n```handlebars {data-filename=app/templates/application.hbs}\n\n```\n\nor\n\n```handlebars {data-filename=app/templates/application.hbs}\n{{live-updating-chart}}\n```\n\n### Block Form\n\nUsing the block form of this helper is similar to using the block form\nof a component. Given the following application template:\n\n```handlebars {data-filename=app/templates/application.hbs}\n{{#component this.infographicComponentName}}\n Last update: {{this.lastUpdateTimestamp}}\n{{/component}}\n```\n\nThe following controller code:\n\n```js {data-filename=app/controllers/application.js}\nimport Controller from '@ember/controller';\nimport { computed } from '@ember/object';\nimport { tracked } from '@glimmer/tracking';\n\nexport default class ApplicationController extends Controller {\n @tracked isMarketOpen = 'live-updating-chart'\n\n get lastUpdateTimestamp() {\n return new Date();\n }\n\n get infographicComponentName() {\n return this.isMarketOpen ? 'live-updating-chart' : 'market-close-summary';\n }\n}\n```\n\nAnd the following component template:\n\n```handlebars {data-filename=app/templates/components/live-updating-chart.hbs}\n{{! chart }}\n{{yield}}\n```\n\nThe `Last Update: {{this.lastUpdateTimestamp}}` will be rendered in place of the `{{yield}}`.\n\n### Nested Usage\n\nThe `component` helper can be used to package a component path with initial attrs.\nThe included attrs can then be merged during the final invocation.\nFor example, given a `person-form` component with the following template:\n\n```handlebars {data-filename=app/templates/components/person-form.hbs}\n{{yield (hash\n nameInput=(component \"my-input-component\" value=@model.name placeholder=\"First Name\")\n)}}\n```\n\nWhen yielding the component via the `hash` helper, the component is invoked directly.\nSee the following snippet:\n\n```\n\n \n\n```\n\nor\n```\n{{#person-form as |form|}}\n {{form.nameInput placeholder=\"Username\"}}\n{{/person-form}}\n```\n\nWhich outputs an input whose value is already bound to `model.name` and `placeholder`\nis \"Username\".\n\nWhen yielding the component without the `hash` helper use the `component` helper.\nFor example, below is a `full-name` component template:\n\n```handlebars\n{{yield (component \"my-input-component\" value=@model.name placeholder=\"Name\")}}\n```\n\n```\n\n {{component field placeholder=\"Full name\"}}\n\n```\nor\n```\n{{#full-name as |field|}}\n {{component field placeholder=\"Full name\"}}\n{{/full-name}}\n```", + "itemtype": "method", + "name": "component", + "since": "1.11.0", + "access": "public", + "tagname": "", + "class": "Ember.Templates.helpers", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/helpers/each-in.ts", + "line": 13, + "description": "The `{{#each}}` helper loops over elements in a collection. It is an extension\nof the base Handlebars `{{#each}}` helper.\n\nThe default behavior of `{{#each}}` is to yield its inner block once for every\nitem in an array passing the item as the first block parameter.\n\nAssuming the `@developers` argument contains this array:\n\n```javascript\n[{ name: 'Yehuda' },{ name: 'Tom' }, { name: 'Paul' }];\n```\n\n```handlebars\n\n {{#each @developers as |person|}}\n Hello, {{person.name}}!\n {{/each}}\n\n```\n\nThe same rules apply to arrays of primitives.\n\n```javascript\n['Yehuda', 'Tom', 'Paul']\n```\n\n```handlebars\n\n {{#each @developerNames as |name|}}\n Hello, {{name}}!\n {{/each}}\n\n```\n\nDuring iteration, the index of each item in the array is provided as a second block\nparameter.\n\n```handlebars\n\n {{#each @developers as |person index|}}\n Hello, {{person.name}}! You're number {{index}} in line\n {{/each}}\n\n```\n\n### Specifying Keys\n\nIn order to improve rendering speed, Ember will try to reuse the DOM elements\nwhere possible. Specifically, if the same item is present in the array both\nbefore and after the change, its DOM output will be reused.\n\nThe `key` option is used to tell Ember how to determine if the items in the\narray being iterated over with `{{#each}}` has changed between renders. By\ndefault the item's object identity is used.\n\nThis is usually sufficient, so in most cases, the `key` option is simply not\nneeded. However, in some rare cases, the objects' identities may change even\nthough they represent the same underlying data.\n\nFor example:\n\n```javascript\npeople.map(person => {\n return { ...person, type: 'developer' };\n});\n```\n\nIn this case, each time the `people` array is `map`-ed over, it will produce\nan new array with completely different objects between renders. In these cases,\nyou can help Ember determine how these objects related to each other with the\n`key` option:\n\n```handlebars\n\n {{#each @developers key=\"name\" as |person|}}\n Hello, {{person.name}}!\n {{/each}}\n\n```\n\nBy doing so, Ember will use the value of the property specified (`person.name`\nin the example) to find a \"match\" from the previous render. That is, if Ember\nhas previously seen an object from the `@developers` array with a matching\nname, its DOM elements will be re-used.\n\nThere are two special values for `key`:\n\n * `@index` - The index of the item in the array.\n * `@identity` - The item in the array itself.\n\n### {{else}} condition\n\n`{{#each}}` can have a matching `{{else}}`. The contents of this block will render\nif the collection is empty.\n\n```handlebars\n\n {{#each @developers as |person|}}\n {{person.name}} is available!\n {{else}}\n Sorry, nobody is available for this task.\n {{/each}}\n\n```", + "itemtype": "method", + "name": "each", + "access": "public", + "tagname": "", + "class": "Ember.Templates.helpers", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/helpers/each-in.ts", + "line": 124, + "description": "The `{{each-in}}` helper loops over properties on an object.\n\nFor example, given this component definition:\n\n```js {data-filename=app/components/developer-details.js}\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\n\nexport default class extends Component {\n @tracked developer = {\n \"name\": \"Shelly Sails\",\n \"age\": 42\n };\n}\n```\n\nThis template would display all properties on the `developer`\nobject in a list:\n\n```handlebars {data-filename=app/components/developer-details.hbs}\n\n {{#each-in this.developer as |key value|}}\n {{key}}: {{value}}\n {{/each-in}}\n\n```\n\nOutputting their name and age:\n\n```html\n\n name: Shelly Sails\n age: 42\n\n```", + "itemtype": "method", + "name": "each-in", + "access": "public", + "tagname": "", + "since": "2.1.0", + "class": "Ember.Templates.helpers", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/helpers/helper.ts", + "line": 5, + "description": "Use the `{{helper}}` helper to create contextual helper so\nthat it can be passed around as first-class values in templates.\n\n```handlebars\n{{#let (helper \"join-words\" \"foo\" \"bar\" separator=\" \") as |foo-bar|}}\n\n {{!-- this is equivalent to invoking `{{join-words \"foo\" \"bar\" separator=\" \"}}` --}}\n {{foo-bar}}\n\n {{!-- this will pass the helper itself into the component, instead of invoking it now --}}\n \n\n {{!-- this will yield the helper itself (\"contextual helper\"), instead of invoking it now --}}\n {{yield foo-bar}}\n{{/let}}\n```\n\n### Arguments\n\nThe `{{helper}}` helper works similarly to the [`{{component}}`](./component?anchor=component) and\n[`{{modifier}}`](./modifier?anchor=modifier) helper:\n\n* When passed a string (e.g. `(helper \"foo\")`) as the first argument,\n it will produce an opaque, internal \"helper definition\" object\n that can be passed around and invoked elsewhere.\n\n* Any additional positional and/or named arguments (a.k.a. params and hash)\n will be stored (\"curried\") inside the definition object, such that, when invoked,\n these arguments will be passed along to the referenced helper.", + "itemtype": "method", + "name": "helper", + "access": "public", + "tagname": "", + "since": "3.27.0", + "class": "Ember.Templates.helpers", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/helpers/if-unless.ts", + "line": 5, + "description": "The `if` helper allows you to conditionally render one of two branches,\ndepending on the \"truthiness\" of a property.\nFor example the following values are all falsey: `false`, `undefined`, `null`, `\"\"`, `0`, `NaN` or an empty array.\n\nThis helper has two forms, block and inline.\n\n## Block form\n\nYou can use the block form of `if` to conditionally render a section of the template.\n\nTo use it, pass the conditional value to the `if` helper,\nusing the block form to wrap the section of template you want to conditionally render.\nLike so:\n\n```handlebars {data-filename=app/templates/application.hbs}\n\n```\n\n```handlebars {data-filename=app/components/weather.hbs}\n{{! will not render because greeting is undefined}}\n{{#if @isRaining}}\n Yes, grab an umbrella!\n{{/if}}\n```\n\nYou can also define what to show if the property is falsey by using\nthe `else` helper.\n\n```handlebars {data-filename=app/components/weather.hbs}\n{{#if @isRaining}}\n Yes, grab an umbrella!\n{{else}}\n No, it's lovely outside!\n{{/if}}\n```\n\nYou are also able to combine `else` and `if` helpers to create more complex\nconditional logic.\n\nFor the following template:\n\n ```handlebars {data-filename=app/components/weather.hbs}\n{{#if @isRaining}}\n Yes, grab an umbrella!\n{{else if @isCold}}\n Grab a coat, it's chilly!\n{{else}}\n No, it's lovely outside!\n{{/if}}\n```\n\nIf you call it by saying `isCold` is true:\n\n```handlebars {data-filename=app/templates/application.hbs}\n\n```\n\nThen `Grab a coat, it's chilly!` will be rendered.\n\n## Inline form\n\nThe inline `if` helper conditionally renders a single property or string.\n\nIn this form, the `if` helper receives three arguments, the conditional value,\nthe value to render when truthy, and the value to render when falsey.\n\nFor example, if `useLongGreeting` is truthy, the following:\n\n```handlebars {data-filename=app/templates/application.hbs}\n\n```\n\n```handlebars {data-filename=app/components/greeting.hbs}\n{{if @useLongGreeting \"Hello\" \"Hi\"}} Alex\n```\n\nWill render:\n\n```html\nHello Alex\n```\n\nOne detail to keep in mind is that both branches of the `if` helper will be evaluated,\nso if you have `{{if condition \"foo\" (expensive-operation \"bar\")`,\n`expensive-operation` will always calculate.", + "itemtype": "method", + "name": "if", + "access": "public", + "tagname": "", + "class": "Ember.Templates.helpers", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/helpers/if-unless.ts", + "line": 97, + "description": "The `unless` helper is the inverse of the `if` helper. It displays if a value\nis falsey (\"not true\" or \"is false\"). Example values that will display with\n`unless`: `false`, `undefined`, `null`, `\"\"`, `0`, `NaN` or an empty array.\n\n## Inline form\n\nThe inline `unless` helper conditionally renders a single property or string.\nThis helper acts like a ternary operator. If the first property is falsy,\nthe second argument will be displayed, otherwise, the third argument will be\ndisplayed\n\nFor example, if you pass a falsey `useLongGreeting` to the `Greeting` component:\n\n```handlebars {data-filename=app/templates/application.hbs}\n\n```\n\n```handlebars {data-filename=app/components/greeting.hbs}\n{{unless @useLongGreeting \"Hi\" \"Hello\"}} Ben\n```\n\nThen it will display:\n\n```html\nHi Ben\n```\n\n## Block form\n\nLike the `if` helper, the `unless` helper also has a block form.\n\nThe following will not render anything:\n\n```handlebars {data-filename=app/templates/application.hbs}\n\n```\n\n```handlebars {data-filename=app/components/greeting.hbs}\n{{#unless @greeting}}\n No greeting was found. Why not set one?\n{{/unless}}\n```\n\nYou can also use an `else` helper with the `unless` block. The\n`else` will display if the value is truthy.\n\nIf you have the following component:\n\n```handlebars {data-filename=app/components/logged-in.hbs}\n{{#unless @userData}}\n Please login.\n{{else}}\n Welcome back!\n{{/unless}}\n```\n\nCalling it with a truthy `userData`:\n\n```handlebars {data-filename=app/templates/application.hbs}\n\n```\n\nWill render:\n\n```html\nWelcome back!\n```\n\nand calling it with a falsey `userData`:\n\n```handlebars {data-filename=app/templates/application.hbs}\n\n```\n\nWill render:\n\n```html\nPlease login.\n```", + "itemtype": "method", + "name": "unless", + "access": "public", + "tagname": "", + "class": "Ember.Templates.helpers", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/helpers/log.ts", + "line": 5, + "description": "`log` allows you to output the value of variables in the current rendering\ncontext. `log` also accepts primitive types such as strings or numbers.\n\n```handlebars\n{{log \"myVariable:\" myVariable }}\n```", + "itemtype": "method", + "name": "log", + "params": [ + { + "name": "params", + "description": "", + "type": "Array" + } + ], + "access": "public", + "tagname": "", + "class": "Ember.Templates.helpers", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/helpers/modifier.ts", + "line": 5, + "description": "Use the `{{modifier}}` helper to create contextual modifier so\nthat it can be passed around as first-class values in templates.\n\n```handlebars\n{{#let (modifier \"click-outside\" click=this.submit) as |on-click-outside|}}\n\n {{!-- this is equivalent to `` --}}\n \n\n {{!-- this will pass the modifier itself into the component, instead of invoking it now --}}\n \n\n {{!-- this will yield the modifier itself (\"contextual modifier\"), instead of invoking it now --}}\n {{yield on-click-outside}}\n{{/let}}\n```\n\n### Arguments\n\nThe `{{modifier}}` helper works similarly to the [`{{component}}`](./component?anchor=component) and\n[`{{helper}}`](./helper?anchor=helper) helper:\n\n* When passed a string (e.g. `(modifier \"foo\")`) as the first argument,\n it will produce an opaque, internal \"modifier definition\" object\n that can be passed around and invoked elsewhere.\n\n* Any additional positional and/or named arguments (a.k.a. params and hash)\n will be stored (\"curried\") inside the definition object, such that, when invoked,\n these arguments will be passed along to the referenced modifier.", + "itemtype": "method", + "name": "modifier", + "access": "public", + "tagname": "", + "since": "3.27.0", + "class": "Ember.Templates.helpers", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/helpers/mut.ts", + "line": 9, + "description": "The `mut` helper lets you __clearly specify__ that a child `Component` can update the\n(mutable) value passed to it, which will __change the value of the parent component__.\n\nTo specify that a parameter is mutable, when invoking the child `Component`:\n\n```handlebars\n\n```\n\n or\n\n```handlebars\n{{my-child childClickCount=(mut totalClicks)}}\n```\n\nThe child `Component` can then modify the parent's value just by modifying its own\nproperty:\n\n```javascript\n// my-child.js\nexport default Component.extend({\n click() {\n this.incrementProperty('childClickCount');\n }\n});\n```\n\nNote that for curly components (`{{my-component}}`) the bindings are already mutable,\nmaking the `mut` unnecessary.\n\nAdditionally, the `mut` helper can be combined with the `fn` helper to\nmutate a value. For example:\n\n```handlebars\n\n```\n\nor\n\n```handlebars\n{{my-child childClickCount=totalClicks click-count-change=(fn (mut totalClicks))}}\n```\n\nThe child `Component` would invoke the function with the new click value:\n\n```javascript\n// my-child.js\nexport default Component.extend({\n click() {\n this.get('click-count-change')(this.get('childClickCount') + 1);\n }\n});\n```\n\nThe `mut` helper changes the `totalClicks` value to what was provided as the `fn` argument.\n\nThe `mut` helper, when used with `fn`, will return a function that\nsets the value passed to `mut` to its first argument. As an example, we can create a\nbutton that increments a value passing the value directly to the `fn`:\n\n```handlebars\n{{! inc helper is not provided by Ember }}\n\n Increment count\n\n```", + "itemtype": "method", + "name": "mut", + "params": [ + { + "name": "attr", + "description": "the \"two-way\" attribute that can be modified.", + "type": "Object", + "optional": true + } + ], + "access": "public", + "tagname": "", + "class": "Ember.Templates.helpers", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/helpers/page-title.ts", + "line": 5, + "description": "`page-title` allows you to set the title of any page in your application and\nappend additional titles for each route. For complete documentation, see\nhttps://github.com/ember-cli/ember-page-title.\n\n```handlebars\n{{page-title \"My Page Title\" }}\n```", + "itemtype": "method", + "name": "page-title", + "params": [ + { + "name": "param", + "description": "", + "type": "String" + } + ], + "access": "public", + "tagname": "", + "class": "Ember.Templates.helpers", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/helpers/readonly.ts", + "line": 9, + "description": "The `readonly` helper let's you specify that a binding is one-way only,\ninstead of two-way.\nWhen you pass a `readonly` binding from an outer context (e.g. parent component),\nto to an inner context (e.g. child component), you are saying that changing that\nproperty in the inner context does not change the value in the outer context.\n\nTo specify that a binding is read-only, when invoking the child `Component`:\n\n```js {data-filename=app/components/my-parent.js}\nexport default Component.extend({\n totalClicks: 3\n});\n```\n\n```handlebars {data-filename=app/templates/components/my-parent.hbs}\n{{log totalClicks}} // -> 3\n\n```\n```\n{{my-child childClickCount=(readonly totalClicks)}}\n```\n\nNow, when you update `childClickCount`:\n\n```js {data-filename=app/components/my-child.js}\nexport default Component.extend({\n click() {\n this.incrementProperty('childClickCount');\n }\n});\n```\n\nThe value updates in the child component, but not the parent component:\n\n```handlebars {data-filename=app/templates/components/my-child.hbs}\n{{log childClickCount}} //-> 4\n```\n\n```handlebars {data-filename=app/templates/components/my-parent.hbs}\n{{log totalClicks}} //-> 3\n\n```\nor\n```handlebars {data-filename=app/templates/components/my-parent.hbs}\n{{log totalClicks}} //-> 3\n{{my-child childClickCount=(readonly totalClicks)}}\n```\n\n### Objects and Arrays\n\nWhen passing a property that is a complex object (e.g. object, array) instead of a primitive object (e.g. number, string),\nonly the reference to the object is protected using the readonly helper.\nThis means that you can change properties of the object both on the parent component, as well as the child component.\nThe `readonly` binding behaves similar to the `const` keyword in JavaScript.\n\nLet's look at an example:\n\nFirst let's set up the parent component:\n\n```js {data-filename=app/components/my-parent.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n clicks: null,\n\n init() {\n this._super(...arguments);\n this.set('clicks', { total: 3 });\n }\n});\n```\n\n```handlebars {data-filename=app/templates/components/my-parent.hbs}\n{{log clicks.total}} //-> 3\n\n```\n```handlebars {data-filename=app/templates/components/my-parent.hbs}\n{{log clicks.total}} //-> 3\n{{my-child childClicks=(readonly clicks)}}\n```\n\nNow, if you update the `total` property of `childClicks`:\n\n```js {data-filename=app/components/my-child.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n click() {\n this.get('clicks').incrementProperty('total');\n }\n});\n```\n\nYou will see the following happen:\n\n```handlebars {data-filename=app/templates/components/my-parent.hbs}\n{{log clicks.total}} //-> 4\n\n```\nor\n```handlebars {data-filename=app/templates/components/my-parent.hbs}\n{{log clicks.total}} //-> 4\n{{my-child childClicks=(readonly clicks)}}\n```\n\n```handlebars {data-filename=app/templates/components/my-child.hbs}\n{{log childClicks.total}} //-> 4\n```", + "itemtype": "method", + "name": "readonly", + "params": [ + { + "name": "attr", + "description": "the read-only attribute.", + "type": "Object", + "optional": true + } + ], + "access": "private", + "tagname": "", + "class": "Ember.Templates.helpers", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/helpers/unbound.ts", + "line": 10, + "description": "The `{{unbound}}` helper disconnects the one-way binding of a property,\nessentially freezing its value at the moment of rendering. For example,\nin this example the display of the variable `name` will not change even\nif it is set with a new value:\n\n```handlebars\n{{unbound this.name}}\n```\n\nLike any helper, the `unbound` helper can accept a nested helper expression.\nThis allows for custom helpers to be rendered unbound:\n\n```handlebars\n{{unbound (some-custom-helper)}}\n{{unbound (capitalize this.name)}}\n{{! You can use any helper, including unbound, in a nested expression }}\n{{capitalize (unbound this.name)}}\n```\n\nThe `unbound` helper only accepts a single argument, and it return an\nunbound value.", + "itemtype": "method", + "name": "unbound", + "access": "public", + "tagname": "", + "class": "Ember.Templates.helpers", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/helpers/unique-id.ts", + "line": 5, + "description": "Use the {{unique-id}} helper to generate a unique ID string suitable for use as\nan ID attribute in the DOM.\n\n```handlebars\n\n```\nEach invocation of {{unique-id}} will return a new, unique ID string.\nYou can use the `let` helper to create an ID that can be reused within a template.\n\n```handlebars\n{{#let (unique-id) as |emailId|}}\n Email address\n \n{{/let}}\n```", + "itemtype": "method", + "name": "unique-id", + "since": "4.4.0", + "access": "public", + "tagname": "", + "class": "Ember.Templates.helpers", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/modifiers/on.ts", + "line": 5, + "description": "The `{{on}}` modifier lets you easily add event listeners (it uses\n[EventTarget.addEventListener](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)\ninternally).\n\nFor example, if you'd like to run a function on your component when a ``\nin the components template is clicked you might do something like:\n\n```handlebars {data-filename=app/components/like-post.hbs}\nLike this post!\n```\n\n```js {data-filename=app/components/like-post.js}\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\n\nexport default class LikePostComponent extends Component {\n @action\n saveLike() {\n // someone likes your post!\n // better send a request off to your server...\n }\n}\n```\n\n### Arguments\n\n`{{on}}` accepts two positional arguments, and a few named arguments.\n\nThe positional arguments are:\n\n- `event` -- the name to use when calling `addEventListener`\n- `callback` -- the function to be passed to `addEventListener`\n\nThe named arguments are:\n\n- capture -- a `true` value indicates that events of this type will be dispatched\n to the registered listener before being dispatched to any EventTarget beneath it\n in the DOM tree.\n- once -- indicates that the listener should be invoked at most once after being\n added. If true, the listener would be automatically removed when invoked.\n- passive -- if `true`, indicates that the function specified by listener will never\n call preventDefault(). If a passive listener does call preventDefault(), the user\n agent will do nothing other than generate a console warning. See\n [Improving scrolling performance with passive listeners](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Improving_scrolling_performance_with_passive_listeners)\n to learn more.\n\nThe callback function passed to `{{on}}` will receive any arguments that are passed\nto the event handler. Most commonly this would be the `event` itself.\n\nIf you would like to pass additional arguments to the function you should use\nthe `{{fn}}` helper.\n\nFor example, in our example case above if you'd like to pass in the post that\nwas being liked when the button is clicked you could do something like:\n\n```handlebars {data-filename=app/components/like-post.hbs}\nLike this post!\n```\n\nIn this case, the `saveLike` function will receive two arguments: the click event\nand the value of `@post`.\n\n### Function Context\n\nIn the example above, we used `@action` to ensure that `likePost` is\nproperly bound to the `items-list`, but let's explore what happens if we\nleft out `@action`:\n\n```js {data-filename=app/components/like-post.js}\nimport Component from '@glimmer/component';\n\nexport default class LikePostComponent extends Component {\n saveLike() {\n // ...snip...\n }\n}\n```\n\nIn this example, when the button is clicked `saveLike` will be invoked,\nit will **not** have access to the component instance. In other\nwords, it will have no `this` context, so please make sure your functions\nare bound (via `@action` or other means) before passing into `on`!", + "itemtype": "method", + "name": "on", + "access": "public", + "tagname": "", + "since": "3.11.0", + "class": "Ember.Templates.helpers", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/syntax/in-element.ts", + "line": 5, + "description": "The `in-element` helper renders its block content outside of the regular flow,\ninto a DOM element given by its `destinationElement` positional argument.\n\nCommon use cases - often referred to as \"portals\" or \"wormholes\" - are rendering\ndropdowns, modals or tooltips close to the root of the page to bypass CSS overflow\nrules, or to render content to parts of the page that are outside of the control\nof the Ember app itself (e.g. embedded into a static or server rendered HTML page).\n\n```handlebars\n{{#in-element this.destinationElement}}\n Some content\n{{/in-element}}\n```\n\n### Arguments\n\n`{{in-element}}` requires a single positional argument:\n\n- `destinationElement` -- the DOM element to render into. It must exist at the time\nof rendering.\n\nIt also supports an optional named argument:\n\n- `insertBefore` -- by default the DOM element's content is replaced when used as\n`destinationElement`. Passing `null` to `insertBefore` changes the behaviour to\nappend the block content to the end of any existing content. Any other value than\n`null` is currently not supported.\n\n For example:\n\n ```handlebars\n {{#in-element this.destinationElement insertBefore=null}}\n Some content\n {{/in-element}}\n ```", + "itemtype": "method", + "name": "in-element", + "access": "public", + "tagname": "", + "class": "Ember.Templates.helpers", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/syntax/let.ts", + "line": 5, + "description": "The `let` helper receives one or more positional arguments and yields\nthem out as block params.\n\nThis allows the developer to introduce shorter names for certain computations\nin the template.\n\nThis is especially useful if you are passing properties to a component\nthat receives a lot of options and you want to clean up the invocation.\n\nFor the following example, the template receives a `post` object with\n`content` and `title` properties.\n\nWe are going to call the `my-post` component, passing a title which is\nthe title of the post suffixed with the name of the blog, the content\nof the post, and a series of options defined in-place.\n\n```handlebars\n{{#let\n (concat post.title ' | The Ember.js Blog')\n post.content\n (hash\n theme=\"high-contrast\"\n enableComments=true\n )\n as |title content options|\n}}\n \n{{/let}}\n ```\n or\n ```handlebars\n{{#let\n (concat post.title ' | The Ember.js Blog')\n post.content\n (hash\n theme=\"high-contrast\"\n enableComments=true\n )\n as |title content options|\n}}\n {{my-post title=title content=content options=options}}\n{{/let}}\n ```", + "itemtype": "method", + "name": "let", + "access": "public", + "tagname": "", + "class": "Ember.Templates.helpers", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/syntax/mount.ts", + "line": 17, + "description": "The `{{mount}}` helper lets you embed a routeless engine in a template.\nMounting an engine will cause an instance to be booted and its `application`\ntemplate to be rendered.\n\nFor example, the following template mounts the `ember-chat` engine:\n\n```handlebars\n{{! application.hbs }}\n{{mount \"ember-chat\"}}\n```\n\nAdditionally, you can also pass in a `model` argument that will be\nset as the engines model. This can be an existing object:\n\n```\n\n {{mount 'admin' model=userSettings}}\n\n```\n\nOr an inline `hash`, and you can even pass components:\n\n```\n\n Application template!\n {{mount 'admin' model=(hash\n title='Secret Admin'\n signInButton=(component 'sign-in-button')\n )}}\n\n```", + "itemtype": "method", + "name": "mount", + "params": [ + { + "name": "name", + "description": "Name of the engine to mount.", + "type": "String" + }, + { + "name": "model", + "description": "Object that will be set as\n the model of the engine.", + "type": "Object", + "optional": true + } + ], + "access": "public", + "tagname": "", + "class": "Ember.Templates.helpers", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/syntax/outlet.ts", + "line": 22, + "description": "The `{{outlet}}` helper lets you specify where a child route will render in\nyour template. An important use of the `{{outlet}}` helper is in your\napplication's `application.hbs` file:\n\n```handlebars {data-filename=app/templates/application.hbs}\n\n\n\n \n {{outlet}}\n\n\n\n```\n\nSee the [routing guide](https://guides.emberjs.com/release/routing/rendering-a-template/) for more\ninformation on how your `route` interacts with the `{{outlet}}` helper.\nNote: Your content __will not render__ if there isn't an `{{outlet}}` for it.", + "itemtype": "method", + "name": "outlet", + "access": "public", + "tagname": "", + "class": "Ember.Templates.helpers", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/glimmer/index.ts", + "line": 91, + "description": "`{{yield}}` denotes an area of a template that will be rendered inside\nof another template.\n\n### Use with `Component`\n\nWhen designing components `{{yield}}` is used to denote where, inside the component's\ntemplate, an optional block passed to the component should render:\n\n```handlebars {data-filename=app/templates/application.hbs}\n\n First name:\n\n```\n\n```handlebars {data-filename=app/components/labeled-textfield.hbs}\n\n {{yield}} \n\n```\n\nResult:\n\n```html\n\n First name: \n\n```\n\nAdditionally you can `yield` properties into the context for use by the consumer:\n\n```handlebars {data-filename=app/templates/application.hbs}\n\n {{#if validationError}}\n {{validationError}}\n {{/if}}\n First name:\n\n```\n\n```handlebars {data-filename=app/components/labeled-textfield.hbs}\n\n {{yield this.validationError}} \n\n```\n\nResult:\n\n```html\n\n First Name must be at least 3 characters long.\n First name: \n\n```\n\n`yield` can also be used with the `hash` helper:\n\n```handlebars {data-filename=app/templates/application.hbs}\n\n Start date: {{range.start}}\n End date: {{range.end}}\n\n```\n\n```handlebars {data-filename=app/components/date-ranges.hbs}\n\n {{yield (hash start=@value.start end=@value.end)}}\n\n```\n\nResult:\n\n```html\n\n Start date: July 1st\n End date: July 30th\n\n```\n\nMultiple values can be yielded as block params:\n\n```handlebars {data-filename=app/templates/application.hbs}\n\n {{title}}\n {{subtitle}}\n {{body}}\n\n```\n\n```handlebars {data-filename=app/components/banner.hbs}\n\n {{yield \"Hello title\" \"hello subtitle\" \"body text\"}}\n\n```\n\nResult:\n\n```html\n\n Hello title\n hello subtitle\n body text\n\n```\n\nHowever, it is preferred to use the hash helper, as this can prevent breaking changes to your component and also simplify the api for the component.\n\nMultiple components can be yielded with the `hash` and `component` helper:\n\n```handlebars {data-filename=app/templates/application.hbs}\n\n Banner title\n Banner subtitle\n A load of body text\n\n```\n\n```js {data-filename=app/components/banner.js}\nimport Title from './banner/title';\nimport Subtitle from './banner/subtitle';\nimport Body from './banner/body';\n\nexport default class Banner extends Component {\n Title = Title;\n Subtitle = Subtitle;\n Body = Body;\n}\n```\n\n```handlebars {data-filename=app/components/banner.hbs}\n\n {{yield (hash\n Title=this.Title\n Subtitle=this.Subtitle\n Body=(component this.Body defaultArg=\"some value\")\n )}}\n\n```\n\nResult:\n\n```html\n\n Banner title\n Banner subtitle\n A load of body text\n\n```\n\nA benefit of using this pattern is that the user of the component can change the order the components are displayed.\n\n```handlebars {data-filename=app/templates/application.hbs}\n\n Banner subtitle\n Banner title\n A load of body text\n\n```\n\nResult:\n\n```html\n\n Banner subtitle\n Banner title\n A load of body text\n\n```\n\nAnother benefit to using `yield` with the `hash` and `component` helper\nis you can pass attributes and arguments to these components:\n\n```handlebars {data-filename=app/templates/application.hbs}\n\n Banner subtitle\n Banner title\n A load of body text\n\n```\n\n```handlebars {data-filename=app/components/banner/subtitle.hbs}\n{{!-- note the use of ..attributes --}}\n\n {{yield}}\n\n```\n\n```handlebars {data-filename=app/components/banner/title.hbs}\n{{#if (eq @variant \"loud\")}}\n {{yield}}\n{{else}}\n {{yield}}\n{{/if}}\n```\n\nResult:\n\n```html\n\n Banner subtitle\n Banner title\n A load of body text\n\n```", + "itemtype": "method", + "name": "yield", + "params": [ + { + "name": "options", + "description": "", + "type": "Hash" + } + ], + "return": { + "description": "HTML string", + "type": "String" + }, + "access": "public", + "tagname": "", + "class": "Ember.Templates.helpers", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/glimmer/index.ts", + "line": 303, + "description": "`{{(has-block)}}` indicates if the component was invoked with a block.\n\nThis component is invoked with a block:\n\n```handlebars\n{{#my-component}}\n Hi Jen!\n{{/my-component}}\n```\n\nThis component is invoked without a block:\n\n```handlebars\n{{my-component}}\n```\n\nUsing angle bracket invocation, this looks like:\n\n```html\nHi Jen! {{! with a block}}\n```\n\n```html\n {{! without a block}}\n```\n\nThis is useful when you want to create a component that can optionally take a block\nand then render a default template when it is not invoked with a block.\n\n```handlebars {data-filename=app/templates/components/my-component.hbs}\n{{#if (has-block)}}\n Welcome {{yield}}, we are happy you're here!\n{{else}}\n Hey you! You're great!\n{{/if}}\n```", + "itemtype": "method", + "name": "has-block", + "params": [ + { + "name": "the", + "description": "name of the block. The name (at the moment) is either \"main\" or \"inverse\" (though only curly components support inverse)", + "type": "String" + } + ], + "return": { + "description": "`true` if the component was invoked with a block", + "type": "Boolean" + }, + "access": "public", + "tagname": "", + "class": "Ember.Templates.helpers", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/glimmer/index.ts", + "line": 348, + "description": "`{{(has-block-params)}}` indicates if the component was invoked with block params.\n\nThis component is invoked with block params:\n\n```handlebars\n{{#my-component as |favoriteFlavor|}}\n Hi Jen!\n{{/my-component}}\n```\n\nThis component is invoked without block params:\n\n```handlebars\n{{#my-component}}\n Hi Jenn!\n{{/my-component}}\n```\n\nWith angle bracket syntax, block params look like this:\n\n ```handlebars\n\n Hi Jen!\n\n```\n\nAnd without block params:\n\n```handlebars\n\n Hi Jen!\n\n```\n\nThis is useful when you want to create a component that can render itself\ndifferently when it is not invoked with block params.\n\n```handlebars {data-filename=app/templates/components/my-component.hbs}\n{{#if (has-block-params)}}\n Welcome {{yield this.favoriteFlavor}}, we're happy you're here and hope you\n enjoy your favorite ice cream flavor.\n{{else}}\n Welcome {{yield}}, we're happy you're here, but we're unsure what\n flavor ice cream you would enjoy.\n{{/if}}\n```", + "itemtype": "method", + "name": "has-block-params", + "params": [ + { + "name": "the", + "description": "name of the block. The name (at the moment) is either \"main\" or \"inverse\" (though only curly components support inverse)", + "type": "String" + } + ], + "return": { + "description": "`true` if the component was invoked with block params", + "type": "Boolean" + }, + "access": "public", + "tagname": "", + "class": "Ember.Templates.helpers", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/glimmer/index.ts", + "line": 403, + "description": "Execute the `debugger` statement in the current template's context.\n\n```handlebars\n{{debugger}}\n```\n\nWhen using the debugger helper you will have access to a `get` function. This\nfunction retrieves values available in the context of the template.\nFor example, if you're wondering why a value `{{foo}}` isn't rendering as\nexpected within a template, you could place a `{{debugger}}` statement and,\nwhen the `debugger;` breakpoint is hit, you can attempt to retrieve this value:\n\n```\n> get('foo')\n```\n\n`get` is also aware of keywords. So in this situation\n\n```handlebars\n{{#each this.items as |item|}}\n {{debugger}}\n{{/each}}\n```\n\nYou'll be able to get values from the current item:\n\n```\n> get('item.name')\n```\n\nYou can also access the context of the view to make sure it is the object that\nyou expect:\n\n```\n> context\n```", + "itemtype": "method", + "name": "debugger", + "access": "public", + "tagname": "", + "class": "Ember.Templates.helpers", + "module": "ember" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-ember", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.Test.QUnitAdapter.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.Test.QUnitAdapter.json new file mode 100644 index 000000000..d94cabac0 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.Test.QUnitAdapter.json @@ -0,0 +1,96 @@ +{ + "data": { + "id": "ember-5.12.0-Ember.Test.QUnitAdapter", + "type": "class", + "attributes": { + "name": "Ember.Test.QUnitAdapter", + "shortname": "Ember.Test.QUnitAdapter", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "ember", + "namespace": "Ember.Test", + "file": "packages/ember-testing/lib/adapters/qunit.ts", + "line": 17, + "description": "This class implements the methods defined by TestAdapter for the\nQUnit testing framework.", + "extends": "TestAdapter", + "access": "public", + "tagname": "", + "methods": [ + { + "file": "packages/ember-testing/lib/adapters/adapter.ts", + "line": 20, + "description": "This callback will be called whenever an async operation is about to start.\n\nOverride this to call your framework's methods that handle async\noperations.", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "asyncStart", + "class": "Ember.Test.QUnitAdapter", + "module": "@ember/test", + "inherited": true, + "inheritedFrom": "TestAdapter" + }, + { + "file": "packages/ember-testing/lib/adapters/adapter.ts", + "line": 31, + "description": "This callback will be called whenever an async operation has completed.", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "asyncEnd", + "class": "Ember.Test.QUnitAdapter", + "module": "@ember/test", + "inherited": true, + "inheritedFrom": "TestAdapter" + }, + { + "file": "packages/ember-testing/lib/adapters/adapter.ts", + "line": 39, + "description": "Override this method with your testing framework's false assertion.\nThis function is called whenever an exception occurs causing the testing\npromise to fail.\n\nQUnit example:\n\n```javascript\n exception: function(error) {\n ok(false, error);\n };\n```", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "exception", + "params": [ + { + "name": "error", + "description": "The exception to be raised.", + "type": "String" + } + ], + "class": "Ember.Test.QUnitAdapter", + "module": "@ember/test", + "inherited": true, + "inheritedFrom": "TestAdapter" + } + ], + "events": [], + "properties": [] + }, + "relationships": { + "parent-class": { + "data": { + "id": "ember-5.12.0-TestAdapter", + "type": "class" + } + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-ember", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.Test.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.Test.json new file mode 100644 index 000000000..0da7de4b6 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.Test.json @@ -0,0 +1,147 @@ +{ + "data": { + "id": "ember-5.12.0-Ember.Test", + "type": "class", + "attributes": { + "name": "Ember.Test", + "shortname": "Ember.Test", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "ember", + "namespace": "Ember", + "file": "packages/ember-testing/lib/test.ts", + "line": 11, + "description": "This is a container for an assortment of testing related functionality:\n\n* Choose your default test adapter (for your framework of choice).\n* Register/Unregister additional test helpers.\n* Setup callbacks to be fired when the test helpers are injected into\n your application.", + "access": "public", + "tagname": "", + "methods": [ + { + "file": "packages/ember-testing/lib/test/on_inject_helpers.ts", + "line": 5, + "description": "Used to register callbacks to be fired whenever `App.injectTestHelpers`\nis called.\n\nThe callback will receive the current application as an argument.\n\nExample:\n\n```javascript\nimport $ from 'jquery';\n\nEmber.Test.onInjectHelpers(function() {\n $(document).ajaxSend(function() {\n Test.pendingRequests++;\n });\n\n $(document).ajaxComplete(function() {\n Test.pendingRequests--;\n });\n});\n```", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "onInjectHelpers", + "params": [ + { + "name": "callback", + "description": "The function to be called.", + "type": "Function" + } + ], + "class": "Ember.Test", + "module": "@ember/test" + }, + { + "file": "packages/ember-testing/lib/test/promise.ts", + "line": 32, + "description": "This returns a thenable tailored for testing. It catches failed\n`onSuccess` callbacks and invokes the `Ember.Test.adapter.exception`\ncallback in the last chained then.\n\nThis method should be returned by async helpers such as `wait`.", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "promise", + "params": [ + { + "name": "resolver", + "description": "The function used to resolve the promise.", + "type": "Function" + }, + { + "name": "label", + "description": "An optional string for identifying the promise.", + "type": "String" + } + ], + "class": "Ember.Test", + "module": "@ember/test" + }, + { + "file": "packages/ember-testing/lib/test/promise.ts", + "line": 50, + "description": "Replacement for `Ember.RSVP.resolve`\nThe only difference is this uses\nan instance of `Ember.Test.Promise`", + "access": "public", + "tagname": "", + "itemtype": "method", + "name": "resolve", + "params": [ + { + "name": "The", + "description": "value to resolve", + "type": "Mixed" + } + ], + "since": "1.2.0", + "class": "Ember.Test", + "module": "@ember/test" + }, + { + "file": "packages/ember-testing/lib/setup_for_testing.ts", + "line": 8, + "description": "Sets Ember up for testing. This is useful to perform\nbasic setup steps in order to unit test.\n\nUse `App.setupForTesting` to perform integration tests (full\napplication testing).", + "itemtype": "method", + "name": "setupForTesting", + "since": "1.5.0", + "access": "private", + "tagname": "", + "class": "Ember.Test", + "module": "@ember/test", + "namespace": "Ember" + } + ], + "events": [], + "properties": [ + { + "file": "packages/ember-testing/lib/test.ts", + "line": 24, + "description": "Hash containing all known test helpers.", + "itemtype": "property", + "name": "_helpers", + "access": "private", + "tagname": "", + "since": "1.7.0", + "class": "Ember.Test", + "module": "ember", + "namespace": "Ember" + }, + { + "file": "packages/ember-testing/lib/test.ts", + "line": 45, + "description": "Used to allow ember-testing to communicate with a specific testing\nframework.\n\nYou can manually set it before calling `App.setupForTesting()`.\n\nExample:\n\n```javascript\nEmber.Test.adapter = MyCustomAdapter.create()\n```\n\nIf you do not set it, ember-testing will default to `Ember.Test.QUnitAdapter`.", + "access": "public", + "tagname": "", + "itemtype": "property", + "name": "adapter", + "type": "{Class} The adapter to be used.", + "default": "Ember.Test.QUnitAdapter", + "class": "Ember.Test", + "module": "ember", + "namespace": "Ember" + } + ] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-ember", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.ViewMixin.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.ViewMixin.json new file mode 100644 index 000000000..62021ce1c --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.ViewMixin.json @@ -0,0 +1,322 @@ +{ + "data": { + "id": "ember-5.12.0-Ember.ViewMixin", + "type": "class", + "attributes": { + "name": "Ember.ViewMixin", + "shortname": "Ember.ViewMixin", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [ + "Component" + ], + "module": "ember", + "namespace": "Ember", + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 15, + "access": "private", + "tagname": "", + "methods": [ + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 93, + "description": "Return the nearest ancestor that is an instance of the provided\nclass or mixin.", + "itemtype": "method", + "name": "nearestOfType", + "params": [ + { + "name": "klass", + "description": "Subclass of Ember.View (or Ember.View itself),\nor an instance of Mixin.", + "type": "Class,Mixin" + } + ], + "return": { + "description": "Ember.View" + }, + "deprecated": true, + "deprecationMessage": "use `yield` and contextual components for composition instead.", + "access": "private", + "tagname": "", + "class": "Ember.ViewMixin", + "module": "ember", + "namespace": "Ember" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 121, + "description": "Return the nearest ancestor that has a given property.", + "itemtype": "method", + "name": "nearestWithProperty", + "params": [ + { + "name": "property", + "description": "A property name", + "type": "String" + } + ], + "return": { + "description": "Ember.View" + }, + "deprecated": true, + "deprecationMessage": "use `yield` and contextual components for composition instead.", + "access": "private", + "tagname": "", + "class": "Ember.ViewMixin", + "module": "ember", + "namespace": "Ember" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 141, + "description": "Renders the view again. This will work regardless of whether the\nview is already in the DOM or not. If the view is in the DOM, the\nrendering process will be deferred to give bindings a chance\nto synchronize.\n\nIf children were added during the rendering process using `appendChild`,\n`rerender` will remove them, because they will be added again\nif needed by the next `render`.\n\nIn general, if the display of your view changes, you should modify\nthe DOM element directly instead of manually calling `rerender`, which can\nbe slow.", + "itemtype": "method", + "name": "rerender", + "access": "public", + "tagname": "", + "class": "Ember.ViewMixin", + "module": "ember", + "namespace": "Ember" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 181, + "description": "Appends the view's element to the specified parent element.\n\nNote that this method just schedules the view to be appended; the DOM\nelement will not be appended to the given element until all bindings have\nfinished synchronizing.\n\nThis is not typically a function that you will need to call directly when\nbuilding your application. If you do need to use `appendTo`, be sure that\nthe target element you are providing is associated with an `Application`\nand does not have an ancestor element that is associated with an Ember view.", + "itemtype": "method", + "name": "appendTo", + "params": [ + { + "name": "A", + "description": "selector, element, HTML string", + "type": "String|DOMElement" + } + ], + "return": { + "description": "receiver", + "type": "Ember.View" + }, + "access": "private", + "tagname": "", + "class": "Ember.ViewMixin", + "module": "ember", + "namespace": "Ember" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 246, + "description": "Appends the view's element to the document body. If the view does\nnot have an HTML representation yet\nthe element will be generated automatically.\n\nIf your application uses the `rootElement` property, you must append\nthe view within that element. Rendering views outside of the `rootElement`\nis not supported.\n\nNote that this method just schedules the view to be appended; the DOM\nelement will not be appended to the document body until all bindings have\nfinished synchronizing.", + "itemtype": "method", + "name": "append", + "return": { + "description": "receiver", + "type": "Ember.View" + }, + "access": "private", + "tagname": "", + "class": "Ember.ViewMixin", + "module": "ember", + "namespace": "Ember" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 331, + "description": "You must call `destroy` on a view to destroy the view (and all of its\nchild views). This will remove the view from any parent node, then make\nsure that the DOM element managed by the view can be released by the\nmemory manager.", + "itemtype": "method", + "name": "destroy", + "access": "private", + "tagname": "", + "class": "Ember.ViewMixin", + "module": "ember", + "namespace": "Ember" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 405, + "description": "Setup a view, but do not finish waking it up.\n\n* configure `childViews`\n* register the view with the global views hash, which is used for event\ndispatch", + "itemtype": "method", + "name": "init", + "access": "private", + "tagname": "", + "class": "Ember.ViewMixin", + "module": "ember", + "namespace": "Ember" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 439, + "description": "Handle events from `EventDispatcher`", + "itemtype": "method", + "name": "handleEvent", + "params": [ + { + "name": "eventName", + "description": "", + "type": "String" + }, + { + "name": "evt", + "description": "", + "type": "Event" + } + ], + "access": "private", + "tagname": "", + "class": "Ember.ViewMixin", + "module": "ember", + "namespace": "Ember" + } + ], + "events": [ + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 300, + "description": "Called when a view is going to insert an element into the DOM.", + "itemtype": "event", + "name": "willInsertElement", + "access": "public", + "tagname": "", + "class": "Ember.ViewMixin", + "module": "ember", + "namespace": "Ember" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 308, + "description": "Called when the element of the view has been inserted into the DOM.\nOverride this function to do any set up that requires an element\nin the document body.\n\nWhen a view has children, didInsertElement will be called on the\nchild view(s) first and on itself afterwards.", + "itemtype": "event", + "name": "didInsertElement", + "access": "public", + "tagname": "", + "class": "Ember.ViewMixin", + "module": "ember", + "namespace": "Ember" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 321, + "description": "Called when the view is about to rerender, but before anything has\nbeen torn down. This is a good opportunity to tear down any manual\nobservers you have installed based on the DOM state", + "itemtype": "event", + "name": "willClearRender", + "access": "public", + "tagname": "", + "class": "Ember.ViewMixin", + "module": "ember", + "namespace": "Ember" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 345, + "description": "Called when the element of the view is going to be destroyed. Override\nthis function to do any teardown that requires an element, like removing\nevent listeners.\n\nPlease note: any property changes made during this event will have no\neffect on object observers.", + "itemtype": "event", + "name": "willDestroyElement", + "access": "public", + "tagname": "", + "class": "Ember.ViewMixin", + "module": "ember", + "namespace": "Ember" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 358, + "description": "Called after the element of the view is destroyed.", + "itemtype": "event", + "name": "willDestroyElement", + "access": "public", + "tagname": "", + "class": "Ember.ViewMixin", + "module": "ember", + "namespace": "Ember" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 366, + "description": "Called when the parentView property has changed.", + "itemtype": "event", + "name": "parentViewDidChange", + "access": "private", + "tagname": "", + "class": "Ember.ViewMixin", + "module": "ember", + "namespace": "Ember" + } + ], + "properties": [ + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 35, + "description": "A list of properties of the view to apply as attributes. If the property\nis a string value, the value of that string will be applied as the value\nfor an attribute of the property's name.\n\nThe following example creates a tag like ``.\n\n```js {data-filename=app/components/my-component.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n attributeBindings: ['priority'],\n priority: 'high'\n });\n```\n\nIf the value of the property is a Boolean, the attribute is treated as\nan HTML Boolean attribute. It will be present if the property is `true`\nand omitted if the property is `false`.\n\nThe following example creates markup like ``.\n\n```js {data-filename=app/components/my-component.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n attributeBindings: ['visible'],\n visible: true\n });\n```\n\nIf you would prefer to use a custom value instead of the property name,\nyou can create the same markup as the last example with a binding like\nthis:\n\n```js {data-filename=app/components/my-component.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n attributeBindings: ['isVisible:visible'],\n isVisible: true\n });\n```\n\nThis list of attributes is inherited from the component's superclasses,\nas well.", + "itemtype": "property", + "name": "attributeBindings", + "type": "Array", + "default": "[]", + "access": "public", + "tagname": "", + "class": "Ember.ViewMixin", + "module": "ember", + "namespace": "Ember" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 166, + "description": "Returns the current DOM element for the view.", + "itemtype": "property", + "name": "element", + "type": "DOMElement", + "access": "public", + "tagname": "", + "class": "Ember.ViewMixin", + "module": "ember", + "namespace": "Ember" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 267, + "description": "The HTML `id` of the view's element in the DOM. You can provide this\nvalue yourself but it must be unique (just as in HTML):\n\n```handlebars\n{{my-component elementId=\"a-really-cool-id\"}}\n```\n\nIf not manually set a default value will be provided by the framework.\n\nOnce rendered an element's `elementId` is considered immutable and you\nshould never change it. If you need to compute a dynamic value for the\n`elementId`, you should do this when the component or element is being\ninstantiated:\n\n```js {data-filename=app/components/my-component.js}\nimport Component from '@ember/component';\n\nexport default Component.extend({\n init() {\n this._super(...arguments);\n let index = this.get('index');\n this.set('elementId', 'component-id' + index);\n }\n });\n```", + "itemtype": "property", + "name": "elementId", + "type": "String", + "access": "public", + "tagname": "", + "class": "Ember.ViewMixin", + "module": "ember", + "namespace": "Ember" + }, + { + "file": "packages/@ember/-internals/views/lib/mixins/view_support.ts", + "line": 378, + "description": "Tag name for the view's outer element. The tag name is only used when an\nelement is first created. If you change the `tagName` for an element, you\nmust destroy and recreate the view element.\n\nBy default, the render buffer will use a `` tag for views.\n\nIf the tagName is `''`, the view will be tagless, with no outer element.\nComponent properties that depend on the presence of an outer element, such\nas `classNameBindings` and `attributeBindings`, do not work with tagless\ncomponents. Tagless components cannot implement methods to handle events,\nand their `element` property has a `null` value.", + "itemtype": "property", + "name": "tagName", + "type": "String", + "default": "null", + "access": "public", + "tagname": "", + "class": "Ember.ViewMixin", + "module": "ember", + "namespace": "Ember" + } + ] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-ember", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.json new file mode 100644 index 000000000..881dab057 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-Ember.json @@ -0,0 +1,196 @@ +{ + "data": { + "id": "ember-5.12.0-Ember", + "type": "class", + "attributes": { + "name": "Ember", + "shortname": "Ember", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "@ember/utils", + "namespace": "", + "methods": [ + { + "file": "packages/@ember/-internals/meta/lib/meta.ts", + "line": 673, + "description": "Retrieves the meta hash for an object. If `writable` is true ensures the\nhash is writable for this object as well.\n\nThe meta object contains information about computed property descriptors as\nwell as any watched properties and other information. You generally will\nnot access this information directly but instead work with higher level\nmethods that manipulate this hash indirectly.", + "itemtype": "method", + "name": "meta", + "access": "private", + "tagname": "", + "params": [ + { + "name": "obj", + "description": "The object to retrieve meta for", + "type": "Object" + }, + { + "name": "writable", + "description": "Pass `false` if you do not intend to modify\n the meta hash, allowing the method to avoid making an unnecessary copy.", + "type": "Boolean", + "optional": true, + "optdefault": "true" + } + ], + "return": { + "description": "the meta hash for an object", + "type": "Object" + }, + "class": "Ember", + "module": "ember" + }, + { + "file": "packages/@ember/-internals/utils/lib/invoke.ts", + "line": 1, + "description": "Checks to see if the `methodName` exists on the `obj`.\n\n```javascript\nlet foo = { bar: function() { return 'bar'; }, baz: null };\n\nEmber.canInvoke(foo, 'bar'); // true\nEmber.canInvoke(foo, 'baz'); // false\nEmber.canInvoke(foo, 'bat'); // false\n```", + "itemtype": "method", + "name": "canInvoke", + "params": [ + { + "name": "obj", + "description": "The object to check for the method", + "type": "Object" + }, + { + "name": "methodName", + "description": "The method name to check for", + "type": "String" + } + ], + "return": { + "description": "", + "type": "Boolean" + }, + "access": "private", + "tagname": "", + "class": "Ember", + "module": "@ember/object" + }, + { + "file": "packages/@ember/-internals/utils/lib/spec.ts", + "line": 1, + "description": "Returns whether Type(value) is Object.\n\nUseful for checking whether a value is a valid WeakMap key.\n\nRefs: https://tc39.github.io/ecma262/#sec-typeof-operator-runtime-semantics-evaluation\n https://tc39.github.io/ecma262/#sec-weakmap.prototype.set", + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "isObject", + "class": "Ember", + "module": "@ember/utils" + }, + { + "file": "packages/@ember/-internals/utils/lib/super.ts", + "line": 71, + "description": "Wraps the passed function so that `this._super` will point to the superFunc\nwhen the function is invoked. This is the primitive we use to implement\ncalls to super.", + "access": "private", + "tagname": "", + "itemtype": "method", + "name": "wrap", + "params": [ + { + "name": "func", + "description": "The function to call", + "type": "Function" + }, + { + "name": "superFunc", + "description": "The super function.", + "type": "Function" + } + ], + "return": { + "description": "wrapped function.", + "type": "Function" + }, + "class": "Ember", + "module": "@ember/utils" + }, + { + "file": "packages/@ember/routing/lib/controller_for.ts", + "line": 9, + "description": "Finds a controller instance.", + "itemtype": "method", + "name": "controllerFor", + "access": "private", + "tagname": "", + "class": "Ember", + "module": "@ember/routing" + }, + { + "file": "packages/@ember/routing/lib/generate_controller.ts", + "line": 11, + "description": "Generates a controller factory", + "itemtype": "method", + "name": "generateControllerFactory", + "access": "private", + "tagname": "", + "class": "Ember", + "module": "@ember/routing" + }, + { + "file": "packages/@ember/routing/lib/generate_controller.ts", + "line": 52, + "description": "Generates and instantiates a controller extending from `controller:basic`\nif present, or `Controller` if not.", + "itemtype": "method", + "name": "generateController", + "access": "private", + "tagname": "", + "since": "1.3.0", + "class": "Ember", + "module": "@ember/routing" + } + ], + "events": [], + "properties": [ + { + "file": "packages/@ember/-internals/utils/lib/guid.ts", + "line": 26, + "description": "Prefix used for guids through out Ember.", + "access": "private", + "tagname": "", + "itemtype": "property", + "name": "GUID_PREFIX", + "type": "String", + "final": 1, + "class": "Ember", + "module": "@ember/object" + }, + { + "file": "packages/@ember/-internals/utils/lib/guid.ts", + "line": 39, + "description": "A unique key used to assign guids and other private metadata to objects.\nIf you inspect an object in your browser debugger you will often see these.\nThey can be safely ignored.\n\nOn browsers that support it, these properties are added with enumeration\ndisabled so they won't show up when you iterate over your properties.", + "access": "private", + "tagname": "", + "itemtype": "property", + "name": "GUID_KEY", + "type": "String", + "final": 1, + "class": "Ember", + "module": "@ember/object" + } + ] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/utils", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-EmberArray.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-EmberArray.json new file mode 100644 index 000000000..01eea7c2a --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-EmberArray.json @@ -0,0 +1,836 @@ +{ + "data": { + "id": "ember-5.12.0-EmberArray", + "type": "class", + "attributes": { + "name": "EmberArray", + "shortname": "EmberArray", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [ + "MutableArray" + ], + "module": "@ember/array", + "namespace": "", + "file": "packages/@ember/array/index.ts", + "line": 219, + "description": "This mixin implements Observer-friendly Array-like behavior. It is not a\nconcrete implementation, but it can be used up by other classes that want\nto appear like arrays.\n\nFor example, ArrayProxy is a concrete class that can be instantiated to\nimplement array-like behavior. This class uses the Array Mixin by way of\nthe MutableArray mixin, which allows observable changes to be made to the\nunderlying array.\n\nThis mixin defines methods specifically for collections that provide\nindex-ordered access to their contents. When you are designing code that\nneeds to accept any kind of Array-like object, you should use these methods\ninstead of Array primitives because these will properly notify observers of\nchanges to the array.\n\nAlthough these methods are efficient, they do add a layer of indirection to\nyour application so it is a good idea to use them only when you need the\nflexibility of using both true JavaScript arrays and \"virtual\" arrays such\nas controllers and collections.\n\nYou can use the methods defined in this module to access and modify array\ncontents in an observable-friendly way. You can also be notified whenever\nthe membership of an array changes by using `.observes('myArray.[]')`.\n\nTo support `EmberArray` in your own class, you must override two\nprimitives to use it: `length()` and `objectAt()`.", + "uses": [ + "Enumerable" + ], + "since": "Ember 0.9.0", + "access": "public", + "tagname": "", + "methods": [ + { + "file": "packages/@ember/array/index.ts", + "line": 263, + "description": "Returns the object at the given `index`. If the given `index` is negative\nor is greater or equal than the array length, returns `undefined`.\n\nThis is one of the primitives you must implement to support `EmberArray`.\nIf your object supports retrieving the value of an array item using `get()`\n(i.e. `myArray.get(0)`), then you do not need to implement this method\nyourself.\n\n```javascript\nlet arr = ['a', 'b', 'c', 'd'];\n\narr.objectAt(0); // 'a'\narr.objectAt(3); // 'd'\narr.objectAt(-1); // undefined\narr.objectAt(4); // undefined\narr.objectAt(5); // undefined\n```", + "itemtype": "method", + "name": "objectAt", + "params": [ + { + "name": "idx", + "description": "The index of the item to return.", + "type": "Number" + } + ], + "return": { + "description": "item at index or undefined", + "type": "*" + }, + "access": "public", + "tagname": "", + "class": "EmberArray", + "module": "@ember/array" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 288, + "description": "This returns the objects at the specified indexes, using `objectAt`.\n\n```javascript\nlet arr = ['a', 'b', 'c', 'd'];\n\narr.objectsAt([0, 1, 2]); // ['a', 'b', 'c']\narr.objectsAt([2, 3, 4]); // ['c', 'd', undefined]\n```", + "itemtype": "method", + "name": "objectsAt", + "params": [ + { + "name": "indexes", + "description": "An array of indexes of items to return.", + "type": "Array" + } + ], + "return": { + "description": "", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "EmberArray", + "module": "@ember/array" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 354, + "description": "Returns a new array that is a slice of the receiver. This implementation\nuses the observable array methods to retrieve the objects for the new\nslice.\n\n```javascript\nlet arr = ['red', 'green', 'blue'];\n\narr.slice(0); // ['red', 'green', 'blue']\narr.slice(0, 2); // ['red', 'green']\narr.slice(1, 100); // ['green', 'blue']\n```", + "itemtype": "method", + "name": "slice", + "params": [ + { + "name": "beginIndex", + "description": "(Optional) index to begin slicing from.", + "type": "Number" + }, + { + "name": "endIndex", + "description": "(Optional) index to end the slice at (but not included).", + "type": "Number" + } + ], + "return": { + "description": "New array with specified slice", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "EmberArray", + "module": "@ember/array" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 374, + "description": "Used to determine the passed object's first occurrence in the array.\nReturns the index if found, -1 if no match is found.\n\nThe optional `startAt` argument can be used to pass a starting\nindex to search from, effectively slicing the searchable portion\nof the array. If it's negative it will add the array length to\nthe startAt value passed in as the index to search from. If less\nthan or equal to `-1 * array.length` the entire array is searched.\n\n```javascript\nlet arr = ['a', 'b', 'c', 'd', 'a'];\n\narr.indexOf('a'); // 0\narr.indexOf('z'); // -1\narr.indexOf('a', 2); // 4\narr.indexOf('a', -1); // 4, equivalent to indexOf('a', 4)\narr.indexOf('a', -100); // 0, searches entire array\narr.indexOf('b', 3); // -1\narr.indexOf('a', 100); // -1\n\nlet people = [{ name: 'Zoey' }, { name: 'Bob' }]\nlet newPerson = { name: 'Tom' };\npeople = [newPerson, ...people, newPerson];\n\npeople.indexOf(newPerson); // 0\npeople.indexOf(newPerson, 1); // 3\npeople.indexOf(newPerson, -4); // 0\npeople.indexOf(newPerson, 10); // -1\n```", + "itemtype": "method", + "name": "indexOf", + "params": [ + { + "name": "object", + "description": "the item to search for", + "type": "Object" + }, + { + "name": "startAt", + "description": "optional starting location to search, default 0", + "type": "Number" + } + ], + "return": { + "description": "index or -1 if not found", + "type": "Number" + }, + "access": "public", + "tagname": "", + "class": "EmberArray", + "module": "@ember/array" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 412, + "description": "Returns the index of the given `object`'s last occurrence.\n\n- If no `startAt` argument is given, the search starts from\nthe last position.\n- If it's greater than or equal to the length of the array,\nthe search starts from the last position.\n- If it's negative, it is taken as the offset from the end\nof the array i.e. `startAt + array.length`.\n- If it's any other positive number, will search backwards\nfrom that index of the array.\n\nReturns -1 if no match is found.\n\n```javascript\nlet arr = ['a', 'b', 'c', 'd', 'a'];\n\narr.lastIndexOf('a'); // 4\narr.lastIndexOf('z'); // -1\narr.lastIndexOf('a', 2); // 0\narr.lastIndexOf('a', -1); // 4\narr.lastIndexOf('a', -3); // 0\narr.lastIndexOf('b', 3); // 1\narr.lastIndexOf('a', 100); // 4\n```", + "itemtype": "method", + "name": "lastIndexOf", + "params": [ + { + "name": "object", + "description": "the item to search for", + "type": "Object" + }, + { + "name": "startAt", + "description": "optional starting location to search from\nbackwards, defaults to `(array.length - 1)`", + "type": "Number" + } + ], + "return": { + "description": "The last index of the `object` in the array or -1\nif not found", + "type": "Number" + }, + "access": "public", + "tagname": "", + "class": "EmberArray", + "module": "@ember/array" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 447, + "description": "Iterates through the array, calling the passed function on each\nitem. This method corresponds to the `forEach()` method defined in\nJavaScript 1.6.\n\nThe callback method you provide should have the following signature (all\nparameters are optional):\n\n```javascript\nfunction(item, index, array);\n```\n\n- `item` is the current item in the iteration.\n- `index` is the current index in the iteration.\n- `array` is the array itself.\n\nNote that in addition to a callback, you can also pass an optional target\nobject that will be set as `this` on the context. This is a good way\nto give your iterator function access to the current object.\n\nExample Usage:\n\n```javascript\nlet foods = [\n { name: 'apple', eaten: false },\n { name: 'banana', eaten: false },\n { name: 'carrot', eaten: false }\n];\n\nfoods.forEach((food) => food.eaten = true);\n\nlet output = '';\nfoods.forEach((item, index, array) =>\n output += `${index + 1}/${array.length} ${item.name}\\n`;\n);\nconsole.log(output);\n// 1/3 apple\n// 2/3 banana\n// 3/3 carrot\n```", + "itemtype": "method", + "name": "forEach", + "params": [ + { + "name": "callback", + "description": "The callback to execute", + "type": "Function" + }, + { + "name": "target", + "description": "The target object to use", + "type": "Object", + "optional": true + } + ], + "return": { + "description": "receiver", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "EmberArray", + "module": "@ember/array" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 498, + "description": "Alias for `mapBy`.\n\nReturns the value of the named\nproperty on all items in the enumeration.\n\n```javascript\nlet people = [{name: 'Joe'}, {name: 'Matt'}];\n\npeople.getEach('name');\n// ['Joe', 'Matt'];\n\npeople.getEach('nonexistentProperty');\n// [undefined, undefined];\n```", + "itemtype": "method", + "name": "getEach", + "params": [ + { + "name": "key", + "description": "name of the property", + "type": "String" + } + ], + "return": { + "description": "The mapped array.", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "EmberArray", + "module": "@ember/array" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 520, + "description": "Sets the value on the named property for each member. This is more\nergonomic than using other methods defined on this helper. If the object\nimplements Observable, the value will be changed to `set(),` otherwise\nit will be set directly. `null` objects are skipped.\n\n```javascript\nlet people = [{name: 'Joe'}, {name: 'Matt'}];\n\npeople.setEach('zipCode', '10011');\n// [{name: 'Joe', zipCode: '10011'}, {name: 'Matt', zipCode: '10011'}];\n```", + "itemtype": "method", + "name": "setEach", + "params": [ + { + "name": "key", + "description": "The key to set", + "type": "String" + }, + { + "name": "value", + "description": "The object to set", + "type": "Object" + } + ], + "return": { + "description": "receiver", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "EmberArray", + "module": "@ember/array" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 540, + "description": "Maps all of the items in the enumeration to another value, returning\na new array. This method corresponds to `map()` defined in JavaScript 1.6.\n\nThe callback method you provide should have the following signature (all\nparameters are optional):\n\n```javascript\nfunction(item, index, array);\nlet arr = [1, 2, 3, 4, 5, 6];\n\narr.map(element => element * element);\n// [1, 4, 9, 16, 25, 36];\n\narr.map((element, index) => element + index);\n// [1, 3, 5, 7, 9, 11];\n```\n\n- `item` is the current item in the iteration.\n- `index` is the current index in the iteration.\n- `array` is the array itself.\n\nIt should return the mapped value.\n\nNote that in addition to a callback, you can also pass an optional target\nobject that will be set as `this` on the context. This is a good way\nto give your iterator function access to the current object.", + "itemtype": "method", + "name": "map", + "params": [ + { + "name": "callback", + "description": "The callback to execute", + "type": "Function" + }, + { + "name": "target", + "description": "The target object to use", + "type": "Object", + "optional": true + } + ], + "return": { + "description": "The mapped array.", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "EmberArray", + "module": "@ember/array" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 578, + "description": "Similar to map, this specialized function returns the value of the named\nproperty on all items in the enumeration.\n\n```javascript\nlet people = [{name: 'Joe'}, {name: 'Matt'}];\n\npeople.mapBy('name');\n// ['Joe', 'Matt'];\n\npeople.mapBy('unknownProperty');\n// [undefined, undefined];\n```", + "itemtype": "method", + "name": "mapBy", + "params": [ + { + "name": "key", + "description": "name of the property", + "type": "String" + } + ], + "return": { + "description": "The mapped array.", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "EmberArray", + "module": "@ember/array" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 599, + "description": "Returns a new array with all of the items in the enumeration that the provided\ncallback function returns true for. This method corresponds to [Array.prototype.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).\n\nThe callback method should have the following signature:\n\n```javascript\nfunction(item, index, array);\n```\n\n- `item` is the current item in the iteration.\n- `index` is the current index in the iteration.\n- `array` is the array itself.\n\nAll parameters are optional. The function should return `true` to include the item\nin the results, and `false` otherwise.\n\nExample:\n\n```javascript\nfunction isAdult(person) {\n return person.age > 18;\n};\n\nlet people = Ember.A([{ name: 'John', age: 14 }, { name: 'Joan', age: 45 }]);\n\npeople.filter(isAdult); // returns [{ name: 'Joan', age: 45 }];\n```\n\nNote that in addition to a callback, you can pass an optional target object\nthat will be set as `this` on the context. This is a good way to give your\niterator function access to the current object. For example:\n\n```javascript\nfunction isAdultAndEngineer(person) {\n return person.age > 18 && this.engineering;\n}\n\nclass AdultsCollection {\n engineering = false;\n\n constructor(opts = {}) {\n super(...arguments);\n\n this.engineering = opts.engineering;\n this.people = Ember.A([{ name: 'John', age: 14 }, { name: 'Joan', age: 45 }]);\n }\n}\n\nlet collection = new AdultsCollection({ engineering: true });\ncollection.people.filter(isAdultAndEngineer, { target: collection });\n```", + "itemtype": "method", + "name": "filter", + "params": [ + { + "name": "callback", + "description": "The callback to execute", + "type": "Function" + }, + { + "name": "target", + "description": "The target object to use", + "type": "Object", + "optional": true + } + ], + "return": { + "description": "A filtered array.", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "EmberArray", + "module": "@ember/array" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 662, + "description": "Returns an array with all of the items in the enumeration where the passed\nfunction returns false. This method is the inverse of filter().\n\nThe callback method you provide should have the following signature (all\nparameters are optional):\n\n```javascript\nfunction(item, index, array);\n```\n\n- *item* is the current item in the iteration.\n- *index* is the current index in the iteration\n- *array* is the array itself.\n\nIt should return a falsey value to include the item in the results.\n\nNote that in addition to a callback, you can also pass an optional target\nobject that will be set as \"this\" on the context. This is a good way\nto give your iterator function access to the current object.\n\nExample Usage:\n\n```javascript\nconst food = [\n { food: 'apple', isFruit: true },\n { food: 'bread', isFruit: false },\n { food: 'banana', isFruit: true }\n];\nconst nonFruits = food.reject(function(thing) {\n return thing.isFruit;\n}); // [{food: 'bread', isFruit: false}]\n```", + "itemtype": "method", + "name": "reject", + "params": [ + { + "name": "callback", + "description": "The callback to execute", + "type": "Function" + }, + { + "name": "target", + "description": "The target object to use", + "type": "Object", + "optional": true + } + ], + "return": { + "description": "A rejected array.", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "EmberArray", + "module": "@ember/array" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 706, + "description": "Filters the array by the property and an optional value. If a value is given, it returns\nthe items that have said value for the property. If not, it returns all the items that\nhave a truthy value for the property.\n\nExample Usage:\n\n```javascript\nlet things = Ember.A([{ food: 'apple', isFruit: true }, { food: 'beans', isFruit: false }]);\n\nthings.filterBy('food', 'beans'); // [{ food: 'beans', isFruit: false }]\nthings.filterBy('isFruit'); // [{ food: 'apple', isFruit: true }]\n```", + "itemtype": "method", + "name": "filterBy", + "params": [ + { + "name": "key", + "description": "the property to test", + "type": "String" + }, + { + "name": "value", + "description": "optional value to test against.", + "type": "*", + "optional": true + } + ], + "return": { + "description": "filtered array", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "EmberArray", + "module": "@ember/array" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 727, + "description": "Returns an array with the items that do not have truthy values for the provided key.\nYou can pass an optional second argument with a target value to reject for the key.\nOtherwise this will reject objects where the provided property evaluates to false.\n\nExample Usage:\n\n```javascript\n let food = [\n { name: \"apple\", isFruit: true },\n { name: \"carrot\", isFruit: false },\n { name: \"bread\", isFruit: false },\n ];\n food.rejectBy('isFruit'); // [{ name: \"carrot\", isFruit: false }, { name: \"bread\", isFruit: false }]\n food.rejectBy('name', 'carrot'); // [{ name: \"apple\", isFruit: true }}, { name: \"bread\", isFruit: false }]\n```", + "itemtype": "method", + "name": "rejectBy", + "params": [ + { + "name": "key", + "description": "the property to test", + "type": "String" + }, + { + "name": "value", + "description": "optional value to test against.", + "type": "*", + "optional": true + } + ], + "return": { + "description": "rejected array", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "EmberArray", + "module": "@ember/array" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 751, + "description": "Returns the first item in the array for which the callback returns true.\nThis method is similar to the `find()` method defined in ECMAScript 2015.\n\nThe callback method you provide should have the following signature (all\nparameters are optional):\n\n```javascript\nfunction(item, index, array);\n```\n\n- `item` is the current item in the iteration.\n- `index` is the current index in the iteration.\n- `array` is the array itself.\n\nIt should return the `true` to include the item in the results, `false`\notherwise.\n\nNote that in addition to a callback, you can also pass an optional target\nobject that will be set as `this` on the context. This is a good way\nto give your iterator function access to the current object.\n\nExample Usage:\n\n```javascript\nlet users = [\n { id: 1, name: 'Yehuda' },\n { id: 2, name: 'Tom' },\n { id: 3, name: 'Melanie' },\n { id: 4, name: 'Leah' }\n];\n\nusers.find((user) => user.name == 'Tom'); // [{ id: 2, name: 'Tom' }]\nusers.find(({ id }) => id == 3); // [{ id: 3, name: 'Melanie' }]\n```", + "itemtype": "method", + "name": "find", + "params": [ + { + "name": "callback", + "description": "The callback to execute", + "type": "Function" + }, + { + "name": "target", + "description": "The target object to use", + "type": "Object", + "optional": true + } + ], + "return": { + "description": "Found item or `undefined`.", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "EmberArray", + "module": "@ember/array" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 801, + "description": "Returns the first item with a property matching the passed value. You\ncan pass an optional second argument with the target value. Otherwise\nthis will match any property that evaluates to `true`.\n\nThis method works much like the more generic `find()` method.\n\nUsage Example:\n\n```javascript\nlet users = [\n { id: 1, name: 'Yehuda', isTom: false },\n { id: 2, name: 'Tom', isTom: true },\n { id: 3, name: 'Melanie', isTom: false },\n { id: 4, name: 'Leah', isTom: false }\n];\n\nusers.findBy('id', 4); // { id: 4, name: 'Leah', isTom: false }\nusers.findBy('name', 'Melanie'); // { id: 3, name: 'Melanie', isTom: false }\nusers.findBy('isTom'); // { id: 2, name: 'Tom', isTom: true }\n```", + "itemtype": "method", + "name": "findBy", + "params": [ + { + "name": "key", + "description": "the property to test", + "type": "String" + }, + { + "name": "value", + "description": "optional value to test against.", + "type": "String", + "optional": true + } + ], + "return": { + "description": "found item or `undefined`", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "EmberArray", + "module": "@ember/array" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 831, + "description": "Returns `true` if the passed function returns true for every item in the\nenumeration. This corresponds with the `Array.prototype.every()` method defined in ES5.\n\nThe callback method should have the following signature:\n\n```javascript\nfunction(item, index, array);\n```\n\n- `item` is the current item in the iteration.\n- `index` is the current index in the iteration.\n- `array` is the array itself.\n\nAll params are optional. The method should return `true` or `false`.\n\nNote that in addition to a callback, you can also pass an optional target\nobject that will be set as `this` on the context. This is a good way\nto give your iterator function access to the current object.\n\nUsage example:\n\n```javascript\nfunction isAdult(person) {\n return person.age > 18;\n};\n\nconst people = Ember.A([{ name: 'John', age: 24 }, { name: 'Joan', age: 45 }]);\nconst areAllAdults = people.every(isAdult);\n```", + "itemtype": "method", + "name": "every", + "params": [ + { + "name": "callback", + "description": "The callback to execute", + "type": "Function" + }, + { + "name": "target", + "description": "The target object to use", + "type": "Object", + "optional": true + } + ], + "return": { + "description": "", + "type": "Boolean" + }, + "access": "public", + "tagname": "", + "class": "EmberArray", + "module": "@ember/array" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 872, + "description": "Returns `true` if the passed property resolves to the value of the second\nargument for all items in the array. This method is often simpler/faster\nthan using a callback.\n\nNote that like the native `Array.every`, `isEvery` will return true when called\non any empty array.\n```javascript\nclass Language {\n constructor(name, isProgrammingLanguage) {\n this.name = name;\n this.programmingLanguage = isProgrammingLanguage;\n }\n}\n\nconst compiledLanguages = [\n new Language('Java', true),\n new Language('Go', true),\n new Language('Rust', true)\n]\n\nconst languagesKnownByMe = [\n new Language('Javascript', true),\n new Language('English', false),\n new Language('Ruby', true)\n]\n\ncompiledLanguages.isEvery('programmingLanguage'); // true\nlanguagesKnownByMe.isEvery('programmingLanguage'); // false\n```", + "itemtype": "method", + "name": "isEvery", + "params": [ + { + "name": "key", + "description": "the property to test", + "type": "String" + }, + { + "name": "value", + "description": "optional value to test against. Defaults to `true`", + "type": "String", + "optional": true + } + ], + "return": { + "description": "", + "type": "Boolean" + }, + "since": "1.3.0", + "access": "public", + "tagname": "", + "class": "EmberArray", + "module": "@ember/array" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 912, + "description": "The any() method executes the callback function once for each element\npresent in the array until it finds the one where callback returns a truthy\nvalue (i.e. `true`). If such an element is found, any() immediately returns\ntrue. Otherwise, any() returns false.\n\n```javascript\nfunction(item, index, array);\n```\n\n- `item` is the current item in the iteration.\n- `index` is the current index in the iteration.\n- `array` is the array object itself.\n\nNote that in addition to a callback, you can also pass an optional target\nobject that will be set as `this` on the context. It can be a good way\nto give your iterator function access to an object in cases where an ES6\narrow function would not be appropriate.\n\nUsage Example:\n\n```javascript\nlet includesManager = people.any(this.findPersonInManagersList, this);\n\nlet includesStockHolder = people.any(person => {\n return this.findPersonInStockHoldersList(person)\n});\n\nif (includesManager || includesStockHolder) {\n Paychecks.addBiggerBonus();\n}\n```", + "itemtype": "method", + "name": "any", + "params": [ + { + "name": "callback", + "description": "The callback to execute", + "type": "Function" + }, + { + "name": "target", + "description": "The target object to use", + "type": "Object", + "optional": true + } + ], + "return": { + "description": "`true` if the passed function returns `true` for any item", + "type": "Boolean" + }, + "access": "public", + "tagname": "", + "class": "EmberArray", + "module": "@ember/array" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 955, + "description": "Returns `true` if the passed property resolves to the value of the second\nargument for any item in the array. This method is often simpler/faster\nthan using a callback.\n\nExample usage:\n\n```javascript\nconst food = [\n { food: 'apple', isFruit: true },\n { food: 'bread', isFruit: false },\n { food: 'banana', isFruit: true }\n];\n\nfood.isAny('isFruit'); // true\n```", + "itemtype": "method", + "name": "isAny", + "params": [ + { + "name": "key", + "description": "the property to test", + "type": "String" + }, + { + "name": "value", + "description": "optional value to test against. Defaults to `true`", + "type": "String", + "optional": true + } + ], + "return": { + "description": "", + "type": "Boolean" + }, + "since": "1.3.0", + "access": "public", + "tagname": "", + "class": "EmberArray", + "module": "@ember/array" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 981, + "description": "This will combine the values of the array into a single value. It\nis a useful way to collect a summary value from an array. This\ncorresponds to the `reduce()` method defined in JavaScript 1.8.\n\nThe callback method you provide should have the following signature (all\nparameters are optional):\n\n```javascript\nfunction(previousValue, item, index, array);\n```\n\n- `previousValue` is the value returned by the last call to the iterator.\n- `item` is the current item in the iteration.\n- `index` is the current index in the iteration.\n- `array` is the array itself.\n\nReturn the new cumulative value.\n\nIn addition to the callback you can also pass an `initialValue`. An error\nwill be raised if you do not pass an initial value and the enumerator is\nempty.\n\nNote that unlike the other methods, this method does not allow you to\npass a target object to set as this for the callback. It's part of the\nspec. Sorry.\n\nExample Usage:\n\n```javascript\n let numbers = [1, 2, 3, 4, 5];\n\n numbers.reduce(function(summation, current) {\n return summation + current;\n }); // 15 (1 + 2 + 3 + 4 + 5)\n\n numbers.reduce(function(summation, current) {\n return summation + current;\n }, -15); // 0 (-15 + 1 + 2 + 3 + 4 + 5)\n\n\n let binaryValues = [true, false, false];\n\n binaryValues.reduce(function(truthValue, current) {\n return truthValue && current;\n }); // false (true && false && false)\n```", + "itemtype": "method", + "name": "reduce", + "params": [ + { + "name": "callback", + "description": "The callback to execute", + "type": "Function" + }, + { + "name": "initialValue", + "description": "Initial value for the reduce", + "type": "Object" + } + ], + "return": { + "description": "The reduced value.", + "type": "Object" + }, + "access": "public", + "tagname": "", + "class": "EmberArray", + "module": "@ember/array" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1039, + "description": "Invokes the named method on every object in the receiver that\nimplements it. This method corresponds to the implementation in\nPrototype 1.6.\n\n```javascript\nclass Person {\n name = null;\n\n constructor(name) {\n this.name = name;\n }\n\n greet(prefix='Hello') {\n return `${prefix} ${this.name}`;\n }\n}\n\nlet people = [new Person('Joe'), new Person('Matt')];\n\npeople.invoke('greet'); // ['Hello Joe', 'Hello Matt']\npeople.invoke('greet', 'Bonjour'); // ['Bonjour Joe', 'Bonjour Matt']\n```", + "itemtype": "method", + "name": "invoke", + "params": [ + { + "name": "methodName", + "description": "the name of the method", + "type": "String" + }, + { + "name": "args", + "description": "optional arguments to pass as well.", + "type": "Object..." + } + ], + "return": { + "description": "return values from calling invoke.", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "EmberArray", + "module": "@ember/array" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1073, + "description": "Simply converts the object into a genuine array. The order is not\nguaranteed. Corresponds to the method implemented by Prototype.", + "itemtype": "method", + "name": "toArray", + "return": { + "description": "the object as an array.", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "EmberArray", + "module": "@ember/array" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1082, + "description": "Returns a copy of the array with all `null` and `undefined` elements removed.\n\n```javascript\nlet arr = ['a', null, 'c', undefined];\narr.compact(); // ['a', 'c']\n```", + "itemtype": "method", + "name": "compact", + "return": { + "description": "the array without null and undefined elements.", + "type": "Array" + }, + "access": "public", + "tagname": "", + "class": "EmberArray", + "module": "@ember/array" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1095, + "description": "Used to determine if the array contains the passed object.\nReturns `true` if found, `false` otherwise.\n\nThe optional `startAt` argument can be used to pass a starting\nindex to search from, effectively slicing the searchable portion\nof the array. If it's negative it will add the array length to\nthe startAt value passed in as the index to search from. If less\nthan or equal to `-1 * array.length` the entire array is searched.\n\nThis method has the same behavior of JavaScript's [Array.includes](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes).\n\n```javascript\n[1, 2, 3].includes(2); // true\n[1, 2, 3].includes(4); // false\n[1, 2, 3].includes(3, 2); // true\n[1, 2, 3].includes(3, 3); // false\n[1, 2, 3].includes(3, -1); // true\n[1, 2, 3].includes(1, -1); // false\n[1, 2, 3].includes(1, -4); // true\n[1, 2, NaN].includes(NaN); // true\n```", + "itemtype": "method", + "name": "includes", + "params": [ + { + "name": "object", + "description": "The object to search for.", + "type": "Object" + }, + { + "name": "startAt", + "description": "optional starting location to search, default 0", + "type": "Number" + } + ], + "return": { + "description": "`true` if object is found in the array.", + "type": "Boolean" + }, + "access": "public", + "tagname": "", + "class": "EmberArray", + "module": "@ember/array" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1125, + "description": "Sorts the array by the keys specified in the argument.\n\nYou may provide multiple arguments to sort by multiple properties.\n\n```javascript\n let colors = [\n { name: 'red', weight: 500 },\n { name: 'green', weight: 600 },\n { name: 'blue', weight: 500 }\n];\n\n colors.sortBy('name');\n // [{name: 'blue', weight: 500}, {name: 'green', weight: 600}, {name: 'red', weight: 500}]\n\n colors.sortBy('weight', 'name');\n // [{name: 'blue', weight: 500}, {name: 'red', weight: 500}, {name: 'green', weight: 600}]\n ```", + "itemtype": "method", + "name": "sortBy", + "params": [ + { + "name": "property", + "description": "name(s) to sort on", + "type": "String" + } + ], + "return": { + "description": "The sorted array.", + "type": "Array" + }, + "since": "1.2.0", + "access": "public", + "tagname": "", + "class": "EmberArray", + "module": "@ember/array" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1150, + "description": "Returns a new array that contains only unique values. The default\nimplementation returns an array regardless of the receiver type.\n\n```javascript\nlet arr = ['a', 'a', 'b', 'b'];\narr.uniq(); // ['a', 'b']\n```\n\nThis only works on primitive data types, e.g. Strings, Numbers, etc.", + "itemtype": "method", + "name": "uniq", + "return": { + "description": "", + "type": "EmberArray" + }, + "access": "public", + "tagname": "", + "class": "EmberArray", + "module": "@ember/array" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1166, + "description": "Returns a new array that contains only items containing a unique property value.\nThe default implementation returns an array regardless of the receiver type.\n\n```javascript\nlet arr = [{ value: 'a' }, { value: 'a' }, { value: 'b' }, { value: 'b' }];\narr.uniqBy('value'); // [{ value: 'a' }, { value: 'b' }]\n\nlet arr = [2.2, 2.1, 3.2, 3.3];\narr.uniqBy(Math.floor); // [2.2, 3.2];\n```", + "itemtype": "method", + "name": "uniqBy", + "params": [ + { + "name": "key", + "description": "", + "type": "String,Function" + } + ], + "return": { + "description": "", + "type": "EmberArray" + }, + "access": "public", + "tagname": "", + "class": "EmberArray", + "module": "@ember/array" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 1185, + "description": "Returns a new array that excludes the passed value. The default\nimplementation returns an array regardless of the receiver type.\nIf the receiver does not contain the value it returns the original array.\n\n```javascript\nlet arr = ['a', 'b', 'a', 'c'];\narr.without('a'); // ['b', 'c']\n```", + "itemtype": "method", + "name": "without", + "params": [ + { + "name": "value", + "description": "", + "type": "Object" + } + ], + "return": { + "description": "", + "type": "EmberArray" + }, + "access": "public", + "tagname": "", + "class": "EmberArray", + "module": "@ember/array" + } + ], + "events": [], + "properties": [ + { + "file": "packages/@ember/array/index.ts", + "line": 253, + "description": "__Required.__ You must implement this method to apply this mixin.\n\nYour array must support the `length` property. Your replace methods should\nset this property whenever it changes.", + "itemtype": "property", + "name": "length", + "type": "Number", + "access": "public", + "tagname": "", + "class": "EmberArray", + "module": "@ember/array" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 304, + "description": "This is the handler for the special array content property. If you get\nthis property, it will return this. If you set this property to a new\narray, it will replace the current content.\n\n```javascript\nlet peopleToMoon = ['Armstrong', 'Aldrin'];\n\npeopleToMoon.get('[]'); // ['Armstrong', 'Aldrin']\n\npeopleToMoon.set('[]', ['Collins']); // ['Collins']\npeopleToMoon.get('[]'); // ['Collins']\n```", + "itemtype": "property", + "name": "[]", + "return": { + "description": "this" + }, + "access": "public", + "tagname": "", + "class": "EmberArray", + "module": "@ember/array" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 324, + "description": "The first object in the array, or `undefined` if the array is empty.\n\n```javascript\nlet vowels = ['a', 'e', 'i', 'o', 'u'];\nvowels.firstObject; // 'a'\n\nvowels.shiftObject();\nvowels.firstObject; // 'e'\n\nvowels.reverseObjects();\nvowels.firstObject; // 'u'\n\nvowels.clear();\nvowels.firstObject; // undefined\n```", + "itemtype": "property", + "name": "firstObject", + "return": { + "description": "The first object in the array", + "type": "Object | undefined" + }, + "access": "public", + "tagname": "", + "class": "EmberArray", + "module": "@ember/array" + }, + { + "file": "packages/@ember/array/index.ts", + "line": 346, + "description": "The last object in the array, or `undefined` if the array is empty.", + "itemtype": "property", + "name": "lastObject", + "return": { + "description": "The last object in the array", + "type": "Object | undefined" + }, + "access": "public", + "tagname": "", + "class": "EmberArray", + "module": "@ember/array" + } + ] + }, + "relationships": { + "parent-class": { + "data": null + }, + "descendants": { + "data": [] + }, + "module": { + "data": { + "id": "ember-5.12.0-@ember/array", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-5.12.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/5.12.0/classes/ember-5.12.0-EmberENV.json b/json-docs/ember/5.12.0/classes/ember-5.12.0-EmberENV.json new file mode 100644 index 000000000..0d7bc3f94 --- /dev/null +++ b/json-docs/ember/5.12.0/classes/ember-5.12.0-EmberENV.json @@ -0,0 +1,164 @@ +{ + "data": { + "id": "ember-5.12.0-EmberENV", + "type": "class", + "attributes": { + "name": "EmberENV", + "shortname": "EmberENV", + "classitems": [], + "plugins": [], + "extensions": [], + "plugin_for": [], + "extension_for": [], + "module": "rsvp", + "namespace": "", + "file": "packages/@ember/-internals/environment/lib/env.ts", + "line": 4, + "description": "The hash of environment variables used to control various configuration\nsettings. To specify your own or override default settings, add the\ndesired properties to a global hash named `EmberENV` (or `ENV` for\nbackwards compatibility with earlier versions of Ember). The `EmberENV`\nhash must be created before loading Ember.", + "type": "Object", + "access": "public", + "tagname": "", + "methods": [], + "events": [], + "properties": [ + { + "file": "packages/@ember/-internals/environment/lib/env.ts", + "line": 18, + "description": "Determines whether Ember should add to `Array`\nnative object prototypes, a few extra methods in order to provide a more\nfriendly API.\n\nWe generally recommend leaving this option set to true however, if you need\nto turn it off, you can add the configuration property\n`EXTEND_PROTOTYPES` to `EmberENV` and set it to `false`.\n\nNote, when disabled (the default configuration for Ember Addons), you will\ninstead have to access all methods and functions from the Ember\nnamespace.", + "itemtype": "property", + "name": "EXTEND_PROTOTYPES", + "type": "Boolean", + "default": "true", + "access": "public", + "tagname": "", + "class": "EmberENV", + "module": "rsvp" + }, + { + "file": "packages/@ember/-internals/environment/lib/env.ts", + "line": 41, + "description": "The `LOG_STACKTRACE_ON_DEPRECATION` property, when true, tells Ember to log\na full stack trace during deprecation warnings.", + "itemtype": "property", + "name": "LOG_STACKTRACE_ON_DEPRECATION", + "type": "Boolean", + "default": "true", + "access": "public", + "tagname": "", + "class": "EmberENV", + "module": "rsvp" + }, + { + "file": "packages/@ember/-internals/environment/lib/env.ts", + "line": 53, + "description": "The `LOG_VERSION` property, when true, tells Ember to log versions of all\ndependent libraries in use.", + "itemtype": "property", + "name": "LOG_VERSION", + "type": "Boolean", + "default": "true", + "access": "public", + "tagname": "", + "class": "EmberENV", + "module": "rsvp" + }, + { + "file": "packages/@ember/-internals/environment/lib/env.ts", + "line": 69, + "description": "Whether to perform extra bookkeeping needed to make the `captureRenderTree`\nAPI work.\n\nThis has to be set before the ember JavaScript code is evaluated. This is\nusually done by setting `window.EmberENV = { _DEBUG_RENDER_TREE: true };`\nbefore the \"vendor\" `
message
options
id
package-name.specific-deprecation
until
next
package-name.specific-warning
{{validationError}}
First Name must be at least 3 characters long.