本文整理汇总了TypeScript中@gooddata/typings.AFM类的典型用法代码示例。如果您正苦于以下问题:TypeScript AFM类的具体用法?TypeScript AFM怎么用?TypeScript AFM使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了AFM类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: getDateFilterDateDataSet
export function getDateFilterDateDataSet(filter: AFM.DateFilterItem): AFM.ObjQualifier {
if (AFM.isRelativeDateFilter(filter)) {
return filter.relativeDateFilter.dataSet;
}
if (AFM.isAbsoluteDateFilter(filter)) {
return filter.absoluteDateFilter.dataSet;
}
throw new Error('Unsupported type of date filter');
}
示例2: convertMeasureFilter
function convertMeasureFilter(filter: AFM.FilterItem): ExecuteAFM.FilterItem {
if (AFM.isPositiveAttributeFilter(filter)) {
return convertPositiveAttributeFilter(filter);
} else if (AFM.isNegativeAttributeFilter(filter)) {
return convertNegativeAttributeFilter(filter);
}
return filter;
}
示例3: convertFilter
function convertFilter(filter: AFM.CompatibilityFilter): ExecuteAFM.CompatibilityFilter {
if (AFM.isPositiveAttributeFilter(filter)) {
return convertPositiveAttributeFilter(filter);
} else if (AFM.isNegativeAttributeFilter(filter)) {
return convertNegativeAttributeFilter(filter);
}
return filter;
}
示例4: convertMeasure
function convertMeasure(measure: AFM.IMeasure): ExecuteAFM.IMeasure {
if (AFM.isSimpleMeasureDefinition(measure.definition)) {
const simpleMeasure = measure.definition.measure;
const filters = convertMeasureFilters(simpleMeasure.filters);
const filtersProp = filters ? { filters } : {};
return {
...measure,
definition: {
measure: {
...simpleMeasure,
...filtersProp
}
}
};
}
return measure;
}
示例5:
const afmAttributeFilters = afmFilters.filter(filter => !AFM.isDateFilter(filter));
示例6: isDateFilterAllTime
function isDateFilterAllTime(dateFilter: AFM.DateFilterItem): boolean {
if (AFM.isRelativeDateFilter(dateFilter)) {
return dateFilter.relativeDateFilter.granularity === ALL_TIME_GRANULARITY;
}
return false;
}
示例7: isDateFilter
export function isDateFilter(filter: AFM.CompatibilityFilter): filter is AFM.DateFilterItem {
return AFM.isDateFilter(filter);
}
示例8: isAttributeFilter
export function isAttributeFilter(filter: AFM.FilterItem): filter is AFM.AttributeFilterItem {
return AFM.isAttributeFilter(filter);
}