import { Observable } from 'rxjs'; import { PeriodFunctions } from '../annotations'; import { EntityType, Indicator, Property, PropertyHierarchy, PropertyLevel, QueryReturn, TimeGranularity } from '../models/index'; import { FilterOperator, QueryOptions } from '../types'; import { SmartBusinessService, SmartBusinessState } from './smart-business.service'; export interface IndicatorBusinessState extends SmartBusinessState { indicatorId: string; /** * time period functions for indicator measure */ measures: Array; lookBack?: number; } /** * */ export declare class SmartIndicatorDataService extends SmartBusinessService { #private; get indicator(): Indicator; set indicator(value: Indicator); get lookBack(): number; private _indicator$; readonly indicator$: Observable; readonly indicatorId$: Observable; readonly measures$: Observable; calendar: Property; calendarHierarchy: PropertyHierarchy; calendarLevel: PropertyLevel; /** * Cache of time calculation members of indicators */ indicatorMeasures: Record>; /** * Default time granularity for indicator trend */ get timeGranularity(): TimeGranularity; set timeGranularity(value: TimeGranularity); onInit(): Observable; /** * Register a derivative indicator of an indicator such as year-on-year, month-on-month * * @param indicator * @param members * @returns */ registerMembers(indicator: Indicator, members: Array): string[][]; queryIndicator(indicator: Indicator | string, measures: Array, lookBack?: number, force?: boolean | void): Observable>; /** * Get or register the time calculation member of the indicator, * such as the year-on-year and month-on-month changes of a certain indicator * * @param indicator * @param type * @returns */ getOrRegisterMember(indicator: Indicator, type: PeriodFunctions): string; selectQuery(options: QueryOptions, indicator?: Indicator, measures?: Array, lookBack?: number): Observable>; timeRange2Slicer(timeRange: string[]): { dimension: { dimension: string; hierarchy: string; }; members: { key: string; }[]; operator?: undefined; } | { dimension: { dimension: string; hierarchy: string; }; members: { key: string; }[]; operator: FilterOperator; }; } /** * Get calendar dimension by calendar field, or get the calednar level by timeGranularity * * @param indicator * @param entityType * @param timeGranularity * @returns */ export declare function getIndicatorEntityCalendar(indicator: Indicator, entityType: EntityType, timeGranularity: TimeGranularity): { dimension: Property; hierarchy: PropertyHierarchy; level?: PropertyLevel; } | { dimension: any; hierarchy: any; level: any; };