ember-source 7.1.0-alpha.5 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build-metadata.json +3 -3
- package/dist/dev/packages/@ember/-internals/glimmer/index.js +11 -11
- package/dist/dev/packages/@ember/-internals/runtime/lib/mixins/target_action_support.js +1 -1
- package/dist/dev/packages/@ember/-internals/views/index.js +0 -1
- package/dist/dev/packages/@ember/-internals/views/lib/views/core_view.js +1 -1
- package/dist/dev/packages/@ember/application/index.js +1 -1
- package/dist/dev/packages/@ember/application/instance.js +1 -1
- package/dist/dev/packages/@ember/array/index.js +4 -0
- package/dist/dev/packages/@ember/component/helper.js +1 -1
- package/dist/dev/packages/@ember/component/index.js +15 -9
- package/dist/dev/packages/@ember/component/template-only.js +1 -1
- package/dist/dev/packages/@ember/engine/index.js +1 -3
- package/dist/dev/packages/@ember/helper/index.js +8 -37
- 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/index.js +22 -17
- package/dist/dev/packages/@ember/reactive/collections.js +2 -0
- package/dist/dev/packages/@ember/renderer/index.js +1 -1
- package/dist/dev/packages/@ember/routing/index.js +11 -7
- package/dist/dev/packages/@ember/routing/route.js +3 -3
- package/dist/dev/packages/@ember/routing/router-service.js +20 -13
- package/dist/dev/packages/@ember/template-compiler/lib/compile-options.js +3 -3
- package/dist/dev/packages/@ember/template-compiler/lib/template.js +3 -3
- package/dist/dev/packages/@ember/template-factory/index.js +1 -1
- package/dist/dev/packages/@glimmer/destroyable/index.js +1 -1
- package/dist/dev/packages/@glimmer/manager/index.js +3 -3
- package/dist/dev/packages/@glimmer/node/index.js +2 -2
- package/dist/dev/packages/@glimmer/opcode-compiler/index.js +2 -5
- package/dist/dev/packages/@glimmer/program/index.js +4 -4
- package/dist/dev/packages/@glimmer/runtime/index.js +10 -12
- package/dist/dev/packages/@glimmer/vm/index.js +1 -1
- package/dist/dev/packages/ember/version.js +1 -1
- package/dist/dev/packages/ember-template-compiler/index.js +2 -2
- package/dist/dev/packages/shared-chunks/{api-AYt3zE12.js → api-BAmlf_CN.js} +1 -1
- package/dist/dev/packages/shared-chunks/{api-WvJPuo9z.js → api-BawZUDYD.js} +1 -1
- package/dist/dev/packages/shared-chunks/assert-Zqc4wiAV.js +6 -0
- package/dist/dev/packages/shared-chunks/{compiler-CXB_8GdR.js → compiler-QUSl_urU.js} +2 -3
- package/dist/dev/packages/shared-chunks/{curly-CvC8E_4-.js → curly-BBzF_bI8.js} +1 -1
- package/dist/dev/packages/shared-chunks/curried-BZnYakIg.js +5 -0
- package/dist/dev/packages/shared-chunks/{debug-to-string-CFb7h0lY.js → debug-to-string-C6LsA_qz.js} +1 -2
- package/dist/dev/packages/shared-chunks/{element-C-QcIABg.js → element-Cf3hqNOD.js} +4 -2
- package/dist/dev/packages/shared-chunks/{element-builder-kHVx0F__.js → element-builder--iTIJyCB.js} +1 -1
- package/dist/dev/packages/shared-chunks/{get-CpJjYeJO.js → get-BehtPmsu.js} +31 -34
- package/dist/dev/packages/shared-chunks/{hash-D3BENmhU.js → hash-BTwOuDGQ.js} +17 -11
- package/dist/dev/packages/shared-chunks/{helper-DlC4YesW.js → helper-BubrhyuN.js} +20 -8
- package/dist/dev/packages/shared-chunks/{index-CTxkmV78.js → index-CL1zjHwo.js} +91 -113
- package/dist/dev/packages/shared-chunks/{index-DmGmwWPJ.js → index-CyZiGiEI.js} +5 -6
- package/dist/dev/packages/shared-chunks/{internal-CbQSKXEm.js → internal-CAL-jHZt.js} +2 -2
- package/dist/dev/packages/shared-chunks/{internal-helper-Dsl9_7H_.js → internal-helper-Ez7zbEIa.js} +1 -1
- package/dist/dev/packages/shared-chunks/{invoke-B6j6DdDz.js → invoke-B8M5fQQS.js} +2 -2
- package/dist/dev/packages/shared-chunks/{on-D8QwT-eN.js → on-BQii6ILK.js} +8 -8
- package/dist/dev/packages/shared-chunks/{or-DBU9Ge4r.js → or-BTH3yuFG.js} +1 -1
- package/dist/dev/packages/shared-chunks/{program-context-CqcQMsfa.js → program-context-CadjldRr.js} +4 -3
- package/dist/{prod/packages/shared-chunks/registers-DoamZwaG.js → dev/packages/shared-chunks/registers-C_W2qYHJ.js} +1 -1
- package/dist/dev/packages/shared-chunks/{rehydrate-builder-DdzXTaJk.js → rehydrate-builder-DCyIgnCR.js} +2 -2
- package/dist/dev/packages/shared-chunks/{render-DDdabL30.js → render-CpKaO-BO.js} +9 -8
- package/dist/dev/packages/shared-chunks/{chunk-3SQBS3Y5-Cj4eryg1.js → runtime-CYyqkz5q-BOdRhmsS.js} +4 -59
- package/dist/dev/packages/shared-chunks/{serialize-builder-B3u9Wr3n.js → serialize-builder-DxgGRvH_.js} +1 -1
- package/dist/dev/packages/shared-chunks/{setup-registry-XxD0xvgf.js → setup-registry-BQZJfq-Y.js} +7 -7
- package/dist/dev/packages/shared-chunks/syscall-ops-BPFtDquC.js +133 -0
- package/dist/dev/packages/shared-chunks/{template-kM-7TTcc.js → template-R_5UMHhb.js} +1 -1
- package/dist/dev/packages/shared-chunks/{template-only-Yluyu0DY.js → template-only-BqOt8bDl.js} +1 -1
- package/dist/dev/packages/shared-chunks/{textarea-C0Us0PNJ.js → textarea-lD4apgrP.js} +9 -5
- package/dist/dev/packages/shared-chunks/{unique-id-A83bjEE-.js → unique-id-CgmHQiwi.js} +1 -1
- package/dist/dev/packages/shared-chunks/{untouchable-this-cH6_N2LJ.js → untouchable-this-B3DVwpHS.js} +6 -6
- package/dist/dev/packages/shared-chunks/vm-ops-ImHv0Wtg.js +12 -0
- package/dist/prod/packages/@ember/-internals/container/index.js +2 -3
- package/dist/prod/packages/@ember/-internals/glimmer/index.js +9 -9
- package/dist/prod/packages/@ember/-internals/meta/lib/meta.js +0 -2
- package/dist/prod/packages/@ember/-internals/metal/index.js +16 -17
- package/dist/prod/packages/@ember/-internals/routing/index.js +1 -2
- package/dist/prod/packages/@ember/-internals/runtime/lib/ext/rsvp.js +0 -1
- package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/-proxy.js +4 -5
- package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/action_handler.js +1 -2
- package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/registry_proxy.js +0 -1
- package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/target_action_support.js +3 -4
- package/dist/prod/packages/@ember/-internals/utils/index.js +0 -1
- package/dist/prod/packages/@ember/-internals/views/index.js +0 -1
- package/dist/prod/packages/@ember/-internals/views/lib/mixins/action_support.js +1 -2
- package/dist/prod/packages/@ember/-internals/views/lib/system/event_dispatcher.js +2 -3
- package/dist/prod/packages/@ember/-internals/views/lib/system/utils.js +0 -1
- package/dist/prod/packages/@ember/-internals/views/lib/views/core_view.js +2 -2
- package/dist/prod/packages/@ember/-internals/views/lib/views/states.js +0 -1
- package/dist/prod/packages/@ember/application/index.js +3 -3
- package/dist/prod/packages/@ember/application/instance.js +3 -4
- package/dist/prod/packages/@ember/application/namespace.js +1 -2
- package/dist/prod/packages/@ember/array/index.js +9 -6
- package/dist/prod/packages/@ember/array/proxy.js +5 -6
- package/dist/prod/packages/@ember/component/helper.js +1 -1
- package/dist/prod/packages/@ember/component/index.js +15 -10
- package/dist/prod/packages/@ember/controller/index.js +3 -3
- package/dist/prod/packages/@ember/debug/data-adapter.js +1 -1
- package/dist/prod/packages/@ember/engine/index.js +3 -6
- package/dist/prod/packages/@ember/engine/instance.js +0 -1
- package/dist/prod/packages/@ember/helper/index.js +5 -34
- package/dist/prod/packages/@ember/modifier/on.js +1 -1
- package/dist/prod/packages/@ember/object/-internals.js +0 -1
- package/dist/prod/packages/@ember/object/compat.js +1 -2
- package/dist/prod/packages/@ember/object/computed.js +2 -2
- package/dist/prod/packages/@ember/object/core.js +5 -6
- 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 +0 -1
- package/dist/prod/packages/@ember/object/lib/computed/computed_macros.js +4 -5
- package/dist/prod/packages/@ember/object/lib/computed/reduce_computed_macros.js +2 -3
- package/dist/prod/packages/@ember/object/mixin.js +4 -5
- package/dist/prod/packages/@ember/object/observable.js +7 -8
- 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 +2 -0
- package/dist/prod/packages/@ember/renderer/index.js +1 -1
- package/dist/prod/packages/@ember/routing/history-location.js +0 -1
- package/dist/prod/packages/@ember/routing/index.js +10 -7
- package/dist/prod/packages/@ember/routing/lib/dsl.js +0 -2
- package/dist/prod/packages/@ember/routing/lib/generate_controller.js +1 -2
- package/dist/prod/packages/@ember/routing/lib/routing-service.js +2 -3
- package/dist/prod/packages/@ember/routing/lib/utils.js +1 -2
- package/dist/prod/packages/@ember/routing/none-location.js +0 -1
- package/dist/prod/packages/@ember/routing/route.js +9 -10
- package/dist/prod/packages/@ember/routing/router-service.js +22 -16
- package/dist/prod/packages/@ember/routing/router.js +3 -4
- package/dist/prod/packages/@ember/runloop/index.js +1 -2
- package/dist/prod/packages/@ember/service/index.js +1 -1
- package/dist/prod/packages/@ember/template-compiler/lib/compile-options.js +3 -4
- package/dist/prod/packages/@ember/template-compiler/lib/plugins/assert-against-attrs.js +0 -1
- package/dist/prod/packages/@ember/template-compiler/lib/plugins/assert-against-named-outlets.js +0 -1
- package/dist/prod/packages/@ember/template-compiler/lib/plugins/assert-input-helper-without-block.js +0 -1
- package/dist/prod/packages/@ember/template-compiler/lib/plugins/assert-reserved-named-arguments.js +0 -2
- package/dist/prod/packages/@ember/template-compiler/lib/plugins/transform-each-track-array.js +0 -1
- package/dist/prod/packages/@ember/template-compiler/lib/plugins/transform-in-element.js +0 -1
- package/dist/prod/packages/@ember/template-compiler/lib/plugins/transform-resolutions.js +0 -1
- 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 +0 -1
- package/dist/prod/packages/@ember/utils/lib/is_empty.js +1 -1
- package/dist/prod/packages/@glimmer/node/index.js +2 -2
- package/dist/prod/packages/@glimmer/opcode-compiler/index.js +2 -5
- package/dist/prod/packages/@glimmer/program/index.js +2 -2
- package/dist/prod/packages/@glimmer/runtime/index.js +9 -11
- package/dist/prod/packages/@glimmer/tracking/index.js +1 -1
- package/dist/prod/packages/@glimmer/vm/index.js +1 -1
- package/dist/prod/packages/ember/version.js +1 -1
- package/dist/prod/packages/ember-template-compiler/index.js +2 -3
- package/dist/prod/packages/shared-chunks/{alias-CLuFeKoV.js → alias-DBW_V5vD.js} +5 -6
- package/dist/prod/packages/shared-chunks/{array-DHdr4__s.js → array-D6Couewv.js} +2 -3
- package/dist/prod/packages/shared-chunks/assert-Zqc4wiAV.js +6 -0
- package/dist/prod/packages/shared-chunks/{chain-tags-BJqcuCM1.js → chain-tags-C9rFtQ_x.js} +0 -1
- package/dist/prod/packages/shared-chunks/{compiler-DjQtTQGk.js → compiler-c4yUVrl_.js} +2 -3
- package/dist/prod/packages/shared-chunks/{computed-2Udcmflw.js → computed-DjCIU_ht.js} +3 -4
- package/dist/prod/packages/shared-chunks/{container-D5NwW5Fd.js → container-BYOnjnwz.js} +0 -1
- package/dist/prod/packages/shared-chunks/{curly-BsqvV8G0.js → curly-ZzX43b50.js} +2 -3
- package/dist/prod/packages/shared-chunks/curried-BZnYakIg.js +5 -0
- package/dist/prod/packages/shared-chunks/{debug-render-tree-BLtnOSbb.js → debug-render-tree-CF5O4-WI.js} +4 -4
- package/dist/prod/packages/shared-chunks/{decorator-DBCISop4.js → decorator-9ikVwsjY.js} +0 -1
- package/dist/prod/packages/shared-chunks/{element-BjFr0tO0.js → element-9DRa_9dO.js} +2 -1
- package/dist/prod/packages/shared-chunks/{element-builder-BPjq0rxK.js → element-builder-CnlTPNyw.js} +1 -1
- package/dist/prod/packages/shared-chunks/{events-970OxD6Q.js → events-DYrYz3V8.js} +0 -1
- package/dist/prod/packages/shared-chunks/{get-D5wxdTkY.js → get-Dt5L0TcU.js} +31 -34
- package/dist/prod/packages/shared-chunks/{get_properties-BcAC5sGx.js → get_properties-Nn08mLAH.js} +1 -1
- package/dist/prod/packages/shared-chunks/{hash-DcUe-meU.js → hash-Dkj3I4L4.js} +16 -10
- package/dist/prod/packages/shared-chunks/{helper-Da672z4a.js → helper-CN6UzshW.js} +18 -7
- package/dist/prod/packages/shared-chunks/{index--2U-v2nf.js → index-Bj71BDDA.js} +4 -5
- package/dist/prod/packages/shared-chunks/{index-D87qoERP.js → index-ClxHbCe9.js} +90 -112
- package/dist/prod/packages/shared-chunks/{injected_property-D9B-fPiH.js → injected_property--eJunJph.js} +2 -3
- package/dist/prod/packages/shared-chunks/{invoke-Dr_CRwA_.js → invoke-Cj5zMqHz.js} +1 -1
- package/dist/prod/packages/shared-chunks/{libraries-DaXpIDYN.js → libraries-_k-4KK5_.js} +1 -2
- package/dist/prod/packages/shared-chunks/{observers-Co4JALkS.js → observers-CDkeR0nI.js} +2 -2
- package/dist/prod/packages/shared-chunks/{on-C3ZQiUUD.js → on-CWgOWNSL.js} +7 -7
- package/dist/prod/packages/shared-chunks/{or-oTVMuHc8.js → or-Crsa2wci.js} +1 -1
- package/dist/prod/packages/shared-chunks/{program-context-CGMN-aQM.js → program-context-B8HKU7wu.js} +4 -3
- package/dist/prod/packages/shared-chunks/{property_get-hWJ0nGhW.js → property_get-CAFdpRyu.js} +0 -1
- package/dist/prod/packages/shared-chunks/{property_set-Dj5-ScWk.js → property_set-BunbMFtp.js} +3 -4
- package/dist/{dev/packages/shared-chunks/registers-DoamZwaG.js → prod/packages/shared-chunks/registers-C_W2qYHJ.js} +1 -1
- package/dist/prod/packages/shared-chunks/{rehydrate-builder-BKg2X6Lo.js → rehydrate-builder-DJ8k-6fg.js} +2 -2
- package/dist/prod/packages/shared-chunks/{render-nx5-PsDW.js → render-DkJJmoI4.js} +7 -6
- package/dist/prod/packages/shared-chunks/{chunk-3SQBS3Y5-Cj4eryg1.js → runtime-CYyqkz5q-BOdRhmsS.js} +4 -59
- package/dist/prod/packages/shared-chunks/{serialize-builder-BGbC30SN.js → serialize-builder-R3Ozg0sC.js} +1 -1
- package/dist/prod/packages/shared-chunks/{set_properties-oPyURk67.js → set_properties-LT3RzRmJ.js} +2 -2
- package/dist/prod/packages/shared-chunks/{setup-registry-TiaKLj5k.js → setup-registry-B3DhqtxX.js} +7 -8
- package/dist/prod/packages/shared-chunks/syscall-ops-BPFtDquC.js +133 -0
- package/dist/prod/packages/shared-chunks/{textarea-CPKZ1c_O.js → textarea-Byj32raR.js} +9 -6
- package/dist/prod/packages/shared-chunks/{tracked-CffAABMz.js → tracked-DAVrVqJl.js} +2 -3
- package/dist/prod/packages/shared-chunks/vm-ops-ImHv0Wtg.js +12 -0
- package/docs/data.json +196 -216
- package/lib/index.js +0 -1
- package/package.json +14 -15
- package/types/stable/@ember/-internals/glimmer/index.d.ts +165 -121
- 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.d.ts +18 -6
- 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/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/-internals/views/index.d.ts +0 -1
- package/types/stable/@ember/array/index.d.ts +4 -0
- package/types/stable/@ember/controller/index.d.ts +1 -1
- package/types/stable/@ember/helper/index.d.ts +0 -29
- package/types/stable/@ember/object/index.d.ts +4 -3
- package/types/stable/@ember/object/observable.d.ts +4 -0
- package/types/stable/@ember/routing/route.d.ts +1 -1
- package/types/stable/@ember/routing/router-service.d.ts +20 -12
- 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 +0 -1
- package/dist/dev/packages/@ember/-internals/views/lib/component_lookup.js +0 -14
- package/dist/dev/packages/shared-chunks/assert-CUCJBR2C.js +0 -19
- package/dist/dev/packages/shared-chunks/curried-BVwSNqpf.js +0 -628
- package/dist/dev/packages/shared-chunks/opcode-metadata-9iSW5JGP.js +0 -285
- package/dist/prod/packages/@ember/-internals/views/lib/component_lookup.js +0 -14
- package/dist/prod/packages/shared-chunks/assert-CUCJBR2C.js +0 -19
- package/dist/prod/packages/shared-chunks/curried-BVwSNqpf.js +0 -628
- package/dist/prod/packages/shared-chunks/opcode-metadata-9iSW5JGP.js +0 -285
- package/types/stable/@ember/-internals/views/lib/component_lookup.d.ts +0 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as debugToString } from '../../shared-chunks/debug-to-string-
|
|
1
|
+
import { d as debugToString } from '../../shared-chunks/debug-to-string-C6LsA_qz.js';
|
|
2
2
|
import { scheduleDestroyed, scheduleDestroy } from '../global-context/index.js';
|
|
3
3
|
|
|
4
4
|
const LIVE_STATE = 0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { C as CustomHelperManager, g as getInternalComponentManager, a as getInternalHelperManager, b as getInternalModifierManager, h as hasDestroyable, c as hasInternalComponentManager, d as hasInternalHelperManager, e as hasInternalModifierManager, f as hasValue, i as helperCapabilities, s as setInternalComponentManager, j as setInternalHelperManager, k as setInternalModifierManager } from '../../shared-chunks/api-
|
|
2
|
-
export { C as CustomComponentManager, a as CustomModifierManager, c as componentCapabilities, m as modifierCapabilities, s as setComponentManager, b as setHelperManager, d as setModifierManager } from '../../shared-chunks/api-
|
|
3
|
-
export { g as getComponentTemplate, s as setComponentTemplate } from '../../shared-chunks/template-
|
|
1
|
+
export { C as CustomHelperManager, g as getInternalComponentManager, a as getInternalHelperManager, b as getInternalModifierManager, h as hasDestroyable, c as hasInternalComponentManager, d as hasInternalHelperManager, e as hasInternalModifierManager, f as hasValue, i as helperCapabilities, s as setInternalComponentManager, j as setInternalHelperManager, k as setInternalModifierManager } from '../../shared-chunks/api-BawZUDYD.js';
|
|
2
|
+
export { C as CustomComponentManager, a as CustomModifierManager, c as componentCapabilities, m as modifierCapabilities, s as setComponentManager, b as setHelperManager, d as setModifierManager } from '../../shared-chunks/api-BAmlf_CN.js';
|
|
3
|
+
export { g as getComponentTemplate, s as setComponentTemplate } from '../../shared-chunks/template-R_5UMHhb.js';
|
|
4
4
|
export { g as getCustomTagFor, s as setCustomTagFor } from '../../shared-chunks/args-proxy-BNLuRFlO.js';
|
|
5
5
|
export { c as capabilityFlagsFrom, h as hasCapability, m as managerHasCapability } from '../../shared-chunks/capabilities-CZkuOqqC.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { C as ConcreteBounds } from '../../shared-chunks/normalize-CKySQVU7.js';
|
|
2
|
-
import { D as DOMTreeConstruction } from '../../shared-chunks/element-builder
|
|
2
|
+
import { D as DOMTreeConstruction } from '../../shared-chunks/element-builder--iTIJyCB.js';
|
|
3
3
|
import createHTMLDocument from '../../@simple-dom/document/index.js';
|
|
4
|
-
export { s as serializeBuilder } from '../../shared-chunks/serialize-builder-
|
|
4
|
+
export { s as serializeBuilder } from '../../shared-chunks/serialize-builder-DxgGRvH_.js';
|
|
5
5
|
|
|
6
6
|
class NodeDOMTreeConstruction extends DOMTreeConstruction {
|
|
7
7
|
// Hides property on base class
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
export { E as EMPTY_BLOCKS, W as WrappedBuilder, c as compilable, b as compileStatements, I as invokeStaticBlock, d as invokeStaticBlockWithStack, m as meta, a as templateCacheCounters, e as templateCompilationContext, t as templateFactory } from '../../shared-chunks/index-
|
|
2
|
-
|
|
3
|
-
import '../../shared-chunks/curried-BVwSNqpf.js';
|
|
4
|
-
import '../../shared-chunks/reference-BoPB2LfI.js';
|
|
5
|
-
export { E as EvaluationContextImpl, S as StdLib, c as compileStd } from '../../shared-chunks/program-context-CqcQMsfa.js';
|
|
1
|
+
export { E as EMPTY_BLOCKS, W as WrappedBuilder, c as compilable, b as compileStatements, I as invokeStaticBlock, d as invokeStaticBlockWithStack, m as meta, a as templateCacheCounters, e as templateCompilationContext, t as templateFactory } from '../../shared-chunks/index-CyZiGiEI.js';
|
|
2
|
+
export { E as EvaluationContextImpl, S as StdLib, c as compileStd } from '../../shared-chunks/program-context-CadjldRr.js';
|
|
6
3
|
|
|
7
4
|
let debugCompiler;
|
|
8
5
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aE as constants } from '../../shared-chunks/syscall-ops-BPFtDquC.js';
|
|
2
2
|
import { e as expect } from '../../shared-chunks/collections-DPkjqeA3.js';
|
|
3
3
|
import { u as unwrapTemplate } from '../../shared-chunks/template-BRrQR6KS.js';
|
|
4
4
|
import { c as capabilityFlagsFrom, m as managerHasCapability } from '../../shared-chunks/capabilities-CZkuOqqC.js';
|
|
5
|
-
import { g as getComponentTemplate } from '../../shared-chunks/template-
|
|
6
|
-
import { a as getInternalHelperManager, b as getInternalModifierManager, g as getInternalComponentManager } from '../../shared-chunks/api-
|
|
7
|
-
import { t as templateFactory } from '../../shared-chunks/index-
|
|
5
|
+
import { g as getComponentTemplate } from '../../shared-chunks/template-R_5UMHhb.js';
|
|
6
|
+
import { a as getInternalHelperManager, b as getInternalModifierManager, g as getInternalComponentManager } from '../../shared-chunks/api-BawZUDYD.js';
|
|
7
|
+
import { t as templateFactory } from '../../shared-chunks/index-CyZiGiEI.js';
|
|
8
8
|
import { e as enumerate } from '../../shared-chunks/array-utils-CZQxrdD3.js';
|
|
9
9
|
import { I as InternalComponentCapabilities } from '../../shared-chunks/flags-B9qxc-pB.js';
|
|
10
10
|
import { o as opcodes } from '../../shared-chunks/opcodes-CplRyHl_.js';
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
export { C as ConcreteBounds, a as CursorImpl, c as clear } from '../../shared-chunks/normalize-CKySQVU7.js';
|
|
2
|
-
export { D as DOMChanges, a as DynamicScopeImpl, E as EnvironmentImpl, b as IDOMChanges, L as LowLevelVM, S as ScopeImpl, U as UpdatingVM, i as inTransaction, c as isWhitespace, r as renderComponent, d as renderMain, e as renderSync, f as resetDebuggerCallback, g as runtimeOptions, s as setDebuggerCallback } from '../../shared-chunks/render-
|
|
3
|
-
export { T as TEMPLATE_ONLY_COMPONENT_MANAGER, a as TemplateOnlyComponent, b as TemplateOnlyComponentManager, t as templateOnlyComponent } from '../../shared-chunks/template-only-
|
|
4
|
-
export { C as CurriedValue, E as EMPTY_ARGS, a as EMPTY_NAMED, b as EMPTY_POSITIONAL, c as createCapturedArgs, d as curry, r as reifyArgs, e as reifyNamed, f as reifyPositional } from '../../shared-chunks/untouchable-this-
|
|
2
|
+
export { D as DOMChanges, a as DynamicScopeImpl, E as EnvironmentImpl, b as IDOMChanges, L as LowLevelVM, S as ScopeImpl, U as UpdatingVM, i as inTransaction, c as isWhitespace, r as renderComponent, d as renderMain, e as renderSync, f as resetDebuggerCallback, g as runtimeOptions, s as setDebuggerCallback } from '../../shared-chunks/render-CpKaO-BO.js';
|
|
3
|
+
export { T as TEMPLATE_ONLY_COMPONENT_MANAGER, a as TemplateOnlyComponent, b as TemplateOnlyComponentManager, t as templateOnlyComponent } from '../../shared-chunks/template-only-BqOt8bDl.js';
|
|
4
|
+
export { C as CurriedValue, E as EMPTY_ARGS, a as EMPTY_NAMED, b as EMPTY_POSITIONAL, c as createCapturedArgs, d as curry, r as reifyArgs, e as reifyNamed, f as reifyPositional } from '../../shared-chunks/untouchable-this-B3DVwpHS.js';
|
|
5
5
|
export { n as normalizeProperty } from '../../shared-chunks/props-fiqxqhAH.js';
|
|
6
|
-
export { a as and, e as eq, g as gt, b as gte, l as lt, c as lte, n as neq, d as not, o as or } from '../../shared-chunks/or-
|
|
7
|
-
export { a as array, f as fn, h as hash } from '../../shared-chunks/hash-
|
|
8
|
-
export { c as concat, g as get } from '../../shared-chunks/get-
|
|
9
|
-
export { i as invokeHelper } from '../../shared-chunks/invoke-
|
|
10
|
-
export { o as on } from '../../shared-chunks/on-
|
|
6
|
+
export { a as and, e as eq, g as gt, b as gte, l as lt, c as lte, n as neq, d as not, o as or } from '../../shared-chunks/or-BTH3yuFG.js';
|
|
7
|
+
export { a as array, f as fn, h as hash } from '../../shared-chunks/hash-BTwOuDGQ.js';
|
|
8
|
+
export { c as concat, g as get } from '../../shared-chunks/get-BehtPmsu.js';
|
|
9
|
+
export { i as invokeHelper } from '../../shared-chunks/invoke-B8M5fQQS.js';
|
|
10
|
+
export { o as on } from '../../shared-chunks/on-BQii6ILK.js';
|
|
11
11
|
export { destroy, isDestroyed, isDestroying, registerDestructor } from '../destroyable/index.js';
|
|
12
12
|
import '../global-context/index.js';
|
|
13
13
|
import '../../shared-chunks/cache-B7dqAS38.js';
|
|
14
14
|
import '../../shared-chunks/reference-BoPB2LfI.js';
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export { D as DOMTreeConstruction, a as DynamicAttribute, N as NewTreeBuilder, R as RemoteBlock, b as ResettableBlockImpl, S as SimpleDynamicAttribute, c as clientBuilder, d as dynamicAttribute } from '../../shared-chunks/element-builder-kHVx0F__.js';
|
|
18
|
-
export { R as RehydrateTree, S as SERIALIZATION_FIRST_NODE_STRING, i as isSerializationFirstNode, r as rehydrationBuilder } from '../../shared-chunks/rehydrate-builder-DdzXTaJk.js';
|
|
15
|
+
export { D as DOMTreeConstruction, a as DynamicAttribute, N as NewTreeBuilder, R as RemoteBlock, b as ResettableBlockImpl, S as SimpleDynamicAttribute, c as clientBuilder, d as dynamicAttribute } from '../../shared-chunks/element-builder--iTIJyCB.js';
|
|
16
|
+
export { R as RehydrateTree, S as SERIALIZATION_FIRST_NODE_STRING, i as isSerializationFirstNode, r as rehydrationBuilder } from '../../shared-chunks/rehydrate-builder-DCyIgnCR.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { A as ARG_SHIFT, I as InternalComponentCapabilities, I as InternalComponentCapability, M as MACHINE_MASK, a as MAX_SIZE, O as OPERAND_LEN_MASK, T as TYPE_MASK, b as TYPE_SIZE } from '../../shared-chunks/flags-B9qxc-pB.js';
|
|
2
|
-
export { f as $fp,
|
|
2
|
+
export { f as $fp, d as $pc, e as $ra, $ as $s0, h as $s1, g as $sp, c as $t0, b as $t1, a as $v0, i as isLowLevelRegister } from '../../shared-chunks/registers-C_W2qYHJ.js';
|
|
3
3
|
|
|
4
4
|
const ContentType = {
|
|
5
5
|
Component: 0,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as precompile$1 } from '../shared-chunks/compiler-
|
|
2
|
-
export { a as _preprocess } from '../shared-chunks/compiler-
|
|
1
|
+
import { p as precompile$1 } from '../shared-chunks/compiler-QUSl_urU.js';
|
|
2
|
+
export { a as _preprocess } from '../shared-chunks/compiler-QUSl_urU.js';
|
|
3
3
|
import '../@ember/debug/index.js';
|
|
4
4
|
import { STRICT_MODE_KEYWORDS, STRICT_MODE_TRANSFORMS, RESOLUTION_MODE_TRANSFORMS } from '../@ember/template-compiler/lib/plugins/index.js';
|
|
5
5
|
import '../shared-chunks/get-debug-name-CSniHBsn.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as setInternalHelperManager, C as CustomHelperManager, s as setInternalComponentManager, k as setInternalModifierManager } from './api-
|
|
1
|
+
import { j as setInternalHelperManager, C as CustomHelperManager, s as setInternalComponentManager, k as setInternalModifierManager } from './api-BawZUDYD.js';
|
|
2
2
|
import { registerDestructor } from '../@glimmer/destroyable/index.js';
|
|
3
3
|
import { c as createConstRef } from './reference-BoPB2LfI.js';
|
|
4
4
|
import { a as argsProxyFor } from './args-proxy-BNLuRFlO.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as debugToString } from './debug-to-string-
|
|
1
|
+
import { d as debugToString } from './debug-to-string-C6LsA_qz.js';
|
|
2
2
|
import { debugAssert } from '../@glimmer/global-context/index.js';
|
|
3
3
|
import { associateDestroyableChild } from '../@glimmer/destroyable/index.js';
|
|
4
4
|
import { a as createComputeRef, c as createConstRef, U as UNDEFINED_REFERENCE } from './reference-BoPB2LfI.js';
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { i as isPresentArray, a as getFirst, g as getLast, b as asPresentArray, m as mapPresentArray } from './present-B1rrjAVM.js';
|
|
2
|
-
import { a as assert } from './assert-
|
|
2
|
+
import { a as assert } from './assert-Zqc4wiAV.js';
|
|
3
3
|
import { assertNever } from '../@glimmer/util/index.js';
|
|
4
4
|
import { s as setLocalDebugType } from './debug-brand-B1TWjOCH.js';
|
|
5
5
|
import { a as assign } from './object-utils-AijlD-JH.js';
|
|
6
6
|
import { i as isVoidTag, b as build, v as voidMap, P as Printer } from './transform-resolutions-h1ik8gqW.js';
|
|
7
7
|
import { u as unwrap, e as expect, d as dict, b as exhausted } from './collections-DPkjqeA3.js';
|
|
8
8
|
import { o as opcodes } from './opcodes-CplRyHl_.js';
|
|
9
|
-
import './
|
|
10
|
-
import { C as CURRIED_MODIFIER, a as CURRIED_HELPER, b as CURRIED_COMPONENT } from './curried-BVwSNqpf.js';
|
|
9
|
+
import { C as CURRIED_MODIFIER, b as CURRIED_HELPER, a as CURRIED_COMPONENT } from './curried-BZnYakIg.js';
|
|
11
10
|
import { a as WellKnownTagNames, W as WellKnownAttrNames } from './well-known-_EVO9RaV.js';
|
|
12
11
|
|
|
13
12
|
const UNKNOWN_POSITION = Object.freeze({
|
|
@@ -4,7 +4,7 @@ import { getViewElement, clearElementView, clearViewElement, addChildView, setVi
|
|
|
4
4
|
import { debugFreeze } from '../@ember/debug/index.js';
|
|
5
5
|
import { _instrumentStart } from '../@ember/instrumentation/index.js';
|
|
6
6
|
import { a as createComputeRef, v as valueForRef, e as createPrimitiveRef, f as childRefFor, g as childRefFromParts, c as createConstRef, d as isUpdatableRef, u as updateRef } from './reference-BoPB2LfI.js';
|
|
7
|
-
import { f as reifyPositional } from './untouchable-this-
|
|
7
|
+
import { f as reifyPositional } from './untouchable-this-B3DVwpHS.js';
|
|
8
8
|
import { E as EMPTY_ARRAY } from './array-utils-CZQxrdD3.js';
|
|
9
9
|
import { z as valueForTag, h as beginUntrackFrame, q as endUntrackFrame, g as beginTrackFrame, p as endTrackFrame, k as consumeTag, y as validateTag } from './cache-B7dqAS38.js';
|
|
10
10
|
import { g as get } from './property_get-CIBS9umw.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as createComputeRef, v as valueForRef, N as NULL_REFERENCE } from './reference-BoPB2LfI.js';
|
|
2
|
-
import { s as setInternalComponentManager } from './api-
|
|
2
|
+
import { s as setInternalComponentManager } from './api-BawZUDYD.js';
|
|
3
3
|
import '../@ember/debug/index.js';
|
|
4
|
-
import { i as internalHelper } from './internal-helper-
|
|
4
|
+
import { i as internalHelper } from './internal-helper-Ez7zbEIa.js';
|
|
5
5
|
import { assert } from '../@ember/debug/lib/assert.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -84,6 +84,8 @@ function getElementDefinition(tagName) {
|
|
|
84
84
|
Passing `null`, `undefined`, or non-string values will throw an assertion error.
|
|
85
85
|
|
|
86
86
|
Changing the tag name will tear down and recreate the element and its contents.
|
|
87
|
+
|
|
88
|
+
The `element` helper is built-in and does not need to be imported.
|
|
87
89
|
|
|
88
90
|
@method element
|
|
89
91
|
@for Ember.Templates.helpers
|
package/dist/dev/packages/shared-chunks/{element-builder-kHVx0F__.js → element-builder--iTIJyCB.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { e as expect, S as StackImpl } from './collections-DPkjqeA3.js';
|
|
2
2
|
import { C as ConcreteBounds, i as isSafeString, n as normalizeStringValue, a as CursorImpl, c as clear } from './normalize-CKySQVU7.js';
|
|
3
|
-
import { a as assert } from './assert-
|
|
3
|
+
import { a as assert } from './assert-Zqc4wiAV.js';
|
|
4
4
|
import { s as setLocalDebugType } from './debug-brand-B1TWjOCH.js';
|
|
5
5
|
import { registerDestructor, destroy } from '../@glimmer/destroyable/index.js';
|
|
6
6
|
import { a as castToBrowser } from './simple-cast-DCvJLSin.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as createComputeRef, U as UNDEFINED_REFERENCE, v as valueForRef } from './reference-BoPB2LfI.js';
|
|
2
|
-
import { f as reifyPositional } from './untouchable-this-
|
|
3
|
-
import { i as internalHelper } from './hash-
|
|
2
|
+
import { f as reifyPositional } from './untouchable-this-B3DVwpHS.js';
|
|
3
|
+
import { i as internalHelper } from './hash-BTwOuDGQ.js';
|
|
4
4
|
import { setPath, getPath } from '../@glimmer/global-context/index.js';
|
|
5
5
|
import { i as isDict } from './collections-DPkjqeA3.js';
|
|
6
6
|
|
|
@@ -19,10 +19,15 @@ const normalizeTextValue = value => {
|
|
|
19
19
|
|
|
20
20
|
Example:
|
|
21
21
|
|
|
22
|
-
```handlebars
|
|
23
|
-
{{some-component name=(concat firstName " " lastName)}}
|
|
24
22
|
|
|
25
|
-
|
|
23
|
+
```gjs
|
|
24
|
+
import { concat } from '@ember/helper';
|
|
25
|
+
|
|
26
|
+
<template>
|
|
27
|
+
{{yield (concat firstName " " lastName)}}
|
|
28
|
+
|
|
29
|
+
{{! would yield name="<first name value> <last name value>" to the component}}
|
|
30
|
+
</template>
|
|
26
31
|
```
|
|
27
32
|
|
|
28
33
|
or for angle bracket invocation, you actually don't need concat at all.
|
|
@@ -46,28 +51,31 @@ const concat = internalHelper(({
|
|
|
46
51
|
|
|
47
52
|
For example, these two usages are equivalent:
|
|
48
53
|
|
|
49
|
-
```app/components/developer-detail.
|
|
54
|
+
```app/components/developer-detail.gjs
|
|
50
55
|
import Component from '@glimmer/component';
|
|
51
56
|
import { tracked } from '@glimmer/tracking';
|
|
57
|
+
import { get } from '@ember/object';
|
|
52
58
|
|
|
53
59
|
export default class extends Component {
|
|
54
60
|
@tracked developer = {
|
|
55
61
|
name: "Sandi Metz",
|
|
56
62
|
language: "Ruby"
|
|
57
63
|
}
|
|
64
|
+
|
|
65
|
+
<template>
|
|
66
|
+
{{this.developer.name}}
|
|
67
|
+
{{get this.developer "name"}}
|
|
68
|
+
</template>
|
|
58
69
|
}
|
|
59
70
|
```
|
|
60
71
|
|
|
61
|
-
```handlebars
|
|
62
|
-
{{this.developer.name}}
|
|
63
|
-
{{get this.developer "name"}}
|
|
64
|
-
```
|
|
65
|
-
|
|
66
72
|
If there were several facts about a person, the `{{get}}` helper can dynamically
|
|
67
73
|
pick one:
|
|
68
74
|
|
|
69
|
-
```app/templates/application.
|
|
70
|
-
<
|
|
75
|
+
```app/templates/application.gjs
|
|
76
|
+
<template>
|
|
77
|
+
<DeveloperDetail @factName="language" />
|
|
78
|
+
</template>
|
|
71
79
|
```
|
|
72
80
|
|
|
73
81
|
```handlebars
|
|
@@ -77,10 +85,11 @@ const concat = internalHelper(({
|
|
|
77
85
|
For a more complex example, this template would allow the user to switch
|
|
78
86
|
between showing the user's height and weight with a click:
|
|
79
87
|
|
|
80
|
-
```app/components/developer-detail.
|
|
88
|
+
```app/components/developer-detail.gjs
|
|
81
89
|
import Component from '@glimmer/component';
|
|
82
90
|
import { tracked } from '@glimmer/tracking';
|
|
83
|
-
|
|
91
|
+
import { get } from '@ember/object';
|
|
92
|
+
|
|
84
93
|
export default class extends Component {
|
|
85
94
|
@tracked developer = {
|
|
86
95
|
name: "Sandi Metz",
|
|
@@ -92,28 +101,16 @@ const concat = internalHelper(({
|
|
|
92
101
|
showFact = (fact) => {
|
|
93
102
|
this.currentFact = fact;
|
|
94
103
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
```app/components/developer-detail.js
|
|
99
|
-
{{get this.developer this.currentFact}}
|
|
100
|
-
|
|
101
|
-
<button {{on 'click' (fn this.showFact "name")}}>Show name</button>
|
|
102
|
-
<button {{on 'click' (fn this.showFact "language")}}>Show language</button>
|
|
103
|
-
```
|
|
104
|
+
|
|
105
|
+
<template>
|
|
106
|
+
{{get this.developer this.currentFact}}
|
|
104
107
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
<button {{on 'click' (fn this.showFact "name")}}>Show name</button>
|
|
111
|
-
<button {{on 'click' (fn this.showFact "language")}}>Show language</button>
|
|
108
|
+
<button {{on 'click' (fn this.showFact "name")}}>Show name</button>
|
|
109
|
+
<button {{on 'click' (fn this.showFact "language")}}>Show language</button>
|
|
110
|
+
</template>
|
|
111
|
+
}
|
|
112
112
|
```
|
|
113
113
|
|
|
114
|
-
Would allow the user to swap what fact is being displayed, and also edit
|
|
115
|
-
that fact via a two-way mutable binding.
|
|
116
|
-
|
|
117
114
|
@public
|
|
118
115
|
@method get
|
|
119
116
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as createComputeRef, b as isInvokableRef, u as updateRef, v as valueForRef } from './reference-BoPB2LfI.js';
|
|
2
|
-
import { f as reifyPositional, g as buildUntouchableThis, h as check, e as reifyNamed } from './untouchable-this-
|
|
3
|
-
import { j as setInternalHelperManager } from './api-
|
|
2
|
+
import { f as reifyPositional, g as buildUntouchableThis, h as check, e as reifyNamed } from './untouchable-this-B3DVwpHS.js';
|
|
3
|
+
import { j as setInternalHelperManager } from './api-BawZUDYD.js';
|
|
4
4
|
|
|
5
5
|
function internalHelper(helper) {
|
|
6
6
|
return setInternalHelperManager(helper, {});
|
|
@@ -19,7 +19,7 @@ function internalHelper(helper) {
|
|
|
19
19
|
```
|
|
20
20
|
or
|
|
21
21
|
```handlebars
|
|
22
|
-
{{
|
|
22
|
+
{{yield people=(array
|
|
23
23
|
'Tom Dale'
|
|
24
24
|
'Yehuda Katz'
|
|
25
25
|
this.myOtherPerson)
|
|
@@ -58,13 +58,17 @@ const context = buildUntouchableThis('`fn` helper');
|
|
|
58
58
|
to a component invoked within the loop. Here's how you could use the `fn`
|
|
59
59
|
helper to pass both the function and its arguments together:
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
```app/components/items-listing.gjs
|
|
62
|
+
import DisplayItem from './display-item';
|
|
63
|
+
|
|
64
|
+
<template>
|
|
65
|
+
{{#each @items as |item|}}
|
|
66
|
+
<DisplayItem @item=item @select={{fn this.handleSelected item}} />
|
|
67
|
+
{{/each}}
|
|
68
|
+
</template>
|
|
65
69
|
```
|
|
66
70
|
|
|
67
|
-
```app/components/items-list.
|
|
71
|
+
```app/components/items-list.gjs
|
|
68
72
|
import Component from '@glimmer/component';
|
|
69
73
|
import { action } from '@ember/object';
|
|
70
74
|
|
|
@@ -75,7 +79,7 @@ const context = buildUntouchableThis('`fn` helper');
|
|
|
75
79
|
}
|
|
76
80
|
```
|
|
77
81
|
|
|
78
|
-
In this case the `
|
|
82
|
+
In this case the `DisplayItem` component will receive a normal function
|
|
79
83
|
that it can invoke. When it invokes the function, the `handleSelected`
|
|
80
84
|
function will receive the `item` and any arguments passed, thanks to the
|
|
81
85
|
`fn` helper.
|
|
@@ -92,7 +96,7 @@ const context = buildUntouchableThis('`fn` helper');
|
|
|
92
96
|
`handleSelected` is properly bound to the `items-list`, but let's explore what
|
|
93
97
|
happens if we left out the arrow function:
|
|
94
98
|
|
|
95
|
-
```app/components/items-list.
|
|
99
|
+
```app/components/items-list.gjs
|
|
96
100
|
import Component from '@glimmer/component';
|
|
97
101
|
|
|
98
102
|
export default class ItemsList extends Component {
|
|
@@ -109,6 +113,8 @@ const context = buildUntouchableThis('`fn` helper');
|
|
|
109
113
|
|
|
110
114
|
See also [partial application](https://en.wikipedia.org/wiki/Partial_application).
|
|
111
115
|
|
|
116
|
+
`fn` is built-in and does not require any additional imports.
|
|
117
|
+
|
|
112
118
|
@method fn
|
|
113
119
|
@public
|
|
114
120
|
*/
|
|
@@ -138,7 +144,7 @@ function assertCallbackIsFn(callbackRef) {
|
|
|
138
144
|
|
|
139
145
|
/**
|
|
140
146
|
Use the `{{hash}}` helper to create a hash to pass as an option to your
|
|
141
|
-
components. This is
|
|
147
|
+
components. This is especially useful for contextual components where you can
|
|
142
148
|
just yield a hash:
|
|
143
149
|
|
|
144
150
|
```handlebars
|
|
@@ -3,8 +3,8 @@ import { FrameworkObject } from '../@ember/object/-internals.js';
|
|
|
3
3
|
import { g as getDebugName } from './get-debug-name-CSniHBsn.js';
|
|
4
4
|
import '../@ember/debug/index.js';
|
|
5
5
|
import { join } from '../@ember/runloop/index.js';
|
|
6
|
-
import { a as getInternalHelperManager, i as helperCapabilities } from './api-
|
|
7
|
-
import { b as setHelperManager } from './api-
|
|
6
|
+
import { a as getInternalHelperManager, i as helperCapabilities } from './api-BawZUDYD.js';
|
|
7
|
+
import { b as setHelperManager } from './api-BAmlf_CN.js';
|
|
8
8
|
import { m as createTag, D as DIRTY_TAG, k as consumeTag } from './cache-B7dqAS38.js';
|
|
9
9
|
import { assert } from '../@ember/debug/lib/assert.js';
|
|
10
10
|
|
|
@@ -29,20 +29,32 @@ const IS_CLASSIC_HELPER = Symbol('IS_CLASSIC_HELPER');
|
|
|
29
29
|
Ember Helpers are functions that can compute values, and are used in templates.
|
|
30
30
|
For example, this code calls a helper named `format-currency`:
|
|
31
31
|
|
|
32
|
-
```app/templates/application.
|
|
33
|
-
|
|
32
|
+
```app/templates/application.gjs
|
|
33
|
+
import Cost from '../components/cost';
|
|
34
|
+
|
|
35
|
+
<template>
|
|
36
|
+
<Cost @cents={{230}} />
|
|
37
|
+
</template>
|
|
34
38
|
```
|
|
35
39
|
|
|
36
|
-
```app/components/cost.
|
|
37
|
-
|
|
40
|
+
```app/components/cost.gjs
|
|
41
|
+
import formatCurrency from '../helpers/format-currency';
|
|
42
|
+
|
|
43
|
+
<template>
|
|
44
|
+
<div>{{formatCurrency @cents currency="$"}}</div>
|
|
45
|
+
</template>
|
|
38
46
|
```
|
|
39
47
|
|
|
40
48
|
Additionally a helper can be called as a nested helper.
|
|
41
49
|
In this example, we show the formatted currency value if the `showMoney`
|
|
42
50
|
named argument is truthy.
|
|
43
51
|
|
|
44
|
-
```
|
|
45
|
-
|
|
52
|
+
```gjs
|
|
53
|
+
import formatCurrency from '../helpers/format-currency';
|
|
54
|
+
|
|
55
|
+
<template>
|
|
56
|
+
{{if @showMoney (formatCurrency @cents currency="$")}}
|
|
57
|
+
</template>
|
|
46
58
|
```
|
|
47
59
|
|
|
48
60
|
Helpers defined using a class must provide a `compute` function. For example:
|