ember-source 4.3.0-beta.1 → 4.4.0-alpha.3
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/blueprints/acceptance-test/mocha-files/tests/acceptance/__name__-test.js +4 -4
- package/blueprints/acceptance-test/mocha-rfc-232-files/tests/acceptance/__name__-test.js +2 -2
- package/blueprints/acceptance-test/qunit-files/tests/acceptance/__name__-test.js +2 -2
- package/blueprints/acceptance-test/qunit-rfc-232-files/tests/acceptance/__name__-test.js +2 -2
- package/blueprints/component/index.js +2 -2
- package/blueprints/component-class/index.js +2 -2
- package/blueprints/component-test/mocha-0.12-files/__root__/__testType__/__path__/__test__.js +4 -4
- package/blueprints/component-test/mocha-files/__root__/__testType__/__path__/__test__.js +7 -5
- package/blueprints/component-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js +4 -4
- package/blueprints/component-test/qunit-files/__root__/__testType__/__path__/__test__.js +4 -4
- package/blueprints/component-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +4 -4
- package/blueprints/controller/files/__root__/__path__/__name__.js +1 -2
- package/blueprints/controller-test/mocha-0.12-files/__root__/__testType__/__path__/__test__.js +2 -2
- package/blueprints/controller-test/mocha-files/__root__/__testType__/__path__/__test__.js +5 -3
- package/blueprints/controller-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js +2 -2
- package/blueprints/controller-test/qunit-files/__root__/__testType__/__path__/__test__.js +1 -1
- package/blueprints/controller-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +2 -2
- package/blueprints/helper/files/__root__/__collection__/__name__.js +1 -1
- package/blueprints/helper/mu-files/__root__/__collection__/__name__.js +1 -1
- package/blueprints/helper-test/mocha-0.12-files/__root__/__testType__/__collection__/__name__-test.js +3 -3
- package/blueprints/helper-test/mocha-files/__root__/__testType__/__collection__/__name__-test.js +6 -4
- package/blueprints/helper-test/mocha-rfc-232-files/__root__/__testType__/__collection__/__name__-test.js +2 -2
- package/blueprints/helper-test/qunit-files/__root__/__testType__/__collection__/__name__-test.js +2 -2
- package/blueprints/helper-test/qunit-rfc-232-files/__root__/__testType__/__collection__/__name__-test.js +2 -2
- package/blueprints/initializer/files/__root__/initializers/__name__.js +2 -3
- package/blueprints/initializer-test/mocha-files/__root__/__testType__/__path__/__name__-test.js +6 -7
- package/blueprints/initializer-test/mocha-rfc-232-files/__root__/__testType__/__path__/__name__-test.js +5 -5
- package/blueprints/initializer-test/qunit-files/__root__/__testType__/__path__/__name__-test.js +3 -4
- package/blueprints/instance-initializer/files/__root__/instance-initializers/__name__.js +2 -3
- package/blueprints/instance-initializer-test/mocha-files/__root__/__testType__/__path__/__name__-test.js +5 -5
- package/blueprints/instance-initializer-test/mocha-rfc-232-files/__root__/__testType__/__path__/__name__-test.js +5 -5
- package/blueprints/instance-initializer-test/qunit-files/__root__/__testType__/__path__/__name__-test.js +2 -2
- package/blueprints/mixin/files/__root__/mixins/__name__.js +1 -2
- package/blueprints/mixin-test/mocha-files/__root__/__testType__/__name__-test.js +2 -2
- package/blueprints/mixin-test/mocha-rfc-232-files/__root__/__testType__/__name__-test.js +2 -2
- package/blueprints/mixin-test/qunit-files/__root__/__testType__/__name__-test.js +1 -1
- package/blueprints/mixin-test/qunit-rfc-232-files/__root__/__testType__/__name__-test.js +1 -1
- package/blueprints/route/files/__root__/__path__/__name__.js +2 -2
- package/blueprints/route-test/mocha-0.12-files/__root__/__testType__/__path__/__test__.js +2 -2
- package/blueprints/route-test/mocha-files/__root__/__testType__/__path__/__test__.js +5 -3
- package/blueprints/route-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js +2 -2
- package/blueprints/route-test/qunit-files/__root__/__testType__/__path__/__test__.js +1 -1
- package/blueprints/route-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +2 -2
- package/blueprints/service/files/__root__/__path__/__name__.js +1 -2
- package/blueprints/service-test/mocha-0.12-files/__root__/__testType__/__path__/__test__.js +2 -2
- package/blueprints/service-test/mocha-files/__root__/__testType__/__path__/__test__.js +5 -3
- package/blueprints/service-test/mocha-rfc-232-files/__root__/__testType__/__path__/__test__.js +2 -2
- package/blueprints/service-test/qunit-files/__root__/__testType__/__path__/__test__.js +1 -1
- package/blueprints/service-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +2 -2
- package/blueprints/util-test/mocha-files/__root__/__testType__/__name__-test.js +2 -2
- package/blueprints/util-test/mocha-rfc-232-files/__root__/__testType__/__name__-test.js +2 -2
- package/blueprints/util-test/qunit-files/__root__/__testType__/__name__-test.js +1 -1
- package/blueprints/util-test/qunit-rfc-232-files/__root__/__testType__/__name__-test.js +2 -3
- package/build-metadata.json +3 -3
- package/dist/dependencies/router_js.js +1 -1
- package/dist/ember-template-compiler.js +17 -144
- package/dist/ember-template-compiler.map +1 -1
- package/dist/ember-testing.js +4 -2
- package/dist/ember-testing.map +1 -1
- package/dist/ember.debug.js +843 -772
- package/dist/ember.debug.map +1 -1
- package/dist/header/license.js +1 -1
- package/dist/packages/@ember/-internals/container/index.js +3 -3
- package/dist/packages/@ember/-internals/glimmer/index.js +55 -29
- package/dist/packages/@ember/-internals/metal/index.js +18 -28
- package/dist/packages/@ember/-internals/routing/lib/location/hash_location.js +1 -1
- package/dist/packages/@ember/-internals/routing/lib/services/router.js +67 -12
- package/dist/packages/@ember/-internals/routing/lib/services/routing.js +2 -0
- package/dist/packages/@ember/-internals/routing/lib/system/generate_controller.js +3 -1
- package/dist/packages/@ember/-internals/routing/lib/system/route.js +16 -9
- package/dist/packages/@ember/-internals/routing/lib/system/router.js +15 -20
- package/dist/packages/@ember/-internals/routing/lib/utils.js +2 -1
- package/dist/packages/@ember/-internals/runtime/lib/compare.js +19 -5
- package/dist/packages/@ember/-internals/runtime/lib/mixins/comparable.js +4 -4
- package/dist/packages/@ember/-internals/runtime/lib/mixins/container_proxy.js +29 -29
- package/dist/packages/@ember/-internals/runtime/lib/mixins/registry_proxy.js +51 -50
- package/dist/packages/@ember/-internals/utils/index.js +1 -1
- package/dist/packages/@ember/application/instance.js +3 -3
- package/dist/packages/@ember/canary-features/index.js +6 -14
- package/dist/packages/@ember/debug/lib/capture-render-tree.js +2 -0
- package/dist/packages/@ember/debug/lib/handlers.js +1 -1
- package/dist/packages/@ember/runloop/index.js +31 -528
- package/dist/packages/@ember/runloop/type-tests.ts/begin-end.test.js +5 -0
- package/dist/packages/@ember/runloop/type-tests.ts/bind.test.js +59 -0
- package/dist/packages/@ember/runloop/type-tests.ts/cancel.test.js +5 -0
- package/dist/packages/@ember/runloop/type-tests.ts/debounce.test.js +77 -0
- package/dist/packages/@ember/runloop/type-tests.ts/join.test.js +38 -0
- package/dist/packages/@ember/runloop/type-tests.ts/later.test.js +38 -0
- package/dist/packages/@ember/runloop/type-tests.ts/next.test.js +38 -0
- package/dist/packages/@ember/runloop/type-tests.ts/once.test.js +38 -0
- package/dist/packages/@ember/runloop/type-tests.ts/run.test.js +38 -0
- package/dist/packages/@ember/runloop/type-tests.ts/schedule-once.test.js +39 -0
- package/dist/packages/@ember/runloop/type-tests.ts/schedule.test.js +39 -0
- package/dist/packages/@ember/runloop/type-tests.ts/throttle.test.js +77 -0
- package/dist/packages/ember/index.js +4 -14
- package/dist/packages/ember/version.js +1 -1
- package/docs/data.json +330 -245
- package/package.json +4 -4
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.
|
|
6
|
+
"version": "4.4.0-alpha.3"
|
|
7
7
|
},
|
|
8
8
|
"files": {
|
|
9
9
|
"node_modules/rsvp/lib/rsvp/promise/all.js": {
|
|
@@ -414,6 +414,15 @@
|
|
|
414
414
|
},
|
|
415
415
|
"namespaces": {}
|
|
416
416
|
},
|
|
417
|
+
"packages/@ember/-internals/glimmer/lib/helpers/unique-id.ts": {
|
|
418
|
+
"name": "packages/@ember/-internals/glimmer/lib/helpers/unique-id.ts",
|
|
419
|
+
"modules": {},
|
|
420
|
+
"classes": {},
|
|
421
|
+
"fors": {
|
|
422
|
+
"Ember.Templates.helpers": 1
|
|
423
|
+
},
|
|
424
|
+
"namespaces": {}
|
|
425
|
+
},
|
|
417
426
|
"packages/@ember/-internals/glimmer/lib/modifiers/on.ts": {
|
|
418
427
|
"name": "packages/@ember/-internals/glimmer/lib/modifiers/on.ts",
|
|
419
428
|
"modules": {},
|
|
@@ -468,6 +477,13 @@
|
|
|
468
477
|
"fors": {},
|
|
469
478
|
"namespaces": {}
|
|
470
479
|
},
|
|
480
|
+
"packages/@ember/-internals/glimmer/lib/utils/managers.ts": {
|
|
481
|
+
"name": "packages/@ember/-internals/glimmer/lib/utils/managers.ts",
|
|
482
|
+
"modules": {},
|
|
483
|
+
"classes": {},
|
|
484
|
+
"fors": {},
|
|
485
|
+
"namespaces": {}
|
|
486
|
+
},
|
|
471
487
|
"packages/@ember/-internals/glimmer/lib/utils/outlet.ts": {
|
|
472
488
|
"name": "packages/@ember/-internals/glimmer/lib/utils/outlet.ts",
|
|
473
489
|
"modules": {},
|
|
@@ -960,6 +976,13 @@
|
|
|
960
976
|
"Ember": 1
|
|
961
977
|
}
|
|
962
978
|
},
|
|
979
|
+
"packages/@ember/-internals/runtime/lib/mixins/container_proxy.d.ts": {
|
|
980
|
+
"name": "packages/@ember/-internals/runtime/lib/mixins/container_proxy.d.ts",
|
|
981
|
+
"modules": {},
|
|
982
|
+
"classes": {},
|
|
983
|
+
"fors": {},
|
|
984
|
+
"namespaces": {}
|
|
985
|
+
},
|
|
963
986
|
"packages/@ember/-internals/runtime/lib/mixins/container_proxy.js": {
|
|
964
987
|
"name": "packages/@ember/-internals/runtime/lib/mixins/container_proxy.js",
|
|
965
988
|
"modules": {},
|
|
@@ -1032,6 +1055,13 @@
|
|
|
1032
1055
|
"fors": {},
|
|
1033
1056
|
"namespaces": {}
|
|
1034
1057
|
},
|
|
1058
|
+
"packages/@ember/-internals/runtime/lib/mixins/registry_proxy.d.ts": {
|
|
1059
|
+
"name": "packages/@ember/-internals/runtime/lib/mixins/registry_proxy.d.ts",
|
|
1060
|
+
"modules": {},
|
|
1061
|
+
"classes": {},
|
|
1062
|
+
"fors": {},
|
|
1063
|
+
"namespaces": {}
|
|
1064
|
+
},
|
|
1035
1065
|
"packages/@ember/-internals/runtime/lib/mixins/registry_proxy.js": {
|
|
1036
1066
|
"name": "packages/@ember/-internals/runtime/lib/mixins/registry_proxy.js",
|
|
1037
1067
|
"modules": {},
|
|
@@ -1113,8 +1143,8 @@
|
|
|
1113
1143
|
"fors": {},
|
|
1114
1144
|
"namespaces": {}
|
|
1115
1145
|
},
|
|
1116
|
-
"packages/@ember/-internals/runtime/lib/compare.
|
|
1117
|
-
"name": "packages/@ember/-internals/runtime/lib/compare.
|
|
1146
|
+
"packages/@ember/-internals/runtime/lib/compare.ts": {
|
|
1147
|
+
"name": "packages/@ember/-internals/runtime/lib/compare.ts",
|
|
1118
1148
|
"modules": {},
|
|
1119
1149
|
"classes": {},
|
|
1120
1150
|
"fors": {
|
|
@@ -1122,8 +1152,8 @@
|
|
|
1122
1152
|
},
|
|
1123
1153
|
"namespaces": {}
|
|
1124
1154
|
},
|
|
1125
|
-
"packages/@ember/-internals/runtime/lib/is-equal.
|
|
1126
|
-
"name": "packages/@ember/-internals/runtime/lib/is-equal.
|
|
1155
|
+
"packages/@ember/-internals/runtime/lib/is-equal.ts": {
|
|
1156
|
+
"name": "packages/@ember/-internals/runtime/lib/is-equal.ts",
|
|
1127
1157
|
"modules": {},
|
|
1128
1158
|
"classes": {},
|
|
1129
1159
|
"fors": {
|
|
@@ -1131,8 +1161,8 @@
|
|
|
1131
1161
|
},
|
|
1132
1162
|
"namespaces": {}
|
|
1133
1163
|
},
|
|
1134
|
-
"packages/@ember/-internals/runtime/lib/type-of.
|
|
1135
|
-
"name": "packages/@ember/-internals/runtime/lib/type-of.
|
|
1164
|
+
"packages/@ember/-internals/runtime/lib/type-of.ts": {
|
|
1165
|
+
"name": "packages/@ember/-internals/runtime/lib/type-of.ts",
|
|
1136
1166
|
"modules": {},
|
|
1137
1167
|
"classes": {},
|
|
1138
1168
|
"fors": {
|
|
@@ -1419,8 +1449,8 @@
|
|
|
1419
1449
|
},
|
|
1420
1450
|
"namespaces": {}
|
|
1421
1451
|
},
|
|
1422
|
-
"packages/@ember/engine/lib/engine-parent.
|
|
1423
|
-
"name": "packages/@ember/engine/lib/engine-parent.
|
|
1452
|
+
"packages/@ember/engine/lib/engine-parent.ts": {
|
|
1453
|
+
"name": "packages/@ember/engine/lib/engine-parent.ts",
|
|
1424
1454
|
"modules": {
|
|
1425
1455
|
"@ember/engine": 1
|
|
1426
1456
|
},
|
|
@@ -1548,8 +1578,8 @@
|
|
|
1548
1578
|
},
|
|
1549
1579
|
"namespaces": {}
|
|
1550
1580
|
},
|
|
1551
|
-
"packages/@ember/runloop/index.
|
|
1552
|
-
"name": "packages/@ember/runloop/index.
|
|
1581
|
+
"packages/@ember/runloop/index.ts": {
|
|
1582
|
+
"name": "packages/@ember/runloop/index.ts",
|
|
1553
1583
|
"modules": {
|
|
1554
1584
|
"@ember/runloop": 1
|
|
1555
1585
|
},
|
|
@@ -1885,7 +1915,7 @@
|
|
|
1885
1915
|
"tag": "module",
|
|
1886
1916
|
"file": "packages/@ember/-internals/glimmer/lib/glimmer-component-docs.ts",
|
|
1887
1917
|
"line": 1,
|
|
1888
|
-
"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.",
|
|
1918
|
+
"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 components 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/components/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.",
|
|
1889
1919
|
"access": "public",
|
|
1890
1920
|
"tagname": ""
|
|
1891
1921
|
},
|
|
@@ -2048,7 +2078,7 @@
|
|
|
2048
2078
|
"namespaces": {},
|
|
2049
2079
|
"tag": "module",
|
|
2050
2080
|
"file": "packages/@ember/canary-features/index.ts",
|
|
2051
|
-
"line":
|
|
2081
|
+
"line": 22,
|
|
2052
2082
|
"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.",
|
|
2053
2083
|
"access": "public",
|
|
2054
2084
|
"tagname": ""
|
|
@@ -2196,8 +2226,8 @@
|
|
|
2196
2226
|
},
|
|
2197
2227
|
"namespaces": {},
|
|
2198
2228
|
"tag": "module",
|
|
2199
|
-
"file": "packages/@ember/runloop/index.
|
|
2200
|
-
"line":
|
|
2229
|
+
"file": "packages/@ember/runloop/index.ts",
|
|
2230
|
+
"line": 96
|
|
2201
2231
|
},
|
|
2202
2232
|
"@ember/service": {
|
|
2203
2233
|
"name": "@ember/service",
|
|
@@ -2963,7 +2993,7 @@
|
|
|
2963
2993
|
"module": "@ember/routing",
|
|
2964
2994
|
"namespace": "",
|
|
2965
2995
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
2966
|
-
"line":
|
|
2996
|
+
"line": 139,
|
|
2967
2997
|
"description": "The `EmberRouter` class manages the application state and URLs. Refer to\nthe [routing guide](https://guides.emberjs.com/release/routing/) for documentation.",
|
|
2968
2998
|
"extends": "EmberObject",
|
|
2969
2999
|
"uses": [
|
|
@@ -3526,7 +3556,7 @@
|
|
|
3526
3556
|
"module": "@ember/canary-features",
|
|
3527
3557
|
"namespace": "",
|
|
3528
3558
|
"file": "packages/@ember/canary-features/index.ts",
|
|
3529
|
-
"line":
|
|
3559
|
+
"line": 22,
|
|
3530
3560
|
"description": "The hash of enabled Canary features. Add to this, any canary features\nbefore creating your application.",
|
|
3531
3561
|
"static": 1,
|
|
3532
3562
|
"since": "1.1.0",
|
|
@@ -4575,20 +4605,6 @@
|
|
|
4575
4605
|
"name": "fullName",
|
|
4576
4606
|
"description": "",
|
|
4577
4607
|
"type": "String"
|
|
4578
|
-
},
|
|
4579
|
-
{
|
|
4580
|
-
"name": "options",
|
|
4581
|
-
"description": "",
|
|
4582
|
-
"type": "Object",
|
|
4583
|
-
"optional": true,
|
|
4584
|
-
"props": [
|
|
4585
|
-
{
|
|
4586
|
-
"name": "source",
|
|
4587
|
-
"description": "The fullname of the request source (used for local lookup)",
|
|
4588
|
-
"type": "String",
|
|
4589
|
-
"optional": true
|
|
4590
|
-
}
|
|
4591
|
-
]
|
|
4592
4608
|
}
|
|
4593
4609
|
],
|
|
4594
4610
|
"return": {
|
|
@@ -5946,6 +5962,18 @@
|
|
|
5946
5962
|
"class": "Ember.Templates.helpers",
|
|
5947
5963
|
"module": "ember"
|
|
5948
5964
|
},
|
|
5965
|
+
{
|
|
5966
|
+
"file": "packages/@ember/-internals/glimmer/lib/helpers/unique-id.ts",
|
|
5967
|
+
"line": 5,
|
|
5968
|
+
"description": "Use the {{unique-id}} helper to generate a unique ID string suitable for use as\nan ID attribute in the DOM.\n\n```handlebars\n<input id={{unique-id}} type=\"email\" />\n```\nEach invocation of {{unique-id}} will return a new, unique ID string.\nYou can use the `let` helper to create an ID that can be reused within a template.\n\n```handlebars\n{{#let (unique-id) as |emailId|}}\n <label for={{emailId}}>Email address</label>\n <input id={{emailId}} type=\"email\" />\n{{/let}}\n```",
|
|
5969
|
+
"itemtype": "method",
|
|
5970
|
+
"name": "unique-id",
|
|
5971
|
+
"since": "4.4.0",
|
|
5972
|
+
"access": "public",
|
|
5973
|
+
"tagname": "",
|
|
5974
|
+
"class": "Ember.Templates.helpers",
|
|
5975
|
+
"module": "ember"
|
|
5976
|
+
},
|
|
5949
5977
|
{
|
|
5950
5978
|
"file": "packages/@ember/-internals/glimmer/lib/modifiers/on.ts",
|
|
5951
5979
|
"line": 5,
|
|
@@ -6006,21 +6034,40 @@
|
|
|
6006
6034
|
},
|
|
6007
6035
|
{
|
|
6008
6036
|
"file": "packages/@ember/-internals/glimmer/lib/syntax/outlet.ts",
|
|
6009
|
-
"line":
|
|
6037
|
+
"line": 19,
|
|
6010
6038
|
"description": "The `{{outlet}}` helper lets you specify where a child route will render in\nyour template. An important use of the `{{outlet}}` helper is in your\napplication's `application.hbs` file:\n\n```app/templates/application.hbs\n<MyHeader />\n\n<div class=\"my-dynamic-content\">\n <!-- this content will change based on the current route, which depends on the current URL -->\n {{outlet}}\n</div>\n\n<MyFooter />\n```\n\nSee the [routing guide](https://guides.emberjs.com/release/routing/rendering-a-template/) for more\ninformation on how your `route` interacts with the `{{outlet}}` helper.\nNote: Your content __will not render__ if there isn't an `{{outlet}}` for it.",
|
|
6011
6039
|
"itemtype": "method",
|
|
6012
6040
|
"name": "outlet",
|
|
6041
|
+
"access": "public",
|
|
6042
|
+
"tagname": "",
|
|
6043
|
+
"class": "Ember.Templates.helpers",
|
|
6044
|
+
"module": "ember"
|
|
6045
|
+
},
|
|
6046
|
+
{
|
|
6047
|
+
"file": "packages/@ember/-internals/glimmer/lib/utils/managers.ts",
|
|
6048
|
+
"line": 9,
|
|
6049
|
+
"description": "Associate a class with a component manager (an object that is responsible for\ncoordinating the lifecycle events that occurs when invoking, rendering and\nre-rendering a component).",
|
|
6050
|
+
"itemtype": "method",
|
|
6051
|
+
"name": "setComponentManager",
|
|
6013
6052
|
"params": [
|
|
6014
6053
|
{
|
|
6015
|
-
"name": "
|
|
6016
|
-
"description": "",
|
|
6017
|
-
"type": "
|
|
6018
|
-
|
|
6054
|
+
"name": "factory",
|
|
6055
|
+
"description": "a function to create the owner for an object",
|
|
6056
|
+
"type": "Function"
|
|
6057
|
+
},
|
|
6058
|
+
{
|
|
6059
|
+
"name": "obj",
|
|
6060
|
+
"description": "the object to associate with the componetn manager",
|
|
6061
|
+
"type": "Object"
|
|
6019
6062
|
}
|
|
6020
6063
|
],
|
|
6064
|
+
"return": {
|
|
6065
|
+
"description": "the same object passed in",
|
|
6066
|
+
"type": "Object"
|
|
6067
|
+
},
|
|
6021
6068
|
"access": "public",
|
|
6022
6069
|
"tagname": "",
|
|
6023
|
-
"class": "
|
|
6070
|
+
"class": "@ember/template",
|
|
6024
6071
|
"module": "ember"
|
|
6025
6072
|
},
|
|
6026
6073
|
{
|
|
@@ -6120,19 +6167,19 @@
|
|
|
6120
6167
|
},
|
|
6121
6168
|
{
|
|
6122
6169
|
"file": "packages/@ember/-internals/glimmer/lib/views/outlet.ts",
|
|
6123
|
-
"line":
|
|
6170
|
+
"line": 107,
|
|
6124
6171
|
"class": "Component",
|
|
6125
6172
|
"module": "@ember/template"
|
|
6126
6173
|
},
|
|
6127
6174
|
{
|
|
6128
6175
|
"file": "packages/@ember/-internals/glimmer/lib/views/outlet.ts",
|
|
6129
|
-
"line":
|
|
6176
|
+
"line": 115,
|
|
6130
6177
|
"class": "Component",
|
|
6131
6178
|
"module": "@ember/template"
|
|
6132
6179
|
},
|
|
6133
6180
|
{
|
|
6134
6181
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6135
|
-
"line":
|
|
6182
|
+
"line": 756,
|
|
6136
6183
|
"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.",
|
|
6137
6184
|
"itemtype": "method",
|
|
6138
6185
|
"name": "readDOMAttr",
|
|
@@ -6153,7 +6200,7 @@
|
|
|
6153
6200
|
},
|
|
6154
6201
|
{
|
|
6155
6202
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6156
|
-
"line":
|
|
6203
|
+
"line": 807,
|
|
6157
6204
|
"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)",
|
|
6158
6205
|
"itemtype": "property",
|
|
6159
6206
|
"name": "ariaRole",
|
|
@@ -6166,7 +6213,7 @@
|
|
|
6166
6213
|
},
|
|
6167
6214
|
{
|
|
6168
6215
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6169
|
-
"line":
|
|
6216
|
+
"line": 822,
|
|
6170
6217
|
"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```",
|
|
6171
6218
|
"static": 1,
|
|
6172
6219
|
"access": "public",
|
|
@@ -6179,7 +6226,7 @@
|
|
|
6179
6226
|
},
|
|
6180
6227
|
{
|
|
6181
6228
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6182
|
-
"line":
|
|
6229
|
+
"line": 883,
|
|
6183
6230
|
"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.",
|
|
6184
6231
|
"itemtype": "method",
|
|
6185
6232
|
"name": "didReceiveAttrs",
|
|
@@ -6191,7 +6238,7 @@
|
|
|
6191
6238
|
},
|
|
6192
6239
|
{
|
|
6193
6240
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6194
|
-
"line":
|
|
6241
|
+
"line": 894,
|
|
6195
6242
|
"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.",
|
|
6196
6243
|
"itemtype": "event",
|
|
6197
6244
|
"name": "didReceiveAttrs",
|
|
@@ -6203,7 +6250,7 @@
|
|
|
6203
6250
|
},
|
|
6204
6251
|
{
|
|
6205
6252
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6206
|
-
"line":
|
|
6253
|
+
"line": 904,
|
|
6207
6254
|
"description": "Called after a component has been rendered, both on initial render and\nin subsequent rerenders.",
|
|
6208
6255
|
"itemtype": "method",
|
|
6209
6256
|
"name": "didRender",
|
|
@@ -6215,7 +6262,7 @@
|
|
|
6215
6262
|
},
|
|
6216
6263
|
{
|
|
6217
6264
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6218
|
-
"line":
|
|
6265
|
+
"line": 913,
|
|
6219
6266
|
"description": "Called after a component has been rendered, both on initial render and\nin subsequent rerenders.",
|
|
6220
6267
|
"itemtype": "event",
|
|
6221
6268
|
"name": "didRender",
|
|
@@ -6227,7 +6274,7 @@
|
|
|
6227
6274
|
},
|
|
6228
6275
|
{
|
|
6229
6276
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6230
|
-
"line":
|
|
6277
|
+
"line": 921,
|
|
6231
6278
|
"description": "Called before a component has been rendered, both on initial render and\nin subsequent rerenders.",
|
|
6232
6279
|
"itemtype": "method",
|
|
6233
6280
|
"name": "willRender",
|
|
@@ -6239,7 +6286,7 @@
|
|
|
6239
6286
|
},
|
|
6240
6287
|
{
|
|
6241
6288
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6242
|
-
"line":
|
|
6289
|
+
"line": 930,
|
|
6243
6290
|
"description": "Called before a component has been rendered, both on initial render and\nin subsequent rerenders.",
|
|
6244
6291
|
"itemtype": "event",
|
|
6245
6292
|
"name": "willRender",
|
|
@@ -6251,7 +6298,7 @@
|
|
|
6251
6298
|
},
|
|
6252
6299
|
{
|
|
6253
6300
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6254
|
-
"line":
|
|
6301
|
+
"line": 938,
|
|
6255
6302
|
"description": "Called when the attributes passed into the component have been changed.\nCalled only during a rerender, not during an initial render.",
|
|
6256
6303
|
"itemtype": "method",
|
|
6257
6304
|
"name": "didUpdateAttrs",
|
|
@@ -6263,7 +6310,7 @@
|
|
|
6263
6310
|
},
|
|
6264
6311
|
{
|
|
6265
6312
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6266
|
-
"line":
|
|
6313
|
+
"line": 947,
|
|
6267
6314
|
"description": "Called when the attributes passed into the component have been changed.\nCalled only during a rerender, not during an initial render.",
|
|
6268
6315
|
"itemtype": "event",
|
|
6269
6316
|
"name": "didUpdateAttrs",
|
|
@@ -6275,7 +6322,7 @@
|
|
|
6275
6322
|
},
|
|
6276
6323
|
{
|
|
6277
6324
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6278
|
-
"line":
|
|
6325
|
+
"line": 955,
|
|
6279
6326
|
"description": "Called when the component is about to update and rerender itself.\nCalled only during a rerender, not during an initial render.",
|
|
6280
6327
|
"itemtype": "method",
|
|
6281
6328
|
"name": "willUpdate",
|
|
@@ -6287,7 +6334,7 @@
|
|
|
6287
6334
|
},
|
|
6288
6335
|
{
|
|
6289
6336
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6290
|
-
"line":
|
|
6337
|
+
"line": 964,
|
|
6291
6338
|
"description": "Called when the component is about to update and rerender itself.\nCalled only during a rerender, not during an initial render.",
|
|
6292
6339
|
"itemtype": "event",
|
|
6293
6340
|
"name": "willUpdate",
|
|
@@ -6299,7 +6346,7 @@
|
|
|
6299
6346
|
},
|
|
6300
6347
|
{
|
|
6301
6348
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6302
|
-
"line":
|
|
6349
|
+
"line": 972,
|
|
6303
6350
|
"description": "Called when the component has updated and rerendered itself.\nCalled only during a rerender, not during an initial render.",
|
|
6304
6351
|
"itemtype": "method",
|
|
6305
6352
|
"name": "didUpdate",
|
|
@@ -6311,7 +6358,7 @@
|
|
|
6311
6358
|
},
|
|
6312
6359
|
{
|
|
6313
6360
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6314
|
-
"line":
|
|
6361
|
+
"line": 981,
|
|
6315
6362
|
"description": "Called when the component has updated and rerendered itself.\nCalled only during a rerender, not during an initial render.",
|
|
6316
6363
|
"itemtype": "event",
|
|
6317
6364
|
"name": "didUpdate",
|
|
@@ -6323,7 +6370,7 @@
|
|
|
6323
6370
|
},
|
|
6324
6371
|
{
|
|
6325
6372
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6326
|
-
"line":
|
|
6373
|
+
"line": 989,
|
|
6327
6374
|
"description": "Layout can be used to wrap content in a component.",
|
|
6328
6375
|
"itemtype": "property",
|
|
6329
6376
|
"name": "layout",
|
|
@@ -6335,7 +6382,7 @@
|
|
|
6335
6382
|
},
|
|
6336
6383
|
{
|
|
6337
6384
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6338
|
-
"line":
|
|
6385
|
+
"line": 996,
|
|
6339
6386
|
"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).",
|
|
6340
6387
|
"itemtype": "property",
|
|
6341
6388
|
"name": "layoutName",
|
|
@@ -6348,7 +6395,7 @@
|
|
|
6348
6395
|
},
|
|
6349
6396
|
{
|
|
6350
6397
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
6351
|
-
"line":
|
|
6398
|
+
"line": 1006,
|
|
6352
6399
|
"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```",
|
|
6353
6400
|
"itemtype": "property",
|
|
6354
6401
|
"name": "elementId",
|
|
@@ -7106,7 +7153,7 @@
|
|
|
7106
7153
|
{
|
|
7107
7154
|
"file": "packages/@ember/-internals/metal/lib/events.ts",
|
|
7108
7155
|
"line": 160,
|
|
7109
|
-
"access": "
|
|
7156
|
+
"access": "public",
|
|
7110
7157
|
"tagname": "",
|
|
7111
7158
|
"itemtype": "method",
|
|
7112
7159
|
"name": "hasListeners",
|
|
@@ -7213,7 +7260,7 @@
|
|
|
7213
7260
|
{
|
|
7214
7261
|
"file": "packages/@ember/-internals/metal/lib/is_blank.ts",
|
|
7215
7262
|
"line": 5,
|
|
7216
|
-
"description": "A value is blank if it is empty or a whitespace string.\n\n```javascript\nimport { isBlank } from '@ember/utils';\n\nisBlank(
|
|
7263
|
+
"description": "A value is blank if it is empty or a whitespace string.\n\n```javascript\nimport { isBlank } from '@ember/utils';\n\nisBlank(null); // true\nisBlank(undefined); // true\nisBlank(''); // true\nisBlank([]); // true\nisBlank('\\n\\t'); // true\nisBlank(' '); // true\nisBlank({}); // false\nisBlank('\\n\\t Hello'); // false\nisBlank('Hello world'); // false\nisBlank([1,2,3]); // false\n```",
|
|
7217
7264
|
"itemtype": "method",
|
|
7218
7265
|
"name": "isBlank",
|
|
7219
7266
|
"static": 1,
|
|
@@ -7237,7 +7284,7 @@
|
|
|
7237
7284
|
{
|
|
7238
7285
|
"file": "packages/@ember/-internals/metal/lib/is_empty.ts",
|
|
7239
7286
|
"line": 5,
|
|
7240
|
-
"description": "Verifies that a value is `null` or `undefined`, an empty string, or an empty\narray.\n\nConstrains the rules on `isNone` by returning true for empty strings and\nempty arrays.\n\nIf the value is an object with a `size` property of type number, it is used\nto check emptiness.\n\n```javascript\nisEmpty(
|
|
7287
|
+
"description": "Verifies that a value is `null` or `undefined`, an empty string, or an empty\narray.\n\nConstrains the rules on `isNone` by returning true for empty strings and\nempty arrays.\n\nIf the value is an object with a `size` property of type number, it is used\nto check emptiness.\n\n```javascript\nisEmpty(null); // true\nisEmpty(undefined); // true\nisEmpty(''); // true\nisEmpty([]); // true\nisEmpty({ size: 0}); // true\nisEmpty({}); // false\nisEmpty('Adam Hawkins'); // false\nisEmpty([0,1,2]); // false\nisEmpty('\\n\\t'); // false\nisEmpty(' '); // false\nisEmpty({ size: 1 }) // false\nisEmpty({ size: () => 0 }) // false\n```",
|
|
7241
7288
|
"itemtype": "method",
|
|
7242
7289
|
"name": "isEmpty",
|
|
7243
7290
|
"static": 1,
|
|
@@ -7260,7 +7307,7 @@
|
|
|
7260
7307
|
{
|
|
7261
7308
|
"file": "packages/@ember/-internals/metal/lib/is_none.ts",
|
|
7262
7309
|
"line": 4,
|
|
7263
|
-
"description": "Returns true if the passed value is null or undefined. This avoids errors\nfrom JSLint complaining about use of ==, which can be technically\nconfusing.\n\n```javascript\nisNone(
|
|
7310
|
+
"description": "Returns true if the passed value is null or undefined. This avoids errors\nfrom JSLint complaining about use of ==, which can be technically\nconfusing.\n\n```javascript\nisNone(null); // true\nisNone(undefined); // true\nisNone(''); // false\nisNone([]); // false\nisNone(function() {}); // false\n```",
|
|
7264
7311
|
"itemtype": "method",
|
|
7265
7312
|
"name": "isNone",
|
|
7266
7313
|
"static": 1,
|
|
@@ -7283,7 +7330,7 @@
|
|
|
7283
7330
|
{
|
|
7284
7331
|
"file": "packages/@ember/-internals/metal/lib/is_present.ts",
|
|
7285
7332
|
"line": 5,
|
|
7286
|
-
"description": "A value is present if it not `isBlank`.\n\n```javascript\nisPresent(
|
|
7333
|
+
"description": "A value is present if it not `isBlank`.\n\n```javascript\nisPresent(null); // false\nisPresent(undefined); // false\nisPresent(''); // false\nisPresent(' '); // false\nisPresent('\\n\\t'); // false\nisPresent([]); // false\nisPresent({ length: 0 }); // false\nisPresent(false); // true\nisPresent(true); // true\nisPresent('string'); // true\nisPresent(0); // true\nisPresent(function() {}); // true\nisPresent({}); // true\nisPresent('\\n\\t Hello'); // true\nisPresent([1, 2, 3]); // true\n```",
|
|
7287
7334
|
"itemtype": "method",
|
|
7288
7335
|
"name": "isPresent",
|
|
7289
7336
|
"static": 1,
|
|
@@ -7830,24 +7877,6 @@
|
|
|
7830
7877
|
"class": "@ember/application",
|
|
7831
7878
|
"module": "@ember/object"
|
|
7832
7879
|
},
|
|
7833
|
-
{
|
|
7834
|
-
"file": "packages/@ember/-internals/owner/index.ts",
|
|
7835
|
-
"line": 36,
|
|
7836
|
-
"class": "@ember/application",
|
|
7837
|
-
"module": "@ember/application"
|
|
7838
|
-
},
|
|
7839
|
-
{
|
|
7840
|
-
"file": "packages/@ember/-internals/owner/index.ts",
|
|
7841
|
-
"line": 38,
|
|
7842
|
-
"class": "@ember/application",
|
|
7843
|
-
"module": "@ember/application"
|
|
7844
|
-
},
|
|
7845
|
-
{
|
|
7846
|
-
"file": "packages/@ember/-internals/owner/index.ts",
|
|
7847
|
-
"line": 40,
|
|
7848
|
-
"class": "@ember/application",
|
|
7849
|
-
"module": "@ember/application"
|
|
7850
|
-
},
|
|
7851
7880
|
{
|
|
7852
7881
|
"file": "packages/@ember/-internals/owner/index.ts",
|
|
7853
7882
|
"line": 44,
|
|
@@ -8544,7 +8573,7 @@
|
|
|
8544
8573
|
},
|
|
8545
8574
|
{
|
|
8546
8575
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8547
|
-
"line":
|
|
8576
|
+
"line": 81,
|
|
8548
8577
|
"description": "Transition the application into another route. The route may\nbe either a single route or route path:\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```",
|
|
8549
8578
|
"itemtype": "method",
|
|
8550
8579
|
"name": "transitionTo",
|
|
@@ -8579,7 +8608,7 @@
|
|
|
8579
8608
|
},
|
|
8580
8609
|
{
|
|
8581
8610
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8582
|
-
"line":
|
|
8611
|
+
"line": 140,
|
|
8583
8612
|
"description": "Similar to `transitionTo`, but instead of adding the destination to the browser's URL history,\nit replaces the entry for the current route.\nWhen the user clicks the \"back\" button in the browser, there will be fewer steps.\nThis is most commonly used to manage redirects in a way that does not cause confusing additions\nto the user's browsing history.\n\nCalling `replaceWith` from the Router service will cause default query parameter values to be included in the URL.\nThis behavior is different from calling `replaceWith` on a route.\nSee the [Router Service RFC](https://github.com/emberjs/rfcs/blob/master/text/0095-router-service.md#query-parameter-semantics) for more info.\n\nUsage example:\n\n```app/routes/application.js\nimport Route from '@ember/routing/route';\n\nexport default class extends Route {\n beforeModel() {\n if (!authorized()){\n this.replaceWith('unauthorized');\n }\n }\n});\n```",
|
|
8584
8613
|
"itemtype": "method",
|
|
8585
8614
|
"name": "replaceWith",
|
|
@@ -8612,7 +8641,7 @@
|
|
|
8612
8641
|
},
|
|
8613
8642
|
{
|
|
8614
8643
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8615
|
-
"line":
|
|
8644
|
+
"line": 179,
|
|
8616
8645
|
"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```",
|
|
8617
8646
|
"itemtype": "method",
|
|
8618
8647
|
"name": "urlFor",
|
|
@@ -8645,7 +8674,7 @@
|
|
|
8645
8674
|
},
|
|
8646
8675
|
{
|
|
8647
8676
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8648
|
-
"line":
|
|
8677
|
+
"line": 252,
|
|
8649
8678
|
"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.",
|
|
8650
8679
|
"itemtype": "method",
|
|
8651
8680
|
"name": "isActive",
|
|
@@ -8678,7 +8707,7 @@
|
|
|
8678
8707
|
},
|
|
8679
8708
|
{
|
|
8680
8709
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8681
|
-
"line":
|
|
8710
|
+
"line": 356,
|
|
8682
8711
|
"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```",
|
|
8683
8712
|
"itemtype": "method",
|
|
8684
8713
|
"name": "recognize",
|
|
@@ -8700,7 +8729,7 @@
|
|
|
8700
8729
|
},
|
|
8701
8730
|
{
|
|
8702
8731
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8703
|
-
"line":
|
|
8732
|
+
"line": 397,
|
|
8704
8733
|
"description": "Takes a string URL and returns a promise that resolves to a\n`RouteInfoWithAttributes` for the leafmost route represented by the URL.\nThe promise rejects if the URL is not recognized or an unhandled exception\nis encountered. This method expects to receive the actual URL as seen by\nthe browser including the app's `rootURL`.",
|
|
8705
8734
|
"itemtype": "method",
|
|
8706
8735
|
"name": "recognizeAndLoad",
|
|
@@ -8722,8 +8751,54 @@
|
|
|
8722
8751
|
},
|
|
8723
8752
|
{
|
|
8724
8753
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8725
|
-
"line":
|
|
8726
|
-
"description": "
|
|
8754
|
+
"line": 419,
|
|
8755
|
+
"description": "You can register a listener for events emitted by this service with `.on()`:\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 activate() {\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```",
|
|
8756
|
+
"itemtype": "method",
|
|
8757
|
+
"name": "on",
|
|
8758
|
+
"params": [
|
|
8759
|
+
{
|
|
8760
|
+
"name": "eventName",
|
|
8761
|
+
"description": "",
|
|
8762
|
+
"type": "String"
|
|
8763
|
+
},
|
|
8764
|
+
{
|
|
8765
|
+
"name": "callback",
|
|
8766
|
+
"description": "",
|
|
8767
|
+
"type": "Function"
|
|
8768
|
+
}
|
|
8769
|
+
],
|
|
8770
|
+
"access": "public",
|
|
8771
|
+
"tagname": "",
|
|
8772
|
+
"class": "RouterService",
|
|
8773
|
+
"module": "@ember/routing"
|
|
8774
|
+
},
|
|
8775
|
+
{
|
|
8776
|
+
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8777
|
+
"line": 446,
|
|
8778
|
+
"description": "You can unregister a listener for events emitted by this service with `.off()`:\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 callback = (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 activate() {\n this.router.on('routeWillChange', this.callback);\n }\n\n deactivate() {\n this.router.off('routeWillChange', this.callback);\n}\n```",
|
|
8779
|
+
"itemtype": "method",
|
|
8780
|
+
"name": "off",
|
|
8781
|
+
"params": [
|
|
8782
|
+
{
|
|
8783
|
+
"name": "eventName",
|
|
8784
|
+
"description": "",
|
|
8785
|
+
"type": "String"
|
|
8786
|
+
},
|
|
8787
|
+
{
|
|
8788
|
+
"name": "callback",
|
|
8789
|
+
"description": "",
|
|
8790
|
+
"type": "Function"
|
|
8791
|
+
}
|
|
8792
|
+
],
|
|
8793
|
+
"access": "public",
|
|
8794
|
+
"tagname": "",
|
|
8795
|
+
"class": "RouterService",
|
|
8796
|
+
"module": "@ember/routing"
|
|
8797
|
+
},
|
|
8798
|
+
{
|
|
8799
|
+
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8800
|
+
"line": 478,
|
|
8801
|
+
"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 activate() {\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.",
|
|
8727
8802
|
"itemtype": "event",
|
|
8728
8803
|
"name": "routeWillChange",
|
|
8729
8804
|
"params": [
|
|
@@ -8740,8 +8815,8 @@
|
|
|
8740
8815
|
},
|
|
8741
8816
|
{
|
|
8742
8817
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8743
|
-
"line":
|
|
8744
|
-
"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
|
|
8818
|
+
"line": 512,
|
|
8819
|
+
"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 activate() {\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.",
|
|
8745
8820
|
"itemtype": "event",
|
|
8746
8821
|
"name": "routeDidChange",
|
|
8747
8822
|
"params": [
|
|
@@ -8758,7 +8833,7 @@
|
|
|
8758
8833
|
},
|
|
8759
8834
|
{
|
|
8760
8835
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8761
|
-
"line":
|
|
8836
|
+
"line": 553,
|
|
8762
8837
|
"description": "Refreshes all currently active routes, doing a full transition.\nIf a route name is provided and refers to a currently active route,\nit will refresh only that route and its descendents.\nReturns a promise that will be resolved once the refresh is complete.\nAll resetController, beforeModel, model, afterModel, redirect, and setupController\nhooks will be called again. You will get new data from the model hook.",
|
|
8763
8838
|
"itemtype": "method",
|
|
8764
8839
|
"name": "refresh",
|
|
@@ -8783,7 +8858,7 @@
|
|
|
8783
8858
|
},
|
|
8784
8859
|
{
|
|
8785
8860
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8786
|
-
"line":
|
|
8861
|
+
"line": 590,
|
|
8787
8862
|
"description": "Name of the current route.\n\n This property represents the logical name of the route,\n which is comma separated.\n For the following router:\n\n ```app/router.js\n Router.map(function() {\n this.route('about');\n this.route('blog', function () {\n this.route('post', { path: ':post_id' });\n });\n });\n ```\n\n It will return:\n\n * `index` when you visit `/`\n * `about` when you visit `/about`\n * `blog.index` when you visit `/blog`\n * `blog.post` when you visit `/blog/some-post-id`",
|
|
8788
8863
|
"itemtype": "property",
|
|
8789
8864
|
"name": "currentRouteName",
|
|
@@ -8795,7 +8870,7 @@
|
|
|
8795
8870
|
},
|
|
8796
8871
|
{
|
|
8797
8872
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8798
|
-
"line":
|
|
8873
|
+
"line": 620,
|
|
8799
8874
|
"description": "Current URL for the application.\n\n This property represents the URL path for this route.\n For the following router:\n\n ```app/router.js\n Router.map(function() {\n this.route('about');\n this.route('blog', function () {\n this.route('post', { path: ':post_id' });\n });\n });\n ```\n\n It will return:\n\n * `/` when you visit `/`\n * `/about` when you visit `/about`\n * `/blog` when you visit `/blog`\n * `/blog/some-post-id` when you visit `/blog/some-post-id`",
|
|
8800
8875
|
"itemtype": "property",
|
|
8801
8876
|
"name": "currentURL",
|
|
@@ -8807,7 +8882,7 @@
|
|
|
8807
8882
|
},
|
|
8808
8883
|
{
|
|
8809
8884
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8810
|
-
"line":
|
|
8885
|
+
"line": 649,
|
|
8811
8886
|
"description": "The `location` property returns what implementation of the `location` API\nyour application is using, which determines what type of URL is being used.\n\nSee [Location](/ember/release/classes/Location) for more information.\n\nTo force a particular `location` API implementation to be used in your\napplication you can set a location type on your `config/environment`.\nFor example, to set the `history` type:\n\n```config/environment.js\n'use strict';\n\nmodule.exports = function(environment) {\n let ENV = {\n modulePrefix: 'router-service',\n environment,\n rootURL: '/',\n locationType: 'history',\n ...\n }\n}\n```\n\nThe following location types are available by default:\n`auto`, `hash`, `history`, `none`.\n\nSee [HashLocation](/ember/release/classes/HashLocation).\nSee [HistoryLocation](/ember/release/classes/HistoryLocation).\nSee [NoneLocation](/ember/release/classes/NoneLocation).\nSee [AutoLocation](/ember/release/classes/AutoLocation).",
|
|
8812
8887
|
"itemtype": "property",
|
|
8813
8888
|
"name": "location",
|
|
@@ -8822,7 +8897,7 @@
|
|
|
8822
8897
|
},
|
|
8823
8898
|
{
|
|
8824
8899
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8825
|
-
"line":
|
|
8900
|
+
"line": 689,
|
|
8826
8901
|
"description": "The `rootURL` property represents the URL of the root of\nthe application, '/' by default.\nThis prefix is assumed on all routes defined on this app.\n\nIf you change the `rootURL` in your environment configuration\nlike so:\n\n```config/environment.js\n'use strict';\n\nmodule.exports = function(environment) {\n let ENV = {\n modulePrefix: 'router-service',\n environment,\n rootURL: '/my-root',\n …\n }\n]\n```\n\nThis property will return `/my-root`.",
|
|
8827
8902
|
"itemtype": "property",
|
|
8828
8903
|
"name": "rootURL",
|
|
@@ -8834,7 +8909,7 @@
|
|
|
8834
8909
|
},
|
|
8835
8910
|
{
|
|
8836
8911
|
"file": "packages/@ember/-internals/routing/lib/services/router.ts",
|
|
8837
|
-
"line":
|
|
8912
|
+
"line": 719,
|
|
8838
8913
|
"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```",
|
|
8839
8914
|
"itemtype": "property",
|
|
8840
8915
|
"name": "currentRoute",
|
|
@@ -9843,7 +9918,7 @@
|
|
|
9843
9918
|
},
|
|
9844
9919
|
{
|
|
9845
9920
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9846
|
-
"line":
|
|
9921
|
+
"line": 1461,
|
|
9847
9922
|
"access": "private",
|
|
9848
9923
|
"tagname": "",
|
|
9849
9924
|
"itemtype": "method",
|
|
@@ -9869,7 +9944,7 @@
|
|
|
9869
9944
|
},
|
|
9870
9945
|
{
|
|
9871
9946
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9872
|
-
"line":
|
|
9947
|
+
"line": 1474,
|
|
9873
9948
|
"itemtype": "method",
|
|
9874
9949
|
"name": "findModel",
|
|
9875
9950
|
"params": [
|
|
@@ -9891,7 +9966,7 @@
|
|
|
9891
9966
|
},
|
|
9892
9967
|
{
|
|
9893
9968
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9894
|
-
"line":
|
|
9969
|
+
"line": 1485,
|
|
9895
9970
|
"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.",
|
|
9896
9971
|
"example": [
|
|
9897
9972
|
" 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```"
|
|
@@ -9924,7 +9999,7 @@
|
|
|
9924
9999
|
},
|
|
9925
10000
|
{
|
|
9926
10001
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9927
|
-
"line":
|
|
10002
|
+
"line": 1561,
|
|
9928
10003
|
"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```",
|
|
9929
10004
|
"itemtype": "method",
|
|
9930
10005
|
"name": "controllerFor",
|
|
@@ -9947,7 +10022,7 @@
|
|
|
9947
10022
|
},
|
|
9948
10023
|
{
|
|
9949
10024
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9950
|
-
"line":
|
|
10025
|
+
"line": 1615,
|
|
9951
10026
|
"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```",
|
|
9952
10027
|
"itemtype": "method",
|
|
9953
10028
|
"name": "generateController",
|
|
@@ -9965,7 +10040,7 @@
|
|
|
9965
10040
|
},
|
|
9966
10041
|
{
|
|
9967
10042
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9968
|
-
"line":
|
|
10043
|
+
"line": 1643,
|
|
9969
10044
|
"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```",
|
|
9970
10045
|
"itemtype": "method",
|
|
9971
10046
|
"name": "modelFor",
|
|
@@ -9988,7 +10063,7 @@
|
|
|
9988
10063
|
},
|
|
9989
10064
|
{
|
|
9990
10065
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
9991
|
-
"line":
|
|
10066
|
+
"line": 1715,
|
|
9992
10067
|
"description": "`this[RENDER]` is used to render a template into a region of another template\n(indicated by an `{{outlet}}`).",
|
|
9993
10068
|
"itemtype": "method",
|
|
9994
10069
|
"name": "this[RENDER]",
|
|
@@ -10038,7 +10113,7 @@
|
|
|
10038
10113
|
},
|
|
10039
10114
|
{
|
|
10040
10115
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10041
|
-
"line":
|
|
10116
|
+
"line": 1742,
|
|
10042
10117
|
"access": "private",
|
|
10043
10118
|
"tagname": "",
|
|
10044
10119
|
"itemtype": "method",
|
|
@@ -10048,7 +10123,7 @@
|
|
|
10048
10123
|
},
|
|
10049
10124
|
{
|
|
10050
10125
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10051
|
-
"line":
|
|
10126
|
+
"line": 1755,
|
|
10052
10127
|
"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```",
|
|
10053
10128
|
"itemtype": "method",
|
|
10054
10129
|
"name": "buildRouteInfoMetadata",
|
|
@@ -10063,7 +10138,7 @@
|
|
|
10063
10138
|
},
|
|
10064
10139
|
{
|
|
10065
10140
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10066
|
-
"line":
|
|
10141
|
+
"line": 1806,
|
|
10067
10142
|
"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)`",
|
|
10068
10143
|
"itemtype": "property",
|
|
10069
10144
|
"name": "store",
|
|
@@ -10075,7 +10150,7 @@
|
|
|
10075
10150
|
},
|
|
10076
10151
|
{
|
|
10077
10152
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10078
|
-
"line":
|
|
10153
|
+
"line": 1872,
|
|
10079
10154
|
"access": "private",
|
|
10080
10155
|
"tagname": "",
|
|
10081
10156
|
"itemtype": "property",
|
|
@@ -10085,7 +10160,7 @@
|
|
|
10085
10160
|
},
|
|
10086
10161
|
{
|
|
10087
10162
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10088
|
-
"line":
|
|
10163
|
+
"line": 2009,
|
|
10089
10164
|
"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```",
|
|
10090
10165
|
"itemtype": "method",
|
|
10091
10166
|
"name": "send",
|
|
@@ -10109,7 +10184,7 @@
|
|
|
10109
10184
|
},
|
|
10110
10185
|
{
|
|
10111
10186
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10112
|
-
"line":
|
|
10187
|
+
"line": 2387,
|
|
10113
10188
|
"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```",
|
|
10114
10189
|
"itemtype": "property",
|
|
10115
10190
|
"name": "controller",
|
|
@@ -10122,7 +10197,7 @@
|
|
|
10122
10197
|
},
|
|
10123
10198
|
{
|
|
10124
10199
|
"file": "packages/@ember/-internals/routing/lib/system/route.ts",
|
|
10125
|
-
"line":
|
|
10200
|
+
"line": 2418,
|
|
10126
10201
|
"description": "This action is called when one or more query params have changed. Bubbles.",
|
|
10127
10202
|
"itemtype": "method",
|
|
10128
10203
|
"name": "queryParamsDidChange",
|
|
@@ -10154,7 +10229,7 @@
|
|
|
10154
10229
|
},
|
|
10155
10230
|
{
|
|
10156
10231
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10157
|
-
"line":
|
|
10232
|
+
"line": 149,
|
|
10158
10233
|
"description": "Represents the URL of the root of the application, often '/'. This prefix is\n assumed on all routes defined on this router.",
|
|
10159
10234
|
"itemtype": "property",
|
|
10160
10235
|
"name": "rootURL",
|
|
@@ -10166,7 +10241,7 @@
|
|
|
10166
10241
|
},
|
|
10167
10242
|
{
|
|
10168
10243
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10169
|
-
"line":
|
|
10244
|
+
"line": 160,
|
|
10170
10245
|
"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`",
|
|
10171
10246
|
"itemtype": "property",
|
|
10172
10247
|
"name": "location",
|
|
@@ -10181,7 +10256,7 @@
|
|
|
10181
10256
|
},
|
|
10182
10257
|
{
|
|
10183
10258
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10184
|
-
"line":
|
|
10259
|
+
"line": 218,
|
|
10185
10260
|
"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```",
|
|
10186
10261
|
"itemtype": "method",
|
|
10187
10262
|
"name": "map",
|
|
@@ -10198,7 +10273,7 @@
|
|
|
10198
10273
|
},
|
|
10199
10274
|
{
|
|
10200
10275
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10201
|
-
"line":
|
|
10276
|
+
"line": 547,
|
|
10202
10277
|
"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.",
|
|
10203
10278
|
"itemtype": "method",
|
|
10204
10279
|
"name": "startRouting",
|
|
@@ -10209,7 +10284,7 @@
|
|
|
10209
10284
|
},
|
|
10210
10285
|
{
|
|
10211
10286
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10212
|
-
"line":
|
|
10287
|
+
"line": 670,
|
|
10213
10288
|
"description": "Transition the application into another route. The route may\nbe either a single route or route path:",
|
|
10214
10289
|
"itemtype": "method",
|
|
10215
10290
|
"name": "transitionTo",
|
|
@@ -10243,7 +10318,7 @@
|
|
|
10243
10318
|
},
|
|
10244
10319
|
{
|
|
10245
10320
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10246
|
-
"line":
|
|
10321
|
+
"line": 715,
|
|
10247
10322
|
"description": "Similar to `transitionTo`, but instead of adding the destination to the browser's URL history,\nit replaces the entry for the current route.\nWhen the user clicks the \"back\" button in the browser, there will be fewer steps.\nThis is most commonly used to manage redirects in a way that does not cause confusing additions\nto the user's browsing history.",
|
|
10248
10323
|
"itemtype": "method",
|
|
10249
10324
|
"name": "replaceWith",
|
|
@@ -10277,7 +10352,7 @@
|
|
|
10277
10352
|
},
|
|
10278
10353
|
{
|
|
10279
10354
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10280
|
-
"line":
|
|
10355
|
+
"line": 742,
|
|
10281
10356
|
"description": "Determines if the supplied route is currently active.",
|
|
10282
10357
|
"itemtype": "method",
|
|
10283
10358
|
"name": "isActive",
|
|
@@ -10298,7 +10373,7 @@
|
|
|
10298
10373
|
},
|
|
10299
10374
|
{
|
|
10300
10375
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10301
|
-
"line":
|
|
10376
|
+
"line": 754,
|
|
10302
10377
|
"description": "An alternative form of `isActive` that doesn't require\nmanual concatenation of the arguments into a single\narray.",
|
|
10303
10378
|
"itemtype": "method",
|
|
10304
10379
|
"name": "isActiveIntent",
|
|
@@ -10328,7 +10403,7 @@
|
|
|
10328
10403
|
},
|
|
10329
10404
|
{
|
|
10330
10405
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10331
|
-
"line":
|
|
10406
|
+
"line": 776,
|
|
10332
10407
|
"description": "Does this router instance have the given route.",
|
|
10333
10408
|
"itemtype": "method",
|
|
10334
10409
|
"name": "hasRoute",
|
|
@@ -10343,7 +10418,7 @@
|
|
|
10343
10418
|
},
|
|
10344
10419
|
{
|
|
10345
10420
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10346
|
-
"line":
|
|
10421
|
+
"line": 787,
|
|
10347
10422
|
"description": "Resets the state of the router by clearing the current route\nhandlers and deactivating them.",
|
|
10348
10423
|
"access": "private",
|
|
10349
10424
|
"tagname": "",
|
|
@@ -10354,7 +10429,7 @@
|
|
|
10354
10429
|
},
|
|
10355
10430
|
{
|
|
10356
10431
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10357
|
-
"line":
|
|
10432
|
+
"line": 935,
|
|
10358
10433
|
"description": "Serializes the given query params according to their QP meta information.",
|
|
10359
10434
|
"access": "private",
|
|
10360
10435
|
"tagname": "",
|
|
@@ -10381,7 +10456,7 @@
|
|
|
10381
10456
|
},
|
|
10382
10457
|
{
|
|
10383
10458
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10384
|
-
"line":
|
|
10459
|
+
"line": 965,
|
|
10385
10460
|
"description": "Serializes the value of a query parameter based on a type",
|
|
10386
10461
|
"access": "private",
|
|
10387
10462
|
"tagname": "",
|
|
@@ -10404,7 +10479,7 @@
|
|
|
10404
10479
|
},
|
|
10405
10480
|
{
|
|
10406
10481
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10407
|
-
"line":
|
|
10482
|
+
"line": 983,
|
|
10408
10483
|
"description": "Deserializes the given query params according to their QP meta information.",
|
|
10409
10484
|
"access": "private",
|
|
10410
10485
|
"tagname": "",
|
|
@@ -10431,7 +10506,7 @@
|
|
|
10431
10506
|
},
|
|
10432
10507
|
{
|
|
10433
10508
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10434
|
-
"line":
|
|
10509
|
+
"line": 1011,
|
|
10435
10510
|
"description": "Deserializes the value of a query parameter based on a default type",
|
|
10436
10511
|
"access": "private",
|
|
10437
10512
|
"tagname": "",
|
|
@@ -10454,7 +10529,7 @@
|
|
|
10454
10529
|
},
|
|
10455
10530
|
{
|
|
10456
10531
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10457
|
-
"line":
|
|
10532
|
+
"line": 1032,
|
|
10458
10533
|
"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.",
|
|
10459
10534
|
"access": "private",
|
|
10460
10535
|
"tagname": "",
|
|
@@ -10481,7 +10556,7 @@
|
|
|
10481
10556
|
},
|
|
10482
10557
|
{
|
|
10483
10558
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10484
|
-
"line":
|
|
10559
|
+
"line": 1113,
|
|
10485
10560
|
"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.",
|
|
10486
10561
|
"access": "private",
|
|
10487
10562
|
"tagname": "",
|
|
@@ -10518,7 +10593,7 @@
|
|
|
10518
10593
|
},
|
|
10519
10594
|
{
|
|
10520
10595
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10521
|
-
"line":
|
|
10596
|
+
"line": 1140,
|
|
10522
10597
|
"description": "Returns the meta information for the query params of a given route. This\nwill be overridden to allow support for lazy routes.",
|
|
10523
10598
|
"access": "private",
|
|
10524
10599
|
"tagname": "",
|
|
@@ -10540,7 +10615,7 @@
|
|
|
10540
10615
|
},
|
|
10541
10616
|
{
|
|
10542
10617
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10543
|
-
"line":
|
|
10618
|
+
"line": 1154,
|
|
10544
10619
|
"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.",
|
|
10545
10620
|
"access": "private",
|
|
10546
10621
|
"tagname": "",
|
|
@@ -10562,7 +10637,7 @@
|
|
|
10562
10637
|
},
|
|
10563
10638
|
{
|
|
10564
10639
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10565
|
-
"line":
|
|
10640
|
+
"line": 1216,
|
|
10566
10641
|
"description": "Maps all query param keys to their fully scoped property name of the form\n`controllerName:propName`.",
|
|
10567
10642
|
"access": "private",
|
|
10568
10643
|
"tagname": "",
|
|
@@ -10594,7 +10669,7 @@
|
|
|
10594
10669
|
},
|
|
10595
10670
|
{
|
|
10596
10671
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10597
|
-
"line":
|
|
10672
|
+
"line": 1254,
|
|
10598
10673
|
"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.",
|
|
10599
10674
|
"access": "private",
|
|
10600
10675
|
"tagname": "",
|
|
@@ -10621,7 +10696,7 @@
|
|
|
10621
10696
|
},
|
|
10622
10697
|
{
|
|
10623
10698
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10624
|
-
"line":
|
|
10699
|
+
"line": 1425,
|
|
10625
10700
|
"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```",
|
|
10626
10701
|
"itemtype": "method",
|
|
10627
10702
|
"name": "didTransition",
|
|
@@ -10633,7 +10708,7 @@
|
|
|
10633
10708
|
},
|
|
10634
10709
|
{
|
|
10635
10710
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10636
|
-
"line":
|
|
10711
|
+
"line": 1462,
|
|
10637
10712
|
"description": "Handles notifying any listeners of an impending URL\nchange.\n\nTriggers the router level `willTransition` hook.",
|
|
10638
10713
|
"itemtype": "method",
|
|
10639
10714
|
"name": "willTransition",
|
|
@@ -10645,7 +10720,7 @@
|
|
|
10645
10720
|
},
|
|
10646
10721
|
{
|
|
10647
10722
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10648
|
-
"line":
|
|
10723
|
+
"line": 1475,
|
|
10649
10724
|
"description": "Represents the current URL.",
|
|
10650
10725
|
"itemtype": "property",
|
|
10651
10726
|
"name": "url",
|
|
@@ -10657,7 +10732,7 @@
|
|
|
10657
10732
|
},
|
|
10658
10733
|
{
|
|
10659
10734
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10660
|
-
"line":
|
|
10735
|
+
"line": 1633,
|
|
10661
10736
|
"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`.",
|
|
10662
10737
|
"access": "private",
|
|
10663
10738
|
"tagname": "",
|
|
@@ -10682,7 +10757,7 @@
|
|
|
10682
10757
|
},
|
|
10683
10758
|
{
|
|
10684
10759
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10685
|
-
"line":
|
|
10760
|
+
"line": 1654,
|
|
10686
10761
|
"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.",
|
|
10687
10762
|
"access": "private",
|
|
10688
10763
|
"tagname": "",
|
|
@@ -10707,7 +10782,7 @@
|
|
|
10707
10782
|
},
|
|
10708
10783
|
{
|
|
10709
10784
|
"file": "packages/@ember/-internals/routing/lib/system/router.ts",
|
|
10710
|
-
"line":
|
|
10785
|
+
"line": 1676,
|
|
10711
10786
|
"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.",
|
|
10712
10787
|
"access": "private",
|
|
10713
10788
|
"tagname": "",
|
|
@@ -12238,6 +12313,13 @@
|
|
|
12238
12313
|
"module": "ember",
|
|
12239
12314
|
"namespace": "Ember"
|
|
12240
12315
|
},
|
|
12316
|
+
{
|
|
12317
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/container_proxy.d.ts",
|
|
12318
|
+
"line": 7,
|
|
12319
|
+
"class": "ContainerProxyMixin",
|
|
12320
|
+
"module": "ember",
|
|
12321
|
+
"namespace": "Ember"
|
|
12322
|
+
},
|
|
12241
12323
|
{
|
|
12242
12324
|
"file": "packages/@ember/-internals/runtime/lib/mixins/container_proxy.js",
|
|
12243
12325
|
"line": 15,
|
|
@@ -13076,6 +13158,12 @@
|
|
|
13076
13158
|
"class": "PromiseProxyMixin",
|
|
13077
13159
|
"module": "@ember/object"
|
|
13078
13160
|
},
|
|
13161
|
+
{
|
|
13162
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/registry_proxy.d.ts",
|
|
13163
|
+
"line": 7,
|
|
13164
|
+
"class": "RegistryProxyMixin",
|
|
13165
|
+
"module": "@ember/object"
|
|
13166
|
+
},
|
|
13079
13167
|
{
|
|
13080
13168
|
"file": "packages/@ember/-internals/runtime/lib/mixins/registry_proxy.js",
|
|
13081
13169
|
"line": 18,
|
|
@@ -13308,6 +13396,7 @@
|
|
|
13308
13396
|
"type": "String"
|
|
13309
13397
|
}
|
|
13310
13398
|
],
|
|
13399
|
+
"deprecated": true,
|
|
13311
13400
|
"class": "RegistryProxyMixin",
|
|
13312
13401
|
"module": "ember"
|
|
13313
13402
|
},
|
|
@@ -13413,52 +13502,52 @@
|
|
|
13413
13502
|
},
|
|
13414
13503
|
{
|
|
13415
13504
|
"file": "packages/@ember/-internals/runtime/lib/system/core_object.d.ts",
|
|
13416
|
-
"line":
|
|
13505
|
+
"line": 3,
|
|
13417
13506
|
"description": "Used to infer the type of ember classes of type `T`.\n\nGenerally you would use `EmberClass.create()` instead of `new EmberClass()`.\n\nThe single-arg constructor is required by the typescript compiler.\nThe multi-arg constructor is included for better ergonomics.\n\nImplementation is carefully chosen for the reasons described in\nhttps://github.com/typed-ember/ember-typings/pull/29",
|
|
13418
13507
|
"class": "CoreObject",
|
|
13419
13508
|
"module": "@ember/array"
|
|
13420
13509
|
},
|
|
13421
13510
|
{
|
|
13422
13511
|
"file": "packages/@ember/-internals/runtime/lib/system/core_object.d.ts",
|
|
13423
|
-
"line":
|
|
13512
|
+
"line": 21,
|
|
13424
13513
|
"class": "CoreObject",
|
|
13425
13514
|
"module": "@ember/array"
|
|
13426
13515
|
},
|
|
13427
13516
|
{
|
|
13428
13517
|
"file": "packages/@ember/-internals/runtime/lib/system/core_object.d.ts",
|
|
13429
|
-
"line":
|
|
13518
|
+
"line": 27,
|
|
13430
13519
|
"class": "CoreObject",
|
|
13431
13520
|
"module": "@ember/array"
|
|
13432
13521
|
},
|
|
13433
13522
|
{
|
|
13434
13523
|
"file": "packages/@ember/-internals/runtime/lib/system/core_object.d.ts",
|
|
13435
|
-
"line":
|
|
13524
|
+
"line": 30,
|
|
13436
13525
|
"class": "CoreObject",
|
|
13437
13526
|
"module": "@ember/array"
|
|
13438
13527
|
},
|
|
13439
13528
|
{
|
|
13440
13529
|
"file": "packages/@ember/-internals/runtime/lib/system/core_object.d.ts",
|
|
13441
|
-
"line":
|
|
13442
|
-
"description": "CoreObject constructor takes
|
|
13530
|
+
"line": 33,
|
|
13531
|
+
"description": "CoreObject constructor takes owner.",
|
|
13443
13532
|
"class": "CoreObject",
|
|
13444
13533
|
"module": "@ember/array"
|
|
13445
13534
|
},
|
|
13446
13535
|
{
|
|
13447
13536
|
"file": "packages/@ember/-internals/runtime/lib/system/core_object.d.ts",
|
|
13448
|
-
"line":
|
|
13537
|
+
"line": 38,
|
|
13449
13538
|
"class": "CoreObject",
|
|
13450
13539
|
"module": "@ember/array"
|
|
13451
13540
|
},
|
|
13452
13541
|
{
|
|
13453
13542
|
"file": "packages/@ember/-internals/runtime/lib/system/core_object.d.ts",
|
|
13454
|
-
"line":
|
|
13543
|
+
"line": 41,
|
|
13455
13544
|
"description": "An overridable method called when objects are instantiated. By default,\ndoes nothing unless it is overridden during class definition.",
|
|
13456
13545
|
"class": "CoreObject",
|
|
13457
13546
|
"module": "@ember/array"
|
|
13458
13547
|
},
|
|
13459
13548
|
{
|
|
13460
13549
|
"file": "packages/@ember/-internals/runtime/lib/system/core_object.d.ts",
|
|
13461
|
-
"line":
|
|
13550
|
+
"line": 47,
|
|
13462
13551
|
"description": "Defines the properties that will be concatenated from the superclass (instead of overridden).",
|
|
13463
13552
|
"default": "null",
|
|
13464
13553
|
"class": "CoreObject",
|
|
@@ -13466,7 +13555,7 @@
|
|
|
13466
13555
|
},
|
|
13467
13556
|
{
|
|
13468
13557
|
"file": "packages/@ember/-internals/runtime/lib/system/core_object.d.ts",
|
|
13469
|
-
"line":
|
|
13558
|
+
"line": 53,
|
|
13470
13559
|
"description": "Destroyed object property flag. If this property is true the observers and bindings were\nalready removed by the effect of calling the destroy() method.",
|
|
13471
13560
|
"default": "false",
|
|
13472
13561
|
"class": "CoreObject",
|
|
@@ -13474,7 +13563,7 @@
|
|
|
13474
13563
|
},
|
|
13475
13564
|
{
|
|
13476
13565
|
"file": "packages/@ember/-internals/runtime/lib/system/core_object.d.ts",
|
|
13477
|
-
"line":
|
|
13566
|
+
"line": 59,
|
|
13478
13567
|
"description": "Destruction scheduled flag. The destroy() method has been called. The object stays intact\nuntil the end of the run loop at which point the isDestroyed flag is set.",
|
|
13479
13568
|
"default": "false",
|
|
13480
13569
|
"class": "CoreObject",
|
|
@@ -13482,7 +13571,7 @@
|
|
|
13482
13571
|
},
|
|
13483
13572
|
{
|
|
13484
13573
|
"file": "packages/@ember/-internals/runtime/lib/system/core_object.d.ts",
|
|
13485
|
-
"line":
|
|
13574
|
+
"line": 66,
|
|
13486
13575
|
"description": "Destroys an object by setting the `isDestroyed` flag and removing its\nmetadata, which effectively destroys observers and bindings.\nIf you try to set a property on a destroyed object, an exception will be\nraised.\nNote that destruction is scheduled for the end of the run loop and does not\nhappen immediately. It will set an isDestroying flag immediately.",
|
|
13487
13576
|
"return": {
|
|
13488
13577
|
"description": "receiver"
|
|
@@ -13492,14 +13581,14 @@
|
|
|
13492
13581
|
},
|
|
13493
13582
|
{
|
|
13494
13583
|
"file": "packages/@ember/-internals/runtime/lib/system/core_object.d.ts",
|
|
13495
|
-
"line":
|
|
13584
|
+
"line": 77,
|
|
13496
13585
|
"description": "Override to implement teardown.",
|
|
13497
13586
|
"class": "CoreObject",
|
|
13498
13587
|
"module": "@ember/array"
|
|
13499
13588
|
},
|
|
13500
13589
|
{
|
|
13501
13590
|
"file": "packages/@ember/-internals/runtime/lib/system/core_object.d.ts",
|
|
13502
|
-
"line":
|
|
13591
|
+
"line": 82,
|
|
13503
13592
|
"description": "Returns a string representation which attempts to provide more information than Javascript's toString\ntypically does, in a generic way for all Ember objects (e.g., \"<App.Person:ember1024>\").",
|
|
13504
13593
|
"return": {
|
|
13505
13594
|
"description": "string representation"
|
|
@@ -13509,19 +13598,19 @@
|
|
|
13509
13598
|
},
|
|
13510
13599
|
{
|
|
13511
13600
|
"file": "packages/@ember/-internals/runtime/lib/system/core_object.d.ts",
|
|
13512
|
-
"line":
|
|
13601
|
+
"line": 94,
|
|
13513
13602
|
"class": "CoreObject",
|
|
13514
13603
|
"module": "@ember/array"
|
|
13515
13604
|
},
|
|
13516
13605
|
{
|
|
13517
13606
|
"file": "packages/@ember/-internals/runtime/lib/system/core_object.d.ts",
|
|
13518
|
-
"line":
|
|
13607
|
+
"line": 100,
|
|
13519
13608
|
"class": "CoreObject",
|
|
13520
13609
|
"module": "@ember/array"
|
|
13521
13610
|
},
|
|
13522
13611
|
{
|
|
13523
13612
|
"file": "packages/@ember/-internals/runtime/lib/system/core_object.d.ts",
|
|
13524
|
-
"line":
|
|
13613
|
+
"line": 103,
|
|
13525
13614
|
"description": "Iterate over each computed property for the class, passing its name and any\nassociated metadata (see metaForProperty) to the callback.",
|
|
13526
13615
|
"internal": "",
|
|
13527
13616
|
"class": "CoreObject",
|
|
@@ -13529,7 +13618,7 @@
|
|
|
13529
13618
|
},
|
|
13530
13619
|
{
|
|
13531
13620
|
"file": "packages/@ember/-internals/runtime/lib/system/core_object.d.ts",
|
|
13532
|
-
"line":
|
|
13621
|
+
"line": 109,
|
|
13533
13622
|
"description": "Returns the original hash that was passed to meta().",
|
|
13534
13623
|
"params": [
|
|
13535
13624
|
{
|
|
@@ -13543,13 +13632,13 @@
|
|
|
13543
13632
|
},
|
|
13544
13633
|
{
|
|
13545
13634
|
"file": "packages/@ember/-internals/runtime/lib/system/core_object.d.ts",
|
|
13546
|
-
"line":
|
|
13635
|
+
"line": 116,
|
|
13547
13636
|
"class": "CoreObject",
|
|
13548
13637
|
"module": "@ember/array"
|
|
13549
13638
|
},
|
|
13550
13639
|
{
|
|
13551
13640
|
"file": "packages/@ember/-internals/runtime/lib/system/core_object.d.ts",
|
|
13552
|
-
"line":
|
|
13641
|
+
"line": 119,
|
|
13553
13642
|
"class": "CoreObject",
|
|
13554
13643
|
"module": "@ember/array"
|
|
13555
13644
|
},
|
|
@@ -13803,8 +13892,8 @@
|
|
|
13803
13892
|
"module": "@ember/application"
|
|
13804
13893
|
},
|
|
13805
13894
|
{
|
|
13806
|
-
"file": "packages/@ember/-internals/runtime/lib/compare.
|
|
13807
|
-
"line":
|
|
13895
|
+
"file": "packages/@ember/-internals/runtime/lib/compare.ts",
|
|
13896
|
+
"line": 48,
|
|
13808
13897
|
"description": "Compares two javascript values and returns:\n\n - -1 if the first is smaller than the second,\n - 0 if both are equal,\n - 1 if the first is greater than the second.\n\n ```javascript\n import { compare } from '@ember/utils';\n\n compare('hello', 'hello'); // 0\n compare('abc', 'dfg'); // -1\n compare(2, 1); // 1\n ```\n\nIf the types of the two objects are different precedence occurs in the\nfollowing order, with types earlier in the list considered `<` types\nlater in the list:\n\n - undefined\n - null\n - boolean\n - number\n - string\n - array\n - object\n - instance\n - function\n - class\n - date\n\n ```javascript\n import { compare } from '@ember/utils';\n\n compare('hello', 50); // 1\n compare(50, 'hello'); // -1\n ```",
|
|
13809
13898
|
"itemtype": "method",
|
|
13810
13899
|
"name": "compare",
|
|
@@ -13831,7 +13920,7 @@
|
|
|
13831
13920
|
"module": "@ember/utils"
|
|
13832
13921
|
},
|
|
13833
13922
|
{
|
|
13834
|
-
"file": "packages/@ember/-internals/runtime/lib/is-equal.
|
|
13923
|
+
"file": "packages/@ember/-internals/runtime/lib/is-equal.ts",
|
|
13835
13924
|
"line": 4,
|
|
13836
13925
|
"description": "Compares two objects, returning true if they are equal.\n\n```javascript\nimport { isEqual } from '@ember/utils';\n\nisEqual('hello', 'hello'); // true\nisEqual(1, 2); // false\n```\n\n`isEqual` is a more specific comparison than a triple equal comparison.\nIt will call the `isEqual` instance method on the objects being\ncompared, allowing finer control over when objects should be considered\nequal to each other.\n\n```javascript\nimport { isEqual } from '@ember/utils';\nimport EmberObject from '@ember/object';\n\nlet Person = EmberObject.extend({\n isEqual(other) { return this.ssn == other.ssn; }\n});\n\nlet personA = Person.create({name: 'Muhammad Ali', ssn: '123-45-6789'});\nlet personB = Person.create({name: 'Cassius Clay', ssn: '123-45-6789'});\n\nisEqual(personA, personB); // true\n```\n\nDue to the expense of array comparisons, collections will never be equal to\neach other even if each of their items are equal to each other.\n\n```javascript\nimport { isEqual } from '@ember/utils';\n\nisEqual([4, 2], [4, 2]); // false\n```",
|
|
13837
13926
|
"itemtype": "method",
|
|
@@ -13859,8 +13948,8 @@
|
|
|
13859
13948
|
"module": "@ember/utils"
|
|
13860
13949
|
},
|
|
13861
13950
|
{
|
|
13862
|
-
"file": "packages/@ember/-internals/runtime/lib/type-of.
|
|
13863
|
-
"line":
|
|
13951
|
+
"file": "packages/@ember/-internals/runtime/lib/type-of.ts",
|
|
13952
|
+
"line": 40,
|
|
13864
13953
|
"description": "Returns a consistent type for the passed object.\n\nUse this instead of the built-in `typeof` to get the type of an item.\nIt will return the same result across all browsers and includes a bit\nmore detail. Here is what will be returned:\n\n | Return Value | Meaning |\n |---------------|------------------------------------------------------|\n | 'string' | String primitive or String object. |\n | 'number' | Number primitive or Number object. |\n | 'boolean' | Boolean primitive or Boolean object. |\n | 'null' | Null value |\n | 'undefined' | Undefined value |\n | 'function' | A function |\n | 'array' | An instance of Array |\n | 'regexp' | An instance of RegExp |\n | 'date' | An instance of Date |\n | 'filelist' | An instance of FileList |\n | 'class' | An Ember class (created using EmberObject.extend()) |\n | 'instance' | An Ember object instance |\n | 'error' | An instance of the Error object |\n | 'object' | A JavaScript object not inheriting from EmberObject |\n\nExamples:\n\n```javascript\nimport { A } from '@ember/array';\nimport { typeOf } from '@ember/utils';\nimport EmberObject from '@ember/object';\n\ntypeOf(); // 'undefined'\ntypeOf(null); // 'null'\ntypeOf(undefined); // 'undefined'\ntypeOf('michael'); // 'string'\ntypeOf(new String('michael')); // 'string'\ntypeOf(101); // 'number'\ntypeOf(new Number(101)); // 'number'\ntypeOf(true); // 'boolean'\ntypeOf(new Boolean(true)); // 'boolean'\ntypeOf(A); // 'function'\ntypeOf(A()); // 'array'\ntypeOf([1, 2, 90]); // 'array'\ntypeOf(/abc/); // 'regexp'\ntypeOf(new Date()); // 'date'\ntypeOf(event.target.files); // 'filelist'\ntypeOf(EmberObject.extend()); // 'class'\ntypeOf(EmberObject.create()); // 'instance'\ntypeOf(new Error('teamocil')); // 'error'\n\n// 'normal' JavaScript object\ntypeOf({ a: 'b' }); // 'object'\n```",
|
|
13865
13954
|
"itemtype": "method",
|
|
13866
13955
|
"name": "typeOf",
|
|
@@ -15240,7 +15329,7 @@
|
|
|
15240
15329
|
"itemtype": "property",
|
|
15241
15330
|
"name": "_renderMode",
|
|
15242
15331
|
"type": "string",
|
|
15243
|
-
"default": "
|
|
15332
|
+
"default": "undefined",
|
|
15244
15333
|
"access": "private",
|
|
15245
15334
|
"tagname": "",
|
|
15246
15335
|
"class": "ApplicationInstance.BootOptions",
|
|
@@ -15319,7 +15408,7 @@
|
|
|
15319
15408
|
},
|
|
15320
15409
|
{
|
|
15321
15410
|
"file": "packages/@ember/canary-features/index.ts",
|
|
15322
|
-
"line":
|
|
15411
|
+
"line": 33,
|
|
15323
15412
|
"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.",
|
|
15324
15413
|
"itemtype": "method",
|
|
15325
15414
|
"name": "isEnabled",
|
|
@@ -15843,8 +15932,8 @@
|
|
|
15843
15932
|
"module": "@ember/destroyable"
|
|
15844
15933
|
},
|
|
15845
15934
|
{
|
|
15846
|
-
"file": "packages/@ember/engine/lib/engine-parent.
|
|
15847
|
-
"line":
|
|
15935
|
+
"file": "packages/@ember/engine/lib/engine-parent.ts",
|
|
15936
|
+
"line": 9,
|
|
15848
15937
|
"description": "`getEngineParent` retrieves an engine instance's parent instance.",
|
|
15849
15938
|
"itemtype": "method",
|
|
15850
15939
|
"name": "getEngineParent",
|
|
@@ -15866,8 +15955,8 @@
|
|
|
15866
15955
|
"module": "@ember/engine"
|
|
15867
15956
|
},
|
|
15868
15957
|
{
|
|
15869
|
-
"file": "packages/@ember/engine/lib/engine-parent.
|
|
15870
|
-
"line":
|
|
15958
|
+
"file": "packages/@ember/engine/lib/engine-parent.ts",
|
|
15959
|
+
"line": 23,
|
|
15871
15960
|
"description": "`setEngineParent` sets an engine instance's parent instance.",
|
|
15872
15961
|
"itemtype": "method",
|
|
15873
15962
|
"name": "setEngineParent",
|
|
@@ -17217,32 +17306,32 @@
|
|
|
17217
17306
|
},
|
|
17218
17307
|
{
|
|
17219
17308
|
"file": "packages/@ember/object/type-tests/core/index.test.ts",
|
|
17220
|
-
"line":
|
|
17309
|
+
"line": 10,
|
|
17221
17310
|
"class": "@ember/object/compat",
|
|
17222
17311
|
"module": "@ember/object"
|
|
17223
17312
|
},
|
|
17224
17313
|
{
|
|
17225
17314
|
"file": "packages/@ember/object/type-tests/core/index.test.ts",
|
|
17226
|
-
"line":
|
|
17315
|
+
"line": 19,
|
|
17227
17316
|
"class": "@ember/object/compat",
|
|
17228
17317
|
"module": "@ember/object"
|
|
17229
17318
|
},
|
|
17230
17319
|
{
|
|
17231
17320
|
"file": "packages/@ember/object/type-tests/core/index.test.ts",
|
|
17232
|
-
"line":
|
|
17321
|
+
"line": 27,
|
|
17233
17322
|
"class": "@ember/object/compat",
|
|
17234
17323
|
"module": "@ember/object"
|
|
17235
17324
|
},
|
|
17236
17325
|
{
|
|
17237
17326
|
"file": "packages/@ember/object/type-tests/ember-object.test.ts",
|
|
17238
|
-
"line":
|
|
17327
|
+
"line": 11,
|
|
17239
17328
|
"description": "Zero-argument case",
|
|
17240
17329
|
"class": "@ember/object/compat",
|
|
17241
17330
|
"module": "@ember/object"
|
|
17242
17331
|
},
|
|
17243
17332
|
{
|
|
17244
17333
|
"file": "packages/@ember/object/type-tests/ember-object.test.ts",
|
|
17245
|
-
"line":
|
|
17334
|
+
"line": 22,
|
|
17246
17335
|
"description": "One-argument case",
|
|
17247
17336
|
"class": "@ember/object/compat",
|
|
17248
17337
|
"module": "@ember/object"
|
|
@@ -17323,8 +17412,8 @@
|
|
|
17323
17412
|
"module": "@ember/polyfills"
|
|
17324
17413
|
},
|
|
17325
17414
|
{
|
|
17326
|
-
"file": "packages/@ember/runloop/index.
|
|
17327
|
-
"line":
|
|
17415
|
+
"file": "packages/@ember/runloop/index.ts",
|
|
17416
|
+
"line": 60,
|
|
17328
17417
|
"description": "Array of named queues. This array determines the order in which queues\nare flushed at the end of the RunLoop. You can define your own queues by\nsimply adding the queue name to this array. Normally you should not need\nto inspect or modify this property.",
|
|
17329
17418
|
"itemtype": "property",
|
|
17330
17419
|
"name": "queues",
|
|
@@ -17336,8 +17425,8 @@
|
|
|
17336
17425
|
"module": "@ember/polyfills"
|
|
17337
17426
|
},
|
|
17338
17427
|
{
|
|
17339
|
-
"file": "packages/@ember/runloop/index.
|
|
17340
|
-
"line":
|
|
17428
|
+
"file": "packages/@ember/runloop/index.ts",
|
|
17429
|
+
"line": 103,
|
|
17341
17430
|
"description": "Runs the passed target and method inside of a RunLoop, ensuring any\ndeferred actions including bindings and views updates are flushed at the\nend.\n\nNormally you should not need to invoke this method yourself. However if\nyou are implementing raw event handlers when interfacing with other\nlibraries or plugins, you should probably wrap all of your code inside this\ncall.\n\n```javascript\nimport { run } from '@ember/runloop';\n\nrun(function() {\n // code to be executed within a RunLoop\n});\n```",
|
|
17342
17431
|
"itemtype": "method",
|
|
17343
17432
|
"name": "run",
|
|
@@ -17371,8 +17460,8 @@
|
|
|
17371
17460
|
"module": "@ember/runloop"
|
|
17372
17461
|
},
|
|
17373
17462
|
{
|
|
17374
|
-
"file": "packages/@ember/runloop/index.
|
|
17375
|
-
"line":
|
|
17463
|
+
"file": "packages/@ember/runloop/index.ts",
|
|
17464
|
+
"line": 147,
|
|
17376
17465
|
"description": "If no run-loop is present, it creates a new one. If a run loop is\npresent it will queue itself to run on the existing run-loops action\nqueue.\n\nPlease note: This is not for normal usage, and should be used sparingly.\n\nIf invoked when not within a run loop:\n\n```javascript\nimport { join } from '@ember/runloop';\n\njoin(function() {\n // creates a new run-loop\n});\n```\n\nAlternatively, if called within an existing run loop:\n\n```javascript\nimport { run, join } from '@ember/runloop';\n\nrun(function() {\n // creates a new run-loop\n\n join(function() {\n // joins with the existing run-loop, and queues for invocation on\n // the existing run-loops action queue.\n });\n});\n```",
|
|
17377
17466
|
"itemtype": "method",
|
|
17378
17467
|
"name": "join",
|
|
@@ -17406,8 +17495,8 @@
|
|
|
17406
17495
|
"module": "@ember/runloop"
|
|
17407
17496
|
},
|
|
17408
17497
|
{
|
|
17409
|
-
"file": "packages/@ember/runloop/index.
|
|
17410
|
-
"line":
|
|
17498
|
+
"file": "packages/@ember/runloop/index.ts",
|
|
17499
|
+
"line": 209,
|
|
17411
17500
|
"description": "Allows you to specify which context to call the specified function in while\nadding the execution of that function to the Ember run loop. This ability\nmakes this method a great way to asynchronously integrate third-party libraries\ninto your Ember application.\n\n`bind` takes two main arguments, the desired context and the function to\ninvoke in that context. Any additional arguments will be supplied as arguments\nto the function that is passed in.\n\nLet's use the creation of a TinyMCE component as an example. Currently,\nTinyMCE provides a setup configuration option we can use to do some processing\nafter the TinyMCE instance is initialized but before it is actually rendered.\nWe can use that setup option to do some additional setup for our component.\nThe component itself could look something like the following:\n\n```app/components/rich-text-editor.js\nimport Component from '@ember/component';\nimport { on } from '@ember/object/evented';\nimport { bind } from '@ember/runloop';\n\nexport default Component.extend({\n initializeTinyMCE: on('didInsertElement', function() {\n tinymce.init({\n selector: '#' + this.$().prop('id'),\n setup: bind(this, this.setupEditor)\n });\n }),\n\n didInsertElement() {\n tinymce.init({\n selector: '#' + this.$().prop('id'),\n setup: bind(this, this.setupEditor)\n });\n }\n\n setupEditor(editor) {\n this.set('editor', editor);\n\n editor.on('change', function() {\n console.log('content changed!');\n });\n }\n});\n```\n\nIn this example, we use `bind` to bind the setupEditor method to the\ncontext of the RichTextEditor component and to have the invocation of that\nmethod be safely handled and executed by the Ember run loop.",
|
|
17412
17501
|
"itemtype": "method",
|
|
17413
17502
|
"name": "bind",
|
|
@@ -17442,8 +17531,8 @@
|
|
|
17442
17531
|
"module": "@ember/runloop"
|
|
17443
17532
|
},
|
|
17444
17533
|
{
|
|
17445
|
-
"file": "packages/@ember/runloop/index.
|
|
17446
|
-
"line":
|
|
17534
|
+
"file": "packages/@ember/runloop/index.ts",
|
|
17535
|
+
"line": 323,
|
|
17447
17536
|
"description": "Begins a new RunLoop. Any deferred actions invoked after the begin will\nbe buffered until you invoke a matching call to `end()`. This is\na lower-level way to use a RunLoop instead of using `run()`.\n\n```javascript\nimport { begin, end } from '@ember/runloop';\n\nbegin();\n// code to be executed within a RunLoop\nend();\n```",
|
|
17448
17537
|
"itemtype": "method",
|
|
17449
17538
|
"name": "begin",
|
|
@@ -17458,8 +17547,8 @@
|
|
|
17458
17547
|
"module": "@ember/runloop"
|
|
17459
17548
|
},
|
|
17460
17549
|
{
|
|
17461
|
-
"file": "packages/@ember/runloop/index.
|
|
17462
|
-
"line":
|
|
17550
|
+
"file": "packages/@ember/runloop/index.ts",
|
|
17551
|
+
"line": 346,
|
|
17463
17552
|
"description": "Ends a RunLoop. This must be called sometime after you call\n`begin()` to flush any deferred actions. This is a lower-level way\nto use a RunLoop instead of using `run()`.\n\n```javascript\nimport { begin, end } from '@ember/runloop';\n\nbegin();\n// code to be executed within a RunLoop\nend();\n```",
|
|
17464
17553
|
"itemtype": "method",
|
|
17465
17554
|
"name": "end",
|
|
@@ -17474,8 +17563,8 @@
|
|
|
17474
17563
|
"module": "@ember/runloop"
|
|
17475
17564
|
},
|
|
17476
17565
|
{
|
|
17477
|
-
"file": "packages/@ember/runloop/index.
|
|
17478
|
-
"line":
|
|
17566
|
+
"file": "packages/@ember/runloop/index.ts",
|
|
17567
|
+
"line": 369,
|
|
17479
17568
|
"description": "Adds the passed target/method and any optional arguments to the named\nqueue to be executed at the end of the RunLoop. If you have not already\nstarted a RunLoop when calling this method one will be started for you\nautomatically.\n\nAt the end of a RunLoop, any methods scheduled in this way will be invoked.\nMethods will be invoked in an order matching the named queues defined in\nthe `queues` property.\n\n```javascript\nimport { schedule } from '@ember/runloop';\n\nschedule('afterRender', this, function() {\n // this will be executed in the 'afterRender' queue\n console.log('scheduled on afterRender queue');\n});\n\nschedule('actions', this, function() {\n // this will be executed in the 'actions' queue\n console.log('scheduled on actions queue');\n});\n\n// Note the functions will be run in order based on the run queues order.\n// Output would be:\n// scheduled on actions queue\n// scheduled on afterRender queue\n```",
|
|
17480
17569
|
"itemtype": "method",
|
|
17481
17570
|
"name": "schedule",
|
|
@@ -17514,8 +17603,8 @@
|
|
|
17514
17603
|
"module": "@ember/runloop"
|
|
17515
17604
|
},
|
|
17516
17605
|
{
|
|
17517
|
-
"file": "packages/@ember/runloop/index.
|
|
17518
|
-
"line":
|
|
17606
|
+
"file": "packages/@ember/runloop/index.ts",
|
|
17607
|
+
"line": 442,
|
|
17519
17608
|
"description": "Invokes the passed target/method and optional arguments after a specified\nperiod of time. The last parameter of this method must always be a number\nof milliseconds.\n\nYou should use this method whenever you need to run some action after a\nperiod of time instead of using `setTimeout()`. This method will ensure that\nitems that expire during the same script execution cycle all execute\ntogether, which is often more efficient than using a real setTimeout.\n\n```javascript\nimport { later } from '@ember/runloop';\n\nlater(myContext, function() {\n // code here will execute within a RunLoop in about 500ms with this == myContext\n}, 500);\n```",
|
|
17520
17609
|
"itemtype": "method",
|
|
17521
17610
|
"name": "later",
|
|
@@ -17554,8 +17643,8 @@
|
|
|
17554
17643
|
"module": "@ember/runloop"
|
|
17555
17644
|
},
|
|
17556
17645
|
{
|
|
17557
|
-
"file": "packages/@ember/runloop/index.
|
|
17558
|
-
"line":
|
|
17646
|
+
"file": "packages/@ember/runloop/index.ts",
|
|
17647
|
+
"line": 493,
|
|
17559
17648
|
"description": "Schedule a function to run one time during the current RunLoop. This is equivalent\n to calling `scheduleOnce` with the \"actions\" queue.",
|
|
17560
17649
|
"itemtype": "method",
|
|
17561
17650
|
"name": "once",
|
|
@@ -17589,8 +17678,8 @@
|
|
|
17589
17678
|
"module": "@ember/runloop"
|
|
17590
17679
|
},
|
|
17591
17680
|
{
|
|
17592
|
-
"file": "packages/@ember/runloop/index.
|
|
17593
|
-
"line":
|
|
17681
|
+
"file": "packages/@ember/runloop/index.ts",
|
|
17682
|
+
"line": 524,
|
|
17594
17683
|
"description": "Schedules a function to run one time in a given queue of the current RunLoop.\nCalling this method with the same queue/target/method combination will have\nno effect (past the initial call).\n\nNote that although you can pass optional arguments these will not be\nconsidered when looking for duplicates. New arguments will replace previous\ncalls.\n\n```javascript\nimport { run, scheduleOnce } from '@ember/runloop';\n\nfunction sayHi() {\n console.log('hi');\n}\n\nrun(function() {\n scheduleOnce('afterRender', myContext, sayHi);\n scheduleOnce('afterRender', myContext, sayHi);\n // sayHi will only be executed once, in the afterRender queue of the RunLoop\n});\n```\n\nAlso note that for `scheduleOnce` to prevent additional calls, you need to\npass the same function instance. The following case works as expected:\n\n```javascript\nfunction log() {\n console.log('Logging only once');\n}\n\nfunction scheduleIt() {\n scheduleOnce('actions', myContext, log);\n}\n\nscheduleIt();\nscheduleIt();\n```\n\nBut this other case will schedule the function multiple times:\n\n```javascript\nimport { scheduleOnce } from '@ember/runloop';\n\nfunction scheduleIt() {\n scheduleOnce('actions', myContext, function() {\n console.log('Closure');\n });\n}\n\nscheduleIt();\nscheduleIt();\n\n// \"Closure\" will print twice, even though we're using `scheduleOnce`,\n// because the function we pass to it won't match the\n// previously scheduled operation.\n```\n\nAvailable queues, and their order, can be found at `queues`",
|
|
17595
17684
|
"itemtype": "method",
|
|
17596
17685
|
"name": "scheduleOnce",
|
|
@@ -17630,8 +17719,8 @@
|
|
|
17630
17719
|
"module": "@ember/runloop"
|
|
17631
17720
|
},
|
|
17632
17721
|
{
|
|
17633
|
-
"file": "packages/@ember/runloop/index.
|
|
17634
|
-
"line":
|
|
17722
|
+
"file": "packages/@ember/runloop/index.ts",
|
|
17723
|
+
"line": 618,
|
|
17635
17724
|
"description": "Schedules an item to run from within a separate run loop, after\ncontrol has been returned to the system. This is equivalent to calling\n`later` with a wait time of 1ms.\n\n```javascript\nimport { next } from '@ember/runloop';\n\nnext(myContext, function() {\n // code to be executed in the next run loop,\n // which will be scheduled after the current one\n});\n```\n\nMultiple operations scheduled with `next` will coalesce\ninto the same later run loop, along with any other operations\nscheduled by `later` that expire right around the same\ntime that `next` operations will fire.\n\nNote that there are often alternatives to using `next`.\nFor instance, if you'd like to schedule an operation to happen\nafter all DOM element operations have completed within the current\nrun loop, you can make use of the `afterRender` run loop queue (added\nby the `ember-views` package, along with the preceding `render` queue\nwhere all the DOM element operations happen).\n\nExample:\n\n```app/components/my-component.js\nimport Component from '@ember/component';\nimport { scheduleOnce } from '@ember/runloop';\n\nexport Component.extend({\n didInsertElement() {\n this._super(...arguments);\n scheduleOnce('afterRender', this, 'processChildElements');\n },\n\n processChildElements() {\n // ... do something with component's child component\n // elements after they've finished rendering, which\n // can't be done within this component's\n // `didInsertElement` hook because that gets run\n // before the child elements have been added to the DOM.\n }\n});\n```\n\nOne benefit of the above approach compared to using `next` is\nthat you will be able to perform DOM/CSS operations before unprocessed\nelements are rendered to the screen, which may prevent flickering or\nother artifacts caused by delaying processing until after rendering.\n\nThe other major benefit to the above approach is that `next`\nintroduces an element of non-determinism, which can make things much\nharder to test, due to its reliance on `setTimeout`; it's much harder\nto guarantee the order of scheduled operations when they are scheduled\noutside of the current run loop, i.e. with `next`.",
|
|
17636
17725
|
"itemtype": "method",
|
|
17637
17726
|
"name": "next",
|
|
@@ -17665,8 +17754,8 @@
|
|
|
17665
17754
|
"module": "@ember/runloop"
|
|
17666
17755
|
},
|
|
17667
17756
|
{
|
|
17668
|
-
"file": "packages/@ember/runloop/index.
|
|
17669
|
-
"line":
|
|
17757
|
+
"file": "packages/@ember/runloop/index.ts",
|
|
17758
|
+
"line": 703,
|
|
17670
17759
|
"description": "Cancels a scheduled item. Must be a value returned by `later()`,\n`once()`, `scheduleOnce()`, `next()`, `debounce()`, or\n`throttle()`.\n\n```javascript\nimport {\n next,\n cancel,\n later,\n scheduleOnce,\n once,\n throttle,\n debounce\n} from '@ember/runloop';\n\nlet runNext = next(myContext, function() {\n // will not be executed\n});\n\ncancel(runNext);\n\nlet runLater = later(myContext, function() {\n // will not be executed\n}, 500);\n\ncancel(runLater);\n\nlet runScheduleOnce = scheduleOnce('afterRender', myContext, function() {\n // will not be executed\n});\n\ncancel(runScheduleOnce);\n\nlet runOnce = once(myContext, function() {\n // will not be executed\n});\n\ncancel(runOnce);\n\nlet throttle = throttle(myContext, function() {\n // will not be executed\n}, 1, false);\n\ncancel(throttle);\n\nlet debounce = debounce(myContext, function() {\n // will not be executed\n}, 1);\n\ncancel(debounce);\n\nlet debounceImmediate = debounce(myContext, function() {\n // will be executed since we passed in true (immediate)\n}, 100, true);\n\n// the 100ms delay until this method can be called again will be canceled\ncancel(debounceImmediate);\n```",
|
|
17671
17760
|
"itemtype": "method",
|
|
17672
17761
|
"name": "cancel",
|
|
@@ -17688,8 +17777,8 @@
|
|
|
17688
17777
|
"module": "@ember/runloop"
|
|
17689
17778
|
},
|
|
17690
17779
|
{
|
|
17691
|
-
"file": "packages/@ember/runloop/index.
|
|
17692
|
-
"line":
|
|
17780
|
+
"file": "packages/@ember/runloop/index.ts",
|
|
17781
|
+
"line": 774,
|
|
17693
17782
|
"description": "Delay calling the target method until the debounce period has elapsed\nwith no additional debounce calls. If `debounce` is called again before\nthe specified time has elapsed, the timer is reset and the entire period\nmust pass again before the target method is called.\n\nThis method should be used when an event may be called multiple times\nbut the action should only be called once when the event is done firing.\nA common example is for scroll events where you only want updates to\nhappen once scrolling has ceased.\n\n```javascript\nimport { debounce } from '@ember/runloop';\n\nfunction whoRan() {\n console.log(this.name + ' ran.');\n}\n\nlet myContext = { name: 'debounce' };\n\ndebounce(myContext, whoRan, 150);\n\n// less than 150ms passes\ndebounce(myContext, whoRan, 150);\n\n// 150ms passes\n// whoRan is invoked with context myContext\n// console logs 'debounce ran.' one time.\n```\n\nImmediate allows you to run the function immediately, but debounce\nother calls for this function until the wait time has elapsed. If\n`debounce` is called again before the specified time has elapsed,\nthe timer is reset and the entire period must pass again before\nthe method can be called again.\n\n```javascript\nimport { debounce } from '@ember/runloop';\n\nfunction whoRan() {\n console.log(this.name + ' ran.');\n}\n\nlet myContext = { name: 'debounce' };\n\ndebounce(myContext, whoRan, 150, true);\n\n// console logs 'debounce ran.' one time immediately.\n// 100ms passes\ndebounce(myContext, whoRan, 150, true);\n\n// 150ms passes and nothing else is logged to the console and\n// the debouncee is no longer being watched\ndebounce(myContext, whoRan, 150, true);\n\n// console logs 'debounce ran.' one time immediately.\n// 150ms passes and nothing else is logged to the console and\n// the debouncee is no longer being watched\n```",
|
|
17694
17783
|
"itemtype": "method",
|
|
17695
17784
|
"name": "debounce",
|
|
@@ -17733,8 +17822,8 @@
|
|
|
17733
17822
|
"module": "@ember/runloop"
|
|
17734
17823
|
},
|
|
17735
17824
|
{
|
|
17736
|
-
"file": "packages/@ember/runloop/index.
|
|
17737
|
-
"line":
|
|
17825
|
+
"file": "packages/@ember/runloop/index.ts",
|
|
17826
|
+
"line": 871,
|
|
17738
17827
|
"description": "Ensure that the target method is never called more frequently than\nthe specified spacing period. The target method is called immediately.\n\n```javascript\nimport { throttle } from '@ember/runloop';\n\nfunction whoRan() {\n console.log(this.name + ' ran.');\n}\n\nlet myContext = { name: 'throttle' };\n\nthrottle(myContext, whoRan, 150);\n// whoRan is invoked with context myContext\n// console logs 'throttle ran.'\n\n// 50ms passes\nthrottle(myContext, whoRan, 150);\n\n// 50ms passes\nthrottle(myContext, whoRan, 150);\n\n// 150ms passes\nthrottle(myContext, whoRan, 150);\n// whoRan is invoked with context myContext\n// console logs 'throttle ran.'\n```",
|
|
17739
17828
|
"itemtype": "method",
|
|
17740
17829
|
"name": "throttle",
|
|
@@ -18503,15 +18592,15 @@
|
|
|
18503
18592
|
},
|
|
18504
18593
|
{
|
|
18505
18594
|
"message": "replacing incorrect tag: returns with return",
|
|
18506
|
-
"line": " packages/@ember/-internals/routing/lib/system/route.ts:
|
|
18595
|
+
"line": " packages/@ember/-internals/routing/lib/system/route.ts:2418"
|
|
18507
18596
|
},
|
|
18508
18597
|
{
|
|
18509
18598
|
"message": "unknown tag: internal",
|
|
18510
|
-
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:
|
|
18599
|
+
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:103"
|
|
18511
18600
|
},
|
|
18512
18601
|
{
|
|
18513
18602
|
"message": "unknown tag: internal",
|
|
18514
|
-
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:
|
|
18603
|
+
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:109"
|
|
18515
18604
|
},
|
|
18516
18605
|
{
|
|
18517
18606
|
"message": "replacing incorrect tag: function with method",
|
|
@@ -18599,11 +18688,11 @@
|
|
|
18599
18688
|
},
|
|
18600
18689
|
{
|
|
18601
18690
|
"message": "Missing item type",
|
|
18602
|
-
"line": " packages/@ember/-internals/glimmer/lib/views/outlet.ts:
|
|
18691
|
+
"line": " packages/@ember/-internals/glimmer/lib/views/outlet.ts:107"
|
|
18603
18692
|
},
|
|
18604
18693
|
{
|
|
18605
18694
|
"message": "Missing item type",
|
|
18606
|
-
"line": " packages/@ember/-internals/glimmer/lib/views/outlet.ts:
|
|
18695
|
+
"line": " packages/@ember/-internals/glimmer/lib/views/outlet.ts:115"
|
|
18607
18696
|
},
|
|
18608
18697
|
{
|
|
18609
18698
|
"message": "Missing item type\nThe template-compiler does not support strict mode at this time.\nprecompile from ember-template-compiler returns a string and\nnot a template-factory, so it doesn't help with strict-mode testing.\n\nWe also can't import from `@ember/template-compiler` because it\ndoesn't exist to this kind of test, otherwise we'd be able to use\nprecompileTemplate, which would be perfect :D\n\nCopied(ish) from https://github.com/NullVoxPopuli/ember-repl/blob/main/addon/hbs.ts#L51",
|
|
@@ -18829,18 +18918,6 @@
|
|
|
18829
18918
|
"message": "Missing item type",
|
|
18830
18919
|
"line": " packages/@ember/-internals/metal/lib/tracked.ts:17"
|
|
18831
18920
|
},
|
|
18832
|
-
{
|
|
18833
|
-
"message": "Missing item type",
|
|
18834
|
-
"line": " packages/@ember/-internals/owner/index.ts:36"
|
|
18835
|
-
},
|
|
18836
|
-
{
|
|
18837
|
-
"message": "Missing item type",
|
|
18838
|
-
"line": " packages/@ember/-internals/owner/index.ts:38"
|
|
18839
|
-
},
|
|
18840
|
-
{
|
|
18841
|
-
"message": "Missing item type",
|
|
18842
|
-
"line": " packages/@ember/-internals/owner/index.ts:40"
|
|
18843
|
-
},
|
|
18844
18921
|
{
|
|
18845
18922
|
"message": "Missing item type",
|
|
18846
18923
|
"line": " packages/@ember/-internals/routing/lib/location/auto_location.ts:76"
|
|
@@ -18871,15 +18948,19 @@
|
|
|
18871
18948
|
},
|
|
18872
18949
|
{
|
|
18873
18950
|
"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`.",
|
|
18874
|
-
"line": " packages/@ember/-internals/routing/lib/system/router.ts:
|
|
18951
|
+
"line": " packages/@ember/-internals/routing/lib/system/router.ts:1633"
|
|
18875
18952
|
},
|
|
18876
18953
|
{
|
|
18877
18954
|
"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.",
|
|
18878
|
-
"line": " packages/@ember/-internals/routing/lib/system/router.ts:
|
|
18955
|
+
"line": " packages/@ember/-internals/routing/lib/system/router.ts:1654"
|
|
18879
18956
|
},
|
|
18880
18957
|
{
|
|
18881
18958
|
"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.",
|
|
18882
|
-
"line": " packages/@ember/-internals/routing/lib/system/router.ts:
|
|
18959
|
+
"line": " packages/@ember/-internals/routing/lib/system/router.ts:1676"
|
|
18960
|
+
},
|
|
18961
|
+
{
|
|
18962
|
+
"message": "Missing item type",
|
|
18963
|
+
"line": " packages/@ember/-internals/runtime/lib/mixins/container_proxy.d.ts:7"
|
|
18883
18964
|
},
|
|
18884
18965
|
{
|
|
18885
18966
|
"message": "Missing item type\nThis mixin allows for Ember objects to subscribe to and emit events.",
|
|
@@ -18953,81 +19034,85 @@
|
|
|
18953
19034
|
"message": "Missing item type\nReturns the cached value of a computed property, if it exists.\nThis allows you to inspect the value of a computed property\nwithout accidentally invoking it if it is intended to be\ngenerated lazily.",
|
|
18954
19035
|
"line": " packages/@ember/-internals/runtime/lib/mixins/observable.d.ts:80"
|
|
18955
19036
|
},
|
|
19037
|
+
{
|
|
19038
|
+
"message": "Missing item type",
|
|
19039
|
+
"line": " packages/@ember/-internals/runtime/lib/mixins/registry_proxy.d.ts:7"
|
|
19040
|
+
},
|
|
18956
19041
|
{
|
|
18957
19042
|
"message": "Missing item type\nUsed to infer the type of ember classes of type `T`.\n\nGenerally you would use `EmberClass.create()` instead of `new EmberClass()`.\n\nThe single-arg constructor is required by the typescript compiler.\nThe multi-arg constructor is included for better ergonomics.\n\nImplementation is carefully chosen for the reasons described in\nhttps://github.com/typed-ember/ember-typings/pull/29",
|
|
18958
|
-
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:
|
|
19043
|
+
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:3"
|
|
18959
19044
|
},
|
|
18960
19045
|
{
|
|
18961
19046
|
"message": "Missing item type",
|
|
18962
|
-
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:
|
|
19047
|
+
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:21"
|
|
18963
19048
|
},
|
|
18964
19049
|
{
|
|
18965
19050
|
"message": "Missing item type",
|
|
18966
|
-
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:
|
|
19051
|
+
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:27"
|
|
18967
19052
|
},
|
|
18968
19053
|
{
|
|
18969
19054
|
"message": "Missing item type",
|
|
18970
|
-
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:
|
|
19055
|
+
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:30"
|
|
18971
19056
|
},
|
|
18972
19057
|
{
|
|
18973
|
-
"message": "Missing item type\nCoreObject constructor takes
|
|
18974
|
-
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:
|
|
19058
|
+
"message": "Missing item type\nCoreObject constructor takes owner.",
|
|
19059
|
+
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:33"
|
|
18975
19060
|
},
|
|
18976
19061
|
{
|
|
18977
19062
|
"message": "Missing item type",
|
|
18978
|
-
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:
|
|
19063
|
+
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:38"
|
|
18979
19064
|
},
|
|
18980
19065
|
{
|
|
18981
19066
|
"message": "Missing item type\nAn overridable method called when objects are instantiated. By default,\ndoes nothing unless it is overridden during class definition.",
|
|
18982
|
-
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:
|
|
19067
|
+
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:41"
|
|
18983
19068
|
},
|
|
18984
19069
|
{
|
|
18985
19070
|
"message": "Missing item type\nDefines the properties that will be concatenated from the superclass (instead of overridden).",
|
|
18986
|
-
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:
|
|
19071
|
+
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:47"
|
|
18987
19072
|
},
|
|
18988
19073
|
{
|
|
18989
19074
|
"message": "Missing item type\nDestroyed object property flag. If this property is true the observers and bindings were\nalready removed by the effect of calling the destroy() method.",
|
|
18990
|
-
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:
|
|
19075
|
+
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:53"
|
|
18991
19076
|
},
|
|
18992
19077
|
{
|
|
18993
19078
|
"message": "Missing item type\nDestruction scheduled flag. The destroy() method has been called. The object stays intact\nuntil the end of the run loop at which point the isDestroyed flag is set.",
|
|
18994
|
-
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:
|
|
19079
|
+
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:59"
|
|
18995
19080
|
},
|
|
18996
19081
|
{
|
|
18997
19082
|
"message": "Missing item type\nDestroys an object by setting the `isDestroyed` flag and removing its\nmetadata, which effectively destroys observers and bindings.\nIf you try to set a property on a destroyed object, an exception will be\nraised.\nNote that destruction is scheduled for the end of the run loop and does not\nhappen immediately. It will set an isDestroying flag immediately.",
|
|
18998
|
-
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:
|
|
19083
|
+
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:66"
|
|
18999
19084
|
},
|
|
19000
19085
|
{
|
|
19001
19086
|
"message": "Missing item type\nOverride to implement teardown.",
|
|
19002
|
-
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:
|
|
19087
|
+
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:77"
|
|
19003
19088
|
},
|
|
19004
19089
|
{
|
|
19005
19090
|
"message": "Missing item type\nReturns a string representation which attempts to provide more information than Javascript's toString\ntypically does, in a generic way for all Ember objects (e.g., \"<App.Person:ember1024>\").",
|
|
19006
|
-
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:
|
|
19091
|
+
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:82"
|
|
19007
19092
|
},
|
|
19008
19093
|
{
|
|
19009
19094
|
"message": "Missing item type",
|
|
19010
|
-
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:
|
|
19095
|
+
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:94"
|
|
19011
19096
|
},
|
|
19012
19097
|
{
|
|
19013
19098
|
"message": "Missing item type",
|
|
19014
|
-
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:
|
|
19099
|
+
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:100"
|
|
19015
19100
|
},
|
|
19016
19101
|
{
|
|
19017
19102
|
"message": "Missing item type\nIterate over each computed property for the class, passing its name and any\nassociated metadata (see metaForProperty) to the callback.",
|
|
19018
|
-
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:
|
|
19103
|
+
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:103"
|
|
19019
19104
|
},
|
|
19020
19105
|
{
|
|
19021
19106
|
"message": "Missing item type\nReturns the original hash that was passed to meta().",
|
|
19022
|
-
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:
|
|
19107
|
+
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:109"
|
|
19023
19108
|
},
|
|
19024
19109
|
{
|
|
19025
19110
|
"message": "Missing item type",
|
|
19026
|
-
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:
|
|
19111
|
+
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:116"
|
|
19027
19112
|
},
|
|
19028
19113
|
{
|
|
19029
19114
|
"message": "Missing item type",
|
|
19030
|
-
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:
|
|
19115
|
+
"line": " packages/@ember/-internals/runtime/lib/system/core_object.d.ts:119"
|
|
19031
19116
|
},
|
|
19032
19117
|
{
|
|
19033
19118
|
"message": "Missing item type",
|
|
@@ -19091,23 +19176,23 @@
|
|
|
19091
19176
|
},
|
|
19092
19177
|
{
|
|
19093
19178
|
"message": "Missing item type",
|
|
19094
|
-
"line": " packages/@ember/object/type-tests/core/index.test.ts:
|
|
19179
|
+
"line": " packages/@ember/object/type-tests/core/index.test.ts:10"
|
|
19095
19180
|
},
|
|
19096
19181
|
{
|
|
19097
19182
|
"message": "Missing item type",
|
|
19098
|
-
"line": " packages/@ember/object/type-tests/core/index.test.ts:
|
|
19183
|
+
"line": " packages/@ember/object/type-tests/core/index.test.ts:19"
|
|
19099
19184
|
},
|
|
19100
19185
|
{
|
|
19101
19186
|
"message": "Missing item type",
|
|
19102
|
-
"line": " packages/@ember/object/type-tests/core/index.test.ts:
|
|
19187
|
+
"line": " packages/@ember/object/type-tests/core/index.test.ts:27"
|
|
19103
19188
|
},
|
|
19104
19189
|
{
|
|
19105
19190
|
"message": "Missing item type\nZero-argument case",
|
|
19106
|
-
"line": " packages/@ember/object/type-tests/ember-object.test.ts:
|
|
19191
|
+
"line": " packages/@ember/object/type-tests/ember-object.test.ts:11"
|
|
19107
19192
|
},
|
|
19108
19193
|
{
|
|
19109
19194
|
"message": "Missing item type\nOne-argument case",
|
|
19110
|
-
"line": " packages/@ember/object/type-tests/ember-object.test.ts:
|
|
19195
|
+
"line": " packages/@ember/object/type-tests/ember-object.test.ts:22"
|
|
19111
19196
|
}
|
|
19112
19197
|
]
|
|
19113
19198
|
}
|