mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Fix function prototype deprecations (#8681)
* DEV: Fix the function prototype observers deprecation
DEPRECATION: Function prototype extensions have been deprecated, please migrate from function(){}.observes('foo') to observer('foo', function() {}). [deprecation id: function-prototype-extensions.observes] See https://deprecations.emberjs.com/v3.x/#toc_function-prototype-extensions-observes for more details.
* DEV: Fix the function prototype event listeners deprecation
DEPRECATION: Function prototype extensions have been deprecated, please migrate from function(){}.on('foo') to on('foo', function() {}). [deprecation id: function-prototype-extensions.on] See https://deprecations.emberjs.com/v3.x/#toc_function-prototype-extensions-on for more details.
* DEV: Simplify `default as` imports
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
This commit is contained in:
@@ -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");
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user