diff --git a/app/assets/javascripts/discourse-common/addon/utils/decorators.js b/app/assets/javascripts/discourse-common/addon/utils/decorators.js index 5417a0dabcc..b847ad830e3 100644 --- a/app/assets/javascripts/discourse-common/addon/utils/decorators.js +++ b/app/assets/javascripts/discourse-common/addon/utils/decorators.js @@ -1,5 +1,35 @@ 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 decoratorAlias from "discourse-common/utils/decorator-alias"; import extractValue from "discourse-common/utils/extract-value"; @@ -63,31 +93,31 @@ export const observes = decoratorAlias( "Can not `observe` without property names" ); -export const alias = macroAlias(computed.alias); -export const and = macroAlias(computed.and); -export const bool = macroAlias(computed.bool); -export const collect = macroAlias(computed.collect); -export const empty = macroAlias(computed.empty); -export const equal = macroAlias(computed.equal); -export const filter = macroAlias(computed.filter); -export const filterBy = macroAlias(computed.filterBy); -export const gt = macroAlias(computed.gt); -export const gte = macroAlias(computed.gte); -export const lt = macroAlias(computed.lt); -export const lte = macroAlias(computed.lte); -export const map = macroAlias(computed.map); -export const mapBy = macroAlias(computed.mapBy); -export const match = macroAlias(computed.match); -export const max = macroAlias(computed.max); -export const min = macroAlias(computed.min); -export const none = macroAlias(computed.none); -export const not = macroAlias(computed.not); -export const notEmpty = macroAlias(computed.notEmpty); -export const oneWay = macroAlias(computed.oneWay); -export const or = macroAlias(computed.or); -export const reads = macroAlias(computed.reads); -export const setDiff = macroAlias(computed.setDiff); -export const sort = macroAlias(computed.sort); -export const sum = macroAlias(computed.sum); -export const union = macroAlias(computed.union); -export const uniq = macroAlias(computed.uniq); +export const alias = macroAlias(EmberAlias); +export const and = macroAlias(EmberAnd); +export const bool = macroAlias(EmberBool); +export const collect = macroAlias(EmberCollect); +export const empty = macroAlias(EmberEmpty); +export const equal = macroAlias(EmberEqual); +export const filter = macroAlias(EmberFilter); +export const filterBy = macroAlias(EmberFilterBy); +export const gt = macroAlias(EmberGt); +export const gte = macroAlias(EmberGte); +export const lt = macroAlias(EmberLt); +export const lte = macroAlias(EmberLte); +export const map = macroAlias(EmberMap); +export const mapBy = macroAlias(EmberMapBy); +export const match = macroAlias(EmberMatch); +export const max = macroAlias(EmberMax); +export const min = macroAlias(EmberMin); +export const none = macroAlias(EmberNone); +export const not = macroAlias(EmberNot); +export const notEmpty = macroAlias(EmberNotEmpty); +export const oneWay = macroAlias(EmberOneWay); +export const or = macroAlias(EmberOr); +export const reads = macroAlias(EmberReads); +export const setDiff = macroAlias(EmberSetDiff); +export const sort = macroAlias(EmberSort); +export const sum = macroAlias(EmberSum); +export const union = macroAlias(EmberUnion); +export const uniq = macroAlias(EmberUniq); diff --git a/app/assets/javascripts/select-kit/addon/components/combo-box.js b/app/assets/javascripts/select-kit/addon/components/combo-box.js index a9b2f95482b..03735a83813 100644 --- a/app/assets/javascripts/select-kit/addon/components/combo-box.js +++ b/app/assets/javascripts/select-kit/addon/components/combo-box.js @@ -1,5 +1,5 @@ import SingleSelectComponent from "select-kit/components/single-select"; -import { computed } from "@ember/object"; +import { gte } from "@ember/object/computed"; export default SingleSelectComponent.extend({ pluginApiIdentifiers: ["combo-box"], @@ -13,5 +13,5 @@ export default SingleSelectComponent.extend({ headerComponent: "combo-box/combo-box-header", }, - autoFilterable: computed.gte("content.length", 10), + autoFilterable: gte("content.length", 10), });