ember-source 7.3.0-alpha.5 → 7.3.0
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/build-metadata.json +3 -3
- package/dist/dev/packages/@ember/-internals/deprecations/index.js +9 -0
- package/dist/dev/packages/@ember/-internals/glimmer/index.js +7 -7
- package/dist/dev/packages/@ember/-internals/routing/index.js +2 -2
- package/dist/dev/packages/@ember/-internals/runtime/index.js +1 -1
- package/dist/dev/packages/@ember/-internals/runtime/lib/ext/rsvp.js +1 -1
- package/dist/dev/packages/@ember/-internals/runtime/lib/mixins/action_handler.js +4 -0
- package/dist/dev/packages/@ember/-internals/runtime/lib/mixins/target_action_support.js +3 -0
- package/dist/dev/packages/@ember/-internals/views/lib/mixins/action_support.js +2 -0
- package/dist/dev/packages/@ember/application/index.js +3 -3
- package/dist/dev/packages/@ember/application/instance.js +9 -9
- package/dist/dev/packages/@ember/component/helper.js +2 -2
- package/dist/dev/packages/@ember/component/index.js +3 -3
- package/dist/dev/packages/@ember/engine/index.js +3 -3
- package/dist/dev/packages/@ember/engine/instance.js +1 -1
- package/dist/dev/packages/@ember/helper/index.js +1132 -79
- package/dist/dev/packages/@ember/modifier/on.js +1 -1
- package/dist/dev/packages/@ember/object/compat.js +0 -32
- package/dist/dev/packages/@ember/renderer/index.js +1 -1
- package/dist/dev/packages/@ember/routing/-internals.js +2 -2
- package/dist/dev/packages/@ember/routing/index.js +11 -28
- package/dist/dev/packages/@ember/routing/lib/utils.js +2 -2
- package/dist/dev/packages/@ember/routing/route.js +2 -2
- package/dist/dev/packages/@ember/routing/router-service.js +9 -9
- package/dist/dev/packages/@ember/routing/router.js +2 -2
- package/dist/dev/packages/@ember/template-compiler/lib/compile-options.js +3 -3
- package/dist/dev/packages/@ember/template-compiler/lib/template.js +2 -2
- package/dist/dev/packages/@ember/template-factory/index.js +1 -1
- package/dist/dev/packages/@glimmer/opcode-compiler/index.js +2 -2
- package/dist/dev/packages/@glimmer/program/index.js +3 -3
- package/dist/dev/packages/@glimmer/runtime/index.js +7 -7
- package/dist/dev/packages/@glimmer/wire-format/index.js +2 -5
- package/dist/dev/packages/ember/version.js +1 -1
- package/dist/dev/packages/ember-template-compiler/index.js +2 -2
- package/dist/dev/packages/router_js/index.js +2 -2
- package/dist/dev/packages/rsvp/index.js +1 -2281
- package/dist/dev/packages/shared-chunks/{arguments-CDkbOqTS.js → arguments-BVmnQtAM.js} +10 -19
- package/dist/dev/packages/shared-chunks/{compiler-QUSl_urU.js → compiler-BHFFl-fv.js} +1 -1
- package/dist/dev/packages/shared-chunks/{curly-BbL6STF2.js → curly-qZIwixUW.js} +1 -1
- package/dist/dev/packages/shared-chunks/{element-BYLB-q7a.js → element-Cgoi4ldD.js} +0 -24
- package/dist/dev/packages/shared-chunks/get-BVBR6Afa.js +40 -0
- package/dist/dev/packages/shared-chunks/hash-BcOgEgJg.js +57 -0
- package/dist/dev/packages/shared-chunks/{index-DaFzpTIE.js → index-BYUSIu_W.js} +3 -3
- package/dist/dev/packages/shared-chunks/{index-Czn34wUZ.js → index-COgCjiy-.js} +193 -77
- package/dist/dev/packages/shared-chunks/{invoke-d9sqa50M.js → invoke-BzXY_4h3.js} +1 -1
- package/dist/dev/packages/shared-chunks/{not-DYh6AY9Z.js → not-CmLRAsFE.js} +1 -1
- package/dist/dev/packages/shared-chunks/{on-DlF0Wy7P.js → on-DXmOUOBH.js} +22 -11
- package/dist/dev/packages/shared-chunks/{opcodes-CplRyHl_.js → opcodes-DDajoGhq.js} +0 -4
- package/dist/dev/packages/shared-chunks/{outlet-B4qORyui.js → outlet-D6v6ZBvX.js} +3 -3
- package/dist/dev/packages/shared-chunks/{program-context-Dq8xN2HI.js → program-context-BBB1Ga5h.js} +2 -2
- package/dist/dev/packages/shared-chunks/{render-CtH73XOv.js → render-B5RULomD.js} +2 -2
- package/dist/{prod/packages/shared-chunks/rsvp.es-DR7yS7qg.js → dev/packages/shared-chunks/rsvp-aLN_pQtn.js} +152 -148
- package/dist/dev/packages/shared-chunks/{setup-registry-h519ZsHS.js → setup-registry-CVtsD0q2.js} +35 -13
- package/dist/{prod/packages/shared-chunks/syscall-ops-CN7STuUn.js → dev/packages/shared-chunks/syscall-ops-CkPT1Kfx.js} +1 -2
- package/dist/dev/packages/shared-chunks/{textarea-DEvw4ezm.js → textarea-DvS6Xmdh.js} +3 -23
- package/dist/dev/packages/shared-chunks/{unique-id-DQOhouG1.js → unique-id-Csxuh1I7.js} +0 -4
- package/dist/dev/packages/shared-chunks/{unrecognized-url-error-B8loxkay.js → unrecognized-url-error-cXUp-SK3.js} +1 -1
- package/dist/prod/packages/@ember/-internals/deprecations/index.js +9 -0
- package/dist/prod/packages/@ember/-internals/glimmer/index.js +7 -7
- package/dist/prod/packages/@ember/-internals/routing/index.js +2 -2
- package/dist/prod/packages/@ember/-internals/runtime/index.js +1 -1
- package/dist/prod/packages/@ember/-internals/runtime/lib/ext/rsvp.js +1 -1
- package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/action_handler.js +4 -0
- package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/target_action_support.js +3 -0
- package/dist/prod/packages/@ember/-internals/views/lib/mixins/action_support.js +2 -0
- package/dist/prod/packages/@ember/application/index.js +3 -3
- package/dist/prod/packages/@ember/application/instance.js +9 -9
- package/dist/prod/packages/@ember/component/helper.js +2 -2
- package/dist/prod/packages/@ember/component/index.js +3 -3
- package/dist/prod/packages/@ember/engine/index.js +3 -3
- package/dist/prod/packages/@ember/engine/instance.js +1 -1
- package/dist/prod/packages/@ember/helper/index.js +1132 -79
- package/dist/prod/packages/@ember/modifier/on.js +1 -1
- package/dist/prod/packages/@ember/object/compat.js +0 -32
- package/dist/prod/packages/@ember/renderer/index.js +1 -1
- package/dist/prod/packages/@ember/routing/index.js +10 -27
- package/dist/prod/packages/@ember/routing/lib/utils.js +2 -2
- package/dist/prod/packages/@ember/routing/route.js +2 -2
- package/dist/prod/packages/@ember/routing/router-service.js +9 -9
- package/dist/prod/packages/@ember/routing/router.js +2 -2
- package/dist/prod/packages/@ember/template-compiler/lib/compile-options.js +3 -3
- package/dist/prod/packages/@ember/template-compiler/lib/template.js +2 -2
- package/dist/prod/packages/@ember/template-factory/index.js +1 -1
- package/dist/prod/packages/@glimmer/opcode-compiler/index.js +2 -2
- package/dist/prod/packages/@glimmer/program/index.js +3 -3
- package/dist/prod/packages/@glimmer/runtime/index.js +7 -7
- package/dist/prod/packages/@glimmer/wire-format/index.js +2 -5
- package/dist/prod/packages/ember/version.js +1 -1
- package/dist/prod/packages/ember-template-compiler/index.js +2 -2
- package/dist/prod/packages/router_js/index.js +2 -2
- package/dist/prod/packages/rsvp/index.js +1 -2281
- package/dist/prod/packages/shared-chunks/{arguments-BzAkZVBa.js → arguments-Carzx7C4.js} +6 -19
- package/dist/prod/packages/shared-chunks/{compiler-lBSssiWp.js → compiler-Wt5SWcrF.js} +1 -1
- package/dist/prod/packages/shared-chunks/{curly-CU2jYOtm.js → curly-xbTtts9R.js} +1 -1
- package/dist/prod/packages/shared-chunks/{element-DgHdPZ8u.js → element-BmBjPjkQ.js} +0 -24
- package/dist/prod/packages/shared-chunks/get-ZhOO_1qS.js +40 -0
- package/dist/prod/packages/shared-chunks/hash-b373B4IL.js +57 -0
- package/dist/prod/packages/shared-chunks/{index-XmtQRWbX.js → index-B-2NDHmt.js} +193 -77
- package/dist/prod/packages/shared-chunks/{index-Bf53M8eS.js → index-kwuZeaNz.js} +3 -3
- package/dist/prod/packages/shared-chunks/{invoke-DhQ5QRp2.js → invoke-B-r9UQVH.js} +1 -1
- package/dist/prod/packages/shared-chunks/{not-BOIVROuv.js → not-DOTpWiG3.js} +1 -1
- package/dist/prod/packages/shared-chunks/{on-BZHAxzdq.js → on-B-5KCq9L.js} +22 -11
- package/dist/prod/packages/shared-chunks/{opcodes-CplRyHl_.js → opcodes-DDajoGhq.js} +0 -4
- package/dist/prod/packages/shared-chunks/{outlet-CsNMfeOj.js → outlet-DDxtxFLV.js} +3 -3
- package/dist/prod/packages/shared-chunks/{program-context-COSioH46.js → program-context-WVlzpPdi.js} +2 -2
- package/dist/prod/packages/shared-chunks/{render-Bf7GviCY.js → render-OqKpH1Pf.js} +2 -2
- package/dist/{dev/packages/shared-chunks/rsvp.es-DR7yS7qg.js → prod/packages/shared-chunks/rsvp-aLN_pQtn.js} +152 -148
- package/dist/prod/packages/shared-chunks/{setup-registry-DFSQHIUs.js → setup-registry-CRFWTdVC.js} +35 -13
- package/dist/{dev/packages/shared-chunks/syscall-ops-CN7STuUn.js → prod/packages/shared-chunks/syscall-ops-CkPT1Kfx.js} +1 -2
- package/dist/prod/packages/shared-chunks/{textarea-DMmdvgk2.js → textarea-B-sssXGa.js} +3 -23
- package/dist/prod/packages/shared-chunks/{unique-id-o2pS74go.js → unique-id-BJb1p8EG.js} +0 -4
- package/dist/prod/packages/shared-chunks/{unrecognized-url-error-jjQ-FqKB.js → unrecognized-url-error-xC654tCo.js} +1 -1
- package/docs/data.json +1237 -1395
- package/package.json +5 -7
- package/types/stable/@ember/-internals/deprecations/index.d.ts +6 -0
- package/types/stable/@ember/-internals/glimmer/index.d.ts +7 -380
- package/types/stable/@ember/-internals/glimmer/lib/component.d.ts +1 -1
- package/types/stable/@ember/-internals/glimmer/lib/helper.d.ts +2 -2
- package/types/stable/@ember/-internals/glimmer/lib/helpers/each-in.d.ts +171 -62
- package/types/stable/@ember/-internals/glimmer/lib/helpers/element.d.ts +0 -24
- package/types/stable/@ember/-internals/glimmer/lib/helpers/mut.d.ts +3 -2
- package/types/stable/@ember/-internals/glimmer/lib/helpers/readonly.d.ts +3 -1
- package/types/stable/@ember/-internals/glimmer/lib/helpers/unbound.d.ts +6 -2
- package/types/stable/@ember/-internals/glimmer/lib/helpers/unique-id.d.ts +0 -3
- package/types/stable/@ember/-internals/glimmer/lib/syntax/mount.d.ts +4 -2
- package/types/stable/@ember/-internals/glimmer/lib/syntax/outlet.d.ts +7 -2
- package/types/stable/@ember/helper/index.d.ts +1113 -73
- package/types/stable/@ember/object/compat.d.ts +0 -32
- package/types/stable/@ember/object/core.d.ts +1 -1
- package/types/stable/@ember/routing/router-service.d.ts +9 -9
- package/types/stable/@glimmer/interfaces/lib/compile/wire-format/api.d.ts +1 -9
- package/types/stable/@glimmer/interfaces/lib/compile/wire-format/opcodes.d.ts +0 -4
- package/types/stable/@glimmer/interfaces/lib/vm-opcodes.d.ts +0 -4
- package/types/stable/@glimmer/opcode-compiler/lib/opcode-builder/helpers/conditional.d.ts +1 -1
- package/types/stable/@glimmer/opcode-compiler/lib/syntax/statements.d.ts +1 -1
- package/types/stable/@glimmer/runtime/lib/helpers/array.d.ts +0 -33
- package/types/stable/@glimmer/runtime/lib/helpers/concat.d.ts +0 -25
- package/types/stable/@glimmer/runtime/lib/helpers/fn.d.ts +0 -70
- package/types/stable/@glimmer/runtime/lib/helpers/get.d.ts +0 -69
- package/types/stable/@glimmer/runtime/lib/helpers/hash.d.ts +0 -36
- package/types/stable/index.d.ts +0 -14
- package/dist/dev/packages/shared-chunks/get-6I3sjd-I.js +0 -135
- package/dist/dev/packages/shared-chunks/hash-6NDs_5_f.js +0 -198
- package/dist/prod/packages/shared-chunks/get-Dago5uGl.js +0 -135
- package/dist/prod/packages/shared-chunks/hash-gEXIsSO4.js +0 -198
- package/types/stable/@ember/-internals/glimmer/lib/helpers/array.d.ts +0 -43
- package/types/stable/@ember/-internals/glimmer/lib/helpers/component.d.ts +0 -93
- package/types/stable/@ember/-internals/glimmer/lib/helpers/concat.d.ts +0 -32
- package/types/stable/@ember/-internals/glimmer/lib/helpers/fn.d.ts +0 -77
- package/types/stable/@ember/-internals/glimmer/lib/helpers/get.d.ts +0 -94
- package/types/stable/@ember/-internals/glimmer/lib/helpers/hash.d.ts +0 -46
- package/types/stable/@ember/-internals/glimmer/lib/helpers/helper.d.ts +0 -43
- package/types/stable/@ember/-internals/glimmer/lib/helpers/if-unless.d.ts +0 -228
- package/types/stable/@ember/-internals/glimmer/lib/helpers/log.d.ts +0 -19
- package/types/stable/@ember/-internals/glimmer/lib/helpers/modifier.d.ts +0 -42
- package/types/stable/@ember/-internals/glimmer/lib/helpers/page-title.d.ts +0 -24
- package/types/stable/@ember/-internals/glimmer/lib/modifiers/on.d.ts +0 -95
- package/types/stable/@ember/-internals/glimmer/lib/syntax/in-element.d.ts +0 -49
- package/types/stable/@ember/-internals/glimmer/lib/syntax/let.d.ts +0 -43
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as on$1 } from '../../shared-chunks/on-
|
|
1
|
+
import { o as on$1 } from '../../shared-chunks/on-B-5KCq9L.js';
|
|
2
2
|
|
|
3
3
|
// In normal TypeScript, this modifier is essentially an opaque token that just
|
|
4
4
|
// needs to be importable. Declaring it with a unique interface like this,
|
|
@@ -56,38 +56,6 @@ let wrapGetterSetter = function (target, key, desc) {
|
|
|
56
56
|
}
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
-
Classic Example:
|
|
60
|
-
|
|
61
|
-
```js
|
|
62
|
-
import { tracked } from '@glimmer/tracking';
|
|
63
|
-
import { dependentKeyCompat } from '@ember/object/compat';
|
|
64
|
-
import EmberObject, { computed, observer, set } from '@ember/object';
|
|
65
|
-
|
|
66
|
-
const Person = EmberObject.extend({
|
|
67
|
-
firstName: tracked(),
|
|
68
|
-
lastName: tracked(),
|
|
69
|
-
|
|
70
|
-
fullName: dependentKeyCompat(function() {
|
|
71
|
-
return `${this.firstName} ${this.lastName}`;
|
|
72
|
-
}),
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
const Profile = EmberObject.extend({
|
|
76
|
-
person: null,
|
|
77
|
-
|
|
78
|
-
helloMessage: computed('person.fullName', function() {
|
|
79
|
-
return `Hello, ${this.person.fullName}!`;
|
|
80
|
-
}),
|
|
81
|
-
|
|
82
|
-
onNameUpdated: observer('person.fullName', function() {
|
|
83
|
-
console.log('person name updated!');
|
|
84
|
-
}),
|
|
85
|
-
});
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
`dependentKeyCompat()` can receive a getter function or an object containing
|
|
89
|
-
`get`/`set` methods when used in classic classes, like computed properties.
|
|
90
|
-
|
|
91
59
|
In general, only properties which you _expect_ to be watched by older,
|
|
92
60
|
untracked clases should be marked as dependency compatible. The decorator is
|
|
93
61
|
meant as an interop layer for parts of Ember's older classic APIs, and should
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { r as renderComponent, a as renderSettled } from '../../shared-chunks/index-
|
|
1
|
+
export { r as renderComponent, a as renderSettled } from '../../shared-chunks/index-B-2NDHmt.js';
|
|
@@ -6,7 +6,7 @@ import { service } from '../service/index.js';
|
|
|
6
6
|
import { c as consumeTag, e as createCache, g as getValue, u as untrack } from '../../shared-chunks/cache-CofLhaS4.js';
|
|
7
7
|
import { t as tagFor } from '../../shared-chunks/meta-BJtIZDir.js';
|
|
8
8
|
import { on } from '../modifier/on.js';
|
|
9
|
-
import { t as templateFactory } from '../../shared-chunks/index-
|
|
9
|
+
import { t as templateFactory } from '../../shared-chunks/index-kwuZeaNz.js';
|
|
10
10
|
import { I as InternalComponent, o as opaquify } from '../../shared-chunks/internal-BQ7zHrqS.js';
|
|
11
11
|
import { d as decorateFieldV2, i as initializeDeferredDecorator, a as decorateMethodV2 } from '../../shared-chunks/runtime-CYyqkz5q-BOdRhmsS.js';
|
|
12
12
|
|
|
@@ -53,6 +53,10 @@ function isQueryParams(value) {
|
|
|
53
53
|
return typeof value === 'object' && value !== null && value['isQueryParams'] === true;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
/**
|
|
57
|
+
@module @ember/routing
|
|
58
|
+
*/
|
|
59
|
+
|
|
56
60
|
/**
|
|
57
61
|
The `LinkTo` component renders a link to the supplied `routeName` passing an optionally
|
|
58
62
|
supplied model to the route as its `model` context of the route. The block for `LinkTo`
|
|
@@ -260,35 +264,11 @@ function isQueryParams(value) {
|
|
|
260
264
|
</a>
|
|
261
265
|
```
|
|
262
266
|
|
|
263
|
-
@for Ember.Templates.components
|
|
264
|
-
@method LinkTo
|
|
265
|
-
@public
|
|
266
|
-
*/
|
|
267
|
-
|
|
268
|
-
/**
|
|
269
|
-
@module @ember/routing
|
|
270
|
-
*/
|
|
271
|
-
|
|
272
|
-
/**
|
|
273
|
-
See [Ember.Templates.components.LinkTo](/ember/release/classes/Ember.Templates.components/methods/input?anchor=LinkTo).
|
|
274
|
-
|
|
275
|
-
@for Ember.Templates.helpers
|
|
276
|
-
@method link-to
|
|
277
|
-
@see {Ember.Templates.components.LinkTo}
|
|
278
|
-
@public
|
|
279
|
-
**/
|
|
280
|
-
|
|
281
|
-
/**
|
|
282
|
-
An opaque interface which can be imported and used in strict-mode
|
|
283
|
-
templates to call <LinkTo>.
|
|
284
|
-
|
|
285
|
-
See [Ember.Templates.components.LinkTo](/ember/release/classes/Ember.Templates.components/methods/input?anchor=LinkTo).
|
|
286
|
-
|
|
287
267
|
@for @ember/routing
|
|
288
268
|
@method LinkTo
|
|
289
|
-
@
|
|
269
|
+
@static
|
|
290
270
|
@public
|
|
291
|
-
|
|
271
|
+
*/
|
|
292
272
|
|
|
293
273
|
class _LinkTo extends InternalComponent {
|
|
294
274
|
static toString() {
|
|
@@ -404,6 +384,9 @@ class _LinkTo extends InternalComponent {
|
|
|
404
384
|
get query() {
|
|
405
385
|
if ('query' in this.args.named) {
|
|
406
386
|
let query = this.named('query');
|
|
387
|
+
if (query === null || query === undefined) {
|
|
388
|
+
return EMPTY_QUERY_PARAMS;
|
|
389
|
+
}
|
|
407
390
|
return {
|
|
408
391
|
...query
|
|
409
392
|
};
|
|
@@ -2,8 +2,8 @@ import { g as get } from '../../../shared-chunks/property_get-DuDs6rLg.js';
|
|
|
2
2
|
import { getOwner } from '../../-internals/owner/index.js';
|
|
3
3
|
import '../../engine/instance.js';
|
|
4
4
|
import '../../../route-recognizer/index.js';
|
|
5
|
-
import '../../../shared-chunks/rsvp
|
|
6
|
-
import { S as STATE_SYMBOL } from '../../../shared-chunks/unrecognized-url-error-
|
|
5
|
+
import '../../../shared-chunks/rsvp-aLN_pQtn.js';
|
|
6
|
+
import { S as STATE_SYMBOL } from '../../../shared-chunks/unrecognized-url-error-xC654tCo.js';
|
|
7
7
|
|
|
8
8
|
const ALL_PERIODS_REGEX = /\./g;
|
|
9
9
|
function extractRouteArgs(args) {
|
|
@@ -21,8 +21,8 @@ import { dependentKeyCompat } from '../object/compat.js';
|
|
|
21
21
|
import { once } from '../runloop/index.js';
|
|
22
22
|
import { c as hasInternalComponentManager } from '../../shared-chunks/api-DlJKfm_f.js';
|
|
23
23
|
import '../../route-recognizer/index.js';
|
|
24
|
-
import '../../shared-chunks/rsvp
|
|
25
|
-
import { S as STATE_SYMBOL, P as PARAMS_SYMBOL } from '../../shared-chunks/unrecognized-url-error-
|
|
24
|
+
import '../../shared-chunks/rsvp-aLN_pQtn.js';
|
|
25
|
+
import { S as STATE_SYMBOL, P as PARAMS_SYMBOL } from '../../shared-chunks/unrecognized-url-error-xC654tCo.js';
|
|
26
26
|
import generateController from './lib/generate_controller.js';
|
|
27
27
|
import { prefixRouteNameArg, stashParamNames, calculateCacheKey, normalizeControllerQueryParams } from './lib/utils.js';
|
|
28
28
|
import { a as decorateMethodV2 } from '../../shared-chunks/runtime-CYyqkz5q-BOdRhmsS.js';
|
|
@@ -34,7 +34,7 @@ function cleanURL(url, rootURL) {
|
|
|
34
34
|
In this example, the Router service is injected into a component to initiate a transition
|
|
35
35
|
to a dedicated route:
|
|
36
36
|
|
|
37
|
-
```app/components/example.gjs
|
|
37
|
+
```gjs {data-filename="app/components/example.gjs"}
|
|
38
38
|
import Component from '@glimmer/component';
|
|
39
39
|
import { action } from '@ember/object';
|
|
40
40
|
import { service } from '@ember/service';
|
|
@@ -81,7 +81,7 @@ class RouterService extends Service.extend(Evented) {
|
|
|
81
81
|
In the following example we use the Router service to navigate to a route with a
|
|
82
82
|
specific model from a Component in the first action, and in the second we trigger
|
|
83
83
|
a query-params only transition.
|
|
84
|
-
```app/components/example.gjs
|
|
84
|
+
```gjs {data-filename="app/components/example.gjs"}
|
|
85
85
|
import Component from '@glimmer/component';
|
|
86
86
|
import { action } from '@ember/object';
|
|
87
87
|
import { service } from '@ember/service';
|
|
@@ -166,14 +166,14 @@ class RouterService extends Service.extend(Evented) {
|
|
|
166
166
|
URL is returned as a string that can be used for any purpose.
|
|
167
167
|
In this example, the URL for the `author.books` route for a given author
|
|
168
168
|
is copied to the clipboard.
|
|
169
|
-
```app/templates/application.gjs
|
|
169
|
+
```gjs {data-filename="app/templates/application.gjs"}
|
|
170
170
|
import CopyLink from '../components/copy-link';
|
|
171
171
|
|
|
172
172
|
<template>
|
|
173
173
|
<CopyLink @author={{hash id="tomster" name="Tomster"}} />
|
|
174
174
|
</template>
|
|
175
175
|
```
|
|
176
|
-
```app/components/copy-link.gjs
|
|
176
|
+
```gjs {data-filename="app/components/copy-link.gjs"}
|
|
177
177
|
import Component from '@glimmer/component';
|
|
178
178
|
import { service } from '@ember/service';
|
|
179
179
|
import { action } from '@ember/object';
|
|
@@ -192,13 +192,13 @@ class RouterService extends Service.extend(Evented) {
|
|
|
192
192
|
```
|
|
193
193
|
Just like with `transitionTo` and `replaceWith`, `urlFor` can also handle
|
|
194
194
|
query parameters.
|
|
195
|
-
```app/templates/application.gjs
|
|
195
|
+
```gjs {data-filename="app/templates/application.gjs"}
|
|
196
196
|
import CopyLink from '../components/copy-link';
|
|
197
197
|
<template>
|
|
198
198
|
<CopyLink @author={{hash id="tomster" name="Tomster"}} />
|
|
199
199
|
</template>
|
|
200
200
|
```
|
|
201
|
-
```app/components/copy-link.gjs
|
|
201
|
+
```gjs {data-filename="app/components/copy-link.gjs"}
|
|
202
202
|
import Component from '@glimmer/component';
|
|
203
203
|
import { service } from '@ember/service';
|
|
204
204
|
import { action } from '@ember/object';
|
|
@@ -235,7 +235,7 @@ class RouterService extends Service.extend(Evented) {
|
|
|
235
235
|
See [model](api/ember/release/classes/Route/methods/model?anchor=model) and
|
|
236
236
|
[queryParams](/api/ember/3.7/classes/Route/properties/queryParams?anchor=queryParams) for more information about these arguments.
|
|
237
237
|
In the following example, `isActive` will return `true` if the current route is `/posts`.
|
|
238
|
-
```app/components/posts.gjs
|
|
238
|
+
```gjs {data-filename="app/components/posts.gjs"}
|
|
239
239
|
import Component from '@glimmer/component';
|
|
240
240
|
import { service } from '@ember/service';
|
|
241
241
|
export default class extends Component {
|
|
@@ -247,7 +247,7 @@ class RouterService extends Service.extend(Evented) {
|
|
|
247
247
|
```
|
|
248
248
|
The next example includes a dynamic segment, and will return `true` if the current route is `/posts/1`,
|
|
249
249
|
assuming the post has an id of 1:
|
|
250
|
-
```app/components/posts.gjs
|
|
250
|
+
```gjs {data-filename="app/components/posts.gjs"}
|
|
251
251
|
import Component from '@glimmer/component';
|
|
252
252
|
import { service } from '@ember/service';
|
|
253
253
|
export default class extends Component {
|
|
@@ -619,7 +619,7 @@ class RouterService extends Service.extend(Evented) {
|
|
|
619
619
|
happens (even when that transition only changes parameters
|
|
620
620
|
and doesn't change the active route).
|
|
621
621
|
Usage example:
|
|
622
|
-
```app/components/header.gjs
|
|
622
|
+
```gjs {data-filename="app/components/header.gjs"}
|
|
623
623
|
import Component from '@glimmer/component';
|
|
624
624
|
import { service } from '@ember/service';
|
|
625
625
|
import { notEmpty } from '@ember/object/computed';
|
|
@@ -13,8 +13,8 @@ import Evented from '../object/evented.js';
|
|
|
13
13
|
import { run, once, scheduleOnce, cancel } from '../runloop/index.js';
|
|
14
14
|
import { getRenderState, getFullQueryParams, hasDefaultSerialize, defaultSerialize } from './route.js';
|
|
15
15
|
import Router from '../../router_js/index.js';
|
|
16
|
-
import { S as STATE_SYMBOL, l as logAbort } from '../../shared-chunks/unrecognized-url-error-
|
|
17
|
-
import '../../shared-chunks/rsvp
|
|
16
|
+
import { S as STATE_SYMBOL, l as logAbort } from '../../shared-chunks/unrecognized-url-error-xC654tCo.js';
|
|
17
|
+
import '../../shared-chunks/rsvp-aLN_pQtn.js';
|
|
18
18
|
import '../engine/instance.js';
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { o as or, d as not, c as lte, l as lt, b as gte, g as gt, n as neq, a as and, e as eq } from '../../../shared-chunks/not-
|
|
2
|
-
import { h as hash, f as fn, a as array } from '../../../shared-chunks/hash-
|
|
3
|
-
import { e as element } from '../../../shared-chunks/element-
|
|
1
|
+
import { o as or, d as not, c as lte, l as lt, b as gte, g as gt, n as neq, a as and, e as eq } from '../../../shared-chunks/not-DOTpWiG3.js';
|
|
2
|
+
import { h as hash, f as fn, a as array } from '../../../shared-chunks/hash-b373B4IL.js';
|
|
3
|
+
import { e as element } from '../../../shared-chunks/element-BmBjPjkQ.js';
|
|
4
4
|
import { on } from '../../modifier/on.js';
|
|
5
5
|
import { STRICT_MODE_KEYWORDS, STRICT_MODE_TRANSFORMS, RESOLUTION_MODE_TRANSFORMS } from './plugins/index.js';
|
|
6
6
|
import { ALLOWED_GLOBALS } from './plugins/allowed-globals.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import './plugins/allowed-globals.js';
|
|
2
2
|
import templateOnly from '../../component/template-only.js';
|
|
3
|
-
import { p as precompile } from '../../../shared-chunks/compiler-
|
|
3
|
+
import { p as precompile } from '../../../shared-chunks/compiler-Wt5SWcrF.js';
|
|
4
4
|
import { s as setComponentTemplate } from '../../../shared-chunks/template-Dc_cBOoX.js';
|
|
5
|
-
import { t as templateFactory } from '../../../shared-chunks/index-
|
|
5
|
+
import { t as templateFactory } from '../../../shared-chunks/index-kwuZeaNz.js';
|
|
6
6
|
import compileOptions, { RUNTIME_KEYWORDS_NAME, keywords } from './compile-options.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as createTemplateFactory } from '../../shared-chunks/index-
|
|
1
|
+
export { t as createTemplateFactory } from '../../shared-chunks/index-kwuZeaNz.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { E as EMPTY_BLOCKS, W as WrappedBuilder, c as compilable, b as compileStatements, I as invokeStaticBlock, d as invokeStaticBlockWithStack, m as meta, a as templateCacheCounters, e as templateCompilationContext, t as templateFactory } from '../../shared-chunks/index-
|
|
2
|
-
export { E as EvaluationContextImpl, S as StdLib, c as compileStd } from '../../shared-chunks/program-context-
|
|
1
|
+
export { E as EMPTY_BLOCKS, W as WrappedBuilder, c as compilable, b as compileStatements, I as invokeStaticBlock, d as invokeStaticBlockWithStack, m as meta, a as templateCacheCounters, e as templateCompilationContext, t as templateFactory } from '../../shared-chunks/index-kwuZeaNz.js';
|
|
2
|
+
export { E as EvaluationContextImpl, S as StdLib, c as compileStd } from '../../shared-chunks/program-context-WVlzpPdi.js';
|
|
3
3
|
|
|
4
4
|
let debugCompiler;
|
|
5
5
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aG as constants } from '../../shared-chunks/syscall-ops-CkPT1Kfx.js';
|
|
2
2
|
import { e as expect } from '../../shared-chunks/collections-GpG8lT2g.js';
|
|
3
3
|
import { u as unwrapTemplate } from '../../shared-chunks/template-BRrQR6KS.js';
|
|
4
4
|
import { c as capabilityFlagsFrom, m as managerHasCapability } from '../../shared-chunks/capabilities-BuVYh-vx.js';
|
|
5
5
|
import { g as getComponentTemplate } from '../../shared-chunks/template-Dc_cBOoX.js';
|
|
6
6
|
import { a as getInternalHelperManager, b as getInternalModifierManager, g as getInternalComponentManager } from '../../shared-chunks/api-DlJKfm_f.js';
|
|
7
|
-
import { t as templateFactory } from '../../shared-chunks/index-
|
|
7
|
+
import { t as templateFactory } from '../../shared-chunks/index-kwuZeaNz.js';
|
|
8
8
|
import { e as enumerate } from '../../shared-chunks/array-utils-CZQxrdD3.js';
|
|
9
9
|
import { I as InternalComponentCapabilities } from '../../shared-chunks/flags-BZxHQ0yn.js';
|
|
10
|
-
import { o as opcodes } from '../../shared-chunks/opcodes-
|
|
10
|
+
import { o as opcodes } from '../../shared-chunks/opcodes-DDajoGhq.js';
|
|
11
11
|
import { a as ProgramHeapImpl } from '../../shared-chunks/program-BAh__OXZ.js';
|
|
12
12
|
export { P as ProgramImpl, R as RuntimeOpImpl } from '../../shared-chunks/program-BAh__OXZ.js';
|
|
13
13
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export { C as ConcreteBounds, a as CursorImpl, c as clear } from '../../shared-chunks/normalize-C_IStty9.js';
|
|
2
|
-
export { D as DOMChanges, a as DynamicScopeImpl, E as EnvironmentImpl, b as IDOMChanges, L as LowLevelVM, S as ScopeImpl, U as UpdatingVM, i as inTransaction, c as isWhitespace, r as renderComponent, d as renderMain, e as renderSync, f as resetDebuggerCallback, g as runtimeOptions, s as setDebuggerCallback } from '../../shared-chunks/render-
|
|
2
|
+
export { D as DOMChanges, a as DynamicScopeImpl, E as EnvironmentImpl, b as IDOMChanges, L as LowLevelVM, S as ScopeImpl, U as UpdatingVM, i as inTransaction, c as isWhitespace, r as renderComponent, d as renderMain, e as renderSync, f as resetDebuggerCallback, g as runtimeOptions, s as setDebuggerCallback } from '../../shared-chunks/render-OqKpH1Pf.js';
|
|
3
3
|
export { T as TEMPLATE_ONLY_COMPONENT_MANAGER, a as TemplateOnlyComponent, b as TemplateOnlyComponentManager, t as templateOnlyComponent } from '../../shared-chunks/template-only-DKNcKM5b.js';
|
|
4
|
-
export { C as CurriedValue, E as EMPTY_ARGS, a as EMPTY_NAMED, b as EMPTY_POSITIONAL, c as createCapturedArgs, d as curry, r as reifyArgs, e as reifyNamed, f as reifyPositional } from '../../shared-chunks/arguments-
|
|
4
|
+
export { C as CurriedValue, E as EMPTY_ARGS, a as EMPTY_NAMED, b as EMPTY_POSITIONAL, c as createCapturedArgs, d as curry, r as reifyArgs, e as reifyNamed, f as reifyPositional } from '../../shared-chunks/arguments-Carzx7C4.js';
|
|
5
5
|
export { n as normalizeProperty } from '../../shared-chunks/props-fiqxqhAH.js';
|
|
6
|
-
export { a as and, e as eq, g as gt, b as gte, l as lt, c as lte, n as neq, d as not, o as or } from '../../shared-chunks/not-
|
|
7
|
-
export { a as array, f as fn, h as hash } from '../../shared-chunks/hash-
|
|
8
|
-
export { c as concat, g as get } from '../../shared-chunks/get-
|
|
9
|
-
export { i as invokeHelper } from '../../shared-chunks/invoke-
|
|
10
|
-
export { o as on } from '../../shared-chunks/on-
|
|
6
|
+
export { a as and, e as eq, g as gt, b as gte, l as lt, c as lte, n as neq, d as not, o as or } from '../../shared-chunks/not-DOTpWiG3.js';
|
|
7
|
+
export { a as array, f as fn, h as hash } from '../../shared-chunks/hash-b373B4IL.js';
|
|
8
|
+
export { c as concat, g as get } from '../../shared-chunks/get-ZhOO_1qS.js';
|
|
9
|
+
export { i as invokeHelper } from '../../shared-chunks/invoke-B-r9UQVH.js';
|
|
10
|
+
export { o as on } from '../../shared-chunks/on-B-5KCq9L.js';
|
|
11
11
|
export { destroy, isDestroyed, isDestroying, registerDestructor } from '../destroyable/index.js';
|
|
12
12
|
import '../../shared-chunks/cache-CofLhaS4.js';
|
|
13
13
|
import '../../shared-chunks/reference-CG0yPgLy.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as opcodes } from '../../shared-chunks/opcodes-
|
|
1
|
+
import { o as opcodes } from '../../shared-chunks/opcodes-DDajoGhq.js';
|
|
2
2
|
export { W as WellKnownAttrNames, a as WellKnownTagNames } from '../../shared-chunks/well-known-_EVO9RaV.js';
|
|
3
3
|
|
|
4
4
|
const resolution = {
|
|
@@ -27,9 +27,6 @@ function isStringLiteral(expr) {
|
|
|
27
27
|
function getStringFromValue(expr) {
|
|
28
28
|
return expr;
|
|
29
29
|
}
|
|
30
|
-
function isArgument(val) {
|
|
31
|
-
return val[0] === opcodes.StaticArg || val[0] === opcodes.DynamicArg;
|
|
32
|
-
}
|
|
33
30
|
function isHelper(expr) {
|
|
34
31
|
return Array.isArray(expr) && expr[0] === opcodes.Call;
|
|
35
32
|
}
|
|
@@ -37,4 +34,4 @@ function isHelper(expr) {
|
|
|
37
34
|
// Expressions
|
|
38
35
|
const isGet = is(opcodes.GetSymbol);
|
|
39
36
|
|
|
40
|
-
export { opcodes as SexpOpcodes, resolution as VariableResolutionContext, getStringFromValue, is,
|
|
37
|
+
export { opcodes as SexpOpcodes, resolution as VariableResolutionContext, getStringFromValue, is, isAttribute, isFlushElement, isGet, isHelper, isStringLiteral };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as precompile$1 } from '../shared-chunks/compiler-
|
|
2
|
-
export { a as _preprocess, b as _print } from '../shared-chunks/compiler-
|
|
1
|
+
import { p as precompile$1 } from '../shared-chunks/compiler-Wt5SWcrF.js';
|
|
2
|
+
export { a as _preprocess, b as _print } from '../shared-chunks/compiler-Wt5SWcrF.js';
|
|
3
3
|
import { STRICT_MODE_KEYWORDS, STRICT_MODE_TRANSFORMS, RESOLUTION_MODE_TRANSFORMS } from '../@ember/template-compiler/lib/plugins/index.js';
|
|
4
4
|
import '../shared-chunks/guid-Cbq2sNV_.js';
|
|
5
5
|
import '../shared-chunks/super-BBBjgF69.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import RouteRecognizer from '../route-recognizer/index.js';
|
|
2
|
-
import { P as Promise$1 } from '../shared-chunks/rsvp
|
|
3
|
-
import { Q as QUERY_PARAMS_SYMBOL, m as merge, i as isTransition, a as isParam, t as throwIfAborted, P as PARAMS_SYMBOL, p as prepareResult, b as isPromise, f as forEach, c as promiseLabel, U as UnrecognizedURLError, T as Transition, S as STATE_SYMBOL, g as getChangelist, d as log, l as logAbort, e as isTransitionAborted, h as extractQueryParams } from '../shared-chunks/unrecognized-url-error-
|
|
2
|
+
import { P as Promise$1 } from '../shared-chunks/rsvp-aLN_pQtn.js';
|
|
3
|
+
import { Q as QUERY_PARAMS_SYMBOL, m as merge, i as isTransition, a as isParam, t as throwIfAborted, P as PARAMS_SYMBOL, p as prepareResult, b as isPromise, f as forEach, c as promiseLabel, U as UnrecognizedURLError, T as Transition, S as STATE_SYMBOL, g as getChangelist, d as log, l as logAbort, e as isTransitionAborted, h as extractQueryParams } from '../shared-chunks/unrecognized-url-error-xC654tCo.js';
|
|
4
4
|
|
|
5
5
|
/* eslint-disable no-prototype-builtins */
|
|
6
6
|
let ROUTE_INFOS = new WeakMap();
|