FIX: computed is part of `@ember/object` not `@ember/object/computed`
This commit is contained in:
parent
e98d94f17f
commit
f518065654
|
@ -6,7 +6,7 @@ import { setting } from "discourse/lib/computed";
|
||||||
import AdminDashboard from "admin/models/admin-dashboard";
|
import AdminDashboard from "admin/models/admin-dashboard";
|
||||||
import Report from "admin/models/report";
|
import Report from "admin/models/report";
|
||||||
import PeriodComputationMixin from "admin/mixins/period-computation";
|
import PeriodComputationMixin from "admin/mixins/period-computation";
|
||||||
import computed from "@ember/object/computed";
|
import { computed } from "@ember/object";
|
||||||
|
|
||||||
function staticReport(reportType) {
|
function staticReport(reportType) {
|
||||||
return computed("reports.[]", function() {
|
return computed("reports.[]", function() {
|
||||||
|
|
|
@ -2,7 +2,7 @@ import discourseComputed from "discourse-common/utils/decorators";
|
||||||
import AdminUser from "admin/models/admin-user";
|
import AdminUser from "admin/models/admin-user";
|
||||||
import RestModel from "discourse/models/rest";
|
import RestModel from "discourse/models/rest";
|
||||||
import { ajax } from "discourse/lib/ajax";
|
import { ajax } from "discourse/lib/ajax";
|
||||||
import computed from "@ember/object/computed";
|
import { computed } from "@ember/object";
|
||||||
|
|
||||||
const ApiKey = RestModel.extend({
|
const ApiKey = RestModel.extend({
|
||||||
user: computed("_user", {
|
user: computed("_user", {
|
||||||
|
|
|
@ -20,10 +20,10 @@ var define, requirejs;
|
||||||
get: Ember.get,
|
get: Ember.get,
|
||||||
getProperties: Ember.getProperties,
|
getProperties: Ember.getProperties,
|
||||||
set: Ember.set,
|
set: Ember.set,
|
||||||
setProperties: Ember.setProperties
|
setProperties: Ember.setProperties,
|
||||||
|
computed: Ember.computed
|
||||||
},
|
},
|
||||||
"@ember/object/computed": {
|
"@ember/object/computed": {
|
||||||
default: Ember.computed,
|
|
||||||
alias: Ember.computed.alias,
|
alias: Ember.computed.alias,
|
||||||
and: Ember.computed.and,
|
and: Ember.computed.and,
|
||||||
bool: Ember.computed.bool,
|
bool: Ember.computed.bool,
|
||||||
|
|
|
@ -4,7 +4,7 @@ import {
|
||||||
default as discourseComputed,
|
default as discourseComputed,
|
||||||
observes
|
observes
|
||||||
} from "discourse-common/utils/decorators";
|
} from "discourse-common/utils/decorators";
|
||||||
import computed from "@ember/object/computed";
|
import { computed } from "@ember/object";
|
||||||
import FocusEvent from "discourse-common/mixins/focus-event";
|
import FocusEvent from "discourse-common/mixins/focus-event";
|
||||||
import EmberObject from "@ember/object";
|
import EmberObject from "@ember/object";
|
||||||
import deprecated from "discourse-common/lib/deprecated";
|
import deprecated from "discourse-common/lib/deprecated";
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { userPath } from "discourse/lib/url";
|
||||||
import { formatUsername, escapeExpression } from "discourse/lib/utilities";
|
import { formatUsername, escapeExpression } from "discourse/lib/utilities";
|
||||||
import { normalize } from "discourse/components/user-info";
|
import { normalize } from "discourse/components/user-info";
|
||||||
import { renderAvatar } from "discourse/helpers/user-avatar";
|
import { renderAvatar } from "discourse/helpers/user-avatar";
|
||||||
import computed from "@ember/object/computed";
|
import { computed } from "@ember/object";
|
||||||
|
|
||||||
export default Component.extend({
|
export default Component.extend({
|
||||||
usersTemplates: computed("users.[]", function() {
|
usersTemplates: computed("users.[]", function() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import Component from "@ember/component";
|
import Component from "@ember/component";
|
||||||
import computed from "@ember/object/computed";
|
import { computed } from "@ember/object";
|
||||||
|
|
||||||
export default Component.extend({
|
export default Component.extend({
|
||||||
classNames: ["d-date-time-input"],
|
classNames: ["d-date-time-input"],
|
||||||
|
|
|
@ -1,11 +1,5 @@
|
||||||
import { isEmpty } from "@ember/utils";
|
import { isEmpty } from "@ember/utils";
|
||||||
import {
|
import { and, or, alias, reads } from "@ember/object/computed";
|
||||||
default as computed,
|
|
||||||
and,
|
|
||||||
or,
|
|
||||||
alias,
|
|
||||||
reads
|
|
||||||
} from "@ember/object/computed";
|
|
||||||
import { debounce } from "@ember/runloop";
|
import { debounce } from "@ember/runloop";
|
||||||
import { inject as service } from "@ember/service";
|
import { inject as service } from "@ember/service";
|
||||||
import { inject } from "@ember/controller";
|
import { inject } from "@ember/controller";
|
||||||
|
@ -31,7 +25,7 @@ import { shortDate } from "discourse/lib/formatter";
|
||||||
import { SAVE_LABELS, SAVE_ICONS } from "discourse/models/composer";
|
import { SAVE_LABELS, SAVE_ICONS } from "discourse/models/composer";
|
||||||
import { Promise } from "rsvp";
|
import { Promise } from "rsvp";
|
||||||
import ENV from "discourse-common/config/environment";
|
import ENV from "discourse-common/config/environment";
|
||||||
import EmberObject from "@ember/object";
|
import EmberObject, { computed } from "@ember/object";
|
||||||
|
|
||||||
function loadDraft(store, opts) {
|
function loadDraft(store, opts) {
|
||||||
opts = opts || {};
|
opts = opts || {};
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
import discourseComputed from "discourse-common/utils/decorators";
|
import discourseComputed from "discourse-common/utils/decorators";
|
||||||
import {
|
import { alias, gt, not, or, equal } from "@ember/object/computed";
|
||||||
default as computed,
|
|
||||||
alias,
|
|
||||||
gt,
|
|
||||||
not,
|
|
||||||
or,
|
|
||||||
equal
|
|
||||||
} from "@ember/object/computed";
|
|
||||||
import Controller from "@ember/controller";
|
import Controller from "@ember/controller";
|
||||||
import ModalFunctionality from "discourse/mixins/modal-functionality";
|
import ModalFunctionality from "discourse/mixins/modal-functionality";
|
||||||
import { categoryBadgeHTML } from "discourse/helpers/category-link";
|
import { categoryBadgeHTML } from "discourse/helpers/category-link";
|
||||||
|
@ -16,6 +9,7 @@ import { sanitizeAsync } from "discourse/lib/text";
|
||||||
import { iconHTML } from "discourse-common/lib/icon-library";
|
import { iconHTML } from "discourse-common/lib/icon-library";
|
||||||
import Post from "discourse/models/post";
|
import Post from "discourse/models/post";
|
||||||
import Category from "discourse/models/category";
|
import Category from "discourse/models/category";
|
||||||
|
import computed from "@ember/object";
|
||||||
|
|
||||||
function customTagArray(fieldName) {
|
function customTagArray(fieldName) {
|
||||||
return computed(fieldName, function() {
|
return computed(fieldName, function() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import error from "@ember/error";
|
import error from "@ember/error";
|
||||||
import computed from "@ember/object/computed";
|
import { computed } from "@ember/object";
|
||||||
|
|
||||||
let _topicFooterButtons = {};
|
let _topicFooterButtons = {};
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import EmberObjectProxy from "@ember/object/proxy";
|
import EmberObjectProxy from "@ember/object/proxy";
|
||||||
import Mixin from "@ember/object/mixin";
|
import Mixin from "@ember/object/mixin";
|
||||||
import computed from "@ember/object/computed";
|
import { computed } from "@ember/object";
|
||||||
|
|
||||||
/* global BufferedProxy: true */
|
/* global BufferedProxy: true */
|
||||||
export function bufferedProperty(property) {
|
export function bufferedProperty(property) {
|
||||||
|
|
|
@ -1,13 +1,7 @@
|
||||||
import discourseComputed from "discourse-common/utils/decorators";
|
import discourseComputed from "discourse-common/utils/decorators";
|
||||||
import { get } from "@ember/object";
|
import { computed, get } from "@ember/object";
|
||||||
import { isEmpty } from "@ember/utils";
|
import { isEmpty } from "@ember/utils";
|
||||||
import {
|
import { equal, and, or, not } from "@ember/object/computed";
|
||||||
default as computed,
|
|
||||||
equal,
|
|
||||||
and,
|
|
||||||
or,
|
|
||||||
not
|
|
||||||
} from "@ember/object/computed";
|
|
||||||
import EmberObject from "@ember/object";
|
import EmberObject from "@ember/object";
|
||||||
import { ajax } from "discourse/lib/ajax";
|
import { ajax } from "discourse/lib/ajax";
|
||||||
import RestModel from "discourse/models/rest";
|
import RestModel from "discourse/models/rest";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { isEmpty } from "@ember/utils";
|
import { isEmpty } from "@ember/utils";
|
||||||
import { default as computed, gt, equal, or } from "@ember/object/computed";
|
import { gt, equal, or } from "@ember/object/computed";
|
||||||
import EmberObject from "@ember/object";
|
import EmberObject, { computed } from "@ember/object";
|
||||||
import { ajax } from "discourse/lib/ajax";
|
import { ajax } from "discourse/lib/ajax";
|
||||||
import { url } from "discourse/lib/computed";
|
import { url } from "discourse/lib/computed";
|
||||||
import RestModel from "discourse/models/rest";
|
import RestModel from "discourse/models/rest";
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { h } from "virtual-dom";
|
||||||
import { avatarFor } from "discourse/widgets/post";
|
import { avatarFor } from "discourse/widgets/post";
|
||||||
import { userPath } from "discourse/lib/url";
|
import { userPath } from "discourse/lib/url";
|
||||||
import { autoUpdatingRelativeAge } from "discourse/lib/formatter";
|
import { autoUpdatingRelativeAge } from "discourse/lib/formatter";
|
||||||
import computed from "@ember/object/computed";
|
import { computed } from "@ember/object";
|
||||||
|
|
||||||
export function actionDescriptionHtml(actionCode, createdAt, username) {
|
export function actionDescriptionHtml(actionCode, createdAt, username) {
|
||||||
const dt = new Date(createdAt);
|
const dt = new Date(createdAt);
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { default as computed, or, alias } from "@ember/object/computed";
|
import { or, alias } from "@ember/object/computed";
|
||||||
import Component from "@ember/component";
|
import Component from "@ember/component";
|
||||||
import discourseComputed from "discourse-common/utils/decorators";
|
import discourseComputed from "discourse-common/utils/decorators";
|
||||||
|
import { computed } from "@ember/object";
|
||||||
|
|
||||||
export default Component.extend({
|
export default Component.extend({
|
||||||
attributeBindings: [
|
attributeBindings: [
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||||
import computed from "ember-addons/ember-computed-decorators";
|
import discourseComputed from "discourse-common/utils/decorators";
|
||||||
import showModal from "discourse/lib/show-modal";
|
import showModal from "discourse/lib/show-modal";
|
||||||
|
|
||||||
function initializePollUIBuilder(api) {
|
function initializePollUIBuilder(api) {
|
||||||
api.modifyClass("controller:composer", {
|
api.modifyClass("controller:composer", {
|
||||||
@computed(
|
@discourseComputed(
|
||||||
"siteSettings.poll_enabled",
|
"siteSettings.poll_enabled",
|
||||||
"siteSettings.poll_minimum_trust_level_to_create",
|
"siteSettings.poll_minimum_trust_level_to_create",
|
||||||
"model.topic.pm_with_non_human_user"
|
"model.topic.pm_with_non_human_user"
|
||||||
|
|
Loading…
Reference in New Issue