DEV: Remove use of run-loop-and-computed-dot-access (#17113)
Context: https://deprecations.emberjs.com/v3.x/#toc_deprecated-run-loop-and-computed-dot-access
This commit is contained in:
parent
b0a896a10f
commit
1ada3a9404
|
@ -1,5 +1,35 @@
|
||||||
import { on as emberOn } from "@ember/object/evented";
|
import { on as emberOn } from "@ember/object/evented";
|
||||||
import { computed, observer } from "@ember/object";
|
import { observer } from "@ember/object";
|
||||||
|
import {
|
||||||
|
alias as EmberAlias,
|
||||||
|
and as EmberAnd,
|
||||||
|
bool as EmberBool,
|
||||||
|
collect as EmberCollect,
|
||||||
|
empty as EmberEmpty,
|
||||||
|
equal as EmberEqual,
|
||||||
|
filter as EmberFilter,
|
||||||
|
filterBy as EmberFilterBy,
|
||||||
|
gt as EmberGt,
|
||||||
|
gte as EmberGte,
|
||||||
|
lt as EmberLt,
|
||||||
|
lte as EmberLte,
|
||||||
|
map as EmberMap,
|
||||||
|
mapBy as EmberMapBy,
|
||||||
|
match as EmberMatch,
|
||||||
|
max as EmberMax,
|
||||||
|
min as EmberMin,
|
||||||
|
none as EmberNone,
|
||||||
|
not as EmberNot,
|
||||||
|
notEmpty as EmberNotEmpty,
|
||||||
|
oneWay as EmberOneWay,
|
||||||
|
or as EmberOr,
|
||||||
|
reads as EmberReads,
|
||||||
|
setDiff as EmberSetDiff,
|
||||||
|
sort as EmberSort,
|
||||||
|
sum as EmberSum,
|
||||||
|
union as EmberUnion,
|
||||||
|
uniq as EmberUniq,
|
||||||
|
} from "@ember/object/computed";
|
||||||
import { bind as emberBind, schedule } from "@ember/runloop";
|
import { bind as emberBind, schedule } from "@ember/runloop";
|
||||||
import decoratorAlias from "discourse-common/utils/decorator-alias";
|
import decoratorAlias from "discourse-common/utils/decorator-alias";
|
||||||
import extractValue from "discourse-common/utils/extract-value";
|
import extractValue from "discourse-common/utils/extract-value";
|
||||||
|
@ -63,31 +93,31 @@ export const observes = decoratorAlias(
|
||||||
"Can not `observe` without property names"
|
"Can not `observe` without property names"
|
||||||
);
|
);
|
||||||
|
|
||||||
export const alias = macroAlias(computed.alias);
|
export const alias = macroAlias(EmberAlias);
|
||||||
export const and = macroAlias(computed.and);
|
export const and = macroAlias(EmberAnd);
|
||||||
export const bool = macroAlias(computed.bool);
|
export const bool = macroAlias(EmberBool);
|
||||||
export const collect = macroAlias(computed.collect);
|
export const collect = macroAlias(EmberCollect);
|
||||||
export const empty = macroAlias(computed.empty);
|
export const empty = macroAlias(EmberEmpty);
|
||||||
export const equal = macroAlias(computed.equal);
|
export const equal = macroAlias(EmberEqual);
|
||||||
export const filter = macroAlias(computed.filter);
|
export const filter = macroAlias(EmberFilter);
|
||||||
export const filterBy = macroAlias(computed.filterBy);
|
export const filterBy = macroAlias(EmberFilterBy);
|
||||||
export const gt = macroAlias(computed.gt);
|
export const gt = macroAlias(EmberGt);
|
||||||
export const gte = macroAlias(computed.gte);
|
export const gte = macroAlias(EmberGte);
|
||||||
export const lt = macroAlias(computed.lt);
|
export const lt = macroAlias(EmberLt);
|
||||||
export const lte = macroAlias(computed.lte);
|
export const lte = macroAlias(EmberLte);
|
||||||
export const map = macroAlias(computed.map);
|
export const map = macroAlias(EmberMap);
|
||||||
export const mapBy = macroAlias(computed.mapBy);
|
export const mapBy = macroAlias(EmberMapBy);
|
||||||
export const match = macroAlias(computed.match);
|
export const match = macroAlias(EmberMatch);
|
||||||
export const max = macroAlias(computed.max);
|
export const max = macroAlias(EmberMax);
|
||||||
export const min = macroAlias(computed.min);
|
export const min = macroAlias(EmberMin);
|
||||||
export const none = macroAlias(computed.none);
|
export const none = macroAlias(EmberNone);
|
||||||
export const not = macroAlias(computed.not);
|
export const not = macroAlias(EmberNot);
|
||||||
export const notEmpty = macroAlias(computed.notEmpty);
|
export const notEmpty = macroAlias(EmberNotEmpty);
|
||||||
export const oneWay = macroAlias(computed.oneWay);
|
export const oneWay = macroAlias(EmberOneWay);
|
||||||
export const or = macroAlias(computed.or);
|
export const or = macroAlias(EmberOr);
|
||||||
export const reads = macroAlias(computed.reads);
|
export const reads = macroAlias(EmberReads);
|
||||||
export const setDiff = macroAlias(computed.setDiff);
|
export const setDiff = macroAlias(EmberSetDiff);
|
||||||
export const sort = macroAlias(computed.sort);
|
export const sort = macroAlias(EmberSort);
|
||||||
export const sum = macroAlias(computed.sum);
|
export const sum = macroAlias(EmberSum);
|
||||||
export const union = macroAlias(computed.union);
|
export const union = macroAlias(EmberUnion);
|
||||||
export const uniq = macroAlias(computed.uniq);
|
export const uniq = macroAlias(EmberUniq);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import SingleSelectComponent from "select-kit/components/single-select";
|
import SingleSelectComponent from "select-kit/components/single-select";
|
||||||
import { computed } from "@ember/object";
|
import { gte } from "@ember/object/computed";
|
||||||
|
|
||||||
export default SingleSelectComponent.extend({
|
export default SingleSelectComponent.extend({
|
||||||
pluginApiIdentifiers: ["combo-box"],
|
pluginApiIdentifiers: ["combo-box"],
|
||||||
|
@ -13,5 +13,5 @@ export default SingleSelectComponent.extend({
|
||||||
headerComponent: "combo-box/combo-box-header",
|
headerComponent: "combo-box/combo-box-header",
|
||||||
},
|
},
|
||||||
|
|
||||||
autoFilterable: computed.gte("content.length", 10),
|
autoFilterable: gte("content.length", 10),
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue