@gooddata/react-components
Version:
GoodData.UI - A powerful JavaScript library for building analytical applications
35 lines (30 loc) • 1.35 kB
text/typescript
// (C) 2019-2020 GoodData Corporation
import * as Operator from "../constants/measureValueFilterOperators";
const translationKeysDictionary = {
[]: "mvf.operator.all",
[]: "mvf.operator.greaterThan",
[]: "mvf.operator.greaterThanOrEqualTo",
[]: "mvf.operator.lessThan",
[]: "mvf.operator.lessThanOrEqualTo",
[]: "mvf.operator.equalTo",
[]: "mvf.operator.notEqualTo",
[]: "mvf.operator.between",
[]: "mvf.operator.notBetween",
};
export const getOperatorTranslationKey = (operator: string) => {
return translationKeysDictionary[operator];
};
export const getOperatorIcon = (operator: string) => {
const iconNamesDictionary = {
[]: "all",
[]: "greater-than",
[]: "greater-than-equal-to",
[]: "less-than",
[]: "less-than-equal-to",
[]: "equal-to",
[]: "not-equal-to",
[]: "between",
[]: "not-between",
};
return iconNamesDictionary[operator];
};