1 | import { SchemaType } from './parts/Schema';
|
2 | import { Intent } from './Intent';
|
3 | import { Partial } from './Partial';
|
4 | import { SortItem, Ordering } from './Sort';
|
5 | import { SerializeOptions, Serializable, SerializePath } from './StructureNodes';
|
6 | export declare function maybeSerializeMenuItem(item: MenuItem | MenuItemBuilder, index: number, path: SerializePath): MenuItem;
|
7 | declare type ShowAsAction = {
|
8 | whenCollapsed: boolean;
|
9 | };
|
10 | export interface MenuItem {
|
11 | title: string;
|
12 | action?: string | Function;
|
13 | intent?: Intent;
|
14 | group?: string;
|
15 | icon?: Function;
|
16 | params?: object;
|
17 | showAsAction?: boolean | ShowAsAction;
|
18 | }
|
19 | export declare type PartialMenuItem = Partial<MenuItem>;
|
20 | export declare class MenuItemBuilder implements Serializable {
|
21 | protected spec: PartialMenuItem;
|
22 | constructor(spec?: MenuItem);
|
23 | action(action: string | Function): MenuItemBuilder;
|
24 | getAction(): string | Function | undefined;
|
25 | intent(intent: Intent): MenuItemBuilder;
|
26 | getIntent(): Intent | undefined;
|
27 | title(title: string): MenuItemBuilder;
|
28 | getTitle(): string | undefined;
|
29 | group(group: string): MenuItemBuilder;
|
30 | getGroup(): string | undefined;
|
31 | icon(icon: Function): MenuItemBuilder;
|
32 | getIcon(): Function | undefined;
|
33 | params(params: object): MenuItemBuilder;
|
34 | getParams(): object | undefined;
|
35 | showAsAction(showAsAction: boolean | ShowAsAction): MenuItemBuilder;
|
36 | getShowAsAction(): boolean | ShowAsAction | undefined;
|
37 | serialize(options?: SerializeOptions): MenuItem;
|
38 | clone(withSpec?: PartialMenuItem): MenuItemBuilder;
|
39 | }
|
40 | export interface SortMenuItem extends MenuItem {
|
41 | params: {
|
42 | by: SortItem[];
|
43 | };
|
44 | }
|
45 | export declare function getOrderingMenuItem(ordering: Ordering, extendedProjection?: string): MenuItemBuilder;
|
46 | export declare function getOrderingMenuItemsForSchemaType(typeName: SchemaType | string): any;
|
47 | export {};
|