ember-source 7.3.0 → 7.4.0-beta.1
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 +45 -0
- package/dist/dev/packages/@ember/-internals/glimmer/index.js +9 -9
- package/dist/dev/packages/@ember/-internals/metal/index.js +12 -12
- package/dist/dev/packages/@ember/-internals/runtime/lib/mixins/-proxy.js +6 -6
- package/dist/dev/packages/@ember/-internals/runtime/lib/mixins/action_handler.js +2 -2
- package/dist/dev/packages/@ember/-internals/runtime/lib/mixins/comparable.js +2 -2
- package/dist/dev/packages/@ember/-internals/runtime/lib/mixins/container_proxy.js +2 -2
- package/dist/dev/packages/@ember/-internals/runtime/lib/mixins/registry_proxy.js +2 -2
- package/dist/dev/packages/@ember/-internals/runtime/lib/mixins/target_action_support.js +3 -3
- package/dist/dev/packages/@ember/-internals/views/index.js +1 -0
- package/dist/dev/packages/@ember/-internals/views/lib/mixins/action_support.js +2 -2
- package/dist/dev/packages/@ember/-internals/views/lib/system/event_dispatcher.js +1 -1
- package/dist/dev/packages/@ember/-internals/views/lib/views/core-view-utils.js +14 -0
- package/dist/dev/packages/@ember/-internals/views/lib/views/core_view.js +25 -21
- package/dist/dev/packages/@ember/-internals/views/lib/views/states.js +5 -2
- package/dist/dev/packages/@ember/application/index.js +1 -1
- package/dist/dev/packages/@ember/application/instance.js +16 -13
- package/dist/dev/packages/@ember/application/namespace.js +1 -1
- package/dist/dev/packages/@ember/array/index.js +8 -8
- package/dist/dev/packages/@ember/array/proxy.js +8 -5
- package/dist/dev/packages/@ember/component/helper.js +2 -2
- package/dist/dev/packages/@ember/component/index.js +7 -7
- package/dist/dev/packages/@ember/component/template-only.js +1 -1
- package/dist/dev/packages/@ember/controller/index.js +4 -4
- package/dist/dev/packages/@ember/engine/index.js +2 -2
- package/dist/dev/packages/@ember/enumerable/index.js +2 -2
- package/dist/dev/packages/@ember/enumerable/mutable.js +2 -2
- package/dist/dev/packages/@ember/helper/index.js +8 -8
- package/dist/dev/packages/@ember/modifier/index.js +2 -2
- package/dist/dev/packages/@ember/modifier/on.js +1 -1
- package/dist/dev/packages/@ember/object/-internals.js +1 -1
- package/dist/dev/packages/@ember/object/computed.js +2 -2
- package/dist/dev/packages/@ember/object/core.js +7 -7
- package/dist/dev/packages/@ember/object/evented.js +3 -71
- package/dist/dev/packages/@ember/object/events.js +17 -1
- package/dist/dev/packages/@ember/object/index.js +4 -4
- package/dist/dev/packages/@ember/object/lib/computed/computed_macros.js +3 -3
- package/dist/dev/packages/@ember/object/lib/computed/reduce_computed_macros.js +1 -1
- package/dist/dev/packages/@ember/object/mixin.js +11 -592
- package/dist/dev/packages/@ember/object/observable.js +7 -7
- package/dist/dev/packages/@ember/object/observers.js +1 -1
- package/dist/dev/packages/@ember/object/promise-proxy-mixin.js +10 -4
- package/dist/dev/packages/@ember/object/proxy.js +8 -1
- package/dist/dev/packages/@ember/renderer/index.js +1 -1
- package/dist/dev/packages/@ember/routing/index.js +1 -1
- package/dist/dev/packages/@ember/routing/lib/routing-service.js +2 -2
- package/dist/dev/packages/@ember/routing/route.js +34 -9
- package/dist/dev/packages/@ember/routing/router-service.js +71 -6
- package/dist/dev/packages/@ember/routing/router.js +32 -6
- package/dist/dev/packages/@ember/runloop/index.js +1 -1
- package/dist/dev/packages/@ember/service/index.js +1 -1
- package/dist/dev/packages/@ember/template-compiler/lib/compile-options.js +3 -3
- package/dist/dev/packages/@glimmer/destroyable/index.js +43 -14
- package/dist/dev/packages/@glimmer/manager/index.js +3 -3
- package/dist/dev/packages/@glimmer/node/index.js +2 -2
- package/dist/dev/packages/@glimmer/program/index.js +1 -1
- package/dist/dev/packages/@glimmer/reference/index.js +2 -2
- package/dist/dev/packages/@glimmer/runtime/index.js +11 -11
- package/dist/dev/packages/@glimmer/tracking/index.js +1 -1
- package/dist/dev/packages/ember/version.js +1 -1
- package/dist/dev/packages/shared-chunks/{alias-3DBxvoim.js → alias-CSzPOqZC.js} +3 -3
- package/dist/dev/packages/shared-chunks/{api-BlZDPg1n.js → api-B0N4oLJG.js} +3 -3
- package/dist/dev/packages/shared-chunks/{api-Dz70AUL_.js → api-CK8FxDZV.js} +2 -0
- package/dist/dev/packages/shared-chunks/{api-DuLOZMO_.js → api-PyzZqscb.js} +2 -2
- package/dist/dev/packages/shared-chunks/{args-proxy-CS5Brs3_.js → args-proxy-C39f5UPF.js} +1 -1
- package/dist/dev/packages/shared-chunks/{arguments-BVmnQtAM.js → arguments-LEaMCStR.js} +2 -2
- package/dist/dev/packages/shared-chunks/{array-DvaweI_T.js → array-CxZAmpTY.js} +2 -2
- package/dist/dev/packages/shared-chunks/{chain-tags-uWSImHzB.js → chain-tags-uYrtCZq1.js} +1 -1
- package/dist/dev/packages/shared-chunks/{computed-DGxbeUbf.js → computed-CXIM4Sjc.js} +3 -3
- package/dist/dev/packages/shared-chunks/{curly-qZIwixUW.js → curly-DbGgDeux.js} +18 -17
- package/dist/dev/packages/shared-chunks/destroyable-key-BsfVBM7f.js +12 -0
- package/dist/dev/packages/shared-chunks/{element-Cgoi4ldD.js → element-DLh78jeJ.js} +3 -3
- package/dist/dev/packages/shared-chunks/evented-cAr_RO4u.js +100 -0
- package/dist/dev/packages/shared-chunks/{events-6aFVjD4k.js → events-e_Do73jh.js} +3 -0
- package/dist/dev/packages/shared-chunks/{get-BVBR6Afa.js → get-fzmvcT9R.js} +3 -3
- package/dist/dev/packages/shared-chunks/{hash-BcOgEgJg.js → hash-D1O4fZ99.js} +3 -3
- package/dist/dev/packages/shared-chunks/{index-COgCjiy-.js → index-D8La4_AP.js} +37 -13
- package/dist/dev/packages/shared-chunks/{injected_property-DbXd6Gax.js → injected_property-DyyWscn-.js} +1 -1
- package/dist/dev/packages/shared-chunks/{internal-DTOXyEGM.js → internal-CZjbPyX3.js} +2 -2
- package/dist/dev/packages/shared-chunks/{internal-helper-CKrni0b_.js → internal-helper-BkRVvV7p.js} +1 -1
- package/dist/dev/packages/shared-chunks/{invoke-BzXY_4h3.js → invoke-BPNErlhO.js} +2 -2
- package/dist/dev/packages/shared-chunks/mixin-M88Ghbyw.js +612 -0
- package/dist/dev/packages/shared-chunks/{namespace_search-BfvzEQzN.js → namespace_search-TFdmjK_a.js} +1 -1
- package/dist/dev/packages/shared-chunks/{not-CmLRAsFE.js → not-DNpbxEvj.js} +2 -2
- package/dist/dev/packages/shared-chunks/{observers-DMlX2nCi.js → observers-BsxKjjpC.js} +2 -2
- package/dist/dev/packages/shared-chunks/{on-DXmOUOBH.js → on-Dfya_9b_.js} +3 -3
- package/dist/dev/packages/shared-chunks/{outlet-D6v6ZBvX.js → outlet-wIOlGMfN.js} +3 -3
- package/dist/dev/packages/shared-chunks/{property_set-DezUwDX4.js → property_set-CxxTalOq.js} +1 -1
- package/dist/dev/packages/shared-chunks/{reference-BqOLhKFy.js → reference-De0V3Vxp.js} +2 -0
- package/dist/dev/packages/shared-chunks/{rehydrate-builder-CsnkZkur.js → rehydrate-builder-B3wE1O5a.js} +1 -1
- package/dist/dev/packages/shared-chunks/{render-B5RULomD.js → render-CNXCIKfb.js} +16 -5
- package/dist/dev/packages/shared-chunks/{serialize-builder-D1oAeiyl.js → serialize-builder-v4amW_JS.js} +1 -1
- package/dist/{prod/packages/shared-chunks/set_properties-DYiBfzdk.js → dev/packages/shared-chunks/set_properties-KoN0q2wj.js} +2 -2
- package/dist/dev/packages/shared-chunks/{setup-registry-CVtsD0q2.js → setup-registry-BPb25ZxQ.js} +16 -15
- package/dist/dev/packages/shared-chunks/{template-only-Cu639ICT.js → template-only-DHdQevpG.js} +2 -2
- package/dist/dev/packages/shared-chunks/{textarea-DvS6Xmdh.js → textarea-Obtv2iCY.js} +3 -3
- package/dist/dev/packages/shared-chunks/{tracked-57EW14Ny.js → tracked-CLY9ttD5.js} +1 -1
- package/dist/dev/packages/shared-chunks/{unique-id-Csxuh1I7.js → unique-id-CdB2MG3m.js} +2 -2
- package/dist/prod/packages/@ember/-internals/deprecations/index.js +45 -0
- package/dist/prod/packages/@ember/-internals/glimmer/index.js +9 -9
- package/dist/prod/packages/@ember/-internals/metal/index.js +13 -13
- package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/-proxy.js +6 -6
- package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/action_handler.js +2 -2
- package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/comparable.js +2 -2
- package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/container_proxy.js +2 -2
- package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/registry_proxy.js +2 -2
- package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/target_action_support.js +3 -3
- package/dist/prod/packages/@ember/-internals/views/index.js +1 -0
- package/dist/prod/packages/@ember/-internals/views/lib/mixins/action_support.js +2 -2
- package/dist/prod/packages/@ember/-internals/views/lib/system/event_dispatcher.js +1 -1
- package/dist/prod/packages/@ember/-internals/views/lib/views/core-view-utils.js +14 -0
- package/dist/prod/packages/@ember/-internals/views/lib/views/core_view.js +25 -21
- package/dist/prod/packages/@ember/-internals/views/lib/views/states.js +5 -2
- package/dist/prod/packages/@ember/application/index.js +1 -1
- package/dist/prod/packages/@ember/application/instance.js +14 -12
- package/dist/prod/packages/@ember/application/namespace.js +1 -1
- package/dist/prod/packages/@ember/array/index.js +8 -8
- package/dist/prod/packages/@ember/array/proxy.js +8 -5
- package/dist/prod/packages/@ember/component/helper.js +2 -2
- package/dist/prod/packages/@ember/component/index.js +8 -8
- package/dist/prod/packages/@ember/component/template-only.js +1 -1
- package/dist/prod/packages/@ember/controller/index.js +4 -4
- package/dist/prod/packages/@ember/engine/index.js +2 -2
- package/dist/prod/packages/@ember/enumerable/index.js +2 -2
- package/dist/prod/packages/@ember/enumerable/mutable.js +2 -2
- package/dist/prod/packages/@ember/helper/index.js +8 -8
- package/dist/prod/packages/@ember/modifier/index.js +2 -2
- package/dist/prod/packages/@ember/modifier/on.js +1 -1
- package/dist/prod/packages/@ember/object/-internals.js +1 -0
- package/dist/prod/packages/@ember/object/compat.js +1 -1
- package/dist/prod/packages/@ember/object/computed.js +2 -2
- package/dist/prod/packages/@ember/object/core.js +7 -7
- package/dist/prod/packages/@ember/object/evented.js +3 -71
- package/dist/prod/packages/@ember/object/events.js +17 -1
- package/dist/prod/packages/@ember/object/index.js +5 -5
- package/dist/prod/packages/@ember/object/internals.js +1 -0
- package/dist/prod/packages/@ember/object/lib/computed/computed_macros.js +3 -3
- package/dist/prod/packages/@ember/object/lib/computed/reduce_computed_macros.js +1 -1
- package/dist/prod/packages/@ember/object/mixin.js +9 -557
- package/dist/prod/packages/@ember/object/observable.js +7 -7
- package/dist/prod/packages/@ember/object/observers.js +1 -1
- package/dist/prod/packages/@ember/object/promise-proxy-mixin.js +10 -4
- package/dist/prod/packages/@ember/object/proxy.js +8 -1
- package/dist/prod/packages/@ember/renderer/index.js +1 -1
- package/dist/prod/packages/@ember/routing/index.js +1 -1
- package/dist/prod/packages/@ember/routing/lib/routing-service.js +2 -2
- package/dist/prod/packages/@ember/routing/route.js +35 -10
- package/dist/prod/packages/@ember/routing/router-service.js +71 -6
- package/dist/prod/packages/@ember/routing/router.js +32 -6
- package/dist/prod/packages/@ember/runloop/index.js +1 -1
- package/dist/prod/packages/@ember/service/index.js +1 -1
- package/dist/prod/packages/@ember/template-compiler/lib/compile-options.js +3 -3
- package/dist/prod/packages/@glimmer/destroyable/index.js +37 -11
- package/dist/prod/packages/@glimmer/manager/index.js +3 -3
- package/dist/prod/packages/@glimmer/node/index.js +2 -2
- package/dist/prod/packages/@glimmer/program/index.js +1 -1
- package/dist/prod/packages/@glimmer/reference/index.js +2 -2
- package/dist/prod/packages/@glimmer/runtime/index.js +11 -11
- package/dist/prod/packages/@glimmer/tracking/index.js +1 -1
- package/dist/prod/packages/ember/version.js +1 -1
- package/dist/prod/packages/shared-chunks/{alias-IFzw6sv_.js → alias-DvgufSYq.js} +4 -4
- package/dist/prod/packages/shared-chunks/{api-DzOa0Acr.js → api-B3M8aF1d.js} +2 -0
- package/dist/prod/packages/shared-chunks/{api-B_poQGXS.js → api-CoUjEXgs.js} +3 -3
- package/dist/prod/packages/shared-chunks/{api-DlJKfm_f.js → api-DJnXAjon.js} +2 -2
- package/dist/prod/packages/shared-chunks/{args-proxy-CCoFtYLS.js → args-proxy-BHODnDyt.js} +1 -1
- package/dist/prod/packages/shared-chunks/{arguments-Carzx7C4.js → arguments-xjTAZ6VE.js} +2 -2
- package/dist/prod/packages/shared-chunks/{array-CnXdmzOG.js → array-CK__rqeu.js} +2 -2
- package/dist/prod/packages/shared-chunks/{chain-tags-B2J7DsxO.js → chain-tags-BlsXEpE-.js} +1 -1
- package/dist/prod/packages/shared-chunks/{computed-BNdMwGhH.js → computed-ZvOk7SJQ.js} +4 -4
- package/dist/prod/packages/shared-chunks/{curly-xbTtts9R.js → curly-Bg--Dj0X.js} +18 -17
- package/dist/prod/packages/shared-chunks/{decorator-9ikVwsjY.js → decorator-DcvVDSJV.js} +1 -1
- package/dist/prod/packages/shared-chunks/destroyable-key-BsfVBM7f.js +12 -0
- package/dist/prod/packages/shared-chunks/{element-BmBjPjkQ.js → element-CZnh4CbF.js} +3 -3
- package/dist/prod/packages/shared-chunks/evented-DYsL5t87.js +100 -0
- package/dist/prod/packages/shared-chunks/{events-DYrYz3V8.js → events-3Q5Qvo6Q.js} +3 -0
- package/dist/prod/packages/shared-chunks/{get-ZhOO_1qS.js → get-B1Vq9Mmk.js} +3 -3
- package/dist/prod/packages/shared-chunks/{hash-b373B4IL.js → hash-pP7ZP_NN.js} +3 -3
- package/dist/prod/packages/shared-chunks/{index-B-2NDHmt.js → index-Dncpaycf.js} +37 -13
- package/dist/prod/packages/shared-chunks/{injected_property-DqQ0XV7k.js → injected_property-4vB_6fM8.js} +2 -2
- package/dist/prod/packages/shared-chunks/{internal-BQ7zHrqS.js → internal-D1sloI2P.js} +2 -2
- package/dist/prod/packages/shared-chunks/{internal-helper-Bz1lpDXr.js → internal-helper-Becm19An.js} +1 -1
- package/dist/prod/packages/shared-chunks/{invoke-B-r9UQVH.js → invoke-BqNxG81o.js} +2 -2
- package/dist/prod/packages/shared-chunks/mixin-AGmJaAAY.js +576 -0
- package/dist/prod/packages/shared-chunks/{namespace_search-BfvzEQzN.js → namespace_search-TFdmjK_a.js} +1 -1
- package/dist/prod/packages/shared-chunks/{not-DOTpWiG3.js → not-BRssU6nS.js} +2 -2
- package/dist/prod/packages/shared-chunks/{observers-BmobpXAF.js → observers-B1wiwQeH.js} +2 -2
- package/dist/prod/packages/shared-chunks/{on-B-5KCq9L.js → on-BFt-Sx9A.js} +3 -3
- package/dist/prod/packages/shared-chunks/{outlet-DDxtxFLV.js → outlet-bc38zkd8.js} +3 -3
- package/dist/prod/packages/shared-chunks/{property_set-BmAQ0MGK.js → property_set-CVmdjPdh.js} +2 -2
- package/dist/prod/packages/shared-chunks/{reference-CG0yPgLy.js → reference-CccCE8mJ.js} +2 -0
- package/dist/prod/packages/shared-chunks/{rehydrate-builder-n_8RCUj9.js → rehydrate-builder-B9bh-2Dy.js} +1 -1
- package/dist/prod/packages/shared-chunks/{render-OqKpH1Pf.js → render-C_iak8Db.js} +16 -5
- package/dist/prod/packages/shared-chunks/{serialize-builder-CsG9WHVw.js → serialize-builder-Du-432zt.js} +1 -1
- package/dist/{dev/packages/shared-chunks/set_properties-BzM_irwA.js → prod/packages/shared-chunks/set_properties-BObIgkE-.js} +2 -2
- package/dist/prod/packages/shared-chunks/{setup-registry-CRFWTdVC.js → setup-registry-Czh4z4t2.js} +16 -15
- package/dist/prod/packages/shared-chunks/{template-only-DKNcKM5b.js → template-only-CWsfnbVm.js} +2 -2
- package/dist/prod/packages/shared-chunks/{textarea-B-sssXGa.js → textarea-DbUSajBD.js} +3 -3
- package/dist/prod/packages/shared-chunks/{tracked-DvOpYI0o.js → tracked-z77O-F0O.js} +2 -2
- package/dist/prod/packages/shared-chunks/{unique-id-BJb1p8EG.js → unique-id-DNqsbhfh.js} +2 -2
- package/docs/data.json +856 -508
- package/lib/browsers.cjs +33 -33
- package/package.json +56 -48
- package/types/stable/@ember/-internals/deprecations/index.d.ts +30 -0
- package/types/stable/@ember/-internals/glimmer/lib/helpers/each-in.d.ts +25 -1
- package/types/stable/@ember/-internals/metal/lib/evented-methods.d.ts +22 -0
- package/types/stable/@ember/-internals/metal/lib/events.d.ts +1 -0
- package/types/stable/@ember/-internals/utils/lib/internal-mixin-create.d.ts +13 -0
- package/types/stable/@ember/-internals/views/index.d.ts +1 -0
- package/types/stable/@ember/-internals/views/lib/views/core-view-utils.d.ts +5 -0
- package/types/stable/@ember/-internals/views/lib/views/core_view.d.ts +9 -6
- package/types/stable/@ember/array/proxy.d.ts +1 -0
- package/types/stable/@ember/object/evented.d.ts +6 -0
- package/types/stable/@ember/object/events.d.ts +26 -1
- package/types/stable/@ember/object/mixin.d.ts +3 -0
- package/types/stable/@ember/object/promise-proxy-mixin.d.ts +1 -0
- package/types/stable/@ember/object/proxy.d.ts +2 -0
- package/types/stable/@ember/routing/route.d.ts +9 -2
- package/types/stable/@ember/routing/router-service.d.ts +54 -6
- package/types/stable/@ember/routing/router.d.ts +9 -8
- package/types/stable/@glimmer/destroyable/index.d.ts +1 -0
- package/types/stable/@glimmer/runtime/lib/vm/element-builder.d.ts +2 -0
- package/types/stable/@glimmer/runtime/lib/vm/render-result.d.ts +2 -0
- package/types/stable/@glimmer/runtime/lib/vm/update.d.ts +2 -0
- package/types/stable/@glimmer/syntax/lib/keywords.d.ts +2 -2
- package/types/stable/@glimmer/util/lib/destroyable-key.d.ts +15 -0
- package/types/stable/index.d.ts +4 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { getOwner, setOwner } from '../@ember/-internals/owner/index.js';
|
|
2
2
|
import { g as guidFor } from './guid-Cbq2sNV_.js';
|
|
3
3
|
import { getViewElement, clearElementView, clearViewElement, addChildView, setViewElement, setElementView } from '../@ember/-internals/views/lib/system/utils.js';
|
|
4
|
+
import { sendCoreViewEvent } from '../@ember/-internals/views/lib/views/core-view-utils.js';
|
|
4
5
|
import { _instrumentStart } from '../@ember/instrumentation/index.js';
|
|
5
|
-
import { c as createComputeRef, v as valueForRef, e as createPrimitiveRef, f as childRefFor, g as childRefFromParts, a as createConstRef, b as isUpdatableRef, u as updateRef } from './reference-
|
|
6
|
-
import { f as reifyPositional } from './arguments-
|
|
6
|
+
import { c as createComputeRef, v as valueForRef, e as createPrimitiveRef, f as childRefFor, g as childRefFromParts, a as createConstRef, b as isUpdatableRef, u as updateRef } from './reference-CccCE8mJ.js';
|
|
7
|
+
import { f as reifyPositional } from './arguments-xjTAZ6VE.js';
|
|
7
8
|
import { E as EMPTY_ARRAY } from './array-utils-CZQxrdD3.js';
|
|
8
9
|
import { a as valueForTag, p as beginUntrackFrame, w as endUntrackFrame, o as beginTrackFrame, s as endTrackFrame, c as consumeTag, v as validateTag } from './cache-CofLhaS4.js';
|
|
9
10
|
import { g as get } from './property_get-DuDs6rLg.js';
|
|
@@ -139,8 +140,8 @@ class ComponentStateBucket {
|
|
|
139
140
|
} = this;
|
|
140
141
|
if (isInteractive) {
|
|
141
142
|
beginUntrackFrame();
|
|
142
|
-
component
|
|
143
|
-
component
|
|
143
|
+
sendCoreViewEvent(component, 'willDestroyElement');
|
|
144
|
+
sendCoreViewEvent(component, 'willClearRender');
|
|
144
145
|
endUntrackFrame();
|
|
145
146
|
let element = getViewElement(component);
|
|
146
147
|
if (element) {
|
|
@@ -373,17 +374,17 @@ class CurlyComponentManager {
|
|
|
373
374
|
if (parentView !== null && parentView !== undefined) {
|
|
374
375
|
addChildView(parentView, component);
|
|
375
376
|
}
|
|
376
|
-
component
|
|
377
|
+
sendCoreViewEvent(component, 'didReceiveAttrs');
|
|
377
378
|
let hasWrappedElement = component.tagName !== '';
|
|
378
379
|
|
|
379
380
|
// We usually do this in the `didCreateElement`, but that hook doesn't fire for tagless components
|
|
380
381
|
if (!hasWrappedElement) {
|
|
381
382
|
if (isInteractive) {
|
|
382
|
-
component
|
|
383
|
+
sendCoreViewEvent(component, 'willRender');
|
|
383
384
|
}
|
|
384
385
|
component._transitionTo('hasElement');
|
|
385
386
|
if (isInteractive) {
|
|
386
|
-
component
|
|
387
|
+
sendCoreViewEvent(component, 'willInsertElement');
|
|
387
388
|
}
|
|
388
389
|
}
|
|
389
390
|
|
|
@@ -394,7 +395,7 @@ class CurlyComponentManager {
|
|
|
394
395
|
bucket.classRef = args.named.get('class');
|
|
395
396
|
}
|
|
396
397
|
if (isInteractive && hasWrappedElement) {
|
|
397
|
-
component
|
|
398
|
+
sendCoreViewEvent(component, 'willRender');
|
|
398
399
|
}
|
|
399
400
|
endUntrackFrame();
|
|
400
401
|
|
|
@@ -451,7 +452,7 @@ class CurlyComponentManager {
|
|
|
451
452
|
component._transitionTo('hasElement');
|
|
452
453
|
if (isInteractive) {
|
|
453
454
|
beginUntrackFrame();
|
|
454
|
-
component
|
|
455
|
+
sendCoreViewEvent(component, 'willInsertElement');
|
|
455
456
|
endUntrackFrame();
|
|
456
457
|
}
|
|
457
458
|
}
|
|
@@ -465,8 +466,8 @@ class CurlyComponentManager {
|
|
|
465
466
|
}) {
|
|
466
467
|
if (isInteractive) {
|
|
467
468
|
component._transitionTo('inDOM');
|
|
468
|
-
component
|
|
469
|
-
component
|
|
469
|
+
sendCoreViewEvent(component, 'didInsertElement');
|
|
470
|
+
sendCoreViewEvent(component, 'didRender');
|
|
470
471
|
}
|
|
471
472
|
}
|
|
472
473
|
update(bucket) {
|
|
@@ -487,12 +488,12 @@ class CurlyComponentManager {
|
|
|
487
488
|
component[IS_DISPATCHING_ATTRS] = true;
|
|
488
489
|
component.setProperties(props);
|
|
489
490
|
component[IS_DISPATCHING_ATTRS] = false;
|
|
490
|
-
component
|
|
491
|
-
component
|
|
491
|
+
sendCoreViewEvent(component, 'didUpdateAttrs');
|
|
492
|
+
sendCoreViewEvent(component, 'didReceiveAttrs');
|
|
492
493
|
}
|
|
493
494
|
if (isInteractive) {
|
|
494
|
-
component
|
|
495
|
-
component
|
|
495
|
+
sendCoreViewEvent(component, 'willUpdate');
|
|
496
|
+
sendCoreViewEvent(component, 'willRender');
|
|
496
497
|
}
|
|
497
498
|
endUntrackFrame();
|
|
498
499
|
consumeTag(argsTag);
|
|
@@ -506,8 +507,8 @@ class CurlyComponentManager {
|
|
|
506
507
|
isInteractive
|
|
507
508
|
}) {
|
|
508
509
|
if (isInteractive) {
|
|
509
|
-
component
|
|
510
|
-
component
|
|
510
|
+
sendCoreViewEvent(component, 'didUpdate');
|
|
511
|
+
sendCoreViewEvent(component, 'didRender');
|
|
511
512
|
}
|
|
512
513
|
}
|
|
513
514
|
getDestroyable(bucket) {
|
|
@@ -119,4 +119,4 @@ function setClassicDecorator(dec, value = true) {
|
|
|
119
119
|
DECORATOR_DESCRIPTOR_MAP.set(dec, value);
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
export { COMPUTED_SETTERS as C,
|
|
122
|
+
export { COMPUTED_SETTERS as C, descriptorForDecorator as a, ComputedDescriptor as b, isClassicDecorator as c, descriptorForProperty as d, isElementDescriptor as i, makeComputedDecorator as m, nativeDescDecorator as n, setClassicDecorator as s };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Classes Glimmer constructs itself declare this slot, so that
|
|
3
|
+
* `@glimmer/destroyable` can hold their meta directly rather than in its
|
|
4
|
+
* `WeakMap`. It lives here so packages below `@glimmer/destroyable` can declare
|
|
5
|
+
* the slot without depending on it.
|
|
6
|
+
*
|
|
7
|
+
* Never write this onto an object Glimmer did not construct. Destroyables are
|
|
8
|
+
* public through `@ember/destroyable` and can be any object a user hands in.
|
|
9
|
+
*/
|
|
10
|
+
const DESTROYABLE_META_KEY = Symbol('__destroyable_meta__');
|
|
11
|
+
|
|
12
|
+
export { DESTROYABLE_META_KEY as D };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as createComputeRef, v as valueForRef, N as NULL_REFERENCE } from './reference-
|
|
2
|
-
import { s as setInternalComponentManager } from './api-
|
|
3
|
-
import { i as internalHelper } from './internal-helper-
|
|
1
|
+
import { c as createComputeRef, v as valueForRef, N as NULL_REFERENCE } from './reference-CccCE8mJ.js';
|
|
2
|
+
import { s as setInternalComponentManager } from './api-DJnXAjon.js';
|
|
3
|
+
import { i as internalHelper } from './internal-helper-Becm19An.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
@module @ember/helper
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { h as hasListeners, r as removeListener, s as sendEvent, a as addListener } from './events-3Q5Qvo6Q.js';
|
|
2
|
+
import { deprecateUntil, DEPRECATIONS } from '../@ember/-internals/deprecations/index.js';
|
|
3
|
+
import { M as Mixin, I as INTERNAL_MIXIN_CREATE } from './mixin-AGmJaAAY.js';
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
Standalone implementations of the deprecated `Evented` methods. They are
|
|
7
|
+
shared between the `Evented` mixin and the framework classes (`Component`,
|
|
8
|
+
`Route`, `EmberRouter`) that historically included it, so that the framework
|
|
9
|
+
itself no longer applies the deprecated mixin.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
function eventedOn(obj, name, target, method) {
|
|
13
|
+
deprecateUntil('`Evented#on` is deprecated. Use native JavaScript events or a dedicated event library instead.', DEPRECATIONS.DEPRECATE_EVENTED);
|
|
14
|
+
addListener(obj, name, target, method);
|
|
15
|
+
}
|
|
16
|
+
function eventedOne(obj, name, target, method) {
|
|
17
|
+
deprecateUntil('`Evented#one` is deprecated. Use native JavaScript events or a dedicated event library instead.', DEPRECATIONS.DEPRECATE_EVENTED);
|
|
18
|
+
addListener(obj, name, target, method, true);
|
|
19
|
+
}
|
|
20
|
+
function eventedTrigger(obj, name, args) {
|
|
21
|
+
deprecateUntil('`Evented#trigger` is deprecated. Use native JavaScript events or a dedicated event library instead.', DEPRECATIONS.DEPRECATE_EVENTED);
|
|
22
|
+
sendEvent(obj, name, args);
|
|
23
|
+
}
|
|
24
|
+
function eventedOff(obj, name, target, method) {
|
|
25
|
+
deprecateUntil('`Evented#off` is deprecated. Use native JavaScript events or a dedicated event library instead.', DEPRECATIONS.DEPRECATE_EVENTED);
|
|
26
|
+
removeListener(obj, name, target, method);
|
|
27
|
+
}
|
|
28
|
+
function eventedHas(obj, name) {
|
|
29
|
+
deprecateUntil('`Evented#has` is deprecated. Use native JavaScript events or a dedicated event library instead.', DEPRECATIONS.DEPRECATE_EVENTED);
|
|
30
|
+
return hasListeners(obj, name);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
@module @ember/object/evented
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
This mixin allows for Ember objects to subscribe to and emit events.
|
|
39
|
+
|
|
40
|
+
```app/utils/person.js
|
|
41
|
+
import EmberObject from '@ember/object';
|
|
42
|
+
import Evented from '@ember/object/evented';
|
|
43
|
+
|
|
44
|
+
export default class Person extends EmberObject.extend(Evented) {
|
|
45
|
+
greet() {
|
|
46
|
+
// ...
|
|
47
|
+
this.trigger('greet');
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
```javascript
|
|
53
|
+
var person = Person.create();
|
|
54
|
+
|
|
55
|
+
person.on('greet', function() {
|
|
56
|
+
console.log('Our person has greeted');
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
person.greet();
|
|
60
|
+
|
|
61
|
+
// outputs: 'Our person has greeted'
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
You can also chain multiple event subscriptions:
|
|
65
|
+
|
|
66
|
+
```javascript
|
|
67
|
+
person.on('greet', function() {
|
|
68
|
+
console.log('Our person has greeted');
|
|
69
|
+
}).one('greet', function() {
|
|
70
|
+
console.log('Offer one-time special');
|
|
71
|
+
}).off('event', this, forgetThis);
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
@class Evented
|
|
75
|
+
@public
|
|
76
|
+
@deprecated Use native JavaScript events or a dedicated event library instead.
|
|
77
|
+
*/
|
|
78
|
+
|
|
79
|
+
const Evented = Mixin[INTERNAL_MIXIN_CREATE]({
|
|
80
|
+
on(name, target, method) {
|
|
81
|
+
eventedOn(this, name, target, method);
|
|
82
|
+
return this;
|
|
83
|
+
},
|
|
84
|
+
one(name, target, method) {
|
|
85
|
+
eventedOne(this, name, target, method);
|
|
86
|
+
return this;
|
|
87
|
+
},
|
|
88
|
+
trigger(name, ...args) {
|
|
89
|
+
eventedTrigger(this, name, args);
|
|
90
|
+
},
|
|
91
|
+
off(name, target, method) {
|
|
92
|
+
eventedOff(this, name, target, method);
|
|
93
|
+
return this;
|
|
94
|
+
},
|
|
95
|
+
has(name) {
|
|
96
|
+
return eventedHas(this, name);
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
export { Evented as E, eventedOne as a, eventedTrigger as b, eventedOff as c, eventedHas as d, eventedOn as e };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { meta, peekMeta } from '../@ember/-internals/meta/lib/meta.js';
|
|
2
2
|
import { a as setListeners } from './super-BBBjgF69.js';
|
|
3
|
+
import { deprecateUntil, DEPRECATIONS } from '../@ember/-internals/deprecations/index.js';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
@module @ember/object
|
|
@@ -158,6 +159,7 @@ function hasListeners(obj, eventName) {
|
|
|
158
159
|
|
|
159
160
|
@method on
|
|
160
161
|
@static
|
|
162
|
+
@deprecated Use native JavaScript events or a dedicated event library instead.
|
|
161
163
|
@for @ember/object/evented
|
|
162
164
|
@param {String} eventNames*
|
|
163
165
|
@param {Function} func
|
|
@@ -165,6 +167,7 @@ function hasListeners(obj, eventName) {
|
|
|
165
167
|
@public
|
|
166
168
|
*/
|
|
167
169
|
function on(...args) {
|
|
170
|
+
deprecateUntil('The `on()` event decorator is deprecated. Use native JavaScript events or a dedicated event library instead.', DEPRECATIONS.DEPRECATE_EVENTED);
|
|
168
171
|
let func = args.pop();
|
|
169
172
|
let events = args;
|
|
170
173
|
setListeners(func, events);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as createComputeRef, U as UNDEFINED_REFERENCE, v as valueForRef } from './reference-
|
|
2
|
-
import { f as reifyPositional } from './arguments-
|
|
3
|
-
import { i as internalHelper } from './hash-
|
|
1
|
+
import { c as createComputeRef, U as UNDEFINED_REFERENCE, v as valueForRef } from './reference-CccCE8mJ.js';
|
|
2
|
+
import { f as reifyPositional } from './arguments-xjTAZ6VE.js';
|
|
3
|
+
import { i as internalHelper } from './hash-pP7ZP_NN.js';
|
|
4
4
|
import { setPath, getPath } from '../@glimmer/global-context/index.js';
|
|
5
5
|
import { i as isDict } from './collections-GpG8lT2g.js';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as createComputeRef, d as isInvokableRef, u as updateRef } from './reference-
|
|
2
|
-
import { f as reifyPositional, g as check, e as reifyNamed } from './arguments-
|
|
3
|
-
import { j as setInternalHelperManager } from './api-
|
|
1
|
+
import { c as createComputeRef, d as isInvokableRef, u as updateRef } from './reference-CccCE8mJ.js';
|
|
2
|
+
import { f as reifyPositional, g as check, e as reifyNamed } from './arguments-xjTAZ6VE.js';
|
|
3
|
+
import { j as setInternalHelperManager } from './api-DJnXAjon.js';
|
|
4
4
|
|
|
5
5
|
/* eslint-disable @typescript-eslint/no-empty-object-type */
|
|
6
6
|
function buildUntouchableThis(source) {
|
|
@@ -5,35 +5,35 @@ import { schedule, _backburner, _getCurrentRunLoop } from '../@ember/runloop/ind
|
|
|
5
5
|
import { associateDestroyableChild, destroy, registerDestructor, isDestroyed, isDestroying } from '../@glimmer/destroyable/index.js';
|
|
6
6
|
import { artifacts } from '../@glimmer/program/index.js';
|
|
7
7
|
import { R as RuntimeOpImpl } from './program-BAh__OXZ.js';
|
|
8
|
-
import { c as clientBuilder } from './api-
|
|
9
|
-
import { g as runtimeOptions, i as inTransaction, r as renderComponent$1 } from './render-
|
|
8
|
+
import { c as clientBuilder } from './api-B3M8aF1d.js';
|
|
9
|
+
import { g as runtimeOptions, i as inTransaction, r as renderComponent$1 } from './render-C_iak8Db.js';
|
|
10
10
|
import { c as consumeTag, f as isTracking, a as valueForTag, k as CURRENT_TAG, v as validateTag } from './cache-CofLhaS4.js';
|
|
11
11
|
import { g as get$1, a as _getProp } from './property_get-DuDs6rLg.js';
|
|
12
|
-
import { _ as _setProp, s as set } from './property_set-
|
|
12
|
+
import { _ as _setProp, s as set } from './property_set-CVmdjPdh.js';
|
|
13
13
|
import './guid-Cbq2sNV_.js';
|
|
14
14
|
import setGlobalContext from '../@glimmer/global-context/index.js';
|
|
15
|
-
import { a as tagForProperty, t as tagForObject, o as objectAt } from './chain-tags-
|
|
15
|
+
import { a as tagForProperty, t as tagForObject, o as objectAt } from './chain-tags-BlsXEpE-.js';
|
|
16
16
|
import { isEmberArray } from '../@ember/array/-internals.js';
|
|
17
17
|
import { i as isObject } from './spec-BXl1reqK.js';
|
|
18
18
|
import { t as tagFor } from './meta-BJtIZDir.js';
|
|
19
19
|
import { contentFor } from '../@ember/-internals/runtime/lib/mixins/-proxy.js';
|
|
20
20
|
import { i as isProxy } from './is_proxy-Bzg0d4m4.js';
|
|
21
|
-
import { v as valueForRef, c as createComputeRef, a as createConstRef, h as createInvokableRef, j as createReadOnlyRef, k as createUnboundRef } from './reference-
|
|
22
|
-
import { i as internalHelper } from './internal-helper-
|
|
21
|
+
import { v as valueForRef, c as createComputeRef, a as createConstRef, h as createInvokableRef, j as createReadOnlyRef, k as createUnboundRef } from './reference-CccCE8mJ.js';
|
|
22
|
+
import { i as internalHelper } from './internal-helper-Becm19An.js';
|
|
23
23
|
import { i as isHTMLSafe } from './index-D-xTBV4B.js';
|
|
24
24
|
import isArray from '../@ember/array/lib/is-array.js';
|
|
25
25
|
import { isFactory } from '../@ember/-internals/owner/index.js';
|
|
26
26
|
import { _instrumentStart } from '../@ember/instrumentation/index.js';
|
|
27
27
|
import { g as getComponentTemplate } from './template-Dc_cBOoX.js';
|
|
28
|
-
import { a as getInternalHelperManager, j as setInternalHelperManager, g as getInternalComponentManager } from './api-
|
|
29
|
-
import { h as hash, f as fn, a as array } from './hash-
|
|
30
|
-
import { g as get, c as concat } from './get-
|
|
31
|
-
import { o as on } from './on-
|
|
32
|
-
import { T as TEMPLATE_ONLY_COMPONENT_MANAGER, t as templateOnlyComponent } from './template-only-
|
|
28
|
+
import { a as getInternalHelperManager, j as setInternalHelperManager, g as getInternalComponentManager } from './api-DJnXAjon.js';
|
|
29
|
+
import { h as hash, f as fn, a as array } from './hash-pP7ZP_NN.js';
|
|
30
|
+
import { g as get, c as concat } from './get-B1Vq9Mmk.js';
|
|
31
|
+
import { o as on } from './on-BFt-Sx9A.js';
|
|
32
|
+
import { T as TEMPLATE_ONLY_COMPONENT_MANAGER, t as templateOnlyComponent } from './template-only-CWsfnbVm.js';
|
|
33
33
|
import { i as isCurlyManager } from './curly-brand-B_F79Dep.js';
|
|
34
34
|
import { i as isClassicHelper } from './helper-brand-C9_8vvOf.js';
|
|
35
35
|
import { dasherize } from '../@ember/-internals/string/index.js';
|
|
36
|
-
import { a as uniqueId } from './unique-id-
|
|
36
|
+
import { a as uniqueId } from './unique-id-DNqsbhfh.js';
|
|
37
37
|
import { E as EvaluationContextImpl } from './program-context-WVlzpPdi.js';
|
|
38
38
|
|
|
39
39
|
/**
|
|
@@ -268,8 +268,8 @@ const trackArray = internalHelper(({
|
|
|
268
268
|
|
|
269
269
|
There are two special values for `key`:
|
|
270
270
|
|
|
271
|
+
* `@identity` - The item in the array itself. This is the default.
|
|
271
272
|
* `@index` - The index of the item in the array.
|
|
272
|
-
* `@identity` - The item in the array itself.
|
|
273
273
|
|
|
274
274
|
### {{else}} condition
|
|
275
275
|
|
|
@@ -382,6 +382,30 @@ const trackArray = internalHelper(({
|
|
|
382
382
|
|
|
383
383
|
`#each-in` is a keyword and does not need to be imported.
|
|
384
384
|
|
|
385
|
+
### Specifying Keys
|
|
386
|
+
|
|
387
|
+
Like `{{#each}}`, `{{#each-in}}` accepts a `key` option to decide which DOM
|
|
388
|
+
elements can be reused between renders. Since `{{#each-in}}` yields two block
|
|
389
|
+
params, the special values pick which one is used:
|
|
390
|
+
|
|
391
|
+
* `@identity` - The second block param: the property's value. This is the
|
|
392
|
+
default. Changing a value replaces that entry's DOM instead of updating it
|
|
393
|
+
in place.
|
|
394
|
+
* `@key` - The first block param: the property name, or for a `Map`, its key.
|
|
395
|
+
|
|
396
|
+
Any other string is a path, looked up on the value: `key="id"` keys each entry
|
|
397
|
+
by its `value.id`.
|
|
398
|
+
|
|
399
|
+
For example, `@key` keeps each entry's DOM as its score changes, so anything
|
|
400
|
+
stateful inside it — focus, a running transition, a component instance — survives
|
|
401
|
+
the update:
|
|
402
|
+
|
|
403
|
+
```handlebars
|
|
404
|
+
{{#each-in this.scores key="@key" as |player score|}}
|
|
405
|
+
<PlayerScore @name={{player}} @score={{score}} />
|
|
406
|
+
{{/each-in}}
|
|
407
|
+
```
|
|
408
|
+
|
|
385
409
|
@method each-in
|
|
386
410
|
@static
|
|
387
411
|
@noimport
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getOwner } from '../@ember/-internals/owner/index.js';
|
|
2
|
-
import { c as computed, d as defineProperty } from './computed-
|
|
3
|
-
import { i as isElementDescriptor } from './decorator-
|
|
2
|
+
import { c as computed, d as defineProperty } from './computed-ZvOk7SJQ.js';
|
|
3
|
+
import { i as isElementDescriptor } from './decorator-DcvVDSJV.js';
|
|
4
4
|
|
|
5
5
|
let DEBUG_INJECTION_FUNCTIONS;
|
|
6
6
|
|
|
@@ -3,8 +3,8 @@ import { g as guidFor } from './guid-Cbq2sNV_.js';
|
|
|
3
3
|
import './env-DXxsTFkM.js';
|
|
4
4
|
import { assert } from '../@ember/debug/lib/assert.js';
|
|
5
5
|
import { s as setComponentTemplate } from './template-Dc_cBOoX.js';
|
|
6
|
-
import { s as setInternalComponentManager } from './api-
|
|
7
|
-
import { v as valueForRef, a as createConstRef } from './reference-
|
|
6
|
+
import { s as setInternalComponentManager } from './api-DJnXAjon.js';
|
|
7
|
+
import { v as valueForRef, a as createConstRef } from './reference-CccCE8mJ.js';
|
|
8
8
|
import { u as untrack } from './cache-CofLhaS4.js';
|
|
9
9
|
|
|
10
10
|
function NOOP() {}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { associateDestroyableChild } from '../@glimmer/destroyable/index.js';
|
|
2
|
-
import { a as getInternalHelperManager, f as hasValue, h as hasDestroyable } from './api-
|
|
2
|
+
import { a as getInternalHelperManager, f as hasValue, h as hasDestroyable } from './api-DJnXAjon.js';
|
|
3
3
|
import { getOwner } from '../@glimmer/owner/index.js';
|
|
4
4
|
import { e as createCache, g as getValue } from './cache-CofLhaS4.js';
|
|
5
|
-
import { E as EMPTY_ARGS, a as EMPTY_NAMED, b as EMPTY_POSITIONAL } from './arguments-
|
|
5
|
+
import { E as EMPTY_ARGS, a as EMPTY_NAMED, b as EMPTY_POSITIONAL } from './arguments-xjTAZ6VE.js';
|
|
6
6
|
|
|
7
7
|
function getArgs(proxy) {
|
|
8
8
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme
|