-
Notifications
You must be signed in to change notification settings - Fork 156
/
Copy pathcarousel-model.d.ts
223 lines (191 loc) · 5.45 KB
/
carousel-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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
import { Component, EventHandler, Collection, Property, Event, EmitType, formatUnit, INotifyPropertyChanged, NotifyPropertyChanges } from '@syncfusion/ej2-base';import { ChildProperty, addClass, removeClass, setStyleAttribute, attributes, getUniqueID, compile, getInstance, L10n } from '@syncfusion/ej2-base';import { append, closest, isNullOrUndefined, remove, classList, Touch, SwipeEventArgs, KeyboardEvents, KeyboardEventArgs, BaseEventArgs } from '@syncfusion/ej2-base';import { Button } from '@syncfusion/ej2-buttons';
import {CarouselAnimationEffect,CarouselButtonVisibility,SlideChangingEventArgs,SlideChangedEventArgs} from "./carousel";
import {ComponentModel} from '@syncfusion/ej2-base';
/**
* Interface for a class CarouselItem
*/
export interface CarouselItemModel {
/**
* Accepts single/multiple classes (separated by a space) to be used for individual carousel item customization.
*
* @default null
*/
cssClass?: string;
/**
* Accepts the interval duration in milliseconds for individual carousel item transition.
*
* @default null
*/
interval?: number;
/**
* Accepts the template for individual carousel item.
*
* @default null
*/
template?: string;
/**
* Accepts HTML attributes/custom attributes to add in individual carousel item.
*
* @default null
*/
htmlAttributes?: Record<string, string>;
}
/**
* Interface for a class Carousel
*/
export interface CarouselModel extends ComponentModel{
/**
* Allows defining the collection of carousel item to be displayed on the Carousel.
*
* @default []
*/
items?: CarouselItemModel[];
/**
* Specifies the type of animation effects. The possible values for this property as follows
* * None
* * Slide
* * Fade
* * Custom
*
* @default 'Slide'
*/
animationEffect?: CarouselAnimationEffect;
/**
* Accepts the template for previous navigation button.
*
* @default null
*/
previousButtonTemplate?: string;
/**
* Accepts the template for next navigation button.
*
* @default null
*/
nextButtonTemplate?: string;
/**
* Accepts the template for indicator buttons.
*
* @default null
*/
indicatorsTemplate?: string;
/**
* Accepts the template for play/pause button.
*
* @default null
*/
playButtonTemplate?: string;
/**
* Accepts single/multiple classes (separated by a space) to be used for carousel customization.
*
* @default null
*/
cssClass?: string;
/**
* Specifies the datasource for the carousel items.
*
* @isdatamanager false
* @default []
*/
dataSource?: Record<string, any>[];
/**
* Specifies the template option for carousel items.
*
* @default null
*/
itemTemplate?: string;
/**
* Specifies index of the current carousel item.
*
* @default 0
*/
selectedIndex?: number;
/**
* Specifies the width of the Carousel in pixels/number/percentage. The number value is considered as pixels.
*
* @default '100%'
*/
width?: string | number;
/**
* Specifies the height of the Carousel in pixels/number/percentage. The number value is considered as pixels.
*
* @default '100%'
*/
height?: string | number;
/**
* Specifies the interval duration in milliseconds for carousel item transition.
*
* @default 5000
*/
interval?: number;
/**
* Defines whether the slide transition is automatic or manual.
*
* @default true
*/
autoPlay?: boolean;
/**
* Defines whether the slide transition gets pause on hover or not.
*
* @default true
*/
pauseOnHover?: boolean;
/**
* Defines whether the slide transitions loop end or not. When set to false, the transition stops at last slide.
*
* @default true
*/
loop?: boolean;
/**
* Defines whether to show play button or not.
*
* @default false
*/
showPlayButton?: boolean;
/**
* Defines whether to enable swipe action in touch devices or not.
*
* @default true
*/
enableTouchSwipe?: boolean;
/**
* Defines whether to show the indicator positions or not. The indicator positions allow to know the current slide position of the carousel component.
*
* @default true
*/
showIndicators?: boolean;
/**
* Defines how to show the previous, next and play pause buttons visibility. The possible values for this property as follows
* * Hidden
* * Visible
* * VisibleOnHover
*
* @default 'Visible'
*/
buttonsVisibility?: CarouselButtonVisibility;
/**
* Enables active slide with partial previous/next slides.
*
* Slide animation only applicable if the partialVisible is enabled.
*
* @default false
*/
partialVisible?: boolean;
/**
* Accepts HTML attributes/custom attributes to add in individual carousel item.
*
* @default null
*/
htmlAttributes?: Record<string, string>;
/**
* The event will be fired before the slide change.
*
* @event slideChanging
*/
slideChanging?: EmitType<SlideChangingEventArgs>;
/**
* The event will be fired after the slide changed.
*
* @event slideChanged
*/
slideChanged?: EmitType<SlideChangedEventArgs>;
}