-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor to native ECMAScript classes (#344)
Replaces Ember's old object model by native ECMAScript classes. Mostly automated with ember-native-class-codemod.
- Loading branch information
Showing
58 changed files
with
1,765 additions
and
1,270 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ sudo: false | |
|
||
addons: | ||
chrome: stable | ||
firefox: latest-esr | ||
|
||
cache: | ||
yarn: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
import classic from 'ember-classic-decorator'; | ||
import Component from '@ember/component'; | ||
|
||
export default Component.extend({ | ||
autofocus: true, | ||
@classic | ||
export default class AutofocusableElement extends Component { | ||
autofocus = true; | ||
|
||
didInsertElement() { | ||
this._super(...arguments); | ||
super.didInsertElement(...arguments); | ||
|
||
if (this.autofocus) { | ||
this.element.focus(); | ||
} | ||
}, | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
import BsInput from 'ember-bootstrap/components/bs-form/element/control/input'; | ||
import classic from 'ember-classic-decorator'; | ||
import BaseBsInput from 'ember-bootstrap/components/bs-form/element/control/input'; | ||
|
||
export default BsInput.extend({ | ||
@classic | ||
export default class CustomizedBsInput extends BaseBsInput { | ||
didInsertElement() { | ||
this._super(...arguments); | ||
super.didInsertElement(...arguments); | ||
|
||
if (this.autofocus) { | ||
this.element.focus(); | ||
} | ||
}, | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.