DEV: ember-cli refactor for TextField and TextArea imports (#9480)

In order to be able to use ember-cli we need to fix the import
statements for `TextField` and `TextArea` in the code base.

The only change I don't fully understand is the one in
`discourse-loader.js`, but adding the components to that file make it
all work.
This commit is contained in:
Blake Erickson 2020-04-23 12:36:05 -06:00 committed by GitHub
parent e49212d0bc
commit 5b98161f2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 7 deletions

View File

@ -19,9 +19,7 @@ var define, requirejs;
default: Ember.ArrayProxy
},
"@ember/component": {
default: Ember.Component,
TextArea: Ember.TextArea,
TextField: Ember.TextField
default: Ember.Component
},
"@ember/controller": {
default: Ember.Controller,
@ -129,6 +127,12 @@ var define, requirejs;
"@ember/component/helper": {
default: Ember.Helper
},
"@ember/component/text-field": {
default: Ember.TextField
},
"@ember/component/text-area": {
default: Ember.TextArea
},
"@ember/error": {
default: Ember.error
},

View File

@ -1,4 +1,4 @@
import { TextArea } from "@ember/component";
import TextArea from "@ember/component/text-area";
import { schedule } from "@ember/runloop";
import { on, observes } from "discourse-common/utils/decorators";
import autosize from "discourse/lib/autosize";

View File

@ -1,4 +1,4 @@
import { TextField } from "@ember/component";
import TextField from "discourse/components/text-field";
import { on } from "discourse-common/utils/decorators";
export default TextField.extend({

View File

@ -1,4 +1,4 @@
import { TextField } from "@ember/component";
import TextField from "discourse/components/text-field";
import discourseComputed from "discourse-common/utils/decorators";
export default TextField.extend({

View File

@ -1,4 +1,4 @@
import { TextField } from "@ember/component";
import TextField from "@ember/component/text-field";
import discourseComputed from "discourse-common/utils/decorators";
import { siteDir, isRTL, isLTR } from "discourse/lib/text-direction";
import { next, debounce, cancel } from "@ember/runloop";