forked from syncfusion/ej2-javascript-ui-controls
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsidebar-model.d.ts
200 lines (176 loc) · 5.87 KB
/
sidebar-model.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
import { Component, formatUnit, EventHandler, Event, isNullOrUndefined, closest, Browser } from '@syncfusion/ej2-base';import { Property, EmitType, NotifyPropertyChanges, INotifyPropertyChanged, isNullOrUndefined as isNOU } from '@syncfusion/ej2-base';import { setStyleAttribute as setStyle, addClass, removeClass, Touch, SwipeEventArgs } from '@syncfusion/ej2-base';
import {SidebarPosition,SidebarType,EventArgs,ChangeEventArgs} from "./sidebar";
import {ComponentModel} from '@syncfusion/ej2-base';
/**
* Interface for a class Sidebar
*/
export interface SidebarModel extends ComponentModel{
/**
* Specifies the size of the Sidebar in dock state.
* > For more details about dockSize refer to
* [`Dock`](https://ej2.syncfusion.com/documentation/sidebar/docking-sidebar/) documentation.
*
* @default 'auto'
*/
dockSize?: string | number;
/**
* Specifies the media query string for resolution, which when met opens the Sidebar.
* ```typescript
* let defaultSidebar: Sidebar = new Sidebar({
* mediaQuery:'(min-width: 600px)'
* });
* ```
* > For more details about mediaQuery refer to
* [`Auto Close`](https://ej2.syncfusion.com/documentation/sidebar/auto-close/) documentation.
*
* @default null
* @aspType string
*/
mediaQuery?: string | MediaQueryList;
/**
* Specifies the docking state of the component.
* > For more details about enableDock refer to
* [`Dock`](https://ej2.syncfusion.com/documentation/sidebar/docking-sidebar/) documentation.
*
* @default false
*/
enableDock?: boolean;
/**
* Enables the expand or collapse while swiping in touch devices.
* This is not a sidebar property.
*
* @default 'en-US'
* @private
*/
locale?: string;
/**
* Enable or disable persisting component's state between page reloads. If enabled, following list of states will be persisted.
* 1. Position
* 2. Type
*
* @default false
*/
enablePersistence?: boolean;
/**
* Enables the expand or collapse while swiping in touch devices.
*
* @default true
*/
enableGestures?: boolean;
/**
* Gets or sets the Sidebar component is open or close.
* > When the Sidebar type is set to `Auto`,
* the component will be expanded in the desktop and collapsed in the mobile mode regardless of the isOpen property.
*
* @default false
*/
isOpen?: boolean;
/**
* Specifies the Sidebar in RTL mode that displays the content in the right-to-left direction.
*
* @default false
*/
enableRtl?: boolean;
/**
* Enable or disable the animation transitions on expanding or collapsing the Sidebar.
*
* @default true
*/
animate?: boolean;
/**
* Specifies the height of the Sidebar.
*
* @default 'auto'
* @private
*/
height?: string | number;
/**
* Specifies whether the Sidebar need to be closed or not when document area is clicked.
*
* @default false
*/
closeOnDocumentClick?: boolean;
/**
* Specifies the position of the Sidebar (Left/Right) corresponding to the main content.
* > For more details about SidebarPosition refer to
* [`position`](https://ej2.syncfusion.com/documentation/sidebar/getting-started/#position) documentation.
*
* @default 'Left'
*/
position?: SidebarPosition;
/**
* Allows to place the sidebar inside the target element.
* > For more details about target refer to
* [`Custom Context`](https://ej2.syncfusion.com/documentation/sidebar/custom-context/) documentation.
*
* @default null
*/
target?: HTMLElement | string;
/**
* Specifies the whether to apply overlay options to main content when the Sidebar is in an open state.
* > For more details about showBackdrop refer to
* [`Backdrop`](https://ej2.syncfusion.com/documentation/sidebar/getting-started/#enable-backdrop) documentation.
*
* @default false
*/
showBackdrop?: boolean;
/**
* Specifies the expanding types of the Sidebar.
* * `Over` - The sidebar floats over the main content area.
* * `Push` - The sidebar pushes the main content area to appear side-by-side, and shrinks the main content within the screen width.
* * `Slide` - The sidebar translates the x and y positions of main content area based on the sidebar width.
* The main content area will not be adjusted within the screen width.
* * `Auto` - Sidebar with `Over` type in mobile resolution and `Push` type in other higher resolutions.
* > For more details about SidebarType refer to
* [`SidebarType`](../../sidebar/variations/) documentation.
*
* @default 'Auto'
*/
type?: SidebarType;
/**
* Specifies the width of the Sidebar. By default, the width of the Sidebar sets based on the size of its content.
* Width can also be set in pixel values.
*
* @default 'auto'
*/
width?: string | number;
/**
* Specifies the z-index of the Sidebar. It is applicable only when sidebar act as overlay type.
*
* @default 1000
* @aspType double
*/
zIndex?: string | number;
/**
* Triggers when component is created.
*
* @event created
*
*
*/
created?: EmitType<Object>;
/**
* Triggers when component is closed.
*
* @event close
*/
close?: EmitType<EventArgs>;
/**
* Triggers when component is opened.
*
* @event open
*/
open?: EmitType<EventArgs>;
/**
* Triggers when the state(expand/collapse) of the component is changed.
*
* @event change
*/
change?: EmitType<ChangeEventArgs>;
/**
* Triggers when component gets destroyed.
*
* @event destroyed
*/
destroyed?: EmitType<Object>;
}