language
stringclasses 1
value | owner
stringlengths 2
15
| repo
stringlengths 2
21
| sha
stringlengths 45
45
| message
stringlengths 7
36.3k
| path
stringlengths 1
199
| patch
stringlengths 15
102k
| is_multipart
bool 2
classes |
---|---|---|---|---|---|---|---|
Other | emberjs | ember.js | 19fcd0906cdb4803652ea402745c40df9d83bfa1.json | Add v4.1.0 to CHANGELOG
(cherry picked from commit f28832a488050099c66521703272dcddd066a65c) | CHANGELOG.md | @@ -1,14 +1,13 @@
# Ember Changelog
-### v4.1.0-beta.1 (November 19, 2021)
+### v4.1.0 (December 28, 2021)
- [#19772](https://github.com/emberjs/ember.js/pull/19772) / [#19826](https://github.com/emberjs/ember.js/pull/19826) [FEATURE] Add a `@cached` decorator per [RFC #0566](https://github.com/emberjs/rfcs/blob/af64915b5ecde010fce09309a47ee6d2447588d0/text/0566-memo-decorator.md).
- [#19471](https://github.com/emberjs/ember.js/pull/19471) / [#19834](https://github.com/emberjs/ember.js/pull/19834) [FEATURE] Add `refresh` method to the Router Service per [RFC #0631](https://github.com/emberjs/rfcs/blob/master/text/0631-refresh-method-for-router-service.md).
- [#19776](https://github.com/emberjs/ember.js/pull/19776) [FEATURE] Provide `service` export from `@ember/service` in favour of `inject` implementing [RFC #0752](https://github.com/emberjs/rfcs/blob/master/text/0752-inject-service.md).
- [#19510](https://github.com/emberjs/ember.js/pull/19510) [DEPRECATION] Deprecate auto location per [RFC #0711](https://github.com/emberjs/rfcs/blob/master/text/0711-deprecate-auto-location.md).
- [#17570](https://github.com/emberjs/ember.js/pull/17570) [BUGFIX] Passing ObjectProxy with a property size to `isEmpty` would throw assertion
- [#18269](https://github.com/emberjs/ember.js/pull/18269) [BUGFIX] Fix for when query params are using a nested value
-- [#19787](https://github.com/emberjs/ember.js/pull/19787) Setup basic infrastructure to ensure destroyables destroyed
### v4.0.1 (December 1, 2021)
| false |
Other | emberjs | ember.js | 703b9ca2653a6b479a762b30dca1a33eaa13d8ab.json | Add v3.28.8 to CHANGELOG
(cherry picked from commit 498cebc669cafb679dad6e1ad0189c9b92270054) | CHANGELOG.md | @@ -87,6 +87,10 @@
- [#19542](https://github.com/emberjs/ember.js/pull/19542) [BUGFIX] Fix initializer test blueprints
- [#19589](https://github.com/emberjs/ember.js/pull/19589) [BUGFIX] Don’t include type-tests in build output
+## v3.28.8 (December 2, 2021)
+
+- [#19868](https://github.com/emberjs/ember.js/pull/19868) [BUGFIX] Fix a bug with the implicit injections deprecation that meant injecting a store to avoid the deprecation did not work.
+
## v3.28.7 (December 1, 2021)
- [#19854](https://github.com/emberjs/ember.js/pull/19854) [BUGFIX] Fix implicit injections deprecation for routes to cover previously missed cases | false |
Other | emberjs | ember.js | afceac756c098b270719da08faa169fdc1b6b3f3.json | Add v3.28.7 to CHANGELOG
(cherry picked from commit edb5b210b4f03e66c84b91df795ff5a2630eecee) | CHANGELOG.md | @@ -87,6 +87,11 @@
- [#19542](https://github.com/emberjs/ember.js/pull/19542) [BUGFIX] Fix initializer test blueprints
- [#19589](https://github.com/emberjs/ember.js/pull/19589) [BUGFIX] Don’t include type-tests in build output
+## v3.28.7 (December 1, 2021)
+
+- [#19854](https://github.com/emberjs/ember.js/pull/19854) [BUGFIX] Fix implicit injections deprecation for routes to cover previously missed cases
+- [#19857](https://github.com/emberjs/ember.js/pull/19857) [BUGFIX] Improve assert message in default store for when routes have dynamic segments but no model hook
+
## v3.28.6 (November 4, 2021)
- [#19683](https://github.com/emberjs/ember.js/pull/19683) Ensure super.willDestroy is called correctly in Router's willDestroy | false |
Other | emberjs | ember.js | 7e411fd2205af318492a948a23ed3cc4da99aacb.json | Add v4.0.1 to CHANGELOG
(cherry picked from commit dc7bfafb8963a8f9a9741137ed28430c48b73f90) | CHANGELOG.md | @@ -10,6 +10,11 @@
- [#18269](https://github.com/emberjs/ember.js/pull/18269) [BUGFIX] Fix for when query params are using a nested value
- [#19787](https://github.com/emberjs/ember.js/pull/19787) Setup basic infrastructure to ensure destroyables destroyed
+### v4.0.1 (December 1, 2021)
+
+- [#19858](https://github.com/emberjs/ember.js/pull/19858) [BUGFIX] Improve assert message in default store for when routes have dynamic segments but no model hook
+- [#19860](https://github.com/emberjs/ember.js/pull/19860) [BUGFIX] Add model hook in route blueprint for routes with dynamic segments
+
### v4.0.0 (November 15, 2021)
- [#19761](https://github.com/emberjs/ember.js/pull/19761) [BREAKING] Require ember-auto-import >= 2 or higher to enable ember-source to become a v2 addon in the 4.x cycle | false |
Other | emberjs | ember.js | 0c0f62e5e13e856d228c44becd0fd5c5fbf99db7.json | Add 4.1.0-beta.1 to CHANGELOG
(cherry picked from commit 927b86a70f5bd4394056817d4a89cc646fbd8dbe) | CHANGELOG.md | @@ -1,5 +1,15 @@
# Ember Changelog
+### v4.1.0-beta.1 (November 19, 2021)
+
+- [#19772](https://github.com/emberjs/ember.js/pull/19772) / [#19826](https://github.com/emberjs/ember.js/pull/19826) [FEATURE] Add a `@cached` decorator per [RFC #0566](https://github.com/emberjs/rfcs/blob/af64915b5ecde010fce09309a47ee6d2447588d0/text/0566-memo-decorator.md).
+- [#19471](https://github.com/emberjs/ember.js/pull/19471) / [#19834](https://github.com/emberjs/ember.js/pull/19834) [FEATURE] Add `refresh` method to the Router Service per [RFC #0631](https://github.com/emberjs/rfcs/blob/master/text/0631-refresh-method-for-router-service.md).
+- [#19776](https://github.com/emberjs/ember.js/pull/19776) [FEATURE] Provide `service` export from `@ember/service` in favour of `inject` implementing [RFC #0752](https://github.com/emberjs/rfcs/blob/master/text/0752-inject-service.md).
+- [#19510](https://github.com/emberjs/ember.js/pull/19510) [DEPRECATION] Deprecate auto location per [RFC #0711](https://github.com/emberjs/rfcs/blob/master/text/0711-deprecate-auto-location.md).
+- [#17570](https://github.com/emberjs/ember.js/pull/17570) [BUGFIX] Passing ObjectProxy with a property size to `isEmpty` would throw assertion
+- [#18269](https://github.com/emberjs/ember.js/pull/18269) [BUGFIX] Fix for when query params are using a nested value
+- [#19787](https://github.com/emberjs/ember.js/pull/19787) Setup basic infrastructure to ensure destroyables destroyed
+
### v4.0.0 (November 15, 2021)
- [#19761](https://github.com/emberjs/ember.js/pull/19761) [BREAKING] Require ember-auto-import >= 2 or higher to enable ember-source to become a v2 addon in the 4.x cycle | false |
Other | emberjs | ember.js | c4dd6eeb191d94c53a27a77b8f3eb841d604c2f0.json | Add v4.0.0 to CHANGELOG
(cherry picked from commit d8573f9d63020d0358b69ef9974e2f4508e165f4) | CHANGELOG.md | @@ -1,104 +1,76 @@
# Ember Changelog
-### v4.0.0-beta.10 (November 15, 2021)
-
-- [#19833](https://github.com/emberjs/ember.js/pull/19833) [CLEANUP] Remove deprecated array observers
-- [#19836](https://github.com/emberjs/ember.js/pull/19836) [CLEANUP] Turn `template-only-glimmer-components` deprecation into an error
-- [#19843](https://github.com/emberjs/ember.js/pull/19843) [CLEANUP] Turn `argument-less-helper-paren-less-invocation` deprecation into an error
-
-### v4.0.0-beta.9 (November 10, 2021)
-
-- [#19749](https://github.com/emberjs/ember.js/pull/19749) [CLEANUP] Remove `deprecate-router-events` support code
-- [#19762](https://github.com/emberjs/ember.js/pull/19762) [CLEANUP] Update GlimmerVM to 0.81
- - removes deprecation of mutations during helper compute
- - removes deprecation of mutations during unknownProperty
- - `@glimmer/integration-tests`, `@glimmer/manager`, `@glimmer/validator`
- * [#1330](https://github.com/glimmerjs/glimmer-vm/pull/1330) Remove deprecated support for mutation after consumption during certain manager hooks ([@snewcomer](https://github.com/snewcomer))
- - `@glimmer/manager`
- * [#1328](https://github.com/glimmerjs/glimmer-vm/pull/1328) Remove deprecated Component Manager version 3.4 ([@nlfurniss](https://github.com/nlfurniss))
- - `@glimmer/integration-tests`, `@glimmer/manager`
- * [#1329](https://github.com/glimmerjs/glimmer-vm/pull/1329) Remove deprecated Modifier Manager version 3.13 ([@nlfurniss](https://github.com/nlfurniss))
-- [#19806](https://github.com/emberjs/ember.js/pull/19806) [CLEANUP] Drop export of built-ins, remove legacy components
-
-### v4.0.0-beta.8 (November 5, 2021)
-
-- [#19823](https://github.com/emberjs/ember.js/pull/19823) / [#19828](https://github.com/emberjs/ember.js/pull/19828) [BUGFIX] Fix deprecation `until` and link for Component.reopenClass and Component.reopen
-- [#19825](https://github.com/emberjs/ember.js/pull/19825) [BUGFIX] Replace `assert.equal` in blueprints with `assert.strictEqual` to pass eslint-plugin-qunit v7 on generation
-- [#19808](https://github.com/emberjs/ember.js/pull/19808) [CLEANUP] Remove the `--test-type` option from the helper blueprint
-- [#19820](https://github.com/emberjs/ember.js/pull/19820) Fix memory leak when looking up non-instantiable objects from the owner
-
-### v4.0.0-beta.7 (November 1, 2021)
-
-- [#19677](https://github.com/emberjs/ember.js/pull/19677) [CLEANUP] Remove jQuery from build
-
-### v4.0.0-beta.6 (October 26, 2021)
-
-- [#19799](https://github.com/emberjs/ember.js/pull/19799) / [glimmerjs/glimmer-vm#1354](https://github.com/glimmerjs/glimmer-vm/pull/1354) Fixes for errors while precompiling inline templates (introduced in 3.28.2)
-
-### v4.0.0-beta.5 (October 11, 2021)
+### v4.0.0 (November 15, 2021)
- [#19761](https://github.com/emberjs/ember.js/pull/19761) [BREAKING] Require ember-auto-import >= 2 or higher to enable ember-source to become a v2 addon in the 4.x cycle
-
-### v4.0.0-beta.4 (September 13, 2021)
-
-- [#19733](https://github.com/emberjs/ember.js/pull/19733) [BUGFIX] Ensure that using `routerService.urlFor(...)` and `routerService.recognize(...)` does not error if the router is not fully initialized
-
-### v4.0.0-beta.3 (August 30, 2021)
-
-- [#19708](https://github.com/emberjs/ember.js/pull/19708) [CLEANUP] Remove class-binding-and-class-name-bindings-in-templates
-
-### v4.0.0-beta.2 (August 23, 2021)
-
+- [#19706](https://github.com/emberjs/ember.js/pull/19706) [BREAKING] Explicitly drop Node 10 support to match support policy.
+- [BREAKING] Remove deprecated features
+ - [#19838](https://github.com/emberjs/ember.js/pull/19838) [CLEANUP] Remove check to see if `ember` is defined as a Bower dependency
+ - [#19846](https://github.com/emberjs/ember.js/pull/19846) [CLEANUP] Make using the "classic" edition of Ember throw
+ - [#19833](https://github.com/emberjs/ember.js/pull/19833) [CLEANUP] Remove deprecated array observers
+ - [#19836](https://github.com/emberjs/ember.js/pull/19836) [CLEANUP] Turn `template-only-glimmer-components` deprecation into an error
+ - [#19843](https://github.com/emberjs/ember.js/pull/19843) [CLEANUP] Turn `argument-less-helper-paren-less-invocation` deprecation into an error
+ - [#19749](https://github.com/emberjs/ember.js/pull/19749) [CLEANUP] Remove `deprecate-router-events` support code
+ - [#19762](https://github.com/emberjs/ember.js/pull/19762) [CLEANUP] Update GlimmerVM to 0.81
+ - removes deprecation of mutations during helper compute
+ - removes deprecation of mutations during unknownProperty
+ - `@glimmer/integration-tests`, `@glimmer/manager`, `@glimmer/validator`
+ * [#1330](https://github.com/glimmerjs/glimmer-vm/pull/1330) Remove deprecated support for mutation after consumption during certain manager hooks ([@snewcomer](https://github.com/snewcomer))
+ - `@glimmer/manager`
+ * [#1328](https://github.com/glimmerjs/glimmer-vm/pull/1328) Remove deprecated Component Manager version 3.4 ([@nlfurniss](https://github.com/nlfurniss))
+ - `@glimmer/integration-tests`, `@glimmer/manager`
+ * [#1329](https://github.com/glimmerjs/glimmer-vm/pull/1329) Remove deprecated Modifier Manager version 3.13 ([@nlfurniss](https://github.com/nlfurniss))
+ - [#19806](https://github.com/emberjs/ember.js/pull/19806) [CLEANUP] Drop export of built-ins, remove legacy components
+ - [#19808](https://github.com/emberjs/ember.js/pull/19808) [CLEANUP] Remove the `--test-type` option from the helper blueprint
+ - [#19677](https://github.com/emberjs/ember.js/pull/19677) [CLEANUP] Remove jQuery from build
+ - [#19708](https://github.com/emberjs/ember.js/pull/19708) [CLEANUP] Remove class-binding-and-class-name-bindings-in-templates
+ - [#19650](https://github.com/emberjs/ember.js/pull/19650) [CLEANUP] Remove deprecated mouse events
+ - [#19675](https://github.com/emberjs/ember.js/pull/19675) [CLEANUP] Remove jQuery usage from ember-testing
+ - [#19704](https://github.com/emberjs/ember.js/pull/19704) [CLEANUP] Remove template-compiler.registerPlugin
+ - [#19707](https://github.com/emberjs/ember.js/pull/19707) [CLEANUP] Remove Application Controller Router Properties
+ - [#19528](https://github.com/emberjs/ember.js/pull/19528) [CLEANUP] Remove Logger
+ - [#19558](https://github.com/emberjs/ember.js/pull/19558) [CLEANUP] Remove IE11 support
+ - [#19563](https://github.com/emberjs/ember.js/pull/19563) [CLEANUP] Remove internal Ember.assign usage
+ - [#19636](https://github.com/emberjs/ember.js/pull/19636) [CLEANUP] Remove copy & Copyable
+ - [#19638](https://github.com/emberjs/ember.js/pull/19638) [CLEANUP] Remove deprecated with
+ - [#19639](https://github.com/emberjs/ember.js/pull/19639) [CLEANUP] Removes deprecated Private INVOKE API
+ - [#19640](https://github.com/emberjs/ember.js/pull/19640) [CLEANUP] Remove old deprecations import path
+ - [#19641](https://github.com/emberjs/ember.js/pull/19641) [CLEANUP] Remove isVisible
+ - [#19642](https://github.com/emberjs/ember.js/pull/19642) [CLEANUP] Remove aliasMethod
+ - [#19643](https://github.com/emberjs/ember.js/pull/19643) [CLEANUP] Remove deprecate without for and since
+ - [#19644](https://github.com/emberjs/ember.js/pull/19644) [CLEANUP] Remove -in-element
+ - [#19645](https://github.com/emberjs/ember.js/pull/19645) [CLEANUP] Remove tryInvoke
+ - [#19646](https://github.com/emberjs/ember.js/pull/19646) [CLEANUP] Remove loc
+ - [#19647](https://github.com/emberjs/ember.js/pull/19647) [CLEANUP] Remove Ember.merge
+ - [#19648](https://github.com/emberjs/ember.js/pull/19648) [CLEANUP] Remove getWithDefault
+ - [#19651](https://github.com/emberjs/ember.js/pull/19651) [CLEANUP] Remove LEGACY_OWNER
+ - [#19652](https://github.com/emberjs/ember.js/pull/19652) [CLEANUP] Remove Globals Resolver
+ - [#19653](https://github.com/emberjs/ember.js/pull/19653) [CLEANUP] Remove run and computed dot access
+ - [#19654](https://github.com/emberjs/ember.js/pull/19654) [CLEANUP] Remove @ember/string methods from native prototype
+ - [#19655](https://github.com/emberjs/ember.js/pull/19655) [CLEANUP] Remove meta-destruction-apis
+ - [#19656](https://github.com/emberjs/ember.js/pull/19656) [CLEANUP] Remove string-based setComponentManager
+ - [#19657](https://github.com/emberjs/ember.js/pull/19657) [CLEANUP] Remove hasBlock and hasBlockParams
+ - [#19658](https://github.com/emberjs/ember.js/pull/19658) [CLEANUP] Remove sendAction and string action passing
+ - [#19659](https://github.com/emberjs/ember.js/pull/19659) [CLEANUP] Remove renderTemplate, disconnectOutlet, render
+ - [#19660](https://github.com/emberjs/ember.js/pull/19660) [CLEANUP] Remove attrs/attrs-arg-access
+ - [#19661](https://github.com/emberjs/ember.js/pull/19661) [CLEANUP] Remove EMBER_EXTEND_PROTOTYPES
+ - [#19663](https://github.com/emberjs/ember.js/pull/19663) [CLEANUP] Remove function prototype extensions
+ - [#19665](https://github.com/emberjs/ember.js/pull/19665) [CLEANUP] Remove deprecated jQuery integration
+ - [#19666](https://github.com/emberjs/ember.js/pull/19666) [CLEANUP] Remove jQuery integration in EventDispatcher
+ - [#19667](https://github.com/emberjs/ember.js/pull/19667) [CLEANUP] Cleanup IE11 leftovers
+ - [#19670](https://github.com/emberjs/ember.js/pull/19670) [CLEANUP] Remove .volatile()
+ - [#19671](https://github.com/emberjs/ember.js/pull/19671) [CLEANUP] Remove .property()
+ - [#19673](https://github.com/emberjs/ember.js/pull/19673) [CLEANUP] Remove computed deep each
+ - [#19674](https://github.com/emberjs/ember.js/pull/19674) [CLEANUP] Remove ability to override computed property
+ - [#19678](https://github.com/emberjs/ember.js/pull/19678) [CLEANUP] Remove window.Ember global
+ - [#19695](https://github.com/emberjs/ember.js/pull/19695) [CLEANUP] Remove {{partial}}
+ - [#19691](https://github.com/emberjs/ember.js/pull/19691) Add build assertion against `{{outlet named}}`
- [#19680](https://github.com/emberjs/ember.js/pull/19680) [DEPRECATION] Deprecate owner.inject per [RFC #680](https://github.com/emberjs/rfcs/blob/sn/owner-inject-deprecation/text/0680-implicit-injection-deprecation.md#1-deprecate-implicit-injection-on-target-object) and cleanup related deprecations that are `until: 4.0.0`.
-- [#19706](https://github.com/emberjs/ember.js/pull/19706) [BUGFIX] Explicitly drop Node 10 support to match support policy.
-- [#19650](https://github.com/emberjs/ember.js/pull/19650) [CLEANUP] Remove deprecated mouse events
-- [#19675](https://github.com/emberjs/ember.js/pull/19675) [CLEANUP] Remove jQuery usage from ember-testing
-- [#19704](https://github.com/emberjs/ember.js/pull/19704) [CLEANUP] Remove template-compiler.registerPlugin
-- [#19707](https://github.com/emberjs/ember.js/pull/19707) [CLEANUP] Remove Application Controller Router Properties
-
-### v4.0.0-beta.1 (August 17, 2021)
-
- [#19649](https://github.com/emberjs/ember.js/pull/19649) / [#19692](https://github.com/emberjs/ember.js/pull/19692) [DEPRECATION] Add deprecation warning to Ember.assign implementing [RFC #750](https://github.com/emberjs/rfcs/blob/master/text/0750-deprecate-ember-assign.md).
+- [#19825](https://github.com/emberjs/ember.js/pull/19825) [BUGFIX] Replace `assert.equal` in blueprints with `assert.strictEqual` to pass eslint-plugin-qunit v7 on generation
- [#19227](https://github.com/emberjs/ember.js/pull/19227) [BUGFIX] Enable global event dispatcher listeners to be lazily created fixing Passive Listener Violation in Chrome
- [#19542](https://github.com/emberjs/ember.js/pull/19542) [BUGFIX] Fix initializer test blueprints
- [#19589](https://github.com/emberjs/ember.js/pull/19589) [BUGFIX] Don’t include type-tests in build output
-- [#19528](https://github.com/emberjs/ember.js/pull/19528) [CLEANUP] Remove Logger
-- [#19558](https://github.com/emberjs/ember.js/pull/19558) [CLEANUP] Remove IE11 support
-- [#19563](https://github.com/emberjs/ember.js/pull/19563) [CLEANUP] Remove internal Ember.assign usage
-- [#19636](https://github.com/emberjs/ember.js/pull/19636) [CLEANUP] Remove copy & Copyable
-- [#19638](https://github.com/emberjs/ember.js/pull/19638) [CLEANUP] Remove deprecated with
-- [#19639](https://github.com/emberjs/ember.js/pull/19639) [CLEANUP] Removes deprecated Private INVOKE API
-- [#19640](https://github.com/emberjs/ember.js/pull/19640) [CLEANUP] Remove old deprecations import path
-- [#19641](https://github.com/emberjs/ember.js/pull/19641) [CLEANUP] Remove isVisible
-- [#19642](https://github.com/emberjs/ember.js/pull/19642) [CLEANUP] Remove aliasMethod
-- [#19643](https://github.com/emberjs/ember.js/pull/19643) [CLEANUP] Remove deprecate without for and since
-- [#19644](https://github.com/emberjs/ember.js/pull/19644) [CLEANUP] Remove -in-element
-- [#19645](https://github.com/emberjs/ember.js/pull/19645) [CLEANUP] Remove tryInvoke
-- [#19646](https://github.com/emberjs/ember.js/pull/19646) [CLEANUP] Remove loc
-- [#19647](https://github.com/emberjs/ember.js/pull/19647) [CLEANUP] Remove Ember.merge
-- [#19648](https://github.com/emberjs/ember.js/pull/19648) [CLEANUP] Remove getWithDefault
-- [#19651](https://github.com/emberjs/ember.js/pull/19651) [CLEANUP] Remove LEGACY_OWNER
-- [#19652](https://github.com/emberjs/ember.js/pull/19652) [CLEANUP] Remove Globals Resolver
-- [#19653](https://github.com/emberjs/ember.js/pull/19653) [CLEANUP] Remove run and computed dot access
-- [#19654](https://github.com/emberjs/ember.js/pull/19654) [CLEANUP] Remove @ember/string methods from native prototype
-- [#19655](https://github.com/emberjs/ember.js/pull/19655) [CLEANUP] Remove meta-destruction-apis
-- [#19656](https://github.com/emberjs/ember.js/pull/19656) [CLEANUP] Remove string-based setComponentManager
-- [#19657](https://github.com/emberjs/ember.js/pull/19657) [CLEANUP] Remove hasBlock and hasBlockParams
-- [#19658](https://github.com/emberjs/ember.js/pull/19658) [CLEANUP] Remove sendAction and string action passing
-- [#19659](https://github.com/emberjs/ember.js/pull/19659) [CLEANUP] Remove renderTemplate, disconnectOutlet, render
-- [#19660](https://github.com/emberjs/ember.js/pull/19660) [CLEANUP] Remove attrs/attrs-arg-access
-- [#19661](https://github.com/emberjs/ember.js/pull/19661) [CLEANUP] Remove EMBER_EXTEND_PROTOTYPES
-- [#19663](https://github.com/emberjs/ember.js/pull/19663) [CLEANUP] Remove function prototype extensions
-- [#19665](https://github.com/emberjs/ember.js/pull/19665) [CLEANUP] Remove deprecated jQuery integration
-- [#19666](https://github.com/emberjs/ember.js/pull/19666) [CLEANUP] Remove jQuery integration in EventDispatcher
-- [#19667](https://github.com/emberjs/ember.js/pull/19667) [CLEANUP] Cleanup IE11 leftovers
-- [#19670](https://github.com/emberjs/ember.js/pull/19670) [CLEANUP] Remove .volatile()
-- [#19671](https://github.com/emberjs/ember.js/pull/19671) [CLEANUP] Remove .property()
-- [#19673](https://github.com/emberjs/ember.js/pull/19673) [CLEANUP] Remove computed deep each
-- [#19674](https://github.com/emberjs/ember.js/pull/19674) [CLEANUP] Remove ability to override computed property
-- [#19678](https://github.com/emberjs/ember.js/pull/19678) [CLEANUP] Remove window.Ember global
-- [#19695](https://github.com/emberjs/ember.js/pull/19695) [CLEANUP] Remove {{partial}}
-- [#19691](https://github.com/emberjs/ember.js/pull/19691) Add build assertion against `{{outlet named}}`
## v3.28.6 (November 4, 2021)
| false |
Other | emberjs | ember.js | 96143deb03ba5dd0c7a1b893f2128889beed6b0c.json | Add v3.28.6 to CHANGELOG.md.
(cherry picked from commit c76034a9a22b1c38bc4b1dfb7394f95560e821b1) | CHANGELOG.md | @@ -100,10 +100,19 @@
- [#19695](https://github.com/emberjs/ember.js/pull/19695) [CLEANUP] Remove {{partial}}
- [#19691](https://github.com/emberjs/ember.js/pull/19691) Add build assertion against `{{outlet named}}`
+## v3.28.6 (November 4, 2021)
+
+- [#19683](https://github.com/emberjs/ember.js/pull/19683) Ensure super.willDestroy is called correctly in Router's willDestroy
+
## v3.28.5 (November 3, 2021)
- [#19820](https://github.com/emberjs/ember.js/pull/19820) Fix memory leak when looking up non-instantiable objects from the owner
+## v3.28.4 (October 22, 2021)
+
+- [#19798](https://github.com/emberjs/ember.js/pull/19798) More fixes for errors while precompiling inline templates (introduced in 3.28.2)
+- [glimmerjs/glimmer-vm@0.80.3](https://github.com/glimmerjs/glimmer-vm/releases/tag/v0.80.3) Improve template compilation speed regression
+
## v3.28.3 (October 22, 2021)
- [#19799](https://github.com/emberjs/ember.js/pull/19799) / [glimmerjs/glimmer-vm#1354](https://github.com/glimmerjs/glimmer-vm/pull/1354) Fixes for errors while precompiling inline templates (introduced in 3.28.2) | false |
Other | emberjs | ember.js | d320f79978c929c221d8224ec492400d176297e6.json | Add v4.0.0-beta.10 to CHANGELOG
(cherry picked from commit 685f11be1577ee84820e0ec6b625e45be8f5bd36) | CHANGELOG.md | @@ -1,5 +1,11 @@
# Ember Changelog
+### v4.0.0-beta.10 (November 15, 2021)
+
+- [#19833](https://github.com/emberjs/ember.js/pull/19833) [CLEANUP] Remove deprecated array observers
+- [#19836](https://github.com/emberjs/ember.js/pull/19836) [CLEANUP] Turn `template-only-glimmer-components` deprecation into an error
+- [#19843](https://github.com/emberjs/ember.js/pull/19843) [CLEANUP] Turn `argument-less-helper-paren-less-invocation` deprecation into an error
+
### v4.0.0-beta.9 (November 10, 2021)
- [#19749](https://github.com/emberjs/ember.js/pull/19749) [CLEANUP] Remove `deprecate-router-events` support code | false |
Other | emberjs | ember.js | 41438a8a5e26261239565bbcd1459d1b6a71f1b8.json | Add v4.0.0-beta.9 to CHANGELOG
(cherry picked from commit f1008843f47707f7b00d116773468d683ffe90f4) | CHANGELOG.md | @@ -1,5 +1,19 @@
# Ember Changelog
+### v4.0.0-beta.9 (November 20, 2021)
+
+- [#19749](https://github.com/emberjs/ember.js/pull/19749) [CLEANUP] Remove `deprecate-router-events` support code
+- [#19762](https://github.com/emberjs/ember.js/pull/19762) [CLEANUP] Update GlimmerVM to 0.81
+ - removes deprecation of mutations during helper compute
+ - removes deprecation of mutations during unknownProperty
+ - `@glimmer/integration-tests`, `@glimmer/manager`, `@glimmer/validator`
+ * [#1330](https://github.com/glimmerjs/glimmer-vm/pull/1330) Remove deprecated support for mutation after consumption during certain manager hooks ([@snewcomer](https://github.com/snewcomer))
+ - `@glimmer/manager`
+ * [#1328](https://github.com/glimmerjs/glimmer-vm/pull/1328) Remove deprecated Component Manager version 3.4 ([@nlfurniss](https://github.com/nlfurniss))
+ - `@glimmer/integration-tests`, `@glimmer/manager`
+ * [#1329](https://github.com/glimmerjs/glimmer-vm/pull/1329) Remove deprecated Modifier Manager version 3.13 ([@nlfurniss](https://github.com/nlfurniss))
+- [#19806](https://github.com/emberjs/ember.js/pull/19806) [CLEANUP] Drop export of built-ins, remove legacy components
+
### v4.0.0-beta.8 (November 5, 2021)
- [#19823](https://github.com/emberjs/ember.js/pull/19823) / [#19828](https://github.com/emberjs/ember.js/pull/19828) [BUGFIX] Fix deprecation `until` and link for Component.reopenClass and Component.reopen | false |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/glimmer/index.ts | @@ -295,11 +295,8 @@
export { templateFactory as template, templateCacheCounters } from '@glimmer/opcode-compiler';
export { default as RootTemplate } from './lib/templates/root';
-export { default as Checkbox } from './lib/components/checkbox';
-export { default as TextField } from './lib/components/text-field';
-export { default as TextArea } from './lib/components/-textarea';
-export { default as LinkComponent } from './lib/components/-link-to';
export { default as Input } from './lib/components/input';
+export { default as LinkTo } from './lib/components/link-to';
export { default as Textarea } from './lib/components/textarea';
export { default as Component } from './lib/component';
export { default as Helper, helper } from './lib/helper'; | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/glimmer/lib/component.ts | @@ -1,6 +1,6 @@
import { get, PROPERTY_DID_CHANGE } from '@ember/-internals/metal';
import { getOwner } from '@ember/-internals/owner';
-import { CoreObject, TargetActionSupport } from '@ember/-internals/runtime';
+import { TargetActionSupport } from '@ember/-internals/runtime';
import {
ActionSupport,
ChildViewsSupport,
@@ -11,8 +11,7 @@ import {
ViewMixin,
ViewStateSupport,
} from '@ember/-internals/views';
-import { EMBER_MODERNIZED_BUILT_IN_COMPONENTS } from '@ember/canary-features';
-import { assert, deprecate } from '@ember/debug';
+import { assert } from '@ember/debug';
import { DEBUG } from '@glimmer/env';
import { Environment } from '@glimmer/interfaces';
import { setInternalComponentManager } from '@glimmer/manager';
@@ -1044,71 +1043,4 @@ Component.reopenClass({
setInternalComponentManager(CURLY_COMPONENT_MANAGER, Component);
-if (EMBER_MODERNIZED_BUILT_IN_COMPONENTS) {
- Object.defineProperty(Component, '_wasReopened', {
- configurable: true,
- enumerable: false,
- writable: true,
- value: false,
- });
-
- Object.defineProperty(Component, 'reopen', {
- configurable: true,
- enumerable: false,
- writable: true,
- value: function reopen(this: typeof Component, ...args: unknown[]): unknown {
- if (this === Component) {
- deprecate(
- 'Reopening the Ember.Component super class itself is deprecated. ' +
- 'Consider alternatives such as installing event listeners on ' +
- 'the document or add the customizations to specific subclasses.',
- false,
- {
- id: 'ember.component.reopen',
- for: 'ember-source',
- since: {
- enabled: '3.27.0',
- },
- url: 'https://deprecations.emberjs.com/v3.x#toc_ember-component-reopen',
- until: '4.0.0',
- }
- );
-
- Component._wasReopened = true;
- }
-
- return CoreObject.reopen.call(this, ...args);
- },
- });
-
- Object.defineProperty(Component, 'reopenClass', {
- configurable: true,
- enumerable: false,
- writable: true,
- value: function reopenClass(this: typeof Component, ...args: unknown[]): unknown {
- if (this === Component) {
- deprecate(
- 'Reopening the Ember.Component super class itself is deprecated. ' +
- 'Consider alternatives such as installing event listeners on ' +
- 'the document or add the customizations to specific subclasses.',
- false,
- {
- id: 'ember.component.reopen',
- for: 'ember-source',
- url: 'https://deprecations.emberjs.com/v3.x#toc_ember-component-reopen',
- since: {
- enabled: '3.27.0',
- },
- until: '4.0.0',
- }
- );
-
- Component._wasReopened = true;
- }
-
- return CoreObject.reopenClass.call(this, ...args);
- },
- });
-}
-
export default Component; | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/glimmer/lib/components/-link-to.ts | @@ -1,1082 +0,0 @@
-/**
-@module ember
-*/
-
-import { alias, computed } from '@ember/-internals/metal';
-import { getOwner } from '@ember/-internals/owner';
-import RouterState from '@ember/-internals/routing/lib/system/router_state';
-import { CoreObject } from '@ember/-internals/runtime';
-import { isSimpleClick } from '@ember/-internals/views';
-import { EMBER_MODERNIZED_BUILT_IN_COMPONENTS } from '@ember/canary-features';
-import { assert, deprecate, runInDebug, warn } from '@ember/debug';
-import { EngineInstance, getEngineParent } from '@ember/engine';
-import { flaggedInstrument } from '@ember/instrumentation';
-import { service } from '@ember/service';
-import { DEBUG } from '@glimmer/env';
-import EmberComponent from '../component';
-import { HAS_BLOCK } from '../component-managers/curly';
-import layout from '../templates/-link-to';
-
-/**
- The `LinkTo` component renders a link to the supplied `routeName` passing an optionally
- supplied model to the route as its `model` context of the route. The block for `LinkTo`
- becomes the contents of the rendered element:
-
- ```handlebars
- <LinkTo @route='photoGallery'>
- Great Hamster Photos
- </LinkTo>
- ```
-
- This will result in:
-
- ```html
- <a href="/hamster-photos">
- Great Hamster Photos
- </a>
- ```
-
- ### Disabling the `LinkTo` component
-
- The `LinkTo` component can be disabled by using the `disabled` argument. A disabled link
- doesn't result in a transition when activated, and adds the `disabled` class to the `<a>`
- element.
-
- (The class name to apply to the element can be overridden by using the `disabledClass`
- argument)
-
- ```handlebars
- <LinkTo @route='photoGallery' @disabled={{true}}>
- Great Hamster Photos
- </LinkTo>
- ```
-
- ### Handling `href`
-
- `<LinkTo>` will use your application's Router to fill the element's `href` property with a URL
- that matches the path to the supplied `routeName`.
-
- ### Handling current route
-
- The `LinkTo` component will apply a CSS class name of 'active' when the application's current
- route matches the supplied routeName. For example, if the application's current route is
- 'photoGallery.recent', then the following invocation of `LinkTo`:
-
- ```handlebars
- <LinkTo @route='photoGallery.recent'>
- Great Hamster Photos
- </LinkTo>
- ```
-
- will result in
-
- ```html
- <a href="/hamster-photos/this-week" class="active">
- Great Hamster Photos
- </a>
- ```
-
- The CSS class used for active classes can be customized by passing an `activeClass` argument:
-
- ```handlebars
- <LinkTo @route='photoGallery.recent' @activeClass="current-url">
- Great Hamster Photos
- </LinkTo>
- ```
-
- ```html
- <a href="/hamster-photos/this-week" class="current-url">
- Great Hamster Photos
- </a>
- ```
-
- ### Keeping a link active for other routes
-
- If you need a link to be 'active' even when it doesn't match the current route, you can use the
- `current-when` argument.
-
- ```handlebars
- <LinkTo @route='photoGallery' @current-when='photos'>
- Photo Gallery
- </LinkTo>
- ```
-
- This may be helpful for keeping links active for:
-
- * non-nested routes that are logically related
- * some secondary menu approaches
- * 'top navigation' with 'sub navigation' scenarios
-
- A link will be active if `current-when` is `true` or the current
- route is the route this link would transition to.
-
- To match multiple routes 'space-separate' the routes:
-
- ```handlebars
- <LinkTo @route='gallery' @current-when='photos drawings paintings'>
- Art Gallery
- </LinkTo>
- ```
-
- ### Supplying a model
-
- An optional `model` argument can be used for routes whose
- paths contain dynamic segments. This argument will become
- the model context of the linked route:
-
- ```javascript
- Router.map(function() {
- this.route("photoGallery", {path: "hamster-photos/:photo_id"});
- });
- ```
-
- ```handlebars
- <LinkTo @route='photoGallery' @model={{this.aPhoto}}>
- {{aPhoto.title}}
- </LinkTo>
- ```
-
- ```html
- <a href="/hamster-photos/42">
- Tomster
- </a>
- ```
-
- ### Supplying multiple models
-
- For deep-linking to route paths that contain multiple
- dynamic segments, the `models` argument can be used.
-
- As the router transitions through the route path, each
- supplied model argument will become the context for the
- route with the dynamic segments:
-
- ```javascript
- Router.map(function() {
- this.route("photoGallery", { path: "hamster-photos/:photo_id" }, function() {
- this.route("comment", {path: "comments/:comment_id"});
- });
- });
- ```
-
- This argument will become the model context of the linked route:
-
- ```handlebars
- <LinkTo @route='photoGallery.comment' @models={{array this.aPhoto this.comment}}>
- {{comment.body}}
- </LinkTo>
- ```
-
- ```html
- <a href="/hamster-photos/42/comments/718">
- A+++ would snuggle again.
- </a>
- ```
-
- ### Supplying an explicit dynamic segment value
-
- If you don't have a model object available to pass to `LinkTo`,
- an optional string or integer argument can be passed for routes whose
- paths contain dynamic segments. This argument will become the value
- of the dynamic segment:
-
- ```javascript
- Router.map(function() {
- this.route("photoGallery", { path: "hamster-photos/:photo_id" });
- });
- ```
-
- ```handlebars
- <LinkTo @route='photoGallery' @model={{aPhotoId}}>
- {{this.aPhoto.title}}
- </LinkTo>
- ```
-
- ```html
- <a href="/hamster-photos/42">
- Tomster
- </a>
- ```
-
- When transitioning into the linked route, the `model` hook will
- be triggered with parameters including this passed identifier.
-
- ### Supplying a `tagName`
-
- By default `<LinkTo>` renders an `<a>` element. This can be overridden for a single use of
- `<LinkTo>` by supplying a `tagName` argument:
-
- ```handlebars
- <LinkTo @route='photoGallery' @tagName='li'>
- Great Hamster Photos
- </LinkTo>
- ```
-
- This produces:
-
- ```html
- <li>
- Great Hamster Photos
- </li>
- ```
-
- In general, this is not recommended.
-
- ### Supplying query parameters
-
- If you need to add optional key-value pairs that appear to the right of the ? in a URL,
- you can use the `query` argument.
-
- ```handlebars
- <LinkTo @route='photoGallery' @query={{hash page=1 per_page=20}}>
- Great Hamster Photos
- </LinkTo>
- ```
-
- This will result in:
-
- ```html
- <a href="/hamster-photos?page=1&per_page=20">
- Great Hamster Photos
- </a>
- ```
-
- @for Ember.Templates.components
- @method LinkTo
- @see {LinkComponent}
- @public
-*/
-
-/**
- @module @ember/routing
-*/
-
-/**
- See [Ember.Templates.components.LinkTo](/ember/release/classes/Ember.Templates.components/methods/input?anchor=LinkTo).
-
- @for Ember.Templates.helpers
- @method link-to
- @see {Ember.Templates.components.LinkTo}
- @public
-**/
-
-/**
- `LinkComponent` is the internal component invoked with `<LinkTo>` or `{{link-to}}`.
-
- @class LinkComponent
- @extends Component
- @see {Ember.Templates.components.LinkTo}
- @public
-**/
-
-const UNDEFINED = Object.freeze({
- toString() {
- return 'UNDEFINED';
- },
-});
-
-const EMPTY_QUERY_PARAMS = Object.freeze({});
-
-const LinkComponent = EmberComponent.extend({
- layout,
-
- tagName: 'a',
-
- /**
- @property route
- @public
- */
- route: UNDEFINED,
-
- /**
- @property model
- @public
- */
- model: UNDEFINED,
-
- /**
- @property models
- @public
- */
- models: UNDEFINED,
-
- /**
- @property query
- @public
- */
- query: UNDEFINED,
-
- /**
- Used to determine when this `LinkComponent` is active.
-
- @property current-when
- @public
- */
- 'current-when': null,
-
- /**
- Sets the `title` attribute of the `LinkComponent`'s HTML element.
-
- @property title
- @default null
- @public
- **/
- title: null,
-
- /**
- Sets the `rel` attribute of the `LinkComponent`'s HTML element.
-
- @property rel
- @default null
- @public
- **/
- rel: null,
-
- /**
- Sets the `tabindex` attribute of the `LinkComponent`'s HTML element.
-
- @property tabindex
- @default null
- @public
- **/
- tabindex: null,
-
- /**
- Sets the `target` attribute of the `LinkComponent`'s HTML element.
-
- @since 1.8.0
- @property target
- @default null
- @public
- **/
- target: null,
-
- /**
- The CSS class to apply to `LinkComponent`'s element when its `active`
- property is `true`.
-
- @property activeClass
- @type String
- @default active
- @public
- **/
- activeClass: 'active',
-
- /**
- The CSS class to apply to `LinkComponent`'s element when its `loading`
- property is `true`.
-
- @property loadingClass
- @type String
- @default loading
- @public
- **/
- loadingClass: 'loading',
-
- /**
- The CSS class to apply to a `LinkComponent`'s element when its `disabled`
- property is `true`.
-
- @property disabledClass
- @type String
- @default disabled
- @public
- **/
- disabledClass: 'disabled',
-
- /**
- Determines whether the `LinkComponent` will trigger routing via
- the `replaceWith` routing strategy.
-
- @property replace
- @type Boolean
- @default false
- @public
- **/
- replace: false,
-
- /**
- Determines whether the `LinkComponent` will prevent the default
- browser action by calling preventDefault() to avoid reloading
- the browser page.
-
- If you need to trigger a full browser reload pass `@preventDefault={{false}}`:
-
- ```handlebars
- <LinkTo @route='photoGallery' @model={{this.aPhotoId}} @preventDefault={{false}}>
- {{this.aPhotoId.title}}
- </LinkTo>
- ```
-
- @property preventDefault
- @type Boolean
- @default true
- @private
- **/
- preventDefault: true,
-
- /**
- By default this component will forward `href`, `title`, `rel`, `tabindex`, and `target`
- arguments to attributes on the component's element. When invoked with `{{link-to}}`, you can
- only customize these attributes. When invoked with `<LinkTo>`, you can just use HTML
- attributes directly.
-
- @property attributeBindings
- @type Array | String
- @default ['title', 'rel', 'tabindex', 'target']
- @public
- */
- attributeBindings: ['href', 'title', 'rel', 'tabindex', 'target'],
-
- /**
- By default this component will set classes on its element when any of the following arguments
- are truthy:
-
- * active
- * loading
- * disabled
-
- When these arguments are truthy, a class with the same name will be set on the element. When
- falsy, the associated class will not be on the element.
-
- @property classNameBindings
- @type Array
- @default ['active', 'loading', 'disabled', 'ember-transitioning-in', 'ember-transitioning-out']
- @public
- */
- classNameBindings: ['active', 'loading', 'disabled', 'transitioningIn', 'transitioningOut'],
-
- /**
- By default this component responds to the `click` event. When the component element is an
- `<a>` element, activating the link in another way, such as using the keyboard, triggers the
- click event.
-
- @property eventName
- @type String
- @default click
- @private
- */
- eventName: 'click',
-
- // this is doc'ed here so it shows up in the events
- // section of the API documentation, which is where
- // people will likely go looking for it.
- /**
- Triggers the `LinkComponent`'s routing behavior. If
- `eventName` is changed to a value other than `click`
- the routing behavior will trigger on that custom event
- instead.
-
- @event click
- @private
- */
-
- /**
- An overridable method called when `LinkComponent` objects are instantiated.
-
- Example:
-
- ```app/components/my-link.js
- import LinkComponent from '@ember/routing/link-component';
-
- export default LinkComponent.extend({
- init() {
- this._super(...arguments);
- console.log('Event is ' + this.get('eventName'));
- }
- });
- ```
-
- NOTE: If you do override `init` for a framework class like `Component`,
- be sure to call `this._super(...arguments)` in your
- `init` declaration! If you don't, Ember may not have an opportunity to
- do important setup work, and you'll see strange behavior in your
- application.
-
- @method init
- @private
- */
- init() {
- this._super(...arguments);
-
- this.assertLinkToOrigin();
-
- // Map desired event name to invoke function
- let { eventName } = this;
- this.on(eventName, this, this._invoke);
- },
-
- _routing: service('-routing'),
- _currentRoute: alias('_routing.currentRouteName'),
- _currentRouterState: alias('_routing.currentState'),
- _targetRouterState: alias('_routing.targetState'),
-
- _isEngine: computed(function (this: any) {
- return getEngineParent(getOwner(this) as EngineInstance) !== undefined;
- }),
-
- _engineMountPoint: computed(function (this: any) {
- return (getOwner(this) as EngineInstance).mountPoint;
- }),
-
- _route: computed('route', '_currentRouterState', function computeLinkToComponentRoute(this: any) {
- let { route } = this;
-
- return route === UNDEFINED ? this._currentRoute : this._namespaceRoute(route);
- }),
-
- _models: computed('model', 'models', function computeLinkToComponentModels(this: any) {
- let { model, models } = this;
-
- assert(
- 'You cannot provide both the `@model` and `@models` arguments to the <LinkTo> component.',
- model === UNDEFINED || models === UNDEFINED
- );
-
- if (model !== UNDEFINED) {
- return [model];
- } else if (models !== UNDEFINED) {
- assert('The `@models` argument must be an array.', Array.isArray(models));
- return models;
- } else {
- return [];
- }
- }),
-
- _query: computed('query', function computeLinkToComponentQuery(this: any) {
- let { query } = this;
-
- if (query === UNDEFINED) {
- return EMPTY_QUERY_PARAMS;
- } else {
- return Object.assign({}, query);
- }
- }),
-
- /**
- Accessed as a classname binding to apply the component's `disabledClass`
- CSS `class` to the element when the link is disabled.
-
- When `true`, interactions with the element will not trigger route changes.
- @property disabled
- @private
- */
- disabled: computed({
- get(_key: string): boolean {
- // always returns false for `get` because (due to the `set` just below)
- // the cached return value from the set will prevent this getter from _ever_
- // being called after a set has occurred
- return false;
- },
-
- set(this: any, _key: string, value: any): boolean {
- this._isDisabled = value;
-
- return value ? this.disabledClass : false;
- },
- }),
-
- /**
- Accessed as a classname binding to apply the component's `activeClass`
- CSS `class` to the element when the link is active.
-
- This component is considered active when its `currentWhen` property is `true`
- or the application's current route is the route this component would trigger
- transitions into.
-
- The `currentWhen` property can match against multiple routes by separating
- route names using the ` ` (space) character.
-
- @property active
- @private
- */
- active: computed('activeClass', '_active', function computeLinkToComponentActiveClass(this: any) {
- return this._active ? this.activeClass : false;
- }),
-
- _active: computed(
- '_currentRouterState',
- '_route',
- '_models',
- '_query',
- 'loading',
- 'current-when',
- function computeLinkToComponentActive(this: any) {
- let { _currentRouterState: state } = this;
-
- if (state) {
- return this._isActive(state);
- } else {
- return false;
- }
- }
- ),
-
- willBeActive: computed(
- '_currentRouterState',
- '_targetRouterState',
- '_route',
- '_models',
- '_query',
- 'loading',
- 'current-when',
- function computeLinkToComponentWillBeActive(this: any) {
- let { _currentRouterState: current, _targetRouterState: target } = this;
-
- if (current === target) {
- return;
- }
-
- return this._isActive(target);
- }
- ),
-
- /**
- * Method to assert that LinkTo is not used inside of a routeless engine. This method is
- * overridden in ember-engines link-to-external component to just be a noop, since the
- * link-to-external component extends the link-to component.
- *
- * @method assertLinkToOrigin
- * @private
- */
- assertLinkToOrigin() {
- assert(
- 'You attempted to use the <LinkTo> component within a routeless engine, this is not supported. ' +
- 'If you are using the ember-engines addon, use the <LinkToExternal> component instead. ' +
- 'See https://ember-engines.com/docs/links for more info.',
- !this._isEngine || this._engineMountPoint !== undefined
- );
- },
-
- _isActive(routerState: RouterState): boolean {
- if (this.loading) {
- return false;
- }
-
- let currentWhen = this['current-when'];
-
- if (typeof currentWhen === 'boolean') {
- return currentWhen;
- }
-
- let { _models: models, _routing: routing } = this;
-
- if (typeof currentWhen === 'string') {
- return currentWhen
- .split(' ')
- .some((route) =>
- routing.isActiveForRoute(models, undefined, this._namespaceRoute(route), routerState)
- );
- } else {
- return routing.isActiveForRoute(models, this._query, this._route, routerState);
- }
- },
-
- transitioningIn: computed(
- '_active',
- 'willBeActive',
- function computeLinkToComponentTransitioningIn(this: any) {
- if (this.willBeActive === true && !this._active) {
- return 'ember-transitioning-in';
- } else {
- return false;
- }
- }
- ),
-
- transitioningOut: computed(
- '_active',
- 'willBeActive',
- function computeLinkToComponentTransitioningOut(this: any) {
- if (this.willBeActive === false && this._active) {
- return 'ember-transitioning-out';
- } else {
- return false;
- }
- }
- ),
-
- _namespaceRoute(route: string): string {
- let { _engineMountPoint: mountPoint } = this;
-
- if (mountPoint === undefined) {
- return route;
- } else if (route === 'application') {
- return mountPoint;
- } else {
- return `${mountPoint}.${route}`;
- }
- },
-
- /**
- Event handler that invokes the link, activating the associated route.
-
- @method _invoke
- @param {Event} event
- @private
- */
- _invoke(this: any, event: Event): boolean {
- if (!isSimpleClick(event)) {
- return true;
- }
-
- let { bubbles, preventDefault } = this;
- let target = this.element.target;
- let isSelf = !target || target === '_self';
-
- if (preventDefault !== false && isSelf) {
- event.preventDefault();
- }
-
- if (bubbles === false) {
- event.stopPropagation();
- }
-
- if (this._isDisabled) {
- return false;
- }
-
- if (this.loading) {
- // tslint:disable-next-line:max-line-length
- warn(
- 'This link is in an inactive loading state because at least one of its models ' +
- 'currently has a null/undefined value, or the provided route name is invalid.',
- false,
- {
- id: 'ember-glimmer.link-to.inactive-loading-state',
- }
- );
- return false;
- }
-
- if (!isSelf) {
- return false;
- }
-
- let { _route: routeName, _models: models, _query: queryParams, replace: shouldReplace } = this;
-
- let payload = {
- queryParams,
- routeName,
- };
-
- flaggedInstrument(
- 'interaction.link-to',
- payload,
- this._generateTransition(payload, routeName, models, queryParams, shouldReplace)
- );
- return false;
- },
-
- _generateTransition(
- payload: any,
- qualifiedRouteName: string,
- models: any[],
- queryParams: any[],
- shouldReplace: boolean
- ) {
- let { _routing: routing } = this;
-
- return () => {
- payload.transition = routing.transitionTo(
- qualifiedRouteName,
- models,
- queryParams,
- shouldReplace
- );
- };
- },
-
- /**
- Sets the element's `href` attribute to the url for
- the `LinkComponent`'s targeted route.
-
- If the `LinkComponent`'s `tagName` is changed to a value other
- than `a`, this property will be ignored.
-
- @property href
- @private
- */
- href: computed(
- '_currentRouterState',
- '_route',
- '_models',
- '_query',
- 'tagName',
- 'loading',
- 'loadingHref',
- function computeLinkToComponentHref(this: any) {
- if (this.tagName !== 'a') {
- return;
- }
-
- if (this.loading) {
- return this.loadingHref;
- }
-
- let { _route: route, _models: models, _query: query, _routing: routing } = this;
-
- if (DEBUG) {
- /*
- * Unfortunately, to get decent error messages, we need to do this.
- * In some future state we should be able to use a "feature flag"
- * which allows us to strip this without needing to call it twice.
- *
- * if (isDebugBuild()) {
- * // Do the useful debug thing, probably including try/catch.
- * } else {
- * // Do the performant thing.
- * }
- */
- try {
- return routing.generateURL(route, models, query);
- } catch (e) {
- // tslint:disable-next-line:max-line-length
- e.message = `While generating link to route "${this.route}": ${e.message}`;
- throw e;
- }
- } else {
- return routing.generateURL(route, models, query);
- }
- }
- ),
-
- loading: computed(
- '_route',
- '_modelsAreLoaded',
- 'loadingClass',
- function computeLinkToComponentLoading(this: any) {
- let { _route: route, _modelsAreLoaded: loaded } = this;
-
- if (!loaded || route === null || route === undefined) {
- return this.loadingClass;
- }
- }
- ),
-
- _modelsAreLoaded: computed('_models', function computeLinkToComponentModelsAreLoaded(this: any) {
- let { _models: models } = this;
-
- for (let i = 0; i < models.length; i++) {
- let model = models[i];
- if (model === null || model === undefined) {
- return false;
- }
- }
-
- return true;
- }),
-
- /**
- The default href value to use while a link-to is loading.
- Only applies when tagName is 'a'
-
- @property loadingHref
- @type String
- @default #
- @private
- */
- loadingHref: '#',
-
- didReceiveAttrs() {
- let { disabledWhen } = this;
-
- if (disabledWhen !== undefined) {
- this.set('disabled', disabledWhen);
- }
-
- let { params } = this;
-
- if (!params || params.length === 0) {
- assert(
- 'You must provide at least one of the `@route`, `@model`, `@models` or `@query` argument to `<LinkTo>`.',
- !(
- this.route === UNDEFINED &&
- this.model === UNDEFINED &&
- this.models === UNDEFINED &&
- this.query === UNDEFINED
- )
- );
-
- let { _models: models } = this;
- if (models.length > 0) {
- let lastModel = models[models.length - 1];
-
- if (typeof lastModel === 'object' && lastModel !== null && lastModel.isQueryParams) {
- this.query = lastModel.values;
- models.pop();
- }
- }
-
- return;
- }
-
- let hasBlock = this[HAS_BLOCK];
-
- params = params.slice();
-
- // Process the positional arguments, in order.
- // 1. Inline link title comes first, if present.
- if (!hasBlock) {
- this.set('linkTitle', params.shift());
- }
-
- // 2. The last argument is possibly the `query` object.
- let queryParams = params[params.length - 1];
-
- if (queryParams && queryParams.isQueryParams) {
- this.set('query', params.pop().values);
- } else {
- this.set('query', UNDEFINED);
- }
-
- // 3. If there is a `route`, it is now at index 0.
- if (params.length === 0) {
- this.set('route', UNDEFINED);
- } else {
- this.set('route', params.shift());
- }
-
- // 4. Any remaining indices (if any) are `models`.
- this.set('model', UNDEFINED);
- this.set('models', params);
-
- runInDebug(() => {
- params = this.params.slice();
-
- let equivalentNamedArgs = [];
- let hasQueryParams = false;
-
- // Process the positional arguments, in order.
- // 1. Inline link title comes first, if present.
- if (!hasBlock) {
- params.shift();
- }
-
- // 2. The last argument is possibly the `query` object.
- let query = params[params.length - 1];
-
- if (query && query.isQueryParams) {
- params.pop();
- hasQueryParams = true;
- }
-
- // 3. If there is a `route`, it is now at index 0.
- if (params.length > 0) {
- params.shift();
- equivalentNamedArgs.push('`@route`');
- }
-
- // 4. Any remaining params (if any) are `models`.
- if (params.length === 1) {
- equivalentNamedArgs.push('`@model`');
- } else if (params.length > 1) {
- equivalentNamedArgs.push('`@models`');
- }
-
- if (hasQueryParams) {
- equivalentNamedArgs.push('`@query`');
- }
-
- if (equivalentNamedArgs.length > 0) {
- let message = 'Invoking the `<LinkTo>` component with positional arguments is deprecated.';
-
- message += `Please use the equivalent named arguments (${equivalentNamedArgs.join(', ')})`;
-
- if (hasQueryParams) {
- message += ' along with the `hash` helper';
- }
-
- if (!hasBlock) {
- message += " and pass a block for the link's content.";
- }
-
- message += '.';
-
- deprecate(message, false, {
- id: 'ember-glimmer.link-to.positional-arguments',
- until: '4.0.0',
- for: 'ember-source',
- url:
- 'https://deprecations.emberjs.com/v3.x#toc_ember-glimmer-link-to-positional-arguments',
- since: {
- enabled: '3.26.0-beta.1',
- },
- });
- }
- });
- },
-});
-
-LinkComponent.toString = () => '@ember/routing/link-component';
-
-LinkComponent.reopenClass({
- positionalParams: 'params',
-});
-
-if (EMBER_MODERNIZED_BUILT_IN_COMPONENTS) {
- Object.defineProperty(LinkComponent, '_wasReopened', {
- configurable: true,
- enumerable: false,
- writable: true,
- value: false,
- });
-
- Object.defineProperty(LinkComponent, 'reopen', {
- configurable: true,
- enumerable: false,
- writable: true,
- value: function reopen(this: typeof LinkComponent, ...args: unknown[]): unknown {
- if (this === LinkComponent) {
- deprecate(
- 'Reopening Ember.LinkComponent is deprecated. Consider implementing your own ' +
- 'wrapper component or create a custom subclass.',
- false,
- {
- id: 'ember.built-in-components.reopen',
- for: 'ember-source',
- since: {
- enabled: '3.27.0',
- },
- until: '4.0.0',
- url: 'https://deprecations.emberjs.com/v3.x#toc_ember-built-in-components-reopen',
- }
- );
-
- LinkComponent._wasReopened = true;
- }
-
- return CoreObject.reopen.call(this, ...args);
- },
- });
-
- Object.defineProperty(LinkComponent, 'reopenClass', {
- configurable: true,
- enumerable: false,
- writable: true,
- value: function reopenClass(this: typeof LinkComponent, ...args: unknown[]): unknown {
- if (this === LinkComponent) {
- deprecate(
- 'Reopening Ember.LinkComponent is deprecated. Consider implementing your own ' +
- 'wrapper component or create a custom subclass.',
- false,
- {
- id: 'ember.built-in-components.reopen',
- for: 'ember-source',
- since: {
- enabled: '3.27.0',
- },
- until: '4.0.0',
- url: 'https://deprecations.emberjs.com/v3.x#toc_ember-built-in-components-reopen',
- }
- );
-
- LinkComponent._wasReopened = true;
- }
-
- return CoreObject.reopenClass.call(this, ...args);
- },
- });
-}
-
-export default LinkComponent; | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/glimmer/lib/components/-textarea.ts | @@ -1,109 +0,0 @@
-/**
-@module @ember/component
-*/
-import { CoreObject } from '@ember/-internals/runtime';
-import { TextSupport } from '@ember/-internals/views';
-import { EMBER_MODERNIZED_BUILT_IN_COMPONENTS } from '@ember/canary-features';
-import { deprecate } from '@ember/debug';
-import Component from '../component';
-import layout from '../templates/empty';
-
-/**
- The internal representation used for `Textarea` invocations.
-
- @class TextArea
- @extends Component
- @see {Ember.Templates.components.Textarea}
- @uses Ember.TextSupport
- @public
-*/
-const TextArea = Component.extend(TextSupport, {
- classNames: ['ember-text-area'],
-
- layout,
-
- tagName: 'textarea',
- attributeBindings: [
- 'rows',
- 'cols',
- 'name',
- 'selectionEnd',
- 'selectionStart',
- 'autocomplete',
- 'wrap',
- 'lang',
- 'dir',
- 'value',
- ],
- rows: null,
- cols: null,
-});
-
-TextArea.toString = () => '@ember/component/text-area';
-
-if (EMBER_MODERNIZED_BUILT_IN_COMPONENTS) {
- Object.defineProperty(TextArea, '_wasReopened', {
- configurable: true,
- enumerable: false,
- writable: true,
- value: false,
- });
-
- Object.defineProperty(TextArea, 'reopen', {
- configurable: true,
- enumerable: false,
- writable: true,
- value: function reopen(this: typeof TextArea, ...args: unknown[]): unknown {
- if (this === TextArea) {
- deprecate(
- 'Reopening Ember.TextArea is deprecated. Consider implementing your own ' +
- 'wrapper component or create a custom subclass.',
- false,
- {
- id: 'ember.built-in-components.reopen',
- for: 'ember-source',
- since: {
- enabled: '3.27.0',
- },
- until: '4.0.0',
- url: 'https://deprecations.emberjs.com/v3.x#toc_ember-built-in-components-reopen',
- }
- );
-
- TextArea._wasReopened = true;
- }
-
- return CoreObject.reopen.call(this, ...args);
- },
- });
-
- Object.defineProperty(TextArea, 'reopenClass', {
- configurable: true,
- enumerable: false,
- writable: true,
- value: function reopenClass(this: typeof TextArea, ...args: unknown[]): unknown {
- if (this === TextArea) {
- deprecate(
- 'Reopening Ember.TextArea is deprecated. Consider implementing your own ' +
- 'wrapper component or create a custom subclass.',
- false,
- {
- id: 'ember.built-in-components.reopen',
- for: 'ember-source',
- since: {
- enabled: '3.27.0',
- },
- until: '4.0.0',
- url: 'https://deprecations.emberjs.com/v3.x#toc_ember-built-in-components-reopen',
- }
- );
-
- TextArea._wasReopened = true;
- }
-
- return CoreObject.reopenClass.call(this, ...args);
- },
- });
-}
-
-export default TextArea; | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/glimmer/lib/components/abstract-input.ts | @@ -1,19 +1,8 @@
import { tracked } from '@ember/-internals/metal';
-import { TargetActionSupport } from '@ember/-internals/runtime';
-import { TextSupport } from '@ember/-internals/views';
-import { EMBER_MODERNIZED_BUILT_IN_COMPONENTS } from '@ember/canary-features';
import { assert } from '@ember/debug';
import { action } from '@ember/object';
import { isConstRef, isUpdatableRef, Reference, updateRef, valueForRef } from '@glimmer/reference';
-import Component from '../component';
-import InternalComponent, {
- DeprecatingInternalComponent,
- EventListener,
- handleDeprecatedArguments,
- handleDeprecatedAttributeArguments,
- handleDeprecatedEventArguments,
- InternalComponentConstructor,
-} from './internal';
+import InternalComponent, { EventListener } from './internal';
const UNINITIALIZED: unknown = Object.freeze({});
@@ -109,11 +98,7 @@ class ForkedValue implements Value {
}
}
-export default abstract class AbstractInput
- extends InternalComponent
- implements DeprecatingInternalComponent {
- modernized = this.shouldModernize();
-
+export default abstract class AbstractInput extends InternalComponent {
validateArguments(): void {
assert(
`The ${this.constructor} component does not take any positional arguments`,
@@ -123,15 +108,6 @@ export default abstract class AbstractInput
super.validateArguments();
}
- protected shouldModernize(): boolean {
- return (
- Boolean(EMBER_MODERNIZED_BUILT_IN_COMPONENTS) &&
- Component._wasReopened === false &&
- TextSupport._wasReopened === false &&
- TargetActionSupport._wasReopened === false
- );
- }
-
private _value = valueFrom(this.args.named.value);
get value(): unknown {
@@ -200,45 +176,3 @@ export default abstract class AbstractInput
return virtualEvents.indexOf(name) !== -1;
}
}
-
-export function handleDeprecatedFeatures(
- target: InternalComponentConstructor<AbstractInput>,
- attributeBindings: Array<string | [attribute: string, argument: string]>
-): void {
- if (EMBER_MODERNIZED_BUILT_IN_COMPONENTS) {
- let { prototype } = target;
-
- let virtualEvents = {
- focusin: 'focus-in',
- focusout: 'focus-out',
- keypress: 'key-press',
- keyup: 'key-up',
- keydown: 'key-down',
- };
-
- handleDeprecatedArguments(target);
-
- handleDeprecatedAttributeArguments(target, attributeBindings);
-
- handleDeprecatedEventArguments(target, Object.entries(virtualEvents));
-
- {
- let superIsVirtualEventListener = prototype['isVirtualEventListener'];
-
- Object.defineProperty(prototype, 'isVirtualEventListener', {
- configurable: true,
- enumerable: false,
- value: function isVirtualEventListener(
- this: AbstractInput,
- name: string,
- listener: Function
- ): listener is VirtualEventListener {
- return (
- Object.values(virtualEvents).indexOf(name) !== -1 ||
- superIsVirtualEventListener.call(this, name, listener)
- );
- },
- });
- }
- }
-} | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/glimmer/lib/components/checkbox.ts | @@ -1,228 +0,0 @@
-import { set } from '@ember/-internals/metal';
-import { FrameworkObject } from '@ember/-internals/runtime';
-import { EMBER_MODERNIZED_BUILT_IN_COMPONENTS } from '@ember/canary-features';
-import { assert, deprecate } from '@ember/debug';
-import { DEBUG } from '@glimmer/env';
-import EmberComponent from '../component';
-import layout from '../templates/empty';
-
-/**
-@module @ember/component
-*/
-
-/**
- The internal class used to create text inputs when the `{{input}}`
- helper is used with `type` of `checkbox`.
-
- See [Ember.Templates.helpers.input](/ember/release/classes/Ember.Templates.helpers/methods/input?anchor=input) for usage details.
-
- ## Direct manipulation of `checked`
-
- The `checked` attribute of an `Checkbox` object should always be set
- through the Ember object or by interacting with its rendered element
- representation via the mouse, keyboard, or touch. Updating the value of the
- checkbox programmatically will result in the checked value of the object and its
- element losing synchronization.
-
- ## Layout and LayoutName properties
-
- Because HTML `input` elements are self closing `layout` and `layoutName`
- properties will not be applied.
-
- @class Checkbox
- @extends Component
- @public
-*/
-const Checkbox = EmberComponent.extend({
- layout,
-
- /**
- By default, this component will add the `ember-checkbox` class to the component's element.
-
- @property classNames
- @type Array | String
- @default ['ember-checkbox']
- @public
- */
- classNames: ['ember-checkbox'],
-
- tagName: 'input',
-
- /**
- By default this component will forward a number of arguments to attributes on the the
- component's element:
-
- * indeterminate
- * disabled
- * tabindex
- * name
- * autofocus
- * required
- * form
-
- When invoked with curly braces, this is the exhaustive list of HTML attributes you can
- customize (i.e. `{{input type="checkbox" disabled=true}}`).
-
- When invoked with angle bracket invocation, this list is irrelevant, because you can use HTML
- attribute syntax to customize the element (i.e.
- `<Input @type="checkbox" disabled data-custom="custom value" />`). However, `@type` and
- `@checked` must be passed as named arguments, not attributes.
-
- @property attributeBindings
- @type Array | String
- @default ['type', 'checked', 'indeterminate', 'disabled', 'tabindex', 'name', 'autofocus', 'required', 'form']
- @public
- */
- attributeBindings: [
- 'type',
- 'checked',
- 'indeterminate',
- 'disabled',
- 'tabindex',
- 'name',
- 'autofocus',
- 'required',
- 'form',
- ],
-
- /**
- Sets the `type` attribute of the `Checkbox`'s element
-
- @property disabled
- @default false
- @private
- */
- type: 'checkbox',
-
- /**
- Sets the `disabled` attribute of the `Checkbox`'s element
-
- @property disabled
- @default false
- @public
- */
- disabled: false,
-
- /**
- Corresponds to the `indeterminate` property of the `Checkbox`'s element
-
- @property disabled
- @default false
- @public
- */
- indeterminate: false,
-
- /**
- Whenever the checkbox is inserted into the DOM, perform initialization steps, which include
- setting the indeterminate property if needed.
-
- If this method is overridden, `super` must be called.
-
- @method
- @public
- */
- didInsertElement() {
- this._super(...arguments);
- this.element.indeterminate = Boolean(this.indeterminate);
- },
-
- /**
- Whenever the `change` event is fired on the checkbox, update its `checked` property to reflect
- whether the checkbox is checked.
-
- If this method is overridden, `super` must be called.
-
- @method
- @public
- */
- change() {
- set(this, 'checked', this.element.checked);
- },
-});
-
-if (DEBUG) {
- const UNSET = {};
-
- Checkbox.reopen({
- value: UNSET,
-
- didReceiveAttrs() {
- this._super();
-
- assert(
- "`<Input @type='checkbox' @value={{...}} />` is not supported; " +
- "please use `<Input @type='checkbox' @checked={{...}} />` instead.",
- !(this.type === 'checkbox' && this.value !== UNSET)
- );
- },
- });
-}
-
-Checkbox.toString = () => '@ember/component/checkbox';
-
-if (EMBER_MODERNIZED_BUILT_IN_COMPONENTS) {
- Object.defineProperty(Checkbox, '_wasReopened', {
- configurable: true,
- enumerable: false,
- writable: true,
- value: false,
- });
-
- Object.defineProperty(Checkbox, 'reopen', {
- configurable: true,
- enumerable: false,
- writable: true,
- value: function reopen(this: typeof Checkbox, ...args: unknown[]): unknown {
- if (this === Checkbox) {
- deprecate(
- 'Reopening Ember.Checkbox is deprecated. Consider implementing your own ' +
- 'wrapper component or create a custom subclass.',
- false,
- {
- id: 'ember.built-in-components.reopen',
- for: 'ember-source',
- since: {
- enabled: '3.27.0',
- },
- until: '4.0.0',
- url: 'https://deprecations.emberjs.com/v3.x#toc_ember-built-in-components-reopen',
- }
- );
-
- Checkbox._wasReopened = true;
- }
-
- return FrameworkObject.reopen.call(this, ...args);
- },
- });
-
- Object.defineProperty(Checkbox, 'reopenClass', {
- configurable: true,
- enumerable: false,
- writable: true,
- value: function reopenClass(this: typeof Checkbox, ...args: unknown[]): unknown {
- if (this === Checkbox) {
- deprecate(
- 'Reopening Ember.Checkbox is deprecated. Consider implementing your own ' +
- 'wrapper component or create a custom subclass.',
- false,
- {
- id: 'ember.built-in-components.reopen',
- for: 'ember-source',
- since: {
- enabled: '3.27.0',
- },
- until: '4.0.0',
- url: 'https://deprecations.emberjs.com/v3.x#toc_ember-built-in-components-reopen',
- }
- );
-
- Checkbox._wasReopened = true;
- }
-
- return FrameworkObject.reopenClass.call(this, ...args);
- },
- });
-}
-
-export default Checkbox; | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/glimmer/lib/components/input.ts | @@ -2,20 +2,17 @@
@module @ember/component
*/
import { hasDOM } from '@ember/-internals/browser-environment';
-import { EMBER_MODERNIZED_BUILT_IN_COMPONENTS } from '@ember/canary-features';
import { assert, warn } from '@ember/debug';
import { action } from '@ember/object';
import { valueForRef } from '@glimmer/reference';
import { untrack } from '@glimmer/validator';
import InputTemplate from '../templates/input';
-import AbstractInput, { handleDeprecatedFeatures, valueFrom } from './abstract-input';
-import Checkbox from './checkbox';
+import AbstractInput, { valueFrom } from './abstract-input';
import { opaquify } from './internal';
-import TextField from './text-field';
let isValidInputType: (type: string) => boolean;
-if (hasDOM && EMBER_MODERNIZED_BUILT_IN_COMPONENTS) {
+if (hasDOM) {
const INPUT_TYPES: Record<string, boolean | undefined> = Object.create(null);
const INPUT_ELEMENT = document.createElement('input');
@@ -54,6 +51,18 @@ if (hasDOM && EMBER_MODERNIZED_BUILT_IN_COMPONENTS) {
@public
*/
+/**
+ An opaque interface which can be imported and used in strict-mode
+ templates to call <Input>.
+
+ See [Ember.Templates.components.Input](/ember/release/classes/Ember.Templates.components/methods/Input?anchor=Input).
+
+ @for @ember/component
+ @method Input
+ @see {Ember.Templates.components.Input}
+ @public
+**/
+
/**
The `Input` component lets you create an HTML `<input>` element.
@@ -264,12 +273,6 @@ class Input extends AbstractInput {
this.checked = element.checked;
}
- protected shouldModernize(): boolean {
- return (
- super.shouldModernize() && TextField._wasReopened === false && Checkbox._wasReopened === false
- );
- }
-
protected isSupportedArgument(name: string): boolean {
let supportedArguments = [
'type',
@@ -284,57 +287,4 @@ class Input extends AbstractInput {
}
}
-if (EMBER_MODERNIZED_BUILT_IN_COMPONENTS) {
- handleDeprecatedFeatures(Input, [
- // Component
- 'id',
- ['id', 'elementId'],
- 'class',
- ['class', 'classNames'],
- ['role', 'ariaRole'],
-
- // TextSupport
- 'autocapitalize',
- 'autocorrect',
- 'autofocus',
- 'disabled',
- 'form',
- 'maxlength',
- 'minlength',
- 'placeholder',
- 'readonly',
- 'required',
- 'selectionDirection',
- 'spellcheck',
- 'tabindex',
- 'title',
-
- // TextField
- 'accept',
- 'autocomplete',
- 'autosave',
- 'dir',
- 'formaction',
- 'formenctype',
- 'formmethod',
- 'formnovalidate',
- 'formtarget',
- 'height',
- 'inputmode',
- 'lang',
- 'list',
- 'max',
- 'min',
- 'multiple',
- 'name',
- 'pattern',
- 'size',
- 'step',
- 'width',
-
- // Checkbox
- 'indeterminate',
- ]);
-}
-
export default opaquify(Input, InputTemplate); | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/glimmer/lib/components/internal.ts | @@ -1,28 +1,20 @@
import { Owner, setOwner } from '@ember/-internals/owner';
import { guidFor } from '@ember/-internals/utils';
-import { EMBER_MODERNIZED_BUILT_IN_COMPONENTS } from '@ember/canary-features';
-import { assert, deprecate } from '@ember/debug';
+import { assert } from '@ember/debug';
import {
CapturedArguments,
Destroyable,
DynamicScope,
Environment,
InternalComponentCapabilities,
InternalComponentManager,
- Maybe,
- Option,
TemplateFactory,
VMArguments,
WithCreateInstance,
} from '@glimmer/interfaces';
-import {
- setComponentTemplate,
- setInternalComponentManager,
- setInternalModifierManager,
-} from '@glimmer/manager';
+import { setComponentTemplate, setInternalComponentManager } from '@glimmer/manager';
import { createConstRef, isConstRef, Reference, valueForRef } from '@glimmer/reference';
import { untrack } from '@glimmer/validator';
-import InternalModifier, { InternalModifierManager } from '../modifiers/internal';
function NOOP(): void {}
@@ -226,327 +218,3 @@ class InternalManager
}
const INTERNAL_COMPONENT_MANAGER = new InternalManager();
-
-// Deprecated features
-
-export interface DeprecatingInternalComponent extends InternalComponent {
- modernized: boolean;
-}
-
-export type DeprecatingInternalComponentConstructor = InternalComponentConstructor<
- DeprecatingInternalComponent
->;
-
-export function handleDeprecatedArguments(target: DeprecatingInternalComponentConstructor): void {
- if (EMBER_MODERNIZED_BUILT_IN_COMPONENTS) {
- let angle = target.toString();
- let { prototype } = target;
-
- let superOnUnsupportedArgument = prototype['onUnsupportedArgument'];
-
- Object.defineProperty(prototype, 'onUnsupportedArgument', {
- configurable: true,
- enumerable: false,
- value: function onUnsupportedArgument(
- this: DeprecatingInternalComponent,
- name: string
- ): void {
- deprecate(`Passing the \`@${name}\` argument to <${angle}> is deprecated.`, false, {
- id: 'ember.built-in-components.legacy-arguments',
- for: 'ember-source',
- since: {
- enabled: '3.27.0',
- },
- until: '4.0.0',
- url:
- 'https://deprecations.emberjs.com/v3.x#toc_ember-built-in-components-legacy-arguments',
- });
-
- this.modernized = false;
-
- superOnUnsupportedArgument.call(this, name);
- },
- });
- }
-}
-
-export function handleDeprecatedAttributeArguments(
- target: DeprecatingInternalComponentConstructor,
- bindings: Array<string | [attribute: string, argument: string]>
-): void {
- if (EMBER_MODERNIZED_BUILT_IN_COMPONENTS) {
- let angle = target.toString();
- let curly = angle.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
- let { prototype } = target;
-
- let descriptorFor = (target: object, property: string): Option<PropertyDescriptor> => {
- if (target) {
- return (
- Object.getOwnPropertyDescriptor(target, property) ||
- descriptorFor(Object.getPrototypeOf(target), property)
- );
- } else {
- return null;
- }
- };
-
- bindings.forEach((binding) => {
- let attribute: string;
- let argument: string;
-
- if (Array.isArray(binding)) {
- [attribute, argument] = binding;
- } else {
- attribute = argument = binding;
- }
-
- let superIsSupportedArgument = prototype['isSupportedArgument'];
-
- Object.defineProperty(prototype, 'isSupportedArgument', {
- configurable: true,
- enumerable: false,
- value: function isSupportedArgument(
- this: DeprecatingInternalComponent,
- name: string
- ): boolean {
- return (
- (this.modernized && name === argument) || superIsSupportedArgument.call(this, name)
- );
- },
- });
-
- let superDescriptor = descriptorFor(prototype, attribute);
- let superGetter: (this: DeprecatingInternalComponent) => unknown = () => undefined;
-
- if (superDescriptor) {
- assert(
- `[BUG] expecting ${attribute} to be a getter on <${angle}>`,
- typeof superDescriptor.get === 'function'
- );
-
- superGetter = superDescriptor.get;
- }
-
- Object.defineProperty(prototype, attribute, {
- configurable: true,
- enumerable: true,
- get(this: DeprecatingInternalComponent): unknown {
- if (argument in this.args.named) {
- deprecate(
- `Passing the \`@${argument}\` argument to <${angle}> is deprecated. ` +
- `Instead, please pass the attribute directly, i.e. \`<${angle} ${attribute}={{...}} />\` ` +
- `instead of \`<${angle} @${argument}={{...}} />\` or \`{{${curly} ${argument}=...}}\`.`,
- false,
- {
- id: 'ember.built-in-components.legacy-attribute-arguments',
- for: 'ember-source',
- since: {
- enabled: '3.27.0',
- },
- until: '4.0.0',
- url:
- 'https://deprecations.emberjs.com/v3.x#toc_ember-built-in-components-legacy-attribute-arguments',
- }
- );
-
- // The `class` attribute is concatenated/merged instead of clobbered
- if (attribute === 'class' && superDescriptor) {
- return `${superGetter.call(this)} ${this.named(argument)}`;
- } else {
- return this.named(argument);
- }
- } else {
- return superGetter.call(this);
- }
- },
- });
- });
- }
-}
-
-export let handleDeprecatedEventArguments: (
- target: DeprecatingInternalComponentConstructor,
- extraEvents?: Array<[event: string, argument: string]>
-) => void = NOOP;
-
-if (EMBER_MODERNIZED_BUILT_IN_COMPONENTS) {
- type EventsMap = Record<string, string>;
-
- const EVENTS = new WeakMap<object, EventsMap>();
-
- const EMPTY_EVENTS = Object.freeze({}) as EventsMap;
-
- const getEventsMap = (owner: Owner): EventsMap => {
- let events = EVENTS.get(owner);
-
- if (events === undefined) {
- events = EMPTY_EVENTS;
-
- let eventDispatcher = owner.lookup<Maybe<{ _finalEvents?: EventsMap }>>(
- 'event_dispatcher:main'
- );
-
- if (eventDispatcher !== null && eventDispatcher !== undefined) {
- assert('[BUG] invalid event dispatcher', typeof eventDispatcher === 'object');
-
- if (
- '_finalEvents' in eventDispatcher &&
- eventDispatcher._finalEvents !== null &&
- eventDispatcher._finalEvents !== undefined
- ) {
- assert(
- '[BUG] invalid _finalEvents on event dispatcher',
- typeof eventDispatcher._finalEvents === 'object'
- );
-
- events = eventDispatcher._finalEvents;
- }
- }
-
- EVENTS.set(owner, events);
- }
-
- return events;
- };
-
- handleDeprecatedEventArguments = (target, extraEvents = []) => {
- let angle = target.toString();
- let curly = angle.toLowerCase();
- let { prototype } = target;
-
- let superIsSupportedArgument = prototype['isSupportedArgument'];
-
- Object.defineProperty(prototype, 'isSupportedArgument', {
- configurable: true,
- enumerable: false,
- value: function isSupportedArgument(
- this: DeprecatingInternalComponent,
- name: string
- ): boolean {
- let events = [
- ...Object.values(getEventsMap(this.owner)),
- 'focus-in',
- 'focus-out',
- 'key-press',
- 'key-up',
- 'key-down',
- ];
-
- return (
- (this.modernized && events.indexOf(name) !== -1) ||
- superIsSupportedArgument.call(this, name)
- );
- },
- });
-
- class DeprecatedEventHandlersModifier extends InternalModifier {
- static toString(): string {
- return 'DeprecatedEventHandlersModifier';
- }
-
- private listeners = new Map<string, EventListener>();
-
- install(): void {
- let { element, component, listenerFor, listeners } = this;
-
- let entries: [event: string, argument: string][] = [
- ...Object.entries(getEventsMap(this.owner)),
- ...extraEvents,
- ];
-
- for (let [event, argument] of entries) {
- let listener = listenerFor.call(component, event, argument);
-
- if (listener) {
- listeners.set(event, listener);
- element.addEventListener(event, listener);
- }
- }
-
- Object.freeze(listeners);
- }
-
- remove(): void {
- let { element, listeners } = this;
-
- for (let [event, listener] of Object.entries(listeners)) {
- element.removeEventListener(event, listener);
- }
-
- this.listeners = new Map();
- }
-
- private get component(): DeprecatingInternalComponent {
- let component = this.positional(0);
-
- assert(
- `[BUG] must pass <${angle}> component as first argument`,
- component instanceof target
- );
-
- return component;
- }
-
- private listenerFor(
- this: DeprecatingInternalComponent,
- event: string,
- argument: string
- ): Option<EventListener> {
- assert(`[BUG] must be called with <${angle}> component as this`, this instanceof target);
-
- if (argument in this.args.named) {
- deprecate(
- `Passing the \`@${argument}\` argument to <${angle}> is deprecated. ` +
- `This would have overwritten the internal \`${argument}\` method on ` +
- `the <${angle}> component and prevented it from functioning properly. ` +
- `Instead, please use the {{on}} modifier, i.e. \`<${angle} {{on "${event}" ...}} />\` ` +
- `instead of \`<${angle} @${argument}={{...}} />\` or \`{{${curly} ${argument}=...}}\`.`,
- !(argument in this),
- {
- id: 'ember.built-in-components.legacy-attribute-arguments',
- for: 'ember-source',
- since: {
- enabled: '3.27.0',
- },
- until: '4.0.0',
- url:
- 'https://deprecations.emberjs.com/v3.x#toc_ember-built-in-components-legacy-attribute-arguments',
- }
- );
-
- deprecate(
- `Passing the \`@${argument}\` argument to <${angle}> is deprecated. ` +
- `Instead, please use the {{on}} modifier, i.e. \`<${angle} {{on "${event}" ...}} />\` ` +
- `instead of \`<${angle} @${argument}={{...}} />\` or \`{{${curly} ${argument}=...}}\`.`,
- argument in this,
- {
- id: 'ember.built-in-components.legacy-attribute-arguments',
- for: 'ember-source',
- since: {
- enabled: '3.27.0',
- },
- until: '4.0.0',
- url:
- 'https://deprecations.emberjs.com/v3.x#toc_ember-built-in-components-legacy-attribute-arguments',
- }
- );
-
- return this['listenerFor'].call(this, argument);
- } else {
- return null;
- }
- }
- }
-
- setInternalModifierManager(
- new InternalModifierManager(DeprecatedEventHandlersModifier, 'deprecated-event-handlers'),
- DeprecatedEventHandlersModifier
- );
-
- Object.defineProperty(prototype, 'handleDeprecatedEvents', {
- configurable: true,
- enumerable: true,
- value: DeprecatedEventHandlersModifier,
- });
- };
-} | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/glimmer/lib/components/link-to.ts | @@ -1,10 +1,8 @@
import { Owner } from '@ember/-internals/owner';
import { RouterState, RoutingService } from '@ember/-internals/routing';
import { QueryParam } from '@ember/-internals/routing/lib/system/router';
-import { TargetActionSupport } from '@ember/-internals/runtime';
import { isSimpleClick } from '@ember/-internals/views';
-import { EMBER_MODERNIZED_BUILT_IN_COMPONENTS } from '@ember/canary-features';
-import { assert, debugFreeze, deprecate, warn } from '@ember/debug';
+import { assert, debugFreeze, warn } from '@ember/debug';
import { EngineInstance, getEngineParent } from '@ember/engine';
import { flaggedInstrument } from '@ember/instrumentation';
import { action } from '@ember/object';
@@ -13,16 +11,8 @@ import { DEBUG } from '@glimmer/env';
import { Maybe, Option } from '@glimmer/interfaces';
import { consumeTag, createCache, getValue, tagFor, untrack } from '@glimmer/validator';
import { Transition } from 'router_js';
-import Component from '../component';
import LinkToTemplate from '../templates/link-to';
-import LegacyLinkTo from './-link-to';
-import InternalComponent, {
- DeprecatingInternalComponent,
- handleDeprecatedArguments,
- handleDeprecatedAttributeArguments,
- handleDeprecatedEventArguments,
- opaquify,
-} from './internal';
+import InternalComponent, { opaquify } from './internal';
const EMPTY_ARRAY: {}[] = [];
const EMPTY_QUERY_PARAMS = {};
@@ -47,27 +37,257 @@ function isQueryParams(value: unknown): value is QueryParams {
return typeof value === 'object' && value !== null && value['isQueryParams'] === true;
}
-class LinkTo extends InternalComponent implements DeprecatingInternalComponent {
+/**
+ The `LinkTo` component renders a link to the supplied `routeName` passing an optionally
+ supplied model to the route as its `model` context of the route. The block for `LinkTo`
+ becomes the contents of the rendered element:
+
+ ```handlebars
+ <LinkTo @route='photoGallery'>
+ Great Hamster Photos
+ </LinkTo>
+ ```
+
+ This will result in:
+
+ ```html
+ <a href="/hamster-photos">
+ Great Hamster Photos
+ </a>
+ ```
+
+ ### Disabling the `LinkTo` component
+
+ The `LinkTo` component can be disabled by using the `disabled` argument. A disabled link
+ doesn't result in a transition when activated, and adds the `disabled` class to the `<a>`
+ element.
+
+ (The class name to apply to the element can be overridden by using the `disabledClass`
+ argument)
+
+ ```handlebars
+ <LinkTo @route='photoGallery' @disabled={{true}}>
+ Great Hamster Photos
+ </LinkTo>
+ ```
+
+ ### Handling `href`
+
+ `<LinkTo>` will use your application's Router to fill the element's `href` property with a URL
+ that matches the path to the supplied `routeName`.
+
+ ### Handling current route
+
+ The `LinkTo` component will apply a CSS class name of 'active' when the application's current
+ route matches the supplied routeName. For example, if the application's current route is
+ 'photoGallery.recent', then the following invocation of `LinkTo`:
+
+ ```handlebars
+ <LinkTo @route='photoGallery.recent'>
+ Great Hamster Photos
+ </LinkTo>
+ ```
+
+ will result in
+
+ ```html
+ <a href="/hamster-photos/this-week" class="active">
+ Great Hamster Photos
+ </a>
+ ```
+
+ The CSS class used for active classes can be customized by passing an `activeClass` argument:
+
+ ```handlebars
+ <LinkTo @route='photoGallery.recent' @activeClass="current-url">
+ Great Hamster Photos
+ </LinkTo>
+ ```
+
+ ```html
+ <a href="/hamster-photos/this-week" class="current-url">
+ Great Hamster Photos
+ </a>
+ ```
+
+ ### Keeping a link active for other routes
+
+ If you need a link to be 'active' even when it doesn't match the current route, you can use the
+ `current-when` argument.
+
+ ```handlebars
+ <LinkTo @route='photoGallery' @current-when='photos'>
+ Photo Gallery
+ </LinkTo>
+ ```
+
+ This may be helpful for keeping links active for:
+
+ * non-nested routes that are logically related
+ * some secondary menu approaches
+ * 'top navigation' with 'sub navigation' scenarios
+
+ A link will be active if `current-when` is `true` or the current
+ route is the route this link would transition to.
+
+ To match multiple routes 'space-separate' the routes:
+
+ ```handlebars
+ <LinkTo @route='gallery' @current-when='photos drawings paintings'>
+ Art Gallery
+ </LinkTo>
+ ```
+
+ ### Supplying a model
+
+ An optional `model` argument can be used for routes whose
+ paths contain dynamic segments. This argument will become
+ the model context of the linked route:
+
+ ```javascript
+ Router.map(function() {
+ this.route("photoGallery", {path: "hamster-photos/:photo_id"});
+ });
+ ```
+
+ ```handlebars
+ <LinkTo @route='photoGallery' @model={{this.aPhoto}}>
+ {{aPhoto.title}}
+ </LinkTo>
+ ```
+
+ ```html
+ <a href="/hamster-photos/42">
+ Tomster
+ </a>
+ ```
+
+ ### Supplying multiple models
+
+ For deep-linking to route paths that contain multiple
+ dynamic segments, the `models` argument can be used.
+
+ As the router transitions through the route path, each
+ supplied model argument will become the context for the
+ route with the dynamic segments:
+
+ ```javascript
+ Router.map(function() {
+ this.route("photoGallery", { path: "hamster-photos/:photo_id" }, function() {
+ this.route("comment", {path: "comments/:comment_id"});
+ });
+ });
+ ```
+
+ This argument will become the model context of the linked route:
+
+ ```handlebars
+ <LinkTo @route='photoGallery.comment' @models={{array this.aPhoto this.comment}}>
+ {{comment.body}}
+ </LinkTo>
+ ```
+
+ ```html
+ <a href="/hamster-photos/42/comments/718">
+ A+++ would snuggle again.
+ </a>
+ ```
+
+ ### Supplying an explicit dynamic segment value
+
+ If you don't have a model object available to pass to `LinkTo`,
+ an optional string or integer argument can be passed for routes whose
+ paths contain dynamic segments. This argument will become the value
+ of the dynamic segment:
+
+ ```javascript
+ Router.map(function() {
+ this.route("photoGallery", { path: "hamster-photos/:photo_id" });
+ });
+ ```
+
+ ```handlebars
+ <LinkTo @route='photoGallery' @model={{aPhotoId}}>
+ {{this.aPhoto.title}}
+ </LinkTo>
+ ```
+
+ ```html
+ <a href="/hamster-photos/42">
+ Tomster
+ </a>
+ ```
+
+ When transitioning into the linked route, the `model` hook will
+ be triggered with parameters including this passed identifier.
+
+ ### Supplying query parameters
+
+ If you need to add optional key-value pairs that appear to the right of the ? in a URL,
+ you can use the `query` argument.
+
+ ```handlebars
+ <LinkTo @route='photoGallery' @query={{hash page=1 per_page=20}}>
+ Great Hamster Photos
+ </LinkTo>
+ ```
+
+ This will result in:
+
+ ```html
+ <a href="/hamster-photos?page=1&per_page=20">
+ Great Hamster Photos
+ </a>
+ ```
+
+ @for Ember.Templates.components
+ @method LinkTo
+ @public
+*/
+
+/**
+ @module @ember/routing
+*/
+
+/**
+ See [Ember.Templates.components.LinkTo](/ember/release/classes/Ember.Templates.components/methods/input?anchor=LinkTo).
+
+ @for Ember.Templates.helpers
+ @method link-to
+ @see {Ember.Templates.components.LinkTo}
+ @public
+**/
+
+/**
+ An opaque interface which can be imported and used in strict-mode
+ templates to call <LinkTo>.
+
+ See [Ember.Templates.components.LinkTo](/ember/release/classes/Ember.Templates.components/methods/input?anchor=LinkTo).
+
+ @for @ember/routing
+ @method LinkTo
+ @see {Ember.Templates.components.LinkTo}
+ @public
+**/
+
+class LinkTo extends InternalComponent {
static toString(): string {
return 'LinkTo';
}
- modernized = this.shouldModernize();
-
@service('-routing') private declare routing: RoutingService;
validateArguments(): void {
assert(
'You attempted to use the <LinkTo> component within a routeless engine, this is not supported. ' +
'If you are using the ember-engines addon, use the <LinkToExternal> component instead. ' +
'See https://ember-engines.com/docs/links for more info.',
- !this.modernized || !this.isEngine || this.engineMountPoint !== undefined
+ !this.isEngine || this.engineMountPoint !== undefined
);
assert(
- 'You must provide at least one of the `@route`, `@model`, `@models` or `@query` argument to `<LinkTo>`.',
- !this.modernized ||
- 'route' in this.args.named ||
+ 'You must provide at least one of the `@route`, `@model`, `@models` or `@query` arguments to `<LinkTo>`.',
+ 'route' in this.args.named ||
'model' in this.args.named ||
'models' in this.args.named ||
'query' in this.args.named
@@ -338,15 +558,6 @@ class LinkTo extends InternalComponent implements DeprecatingInternalComponent {
event.preventDefault();
}
- private shouldModernize(): boolean {
- return (
- Boolean(EMBER_MODERNIZED_BUILT_IN_COMPONENTS) &&
- Component._wasReopened === false &&
- TargetActionSupport._wasReopened === false &&
- LegacyLinkTo._wasReopened === false
- );
- }
-
protected isSupportedArgument(name: string): boolean {
let supportedArguments = [
'route',
@@ -365,413 +576,114 @@ class LinkTo extends InternalComponent implements DeprecatingInternalComponent {
}
}
-// Deprecated features
-if (EMBER_MODERNIZED_BUILT_IN_COMPONENTS) {
- let { prototype } = LinkTo;
-
- let descriptorFor = (target: object, property: string): Option<PropertyDescriptor> => {
- if (target) {
- return (
- Object.getOwnPropertyDescriptor(target, property) ||
- descriptorFor(Object.getPrototypeOf(target), property)
- );
- } else {
- return null;
- }
- };
-
- handleDeprecatedArguments(LinkTo);
-
- handleDeprecatedAttributeArguments(LinkTo, [
- // Component
- 'id',
- ['id', 'elementId'],
- 'class',
- ['class', 'classNames'],
- ['role', 'ariaRole'],
-
- // LinkTo
- 'title',
- 'rel',
- 'tabindex',
- 'target',
- ]);
-
- handleDeprecatedEventArguments(LinkTo);
-
- // @href
- {
- let superOnUnsupportedArgument = prototype['onUnsupportedArgument'];
-
- Object.defineProperty(prototype, 'onUnsupportedArgument', {
- configurable: true,
- enumerable: false,
- value: function onUnsupportedArgument(this: LinkTo, name: string): void {
- if (name === 'href') {
- assert(`Passing the \`@href\` argument to <LinkTo> is not supported.`);
- } else {
- superOnUnsupportedArgument.call(this, name);
- }
- },
- });
- }
-
- // @tagName
- {
- let superOnUnsupportedArgument = prototype['onUnsupportedArgument'];
-
- Object.defineProperty(prototype, 'onUnsupportedArgument', {
- configurable: true,
- enumerable: false,
- value: function onUnsupportedArgument(this: LinkTo, name: string): void {
- if (name === 'tagName') {
- let tagName = this.named('tagName');
-
- deprecate(
- `Passing the \`@tagName\` argument to <LinkTo> is deprecated. Using a <${tagName}> ` +
- 'element for navigation is not recommended as it creates issues with assistive ' +
- 'technologies. Remove this argument to use the default <a> element. In the rare ' +
- 'cases that calls for using a different element, refactor to use the router ' +
- 'service inside a custom event handler instead.',
- false,
- {
- id: 'ember.link-to.tag-name',
- for: 'ember-source',
- since: {},
- until: '4.0.0',
- }
- );
-
- this.modernized = false;
- } else {
- superOnUnsupportedArgument.call(this, name);
- }
- },
- });
- }
-
- // @bubbles & @preventDefault
- {
- let superIsSupportedArgument = prototype['isSupportedArgument'];
-
- Object.defineProperty(prototype, 'isSupportedArgument', {
- configurable: true,
- enumerable: false,
- value: function isSupportedArgument(this: LinkTo, name: string): boolean {
- if (this.modernized) {
- if (name === 'bubbles') {
- deprecate(
- 'Passing the `@bubbles` argument to <LinkTo> is deprecated. ' +
- 'Use the {{on}} modifier to attach a custom event handler to ' +
- 'control event propagation.',
- false,
- {
- id: 'ember.built-in-components.legacy-arguments',
- for: 'ember-source',
- since: {
- enabled: '3.27.0',
- },
- until: '4.0.0',
- url:
- 'https://deprecations.emberjs.com/v3.x#toc_ember-built-in-components-legacy-arguments',
- }
- );
-
- return true;
- }
-
- if (name === 'preventDefault') {
- deprecate(
- 'Passing the `@preventDefault` argument to <LinkTo> is deprecated. ' +
- '`preventDefault()` is called automatically on events that are ' +
- 'handled by the <LinkTo> component to prevent the browser from ' +
- 'navigating away from the page.',
- false,
- {
- id: 'ember.built-in-components.legacy-arguments',
- for: 'ember-source',
- since: {
- enabled: '3.27.0',
- },
- until: '4.0.0',
- url:
- 'https://deprecations.emberjs.com/v3.x#toc_ember-built-in-components-legacy-arguments',
- }
- );
-
- return true;
- }
- }
+let { prototype } = LinkTo;
- return superIsSupportedArgument.call(this, name);
- },
- });
-
- Object.defineProperty(prototype, 'preventDefault', {
- configurable: true,
- enumerable: false,
- value: function preventDefault(this: LinkTo, event: Event): void {
- let shouldPreventDefault = true;
- let shouldStopPropagation = false;
-
- if ('preventDefault' in this.args.named) {
- let value = this.named('preventDefault');
-
- if (isMissing(value) || value) {
- deprecate(
- 'Passing the `@preventDefault` argument to <LinkTo> is deprecated. ' +
- '`preventDefault()` is called automatically on events that are ' +
- 'handled by the <LinkTo> component to prevent the browser from ' +
- 'navigating away from the page.',
- false,
- {
- id: 'ember.built-in-components.legacy-arguments',
- for: 'ember-source',
- since: {
- enabled: '3.27.0',
- },
- until: '4.0.0',
- url:
- 'https://deprecations.emberjs.com/v3.x#toc_ember-built-in-components-legacy-arguments',
- }
- );
- } else {
- deprecate(
- 'Passing the `@preventDefault` argument to <LinkTo> is deprecated. ' +
- '`preventDefault()` should always be called on events that are ' +
- 'handled by the <LinkTo> component to prevent the browser from ' +
- 'navigating away from the page.',
- false,
- {
- id: 'ember.built-in-components.legacy-arguments',
- for: 'ember-source',
- since: {
- enabled: '3.27.0',
- },
- until: '4.0.0',
- url:
- 'https://deprecations.emberjs.com/v3.x#toc_ember-built-in-components-legacy-arguments',
- }
- );
-
- shouldPreventDefault = false;
- }
- }
-
- if ('bubbles' in this.args.named) {
- let value = this.named('bubbles');
-
- if (value === false) {
- deprecate(
- 'Passing the `@bubbles` argument to <LinkTo> is deprecated. ' +
- 'Use the {{on}} modifier to attach a custom event handler to ' +
- 'control event propagation.',
- false,
- {
- id: 'ember.built-in-components.legacy-arguments',
- for: 'ember-source',
- since: {
- enabled: '3.27.0',
- },
- until: '4.0.0',
- url:
- 'https://deprecations.emberjs.com/v3.x#toc_ember-built-in-components-legacy-arguments',
- }
- );
-
- shouldStopPropagation = true;
- } else {
- deprecate(
- 'Passing the `@bubbles` argument to <LinkTo> is deprecated. ' +
- '`stopPropagation()` is not automatically called so there is ' +
- 'no need to pass this argument when you DO want the event to ' +
- 'propagate normally',
- false,
- {
- id: 'ember.built-in-components.legacy-arguments',
- for: 'ember-source',
- since: {
- enabled: '3.27.0',
- },
- until: '4.0.0',
- url:
- 'https://deprecations.emberjs.com/v3.x#toc_ember-built-in-components-legacy-arguments',
- }
- );
- }
- }
-
- if (shouldPreventDefault) {
- event.preventDefault();
- }
-
- if (shouldStopPropagation) {
- event.stopPropagation();
- }
- },
- });
- }
-
- // @disabledWhen
- {
- let superIsSupportedArgument = prototype['isSupportedArgument'];
-
- Object.defineProperty(prototype, 'isSupportedArgument', {
- configurable: true,
- enumerable: false,
- value: function isSupportedArgument(this: LinkTo, name: string): boolean {
- if (this.modernized) {
- if (name === 'disabledWhen') {
- deprecate(
- 'Passing the `@disabledWhen` argument to <LinkTo> is deprecated. ' +
- 'Use the `@disabled` argument instead.',
- false,
- {
- id: 'ember.link-to.disabled-when',
- for: 'ember-source',
- url: 'https://deprecations.emberjs.com/v4.x#toc_ember-link-to-disabled-when',
- since: {},
- until: '4.0.0',
- }
- );
-
- return true;
- }
- }
-
- return superIsSupportedArgument.call(this, name);
- },
- });
-
- let superDescriptor = descriptorFor(prototype, 'isDisabled');
-
- assert(
- `[BUG] expecting isDisabled to be a getter on <LinkTo>`,
- superDescriptor && typeof superDescriptor.get === 'function'
+let descriptorFor = (target: object, property: string): Option<PropertyDescriptor> => {
+ if (target) {
+ return (
+ Object.getOwnPropertyDescriptor(target, property) ||
+ descriptorFor(Object.getPrototypeOf(target), property)
);
-
- let superGetter = superDescriptor.get as (this: LinkTo) => boolean;
-
- Object.defineProperty(prototype, 'isDisabled', {
- configurable: true,
- enumerable: false,
- get: function isDisabled(this: LinkTo): boolean {
- if ('disabledWhen' in this.args.named) {
- deprecate(
- 'Passing the `@disabledWhen` argument to <LinkTo> is deprecated. ' +
- 'Use the `@disabled` argument instead.',
- false,
- {
- id: 'ember.link-to.disabled-when',
- for: 'ember-source',
- url: 'https://deprecations.emberjs.com/v4.x#toc_ember-link-to-disabled-when',
- since: {},
- until: '4.0.0',
- }
- );
-
- return Boolean(this.named('disabledWhen'));
- }
-
- return superGetter.call(this);
- },
- });
+ } else {
+ return null;
}
+};
+
+// @href
+{
+ let superOnUnsupportedArgument = prototype['onUnsupportedArgument'];
+
+ Object.defineProperty(prototype, 'onUnsupportedArgument', {
+ configurable: true,
+ enumerable: false,
+ value: function onUnsupportedArgument(this: LinkTo, name: string): void {
+ if (name === 'href') {
+ assert(`Passing the \`@href\` argument to <LinkTo> is not supported.`);
+ } else {
+ superOnUnsupportedArgument.call(this, name);
+ }
+ },
+ });
+}
- // QP
- {
- let superModelsDescriptor = descriptorFor(prototype, 'models');
+// QP
+{
+ let superModelsDescriptor = descriptorFor(prototype, 'models');
- assert(
- `[BUG] expecting models to be a getter on <LinkTo>`,
- superModelsDescriptor && typeof superModelsDescriptor.get === 'function'
- );
+ assert(
+ `[BUG] expecting models to be a getter on <LinkTo>`,
+ superModelsDescriptor && typeof superModelsDescriptor.get === 'function'
+ );
- let superModelsGetter = superModelsDescriptor.get as (this: LinkTo) => {}[];
+ let superModelsGetter = superModelsDescriptor.get as (this: LinkTo) => {}[];
- Object.defineProperty(prototype, 'models', {
- configurable: true,
- enumerable: false,
- get: function models(this: LinkTo): {}[] {
- let models = superModelsGetter.call(this);
+ Object.defineProperty(prototype, 'models', {
+ configurable: true,
+ enumerable: false,
+ get: function models(this: LinkTo): {}[] {
+ let models = superModelsGetter.call(this);
- if (models.length > 0 && !('query' in this.args.named)) {
- if (isQueryParams(models[models.length - 1])) {
- models = models.slice(0, -1);
- }
+ if (models.length > 0 && !('query' in this.args.named)) {
+ if (isQueryParams(models[models.length - 1])) {
+ models = models.slice(0, -1);
}
+ }
- return models;
- },
- });
+ return models;
+ },
+ });
- let superQueryDescriptor = descriptorFor(prototype, 'query');
+ let superQueryDescriptor = descriptorFor(prototype, 'query');
- assert(
- `[BUG] expecting query to be a getter on <LinkTo>`,
- superQueryDescriptor && typeof superQueryDescriptor.get === 'function'
- );
+ assert(
+ `[BUG] expecting query to be a getter on <LinkTo>`,
+ superQueryDescriptor && typeof superQueryDescriptor.get === 'function'
+ );
- let superQueryGetter = superQueryDescriptor.get as (this: LinkTo) => {};
+ let superQueryGetter = superQueryDescriptor.get as (this: LinkTo) => {};
- Object.defineProperty(prototype, 'query', {
- configurable: true,
- enumerable: false,
- get: function query(this: LinkTo): {} {
- if ('query' in this.args.named) {
- let qp = superQueryGetter.call(this);
+ Object.defineProperty(prototype, 'query', {
+ configurable: true,
+ enumerable: false,
+ get: function query(this: LinkTo): {} {
+ if ('query' in this.args.named) {
+ let qp = superQueryGetter.call(this);
- if (isQueryParams(qp)) {
- return qp.values ?? EMPTY_QUERY_PARAMS;
- } else {
- return qp;
- }
+ if (isQueryParams(qp)) {
+ return qp.values ?? EMPTY_QUERY_PARAMS;
} else {
- let models = superModelsGetter.call(this);
+ return qp;
+ }
+ } else {
+ let models = superModelsGetter.call(this);
- if (models.length > 0) {
- let qp = models[models.length - 1];
+ if (models.length > 0) {
+ let qp = models[models.length - 1];
- if (isQueryParams(qp) && qp.values !== null) {
- return qp.values;
- }
+ if (isQueryParams(qp) && qp.values !== null) {
+ return qp.values;
}
-
- return EMPTY_QUERY_PARAMS;
- }
- },
- });
- }
-
- // Positional Arguments
- {
- let superValidateArguments = prototype['validateArguments'];
-
- Object.defineProperty(prototype, 'validateArguments', {
- configurable: true,
- enumerable: false,
- value: function validateArguments(this: LinkTo): void {
- if (this.args.positional.length !== 0 || 'params' in this.args.named) {
- // Already deprecated in the legacy implementation
- this.modernized = false;
}
- superValidateArguments.call(this);
- },
- });
+ return EMPTY_QUERY_PARAMS;
+ }
+ },
+ });
+}
- let superOnUnsupportedArgument = prototype['onUnsupportedArgument'];
+// Positional Arguments
+{
+ let superOnUnsupportedArgument = prototype['onUnsupportedArgument'];
- Object.defineProperty(prototype, 'onUnsupportedArgument', {
- configurable: true,
- enumerable: false,
- value: function onUnsupportedArgument(this: LinkTo, name: string): void {
- if (name !== 'params') {
- superOnUnsupportedArgument.call(this, name);
- }
- },
- });
- }
+ Object.defineProperty(prototype, 'onUnsupportedArgument', {
+ configurable: true,
+ enumerable: false,
+ value: function onUnsupportedArgument(this: LinkTo, name: string): void {
+ if (name !== 'params') {
+ superOnUnsupportedArgument.call(this, name);
+ }
+ },
+ });
}
export default opaquify(LinkTo, LinkToTemplate); | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/glimmer/lib/components/text-field.ts | @@ -1,272 +0,0 @@
-/**
-@module @ember/component
-*/
-import { hasDOM } from '@ember/-internals/browser-environment';
-import { computed } from '@ember/-internals/metal';
-import { CoreObject } from '@ember/-internals/runtime';
-import { TextSupport } from '@ember/-internals/views';
-import { EMBER_MODERNIZED_BUILT_IN_COMPONENTS } from '@ember/canary-features';
-import { deprecate } from '@ember/debug';
-import Component from '../component';
-import layout from '../templates/empty';
-
-const inputTypes = hasDOM ? Object.create(null) : null;
-function canSetTypeOfInput(type: string): boolean {
- // if running in outside of a browser always return
- // the original type
- if (!hasDOM) {
- return Boolean(type);
- }
-
- if (type in inputTypes) {
- return inputTypes[type];
- }
-
- let inputTypeTestElement = document.createElement('input');
-
- try {
- inputTypeTestElement.type = type;
- } catch (e) {
- // ignored
- }
-
- return (inputTypes[type] = inputTypeTestElement.type === type);
-}
-
-/**
- The internal class used to create text inputs when the `Input` component is used with `type` of `text`.
-
- See [Ember.Templates.components.Input](/ember/release/classes/Ember.Templates.components/methods/Input?anchor=Input) for usage details.
-
- ## Layout and LayoutName properties
-
- Because HTML `input` elements are self closing `layout` and `layoutName`
- properties will not be applied.
-
- @class TextField
- @extends Component
- @uses Ember.TextSupport
- @public
-*/
-const TextField = Component.extend(TextSupport, {
- layout,
-
- /**
- By default, this component will add the `ember-text-field` class to the component's element.
-
- @property classNames
- @type Array | String
- @default ['ember-text-field']
- @public
- */
- classNames: ['ember-text-field'],
- tagName: 'input',
-
- /**
- By default this component will forward a number of arguments to attributes on the the
- component's element:
-
- * accept
- * autocomplete
- * autosave
- * dir
- * formaction
- * formenctype
- * formmethod
- * formnovalidate
- * formtarget
- * height
- * inputmode
- * lang
- * list
- * type
- * max
- * min
- * multiple
- * name
- * pattern
- * size
- * step
- * value
- * width
-
- When invoked with `{{input type="text"}}`, you can only customize these attributes. When invoked
- with `<Input @type="text" />`, you can just use HTML attributes directly.
-
- @property attributeBindings
- @type Array | String
- @default ['accept', 'autocomplete', 'autosave', 'dir', 'formaction', 'formenctype', 'formmethod', 'formnovalidate', 'formtarget', 'height', 'inputmode', 'lang', 'list', 'type', 'max', 'min', 'multiple', 'name', 'pattern', 'size', 'step', 'value', 'width']
- @public
- */
- attributeBindings: [
- 'accept',
- 'autocomplete',
- 'autosave',
- 'dir',
- 'formaction',
- 'formenctype',
- 'formmethod',
- 'formnovalidate',
- 'formtarget',
- 'height',
- 'inputmode',
- 'lang',
- 'list',
- 'type', // needs to be before min and max. See #15675
- 'max',
- 'min',
- 'multiple',
- 'name',
- 'pattern',
- 'size',
- 'step',
- 'value',
- 'width',
- ],
-
- /**
- As the user inputs text, this property is updated to reflect the `value` property of the HTML
- element.
-
- @property value
- @type String
- @default ""
- @public
- */
- value: '',
-
- /**
- The `type` attribute of the input element.
-
- @property type
- @type String
- @default "text"
- @public
- */
- type: computed({
- get(): string {
- return 'text';
- },
-
- set(_key: string, value: string) {
- let type = 'text';
-
- if (canSetTypeOfInput(value)) {
- type = value;
- }
-
- return type;
- },
- }),
-
- /**
- The `size` of the text field in characters.
-
- @property size
- @type String
- @default null
- @public
- */
- size: null,
-
- /**
- The `pattern` attribute of input element.
-
- @property pattern
- @type String
- @default null
- @public
- */
- pattern: null,
-
- /**
- The `min` attribute of input element used with `type="number"` or `type="range"`.
-
- @property min
- @type String
- @default null
- @since 1.4.0
- @public
- */
- min: null,
-
- /**
- The `max` attribute of input element used with `type="number"` or `type="range"`.
-
- @property max
- @type String
- @default null
- @since 1.4.0
- @public
- */
- max: null,
-});
-
-TextField.toString = () => '@ember/component/text-field';
-
-if (EMBER_MODERNIZED_BUILT_IN_COMPONENTS) {
- Object.defineProperty(TextField, '_wasReopened', {
- configurable: true,
- enumerable: false,
- writable: true,
- value: false,
- });
-
- Object.defineProperty(TextField, 'reopen', {
- configurable: true,
- enumerable: false,
- writable: true,
- value: function reopen(this: typeof TextField, ...args: unknown[]): unknown {
- if (this === TextField) {
- deprecate(
- 'Reopening Ember.TextField is deprecated. Consider implementing your own ' +
- 'wrapper component or create a custom subclass.',
- false,
- {
- id: 'ember.built-in-components.reopen',
- for: 'ember-source',
- since: {
- enabled: '3.27.0',
- },
- until: '4.0.0',
- url: 'https://deprecations.emberjs.com/v3.x#toc_ember-built-in-components-reopen',
- }
- );
-
- TextField._wasReopened = true;
- }
-
- return CoreObject.reopen.call(this, ...args);
- },
- });
-
- Object.defineProperty(TextField, 'reopenClass', {
- configurable: true,
- enumerable: false,
- writable: true,
- value: function reopenClass(this: typeof TextField, ...args: unknown[]): unknown {
- if (this === TextField) {
- deprecate(
- 'Reopening Ember.TextField is deprecated. Consider implementing your own ' +
- 'wrapper component or create a custom subclass.',
- false,
- {
- id: 'ember.built-in-components.reopen',
- for: 'ember-source',
- since: {
- enabled: '3.27.0',
- },
- until: '4.0.0',
- url: 'https://deprecations.emberjs.com/v3.x#toc_ember-built-in-components-reopen',
- }
- );
-
- TextField._wasReopened = true;
- }
-
- return CoreObject.reopenClass.call(this, ...args);
- },
- });
-}
-
-export default TextField; | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/glimmer/lib/components/textarea.ts | @@ -1,11 +1,9 @@
/**
@module @ember/component
*/
-import { EMBER_MODERNIZED_BUILT_IN_COMPONENTS } from '@ember/canary-features';
import { action } from '@ember/object';
import TextareaTemplate from '../templates/textarea';
-import LegacyTextArea from './-textarea';
-import AbstractInput, { handleDeprecatedFeatures } from './abstract-input';
+import AbstractInput from './abstract-input';
import { opaquify } from './internal';
/**
@@ -118,7 +116,6 @@ import { opaquify } from './internal';
@method Textarea
@for Ember.Templates.components
- @see {TextArea}
@public
*/
@@ -127,9 +124,21 @@ import { opaquify } from './internal';
@method textarea
@for Ember.Templates.helpers
- @see {Ember.Templates.components.textarea}
+ @see {Ember.Templates.components.Textarea}
@public
*/
+
+/**
+ An opaque interface which can be imported and used in strict-mode
+ templates to call <Textarea>.
+
+ See [Ember.Templates.components.Textarea](/ember/release/classes/Ember.Templates.components/methods/Textarea?anchor=Input).
+
+ @for @ember/component
+ @method Textarea
+ @see {Ember.Templates.components.Textarea}
+ @public
+**/
class Textarea extends AbstractInput {
static toString(): string {
return 'Textarea';
@@ -149,53 +158,10 @@ class Textarea extends AbstractInput {
super.input(event);
}
- protected shouldModernize(): boolean {
- return super.shouldModernize() && LegacyTextArea._wasReopened === false;
- }
-
protected isSupportedArgument(name: string): boolean {
let supportedArguments = ['type', 'value', 'enter', 'insert-newline', 'escape-press'];
return supportedArguments.indexOf(name) !== -1 || super.isSupportedArgument(name);
}
}
-// Deprecated features
-if (EMBER_MODERNIZED_BUILT_IN_COMPONENTS) {
- handleDeprecatedFeatures(Textarea, [
- // Component
- 'id',
- ['id', 'elementId'],
- 'class',
- ['class', 'classNames'],
- ['role', 'ariaRole'],
-
- // TextSupport
- 'autocapitalize',
- 'autocorrect',
- 'autofocus',
- 'disabled',
- 'form',
- 'maxlength',
- 'minlength',
- 'placeholder',
- 'readonly',
- 'required',
- 'selectionDirection',
- 'spellcheck',
- 'tabindex',
- 'title',
-
- // TextField
- 'rows',
- 'cols',
- 'name',
- 'selectionEnd',
- 'selectionStart',
- 'autocomplete',
- 'wrap',
- 'lang',
- 'dir',
- ]);
-}
-
export default opaquify(Textarea, TextareaTemplate); | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/glimmer/lib/helpers/query-param.ts | @@ -1,55 +0,0 @@
-/**
-@module ember
-*/
-import { QueryParams } from '@ember/-internals/routing';
-import { assert, deprecate } from '@ember/debug';
-import { CapturedArguments } from '@glimmer/interfaces';
-import { createComputeRef } from '@glimmer/reference';
-import { reifyNamed } from '@glimmer/runtime';
-import { internalHelper } from './internal-helper';
-
-/**
- This is a helper to be used in conjunction with the link-to helper.
- It will supply url query parameters to the target route.
-
- @example In this example we are setting the `direction` query param to the value `"asc"`
-
- ```app/templates/application.hbs
- <LinkTo
- @route="posts"
- {{query-params direction="asc"}}
- >
- Sort
- </LinkTo>
- ```
-
- @method query-params
- @for Ember.Templates.helpers
- @param {Object} hash takes a hash of query parameters
- @return {Object} A `QueryParams` object for `{{link-to}}`
- @public
-*/
-export default internalHelper(({ positional, named }: CapturedArguments) => {
- return createComputeRef(() => {
- assert(
- "The `query-params` helper only accepts named arguments, e.g. (query-params queryParamPropertyName='foo') as opposed to (query-params 'foo')",
- positional.length === 0
- );
-
- deprecate(
- 'The `query-params` helper is deprecated. Invoke `<LinkTo>` with the `@query` named argument and the `hash` helper instead.',
- false,
- {
- id: 'ember-glimmer.link-to.positional-arguments',
- until: '4.0.0',
- for: 'ember-source',
- url: 'https://deprecations.emberjs.com/v3.x#toc_ember-glimmer-link-to-positional-arguments',
- since: {
- enabled: '3.26.0-beta.1',
- },
- }
- );
-
- return new QueryParams(Object.assign({}, reifyNamed(named) as any));
- });
-}); | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/glimmer/lib/resolver.ts | @@ -46,7 +46,6 @@ import { default as trackArray } from './helpers/-track-array';
import { default as action } from './helpers/action';
import { default as eachIn } from './helpers/each-in';
import { default as mut } from './helpers/mut';
-import { default as queryParams } from './helpers/query-param';
import { default as readonly } from './helpers/readonly';
import { default as unbound } from './helpers/unbound';
import actionModifier from './modifiers/action';
@@ -115,7 +114,6 @@ const BUILTIN_KEYWORD_HELPERS = {
mut,
readonly,
unbound,
- 'query-params': queryParams,
'-hash': hash,
'-each-in': eachIn,
'-normalize-class': normalizeClassHelper, | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/glimmer/lib/setup-registry.ts | @@ -1,14 +1,9 @@
import { privatize as P, Registry } from '@ember/-internals/container';
import { ENV } from '@ember/-internals/environment';
import { getOwner } from '@ember/-internals/owner';
-import { EMBER_MODERNIZED_BUILT_IN_COMPONENTS } from '@ember/canary-features';
import Component from './component';
-import LegacyLinkTo from './components/-link-to';
-import LegacyTextArea from './components/-textarea';
-import Checkbox from './components/checkbox';
import Input from './components/input';
import LinkTo from './components/link-to';
-import TextField from './components/text-field';
import Textarea from './components/textarea';
import { clientBuilder, rehydrationBuilder, serializeBuilder } from './dom';
import { Renderer } from './renderer';
@@ -48,19 +43,10 @@ export function setupEngineRegistry(registry: Registry): void {
registry.optionsForType('helper', { instantiate: false });
- registry.register('component:-text-field', TextField);
- registry.register('component:-checkbox', Checkbox);
registry.register('component:input', Input);
- if (EMBER_MODERNIZED_BUILT_IN_COMPONENTS) {
- registry.register('component:link-to', LinkTo);
- registry.register('component:-link-to', LegacyLinkTo);
- registry.register('component:-textarea', LegacyTextArea);
- registry.register('component:textarea', Textarea);
- } else {
- registry.register('component:link-to', LegacyLinkTo);
- registry.register('component:textarea', LegacyTextArea);
- }
+ registry.register('component:link-to', LinkTo);
+ registry.register('component:textarea', Textarea);
if (!ENV._TEMPLATE_ONLY_GLIMMER_COMPONENTS) {
registry.register(P`component:-default`, Component); | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/glimmer/lib/templates/-link-to.d.ts | @@ -1,3 +0,0 @@
-import { TemplateFactory } from '@glimmer/interfaces';
-declare const TEMPLATE: TemplateFactory;
-export default TEMPLATE; | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/glimmer/lib/templates/-link-to.hbs | @@ -1,5 +0,0 @@
-{{~#if (has-block)~}}
- {{yield}}
-{{~else~}}
- {{this.linkTitle}}
-{{~/if~}} | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/glimmer/lib/templates/input.hbs | @@ -1,68 +1,17 @@
-{{~#if this.modernized ~}}
- <input
- {{!-- for compatibility --}}
- id={{this.id}}
- class={{this.class}}
+<input
+ {{!-- for compatibility --}}
+ id={{this.id}}
+ class={{this.class}}
- {{!-- deprecated attribute bindings --}}
- role={{this.role}}
- autocapitalize={{this.autocapitalize}}
- autocorrect={{this.autocorrect}}
- autofocus={{this.autofocus}}
- disabled={{this.disabled}}
- form={{this.form}}
- maxlength={{this.maxlength}}
- minlength={{this.minlength}}
- placeholder={{this.placeholder}}
- readonly={{this.readonly}}
- required={{this.required}}
- selectionDirection={{this.selectionDirection}}
- spellcheck={{this.spellcheck}}
- tabindex={{this.tabindex}}
- title={{this.title}}
- accept={{this.accept}}
- autocomplete={{this.autocomplete}}
- autosave={{this.autosave}}
- dir={{this.dir}}
- formaction={{this.formaction}}
- formenctype={{this.formenctype}}
- formmethod={{this.formmethod}}
- formnovalidate={{this.formnovalidate}}
- formtarget={{this.formtarget}}
- height={{this.height}}
- inputmode={{this.inputmode}}
- lang={{this.lang}}
- list={{this.list}}
- max={{this.max}}
- min={{this.min}}
- multiple={{this.multiple}}
- name={{this.name}}
- pattern={{this.pattern}}
- size={{this.size}}
- step={{this.step}}
- width={{this.width}}
- indeterminate={{this.indeterminate}}
+ ...attributes
- ...attributes
+ type={{this.type}}
+ checked={{this.checked}}
+ value={{this.value}}
- type={{this.type}}
- checked={{this.checked}}
- value={{this.value}}
-
- {{on "change" this.change}}
- {{on "input" this.input}}
- {{on "keyup" this.keyUp}}
- {{on "paste" this.valueDidChange}}
- {{on "cut" this.valueDidChange}}
-
- {{this.handleDeprecatedEvents this}}
- />
-{{~else~}}
- {{~#let (component '-checkbox') (component '-text-field') as |Checkbox TextField|~}}
- {{~#if this.isCheckbox~}}
- <Checkbox @target={{this.caller}} @__ARGS__={{this.args}} ...attributes />
- {{~else~}}
- <TextField @target={{this.caller}} @__ARGS__={{this.args}} ...attributes />
- {{~/if~}}
- {{~/let~}}
-{{/if}}
+ {{on "change" this.change}}
+ {{on "input" this.input}}
+ {{on "keyup" this.keyUp}}
+ {{on "paste" this.valueDidChange}}
+ {{on "cut" this.valueDidChange}}
+/>
\ No newline at end of file | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/glimmer/lib/templates/link-to.hbs | @@ -1,24 +1,18 @@
-{{~#if this.modernized~}}
- <a
- {{!-- for compatibility --}}
- id={{this.id}}
- class={{this.class}}
+<a
+ {{!-- for compatibility --}}
+ id={{this.id}}
+ class={{this.class}}
- {{!-- deprecated attribute bindings --}}
- role={{this.role}}
- title={{this.title}}
- rel={{this.rel}}
- tabindex={{this.tabindex}}
- target={{this.target}}
+ {{!-- deprecated attribute bindings --}}
+ role={{this.role}}
+ title={{this.title}}
+ rel={{this.rel}}
+ tabindex={{this.tabindex}}
+ target={{this.target}}
- ...attributes
+ ...attributes
- href={{this.href}}
+ href={{this.href}}
- {{on 'click' this.click}}
- >{{yield}}</a>
-{{~else~}}
- {{~#let (component '-link-to') as |LegacyLinkTo|~}}
- <LegacyLinkTo @__ARGS__={{this.args}} ...attributes>{{yield}}</LegacyLinkTo>
- {{~/let~}}
-{{~/if~}}
+ {{on 'click' this.click}}
+>{{yield}}</a>
\ No newline at end of file | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/glimmer/lib/templates/textarea.hbs | @@ -1,49 +1,15 @@
-{{~#if this.modernized ~}}
- <textarea
- {{!-- for compatibility --}}
- id={{this.id}}
- class={{this.class}}
+<textarea
+ {{!-- for compatibility --}}
+ id={{this.id}}
+ class={{this.class}}
- {{!-- deprecated attribute bindings --}}
- role={{this.role}}
- autocapitalize={{this.autocapitalize}}
- autocorrect={{this.autocorrect}}
- autofocus={{this.autofocus}}
- disabled={{this.disabled}}
- form={{this.form}}
- maxlength={{this.maxlength}}
- minlength={{this.minlength}}
- placeholder={{this.placeholder}}
- readonly={{this.readonly}}
- required={{this.required}}
- selectionDirection={{this.selectionDirection}}
- spellcheck={{this.spellcheck}}
- tabindex={{this.tabindex}}
- title={{this.title}}
- rows={{this.rows}}
- cols={{this.cols}}
- name={{this.name}}
- selectionEnd={{this.selectionEnd}}
- selectionStart={{this.selectionStart}}
- autocomplete={{this.autocomplete}}
- wrap={{this.wrap}}
- lang={{this.lang}}
- dir={{this.dir}}
+ ...attributes
- ...attributes
+ value={{this.value}}
- value={{this.value}}
-
- {{on "change" this.change}}
- {{on "input" this.input}}
- {{on "keyup" this.keyUp}}
- {{on "paste" this.valueDidChange}}
- {{on "cut" this.valueDidChange}}
-
- {{this.handleDeprecatedEvents this}}
- />
-{{~else~}}
- {{~#let (component '-textarea') as |Textarea|~}}
- <Textarea @target={{this.caller}} @__ARGS__={{this.args}} ...attributes />
- {{~/let~}}
-{{/if}}
+ {{on "change" this.change}}
+ {{on "input" this.input}}
+ {{on "keyup" this.keyUp}}
+ {{on "paste" this.valueDidChange}}
+ {{on "cut" this.valueDidChange}}
+/>
\ No newline at end of file | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/glimmer/tests/integration/application/debug-render-tree-test.ts | @@ -9,7 +9,6 @@ import { ENV } from '@ember/-internals/environment';
import { Component, setComponentManager } from '@ember/-internals/glimmer';
import { EngineInstanceOptions, Owner } from '@ember/-internals/owner';
import { Route } from '@ember/-internals/routing';
-import { EMBER_MODERNIZED_BUILT_IN_COMPONENTS } from '@ember/canary-features';
import Controller from '@ember/controller';
import { captureRenderTree } from '@ember/debug';
import Engine from '@ember/engine';
@@ -1173,19 +1172,7 @@ if (ENV._DEBUG_RENDER_TREE) {
instance: (instance: object) => inputToString.test(instance.toString()),
template: 'packages/@ember/-internals/glimmer/lib/templates/input.hbs',
bounds: this.nodeBounds(this.element.firstChild),
- children: EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- ? []
- : [
- {
- type: 'component',
- name: '-text-field',
- args: { positional: [], named: { target, type: 'text', value: 'first' } },
- instance: (instance: object) => instance['value'] === 'first',
- template: 'packages/@ember/-internals/glimmer/lib/templates/empty.hbs',
- bounds: this.nodeBounds(this.element.firstChild),
- children: [],
- },
- ],
+ children: [],
},
]);
@@ -1199,19 +1186,7 @@ if (ENV._DEBUG_RENDER_TREE) {
instance: (instance: object) => inputToString.test(instance.toString()),
template: 'packages/@ember/-internals/glimmer/lib/templates/input.hbs',
bounds: this.nodeBounds(this.element.firstChild),
- children: EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- ? []
- : [
- {
- type: 'component',
- name: '-text-field',
- args: { positional: [], named: { target, type: 'text', value: 'first' } },
- instance: (instance: object) => instance['value'] === 'first',
- template: 'packages/@ember/-internals/glimmer/lib/templates/empty.hbs',
- bounds: this.nodeBounds(this.element.firstChild),
- children: [],
- },
- ],
+ children: [],
},
{
type: 'component',
@@ -1220,19 +1195,7 @@ if (ENV._DEBUG_RENDER_TREE) {
instance: (instance: object) => inputToString.test(instance.toString()),
template: 'packages/@ember/-internals/glimmer/lib/templates/input.hbs',
bounds: this.nodeBounds(this.element.lastChild),
- children: EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- ? []
- : [
- {
- type: 'component',
- name: '-checkbox',
- args: { positional: [], named: { target, type: 'checkbox', checked: false } },
- instance: (instance: object) => instance['checked'] === false,
- template: 'packages/@ember/-internals/glimmer/lib/templates/empty.hbs',
- bounds: this.nodeBounds(this.element.lastChild),
- children: [],
- },
- ],
+ children: [],
},
]);
@@ -1246,19 +1209,7 @@ if (ENV._DEBUG_RENDER_TREE) {
instance: (instance: object) => inputToString.test(instance.toString()),
template: 'packages/@ember/-internals/glimmer/lib/templates/input.hbs',
bounds: this.nodeBounds(this.element.firstChild),
- children: EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- ? []
- : [
- {
- type: 'component',
- name: '-text-field',
- args: { positional: [], named: { target, type: 'text', value: 'first' } },
- instance: (instance: object) => instance['value'] === 'first',
- template: 'packages/@ember/-internals/glimmer/lib/templates/empty.hbs',
- bounds: this.nodeBounds(this.element.firstChild),
- children: [],
- },
- ],
+ children: [],
},
]);
}
@@ -1278,27 +1229,15 @@ if (ENV._DEBUG_RENDER_TREE) {
await this.visit('/');
let textareaNode = (value: string, node: Node): ExpectedRenderNode => {
- if (EMBER_MODERNIZED_BUILT_IN_COMPONENTS) {
- return {
- type: 'component',
- name: 'textarea',
- args: { positional: [], named: { value } },
- instance: (instance: object) => instance['value'] === value,
- bounds: this.nodeBounds(node),
- template: 'packages/@ember/-internals/glimmer/lib/templates/textarea.hbs',
- children: [],
- };
- } else {
- return {
- type: 'component',
- name: 'textarea',
- args: { positional: [], named: { value } },
- instance: (instance: object) => instance['value'] === value,
- bounds: this.nodeBounds(node),
- template: 'packages/@ember/-internals/glimmer/lib/templates/empty.hbs',
- children: [],
- };
- }
+ return {
+ type: 'component',
+ name: 'textarea',
+ args: { positional: [], named: { value } },
+ instance: (instance: object) => instance['value'] === value,
+ bounds: this.nodeBounds(node),
+ template: 'packages/@ember/-internals/glimmer/lib/templates/textarea.hbs',
+ children: [],
+ };
};
this.assertRenderTree([textareaNode('first', this.element.firstChild)]);
@@ -1338,9 +1277,7 @@ if (ENV._DEBUG_RENDER_TREE) {
await this.visit('/');
- let template = `packages/@ember/-internals/glimmer/lib/templates/${
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS ? 'link-to' : '-link-to'
- }.hbs`;
+ let template = `packages/@ember/-internals/glimmer/lib/templates/link-to.hbs`;
this.assertRenderTree([
{ | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/glimmer/tests/integration/components/input-angle-test.js | @@ -1,12 +1,5 @@
import { moduleFor, RenderingTestCase, runDestroy, runTask } from 'internal-test-helpers';
-import { EMBER_MODERNIZED_BUILT_IN_COMPONENTS } from '@ember/canary-features';
-import { action } from '@ember/object';
-import { Checkbox, TextArea, TextField } from '@ember/-internals/glimmer';
import { set } from '@ember/-internals/metal';
-import { TargetActionSupport } from '@ember/-internals/runtime';
-import { getElementView, TextSupport } from '@ember/-internals/views';
-
-import { Component } from '../../utils/helpers';
class InputRenderingTest extends RenderingTestCase {
$input() {
@@ -77,114 +70,6 @@ class InputRenderingTest extends RenderingTestCase {
element.dispatchEvent(event);
});
}
-
- assertTriggersNativeDOMEvents(type) {
- // Defaults from EventDispatcher
- let events = {
- touchstart: 'touchStart',
- touchmove: 'touchMove',
- touchend: 'touchEnd',
- touchcancel: 'touchCancel',
- keydown: 'keyDown',
- keyup: 'keyUp',
- keypress: 'keyPress',
- mousedown: 'mouseDown',
- mouseup: 'mouseUp',
- contextmenu: 'contextMenu',
- click: 'click',
- dblclick: 'doubleClick',
- focusin: 'focusIn',
- focusout: 'focusOut',
- submit: 'submit',
- input: 'input',
- change: 'change',
- dragstart: 'dragStart',
- drag: 'drag',
- dragenter: 'dragEnter',
- dragleave: 'dragLeave',
- dragover: 'dragOver',
- drop: 'drop',
- dragend: 'dragEnd',
- };
-
- this.registerComponent('test-component', {
- ComponentClass: Component.extend({
- tagName: 'input',
- attributeBindings: ['type'],
- }),
- });
-
- let triggered = {
- standard: [],
- custom: [],
- };
-
- let actions = {
- didTrigger(id, event) {
- triggered[id].push(event);
- },
- };
-
- function argsFor(id) {
- let args = [`id="${id}"`];
-
- if (type) {
- args.push(`@type="${type}"`);
- }
-
- Object.keys(events).forEach((event) => {
- args.push(`@${events[event]}={{action "didTrigger" "${id}" "${event}"}}`);
- });
-
- return args.join(' ');
- }
-
- let template = `
- <Input ${argsFor('standard')} />
- <TestComponent ${argsFor('custom')} />
- `;
-
- expectDeprecation(
- () => {
- this.render(template, { actions });
- },
- /Passing the `@(touchStart|touchMove|touchEnd|touchCancel|keyDown|keyUp|keyPress|mouseDown|mouseUp|contextMenu|click|doubleClick|focusIn|focusOut|submit|input|change|dragStart|drag|dragEnter|dragLeave|dragOver|drop|dragEnd|mouseEnter|mouseLeave|mouseMove|focus-in|focus-out|key-press|key-up|key-down)` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- this.assert.ok(this.$('input').length === 2);
-
- let $standard = this.$('#standard');
- let $custom = this.$('#custom');
-
- this.assert.equal($standard.type, $custom.type);
-
- Object.keys(events).forEach((event) => {
- // triggerEvent does not seem to work with focusin and focusout events
- if (event !== 'focusin' && event !== 'focusout') {
- this.triggerEvent(event, null, '#standard');
- this.triggerEvent(event, null, '#custom');
- }
- });
-
- // test focusin and focusout by actually moving focus
- $standard[0].focus();
- $standard[0].blur();
- $custom[0].focus();
- $custom[0].blur();
-
- this.assert.ok(
- triggered.standard.length > 10,
- 'sanity check that most events are triggered (standard)'
- );
-
- this.assert.ok(
- triggered.custom.length > 10,
- 'sanity check that most events are triggered (custom)'
- );
-
- this.assert.deepEqual(triggered.standard, triggered.custom, 'called for all events');
- }
}
moduleFor(
@@ -320,120 +205,6 @@ moduleFor(
// this.assertAttr('tabindex', '30'); //NOTE: failing in IE (TEST_SUITE=sauce)
}
- ['@test [DEPRECATED] dynamic attributes (named argument)']() {
- expectDeprecation(
- () => {
- this.render(
- `<Input @type="text" @value={{this.value}}
- @elementId="test-input"
- @ariaRole={{this.role}}
- @disabled={{this.disabled}}
- @placeholder={{this.placeholder}}
- @name={{this.name}}
- @maxlength={{this.maxlength}}
- @minlength={{this.minlength}}
- @size={{this.size}}
- @tabindex={{this.tabindex}}/>`,
- {
- value: 'Original value',
- role: 'textbox',
- disabled: false,
- placeholder: 'Original placeholder',
- name: 'original-name',
- maxlength: 10,
- minlength: 5,
- size: 20,
- tabindex: 30,
- }
- );
- },
- /Passing the `@(elementId|ariaRole|disabled|placeholder|name|maxlength|minlength|size|tabindex)` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- this.assertNotDisabled();
- this.assertValue('Original value');
- this.assertAttr('id', 'test-input');
- this.assertAttr('role', 'textbox');
- this.assertAttr('placeholder', 'Original placeholder');
- this.assertAttr('name', 'original-name');
- this.assertAttr('maxlength', '10');
- this.assertAttr('minlength', '5');
- // this.assertAttr('size', '20'); //NOTE: failing in IE (TEST_SUITE=sauce)
- // this.assertAttr('tabindex', '30'); //NOTE: failing in IE (TEST_SUITE=sauce)
-
- runTask(() => this.rerender());
-
- this.assertNotDisabled();
- this.assertValue('Original value');
- this.assertAttr('id', 'test-input');
- this.assertAttr('role', 'textbox');
- this.assertAttr('placeholder', 'Original placeholder');
- this.assertAttr('name', 'original-name');
- this.assertAttr('maxlength', '10');
- this.assertAttr('minlength', '5');
- // this.assertAttr('size', '20'); //NOTE: failing in IE (TEST_SUITE=sauce)
- // this.assertAttr('tabindex', '30'); //NOTE: failing in IE (TEST_SUITE=sauce)
-
- expectDeprecation(
- () => {
- runTask(() => {
- set(this.context, 'value', 'Updated value');
- set(this.context, 'role', 'search');
- set(this.context, 'disabled', true);
- set(this.context, 'placeholder', 'Updated placeholder');
- set(this.context, 'name', 'updated-name');
- set(this.context, 'maxlength', 11);
- set(this.context, 'minlength', 6);
- // set(this.context, 'size', 21); //NOTE: failing in IE (TEST_SUITE=sauce)
- // set(this.context, 'tabindex', 31); //NOTE: failing in IE (TEST_SUITE=sauce)
- });
- },
- /Passing the `@(elementId|ariaRole|disabled|placeholder|name|maxlength|minlength|size|tabindex)` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- this.assertDisabled();
- this.assertValue('Updated value');
- this.assertAttr('id', 'test-input');
- this.assertAttr('role', 'search');
- this.assertAttr('placeholder', 'Updated placeholder');
- this.assertAttr('name', 'updated-name');
- this.assertAttr('maxlength', '11');
- this.assertAttr('minlength', '6');
- // this.assertAttr('size', '21'); //NOTE: failing in IE (TEST_SUITE=sauce)
- // this.assertAttr('tabindex', '31'); //NOTE: failing in IE (TEST_SUITE=sauce)
-
- expectDeprecation(
- () => {
- runTask(() => {
- set(this.context, 'value', 'Original value');
- set(this.context, 'role', 'textbox');
- set(this.context, 'disabled', false);
- set(this.context, 'placeholder', 'Original placeholder');
- set(this.context, 'name', 'original-name');
- set(this.context, 'maxlength', 10);
- set(this.context, 'minlength', 5);
- // set(this.context, 'size', 20); //NOTE: failing in IE (TEST_SUITE=sauce)
- // set(this.context, 'tabindex', 30); //NOTE: failing in IE (TEST_SUITE=sauce)
- });
- },
- /Passing the `@(elementId|ariaRole|disabled|placeholder|name|maxlength|minlength|size|tabindex)` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- this.assertNotDisabled();
- this.assertValue('Original value');
- this.assertAttr('id', 'test-input');
- this.assertAttr('role', 'textbox');
- this.assertAttr('placeholder', 'Original placeholder');
- this.assertAttr('name', 'original-name');
- this.assertAttr('maxlength', '10');
- this.assertAttr('minlength', '5');
- // this.assertAttr('size', '20'); //NOTE: failing in IE (TEST_SUITE=sauce)
- // this.assertAttr('tabindex', '30'); //NOTE: failing in IE (TEST_SUITE=sauce)
- }
-
['@test static attributes (HTML attribute)']() {
this.render(`
<Input @type="text" @value="Original value"
@@ -473,51 +244,6 @@ moduleFor(
// this.assertAttr('tabindex', '30'); //NOTE: failing in IE (TEST_SUITE=sauce)
}
- ['@test [DEPRECATED] static attributes (named argument)']() {
- expectDeprecation(
- () => {
- this.render(
- `<Input @type="text" @value="Original value"
- @elementId="test-input"
- @ariaRole="search"
- @disabled={{true}}
- @placeholder="Original placeholder"
- @name="original-name"
- @maxlength={{10}}
- @minlength={{5}}
- @size={{20}}
- @tabindex={{30}}/>`
- );
- },
- /Passing the `@(elementId|ariaRole|disabled|placeholder|name|maxlength|minlength|size|tabindex)` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- this.assertDisabled();
- this.assertValue('Original value');
- this.assertAttr('id', 'test-input');
- this.assertAttr('role', 'search');
- this.assertAttr('placeholder', 'Original placeholder');
- this.assertAttr('name', 'original-name');
- this.assertAttr('maxlength', '10');
- this.assertAttr('minlength', '5');
- // this.assertAttr('size', '20'); //NOTE: failing in IE (TEST_SUITE=sauce)
- // this.assertAttr('tabindex', '30'); //NOTE: failing in IE (TEST_SUITE=sauce)
-
- runTask(() => this.rerender());
-
- this.assertDisabled();
- this.assertValue('Original value');
- this.assertAttr('id', 'test-input');
- this.assertAttr('role', 'search');
- this.assertAttr('placeholder', 'Original placeholder');
- this.assertAttr('name', 'original-name');
- this.assertAttr('maxlength', '10');
- this.assertAttr('minlength', '5');
- // this.assertAttr('size', '20'); //NOTE: failing in IE (TEST_SUITE=sauce)
- // this.assertAttr('tabindex', '30'); //NOTE: failing in IE (TEST_SUITE=sauce)
- }
-
['@test cursor selection range']() {
// Modifying input.selectionStart, which is utilized in the cursor tests,
// causes an event in Safari.
@@ -573,81 +299,6 @@ moduleFor(
});
}
- ['@test sends an action with `<Input @key-press={{action "foo"}} />` is pressed'](assert) {
- let triggered = 0;
-
- expectDeprecation(
- () => {
- this.render(`<Input @value={{this.value}} @key-press={{action 'foo'}} />`, {
- value: 'initial',
-
- actions: {
- foo(value, event) {
- triggered++;
- assert.ok(true, 'action was triggered');
- assert.ok(event instanceof Event, 'Native event was passed');
- },
- },
- });
- },
- /Passing the `@key-press` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- this.triggerEvent('keypress', { key: 'A' });
-
- assert.equal(triggered, 1, 'The action was triggered exactly once');
- }
-
- ['@test sends an action to the parent level when `bubbles=true` is provided'](assert) {
- let bubbled = 0;
-
- let ParentComponent = Component.extend({
- change() {
- bubbled++;
- },
- });
-
- this.registerComponent('parent', {
- ComponentClass: ParentComponent,
- template: `<Input @bubbles={{true}} />`,
- });
-
- expectDeprecation(
- () => this.render(`<Parent />`),
- 'Passing the `@bubbles` argument to <Input> is deprecated.',
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- this.triggerEvent('change');
-
- assert.strictEqual(bubbled, 1, 'bubbled upwards');
- }
-
- ['@test [DEPRECATED] triggers `focus-in` when focused'](assert) {
- let wasFocused = false;
-
- expectDeprecation(
- () => {
- this.render(`<Input @focus-in={{action 'foo'}} />`, {
- actions: {
- foo() {
- wasFocused = true;
- },
- },
- });
- },
- /Passing the `@focus-in` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- runTask(() => {
- this.$input().focus();
- });
-
- assert.ok(wasFocused, 'action was triggered');
- }
-
['@test sends `insert-newline` when <enter> is pressed'](assert) {
assert.expect(2);
@@ -682,84 +333,12 @@ moduleFor(
this.triggerEvent('keyup', { key: 'Escape' });
}
- ['@test [DEPRECATED] sends an action with `<Input @key-down={{action "foo"}} />` when a key is pressed'](
- assert
- ) {
- let triggered = 0;
-
- expectDeprecation(
- () => {
- this.render(`<Input @key-down={{action 'foo'}} />`, {
- actions: {
- foo(value, event) {
- triggered++;
- assert.ok(true, 'action was triggered');
- assert.ok(event instanceof Event, 'Native event was passed');
- },
- },
- });
- },
- /Passing the `@key-down` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- this.triggerEvent('keydown', { key: 'A' });
-
- assert.equal(triggered, 1, 'The action was triggered exactly once');
- }
-
- ['@test [DEPRECATED] sends an action with `<Input @key-up={{action "foo"}} />` when a key is pressed'](
- assert
- ) {
- let triggered = 0;
-
- expectDeprecation(
- () => {
- this.render(`<Input @key-up={{action 'foo'}} />`, {
- actions: {
- foo(value, event) {
- triggered++;
- assert.ok(true, 'action was triggered');
- assert.ok(event instanceof Event, 'Native event was passed');
- },
- },
- });
- },
- /Passing the `@key-up` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- this.triggerEvent('keyup', { key: 'A' });
-
- assert.equal(triggered, 1, 'The action was triggered exactly once');
- }
-
['@test GH#14727 can render a file input after having had render an input of other type']() {
this.render(`<Input @type="text" /><Input @type="file" />`);
this.assert.equal(this.$input()[0].type, 'text');
this.assert.equal(this.$input()[1].type, 'file');
}
-
- ['@test sends an action with `<Input EVENT={{action "foo"}} />` for native DOM events']() {
- this.assertTriggersNativeDOMEvents();
- }
-
- ['@test [DEPRECATED] triggers a method with `<Input @key-up={{this.didTrigger}} />`'](assert) {
- expectDeprecation(
- () => {
- this.render(`<Input @key-up={{this.didTrigger}} />`, {
- didTrigger: action(function () {
- assert.ok(true, 'action was triggered');
- }),
- });
- },
- /Passing the `@key-up` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- this.triggerEvent('keyup', { key: 'A' });
- }
}
);
@@ -888,91 +467,7 @@ moduleFor(
this.assertAttr('tabindex', '10');
}
- ['@test [DEPRECATED] dynamic attributes (named argument)']() {
- expectDeprecation(
- () => {
- this.render(
- `<Input @type='checkbox' @checked={{this.checked}}
- @ariaRole={{this.role}}
- @disabled={{this.disabled}}
- @name={{this.name}}
- @tabindex={{this.tabindex}}
- />`,
- {
- role: 'checkbox',
- disabled: false,
- name: 'original-name',
- checked: false,
- tabindex: 10,
- }
- );
- },
- /Passing the `@(elementId|ariaRole|disabled|name|tabindex)` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- this.assertSingleCheckbox();
- this.assertNotDisabled();
- this.assertAttr('role', 'checkbox');
- this.assertAttr('name', 'original-name');
- this.assertAttr('tabindex', '10');
-
- runTask(() => this.rerender());
-
- this.assertSingleCheckbox();
- this.assertNotDisabled();
- this.assertAttr('role', 'checkbox');
- this.assertAttr('name', 'original-name');
- this.assertAttr('tabindex', '10');
-
- expectDeprecation(
- () => {
- runTask(() => {
- set(this.context, 'role', 'radio');
- set(this.context, 'disabled', true);
- set(this.context, 'name', 'updated-name');
- set(this.context, 'tabindex', 11);
- });
- },
- /Passing the `@(elementId|ariaRole|disabled|name|tabindex)` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- this.assertSingleCheckbox();
- this.assertDisabled();
- this.assertAttr('role', 'radio');
- this.assertAttr('name', 'updated-name');
- this.assertAttr('tabindex', '11');
-
- expectDeprecation(
- () => {
- runTask(() => {
- set(this.context, 'role', 'checkbox');
- set(this.context, 'disabled', false);
- set(this.context, 'name', 'original-name');
- set(this.context, 'tabindex', 10);
- });
- },
- /Passing the `@(elementId|ariaRole|disabled|name|tabindex)` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- this.assertSingleCheckbox();
- this.assertNotDisabled();
- this.assertAttr('role', 'checkbox');
- this.assertAttr('name', 'original-name');
- this.assertAttr('tabindex', '10');
- }
-
- ['@feature(!EMBER_MODERNIZED_BUILT_IN_COMPONENTS) `value` property assertion']() {
- expectAssertion(() => {
- this.render(`<Input @type="checkbox" @value={{this.value}} />`, {
- value: 'value',
- });
- }, /checkbox.+@value.+not supported.+use.+@checked.+instead/);
- }
-
- ['@feature(EMBER_MODERNIZED_BUILT_IN_COMPONENTS) `value` property warning']() {
+ ['`value` property warning']() {
let message =
'`<Input @type="checkbox" />` reflects its checked state via the `@checked` argument. ' +
'You wrote `<Input @type="checkbox" @value={{...}} />` which is likely not what you intended. ' +
@@ -1046,38 +541,6 @@ moduleFor(
this.assertAttr('tabindex', '10');
this.assertAttr('name', 'original-name');
}
-
- ['@test [DEPRECATED] with static values (named argument)']() {
- expectDeprecation(
- () => {
- this.render(
- `<Input @type="checkbox" @checked={{false}} @ariaRole="radio" @disabled={{false}} @tabindex={{10}} @name="original-name" />`
- );
- },
- /Passing the `@(elementId|ariaRole|disabled|tabindex|name)` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- this.assertSingleCheckbox();
- this.assertCheckboxIsNotChecked();
- this.assertNotDisabled();
- this.assertAttr('role', 'radio');
- this.assertAttr('tabindex', '10');
- this.assertAttr('name', 'original-name');
-
- runTask(() => this.rerender());
-
- this.assertSingleCheckbox();
- this.assertCheckboxIsNotChecked();
- this.assertNotDisabled();
- this.assertAttr('role', 'radio');
- this.assertAttr('tabindex', '10');
- this.assertAttr('name', 'original-name');
- }
-
- ['@test sends an action with `<Input EVENT={{action "foo"}} />` for native DOM events']() {
- this.assertTriggersNativeDOMEvents('checkbox');
- }
}
);
@@ -1158,97 +621,6 @@ moduleFor(
// this.assertAttr('size', undefined); //NOTE: re-enable once `size` bug above has been addressed
this.assertAttr('tabindex', undefined);
}
-
- ['@test [DEPRECATED] null values (named argument)']() {
- let attributes = ['role', 'disabled', 'placeholder', 'name', 'maxlength', 'size', 'tabindex'];
-
- expectDeprecation(
- () => {
- this.render(
- `<Input @type="text" @value={{this.value}}
- @ariaRole={{this.role}}
- @disabled={{this.disabled}}
- @placeholder={{this.placeholder}}
- @name={{this.name}}
- @maxlength={{this.maxlength}}
- @size={{this.size}}
- @tabindex={{this.tabindex}}/>`,
- {
- value: null,
- role: null,
- disabled: null,
- placeholder: null,
- name: null,
- maxlength: null,
- size: null,
- tabindex: null,
- }
- );
- },
- /Passing the `@(elementId|ariaRole|disabled|placeholder|name|maxlength|size|tabindex)` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- this.assertValue('');
- this.assertAllAttrs(attributes, undefined);
-
- runTask(() => this.rerender());
-
- this.assertValue('');
- this.assertAllAttrs(attributes, undefined);
-
- expectDeprecation(
- () => {
- runTask(() => {
- set(this.context, 'role', 'search');
- set(this.context, 'disabled', true);
- set(this.context, 'value', 'Updated value');
- set(this.context, 'placeholder', 'Updated placeholder');
- set(this.context, 'name', 'updated-name');
- set(this.context, 'maxlength', 11);
- set(this.context, 'size', 21);
- set(this.context, 'tabindex', 31);
- });
- },
- /Passing the `@(elementId|ariaRole|disabled|placeholder|name|maxlength|size|tabindex)` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- this.assertDisabled();
- this.assertValue('Updated value');
- this.assertAttr('role', 'search');
- this.assertAttr('placeholder', 'Updated placeholder');
- this.assertAttr('name', 'updated-name');
- this.assertAttr('maxlength', '11');
- this.assertAttr('size', '21');
- this.assertAttr('tabindex', '31');
-
- expectDeprecation(
- () => {
- runTask(() => {
- set(this.context, 'role', null);
- set(this.context, 'disabled', null);
- set(this.context, 'value', null);
- set(this.context, 'placeholder', null);
- set(this.context, 'name', null);
- set(this.context, 'maxlength', null);
- // set(this.context, 'size', null); //NOTE: this fails with `Error: Failed to set the 'size' property on 'HTMLInputElement': The value provided is 0, which is an invalid size.` (TEST_SUITE=sauce)
- set(this.context, 'tabindex', null);
- });
- },
- /Passing the `@(elementId|ariaRole|disabled|placeholder|name|maxlength|size|tabindex)` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- this.assertAttr('disabled', undefined);
- this.assertValue('');
- this.assertAttr('role', undefined);
- // this.assertAttr('placeholder', undefined); //NOTE: this fails with a value of "null" (TEST_SUITE=sauce)
- // this.assertAttr('name', undefined); //NOTE: this fails with a value of "null" (TEST_SUITE=sauce)
- this.assertAttr('maxlength', undefined);
- // this.assertAttr('size', undefined); //NOTE: re-enable once `size` bug above has been addressed
- this.assertAttr('tabindex', undefined);
- }
}
);
@@ -1298,160 +670,3 @@ function InputAttributesTest(attrs) {
].forEach((attrs) => {
moduleFor(`[GH#15675] Components test: <Input ${attrs} />`, InputAttributesTest(attrs));
});
-
-[
- // Named argument
- '@type="range" @min="-5" @max="50" @value="%x"',
- '@type="range" @value="%x" @min="-5" @max="50"',
- '@min="-5" @max="50" @type="range" @value="%x"',
- '@min="-5" @max="50" @value="%x" @type="range"',
- '@value="%x" @min="-5" @max="50" @type="range"',
- '@value="%x" @type="range" @min="-5" @max="50"',
-].forEach((attrs) => {
- moduleFor(
- `[GH#15675] Components test: <Input ${attrs} />`,
- class extends InputAttributesTest(attrs) {
- renderInput(value = 25) {
- expectDeprecation(
- () => super.renderInput(value),
- /Passing the `@(min|max)` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
- }
- }
- );
-});
-
-if (EMBER_MODERNIZED_BUILT_IN_COMPONENTS) {
- [
- ['Ember.Component', Component, true, true],
- ['Ember.Checkbox', Checkbox, true, false],
- ['Ember.TextArea', TextArea, false, true],
- ['Ember.TextField', TextField, true, false],
- ['Ember.TextSupport', TextSupport, true, true],
- ['Ember.TargetActionSupport', TargetActionSupport, true, true],
- ].forEach(([label, ClassOrMixin, shouldDeoptInput, shouldDeoptTextArea]) => {
- let message =
- ClassOrMixin === Component
- ? /Reopening the Ember\.Component super class itself is deprecated\./
- : new RegExp(`Reopening ${label.replace(/\./g, '\\.')} is deprecated\\.`);
-
- class DeoptTest extends RenderingTestCase {
- constructor() {
- super(...arguments);
- this.assertDidNotReopen();
- }
-
- teardown() {
- super.teardown();
- ClassOrMixin._wasReopened = false;
- }
-
- assertDidReopen() {
- this.assert.strictEqual(ClassOrMixin._wasReopened, true, `${label} was marked as reopened`);
- }
-
- assertDidNotReopen() {
- this.assert.strictEqual(
- ClassOrMixin._wasReopened,
- false,
- `${label} was not marked as reopened`
- );
- }
-
- assertDeopt(
- _shouldDeoptInput = shouldDeoptInput,
- _shouldDeoptTextArea = shouldDeoptTextArea
- ) {
- this.render(`
- <Input id="test-textbox" @value="hello" />
- <Input id="test-checkbox" @type="checkbox" @checked={{true}} />
- <Textarea id="test-textarea" @value="hello world" />
- `);
-
- let textbox = this.$('#test-textbox')[0];
- let checkbox = this.$('#test-checkbox')[0];
- let textarea = this.$('#test-textarea')[0];
-
- this.assert.ok(textbox, 'a textbox was rendered');
- this.assert.ok(checkbox, 'a checkbox was rendered');
- this.assert.ok(textarea, 'a textarea was rendered');
-
- this.assert.strictEqual(
- this.isDeopted(textbox),
- _shouldDeoptInput,
- `<Input @type="text" /> ${_shouldDeoptInput ? 'was' : 'was not'} deopted`
- );
-
- this.assert.strictEqual(
- this.isDeopted(checkbox),
- _shouldDeoptInput,
- `<Input @type="checkbox" /> ${_shouldDeoptInput ? 'was' : 'was not'} deopted`
- );
-
- this.assert.strictEqual(
- this.isDeopted(textarea),
- _shouldDeoptTextArea,
- `<Textarea /> ${_shouldDeoptTextArea ? 'was' : 'was not'} deopted`
- );
- }
-
- isDeopted(element) {
- return getElementView(element) !== null;
- }
-
- [`@test ${label}.reopen()`]() {
- expectDeprecation(
- () =>
- ClassOrMixin.reopen({
- /* noop */
- }),
- message
- );
-
- this.assertDidReopen();
- this.assertDeopt();
- }
- }
-
- if (typeof ClassOrMixin.extend === 'function') {
- DeoptTest.prototype[`@test ${label}.extend().reopen()`] = function () {
- ClassOrMixin.extend().reopen({
- /* noop */
- });
-
- this.assertDidNotReopen();
- this.assertDeopt(false, false);
- };
- }
-
- if (typeof ClassOrMixin.reopenClass === 'function') {
- DeoptTest.prototype[`@test ${label}.reopenClass()`] = function () {
- expectDeprecation(
- () =>
- ClassOrMixin.reopenClass({
- /* noop */
- }),
- message
- );
-
- this.assertDidReopen();
- this.assertDeopt();
- };
-
- DeoptTest.prototype[`@test ${label}.extend().reopenClass()`] = function () {
- ClassOrMixin.extend().reopenClass({
- /* noop */
- });
-
- this.assertDidNotReopen();
- this.assertDeopt(false, false);
- };
- }
-
- moduleFor(
- `Components test: [DEPRECATED] <Input /> and <Textarea /> deopt (${label})`,
- DeoptTest
- );
- });
-} | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/glimmer/tests/integration/components/input-curly-test.js | @@ -1,11 +1,7 @@
import { RenderingTestCase, moduleFor, runDestroy, runTask } from 'internal-test-helpers';
-import { EMBER_MODERNIZED_BUILT_IN_COMPONENTS } from '@ember/canary-features';
-import { action } from '@ember/object';
import { set } from '@ember/-internals/metal';
-import { Component } from '../../utils/helpers';
-
class InputRenderingTest extends RenderingTestCase {
$input() {
return this.$('input');
@@ -75,74 +71,6 @@ class InputRenderingTest extends RenderingTestCase {
element.dispatchEvent(event);
});
}
-
- assertTriggersNativeDOMEvents(type) {
- // Defaults from EventDispatcher
- let events = {
- touchstart: 'touchStart',
- touchmove: 'touchMove',
- touchend: 'touchEnd',
- touchcancel: 'touchCancel',
- keydown: 'keyDown',
- keyup: 'keyUp',
- keypress: 'keyPress',
- mousedown: 'mouseDown',
- mouseup: 'mouseUp',
- contextmenu: 'contextMenu',
- click: 'click',
- dblclick: 'doubleClick',
- focusin: 'focusIn',
- focusout: 'focusOut',
- submit: 'submit',
- input: 'input',
- change: 'change',
- dragstart: 'dragStart',
- drag: 'drag',
- dragenter: 'dragEnter',
- dragleave: 'dragLeave',
- dragover: 'dragOver',
- drop: 'drop',
- dragend: 'dragEnd',
- };
-
- let TestComponent = Component.extend({ tagName: 'input' });
- this.registerComponent('test-component', { ComponentClass: TestComponent });
-
- let triggeredEvents = [];
- let actions = {};
- Object.keys(events).forEach((evt) => {
- actions[`run_${evt}`] = function () {
- triggeredEvents.push(evt);
- };
- });
-
- let typeAttr = type ? `type="${type}" ` : '';
- let actionAttrs = Object.keys(events)
- .map((evt) => `${events[evt]}=(action 'run_${evt}')`)
- .join(' ');
- let template = `{{test-component ${typeAttr}${actionAttrs}}}{{input ${typeAttr}${actionAttrs}}}`;
-
- expectDeprecation(
- () => {
- this.render(template, { actions });
- },
- /Passing the `@(touchStart|touchMove|touchEnd|touchCancel|keyDown|keyUp|keyPress|mouseDown|mouseUp|contextMenu|click|doubleClick|focusIn|focusOut|submit|input|change|dragStart|drag|dragEnter|dragLeave|dragOver|drop|dragEnd|mouseEnter|mouseLeave|mouseMove|focus-in|focus-out|key-press|key-up|key-down)` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- Object.keys(events).forEach((evt) => this.triggerEvent(evt, null, 'input:first-of-type'));
- let normallyTriggeredEvents = [].concat(triggeredEvents);
- triggeredEvents.length = 0;
-
- this.assert.ok(
- normallyTriggeredEvents.length > 10,
- 'sanity check that most events are triggered'
- );
-
- normallyTriggeredEvents.forEach((evt) => this.triggerEvent(evt, null, 'input:last-of-type'));
-
- this.assert.deepEqual(triggeredEvents, normallyTriggeredEvents, 'called for all events');
- }
}
moduleFor(
@@ -185,169 +113,6 @@ moduleFor(
this.assertAttr('type', 'text');
}
- ['@test [DEPRECATED] dynamic attributes']() {
- expectDeprecation(
- () => {
- this.render(
- `
- {{input type="text"
- elementId="test-input"
- ariaRole=this.role
- disabled=this.disabled
- value=this.value
- placeholder=this.placeholder
- name=this.name
- maxlength=this.maxlength
- minlength=this.minlength
- size=this.size
- tabindex=this.tabindex
- }}`,
- {
- role: 'textbox',
- disabled: false,
- value: 'Original value',
- placeholder: 'Original placeholder',
- name: 'original-name',
- maxlength: 10,
- minlength: 5,
- size: 20,
- tabindex: 30,
- }
- );
- },
- /Passing the `@(elementId|ariaRole|disabled|placeholder|name|maxlength|minlength|size|tabindex)` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- this.assertNotDisabled();
- this.assertValue('Original value');
- this.assertAttr('id', 'test-input');
- this.assertAttr('role', 'textbox');
- this.assertAttr('placeholder', 'Original placeholder');
- this.assertAttr('name', 'original-name');
- this.assertAttr('maxlength', '10');
- this.assertAttr('minlength', '5');
- // this.assertAttr('size', '20'); //NOTE: failing in IE (TEST_SUITE=sauce)
- // this.assertAttr('tabindex', '30'); //NOTE: failing in IE (TEST_SUITE=sauce)
-
- runTask(() => this.rerender());
-
- this.assertNotDisabled();
- this.assertValue('Original value');
- this.assertAttr('id', 'test-input');
- this.assertAttr('role', 'textbox');
- this.assertAttr('placeholder', 'Original placeholder');
- this.assertAttr('name', 'original-name');
- this.assertAttr('maxlength', '10');
- this.assertAttr('minlength', '5');
- // this.assertAttr('size', '20'); //NOTE: failing in IE (TEST_SUITE=sauce)
- // this.assertAttr('tabindex', '30'); //NOTE: failing in IE (TEST_SUITE=sauce)
-
- expectDeprecation(
- () => {
- runTask(() => {
- set(this.context, 'role', 'search');
- set(this.context, 'value', 'Updated value');
- set(this.context, 'disabled', true);
- set(this.context, 'placeholder', 'Updated placeholder');
- set(this.context, 'name', 'updated-name');
- set(this.context, 'maxlength', 11);
- set(this.context, 'minlength', 6);
- // set(this.context, 'size', 21); //NOTE: failing in IE (TEST_SUITE=sauce)
- // set(this.context, 'tabindex', 31); //NOTE: failing in IE (TEST_SUITE=sauce)
- });
- },
- /Passing the `@(elementId|ariaRole|disabled|placeholder|name|maxlength|minlength|size|tabindex)` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- this.assertDisabled();
- this.assertValue('Updated value');
- this.assertAttr('id', 'test-input');
- this.assertAttr('role', 'search');
- this.assertAttr('placeholder', 'Updated placeholder');
- this.assertAttr('name', 'updated-name');
- this.assertAttr('maxlength', '11');
- this.assertAttr('minlength', '6');
- // this.assertAttr('size', '21'); //NOTE: failing in IE (TEST_SUITE=sauce)
- // this.assertAttr('tabindex', '31'); //NOTE: failing in IE (TEST_SUITE=sauce)
-
- expectDeprecation(
- () => {
- runTask(() => {
- set(this.context, 'role', 'textbox');
- set(this.context, 'value', 'Original value');
- set(this.context, 'disabled', false);
- set(this.context, 'placeholder', 'Original placeholder');
- set(this.context, 'name', 'original-name');
- set(this.context, 'maxlength', 10);
- set(this.context, 'minlength', 5);
- // set(this.context, 'size', 20); //NOTE: failing in IE (TEST_SUITE=sauce)
- // set(this.context, 'tabindex', 30); //NOTE: failing in IE (TEST_SUITE=sauce)
- });
- },
- /Passing the `@(elementId|ariaRole|disabled|placeholder|name|maxlength|minlength|size|tabindex)` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- this.assertNotDisabled();
- this.assertValue('Original value');
- this.assertAttr('id', 'test-input');
- this.assertAttr('role', 'textbox');
- this.assertAttr('placeholder', 'Original placeholder');
- this.assertAttr('name', 'original-name');
- this.assertAttr('maxlength', '10');
- this.assertAttr('minlength', '5');
- // this.assertAttr('size', '20'); //NOTE: failing in IE (TEST_SUITE=sauce)
- // this.assertAttr('tabindex', '30'); //NOTE: failing in IE (TEST_SUITE=sauce)
- }
-
- ['@test [DEPRECATED] static attributes']() {
- expectDeprecation(
- () => {
- this.render(`
- {{input type="text"
- elementId="test-input"
- ariaRole="search"
- disabled=true
- value="Original value"
- placeholder="Original placeholder"
- name="original-name"
- maxlength=10
- minlength=5
- size=20
- tabindex=30
- }}`);
- },
- /Passing the `@(elementId|ariaRole|disabled|placeholder|name|maxlength|minlength|size|tabindex)` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- this.assertDisabled();
- this.assertValue('Original value');
- this.assertAttr('id', 'test-input');
- this.assertAttr('role', 'search');
- this.assertAttr('placeholder', 'Original placeholder');
- this.assertAttr('name', 'original-name');
- this.assertAttr('maxlength', '10');
- this.assertAttr('minlength', '5');
- // this.assertAttr('size', '20'); //NOTE: failing in IE (TEST_SUITE=sauce)
- // this.assertAttr('tabindex', '30'); //NOTE: failing in IE (TEST_SUITE=sauce)
-
- runTask(() => this.rerender());
-
- this.assertDisabled();
- this.assertValue('Original value');
- this.assertAttr('id', 'test-input');
- this.assertAttr('role', 'search');
- this.assertAttr('placeholder', 'Original placeholder');
- this.assertAttr('name', 'original-name');
- this.assertAttr('maxlength', '10');
- this.assertAttr('minlength', '5');
- // this.assertAttr('size', '20'); //NOTE: failing in IE (TEST_SUITE=sauce)
- // this.assertAttr('tabindex', '30'); //NOTE: failing in IE (TEST_SUITE=sauce)
- }
-
['@test cursor selection range']() {
// Modifying input.selectionStart, which is utilized in the cursor tests,
// causes an event in Safari.
@@ -403,81 +168,6 @@ moduleFor(
});
}
- ['@test sends an action with `{{input key-press=(action "foo")}}` is pressed'](assert) {
- let triggered = 0;
-
- expectDeprecation(
- () => {
- this.render(`{{input value=this.value key-press=(action 'foo')}}`, {
- value: 'initial',
-
- actions: {
- foo(value, event) {
- triggered++;
- assert.ok(true, 'action was triggered');
- assert.ok(event instanceof Event, 'Native event was passed');
- },
- },
- });
- },
- /Passing the `@key-press` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- this.triggerEvent('keypress', { key: 'A' });
-
- assert.equal(triggered, 1, 'The action was triggered exactly once');
- }
-
- ['@test sends an action to the parent level when `bubbles=true` is provided'](assert) {
- let bubbled = 0;
-
- let ParentComponent = Component.extend({
- change() {
- bubbled++;
- },
- });
-
- this.registerComponent('x-parent', {
- ComponentClass: ParentComponent,
- template: `{{input bubbles=true}}`,
- });
-
- expectDeprecation(
- () => this.render(`{{x-parent}}`),
- 'Passing the `@bubbles` argument to <Input> is deprecated.',
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- this.triggerEvent('change');
-
- assert.strictEqual(bubbled, 1, 'bubbled upwards');
- }
-
- ['@test triggers `focus-in` when focused'](assert) {
- let wasFocused = false;
-
- expectDeprecation(
- () => {
- this.render(`{{input focus-in=(action 'foo')}}`, {
- actions: {
- foo() {
- wasFocused = true;
- },
- },
- });
- },
- /Passing the `@focus-in` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- runTask(() => {
- this.$input().focus();
- });
-
- assert.ok(wasFocused, 'action was triggered');
- }
-
['@test sends `insert-newline` when <enter> is pressed'](assert) {
assert.expect(2);
@@ -512,77 +202,12 @@ moduleFor(
this.triggerEvent('keyup', { key: 'Escape' });
}
- ['@test sends an action with `{{input key-down=(action "foo")}}` when a key is pressed'](
- assert
- ) {
- let triggered = 0;
-
- expectDeprecation(
- () => {
- this.render(`{{input key-down=(action 'foo')}}`, {
- actions: {
- foo(value, event) {
- triggered++;
- assert.ok(true, 'action was triggered');
- assert.ok(event instanceof Event, 'Native event was passed');
- },
- },
- });
- },
- /Passing the `@key-down` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- this.triggerEvent('keydown', { key: 'A' });
-
- assert.equal(triggered, 1, 'The action was triggered exactly once');
- }
-
- ['@test sends an action with `{{input key-up=(action "foo")}}` when a key is pressed'](assert) {
- expectDeprecation(
- () => {
- this.render(`{{input key-up=(action 'foo')}}`, {
- actions: {
- foo(value, event) {
- assert.ok(true, 'action was triggered');
- assert.ok(event instanceof Event, 'Native event was passed');
- },
- },
- });
- },
- /Passing the `@key-up` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- this.triggerEvent('keyup', { key: 'A' });
- }
-
['@test GH#14727 can render a file input after having had render an input of other type']() {
this.render(`{{input type="text"}}{{input type="file"}}`);
this.assert.equal(this.$input()[0].type, 'text');
this.assert.equal(this.$input()[1].type, 'file');
}
-
- ['@test [DEPRECATED] sends an action with `{{input EVENT=(action "foo")}}` for native DOM events']() {
- this.assertTriggersNativeDOMEvents();
- }
-
- ['@test triggers a method with `{{input key-up=this.didTrigger}}`'](assert) {
- expectDeprecation(
- () => {
- this.render(`{{input key-up=this.didTrigger}}`, {
- didTrigger: action(function () {
- assert.ok(true, 'action was triggered');
- }),
- });
- },
- /Passing the `@key-up` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- this.triggerEvent('keyup', { key: 'A' });
- }
}
);
@@ -650,98 +275,7 @@ moduleFor(
moduleFor(
`Components test: {{input type='checkbox'}}`,
class extends InputRenderingTest {
- ['@test [DEPRECATED] dynamic attributes']() {
- expectDeprecation(
- () => {
- this.render(
- `{{input
- type='checkbox'
- elementId="test-input"
- ariaRole=this.role
- disabled=this.disabled
- name=this.name
- checked=this.checked
- tabindex=this.tabindex
- }}`,
- {
- role: 'radio',
- disabled: false,
- name: 'original-name',
- checked: false,
- tabindex: 10,
- }
- );
- },
- /Passing the `@(elementId|ariaRole|disabled|placeholder|name|maxlength|minlength|size|tabindex)` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- this.assertSingleCheckbox();
- this.assertNotDisabled();
- this.assertAttr('id', 'test-input');
- this.assertAttr('role', 'radio');
- this.assertAttr('name', 'original-name');
- this.assertAttr('tabindex', '10');
-
- runTask(() => this.rerender());
-
- this.assertSingleCheckbox();
- this.assertNotDisabled();
- this.assertAttr('id', 'test-input');
- this.assertAttr('role', 'radio');
- this.assertAttr('name', 'original-name');
- this.assertAttr('tabindex', '10');
-
- expectDeprecation(
- () => {
- runTask(() => {
- set(this.context, 'role', 'checkbox');
- set(this.context, 'disabled', true);
- set(this.context, 'name', 'updated-name');
- set(this.context, 'tabindex', 11);
- });
- },
- /Passing the `@(elementId|ariaRole|disabled|placeholder|name|maxlength|minlength|size|tabindex)` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- this.assertSingleCheckbox();
- this.assertDisabled();
- this.assertAttr('id', 'test-input');
- this.assertAttr('role', 'checkbox');
- this.assertAttr('name', 'updated-name');
- this.assertAttr('tabindex', '11');
-
- expectDeprecation(
- () => {
- runTask(() => {
- set(this.context, 'role', 'radio');
- set(this.context, 'disabled', false);
- set(this.context, 'name', 'original-name');
- set(this.context, 'tabindex', 10);
- });
- },
- /Passing the `@(elementId|ariaRole|disabled|placeholder|name|maxlength|minlength|size|tabindex)` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- this.assertSingleCheckbox();
- this.assertNotDisabled();
- this.assertAttr('id', 'test-input');
- this.assertAttr('role', 'radio');
- this.assertAttr('name', 'original-name');
- this.assertAttr('tabindex', '10');
- }
-
- ['@feature(!EMBER_MODERNIZED_BUILT_IN_COMPONENTS) `value` property assertion']() {
- expectAssertion(() => {
- this.render(`{{input type="checkbox" value=this.value}}`, {
- value: 'value',
- });
- }, /checkbox.+value.+not supported.+use.+checked.+instead/);
- }
-
- ['@feature(EMBER_MODERNIZED_BUILT_IN_COMPONENTS) `value` property warning']() {
+ ['`value` property warning']() {
let message =
'`<Input @type="checkbox" />` reflects its checked state via the `@checked` argument. ' +
'You wrote `<Input @type="checkbox" @value={{...}} />` which is likely not what you intended. ' +
@@ -794,196 +328,5 @@ moduleFor(
this.$input()[0].click();
this.assertCheckboxIsNotChecked();
}
-
- ['@test [DEPRECATED] with static values']() {
- expectDeprecation(
- () => {
- this.render(
- `{{input type="checkbox"
- elementId="test-input"
- ariaRole="radio"
- disabled=false
- tabindex=10
- name="original-name"
- checked=false}}`
- );
- },
- /Passing the `@(elementId|ariaRole|disabled|tabindex|name)` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- this.assertSingleCheckbox();
- this.assertCheckboxIsNotChecked();
- this.assertNotDisabled();
- this.assertAttr('id', 'test-input');
- this.assertAttr('role', 'radio');
- this.assertAttr('tabindex', '10');
- this.assertAttr('name', 'original-name');
-
- runTask(() => this.rerender());
-
- this.assertSingleCheckbox();
- this.assertCheckboxIsNotChecked();
- this.assertNotDisabled();
- this.assertAttr('id', 'test-input');
- this.assertAttr('role', 'radio');
- this.assertAttr('tabindex', '10');
- this.assertAttr('name', 'original-name');
- }
-
- ['@test [DEPRECATED] sends an action with `{{input EVENT=(action "foo")}}` for native DOM events']() {
- this.assertTriggersNativeDOMEvents('checkbox');
- }
}
);
-
-moduleFor(
- `Components test: {{input type='text'}}`,
- class extends InputRenderingTest {
- ['@test [DEPRECATED] null values']() {
- let attributes = ['role', 'disabled', 'placeholder', 'name', 'maxlength', 'size', 'tabindex'];
-
- expectDeprecation(
- () => {
- this.render(
- `{{input type="text"
- elementId="test-input"
- ariaRole=this.role
- disabled=this.disabled
- value=this.value
- placeholder=this.placeholder
- name=this.name
- maxlength=this.maxlength
- size=this.size
- tabindex=this.tabindex}}`,
- {
- role: null,
- disabled: null,
- value: null,
- placeholder: null,
- name: null,
- maxlength: null,
- size: null,
- tabindex: null,
- }
- );
- },
- /Passing the `@(elementId|ariaRole|disabled|placeholder|name|maxlength|size|tabindex)` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- this.assertValue('');
- this.assertAttr('id', 'test-input');
- this.assertAllAttrs(attributes, undefined);
-
- runTask(() => this.rerender());
-
- this.assertValue('');
- this.assertAttr('id', 'test-input');
- this.assertAllAttrs(attributes, undefined);
-
- expectDeprecation(
- () => {
- runTask(() => {
- set(this.context, 'role', 'search');
- set(this.context, 'disabled', true);
- set(this.context, 'value', 'Updated value');
- set(this.context, 'placeholder', 'Updated placeholder');
- set(this.context, 'name', 'updated-name');
- set(this.context, 'maxlength', 11);
- set(this.context, 'size', 21);
- set(this.context, 'tabindex', 31);
- });
- },
- /Passing the `@(elementId|ariaRole|disabled|placeholder|name|maxlength|size|tabindex)` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- this.assertDisabled();
- this.assertValue('Updated value');
- this.assertAttr('id', 'test-input');
- this.assertAttr('role', 'search');
- this.assertAttr('placeholder', 'Updated placeholder');
- this.assertAttr('name', 'updated-name');
- this.assertAttr('maxlength', '11');
- this.assertAttr('size', '21');
- this.assertAttr('tabindex', '31');
-
- expectDeprecation(
- () => {
- runTask(() => {
- set(this.context, 'role', null);
- set(this.context, 'disabled', null);
- set(this.context, 'value', null);
- set(this.context, 'placeholder', null);
- set(this.context, 'name', null);
- set(this.context, 'maxlength', null);
- // set(this.context, 'size', null); //NOTE: this fails with `Error: Failed to set the 'size' property on 'HTMLInputElement': The value provided is 0, which is an invalid size.` (TEST_SUITE=sauce)
- set(this.context, 'tabindex', null);
- });
- },
- /Passing the `@(elementId|ariaRole|disabled|placeholder|name|maxlength|size|tabindex)` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- this.assertAttr('disabled', undefined);
- this.assertValue('');
- this.assertAttr('id', 'test-input');
- this.assertAttr('role', undefined);
- // this.assertAttr('placeholder', undefined); //NOTE: this fails with a value of "null" (TEST_SUITE=sauce)
- // this.assertAttr('name', undefined); //NOTE: this fails with a value of "null" (TEST_SUITE=sauce)
- this.assertAttr('maxlength', undefined);
- // this.assertAttr('size', undefined); //NOTE: re-enable once `size` bug above has been addressed
- this.assertAttr('tabindex', undefined);
- }
- }
-);
-
-// These are the permutations of the set:
-// ['type="range"', 'min="-5" max="50"', 'value="%x"']
-[
- 'type="range" min="-5" max="50" value="%x"',
- 'type="range" value="%x" min="-5" max="50"',
- 'min="-5" max="50" type="range" value="%x"',
- 'min="-5" max="50" value="%x" type="range"',
- 'value="%x" min="-5" max="50" type="range"',
- 'value="%x" type="range" min="-5" max="50"',
-].forEach((attrs) => {
- moduleFor(
- `[GH#15675] Components test [DEPRECATED]: {{input ${attrs}}}`,
- class extends InputRenderingTest {
- renderInput(value = 25) {
- expectDeprecation(
- () => this.render(`{{input ${attrs.replace('%x', value)}}}`),
- /Passing the `@(min|max)` argument to <Input> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
- }
-
- ['@test value over default max but below set max is kept']() {
- this.renderInput('25');
- this.assertValue('25');
- }
-
- ['@test value below default min but above set min is kept']() {
- this.renderInput('-2');
- this.assertValue('-2');
- }
-
- ['@test in the valid default range is kept']() {
- this.renderInput('5');
- this.assertValue('5');
- }
-
- ['@test value above max is reset to max']() {
- this.renderInput('55');
- this.assertValue('50');
- }
-
- ['@test value below min is reset to min']() {
- this.renderInput('-10');
- this.assertValue('-5');
- }
- }
- );
-}); | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/glimmer/tests/integration/components/link-to/query-params-angle-test.js | @@ -350,30 +350,6 @@ moduleFor(
assert.equal(theLink.attr('href'), '/?foo=ASL');
}
- async ['@test supplied QP properties can be bound in legacy components'](assert) {
- expectDeprecation(/Passing the `@tagName` argument to/);
-
- this.addTemplate(
- 'index',
- `
- <LinkTo @tagName="a" id="the-link" @query={{hash foo=this.boundThing}}>
- Index
- </LinkTo>
- `
- );
-
- await this.visit('/');
-
- let indexController = this.getController('index');
- let theLink = this.$('#the-link');
-
- assert.equal(theLink.attr('href'), '/?foo=OMG');
-
- runTask(() => indexController.set('boundThing', 'ASL'));
-
- assert.equal(theLink.attr('href'), '/?foo=ASL');
- }
-
async ['@test supplied QP properties can be bound (booleans)'](assert) {
this.addTemplate(
'index', | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/glimmer/tests/integration/components/link-to/query-params-curly-test.js | @@ -1,7 +1,6 @@
import Controller from '@ember/controller';
import { RSVP } from '@ember/-internals/runtime';
import { Route } from '@ember/-internals/routing';
-import { DEBUG } from '@glimmer/env';
import {
ApplicationTestCase,
classes as classMatcher,
@@ -70,31 +69,6 @@ moduleFor(
});
});
}
-
- async ['@test [DEPRECATED] `query-params` can be used outside of `{{link-to}}'](assert) {
- if (!DEBUG) {
- assert.expect(0);
- return;
- }
-
- expectDeprecation(() => {
- this.addTemplate(
- 'index',
- `{{#let (query-params foo='456' alon='BUKAI') as |qp|}}{{#link-to 'index' qp}}Index{{/link-to}}{{/let}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- await expectDeprecationAsync(
- () => this.visit('/'),
- /The `query-params` helper is deprecated/
- );
-
- this.assertComponentElement(this.firstChild, {
- tagName: 'a',
- attrs: { href: '/?alon=BUKAI&foo=456', class: classMatcher('ember-view') },
- content: 'Index',
- });
- }
}
);
@@ -841,39 +815,6 @@ moduleFor(
this.shouldBeActive(assert, '#page-link > a');
}
- async ['@test [DEPRECATED] [GH#17869] it does not cause shadowing assertion with `hash` local variable']() {
- this.router.map(function () {
- this.route('post', { path: '/post/:id' });
- });
-
- this.add(
- 'controller:post',
- class extends Controller {
- queryParams = ['showComments'];
- showComments = true;
- }
- );
-
- expectDeprecation(() => {
- this.addTemplate(
- 'index',
- `
- {{#let (hash id="1" title="Hello World!" body="Lorem ipsum dolor sit amet...") as |hash|}}
- {{#link-to "post" hash (query-params showComments=false)}}View Post{{/link-to}}
- {{/let}}
- `
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- await this.visit('/');
-
- this.assertComponentElement(this.element.firstElementChild, {
- tagName: 'a',
- attrs: { href: '/post/1?showComments=false', class: classMatcher('ember-view') },
- content: 'View Post',
- });
- }
-
async ['@test with dynamic segment and loading route, it should preserve query parameters'](
assert
) { | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/glimmer/tests/integration/components/link-to/rendering-angle-test.js | @@ -8,7 +8,6 @@ import {
import { Router, Route } from '@ember/-internals/routing';
import Controller from '@ember/controller';
import { set } from '@ember/-internals/metal';
-import { LinkComponent } from '@ember/-internals/glimmer';
import { DEBUG } from '@glimmer/env';
moduleFor(
@@ -19,7 +18,7 @@ moduleFor(
return assert.rejectsAssertion(
this.visit('/'),
- /You must provide at least one of the `@route`, `@model`, `@models` or `@query` argument to `<LinkTo>`/
+ /You must provide at least one of the `@route`, `@model`, `@models` or `@query` arguments to `<LinkTo>`/
);
}
@@ -100,26 +99,7 @@ moduleFor(
assert.equal(this.firstChild.classList.contains('active'), true);
}
- async ['@test able to safely extend the built-in component and use the normal path']() {
- this.addComponent('custom-link-to', {
- ComponentClass: class extends LinkComponent {},
- });
-
- this.addTemplate('application', `<CustomLinkTo @route='index'>{{this.title}}</CustomLinkTo>`);
-
- this.add(
- 'controller:application',
- class extends Controller {
- title = 'Hello';
- }
- );
-
- await this.visit('/');
-
- this.assertText('Hello');
- }
-
- async ['@test able to pupolate innermost dynamic segment when immediate parent route is active']() {
+ async ['@test able to popolate innermost dynamic segment when immediate parent route is active']() {
this.addTemplate('application', '{{outlet}}');
this.addTemplate('parents', '{{outlet}}'); | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/glimmer/tests/integration/components/link-to/rendering-curly-test.js | @@ -2,18 +2,22 @@ import { moduleFor, ApplicationTestCase, RenderingTestCase, runTask } from 'inte
import Controller from '@ember/controller';
import { set } from '@ember/-internals/metal';
-import { LinkComponent } from '@ember/-internals/glimmer';
import { DEBUG } from '@glimmer/env';
moduleFor(
'{{link-to}} component (rendering tests)',
class extends ApplicationTestCase {
- [`@test it throws a useful error if you invoke it wrong`](assert) {
- assert.expect(1);
+ async [`@test it throws a useful error if you invoke it wrong`](assert) {
+ this.addTemplate('application', `{{#link-to}}Index{{/link-to}}`);
- expectAssertion(() => {
- this.addTemplate('application', `{{#link-to}}Index{{/link-to}}`);
- }, /You must provide one or more parameters to the `{{link-to}}` component\. \('my-app\/templates\/application\.hbs' @ L1:C0\)/);
+ if (DEBUG) {
+ await assert.rejects(
+ this.visit('/'),
+ /You must provide at least one of the `@route`, `@model`, `@models` or `@query` arguments to `<LinkTo>`./
+ );
+ } else {
+ assert.expect(0);
+ }
}
async [`@test it throws a useful error if you pass the href argument`](assert) {
@@ -92,87 +96,6 @@ moduleFor(
assert.equal(this.firstChild.classList.contains('active'), true);
}
-
- async ['@test [DEPRECATED] escaped inline form (double curlies) escapes link title']() {
- expectDeprecation(() => {
- this.addTemplate('application', `{{link-to this.title 'index'}}`);
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- this.add(
- 'controller:application',
- class extends Controller {
- title = '<b>blah</b>';
- }
- );
-
- await this.visit('/');
-
- this.assertText('<b>blah</b>');
- }
-
- async ['@test [DEPRECATED] unescaped inline form (triple curlies) does not escape link title'](
- assert
- ) {
- expectDeprecation(() => {
- this.addTemplate('application', `{{{link-to this.title 'index'}}}`);
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- this.add(
- 'controller:application',
- class extends Controller {
- title = '<b>blah</b>';
- }
- );
-
- await this.visit('/');
-
- this.assertText('blah');
- assert.equal(this.$('b').length, 1);
- }
-
- async ['@test able to safely extend the built-in component and use the normal path']() {
- this.addComponent('custom-link-to', {
- ComponentClass: class extends LinkComponent {},
- });
-
- this.addTemplate(
- 'application',
- `{{#custom-link-to route='index'}}{{this.title}}{{/custom-link-to}}`
- );
-
- this.add(
- 'controller:application',
- class extends Controller {
- title = 'Hello';
- }
- );
-
- await this.visit('/');
-
- this.assertText('Hello');
- }
-
- async ['@test [DEPRECATED] [GH#13432] able to safely extend the built-in component and invoke it inline']() {
- this.addComponent('custom-link-to', {
- ComponentClass: class extends LinkComponent {},
- });
-
- this.addTemplate('application', `{{custom-link-to this.title 'index'}}`);
-
- this.add(
- 'controller:application',
- class extends Controller {
- title = 'Hello';
- }
- );
-
- await expectDeprecationAsync(
- () => this.visit('/'),
- /Invoking the `<LinkTo>` component with positional arguments is deprecated/
- );
-
- this.assertText('Hello');
- }
}
);
@@ -184,13 +107,5 @@ moduleFor(
this.assertText('Go to Index');
}
-
- ['@test [DEPRECATED] it should be able to be inserted in DOM when the router is not present - inline']() {
- expectDeprecation(() => {
- this.render(`{{link-to 'Go to Index' 'index'}}`);
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- this.assertText('Go to Index');
- }
}
); | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/glimmer/tests/integration/components/link-to/routing-angle-test.js | @@ -8,10 +8,7 @@ import Controller, { inject as injectController } from '@ember/controller';
import { A as emberA, RSVP } from '@ember/-internals/runtime';
import { subscribe, reset } from '@ember/instrumentation';
import { Route, NoneLocation } from '@ember/-internals/routing';
-import {
- EMBER_IMPROVED_INSTRUMENTATION,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS,
-} from '@ember/canary-features';
+import { EMBER_IMPROVED_INSTRUMENTATION } from '@ember/canary-features';
import Engine from '@ember/engine';
import { DEBUG } from '@glimmer/env';
import { compile } from '../../../utils/helpers';
@@ -133,78 +130,6 @@ moduleFor(
);
}
- async [`@test [DEPRECATED] it doesn't add an href when the tagName isn't 'a'`](assert) {
- this.addTemplate(
- 'index',
- `<LinkTo @route='about' id='about-link' @tagName='div'>About</LinkTo>`
- );
-
- await expectDeprecationAsync(
- () => this.visit('/'),
- /Passing the `@tagName` argument to <LinkTo> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
- assert.strictEqual(this.$('#about-link').attr('href'), null, 'there is no href attribute');
- }
-
- async [`@test [DEPRECATED] it applies a 'disabled' class when disabledWhen`](assert) {
- this.addTemplate(
- 'index',
- `
- <LinkTo id="about-link-static" @route="about" @disabledWhen="truthy">About</LinkTo>
- <LinkTo id="about-link-dynamic" @route="about" @disabledWhen={{this.dynamicDisabledWhen}}>About</LinkTo>
- `
- );
-
- let controller;
-
- this.add(
- 'controller:index',
- class extends Controller {
- constructor(...args) {
- super(...args);
- controller = this;
- }
-
- dynamicDisabledWhen = true;
- }
- );
-
- await expectDeprecationAsync(
- () => this.visit('/'),
- 'Passing the `@disabledWhen` argument to <LinkTo> is deprecated. Use the `@disabled` argument instead.',
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- assert.equal(
- this.$('#about-link-static.disabled').length,
- 1,
- 'The static link is disabled when its disabledWhen is true'
- );
- assert.equal(
- this.$('#about-link-dynamic.disabled').length,
- 1,
- 'The dynamic link is disabled when its disabledWhen is true'
- );
-
- expectDeprecation(
- () => runTask(() => controller.set('dynamicDisabledWhen', false)),
- 'Passing the `@disabledWhen` argument to <LinkTo> is deprecated. Use the `@disabled` argument instead.',
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- assert.equal(
- this.$('#about-link-static.disabled').length,
- 1,
- 'The static link is disabled when its disabledWhen is true'
- );
- assert.strictEqual(
- this.$('#about-link-dynamic.disabled').length,
- 0,
- 'The dynamic link is re-enabled when its disabledWhen becomes false'
- );
- }
-
async [`@test it applies a 'disabled' class when disabled`](assert) {
this.addTemplate(
'index',
@@ -384,27 +309,6 @@ moduleFor(
);
}
- async [`@test [DEPRECATED] it does not respond to clicks when disabledWhen`](assert) {
- this.addTemplate(
- 'index',
- `<LinkTo id="about-link" @route="about" @disabledWhen={{true}}>About</LinkTo>`
- );
-
- await expectDeprecationAsync(
- () => this.visit('/'),
- 'Passing the `@disabledWhen` argument to <LinkTo> is deprecated. Use the `@disabled` argument instead.',
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- await expectDeprecationAsync(
- () => this.click('#about-link'),
- 'Passing the `@disabledWhen` argument to <LinkTo> is deprecated. Use the `@disabled` argument instead.',
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- assert.strictEqual(this.$('h3.about').length, 0, 'Transitioning did not occur');
- }
-
async [`@test it does not respond to clicks when disabled`](assert) {
this.addTemplate(
'index',
@@ -451,7 +355,7 @@ moduleFor(
assert.equal(
this.$('h3.about').length,
1,
- 'Transitioning did occur when disabledWhen became false'
+ 'Transitioning did occur when disabled became false'
);
}
@@ -1253,136 +1157,7 @@ moduleFor(
assert.equal(hidden, 1, 'The link bubbles');
}
- async [`@test [DEPRECATED] it supports bubbles=false`](assert) {
- if (EMBER_MODERNIZED_BUILT_IN_COMPONENTS) {
- this.addTemplate(
- 'about',
- `
- <div {{on 'click' this.hide}}>
- <LinkTo id='about-contact' @route='about.contact' @bubbles={{false}}>
- About
- </LinkTo>
- </div>
- {{outlet}}
- `
- );
- } else {
- this.addTemplate(
- 'about',
- `
- <div {{action this.hide}}>
- <LinkTo id='about-contact' @route='about.contact' @bubbles={{false}}>
- About
- </LinkTo>
- </div>
- {{outlet}}
- `
- );
- }
-
- this.addTemplate('about.contact', `<h1 id='contact'>Contact</h1>`);
-
- this.router.map(function () {
- this.route('about', function () {
- this.route('contact');
- });
- });
-
- let hidden = 0;
-
- this.add(
- 'controller:about',
- class extends Controller {
- hide() {
- hidden++;
- }
- }
- );
-
- await expectDeprecationAsync(
- () => this.visit('/about'),
- 'Passing the `@bubbles` argument to <LinkTo> is deprecated. Use the {{on}} modifier to attach a custom event handler to control event propagation.',
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- await expectDeprecationAsync(
- () => this.click('#about-contact'),
- 'Passing the `@bubbles` argument to <LinkTo> is deprecated. Use the {{on}} modifier to attach a custom event handler to control event propagation.',
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- assert.equal(this.$('#contact').text(), 'Contact', 'precond - the link worked');
-
- assert.strictEqual(hidden, 0, "The link didn't bubble");
- }
-
- async [`@test [DEPRECATED] it supports bubbles=boundFalseyThing`](assert) {
- if (EMBER_MODERNIZED_BUILT_IN_COMPONENTS) {
- this.addTemplate(
- 'about',
- `
- <div {{on 'click' this.hide}}>
- <LinkTo id='about-contact' @route='about.contact' @bubbles={{this.boundFalseyThing}}>
- About
- </LinkTo>
- </div>
- {{outlet}}
- `
- );
- } else {
- this.addTemplate(
- 'about',
- `
- <div {{action this.hide}}>
- <LinkTo id='about-contact' @route='about.contact' @bubbles={{this.boundFalseyThing}}>
- About
- </LinkTo>
- </div>
- {{outlet}}
- `
- );
- }
-
- this.addTemplate('about.contact', `<h1 id='contact'>Contact</h1>`);
-
- let hidden = 0;
-
- this.add(
- 'controller:about',
- class extends Controller {
- boundFalseyThing = false;
-
- hide() {
- hidden++;
- }
- }
- );
-
- this.router.map(function () {
- this.route('about', function () {
- this.route('contact');
- });
- });
-
- await expectDeprecationAsync(
- () => this.visit('/about'),
- /Passing the `@bubbles` argument to <LinkTo> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- await expectDeprecationAsync(
- () => this.click('#about-contact'),
- /Passing the `@bubbles` argument to <LinkTo> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- assert.equal(this.$('#contact').text(), 'Contact', 'precond - the link worked');
- assert.strictEqual(hidden, 0, "The link didn't bubble");
- }
-
- async [`@feature(EMBER_MODERNIZED_BUILT_IN_COMPONENTS) The propagation of the click event can be stopped`](
- assert
- ) {
+ async [`The propagation of the click event can be stopped`](assert) {
this.addTemplate(
'about',
`
@@ -1587,99 +1362,6 @@ moduleFor(
assertNav({ prevented: true }, () => this.$('#about-link').click(), assert);
}
- async [`@test [DEPRECATED] it does not call preventDefault if '@preventDefault={{false}}]' is passed as an option`](
- assert
- ) {
- this.router.map(function () {
- this.route('about');
- });
-
- this.addTemplate(
- 'index',
- `<LinkTo id='about-link' @route='about' @preventDefault={{false}}>About</LinkTo>`
- );
-
- await expectDeprecationAsync(
- () => this.visit('/'),
- /Passing the `@preventDefault` argument to <LinkTo> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- assertNav(
- { prevented: false },
- () =>
- expectDeprecation(
- () => this.$('#about-link').trigger('click'),
- /Passing the `@preventDefault` argument to <LinkTo> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- ),
- assert
- );
- }
-
- async [`@test [DEPRECATED] it does not call preventDefault if '@preventDefault={{this.boundThing}}' is passed as an option`](
- assert
- ) {
- this.router.map(function () {
- this.route('about');
- });
-
- this.addTemplate(
- 'index',
- `<LinkTo id='about-link' @route='about' @preventDefault={{this.boundThing}}>About</LinkTo>`
- );
-
- let controller;
-
- this.add(
- 'controller:index',
- class extends Controller {
- constructor(...args) {
- super(...args);
- controller = this;
- }
-
- boundThing = false;
- }
- );
-
- await expectDeprecationAsync(
- () => this.visit('/'),
- /Passing the `@preventDefault` argument to <LinkTo> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- assertNav(
- { prevented: false },
- () =>
- expectDeprecation(
- () => this.$('#about-link').trigger('click'),
- /Passing the `@preventDefault` argument to <LinkTo> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- ),
- assert
- );
-
- runTask(() => controller.set('boundThing', true));
-
- await expectDeprecationAsync(
- () => this.visit('/'),
- /Passing the `@preventDefault` argument to <LinkTo> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- assertNav(
- { prevented: true },
- () =>
- expectDeprecation(
- () => this.$('#about-link').trigger('click'),
- /Passing the `@preventDefault` argument to <LinkTo> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- ),
- assert
- );
- }
-
async [`@test it does not call preventDefault if 'target' attribute is provided`](assert) {
this.addTemplate(
'index',
@@ -2197,51 +1879,6 @@ moduleFor(
this.assertText('Post: Papa Smurf');
}
- async [`@test [DEPRECATED] The <LinkTo /> component can use dynamic params`](assert) {
- this.router.map(function () {
- this.route('foo', { path: 'foo/:some/:thing' });
- this.route('bar', { path: 'bar/:some/:thing/:else' });
- });
-
- let controller;
-
- this.add(
- 'controller:index',
- class extends Controller {
- constructor(...args) {
- super(...args);
- controller = this;
- }
-
- dynamicLinkParams = ['foo', 'one', 'two'];
- }
- );
-
- this.addTemplate(
- 'index',
- `
- <h3 class="home">Home</h3>
- <LinkTo id="dynamic-link" @params={{this.dynamicLinkParams}}>Dynamic</LinkTo>
- `
- );
-
- await expectDeprecationAsync(
- () => this.visit('/'),
- /Invoking the `<LinkTo>` component with positional arguments is deprecated/
- );
-
- let link = this.$('#dynamic-link');
-
- assert.equal(link.attr('href'), '/foo/one/two');
-
- expectDeprecation(
- () => runTask(() => controller.set('dynamicLinkParams', ['bar', 'one', 'two', 'three'])),
- /Invoking the `<LinkTo>` component with positional arguments is deprecated/
- );
-
- assert.equal(link.attr('href'), '/bar/one/two/three');
- }
-
async [`@test [GH#13256]: <LinkTo /> to a parent root model hook which performs a 'transitionTo' has correct active class`](
assert
) { | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/glimmer/tests/integration/components/link-to/routing-curly-test.js | @@ -8,10 +8,7 @@ import Controller, { inject as injectController } from '@ember/controller';
import { A as emberA, RSVP } from '@ember/-internals/runtime';
import { subscribe, reset } from '@ember/instrumentation';
import { Route, NoneLocation } from '@ember/-internals/routing';
-import {
- EMBER_IMPROVED_INSTRUMENTATION,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS,
-} from '@ember/canary-features';
+import { EMBER_IMPROVED_INSTRUMENTATION } from '@ember/canary-features';
import Engine from '@ember/engine';
import { DEBUG } from '@glimmer/env';
import { compile } from '../../../utils/helpers';
@@ -133,83 +130,6 @@ moduleFor(
);
}
- async [`@test [DEPRECATED] it doesn't add an href when the tagName isn't 'a'`](assert) {
- this.addTemplate(
- 'index',
- `<div id='about-link'>{{#link-to route='about' tagName='div'}}About{{/link-to}}</div>`
- );
-
- await expectDeprecationAsync(
- () => this.visit('/'),
- /Passing the `@tagName` argument to <LinkTo> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- assert.strictEqual(
- this.$('#about-link > div').attr('href'),
- null,
- 'there is no href attribute'
- );
- }
-
- async [`@test [DEPRECATED] it applies a 'disabled' class when disabledWhen`](assert) {
- this.addTemplate(
- 'index',
- `
- <div id="about-link-static">{{#link-to route="about" disabledWhen="truthy"}}About{{/link-to}}</div>
- <div id="about-link-dynamic">{{#link-to route="about" disabledWhen=this.dynamicDisabledWhen}}About{{/link-to}}</div>
- `
- );
-
- let controller;
-
- this.add(
- 'controller:index',
- class extends Controller {
- constructor(...args) {
- super(...args);
- controller = this;
- }
-
- dynamicDisabledWhen = true;
- }
- );
-
- await expectDeprecationAsync(
- () => this.visit('/'),
- 'Passing the `@disabledWhen` argument to <LinkTo> is deprecated. Use the `@disabled` argument instead.',
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- assert.equal(
- this.$('#about-link-static > a.disabled').length,
- 1,
- 'The static link is disabled when its disabledWhen is true'
- );
- assert.equal(
- this.$('#about-link-dynamic > a.disabled').length,
- 1,
- 'The dynamic link is disabled when its disabledWhen is true'
- );
-
- expectDeprecation(
- () => runTask(() => controller.set('dynamicDisabledWhen', false)),
- 'Passing the `@disabledWhen` argument to <LinkTo> is deprecated. Use the `@disabled` argument instead.',
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- assert.equal(
- this.$('#about-link-static > a.disabled').length,
- 1,
- 'The static link is disabled when its disabledWhen is true'
- );
- assert.strictEqual(
- this.$('#about-link-dynamic > a.disabled').length,
- 0,
- 'The dynamic link is re-enabled when its disabledWhen becomes false'
- );
- }
-
async [`@test it applies a 'disabled' class when disabled`](assert) {
this.addTemplate(
'index',
@@ -251,7 +171,7 @@ moduleFor(
assert.equal(
this.$('#about-link-static > a.disabled').length,
1,
- 'The static link is disabled when its disabledWhen is true'
+ 'The static link is disabled when its disabled is true'
);
assert.strictEqual(
this.$('#about-link-dynamic > a.disabled').length,
@@ -396,27 +316,6 @@ moduleFor(
);
}
- async [`@test [DEPRECATED] it does not respond to clicks when disabledWhen`](assert) {
- this.addTemplate(
- 'index',
- `<div id="about-link">{{#link-to route="about" disabledWhen=true}}About{{/link-to}}</div>`
- );
-
- await expectDeprecationAsync(
- () => this.visit('/'),
- 'Passing the `@disabledWhen` argument to <LinkTo> is deprecated. Use the `@disabled` argument instead.',
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- await expectDeprecationAsync(
- () => this.click('#about-link > a'),
- 'Passing the `@disabledWhen` argument to <LinkTo> is deprecated. Use the `@disabled` argument instead.',
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- assert.strictEqual(this.$('h3.about').length, 0, 'Transitioning did not occur');
- }
-
async [`@test it does not respond to clicks when disabled`](assert) {
this.addTemplate(
'index',
@@ -463,7 +362,7 @@ moduleFor(
assert.equal(
this.$('h3.about').length,
1,
- 'Transitioning did occur when disabledWhen became false'
+ 'Transitioning did occur when disabled became false'
);
}
@@ -1328,133 +1227,6 @@ moduleFor(
assert.equal(hidden, 1, 'The link bubbles');
}
- async [`@test [DEPRECATED] it supports bubbles=false`](assert) {
- if (EMBER_MODERNIZED_BUILT_IN_COMPONENTS) {
- this.addTemplate(
- 'about',
- `
- <div id='about-contact' {{on 'click' this.hide}}>
- {{#link-to route='about.contact' bubbles=false}}
- About
- {{/link-to}}
- </div>
- {{outlet}}
- `
- );
- } else {
- this.addTemplate(
- 'about',
- `
- <div id='about-contact' {{action this.hide}}>
- {{#link-to route='about.contact' bubbles=false}}
- About
- {{/link-to}}
- </div>
- {{outlet}}
- `
- );
- }
-
- this.addTemplate('about.contact', `<h1 id='contact'>Contact</h1>`);
-
- this.router.map(function () {
- this.route('about', function () {
- this.route('contact');
- });
- });
-
- let hidden = 0;
-
- this.add(
- 'controller:about',
- class extends Controller {
- hide() {
- hidden++;
- }
- }
- );
-
- await expectDeprecationAsync(
- () => this.visit('/about'),
- /Passing the `@bubbles` argument to <LinkTo> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- await expectDeprecationAsync(
- () => this.click('#about-contact > a'),
- /Passing the `@bubbles` argument to <LinkTo> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- assert.equal(this.$('#contact').text(), 'Contact', 'precond - the link worked');
-
- assert.strictEqual(hidden, 0, "The link didn't bubble");
- }
-
- async [`@test [DEPRECATED] it supports bubbles=boundFalseyThing`](assert) {
- if (EMBER_MODERNIZED_BUILT_IN_COMPONENTS) {
- this.addTemplate(
- 'about',
- `
- <div id='about-contact' {{on 'click' this.hide}}>
- {{#link-to route='about.contact' bubbles=this.boundFalseyThing}}
- About
- {{/link-to}}
- </div>
- {{outlet}}
- `
- );
- } else {
- this.addTemplate(
- 'about',
- `
- <div id='about-contact' {{action this.hide}}>
- {{#link-to route='about.contact' bubbles=this.boundFalseyThing}}
- About
- {{/link-to}}
- </div>
- {{outlet}}
- `
- );
- }
-
- this.addTemplate('about.contact', `<h1 id='contact'>Contact</h1>`);
-
- let hidden = 0;
-
- this.add(
- 'controller:about',
- class extends Controller {
- boundFalseyThing = false;
-
- hide() {
- hidden++;
- }
- }
- );
-
- this.router.map(function () {
- this.route('about', function () {
- this.route('contact');
- });
- });
-
- await expectDeprecationAsync(
- () => this.visit('/about'),
- /Passing the `@bubbles` argument to <LinkTo> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- await expectDeprecationAsync(
- () => this.click('#about-contact > a'),
- /Passing the `@bubbles` argument to <LinkTo> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- assert.equal(this.$('#contact').text(), 'Contact', 'precond - the link worked');
- assert.strictEqual(hidden, 0, "The link didn't bubble");
- }
-
async [`@test it moves into the named route with context`](assert) {
this.router.map(function () {
this.route('about');
@@ -1536,61 +1308,112 @@ moduleFor(
assert.equal(this.$('p').text(), 'Erik Brynroflsson', 'The name is correct');
}
- async [`@test [DEPRECATED] it binds some anchor html tag common attributes`](assert) {
+ async [`@test it calls preventDefault`](assert) {
+ this.router.map(function () {
+ this.route('about');
+ });
+
this.addTemplate(
'index',
+ `<div id='about-link'>{{#link-to route='about'}}About{{/link-to}}</div>`
+ );
+
+ await this.visit('/');
+
+ assertNav({ prevented: true }, () => this.$('#about-link > a').click(), assert);
+ }
+
+ async [`@test it accepts string/numeric arguments`](assert) {
+ this.router.map(function () {
+ this.route('filter', { path: '/filters/:filter' });
+ this.route('post', { path: '/post/:post_id' });
+ this.route('repo', { path: '/repo/:owner/:name' });
+ });
+
+ this.add(
+ 'controller:filter',
+ class extends Controller {
+ filter = 'unpopular';
+ repo = { owner: 'ember', name: 'ember.js' };
+ post_id = 123;
+ }
+ );
+
+ this.addTemplate(
+ 'filter',
`
- <h3 class="home">Home</h3>
- <div id='self-link'>
- {{#link-to route='index' title='title-attr' rel='rel-attr' tabindex='-1'}}
- Self
- {{/link-to}}
- </div>
+ <p>{{this.filter}}</p>
+ <div id="link">{{#link-to route="filter" model="unpopular"}}Unpopular{{/link-to}}</div>
+ <div id="path-link">{{#link-to route="filter" model=this.filter}}Unpopular{{/link-to}}</div>
+ <div id="post-path-link">{{#link-to route="post" model=this.post_id}}Post{{/link-to}}</div>
+ <div id="post-number-link">{{#link-to route="post" model=123}}Post{{/link-to}}</div>
+ <div id="repo-object-link">{{#link-to route="repo" model=this.repo}}Repo{{/link-to}}</div>
`
);
- await expectDeprecationAsync(
- () => this.visit('/'),
- /Passing the `@(id|title|rel|tabindex)` argument to <LinkTo> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
+ await this.visit('/filters/popular');
+
+ assert.equal(normalizeUrl(this.$('#link > a').attr('href')), '/filters/unpopular');
+ assert.equal(normalizeUrl(this.$('#path-link > a').attr('href')), '/filters/unpopular');
+ assert.equal(normalizeUrl(this.$('#post-path-link > a').attr('href')), '/post/123');
+ assert.equal(normalizeUrl(this.$('#post-number-link > a').attr('href')), '/post/123');
+ assert.equal(
+ normalizeUrl(this.$('#repo-object-link > a').attr('href')),
+ '/repo/ember/ember.js'
);
+ }
- let link = this.$('#self-link > a');
+ async [`@test [GH#4201] Shorthand for route.index shouldn't throw errors about context arguments`](
+ assert
+ ) {
+ this.router.map(function () {
+ this.route('lobby', function () {
+ this.route('index', { path: ':lobby_id' });
+ this.route('list');
+ });
+ });
- assert.equal(link.attr('title'), 'title-attr', 'The self-link contains title attribute');
- assert.equal(link.attr('rel'), 'rel-attr', 'The self-link contains rel attribute');
- assert.equal(link.attr('tabindex'), '-1', 'The self-link contains tabindex attribute');
- }
+ this.add(
+ 'route:lobby.index',
+ class extends Route {
+ model(params) {
+ assert.equal(params.lobby_id, 'foobar');
+ return params.lobby_id;
+ }
+ }
+ );
- async [`@test [DEPRECATED] it supports 'target' attribute`](assert) {
this.addTemplate(
- 'index',
- `
- <h3 class="home">Home</h3>
- <div id='self-link'>{{#link-to route='index' target='_blank'}}Self{{/link-to}}</div>
- `
+ 'lobby.index',
+ `<div id='lobby-link'>{{#link-to route='lobby' model='foobar'}}Lobby{{/link-to}}</div>`
);
- await expectDeprecationAsync(
- () => this.visit('/'),
- /Passing the `@target` argument to <LinkTo> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
+ this.addTemplate(
+ 'lobby.list',
+ `<div id='lobby-link'>{{#link-to route='lobby' model='foobar'}}Lobby{{/link-to}}</div>`
);
- let link = this.$('#self-link > a');
- assert.equal(link.attr('target'), '_blank', 'The self-link contains `target` attribute');
+ await this.visit('/lobby/list');
+
+ await this.click('#lobby-link > a');
+
+ shouldBeActive(assert, this.$('#lobby-link > a'));
}
- async [`@test [DEPRECATED] it supports 'target' attribute specified as a bound param`](assert) {
+ async [`@test Quoteless route param performs property lookup`](assert) {
+ this.router.map(function () {
+ this.route('about');
+ });
+
this.addTemplate(
'index',
`
- <h3 class="home">Home</h3>
- <div id='self-link'>{{#link-to route='index' target=this.boundLinkTarget}}Self{{/link-to}}</div>
+ <div id='string-link'>{{#link-to route='index'}}string{{/link-to}}</div>
+ <div id='path-link'>{{#link-to route=this.foo}}path{{/link-to}}</div>
`
);
- let controller = this;
+ let controller;
this.add(
'controller:index',
@@ -1600,328 +1423,27 @@ moduleFor(
controller = this;
}
- boundLinkTarget = '_blank';
+ foo = 'index';
}
);
- await expectDeprecationAsync(
- () => this.visit('/'),
- /Passing the `@target` argument to <LinkTo> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
+ let assertEquality = (href) => {
+ assert.equal(normalizeUrl(this.$('#string-link > a').attr('href')), '/');
+ assert.equal(normalizeUrl(this.$('#path-link > a').attr('href')), href);
+ };
- let link = this.$('#self-link > a');
- assert.equal(link.attr('target'), '_blank', 'The self-link contains `target` attribute');
+ await this.visit('/');
- expectDeprecation(
- () => runTask(() => controller.set('boundLinkTarget', '_self')),
- /Passing the `@target` argument to <LinkTo> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
+ assertEquality('/');
+
+ runTask(() => controller.set('foo', 'about'));
- assert.equal(link.attr('target'), '_self', 'The self-link contains `target` attribute');
+ assertEquality('/about');
}
- async [`@test it calls preventDefault`](assert) {
+ async [`@test it refreshes href element when one of params changes`](assert) {
this.router.map(function () {
- this.route('about');
- });
-
- this.addTemplate(
- 'index',
- `<div id='about-link'>{{#link-to route='about'}}About{{/link-to}}</div>`
- );
-
- await this.visit('/');
-
- assertNav({ prevented: true }, () => this.$('#about-link > a').click(), assert);
- }
-
- async [`@test [DEPRECATED] it does not call preventDefault if 'preventDefault=false' is passed as an option`](
- assert
- ) {
- this.router.map(function () {
- this.route('about');
- });
-
- this.addTemplate(
- 'index',
- `<div id='about-link'>{{#link-to route='about' preventDefault=false}}About{{/link-to}}</div>`
- );
-
- await expectDeprecationAsync(
- () => this.visit('/'),
- /Passing the `@preventDefault` argument to <LinkTo> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- assertNav(
- { prevented: false },
- () =>
- expectDeprecation(
- () => this.$('#about-link > a').trigger('click'),
- /Passing the `@preventDefault` argument to <LinkTo> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- ),
- assert
- );
- }
-
- async [`@test [DEPRECATED] it does not call preventDefault if 'preventDefault=this.boundThing' is passed as an option`](
- assert
- ) {
- this.router.map(function () {
- this.route('about');
- });
-
- this.addTemplate(
- 'index',
- `<div id='about-link'>{{#link-to route='about' preventDefault=this.boundThing}}About{{/link-to}}</div>`
- );
-
- let controller;
-
- this.add(
- 'controller:index',
- class extends Controller {
- constructor(...args) {
- super(...args);
- controller = this;
- }
-
- boundThing = false;
- }
- );
-
- await expectDeprecationAsync(
- () => this.visit('/'),
- /Passing the `@preventDefault` argument to <LinkTo> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- assertNav(
- { prevented: false },
- () =>
- expectDeprecation(
- () => this.$('#about-link > a').trigger('click'),
- /Passing the `@preventDefault` argument to <LinkTo> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- ),
- assert
- );
-
- runTask(() => controller.set('boundThing', true));
-
- await expectDeprecationAsync(
- () => this.visit('/'),
- /Passing the `@preventDefault` argument to <LinkTo> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- assertNav(
- { prevented: true },
- () =>
- expectDeprecation(
- () => this.$('#about-link > a').trigger('click'),
- /Passing the `@preventDefault` argument to <LinkTo> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- ),
- assert
- );
- }
-
- async [`@test [DEPRECATED] it does not call preventDefault if 'target' attribute is provided`](
- assert
- ) {
- this.addTemplate(
- 'index',
- `
- <h3 class="home">Home</h3>
- <div id='self-link'>{{#link-to route='index' target='_blank'}}Self{{/link-to}}</div>
- `
- );
-
- await expectDeprecationAsync(
- () => this.visit('/'),
- /Passing the `@target` argument to <LinkTo> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- assertNav({ prevented: false }, () => this.$('#self-link > a').click(), assert);
- }
-
- async [`@test [DEPRECATED] it should preventDefault when 'target = _self'`](assert) {
- this.addTemplate(
- 'index',
- `
- <h3 class="home">Home</h3>
- <div id='self-link'>{{#link-to route='index' target='_self'}}Self{{/link-to}}</div>
- `
- );
-
- await expectDeprecationAsync(
- () => this.visit('/'),
- /Passing the `@target` argument to <LinkTo> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- assertNav({ prevented: true }, () => this.$('#self-link > a').click(), assert);
- }
-
- async [`@test [DEPRECATED] it should not transition if target is not equal to _self or empty`](
- assert
- ) {
- this.addTemplate(
- 'index',
- `
- <div id='about-link'>
- {{#link-to route='about' replace=true target='_blank'}}
- About
- {{/link-to}}
- </div>
- `
- );
-
- this.router.map(function () {
- this.route('about');
- });
-
- await expectDeprecationAsync(
- () => this.visit('/'),
- /Passing the `@target` argument to <LinkTo> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- await this.click('#about-link > a');
-
- assert.notEqual(
- this.appRouter.currentRouteName,
- 'about',
- 'link-to should not transition if target is not equal to _self or empty'
- );
- }
-
- async [`@test it accepts string/numeric arguments`](assert) {
- this.router.map(function () {
- this.route('filter', { path: '/filters/:filter' });
- this.route('post', { path: '/post/:post_id' });
- this.route('repo', { path: '/repo/:owner/:name' });
- });
-
- this.add(
- 'controller:filter',
- class extends Controller {
- filter = 'unpopular';
- repo = { owner: 'ember', name: 'ember.js' };
- post_id = 123;
- }
- );
-
- this.addTemplate(
- 'filter',
- `
- <p>{{this.filter}}</p>
- <div id="link">{{#link-to route="filter" model="unpopular"}}Unpopular{{/link-to}}</div>
- <div id="path-link">{{#link-to route="filter" model=this.filter}}Unpopular{{/link-to}}</div>
- <div id="post-path-link">{{#link-to route="post" model=this.post_id}}Post{{/link-to}}</div>
- <div id="post-number-link">{{#link-to route="post" model=123}}Post{{/link-to}}</div>
- <div id="repo-object-link">{{#link-to route="repo" model=this.repo}}Repo{{/link-to}}</div>
- `
- );
-
- await this.visit('/filters/popular');
-
- assert.equal(normalizeUrl(this.$('#link > a').attr('href')), '/filters/unpopular');
- assert.equal(normalizeUrl(this.$('#path-link > a').attr('href')), '/filters/unpopular');
- assert.equal(normalizeUrl(this.$('#post-path-link > a').attr('href')), '/post/123');
- assert.equal(normalizeUrl(this.$('#post-number-link > a').attr('href')), '/post/123');
- assert.equal(
- normalizeUrl(this.$('#repo-object-link > a').attr('href')),
- '/repo/ember/ember.js'
- );
- }
-
- async [`@test [GH#4201] Shorthand for route.index shouldn't throw errors about context arguments`](
- assert
- ) {
- this.router.map(function () {
- this.route('lobby', function () {
- this.route('index', { path: ':lobby_id' });
- this.route('list');
- });
- });
-
- this.add(
- 'route:lobby.index',
- class extends Route {
- model(params) {
- assert.equal(params.lobby_id, 'foobar');
- return params.lobby_id;
- }
- }
- );
-
- this.addTemplate(
- 'lobby.index',
- `<div id='lobby-link'>{{#link-to route='lobby' model='foobar'}}Lobby{{/link-to}}</div>`
- );
-
- this.addTemplate(
- 'lobby.list',
- `<div id='lobby-link'>{{#link-to route='lobby' model='foobar'}}Lobby{{/link-to}}</div>`
- );
-
- await this.visit('/lobby/list');
-
- await this.click('#lobby-link > a');
-
- shouldBeActive(assert, this.$('#lobby-link > a'));
- }
-
- async [`@test Quoteless route param performs property lookup`](assert) {
- this.router.map(function () {
- this.route('about');
- });
-
- this.addTemplate(
- 'index',
- `
- <div id='string-link'>{{#link-to route='index'}}string{{/link-to}}</div>
- <div id='path-link'>{{#link-to route=this.foo}}path{{/link-to}}</div>
- `
- );
-
- let controller;
-
- this.add(
- 'controller:index',
- class extends Controller {
- constructor(...args) {
- super(...args);
- controller = this;
- }
-
- foo = 'index';
- }
- );
-
- let assertEquality = (href) => {
- assert.equal(normalizeUrl(this.$('#string-link > a').attr('href')), '/');
- assert.equal(normalizeUrl(this.$('#path-link > a').attr('href')), href);
- };
-
- await this.visit('/');
-
- assertEquality('/');
-
- runTask(() => controller.set('foo', 'about'));
-
- assertEquality('/about');
- }
-
- async [`@test it refreshes href element when one of params changes`](assert) {
- this.router.map(function () {
- this.route('post', { path: '/posts/:post_id' });
+ this.route('post', { path: '/posts/:post_id' });
});
let post = { id: '1' };
@@ -2065,274 +1587,6 @@ moduleFor(
linksEqual(this.$('a'), ['/bar', '/rar', '/bar', '/rar', '/rar', '/foo']);
}
- async [`@test [DEPRECATED] The non-block form {{link-to}} component moves into the named route`](
- assert
- ) {
- this.router.map(function () {
- this.route('contact');
- });
-
- expectDeprecation(() => {
- this.addTemplate(
- 'index',
- `
- <h3 class="home">Home</h3>
- <div id='contact-link'>{{link-to 'Contact us' 'contact'}}</div>
- <div id='self-link'>{{#link-to route='index'}}Self{{/link-to}}</div>
- `
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.addTemplate(
- 'contact',
- `
- <h3 class="contact">Contact</h3>
- <div id='home-link'>{{link-to 'Home' 'index'}}</div>
- <div id='self-link'>{{link-to 'Self' 'contact'}}</div>
- `
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- await this.visit('/');
-
- await this.click('#contact-link > a');
-
- assert.equal(this.$('h3.contact').length, 1, 'The contact template was rendered');
- assert.equal(
- this.$('#self-link > a.active').length,
- 1,
- 'The self-link was rendered with active class'
- );
- assert.equal(
- this.$('#home-link > a:not(.active)').length,
- 1,
- 'The other link was rendered without active class'
- );
- }
-
- async [`@test [DEPRECATED] The non-block form {{link-to}} component updates the link text when it is a binding`](
- assert
- ) {
- this.router.map(function () {
- this.route('contact');
- });
-
- let controller;
-
- this.add(
- 'controller:index',
- class extends Controller {
- constructor(...args) {
- super(...args);
- controller = this;
- }
-
- contactName = 'Jane';
- }
- );
-
- expectDeprecation(() => {
- this.addTemplate(
- 'index',
- `
- <h3 class="home">Home</h3>
- <div id='contact-link'>{{link-to this.contactName 'contact'}}</div>
- <div id='self-link'>{{#link-to route='index'}}Self{{/link-to}}</div>
- `
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.addTemplate(
- 'contact',
- `
- <h3 class="contact">Contact</h3>
- <div id='home-link'>{{link-to 'Home' 'index'}}</div>
- <div id='self-link'>{{link-to 'Self' 'contact'}}</div>
- `
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- await this.visit('/');
-
- assert.equal(
- this.$('#contact-link > a').text(),
- 'Jane',
- 'The link title is correctly resolved'
- );
-
- runTask(() => controller.set('contactName', 'Joe'));
-
- assert.equal(
- this.$('#contact-link > a').text(),
- 'Joe',
- 'The link title is correctly updated when the bound property changes'
- );
-
- runTask(() => controller.set('contactName', 'Robert'));
-
- assert.equal(
- this.$('#contact-link > a').text(),
- 'Robert',
- 'The link title is correctly updated when the bound property changes a second time'
- );
-
- await this.click('#contact-link > a');
-
- assert.equal(this.$('h3.contact').length, 1, 'The contact template was rendered');
- assert.equal(
- this.$('#self-link > a.active').length,
- 1,
- 'The self-link was rendered with active class'
- );
- assert.equal(
- this.$('#home-link > a:not(.active)').length,
- 1,
- 'The other link was rendered without active class'
- );
-
- await this.click('#home-link > a');
-
- assert.equal(this.$('h3.home').length, 1, 'The index template was rendered');
- assert.equal(
- this.$('#contact-link > a').text(),
- 'Robert',
- 'The link title is correctly updated when the route changes'
- );
- }
-
- async [`@test [DEPRECATED] The non-block form {{link-to}} component moves into the named route with context`](
- assert
- ) {
- this.router.map(function () {
- this.route('item', { path: '/item/:id' });
- });
-
- this.add(
- 'route:index',
- class extends Route {
- model() {
- return [
- { id: 'yehuda', name: 'Yehuda Katz' },
- { id: 'tom', name: 'Tom Dale' },
- { id: 'erik', name: 'Erik Brynroflsson' },
- ];
- }
- }
- );
-
- expectDeprecation(() => {
- this.addTemplate(
- 'index',
- `
- <h3 class="home">Home</h3>
- <ul>
- {{#each @model as |person|}}
- <li id={{person.id}}>
- {{link-to person.name 'item' person}}
- </li>
- {{/each}}
- </ul>
- `
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- this.addTemplate(
- 'item',
- `
- <h3 class="item">Item</h3>
- <p>{{@model.name}}</p>
- <div id='home-link'>{{#link-to route='index'}}Home{{/link-to}}</div>
- `
- );
-
- await this.visit('/');
-
- await this.click('#yehuda > a');
-
- assert.equal(this.$('h3.item').length, 1, 'The item template was rendered');
- assert.equal(this.$('p').text(), 'Yehuda Katz', 'The name is correct');
-
- await this.click('#home-link > a');
-
- assert.equal(normalizeUrl(this.$('li#yehuda > a').attr('href')), '/item/yehuda');
- assert.equal(normalizeUrl(this.$('li#tom > a').attr('href')), '/item/tom');
- assert.equal(normalizeUrl(this.$('li#erik > a').attr('href')), '/item/erik');
- }
-
- async [`@test [DEPRECATED] The non-block form {{link-to}} performs property lookup`](assert) {
- this.router.map(function () {
- this.route('about');
- });
-
- expectDeprecation(() => {
- this.addTemplate(
- 'index',
- `
- <div id='string-link'>{{link-to 'string' 'index'}}</div>
- <div id='path-link'>{{link-to this.path this.foo}}</div>
- `
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- let controller;
-
- this.add(
- 'controller:index',
- class extends Controller {
- constructor(...args) {
- super(...args);
- controller = this;
- }
-
- foo = 'index';
- }
- );
-
- await this.visit('/');
-
- let assertEquality = (href) => {
- assert.equal(normalizeUrl(this.$('#string-link > a').attr('href')), '/');
- assert.equal(normalizeUrl(this.$('#path-link > a').attr('href')), href);
- };
-
- assertEquality('/');
-
- runTask(() => controller.set('foo', 'about'));
-
- assertEquality('/about');
- }
-
- async [`@test [DEPRECATED] The non-block form {{link-to}} protects against XSS`](assert) {
- expectDeprecation(() => {
- this.addTemplate('application', `<div id='link'>{{link-to this.display 'index'}}</div>`);
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- let controller;
-
- this.add(
- 'controller:application',
- class extends Controller {
- constructor(...args) {
- super(...args);
- controller = this;
- }
-
- display = 'blahzorz';
- }
- );
-
- await this.visit('/');
-
- assert.equal(this.$('#link > a').text(), 'blahzorz');
-
- runTask(() => controller.set('display', '<b>BLAMMO</b>'));
-
- assert.equal(this.$('#link > a').text(), '<b>BLAMMO</b>');
- assert.strictEqual(this.$('b').length, 0);
- }
-
async [`@test it throws a useful error if you invoke it wrong`](assert) {
if (!DEBUG) {
assert.expect(0);
@@ -2507,46 +1761,6 @@ moduleFor(
);
}
- async [`@test [DEPRECATED] it updates when route changes with only query-params but without a block`](
- assert
- ) {
- this.router.map(function () {
- this.route('about');
- });
-
- this.add(
- 'controller:application',
- Controller.extend({
- queryParams: ['foo', 'bar'],
- foo: '123',
- bar: 'yes',
- })
- );
-
- expectDeprecation(() => {
- this.addTemplate(
- 'application',
- `<div id='the-link'>{{link-to "Index" (query-params foo='456' bar='NAW')}}</div>`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- await this.visit('/');
-
- assert.equal(
- this.$('#the-link > a').attr('href'),
- '/?bar=NAW&foo=456',
- 'link has right href'
- );
-
- await this.visit('/about');
-
- assert.equal(
- this.$('#the-link > a').attr('href'),
- '/about?bar=NAW&foo=456',
- 'link has right href'
- );
- }
-
async ['@test [GH#17018] passing model to {{link-to}} with `hash` helper works']() {
this.router.map(function () {
this.route('post', { path: '/posts/:post_id' });
@@ -2583,51 +1797,6 @@ moduleFor(
this.assertText('Post: Papa Smurf');
}
- async [`@test [DEPRECATED] The {{link-to}} component can use dynamic params`](assert) {
- this.router.map(function () {
- this.route('foo', { path: 'foo/:some/:thing' });
- this.route('bar', { path: 'bar/:some/:thing/:else' });
- });
-
- let controller;
-
- this.add(
- 'controller:index',
- class extends Controller {
- constructor(...args) {
- super(...args);
- controller = this;
- }
-
- dynamicLinkParams = ['foo', 'one', 'two'];
- }
- );
-
- this.addTemplate(
- 'index',
- `
- <h3 class="home">Home</h3>
- <div id="dynamic-link">{{#link-to params=this.dynamicLinkParams}}Dynamic{{/link-to}}</div>
- `
- );
-
- await expectDeprecationAsync(
- () => this.visit('/'),
- /Invoking the `<LinkTo>` component with positional arguments is deprecated/
- );
-
- let link = this.$('#dynamic-link > a');
-
- assert.equal(link.attr('href'), '/foo/one/two');
-
- expectDeprecation(
- () => runTask(() => controller.set('dynamicLinkParams', ['bar', 'one', 'two', 'three'])),
- /Invoking the `<LinkTo>` component with positional arguments is deprecated/
- );
-
- assert.equal(link.attr('href'), '/bar/one/two/three');
- }
-
async [`@test [GH#13256]: {{link-to}} to a parent root model hook which performs a 'transitionTo' has correct active class`](
assert
) { | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/glimmer/tests/integration/components/link-to/transitioning-classes-angle-test.js | @@ -1,6 +1,5 @@
import { RSVP } from '@ember/-internals/runtime';
import { Route } from '@ember/-internals/routing';
-import { EMBER_MODERNIZED_BUILT_IN_COMPONENTS } from '@ember/canary-features';
import { moduleFor, ApplicationTestCase, runTask } from 'internal-test-helpers';
function assertHasClass(assert, selector, label) {
@@ -151,198 +150,3 @@ moduleFor(
}
}
);
-
-moduleFor(
- `<LinkTo /> component: [DEPRECATED] .transitioning-in .transitioning-out CSS classes - nested link-to's`,
- class extends ApplicationTestCase {
- constructor(...args) {
- super(...args);
-
- this.aboutDefer = RSVP.defer();
- this.otherDefer = RSVP.defer();
- let _this = this;
-
- this.router.map(function () {
- this.route('parent-route', function () {
- this.route('about');
- this.route('other');
- });
- });
- this.add(
- 'route:parent-route.about',
- class extends Route {
- model() {
- return _this.aboutDefer.promise;
- }
- }
- );
-
- this.add(
- 'route:parent-route.other',
- class extends Route {
- model() {
- return _this.otherDefer.promise;
- }
- }
- );
-
- this.addTemplate(
- 'application',
- `
- {{outlet}}
- <LinkTo @tagName='li' @route='index'>
- <LinkTo id='index-link' @route='index'>Index</LinkTo>
- </LinkTo>
- <LinkTo @tagName='li' @route='parent-route.about'>
- <LinkTo id='about-link' @route='parent-route.about'>About</LinkTo>
- </LinkTo>
- <LinkTo @tagName='li' @route='parent-route.other'>
- <LinkTo id='other-link' @route='parent-route.other'>Other</LinkTo>
- </LinkTo>
- `
- );
- }
-
- async beforeEach() {
- return expectDeprecationAsync(
- () => this.visit('/'),
- /Passing the `@tagName` argument to <LinkTo> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
- }
-
- resolveAbout() {
- return runTask(() => {
- this.aboutDefer.resolve();
- this.aboutDefer = RSVP.defer();
- });
- }
-
- resolveOther() {
- return runTask(() => {
- this.otherDefer.resolve();
- this.otherDefer = RSVP.defer();
- });
- }
-
- teardown() {
- super.teardown();
- this.aboutDefer = null;
- this.otherDefer = null;
- }
-
- [`@test while a transition is underway with nested link-to's`](assert) {
- // TODO undo changes to this test but currently this test navigates away if navigation
- // outlet is not stable and the second $about.click() is triggered.
- let $about = this.$('#about-link');
-
- runTask(() => $about.click());
-
- let $index = this.$('#index-link');
- $about = this.$('#about-link');
- let $other = this.$('#other-link');
-
- assertHasClass(assert, $index, 'active');
- assertHasNoClass(assert, $about, 'active');
- assertHasNoClass(assert, $about, 'active');
-
- assertHasNoClass(assert, $index, 'ember-transitioning-in');
- assertHasClass(assert, $about, 'ember-transitioning-in');
- assertHasNoClass(assert, $other, 'ember-transitioning-in');
-
- assertHasClass(assert, $index, 'ember-transitioning-out');
- assertHasNoClass(assert, $about, 'ember-transitioning-out');
- assertHasNoClass(assert, $other, 'ember-transitioning-out');
-
- this.resolveAbout();
-
- $index = this.$('#index-link');
- $about = this.$('#about-link');
- $other = this.$('#other-link');
-
- assertHasNoClass(assert, $index, 'active');
- assertHasClass(assert, $about, 'active');
- assertHasNoClass(assert, $other, 'active');
-
- assertHasNoClass(assert, $index, 'ember-transitioning-in');
- assertHasNoClass(assert, $about, 'ember-transitioning-in');
- assertHasNoClass(assert, $other, 'ember-transitioning-in');
-
- assertHasNoClass(assert, $index, 'ember-transitioning-out');
- assertHasNoClass(assert, $about, 'ember-transitioning-out');
- assertHasNoClass(assert, $other, 'ember-transitioning-out');
-
- runTask(() => $other.click());
-
- $index = this.$('#index-link');
- $about = this.$('#about-link');
- $other = this.$('#other-link');
-
- assertHasNoClass(assert, $index, 'active');
- assertHasClass(assert, $about, 'active');
- assertHasNoClass(assert, $other, 'active');
-
- assertHasNoClass(assert, $index, 'ember-transitioning-in');
- assertHasNoClass(assert, $about, 'ember-transitioning-in');
- assertHasClass(assert, $other, 'ember-transitioning-in');
-
- assertHasNoClass(assert, $index, 'ember-transitioning-out');
- assertHasClass(assert, $about, 'ember-transitioning-out');
- assertHasNoClass(assert, $other, 'ember-transitioning-out');
-
- this.resolveOther();
-
- $index = this.$('#index-link');
- $about = this.$('#about-link');
- $other = this.$('#other-link');
-
- assertHasNoClass(assert, $index, 'active');
- assertHasNoClass(assert, $about, 'active');
- assertHasClass(assert, $other, 'active');
-
- assertHasNoClass(assert, $index, 'ember-transitioning-in');
- assertHasNoClass(assert, $about, 'ember-transitioning-in');
- assertHasNoClass(assert, $other, 'ember-transitioning-in');
-
- assertHasNoClass(assert, $index, 'ember-transitioning-out');
- assertHasNoClass(assert, $about, 'ember-transitioning-out');
- assertHasNoClass(assert, $other, 'ember-transitioning-out');
-
- runTask(() => $about.click());
-
- $index = this.$('#index-link');
- $about = this.$('#about-link');
- $other = this.$('#other-link');
-
- assertHasNoClass(assert, $index, 'active');
- assertHasNoClass(assert, $about, 'active');
- assertHasClass(assert, $other, 'active');
-
- assertHasNoClass(assert, $index, 'ember-transitioning-in');
- assertHasClass(assert, $about, 'ember-transitioning-in');
- assertHasNoClass(assert, $other, 'ember-transitioning-in');
-
- assertHasNoClass(assert, $index, 'ember-transitioning-out');
- assertHasNoClass(assert, $about, 'ember-transitioning-out');
- assertHasClass(assert, $other, 'ember-transitioning-out');
-
- this.resolveAbout();
-
- $index = this.$('#index-link');
- $about = this.$('#about-link');
- $other = this.$('#other-link');
-
- assertHasNoClass(assert, $index, 'active');
- assertHasClass(assert, $about, 'active');
- assertHasNoClass(assert, $other, 'active');
-
- assertHasNoClass(assert, $index, 'ember-transitioning-in');
- assertHasNoClass(assert, $about, 'ember-transitioning-in');
- assertHasNoClass(assert, $other, 'ember-transitioning-in');
-
- assertHasNoClass(assert, $index, 'ember-transitioning-out');
- assertHasNoClass(assert, $about, 'ember-transitioning-out');
- assertHasNoClass(assert, $other, 'ember-transitioning-out');
- }
- }
-); | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/glimmer/tests/integration/components/link-to/transitioning-classes-curly-test.js | @@ -1,6 +1,5 @@
import { RSVP } from '@ember/-internals/runtime';
import { Route } from '@ember/-internals/routing';
-import { EMBER_MODERNIZED_BUILT_IN_COMPONENTS } from '@ember/canary-features';
import { moduleFor, ApplicationTestCase, runTask } from 'internal-test-helpers';
function assertHasClass(assert, selector, label) {
@@ -151,198 +150,3 @@ moduleFor(
}
}
);
-
-moduleFor(
- `{{link-to}} component: [DEPRECATED] .transitioning-in .transitioning-out CSS classes - nested link-to's`,
- class extends ApplicationTestCase {
- constructor(...args) {
- super(...args);
-
- this.aboutDefer = RSVP.defer();
- this.otherDefer = RSVP.defer();
- let _this = this;
-
- this.router.map(function () {
- this.route('parent-route', function () {
- this.route('about');
- this.route('other');
- });
- });
- this.add(
- 'route:parent-route.about',
- class extends Route {
- model() {
- return _this.aboutDefer.promise;
- }
- }
- );
-
- this.add(
- 'route:parent-route.other',
- class extends Route {
- model() {
- return _this.otherDefer.promise;
- }
- }
- );
-
- this.addTemplate(
- 'application',
- `
- {{outlet}}
- {{#link-to route='index' tagName='li'}}
- <div id='index-link'>{{#link-to route='index'}}Index{{/link-to}}</div>
- {{/link-to}}
- {{#link-to route='parent-route.about' tagName='li'}}
- <div id='about-link'>{{#link-to route='parent-route.about'}}About{{/link-to}}</div>
- {{/link-to}}
- {{#link-to route='parent-route.other' tagName='li'}}
- <div id='other-link'>{{#link-to route='parent-route.other'}}Other{{/link-to}}</div>
- {{/link-to}}
- `
- );
- }
-
- async beforeEach() {
- return expectDeprecationAsync(
- () => this.visit('/'),
- /Passing the `@tagName` argument to <LinkTo> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
- }
-
- resolveAbout() {
- return runTask(() => {
- this.aboutDefer.resolve();
- this.aboutDefer = RSVP.defer();
- });
- }
-
- resolveOther() {
- return runTask(() => {
- this.otherDefer.resolve();
- this.otherDefer = RSVP.defer();
- });
- }
-
- teardown() {
- super.teardown();
- this.aboutDefer = null;
- this.otherDefer = null;
- }
-
- [`@test while a transition is underway with nested link-to's`](assert) {
- // TODO undo changes to this test but currently this test navigates away if navigation
- // outlet is not stable and the second $about.click() is triggered.
- let $about = this.$('#about-link > a');
-
- runTask(() => $about.click());
-
- let $index = this.$('#index-link > a');
- $about = this.$('#about-link > a');
- let $other = this.$('#other-link > a');
-
- assertHasClass(assert, $index, 'active');
- assertHasNoClass(assert, $about, 'active');
- assertHasNoClass(assert, $about, 'active');
-
- assertHasNoClass(assert, $index, 'ember-transitioning-in');
- assertHasClass(assert, $about, 'ember-transitioning-in');
- assertHasNoClass(assert, $other, 'ember-transitioning-in');
-
- assertHasClass(assert, $index, 'ember-transitioning-out');
- assertHasNoClass(assert, $about, 'ember-transitioning-out');
- assertHasNoClass(assert, $other, 'ember-transitioning-out');
-
- this.resolveAbout();
-
- $index = this.$('#index-link > a');
- $about = this.$('#about-link > a');
- $other = this.$('#other-link > a');
-
- assertHasNoClass(assert, $index, 'active');
- assertHasClass(assert, $about, 'active');
- assertHasNoClass(assert, $other, 'active');
-
- assertHasNoClass(assert, $index, 'ember-transitioning-in');
- assertHasNoClass(assert, $about, 'ember-transitioning-in');
- assertHasNoClass(assert, $other, 'ember-transitioning-in');
-
- assertHasNoClass(assert, $index, 'ember-transitioning-out');
- assertHasNoClass(assert, $about, 'ember-transitioning-out');
- assertHasNoClass(assert, $other, 'ember-transitioning-out');
-
- runTask(() => $other.click());
-
- $index = this.$('#index-link > a');
- $about = this.$('#about-link > a');
- $other = this.$('#other-link > a');
-
- assertHasNoClass(assert, $index, 'active');
- assertHasClass(assert, $about, 'active');
- assertHasNoClass(assert, $other, 'active');
-
- assertHasNoClass(assert, $index, 'ember-transitioning-in');
- assertHasNoClass(assert, $about, 'ember-transitioning-in');
- assertHasClass(assert, $other, 'ember-transitioning-in');
-
- assertHasNoClass(assert, $index, 'ember-transitioning-out');
- assertHasClass(assert, $about, 'ember-transitioning-out');
- assertHasNoClass(assert, $other, 'ember-transitioning-out');
-
- this.resolveOther();
-
- $index = this.$('#index-link > a');
- $about = this.$('#about-link > a');
- $other = this.$('#other-link > a');
-
- assertHasNoClass(assert, $index, 'active');
- assertHasNoClass(assert, $about, 'active');
- assertHasClass(assert, $other, 'active');
-
- assertHasNoClass(assert, $index, 'ember-transitioning-in');
- assertHasNoClass(assert, $about, 'ember-transitioning-in');
- assertHasNoClass(assert, $other, 'ember-transitioning-in');
-
- assertHasNoClass(assert, $index, 'ember-transitioning-out');
- assertHasNoClass(assert, $about, 'ember-transitioning-out');
- assertHasNoClass(assert, $other, 'ember-transitioning-out');
-
- runTask(() => $about.click());
-
- $index = this.$('#index-link > a');
- $about = this.$('#about-link > a');
- $other = this.$('#other-link > a');
-
- assertHasNoClass(assert, $index, 'active');
- assertHasNoClass(assert, $about, 'active');
- assertHasClass(assert, $other, 'active');
-
- assertHasNoClass(assert, $index, 'ember-transitioning-in');
- assertHasClass(assert, $about, 'ember-transitioning-in');
- assertHasNoClass(assert, $other, 'ember-transitioning-in');
-
- assertHasNoClass(assert, $index, 'ember-transitioning-out');
- assertHasNoClass(assert, $about, 'ember-transitioning-out');
- assertHasClass(assert, $other, 'ember-transitioning-out');
-
- this.resolveAbout();
-
- $index = this.$('#index-link > a');
- $about = this.$('#about-link > a');
- $other = this.$('#other-link > a');
-
- assertHasNoClass(assert, $index, 'active');
- assertHasClass(assert, $about, 'active');
- assertHasNoClass(assert, $other, 'active');
-
- assertHasNoClass(assert, $index, 'ember-transitioning-in');
- assertHasNoClass(assert, $about, 'ember-transitioning-in');
- assertHasNoClass(assert, $other, 'ember-transitioning-in');
-
- assertHasNoClass(assert, $index, 'ember-transitioning-out');
- assertHasNoClass(assert, $about, 'ember-transitioning-out');
- assertHasNoClass(assert, $other, 'ember-transitioning-out');
- }
- }
-); | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/glimmer/tests/integration/components/strict-mode-test.js | @@ -8,7 +8,8 @@ import {
} from 'internal-test-helpers';
import { EMBER_STRICT_MODE } from '@ember/canary-features';
-import { Input, LinkComponent as LinkTo, TextArea } from '@ember/-internals/glimmer';
+import { Input, Textarea } from '@ember/component';
+import { LinkTo } from '@ember/routing';
import { hash, array, concat, get, on, fn } from '@glimmer/runtime';
import GlimmerishComponent from '../../utils/glimmerish-component';
@@ -178,8 +179,8 @@ if (EMBER_STRICT_MODE) {
this.assertStableRerender();
}
- '@test Can use TextArea'() {
- let Foo = defineComponent({ TextArea }, '<TextArea/>');
+ '@test Can use Textarea'() {
+ let Foo = defineComponent({ Textarea }, '<Textarea/>');
this.registerComponent('foo', { ComponentClass: Foo });
@@ -274,7 +275,7 @@ if (EMBER_STRICT_MODE) {
return this.visit('/').then(() => {
this.assertComponentElement(this.firstChild, {
tagName: 'a',
- attrs: { href: '/', class: 'active ember-view' },
+ attrs: { href: '/', class: 'ember-view active' },
content: 'Index',
});
}); | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/glimmer/tests/integration/components/textarea-angle-test.js | @@ -1,7 +1,5 @@
import { RenderingTestCase, moduleFor, classes, applyMixins, runTask } from 'internal-test-helpers';
-import { EMBER_MODERNIZED_BUILT_IN_COMPONENTS } from '@ember/canary-features';
-import { action } from '@ember/object';
import { set } from '@ember/-internals/metal';
class TextAreaRenderingTest extends RenderingTestCase {
@@ -31,7 +29,7 @@ class BoundTextAreaAttributes {
this.cases = cases;
}
- generate({ attribute, argument = attribute, first, second }) {
+ generate({ attribute, first, second }) {
return {
[`@test ${attribute} (HTML attribute)`]() {
this.render(`<Textarea ${attribute}={{this.value}} />`, {
@@ -47,43 +45,14 @@ class BoundTextAreaAttributes {
runTask(() => set(this.context, 'value', first));
this.assertTextArea({ attrs: { [attribute]: first } });
},
-
- [`@test [DEPRECATED] @${argument} (named argument)`]() {
- let deprecation = new RegExp(
- `Passing the \`@${argument}\` argument to <Textarea> is deprecated\\.`
- );
-
- expectDeprecation(
- () => this.render(`<Textarea @${argument}={{this.value}} />`, { value: first }),
- deprecation,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
- this.assertTextArea({ attrs: { [attribute]: first } });
-
- this.assertStableRerender();
-
- expectDeprecation(
- () => runTask(() => set(this.context, 'value', second)),
- deprecation,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
- this.assertTextArea({ attrs: { [attribute]: second } });
-
- expectDeprecation(
- () => runTask(() => set(this.context, 'value', first)),
- deprecation,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
- this.assertTextArea({ attrs: { [attribute]: first } });
- },
};
}
}
applyMixins(
TextAreaRenderingTest,
new BoundTextAreaAttributes([
- { attribute: 'role', argument: 'ariaRole', first: 'textbox', second: 'search' },
+ { attribute: 'role', first: 'textbox', second: 'search' },
{ attribute: 'placeholder', first: 'Stuff here', second: 'Other stuff' },
{ attribute: 'name', first: 'Stuff here', second: 'Other stuff' },
{ attribute: 'title', first: 'Stuff here', second: 'Other stuff' },
@@ -111,47 +80,20 @@ moduleFor(
this.assertStableRerender();
}
- ['@test [DEPRECATED] Supports @elementId (named argument)'](assert) {
- expectDeprecation(
- () => this.render('<Textarea @elementId="test-textarea" />'),
- /Passing the `@elementId` argument to <Textarea> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
- assert.equal(this.$('textarea').attr('id'), 'test-textarea');
- }
-
['@test Should respect disabled (HTML attribute)'](assert) {
this.render('<Textarea disabled={{this.disabled}} />', {
disabled: true,
});
assert.ok(this.$('textarea').is(':disabled'));
}
- ['@test [DEPRECATED] Should respect @disabled (named argument)'](assert) {
- expectDeprecation(
- () => this.render('<Textarea @disabled={{this.disabled}} />', { disabled: true }),
- /Passing the `@disabled` argument to <Textarea> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
- assert.ok(this.$('textarea').is(':disabled'));
- }
-
['@test Should respect disabled (HTML attribute) when false'](assert) {
this.render('<Textarea disabled={{this.disabled}} />', {
disabled: false,
});
assert.ok(this.$('textarea').is(':not(:disabled)'));
}
- ['@test [DEPRECATED] Should respect @disabled (named argument) when false'](assert) {
- expectDeprecation(
- () => this.render('<Textarea @disabled={{this.disabled}} />', { disabled: false }),
- /Passing the `@disabled` argument to <Textarea> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
- assert.ok(this.$('textarea').is(':not(:disabled)'));
- }
-
['@test Should become disabled (HTML attribute) when the context changes'](assert) {
this.render('<Textarea disabled={{this.disabled}} />');
assert.ok(this.$('textarea').is(':not(:disabled)'));
@@ -165,33 +107,6 @@ moduleFor(
assert.ok(this.$('textarea').is(':not(:disabled)'));
}
- ['@test [DEPRECATED] Should become @disabled (named argument) when the context changes'](
- assert
- ) {
- expectDeprecation(
- () => this.render('<Textarea @disabled={{this.disabled}} />'),
- /Passing the `@disabled` argument to <Textarea> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
- assert.ok(this.$('textarea').is(':not(:disabled)'));
-
- this.assertStableRerender();
-
- expectDeprecation(
- () => runTask(() => set(this.context, 'disabled', true)),
- /Passing the `@disabled` argument to <Textarea> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
- assert.ok(this.$('textarea').is(':disabled'));
-
- expectDeprecation(
- () => runTask(() => set(this.context, 'disabled', false)),
- /Passing the `@disabled` argument to <Textarea> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
- assert.ok(this.$('textarea').is(':not(:disabled)'));
- }
-
['@test Should bind its contents to the specified @value']() {
this.render('<Textarea @value={{this.model.val}} />', {
model: { val: 'A beautiful day in Seattle' },
@@ -252,21 +167,5 @@ moduleFor(
runTask(() => set(this.context, 'model', { val: 'A beautiful day in Seattle' }));
this.assertTextArea({ value: 'A beautiful day in Seattle' });
}
-
- ['@test triggers a method with `<Textarea @key-up={{this.didTrigger}} />`'](assert) {
- expectDeprecation(
- () => {
- this.render(`<Textarea @key-up={{this.didTrigger}} />`, {
- didTrigger: action(function () {
- assert.ok(true, 'action was triggered');
- }),
- });
- },
- /Passing the `@key-up` argument to <Textarea> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- this.triggerEvent('keyup', { key: 'A' });
- }
}
); | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/glimmer/tests/integration/components/textarea-curly-test.js | @@ -1,7 +1,5 @@
-import { RenderingTestCase, moduleFor, classes, applyMixins, runTask } from 'internal-test-helpers';
+import { RenderingTestCase, moduleFor, classes, runTask } from 'internal-test-helpers';
-import { EMBER_MODERNIZED_BUILT_IN_COMPONENTS } from '@ember/canary-features';
-import { action } from '@ember/object';
import { set } from '@ember/-internals/metal';
class TextAreaRenderingTest extends RenderingTestCase {
@@ -26,59 +24,6 @@ class TextAreaRenderingTest extends RenderingTestCase {
}
}
-class BoundTextAreaAttributes {
- constructor(cases) {
- this.cases = cases;
- }
-
- generate({ attribute, argument = attribute, first, second }) {
- return {
- [`@test [DEPRECATED] ${argument}`]() {
- let deprecation = new RegExp(
- `Passing the \`@${argument}\` argument to <Textarea> is deprecated\\.`
- );
-
- expectDeprecation(
- () => this.render(`{{textarea ${argument}=this.value}}`, { value: first }),
- deprecation,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
- this.assertTextArea({ attrs: { [attribute]: first } });
-
- this.assertStableRerender();
-
- expectDeprecation(
- () => runTask(() => set(this.context, 'value', second)),
- deprecation,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
- this.assertTextArea({ attrs: { [attribute]: second } });
-
- expectDeprecation(
- () => runTask(() => set(this.context, 'value', first)),
- deprecation,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
- this.assertTextArea({ attrs: { [attribute]: first } });
- },
- };
- }
-}
-
-applyMixins(
- TextAreaRenderingTest,
- new BoundTextAreaAttributes([
- { attribute: 'role', argument: 'ariaRole', first: 'textbox', second: 'search' },
- { attribute: 'placeholder', first: 'Stuff here', second: 'Other stuff' },
- { attribute: 'name', first: 'Stuff here', second: 'Other stuff' },
- { attribute: 'title', first: 'Stuff here', second: 'Other stuff' },
- { attribute: 'maxlength', first: '1', second: '2' },
- { attribute: 'rows', first: '1', second: '2' },
- { attribute: 'cols', first: '1', second: '2' },
- { attribute: 'tabindex', first: '1', second: '2' },
- ])
-);
-
moduleFor(
'Components test: {{textarea}}',
class extends TextAreaRenderingTest {
@@ -90,58 +35,6 @@ moduleFor(
this.assertStableRerender();
}
- ['@test [DEPRECATED] Supports elementId'](assert) {
- expectDeprecation(
- () => this.render('{{textarea elementId="test-textarea"}}'),
- /Passing the `@elementId` argument to <Textarea> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
- assert.equal(this.$('textarea').attr('id'), 'test-textarea');
- }
-
- ['@test [DEPRECATED] Should respect disabled'](assert) {
- expectDeprecation(
- () => this.render('{{textarea disabled=this.disabled}}', { disabled: true }),
- /Passing the `@disabled` argument to <Textarea> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
- assert.ok(this.$('textarea').is(':disabled'));
- }
-
- ['@test [DEPRECATED] Should respect disabled when false'](assert) {
- expectDeprecation(
- () => this.render('{{textarea disabled=this.disabled}}', { disabled: false }),
- /Passing the `@disabled` argument to <Textarea> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
- assert.ok(this.$('textarea').is(':not(:disabled)'));
- }
-
- ['@test [DEPRECATED] Should become disabled when the context changes'](assert) {
- expectDeprecation(
- () => this.render('{{textarea disabled=this.disabled}}'),
- /Passing the `@disabled` argument to <Textarea> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
- assert.ok(this.$('textarea').is(':not(:disabled)'));
-
- this.assertStableRerender();
-
- expectDeprecation(
- () => runTask(() => set(this.context, 'disabled', true)),
- /Passing the `@disabled` argument to <Textarea> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
- assert.ok(this.$('textarea').is(':disabled'));
-
- expectDeprecation(
- () => runTask(() => set(this.context, 'disabled', false)),
- /Passing the `@disabled` argument to <Textarea> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
- assert.ok(this.$('textarea').is(':not(:disabled)'));
- }
-
['@test Should bind its contents to the specified value']() {
this.render('{{textarea value=this.model.val}}', {
model: { val: 'A beautiful day in Seattle' },
@@ -202,21 +95,5 @@ moduleFor(
runTask(() => set(this.context, 'model', { val: 'A beautiful day in Seattle' }));
this.assertTextArea({ value: 'A beautiful day in Seattle' });
}
-
- ['@test triggers a method with `{{textarea key-up=this.didTrigger}}`'](assert) {
- expectDeprecation(
- () => {
- this.render(`{{textarea key-up=this.didTrigger}}`, {
- didTrigger: action(function () {
- assert.ok(true, 'action was triggered');
- }),
- });
- },
- /Passing the `@key-up` argument to <Textarea> is deprecated\./,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- );
-
- this.triggerEvent('keyup', { key: 'A' });
- }
}
); | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/glimmer/tests/integration/components/to-string-test.js | @@ -1,28 +1,12 @@
import { moduleFor, RenderingTestCase } from 'internal-test-helpers';
-import { Checkbox, Component, LinkComponent, TextArea, TextField } from '@ember/-internals/glimmer';
+import { Component } from '@ember/-internals/glimmer';
moduleFor(
'built-in component toString',
class AbstractAppendTest extends RenderingTestCase {
- '@test text-field has the correct toString value'(assert) {
- assert.strictEqual(TextField.toString(), '@ember/component/text-field');
- }
-
- '@test checkbox has the correct toString value'(assert) {
- assert.strictEqual(Checkbox.toString(), '@ember/component/checkbox');
- }
-
- '@test text-area has the correct toString value'(assert) {
- assert.strictEqual(TextArea.toString(), '@ember/component/text-area');
- }
-
'@test component has the correct toString value'(assert) {
assert.strictEqual(Component.toString(), '@ember/component');
}
-
- '@test LinkTo has the correct toString value'(assert) {
- assert.strictEqual(LinkComponent.toString(), '@ember/routing/link-component');
- }
}
); | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/glimmer/tests/utils/helpers.js | @@ -5,7 +5,6 @@ export {
Helper,
helper,
Component,
- LinkComponent,
InteractiveRenderer,
InertRenderer,
htmlSafe, | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/metal/lib/mixin.ts | @@ -12,7 +12,6 @@ import {
setObservers,
wrap,
} from '@ember/-internals/utils';
-import { EMBER_MODERNIZED_BUILT_IN_COMPONENTS } from '@ember/canary-features';
import { assert } from '@ember/debug';
import { DEBUG } from '@glimmer/env';
import { _WeakSet } from '@glimmer/util';
@@ -551,7 +550,7 @@ export default class Mixin {
*/
guidFor(this);
- if (EMBER_MODERNIZED_BUILT_IN_COMPONENTS && Mixin._disableDebugSeal !== true) {
+ if (Mixin._disableDebugSeal !== true) {
Object.seal(this);
}
}
@@ -665,7 +664,7 @@ export default class Mixin {
}
}
-if (DEBUG && EMBER_MODERNIZED_BUILT_IN_COMPONENTS) {
+if (DEBUG) {
Object.defineProperty(Mixin, '_disableDebugSeal', {
configurable: true,
enumerable: false, | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/routing/lib/services/routing.ts | @@ -12,7 +12,7 @@ import RouterState from '../system/router_state';
const ROUTER = (symbol('ROUTER') as unknown) as string;
/**
- The Routing service is used by LinkComponent, and provides facilities for
+ The Routing service is used by LinkTo, and provides facilities for
the component/view layer to interact with the router.
This is a private service for internal usage only. For public usage, | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/runtime/lib/mixins/target_action_support.js | @@ -4,14 +4,9 @@
import { context } from '@ember/-internals/environment';
import { get, Mixin, computed } from '@ember/-internals/metal';
-import { EMBER_MODERNIZED_BUILT_IN_COMPONENTS } from '@ember/canary-features';
-import { assert, deprecate } from '@ember/debug';
+import { assert } from '@ember/debug';
import { DEBUG } from '@glimmer/env';
-if (DEBUG && EMBER_MODERNIZED_BUILT_IN_COMPONENTS) {
- Mixin._disableDebugSeal = true;
-}
-
/**
`Ember.TargetActionSupport` is a mixin that can be included in a class
to add a `triggerAction` method with semantics similar to the Handlebars
@@ -153,41 +148,8 @@ function getTarget(instance) {
return null;
}
-if (EMBER_MODERNIZED_BUILT_IN_COMPONENTS) {
- Object.defineProperty(TargetActionSupport, '_wasReopened', {
- configurable: true,
- enumerable: false,
- writable: true,
- value: false,
- });
-
- Object.defineProperty(TargetActionSupport, 'reopen', {
- configurable: true,
- enumerable: false,
- writable: true,
- value: function reopen(...args) {
- if (this === TargetActionSupport) {
- deprecate('Reopening Ember.TargetActionSupport is deprecated.', false, {
- id: 'ember.built-in-components.reopen',
- for: 'ember-source',
- since: {
- enabled: '3.27.0',
- },
- until: '4.0.0',
- url: 'https://deprecations.emberjs.com/v3.x#toc_ember-built-in-components-reopen',
- });
-
- TargetActionSupport._wasReopened = true;
- }
-
- return Mixin.prototype.reopen.call(this, ...args);
- },
- });
-
- if (DEBUG) {
- Object.seal(TargetActionSupport);
- Mixin._disableDebugSeal = false;
- }
+if (DEBUG) {
+ Object.seal(TargetActionSupport);
}
export default TargetActionSupport; | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/views/index.d.ts | @@ -8,7 +8,6 @@ export const ClassNamesSupport: any;
export const CoreView: any;
export const ViewMixin: any;
export const ViewStateSupport: any;
-export const TextSupport: any;
export function getElementView(element: SimpleElement): unknown;
export function getViewElement(view: unknown): Option<SimpleElement>; | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/views/index.js | @@ -17,7 +17,6 @@ export {
} from './lib/system/utils';
export { default as EventDispatcher } from './lib/system/event_dispatcher';
export { default as ComponentLookup } from './lib/component_lookup';
-export { default as TextSupport } from './lib/mixins/text_support';
export { default as CoreView } from './lib/views/core_view';
export { default as ClassNamesSupport } from './lib/mixins/class_names_support';
export { default as ChildViewsSupport } from './lib/mixins/child_views_support'; | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/-internals/views/lib/mixins/text_support.js | @@ -1,375 +0,0 @@
-/**
-@module ember
-*/
-
-import { get, set, Mixin } from '@ember/-internals/metal';
-import { EMBER_MODERNIZED_BUILT_IN_COMPONENTS } from '@ember/canary-features';
-import { deprecate } from '@ember/debug';
-import { MUTABLE_CELL } from '@ember/-internals/views';
-import { DEBUG } from '@glimmer/env';
-
-if (DEBUG && EMBER_MODERNIZED_BUILT_IN_COMPONENTS) {
- Mixin._disableDebugSeal = true;
-}
-
-const KEY_EVENTS = {
- Enter: 'insertNewline',
- Escape: 'cancel',
-};
-
-/**
- `TextSupport` is a shared mixin used by both `TextField` and
- `TextArea`. `TextSupport` adds a number of methods that allow you to
- specify a controller action to invoke when a certain event is fired on your
- text field or textarea. The specified controller action would get the current
- value of the field passed in as the only argument unless the value of
- the field is empty. In that case, the instance of the field itself is passed
- in as the only argument.
-
- Let's use the pressing of the escape key as an example. If you wanted to
- invoke a controller action when a user presses the escape key while on your
- field, you would use the `escape-press` attribute on your field like so:
-
- ```handlebars
- {{! application.hbs}}
-
- {{input escape-press='alertUser'}}
- ```
-
- ```javascript
- import Application from '@ember/application';
- import Controller from '@ember/controller';
- App = Application.create();
-
- App.ApplicationController = Controller.extend({
- actions: {
- alertUser: function ( currentValue ) {
- alert( 'escape pressed, current value: ' + currentValue );
- }
- }
- });
- ```
-
- The following chart is a visual representation of what takes place when the
- escape key is pressed in this scenario:
-
- ```
- The Template
- +---------------------------+
- | |
- | escape-press='alertUser' |
- | | TextSupport Mixin
- +----+----------------------+ +-------------------------------+
- | | cancel method |
- | escape button pressed | |
- +-------------------------------> | checks for the `escape-press` |
- | attribute and pulls out the |
- +-------------------------------+ | `alertUser` value |
- | action name 'alertUser' +-------------------------------+
- | sent to controller
- v
- Controller
- +------------------------------------------ +
- | |
- | actions: { |
- | alertUser: function( currentValue ){ |
- | alert( 'the esc key was pressed!' ) |
- | } |
- | } |
- | |
- +-------------------------------------------+
- ```
-
- Here are the events that we currently support along with the name of the
- attribute you would need to use on your field. To reiterate, you would use the
- attribute name like so:
-
- ```handlebars
- {{input attribute-name='controllerAction'}}
- ```
-
- ```
- +--------------------+----------------+
- | | |
- | event | attribute name |
- +--------------------+----------------+
- | new line inserted | insert-newline |
- | | |
- | enter key pressed | enter |
- | | |
- | cancel key pressed | escape-press |
- | | |
- | focusin | focus-in |
- | | |
- | focusout | focus-out |
- | | |
- | keypress | key-press |
- | | |
- | keyup | key-up |
- | | |
- | keydown | key-down |
- +--------------------+----------------+
- ```
-
- @class TextSupport
- @namespace Ember
- @uses Ember.TargetActionSupport
- @extends Mixin
- @private
-*/
-const TextSupport = Mixin.create({
- value: '',
-
- attributeBindings: [
- 'autocapitalize',
- 'autocorrect',
- 'autofocus',
- 'disabled',
- 'form',
- 'maxlength',
- 'minlength',
- 'placeholder',
- 'readonly',
- 'required',
- 'selectionDirection',
- 'spellcheck',
- 'tabindex',
- 'title',
- ],
- placeholder: null,
- disabled: false,
- maxlength: null,
-
- /**
- Whether the `keyUp` event that triggers an `action` to be sent continues
- propagating to other views.
-
- By default, when the user presses the return key on their keyboard and
- the text field has an `action` set, the action will be sent to the view's
- controller and the key event will stop propagating.
-
- If you would like parent views to receive the `keyUp` event even after an
- action has been dispatched, set `bubbles` to true.
-
- @property bubbles
- @type Boolean
- @default false
- @private
- */
- bubbles: false,
-
- interpretKeyEvents(event) {
- let method = KEY_EVENTS[event.key];
-
- this._elementValueDidChange();
- if (method) {
- return this[method](event);
- }
- },
-
- _elementValueDidChange() {
- set(this, 'value', this.element.value);
- },
-
- change(event) {
- this._elementValueDidChange(event);
- },
-
- paste(event) {
- this._elementValueDidChange(event);
- },
-
- cut(event) {
- this._elementValueDidChange(event);
- },
-
- input(event) {
- this._elementValueDidChange(event);
- },
-
- /**
- Allows you to specify a controller action to invoke when either the `enter`
- key is pressed or, in the case of the field being a textarea, when a newline
- is inserted. To use this method, give your field an `insert-newline`
- attribute. The value of that attribute should be the name of the action
- in your controller that you wish to invoke.
-
- For an example on how to use the `insert-newline` attribute, please
- reference the example near the top of this file.
-
- @method insertNewline
- @param {Event} event
- @private
- */
- insertNewline(event) {
- sendAction('enter', this, event);
- sendAction('insert-newline', this, event);
- },
-
- /**
- Allows you to specify a controller action to invoke when the escape button
- is pressed. To use this method, give your field an `escape-press`
- attribute. The value of that attribute should be the name of the action
- in your controller that you wish to invoke.
-
- For an example on how to use the `escape-press` attribute, please reference
- the example near the top of this file.
-
- @method cancel
- @param {Event} event
- @private
- */
- cancel(event) {
- sendAction('escape-press', this, event);
- },
-
- /**
- Allows you to specify a controller action to invoke when a field receives
- focus. To use this method, give your field a `focus-in` attribute. The value
- of that attribute should be the name of the action in your controller
- that you wish to invoke.
-
- For an example on how to use the `focus-in` attribute, please reference the
- example near the top of this file.
-
- @method focusIn
- @param {Event} event
- @private
- */
- focusIn(event) {
- sendAction('focus-in', this, event);
- },
-
- /**
- Allows you to specify a controller action to invoke when a field loses
- focus. To use this method, give your field a `focus-out` attribute. The value
- of that attribute should be the name of the action in your controller
- that you wish to invoke.
-
- For an example on how to use the `focus-out` attribute, please reference the
- example near the top of this file.
-
- @method focusOut
- @param {Event} event
- @private
- */
- focusOut(event) {
- this._elementValueDidChange(event);
- sendAction('focus-out', this, event);
- },
-
- /**
- Allows you to specify a controller action to invoke when a key is pressed.
- To use this method, give your field a `key-press` attribute. The value of
- that attribute should be the name of the action in your controller you
- that wish to invoke.
-
- For an example on how to use the `key-press` attribute, please reference the
- example near the top of this file.
-
- @method keyPress
- @param {Event} event
- @private
- */
- keyPress(event) {
- sendAction('key-press', this, event);
- },
-
- /**
- Allows you to specify a controller action to invoke when a key-up event is
- fired. To use this method, give your field a `key-up` attribute. The value
- of that attribute should be the name of the action in your controller
- that you wish to invoke.
-
- For an example on how to use the `key-up` attribute, please reference the
- example near the top of this file.
-
- @method keyUp
- @param {Event} event
- @private
- */
- keyUp(event) {
- this.interpretKeyEvents(event);
- sendAction('key-up', this, event);
- },
-
- /**
- Allows you to specify a controller action to invoke when a key-down event is
- fired. To use this method, give your field a `key-down` attribute. The value
- of that attribute should be the name of the action in your controller that
- you wish to invoke.
-
- For an example on how to use the `key-down` attribute, please reference the
- example near the top of this file.
-
- @method keyDown
- @param {Event} event
- @private
- */
- keyDown(event) {
- sendAction('key-down', this, event);
- },
-});
-
-// In principle, this shouldn't be necessary, but the legacy
-// sendAction semantics for TextField are different from
-// the component semantics so this method normalizes them.
-function sendAction(eventName, view, event) {
- let action = get(view, `attrs.${eventName}`);
- if (action !== null && typeof action === 'object' && action[MUTABLE_CELL] === true) {
- action = action.value;
- }
-
- if (action === undefined) {
- action = get(view, eventName);
- }
-
- let value = get(view, 'value');
-
- if (typeof action === 'function') {
- action(value, event);
- }
-
- if (action && !get(view, 'bubbles')) {
- event.stopPropagation();
- }
-}
-
-if (EMBER_MODERNIZED_BUILT_IN_COMPONENTS) {
- Object.defineProperty(TextSupport, '_wasReopened', {
- configurable: true,
- enumerable: false,
- writable: true,
- value: false,
- });
-
- Object.defineProperty(TextSupport, 'reopen', {
- configurable: true,
- enumerable: false,
- writable: true,
- value: function reopen(...args) {
- if (this === TextSupport) {
- deprecate('Reopening Ember.TextSupport is deprecated.', false, {
- id: 'ember.built-in-components.reopen',
- for: 'ember-source',
- since: {
- enabled: '3.27.0',
- },
- until: '4.0.0',
- url: 'https://deprecations.emberjs.com/v3.x#toc_ember-built-in-components-reopen',
- });
-
- TextSupport._wasReopened = true;
- }
-
- return Mixin.prototype.reopen.call(this, ...args);
- },
- });
-
- if (DEBUG) {
- Object.seal(TextSupport);
- Mixin._disableDebugSeal = false;
- }
-}
-
-export default TextSupport; | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/application/tests/application_test.js | @@ -131,8 +131,6 @@ moduleFor(
verifyRegistration(assert, application, 'location:history');
verifyRegistration(assert, application, 'location:none');
- verifyRegistration(assert, application, 'component:-text-field');
- verifyRegistration(assert, application, 'component:-checkbox');
verifyRegistration(assert, application, 'component:link-to');
verifyRegistration(assert, application, 'component:textarea'); | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/canary-features/index.ts | @@ -17,7 +17,6 @@ export const DEFAULT_FEATURES = {
EMBER_NAMED_BLOCKS: true,
EMBER_GLIMMER_HELPER_MANAGER: true,
EMBER_GLIMMER_INVOKE_HELPER: true,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS: true,
EMBER_STRICT_MODE: true,
EMBER_DYNAMIC_HELPERS_AND_MODIFIERS: true,
EMBER_ROUTING_ROUTER_SERVICE_REFRESH: null,
@@ -75,9 +74,6 @@ export const EMBER_IMPROVED_INSTRUMENTATION = featureValue(FEATURES.EMBER_IMPROV
export const EMBER_NAMED_BLOCKS = featureValue(FEATURES.EMBER_NAMED_BLOCKS);
export const EMBER_GLIMMER_HELPER_MANAGER = featureValue(FEATURES.EMBER_GLIMMER_HELPER_MANAGER);
export const EMBER_GLIMMER_INVOKE_HELPER = featureValue(FEATURES.EMBER_GLIMMER_INVOKE_HELPER);
-export const EMBER_MODERNIZED_BUILT_IN_COMPONENTS = featureValue(
- FEATURES.EMBER_MODERNIZED_BUILT_IN_COMPONENTS
-);
export const EMBER_STRICT_MODE = featureValue(FEATURES.EMBER_STRICT_MODE);
export const EMBER_DYNAMIC_HELPERS_AND_MODIFIERS = featureValue(
FEATURES.EMBER_DYNAMIC_HELPERS_AND_MODIFIERS | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/component/checkbox.ts | @@ -1,22 +0,0 @@
-import { EMBER_MODERNIZED_BUILT_IN_COMPONENTS } from '@ember/canary-features';
-import { deprecate } from '@ember/debug';
-
-if (EMBER_MODERNIZED_BUILT_IN_COMPONENTS) {
- deprecate(
- `Using Ember.Checkbox or importing from 'Checkbox' has been deprecated, install the ` +
- `\`@ember/legacy-built-in-components\` addon and use \`import { Checkbox } from ` +
- `'@ember/legacy-built-in-components';\` instead`,
- false,
- {
- id: 'ember.built-in-components.import',
- until: '4.0.0',
- for: 'ember-source',
- since: {
- enabled: '3.27.0',
- },
- url: 'https://deprecations.emberjs.com/v3.x#toc_ember-built-in-components-import',
- }
- );
-}
-
-export { Checkbox as default } from '@ember/-internals/glimmer'; | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/component/index.ts | @@ -1,5 +1,5 @@
export { setComponentTemplate, getComponentTemplate } from '@glimmer/manager';
-export { Component as default, Input } from '@ember/-internals/glimmer';
+export { Component as default, Input, Textarea } from '@ember/-internals/glimmer';
export {
componentCapabilities as capabilities,
setComponentManager, | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/component/text-area.ts | @@ -1,22 +0,0 @@
-import { EMBER_MODERNIZED_BUILT_IN_COMPONENTS } from '@ember/canary-features';
-import { deprecate } from '@ember/debug';
-
-if (EMBER_MODERNIZED_BUILT_IN_COMPONENTS) {
- deprecate(
- `Using Ember.TextArea or importing from 'TextArea' has been deprecated, install the ` +
- `\`@ember/legacy-built-in-components\` addon and use \`import { TextArea } from ` +
- `'@ember/legacy-built-in-components';\` instead`,
- false,
- {
- id: 'ember.built-in-components.import',
- until: '4.0.0',
- for: 'ember-source',
- since: {
- enabled: '3.27.0',
- },
- url: 'https://deprecations.emberjs.com/v3.x#toc_ember-built-in-components-import',
- }
- );
-}
-
-export { TextArea as default } from '@ember/-internals/glimmer'; | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/component/text-field.ts | @@ -1,22 +0,0 @@
-import { EMBER_MODERNIZED_BUILT_IN_COMPONENTS } from '@ember/canary-features';
-import { deprecate } from '@ember/debug';
-
-if (EMBER_MODERNIZED_BUILT_IN_COMPONENTS) {
- deprecate(
- `Using Ember.TextField or importing from 'TextField' has been deprecated, install the ` +
- `\`@ember/legacy-built-in-components\` addon and use \`import { TextField } from ` +
- `'@ember/legacy-built-in-components';\` instead`,
- false,
- {
- id: 'ember.built-in-components.import',
- until: '4.0.0',
- for: 'ember-source',
- since: {
- enabled: '3.27.0',
- },
- url: 'https://deprecations.emberjs.com/v3.x#toc_ember-built-in-components-import',
- }
- );
-}
-
-export { TextField as default } from '@ember/-internals/glimmer'; | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/engine/tests/engine_test.js | @@ -60,8 +60,6 @@ moduleFor(
);
verifyRegistration(assert, engine, 'controller:basic');
- verifyRegistration(assert, engine, 'component:-text-field');
- verifyRegistration(assert, engine, 'component:-checkbox');
verifyRegistration(assert, engine, 'component:link-to');
verifyRegistration(assert, engine, 'component:textarea'); | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/routing/index.ts | @@ -1 +1 @@
-export { LinkComponent as LinkTo } from '@ember/-internals/glimmer';
+export { LinkTo } from '@ember/-internals/glimmer'; | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/@ember/routing/link-component.ts | @@ -1,22 +0,0 @@
-import { EMBER_MODERNIZED_BUILT_IN_COMPONENTS } from '@ember/canary-features';
-import { deprecate } from '@ember/debug';
-
-if (EMBER_MODERNIZED_BUILT_IN_COMPONENTS) {
- deprecate(
- `Using Ember.LinkComponent or importing from 'LinkComponent' has been deprecated, install the ` +
- `\`@ember/legacy-built-in-components\` addon and use \`import { LinkComponent } from ` +
- `'@ember/legacy-built-in-components';\` instead`,
- false,
- {
- id: 'ember.built-in-components.import',
- until: '4.0.0',
- for: 'ember-source',
- since: {
- enabled: '3.27.0',
- },
- url: 'https://deprecations.emberjs.com/v3.x#toc_ember-built-in-components-import',
- }
- );
-}
-
-export { LinkComponent as default } from '@ember/-internals/glimmer'; | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/ember-template-compiler/lib/plugins/index.ts | @@ -9,7 +9,6 @@ import TransformActionSyntax from './transform-action-syntax';
import TransformEachInIntoEach from './transform-each-in-into-each';
import TransformEachTrackArray from './transform-each-track-array';
import TransformInElement from './transform-in-element';
-import TransformLinkTo from './transform-link-to';
import TransformQuotedBindingsIntoJustBindings from './transform-quoted-bindings-into-just-bindings';
import TransformResolutions from './transform-resolutions';
import TransformWrapMountAndOutlet from './transform-wrap-mount-and-outlet';
@@ -24,7 +23,6 @@ export const RESOLUTION_MODE_TRANSFORMS = Object.freeze(
TransformActionSyntax,
AssertAgainstAttrs,
TransformEachInIntoEach,
- TransformLinkTo,
AssertInputHelperWithoutBlock,
TransformInElement,
AssertSplattributeExpressions, | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/ember-template-compiler/lib/plugins/transform-link-to.ts | @@ -1,245 +0,0 @@
-import { assert, deprecate } from '@ember/debug';
-import { AST, ASTPlugin } from '@glimmer/syntax';
-import calculateLocationDisplay from '../system/calculate-location-display';
-import { Builders, EmberASTPluginEnvironment } from '../types';
-import { isPath, isSubExpression } from './utils';
-
-function isInlineLinkTo(node: AST.MustacheStatement): boolean {
- return isPath(node.path) && node.path.original === 'link-to';
-}
-
-function isBlockLinkTo(node: AST.BlockStatement): boolean {
- return isPath(node.path) && node.path.original === 'link-to';
-}
-
-function isQueryParams(node: AST.Expression): node is AST.SubExpression {
- return isSubExpression(node) && isPath(node.path) && node.path.original === 'query-params';
-}
-
-function transformInlineLinkToIntoBlockForm(
- env: EmberASTPluginEnvironment,
- node: AST.MustacheStatement
-): AST.BlockStatement {
- let { builders: b } = env.syntax;
-
- return b.block(
- 'link-to',
- node.params.slice(1),
- node.hash,
- b.blockItself(
- [buildStatement(b, node.params[0], node.escaped, node.loc)],
- undefined,
- false,
- node.loc
- ),
- null,
- node.loc
- );
-}
-
-function transformPositionalLinkToIntoNamedArguments(
- env: EmberASTPluginEnvironment,
- node: AST.BlockStatement,
- hasBlock = true
-): AST.BlockStatement {
- let { builders: b } = env.syntax;
- let moduleName = env.meta?.moduleName;
- let {
- params,
- hash: { pairs },
- } = node;
-
- let keys = pairs.map((pair) => pair.key);
-
- if (params.length === 0) {
- assert(
- `You must provide one or more parameters to the \`{{link-to}}\` component. ${calculateLocationDisplay(
- moduleName,
- node.loc
- )}`,
- keys.indexOf('params') !== -1 ||
- keys.indexOf('route') !== -1 ||
- keys.indexOf('model') !== -1 ||
- keys.indexOf('models') !== -1 ||
- keys.indexOf('query') !== -1
- );
-
- return node;
- } else {
- assert(
- `You cannot pass positional parameters and the \`params\` argument to the \`{{link-to}}\` component at the same time. ${calculateLocationDisplay(
- moduleName,
- node.loc
- )}`,
- keys.indexOf('params') === -1
- );
-
- assert(
- `You cannot pass positional parameters and the \`route\` argument to the \`{{link-to}}\` component at the same time. ${calculateLocationDisplay(
- moduleName,
- node.loc
- )}`,
- keys.indexOf('route') === -1
- );
-
- assert(
- `You cannot pass positional parameters and the \`model\` argument to the \`{{link-to}}\` component at the same time. ${calculateLocationDisplay(
- moduleName,
- node.loc
- )}`,
- keys.indexOf('model') === -1
- );
-
- assert(
- `You cannot pass positional parameters and the \`models\` argument to the \`{{link-to}}\` component at the same time. ${calculateLocationDisplay(
- moduleName,
- node.loc
- )}`,
- keys.indexOf('models') === -1
- );
-
- assert(
- `You cannot pass positional parameters and the \`query\` argument to the \`{{link-to}}\` component at the same time. ${calculateLocationDisplay(
- moduleName,
- node.loc
- )}`,
- keys.indexOf('query') === -1
- );
- }
-
- assert(
- `You must provide one or more parameters to the \`{{link-to}}\` component. ${calculateLocationDisplay(
- moduleName,
- node.loc
- )}`,
- params.length > 0
- );
-
- let equivalentNamedArgs = [];
- let hasQueryParams = false;
-
- // 1. The last argument is possibly the `query` object.
-
- let query = params[params.length - 1];
-
- if (query && isQueryParams(query)) {
- params.pop();
-
- assert(
- `The \`(query-params ...)\` helper does not take positional arguments. ${calculateLocationDisplay(
- moduleName,
- query.loc
- )}`,
- query.params.length === 0
- );
-
- pairs.push(
- b.pair(
- 'query',
- b.sexpr(b.path('-hash', query.path.loc), [], query.hash, query.loc),
- query.loc
- )
- );
-
- hasQueryParams = true;
- }
-
- // 2. If there is a `route`, it is now at index 0.
-
- let route = params.shift();
-
- if (route) {
- pairs.push(b.pair('route', route, route.loc));
- equivalentNamedArgs.push('`@route`');
- }
-
- // 3. Any remaining indices (if any) are `models`.
-
- if (params.length === 1) {
- pairs.push(b.pair('model', params[0], params[0].loc));
- equivalentNamedArgs.push('`@model`');
- } else if (params.length > 1) {
- pairs.push(
- b.pair('models', b.sexpr(b.path('array', node.loc), params, undefined, node.loc), node.loc)
- );
- equivalentNamedArgs.push('`@models`');
- }
-
- if (hasQueryParams) {
- equivalentNamedArgs.push('`@query`');
- }
-
- if (equivalentNamedArgs.length > 0) {
- let message = 'Invoking the `<LinkTo>` component with positional arguments is deprecated.';
-
- message += `Please use the equivalent named arguments (${equivalentNamedArgs.join(', ')})`;
-
- if (hasQueryParams) {
- message += ' along with the `hash` helper';
- }
-
- if (!hasBlock) {
- message += " and pass a block for the link's content.";
- }
-
- message += '.';
-
- if (node.loc?.source) {
- message += ` ${calculateLocationDisplay(moduleName, node.loc)}`;
- }
-
- deprecate(message, false, {
- id: 'ember-glimmer.link-to.positional-arguments',
- until: '4.0.0',
- for: 'ember-source',
- url: 'https://deprecations.emberjs.com/v3.x#toc_ember-glimmer-link-to-positional-arguments',
- since: {
- enabled: '3.26.0-beta.1',
- },
- });
- }
-
- return b.block(
- node.path,
- null,
- b.hash(pairs, node.hash.loc),
- node.program,
- node.inverse,
- node.loc
- );
-}
-
-function buildStatement(b: Builders, content: AST.Node, escaped: boolean, loc: AST.SourceLocation) {
- switch (content.type) {
- case 'PathExpression':
- return b.mustache(content, undefined, undefined, !escaped, loc);
-
- case 'SubExpression':
- return b.mustache(content.path, content.params, content.hash, !escaped, loc);
-
- // The default case handles literals.
- default:
- return b.text(`${(content as AST.Literal).value}`, loc);
- }
-}
-
-export default function transformLinkTo(env: EmberASTPluginEnvironment): ASTPlugin {
- return {
- name: 'transform-link-to',
-
- visitor: {
- MustacheStatement(node: AST.MustacheStatement): AST.Node | void {
- if (isInlineLinkTo(node)) {
- let block = transformInlineLinkToIntoBlockForm(env, node);
- return transformPositionalLinkToIntoNamedArguments(env, block, false);
- }
- },
-
- BlockStatement(node: AST.BlockStatement): AST.Node | void {
- if (isBlockLinkTo(node)) {
- return transformPositionalLinkToIntoNamedArguments(env, node);
- }
- },
- },
- };
-} | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/ember-template-compiler/tests/plugins/transform-link-to-test.js | @@ -1,409 +0,0 @@
-import TransformTestCase from '../utils/transform-test-case';
-import { compile } from '../../index';
-import { moduleFor } from 'internal-test-helpers';
-
-moduleFor(
- 'ember-template-compiler: transforming inline {{link-to}} into the block form',
- class extends TransformTestCase {
- ['@test [DEPRECATED] it transforms an inline {{link-to}} into its block form']() {
- expectDeprecation(() => {
- this.assertTransformed(
- `{{link-to 'foo' 'index'}}`,
- `{{#link-to route='index'}}foo{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
- }
-
- ['@test [DEPRECATED] bound link title']() {
- expectDeprecation(() => {
- this.assertTransformed(
- `{{link-to foo 'index'}}`,
- `{{#link-to route='index'}}{{foo}}{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{link-to this.foo 'index'}}`,
- `{{#link-to route='index'}}{{this.foo}}{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{link-to foo.bar.baz 'index'}}`,
- `{{#link-to route='index'}}{{foo.bar.baz}}{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{link-to @foo 'index'}}`,
- `{{#link-to route='index'}}{{@foo}}{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
- }
-
- ['@test [DEPRECATED] sexp link title']() {
- expectDeprecation(() => {
- this.assertTransformed(
- `{{link-to (foo) 'index'}}`,
- `{{#link-to route='index'}}{{foo}}{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{link-to (foo bar) 'index'}}`,
- `{{#link-to route='index'}}{{foo bar}}{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{link-to (foo bar baz=bat) 'index'}}`,
- `{{#link-to route='index'}}{{foo bar baz=bat}}{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
- }
- }
-);
-
-moduleFor(
- 'ember-template-compiler: transforming inline {{{link-to}}} into the block form',
- class extends TransformTestCase {
- ['@test [DEPRECATED] it transforms an inline {{{link-to}}} into its block form']() {
- expectDeprecation(() => {
- this.assertTransformed(
- `{{{link-to 'foo' 'index'}}}`,
- `{{#link-to route='index'}}foo{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
- }
-
- ['@test [DEPRECATED] bound link title']() {
- expectDeprecation(() => {
- this.assertTransformed(
- `{{{link-to foo 'index'}}}`,
- `{{#link-to route='index'}}{{{foo}}}{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{{link-to this.foo 'index'}}}`,
- `{{#link-to route='index'}}{{{this.foo}}}{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{{link-to foo.bar.baz 'index'}}}`,
- `{{#link-to route='index'}}{{{foo.bar.baz}}}{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{{link-to @foo 'index'}}}`,
- `{{#link-to route='index'}}{{{@foo}}}{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
- }
-
- ['@test [DEPRECATED] sexp link title']() {
- expectDeprecation(() => {
- this.assertTransformed(
- `{{{link-to (foo) 'index'}}}`,
- `{{#link-to route='index'}}{{{foo}}}{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{{link-to (foo bar) 'index'}}}`,
- `{{#link-to route='index'}}{{{foo bar}}}{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{{link-to (foo bar baz=bat) 'index'}}}`,
- `{{#link-to route='index'}}{{{foo bar baz=bat}}}{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
- }
- }
-);
-
-moduleFor(
- 'ember-template-compiler: transforming positional arguments into named arguments',
- class extends TransformTestCase {
- ['@test [DEPRECATED] no arguments']() {
- expectAssertion(
- () => compile('{{#link-to}}zomg{{/link-to}}', { moduleName: '-top-level' }),
- /You must provide one or more parameters to the `{{link-to}}` component. \('-top-level' @ L1:C0\)/
- );
-
- expectAssertion(
- () => compile('{{#link-to class="wow"}}zomg{{/link-to}}', { moduleName: '-top-level' }),
- /You must provide one or more parameters to the `{{link-to}}` component. \('-top-level' @ L1:C0\)/
- );
-
- // these are ok
-
- compile('{{#link-to params=foo}}zomg{{/link-to}}', { moduleName: '-top-level' });
- compile('{{#link-to route=foo}}zomg{{/link-to}}', { moduleName: '-top-level' });
- compile('{{#link-to model=foo}}zomg{{/link-to}}', { moduleName: '-top-level' });
- compile('{{#link-to models=foo}}zomg{{/link-to}}', { moduleName: '-top-level' });
- compile('{{#link-to query=foo}}zomg{{/link-to}}', { moduleName: '-top-level' });
- }
-
- ['@test [DEPRECATED] mixing positional and named arguments']() {
- expectAssertion(
- () => compile('{{#link-to foo params=bar}}zomg{{/link-to}}', { moduleName: '-top-level' }),
- /cannot pass positional parameters and the `params` argument to the `{{link-to}}` component at the same time. \('-top-level' @ L1:C0\)/
- );
-
- expectAssertion(
- () => compile('{{#link-to foo route=bar}}zomg{{/link-to}}', { moduleName: '-top-level' }),
- /cannot pass positional parameters and the `route` argument to the `{{link-to}}` component at the same time. \('-top-level' @ L1:C0\)/
- );
-
- expectAssertion(
- () => compile('{{#link-to foo model=bar}}zomg{{/link-to}}', { moduleName: '-top-level' }),
- /cannot pass positional parameters and the `model` argument to the `{{link-to}}` component at the same time. \('-top-level' @ L1:C0\)/
- );
-
- expectAssertion(
- () => compile('{{#link-to foo models=bar}}zomg{{/link-to}}', { moduleName: '-top-level' }),
- /cannot pass positional parameters and the `models` argument to the `{{link-to}}` component at the same time. \('-top-level' @ L1:C0\)/
- );
-
- expectAssertion(
- () => compile('{{#link-to foo query=bar}}zomg{{/link-to}}', { moduleName: '-top-level' }),
- /cannot pass positional parameters and the `query` argument to the `{{link-to}}` component at the same time. \('-top-level' @ L1:C0\)/
- );
- }
-
- ['@test [DEPRECATED] route only']() {
- expectDeprecation(() => {
- this.assertTransformed(
- `{{#link-to 'foo'}}Foo{{/link-to}}`,
- `{{#link-to route='foo'}}Foo{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{#link-to foo}}Foo{{/link-to}}`,
- `{{#link-to route=foo}}Foo{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{#link-to this.foo}}Foo{{/link-to}}`,
- `{{#link-to route=this.foo}}Foo{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{#link-to foo.bar.baz}}Foo{{/link-to}}`,
- `{{#link-to route=foo.bar.baz}}Foo{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{#link-to @foo}}Foo{{/link-to}}`,
- `{{#link-to route=@foo}}Foo{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{#link-to @foo}}Foo{{/link-to}}`,
- `{{#link-to route=@foo}}Foo{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{#link-to (foo)}}Foo{{/link-to}}`,
- `{{#link-to route=(foo)}}Foo{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{#link-to (foo bar)}}Foo{{/link-to}}`,
- `{{#link-to route=(foo bar)}}Foo{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{#link-to (foo bar baz=bat)}}Foo{{/link-to}}`,
- `{{#link-to route=(foo bar baz=bat)}}Foo{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
- }
-
- ['@test [DEPRECATED] single model']() {
- expectDeprecation(() => {
- this.assertTransformed(
- `{{#link-to 'foo' 'bar'}}Foo{{/link-to}}`,
- `{{#link-to route='foo' model='bar'}}Foo{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{#link-to 'foo' bar}}Foo{{/link-to}}`,
- `{{#link-to route='foo' model=bar}}Foo{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{#link-to 'foo' this.bar}}Foo{{/link-to}}`,
- `{{#link-to route='foo' model=this.bar}}Foo{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{#link-to 'foo' bar.baz.bat}}Foo{{/link-to}}`,
- `{{#link-to route='foo' model=bar.baz.bat}}Foo{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{#link-to 'foo' @bar}}Foo{{/link-to}}`,
- `{{#link-to route='foo' model=@bar}}Foo{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{#link-to 'foo' (bar)}}Foo{{/link-to}}`,
- `{{#link-to route='foo' model=(bar)}}Foo{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{#link-to 'foo' (bar baz)}}Foo{{/link-to}}`,
- `{{#link-to route='foo' model=(bar baz)}}Foo{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{#link-to 'foo' (bar baz bat=wat)}}Foo{{/link-to}}`,
- `{{#link-to route='foo' model=(bar baz bat=wat)}}Foo{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
- }
-
- ['@test [DEPRECATED] multi models']() {
- expectDeprecation(() => {
- this.assertTransformed(
- `{{#link-to 'foo' 'bar' 'baz' 'bat'}}Foo{{/link-to}}`,
- `{{#link-to route='foo' models=(array 'bar' 'baz' 'bat')}}Foo{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{#link-to 'foo' bar baz bat}}Foo{{/link-to}}`,
- `{{#link-to route='foo' models=(array bar baz bat)}}Foo{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{#link-to 'foo' this.bar this.baz this.bat}}Foo{{/link-to}}`,
- `{{#link-to route='foo' models=(array this.bar this.baz this.bat)}}Foo{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{#link-to 'foo' bar.baz.bat baz.bat.bar bat.bar.baz}}Foo{{/link-to}}`,
- `{{#link-to route='foo' models=(array bar.baz.bat baz.bat.bar bat.bar.baz)}}Foo{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{#link-to 'foo' @bar @baz @bat}}Foo{{/link-to}}`,
- `{{#link-to route='foo' models=(array @bar @baz @bat)}}Foo{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{#link-to 'foo' (bar) (baz) (bat)}}Foo{{/link-to}}`,
- `{{#link-to route='foo' models=(array (bar) (baz) (bat))}}Foo{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{#link-to 'foo' (bar baz) (baz bat) (bat bar)}}Foo{{/link-to}}`,
- `{{#link-to route='foo' models=(array (bar baz) (baz bat) (bat bar))}}Foo{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{#link-to 'foo' (bar baz bat=wat) (baz bat wat=bar) (bat wat bar=baz)}}Foo{{/link-to}}`,
- `{{#link-to route='foo' models=(array (bar baz bat=wat) (baz bat wat=bar) (bat wat bar=baz))}}Foo{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
- }
-
- ['@test [DEPRECATED] query params']() {
- QUnit.dump.maxDepth = 100;
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{#link-to (query-params)}}Foo{{/link-to}}`,
- `{{#link-to query=(-hash)}}Foo{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{#link-to (query-params foo='bar' baz=bat)}}Foo{{/link-to}}`,
- `{{#link-to query=(-hash foo='bar' baz=bat)}}Foo{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{#link-to 'foo' (query-params foo='bar' baz=bat)}}Foo{{/link-to}}`,
- `{{#link-to query=(-hash foo='bar' baz=bat) route='foo'}}Foo{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{#link-to 'foo' 'bar' (query-params foo='bar' baz=bat)}}Foo{{/link-to}}`,
- `{{#link-to query=(-hash foo='bar' baz=bat) route='foo' model='bar'}}Foo{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
-
- expectDeprecation(() => {
- this.assertTransformed(
- `{{#link-to 'foo' 'bar' 'baz' 'bat' 'wat' (query-params foo='bar' baz=bat)}}Foo{{/link-to}}`,
- `{{#link-to query=(-hash foo='bar' baz=bat) route='foo' models=(array 'bar' 'baz' 'bat' 'wat')}}Foo{{/link-to}}`
- );
- }, /Invoking the `<LinkTo>` component with positional arguments is deprecated/);
- }
- }
-); | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/ember/index.js | @@ -11,7 +11,6 @@ import {
isEnabled,
EMBER_GLIMMER_HELPER_MANAGER,
EMBER_GLIMMER_INVOKE_HELPER,
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS,
} from '@ember/canary-features';
import * as EmberDebug from '@ember/debug';
import { assert, captureRenderTree, deprecate } from '@ember/debug';
@@ -44,7 +43,6 @@ import {
Array as EmberArray,
MutableEnumerable,
MutableArray,
- TargetActionSupport,
Evented,
PromiseProxyMixin,
Observable,
@@ -63,7 +61,6 @@ import {
A,
} from '@ember/-internals/runtime';
import {
- Checkbox,
Component,
componentCapabilities,
modifierCapabilities,
@@ -74,11 +71,8 @@ import {
helper,
htmlSafe,
isHTMLSafe,
- LinkComponent,
setTemplates,
template,
- TextField,
- TextArea,
Input,
isSerializationFirstNode,
} from '@ember/-internals/glimmer';
@@ -416,59 +410,6 @@ Object.defineProperty(Ember, 'BOOTED', {
Ember.Component = Component;
Helper.helper = helper;
Ember.Helper = Helper;
-if (EMBER_MODERNIZED_BUILT_IN_COMPONENTS) {
- [
- ['Checkbox', '@ember/component/checkbox', Checkbox, true],
- ['TextField', '@ember/component/text-field', TextField, true],
- ['TextArea', '@ember/component/text-area', TextArea, true],
- ['LinkComponent', '@ember/routing/link-component', LinkComponent, true],
- ['TextSupport', null, views.TextSupport, false],
- ['TargetActionSupport', null, TargetActionSupport, false],
- ].forEach(([name, path, value, availableInLegacyAddon]) => {
- Object.defineProperty(Ember, name, {
- get() {
- let message = `Using Ember.${name}`;
-
- if (path !== null) {
- message += ` or importing from '${path}'`;
- }
-
- message += ` is deprecated.`;
-
- if (availableInLegacyAddon) {
- message +=
- ` Install the \`@ember/legacy-built-in-components\` addon and use ` +
- `\`import { ${name} } from '@ember/legacy-built-in-components';\` instead.`;
- }
-
- deprecate(message, false, {
- id: 'ember.built-in-components.import',
- until: '4.0.0',
- for: 'ember-source',
- since: {
- enabled: '3.27.0',
- },
- url: 'https://deprecations.emberjs.com/v3.x#toc_ember-built-in-components-import',
- });
-
- return value;
- },
-
- configurable: true,
- enumerable: true,
- });
-
- // Expose a non-deprecated version for tests and the @ember/legacy-built-in-components addon
- Ember[`_Legacy${name}`] = value;
- });
-} else {
- Ember.Checkbox = Checkbox;
- Ember.TextField = TextField;
- Ember.TextArea = TextArea;
- Ember.LinkComponent = LinkComponent;
- Ember.TextSupport = views.TextSupport;
- Ember.TargetActionSupport = TargetActionSupport;
-}
Ember._setComponentManager = setComponentManager;
Ember._componentManagerCapabilities = componentCapabilities;
Ember._setModifierManager = setModifierManager; | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | packages/ember/tests/reexports_test.js | @@ -1,6 +1,6 @@
import Ember from '../index';
import require from 'require';
-import { EMBER_MODERNIZED_BUILT_IN_COMPONENTS, FEATURES } from '@ember/canary-features';
+import { FEATURES } from '@ember/canary-features';
import { AbstractTestCase, confirmExport, moduleFor } from 'internal-test-helpers';
import { DEBUG } from '@glimmer/env';
@@ -20,52 +20,6 @@ moduleFor(
});
}
- ['@feature(EMBER_MODERNIZED_BUILT_IN_COMPONENTS) deprecated built-in components'](assert) {
- [
- ['Checkbox', '@ember/component/checkbox', '@ember/-internals/glimmer'],
- ['TextField', '@ember/component/text-field', '@ember/-internals/glimmer'],
- ['TextArea', '@ember/component/text-area', '@ember/-internals/glimmer'],
- ['LinkComponent', '@ember/routing/link-component', '@ember/-internals/glimmer'],
- ['TextSupport', null, '@ember/-internals/views'],
- ['TargetActionSupport', null, '@ember/-internals/runtime'],
- ].forEach(([name, publicPath, privatePath]) => {
- // loosely based on confirmExport
- try {
- let module = require(privatePath);
- let value = module[name];
-
- assert.ok(
- Object.prototype.hasOwnProperty.call(Ember, name),
- `the ${name} property exists on the Ember global`
- );
-
- assert.strictEqual(
- Ember[`_Legacy${name}`],
- value,
- `Ember._Legacy${name} has the correct value and does not trigger a deprecation`
- );
-
- expectDeprecation(
- () =>
- assert.strictEqual(
- Ember[name],
- value,
- `Ember.${name} has the correct value triggers a deprecation`
- ),
- publicPath === null
- ? `Using Ember.${name} is deprecated.`
- : `Using Ember.${name} or importing from '${publicPath}' is deprecated. Install the \`@ember/legacy-built-in-components\` addon and use \`import { ${name} } from '@ember/legacy-built-in-components';\` instead.`
- );
- } catch (error) {
- assert.pushResult({
- result: false,
- message: `An error occurred while testing ${name} is exported from ${privatePath}.`,
- source: error,
- });
- }
- });
- }
-
['@skip Ember.String.htmlSafe exports correctly (but deprecated)'](assert) {
let glimmer = require('@ember/-internals/glimmer');
expectDeprecation(() => {
@@ -133,28 +87,18 @@ let allExports = [
// @ember/component
['Component', '@ember/component', 'default'],
- ['_Input', '@ember/component', 'Input'],
['_componentManagerCapabilities', '@ember/component', 'capabilities'],
['_getComponentTemplate', '@ember/component', 'getComponentTemplate'],
['_setComponentManager', '@ember/component', 'setComponentManager'],
['_setComponentTemplate', '@ember/component', 'setComponentTemplate'],
- // @ember/component/checkbox
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS ? null : ['Checkbox', '@ember/component/checkbox'],
-
// @ember/component/helper
['Helper', '@ember/component/helper', 'default'],
['Helper.helper', '@ember/component/helper', 'helper'],
// @ember/component/template-only
['_templateOnlyComponent', '@ember/component/template-only', 'default'],
- // @ember/component/text-area
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS ? null : ['TextArea', '@ember/-component/text-area'],
-
- // @ember/component/text-field
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS ? null : ['TextField', '@ember/component/text-field'],
-
// @ember/controller
['Controller', '@ember/controller', 'default'],
['inject.controller', '@ember/controller', 'inject'],
@@ -290,9 +234,6 @@ let allExports = [
// @ember/routing/history-location
['HistoryLocation', '@ember/routing/history-location', 'default'],
- // @ember/routing/link-component
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS ? null : ['LinkComponent', '@ember/-internals/glimmer'],
-
// @ember/routing/location
['Location', '@ember/routing/location', 'default'],
@@ -412,13 +353,13 @@ let allExports = [
['ViewUtils.getRootViews', '@ember/-internals/views', 'getRootViews'],
['ViewUtils.getChildViews', '@ember/-internals/views', 'getChildViews'],
['ViewUtils.isSerializationFirstNode', '@ember/-internals/glimmer', 'isSerializationFirstNode'],
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS ? null : ['TextSupport', '@ember/-internals/views'],
['ComponentLookup', '@ember/-internals/views'],
['EventDispatcher', '@ember/-internals/views'],
// @ember/-internals/glimmer
['TEMPLATES', '@ember/-internals/glimmer', { get: 'getTemplates', set: 'setTemplates' }],
['Handlebars.Utils.escapeExpression', '@ember/-internals/glimmer', 'escapeExpression'],
+ ['_Input', '@ember/-internals/glimmer', 'Input'],
// @ember/-internals/runtime
['_RegistryProxyMixin', '@ember/-internals/runtime', 'RegistryProxyMixin'],
@@ -427,9 +368,6 @@ let allExports = [
['ActionHandler', '@ember/-internals/runtime'],
['NativeArray', '@ember/-internals/runtime'],
['MutableEnumerable', '@ember/-internals/runtime'],
- EMBER_MODERNIZED_BUILT_IN_COMPONENTS
- ? null
- : ['TargetActionSupport', '@ember/-internals/runtime'],
['ControllerMixin', '@ember/controller/lib/controller_mixin', 'default'],
['_ProxyMixin', '@ember/-internals/runtime'],
| true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | tests/docs/expected.js | @@ -31,7 +31,6 @@ module.exports = {
'_hydrateUnsuppliedQueryParams',
'_initializersRan',
'_internalReset',
- '_invoke',
'_lazyInjections',
'_normalizeCache',
'_onLookup',
@@ -59,8 +58,6 @@ module.exports = {
'action',
'actions',
'activate',
- 'active',
- 'activeClass',
'adapter',
'addArrayObserver',
'addListener',
@@ -85,7 +82,6 @@ module.exports = {
'arrayContentWillChange',
'assert',
'assertDestroyablesDestroyed',
- 'assertLinkToOrigin',
'assign',
'associateDestroyableChild',
'asyncEnd',
@@ -100,7 +96,6 @@ module.exports = {
'bind',
'bool',
'boot',
- 'bubbles',
'buildChildEngineInstance',
'buildInstance',
'buildRegistry',
@@ -125,7 +120,6 @@ module.exports = {
'classNameBindings',
'classNames',
'clear',
- 'click',
'cloneParentDependencies',
'collect',
'columnsForType',
@@ -145,7 +139,6 @@ module.exports = {
'controllerName',
'create',
'createCache',
- 'current-when',
'currentPath',
'currentRoute',
'currentRouteName',
@@ -184,8 +177,6 @@ module.exports = {
'didTransition',
'didUpdate',
'didUpdateAttrs',
- 'disabled',
- 'disabledClass',
'document',
'domReady',
'each-in',
@@ -203,7 +194,6 @@ module.exports = {
'equal',
'error',
'eventDispatcher',
- 'eventName',
'events',
'every',
'exception',
@@ -221,8 +211,6 @@ module.exports = {
'firstObject',
'flushWatchers',
'fn',
- 'focusIn',
- 'focusOut',
'followRedirects',
'forEach',
'formatURL',
@@ -273,7 +261,6 @@ module.exports = {
'helper',
'helperContainer',
'history',
- 'href',
'htmlSafe',
'if',
'in-element',
@@ -288,7 +275,6 @@ module.exports = {
'injectTestHelpers',
'input',
'insertAt',
- 'insertNewline',
'inspect',
'instanceInitializer',
'instrument',
@@ -321,9 +307,6 @@ module.exports = {
'isRejected',
'isSettled',
'join',
- 'keyDown',
- 'keyPress',
- 'keyUp',
'knownForType',
'lastIndexOf',
'lastObject',
@@ -334,8 +317,6 @@ module.exports = {
'let',
'link-to',
'loading',
- 'loadingClass',
- 'loadingHref',
'localName',
'location',
'log',
@@ -358,7 +339,6 @@ module.exports = {
'mixin',
'model',
'modelFor',
- 'models',
'mount',
'mut',
'name',
@@ -397,17 +377,13 @@ module.exports = {
'parent',
'parentView',
'parentViewDidChange',
- 'pattern',
'pauseTest',
'popObject',
'positionalParams',
- 'preventDefault',
'promise',
'pushObject',
'pushObjects',
'pushState',
- 'query-params',
- 'query',
'queryParams',
'queryParamsDidChange',
'queues',
@@ -442,7 +418,6 @@ module.exports = {
'registry',
'reject',
'rejectBy',
- 'rel',
'releaseMethods',
'removeArrayObserver',
'removeAt',
@@ -472,7 +447,6 @@ module.exports = {
'reverseObjects',
'rootElement',
'rootURL',
- 'route',
'routeDidChange',
'routeName',
'routeWillChange',
@@ -508,15 +482,13 @@ module.exports = {
'setURL',
'shiftObject',
'shouldRender',
- 'size',
'slice',
'sort',
'sortBy',
'startRouting',
'store',
'subscribe',
'sum',
- 'tabindex',
'tagName',
'target',
'teardownViews',
@@ -528,7 +500,6 @@ module.exports = {
'then',
'this[RENDER]',
'throttle',
- 'title',
'to',
'toArray',
'toggleProperty',
@@ -539,7 +510,6 @@ module.exports = {
'trigger',
'triggerAction',
'trySet',
- 'type',
'typeOf',
'typeWatchers',
'unbound',
@@ -559,7 +529,6 @@ module.exports = {
'urlFor',
'userAgent',
'validationCache',
- 'value',
'visit',
'w',
'wait', | true |
Other | emberjs | ember.js | 5d24ae7480aae886d7a526d15332f53fe5b1689c.json | Drop export of built-ins, remove legacy components
* Remove the export of `@ember/component/checkbox`
* Remove the export of `@ember/component/text-field`
* Remove the export of `@ember/component/text-area`
* Remove the export of `@ember/component/link-component`
* Remove the assignment of `Ember.Checkbox`
* Remove the assignment of `Ember.TextField`
* Remove the assignment of `Ember.TextArea`
* Remove the assignment of `Ember.LinkComponent`
* Remove the assignment of `Ember.TextSupport`
* Remove the assignment of `Ember.TargetActionSupport`
* Hard-code `EMBER_MODERNIZED_BUILT_IN_COMPONENTS` to `true` path in
most places. The remaining are a few spots where there are
deprecations targeting *5.0*.
* Hard-code the built-in components (`<Textarea>`, `<Input>`,
`<LinkTo>`) for the modernized path
* Remove the `query-params` helper (it is only needed by the legacy
`LinkComponent` and was deprecated).
* Review https://github.com/emberjs/ember.js/pull/19669 and ensure all
`disabledWhen` is removed.
* Review https://github.com/emberjs/ember.js/pull/19662 and ensure all
`@tagName` support is removed
* Review all `ember.built-in-components.*` deprecations and ensure their
functionality is removed.
* Remove code supporting `ember-glimmer.link-to.positional-arguments`,
basically
https://github.com/emberjs/ember.js/blob/master/packages/ember-template-compiler/lib/plugins/transform-link-to.ts | tests/node/app-boot-test.js | @@ -16,7 +16,7 @@ QUnit.module('App Boot', function (hooks) {
this.template(
'components/root-component',
"\
- <h1>Hello {{#if hasExistence}}{{location}}{{/if}}</h1>\
+ <h1>Hello {{#if this.hasExistence}}{{this.location}}{{/if}}</h1>\
<div>{{component 'foo-bar'}}</div>\
"
);
@@ -38,8 +38,22 @@ QUnit.module('App Boot', function (hooks) {
});
});
+ QUnit.test('<LinkTo>', function (assert) {
+ this.template('application', "<h1><LinkTo @route='photos'>Go to photos</LinkTo></h1>");
+ this.routes(function () {
+ this.route('photos');
+ });
+
+ return this.renderToHTML('/').then(function (html) {
+ assert.htmlMatches(
+ html,
+ '<body><div id="EMBER_ID" class="ember-view"><h1><a id="EMBER_ID" href="/photos" class="ember-view">Go to photos</a></h1></div></body>'
+ );
+ });
+ });
+
QUnit.test('{{link-to}}', function (assert) {
- this.template('application', "<h1>{{#link-to 'photos'}}Go to photos{{/link-to}}</h1>");
+ this.template('application', "<h1>{{#link-to route='photos'}}Go to photos{{/link-to}}</h1>");
this.routes(function () {
this.route('photos');
});
@@ -57,7 +71,7 @@ QUnit.module('App Boot', function (hooks) {
this.route('photos');
});
- this.template('application', '<h1>{{{title}}}</h1>');
+ this.template('application', '<h1>{{{this.title}}}</h1>');
this.controller('application', {
title: '<b>Hello world</b>',
}); | true |
Other | emberjs | ember.js | 05e16c40b219e470a42f38e896ae7dd6b32ca098.json | Fix missing `deprecate` import in router
Two PR's "crossed in the mail" and left things a bit broken (deprecate
was removed when deprecations were cleaned up, then we landed a new
deprecation). | packages/@ember/-internals/routing/lib/system/router.ts | @@ -6,7 +6,7 @@ import { BucketCache } from '@ember/-internals/routing';
import RouterService from '@ember/-internals/routing/lib/services/router';
import { A as emberA, Evented, Object as EmberObject, typeOf } from '@ember/-internals/runtime';
import Controller from '@ember/controller';
-import { assert, info } from '@ember/debug';
+import { assert, deprecate, info } from '@ember/debug';
import EmberError from '@ember/error';
import { cancel, once, run, scheduleOnce } from '@ember/runloop';
import { DEBUG } from '@glimmer/env'; | false |
Other | emberjs | ember.js | 4f99f42070bc12a122cc7f45686d02b467c7d661.json | Add v4.0.0-beta.8 to CHANGELOG
(cherry picked from commit f7d7b24222fe325fa34f102ae16843dc5db8ee1a) | CHANGELOG.md | @@ -1,5 +1,12 @@
# Ember Changelog
+### v4.0.0-beta.8 (November 5, 2021)
+
+- [#19823](https://github.com/emberjs/ember.js/pull/19823) / [#19828](https://github.com/emberjs/ember.js/pull/19828) [BUGFIX] Fix deprecation `until` and link for Component.reopenClass and Component.reopen
+- [#19825](https://github.com/emberjs/ember.js/pull/19825) [BUGFIX] Replace `assert.equal` in blueprints with `assert.strictEqual` to pass eslint-plugin-qunit v7 on generation
+- [#19808](https://github.com/emberjs/ember.js/pull/19808) [CLEANUP] Remove the `--test-type` option from the helper blueprint
+- [#19820](https://github.com/emberjs/ember.js/pull/19820) Fix memory leak when looking up non-instantiable objects from the owner
+
### v4.0.0-beta.7 (November 1, 2021)
- [#19677](https://github.com/emberjs/ember.js/pull/19677) [CLEANUP] Remove jQuery from build | false |
Other | emberjs | ember.js | d52b26508998ce5a8c43c4f5125474231421e5fc.json | Add v3.28.5 to CHANGELOG.md. | CHANGELOG.md | @@ -73,6 +73,10 @@
- [#19695](https://github.com/emberjs/ember.js/pull/19695) [CLEANUP] Remove {{partial}}
- [#19691](https://github.com/emberjs/ember.js/pull/19691) Add build assertion against `{{outlet named}}`
+## v3.28.5 (November 3, 2021)
+
+- [#19820](https://github.com/emberjs/ember.js/pull/19820) Fix memory leak when looking up non-instantiable objects from the owner
+
## v3.28.3 (October 22, 2021)
- [#19799](https://github.com/emberjs/ember.js/pull/19799) / [glimmerjs/glimmer-vm#1354](https://github.com/glimmerjs/glimmer-vm/pull/1354) Fixes for errors while precompiling inline templates (introduced in 3.28.2) | false |
Other | emberjs | ember.js | 4112c3337b85733e940123532a6b96a5f43a7a32.json | Fix memory leak | packages/@ember/-internals/container/lib/container.ts | @@ -485,7 +485,7 @@ class FactoryManager<T, C> {
this.injections = undefined;
setFactoryFor(this, this);
- if (factory) {
+ if (isInstantiatable(container, fullName)) {
setFactoryFor(factory, this);
}
} | false |
Other | emberjs | ember.js | 89b46e4f61298a8b40fd72aeb4969c89eab96858.json | Add v3.24.6 to CHANGELOG.md.
(cherry picked from commit e69904998ee98d98ed5236fd71c1e25ea91d5e26) | CHANGELOG.md | @@ -81,6 +81,10 @@
- [glimmerjs/glimmer-vm#1351](https://github.com/glimmerjs/glimmer-vm/pull/1351) Support lexical scope in loose mode
+### v3.24.6 (October 18, 2021)
+
+- [glimmerjs/glimmer-vm#1347](https://github.com/glimmerjs/glimmer-vm/pull/1347) Avoid using a nested WeakMap for manager instances for a given owner (makes memory leak debugging easier)
+
## v3.28.1 (August 30, 2021)
- [#19733](https://github.com/emberjs/ember.js/pull/19733) [BUGFIX] Ensure that using `routerService.urlFor(...)` and `routerService.recognize(...)` does not error if the router is not fully initialized | false |
Other | emberjs | ember.js | dfd1da52eaafcb02e6c019ae0c10a914b07e0c5a.json | Add v4.0.0-beta.7 to CHANGELOG
(cherry picked from commit 5c32ca9cc521c5ece0e80dc109bb9af9fb83ba50) | CHANGELOG.md | @@ -1,5 +1,9 @@
# Ember Changelog
+### v4.0.0-beta.7 (November 1, 2021)
+
+- [#19677](https://github.com/emberjs/ember.js/pull/19677) [CLEANUP] Remove jQuery from build
+
### v4.0.0-beta.6 (October 26, 2021)
- [#19799](https://github.com/emberjs/ember.js/pull/19799) / [glimmerjs/glimmer-vm#1354](https://github.com/glimmerjs/glimmer-vm/pull/1354) Fixes for errors while precompiling inline templates (introduced in 3.28.2) | false |
Other | emberjs | ember.js | 8409dd76c50ab4d29922d378f1d7bb3fe71bec57.json | Remove some jQuery examples from comments | CONTRIBUTING.md | @@ -141,10 +141,6 @@ example:
To test multiple packages, you can separate them with commas.
-You can also pass `jquery=VERSION` in the test URL to test different
-versions of jQuery. You can also pass `jquery=none` to run tests without jQuery
-integration.
-
## From the CLI
Run `yarn test` to run a basic test suite or run `TEST_SUITE=all yarn test` to | true |
Other | emberjs | ember.js | 8409dd76c50ab4d29922d378f1d7bb3fe71bec57.json | Remove some jQuery examples from comments | packages/@ember/-internals/glimmer/lib/component.ts | @@ -1000,23 +1000,6 @@ const Component = CoreView.extend(
@private
*/
- /**
- Returns a jQuery object for this component's element. If you pass in a selector
- string, this method will return a jQuery object, using the current element
- as its buffer.
-
- For example, calling `component.$('li')` will return a jQuery object containing
- all of the `li` elements inside the DOM element of this component.
-
- Please note that jQuery integration is off by default and this feature will
- not work properly. To enable this feature, you can read the instructions in
- the [jquery-integration optional feature guide](https://guides.emberjs.com/release/configuring-ember/optional-features/#toc_jquery-integration).
- @method $
- @param {String} [selector] a jQuery-compatible selector string
- @return {jQuery} the jQuery object for the DOM node
- @public
- */
-
/**
The HTML `id` of the component's element in the DOM. You can provide this
value yourself but it must be unique (just as in HTML): | true |
Other | emberjs | ember.js | 8409dd76c50ab4d29922d378f1d7bb3fe71bec57.json | Remove some jQuery examples from comments | packages/@ember/-internals/glimmer/lib/components/checkbox.ts | @@ -21,7 +21,7 @@ import layout from '../templates/empty';
The `checked` attribute of an `Checkbox` object should always be set
through the Ember object or by interacting with its rendered element
representation via the mouse, keyboard, or touch. Updating the value of the
- checkbox via jQuery will result in the checked value of the object and its
+ checkbox programmatically will result in the checked value of the object and its
element losing synchronization.
## Layout and LayoutName properties | true |
Other | emberjs | ember.js | 8409dd76c50ab4d29922d378f1d7bb3fe71bec57.json | Remove some jQuery examples from comments | packages/@ember/-internals/utils/lib/guid.ts | @@ -6,9 +6,6 @@ import { isObject } from './spec';
*/
/**
- Previously we used `Ember.$.uuid`, however `$.uuid` has been removed from
- jQuery master. We'll just bootstrap our own uuid now.
-
@private
@return {Number} the uuid
*/
@@ -22,7 +19,7 @@ let _uuid = 0;
@public
@return {Number} [description]
*/
-export function uuid() {
+export function uuid(): number {
return ++_uuid;
}
@@ -73,7 +70,7 @@ export const GUID_KEY = intern(`__ember${Date.now()}`);
separate the guid into separate namespaces.
@return {String} the guid
*/
-export function generateGuid(obj: object, prefix = GUID_PREFIX) {
+export function generateGuid(obj: object, prefix = GUID_PREFIX): String {
let guid = prefix + uuid();
if (isObject(obj)) {
@@ -97,7 +94,7 @@ export function generateGuid(obj: object, prefix = GUID_PREFIX) {
@param {Object} obj any object, string, number, Element, or primitive
@return {String} the unique guid for this instance.
*/
-export function guidFor(value: any | null | undefined) {
+export function guidFor(value: any | null | undefined): string {
let guid;
if (isObject(value)) { | true |
Other | emberjs | ember.js | 8409dd76c50ab4d29922d378f1d7bb3fe71bec57.json | Remove some jQuery examples from comments | packages/@ember/-internals/views/lib/mixins/view_support.js | @@ -166,7 +166,7 @@ let mixin = {
and does not have an ancestor element that is associated with an Ember view.
@method appendTo
- @param {String|DOMElement|jQuery} A selector, element, HTML string, or jQuery object
+ @param {String|DOMElement} A selector, element, HTML string
@return {Ember.View} receiver
@private
*/
@@ -197,11 +197,11 @@ let mixin = {
target = selector;
assert(
- `You tried to append to a selector string (${selector}) in an environment without jQuery`,
+ `You tried to append to a selector string (${selector}) in an environment without a DOM`,
typeof target !== 'string'
);
assert(
- `You tried to append to a non-Element (${selector}) in an environment without jQuery`,
+ `You tried to append to a non-Element (${selector}) in an environment without a DOM`,
typeof selector.appendChild === 'function'
);
}
@@ -354,7 +354,7 @@ let mixin = {
Component properties that depend on the presence of an outer element, such
as `classNameBindings` and `attributeBindings`, do not work with tagless
components. Tagless components cannot implement methods to handle events,
- and have no associated jQuery object to return with `$()`.
+ and their `element` property has a `null` value.
@property tagName
@type String | true |
Other | emberjs | ember.js | 8409dd76c50ab4d29922d378f1d7bb3fe71bec57.json | Remove some jQuery examples from comments | packages/@ember/application/lib/application.js | @@ -120,7 +120,7 @@ import { RouterService } from '@ember/-internals/routing';
});
```
- The `rootElement` can be either a DOM element or a jQuery-compatible selector
+ The `rootElement` can be either a DOM element or a CSS selector
string. Note that *views appended to the DOM outside the root element will
not receive events.* If you specify a custom root element, make sure you only
append views inside it!
@@ -184,8 +184,7 @@ import { RouterService } from '@ember/-internals/routing';
const Application = Engine.extend({
/**
The root DOM element of the Application. This can be specified as an
- element or a
- [jQuery-compatible selector string](http://api.jquery.com/category/selectors/).
+ element or a [selector string](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Selectors#reference_table_of_selectors).
This is the element that will be passed to the Application's,
`eventDispatcher`, which sets up the listeners for event delegation. Every
@@ -548,11 +547,10 @@ const Application = Engine.extend({
App.deferReadiness();
- // $ is a reference to the jQuery object/function
- import $ from 'jquery;
-
- $.getJSON('/auth-token', function(token) {
- App.token = token;
+ fetch('/auth-token')
+ .then(response => response.json())
+ .then(data => {
+ App.token = data.token;
App.advanceReadiness();
});
```
@@ -1000,7 +998,7 @@ const Application = Engine.extend({
implement a limited subset of the full DOM API. The `SimpleDOM` library is known
to work.
- Since there is no access to jQuery in the non-browser environment, you must also
+ Since there is no DOM access in the non-browser environment, you must also
specify a DOM `Element` object in the same `document` for the `rootElement` option
(as opposed to a selector string like `"body"`).
| true |
Other | emberjs | ember.js | 8409dd76c50ab4d29922d378f1d7bb3fe71bec57.json | Remove some jQuery examples from comments | packages/@ember/engine/index.js | @@ -339,7 +339,6 @@ Engine.reopenClass({
Example instanceInitializer to preload data into the store.
```app/initializer/preload-data.js
- import $ from 'jquery';
export function initialize(application) {
var userConfig, userConfigEncoded, store;
@@ -352,7 +351,7 @@ Engine.reopenClass({
// should not be relied upon for security or authorization.
// Grab the encoded data from the meta tag
- userConfigEncoded = $('head meta[name=app-user-config]').attr('content');
+ userConfigEncoded = document.querySelector('head meta[name=app-user-config]').attr('content');
// Unescape the text, then parse the resulting JSON into a real object
userConfig = JSON.parse(unescape(userConfigEncoded)); | true |
Other | emberjs | ember.js | 8409dd76c50ab4d29922d378f1d7bb3fe71bec57.json | Remove some jQuery examples from comments | packages/ember/index.js | @@ -272,12 +272,16 @@ Ember._isDestroyed = isDestroyed;
and reporting code.
```javascript
- import $ from 'jquery';
Ember.onerror = function(error) {
- $.ajax('/report-error', 'POST', {
+ const payload = {
stack: error.stack,
otherInformation: 'whatever app state you want to provide'
+ };
+
+ fetch('/report-error', {
+ method: 'POST',
+ body: JSON.stringify(payload)
});
};
```
@@ -675,14 +679,3 @@ Ember.__loader = {
};
export default Ember;
-
-/**
- @module jquery
- @public
- */
-
-/**
- @class jquery
- @public
- @static
- */ | true |
Other | emberjs | ember.js | 8409dd76c50ab4d29922d378f1d7bb3fe71bec57.json | Remove some jQuery examples from comments | tests/docs/expected.js | @@ -1,6 +1,5 @@
module.exports = {
classitems: [
- '$',
'A',
'EXTEND_PROTOTYPES',
'GUID_KEY', | true |
Other | emberjs | ember.js | 8409dd76c50ab4d29922d378f1d7bb3fe71bec57.json | Remove some jQuery examples from comments | tests/index.html | @@ -20,15 +20,6 @@
};
</script>
- <script type="text/javascript">
- // Load custom version of jQuery if possible
- var jQueryVersion = QUnit.urlParams.jquery;
- if (jQueryVersion && jQueryVersion !== 'none') {
- loadScript('https://code.jquery.com/jquery-'+jQueryVersion+'.js');
- }
- // Close the script tag to make sure document.write happens
- </script>
-
<script>
(function() {
window.EmberENV = window.EmberENV || {}; | true |
Other | emberjs | ember.js | 0d31f3ac85ddc802096ac0dd956017169949b3d8.json | Remove jQuery from build
Removes jQuery from dependencies, the build process and test runs. | bin/run-tests.js | @@ -61,12 +61,6 @@ function generateTestsFor(packageName) {
testFunctions.push(() => run('package=' + packageName + '&edition=classic'));
testFunctions.push(() => run('package=' + packageName + '&prebuilt=true'));
testFunctions.push(() => run('package=' + packageName + '&enableoptionalfeatures=true'));
-
- // TODO: this should ultimately be deleted (when all packages can run with and
- // without jQuery)
- if (packageName !== 'ember') {
- testFunctions.push(() => run('package=' + packageName + '&jquery=none'));
- }
}
function generateEachPackageTests() { | true |
Other | emberjs | ember.js | 0d31f3ac85ddc802096ac0dd956017169949b3d8.json | Remove jQuery from build
Removes jQuery from dependencies, the build process and test runs. | broccoli/packages.js | @@ -34,14 +34,6 @@ module.exports.routerES = function _routerES() {
});
};
-module.exports.jquery = function _jquery() {
- return new Funnel(findLib('jquery'), {
- files: ['jquery.js'],
- destDir: 'jquery',
- annotation: 'jquery',
- });
-};
-
module.exports.loader = function _loader() {
return new Funnel('packages/loader/lib', {
files: ['index.js'], | true |
Other | emberjs | ember.js | 0d31f3ac85ddc802096ac0dd956017169949b3d8.json | Remove jQuery from build
Removes jQuery from dependencies, the build process and test runs. | ember-cli-build.js | @@ -14,7 +14,6 @@ Error.stackTraceLimit = Infinity;
const {
routerES,
- jquery,
loader,
qunit,
handlebarsES,
@@ -249,14 +248,7 @@ function templateCompilerBundle(emberPackages, transpileTree) {
}
function testHarness() {
- return new MergeTrees([
- emptyTestem(),
- testPolyfills(),
- testIndexHTML(),
- loader(),
- qunit(),
- jquery(),
- ]);
+ return new MergeTrees([emptyTestem(), testPolyfills(), testIndexHTML(), loader(), qunit()]);
}
function emptyTestem() { | true |
Other | emberjs | ember.js | 0d31f3ac85ddc802096ac0dd956017169949b3d8.json | Remove jQuery from build
Removes jQuery from dependencies, the build process and test runs. | lib/index.js | @@ -3,7 +3,6 @@
const MergeTrees = require('broccoli-merge-trees');
const Funnel = require('broccoli-funnel');
const path = require('path');
-const resolve = require('resolve');
const concatBundle = require('./concat-bundle');
const buildDebugMacroPlugin = require('./build-debug-macro-plugin');
const buildStripClassCallcheckPlugin = require('./build-strip-class-callcheck-plugin');
@@ -33,7 +32,6 @@ function add(paths, name, path) {
add(paths, 'prod', 'vendor/ember/ember.js');
add(paths, 'debug', 'vendor/ember/ember.js');
add(paths, 'testing', 'vendor/ember/ember-testing.js');
-add(paths, 'jquery', 'vendor/ember/jquery/jquery.js');
add(
absolutePaths,
@@ -95,25 +93,6 @@ module.exports = {
);
}
- if (
- optionalFeaturesMissing ||
- typeof optionalFeatures.isFeatureExplicitlySet !== 'function'
- ) {
- message.push(
- '* Unable to detect if jquery-integration is explicitly set to a value, please update `@ember/optional-features` to the latest version'
- );
- }
-
- if (
- optionalFeaturesMissing ||
- (typeof optionalFeatures.isFeatureExplicitlySet === 'function' &&
- !optionalFeatures.isFeatureExplicitlySet('jquery-integration'))
- ) {
- message.push(
- `* The jquery-integration optional feature should be explicitly set to a value under Octane, run \`ember feature:disable jquery-integration\` to disable it, or \`ember feature:enable jquery-integration\` to explicitly enable it`
- );
- }
-
if (
optionalFeaturesMissing ||
optionalFeatures.isFeatureEnabled('application-template-wrapper')
@@ -165,11 +144,12 @@ module.exports = {
}
this._jqueryIntegrationEnabled =
- optionalFeaturesMissing || optionalFeatures.isFeatureEnabled('jquery-integration');
+ !optionalFeaturesMissing && optionalFeatures.isFeatureEnabled('jquery-integration');
if (this._jqueryIntegrationEnabled) {
- this.ui.writeWarnLine(
- 'Setting the `jquery-integration` optional feature flag to `true`, or not providing a setting at all, has been deprecated. You must add the `@ember/optional-features` addon and set this feature to `false`. This warning will become an error in Ember 4.0.0.\n\nFor more information, see the deprecation guide: https://deprecations.emberjs.com/v3.x/#toc_optional-feature-jquery-integration'
+ const SilentError = require('silent-error');
+ throw new SilentError(
+ 'Setting the `jquery-integration` optional feature flag to `true` was deprecated in Ember 3.x and removed in Ember 4.0.0. You must add the `@ember/optional-features` addon and set this feature to `false`.\n\nFor more information, see the deprecation guide: https://deprecations.emberjs.com/v3.x/#toc_optional-feature-jquery-integration'
);
}
},
@@ -237,10 +217,7 @@ module.exports = {
false
);
- let exclude = [
- isProduction ? 'ember-testing/**' : null,
- !this._jqueryIntegrationEnabled ? 'jquery' : null,
- ].filter((value) => value !== null);
+ let exclude = isProduction ? ['ember-testing/**'] : [];
let emberFiles = new MergeTrees([new Funnel(packages, { exclude }), dependencies, headerFiles]);
@@ -270,21 +247,6 @@ module.exports = {
},
treeForVendor(tree) {
- let jqueryPath;
-
- try {
- jqueryPath = path.dirname(
- resolve.sync('jquery/package.json', { basedir: this.project.root })
- );
- } catch (error) {
- jqueryPath = path.dirname(require.resolve('jquery/package.json'));
- }
-
- let jquery = new Funnel(jqueryPath + '/dist', {
- destDir: 'ember/jquery',
- files: ['jquery.js'],
- });
-
let templateCompiler = new Funnel(tree, {
destDir: 'ember',
include: ['ember-template-compiler.js', 'ember-template-compiler.map'],
@@ -319,6 +281,6 @@ module.exports = {
});
}
- return debugTree(new MergeTrees([ember, templateCompiler, jquery]), 'vendor:final');
+ return debugTree(new MergeTrees([ember, templateCompiler]), 'vendor:final');
},
}; | true |
Other | emberjs | ember.js | 0d31f3ac85ddc802096ac0dd956017169949b3d8.json | Remove jQuery from build
Removes jQuery from dependencies, the build process and test runs. | package.json | @@ -2,9 +2,7 @@
"name": "ember-source",
"version": "4.1.0-alpha.2",
"description": "A JavaScript framework for creating ambitious web applications",
- "keywords": [
- "ember-addon"
- ],
+ "keywords": ["ember-addon"],
"homepage": "https://emberjs.com/",
"bugs": {
"url": "https://github.com/emberjs/ember.js/issues"
@@ -69,7 +67,6 @@
"ember-cli-version-checker": "^5.1.1",
"ember-router-generator": "^2.0.0",
"inflection": "^1.13.1",
- "jquery": "^3.5.1",
"resolve": "^1.17.0",
"semver": "^7.3.4",
"silent-error": "^1.1.1" | true |
Other | emberjs | ember.js | 0d31f3ac85ddc802096ac0dd956017169949b3d8.json | Remove jQuery from build
Removes jQuery from dependencies, the build process and test runs. | packages/jquery/index.js | @@ -1,3 +0,0 @@
-import { jQuery } from '@ember/-internals/views';
-
-export default jQuery; | true |
Other | emberjs | ember.js | 0d31f3ac85ddc802096ac0dd956017169949b3d8.json | Remove jQuery from build
Removes jQuery from dependencies, the build process and test runs. | tests/index.html | @@ -29,14 +29,6 @@
// Close the script tag to make sure document.write happens
</script>
- <script type="text/javascript">
- // Fallback to default jQuery
- if (jQueryVersion !== 'none' && !window.jQuery) {
- loadScript('./jquery/jquery.js');
- }
- // Close the script tag to make sure document.write happens
- </script>
-
<script>
(function() {
window.EmberENV = window.EmberENV || {}; | true |
Other | emberjs | ember.js | 0d31f3ac85ddc802096ac0dd956017169949b3d8.json | Remove jQuery from build
Removes jQuery from dependencies, the build process and test runs. | yarn.lock | @@ -7812,11 +7812,6 @@ jmespath@0.15.0:
resolved "https://registry.yarnpkg.com/jmespath/-/jmespath-0.15.0.tgz#a3f222a9aae9f966f5d27c796510e28091764217"
integrity "sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc= sha512-+kHj8HXArPfpPEKGLZ+kB5ONRTCiGQXo8RQYL0hH8t6pWXUBBK5KkkQmTNOwKK4LEsd0yTsgtjJVm4UBSZea4w=="
-jquery@^3.5.1:
- version "3.5.1"
- resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.5.1.tgz#d7b4d08e1bfdb86ad2f1a3d039ea17304717abb5"
- integrity sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg==
-
js-reporters@1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/js-reporters/-/js-reporters-1.2.3.tgz#8febcab370539df62e09b95da133da04b11f6168" | true |
Other | emberjs | ember.js | 73baf3d3cb46c5f645e0d6a4fed0530463366b43.json | Add v4.0.0-beta.6 to CHANGELOG
(cherry picked from commit 083eac14b2aaf052654c11025230e250e7e6e9ee) | CHANGELOG.md | @@ -1,5 +1,9 @@
# Ember Changelog
+### v4.0.0-beta.6 (October 26, 2021)
+
+- [#19799](https://github.com/emberjs/ember.js/pull/19799) / [glimmerjs/glimmer-vm#1354](https://github.com/glimmerjs/glimmer-vm/pull/1354) Fixes for errors while precompiling inline templates (introduced in 3.28.2)
+
### v4.0.0-beta.5 (October 11, 2021)
- [#19761](https://github.com/emberjs/ember.js/pull/19761) [BREAKING] Require ember-auto-import >= 2 or higher to enable ember-source to become a v2 addon in the 4.x cycle | false |
Other | emberjs | ember.js | 9446348aef3fadd66c1647fd4dbc4d08bf6c39a0.json | add docs/expected back | tests/docs/expected.js | @@ -182,6 +182,7 @@ module.exports = {
'didInsertElement',
'didReceiveAttrs',
'didRender',
+ 'didTransition',
'didUpdate',
'didUpdateAttrs',
'disabled',
@@ -572,6 +573,7 @@ module.exports = {
'willDestroyElement',
'willInsertElement',
'willRender',
+ 'willTransition',
'willUpdate',
'without',
'wrap', | false |
Other | emberjs | ember.js | da6db350af275e7dff93e1b3a3042b2d15d5186d.json | Add v3.28.3 to CHANGELOG.md. | CHANGELOG.md | @@ -65,6 +65,10 @@
- [#19695](https://github.com/emberjs/ember.js/pull/19695) [CLEANUP] Remove {{partial}}
- [#19691](https://github.com/emberjs/ember.js/pull/19691) Add build assertion against `{{outlet named}}`
+## v3.28.3 (October 22, 2021)
+
+- [#19799](https://github.com/emberjs/ember.js/pull/19799) / [glimmerjs/glimmer-vm#1354](https://github.com/glimmerjs/glimmer-vm/pull/1354) Fixes for errors while precompiling inline templates (introduced in 3.28.2)
+
## v3.28.2 (October 21, 2021)
- [glimmerjs/glimmer-vm#1351](https://github.com/glimmerjs/glimmer-vm/pull/1351) Support lexical scope in loose mode | false |
Other | emberjs | ember.js | 375dd0f03fd38b4c13d0501742277e58714f6b13.json | Add v3.28.2 to CHANGELOG.md.
(cherry picked from commit 4c0e61b4a5d35084f43bb93ac7306f2183c02a1e) | CHANGELOG.md | @@ -65,7 +65,11 @@
- [#19695](https://github.com/emberjs/ember.js/pull/19695) [CLEANUP] Remove {{partial}}
- [#19691](https://github.com/emberjs/ember.js/pull/19691) Add build assertion against `{{outlet named}}`
-### v3.28.1 (August 30, 2021)
+## v3.28.2 (October 21, 2021)
+
+- [glimmerjs/glimmer-vm#1351](https://github.com/glimmerjs/glimmer-vm/pull/1351) Support lexical scope in loose mode
+
+## v3.28.1 (August 30, 2021)
- [#19733](https://github.com/emberjs/ember.js/pull/19733) [BUGFIX] Ensure that using `routerService.urlFor(...)` and `routerService.recognize(...)` does not error if the router is not fully initialized
| false |
Other | emberjs | ember.js | 7457fdbffa3280ca3908db865340ce4b7595356d.json | Add v4.0.0-beta.5 to CHANGELOG
(cherry picked from commit 319a953ea1f1d9cbba816abf3db93154c1ecb12c) | CHANGELOG.md | @@ -1,5 +1,9 @@
# Ember Changelog
+### v4.0.0-beta.5 (October 11, 2021)
+
+- [#19761](https://github.com/emberjs/ember.js/pull/19761) [BREAKING] Require ember-auto-import >= 2 or higher to enable ember-source to become a v2 addon in the 4.x cycle
+
### v4.0.0-beta.4 (September 13, 2021)
- [#19733](https://github.com/emberjs/ember.js/pull/19733) [BUGFIX] Ensure that using `routerService.urlFor(...)` and `routerService.recognize(...)` does not error if the router is not fully initialized | false |
Other | emberjs | ember.js | e53d6bb4bbb5230829eb589fdba2388de3cd28cf.json | Add v4.0.0-beta.4 to CHANGELOG`
(cherry picked from commit 121155cf0bbfa9eee623a209f712542caea7be8c) | CHANGELOG.md | @@ -1,5 +1,9 @@
# Ember Changelog
+### v4.0.0-beta.4 (September 13, 2021)
+
+- [#19733](https://github.com/emberjs/ember.js/pull/19733) [BUGFIX] Ensure that using `routerService.urlFor(...)` and `routerService.recognize(...)` does not error if the router is not fully initialized
+
### v4.0.0-beta.3 (August 30, 2021)
- [#19708](https://github.com/emberjs/ember.js/pull/19708) [CLEANUP] Remove class-binding-and-class-name-bindings-in-templates | false |
Other | emberjs | ember.js | c448335c98daf33196072c6040d9e8b05aa516b3.json | Add v3.28.1 to CHANGELOG.md. | CHANGELOG.md | @@ -57,6 +57,10 @@
- [#19695](https://github.com/emberjs/ember.js/pull/19695) [CLEANUP] Remove {{partial}}
- [#19691](https://github.com/emberjs/ember.js/pull/19691) Add build assertion against `{{outlet named}}`
+### v3.28.1 (August 30, 2021)
+
+- [#19733](https://github.com/emberjs/ember.js/pull/19733) [BUGFIX] Ensure that using `routerService.urlFor(...)` and `routerService.recognize(...)` does not error if the router is not fully initialized
+
### v3.28.0 (August 9, 2021)
- [#19697](https://github.com/emberjs/ember.js/pull/19697) [BUGFIX] Ensure `deserializeQueryParam` is called for lazy routes | false |
Other | emberjs | ember.js | 70e95eaa305640d4ca2c08754b2c34c120b2c3cc.json | Add v4.0.0-beta.3 to CHANGELOG
(cherry picked from commit 293bc9caf2304906b7f42a3c7be4c26b23f4ea9b) | CHANGELOG.md | @@ -1,5 +1,9 @@
# Ember Changelog
+### v4.0.0-beta.3 (August 30, 2021)
+
+- [#19708](https://github.com/emberjs/ember.js/pull/19708) [CLEANUP] Remove class-binding-and-class-name-bindings-in-templates
+
### v4.0.0-beta.2 (August 23, 2021)
- [#19680](https://github.com/emberjs/ember.js/pull/19680) [DEPRECATION] Deprecate owner.inject per [RFC #680](https://github.com/emberjs/rfcs/blob/sn/owner-inject-deprecation/text/0680-implicit-injection-deprecation.md#1-deprecate-implicit-injection-on-target-object) and cleanup related deprecations that are `until: 4.0.0`. | false |
Other | emberjs | ember.js | 4f403127602efca9ca81288bcabb1671a0212b1d.json | Add v4.0.0-beta.2 to CHANGELOG
(cherry picked from commit fa88559c2a256ab8dca513dc02d02ad56ffda497) | CHANGELOG.md | @@ -1,5 +1,14 @@
# Ember Changelog
+### v4.0.0-beta.2 (August 23, 2021)
+
+- [#19680](https://github.com/emberjs/ember.js/pull/19680) [DEPRECATION] Deprecate owner.inject per [RFC #680](https://github.com/emberjs/rfcs/blob/sn/owner-inject-deprecation/text/0680-implicit-injection-deprecation.md#1-deprecate-implicit-injection-on-target-object) and cleanup related deprecations that are `until: 4.0.0`.
+- [#19706](https://github.com/emberjs/ember.js/pull/19706) [BUGFIX] Explicitly drop Node 10 support to match support policy.
+- [#19650](https://github.com/emberjs/ember.js/pull/19650) [CLEANUP] Remove deprecated mouse events
+- [#19675](https://github.com/emberjs/ember.js/pull/19675) [CLEANUP] Remove jQuery usage from ember-testing
+- [#19704](https://github.com/emberjs/ember.js/pull/19704) [CLEANUP] Remove template-compiler.registerPlugin
+- [#19707](https://github.com/emberjs/ember.js/pull/19707) [CLEANUP] Remove Application Controller Router Properties
+
### v4.0.0-beta.1 (August 17, 2021)
- [#19649](https://github.com/emberjs/ember.js/pull/19649) / [#19692](https://github.com/emberjs/ember.js/pull/19692) [DEPRECATION] Add deprecation warning to Ember.assign implementing [RFC #750](https://github.com/emberjs/rfcs/blob/master/text/0750-deprecate-ember-assign.md). | false |
Other | emberjs | ember.js | 3e4d3878c89ef2bf90a60ee289419fe97f5fd791.json | Remove internal jQuery usage | packages/@ember/-internals/environment/lib/env.ts | @@ -128,20 +128,6 @@ export const ENV = {
*/
_DEBUG_RENDER_TREE: DEBUG,
- /**
- Whether the app is using jQuery. See RFC #294.
-
- This is not intended to be set directly, as the implementation may change in
- the future. Use `@ember/optional-features` instead.
-
- @property _JQUERY_INTEGRATION
- @for EmberENV
- @type Boolean
- @default true
- @private
- */
- _JQUERY_INTEGRATION: true,
-
/**
Whether the app defaults to using async observers.
| true |