diff --git a/json-docs/ember/7.2.0/classes/ember-7.2.0-@ember/array.json b/json-docs/ember/7.2.0/classes/ember-7.2.0-@ember/array.json new file mode 100644 index 000000000..9cfb3d203 --- /dev/null +++ b/json-docs/ember/7.2.0/classes/ember-7.2.0-@ember/array.json @@ -0,0 +1,189 @@ +{ + "data": { + "id": "ember-7.2.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/is-array.ts", + "line": 11, + "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/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": 1810, + "description": "Creates an `NativeArray` from an Array-like object.\nDoes not modify the original object's contents.\n \nThis exists primarily for historic reasons and should not be used\nin new code. Prefer native [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)\nor [trackedArray](/ember/release/functions/@ember%2Freactive%2Fcollections/trackedArray).\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": 1931, + "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": 1952, + "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": 1973, + "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": 1993, + "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-7.2.0-ember", + "type": "module" + } + }, + "project-version": { + "data": { + "id": "ember-7.2.0", + "type": "project-version" + } + } + } + } +} \ No newline at end of file diff --git a/json-docs/ember/7.2.0/classes/ember-7.2.0-@ember/component.json b/json-docs/ember/7.2.0/classes/ember-7.2.0-@ember/component.json new file mode 100644 index 000000000..b77022958 --- /dev/null +++ b/json-docs/ember/7.2.0/classes/ember-7.2.0-@ember/component.json @@ -0,0 +1,167 @@ +{ + "data": { + "id": "ember-7.2.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": 46, + "description": "The `Input` component lets you create an HTML `` element.\n\n```gjs\nimport { Input } from '@ember/component';\n \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\n\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", + "static": 1, + "params": [ + { + "name": "options", + "description": "", + "type": "Hash" + } + ], + "access": "public", + "tagname": "", + "class": "@ember/component", + "module": "@ember/component" + }, + { + "file": "packages/@ember/-internals/glimmer/lib/components/textarea.ts", + "line": 10, + "description": "The `Textarea` component inserts a new instance of `\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```gjs {data-filename=\"app/components/word-editor.gjs\"}\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