Skip to content

Commit 52436a2

Browse files
committed
add missing entries for Ember up to 4.12
1 parent 69d3e0e commit 52436a2

File tree

823 files changed

+283131
-828
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

823 files changed

+283131
-828
lines changed
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
{
2+
"data": {
3+
"id": "ember-4.0.1-@ember/application",
4+
"type": "class",
5+
"attributes": {
6+
"name": "@ember/application",
7+
"shortname": "@ember/application",
8+
"classitems": [],
9+
"plugins": [],
10+
"extensions": [],
11+
"plugin_for": [],
12+
"extension_for": [],
13+
"module": "@ember/application",
14+
"namespace": "",
15+
"methods": [
16+
{
17+
"file": "packages/@ember/-internals/owner/index.ts",
18+
"line": 41,
19+
"description": "<html><head></head><body><p>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 &quot;owner&quot;, which handled its\ninstantiation and manages its lifetime.</p>\n<p><code>getOwner</code> 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.</p>\n<p>For example, this component dynamically looks up a service based on the\n<code>audioType</code> passed as an argument:</p>\n<div class=\"highlight javascript\">\n <div class=\"ribbon\"></div>\n <div class=\"scroller\">\n <table class=\"CodeRay\">\n <thead>\n <tr>\n <td colspan=\"2\">audio.js</td>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td class=\"line-numbers\"><pre>1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n</pre></td>\n <td class=\"code\"><pre><span class=\"keyword\">import</span> <span class=\"type\">Component</span> from &apos;<span class=\"meta\">@glimmer</span>/component&apos;;\n<span class=\"keyword\">import</span> { action } from &apos;<span class=\"meta\">@ember</span>/<span class=\"class\"><span class=\"keyword\">object</span>&apos;</span>;\n<span class=\"keyword\">import</span> { getOwner } from &apos;<span class=\"meta\">@ember</span>/application&apos;;\n\n<span class=\"comment\">// Usage:</span>\n<span class=\"comment\">//</span>\n<span class=\"comment\">// &lt;PlayAudio @audioType={{@model.audioType}} @audioFile={{@model.file}}/&gt;</span>\n<span class=\"comment\">//</span>\n<span class=\"keyword\">export</span> <span class=\"keyword\">default</span> <span class=\"class\"><span class=\"keyword\">class</span> <span class=\"keyword\">extends</span> <span class=\"title\">Component</span> </span>{\n get audioService() {\n let owner = getOwner(<span class=\"keyword\">this</span>);\n <span class=\"keyword\">return</span> owner.lookup(`service:${<span class=\"keyword\">this</span>.args.audioType}`);\n }\n\n <span class=\"meta\">@action</span>\n onPlay() {\n let player = <span class=\"keyword\">this</span>.audioService;\n player.play(<span class=\"keyword\">this</span>.args.audioFile);\n }\n}</pre></td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n \n</body></html>",
20+
"itemtype": "method",
21+
"name": "getOwner",
22+
"static": 1,
23+
"params": [
24+
{
25+
"name": "object",
26+
"description": "An object with an owner.",
27+
"type": "Object"
28+
}
29+
],
30+
"return": {
31+
"description": "An owner object.",
32+
"type": "Object"
33+
},
34+
"since": "2.3.0",
35+
"access": "public",
36+
"tagname": "",
37+
"class": "@ember/application",
38+
"module": "@ember/application"
39+
},
40+
{
41+
"file": "packages/@ember/-internals/owner/index.ts",
42+
"line": 89,
43+
"description": "<html><head></head><body><p><code>setOwner</code> forces a new owner on a given object instance. This is primarily\nuseful in some testing cases.</p>\n</body></html>",
44+
"itemtype": "method",
45+
"name": "setOwner",
46+
"static": 1,
47+
"params": [
48+
{
49+
"name": "object",
50+
"description": "An object instance.",
51+
"type": "Object"
52+
},
53+
{
54+
"name": "object",
55+
"description": "The new owner object of the object instance.",
56+
"type": "Object"
57+
}
58+
],
59+
"since": "2.3.0",
60+
"access": "public",
61+
"tagname": "",
62+
"class": "@ember/application",
63+
"module": "@ember/application"
64+
},
65+
{
66+
"file": "packages/@ember/application/lib/lazy_load.js",
67+
"line": 14,
68+
"description": "<html><head></head><body><p>Detects when a specific package of Ember (e.g. &apos;Application&apos;)\nhas fully loaded and is available for extension.</p>\n<p>The provided <code>callback</code> will be called with the <code>name</code> passed\nresolved from a string into the object:</p>\n<div class=\"highlight javascript\">\n <div class=\"ribbon\"></div>\n <div class=\"scroller\">\n <table class=\"CodeRay\">\n <tbody>\n <tr>\n <td class=\"line-numbers\"><pre>1\n2\n3\n4\n5\n</pre></td>\n <td class=\"code\"><pre><span class=\"keyword\">import</span> { onLoad } <span class=\"keyword\">from</span> <span class=\"string\">&apos;@ember/application&apos;</span>;\n\n<span class=\"title function_\">onLoad</span>(<span class=\"string\">&apos;Ember.Application&apos;</span> <span class=\"keyword\">function</span>(<span class=\"params\">hbars</span>) {\n hbars.<span class=\"title function_\">registerHelper</span>(...);\n});</pre></td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n \n</body></html>",
69+
"itemtype": "method",
70+
"name": "onLoad",
71+
"static": 1,
72+
"params": [
73+
{
74+
"name": "name",
75+
"description": "name of hook",
76+
"type": "String"
77+
},
78+
{
79+
"name": "callback",
80+
"description": "callback to be called",
81+
"type": "Function"
82+
}
83+
],
84+
"access": "private",
85+
"tagname": "",
86+
"class": "@ember/application",
87+
"module": "@ember/application"
88+
},
89+
{
90+
"file": "packages/@ember/application/lib/lazy_load.js",
91+
"line": 47,
92+
"description": "<html><head></head><body><p>Called when an Ember.js package (e.g Application) has finished\nloading. Triggers any callbacks registered for this event.</p>\n</body></html>",
93+
"itemtype": "method",
94+
"name": "runLoadHooks",
95+
"static": 1,
96+
"params": [
97+
{
98+
"name": "name",
99+
"description": "name of hook",
100+
"type": "String"
101+
},
102+
{
103+
"name": "object",
104+
"description": "object to pass to callbacks",
105+
"type": "Object"
106+
}
107+
],
108+
"access": "private",
109+
"tagname": "",
110+
"class": "@ember/application",
111+
"module": "@ember/application"
112+
}
113+
],
114+
"events": [],
115+
"properties": []
116+
},
117+
"relationships": {
118+
"parent-class": {
119+
"data": null
120+
},
121+
"descendants": {
122+
"data": []
123+
},
124+
"module": {
125+
"data": {
126+
"id": "ember-4.0.1-@ember/application",
127+
"type": "module"
128+
}
129+
},
130+
"project-version": {
131+
"data": {
132+
"id": "ember-4.0.1",
133+
"type": "project-version"
134+
}
135+
}
136+
}
137+
}
138+
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
"data": {
3+
"id": "ember-4.0.1-@ember/component/helper",
4+
"type": "class",
5+
"attributes": {
6+
"name": "@ember/component/helper",
7+
"shortname": "@ember/component/helper",
8+
"classitems": [],
9+
"plugins": [],
10+
"extensions": [],
11+
"plugin_for": [],
12+
"extension_for": [],
13+
"module": "@ember/component",
14+
"namespace": "",
15+
"methods": [
16+
{
17+
"file": "packages/@ember/-internals/glimmer/lib/helper.ts",
18+
"line": 231,
19+
"description": "<html><head></head><body><p>In many cases it is not necessary to use the full <code>Helper</code> class.\nThe <code>helper</code> method create pure-function helpers without instances.\nFor example:</p>\n<div class=\"highlight javascript\">\n <div class=\"ribbon\"></div>\n <div class=\"scroller\">\n <table class=\"CodeRay\">\n <thead>\n <tr>\n <td colspan=\"2\">currency.js</td>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td class=\"line-numbers\"><pre>1\n2\n3\n4\n5\n</pre></td>\n <td class=\"code\"><pre><span class=\"keyword\">import</span> { helper } <span class=\"keyword\">from</span> <span class=\"string\">&apos;@ember/component/helper&apos;</span>;\n\n<span class=\"keyword\">export</span> <span class=\"keyword\">default</span> <span class=\"title function_\">helper</span>(<span class=\"keyword\">function</span>(<span class=\"params\">[cents], {currency}</span>) {\n <span class=\"keyword\">return</span> <span class=\"string\">`<span class=\"subst\">${currency}</span><span class=\"subst\">${cents * <span class=\"number\">0.01</span>}</span>`</span>;\n});</pre></td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n \n</body></html>",
20+
"static": 1,
21+
"params": [
22+
{
23+
"name": "helper",
24+
"description": "The helper function",
25+
"type": "Function"
26+
}
27+
],
28+
"itemtype": "method",
29+
"name": "helper",
30+
"access": "public",
31+
"tagname": "",
32+
"since": "1.13.0",
33+
"class": "@ember/component/helper",
34+
"module": "@ember/component"
35+
}
36+
],
37+
"events": [],
38+
"properties": []
39+
},
40+
"relationships": {
41+
"parent-class": {
42+
"data": null
43+
},
44+
"descendants": {
45+
"data": []
46+
},
47+
"module": {
48+
"data": {
49+
"id": "ember-4.0.1-@ember/component",
50+
"type": "module"
51+
}
52+
},
53+
"project-version": {
54+
"data": {
55+
"id": "ember-4.0.1",
56+
"type": "project-version"
57+
}
58+
}
59+
}
60+
}
61+
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"data": {
3+
"id": "ember-4.0.1-@ember/controller",
4+
"type": "class",
5+
"attributes": {
6+
"name": "@ember/controller",
7+
"shortname": "@ember/controller",
8+
"classitems": [],
9+
"plugins": [],
10+
"extensions": [],
11+
"plugin_for": [],
12+
"extension_for": [],
13+
"module": "@ember/controller",
14+
"namespace": "",
15+
"methods": [
16+
{
17+
"file": "packages/@ember/controller/index.js",
18+
"line": 17,
19+
"description": "<html><head></head><body><p>Creates a property that lazily looks up another controller in the container.\nCan only be used when defining another controller.</p>\n<p>Example:</p>\n<div class=\"highlight javascript\">\n <div class=\"ribbon\"></div>\n <div class=\"scroller\">\n <table class=\"CodeRay\">\n <thead>\n <tr>\n <td colspan=\"2\">app/controllers/post.js</td>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td class=\"line-numbers\"><pre>1\n2\n3\n4\n5\n6\n7\n</pre></td>\n <td class=\"code\"><pre><span class=\"keyword\">import</span> <span class=\"type\">Controller</span>, {\n inject as controller\n} from &apos;<span class=\"meta\">@ember</span>/controller&apos;;\n\n<span class=\"keyword\">export</span> <span class=\"keyword\">default</span> <span class=\"class\"><span class=\"keyword\">class</span> <span class=\"title\">PostController</span> <span class=\"keyword\">extends</span> <span class=\"title\">Controller</span> </span>{\n <span class=\"meta\">@controller</span> posts;\n}</pre></td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n \n<p>Classic Class Example:</p>\n<div class=\"highlight javascript\">\n <div class=\"ribbon\"></div>\n <div class=\"scroller\">\n <table class=\"CodeRay\">\n <thead>\n <tr>\n <td colspan=\"2\">app/controllers/post.js</td>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td class=\"line-numbers\"><pre>1\n2\n3\n4\n5\n6\n7\n</pre></td>\n <td class=\"code\"><pre><span class=\"keyword\">import</span> Controller, {\n inject <span class=\"keyword\">as</span> controller\n} <span class=\"keyword\">from</span> <span class=\"string\">&apos;@ember/controller&apos;</span>;\n\n<span class=\"keyword\">export</span> <span class=\"keyword\">default</span> Controller.extend({\n posts: controller()\n});</pre></td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n \n<p>This example will create a <code>posts</code> property on the <code>post</code> controller that\nlooks up the <code>posts</code> controller in the container, making it easy to reference\nother controllers.</p>\n</body></html>",
20+
"itemtype": "method",
21+
"name": "inject",
22+
"static": 1,
23+
"since": "1.10.0",
24+
"params": [
25+
{
26+
"name": "name",
27+
"description": "(optional) name of the controller to inject, defaults to\n the property's name",
28+
"type": "String"
29+
}
30+
],
31+
"return": {
32+
"description": "injection decorator instance",
33+
"type": "ComputedDecorator"
34+
},
35+
"access": "public",
36+
"tagname": "",
37+
"class": "@ember/controller",
38+
"module": "@ember/controller"
39+
}
40+
],
41+
"events": [],
42+
"properties": []
43+
},
44+
"relationships": {
45+
"parent-class": {
46+
"data": null
47+
},
48+
"descendants": {
49+
"data": []
50+
},
51+
"module": {
52+
"data": {
53+
"id": "ember-4.0.1-@ember/controller",
54+
"type": "module"
55+
}
56+
},
57+
"project-version": {
58+
"data": {
59+
"id": "ember-4.0.1",
60+
"type": "project-version"
61+
}
62+
}
63+
}
64+
}
65+
}

0 commit comments

Comments
 (0)