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

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.

diff --git a/app/assets/javascripts/discourse-loader.js b/app/assets/javascripts/discourse-loader.js
index 24f879f..7908ab9 100644
--- a/app/assets/javascripts/discourse-loader.js
+++ b/app/assets/javascripts/discourse-loader.js
@@ -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
       },
diff --git a/app/assets/javascripts/discourse/app/components/expanding-text-area.js b/app/assets/javascripts/discourse/app/components/expanding-text-area.js
index 94c976c..821f9cf 100644
--- a/app/assets/javascripts/discourse/app/components/expanding-text-area.js
+++ b/app/assets/javascripts/discourse/app/components/expanding-text-area.js
@@ -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";
diff --git a/app/assets/javascripts/discourse/app/components/honeypot-input.js b/app/assets/javascripts/discourse/app/components/honeypot-input.js
index 9eb256b..c3d003d 100644
--- a/app/assets/javascripts/discourse/app/components/honeypot-input.js
+++ b/app/assets/javascripts/discourse/app/components/honeypot-input.js
@@ -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({
diff --git a/app/assets/javascripts/discourse/app/components/number-field.js b/app/assets/javascripts/discourse/app/components/number-field.js
index 6f78cc3..feb61f3 100644
--- a/app/assets/javascripts/discourse/app/components/number-field.js
+++ b/app/assets/javascripts/discourse/app/components/number-field.js
@@ -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({
diff --git a/app/assets/javascripts/discourse/app/components/text-field.js b/app/assets/javascripts/discourse/app/components/text-field.js
index 3477520..5809d25 100644
--- a/app/assets/javascripts/discourse/app/components/text-field.js
+++ b/app/assets/javascripts/discourse/app/components/text-field.js
@@ -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";

GitHub sha: 5b98161f

This commit appears in #9480 which was approved by eviltrout. It was merged by blake.