@gooddata/react-components
Version:
GoodData.UI - A powerful JavaScript library for building analytical applications
68 lines (67 loc) • 2.92 kB
TypeScript
import * as React from "react";
import { SDK } from "@gooddata/gooddata-js";
import { AFM, Execution, VisualizationInput } from "@gooddata/typings";
declare type dimensionItem = VisualizationInput.AttributeOrMeasure | VisualizationInput.IAttribute;
export declare const getExecutionFromDimensions: (dimensions: VisualizationInput.AttributeOrMeasure[][], filters: VisualizationInput.IFilter[], sorts: AFM.SortItem[]) => AFM.IExecution;
export interface IPaging {
offset: number[];
limit: number[];
}
export interface IBucketExecutorChildrenProps {
result: Execution.IExecutionResult | null;
response: Execution.IExecutionResponse | null;
getPage: (paging: IPaging) => void;
}
export interface IBucketExecutorProps {
telemetryComponentName?: string;
autoLoadFirstPage?: boolean;
initialPaging?: IPaging;
sdk?: SDK;
ErrorComponent?: React.ComponentType<{
code?: string;
message?: string;
getPage?: (paging: IPaging) => void;
}>;
LoadingComponent?: React.ComponentType;
children: (childrenProps: IBucketExecutorChildrenProps) => React.ReactNode;
dimensions: dimensionItem[][];
projectId: string;
filters?: VisualizationInput.IFilter[];
sortBy?: VisualizationInput.ISort[];
}
export interface IBucketExecutorState {
result: Execution.IExecutionResult | null;
response: Execution.IExecutionResponse | null;
isLoading: boolean;
error: any;
responsePromise: Promise<Execution.IExecutionResponse> | null;
resultPromise: Promise<Execution.IExecutionResult> | null;
children: IBucketExecutorProps["children"];
dimensions: IBucketExecutorProps["dimensions"];
projectId: IBucketExecutorProps["projectId"];
filters: IBucketExecutorProps["filters"];
sortBy: IBucketExecutorProps["sortBy"];
}
export interface IBucketExecutorChildrenProps {
response: Execution.IExecutionResponse | null;
result: Execution.IExecutionResult | null;
getPage: (paging: IPaging) => void;
}
export declare type propList = Array<keyof IBucketExecutorProps>;
export declare class BucketExecutor extends React.Component<IBucketExecutorProps, IBucketExecutorState> {
static defaultProps: Partial<IBucketExecutorProps>;
static getDerivedStateFromProps(nextProps: IBucketExecutorProps, prevState: IBucketExecutorState): Partial<IBucketExecutorState>;
componentDidUpdate(prevProps: IBucketExecutorProps, prevState: IBucketExecutorState): void;
state: IBucketExecutorState;
hasUnmounted: boolean;
private sdk;
constructor(props: IBucketExecutorProps);
componentDidMount(): void;
componentWillUnmount(): void;
getPage: (paging: IPaging) => void;
getResponse: (triggerGetResult?: boolean, resultPaging?: IPaging) => void;
getResult: (response: Execution.IExecutionResponse, paging: IPaging) => void;
getInitialPaging: () => IPaging;
render(): {};
}
export {};