@aappddeevv/dynamics-client-ui
Version:
## What is it? A library to help you create great dynamics applications.
34 lines (33 loc) • 1.03 kB
TypeScript
export declare const defaultDateTimeFormat = "MM/DD/YY h:mm:ss a";
/** Props to the renderer factory. */
export interface RendererProps {
id?: string;
property: string;
label: string;
width?: number;
dateFormat?: string;
}
export declare function dateRenderer(props: RendererProps): {
id: string;
property: string;
header: {
label: string;
};
props: {
style: {
minWidth: number;
};
};
cell: {
formatters: ((dt: Date) => any)[];
};
};
/** Data types this factory understands. */
export declare type DataType = "string" | "date" | "entity";
/**
* Based on a string type, obtain a renderer. Props may contain additional hints
* about which renderer to use. The returned object should be merged with other
* properties before being used in CrmTable. If you merge, use a deep/smart merge
* approach as Object.assign only does a toplevel merge.
*/
export declare function columnFactory(dtype: DataType, props: RendererProps): object;