forked from syncfusion/ej2-javascript-ui-controls
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dialog-model.d.ts
422 lines (375 loc) · 12.5 KB
/
dialog-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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
import { Component, Property, Event, Collection, L10n, EmitType, Complex, compile, createElement } from '@syncfusion/ej2-base';import { addClass, removeClass, detach, attributes, prepend, setStyleAttribute } from '@syncfusion/ej2-base';import { NotifyPropertyChanges, INotifyPropertyChanged, ChildProperty, isBlazor } from '@syncfusion/ej2-base';import { isNullOrUndefined, formatUnit, append, EventHandler, Draggable, extend } from '@syncfusion/ej2-base';import { BlazorDragEventArgs, SanitizeHtmlHelper, Browser } from '@syncfusion/ej2-base';import { Button, ButtonModel } from '@syncfusion/ej2-buttons';import { Popup, PositionData, getZindexPartial } from '../popup/popup';import { PositionDataModel } from '../popup/popup-model';import { createResize, removeResize, setMinHeight, setMaxWidth, setMaxHeight } from '../common/resize';
import {ButtonType,DialogEffect,ResizeDirections,BeforeSanitizeHtmlArgs,BeforeOpenEventArgs,OpenEventArgs,BeforeCloseEventArgs,CloseEventArgs} from "./dialog";
import {ComponentModel} from '@syncfusion/ej2-base';
/**
* Interface for a class ButtonProps
*/
export interface ButtonPropsModel {
/**
* Specifies the flat appearance of the dialog buttons
*
* @default true
*/
isFlat?: boolean;
/**
* Specifies the button component properties to render the dialog buttons.
*/
buttonModel?: ButtonModel;
/**
* Specify the type of the button.
* Possible values are Button, Submit and Reset.
*
* @default 'Button'
* @aspType string
* @blazorType string
*/
type?: ButtonType | string;
/**
* Event triggers when `click` the dialog button.
*
* @event 'object'
* @blazorProperty 'OnClick'
*/
/* eslint-disable */
click?: EmitType<Object>;
}
/**
* Interface for a class AnimationSettings
*/
export interface AnimationSettingsModel {
/**
* Specifies the animation name that should be applied on open and close the dialog.
* If user sets Fade animation, the dialog will open with `FadeIn` effect and close with `FadeOut` effect.
* The following are the list of animation effects available to configure to the dialog:
* 1. Fade
* 2. FadeZoom
* 3. FlipLeftDown
* 4. FlipLeftUp
* 5. FlipRightDown
* 6. FlipRightUp
* 7. FlipXDown
* 8. FlipXUp
* 9. FlipYLeft
* 10. FlipYRight
* 11. SlideBottom
* 12. SlideLeft
* 13. SlideRight
* 14. SlideTop
* 15. Zoom
* 16. None
*
* @default 'Fade'
*/
effect?: DialogEffect;
/**
* Specifies the duration in milliseconds that the animation takes to open or close the dialog.
*
* @default 400
*/
duration?: number;
/**
* Specifies the delay in milliseconds to start animation.
*
* @default 0
*/
delay?: number;
}
/**
* Interface for a class Dialog
*/
export interface DialogModel extends ComponentModel{
/**
* Specifies the value that can be displayed in dialog's content area.
* It can be information, list, or other HTML elements.
* The content of dialog can be loaded with dynamic data such as database, AJAX content, and more.
*
* {% codeBlock src="dialog/content-api/index.ts" %}{% endcodeBlock %}
*
* {% codeBlock src="dialog/content-api/index.html" %}{% endcodeBlock %}
*
* @default ''
* @blazorType string
*/
content?: string | HTMLElement;
/**
* Defines whether to allow the cross-scripting site or not.
*
* @default true
*/
enableHtmlSanitizer?: boolean;
/**
* Specifies the value that represents whether the close icon is shown in the dialog component.
*
* @default false
*/
showCloseIcon?: boolean;
/**
* Specifies the Boolean value whether the dialog can be displayed as modal or non-modal.
* * `Modal`: It creates overlay that disable interaction with the parent application and user should
* respond with modal before continuing with other applications.
* * `Modeless`: It does not prevent user interaction with parent application.
*
* @default false
*/
isModal?: boolean;
/**
* Specifies the value that can be displayed in the dialog's title area that can be configured with plain text or HTML elements.
* This is optional property and the dialog can be displayed without header, if the header property is null.
*
* @default ''
* @blazorType string
*/
header?: string | HTMLElement;
/**
* Specifies the value that represents whether the dialog component is visible.
*
* @default true
*/
visible?: boolean;
/**
* Specifies the value whether the dialog component can be resized by the end-user.
* If enableResize is true, the dialog component creates grip to resize it diagonal direction.
*
* @default false
*/
enableResize?: boolean;
/**
* Specifies the resize handles direction in the dialog component that can be resized by the end-user.
*
* @default ['South-East']
*/
resizeHandles?: ResizeDirections[];
/**
* Specifies the height of the dialog component.
*
* @default 'auto'
* @blazorType string
*/
height?: string | number;
/**
* Specify the min-height of the dialog component.
*
* @default ''
* @blazorType string
*/
minHeight?: string | number;
/**
* Specifies the width of the dialog.
*
* @default '100%'
* @blazorType string
*/
width?: string | number;
/**
* Specifies the CSS class name that can be appended with root element of the dialog.
* One or more custom CSS classes can be added to a dialog.
*
* @default ''
*/
cssClass?: string;
/**
* Specifies the z-order for rendering that determines whether the dialog is displayed in front or behind of another component.
*
* @default 1000
*/
zIndex?: number;
/**
* Specifies the target element in which to display the dialog.
* The default value is null, which refers the `document.body` element.
*
* @default null
* @blazorType string
*/
target?: HTMLElement | string;
/**
* Specifies the template value that can be displayed with dialog's footer area.
* This is optional property and can be used only when the footer is occupied with information or custom components.
* By default, the footer is configured with action [buttons](#buttons).
* If footer template is configured to dialog, the action buttons property will be disabled.
*
* > More information on the footer template configuration can be found on this [documentation](../../dialog/template/#footer) section.
*
* @default ''
* @blazorType string
*/
footerTemplate?: HTMLElement | string;
/**
* Specifies the value whether the dialog component can be dragged by the end-user.
* The dialog allows to drag by selecting the header and dragging it for re-position the dialog.
*
* > More information on the draggable behavior can be found on this [documentation](../../dialog/getting-started/#draggable) section.
*
* {% codeBlock src='dialog/allowDragging/index.md' %}{% endcodeBlock %}
*
* @default false
*/
allowDragging?: boolean;
/**
* Configures the action `buttons` that contains button properties with primary attributes and click events.
* One or more action buttons can be configured to the dialog.
*
* > More information on the button configuration can be found on this
* [documentation](../../dialog/getting-started/#enable-footer) section.
*
* {% codeBlock src="dialog/buttons-api/index.ts" %}{% endcodeBlock %}
*
* {% codeBlock src="dialog/buttons-api/index.html" %}{% endcodeBlock %}
*
* {% codeBlock src='dialog/buttons/index.md' %}{% endcodeBlock %}
*
* @default [{}]
*/
buttons?: ButtonPropsModel[];
/**
* Specifies the boolean value whether the dialog can be closed with the escape key
* that is used to control the dialog's closing behavior.
*
* @default true
*/
closeOnEscape?: boolean;
/**
* Specifies the animation settings of the dialog component.
* The animation effect can be applied on open and close the dialog with duration and delay.
*
* > More information on the animation settings in dialog can be found on this [documentation](../../dialog/animation/) section.
*
* {% codeBlock src="dialog/animation-api/index.ts" %}{% endcodeBlock %}
*
* {% codeBlock src="dialog/animation-api/index.html" %}{% endcodeBlock %}
*
* {% codeBlock src='dialog/animationSettings/index.md' %}{% endcodeBlock %}
*
* @default { effect: 'Fade', duration: 400, delay:0 }
*/
animationSettings?: AnimationSettingsModel;
/**
* Specifies the value where the dialog can be positioned within the document or target.
* The position can be represented with pre-configured positions or specific X and Y values.
* * `X value`: left, center, right, or offset value.
* * `Y value`: top, center, bottom, or offset value.
*
* > More information on the positioning in dialog can be found on this [documentation](../../dialog/getting-started/#positioning) section.
*
* {% codeBlock src='dialog/position/index.md' %}{% endcodeBlock %}
*
* @default { X: 'center', Y: 'center' }
*/
position?: PositionDataModel;
/**
* Event triggers when the dialog is created.
*
* @event 'object'
* @blazorProperty 'Created'
*/
/* eslint-disable */
created?: EmitType<Object>;
/**
* Event triggers when a dialog is opened.
*
* @event 'object'
* @blazorProperty 'Opened'
* @blazorType OpenEventArgs
*/
/* eslint-disable */
open?: EmitType<Object>;
/**
* Event triggers before sanitize the value.
*
* @event 'object'
* @blazorProperty 'OnSanitizeHtml'
*/
beforeSanitizeHtml?: EmitType<BeforeSanitizeHtmlArgs>;
/**
* Event triggers when the dialog is being opened.
* If you cancel this event, the dialog remains closed.
* Set the cancel argument to true to cancel the open of a dialog.
*
* @event 'object'
* @blazorProperty 'OnOpen'
*/
beforeOpen?: EmitType<BeforeOpenEventArgs>;
/**
* Event triggers after the dialog has been closed.
*
* @event 'object'
* @blazorProperty 'Closed'
* @blazorType CloseEventArgs
*/
/* eslint-disable */
close?: EmitType<Object>;
/**
* Event triggers before the dialog is closed.
* If you cancel this event, the dialog remains opened.
* Set the cancel argument to true to cancel the closure of a dialog.
*
* @event 'object'
* @blazorProperty 'OnClose'
*/
beforeClose?: EmitType<BeforeCloseEventArgs>;
/**
* Event triggers when the user begins dragging the dialog.
*
* @event 'object'
* @blazorProperty 'OnDragStart'
* @blazorType DragStartEventArgs
*/
/* eslint-disable */
dragStart?: EmitType<Object>;
/**
* Event triggers when the user stop dragging the dialog.
*
* @event 'object'
* @blazorProperty 'OnDragStop'
* @blazorType DragStopEventArgs
*/
/* eslint-disable */
dragStop?: EmitType<Object>;
/**
* Event triggers when the user drags the dialog.
*
* @event 'object'
* @blazorProperty 'OnDrag'
* @blazorType DragEventArgs
*/
/* eslint-disable */
drag?: EmitType<Object>;
/**
* Event triggers when the overlay of dialog is clicked.
*
* @event 'object'
* @blazorProperty 'OnOverlayClick'
*/
/* eslint-disable */
overlayClick?: EmitType<Object>;
/**
* Event triggers when the user begins to resize a dialog.
*
* @event 'object'
* @blazorProperty 'OnResizeStart'
*/
/* eslint-disable */
resizeStart?: EmitType<Object>;
/**
* Event triggers when the user resize the dialog.
*
* @event 'object'
* @blazorProperty 'Resizing'
*/
/* eslint-disable */
resizing?: EmitType<Object>;
/**
* Event triggers when the user stop to resize a dialog.
*
* @event 'object'
* @blazorProperty 'OnResizeStop'
*/
/* eslint-disable */
resizeStop?: EmitType<Object>;
/**
* Event triggers when the dialog is destroyed.
*
* @event 'object'
* @blazorProperty 'Destroyed'
*/
destroyed?: EmitType<Event>;
}