-
Notifications
You must be signed in to change notification settings - Fork 30k
/
OutlineOptionWidget.d.ts
100 lines (87 loc) · 3.24 KB
/
OutlineOptionWidget.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
declare namespace OO.ui {
/**
* OutlineOptionWidget is an item in an {@link OO.ui.OutlineSelectWidget OutlineSelectWidget}.
*
* Currently, this class is only used by {@link OO.ui.BookletLayout booklet layouts}, which
* contain {@link OO.ui.PageLayout page layouts}. See {@link OO.ui.BookletLayout BookletLayout}
* for an example.
*
* ResourceLoader module: `oojs-ui-widgets`
*
* @see https://doc.wikimedia.org/oojs-ui/master/js/#!/api/OO.ui.OutlineOptionWidget
*/
interface OutlineOptionWidget extends OutlineOptionWidget.Props, OutlineOptionWidget.Prototype {}
namespace OutlineOptionWidget {
interface ConfigOptions extends DecoratedOptionWidget.ConfigOptions {
/** Indentation level */
level?: number;
/** Allow modification from {@link OO.ui.OutlineControlsWidget outline controls}. */
movable?: boolean;
removable?: boolean;
}
interface Static extends DecoratedOptionWidget.Static {
levelClass: string;
levels: number;
}
type Props = DecoratedOptionWidget.Props;
interface Prototype extends DecoratedOptionWidget.Prototype {
/**
* Check if item is movable.
*
* Movability is used by {@link OO.ui.OutlineControlsWidget outline controls}.
*
* @return Item is movable
*/
isMovable(): boolean;
/**
* Check if item is removable.
*
* Removability is used by {@link OO.ui.OutlineControlsWidget outline controls}.
*
* @return Item is removable
*/
isRemovable(): boolean;
/**
* Get indentation level.
*
* @return Indentation level
*/
getLevel(): number;
/**
* Set movability.
*
* Movability is used by {@link OO.ui.OutlineControlsWidget outline controls}.
*
* @param movable Item is movable
* @return The widget, for chaining
*/
setMovable(movable: boolean): this;
/**
* Set removability.
*
* Removability is used by {@link OO.ui.OutlineControlsWidget outline controls}.
*
* @param removable Item is removable
* @return The widget, for chaining
*/
setRemovable(removable: boolean): this;
/**
* Set indentation level.
*
* @param level Indentation level, in the range of [0, maxLevel]
* @return The widget, for chaining
*/
setLevel(level?: number): this;
}
interface Constructor {
/** @param config Configuration options */
new(config?: ConfigOptions): OutlineOptionWidget;
prototype: Prototype;
static: Static;
super: DecoratedOptionWidget.Constructor;
/** @deprecated Use `super` instead */
parent: DecoratedOptionWidget.Constructor;
}
}
const OutlineOptionWidget: OutlineOptionWidget.Constructor;
}