ember-source 7.2.0-alpha.4 → 7.3.0-alpha.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/blueprints/-addon-import.js +4 -6
- package/blueprints/-utils.js +6 -9
- package/build-metadata.json +3 -3
- package/dist/dev/packages/@ember/-internals/browser-environment/index.js +1 -1
- package/dist/dev/packages/@ember/-internals/deprecations/index.js +10 -0
- package/dist/dev/packages/@ember/-internals/glimmer/index.js +11 -11
- package/dist/dev/packages/@ember/-internals/metal/index.js +18 -18
- package/dist/dev/packages/@ember/-internals/routing/index.js +3 -3
- 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/-proxy.js +8 -8
- package/dist/dev/packages/@ember/-internals/runtime/lib/mixins/action_handler.js +1 -1
- package/dist/dev/packages/@ember/-internals/runtime/lib/mixins/comparable.js +5 -0
- package/dist/dev/packages/@ember/-internals/runtime/lib/mixins/target_action_support.js +3 -3
- package/dist/dev/packages/@ember/-internals/utils/index.js +2 -2
- package/dist/dev/packages/@ember/-internals/views/lib/mixins/action_support.js +1 -1
- package/dist/dev/packages/@ember/-internals/views/lib/system/event_dispatcher.js +2 -2
- package/dist/dev/packages/@ember/-internals/views/lib/system/utils.js +1 -1
- package/dist/dev/packages/@ember/-internals/views/lib/views/core_view.js +1 -1
- package/dist/dev/packages/@ember/application/index.js +6 -7
- package/dist/dev/packages/@ember/application/instance.js +24 -4
- package/dist/dev/packages/@ember/application/namespace.js +3 -3
- package/dist/dev/packages/@ember/array/index.js +10 -64
- package/dist/dev/packages/@ember/array/lib/is-array.js +71 -0
- package/dist/dev/packages/@ember/array/proxy.js +8 -8
- package/dist/dev/packages/@ember/component/helper.js +321 -1
- package/dist/dev/packages/@ember/component/index.js +21 -15
- package/dist/dev/packages/@ember/component/template-only.js +1 -1
- package/dist/dev/packages/@ember/controller/index.js +3 -3
- package/dist/dev/packages/@ember/debug/data-adapter.js +3 -3
- package/dist/dev/packages/@ember/debug/index.js +1 -1
- package/dist/dev/packages/@ember/engine/index.js +5 -5
- package/dist/dev/packages/@ember/engine/instance.js +2 -2
- package/dist/dev/packages/@ember/helper/index.js +8 -27
- 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 +2 -2
- package/dist/dev/packages/@ember/object/compat.js +3 -3
- 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 +2 -2
- package/dist/dev/packages/@ember/object/events.js +1 -1
- package/dist/dev/packages/@ember/object/index.js +30 -25
- package/dist/dev/packages/@ember/object/internals.js +1 -1
- package/dist/dev/packages/@ember/object/lib/computed/computed_macros.js +5 -5
- package/dist/dev/packages/@ember/object/lib/computed/reduce_computed_macros.js +3 -3
- package/dist/dev/packages/@ember/object/mixin.js +6 -6
- 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 +3 -3
- package/dist/dev/packages/@ember/reactive/collections.js +153 -153
- package/dist/dev/packages/@ember/renderer/index.js +1 -1
- package/dist/dev/packages/@ember/routing/-internals.js +3 -3
- package/dist/dev/packages/@ember/routing/index.js +12 -8
- package/dist/dev/packages/@ember/routing/lib/generate_controller.js +2 -3
- package/dist/dev/packages/@ember/routing/lib/routing-service.js +5 -6
- package/dist/dev/packages/@ember/routing/lib/utils.js +3 -3
- package/dist/dev/packages/@ember/routing/route.js +12 -12
- package/dist/dev/packages/@ember/routing/router-service.js +25 -19
- package/dist/dev/packages/@ember/routing/router.js +5 -5
- 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/@ember/template-compiler/lib/template.js +2 -2
- package/dist/dev/packages/@ember/template-factory/index.js +1 -1
- package/dist/dev/packages/@ember/utils/lib/compare.js +5 -2
- package/dist/dev/packages/@ember/utils/lib/is_empty.js +1 -1
- package/dist/dev/packages/@glimmer/encoder/index.js +1 -1
- package/dist/dev/packages/@glimmer/manager/index.js +4 -4
- package/dist/dev/packages/@glimmer/node/index.js +3 -3
- package/dist/dev/packages/@glimmer/opcode-compiler/index.js +2 -2
- package/dist/dev/packages/@glimmer/program/index.js +10 -10
- package/dist/dev/packages/@glimmer/reference/index.js +5 -5
- package/dist/dev/packages/@glimmer/runtime/index.js +13 -13
- package/dist/dev/packages/@glimmer/tracking/index.js +2 -2
- package/dist/dev/packages/@glimmer/tracking/primitives/cache/index.js +1 -1
- package/dist/dev/packages/@glimmer/util/index.js +4 -4
- package/dist/dev/packages/@glimmer/validator/index.js +3 -3
- package/dist/dev/packages/@glimmer/vm/index.js +2 -2
- package/dist/dev/packages/ember/version.js +1 -1
- package/dist/dev/packages/ember-template-compiler/index.js +4 -4
- package/dist/dev/packages/router_js/index.js +3 -3
- package/dist/dev/packages/rsvp/index.js +2281 -1
- package/dist/dev/packages/shared-chunks/{alias-RGbDZoAB.js → alias-DpqL1qx6.js} +7 -7
- package/dist/dev/packages/shared-chunks/{api-BT9M3UaD.js → api-BlZDPg1n.js} +6 -6
- package/dist/dev/packages/shared-chunks/{element-builder-Cl1kHFJE.js → api-C0PAtEgQ.js} +139 -120
- package/dist/dev/packages/shared-chunks/{api-DG5kRT-o.js → api-DuLOZMO_.js} +3 -3
- package/dist/dev/packages/shared-chunks/{args-proxy-CB0SM6jC.js → args-proxy-CS5Brs3_.js} +2 -2
- package/dist/dev/packages/shared-chunks/{untouchable-this-BHdAERUu.js → arguments-CDkbOqTS.js} +236 -236
- package/dist/dev/packages/shared-chunks/{array-BMaSKezP.js → array-CVEnNWng.js} +3 -3
- package/dist/dev/packages/shared-chunks/{array-utils-BEaSKdEb.js → array-utils-CZQxrdD3.js} +1 -1
- package/dist/dev/packages/shared-chunks/{cache-CeWOBNQg.js → cache-DGDPVCpC.js} +2 -3
- package/dist/dev/packages/shared-chunks/{capabilities-CZkuOqqC.js → capabilities-CajW4QjE.js} +1 -1
- package/dist/dev/packages/shared-chunks/{chain-tags-DfmU63mS.js → chain-tags-uWSImHzB.js} +4 -4
- package/dist/dev/packages/shared-chunks/{collections-DEt-i-8B.js → collections-DPkjqeA3.js} +2 -2
- package/dist/dev/packages/shared-chunks/{compiler-DhH2WLpA.js → compiler-QUSl_urU.js} +3 -3
- package/dist/dev/packages/shared-chunks/{computed-Daavz6vC.js → computed-BPCtuOxQ.js} +6 -6
- package/dist/dev/packages/shared-chunks/{curly-YoYS2vXw.js → curly-DGUCLOud.js} +10 -11
- package/dist/dev/packages/shared-chunks/curly-brand-B_F79Dep.js +12 -0
- package/dist/dev/packages/shared-chunks/{curried-Cnjy9_ug.js → curried-BZnYakIg.js} +1 -1
- package/dist/dev/packages/shared-chunks/{decorator-DYQwMItS.js → decorator-B5Uh5NFI.js} +1 -1
- package/dist/dev/packages/shared-chunks/{element-bBwMD8cw.js → element-BYLB-q7a.js} +5 -3
- package/dist/dev/packages/shared-chunks/{events-B1lx9T1I.js → events-6aFVjD4k.js} +1 -1
- package/dist/{prod/packages/shared-chunks/flags-B9qxc-pB.js → dev/packages/shared-chunks/flags-BZxHQ0yn.js} +1 -1
- package/dist/dev/packages/shared-chunks/{get-CO3EIWsm.js → get-6I3sjd-I.js} +33 -36
- package/dist/{prod/packages/shared-chunks/get_properties-wj_Qmotj.js → dev/packages/shared-chunks/get_properties-Cm2sWt5f.js} +1 -1
- package/dist/dev/packages/shared-chunks/{guid-PO2v9BaN.js → guid-Cbq2sNV_.js} +1 -1
- package/dist/dev/packages/shared-chunks/{hash-2-93qikL.js → hash-6NDs_5_f.js} +18 -12
- package/dist/dev/packages/shared-chunks/helper-brand-C9_8vvOf.js +12 -0
- package/dist/dev/packages/shared-chunks/{index-DX90CU4L.js → index-BGP1rw3B.js} +1 -1
- package/dist/dev/packages/shared-chunks/{index-dyv6rcBf.js → index-CCyXUNBa.js} +655 -1633
- package/dist/dev/packages/shared-chunks/{index-DkwVSPP5.js → index-DaFzpTIE.js} +10 -9
- package/dist/dev/packages/shared-chunks/{injected_property-B075jH6c.js → injected_property-CbBLr5jt.js} +2 -2
- package/dist/dev/packages/shared-chunks/{internal-Bpr6ihB_.js → internal-DTOXyEGM.js} +4 -4
- package/dist/dev/packages/shared-chunks/{internal-helper-IC87S6iZ.js → internal-helper-CKrni0b_.js} +1 -1
- package/dist/dev/packages/shared-chunks/{invoke-Ds0KEfP_.js → invoke-d9sqa50M.js} +3 -3
- package/dist/dev/packages/shared-chunks/{libraries-P8Ins5CB.js → libraries-DwffpMGE.js} +1 -1
- package/dist/dev/packages/shared-chunks/{meta-Cjo3zQJq.js → meta-BqC7f9Ia.js} +1 -1
- package/dist/{prod/packages/shared-chunks/namespace_search-TFdmjK_a.js → dev/packages/shared-chunks/namespace_search-BfvzEQzN.js} +1 -1
- package/dist/dev/packages/shared-chunks/{normalize-CxG_iVLJ.js → normalize-CKySQVU7.js} +2 -2
- package/dist/dev/packages/shared-chunks/{or-Bg6rCMF8.js → not-DYh6AY9Z.js} +36 -36
- package/dist/dev/packages/shared-chunks/{observers-CejcZw5s.js → observers-DMlX2nCi.js} +5 -5
- package/dist/dev/packages/shared-chunks/{on-Ch_lyozr.js → on-DlF0Wy7P.js} +10 -10
- package/dist/dev/packages/shared-chunks/outlet-CHFL7tun.js +135 -0
- package/dist/dev/packages/shared-chunks/{present-D0EfKzC6.js → present-B1rrjAVM.js} +1 -1
- package/dist/{prod/packages/shared-chunks/program-CF651Zuj.js → dev/packages/shared-chunks/program-DlgjqLa6.js} +3 -3
- package/dist/dev/packages/shared-chunks/{program-context-BaYVr5GA.js → program-context-Dq8xN2HI.js} +5 -4
- package/dist/dev/packages/shared-chunks/{property_get-BjbsrgpU.js → property_get-CRP7MFz_.js} +3 -3
- package/dist/dev/packages/shared-chunks/{property_set-LJskl202.js → property_set-qCUylPEK.js} +3 -3
- package/dist/dev/packages/shared-chunks/{reference-C-OXd_kp.js → reference-BqOLhKFy.js} +3 -3
- package/dist/dev/packages/shared-chunks/{registers-Buvdhhxx.js → registers-C_W2qYHJ.js} +1 -1
- package/dist/dev/packages/shared-chunks/{rehydrate-builder-IH4d_JQy.js → rehydrate-builder-C6k1XhET.js} +4 -4
- package/dist/dev/packages/shared-chunks/{render-Dz3OWqXy.js → render-87_sKZ_k.js} +94 -94
- package/dist/dev/packages/shared-chunks/{rsvp-C6j8G1D1.js → rsvp.es-DR7yS7qg.js} +150 -154
- package/dist/dev/packages/shared-chunks/{serialize-builder-DKliZPPG.js → serialize-builder-BlxBjwO-.js} +2 -2
- package/dist/dev/packages/shared-chunks/{set_properties-CNds2HCH.js → set_properties-C4TSebH6.js} +2 -2
- package/dist/dev/packages/shared-chunks/setup-registry-BHdDJATP.js +951 -0
- package/dist/{prod/packages/shared-chunks/simple-cast-BXTrayoV.js → dev/packages/shared-chunks/simple-cast-DCvJLSin.js} +1 -1
- package/dist/{prod/packages/shared-chunks/super-D4qkU4uq.js → dev/packages/shared-chunks/super-BBBjgF69.js} +1 -1
- package/dist/{prod/packages/shared-chunks/syscall-ops-nrBHMOTp.js → dev/packages/shared-chunks/syscall-ops-CN7STuUn.js} +1 -1
- package/dist/dev/packages/shared-chunks/{template-B0Apv9g2.js → template-BRrQR6KS.js} +1 -1
- package/dist/dev/packages/shared-chunks/{template-only-BxYzSEnC.js → template-only-Cu639ICT.js} +2 -4
- package/dist/dev/packages/shared-chunks/{textarea-DHjEFpZu.js → textarea-C4lYkaHj.js} +12 -8
- package/dist/dev/packages/shared-chunks/{tracked-B76E1nGz.js → tracked-DEyf0T_X.js} +5 -5
- package/dist/dev/packages/shared-chunks/{tracked-data-CH1USZZy.js → tracked-data-DgqqRdYO.js} +2 -2
- package/dist/dev/packages/shared-chunks/{unique-id-Hd96VZlE.js → unique-id-DQOhouG1.js} +2 -2
- package/dist/dev/packages/shared-chunks/{unrecognized-url-error-BQdkjTtZ.js → unrecognized-url-error-B8loxkay.js} +3 -3
- package/dist/{prod/packages/shared-chunks/vm-ops-5QCUIRx4.js → dev/packages/shared-chunks/vm-ops-ImHv0Wtg.js} +1 -1
- package/dist/prod/packages/@ember/-internals/deprecations/index.js +10 -0
- package/dist/prod/packages/@ember/-internals/glimmer/index.js +11 -11
- package/dist/prod/packages/@ember/-internals/metal/index.js +18 -18
- package/dist/prod/packages/@ember/-internals/routing/index.js +3 -3
- 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/-proxy.js +8 -8
- package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/action_handler.js +1 -1
- package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/comparable.js +5 -0
- package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/target_action_support.js +3 -3
- package/dist/prod/packages/@ember/-internals/utils/index.js +2 -2
- package/dist/prod/packages/@ember/-internals/views/lib/mixins/action_support.js +1 -1
- package/dist/prod/packages/@ember/-internals/views/lib/system/event_dispatcher.js +2 -2
- package/dist/prod/packages/@ember/-internals/views/lib/system/utils.js +1 -1
- package/dist/prod/packages/@ember/-internals/views/lib/views/core_view.js +1 -1
- package/dist/prod/packages/@ember/application/index.js +5 -6
- package/dist/prod/packages/@ember/application/instance.js +19 -4
- package/dist/prod/packages/@ember/application/namespace.js +3 -3
- package/dist/prod/packages/@ember/array/index.js +11 -58
- package/dist/prod/packages/@ember/array/lib/is-array.js +64 -0
- package/dist/prod/packages/@ember/array/proxy.js +8 -8
- package/dist/prod/packages/@ember/component/helper.js +305 -1
- package/dist/prod/packages/@ember/component/index.js +20 -14
- package/dist/prod/packages/@ember/component/template-only.js +1 -1
- package/dist/prod/packages/@ember/controller/index.js +3 -3
- package/dist/prod/packages/@ember/debug/data-adapter.js +3 -3
- package/dist/prod/packages/@ember/engine/index.js +5 -5
- package/dist/prod/packages/@ember/engine/instance.js +2 -2
- package/dist/prod/packages/@ember/helper/index.js +8 -27
- 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 +2 -2
- package/dist/prod/packages/@ember/object/compat.js +3 -3
- 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 +2 -2
- package/dist/prod/packages/@ember/object/events.js +1 -1
- package/dist/prod/packages/@ember/object/index.js +30 -25
- package/dist/prod/packages/@ember/object/internals.js +2 -2
- package/dist/prod/packages/@ember/object/lib/computed/computed_macros.js +4 -4
- package/dist/prod/packages/@ember/object/lib/computed/reduce_computed_macros.js +2 -2
- package/dist/prod/packages/@ember/object/mixin.js +6 -6
- 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 +3 -3
- package/dist/prod/packages/@ember/reactive/collections.js +153 -153
- package/dist/prod/packages/@ember/renderer/index.js +1 -1
- package/dist/prod/packages/@ember/routing/index.js +12 -8
- package/dist/prod/packages/@ember/routing/lib/generate_controller.js +1 -2
- package/dist/prod/packages/@ember/routing/lib/routing-service.js +4 -5
- package/dist/prod/packages/@ember/routing/lib/utils.js +3 -3
- package/dist/prod/packages/@ember/routing/route.js +12 -12
- package/dist/prod/packages/@ember/routing/router-service.js +24 -18
- package/dist/prod/packages/@ember/routing/router.js +5 -5
- 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/@ember/template-compiler/lib/template.js +2 -2
- package/dist/prod/packages/@ember/template-factory/index.js +1 -1
- package/dist/prod/packages/@ember/utils/lib/compare.js +5 -2
- package/dist/prod/packages/@ember/utils/lib/is_empty.js +1 -1
- package/dist/prod/packages/@glimmer/encoder/index.js +1 -1
- package/dist/prod/packages/@glimmer/manager/index.js +4 -4
- package/dist/prod/packages/@glimmer/node/index.js +3 -3
- package/dist/prod/packages/@glimmer/opcode-compiler/index.js +2 -2
- package/dist/prod/packages/@glimmer/program/index.js +10 -10
- package/dist/prod/packages/@glimmer/reference/index.js +5 -5
- package/dist/prod/packages/@glimmer/runtime/index.js +13 -13
- package/dist/prod/packages/@glimmer/tracking/index.js +2 -2
- package/dist/prod/packages/@glimmer/tracking/primitives/cache/index.js +1 -1
- package/dist/prod/packages/@glimmer/util/index.js +4 -4
- package/dist/prod/packages/@glimmer/validator/index.js +3 -3
- package/dist/prod/packages/@glimmer/vm/index.js +2 -2
- package/dist/prod/packages/ember/version.js +1 -1
- package/dist/prod/packages/ember-template-compiler/index.js +4 -4
- package/dist/prod/packages/router_js/index.js +3 -3
- package/dist/prod/packages/rsvp/index.js +2281 -1
- package/dist/prod/packages/shared-chunks/{alias-DsIh-16z.js → alias-Bod6qdNp.js} +7 -7
- package/dist/prod/packages/shared-chunks/{api-CGZbGcvX.js → api-B_poQGXS.js} +6 -6
- package/dist/prod/packages/shared-chunks/{element-builder-CZePCkbA.js → api-CQexacBn.js} +139 -120
- package/dist/prod/packages/shared-chunks/{api-DOLN_cR2.js → api-DlJKfm_f.js} +3 -3
- package/dist/prod/packages/shared-chunks/{args-proxy-CaXVcI8G.js → args-proxy-CCoFtYLS.js} +2 -2
- package/dist/prod/packages/shared-chunks/{debug-render-tree-CYENUjgX.js → arguments-BzAkZVBa.js} +198 -198
- package/dist/prod/packages/shared-chunks/{array-DYFI95FA.js → array-BzReKMeW.js} +3 -3
- package/dist/prod/packages/shared-chunks/{array-utils-BEaSKdEb.js → array-utils-CZQxrdD3.js} +1 -1
- package/dist/prod/packages/shared-chunks/{cache-CG6_L9db.js → cache-CofLhaS4.js} +1 -2
- package/dist/prod/packages/shared-chunks/{capabilities-_5e35539.js → capabilities-BuVYh-vx.js} +1 -1
- package/dist/prod/packages/shared-chunks/{chain-tags-BP0V2LnZ.js → chain-tags-B2J7DsxO.js} +4 -4
- package/dist/prod/packages/shared-chunks/{collections-By4M3cTy.js → collections-GpG8lT2g.js} +10 -10
- package/dist/prod/packages/shared-chunks/{compiler-DQmEjFyx.js → compiler-lBSssiWp.js} +2 -2
- package/dist/prod/packages/shared-chunks/{computed-D6MVTTDd.js → computed-DtIStxvq.js} +6 -6
- package/dist/prod/packages/shared-chunks/{curly-DCYSwLtz.js → curly-a6DP7r87.js} +10 -11
- package/dist/prod/packages/shared-chunks/curly-brand-B_F79Dep.js +12 -0
- package/dist/prod/packages/shared-chunks/{curried-Cnjy9_ug.js → curried-BZnYakIg.js} +1 -1
- package/dist/prod/packages/shared-chunks/{decorator-B8Lpq40g.js → decorator-9ikVwsjY.js} +1 -1
- package/dist/prod/packages/shared-chunks/{element-CT5H5uxF.js → element-DgHdPZ8u.js} +5 -3
- package/dist/prod/packages/shared-chunks/{events-C7aYCy0N.js → events-DYrYz3V8.js} +1 -1
- package/dist/{dev/packages/shared-chunks/flags-B9qxc-pB.js → prod/packages/shared-chunks/flags-BZxHQ0yn.js} +1 -1
- package/dist/prod/packages/shared-chunks/{get-tlL23wmp.js → get-Dago5uGl.js} +33 -36
- package/dist/{dev/packages/shared-chunks/get_properties-B203vZpz.js → prod/packages/shared-chunks/get_properties-Dg3xFpiS.js} +1 -1
- package/dist/prod/packages/shared-chunks/{guid-PO2v9BaN.js → guid-Cbq2sNV_.js} +1 -1
- package/dist/prod/packages/shared-chunks/{hash-C6IoC4eR.js → hash-gEXIsSO4.js} +24 -18
- package/dist/prod/packages/shared-chunks/helper-brand-C9_8vvOf.js +12 -0
- package/dist/prod/packages/shared-chunks/{index-D-rcNBLp.js → index-Bf53M8eS.js} +9 -8
- package/dist/prod/packages/shared-chunks/{index-DabsnYit.js → index-npr2B-vu.js} +541 -1465
- package/dist/prod/packages/shared-chunks/{injected_property-COGiYHKc.js → injected_property-Y-FadDej.js} +2 -2
- package/dist/prod/packages/shared-chunks/{internal-BEJC2IJ-.js → internal-BQ7zHrqS.js} +4 -4
- package/dist/prod/packages/shared-chunks/{internal-helper-CoxiRnnb.js → internal-helper-Bz1lpDXr.js} +1 -1
- package/dist/prod/packages/shared-chunks/{invoke-D_jsLbsj.js → invoke-DhQ5QRp2.js} +3 -3
- package/dist/prod/packages/shared-chunks/{libraries-Bs3H8iwC.js → libraries-DBql0hdn.js} +2 -2
- package/dist/prod/packages/shared-chunks/{meta-Ce6-qROq.js → meta-BJtIZDir.js} +1 -1
- package/dist/{dev/packages/shared-chunks/namespace_search-TFdmjK_a.js → prod/packages/shared-chunks/namespace_search-BfvzEQzN.js} +1 -1
- package/dist/prod/packages/shared-chunks/{normalize-Bx4H3NjB.js → normalize-C_IStty9.js} +2 -2
- package/dist/prod/packages/shared-chunks/{or-sYlRiUn_.js → not-BOIVROuv.js} +28 -28
- package/dist/prod/packages/shared-chunks/{observers-Ci31SE36.js → observers-BmobpXAF.js} +5 -5
- package/dist/prod/packages/shared-chunks/{on-Dgmychhk.js → on-BZHAxzdq.js} +10 -10
- package/dist/prod/packages/shared-chunks/outlet--lIm3q7t.js +132 -0
- package/dist/{dev/packages/shared-chunks/program-CPXeXWVB.js → prod/packages/shared-chunks/program-BAh__OXZ.js} +3 -3
- package/dist/prod/packages/shared-chunks/{program-context-DmI53TzJ.js → program-context-COSioH46.js} +5 -4
- package/dist/prod/packages/shared-chunks/{property_get-Sw0SicEZ.js → property_get-DAKgbeJX.js} +2 -2
- package/dist/prod/packages/shared-chunks/{property_set-SHEIPMUG.js → property_set-BaQJdVfS.js} +3 -3
- package/dist/prod/packages/shared-chunks/{reference-D2agTt1V.js → reference-CG0yPgLy.js} +3 -3
- package/dist/prod/packages/shared-chunks/{registers-Buvdhhxx.js → registers-C_W2qYHJ.js} +1 -1
- package/dist/prod/packages/shared-chunks/{rehydrate-builder-B7MtrWip.js → rehydrate-builder-Blt1x9MP.js} +4 -4
- package/dist/prod/packages/shared-chunks/{render-B790-vbk.js → render-Dx7lr1hR.js} +94 -94
- package/dist/prod/packages/shared-chunks/{rsvp-C6j8G1D1.js → rsvp.es-DR7yS7qg.js} +150 -154
- package/dist/prod/packages/shared-chunks/{serialize-builder-kEyOKbzp.js → serialize-builder-BvAXYHTr.js} +2 -2
- package/dist/prod/packages/shared-chunks/{set_properties-CcLLHg1w.js → set_properties-Qxhw4qzw.js} +2 -2
- package/dist/prod/packages/shared-chunks/setup-registry-Dfu8EyLU.js +886 -0
- package/dist/{dev/packages/shared-chunks/simple-cast-BXTrayoV.js → prod/packages/shared-chunks/simple-cast-DCvJLSin.js} +1 -1
- package/dist/{dev/packages/shared-chunks/super-D4qkU4uq.js → prod/packages/shared-chunks/super-BBBjgF69.js} +1 -1
- package/dist/{dev/packages/shared-chunks/syscall-ops-nrBHMOTp.js → prod/packages/shared-chunks/syscall-ops-CN7STuUn.js} +1 -1
- package/dist/prod/packages/shared-chunks/{template-B0Apv9g2.js → template-BRrQR6KS.js} +1 -1
- package/dist/prod/packages/shared-chunks/{template-only-CP0NT7ce.js → template-only-DKNcKM5b.js} +2 -4
- package/dist/prod/packages/shared-chunks/{textarea-B_JYBuE8.js → textarea-DOmZ1x0E.js} +11 -7
- package/dist/prod/packages/shared-chunks/{tracked-CXcapuAm.js → tracked-B9380JtC.js} +5 -5
- package/dist/prod/packages/shared-chunks/{tracked-data-DNDzhYXf.js → tracked-data-CHq42QHb.js} +2 -2
- package/dist/prod/packages/shared-chunks/{unique-id-Hn8Qp4dS.js → unique-id-o2pS74go.js} +2 -2
- package/dist/prod/packages/shared-chunks/{unrecognized-url-error-ClNyMFJt.js → unrecognized-url-error-jjQ-FqKB.js} +3 -3
- package/dist/{dev/packages/shared-chunks/vm-ops-5QCUIRx4.js → prod/packages/shared-chunks/vm-ops-ImHv0Wtg.js} +1 -1
- package/docs/data.json +616 -569
- package/package.json +8 -6
- package/types/stable/@ember/-internals/deprecations/index.d.ts +6 -0
- package/types/stable/@ember/-internals/glimmer/index.d.ts +165 -121
- package/types/stable/@ember/-internals/glimmer/lib/base-renderer.d.ts +150 -0
- package/types/stable/@ember/-internals/glimmer/lib/component-managers/curly-brand.d.ts +10 -0
- package/types/stable/@ember/-internals/glimmer/lib/component-managers/curly.d.ts +3 -2
- package/types/stable/@ember/-internals/glimmer/lib/component-managers/mount.d.ts +1 -1
- package/types/stable/@ember/-internals/glimmer/lib/component-managers/outlet.d.ts +1 -1
- package/types/stable/@ember/-internals/glimmer/lib/component.d.ts +8 -2
- package/types/stable/@ember/-internals/glimmer/lib/glimmer-tracking-docs.d.ts +12 -12
- package/types/stable/@ember/-internals/glimmer/lib/helper-brand.d.ts +10 -0
- package/types/stable/@ember/-internals/glimmer/lib/helper.d.ts +20 -10
- package/types/stable/@ember/-internals/glimmer/lib/helpers/array.d.ts +3 -1
- package/types/stable/@ember/-internals/glimmer/lib/helpers/component.d.ts +65 -121
- package/types/stable/@ember/-internals/glimmer/lib/helpers/concat.d.ts +8 -4
- package/types/stable/@ember/-internals/glimmer/lib/helpers/each-in.d.ts +16 -14
- package/types/stable/@ember/-internals/glimmer/lib/helpers/element.d.ts +2 -0
- package/types/stable/@ember/-internals/glimmer/lib/helpers/fn.d.ts +11 -7
- package/types/stable/@ember/-internals/glimmer/lib/helpers/get.d.ts +23 -29
- package/types/stable/@ember/-internals/glimmer/lib/helpers/hash.d.ts +3 -1
- package/types/stable/@ember/-internals/glimmer/lib/helpers/if-unless.d.ts +95 -49
- package/types/stable/@ember/-internals/glimmer/lib/helpers/mut.d.ts +23 -54
- package/types/stable/@ember/-internals/glimmer/lib/helpers/page-title.d.ts +6 -2
- package/types/stable/@ember/-internals/glimmer/lib/helpers/readonly.d.ts +4 -8
- package/types/stable/@ember/-internals/glimmer/lib/modifiers/on.d.ts +10 -10
- package/types/stable/@ember/-internals/glimmer/lib/renderer.d.ts +7 -155
- package/types/stable/@ember/-internals/glimmer/lib/router-resolver.d.ts +17 -0
- package/types/stable/@ember/-internals/glimmer/lib/syntax/in-element.d.ts +2 -0
- package/types/stable/@ember/-internals/glimmer/lib/syntax/let.d.ts +2 -14
- package/types/stable/@ember/-internals/glimmer/lib/syntax/mount.d.ts +15 -11
- package/types/stable/@ember/-internals/glimmer/lib/syntax/outlet.d.ts +17 -10
- package/types/stable/@ember/-internals/runtime/lib/mixins/target_action_support.d.ts +1 -1
- package/types/stable/@ember/array/index.d.ts +6 -29
- package/types/stable/@ember/array/lib/is-array.d.ts +35 -0
- package/types/stable/@ember/component/template-only.d.ts +1 -3
- package/types/stable/@ember/controller/index.d.ts +1 -1
- package/types/stable/@ember/helper/index.d.ts +0 -19
- package/types/stable/@ember/object/index.d.ts +4 -3
- package/types/stable/@ember/object/observable.d.ts +4 -0
- package/types/stable/@ember/reactive/collections.d.ts +0 -6
- package/types/stable/@ember/renderer/index.d.ts +2 -2
- package/types/stable/@ember/routing/lib/generate_controller.d.ts +1 -1
- package/types/stable/@ember/routing/route.d.ts +2 -2
- package/types/stable/@ember/routing/router-service.d.ts +20 -12
- package/types/stable/@glimmer/runtime/lib/component/template-only.d.ts +0 -2
- package/types/stable/@glimmer/runtime/lib/dom/sanitized-values.d.ts +2 -2
- package/types/stable/@glimmer/runtime/lib/helpers/array.d.ts +1 -1
- package/types/stable/@glimmer/runtime/lib/helpers/concat.d.ts +8 -3
- package/types/stable/@glimmer/runtime/lib/helpers/fn.d.ts +13 -7
- package/types/stable/@glimmer/runtime/lib/helpers/get.d.ts +21 -29
- package/types/stable/@glimmer/runtime/lib/helpers/hash.d.ts +1 -1
- package/types/stable/@glimmer/syntax/lib/get-template-locals.d.ts +1 -1
- package/types/stable/@glimmer/tracking/index.d.ts +12 -12
- package/types/stable/index.d.ts +590 -585
- package/dist/dev/packages/shared-chunks/helper-Bm6EhgSW.js +0 -314
- package/dist/dev/packages/shared-chunks/setup-registry-C_YovxNX.js +0 -77
- package/dist/prod/packages/shared-chunks/helper-CCK8Ef0x.js +0 -298
- package/dist/prod/packages/shared-chunks/setup-registry-D14I0iDX.js +0 -74
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": "7.
|
|
6
|
+
"version": "7.3.0-alpha.1"
|
|
7
7
|
},
|
|
8
8
|
"files": {
|
|
9
9
|
"node_modules/rsvp/lib/rsvp/promise/all.js": {
|
|
@@ -202,6 +202,13 @@
|
|
|
202
202
|
},
|
|
203
203
|
"namespaces": {}
|
|
204
204
|
},
|
|
205
|
+
"packages/@ember/-internals/glimmer/lib/component-managers/curly-brand.ts": {
|
|
206
|
+
"name": "packages/@ember/-internals/glimmer/lib/component-managers/curly-brand.ts",
|
|
207
|
+
"modules": {},
|
|
208
|
+
"classes": {},
|
|
209
|
+
"fors": {},
|
|
210
|
+
"namespaces": {}
|
|
211
|
+
},
|
|
205
212
|
"packages/@ember/-internals/glimmer/lib/component-managers/route-template.ts": {
|
|
206
213
|
"name": "packages/@ember/-internals/glimmer/lib/component-managers/route-template.ts",
|
|
207
214
|
"modules": {},
|
|
@@ -526,6 +533,15 @@
|
|
|
526
533
|
"fors": {},
|
|
527
534
|
"namespaces": {}
|
|
528
535
|
},
|
|
536
|
+
"packages/@ember/-internals/glimmer/lib/base-renderer.ts": {
|
|
537
|
+
"name": "packages/@ember/-internals/glimmer/lib/base-renderer.ts",
|
|
538
|
+
"modules": {},
|
|
539
|
+
"classes": {},
|
|
540
|
+
"fors": {
|
|
541
|
+
"@ember/renderer": 1
|
|
542
|
+
},
|
|
543
|
+
"namespaces": {}
|
|
544
|
+
},
|
|
529
545
|
"packages/@ember/-internals/glimmer/lib/component.ts": {
|
|
530
546
|
"name": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
531
547
|
"modules": {},
|
|
@@ -544,6 +560,13 @@
|
|
|
544
560
|
},
|
|
545
561
|
"namespaces": {}
|
|
546
562
|
},
|
|
563
|
+
"packages/@ember/-internals/glimmer/lib/helper-brand.ts": {
|
|
564
|
+
"name": "packages/@ember/-internals/glimmer/lib/helper-brand.ts",
|
|
565
|
+
"modules": {},
|
|
566
|
+
"classes": {},
|
|
567
|
+
"fors": {},
|
|
568
|
+
"namespaces": {}
|
|
569
|
+
},
|
|
547
570
|
"packages/@ember/-internals/glimmer/lib/helper.ts": {
|
|
548
571
|
"name": "packages/@ember/-internals/glimmer/lib/helper.ts",
|
|
549
572
|
"modules": {},
|
|
@@ -555,13 +578,11 @@
|
|
|
555
578
|
},
|
|
556
579
|
"namespaces": {}
|
|
557
580
|
},
|
|
558
|
-
"packages/@ember/-internals/glimmer/lib/
|
|
559
|
-
"name": "packages/@ember/-internals/glimmer/lib/
|
|
581
|
+
"packages/@ember/-internals/glimmer/lib/router-resolver.ts": {
|
|
582
|
+
"name": "packages/@ember/-internals/glimmer/lib/router-resolver.ts",
|
|
560
583
|
"modules": {},
|
|
561
584
|
"classes": {},
|
|
562
|
-
"fors": {
|
|
563
|
-
"@ember/renderer": 1
|
|
564
|
-
},
|
|
585
|
+
"fors": {},
|
|
565
586
|
"namespaces": {}
|
|
566
587
|
},
|
|
567
588
|
"packages/@ember/-internals/glimmer/tests/integration/components/render-component-test.ts": {
|
|
@@ -965,8 +986,8 @@
|
|
|
965
986
|
"fors": {},
|
|
966
987
|
"namespaces": {}
|
|
967
988
|
},
|
|
968
|
-
"packages/@ember/array/lib/
|
|
969
|
-
"name": "packages/@ember/array/lib/
|
|
989
|
+
"packages/@ember/array/lib/is-array.ts": {
|
|
990
|
+
"name": "packages/@ember/array/lib/is-array.ts",
|
|
970
991
|
"modules": {
|
|
971
992
|
"@ember/array": 1
|
|
972
993
|
},
|
|
@@ -976,6 +997,15 @@
|
|
|
976
997
|
},
|
|
977
998
|
"namespaces": {}
|
|
978
999
|
},
|
|
1000
|
+
"packages/@ember/array/lib/make-array.ts": {
|
|
1001
|
+
"name": "packages/@ember/array/lib/make-array.ts",
|
|
1002
|
+
"modules": {},
|
|
1003
|
+
"classes": {},
|
|
1004
|
+
"fors": {
|
|
1005
|
+
"@ember/array": 1
|
|
1006
|
+
},
|
|
1007
|
+
"namespaces": {}
|
|
1008
|
+
},
|
|
979
1009
|
"packages/@ember/array/index.ts": {
|
|
980
1010
|
"name": "packages/@ember/array/index.ts",
|
|
981
1011
|
"modules": {},
|
|
@@ -2609,7 +2639,7 @@
|
|
|
2609
2639
|
"tag": "main",
|
|
2610
2640
|
"file": "packages/@ember/-internals/glimmer/lib/helper.ts",
|
|
2611
2641
|
"line": 57,
|
|
2612
|
-
"description": "[Glimmer](https://github.com/tildeio/glimmer) is a templating engine used by Ember.js that is compatible with a subset of the [Handlebars](http://handlebarsjs.com/) syntax.\n\n### Showing a property\n\nTemplates manage the flow of an application's UI, and display state (through\nthe DOM) to a user. For example, given a component with the property \"name\",\nthat component's template can use the name in several ways:\n\n```app/components/person-profile.js\nimport Component from '@ember/component';\nimport { tracked } from '@glimmer/tracking';\n\nexport default class extends Component {\n @tracked name = 'Jill'\n}\n```\n\n```app/components/person-profile.hbs\n{{this.name}}\n<div>{{this.name}}</div>\n<span data-name={{this.name}}></span>\n```\n\nAny time the \"name\" property on the component changes, the DOM will be\nupdated.\n\nProperties can be chained as well:\n\n```handlebars\n{{@aUserModel.name}}\n<div>{{@listOfUsers.firstObject.name}}</div>\n```\n\n### Using Ember helpers\n\nWhen content is passed in mustaches `{{}}`, Ember will first try to find a helper\nor component with that name. For example, the `if` helper:\n\n```app/components/person-profile.hbs\n{{if this.name \"I have a name\" \"I have no name\"}}\n<span data-has-name={{if this.name true}}></span>\n```\n\nThe returned value is placed where the `{{}}` is called. The above style is\ncalled \"inline\". A second style of helper usage is called \"block\". For example:\n\n```handlebars\n{{#if this.name}}\n I have a name\n{{else}}\n I have no name\n{{/if}}\n```\n\nThe block form of helpers allows you to control how the UI is created based\non the values of properties.\nA third form of helper is called \"nested\". For example here the concat\nhelper will add \" Doe\" to a displayed name if the person has no last name:\n\n```handlebars\n<span data-name={{concat this.firstName (\n if this.lastName (concat \" \" this.lastName) \"Doe\"\n)}}></span>\n```\n\nEmber's built-in helpers are described under the [Ember.Templates.helpers](/ember/release/classes/Ember.Templates.helpers)\nnamespace. Documentation on creating custom helpers can be found under\n[helper](/ember/release/functions/@ember%2Fcomponent%2Fhelper/helper) (or\nunder [Helper](/ember/release/classes/Helper) if a helper requires access to\ndependency injection).\n\n### Invoking a Component\n\nEmber components represent state to the UI of an application. Further\nreading on components can be found under [Component](/ember/release/classes/Component).",
|
|
2642
|
+
"description": "[Glimmer](https://github.com/tildeio/glimmer) is a templating engine used by Ember.js that is compatible with a subset of the [Handlebars](http://handlebarsjs.com/) syntax.\n\nEmber ships with two types of JavaScript classes for components:\n\n1. Glimmer components, imported from `@glimmer/component`, which are the\ndefault component's for Ember Octane (3.15) and more recent editions.\n2. Classic components, imported from `@ember/component`, which were the\ndefault for older editions of Ember (pre 3.15) but are still supported.\n\nBelow is the documentation for Classic components. If you are looking for the\nAPI documentation for Template-only or Glimmer components, it is [available\nhere](/ember/release/modules/@glimmer%2Fcomponent).\n\nNote: Prior to Ember 6.8, by default, components were authored in paired `.hbs` and `.js`\nfiles. This is still supported, but the default authoring format is now `.gjs` or \"template tag\".\nThe documentation for `@ember/component` still refers to the older authoring format. To read about\nthe new authoring format, see the\n[Glimmer Component API documentation](/ember/release/modules/@glimmer%2Fcomponent).\n \n### Showing a property\n\nTemplates manage the flow of an application's UI, and display state (through\nthe DOM) to a user. For example, given a component with the property \"name\",\nthat component's template can use the name in several ways:\n\n```app/components/person-profile.js\nimport Component from '@ember/component';\nimport { tracked } from '@glimmer/tracking';\n\nexport default class extends Component {\n @tracked name = 'Jill'\n}\n```\n\n```app/components/person-profile.hbs\n{{this.name}}\n<div>{{this.name}}</div>\n<span data-name={{this.name}}></span>\n```\n\nAny time the \"name\" property on the component changes, the DOM will be\nupdated.\n\nProperties can be chained as well:\n\n```handlebars\n{{@aUserModel.name}}\n<div>{{@listOfUsers.firstObject.name}}</div>\n```\n\n### Using Ember helpers\n\nWhen content is passed in mustaches `{{}}`, Ember will first try to find a helper\nor component with that name. For example, the `if` helper:\n\n```app/components/person-profile.hbs\n{{if this.name \"I have a name\" \"I have no name\"}}\n<span data-has-name={{if this.name true}}></span>\n```\n\nThe returned value is placed where the `{{}}` is called. The above style is\ncalled \"inline\". A second style of helper usage is called \"block\". For example:\n\n```handlebars\n{{#if this.name}}\n I have a name\n{{else}}\n I have no name\n{{/if}}\n```\n\nThe block form of helpers allows you to control how the UI is created based\non the values of properties.\nA third form of helper is called \"nested\". For example here the concat\nhelper will add \" Doe\" to a displayed name if the person has no last name:\n\n```handlebars\n<span data-name={{concat this.firstName (\n if this.lastName (concat \" \" this.lastName) \"Doe\"\n)}}></span>\n```\n\nEmber's built-in helpers are described under the [Ember.Templates.helpers](/ember/release/classes/Ember.Templates.helpers)\nnamespace. Documentation on creating custom helpers can be found under\n[helper](/ember/release/functions/@ember%2Fcomponent%2Fhelper/helper) (or\nunder [Helper](/ember/release/classes/Helper) if a helper requires access to\ndependency injection).\n\n### Invoking a Component\n\nEmber components represent state to the UI of an application. Further\nreading on components can be found under [Component](/ember/release/classes/Component).",
|
|
2613
2643
|
"itemtype": "main",
|
|
2614
2644
|
"access": "public",
|
|
2615
2645
|
"tagname": ""
|
|
@@ -2712,40 +2742,40 @@
|
|
|
2712
2742
|
"file": "packages/@ember/-internals/glimmer/lib/utils/string.ts",
|
|
2713
2743
|
"line": 70
|
|
2714
2744
|
},
|
|
2715
|
-
"@
|
|
2716
|
-
"name": "@
|
|
2745
|
+
"@ember/renderer": {
|
|
2746
|
+
"name": "@ember/renderer",
|
|
2717
2747
|
"submodules": {},
|
|
2718
2748
|
"elements": {},
|
|
2719
2749
|
"classes": {
|
|
2720
|
-
"@
|
|
2750
|
+
"@ember/renderer": 1,
|
|
2751
|
+
"Renderer": 1,
|
|
2752
|
+
"BucketCache": 1
|
|
2721
2753
|
},
|
|
2722
2754
|
"fors": {
|
|
2723
|
-
"@
|
|
2755
|
+
"@ember/renderer": 1
|
|
2724
2756
|
},
|
|
2725
2757
|
"namespaces": {},
|
|
2726
2758
|
"tag": "module",
|
|
2727
|
-
"file": "packages/@
|
|
2728
|
-
"line":
|
|
2729
|
-
"description": "In order to tell Ember a value might change, we need to mark it as trackable.\nTrackable values are values that:\n\n- Can change over their component’s lifetime and\n- Should cause Ember to rerender if and when they change\n\nWe can do this by marking the field with the `@tracked` decorator.",
|
|
2759
|
+
"file": "packages/@ember/routing/lib/cache.ts",
|
|
2760
|
+
"line": 1,
|
|
2730
2761
|
"access": "public",
|
|
2731
2762
|
"tagname": ""
|
|
2732
2763
|
},
|
|
2733
|
-
"@
|
|
2734
|
-
"name": "@
|
|
2764
|
+
"@glimmer/tracking": {
|
|
2765
|
+
"name": "@glimmer/tracking",
|
|
2735
2766
|
"submodules": {},
|
|
2736
2767
|
"elements": {},
|
|
2737
2768
|
"classes": {
|
|
2738
|
-
"@
|
|
2739
|
-
"Renderer": 1,
|
|
2740
|
-
"BucketCache": 1
|
|
2769
|
+
"@glimmer/tracking": 1
|
|
2741
2770
|
},
|
|
2742
2771
|
"fors": {
|
|
2743
|
-
"@
|
|
2772
|
+
"@glimmer/tracking": 1
|
|
2744
2773
|
},
|
|
2745
2774
|
"namespaces": {},
|
|
2746
2775
|
"tag": "module",
|
|
2747
|
-
"file": "packages/@
|
|
2748
|
-
"line":
|
|
2776
|
+
"file": "packages/@glimmer/tracking/index.ts",
|
|
2777
|
+
"line": 4,
|
|
2778
|
+
"description": "In order to tell Ember a value might change, we need to mark it as trackable.\nTrackable values are values that:\n\n- Can change over their component’s lifetime and\n- Should cause Ember to rerender if and when they change\n\nWe can do this by marking the field with the `@tracked` decorator.",
|
|
2749
2779
|
"access": "public",
|
|
2750
2780
|
"tagname": ""
|
|
2751
2781
|
},
|
|
@@ -2844,7 +2874,7 @@
|
|
|
2844
2874
|
"namespaces": {},
|
|
2845
2875
|
"tag": "module",
|
|
2846
2876
|
"file": "packages/@ember/utils/lib/compare.ts",
|
|
2847
|
-
"line":
|
|
2877
|
+
"line": 48
|
|
2848
2878
|
},
|
|
2849
2879
|
"@ember/application": {
|
|
2850
2880
|
"name": "@ember/application",
|
|
@@ -2890,7 +2920,7 @@
|
|
|
2890
2920
|
"namespaces": {},
|
|
2891
2921
|
"tag": "module",
|
|
2892
2922
|
"file": "packages/@ember/array/index.ts",
|
|
2893
|
-
"line":
|
|
2923
|
+
"line": 1414
|
|
2894
2924
|
},
|
|
2895
2925
|
"@ember/array/proxy": {
|
|
2896
2926
|
"name": "@ember/array/proxy",
|
|
@@ -3355,7 +3385,7 @@
|
|
|
3355
3385
|
"tag": "module",
|
|
3356
3386
|
"file": "packages/@glimmer/component/dist/index.d.ts",
|
|
3357
3387
|
"line": 3,
|
|
3358
|
-
"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();\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.",
|
|
3388
|
+
"description": "A component is a reusable UI element that consists of a 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.\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/emberjs/ember.js/tree/main/packages/%40glimmer/component).\n\nNote: Prior to Ember 6.8, by default, components were authored in paired `.hbs` and `.js`\nfiles. This is still supported, but the default authoring format is now `.gjs` or \"template tag\".\nTo read more about how components were previously authored, see the\n[6.7 version of this API documentation](https://api.emberjs.com/ember/6.7/modules/@glimmer%2Fcomponent).\n \n## Defining a Template-only Component\n\nThe simplest way to create a component is to create a `gjs` file in\n`app/components` with a `<template>` tag wrapper:\n\n```app/components/person-profile.gjs\n<template>\n <h1>{{@person.name}}</h1>\n <img src={{@person.avatar}}>\n <p class='signature'>{{@person.signature}}</p>\n</template>\n```\n\nYou will be able to use `<PersonProfile />` to invoke this component elsewhere\nin your application:\n\n```app/templates/application.gjs\nimport PersonProfile from '../components/person-profile';\n \n<template>\n <PersonProfile @person={{@model.currentUser}} />\n</template>\n```\n\nNote that component names are capitalized here in order to distinguish them\nfrom regular HTML elements.\n\nEmber 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\nIn Ember templates, “invokables” are things you can invoke in a template. These include components,\nhelpers, and modifiers. In the template tag format, these invokables need to be imported before\nthey can be used. This makes it easier to understand where values come from and what they do, as\nwell as unlocks build optimizations.\n\nWhen making use of the `PersonProfile` component as defined before in a different component file,\nit first needs to be imported. This is done using the import statement, just like you would import\nany other JavaScript module -- from your local project or from an external package.\n\nSince they are imported, Components can be placed anywhere in your project on the filesystem, but\nthey are conventionally placed within `app/components` for reusable components and within\n`app/templates` for Route components.\n \nRoute components must be named after the route they are associated with -- and placed in the\n`app/templates` directory. For example, a `Person` route would have a corresponding `Person`\ncomponent defined in `app/templates/person.gjs`. This component would then be rendered whenever\nthe user visits the `/person` route. For more information, see the\n[Routing](https://guides.emberjs.com/release/routing/) section of the guides.\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/components/person-profile.gjs\n<template>\n <h1>{{@person.name}}</h1>\n {{yield}}\n</template>\n```\n\nWe could then invoke it like this:\n\n```gjs\nimport PersonProfile from '../components/person-profile';\n \n<template>\n <PersonProfile @person={{@model.currentUser}}>\n <p>Admin mode</p>\n </PersonProfile>\n</template>\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/components/person-profile.gjs\n<template>\n <h1>{{@person.name}}</h1>\n {{yield @person.signature}}\n</template>\n```\n\nWe can then use this value in the block like so:\n\n```gjs\nimport PersonProfile from '../components/person-profile';\n \n<template>\n <PersonProfile @person={{@model.currentUser}} as |signature|>\n {{signature}}\n </PersonProfile>\n</template>\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/components/person-profile.gjs\n<template>\n <h1>{{yield to=\"title\"}}</h1>\n {{yield}}\n</template>\n```\n\nThis component could then be invoked like so:\n\n```gjs\nimport PersonProfile from '../components/person-profile';\n\n<template>\n <PersonProfile @person={{@model.currentUser}}>\n <:title>{{@model.currentUser.name}}</:title>\n <:default>{{@model.currentUser.signature}}</:default>\n </PersonProfile>\n</template>\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/components/person-profile.gjs\n<template>\n <h1>{{yield @person.name to=\"title\"}}</h1>\n {{yield @person.signature}}\n</template>\n```\n\nThese parameters can then be used like so:\n\n```gjs\nimport PersonProfile from '../components/person-profile';\n\n<template>\n <PersonProfile @person={{@model.currentUser}}>\n <:title as |name|>{{name}}</:title>\n <:default as |signature|>{{signature}}</:default>\n </PersonProfile>\n</template>\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/components/person-profile.gjs\n<template>\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</template>\n```\n\nWith this template, we can then optionally pass in one block, both blocks, or\nnone at all:\n\n```gjs\nimport PersonProfile from '../components/person-profile';\n\n<template>\n {{! passing both blocks }}\n <PersonProfile @person={{@model.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={{@model.currentUser}}>\n <:title as |name|>{{name}}</:title>\n </PersonProfile>\n\n {{! passing just the default block }}\n <PersonProfile @person={{@model.currentUser}} as |signature|>\n {{signature}}\n </PersonProfile>\n\n {{! not passing any blocks }}\n <PersonProfile @person={{@model.currentUser}}/>\n</template>\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/components/person-profile.gjs\n<template>\n {{#if (has-block-params)}}\n {{yield @person.signature}}\n {{else}}\n {{yield}}\n {{/if}}\n</template>\n```\n\n## Customizing Components With JavaScript\n\nTo add JavaScript to a component, add a class extending from `@glimmer/component` to the `gjs`\nfile, wrapping your `<template>` tag.\nFor example, to add JavaScript to the `PersonProfile` component which we defined above:\n\n```app/components/person-profile.gjs\nimport Component from '@glimmer/component';\n\nexport default class PersonProfile 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 <template>\n <h1>{{this.displayName}}</h1>\n {{yield}}\n </template>\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}}`. In the example above, we access the\n`displayName` property of our `PersonProfile` component instance in the\ntemplate.\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```gjs\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```gjs\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 \nYou may prefer the [@ember/destroyable](/ember/release/modules//@ember%2Fdestroyable) APIs for\nthis purpose.\n\n```gjs\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();\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```gjs\n<template>\n <SomeComponent @fadeIn={{true}} />\n</template>\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 to update as any other tracked property:\n\n```gjs\nimport Component from '@glimmer/component';\nimport { computed } from '@ember/object';\n\nexport default class SomeComponent extends Component {\n get standardGetter() {\n // updates whenever args.anotherValue updates\n return this.args.anotherValue;\n }\n}\n```\n \nA components arguments are accessible in the template using the `@` prefix - for example,\n`this.args.fadeIn` from the example above can be accessed in the template as `@fadeIn`.\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.",
|
|
3359
3389
|
"access": "public",
|
|
3360
3390
|
"tagname": ""
|
|
3361
3391
|
},
|
|
@@ -3493,7 +3523,7 @@
|
|
|
3493
3523
|
"module": "ember",
|
|
3494
3524
|
"namespace": "",
|
|
3495
3525
|
"file": "packages/@ember/-internals/glimmer/index.ts",
|
|
3496
|
-
"line":
|
|
3526
|
+
"line": 104,
|
|
3497
3527
|
"access": "public",
|
|
3498
3528
|
"tagname": ""
|
|
3499
3529
|
},
|
|
@@ -3602,6 +3632,17 @@
|
|
|
3602
3632
|
"access": "public",
|
|
3603
3633
|
"tagname": ""
|
|
3604
3634
|
},
|
|
3635
|
+
"@ember/renderer": {
|
|
3636
|
+
"name": "@ember/renderer",
|
|
3637
|
+
"shortname": "@ember/renderer",
|
|
3638
|
+
"classitems": [],
|
|
3639
|
+
"plugins": [],
|
|
3640
|
+
"extensions": [],
|
|
3641
|
+
"plugin_for": [],
|
|
3642
|
+
"extension_for": [],
|
|
3643
|
+
"module": "@ember/renderer",
|
|
3644
|
+
"namespace": ""
|
|
3645
|
+
},
|
|
3605
3646
|
"Component": {
|
|
3606
3647
|
"name": "Component",
|
|
3607
3648
|
"shortname": "Component",
|
|
@@ -3614,7 +3655,7 @@
|
|
|
3614
3655
|
"namespace": "",
|
|
3615
3656
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
3616
3657
|
"line": 209,
|
|
3617
|
-
"description": "A component is a reusable UI element that consists of a `.hbs` template and an\noptional JavaScript class that defines its behavior. For example, someone\nmight make a `button` in the template and handle the click behavior in the\nJavaScript file that shares the same name as the template.\n\nComponents are broken down into two categories:\n\n- Components _without_ JavaScript, that are based only on a template. These\n are called Template-only or TO components.\n- Components _with_ JavaScript, which consist of a template and a backing\n class.\n\nEmber ships with two types of JavaScript classes for components:\n\n1. Glimmer components, imported from `@glimmer/component`, which are the\n default component's for Ember Octane (3.15) and more recent editions.\n2. Classic components, imported from `@ember/component`, which were the\n default for older editions of Ember (pre 3.15).\n\nBelow is the documentation for Classic components. If you are looking for the\nAPI documentation for Template-only or Glimmer components, it is [available\nhere](/ember/release/modules/@glimmer%2Fcomponent).\n\n## Defining a Classic Component\n\nIf you want to customize the component in order to handle events, transform\narguments or maintain internal state, you implement a subclass of `Component`.\n\nOne example is to add computed properties to your component:\n\n```app/components/person-profile.js\nimport Component from '@ember/component';\n\nexport default class extends Component {\n @computed('person.title', 'person.firstName', 'person.lastName')\n get displayName() {\n let { title, firstName, lastName } = this.person;\n\n if (title) {\n return `${title} ${lastName}`;\n } else {\n return `${firstName} ${lastName}`;\n }\n }\n}\n```\n\nAnd then use it in the component's template:\n\n```app/templates/components/person-profile.hbs\n<h1>{{this.displayName}}</h1>\n{{yield}}\n```\n\n## Customizing a Classic Component's HTML Element in JavaScript\n\n### HTML Tag\n\nThe default HTML tag name used for a component's HTML representation is `div`.\nThis can be customized by setting the `tagName` property.\n\nConsider the following component class:\n\n```app/components/emphasized-paragraph.js\nimport Component from '@ember/component';\n\nexport default class extends Component {\n tagName = 'em';\n}\n```\n\nWhen invoked, this component would produce output that looks something like\nthis:\n\n```html\n<em id=\"ember1\" class=\"ember-view\"></em>\n```\n\n### HTML `class` Attribute\n\nThe HTML `class` attribute of a component's tag can be set by providing a\n`classNames` property that is set to an array of strings:\n\n```app/components/my-widget.js\nimport Component from '@ember/component';\n\nexport default class extends Component {\n classNames = ['my-class', 'my-other-class'];\n}\n```\n\nInvoking this component will produce output that looks like this:\n\n```html\n<div id=\"ember1\" class=\"ember-view my-class my-other-class\"></div>\n```\n\n`class` attribute values can also be set by providing a `classNameBindings`\nproperty set to an array of properties names for the component. The return\nvalue of these properties will be added as part of the value for the\ncomponents's `class` attribute. These properties can be computed properties:\n\n```app/components/my-widget.js\nimport Component from '@ember/component';\nimport { computed } from '@ember/object';\n\nexport default class extends Component {\n classNames = ['my-class', 'my-other-class'];\n classNameBindings = ['propertyA', 'propertyB'];\n\n propertyA = 'from-a';\n\n get propertyB {\n if (someLogic) { return 'from-b'; }\n }\n}\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n<div id=\"ember1\" class=\"ember-view my-class my-other-class from-a from-b\"></div>\n```\n\nNote that `classNames` and `classNameBindings` is in addition to the `class`\nattribute passed with the angle bracket invocation syntax. Therefore, if this\ncomponent was invoked like so:\n\n```handlebars\n<MyWidget class=\"from-invocation\" />\n```\n\nThe resulting HTML will look similar to this:\n\n```html\n<div id=\"ember1\" class=\"from-invocation ember-view my-class my-other-class from-a from-b\"></div>\n```\n\nIf the value of a class name binding returns a boolean the property name\nitself will be used as the class name if the property is true. The class name\nwill not be added if the value is `false` or `undefined`.\n\n```app/components/my-widget.js\nimport Component from '@ember/component';\n\nexport default class extends Component {\n classNameBindings = ['hovered'];\n\n hovered = true;\n}\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n<div id=\"ember1\" class=\"ember-view hovered\"></div>\n```\n\n### Custom Class Names for Boolean Values\n\nWhen using boolean class name bindings you can supply a string value other\nthan the property name for use as the `class` HTML attribute by appending the\npreferred value after a \":\" character when defining the binding:\n\n```app/components/my-widget.js\nimport Component from '@ember/component';\n\nexport default class extends Component {\n classNameBindings = ['awesome:so-very-cool'];\n\n awesome = true;\n}\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n<div id=\"ember1\" class=\"ember-view so-very-cool\"></div>\n```\n\nBoolean value class name bindings whose property names are in a\ncamelCase-style format will be converted to a dasherized format:\n\n```app/components/my-widget.js\nimport Component from '@ember/component';\n\nexport default class extends Component {\n classNameBindings = ['isUrgent'];\n\n isUrgent = true;\n}\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n<div id=\"ember1\" class=\"ember-view is-urgent\"></div>\n```\n\nClass name bindings can also refer to object values that are found by\ntraversing a path relative to the component itself:\n\n```app/components/my-widget.js\nimport Component from '@ember/component';\nimport EmberObject from '@ember/object';\n\nexport default class extends Component {\n classNameBindings = ['messages.empty'];\n\n messages = EmberObject.create({\n empty: true\n });\n}\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n<div id=\"ember1\" class=\"ember-view empty\"></div>\n```\n\nIf you want to add a class name for a property which evaluates to true and and\na different class name if it evaluates to false, you can pass a binding like\nthis:\n\n```app/components/my-widget.js\nimport Component from '@ember/component';\n\nexport default class extends Component {\n classNameBindings = ['isEnabled:enabled:disabled'];\n\n isEnabled = true;\n}\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n<div id=\"ember1\" class=\"ember-view enabled\"></div>\n```\n\nWhen isEnabled is `false`, the resulting HTML representation looks like this:\n\n```html\n<div id=\"ember1\" class=\"ember-view disabled\"></div>\n```\n\nThis syntax offers the convenience to add a class if a property is `false`:\n\n```app/components/my-widget.js\nimport Component from '@ember/component';\n\n// Applies no class when isEnabled is true and class 'disabled' when isEnabled is false\nexport default class extends Component {\n classNameBindings = ['isEnabled::disabled'];\n\n isEnabled = true;\n}\n```\n\nInvoking this component when the `isEnabled` property is true will produce\nHTML that looks like:\n\n```html\n<div id=\"ember1\" class=\"ember-view\"></div>\n```\n\nInvoking it when the `isEnabled` property on the component is `false` will\nproduce HTML that looks like:\n\n```html\n<div id=\"ember1\" class=\"ember-view disabled\"></div>\n```\n\nUpdates to the value of a class name binding will result in automatic update\nof the HTML `class` attribute in the component's rendered HTML\nrepresentation. If the value becomes `false` or `undefined` the class name\nwill be removed.\n\nBoth `classNames` and `classNameBindings` are concatenated properties. See\n[EmberObject](/ember/release/classes/EmberObject) documentation for more\ninformation about concatenated properties.\n\n### Other HTML Attributes\n\nThe HTML attribute section of a component's tag can be set by providing an\n`attributeBindings` property set to an array of property names on the\ncomponent. The return value of these properties will be used as the value of\nthe component's HTML associated attribute:\n\n```app/components/my-anchor.js\nimport Component from '@ember/component';\n\nexport default class extends Component {\n tagName = 'a';\n attributeBindings = ['href'];\n\n href = 'http://google.com';\n};\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n<a id=\"ember1\" class=\"ember-view\" href=\"http://google.com\"></a>\n```\n\nOne property can be mapped on to another by placing a \":\" between the source\nproperty and the destination property:\n\n```app/components/my-anchor.js\nimport Component from '@ember/component';\n\nexport default class extends Component {\n tagName = 'a';\n attributeBindings = ['url:href'];\n\n url = 'http://google.com';\n};\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n<a id=\"ember1\" class=\"ember-view\" href=\"http://google.com\"></a>\n```\n\nHTML attributes passed with angle bracket invocations will take precedence\nover those specified in `attributeBindings`. Therefore, if this component was\ninvoked like so:\n\n```handlebars\n<MyAnchor href=\"http://bing.com\" @url=\"http://google.com\" />\n```\n\nThe resulting HTML will looks like this:\n\n```html\n<a id=\"ember1\" class=\"ember-view\" href=\"http://bing.com\"></a>\n```\n\nNote that the `href` attribute is ultimately set to `http://bing.com`, despite\nit having attribute binidng to the `url` property, which was set to\n`http://google.com`.\n\nNamespaced attributes (e.g. `xlink:href`) are supported, but have to be\nmapped, since `:` is not a valid character for properties in Javascript:\n\n```app/components/my-use.js\nimport Component from '@ember/component';\n\nexport default class extends Component {\n tagName = 'use';\n attributeBindings = ['xlinkHref:xlink:href'];\n\n xlinkHref = '#triangle';\n};\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n<use xlink:href=\"#triangle\"></use>\n```\n\nIf the value of a property monitored by `attributeBindings` is a boolean, the\nattribute will be present or absent depending on the value:\n\n```app/components/my-text-input.js\nimport Component from '@ember/component';\n\nexport default class extends Component {\n tagName = 'input';\n attributeBindings = ['disabled'];\n\n disabled = false;\n};\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n<input id=\"ember1\" class=\"ember-view\" />\n```\n\n`attributeBindings` can refer to computed properties:\n\n```app/components/my-text-input.js\nimport Component from '@ember/component';\nimport { computed } from '@ember/object';\n\nexport default class extends Component {\n tagName = 'input';\n attributeBindings = ['disabled'];\n\n get disabled() {\n if (someLogic) {\n return true;\n } else {\n return false;\n }\n }\n};\n```\n\nTo prevent setting an attribute altogether, use `null` or `undefined` as the\nvalue of the property used in `attributeBindings`:\n\n```app/components/my-text-input.js\nimport Component from '@ember/component';\n\nexport default class extends Component {\n tagName = 'form';\n attributeBindings = ['novalidate'];\n novalidate = null;\n};\n```\n\nUpdates to the property of an attribute binding will result in automatic\nupdate of the HTML attribute in the component's HTML output.\n\n`attributeBindings` is a concatenated property. See\n[EmberObject](/ember/release/classes/EmberObject) documentation for more\ninformation about concatenated properties.\n\n## Layouts\n\nThe `layout` property can be used to dynamically specify a template associated\nwith a component class, instead of relying on Ember to link together a\ncomponent class and a template based on file names.\n\nIn general, applications should not use this feature, but it's commonly used\nin addons for historical reasons.\n\nThe `layout` property should be set to the default export of a template\nmodule, which is the name of a template file without the `.hbs` extension.\n\n```app/templates/components/person-profile.hbs\n<h1>Person's Title</h1>\n<div class='details'>{{yield}}</div>\n```\n\n```app/components/person-profile.js\n import Component from '@ember/component';\n import layout from '../templates/components/person-profile';\n\n export default class extends Component {\n layout = layout;\n }\n```\n\nIf you invoke the component:\n\n```handlebars\n<PersonProfile>\n <h2>Chief Basket Weaver</h2>\n <h3>Fisherman Industries</h3>\n</PersonProfile>\n```\n\nor\n\n```handlebars\n{{#person-profile}}\n <h2>Chief Basket Weaver</h2>\n <h3>Fisherman Industries</h3>\n{{/person-profile}}\n```\n\nIt will result in the following HTML output:\n\n```html\n<h1>Person's Title</h1>\n <div class=\"details\">\n <h2>Chief Basket Weaver</h2>\n <h3>Fisherman Industries</h3>\n</div>\n```\n\n## Handling Browser Events\n\nThere are two ways to handle user-initiated events:\n\n### Using the `on` modifier to capture browser events\n\nIn a component's template, you can attach an event handler to any element with the `on` modifier:\n\n```handlebars\n<button {{on 'click' this.doSomething}} />\n```\n\nThis will call the function on your component:\n\n```js\nimport Component from '@ember/component';\n\nexport default class ExampleComponent extends Component {\n doSomething = (event) => {\n // `event` is the native click Event\n console.log('clicked on the button');\n };\n}\n```\n\nSee the [Guide on Component event\nhandlers](https://guides.emberjs.com/release/components/component-state-and-actions/#toc_html-modifiers-and-actions)\nand the [API docs for `on`](../Ember.Templates.helpers/methods/on?anchor=on)\nfor more details.\n\n### Event Handler Methods\n\nComponents can also respond to user-initiated events by implementing a method\nthat matches the event name. This approach is appropriate when the same event\nshould be handled by all instances of the same component.\n\nAn event object will be passed as the argument to the event handler method.\n\n```app/components/my-widget.js\nimport Component from '@ember/component';\n\nexport default class extends Component {\n click(event) {\n // `event.target` is either the component's element or one of its children\n let tag = event.target.tagName.toLowerCase();\n console.log('clicked on a `<${tag}>` HTML element!');\n }\n}\n```\n\nIn this example, whenever the user clicked anywhere inside the component, it\nwill log a message to the console.\n\nIt is possible to handle event types other than `click` by implementing the\nfollowing event handler methods. In addition, custom events can be registered\nby using `Application.customEvents`.\n\nTouch events:\n\n* `touchStart`\n* `touchMove`\n* `touchEnd`\n* `touchCancel`\n\nKeyboard events:\n\n* `keyDown`\n* `keyUp`\n* `keyPress`\n\nMouse events:\n\n* `mouseDown`\n* `mouseUp`\n* `contextMenu`\n* `click`\n* `doubleClick`\n* `focusIn`\n* `focusOut`\n\nForm events:\n\n* `submit`\n* `change`\n* `focusIn`\n* `focusOut`\n* `input`\n\nDrag and drop events:\n\n* `dragStart`\n* `drag`\n* `dragEnter`\n* `dragLeave`\n* `dragOver`\n* `dragEnd`\n* `drop`",
|
|
3658
|
+
"description": "A component is a reusable UI element that consists of a `.hbs` template and an\noptional JavaScript class that defines its behavior. For example, someone\nmight make a `button` in the template and handle the click behavior in the\nJavaScript file that shares the same name as the template.\n\nComponents are broken down into two categories:\n\n- Components _without_ JavaScript, that are based only on a template. These\n are called Template-only or TO components.\n- Components _with_ JavaScript, which consist of a template and a backing\n class.\n\nEmber ships with two types of JavaScript classes for components:\n\n1. Glimmer components, imported from `@glimmer/component`, which are the\n default component's for Ember Octane (3.15) and more recent editions.\n2. Classic components, imported from `@ember/component`, which were the\n default for older editions of Ember (pre 3.15).\n\nBelow is the documentation for Classic components. If you are looking for the\nAPI documentation for Template-only or Glimmer components, it is [available\nhere](/ember/release/modules/@glimmer%2Fcomponent).\n\nNote: Prior to Ember 6.8, by default, components were authored in paired `.hbs` and `.js`\nfiles. This is still supported, but the default authoring format is now `.gjs` or \"template tag\".\nThe documentation for `@ember/component` still refers to the older authoring format. To read about\nthe new authoring format, see the \n[Glimmer Component API documentation](/ember/release/modules/@glimmer%2Fcomponent).\n \n## Defining a Classic Component\n\nIf you want to customize the component in order to handle events, transform\narguments or maintain internal state, you implement a subclass of `Component`.\n\nOne example is to add computed properties to your component:\n\n```app/components/person-profile.js\nimport Component from '@ember/component';\n\nexport default class extends Component {\n @computed('person.title', 'person.firstName', 'person.lastName')\n get displayName() {\n let { title, firstName, lastName } = this.person;\n\n if (title) {\n return `${title} ${lastName}`;\n } else {\n return `${firstName} ${lastName}`;\n }\n }\n}\n```\n\nAnd then use it in the component's template:\n\n```app/components/person-profile.hbs\n<h1>{{this.displayName}}</h1>\n{{yield}}\n```\n\n## Customizing a Classic Component's HTML Element in JavaScript\n\n### HTML Tag\n\nThe default HTML tag name used for a component's HTML representation is `div`.\nThis can be customized by setting the `tagName` property.\n\nConsider the following component class:\n\n```app/components/emphasized-paragraph.js\nimport Component from '@ember/component';\n\nexport default class extends Component {\n tagName = 'em';\n}\n```\n\nWhen invoked, this component would produce output that looks something like\nthis:\n\n```html\n<em id=\"ember1\" class=\"ember-view\"></em>\n```\n\n### HTML `class` Attribute\n\nThe HTML `class` attribute of a component's tag can be set by providing a\n`classNames` property that is set to an array of strings:\n\n```app/components/my-widget.js\nimport Component from '@ember/component';\n\nexport default class extends Component {\n classNames = ['my-class', 'my-other-class'];\n}\n```\n\nInvoking this component will produce output that looks like this:\n\n```html\n<div id=\"ember1\" class=\"ember-view my-class my-other-class\"></div>\n```\n\n`class` attribute values can also be set by providing a `classNameBindings`\nproperty set to an array of properties names for the component. The return\nvalue of these properties will be added as part of the value for the\ncomponents's `class` attribute. These properties can be computed properties:\n\n```app/components/my-widget.js\nimport Component from '@ember/component';\nimport { computed } from '@ember/object';\n\nexport default class extends Component {\n classNames = ['my-class', 'my-other-class'];\n classNameBindings = ['propertyA', 'propertyB'];\n\n propertyA = 'from-a';\n\n get propertyB {\n if (someLogic) { return 'from-b'; }\n }\n}\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n<div id=\"ember1\" class=\"ember-view my-class my-other-class from-a from-b\"></div>\n```\n\nNote that `classNames` and `classNameBindings` is in addition to the `class`\nattribute passed with the angle bracket invocation syntax. Therefore, if this\ncomponent was invoked like so:\n\n```handlebars\n<MyWidget class=\"from-invocation\" />\n```\n\nThe resulting HTML will look similar to this:\n\n```html\n<div id=\"ember1\" class=\"from-invocation ember-view my-class my-other-class from-a from-b\"></div>\n```\n\nIf the value of a class name binding returns a boolean the property name\nitself will be used as the class name if the property is true. The class name\nwill not be added if the value is `false` or `undefined`.\n\n```app/components/my-widget.js\nimport Component from '@ember/component';\n\nexport default class extends Component {\n classNameBindings = ['hovered'];\n\n hovered = true;\n}\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n<div id=\"ember1\" class=\"ember-view hovered\"></div>\n```\n\n### Custom Class Names for Boolean Values\n\nWhen using boolean class name bindings you can supply a string value other\nthan the property name for use as the `class` HTML attribute by appending the\npreferred value after a \":\" character when defining the binding:\n\n```app/components/my-widget.js\nimport Component from '@ember/component';\n\nexport default class extends Component {\n classNameBindings = ['awesome:so-very-cool'];\n\n awesome = true;\n}\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n<div id=\"ember1\" class=\"ember-view so-very-cool\"></div>\n```\n\nBoolean value class name bindings whose property names are in a\ncamelCase-style format will be converted to a dasherized format:\n\n```app/components/my-widget.js\nimport Component from '@ember/component';\n\nexport default class extends Component {\n classNameBindings = ['isUrgent'];\n\n isUrgent = true;\n}\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n<div id=\"ember1\" class=\"ember-view is-urgent\"></div>\n```\n\nClass name bindings can also refer to object values that are found by\ntraversing a path relative to the component itself:\n\n```app/components/my-widget.js\nimport Component from '@ember/component';\nimport EmberObject from '@ember/object';\n\nexport default class extends Component {\n classNameBindings = ['messages.empty'];\n\n messages = EmberObject.create({\n empty: true\n });\n}\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n<div id=\"ember1\" class=\"ember-view empty\"></div>\n```\n\nIf you want to add a class name for a property which evaluates to true and and\na different class name if it evaluates to false, you can pass a binding like\nthis:\n\n```app/components/my-widget.js\nimport Component from '@ember/component';\n\nexport default class extends Component {\n classNameBindings = ['isEnabled:enabled:disabled'];\n\n isEnabled = true;\n}\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n<div id=\"ember1\" class=\"ember-view enabled\"></div>\n```\n\nWhen isEnabled is `false`, the resulting HTML representation looks like this:\n\n```html\n<div id=\"ember1\" class=\"ember-view disabled\"></div>\n```\n\nThis syntax offers the convenience to add a class if a property is `false`:\n\n```app/components/my-widget.js\nimport Component from '@ember/component';\n\n// Applies no class when isEnabled is true and class 'disabled' when isEnabled is false\nexport default class extends Component {\n classNameBindings = ['isEnabled::disabled'];\n\n isEnabled = true;\n}\n```\n\nInvoking this component when the `isEnabled` property is true will produce\nHTML that looks like:\n\n```html\n<div id=\"ember1\" class=\"ember-view\"></div>\n```\n\nInvoking it when the `isEnabled` property on the component is `false` will\nproduce HTML that looks like:\n\n```html\n<div id=\"ember1\" class=\"ember-view disabled\"></div>\n```\n\nUpdates to the value of a class name binding will result in automatic update\nof the HTML `class` attribute in the component's rendered HTML\nrepresentation. If the value becomes `false` or `undefined` the class name\nwill be removed.\n\nBoth `classNames` and `classNameBindings` are concatenated properties. See\n[EmberObject](/ember/release/classes/EmberObject) documentation for more\ninformation about concatenated properties.\n\n### Other HTML Attributes\n\nThe HTML attribute section of a component's tag can be set by providing an\n`attributeBindings` property set to an array of property names on the\ncomponent. The return value of these properties will be used as the value of\nthe component's HTML associated attribute:\n\n```app/components/my-anchor.js\nimport Component from '@ember/component';\n\nexport default class extends Component {\n tagName = 'a';\n attributeBindings = ['href'];\n\n href = 'http://google.com';\n};\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n<a id=\"ember1\" class=\"ember-view\" href=\"http://google.com\"></a>\n```\n\nOne property can be mapped on to another by placing a \":\" between the source\nproperty and the destination property:\n\n```app/components/my-anchor.js\nimport Component from '@ember/component';\n\nexport default class extends Component {\n tagName = 'a';\n attributeBindings = ['url:href'];\n\n url = 'http://google.com';\n};\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n<a id=\"ember1\" class=\"ember-view\" href=\"http://google.com\"></a>\n```\n\nHTML attributes passed with angle bracket invocations will take precedence\nover those specified in `attributeBindings`. Therefore, if this component was\ninvoked like so:\n\n```handlebars\n<MyAnchor href=\"http://bing.com\" @url=\"http://google.com\" />\n```\n\nThe resulting HTML will looks like this:\n\n```html\n<a id=\"ember1\" class=\"ember-view\" href=\"http://bing.com\"></a>\n```\n\nNote that the `href` attribute is ultimately set to `http://bing.com`, despite\nit having attribute binidng to the `url` property, which was set to\n`http://google.com`.\n\nNamespaced attributes (e.g. `xlink:href`) are supported, but have to be\nmapped, since `:` is not a valid character for properties in Javascript:\n\n```app/components/my-use.js\nimport Component from '@ember/component';\n\nexport default class extends Component {\n tagName = 'use';\n attributeBindings = ['xlinkHref:xlink:href'];\n\n xlinkHref = '#triangle';\n};\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n<use xlink:href=\"#triangle\"></use>\n```\n\nIf the value of a property monitored by `attributeBindings` is a boolean, the\nattribute will be present or absent depending on the value:\n\n```app/components/my-text-input.js\nimport Component from '@ember/component';\n\nexport default class extends Component {\n tagName = 'input';\n attributeBindings = ['disabled'];\n\n disabled = false;\n};\n```\n\nInvoking this component will produce HTML that looks like:\n\n```html\n<input id=\"ember1\" class=\"ember-view\" />\n```\n\n`attributeBindings` can refer to computed properties:\n\n```app/components/my-text-input.js\nimport Component from '@ember/component';\nimport { computed } from '@ember/object';\n\nexport default class extends Component {\n tagName = 'input';\n attributeBindings = ['disabled'];\n\n get disabled() {\n if (someLogic) {\n return true;\n } else {\n return false;\n }\n }\n};\n```\n\nTo prevent setting an attribute altogether, use `null` or `undefined` as the\nvalue of the property used in `attributeBindings`:\n\n```app/components/my-text-input.js\nimport Component from '@ember/component';\n\nexport default class extends Component {\n tagName = 'form';\n attributeBindings = ['novalidate'];\n novalidate = null;\n};\n```\n\nUpdates to the property of an attribute binding will result in automatic\nupdate of the HTML attribute in the component's HTML output.\n\n`attributeBindings` is a concatenated property. See\n[EmberObject](/ember/release/classes/EmberObject) documentation for more\ninformation about concatenated properties.\n\n## Layouts\n\nThe `layout` property can be used to dynamically specify a template associated\nwith a component class, instead of relying on Ember to link together a\ncomponent class and a template based on file names.\n\nIn general, applications should not use this feature, but it's commonly used\nin addons for historical reasons.\n\nThe `layout` property should be set to the default export of a template\nmodule, which is the name of a template file without the `.hbs` extension.\n\n```app/components/person-profile.hbs\n<h1>Person's Title</h1>\n<div class='details'>{{yield}}</div>\n```\n\n```app/components/person-profile.js\n import Component from '@ember/component';\n import layout from '../templates/components/person-profile';\n\n export default class extends Component {\n layout = layout;\n }\n```\n\nIf you invoke the component:\n\n```handlebars\n<PersonProfile>\n <h2>Chief Basket Weaver</h2>\n <h3>Fisherman Industries</h3>\n</PersonProfile>\n```\n\nor\n\n```handlebars\n{{#person-profile}}\n <h2>Chief Basket Weaver</h2>\n <h3>Fisherman Industries</h3>\n{{/person-profile}}\n```\n\nIt will result in the following HTML output:\n\n```html\n<h1>Person's Title</h1>\n <div class=\"details\">\n <h2>Chief Basket Weaver</h2>\n <h3>Fisherman Industries</h3>\n</div>\n```\n\n## Handling Browser Events\n\nThere are two ways to handle user-initiated events:\n\n### Using the `on` modifier to capture browser events\n\nIn a component's template, you can attach an event handler to any element with the `on` modifier:\n\n```handlebars\n<button {{on 'click' this.doSomething}} />\n```\n\nThis will call the function on your component:\n\n```js\nimport Component from '@ember/component';\n\nexport default class ExampleComponent extends Component {\n doSomething = (event) => {\n // `event` is the native click Event\n console.log('clicked on the button');\n };\n}\n```\n\nSee the [Guide on Component event\nhandlers](https://guides.emberjs.com/release/components/component-state-and-actions/#toc_html-modifiers-and-actions)\nand the [API docs for `on`](../Ember.Templates.helpers/methods/on?anchor=on)\nfor more details.\n\n### Event Handler Methods\n\nComponents can also respond to user-initiated events by implementing a method\nthat matches the event name. This approach is appropriate when the same event\nshould be handled by all instances of the same component.\n\nAn event object will be passed as the argument to the event handler method.\n\n```app/components/my-widget.js\nimport Component from '@ember/component';\n\nexport default class extends Component {\n click(event) {\n // `event.target` is either the component's element or one of its children\n let tag = event.target.tagName.toLowerCase();\n console.log('clicked on a `<${tag}>` HTML element!');\n }\n}\n```\n\nIn this example, whenever the user clicked anywhere inside the component, it\nwill log a message to the console.\n\nIt is possible to handle event types other than `click` by implementing the\nfollowing event handler methods. In addition, custom events can be registered\nby using `Application.customEvents`.\n\nTouch events:\n\n* `touchStart`\n* `touchMove`\n* `touchEnd`\n* `touchCancel`\n\nKeyboard events:\n\n* `keyDown`\n* `keyUp`\n* `keyPress`\n\nMouse events:\n\n* `mouseDown`\n* `mouseUp`\n* `contextMenu`\n* `click`\n* `doubleClick`\n* `focusIn`\n* `focusOut`\n\nForm events:\n\n* `submit`\n* `change`\n* `focusIn`\n* `focusOut`\n* `input`\n\nDrag and drop events:\n\n* `dragStart`\n* `drag`\n* `dragEnter`\n* `dragLeave`\n* `dragOver`\n* `dragEnd`\n* `drop`",
|
|
3618
3659
|
"extends": "Ember.CoreView",
|
|
3619
3660
|
"uses": [
|
|
3620
3661
|
"Ember.TargetActionSupport",
|
|
@@ -3646,7 +3687,7 @@
|
|
|
3646
3687
|
"namespace": "",
|
|
3647
3688
|
"file": "packages/@ember/-internals/glimmer/lib/helper.ts",
|
|
3648
3689
|
"line": 57,
|
|
3649
|
-
"description": "Ember Helpers are functions that can compute values, and are used in templates.\nFor example, this code calls a helper named `format-currency`:\n\n```app/templates/application.
|
|
3690
|
+
"description": "Ember Helpers are functions that can compute values, and are used in templates.\nFor example, this code calls a helper named `format-currency`:\n\n```app/templates/application.gjs\nimport Cost from '../components/cost';\n\n<template>\n <Cost @cents={{230}} />\n</template>\n```\n\n```app/components/cost.gjs\nimport formatCurrency from '../helpers/format-currency';\n\n<template>\n <div>{{formatCurrency @cents currency=\"$\"}}</div>\n</template>\n```\n\nAdditionally a helper can be called as a nested helper.\nIn this example, we show the formatted currency value if the `showMoney`\nnamed argument is truthy.\n\n```gjs\nimport formatCurrency from '../helpers/format-currency';\n\n<template>\n {{if @showMoney (formatCurrency @cents currency=\"$\")}}\n</template>\n```\n\nHelpers defined using a class must provide a `compute` function. For example:\n\n```app/helpers/format-currency.js\nimport Helper from '@ember/component/helper';\n\nexport default class extends Helper {\n compute([cents], { currency }) {\n return `${currency}${cents * 0.01}`;\n }\n}\n```\n\nEach time the input to a helper changes, the `compute` function will be\ncalled again.\n\nAs instances, these helpers also have access to the container and will accept\ninjected dependencies.\n\nAdditionally, class helpers can call `recompute` to force a new computation.",
|
|
3650
3691
|
"extends": "CoreObject",
|
|
3651
3692
|
"access": "public",
|
|
3652
3693
|
"tagname": "",
|
|
@@ -3663,17 +3704,6 @@
|
|
|
3663
3704
|
"module": "@ember/component",
|
|
3664
3705
|
"namespace": ""
|
|
3665
3706
|
},
|
|
3666
|
-
"@ember/renderer": {
|
|
3667
|
-
"name": "@ember/renderer",
|
|
3668
|
-
"shortname": "@ember/renderer",
|
|
3669
|
-
"classitems": [],
|
|
3670
|
-
"plugins": [],
|
|
3671
|
-
"extensions": [],
|
|
3672
|
-
"plugin_for": [],
|
|
3673
|
-
"extension_for": [],
|
|
3674
|
-
"module": "@ember/renderer",
|
|
3675
|
-
"namespace": ""
|
|
3676
|
-
},
|
|
3677
3707
|
"Ember": {
|
|
3678
3708
|
"name": "Ember",
|
|
3679
3709
|
"shortname": "Ember",
|
|
@@ -4088,7 +4118,7 @@
|
|
|
4088
4118
|
"module": "ember",
|
|
4089
4119
|
"namespace": "Ember",
|
|
4090
4120
|
"file": "packages/@ember/-internals/runtime/lib/mixins/comparable.ts",
|
|
4091
|
-
"line":
|
|
4121
|
+
"line": 8,
|
|
4092
4122
|
"description": "Implements some standard methods for comparing objects. Add this mixin to\nany class you create that can compare its instances.\n\nYou should implement the `compare()` method.",
|
|
4093
4123
|
"since": "Ember 0.9",
|
|
4094
4124
|
"access": "private",
|
|
@@ -4147,7 +4177,7 @@
|
|
|
4147
4177
|
"namespace": "Ember",
|
|
4148
4178
|
"file": "packages/@ember/-internals/runtime/lib/mixins/target_action_support.ts",
|
|
4149
4179
|
"line": 12,
|
|
4150
|
-
"description": "`TargetActionSupport` is a mixin that can be included in a class\nto add a `triggerAction` method with semantics similar to the
|
|
4180
|
+
"description": "`TargetActionSupport` is a mixin that can be included in a class\nto add a `triggerAction` method with semantics similar to the\n`{{action}}` helper. In normal Ember usage, the `{{action}}` helper is\nusually the best choice. This mixin is most often useful when you are\ndoing more complex event handling in Components.",
|
|
4151
4181
|
"extends": "Mixin",
|
|
4152
4182
|
"access": "private",
|
|
4153
4183
|
"tagname": ""
|
|
@@ -4327,7 +4357,7 @@
|
|
|
4327
4357
|
"module": "@ember/array",
|
|
4328
4358
|
"namespace": "",
|
|
4329
4359
|
"file": "packages/@ember/array/index.ts",
|
|
4330
|
-
"line":
|
|
4360
|
+
"line": 156,
|
|
4331
4361
|
"description": "This mixin implements Observer-friendly Array-like behavior. It is not a\nconcrete implementation, but it can be used up by other classes that want\nto appear like arrays.\n\nFor example, ArrayProxy is a concrete class that can be instantiated to\nimplement array-like behavior. This class uses the Array Mixin by way of\nthe MutableArray mixin, which allows observable changes to be made to the\nunderlying array.\n\nThis mixin defines methods specifically for collections that provide\nindex-ordered access to their contents. When you are designing code that\nneeds to accept any kind of Array-like object, you should use these methods\ninstead of Array primitives because these will properly notify observers of\nchanges to the array.\n\nAlthough these methods are efficient, they do add a layer of indirection to\nyour application so it is a good idea to use them only when you need the\nflexibility of using both true JavaScript arrays and \"virtual\" arrays such\nas controllers and collections.\n\nYou can use the methods defined in this module to access and modify array\ncontents in an observable-friendly way. You can also be notified whenever\nthe membership of an array changes by using `.observes('myArray.[]')`.\n\nTo support `EmberArray` in your own class, you must override two\nprimitives to use it: `length()` and `objectAt()`.",
|
|
4332
4362
|
"uses": [
|
|
4333
4363
|
"Enumerable"
|
|
@@ -4350,7 +4380,7 @@
|
|
|
4350
4380
|
"module": "@ember/array",
|
|
4351
4381
|
"namespace": "",
|
|
4352
4382
|
"file": "packages/@ember/array/index.ts",
|
|
4353
|
-
"line":
|
|
4383
|
+
"line": 1414,
|
|
4354
4384
|
"description": "This mixin defines the API for modifying array-like objects. These methods\ncan be applied only to a collection that keeps its items in an ordered set.\nIt builds upon the Array mixin and adds methods to modify the array.\nOne concrete implementations of this class include ArrayProxy.\n\nIt is important to use the methods in this class to modify arrays so that\nchanges are observable. This allows the binding system in Ember to function\ncorrectly.\n\n\nNote that an Array can change even if it does not implement this mixin.\nFor example, one might implement a SparseArray that cannot be directly\nmodified, but if its underlying enumerable changes, it will change also.",
|
|
4355
4385
|
"uses": [
|
|
4356
4386
|
"EmberArray",
|
|
@@ -4370,7 +4400,7 @@
|
|
|
4370
4400
|
"module": "ember",
|
|
4371
4401
|
"namespace": "",
|
|
4372
4402
|
"file": "packages/@ember/array/index.ts",
|
|
4373
|
-
"line":
|
|
4403
|
+
"line": 2015,
|
|
4374
4404
|
"description": "The NativeArray mixin contains the properties needed to make the native\nArray support MutableArray and all of its dependent APIs.",
|
|
4375
4405
|
"uses": [
|
|
4376
4406
|
"MutableArray",
|
|
@@ -4995,7 +5025,7 @@
|
|
|
4995
5025
|
"namespace": "",
|
|
4996
5026
|
"file": "packages/@ember/routing/router-service.ts",
|
|
4997
5027
|
"line": 28,
|
|
4998
|
-
"description": "The Router service is the public API that provides access to the router.\n\nThe immediate benefit of the Router service is that you can inject it into components,\ngiving them a friendly way to initiate transitions and ask questions about the current\nglobal router state.\n\nIn this example, the Router service is injected into a component to initiate a transition\nto a dedicated route:\n\n```app/components/example.
|
|
5028
|
+
"description": "The Router service is the public API that provides access to the router.\n\nThe immediate benefit of the Router service is that you can inject it into components,\ngiving them a friendly way to initiate transitions and ask questions about the current\nglobal router state.\n\nIn this example, the Router service is injected into a component to initiate a transition\nto a dedicated route:\n\n```app/components/example.gjs\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { service } from '@ember/service';\n\nexport default class ExampleComponent extends Component {\n @service router;\n\n @action\n next() {\n this.router.transitionTo('other.route');\n }\n}\n```\n\nLike any service, it can also be injected into helpers, routes, etc.",
|
|
4999
5029
|
"access": "public",
|
|
5000
5030
|
"tagname": "",
|
|
5001
5031
|
"extends": "Service"
|
|
@@ -6448,6 +6478,13 @@
|
|
|
6448
6478
|
"class": "EmberENV",
|
|
6449
6479
|
"module": "rsvp"
|
|
6450
6480
|
},
|
|
6481
|
+
{
|
|
6482
|
+
"file": "packages/@ember/-internals/glimmer/lib/component-managers/curly-brand.ts",
|
|
6483
|
+
"line": 1,
|
|
6484
|
+
"description": "The brand for the curly component manager lives in its own module so that\ncode which only needs to *detect* the curly manager (e.g. the resolver)\ndoes not have to import the manager itself (and with it the classic\ncomponent machinery).",
|
|
6485
|
+
"class": "Ember.Templates.helpers",
|
|
6486
|
+
"module": "rsvp"
|
|
6487
|
+
},
|
|
6451
6488
|
{
|
|
6452
6489
|
"file": "packages/@ember/-internals/glimmer/lib/component-managers/route-template.ts",
|
|
6453
6490
|
"line": 113,
|
|
@@ -6504,7 +6541,7 @@
|
|
|
6504
6541
|
{
|
|
6505
6542
|
"file": "packages/@ember/-internals/glimmer/lib/components/input.ts",
|
|
6506
6543
|
"line": 67,
|
|
6507
|
-
"description": "The `Input` component lets you create an HTML `<input>` element.\n\n```
|
|
6544
|
+
"description": "The `Input` component lets you create an HTML `<input>` element.\n\n```gjs\nimport { Input } from '@ember/component';\n \n<template>\n <Input @value=\"987\" />\n</template>\n```\n\ncreates an `<input>` element with `type=\"text\"` and value set to 987.\n\n### Text field\n\nIf no `type` argument is specified, a default of type 'text' is used.\n\n```handlebars\nSearch:\n<Input @value={{this.searchWord}} />\n```\n\nIn this example, the initial value in the `<input>` will be set to the value of\n`this.searchWord`. If the user changes the text, the value of `this.searchWord` will also be\nupdated.\n\n### Actions\n\nThe `Input` component takes a number of arguments with callbacks that are invoked in response to\nuser events.\n\n* `enter`\n* `insert-newline`\n* `escape-press`\n* `focus-in`\n* `focus-out`\n* `key-down`\n* `key-press`\n* `key-up`\n\nThese callbacks are passed to `Input` like this:\n\n```handlebars\n<Input @value={{this.searchWord}} @enter={{this.query}} />\n```\n\nStarting with Ember Octane, we recommend using the `{{on}}` modifier to call actions\non specific events, such as the input event.\n\n```handlebars\n<label for=\"input-name\">Name:</label>\n<Input\n @id=\"input-name\"\n @value={{this.name}}\n {{on \"input\" this.validateName}}\n/>\n```\n\nThe event name (e.g. `focusout`, `input`, `keydown`) always follows the casing\nthat the HTML standard uses.\n\n### `<input>` HTML Attributes to Avoid\n\nIn most cases, if you want to pass an attribute to the underlying HTML `<input>` element, you\ncan pass the attribute directly, just like any other Ember component.\n\n```handlebars\n<Input @type=\"text\" size=\"10\" />\n```\n\nIn this example, the `size` attribute will be applied to the underlying `<input>` element in the\noutputted HTML.\n\nHowever, there are a few attributes where you **must** use the `@` version.\n\n* `@type`: This argument is used to control which Ember component is used under the hood\n* `@value`: The `@value` argument installs a two-way binding onto the element. If you wanted a\n one-way binding, use `<input>` with the `value` property and the `input` event instead.\n* `@checked` (for checkboxes): like `@value`, the `@checked` argument installs a two-way binding\n onto the element. If you wanted a one-way binding, use `<input type=\"checkbox\">` with\n `checked` and the `input` event instead.\n\n### Checkbox\n\nTo create an `<input type=\"checkbox\">`:\n\n```handlebars\nEmberize Everything:\n<Input @type=\"checkbox\" @checked={{this.isEmberized}} name=\"isEmberized\" />\n```\n\nThis will bind the checked state of this checkbox to the value of `isEmberized` -- if either one\nchanges, it will be reflected in the other.",
|
|
6508
6545
|
"itemtype": "method",
|
|
6509
6546
|
"name": "Input",
|
|
6510
6547
|
"params": [
|
|
@@ -6521,14 +6558,14 @@
|
|
|
6521
6558
|
},
|
|
6522
6559
|
{
|
|
6523
6560
|
"file": "packages/@ember/-internals/glimmer/lib/components/input.ts",
|
|
6524
|
-
"line":
|
|
6561
|
+
"line": 171,
|
|
6525
6562
|
"description": "The HTML class attribute.",
|
|
6526
6563
|
"class": "Ember.Templates.components",
|
|
6527
6564
|
"module": "@ember/component"
|
|
6528
6565
|
},
|
|
6529
6566
|
{
|
|
6530
6567
|
"file": "packages/@ember/-internals/glimmer/lib/components/input.ts",
|
|
6531
|
-
"line":
|
|
6568
|
+
"line": 182,
|
|
6532
6569
|
"description": "The HTML type attribute.",
|
|
6533
6570
|
"class": "Ember.Templates.components",
|
|
6534
6571
|
"module": "@ember/component"
|
|
@@ -6550,7 +6587,7 @@
|
|
|
6550
6587
|
{
|
|
6551
6588
|
"file": "packages/@ember/-internals/glimmer/lib/components/link-to.ts",
|
|
6552
6589
|
"line": 48,
|
|
6553
|
-
"description": "The `LinkTo` component renders a link to the supplied `routeName` passing an optionally\nsupplied model to the route as its `model` context of the route. The block for `LinkTo`\nbecomes the contents of the rendered element:\n\n```
|
|
6590
|
+
"description": "The `LinkTo` component renders a link to the supplied `routeName` passing an optionally\nsupplied model to the route as its `model` context of the route. The block for `LinkTo`\nbecomes the contents of the rendered element:\n\n```gjs\nimport { LinkTo } from '@ember/routing';\n \n<template>\n <LinkTo @route='photoGallery'>\n Great Hamster Photos\n </LinkTo>\n</template>\n```\n\nThis will result in:\n\n```html\n<a href=\"/hamster-photos\">\n Great Hamster Photos\n</a>\n```\n\n### Disabling the `LinkTo` component\n\nThe `LinkTo` component can be disabled by using the `disabled` argument. A disabled link\ndoesn't result in a transition when activated, and adds the `disabled` class to the `<a>`\nelement.\n\n(The class name to apply to the element can be overridden by using the `disabledClass`\nargument)\n\n```handlebars\n<LinkTo @route='photoGallery' @disabled={{true}}>\n Great Hamster Photos\n</LinkTo>\n```\n\n### Handling `href`\n\n`<LinkTo>` will use your application's Router to fill the element's `href` property with a URL\nthat matches the path to the supplied `routeName`.\n\n### Handling current route\n\nThe `LinkTo` component will apply a CSS class name of 'active' when the application's current\nroute matches the supplied routeName. For example, if the application's current route is\n'photoGallery.recent', then the following invocation of `LinkTo`:\n\n```handlebars\n<LinkTo @route='photoGallery.recent'>\n Great Hamster Photos\n</LinkTo>\n```\n\nwill result in\n\n```html\n<a href=\"/hamster-photos/this-week\" class=\"active\">\n Great Hamster Photos\n</a>\n```\n\nThe CSS class used for active classes can be customized by passing an `activeClass` argument:\n\n```handlebars\n<LinkTo @route='photoGallery.recent' @activeClass=\"current-url\">\n Great Hamster Photos\n</LinkTo>\n```\n\n```html\n<a href=\"/hamster-photos/this-week\" class=\"current-url\">\n Great Hamster Photos\n</a>\n```\n\n### Keeping a link active for other routes\n\nIf you need a link to be 'active' even when it doesn't match the current route, you can use the\n`current-when` argument.\n\n```handlebars\n<LinkTo @route='photoGallery' @current-when='photos'>\n Photo Gallery\n</LinkTo>\n```\n\nThis may be helpful for keeping links active for:\n\n* non-nested routes that are logically related\n* some secondary menu approaches\n* 'top navigation' with 'sub navigation' scenarios\n\nA link will be active if `current-when` is `true` or the current\nroute is the route this link would transition to.\n\nTo match multiple routes 'space-separate' the routes:\n\n```handlebars\n<LinkTo @route='gallery' @current-when='photos drawings paintings'>\n Art Gallery\n</LinkTo>\n```\n\n### Supplying a model\n\nAn optional `model` argument can be used for routes whose\npaths contain dynamic segments. This argument will become\nthe model context of the linked route:\n\n```javascript\nRouter.map(function() {\n this.route(\"photoGallery\", {path: \"hamster-photos/:photo_id\"});\n});\n```\n\n```handlebars\n<LinkTo @route='photoGallery' @model={{this.aPhoto}}>\n {{aPhoto.title}}\n</LinkTo>\n```\n\n```html\n<a href=\"/hamster-photos/42\">\n Tomster\n</a>\n```\n\n### Supplying multiple models\n\nFor deep-linking to route paths that contain multiple\ndynamic segments, the `models` argument can be used.\n\nAs the router transitions through the route path, each\nsupplied model argument will become the context for the\nroute with the dynamic segments:\n\n```javascript\nRouter.map(function() {\n this.route(\"photoGallery\", { path: \"hamster-photos/:photo_id\" }, function() {\n this.route(\"comment\", {path: \"comments/:comment_id\"});\n });\n});\n```\n\nThis argument will become the model context of the linked route:\n\n```handlebars\n<LinkTo @route='photoGallery.comment' @models={{array this.aPhoto this.comment}}>\n {{comment.body}}\n</LinkTo>\n```\n\n```html\n<a href=\"/hamster-photos/42/comments/718\">\n A+++ would snuggle again.\n</a>\n```\n\n### Supplying an explicit dynamic segment value\n\nIf you don't have a model object available to pass to `LinkTo`,\nan optional string or integer argument can be passed for routes whose\npaths contain dynamic segments. This argument will become the value\nof the dynamic segment:\n\n```javascript\nRouter.map(function() {\n this.route(\"photoGallery\", { path: \"hamster-photos/:photo_id\" });\n});\n```\n\n```handlebars\n<LinkTo @route='photoGallery' @model={{aPhotoId}}>\n {{this.aPhoto.title}}\n</LinkTo>\n```\n\n```html\n<a href=\"/hamster-photos/42\">\n Tomster\n</a>\n```\n\nWhen transitioning into the linked route, the `model` hook will\nbe triggered with parameters including this passed identifier.\n\n### Supplying query parameters\n\nIf you need to add optional key-value pairs that appear to the right of the ? in a URL,\nyou can use the `query` argument.\n\n```handlebars\n<LinkTo @route='photoGallery' @query={{hash page=1 per_page=20}}>\n Great Hamster Photos\n</LinkTo>\n```\n\nThis will result in:\n\n```html\n<a href=\"/hamster-photos?page=1&per_page=20\">\n Great Hamster Photos\n</a>\n```",
|
|
6554
6591
|
"itemtype": "method",
|
|
6555
6592
|
"name": "LinkTo",
|
|
6556
6593
|
"access": "public",
|
|
@@ -6560,7 +6597,7 @@
|
|
|
6560
6597
|
},
|
|
6561
6598
|
{
|
|
6562
6599
|
"file": "packages/@ember/-internals/glimmer/lib/components/link-to.ts",
|
|
6563
|
-
"line":
|
|
6600
|
+
"line": 264,
|
|
6564
6601
|
"description": "See [Ember.Templates.components.LinkTo](/ember/release/classes/Ember.Templates.components/methods/input?anchor=LinkTo).",
|
|
6565
6602
|
"itemtype": "method",
|
|
6566
6603
|
"name": "link-to",
|
|
@@ -6574,7 +6611,7 @@
|
|
|
6574
6611
|
},
|
|
6575
6612
|
{
|
|
6576
6613
|
"file": "packages/@ember/-internals/glimmer/lib/components/link-to.ts",
|
|
6577
|
-
"line":
|
|
6614
|
+
"line": 273,
|
|
6578
6615
|
"description": "An opaque interface which can be imported and used in strict-mode\ntemplates to call <LinkTo>.\n\nSee [Ember.Templates.components.LinkTo](/ember/release/classes/Ember.Templates.components/methods/input?anchor=LinkTo).",
|
|
6579
6616
|
"itemtype": "method",
|
|
6580
6617
|
"name": "LinkTo",
|
|
@@ -6589,7 +6626,7 @@
|
|
|
6589
6626
|
{
|
|
6590
6627
|
"file": "packages/@ember/-internals/glimmer/lib/components/textarea.ts",
|
|
6591
6628
|
"line": 10,
|
|
6592
|
-
"description": "The `Textarea` component inserts a new instance of `<textarea>` tag into the template.\n\nThe `@value` argument provides the content of the `<textarea>`.\n\nThis template:\n\n```handlebars\n<Textarea @value=\"A bunch of text\" />\n```\n\nWould result in the following HTML:\n\n```html\n<textarea class=\"ember-text-area\">\n A bunch of text\n</textarea>\n```\n\nThe `@value` argument is two-way bound. If the user types text into the textarea, the `@value`\nargument is updated. If the `@value` argument is updated, the text in the textarea is updated.\n\nIn the following example, the `writtenWords` property on the component will be updated as the user\ntypes 'Lots of text' into the text area of their browser's window.\n\n```app/components/word-editor.
|
|
6629
|
+
"description": "The `Textarea` component inserts a new instance of `<textarea>` tag into the template.\n\nThe `@value` argument provides the content of the `<textarea>`.\n\nThis template:\n\n```handlebars\nimport { Textarea } from '@ember/component';\n\n<template>\n <Textarea @value=\"A bunch of text\" />\n</template>\n```\n\nWould result in the following HTML:\n\n```html\n<textarea class=\"ember-text-area\">\n A bunch of text\n</textarea>\n```\n\nThe `@value` argument is two-way bound. If the user types text into the textarea, the `@value`\nargument is updated. If the `@value` argument is updated, the text in the textarea is updated.\n\nIn the following example, the `writtenWords` property on the component will be updated as the user\ntypes 'Lots of text' into the text area of their browser's window.\n\n```app/components/word-editor.gjs\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\n\nexport default class WordEditorComponent extends Component {\n @tracked writtenWords = \"Lots of text that IS bound\";\n \n <template>\n <Textarea @value={{writtenWords}} />\n </template>\n}\n```\n\nWould result in the following HTML:\n\n```html\n<textarea class=\"ember-text-area\">\n Lots of text that IS bound\n</textarea>\n```\n\nIf you wanted a one way binding, you could use the `<textarea>` element directly, and use the\n`value` DOM property and the `input` event.\n\n### Actions\n\nThe `Textarea` component takes a number of arguments with callbacks that are invoked in\nresponse to user events.\n\n* `enter`\n* `insert-newline`\n* `escape-press`\n* `focus-in`\n* `focus-out`\n* `key-press`\n\nThese callbacks are passed to `Textarea` like this:\n\n```handlebars\n<Textarea @value={{this.searchWord}} @enter={{this.query}} />\n```\n\n## Classic Invocation Syntax\n\nThe `Textarea` component can also be invoked using curly braces, just like any other Ember\ncomponent.\n\nFor example, this is an invocation using angle-bracket notation:\n\n```handlebars\n<Textarea @value={{this.searchWord}} @enter={{this.query}} />\n```\n\nYou could accomplish the same thing using classic invocation:\n\n```handlebars\n{{textarea value=this.searchWord enter=this.query}}\n```\n\nThe main difference is that angle-bracket invocation supports any HTML attribute using HTML\nattribute syntax, because attributes and arguments have different syntax when using angle-bracket\ninvocation. Curly brace invocation, on the other hand, only has a single syntax for arguments,\nand components must manually map attributes onto component arguments.\n\nWhen using classic invocation with `{{textarea}}`, only the following attributes are mapped onto\narguments:\n\n* rows\n* cols\n* name\n* selectionEnd\n* selectionStart\n* autocomplete\n* wrap\n* lang\n* dir\n* value\n\n## Classic `layout` and `layoutName` properties\n\nBecause HTML `textarea` elements do not contain inner HTML the `layout` and\n`layoutName` properties will not be applied.",
|
|
6593
6630
|
"itemtype": "method",
|
|
6594
6631
|
"name": "Textarea",
|
|
6595
6632
|
"access": "public",
|
|
@@ -6599,7 +6636,7 @@
|
|
|
6599
6636
|
},
|
|
6600
6637
|
{
|
|
6601
6638
|
"file": "packages/@ember/-internals/glimmer/lib/components/textarea.ts",
|
|
6602
|
-
"line":
|
|
6639
|
+
"line": 127,
|
|
6603
6640
|
"description": "See [Ember.Templates.components.Textarea](/ember/release/classes/Ember.Templates.components/methods/Textarea?anchor=Textarea)",
|
|
6604
6641
|
"itemtype": "method",
|
|
6605
6642
|
"name": "textarea",
|
|
@@ -6613,7 +6650,7 @@
|
|
|
6613
6650
|
},
|
|
6614
6651
|
{
|
|
6615
6652
|
"file": "packages/@ember/-internals/glimmer/lib/components/textarea.ts",
|
|
6616
|
-
"line":
|
|
6653
|
+
"line": 136,
|
|
6617
6654
|
"description": "An opaque interface which can be imported and used in strict-mode\ntemplates to call <Textarea>.\n\nSee [Ember.Templates.components.Textarea](/ember/release/classes/Ember.Templates.components/methods/Textarea?anchor=Textarea).",
|
|
6618
6655
|
"itemtype": "method",
|
|
6619
6656
|
"name": "Textarea",
|
|
@@ -6635,7 +6672,7 @@
|
|
|
6635
6672
|
{
|
|
6636
6673
|
"file": "packages/@ember/-internals/glimmer/lib/helpers/array.ts",
|
|
6637
6674
|
"line": 5,
|
|
6638
|
-
"description": "Use the `{{array}}` helper to create an array to pass as an option to your\ncomponents.\n\n```handlebars\n<MyComponent @people={{array\n 'Tom Dale'\n 'Yehuda Katz'\n this.myOtherPerson}}\n/>\n```\n or\n```handlebars\n{{
|
|
6675
|
+
"description": "Use the `{{array}}` helper to create an array to pass as an option to your\ncomponents.\n\n```handlebars\n<MyComponent @people={{array\n 'Tom Dale'\n 'Yehuda Katz'\n this.myOtherPerson}}\n/>\n```\n or\n```handlebars\n{{yield people=(array\n 'Tom Dale'\n 'Yehuda Katz'\n this.myOtherPerson)\n}}\n```\n\nWould result in an object such as:\n\n```js\n['Tom Dale', 'Yehuda Katz', this.get('myOtherPerson')]\n```\n\nWhere the 3rd item in the array is bound to updates of the `myOtherPerson` property.\n \nThe `array` helper is built-in keyword and does not need to be imported as of v7.1.0.",
|
|
6639
6676
|
"itemtype": "method",
|
|
6640
6677
|
"name": "array",
|
|
6641
6678
|
"params": [
|
|
@@ -6658,7 +6695,7 @@
|
|
|
6658
6695
|
{
|
|
6659
6696
|
"file": "packages/@ember/-internals/glimmer/lib/helpers/component.ts",
|
|
6660
6697
|
"line": 5,
|
|
6661
|
-
"description": "The `
|
|
6698
|
+
"description": "The `component` helper is used to package a Component with initial arguments.\nThe included arguments can then be merged during the final invocation.\n\nSee [Component](/ember/release/modules/@glimmer%2Fcomponent/) for\nadditional information on how a `Component` functions.\n\nThis is similar to the concept of Partial Application.\n \nFor example, given a `FullName` component:\n\n```app/components/full-name.gjs\nimport MyInputComponent from './my-input-component';\n\n<template>\n {{yield (component MyInputComponent value=@model.name placeholder=\"Username\")}}\n</template>\n```\n\nThe yielded component can be invoked by the calling component.\nSee the following snippet:\n\n```app/components/person-form.gjs\nimport FullName from './full-name';\n \n<template>\n <FullName @model={{@model}} as |Field|>\n <Field />\n </FullName>\n</template>\n```\n\nWhich will output an input whose value is already bound to `@model.name` and `placeholder`\nis \"Username\".\n \nAny arguments passed at the invocation site of the component will override those applied via\nthe `component` helper. For example, if the invocation site of the component is:\n\n```app/components/person-form.gjs\nimport FullName from './full-name';\n\n<template>\n <FullName @model={{@model}} as |Field|>\n <Field @placeholder=\"Your name\" />\n </FullName>\n</template>\n```\n\nThe output will be an input whose value is bound to `@model.name` and `placeholder`\nis \"Your name\".\n \nThe `component` helper is built-in and does not need to be imported. \n \nPrior to Strict Mode aka \"Template Tag\" or gjs, the component helper was also used to invoke\ncomponents dynamically. This is no longer necessary, and they can be directly invoked, as above.\n\n### Dynamic Component Invocation\n\n```app/templates/application.gjs\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { component } from '@ember/helper';\nimport LiveUpdatingChart from '../components/live-updating-chart';\nimport MarketCloseSummary from '../components/market-close-summary';\n\nexport default class Application extends Component {\n @tracked isMarketOpen = false;\n\n get infographicComponent() {\n return this.isMarketOpen ? LiveUpdatingChart : MarketCloseSummary;\n }\n\n <template>\n {{!-- The component can be invoked directly --}}\n <this.infographicComponent />\n \n {{!-- The component helper here is no longer necessary --}}\n {{component this.infographicComponentName}}\n </template>\n}\n```",
|
|
6662
6699
|
"itemtype": "method",
|
|
6663
6700
|
"name": "component",
|
|
6664
6701
|
"since": "1.11.0",
|
|
@@ -6670,7 +6707,7 @@
|
|
|
6670
6707
|
{
|
|
6671
6708
|
"file": "packages/@ember/-internals/glimmer/lib/helpers/concat.ts",
|
|
6672
6709
|
"line": 5,
|
|
6673
|
-
"description": "Concatenates the given arguments into a string.\n\nExample:\n\n```
|
|
6710
|
+
"description": "Concatenates the given arguments into a string.\n\nExample:\n\n```gjs\nimport { concat } from '@ember/helper';\n \n<template>\n {{yield (concat firstName \" \" lastName)}}\n\n {{! would yield name=\"<first name value> <last name value>\" to the component}}\n</template>\n```\n\nFor invocation of components, you don't need concat at all.\n\n```handlebars\n<SomeComponent @name=\"{{firstName}} {{lastName}}\" />\n```",
|
|
6674
6711
|
"access": "public",
|
|
6675
6712
|
"tagname": "",
|
|
6676
6713
|
"itemtype": "method",
|
|
@@ -6682,7 +6719,7 @@
|
|
|
6682
6719
|
{
|
|
6683
6720
|
"file": "packages/@ember/-internals/glimmer/lib/helpers/each-in.ts",
|
|
6684
6721
|
"line": 13,
|
|
6685
|
-
"description": "The `{{#each}}`
|
|
6722
|
+
"description": "The `{{#each}}` keyword loops over elements in a collection. It is an extension\nof the base Handlebars `{{#each}}` helper.\n\nThe default behavior of `{{#each}}` is to yield its inner block once for every\nitem in an array passing the item as the first block parameter.\n\nAssuming the `@developers` argument contains this array:\n\n```javascript\n[{ name: 'Yehuda' },{ name: 'Tom' }, { name: 'Paul' }];\n```\n\n```handlebars\n<ul>\n {{#each @developers as |person|}}\n <li>Hello, {{person.name}}!</li>\n {{/each}}\n</ul>\n```\n\nThe same rules apply to arrays of primitives.\n\n```javascript\n['Yehuda', 'Tom', 'Paul']\n```\n\n```handlebars\n<ul>\n {{#each @developerNames as |name|}}\n <li>Hello, {{name}}!</li>\n {{/each}}\n</ul>\n```\n\nDuring iteration, the index of each item in the array is provided as a second block\nparameter.\n\n```handlebars\n<ul>\n {{#each @developers as |person index|}}\n <li>Hello, {{person.name}}! You're number {{index}} in line</li>\n {{/each}}\n</ul>\n```\n \n`#each` is a keyword and does not need to be imported. \n\n### Specifying Keys\n\nIn order to improve rendering speed, Ember will try to reuse the DOM elements\nwhere possible. Specifically, if the same item is present in the array both\nbefore and after the change, its DOM output will be reused.\n\nThe `key` option is used to tell Ember how to determine if the items in the\narray being iterated over with `{{#each}}` has changed between renders. By\ndefault the item's object identity is used.\n\nThis is usually sufficient, so in most cases, the `key` option is simply not\nneeded. However, in some rare cases, the objects' identities may change even\nthough they represent the same underlying data.\n\nFor example:\n\n```javascript\npeople.map(person => {\n return { ...person, type: 'developer' };\n});\n```\n\nIn this case, each time the `people` array is `map`-ed over, it will produce\nan new array with completely different objects between renders. In these cases,\nyou can help Ember determine how these objects related to each other with the\n`key` option:\n\n```handlebars\n<ul>\n {{#each @developers key=\"name\" as |person|}}\n <li>Hello, {{person.name}}!</li>\n {{/each}}\n</ul>\n```\n\nBy doing so, Ember will use the value of the property specified (`person.name`\nin the example) to find a \"match\" from the previous render. That is, if Ember\nhas previously seen an object from the `@developers` array with a matching\nname, its DOM elements will be re-used.\n\nThere are two special values for `key`:\n\n * `@index` - The index of the item in the array.\n * `@identity` - The item in the array itself.\n\n### {{else}} condition\n\n`{{#each}}` can have a matching `{{else}}`. The contents of this block will render\nif the collection is empty.\n\n```handlebars\n<ul>\n {{#each @developers as |person|}}\n <li>{{person.name}} is available!</li>\n {{else}}\n <li>Sorry, nobody is available for this task.</li>\n {{/each}}\n</ul>\n```",
|
|
6686
6723
|
"itemtype": "method",
|
|
6687
6724
|
"name": "each",
|
|
6688
6725
|
"access": "public",
|
|
@@ -6692,8 +6729,8 @@
|
|
|
6692
6729
|
},
|
|
6693
6730
|
{
|
|
6694
6731
|
"file": "packages/@ember/-internals/glimmer/lib/helpers/each-in.ts",
|
|
6695
|
-
"line":
|
|
6696
|
-
"description": "The `{{each-in}}`
|
|
6732
|
+
"line": 126,
|
|
6733
|
+
"description": "The `{{#each-in}}` keyword loops over properties on an object.\n\nFor example, given this component definition:\n\n```app/components/developer-details.gjs\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\n\nexport default class extends Component {\n @tracked developer = {\n \"name\": \"Shelly Sails\",\n \"age\": 42\n };\n \n <template>\n <ul>\n {{#each-in this.developer as |key value|}}\n <li>{{key}}: {{value}}</li>\n {{/each-in}}\n </ul>\n </template>\n}\n```\n\nThis template would display all properties on the `developer`\nobject in a list, outputting their name and age:\n\n```html\n<ul>\n <li>name: Shelly Sails</li>\n <li>age: 42</li>\n</ul>\n```\n \n`#each-in` is a keyword and does not need to be imported.",
|
|
6697
6734
|
"itemtype": "method",
|
|
6698
6735
|
"name": "each-in",
|
|
6699
6736
|
"access": "public",
|
|
@@ -6705,7 +6742,7 @@
|
|
|
6705
6742
|
{
|
|
6706
6743
|
"file": "packages/@ember/-internals/glimmer/lib/helpers/element.ts",
|
|
6707
6744
|
"line": 84,
|
|
6708
|
-
"description": "The `element` helper lets you dynamically set the tag name of an element.\n\n```handlebars\n{{#let (element @tagName) as |Tag|}}\n <Tag class=\"my-element\">Hello</Tag>\n{{/let}}\n```\n\nWhen `@tagName` is `\"h1\"`, this renders `<h1 class=\"my-element\">Hello</h1>`.\n\nWhen `@tagName` is an empty string `\"\"`, the block content is rendered without\na wrapping element.\n\nPassing `null`, `undefined`, or non-string values will throw an assertion error.\n\nChanging the tag name will tear down and recreate the element and its contents.",
|
|
6745
|
+
"description": "The `element` helper lets you dynamically set the tag name of an element.\n\n```handlebars\n{{#let (element @tagName) as |Tag|}}\n <Tag class=\"my-element\">Hello</Tag>\n{{/let}}\n```\n\nWhen `@tagName` is `\"h1\"`, this renders `<h1 class=\"my-element\">Hello</h1>`.\n\nWhen `@tagName` is an empty string `\"\"`, the block content is rendered without\na wrapping element.\n\nPassing `null`, `undefined`, or non-string values will throw an assertion error.\n\nChanging the tag name will tear down and recreate the element and its contents.\n \nThe `element` helper is built-in and does not need to be imported.",
|
|
6709
6746
|
"itemtype": "method",
|
|
6710
6747
|
"name": "element",
|
|
6711
6748
|
"access": "public",
|
|
@@ -6716,7 +6753,7 @@
|
|
|
6716
6753
|
{
|
|
6717
6754
|
"file": "packages/@ember/-internals/glimmer/lib/helpers/fn.ts",
|
|
6718
6755
|
"line": 5,
|
|
6719
|
-
"description": "The `fn` helper allows you to ensure a function that you are passing off\nto another component, helper, or modifier has access to arguments that are\navailable in the template.\n\nFor example, if you have an `each` helper looping over a number of items, you\nmay need to pass a function that expects to receive the item as an argument\nto a component invoked within the loop. Here's how you could use the `fn`\nhelper to pass both the function and its arguments together:\n\n
|
|
6756
|
+
"description": "The `fn` helper allows you to ensure a function that you are passing off\nto another component, helper, or modifier has access to arguments that are\navailable in the template.\n\nFor example, if you have an `each` helper looping over a number of items, you\nmay need to pass a function that expects to receive the item as an argument\nto a component invoked within the loop. Here's how you could use the `fn`\nhelper to pass both the function and its arguments together:\n\n```app/components/items-listing.gjs\n<template>\n {{#each @items as |item|}}\n <DisplayItem @item=item @select={{fn this.handleSelected item}} />\n {{/each}}\n</template>\n```\n\n```app/components/items-list.gjs\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\n\nexport default class ItemsList extends Component {\n @action\n handleSelected(item) {\n // ...snip...\n }\n}\n```\n\nIn this case the `DisplayItem` component will receive a normal function\nthat it can invoke. When it invokes the function, the `handleSelected`\nfunction will receive the `item` and any arguments passed, thanks to the\n`fn` helper.\n\nLet's take look at what that means in a couple circumstances:\n\n- When invoked as `this.args.select()` the `handleSelected` function will\n receive the `item` from the loop as its first and only argument.\n- When invoked as `this.args.select('foo')` the `handleSelected` function\n will receive the `item` from the loop as its first argument and the\n string `'foo'` as its second argument.\n\nIn the example above, we used `@action` to ensure that `handleSelected` is\nproperly bound to the `items-list`, but let's explore what happens if we\nleft out `@action`:\n\n```app/components/items-list.gjs\nimport Component from '@glimmer/component';\n\nexport default class ItemsList extends Component {\n handleSelected(item) {\n // ...snip...\n }\n}\n```\n\nIn this example, when `handleSelected` is invoked inside the `display-item`\ncomponent, it will **not** have access to the component instance. In other\nwords, it will have no `this` context, so please make sure your functions\nare bound (via `@action` or other means) before passing into `fn`!\n\nSee also [partial application](https://en.wikipedia.org/wiki/Partial_application).\n \n`fn` is built-in and does not need to be imported.",
|
|
6720
6757
|
"itemtype": "method",
|
|
6721
6758
|
"name": "fn",
|
|
6722
6759
|
"access": "public",
|
|
@@ -6728,7 +6765,7 @@
|
|
|
6728
6765
|
{
|
|
6729
6766
|
"file": "packages/@ember/-internals/glimmer/lib/helpers/get.ts",
|
|
6730
6767
|
"line": 5,
|
|
6731
|
-
"description": "Dynamically look up a property on an object or an element in an array.\nThe second argument to `{{get}}` should have a string or number value,\nalthough it can be bound.\n\nFor example, these two usages are equivalent:\n\n```app/components/developer-detail.
|
|
6768
|
+
"description": "Dynamically look up a property on an object or an element in an array.\nThe second argument to `{{get}}` should have a string or number value,\nalthough it can be bound.\n\nFor example, these two usages are equivalent:\n\n```app/components/developer-detail.gjs\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { get } from '@ember/object';\n\nexport default class extends Component {\n @tracked developer = {\n name: \"Sandi Metz\",\n language: \"Ruby\"\n }\n \n <template>\n {{this.developer.name}}\n {{get this.developer \"name\"}}\n </template>\n}\n```\n \nIf there were several facts about a person, the `{{get}}` helper can dynamically\npick one:\n\n```app/templates/application.gjs\nimport DeveloperDetail from '../components/developer-detail';\n\n<template>\n <DeveloperDetail @factName=\"language\" />\n</template\n```\n\n```handlebars\n{{get this.developer @factName}}\n```\n\nFor a more complex example, this template would allow the user to switch\nbetween showing the user's name and preferred coding language with a click:\n\n```app/components/developer-detail.gjs\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { get } from '@ember/object';\n\nexport default class extends Component {\n @tracked developer = {\n name: \"Sandi Metz\",\n language: \"Ruby\"\n }\n\n @tracked currentFact = 'name'\n\n @action\n showFact(fact) {\n this.currentFact = fact;\n }\n \n <template>\n {{get this.developer this.currentFact}}\n\n <button {{on 'click' (fn this.showFact \"name\")}}>Show name</button>\n <button {{on 'click' (fn this.showFact \"language\")}}>Show language</button>\n </template>\n}\n```\n\nThe `{{get}}` helper can also be used for array element access via index.\nThis would display the value of the first element in the array `this.names`:\n\n```handlebars\n{{get this.names 0}}\n```\n\nArray element access also works with a dynamic second argument:\n\n```handlebars\n{{get this.names @index}}\n```",
|
|
6732
6769
|
"access": "public",
|
|
6733
6770
|
"tagname": "",
|
|
6734
6771
|
"itemtype": "method",
|
|
@@ -6740,7 +6777,7 @@
|
|
|
6740
6777
|
{
|
|
6741
6778
|
"file": "packages/@ember/-internals/glimmer/lib/helpers/hash.ts",
|
|
6742
6779
|
"line": 5,
|
|
6743
|
-
"description": "Use the `{{hash}}` helper to create a hash to pass as an option to your\ncomponents. This is
|
|
6780
|
+
"description": "Use the `{{hash}}` helper to create a hash to pass as an option to your\ncomponents. This is especially useful for contextual components where you can\njust yield a hash:\n\n```handlebars\n{{yield (hash\n name='Sarah'\n title=office\n)}}\n```\n\nWould result in an object such as:\n\n```js\n{ name: 'Sarah', title: this.get('office') }\n```\n\nWhere the `title` is bound to updates of the `office` property.\n\nNote that the hash is an empty object with no prototype chain, therefore\ncommon methods like `toString` are not available in the resulting hash.\nIf you need to use such a method, you can use the `call` or `apply`\napproach:\n\n```js\nfunction toString(obj) {\n return Object.prototype.toString.apply(obj);\n}\n```\n \nThe `hash` helper is a built-in keyword and does not need to be imported as of v7.1.0.",
|
|
6744
6781
|
"itemtype": "method",
|
|
6745
6782
|
"name": "hash",
|
|
6746
6783
|
"params": [
|
|
@@ -6775,7 +6812,7 @@
|
|
|
6775
6812
|
{
|
|
6776
6813
|
"file": "packages/@ember/-internals/glimmer/lib/helpers/if-unless.ts",
|
|
6777
6814
|
"line": 5,
|
|
6778
|
-
"description": "The `if` helper allows you to conditionally render one of two branches,\ndepending on the \"truthiness\" of a property.\nFor example the following values are all falsey: `false`, `undefined`, `null`, `\"\"`, `0`, `NaN` or an empty array.\n\nThis helper has two forms, block and inline.\n\n## Block form\n\nYou can use the block form of `if` to conditionally render a section of the template.\n\nTo use it, pass the conditional value to the `if` helper,\nusing the block form to wrap the section of template you want to conditionally render.\nLike so:\n\n```app/templates/application.
|
|
6815
|
+
"description": "The `if` helper allows you to conditionally render one of two branches,\ndepending on the \"truthiness\" of a property.\nFor example the following values are all falsey: `false`, `undefined`, `null`, `\"\"`, `0`, `NaN` or an empty array.\n\nThis helper has two forms, block and inline.\n\n## Block form\n\nYou can use the block form of `if` to conditionally render a section of the template.\n\nTo use it, pass the conditional value to the `if` helper,\nusing the block form to wrap the section of template you want to conditionally render.\nLike so:\n\n```app/templates/application.gjs\nimport Weather from '../components/weather';\n \n<template>\n <Weather />\n</template>\n```\n\n```app/components/weather.gjs\n<template>\n {{! will not render because greeting is undefined}}\n {{#if @isRaining}}\n Yes, grab an umbrella!\n {{/if}}\n</template>\n```\n\nYou can also define what to show if the property is falsey by using\nthe `else` helper.\n\n```app/components/weather.gjs\n<template>\n {{#if @isRaining}}\n Yes, grab an umbrella!\n {{else}}\n No, it's lovely outside!\n {{/if}}\n</template>\n```\n\nYou are also able to combine `else` and `if` helpers to create more complex\nconditional logic.\n\nFor the following template:\n\n ```app/components/weather.gjs\n<template>\n {{#if @isRaining}}\n Yes, grab an umbrella!\n {{else if @isCold}}\n Grab a coat, it's chilly!\n {{else}}\n No, it's lovely outside!\n {{/if}}\n</template> \n```\n\nIf you call it by saying `isCold` is true:\n\n```app/templates/application.gjs\nimport Weather from '../components/weather';\n \n<template>\n <Weather @isCold={{true}} />\n</template>\n```\n\nThen `Grab a coat, it's chilly!` will be rendered.\n\n## Inline form\n\nThe inline `if` helper conditionally renders a single property or string.\n\nIn this form, the `if` helper receives three arguments, the conditional value,\nthe value to render when truthy, and the value to render when falsey.\n\nFor example, if `useLongGreeting` is truthy, the following:\n\n```app/templates/application.gjs\nimport Greeting from '../components/greeting';\n\n<template>\n <Greeting @useLongGreeting={{true}} />\n<template>\n```\n\n```app/components/greeting.gjs\n<template>\n {{if @useLongGreeting \"Hello\" \"Hi\"}} Alex\n<template>\n```\n\nWill render:\n\n```html\nHello Alex\n```\n\nOne detail to keep in mind is that both branches of the `if` helper will be evaluated,\nso if you have `{{if condition \"foo\" (expensive-operation \"bar\")`,\n`expensive-operation` will always calculate.\n \n`if` is built-in and does not need to be imported.",
|
|
6779
6816
|
"itemtype": "method",
|
|
6780
6817
|
"name": "if",
|
|
6781
6818
|
"access": "public",
|
|
@@ -6785,8 +6822,8 @@
|
|
|
6785
6822
|
},
|
|
6786
6823
|
{
|
|
6787
6824
|
"file": "packages/@ember/-internals/glimmer/lib/helpers/if-unless.ts",
|
|
6788
|
-
"line":
|
|
6789
|
-
"description": "The `unless` helper is the inverse of the `if` helper. It displays if a value\nis falsey (\"not true\" or \"is false\"). Example values that will display with\n`unless`: `false`, `undefined`, `null`, `\"\"`, `0`, `NaN` or an empty array.\n\n## Inline form\n\nThe inline `unless` helper conditionally renders a single property or string.\nThis helper acts like a ternary operator. If the first property is falsy,\nthe second argument will be displayed, otherwise, the third argument will be\ndisplayed\n\nFor example, if you pass a falsey `useLongGreeting` to the `Greeting` component:\n\n```app/templates/application.
|
|
6825
|
+
"line": 119,
|
|
6826
|
+
"description": "The `unless` helper is the inverse of the `if` helper. It displays if a value\nis falsey (\"not true\" or \"is false\"). Example values that will display with\n`unless`: `false`, `undefined`, `null`, `\"\"`, `0`, `NaN` or an empty array.\n\n## Inline form\n\nThe inline `unless` helper conditionally renders a single property or string.\nThis helper acts like a ternary operator. If the first property is falsy,\nthe second argument will be displayed, otherwise, the third argument will be\ndisplayed\n\nFor example, if you pass a falsey `useLongGreeting` to the `Greeting` component:\n\n```app/templates/application.gjs\nimport Greeting from '../components/greeting';\n \n<template>\n <Greeting @useLongGreeting={{false}} />\n</template>\n```\n\n```app/components/greeting.gjs\n<template>\n {{unless @useLongGreeting \"Hi\" \"Hello\"}} Ben\n</template>\n```\n\nThen it will display:\n\n```html\nHi Ben\n```\n\n## Block form\n\nLike the `if` helper, the `unless` helper also has a block form.\n\nThe following will not render anything:\n\n```app/templates/application.gjs\nimport Greeting from '../components/greeting';\n \n<template>\n <Greeting />\n</template>\n```\n\n```app/components/greeting.gjs\n<template>\n {{#unless @greeting}}\n No greeting was found. Why not set one?\n {{/unless}}\n</template>\n```\n\nYou can also use an `else` helper with the `unless` block. The\n`else` will display if the value is truthy.\n\nIf you have the following component:\n\n```app/components/logged-in.gjs\n<template>\n {{#unless @userData}}\n Please login.\n {{else}}\n Welcome back!\n {{/unless}}\n</template>\n```\n\nCalling it with a truthy `userData`:\n\n```app/templates/application.gjs\nimport LoggedIn from '../components/logged-in';\n \n<template>\n <LoggedIn @userData={{hash username=\"Zoey\"}} />\n</template>\n```\n\nWill render:\n\n```html\nWelcome back!\n```\n\nand calling it with a falsey `userData`:\n\n```app/templates/application.gjs\nimport LoggedIn from '../components/logged-in';\n\n<template>\n <LoggedIn @userData={{false}} />\n</template>\n```\n\nWill render:\n\n```html\nPlease login.\n```\n \n`unless` is built-in and does not need to be imported.",
|
|
6790
6827
|
"itemtype": "method",
|
|
6791
6828
|
"name": "unless",
|
|
6792
6829
|
"access": "public",
|
|
@@ -6827,7 +6864,7 @@
|
|
|
6827
6864
|
{
|
|
6828
6865
|
"file": "packages/@ember/-internals/glimmer/lib/helpers/mut.ts",
|
|
6829
6866
|
"line": 9,
|
|
6830
|
-
"description": "The `mut` helper
|
|
6867
|
+
"description": "The `mut` helper is a shortcut for updating for args.\n \nHowever, defining update functions on your backing class is preferable to using `mut`.\n \nMore directly: Don't use `mut`. \n\nThe `mut` helper, when used with `fn`, will return a function that\nsets the value passed to `mut` to its first argument. As an example, we can create a\nbutton that increments a value passing the value directly to the `fn`:\n\n```handlebars\n<MyChild @childClickCount={{this.totalClicks}} @clickCountChange={{fn (mut this.totalClicks)}} />\n```\n\nThe child `Component` would invoke the function with the new click count:\n\n```app/components/my-child.gjs\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\n \nexport default class MyChild extends Component {\n @action\n update() {\n this.args.clickCountChange(this.args.childClickCount + 1);\n }\n \n <template>\n <button {{on \"click\" this.update}}>\n Click me!\n </button>\n </template>\n}\n```\n\nThe `mut` helper changes the `totalClicks` value to what was provided as the `fn` argument.",
|
|
6831
6868
|
"itemtype": "method",
|
|
6832
6869
|
"name": "mut",
|
|
6833
6870
|
"params": [
|
|
@@ -6846,7 +6883,7 @@
|
|
|
6846
6883
|
{
|
|
6847
6884
|
"file": "packages/@ember/-internals/glimmer/lib/helpers/page-title.ts",
|
|
6848
6885
|
"line": 5,
|
|
6849
|
-
"description": "`page-title` allows you to set the title of any page in your application and\nappend additional titles for each route. For complete documentation, see\nhttps://github.com/ember-cli/ember-page-title.\n\n```
|
|
6886
|
+
"description": "`page-title` allows you to set the title of any page in your application and\nappend additional titles for each route. For complete documentation, see\nhttps://github.com/ember-cli/ember-page-title.\n\n```gjs\nimport pageTitle from 'ember-page-title/helpers/page-title';\n\n<template>\n {{pageTitle \"My Page Title\" }}\n</template>\n```",
|
|
6850
6887
|
"itemtype": "method",
|
|
6851
6888
|
"name": "page-title",
|
|
6852
6889
|
"params": [
|
|
@@ -6864,7 +6901,7 @@
|
|
|
6864
6901
|
{
|
|
6865
6902
|
"file": "packages/@ember/-internals/glimmer/lib/helpers/readonly.ts",
|
|
6866
6903
|
"line": 9,
|
|
6867
|
-
"description": "The `readonly` helper let's you specify that a binding is one-way only,\ninstead of two-way.\nWhen you pass a `readonly` binding from an outer context (e.g. parent component),\nto to an inner context (e.g. child component), you are saying that changing that\nproperty in the inner context does not change the value in the outer context.\n\nTo specify that a binding is read-only, when invoking the child `Component`:\n\n```app/components/my-parent.js\nexport default class MyParent extends Component {\n totalClicks = 3;\n}\n```\n\
|
|
6904
|
+
"description": "The `readonly` helper let's you specify that a binding is one-way only,\ninstead of two-way.\n\nThis is a vestigial helper from the days of `@ember/component` and does not apply to\ncomponents extending from `@glimmer/component`.\n \nWhen you pass a `readonly` binding from an outer context (e.g. parent component),\nto to an inner context (e.g. child component), you are saying that changing that\nproperty in the inner context does not change the value in the outer context.\n\nTo specify that a binding is read-only, when invoking the child `Component`:\n\n```app/components/my-parent.js\nexport default class MyParent extends Component {\n totalClicks = 3;\n}\n```\n\nNow, when you update `childClickCount`:\n\n```app/components/my-child.js\nexport default class MyChild extends Component {\n click() {\n this.incrementProperty('childClickCount');\n }\n}\n```\n\nThe value updates in the child component, but not the parent component:\n\n```app/templates/components/my-child.hbs\n{{log childClickCount}} //-> 4\n```\n\n```app/templates/components/my-parent.hbs\n{{log totalClicks}} //-> 3\n<MyChild @childClickCount={{readonly totalClicks}} />\n```\nor\n```app/templates/components/my-parent.hbs\n{{log totalClicks}} //-> 3\n{{my-child childClickCount=(readonly totalClicks)}}\n```\n\n### Objects and Arrays\n\nWhen passing a property that is a complex object (e.g. object, array) instead of a primitive object (e.g. number, string),\nonly the reference to the object is protected using the readonly helper.\nThis means that you can change properties of the object both on the parent component, as well as the child component.\nThe `readonly` binding behaves similar to the `const` keyword in JavaScript.\n\nLet's look at an example:\n\nFirst let's set up the parent component:\n\n```app/components/my-parent.js\nimport Component from '@ember/component';\n\nexport default class MyParent extends Component {\n clicks: null,\n\n init() {\n this._super(...arguments);\n this.set('clicks', { total: 3 });\n }\n}\n```\n\n```app/templates/components/my-parent.hbs\n{{log clicks.total}} //-> 3\n<MyChild @childClicks={{readonly clicks}} />\n```\n```app/templates/components/my-parent.hbs\n{{log clicks.total}} //-> 3\n{{my-child childClicks=(readonly clicks)}}\n```\n\nNow, if you update the `total` property of `childClicks`:\n\n```app/components/my-child.js\nimport Component from '@ember/component';\n\nexport default class MyChild extends Component {\n click() {\n this.get('clicks').incrementProperty('total');\n }\n}\n```\n\nYou will see the following happen:\n\n```app/templates/components/my-parent.hbs\n{{log clicks.total}} //-> 4\n<MyChild @childClicks={{readonly clicks}} />\n```\nor\n```app/templates/components/my-parent.hbs\n{{log clicks.total}} //-> 4\n{{my-child childClicks=(readonly clicks)}}\n```\n\n```app/templates/components/my-child.hbs\n{{log childClicks.total}} //-> 4\n```",
|
|
6868
6905
|
"itemtype": "method",
|
|
6869
6906
|
"name": "readonly",
|
|
6870
6907
|
"params": [
|
|
@@ -6906,7 +6943,7 @@
|
|
|
6906
6943
|
{
|
|
6907
6944
|
"file": "packages/@ember/-internals/glimmer/lib/modifiers/on.ts",
|
|
6908
6945
|
"line": 5,
|
|
6909
|
-
"description": "The `{{on}}` modifier lets you easily add event listeners (it uses\n[EventTarget.addEventListener](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)\ninternally).\n\nFor example, if you'd like to run a function on your component when a `<button>`\nin the components template is clicked you might do something like:\n\n```app/components/like-post.
|
|
6946
|
+
"description": "The `{{on}}` modifier lets you easily add event listeners (it uses\n[EventTarget.addEventListener](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)\ninternally).\n\nFor example, if you'd like to run a function on your component when a `<button>`\nin the components template is clicked you might do something like:\n\n```app/components/like-post.gjs\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\n\nexport default class LikePost extends Component {\n @action\n saveLike() {\n // someone likes your post!\n // better send a request off to your server...\n }\n \n <template>\n <button {{on 'click' this.saveLike}}>Like this post!</button>\n </template>\n}\n```\n\n### Arguments\n\n`{{on}}` accepts two positional arguments, and a few named arguments.\n\nThe positional arguments are:\n\n- `event` -- the name to use when calling `addEventListener`\n- `callback` -- the function to be passed to `addEventListener`\n\nThe named arguments are:\n\n- capture -- a `true` value indicates that events of this type will be dispatched\n to the registered listener before being dispatched to any EventTarget beneath it\n in the DOM tree.\n- once -- indicates that the listener should be invoked at most once after being\n added. If true, the listener would be automatically removed when invoked.\n- passive -- if `true`, indicates that the function specified by listener will never\n call preventDefault(). If a passive listener does call preventDefault(), the user\n agent will do nothing other than generate a console warning. See\n [Improving scrolling performance with passive listeners](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Improving_scrolling_performance_with_passive_listeners)\n to learn more.\n\nThe callback function passed to `{{on}}` will receive any arguments that are passed\nto the event handler. Most commonly this would be the `event` itself.\n\nIf you would like to pass additional arguments to the function you should use\nthe `{{fn}}` helper.\n\nFor example, in our example case above if you'd like to pass in the post that\nwas being liked when the button is clicked you could do something like:\n\n```hbs\n<button {{on 'click' (fn this.saveLike @post)}}>Like this post!</button>\n```\n\nIn this case, the `saveLike` function will receive two arguments: the click event\nand the value of `@post`.\n\n### Function Context\n\nIn the example above, we used `@action` to ensure that `likePost` is\nproperly bound to the `LikePost` Component, but let's explore what happens if we\nleft out `@action`:\n\n```app/components/like-post.gjs\nimport Component from '@glimmer/component';\n\nexport default class LikePost extends Component {\n saveLike() {\n // ...snip...\n }\n}\n```\n\nIn this example, when the button is clicked `saveLike` will be invoked,\nit will **not** have access to the component instance. In other\nwords, it will have no `this` context, so please make sure your functions\nare bound (via `@action` or other means) before passing into `on`!",
|
|
6910
6947
|
"itemtype": "method",
|
|
6911
6948
|
"name": "on",
|
|
6912
6949
|
"access": "public",
|
|
@@ -6918,7 +6955,7 @@
|
|
|
6918
6955
|
{
|
|
6919
6956
|
"file": "packages/@ember/-internals/glimmer/lib/syntax/in-element.ts",
|
|
6920
6957
|
"line": 5,
|
|
6921
|
-
"description": "The `in-element` helper renders its block content outside of the regular flow,\ninto a DOM element given by its `destinationElement` positional argument.\n\nCommon use cases - often referred to as \"portals\" or \"wormholes\" - are rendering\ndropdowns, modals or tooltips close to the root of the page to bypass CSS overflow\nrules, or to render content to parts of the page that are outside of the control\nof the Ember app itself (e.g. embedded into a static or server rendered HTML page).\n\n```handlebars\n{{#in-element this.destinationElement}}\n <div>Some content</div>\n{{/in-element}}\n```\n\n### Arguments\n\n`{{in-element}}` requires a single positional argument:\n\n- `destinationElement` -- the DOM element to render into. It must exist at the time\nof rendering.\n\nIt also supports an optional named argument:\n\n- `insertBefore` -- by default the DOM element's content is replaced when used as\n`destinationElement`. Passing `null` to `insertBefore` changes the behaviour to\nappend the block content to the end of any existing content. Any other value than\n`null` is currently not supported.\n\n For example:\n\n ```handlebars\n {{#in-element this.destinationElement insertBefore=null}}\n <div>Some content</div>\n {{/in-element}}\n
|
|
6958
|
+
"description": "The `in-element` helper renders its block content outside of the regular flow,\ninto a DOM element given by its `destinationElement` positional argument.\n\nCommon use cases - often referred to as \"portals\" or \"wormholes\" - are rendering\ndropdowns, modals or tooltips close to the root of the page to bypass CSS overflow\nrules, or to render content to parts of the page that are outside of the control\nof the Ember app itself (e.g. embedded into a static or server rendered HTML page).\n\n```handlebars\n{{#in-element this.destinationElement}}\n <div>Some content</div>\n{{/in-element}}\n```\n\n### Arguments\n\n`{{in-element}}` requires a single positional argument:\n\n- `destinationElement` -- the DOM element to render into. It must exist at the time\nof rendering.\n\nIt also supports an optional named argument:\n\n- `insertBefore` -- by default the DOM element's content is replaced when used as\n`destinationElement`. Passing `null` to `insertBefore` changes the behaviour to\nappend the block content to the end of any existing content. Any other value than\n`null` is currently not supported.\n\n For example:\n\n ```handlebars\n {{#in-element this.destinationElement insertBefore=null}}\n <div>Some content</div>\n {{/in-element}}\n ```\n\n`in-element` is built-in and does not need to be imported.",
|
|
6922
6959
|
"itemtype": "method",
|
|
6923
6960
|
"name": "in-element",
|
|
6924
6961
|
"access": "public",
|
|
@@ -6929,7 +6966,7 @@
|
|
|
6929
6966
|
{
|
|
6930
6967
|
"file": "packages/@ember/-internals/glimmer/lib/syntax/let.ts",
|
|
6931
6968
|
"line": 5,
|
|
6932
|
-
"description": "The `let` helper receives one or more positional arguments and yields\nthem out as block params.\n\nThis allows the developer to introduce shorter names for certain computations\nin the template.\n\nThis is especially useful if you are passing properties to a component\nthat receives a lot of options and you want to clean up the invocation.\n\nFor the following example, the template receives a `post` object with\n`content` and `title` properties.\n\nWe are going to call the `my-post` component, passing a title which is\nthe title of the post suffixed with the name of the blog, the content\nof the post, and a series of options defined in-place.\n\n```handlebars\n{{#let\n (concat post.title ' | The Ember.js Blog')\n post.content\n (hash\n theme=\"high-contrast\"\n enableComments=true\n )\n as |title content options|\n}}\n <MyPost @title={{title}} @content={{content}} @options={{options}} />\n{{/let}}\n ```\n
|
|
6969
|
+
"description": "The `let` helper receives one or more positional arguments and yields\nthem out as block params.\n\nThis allows the developer to introduce shorter names for certain computations\nin the template.\n\nThis is especially useful if you are passing properties to a component\nthat receives a lot of options and you want to clean up the invocation.\n\nFor the following example, the template receives a `post` object with\n`content` and `title` properties.\n\nWe are going to call the `my-post` component, passing a title which is\nthe title of the post suffixed with the name of the blog, the content\nof the post, and a series of options defined in-place.\n\n```handlebars\n{{#let\n (concat post.title ' | The Ember.js Blog')\n post.content\n (hash\n theme=\"high-contrast\"\n enableComments=true\n )\n as |title content options|\n}}\n <MyPost @title={{title}} @content={{content}} @options={{options}} />\n{{/let}}\n ```\n\n `let` is built-in and does not need to be imported.",
|
|
6933
6970
|
"itemtype": "method",
|
|
6934
6971
|
"name": "let",
|
|
6935
6972
|
"access": "public",
|
|
@@ -6940,7 +6977,7 @@
|
|
|
6940
6977
|
{
|
|
6941
6978
|
"file": "packages/@ember/-internals/glimmer/lib/syntax/mount.ts",
|
|
6942
6979
|
"line": 17,
|
|
6943
|
-
"description": "The `{{mount}}` helper lets you embed a routeless engine in a template.\nMounting an engine will cause an instance to be booted and its `application`\ntemplate to be rendered.\n\nFor example, the following template mounts the `ember-chat` engine:\n\n```
|
|
6980
|
+
"description": "The `{{mount}}` helper lets you embed a routeless engine in a template.\nMounting an engine will cause an instance to be booted and its `application`\ntemplate to be rendered.\n\nFor example, the following template mounts the `ember-chat` engine:\n\n```app/templates/application.gjs\n{{mount \"ember-chat\"}}\n```\n\nAdditionally, you can also pass in a `model` argument that will be\nset as the engines model. This can be an existing object:\n\n```hbs\n<div>\n {{mount 'admin' model=userSettings}}\n</div>\n```\n\nOr an inline `hash`, and you can even pass components:\n\n```gjs\nimport SignInButton from '../components/sign-in-button';\n<template>\n <div>\n <h1>Application template!</h1>\n {{mount 'admin' model=(hash\n title='Secret Admin'\n signInButton=SignInButton\n )}}\n </div>\n</template>\n```\n \n `mount` is built-in and does not need to be imported.",
|
|
6944
6981
|
"itemtype": "method",
|
|
6945
6982
|
"name": "mount",
|
|
6946
6983
|
"params": [
|
|
@@ -6964,7 +7001,7 @@
|
|
|
6964
7001
|
{
|
|
6965
7002
|
"file": "packages/@ember/-internals/glimmer/lib/syntax/outlet.ts",
|
|
6966
7003
|
"line": 28,
|
|
6967
|
-
"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.
|
|
7004
|
+
"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.gjs` file:\n\n```app/templates/application.gjs\nimport MyHeader from '../components/my-header';\nimport MyFooter from '../components/my-footer';\n \n<template>\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</template>\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.\n\n`outlet` is built-in and does not need to be imported.",
|
|
6968
7005
|
"itemtype": "method",
|
|
6969
7006
|
"name": "outlet",
|
|
6970
7007
|
"access": "public",
|
|
@@ -7159,15 +7196,169 @@
|
|
|
7159
7196
|
{
|
|
7160
7197
|
"file": "packages/@ember/-internals/glimmer/lib/views/outlet.ts",
|
|
7161
7198
|
"line": 114,
|
|
7162
|
-
"class": "
|
|
7199
|
+
"class": "@ember/renderer",
|
|
7163
7200
|
"module": "@ember/template"
|
|
7164
7201
|
},
|
|
7165
7202
|
{
|
|
7166
7203
|
"file": "packages/@ember/-internals/glimmer/lib/views/outlet.ts",
|
|
7167
7204
|
"line": 122,
|
|
7168
|
-
"class": "
|
|
7205
|
+
"class": "@ember/renderer",
|
|
7206
|
+
"module": "@ember/template"
|
|
7207
|
+
},
|
|
7208
|
+
{
|
|
7209
|
+
"file": "packages/@ember/-internals/glimmer/lib/base-renderer.ts",
|
|
7210
|
+
"line": 68,
|
|
7211
|
+
"description": "The interface the `RendererState` needs from a render root. The base\nrenderer only ever creates `ComponentRootState`s; the classic renderer\n(`./renderer`) adds `ClassicRootState` for outlet/classic-component roots.",
|
|
7212
|
+
"class": "@ember/renderer",
|
|
7169
7213
|
"module": "@ember/template"
|
|
7170
7214
|
},
|
|
7215
|
+
{
|
|
7216
|
+
"file": "packages/@ember/-internals/glimmer/lib/base-renderer.ts",
|
|
7217
|
+
"line": 413,
|
|
7218
|
+
"description": "Destroys the render tree and removes all rendered content from the element rendered into",
|
|
7219
|
+
"class": "@ember/renderer",
|
|
7220
|
+
"module": "@ember/renderer"
|
|
7221
|
+
},
|
|
7222
|
+
{
|
|
7223
|
+
"file": "packages/@ember/-internals/glimmer/lib/base-renderer.ts",
|
|
7224
|
+
"line": 421,
|
|
7225
|
+
"description": "The GlimmerRenderResult from the last render. Used to get positional\ninformation (firstNode) when a re-render replaces the content, so\nthat the new content is placed at the same DOM position.",
|
|
7226
|
+
"class": "@ember/renderer",
|
|
7227
|
+
"module": "@ember/renderer"
|
|
7228
|
+
},
|
|
7229
|
+
{
|
|
7230
|
+
"file": "packages/@ember/-internals/glimmer/lib/base-renderer.ts",
|
|
7231
|
+
"line": 437,
|
|
7232
|
+
"description": "Render a component into a DOM element.",
|
|
7233
|
+
"itemtype": "method",
|
|
7234
|
+
"name": "renderComponent",
|
|
7235
|
+
"static": 1,
|
|
7236
|
+
"params": [
|
|
7237
|
+
{
|
|
7238
|
+
"name": "component",
|
|
7239
|
+
"description": "The component to render.",
|
|
7240
|
+
"type": "Object"
|
|
7241
|
+
},
|
|
7242
|
+
{
|
|
7243
|
+
"name": "options",
|
|
7244
|
+
"description": "",
|
|
7245
|
+
"type": "Object",
|
|
7246
|
+
"props": [
|
|
7247
|
+
{
|
|
7248
|
+
"name": "into",
|
|
7249
|
+
"description": "Where to render the component in to.",
|
|
7250
|
+
"type": "Element"
|
|
7251
|
+
},
|
|
7252
|
+
{
|
|
7253
|
+
"name": "owner",
|
|
7254
|
+
"description": "Optionally specify the owner to use. This will be used for injections, and overall cleanup.",
|
|
7255
|
+
"type": "Object",
|
|
7256
|
+
"optional": true
|
|
7257
|
+
},
|
|
7258
|
+
{
|
|
7259
|
+
"name": "env",
|
|
7260
|
+
"description": "Optional renderer configuration",
|
|
7261
|
+
"type": "Object",
|
|
7262
|
+
"optional": true
|
|
7263
|
+
},
|
|
7264
|
+
{
|
|
7265
|
+
"name": "args",
|
|
7266
|
+
"description": "Optionally pass args in to the component. These may be reactive as long as it is an object or object-like",
|
|
7267
|
+
"type": "Object",
|
|
7268
|
+
"optional": true
|
|
7269
|
+
}
|
|
7270
|
+
]
|
|
7271
|
+
}
|
|
7272
|
+
],
|
|
7273
|
+
"access": "public",
|
|
7274
|
+
"tagname": "",
|
|
7275
|
+
"class": "@ember/renderer",
|
|
7276
|
+
"module": "@ember/renderer"
|
|
7277
|
+
},
|
|
7278
|
+
{
|
|
7279
|
+
"file": "packages/@ember/-internals/glimmer/lib/base-renderer.ts",
|
|
7280
|
+
"line": 452,
|
|
7281
|
+
"description": "The component definition to render.\n\nAny component that has had its manager registered is valid.\nFor the component-types that ship with ember, manager registration\ndoes not need to be worried about.",
|
|
7282
|
+
"class": "@ember/renderer",
|
|
7283
|
+
"module": "@ember/renderer"
|
|
7284
|
+
},
|
|
7285
|
+
{
|
|
7286
|
+
"file": "packages/@ember/-internals/glimmer/lib/base-renderer.ts",
|
|
7287
|
+
"line": 466,
|
|
7288
|
+
"description": "The element to render the component in to.",
|
|
7289
|
+
"class": "@ember/renderer",
|
|
7290
|
+
"module": "@ember/renderer"
|
|
7291
|
+
},
|
|
7292
|
+
{
|
|
7293
|
+
"file": "packages/@ember/-internals/glimmer/lib/base-renderer.ts",
|
|
7294
|
+
"line": 471,
|
|
7295
|
+
"description": "Optional owner. Defaults to `{}`, can be any object, but will need to implement the [Owner](https://api.emberjs.com/ember/release/classes/Owner) API for components within this render tree to access services.",
|
|
7296
|
+
"class": "@ember/renderer",
|
|
7297
|
+
"module": "@ember/renderer"
|
|
7298
|
+
},
|
|
7299
|
+
{
|
|
7300
|
+
"file": "packages/@ember/-internals/glimmer/lib/base-renderer.ts",
|
|
7301
|
+
"line": 475,
|
|
7302
|
+
"description": "Optionally configure the rendering environment",
|
|
7303
|
+
"class": "@ember/renderer",
|
|
7304
|
+
"module": "@ember/renderer"
|
|
7305
|
+
},
|
|
7306
|
+
{
|
|
7307
|
+
"file": "packages/@ember/-internals/glimmer/lib/base-renderer.ts",
|
|
7308
|
+
"line": 479,
|
|
7309
|
+
"description": "When false, modifiers will not run.",
|
|
7310
|
+
"class": "@ember/renderer",
|
|
7311
|
+
"module": "@ember/renderer"
|
|
7312
|
+
},
|
|
7313
|
+
{
|
|
7314
|
+
"file": "packages/@ember/-internals/glimmer/lib/base-renderer.ts",
|
|
7315
|
+
"line": 483,
|
|
7316
|
+
"description": "All other options are forwarded to the underlying renderer.\n(its API is currently private and out of scope for this RFC,\n so passing additional things here is also considered private API)",
|
|
7317
|
+
"class": "@ember/renderer",
|
|
7318
|
+
"module": "@ember/renderer"
|
|
7319
|
+
},
|
|
7320
|
+
{
|
|
7321
|
+
"file": "packages/@ember/-internals/glimmer/lib/base-renderer.ts",
|
|
7322
|
+
"line": 491,
|
|
7323
|
+
"description": "These args get passed to the rendered component\n\nIf your args are reactive, re-rendering will happen automatically.",
|
|
7324
|
+
"class": "@ember/renderer",
|
|
7325
|
+
"module": "@ember/renderer"
|
|
7326
|
+
},
|
|
7327
|
+
{
|
|
7328
|
+
"file": "packages/@ember/-internals/glimmer/lib/base-renderer.ts",
|
|
7329
|
+
"line": 500,
|
|
7330
|
+
"description": "SAFETY: we should figure out what we need out of a `document` and narrow the API.\n this exercise should also end up beginning to define what we need for CLI rendering (or to other outputs)",
|
|
7331
|
+
"class": "@ember/renderer",
|
|
7332
|
+
"module": "@ember/renderer"
|
|
7333
|
+
},
|
|
7334
|
+
{
|
|
7335
|
+
"file": "packages/@ember/-internals/glimmer/lib/base-renderer.ts",
|
|
7336
|
+
"line": 521,
|
|
7337
|
+
"description": "Replace all contents, if we've rendered multiple times.\n\nhttps://github.com/emberjs/rfcs/pull/1099/files#diff-2b962105b9083ca84579cdc957f27f49407440f3c5078083fa369ec18cc46da8R365\n\nWe could later add an option to not do this behavior\n\nNOTE: destruction is async",
|
|
7338
|
+
"class": "@ember/renderer",
|
|
7339
|
+
"module": "@ember/renderer"
|
|
7340
|
+
},
|
|
7341
|
+
{
|
|
7342
|
+
"file": "packages/@ember/-internals/glimmer/lib/base-renderer.ts",
|
|
7343
|
+
"line": 532,
|
|
7344
|
+
"description": "We can only replace the inner HTML the first time.\nBecause destruction is async, it won't be safe to\ndo this again, and we'll have to rely on the above destroy.",
|
|
7345
|
+
"class": "@ember/renderer",
|
|
7346
|
+
"module": "@ember/renderer"
|
|
7347
|
+
},
|
|
7348
|
+
{
|
|
7349
|
+
"file": "packages/@ember/-internals/glimmer/lib/base-renderer.ts",
|
|
7350
|
+
"line": 541,
|
|
7351
|
+
"description": "If there's an existing render result with valid bounds, use its\nfirstNode as the nextSibling so that new content is inserted at\nthe same DOM position. This ensures stable ordering when multiple\nrenderComponent calls target the same element and one is re-invoked\n(e.g., due to tracked dependency changes).\n\nThe old content's DOM nodes are still present (destruction is async),\nso firstNode() is a valid position reference. The new content is placed\nBEFORE the old content. When the old content is eventually destroyed\n(async clear of bounds), the new content remains in the correct position.",
|
|
7352
|
+
"class": "@ember/renderer",
|
|
7353
|
+
"module": "@ember/renderer"
|
|
7354
|
+
},
|
|
7355
|
+
{
|
|
7356
|
+
"file": "packages/@ember/-internals/glimmer/lib/base-renderer.ts",
|
|
7357
|
+
"line": 609,
|
|
7358
|
+
"description": "SAFETY: are there consequences for being looser with *this* owner?\n the public API for `owner` is kinda `Partial<InternalOwner>`\n aka: implement only what you need.\n But for actual ember apps, you *need* to implement everything\n an app needs (which will actually change and become less over time)",
|
|
7359
|
+
"class": "@ember/renderer",
|
|
7360
|
+
"module": "@ember/renderer"
|
|
7361
|
+
},
|
|
7171
7362
|
{
|
|
7172
7363
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
7173
7364
|
"line": 41,
|
|
@@ -7189,7 +7380,7 @@
|
|
|
7189
7380
|
}
|
|
7190
7381
|
],
|
|
7191
7382
|
"class": "Component",
|
|
7192
|
-
"module": "@ember/
|
|
7383
|
+
"module": "@ember/renderer"
|
|
7193
7384
|
},
|
|
7194
7385
|
{
|
|
7195
7386
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
@@ -7349,7 +7540,7 @@
|
|
|
7349
7540
|
},
|
|
7350
7541
|
{
|
|
7351
7542
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
7352
|
-
"line":
|
|
7543
|
+
"line": 838,
|
|
7353
7544
|
"description": "Standard CSS class names to apply to the view's outer element. This\nproperty automatically inherits any class names defined by the view's\nsuperclasses as well.",
|
|
7354
7545
|
"itemtype": "property",
|
|
7355
7546
|
"name": "classNames",
|
|
@@ -7362,7 +7553,7 @@
|
|
|
7362
7553
|
},
|
|
7363
7554
|
{
|
|
7364
7555
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
7365
|
-
"line":
|
|
7556
|
+
"line": 850,
|
|
7366
7557
|
"description": "A list of properties of the view to apply as class names. If the property\nis a string value, the value of that string will be applied as a class\nname.\n\n```javascript\n// Applies the 'high' class to the view element\nimport Component from '@ember/component';\nComponent.extend({\n classNameBindings: ['priority'],\n priority: 'high'\n});\n```\n\nIf the value of the property is a Boolean, the name of that property is\nadded as a dasherized class name.\n\n```javascript\n// Applies the 'is-urgent' class to the view element\nimport Component from '@ember/component';\nComponent.extend({\n classNameBindings: ['isUrgent'],\n isUrgent: true\n});\n```\n\nIf you would prefer to use a custom value instead of the dasherized\nproperty name, you can pass a binding like this:\n\n```javascript\n// Applies the 'urgent' class to the view element\nimport Component from '@ember/component';\nComponent.extend({\n classNameBindings: ['isUrgent:urgent'],\n isUrgent: true\n});\n```\n\nIf you would like to specify a class that should only be added when the\nproperty is false, you can declare a binding like this:\n\n```javascript\n// Applies the 'disabled' class to the view element\nimport Component from '@ember/component';\nComponent.extend({\n classNameBindings: ['isEnabled::disabled'],\n isEnabled: false\n});\n```\n\nThis list of properties is inherited from the component's superclasses as well.",
|
|
7367
7558
|
"itemtype": "property",
|
|
7368
7559
|
"name": "classNameBindings",
|
|
@@ -7375,7 +7566,7 @@
|
|
|
7375
7566
|
},
|
|
7376
7567
|
{
|
|
7377
7568
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
7378
|
-
"line":
|
|
7569
|
+
"line": 1057,
|
|
7379
7570
|
"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.",
|
|
7380
7571
|
"itemtype": "method",
|
|
7381
7572
|
"name": "readDOMAttr",
|
|
@@ -7396,7 +7587,7 @@
|
|
|
7396
7587
|
},
|
|
7397
7588
|
{
|
|
7398
7589
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
7399
|
-
"line":
|
|
7590
|
+
"line": 1115,
|
|
7400
7591
|
"description": "A list of properties of the view to apply as attributes. If the property\nis a string value, the value of that string will be applied as the value\nfor an attribute of the property's name.\n\nThe following example creates a tag like `<div priority=\"high\" />`.\n\n```app/components/my-component.js\nimport Component from '@ember/component';\n\nexport default Component.extend({\n attributeBindings: ['priority'],\n priority: 'high'\n });\n```\n\nIf the value of the property is a Boolean, the attribute is treated as\nan HTML Boolean attribute. It will be present if the property is `true`\nand omitted if the property is `false`.\n\nThe following example creates markup like `<div visible />`.\n\n```app/components/my-component.js\nimport Component from '@ember/component';\n\nexport default Component.extend({\n attributeBindings: ['visible'],\n visible: true\n });\n```\n\nIf you would prefer to use a custom value instead of the property name,\nyou can create the same markup as the last example with a binding like\nthis:\n\n```app/components/my-component.js\nimport Component from '@ember/component';\n\nexport default Component.extend({\n attributeBindings: ['isVisible:visible'],\n isVisible: true\n });\n```\n\nThis list of attributes is inherited from the component's superclasses,\nas well.",
|
|
7401
7592
|
"itemtype": "property",
|
|
7402
7593
|
"name": "attributeBindings",
|
|
@@ -7409,7 +7600,7 @@
|
|
|
7409
7600
|
},
|
|
7410
7601
|
{
|
|
7411
7602
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
7412
|
-
"line":
|
|
7603
|
+
"line": 1169,
|
|
7413
7604
|
"description": "Enables components to take a list of parameters as arguments.\n For example, a component that takes two parameters with the names\n `name` and `age`:\n\n ```app/components/my-component.js\n import Component from '@ember/component';\n\n export default class MyComponent extends Component {\n static positionalParams = ['name', 'age'];\n }\n ```\n\n It can then be invoked like this:\n\n ```hbs\n {{my-component \"John\" 38}}\n ```\n\n The parameters can be referred to just like named parameters:\n\n ```hbs\n Name: {{name}}, Age: {{age}}.\n ```\n\n Using a string instead of an array allows for an arbitrary number of\n parameters:\n\n ```app/components/my-component.js\n import Component from '@ember/component';\n\n export default class MyComponent extends Component {\n static positionalParams = 'names';\n }\n ```\n\n It can then be invoked like this:\n\n ```hbs\n {{my-component \"John\" \"Michael\" \"Scott\"}}\n ```\n The parameters can then be referred to by enumerating over the list:\n\n ```hbs\n {{#each names as |name|}}{{name}}{{/each}}\n ```",
|
|
7414
7605
|
"static": 1,
|
|
7415
7606
|
"access": "public",
|
|
@@ -7422,7 +7613,7 @@
|
|
|
7422
7613
|
},
|
|
7423
7614
|
{
|
|
7424
7615
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
7425
|
-
"line":
|
|
7616
|
+
"line": 1274,
|
|
7426
7617
|
"description": "Layout can be used to wrap content in a component.",
|
|
7427
7618
|
"itemtype": "property",
|
|
7428
7619
|
"name": "layout",
|
|
@@ -7434,7 +7625,7 @@
|
|
|
7434
7625
|
},
|
|
7435
7626
|
{
|
|
7436
7627
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
7437
|
-
"line":
|
|
7628
|
+
"line": 1282,
|
|
7438
7629
|
"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).",
|
|
7439
7630
|
"itemtype": "property",
|
|
7440
7631
|
"name": "layoutName",
|
|
@@ -7447,7 +7638,7 @@
|
|
|
7447
7638
|
},
|
|
7448
7639
|
{
|
|
7449
7640
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
7450
|
-
"line":
|
|
7641
|
+
"line": 1293,
|
|
7451
7642
|
"description": "The WAI-ARIA role of the control represented by this view. For example, a\n button may have a role of type 'button', or a pane may have a role of\n type 'alertdialog'. This property is used by assistive software to help\n visually challenged users navigate rich web applications.\n\n The 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)",
|
|
7452
7643
|
"itemtype": "property",
|
|
7453
7644
|
"name": "ariaRole",
|
|
@@ -7460,7 +7651,7 @@
|
|
|
7460
7651
|
},
|
|
7461
7652
|
{
|
|
7462
7653
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
7463
|
-
"line":
|
|
7654
|
+
"line": 1309,
|
|
7464
7655
|
"description": "Array of child views. You should never edit this array directly.",
|
|
7465
7656
|
"itemtype": "property",
|
|
7466
7657
|
"name": "childViews",
|
|
@@ -7473,7 +7664,7 @@
|
|
|
7473
7664
|
},
|
|
7474
7665
|
{
|
|
7475
7666
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
7476
|
-
"line":
|
|
7667
|
+
"line": 1349,
|
|
7477
7668
|
"description": "Return the nearest ancestor that is an instance of the provided\nclass or mixin.",
|
|
7478
7669
|
"itemtype": "method",
|
|
7479
7670
|
"name": "nearestOfType",
|
|
@@ -7496,7 +7687,7 @@
|
|
|
7496
7687
|
},
|
|
7497
7688
|
{
|
|
7498
7689
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
7499
|
-
"line":
|
|
7690
|
+
"line": 1373,
|
|
7500
7691
|
"description": "Return the nearest ancestor that has a given property.",
|
|
7501
7692
|
"itemtype": "method",
|
|
7502
7693
|
"name": "nearestWithProperty",
|
|
@@ -7519,7 +7710,7 @@
|
|
|
7519
7710
|
},
|
|
7520
7711
|
{
|
|
7521
7712
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
7522
|
-
"line":
|
|
7713
|
+
"line": 1395,
|
|
7523
7714
|
"description": "Renders the view again. This will work regardless of whether the\nview is already in the DOM or not. If the view is in the DOM, the\nrendering process will be deferred to give bindings a chance\nto synchronize.\n\nIf children were added during the rendering process using `appendChild`,\n`rerender` will remove them, because they will be added again\nif needed by the next `render`.\n\nIn general, if the display of your view changes, you should modify\nthe DOM element directly instead of manually calling `rerender`, which can\nbe slow.",
|
|
7524
7715
|
"itemtype": "method",
|
|
7525
7716
|
"name": "rerender",
|
|
@@ -7530,7 +7721,7 @@
|
|
|
7530
7721
|
},
|
|
7531
7722
|
{
|
|
7532
7723
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
7533
|
-
"line":
|
|
7724
|
+
"line": 1420,
|
|
7534
7725
|
"description": "Returns the current DOM element for the view.",
|
|
7535
7726
|
"itemtype": "property",
|
|
7536
7727
|
"name": "element",
|
|
@@ -7542,7 +7733,7 @@
|
|
|
7542
7733
|
},
|
|
7543
7734
|
{
|
|
7544
7735
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
7545
|
-
"line":
|
|
7736
|
+
"line": 1433,
|
|
7546
7737
|
"description": "Appends the view's element to the specified parent element.\n\nNote that this method just schedules the view to be appended; the DOM\nelement will not be appended to the given element until all bindings have\nfinished synchronizing.\n\nThis is not typically a function that you will need to call directly when\nbuilding your application. If you do need to use `appendTo`, be sure that\nthe target element you are providing is associated with an `Application`\nand does not have an ancestor element that is associated with an Ember view.",
|
|
7547
7738
|
"itemtype": "method",
|
|
7548
7739
|
"name": "appendTo",
|
|
@@ -7564,7 +7755,7 @@
|
|
|
7564
7755
|
},
|
|
7565
7756
|
{
|
|
7566
7757
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
7567
|
-
"line":
|
|
7758
|
+
"line": 1498,
|
|
7568
7759
|
"description": "Appends the view's element to the document body. If the view does\nnot have an HTML representation yet\nthe element will be generated automatically.\n\nIf your application uses the `rootElement` property, you must append\nthe view within that element. Rendering views outside of the `rootElement`\nis not supported.\n\nNote that this method just schedules the view to be appended; the DOM\nelement will not be appended to the document body until all bindings have\nfinished synchronizing.",
|
|
7569
7760
|
"itemtype": "method",
|
|
7570
7761
|
"name": "append",
|
|
@@ -7579,7 +7770,7 @@
|
|
|
7579
7770
|
},
|
|
7580
7771
|
{
|
|
7581
7772
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
7582
|
-
"line":
|
|
7773
|
+
"line": 1519,
|
|
7583
7774
|
"description": "The HTML `id` of the view'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\nIf not manually set a default value will be provided by the framework.\n\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```app/components/my-component.js\nimport Component from '@ember/component';\n\nexport default Component.extend({\n init() {\n this._super(...arguments);\n let index = this.get('index');\n this.set('elementId', 'component-id' + index);\n }\n });\n```",
|
|
7584
7775
|
"itemtype": "property",
|
|
7585
7776
|
"name": "elementId",
|
|
@@ -7591,7 +7782,7 @@
|
|
|
7591
7782
|
},
|
|
7592
7783
|
{
|
|
7593
7784
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
7594
|
-
"line":
|
|
7785
|
+
"line": 1552,
|
|
7595
7786
|
"description": "Called when a view is going to insert an element into the DOM.",
|
|
7596
7787
|
"itemtype": "event",
|
|
7597
7788
|
"name": "willInsertElement",
|
|
@@ -7602,7 +7793,7 @@
|
|
|
7602
7793
|
},
|
|
7603
7794
|
{
|
|
7604
7795
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
7605
|
-
"line":
|
|
7796
|
+
"line": 1562,
|
|
7606
7797
|
"description": "Called when the element of the view has been inserted into the DOM.\nOverride this function to do any set up that requires an element\nin the document body.\n\nWhen a view has children, didInsertElement will be called on the\nchild view(s) first and on itself afterwards.",
|
|
7607
7798
|
"itemtype": "event",
|
|
7608
7799
|
"name": "didInsertElement",
|
|
@@ -7613,7 +7804,7 @@
|
|
|
7613
7804
|
},
|
|
7614
7805
|
{
|
|
7615
7806
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
7616
|
-
"line":
|
|
7807
|
+
"line": 1577,
|
|
7617
7808
|
"description": "Called when the view is about to rerender, but before anything has\nbeen torn down. This is a good opportunity to tear down any manual\nobservers you have installed based on the DOM state",
|
|
7618
7809
|
"itemtype": "event",
|
|
7619
7810
|
"name": "willClearRender",
|
|
@@ -7624,7 +7815,7 @@
|
|
|
7624
7815
|
},
|
|
7625
7816
|
{
|
|
7626
7817
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
7627
|
-
"line":
|
|
7818
|
+
"line": 1589,
|
|
7628
7819
|
"description": "You must call `destroy` on a view to destroy the view (and all of its\nchild views). This will remove the view from any parent node, then make\nsure that the DOM element managed by the view can be released by the\nmemory manager.",
|
|
7629
7820
|
"itemtype": "method",
|
|
7630
7821
|
"name": "destroy",
|
|
@@ -7635,7 +7826,7 @@
|
|
|
7635
7826
|
},
|
|
7636
7827
|
{
|
|
7637
7828
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
7638
|
-
"line":
|
|
7829
|
+
"line": 1604,
|
|
7639
7830
|
"description": "Called when the element of the view is going to be destroyed. Override\nthis function to do any teardown that requires an element, like removing\nevent listeners.\n\nPlease note: any property changes made during this event will have no\neffect on object observers.",
|
|
7640
7831
|
"itemtype": "event",
|
|
7641
7832
|
"name": "willDestroyElement",
|
|
@@ -7646,7 +7837,7 @@
|
|
|
7646
7837
|
},
|
|
7647
7838
|
{
|
|
7648
7839
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
7649
|
-
"line":
|
|
7840
|
+
"line": 1619,
|
|
7650
7841
|
"description": "Called after the element of the view is destroyed.",
|
|
7651
7842
|
"itemtype": "event",
|
|
7652
7843
|
"name": "willDestroyElement",
|
|
@@ -7657,7 +7848,7 @@
|
|
|
7657
7848
|
},
|
|
7658
7849
|
{
|
|
7659
7850
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
7660
|
-
"line":
|
|
7851
|
+
"line": 1629,
|
|
7661
7852
|
"description": "Called when the parentView property has changed.",
|
|
7662
7853
|
"itemtype": "event",
|
|
7663
7854
|
"name": "parentViewDidChange",
|
|
@@ -7668,7 +7859,7 @@
|
|
|
7668
7859
|
},
|
|
7669
7860
|
{
|
|
7670
7861
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
7671
|
-
"line":
|
|
7862
|
+
"line": 1643,
|
|
7672
7863
|
"description": "Tag name for the view's outer element. The tag name is only used when an\nelement is first created. If you change the `tagName` for an element, you\nmust destroy and recreate the view element.\n\nBy default, the render buffer will use a `<div>` tag for views.\n\nIf the tagName is `''`, the view will be tagless, with no outer element.\nComponent properties that depend on the presence of an outer element, such\nas `classNameBindings` and `attributeBindings`, do not work with tagless\ncomponents. Tagless components cannot implement methods to handle events,\nand their `element` property has a `null` value.",
|
|
7673
7864
|
"itemtype": "property",
|
|
7674
7865
|
"name": "tagName",
|
|
@@ -7681,7 +7872,7 @@
|
|
|
7681
7872
|
},
|
|
7682
7873
|
{
|
|
7683
7874
|
"file": "packages/@ember/-internals/glimmer/lib/component.ts",
|
|
7684
|
-
"line":
|
|
7875
|
+
"line": 1670,
|
|
7685
7876
|
"description": "Handle events from `EventDispatcher`",
|
|
7686
7877
|
"itemtype": "method",
|
|
7687
7878
|
"name": "handleEvent",
|
|
@@ -7705,7 +7896,7 @@
|
|
|
7705
7896
|
{
|
|
7706
7897
|
"file": "packages/@ember/-internals/glimmer/lib/glimmer-tracking-docs.ts",
|
|
7707
7898
|
"line": 22,
|
|
7708
|
-
"description": "Marks a property as tracked. By default, values that are rendered in Ember app\ntemplates are _static_, meaning that updates to them won't cause the\napplication to rerender. Marking a property as tracked means that when that\nproperty changes, any templates that used that property, directly or\nindirectly, will rerender. For instance, consider this component:\n\n```
|
|
7899
|
+
"description": "Marks a property as tracked. By default, values that are rendered in Ember app\ntemplates are _static_, meaning that updates to them won't cause the\napplication to rerender. Marking a property as tracked means that when that\nproperty changes, any templates that used that property, directly or\nindirectly, will rerender. For instance, consider this component:\n\n```gjs\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\n\nexport default class CounterComponent extends Component {\n @tracked count = 0;\n\n get timesTen() {\n return this.count * 10;\n }\n\n @action\n plusOne() {\n this.count += 1;\n }\n \n <template>\n <div>Count: {{this.count}}</div>\n <div>Times Ten: {{this.timesTen}}</div>\n <div>\n <button {{on \"click\" this.plusOne}}>\n Plus One\n </button>\n </div>\n </template>\n}\n```\n\nBoth the `{{this.count}}` and the `{{this.timesTen}}` properties in the\ntemplate will update whenever the button is clicked. Any tracked properties\nthat are used in any way to calculate a value that is used in the template\nwill cause a rerender when updated - this includes through method calls and\nother means:\n\n```gjs\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\n\nclass Entry {\n @tracked name;\n @tracked phoneNumber;\n\n constructor(name, phoneNumber) {\n this.name = name;\n this.phoneNumber = phoneNumber;\n }\n}\n\nexport default class PhoneBookComponent extends Component {\n entries = [\n new Entry('Pizza Palace', 5551234),\n new Entry('1st Street Cleaners', 5554321),\n new Entry('Plants R Us', 5552468),\n ];\n\n // Any usage of this property will update whenever any of the names in the\n // entries arrays are updated\n get names() {\n return this.entries.map(e => e.name);\n }\n\n // Any usage of this property will update whenever any of the numbers in the\n // entries arrays are updated\n get numbers() {\n return this.getFormattedNumbers();\n }\n\n getFormattedNumbers() {\n return this.entries\n .map(e => e.phoneNumber)\n .map(number => {\n let numberString = '' + number;\n\n return numberString.slice(0, 3) + '-' + numberString.slice(3);\n });\n }\n}\n```\n\nIt's important to note that setting tracked properties will always trigger an\nupdate, even if the property is set to the same value as it was before.\n\n```js\nlet entry = new Entry('Pizza Palace', 5551234);\n\n// if entry was used when rendering, this would cause a rerender, even though\n// the name is being set to the same value as it was before\nentry.name = entry.name;\n```\n\n`tracked` can also be used with the classic Ember object model in a similar\nmanner to classic computed properties:\n\n```javascript\nimport EmberObject from '@ember/object';\nimport { tracked } from '@glimmer/tracking';\n\nconst Entry = EmberObject.extend({\n name: tracked(),\n phoneNumber: tracked()\n});\n```\n\nOften this is unnecessary, but to ensure robust auto-tracking behavior it is\nadvisable to mark tracked state appropriately wherever possible.\n\nThis form of `tracked` also accepts an optional configuration object\ncontaining either an initial `value` or an `initializer` function (but not\nboth).\n\n```javascript\nimport EmberObject from '@ember/object';\nimport { tracked } from '@glimmer/tracking';\n\nconst Entry = EmberObject.extend({\n name: tracked({ value: 'Zoey' }),\n favoriteSongs: tracked({\n initializer: () => ['Raspberry Beret', 'Time After Time']\n })\n});\n```",
|
|
7709
7900
|
"itemtype": "method",
|
|
7710
7901
|
"name": "tracked",
|
|
7711
7902
|
"static": 1,
|
|
@@ -7721,234 +7912,101 @@
|
|
|
7721
7912
|
"itemtype": "method",
|
|
7722
7913
|
"name": "cached",
|
|
7723
7914
|
"static": 1,
|
|
7724
|
-
"access": "public",
|
|
7725
|
-
"tagname": "",
|
|
7726
|
-
"class": "@glimmer/tracking",
|
|
7727
|
-
"module": "@glimmer/tracking"
|
|
7728
|
-
},
|
|
7729
|
-
{
|
|
7730
|
-
"file": "packages/@ember/-internals/glimmer/lib/helper.ts",
|
|
7731
|
-
"line": 105,
|
|
7732
|
-
"description": "Override this function when writing a class-based helper.",
|
|
7733
|
-
"itemtype": "method",
|
|
7734
|
-
"name": "compute",
|
|
7735
|
-
"params": [
|
|
7736
|
-
{
|
|
7737
|
-
"name": "positional",
|
|
7738
|
-
"description": "The positional arguments to the helper",
|
|
7739
|
-
"type": "Array"
|
|
7740
|
-
},
|
|
7741
|
-
{
|
|
7742
|
-
"name": "named",
|
|
7743
|
-
"description": "The named arguments to the helper",
|
|
7744
|
-
"type": "Object"
|
|
7745
|
-
}
|
|
7746
|
-
],
|
|
7747
|
-
"access": "public",
|
|
7748
|
-
"tagname": "",
|
|
7749
|
-
"since": "1.13.0",
|
|
7750
|
-
"class": "Helper",
|
|
7751
|
-
"module": "@ember/component"
|
|
7752
|
-
},
|
|
7753
|
-
{
|
|
7754
|
-
"file": "packages/@ember/-internals/glimmer/lib/helper.ts",
|
|
7755
|
-
"line": 123,
|
|
7756
|
-
"class": "Helper",
|
|
7757
|
-
"module": "@ember/component"
|
|
7758
|
-
},
|
|
7759
|
-
{
|
|
7760
|
-
"file": "packages/@ember/-internals/glimmer/lib/helper.ts",
|
|
7761
|
-
"line": 142,
|
|
7762
|
-
"description": "On a class-based helper, it may be useful to force a recomputation of that\nhelpers value. This is akin to `rerender` on a component.\n\nIn most cases, `recompute` is not needed because accessing tracked\nproperties in `compute` will automatically re-run the helper when\nthose properties change. Use `recompute` only when you need to\ntrigger a recomputation imperatively, for example in response to an\nexternal event:\n\n```app/helpers/current-time.js\nimport Helper from '@ember/component/helper';\n\nexport default class CurrentTimeHelper extends Helper {\n interval = null;\n\n compute() {\n return new Date().toLocaleTimeString();\n }\n\n constructor() {\n super(...arguments);\n this.interval = setInterval(() => this.recompute(), 1000);\n }\n\n willDestroy() {\n super.willDestroy();\n clearInterval(this.interval);\n }\n}\n```",
|
|
7763
|
-
"itemtype": "method",
|
|
7764
|
-
"name": "recompute",
|
|
7765
|
-
"access": "public",
|
|
7766
|
-
"tagname": "",
|
|
7767
|
-
"since": "1.13.0",
|
|
7768
|
-
"class": "Helper",
|
|
7769
|
-
"module": "@ember/component"
|
|
7770
|
-
},
|
|
7771
|
-
{
|
|
7772
|
-
"file": "packages/@ember/-internals/glimmer/lib/helper.ts",
|
|
7773
|
-
"line": 313,
|
|
7774
|
-
"description": "The type of a function-based helper.",
|
|
7775
|
-
"note": "This is *not* user-constructible: it is exported only so that the type\n returned by the `helper` function can be named (and indeed can be exported\n like `export default helper(...)` safely).",
|
|
7776
|
-
"class": "Helper",
|
|
7777
|
-
"module": "@ember/component"
|
|
7778
|
-
},
|
|
7779
|
-
{
|
|
7780
|
-
"file": "packages/@ember/-internals/glimmer/lib/helper.ts",
|
|
7781
|
-
"line": 344,
|
|
7782
|
-
"description": "In many cases it is not necessary to use the full `Helper` class.\nThe `helper` method create pure-function helpers without instances.\nFor example:\n\n```app/helpers/format-currency.js\nimport { helper } from '@ember/component/helper';\n\nexport default helper(function([cents], {currency}) {\n return `${currency}${cents * 0.01}`;\n});\n```",
|
|
7783
|
-
"static": 1,
|
|
7784
|
-
"params": [
|
|
7785
|
-
{
|
|
7786
|
-
"name": "helper",
|
|
7787
|
-
"description": "The helper function",
|
|
7788
|
-
"type": "Function"
|
|
7789
|
-
}
|
|
7790
|
-
],
|
|
7791
|
-
"itemtype": "method",
|
|
7792
|
-
"name": "helper",
|
|
7793
|
-
"access": "public",
|
|
7794
|
-
"tagname": "",
|
|
7795
|
-
"since": "1.13.0",
|
|
7796
|
-
"class": "@ember/component/helper",
|
|
7797
|
-
"module": "@ember/component"
|
|
7798
|
-
},
|
|
7799
|
-
{
|
|
7800
|
-
"file": "packages/@ember/-internals/glimmer/lib/renderer.ts",
|
|
7801
|
-
"line": 546,
|
|
7802
|
-
"description": "Destroys the render tree and removes all rendered content from the element rendered into",
|
|
7803
|
-
"class": "@ember/renderer",
|
|
7804
|
-
"module": "@ember/renderer"
|
|
7805
|
-
},
|
|
7806
|
-
{
|
|
7807
|
-
"file": "packages/@ember/-internals/glimmer/lib/renderer.ts",
|
|
7808
|
-
"line": 554,
|
|
7809
|
-
"description": "The GlimmerRenderResult from the last render. Used to get positional\ninformation (firstNode) when a re-render replaces the content, so\nthat the new content is placed at the same DOM position.",
|
|
7810
|
-
"class": "@ember/renderer",
|
|
7811
|
-
"module": "@ember/renderer"
|
|
7812
|
-
},
|
|
7813
|
-
{
|
|
7814
|
-
"file": "packages/@ember/-internals/glimmer/lib/renderer.ts",
|
|
7815
|
-
"line": 570,
|
|
7816
|
-
"description": "Render a component into a DOM element.",
|
|
7817
|
-
"itemtype": "method",
|
|
7818
|
-
"name": "renderComponent",
|
|
7819
|
-
"static": 1,
|
|
7820
|
-
"params": [
|
|
7821
|
-
{
|
|
7822
|
-
"name": "component",
|
|
7823
|
-
"description": "The component to render.",
|
|
7824
|
-
"type": "Object"
|
|
7825
|
-
},
|
|
7826
|
-
{
|
|
7827
|
-
"name": "options",
|
|
7828
|
-
"description": "",
|
|
7829
|
-
"type": "Object",
|
|
7830
|
-
"props": [
|
|
7831
|
-
{
|
|
7832
|
-
"name": "into",
|
|
7833
|
-
"description": "Where to render the component in to.",
|
|
7834
|
-
"type": "Element"
|
|
7835
|
-
},
|
|
7836
|
-
{
|
|
7837
|
-
"name": "owner",
|
|
7838
|
-
"description": "Optionally specify the owner to use. This will be used for injections, and overall cleanup.",
|
|
7839
|
-
"type": "Object",
|
|
7840
|
-
"optional": true
|
|
7841
|
-
},
|
|
7842
|
-
{
|
|
7843
|
-
"name": "env",
|
|
7844
|
-
"description": "Optional renderer configuration",
|
|
7845
|
-
"type": "Object",
|
|
7846
|
-
"optional": true
|
|
7847
|
-
},
|
|
7848
|
-
{
|
|
7849
|
-
"name": "args",
|
|
7850
|
-
"description": "Optionally pass args in to the component. These may be reactive as long as it is an object or object-like",
|
|
7851
|
-
"type": "Object",
|
|
7852
|
-
"optional": true
|
|
7853
|
-
}
|
|
7854
|
-
]
|
|
7855
|
-
}
|
|
7856
|
-
],
|
|
7857
|
-
"access": "public",
|
|
7858
|
-
"tagname": "",
|
|
7859
|
-
"class": "@ember/renderer",
|
|
7860
|
-
"module": "@ember/renderer"
|
|
7861
|
-
},
|
|
7862
|
-
{
|
|
7863
|
-
"file": "packages/@ember/-internals/glimmer/lib/renderer.ts",
|
|
7864
|
-
"line": 585,
|
|
7865
|
-
"description": "The component definition to render.\n\nAny component that has had its manager registered is valid.\nFor the component-types that ship with ember, manager registration\ndoes not need to be worried about.",
|
|
7866
|
-
"class": "@ember/renderer",
|
|
7867
|
-
"module": "@ember/renderer"
|
|
7868
|
-
},
|
|
7869
|
-
{
|
|
7870
|
-
"file": "packages/@ember/-internals/glimmer/lib/renderer.ts",
|
|
7871
|
-
"line": 599,
|
|
7872
|
-
"description": "The element to render the component in to.",
|
|
7873
|
-
"class": "@ember/renderer",
|
|
7874
|
-
"module": "@ember/renderer"
|
|
7875
|
-
},
|
|
7876
|
-
{
|
|
7877
|
-
"file": "packages/@ember/-internals/glimmer/lib/renderer.ts",
|
|
7878
|
-
"line": 604,
|
|
7879
|
-
"description": "Optional owner. Defaults to `{}`, can be any object, but will need to implement the [Owner](https://api.emberjs.com/ember/release/classes/Owner) API for components within this render tree to access services.",
|
|
7880
|
-
"class": "@ember/renderer",
|
|
7881
|
-
"module": "@ember/renderer"
|
|
7882
|
-
},
|
|
7883
|
-
{
|
|
7884
|
-
"file": "packages/@ember/-internals/glimmer/lib/renderer.ts",
|
|
7885
|
-
"line": 608,
|
|
7886
|
-
"description": "Optionally configure the rendering environment",
|
|
7887
|
-
"class": "@ember/renderer",
|
|
7888
|
-
"module": "@ember/renderer"
|
|
7889
|
-
},
|
|
7890
|
-
{
|
|
7891
|
-
"file": "packages/@ember/-internals/glimmer/lib/renderer.ts",
|
|
7892
|
-
"line": 612,
|
|
7893
|
-
"description": "When false, modifiers will not run.",
|
|
7894
|
-
"class": "@ember/renderer",
|
|
7895
|
-
"module": "@ember/renderer"
|
|
7915
|
+
"access": "public",
|
|
7916
|
+
"tagname": "",
|
|
7917
|
+
"class": "@glimmer/tracking",
|
|
7918
|
+
"module": "@glimmer/tracking"
|
|
7896
7919
|
},
|
|
7897
7920
|
{
|
|
7898
|
-
"file": "packages/@ember/-internals/glimmer/lib/
|
|
7899
|
-
"line":
|
|
7900
|
-
"description": "
|
|
7901
|
-
"class": "
|
|
7902
|
-
"module": "@
|
|
7921
|
+
"file": "packages/@ember/-internals/glimmer/lib/helper-brand.ts",
|
|
7922
|
+
"line": 1,
|
|
7923
|
+
"description": "The brand for classic (class-based) helpers lives in its own module so that\ncode which only needs to *detect* classic helpers (e.g. the resolver) does\nnot have to import the classic `Helper` base class (and with it the classic\nobject model: `EmberObject`, `Mixin`, meta, etc.).",
|
|
7924
|
+
"class": "Helper",
|
|
7925
|
+
"module": "@glimmer/tracking"
|
|
7903
7926
|
},
|
|
7904
7927
|
{
|
|
7905
|
-
"file": "packages/@ember/-internals/glimmer/lib/
|
|
7906
|
-
"line":
|
|
7907
|
-
"description": "
|
|
7908
|
-
"
|
|
7909
|
-
"
|
|
7928
|
+
"file": "packages/@ember/-internals/glimmer/lib/helper.ts",
|
|
7929
|
+
"line": 117,
|
|
7930
|
+
"description": "Override this function when writing a class-based helper.",
|
|
7931
|
+
"itemtype": "method",
|
|
7932
|
+
"name": "compute",
|
|
7933
|
+
"params": [
|
|
7934
|
+
{
|
|
7935
|
+
"name": "positional",
|
|
7936
|
+
"description": "The positional arguments to the helper",
|
|
7937
|
+
"type": "Array"
|
|
7938
|
+
},
|
|
7939
|
+
{
|
|
7940
|
+
"name": "named",
|
|
7941
|
+
"description": "The named arguments to the helper",
|
|
7942
|
+
"type": "Object"
|
|
7943
|
+
}
|
|
7944
|
+
],
|
|
7945
|
+
"access": "public",
|
|
7946
|
+
"tagname": "",
|
|
7947
|
+
"since": "1.13.0",
|
|
7948
|
+
"class": "Helper",
|
|
7949
|
+
"module": "@ember/component"
|
|
7910
7950
|
},
|
|
7911
7951
|
{
|
|
7912
|
-
"file": "packages/@ember/-internals/glimmer/lib/
|
|
7913
|
-
"line":
|
|
7914
|
-
"
|
|
7915
|
-
"
|
|
7916
|
-
"module": "@ember/renderer"
|
|
7952
|
+
"file": "packages/@ember/-internals/glimmer/lib/helper.ts",
|
|
7953
|
+
"line": 135,
|
|
7954
|
+
"class": "Helper",
|
|
7955
|
+
"module": "@ember/component"
|
|
7917
7956
|
},
|
|
7918
7957
|
{
|
|
7919
|
-
"file": "packages/@ember/-internals/glimmer/lib/
|
|
7920
|
-
"line":
|
|
7921
|
-
"description": "
|
|
7922
|
-
"
|
|
7923
|
-
"
|
|
7958
|
+
"file": "packages/@ember/-internals/glimmer/lib/helper.ts",
|
|
7959
|
+
"line": 154,
|
|
7960
|
+
"description": "On a class-based helper, it may be useful to force a recomputation of that\nhelpers value. This is akin to `rerender` on a component.\n\nIn most cases, `recompute` is not needed because accessing tracked\nproperties in `compute` will automatically re-run the helper when\nthose properties change. Use `recompute` only when you need to\ntrigger a recomputation imperatively, for example in response to an\nexternal event:\n\n```app/helpers/current-time.js\nimport Helper from '@ember/component/helper';\n\nexport default class CurrentTimeHelper extends Helper {\n interval = null;\n\n compute() {\n return new Date().toLocaleTimeString();\n }\n\n constructor() {\n super(...arguments);\n this.interval = setInterval(() => this.recompute(), 1000);\n }\n\n willDestroy() {\n super.willDestroy();\n clearInterval(this.interval);\n }\n}\n```",
|
|
7961
|
+
"itemtype": "method",
|
|
7962
|
+
"name": "recompute",
|
|
7963
|
+
"access": "public",
|
|
7964
|
+
"tagname": "",
|
|
7965
|
+
"since": "1.13.0",
|
|
7966
|
+
"class": "Helper",
|
|
7967
|
+
"module": "@ember/component"
|
|
7924
7968
|
},
|
|
7925
7969
|
{
|
|
7926
|
-
"file": "packages/@ember/-internals/glimmer/lib/
|
|
7927
|
-
"line":
|
|
7928
|
-
"description": "
|
|
7929
|
-
"
|
|
7930
|
-
"
|
|
7970
|
+
"file": "packages/@ember/-internals/glimmer/lib/helper.ts",
|
|
7971
|
+
"line": 319,
|
|
7972
|
+
"description": "The type of a function-based helper.",
|
|
7973
|
+
"note": "This is *not* user-constructible: it is exported only so that the type\n returned by the `helper` function can be named (and indeed can be exported\n like `export default helper(...)` safely).",
|
|
7974
|
+
"class": "Helper",
|
|
7975
|
+
"module": "@ember/component"
|
|
7931
7976
|
},
|
|
7932
7977
|
{
|
|
7933
|
-
"file": "packages/@ember/-internals/glimmer/lib/
|
|
7934
|
-
"line":
|
|
7935
|
-
"description": "
|
|
7936
|
-
"
|
|
7937
|
-
"
|
|
7978
|
+
"file": "packages/@ember/-internals/glimmer/lib/helper.ts",
|
|
7979
|
+
"line": 350,
|
|
7980
|
+
"description": "In many cases it is not necessary to use the full `Helper` class.\nThe `helper` method create pure-function helpers without instances.\nFor example:\n\n```app/helpers/format-currency.js\nimport { helper } from '@ember/component/helper';\n\nexport default helper(function([cents], {currency}) {\n return `${currency}${cents * 0.01}`;\n});\n```",
|
|
7981
|
+
"static": 1,
|
|
7982
|
+
"params": [
|
|
7983
|
+
{
|
|
7984
|
+
"name": "helper",
|
|
7985
|
+
"description": "The helper function",
|
|
7986
|
+
"type": "Function"
|
|
7987
|
+
}
|
|
7988
|
+
],
|
|
7989
|
+
"itemtype": "method",
|
|
7990
|
+
"name": "helper",
|
|
7991
|
+
"access": "public",
|
|
7992
|
+
"tagname": "",
|
|
7993
|
+
"since": "1.13.0",
|
|
7994
|
+
"class": "@ember/component/helper",
|
|
7995
|
+
"module": "@ember/component"
|
|
7938
7996
|
},
|
|
7939
7997
|
{
|
|
7940
|
-
"file": "packages/@ember/-internals/glimmer/lib/
|
|
7941
|
-
"line":
|
|
7942
|
-
"description": "
|
|
7943
|
-
"class": "
|
|
7944
|
-
"module": "@ember/
|
|
7998
|
+
"file": "packages/@ember/-internals/glimmer/lib/router-resolver.ts",
|
|
7999
|
+
"line": 13,
|
|
8000
|
+
"description": "The resolver used by the classic application `Renderer`. It extends the\nshared `ResolverImpl` with the keywords that require the router and engine\ninfrastructure (`{{outlet}}` and `{{mount}}`). Keeping these out of the\nbase resolver means renderers that have no router (e.g. `renderComponent`)\ndo not pull the outlet/engine machinery into the build.",
|
|
8001
|
+
"class": "Ember.Templates.helpers",
|
|
8002
|
+
"module": "@ember/component"
|
|
7945
8003
|
},
|
|
7946
8004
|
{
|
|
7947
8005
|
"file": "packages/@ember/-internals/glimmer/tests/integration/components/render-component-test.ts",
|
|
7948
8006
|
"line": 445,
|
|
7949
8007
|
"description": "Test skipped because when an error occurs,\nwe mess up the cache used by renderComponent.",
|
|
7950
8008
|
"class": "Ember.Templates.helpers",
|
|
7951
|
-
"module": "@ember/
|
|
8009
|
+
"module": "@ember/component"
|
|
7952
8010
|
},
|
|
7953
8011
|
{
|
|
7954
8012
|
"file": "packages/@ember/-internals/glimmer/tests/integration/components/render-component-test.ts",
|
|
@@ -7960,28 +8018,28 @@
|
|
|
7960
8018
|
"due\n to being destroyed."
|
|
7961
8019
|
],
|
|
7962
8020
|
"class": "Ember.Templates.helpers",
|
|
7963
|
-
"module": "@ember/
|
|
8021
|
+
"module": "@ember/component"
|
|
7964
8022
|
},
|
|
7965
8023
|
{
|
|
7966
8024
|
"file": "packages/@ember/-internals/glimmer/tests/integration/components/render-component-test.ts",
|
|
7967
8025
|
"line": 759,
|
|
7968
8026
|
"description": "NOTE: subsequent renders to the same element are prepended to the element's children",
|
|
7969
8027
|
"class": "Ember.Templates.helpers",
|
|
7970
|
-
"module": "@ember/
|
|
8028
|
+
"module": "@ember/component"
|
|
7971
8029
|
},
|
|
7972
8030
|
{
|
|
7973
8031
|
"file": "packages/@ember/-internals/glimmer/tests/integration/components/render-component-test.ts",
|
|
7974
8032
|
"line": 828,
|
|
7975
8033
|
"description": "ERROR in conflict with the NOTE on this test.\nthe elementns flip locations... which is kinda bonkers",
|
|
7976
8034
|
"class": "Ember.Templates.helpers",
|
|
7977
|
-
"module": "@ember/
|
|
8035
|
+
"module": "@ember/component"
|
|
7978
8036
|
},
|
|
7979
8037
|
{
|
|
7980
8038
|
"file": "packages/@ember/-internals/glimmer/tests/integration/components/render-component-test.ts",
|
|
7981
8039
|
"line": 925,
|
|
7982
8040
|
"description": "We need to pass a scope so that we get a strict-mode component.",
|
|
7983
8041
|
"class": "Ember.Templates.helpers",
|
|
7984
|
-
"module": "@ember/
|
|
8042
|
+
"module": "@ember/component"
|
|
7985
8043
|
},
|
|
7986
8044
|
{
|
|
7987
8045
|
"file": "packages/@ember/-internals/glimmer/tests/integration/components/runtime-template-compiler-implicit-test.ts",
|
|
@@ -7994,12 +8052,12 @@
|
|
|
7994
8052
|
}
|
|
7995
8053
|
],
|
|
7996
8054
|
"class": "Ember.Templates.helpers",
|
|
7997
|
-
"module": "@ember/
|
|
8055
|
+
"module": "@ember/component"
|
|
7998
8056
|
},
|
|
7999
8057
|
{
|
|
8000
8058
|
"file": "packages/@ember/-internals/glimmer/index.ts",
|
|
8001
|
-
"line":
|
|
8002
|
-
"description": "`{{yield}}` denotes an area of a template that will be rendered inside\nof another template.\n\n### Use with `Component`\n\nWhen designing components `{{yield}}` is used to denote where, inside the component's\ntemplate, an optional block passed to the component should render:\n\n```app/templates/application.
|
|
8059
|
+
"line": 109,
|
|
8060
|
+
"description": "`{{yield}}` denotes an area of a template that will be rendered inside\nof another template.\n\n### Use with `Component`\n\nWhen designing components `{{yield}}` is used to denote where, inside the component's\ntemplate, an optional block passed to the component should render:\n\n```app/templates/application.gjs\nimport LabeledTextField from '../components/labeled-textfield';\n \n<template>\n <LabeledTextField @value={{@model.name}}>\n First name:\n </LabeledTextField>\n</template>\n```\n\n```app/components/labeled-textfield.gjs\nimport { Input } from '@ember/component';\n \n<template>\n <label>\n {{yield}} <Input @value={{@value}} />\n </label>\n</template>\n```\n\nResult:\n\n```html\n<label>\n First name: <input type=\"text\" />\n</label>\n```\n\nAdditionally you can `yield` properties into the context for use by the consumer:\n\n```app/templates/application.gjs\nimport Component from '@glimmer/component';\nimport LabeledTextField from '../components/labeled-textfield';\n \nexport default class Application extends Component {\n firstNameValidator = (value) => {\n // validates\n }\n \n <template>\n <LabeledTextField @value={{@model.validation}} @validator={{this.firstNameValidator}} as |validationError|>\n {{#if validationError}}\n <p class=\"error\">{{validationError}}</p>\n {{/if}}\n First name:\n </LabeledTextField>\n </template>\n}\n```\n\n```app/components/labeled-textfield.gjs\nimport { Input } from '@ember/component';\n \n<template>\n <label>\n {{yield this.validationError}} <Input @value={{@value}} />\n </label>\n</template>\n```\n\nResult:\n\n```html\n<label>\n <p class=\"error\">First Name must be at least 3 characters long.</p>\n First name: <input type=\"text\" />\n</label>\n```\n\n`yield` can also be used with the `hash` helper:\n\n```app/templates/application.gjs\nimport DateRanges from '../components/date-ranges';\n \n<template>\n <DateRanges @value={{@model.date}} as |range|>\n Start date: {{range.start}}\n End date: {{range.end}}\n </DateRanges>\n</template>\n```\n\n```app/components/date-ranges.gjs\n<template>\n <div>\n {{yield (hash start=@value.start end=@value.end)}}\n </div>\n</template>\n```\n\nResult:\n\n```html\n<div>\n Start date: July 1st\n End date: July 30th\n</div>\n```\n\nMultiple values can be yielded as block params:\n \n```app/templates/application.gjs\nimport Banner from '../components/banner';\n \n<template>\n <Banner @value={{@model}} as |title subtitle body|>\n <h1>{{title}}</h1>\n <h2>{{subtitle}}</h2>\n {{body}}\n </Banner>\n</template>\n```\n\n```app/components/banner.gjs\n<template>\n <div>\n {{yield \"Hello title\" \"hello subtitle\" \"body text\"}}\n </div>\n</template>\n```\n\nResult:\n\n```html\n<div>\n <h1>Hello title</h1>\n <h2>hello subtitle</h2>\n body text\n</div>\n```\n\nHowever, it is preferred to use the hash helper, as this can prevent breaking changes to your component and also simplify the api for the component.\n\nMultiple components can be yielded with the `hash` and `component` helper:\n\n```app/templates/application.gjs\nimport Banner from '../components/banner';\n\n<template>\n <Banner @value={{@model}} as |banner|>\n <banner.Title>Banner title</banner.Title>\n <banner.Subtitle>Banner subtitle</banner.Subtitle>\n <banner.Body>A load of body text</banner.Body>\n </Banner>\n</template>\n```\n\n```app/components/banner.gjs\nimport Title from './banner/title';\nimport Subtitle from './banner/subtitle';\nimport Body from './banner/body';\n\nexport default class Banner extends Component {\n Title = Title;\n Subtitle = Subtitle;\n Body = Body;\n \n <template>\n <div>\n {{yield (hash\n Title=this.Title\n Subtitle=this.Subtitle\n Body=(component this.Body defaultArg=\"some value\")\n )}}\n </div>\n </template>\n}\n```\n\nResult:\n\n```html\n<div>\n <h1>Banner title</h1>\n <h2>Banner subtitle</h2>\n A load of body text\n</div>\n```\n\nA benefit of using this pattern is that the user of the component can change the order the components are displayed.\n\n```app/templates/application.gjs\nimport Banner from '../components/banner';\n\n<template>\n <Banner @value={{@model}} as |banner|>\n <banner.Subtitle>Banner subtitle</banner.Subtitle>\n <banner.Title>Banner title</banner.Title>\n <banner.Body>A load of body text</banner.Body>\n </Banner>\n</template>\n```\n\nResult:\n\n```html\n<div>\n <h2>Banner subtitle</h2>\n <h1>Banner title</h1>\n A load of body text\n</div>\n```\n\nAnother benefit to using `yield` with the `hash` and `component` helper\nis you can pass attributes and arguments to these components:\n\n```app/templates/application.gjs\nimport Banner from '../components/banner';\n\n<template>\n <Banner @value={{@model}} as |banner|>\n <banner.Subtitle class=\"mb-1\">Banner subtitle</banner.Subtitle>\n <banner.Title @variant=\"loud\">Banner title</banner.Title>\n <banner.Body>A load of body text</banner.Body>\n </Banner>\n</template>\n```\n\n```app/components/banner/subtitle.gjs\n{{!-- note the use of ..attributes --}}\n<h2 ...attributes>\n {{yield}}\n</h2>\n```\n\n```app/components/banner/title.gjs\n<template>\n {{#if (eq @variant \"loud\")}}\n <h1 class=\"loud\">{{yield}}</h1>\n {{else}}\n <h1 class=\"quiet\">{{yield}}</h1>\n {{/if}}\n</template>\n```\n\nResult:\n\n```html\n<div>\n <h2 class=\"mb-1\">Banner subtitle</h2>\n <h1 class=\"loud\">Banner title</h1>\n A load of body text\n</div>\n```",
|
|
8003
8061
|
"itemtype": "method",
|
|
8004
8062
|
"name": "yield",
|
|
8005
8063
|
"params": [
|
|
@@ -8020,8 +8078,8 @@
|
|
|
8020
8078
|
},
|
|
8021
8079
|
{
|
|
8022
8080
|
"file": "packages/@ember/-internals/glimmer/index.ts",
|
|
8023
|
-
"line":
|
|
8024
|
-
"description": "`{{(has-block)}}` indicates if the component was invoked with a block.\n\nThis component is invoked with a block:\n\n```handlebars\n
|
|
8081
|
+
"line": 370,
|
|
8082
|
+
"description": "`{{(has-block)}}` indicates if the component was invoked with a block.\n\nThis component is invoked with a block:\n\n```handlebars\n<MyComponent>\n Hi Jen!\n</MyComponent>\n```\n\nThis component is invoked without a block:\n\n```handlebars\n<MyComponent />\n```\n\nThis is useful when you want to create a component that can optionally take a block\nand then render a default template when it is not invoked with a block.\n\n```app/components/my-component.gjs\n<template>\n {{#if (has-block)}}\n Welcome {{yield}}, we are happy you're here!\n {{else}}\n Hey you! You're great!\n {{/if}}\n</template>\n```",
|
|
8025
8083
|
"itemtype": "method",
|
|
8026
8084
|
"name": "has-block",
|
|
8027
8085
|
"params": [
|
|
@@ -8042,8 +8100,8 @@
|
|
|
8042
8100
|
},
|
|
8043
8101
|
{
|
|
8044
8102
|
"file": "packages/@ember/-internals/glimmer/index.ts",
|
|
8045
|
-
"line":
|
|
8046
|
-
"description": "`{{(has-block-params)}}` indicates if the component was invoked with block params.\n\nThis component is invoked with block params:\n
|
|
8103
|
+
"line": 407,
|
|
8104
|
+
"description": "`{{(has-block-params)}}` indicates if the component was invoked with block params.\n\nThis component is invoked with block params:\n \n```handlebars\n<MyComponent as |favoriteFlavor|>\nHi Jen!\n</MyComponent>\n```\n\nAnd without block params:\n\n```handlebars\n<MyComponent>\nHi Jen!\n</MyComponent>\n```\n\nThis is useful when you want to create a component that can render itself\ndifferently when it is not invoked with block params.\n\n```app/components/my-component.gjs\n<template>\n {{#if (has-block-params)}}\n Welcome {{yield this.favoriteFlavor}}, we're happy you're here and hope you\n enjoy your favorite ice cream flavor.\n {{else}}\n Welcome {{yield}}, we're happy you're here, but we're unsure what\n flavor ice cream you would enjoy.\n {{/if}}\n</template>\n```",
|
|
8047
8105
|
"itemtype": "method",
|
|
8048
8106
|
"name": "has-block-params",
|
|
8049
8107
|
"params": [
|
|
@@ -8064,7 +8122,7 @@
|
|
|
8064
8122
|
},
|
|
8065
8123
|
{
|
|
8066
8124
|
"file": "packages/@ember/-internals/glimmer/index.ts",
|
|
8067
|
-
"line":
|
|
8125
|
+
"line": 448,
|
|
8068
8126
|
"description": "Execute the `debugger` statement in the current template's context.\n\n```handlebars\n{{debugger}}\n```\n\nWhen using the debugger helper you will have access to a `get` function. This\nfunction retrieves values available in the context of the template.\nFor example, if you're wondering why a value `{{foo}}` isn't rendering as\nexpected within a template, you could place a `{{debugger}}` statement and,\nwhen the `debugger;` breakpoint is hit, you can attempt to retrieve this value:\n\n```\n> get('foo')\n```\n\n`get` is also aware of keywords. So in this situation\n\n```handlebars\n{{#each this.items as |item|}}\n {{debugger}}\n{{/each}}\n```\n\nYou'll be able to get values from the current item:\n\n```\n> get('item.name')\n```\n\nYou can also access the context of the view to make sure it is the object that\nyou expect:\n\n```\n> context\n```",
|
|
8069
8127
|
"itemtype": "method",
|
|
8070
8128
|
"name": "debugger",
|
|
@@ -9750,7 +9808,7 @@
|
|
|
9750
9808
|
},
|
|
9751
9809
|
{
|
|
9752
9810
|
"file": "packages/@ember/-internals/runtime/lib/mixins/comparable.ts",
|
|
9753
|
-
"line":
|
|
9811
|
+
"line": 23,
|
|
9754
9812
|
"description": "__Required.__ You must implement this method to apply this mixin.\n\nOverride to return the result of the comparison of the two parameters. The\ncompare method should return:\n\n- `-1` if `a < b`\n- `0` if `a == b`\n- `1` if `a > b`\n\nDefault implementation raises an exception.",
|
|
9755
9813
|
"itemtype": "method",
|
|
9756
9814
|
"name": "compare",
|
|
@@ -10875,54 +10933,54 @@
|
|
|
10875
10933
|
"namespace": "ApplicationInstance"
|
|
10876
10934
|
},
|
|
10877
10935
|
{
|
|
10878
|
-
"file": "packages/@ember/array/lib/
|
|
10879
|
-
"line":
|
|
10880
|
-
"description": "
|
|
10936
|
+
"file": "packages/@ember/array/lib/is-array.ts",
|
|
10937
|
+
"line": 11,
|
|
10938
|
+
"description": "Returns true if the passed object is an array or Array-like.\n\nObjects are considered Array-like if any of the following are true:\n\n - the object is a native Array\n - the object has an objectAt property\n - the object is an Object, and has a length property\n\nUnlike `typeOf` this method returns true even if the passed object is\nnot formally an array but appears to be array-like (i.e. implements `Array`)\n\n```javascript\nimport { isArray } from '@ember/array';\nimport ArrayProxy from '@ember/array/proxy';\n\nisArray(); // false\nisArray([]); // true\nisArray(ArrayProxy.create({ content: [] })); // true\n```",
|
|
10881
10939
|
"itemtype": "method",
|
|
10882
|
-
"name": "
|
|
10940
|
+
"name": "isArray",
|
|
10883
10941
|
"static": 1,
|
|
10884
10942
|
"params": [
|
|
10885
10943
|
{
|
|
10886
10944
|
"name": "obj",
|
|
10887
|
-
"description": "
|
|
10945
|
+
"description": "The object to test",
|
|
10888
10946
|
"type": "Object"
|
|
10889
10947
|
}
|
|
10890
10948
|
],
|
|
10891
10949
|
"return": {
|
|
10892
|
-
"description": "",
|
|
10893
|
-
"type": "
|
|
10950
|
+
"description": "true if the passed object is an array or Array-like",
|
|
10951
|
+
"type": "Boolean"
|
|
10894
10952
|
},
|
|
10895
|
-
"access": "
|
|
10953
|
+
"access": "public",
|
|
10896
10954
|
"tagname": "",
|
|
10897
10955
|
"class": "@ember/array",
|
|
10898
10956
|
"module": "@ember/array"
|
|
10899
10957
|
},
|
|
10900
10958
|
{
|
|
10901
|
-
"file": "packages/@ember/array/
|
|
10902
|
-
"line":
|
|
10903
|
-
"description": "
|
|
10959
|
+
"file": "packages/@ember/array/lib/make-array.ts",
|
|
10960
|
+
"line": 5,
|
|
10961
|
+
"description": "Forces the passed object to be part of an array. If the object is already\nan array, it will return the object. Otherwise, it will add the object to\nan array. If object is `null` or `undefined`, it will return an empty array.\n\n```javascript\nimport { makeArray } from '@ember/array';\nimport ArrayProxy from '@ember/array/proxy';\n\nmakeArray(); // []\nmakeArray(null); // []\nmakeArray(undefined); // []\nmakeArray('lindsay'); // ['lindsay']\nmakeArray([1, 2, 42]); // [1, 2, 42]\n\nlet proxy = ArrayProxy.create({ content: [] });\n\nmakeArray(proxy) === proxy; // false\n```",
|
|
10904
10962
|
"itemtype": "method",
|
|
10905
|
-
"name": "
|
|
10963
|
+
"name": "makeArray",
|
|
10906
10964
|
"static": 1,
|
|
10907
10965
|
"params": [
|
|
10908
10966
|
{
|
|
10909
10967
|
"name": "obj",
|
|
10910
|
-
"description": "
|
|
10968
|
+
"description": "the object",
|
|
10911
10969
|
"type": "Object"
|
|
10912
10970
|
}
|
|
10913
10971
|
],
|
|
10914
10972
|
"return": {
|
|
10915
|
-
"description": "
|
|
10916
|
-
"type": "
|
|
10973
|
+
"description": "",
|
|
10974
|
+
"type": "Array"
|
|
10917
10975
|
},
|
|
10918
|
-
"access": "
|
|
10976
|
+
"access": "private",
|
|
10919
10977
|
"tagname": "",
|
|
10920
10978
|
"class": "@ember/array",
|
|
10921
10979
|
"module": "@ember/array"
|
|
10922
10980
|
},
|
|
10923
10981
|
{
|
|
10924
10982
|
"file": "packages/@ember/array/index.ts",
|
|
10925
|
-
"line":
|
|
10983
|
+
"line": 190,
|
|
10926
10984
|
"description": "__Required.__ You must implement this method to apply this mixin.\n\nYour array must support the `length` property. Your replace methods should\nset this property whenever it changes.",
|
|
10927
10985
|
"itemtype": "property",
|
|
10928
10986
|
"name": "length",
|
|
@@ -10934,7 +10992,7 @@
|
|
|
10934
10992
|
},
|
|
10935
10993
|
{
|
|
10936
10994
|
"file": "packages/@ember/array/index.ts",
|
|
10937
|
-
"line":
|
|
10995
|
+
"line": 200,
|
|
10938
10996
|
"description": "Returns the object at the given `index`. If the given `index` is negative\nor is greater or equal than the array length, returns `undefined`.\n\nThis is one of the primitives you must implement to support `EmberArray`.\nIf your object supports retrieving the value of an array item using `get()`\n(i.e. `myArray.get(0)`), then you do not need to implement this method\nyourself.\n\n```javascript\nlet arr = ['a', 'b', 'c', 'd'];\n\narr.objectAt(0); // 'a'\narr.objectAt(3); // 'd'\narr.objectAt(-1); // undefined\narr.objectAt(4); // undefined\narr.objectAt(5); // undefined\n```",
|
|
10939
10997
|
"itemtype": "method",
|
|
10940
10998
|
"name": "objectAt",
|
|
@@ -10956,7 +11014,7 @@
|
|
|
10956
11014
|
},
|
|
10957
11015
|
{
|
|
10958
11016
|
"file": "packages/@ember/array/index.ts",
|
|
10959
|
-
"line":
|
|
11017
|
+
"line": 225,
|
|
10960
11018
|
"description": "This returns the objects at the specified indexes, using `objectAt`.\n\n```javascript\nlet arr = ['a', 'b', 'c', 'd'];\n\narr.objectsAt([0, 1, 2]); // ['a', 'b', 'c']\narr.objectsAt([2, 3, 4]); // ['c', 'd', undefined]\n```",
|
|
10961
11019
|
"itemtype": "method",
|
|
10962
11020
|
"name": "objectsAt",
|
|
@@ -10978,7 +11036,7 @@
|
|
|
10978
11036
|
},
|
|
10979
11037
|
{
|
|
10980
11038
|
"file": "packages/@ember/array/index.ts",
|
|
10981
|
-
"line":
|
|
11039
|
+
"line": 241,
|
|
10982
11040
|
"description": "This is the handler for the special array content property. If you get\nthis property, it will return this. If you set this property to a new\narray, it will replace the current content.\n\n```javascript\nlet peopleToMoon = ['Armstrong', 'Aldrin'];\n\npeopleToMoon.get('[]'); // ['Armstrong', 'Aldrin']\n\npeopleToMoon.set('[]', ['Collins']); // ['Collins']\npeopleToMoon.get('[]'); // ['Collins']\n```",
|
|
10983
11041
|
"itemtype": "property",
|
|
10984
11042
|
"name": "[]",
|
|
@@ -10992,7 +11050,7 @@
|
|
|
10992
11050
|
},
|
|
10993
11051
|
{
|
|
10994
11052
|
"file": "packages/@ember/array/index.ts",
|
|
10995
|
-
"line":
|
|
11053
|
+
"line": 261,
|
|
10996
11054
|
"description": "The first object in the array, or `undefined` if the array is empty.\n\n```javascript\nlet vowels = ['a', 'e', 'i', 'o', 'u'];\nvowels.firstObject; // 'a'\n\nvowels.shiftObject();\nvowels.firstObject; // 'e'\n\nvowels.reverseObjects();\nvowels.firstObject; // 'u'\n\nvowels.clear();\nvowels.firstObject; // undefined\n```",
|
|
10997
11055
|
"itemtype": "property",
|
|
10998
11056
|
"name": "firstObject",
|
|
@@ -11007,7 +11065,7 @@
|
|
|
11007
11065
|
},
|
|
11008
11066
|
{
|
|
11009
11067
|
"file": "packages/@ember/array/index.ts",
|
|
11010
|
-
"line":
|
|
11068
|
+
"line": 283,
|
|
11011
11069
|
"description": "The last object in the array, or `undefined` if the array is empty.",
|
|
11012
11070
|
"itemtype": "property",
|
|
11013
11071
|
"name": "lastObject",
|
|
@@ -11022,7 +11080,7 @@
|
|
|
11022
11080
|
},
|
|
11023
11081
|
{
|
|
11024
11082
|
"file": "packages/@ember/array/index.ts",
|
|
11025
|
-
"line":
|
|
11083
|
+
"line": 291,
|
|
11026
11084
|
"description": "Returns a new array that is a slice of the receiver. This implementation\nuses the observable array methods to retrieve the objects for the new\nslice.\n\n```javascript\nlet arr = ['red', 'green', 'blue'];\n\narr.slice(0); // ['red', 'green', 'blue']\narr.slice(0, 2); // ['red', 'green']\narr.slice(1, 100); // ['green', 'blue']\n```",
|
|
11027
11085
|
"itemtype": "method",
|
|
11028
11086
|
"name": "slice",
|
|
@@ -11049,7 +11107,7 @@
|
|
|
11049
11107
|
},
|
|
11050
11108
|
{
|
|
11051
11109
|
"file": "packages/@ember/array/index.ts",
|
|
11052
|
-
"line":
|
|
11110
|
+
"line": 311,
|
|
11053
11111
|
"description": "Used to determine the passed object's first occurrence in the array.\nReturns the index if found, -1 if no match is found.\n\nThe optional `startAt` argument can be used to pass a starting\nindex to search from, effectively slicing the searchable portion\nof the array. If it's negative it will add the array length to\nthe startAt value passed in as the index to search from. If less\nthan or equal to `-1 * array.length` the entire array is searched.\n\n```javascript\nlet arr = ['a', 'b', 'c', 'd', 'a'];\n\narr.indexOf('a'); // 0\narr.indexOf('z'); // -1\narr.indexOf('a', 2); // 4\narr.indexOf('a', -1); // 4, equivalent to indexOf('a', 4)\narr.indexOf('a', -100); // 0, searches entire array\narr.indexOf('b', 3); // -1\narr.indexOf('a', 100); // -1\n\nlet people = [{ name: 'Zoey' }, { name: 'Bob' }]\nlet newPerson = { name: 'Tom' };\npeople = [newPerson, ...people, newPerson];\n\npeople.indexOf(newPerson); // 0\npeople.indexOf(newPerson, 1); // 3\npeople.indexOf(newPerson, -4); // 0\npeople.indexOf(newPerson, 10); // -1\n```",
|
|
11054
11112
|
"itemtype": "method",
|
|
11055
11113
|
"name": "indexOf",
|
|
@@ -11076,7 +11134,7 @@
|
|
|
11076
11134
|
},
|
|
11077
11135
|
{
|
|
11078
11136
|
"file": "packages/@ember/array/index.ts",
|
|
11079
|
-
"line":
|
|
11137
|
+
"line": 349,
|
|
11080
11138
|
"description": "Returns the index of the given `object`'s last occurrence.\n\n- If no `startAt` argument is given, the search starts from\nthe last position.\n- If it's greater than or equal to the length of the array,\nthe search starts from the last position.\n- If it's negative, it is taken as the offset from the end\nof the array i.e. `startAt + array.length`.\n- If it's any other positive number, will search backwards\nfrom that index of the array.\n\nReturns -1 if no match is found.\n\n```javascript\nlet arr = ['a', 'b', 'c', 'd', 'a'];\n\narr.lastIndexOf('a'); // 4\narr.lastIndexOf('z'); // -1\narr.lastIndexOf('a', 2); // 0\narr.lastIndexOf('a', -1); // 4\narr.lastIndexOf('a', -3); // 0\narr.lastIndexOf('b', 3); // 1\narr.lastIndexOf('a', 100); // 4\n```",
|
|
11081
11139
|
"itemtype": "method",
|
|
11082
11140
|
"name": "lastIndexOf",
|
|
@@ -11103,7 +11161,7 @@
|
|
|
11103
11161
|
},
|
|
11104
11162
|
{
|
|
11105
11163
|
"file": "packages/@ember/array/index.ts",
|
|
11106
|
-
"line":
|
|
11164
|
+
"line": 384,
|
|
11107
11165
|
"description": "Iterates through the array, calling the passed function on each\nitem. This method corresponds to the `forEach()` method defined in\nJavaScript 1.6.\n\nThe callback method you provide should have the following signature (all\nparameters are optional):\n\n```javascript\nfunction(item, index, array);\n```\n\n- `item` is the current item in the iteration.\n- `index` is the current index in the iteration.\n- `array` is the array itself.\n\nNote that in addition to a callback, you can also pass an optional target\nobject that will be set as `this` on the context. This is a good way\nto give your iterator function access to the current object.\n\nExample Usage:\n\n```javascript\nlet foods = [\n { name: 'apple', eaten: false },\n { name: 'banana', eaten: false },\n { name: 'carrot', eaten: false }\n];\n\nfoods.forEach((food) => food.eaten = true);\n\nlet output = '';\nfoods.forEach((item, index, array) =>\n output += `${index + 1}/${array.length} ${item.name}\\n`;\n);\nconsole.log(output);\n// 1/3 apple\n// 2/3 banana\n// 3/3 carrot\n```",
|
|
11108
11166
|
"itemtype": "method",
|
|
11109
11167
|
"name": "forEach",
|
|
@@ -11131,7 +11189,7 @@
|
|
|
11131
11189
|
},
|
|
11132
11190
|
{
|
|
11133
11191
|
"file": "packages/@ember/array/index.ts",
|
|
11134
|
-
"line":
|
|
11192
|
+
"line": 435,
|
|
11135
11193
|
"description": "Alias for `mapBy`.\n\nReturns the value of the named\nproperty on all items in the enumeration.\n\n```javascript\nlet people = [{name: 'Joe'}, {name: 'Matt'}];\n\npeople.getEach('name');\n// ['Joe', 'Matt'];\n\npeople.getEach('nonexistentProperty');\n// [undefined, undefined];\n```",
|
|
11136
11194
|
"itemtype": "method",
|
|
11137
11195
|
"name": "getEach",
|
|
@@ -11153,7 +11211,7 @@
|
|
|
11153
11211
|
},
|
|
11154
11212
|
{
|
|
11155
11213
|
"file": "packages/@ember/array/index.ts",
|
|
11156
|
-
"line":
|
|
11214
|
+
"line": 457,
|
|
11157
11215
|
"description": "Sets the value on the named property for each member. This is more\nergonomic than using other methods defined on this helper. If the object\nimplements Observable, the value will be changed to `set(),` otherwise\nit will be set directly. `null` objects are skipped.\n\n```javascript\nlet people = [{name: 'Joe'}, {name: 'Matt'}];\n\npeople.setEach('zipCode', '10011');\n// [{name: 'Joe', zipCode: '10011'}, {name: 'Matt', zipCode: '10011'}];\n```",
|
|
11158
11216
|
"itemtype": "method",
|
|
11159
11217
|
"name": "setEach",
|
|
@@ -11180,7 +11238,7 @@
|
|
|
11180
11238
|
},
|
|
11181
11239
|
{
|
|
11182
11240
|
"file": "packages/@ember/array/index.ts",
|
|
11183
|
-
"line":
|
|
11241
|
+
"line": 477,
|
|
11184
11242
|
"description": "Maps all of the items in the enumeration to another value, returning\na new array. This method corresponds to `map()` defined in JavaScript 1.6.\n\nThe callback method you provide should have the following signature (all\nparameters are optional):\n\n```javascript\nfunction(item, index, array);\nlet arr = [1, 2, 3, 4, 5, 6];\n\narr.map(element => element * element);\n// [1, 4, 9, 16, 25, 36];\n\narr.map((element, index) => element + index);\n// [1, 3, 5, 7, 9, 11];\n```\n\n- `item` is the current item in the iteration.\n- `index` is the current index in the iteration.\n- `array` is the array itself.\n\nIt should return the mapped value.\n\nNote that in addition to a callback, you can also pass an optional target\nobject that will be set as `this` on the context. This is a good way\nto give your iterator function access to the current object.",
|
|
11185
11243
|
"itemtype": "method",
|
|
11186
11244
|
"name": "map",
|
|
@@ -11208,7 +11266,7 @@
|
|
|
11208
11266
|
},
|
|
11209
11267
|
{
|
|
11210
11268
|
"file": "packages/@ember/array/index.ts",
|
|
11211
|
-
"line":
|
|
11269
|
+
"line": 515,
|
|
11212
11270
|
"description": "Similar to map, this specialized function returns the value of the named\nproperty on all items in the enumeration.\n\n```javascript\nlet people = [{name: 'Joe'}, {name: 'Matt'}];\n\npeople.mapBy('name');\n// ['Joe', 'Matt'];\n\npeople.mapBy('unknownProperty');\n// [undefined, undefined];\n```",
|
|
11213
11271
|
"itemtype": "method",
|
|
11214
11272
|
"name": "mapBy",
|
|
@@ -11230,7 +11288,7 @@
|
|
|
11230
11288
|
},
|
|
11231
11289
|
{
|
|
11232
11290
|
"file": "packages/@ember/array/index.ts",
|
|
11233
|
-
"line":
|
|
11291
|
+
"line": 536,
|
|
11234
11292
|
"description": "Returns a new array with all of the items in the enumeration that the provided\ncallback function returns true for. This method corresponds to [Array.prototype.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).\n\nThe callback method should have the following signature:\n\n```javascript\nfunction(item, index, array);\n```\n\n- `item` is the current item in the iteration.\n- `index` is the current index in the iteration.\n- `array` is the array itself.\n\nAll parameters are optional. The function should return `true` to include the item\nin the results, and `false` otherwise.\n\nExample:\n\n```javascript\nimport { A } from '@ember/array';\nfunction isAdult(person) {\n return person.age > 18;\n};\n\nlet people = A([{ name: 'John', age: 14 }, { name: 'Joan', age: 45 }]);\n\npeople.filter(isAdult); // returns [{ name: 'Joan', age: 45 }];\n```\n\nNote that in addition to a callback, you can pass an optional target object\nthat will be set as `this` on the context. This is a good way to give your\niterator function access to the current object. For example:\n\n```javascript\nfunction isAdultAndEngineer(person) {\n return person.age > 18 && this.engineering;\n}\n\nclass AdultsCollection {\n engineering = false;\n\n constructor(opts = {}) {\n super(...arguments);\n\n this.engineering = opts.engineering;\n this.people = A([{ name: 'John', age: 14 }, { name: 'Joan', age: 45 }]);\n }\n}\n\nlet collection = new AdultsCollection({ engineering: true });\ncollection.people.filter(isAdultAndEngineer, { target: collection });\n```",
|
|
11235
11293
|
"itemtype": "method",
|
|
11236
11294
|
"name": "filter",
|
|
@@ -11258,7 +11316,7 @@
|
|
|
11258
11316
|
},
|
|
11259
11317
|
{
|
|
11260
11318
|
"file": "packages/@ember/array/index.ts",
|
|
11261
|
-
"line":
|
|
11319
|
+
"line": 600,
|
|
11262
11320
|
"description": "Returns an array with all of the items in the enumeration where the passed\nfunction returns false. This method is the inverse of filter().\n\nThe callback method you provide should have the following signature (all\nparameters are optional):\n\n```javascript\nfunction(item, index, array);\n```\n\n- *item* is the current item in the iteration.\n- *index* is the current index in the iteration\n- *array* is the array itself.\n\nIt should return a falsey value to include the item in the results.\n\nNote that in addition to a callback, you can also pass an optional target\nobject that will be set as \"this\" on the context. This is a good way\nto give your iterator function access to the current object.\n\nExample Usage:\n\n```javascript\nconst food = [\n { food: 'apple', isFruit: true },\n { food: 'bread', isFruit: false },\n { food: 'banana', isFruit: true }\n];\nconst nonFruits = food.reject(function(thing) {\n return thing.isFruit;\n}); // [{food: 'bread', isFruit: false}]\n```",
|
|
11263
11321
|
"itemtype": "method",
|
|
11264
11322
|
"name": "reject",
|
|
@@ -11286,7 +11344,7 @@
|
|
|
11286
11344
|
},
|
|
11287
11345
|
{
|
|
11288
11346
|
"file": "packages/@ember/array/index.ts",
|
|
11289
|
-
"line":
|
|
11347
|
+
"line": 644,
|
|
11290
11348
|
"description": "Filters the array by the property and an optional value. If a value is given, it returns\nthe items that have said value for the property. If not, it returns all the items that\nhave a truthy value for the property.\n\nExample Usage:\n\n```javascript\nimport { A } from '@ember/array';\nlet things = A([{ food: 'apple', isFruit: true }, { food: 'beans', isFruit: false }]);\n\nthings.filterBy('food', 'beans'); // [{ food: 'beans', isFruit: false }]\nthings.filterBy('isFruit'); // [{ food: 'apple', isFruit: true }]\n```",
|
|
11291
11349
|
"itemtype": "method",
|
|
11292
11350
|
"name": "filterBy",
|
|
@@ -11314,7 +11372,7 @@
|
|
|
11314
11372
|
},
|
|
11315
11373
|
{
|
|
11316
11374
|
"file": "packages/@ember/array/index.ts",
|
|
11317
|
-
"line":
|
|
11375
|
+
"line": 666,
|
|
11318
11376
|
"description": "Returns an array with the items that do not have truthy values for the provided key.\nYou can pass an optional second argument with a target value to reject for the key.\nOtherwise this will reject objects where the provided property evaluates to false.\n\nExample Usage:\n\n```javascript\n let food = [\n { name: \"apple\", isFruit: true },\n { name: \"carrot\", isFruit: false },\n { name: \"bread\", isFruit: false },\n ];\n food.rejectBy('isFruit'); // [{ name: \"carrot\", isFruit: false }, { name: \"bread\", isFruit: false }]\n food.rejectBy('name', 'carrot'); // [{ name: \"apple\", isFruit: true }}, { name: \"bread\", isFruit: false }]\n```",
|
|
11319
11377
|
"itemtype": "method",
|
|
11320
11378
|
"name": "rejectBy",
|
|
@@ -11342,7 +11400,7 @@
|
|
|
11342
11400
|
},
|
|
11343
11401
|
{
|
|
11344
11402
|
"file": "packages/@ember/array/index.ts",
|
|
11345
|
-
"line":
|
|
11403
|
+
"line": 690,
|
|
11346
11404
|
"description": "Returns the first item in the array for which the callback returns true.\nThis method is similar to the `find()` method defined in ECMAScript 2015.\n\nThe callback method you provide should have the following signature (all\nparameters are optional):\n\n```javascript\nfunction(item, index, array);\n```\n\n- `item` is the current item in the iteration.\n- `index` is the current index in the iteration.\n- `array` is the array itself.\n\nIt should return the `true` to include the item in the results, `false`\notherwise.\n\nNote that in addition to a callback, you can also pass an optional target\nobject that will be set as `this` on the context. This is a good way\nto give your iterator function access to the current object.\n\nExample Usage:\n\n```javascript\nlet users = [\n { id: 1, name: 'Yehuda' },\n { id: 2, name: 'Tom' },\n { id: 3, name: 'Melanie' },\n { id: 4, name: 'Leah' }\n];\n\nusers.find((user) => user.name == 'Tom'); // [{ id: 2, name: 'Tom' }]\nusers.find(({ id }) => id == 3); // [{ id: 3, name: 'Melanie' }]\n```",
|
|
11347
11405
|
"itemtype": "method",
|
|
11348
11406
|
"name": "find",
|
|
@@ -11370,7 +11428,7 @@
|
|
|
11370
11428
|
},
|
|
11371
11429
|
{
|
|
11372
11430
|
"file": "packages/@ember/array/index.ts",
|
|
11373
|
-
"line":
|
|
11431
|
+
"line": 740,
|
|
11374
11432
|
"description": "Returns the first item with a property matching the passed value. You\ncan pass an optional second argument with the target value. Otherwise\nthis will match any property that evaluates to `true`.\n\nThis method works much like the more generic `find()` method.\n\nUsage Example:\n\n```javascript\nlet users = [\n { id: 1, name: 'Yehuda', isTom: false },\n { id: 2, name: 'Tom', isTom: true },\n { id: 3, name: 'Melanie', isTom: false },\n { id: 4, name: 'Leah', isTom: false }\n];\n\nusers.findBy('id', 4); // { id: 4, name: 'Leah', isTom: false }\nusers.findBy('name', 'Melanie'); // { id: 3, name: 'Melanie', isTom: false }\nusers.findBy('isTom'); // { id: 2, name: 'Tom', isTom: true }\n```",
|
|
11375
11433
|
"itemtype": "method",
|
|
11376
11434
|
"name": "findBy",
|
|
@@ -11398,7 +11456,7 @@
|
|
|
11398
11456
|
},
|
|
11399
11457
|
{
|
|
11400
11458
|
"file": "packages/@ember/array/index.ts",
|
|
11401
|
-
"line":
|
|
11459
|
+
"line": 770,
|
|
11402
11460
|
"description": "Returns `true` if the passed function returns true for every item in the\nenumeration. This corresponds with the `Array.prototype.every()` method defined in ES5.\n\nThe callback method should have the following signature:\n\n```javascript\nfunction(item, index, array);\n```\n\n- `item` is the current item in the iteration.\n- `index` is the current index in the iteration.\n- `array` is the array itself.\n\nAll params are optional. The method should return `true` or `false`.\n\nNote that in addition to a callback, you can also pass an optional target\nobject that will be set as `this` on the context. This is a good way\nto give your iterator function access to the current object.\n\nUsage example:\n\n```javascript\nimport { A } from '@ember/array';\nfunction isAdult(person) {\n return person.age > 18;\n};\n\nconst people = A([{ name: 'John', age: 24 }, { name: 'Joan', age: 45 }]);\nconst areAllAdults = people.every(isAdult);\n```",
|
|
11403
11461
|
"itemtype": "method",
|
|
11404
11462
|
"name": "every",
|
|
@@ -11426,7 +11484,7 @@
|
|
|
11426
11484
|
},
|
|
11427
11485
|
{
|
|
11428
11486
|
"file": "packages/@ember/array/index.ts",
|
|
11429
|
-
"line":
|
|
11487
|
+
"line": 812,
|
|
11430
11488
|
"description": "Returns `true` if the passed property resolves to the value of the second\nargument for all items in the array. This method is often simpler/faster\nthan using a callback.\n\nNote that like the native `Array.every`, `isEvery` will return true when called\non any empty array.\n```javascript\nclass Language {\n constructor(name, isProgrammingLanguage) {\n this.name = name;\n this.programmingLanguage = isProgrammingLanguage;\n }\n}\n\nconst compiledLanguages = [\n new Language('Java', true),\n new Language('Go', true),\n new Language('Rust', true)\n]\n\nconst languagesKnownByMe = [\n new Language('Javascript', true),\n new Language('English', false),\n new Language('Ruby', true)\n]\n\ncompiledLanguages.isEvery('programmingLanguage'); // true\nlanguagesKnownByMe.isEvery('programmingLanguage'); // false\n```",
|
|
11431
11489
|
"itemtype": "method",
|
|
11432
11490
|
"name": "isEvery",
|
|
@@ -11455,7 +11513,7 @@
|
|
|
11455
11513
|
},
|
|
11456
11514
|
{
|
|
11457
11515
|
"file": "packages/@ember/array/index.ts",
|
|
11458
|
-
"line":
|
|
11516
|
+
"line": 852,
|
|
11459
11517
|
"description": "The any() method executes the callback function once for each element\npresent in the array until it finds the one where callback returns a truthy\nvalue (i.e. `true`). If such an element is found, any() immediately returns\ntrue. Otherwise, any() returns false.\n\n```javascript\nfunction(item, index, array);\n```\n\n- `item` is the current item in the iteration.\n- `index` is the current index in the iteration.\n- `array` is the array object itself.\n\nNote that in addition to a callback, you can also pass an optional target\nobject that will be set as `this` on the context. It can be a good way\nto give your iterator function access to an object in cases where an ES6\narrow function would not be appropriate.\n\nUsage Example:\n\n```javascript\nlet includesManager = people.any(this.findPersonInManagersList, this);\n\nlet includesStockHolder = people.any(person => {\n return this.findPersonInStockHoldersList(person)\n});\n\nif (includesManager || includesStockHolder) {\n Paychecks.addBiggerBonus();\n}\n```",
|
|
11460
11518
|
"itemtype": "method",
|
|
11461
11519
|
"name": "any",
|
|
@@ -11483,7 +11541,7 @@
|
|
|
11483
11541
|
},
|
|
11484
11542
|
{
|
|
11485
11543
|
"file": "packages/@ember/array/index.ts",
|
|
11486
|
-
"line":
|
|
11544
|
+
"line": 895,
|
|
11487
11545
|
"description": "Returns `true` if the passed property resolves to the value of the second\nargument for any item in the array. This method is often simpler/faster\nthan using a callback.\n\nExample usage:\n\n```javascript\nconst food = [\n { food: 'apple', isFruit: true },\n { food: 'bread', isFruit: false },\n { food: 'banana', isFruit: true }\n];\n\nfood.isAny('isFruit'); // true\n```",
|
|
11488
11546
|
"itemtype": "method",
|
|
11489
11547
|
"name": "isAny",
|
|
@@ -11512,7 +11570,7 @@
|
|
|
11512
11570
|
},
|
|
11513
11571
|
{
|
|
11514
11572
|
"file": "packages/@ember/array/index.ts",
|
|
11515
|
-
"line":
|
|
11573
|
+
"line": 921,
|
|
11516
11574
|
"description": "This will combine the values of the array into a single value. It\nis a useful way to collect a summary value from an array. This\ncorresponds to the `reduce()` method defined in JavaScript 1.8.\n\nThe callback method you provide should have the following signature (all\nparameters are optional):\n\n```javascript\nfunction(previousValue, item, index, array);\n```\n\n- `previousValue` is the value returned by the last call to the iterator.\n- `item` is the current item in the iteration.\n- `index` is the current index in the iteration.\n- `array` is the array itself.\n\nReturn the new cumulative value.\n\nIn addition to the callback you can also pass an `initialValue`. An error\nwill be raised if you do not pass an initial value and the enumerator is\nempty.\n\nNote that unlike the other methods, this method does not allow you to\npass a target object to set as this for the callback. It's part of the\nspec. Sorry.\n\nExample Usage:\n\n```javascript\n let numbers = [1, 2, 3, 4, 5];\n\n numbers.reduce(function(summation, current) {\n return summation + current;\n }); // 15 (1 + 2 + 3 + 4 + 5)\n\n numbers.reduce(function(summation, current) {\n return summation + current;\n }, -15); // 0 (-15 + 1 + 2 + 3 + 4 + 5)\n\n\n let binaryValues = [true, false, false];\n\n binaryValues.reduce(function(truthValue, current) {\n return truthValue && current;\n }); // false (true && false && false)\n```",
|
|
11517
11575
|
"itemtype": "method",
|
|
11518
11576
|
"name": "reduce",
|
|
@@ -11539,7 +11597,7 @@
|
|
|
11539
11597
|
},
|
|
11540
11598
|
{
|
|
11541
11599
|
"file": "packages/@ember/array/index.ts",
|
|
11542
|
-
"line":
|
|
11600
|
+
"line": 979,
|
|
11543
11601
|
"description": "Invokes the named method on every object in the receiver that\nimplements it. This method corresponds to the implementation in\nPrototype 1.6.\n\n```javascript\nclass Person {\n name = null;\n\n constructor(name) {\n this.name = name;\n }\n\n greet(prefix='Hello') {\n return `${prefix} ${this.name}`;\n }\n}\n\nlet people = [new Person('Joe'), new Person('Matt')];\n\npeople.invoke('greet'); // ['Hello Joe', 'Hello Matt']\npeople.invoke('greet', 'Bonjour'); // ['Bonjour Joe', 'Bonjour Matt']\n```",
|
|
11544
11602
|
"itemtype": "method",
|
|
11545
11603
|
"name": "invoke",
|
|
@@ -11566,7 +11624,7 @@
|
|
|
11566
11624
|
},
|
|
11567
11625
|
{
|
|
11568
11626
|
"file": "packages/@ember/array/index.ts",
|
|
11569
|
-
"line":
|
|
11627
|
+
"line": 1013,
|
|
11570
11628
|
"description": "Simply converts the object into a genuine array. The order is not\nguaranteed. Corresponds to the method implemented by Prototype.",
|
|
11571
11629
|
"itemtype": "method",
|
|
11572
11630
|
"name": "toArray",
|
|
@@ -11581,7 +11639,7 @@
|
|
|
11581
11639
|
},
|
|
11582
11640
|
{
|
|
11583
11641
|
"file": "packages/@ember/array/index.ts",
|
|
11584
|
-
"line":
|
|
11642
|
+
"line": 1022,
|
|
11585
11643
|
"description": "Returns a copy of the array with all `null` and `undefined` elements removed.\n\n```javascript\nlet arr = ['a', null, 'c', undefined];\narr.compact(); // ['a', 'c']\n```",
|
|
11586
11644
|
"itemtype": "method",
|
|
11587
11645
|
"name": "compact",
|
|
@@ -11596,7 +11654,7 @@
|
|
|
11596
11654
|
},
|
|
11597
11655
|
{
|
|
11598
11656
|
"file": "packages/@ember/array/index.ts",
|
|
11599
|
-
"line":
|
|
11657
|
+
"line": 1035,
|
|
11600
11658
|
"description": "Used to determine if the array contains the passed object.\nReturns `true` if found, `false` otherwise.\n\nThe optional `startAt` argument can be used to pass a starting\nindex to search from, effectively slicing the searchable portion\nof the array. If it's negative it will add the array length to\nthe startAt value passed in as the index to search from. If less\nthan or equal to `-1 * array.length` the entire array is searched.\n\nThis method has the same behavior of JavaScript's [Array.includes](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes).\n\n```javascript\n[1, 2, 3].includes(2); // true\n[1, 2, 3].includes(4); // false\n[1, 2, 3].includes(3, 2); // true\n[1, 2, 3].includes(3, 3); // false\n[1, 2, 3].includes(3, -1); // true\n[1, 2, 3].includes(1, -1); // false\n[1, 2, 3].includes(1, -4); // true\n[1, 2, NaN].includes(NaN); // true\n```",
|
|
11601
11659
|
"itemtype": "method",
|
|
11602
11660
|
"name": "includes",
|
|
@@ -11623,7 +11681,7 @@
|
|
|
11623
11681
|
},
|
|
11624
11682
|
{
|
|
11625
11683
|
"file": "packages/@ember/array/index.ts",
|
|
11626
|
-
"line":
|
|
11684
|
+
"line": 1065,
|
|
11627
11685
|
"description": "Sorts the array by the keys specified in the argument.\n\nYou may provide multiple arguments to sort by multiple properties.\n\n```javascript\n let colors = [\n { name: 'red', weight: 500 },\n { name: 'green', weight: 600 },\n { name: 'blue', weight: 500 }\n];\n\n colors.sortBy('name');\n // [{name: 'blue', weight: 500}, {name: 'green', weight: 600}, {name: 'red', weight: 500}]\n\n colors.sortBy('weight', 'name');\n // [{name: 'blue', weight: 500}, {name: 'red', weight: 500}, {name: 'green', weight: 600}]\n ```",
|
|
11628
11686
|
"itemtype": "method",
|
|
11629
11687
|
"name": "sortBy",
|
|
@@ -11646,7 +11704,7 @@
|
|
|
11646
11704
|
},
|
|
11647
11705
|
{
|
|
11648
11706
|
"file": "packages/@ember/array/index.ts",
|
|
11649
|
-
"line":
|
|
11707
|
+
"line": 1090,
|
|
11650
11708
|
"description": "Returns a new array that contains only unique values. The default\nimplementation returns an array regardless of the receiver type.\n\n```javascript\nlet arr = ['a', 'a', 'b', 'b'];\narr.uniq(); // ['a', 'b']\n```\n\nThis only works on primitive data types, e.g. Strings, Numbers, etc.",
|
|
11651
11709
|
"itemtype": "method",
|
|
11652
11710
|
"name": "uniq",
|
|
@@ -11661,7 +11719,7 @@
|
|
|
11661
11719
|
},
|
|
11662
11720
|
{
|
|
11663
11721
|
"file": "packages/@ember/array/index.ts",
|
|
11664
|
-
"line":
|
|
11722
|
+
"line": 1106,
|
|
11665
11723
|
"description": "Returns a new array that contains only items containing a unique property value.\nThe default implementation returns an array regardless of the receiver type.\n\n```javascript\nlet arr = [{ value: 'a' }, { value: 'a' }, { value: 'b' }, { value: 'b' }];\narr.uniqBy('value'); // [{ value: 'a' }, { value: 'b' }]\n\nlet arr = [2.2, 2.1, 3.2, 3.3];\narr.uniqBy(Math.floor); // [2.2, 3.2];\n```",
|
|
11666
11724
|
"itemtype": "method",
|
|
11667
11725
|
"name": "uniqBy",
|
|
@@ -11683,7 +11741,7 @@
|
|
|
11683
11741
|
},
|
|
11684
11742
|
{
|
|
11685
11743
|
"file": "packages/@ember/array/index.ts",
|
|
11686
|
-
"line":
|
|
11744
|
+
"line": 1125,
|
|
11687
11745
|
"description": "Returns a new array that excludes the passed value. The default\nimplementation returns an array regardless of the receiver type.\nIf the receiver does not contain the value it returns the original array.\n\n```javascript\nlet arr = ['a', 'b', 'a', 'c'];\narr.without('a'); // ['b', 'c']\n```",
|
|
11688
11746
|
"itemtype": "method",
|
|
11689
11747
|
"name": "without",
|
|
@@ -11705,7 +11763,7 @@
|
|
|
11705
11763
|
},
|
|
11706
11764
|
{
|
|
11707
11765
|
"file": "packages/@ember/array/index.ts",
|
|
11708
|
-
"line":
|
|
11766
|
+
"line": 1435,
|
|
11709
11767
|
"description": "__Required.__ You must implement this method to apply this mixin.\n\nThis is one of the primitives you must implement to support `Array`.\nYou should replace amt objects started at idx with the objects in the\npassed array.\n\nNote that this method is expected to validate the type(s) of objects that it expects.",
|
|
11710
11768
|
"itemtype": "method",
|
|
11711
11769
|
"name": "replace",
|
|
@@ -11734,7 +11792,7 @@
|
|
|
11734
11792
|
},
|
|
11735
11793
|
{
|
|
11736
11794
|
"file": "packages/@ember/array/index.ts",
|
|
11737
|
-
"line":
|
|
11795
|
+
"line": 1454,
|
|
11738
11796
|
"description": "Remove all elements from the array. This is useful if you\nwant to reuse an existing array without having to recreate it.\n\n```javascript\nlet colors = ['red', 'green', 'blue'];\n\ncolors.length; // 3\ncolors.clear(); // []\ncolors.length; // 0\n```",
|
|
11739
11797
|
"itemtype": "method",
|
|
11740
11798
|
"name": "clear",
|
|
@@ -11749,7 +11807,7 @@
|
|
|
11749
11807
|
},
|
|
11750
11808
|
{
|
|
11751
11809
|
"file": "packages/@ember/array/index.ts",
|
|
11752
|
-
"line":
|
|
11810
|
+
"line": 1471,
|
|
11753
11811
|
"description": "This will use the primitive `replace()` method to insert an object at the\nspecified index.\n\n```javascript\nlet colors = ['red', 'green', 'blue'];\n\ncolors.insertAt(2, 'yellow'); // ['red', 'green', 'yellow', 'blue']\ncolors.insertAt(5, 'orange'); // Error: Index out of range\n```",
|
|
11754
11812
|
"itemtype": "method",
|
|
11755
11813
|
"name": "insertAt",
|
|
@@ -11776,7 +11834,7 @@
|
|
|
11776
11834
|
},
|
|
11777
11835
|
{
|
|
11778
11836
|
"file": "packages/@ember/array/index.ts",
|
|
11779
|
-
"line":
|
|
11837
|
+
"line": 1489,
|
|
11780
11838
|
"description": "Remove an object at the specified index using the `replace()` primitive\nmethod. You can pass either a single index, or a start and a length.\n\nIf you pass a start and length that is beyond the\nlength this method will throw an assertion.\n\n```javascript\nlet colors = ['red', 'green', 'blue', 'yellow', 'orange'];\n\ncolors.removeAt(0); // ['green', 'blue', 'yellow', 'orange']\ncolors.removeAt(2, 2); // ['green', 'blue']\ncolors.removeAt(4, 2); // Error: Index out of range\n```",
|
|
11781
11839
|
"itemtype": "method",
|
|
11782
11840
|
"name": "removeAt",
|
|
@@ -11803,7 +11861,7 @@
|
|
|
11803
11861
|
},
|
|
11804
11862
|
{
|
|
11805
11863
|
"file": "packages/@ember/array/index.ts",
|
|
11806
|
-
"line":
|
|
11864
|
+
"line": 1511,
|
|
11807
11865
|
"description": "Push the object onto the end of the array. Works just like `push()` but it\nis KVO-compliant.\n\n```javascript\nlet colors = ['red', 'green'];\n\ncolors.pushObject('black'); // ['red', 'green', 'black']\ncolors.pushObject(['yellow']); // ['red', 'green', ['yellow']]\n```",
|
|
11808
11866
|
"itemtype": "method",
|
|
11809
11867
|
"name": "pushObject",
|
|
@@ -11824,7 +11882,7 @@
|
|
|
11824
11882
|
},
|
|
11825
11883
|
{
|
|
11826
11884
|
"file": "packages/@ember/array/index.ts",
|
|
11827
|
-
"line":
|
|
11885
|
+
"line": 1528,
|
|
11828
11886
|
"description": "Add the objects in the passed array to the end of the array. Defers\nnotifying observers of the change until all objects are added.\n\n```javascript\nlet colors = ['red'];\n\ncolors.pushObjects(['yellow', 'orange']); // ['red', 'yellow', 'orange']\n```",
|
|
11829
11887
|
"itemtype": "method",
|
|
11830
11888
|
"name": "pushObjects",
|
|
@@ -11846,7 +11904,7 @@
|
|
|
11846
11904
|
},
|
|
11847
11905
|
{
|
|
11848
11906
|
"file": "packages/@ember/array/index.ts",
|
|
11849
|
-
"line":
|
|
11907
|
+
"line": 1544,
|
|
11850
11908
|
"description": "Pop object from array or nil if none are left. Works just like `pop()` but\nit is KVO-compliant.\n\n```javascript\nlet colors = ['red', 'green', 'blue'];\n\ncolors.popObject(); // 'blue'\nconsole.log(colors); // ['red', 'green']\n```",
|
|
11851
11909
|
"itemtype": "method",
|
|
11852
11910
|
"name": "popObject",
|
|
@@ -11860,7 +11918,7 @@
|
|
|
11860
11918
|
},
|
|
11861
11919
|
{
|
|
11862
11920
|
"file": "packages/@ember/array/index.ts",
|
|
11863
|
-
"line":
|
|
11921
|
+
"line": 1560,
|
|
11864
11922
|
"description": "Shift an object from start of array or nil if none are left. Works just\nlike `shift()` but it is KVO-compliant.\n\n```javascript\nlet colors = ['red', 'green', 'blue'];\n\ncolors.shiftObject(); // 'red'\nconsole.log(colors); // ['green', 'blue']\n```",
|
|
11865
11923
|
"itemtype": "method",
|
|
11866
11924
|
"name": "shiftObject",
|
|
@@ -11874,7 +11932,7 @@
|
|
|
11874
11932
|
},
|
|
11875
11933
|
{
|
|
11876
11934
|
"file": "packages/@ember/array/index.ts",
|
|
11877
|
-
"line":
|
|
11935
|
+
"line": 1576,
|
|
11878
11936
|
"description": "Unshift an object to start of array. Works just like `unshift()` but it is\nKVO-compliant.\n\n```javascript\nlet colors = ['red'];\n\ncolors.unshiftObject('yellow'); // ['yellow', 'red']\ncolors.unshiftObject(['black']); // [['black'], 'yellow', 'red']\n```",
|
|
11879
11937
|
"itemtype": "method",
|
|
11880
11938
|
"name": "unshiftObject",
|
|
@@ -11895,7 +11953,7 @@
|
|
|
11895
11953
|
},
|
|
11896
11954
|
{
|
|
11897
11955
|
"file": "packages/@ember/array/index.ts",
|
|
11898
|
-
"line":
|
|
11956
|
+
"line": 1593,
|
|
11899
11957
|
"description": "Adds the named objects to the beginning of the array. Defers notifying\nobservers until all objects have been added.\n\n```javascript\nlet colors = ['red'];\n\ncolors.unshiftObjects(['black', 'white']); // ['black', 'white', 'red']\ncolors.unshiftObjects('yellow'); // Type Error: 'undefined' is not a function\n```",
|
|
11900
11958
|
"itemtype": "method",
|
|
11901
11959
|
"name": "unshiftObjects",
|
|
@@ -11917,7 +11975,7 @@
|
|
|
11917
11975
|
},
|
|
11918
11976
|
{
|
|
11919
11977
|
"file": "packages/@ember/array/index.ts",
|
|
11920
|
-
"line":
|
|
11978
|
+
"line": 1610,
|
|
11921
11979
|
"description": "Reverse objects in the array. Works just like `reverse()` but it is\nKVO-compliant.",
|
|
11922
11980
|
"itemtype": "method",
|
|
11923
11981
|
"name": "reverseObjects",
|
|
@@ -11932,7 +11990,7 @@
|
|
|
11932
11990
|
},
|
|
11933
11991
|
{
|
|
11934
11992
|
"file": "packages/@ember/array/index.ts",
|
|
11935
|
-
"line":
|
|
11993
|
+
"line": 1619,
|
|
11936
11994
|
"description": "Replace all the receiver's content with content of the argument.\nIf argument is an empty array receiver will be cleared.\n\n```javascript\nlet colors = ['red', 'green', 'blue'];\n\ncolors.setObjects(['black', 'white']); // ['black', 'white']\ncolors.setObjects([]); // []\n```",
|
|
11937
11995
|
"itemtype": "method",
|
|
11938
11996
|
"name": "setObjects",
|
|
@@ -11954,7 +12012,7 @@
|
|
|
11954
12012
|
},
|
|
11955
12013
|
{
|
|
11956
12014
|
"file": "packages/@ember/array/index.ts",
|
|
11957
|
-
"line":
|
|
12015
|
+
"line": 1637,
|
|
11958
12016
|
"description": "Remove all occurrences of an object in the array.\n\n```javascript\nlet cities = ['Chicago', 'Berlin', 'Lima', 'Chicago'];\n\ncities.removeObject('Chicago'); // ['Berlin', 'Lima']\ncities.removeObject('Lima'); // ['Berlin']\ncities.removeObject('Tokyo') // ['Berlin']\n```",
|
|
11959
12017
|
"itemtype": "method",
|
|
11960
12018
|
"name": "removeObject",
|
|
@@ -11976,7 +12034,7 @@
|
|
|
11976
12034
|
},
|
|
11977
12035
|
{
|
|
11978
12036
|
"file": "packages/@ember/array/index.ts",
|
|
11979
|
-
"line":
|
|
12037
|
+
"line": 1654,
|
|
11980
12038
|
"description": "Removes each object in the passed array from the receiver.",
|
|
11981
12039
|
"itemtype": "method",
|
|
11982
12040
|
"name": "removeObjects",
|
|
@@ -11998,7 +12056,7 @@
|
|
|
11998
12056
|
},
|
|
11999
12057
|
{
|
|
12000
12058
|
"file": "packages/@ember/array/index.ts",
|
|
12001
|
-
"line":
|
|
12059
|
+
"line": 1663,
|
|
12002
12060
|
"description": "Push the object onto the end of the array if it is not already\npresent in the array.\n\n```javascript\nlet cities = ['Chicago', 'Berlin'];\n\ncities.addObject('Lima'); // ['Chicago', 'Berlin', 'Lima']\ncities.addObject('Berlin'); // ['Chicago', 'Berlin', 'Lima']\n```",
|
|
12003
12061
|
"itemtype": "method",
|
|
12004
12062
|
"name": "addObject",
|
|
@@ -12020,7 +12078,7 @@
|
|
|
12020
12078
|
},
|
|
12021
12079
|
{
|
|
12022
12080
|
"file": "packages/@ember/array/index.ts",
|
|
12023
|
-
"line":
|
|
12081
|
+
"line": 1680,
|
|
12024
12082
|
"description": "Adds each object in the passed array to the receiver.",
|
|
12025
12083
|
"itemtype": "method",
|
|
12026
12084
|
"name": "addObjects",
|
|
@@ -12042,8 +12100,8 @@
|
|
|
12042
12100
|
},
|
|
12043
12101
|
{
|
|
12044
12102
|
"file": "packages/@ember/array/index.ts",
|
|
12045
|
-
"line":
|
|
12046
|
-
"description": "Creates an `NativeArray` from an Array-like object.\nDoes not modify the original object's contents.\n\nExample\n\n```app/components/my-component.js\nimport Component from '@ember/component';\nimport { A } from '@ember/array';\n\nexport default Component.extend({\n tagName: 'ul',\n classNames: ['pagination'],\n\n init() {\n this._super(...arguments);\n\n if (!this.get('content')) {\n this.set('content', A());\n this.set('otherContent', A([1,2,3]));\n }\n }\n});\n```",
|
|
12103
|
+
"line": 1810,
|
|
12104
|
+
"description": "Creates an `NativeArray` from an Array-like object.\nDoes not modify the original object's contents.\n \nThis exists primarily for historic reasons and should not be used\nin new code. Prefer native [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)\nor [trackedArray](/ember/release/functions/@ember%2Freactive%2Fcollections/trackedArray).\n\nExample\n\n```app/components/my-component.js\nimport Component from '@ember/component';\nimport { A } from '@ember/array';\n\nexport default Component.extend({\n tagName: 'ul',\n classNames: ['pagination'],\n\n init() {\n this._super(...arguments);\n\n if (!this.get('content')) {\n this.set('content', A());\n this.set('otherContent', A([1,2,3]));\n }\n }\n});\n```",
|
|
12047
12105
|
"itemtype": "method",
|
|
12048
12106
|
"name": "A",
|
|
12049
12107
|
"static": 1,
|
|
@@ -12058,70 +12116,70 @@
|
|
|
12058
12116
|
},
|
|
12059
12117
|
{
|
|
12060
12118
|
"file": "packages/@ember/array/index.ts",
|
|
12061
|
-
"line":
|
|
12119
|
+
"line": 1855,
|
|
12062
12120
|
"description": "The final definition of NativeArray removes all native methods. This is the list of removed methods\nwhen run in Chrome 106.",
|
|
12063
12121
|
"class": "@ember/array",
|
|
12064
12122
|
"module": "ember"
|
|
12065
12123
|
},
|
|
12066
12124
|
{
|
|
12067
12125
|
"file": "packages/@ember/array/index.ts",
|
|
12068
|
-
"line":
|
|
12126
|
+
"line": 1872,
|
|
12069
12127
|
"description": "These additional items must be redefined since `Omit` causes methods that return `this` to return the\ntype at the time of the Omit.",
|
|
12070
12128
|
"class": "@ember/array",
|
|
12071
12129
|
"module": "ember"
|
|
12072
12130
|
},
|
|
12073
12131
|
{
|
|
12074
12132
|
"file": "packages/@ember/array/index.ts",
|
|
12075
|
-
"line":
|
|
12133
|
+
"line": 1896,
|
|
12076
12134
|
"description": "Remove all elements from the array. This is useful if you\nwant to reuse an existing array without having to recreate it.",
|
|
12077
12135
|
"class": "@ember/array",
|
|
12078
12136
|
"module": "ember"
|
|
12079
12137
|
},
|
|
12080
12138
|
{
|
|
12081
12139
|
"file": "packages/@ember/array/index.ts",
|
|
12082
|
-
"line":
|
|
12140
|
+
"line": 1901,
|
|
12083
12141
|
"description": "This will use the primitive `replace()` method to insert an object at the\nspecified index.",
|
|
12084
12142
|
"class": "@ember/array",
|
|
12085
12143
|
"module": "ember"
|
|
12086
12144
|
},
|
|
12087
12145
|
{
|
|
12088
12146
|
"file": "packages/@ember/array/index.ts",
|
|
12089
|
-
"line":
|
|
12147
|
+
"line": 1906,
|
|
12090
12148
|
"description": "Remove an object at the specified index using the `replace()` primitive\nmethod. You can pass either a single index, or a start and a length.",
|
|
12091
12149
|
"class": "@ember/array",
|
|
12092
12150
|
"module": "ember"
|
|
12093
12151
|
},
|
|
12094
12152
|
{
|
|
12095
12153
|
"file": "packages/@ember/array/index.ts",
|
|
12096
|
-
"line":
|
|
12154
|
+
"line": 1911,
|
|
12097
12155
|
"description": "Add the objects in the passed numerable to the end of the array. Defers\nnotifying observers of the change until all objects are added.",
|
|
12098
12156
|
"class": "@ember/array",
|
|
12099
12157
|
"module": "ember"
|
|
12100
12158
|
},
|
|
12101
12159
|
{
|
|
12102
12160
|
"file": "packages/@ember/array/index.ts",
|
|
12103
|
-
"line":
|
|
12161
|
+
"line": 1916,
|
|
12104
12162
|
"description": "Adds the named objects to the beginning of the array. Defers notifying\nobservers until all objects have been added.",
|
|
12105
12163
|
"class": "@ember/array",
|
|
12106
12164
|
"module": "ember"
|
|
12107
12165
|
},
|
|
12108
12166
|
{
|
|
12109
12167
|
"file": "packages/@ember/array/index.ts",
|
|
12110
|
-
"line":
|
|
12168
|
+
"line": 1921,
|
|
12111
12169
|
"description": "Reverse objects in the array. Works just like `reverse()` but it is\nKVO-compliant.",
|
|
12112
12170
|
"class": "@ember/array",
|
|
12113
12171
|
"module": "ember"
|
|
12114
12172
|
},
|
|
12115
12173
|
{
|
|
12116
12174
|
"file": "packages/@ember/array/index.ts",
|
|
12117
|
-
"line":
|
|
12175
|
+
"line": 1926,
|
|
12118
12176
|
"description": "Replace all the receiver's content with content of the argument.\nIf argument is an empty array receiver will be cleared.",
|
|
12119
12177
|
"class": "@ember/array",
|
|
12120
12178
|
"module": "ember"
|
|
12121
12179
|
},
|
|
12122
12180
|
{
|
|
12123
12181
|
"file": "packages/@ember/array/index.ts",
|
|
12124
|
-
"line":
|
|
12182
|
+
"line": 1931,
|
|
12125
12183
|
"description": "Remove all occurrences of an object in the array.\n\n```javascript\nlet cities = ['Chicago', 'Berlin', 'Lima', 'Chicago'];\n\ncities.removeObject('Chicago'); // ['Berlin', 'Lima']\ncities.removeObject('Lima'); // ['Berlin']\ncities.removeObject('Tokyo') // ['Berlin']\n```",
|
|
12126
12184
|
"itemtype": "method",
|
|
12127
12185
|
"name": "removeObject",
|
|
@@ -12143,14 +12201,14 @@
|
|
|
12143
12201
|
},
|
|
12144
12202
|
{
|
|
12145
12203
|
"file": "packages/@ember/array/index.ts",
|
|
12146
|
-
"line":
|
|
12204
|
+
"line": 1948,
|
|
12147
12205
|
"description": "Removes each object in the passed array from the receiver.",
|
|
12148
12206
|
"class": "@ember/array",
|
|
12149
12207
|
"module": "ember"
|
|
12150
12208
|
},
|
|
12151
12209
|
{
|
|
12152
12210
|
"file": "packages/@ember/array/index.ts",
|
|
12153
|
-
"line":
|
|
12211
|
+
"line": 1952,
|
|
12154
12212
|
"description": "Push the object onto the end of the array if it is not already\npresent in the array.\n\n```javascript\nlet cities = ['Chicago', 'Berlin'];\n\ncities.addObject('Lima'); // ['Chicago', 'Berlin', 'Lima']\ncities.addObject('Berlin'); // ['Chicago', 'Berlin', 'Lima']\n```",
|
|
12155
12213
|
"itemtype": "method",
|
|
12156
12214
|
"name": "addObject",
|
|
@@ -12172,14 +12230,14 @@
|
|
|
12172
12230
|
},
|
|
12173
12231
|
{
|
|
12174
12232
|
"file": "packages/@ember/array/index.ts",
|
|
12175
|
-
"line":
|
|
12233
|
+
"line": 1969,
|
|
12176
12234
|
"description": "Adds each object in the passed enumerable to the receiver.",
|
|
12177
12235
|
"class": "@ember/array",
|
|
12178
12236
|
"module": "ember"
|
|
12179
12237
|
},
|
|
12180
12238
|
{
|
|
12181
12239
|
"file": "packages/@ember/array/index.ts",
|
|
12182
|
-
"line":
|
|
12240
|
+
"line": 1973,
|
|
12183
12241
|
"description": "Sets the value on the named property for each member. This is more\nergonomic than using other methods defined on this helper. If the object\nimplements Observable, the value will be changed to `set(),` otherwise\nit will be set directly. `null` objects are skipped.\n\n```javascript\nlet people = [{name: 'Joe'}, {name: 'Matt'}];\n\npeople.setEach('zipCode', '10011');\n// [{name: 'Joe', zipCode: '10011'}, {name: 'Matt', zipCode: '10011'}];\n```",
|
|
12184
12242
|
"itemtype": "method",
|
|
12185
12243
|
"name": "setEach",
|
|
@@ -12206,7 +12264,7 @@
|
|
|
12206
12264
|
},
|
|
12207
12265
|
{
|
|
12208
12266
|
"file": "packages/@ember/array/index.ts",
|
|
12209
|
-
"line":
|
|
12267
|
+
"line": 1993,
|
|
12210
12268
|
"description": "This is the handler for the special array content property. If you get\nthis property, it will return this. If you set this property to a new\narray, it will replace the current content.\n\n```javascript\nlet peopleToMoon = ['Armstrong', 'Aldrin'];\n\npeopleToMoon.get('[]'); // ['Armstrong', 'Aldrin']\n\npeopleToMoon.set('[]', ['Collins']); // ['Collins']\npeopleToMoon.get('[]'); // ['Collins']\n```",
|
|
12211
12269
|
"itemtype": "property",
|
|
12212
12270
|
"name": "[]",
|
|
@@ -12476,10 +12534,7 @@
|
|
|
12476
12534
|
{
|
|
12477
12535
|
"file": "packages/@ember/component/template-only.ts",
|
|
12478
12536
|
"line": 6,
|
|
12479
|
-
"description": "This utility function is used to declare a given component has no backing class. When the rendering engine detects this it\nis able to perform a number of optimizations. Templates that are associated with `templateOnly()` will be rendered _as is_\nwithout adding a wrapping `<div>` (or any of the other element customization behaviors of [@ember/component](/ember/release/classes/Component)).\nSpecifically, this means that the template will be rendered as \"outer HTML\".\n\nIn apps, this method will usually be inserted by build-time tooling the handles converting `.hbs` files into component Javascript modules and\nwould not be directly written by the application author.\n\nAddons may want to use this method directly to ensure that a template-only component is treated consistently in all Ember versions (Ember versions\nbefore 4.0 have a \"template-only-glimmer-components\" optional feature that causes a standalone `.hbs` file to be interpreted differently)
|
|
12480
|
-
"example": [
|
|
12481
|
-
"\n\n```js\nimport templateOnly from '@ember/component/template-only';\n\nexport default templateOnly();\n```"
|
|
12482
|
-
],
|
|
12537
|
+
"description": "This utility function is used to declare a given component has no backing class. When the rendering engine detects this it\nis able to perform a number of optimizations. Templates that are associated with `templateOnly()` will be rendered _as is_\nwithout adding a wrapping `<div>` (or any of the other element customization behaviors of [@ember/component](/ember/release/classes/Component)).\nSpecifically, this means that the template will be rendered as \"outer HTML\".\n\nIn apps, this method will usually be inserted by build-time tooling the handles converting `.hbs` files into component Javascript modules and\nwould not be directly written by the application author.\n\nAddons may want to use this method directly to ensure that a template-only component is treated consistently in all Ember versions (Ember versions\nbefore 4.0 have a \"template-only-glimmer-components\" optional feature that causes a standalone `.hbs` file to be interpreted differently).\n \n```js\nimport templateOnly from '@ember/component/template-only';\n\nexport default templateOnly();\n```",
|
|
12483
12538
|
"access": "public",
|
|
12484
12539
|
"tagname": "",
|
|
12485
12540
|
"static": 1,
|
|
@@ -12500,14 +12555,14 @@
|
|
|
12500
12555
|
},
|
|
12501
12556
|
{
|
|
12502
12557
|
"file": "packages/@ember/component/template-only.ts",
|
|
12503
|
-
"line":
|
|
12558
|
+
"line": 34,
|
|
12504
12559
|
"description": "Template-only components have no backing class instance, so `this` in their\ntemplates is null. This means that you can only reference passed in arguments\n(e.g. `{{@arg}}`).",
|
|
12505
12560
|
"class": "@ember/component/template-only",
|
|
12506
12561
|
"module": "@ember/component/template-only"
|
|
12507
12562
|
},
|
|
12508
12563
|
{
|
|
12509
12564
|
"file": "packages/@ember/component/template-only.ts",
|
|
12510
|
-
"line":
|
|
12565
|
+
"line": 42,
|
|
12511
12566
|
"description": "A convenience alias for {@link TemplateOnlyComponent}",
|
|
12512
12567
|
"class": "@ember/component/template-only",
|
|
12513
12568
|
"module": "@ember/component/template-only"
|
|
@@ -12522,7 +12577,7 @@
|
|
|
12522
12577
|
{
|
|
12523
12578
|
"file": "packages/@ember/controller/index.ts",
|
|
12524
12579
|
"line": 39,
|
|
12525
|
-
"description": "The object to which actions from the view should be sent.\n\nFor example, when a
|
|
12580
|
+
"description": "The object to which actions from the view should be sent.\n\nFor example, when a template uses the `{{action}}` helper,\nit will attempt to send the action to the view's controller's `target`.\n\nBy default, the value of the target property is set to the router, and\nis injected when a controller is instantiated. This injection is applied\nas part of the application's initialization process. In most cases the\n`target` property will automatically be set to the logical consumer of\nactions for the controller.",
|
|
12526
12581
|
"itemtype": "property",
|
|
12527
12582
|
"name": "target",
|
|
12528
12583
|
"default": "null",
|
|
@@ -14056,41 +14111,41 @@
|
|
|
14056
14111
|
{
|
|
14057
14112
|
"file": "packages/@ember/helper/index.ts",
|
|
14058
14113
|
"line": 346,
|
|
14059
|
-
"description": "Using the `{{hash}}` helper, you can pass objects directly from the template\nas an argument to your components.\n\n```\
|
|
14114
|
+
"description": "Using the `{{hash}}` helper, you can pass objects directly from the template\nas an argument to your components.\n\n```\n<template>\n {{#each-in (hash givenName='Jen' familyName='Weber') as |key value|}}\n <p>{{key}}: {{value}}</p>\n {{/each-in}}\n</template>\n```",
|
|
14060
14115
|
"class": "@ember/helper",
|
|
14061
14116
|
"module": "@ember/helper"
|
|
14062
14117
|
},
|
|
14063
14118
|
{
|
|
14064
14119
|
"file": "packages/@ember/helper/index.ts",
|
|
14065
|
-
"line":
|
|
14066
|
-
"description": "Using the `{{array}}` helper, you can pass arrays directly from the template\nas an argument to your components.\n\n```js\
|
|
14120
|
+
"line": 361,
|
|
14121
|
+
"description": "Using the `{{array}}` helper, you can pass arrays directly from the template\nas an argument to your components.\n\n```js\n\n<template>\n <ul>\n {{#each (array 'Tom Dale' 'Yehuda Katz' @anotherPerson) as |person|}}\n <li>{{person}}</li>\n {{/each}}\n </ul>\n</template>\n```",
|
|
14067
14122
|
"class": "@ember/helper",
|
|
14068
14123
|
"module": "@ember/helper"
|
|
14069
14124
|
},
|
|
14070
14125
|
{
|
|
14071
14126
|
"file": "packages/@ember/helper/index.ts",
|
|
14072
|
-
"line":
|
|
14073
|
-
"description": "The `{{concat}}` helper makes it easy to dynamically send a number of\nparameters to a component or helper as a single parameter in the format of a\nconcatenated string.\n\nFor example:\n\n```js\nimport { concat } from '@ember/helper';\n\n<template>\n {{get @foo (concat \"item\" @index)}}\n</template>\n```\n\nThis will display the result of `@foo.item1` when `index` is `1`, and\n`this.foo.item2` when `index` is `2`, etc
|
|
14127
|
+
"line": 379,
|
|
14128
|
+
"description": "The `{{concat}}` helper makes it easy to dynamically send a number of\nparameters to a component or helper as a single parameter in the format of a\nconcatenated string.\n\nFor example:\n\n```js\nimport { concat } from '@ember/helper';\n\n<template>\n {{get @foo (concat \"item\" @index)}}\n</template>\n```\n\nThis will display the result of `@foo.item1` when `index` is `1`, and\n`this.foo.item2` when `index` is `2`, etc.",
|
|
14074
14129
|
"class": "@ember/helper",
|
|
14075
14130
|
"module": "@ember/helper"
|
|
14076
14131
|
},
|
|
14077
14132
|
{
|
|
14078
14133
|
"file": "packages/@ember/helper/index.ts",
|
|
14079
|
-
"line":
|
|
14080
|
-
"description": "The `{{get}}` helper makes it easy to dynamically look up a property on an\nobject or an element in an array. The second argument to `{{get}}` can be a\nstring or a number, depending on the object being accessed.\n\nTo access a property on an object with a string key:\n\n```js\nimport { get } from '@ember/helper';\n\n<template>\n {{get @someObject \"objectKey\"}}\n</template>\n```\n\nTo access the first element in an array:\n\n```js\nimport { get } from '@ember/helper';\n\n<template>\n {{get @someArray 0}}\n</template>\n```\n\nTo access a property on an object with a dynamic key:\n\n```js\nimport { get } from '@ember/helper';\n\n<template>\n {{get @address @field}}\n</template>\n```\n\nThis will display the result of `@foo.item1` when `index` is `1`, and\n`this.foo.item2` when `index` is `2`, etc
|
|
14134
|
+
"line": 400,
|
|
14135
|
+
"description": "The `{{get}}` helper makes it easy to dynamically look up a property on an\nobject or an element in an array. The second argument to `{{get}}` can be a\nstring or a number, depending on the object being accessed.\n\nTo access a property on an object with a string key:\n\n```js\nimport { get } from '@ember/helper';\n\n<template>\n {{get @someObject \"objectKey\"}}\n</template>\n```\n\nTo access the first element in an array:\n\n```js\nimport { get } from '@ember/helper';\n\n<template>\n {{get @someArray 0}}\n</template>\n```\n\nTo access a property on an object with a dynamic key:\n\n```js\nimport { get } from '@ember/helper';\n\n<template>\n {{get @address @field}}\n</template>\n```\n\nThis will display the result of `@foo.item1` when `index` is `1`, and\n`this.foo.item2` when `index` is `2`, etc.",
|
|
14081
14136
|
"class": "@ember/helper",
|
|
14082
14137
|
"module": "@ember/helper"
|
|
14083
14138
|
},
|
|
14084
14139
|
{
|
|
14085
14140
|
"file": "packages/@ember/helper/index.ts",
|
|
14086
|
-
"line":
|
|
14141
|
+
"line": 441,
|
|
14087
14142
|
"description": "`{{fn}}` is a helper that receives a function and some arguments, and returns\na new function that combines. This allows you to pass parameters along to\nfunctions in your templates:\n\n```js\nimport { fn } from '@ember/helper';\n\nfunction showAlert(message) {\n alert(`The message is: '${message}'`);\n}\n\n<template>\n <button type=\"button\" {{on \"click\" (fn showAlert \"Hello!\")}}>\n Click me!\n </button>\n</template>\n```",
|
|
14088
14143
|
"class": "@ember/helper",
|
|
14089
14144
|
"module": "@ember/helper"
|
|
14090
14145
|
},
|
|
14091
14146
|
{
|
|
14092
14147
|
"file": "packages/@ember/helper/index.ts",
|
|
14093
|
-
"line":
|
|
14148
|
+
"line": 463,
|
|
14094
14149
|
"description": "The `{{gt}}` helper returns `true` if the first argument is greater than\nthe second argument.\n\n```js\nimport { gt } from '@ember/helper';\n\n<template>\n {{if (gt @score 100) \"High score!\" \"Keep trying\"}}\n</template>\n```\n\nIn strict-mode (gjs/gts) templates, `gt` is available as a keyword and\ndoes not need to be imported.",
|
|
14095
14150
|
"itemtype": "method",
|
|
14096
14151
|
"name": "gt",
|
|
@@ -14115,7 +14170,7 @@
|
|
|
14115
14170
|
},
|
|
14116
14171
|
{
|
|
14117
14172
|
"file": "packages/@ember/helper/index.ts",
|
|
14118
|
-
"line":
|
|
14173
|
+
"line": 486,
|
|
14119
14174
|
"description": "The `{{gte}}` helper returns `true` if the first argument is greater than\nor equal to the second argument.\n\n```js\nimport { gte } from '@ember/helper';\n\n<template>\n {{if (gte @age 18) \"Adult\" \"Minor\"}}\n</template>\n```\n\nIn strict-mode (gjs/gts) templates, `gte` is available as a keyword and\ndoes not need to be imported.",
|
|
14120
14175
|
"itemtype": "method",
|
|
14121
14176
|
"name": "gte",
|
|
@@ -14140,7 +14195,7 @@
|
|
|
14140
14195
|
},
|
|
14141
14196
|
{
|
|
14142
14197
|
"file": "packages/@ember/helper/index.ts",
|
|
14143
|
-
"line":
|
|
14198
|
+
"line": 509,
|
|
14144
14199
|
"description": "The `{{lt}}` helper returns `true` if the first argument is less than\nthe second argument.\n\n```js\nimport { lt } from '@ember/helper';\n\n<template>\n {{if (lt @temperature 0) \"Freezing\" \"Above zero\"}}\n</template>\n```\n\nIn strict-mode (gjs/gts) templates, `lt` is available as a keyword and\ndoes not need to be imported.",
|
|
14145
14200
|
"itemtype": "method",
|
|
14146
14201
|
"name": "lt",
|
|
@@ -14165,7 +14220,7 @@
|
|
|
14165
14220
|
},
|
|
14166
14221
|
{
|
|
14167
14222
|
"file": "packages/@ember/helper/index.ts",
|
|
14168
|
-
"line":
|
|
14223
|
+
"line": 532,
|
|
14169
14224
|
"description": "The `{{lte}}` helper returns `true` if the first argument is less than\nor equal to the second argument.\n\n```js\nimport { lte } from '@ember/helper';\n\n<template>\n {{if (lte @count 0) \"Empty\" \"Has items\"}}\n</template>\n```\n\nIn strict-mode (gjs/gts) templates, `lte` is available as a keyword and\ndoes not need to be imported.",
|
|
14170
14225
|
"itemtype": "method",
|
|
14171
14226
|
"name": "lte",
|
|
@@ -14190,7 +14245,7 @@
|
|
|
14190
14245
|
},
|
|
14191
14246
|
{
|
|
14192
14247
|
"file": "packages/@ember/helper/index.ts",
|
|
14193
|
-
"line":
|
|
14248
|
+
"line": 555,
|
|
14194
14249
|
"description": "The `element` helper lets you dynamically set the tag name of an element.\n\n```js\nimport { element } from '@ember/helper';\n\n<template>\n {{#let (element @tagName) as |Tag|}}\n <Tag class=\"my-element\">Hello</Tag>\n {{/let}}\n</template>\n```\n\nWhen `@tagName` is `\"h1\"`, this renders `<h1 class=\"my-element\">Hello</h1>`.\nWhen `@tagName` is an empty string, the block content is rendered without a\nwrapping element. When `@tagName` is `null` or `undefined`, nothing is rendered.",
|
|
14195
14250
|
"itemtype": "method",
|
|
14196
14251
|
"name": "element",
|
|
@@ -14206,14 +14261,14 @@
|
|
|
14206
14261
|
},
|
|
14207
14262
|
{
|
|
14208
14263
|
"file": "packages/@ember/helper/index.ts",
|
|
14209
|
-
"line":
|
|
14264
|
+
"line": 578,
|
|
14210
14265
|
"description": "Use the {{uniqueId}} helper to generate a unique ID string suitable for use as\nan ID attribute in the DOM.\n\nEach invocation of {{uniqueId}} 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```js\nimport { uniqueId } from '@ember/helper';\n\n<template>\n {{#let (uniqueId) as |emailId|}}\n <label for={{emailId}}>Email address</label>\n <input id={{emailId}} type=\"email\" />\n {{/let}}\n</template>\n```",
|
|
14211
14266
|
"class": "@ember/helper",
|
|
14212
14267
|
"module": "@ember/helper"
|
|
14213
14268
|
},
|
|
14214
14269
|
{
|
|
14215
14270
|
"file": "packages/@ember/helper/index.ts",
|
|
14216
|
-
"line":
|
|
14271
|
+
"line": 599,
|
|
14217
14272
|
"description": "The `{{eq}}` helper returns `true` if its two arguments are strictly equal\n(`===`). Takes exactly two arguments.\n\n```js\nimport { eq } from '@ember/helper';\n\n<template>\n {{if (eq @status \"active\") \"Active\" \"Inactive\"}}\n</template>\n```\n\nIn strict-mode (gjs/gts) templates, `eq` is available as a keyword and\ndoes not need to be imported.",
|
|
14218
14273
|
"itemtype": "method",
|
|
14219
14274
|
"name": "eq",
|
|
@@ -14238,7 +14293,7 @@
|
|
|
14238
14293
|
},
|
|
14239
14294
|
{
|
|
14240
14295
|
"file": "packages/@ember/helper/index.ts",
|
|
14241
|
-
"line":
|
|
14296
|
+
"line": 622,
|
|
14242
14297
|
"description": "The `{{neq}}` helper returns `true` if its two arguments are strictly\nnot equal (`!==`). Takes exactly two arguments.\n\n```js\nimport { neq } from '@ember/helper';\n\n<template>\n {{if (neq @status \"active\") \"Not active\" \"Active\"}}\n</template>\n```\n\nIn strict-mode (gjs/gts) templates, `neq` is available as a keyword and\ndoes not need to be imported.",
|
|
14243
14298
|
"itemtype": "method",
|
|
14244
14299
|
"name": "neq",
|
|
@@ -14263,7 +14318,7 @@
|
|
|
14263
14318
|
},
|
|
14264
14319
|
{
|
|
14265
14320
|
"file": "packages/@ember/helper/index.ts",
|
|
14266
|
-
"line":
|
|
14321
|
+
"line": 645,
|
|
14267
14322
|
"description": "The `{{and}}` helper evaluates arguments left to right, returning the first\nfalsy value (using Handlebars truthiness) or the right-most value if all\nare truthy. Requires at least two arguments.\n\n```js\nimport { and } from '@ember/helper';\n\n<template>\n {{if (and @isAdmin @isLoggedIn) \"Welcome, admin!\" \"Access denied\"}}\n</template>\n```\n\nIn strict-mode (gjs/gts) templates, `and` is available as a keyword and\ndoes not need to be imported.",
|
|
14268
14323
|
"itemtype": "method",
|
|
14269
14324
|
"name": "and",
|
|
@@ -14283,7 +14338,7 @@
|
|
|
14283
14338
|
},
|
|
14284
14339
|
{
|
|
14285
14340
|
"file": "packages/@ember/helper/index.ts",
|
|
14286
|
-
"line":
|
|
14341
|
+
"line": 668,
|
|
14287
14342
|
"description": "The `{{or}}` helper evaluates arguments left to right, returning the first\ntruthy value (using Handlebars truthiness) or the right-most value if all\nare falsy. Requires at least two arguments.\n\n```js\nimport { or } from '@ember/helper';\n\n<template>\n {{if (or @hasAccess @isAdmin) \"Welcome!\" \"No access\"}}\n</template>\n```\n\nIn strict-mode (gjs/gts) templates, `or` is available as a keyword and\ndoes not need to be imported.",
|
|
14288
14343
|
"itemtype": "method",
|
|
14289
14344
|
"name": "or",
|
|
@@ -14303,7 +14358,7 @@
|
|
|
14303
14358
|
},
|
|
14304
14359
|
{
|
|
14305
14360
|
"file": "packages/@ember/helper/index.ts",
|
|
14306
|
-
"line":
|
|
14361
|
+
"line": 691,
|
|
14307
14362
|
"description": "The `{{not}}` helper returns the logical negation of its argument using\nHandlebars truthiness. Takes exactly one argument.\n\n```js\nimport { not } from '@ember/helper';\n\n<template>\n {{if (not @isDisabled) \"Enabled\" \"Disabled\"}}\n</template>\n```\n\nIn strict-mode (gjs/gts) templates, `not` is available as a keyword and\ndoes not need to be imported.",
|
|
14308
14363
|
"itemtype": "method",
|
|
14309
14364
|
"name": "not",
|
|
@@ -15709,7 +15764,7 @@
|
|
|
15709
15764
|
{
|
|
15710
15765
|
"file": "packages/@ember/object/index.ts",
|
|
15711
15766
|
"line": 48,
|
|
15712
|
-
"description": "Decorator that turns the target function into an Action which can be accessed\ndirectly by reference.\n\n```
|
|
15767
|
+
"description": "Decorator that turns the target function into an Action which can be accessed\ndirectly by reference.\n\n```gjs\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\n\nexport default class Tooltip extends Component {\n @tracked isShowing = false;\n\n @action\n toggleShowing() {\n this.isShowing = !this.isShowing;\n }\n \n <template>\n <button {{on \"click\" this.toggleShowing}}>Show tooltip</button>\n \n {{#if isShowing}}\n <div class=\"tooltip\">\n I'm a tooltip!\n </div>\n {{/if}}\n </template>\n}\n```\n\nIt also binds the function directly to the instance, so it can be used in any\ncontext and will correctly refer to the class it came from:\n\n```gjs\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\n\nexport default class Tooltip extends Component {\n constructor() {\n super(...arguments);\n\n // this.toggleShowing is still bound correctly when added to\n // the event listener\n document.addEventListener('click', this.toggleShowing);\n }\n\n @tracked isShowing = false;\n\n @action\n toggleShowing() {\n this.isShowing = !this.isShowing;\n }\n \n <template>\n {{!-- ...--}}\n </template>\n}\n```",
|
|
15713
15768
|
"access": "public",
|
|
15714
15769
|
"tagname": "",
|
|
15715
15770
|
"itemtype": "method",
|
|
@@ -15731,8 +15786,8 @@
|
|
|
15731
15786
|
},
|
|
15732
15787
|
{
|
|
15733
15788
|
"file": "packages/@ember/object/index.ts",
|
|
15734
|
-
"line":
|
|
15735
|
-
"description": "Specify a method that observes property changes.\n\n```javascript\nimport EmberObject from '@ember/object';\nimport { observer } from '@ember/object';\n\nexport default EmberObject.extend({\n valueObserver: observer('value', function() {\n // Executes whenever the \"value\" property changes\n })\n});\n```\n\
|
|
15789
|
+
"line": 241,
|
|
15790
|
+
"description": "Specify a method that observes property changes.\n\n```javascript\nimport EmberObject from '@ember/object';\nimport { observer } from '@ember/object';\n\nexport default EmberObject.extend({\n valueObserver: observer('value', function() {\n // Executes whenever the \"value\" property changes\n })\n});\n```\n\nWhile observers are still supported, there are [plans to deprecate them](https://github.com/emberjs/rfcs/pull/1115)\nSee the [in-progress deprecation guide](https://github.com/ember-learn/deprecation-app/pull/1407) \nfor guidance on how to avoid using observers.",
|
|
15736
15791
|
"itemtype": "method",
|
|
15737
15792
|
"name": "observer",
|
|
15738
15793
|
"params": [
|
|
@@ -16042,7 +16097,7 @@
|
|
|
16042
16097
|
{
|
|
16043
16098
|
"file": "packages/@ember/object/observable.ts",
|
|
16044
16099
|
"line": 250,
|
|
16045
|
-
"description": "Adds an observer on a property.\n\nThis is the core method used to register an observer for a property.\n\nOnce you call this method, any time the key's value is set, your observer\nwill be notified. Note that the observers are triggered any time the\nvalue is set, regardless of whether it has actually changed. Your\nobserver should be prepared to handle that.\n\nThere are two common invocation patterns for `.addObserver()`:\n\n- Passing two arguments:\n - the name of the property to observe (as a string)\n - the function to invoke (an actual function)\n- Passing three arguments:\n - the name of the property to observe (as a string)\n - the target object (will be used to look up and invoke a\n function on)\n - the name of the function to invoke on the target object\n (as a string).\n\n```app/components/my-component.js\nimport Component from '@ember/component';\n\nexport default Component.extend({\n init() {\n this._super(...arguments);\n\n // the following are equivalent:\n\n // using three arguments\n this.addObserver('foo', this, 'fooDidChange');\n\n // using two arguments\n this.addObserver('foo', (...args) => {\n this.fooDidChange(...args);\n });\n },\n\n fooDidChange() {\n // your custom logic code\n }\n});\n```\n\n### Observer Methods\n\nObserver methods have the following signature:\n\n```app/components/my-component.js\nimport Component from '@ember/component';\n\nexport default Component.extend({\n init() {\n this._super(...arguments);\n this.addObserver('foo', this, 'fooDidChange');\n },\n\n fooDidChange(sender, key, value, rev) {\n // your code\n }\n});\n```\n\nThe `sender` is the object that changed. The `key` is the property that\nchanges. The `value` property is currently reserved and unused. The `rev`\nis the last property revision of the object when it changed, which you can\nuse to detect if the key value has really changed or not.\n\nUsually you will not need the value or revision parameters at\nthe end. In this case, it is common to write observer methods that take\nonly a sender and key value as parameters or, if you aren't interested in\nany of these values, to write an observer that has no parameters at all.",
|
|
16100
|
+
"description": "Adds an observer on a property.\n\nThis is the core method used to register an observer for a property.\n\nOnce you call this method, any time the key's value is set, your observer\nwill be notified. Note that the observers are triggered any time the\nvalue is set, regardless of whether it has actually changed. Your\nobserver should be prepared to handle that.\n\nThere are two common invocation patterns for `.addObserver()`:\n\n- Passing two arguments:\n - the name of the property to observe (as a string)\n - the function to invoke (an actual function)\n- Passing three arguments:\n - the name of the property to observe (as a string)\n - the target object (will be used to look up and invoke a\n function on)\n - the name of the function to invoke on the target object\n (as a string).\n\n```app/components/my-component.js\nimport Component from '@ember/component';\n\nexport default Component.extend({\n init() {\n this._super(...arguments);\n\n // the following are equivalent:\n\n // using three arguments\n this.addObserver('foo', this, 'fooDidChange');\n\n // using two arguments\n this.addObserver('foo', (...args) => {\n this.fooDidChange(...args);\n });\n },\n\n fooDidChange() {\n // your custom logic code\n }\n});\n```\n\n### Observer Methods\n\nObserver methods have the following signature:\n\n```app/components/my-component.js\nimport Component from '@ember/component';\n\nexport default Component.extend({\n init() {\n this._super(...arguments);\n this.addObserver('foo', this, 'fooDidChange');\n },\n\n fooDidChange(sender, key, value, rev) {\n // your code\n }\n});\n```\n\nThe `sender` is the object that changed. The `key` is the property that\nchanges. The `value` property is currently reserved and unused. The `rev`\nis the last property revision of the object when it changed, which you can\nuse to detect if the key value has really changed or not.\n\nUsually you will not need the value or revision parameters at\nthe end. In this case, it is common to write observer methods that take\nonly a sender and key value as parameters or, if you aren't interested in\nany of these values, to write an observer that has no parameters at all.\n\nWhile observers are still supported, there are [plans to deprecate them](https://github.com/emberjs/rfcs/pull/1115)\nSee the [in-progress deprecation guide](https://github.com/ember-learn/deprecation-app/pull/1407)\nfor guidance on how to avoid using observers.",
|
|
16046
16101
|
"itemtype": "method",
|
|
16047
16102
|
"name": "addObserver",
|
|
16048
16103
|
"params": [
|
|
@@ -16078,7 +16133,7 @@
|
|
|
16078
16133
|
},
|
|
16079
16134
|
{
|
|
16080
16135
|
"file": "packages/@ember/object/observable.ts",
|
|
16081
|
-
"line":
|
|
16136
|
+
"line": 340,
|
|
16082
16137
|
"description": "Remove an observer you have previously registered on this object. Pass\nthe same key, target, and method you passed to `addObserver()` and your\ntarget will no longer receive notifications.",
|
|
16083
16138
|
"itemtype": "method",
|
|
16084
16139
|
"name": "removeObserver",
|
|
@@ -16115,7 +16170,7 @@
|
|
|
16115
16170
|
},
|
|
16116
16171
|
{
|
|
16117
16172
|
"file": "packages/@ember/object/observable.ts",
|
|
16118
|
-
"line":
|
|
16173
|
+
"line": 361,
|
|
16119
16174
|
"description": "Set the value of a property to the current value plus some amount.\n\n```javascript\nperson.incrementProperty('age');\nteam.incrementProperty('score', 2);\n```",
|
|
16120
16175
|
"itemtype": "method",
|
|
16121
16176
|
"name": "incrementProperty",
|
|
@@ -16142,7 +16197,7 @@
|
|
|
16142
16197
|
},
|
|
16143
16198
|
{
|
|
16144
16199
|
"file": "packages/@ember/object/observable.ts",
|
|
16145
|
-
"line":
|
|
16200
|
+
"line": 378,
|
|
16146
16201
|
"description": "Set the value of a property to the current value minus some amount.\n\n```javascript\nplayer.decrementProperty('lives');\norc.decrementProperty('health', 5);\n```",
|
|
16147
16202
|
"itemtype": "method",
|
|
16148
16203
|
"name": "decrementProperty",
|
|
@@ -16169,7 +16224,7 @@
|
|
|
16169
16224
|
},
|
|
16170
16225
|
{
|
|
16171
16226
|
"file": "packages/@ember/object/observable.ts",
|
|
16172
|
-
"line":
|
|
16227
|
+
"line": 395,
|
|
16173
16228
|
"description": "Set the value of a boolean property to the opposite of its\ncurrent value.\n\n```javascript\nstarship.toggleProperty('warpDriveEngaged');\n```",
|
|
16174
16229
|
"itemtype": "method",
|
|
16175
16230
|
"name": "toggleProperty",
|
|
@@ -16191,7 +16246,7 @@
|
|
|
16191
16246
|
},
|
|
16192
16247
|
{
|
|
16193
16248
|
"file": "packages/@ember/object/observable.ts",
|
|
16194
|
-
"line":
|
|
16249
|
+
"line": 410,
|
|
16195
16250
|
"description": "Returns 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.",
|
|
16196
16251
|
"itemtype": "method",
|
|
16197
16252
|
"name": "cacheFor",
|
|
@@ -16213,7 +16268,7 @@
|
|
|
16213
16268
|
},
|
|
16214
16269
|
{
|
|
16215
16270
|
"file": "packages/@ember/object/observable.ts",
|
|
16216
|
-
"line":
|
|
16271
|
+
"line": 440,
|
|
16217
16272
|
"description": "Begins a grouping of property changes.\n\nYou can use this method to group property changes so that notifications\nwill not be sent until the changes are finished. If you plan to make a\nlarge number of changes to an object at one time, you should call this\nmethod at the beginning of the changes to begin deferring change\nnotifications. When you are done making changes, call\n`endPropertyChanges()` to deliver the deferred change notifications and end\ndeferring.",
|
|
16218
16273
|
"itemtype": "method",
|
|
16219
16274
|
"name": "beginPropertyChanges",
|
|
@@ -16228,7 +16283,7 @@
|
|
|
16228
16283
|
},
|
|
16229
16284
|
{
|
|
16230
16285
|
"file": "packages/@ember/object/observable.ts",
|
|
16231
|
-
"line":
|
|
16286
|
+
"line": 460,
|
|
16232
16287
|
"description": "Ends a grouping of property changes.\n\nYou can use this method to group property changes so that notifications\nwill not be sent until the changes are finished. If you plan to make a\nlarge number of changes to an object at one time, you should call\n`beginPropertyChanges()` at the beginning of the changes to defer change\nnotifications. When you are done making changes, call this method to\ndeliver the deferred change notifications and end deferring.",
|
|
16233
16288
|
"itemtype": "method",
|
|
16234
16289
|
"name": "endPropertyChanges",
|
|
@@ -16243,7 +16298,7 @@
|
|
|
16243
16298
|
},
|
|
16244
16299
|
{
|
|
16245
16300
|
"file": "packages/@ember/object/observable.ts",
|
|
16246
|
-
"line":
|
|
16301
|
+
"line": 504,
|
|
16247
16302
|
"description": "Returns `true` if the object currently has observers registered for a\nparticular key. You can use this method to potentially defer performing\nan expensive action until someone begins observing a particular property\non the object.",
|
|
16248
16303
|
"itemtype": "method",
|
|
16249
16304
|
"name": "hasObserverFor",
|
|
@@ -16429,10 +16484,7 @@
|
|
|
16429
16484
|
{
|
|
16430
16485
|
"file": "packages/@ember/reactive/collections.ts",
|
|
16431
16486
|
"line": 8,
|
|
16432
|
-
"description": "A utility for creating tracked arrays, copying the original data so that\nmutations to the tracked data don't mutate the original untracked data.\n\n`trackedArray` can be used in templates and in JavaScript via import.\nAll property accesses entangle with that property, all property sets dirty\nthat property, and changes to the collection only render what changed\nwithout causing unneeded renders.\n\nSee [MDN for more information](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)",
|
|
16433
|
-
"example": [
|
|
16434
|
-
"\n```javascript\nimport { trackedArray } from '@ember/reactive/collections';\nimport { on } from '@ember/modifier';\nimport { fn } from '@ember/helper';\n\nconst nonTrackedArray = [1, 2, 3];\nconst addTo = (arr) => arr.push(Math.random());\n\n<template>\n {{#let (trackedArray nonTrackedArray) as |arr|}}\n {{#each arr as |datum|}}\n {{datum}}\n {{/each}}\n\n <button {{on 'click' (fn addTo arr)}}>Add Item</button>\n {{/let}}\n</template>\n```"
|
|
16435
|
-
],
|
|
16487
|
+
"description": "A utility for creating tracked arrays, copying the original data so that\nmutations to the tracked data don't mutate the original untracked data.\n\n`trackedArray` can be used in templates and in JavaScript via import.\nAll property accesses entangle with that property, all property sets dirty\nthat property, and changes to the collection only render what changed\nwithout causing unneeded renders.\n\nSee [MDN for more information](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)\n\n```javascript\nimport { trackedArray } from '@ember/reactive/collections';\nimport { on } from '@ember/modifier';\nimport { fn } from '@ember/helper';\n\nconst nonTrackedArray = [1, 2, 3];\nconst addTo = (arr) => arr.push(Math.random());\n\n<template>\n {{#let (trackedArray nonTrackedArray) as |arr|}}\n {{#each arr as |datum|}}\n {{datum}}\n {{/each}}\n\n <button {{on 'click' (fn addTo arr)}}>Add Item</button>\n {{/let}}\n</template>\n```",
|
|
16436
16488
|
"itemtype": "method",
|
|
16437
16489
|
"name": "trackedArray",
|
|
16438
16490
|
"static": 1,
|
|
@@ -16475,11 +16527,8 @@
|
|
|
16475
16527
|
},
|
|
16476
16528
|
{
|
|
16477
16529
|
"file": "packages/@ember/reactive/collections.ts",
|
|
16478
|
-
"line":
|
|
16479
|
-
"description": "A utility for creating tracked objects, copying the original data so that\nmutations to the tracked data don't mutate the original untracked data.\n\n`trackedObject` can be used in templates and in JavaScript via import.\nAll property accesses entangle with that property, all property sets dirty\nthat property, and changes to the collection only render what changed\nwithout causing unneeded renders.\n\nSee [MDN for more information](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)",
|
|
16480
|
-
"example": [
|
|
16481
|
-
"\n```gjs\nimport { trackedObject } from '@ember/reactive/collections';\nimport { on } from '@ember/modifier';\nimport { fn } from '@ember/helper';\n\nconst nonTrackedObject = { a: 1 };\nconst addTo = (obj) => obj[Math.random()] = Math.random();\n\n<template>\n {{#let (trackedObject nonTrackedObject) as |obj|}}\n {{#each-in obj as |key value|}}\n {{key}} => {{value}}<br>\n {{/each-in}}\n\n <button {{on 'click' (fn addTo obj)}}>Add Pair</button>\n {{/let}}\n</template>\n```"
|
|
16482
|
-
],
|
|
16530
|
+
"line": 50,
|
|
16531
|
+
"description": "A utility for creating tracked objects, copying the original data so that\nmutations to the tracked data don't mutate the original untracked data.\n\n`trackedObject` can be used in templates and in JavaScript via import.\nAll property accesses entangle with that property, all property sets dirty\nthat property, and changes to the collection only render what changed\nwithout causing unneeded renders.\n\nSee [MDN for more information](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)\n\n```gjs\nimport { trackedObject } from '@ember/reactive/collections';\nimport { on } from '@ember/modifier';\nimport { fn } from '@ember/helper';\n\nconst nonTrackedObject = { a: 1 };\nconst addTo = (obj) => obj[Math.random()] = Math.random();\n\n<template>\n {{#let (trackedObject nonTrackedObject) as |obj|}}\n {{#each-in obj as |key value|}}\n {{key}} => {{value}}<br>\n {{/each-in}}\n\n <button {{on 'click' (fn addTo obj)}}>Add Pair</button>\n {{/let}}\n</template>\n```",
|
|
16483
16532
|
"itemtype": "method",
|
|
16484
16533
|
"name": "trackedObject",
|
|
16485
16534
|
"static": 1,
|
|
@@ -16522,11 +16571,8 @@
|
|
|
16522
16571
|
},
|
|
16523
16572
|
{
|
|
16524
16573
|
"file": "packages/@ember/reactive/collections.ts",
|
|
16525
|
-
"line":
|
|
16526
|
-
"description": "A utility for creating tracked sets, copying the original data so that\nmutations to the tracked data don't mutate the original untracked data.\n\n`trackedSet` can be used in templates and in JavaScript via import.\nAll property accesses entangle with that property, all property sets dirty\nthat property, and changes to the collection only render what changed\nwithout causing unneeded renders.\n\nSee [MDN for more information](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set)",
|
|
16527
|
-
"example": [
|
|
16528
|
-
"\n```gjs\nimport { trackedSet } from '@ember/reactive/collections';\nimport { on } from '@ember/modifier';\nimport { fn } from '@ember/helper';\n\nconst nonTrackedSet = new Set();\nnonTrackedSet.add(1);\nconst addTo = (set) => set.add(Math.random());\n\n<template>\n {{#let (trackedSet nonTrackedSet) as |set|}}\n {{#each set as |value|}}\n {{value}}<br>\n {{/each}}\n\n <button {{on 'click' (fn addTo set)}}>Add</button>\n {{/let}}\n</template>\n```"
|
|
16529
|
-
],
|
|
16574
|
+
"line": 92,
|
|
16575
|
+
"description": "A utility for creating tracked sets, copying the original data so that\nmutations to the tracked data don't mutate the original untracked data.\n\n`trackedSet` can be used in templates and in JavaScript via import.\nAll property accesses entangle with that property, all property sets dirty\nthat property, and changes to the collection only render what changed\nwithout causing unneeded renders.\n\nSee [MDN for more information](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set)\n\n```gjs\nimport { trackedSet } from '@ember/reactive/collections';\nimport { on } from '@ember/modifier';\nimport { fn } from '@ember/helper';\n\nconst nonTrackedSet = new Set();\nnonTrackedSet.add(1);\nconst addTo = (set) => set.add(Math.random());\n\n<template>\n {{#let (trackedSet nonTrackedSet) as |set|}}\n {{#each set as |value|}}\n {{value}}<br>\n {{/each}}\n\n <button {{on 'click' (fn addTo set)}}>Add</button>\n {{/let}}\n</template>\n```",
|
|
16530
16576
|
"itemtype": "method",
|
|
16531
16577
|
"name": "trackedSet",
|
|
16532
16578
|
"static": 1,
|
|
@@ -16569,11 +16615,8 @@
|
|
|
16569
16615
|
},
|
|
16570
16616
|
{
|
|
16571
16617
|
"file": "packages/@ember/reactive/collections.ts",
|
|
16572
|
-
"line":
|
|
16573
|
-
"description": "A utility for creating tracked weak sets, copying the original data so that\nmutations to the tracked data don't mutate the original untracked data.\n\n`trackedWeakSet` can be used in templates and in JavaScript via import.\nAll property accesses entangle with that property, all property sets dirty\nthat property, and changes to the collection only render what changed\nwithout causing unneeded renders.\n\nWeakSets hold weak references to their values, allowing garbage collection\nwhen objects are no longer referenced elsewhere.\n\nSee [MDN for more information](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet)",
|
|
16574
|
-
"example": [
|
|
16575
|
-
"\n```gjs\nimport { trackedWeakSet } from '@ember/reactive/collections';\nimport { on } from '@ember/modifier';\nimport { fn } from '@ember/helper';\n\nconst nonTrackedWeakSet = new WeakSet();\n\n<template>\n {{#let (trackedWeakSet nonTrackedWeakSet) as |weakSet|}}\n {{log weakSet}}\n {{/let}}\n</template>\n```"
|
|
16576
|
-
],
|
|
16618
|
+
"line": 135,
|
|
16619
|
+
"description": "A utility for creating tracked weak sets, copying the original data so that\nmutations to the tracked data don't mutate the original untracked data.\n\n`trackedWeakSet` can be used in templates and in JavaScript via import.\nAll property accesses entangle with that property, all property sets dirty\nthat property, and changes to the collection only render what changed\nwithout causing unneeded renders.\n\nWeakSets hold weak references to their values, allowing garbage collection\nwhen objects are no longer referenced elsewhere.\n\nSee [MDN for more information](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet)\n\n```gjs\nimport { trackedWeakSet } from '@ember/reactive/collections';\nimport { on } from '@ember/modifier';\nimport { fn } from '@ember/helper';\n\nconst nonTrackedWeakSet = new WeakSet();\n\n<template>\n {{#let (trackedWeakSet nonTrackedWeakSet) as |weakSet|}}\n {{log weakSet}}\n {{/let}}\n</template>\n```",
|
|
16577
16620
|
"itemtype": "method",
|
|
16578
16621
|
"name": "trackedWeakSet",
|
|
16579
16622
|
"static": 1,
|
|
@@ -16616,11 +16659,8 @@
|
|
|
16616
16659
|
},
|
|
16617
16660
|
{
|
|
16618
16661
|
"file": "packages/@ember/reactive/collections.ts",
|
|
16619
|
-
"line":
|
|
16620
|
-
"description": "A utility for creating tracked maps, copying the original data so that\nmutations to the tracked data don't mutate the original untracked data.\n\n`trackedMap` can be used in templates and in JavaScript via import.\nAll property accesses entangle with that property, all property sets dirty\nthat property, and changes to the collection only render what changed\nwithout causing unneeded renders.\n\nSee [MDN for more information](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map)",
|
|
16621
|
-
"example": [
|
|
16622
|
-
"\n```gjs\nimport { trackedMap } from '@ember/reactive/collections';\nimport { on } from '@ember/modifier';\nimport { fn } from '@ember/helper';\n\nconst nonTrackedMap = new Map();\nnonTrackedMap.set('a', 1);\nconst addTo = (map) => map.set(Math.random(), Math.random());\n\n<template>\n {{#let (trackedMap nonTrackedMap) as |map|}}\n {{#each-in map as |key value|}}\n {{key}} => {{value}}<br>\n {{/each-in}}\n\n <button {{on 'click' (fn addTo map)}}>Add Pair</button>\n {{/let}}\n</template>\n```"
|
|
16623
|
-
],
|
|
16662
|
+
"line": 175,
|
|
16663
|
+
"description": "A utility for creating tracked maps, copying the original data so that\nmutations to the tracked data don't mutate the original untracked data.\n\n`trackedMap` can be used in templates and in JavaScript via import.\nAll property accesses entangle with that property, all property sets dirty\nthat property, and changes to the collection only render what changed\nwithout causing unneeded renders.\n\nSee [MDN for more information](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map)\n\n```gjs\nimport { trackedMap } from '@ember/reactive/collections';\nimport { on } from '@ember/modifier';\nimport { fn } from '@ember/helper';\n\nconst nonTrackedMap = new Map();\nnonTrackedMap.set('a', 1);\nconst addTo = (map) => map.set(Math.random(), Math.random());\n\n<template>\n {{#let (trackedMap nonTrackedMap) as |map|}}\n {{#each-in map as |key value|}}\n {{key}} => {{value}}<br>\n {{/each-in}}\n\n <button {{on 'click' (fn addTo map)}}>Add Pair</button>\n {{/let}}\n</template>\n```",
|
|
16624
16664
|
"itemtype": "method",
|
|
16625
16665
|
"name": "trackedMap",
|
|
16626
16666
|
"static": 1,
|
|
@@ -16663,11 +16703,8 @@
|
|
|
16663
16703
|
},
|
|
16664
16704
|
{
|
|
16665
16705
|
"file": "packages/@ember/reactive/collections.ts",
|
|
16666
|
-
"line":
|
|
16667
|
-
"description": "A utility for creating tracked weak maps, copying the original data so that\nmutations to the tracked data don't mutate the original untracked data.\n\n`trackedWeakMap` can be used in templates and in JavaScript via import.\nAll property accesses entangle with that property, all property sets dirty\nthat property, and changes to the collection only render what changed\nwithout causing unneeded renders.\n\nWeakMaps hold weak references to their keys, allowing garbage collection\nwhen key objects are no longer referenced elsewhere.\n\nSee [MDN for more information](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap)",
|
|
16668
|
-
"example": [
|
|
16669
|
-
"\n```gjs\nimport { trackedWeakMap } from '@ember/reactive/collections';\nimport { on } from '@ember/modifier';\nimport { fn } from '@ember/helper';\n\nconst nonTrackedWeakMap = new WeakMap();\n\n<template>\n {{#let (trackedWeakMap nonTrackedWeakMap) as |weakMap|}}\n {{log weakMap}}\n {{/let}}\n</template>\n```"
|
|
16670
|
-
],
|
|
16706
|
+
"line": 218,
|
|
16707
|
+
"description": "A utility for creating tracked weak maps, copying the original data so that\nmutations to the tracked data don't mutate the original untracked data.\n\n`trackedWeakMap` can be used in templates and in JavaScript via import.\nAll property accesses entangle with that property, all property sets dirty\nthat property, and changes to the collection only render what changed\nwithout causing unneeded renders.\n\nWeakMaps hold weak references to their keys, allowing garbage collection\nwhen key objects are no longer referenced elsewhere.\n\nSee [MDN for more information](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap)\n\n```gjs\nimport { trackedWeakMap } from '@ember/reactive/collections';\nimport { on } from '@ember/modifier';\nimport { fn } from '@ember/helper';\n\nconst nonTrackedWeakMap = new WeakMap();\n\n<template>\n {{#let (trackedWeakMap nonTrackedWeakMap) as |weakMap|}}\n {{log weakMap}}\n {{/let}}\n</template>\n```",
|
|
16671
16708
|
"itemtype": "method",
|
|
16672
16709
|
"name": "trackedWeakMap",
|
|
16673
16710
|
"static": 1,
|
|
@@ -18076,7 +18113,7 @@
|
|
|
18076
18113
|
{
|
|
18077
18114
|
"file": "packages/@ember/routing/route.ts",
|
|
18078
18115
|
"line": 1104,
|
|
18079
|
-
"description": "A hook you can implement to convert the URL into the model for\nthis route.\n\n```app/router.js\n// ...\n\nRouter.map(function() {\n this.route('post', { path: '/posts/:post_id' });\n});\n\nexport default Router;\n```\n\nNote that for routes with dynamic segments, this hook is not always\nexecuted. If the route is entered through a transition (e.g. when\nusing the `link-to`
|
|
18116
|
+
"description": "A hook you can implement to convert the URL into the model for\nthis route.\n\n```app/router.js\n// ...\n\nRouter.map(function() {\n this.route('post', { path: '/posts/:post_id' });\n});\n\nexport default Router;\n```\n\nNote that for routes with dynamic segments, this hook is not always\nexecuted. If the route is entered through a transition (e.g. when\nusing the `link-to` helper or the `transitionTo` method\nof routes), and a model context is already provided this hook\nis not called.\n\nA model context does not include a primitive string or number,\nwhich does cause the model hook to be called.\n\nRoutes without dynamic segments will always execute the model hook.\n\n```javascript\n// no dynamic segment, model hook always called\nthis.router.transitionTo('posts');\n\n// model passed in, so model hook not called\nthePost = store.findRecord('post', 1);\nthis.router.transitionTo('post', thePost);\n\n// integer passed in, model hook is called\nthis.router.transitionTo('post', 1);\n\n// model id passed in, model hook is called\n// useful for forcing the hook to execute\nthePost = store.findRecord('post', 1);\nthis.router.transitionTo('post', thePost.id);\n```\n\nThis hook follows the asynchronous/promise semantics\ndescribed in the documentation for `beforeModel`. In particular,\nif a promise returned from `model` fails, the error will be\nhandled by the `error` hook on `Route`.\n\nNote that the legacy behavior of automatically defining a model\nhook when a dynamic segment ending in `_id` is present is\n[deprecated](https://deprecations.emberjs.com/v5.x#toc_deprecate-implicit-route-model).\nYou should explicitly define a model hook whenever any segments are\npresent.\n\nExample\n\n```app/routes/post.js\nimport Route from '@ember/routing/route';\nimport { service } from '@ember/service';\n\nexport default class PostRoute extends Route {\n @service store;\n\n model(params) {\n return this.store.findRecord('post', params.post_id);\n }\n}\n```",
|
|
18080
18117
|
"itemtype": "method",
|
|
18081
18118
|
"name": "model",
|
|
18082
18119
|
"params": [
|
|
@@ -18130,10 +18167,7 @@
|
|
|
18130
18167
|
{
|
|
18131
18168
|
"file": "packages/@ember/routing/route.ts",
|
|
18132
18169
|
"line": 1234,
|
|
18133
|
-
"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';\nimport { service } from '@ember/service';\n\nexport default class PhotosRoute extends Route {\n @service store;\n\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.",
|
|
18134
|
-
"example": [
|
|
18135
|
-
" 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```"
|
|
18136
|
-
],
|
|
18170
|
+
"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';\nimport { service } from '@ember/service';\n\nexport default class PhotosRoute extends Route {\n @service store;\n\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.\n\nExample 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```",
|
|
18137
18171
|
"itemtype": "method",
|
|
18138
18172
|
"name": "setupController",
|
|
18139
18173
|
"params": [
|
|
@@ -18348,7 +18382,7 @@
|
|
|
18348
18382
|
{
|
|
18349
18383
|
"file": "packages/@ember/routing/router-service.ts",
|
|
18350
18384
|
"line": 90,
|
|
18351
|
-
"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.
|
|
18385
|
+
"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.gjs\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```",
|
|
18352
18386
|
"itemtype": "method",
|
|
18353
18387
|
"name": "transitionTo",
|
|
18354
18388
|
"params": [
|
|
@@ -18416,7 +18450,7 @@
|
|
|
18416
18450
|
{
|
|
18417
18451
|
"file": "packages/@ember/routing/router-service.ts",
|
|
18418
18452
|
"line": 190,
|
|
18419
|
-
"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.
|
|
18453
|
+
"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.gjs\nimport CopyLink from '../components/copy-link';\n \n<template>\n <CopyLink @author={{hash id=\"tomster\" name=\"Tomster\"}} />\n</template>\n```\n\n```app/components/copy-link.gjs\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.gjs\nimport CopyLink from '../components/copy-link';\n\n<template>\n <CopyLink @author={{hash id=\"tomster\" name=\"Tomster\"}} />\n</template>\n```\n\n```app/components/copy-link.gjs\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```",
|
|
18420
18454
|
"itemtype": "method",
|
|
18421
18455
|
"name": "urlFor",
|
|
18422
18456
|
"params": [
|
|
@@ -18448,8 +18482,8 @@
|
|
|
18448
18482
|
},
|
|
18449
18483
|
{
|
|
18450
18484
|
"file": "packages/@ember/routing/router-service.ts",
|
|
18451
|
-
"line":
|
|
18452
|
-
"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.
|
|
18485
|
+
"line": 274,
|
|
18486
|
+
"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.gjs\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.gjs\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.",
|
|
18453
18487
|
"itemtype": "method",
|
|
18454
18488
|
"name": "isActive",
|
|
18455
18489
|
"params": [
|
|
@@ -18481,8 +18515,8 @@
|
|
|
18481
18515
|
},
|
|
18482
18516
|
{
|
|
18483
18517
|
"file": "packages/@ember/routing/router-service.ts",
|
|
18484
|
-
"line":
|
|
18485
|
-
"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
|
|
18518
|
+
"line": 379,
|
|
18519
|
+
"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```js\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```",
|
|
18486
18520
|
"itemtype": "method",
|
|
18487
18521
|
"name": "recognize",
|
|
18488
18522
|
"params": [
|
|
@@ -18503,7 +18537,7 @@
|
|
|
18503
18537
|
},
|
|
18504
18538
|
{
|
|
18505
18539
|
"file": "packages/@ember/routing/router-service.ts",
|
|
18506
|
-
"line":
|
|
18540
|
+
"line": 420,
|
|
18507
18541
|
"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`.",
|
|
18508
18542
|
"itemtype": "method",
|
|
18509
18543
|
"name": "recognizeAndLoad",
|
|
@@ -18525,7 +18559,7 @@
|
|
|
18525
18559
|
},
|
|
18526
18560
|
{
|
|
18527
18561
|
"file": "packages/@ember/routing/router-service.ts",
|
|
18528
|
-
"line":
|
|
18562
|
+
"line": 442,
|
|
18529
18563
|
"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```",
|
|
18530
18564
|
"itemtype": "method",
|
|
18531
18565
|
"name": "on",
|
|
@@ -18548,7 +18582,7 @@
|
|
|
18548
18582
|
},
|
|
18549
18583
|
{
|
|
18550
18584
|
"file": "packages/@ember/routing/router-service.ts",
|
|
18551
|
-
"line":
|
|
18585
|
+
"line": 469,
|
|
18552
18586
|
"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 ContactFormRoute 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}\n```",
|
|
18553
18587
|
"itemtype": "method",
|
|
18554
18588
|
"name": "off",
|
|
@@ -18571,7 +18605,7 @@
|
|
|
18571
18605
|
},
|
|
18572
18606
|
{
|
|
18573
18607
|
"file": "packages/@ember/routing/router-service.ts",
|
|
18574
|
-
"line":
|
|
18608
|
+
"line": 502,
|
|
18575
18609
|
"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.",
|
|
18576
18610
|
"itemtype": "event",
|
|
18577
18611
|
"name": "routeWillChange",
|
|
@@ -18589,7 +18623,7 @@
|
|
|
18589
18623
|
},
|
|
18590
18624
|
{
|
|
18591
18625
|
"file": "packages/@ember/routing/router-service.ts",
|
|
18592
|
-
"line":
|
|
18626
|
+
"line": 536,
|
|
18593
18627
|
"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.",
|
|
18594
18628
|
"itemtype": "event",
|
|
18595
18629
|
"name": "routeDidChange",
|
|
@@ -18607,7 +18641,7 @@
|
|
|
18607
18641
|
},
|
|
18608
18642
|
{
|
|
18609
18643
|
"file": "packages/@ember/routing/router-service.ts",
|
|
18610
|
-
"line":
|
|
18644
|
+
"line": 576,
|
|
18611
18645
|
"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.",
|
|
18612
18646
|
"itemtype": "method",
|
|
18613
18647
|
"name": "refresh",
|
|
@@ -18629,7 +18663,7 @@
|
|
|
18629
18663
|
},
|
|
18630
18664
|
{
|
|
18631
18665
|
"file": "packages/@ember/routing/router-service.ts",
|
|
18632
|
-
"line":
|
|
18666
|
+
"line": 604,
|
|
18633
18667
|
"description": "Name of the current route.\n\n This property represents the logical name of the route,\n which is dot 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`",
|
|
18634
18668
|
"itemtype": "property",
|
|
18635
18669
|
"name": "currentRouteName",
|
|
@@ -18641,7 +18675,7 @@
|
|
|
18641
18675
|
},
|
|
18642
18676
|
{
|
|
18643
18677
|
"file": "packages/@ember/routing/router-service.ts",
|
|
18644
|
-
"line":
|
|
18678
|
+
"line": 634,
|
|
18645
18679
|
"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`",
|
|
18646
18680
|
"itemtype": "property",
|
|
18647
18681
|
"name": "currentURL",
|
|
@@ -18653,7 +18687,7 @@
|
|
|
18653
18687
|
},
|
|
18654
18688
|
{
|
|
18655
18689
|
"file": "packages/@ember/routing/router-service.ts",
|
|
18656
|
-
"line":
|
|
18690
|
+
"line": 663,
|
|
18657
18691
|
"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`hash`, `history`, `none`.\n\nSee [HashLocation](/ember/release/classes/HashLocation).\nSee [HistoryLocation](/ember/release/classes/HistoryLocation).\nSee [NoneLocation](/ember/release/classes/NoneLocation).",
|
|
18658
18692
|
"itemtype": "property",
|
|
18659
18693
|
"name": "location",
|
|
@@ -18668,7 +18702,7 @@
|
|
|
18668
18702
|
},
|
|
18669
18703
|
{
|
|
18670
18704
|
"file": "packages/@ember/routing/router-service.ts",
|
|
18671
|
-
"line":
|
|
18705
|
+
"line": 702,
|
|
18672
18706
|
"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`.",
|
|
18673
18707
|
"itemtype": "property",
|
|
18674
18708
|
"name": "rootURL",
|
|
@@ -18680,8 +18714,8 @@
|
|
|
18680
18714
|
},
|
|
18681
18715
|
{
|
|
18682
18716
|
"file": "packages/@ember/routing/router-service.ts",
|
|
18683
|
-
"line":
|
|
18684
|
-
"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.
|
|
18717
|
+
"line": 732,
|
|
18718
|
+
"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.gjs\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```",
|
|
18685
18719
|
"itemtype": "property",
|
|
18686
18720
|
"name": "currentRoute",
|
|
18687
18721
|
"type": "RouteInfo",
|
|
@@ -20176,7 +20210,7 @@
|
|
|
20176
20210
|
},
|
|
20177
20211
|
{
|
|
20178
20212
|
"file": "packages/@ember/utils/lib/compare.ts",
|
|
20179
|
-
"line":
|
|
20213
|
+
"line": 52,
|
|
20180
20214
|
"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 ```",
|
|
20181
20215
|
"itemtype": "method",
|
|
20182
20216
|
"name": "compare",
|
|
@@ -21987,10 +22021,7 @@
|
|
|
21987
22021
|
{
|
|
21988
22022
|
"file": "packages/@glimmer/runtime/lib/component/template-only.ts",
|
|
21989
22023
|
"line": 59,
|
|
21990
|
-
"description": "This utility function is used to declare a given component has no backing class. When the rendering engine detects this it\nis able to perform a number of optimizations. Templates that are associated with `templateOnly()` will be rendered _as is_\nwithout adding a wrapping `<div>` (or any of the other element customization behaviors of [@ember/component](/ember/release/classes/Component)).\nSpecifically, this means that the template will be rendered as \"outer HTML\".\n\nIn general, this method will be used by build time tooling and would not be directly written in an application. However,\nat times it may be useful to use directly to leverage the \"outer HTML\" semantics mentioned above. For example, if an addon would like\nto use these semantics for its templates but cannot be certain it will only be consumed by applications that have enabled the\n`template-only-glimmer-components` optional feature
|
|
21991
|
-
"example": [
|
|
21992
|
-
"\n\n```js\nimport { templateOnlyComponent } from '@glimmer/runtime';\n\nexport default templateOnlyComponent();\n```"
|
|
21993
|
-
],
|
|
22024
|
+
"description": "This utility function is used to declare a given component has no backing class. When the rendering engine detects this it\nis able to perform a number of optimizations. Templates that are associated with `templateOnly()` will be rendered _as is_\nwithout adding a wrapping `<div>` (or any of the other element customization behaviors of [@ember/component](/ember/release/classes/Component)).\nSpecifically, this means that the template will be rendered as \"outer HTML\".\n\nIn general, this method will be used by build time tooling and would not be directly written in an application. However,\nat times it may be useful to use directly to leverage the \"outer HTML\" semantics mentioned above. For example, if an addon would like\nto use these semantics for its templates but cannot be certain it will only be consumed by applications that have enabled the\n`template-only-glimmer-components` optional feature.\n\n```js\nimport { templateOnlyComponent } from '@glimmer/runtime';\n\nexport default templateOnlyComponent();\n```",
|
|
21994
22025
|
"access": "public",
|
|
21995
22026
|
"tagname": "",
|
|
21996
22027
|
"itemtype": "method",
|
|
@@ -22011,7 +22042,7 @@
|
|
|
22011
22042
|
{
|
|
22012
22043
|
"file": "packages/@glimmer/runtime/lib/helpers/array.ts",
|
|
22013
22044
|
"line": 8,
|
|
22014
|
-
"description": "Use the `{{array}}` helper to create an array to pass as an option to your\ncomponents.\n\n```handlebars\n<MyComponent @people={{array\n 'Tom Dale'\n 'Yehuda Katz'\n this.myOtherPerson}}\n/>\n```\n or\n```handlebars\n{{
|
|
22045
|
+
"description": "Use the `{{array}}` helper to create an array to pass as an option to your\ncomponents.\n\n```handlebars\n<MyComponent @people={{array\n 'Tom Dale'\n 'Yehuda Katz'\n this.myOtherPerson}}\n/>\n```\n or\n```handlebars\n{{yield people=(array\n 'Tom Dale'\n 'Yehuda Katz'\n this.myOtherPerson)\n}}\n```\n\nWould result in an object such as:\n\n```js\n['Tom Dale', 'Yehuda Katz', this.get('myOtherPerson')]\n```\n\nWhere the 3rd item in the array is bound to updates of the `myOtherPerson` property.",
|
|
22015
22046
|
"itemtype": "method",
|
|
22016
22047
|
"name": "array",
|
|
22017
22048
|
"params": [
|
|
@@ -22033,7 +22064,7 @@
|
|
|
22033
22064
|
{
|
|
22034
22065
|
"file": "packages/@glimmer/runtime/lib/helpers/concat.ts",
|
|
22035
22066
|
"line": 18,
|
|
22036
|
-
"description": "Concatenates the given arguments into a string.\n\nExample:\n\n```
|
|
22067
|
+
"description": "Concatenates the given arguments into a string.\n\nExample:\n\n\n```gjs\nimport { concat } from '@ember/helper';\n\n<template>\n{{yield (concat firstName \" \" lastName)}}\n\n{{! would yield name=\"<first name value> <last name value>\" to the component}}\n</template>\n```\n\nor for angle bracket invocation, you actually don't need concat at all.\n\n```handlebars\n<SomeComponent @name=\"{{firstName}} {{lastName}}\" />\n```",
|
|
22037
22068
|
"access": "public",
|
|
22038
22069
|
"tagname": "",
|
|
22039
22070
|
"itemtype": "method",
|
|
@@ -22051,7 +22082,7 @@
|
|
|
22051
22082
|
{
|
|
22052
22083
|
"file": "packages/@glimmer/runtime/lib/helpers/fn.ts",
|
|
22053
22084
|
"line": 18,
|
|
22054
|
-
"description": "The `fn` helper allows you to ensure a function that you are passing off\nto another component, helper, or modifier has access to arguments that are\navailable in the template.\n\nFor example, if you have an `each` helper looping over a number of items, you\nmay need to pass a function that expects to receive the item as an argument\nto a component invoked within the loop. Here's how you could use the `fn`\nhelper to pass both the function and its arguments together:\n\n
|
|
22085
|
+
"description": "The `fn` helper allows you to ensure a function that you are passing off\nto another component, helper, or modifier has access to arguments that are\navailable in the template.\n\nFor example, if you have an `each` helper looping over a number of items, you\nmay need to pass a function that expects to receive the item as an argument\nto a component invoked within the loop. Here's how you could use the `fn`\nhelper to pass both the function and its arguments together:\n\n```app/components/items-listing.gjs\nimport DisplayItem from './display-item';\n \n<template>\n {{#each @items as |item|}}\n <DisplayItem @item=item @select={{fn this.handleSelected item}} />\n {{/each}}\n</template>\n```\n\n```app/components/items-list.gjs\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\n\nexport default class ItemsList extends Component {\n handleSelected = (item) => {\n // ...snip...\n }\n}\n```\n\nIn this case the `DisplayItem` component will receive a normal function\nthat it can invoke. When it invokes the function, the `handleSelected`\nfunction will receive the `item` and any arguments passed, thanks to the\n`fn` helper.\n\nLet's take look at what that means in a couple circumstances:\n\n- When invoked as `this.args.select()` the `handleSelected` function will\n receive the `item` from the loop as its first and only argument.\n- When invoked as `this.args.select('foo')` the `handleSelected` function\n will receive the `item` from the loop as its first argument and the\n string `'foo'` as its second argument.\n\nIn the example above, we used an arrow function to ensure that\n`handleSelected` is properly bound to the `items-list`, but let's explore what\nhappens if we left out the arrow function:\n\n```app/components/items-list.gjs\nimport Component from '@glimmer/component';\n\nexport default class ItemsList extends Component {\n handleSelected(item) {\n // ...snip...\n }\n}\n```\n\nIn this example, when `handleSelected` is invoked inside the `display-item`\ncomponent, it will **not** have access to the component instance. In other\nwords, it will have no `this` context, so please make sure your functions\nare bound (via an arrow function or other means) before passing into `fn`!\n\nSee also [partial application](https://en.wikipedia.org/wiki/Partial_application).\n\n`fn` is built-in and does not require any additional imports.",
|
|
22055
22086
|
"itemtype": "method",
|
|
22056
22087
|
"name": "fn",
|
|
22057
22088
|
"access": "public",
|
|
@@ -22062,7 +22093,7 @@
|
|
|
22062
22093
|
{
|
|
22063
22094
|
"file": "packages/@glimmer/runtime/lib/helpers/get.ts",
|
|
22064
22095
|
"line": 12,
|
|
22065
|
-
"description": "Dynamically look up a property on an object. The second argument to `{{get}}`\nshould have a string value, although it can be bound.\n\nFor example, these two usages are equivalent:\n\n```app/components/developer-detail.
|
|
22096
|
+
"description": "Dynamically look up a property on an object. The second argument to `{{get}}`\nshould have a string value, although it can be bound.\n\nFor example, these two usages are equivalent:\n\n```app/components/developer-detail.gjs\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { get } from '@ember/object';\n\nexport default class extends Component {\n @tracked developer = {\n name: \"Sandi Metz\",\n language: \"Ruby\"\n }\n \n <template>\n {{this.developer.name}}\n {{get this.developer \"name\"}}\n </template>\n}\n```\n\nIf there were several facts about a person, the `{{get}}` helper can dynamically\npick one:\n\n```app/templates/application.gjs\n<template>\n <DeveloperDetail @factName=\"language\" />\n</template>\n```\n\n```handlebars\n{{get this.developer @factName}}\n```\n\nFor a more complex example, this template would allow the user to switch\nbetween showing the user's height and weight with a click:\n\n```app/components/developer-detail.gjs\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { get } from '@ember/object';\n \nexport default class extends Component {\n @tracked developer = {\n name: \"Sandi Metz\",\n language: \"Ruby\"\n }\n\n @tracked currentFact = 'name'\n\n showFact = (fact) => {\n this.currentFact = fact;\n }\n \n <template>\n {{get this.developer this.currentFact}}\n\n <button {{on 'click' (fn this.showFact \"name\")}}>Show name</button>\n <button {{on 'click' (fn this.showFact \"language\")}}>Show language</button>\n </template>\n}\n```",
|
|
22066
22097
|
"access": "public",
|
|
22067
22098
|
"tagname": "",
|
|
22068
22099
|
"itemtype": "method",
|
|
@@ -22087,7 +22118,7 @@
|
|
|
22087
22118
|
{
|
|
22088
22119
|
"file": "packages/@glimmer/runtime/lib/helpers/hash.ts",
|
|
22089
22120
|
"line": 8,
|
|
22090
|
-
"description": "Use the `{{hash}}` helper to create a hash to pass as an option to your\ncomponents. This is
|
|
22121
|
+
"description": "Use the `{{hash}}` helper to create a hash to pass as an option to your\ncomponents. This is especially useful for contextual components where you can\njust yield a hash:\n\n```handlebars\n{{yield (hash\n name='Sarah'\n title=office\n)}}\n```\n\nWould result in an object such as:\n\n```js\n{ name: 'Sarah', title: this.get('office') }\n```\n\nWhere the `title` is bound to updates of the `office` property.\n\nNote that the hash is an empty object with no prototype chain, therefore\ncommon methods like `toString` are not available in the resulting hash.\nIf you need to use such a method, you can use the `call` or `apply`\napproach:\n\n```js\nfunction toString(obj) {\n return Object.prototype.toString.apply(obj);\n}\n```",
|
|
22091
22122
|
"itemtype": "method",
|
|
22092
22123
|
"name": "hash",
|
|
22093
22124
|
"params": [
|
|
@@ -22130,7 +22161,7 @@
|
|
|
22130
22161
|
{
|
|
22131
22162
|
"file": "packages/@glimmer/runtime/lib/modifiers/on.ts",
|
|
22132
22163
|
"line": 249,
|
|
22133
|
-
"description": "The `{{on}}` modifier lets you easily add event listeners (it uses\n[EventTarget.addEventListener](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)\ninternally).\n\nFor example, if you'd like to run a function on your component when a `<button>`\nin the components template is clicked you might do something like:\n\n```app/components/like-post.
|
|
22164
|
+
"description": "The `{{on}}` modifier lets you easily add event listeners (it uses\n[EventTarget.addEventListener](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)\ninternally).\n\nFor example, if you'd like to run a function on your component when a `<button>`\nin the components template is clicked you might do something like:\n\n```app/components/like-post.gjs\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\n\nexport default class LikePostComponent extends Component {\n saveLike = () => {\n // someone likes your post!\n // better send a request off to your server...\n }\n \n <template>\n <button {{on 'click' this.saveLike}}>Like this post!</button>\n </template>\n}\n```\n\n### Arguments\n\n`{{on}}` accepts two positional arguments, and a few named arguments.\n\nThe positional arguments are:\n\n- `event` -- the name to use when calling `addEventListener`\n- `callback` -- the function to be passed to `addEventListener`\n\nThe named arguments are:\n\n- capture -- a `true` value indicates that events of this type will be dispatched\n to the registered listener before being dispatched to any EventTarget beneath it\n in the DOM tree.\n- once -- indicates that the listener should be invoked at most once after being\n added. If true, the listener would be automatically removed when invoked.\n- passive -- if `true`, indicates that the function specified by listener will never\n call preventDefault(). If a passive listener does call preventDefault(), the user\n agent will do nothing other than generate a console warning. See\n [Improving scrolling performance with passive listeners](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Improving_scrolling_performance_with_passive_listeners)\n to learn more.\n\nThe callback function passed to `{{on}}` will receive any arguments that are passed\nto the event handler. Most commonly this would be the `event` itself.\n\nIf you would like to pass additional arguments to the function you should use\nthe `{{fn}}` helper.\n\nFor example, in our example case above if you'd like to pass in the post that\nwas being liked when the button is clicked you could do something like:\n\n```app/components/like-post.hbs\n<button {{on 'click' (fn this.saveLike @post)}}>Like this post!</button>\n```\n\nIn this case, the `saveLike` function will receive two arguments: the click event\nand the value of `@post`.\n\n### Function Context\n\nIn the example above, we used an arrow function to ensure that `likePost` is\nproperly bound to the `items-list`, but let's explore what happens if we\nleft out the arrow function:\n\n```app/components/like-post.gjs\nimport Component from '@glimmer/component';\n\nexport default class LikePostComponent extends Component {\n saveLike() {\n // ...snip...\n }\n}\n```\n\nIn this example, when the button is clicked `saveLike` will be invoked,\nit will **not** have access to the component instance. In other\nwords, it will have no `this` context, so please make sure your functions\nare bound (via an arrow function or other means) before passing into `on`!",
|
|
22134
22165
|
"itemtype": "method",
|
|
22135
22166
|
"name": "on",
|
|
22136
22167
|
"access": "public",
|
|
@@ -22838,7 +22869,7 @@
|
|
|
22838
22869
|
{
|
|
22839
22870
|
"file": "packages/@glimmer/syntax/dist/es/index.js",
|
|
22840
22871
|
"line": 9480,
|
|
22841
|
-
"description": "Parses and traverses a given
|
|
22872
|
+
"description": "Parses and traverses a given template to extract all template locals\nreferenced that could possible come from the parent scope. Can exclude known keywords\noptionally.",
|
|
22842
22873
|
"class": "@glimmer/tracking",
|
|
22843
22874
|
"module": "@glimmer/component"
|
|
22844
22875
|
},
|
|
@@ -24233,7 +24264,7 @@
|
|
|
24233
24264
|
{
|
|
24234
24265
|
"file": "packages/@glimmer/syntax/lib/get-template-locals.ts",
|
|
24235
24266
|
"line": 84,
|
|
24236
|
-
"description": "Parses and traverses a given
|
|
24267
|
+
"description": "Parses and traverses a given template to extract all template locals\nreferenced that could possible come from the parent scope. Can exclude known keywords\noptionally.",
|
|
24237
24268
|
"class": "@glimmer/tracking",
|
|
24238
24269
|
"module": "@glimmer/component"
|
|
24239
24270
|
},
|
|
@@ -24259,7 +24290,7 @@
|
|
|
24259
24290
|
{
|
|
24260
24291
|
"file": "packages/@glimmer/tracking/index.ts",
|
|
24261
24292
|
"line": 17,
|
|
24262
|
-
"description": "Marks a property as tracked. By default, values that are rendered in Ember app\ntemplates are _static_, meaning that updates to them won't cause the\napplication to rerender. Marking a property as tracked means that when that\nproperty changes, any templates that used that property, directly or\nindirectly, will rerender. For instance, consider this component:\n\n```
|
|
24293
|
+
"description": "Marks a property as tracked. By default, values that are rendered in Ember app\ntemplates are _static_, meaning that updates to them won't cause the\napplication to rerender. Marking a property as tracked means that when that\nproperty changes, any templates that used that property, directly or\nindirectly, will rerender. For instance, consider this component:\n\n```gjs\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\n\nexport default class CounterComponent extends Component {\n @tracked count = 0;\n\n get timesTen() {\n return this.count * 10;\n }\n\n @action\n plusOne() {\n this.count += 1;\n }\n \n <template>\n <div>Count: {{this.count}}</div>\n <div>Times Ten: {{this.timesTen}}</div>\n <div>\n <button {{on \"click\" this.plusOne}}>\n Plus One\n </button>\n </div>\n </template>\n}\n```\n\nBoth the `{{this.count}}` and the `{{this.timesTen}}` properties in the\ntemplate will update whenever the button is clicked. Any tracked properties\nthat are used in any way to calculate a value that is used in the template\nwill cause a rerender when updated - this includes through method calls and\nother means:\n\n```gjs\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\n\nclass Entry {\n @tracked name;\n @tracked phoneNumber;\n\n constructor(name, phoneNumber) {\n this.name = name;\n this.phoneNumber = phoneNumber;\n }\n}\n\nexport default class PhoneBookComponent extends Component {\n entries = [\n new Entry('Pizza Palace', 5551234),\n new Entry('1st Street Cleaners', 5554321),\n new Entry('Plants R Us', 5552468),\n ];\n\n // Any usage of this property will update whenever any of the names in the\n // entries arrays are updated\n get names() {\n return this.entries.map(e => e.name);\n }\n\n // Any usage of this property will update whenever any of the numbers in the\n // entries arrays are updated\n get numbers() {\n return this.getFormattedNumbers();\n }\n\n getFormattedNumbers() {\n return this.entries\n .map(e => e.phoneNumber)\n .map(number => {\n let numberString = '' + number;\n\n return numberString.slice(0, 3) + '-' + numberString.slice(3);\n });\n }\n}\n```\n\nIt's important to note that setting tracked properties will always trigger an\nupdate, even if the property is set to the same value as it was before.\n\n```js\nlet entry = new Entry('Pizza Palace', 5551234);\n// if entry was used when rendering, this would cause a rerender, even though\n// the name is being set to the same value as it was before\nentry.name = entry.name;\n```\n\n`tracked` can also be used with the classic Ember object model in a similar\nmanner to classic computed properties:\n\n```javascript\nimport EmberObject from '@ember/object';\nimport { tracked } from '@glimmer/tracking';\n\nconst Entry = EmberObject.extend({\n name: tracked(),\n phoneNumber: tracked()\n});\n```\n\nOften this is unnecessary, but to ensure robust auto-tracking behavior it is\nadvisable to mark tracked state appropriately wherever possible.\nThis form of `tracked` also accepts an optional configuration object\ncontaining either an initial `value` or an `initializer` function (but not\nboth).\n\n```javascript\nimport EmberObject from '@ember/object';\nimport { tracked } from '@glimmer/tracking';\n\nconst Entry = EmberObject.extend({\n name: tracked({ value: 'Zoey' }),\n favoriteSongs: tracked({\n initializer: () => ['Raspberry Beret', 'Time After Time']\n })\n});\n```",
|
|
24263
24294
|
"itemtype": "method",
|
|
24264
24295
|
"name": "tracked",
|
|
24265
24296
|
"static": 1,
|
|
@@ -24400,7 +24431,7 @@
|
|
|
24400
24431
|
},
|
|
24401
24432
|
{
|
|
24402
24433
|
"file": "packages/@glimmer/validator/lib/validators.ts",
|
|
24403
|
-
"line":
|
|
24434
|
+
"line": 49,
|
|
24404
24435
|
"description": "`value` receives a tag and returns an opaque Revision based on that tag. This\nsnapshot can then later be passed to `validate` with the same tag to\ndetermine if the tag has changed at all since the time that `value` was\ncalled.",
|
|
24405
24436
|
"params": [
|
|
24406
24437
|
{
|
|
@@ -24413,7 +24444,7 @@
|
|
|
24413
24444
|
},
|
|
24414
24445
|
{
|
|
24415
24446
|
"file": "packages/@glimmer/validator/lib/validators.ts",
|
|
24416
|
-
"line":
|
|
24447
|
+
"line": 61,
|
|
24417
24448
|
"description": "`validate` receives a tag and a snapshot from a previous call to `value` with\nthe same tag, and determines if the tag is still valid compared to the\nsnapshot. If the tag's state has changed at all since then, `validate` will\nreturn false, otherwise it will return true. This is used to determine if a\ncalculation related to the tags should be rerun.",
|
|
24418
24449
|
"params": [
|
|
24419
24450
|
{
|
|
@@ -24559,7 +24590,7 @@
|
|
|
24559
24590
|
},
|
|
24560
24591
|
{
|
|
24561
24592
|
"message": "unknown tag: note",
|
|
24562
|
-
"line": " packages/@ember/-internals/glimmer/lib/helper.ts:
|
|
24593
|
+
"line": " packages/@ember/-internals/glimmer/lib/helper.ts:319"
|
|
24563
24594
|
},
|
|
24564
24595
|
{
|
|
24565
24596
|
"message": "unknown tag: decorator",
|
|
@@ -24615,23 +24646,23 @@
|
|
|
24615
24646
|
},
|
|
24616
24647
|
{
|
|
24617
24648
|
"message": "replacing incorrect tag: returns with return",
|
|
24618
|
-
"line": " packages/@ember/reactive/collections.ts:
|
|
24649
|
+
"line": " packages/@ember/reactive/collections.ts:50"
|
|
24619
24650
|
},
|
|
24620
24651
|
{
|
|
24621
24652
|
"message": "replacing incorrect tag: returns with return",
|
|
24622
|
-
"line": " packages/@ember/reactive/collections.ts:
|
|
24653
|
+
"line": " packages/@ember/reactive/collections.ts:92"
|
|
24623
24654
|
},
|
|
24624
24655
|
{
|
|
24625
24656
|
"message": "replacing incorrect tag: returns with return",
|
|
24626
|
-
"line": " packages/@ember/reactive/collections.ts:
|
|
24657
|
+
"line": " packages/@ember/reactive/collections.ts:135"
|
|
24627
24658
|
},
|
|
24628
24659
|
{
|
|
24629
24660
|
"message": "replacing incorrect tag: returns with return",
|
|
24630
|
-
"line": " packages/@ember/reactive/collections.ts:
|
|
24661
|
+
"line": " packages/@ember/reactive/collections.ts:175"
|
|
24631
24662
|
},
|
|
24632
24663
|
{
|
|
24633
24664
|
"message": "replacing incorrect tag: returns with return",
|
|
24634
|
-
"line": " packages/@ember/reactive/collections.ts:
|
|
24665
|
+
"line": " packages/@ember/reactive/collections.ts:218"
|
|
24635
24666
|
},
|
|
24636
24667
|
{
|
|
24637
24668
|
"message": "replacing incorrect tag: returns with return",
|
|
@@ -24733,6 +24764,10 @@
|
|
|
24733
24764
|
"message": "unknown tag: debug",
|
|
24734
24765
|
"line": " packages/@glimmer/runtime/lib/scope.ts:86"
|
|
24735
24766
|
},
|
|
24767
|
+
{
|
|
24768
|
+
"message": "Missing item type\nThe brand for the curly component manager lives in its own module so that\ncode which only needs to *detect* the curly manager (e.g. the resolver)\ndoes not have to import the manager itself (and with it the classic\ncomponent machinery).",
|
|
24769
|
+
"line": " packages/@ember/-internals/glimmer/lib/component-managers/curly-brand.ts:1"
|
|
24770
|
+
},
|
|
24736
24771
|
{
|
|
24737
24772
|
"message": "Missing item type\nThis \"upgrades\" a route template into a invocable component. Conceptually\nit can be 1:1 for each unique `Template`, but it's also cheap to construct,\nso unless the stability is desirable for other reasons, it's probably not\nworth caching this.",
|
|
24738
24773
|
"line": " packages/@ember/-internals/glimmer/lib/component-managers/route-template.ts:113"
|
|
@@ -24747,11 +24782,11 @@
|
|
|
24747
24782
|
},
|
|
24748
24783
|
{
|
|
24749
24784
|
"message": "Missing item type\nThe HTML class attribute.",
|
|
24750
|
-
"line": " packages/@ember/-internals/glimmer/lib/components/input.ts:
|
|
24785
|
+
"line": " packages/@ember/-internals/glimmer/lib/components/input.ts:171"
|
|
24751
24786
|
},
|
|
24752
24787
|
{
|
|
24753
24788
|
"message": "Missing item type\nThe HTML type attribute.",
|
|
24754
|
-
"line": " packages/@ember/-internals/glimmer/lib/components/input.ts:
|
|
24789
|
+
"line": " packages/@ember/-internals/glimmer/lib/components/input.ts:182"
|
|
24755
24790
|
},
|
|
24756
24791
|
{
|
|
24757
24792
|
"message": "Missing item type\nThe default HTML id attribute. We don't really _need_ one, this is just\nadded for compatibility as it's hard to tell if people rely on it being\npresent, and it doens't really hurt.\n\nHowever, don't rely on this internally, like passing it to `getElementId`.\nThis can be (and often is) overriden by passing an `id` attribute on the\ninvocation, which shadows this default id via `...attributes`.",
|
|
@@ -24802,68 +24837,80 @@
|
|
|
24802
24837
|
"line": " packages/@ember/-internals/glimmer/lib/views/outlet.ts:122"
|
|
24803
24838
|
},
|
|
24804
24839
|
{
|
|
24805
|
-
"message": "Missing item type",
|
|
24806
|
-
"line": " packages/@ember/-internals/glimmer/lib/
|
|
24807
|
-
},
|
|
24808
|
-
{
|
|
24809
|
-
"message": "Missing item type\nThe type of a function-based helper.",
|
|
24810
|
-
"line": " packages/@ember/-internals/glimmer/lib/helper.ts:313"
|
|
24840
|
+
"message": "Missing item type\nThe interface the `RendererState` needs from a render root. The base\nrenderer only ever creates `ComponentRootState`s; the classic renderer\n(`./renderer`) adds `ClassicRootState` for outlet/classic-component roots.",
|
|
24841
|
+
"line": " packages/@ember/-internals/glimmer/lib/base-renderer.ts:68"
|
|
24811
24842
|
},
|
|
24812
24843
|
{
|
|
24813
24844
|
"message": "Missing item type\nDestroys the render tree and removes all rendered content from the element rendered into",
|
|
24814
|
-
"line": " packages/@ember/-internals/glimmer/lib/renderer.ts:
|
|
24845
|
+
"line": " packages/@ember/-internals/glimmer/lib/base-renderer.ts:413"
|
|
24815
24846
|
},
|
|
24816
24847
|
{
|
|
24817
24848
|
"message": "Missing item type\nThe GlimmerRenderResult from the last render. Used to get positional\ninformation (firstNode) when a re-render replaces the content, so\nthat the new content is placed at the same DOM position.",
|
|
24818
|
-
"line": " packages/@ember/-internals/glimmer/lib/renderer.ts:
|
|
24849
|
+
"line": " packages/@ember/-internals/glimmer/lib/base-renderer.ts:421"
|
|
24819
24850
|
},
|
|
24820
24851
|
{
|
|
24821
24852
|
"message": "Missing item type\nThe component definition to render.\n\nAny component that has had its manager registered is valid.\nFor the component-types that ship with ember, manager registration\ndoes not need to be worried about.",
|
|
24822
|
-
"line": " packages/@ember/-internals/glimmer/lib/renderer.ts:
|
|
24853
|
+
"line": " packages/@ember/-internals/glimmer/lib/base-renderer.ts:452"
|
|
24823
24854
|
},
|
|
24824
24855
|
{
|
|
24825
24856
|
"message": "Missing item type\nThe element to render the component in to.",
|
|
24826
|
-
"line": " packages/@ember/-internals/glimmer/lib/renderer.ts:
|
|
24857
|
+
"line": " packages/@ember/-internals/glimmer/lib/base-renderer.ts:466"
|
|
24827
24858
|
},
|
|
24828
24859
|
{
|
|
24829
24860
|
"message": "Missing item type\nOptional owner. Defaults to `{}`, can be any object, but will need to implement the [Owner](https://api.emberjs.com/ember/release/classes/Owner) API for components within this render tree to access services.",
|
|
24830
|
-
"line": " packages/@ember/-internals/glimmer/lib/renderer.ts:
|
|
24861
|
+
"line": " packages/@ember/-internals/glimmer/lib/base-renderer.ts:471"
|
|
24831
24862
|
},
|
|
24832
24863
|
{
|
|
24833
24864
|
"message": "Missing item type\nOptionally configure the rendering environment",
|
|
24834
|
-
"line": " packages/@ember/-internals/glimmer/lib/renderer.ts:
|
|
24865
|
+
"line": " packages/@ember/-internals/glimmer/lib/base-renderer.ts:475"
|
|
24835
24866
|
},
|
|
24836
24867
|
{
|
|
24837
24868
|
"message": "Missing item type\nWhen false, modifiers will not run.",
|
|
24838
|
-
"line": " packages/@ember/-internals/glimmer/lib/renderer.ts:
|
|
24869
|
+
"line": " packages/@ember/-internals/glimmer/lib/base-renderer.ts:479"
|
|
24839
24870
|
},
|
|
24840
24871
|
{
|
|
24841
24872
|
"message": "Missing item type\nAll other options are forwarded to the underlying renderer.\n(its API is currently private and out of scope for this RFC,\n so passing additional things here is also considered private API)",
|
|
24842
|
-
"line": " packages/@ember/-internals/glimmer/lib/renderer.ts:
|
|
24873
|
+
"line": " packages/@ember/-internals/glimmer/lib/base-renderer.ts:483"
|
|
24843
24874
|
},
|
|
24844
24875
|
{
|
|
24845
24876
|
"message": "Missing item type\nThese args get passed to the rendered component\n\nIf your args are reactive, re-rendering will happen automatically.",
|
|
24846
|
-
"line": " packages/@ember/-internals/glimmer/lib/renderer.ts:
|
|
24877
|
+
"line": " packages/@ember/-internals/glimmer/lib/base-renderer.ts:491"
|
|
24847
24878
|
},
|
|
24848
24879
|
{
|
|
24849
24880
|
"message": "Missing item type\nSAFETY: we should figure out what we need out of a `document` and narrow the API.\n this exercise should also end up beginning to define what we need for CLI rendering (or to other outputs)",
|
|
24850
|
-
"line": " packages/@ember/-internals/glimmer/lib/renderer.ts:
|
|
24881
|
+
"line": " packages/@ember/-internals/glimmer/lib/base-renderer.ts:500"
|
|
24851
24882
|
},
|
|
24852
24883
|
{
|
|
24853
24884
|
"message": "Missing item type\nReplace all contents, if we've rendered multiple times.\n\nhttps://github.com/emberjs/rfcs/pull/1099/files#diff-2b962105b9083ca84579cdc957f27f49407440f3c5078083fa369ec18cc46da8R365\n\nWe could later add an option to not do this behavior\n\nNOTE: destruction is async",
|
|
24854
|
-
"line": " packages/@ember/-internals/glimmer/lib/renderer.ts:
|
|
24885
|
+
"line": " packages/@ember/-internals/glimmer/lib/base-renderer.ts:521"
|
|
24855
24886
|
},
|
|
24856
24887
|
{
|
|
24857
24888
|
"message": "Missing item type\nWe can only replace the inner HTML the first time.\nBecause destruction is async, it won't be safe to\ndo this again, and we'll have to rely on the above destroy.",
|
|
24858
|
-
"line": " packages/@ember/-internals/glimmer/lib/renderer.ts:
|
|
24889
|
+
"line": " packages/@ember/-internals/glimmer/lib/base-renderer.ts:532"
|
|
24859
24890
|
},
|
|
24860
24891
|
{
|
|
24861
24892
|
"message": "Missing item type\nIf there's an existing render result with valid bounds, use its\nfirstNode as the nextSibling so that new content is inserted at\nthe same DOM position. This ensures stable ordering when multiple\nrenderComponent calls target the same element and one is re-invoked\n(e.g., due to tracked dependency changes).\n\nThe old content's DOM nodes are still present (destruction is async),\nso firstNode() is a valid position reference. The new content is placed\nBEFORE the old content. When the old content is eventually destroyed\n(async clear of bounds), the new content remains in the correct position.",
|
|
24862
|
-
"line": " packages/@ember/-internals/glimmer/lib/renderer.ts:
|
|
24893
|
+
"line": " packages/@ember/-internals/glimmer/lib/base-renderer.ts:541"
|
|
24863
24894
|
},
|
|
24864
24895
|
{
|
|
24865
24896
|
"message": "Missing item type\nSAFETY: are there consequences for being looser with *this* owner?\n the public API for `owner` is kinda `Partial<InternalOwner>`\n aka: implement only what you need.\n But for actual ember apps, you *need* to implement everything\n an app needs (which will actually change and become less over time)",
|
|
24866
|
-
"line": " packages/@ember/-internals/glimmer/lib/renderer.ts:
|
|
24897
|
+
"line": " packages/@ember/-internals/glimmer/lib/base-renderer.ts:609"
|
|
24898
|
+
},
|
|
24899
|
+
{
|
|
24900
|
+
"message": "Missing item type\nThe brand for classic (class-based) helpers lives in its own module so that\ncode which only needs to *detect* classic helpers (e.g. the resolver) does\nnot have to import the classic `Helper` base class (and with it the classic\nobject model: `EmberObject`, `Mixin`, meta, etc.).",
|
|
24901
|
+
"line": " packages/@ember/-internals/glimmer/lib/helper-brand.ts:1"
|
|
24902
|
+
},
|
|
24903
|
+
{
|
|
24904
|
+
"message": "Missing item type",
|
|
24905
|
+
"line": " packages/@ember/-internals/glimmer/lib/helper.ts:135"
|
|
24906
|
+
},
|
|
24907
|
+
{
|
|
24908
|
+
"message": "Missing item type\nThe type of a function-based helper.",
|
|
24909
|
+
"line": " packages/@ember/-internals/glimmer/lib/helper.ts:319"
|
|
24910
|
+
},
|
|
24911
|
+
{
|
|
24912
|
+
"message": "Missing item type\nThe resolver used by the classic application `Renderer`. It extends the\nshared `ResolverImpl` with the keywords that require the router and engine\ninfrastructure (`{{outlet}}` and `{{mount}}`). Keeping these out of the\nbase resolver means renderers that have no router (e.g. `renderComponent`)\ndo not pull the outlet/engine machinery into the build.",
|
|
24913
|
+
"line": " packages/@ember/-internals/glimmer/lib/router-resolver.ts:13"
|
|
24867
24914
|
},
|
|
24868
24915
|
{
|
|
24869
24916
|
"message": "Missing item type\nTest skipped because when an error occurs,\nwe mess up the cache used by renderComponent.",
|
|
@@ -25155,47 +25202,47 @@
|
|
|
25155
25202
|
},
|
|
25156
25203
|
{
|
|
25157
25204
|
"message": "Missing item type\nThe final definition of NativeArray removes all native methods. This is the list of removed methods\nwhen run in Chrome 106.",
|
|
25158
|
-
"line": " packages/@ember/array/index.ts:
|
|
25205
|
+
"line": " packages/@ember/array/index.ts:1855"
|
|
25159
25206
|
},
|
|
25160
25207
|
{
|
|
25161
25208
|
"message": "Missing item type\nThese additional items must be redefined since `Omit` causes methods that return `this` to return the\ntype at the time of the Omit.",
|
|
25162
|
-
"line": " packages/@ember/array/index.ts:
|
|
25209
|
+
"line": " packages/@ember/array/index.ts:1872"
|
|
25163
25210
|
},
|
|
25164
25211
|
{
|
|
25165
25212
|
"message": "Missing item type\nRemove all elements from the array. This is useful if you\nwant to reuse an existing array without having to recreate it.",
|
|
25166
|
-
"line": " packages/@ember/array/index.ts:
|
|
25213
|
+
"line": " packages/@ember/array/index.ts:1896"
|
|
25167
25214
|
},
|
|
25168
25215
|
{
|
|
25169
25216
|
"message": "Missing item type\nThis will use the primitive `replace()` method to insert an object at the\nspecified index.",
|
|
25170
|
-
"line": " packages/@ember/array/index.ts:
|
|
25217
|
+
"line": " packages/@ember/array/index.ts:1901"
|
|
25171
25218
|
},
|
|
25172
25219
|
{
|
|
25173
25220
|
"message": "Missing item type\nRemove an object at the specified index using the `replace()` primitive\nmethod. You can pass either a single index, or a start and a length.",
|
|
25174
|
-
"line": " packages/@ember/array/index.ts:
|
|
25221
|
+
"line": " packages/@ember/array/index.ts:1906"
|
|
25175
25222
|
},
|
|
25176
25223
|
{
|
|
25177
25224
|
"message": "Missing item type\nAdd the objects in the passed numerable to the end of the array. Defers\nnotifying observers of the change until all objects are added.",
|
|
25178
|
-
"line": " packages/@ember/array/index.ts:
|
|
25225
|
+
"line": " packages/@ember/array/index.ts:1911"
|
|
25179
25226
|
},
|
|
25180
25227
|
{
|
|
25181
25228
|
"message": "Missing item type\nAdds the named objects to the beginning of the array. Defers notifying\nobservers until all objects have been added.",
|
|
25182
|
-
"line": " packages/@ember/array/index.ts:
|
|
25229
|
+
"line": " packages/@ember/array/index.ts:1916"
|
|
25183
25230
|
},
|
|
25184
25231
|
{
|
|
25185
25232
|
"message": "Missing item type\nReverse objects in the array. Works just like `reverse()` but it is\nKVO-compliant.",
|
|
25186
|
-
"line": " packages/@ember/array/index.ts:
|
|
25233
|
+
"line": " packages/@ember/array/index.ts:1921"
|
|
25187
25234
|
},
|
|
25188
25235
|
{
|
|
25189
25236
|
"message": "Missing item type\nReplace all the receiver's content with content of the argument.\nIf argument is an empty array receiver will be cleared.",
|
|
25190
|
-
"line": " packages/@ember/array/index.ts:
|
|
25237
|
+
"line": " packages/@ember/array/index.ts:1926"
|
|
25191
25238
|
},
|
|
25192
25239
|
{
|
|
25193
25240
|
"message": "Missing item type\nRemoves each object in the passed array from the receiver.",
|
|
25194
|
-
"line": " packages/@ember/array/index.ts:
|
|
25241
|
+
"line": " packages/@ember/array/index.ts:1948"
|
|
25195
25242
|
},
|
|
25196
25243
|
{
|
|
25197
25244
|
"message": "Missing item type\nAdds each object in the passed enumerable to the receiver.",
|
|
25198
|
-
"line": " packages/@ember/array/index.ts:
|
|
25245
|
+
"line": " packages/@ember/array/index.ts:1969"
|
|
25199
25246
|
},
|
|
25200
25247
|
{
|
|
25201
25248
|
"message": "Missing item type",
|
|
@@ -25239,11 +25286,11 @@
|
|
|
25239
25286
|
},
|
|
25240
25287
|
{
|
|
25241
25288
|
"message": "Missing item type\nTemplate-only components have no backing class instance, so `this` in their\ntemplates is null. This means that you can only reference passed in arguments\n(e.g. `{{@arg}}`).",
|
|
25242
|
-
"line": " packages/@ember/component/template-only.ts:
|
|
25289
|
+
"line": " packages/@ember/component/template-only.ts:34"
|
|
25243
25290
|
},
|
|
25244
25291
|
{
|
|
25245
25292
|
"message": "Missing item type\nA convenience alias for {@link TemplateOnlyComponent}",
|
|
25246
|
-
"line": " packages/@ember/component/template-only.ts:
|
|
25293
|
+
"line": " packages/@ember/component/template-only.ts:42"
|
|
25247
25294
|
},
|
|
25248
25295
|
{
|
|
25249
25296
|
"message": "Missing item type",
|
|
@@ -25266,28 +25313,28 @@
|
|
|
25266
25313
|
"line": " packages/@ember/engine/instance.ts:132"
|
|
25267
25314
|
},
|
|
25268
25315
|
{
|
|
25269
|
-
"message": "Missing item type\nUsing the `{{hash}}` helper, you can pass objects directly from the template\nas an argument to your components.\n\n```\
|
|
25316
|
+
"message": "Missing item type\nUsing the `{{hash}}` helper, you can pass objects directly from the template\nas an argument to your components.\n\n```\n<template>\n {{#each-in (hash givenName='Jen' familyName='Weber') as |key value|}}\n <p>{{key}}: {{value}}</p>\n {{/each-in}}\n</template>\n```",
|
|
25270
25317
|
"line": " packages/@ember/helper/index.ts:346"
|
|
25271
25318
|
},
|
|
25272
25319
|
{
|
|
25273
|
-
"message": "Missing item type\nUsing the `{{array}}` helper, you can pass arrays directly from the template\nas an argument to your components.\n\n```js\
|
|
25274
|
-
"line": " packages/@ember/helper/index.ts:
|
|
25320
|
+
"message": "Missing item type\nUsing the `{{array}}` helper, you can pass arrays directly from the template\nas an argument to your components.\n\n```js\n\n<template>\n <ul>\n {{#each (array 'Tom Dale' 'Yehuda Katz' @anotherPerson) as |person|}}\n <li>{{person}}</li>\n {{/each}}\n </ul>\n</template>\n```",
|
|
25321
|
+
"line": " packages/@ember/helper/index.ts:361"
|
|
25275
25322
|
},
|
|
25276
25323
|
{
|
|
25277
|
-
"message": "Missing item type\nThe `{{concat}}` helper makes it easy to dynamically send a number of\nparameters to a component or helper as a single parameter in the format of a\nconcatenated string.\n\nFor example:\n\n```js\nimport { concat } from '@ember/helper';\n\n<template>\n {{get @foo (concat \"item\" @index)}}\n</template>\n```\n\nThis will display the result of `@foo.item1` when `index` is `1`, and\n`this.foo.item2` when `index` is `2`, etc
|
|
25278
|
-
"line": " packages/@ember/helper/index.ts:
|
|
25324
|
+
"message": "Missing item type\nThe `{{concat}}` helper makes it easy to dynamically send a number of\nparameters to a component or helper as a single parameter in the format of a\nconcatenated string.\n\nFor example:\n\n```js\nimport { concat } from '@ember/helper';\n\n<template>\n {{get @foo (concat \"item\" @index)}}\n</template>\n```\n\nThis will display the result of `@foo.item1` when `index` is `1`, and\n`this.foo.item2` when `index` is `2`, etc.",
|
|
25325
|
+
"line": " packages/@ember/helper/index.ts:379"
|
|
25279
25326
|
},
|
|
25280
25327
|
{
|
|
25281
|
-
"message": "Missing item type\nThe `{{get}}` helper makes it easy to dynamically look up a property on an\nobject or an element in an array. The second argument to `{{get}}` can be a\nstring or a number, depending on the object being accessed.\n\nTo access a property on an object with a string key:\n\n```js\nimport { get } from '@ember/helper';\n\n<template>\n {{get @someObject \"objectKey\"}}\n</template>\n```\n\nTo access the first element in an array:\n\n```js\nimport { get } from '@ember/helper';\n\n<template>\n {{get @someArray 0}}\n</template>\n```\n\nTo access a property on an object with a dynamic key:\n\n```js\nimport { get } from '@ember/helper';\n\n<template>\n {{get @address @field}}\n</template>\n```\n\nThis will display the result of `@foo.item1` when `index` is `1`, and\n`this.foo.item2` when `index` is `2`, etc
|
|
25282
|
-
"line": " packages/@ember/helper/index.ts:
|
|
25328
|
+
"message": "Missing item type\nThe `{{get}}` helper makes it easy to dynamically look up a property on an\nobject or an element in an array. The second argument to `{{get}}` can be a\nstring or a number, depending on the object being accessed.\n\nTo access a property on an object with a string key:\n\n```js\nimport { get } from '@ember/helper';\n\n<template>\n {{get @someObject \"objectKey\"}}\n</template>\n```\n\nTo access the first element in an array:\n\n```js\nimport { get } from '@ember/helper';\n\n<template>\n {{get @someArray 0}}\n</template>\n```\n\nTo access a property on an object with a dynamic key:\n\n```js\nimport { get } from '@ember/helper';\n\n<template>\n {{get @address @field}}\n</template>\n```\n\nThis will display the result of `@foo.item1` when `index` is `1`, and\n`this.foo.item2` when `index` is `2`, etc.",
|
|
25329
|
+
"line": " packages/@ember/helper/index.ts:400"
|
|
25283
25330
|
},
|
|
25284
25331
|
{
|
|
25285
25332
|
"message": "Missing item type\n`{{fn}}` is a helper that receives a function and some arguments, and returns\na new function that combines. This allows you to pass parameters along to\nfunctions in your templates:\n\n```js\nimport { fn } from '@ember/helper';\n\nfunction showAlert(message) {\n alert(`The message is: '${message}'`);\n}\n\n<template>\n <button type=\"button\" {{on \"click\" (fn showAlert \"Hello!\")}}>\n Click me!\n </button>\n</template>\n```",
|
|
25286
|
-
"line": " packages/@ember/helper/index.ts:
|
|
25333
|
+
"line": " packages/@ember/helper/index.ts:441"
|
|
25287
25334
|
},
|
|
25288
25335
|
{
|
|
25289
25336
|
"message": "Missing item type\nUse the {{uniqueId}} helper to generate a unique ID string suitable for use as\nan ID attribute in the DOM.\n\nEach invocation of {{uniqueId}} 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```js\nimport { uniqueId } from '@ember/helper';\n\n<template>\n {{#let (uniqueId) as |emailId|}}\n <label for={{emailId}}>Email address</label>\n <input id={{emailId}} type=\"email\" />\n {{/let}}\n</template>\n```",
|
|
25290
|
-
"line": " packages/@ember/helper/index.ts:
|
|
25337
|
+
"line": " packages/@ember/helper/index.ts:578"
|
|
25291
25338
|
},
|
|
25292
25339
|
{
|
|
25293
25340
|
"message": "Missing item type",
|
|
@@ -26650,7 +26697,7 @@
|
|
|
26650
26697
|
"line": " packages/@glimmer/syntax/dist/es/index.js:9467"
|
|
26651
26698
|
},
|
|
26652
26699
|
{
|
|
26653
|
-
"message": "Missing item type\nParses and traverses a given
|
|
26700
|
+
"message": "Missing item type\nParses and traverses a given template to extract all template locals\nreferenced that could possible come from the parent scope. Can exclude known keywords\noptionally.",
|
|
26654
26701
|
"line": " packages/@glimmer/syntax/dist/es/index.js:9480"
|
|
26655
26702
|
},
|
|
26656
26703
|
{
|
|
@@ -27422,7 +27469,7 @@
|
|
|
27422
27469
|
"line": " packages/@glimmer/syntax/lib/get-template-locals.ts:65"
|
|
27423
27470
|
},
|
|
27424
27471
|
{
|
|
27425
|
-
"message": "Missing item type\nParses and traverses a given
|
|
27472
|
+
"message": "Missing item type\nParses and traverses a given template to extract all template locals\nreferenced that could possible come from the parent scope. Can exclude known keywords\noptionally.",
|
|
27426
27473
|
"line": " packages/@glimmer/syntax/lib/get-template-locals.ts:84"
|
|
27427
27474
|
},
|
|
27428
27475
|
{
|
|
@@ -27503,11 +27550,11 @@
|
|
|
27503
27550
|
},
|
|
27504
27551
|
{
|
|
27505
27552
|
"message": "Missing item type\n`value` receives a tag and returns an opaque Revision based on that tag. This\nsnapshot can then later be passed to `validate` with the same tag to\ndetermine if the tag has changed at all since the time that `value` was\ncalled.",
|
|
27506
|
-
"line": " packages/@glimmer/validator/lib/validators.ts:
|
|
27553
|
+
"line": " packages/@glimmer/validator/lib/validators.ts:49"
|
|
27507
27554
|
},
|
|
27508
27555
|
{
|
|
27509
27556
|
"message": "Missing item type\n`validate` receives a tag and a snapshot from a previous call to `value` with\nthe same tag, and determines if the tag is still valid compared to the\nsnapshot. If the tag's state has changed at all since then, `validate` will\nreturn false, otherwise it will return true. This is used to determine if a\ncalculation related to the tags should be rerun.",
|
|
27510
|
-
"line": " packages/@glimmer/validator/lib/validators.ts:
|
|
27557
|
+
"line": " packages/@glimmer/validator/lib/validators.ts:61"
|
|
27511
27558
|
},
|
|
27512
27559
|
{
|
|
27513
27560
|
"message": "Missing item type\nRegisters\n\nFor the most part, these follows MIPS naming conventions, however the\nregister numbers are different.",
|