DEV: Removed all Ember.computed. in select-kit (#8322)

DEV: Removed all Ember.computed. in select-kit (#8322)

diff --git a/app/assets/javascripts/select-kit/components/category-drop.js.es6 b/app/assets/javascripts/select-kit/components/category-drop.js.es6
index 25f72b2655..601d420d4b 100644
--- a/app/assets/javascripts/select-kit/components/category-drop.js.es6
+++ b/app/assets/javascripts/select-kit/components/category-drop.js.es6
@@ -1,3 +1,4 @@
+import { alias, not } from "@ember/object/computed";
 import ComboBoxComponent from "select-kit/components/combo-box";
 import DiscourseURL from "discourse/lib/url";
 import { default as discourseComputed } from "discourse-common/utils/decorators";
@@ -10,18 +11,18 @@ export default ComboBoxComponent.extend({
   classNameBindings: ["categoryStyle"],
   classNames: "category-drop",
   verticalOffset: 3,
-  content: Ember.computed.alias("categoriesWithShortcuts"),
+  content: alias("categoriesWithShortcuts"),
   rowComponent: "category-row",
   headerComponent: "category-drop/category-drop-header",
   allowAutoSelectFirst: false,
   tagName: "li",
-  categoryStyle: Ember.computed.alias("siteSettings.category_style"),
+  categoryStyle: alias("siteSettings.category_style"),
   noCategoriesLabel: I18n.t("categories.no_subcategory"),
   fullWidthOnMobile: true,
   caretDownIcon: "caret-right",
   caretUpIcon: "caret-down",
   subCategory: false,
-  isAsync: Ember.computed.not("subCategory"),
+  isAsync: not("subCategory"),
 
   @discourseComputed(
     "categories",
diff --git a/app/assets/javascripts/select-kit/components/category-drop/category-drop-header.js.es6 b/app/assets/javascripts/select-kit/components/category-drop/category-drop-header.js.es6
index ad86019a19..c84b7189d0 100644
--- a/app/assets/javascripts/select-kit/components/category-drop/category-drop-header.js.es6
+++ b/app/assets/javascripts/select-kit/components/category-drop/category-drop-header.js.es6
@@ -1,3 +1,4 @@
+import { alias } from "@ember/object/computed";
 import { isEmpty } from "@ember/utils";
 import ComboBoxSelectBoxHeaderComponent from "select-kit/components/combo-box/combo-box-header";
 import discourseComputed from "discourse-common/utils/decorators";
@@ -9,7 +10,7 @@ export default ComboBoxSelectBoxHeaderComponent.extend({
   classNames: "category-drop-header",
 
   classNameBindings: ["categoryStyleClass"],
-  categoryStyleClass: Ember.computed.alias("site.category_style"),
+  categoryStyleClass: alias("site.category_style"),
 
   @discourseComputed("computedContent.value", "computedContent.name")
   category(value, name) {
diff --git a/app/assets/javascripts/select-kit/components/category-notifications-button.js.es6 b/app/assets/javascripts/select-kit/components/category-notifications-button.js.es6
index 17c8e4de41..ecc000d8bd 100644
--- a/app/assets/javascripts/select-kit/components/category-notifications-button.js.es6
+++ b/app/assets/javascripts/select-kit/components/category-notifications-button.js.es6
@@ -1,10 +1,11 @@
+import { or, alias } from "@ember/object/computed";
 import NotificationOptionsComponent from "select-kit/components/notifications-button";
 
 export default NotificationOptionsComponent.extend({
   pluginApiIdentifiers: ["category-notifications-button"],
   classNames: "category-notifications-button",
-  isHidden: Ember.computed.or("category.deleted"),
-  headerIcon: Ember.computed.alias("iconForSelectedDetails"),
+  isHidden: or("category.deleted"),
+  headerIcon: alias("iconForSelectedDetails"),
   i18nPrefix: "category.notifications",
   showFullTitle: false,
   allowInitialValueMutation: false,
diff --git a/app/assets/javascripts/select-kit/components/category-row.js.es6 b/app/assets/javascripts/select-kit/components/category-row.js.es6
index d2a548164e..e8963e96b6 100644
--- a/app/assets/javascripts/select-kit/components/category-row.js.es6
+++ b/app/assets/javascripts/select-kit/components/category-row.js.es6
@@ -1,3 +1,4 @@
+import { bool } from "@ember/object/computed";
 import { isEmpty } from "@ember/utils";
 import SelectKitRowComponent from "select-kit/components/select-kit/select-kit-row";
 import discourseComputed from "discourse-common/utils/decorators";
@@ -8,9 +9,9 @@ export default SelectKitRowComponent.extend({
   layoutName: "select-kit/templates/components/category-row",
   classNames: "category-row",
 
-  hideParentCategory: Ember.computed.bool("options.hideParentCategory"),
-  allowUncategorized: Ember.computed.bool("options.allowUncategorized"),
-  categoryLink: Ember.computed.bool("options.categoryLink"),
+  hideParentCategory: bool("options.hideParentCategory"),
+  allowUncategorized: bool("options.allowUncategorized"),
+  categoryLink: bool("options.categoryLink"),
 
   @discourseComputed("options.displayCategoryDescription")
   displayCategoryDescription(displayCategoryDescription) {
diff --git a/app/assets/javascripts/select-kit/components/combo-box/combo-box-header.js.es6 b/app/assets/javascripts/select-kit/components/combo-box/combo-box-header.js.es6
index 34e642bd7e..f5bd519625 100644
--- a/app/assets/javascripts/select-kit/components/combo-box/combo-box-header.js.es6
+++ b/app/assets/javascripts/select-kit/components/combo-box/combo-box-header.js.es6
@@ -1,13 +1,14 @@
+import { alias, and } from "@ember/object/computed";
 import SelectKitHeaderComponent from "select-kit/components/select-kit/select-kit-header";
 
 export default SelectKitHeaderComponent.extend({
   layoutName: "select-kit/templates/components/combo-box/combo-box-header",
   classNames: "combo-box-header",
 
-  clearable: Ember.computed.alias("options.clearable"),
-  caretUpIcon: Ember.computed.alias("options.caretUpIcon"),
-  caretDownIcon: Ember.computed.alias("options.caretDownIcon"),
-  shouldDisplayClearableButton: Ember.computed.and(
+  clearable: alias("options.clearable"),
+  caretUpIcon: alias("options.caretUpIcon"),
+  caretDownIcon: alias("options.caretDownIcon"),
+  shouldDisplayClearableButton: and(
     "clearable",
     "computedContent.hasSelection"
   )
diff --git a/app/assets/javascripts/select-kit/components/dropdown-select-box/dropdown-select-box-row.js.es6 b/app/assets/javascripts/select-kit/components/dropdown-select-box/dropdown-select-box-row.js.es6
index 187fc460cb..9bbe5fa399 100644
--- a/app/assets/javascripts/select-kit/components/dropdown-select-box/dropdown-select-box-row.js.es6
+++ b/app/assets/javascripts/select-kit/components/dropdown-select-box/dropdown-select-box-row.js.es6
@@ -1,3 +1,4 @@
+import { alias } from "@ember/object/computed";
 import SelectKitRowComponent from "select-kit/components/select-kit/select-kit-row";
 
 export default SelectKitRowComponent.extend({
@@ -5,7 +6,7 @@ export default SelectKitRowComponent.extend({
     "select-kit/templates/components/dropdown-select-box/dropdown-select-box-row",
   classNames: "dropdown-select-box-row",
 
-  description: Ember.computed.alias(
+  description: alias(
     "computedContent.originalContent.description"
   )
 });
diff --git a/app/assets/javascripts/select-kit/components/future-date-input-selector.js.es6 b/app/assets/javascripts/select-kit/components/future-date-input-selector.js.es6
index f5167afb20..9fec1611c1 100644
--- a/app/assets/javascripts/select-kit/components/future-date-input-selector.js.es6
+++ b/app/assets/javascripts/select-kit/components/future-date-input-selector.js.es6
@@ -1,3 +1,4 @@
+import { equal } from "@ember/object/computed";
 import { isEmpty } from "@ember/utils";
 import ComboBoxComponent from "select-kit/components/combo-box";
 import { CLOSE_STATUS_TYPE } from "discourse/controllers/edit-topic-timer";
@@ -188,8 +189,8 @@ export const FORMAT = "YYYY-MM-DD HH:mmZ";
 export default ComboBoxComponent.extend(DatetimeMixin, {
   pluginApiIdentifiers: ["future-date-input-selector"],
   classNames: ["future-date-input-selector"],
-  isCustom: Ember.computed.equal("value", "pick_date_and_time"),
-  isBasedOnLastPost: Ember.computed.equal("value", "set_based_on_last_post"),
+  isCustom: equal("value", "pick_date_and_time"),
+  isBasedOnLastPost: equal("value", "set_based_on_last_post"),

[... diff too long, it was truncated ...]

GitHub sha: 7f3812b9