本文整理匯總了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);
}