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
@@ -48,379 +48,313 @@ declare namespace FomanticUI {
|
|
48
48
|
*/
|
49
49
|
(behavior: 'destroy'): JQuery;
|
50
50
|
|
51
|
-
<K extends keyof TabSettings>(behavior: 'setting', name: K, value?: undefined): TabSettings
|
52
|
-
<K extends keyof TabSettings>(behavior: 'setting', name: K, value: TabSettings
|
53
|
-
(behavior: 'setting', value: TabSettings): JQuery;
|
54
|
-
(settings?: TabSettings): JQuery;
|
51
|
+
<K extends keyof TabSettings>(behavior: 'setting', name: K, value?: undefined, ): Partial<Pick<TabSettings, keyof TabSettings>>;
|
52
|
+
<K extends keyof TabSettings>(behavior: 'setting', name: K, value: TabSettings[K]): JQuery;
|
53
|
+
(behavior: 'setting', value: Partial<Pick<TabSettings, keyof TabSettings>>): JQuery;
|
54
|
+
(settings?: Partial<Pick<TabSettings, keyof TabSettings>>): JQuery;
|
55
55
|
}
|
56
56
|
|
57
57
|
/**
|
58
58
|
* @see {@link https://fomantic-ui.com/modules/tab.html#/settings}
|
59
59
|
*/
|
60
|
-
|
61
|
-
|
62
|
-
namespace TabSettings {
|
63
|
-
type Param = (
|
64
|
-
| Pick<_Impl, 'auto'>
|
65
|
-
| Pick<_Impl, 'deactivate'>
|
66
|
-
| Pick<_Impl, 'history'>
|
67
|
-
| Pick<_Impl, 'ignoreFirstLoad'>
|
68
|
-
| Pick<_Impl, 'evaluateScripts'>
|
69
|
-
| Pick<_Impl, 'autoTabActivation'>
|
70
|
-
| Pick<_Impl, 'alwaysRefresh'>
|
71
|
-
| Pick<_Impl, 'deactivate'>
|
72
|
-
| Pick<_Impl, 'cacheType'>
|
73
|
-
| Pick<_Impl, 'cache'>
|
74
|
-
| Pick<_Impl, 'apiSettings'>
|
75
|
-
| Pick<_Impl, 'historyType'>
|
76
|
-
| Pick<_Impl, 'path'>
|
77
|
-
| Pick<_Impl, 'context'>
|
78
|
-
| Pick<_Impl, 'childrenOnly'>
|
79
|
-
| Pick<_Impl, 'maxDepth'>
|
80
|
-
| Pick<_Impl, 'onFirstLoad'>
|
81
|
-
| Pick<_Impl, 'onLoad'>
|
82
|
-
| Pick<_Impl, 'onRequest'>
|
83
|
-
| Pick<_Impl, 'onVisible'>
|
84
|
-
| Pick<_Impl, 'onBeforeChange'>
|
85
|
-
| Pick<_Impl, 'templates'>
|
86
|
-
| Pick<_Impl, 'selector'>
|
87
|
-
| Pick<_Impl, 'metadata'>
|
88
|
-
| Pick<_Impl, 'className'>
|
89
|
-
| Pick<_Impl, 'name'>
|
90
|
-
| Pick<_Impl, 'namespace'>
|
91
|
-
| Pick<_Impl, 'silent'>
|
92
|
-
| Pick<_Impl, 'debug'>
|
93
|
-
| Pick<_Impl, 'performance'>
|
94
|
-
| Pick<_Impl, 'verbose'>
|
95
|
-
| Pick<_Impl, 'error'>
|
96
|
-
) &
|
97
|
-
Partial<Pick<_Impl, keyof _Impl>>;
|
98
|
-
|
99
|
-
interface _Impl {
|
100
|
-
// region Tab Settings
|
101
|
-
|
102
|
-
/**
|
103
|
-
* Whether tab should load remote content as same url as history.
|
104
|
-
* @default false
|
105
|
-
*/
|
106
|
-
auto: boolean;
|
107
|
-
|
108
|
-
/**
|
109
|
-
* When set to 'siblings' will only deactivate elements that are DOM siblings with the activated element.
|
110
|
-
* When set to 'all' the component will deactivate all other elements initialized at the same time.
|
111
|
-
* @default 'siblings'
|
112
|
-
*/
|
113
|
-
deactivate: 'siblings' | 'all';
|
114
|
-
|
115
|
-
/**
|
116
|
-
* Whether to record history events for tab changes.
|
117
|
-
* @default false
|
118
|
-
*/
|
119
|
-
history: boolean;
|
120
|
-
|
121
|
-
/**
|
122
|
-
* Do not load content remotely on first tab load.
|
123
|
-
* Useful when open tab is rendered on server.
|
124
|
-
* @default false
|
125
|
-
*/
|
126
|
-
ignoreFirstLoad: boolean;
|
127
|
-
|
128
|
-
/**
|
129
|
-
* Whether inline scripts in tab HTML should be parsed on tab load.
|
130
|
-
* Defaults to 'once', parsing only on first load.
|
131
|
-
* Can also be set to 'true' or 'false' to always parse or never parse inline scripts.
|
132
|
-
* @default 'once'
|
133
|
-
*/
|
134
|
-
evaluateScripts: 'once' | boolean;
|
135
|
-
|
136
|
-
/**
|
137
|
-
* When 'true' and no active tab exists, the first available tab will be activated.
|
138
|
-
* When a string is given and no active tab exists, the tab those named path matches the string will be activated.
|
139
|
-
* When 'false' no active tab detection will happen.
|
140
|
-
* @default true
|
141
|
-
*/
|
142
|
-
autoTabActivation: boolean | string;
|
143
|
-
|
144
|
-
/**
|
145
|
-
* Tab should reload content every time it is opened.
|
146
|
-
* @default false
|
147
|
-
*/
|
148
|
-
alwaysRefresh: boolean;
|
149
|
-
|
150
|
-
/**
|
151
|
-
* Can be set to either 'response', 'DOM' or 'html'.
|
152
|
-
* Using 'DOM' will cache the a clone of the DOM tree, preserving all events as they existed on render.
|
153
|
-
* 'response' will cache the original response on load, this way callbacks always receive the same content.
|
154
|
-
* Using 'html' will cache the resulting html after all callbacks, making sure any changes to content are preserved.
|
155
|
-
* @default 'response'
|
156
|
-
*/
|
157
|
-
cacheType: 'response' | 'DOM' | 'html';
|
158
|
-
|
159
|
-
/**
|
160
|
-
* Tab should cache content after loading locally to avoid server trip on second load.
|
161
|
-
* @default true
|
162
|
-
*/
|
163
|
-
cache: boolean;
|
164
|
-
|
165
|
-
/**
|
166
|
-
* Settings object for '$.api' call.
|
167
|
-
* @see {@link https://fomantic-ui.com/behaviors/api.html#/settings}
|
168
|
-
* @default false
|
169
|
-
*/
|
170
|
-
apiSettings: false | FomanticUI.APISettings;
|
171
|
-
|
172
|
-
/**
|
173
|
-
* Can be set to 'hash' or 'state'.
|
174
|
-
* 'hash' will use an in-page link to create history events.
|
175
|
-
* 'state' will use DOM History and load pages from server on refresh.
|
176
|
-
* @see {@link https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Manipulating_the_browser_history}
|
177
|
-
* @default 'hash'
|
178
|
-
*/
|
179
|
-
historyType: 'hash' | 'state';
|
180
|
-
|
181
|
-
/**
|
182
|
-
* When using historyType 'state' you must specify the base URL for all internal links.
|
183
|
-
* @default false
|
184
|
-
*/
|
185
|
-
path: boolean;
|
186
|
-
|
187
|
-
/**
|
188
|
-
* Tabs are limited to those found inside this context.
|
189
|
-
* @default false
|
190
|
-
*/
|
191
|
-
context: false | string;
|
192
|
-
|
193
|
-
/**
|
194
|
-
* If enabled limits tabs to children of passed context.
|
195
|
-
* @default false
|
196
|
-
*/
|
197
|
-
childrenOnly: boolean;
|
198
|
-
|
199
|
-
/**
|
200
|
-
* Maximum amount of nested tabs allowed (avoids recursion).
|
201
|
-
* @default 25
|
202
|
-
*/
|
203
|
-
maxDepth: boolean;
|
204
|
-
|
205
|
-
// endregion
|
206
|
-
|
207
|
-
// region Callbacks
|
208
|
-
|
209
|
-
/**
|
210
|
-
* Callback only the first time a tab is loaded.
|
211
|
-
*/
|
212
|
-
onFirstLoad(this: JQuery, tabPath: string, parameterArray: string, historyEvent: string): void;
|
213
|
-
|
214
|
-
/**
|
215
|
-
* Callback every time a tab is loaded.
|
216
|
-
*/
|
217
|
-
onLoad(this: JQuery, tabPath: string, parameterArray: string, historyEvent: string): void;
|
218
|
-
|
219
|
-
/**
|
220
|
-
* Called when a tab begins loading remote content.
|
221
|
-
*/
|
222
|
-
onRequest(this: JQuery, tabPath: string): void;
|
223
|
-
|
224
|
-
/**
|
225
|
-
* Called after a tab becomes visible.
|
226
|
-
*/
|
227
|
-
onVisible(this: JQuery, tabPath: string): void;
|
228
|
-
|
229
|
-
/**
|
230
|
-
* Called before a tab is about to be changed.
|
231
|
-
* Returning 'false' will cancel the tab change.
|
232
|
-
*/
|
233
|
-
onBeforeChange(this: JQuery, tabPath: string): boolean;
|
234
|
-
|
235
|
-
// endregion
|
236
|
-
|
237
|
-
// region DOM Settings
|
238
|
-
|
239
|
-
/**
|
240
|
-
* Functions used to return content.
|
241
|
-
*/
|
242
|
-
templates: Tab.TemplateSettings;
|
243
|
-
|
244
|
-
/**
|
245
|
-
* DOM Selectors used internally.
|
246
|
-
* Selectors used to find parts of a module.
|
247
|
-
*/
|
248
|
-
selector: Tab.SelectorSettings;
|
249
|
-
|
250
|
-
/**
|
251
|
-
* DOM metadata used by module.
|
252
|
-
*/
|
253
|
-
metadata: Tab.MetadataSettings;
|
254
|
-
|
255
|
-
/**
|
256
|
-
* Class names used to determine element state.
|
257
|
-
*/
|
258
|
-
className: Tab.ClassNameSettings;
|
259
|
-
|
260
|
-
// endregion
|
261
|
-
|
262
|
-
// region Debug Settings
|
263
|
-
|
264
|
-
/**
|
265
|
-
* Name used in log statements
|
266
|
-
*/
|
267
|
-
name: string;
|
268
|
-
|
269
|
-
/**
|
270
|
-
* Event namespace. Makes sure module teardown does not effect other events attached to an element.
|
271
|
-
*/
|
272
|
-
namespace: string;
|
273
|
-
|
274
|
-
/**
|
275
|
-
* Silences all console output including error messages, regardless of other debug settings.
|
276
|
-
*/
|
277
|
-
silent: boolean;
|
278
|
-
|
279
|
-
/**
|
280
|
-
* Debug output to console
|
281
|
-
*/
|
282
|
-
debug: boolean;
|
283
|
-
|
284
|
-
/**
|
285
|
-
* Show console.table output with performance metrics
|
286
|
-
*/
|
287
|
-
performance: boolean;
|
288
|
-
|
289
|
-
/**
|
290
|
-
* Debug output includes all internal behaviors
|
291
|
-
*/
|
292
|
-
verbose: boolean;
|
293
|
-
|
294
|
-
error: Tab.ErrorSettings;
|
295
|
-
|
296
|
-
// endregion
|
297
|
-
}
|
60
|
+
interface TabSettings {
|
61
|
+
// region Tab Settings
|
298
62
|
|
299
|
-
|
300
|
-
|
63
|
+
/**
|
64
|
+
* Whether tab should load remote content as same url as history.
|
65
|
+
* @default false
|
66
|
+
*/
|
67
|
+
auto: boolean;
|
301
68
|
|
302
|
-
|
303
|
-
|
69
|
+
/**
|
70
|
+
* When set to 'siblings' will only deactivate elements that are DOM siblings with the activated element.
|
71
|
+
* When set to 'all' the component will deactivate all other elements initialized at the same time.
|
72
|
+
* @default 'siblings'
|
73
|
+
*/
|
74
|
+
deactivate: 'siblings' | 'all';
|
304
75
|
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
determineTitle: Function;
|
311
|
-
}
|
312
|
-
}
|
76
|
+
/**
|
77
|
+
* Whether to record history events for tab changes.
|
78
|
+
* @default false
|
79
|
+
*/
|
80
|
+
history: boolean;
|
313
81
|
|
314
|
-
|
82
|
+
/**
|
83
|
+
* Do not load content remotely on first tab load.
|
84
|
+
* Useful when open tab is rendered on server.
|
85
|
+
* @default false
|
86
|
+
*/
|
87
|
+
ignoreFirstLoad: boolean;
|
315
88
|
|
316
|
-
|
317
|
-
|
89
|
+
/**
|
90
|
+
* Whether inline scripts in tab HTML should be parsed on tab load.
|
91
|
+
* Defaults to 'once', parsing only on first load.
|
92
|
+
* Can also be set to 'true' or 'false' to always parse or never parse inline scripts.
|
93
|
+
* @default 'once'
|
94
|
+
*/
|
95
|
+
evaluateScripts: 'once' | boolean;
|
318
96
|
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
97
|
+
/**
|
98
|
+
* When 'true' and no active tab exists, the first available tab will be activated.
|
99
|
+
* When a string is given and no active tab exists, the tab those named path matches the string will be activated.
|
100
|
+
* When 'false' no active tab detection will happen.
|
101
|
+
* @default true
|
102
|
+
*/
|
103
|
+
autoTabActivation: boolean | string;
|
324
104
|
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
105
|
+
/**
|
106
|
+
* Tab should reload content every time it is opened.
|
107
|
+
* @default false
|
108
|
+
*/
|
109
|
+
alwaysRefresh: boolean;
|
110
|
+
|
111
|
+
/**
|
112
|
+
* Can be set to either 'response', 'DOM' or 'html'.
|
113
|
+
* Using 'DOM' will cache the a clone of the DOM tree, preserving all events as they existed on render.
|
114
|
+
* 'response' will cache the original response on load, this way callbacks always receive the same content.
|
115
|
+
* Using 'html' will cache the resulting html after all callbacks, making sure any changes to content are preserved.
|
116
|
+
* @default 'response'
|
117
|
+
*/
|
118
|
+
cacheType: 'response' | 'DOM' | 'html';
|
119
|
+
|
120
|
+
/**
|
121
|
+
* Tab should cache content after loading locally to avoid server trip on second load.
|
122
|
+
* @default true
|
123
|
+
*/
|
124
|
+
cache: boolean;
|
331
125
|
|
332
|
-
|
126
|
+
/**
|
127
|
+
* Settings object for '$.api' call.
|
128
|
+
* @see {@link https://fomantic-ui.com/behaviors/api.html#/settings}
|
129
|
+
* @default false
|
130
|
+
*/
|
131
|
+
apiSettings: false | FomanticUI.APISettings;
|
132
|
+
|
133
|
+
/**
|
134
|
+
* Can be set to 'hash' or 'state'.
|
135
|
+
* 'hash' will use an in-page link to create history events.
|
136
|
+
* 'state' will use DOM History and load pages from server on refresh.
|
137
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Manipulating_the_browser_history}
|
138
|
+
* @default 'hash'
|
139
|
+
*/
|
140
|
+
historyType: 'hash' | 'state';
|
333
141
|
|
334
|
-
|
335
|
-
|
336
|
-
|
142
|
+
/**
|
143
|
+
* When using historyType 'state' you must specify the base URL for all internal links.
|
144
|
+
* @default false
|
145
|
+
*/
|
146
|
+
path: boolean;
|
337
147
|
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
148
|
+
/**
|
149
|
+
* Tabs are limited to those found inside this context.
|
150
|
+
* @default false
|
151
|
+
*/
|
152
|
+
context: false | string;
|
343
153
|
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
154
|
+
/**
|
155
|
+
* If enabled limits tabs to children of passed context.
|
156
|
+
* @default false
|
157
|
+
*/
|
158
|
+
childrenOnly: boolean;
|
348
159
|
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
160
|
+
/**
|
161
|
+
* Maximum amount of nested tabs allowed (avoids recursion).
|
162
|
+
* @default 25
|
163
|
+
*/
|
164
|
+
maxDepth: boolean;
|
165
|
+
|
166
|
+
// endregion
|
167
|
+
|
168
|
+
// region Callbacks
|
169
|
+
|
170
|
+
/**
|
171
|
+
* Callback only the first time a tab is loaded.
|
172
|
+
*/
|
173
|
+
onFirstLoad(this: JQuery, tabPath: string, parameterArray: string, historyEvent: string): void;
|
174
|
+
|
175
|
+
/**
|
176
|
+
* Callback every time a tab is loaded.
|
177
|
+
*/
|
178
|
+
onLoad(this: JQuery, tabPath: string, parameterArray: string, historyEvent: string): void;
|
179
|
+
|
180
|
+
/**
|
181
|
+
* Called when a tab begins loading remote content.
|
182
|
+
*/
|
183
|
+
onRequest(this: JQuery, tabPath: string): void;
|
184
|
+
|
185
|
+
/**
|
186
|
+
* Called after a tab becomes visible.
|
187
|
+
*/
|
188
|
+
onVisible(this: JQuery, tabPath: string): void;
|
189
|
+
|
190
|
+
/**
|
191
|
+
* Called before a tab is about to be changed.
|
192
|
+
* Returning 'false' will cancel the tab change.
|
193
|
+
*/
|
194
|
+
onBeforeChange(this: JQuery, tabPath: string): boolean;
|
195
|
+
|
196
|
+
// endregion
|
197
|
+
|
198
|
+
// region DOM Settings
|
199
|
+
|
200
|
+
/**
|
201
|
+
* Functions used to return content.
|
202
|
+
*/
|
203
|
+
templates: Tab.TemplateSettings;
|
204
|
+
|
205
|
+
/**
|
206
|
+
* DOM Selectors used internally.
|
207
|
+
* Selectors used to find parts of a module.
|
208
|
+
*/
|
209
|
+
selector: Tab.SelectorSettings;
|
210
|
+
|
211
|
+
/**
|
212
|
+
* DOM metadata used by module.
|
213
|
+
*/
|
214
|
+
metadata: Tab.MetadataSettings;
|
215
|
+
|
216
|
+
/**
|
217
|
+
* Class names used to determine element state.
|
218
|
+
*/
|
219
|
+
className: Tab.ClassNameSettings;
|
220
|
+
|
221
|
+
// endregion
|
355
222
|
|
356
|
-
|
223
|
+
// region Debug Settings
|
357
224
|
|
358
|
-
|
359
|
-
|
225
|
+
/**
|
226
|
+
* Name used in log statements
|
227
|
+
* @default 'Tab'
|
228
|
+
*/
|
229
|
+
name: string;
|
230
|
+
|
231
|
+
/**
|
232
|
+
* Event namespace. Makes sure module teardown does not effect other events attached to an element.
|
233
|
+
* @default 'tab'
|
234
|
+
*/
|
235
|
+
namespace: string;
|
236
|
+
|
237
|
+
/**
|
238
|
+
* Silences all console output including error messages, regardless of other debug settings.
|
239
|
+
* @default false
|
240
|
+
*/
|
241
|
+
silent: boolean;
|
360
242
|
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
243
|
+
/**
|
244
|
+
* Debug output to console
|
245
|
+
* @default false
|
246
|
+
*/
|
247
|
+
debug: boolean;
|
366
248
|
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
249
|
+
/**
|
250
|
+
* Show console.table output with performance metrics
|
251
|
+
* @default true
|
252
|
+
*/
|
253
|
+
performance: boolean;
|
254
|
+
|
255
|
+
/**
|
256
|
+
* Debug output includes all internal behaviors
|
257
|
+
* @default false
|
258
|
+
*/
|
259
|
+
verbose: boolean;
|
260
|
+
|
261
|
+
error: Tab.ErrorSettings;
|
262
|
+
|
263
|
+
// endregion
|
264
|
+
}
|
265
|
+
|
266
|
+
namespace Tab {
|
267
|
+
type TemplateSettings = Partial<Pick<Settings.Templates, keyof Settings.Templates>>;
|
268
|
+
type SelectorSettings = Partial<Pick<Settings.Selectors, keyof Settings.Selectors>>;
|
269
|
+
type MetadataSettings = Partial<Pick<Settings.Metadatas, keyof Settings.Metadatas>>;
|
270
|
+
type ClassNameSettings = Partial<Pick<Settings.ClassNames, keyof Settings.ClassNames>>;
|
271
|
+
type ErrorSettings = Partial<Pick<Settings.Errors, keyof Settings.Errors>>;
|
272
|
+
|
273
|
+
namespace Settings {
|
274
|
+
interface Templates {
|
275
|
+
/**
|
276
|
+
* Returns page title
|
277
|
+
* @default Function
|
278
|
+
*/
|
279
|
+
determineTitle: Function;
|
280
|
+
}
|
281
|
+
|
282
|
+
interface Selectors {
|
283
|
+
/**
|
284
|
+
* @default '.ui.tab'
|
285
|
+
*/
|
286
|
+
tabs: string;
|
287
|
+
|
288
|
+
/**
|
289
|
+
* @default '.ui:not(.menu)'
|
290
|
+
*/
|
291
|
+
parent: string;
|
292
|
+
}
|
293
|
+
|
294
|
+
interface Metadatas {
|
295
|
+
/**
|
296
|
+
* @default 'tab'
|
297
|
+
*/
|
298
|
+
tab: string;
|
299
|
+
|
300
|
+
/**
|
301
|
+
* @default 'loaded'
|
302
|
+
*/
|
303
|
+
loaded: string;
|
304
|
+
|
305
|
+
/**
|
306
|
+
* @default 'promise'
|
307
|
+
*/
|
308
|
+
promise: string;
|
372
309
|
}
|
373
310
|
|
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
|
-
state: string;
|
423
|
-
}
|
311
|
+
interface ClassNames {
|
312
|
+
/**
|
313
|
+
* @default 'loading'
|
314
|
+
*/
|
315
|
+
loading: string;
|
316
|
+
|
317
|
+
/**
|
318
|
+
* @default 'active'
|
319
|
+
*/
|
320
|
+
active: string;
|
321
|
+
}
|
322
|
+
|
323
|
+
interface Errors {
|
324
|
+
/**
|
325
|
+
* @default 'You attempted to load content without API module'
|
326
|
+
*/
|
327
|
+
api: string;
|
328
|
+
|
329
|
+
/**
|
330
|
+
* @default 'The method you called is not defined'
|
331
|
+
*/
|
332
|
+
method: string;
|
333
|
+
|
334
|
+
/**
|
335
|
+
* @default 'Activated tab cannot be found for this context.'
|
336
|
+
*/
|
337
|
+
missingTab: string;
|
338
|
+
|
339
|
+
/**
|
340
|
+
* @default 'The tab you specified is missing a content url.'
|
341
|
+
*/
|
342
|
+
noContent: string;
|
343
|
+
|
344
|
+
/**
|
345
|
+
* @default 'History enabled, but no path was specified'
|
346
|
+
*/
|
347
|
+
path: string;
|
348
|
+
|
349
|
+
/**
|
350
|
+
* @default 'Max recursive depth reached'
|
351
|
+
*/
|
352
|
+
recursion: string;
|
353
|
+
|
354
|
+
/**
|
355
|
+
* @default 'The state library has not been initialized'
|
356
|
+
*/
|
357
|
+
state: string;
|
424
358
|
}
|
425
359
|
}
|
426
360
|
}
|
@@ -1,9 +1,11 @@
|
|
1
|
-
|
1
|
+
/// <reference path="index.d.ts" />
|
2
2
|
|
3
|
+
$().accordion(); // $ExpectType JQuery<HTMLElement>
|
4
|
+
$().api();// $ExpectType JQuery
|
3
5
|
$().calendar(); // $ExpectType JQuery<HTMLElement>
|
4
6
|
$().checkbox(); // $ExpectType JQuery<HTMLElement>
|
5
7
|
$('body').dimmer(); // $ExpectType JQuery<HTMLElement>
|
6
|
-
|
8
|
+
$().dropdown(); // $ExpectType JQuery<HTMLElement>
|
7
9
|
$().embed(); // $ExpectType JQuery<HTMLElement>
|
8
10
|
$().flyout(); // $ExpectType JQuery<HTMLElement>
|
9
11
|
$().form(); // $ExpectType JQuery<HTMLElement>
|