當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript typings.AFM類代碼示例

本文整理匯總了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');
}
開發者ID:gooddata,項目名稱:gooddata-js,代碼行數:9,代碼來源:AfmUtils.ts

示例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;
}
開發者ID:gooddata,項目名稱:gooddata-js,代碼行數:9,代碼來源:execute-afm.convert.ts

示例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;
}
開發者ID:gooddata,項目名稱:gooddata-js,代碼行數:9,代碼來源:execute-afm.convert.ts

示例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;
}
開發者ID:gooddata,項目名稱:gooddata-js,代碼行數:19,代碼來源:execute-afm.convert.ts

示例5:

 const afmAttributeFilters = afmFilters.filter(filter => !AFM.isDateFilter(filter));
開發者ID:gooddata,項目名稱:gooddata-js,代碼行數:1,代碼來源:AfmUtils.ts

示例6: isDateFilterAllTime

function isDateFilterAllTime(dateFilter: AFM.DateFilterItem): boolean {
    if (AFM.isRelativeDateFilter(dateFilter)) {
        return dateFilter.relativeDateFilter.granularity === ALL_TIME_GRANULARITY;
    }
    return false;
}
開發者ID:gooddata,項目名稱:gooddata-js,代碼行數:6,代碼來源:AfmUtils.ts

示例7: isDateFilter

export function isDateFilter(filter: AFM.CompatibilityFilter): filter is AFM.DateFilterItem {
    return AFM.isDateFilter(filter);
}
開發者ID:gooddata,項目名稱:gooddata-js,代碼行數:3,代碼來源:AfmUtils.ts

示例8: isAttributeFilter

export function isAttributeFilter(filter: AFM.FilterItem): filter is AFM.AttributeFilterItem {
    return AFM.isAttributeFilter(filter);
}
開發者ID:gooddata,項目名稱:gooddata-js,代碼行數:3,代碼來源:AfmUtils.ts


注:本文中的@gooddata/typings.AFM類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。