diff --git a/app/assets/javascripts/admin/components/admin-report.js.es6 b/app/assets/javascripts/admin/components/admin-report.js.es6 index cb70fc07ffb..b7a27a93250 100644 --- a/app/assets/javascripts/admin/components/admin-report.js.es6 +++ b/app/assets/javascripts/admin/components/admin-report.js.es6 @@ -8,7 +8,7 @@ import ReportLoader from "discourse/lib/reports-loader"; import { exportEntity } from "discourse/lib/export-csv"; import { outputExportResult } from "discourse/lib/export-result"; import { isNumeric } from "discourse/lib/utilities"; -import { SCHEMA_VERSION, default as Report } from "admin/models/report"; +import Report, { SCHEMA_VERSION } from "admin/models/report"; import ENV from "discourse-common/config/environment"; const TABLE_OPTIONS = { diff --git a/app/assets/javascripts/admin/components/admin-theme-editor.js.es6 b/app/assets/javascripts/admin/components/admin-theme-editor.js.es6 index 381ac0ca47e..0299c047158 100644 --- a/app/assets/javascripts/admin/components/admin-theme-editor.js.es6 +++ b/app/assets/javascripts/admin/components/admin-theme-editor.js.es6 @@ -1,6 +1,6 @@ import { next } from "@ember/runloop"; import Component from "@ember/component"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import { fmt } from "discourse/lib/computed"; export default Component.extend({ diff --git a/app/assets/javascripts/admin/components/admin-user-field-item.js.es6 b/app/assets/javascripts/admin/components/admin-user-field-item.js.es6 index a392196f8a8..a02404de985 100644 --- a/app/assets/javascripts/admin/components/admin-user-field-item.js.es6 +++ b/app/assets/javascripts/admin/components/admin-user-field-item.js.es6 @@ -7,8 +7,7 @@ import { bufferedProperty } from "discourse/mixins/buffered-content"; import { popupAjaxError } from "discourse/lib/ajax-error"; import { propertyEqual } from "discourse/lib/computed"; import { i18n } from "discourse/lib/computed"; -import { - default as discourseComputed, +import discourseComputed, { observes, on } from "discourse-common/utils/decorators"; diff --git a/app/assets/javascripts/admin/components/color-input.js.es6 b/app/assets/javascripts/admin/components/color-input.js.es6 index 6c02f78dd59..8648506bf98 100644 --- a/app/assets/javascripts/admin/components/color-input.js.es6 +++ b/app/assets/javascripts/admin/components/color-input.js.es6 @@ -1,6 +1,7 @@ import { schedule } from "@ember/runloop"; import Component from "@ember/component"; -import { default as loadScript, loadCSS } from "discourse/lib/load-script"; +import loadScript, { loadCSS } from "discourse/lib/load-script"; +import { observes } from "discourse-common/utils/decorators"; /** An input field for a color. @@ -11,6 +12,8 @@ import { default as loadScript, loadCSS } from "discourse/lib/load-script"; **/ export default Component.extend({ classNames: ["color-picker"], + + @observes("hexValue", "brightnessValue", "valid") hexValueChanged: function() { var hex = this.hexValue; let text = this.element.querySelector("input.hex-input"); @@ -33,7 +36,7 @@ export default Component.extend({ } else { text.setAttribute("style", ""); } - }.observes("hexValue", "brightnessValue", "valid"), + }, didInsertElement() { loadScript("/javascripts/spectrum.js").then(() => { diff --git a/app/assets/javascripts/admin/components/inline-edit-checkbox.js.es6 b/app/assets/javascripts/admin/components/inline-edit-checkbox.js.es6 index ff3cb98ffcf..2eb2c3ee5a8 100644 --- a/app/assets/javascripts/admin/components/inline-edit-checkbox.js.es6 +++ b/app/assets/javascripts/admin/components/inline-edit-checkbox.js.es6 @@ -1,8 +1,5 @@ import Component from "@ember/component"; -import { - default as discourseComputed, - observes -} from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; export default Component.extend({ classNames: ["inline-edit"], diff --git a/app/assets/javascripts/admin/components/ip-lookup.js.es6 b/app/assets/javascripts/admin/components/ip-lookup.js.es6 index 06421e2e908..b27191d6172 100644 --- a/app/assets/javascripts/admin/components/ip-lookup.js.es6 +++ b/app/assets/javascripts/admin/components/ip-lookup.js.es6 @@ -1,7 +1,7 @@ import EmberObject from "@ember/object"; import { later } from "@ember/runloop"; import Component from "@ember/component"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import { ajax } from "discourse/lib/ajax"; import AdminUser from "admin/models/admin-user"; import copyText from "discourse/lib/copy-text"; diff --git a/app/assets/javascripts/admin/components/permalink-form.js.es6 b/app/assets/javascripts/admin/components/permalink-form.js.es6 index 5a90dd9913d..34d222d30f6 100644 --- a/app/assets/javascripts/admin/components/permalink-form.js.es6 +++ b/app/assets/javascripts/admin/components/permalink-form.js.es6 @@ -1,6 +1,6 @@ import { schedule } from "@ember/runloop"; import Component from "@ember/component"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import { fmt } from "discourse/lib/computed"; import Permalink from "admin/models/permalink"; diff --git a/app/assets/javascripts/admin/components/report-filters/category.js.es6 b/app/assets/javascripts/admin/components/report-filters/category.js.es6 index 60fb61be9b1..7cc490cda41 100644 --- a/app/assets/javascripts/admin/components/report-filters/category.js.es6 +++ b/app/assets/javascripts/admin/components/report-filters/category.js.es6 @@ -1,5 +1,5 @@ import Category from "discourse/models/category"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import FilterComponent from "admin/components/report-filters/filter"; export default FilterComponent.extend({ diff --git a/app/assets/javascripts/admin/components/report-filters/group.js.es6 b/app/assets/javascripts/admin/components/report-filters/group.js.es6 index 0821cb084e4..a6511e75f63 100644 --- a/app/assets/javascripts/admin/components/report-filters/group.js.es6 +++ b/app/assets/javascripts/admin/components/report-filters/group.js.es6 @@ -1,5 +1,5 @@ import FilterComponent from "admin/components/report-filters/filter"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; export default FilterComponent.extend({ classNames: ["group-filter"], diff --git a/app/assets/javascripts/admin/components/resumable-upload.js.es6 b/app/assets/javascripts/admin/components/resumable-upload.js.es6 index a9c071f33f3..830e5602520 100644 --- a/app/assets/javascripts/admin/components/resumable-upload.js.es6 +++ b/app/assets/javascripts/admin/components/resumable-upload.js.es6 @@ -2,10 +2,7 @@ import { schedule } from "@ember/runloop"; import { later } from "@ember/runloop"; import Component from "@ember/component"; import { iconHTML } from "discourse-common/lib/icon-library"; -import { - default as discourseComputed, - on -} from "discourse-common/utils/decorators"; +import discourseComputed, { on } from "discourse-common/utils/decorators"; /*global Resumable:true */ diff --git a/app/assets/javascripts/admin/components/themes-list-item.js.es6 b/app/assets/javascripts/admin/components/themes-list-item.js.es6 index cfc1b63a368..c292b80f993 100644 --- a/app/assets/javascripts/admin/components/themes-list-item.js.es6 +++ b/app/assets/javascripts/admin/components/themes-list-item.js.es6 @@ -1,10 +1,7 @@ import { gt, and } from "@ember/object/computed"; import { schedule } from "@ember/runloop"; import Component from "@ember/component"; -import { - default as discourseComputed, - observes -} from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; import { iconHTML } from "discourse-common/lib/icon-library"; import { escape } from "pretty-text/sanitizer"; import ENV from "discourse-common/config/environment"; diff --git a/app/assets/javascripts/admin/components/watched-word-form.js.es6 b/app/assets/javascripts/admin/components/watched-word-form.js.es6 index 2359320ad62..fff5b86e266 100644 --- a/app/assets/javascripts/admin/components/watched-word-form.js.es6 +++ b/app/assets/javascripts/admin/components/watched-word-form.js.es6 @@ -2,8 +2,7 @@ import { isEmpty } from "@ember/utils"; import { schedule } from "@ember/runloop"; import Component from "@ember/component"; import WatchedWord from "admin/models/watched-word"; -import { - default as discourseComputed, +import discourseComputed, { on, observes } from "discourse-common/utils/decorators"; diff --git a/app/assets/javascripts/admin/controllers/admin-api-keys-new.js.es6 b/app/assets/javascripts/admin/controllers/admin-api-keys-new.js.es6 index e4f2869b21b..7bb679f2d0d 100644 --- a/app/assets/javascripts/admin/controllers/admin-api-keys-new.js.es6 +++ b/app/assets/javascripts/admin/controllers/admin-api-keys-new.js.es6 @@ -1,4 +1,4 @@ -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import { popupAjaxError } from "discourse/lib/ajax-error"; export default Ember.Controller.extend({ diff --git a/app/assets/javascripts/admin/controllers/admin-backups-index.js.es6 b/app/assets/javascripts/admin/controllers/admin-backups-index.js.es6 index e4e7c24d43e..01103105e84 100644 --- a/app/assets/javascripts/admin/controllers/admin-backups-index.js.es6 +++ b/app/assets/javascripts/admin/controllers/admin-backups-index.js.es6 @@ -2,7 +2,7 @@ import { alias, equal } from "@ember/object/computed"; import { inject } from "@ember/controller"; import Controller from "@ember/controller"; import { ajax } from "discourse/lib/ajax"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import { setting, i18n } from "discourse/lib/computed"; export default Controller.extend({ diff --git a/app/assets/javascripts/admin/controllers/admin-badges-show.js.es6 b/app/assets/javascripts/admin/controllers/admin-badges-show.js.es6 index 2511dcead19..140353e1435 100644 --- a/app/assets/javascripts/admin/controllers/admin-badges-show.js.es6 +++ b/app/assets/javascripts/admin/controllers/admin-badges-show.js.es6 @@ -1,4 +1,4 @@ -import discourseComputed from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; import { alias } from "@ember/object/computed"; import { inject } from "@ember/controller"; import Controller from "@ember/controller"; @@ -27,10 +27,11 @@ export default Controller.extend(bufferedProperty("model"), { return modelQuery && modelQuery.trim().length > 0; }, + @observes("model.id") _resetSaving: function() { this.set("saving", false); this.set("savingStatus", ""); - }.observes("model.id"), + }, actions: { save() { diff --git a/app/assets/javascripts/admin/controllers/admin-customize-colors.js.es6 b/app/assets/javascripts/admin/controllers/admin-customize-colors.js.es6 index 4fc2cf34f0f..869918bebbc 100644 --- a/app/assets/javascripts/admin/controllers/admin-customize-colors.js.es6 +++ b/app/assets/javascripts/admin/controllers/admin-customize-colors.js.es6 @@ -1,7 +1,7 @@ import EmberObject from "@ember/object"; import Controller from "@ember/controller"; import showModal from "discourse/lib/show-modal"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; export default Controller.extend({ @discourseComputed("model.@each.id") diff --git a/app/assets/javascripts/admin/controllers/admin-customize-themes-edit.js.es6 b/app/assets/javascripts/admin/controllers/admin-customize-themes-edit.js.es6 index 75d7a486f20..c3c0f4fc999 100644 --- a/app/assets/javascripts/admin/controllers/admin-customize-themes-edit.js.es6 +++ b/app/assets/javascripts/admin/controllers/admin-customize-themes-edit.js.es6 @@ -1,6 +1,6 @@ import Controller from "@ember/controller"; import { url } from "discourse/lib/computed"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; export default Controller.extend({ section: null, diff --git a/app/assets/javascripts/admin/controllers/admin-customize-themes-show.js.es6 b/app/assets/javascripts/admin/controllers/admin-customize-themes-show.js.es6 index cebdb192350..350ec2dd4f0 100644 --- a/app/assets/javascripts/admin/controllers/admin-customize-themes-show.js.es6 +++ b/app/assets/javascripts/admin/controllers/admin-customize-themes-show.js.es6 @@ -7,7 +7,7 @@ import { notEmpty } from "@ember/object/computed"; import Controller from "@ember/controller"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import { url } from "discourse/lib/computed"; import { popupAjaxError } from "discourse/lib/ajax-error"; import showModal from "discourse/lib/show-modal"; diff --git a/app/assets/javascripts/admin/controllers/admin-customize-themes.js.es6 b/app/assets/javascripts/admin/controllers/admin-customize-themes.js.es6 index f1d1f0d7159..e99532bf032 100644 --- a/app/assets/javascripts/admin/controllers/admin-customize-themes.js.es6 +++ b/app/assets/javascripts/admin/controllers/admin-customize-themes.js.es6 @@ -1,5 +1,5 @@ import Controller from "@ember/controller"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import { THEMES } from "admin/models/theme"; export default Controller.extend({ diff --git a/app/assets/javascripts/admin/controllers/admin-email-bounced.js.es6 b/app/assets/javascripts/admin/controllers/admin-email-bounced.js.es6 index 17cb8ed04fd..508bc559c57 100644 --- a/app/assets/javascripts/admin/controllers/admin-email-bounced.js.es6 +++ b/app/assets/javascripts/admin/controllers/admin-email-bounced.js.es6 @@ -1,8 +1,10 @@ import AdminEmailLogsController from "admin/controllers/admin-email-logs"; import discourseDebounce from "discourse/lib/debounce"; +import { observes } from "discourse-common/utils/decorators"; export default AdminEmailLogsController.extend({ + @observes("filter.{status,user,address,type}") filterEmailLogs: discourseDebounce(function() { this.loadLogs(); - }, 250).observes("filter.{status,user,address,type}") + }, 250) }); diff --git a/app/assets/javascripts/admin/controllers/admin-email-index.js.es6 b/app/assets/javascripts/admin/controllers/admin-email-index.js.es6 index 124c364af31..3433f6f55fe 100644 --- a/app/assets/javascripts/admin/controllers/admin-email-index.js.es6 +++ b/app/assets/javascripts/admin/controllers/admin-email-index.js.es6 @@ -1,6 +1,8 @@ import { empty } from "@ember/object/computed"; import Controller from "@ember/controller"; import { ajax } from "discourse/lib/ajax"; +import { observes } from "discourse-common/utils/decorators"; + export default Controller.extend({ /** Is the "send test email" button disabled? @@ -14,9 +16,10 @@ export default Controller.extend({ @method testEmailAddressChanged **/ + @observes("testEmailAddress") testEmailAddressChanged: function() { this.set("sentTestEmail", false); - }.observes("testEmailAddress"), + }, actions: { /** diff --git a/app/assets/javascripts/admin/controllers/admin-email-received.js.es6 b/app/assets/javascripts/admin/controllers/admin-email-received.js.es6 index 7dc733e00ce..4a3cc363dfe 100644 --- a/app/assets/javascripts/admin/controllers/admin-email-received.js.es6 +++ b/app/assets/javascripts/admin/controllers/admin-email-received.js.es6 @@ -1,11 +1,13 @@ import AdminEmailLogsController from "admin/controllers/admin-email-logs"; import discourseDebounce from "discourse/lib/debounce"; import IncomingEmail from "admin/models/incoming-email"; +import { observes } from "discourse-common/utils/decorators"; export default AdminEmailLogsController.extend({ + @observes("filter.{status,from,to,subject}") filterIncomingEmails: discourseDebounce(function() { this.loadLogs(IncomingEmail); - }, 250).observes("filter.{status,from,to,subject}"), + }, 250), actions: { loadMore() { diff --git a/app/assets/javascripts/admin/controllers/admin-email-rejected.js.es6 b/app/assets/javascripts/admin/controllers/admin-email-rejected.js.es6 index d70efb23ce7..8c6f6767f4f 100644 --- a/app/assets/javascripts/admin/controllers/admin-email-rejected.js.es6 +++ b/app/assets/javascripts/admin/controllers/admin-email-rejected.js.es6 @@ -1,11 +1,13 @@ import AdminEmailLogsController from "admin/controllers/admin-email-logs"; import discourseDebounce from "discourse/lib/debounce"; import IncomingEmail from "admin/models/incoming-email"; +import { observes } from "discourse-common/utils/decorators"; export default AdminEmailLogsController.extend({ + @observes("filter.{status,from,to,subject,error}") filterIncomingEmails: discourseDebounce(function() { this.loadLogs(IncomingEmail); - }, 250).observes("filter.{status,from,to,subject,error}"), + }, 250), actions: { loadMore() { diff --git a/app/assets/javascripts/admin/controllers/admin-email-sent.js.es6 b/app/assets/javascripts/admin/controllers/admin-email-sent.js.es6 index c7ddaa0043c..f727c9d6f44 100644 --- a/app/assets/javascripts/admin/controllers/admin-email-sent.js.es6 +++ b/app/assets/javascripts/admin/controllers/admin-email-sent.js.es6 @@ -1,8 +1,10 @@ import AdminEmailLogsController from "admin/controllers/admin-email-logs"; import discourseDebounce from "discourse/lib/debounce"; +import { observes } from "discourse-common/utils/decorators"; export default AdminEmailLogsController.extend({ + @observes("filter.{status,user,address,type,reply_key}") filterEmailLogs: discourseDebounce(function() { this.loadLogs(); - }, 250).observes("filter.{status,user,address,type,reply_key}") + }, 250) }); diff --git a/app/assets/javascripts/admin/controllers/admin-email-skipped.js.es6 b/app/assets/javascripts/admin/controllers/admin-email-skipped.js.es6 index 17cb8ed04fd..508bc559c57 100644 --- a/app/assets/javascripts/admin/controllers/admin-email-skipped.js.es6 +++ b/app/assets/javascripts/admin/controllers/admin-email-skipped.js.es6 @@ -1,8 +1,10 @@ import AdminEmailLogsController from "admin/controllers/admin-email-logs"; import discourseDebounce from "discourse/lib/debounce"; +import { observes } from "discourse-common/utils/decorators"; export default AdminEmailLogsController.extend({ + @observes("filter.{status,user,address,type}") filterEmailLogs: discourseDebounce(function() { this.loadLogs(); - }, 250).observes("filter.{status,user,address,type}") + }, 250) }); diff --git a/app/assets/javascripts/admin/controllers/admin-logs-screened-ip-addresses.js.es6 b/app/assets/javascripts/admin/controllers/admin-logs-screened-ip-addresses.js.es6 index e5da638f9af..baee177c02f 100644 --- a/app/assets/javascripts/admin/controllers/admin-logs-screened-ip-addresses.js.es6 +++ b/app/assets/javascripts/admin/controllers/admin-logs-screened-ip-addresses.js.es6 @@ -3,18 +3,20 @@ import discourseDebounce from "discourse/lib/debounce"; import { outputExportResult } from "discourse/lib/export-result"; import { exportEntity } from "discourse/lib/export-csv"; import ScreenedIpAddress from "admin/models/screened-ip-address"; +import { observes } from "discourse-common/utils/decorators"; export default Controller.extend({ loading: false, filter: null, savedIpAddress: null, + @observes("filter") show: discourseDebounce(function() { this.set("loading", true); ScreenedIpAddress.findAll(this.filter).then(result => { this.setProperties({ model: result, loading: false }); }); - }, 250).observes("filter"), + }, 250), actions: { allow(record) { diff --git a/app/assets/javascripts/admin/controllers/admin-logs-staff-action-logs.js.es6 b/app/assets/javascripts/admin/controllers/admin-logs-staff-action-logs.js.es6 index e559bc846f9..849861c9210 100644 --- a/app/assets/javascripts/admin/controllers/admin-logs-staff-action-logs.js.es6 +++ b/app/assets/javascripts/admin/controllers/admin-logs-staff-action-logs.js.es6 @@ -4,10 +4,7 @@ import { scheduleOnce } from "@ember/runloop"; import Controller from "@ember/controller"; import { exportEntity } from "discourse/lib/export-csv"; import { outputExportResult } from "discourse/lib/export-result"; -import { - default as discourseComputed, - on -} from "discourse-common/utils/decorators"; +import discourseComputed, { on } from "discourse-common/utils/decorators"; export default Controller.extend({ model: null, diff --git a/app/assets/javascripts/admin/controllers/admin-permalinks.js.es6 b/app/assets/javascripts/admin/controllers/admin-permalinks.js.es6 index 29c076c30cf..a45f8cc89ad 100644 --- a/app/assets/javascripts/admin/controllers/admin-permalinks.js.es6 +++ b/app/assets/javascripts/admin/controllers/admin-permalinks.js.es6 @@ -1,17 +1,19 @@ import Controller from "@ember/controller"; import discourseDebounce from "discourse/lib/debounce"; import Permalink from "admin/models/permalink"; +import { observes } from "discourse-common/utils/decorators"; export default Controller.extend({ loading: false, filter: null, + @observes("filter") show: discourseDebounce(function() { Permalink.findAll(this.filter).then(result => { this.set("model", result); this.set("loading", false); }); - }, 250).observes("filter"), + }, 250), actions: { recordAdded(arg) { diff --git a/app/assets/javascripts/admin/controllers/admin-site-settings.js.es6 b/app/assets/javascripts/admin/controllers/admin-site-settings.js.es6 index 052f7c567de..28721de995f 100644 --- a/app/assets/javascripts/admin/controllers/admin-site-settings.js.es6 +++ b/app/assets/javascripts/admin/controllers/admin-site-settings.js.es6 @@ -2,6 +2,7 @@ import { isEmpty } from "@ember/utils"; import { alias } from "@ember/object/computed"; import Controller from "@ember/controller"; import discourseDebounce from "discourse/lib/debounce"; +import { observes } from "discourse-common/utils/decorators"; export default Controller.extend({ filter: null, @@ -76,13 +77,14 @@ export default Controller.extend({ ); }, + @observes("filter", "onlyOverridden", "model") filterContent: discourseDebounce(function() { if (this._skipBounce) { this.set("_skipBounce", false); } else { this.filterContentNow(); } - }, 250).observes("filter", "onlyOverridden", "model"), + }, 250), actions: { clearFilter() { diff --git a/app/assets/javascripts/admin/controllers/admin-user-index.js.es6 b/app/assets/javascripts/admin/controllers/admin-user-index.js.es6 index 765e8d3686f..51d53509adb 100644 --- a/app/assets/javascripts/admin/controllers/admin-user-index.js.es6 +++ b/app/assets/javascripts/admin/controllers/admin-user-index.js.es6 @@ -6,7 +6,7 @@ import CanCheckEmails from "discourse/mixins/can-check-emails"; import { propertyNotEqual, setting } from "discourse/lib/computed"; import { userPath } from "discourse/lib/url"; import { popupAjaxError } from "discourse/lib/ajax-error"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import { fmt } from "discourse/lib/computed"; import { htmlSafe } from "@ember/template"; diff --git a/app/assets/javascripts/admin/controllers/admin-users-list-show.js.es6 b/app/assets/javascripts/admin/controllers/admin-users-list-show.js.es6 index 12d4724862a..8776fee466f 100644 --- a/app/assets/javascripts/admin/controllers/admin-users-list-show.js.es6 +++ b/app/assets/javascripts/admin/controllers/admin-users-list-show.js.es6 @@ -1,4 +1,4 @@ -import discourseComputed from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; import Controller from "@ember/controller"; import discourseDebounce from "discourse/lib/debounce"; import { i18n } from "discourse/lib/computed"; @@ -29,9 +29,10 @@ export default Controller.extend(CanCheckEmails, { return I18n.t("admin.users.titles." + query); }, + @observes("listFilter") _filterUsers: discourseDebounce(function() { this.resetFilters(); - }, 250).observes("listFilter"), + }, 250), resetFilters() { this._page = 1; diff --git a/app/assets/javascripts/admin/controllers/admin-watched-words.js.es6 b/app/assets/javascripts/admin/controllers/admin-watched-words.js.es6 index 84a7ac79393..dbc2afe1dc8 100644 --- a/app/assets/javascripts/admin/controllers/admin-watched-words.js.es6 +++ b/app/assets/javascripts/admin/controllers/admin-watched-words.js.es6 @@ -3,6 +3,7 @@ import { alias } from "@ember/object/computed"; import EmberObject from "@ember/object"; import Controller from "@ember/controller"; import discourseDebounce from "discourse/lib/debounce"; +import { observes } from "discourse-common/utils/decorators"; export default Controller.extend({ filter: null, @@ -43,10 +44,11 @@ export default Controller.extend({ this.set("model", matchesByAction); }, + @observes("filter") filterContent: discourseDebounce(function() { this.filterContentNow(); this.set("filtered", !isEmpty(this.filter)); - }, 250).observes("filter"), + }, 250), actions: { clearFilter() { diff --git a/app/assets/javascripts/admin/controllers/modals/admin-add-upload.js.es6 b/app/assets/javascripts/admin/controllers/modals/admin-add-upload.js.es6 index bd246d93713..c7d9447d8d4 100644 --- a/app/assets/javascripts/admin/controllers/modals/admin-add-upload.js.es6 +++ b/app/assets/javascripts/admin/controllers/modals/admin-add-upload.js.es6 @@ -4,10 +4,7 @@ import { inject } from "@ember/controller"; import Controller from "@ember/controller"; import ModalFunctionality from "discourse/mixins/modal-functionality"; import { ajax } from "discourse/lib/ajax"; -import { - default as discourseComputed, - observes -} from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; import { popupAjaxError } from "discourse/lib/ajax-error"; const THEME_FIELD_VARIABLE_TYPE_IDS = [2, 3, 4]; diff --git a/app/assets/javascripts/admin/controllers/modals/admin-badge-preview.js.es6 b/app/assets/javascripts/admin/controllers/modals/admin-badge-preview.js.es6 index 67450978d79..84325f90d17 100644 --- a/app/assets/javascripts/admin/controllers/modals/admin-badge-preview.js.es6 +++ b/app/assets/javascripts/admin/controllers/modals/admin-badge-preview.js.es6 @@ -1,6 +1,6 @@ import { alias, map } from "@ember/object/computed"; import Controller from "@ember/controller"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import { escapeExpression } from "discourse/lib/utilities"; export default Controller.extend({ diff --git a/app/assets/javascripts/admin/controllers/modals/admin-install-theme.js.es6 b/app/assets/javascripts/admin/controllers/modals/admin-install-theme.js.es6 index 9aee44f72e6..cfb61ccc8fd 100644 --- a/app/assets/javascripts/admin/controllers/modals/admin-install-theme.js.es6 +++ b/app/assets/javascripts/admin/controllers/modals/admin-install-theme.js.es6 @@ -4,10 +4,7 @@ import Controller from "@ember/controller"; import ModalFunctionality from "discourse/mixins/modal-functionality"; import { ajax } from "discourse/lib/ajax"; import { popupAjaxError } from "discourse/lib/ajax-error"; -import { - default as discourseComputed, - observes -} from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; import { THEMES, COMPONENTS } from "admin/models/theme"; import { POPULAR_THEMES } from "discourse-common/helpers/popular-themes"; import { set } from "@ember/object"; diff --git a/app/assets/javascripts/admin/controllers/modals/admin-watched-word-test.js.es6 b/app/assets/javascripts/admin/controllers/modals/admin-watched-word-test.js.es6 index 9d9b73072dc..a3de68d4cd8 100644 --- a/app/assets/javascripts/admin/controllers/modals/admin-watched-word-test.js.es6 +++ b/app/assets/javascripts/admin/controllers/modals/admin-watched-word-test.js.es6 @@ -1,5 +1,5 @@ import Controller from "@ember/controller"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import ModalFunctionality from "discourse/mixins/modal-functionality"; export default Controller.extend(ModalFunctionality, { diff --git a/app/assets/javascripts/admin/models/color-scheme-color.js.es6 b/app/assets/javascripts/admin/models/color-scheme-color.js.es6 index 2e4907ef9fe..f1aa235a4b2 100644 --- a/app/assets/javascripts/admin/models/color-scheme-color.js.es6 +++ b/app/assets/javascripts/admin/models/color-scheme-color.js.es6 @@ -1,5 +1,4 @@ -import { - default as discourseComputed, +import discourseComputed, { observes, on } from "discourse-common/utils/decorators"; diff --git a/app/assets/javascripts/admin/models/theme.js.es6 b/app/assets/javascripts/admin/models/theme.js.es6 index d1528bcd06a..7385aaf630a 100644 --- a/app/assets/javascripts/admin/models/theme.js.es6 +++ b/app/assets/javascripts/admin/models/theme.js.es6 @@ -2,7 +2,7 @@ import { get } from "@ember/object"; import { isEmpty } from "@ember/utils"; import { or, gt } from "@ember/object/computed"; import RestModel from "discourse/models/rest"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import { popupAjaxError } from "discourse/lib/ajax-error"; import { ajax } from "discourse/lib/ajax"; import { escapeExpression } from "discourse/lib/utilities"; diff --git a/app/assets/javascripts/admin/models/web-hook.js.es6 b/app/assets/javascripts/admin/models/web-hook.js.es6 index 74fd93a5f3c..b727ea59d10 100644 --- a/app/assets/javascripts/admin/models/web-hook.js.es6 +++ b/app/assets/javascripts/admin/models/web-hook.js.es6 @@ -2,10 +2,7 @@ import { isEmpty } from "@ember/utils"; import RestModel from "discourse/models/rest"; import Category from "discourse/models/category"; import Group from "discourse/models/group"; -import { - default as discourseComputed, - observes -} from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; import Site from "discourse/models/site"; export default RestModel.extend({ diff --git a/app/assets/javascripts/admin/routes/admin-email-preview-digest.js.es6 b/app/assets/javascripts/admin/routes/admin-email-preview-digest.js.es6 index 391ec6c75bc..56464eaf8bf 100644 --- a/app/assets/javascripts/admin/routes/admin-email-preview-digest.js.es6 +++ b/app/assets/javascripts/admin/routes/admin-email-preview-digest.js.es6 @@ -1,8 +1,5 @@ import DiscourseRoute from "discourse/routes/discourse"; -import { - default as EmailPreview, - oneWeekAgo -} from "admin/models/email-preview"; +import EmailPreview, { oneWeekAgo } from "admin/models/email-preview"; export default DiscourseRoute.extend({ model() { diff --git a/app/assets/javascripts/discourse.js.es6 b/app/assets/javascripts/discourse.js.es6 index 38ea5dd7bbd..7b21f2bec66 100644 --- a/app/assets/javascripts/discourse.js.es6 +++ b/app/assets/javascripts/discourse.js.es6 @@ -1,9 +1,6 @@ /*global Mousetrap:true*/ import { buildResolver } from "discourse-common/resolver"; -import { - default as discourseComputed, - observes -} from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; import { computed } from "@ember/object"; import FocusEvent from "discourse-common/mixins/focus-event"; import EmberObject from "@ember/object"; diff --git a/app/assets/javascripts/discourse/components/badge-selector.js.es6 b/app/assets/javascripts/discourse/components/badge-selector.js.es6 index 3e02b0740e6..0f5c22941bf 100644 --- a/app/assets/javascripts/discourse/components/badge-selector.js.es6 +++ b/app/assets/javascripts/discourse/components/badge-selector.js.es6 @@ -1,8 +1,7 @@ import Component from "@ember/component"; -import { +import discourseComputed, { on, - observes, - default as discourseComputed + observes } from "discourse-common/utils/decorators"; import { findRawTemplate } from "discourse/lib/raw-templates"; const { makeArray } = Ember; diff --git a/app/assets/javascripts/discourse/components/basic-topic-list.js.es6 b/app/assets/javascripts/discourse/components/basic-topic-list.js.es6 index be4ec964c2b..81c08adf61b 100644 --- a/app/assets/javascripts/discourse/components/basic-topic-list.js.es6 +++ b/app/assets/javascripts/discourse/components/basic-topic-list.js.es6 @@ -1,4 +1,4 @@ -import discourseComputed from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; import { alias, not } from "@ember/object/computed"; import Component from "@ember/component"; @@ -16,9 +16,10 @@ export default Component.extend({ } }, + @observes("topicList.[]") _topicListChanged: function() { this._initFromTopicList(this.topicList); - }.observes("topicList.[]"), + }, _initFromTopicList(topicList) { if (topicList !== null) { diff --git a/app/assets/javascripts/discourse/components/bread-crumbs.js.es6 b/app/assets/javascripts/discourse/components/bread-crumbs.js.es6 index 9d00a252721..d8eeba3b012 100644 --- a/app/assets/javascripts/discourse/components/bread-crumbs.js.es6 +++ b/app/assets/javascripts/discourse/components/bread-crumbs.js.es6 @@ -1,6 +1,6 @@ import { filter } from "@ember/object/computed"; import Component from "@ember/component"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import deprecated from "discourse-common/lib/deprecated"; // A breadcrumb including category drop downs diff --git a/app/assets/javascripts/discourse/components/composer-action-title.js.es6 b/app/assets/javascripts/discourse/components/composer-action-title.js.es6 index 996b409f6b8..86a968154a9 100644 --- a/app/assets/javascripts/discourse/components/composer-action-title.js.es6 +++ b/app/assets/javascripts/discourse/components/composer-action-title.js.es6 @@ -1,6 +1,6 @@ import { alias, equal } from "@ember/object/computed"; import Component from "@ember/component"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import { PRIVATE_MESSAGE, CREATE_TOPIC, diff --git a/app/assets/javascripts/discourse/components/composer-body.js.es6 b/app/assets/javascripts/discourse/components/composer-body.js.es6 index a08e03914e4..9684e9f8db1 100644 --- a/app/assets/javascripts/discourse/components/composer-body.js.es6 +++ b/app/assets/javascripts/discourse/components/composer-body.js.es6 @@ -4,10 +4,7 @@ import { cancel } from "@ember/runloop"; import { scheduleOnce } from "@ember/runloop"; import { later } from "@ember/runloop"; import Component from "@ember/component"; -import { - default as discourseComputed, - observes -} from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; import Composer from "discourse/models/composer"; import afterTransition from "discourse/lib/after-transition"; import positioningWorkaround from "discourse/lib/safari-hacks"; diff --git a/app/assets/javascripts/discourse/components/composer-editor.js.es6 b/app/assets/javascripts/discourse/components/composer-editor.js.es6 index 0881f577b93..3304b007cce 100644 --- a/app/assets/javascripts/discourse/components/composer-editor.js.es6 +++ b/app/assets/javascripts/discourse/components/composer-editor.js.es6 @@ -5,8 +5,7 @@ import { scheduleOnce } from "@ember/runloop"; import { later } from "@ember/runloop"; import Component from "@ember/component"; import userSearch from "discourse/lib/user-search"; -import { - default as discourseComputed, +import discourseComputed, { observes, on } from "discourse-common/utils/decorators"; diff --git a/app/assets/javascripts/discourse/components/composer-title.js.es6 b/app/assets/javascripts/discourse/components/composer-title.js.es6 index 2eb06cb0711..bd559a59f10 100644 --- a/app/assets/javascripts/discourse/components/composer-title.js.es6 +++ b/app/assets/javascripts/discourse/components/composer-title.js.es6 @@ -3,10 +3,7 @@ import { next } from "@ember/runloop"; import { debounce } from "@ember/runloop"; import { schedule } from "@ember/runloop"; import Component from "@ember/component"; -import { - default as discourseComputed, - observes -} from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; import { load } from "pretty-text/oneboxer"; import { lookupCache } from "pretty-text/oneboxer-cache"; import { ajax } from "discourse/lib/ajax"; diff --git a/app/assets/javascripts/discourse/components/composer-user-selector.js.es6 b/app/assets/javascripts/discourse/components/composer-user-selector.js.es6 index 14ca7e35567..913a9356f7b 100644 --- a/app/assets/javascripts/discourse/components/composer-user-selector.js.es6 +++ b/app/assets/javascripts/discourse/components/composer-user-selector.js.es6 @@ -1,9 +1,6 @@ import { schedule } from "@ember/runloop"; import Component from "@ember/component"; -import { - default as discourseComputed, - observes -} from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; export default Component.extend({ showSelector: true, diff --git a/app/assets/javascripts/discourse/components/d-button.js.es6 b/app/assets/javascripts/discourse/components/d-button.js.es6 index 1d0c9d04f80..12104321278 100644 --- a/app/assets/javascripts/discourse/components/d-button.js.es6 +++ b/app/assets/javascripts/discourse/components/d-button.js.es6 @@ -1,6 +1,6 @@ import { notEmpty, empty, equal } from "@ember/object/computed"; import Component from "@ember/component"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import DiscourseURL from "discourse/lib/url"; export default Component.extend({ diff --git a/app/assets/javascripts/discourse/components/d-editor.js.es6 b/app/assets/javascripts/discourse/components/d-editor.js.es6 index 1c3c18bc571..48c788c0bf0 100644 --- a/app/assets/javascripts/discourse/components/d-editor.js.es6 +++ b/app/assets/javascripts/discourse/components/d-editor.js.es6 @@ -6,8 +6,7 @@ import { later } from "@ember/runloop"; import { inject as service } from "@ember/service"; import Component from "@ember/component"; /*global Mousetrap:true */ -import { - default as discourseComputed, +import discourseComputed, { on, observes } from "discourse-common/utils/decorators"; diff --git a/app/assets/javascripts/discourse/components/date-input.js.es6 b/app/assets/javascripts/discourse/components/date-input.js.es6 index 7d56b964a20..9da5a5e16c9 100644 --- a/app/assets/javascripts/discourse/components/date-input.js.es6 +++ b/app/assets/javascripts/discourse/components/date-input.js.es6 @@ -2,10 +2,7 @@ import { next } from "@ember/runloop"; import Component from "@ember/component"; /* global Pikaday:true */ import loadScript from "discourse/lib/load-script"; -import { - default as discourseComputed, - on -} from "discourse-common/utils/decorators"; +import discourseComputed, { on } from "discourse-common/utils/decorators"; export default Component.extend({ classNames: ["d-date-input"], diff --git a/app/assets/javascripts/discourse/components/date-picker.js.es6 b/app/assets/javascripts/discourse/components/date-picker.js.es6 index 8ca644e9520..4a32928ac02 100644 --- a/app/assets/javascripts/discourse/components/date-picker.js.es6 +++ b/app/assets/javascripts/discourse/components/date-picker.js.es6 @@ -2,10 +2,7 @@ import { next } from "@ember/runloop"; import Component from "@ember/component"; /* global Pikaday:true */ import loadScript from "discourse/lib/load-script"; -import { - default as discourseComputed, - on -} from "discourse-common/utils/decorators"; +import discourseComputed, { on } from "discourse-common/utils/decorators"; const DATE_FORMAT = "YYYY-MM-DD"; diff --git a/app/assets/javascripts/discourse/components/discourse-linked-text.js.es6 b/app/assets/javascripts/discourse/components/discourse-linked-text.js.es6 index 85d6fd3cb94..55240d4ee2b 100644 --- a/app/assets/javascripts/discourse/components/discourse-linked-text.js.es6 +++ b/app/assets/javascripts/discourse/components/discourse-linked-text.js.es6 @@ -1,5 +1,5 @@ import Component from "@ember/component"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; export default Component.extend({ tagName: "span", diff --git a/app/assets/javascripts/discourse/components/edit-category-images.js.es6 b/app/assets/javascripts/discourse/components/edit-category-images.js.es6 index 94956edf365..953a1a62e7d 100644 --- a/app/assets/javascripts/discourse/components/edit-category-images.js.es6 +++ b/app/assets/javascripts/discourse/components/edit-category-images.js.es6 @@ -1,6 +1,6 @@ import EmberObject from "@ember/object"; import { buildCategoryPanel } from "discourse/components/edit-category-panel"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; export default buildCategoryPanel("images").extend({ @discourseComputed("category.uploaded_background.url") diff --git a/app/assets/javascripts/discourse/components/edit-category-topic-template.js.es6 b/app/assets/javascripts/discourse/components/edit-category-topic-template.js.es6 index c3254cc3d6e..9a5d7d7ab1b 100644 --- a/app/assets/javascripts/discourse/components/edit-category-topic-template.js.es6 +++ b/app/assets/javascripts/discourse/components/edit-category-topic-template.js.es6 @@ -1,12 +1,14 @@ import { scheduleOnce } from "@ember/runloop"; import { buildCategoryPanel } from "discourse/components/edit-category-panel"; +import { observes } from "discourse-common/utils/decorators"; export default buildCategoryPanel("topic-template", { + @observes("activeTab") _activeTabChanged: function() { if (this.activeTab) { scheduleOnce("afterRender", () => this.element.querySelector(".d-editor-input").focus() ); } - }.observes("activeTab") + } }); diff --git a/app/assets/javascripts/discourse/components/edit-topic-timer-form.js.es6 b/app/assets/javascripts/discourse/components/edit-topic-timer-form.js.es6 index 00fa6b2bad3..18f2ac04f0c 100644 --- a/app/assets/javascripts/discourse/components/edit-topic-timer-form.js.es6 +++ b/app/assets/javascripts/discourse/components/edit-topic-timer-form.js.es6 @@ -2,8 +2,7 @@ import { isEmpty } from "@ember/utils"; import { alias, equal, or } from "@ember/object/computed"; import { schedule } from "@ember/runloop"; import Component from "@ember/component"; -import { - default as discourseComputed, +import discourseComputed, { observes, on } from "discourse-common/utils/decorators"; diff --git a/app/assets/javascripts/discourse/components/emoji-uploader.js.es6 b/app/assets/javascripts/discourse/components/emoji-uploader.js.es6 index fa7ee8fd105..77e2d5e9ffa 100644 --- a/app/assets/javascripts/discourse/components/emoji-uploader.js.es6 +++ b/app/assets/javascripts/discourse/components/emoji-uploader.js.es6 @@ -1,6 +1,6 @@ import { notEmpty, not } from "@ember/object/computed"; import Component from "@ember/component"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import UploadMixin from "discourse/mixins/upload"; export default Component.extend(UploadMixin, { diff --git a/app/assets/javascripts/discourse/components/flat-button.js.es6 b/app/assets/javascripts/discourse/components/flat-button.js.es6 index af444220255..f2f38fdc278 100644 --- a/app/assets/javascripts/discourse/components/flat-button.js.es6 +++ b/app/assets/javascripts/discourse/components/flat-button.js.es6 @@ -1,5 +1,5 @@ import Component from "@ember/component"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; export default Component.extend({ tagName: "button", diff --git a/app/assets/javascripts/discourse/components/future-date-input.js.es6 b/app/assets/javascripts/discourse/components/future-date-input.js.es6 index 05313f8ea0a..2c1bb70b54c 100644 --- a/app/assets/javascripts/discourse/components/future-date-input.js.es6 +++ b/app/assets/javascripts/discourse/components/future-date-input.js.es6 @@ -1,10 +1,7 @@ import { isEmpty } from "@ember/utils"; import { equal, and, empty } from "@ember/object/computed"; import Component from "@ember/component"; -import { - default as discourseComputed, - observes -} from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; import { FORMAT } from "select-kit/components/future-date-input-selector"; import { PUBLISH_TO_CATEGORY_STATUS_TYPE } from "discourse/controllers/edit-topic-timer"; diff --git a/app/assets/javascripts/discourse/components/group-card-contents.js.es6 b/app/assets/javascripts/discourse/components/group-card-contents.js.es6 index 1838b32352a..38565e2a764 100644 --- a/app/assets/javascripts/discourse/components/group-card-contents.js.es6 +++ b/app/assets/javascripts/discourse/components/group-card-contents.js.es6 @@ -1,7 +1,7 @@ import { alias, match, gt, or } from "@ember/object/computed"; import Component from "@ember/component"; import { setting } from "discourse/lib/computed"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import CardContentsBase from "discourse/mixins/card-contents-base"; import CleansUp from "discourse/mixins/cleans-up"; import { groupPath } from "discourse/lib/url"; diff --git a/app/assets/javascripts/discourse/components/group-membership-button.js.es6 b/app/assets/javascripts/discourse/components/group-membership-button.js.es6 index 7c4abeda18c..3b722da4cc4 100644 --- a/app/assets/javascripts/discourse/components/group-membership-button.js.es6 +++ b/app/assets/javascripts/discourse/components/group-membership-button.js.es6 @@ -1,5 +1,5 @@ import Component from "@ember/component"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import { popupAjaxError } from "discourse/lib/ajax-error"; import showModal from "discourse/lib/show-modal"; diff --git a/app/assets/javascripts/discourse/components/group-selector.js.es6 b/app/assets/javascripts/discourse/components/group-selector.js.es6 index 54b789664b4..74c1c4b16f5 100644 --- a/app/assets/javascripts/discourse/components/group-selector.js.es6 +++ b/app/assets/javascripts/discourse/components/group-selector.js.es6 @@ -1,9 +1,8 @@ import { isEmpty } from "@ember/utils"; import Component from "@ember/component"; -import { +import discourseComputed, { on, - observes, - default as discourseComputed + observes } from "discourse-common/utils/decorators"; import { findRawTemplate } from "discourse/lib/raw-templates"; diff --git a/app/assets/javascripts/discourse/components/groups-form-interaction-fields.js.es6 b/app/assets/javascripts/discourse/components/groups-form-interaction-fields.js.es6 index f3ba2d92a4c..62a7d17ecea 100644 --- a/app/assets/javascripts/discourse/components/groups-form-interaction-fields.js.es6 +++ b/app/assets/javascripts/discourse/components/groups-form-interaction-fields.js.es6 @@ -1,5 +1,5 @@ import Component from "@ember/component"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; export default Component.extend({ init() { diff --git a/app/assets/javascripts/discourse/components/groups-form-profile-fields.js.es6 b/app/assets/javascripts/discourse/components/groups-form-profile-fields.js.es6 index fda6dd8ec62..988e4ac843f 100644 --- a/app/assets/javascripts/discourse/components/groups-form-profile-fields.js.es6 +++ b/app/assets/javascripts/discourse/components/groups-form-profile-fields.js.es6 @@ -1,10 +1,7 @@ import { isEmpty } from "@ember/utils"; import { not } from "@ember/object/computed"; import Component from "@ember/component"; -import { - default as discourseComputed, - observes -} from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; import Group from "discourse/models/group"; import { popupAjaxError } from "discourse/lib/ajax-error"; import discourseDebounce from "discourse/lib/debounce"; diff --git a/app/assets/javascripts/discourse/components/navigation-bar.js.es6 b/app/assets/javascripts/discourse/components/navigation-bar.js.es6 index 60517263957..3da0001ad98 100644 --- a/app/assets/javascripts/discourse/components/navigation-bar.js.es6 +++ b/app/assets/javascripts/discourse/components/navigation-bar.js.es6 @@ -1,9 +1,6 @@ import { next } from "@ember/runloop"; import Component from "@ember/component"; -import { - default as discourseComputed, - observes -} from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; import DiscourseURL from "discourse/lib/url"; import { renderedConnectorsFor } from "discourse/lib/plugin-connectors"; import FilterModeMixin from "discourse/mixins/filter-mode"; diff --git a/app/assets/javascripts/discourse/components/notification-consent-banner.js.es6 b/app/assets/javascripts/discourse/components/notification-consent-banner.js.es6 index 1ffb99c0c27..97ee9b0aa7d 100644 --- a/app/assets/javascripts/discourse/components/notification-consent-banner.js.es6 +++ b/app/assets/javascripts/discourse/components/notification-consent-banner.js.es6 @@ -1,6 +1,6 @@ -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import { keyValueStore as pushNotificationKeyValueStore } from "discourse/lib/push-notifications"; -import { default as DesktopNotificationConfig } from "discourse/components/desktop-notification-config"; +import DesktopNotificationConfig from "discourse/components/desktop-notification-config"; const userDismissedPromptKey = "dismissed-prompt"; diff --git a/app/assets/javascripts/discourse/components/popup-input-tip.js.es6 b/app/assets/javascripts/discourse/components/popup-input-tip.js.es6 index 6254fe2f1e8..08f6cf39af4 100644 --- a/app/assets/javascripts/discourse/components/popup-input-tip.js.es6 +++ b/app/assets/javascripts/discourse/components/popup-input-tip.js.es6 @@ -1,10 +1,7 @@ import { alias, not } from "@ember/object/computed"; import Component from "@ember/component"; import { iconHTML } from "discourse-common/lib/icon-library"; -import { - default as discourseComputed, - observes -} from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; export default Component.extend({ classNameBindings: [":popup-tip", "good", "bad", "lastShownAt::hide"], diff --git a/app/assets/javascripts/discourse/components/pwa-install-banner.js.es6 b/app/assets/javascripts/discourse/components/pwa-install-banner.js.es6 index cb11ef38b71..1dd4bef3961 100644 --- a/app/assets/javascripts/discourse/components/pwa-install-banner.js.es6 +++ b/app/assets/javascripts/discourse/components/pwa-install-banner.js.es6 @@ -1,9 +1,6 @@ import { bind } from "@ember/runloop"; import Component from "@ember/component"; -import { - default as discourseComputed, - on -} from "discourse-common/utils/decorators"; +import discourseComputed, { on } from "discourse-common/utils/decorators"; const USER_DISMISSED_PROMPT_KEY = "dismissed-pwa-install-banner"; diff --git a/app/assets/javascripts/discourse/components/reviewable-user.js.es6 b/app/assets/javascripts/discourse/components/reviewable-user.js.es6 index 3dd30433712..5feb5d84f26 100644 --- a/app/assets/javascripts/discourse/components/reviewable-user.js.es6 +++ b/app/assets/javascripts/discourse/components/reviewable-user.js.es6 @@ -1,5 +1,5 @@ import Component from "@ember/component"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; export default Component.extend({ @discourseComputed("reviewable.user_fields") diff --git a/app/assets/javascripts/discourse/components/share-panel.js.es6 b/app/assets/javascripts/discourse/components/share-panel.js.es6 index 97e09c225eb..78bc76db23b 100644 --- a/app/assets/javascripts/discourse/components/share-panel.js.es6 +++ b/app/assets/javascripts/discourse/components/share-panel.js.es6 @@ -3,7 +3,7 @@ import { alias } from "@ember/object/computed"; import { schedule } from "@ember/runloop"; import Component from "@ember/component"; import { escapeExpression } from "discourse/lib/utilities"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import Sharing from "discourse/lib/sharing"; export default Component.extend({ diff --git a/app/assets/javascripts/discourse/components/share-popup.js.es6 b/app/assets/javascripts/discourse/components/share-popup.js.es6 index c2174068bdc..ba32b26585f 100644 --- a/app/assets/javascripts/discourse/components/share-popup.js.es6 +++ b/app/assets/javascripts/discourse/components/share-popup.js.es6 @@ -4,10 +4,7 @@ import { scheduleOnce } from "@ember/runloop"; import Component from "@ember/component"; import { wantsNewWindow } from "discourse/lib/intercept-click"; import { longDateNoYear } from "discourse/lib/formatter"; -import { - default as discourseComputed, - on -} from "discourse-common/utils/decorators"; +import discourseComputed, { on } from "discourse-common/utils/decorators"; import Sharing from "discourse/lib/sharing"; import { nativeShare } from "discourse/lib/pwa-utils"; diff --git a/app/assets/javascripts/discourse/components/tag-info.js.es6 b/app/assets/javascripts/discourse/components/tag-info.js.es6 index da1acd10a0f..93a7ea0f6e8 100644 --- a/app/assets/javascripts/discourse/components/tag-info.js.es6 +++ b/app/assets/javascripts/discourse/components/tag-info.js.es6 @@ -1,7 +1,7 @@ import { ajax } from "discourse/lib/ajax"; import { popupAjaxError } from "discourse/lib/ajax-error"; import showModal from "discourse/lib/show-modal"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import Component from "@ember/component"; import { reads, and } from "@ember/object/computed"; import { isEmpty } from "@ember/utils"; diff --git a/app/assets/javascripts/discourse/components/topic-join-group-notice.js.es6 b/app/assets/javascripts/discourse/components/topic-join-group-notice.js.es6 index 4a55fb8886c..07db8b0fa82 100644 --- a/app/assets/javascripts/discourse/components/topic-join-group-notice.js.es6 +++ b/app/assets/javascripts/discourse/components/topic-join-group-notice.js.es6 @@ -1,5 +1,5 @@ import Component from "@ember/component"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; export default Component.extend({ classNames: ["topic-notice"], diff --git a/app/assets/javascripts/discourse/components/topic-list.js.es6 b/app/assets/javascripts/discourse/components/topic-list.js.es6 index d744b28a706..b4661eb68d3 100644 --- a/app/assets/javascripts/discourse/components/topic-list.js.es6 +++ b/app/assets/javascripts/discourse/components/topic-list.js.es6 @@ -1,10 +1,7 @@ import { alias, reads } from "@ember/object/computed"; import { schedule } from "@ember/runloop"; import Component from "@ember/component"; -import { - default as discourseComputed, - observes -} from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; import LoadMore from "discourse/mixins/load-more"; import { on } from "@ember/object/evented"; diff --git a/app/assets/javascripts/discourse/components/topic-progress.js.es6 b/app/assets/javascripts/discourse/components/topic-progress.js.es6 index 3e055c96ed1..61c4484be4b 100644 --- a/app/assets/javascripts/discourse/components/topic-progress.js.es6 +++ b/app/assets/javascripts/discourse/components/topic-progress.js.es6 @@ -1,10 +1,7 @@ import { alias } from "@ember/object/computed"; import { scheduleOnce } from "@ember/runloop"; import Component from "@ember/component"; -import { - default as discourseComputed, - observes -} from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; export default Component.extend({ elementId: "topic-progress-wrapper", diff --git a/app/assets/javascripts/discourse/components/track-selected.js.es6 b/app/assets/javascripts/discourse/components/track-selected.js.es6 index 241cb64c7c8..e8d0ec3428b 100644 --- a/app/assets/javascripts/discourse/components/track-selected.js.es6 +++ b/app/assets/javascripts/discourse/components/track-selected.js.es6 @@ -1,6 +1,10 @@ import Component from "@ember/component"; +import { observes } from "discourse-common/utils/decorators"; + export default Component.extend({ tagName: "span", + + @observes("selected") selectionChanged: function() { const selected = this.selected; const list = this.selectedList; @@ -11,5 +15,5 @@ export default Component.extend({ } else { list.removeObject(id); } - }.observes("selected") + } }); diff --git a/app/assets/javascripts/discourse/components/user-card-contents.js.es6 b/app/assets/javascripts/discourse/components/user-card-contents.js.es6 index 6607fe7961e..6d76c153062 100644 --- a/app/assets/javascripts/discourse/components/user-card-contents.js.es6 +++ b/app/assets/javascripts/discourse/components/user-card-contents.js.es6 @@ -2,10 +2,7 @@ import { isEmpty } from "@ember/utils"; import { alias, gte, and, gt, not, or } from "@ember/object/computed"; import EmberObject from "@ember/object"; import Component from "@ember/component"; -import { - default as discourseComputed, - observes -} from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; import User from "discourse/models/user"; import { propertyNotEqual, setting } from "discourse/lib/computed"; import { durationTiny } from "discourse/lib/formatter"; diff --git a/app/assets/javascripts/discourse/components/user-stream.js.es6 b/app/assets/javascripts/discourse/components/user-stream.js.es6 index 79543dd394b..62d9fe7f0d8 100644 --- a/app/assets/javascripts/discourse/components/user-stream.js.es6 +++ b/app/assets/javascripts/discourse/components/user-stream.js.es6 @@ -7,6 +7,7 @@ import DiscourseURL from "discourse/lib/url"; import Draft from "discourse/models/draft"; import { popupAjaxError } from "discourse/lib/ajax-error"; import { getOwner } from "discourse-common/lib/get-owner"; +import { observes } from "discourse-common/utils/decorators"; import { on } from "@ember/object/evented"; export default Component.extend(LoadMore, { @@ -24,9 +25,10 @@ export default Component.extend(LoadMore, { eyelineSelector: ".user-stream .item", classNames: ["user-stream"], + @observes("stream.user.id") _scrollTopOnModelChange: function() { schedule("afterRender", () => $(document).scrollTop(0)); - }.observes("stream.user.id"), + }, _inserted: on("didInsertElement", function() { this.bindScrolling({ name: "user-stream-view" }); diff --git a/app/assets/javascripts/discourse/controllers/badges/show.js.es6 b/app/assets/javascripts/discourse/controllers/badges/show.js.es6 index 807ea2b596b..e9d70aa80fa 100644 --- a/app/assets/javascripts/discourse/controllers/badges/show.js.es6 +++ b/app/assets/javascripts/discourse/controllers/badges/show.js.es6 @@ -3,10 +3,7 @@ import EmberObject from "@ember/object"; import Controller from "@ember/controller"; import Badge from "discourse/models/badge"; import UserBadge from "discourse/models/user-badge"; -import { - default as discourseComputed, - observes -} from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; export default Controller.extend({ queryParams: ["username"], diff --git a/app/assets/javascripts/discourse/controllers/composer.js.es6 b/app/assets/javascripts/discourse/controllers/composer.js.es6 index 33f5d66bb59..6e5f10f3f1a 100644 --- a/app/assets/javascripts/discourse/controllers/composer.js.es6 +++ b/app/assets/javascripts/discourse/controllers/composer.js.es6 @@ -8,8 +8,7 @@ import DiscourseURL from "discourse/lib/url"; import Quote from "discourse/lib/quote"; import Draft from "discourse/models/draft"; import Composer from "discourse/models/composer"; -import { - default as discourseComputed, +import discourseComputed, { observes, on } from "discourse-common/utils/decorators"; diff --git a/app/assets/javascripts/discourse/controllers/create-account.js.es6 b/app/assets/javascripts/discourse/controllers/create-account.js.es6 index 5bfe1ec1398..84b3171cd65 100644 --- a/app/assets/javascripts/discourse/controllers/create-account.js.es6 +++ b/app/assets/javascripts/discourse/controllers/create-account.js.es6 @@ -5,8 +5,8 @@ import Controller from "@ember/controller"; import { ajax } from "discourse/lib/ajax"; import ModalFunctionality from "discourse/mixins/modal-functionality"; import { setting } from "discourse/lib/computed"; -import { - default as discourseComputed, +import discourseComputed, { + observes, on } from "discourse-common/utils/decorators"; import { emailValid } from "discourse/lib/utilities"; @@ -171,6 +171,7 @@ export default Controller.extend( : providerName; }, + @observes("emailValidation", "accountEmail") prefillUsername: function() { if (this.prefilledUsername) { // If username field has been filled automatically, and email field just changed, @@ -189,7 +190,7 @@ export default Controller.extend( // then look for a registered username that matches the email. this.fetchExistingUsername(); } - }.observes("emailValidation", "accountEmail"), + }, // Determines whether at least one login button is enabled @discourseComputed diff --git a/app/assets/javascripts/discourse/controllers/discovery.js.es6 b/app/assets/javascripts/discourse/controllers/discovery.js.es6 index 93237fa22b3..fa374b43723 100644 --- a/app/assets/javascripts/discourse/controllers/discovery.js.es6 +++ b/app/assets/javascripts/discourse/controllers/discovery.js.es6 @@ -3,6 +3,7 @@ import { inject } from "@ember/controller"; import Controller from "@ember/controller"; import DiscourseURL from "discourse/lib/url"; import Category from "discourse/models/category"; +import { observes } from "discourse-common/utils/decorators"; export default Controller.extend({ discoveryTopics: inject("discovery/topics"), @@ -16,9 +17,10 @@ export default Controller.extend({ loadedAllItems: not("discoveryTopics.model.canLoadMore"), + @observes("loadedAllItems") _showFooter: function() { this.set("application.showFooter", this.loadedAllItems); - }.observes("loadedAllItems"), + }, showMoreUrl(period) { let url = "", diff --git a/app/assets/javascripts/discourse/controllers/edit-category.js.es6 b/app/assets/javascripts/discourse/controllers/edit-category.js.es6 index 36c961c7e10..e014cd1ea24 100644 --- a/app/assets/javascripts/discourse/controllers/edit-category.js.es6 +++ b/app/assets/javascripts/discourse/controllers/edit-category.js.es6 @@ -3,8 +3,7 @@ import Controller from "@ember/controller"; import ModalFunctionality from "discourse/mixins/modal-functionality"; import DiscourseURL from "discourse/lib/url"; import { extractError } from "discourse/lib/ajax-error"; -import { - default as discourseComputed, +import discourseComputed, { on, observes } from "discourse-common/utils/decorators"; diff --git a/app/assets/javascripts/discourse/controllers/edit-topic-timer.js.es6 b/app/assets/javascripts/discourse/controllers/edit-topic-timer.js.es6 index c1473509f29..2c04b1ca1c3 100644 --- a/app/assets/javascripts/discourse/controllers/edit-topic-timer.js.es6 +++ b/app/assets/javascripts/discourse/controllers/edit-topic-timer.js.es6 @@ -1,6 +1,6 @@ import EmberObject from "@ember/object"; import Controller from "@ember/controller"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import ModalFunctionality from "discourse/mixins/modal-functionality"; import TopicTimer from "discourse/models/topic-timer"; import { popupAjaxError } from "discourse/lib/ajax-error"; diff --git a/app/assets/javascripts/discourse/controllers/exception.js.es6 b/app/assets/javascripts/discourse/controllers/exception.js.es6 index f53eff91fd7..e9a5f10d160 100644 --- a/app/assets/javascripts/discourse/controllers/exception.js.es6 +++ b/app/assets/javascripts/discourse/controllers/exception.js.es6 @@ -1,10 +1,7 @@ import { equal, gte, none, alias } from "@ember/object/computed"; import { schedule } from "@ember/runloop"; import Controller from "@ember/controller"; -import { - on, - default as discourseComputed -} from "discourse-common/utils/decorators"; +import discourseComputed, { on } from "discourse-common/utils/decorators"; const ButtonBackBright = { classes: "btn-primary", diff --git a/app/assets/javascripts/discourse/controllers/full-page-search.js.es6 b/app/assets/javascripts/discourse/controllers/full-page-search.js.es6 index d62a2a8177f..a143203720e 100644 --- a/app/assets/javascripts/discourse/controllers/full-page-search.js.es6 +++ b/app/assets/javascripts/discourse/controllers/full-page-search.js.es6 @@ -9,10 +9,7 @@ import { getSearchKey, isValidSearchTerm } from "discourse/lib/search"; -import { - default as discourseComputed, - observes -} from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; import Category from "discourse/models/category"; import { escapeExpression } from "discourse/lib/utilities"; import { setTransient } from "discourse/lib/page-tracker"; diff --git a/app/assets/javascripts/discourse/controllers/group-index.js.es6 b/app/assets/javascripts/discourse/controllers/group-index.js.es6 index 887d5dbfcf5..dcf5e07f3df 100644 --- a/app/assets/javascripts/discourse/controllers/group-index.js.es6 +++ b/app/assets/javascripts/discourse/controllers/group-index.js.es6 @@ -1,9 +1,6 @@ import Controller, { inject } from "@ember/controller"; import { alias } from "@ember/object/computed"; -import { - default as discourseComputed, - observes -} from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; import { popupAjaxError } from "discourse/lib/ajax-error"; import discourseDebounce from "discourse/lib/debounce"; diff --git a/app/assets/javascripts/discourse/controllers/group-manage-logs.js.es6 b/app/assets/javascripts/discourse/controllers/group-manage-logs.js.es6 index 3aaf3fdb878..41a12c2c98e 100644 --- a/app/assets/javascripts/discourse/controllers/group-manage-logs.js.es6 +++ b/app/assets/javascripts/discourse/controllers/group-manage-logs.js.es6 @@ -1,10 +1,7 @@ import { inject } from "@ember/controller"; import EmberObject from "@ember/object"; import Controller from "@ember/controller"; -import { - default as discourseComputed, - observes -} from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; export default Controller.extend({ group: inject(), diff --git a/app/assets/javascripts/discourse/controllers/group-manage.js.es6 b/app/assets/javascripts/discourse/controllers/group-manage.js.es6 index b99f8a70f98..7a9e7859eb0 100644 --- a/app/assets/javascripts/discourse/controllers/group-manage.js.es6 +++ b/app/assets/javascripts/discourse/controllers/group-manage.js.es6 @@ -1,6 +1,6 @@ import { inject as service } from "@ember/service"; import Controller from "@ember/controller"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; export default Controller.extend({ router: service(), diff --git a/app/assets/javascripts/discourse/controllers/group-requests.js.es6 b/app/assets/javascripts/discourse/controllers/group-requests.js.es6 index 013c44f6d88..c1664f0c32f 100644 --- a/app/assets/javascripts/discourse/controllers/group-requests.js.es6 +++ b/app/assets/javascripts/discourse/controllers/group-requests.js.es6 @@ -1,8 +1,5 @@ import Controller, { inject } from "@ember/controller"; -import { - default as discourseComputed, - observes -} from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; import { ajax } from "discourse/lib/ajax"; import { popupAjaxError } from "discourse/lib/ajax-error"; import discourseDebounce from "discourse/lib/debounce"; diff --git a/app/assets/javascripts/discourse/controllers/group.js.es6 b/app/assets/javascripts/discourse/controllers/group.js.es6 index 6200457d724..71354f58d3e 100644 --- a/app/assets/javascripts/discourse/controllers/group.js.es6 +++ b/app/assets/javascripts/discourse/controllers/group.js.es6 @@ -1,7 +1,7 @@ import EmberObject from "@ember/object"; import { inject } from "@ember/controller"; import Controller from "@ember/controller"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import { inject as service } from "@ember/service"; import { readOnly } from "@ember/object/computed"; diff --git a/app/assets/javascripts/discourse/controllers/groups-index.js.es6 b/app/assets/javascripts/discourse/controllers/groups-index.js.es6 index 0380bdffd85..00276d0215c 100644 --- a/app/assets/javascripts/discourse/controllers/groups-index.js.es6 +++ b/app/assets/javascripts/discourse/controllers/groups-index.js.es6 @@ -1,10 +1,7 @@ import { inject } from "@ember/controller"; import Controller from "@ember/controller"; import discourseDebounce from "discourse/lib/debounce"; -import { - default as discourseComputed, - observes -} from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; export default Controller.extend({ application: inject(), diff --git a/app/assets/javascripts/discourse/controllers/invites-show.js.es6 b/app/assets/javascripts/discourse/controllers/invites-show.js.es6 index 9be1de123e3..58b7ca36859 100644 --- a/app/assets/javascripts/discourse/controllers/invites-show.js.es6 +++ b/app/assets/javascripts/discourse/controllers/invites-show.js.es6 @@ -1,7 +1,7 @@ import { isEmpty } from "@ember/utils"; import { alias, notEmpty } from "@ember/object/computed"; import Controller from "@ember/controller"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import getUrl from "discourse-common/lib/get-url"; import DiscourseURL from "discourse/lib/url"; import { ajax } from "discourse/lib/ajax"; diff --git a/app/assets/javascripts/discourse/controllers/move-to-topic.js.es6 b/app/assets/javascripts/discourse/controllers/move-to-topic.js.es6 index 9fc84facfa4..b2b7dd7f108 100644 --- a/app/assets/javascripts/discourse/controllers/move-to-topic.js.es6 +++ b/app/assets/javascripts/discourse/controllers/move-to-topic.js.es6 @@ -6,7 +6,7 @@ import Controller from "@ember/controller"; import ModalFunctionality from "discourse/mixins/modal-functionality"; import { movePosts, mergeTopic } from "discourse/models/topic"; import DiscourseURL from "discourse/lib/url"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import { extractError } from "discourse/lib/ajax-error"; export default Controller.extend(ModalFunctionality, { diff --git a/app/assets/javascripts/discourse/controllers/password-reset.js.es6 b/app/assets/javascripts/discourse/controllers/password-reset.js.es6 index 6e551a83014..dcb1931ac0e 100644 --- a/app/assets/javascripts/discourse/controllers/password-reset.js.es6 +++ b/app/assets/javascripts/discourse/controllers/password-reset.js.es6 @@ -1,6 +1,6 @@ import { alias, or, readOnly } from "@ember/object/computed"; import Controller from "@ember/controller"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import DiscourseURL from "discourse/lib/url"; import { ajax } from "discourse/lib/ajax"; import PasswordValidation from "discourse/mixins/password-validation"; diff --git a/app/assets/javascripts/discourse/controllers/preferences/account.js.es6 b/app/assets/javascripts/discourse/controllers/preferences/account.js.es6 index f09f94ae891..6cac06c1aad 100644 --- a/app/assets/javascripts/discourse/controllers/preferences/account.js.es6 +++ b/app/assets/javascripts/discourse/controllers/preferences/account.js.es6 @@ -2,7 +2,7 @@ import { not, or, gt } from "@ember/object/computed"; import Controller from "@ember/controller"; import { iconHTML } from "discourse-common/lib/icon-library"; import CanCheckEmails from "discourse/mixins/can-check-emails"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import PreferencesTabController from "discourse/mixins/preferences-tab-controller"; import { propertyNotEqual, setting } from "discourse/lib/computed"; import { popupAjaxError } from "discourse/lib/ajax-error"; diff --git a/app/assets/javascripts/discourse/controllers/preferences/emails.js.es6 b/app/assets/javascripts/discourse/controllers/preferences/emails.js.es6 index 008ed9c8cd0..2f7d0832c9c 100644 --- a/app/assets/javascripts/discourse/controllers/preferences/emails.js.es6 +++ b/app/assets/javascripts/discourse/controllers/preferences/emails.js.es6 @@ -1,7 +1,7 @@ import { equal } from "@ember/object/computed"; import Controller from "@ember/controller"; import PreferencesTabController from "discourse/mixins/preferences-tab-controller"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import { popupAjaxError } from "discourse/lib/ajax-error"; const EMAIL_LEVELS = { diff --git a/app/assets/javascripts/discourse/controllers/preferences/interface.js.es6 b/app/assets/javascripts/discourse/controllers/preferences/interface.js.es6 index 370d5b9a4da..086e5cc0b61 100644 --- a/app/assets/javascripts/discourse/controllers/preferences/interface.js.es6 +++ b/app/assets/javascripts/discourse/controllers/preferences/interface.js.es6 @@ -2,10 +2,7 @@ import { inject } from "@ember/controller"; import Controller from "@ember/controller"; import PreferencesTabController from "discourse/mixins/preferences-tab-controller"; import { setDefaultHomepage } from "discourse/lib/utilities"; -import { - default as discourseComputed, - observes -} from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; import { listThemes, previewTheme, diff --git a/app/assets/javascripts/discourse/controllers/preferences/profile.js.es6 b/app/assets/javascripts/discourse/controllers/preferences/profile.js.es6 index 017035323c4..5d2e65f0450 100644 --- a/app/assets/javascripts/discourse/controllers/preferences/profile.js.es6 +++ b/app/assets/javascripts/discourse/controllers/preferences/profile.js.es6 @@ -1,7 +1,7 @@ import { isEmpty } from "@ember/utils"; import EmberObject from "@ember/object"; import Controller from "@ember/controller"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import PreferencesTabController from "discourse/mixins/preferences-tab-controller"; import { popupAjaxError } from "discourse/lib/ajax-error"; import { cookAsync } from "discourse/lib/text"; diff --git a/app/assets/javascripts/discourse/controllers/preferences/second-factor.js.es6 b/app/assets/javascripts/discourse/controllers/preferences/second-factor.js.es6 index 21e9a55f38c..67c7b58c837 100644 --- a/app/assets/javascripts/discourse/controllers/preferences/second-factor.js.es6 +++ b/app/assets/javascripts/discourse/controllers/preferences/second-factor.js.es6 @@ -1,8 +1,8 @@ import { alias, and } from "@ember/object/computed"; import Controller from "@ember/controller"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import CanCheckEmails from "discourse/mixins/can-check-emails"; -import { default as DiscourseURL, userPath } from "discourse/lib/url"; +import DiscourseURL, { userPath } from "discourse/lib/url"; import { popupAjaxError } from "discourse/lib/ajax-error"; import { findAll } from "discourse/models/login-method"; import { SECOND_FACTOR_METHODS } from "discourse/models/user"; diff --git a/app/assets/javascripts/discourse/controllers/preferences/username.js.es6 b/app/assets/javascripts/discourse/controllers/preferences/username.js.es6 index 530d1a616ee..3b5cbfc477a 100644 --- a/app/assets/javascripts/discourse/controllers/preferences/username.js.es6 +++ b/app/assets/javascripts/discourse/controllers/preferences/username.js.es6 @@ -1,10 +1,7 @@ import { isEmpty } from "@ember/utils"; import { empty, or } from "@ember/object/computed"; import Controller from "@ember/controller"; -import { - default as discourseComputed, - observes -} from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; import { setting, propertyEqual } from "discourse/lib/computed"; import DiscourseURL from "discourse/lib/url"; import { userPath } from "discourse/lib/url"; diff --git a/app/assets/javascripts/discourse/controllers/reorder-categories.js.es6 b/app/assets/javascripts/discourse/controllers/reorder-categories.js.es6 index a858d605e97..db32c7c3677 100644 --- a/app/assets/javascripts/discourse/controllers/reorder-categories.js.es6 +++ b/app/assets/javascripts/discourse/controllers/reorder-categories.js.es6 @@ -5,10 +5,7 @@ import { ajax } from "discourse/lib/ajax"; import ModalFunctionality from "discourse/mixins/modal-functionality"; const BufferedProxy = window.BufferedProxy; // import BufferedProxy from 'ember-buffered-proxy/proxy'; import { popupAjaxError } from "discourse/lib/ajax-error"; -import { - on, - default as discourseComputed -} from "discourse-common/utils/decorators"; +import discourseComputed, { on } from "discourse-common/utils/decorators"; import Ember from "ember"; export default Controller.extend(ModalFunctionality, Ember.Evented, { diff --git a/app/assets/javascripts/discourse/controllers/second-factor-backup-edit.js.es6 b/app/assets/javascripts/discourse/controllers/second-factor-backup-edit.js.es6 index 35b24b07dfb..aa3e0c11436 100644 --- a/app/assets/javascripts/discourse/controllers/second-factor-backup-edit.js.es6 +++ b/app/assets/javascripts/discourse/controllers/second-factor-backup-edit.js.es6 @@ -1,7 +1,7 @@ import { alias } from "@ember/object/computed"; import { later } from "@ember/runloop"; import Controller from "@ember/controller"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import { SECOND_FACTOR_METHODS } from "discourse/models/user"; import ModalFunctionality from "discourse/mixins/modal-functionality"; diff --git a/app/assets/javascripts/discourse/controllers/tags-show.js.es6 b/app/assets/javascripts/discourse/controllers/tags-show.js.es6 index a34a368a1a4..bc26a7febc5 100644 --- a/app/assets/javascripts/discourse/controllers/tags-show.js.es6 +++ b/app/assets/javascripts/discourse/controllers/tags-show.js.es6 @@ -1,12 +1,9 @@ import { alias } from "@ember/object/computed"; import { inject } from "@ember/controller"; import Controller from "@ember/controller"; -import { - default as discourseComputed, - observes -} from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; import BulkTopicSelection from "discourse/mixins/bulk-topic-selection"; -import { default as NavItem } from "discourse/models/nav-item"; +import NavItem from "discourse/models/nav-item"; import FilterModeMixin from "discourse/mixins/filter-mode"; export default Controller.extend(BulkTopicSelection, FilterModeMixin, { diff --git a/app/assets/javascripts/discourse/controllers/topic.js.es6 b/app/assets/javascripts/discourse/controllers/topic.js.es6 index 8e2e17b2819..cc0725a697e 100644 --- a/app/assets/javascripts/discourse/controllers/topic.js.es6 +++ b/app/assets/javascripts/discourse/controllers/topic.js.es6 @@ -15,10 +15,7 @@ import Topic from "discourse/models/topic"; import discourseDebounce from "discourse/lib/debounce"; import isElementInViewport from "discourse/lib/is-element-in-viewport"; import { ajax } from "discourse/lib/ajax"; -import { - default as discourseComputed, - observes -} from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; import { extractLinkMeta } from "discourse/lib/render-topic-featured-link"; import { popupAjaxError } from "discourse/lib/ajax-error"; import { spinnerHTML } from "discourse/helpers/loading-spinner"; diff --git a/app/assets/javascripts/discourse/controllers/upload-selector.js.es6 b/app/assets/javascripts/discourse/controllers/upload-selector.js.es6 index a8e61d86f56..eae9a3a2bb6 100644 --- a/app/assets/javascripts/discourse/controllers/upload-selector.js.es6 +++ b/app/assets/javascripts/discourse/controllers/upload-selector.js.es6 @@ -1,7 +1,7 @@ import { equal } from "@ember/object/computed"; import Controller from "@ember/controller"; import ModalFunctionality from "discourse/mixins/modal-functionality"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import { allowsAttachments, authorizedExtensions, diff --git a/app/assets/javascripts/discourse/controllers/user-activity.js.es6 b/app/assets/javascripts/discourse/controllers/user-activity.js.es6 index 596125d221e..473f24c7530 100644 --- a/app/assets/javascripts/discourse/controllers/user-activity.js.es6 +++ b/app/assets/javascripts/discourse/controllers/user-activity.js.es6 @@ -3,6 +3,7 @@ import { inject as service } from "@ember/service"; import { inject } from "@ember/controller"; import Controller from "@ember/controller"; import { exportUserArchive } from "discourse/lib/export-csv"; +import { observes } from "discourse-common/utils/decorators"; export default Controller.extend({ application: inject(), @@ -12,6 +13,7 @@ export default Controller.extend({ canDownloadPosts: alias("user.viewingSelf"), + @observes("userActionType", "model.stream.itemsLoaded") _showFooter: function() { var showFooter; if (this.userActionType) { @@ -25,7 +27,7 @@ export default Controller.extend({ this.get("model.stream.itemsLoaded"); } this.set("application.showFooter", showFooter); - }.observes("userActionType", "model.stream.itemsLoaded"), + }, actions: { exportUserArchive() { diff --git a/app/assets/javascripts/discourse/controllers/user-card.js.es6 b/app/assets/javascripts/discourse/controllers/user-card.js.es6 index d0fa3abf1c9..862fc92e73f 100644 --- a/app/assets/javascripts/discourse/controllers/user-card.js.es6 +++ b/app/assets/javascripts/discourse/controllers/user-card.js.es6 @@ -1,11 +1,7 @@ import { inject as service } from "@ember/service"; import { inject } from "@ember/controller"; import Controller from "@ember/controller"; -import { - default as DiscourseURL, - userPath, - groupPath -} from "discourse/lib/url"; +import DiscourseURL, { userPath, groupPath } from "discourse/lib/url"; export default Controller.extend({ topic: inject(), diff --git a/app/assets/javascripts/discourse/controllers/user-invited-show.js.es6 b/app/assets/javascripts/discourse/controllers/user-invited-show.js.es6 index 1fd6ec0bdfa..9282265e784 100644 --- a/app/assets/javascripts/discourse/controllers/user-invited-show.js.es6 +++ b/app/assets/javascripts/discourse/controllers/user-invited-show.js.es6 @@ -3,10 +3,7 @@ import Controller from "@ember/controller"; import Invite from "discourse/models/invite"; import discourseDebounce from "discourse/lib/debounce"; import { popupAjaxError } from "discourse/lib/ajax-error"; -import { - default as discourseComputed, - observes -} from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; export default Controller.extend({ user: null, diff --git a/app/assets/javascripts/discourse/controllers/user-notifications.js.es6 b/app/assets/javascripts/discourse/controllers/user-notifications.js.es6 index 345ef6889e2..23efcfc2140 100644 --- a/app/assets/javascripts/discourse/controllers/user-notifications.js.es6 +++ b/app/assets/javascripts/discourse/controllers/user-notifications.js.es6 @@ -1,10 +1,7 @@ import { inject } from "@ember/controller"; import Controller from "@ember/controller"; import { ajax } from "discourse/lib/ajax"; -import { - default as discourseComputed, - observes -} from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; import { readOnly } from "@ember/object/computed"; import { inject as service } from "@ember/service"; diff --git a/app/assets/javascripts/discourse/controllers/user-posts.js.es6 b/app/assets/javascripts/discourse/controllers/user-posts.js.es6 index fe001ad1c15..e5de7e99955 100644 --- a/app/assets/javascripts/discourse/controllers/user-posts.js.es6 +++ b/app/assets/javascripts/discourse/controllers/user-posts.js.es6 @@ -1,9 +1,12 @@ import { inject } from "@ember/controller"; import Controller from "@ember/controller"; +import { observes } from "discourse-common/utils/decorators"; + export default Controller.extend({ application: inject(), + @observes("model.canLoadMore") _showFooter: function() { this.set("application.showFooter", !this.get("model.canLoadMore")); - }.observes("model.canLoadMore") + } }); diff --git a/app/assets/javascripts/discourse/controllers/user-topics-list.js.es6 b/app/assets/javascripts/discourse/controllers/user-topics-list.js.es6 index 6c09d2e36b8..f541ac01ca1 100644 --- a/app/assets/javascripts/discourse/controllers/user-topics-list.js.es6 +++ b/app/assets/javascripts/discourse/controllers/user-topics-list.js.es6 @@ -1,4 +1,4 @@ -import discourseComputed from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; import { inject } from "@ember/controller"; import Controller from "@ember/controller"; @@ -22,9 +22,10 @@ export default Controller.extend({ this.session.set("topicListScrollPosition", $(window).scrollTop()); }, + @observes("model.canLoadMore") _showFooter: function() { this.set("application.showFooter", !this.get("model.canLoadMore")); - }.observes("model.canLoadMore"), + }, @discourseComputed("incomingCount") hasIncoming(incomingCount) { diff --git a/app/assets/javascripts/discourse/controllers/users.js.es6 b/app/assets/javascripts/discourse/controllers/users.js.es6 index 8fd3b3e1578..820e50b0af5 100644 --- a/app/assets/javascripts/discourse/controllers/users.js.es6 +++ b/app/assets/javascripts/discourse/controllers/users.js.es6 @@ -2,6 +2,7 @@ import { equal } from "@ember/object/computed"; import { inject } from "@ember/controller"; import Controller from "@ember/controller"; import discourseDebounce from "discourse/lib/debounce"; +import { observes } from "discourse-common/utils/decorators"; export default Controller.extend({ application: inject(), @@ -15,13 +16,15 @@ export default Controller.extend({ showTimeRead: equal("period", "all"), + @observes("nameInput") _setName: discourseDebounce(function() { this.set("name", this.nameInput); - }, 500).observes("nameInput"), + }, 500), + @observes("model.canLoadMore") _showFooter: function() { this.set("application.showFooter", !this.get("model.canLoadMore")); - }.observes("model.canLoadMore"), + }, actions: { loadMore() { diff --git a/app/assets/javascripts/discourse/lib/plugin-api.js.es6 b/app/assets/javascripts/discourse/lib/plugin-api.js.es6 index 32719e649d9..09ebe31f43e 100644 --- a/app/assets/javascripts/discourse/lib/plugin-api.js.es6 +++ b/app/assets/javascripts/discourse/lib/plugin-api.js.es6 @@ -48,6 +48,7 @@ import { import { addCategorySortCriteria } from "discourse/components/edit-category-settings"; import { queryRegistry } from "discourse/widgets/widget"; import Composer from "discourse/models/composer"; +import { on } from "@ember/object/evented"; // If you add any methods to the API ensure you bump up this number const PLUGIN_API_VERSION = "0.8.37"; @@ -1059,12 +1060,12 @@ function decorate(klass, evt, cb, id) { } const mixin = {}; - mixin["_decorate_" + _decorateId++] = function($elem) { + mixin["_decorate_" + _decorateId++] = on(evt, function($elem) { $elem = $elem || $(this.element); if ($elem) { cb($elem); } - }.on(evt); + }); klass.reopen(mixin); } diff --git a/app/assets/javascripts/discourse/lib/posts-with-placeholders.js.es6 b/app/assets/javascripts/discourse/lib/posts-with-placeholders.js.es6 index 3bf8c2457c1..449c70ab799 100644 --- a/app/assets/javascripts/discourse/lib/posts-with-placeholders.js.es6 +++ b/app/assets/javascripts/discourse/lib/posts-with-placeholders.js.es6 @@ -1,5 +1,5 @@ import EmberObject from "@ember/object"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; export function Placeholder(viewName) { this.viewName = viewName; diff --git a/app/assets/javascripts/discourse/lib/static-route-builder.js.es6 b/app/assets/javascripts/discourse/lib/static-route-builder.js.es6 index 8baa97fb4df..91cda0f0bef 100644 --- a/app/assets/javascripts/discourse/lib/static-route-builder.js.es6 +++ b/app/assets/javascripts/discourse/lib/static-route-builder.js.es6 @@ -1,6 +1,6 @@ import DiscourseRoute from "discourse/routes/discourse"; import StaticPage from "discourse/models/static-page"; -import { default as DiscourseURL, jumpToElement } from "discourse/lib/url"; +import DiscourseURL, { jumpToElement } from "discourse/lib/url"; const configs = { faq: "faq_url", diff --git a/app/assets/javascripts/discourse/lib/text.js.es6 b/app/assets/javascripts/discourse/lib/text.js.es6 index 7862ce53e01..7f75cb497dc 100644 --- a/app/assets/javascripts/discourse/lib/text.js.es6 +++ b/app/assets/javascripts/discourse/lib/text.js.es6 @@ -1,4 +1,4 @@ -import { default as PrettyText, buildOptions } from "pretty-text/pretty-text"; +import PrettyText, { buildOptions } from "pretty-text/pretty-text"; import { performEmojiUnescape, buildEmojiUrl } from "pretty-text/emoji"; import WhiteLister from "pretty-text/white-lister"; import { sanitize as textSanitize } from "pretty-text/sanitizer"; diff --git a/app/assets/javascripts/discourse/mixins/name-validation.js.es6 b/app/assets/javascripts/discourse/mixins/name-validation.js.es6 index b2594c97fec..3b377f095bf 100644 --- a/app/assets/javascripts/discourse/mixins/name-validation.js.es6 +++ b/app/assets/javascripts/discourse/mixins/name-validation.js.es6 @@ -1,5 +1,5 @@ import { isEmpty } from "@ember/utils"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import Mixin from "@ember/object/mixin"; import EmberObject from "@ember/object"; diff --git a/app/assets/javascripts/discourse/mixins/password-validation.js.es6 b/app/assets/javascripts/discourse/mixins/password-validation.js.es6 index b313368f521..d660f5208b8 100644 --- a/app/assets/javascripts/discourse/mixins/password-validation.js.es6 +++ b/app/assets/javascripts/discourse/mixins/password-validation.js.es6 @@ -1,5 +1,5 @@ import { isEmpty } from "@ember/utils"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import Mixin from "@ember/object/mixin"; import EmberObject from "@ember/object"; diff --git a/app/assets/javascripts/discourse/mixins/preferences-tab-controller.js.es6 b/app/assets/javascripts/discourse/mixins/preferences-tab-controller.js.es6 index 2e8763097c3..4dabeb3fa07 100644 --- a/app/assets/javascripts/discourse/mixins/preferences-tab-controller.js.es6 +++ b/app/assets/javascripts/discourse/mixins/preferences-tab-controller.js.es6 @@ -1,4 +1,4 @@ -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import Mixin from "@ember/object/mixin"; export default Mixin.create({ diff --git a/app/assets/javascripts/discourse/mixins/user-fields-validation.js.es6 b/app/assets/javascripts/discourse/mixins/user-fields-validation.js.es6 index 782ceca03d2..5a7ff188084 100644 --- a/app/assets/javascripts/discourse/mixins/user-fields-validation.js.es6 +++ b/app/assets/javascripts/discourse/mixins/user-fields-validation.js.es6 @@ -1,9 +1,6 @@ import { isEmpty } from "@ember/utils"; import EmberObject from "@ember/object"; -import { - on, - default as discourseComputed -} from "discourse-common/utils/decorators"; +import discourseComputed, { on } from "discourse-common/utils/decorators"; import Mixin from "@ember/object/mixin"; export default Mixin.create({ diff --git a/app/assets/javascripts/discourse/mixins/username-validation.js.es6 b/app/assets/javascripts/discourse/mixins/username-validation.js.es6 index 3e18f815c5c..fcd0ea89ba4 100644 --- a/app/assets/javascripts/discourse/mixins/username-validation.js.es6 +++ b/app/assets/javascripts/discourse/mixins/username-validation.js.es6 @@ -1,7 +1,7 @@ import { isEmpty } from "@ember/utils"; import discourseDebounce from "discourse/lib/debounce"; import { setting } from "discourse/lib/computed"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import Mixin from "@ember/object/mixin"; import EmberObject from "@ember/object"; import User from "discourse/models/user"; diff --git a/app/assets/javascripts/discourse/models/composer.js.es6 b/app/assets/javascripts/discourse/models/composer.js.es6 index 3f8c75d9fc8..991e580af28 100644 --- a/app/assets/javascripts/discourse/models/composer.js.es6 +++ b/app/assets/javascripts/discourse/models/composer.js.es6 @@ -9,8 +9,7 @@ import Topic from "discourse/models/topic"; import { throwAjaxError } from "discourse/lib/ajax-error"; import Quote from "discourse/lib/quote"; import Draft from "discourse/models/draft"; -import { - default as discourseComputed, +import discourseComputed, { observes, on } from "discourse-common/utils/decorators"; diff --git a/app/assets/javascripts/discourse/models/group.js.es6 b/app/assets/javascripts/discourse/models/group.js.es6 index 284719579af..c799f783148 100644 --- a/app/assets/javascripts/discourse/models/group.js.es6 +++ b/app/assets/javascripts/discourse/models/group.js.es6 @@ -1,10 +1,7 @@ import EmberObject from "@ember/object"; import { equal } from "@ember/object/computed"; import { isEmpty } from "@ember/utils"; -import { - default as discourseComputed, - observes -} from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; import { ajax } from "discourse/lib/ajax"; import Category from "discourse/models/category"; import GroupHistory from "discourse/models/group-history"; diff --git a/app/assets/javascripts/discourse/models/post-stream.js.es6 b/app/assets/javascripts/discourse/models/post-stream.js.es6 index 614db163326..4accbbe268f 100644 --- a/app/assets/javascripts/discourse/models/post-stream.js.es6 +++ b/app/assets/javascripts/discourse/models/post-stream.js.es6 @@ -5,7 +5,7 @@ import { ajax } from "discourse/lib/ajax"; import DiscourseURL from "discourse/lib/url"; import RestModel from "discourse/models/rest"; import PostsWithPlaceholders from "discourse/lib/posts-with-placeholders"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import { loadTopicView } from "discourse/models/topic"; import { Promise } from "rsvp"; import User from "discourse/models/user"; diff --git a/app/assets/javascripts/discourse/models/topic-tracking-state.js.es6 b/app/assets/javascripts/discourse/models/topic-tracking-state.js.es6 index ac5f4a63402..bf5ed55d8af 100644 --- a/app/assets/javascripts/discourse/models/topic-tracking-state.js.es6 +++ b/app/assets/javascripts/discourse/models/topic-tracking-state.js.es6 @@ -1,10 +1,7 @@ import { get } from "@ember/object"; import { isEmpty } from "@ember/utils"; import { NotificationLevels } from "discourse/lib/notification-levels"; -import { - default as discourseComputed, - on -} from "discourse-common/utils/decorators"; +import discourseComputed, { on } from "discourse-common/utils/decorators"; import PreloadStore from "preload-store"; import Category from "discourse/models/category"; import EmberObject from "@ember/object"; diff --git a/app/assets/javascripts/discourse/models/topic.js.es6 b/app/assets/javascripts/discourse/models/topic.js.es6 index d2aaa19a0da..514c3564e6f 100644 --- a/app/assets/javascripts/discourse/models/topic.js.es6 +++ b/app/assets/javascripts/discourse/models/topic.js.es6 @@ -13,8 +13,7 @@ import { censor } from "pretty-text/censored-words"; import { emojiUnescape } from "discourse/lib/text"; import PreloadStore from "preload-store"; import { userPath } from "discourse/lib/url"; -import { - default as discourseComputed, +import discourseComputed, { observes, on } from "discourse-common/utils/decorators"; diff --git a/app/assets/javascripts/discourse/models/user-stream.js.es6 b/app/assets/javascripts/discourse/models/user-stream.js.es6 index 19e3d2ee62b..81af6b30f8c 100644 --- a/app/assets/javascripts/discourse/models/user-stream.js.es6 +++ b/app/assets/javascripts/discourse/models/user-stream.js.es6 @@ -4,10 +4,7 @@ import RestModel from "discourse/models/rest"; import UserAction from "discourse/models/user-action"; import { emojiUnescape } from "discourse/lib/text"; import { Promise } from "rsvp"; -import { - default as discourseComputed, - on -} from "discourse-common/utils/decorators"; +import discourseComputed, { on } from "discourse-common/utils/decorators"; export default RestModel.extend({ loaded: false, diff --git a/app/assets/javascripts/discourse/models/user.js.es6 b/app/assets/javascripts/discourse/models/user.js.es6 index 9b92f4bd030..1607ad1804e 100644 --- a/app/assets/javascripts/discourse/models/user.js.es6 +++ b/app/assets/javascripts/discourse/models/user.js.es6 @@ -8,10 +8,7 @@ import UserStream from "discourse/models/user-stream"; import UserPostsStream from "discourse/models/user-posts-stream"; import Singleton from "discourse/mixins/singleton"; import { longDate } from "discourse/lib/formatter"; -import { - default as discourseComputed, - observes -} from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; import Badge from "discourse/models/badge"; import UserBadge from "discourse/models/user-badge"; import UserActionStat from "discourse/models/user-action-stat"; diff --git a/app/assets/javascripts/discourse/pre-initializers/inject-discourse-objects.js.es6 b/app/assets/javascripts/discourse/pre-initializers/inject-discourse-objects.js.es6 index eab9eb988ce..924e6f6a506 100644 --- a/app/assets/javascripts/discourse/pre-initializers/inject-discourse-objects.js.es6 +++ b/app/assets/javascripts/discourse/pre-initializers/inject-discourse-objects.js.es6 @@ -4,9 +4,8 @@ import Store from "discourse/models/store"; import DiscourseLocation from "discourse/lib/discourse-location"; import Discourse from "discourse"; import SearchService from "discourse/services/search"; -import { - startTracking, - default as TopicTrackingState +import TopicTrackingState, { + startTracking } from "discourse/models/topic-tracking-state"; import ScreenTrack from "discourse/lib/screen-track"; import Site from "discourse/models/site"; diff --git a/app/assets/javascripts/discourse/raw-views/list/post-count-or-badges.js.es6 b/app/assets/javascripts/discourse/raw-views/list/post-count-or-badges.js.es6 index 20b15a3ebd2..dd301f8b727 100644 --- a/app/assets/javascripts/discourse/raw-views/list/post-count-or-badges.js.es6 +++ b/app/assets/javascripts/discourse/raw-views/list/post-count-or-badges.js.es6 @@ -1,6 +1,6 @@ import { or, and } from "@ember/object/computed"; import EmberObject from "@ember/object"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; export default EmberObject.extend({ postCountsPresent: or("topic.unread", "topic.displayNewPosts"), diff --git a/app/assets/javascripts/discourse/raw-views/topic-list-header-column.js.es6 b/app/assets/javascripts/discourse/raw-views/topic-list-header-column.js.es6 index e5b44af68ec..dfa6e7039cb 100644 --- a/app/assets/javascripts/discourse/raw-views/topic-list-header-column.js.es6 +++ b/app/assets/javascripts/discourse/raw-views/topic-list-header-column.js.es6 @@ -1,5 +1,5 @@ import EmberObject from "@ember/object"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; export default EmberObject.extend({ @discourseComputed diff --git a/app/assets/javascripts/discourse/routes/topic-by-slug-or-id.js.es6 b/app/assets/javascripts/discourse/routes/topic-by-slug-or-id.js.es6 index 74556b57fcc..62339b65198 100644 --- a/app/assets/javascripts/discourse/routes/topic-by-slug-or-id.js.es6 +++ b/app/assets/javascripts/discourse/routes/topic-by-slug-or-id.js.es6 @@ -1,5 +1,5 @@ import DiscourseRoute from "discourse/routes/discourse"; -import { default as Topic, ID_CONSTRAINT } from "discourse/models/topic"; +import Topic, { ID_CONSTRAINT } from "discourse/models/topic"; import DiscourseURL from "discourse/lib/url"; export default DiscourseRoute.extend({ diff --git a/app/assets/javascripts/discourse/services/logs-notice.js.es6 b/app/assets/javascripts/discourse/services/logs-notice.js.es6 index 9d124edf0b7..7292e4465fc 100644 --- a/app/assets/javascripts/discourse/services/logs-notice.js.es6 +++ b/app/assets/javascripts/discourse/services/logs-notice.js.es6 @@ -1,7 +1,6 @@ import { isEmpty } from "@ember/utils"; import EmberObject from "@ember/object"; -import { - default as discourseComputed, +import discourseComputed, { on, observes } from "discourse-common/utils/decorators"; diff --git a/app/assets/javascripts/discourse/services/search.js.es6 b/app/assets/javascripts/discourse/services/search.js.es6 index c9e51f43c8a..d7a8edcd10e 100644 --- a/app/assets/javascripts/discourse/services/search.js.es6 +++ b/app/assets/javascripts/discourse/services/search.js.es6 @@ -1,9 +1,6 @@ import { get } from "@ember/object"; import EmberObject from "@ember/object"; -import { - default as discourseComputed, - observes -} from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; export default EmberObject.extend({ searchContextEnabled: false, // checkbox to scope search diff --git a/app/assets/javascripts/pretty-text/engines/discourse-markdown-it.js.es6 b/app/assets/javascripts/pretty-text/engines/discourse-markdown-it.js.es6 index ba5033b812c..eb480233973 100644 --- a/app/assets/javascripts/pretty-text/engines/discourse-markdown-it.js.es6 +++ b/app/assets/javascripts/pretty-text/engines/discourse-markdown-it.js.es6 @@ -1,4 +1,4 @@ -import { default as WhiteLister } from "pretty-text/white-lister"; +import WhiteLister from "pretty-text/white-lister"; import { sanitize } from "pretty-text/sanitizer"; import guid from "pretty-text/guid"; 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 165818ffb22..f2ad904d3e8 100644 --- a/app/assets/javascripts/select-kit/components/category-drop.js.es6 +++ b/app/assets/javascripts/select-kit/components/category-drop.js.es6 @@ -1,7 +1,7 @@ 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"; +import discourseComputed from "discourse-common/utils/decorators"; import Category from "discourse/models/category"; import { categoryBadgeHTML } from "discourse/helpers/category-link"; import Site from "discourse/models/site"; diff --git a/app/assets/javascripts/select-kit/components/color-palettes/color-palettes-row.js.es6 b/app/assets/javascripts/select-kit/components/color-palettes/color-palettes-row.js.es6 index 7aa53eb5965..b8886122640 100644 --- a/app/assets/javascripts/select-kit/components/color-palettes/color-palettes-row.js.es6 +++ b/app/assets/javascripts/select-kit/components/color-palettes/color-palettes-row.js.es6 @@ -1,6 +1,6 @@ import { escapeExpression } from "discourse/lib/utilities"; import SelectKitRowComponent from "select-kit/components/select-kit/select-kit-row"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; export default SelectKitRowComponent.extend({ layoutName: diff --git a/app/assets/javascripts/select-kit/components/combo-box.js.es6 b/app/assets/javascripts/select-kit/components/combo-box.js.es6 index 71928d314f7..e68dab3c5fc 100644 --- a/app/assets/javascripts/select-kit/components/combo-box.js.es6 +++ b/app/assets/javascripts/select-kit/components/combo-box.js.es6 @@ -1,8 +1,5 @@ import SingleSelectComponent from "select-kit/components/single-select"; -import { - on, - default as discourseComputed -} from "discourse-common/utils/decorators"; +import discourseComputed, { on } from "discourse-common/utils/decorators"; export default SingleSelectComponent.extend({ pluginApiIdentifiers: ["combo-box"], diff --git a/app/assets/javascripts/select-kit/components/group-dropdown.js.es6 b/app/assets/javascripts/select-kit/components/group-dropdown.js.es6 index 0e6ccfac0fe..2abd0a0bb9d 100644 --- a/app/assets/javascripts/select-kit/components/group-dropdown.js.es6 +++ b/app/assets/javascripts/select-kit/components/group-dropdown.js.es6 @@ -1,7 +1,7 @@ import { alias } 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"; +import discourseComputed from "discourse-common/utils/decorators"; export default ComboBoxComponent.extend({ pluginApiIdentifiers: ["group-dropdown"], diff --git a/app/assets/javascripts/select-kit/components/mini-tag-chooser.js.es6 b/app/assets/javascripts/select-kit/components/mini-tag-chooser.js.es6 index f0ebb00151c..dc8518edb98 100644 --- a/app/assets/javascripts/select-kit/components/mini-tag-chooser.js.es6 +++ b/app/assets/javascripts/select-kit/components/mini-tag-chooser.js.es6 @@ -2,7 +2,7 @@ import { empty, alias } from "@ember/object/computed"; import Category from "discourse/models/category"; import ComboBox from "select-kit/components/combo-box"; import TagsMixin from "select-kit/mixins/tags"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; import renderTag from "discourse/lib/render-tag"; import { escapeExpression } from "discourse/lib/utilities"; import { makeArray } from "discourse-common/lib/helpers"; diff --git a/app/assets/javascripts/select-kit/components/multi-select.js.es6 b/app/assets/javascripts/select-kit/components/multi-select.js.es6 index 40a5dc7f0be..9a28a53cbc2 100644 --- a/app/assets/javascripts/select-kit/components/multi-select.js.es6 +++ b/app/assets/javascripts/select-kit/components/multi-select.js.es6 @@ -1,8 +1,5 @@ import SelectKitComponent from "select-kit/components/select-kit"; -import { - default as discourseComputed, - on -} from "discourse-common/utils/decorators"; +import discourseComputed, { on } from "discourse-common/utils/decorators"; const { get, isNone, isEmpty, makeArray, run } = Ember; import { applyOnSelectPluginApiCallbacks, diff --git a/app/assets/javascripts/select-kit/components/notifications-button.js.es6 b/app/assets/javascripts/select-kit/components/notifications-button.js.es6 index 172282ba0b1..e6eeb542f64 100644 --- a/app/assets/javascripts/select-kit/components/notifications-button.js.es6 +++ b/app/assets/javascripts/select-kit/components/notifications-button.js.es6 @@ -1,7 +1,6 @@ import { alias } from "@ember/object/computed"; import DropdownSelectBoxComponent from "select-kit/components/dropdown-select-box"; -import { - default as discourseComputed, +import discourseComputed, { observes, on } from "discourse-common/utils/decorators"; diff --git a/app/assets/javascripts/select-kit/components/select-kit/select-kit-row.js.es6 b/app/assets/javascripts/select-kit/components/select-kit/select-kit-row.js.es6 index a50db81e0a1..7ab8ff112fd 100644 --- a/app/assets/javascripts/select-kit/components/select-kit/select-kit-row.js.es6 +++ b/app/assets/javascripts/select-kit/components/select-kit/select-kit-row.js.es6 @@ -1,9 +1,6 @@ import { alias, or } from "@ember/object/computed"; import Component from "@ember/component"; -import { - default as discourseComputed, - on -} from "discourse-common/utils/decorators"; +import discourseComputed, { on } from "discourse-common/utils/decorators"; const { run, isPresent, makeArray, isEmpty } = Ember; import UtilsMixin from "select-kit/mixins/utils"; diff --git a/app/assets/javascripts/select-kit/components/single-select.js.es6 b/app/assets/javascripts/select-kit/components/single-select.js.es6 index 14047fbb038..42ccc4fa668 100644 --- a/app/assets/javascripts/select-kit/components/single-select.js.es6 +++ b/app/assets/javascripts/select-kit/components/single-select.js.es6 @@ -1,8 +1,5 @@ import SelectKitComponent from "select-kit/components/select-kit"; -import { - default as discourseComputed, - on -} from "discourse-common/utils/decorators"; +import discourseComputed, { on } from "discourse-common/utils/decorators"; const { get, isNone, isEmpty, isPresent, run, makeArray } = Ember; import { diff --git a/app/assets/javascripts/select-kit/components/tag-drop.js.es6 b/app/assets/javascripts/select-kit/components/tag-drop.js.es6 index 5de47f178b9..a487f759d43 100644 --- a/app/assets/javascripts/select-kit/components/tag-drop.js.es6 +++ b/app/assets/javascripts/select-kit/components/tag-drop.js.es6 @@ -4,7 +4,7 @@ import { makeArray } from "discourse-common/lib/helpers"; import ComboBoxComponent from "select-kit/components/combo-box"; import DiscourseURL from "discourse/lib/url"; import TagsMixin from "select-kit/mixins/tags"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; const { isEmpty, run } = Ember; import Category from "discourse/models/category"; import deprecated from "discourse-common/lib/deprecated"; diff --git a/app/assets/javascripts/select-kit/components/timezone-input.js.es6 b/app/assets/javascripts/select-kit/components/timezone-input.js.es6 index cc837e1d661..8c52564f052 100644 --- a/app/assets/javascripts/select-kit/components/timezone-input.js.es6 +++ b/app/assets/javascripts/select-kit/components/timezone-input.js.es6 @@ -1,5 +1,5 @@ import ComboBoxComponent from "select-kit/components/combo-box"; -import { default as discourseComputed } from "discourse-common/utils/decorators"; +import discourseComputed from "discourse-common/utils/decorators"; export default ComboBoxComponent.extend({ pluginApiIdentifiers: ["timezone-input"], diff --git a/app/assets/javascripts/select-kit/components/topic-notifications-options.js.es6 b/app/assets/javascripts/select-kit/components/topic-notifications-options.js.es6 index 1001c7884de..b81c7a43a82 100644 --- a/app/assets/javascripts/select-kit/components/topic-notifications-options.js.es6 +++ b/app/assets/javascripts/select-kit/components/topic-notifications-options.js.es6 @@ -1,8 +1,5 @@ import NotificationOptionsComponent from "select-kit/components/notifications-button"; -import { - default as discourseComputed, - on -} from "discourse-common/utils/decorators"; +import discourseComputed, { on } from "discourse-common/utils/decorators"; import { topicLevels } from "discourse/lib/notification-levels"; export default NotificationOptionsComponent.extend({ diff --git a/app/assets/javascripts/wizard/components/wizard-step.js.es6 b/app/assets/javascripts/wizard/components/wizard-step.js.es6 index c5008ac2ac0..7884a270059 100644 --- a/app/assets/javascripts/wizard/components/wizard-step.js.es6 +++ b/app/assets/javascripts/wizard/components/wizard-step.js.es6 @@ -1,10 +1,7 @@ import { scheduleOnce } from "@ember/runloop"; import Component from "@ember/component"; import getUrl from "discourse-common/lib/get-url"; -import { - default as discourseComputed, - observes -} from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; import { htmlSafe } from "@ember/template"; jQuery.fn.wiggle = function(times, duration) { diff --git a/plugins/discourse-details/test/javascripts/lib/details-cooked-test.js.es6 b/plugins/discourse-details/test/javascripts/lib/details-cooked-test.js.es6 index f6e8867b230..ab767fdd5ee 100644 --- a/plugins/discourse-details/test/javascripts/lib/details-cooked-test.js.es6 +++ b/plugins/discourse-details/test/javascripts/lib/details-cooked-test.js.es6 @@ -1,4 +1,4 @@ -import { default as PrettyText, buildOptions } from "pretty-text/pretty-text"; +import PrettyText, { buildOptions } from "pretty-text/pretty-text"; QUnit.module("lib:details-cooked-test"); diff --git a/plugins/discourse-local-dates/assets/javascripts/discourse/components/discourse-local-dates-create-form.js.es6 b/plugins/discourse-local-dates/assets/javascripts/discourse/components/discourse-local-dates-create-form.js.es6 index 20b104c0a3d..ed145e4a216 100644 --- a/plugins/discourse-local-dates/assets/javascripts/discourse/components/discourse-local-dates-create-form.js.es6 +++ b/plugins/discourse-local-dates/assets/javascripts/discourse/components/discourse-local-dates-create-form.js.es6 @@ -4,9 +4,10 @@ import Component from "@ember/component"; /* global Pikaday:true */ import { propertyNotEqual } from "discourse/lib/computed"; import loadScript from "discourse/lib/load-script"; -import { default as computed } from "ember-addons/ember-computed-decorators"; +import computed from "ember-addons/ember-computed-decorators"; import { cookAsync } from "discourse/lib/text"; import discourseDebounce from "discourse/lib/debounce"; +import { observes } from "discourse-common/utils/decorators"; export default Component.extend({ timeFormat: "HH:mm:ss", @@ -51,6 +52,7 @@ export default Component.extend({ }); }, + @observes("markup") _renderPreview: discourseDebounce(function() { const markup = this.markup; @@ -62,7 +64,7 @@ export default Component.extend({ ); }); } - }, 250).observes("markup"), + }, 250), @computed("date", "toDate", "toTime") isRange(date, toDate, toTime) { diff --git a/plugins/discourse-presence/assets/javascripts/discourse/components/composer-presence-display.js.es6 b/plugins/discourse-presence/assets/javascripts/discourse/components/composer-presence-display.js.es6 index 2e6521008e2..ec09a44a96a 100644 --- a/plugins/discourse-presence/assets/javascripts/discourse/components/composer-presence-display.js.es6 +++ b/plugins/discourse-presence/assets/javascripts/discourse/components/composer-presence-display.js.es6 @@ -3,11 +3,7 @@ import { debounce } from "@ember/runloop"; import { cancel } from "@ember/runloop"; import Component from "@ember/component"; import { ajax } from "discourse/lib/ajax"; -import { - default as computed, - observes, - on -} from "ember-addons/ember-computed-decorators"; +import computed, { observes, on } from "ember-addons/ember-computed-decorators"; export const keepAliveDuration = 10000; export const bufferTime = 3000; diff --git a/plugins/discourse-presence/assets/javascripts/discourse/components/topic-presence-display.js.es6 b/plugins/discourse-presence/assets/javascripts/discourse/components/topic-presence-display.js.es6 index 37abc00f301..9d1708ffab7 100644 --- a/plugins/discourse-presence/assets/javascripts/discourse/components/topic-presence-display.js.es6 +++ b/plugins/discourse-presence/assets/javascripts/discourse/components/topic-presence-display.js.es6 @@ -1,10 +1,7 @@ import { debounce } from "@ember/runloop"; import { cancel } from "@ember/runloop"; import Component from "@ember/component"; -import { - default as computed, - on -} from "ember-addons/ember-computed-decorators"; +import computed, { on } from "ember-addons/ember-computed-decorators"; import { keepAliveDuration, bufferTime diff --git a/plugins/poll/assets/javascripts/controllers/poll-ui-builder.js.es6 b/plugins/poll/assets/javascripts/controllers/poll-ui-builder.js.es6 index 318d2373fbd..4e3c7e0391c 100644 --- a/plugins/poll/assets/javascripts/controllers/poll-ui-builder.js.es6 +++ b/plugins/poll/assets/javascripts/controllers/poll-ui-builder.js.es6 @@ -1,8 +1,5 @@ import Controller from "@ember/controller"; -import { - default as computed, - observes -} from "discourse-common/utils/decorators"; +import computed, { observes } from "discourse-common/utils/decorators"; import EmberObject from "@ember/object"; export const BAR_CHART_TYPE = "bar"; diff --git a/test/javascripts/acceptance/admin-site-settings-test.js.es6 b/test/javascripts/acceptance/admin-site-settings-test.js.es6 index e52b967e053..b0975a9ae78 100644 --- a/test/javascripts/acceptance/admin-site-settings-test.js.es6 +++ b/test/javascripts/acceptance/admin-site-settings-test.js.es6 @@ -1,5 +1,5 @@ import { acceptance } from "helpers/qunit-helpers"; -import { default as siteSettingFixture } from "fixtures/site_settings"; +import siteSettingFixture from "fixtures/site_settings"; var titleOverride = undefined; diff --git a/test/javascripts/admin/components/themes-list-test.js.es6 b/test/javascripts/admin/components/themes-list-test.js.es6 index 4eaba9b6e91..420a75f4e39 100644 --- a/test/javascripts/admin/components/themes-list-test.js.es6 +++ b/test/javascripts/admin/components/themes-list-test.js.es6 @@ -1,5 +1,5 @@ import componentTest from "helpers/component-test"; -import { default as Theme, THEMES, COMPONENTS } from "admin/models/theme"; +import Theme, { THEMES, COMPONENTS } from "admin/models/theme"; moduleForComponent("themes-list", { integration: true }); diff --git a/test/javascripts/lib/highlight-text-test.js.es6 b/test/javascripts/lib/highlight-text-test.js.es6 index d76b9e07787..d222b8a7539 100644 --- a/test/javascripts/lib/highlight-text-test.js.es6 +++ b/test/javascripts/lib/highlight-text-test.js.es6 @@ -1,7 +1,4 @@ -import { - default as highlightText, - CLASS_NAME -} from "discourse/lib/highlight-text"; +import highlightText, { CLASS_NAME } from "discourse/lib/highlight-text"; import { fixture } from "helpers/qunit-helpers"; QUnit.module("lib:highlight-text"); diff --git a/test/javascripts/lib/pretty-text-test.js.es6 b/test/javascripts/lib/pretty-text-test.js.es6 index ea8918d92f3..71fa1e223e3 100644 --- a/test/javascripts/lib/pretty-text-test.js.es6 +++ b/test/javascripts/lib/pretty-text-test.js.es6 @@ -1,6 +1,6 @@ import Quote from "discourse/lib/quote"; import Post from "discourse/models/post"; -import { default as PrettyText, buildOptions } from "pretty-text/pretty-text"; +import PrettyText, { buildOptions } from "pretty-text/pretty-text"; import { IMAGE_VERSION as v } from "pretty-text/emoji/version"; import { INLINE_ONEBOX_LOADING_CSS_CLASS } from "pretty-text/context/inline-onebox-css-classes"; import { diff --git a/test/javascripts/lib/sanitizer-test.js.es6 b/test/javascripts/lib/sanitizer-test.js.es6 index 37a5441d768..7bee7b7e8d0 100644 --- a/test/javascripts/lib/sanitizer-test.js.es6 +++ b/test/javascripts/lib/sanitizer-test.js.es6 @@ -1,4 +1,4 @@ -import { default as PrettyText, buildOptions } from "pretty-text/pretty-text"; +import PrettyText, { buildOptions } from "pretty-text/pretty-text"; import { hrefAllowed } from "pretty-text/sanitizer"; QUnit.module("lib:sanitizer"); diff --git a/test/javascripts/lib/url-test.js.es6 b/test/javascripts/lib/url-test.js.es6 index 993fe8c23f4..5c33defdf5c 100644 --- a/test/javascripts/lib/url-test.js.es6 +++ b/test/javascripts/lib/url-test.js.es6 @@ -1,4 +1,4 @@ -import { default as DiscourseURL, userPath } from "discourse/lib/url"; +import DiscourseURL, { userPath } from "discourse/lib/url"; QUnit.module("lib:url");