fomantic-ui 2.9.3-beta.46 → 2.9.3-beta.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +1 -1
- package/dist/components/accordion.min.css +1 -1
- package/dist/components/accordion.min.js +1 -1
- package/dist/components/ad.css +1 -1
- package/dist/components/ad.min.css +1 -1
- package/dist/components/api.js +1 -1
- package/dist/components/api.min.js +1 -1
- package/dist/components/breadcrumb.css +1 -1
- package/dist/components/breadcrumb.min.css +1 -1
- package/dist/components/button.css +1 -1
- package/dist/components/button.min.css +1 -1
- package/dist/components/calendar.css +1 -1
- package/dist/components/calendar.js +1 -1
- package/dist/components/calendar.min.css +1 -1
- package/dist/components/calendar.min.js +1 -1
- package/dist/components/card.css +1 -1
- package/dist/components/card.min.css +1 -1
- package/dist/components/checkbox.css +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/checkbox.min.css +1 -1
- package/dist/components/checkbox.min.js +1 -1
- package/dist/components/comment.css +1 -1
- package/dist/components/comment.min.css +1 -1
- package/dist/components/container.css +1 -1
- package/dist/components/container.min.css +1 -1
- package/dist/components/dimmer.css +1 -1
- package/dist/components/dimmer.js +1 -1
- package/dist/components/dimmer.min.css +1 -1
- package/dist/components/dimmer.min.js +1 -1
- package/dist/components/divider.css +1 -1
- package/dist/components/divider.min.css +1 -1
- package/dist/components/dropdown.css +1 -1
- package/dist/components/dropdown.js +1 -1
- package/dist/components/dropdown.min.css +1 -1
- package/dist/components/dropdown.min.js +1 -1
- package/dist/components/embed.css +1 -1
- package/dist/components/embed.js +1 -1
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +1 -1
- package/dist/components/emoji.css +1 -1
- package/dist/components/emoji.min.css +1 -1
- package/dist/components/feed.css +1 -1
- package/dist/components/feed.min.css +1 -1
- package/dist/components/flag.css +1 -1
- package/dist/components/flag.min.css +1 -1
- package/dist/components/flyout.css +1 -1
- package/dist/components/flyout.js +1 -1
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +1 -1
- package/dist/components/form.css +1 -1
- package/dist/components/form.js +1 -1
- package/dist/components/form.min.css +1 -1
- package/dist/components/form.min.js +1 -1
- package/dist/components/grid.css +1 -1
- package/dist/components/grid.min.css +1 -1
- package/dist/components/header.css +1 -1
- package/dist/components/header.min.css +1 -1
- package/dist/components/icon.css +1 -1
- package/dist/components/icon.min.css +1 -1
- package/dist/components/image.css +1 -1
- package/dist/components/image.min.css +1 -1
- package/dist/components/input.css +1 -1
- package/dist/components/input.min.css +1 -1
- package/dist/components/item.css +1 -1
- package/dist/components/item.min.css +1 -1
- package/dist/components/label.css +1 -1
- package/dist/components/label.min.css +1 -1
- package/dist/components/list.css +1 -1
- package/dist/components/list.min.css +1 -1
- package/dist/components/loader.css +1 -1
- package/dist/components/loader.min.css +1 -1
- package/dist/components/menu.css +1 -1
- package/dist/components/menu.min.css +1 -1
- package/dist/components/message.css +1 -1
- package/dist/components/message.min.css +1 -1
- package/dist/components/modal.css +1 -1
- package/dist/components/modal.js +1 -1
- package/dist/components/modal.min.css +1 -1
- package/dist/components/modal.min.js +1 -1
- package/dist/components/nag.css +1 -1
- package/dist/components/nag.js +1 -1
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +1 -1
- package/dist/components/placeholder.css +1 -1
- package/dist/components/placeholder.min.css +1 -1
- package/dist/components/popup.css +1 -1
- package/dist/components/popup.js +1 -1
- package/dist/components/popup.min.css +1 -1
- package/dist/components/popup.min.js +1 -1
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +1 -1
- package/dist/components/progress.min.css +1 -1
- package/dist/components/progress.min.js +1 -1
- package/dist/components/rail.css +1 -1
- package/dist/components/rail.min.css +1 -1
- package/dist/components/rating.css +1 -1
- package/dist/components/rating.js +1 -1
- package/dist/components/rating.min.css +1 -1
- package/dist/components/rating.min.js +1 -1
- package/dist/components/reset.css +1 -1
- package/dist/components/reset.min.css +1 -1
- package/dist/components/reveal.css +1 -1
- package/dist/components/reveal.min.css +1 -1
- package/dist/components/search.css +1 -1
- package/dist/components/search.js +1 -1
- package/dist/components/search.min.css +1 -1
- package/dist/components/search.min.js +1 -1
- package/dist/components/segment.css +1 -1
- package/dist/components/segment.min.css +1 -1
- package/dist/components/shape.css +1 -1
- package/dist/components/shape.js +1 -1
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +1 -1
- package/dist/components/sidebar.css +1 -1
- package/dist/components/sidebar.js +1 -1
- package/dist/components/sidebar.min.css +1 -1
- package/dist/components/sidebar.min.js +1 -1
- package/dist/components/site.css +1 -1
- package/dist/components/site.js +1 -1
- package/dist/components/site.min.css +1 -1
- package/dist/components/site.min.js +1 -1
- package/dist/components/slider.css +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/slider.min.css +1 -1
- package/dist/components/slider.min.js +1 -1
- package/dist/components/state.js +1 -1
- package/dist/components/state.min.js +1 -1
- package/dist/components/statistic.css +1 -1
- package/dist/components/statistic.min.css +1 -1
- package/dist/components/step.css +1 -1
- package/dist/components/step.min.css +1 -1
- package/dist/components/sticky.css +1 -1
- package/dist/components/sticky.js +1 -1
- package/dist/components/sticky.min.css +1 -1
- package/dist/components/sticky.min.js +1 -1
- package/dist/components/tab.css +1 -1
- package/dist/components/tab.js +1 -1
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +1 -1
- package/dist/components/table.css +1 -1
- package/dist/components/table.min.css +1 -1
- package/dist/components/text.css +1 -1
- package/dist/components/text.min.css +1 -1
- package/dist/components/toast.css +1 -1
- package/dist/components/toast.js +1 -1
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +1 -1
- package/dist/components/transition.css +1 -1
- package/dist/components/transition.js +1 -1
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +1 -1
- package/dist/components/visibility.js +1 -1
- package/dist/components/visibility.min.js +1 -1
- package/dist/semantic.css +53 -53
- package/dist/semantic.js +26 -26
- package/dist/semantic.min.css +1 -1
- package/dist/semantic.min.js +1 -1
- package/package.json +1 -1
- package/types/fomantic-ui-accordion.d.ts +166 -172
- package/types/fomantic-ui-api.d.ts +418 -470
- package/types/fomantic-ui-calendar.d.ts +425 -479
- package/types/fomantic-ui-checkbox.d.ts +148 -194
- package/types/fomantic-ui-dimmer.d.ts +188 -265
- package/types/fomantic-ui-dropdown.d.ts +447 -666
- package/types/fomantic-ui-embed.d.ts +243 -289
- package/types/fomantic-ui-flyout.d.ts +259 -292
- package/types/fomantic-ui-form.d.ts +478 -607
- package/types/fomantic-ui-modal.d.ts +389 -471
- package/types/fomantic-ui-nag.d.ts +228 -277
- package/types/fomantic-ui-popup.d.ts +438 -534
- package/types/fomantic-ui-progress.d.ts +278 -352
- package/types/fomantic-ui-rating.d.ts +137 -168
- package/types/fomantic-ui-search.d.ts +359 -453
- package/types/fomantic-ui-shape.d.ts +152 -194
- package/types/fomantic-ui-sidebar.d.ts +315 -391
- package/types/fomantic-ui-slider.d.ts +259 -322
- package/types/fomantic-ui-sticky.d.ts +198 -244
- package/types/fomantic-ui-tab.d.ts +284 -350
- package/types/fomantic-ui-tests.ts +4 -2
- package/types/fomantic-ui-toast.d.ts +318 -424
- package/types/fomantic-ui-transition.d.ts +223 -273
- package/types/fomantic-ui-visibility.d.ts +286 -353
- package/types/index.d.ts +0 -1
@@ -63,490 +63,408 @@ declare namespace FomanticUI {
|
|
63
63
|
(behavior: 'set active'): JQuery;
|
64
64
|
|
65
65
|
(behavior: 'destroy'): JQuery;
|
66
|
-
<K extends keyof ModalSettings>(behavior: 'setting', name: K, value?: undefined): ModalSettings
|
67
|
-
<K extends keyof ModalSettings>(behavior: 'setting', name: K, value: ModalSettings
|
68
|
-
(behavior: 'setting', value: ModalSettings): JQuery;
|
69
|
-
(settings?: ModalSettings): JQuery;
|
66
|
+
<K extends keyof ModalSettings>(behavior: 'setting', name: K, value?: undefined, ): Partial<Pick<ModalSettings, keyof ModalSettings>>;
|
67
|
+
<K extends keyof ModalSettings>(behavior: 'setting', name: K, value: ModalSettings[K]): JQuery;
|
68
|
+
(behavior: 'setting', value: Partial<Pick<ModalSettings, keyof ModalSettings>>): JQuery;
|
69
|
+
(settings?: Partial<Pick<ModalSettings, keyof ModalSettings>>): JQuery;
|
70
70
|
}
|
71
71
|
|
72
72
|
/**
|
73
73
|
* @see {@link https://fomantic-ui.com/modules/modal.html#/settings}
|
74
74
|
*/
|
75
|
-
|
76
|
-
|
77
|
-
namespace ModalSettings {
|
78
|
-
type Param = (
|
79
|
-
| Pick<_Impl, 'detachable'>
|
80
|
-
| Pick<_Impl, 'useFlex'>
|
81
|
-
| Pick<_Impl, 'autofocus'>
|
82
|
-
| Pick<_Impl, 'restoreFocus'>
|
83
|
-
| Pick<_Impl, 'autoShow'>
|
84
|
-
| Pick<_Impl, 'observeChanges'>
|
85
|
-
| Pick<_Impl, 'allowMultiple'>
|
86
|
-
| Pick<_Impl, 'inverted'>
|
87
|
-
| Pick<_Impl, 'blurring'>
|
88
|
-
| Pick<_Impl, 'centered'>
|
89
|
-
| Pick<_Impl, 'keyboardShortcuts'>
|
90
|
-
| Pick<_Impl, 'offset'>
|
91
|
-
| Pick<_Impl, 'context'>
|
92
|
-
| Pick<_Impl, 'closable'>
|
93
|
-
| Pick<_Impl, 'dimmerSettings'>
|
94
|
-
| Pick<_Impl, 'transition'>
|
95
|
-
| Pick<_Impl, 'duration'>
|
96
|
-
| Pick<_Impl, 'queue'>
|
97
|
-
| Pick<_Impl, 'scrollbarWidth'>
|
98
|
-
| Pick<_Impl, 'onShow'>
|
99
|
-
| Pick<_Impl, 'onVisible'>
|
100
|
-
| Pick<_Impl, 'onHide'>
|
101
|
-
| Pick<_Impl, 'onHidden'>
|
102
|
-
| Pick<_Impl, 'onApprove'>
|
103
|
-
| Pick<_Impl, 'onDeny'>
|
104
|
-
| Pick<_Impl, 'selector'>
|
105
|
-
| Pick<_Impl, 'className'>
|
106
|
-
| Pick<_Impl, 'name'>
|
107
|
-
| Pick<_Impl, 'namespace'>
|
108
|
-
| Pick<_Impl, 'silent'>
|
109
|
-
| Pick<_Impl, 'debug'>
|
110
|
-
| Pick<_Impl, 'performance'>
|
111
|
-
| Pick<_Impl, 'verbose'>
|
112
|
-
| Pick<_Impl, 'error'>
|
113
|
-
) &
|
114
|
-
Partial<Pick<_Impl, keyof _Impl>>;
|
115
|
-
|
116
|
-
interface _Impl {
|
117
|
-
// region Accordion Settings
|
118
|
-
|
119
|
-
/**
|
120
|
-
* If set to 'false' will prevent the modal from being moved to inside the dimmer.
|
121
|
-
* @default true
|
122
|
-
*/
|
123
|
-
detachable: boolean;
|
124
|
-
|
125
|
-
/**
|
126
|
-
* Auto will automatically use flex in browsers that support absolutely positioned elements inside flex containers.
|
127
|
-
* Setting to 'true'/'false' will force this setting for all browsers.
|
128
|
-
* @default 'auto'
|
129
|
-
*/
|
130
|
-
useFlex: 'auto' | boolean;
|
131
|
-
|
132
|
-
/**
|
133
|
-
* When 'true', the first form input inside the modal will receive focus when shown.
|
134
|
-
* Set this to 'false' to prevent this behavior.
|
135
|
-
* @default true
|
136
|
-
*/
|
137
|
-
autofocus: boolean;
|
138
|
-
|
139
|
-
/**
|
140
|
-
* When 'false', the last focused element, before the modal was shown, will not get refocused again when the modal hides.
|
141
|
-
* This could prevent unwanted scrolling behaviors after closing a modal.
|
142
|
-
* @default true
|
143
|
-
*/
|
144
|
-
restoreFocus: boolean;
|
145
|
-
|
146
|
-
/**
|
147
|
-
* When 'true', immediately shows the modal at instantiation time.
|
148
|
-
* @default false
|
149
|
-
*/
|
150
|
-
autoShow: boolean;
|
151
|
-
|
152
|
-
/**
|
153
|
-
* Whether any change in modal DOM should automatically refresh cached positions.
|
154
|
-
* @default false
|
155
|
-
*/
|
156
|
-
observeChanges: boolean;
|
157
|
-
|
158
|
-
/**
|
159
|
-
* If set to 'true' will not close other visible modals when opening a new one.
|
160
|
-
* @default false
|
161
|
-
*/
|
162
|
-
allowMultiple: boolean;
|
163
|
-
|
164
|
-
/**
|
165
|
-
* If inverted dimmer should be used.
|
166
|
-
* @default false
|
167
|
-
*/
|
168
|
-
inverted: boolean;
|
169
|
-
|
170
|
-
/**
|
171
|
-
* If dimmer should blur background.
|
172
|
-
* @default false
|
173
|
-
*/
|
174
|
-
blurring: boolean;
|
175
|
-
|
176
|
-
/**
|
177
|
-
* If modal should be center aligned.
|
178
|
-
* @default true
|
179
|
-
*/
|
180
|
-
centered: boolean;
|
181
|
-
|
182
|
-
/**
|
183
|
-
* Whether to automatically bind keyboard shortcuts.
|
184
|
-
* This will close the modal when the 'ESC-Key' is pressed.
|
185
|
-
* @default true
|
186
|
-
*/
|
187
|
-
keyboardShortcuts: boolean;
|
188
|
-
|
189
|
-
/**
|
190
|
-
* A vertical offset to allow for content outside of modal, for example a close button, to be centered.
|
191
|
-
* @default 0
|
192
|
-
*/
|
193
|
-
offset: number;
|
194
|
-
|
195
|
-
/**
|
196
|
-
* Selector or jquery object specifying the area to dim.
|
197
|
-
* @default 'body'
|
198
|
-
*/
|
199
|
-
context: string | JQuery;
|
200
|
-
|
201
|
-
/**
|
202
|
-
* Setting to 'false' will not allow you to close the modal by clicking on the dimmer.
|
203
|
-
* @default true
|
204
|
-
*/
|
205
|
-
closable: boolean;
|
206
|
-
|
207
|
-
/**
|
208
|
-
* Custom settings to extend UI dimmer.
|
209
|
-
*/
|
210
|
-
dimmerSettings: DimmerSettings;
|
211
|
-
|
212
|
-
/**
|
213
|
-
* Custom settings to extend UI dimmer.
|
214
|
-
* @default 'scale'
|
215
|
-
*/
|
216
|
-
transition: string | TransitionSettings;
|
217
|
-
|
218
|
-
/**
|
219
|
-
* Duration of animation.
|
220
|
-
* The value will be ignored when individual hide/show duration values are provided via the 'transition' setting.
|
221
|
-
* @default 400
|
222
|
-
*/
|
223
|
-
duration: number;
|
224
|
-
|
225
|
-
/**
|
226
|
-
* Whether additional animations should queue.
|
227
|
-
* @default false
|
228
|
-
*/
|
229
|
-
queue: boolean;
|
230
|
-
|
231
|
-
/**
|
232
|
-
* Used internally to determine if the webkit custom scrollbar was clicked to prevent hiding the dimmer.
|
233
|
-
* This should be set to the same (numeric) value as defined for '@customScrollbarWidth' in 'site.less' in case you are using a different theme.
|
234
|
-
* @default 10
|
235
|
-
*/
|
236
|
-
scrollbarWidth: number;
|
237
|
-
|
238
|
-
// endregion
|
239
|
-
|
240
|
-
// region Callbacks
|
241
|
-
|
242
|
-
/**
|
243
|
-
* Is called when a modal starts to show.
|
244
|
-
* If the function returns 'false', the modal will not be shown.
|
245
|
-
*/
|
246
|
-
onShow(this: JQuery): void;
|
247
|
-
|
248
|
-
/**
|
249
|
-
* Is called after a modal has finished showing animating.
|
250
|
-
*/
|
251
|
-
onVisible(this: JQuery): void;
|
252
|
-
|
253
|
-
/**
|
254
|
-
* Is called after a modal starts to hide.
|
255
|
-
* If the function returns 'false', the modal will not hide.
|
256
|
-
*/
|
257
|
-
onHide(this: JQuery, $element: JQuery): void;
|
258
|
-
|
259
|
-
/**
|
260
|
-
* Is called after a modal has finished hiding animation.
|
261
|
-
*/
|
262
|
-
onHidden(this: JQuery): void;
|
263
|
-
|
264
|
-
/**
|
265
|
-
* Is called after a positive, approve or ok button is pressed.
|
266
|
-
* If the function returns 'false', the modal will not hide.
|
267
|
-
*/
|
268
|
-
onApprove(this: JQuery, $element: JQuery): void;
|
269
|
-
|
270
|
-
/**
|
271
|
-
* Is called after a negative, deny or cancel button is pressed. If the function returns 'false' the modal will not hide.
|
272
|
-
*/
|
273
|
-
onDeny(this: JQuery, $element: JQuery): void;
|
274
|
-
|
275
|
-
// endregion
|
276
|
-
|
277
|
-
// region DOM Settings
|
278
|
-
|
279
|
-
/**
|
280
|
-
* DOM Selectors used internally.
|
281
|
-
* Selectors used to find parts of a module.
|
282
|
-
*/
|
283
|
-
selector: Modal.SelectorSettings;
|
284
|
-
|
285
|
-
/**
|
286
|
-
* Class names used to determine element state.
|
287
|
-
*/
|
288
|
-
className: Modal.ClassNameSettings;
|
289
|
-
|
290
|
-
// endregion
|
291
|
-
|
292
|
-
// region Config Template Settings
|
293
|
-
|
294
|
-
// endregion
|
295
|
-
|
296
|
-
// region Debug Settings
|
297
|
-
|
298
|
-
/**
|
299
|
-
* Name used in log statements
|
300
|
-
*/
|
301
|
-
name: string;
|
302
|
-
|
303
|
-
/**
|
304
|
-
* Event namespace. Makes sure module teardown does not effect other events attached to an element.
|
305
|
-
*/
|
306
|
-
namespace: string;
|
307
|
-
|
308
|
-
/**
|
309
|
-
* Silences all console output including error messages, regardless of other debug settings.
|
310
|
-
*/
|
311
|
-
silent: boolean;
|
312
|
-
|
313
|
-
/**
|
314
|
-
* Debug output to console
|
315
|
-
*/
|
316
|
-
debug: boolean;
|
317
|
-
|
318
|
-
/**
|
319
|
-
* Show console.table output with performance metrics
|
320
|
-
*/
|
321
|
-
performance: boolean;
|
322
|
-
|
323
|
-
/**
|
324
|
-
* Debug output includes all internal behaviors
|
325
|
-
*/
|
326
|
-
verbose: boolean;
|
327
|
-
|
328
|
-
error: Modal.ErrorSettings;
|
75
|
+
interface ModalSettings {
|
76
|
+
// region Accordion Settings
|
329
77
|
|
330
|
-
|
331
|
-
|
78
|
+
/**
|
79
|
+
* If set to 'false' will prevent the modal from being moved to inside the dimmer.
|
80
|
+
* @default true
|
81
|
+
*/
|
82
|
+
detachable: boolean;
|
332
83
|
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
| Pick<_Impl, 'content'>
|
340
|
-
| Pick<_Impl, 'actions'>
|
341
|
-
| Pick<_Impl, 'close'>
|
342
|
-
| Pick<_Impl, 'approve'>
|
343
|
-
| Pick<_Impl, 'deny'>
|
344
|
-
| Pick<_Impl, 'dimmer'>
|
345
|
-
| Pick<_Impl, 'bodyFixed'>
|
346
|
-
| Pick<_Impl, 'prompt'>
|
347
|
-
) &
|
348
|
-
Partial<Pick<_Impl, keyof _Impl>>;
|
349
|
-
|
350
|
-
interface _Impl {
|
351
|
-
/**
|
352
|
-
* @default '> .header'
|
353
|
-
*/
|
354
|
-
title: string;
|
355
|
-
|
356
|
-
/**
|
357
|
-
* @default '> .content'
|
358
|
-
*/
|
359
|
-
content: string;
|
360
|
-
|
361
|
-
/**
|
362
|
-
* @default '> .actions'
|
363
|
-
*/
|
364
|
-
actions: string;
|
365
|
-
|
366
|
-
/**
|
367
|
-
* @default '> .close'
|
368
|
-
*/
|
369
|
-
close: string;
|
370
|
-
|
371
|
-
/**
|
372
|
-
* @default '.actions .positive, .actions .approve, .actions .ok'
|
373
|
-
*/
|
374
|
-
approve: string;
|
375
|
-
|
376
|
-
/**
|
377
|
-
* @default '.actions .negative, .actions .deny, .actions .cancel'
|
378
|
-
*/
|
379
|
-
deny: string;
|
380
|
-
|
381
|
-
/**
|
382
|
-
* @default '> .ui.dimmer'
|
383
|
-
*/
|
384
|
-
dimmer: string;
|
385
|
-
|
386
|
-
/**
|
387
|
-
* @default '> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.fixed.nag, > .ui.fixed.nag > .close'
|
388
|
-
*/
|
389
|
-
bodyFixed: string;
|
390
|
-
|
391
|
-
/**
|
392
|
-
* @default '.ui.input > input'
|
393
|
-
*/
|
394
|
-
prompt: string;
|
395
|
-
}
|
396
|
-
}
|
84
|
+
/**
|
85
|
+
* Auto will automatically use flex in browsers that support absolutely positioned elements inside flex containers.
|
86
|
+
* Setting to 'true'/'false' will force this setting for all browsers.
|
87
|
+
* @default 'auto'
|
88
|
+
*/
|
89
|
+
useFlex: 'auto' | boolean;
|
397
90
|
|
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
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
91
|
+
/**
|
92
|
+
* When 'true', the first form input inside the modal will receive focus when shown.
|
93
|
+
* Set this to 'false' to prevent this behavior.
|
94
|
+
* @default true
|
95
|
+
*/
|
96
|
+
autofocus: boolean;
|
97
|
+
|
98
|
+
/**
|
99
|
+
* When 'false', the last focused element, before the modal was shown, will not get refocused again when the modal hides.
|
100
|
+
* This could prevent unwanted scrolling behaviors after closing a modal.
|
101
|
+
* @default true
|
102
|
+
*/
|
103
|
+
restoreFocus: boolean;
|
104
|
+
|
105
|
+
/**
|
106
|
+
* When 'true', immediately shows the modal at instantiation time.
|
107
|
+
* @default false
|
108
|
+
*/
|
109
|
+
autoShow: boolean;
|
110
|
+
|
111
|
+
/**
|
112
|
+
* Whether any change in modal DOM should automatically refresh cached positions.
|
113
|
+
* @default false
|
114
|
+
*/
|
115
|
+
observeChanges: boolean;
|
116
|
+
|
117
|
+
/**
|
118
|
+
* If set to 'true' will not close other visible modals when opening a new one.
|
119
|
+
* @default false
|
120
|
+
*/
|
121
|
+
allowMultiple: boolean;
|
122
|
+
|
123
|
+
/**
|
124
|
+
* If inverted dimmer should be used.
|
125
|
+
* @default false
|
126
|
+
*/
|
127
|
+
inverted: boolean;
|
128
|
+
|
129
|
+
/**
|
130
|
+
* If dimmer should blur background.
|
131
|
+
* @default false
|
132
|
+
*/
|
133
|
+
blurring: boolean;
|
134
|
+
|
135
|
+
/**
|
136
|
+
* If modal should be center aligned.
|
137
|
+
* @default true
|
138
|
+
*/
|
139
|
+
centered: boolean;
|
140
|
+
|
141
|
+
/**
|
142
|
+
* Whether to automatically bind keyboard shortcuts.
|
143
|
+
* This will close the modal when the 'ESC-Key' is pressed.
|
144
|
+
* @default true
|
145
|
+
*/
|
146
|
+
keyboardShortcuts: boolean;
|
147
|
+
|
148
|
+
/**
|
149
|
+
* A vertical offset to allow for content outside of modal, for example a close button, to be centered.
|
150
|
+
* @default 0
|
151
|
+
*/
|
152
|
+
offset: number;
|
153
|
+
|
154
|
+
/**
|
155
|
+
* Selector or jquery object specifying the area to dim.
|
156
|
+
* @default 'body'
|
157
|
+
*/
|
158
|
+
context: string | JQuery;
|
159
|
+
|
160
|
+
/**
|
161
|
+
* Setting to 'false' will not allow you to close the modal by clicking on the dimmer.
|
162
|
+
* @default true
|
163
|
+
*/
|
164
|
+
closable: boolean;
|
165
|
+
|
166
|
+
/**
|
167
|
+
* Custom settings to extend UI dimmer.
|
168
|
+
*/
|
169
|
+
dimmerSettings: DimmerSettings;
|
170
|
+
|
171
|
+
/**
|
172
|
+
* Custom settings to extend UI dimmer.
|
173
|
+
* @default 'scale'
|
174
|
+
*/
|
175
|
+
transition: string | TransitionSettings;
|
176
|
+
|
177
|
+
/**
|
178
|
+
* Duration of animation.
|
179
|
+
* The value will be ignored when individual hide/show duration values are provided via the 'transition' setting.
|
180
|
+
* @default 400
|
181
|
+
*/
|
182
|
+
duration: number;
|
183
|
+
|
184
|
+
/**
|
185
|
+
* Whether additional animations should queue.
|
186
|
+
* @default false
|
187
|
+
*/
|
188
|
+
queue: boolean;
|
189
|
+
|
190
|
+
/**
|
191
|
+
* Used internally to determine if the webkit custom scrollbar was clicked to prevent hiding the dimmer.
|
192
|
+
* This should be set to the same (numeric) value as defined for '@customScrollbarWidth' in 'site.less' in case you are using a different theme.
|
193
|
+
* @default 10
|
194
|
+
*/
|
195
|
+
scrollbarWidth: number;
|
196
|
+
|
197
|
+
// endregion
|
198
|
+
|
199
|
+
// region Callbacks
|
200
|
+
|
201
|
+
/**
|
202
|
+
* Is called when a modal starts to show.
|
203
|
+
* If the function returns 'false', the modal will not be shown.
|
204
|
+
*/
|
205
|
+
onShow(this: JQuery): void;
|
206
|
+
|
207
|
+
/**
|
208
|
+
* Is called after a modal has finished showing animating.
|
209
|
+
*/
|
210
|
+
onVisible(this: JQuery): void;
|
211
|
+
|
212
|
+
/**
|
213
|
+
* Is called after a modal starts to hide.
|
214
|
+
* If the function returns 'false', the modal will not hide.
|
215
|
+
*/
|
216
|
+
onHide(this: JQuery, $element: JQuery): void;
|
217
|
+
|
218
|
+
/**
|
219
|
+
* Is called after a modal has finished hiding animation.
|
220
|
+
*/
|
221
|
+
onHidden(this: JQuery): void;
|
222
|
+
|
223
|
+
/**
|
224
|
+
* Is called after a positive, approve or ok button is pressed.
|
225
|
+
* If the function returns 'false', the modal will not hide.
|
226
|
+
*/
|
227
|
+
onApprove(this: JQuery, $element: JQuery): void;
|
228
|
+
|
229
|
+
/**
|
230
|
+
* Is called after a negative, deny or cancel button is pressed. If the function returns 'false' the modal will not hide.
|
231
|
+
*/
|
232
|
+
onDeny(this: JQuery, $element: JQuery): void;
|
233
|
+
|
234
|
+
// endregion
|
527
235
|
|
528
|
-
|
236
|
+
// region DOM Settings
|
529
237
|
|
530
|
-
|
531
|
-
|
532
|
-
|
238
|
+
/**
|
239
|
+
* DOM Selectors used internally.
|
240
|
+
* Selectors used to find parts of a module.
|
241
|
+
*/
|
242
|
+
selector: Modal.SelectorSettings;
|
243
|
+
|
244
|
+
/**
|
245
|
+
* Class names used to determine element state.
|
246
|
+
*/
|
247
|
+
className: Modal.ClassNameSettings;
|
533
248
|
|
534
|
-
|
535
|
-
/**
|
536
|
-
* @default 'UI Dimmer, a required component is not included in this page'
|
537
|
-
*/
|
538
|
-
dimmer: string;
|
249
|
+
// endregion
|
539
250
|
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
251
|
+
// region Config Template Settings
|
252
|
+
|
253
|
+
// endregion
|
254
|
+
|
255
|
+
// region Debug Settings
|
256
|
+
|
257
|
+
/**
|
258
|
+
* Name used in log statements
|
259
|
+
* @default 'Modal'
|
260
|
+
*/
|
261
|
+
name: string;
|
262
|
+
|
263
|
+
/**
|
264
|
+
* Event namespace. Makes sure module teardown does not effect other events attached to an element.
|
265
|
+
* @default 'modal'
|
266
|
+
*/
|
267
|
+
namespace: string;
|
268
|
+
|
269
|
+
/**
|
270
|
+
* Silences all console output including error messages, regardless of other debug settings.
|
271
|
+
* @default false
|
272
|
+
*/
|
273
|
+
silent: boolean;
|
274
|
+
|
275
|
+
/**
|
276
|
+
* Debug output to console
|
277
|
+
* @default false
|
278
|
+
*/
|
279
|
+
debug: boolean;
|
280
|
+
|
281
|
+
/**
|
282
|
+
* Show console.table output with performance metrics
|
283
|
+
* @default true
|
284
|
+
*/
|
285
|
+
performance: boolean;
|
286
|
+
|
287
|
+
/**
|
288
|
+
* Debug output includes all internal behaviors
|
289
|
+
* @default false
|
290
|
+
*/
|
291
|
+
verbose: boolean;
|
292
|
+
|
293
|
+
error: Modal.ErrorSettings;
|
294
|
+
|
295
|
+
// endregion
|
296
|
+
}
|
297
|
+
|
298
|
+
namespace Modal {
|
299
|
+
type SelectorSettings = Partial<Pick<Settings.Selectors, keyof Settings.Selectors>>;
|
300
|
+
type ClassNameSettings = Partial<Pick<Settings.ClassNames, keyof Settings.ClassNames>>;
|
301
|
+
type ErrorSettings = Partial<Pick<Settings.Errors, keyof Settings.Errors>>;
|
302
|
+
|
303
|
+
namespace Settings {
|
304
|
+
interface Selectors {
|
305
|
+
/**
|
306
|
+
* @default '> .header'
|
307
|
+
*/
|
308
|
+
title: string;
|
309
|
+
|
310
|
+
/**
|
311
|
+
* @default '> .content'
|
312
|
+
*/
|
313
|
+
content: string;
|
314
|
+
|
315
|
+
/**
|
316
|
+
* @default '> .actions'
|
317
|
+
*/
|
318
|
+
actions: string;
|
319
|
+
|
320
|
+
/**
|
321
|
+
* @default '> .close'
|
322
|
+
*/
|
323
|
+
close: string;
|
324
|
+
|
325
|
+
/**
|
326
|
+
* @default '.actions .positive, .actions .approve, .actions .ok'
|
327
|
+
*/
|
328
|
+
approve: string;
|
329
|
+
|
330
|
+
/**
|
331
|
+
* @default '.actions .negative, .actions .deny, .actions .cancel'
|
332
|
+
*/
|
333
|
+
deny: string;
|
334
|
+
|
335
|
+
/**
|
336
|
+
* @default '> .ui.dimmer'
|
337
|
+
*/
|
338
|
+
dimmer: string;
|
339
|
+
|
340
|
+
/**
|
341
|
+
* @default '> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.fixed.nag, > .ui.fixed.nag > .close'
|
342
|
+
*/
|
343
|
+
bodyFixed: string;
|
344
|
+
|
345
|
+
/**
|
346
|
+
* @default '.ui.input > input'
|
347
|
+
*/
|
348
|
+
prompt: string;
|
349
|
+
}
|
350
|
+
|
351
|
+
interface ClassNames {
|
352
|
+
/**
|
353
|
+
* @default 'active'
|
354
|
+
*/
|
355
|
+
active: string;
|
356
|
+
|
357
|
+
/**
|
358
|
+
* @default 'animating'
|
359
|
+
*/
|
360
|
+
animating: string;
|
361
|
+
|
362
|
+
/**
|
363
|
+
* @default 'blurring'
|
364
|
+
*/
|
365
|
+
blurring: string;
|
366
|
+
|
367
|
+
/**
|
368
|
+
* @default 'inverted'
|
369
|
+
*/
|
370
|
+
inverted: string;
|
371
|
+
|
372
|
+
/**
|
373
|
+
* @default 'legacy'
|
374
|
+
*/
|
375
|
+
legacy: string;
|
376
|
+
|
377
|
+
/**
|
378
|
+
* @default 'loading'
|
379
|
+
*/
|
380
|
+
loading: string;
|
381
|
+
|
382
|
+
/**
|
383
|
+
* @default 'scrolling'
|
384
|
+
*/
|
385
|
+
scrolling: string;
|
386
|
+
|
387
|
+
/**
|
388
|
+
* @default 'undetached'
|
389
|
+
*/
|
390
|
+
undetached: string;
|
391
|
+
|
392
|
+
/**
|
393
|
+
* @default 'front'
|
394
|
+
*/
|
395
|
+
front: string;
|
396
|
+
|
397
|
+
/**
|
398
|
+
* @default 'close icon'
|
399
|
+
*/
|
400
|
+
close: string;
|
401
|
+
|
402
|
+
/**
|
403
|
+
* @default 'ui button'
|
404
|
+
*/
|
405
|
+
button: string;
|
406
|
+
|
407
|
+
/**
|
408
|
+
* @default 'ui modal'
|
409
|
+
*/
|
410
|
+
modal: string;
|
411
|
+
|
412
|
+
/**
|
413
|
+
* @default 'header'
|
414
|
+
*/
|
415
|
+
title: string;
|
416
|
+
|
417
|
+
/**
|
418
|
+
* @default 'content'
|
419
|
+
*/
|
420
|
+
content: string;
|
421
|
+
|
422
|
+
/**
|
423
|
+
* @default 'actions'
|
424
|
+
*/
|
425
|
+
actions: string;
|
426
|
+
|
427
|
+
/**
|
428
|
+
* @default 'ui tiny modal'
|
429
|
+
*/
|
430
|
+
template: string;
|
431
|
+
|
432
|
+
/**
|
433
|
+
* @default 'positive'
|
434
|
+
*/
|
435
|
+
ok: string;
|
436
|
+
|
437
|
+
/**
|
438
|
+
* @default 'negative'
|
439
|
+
*/
|
440
|
+
cancel: string;
|
441
|
+
|
442
|
+
/**
|
443
|
+
* @default 'ui fluid input'
|
444
|
+
*/
|
445
|
+
prompt: string;
|
446
|
+
|
447
|
+
/**
|
448
|
+
* @default 'ui inverted dimmer'
|
449
|
+
*/
|
450
|
+
innerDimmer: string;
|
451
|
+
}
|
544
452
|
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
453
|
+
interface Errors {
|
454
|
+
/**
|
455
|
+
* @default 'UI Dimmer, a required component is not included in this page'
|
456
|
+
*/
|
457
|
+
dimmer: string;
|
458
|
+
|
459
|
+
/**
|
460
|
+
* @default 'The method you called is not defined.'
|
461
|
+
*/
|
462
|
+
method: string;
|
463
|
+
|
464
|
+
/**
|
465
|
+
* @default 'The element you specified could not be found'
|
466
|
+
*/
|
467
|
+
notFound: string;
|
550
468
|
}
|
551
469
|
}
|
552
470
|
}
|