ember-source 4.1.0-alpha.4 → 4.1.0-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +88 -56
- package/blueprints/acceptance-test/qunit-files/tests/acceptance/__name__-test.js +1 -1
- package/blueprints/acceptance-test/qunit-rfc-232-files/tests/acceptance/__name__-test.js +1 -1
- package/blueprints/component-test/qunit-files/__root__/__testType__/__path__/__test__.js +3 -3
- package/blueprints/helper-test/index.js +4 -22
- package/blueprints/helper-test/mocha-0.12-files/__root__/__testType__/__collection__/__name__-test.js +1 -13
- package/blueprints/helper-test/mocha-files/__root__/__testType__/__collection__/__name__-test.js +0 -13
- package/blueprints/helper-test/mocha-rfc-232-files/__root__/__testType__/__collection__/__name__-test.js +2 -12
- package/blueprints/helper-test/qunit-files/__root__/__testType__/__collection__/__name__-test.js +2 -13
- package/blueprints/helper-test/qunit-rfc-232-files/__root__/__testType__/__collection__/__name__-test.js +2 -14
- package/build-metadata.json +3 -3
- package/dist/dependencies/@glimmer/manager.js +19 -98
- package/dist/dependencies/@glimmer/opcode-compiler.js +9 -146
- package/dist/dependencies/@glimmer/validator.js +19 -51
- package/dist/ember-template-compiler.js +378 -696
- package/dist/ember-template-compiler.map +1 -1
- package/dist/ember-testing.js +1 -1
- package/dist/ember-testing.map +1 -1
- package/dist/ember.debug.js +3299 -6328
- package/dist/ember.debug.map +1 -1
- package/dist/header/license.js +1 -1
- package/dist/packages/@ember/-internals/container/index.js +1 -1
- package/dist/packages/@ember/-internals/environment/index.js +0 -15
- package/dist/packages/@ember/-internals/glimmer/index.js +4824 -6772
- package/dist/packages/@ember/-internals/metal/index.js +57 -103
- package/dist/packages/@ember/-internals/routing/lib/ext/controller.js +1 -0
- package/dist/packages/@ember/-internals/routing/lib/location/api.js +10 -1
- package/dist/packages/@ember/-internals/routing/lib/location/none_location.js +7 -2
- package/dist/packages/@ember/-internals/routing/lib/services/router.js +8 -8
- package/dist/packages/@ember/-internals/routing/lib/services/routing.js +1 -1
- package/dist/packages/@ember/-internals/routing/lib/system/route.js +5 -43
- package/dist/packages/@ember/-internals/routing/lib/system/router.js +36 -46
- package/dist/packages/@ember/-internals/runtime/lib/mixins/array.js +2 -173
- package/dist/packages/@ember/-internals/runtime/lib/mixins/target_action_support.js +3 -43
- package/dist/packages/@ember/-internals/runtime/lib/system/array_proxy.js +8 -15
- package/dist/packages/@ember/-internals/utils/index.js +0 -3
- package/dist/packages/@ember/-internals/views/index.js +0 -1
- package/dist/packages/@ember/-internals/views/lib/mixins/view_support.js +4 -4
- package/dist/packages/@ember/application/lib/application.js +8 -9
- package/dist/packages/@ember/canary-features/index.js +1 -3
- package/dist/packages/@ember/component/index.js +1 -1
- package/dist/packages/@ember/deprecated-features/index.js +0 -1
- package/dist/packages/@ember/destroyable/index.js +15 -4
- package/dist/packages/@ember/engine/index.js +1 -2
- package/dist/packages/@ember/routing/index.js +1 -1
- package/dist/packages/@ember/service/index.js +19 -5
- package/dist/packages/@glimmer/tracking/index.js +203 -1
- package/dist/packages/ember/index.js +11 -63
- package/dist/packages/ember/version.js +1 -1
- package/docs/data.json +459 -1384
- package/lib/index.js +13 -76
- package/package.json +19 -20
- package/dist/packages/@ember/-internals/views/lib/mixins/text_support.js +0 -345
- package/dist/packages/@ember/component/checkbox.js +0 -17
- package/dist/packages/@ember/component/text-area.js +0 -17
- package/dist/packages/@ember/component/text-field.js +0 -17
- package/dist/packages/@ember/routing/link-component.js +0 -17
- package/dist/packages/jquery/index.js +0 -2
package/docs/data.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "The Ember API",
|
|
4
4
|
"description": "The Ember API: a framework for building ambitious web applications",
|
|
5
5
|
"url": "https://emberjs.com/",
|
|
6
|
-
"version": "4.1.0-alpha.
|
|
6
|
+
"version": "4.1.0-alpha.8"
|
|
7
7
|
},
|
|
8
8
|
"files": {
|
|
9
9
|
"node_modules/rsvp/lib/rsvp/promise/all.js": {
|
|
@@ -220,27 +220,6 @@
|
|
|
220
220
|
"fors": {},
|
|
221
221
|
"namespaces": {}
|
|
222
222
|
},
|
|
223
|
-
"packages/@ember/-internals/glimmer/lib/components/-link-to.ts": {
|
|
224
|
-
"name": "packages/@ember/-internals/glimmer/lib/components/-link-to.ts",
|
|
225
|
-
"modules": {},
|
|
226
|
-
"classes": {
|
|
227
|
-
"LinkComponent": 1
|
|
228
|
-
},
|
|
229
|
-
"fors": {
|
|
230
|
-
"Ember.Templates.components": 1,
|
|
231
|
-
"Ember.Templates.helpers": 1
|
|
232
|
-
},
|
|
233
|
-
"namespaces": {}
|
|
234
|
-
},
|
|
235
|
-
"packages/@ember/-internals/glimmer/lib/components/-textarea.ts": {
|
|
236
|
-
"name": "packages/@ember/-internals/glimmer/lib/components/-textarea.ts",
|
|
237
|
-
"modules": {},
|
|
238
|
-
"classes": {
|
|
239
|
-
"TextArea": 1
|
|
240
|
-
},
|
|
241
|
-
"fors": {},
|
|
242
|
-
"namespaces": {}
|
|
243
|
-
},
|
|
244
223
|
"packages/@ember/-internals/glimmer/lib/components/abstract-input.ts": {
|
|
245
224
|
"name": "packages/@ember/-internals/glimmer/lib/components/abstract-input.ts",
|
|
246
225
|
"modules": {},
|
|
@@ -248,21 +227,13 @@
|
|
|
248
227
|
"fors": {},
|
|
249
228
|
"namespaces": {}
|
|
250
229
|
},
|
|
251
|
-
"packages/@ember/-internals/glimmer/lib/components/checkbox.ts": {
|
|
252
|
-
"name": "packages/@ember/-internals/glimmer/lib/components/checkbox.ts",
|
|
253
|
-
"modules": {},
|
|
254
|
-
"classes": {
|
|
255
|
-
"Checkbox": 1
|
|
256
|
-
},
|
|
257
|
-
"fors": {},
|
|
258
|
-
"namespaces": {}
|
|
259
|
-
},
|
|
260
230
|
"packages/@ember/-internals/glimmer/lib/components/input.ts": {
|
|
261
231
|
"name": "packages/@ember/-internals/glimmer/lib/components/input.ts",
|
|
262
232
|
"modules": {},
|
|
263
233
|
"classes": {},
|
|
264
234
|
"fors": {
|
|
265
235
|
"Ember.Templates.helpers": 1,
|
|
236
|
+
"@ember/component": 1,
|
|
266
237
|
"Ember.Templates.components": 1
|
|
267
238
|
},
|
|
268
239
|
"namespaces": {}
|
|
@@ -274,13 +245,15 @@
|
|
|
274
245
|
"fors": {},
|
|
275
246
|
"namespaces": {}
|
|
276
247
|
},
|
|
277
|
-
"packages/@ember/-internals/glimmer/lib/components/
|
|
278
|
-
"name": "packages/@ember/-internals/glimmer/lib/components/
|
|
248
|
+
"packages/@ember/-internals/glimmer/lib/components/link-to.ts": {
|
|
249
|
+
"name": "packages/@ember/-internals/glimmer/lib/components/link-to.ts",
|
|
279
250
|
"modules": {},
|
|
280
|
-
"classes": {
|
|
281
|
-
|
|
251
|
+
"classes": {},
|
|
252
|
+
"fors": {
|
|
253
|
+
"Ember.Templates.components": 1,
|
|
254
|
+
"Ember.Templates.helpers": 1,
|
|
255
|
+
"@ember/routing": 1
|
|
282
256
|
},
|
|
283
|
-
"fors": {},
|
|
284
257
|
"namespaces": {}
|
|
285
258
|
},
|
|
286
259
|
"packages/@ember/-internals/glimmer/lib/components/textarea.ts": {
|
|
@@ -289,7 +262,8 @@
|
|
|
289
262
|
"classes": {},
|
|
290
263
|
"fors": {
|
|
291
264
|
"Ember.Templates.components": 1,
|
|
292
|
-
"Ember.Templates.helpers": 1
|
|
265
|
+
"Ember.Templates.helpers": 1,
|
|
266
|
+
"@ember/component": 1
|
|
293
267
|
},
|
|
294
268
|
"namespaces": {}
|
|
295
269
|
},
|
|
@@ -422,15 +396,6 @@
|
|
|
422
396
|
},
|
|
423
397
|
"namespaces": {}
|
|
424
398
|
},
|
|
425
|
-
"packages/@ember/-internals/glimmer/lib/helpers/query-param.ts": {
|
|
426
|
-
"name": "packages/@ember/-internals/glimmer/lib/helpers/query-param.ts",
|
|
427
|
-
"modules": {},
|
|
428
|
-
"classes": {},
|
|
429
|
-
"fors": {
|
|
430
|
-
"Ember.Templates.helpers": 1
|
|
431
|
-
},
|
|
432
|
-
"namespaces": {}
|
|
433
|
-
},
|
|
434
399
|
"packages/@ember/-internals/glimmer/lib/helpers/readonly.ts": {
|
|
435
400
|
"name": "packages/@ember/-internals/glimmer/lib/helpers/readonly.ts",
|
|
436
401
|
"modules": {},
|
|
@@ -601,13 +566,6 @@
|
|
|
601
566
|
},
|
|
602
567
|
"namespaces": {}
|
|
603
568
|
},
|
|
604
|
-
"packages/@ember/-internals/metal/lib/cached.ts": {
|
|
605
|
-
"name": "packages/@ember/-internals/metal/lib/cached.ts",
|
|
606
|
-
"modules": {},
|
|
607
|
-
"classes": {},
|
|
608
|
-
"fors": {},
|
|
609
|
-
"namespaces": {}
|
|
610
|
-
},
|
|
611
569
|
"packages/@ember/-internals/metal/lib/computed.ts": {
|
|
612
570
|
"name": "packages/@ember/-internals/metal/lib/computed.ts",
|
|
613
571
|
"modules": {},
|
|
@@ -1275,17 +1233,6 @@
|
|
|
1275
1233
|
"Ember": 1
|
|
1276
1234
|
}
|
|
1277
1235
|
},
|
|
1278
|
-
"packages/@ember/-internals/views/lib/mixins/text_support.js": {
|
|
1279
|
-
"name": "packages/@ember/-internals/views/lib/mixins/text_support.js",
|
|
1280
|
-
"modules": {},
|
|
1281
|
-
"classes": {
|
|
1282
|
-
"Ember.TextSupport": 1
|
|
1283
|
-
},
|
|
1284
|
-
"fors": {},
|
|
1285
|
-
"namespaces": {
|
|
1286
|
-
"Ember": 1
|
|
1287
|
-
}
|
|
1288
|
-
},
|
|
1289
1236
|
"packages/@ember/-internals/views/lib/mixins/view_state_support.js": {
|
|
1290
1237
|
"name": "packages/@ember/-internals/views/lib/mixins/view_state_support.js",
|
|
1291
1238
|
"modules": {},
|
|
@@ -1796,6 +1743,56 @@
|
|
|
1796
1743
|
"access": "public",
|
|
1797
1744
|
"tagname": ""
|
|
1798
1745
|
},
|
|
1746
|
+
"@ember/component": {
|
|
1747
|
+
"name": "@ember/component",
|
|
1748
|
+
"submodules": {},
|
|
1749
|
+
"elements": {},
|
|
1750
|
+
"classes": {
|
|
1751
|
+
"@ember/component": 1,
|
|
1752
|
+
"Component": 1,
|
|
1753
|
+
"Helper": 1,
|
|
1754
|
+
"@ember/component/helper": 1
|
|
1755
|
+
},
|
|
1756
|
+
"fors": {
|
|
1757
|
+
"Ember.Templates.helpers": 1,
|
|
1758
|
+
"@ember/component": 1,
|
|
1759
|
+
"Ember.Templates.components": 1,
|
|
1760
|
+
"@ember/component/helper": 1
|
|
1761
|
+
},
|
|
1762
|
+
"namespaces": {},
|
|
1763
|
+
"tag": "main",
|
|
1764
|
+
"file": "packages/@ember/-internals/glimmer/lib/helper.ts",
|
|
1765
|
+
"line": 34,
|
|
1766
|
+
"description": "[Glimmer](https://github.com/tildeio/glimmer) is a templating engine used by Ember.js that is compatible with a subset of the [Handlebars](http://handlebarsjs.com/) syntax.\n\n### Showing a property\n\nTemplates manage the flow of an application's UI, and display state (through\nthe DOM) to a user. For example, given a component with the property \"name\",\nthat component's template can use the name in several ways:\n\n```app/components/person-profile.js\nimport Component from '@ember/component';\n\nexport default Component.extend({\n name: 'Jill'\n});\n```\n\n```app/components/person-profile.hbs\n{{this.name}}\n<div>{{this.name}}</div>\n<span data-name={{this.name}}></span>\n```\n\nAny time the \"name\" property on the component changes, the DOM will be\nupdated.\n\nProperties can be chained as well:\n\n```handlebars\n{{@aUserModel.name}}\n<div>{{@listOfUsers.firstObject.name}}</div>\n```\n\n### Using Ember helpers\n\nWhen content is passed in mustaches `{{}}`, Ember will first try to find a helper\nor component with that name. For example, the `if` helper:\n\n```app/components/person-profile.hbs\n{{if this.name \"I have a name\" \"I have no name\"}}\n<span data-has-name={{if this.name true}}></span>\n```\n\nThe returned value is placed where the `{{}}` is called. The above style is\ncalled \"inline\". A second style of helper usage is called \"block\". For example:\n\n```handlebars\n{{#if this.name}}\n I have a name\n{{else}}\n I have no name\n{{/if}}\n```\n\nThe block form of helpers allows you to control how the UI is created based\non the values of properties.\nA third form of helper is called \"nested\". For example here the concat\nhelper will add \" Doe\" to a displayed name if the person has no last name:\n\n```handlebars\n<span data-name={{concat this.firstName (\n if this.lastName (concat \" \" this.lastName) \"Doe\"\n)}}></span>\n```\n\nEmber's built-in helpers are described under the [Ember.Templates.helpers](/ember/release/classes/Ember.Templates.helpers)\nnamespace. Documentation on creating custom helpers can be found under\n[helper](/ember/release/functions/@ember%2Fcomponent%2Fhelper/helper) (or\nunder [Helper](/ember/release/classes/Helper) if a helper requires access to\ndependency injection).\n\n### Invoking a Component\n\nEmber components represent state to the UI of an application. Further\nreading on components can be found under [Component](/ember/release/classes/Component).",
|
|
1767
|
+
"itemtype": "main"
|
|
1768
|
+
},
|
|
1769
|
+
"@ember/routing": {
|
|
1770
|
+
"name": "@ember/routing",
|
|
1771
|
+
"submodules": {},
|
|
1772
|
+
"elements": {},
|
|
1773
|
+
"classes": {
|
|
1774
|
+
"Ember.Templates.components": 1,
|
|
1775
|
+
"@ember/routing": 1,
|
|
1776
|
+
"Location": 1,
|
|
1777
|
+
"AutoLocation": 1,
|
|
1778
|
+
"HashLocation": 1,
|
|
1779
|
+
"HistoryLocation": 1,
|
|
1780
|
+
"NoneLocation": 1,
|
|
1781
|
+
"RouterService": 1,
|
|
1782
|
+
"Route": 1,
|
|
1783
|
+
"EmberRouter": 1,
|
|
1784
|
+
"Transition": 1
|
|
1785
|
+
},
|
|
1786
|
+
"fors": {
|
|
1787
|
+
"Ember.Templates.helpers": 1,
|
|
1788
|
+
"@ember/routing": 1,
|
|
1789
|
+
"Route": 1
|
|
1790
|
+
},
|
|
1791
|
+
"namespaces": {},
|
|
1792
|
+
"tag": "module",
|
|
1793
|
+
"file": "packages/@ember/-internals/routing/lib/system/transition.ts",
|
|
1794
|
+
"line": 1
|
|
1795
|
+
},
|
|
1799
1796
|
"ember": {
|
|
1800
1797
|
"name": "ember",
|
|
1801
1798
|
"submodules": {},
|
|
@@ -1822,7 +1819,6 @@
|
|
|
1822
1819
|
"Ember.Namespace": 1,
|
|
1823
1820
|
"Ember.ActionSupport": 1,
|
|
1824
1821
|
"Ember.ClassNamesSupport": 1,
|
|
1825
|
-
"Ember.TextSupport": 1,
|
|
1826
1822
|
"Ember.ViewMixin": 1,
|
|
1827
1823
|
"Ember.EventDispatcher": 1,
|
|
1828
1824
|
"Ember.CoreView": 1,
|
|
@@ -1830,7 +1826,6 @@
|
|
|
1830
1826
|
"Ember.Test": 1
|
|
1831
1827
|
},
|
|
1832
1828
|
"fors": {
|
|
1833
|
-
"Ember.Templates.components": 1,
|
|
1834
1829
|
"Ember.Templates.helpers": 1,
|
|
1835
1830
|
"Ember": 1,
|
|
1836
1831
|
"@ember/object": 1,
|
|
@@ -1847,56 +1842,6 @@
|
|
|
1847
1842
|
"access": "private",
|
|
1848
1843
|
"tagname": ""
|
|
1849
1844
|
},
|
|
1850
|
-
"@ember/routing": {
|
|
1851
|
-
"name": "@ember/routing",
|
|
1852
|
-
"submodules": {},
|
|
1853
|
-
"elements": {},
|
|
1854
|
-
"classes": {
|
|
1855
|
-
"Ember.Templates.components": 1,
|
|
1856
|
-
"LinkComponent": 1,
|
|
1857
|
-
"Location": 1,
|
|
1858
|
-
"AutoLocation": 1,
|
|
1859
|
-
"HashLocation": 1,
|
|
1860
|
-
"HistoryLocation": 1,
|
|
1861
|
-
"NoneLocation": 1,
|
|
1862
|
-
"RouterService": 1,
|
|
1863
|
-
"Route": 1,
|
|
1864
|
-
"EmberRouter": 1,
|
|
1865
|
-
"Transition": 1
|
|
1866
|
-
},
|
|
1867
|
-
"fors": {
|
|
1868
|
-
"Ember.Templates.helpers": 1,
|
|
1869
|
-
"Route": 1
|
|
1870
|
-
},
|
|
1871
|
-
"namespaces": {},
|
|
1872
|
-
"tag": "module",
|
|
1873
|
-
"file": "packages/@ember/-internals/routing/lib/system/transition.ts",
|
|
1874
|
-
"line": 1
|
|
1875
|
-
},
|
|
1876
|
-
"@ember/component": {
|
|
1877
|
-
"name": "@ember/component",
|
|
1878
|
-
"submodules": {},
|
|
1879
|
-
"elements": {},
|
|
1880
|
-
"classes": {
|
|
1881
|
-
"TextArea": 1,
|
|
1882
|
-
"Checkbox": 1,
|
|
1883
|
-
"TextField": 1,
|
|
1884
|
-
"Component": 1,
|
|
1885
|
-
"Helper": 1,
|
|
1886
|
-
"@ember/component/helper": 1
|
|
1887
|
-
},
|
|
1888
|
-
"fors": {
|
|
1889
|
-
"Ember.Templates.helpers": 1,
|
|
1890
|
-
"Ember.Templates.components": 1,
|
|
1891
|
-
"@ember/component/helper": 1
|
|
1892
|
-
},
|
|
1893
|
-
"namespaces": {},
|
|
1894
|
-
"tag": "main",
|
|
1895
|
-
"file": "packages/@ember/-internals/glimmer/lib/helper.ts",
|
|
1896
|
-
"line": 40,
|
|
1897
|
-
"description": "[Glimmer](https://github.com/tildeio/glimmer) is a templating engine used by Ember.js that is compatible with a subset of the [Handlebars](http://handlebarsjs.com/) syntax.\n\n### Showing a property\n\nTemplates manage the flow of an application's UI, and display state (through\nthe DOM) to a user. For example, given a component with the property \"name\",\nthat component's template can use the name in several ways:\n\n```app/components/person-profile.js\nimport Component from '@ember/component';\n\nexport default Component.extend({\n name: 'Jill'\n});\n```\n\n```app/components/person-profile.hbs\n{{this.name}}\n<div>{{this.name}}</div>\n<span data-name={{this.name}}></span>\n```\n\nAny time the \"name\" property on the component changes, the DOM will be\nupdated.\n\nProperties can be chained as well:\n\n```handlebars\n{{@aUserModel.name}}\n<div>{{@listOfUsers.firstObject.name}}</div>\n```\n\n### Using Ember helpers\n\nWhen content is passed in mustaches `{{}}`, Ember will first try to find a helper\nor component with that name. For example, the `if` helper:\n\n```app/components/person-profile.hbs\n{{if this.name \"I have a name\" \"I have no name\"}}\n<span data-has-name={{if this.name true}}></span>\n```\n\nThe returned value is placed where the `{{}}` is called. The above style is\ncalled \"inline\". A second style of helper usage is called \"block\". For example:\n\n```handlebars\n{{#if this.name}}\n I have a name\n{{else}}\n I have no name\n{{/if}}\n```\n\nThe block form of helpers allows you to control how the UI is created based\non the values of properties.\nA third form of helper is called \"nested\". For example here the concat\nhelper will add \" Doe\" to a displayed name if the person has no last name:\n\n```handlebars\n<span data-name={{concat this.firstName (\n if this.lastName (concat \" \" this.lastName) \"Doe\"\n)}}></span>\n```\n\nEmber's built-in helpers are described under the [Ember.Templates.helpers](/ember/release/classes/Ember.Templates.helpers)\nnamespace. Documentation on creating custom helpers can be found under\n[helper](/ember/release/functions/@ember%2Fcomponent%2Fhelper/helper) (or\nunder [Helper](/ember/release/classes/Helper) if a helper requires access to\ndependency injection).\n\n### Invoking a Component\n\nEmber components represent state to the UI of an application. Further\nreading on components can be found under [Component](/ember/release/classes/Component).",
|
|
1898
|
-
"itemtype": "main"
|
|
1899
|
-
},
|
|
1900
1845
|
"@ember/template": {
|
|
1901
1846
|
"name": "@ember/template",
|
|
1902
1847
|
"submodules": {},
|
|
@@ -1922,7 +1867,7 @@
|
|
|
1922
1867
|
"tag": "module",
|
|
1923
1868
|
"file": "packages/@ember/-internals/glimmer/lib/glimmer-component-docs.ts",
|
|
1924
1869
|
"line": 1,
|
|
1925
|
-
"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 Template-only and Glimmer components. If you\nare looking for the API documentation for Classic components, it is\n[available here](/ember/release/classes/Component). The source code for\nGlimmer components can be found in [`@glimmer/component`](https://github.com/glimmerjs/glimmer.js/tree/master/packages/%40glimmer/component).\n\n## Defining a Template-only Component\n\nThe simplest way to create a component is to create a template file in\n`app/templates/components`. For example, if you name a template\n`app/templates/components/person-profile.hbs`:\n\n```app/templates/components/person-profile.hbs\n<h1>{{@person.name}}</h1>\n<img src={{@person.avatar}}>\n<p class='signature'>{{@person.signature}}</p>\n```\n\nYou will be able to use `<PersonProfile />` to invoke this component elsewhere\nin your application:\n\n```app/templates/application.hbs\n<PersonProfile @person={{this.currentUser}} />\n```\n\nNote that component names are capitalized here in order to distinguish them\nfrom regular HTML elements, but they are dasherized in the file system.\n\nWhile the angle bracket invocation form is generally preferred, it is also\npossible to invoke the same component with the `{{person-profile}}` syntax:\n\n```app/templates/application.hbs\n{{person-profile person=this.currentUser}}\n```\n\nNote that with this syntax, you use dashes in the component name and\narguments are passed without the `@` sign.\n\nIn both cases, Ember will render the content of the component template we\ncreated above. The end result will be something like this:\n\n```html\n<h1>Tomster</h1>\n<img src=\"https://emberjs.com/tomster.jpg\">\n<p class='signature'>Out of office this week</p>\n```\n\n## File System Nesting\n\nComponents can be nested inside sub-folders for logical groupping. For\nexample, if we placed our template in\n`app/templates/components/person/short-profile.hbs`, we can invoke it as\n`<Person::ShortProfile />`:\n\n```app/templates/application.hbs\n<Person::ShortProfile @person={{this.currentUser}} />\n```\n\nOr equivalently, `{{person/short-profile}}`:\n\n```app/templates/application.hbs\n{{person/short-profile person=this.currentUser}}\n```\n\n## Using Blocks\n\nYou can use `yield` inside a template to include the **contents** of any block\nattached to the component. For instance, if we added a `{{yield}}` to our\ncomponent like so:\n\n```app/templates/components/person-profile.hbs\n<h1>{{@person.name}}</h1>\n{{yield}}\n```\n\nWe could then invoke it like this:\n\n```handlebars\n<PersonProfile @person={{this.currentUser}}>\n <p>Admin mode</p>\n</PersonProfile>\n```\n\nor with curly syntax like this:\n\n```handlebars\n{{#person-profile person=this.currentUser}}\n <p>Admin mode</p>\n{{/person-profile}}\n```\n\nAnd the content passed in between the brackets of the component would be\nrendered in the same place as the `{{yield}}` within it, replacing it.\n\nBlocks are executed in their original context, meaning they have access to the\nscope and any in-scope variables where they were defined.\n\n### Passing parameters to blocks\n\nYou can also pass positional parameters to `{{yield}}`, which are then made\navailable in the block:\n\n```app/templates/components/person-profile.hbs\n<h1>{{@person.name}}</h1>\n{{yield @person.signature}}\n```\n\nWe can then use this value in the block like so:\n\n```handlebars\n<PersonProfile @person={{this.currentUser}} as |signature|>\n {{signature}}\n</PersonProfile>\n```\n\n### Passing multiple blocks\n\nYou can pass multiple blocks to a component by giving them names, and\nspecifying which block you are yielding to with `{{yield}}`. For instance, if\nwe wanted to add a way for users to customize the title of our\n`<PersonProfile>` component, we could add a named block inside of the header:\n\n```app/templates/components/person-profile.hbs\n<h1>{{yield to=\"title\"}}</h1>\n{{yield}}\n```\n\nThis component could then be invoked like so:\n\n```handlebars\n<PersonProfile @person={{this.currentUser}}>\n <:title>{{this.currentUser.name}}</:title>\n <:default>{{this.currentUser.signature}}</:default>\n</PersonProfile>\n```\n\nWhen passing named blocks, you must name every block, including the `default`\nblock, which is the block that is defined if you do not pass a `to` parameter\nto `{{yield}}`. Whenever you invoke a component without passing explicitly\nnamed blocks, the passed block is considered the `default` block.\n\n### Passing parameters to named blocks\n\nYou can also pass parameters to named blocks:\n\n```app/templates/components/person-profile.hbs\n<h1>{{yield @person.name to=\"title\"}}</h1>\n{{yield @person.signature}}\n```\n\nThese parameters can then be used like so:\n\n```handlebars\n<PersonProfile @person={{this.currentUser}}>\n <:title as |name|>{{name}}</:title>\n <:default as |signature|>{{signature}}</:default>\n</PersonProfile>\n```\n\n### Checking to see if a block exists\n\nYou can also check to see if a block exists using the `(has-block)` keyword,\nand conditionally use it, or provide a default template instead.\n\n```app/templates/components/person-profile.hbs\n<h1>\n {{#if (has-block \"title\")}}\n {{yield @person.name to=\"title\"}}\n {{else}}\n {{@person.name}}\n {{/if}}\n</h1>\n\n{{#if (has-block)}}\n {{yield @person.signature}}\n{{else}}\n {{@person.signature}}\n{{/if}}\n```\n\nWith this template, we can then optionally pass in one block, both blocks, or\nnone at all:\n\n```handlebars\n{{! passing both blocks }}\n<PersonProfile @person={{this.currentUser}}>\n <:title as |name|>{{name}}</:title>\n <:default as |signature|>{{signature}}</:default>\n</PersonProfile>\n\n{{! passing just the title block }}\n<PersonProfile @person={{this.currentUser}}>\n <:title as |name|>{{name}}</:title>\n</PersonProfile>\n\n{{! passing just the default block }}\n<PersonProfile @person={{this.currentUser}} as |signature|>\n {{signature}}\n</PersonProfile>\n\n{{! not passing any blocks }}\n<PersonProfile @person={{this.currentUser}}/>\n```\n\n### Checking to see if a block has parameters\n\nWe can also check if a block receives parameters using the `(has-block-params)`\nkeyword, and conditionally yield different values if so.\n\n```app/templates/components/person-profile.hbs\n{{#if (has-block-params)}}\n {{yield @person.signature}}\n{{else}}\n {{yield}}\n{{/if}}\n```\n\n## Customizing Components With JavaScript\n\nTo add JavaScript to a component, create a JavaScript file in the same\nlocation as the template file, with the same name, and export a subclass\nof `Component` as the default value. For example, to add Javascript to the\n`PersonProfile` component which we defined above, we would create\n`app/comopnents/person-profile.js` and export our class as the default, like\nso:\n\n```app/components/person-profile.js\nimport Component from '@glimmer/component';\n\nexport default class PersonProfileComponent extends Component {\n get displayName() {\n let { title, firstName, lastName } = this.args.person;\n\n if (title) {\n return `${title} ${lastName}`;\n } else {\n return `${firstName} ${lastName}`;\n }\n })\n}\n```\n\nYou can add your own properties, methods, and lifecycle hooks to this\nsubclass to customize its behavior, and you can reference the instance of the\nclass in your template using `{{this}}`. For instance, we could access the\n`displayName` property of our `PersonProfile` component instance in the\ntemplate like this:\n\n```app/templates/components/person-profile.hbs\n<h1>{{this.displayName}}</h1>\n{{yield}}\n```\n\n## `constructor`\n\nparams: `owner` object and `args` object\n\nConstructs a new component and assigns itself the passed properties. The\nconstructor is run whenever a new instance of the component is created, and\ncan be used to setup the initial state of the component.\n\n```javascript\nimport Component from '@glimmer/component';\n\nexport default class SomeComponent extends Component {\n constructor(owner, args) {\n super(owner, args);\n\n if (this.args.displayMode === 'list') {\n this.items = [];\n }\n }\n}\n```\n\nService injections and arguments are available in the constructor.\n\n```javascript\nimport Component from '@glimmer/component';\nimport { inject as service } from '@ember/service';\n\nexport default class SomeComponent extends Component {\n @service myAnimations;\n\n constructor(owner, args) {\n super(owner, args);\n\n if (this.args.fadeIn === true) {\n this.myAnimations.register(this, 'fade-in');\n }\n }\n}\n```\n\n## `willDestroy`\n\n`willDestroy` is called after the component has been removed from the DOM, but\nbefore the component is fully destroyed. This lifecycle hook can be used to\ncleanup the component and any related state.\n\n```javascript\nimport Component from '@glimmer/component';\nimport { inject as service } from '@ember/service';\n\nexport default class SomeComponent extends Component {\n @service myAnimations;\n\n willDestroy() {\n super.willDestroy(...arguments);\n\n this.myAnimations.unregister(this);\n }\n}\n```\n\n## `args`\n\nThe `args` property of Glimmer components is an object that contains the\n_arguments_ that are passed to the component. For instance, the\nfollowing component usage:\n\n```handlebars\n<SomeComponent @fadeIn={{true}} />\n```\n\nWould result in the following `args` object to be passed to the component:\n\n```javascript\n{ fadeIn: true }\n```\n\n`args` can be accessed at any point in the component lifecycle, including\n`constructor` and `willDestroy`. They are also automatically marked as tracked\nproperties, and they can be depended on as computed property dependencies:\n\n```javascript\nimport Component from '@glimmer/component';\nimport { computed } from '@ember/object';\n\nexport default class SomeComponent extends Component {\n\n @computed('args.someValue')\n get computedGetter() {\n // updates whenever args.someValue updates\n return this.args.someValue;\n }\n\n get standardGetter() {\n // updates whenever args.anotherValue updates (Ember 3.13+)\n return this.args.anotherValue;\n }\n}\n```\n\n## `isDestroying`\n\nA boolean flag to tell if the component is in the process of destroying. This is set to\ntrue before `willDestroy` is called.\n\n## `isDestroyed`\nA boolean to tell if the component has been fully destroyed. This is set to true\nafter `willDestroy` is called.",
|
|
1870
|
+
"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 Template-only and Glimmer components. If you\nare looking for the API documentation for Classic components, it is\n[available here](/ember/release/classes/Component). The source code for\nGlimmer components can be found in [`@glimmer/component`](https://github.com/glimmerjs/glimmer.js/tree/master/packages/%40glimmer/component).\n\n## Defining a Template-only Component\n\nThe simplest way to create a component is to create a template file in\n`app/templates/components`. For example, if you name a template\n`app/templates/components/person-profile.hbs`:\n\n```app/templates/components/person-profile.hbs\n<h1>{{@person.name}}</h1>\n<img src={{@person.avatar}}>\n<p class='signature'>{{@person.signature}}</p>\n```\n\nYou will be able to use `<PersonProfile />` to invoke this component elsewhere\nin your application:\n\n```app/templates/application.hbs\n<PersonProfile @person={{this.currentUser}} />\n```\n\nNote that component names are capitalized here in order to distinguish them\nfrom regular HTML elements, but they are dasherized in the file system.\n\nWhile the angle bracket invocation form is generally preferred, it is also\npossible to invoke the same component with the `{{person-profile}}` syntax:\n\n```app/templates/application.hbs\n{{person-profile person=this.currentUser}}\n```\n\nNote that with this syntax, you use dashes in the component name and\narguments are passed without the `@` sign.\n\nIn both cases, Ember will render the content of the component template we\ncreated above. The end result will be something like this:\n\n```html\n<h1>Tomster</h1>\n<img src=\"https://emberjs.com/tomster.jpg\">\n<p class='signature'>Out of office this week</p>\n```\n\n## File System Nesting\n\nComponents can be nested inside sub-folders for logical groupping. For\nexample, if we placed our template in\n`app/templates/components/person/short-profile.hbs`, we can invoke it as\n`<Person::ShortProfile />`:\n\n```app/templates/application.hbs\n<Person::ShortProfile @person={{this.currentUser}} />\n```\n\nOr equivalently, `{{person/short-profile}}`:\n\n```app/templates/application.hbs\n{{person/short-profile person=this.currentUser}}\n```\n\n## Using Blocks\n\nYou can use `yield` inside a template to include the **contents** of any block\nattached to the component. For instance, if we added a `{{yield}}` to our\ncomponent like so:\n\n```app/templates/components/person-profile.hbs\n<h1>{{@person.name}}</h1>\n{{yield}}\n```\n\nWe could then invoke it like this:\n\n```handlebars\n<PersonProfile @person={{this.currentUser}}>\n <p>Admin mode</p>\n</PersonProfile>\n```\n\nor with curly syntax like this:\n\n```handlebars\n{{#person-profile person=this.currentUser}}\n <p>Admin mode</p>\n{{/person-profile}}\n```\n\nAnd the content passed in between the brackets of the component would be\nrendered in the same place as the `{{yield}}` within it, replacing it.\n\nBlocks are executed in their original context, meaning they have access to the\nscope and any in-scope variables where they were defined.\n\n### Passing parameters to blocks\n\nYou can also pass positional parameters to `{{yield}}`, which are then made\navailable in the block:\n\n```app/templates/components/person-profile.hbs\n<h1>{{@person.name}}</h1>\n{{yield @person.signature}}\n```\n\nWe can then use this value in the block like so:\n\n```handlebars\n<PersonProfile @person={{this.currentUser}} as |signature|>\n {{signature}}\n</PersonProfile>\n```\n\n### Passing multiple blocks\n\nYou can pass multiple blocks to a component by giving them names, and\nspecifying which block you are yielding to with `{{yield}}`. For instance, if\nwe wanted to add a way for users to customize the title of our\n`<PersonProfile>` component, we could add a named block inside of the header:\n\n```app/templates/components/person-profile.hbs\n<h1>{{yield to=\"title\"}}</h1>\n{{yield}}\n```\n\nThis component could then be invoked like so:\n\n```handlebars\n<PersonProfile @person={{this.currentUser}}>\n <:title>{{this.currentUser.name}}</:title>\n <:default>{{this.currentUser.signature}}</:default>\n</PersonProfile>\n```\n\nWhen passing named blocks, you must name every block, including the `default`\nblock, which is the block that is defined if you do not pass a `to` parameter\nto `{{yield}}`. Whenever you invoke a component without passing explicitly\nnamed blocks, the passed block is considered the `default` block.\n\n### Passing parameters to named blocks\n\nYou can also pass parameters to named blocks:\n\n```app/templates/components/person-profile.hbs\n<h1>{{yield @person.name to=\"title\"}}</h1>\n{{yield @person.signature}}\n```\n\nThese parameters can then be used like so:\n\n```handlebars\n<PersonProfile @person={{this.currentUser}}>\n <:title as |name|>{{name}}</:title>\n <:default as |signature|>{{signature}}</:default>\n</PersonProfile>\n```\n\n### Checking to see if a block exists\n\nYou can also check to see if a block exists using the `(has-block)` keyword,\nand conditionally use it, or provide a default template instead.\n\n```app/templates/components/person-profile.hbs\n<h1>\n {{#if (has-block \"title\")}}\n {{yield @person.name to=\"title\"}}\n {{else}}\n {{@person.name}}\n {{/if}}\n</h1>\n\n{{#if (has-block)}}\n {{yield @person.signature}}\n{{else}}\n {{@person.signature}}\n{{/if}}\n```\n\nWith this template, we can then optionally pass in one block, both blocks, or\nnone at all:\n\n```handlebars\n{{! passing both blocks }}\n<PersonProfile @person={{this.currentUser}}>\n <:title as |name|>{{name}}</:title>\n <:default as |signature|>{{signature}}</:default>\n</PersonProfile>\n\n{{! passing just the title block }}\n<PersonProfile @person={{this.currentUser}}>\n <:title as |name|>{{name}}</:title>\n</PersonProfile>\n\n{{! passing just the default block }}\n<PersonProfile @person={{this.currentUser}} as |signature|>\n {{signature}}\n</PersonProfile>\n\n{{! not passing any blocks }}\n<PersonProfile @person={{this.currentUser}}/>\n```\n\n### Checking to see if a block has parameters\n\nWe can also check if a block receives parameters using the `(has-block-params)`\nkeyword, and conditionally yield different values if so.\n\n```app/templates/components/person-profile.hbs\n{{#if (has-block-params)}}\n {{yield @person.signature}}\n{{else}}\n {{yield}}\n{{/if}}\n```\n\n## Customizing Components With JavaScript\n\nTo add JavaScript to a component, create a JavaScript file in the same\nlocation as the template file, with the same name, and export a subclass\nof `Component` as the default value. For example, to add Javascript to the\n`PersonProfile` component which we defined above, we would create\n`app/comopnents/person-profile.js` and export our class as the default, like\nso:\n\n```app/components/person-profile.js\nimport Component from '@glimmer/component';\n\nexport default class PersonProfileComponent extends Component {\n get displayName() {\n let { title, firstName, lastName } = this.args.person;\n\n if (title) {\n return `${title} ${lastName}`;\n } else {\n return `${firstName} ${lastName}`;\n }\n })\n}\n```\n\nYou can add your own properties, methods, and lifecycle hooks to this\nsubclass to customize its behavior, and you can reference the instance of the\nclass in your template using `{{this}}`. For instance, we could access the\n`displayName` property of our `PersonProfile` component instance in the\ntemplate like this:\n\n```app/templates/components/person-profile.hbs\n<h1>{{this.displayName}}</h1>\n{{yield}}\n```\n\n## `constructor`\n\nparams: `owner` object and `args` object\n\nConstructs a new component and assigns itself the passed properties. The\nconstructor is run whenever a new instance of the component is created, and\ncan be used to setup the initial state of the component.\n\n```javascript\nimport Component from '@glimmer/component';\n\nexport default class SomeComponent extends Component {\n constructor(owner, args) {\n super(owner, args);\n\n if (this.args.displayMode === 'list') {\n this.items = [];\n }\n }\n}\n```\n\nService injections and arguments are available in the constructor.\n\n```javascript\nimport Component from '@glimmer/component';\nimport { service } from '@ember/service';\n\nexport default class SomeComponent extends Component {\n @service myAnimations;\n\n constructor(owner, args) {\n super(owner, args);\n\n if (this.args.fadeIn === true) {\n this.myAnimations.register(this, 'fade-in');\n }\n }\n}\n```\n\n## `willDestroy`\n\n`willDestroy` is called after the component has been removed from the DOM, but\nbefore the component is fully destroyed. This lifecycle hook can be used to\ncleanup the component and any related state.\n\n```javascript\nimport Component from '@glimmer/component';\nimport { service } from '@ember/service';\n\nexport default class SomeComponent extends Component {\n @service myAnimations;\n\n willDestroy() {\n super.willDestroy(...arguments);\n\n this.myAnimations.unregister(this);\n }\n}\n```\n\n## `args`\n\nThe `args` property of Glimmer components is an object that contains the\n_arguments_ that are passed to the component. For instance, the\nfollowing component usage:\n\n```handlebars\n<SomeComponent @fadeIn={{true}} />\n```\n\nWould result in the following `args` object to be passed to the component:\n\n```javascript\n{ fadeIn: true }\n```\n\n`args` can be accessed at any point in the component lifecycle, including\n`constructor` and `willDestroy`. They are also automatically marked as tracked\nproperties, and they can be depended on as computed property dependencies:\n\n```javascript\nimport Component from '@glimmer/component';\nimport { computed } from '@ember/object';\n\nexport default class SomeComponent extends Component {\n\n @computed('args.someValue')\n get computedGetter() {\n // updates whenever args.someValue updates\n return this.args.someValue;\n }\n\n get standardGetter() {\n // updates whenever args.anotherValue updates (Ember 3.13+)\n return this.args.anotherValue;\n }\n}\n```\n\n## `isDestroying`\n\nA boolean flag to tell if the component is in the process of destroying. This is set to\ntrue before `willDestroy` is called.\n\n## `isDestroyed`\nA boolean to tell if the component has been fully destroyed. This is set to true\nafter `willDestroy` is called.",
|
|
1926
1871
|
"access": "public",
|
|
1927
1872
|
"tagname": ""
|
|
1928
1873
|
},
|
|
@@ -2056,7 +2001,7 @@
|
|
|
2056
2001
|
"namespaces": {},
|
|
2057
2002
|
"tag": "module",
|
|
2058
2003
|
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.js",
|
|
2059
|
-
"line":
|
|
2004
|
+
"line": 43
|
|
2060
2005
|
},
|
|
2061
2006
|
"@ember/enumerable": {
|
|
2062
2007
|
"name": "@ember/enumerable",
|
|
@@ -2084,7 +2029,7 @@
|
|
|
2084
2029
|
"namespaces": {},
|
|
2085
2030
|
"tag": "module",
|
|
2086
2031
|
"file": "packages/@ember/canary-features/index.ts",
|
|
2087
|
-
"line":
|
|
2032
|
+
"line": 26,
|
|
2088
2033
|
"description": "Set `EmberENV.FEATURES` in your application's `config/environment.js` file\nto enable canary features in your application.\n\nSee the [feature flag guide](https://guides.emberjs.com/release/configuring-ember/feature-flags/)\nfor more details.",
|
|
2089
2034
|
"access": "public",
|
|
2090
2035
|
"tagname": ""
|
|
@@ -2249,7 +2194,7 @@
|
|
|
2249
2194
|
"namespaces": {},
|
|
2250
2195
|
"tag": "module",
|
|
2251
2196
|
"file": "packages/@ember/service/index.js",
|
|
2252
|
-
"line":
|
|
2197
|
+
"line": 74,
|
|
2253
2198
|
"access": "public",
|
|
2254
2199
|
"tagname": ""
|
|
2255
2200
|
},
|
|
@@ -2427,17 +2372,6 @@
|
|
|
2427
2372
|
"access": "public",
|
|
2428
2373
|
"tagname": ""
|
|
2429
2374
|
},
|
|
2430
|
-
"Ember.Templates.components": {
|
|
2431
|
-
"name": "Ember.Templates.components",
|
|
2432
|
-
"shortname": "Ember.Templates.components",
|
|
2433
|
-
"classitems": [],
|
|
2434
|
-
"plugins": [],
|
|
2435
|
-
"extensions": [],
|
|
2436
|
-
"plugin_for": [],
|
|
2437
|
-
"extension_for": [],
|
|
2438
|
-
"module": "@ember/routing",
|
|
2439
|
-
"namespace": ""
|
|
2440
|
-
},
|
|
2441
2375
|
"Ember.Templates.helpers": {
|
|
2442
2376
|
"name": "Ember.Templates.helpers",
|
|
2443
2377
|
"shortname": "Ember.Templates.helpers",
|
|
@@ -2453,85 +2387,38 @@
|
|
|
2453
2387
|
"access": "public",
|
|
2454
2388
|
"tagname": ""
|
|
2455
2389
|
},
|
|
2456
|
-
"
|
|
2457
|
-
"name": "
|
|
2458
|
-
"shortname": "
|
|
2459
|
-
"classitems": [],
|
|
2460
|
-
"plugins": [],
|
|
2461
|
-
"extensions": [],
|
|
2462
|
-
"plugin_for": [],
|
|
2463
|
-
"extension_for": [],
|
|
2464
|
-
"module": "@ember/routing",
|
|
2465
|
-
"namespace": "",
|
|
2466
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/-link-to.ts",
|
|
2467
|
-
"line": 263,
|
|
2468
|
-
"description": "`LinkComponent` is the internal component invoked with `<LinkTo>` or `{{link-to}}`.",
|
|
2469
|
-
"extends": "Component",
|
|
2470
|
-
"see": [
|
|
2471
|
-
"{Ember.Templates.components.LinkTo}"
|
|
2472
|
-
],
|
|
2473
|
-
"access": "public",
|
|
2474
|
-
"tagname": ""
|
|
2475
|
-
},
|
|
2476
|
-
"TextArea": {
|
|
2477
|
-
"name": "TextArea",
|
|
2478
|
-
"shortname": "TextArea",
|
|
2390
|
+
"@ember/component": {
|
|
2391
|
+
"name": "@ember/component",
|
|
2392
|
+
"shortname": "@ember/component",
|
|
2479
2393
|
"classitems": [],
|
|
2480
2394
|
"plugins": [],
|
|
2481
2395
|
"extensions": [],
|
|
2482
2396
|
"plugin_for": [],
|
|
2483
2397
|
"extension_for": [],
|
|
2484
2398
|
"module": "@ember/component",
|
|
2485
|
-
"namespace": ""
|
|
2486
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/-textarea.ts",
|
|
2487
|
-
"line": 11,
|
|
2488
|
-
"description": "The internal representation used for `Textarea` invocations.",
|
|
2489
|
-
"extends": "Component",
|
|
2490
|
-
"see": [
|
|
2491
|
-
"{Ember.Templates.components.Textarea}"
|
|
2492
|
-
],
|
|
2493
|
-
"uses": [
|
|
2494
|
-
"Ember.TextSupport"
|
|
2495
|
-
],
|
|
2496
|
-
"access": "public",
|
|
2497
|
-
"tagname": ""
|
|
2399
|
+
"namespace": ""
|
|
2498
2400
|
},
|
|
2499
|
-
"
|
|
2500
|
-
"name": "
|
|
2501
|
-
"shortname": "
|
|
2401
|
+
"Ember.Templates.components": {
|
|
2402
|
+
"name": "Ember.Templates.components",
|
|
2403
|
+
"shortname": "Ember.Templates.components",
|
|
2502
2404
|
"classitems": [],
|
|
2503
2405
|
"plugins": [],
|
|
2504
2406
|
"extensions": [],
|
|
2505
2407
|
"plugin_for": [],
|
|
2506
2408
|
"extension_for": [],
|
|
2507
|
-
"module": "@ember/
|
|
2508
|
-
"namespace": ""
|
|
2509
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/checkbox.ts",
|
|
2510
|
-
"line": 13,
|
|
2511
|
-
"description": "The internal class used to create text inputs when the `{{input}}`\nhelper is used with `type` of `checkbox`.\n\nSee [Ember.Templates.helpers.input](/ember/release/classes/Ember.Templates.helpers/methods/input?anchor=input) for usage details.\n\n## Direct manipulation of `checked`\n\nThe `checked` attribute of an `Checkbox` object should always be set\nthrough the Ember object or by interacting with its rendered element\nrepresentation via the mouse, keyboard, or touch. Updating the value of the\ncheckbox via jQuery will result in the checked value of the object and its\nelement losing synchronization.\n\n## Layout and LayoutName properties\n\nBecause HTML `input` elements are self closing `layout` and `layoutName`\nproperties will not be applied.",
|
|
2512
|
-
"extends": "Component",
|
|
2513
|
-
"access": "public",
|
|
2514
|
-
"tagname": ""
|
|
2409
|
+
"module": "@ember/routing",
|
|
2410
|
+
"namespace": ""
|
|
2515
2411
|
},
|
|
2516
|
-
"
|
|
2517
|
-
"name": "
|
|
2518
|
-
"shortname": "
|
|
2412
|
+
"@ember/routing": {
|
|
2413
|
+
"name": "@ember/routing",
|
|
2414
|
+
"shortname": "@ember/routing",
|
|
2519
2415
|
"classitems": [],
|
|
2520
2416
|
"plugins": [],
|
|
2521
2417
|
"extensions": [],
|
|
2522
2418
|
"plugin_for": [],
|
|
2523
2419
|
"extension_for": [],
|
|
2524
|
-
"module": "@ember/
|
|
2525
|
-
"namespace": ""
|
|
2526
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/text-field.ts",
|
|
2527
|
-
"line": 36,
|
|
2528
|
-
"description": "The internal class used to create text inputs when the `Input` component is used with `type` of `text`.\n\nSee [Ember.Templates.components.Input](/ember/release/classes/Ember.Templates.components/methods/Input?anchor=Input) for usage details.\n\n## Layout and LayoutName properties\n\nBecause HTML `input` elements are self closing `layout` and `layoutName`\nproperties will not be applied.",
|
|
2529
|
-
"extends": "Component",
|
|
2530
|
-
"uses": [
|
|
2531
|
-
"Ember.TextSupport"
|
|
2532
|
-
],
|
|
2533
|
-
"access": "public",
|
|
2534
|
-
"tagname": ""
|
|
2420
|
+
"module": "@ember/routing",
|
|
2421
|
+
"namespace": ""
|
|
2535
2422
|
},
|
|
2536
2423
|
"ComponentStateBucket": {
|
|
2537
2424
|
"name": "ComponentStateBucket",
|
|
@@ -2571,7 +2458,7 @@
|
|
|
2571
2458
|
"module": "@ember/component",
|
|
2572
2459
|
"namespace": "",
|
|
2573
2460
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
2574
|
-
"line":
|
|
2461
|
+
"line": 37,
|
|
2575
2462
|
"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\n[available here](/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```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```app/templates/components/person-profile.hbs\n<h1>{{this.displayName}}</h1>\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```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<em id=\"ember1\" class=\"ember-view\"></em>\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```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<div id=\"ember1\" class=\"ember-view my-class my-other-class\"></div>\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```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<div id=\"ember1\" class=\"ember-view my-class my-other-class from-a from-b\"></div>\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<MyWidget class=\"from-invocation\" />\n```\n\nThe resulting HTML will look similar to this:\n\n```html\n<div id=\"ember1\" class=\"from-invocation ember-view my-class my-other-class from-a from-b\"></div>\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```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<div id=\"ember1\" class=\"ember-view hovered\"></div>\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```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<div id=\"ember1\" class=\"ember-view so-very-cool\"></div>\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```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<div id=\"ember1\" class=\"ember-view is-urgent\"></div>\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```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<div id=\"ember1\" class=\"ember-view empty\"></div>\n```\n\nIf you want to add a class name for a property which evaluates to true and\nand a different class name if it evaluates to false, you can pass a binding\nlike this:\n\n```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<div id=\"ember1\" class=\"ember-view enabled\"></div>\n```\n\nWhen isEnabled is `false`, the resulting HTML representation looks like this:\n\n```html\n<div id=\"ember1\" class=\"ember-view disabled\"></div>\n```\n\nThis syntax offers the convenience to add a class if a property is `false`:\n\n```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<div id=\"ember1\" class=\"ember-view\"></div>\n```\n\nInvoking it when the `isEnabled` property on the component is `false` will\nproduce HTML that looks like:\n\n```html\n<div id=\"ember1\" class=\"ember-view disabled\"></div>\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 component.\nThe return value of these properties will be used as the value of the component's\nHTML associated attribute:\n\n```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<a id=\"ember1\" class=\"ember-view\" href=\"http://google.com\"></a>\n```\n\nOne property can be mapped on to another by placing a \":\" between\nthe source property and the destination property:\n\n```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<a id=\"ember1\" class=\"ember-view\" href=\"http://google.com\"></a>\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<MyAnchor href=\"http://bing.com\" @url=\"http://google.com\" />\n```\n\nThe resulting HTML will looks like this:\n\n```html\n<a id=\"ember1\" class=\"ember-view\" href=\"http://bing.com\"></a>\n```\n\nNote that the `href` attribute is ultimately set to `http://bing.com`,\ndespite it having attribute binidng to the `url` property, which was\nset to `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```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<use xlink:href=\"#triangle\"></use>\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```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<input id=\"ember1\" class=\"ember-view\" />\n```\n\n`attributeBindings` can refer to computed properties:\n\n```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```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```app/templates/components/person-profile.hbs\n<h1>Person's Title</h1>\n<div class='details'>{{yield}}</div>\n```\n\n```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<PersonProfile>\n <h2>Chief Basket Weaver</h2>\n <h3>Fisherman Industries</h3>\n</PersonProfile>\n```\n\nor\n\n```handlebars\n{{#person-profile}}\n <h2>Chief Basket Weaver</h2>\n <h3>Fisherman Industries</h3>\n{{/person-profile}}\n```\n\nIt will result in the following HTML output:\n\n```html\n<h1>Person's Title</h1>\n <div class=\"details\">\n <h2>Chief Basket Weaver</h2>\n <h3>Fisherman Industries</h3>\n</div>\n```\n\n## Handling Browser Events\n\nComponents can respond to user-initiated events in one of three ways: passing\nactions with angle bracket invocation, adding event handler methods to the\ncomponent's class, or adding actions to the component's template.\n\n### Passing Actions With Angle Bracket Invocation\n\nFor one-off events specific to particular instance of a component, it is possible\nto pass actions to the component's element using angle bracket invocation syntax.\n\n```handlebars\n<MyWidget {{action 'firstWidgetClicked'}} />\n\n<MyWidget {{action 'secondWidgetClicked'}} />\n```\n\nIn this case, when the first component is clicked on, Ember will invoke the\n`firstWidgetClicked` action. When the second component is clicked on, Ember\nwill invoke the `secondWidgetClicked` action instead.\n\nBesides `{{action}}`, it is also possible to pass any arbitrary element modifiers\nusing the angle bracket invocation syntax.\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```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`\n\n### `{{action}}` Helper\n\nInstead of handling all events of a particular type anywhere inside the\ncomponent's element, you may instead want to limit it to a particular\nelement in the component's template. In this case, it would be more\nconvenient to implement an action instead.\n\nFor example, you could implement the action `hello` for the `person-profile`\ncomponent:\n\n```app/components/person-profile.js\nimport Component from '@ember/component';\n\nexport default Component.extend({\n actions: {\n hello(name) {\n console.log(\"Hello\", name);\n }\n }\n});\n```\n\nAnd then use it in the component's template:\n\n```app/templates/components/person-profile.hbs\n<h1>{{@person.name}}</h1>\n\n<button {{action 'hello' @person.name}}>\n Say Hello to {{@person.name}}\n</button>\n```\n\nWhen the user clicks the button, Ember will invoke the `hello` action,\npassing in the current value of `@person.name` as an argument.\n\nSee [Ember.Templates.helpers.action](/ember/release/classes/Ember.Templates.helpers/methods/action?anchor=action).",
|
|
2576
2463
|
"extends": "Ember.CoreView",
|
|
2577
2464
|
"uses": [
|
|
@@ -2606,7 +2493,7 @@
|
|
|
2606
2493
|
"module": "@ember/component",
|
|
2607
2494
|
"namespace": "",
|
|
2608
2495
|
"file": "packages/@ember/-internals/glimmer/lib/helper.ts",
|
|
2609
|
-
"line":
|
|
2496
|
+
"line": 34,
|
|
2610
2497
|
"description": "Ember Helpers are functions that can compute values, and are used in templates.\nFor example, this code calls a helper named `format-currency`:\n\n```app/templates/application.hbs\n<Cost @cents={{230}} />\n```\n\n```app/components/cost.hbs\n<div>{{format-currency @cents currency=\"$\"}}</div>\n```\n\nAdditionally a helper can be called as a nested helper.\nIn this example, we show the formatted currency value if the `showMoney`\nnamed argument is truthy.\n\n```handlebars\n{{if @showMoney (format-currency @cents currency=\"$\")}}\n```\n\nHelpers defined using a class must provide a `compute` function. For example:\n\n```app/helpers/format-currency.js\nimport Helper from '@ember/component/helper';\n\nexport default class extends Helper {\n compute([cents], { currency }) {\n return `${currency}${cents * 0.01}`;\n }\n}\n```\n\nEach time the input to a helper changes, the `compute` function will be\ncalled again.\n\nAs instances, these helpers also have access to the container and will accept\ninjected dependencies.\n\nAdditionally, class helpers can call `recompute` to force a new computation.",
|
|
2611
2498
|
"extends": "CoreObject",
|
|
2612
2499
|
"access": "public",
|
|
@@ -2801,7 +2688,7 @@
|
|
|
2801
2688
|
"module": "@ember/object",
|
|
2802
2689
|
"namespace": "",
|
|
2803
2690
|
"file": "packages/@ember/-internals/metal/lib/mixin.ts",
|
|
2804
|
-
"line":
|
|
2691
|
+
"line": 444,
|
|
2805
2692
|
"description": "The `Mixin` class allows you to create mixins, whose properties can be\nadded to other classes. For instance,\n\n```javascript\nimport Mixin from '@ember/object/mixin';\n\nconst EditableMixin = Mixin.create({\n edit() {\n console.log('starting to edit');\n this.set('isEditing', true);\n },\n isEditing: false\n});\n```\n\n```javascript\nimport EmberObject from '@ember/object';\nimport EditableMixin from '../mixins/editable';\n\n// Mix mixins into classes by passing them as the first arguments to\n// `.extend.`\nconst Comment = EmberObject.extend(EditableMixin, {\n post: null\n});\n\nlet comment = Comment.create({\n post: somePost\n});\n\ncomment.edit(); // outputs 'starting to edit'\n```\n\nNote that Mixins are created with `Mixin.create`, not\n`Mixin.extend`.\n\nNote that mixins extend a constructor's prototype so arrays and object literals\ndefined as properties will be shared amongst objects that implement the mixin.\nIf you want to define a property in a mixin that is not shared, you can define\nit either as a computed property or have it be created on initialization of the object.\n\n```javascript\n// filters array will be shared amongst any object implementing mixin\nimport Mixin from '@ember/object/mixin';\nimport { A } from '@ember/array';\n\nconst FilterableMixin = Mixin.create({\n filters: A()\n});\n```\n\n```javascript\nimport Mixin from '@ember/object/mixin';\nimport { A } from '@ember/array';\nimport { computed } from '@ember/object';\n\n// filters will be a separate array for every object implementing the mixin\nconst FilterableMixin = Mixin.create({\n filters: computed(function() {\n return A();\n })\n});\n```\n\n```javascript\nimport Mixin from '@ember/object/mixin';\nimport { A } from '@ember/array';\n\n// filters will be created as a separate array during the object's initialization\nconst Filterable = Mixin.create({\n filters: null,\n\n init() {\n this._super(...arguments);\n this.set(\"filters\", A());\n }\n});\n```",
|
|
2806
2693
|
"access": "public",
|
|
2807
2694
|
"tagname": ""
|
|
@@ -2955,7 +2842,7 @@
|
|
|
2955
2842
|
"namespace": "",
|
|
2956
2843
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
2957
2844
|
"line": 23,
|
|
2958
|
-
"description": "The Router service is the public API that provides access to the router.\n\nThe immediate benefit of the Router service is that you can inject it into components,\ngiving them a friendly way to initiate transitions and ask questions about the current\nglobal router state.\n\nIn this example, the Router service is injected into a component to initiate a transition\nto a dedicated route:\n\n```app/components/example.js\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport {
|
|
2845
|
+
"description": "The Router service is the public API that provides access to the router.\n\nThe immediate benefit of the Router service is that you can inject it into components,\ngiving them a friendly way to initiate transitions and ask questions about the current\nglobal router state.\n\nIn this example, the Router service is injected into a component to initiate a transition\nto a dedicated route:\n\n```app/components/example.js\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { service } from '@ember/service';\n\nexport default class ExampleComponent extends Component {\n @service router;\n\n @action\n next() {\n this.router.transitionTo('other.route');\n }\n}\n```\n\nLike any service, it can also be injected into helpers, routes, etc.",
|
|
2959
2846
|
"access": "public",
|
|
2960
2847
|
"tagname": "",
|
|
2961
2848
|
"extends": "Service"
|
|
@@ -2972,7 +2859,7 @@
|
|
|
2972
2859
|
"namespace": "",
|
|
2973
2860
|
"file": "packages/@ember/-internals/routing/lib/services/routing.ts",
|
|
2974
2861
|
"line": 14,
|
|
2975
|
-
"description": "The Routing service is used by
|
|
2862
|
+
"description": "The Routing service is used by LinkTo, and provides facilities for\nthe component/view layer to interact with the router.\n\nThis is a private service for internal usage only. For public usage,\nrefer to the `Router` service.",
|
|
2976
2863
|
"access": "private",
|
|
2977
2864
|
"tagname": ""
|
|
2978
2865
|
},
|
|
@@ -3035,7 +2922,7 @@
|
|
|
3035
2922
|
"module": "@ember/routing",
|
|
3036
2923
|
"namespace": "",
|
|
3037
2924
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
3038
|
-
"line":
|
|
2925
|
+
"line": 85,
|
|
3039
2926
|
"description": "The `Route` class is used to define individual routes. Refer to\nthe [routing guide](https://guides.emberjs.com/release/routing/) for documentation.",
|
|
3040
2927
|
"extends": "EmberObject",
|
|
3041
2928
|
"uses": [
|
|
@@ -3057,7 +2944,7 @@
|
|
|
3057
2944
|
"module": "@ember/routing",
|
|
3058
2945
|
"namespace": "",
|
|
3059
2946
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
3060
|
-
"line":
|
|
2947
|
+
"line": 126,
|
|
3061
2948
|
"description": "The `EmberRouter` class manages the application state and URLs. Refer to\nthe [routing guide](https://guides.emberjs.com/release/routing/) for documentation.",
|
|
3062
2949
|
"extends": "EmberObject",
|
|
3063
2950
|
"uses": [
|
|
@@ -3143,7 +3030,7 @@
|
|
|
3143
3030
|
"module": "@ember/array",
|
|
3144
3031
|
"namespace": "",
|
|
3145
3032
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
3146
|
-
"line":
|
|
3033
|
+
"line": 179,
|
|
3147
3034
|
"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()`.",
|
|
3148
3035
|
"uses": [
|
|
3149
3036
|
"Enumerable"
|
|
@@ -3166,7 +3053,7 @@
|
|
|
3166
3053
|
"module": "@ember/array",
|
|
3167
3054
|
"namespace": "",
|
|
3168
3055
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
3169
|
-
"line":
|
|
3056
|
+
"line": 1326,
|
|
3170
3057
|
"description": "This mixin defines the API for modifying array-like objects. These methods\ncan be applied only to a collection that keeps its items in an ordered set.\nIt builds upon the Array mixin and adds methods to modify the array.\nOne concrete implementations of this class include ArrayProxy.\n\nIt is important to use the methods in this class to modify arrays so that\nchanges are observable. This allows the binding system in Ember to function\ncorrectly.\n\n\nNote that an Array can change even if it does not implement this mixin.\nFor example, one might implement a SparseArray that cannot be directly\nmodified, but if its underlying enumerable changes, it will change also.",
|
|
3171
3058
|
"uses": [
|
|
3172
3059
|
"EmberArray",
|
|
@@ -3186,7 +3073,7 @@
|
|
|
3186
3073
|
"module": "ember",
|
|
3187
3074
|
"namespace": "",
|
|
3188
3075
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
3189
|
-
"line":
|
|
3076
|
+
"line": 1747,
|
|
3190
3077
|
"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)`.",
|
|
3191
3078
|
"uses": [
|
|
3192
3079
|
"MutableArray",
|
|
@@ -3350,13 +3237,12 @@
|
|
|
3350
3237
|
"extensions": [],
|
|
3351
3238
|
"plugin_for": [],
|
|
3352
3239
|
"extension_for": [
|
|
3353
|
-
"Component"
|
|
3354
|
-
"Ember.TextSupport"
|
|
3240
|
+
"Component"
|
|
3355
3241
|
],
|
|
3356
3242
|
"module": "ember",
|
|
3357
3243
|
"namespace": "Ember",
|
|
3358
3244
|
"file": "packages/@ember/-internals/runtime/lib/mixins/target_action_support.js",
|
|
3359
|
-
"line":
|
|
3245
|
+
"line": 10,
|
|
3360
3246
|
"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.",
|
|
3361
3247
|
"extends": "Mixin",
|
|
3362
3248
|
"access": "private",
|
|
@@ -3373,7 +3259,7 @@
|
|
|
3373
3259
|
"module": "@ember/array",
|
|
3374
3260
|
"namespace": "",
|
|
3375
3261
|
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.js",
|
|
3376
|
-
"line":
|
|
3262
|
+
"line": 43,
|
|
3377
3263
|
"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```",
|
|
3378
3264
|
"extends": "EmberObject",
|
|
3379
3265
|
"uses": [
|
|
@@ -3500,29 +3386,6 @@
|
|
|
3500
3386
|
"access": "private",
|
|
3501
3387
|
"tagname": ""
|
|
3502
3388
|
},
|
|
3503
|
-
"Ember.TextSupport": {
|
|
3504
|
-
"name": "Ember.TextSupport",
|
|
3505
|
-
"shortname": "Ember.TextSupport",
|
|
3506
|
-
"classitems": [],
|
|
3507
|
-
"plugins": [],
|
|
3508
|
-
"extensions": [],
|
|
3509
|
-
"plugin_for": [],
|
|
3510
|
-
"extension_for": [
|
|
3511
|
-
"TextArea",
|
|
3512
|
-
"TextField"
|
|
3513
|
-
],
|
|
3514
|
-
"module": "ember",
|
|
3515
|
-
"namespace": "Ember",
|
|
3516
|
-
"file": "packages/@ember/-internals/views/lib/mixins/text_support.js",
|
|
3517
|
-
"line": 20,
|
|
3518
|
-
"description": "`TextSupport` is a shared mixin used by both `TextField` and\n`TextArea`. `TextSupport` adds a number of methods that allow you to\nspecify a controller action to invoke when a certain event is fired on your\ntext field or textarea. The specified controller action would get the current\nvalue of the field passed in as the only argument unless the value of\nthe field is empty. In that case, the instance of the field itself is passed\nin as the only argument.\n\nLet's use the pressing of the escape key as an example. If you wanted to\ninvoke a controller action when a user presses the escape key while on your\nfield, you would use the `escape-press` attribute on your field like so:\n\n```handlebars\n {{! application.hbs}}\n\n {{input escape-press='alertUser'}}\n```\n\n```javascript\n import Application from '@ember/application';\n import Controller from '@ember/controller';\n App = Application.create();\n\n App.ApplicationController = Controller.extend({\n actions: {\n alertUser: function ( currentValue ) {\n alert( 'escape pressed, current value: ' + currentValue );\n }\n }\n });\n```\n\nThe following chart is a visual representation of what takes place when the\nescape key is pressed in this scenario:\n\n```\nThe Template\n+---------------------------+\n| |\n| escape-press='alertUser' |\n| | TextSupport Mixin\n+----+----------------------+ +-------------------------------+\n | | cancel method |\n | escape button pressed | |\n +-------------------------------> | checks for the `escape-press` |\n | attribute and pulls out the |\n +-------------------------------+ | `alertUser` value |\n | action name 'alertUser' +-------------------------------+\n | sent to controller\n v\nController\n+------------------------------------------ +\n| |\n| actions: { |\n| alertUser: function( currentValue ){ |\n| alert( 'the esc key was pressed!' ) |\n| } |\n| } |\n| |\n+-------------------------------------------+\n```\n\nHere are the events that we currently support along with the name of the\nattribute you would need to use on your field. To reiterate, you would use the\nattribute name like so:\n\n```handlebars\n {{input attribute-name='controllerAction'}}\n```\n\n```\n+--------------------+----------------+\n| | |\n| event | attribute name |\n+--------------------+----------------+\n| new line inserted | insert-newline |\n| | |\n| enter key pressed | enter |\n| | |\n| cancel key pressed | escape-press |\n| | |\n| focusin | focus-in |\n| | |\n| focusout | focus-out |\n| | |\n| keypress | key-press |\n| | |\n| keyup | key-up |\n| | |\n| keydown | key-down |\n+--------------------+----------------+\n```",
|
|
3519
|
-
"uses": [
|
|
3520
|
-
"Ember.TargetActionSupport"
|
|
3521
|
-
],
|
|
3522
|
-
"extends": "Mixin",
|
|
3523
|
-
"access": "private",
|
|
3524
|
-
"tagname": ""
|
|
3525
|
-
},
|
|
3526
3389
|
"Ember.ViewMixin": {
|
|
3527
3390
|
"name": "Ember.ViewMixin",
|
|
3528
3391
|
"shortname": "Ember.ViewMixin",
|
|
@@ -3592,7 +3455,7 @@
|
|
|
3592
3455
|
"namespace": "",
|
|
3593
3456
|
"file": "packages/@ember/application/lib/application.js",
|
|
3594
3457
|
"line": 30,
|
|
3595
|
-
"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```app/app.js\nconst App = Application.extend({\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```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 Ember from setting up a listener for a default event,\nspecify the event name with a `null` value in the `customEvents`\nproperty:\n\n```app/app.js\nimport Application from '@ember/application';\n\nlet App = Application.extend({\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```app/app.js\nimport Application from '@ember/application';\n\nlet App = Application.extend({\n rootElement: '#ember-app'\n});\n```\n\nThe `rootElement` can be either a DOM element or a
|
|
3458
|
+
"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```app/app.js\nconst App = Application.extend({\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```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 Ember from setting up a listener for a default event,\nspecify the event name with a `null` value in the `customEvents`\nproperty:\n\n```app/app.js\nimport Application from '@ember/application';\n\nlet App = Application.extend({\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```app/app.js\nimport Application from '@ember/application';\n\nlet App = Application.extend({\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.",
|
|
3596
3459
|
"extends": "Engine",
|
|
3597
3460
|
"uses": [
|
|
3598
3461
|
"RegistryProxyMixin"
|
|
@@ -3644,7 +3507,7 @@
|
|
|
3644
3507
|
"module": "@ember/canary-features",
|
|
3645
3508
|
"namespace": "",
|
|
3646
3509
|
"file": "packages/@ember/canary-features/index.ts",
|
|
3647
|
-
"line":
|
|
3510
|
+
"line": 26,
|
|
3648
3511
|
"description": "The hash of enabled Canary features. Add to this, any canary features\nbefore creating your application.",
|
|
3649
3512
|
"static": 1,
|
|
3650
3513
|
"since": "1.1.0",
|
|
@@ -3867,7 +3730,7 @@
|
|
|
3867
3730
|
"module": "@ember/service",
|
|
3868
3731
|
"namespace": "",
|
|
3869
3732
|
"file": "packages/@ember/service/index.js",
|
|
3870
|
-
"line":
|
|
3733
|
+
"line": 74,
|
|
3871
3734
|
"extends": "EmberObject",
|
|
3872
3735
|
"since": "1.10.0",
|
|
3873
3736
|
"access": "public",
|
|
@@ -5200,19 +5063,6 @@
|
|
|
5200
5063
|
"class": "EmberENV",
|
|
5201
5064
|
"module": "rsvp"
|
|
5202
5065
|
},
|
|
5203
|
-
{
|
|
5204
|
-
"file": "packages/@ember/-internals/environment/lib/env.ts",
|
|
5205
|
-
"line": 158,
|
|
5206
|
-
"description": "Allows disabling the implicit this property fallback deprecation. This could be useful\nas a way to control the volume of deprecations that are issued by temporarily disabling\nthe implicit this fallback deprecations, which would allow the other deprecations to be more easily\nidentified in the console).\n\nNOTE: The fallback behavior **will be removed** in Ember 4.0.0, disabling **_IS NOT_**\na viable strategy for handling this deprecation.",
|
|
5207
|
-
"itemtype": "property",
|
|
5208
|
-
"name": "_DISABLE_PROPERTY_FALLBACK_DEPRECATION",
|
|
5209
|
-
"type": "boolean",
|
|
5210
|
-
"default": "false",
|
|
5211
|
-
"access": "private",
|
|
5212
|
-
"tagname": "",
|
|
5213
|
-
"class": "EmberENV",
|
|
5214
|
-
"module": "rsvp"
|
|
5215
|
-
},
|
|
5216
5066
|
{
|
|
5217
5067
|
"file": "packages/@ember/-internals/extension-support/lib/container_debug_adapter.js",
|
|
5218
5068
|
"line": 50,
|
|
@@ -5669,446 +5519,47 @@
|
|
|
5669
5519
|
"module": "@ember/debug"
|
|
5670
5520
|
},
|
|
5671
5521
|
{
|
|
5672
|
-
"file": "packages/@ember/-internals/glimmer/lib/components
|
|
5673
|
-
"line":
|
|
5674
|
-
"description": "The `
|
|
5675
|
-
"itemtype": "method",
|
|
5676
|
-
"name": "LinkTo",
|
|
5677
|
-
"see": [
|
|
5678
|
-
"{LinkComponent}"
|
|
5679
|
-
],
|
|
5680
|
-
"access": "public",
|
|
5681
|
-
"tagname": "",
|
|
5682
|
-
"class": "Ember.Templates.components",
|
|
5683
|
-
"module": "ember"
|
|
5684
|
-
},
|
|
5685
|
-
{
|
|
5686
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/-link-to.ts",
|
|
5687
|
-
"line": 254,
|
|
5688
|
-
"description": "See [Ember.Templates.components.LinkTo](/ember/release/classes/Ember.Templates.components/methods/input?anchor=LinkTo).",
|
|
5689
|
-
"itemtype": "method",
|
|
5690
|
-
"name": "link-to",
|
|
5691
|
-
"see": [
|
|
5692
|
-
"{Ember.Templates.components.LinkTo}"
|
|
5693
|
-
],
|
|
5694
|
-
"access": "public",
|
|
5695
|
-
"tagname": "",
|
|
5522
|
+
"file": "packages/@ember/-internals/glimmer/lib/components/abstract-input.ts",
|
|
5523
|
+
"line": 125,
|
|
5524
|
+
"description": "The `change` and `input` actions need to be overridden in the `Input`\nsubclass. Unfortunately, some ember-source builds currently uses babel\nloose mode to transpile its classes. Having the `@action` decorator on the\nsuper class creates a getter on the prototype, and when the subclass\noverrides the method, the loose mode transpilation would emit something\nlike `Subclass.prototype['change'] = function change() { ... }`, which\nfails because `prototype['change']` is getter-only/readonly. The correct\nsolution is to use `Object.defineProperty(prototype, 'change', ...)` but\nthat requires disabling loose mode. For now, the workaround is to add the\ndecorator only on the subclass. This is more of a configuration issue on\nour own builds and doesn't really affect apps.",
|
|
5696
5525
|
"class": "Ember.Templates.helpers",
|
|
5697
|
-
"module": "@ember/
|
|
5698
|
-
},
|
|
5699
|
-
{
|
|
5700
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/-link-to.ts",
|
|
5701
|
-
"line": 285,
|
|
5702
|
-
"itemtype": "property",
|
|
5703
|
-
"name": "route",
|
|
5704
|
-
"access": "public",
|
|
5705
|
-
"tagname": "",
|
|
5706
|
-
"class": "LinkComponent",
|
|
5707
|
-
"module": "@ember/routing"
|
|
5708
|
-
},
|
|
5709
|
-
{
|
|
5710
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/-link-to.ts",
|
|
5711
|
-
"line": 291,
|
|
5712
|
-
"itemtype": "property",
|
|
5713
|
-
"name": "model",
|
|
5714
|
-
"access": "public",
|
|
5715
|
-
"tagname": "",
|
|
5716
|
-
"class": "LinkComponent",
|
|
5717
|
-
"module": "@ember/routing"
|
|
5718
|
-
},
|
|
5719
|
-
{
|
|
5720
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/-link-to.ts",
|
|
5721
|
-
"line": 297,
|
|
5722
|
-
"itemtype": "property",
|
|
5723
|
-
"name": "models",
|
|
5724
|
-
"access": "public",
|
|
5725
|
-
"tagname": "",
|
|
5726
|
-
"class": "LinkComponent",
|
|
5727
|
-
"module": "@ember/routing"
|
|
5728
|
-
},
|
|
5729
|
-
{
|
|
5730
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/-link-to.ts",
|
|
5731
|
-
"line": 303,
|
|
5732
|
-
"itemtype": "property",
|
|
5733
|
-
"name": "query",
|
|
5734
|
-
"access": "public",
|
|
5735
|
-
"tagname": "",
|
|
5736
|
-
"class": "LinkComponent",
|
|
5737
|
-
"module": "@ember/routing"
|
|
5738
|
-
},
|
|
5739
|
-
{
|
|
5740
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/-link-to.ts",
|
|
5741
|
-
"line": 309,
|
|
5742
|
-
"description": "Used to determine when this `LinkComponent` is active.",
|
|
5743
|
-
"itemtype": "property",
|
|
5744
|
-
"name": "current-when",
|
|
5745
|
-
"access": "public",
|
|
5746
|
-
"tagname": "",
|
|
5747
|
-
"class": "LinkComponent",
|
|
5748
|
-
"module": "@ember/routing"
|
|
5749
|
-
},
|
|
5750
|
-
{
|
|
5751
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/-link-to.ts",
|
|
5752
|
-
"line": 317,
|
|
5753
|
-
"description": "Sets the `title` attribute of the `LinkComponent`'s HTML element.",
|
|
5754
|
-
"itemtype": "property",
|
|
5755
|
-
"name": "title",
|
|
5756
|
-
"default": "null",
|
|
5757
|
-
"access": "public",
|
|
5758
|
-
"tagname": "",
|
|
5759
|
-
"class": "LinkComponent",
|
|
5760
|
-
"module": "@ember/routing"
|
|
5761
|
-
},
|
|
5762
|
-
{
|
|
5763
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/-link-to.ts",
|
|
5764
|
-
"line": 326,
|
|
5765
|
-
"description": "Sets the `rel` attribute of the `LinkComponent`'s HTML element.",
|
|
5766
|
-
"itemtype": "property",
|
|
5767
|
-
"name": "rel",
|
|
5768
|
-
"default": "null",
|
|
5769
|
-
"access": "public",
|
|
5770
|
-
"tagname": "",
|
|
5771
|
-
"class": "LinkComponent",
|
|
5772
|
-
"module": "@ember/routing"
|
|
5773
|
-
},
|
|
5774
|
-
{
|
|
5775
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/-link-to.ts",
|
|
5776
|
-
"line": 335,
|
|
5777
|
-
"description": "Sets the `tabindex` attribute of the `LinkComponent`'s HTML element.",
|
|
5778
|
-
"itemtype": "property",
|
|
5779
|
-
"name": "tabindex",
|
|
5780
|
-
"default": "null",
|
|
5781
|
-
"access": "public",
|
|
5782
|
-
"tagname": "",
|
|
5783
|
-
"class": "LinkComponent",
|
|
5784
|
-
"module": "@ember/routing"
|
|
5785
|
-
},
|
|
5786
|
-
{
|
|
5787
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/-link-to.ts",
|
|
5788
|
-
"line": 344,
|
|
5789
|
-
"description": "Sets the `target` attribute of the `LinkComponent`'s HTML element.",
|
|
5790
|
-
"since": "1.8.0",
|
|
5791
|
-
"itemtype": "property",
|
|
5792
|
-
"name": "target",
|
|
5793
|
-
"default": "null",
|
|
5794
|
-
"access": "public",
|
|
5795
|
-
"tagname": "",
|
|
5796
|
-
"class": "LinkComponent",
|
|
5797
|
-
"module": "@ember/routing"
|
|
5798
|
-
},
|
|
5799
|
-
{
|
|
5800
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/-link-to.ts",
|
|
5801
|
-
"line": 354,
|
|
5802
|
-
"description": "The CSS class to apply to `LinkComponent`'s element when its `active`\nproperty is `true`.",
|
|
5803
|
-
"itemtype": "property",
|
|
5804
|
-
"name": "activeClass",
|
|
5805
|
-
"type": "String",
|
|
5806
|
-
"default": "active",
|
|
5807
|
-
"access": "public",
|
|
5808
|
-
"tagname": "",
|
|
5809
|
-
"class": "LinkComponent",
|
|
5810
|
-
"module": "@ember/routing"
|
|
5811
|
-
},
|
|
5812
|
-
{
|
|
5813
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/-link-to.ts",
|
|
5814
|
-
"line": 365,
|
|
5815
|
-
"description": "The CSS class to apply to `LinkComponent`'s element when its `loading`\nproperty is `true`.",
|
|
5816
|
-
"itemtype": "property",
|
|
5817
|
-
"name": "loadingClass",
|
|
5818
|
-
"type": "String",
|
|
5819
|
-
"default": "loading",
|
|
5820
|
-
"access": "public",
|
|
5821
|
-
"tagname": "",
|
|
5822
|
-
"class": "LinkComponent",
|
|
5823
|
-
"module": "@ember/routing"
|
|
5824
|
-
},
|
|
5825
|
-
{
|
|
5826
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/-link-to.ts",
|
|
5827
|
-
"line": 376,
|
|
5828
|
-
"description": "The CSS class to apply to a `LinkComponent`'s element when its `disabled`\nproperty is `true`.",
|
|
5829
|
-
"itemtype": "property",
|
|
5830
|
-
"name": "disabledClass",
|
|
5831
|
-
"type": "String",
|
|
5832
|
-
"default": "disabled",
|
|
5833
|
-
"access": "public",
|
|
5834
|
-
"tagname": "",
|
|
5835
|
-
"class": "LinkComponent",
|
|
5836
|
-
"module": "@ember/routing"
|
|
5837
|
-
},
|
|
5838
|
-
{
|
|
5839
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/-link-to.ts",
|
|
5840
|
-
"line": 387,
|
|
5841
|
-
"description": "Determines whether the `LinkComponent` will trigger routing via\nthe `replaceWith` routing strategy.",
|
|
5842
|
-
"itemtype": "property",
|
|
5843
|
-
"name": "replace",
|
|
5844
|
-
"type": "Boolean",
|
|
5845
|
-
"default": "false",
|
|
5846
|
-
"access": "public",
|
|
5847
|
-
"tagname": "",
|
|
5848
|
-
"class": "LinkComponent",
|
|
5849
|
-
"module": "@ember/routing"
|
|
5850
|
-
},
|
|
5851
|
-
{
|
|
5852
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/-link-to.ts",
|
|
5853
|
-
"line": 398,
|
|
5854
|
-
"description": "Determines whether the `LinkComponent` will prevent the default\nbrowser action by calling preventDefault() to avoid reloading\nthe browser page.\n\nIf you need to trigger a full browser reload pass `@preventDefault={{false}}`:\n\n```handlebars\n<LinkTo @route='photoGallery' @model={{this.aPhotoId}} @preventDefault={{false}}>\n {{this.aPhotoId.title}}\n</LinkTo>\n```",
|
|
5855
|
-
"itemtype": "property",
|
|
5856
|
-
"name": "preventDefault",
|
|
5857
|
-
"type": "Boolean",
|
|
5858
|
-
"default": "true",
|
|
5859
|
-
"access": "private",
|
|
5860
|
-
"tagname": "",
|
|
5861
|
-
"class": "LinkComponent",
|
|
5862
|
-
"module": "@ember/routing"
|
|
5863
|
-
},
|
|
5864
|
-
{
|
|
5865
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/-link-to.ts",
|
|
5866
|
-
"line": 418,
|
|
5867
|
-
"description": "By default this component will forward `href`, `title`, `rel`, `tabindex`, and `target`\narguments to attributes on the component's element. When invoked with `{{link-to}}`, you can\nonly customize these attributes. When invoked with `<LinkTo>`, you can just use HTML\nattributes directly.",
|
|
5868
|
-
"itemtype": "property",
|
|
5869
|
-
"name": "attributeBindings",
|
|
5870
|
-
"type": "Array | String",
|
|
5871
|
-
"default": "['title', 'rel', 'tabindex', 'target']",
|
|
5872
|
-
"access": "public",
|
|
5873
|
-
"tagname": "",
|
|
5874
|
-
"class": "LinkComponent",
|
|
5875
|
-
"module": "@ember/routing"
|
|
5876
|
-
},
|
|
5877
|
-
{
|
|
5878
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/-link-to.ts",
|
|
5879
|
-
"line": 431,
|
|
5880
|
-
"description": "By default this component will set classes on its element when any of the following arguments\nare truthy:\n\n* active\n* loading\n* disabled\n\nWhen these arguments are truthy, a class with the same name will be set on the element. When\nfalsy, the associated class will not be on the element.",
|
|
5881
|
-
"itemtype": "property",
|
|
5882
|
-
"name": "classNameBindings",
|
|
5883
|
-
"type": "Array",
|
|
5884
|
-
"default": "['active', 'loading', 'disabled', 'ember-transitioning-in', 'ember-transitioning-out']",
|
|
5885
|
-
"access": "public",
|
|
5886
|
-
"tagname": "",
|
|
5887
|
-
"class": "LinkComponent",
|
|
5888
|
-
"module": "@ember/routing"
|
|
5889
|
-
},
|
|
5890
|
-
{
|
|
5891
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/-link-to.ts",
|
|
5892
|
-
"line": 449,
|
|
5893
|
-
"description": "By default this component responds to the `click` event. When the component element is an\n`<a>` element, activating the link in another way, such as using the keyboard, triggers the\nclick event.",
|
|
5894
|
-
"itemtype": "property",
|
|
5895
|
-
"name": "eventName",
|
|
5896
|
-
"type": "String",
|
|
5897
|
-
"default": "click",
|
|
5898
|
-
"access": "private",
|
|
5899
|
-
"tagname": "",
|
|
5900
|
-
"class": "LinkComponent",
|
|
5901
|
-
"module": "@ember/routing"
|
|
5902
|
-
},
|
|
5903
|
-
{
|
|
5904
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/-link-to.ts",
|
|
5905
|
-
"line": 464,
|
|
5906
|
-
"description": "Triggers the `LinkComponent`'s routing behavior. If\n`eventName` is changed to a value other than `click`\nthe routing behavior will trigger on that custom event\ninstead.",
|
|
5907
|
-
"itemtype": "event",
|
|
5908
|
-
"name": "click",
|
|
5909
|
-
"access": "private",
|
|
5910
|
-
"tagname": "",
|
|
5911
|
-
"class": "LinkComponent",
|
|
5912
|
-
"module": "@ember/routing"
|
|
5913
|
-
},
|
|
5914
|
-
{
|
|
5915
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/-link-to.ts",
|
|
5916
|
-
"line": 474,
|
|
5917
|
-
"description": "An overridable method called when `LinkComponent` objects are instantiated.\n\nExample:\n\n```app/components/my-link.js\nimport LinkComponent from '@ember/routing/link-component';\n\nexport default LinkComponent.extend({\n init() {\n this._super(...arguments);\n console.log('Event is ' + this.get('eventName'));\n }\n});\n```\n\nNOTE: If you do override `init` for a framework class like `Component`,\nbe sure to call `this._super(...arguments)` in your\n`init` declaration! If you don't, Ember may not have an opportunity to\ndo important setup work, and you'll see strange behavior in your\napplication.",
|
|
5918
|
-
"itemtype": "method",
|
|
5919
|
-
"name": "init",
|
|
5920
|
-
"access": "private",
|
|
5921
|
-
"tagname": "",
|
|
5922
|
-
"class": "LinkComponent",
|
|
5923
|
-
"module": "@ember/routing"
|
|
5924
|
-
},
|
|
5925
|
-
{
|
|
5926
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/-link-to.ts",
|
|
5927
|
-
"line": 556,
|
|
5928
|
-
"description": "Accessed as a classname binding to apply the component's `disabledClass`\nCSS `class` to the element when the link is disabled.\n\nWhen `true`, interactions with the element will not trigger route changes.",
|
|
5929
|
-
"itemtype": "property",
|
|
5930
|
-
"name": "disabled",
|
|
5931
|
-
"access": "private",
|
|
5932
|
-
"tagname": "",
|
|
5933
|
-
"class": "LinkComponent",
|
|
5934
|
-
"module": "@ember/routing"
|
|
5935
|
-
},
|
|
5936
|
-
{
|
|
5937
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/-link-to.ts",
|
|
5938
|
-
"line": 579,
|
|
5939
|
-
"description": "Accessed as a classname binding to apply the component's `activeClass`\nCSS `class` to the element when the link is active.\n\nThis component is considered active when its `currentWhen` property is `true`\nor the application's current route is the route this component would trigger\ntransitions into.\n\nThe `currentWhen` property can match against multiple routes by separating\nroute names using the ` ` (space) character.",
|
|
5940
|
-
"itemtype": "property",
|
|
5941
|
-
"name": "active",
|
|
5942
|
-
"access": "private",
|
|
5943
|
-
"tagname": "",
|
|
5944
|
-
"class": "LinkComponent",
|
|
5945
|
-
"module": "@ember/routing"
|
|
5946
|
-
},
|
|
5947
|
-
{
|
|
5948
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/-link-to.ts",
|
|
5949
|
-
"line": 634,
|
|
5950
|
-
"description": "Method to assert that LinkTo is not used inside of a routeless engine. This method is\noverridden in ember-engines link-to-external component to just be a noop, since the\nlink-to-external component extends the link-to component.",
|
|
5951
|
-
"itemtype": "method",
|
|
5952
|
-
"name": "assertLinkToOrigin",
|
|
5953
|
-
"access": "private",
|
|
5954
|
-
"tagname": "",
|
|
5955
|
-
"class": "LinkComponent",
|
|
5956
|
-
"module": "@ember/routing"
|
|
5526
|
+
"module": "@ember/debug"
|
|
5957
5527
|
},
|
|
5958
5528
|
{
|
|
5959
|
-
"file": "packages/@ember/-internals/glimmer/lib/components
|
|
5960
|
-
"line":
|
|
5961
|
-
"description": "
|
|
5529
|
+
"file": "packages/@ember/-internals/glimmer/lib/components/input.ts",
|
|
5530
|
+
"line": 45,
|
|
5531
|
+
"description": "See [Ember.Templates.components.Input](/ember/release/classes/Ember.Templates.components/methods/Input?anchor=Input).",
|
|
5962
5532
|
"itemtype": "method",
|
|
5963
|
-
"name": "
|
|
5533
|
+
"name": "input",
|
|
5964
5534
|
"params": [
|
|
5965
5535
|
{
|
|
5966
|
-
"name": "
|
|
5536
|
+
"name": "options",
|
|
5967
5537
|
"description": "",
|
|
5968
|
-
"type": "
|
|
5538
|
+
"type": "Hash"
|
|
5969
5539
|
}
|
|
5970
5540
|
],
|
|
5971
|
-
"access": "private",
|
|
5972
|
-
"tagname": "",
|
|
5973
|
-
"class": "LinkComponent",
|
|
5974
|
-
"module": "@ember/routing"
|
|
5975
|
-
},
|
|
5976
|
-
{
|
|
5977
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/-link-to.ts",
|
|
5978
|
-
"line": 790,
|
|
5979
|
-
"description": "Sets the element's `href` attribute to the url for\nthe `LinkComponent`'s targeted route.\n\nIf the `LinkComponent`'s `tagName` is changed to a value other\nthan `a`, this property will be ignored.",
|
|
5980
|
-
"itemtype": "property",
|
|
5981
|
-
"name": "href",
|
|
5982
|
-
"access": "private",
|
|
5983
|
-
"tagname": "",
|
|
5984
|
-
"class": "LinkComponent",
|
|
5985
|
-
"module": "@ember/routing"
|
|
5986
|
-
},
|
|
5987
|
-
{
|
|
5988
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/-link-to.ts",
|
|
5989
|
-
"line": 870,
|
|
5990
|
-
"description": "The default href value to use while a link-to is loading.\nOnly applies when tagName is 'a'",
|
|
5991
|
-
"itemtype": "property",
|
|
5992
|
-
"name": "loadingHref",
|
|
5993
|
-
"type": "String",
|
|
5994
|
-
"default": "#",
|
|
5995
|
-
"access": "private",
|
|
5996
|
-
"tagname": "",
|
|
5997
|
-
"class": "LinkComponent",
|
|
5998
|
-
"module": "@ember/routing"
|
|
5999
|
-
},
|
|
6000
|
-
{
|
|
6001
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/abstract-input.ts",
|
|
6002
|
-
"line": 149,
|
|
6003
|
-
"description": "The `change` and `input` actions need to be overridden in the `Input`\nsubclass. Unfortunately, some ember-source builds currently uses babel\nloose mode to transpile its classes. Having the `@action` decorator on the\nsuper class creates a getter on the prototype, and when the subclass\noverrides the method, the loose mode transpilation would emit something\nlike `Subclass.prototype['change'] = function change() { ... }`, which\nfails because `prototype['change']` is getter-only/readonly. The correct\nsolution is to use `Object.defineProperty(prototype, 'change', ...)` but\nthat requires disabling loose mode. For now, the workaround is to add the\ndecorator only on the subclass. This is more of a configuration issue on\nour own builds and doesn't really affect apps.",
|
|
6004
|
-
"class": "Checkbox",
|
|
6005
|
-
"module": "@ember/component"
|
|
6006
|
-
},
|
|
6007
|
-
{
|
|
6008
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/checkbox.ts",
|
|
6009
|
-
"line": 39,
|
|
6010
|
-
"description": "By default, this component will add the `ember-checkbox` class to the component's element.",
|
|
6011
|
-
"itemtype": "property",
|
|
6012
|
-
"name": "classNames",
|
|
6013
|
-
"type": "Array | String",
|
|
6014
|
-
"default": "['ember-checkbox']",
|
|
6015
5541
|
"access": "public",
|
|
6016
5542
|
"tagname": "",
|
|
6017
|
-
"class": "
|
|
6018
|
-
"module": "@ember/component"
|
|
6019
|
-
},
|
|
6020
|
-
{
|
|
6021
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/checkbox.ts",
|
|
6022
|
-
"line": 51,
|
|
6023
|
-
"description": "By default this component will forward a number of arguments to attributes on the the\ncomponent's element:\n\n* indeterminate\n* disabled\n* tabindex\n* name\n* autofocus\n* required\n* form\n\nWhen invoked with curly braces, this is the exhaustive list of HTML attributes you can\ncustomize (i.e. `{{input type=\"checkbox\" disabled=true}}`).\n\nWhen invoked with angle bracket invocation, this list is irrelevant, because you can use HTML\nattribute syntax to customize the element (i.e.\n`<Input @type=\"checkbox\" disabled data-custom=\"custom value\" />`). However, `@type` and\n`@checked` must be passed as named arguments, not attributes.",
|
|
6024
|
-
"itemtype": "property",
|
|
6025
|
-
"name": "attributeBindings",
|
|
6026
|
-
"type": "Array | String",
|
|
6027
|
-
"default": "['type', 'checked', 'indeterminate', 'disabled', 'tabindex', 'name', 'autofocus', 'required', 'form']",
|
|
6028
|
-
"access": "public",
|
|
6029
|
-
"tagname": "",
|
|
6030
|
-
"class": "Checkbox",
|
|
6031
|
-
"module": "@ember/component"
|
|
6032
|
-
},
|
|
6033
|
-
{
|
|
6034
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/checkbox.ts",
|
|
6035
|
-
"line": 88,
|
|
6036
|
-
"description": "Sets the `type` attribute of the `Checkbox`'s element",
|
|
6037
|
-
"itemtype": "property",
|
|
6038
|
-
"name": "disabled",
|
|
6039
|
-
"default": "false",
|
|
6040
|
-
"access": "private",
|
|
6041
|
-
"tagname": "",
|
|
6042
|
-
"class": "Checkbox",
|
|
6043
|
-
"module": "@ember/component"
|
|
6044
|
-
},
|
|
6045
|
-
{
|
|
6046
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/checkbox.ts",
|
|
6047
|
-
"line": 97,
|
|
6048
|
-
"description": "Sets the `disabled` attribute of the `Checkbox`'s element",
|
|
6049
|
-
"itemtype": "property",
|
|
6050
|
-
"name": "disabled",
|
|
6051
|
-
"default": "false",
|
|
6052
|
-
"access": "public",
|
|
6053
|
-
"tagname": "",
|
|
6054
|
-
"class": "Checkbox",
|
|
6055
|
-
"module": "@ember/component"
|
|
6056
|
-
},
|
|
6057
|
-
{
|
|
6058
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/checkbox.ts",
|
|
6059
|
-
"line": 106,
|
|
6060
|
-
"description": "Corresponds to the `indeterminate` property of the `Checkbox`'s element",
|
|
6061
|
-
"itemtype": "property",
|
|
6062
|
-
"name": "disabled",
|
|
6063
|
-
"default": "false",
|
|
6064
|
-
"access": "public",
|
|
6065
|
-
"tagname": "",
|
|
6066
|
-
"class": "Checkbox",
|
|
6067
|
-
"module": "@ember/component"
|
|
6068
|
-
},
|
|
6069
|
-
{
|
|
6070
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/checkbox.ts",
|
|
6071
|
-
"line": 115,
|
|
6072
|
-
"description": "Whenever the checkbox is inserted into the DOM, perform initialization steps, which include\nsetting the indeterminate property if needed.\n\nIf this method is overridden, `super` must be called.",
|
|
6073
|
-
"itemtype": "method",
|
|
6074
|
-
"name": "",
|
|
6075
|
-
"access": "public",
|
|
6076
|
-
"tagname": "",
|
|
6077
|
-
"class": "Checkbox",
|
|
6078
|
-
"module": "@ember/component"
|
|
6079
|
-
},
|
|
6080
|
-
{
|
|
6081
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/checkbox.ts",
|
|
6082
|
-
"line": 129,
|
|
6083
|
-
"description": "Whenever the `change` event is fired on the checkbox, update its `checked` property to reflect\nwhether the checkbox is checked.\n\nIf this method is overridden, `super` must be called.",
|
|
6084
|
-
"itemtype": "method",
|
|
6085
|
-
"name": "",
|
|
6086
|
-
"access": "public",
|
|
6087
|
-
"tagname": "",
|
|
6088
|
-
"class": "Checkbox",
|
|
5543
|
+
"class": "Ember.Templates.helpers",
|
|
6089
5544
|
"module": "@ember/component"
|
|
6090
5545
|
},
|
|
6091
5546
|
{
|
|
6092
5547
|
"file": "packages/@ember/-internals/glimmer/lib/components/input.ts",
|
|
6093
|
-
"line":
|
|
6094
|
-
"description": "
|
|
5548
|
+
"line": 54,
|
|
5549
|
+
"description": "An opaque interface which can be imported and used in strict-mode\ntemplates to call <Input>.\n\nSee [Ember.Templates.components.Input](/ember/release/classes/Ember.Templates.components/methods/Input?anchor=Input).",
|
|
6095
5550
|
"itemtype": "method",
|
|
6096
|
-
"name": "
|
|
6097
|
-
"
|
|
6098
|
-
{
|
|
6099
|
-
"name": "options",
|
|
6100
|
-
"description": "",
|
|
6101
|
-
"type": "Hash"
|
|
6102
|
-
}
|
|
5551
|
+
"name": "Input",
|
|
5552
|
+
"see": [
|
|
5553
|
+
"{Ember.Templates.components.Input}"
|
|
6103
5554
|
],
|
|
6104
5555
|
"access": "public",
|
|
6105
5556
|
"tagname": "",
|
|
6106
|
-
"class": "
|
|
5557
|
+
"class": "@ember/component",
|
|
6107
5558
|
"module": "@ember/component"
|
|
6108
5559
|
},
|
|
6109
5560
|
{
|
|
6110
5561
|
"file": "packages/@ember/-internals/glimmer/lib/components/input.ts",
|
|
6111
|
-
"line":
|
|
5562
|
+
"line": 66,
|
|
6112
5563
|
"description": "The `Input` component lets you create an HTML `<input>` element.\n\n```handlebars\n<Input @value=\"987\" />\n```\n\ncreates an `<input>` 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<Input @value={{this.searchWord}} />\n```\n\nIn this example, the initial value in the `<input>` 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<Input @value={{this.searchWord}} @enter={{this.query}} />\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<label for=\"input-name\">Name:</label>\n<Input\n @id=\"input-name\"\n @value={{this.name}}\n {{on \"input\" this.validateName}}\n/>\n```\n\nThe event name (e.g. `focusout`, `input`, `keydown`) always follows the casing\nthat the HTML standard uses.\n\n### `<input>` HTML Attributes to Avoid\n\nIn most cases, if you want to pass an attribute to the underlying HTML `<input>` element, you\ncan pass the attribute directly, just like any other Ember component.\n\n```handlebars\n<Input @type=\"text\" size=\"10\" />\n```\n\nIn this example, the `size` attribute will be applied to the underlying `<input>` 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 `<input>` 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 `<input type=\"checkbox\">` with\n `checked` and the `input` event instead.\n\n### Extending `TextField`\n\nInternally, `<Input @type=\"text\" />` creates an instance of `TextField`, passing arguments from\nthe helper to `TextField`'s `create` method. Subclassing `TextField` is supported but not\nrecommended.\n\nSee [TextField](/ember/release/classes/TextField)\n\n### Checkbox\n\nTo create an `<input type=\"checkbox\">`:\n\n```handlebars\nEmberize Everything:\n<Input @type=\"checkbox\" @checked={{this.isEmberized}} name=\"isEmberized\" />\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.\n\n### Extending `Checkbox`\n\nInternally, `<Input @type=\"checkbox\" />` creates an instance of `Checkbox`. Subclassing\n`TextField` is supported but not recommended.\n\nSee [Checkbox](/ember/release/classes/Checkbox)",
|
|
6113
5564
|
"itemtype": "method",
|
|
6114
5565
|
"name": "Input",
|
|
@@ -6130,147 +5581,77 @@
|
|
|
6130
5581
|
},
|
|
6131
5582
|
{
|
|
6132
5583
|
"file": "packages/@ember/-internals/glimmer/lib/components/input.ts",
|
|
6133
|
-
"line":
|
|
5584
|
+
"line": 183,
|
|
6134
5585
|
"description": "The HTML class attribute.",
|
|
6135
5586
|
"class": "Ember.Templates.components",
|
|
6136
5587
|
"module": "@ember/component"
|
|
6137
5588
|
},
|
|
6138
5589
|
{
|
|
6139
5590
|
"file": "packages/@ember/-internals/glimmer/lib/components/input.ts",
|
|
6140
|
-
"line":
|
|
5591
|
+
"line": 194,
|
|
6141
5592
|
"description": "The HTML type attribute.",
|
|
6142
5593
|
"class": "Ember.Templates.components",
|
|
6143
5594
|
"module": "@ember/component"
|
|
6144
5595
|
},
|
|
6145
5596
|
{
|
|
6146
5597
|
"file": "packages/@ember/-internals/glimmer/lib/components/internal.ts",
|
|
6147
|
-
"line":
|
|
5598
|
+
"line": 37,
|
|
6148
5599
|
"description": "The default HTML id attribute. We don't really _need_ one, this is just\nadded for compatibility as it's hard to tell if people rely on it being\npresent, and it doens't really hurt.\n\nHowever, don't rely on this internally, like passing it to `getElementId`.\nThis can be (and often is) overriden by passing an `id` attribute on the\ninvocation, which shadows this default id via `...attributes`.",
|
|
6149
|
-
"class": "
|
|
5600
|
+
"class": "Ember.Templates.components",
|
|
6150
5601
|
"module": "@ember/component"
|
|
6151
5602
|
},
|
|
6152
5603
|
{
|
|
6153
5604
|
"file": "packages/@ember/-internals/glimmer/lib/components/internal.ts",
|
|
6154
|
-
"line":
|
|
5605
|
+
"line": 50,
|
|
6155
5606
|
"description": "The default HTML class attribute. Similar to the above, we don't _need_\nthem, they are just added for compatibility as it's similarly hard to tell\nif people rely on it in their CSS etc, and it doens't really hurt.",
|
|
6156
|
-
"class": "
|
|
6157
|
-
"module": "@ember/component"
|
|
6158
|
-
},
|
|
6159
|
-
{
|
|
6160
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/text-field.ts",
|
|
6161
|
-
"line": 54,
|
|
6162
|
-
"description": "By default, this component will add the `ember-text-field` class to the component's element.",
|
|
6163
|
-
"itemtype": "property",
|
|
6164
|
-
"name": "classNames",
|
|
6165
|
-
"type": "Array | String",
|
|
6166
|
-
"default": "['ember-text-field']",
|
|
6167
|
-
"access": "public",
|
|
6168
|
-
"tagname": "",
|
|
6169
|
-
"class": "TextField",
|
|
6170
|
-
"module": "@ember/component"
|
|
6171
|
-
},
|
|
6172
|
-
{
|
|
6173
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/text-field.ts",
|
|
6174
|
-
"line": 65,
|
|
6175
|
-
"description": "By default this component will forward a number of arguments to attributes on the the\ncomponent's element:\n\n* accept\n* autocomplete\n* autosave\n* dir\n* formaction\n* formenctype\n* formmethod\n* formnovalidate\n* formtarget\n* height\n* inputmode\n* lang\n* list\n* type\n* max\n* min\n* multiple\n* name\n* pattern\n* size\n* step\n* value\n* width\n\nWhen invoked with `{{input type=\"text\"}}`, you can only customize these attributes. When invoked\nwith `<Input @type=\"text\" />`, you can just use HTML attributes directly.",
|
|
6176
|
-
"itemtype": "property",
|
|
6177
|
-
"name": "attributeBindings",
|
|
6178
|
-
"type": "Array | String",
|
|
6179
|
-
"default": "['accept', 'autocomplete', 'autosave', 'dir', 'formaction', 'formenctype', 'formmethod', 'formnovalidate', 'formtarget', 'height', 'inputmode', 'lang', 'list', 'type', 'max', 'min', 'multiple', 'name', 'pattern', 'size', 'step', 'value', 'width']",
|
|
6180
|
-
"access": "public",
|
|
6181
|
-
"tagname": "",
|
|
6182
|
-
"class": "TextField",
|
|
6183
|
-
"module": "@ember/component"
|
|
6184
|
-
},
|
|
6185
|
-
{
|
|
6186
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/text-field.ts",
|
|
6187
|
-
"line": 127,
|
|
6188
|
-
"description": "As the user inputs text, this property is updated to reflect the `value` property of the HTML\nelement.",
|
|
6189
|
-
"itemtype": "property",
|
|
6190
|
-
"name": "value",
|
|
6191
|
-
"type": "String",
|
|
6192
|
-
"default": "\"\"",
|
|
6193
|
-
"access": "public",
|
|
6194
|
-
"tagname": "",
|
|
6195
|
-
"class": "TextField",
|
|
6196
|
-
"module": "@ember/component"
|
|
6197
|
-
},
|
|
6198
|
-
{
|
|
6199
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/text-field.ts",
|
|
6200
|
-
"line": 138,
|
|
6201
|
-
"description": "The `type` attribute of the input element.",
|
|
6202
|
-
"itemtype": "property",
|
|
6203
|
-
"name": "type",
|
|
6204
|
-
"type": "String",
|
|
6205
|
-
"default": "\"text\"",
|
|
6206
|
-
"access": "public",
|
|
6207
|
-
"tagname": "",
|
|
6208
|
-
"class": "TextField",
|
|
6209
|
-
"module": "@ember/component"
|
|
6210
|
-
},
|
|
6211
|
-
{
|
|
6212
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/text-field.ts",
|
|
6213
|
-
"line": 162,
|
|
6214
|
-
"description": "The `size` of the text field in characters.",
|
|
6215
|
-
"itemtype": "property",
|
|
6216
|
-
"name": "size",
|
|
6217
|
-
"type": "String",
|
|
6218
|
-
"default": "null",
|
|
6219
|
-
"access": "public",
|
|
6220
|
-
"tagname": "",
|
|
6221
|
-
"class": "TextField",
|
|
6222
|
-
"module": "@ember/component"
|
|
6223
|
-
},
|
|
6224
|
-
{
|
|
6225
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/text-field.ts",
|
|
6226
|
-
"line": 172,
|
|
6227
|
-
"description": "The `pattern` attribute of input element.",
|
|
6228
|
-
"itemtype": "property",
|
|
6229
|
-
"name": "pattern",
|
|
6230
|
-
"type": "String",
|
|
6231
|
-
"default": "null",
|
|
6232
|
-
"access": "public",
|
|
6233
|
-
"tagname": "",
|
|
6234
|
-
"class": "TextField",
|
|
5607
|
+
"class": "Ember.Templates.components",
|
|
6235
5608
|
"module": "@ember/component"
|
|
6236
5609
|
},
|
|
6237
5610
|
{
|
|
6238
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/
|
|
6239
|
-
"line":
|
|
6240
|
-
"description": "The `
|
|
6241
|
-
"itemtype": "
|
|
6242
|
-
"name": "
|
|
6243
|
-
"type": "String",
|
|
6244
|
-
"default": "null",
|
|
6245
|
-
"since": "1.4.0",
|
|
5611
|
+
"file": "packages/@ember/-internals/glimmer/lib/components/link-to.ts",
|
|
5612
|
+
"line": 40,
|
|
5613
|
+
"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<LinkTo @route='photoGallery'>\n Great Hamster Photos\n</LinkTo>\n```\n\nThis will result in:\n\n```html\n<a href=\"/hamster-photos\">\n Great Hamster Photos\n</a>\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 `<a>`\nelement.\n\n(The class name to apply to the element can be overridden by using the `disabledClass`\nargument)\n\n```handlebars\n<LinkTo @route='photoGallery' @disabled={{true}}>\n Great Hamster Photos\n</LinkTo>\n```\n\n### Handling `href`\n\n`<LinkTo>` 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<LinkTo @route='photoGallery.recent'>\n Great Hamster Photos\n</LinkTo>\n```\n\nwill result in\n\n```html\n<a href=\"/hamster-photos/this-week\" class=\"active\">\n Great Hamster Photos\n</a>\n```\n\nThe CSS class used for active classes can be customized by passing an `activeClass` argument:\n\n```handlebars\n<LinkTo @route='photoGallery.recent' @activeClass=\"current-url\">\n Great Hamster Photos\n</LinkTo>\n```\n\n```html\n<a href=\"/hamster-photos/this-week\" class=\"current-url\">\n Great Hamster Photos\n</a>\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<LinkTo @route='photoGallery' @current-when='photos'>\n Photo Gallery\n</LinkTo>\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<LinkTo @route='gallery' @current-when='photos drawings paintings'>\n Art Gallery\n</LinkTo>\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<LinkTo @route='photoGallery' @model={{this.aPhoto}}>\n {{aPhoto.title}}\n</LinkTo>\n```\n\n```html\n<a href=\"/hamster-photos/42\">\n Tomster\n</a>\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<LinkTo @route='photoGallery.comment' @models={{array this.aPhoto this.comment}}>\n {{comment.body}}\n</LinkTo>\n```\n\n```html\n<a href=\"/hamster-photos/42/comments/718\">\n A+++ would snuggle again.\n</a>\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<LinkTo @route='photoGallery' @model={{aPhotoId}}>\n {{this.aPhoto.title}}\n</LinkTo>\n```\n\n```html\n<a href=\"/hamster-photos/42\">\n Tomster\n</a>\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<LinkTo @route='photoGallery' @query={{hash page=1 per_page=20}}>\n Great Hamster Photos\n</LinkTo>\n```\n\nThis will result in:\n\n```html\n<a href=\"/hamster-photos?page=1&per_page=20\">\n Great Hamster Photos\n</a>\n```",
|
|
5614
|
+
"itemtype": "method",
|
|
5615
|
+
"name": "LinkTo",
|
|
6246
5616
|
"access": "public",
|
|
6247
5617
|
"tagname": "",
|
|
6248
|
-
"class": "
|
|
5618
|
+
"class": "Ember.Templates.components",
|
|
6249
5619
|
"module": "@ember/component"
|
|
6250
5620
|
},
|
|
6251
5621
|
{
|
|
6252
|
-
"file": "packages/@ember/-internals/glimmer/lib/components/
|
|
6253
|
-
"line":
|
|
6254
|
-
"description": "
|
|
6255
|
-
"itemtype": "
|
|
6256
|
-
"name": "
|
|
6257
|
-
"
|
|
6258
|
-
|
|
6259
|
-
|
|
5622
|
+
"file": "packages/@ember/-internals/glimmer/lib/components/link-to.ts",
|
|
5623
|
+
"line": 252,
|
|
5624
|
+
"description": "See [Ember.Templates.components.LinkTo](/ember/release/classes/Ember.Templates.components/methods/input?anchor=LinkTo).",
|
|
5625
|
+
"itemtype": "method",
|
|
5626
|
+
"name": "link-to",
|
|
5627
|
+
"see": [
|
|
5628
|
+
"{Ember.Templates.components.LinkTo}"
|
|
5629
|
+
],
|
|
6260
5630
|
"access": "public",
|
|
6261
5631
|
"tagname": "",
|
|
6262
|
-
"class": "
|
|
6263
|
-
"module": "@ember/
|
|
5632
|
+
"class": "Ember.Templates.helpers",
|
|
5633
|
+
"module": "@ember/routing"
|
|
5634
|
+
},
|
|
5635
|
+
{
|
|
5636
|
+
"file": "packages/@ember/-internals/glimmer/lib/components/link-to.ts",
|
|
5637
|
+
"line": 261,
|
|
5638
|
+
"description": "An opaque interface which can be imported and used in strict-mode\ntemplates to call <LinkTo>.\n\nSee [Ember.Templates.components.LinkTo](/ember/release/classes/Ember.Templates.components/methods/input?anchor=LinkTo).",
|
|
5639
|
+
"itemtype": "method",
|
|
5640
|
+
"name": "LinkTo",
|
|
5641
|
+
"see": [
|
|
5642
|
+
"{Ember.Templates.components.LinkTo}"
|
|
5643
|
+
],
|
|
5644
|
+
"access": "public",
|
|
5645
|
+
"tagname": "",
|
|
5646
|
+
"class": "@ember/routing",
|
|
5647
|
+
"module": "@ember/routing"
|
|
6264
5648
|
},
|
|
6265
5649
|
{
|
|
6266
5650
|
"file": "packages/@ember/-internals/glimmer/lib/components/textarea.ts",
|
|
6267
|
-
"line":
|
|
5651
|
+
"line": 9,
|
|
6268
5652
|
"description": "The `Textarea` component inserts a new instance of `<textarea>` tag into the template.\n\nThe `@value` argument provides the content of the `<textarea>`.\n\nThis template:\n\n```handlebars\n<Textarea @value=\"A bunch of text\" />\n```\n\nWould result in the following HTML:\n\n```html\n<textarea class=\"ember-text-area\">\n A bunch of text\n</textarea>\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```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<Textarea @value={{writtenWords}} />\n```\n\nWould result in the following HTML:\n\n```html\n<textarea class=\"ember-text-area\">\n Lots of text that IS bound\n</textarea>\n```\n\nIf you wanted a one way binding, you could use the `<textarea>` 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<Textarea @value={{this.searchWord}} @enter={{this.query}} />\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<Textarea @value={{this.searchWord}} @enter={{this.query}} />\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.",
|
|
6269
5653
|
"itemtype": "method",
|
|
6270
5654
|
"name": "Textarea",
|
|
6271
|
-
"see": [
|
|
6272
|
-
"{TextArea}"
|
|
6273
|
-
],
|
|
6274
5655
|
"access": "public",
|
|
6275
5656
|
"tagname": "",
|
|
6276
5657
|
"class": "Ember.Templates.components",
|
|
@@ -6278,18 +5659,32 @@
|
|
|
6278
5659
|
},
|
|
6279
5660
|
{
|
|
6280
5661
|
"file": "packages/@ember/-internals/glimmer/lib/components/textarea.ts",
|
|
6281
|
-
"line":
|
|
5662
|
+
"line": 122,
|
|
6282
5663
|
"description": "See Ember.Templates.components.Textarea.",
|
|
6283
5664
|
"itemtype": "method",
|
|
6284
5665
|
"name": "textarea",
|
|
6285
5666
|
"see": [
|
|
6286
|
-
"{Ember.Templates.components.
|
|
5667
|
+
"{Ember.Templates.components.Textarea}"
|
|
6287
5668
|
],
|
|
6288
5669
|
"access": "public",
|
|
6289
5670
|
"tagname": "",
|
|
6290
5671
|
"class": "Ember.Templates.helpers",
|
|
6291
5672
|
"module": "@ember/component"
|
|
6292
5673
|
},
|
|
5674
|
+
{
|
|
5675
|
+
"file": "packages/@ember/-internals/glimmer/lib/components/textarea.ts",
|
|
5676
|
+
"line": 131,
|
|
5677
|
+
"description": "An opaque interface which can be imported and used in strict-mode\ntemplates to call <Textarea>.\n\nSee [Ember.Templates.components.Textarea](/ember/release/classes/Ember.Templates.components/methods/Textarea?anchor=Input).",
|
|
5678
|
+
"itemtype": "method",
|
|
5679
|
+
"name": "Textarea",
|
|
5680
|
+
"see": [
|
|
5681
|
+
"{Ember.Templates.components.Textarea}"
|
|
5682
|
+
],
|
|
5683
|
+
"access": "public",
|
|
5684
|
+
"tagname": "",
|
|
5685
|
+
"class": "@ember/component",
|
|
5686
|
+
"module": "@ember/component"
|
|
5687
|
+
},
|
|
6293
5688
|
{
|
|
6294
5689
|
"file": "packages/@ember/-internals/glimmer/lib/helpers/-track-array.ts",
|
|
6295
5690
|
"line": 11,
|
|
@@ -6300,7 +5695,7 @@
|
|
|
6300
5695
|
{
|
|
6301
5696
|
"file": "packages/@ember/-internals/glimmer/lib/helpers/action.ts",
|
|
6302
5697
|
"line": 22,
|
|
6303
|
-
"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<div onclick={{action \"save\"}}></div>\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<div onclick={{action \"save\"}}></div>\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```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```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```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```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<MyInput @submit={{action 'setName' @model}} />\n```\n\nor\n\n```handlebars\n{{my-input submit=(action 'setName' @model)}}\n```\n\n```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<div {{action \"save\"}}></div>\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<div {{action \"sayHello\" preventDefault=false}}>\n <input type=\"file\" />\n <input type=\"checkbox\" />\n</div>\n```\n\nTo disable bubbling, pass `bubbles=false` to the helper:\n\n```handlebars\n<button {{action 'edit' post bubbles=false}}>Edit</button>\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\n<div onclick={{disable-bubbling (action \"sayHello\")}}>Hello</div>\n```\n\n```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<div {{action \"anActionName\" on=\"doubleClick\"}}>\n click me\n</div>\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<div {{action \"anActionName\" allowedKeys=\"alt\"}}>\n click me\n</div>\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<div {{action \"anActionName\" allowedKeys=\"any\"}}>\n click me with any key pressed\n</div>\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```app/templates/application.hbs\n<div {{action \"anActionName\" target=someService}}>\n click me\n</div>\n```\n\n```app/controllers/application.js\nimport Controller from '@ember/controller';\nimport {
|
|
5698
|
+
"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<div onclick={{action \"save\"}}></div>\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<div onclick={{action \"save\"}}></div>\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```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```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```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```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<MyInput @submit={{action 'setName' @model}} />\n```\n\nor\n\n```handlebars\n{{my-input submit=(action 'setName' @model)}}\n```\n\n```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<div {{action \"save\"}}></div>\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<div {{action \"sayHello\" preventDefault=false}}>\n <input type=\"file\" />\n <input type=\"checkbox\" />\n</div>\n```\n\nTo disable bubbling, pass `bubbles=false` to the helper:\n\n```handlebars\n<button {{action 'edit' post bubbles=false}}>Edit</button>\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\n<div onclick={{disable-bubbling (action \"sayHello\")}}>Hello</div>\n```\n\n```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<div {{action \"anActionName\" on=\"doubleClick\"}}>\n click me\n</div>\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<div {{action \"anActionName\" allowedKeys=\"alt\"}}>\n click me\n</div>\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<div {{action \"anActionName\" allowedKeys=\"any\"}}>\n click me with any key pressed\n</div>\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```app/templates/application.hbs\n<div {{action \"anActionName\" target=someService}}>\n click me\n</div>\n```\n\n```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```",
|
|
6304
5699
|
"itemtype": "method",
|
|
6305
5700
|
"name": "action",
|
|
6306
5701
|
"access": "public",
|
|
@@ -6502,31 +5897,6 @@
|
|
|
6502
5897
|
"class": "Ember.Templates.helpers",
|
|
6503
5898
|
"module": "ember"
|
|
6504
5899
|
},
|
|
6505
|
-
{
|
|
6506
|
-
"file": "packages/@ember/-internals/glimmer/lib/helpers/query-param.ts",
|
|
6507
|
-
"line": 11,
|
|
6508
|
-
"description": "This is a helper to be used in conjunction with the link-to helper.\nIt will supply url query parameters to the target route.",
|
|
6509
|
-
"example": [
|
|
6510
|
-
" In this example we are setting the `direction` query param to the value `\"asc\"`\n\n```app/templates/application.hbs\n<LinkTo\n @route=\"posts\"\n {{query-params direction=\"asc\"}}\n>\n Sort\n</LinkTo>\n```"
|
|
6511
|
-
],
|
|
6512
|
-
"itemtype": "method",
|
|
6513
|
-
"name": "query-params",
|
|
6514
|
-
"params": [
|
|
6515
|
-
{
|
|
6516
|
-
"name": "hash",
|
|
6517
|
-
"description": "takes a hash of query parameters",
|
|
6518
|
-
"type": "Object"
|
|
6519
|
-
}
|
|
6520
|
-
],
|
|
6521
|
-
"return": {
|
|
6522
|
-
"description": "A `QueryParams` object for `{{link-to}}`",
|
|
6523
|
-
"type": "Object"
|
|
6524
|
-
},
|
|
6525
|
-
"access": "public",
|
|
6526
|
-
"tagname": "",
|
|
6527
|
-
"class": "Ember.Templates.helpers",
|
|
6528
|
-
"module": "ember"
|
|
6529
|
-
},
|
|
6530
5900
|
{
|
|
6531
5901
|
"file": "packages/@ember/-internals/glimmer/lib/helpers/readonly.ts",
|
|
6532
5902
|
"line": 8,
|
|
@@ -6743,7 +6113,7 @@
|
|
|
6743
6113
|
},
|
|
6744
6114
|
{
|
|
6745
6115
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6746
|
-
"line":
|
|
6116
|
+
"line": 752,
|
|
6747
6117
|
"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 `<input>` 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.",
|
|
6748
6118
|
"itemtype": "method",
|
|
6749
6119
|
"name": "readDOMAttr",
|
|
@@ -6764,7 +6134,7 @@
|
|
|
6764
6134
|
},
|
|
6765
6135
|
{
|
|
6766
6136
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6767
|
-
"line":
|
|
6137
|
+
"line": 803,
|
|
6768
6138
|
"description": "The WAI-ARIA role of the control represented by this view. For example, a\nbutton may have a role of type 'button', or a pane may have a role of\ntype 'alertdialog'. This property is used by assistive software to help\nvisually challenged users navigate rich web applications.\n\nThe 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)",
|
|
6769
6139
|
"itemtype": "property",
|
|
6770
6140
|
"name": "ariaRole",
|
|
@@ -6777,7 +6147,7 @@
|
|
|
6777
6147
|
},
|
|
6778
6148
|
{
|
|
6779
6149
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6780
|
-
"line":
|
|
6150
|
+
"line": 818,
|
|
6781
6151
|
"description": "Enables components to take a list of parameters as arguments.\nFor example, a component that takes two parameters with the names\n`name` and `age`:\n\n```app/components/my-component.js\nimport Component from '@ember/component';\n\nlet MyComponent = Component.extend();\n\nMyComponent.reopenClass({\n positionalParams: ['name', 'age']\n});\n\nexport default MyComponent;\n```\n\nIt can then be invoked like this:\n\n```hbs\n{{my-component \"John\" 38}}\n```\n\nThe parameters can be referred to just like named parameters:\n\n```hbs\nName: {{name}}, Age: {{age}}.\n```\n\nUsing a string instead of an array allows for an arbitrary number of\nparameters:\n\n```app/components/my-component.js\nimport Component from '@ember/component';\n\nlet MyComponent = Component.extend();\n\nMyComponent.reopenClass({\n positionalParams: 'names'\n});\n\nexport default MyComponent;\n```\n\nIt can then be invoked like this:\n\n```hbs\n{{my-component \"John\" \"Michael\" \"Scott\"}}\n```\nThe parameters can then be referred to by enumerating over the list:\n\n```hbs\n{{#each names as |name|}}{{name}}{{/each}}\n```",
|
|
6782
6152
|
"static": 1,
|
|
6783
6153
|
"access": "public",
|
|
@@ -6790,7 +6160,7 @@
|
|
|
6790
6160
|
},
|
|
6791
6161
|
{
|
|
6792
6162
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6793
|
-
"line":
|
|
6163
|
+
"line": 879,
|
|
6794
6164
|
"description": "Called when the attributes passed into the component have been updated.\nCalled both during the initial render of a container and during a rerender.\nCan be used in place of an observer; code placed here will be executed\nevery time any attribute updates.",
|
|
6795
6165
|
"itemtype": "method",
|
|
6796
6166
|
"name": "didReceiveAttrs",
|
|
@@ -6802,7 +6172,7 @@
|
|
|
6802
6172
|
},
|
|
6803
6173
|
{
|
|
6804
6174
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6805
|
-
"line":
|
|
6175
|
+
"line": 890,
|
|
6806
6176
|
"description": "Called when the attributes passed into the component have been updated.\nCalled both during the initial render of a container and during a rerender.\nCan be used in place of an observer; code placed here will be executed\nevery time any attribute updates.",
|
|
6807
6177
|
"itemtype": "event",
|
|
6808
6178
|
"name": "didReceiveAttrs",
|
|
@@ -6814,7 +6184,7 @@
|
|
|
6814
6184
|
},
|
|
6815
6185
|
{
|
|
6816
6186
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6817
|
-
"line":
|
|
6187
|
+
"line": 900,
|
|
6818
6188
|
"description": "Called after a component has been rendered, both on initial render and\nin subsequent rerenders.",
|
|
6819
6189
|
"itemtype": "method",
|
|
6820
6190
|
"name": "didRender",
|
|
@@ -6826,7 +6196,7 @@
|
|
|
6826
6196
|
},
|
|
6827
6197
|
{
|
|
6828
6198
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6829
|
-
"line":
|
|
6199
|
+
"line": 909,
|
|
6830
6200
|
"description": "Called after a component has been rendered, both on initial render and\nin subsequent rerenders.",
|
|
6831
6201
|
"itemtype": "event",
|
|
6832
6202
|
"name": "didRender",
|
|
@@ -6838,7 +6208,7 @@
|
|
|
6838
6208
|
},
|
|
6839
6209
|
{
|
|
6840
6210
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6841
|
-
"line":
|
|
6211
|
+
"line": 917,
|
|
6842
6212
|
"description": "Called before a component has been rendered, both on initial render and\nin subsequent rerenders.",
|
|
6843
6213
|
"itemtype": "method",
|
|
6844
6214
|
"name": "willRender",
|
|
@@ -6850,7 +6220,7 @@
|
|
|
6850
6220
|
},
|
|
6851
6221
|
{
|
|
6852
6222
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6853
|
-
"line":
|
|
6223
|
+
"line": 926,
|
|
6854
6224
|
"description": "Called before a component has been rendered, both on initial render and\nin subsequent rerenders.",
|
|
6855
6225
|
"itemtype": "event",
|
|
6856
6226
|
"name": "willRender",
|
|
@@ -6862,7 +6232,7 @@
|
|
|
6862
6232
|
},
|
|
6863
6233
|
{
|
|
6864
6234
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6865
|
-
"line":
|
|
6235
|
+
"line": 934,
|
|
6866
6236
|
"description": "Called when the attributes passed into the component have been changed.\nCalled only during a rerender, not during an initial render.",
|
|
6867
6237
|
"itemtype": "method",
|
|
6868
6238
|
"name": "didUpdateAttrs",
|
|
@@ -6874,7 +6244,7 @@
|
|
|
6874
6244
|
},
|
|
6875
6245
|
{
|
|
6876
6246
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6877
|
-
"line":
|
|
6247
|
+
"line": 943,
|
|
6878
6248
|
"description": "Called when the attributes passed into the component have been changed.\nCalled only during a rerender, not during an initial render.",
|
|
6879
6249
|
"itemtype": "event",
|
|
6880
6250
|
"name": "didUpdateAttrs",
|
|
@@ -6886,7 +6256,7 @@
|
|
|
6886
6256
|
},
|
|
6887
6257
|
{
|
|
6888
6258
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6889
|
-
"line":
|
|
6259
|
+
"line": 951,
|
|
6890
6260
|
"description": "Called when the component is about to update and rerender itself.\nCalled only during a rerender, not during an initial render.",
|
|
6891
6261
|
"itemtype": "method",
|
|
6892
6262
|
"name": "willUpdate",
|
|
@@ -6898,7 +6268,7 @@
|
|
|
6898
6268
|
},
|
|
6899
6269
|
{
|
|
6900
6270
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6901
|
-
"line":
|
|
6271
|
+
"line": 960,
|
|
6902
6272
|
"description": "Called when the component is about to update and rerender itself.\nCalled only during a rerender, not during an initial render.",
|
|
6903
6273
|
"itemtype": "event",
|
|
6904
6274
|
"name": "willUpdate",
|
|
@@ -6910,7 +6280,7 @@
|
|
|
6910
6280
|
},
|
|
6911
6281
|
{
|
|
6912
6282
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6913
|
-
"line":
|
|
6283
|
+
"line": 968,
|
|
6914
6284
|
"description": "Called when the component has updated and rerendered itself.\nCalled only during a rerender, not during an initial render.",
|
|
6915
6285
|
"itemtype": "method",
|
|
6916
6286
|
"name": "didUpdate",
|
|
@@ -6922,7 +6292,7 @@
|
|
|
6922
6292
|
},
|
|
6923
6293
|
{
|
|
6924
6294
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6925
|
-
"line":
|
|
6295
|
+
"line": 977,
|
|
6926
6296
|
"description": "Called when the component has updated and rerendered itself.\nCalled only during a rerender, not during an initial render.",
|
|
6927
6297
|
"itemtype": "event",
|
|
6928
6298
|
"name": "didUpdate",
|
|
@@ -6934,7 +6304,7 @@
|
|
|
6934
6304
|
},
|
|
6935
6305
|
{
|
|
6936
6306
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6937
|
-
"line":
|
|
6307
|
+
"line": 985,
|
|
6938
6308
|
"description": "Layout can be used to wrap content in a component.",
|
|
6939
6309
|
"itemtype": "property",
|
|
6940
6310
|
"name": "layout",
|
|
@@ -6946,7 +6316,7 @@
|
|
|
6946
6316
|
},
|
|
6947
6317
|
{
|
|
6948
6318
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6949
|
-
"line":
|
|
6319
|
+
"line": 992,
|
|
6950
6320
|
"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).",
|
|
6951
6321
|
"itemtype": "property",
|
|
6952
6322
|
"name": "layoutName",
|
|
@@ -6959,30 +6329,7 @@
|
|
|
6959
6329
|
},
|
|
6960
6330
|
{
|
|
6961
6331
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6962
|
-
"line":
|
|
6963
|
-
"description": "Returns a jQuery object for this component's element. If you pass in a selector\nstring, this method will return a jQuery object, using the current element\nas its buffer.\n\nFor example, calling `component.$('li')` will return a jQuery object containing\nall of the `li` elements inside the DOM element of this component.\n\nPlease note that jQuery integration is off by default and this feature will\nnot work properly. To enable this feature, you can read the instructions in\nthe [jquery-integration optional feature guide](https://guides.emberjs.com/release/configuring-ember/optional-features/#toc_jquery-integration).",
|
|
6964
|
-
"itemtype": "method",
|
|
6965
|
-
"name": "$",
|
|
6966
|
-
"params": [
|
|
6967
|
-
{
|
|
6968
|
-
"name": "selector",
|
|
6969
|
-
"description": "a jQuery-compatible selector string",
|
|
6970
|
-
"type": "String",
|
|
6971
|
-
"optional": true
|
|
6972
|
-
}
|
|
6973
|
-
],
|
|
6974
|
-
"return": {
|
|
6975
|
-
"description": "the jQuery object for the DOM node",
|
|
6976
|
-
"type": "JQuery"
|
|
6977
|
-
},
|
|
6978
|
-
"access": "public",
|
|
6979
|
-
"tagname": "",
|
|
6980
|
-
"class": "Component",
|
|
6981
|
-
"module": "@ember/component"
|
|
6982
|
-
},
|
|
6983
|
-
{
|
|
6984
|
-
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6985
|
-
"line": 1020,
|
|
6332
|
+
"line": 1002,
|
|
6986
6333
|
"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<MyComponent @elementId=\"a-really-cool-id\" />\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```",
|
|
6987
6334
|
"itemtype": "property",
|
|
6988
6335
|
"name": "elementId",
|
|
@@ -7006,8 +6353,8 @@
|
|
|
7006
6353
|
},
|
|
7007
6354
|
{
|
|
7008
6355
|
"file": "packages/@ember/-internals/glimmer/lib/helper.ts",
|
|
7009
|
-
"line":
|
|
7010
|
-
"description": "On a class-based helper, it may be useful to force a recomputation of that\nhelpers value. This is akin to `rerender` on a component.\n\nFor example, this component will rerender when the `currentUser` on a\nsession service changes:\n\n```app/helpers/current-user-email.js\nimport Helper from '@ember/component/helper'\nimport {
|
|
6356
|
+
"line": 85,
|
|
6357
|
+
"description": "On a class-based helper, it may be useful to force a recomputation of that\nhelpers value. This is akin to `rerender` on a component.\n\nFor example, this component will rerender when the `currentUser` on a\nsession service changes:\n\n```app/helpers/current-user-email.js\nimport Helper from '@ember/component/helper'\nimport { service } from '@ember/service'\nimport { observer } from '@ember/object'\n\nexport default Helper.extend({\n session: service(),\n\n onNewUser: observer('session.currentUser', function() {\n this.recompute();\n }),\n\n compute() {\n return this.get('session.currentUser.email');\n }\n});\n```",
|
|
7011
6358
|
"itemtype": "method",
|
|
7012
6359
|
"name": "recompute",
|
|
7013
6360
|
"access": "public",
|
|
@@ -7018,7 +6365,7 @@
|
|
|
7018
6365
|
},
|
|
7019
6366
|
{
|
|
7020
6367
|
"file": "packages/@ember/-internals/glimmer/lib/helper.ts",
|
|
7021
|
-
"line":
|
|
6368
|
+
"line": 118,
|
|
7022
6369
|
"description": "Override this function when writing a class-based helper.",
|
|
7023
6370
|
"itemtype": "method",
|
|
7024
6371
|
"name": "compute",
|
|
@@ -7042,7 +6389,7 @@
|
|
|
7042
6389
|
},
|
|
7043
6390
|
{
|
|
7044
6391
|
"file": "packages/@ember/-internals/glimmer/lib/helper.ts",
|
|
7045
|
-
"line":
|
|
6392
|
+
"line": 231,
|
|
7046
6393
|
"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```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```",
|
|
7047
6394
|
"static": 1,
|
|
7048
6395
|
"params": [
|
|
@@ -7209,16 +6556,6 @@
|
|
|
7209
6556
|
"class": "@glimmer/tracking/primitives/cache",
|
|
7210
6557
|
"module": "@glimmer/tracking/primitives/cache"
|
|
7211
6558
|
},
|
|
7212
|
-
{
|
|
7213
|
-
"file": "packages/@ember/-internals/metal/lib/cached.ts",
|
|
7214
|
-
"line": 8,
|
|
7215
|
-
"decorator": "The `@cached` decorator can be used on getters in order to cache the return\nvalue of the getter. This is useful when a getter is expensive and used very\noften.",
|
|
7216
|
-
"example": [
|
|
7217
|
-
"\n\nin this guest list class, we have the `sortedGuests`\ngetter that sorts the guests alphabetically:\n\n```js\nimport { tracked } from '@glimmer/tracking';\n\nclass 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 is\nsmall, like the one in the example, this is not a problem. However, if the guest\nlist were to grow very large, it would mean that we would be doing a large\namount of work each time we accessed `sortedGetters`. With `@cached`, we can\ncache the value instead:\n\n```js\nimport { tracked, cached } from '@glimmer/tracking';\n\nclass 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_. It will\nonly rerun and create a new sorted array when the `guests` tracked property is\nupdated.\n\nIn general, you should avoid using `@cached` unless you have confirmed that the\ngetter you are decorating is computationally expensive. `@cached` adds a small\namount of overhead to the getter, making it more expensive. While this overhead\nis small, if `@cached` is overused it can add up to a large impact overall in\nyour app. Many getters and tracked properties are only accessed once, rendered,\nand then never rerendered, so adding `@cached` when it is unnecessary can\nnegatively impact performance."
|
|
7218
|
-
],
|
|
7219
|
-
"class": "ComputedProperty",
|
|
7220
|
-
"module": "@glimmer/tracking/primitives/cache"
|
|
7221
|
-
},
|
|
7222
6559
|
{
|
|
7223
6560
|
"file": "packages/@ember/-internals/metal/lib/computed.ts",
|
|
7224
6561
|
"line": 583,
|
|
@@ -7697,7 +7034,7 @@
|
|
|
7697
7034
|
},
|
|
7698
7035
|
{
|
|
7699
7036
|
"file": "packages/@ember/-internals/metal/lib/mixin.ts",
|
|
7700
|
-
"line":
|
|
7037
|
+
"line": 430,
|
|
7701
7038
|
"itemtype": "method",
|
|
7702
7039
|
"name": "mixin",
|
|
7703
7040
|
"params": [
|
|
@@ -7721,7 +7058,7 @@
|
|
|
7721
7058
|
},
|
|
7722
7059
|
{
|
|
7723
7060
|
"file": "packages/@ember/-internals/metal/lib/mixin.ts",
|
|
7724
|
-
"line":
|
|
7061
|
+
"line": 559,
|
|
7725
7062
|
"itemtype": "method",
|
|
7726
7063
|
"name": "create",
|
|
7727
7064
|
"static": 1,
|
|
@@ -7739,7 +7076,7 @@
|
|
|
7739
7076
|
},
|
|
7740
7077
|
{
|
|
7741
7078
|
"file": "packages/@ember/-internals/metal/lib/mixin.ts",
|
|
7742
|
-
"line":
|
|
7079
|
+
"line": 591,
|
|
7743
7080
|
"itemtype": "method",
|
|
7744
7081
|
"name": "reopen",
|
|
7745
7082
|
"params": [
|
|
@@ -7756,7 +7093,7 @@
|
|
|
7756
7093
|
},
|
|
7757
7094
|
{
|
|
7758
7095
|
"file": "packages/@ember/-internals/metal/lib/mixin.ts",
|
|
7759
|
-
"line":
|
|
7096
|
+
"line": 613,
|
|
7760
7097
|
"itemtype": "method",
|
|
7761
7098
|
"name": "apply",
|
|
7762
7099
|
"params": [
|
|
@@ -7775,7 +7112,7 @@
|
|
|
7775
7112
|
},
|
|
7776
7113
|
{
|
|
7777
7114
|
"file": "packages/@ember/-internals/metal/lib/mixin.ts",
|
|
7778
|
-
"line":
|
|
7115
|
+
"line": 632,
|
|
7779
7116
|
"itemtype": "method",
|
|
7780
7117
|
"name": "detect",
|
|
7781
7118
|
"params": [
|
|
@@ -7795,7 +7132,7 @@
|
|
|
7795
7132
|
},
|
|
7796
7133
|
{
|
|
7797
7134
|
"file": "packages/@ember/-internals/metal/lib/mixin.ts",
|
|
7798
|
-
"line":
|
|
7135
|
+
"line": 749,
|
|
7799
7136
|
"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.",
|
|
7800
7137
|
"itemtype": "method",
|
|
7801
7138
|
"name": "observer",
|
|
@@ -8019,7 +7356,7 @@
|
|
|
8019
7356
|
},
|
|
8020
7357
|
{
|
|
8021
7358
|
"file": "packages/@ember/-internals/metal/lib/property_get.ts",
|
|
8022
|
-
"line":
|
|
7359
|
+
"line": 41,
|
|
8023
7360
|
"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.",
|
|
8024
7361
|
"itemtype": "method",
|
|
8025
7362
|
"name": "get",
|
|
@@ -8140,8 +7477,8 @@
|
|
|
8140
7477
|
"access": "private",
|
|
8141
7478
|
"tagname": "Marks a property as tracked.\n\nBy default, a component's properties are expected to be static,\nmeaning you are not able to update them and have the template update accordingly.\nMarking a property as tracked means that when that property changes,\na rerender of the component is scheduled so the template is kept up to date.\n\nThere are two usages for the `@tracked` decorator, shown below.",
|
|
8142
7479
|
"example": [
|
|
8143
|
-
" No dependencies\n\nIf you don't pass an argument to `@tracked`, only changes to that property\nwill be tracked:\n\n```typescript\nimport Component
|
|
8144
|
-
" Dependents\n\nIn the case that you have a computed property that depends other\nproperties, you want to track both so that when one of the\ndependents change, a rerender is scheduled.\n\nIn the following example we have two properties,\n`eatenApples`, and `remainingApples`.\n\n```typescript\nimport Component
|
|
7480
|
+
" No dependencies\n\nIf you don't pass an argument to `@tracked`, only changes to that property\nwill be tracked:\n\n```typescript\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\n\nexport default class MyComponent extends Component {\n @tracked\n remainingApples = 10\n}\n```\n\nWhen something changes the component's `remainingApples` property, the rerender\nwill be scheduled.",
|
|
7481
|
+
" Dependents\n\nIn the case that you have a computed property that depends other\nproperties, you want to track both so that when one of the\ndependents change, a rerender is scheduled.\n\nIn the following example we have two properties,\n`eatenApples`, and `remainingApples`.\n\n```typescript\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\n\nconst totalApples = 100;\n\nexport default class MyComponent extends Component {\n @tracked\n eatenApples = 0\n\n @tracked('eatenApples')\n get remainingApples() {\n return totalApples - this.eatenApples;\n }\n\n increment() {\n this.eatenApples = this.eatenApples + 1;\n }\n}\n```"
|
|
8145
7482
|
],
|
|
8146
7483
|
"params": [
|
|
8147
7484
|
{
|
|
@@ -8291,6 +7628,8 @@
|
|
|
8291
7628
|
"description": "the transition object associated with this\n attempted transition",
|
|
8292
7629
|
"type": "Transition"
|
|
8293
7630
|
},
|
|
7631
|
+
"deprecated": true,
|
|
7632
|
+
"deprecationMessage": "Use replaceWith from the Router service instead.",
|
|
8294
7633
|
"access": "public",
|
|
8295
7634
|
"tagname": "",
|
|
8296
7635
|
"class": "Ember.ControllerMixin",
|
|
@@ -8714,7 +8053,7 @@
|
|
|
8714
8053
|
},
|
|
8715
8054
|
{
|
|
8716
8055
|
"file": "packages/@ember/-internals/routing/lib/location/none_location.ts",
|
|
8717
|
-
"line":
|
|
8056
|
+
"line": 55,
|
|
8718
8057
|
"description": "Returns the current path without `rootURL`.",
|
|
8719
8058
|
"access": "private",
|
|
8720
8059
|
"tagname": "",
|
|
@@ -8729,7 +8068,7 @@
|
|
|
8729
8068
|
},
|
|
8730
8069
|
{
|
|
8731
8070
|
"file": "packages/@ember/-internals/routing/lib/location/none_location.ts",
|
|
8732
|
-
"line":
|
|
8071
|
+
"line": 72,
|
|
8733
8072
|
"description": "Set the path and remembers what was set. Using this method\nto change the path will not invoke the `updateURL` callback.",
|
|
8734
8073
|
"access": "private",
|
|
8735
8074
|
"tagname": "",
|
|
@@ -8747,7 +8086,7 @@
|
|
|
8747
8086
|
},
|
|
8748
8087
|
{
|
|
8749
8088
|
"file": "packages/@ember/-internals/routing/lib/location/none_location.ts",
|
|
8750
|
-
"line":
|
|
8089
|
+
"line": 84,
|
|
8751
8090
|
"description": "Register a callback to be invoked when the path changes. These\ncallbacks will execute when the user presses the back or forward\nbutton, but not after `setURL` is invoked.",
|
|
8752
8091
|
"access": "private",
|
|
8753
8092
|
"tagname": "",
|
|
@@ -8765,7 +8104,7 @@
|
|
|
8765
8104
|
},
|
|
8766
8105
|
{
|
|
8767
8106
|
"file": "packages/@ember/-internals/routing/lib/location/none_location.ts",
|
|
8768
|
-
"line":
|
|
8107
|
+
"line": 97,
|
|
8769
8108
|
"description": "Sets the path and calls the `updateURL` callback.",
|
|
8770
8109
|
"access": "private",
|
|
8771
8110
|
"tagname": "",
|
|
@@ -8783,7 +8122,7 @@
|
|
|
8783
8122
|
},
|
|
8784
8123
|
{
|
|
8785
8124
|
"file": "packages/@ember/-internals/routing/lib/location/none_location.ts",
|
|
8786
|
-
"line":
|
|
8125
|
+
"line": 109,
|
|
8787
8126
|
"description": "Given a URL, formats it to be placed into the page as part\nof an element's `href` attribute.\n\nThis is used, for example, when using the {{action}} helper\nto generate a URL based on an event.",
|
|
8788
8127
|
"access": "private",
|
|
8789
8128
|
"tagname": "",
|
|
@@ -8839,7 +8178,7 @@
|
|
|
8839
8178
|
{
|
|
8840
8179
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8841
8180
|
"line": 71,
|
|
8842
|
-
"description": "Transition the application into another route. The route may\nbe either a single route or route path:\n\nSee [transitionTo](/ember/release/classes/Route/methods/transitionTo?anchor=transitionTo) for more info.\n\nCalling `transitionTo` from the Router service will cause default query parameter values to be included in the URL.\nThis behavior is different from calling `transitionTo` on a route or `transitionToRoute` on a controller.\nSee the [Router Service RFC](https://github.com/emberjs/rfcs/blob/master/text/0095-router-service.md#query-parameter-semantics) for more info.\n\nIn the following example we use the Router service to navigate to a route with a\nspecific model from a Component in the first action, and in the second we trigger\na query-params only transition.\n\n```app/components/example.js\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport {
|
|
8181
|
+
"description": "Transition the application into another route. The route may\nbe either a single route or route path:\n\nSee [transitionTo](/ember/release/classes/Route/methods/transitionTo?anchor=transitionTo) for more info.\n\nCalling `transitionTo` from the Router service will cause default query parameter values to be included in the URL.\nThis behavior is different from calling `transitionTo` on a route or `transitionToRoute` on a controller.\nSee the [Router Service RFC](https://github.com/emberjs/rfcs/blob/master/text/0095-router-service.md#query-parameter-semantics) for more info.\n\nIn the following example we use the Router service to navigate to a route with a\nspecific model from a Component in the first action, and in the second we trigger\na query-params only transition.\n\n```app/components/example.js\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { service } from '@ember/service';\n\nexport default class extends Component {\n @service router;\n\n @action\n goToComments(post) {\n this.router.transitionTo('comments', post);\n }\n\n @action\n fetchMoreComments(latestComment) {\n this.router.transitionTo({\n queryParams: { commentsAfter: latestComment }\n });\n }\n}\n```",
|
|
8843
8182
|
"itemtype": "method",
|
|
8844
8183
|
"name": "transitionTo",
|
|
8845
8184
|
"params": [
|
|
@@ -8907,7 +8246,7 @@
|
|
|
8907
8246
|
{
|
|
8908
8247
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8909
8248
|
"line": 174,
|
|
8910
|
-
"description": "Generate a URL based on the supplied route name and optionally a model. The\nURL is returned as a string that can be used for any purpose.\n\nIn this example, the URL for the `author.books` route for a given author\nis copied to the clipboard.\n\n```app/templates/application.hbs\n<CopyLink @author={{hash id=\"tomster\" name=\"Tomster\"}} />\n```\n\n```app/components/copy-link.js\nimport Component from '@glimmer/component';\nimport {
|
|
8249
|
+
"description": "Generate a URL based on the supplied route name and optionally a model. The\nURL is returned as a string that can be used for any purpose.\n\nIn this example, the URL for the `author.books` route for a given author\nis copied to the clipboard.\n\n```app/templates/application.hbs\n<CopyLink @author={{hash id=\"tomster\" name=\"Tomster\"}} />\n```\n\n```app/components/copy-link.js\nimport Component from '@glimmer/component';\nimport { service } from '@ember/service';\nimport { action } from '@ember/object';\n\nexport default class CopyLinkComponent extends Component {\n @service router;\n @service clipboard;\n\n @action\n copyBooksURL() {\n if (this.author) {\n const url = this.router.urlFor('author.books', this.args.author);\n this.clipboard.set(url);\n // Clipboard now has /author/tomster/books\n }\n }\n}\n```\n\nJust like with `transitionTo` and `replaceWith`, `urlFor` can also handle\nquery parameters.\n\n```app/templates/application.hbs\n<CopyLink @author={{hash id=\"tomster\" name=\"Tomster\"}} />\n```\n\n```app/components/copy-link.js\nimport Component from '@glimmer/component';\nimport { service } from '@ember/service';\nimport { action } from '@ember/object';\n\nexport default class CopyLinkComponent extends Component {\n @service router;\n @service clipboard;\n\n @action\n copyOnlyEmberBooksURL() {\n if (this.author) {\n const url = this.router.urlFor('author.books', this.author, {\n queryParams: { filter: 'emberjs' }\n });\n this.clipboard.set(url);\n // Clipboard now has /author/tomster/books?filter=emberjs\n }\n }\n}\n```",
|
|
8911
8250
|
"itemtype": "method",
|
|
8912
8251
|
"name": "urlFor",
|
|
8913
8252
|
"params": [
|
|
@@ -8940,7 +8279,7 @@
|
|
|
8940
8279
|
{
|
|
8941
8280
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8942
8281
|
"line": 248,
|
|
8943
|
-
"description": "Returns `true` if `routeName/models/queryParams` is the active route, where `models` and `queryParams` are optional.\nSee [model](api/ember/release/classes/Route/methods/model?anchor=model) and\n[queryParams](/api/ember/3.7/classes/Route/properties/queryParams?anchor=queryParams) for more information about these arguments.\n\nIn the following example, `isActive` will return `true` if the current route is `/posts`.\n\n```app/components/posts.js\nimport Component from '@glimmer/component';\nimport {
|
|
8282
|
+
"description": "Returns `true` if `routeName/models/queryParams` is the active route, where `models` and `queryParams` are optional.\nSee [model](api/ember/release/classes/Route/methods/model?anchor=model) and\n[queryParams](/api/ember/3.7/classes/Route/properties/queryParams?anchor=queryParams) for more information about these arguments.\n\nIn the following example, `isActive` will return `true` if the current route is `/posts`.\n\n```app/components/posts.js\nimport Component from '@glimmer/component';\nimport { service } from '@ember/service';\n\nexport default class extends Component {\n @service router;\n\n displayComments() {\n return this.router.isActive('posts');\n }\n});\n```\n\nThe next example includes a dynamic segment, and will return `true` if the current route is `/posts/1`,\nassuming the post has an id of 1:\n\n```app/components/posts.js\nimport Component from '@glimmer/component';\nimport { service } from '@ember/service';\n\nexport default class extends Component {\n @service router;\n\n displayComments(post) {\n return this.router.isActive('posts', post.id);\n }\n});\n```\n\nWhere `post.id` is the id of a specific post, which is represented in the route as /posts/[post.id].\nIf `post.id` is equal to 1, then isActive will return true if the current route is /posts/1, and false if the route is anything else.",
|
|
8944
8283
|
"itemtype": "method",
|
|
8945
8284
|
"name": "isActive",
|
|
8946
8285
|
"params": [
|
|
@@ -8973,7 +8312,7 @@
|
|
|
8973
8312
|
{
|
|
8974
8313
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8975
8314
|
"line": 345,
|
|
8976
|
-
"description": "Takes a string URL and returns a `RouteInfo` for the leafmost route represented\nby the URL. Returns `null` if the URL is not recognized. This method expects to\nreceive the actual URL as seen by the browser including the app's `rootURL`.\n\nSee [RouteInfo](/ember/release/classes/RouteInfo) for more info.\n\nIn the following example `recognize` is used to verify if a path belongs to our\napplication before transitioning to it.\n\n```\nimport Component from '@ember/component';\nimport {
|
|
8315
|
+
"description": "Takes a string URL and returns a `RouteInfo` for the leafmost route represented\nby the URL. Returns `null` if the URL is not recognized. This method expects to\nreceive the actual URL as seen by the browser including the app's `rootURL`.\n\nSee [RouteInfo](/ember/release/classes/RouteInfo) for more info.\n\nIn the following example `recognize` is used to verify if a path belongs to our\napplication before transitioning to it.\n\n```\nimport Component from '@ember/component';\nimport { service } from '@ember/service';\n\nexport default class extends Component {\n @service router;\n path = '/';\n\n click() {\n if (this.router.recognize(this.path)) {\n this.router.transitionTo(this.path);\n }\n }\n}\n```",
|
|
8977
8316
|
"itemtype": "method",
|
|
8978
8317
|
"name": "recognize",
|
|
8979
8318
|
"params": [
|
|
@@ -9009,7 +8348,7 @@
|
|
|
9009
8348
|
{
|
|
9010
8349
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
9011
8350
|
"line": 406,
|
|
9012
|
-
"description": "The `routeWillChange` event is fired at the beginning of any\nattempted transition with a `Transition` object as the sole\nargument. This action can be used for aborting, redirecting,\nor decorating the transition from the currently active routes.\n\nA good example is preventing navigation when a form is\nhalf-filled out:\n\n```app/routes/contact-form.js\nimport Route from '@ember/routing';\nimport {
|
|
8351
|
+
"description": "The `routeWillChange` event is fired at the beginning of any\nattempted transition with a `Transition` object as the sole\nargument. This action can be used for aborting, redirecting,\nor decorating the transition from the currently active routes.\n\nA good example is preventing navigation when a form is\nhalf-filled out:\n\n```app/routes/contact-form.js\nimport Route from '@ember/routing';\nimport { service } from '@ember/service';\n\nexport default class extends Route {\n @service router;\n\n constructor() {\n super(...arguments);\n\n this.router.on('routeWillChange', (transition) => {\n if (!transition.to.find(route => route.name === this.routeName)) {\n alert(\"Please save or cancel your changes.\");\n transition.abort();\n }\n })\n }\n}\n```\n\nThe `routeWillChange` event fires whenever a new route is chosen as the desired target of a transition. This includes `transitionTo`, `replaceWith`, all redirection for any reason including error handling, and abort. Aborting implies changing the desired target back to where you already were. Once a transition has completed, `routeDidChange` fires.",
|
|
9013
8352
|
"itemtype": "event",
|
|
9014
8353
|
"name": "routeWillChange",
|
|
9015
8354
|
"params": [
|
|
@@ -9027,7 +8366,7 @@
|
|
|
9027
8366
|
{
|
|
9028
8367
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
9029
8368
|
"line": 442,
|
|
9030
|
-
"description": "The `routeDidChange` event only fires once a transition has settled.\nThis includes aborts and error substates. Like the `routeWillChange` event\nit receives a Transition as the sole argument.\n\nA good example is sending some analytics when the route has transitioned:\n\n```app/routes/contact-form.js\nimport Route from '@ember/routing';\nimport {
|
|
8369
|
+
"description": "The `routeDidChange` event only fires once a transition has settled.\nThis includes aborts and error substates. Like the `routeWillChange` event\nit receives a Transition as the sole argument.\n\nA good example is sending some analytics when the route has transitioned:\n\n```app/routes/contact-form.js\nimport Route from '@ember/routing';\nimport { service } from '@ember/service';\n\nexport default class extends Route {\n @service router;\n\n constructor() {\n super(...arguments);\n\n this.router.on('routeDidChange', (transition) => {\n ga.send('pageView', {\n current: transition.to.name,\n from: transition.from.name\n });\n })\n }\n}\n```\n\n`routeDidChange` will be called after any `Route`'s\n[didTransition](/ember/release/classes/Route/events/didTransition?anchor=didTransition)\naction has been fired.\nThe updates of properties\n[currentURL](/ember/release/classes/RouterService/properties/currentURL?anchor=currentURL),\n[currentRouteName](/ember/release/classes/RouterService/properties/currentURL?anchor=currentRouteName)\nand\n[currentRoute](/ember/release/classes/RouterService/properties/currentURL?anchor=currentRoute)\nare completed at the time `routeDidChange` is called.",
|
|
9031
8370
|
"itemtype": "event",
|
|
9032
8371
|
"name": "routeDidChange",
|
|
9033
8372
|
"params": [
|
|
@@ -9121,7 +8460,7 @@
|
|
|
9121
8460
|
{
|
|
9122
8461
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
9123
8462
|
"line": 645,
|
|
9124
|
-
"description": "The `currentRoute` property contains metadata about the current leaf route.\nIt returns a `RouteInfo` object that has information like the route name,\nparams, query params and more.\n\nSee [RouteInfo](/ember/release/classes/RouteInfo) for more info.\n\nThis property is guaranteed to change whenever a route transition\nhappens (even when that transition only changes parameters\nand doesn't change the active route).\n\nUsage example:\n```app/components/header.js\n import Component from '@glimmer/component';\n import {
|
|
8463
|
+
"description": "The `currentRoute` property contains metadata about the current leaf route.\nIt returns a `RouteInfo` object that has information like the route name,\nparams, query params and more.\n\nSee [RouteInfo](/ember/release/classes/RouteInfo) for more info.\n\nThis property is guaranteed to change whenever a route transition\nhappens (even when that transition only changes parameters\nand doesn't change the active route).\n\nUsage example:\n```app/components/header.js\n import Component from '@glimmer/component';\n import { service } from '@ember/service';\n import { notEmpty } from '@ember/object/computed';\n\n export default class extends Component {\n @service router;\n\n @notEmpty('router.currentRoute.child') isChildRoute;\n });\n```",
|
|
9125
8464
|
"itemtype": "property",
|
|
9126
8465
|
"name": "currentRoute",
|
|
9127
8466
|
"type": "RouteInfo",
|
|
@@ -9426,7 +8765,7 @@
|
|
|
9426
8765
|
},
|
|
9427
8766
|
{
|
|
9428
8767
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9429
|
-
"line":
|
|
8768
|
+
"line": 147,
|
|
9430
8769
|
"description": "Configuration hash for this route's queryParams. The possible\nconfiguration options and their defaults are as follows\n(assuming a query param whose controller property is `page`):\n\n```javascript\nqueryParams: {\n page: {\n // By default, controller query param properties don't\n // cause a full transition when they are changed, but\n // rather only cause the URL to update. Setting\n // `refreshModel` to true will cause an \"in-place\"\n // transition to occur, whereby the model hooks for\n // this route (and any child routes) will re-fire, allowing\n // you to reload models (e.g., from the server) using the\n // updated query param values.\n refreshModel: false,\n\n // By default, changes to controller query param properties\n // cause the URL to update via `pushState`, which means an\n // item will be added to the browser's history, allowing\n // you to use the back button to restore the app to the\n // previous state before the query param property was changed.\n // Setting `replace` to true will use `replaceState` (or its\n // hash location equivalent), which causes no browser history\n // item to be added. This options name and default value are\n // the same as the `link-to` helper's `replace` option.\n replace: false,\n\n // By default, the query param URL key is the same name as\n // the controller property name. Use `as` to specify a\n // different URL key.\n as: 'page'\n }\n}\n```",
|
|
9431
8770
|
"itemtype": "property",
|
|
9432
8771
|
"name": "queryParams",
|
|
@@ -9439,7 +8778,7 @@
|
|
|
9439
8778
|
},
|
|
9440
8779
|
{
|
|
9441
8780
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9442
|
-
"line":
|
|
8781
|
+
"line": 193,
|
|
9443
8782
|
"description": "The name of the template to use by default when rendering this routes\ntemplate.\n\n```app/routes/posts/list.js\nimport Route from '@ember/routing/route';\n\nexport default class extends Route {\n templateName = 'posts/list'\n});\n```\n\n```app/routes/posts/index.js\nimport PostsList from '../posts/list';\n\nexport default class extends PostsList {};\n```\n\n```app/routes/posts/archived.js\nimport PostsList from '../posts/list';\n\nexport default class extends PostsList {};\n```",
|
|
9444
8783
|
"itemtype": "property",
|
|
9445
8784
|
"name": "templateName",
|
|
@@ -9453,7 +8792,7 @@
|
|
|
9453
8792
|
},
|
|
9454
8793
|
{
|
|
9455
8794
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9456
|
-
"line":
|
|
8795
|
+
"line": 226,
|
|
9457
8796
|
"description": "The name of the controller to associate with this route.\n\nBy default, Ember will lookup a route's controller that matches the name\nof the route (i.e. `posts.new`). However,\nif you would like to define a specific controller to use, you can do so\nusing this property.\n\nThis is useful in many ways, as the controller specified will be:\n\n* passed to the `setupController` method.\n* used as the controller for the template being rendered by the route.\n* returned from a call to `controllerFor` for the route.",
|
|
9458
8797
|
"itemtype": "property",
|
|
9459
8798
|
"name": "controllerName",
|
|
@@ -9467,7 +8806,7 @@
|
|
|
9467
8806
|
},
|
|
9468
8807
|
{
|
|
9469
8808
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9470
|
-
"line":
|
|
8809
|
+
"line": 249,
|
|
9471
8810
|
"description": "The controller associated with this route.\n\nExample\n\n```app/routes/form.js\nimport Route from '@ember/routing/route';\nimport { action } from '@ember/object';\n\nexport default class FormRoute extends Route {\n @action\n willTransition(transition) {\n if (this.controller.get('userHasEnteredData') &&\n !confirm('Are you sure you want to abandon progress?')) {\n transition.abort();\n } else {\n // Bubble the `willTransition` action so that\n // parent routes can decide whether or not to abort.\n return true;\n }\n }\n}\n```",
|
|
9472
8811
|
"itemtype": "property",
|
|
9473
8812
|
"name": "controller",
|
|
@@ -9480,7 +8819,7 @@
|
|
|
9480
8819
|
},
|
|
9481
8820
|
{
|
|
9482
8821
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9483
|
-
"line":
|
|
8822
|
+
"line": 280,
|
|
9484
8823
|
"description": "The name of the route, dot-delimited.\n\nFor example, a route found at `app/routes/posts/post.js` will have\na `routeName` of `posts.post`.",
|
|
9485
8824
|
"itemtype": "property",
|
|
9486
8825
|
"name": "routeName",
|
|
@@ -9493,7 +8832,7 @@
|
|
|
9493
8832
|
},
|
|
9494
8833
|
{
|
|
9495
8834
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9496
|
-
"line":
|
|
8835
|
+
"line": 294,
|
|
9497
8836
|
"description": "The name of the route, dot-delimited, including the engine prefix\nif applicable.\n\nFor example, a route found at `addon/routes/posts/post.js` within an\nengine named `admin` will have a `fullRouteName` of `admin.posts.post`.",
|
|
9498
8837
|
"itemtype": "property",
|
|
9499
8838
|
"name": "fullRouteName",
|
|
@@ -9506,7 +8845,7 @@
|
|
|
9506
8845
|
},
|
|
9507
8846
|
{
|
|
9508
8847
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9509
|
-
"line":
|
|
8848
|
+
"line": 309,
|
|
9510
8849
|
"description": "Sets the name for this route, including a fully resolved name for routes\ninside engines.",
|
|
9511
8850
|
"access": "private",
|
|
9512
8851
|
"tagname": "",
|
|
@@ -9524,7 +8863,7 @@
|
|
|
9524
8863
|
},
|
|
9525
8864
|
{
|
|
9526
8865
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9527
|
-
"line":
|
|
8866
|
+
"line": 322,
|
|
9528
8867
|
"access": "private",
|
|
9529
8868
|
"tagname": "",
|
|
9530
8869
|
"itemtype": "method",
|
|
@@ -9534,7 +8873,7 @@
|
|
|
9534
8873
|
},
|
|
9535
8874
|
{
|
|
9536
8875
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9537
|
-
"line":
|
|
8876
|
+
"line": 353,
|
|
9538
8877
|
"access": "private",
|
|
9539
8878
|
"tagname": "",
|
|
9540
8879
|
"itemtype": "property",
|
|
@@ -9544,7 +8883,7 @@
|
|
|
9544
8883
|
},
|
|
9545
8884
|
{
|
|
9546
8885
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9547
|
-
"line":
|
|
8886
|
+
"line": 362,
|
|
9548
8887
|
"access": "private",
|
|
9549
8888
|
"tagname": "",
|
|
9550
8889
|
"itemtype": "method",
|
|
@@ -9554,7 +8893,7 @@
|
|
|
9554
8893
|
},
|
|
9555
8894
|
{
|
|
9556
8895
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9557
|
-
"line":
|
|
8896
|
+
"line": 370,
|
|
9558
8897
|
"description": "Returns a hash containing the parameters of an ancestor route.\n\nYou may notice that `this.paramsFor` sometimes works when referring to a\nchild route, but this behavior should not be relied upon as only ancestor\nroutes are certain to be loaded in time.\n\nExample\n\n```app/router.js\n// ...\n\nRouter.map(function() {\n this.route('member', { path: ':name' }, function() {\n this.route('interest', { path: ':interest' });\n });\n});\n```\n\n```app/routes/member.js\nimport Route from '@ember/routing/route';\n\nexport default class MemberRoute extends Route {\n queryParams = {\n memberQp: { refreshModel: true }\n }\n}\n```\n\n```app/routes/member/interest.js\nimport Route from '@ember/routing/route';\n\nexport default class MemberInterestRoute extends Route {\n queryParams = {\n interestQp: { refreshModel: true }\n }\n\n model() {\n return this.paramsFor('member');\n }\n}\n```\n\nIf we visit `/turing/maths?memberQp=member&interestQp=interest` the model for\nthe `member.interest` route is a hash with:\n\n* `name`: `turing`\n* `memberQp`: `member`",
|
|
9559
8898
|
"itemtype": "method",
|
|
9560
8899
|
"name": "paramsFor",
|
|
@@ -9577,7 +8916,7 @@
|
|
|
9577
8916
|
},
|
|
9578
8917
|
{
|
|
9579
8918
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9580
|
-
"line":
|
|
8919
|
+
"line": 449,
|
|
9581
8920
|
"description": "Serializes the query parameter key",
|
|
9582
8921
|
"itemtype": "method",
|
|
9583
8922
|
"name": "serializeQueryParamKey",
|
|
@@ -9595,7 +8934,7 @@
|
|
|
9595
8934
|
},
|
|
9596
8935
|
{
|
|
9597
8936
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9598
|
-
"line":
|
|
8937
|
+
"line": 460,
|
|
9599
8938
|
"description": "Serializes value of the query parameter based on defaultValueType",
|
|
9600
8939
|
"itemtype": "method",
|
|
9601
8940
|
"name": "serializeQueryParam",
|
|
@@ -9623,7 +8962,7 @@
|
|
|
9623
8962
|
},
|
|
9624
8963
|
{
|
|
9625
8964
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9626
|
-
"line":
|
|
8965
|
+
"line": 476,
|
|
9627
8966
|
"description": "Deserializes value of the query parameter based on defaultValueType",
|
|
9628
8967
|
"itemtype": "method",
|
|
9629
8968
|
"name": "deserializeQueryParam",
|
|
@@ -9651,7 +8990,7 @@
|
|
|
9651
8990
|
},
|
|
9652
8991
|
{
|
|
9653
8992
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9654
|
-
"line":
|
|
8993
|
+
"line": 492,
|
|
9655
8994
|
"access": "private",
|
|
9656
8995
|
"tagname": "",
|
|
9657
8996
|
"itemtype": "property",
|
|
@@ -9661,7 +9000,7 @@
|
|
|
9661
9000
|
},
|
|
9662
9001
|
{
|
|
9663
9002
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9664
|
-
"line":
|
|
9003
|
+
"line": 508,
|
|
9665
9004
|
"description": "A hook you can use to reset controller values either when the model\nchanges or the route is exiting.\n\n```app/routes/articles.js\nimport Route from '@ember/routing/route';\n\nexport default class ArticlesRoute extends Route {\n resetController(controller, isExiting, transition) {\n if (isExiting && transition.targetName !== 'error') {\n controller.set('page', 1);\n }\n }\n}\n```",
|
|
9666
9005
|
"itemtype": "method",
|
|
9667
9006
|
"name": "resetController",
|
|
@@ -9690,7 +9029,7 @@
|
|
|
9690
9029
|
},
|
|
9691
9030
|
{
|
|
9692
9031
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9693
|
-
"line":
|
|
9032
|
+
"line": 535,
|
|
9694
9033
|
"access": "private",
|
|
9695
9034
|
"tagname": "",
|
|
9696
9035
|
"itemtype": "method",
|
|
@@ -9700,7 +9039,7 @@
|
|
|
9700
9039
|
},
|
|
9701
9040
|
{
|
|
9702
9041
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9703
|
-
"line":
|
|
9042
|
+
"line": 546,
|
|
9704
9043
|
"access": "private",
|
|
9705
9044
|
"tagname": "",
|
|
9706
9045
|
"itemtype": "method",
|
|
@@ -9711,7 +9050,7 @@
|
|
|
9711
9050
|
},
|
|
9712
9051
|
{
|
|
9713
9052
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9714
|
-
"line":
|
|
9053
|
+
"line": 559,
|
|
9715
9054
|
"access": "private",
|
|
9716
9055
|
"tagname": "",
|
|
9717
9056
|
"itemtype": "method",
|
|
@@ -9721,7 +9060,7 @@
|
|
|
9721
9060
|
},
|
|
9722
9061
|
{
|
|
9723
9062
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9724
|
-
"line":
|
|
9063
|
+
"line": 570,
|
|
9725
9064
|
"description": "The `willTransition` action is fired at the beginning of any\nattempted transition with a `Transition` object as the sole\nargument. This action can be used for aborting, redirecting,\nor decorating the transition from the currently active routes.\n\nA good example is preventing navigation when a form is\nhalf-filled out:\n\n```app/routes/contact-form.js\nimport Route from '@ember/routing/route';\nimport { action } from '@ember/object';\n\nexport default class ContactFormRoute extends Route {\n @action\n willTransition(transition) {\n if (this.controller.get('userHasEnteredData')) {\n this.controller.displayNavigationConfirm();\n transition.abort();\n }\n }\n}\n```\n\nYou can also redirect elsewhere by calling\n`this.transitionTo('elsewhere')` from within `willTransition`.\nNote that `willTransition` will not be fired for the\nredirecting `transitionTo`, since `willTransition` doesn't\nfire when there is already a transition underway. If you want\nsubsequent `willTransition` actions to fire for the redirecting\ntransition, you must first explicitly call\n`transition.abort()`.\n\nTo allow the `willTransition` event to continue bubbling to the parent\nroute, use `return true;`. When the `willTransition` method has a\nreturn value of `true` then the parent route's `willTransition` method\nwill be fired, enabling \"bubbling\" behavior for the event.",
|
|
9726
9065
|
"itemtype": "event",
|
|
9727
9066
|
"name": "willTransition",
|
|
@@ -9740,7 +9079,7 @@
|
|
|
9740
9079
|
},
|
|
9741
9080
|
{
|
|
9742
9081
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9743
|
-
"line":
|
|
9082
|
+
"line": 614,
|
|
9744
9083
|
"description": "The `didTransition` action is fired after a transition has\nsuccessfully been completed. This occurs after the normal model\nhooks (`beforeModel`, `model`, `afterModel`, `setupController`)\nhave resolved. The `didTransition` action has no arguments,\nhowever, it can be useful for tracking page views or resetting\nstate on the controller.\n\n```app/routes/login.js\nimport Route from '@ember/routing/route';\nimport { action } from '@ember/object';\n\nexport default class LoginRoute extends Route {\n @action\n didTransition() {\n this.controller.get('errors.base').clear();\n return true; // Bubble the didTransition event\n }\n}\n```",
|
|
9745
9084
|
"itemtype": "event",
|
|
9746
9085
|
"name": "didTransition",
|
|
@@ -9752,7 +9091,7 @@
|
|
|
9752
9091
|
},
|
|
9753
9092
|
{
|
|
9754
9093
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9755
|
-
"line":
|
|
9094
|
+
"line": 640,
|
|
9756
9095
|
"description": "The `loading` action is fired on the route when a route's `model`\nhook returns a promise that is not already resolved. The current\n`Transition` object is the first parameter and the route that\ntriggered the loading event is the second parameter.\n\n```app/routes/application.js\nimport Route from '@ember/routing/route';\nimport { action } from '@ember/object';\n\nexport default class ApplicationRoute extends Route {\n @action\n loading(transition, route) {\n let controller = this.controllerFor('foo');\n\n // The controller may not be instantiated when initially loading\n if (controller) {\n controller.currentlyLoading = true;\n\n transition.finally(function() {\n controller.currentlyLoading = false;\n });\n }\n }\n}\n```",
|
|
9757
9096
|
"itemtype": "event",
|
|
9758
9097
|
"name": "loading",
|
|
@@ -9776,7 +9115,7 @@
|
|
|
9776
9115
|
},
|
|
9777
9116
|
{
|
|
9778
9117
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9779
|
-
"line":
|
|
9118
|
+
"line": 674,
|
|
9780
9119
|
"description": "When attempting to transition into a route, any of the hooks\nmay return a promise that rejects, at which point an `error`\naction will be fired on the partially-entered routes, allowing\nfor per-route error handling logic, or shared error handling\nlogic defined on a parent route.\n\nHere is an example of an error handler that will be invoked\nfor rejected promises from the various hooks on the route,\nas well as any unhandled errors from child routes:\n\n```app/routes/admin.js\nimport { reject } from 'rsvp';\nimport Route from '@ember/routing/route';\nimport { action } from '@ember/object';\n\nexport default class AdminRoute extends Route {\n beforeModel() {\n return reject('bad things!');\n }\n\n @action\n error(error, transition) {\n // Assuming we got here due to the error in `beforeModel`,\n // we can expect that error === \"bad things!\",\n // but a promise model rejecting would also\n // call this hook, as would any errors encountered\n // in `afterModel`.\n\n // The `error` hook is also provided the failed\n // `transition`, which can be stored and later\n // `.retry()`d if desired.\n\n this.transitionTo('login');\n }\n}\n```\n\n`error` actions that bubble up all the way to `ApplicationRoute`\nwill fire a default error handler that logs the error. You can\nspecify your own global default error handler by overriding the\n`error` handler on `ApplicationRoute`:\n\n```app/routes/application.js\nimport Route from '@ember/routing/route';\nimport { action } from '@ember/object';\n\nexport default class ApplicationRoute extends Route {\n @action\n error(error, transition) {\n this.controllerFor('banner').displayError(error.message);\n }\n}\n```",
|
|
9781
9120
|
"itemtype": "event",
|
|
9782
9121
|
"name": "error",
|
|
@@ -9800,7 +9139,7 @@
|
|
|
9800
9139
|
},
|
|
9801
9140
|
{
|
|
9802
9141
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9803
|
-
"line":
|
|
9142
|
+
"line": 735,
|
|
9804
9143
|
"description": "This event is triggered when the router enters the route. It is\nnot executed when the model for the route changes.\n\n```app/routes/application.js\nimport { on } from '@ember/object/evented';\nimport Route from '@ember/routing/route';\n\nexport default Route.extend({\n collectAnalytics: on('activate', function(){\n collectAnalytics();\n })\n});\n```",
|
|
9805
9144
|
"itemtype": "event",
|
|
9806
9145
|
"name": "activate",
|
|
@@ -9812,7 +9151,7 @@
|
|
|
9812
9151
|
},
|
|
9813
9152
|
{
|
|
9814
9153
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9815
|
-
"line":
|
|
9154
|
+
"line": 755,
|
|
9816
9155
|
"description": "This event is triggered when the router completely exits this\nroute. It is not executed when the model for the route changes.\n\n```app/routes/index.js\nimport { on } from '@ember/object/evented';\nimport Route from '@ember/routing/route';\n\nexport default Route.extend({\n trackPageLeaveAnalytics: on('deactivate', function(){\n trackPageLeaveAnalytics();\n })\n});\n```",
|
|
9817
9156
|
"itemtype": "event",
|
|
9818
9157
|
"name": "deactivate",
|
|
@@ -9824,7 +9163,7 @@
|
|
|
9824
9163
|
},
|
|
9825
9164
|
{
|
|
9826
9165
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9827
|
-
"line":
|
|
9166
|
+
"line": 775,
|
|
9828
9167
|
"description": "This hook is executed when the router completely exits this route. It is\nnot executed when the model for the route changes.",
|
|
9829
9168
|
"itemtype": "method",
|
|
9830
9169
|
"name": "deactivate",
|
|
@@ -9843,7 +9182,7 @@
|
|
|
9843
9182
|
},
|
|
9844
9183
|
{
|
|
9845
9184
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9846
|
-
"line":
|
|
9185
|
+
"line": 786,
|
|
9847
9186
|
"description": "This hook is executed when the router enters the route. It is not executed\nwhen the model for the route changes.",
|
|
9848
9187
|
"itemtype": "method",
|
|
9849
9188
|
"name": "activate",
|
|
@@ -9862,7 +9201,7 @@
|
|
|
9862
9201
|
},
|
|
9863
9202
|
{
|
|
9864
9203
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9865
|
-
"line":
|
|
9204
|
+
"line": 797,
|
|
9866
9205
|
"description": "Transition the application into another route. The route may\nbe either a single route or route path:\n\n```javascript\nthis.transitionTo('blogPosts');\nthis.transitionTo('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\nthis.transitionTo('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\nthis.transitionTo('blogPost', 1);\n```\n\nMultiple models will be applied last to first recursively up the\nroute tree.\n\n```app/routes.js\n// ...\n\nRouter.map(function() {\n this.route('blogPost', { path:':blogPostId' }, function() {\n this.route('blogComment', { path: ':blogCommentId' });\n });\n});\n\nexport default Router;\n```\n\n```javascript\nthis.transitionTo('blogComment', aPost, aComment);\nthis.transitionTo('blogComment', 1, 13);\n```\n\nIt is also possible to pass a URL (a string that starts with a\n`/`).\n\n```javascript\nthis.transitionTo('/');\nthis.transitionTo('/blog/post/1/comment/13');\nthis.transitionTo('/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\nthis.transitionTo('blogPost', 1, {\n queryParams: { showComments: 'true' }\n});\n\n// if you just want to transition the query parameters without changing the route\nthis.transitionTo({ queryParams: { sort: 'date' } });\n```\n\nSee also [replaceWith](#method_replaceWith).\n\nSimple Transition Example\n\n```app/routes.js\n// ...\n\nRouter.map(function() {\n this.route('index');\n this.route('secret');\n this.route('fourOhFour', { path: '*:' });\n});\n\nexport default Router;\n```\n\n```app/routes/index.js\nimport Route from '@ember/routing/route';\nimport { action } from '@ember/object';\n\nexport default class IndexRoute extends Route {\n @action\n moveToSecret(context) {\n if (authorized()) {\n this.transitionTo('secret', context);\n } else {\n this.transitionTo('fourOhFour');\n }\n }\n}\n```\n\nTransition to a nested route\n\n```app/router.js\n// ...\n\nRouter.map(function() {\n this.route('articles', { path: '/articles' }, function() {\n this.route('new');\n });\n});\n\nexport default Router;\n```\n\n```app/routes/index.js\nimport Route from '@ember/routing/route';\nimport { action } from '@ember/object';\n\nexport default class IndexRoute extends Route {\n @action\n transitionToNewArticle() {\n this.transitionTo('articles.new');\n }\n}\n```\n\nMultiple Models Example\n\n```app/router.js\n// ...\n\nRouter.map(function() {\n this.route('index');\n\n this.route('breakfast', { path: ':breakfastId' }, function() {\n this.route('cereal', { path: ':cerealId' });\n });\n});\n\nexport default Router;\n```\n\n```app/routes/index.js\nimport Route from '@ember/routing/route';\nimport { action } from '@ember/object';\n\nexport default class IndexRoute extends Route {\n @action\n moveToChocolateCereal() {\n let cereal = { cerealId: 'ChocolateYumminess' };\n let breakfast = { breakfastId: 'CerealAndMilk' };\n\n this.transitionTo('breakfast.cereal', breakfast, cereal);\n }\n}\n```\n\nNested Route with Query String Example\n\n```app/routes.js\n// ...\n\nRouter.map(function() {\n this.route('fruits', function() {\n this.route('apples');\n });\n});\n\nexport default Router;\n```\n\n```app/routes/index.js\nimport Route from '@ember/routing/route';\n\nexport default class IndexRoute extends Route {\n @action\n transitionToApples() {\n this.transitionTo('fruits.apples', { queryParams: { color: 'red' } });\n }\n}\n```",
|
|
9867
9206
|
"itemtype": "method",
|
|
9868
9207
|
"name": "transitionTo",
|
|
@@ -9900,7 +9239,7 @@
|
|
|
9900
9239
|
},
|
|
9901
9240
|
{
|
|
9902
9241
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9903
|
-
"line":
|
|
9242
|
+
"line": 995,
|
|
9904
9243
|
"description": "Perform a synchronous transition into another route without attempting\nto resolve promises, update the URL, or abort any currently active\nasynchronous transitions (i.e. regular transitions caused by\n`transitionTo` or URL changes).\n\nThis method is handy for performing intermediate transitions on the\nway to a final destination route, and is called internally by the\ndefault implementations of the `error` and `loading` handlers.",
|
|
9905
9244
|
"itemtype": "method",
|
|
9906
9245
|
"name": "intermediateTransitionTo",
|
|
@@ -9924,7 +9263,7 @@
|
|
|
9924
9263
|
},
|
|
9925
9264
|
{
|
|
9926
9265
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9927
|
-
"line":
|
|
9266
|
+
"line": 1017,
|
|
9928
9267
|
"description": "Refresh the model on this route and any child routes, firing the\n`beforeModel`, `model`, and `afterModel` hooks in a similar fashion\nto how routes are entered when transitioning in from other route.\nThe current route params (e.g. `article_id`) will be passed in\nto the respective model hooks, and if a different model is returned,\n`setupController` and associated route hooks will re-fire as well.\n\nAn example usage of this method is re-querying the server for the\nlatest information using the same parameters as when the route\nwas first entered.\n\nNote that this will cause `model` hooks to fire even on routes\nthat were provided a model object when the route was initially\nentered.",
|
|
9929
9268
|
"itemtype": "method",
|
|
9930
9269
|
"name": "refresh",
|
|
@@ -9940,7 +9279,7 @@
|
|
|
9940
9279
|
},
|
|
9941
9280
|
{
|
|
9942
9281
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9943
|
-
"line":
|
|
9282
|
+
"line": 1043,
|
|
9944
9283
|
"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 `transitionTo` in all other respects. See\n'transitionTo' for additional information regarding multiple models.\n\nExample\n\n```app/router.js\n// ...\n\nRouter.map(function() {\n this.route('index');\n this.route('secret');\n});\n\nexport default Router;\n```\n\n```app/routes/secret.js\nimport Route from '@ember/routing/route';\n\nexport default class SecretRoute Route {\n afterModel() {\n if (!authorized()){\n this.replaceWith('index');\n }\n }\n}\n```",
|
|
9945
9284
|
"itemtype": "method",
|
|
9946
9285
|
"name": "replaceWith",
|
|
@@ -9967,6 +9306,8 @@
|
|
|
9967
9306
|
"type": "Transition"
|
|
9968
9307
|
},
|
|
9969
9308
|
"since": "1.0.0",
|
|
9309
|
+
"deprecated": true,
|
|
9310
|
+
"deprecationMessage": "Use replaceWith from the Router service instead.",
|
|
9970
9311
|
"access": "public",
|
|
9971
9312
|
"tagname": "",
|
|
9972
9313
|
"class": "Route",
|
|
@@ -9974,7 +9315,7 @@
|
|
|
9974
9315
|
},
|
|
9975
9316
|
{
|
|
9976
9317
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9977
|
-
"line":
|
|
9318
|
+
"line": 1091,
|
|
9978
9319
|
"description": "This hook is the entry point for router.js",
|
|
9979
9320
|
"access": "private",
|
|
9980
9321
|
"tagname": "",
|
|
@@ -9985,7 +9326,7 @@
|
|
|
9985
9326
|
},
|
|
9986
9327
|
{
|
|
9987
9328
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9988
|
-
"line":
|
|
9329
|
+
"line": 1171,
|
|
9989
9330
|
"description": "This hook is the first of the route entry validation hooks\ncalled when an attempt is made to transition into a route\nor one of its children. It is called before `model` and\n`afterModel`, and is appropriate for cases when:\n\n1) A decision can be made to redirect elsewhere without\n needing to resolve the model first.\n2) Any async operations need to occur first before the\n model is attempted to be resolved.\n\nThis hook is provided the current `transition` attempt\nas a parameter, which can be used to `.abort()` the transition,\nsave it for a later `.retry()`, or retrieve values set\non it from a previous hook. You can also just call\n`this.transitionTo` to another route to implicitly\nabort the `transition`.\n\nYou can return a promise from this hook to pause the\ntransition until the promise resolves (or rejects). This could\nbe useful, for instance, for retrieving async code from\nthe server that is required to enter a route.",
|
|
9990
9331
|
"itemtype": "method",
|
|
9991
9332
|
"name": "beforeModel",
|
|
@@ -10008,7 +9349,7 @@
|
|
|
10008
9349
|
},
|
|
10009
9350
|
{
|
|
10010
9351
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10011
|
-
"line":
|
|
9352
|
+
"line": 1205,
|
|
10012
9353
|
"description": "This hook is called after this route's model has resolved.\nIt follows identical async/promise semantics to `beforeModel`\nbut is provided the route's resolved model in addition to\nthe `transition`, and is therefore suited to performing\nlogic that can only take place after the model has already\nresolved.\n\n```app/routes/posts.js\nimport Route from '@ember/routing/route';\n\nexport default class PostsRoute extends Route {\n afterModel(posts, transition) {\n if (posts.get('length') === 1) {\n this.transitionTo('post.show', posts.get('firstObject'));\n }\n }\n}\n```\n\nRefer to documentation for `beforeModel` for a description\nof transition-pausing semantics when a promise is returned\nfrom this hook.",
|
|
10013
9354
|
"itemtype": "method",
|
|
10014
9355
|
"name": "afterModel",
|
|
@@ -10036,7 +9377,7 @@
|
|
|
10036
9377
|
},
|
|
10037
9378
|
{
|
|
10038
9379
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10039
|
-
"line":
|
|
9380
|
+
"line": 1242,
|
|
10040
9381
|
"description": "A hook you can implement to optionally redirect to another route.\n\nCalling `this.transitionTo` from inside of the `redirect` hook will\nabort the current transition (into the route that has implemented `redirect`).\n\n`redirect` and `afterModel` behave very similarly and are\ncalled almost at the same time, but they have an important\ndistinction when calling `this.transitionTo` to a child route\nof the current route. From `afterModel`, this new transition\ninvalidates the current transition, causing `beforeModel`,\n`model`, and `afterModel` hooks to be called again. But the\nsame transition started from `redirect` does _not_ invalidate\nthe current transition. In other words, by the time the `redirect`\nhook has been called, both the resolved model and the attempted\nentry into this route are considered fully validated.",
|
|
10041
9382
|
"itemtype": "method",
|
|
10042
9383
|
"name": "redirect",
|
|
@@ -10060,7 +9401,7 @@
|
|
|
10060
9401
|
},
|
|
10061
9402
|
{
|
|
10062
9403
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10063
|
-
"line":
|
|
9404
|
+
"line": 1267,
|
|
10064
9405
|
"description": "Called when the context is changed by router.js.",
|
|
10065
9406
|
"access": "private",
|
|
10066
9407
|
"tagname": "",
|
|
@@ -10071,7 +9412,7 @@
|
|
|
10071
9412
|
},
|
|
10072
9413
|
{
|
|
10073
9414
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10074
|
-
"line":
|
|
9415
|
+
"line": 1277,
|
|
10075
9416
|
"description": "A hook you can implement to convert the URL into the model for\nthis route.\n\n```app/router.js\n// ...\n\nRouter.map(function() {\n this.route('post', { path: '/posts/:post_id' });\n});\n\nexport default Router;\n```\n\nThe model for the `post` route is `store.findRecord('post', params.post_id)`.\n\nBy default, if your route has a dynamic segment ending in `_id`:\n\n* The model class is determined from the segment (`post_id`'s\n class is `App.Post`)\n* The find method is called on the model class with the value of\n the dynamic segment.\n\nNote that for routes with dynamic segments, this hook is not always\nexecuted. If the route is entered through a transition (e.g. when\nusing the `link-to` Handlebars helper or the `transitionTo` method\nof routes), and a model context is already provided this hook\nis not called.\n\nA model context does not include a primitive string or number,\nwhich does cause the model hook to be called.\n\nRoutes without dynamic segments will always execute the model hook.\n\n```javascript\n// no dynamic segment, model hook always called\nthis.transitionTo('posts');\n\n// model passed in, so model hook not called\nthePost = store.findRecord('post', 1);\nthis.transitionTo('post', thePost);\n\n// integer passed in, model hook is called\nthis.transitionTo('post', 1);\n\n// model id passed in, model hook is called\n// useful for forcing the hook to execute\nthePost = store.findRecord('post', 1);\nthis.transitionTo('post', thePost.id);\n```\n\nThis hook follows the asynchronous/promise semantics\ndescribed in the documentation for `beforeModel`. In particular,\nif a promise returned from `model` fails, the error will be\nhandled by the `error` hook on `Route`.\n\nExample\n\n```app/routes/post.js\nimport Route from '@ember/routing/route';\n\nexport default class PostRoute extends Route {\n model(params) {\n return this.store.findRecord('post', params.post_id);\n }\n}\n```",
|
|
10076
9417
|
"itemtype": "method",
|
|
10077
9418
|
"name": "model",
|
|
@@ -10099,7 +9440,7 @@
|
|
|
10099
9440
|
},
|
|
10100
9441
|
{
|
|
10101
9442
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10102
|
-
"line":
|
|
9443
|
+
"line": 1386,
|
|
10103
9444
|
"access": "private",
|
|
10104
9445
|
"tagname": "",
|
|
10105
9446
|
"itemtype": "method",
|
|
@@ -10125,7 +9466,7 @@
|
|
|
10125
9466
|
},
|
|
10126
9467
|
{
|
|
10127
9468
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10128
|
-
"line":
|
|
9469
|
+
"line": 1399,
|
|
10129
9470
|
"itemtype": "method",
|
|
10130
9471
|
"name": "findModel",
|
|
10131
9472
|
"params": [
|
|
@@ -10147,7 +9488,7 @@
|
|
|
10147
9488
|
},
|
|
10148
9489
|
{
|
|
10149
9490
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10150
|
-
"line":
|
|
9491
|
+
"line": 1410,
|
|
10151
9492
|
"description": "A hook you can use to setup the controller for the current route.\n\nThis method is called with the controller for the current route and the\nmodel supplied by the `model` hook.\n\nBy default, the `setupController` hook sets the `model` property of\nthe controller to the specified `model` when it is not `undefined`.\n\nIf you implement the `setupController` hook in your Route, it will\nprevent this default behavior. If you want to preserve that behavior\nwhen implementing your `setupController` function, make sure to call\n`super`:\n\n```app/routes/photos.js\nimport Route from '@ember/routing/route';\n\nexport default class PhotosRoute extends Route {\n model() {\n return this.store.findAll('photo');\n }\n\n setupController(controller, model) {\n super.setupController(controller, model);\n\n this.controllerFor('application').set('showingPhotos', true);\n }\n}\n```\n\nThe provided controller will be one resolved based on the name\nof this route.\n\nIf no explicit controller is defined, Ember will automatically create one.\n\nAs an example, consider the router:\n\n```app/router.js\n// ...\n\nRouter.map(function() {\n this.route('post', { path: '/posts/:post_id' });\n});\n\nexport default Router;\n```\n\nIf you have defined a file for the post controller,\nthe framework will use it.\nIf it is not defined, a basic `Controller` instance would be used.",
|
|
10152
9493
|
"example": [
|
|
10153
9494
|
" Behavior of a basic Controller\n\n```app/routes/post.js\nimport Route from '@ember/routing/route';\n\nexport default class PostRoute extends Route {\n setupController(controller, model) {\n controller.set('model', model);\n }\n});\n```"
|
|
@@ -10180,7 +9521,7 @@
|
|
|
10180
9521
|
},
|
|
10181
9522
|
{
|
|
10182
9523
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10183
|
-
"line":
|
|
9524
|
+
"line": 1487,
|
|
10184
9525
|
"description": "Returns the controller of the current route, or a parent (or any ancestor)\nroute in a route hierarchy.\n\nThe controller instance must already have been created, either through entering the\nassociated route or using `generateController`.\n\n```app/routes/post.js\nimport Route from '@ember/routing/route';\n\nexport default class PostRoute extends Route {\n setupController(controller, post) {\n super.setupController(controller, post);\n\n this.controllerFor('posts').set('currentPost', post);\n }\n}\n```",
|
|
10185
9526
|
"itemtype": "method",
|
|
10186
9527
|
"name": "controllerFor",
|
|
@@ -10203,7 +9544,7 @@
|
|
|
10203
9544
|
},
|
|
10204
9545
|
{
|
|
10205
9546
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10206
|
-
"line":
|
|
9547
|
+
"line": 1533,
|
|
10207
9548
|
"description": "Generates a controller for a route.\n\nExample\n\n```app/routes/post.js\nimport Route from '@ember/routing/route';\n\nexport default class Post extends Route {\n setupController(controller, post) {\n super.setupController(controller, post);\n\n this.generateController('posts');\n }\n}\n```",
|
|
10208
9549
|
"itemtype": "method",
|
|
10209
9550
|
"name": "generateController",
|
|
@@ -10221,7 +9562,7 @@
|
|
|
10221
9562
|
},
|
|
10222
9563
|
{
|
|
10223
9564
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10224
|
-
"line":
|
|
9565
|
+
"line": 1560,
|
|
10225
9566
|
"description": "Returns the resolved model of a parent (or any ancestor) route\nin a route hierarchy. During a transition, all routes\nmust resolve a model object, and if a route\nneeds access to a parent route's model in order to\nresolve a model (or just reuse the model from a parent),\nit can call `this.modelFor(theNameOfParentRoute)` to\nretrieve it. If the ancestor route's model was a promise,\nits resolved result is returned.\n\nExample\n\n```app/router.js\n// ...\n\nRouter.map(function() {\n this.route('post', { path: '/posts/:post_id' }, function() {\n this.route('comments');\n });\n});\n\nexport default Router;\n```\n\n```app/routes/post/comments.js\nimport Route from '@ember/routing/route';\n\nexport default class PostCommentsRoute extends Route {\n model() {\n let post = this.modelFor('post');\n\n return post.comments;\n }\n}\n```",
|
|
10226
9567
|
"itemtype": "method",
|
|
10227
9568
|
"name": "modelFor",
|
|
@@ -10244,7 +9585,7 @@
|
|
|
10244
9585
|
},
|
|
10245
9586
|
{
|
|
10246
9587
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10247
|
-
"line":
|
|
9588
|
+
"line": 1631,
|
|
10248
9589
|
"description": "`this[RENDER]` is used to render a template into a region of another template\n(indicated by an `{{outlet}}`).",
|
|
10249
9590
|
"itemtype": "method",
|
|
10250
9591
|
"name": "this[RENDER]",
|
|
@@ -10294,7 +9635,7 @@
|
|
|
10294
9635
|
},
|
|
10295
9636
|
{
|
|
10296
9637
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10297
|
-
"line":
|
|
9638
|
+
"line": 1658,
|
|
10298
9639
|
"access": "private",
|
|
10299
9640
|
"tagname": "",
|
|
10300
9641
|
"itemtype": "method",
|
|
@@ -10304,8 +9645,8 @@
|
|
|
10304
9645
|
},
|
|
10305
9646
|
{
|
|
10306
9647
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10307
|
-
"line":
|
|
10308
|
-
"description": "Allows you to produce custom metadata for the route.\nThe return value of this method will be attached to\nits corresponding RouteInfoWithAttributes object.\n\nExample\n\n```app/routes/posts/index.js\nimport Route from '@ember/routing/route';\n\nexport default class PostsIndexRoute extends Route {\n buildRouteInfoMetadata() {\n return { title: 'Posts Page' }\n }\n}\n```\n\n```app/routes/application.js\nimport Route from '@ember/routing/route';\nimport {
|
|
9648
|
+
"line": 1671,
|
|
9649
|
+
"description": "Allows you to produce custom metadata for the route.\nThe return value of this method will be attached to\nits corresponding RouteInfoWithAttributes object.\n\nExample\n\n```app/routes/posts/index.js\nimport Route from '@ember/routing/route';\n\nexport default class PostsIndexRoute extends Route {\n buildRouteInfoMetadata() {\n return { title: 'Posts Page' }\n }\n}\n```\n\n```app/routes/application.js\nimport Route from '@ember/routing/route';\nimport { service } from '@ember/service';\n\nexport default class ApplicationRoute extends Route {\n @service router\n\n constructor() {\n super(...arguments);\n\n this.router.on('routeDidChange', transition => {\n document.title = transition.to.metadata.title;\n // would update document's title to \"Posts Page\"\n });\n }\n}\n```",
|
|
10309
9650
|
"itemtype": "method",
|
|
10310
9651
|
"name": "buildRouteInfoMetadata",
|
|
10311
9652
|
"return": {
|
|
@@ -10319,7 +9660,7 @@
|
|
|
10319
9660
|
},
|
|
10320
9661
|
{
|
|
10321
9662
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10322
|
-
"line":
|
|
9663
|
+
"line": 1721,
|
|
10323
9664
|
"description": "Store property provides a hook for data persistence libraries to inject themselves.\n\nBy default, this store property provides the exact same functionality previously\nin the model hook.\n\nCurrently, the required interface is:\n\n`store.find(modelName, findArguments)`",
|
|
10324
9665
|
"itemtype": "property",
|
|
10325
9666
|
"name": "store",
|
|
@@ -10331,7 +9672,7 @@
|
|
|
10331
9672
|
},
|
|
10332
9673
|
{
|
|
10333
9674
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10334
|
-
"line":
|
|
9675
|
+
"line": 1769,
|
|
10335
9676
|
"access": "private",
|
|
10336
9677
|
"tagname": "",
|
|
10337
9678
|
"itemtype": "property",
|
|
@@ -10341,7 +9682,7 @@
|
|
|
10341
9682
|
},
|
|
10342
9683
|
{
|
|
10343
9684
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10344
|
-
"line":
|
|
9685
|
+
"line": 1899,
|
|
10345
9686
|
"description": "Sends an action to the router, which will delegate it to the currently\nactive route hierarchy per the bubbling rules explained under `actions`.\n\nExample\n\n```app/router.js\n// ...\n\nRouter.map(function() {\n this.route('index');\n});\n\nexport default Router;\n```\n\n```app/routes/application.js\nimport Route from '@ember/routing/route';\nimport { action } from '@ember/object';\n\nexport default class ApplicationRoute extends Route {\n @action\n track(arg) {\n console.log(arg, 'was clicked');\n }\n}\n```\n\n```app/routes/index.js\nimport Route from '@ember/routing/route';\nimport { action } from '@ember/object';\n\nexport default class IndexRoute extends Route {\n @action\n trackIfDebug(arg) {\n if (debug) {\n this.send('track', arg);\n }\n }\n}\n```",
|
|
10346
9687
|
"itemtype": "method",
|
|
10347
9688
|
"name": "send",
|
|
@@ -10365,7 +9706,7 @@
|
|
|
10365
9706
|
},
|
|
10366
9707
|
{
|
|
10367
9708
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10368
|
-
"line":
|
|
9709
|
+
"line": 2226,
|
|
10369
9710
|
"description": "A hook you can implement to convert the route's model into parameters\nfor the URL.\n\n```app/router.js\n// ...\n\nRouter.map(function() {\n this.route('post', { path: '/posts/:post_id' });\n});\n\n```\n\n```app/routes/post.js\nimport Route from '@ember/routing/route';\n\nexport default class PostRoute extends Route {\n model({ post_id }) {\n // the server returns `{ id: 12 }`\n return fetch(`/posts/${post_id}`;\n }\n\n serialize(model) {\n // this will make the URL `/posts/12`\n return { post_id: model.id };\n }\n}\n```\n\nThe default `serialize` method will insert the model's `id` into the\nroute's dynamic segment (in this case, `:post_id`) if the segment contains '_id'.\nIf the route has multiple dynamic segments or does not contain '_id', `serialize`\nwill return `getProperties(model, params)`\n\nThis method is called when `transitionTo` is called with a context\nin order to populate the URL.",
|
|
10370
9711
|
"itemtype": "method",
|
|
10371
9712
|
"name": "serialize",
|
|
@@ -10393,7 +9734,7 @@
|
|
|
10393
9734
|
},
|
|
10394
9735
|
{
|
|
10395
9736
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10396
|
-
"line":
|
|
9737
|
+
"line": 2296,
|
|
10397
9738
|
"description": "The controller associated with this route.\n\nExample\n\n```app/routes/form.js\nimport Route from '@ember/routing/route';\nimport { action } from '@ember/object';\n\nexport default class FormRoute extends Route {\n @action\n willTransition(transition) {\n if (this.controller.get('userHasEnteredData') &&\n !confirm('Are you sure you want to abandon progress?')) {\n transition.abort();\n } else {\n // Bubble the `willTransition` action so that\n // parent routes can decide whether or not to abort.\n return true;\n }\n }\n}\n```",
|
|
10398
9739
|
"itemtype": "property",
|
|
10399
9740
|
"name": "controller",
|
|
@@ -10406,7 +9747,7 @@
|
|
|
10406
9747
|
},
|
|
10407
9748
|
{
|
|
10408
9749
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10409
|
-
"line":
|
|
9750
|
+
"line": 2327,
|
|
10410
9751
|
"description": "This action is called when one or more query params have changed. Bubbles.",
|
|
10411
9752
|
"itemtype": "method",
|
|
10412
9753
|
"name": "queryParamsDidChange",
|
|
@@ -10438,7 +9779,7 @@
|
|
|
10438
9779
|
},
|
|
10439
9780
|
{
|
|
10440
9781
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10441
|
-
"line":
|
|
9782
|
+
"line": 136,
|
|
10442
9783
|
"description": "Represents the URL of the root of the application, often '/'. This prefix is\n assumed on all routes defined on this router.",
|
|
10443
9784
|
"itemtype": "property",
|
|
10444
9785
|
"name": "rootURL",
|
|
@@ -10450,7 +9791,7 @@
|
|
|
10450
9791
|
},
|
|
10451
9792
|
{
|
|
10452
9793
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10453
|
-
"line":
|
|
9794
|
+
"line": 147,
|
|
10454
9795
|
"description": "The `location` property determines the type of URL's that your\n application will use.\n\n The following location types are currently available:\n\n * `history` - use the browser's history API to make the URLs look just like any standard URL\n * `hash` - use `#` to separate the server part of the URL from the Ember part: `/blog/#/posts/new`\n * `none` - do not store the Ember URL in the actual browser URL (mainly used for testing)\n * `auto` - use the best option based on browser capabilities: `history` if possible, then `hash` if possible, otherwise `none`\n\n This value is defaulted to `auto` by the `locationType` setting of `/config/environment.js`",
|
|
10455
9796
|
"itemtype": "property",
|
|
10456
9797
|
"name": "location",
|
|
@@ -10465,7 +9806,7 @@
|
|
|
10465
9806
|
},
|
|
10466
9807
|
{
|
|
10467
9808
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10468
|
-
"line":
|
|
9809
|
+
"line": 203,
|
|
10469
9810
|
"description": "The `Router.map` function allows you to define mappings from URLs to routes\nin your application. These mappings are defined within the\nsupplied callback function using `this.route`.\n\nThe first parameter is the name of the route which is used by default as the\npath name as well.\n\nThe second parameter is the optional options hash. Available options are:\n\n * `path`: allows you to provide your own path as well as mark dynamic\n segments.\n * `resetNamespace`: false by default; when nesting routes, ember will\n combine the route names to form the fully-qualified route name, which is\n used with `{{link-to}}` or manually transitioning to routes. Setting\n `resetNamespace: true` will cause the route not to inherit from its\n parent route's names. This is handy for preventing extremely long route names.\n Keep in mind that the actual URL path behavior is still retained.\n\nThe third parameter is a function, which can be used to nest routes.\nNested routes, by default, will have the parent route tree's route name and\npath prepended to it's own.\n\n```app/router.js\nRouter.map(function(){\n this.route('post', { path: '/post/:post_id' }, function() {\n this.route('edit');\n this.route('comments', { resetNamespace: true }, function() {\n this.route('new');\n });\n });\n});\n```",
|
|
10470
9811
|
"itemtype": "method",
|
|
10471
9812
|
"name": "map",
|
|
@@ -10482,7 +9823,7 @@
|
|
|
10482
9823
|
},
|
|
10483
9824
|
{
|
|
10484
9825
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10485
|
-
"line":
|
|
9826
|
+
"line": 525,
|
|
10486
9827
|
"description": "Initializes the current router instance and sets up the change handling\nevent listeners used by the instances `location` implementation.\n\nA property named `initialURL` will be used to determine the initial URL.\nIf no value is found `/` will be used.",
|
|
10487
9828
|
"itemtype": "method",
|
|
10488
9829
|
"name": "startRouting",
|
|
@@ -10493,7 +9834,7 @@
|
|
|
10493
9834
|
},
|
|
10494
9835
|
{
|
|
10495
9836
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10496
|
-
"line":
|
|
9837
|
+
"line": 647,
|
|
10497
9838
|
"description": "Transition the application into another route. The route may\nbe either a single route or route path:\n\nSee [transitionTo](/ember/release/classes/Route/methods/transitionTo?anchor=transitionTo) for more info.",
|
|
10498
9839
|
"itemtype": "method",
|
|
10499
9840
|
"name": "transitionTo",
|
|
@@ -10526,7 +9867,7 @@
|
|
|
10526
9867
|
},
|
|
10527
9868
|
{
|
|
10528
9869
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10529
|
-
"line":
|
|
9870
|
+
"line": 704,
|
|
10530
9871
|
"description": "Determines if the supplied route is currently active.",
|
|
10531
9872
|
"itemtype": "method",
|
|
10532
9873
|
"name": "isActive",
|
|
@@ -10547,7 +9888,7 @@
|
|
|
10547
9888
|
},
|
|
10548
9889
|
{
|
|
10549
9890
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10550
|
-
"line":
|
|
9891
|
+
"line": 716,
|
|
10551
9892
|
"description": "An alternative form of `isActive` that doesn't require\nmanual concatenation of the arguments into a single\narray.",
|
|
10552
9893
|
"itemtype": "method",
|
|
10553
9894
|
"name": "isActiveIntent",
|
|
@@ -10577,7 +9918,7 @@
|
|
|
10577
9918
|
},
|
|
10578
9919
|
{
|
|
10579
9920
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10580
|
-
"line":
|
|
9921
|
+
"line": 738,
|
|
10581
9922
|
"description": "Does this router instance have the given route.",
|
|
10582
9923
|
"itemtype": "method",
|
|
10583
9924
|
"name": "hasRoute",
|
|
@@ -10592,7 +9933,7 @@
|
|
|
10592
9933
|
},
|
|
10593
9934
|
{
|
|
10594
9935
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10595
|
-
"line":
|
|
9936
|
+
"line": 749,
|
|
10596
9937
|
"description": "Resets the state of the router by clearing the current route\nhandlers and deactivating them.",
|
|
10597
9938
|
"access": "private",
|
|
10598
9939
|
"tagname": "",
|
|
@@ -10603,7 +9944,7 @@
|
|
|
10603
9944
|
},
|
|
10604
9945
|
{
|
|
10605
9946
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10606
|
-
"line":
|
|
9947
|
+
"line": 889,
|
|
10607
9948
|
"description": "Serializes the given query params according to their QP meta information.",
|
|
10608
9949
|
"access": "private",
|
|
10609
9950
|
"tagname": "",
|
|
@@ -10630,7 +9971,7 @@
|
|
|
10630
9971
|
},
|
|
10631
9972
|
{
|
|
10632
9973
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10633
|
-
"line":
|
|
9974
|
+
"line": 916,
|
|
10634
9975
|
"description": "Serializes the value of a query parameter based on a type",
|
|
10635
9976
|
"access": "private",
|
|
10636
9977
|
"tagname": "",
|
|
@@ -10653,7 +9994,7 @@
|
|
|
10653
9994
|
},
|
|
10654
9995
|
{
|
|
10655
9996
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10656
|
-
"line":
|
|
9997
|
+
"line": 934,
|
|
10657
9998
|
"description": "Deserializes the given query params according to their QP meta information.",
|
|
10658
9999
|
"access": "private",
|
|
10659
10000
|
"tagname": "",
|
|
@@ -10680,7 +10021,7 @@
|
|
|
10680
10021
|
},
|
|
10681
10022
|
{
|
|
10682
10023
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10683
|
-
"line":
|
|
10024
|
+
"line": 959,
|
|
10684
10025
|
"description": "Deserializes the value of a query parameter based on a default type",
|
|
10685
10026
|
"access": "private",
|
|
10686
10027
|
"tagname": "",
|
|
@@ -10703,7 +10044,7 @@
|
|
|
10703
10044
|
},
|
|
10704
10045
|
{
|
|
10705
10046
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10706
|
-
"line":
|
|
10047
|
+
"line": 980,
|
|
10707
10048
|
"description": "Removes (prunes) any query params with default values from the given QP\nobject. Default values are determined from the QP meta information per key.",
|
|
10708
10049
|
"access": "private",
|
|
10709
10050
|
"tagname": "",
|
|
@@ -10730,7 +10071,7 @@
|
|
|
10730
10071
|
},
|
|
10731
10072
|
{
|
|
10732
10073
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10733
|
-
"line":
|
|
10074
|
+
"line": 1062,
|
|
10734
10075
|
"description": "Prepares the query params for a URL or Transition. Restores any undefined QP\nkeys/values, serializes all values, and then prunes any default values.",
|
|
10735
10076
|
"access": "private",
|
|
10736
10077
|
"tagname": "",
|
|
@@ -10767,7 +10108,7 @@
|
|
|
10767
10108
|
},
|
|
10768
10109
|
{
|
|
10769
10110
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10770
|
-
"line":
|
|
10111
|
+
"line": 1089,
|
|
10771
10112
|
"description": "Returns the meta information for the query params of a given route. This\nwill be overridden to allow support for lazy routes.",
|
|
10772
10113
|
"access": "private",
|
|
10773
10114
|
"tagname": "",
|
|
@@ -10789,7 +10130,7 @@
|
|
|
10789
10130
|
},
|
|
10790
10131
|
{
|
|
10791
10132
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10792
|
-
"line":
|
|
10133
|
+
"line": 1103,
|
|
10793
10134
|
"description": "Returns a merged query params meta object for a given set of routeInfos.\nUseful for knowing what query params are available for a given route hierarchy.",
|
|
10794
10135
|
"access": "private",
|
|
10795
10136
|
"tagname": "",
|
|
@@ -10811,7 +10152,7 @@
|
|
|
10811
10152
|
},
|
|
10812
10153
|
{
|
|
10813
10154
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10814
|
-
"line":
|
|
10155
|
+
"line": 1168,
|
|
10815
10156
|
"description": "Maps all query param keys to their fully scoped property name of the form\n`controllerName:propName`.",
|
|
10816
10157
|
"access": "private",
|
|
10817
10158
|
"tagname": "",
|
|
@@ -10843,7 +10184,7 @@
|
|
|
10843
10184
|
},
|
|
10844
10185
|
{
|
|
10845
10186
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10846
|
-
"line":
|
|
10187
|
+
"line": 1210,
|
|
10847
10188
|
"description": "Hydrates (adds/restores) any query params that have pre-existing values into\nthe given queryParams hash. This is what allows query params to be \"sticky\"\nand restore their last known values for their scope.",
|
|
10848
10189
|
"access": "private",
|
|
10849
10190
|
"tagname": "",
|
|
@@ -10870,11 +10211,11 @@
|
|
|
10870
10211
|
},
|
|
10871
10212
|
{
|
|
10872
10213
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10873
|
-
"line":
|
|
10874
|
-
"description": "Handles updating the paths and notifying any listeners of the URL\nchange.\n\nTriggers the router level `didTransition` hook.\n\nFor example, to notify google analytics when the route changes,\nyou could use this hook. (Note: requires also including GA scripts, etc.)\n\n```javascript\nimport config from './config/environment';\nimport EmberRouter from '@ember/routing/router';\nimport {
|
|
10214
|
+
"line": 1373,
|
|
10215
|
+
"description": "Handles updating the paths and notifying any listeners of the URL\nchange.\n\nTriggers the router level `didTransition` hook.\n\nFor example, to notify google analytics when the route changes,\nyou could use this hook. (Note: requires also including GA scripts, etc.)\n\n```javascript\nimport config from './config/environment';\nimport EmberRouter from '@ember/routing/router';\nimport { service } from '@ember/service';\n\nlet Router = EmberRouter.extend({\n location: config.locationType,\n\n router: service(),\n\n didTransition: function() {\n this._super(...arguments);\n\n ga('send', 'pageview', {\n page: this.router.currentURL,\n title: this.router.currentRouteName,\n });\n }\n});\n```",
|
|
10875
10216
|
"itemtype": "method",
|
|
10876
10217
|
"name": "didTransition",
|
|
10877
|
-
"access": "
|
|
10218
|
+
"access": "private",
|
|
10878
10219
|
"tagname": "",
|
|
10879
10220
|
"since": "1.2.0",
|
|
10880
10221
|
"class": "EmberRouter",
|
|
@@ -10882,11 +10223,11 @@
|
|
|
10882
10223
|
},
|
|
10883
10224
|
{
|
|
10884
10225
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10885
|
-
"line":
|
|
10226
|
+
"line": 1410,
|
|
10886
10227
|
"description": "Handles notifying any listeners of an impending URL\nchange.\n\nTriggers the router level `willTransition` hook.",
|
|
10887
10228
|
"itemtype": "method",
|
|
10888
10229
|
"name": "willTransition",
|
|
10889
|
-
"access": "
|
|
10230
|
+
"access": "private",
|
|
10890
10231
|
"tagname": "",
|
|
10891
10232
|
"since": "1.11.0",
|
|
10892
10233
|
"class": "EmberRouter",
|
|
@@ -10894,7 +10235,7 @@
|
|
|
10894
10235
|
},
|
|
10895
10236
|
{
|
|
10896
10237
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10897
|
-
"line":
|
|
10238
|
+
"line": 1423,
|
|
10898
10239
|
"description": "Represents the current URL.",
|
|
10899
10240
|
"itemtype": "property",
|
|
10900
10241
|
"name": "url",
|
|
@@ -10906,7 +10247,7 @@
|
|
|
10906
10247
|
},
|
|
10907
10248
|
{
|
|
10908
10249
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10909
|
-
"line":
|
|
10250
|
+
"line": 1579,
|
|
10910
10251
|
"description": "Finds the name of the substate route if it exists for the given route. A\nsubstate route is of the form `route_state`, such as `foo_loading`.",
|
|
10911
10252
|
"access": "private",
|
|
10912
10253
|
"tagname": "",
|
|
@@ -10931,7 +10272,7 @@
|
|
|
10931
10272
|
},
|
|
10932
10273
|
{
|
|
10933
10274
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10934
|
-
"line":
|
|
10275
|
+
"line": 1598,
|
|
10935
10276
|
"description": "Finds the name of the state route if it exists for the given route. A state\nroute is of the form `route.state`, such as `foo.loading`. Properly Handles\n`application` named routes.",
|
|
10936
10277
|
"access": "private",
|
|
10937
10278
|
"tagname": "",
|
|
@@ -10956,7 +10297,7 @@
|
|
|
10956
10297
|
},
|
|
10957
10298
|
{
|
|
10958
10299
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10959
|
-
"line":
|
|
10300
|
+
"line": 1618,
|
|
10960
10301
|
"description": "Determines whether or not a route has been defined by checking that the route\nis in the Router's map and the owner has a registration for that route.",
|
|
10961
10302
|
"access": "private",
|
|
10962
10303
|
"tagname": "",
|
|
@@ -11303,7 +10644,7 @@
|
|
|
11303
10644
|
},
|
|
11304
10645
|
{
|
|
11305
10646
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
11306
|
-
"line":
|
|
10647
|
+
"line": 105,
|
|
11307
10648
|
"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```",
|
|
11308
10649
|
"itemtype": "method",
|
|
11309
10650
|
"name": "isArray",
|
|
@@ -11326,7 +10667,7 @@
|
|
|
11326
10667
|
},
|
|
11327
10668
|
{
|
|
11328
10669
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
11329
|
-
"line":
|
|
10670
|
+
"line": 218,
|
|
11330
10671
|
"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.",
|
|
11331
10672
|
"itemtype": "property",
|
|
11332
10673
|
"name": "length",
|
|
@@ -11338,7 +10679,7 @@
|
|
|
11338
10679
|
},
|
|
11339
10680
|
{
|
|
11340
10681
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
11341
|
-
"line":
|
|
10682
|
+
"line": 228,
|
|
11342
10683
|
"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```",
|
|
11343
10684
|
"itemtype": "method",
|
|
11344
10685
|
"name": "objectAt",
|
|
@@ -11360,7 +10701,7 @@
|
|
|
11360
10701
|
},
|
|
11361
10702
|
{
|
|
11362
10703
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
11363
|
-
"line":
|
|
10704
|
+
"line": 253,
|
|
11364
10705
|
"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```",
|
|
11365
10706
|
"itemtype": "method",
|
|
11366
10707
|
"name": "objectsAt",
|
|
@@ -11382,7 +10723,7 @@
|
|
|
11382
10723
|
},
|
|
11383
10724
|
{
|
|
11384
10725
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
11385
|
-
"line":
|
|
10726
|
+
"line": 272,
|
|
11386
10727
|
"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```",
|
|
11387
10728
|
"itemtype": "property",
|
|
11388
10729
|
"name": "[]",
|
|
@@ -11396,7 +10737,7 @@
|
|
|
11396
10737
|
},
|
|
11397
10738
|
{
|
|
11398
10739
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
11399
|
-
"line":
|
|
10740
|
+
"line": 300,
|
|
11400
10741
|
"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```",
|
|
11401
10742
|
"itemtype": "property",
|
|
11402
10743
|
"name": "firstObject",
|
|
@@ -11411,7 +10752,7 @@
|
|
|
11411
10752
|
},
|
|
11412
10753
|
{
|
|
11413
10754
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
11414
|
-
"line":
|
|
10755
|
+
"line": 325,
|
|
11415
10756
|
"description": "The last object in the array, or `undefined` if the array is empty.",
|
|
11416
10757
|
"itemtype": "property",
|
|
11417
10758
|
"name": "lastObject",
|
|
@@ -11426,7 +10767,7 @@
|
|
|
11426
10767
|
},
|
|
11427
10768
|
{
|
|
11428
10769
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
11429
|
-
"line":
|
|
10770
|
+
"line": 337,
|
|
11430
10771
|
"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```",
|
|
11431
10772
|
"itemtype": "method",
|
|
11432
10773
|
"name": "slice",
|
|
@@ -11438,124 +10779,13 @@
|
|
|
11438
10779
|
},
|
|
11439
10780
|
{
|
|
11440
10781
|
"name": "endIndex",
|
|
11441
|
-
"description": "(Optional) index to end the slice at (but not included).",
|
|
11442
|
-
"type": "Number"
|
|
11443
|
-
}
|
|
11444
|
-
],
|
|
11445
|
-
"return": {
|
|
11446
|
-
"description": "New array with specified slice",
|
|
11447
|
-
"type": "Array"
|
|
11448
|
-
},
|
|
11449
|
-
"access": "public",
|
|
11450
|
-
"tagname": "",
|
|
11451
|
-
"class": "EmberArray",
|
|
11452
|
-
"module": "@ember/array"
|
|
11453
|
-
},
|
|
11454
|
-
{
|
|
11455
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
11456
|
-
"line": 383,
|
|
11457
|
-
"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```",
|
|
11458
|
-
"itemtype": "method",
|
|
11459
|
-
"name": "indexOf",
|
|
11460
|
-
"params": [
|
|
11461
|
-
{
|
|
11462
|
-
"name": "object",
|
|
11463
|
-
"description": "the item to search for",
|
|
11464
|
-
"type": "Object"
|
|
11465
|
-
},
|
|
11466
|
-
{
|
|
11467
|
-
"name": "startAt",
|
|
11468
|
-
"description": "optional starting location to search, default 0",
|
|
11469
|
-
"type": "Number"
|
|
11470
|
-
}
|
|
11471
|
-
],
|
|
11472
|
-
"return": {
|
|
11473
|
-
"description": "index or -1 if not found",
|
|
11474
|
-
"type": "Number"
|
|
11475
|
-
},
|
|
11476
|
-
"access": "public",
|
|
11477
|
-
"tagname": "",
|
|
11478
|
-
"class": "EmberArray",
|
|
11479
|
-
"module": "@ember/array"
|
|
11480
|
-
},
|
|
11481
|
-
{
|
|
11482
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
11483
|
-
"line": 425,
|
|
11484
|
-
"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```",
|
|
11485
|
-
"itemtype": "method",
|
|
11486
|
-
"name": "lastIndexOf",
|
|
11487
|
-
"params": [
|
|
11488
|
-
{
|
|
11489
|
-
"name": "object",
|
|
11490
|
-
"description": "the item to search for",
|
|
11491
|
-
"type": "Object"
|
|
11492
|
-
},
|
|
11493
|
-
{
|
|
11494
|
-
"name": "startAt",
|
|
11495
|
-
"description": "optional starting location to search from\nbackwards, defaults to `(array.length - 1)`",
|
|
11496
|
-
"type": "Number"
|
|
11497
|
-
}
|
|
11498
|
-
],
|
|
11499
|
-
"return": {
|
|
11500
|
-
"description": "The last index of the `object` in the array or -1\nif not found",
|
|
11501
|
-
"type": "Number"
|
|
11502
|
-
},
|
|
11503
|
-
"access": "public",
|
|
11504
|
-
"tagname": "",
|
|
11505
|
-
"class": "EmberArray",
|
|
11506
|
-
"module": "@ember/array"
|
|
11507
|
-
},
|
|
11508
|
-
{
|
|
11509
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
11510
|
-
"line": 483,
|
|
11511
|
-
"description": "Adds an array observer to the receiving array. The array observer object\nnormally must implement two methods:\n\n* `willChange(observedObj, start, removeCount, addCount)` - This method will be\n called just before the array is modified.\n* `didChange(observedObj, start, removeCount, addCount)` - This method will be\n called just after the array is modified.\n\nBoth callbacks will be passed the observed object, starting index of the\nchange as well as a count of the items to be removed and added. You can use\nthese callbacks to optionally inspect the array during the change, clear\ncaches, or do any other bookkeeping necessary.\n\nIn addition to passing a target, you can also include an options hash\nwhich you can use to override the method names that will be invoked on the\ntarget.",
|
|
11512
|
-
"itemtype": "method",
|
|
11513
|
-
"name": "addArrayObserver",
|
|
11514
|
-
"params": [
|
|
11515
|
-
{
|
|
11516
|
-
"name": "target",
|
|
11517
|
-
"description": "The observer object.",
|
|
11518
|
-
"type": "Object"
|
|
11519
|
-
},
|
|
11520
|
-
{
|
|
11521
|
-
"name": "opts",
|
|
11522
|
-
"description": "Optional hash of configuration options including\n `willChange` and `didChange` option.",
|
|
11523
|
-
"type": "Object"
|
|
11524
|
-
}
|
|
11525
|
-
],
|
|
11526
|
-
"return": {
|
|
11527
|
-
"description": "receiver",
|
|
11528
|
-
"type": "EmberArray"
|
|
11529
|
-
},
|
|
11530
|
-
"access": "public",
|
|
11531
|
-
"tagname": "",
|
|
11532
|
-
"example": [
|
|
11533
|
-
"\n import Service from '@ember/service';\n\n export default Service.extend({\n data: Ember.A(),\n\n init() {\n this._super(...arguments);\n\n this.data.addArrayObserver(this, {\n willChange: 'dataWillChange',\n didChange: 'dataDidChange'\n });\n },\n\n dataWillChange(array, start, removeCount, addCount) {\n console.log('array will change', array, start, removeCount, addCount);\n },\n\n dataDidChange(array, start, removeCount, addCount) {\n console.log('array did change', array, start, removeCount, addCount);\n }\n });"
|
|
11534
|
-
],
|
|
11535
|
-
"class": "EmberArray",
|
|
11536
|
-
"module": "@ember/array"
|
|
11537
|
-
},
|
|
11538
|
-
{
|
|
11539
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
11540
|
-
"line": 536,
|
|
11541
|
-
"description": "Removes an array observer from the object if the observer is current\nregistered. Calling this method multiple times with the same object will\nhave no effect.",
|
|
11542
|
-
"itemtype": "method",
|
|
11543
|
-
"name": "removeArrayObserver",
|
|
11544
|
-
"params": [
|
|
11545
|
-
{
|
|
11546
|
-
"name": "target",
|
|
11547
|
-
"description": "The object observing the array.",
|
|
11548
|
-
"type": "Object"
|
|
11549
|
-
},
|
|
11550
|
-
{
|
|
11551
|
-
"name": "opts",
|
|
11552
|
-
"description": "Optional hash of configuration options including\n `willChange` and `didChange` option.",
|
|
11553
|
-
"type": "Object"
|
|
10782
|
+
"description": "(Optional) index to end the slice at (but not included).",
|
|
10783
|
+
"type": "Number"
|
|
11554
10784
|
}
|
|
11555
10785
|
],
|
|
11556
10786
|
"return": {
|
|
11557
|
-
"description": "
|
|
11558
|
-
"type": "
|
|
10787
|
+
"description": "New array with specified slice",
|
|
10788
|
+
"type": "Array"
|
|
11559
10789
|
},
|
|
11560
10790
|
"access": "public",
|
|
11561
10791
|
"tagname": "",
|
|
@@ -11564,42 +10794,25 @@
|
|
|
11564
10794
|
},
|
|
11565
10795
|
{
|
|
11566
10796
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
11567
|
-
"line":
|
|
11568
|
-
"description": "
|
|
11569
|
-
"itemtype": "property",
|
|
11570
|
-
"name": "hasArrayObservers",
|
|
11571
|
-
"type": "Boolean",
|
|
11572
|
-
"access": "public",
|
|
11573
|
-
"tagname": "",
|
|
11574
|
-
"class": "EmberArray",
|
|
11575
|
-
"module": "@ember/array"
|
|
11576
|
-
},
|
|
11577
|
-
{
|
|
11578
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
11579
|
-
"line": 579,
|
|
11580
|
-
"description": "If you are implementing an object that supports `EmberArray`, call this\nmethod just before the array content changes to notify any observers and\ninvalidate any related properties. Pass the starting index of the change\nas well as a delta of the amounts to change.\n\n```app/components/show-post.js\nimport Component from '@ember/component';\nimport EmberObject from '@ember/object';\n\nconst Post = EmberObject.extend({\n body: '',\n save() {}\n})\n\nexport default Component.extend({\n attemptsToModify: 0,\n successfulModifications: 0,\n posts: null,\n\n init() {\n this._super(...arguments);\n\n this.posts = [1, 2, 3].map(i => Post.create({ body: i }));\n this.posts.addArrayObserver(this, {\n willChange() {\n this.incrementProperty('attemptsToModify');\n },\n didChange() {\n this.incrementProperty('successfulModifications');\n }\n });\n },\n\n actions: {\n editPost(post, newContent) {\n let oldContent = post.body,\n postIndex = this.posts.indexOf(post);\n\n this.posts.arrayContentWillChange(postIndex, 0, 0); // attemptsToModify = 1\n post.set('body', newContent);\n\n post.save()\n .then(response => {\n this.posts.arrayContentDidChange(postIndex, 0, 0); // successfulModifications = 1\n })\n .catch(error => {\n post.set('body', oldContent);\n })\n }\n }\n});\n```",
|
|
10797
|
+
"line": 377,
|
|
10798
|
+
"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```",
|
|
11581
10799
|
"itemtype": "method",
|
|
11582
|
-
"name": "
|
|
10800
|
+
"name": "indexOf",
|
|
11583
10801
|
"params": [
|
|
11584
10802
|
{
|
|
11585
|
-
"name": "
|
|
11586
|
-
"description": "
|
|
11587
|
-
"type": "
|
|
11588
|
-
},
|
|
11589
|
-
{
|
|
11590
|
-
"name": "removeAmt",
|
|
11591
|
-
"description": "The number of items that will be removed. If you\n pass `null` assumes 0",
|
|
11592
|
-
"type": "Number"
|
|
10803
|
+
"name": "object",
|
|
10804
|
+
"description": "the item to search for",
|
|
10805
|
+
"type": "Object"
|
|
11593
10806
|
},
|
|
11594
10807
|
{
|
|
11595
|
-
"name": "
|
|
11596
|
-
"description": "
|
|
10808
|
+
"name": "startAt",
|
|
10809
|
+
"description": "optional starting location to search, default 0",
|
|
11597
10810
|
"type": "Number"
|
|
11598
10811
|
}
|
|
11599
10812
|
],
|
|
11600
10813
|
"return": {
|
|
11601
|
-
"description": "
|
|
11602
|
-
"type": "
|
|
10814
|
+
"description": "index or -1 if not found",
|
|
10815
|
+
"type": "Number"
|
|
11603
10816
|
},
|
|
11604
10817
|
"access": "public",
|
|
11605
10818
|
"tagname": "",
|
|
@@ -11608,30 +10821,25 @@
|
|
|
11608
10821
|
},
|
|
11609
10822
|
{
|
|
11610
10823
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
11611
|
-
"line":
|
|
11612
|
-
"description": "
|
|
10824
|
+
"line": 419,
|
|
10825
|
+
"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```",
|
|
11613
10826
|
"itemtype": "method",
|
|
11614
|
-
"name": "
|
|
10827
|
+
"name": "lastIndexOf",
|
|
11615
10828
|
"params": [
|
|
11616
10829
|
{
|
|
11617
|
-
"name": "
|
|
11618
|
-
"description": "
|
|
11619
|
-
"type": "
|
|
11620
|
-
},
|
|
11621
|
-
{
|
|
11622
|
-
"name": "removeAmt",
|
|
11623
|
-
"description": "The number of items that were removed. If you\n pass `null` assumes 0",
|
|
11624
|
-
"type": "Number"
|
|
10830
|
+
"name": "object",
|
|
10831
|
+
"description": "the item to search for",
|
|
10832
|
+
"type": "Object"
|
|
11625
10833
|
},
|
|
11626
10834
|
{
|
|
11627
|
-
"name": "
|
|
11628
|
-
"description": "
|
|
10835
|
+
"name": "startAt",
|
|
10836
|
+
"description": "optional starting location to search from\nbackwards, defaults to `(array.length - 1)`",
|
|
11629
10837
|
"type": "Number"
|
|
11630
10838
|
}
|
|
11631
10839
|
],
|
|
11632
10840
|
"return": {
|
|
11633
|
-
"description": "
|
|
11634
|
-
"type": "
|
|
10841
|
+
"description": "The last index of the `object` in the array or -1\nif not found",
|
|
10842
|
+
"type": "Number"
|
|
11635
10843
|
},
|
|
11636
10844
|
"access": "public",
|
|
11637
10845
|
"tagname": "",
|
|
@@ -11640,7 +10848,7 @@
|
|
|
11640
10848
|
},
|
|
11641
10849
|
{
|
|
11642
10850
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
11643
|
-
"line":
|
|
10851
|
+
"line": 473,
|
|
11644
10852
|
"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```",
|
|
11645
10853
|
"itemtype": "method",
|
|
11646
10854
|
"name": "forEach",
|
|
@@ -11668,7 +10876,7 @@
|
|
|
11668
10876
|
},
|
|
11669
10877
|
{
|
|
11670
10878
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
11671
|
-
"line":
|
|
10879
|
+
"line": 533,
|
|
11672
10880
|
"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```",
|
|
11673
10881
|
"itemtype": "method",
|
|
11674
10882
|
"name": "getEach",
|
|
@@ -11690,7 +10898,7 @@
|
|
|
11690
10898
|
},
|
|
11691
10899
|
{
|
|
11692
10900
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
11693
|
-
"line":
|
|
10901
|
+
"line": 556,
|
|
11694
10902
|
"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```",
|
|
11695
10903
|
"itemtype": "method",
|
|
11696
10904
|
"name": "setEach",
|
|
@@ -11717,7 +10925,7 @@
|
|
|
11717
10925
|
},
|
|
11718
10926
|
{
|
|
11719
10927
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
11720
|
-
"line":
|
|
10928
|
+
"line": 579,
|
|
11721
10929
|
"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.",
|
|
11722
10930
|
"itemtype": "method",
|
|
11723
10931
|
"name": "map",
|
|
@@ -11745,7 +10953,7 @@
|
|
|
11745
10953
|
},
|
|
11746
10954
|
{
|
|
11747
10955
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
11748
|
-
"line":
|
|
10956
|
+
"line": 623,
|
|
11749
10957
|
"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```",
|
|
11750
10958
|
"itemtype": "method",
|
|
11751
10959
|
"name": "mapBy",
|
|
@@ -11767,7 +10975,7 @@
|
|
|
11767
10975
|
},
|
|
11768
10976
|
{
|
|
11769
10977
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
11770
|
-
"line":
|
|
10978
|
+
"line": 644,
|
|
11771
10979
|
"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```",
|
|
11772
10980
|
"itemtype": "method",
|
|
11773
10981
|
"name": "filter",
|
|
@@ -11795,7 +11003,7 @@
|
|
|
11795
11003
|
},
|
|
11796
11004
|
{
|
|
11797
11005
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
11798
|
-
"line":
|
|
11006
|
+
"line": 717,
|
|
11799
11007
|
"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```",
|
|
11800
11008
|
"itemtype": "method",
|
|
11801
11009
|
"name": "reject",
|
|
@@ -11823,7 +11031,7 @@
|
|
|
11823
11031
|
},
|
|
11824
11032
|
{
|
|
11825
11033
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
11826
|
-
"line":
|
|
11034
|
+
"line": 764,
|
|
11827
11035
|
"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```",
|
|
11828
11036
|
"itemtype": "method",
|
|
11829
11037
|
"name": "filterBy",
|
|
@@ -11851,7 +11059,7 @@
|
|
|
11851
11059
|
},
|
|
11852
11060
|
{
|
|
11853
11061
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
11854
|
-
"line":
|
|
11062
|
+
"line": 788,
|
|
11855
11063
|
"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```",
|
|
11856
11064
|
"itemtype": "method",
|
|
11857
11065
|
"name": "rejectBy",
|
|
@@ -11879,7 +11087,7 @@
|
|
|
11879
11087
|
},
|
|
11880
11088
|
{
|
|
11881
11089
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
11882
|
-
"line":
|
|
11090
|
+
"line": 815,
|
|
11883
11091
|
"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```",
|
|
11884
11092
|
"itemtype": "method",
|
|
11885
11093
|
"name": "find",
|
|
@@ -11907,7 +11115,7 @@
|
|
|
11907
11115
|
},
|
|
11908
11116
|
{
|
|
11909
11117
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
11910
|
-
"line":
|
|
11118
|
+
"line": 862,
|
|
11911
11119
|
"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```",
|
|
11912
11120
|
"itemtype": "method",
|
|
11913
11121
|
"name": "findBy",
|
|
@@ -11935,7 +11143,7 @@
|
|
|
11935
11143
|
},
|
|
11936
11144
|
{
|
|
11937
11145
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
11938
|
-
"line":
|
|
11146
|
+
"line": 894,
|
|
11939
11147
|
"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```",
|
|
11940
11148
|
"itemtype": "method",
|
|
11941
11149
|
"name": "every",
|
|
@@ -11963,7 +11171,7 @@
|
|
|
11963
11171
|
},
|
|
11964
11172
|
{
|
|
11965
11173
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
11966
|
-
"line":
|
|
11174
|
+
"line": 936,
|
|
11967
11175
|
"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```",
|
|
11968
11176
|
"itemtype": "method",
|
|
11969
11177
|
"name": "isEvery",
|
|
@@ -11992,7 +11200,7 @@
|
|
|
11992
11200
|
},
|
|
11993
11201
|
{
|
|
11994
11202
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
11995
|
-
"line":
|
|
11203
|
+
"line": 978,
|
|
11996
11204
|
"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```",
|
|
11997
11205
|
"itemtype": "method",
|
|
11998
11206
|
"name": "any",
|
|
@@ -12020,7 +11228,7 @@
|
|
|
12020
11228
|
},
|
|
12021
11229
|
{
|
|
12022
11230
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
12023
|
-
"line":
|
|
11231
|
+
"line": 1022,
|
|
12024
11232
|
"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```",
|
|
12025
11233
|
"itemtype": "method",
|
|
12026
11234
|
"name": "isAny",
|
|
@@ -12049,7 +11257,7 @@
|
|
|
12049
11257
|
},
|
|
12050
11258
|
{
|
|
12051
11259
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
12052
|
-
"line":
|
|
11260
|
+
"line": 1050,
|
|
12053
11261
|
"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```",
|
|
12054
11262
|
"itemtype": "method",
|
|
12055
11263
|
"name": "reduce",
|
|
@@ -12076,7 +11284,7 @@
|
|
|
12076
11284
|
},
|
|
12077
11285
|
{
|
|
12078
11286
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
12079
|
-
"line":
|
|
11287
|
+
"line": 1116,
|
|
12080
11288
|
"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```",
|
|
12081
11289
|
"itemtype": "method",
|
|
12082
11290
|
"name": "invoke",
|
|
@@ -12103,7 +11311,7 @@
|
|
|
12103
11311
|
},
|
|
12104
11312
|
{
|
|
12105
11313
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
12106
|
-
"line":
|
|
11314
|
+
"line": 1154,
|
|
12107
11315
|
"description": "Simply converts the object into a genuine array. The order is not\nguaranteed. Corresponds to the method implemented by Prototype.",
|
|
12108
11316
|
"itemtype": "method",
|
|
12109
11317
|
"name": "toArray",
|
|
@@ -12118,7 +11326,7 @@
|
|
|
12118
11326
|
},
|
|
12119
11327
|
{
|
|
12120
11328
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
12121
|
-
"line":
|
|
11329
|
+
"line": 1166,
|
|
12122
11330
|
"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```",
|
|
12123
11331
|
"itemtype": "method",
|
|
12124
11332
|
"name": "compact",
|
|
@@ -12133,7 +11341,7 @@
|
|
|
12133
11341
|
},
|
|
12134
11342
|
{
|
|
12135
11343
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
12136
|
-
"line":
|
|
11344
|
+
"line": 1182,
|
|
12137
11345
|
"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```",
|
|
12138
11346
|
"itemtype": "method",
|
|
12139
11347
|
"name": "includes",
|
|
@@ -12160,7 +11368,7 @@
|
|
|
12160
11368
|
},
|
|
12161
11369
|
{
|
|
12162
11370
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
12163
|
-
"line":
|
|
11371
|
+
"line": 1215,
|
|
12164
11372
|
"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 ```",
|
|
12165
11373
|
"itemtype": "method",
|
|
12166
11374
|
"name": "sortBy",
|
|
@@ -12183,7 +11391,7 @@
|
|
|
12183
11391
|
},
|
|
12184
11392
|
{
|
|
12185
11393
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
12186
|
-
"line":
|
|
11394
|
+
"line": 1259,
|
|
12187
11395
|
"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.",
|
|
12188
11396
|
"itemtype": "method",
|
|
12189
11397
|
"name": "uniq",
|
|
@@ -12198,7 +11406,7 @@
|
|
|
12198
11406
|
},
|
|
12199
11407
|
{
|
|
12200
11408
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
12201
|
-
"line":
|
|
11409
|
+
"line": 1278,
|
|
12202
11410
|
"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```",
|
|
12203
11411
|
"itemtype": "method",
|
|
12204
11412
|
"name": "uniqBy",
|
|
@@ -12220,7 +11428,7 @@
|
|
|
12220
11428
|
},
|
|
12221
11429
|
{
|
|
12222
11430
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
12223
|
-
"line":
|
|
11431
|
+
"line": 1300,
|
|
12224
11432
|
"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```",
|
|
12225
11433
|
"itemtype": "method",
|
|
12226
11434
|
"name": "without",
|
|
@@ -12242,8 +11450,8 @@
|
|
|
12242
11450
|
},
|
|
12243
11451
|
{
|
|
12244
11452
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
12245
|
-
"line":
|
|
12246
|
-
"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
|
|
11453
|
+
"line": 1348,
|
|
11454
|
+
"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.",
|
|
12247
11455
|
"itemtype": "method",
|
|
12248
11456
|
"name": "replace",
|
|
12249
11457
|
"params": [
|
|
@@ -12270,7 +11478,7 @@
|
|
|
12270
11478
|
},
|
|
12271
11479
|
{
|
|
12272
11480
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
12273
|
-
"line":
|
|
11481
|
+
"line": 1367,
|
|
12274
11482
|
"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```",
|
|
12275
11483
|
"itemtype": "method",
|
|
12276
11484
|
"name": "clear",
|
|
@@ -12285,7 +11493,7 @@
|
|
|
12285
11493
|
},
|
|
12286
11494
|
{
|
|
12287
11495
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
12288
|
-
"line":
|
|
11496
|
+
"line": 1393,
|
|
12289
11497
|
"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```",
|
|
12290
11498
|
"itemtype": "method",
|
|
12291
11499
|
"name": "insertAt",
|
|
@@ -12312,7 +11520,7 @@
|
|
|
12312
11520
|
},
|
|
12313
11521
|
{
|
|
12314
11522
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
12315
|
-
"line":
|
|
11523
|
+
"line": 1415,
|
|
12316
11524
|
"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```",
|
|
12317
11525
|
"itemtype": "method",
|
|
12318
11526
|
"name": "removeAt",
|
|
@@ -12339,7 +11547,7 @@
|
|
|
12339
11547
|
},
|
|
12340
11548
|
{
|
|
12341
11549
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
12342
|
-
"line":
|
|
11550
|
+
"line": 1440,
|
|
12343
11551
|
"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```",
|
|
12344
11552
|
"itemtype": "method",
|
|
12345
11553
|
"name": "pushObject",
|
|
@@ -12360,7 +11568,7 @@
|
|
|
12360
11568
|
},
|
|
12361
11569
|
{
|
|
12362
11570
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
12363
|
-
"line":
|
|
11571
|
+
"line": 1460,
|
|
12364
11572
|
"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```",
|
|
12365
11573
|
"itemtype": "method",
|
|
12366
11574
|
"name": "pushObjects",
|
|
@@ -12382,7 +11590,7 @@
|
|
|
12382
11590
|
},
|
|
12383
11591
|
{
|
|
12384
11592
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
12385
|
-
"line":
|
|
11593
|
+
"line": 1480,
|
|
12386
11594
|
"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```",
|
|
12387
11595
|
"itemtype": "method",
|
|
12388
11596
|
"name": "popObject",
|
|
@@ -12396,7 +11604,7 @@
|
|
|
12396
11604
|
},
|
|
12397
11605
|
{
|
|
12398
11606
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
12399
|
-
"line":
|
|
11607
|
+
"line": 1506,
|
|
12400
11608
|
"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```",
|
|
12401
11609
|
"itemtype": "method",
|
|
12402
11610
|
"name": "shiftObject",
|
|
@@ -12410,7 +11618,7 @@
|
|
|
12410
11618
|
},
|
|
12411
11619
|
{
|
|
12412
11620
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
12413
|
-
"line":
|
|
11621
|
+
"line": 1531,
|
|
12414
11622
|
"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```",
|
|
12415
11623
|
"itemtype": "method",
|
|
12416
11624
|
"name": "unshiftObject",
|
|
@@ -12431,7 +11639,7 @@
|
|
|
12431
11639
|
},
|
|
12432
11640
|
{
|
|
12433
11641
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
12434
|
-
"line":
|
|
11642
|
+
"line": 1551,
|
|
12435
11643
|
"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```",
|
|
12436
11644
|
"itemtype": "method",
|
|
12437
11645
|
"name": "unshiftObjects",
|
|
@@ -12453,7 +11661,7 @@
|
|
|
12453
11661
|
},
|
|
12454
11662
|
{
|
|
12455
11663
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
12456
|
-
"line":
|
|
11664
|
+
"line": 1572,
|
|
12457
11665
|
"description": "Reverse objects in the array. Works just like `reverse()` but it is\nKVO-compliant.",
|
|
12458
11666
|
"itemtype": "method",
|
|
12459
11667
|
"name": "reverseObjects",
|
|
@@ -12468,7 +11676,7 @@
|
|
|
12468
11676
|
},
|
|
12469
11677
|
{
|
|
12470
11678
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
12471
|
-
"line":
|
|
11679
|
+
"line": 1591,
|
|
12472
11680
|
"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```",
|
|
12473
11681
|
"itemtype": "method",
|
|
12474
11682
|
"name": "setObjects",
|
|
@@ -12490,7 +11698,7 @@
|
|
|
12490
11698
|
},
|
|
12491
11699
|
{
|
|
12492
11700
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
12493
|
-
"line":
|
|
11701
|
+
"line": 1618,
|
|
12494
11702
|
"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```",
|
|
12495
11703
|
"itemtype": "method",
|
|
12496
11704
|
"name": "removeObject",
|
|
@@ -12512,7 +11720,7 @@
|
|
|
12512
11720
|
},
|
|
12513
11721
|
{
|
|
12514
11722
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
12515
|
-
"line":
|
|
11723
|
+
"line": 1646,
|
|
12516
11724
|
"description": "Removes each object in the passed array from the receiver.",
|
|
12517
11725
|
"itemtype": "method",
|
|
12518
11726
|
"name": "removeObjects",
|
|
@@ -12534,7 +11742,7 @@
|
|
|
12534
11742
|
},
|
|
12535
11743
|
{
|
|
12536
11744
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
12537
|
-
"line":
|
|
11745
|
+
"line": 1663,
|
|
12538
11746
|
"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```",
|
|
12539
11747
|
"itemtype": "method",
|
|
12540
11748
|
"name": "addObject",
|
|
@@ -12556,7 +11764,7 @@
|
|
|
12556
11764
|
},
|
|
12557
11765
|
{
|
|
12558
11766
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
12559
|
-
"line":
|
|
11767
|
+
"line": 1689,
|
|
12560
11768
|
"description": "Adds each object in the passed array to the receiver.",
|
|
12561
11769
|
"itemtype": "method",
|
|
12562
11770
|
"name": "addObjects",
|
|
@@ -12578,7 +11786,7 @@
|
|
|
12578
11786
|
},
|
|
12579
11787
|
{
|
|
12580
11788
|
"file": "packages/@ember/-internals/runtime/lib/mixins/array.js",
|
|
12581
|
-
"line":
|
|
11789
|
+
"line": 1705,
|
|
12582
11790
|
"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```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```",
|
|
12583
11791
|
"itemtype": "method",
|
|
12584
11792
|
"name": "A",
|
|
@@ -13557,7 +12765,7 @@
|
|
|
13557
12765
|
},
|
|
13558
12766
|
{
|
|
13559
12767
|
"file": "packages/@ember/-internals/runtime/lib/mixins/target_action_support.js",
|
|
13560
|
-
"line":
|
|
12768
|
+
"line": 41,
|
|
13561
12769
|
"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```",
|
|
13562
12770
|
"itemtype": "method",
|
|
13563
12771
|
"name": "triggerAction",
|
|
@@ -13580,7 +12788,7 @@
|
|
|
13580
12788
|
},
|
|
13581
12789
|
{
|
|
13582
12790
|
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.js",
|
|
13583
|
-
"line":
|
|
12791
|
+
"line": 141,
|
|
13584
12792
|
"description": "The content array. Must be an object that implements `Array` and/or\n`MutableArray.`",
|
|
13585
12793
|
"itemtype": "property",
|
|
13586
12794
|
"name": "content",
|
|
@@ -13592,7 +12800,7 @@
|
|
|
13592
12800
|
},
|
|
13593
12801
|
{
|
|
13594
12802
|
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.js",
|
|
13595
|
-
"line":
|
|
12803
|
+
"line": 150,
|
|
13596
12804
|
"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`.",
|
|
13597
12805
|
"itemtype": "method",
|
|
13598
12806
|
"name": "objectAtContent",
|
|
@@ -13614,7 +12822,7 @@
|
|
|
13614
12822
|
},
|
|
13615
12823
|
{
|
|
13616
12824
|
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.js",
|
|
13617
|
-
"line":
|
|
12825
|
+
"line": 176,
|
|
13618
12826
|
"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`.",
|
|
13619
12827
|
"itemtype": "method",
|
|
13620
12828
|
"name": "replaceContent",
|
|
@@ -13646,7 +12854,7 @@
|
|
|
13646
12854
|
},
|
|
13647
12855
|
{
|
|
13648
12856
|
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.js",
|
|
13649
|
-
"line":
|
|
12857
|
+
"line": 346,
|
|
13650
12858
|
"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.",
|
|
13651
12859
|
"itemtype": "property",
|
|
13652
12860
|
"name": "arrangedContent",
|
|
@@ -14230,7 +13438,6 @@
|
|
|
14230
13438
|
{
|
|
14231
13439
|
"file": "packages/@ember/-internals/utils/lib/guid.ts",
|
|
14232
13440
|
"line": 8,
|
|
14233
|
-
"description": "Previously we used `Ember.$.uuid`, however `$.uuid` has been removed from\njQuery master. We'll just bootstrap our own uuid now.",
|
|
14234
13441
|
"access": "private",
|
|
14235
13442
|
"tagname": "",
|
|
14236
13443
|
"return": {
|
|
@@ -14242,7 +13449,7 @@
|
|
|
14242
13449
|
},
|
|
14243
13450
|
{
|
|
14244
13451
|
"file": "packages/@ember/-internals/utils/lib/guid.ts",
|
|
14245
|
-
"line":
|
|
13452
|
+
"line": 14,
|
|
14246
13453
|
"description": "Generates a universally unique identifier. This method\nis used internally by Ember for assisting with\nthe generation of GUID's and other unique identifiers.",
|
|
14247
13454
|
"access": "public",
|
|
14248
13455
|
"tagname": "",
|
|
@@ -14255,7 +13462,7 @@
|
|
|
14255
13462
|
},
|
|
14256
13463
|
{
|
|
14257
13464
|
"file": "packages/@ember/-internals/utils/lib/guid.ts",
|
|
14258
|
-
"line":
|
|
13465
|
+
"line": 26,
|
|
14259
13466
|
"description": "Prefix used for guids through out Ember.",
|
|
14260
13467
|
"access": "private",
|
|
14261
13468
|
"tagname": "",
|
|
@@ -14268,7 +13475,7 @@
|
|
|
14268
13475
|
},
|
|
14269
13476
|
{
|
|
14270
13477
|
"file": "packages/@ember/-internals/utils/lib/guid.ts",
|
|
14271
|
-
"line":
|
|
13478
|
+
"line": 39,
|
|
14272
13479
|
"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.",
|
|
14273
13480
|
"access": "private",
|
|
14274
13481
|
"tagname": "",
|
|
@@ -14281,7 +13488,7 @@
|
|
|
14281
13488
|
},
|
|
14282
13489
|
{
|
|
14283
13490
|
"file": "packages/@ember/-internals/utils/lib/guid.ts",
|
|
14284
|
-
"line":
|
|
13491
|
+
"line": 55,
|
|
14285
13492
|
"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.",
|
|
14286
13493
|
"access": "private",
|
|
14287
13494
|
"tagname": "",
|
|
@@ -14311,7 +13518,7 @@
|
|
|
14311
13518
|
},
|
|
14312
13519
|
{
|
|
14313
13520
|
"file": "packages/@ember/-internals/utils/lib/guid.ts",
|
|
14314
|
-
"line":
|
|
13521
|
+
"line": 83,
|
|
14315
13522
|
"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.",
|
|
14316
13523
|
"access": "public",
|
|
14317
13524
|
"tagname": "",
|
|
@@ -14498,153 +13705,6 @@
|
|
|
14498
13705
|
"module": "ember",
|
|
14499
13706
|
"namespace": "Ember"
|
|
14500
13707
|
},
|
|
14501
|
-
{
|
|
14502
|
-
"file": "packages/@ember/-internals/views/lib/mixins/text_support.js",
|
|
14503
|
-
"line": 143,
|
|
14504
|
-
"description": "Whether the `keyUp` event that triggers an `action` to be sent continues\npropagating to other views.\n\nBy default, when the user presses the return key on their keyboard and\nthe text field has an `action` set, the action will be sent to the view's\ncontroller and the key event will stop propagating.\n\nIf you would like parent views to receive the `keyUp` event even after an\naction has been dispatched, set `bubbles` to true.",
|
|
14505
|
-
"itemtype": "property",
|
|
14506
|
-
"name": "bubbles",
|
|
14507
|
-
"type": "Boolean",
|
|
14508
|
-
"default": "false",
|
|
14509
|
-
"access": "private",
|
|
14510
|
-
"tagname": "",
|
|
14511
|
-
"class": "Ember.TextSupport",
|
|
14512
|
-
"module": "ember",
|
|
14513
|
-
"namespace": "Ember"
|
|
14514
|
-
},
|
|
14515
|
-
{
|
|
14516
|
-
"file": "packages/@ember/-internals/views/lib/mixins/text_support.js",
|
|
14517
|
-
"line": 190,
|
|
14518
|
-
"description": "Allows you to specify a controller action to invoke when either the `enter`\nkey is pressed or, in the case of the field being a textarea, when a newline\nis inserted. To use this method, give your field an `insert-newline`\nattribute. The value of that attribute should be the name of the action\nin your controller that you wish to invoke.\n\nFor an example on how to use the `insert-newline` attribute, please\nreference the example near the top of this file.",
|
|
14519
|
-
"itemtype": "method",
|
|
14520
|
-
"name": "insertNewline",
|
|
14521
|
-
"params": [
|
|
14522
|
-
{
|
|
14523
|
-
"name": "event",
|
|
14524
|
-
"description": "",
|
|
14525
|
-
"type": "Event"
|
|
14526
|
-
}
|
|
14527
|
-
],
|
|
14528
|
-
"access": "private",
|
|
14529
|
-
"tagname": "",
|
|
14530
|
-
"class": "Ember.TextSupport",
|
|
14531
|
-
"module": "ember",
|
|
14532
|
-
"namespace": "Ember"
|
|
14533
|
-
},
|
|
14534
|
-
{
|
|
14535
|
-
"file": "packages/@ember/-internals/views/lib/mixins/text_support.js",
|
|
14536
|
-
"line": 209,
|
|
14537
|
-
"description": "Allows you to specify a controller action to invoke when the escape button\nis pressed. To use this method, give your field an `escape-press`\nattribute. The value of that attribute should be the name of the action\nin your controller that you wish to invoke.\n\nFor an example on how to use the `escape-press` attribute, please reference\nthe example near the top of this file.",
|
|
14538
|
-
"itemtype": "method",
|
|
14539
|
-
"name": "cancel",
|
|
14540
|
-
"params": [
|
|
14541
|
-
{
|
|
14542
|
-
"name": "event",
|
|
14543
|
-
"description": "",
|
|
14544
|
-
"type": "Event"
|
|
14545
|
-
}
|
|
14546
|
-
],
|
|
14547
|
-
"access": "private",
|
|
14548
|
-
"tagname": "",
|
|
14549
|
-
"class": "Ember.TextSupport",
|
|
14550
|
-
"module": "ember",
|
|
14551
|
-
"namespace": "Ember"
|
|
14552
|
-
},
|
|
14553
|
-
{
|
|
14554
|
-
"file": "packages/@ember/-internals/views/lib/mixins/text_support.js",
|
|
14555
|
-
"line": 226,
|
|
14556
|
-
"description": "Allows you to specify a controller action to invoke when a field receives\nfocus. To use this method, give your field a `focus-in` attribute. The value\nof that attribute should be the name of the action in your controller\nthat you wish to invoke.\n\nFor an example on how to use the `focus-in` attribute, please reference the\nexample near the top of this file.",
|
|
14557
|
-
"itemtype": "method",
|
|
14558
|
-
"name": "focusIn",
|
|
14559
|
-
"params": [
|
|
14560
|
-
{
|
|
14561
|
-
"name": "event",
|
|
14562
|
-
"description": "",
|
|
14563
|
-
"type": "Event"
|
|
14564
|
-
}
|
|
14565
|
-
],
|
|
14566
|
-
"access": "private",
|
|
14567
|
-
"tagname": "",
|
|
14568
|
-
"class": "Ember.TextSupport",
|
|
14569
|
-
"module": "ember",
|
|
14570
|
-
"namespace": "Ember"
|
|
14571
|
-
},
|
|
14572
|
-
{
|
|
14573
|
-
"file": "packages/@ember/-internals/views/lib/mixins/text_support.js",
|
|
14574
|
-
"line": 243,
|
|
14575
|
-
"description": "Allows you to specify a controller action to invoke when a field loses\nfocus. To use this method, give your field a `focus-out` attribute. The value\nof that attribute should be the name of the action in your controller\nthat you wish to invoke.\n\nFor an example on how to use the `focus-out` attribute, please reference the\nexample near the top of this file.",
|
|
14576
|
-
"itemtype": "method",
|
|
14577
|
-
"name": "focusOut",
|
|
14578
|
-
"params": [
|
|
14579
|
-
{
|
|
14580
|
-
"name": "event",
|
|
14581
|
-
"description": "",
|
|
14582
|
-
"type": "Event"
|
|
14583
|
-
}
|
|
14584
|
-
],
|
|
14585
|
-
"access": "private",
|
|
14586
|
-
"tagname": "",
|
|
14587
|
-
"class": "Ember.TextSupport",
|
|
14588
|
-
"module": "ember",
|
|
14589
|
-
"namespace": "Ember"
|
|
14590
|
-
},
|
|
14591
|
-
{
|
|
14592
|
-
"file": "packages/@ember/-internals/views/lib/mixins/text_support.js",
|
|
14593
|
-
"line": 261,
|
|
14594
|
-
"description": "Allows you to specify a controller action to invoke when a key is pressed.\nTo use this method, give your field a `key-press` attribute. The value of\nthat attribute should be the name of the action in your controller you\nthat wish to invoke.\n\nFor an example on how to use the `key-press` attribute, please reference the\nexample near the top of this file.",
|
|
14595
|
-
"itemtype": "method",
|
|
14596
|
-
"name": "keyPress",
|
|
14597
|
-
"params": [
|
|
14598
|
-
{
|
|
14599
|
-
"name": "event",
|
|
14600
|
-
"description": "",
|
|
14601
|
-
"type": "Event"
|
|
14602
|
-
}
|
|
14603
|
-
],
|
|
14604
|
-
"access": "private",
|
|
14605
|
-
"tagname": "",
|
|
14606
|
-
"class": "Ember.TextSupport",
|
|
14607
|
-
"module": "ember",
|
|
14608
|
-
"namespace": "Ember"
|
|
14609
|
-
},
|
|
14610
|
-
{
|
|
14611
|
-
"file": "packages/@ember/-internals/views/lib/mixins/text_support.js",
|
|
14612
|
-
"line": 278,
|
|
14613
|
-
"description": "Allows you to specify a controller action to invoke when a key-up event is\nfired. To use this method, give your field a `key-up` attribute. The value\nof that attribute should be the name of the action in your controller\nthat you wish to invoke.\n\nFor an example on how to use the `key-up` attribute, please reference the\nexample near the top of this file.",
|
|
14614
|
-
"itemtype": "method",
|
|
14615
|
-
"name": "keyUp",
|
|
14616
|
-
"params": [
|
|
14617
|
-
{
|
|
14618
|
-
"name": "event",
|
|
14619
|
-
"description": "",
|
|
14620
|
-
"type": "Event"
|
|
14621
|
-
}
|
|
14622
|
-
],
|
|
14623
|
-
"access": "private",
|
|
14624
|
-
"tagname": "",
|
|
14625
|
-
"class": "Ember.TextSupport",
|
|
14626
|
-
"module": "ember",
|
|
14627
|
-
"namespace": "Ember"
|
|
14628
|
-
},
|
|
14629
|
-
{
|
|
14630
|
-
"file": "packages/@ember/-internals/views/lib/mixins/text_support.js",
|
|
14631
|
-
"line": 296,
|
|
14632
|
-
"description": "Allows you to specify a controller action to invoke when a key-down event is\nfired. To use this method, give your field a `key-down` attribute. The value\nof that attribute should be the name of the action in your controller that\nyou wish to invoke.\n\nFor an example on how to use the `key-down` attribute, please reference the\nexample near the top of this file.",
|
|
14633
|
-
"itemtype": "method",
|
|
14634
|
-
"name": "keyDown",
|
|
14635
|
-
"params": [
|
|
14636
|
-
{
|
|
14637
|
-
"name": "event",
|
|
14638
|
-
"description": "",
|
|
14639
|
-
"type": "Event"
|
|
14640
|
-
}
|
|
14641
|
-
],
|
|
14642
|
-
"access": "private",
|
|
14643
|
-
"tagname": "",
|
|
14644
|
-
"class": "Ember.TextSupport",
|
|
14645
|
-
"module": "ember",
|
|
14646
|
-
"namespace": "Ember"
|
|
14647
|
-
},
|
|
14648
13708
|
{
|
|
14649
13709
|
"file": "packages/@ember/-internals/views/lib/mixins/view_support.js",
|
|
14650
13710
|
"line": 12,
|
|
@@ -14736,8 +13796,8 @@
|
|
|
14736
13796
|
"params": [
|
|
14737
13797
|
{
|
|
14738
13798
|
"name": "A",
|
|
14739
|
-
"description": "selector, element, HTML string
|
|
14740
|
-
"type": "String|DOMElement
|
|
13799
|
+
"description": "selector, element, HTML string",
|
|
13800
|
+
"type": "String|DOMElement"
|
|
14741
13801
|
}
|
|
14742
13802
|
],
|
|
14743
13803
|
"return": {
|
|
@@ -14856,7 +13916,7 @@
|
|
|
14856
13916
|
{
|
|
14857
13917
|
"file": "packages/@ember/-internals/views/lib/mixins/view_support.js",
|
|
14858
13918
|
"line": 346,
|
|
14859
|
-
"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 `<div>` 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
|
|
13919
|
+
"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 `<div>` 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.",
|
|
14860
13920
|
"itemtype": "property",
|
|
14861
13921
|
"name": "tagName",
|
|
14862
13922
|
"type": "String",
|
|
@@ -15220,7 +14280,7 @@
|
|
|
15220
14280
|
{
|
|
15221
14281
|
"file": "packages/@ember/application/lib/application.js",
|
|
15222
14282
|
"line": 185,
|
|
15223
|
-
"description": "The root DOM element of the Application. This can be specified as an\nelement or a
|
|
14283
|
+
"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.",
|
|
15224
14284
|
"itemtype": "property",
|
|
15225
14285
|
"name": "rootElement",
|
|
15226
14286
|
"type": "DOMElement",
|
|
@@ -15232,7 +14292,7 @@
|
|
|
15232
14292
|
},
|
|
15233
14293
|
{
|
|
15234
14294
|
"file": "packages/@ember/application/lib/application.js",
|
|
15235
|
-
"line":
|
|
14295
|
+
"line": 200,
|
|
15236
14296
|
"itemtype": "property",
|
|
15237
14297
|
"name": "_document",
|
|
15238
14298
|
"type": "Document | null",
|
|
@@ -15244,7 +14304,7 @@
|
|
|
15244
14304
|
},
|
|
15245
14305
|
{
|
|
15246
14306
|
"file": "packages/@ember/application/lib/application.js",
|
|
15247
|
-
"line":
|
|
14307
|
+
"line": 209,
|
|
15248
14308
|
"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.",
|
|
15249
14309
|
"itemtype": "property",
|
|
15250
14310
|
"name": "eventDispatcher",
|
|
@@ -15257,7 +14317,7 @@
|
|
|
15257
14317
|
},
|
|
15258
14318
|
{
|
|
15259
14319
|
"file": "packages/@ember/application/lib/application.js",
|
|
15260
|
-
"line":
|
|
14320
|
+
"line": 226,
|
|
15261
14321
|
"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```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```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```",
|
|
15262
14322
|
"itemtype": "property",
|
|
15263
14323
|
"name": "customEvents",
|
|
@@ -15270,7 +14330,7 @@
|
|
|
15270
14330
|
},
|
|
15271
14331
|
{
|
|
15272
14332
|
"file": "packages/@ember/application/lib/application.js",
|
|
15273
|
-
"line":
|
|
14333
|
+
"line": 274,
|
|
15274
14334
|
"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.",
|
|
15275
14335
|
"itemtype": "property",
|
|
15276
14336
|
"name": "autoboot",
|
|
@@ -15283,7 +14343,7 @@
|
|
|
15283
14343
|
},
|
|
15284
14344
|
{
|
|
15285
14345
|
"file": "packages/@ember/application/lib/application.js",
|
|
15286
|
-
"line":
|
|
14346
|
+
"line": 288,
|
|
15287
14347
|
"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).",
|
|
15288
14348
|
"itemtype": "property",
|
|
15289
14349
|
"name": "_globalsMode",
|
|
@@ -15296,7 +14356,7 @@
|
|
|
15296
14356
|
},
|
|
15297
14357
|
{
|
|
15298
14358
|
"file": "packages/@ember/application/lib/application.js",
|
|
15299
|
-
"line":
|
|
14359
|
+
"line": 337,
|
|
15300
14360
|
"description": "An array of application instances created by `buildInstance()`. Used\ninternally to ensure that all instances get destroyed.",
|
|
15301
14361
|
"itemtype": "property",
|
|
15302
14362
|
"name": "_applicationInstances",
|
|
@@ -15309,7 +14369,7 @@
|
|
|
15309
14369
|
},
|
|
15310
14370
|
{
|
|
15311
14371
|
"file": "packages/@ember/application/lib/application.js",
|
|
15312
|
-
"line":
|
|
14372
|
+
"line": 377,
|
|
15313
14373
|
"description": "Create an ApplicationInstance for this application.",
|
|
15314
14374
|
"access": "public",
|
|
15315
14375
|
"tagname": "",
|
|
@@ -15324,7 +14384,7 @@
|
|
|
15324
14384
|
},
|
|
15325
14385
|
{
|
|
15326
14386
|
"file": "packages/@ember/application/lib/application.js",
|
|
15327
|
-
"line":
|
|
14387
|
+
"line": 400,
|
|
15328
14388
|
"description": "Start tracking an ApplicationInstance for this application.\nUsed when the ApplicationInstance is created.",
|
|
15329
14389
|
"access": "private",
|
|
15330
14390
|
"tagname": "",
|
|
@@ -15335,7 +14395,7 @@
|
|
|
15335
14395
|
},
|
|
15336
14396
|
{
|
|
15337
14397
|
"file": "packages/@ember/application/lib/application.js",
|
|
15338
|
-
"line":
|
|
14398
|
+
"line": 411,
|
|
15339
14399
|
"description": "Stop tracking an ApplicationInstance for this application.\nUsed when the ApplicationInstance is about to be destroyed.",
|
|
15340
14400
|
"access": "private",
|
|
15341
14401
|
"tagname": "",
|
|
@@ -15346,7 +14406,7 @@
|
|
|
15346
14406
|
},
|
|
15347
14407
|
{
|
|
15348
14408
|
"file": "packages/@ember/application/lib/application.js",
|
|
15349
|
-
"line":
|
|
14409
|
+
"line": 422,
|
|
15350
14410
|
"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.",
|
|
15351
14411
|
"access": "private",
|
|
15352
14412
|
"tagname": "",
|
|
@@ -15357,7 +14417,7 @@
|
|
|
15357
14417
|
},
|
|
15358
14418
|
{
|
|
15359
14419
|
"file": "packages/@ember/application/lib/application.js",
|
|
15360
|
-
"line":
|
|
14420
|
+
"line": 466,
|
|
15361
14421
|
"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.",
|
|
15362
14422
|
"access": "private",
|
|
15363
14423
|
"tagname": "",
|
|
@@ -15368,7 +14428,7 @@
|
|
|
15368
14428
|
},
|
|
15369
14429
|
{
|
|
15370
14430
|
"file": "packages/@ember/application/lib/application.js",
|
|
15371
|
-
"line":
|
|
14431
|
+
"line": 493,
|
|
15372
14432
|
"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()`.",
|
|
15373
14433
|
"access": "private",
|
|
15374
14434
|
"tagname": "",
|
|
@@ -15379,8 +14439,8 @@
|
|
|
15379
14439
|
},
|
|
15380
14440
|
{
|
|
15381
14441
|
"file": "packages/@ember/application/lib/application.js",
|
|
15382
|
-
"line":
|
|
15383
|
-
"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\
|
|
14442
|
+
"line": 538,
|
|
14443
|
+
"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.",
|
|
15384
14444
|
"itemtype": "method",
|
|
15385
14445
|
"name": "deferReadiness",
|
|
15386
14446
|
"access": "public",
|
|
@@ -15390,7 +14450,7 @@
|
|
|
15390
14450
|
},
|
|
15391
14451
|
{
|
|
15392
14452
|
"file": "packages/@ember/application/lib/application.js",
|
|
15393
|
-
"line":
|
|
14453
|
+
"line": 588,
|
|
15394
14454
|
"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.",
|
|
15395
14455
|
"itemtype": "method",
|
|
15396
14456
|
"name": "advanceReadiness",
|
|
@@ -15404,7 +14464,7 @@
|
|
|
15404
14464
|
},
|
|
15405
14465
|
{
|
|
15406
14466
|
"file": "packages/@ember/application/lib/application.js",
|
|
15407
|
-
"line":
|
|
14467
|
+
"line": 625,
|
|
15408
14468
|
"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`.",
|
|
15409
14469
|
"access": "public",
|
|
15410
14470
|
"tagname": "",
|
|
@@ -15419,7 +14479,7 @@
|
|
|
15419
14479
|
},
|
|
15420
14480
|
{
|
|
15421
14481
|
"file": "packages/@ember/application/lib/application.js",
|
|
15422
|
-
"line":
|
|
14482
|
+
"line": 663,
|
|
15423
14483
|
"description": "Unfortunately, a lot of existing code assumes the booting process is\n\"synchronous\". Specifically, a lot of tests assumes the last call to\n`app.advanceReadiness()` or `app.reset()` will result in the app being\nfully-booted when the current runloop completes.\n\nWe would like new code (like the `visit` API) to stop making this assumption,\nso we created the asynchronous version above that returns a promise. But until\nwe have migrated all the code, we would have to expose this method for use\n*internally* in places where we need to boot an app \"synchronously\".",
|
|
15424
14484
|
"access": "private",
|
|
15425
14485
|
"tagname": "",
|
|
@@ -15428,7 +14488,7 @@
|
|
|
15428
14488
|
},
|
|
15429
14489
|
{
|
|
15430
14490
|
"file": "packages/@ember/application/lib/application.js",
|
|
15431
|
-
"line":
|
|
14491
|
+
"line": 702,
|
|
15432
14492
|
"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```",
|
|
15433
14493
|
"itemtype": "method",
|
|
15434
14494
|
"name": "reset",
|
|
@@ -15439,7 +14499,7 @@
|
|
|
15439
14499
|
},
|
|
15440
14500
|
{
|
|
15441
14501
|
"file": "packages/@ember/application/lib/application.js",
|
|
15442
|
-
"line":
|
|
14502
|
+
"line": 805,
|
|
15443
14503
|
"access": "private",
|
|
15444
14504
|
"tagname": "",
|
|
15445
14505
|
"itemtype": "method",
|
|
@@ -15449,7 +14509,7 @@
|
|
|
15449
14509
|
},
|
|
15450
14510
|
{
|
|
15451
14511
|
"file": "packages/@ember/application/lib/application.js",
|
|
15452
|
-
"line":
|
|
14512
|
+
"line": 855,
|
|
15453
14513
|
"description": "Called when the Application has become ready, immediately before routing\nbegins. The call will be delayed until the DOM has become ready.",
|
|
15454
14514
|
"itemtype": "event",
|
|
15455
14515
|
"name": "ready",
|
|
@@ -15460,8 +14520,8 @@
|
|
|
15460
14520
|
},
|
|
15461
14521
|
{
|
|
15462
14522
|
"file": "packages/@ember/application/lib/application.js",
|
|
15463
|
-
"line":
|
|
15464
|
-
"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 access
|
|
14523
|
+
"line": 880,
|
|
14524
|
+
"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```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```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```",
|
|
15465
14525
|
"access": "public",
|
|
15466
14526
|
"tagname": "",
|
|
15467
14527
|
"itemtype": "method",
|
|
@@ -15487,7 +14547,7 @@
|
|
|
15487
14547
|
},
|
|
15488
14548
|
{
|
|
15489
14549
|
"file": "packages/@ember/application/lib/application.js",
|
|
15490
|
-
"line":
|
|
14550
|
+
"line": 1101,
|
|
15491
14551
|
"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",
|
|
15492
14552
|
"itemtype": "method",
|
|
15493
14553
|
"name": "buildRegistry",
|
|
@@ -15814,7 +14874,7 @@
|
|
|
15814
14874
|
},
|
|
15815
14875
|
{
|
|
15816
14876
|
"file": "packages/@ember/canary-features/index.ts",
|
|
15817
|
-
"line":
|
|
14877
|
+
"line": 37,
|
|
15818
14878
|
"description": "Determine whether the specified `feature` is enabled. Used by Ember's\nbuild tools to exclude experimental features from beta/stable builds.\n\nYou can define the following configuration options:\n\n* `EmberENV.ENABLE_OPTIONAL_FEATURES` - enable any features that have not been explicitly\n enabled/disabled.",
|
|
15819
14879
|
"itemtype": "method",
|
|
15820
14880
|
"name": "isEnabled",
|
|
@@ -16169,7 +15229,7 @@
|
|
|
16169
15229
|
{
|
|
16170
15230
|
"file": "packages/@ember/destroyable/index.ts",
|
|
16171
15231
|
"line": 31,
|
|
16172
|
-
"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() {\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.",
|
|
15232
|
+
"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.",
|
|
16173
15233
|
"itemtype": "method",
|
|
16174
15234
|
"name": "associateDestroyableChild",
|
|
16175
15235
|
"params": [
|
|
@@ -16196,7 +15256,7 @@
|
|
|
16196
15256
|
},
|
|
16197
15257
|
{
|
|
16198
15258
|
"file": "packages/@ember/destroyable/index.ts",
|
|
16199
|
-
"line":
|
|
15259
|
+
"line": 58,
|
|
16200
15260
|
"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 ```",
|
|
16201
15261
|
"itemtype": "method",
|
|
16202
15262
|
"name": "isDestroying",
|
|
@@ -16219,7 +15279,7 @@
|
|
|
16219
15279
|
},
|
|
16220
15280
|
{
|
|
16221
15281
|
"file": "packages/@ember/destroyable/index.ts",
|
|
16222
|
-
"line":
|
|
15282
|
+
"line": 80,
|
|
16223
15283
|
"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```",
|
|
16224
15284
|
"itemtype": "method",
|
|
16225
15285
|
"name": "isDestroyed",
|
|
@@ -16242,7 +15302,7 @@
|
|
|
16242
15302
|
},
|
|
16243
15303
|
{
|
|
16244
15304
|
"file": "packages/@ember/destroyable/index.ts",
|
|
16245
|
-
"line":
|
|
15305
|
+
"line": 103,
|
|
16246
15306
|
"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.",
|
|
16247
15307
|
"itemtype": "method",
|
|
16248
15308
|
"name": "destroy",
|
|
@@ -16261,7 +15321,7 @@
|
|
|
16261
15321
|
},
|
|
16262
15322
|
{
|
|
16263
15323
|
"file": "packages/@ember/destroyable/index.ts",
|
|
16264
|
-
"line":
|
|
15324
|
+
"line": 138,
|
|
16265
15325
|
"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.",
|
|
16266
15326
|
"itemtype": "method",
|
|
16267
15327
|
"name": "assertDestroyablesDestroyed",
|
|
@@ -16273,7 +15333,7 @@
|
|
|
16273
15333
|
},
|
|
16274
15334
|
{
|
|
16275
15335
|
"file": "packages/@ember/destroyable/index.ts",
|
|
16276
|
-
"line":
|
|
15336
|
+
"line": 152,
|
|
16277
15337
|
"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.",
|
|
16278
15338
|
"itemtype": "method",
|
|
16279
15339
|
"name": "enableDestroyableTracking",
|
|
@@ -16285,8 +15345,8 @@
|
|
|
16285
15345
|
},
|
|
16286
15346
|
{
|
|
16287
15347
|
"file": "packages/@ember/destroyable/index.ts",
|
|
16288
|
-
"line":
|
|
16289
|
-
"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 { registerDestructor } from '@ember/destroyable';\n\nclass Modal extends Component {\n @service resize;\n\n constructor() {\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 { 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() {\n this.resize.register(this, this.layout);\n\n registerDestructor(this, unregisterResize);\n }\n}\n```",
|
|
15348
|
+
"line": 164,
|
|
15349
|
+
"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```",
|
|
16290
15350
|
"itemtype": "method",
|
|
16291
15351
|
"name": "registerDestructor",
|
|
16292
15352
|
"params": [
|
|
@@ -16309,8 +15369,8 @@
|
|
|
16309
15369
|
},
|
|
16310
15370
|
{
|
|
16311
15371
|
"file": "packages/@ember/destroyable/index.ts",
|
|
16312
|
-
"line":
|
|
16313
|
-
"description": "Receives a destroyable and a destructor function, and de-associates the destructor\nfrom the destroyable.\n\n```js\nimport { registerDestructor, unregisterDestructor } from '@ember/destroyable';\n\nclass Modal extends Component {\n @service modals;\n\n constructor() {\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```",
|
|
15372
|
+
"line": 229,
|
|
15373
|
+
"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```",
|
|
16314
15374
|
"itemtype": "method",
|
|
16315
15375
|
"name": "unregisterDestructor",
|
|
16316
15376
|
"params": [
|
|
@@ -16491,7 +15551,7 @@
|
|
|
16491
15551
|
{
|
|
16492
15552
|
"file": "packages/@ember/engine/index.js",
|
|
16493
15553
|
"line": 305,
|
|
16494
|
-
"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```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```app/initializer/preload-data.js\
|
|
15554
|
+
"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```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```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```",
|
|
16495
15555
|
"itemtype": "method",
|
|
16496
15556
|
"name": "instanceInitializer",
|
|
16497
15557
|
"params": [
|
|
@@ -16507,7 +15567,7 @@
|
|
|
16507
15567
|
},
|
|
16508
15568
|
{
|
|
16509
15569
|
"file": "packages/@ember/engine/index.js",
|
|
16510
|
-
"line":
|
|
15570
|
+
"line": 378,
|
|
16511
15571
|
"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",
|
|
16512
15572
|
"itemtype": "method",
|
|
16513
15573
|
"name": "buildRegistry",
|
|
@@ -16530,7 +15590,7 @@
|
|
|
16530
15590
|
},
|
|
16531
15591
|
{
|
|
16532
15592
|
"file": "packages/@ember/engine/index.js",
|
|
16533
|
-
"line":
|
|
15593
|
+
"line": 418,
|
|
16534
15594
|
"description": "Set this to provide an alternate class to `DefaultResolver`",
|
|
16535
15595
|
"itemtype": "property",
|
|
16536
15596
|
"name": "resolver",
|
|
@@ -16541,7 +15601,7 @@
|
|
|
16541
15601
|
},
|
|
16542
15602
|
{
|
|
16543
15603
|
"file": "packages/@ember/engine/index.js",
|
|
16544
|
-
"line":
|
|
15604
|
+
"line": 427,
|
|
16545
15605
|
"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.",
|
|
16546
15606
|
"access": "private",
|
|
16547
15607
|
"tagname": "",
|
|
@@ -18237,7 +17297,6 @@
|
|
|
18237
17297
|
{
|
|
18238
17298
|
"file": "packages/@ember/service/index.js",
|
|
18239
17299
|
"line": 9,
|
|
18240
|
-
"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```app/routes/application.js\nimport Route from '@ember/routing/route';\nimport { inject as 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```app/routes/application.js\nimport Route from '@ember/routing/route';\nimport { inject as 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.",
|
|
18241
17300
|
"itemtype": "method",
|
|
18242
17301
|
"name": "inject",
|
|
18243
17302
|
"static": 1,
|
|
@@ -18258,6 +17317,30 @@
|
|
|
18258
17317
|
"class": "@ember/service",
|
|
18259
17318
|
"module": "@ember/service"
|
|
18260
17319
|
},
|
|
17320
|
+
{
|
|
17321
|
+
"file": "packages/@ember/service/index.js",
|
|
17322
|
+
"line": 23,
|
|
17323
|
+
"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```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```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.",
|
|
17324
|
+
"itemtype": "method",
|
|
17325
|
+
"name": "service",
|
|
17326
|
+
"static": 1,
|
|
17327
|
+
"since": "4.1.0",
|
|
17328
|
+
"params": [
|
|
17329
|
+
{
|
|
17330
|
+
"name": "name",
|
|
17331
|
+
"description": "(optional) name of the service to inject, defaults to\n the property's name",
|
|
17332
|
+
"type": "String"
|
|
17333
|
+
}
|
|
17334
|
+
],
|
|
17335
|
+
"return": {
|
|
17336
|
+
"description": "injection decorator instance",
|
|
17337
|
+
"type": "ComputedDecorator"
|
|
17338
|
+
},
|
|
17339
|
+
"access": "public",
|
|
17340
|
+
"tagname": "",
|
|
17341
|
+
"class": "@ember/service",
|
|
17342
|
+
"module": "@ember/service"
|
|
17343
|
+
},
|
|
18261
17344
|
{
|
|
18262
17345
|
"file": "packages/@ember/string/index.ts",
|
|
18263
17346
|
"line": 80,
|
|
@@ -18911,10 +17994,6 @@
|
|
|
18911
17994
|
"message": "replacing incorrect tag: returns with return",
|
|
18912
17995
|
"line": " packages/@ember/-internals/container/lib/container.ts:191"
|
|
18913
17996
|
},
|
|
18914
|
-
{
|
|
18915
|
-
"message": "unknown tag: decorator",
|
|
18916
|
-
"line": " packages/@ember/-internals/metal/lib/cached.ts:8"
|
|
18917
|
-
},
|
|
18918
17997
|
{
|
|
18919
17998
|
"message": "unknown tag: decorator",
|
|
18920
17999
|
"line": " packages/@ember/-internals/metal/lib/tracked.ts:16"
|
|
@@ -18929,7 +18008,7 @@
|
|
|
18929
18008
|
},
|
|
18930
18009
|
{
|
|
18931
18010
|
"message": "replacing incorrect tag: returns with return",
|
|
18932
|
-
"line": " packages/@ember/-internals/routing/lib/system/route.ts:
|
|
18011
|
+
"line": " packages/@ember/-internals/routing/lib/system/route.ts:2327"
|
|
18933
18012
|
},
|
|
18934
18013
|
{
|
|
18935
18014
|
"message": "replacing incorrect tag: function with method",
|
|
@@ -18941,11 +18020,11 @@
|
|
|
18941
18020
|
},
|
|
18942
18021
|
{
|
|
18943
18022
|
"message": "replacing incorrect tag: returns with return",
|
|
18944
|
-
"line": " packages/@ember/destroyable/index.ts:
|
|
18023
|
+
"line": " packages/@ember/destroyable/index.ts:58"
|
|
18945
18024
|
},
|
|
18946
18025
|
{
|
|
18947
18026
|
"message": "replacing incorrect tag: returns with return",
|
|
18948
|
-
"line": " packages/@ember/destroyable/index.ts:
|
|
18027
|
+
"line": " packages/@ember/destroyable/index.ts:80"
|
|
18949
18028
|
},
|
|
18950
18029
|
{
|
|
18951
18030
|
"message": "replacing incorrect tag: returns with return",
|
|
@@ -18957,23 +18036,23 @@
|
|
|
18957
18036
|
},
|
|
18958
18037
|
{
|
|
18959
18038
|
"message": "Missing item type\nThe `change` and `input` actions need to be overridden in the `Input`\nsubclass. Unfortunately, some ember-source builds currently uses babel\nloose mode to transpile its classes. Having the `@action` decorator on the\nsuper class creates a getter on the prototype, and when the subclass\noverrides the method, the loose mode transpilation would emit something\nlike `Subclass.prototype['change'] = function change() { ... }`, which\nfails because `prototype['change']` is getter-only/readonly. The correct\nsolution is to use `Object.defineProperty(prototype, 'change', ...)` but\nthat requires disabling loose mode. For now, the workaround is to add the\ndecorator only on the subclass. This is more of a configuration issue on\nour own builds and doesn't really affect apps.",
|
|
18960
|
-
"line": " packages/@ember/-internals/glimmer/lib/components/abstract-input.ts:
|
|
18039
|
+
"line": " packages/@ember/-internals/glimmer/lib/components/abstract-input.ts:125"
|
|
18961
18040
|
},
|
|
18962
18041
|
{
|
|
18963
18042
|
"message": "Missing item type\nThe HTML class attribute.",
|
|
18964
|
-
"line": " packages/@ember/-internals/glimmer/lib/components/input.ts:
|
|
18043
|
+
"line": " packages/@ember/-internals/glimmer/lib/components/input.ts:183"
|
|
18965
18044
|
},
|
|
18966
18045
|
{
|
|
18967
18046
|
"message": "Missing item type\nThe HTML type attribute.",
|
|
18968
|
-
"line": " packages/@ember/-internals/glimmer/lib/components/input.ts:
|
|
18047
|
+
"line": " packages/@ember/-internals/glimmer/lib/components/input.ts:194"
|
|
18969
18048
|
},
|
|
18970
18049
|
{
|
|
18971
18050
|
"message": "Missing item type\nThe default HTML id attribute. We don't really _need_ one, this is just\nadded for compatibility as it's hard to tell if people rely on it being\npresent, and it doens't really hurt.\n\nHowever, don't rely on this internally, like passing it to `getElementId`.\nThis can be (and often is) overriden by passing an `id` attribute on the\ninvocation, which shadows this default id via `...attributes`.",
|
|
18972
|
-
"line": " packages/@ember/-internals/glimmer/lib/components/internal.ts:
|
|
18051
|
+
"line": " packages/@ember/-internals/glimmer/lib/components/internal.ts:37"
|
|
18973
18052
|
},
|
|
18974
18053
|
{
|
|
18975
18054
|
"message": "Missing item type\nThe default HTML class attribute. Similar to the above, we don't _need_\nthem, they are just added for compatibility as it's similarly hard to tell\nif people rely on it in their CSS etc, and it doens't really hurt.",
|
|
18976
|
-
"line": " packages/@ember/-internals/glimmer/lib/components/internal.ts:
|
|
18055
|
+
"line": " packages/@ember/-internals/glimmer/lib/components/internal.ts:50"
|
|
18977
18056
|
},
|
|
18978
18057
|
{
|
|
18979
18058
|
"message": "Missing item type\nThis reference is used to get the `[]` tag of iterables, so we can trigger\nupdates to `{{each}}` when it changes. It is put into place by a template\ntransform at build time, similar to the (-each-in) helper",
|
|
@@ -19027,10 +18106,6 @@
|
|
|
19027
18106
|
"message": "Missing item type\nFlattening is based on a global revision counter. If the revision has\nbumped it means that somewhere in a class inheritance chain something has\nchanged, so we need to reflatten everything. This can only happen if:\n\n1. A meta has been flattened (listener has been called)\n2. The meta is a prototype meta with children who have inherited its\n listeners\n3. A new listener is subsequently added to the meta (e.g. via `.reopen()`)\n\nThis is a very rare occurrence, so while the counter is global it shouldn't\nbe updated very often in practice.",
|
|
19028
18107
|
"line": " packages/@ember/-internals/meta/lib/meta.ts:435"
|
|
19029
18108
|
},
|
|
19030
|
-
{
|
|
19031
|
-
"message": "Missing item type",
|
|
19032
|
-
"line": " packages/@ember/-internals/metal/lib/cached.ts:8"
|
|
19033
|
-
},
|
|
19034
18109
|
{
|
|
19035
18110
|
"message": "Missing item type\nPrimarily used for cases where we are redefining a class, e.g. mixins/reopen\nbeing applied later. Revalidates all the observers, resetting their tags.",
|
|
19036
18111
|
"line": " packages/@ember/-internals/metal/lib/observer.ts:154"
|
|
@@ -19069,15 +18144,15 @@
|
|
|
19069
18144
|
},
|
|
19070
18145
|
{
|
|
19071
18146
|
"message": "Missing item type\nFinds the name of the substate route if it exists for the given route. A\nsubstate route is of the form `route_state`, such as `foo_loading`.",
|
|
19072
|
-
"line": " packages/@ember/-internals/routing/lib/system/router.ts:
|
|
18147
|
+
"line": " packages/@ember/-internals/routing/lib/system/router.ts:1579"
|
|
19073
18148
|
},
|
|
19074
18149
|
{
|
|
19075
18150
|
"message": "Missing item type\nFinds the name of the state route if it exists for the given route. A state\nroute is of the form `route.state`, such as `foo.loading`. Properly Handles\n`application` named routes.",
|
|
19076
|
-
"line": " packages/@ember/-internals/routing/lib/system/router.ts:
|
|
18151
|
+
"line": " packages/@ember/-internals/routing/lib/system/router.ts:1598"
|
|
19077
18152
|
},
|
|
19078
18153
|
{
|
|
19079
18154
|
"message": "Missing item type\nDetermines whether or not a route has been defined by checking that the route\nis in the Router's map and the owner has a registration for that route.",
|
|
19080
|
-
"line": " packages/@ember/-internals/routing/lib/system/router.ts:
|
|
18155
|
+
"line": " packages/@ember/-internals/routing/lib/system/router.ts:1618"
|
|
19081
18156
|
},
|
|
19082
18157
|
{
|
|
19083
18158
|
"message": "Missing item type",
|
|
@@ -19216,12 +18291,12 @@
|
|
|
19216
18291
|
"line": " packages/@ember/-internals/runtime/types/observable.d.ts:67"
|
|
19217
18292
|
},
|
|
19218
18293
|
{
|
|
19219
|
-
"message": "Missing item type
|
|
18294
|
+
"message": "Missing item type",
|
|
19220
18295
|
"line": " packages/@ember/-internals/utils/lib/guid.ts:8"
|
|
19221
18296
|
},
|
|
19222
18297
|
{
|
|
19223
18298
|
"message": "Missing item type\nGenerates a universally unique identifier. This method\nis used internally by Ember for assisting with\nthe generation of GUID's and other unique identifiers.",
|
|
19224
|
-
"line": " packages/@ember/-internals/utils/lib/guid.ts:
|
|
18299
|
+
"line": " packages/@ember/-internals/utils/lib/guid.ts:14"
|
|
19225
18300
|
},
|
|
19226
18301
|
{
|
|
19227
18302
|
"message": "Missing item type\nStrongly hint runtimes to intern the provided string.\n\nWhen do I need to use this function?\n\nFor the most part, never. Pre-mature optimization is bad, and often the\nruntime does exactly what you need it to, and more often the trade-off isn't\nworth it.\n\nWhy?\n\nRuntimes store strings in at least 2 different representations:\nRopes and Symbols (interned strings). The Rope provides a memory efficient\ndata-structure for strings created from concatenation or some other string\nmanipulation like splitting.\n\nUnfortunately checking equality of different ropes can be quite costly as\nruntimes must resort to clever string comparison algorithms. These\nalgorithms typically cost in proportion to the length of the string.\nLuckily, this is where the Symbols (interned strings) shine. As Symbols are\nunique by their string content, equality checks can be done by pointer\ncomparison.\n\nHow do I know if my string is a rope or symbol?\n\nTypically (warning general sweeping statement, but truthy in runtimes at\npresent) static strings created as part of the JS source are interned.\nStrings often used for comparisons can be interned at runtime if some\ncriteria are met. One of these criteria can be the size of the entire rope.\nFor example, in chrome 38 a rope longer then 12 characters will not\nintern, nor will segments of that rope.\n\nSome numbers: http://jsperf.com/eval-vs-keys/8\n\nKnown Trick™",
|
|
@@ -19229,7 +18304,7 @@
|
|
|
19229
18304
|
},
|
|
19230
18305
|
{
|
|
19231
18306
|
"message": "Missing item type\nUnfortunately, a lot of existing code assumes the booting process is\n\"synchronous\". Specifically, a lot of tests assumes the last call to\n`app.advanceReadiness()` or `app.reset()` will result in the app being\nfully-booted when the current runloop completes.\n\nWe would like new code (like the `visit` API) to stop making this assumption,\nso we created the asynchronous version above that returns a promise. But until\nwe have migrated all the code, we would have to expose this method for use\n*internally* in places where we need to boot an app \"synchronously\".",
|
|
19232
|
-
"line": " packages/@ember/application/lib/application.js:
|
|
18307
|
+
"line": " packages/@ember/application/lib/application.js:663"
|
|
19233
18308
|
},
|
|
19234
18309
|
{
|
|
19235
18310
|
"message": "Missing item type\nOverrides the base `EngineInstance._bootSync` method with concerns relevant\nto booting application (instead of engine) instances.\n\nThis method should only contain synchronous boot concerns. Asynchronous\nboot concerns should eventually be moved to the `boot` method, which\nreturns a promise.\n\nUntil all boot code has been made asynchronous, we need to continue to\nexpose this method for use *internally* in places where we need to boot an\ninstance synchronously.",
|