1 | import { SerializeOptions, Serializable, Collection, CollectionBuilder } from './StructureNodes';
|
2 | import { SchemaType } from './parts/Schema';
|
3 | import { ChildResolver } from './ChildResolver';
|
4 | import { DocumentListBuilder } from './DocumentList';
|
5 | import { Partial } from './Partial';
|
6 | import { ListBuilder } from './List';
|
7 | import { EditorBuilder } from './Editor';
|
8 | import { ComponentBuilder } from './Component';
|
9 | declare type UnserializedListItemChild = Collection | CollectionBuilder | ChildResolver;
|
10 | declare type ListItemChild = Collection | ChildResolver | undefined;
|
11 | interface ListItemSerializeOptions extends SerializeOptions {
|
12 | titleIsOptional?: boolean;
|
13 | }
|
14 | interface ListItemDisplayOptions {
|
15 | showIcon?: boolean;
|
16 | }
|
17 | export interface ListItemInput {
|
18 | id: string;
|
19 | title?: string;
|
20 | icon?: Function;
|
21 | child?: ListItemChild;
|
22 | displayOptions?: ListItemDisplayOptions;
|
23 | schemaType?: SchemaType | string;
|
24 | }
|
25 | export interface ListItem {
|
26 | id: string;
|
27 | type: string;
|
28 | title?: string;
|
29 | icon?: Function;
|
30 | child?: ListItemChild;
|
31 | displayOptions?: ListItemDisplayOptions;
|
32 | schemaType?: SchemaType;
|
33 | }
|
34 | export interface UnserializedListItem {
|
35 | id: string;
|
36 | title: string;
|
37 | icon?: Function;
|
38 | child?: UnserializedListItemChild;
|
39 | displayOptions?: ListItemDisplayOptions;
|
40 | schemaType?: SchemaType | string;
|
41 | }
|
42 | declare type PartialListItem = Partial<UnserializedListItem>;
|
43 | export declare class ListItemBuilder implements Serializable {
|
44 | protected spec: PartialListItem;
|
45 | constructor(spec?: ListItemInput);
|
46 | id(id: string): ListItemBuilder;
|
47 | getId(): string | undefined;
|
48 | title(title: string): ListItemBuilder;
|
49 | getTitle(): string | undefined;
|
50 | icon(icon: Function): ListItemBuilder;
|
51 | showIcon(enabled: boolean): ListItemBuilder;
|
52 | getShowIcon(): boolean | undefined;
|
53 | getIcon(): Function | undefined;
|
54 | child(child: UnserializedListItemChild): ListItemBuilder;
|
55 | getChild(): EditorBuilder | import("./StructureNodes").EditorNode | import("./List").List | import("./DocumentList").DocumentList | import("./Component").Component | ListBuilder | DocumentListBuilder | import("./DocumentTypeList").DocumentTypeListBuilder | ComponentBuilder | ChildResolver | undefined;
|
56 | schemaType(schemaType: SchemaType | string): ListItemBuilder;
|
57 | getSchemaType(): string | SchemaType | undefined;
|
58 | serialize(options?: ListItemSerializeOptions): ListItem;
|
59 | clone(withSpec?: PartialListItem): ListItemBuilder;
|
60 | }
|
61 | export {};
|