@gooddata/react-components
Version:
GoodData.UI - A powerful JavaScript library for building analytical applications
43 lines (42 loc) • 1.47 kB
TypeScript
import * as React from "react";
import * as PropTypes from "prop-types";
import { IAttributeDisplayForm, IAttribute } from "./model";
export interface IAttributeLoaderMetadataProps {
getObjectUri: (...params: any[]) => any;
getObjectDetails: (...params: any[]) => any;
}
export interface IAttributeLoaderProps {
metadata: IAttributeLoaderMetadataProps;
projectId?: string;
uri?: string;
identifier?: string;
children(props: IAttributeLoaderChildrenProps): any;
}
export interface IAttributeLoaderState {
attribute: IAttribute;
attributeDisplayForm: IAttributeDisplayForm;
isLoading: boolean;
isUsingIdentifier: boolean;
error?: string;
}
export interface IAttributeLoaderChildrenProps {
attribute: IAttribute;
attributeDisplayForm: IAttributeDisplayForm;
isLoading: boolean;
isUsingIdentifier: boolean;
error?: string;
}
export declare class AttributeLoader extends React.PureComponent<IAttributeLoaderProps, IAttributeLoaderState> {
static propTypes: {
projectId: PropTypes.Requireable<any>;
uri: PropTypes.Requireable<any>;
identifier: PropTypes.Requireable<any>;
metadata: PropTypes.Validator<any>;
};
static defaultProps: Partial<IAttributeLoaderProps>;
constructor(props: IAttributeLoaderProps);
componentDidMount(): void;
componentWillReceiveProps(nextProps: IAttributeLoaderProps): void;
render(): any;
private getAttributeDetails;
}