fomantic-ui 2.9.3-beta.45 → 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.
Files changed (186) hide show
  1. package/README.md +5 -2
  2. package/SECURITY.md +2 -1
  3. package/dist/components/accordion.css +1 -1
  4. package/dist/components/accordion.js +1 -1
  5. package/dist/components/accordion.min.css +1 -1
  6. package/dist/components/accordion.min.js +1 -1
  7. package/dist/components/ad.css +1 -1
  8. package/dist/components/ad.min.css +1 -1
  9. package/dist/components/api.js +1 -1
  10. package/dist/components/api.min.js +1 -1
  11. package/dist/components/breadcrumb.css +1 -1
  12. package/dist/components/breadcrumb.min.css +1 -1
  13. package/dist/components/button.css +1 -1
  14. package/dist/components/button.min.css +1 -1
  15. package/dist/components/calendar.css +1 -1
  16. package/dist/components/calendar.js +1 -1
  17. package/dist/components/calendar.min.css +1 -1
  18. package/dist/components/calendar.min.js +1 -1
  19. package/dist/components/card.css +1 -1
  20. package/dist/components/card.min.css +1 -1
  21. package/dist/components/checkbox.css +1 -1
  22. package/dist/components/checkbox.js +1 -1
  23. package/dist/components/checkbox.min.css +1 -1
  24. package/dist/components/checkbox.min.js +1 -1
  25. package/dist/components/comment.css +1 -1
  26. package/dist/components/comment.min.css +1 -1
  27. package/dist/components/container.css +1 -1
  28. package/dist/components/container.min.css +1 -1
  29. package/dist/components/dimmer.css +1 -1
  30. package/dist/components/dimmer.js +1 -1
  31. package/dist/components/dimmer.min.css +1 -1
  32. package/dist/components/dimmer.min.js +1 -1
  33. package/dist/components/divider.css +1 -1
  34. package/dist/components/divider.min.css +1 -1
  35. package/dist/components/dropdown.css +1 -1
  36. package/dist/components/dropdown.js +1 -1
  37. package/dist/components/dropdown.min.css +1 -1
  38. package/dist/components/dropdown.min.js +1 -1
  39. package/dist/components/embed.css +1 -1
  40. package/dist/components/embed.js +1 -1
  41. package/dist/components/embed.min.css +1 -1
  42. package/dist/components/embed.min.js +1 -1
  43. package/dist/components/emoji.css +1 -1
  44. package/dist/components/emoji.min.css +1 -1
  45. package/dist/components/feed.css +1 -1
  46. package/dist/components/feed.min.css +1 -1
  47. package/dist/components/flag.css +1 -1
  48. package/dist/components/flag.min.css +1 -1
  49. package/dist/components/flyout.css +1 -1
  50. package/dist/components/flyout.js +1 -1
  51. package/dist/components/flyout.min.css +1 -1
  52. package/dist/components/flyout.min.js +1 -1
  53. package/dist/components/form.css +1 -1
  54. package/dist/components/form.js +1 -1
  55. package/dist/components/form.min.css +1 -1
  56. package/dist/components/form.min.js +1 -1
  57. package/dist/components/grid.css +1 -1
  58. package/dist/components/grid.min.css +1 -1
  59. package/dist/components/header.css +1 -1
  60. package/dist/components/header.min.css +1 -1
  61. package/dist/components/icon.css +1 -1
  62. package/dist/components/icon.min.css +1 -1
  63. package/dist/components/image.css +1 -1
  64. package/dist/components/image.min.css +1 -1
  65. package/dist/components/input.css +1 -1
  66. package/dist/components/input.min.css +1 -1
  67. package/dist/components/item.css +1 -1
  68. package/dist/components/item.min.css +1 -1
  69. package/dist/components/label.css +1 -1
  70. package/dist/components/label.min.css +1 -1
  71. package/dist/components/list.css +1 -1
  72. package/dist/components/list.min.css +1 -1
  73. package/dist/components/loader.css +1 -1
  74. package/dist/components/loader.min.css +1 -1
  75. package/dist/components/menu.css +1 -1
  76. package/dist/components/menu.min.css +1 -1
  77. package/dist/components/message.css +1 -1
  78. package/dist/components/message.min.css +1 -1
  79. package/dist/components/modal.css +1 -1
  80. package/dist/components/modal.js +1 -1
  81. package/dist/components/modal.min.css +1 -1
  82. package/dist/components/modal.min.js +1 -1
  83. package/dist/components/nag.css +1 -1
  84. package/dist/components/nag.js +1 -1
  85. package/dist/components/nag.min.css +1 -1
  86. package/dist/components/nag.min.js +1 -1
  87. package/dist/components/placeholder.css +1 -1
  88. package/dist/components/placeholder.min.css +1 -1
  89. package/dist/components/popup.css +1 -1
  90. package/dist/components/popup.js +1 -1
  91. package/dist/components/popup.min.css +1 -1
  92. package/dist/components/popup.min.js +1 -1
  93. package/dist/components/progress.css +1 -1
  94. package/dist/components/progress.js +1 -1
  95. package/dist/components/progress.min.css +1 -1
  96. package/dist/components/progress.min.js +1 -1
  97. package/dist/components/rail.css +1 -1
  98. package/dist/components/rail.min.css +1 -1
  99. package/dist/components/rating.css +1 -1
  100. package/dist/components/rating.js +1 -1
  101. package/dist/components/rating.min.css +1 -1
  102. package/dist/components/rating.min.js +1 -1
  103. package/dist/components/reset.css +1 -1
  104. package/dist/components/reset.min.css +1 -1
  105. package/dist/components/reveal.css +1 -1
  106. package/dist/components/reveal.min.css +1 -1
  107. package/dist/components/search.css +1 -1
  108. package/dist/components/search.js +1 -1
  109. package/dist/components/search.min.css +1 -1
  110. package/dist/components/search.min.js +1 -1
  111. package/dist/components/segment.css +1 -1
  112. package/dist/components/segment.min.css +1 -1
  113. package/dist/components/shape.css +1 -1
  114. package/dist/components/shape.js +1 -1
  115. package/dist/components/shape.min.css +1 -1
  116. package/dist/components/shape.min.js +1 -1
  117. package/dist/components/sidebar.css +1 -1
  118. package/dist/components/sidebar.js +1 -1
  119. package/dist/components/sidebar.min.css +1 -1
  120. package/dist/components/sidebar.min.js +1 -1
  121. package/dist/components/site.css +1 -1
  122. package/dist/components/site.js +1 -1
  123. package/dist/components/site.min.css +1 -1
  124. package/dist/components/site.min.js +1 -1
  125. package/dist/components/slider.css +1 -1
  126. package/dist/components/slider.js +1 -1
  127. package/dist/components/slider.min.css +1 -1
  128. package/dist/components/slider.min.js +1 -1
  129. package/dist/components/state.js +1 -1
  130. package/dist/components/state.min.js +1 -1
  131. package/dist/components/statistic.css +1 -1
  132. package/dist/components/statistic.min.css +1 -1
  133. package/dist/components/step.css +1 -1
  134. package/dist/components/step.min.css +1 -1
  135. package/dist/components/sticky.css +1 -1
  136. package/dist/components/sticky.js +1 -1
  137. package/dist/components/sticky.min.css +1 -1
  138. package/dist/components/sticky.min.js +1 -1
  139. package/dist/components/tab.css +1 -1
  140. package/dist/components/tab.js +1 -1
  141. package/dist/components/tab.min.css +1 -1
  142. package/dist/components/tab.min.js +1 -1
  143. package/dist/components/table.css +1 -1
  144. package/dist/components/table.min.css +1 -1
  145. package/dist/components/text.css +1 -1
  146. package/dist/components/text.min.css +1 -1
  147. package/dist/components/toast.css +1 -1
  148. package/dist/components/toast.js +1 -1
  149. package/dist/components/toast.min.css +1 -1
  150. package/dist/components/toast.min.js +1 -1
  151. package/dist/components/transition.css +1 -1
  152. package/dist/components/transition.js +1 -1
  153. package/dist/components/transition.min.css +1 -1
  154. package/dist/components/transition.min.js +1 -1
  155. package/dist/components/visibility.js +1 -1
  156. package/dist/components/visibility.min.js +1 -1
  157. package/dist/semantic.css +53 -53
  158. package/dist/semantic.js +26 -26
  159. package/dist/semantic.min.css +1 -1
  160. package/dist/semantic.min.js +1 -1
  161. package/package.json +1 -1
  162. package/types/fomantic-ui-accordion.d.ts +166 -172
  163. package/types/fomantic-ui-api.d.ts +418 -470
  164. package/types/fomantic-ui-calendar.d.ts +425 -479
  165. package/types/fomantic-ui-checkbox.d.ts +148 -194
  166. package/types/fomantic-ui-dimmer.d.ts +188 -265
  167. package/types/fomantic-ui-dropdown.d.ts +447 -666
  168. package/types/fomantic-ui-embed.d.ts +243 -289
  169. package/types/fomantic-ui-flyout.d.ts +259 -292
  170. package/types/fomantic-ui-form.d.ts +478 -607
  171. package/types/fomantic-ui-modal.d.ts +389 -471
  172. package/types/fomantic-ui-nag.d.ts +228 -277
  173. package/types/fomantic-ui-popup.d.ts +438 -534
  174. package/types/fomantic-ui-progress.d.ts +278 -352
  175. package/types/fomantic-ui-rating.d.ts +137 -168
  176. package/types/fomantic-ui-search.d.ts +359 -453
  177. package/types/fomantic-ui-shape.d.ts +152 -194
  178. package/types/fomantic-ui-sidebar.d.ts +315 -391
  179. package/types/fomantic-ui-slider.d.ts +259 -322
  180. package/types/fomantic-ui-sticky.d.ts +198 -244
  181. package/types/fomantic-ui-tab.d.ts +284 -350
  182. package/types/fomantic-ui-tests.ts +4 -2
  183. package/types/fomantic-ui-toast.d.ts +318 -424
  184. package/types/fomantic-ui-transition.d.ts +223 -273
  185. package/types/fomantic-ui-visibility.d.ts +286 -353
  186. package/types/index.d.ts +0 -1
@@ -107,483 +107,389 @@ declare namespace FomanticUI {
107
107
  */
108
108
  (behavior: 'destroy'): JQuery;
109
109
 
110
- <K extends keyof SearchSettings>(behavior: 'setting', name: K, value?: undefined): SearchSettings._Impl[K];
111
- <K extends keyof SearchSettings>(behavior: 'setting', name: K, value: SearchSettings._Impl[K]): JQuery;
112
- (behavior: 'setting', value: SearchSettings): JQuery;
113
- (settings?: SearchSettings): JQuery;
110
+ <K extends keyof SearchSettings>(behavior: 'setting', name: K, value?: undefined, ): Partial<Pick<SearchSettings, keyof SearchSettings>>;
111
+ <K extends keyof SearchSettings>(behavior: 'setting', name: K, value: SearchSettings[K]): JQuery;
112
+ (behavior: 'setting', value: Partial<Pick<SearchSettings, keyof SearchSettings>>): JQuery;
113
+ (settings?: Partial<Pick<SearchSettings, keyof SearchSettings>>): JQuery;
114
114
  }
115
115
 
116
116
  /**
117
117
  * @see {@link https://fomantic-ui.com/modules/search.html#/settings}
118
118
  */
119
- type SearchSettings = SearchSettings.Param;
120
-
121
- namespace SearchSettings {
122
- type Param = (
123
- | Pick<_Impl, 'apiSettings'>
124
- | Pick<_Impl, 'minCharacters'>
125
- | Pick<_Impl, 'searchOnFocus'>
126
- | Pick<_Impl, 'transition'>
127
- | Pick<_Impl, 'duration'>
128
- | Pick<_Impl, 'maxResults'>
129
- | Pick<_Impl, 'cache'>
130
- | Pick<_Impl, 'source'>
131
- | Pick<_Impl, 'selectFirstResult'>
132
- | Pick<_Impl, 'showNoResults'>
133
- | Pick<_Impl, 'fullTextSearch'>
134
- | Pick<_Impl, 'fields'>
135
- | Pick<_Impl, 'searchFields'>
136
- | Pick<_Impl, 'hideDelay'>
137
- | Pick<_Impl, 'searchDelay'>
138
- | Pick<_Impl, 'easing'>
139
- | Pick<_Impl, 'ignoreDiacritics'>
140
- | Pick<_Impl, 'onSelect'>
141
- | Pick<_Impl, 'onResultsAdd'>
142
- | Pick<_Impl, 'onSearchQuery'>
143
- | Pick<_Impl, 'onResults'>
144
- | Pick<_Impl, 'onResultsOpen'>
145
- | Pick<_Impl, 'onResultsClose'>
146
- | Pick<_Impl, 'templates'>
147
- | Pick<_Impl, 'selector'>
148
- | Pick<_Impl, 'regExp'>
149
- | Pick<_Impl, 'className'>
150
- | Pick<_Impl, 'metadata'>
151
- | Pick<_Impl, 'name'>
152
- | Pick<_Impl, 'namespace'>
153
- | Pick<_Impl, 'silent'>
154
- | Pick<_Impl, 'debug'>
155
- | Pick<_Impl, 'performance'>
156
- | Pick<_Impl, 'verbose'>
157
- | Pick<_Impl, 'error'>
158
- ) &
159
- Partial<Pick<_Impl, keyof _Impl>>;
160
-
161
- interface _Impl {
162
- // region Search Settings
163
-
164
- /**
165
- * Settings for API call.
166
- * @see {@link https://fomantic-ui.com/behaviors/api.html#/settings}
167
- * @default {}
168
- */
169
- apiSettings: APISettings;
170
-
171
- /**
172
- * Minimum characters to query for results.
173
- * @default 1
174
- */
175
- minCharacters: number;
176
-
177
- /**
178
- * Whether search should show results on focus (must also match min character length).
179
- * @default true
180
- */
181
- searchOnFocus: boolean;
182
-
183
- /**
184
- * Named transition to use when animating menu in and out.
185
- * Fade and slide down are available without including ui transitions.
186
- * @see {@link https://fomantic-ui.com/modules/transition.html}
187
- * @default 'fade'
188
- */
189
- transition: string;
190
-
191
- /**
192
- * Duration of animation events.
193
- * @default 300
194
- */
195
- duration: number;
196
-
197
- /**
198
- * Maximum results to display when using local and simple search, maximum category count for category search.
199
- * @default 7
200
- */
201
- maxResults: number;
202
-
203
- /**
204
- * Caches results locally to avoid requerying server.
205
- * @default true
206
- */
207
- cache: boolean;
208
-
209
- /**
210
- * Specify a Javascript object which will be searched locally.
211
- * @default false
212
- */
213
- source: boolean | object;
214
-
215
- /**
216
- * Whether the search should automatically select the first search result after searching.
217
- * @default false
218
- */
219
- selectFirstResult: boolean;
220
-
221
- /**
222
- * Whether a "no results" message should be shown if no results are found.
223
- * @default false
224
- */
225
- showNoResults: boolean;
226
-
227
- /**
228
- * Specifying to "true" will use a fuzzy full text search, setting to "exact" will force the exact search to be matched somewhere in the string, setting to false will only match to start of string.
229
- * @default 'exact'
230
- */
231
- fullTextSearch: 'exact' | boolean;
232
-
233
- /**
234
- * List mapping display content to JSON property, either with API or 'source'.
235
- * @default {}
236
- */
237
- fields: object;
238
-
239
- /**
240
- * Specify object properties inside local source object which will be searched.
241
- * @default ['title', 'description']
242
- */
243
- searchFields: string[];
244
-
245
- /**
246
- * Delay before hiding results after search blur.
247
- * @default 0
248
- */
249
- hideDelay: number;
250
-
251
- /**
252
- * Delay before querying results on inputchange.
253
- * @default 100
254
- */
255
- searchDelay: number;
256
-
257
- /**
258
- * Easing equation when using fallback Javascript animation.
259
- * EaseOutExpo is included with search, for additional options you must include `easing equations`.
260
- * @see {@link https://gsgd.co.uk/sandbox/jquery/easing/}
261
- * @default 'easeOutExpo'
262
- */
263
- easing: string;
264
-
265
- /**
266
- * When activated, searches will also match results for base diacritic letters.
267
- * For example when searching for 'a', it will also match 'á' or 'â' or 'å' and so on...
268
- * It will also ignore diacritics for the searchterm, so if searching for 'ó', it will match 'ó', but also 'o', 'ô' or 'õ' and so on...
269
- * @default false
270
- */
271
- ignoreDiacritics: boolean;
272
-
273
- // endregion
274
-
275
- // region Callbacks
276
-
277
- /**
278
- * Callback on element selection by user.
279
- * The first parameter includes the filtered response results for that element.
280
- * The function should return 'false' to prevent default action (closing search results and selecting value).
281
- */
282
- onSelect(this: JQuery, result: object, response: object): boolean;
283
-
284
- /**
285
- * Callback after processing element template to add HTML to results.
286
- * Function should return 'false' to prevent default actions.
287
- */
288
- onResultsAdd(this: JQuery, html: string): boolean;
289
-
290
- /**
291
- * Callback on search query.
292
- */
293
- onSearchQuery(this: JQuery, query: string): void;
294
-
295
- /**
296
- * Callback on server response.
297
- */
298
- onResults(this: JQuery, response: object): void;
299
-
300
- /**
301
- * Callback when results are opened.
302
- */
303
- onResultsOpen(this: JQuery): void;
304
-
305
- /**
306
- * Callback when results are closed.
307
- */
308
- onResultsClose(this: JQuery): void;
309
-
310
- // endregion
311
-
312
- // region Template Settings
313
-
314
- templates: Search.TemplateSettings;
315
-
316
- // endregion
317
-
318
- // region DOM Settings
319
-
320
- /**
321
- * DOM Selectors used internally.
322
- * Selectors used to find parts of a module.
323
- */
324
- selector: Search.SelectorSettings;
325
-
326
- /**
327
- * Regular expressions used for matching.
328
- */
329
- regExp: Search.RegExpSettings;
330
-
331
- /**
332
- * Class names used to determine element state.
333
- */
334
- className: Search.ClassNameSettings;
335
-
336
- /**
337
- * HTML5 metadata attributes used internally.
338
- */
339
- metadata: Search.MetadataSettings;
340
-
341
- // endregion
342
-
343
- // region Debug Settings
344
-
345
- /**
346
- * Name used in log statements
347
- */
348
- name: string;
349
-
350
- /**
351
- * Event namespace. Makes sure module teardown does not effect other events attached to an element.
352
- */
353
- namespace: string;
354
-
355
- /**
356
- * Silences all console output including error messages, regardless of other debug settings.
357
- */
358
- silent: boolean;
359
-
360
- /**
361
- * Debug output to console
362
- */
363
- debug: boolean;
119
+ interface SearchSettings {
120
+ // region Search Settings
364
121
 
365
- /**
366
- * Show console.table output with performance metrics
367
- */
368
- performance: boolean;
122
+ /**
123
+ * Settings for API call.
124
+ * @see {@link https://fomantic-ui.com/behaviors/api.html#/settings}
125
+ * @default {}
126
+ */
127
+ apiSettings: APISettings;
369
128
 
370
- /**
371
- * Debug output includes all internal behaviors
372
- */
373
- verbose: boolean;
129
+ /**
130
+ * Minimum characters to query for results.
131
+ * @default 1
132
+ */
133
+ minCharacters: number;
374
134
 
375
- error: Search.ErrorSettings;
135
+ /**
136
+ * Whether search should show results on focus (must also match min character length).
137
+ * @default true
138
+ */
139
+ searchOnFocus: boolean;
376
140
 
377
- // endregion
378
- }
141
+ /**
142
+ * Named transition to use when animating menu in and out.
143
+ * Fade and slide down are available without including ui transitions.
144
+ * @see {@link https://fomantic-ui.com/modules/transition.html}
145
+ * @default 'fade'
146
+ */
147
+ transition: string;
379
148
 
380
- namespace Search {
381
- type TemplateSettings = TemplateSettings.Param;
382
-
383
- namespace TemplateSettings {
384
- type Param = (
385
- | Pick<_Impl, 'escape'>
386
- | Pick<_Impl, 'message'>
387
- | Pick<_Impl, 'category'>
388
- | Pick<_Impl, 'standard'>
389
- ) &
390
- Partial<Pick<_Impl, keyof _Impl>>;
391
-
392
- interface _Impl {
393
- /**
394
- * @default function(string)
395
- */
396
- escape: Function;
397
-
398
- /**
399
- * @default function(message, type)
400
- */
401
- message: Function;
402
-
403
- /**
404
- * @default function(response)
405
- */
406
- category: Function;
407
-
408
- /**
409
- * @default function(response)
410
- */
411
- standard: Function;
412
- }
413
- }
149
+ /**
150
+ * Duration of animation events.
151
+ * @default 300
152
+ */
153
+ duration: number;
414
154
 
415
- type SelectorSettings = SelectorSettings.Param;
416
-
417
- namespace SelectorSettings {
418
- type Param = (
419
- | Pick<_Impl, 'prompt'>
420
- | Pick<_Impl, 'searchButton'>
421
- | Pick<_Impl, 'results'>
422
- | Pick<_Impl, 'category'>
423
- | Pick<_Impl, 'result'>
424
- ) &
425
- Partial<Pick<_Impl, keyof _Impl>>;
426
-
427
- interface _Impl {
428
- /**
429
- * @default '.prompt'
430
- */
431
- prompt: string;
432
-
433
- /**
434
- * @default '.search.button'
435
- */
436
- searchButton: string;
437
-
438
- /**
439
- * @default '.results'
440
- */
441
- results: string;
442
-
443
- /**
444
- * @default '.category'
445
- */
446
- category: string;
447
-
448
- /**
449
- * @default '.result'
450
- */
451
- result: string;
452
- }
453
- }
155
+ /**
156
+ * Maximum results to display when using local and simple search, maximum category count for category search.
157
+ * @default 7
158
+ */
159
+ maxResults: number;
160
+
161
+ /**
162
+ * Caches results locally to avoid requerying server.
163
+ * @default true
164
+ */
165
+ cache: boolean;
166
+
167
+ /**
168
+ * Specify a Javascript object which will be searched locally.
169
+ * @default false
170
+ */
171
+ source: boolean | object;
172
+
173
+ /**
174
+ * Whether the search should automatically select the first search result after searching.
175
+ * @default false
176
+ */
177
+ selectFirstResult: boolean;
178
+
179
+ /**
180
+ * Whether a "no results" message should be shown if no results are found.
181
+ * @default false
182
+ */
183
+ showNoResults: boolean;
184
+
185
+ /**
186
+ * Specifying to "true" will use a fuzzy full text search, setting to "exact" will force the exact search to be matched somewhere in the string, setting to false will only match to start of string.
187
+ * @default 'exact'
188
+ */
189
+ fullTextSearch: 'exact' | boolean;
190
+
191
+ /**
192
+ * List mapping display content to JSON property, either with API or 'source'.
193
+ * @default {}
194
+ */
195
+ fields: object;
196
+
197
+ /**
198
+ * Specify object properties inside local source object which will be searched.
199
+ * @default ['title', 'description']
200
+ */
201
+ searchFields: string[];
202
+
203
+ /**
204
+ * Delay before hiding results after search blur.
205
+ * @default 0
206
+ */
207
+ hideDelay: number;
208
+
209
+ /**
210
+ * Delay before querying results on inputchange.
211
+ * @default 100
212
+ */
213
+ searchDelay: number;
214
+
215
+ /**
216
+ * Easing equation when using fallback Javascript animation.
217
+ * EaseOutExpo is included with search, for additional options you must include `easing equations`.
218
+ * @see {@link https://gsgd.co.uk/sandbox/jquery/easing/}
219
+ * @default 'easeOutExpo'
220
+ */
221
+ easing: string;
222
+
223
+ /**
224
+ * When activated, searches will also match results for base diacritic letters.
225
+ * For example when searching for 'a', it will also match 'á' or 'â' or 'å' and so on...
226
+ * It will also ignore diacritics for the searchterm, so if searching for 'ó', it will match 'ó', but also 'o', 'ô' or 'õ' and so on...
227
+ * @default false
228
+ */
229
+ ignoreDiacritics: boolean;
230
+
231
+ // endregion
232
+
233
+ // region Callbacks
234
+
235
+ /**
236
+ * Callback on element selection by user.
237
+ * The first parameter includes the filtered response results for that element.
238
+ * The function should return 'false' to prevent default action (closing search results and selecting value).
239
+ */
240
+ onSelect(this: JQuery, result: object, response: object): boolean;
241
+
242
+ /**
243
+ * Callback after processing element template to add HTML to results.
244
+ * Function should return 'false' to prevent default actions.
245
+ */
246
+ onResultsAdd(this: JQuery, html: string): boolean;
247
+
248
+ /**
249
+ * Callback on search query.
250
+ */
251
+ onSearchQuery(this: JQuery, query: string): void;
252
+
253
+ /**
254
+ * Callback on server response.
255
+ */
256
+ onResults(this: JQuery, response: object): void;
257
+
258
+ /**
259
+ * Callback when results are opened.
260
+ */
261
+ onResultsOpen(this: JQuery): void;
262
+
263
+ /**
264
+ * Callback when results are closed.
265
+ */
266
+ onResultsClose(this: JQuery): void;
267
+
268
+ // endregion
269
+
270
+ // region Template Settings
271
+
272
+ templates: Search.TemplateSettings;
273
+
274
+ // endregion
275
+
276
+ // region DOM Settings
277
+
278
+ /**
279
+ * DOM Selectors used internally.
280
+ * Selectors used to find parts of a module.
281
+ */
282
+ selector: Search.SelectorSettings;
283
+
284
+ /**
285
+ * Regular expressions used for matching.
286
+ */
287
+ regExp: Search.RegExpSettings;
288
+
289
+ /**
290
+ * Class names used to determine element state.
291
+ */
292
+ className: Search.ClassNameSettings;
293
+
294
+ /**
295
+ * HTML5 metadata attributes used internally.
296
+ */
297
+ metadata: Search.MetadataSettings;
454
298
 
455
- type RegExpSettings = RegExpSettings.Param;
299
+ // endregion
300
+
301
+ // region Debug Settings
302
+
303
+ /**
304
+ * Name used in log statements
305
+ * @default 'Search'
306
+ */
307
+ name: string;
456
308
 
457
- namespace RegExpSettings {
458
- type Param = (Pick<_Impl, 'escape'> | Pick<_Impl, 'beginsWith'>) & Partial<Pick<_Impl, keyof _Impl>>;
309
+ /**
310
+ * Event namespace. Makes sure module teardown does not effect other events attached to an element.
311
+ * @default 'search'
312
+ */
313
+ namespace: string;
459
314
 
460
- interface _Impl {
461
- /**
462
- * @default /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g
463
- */
464
- escape: RegExp;
315
+ /**
316
+ * Silences all console output including error messages, regardless of other debug settings.
317
+ * @default false
318
+ */
319
+ silent: boolean;
465
320
 
466
- /**
467
- * @default '(?:\s|^)'
468
- */
469
- beginsWith: RegExp;
470
- }
321
+ /**
322
+ * Debug output to console
323
+ * @default false
324
+ */
325
+ debug: boolean;
326
+
327
+ /**
328
+ * Show console.table output with performance metrics
329
+ * @default true
330
+ */
331
+ performance: boolean;
332
+
333
+ /**
334
+ * Debug output includes all internal behaviors
335
+ * @default false
336
+ */
337
+ verbose: boolean;
338
+
339
+ error: Search.ErrorSettings;
340
+
341
+ // endregion
342
+ }
343
+
344
+ namespace Search {
345
+ type TemplateSettings = Partial<Pick<Settings.Templates, keyof Settings.Templates>>;
346
+ type SelectorSettings = Partial<Pick<Settings.Selectors, keyof Settings.Selectors>>;
347
+ type RegExpSettings = Partial<Pick<Settings.RegExps, keyof Settings.RegExps>>;
348
+ type ClassNameSettings = Partial<Pick<Settings.ClassNames, keyof Settings.ClassNames>>;
349
+ type MetadataSettings = Partial<Pick<Settings.Metadatas, keyof Settings.Metadatas>>;
350
+ type ErrorSettings = Partial<Pick<Settings.Errors, keyof Settings.Errors>>;
351
+
352
+ namespace Settings {
353
+ interface Templates {
354
+ /**
355
+ * @default function(string)
356
+ */
357
+ escape: Function;
358
+
359
+ /**
360
+ * @default function(message, type)
361
+ */
362
+ message: Function;
363
+
364
+ /**
365
+ * @default function(response)
366
+ */
367
+ category: Function;
368
+
369
+ /**
370
+ * @default function(response)
371
+ */
372
+ standard: Function;
471
373
  }
472
374
 
473
- type ClassNameSettings = ClassNameSettings.Param;
474
-
475
- namespace ClassNameSettings {
476
- type Param = (
477
- | Pick<_Impl, 'active'>
478
- | Pick<_Impl, 'empty'>
479
- | Pick<_Impl, 'focus'>
480
- | Pick<_Impl, 'loading'>
481
- | Pick<_Impl, 'pressed'>
482
- ) &
483
- Partial<Pick<_Impl, keyof _Impl>>;
484
-
485
- interface _Impl {
486
- /**
487
- * @default 'active'
488
- */
489
- active: string;
490
-
491
- /**
492
- * @default 'empty'
493
- */
494
- empty: string;
495
-
496
- /**
497
- * @default 'focus'
498
- */
499
- focus: string;
500
-
501
- /**
502
- * @default 'loading'
503
- */
504
- loading: string;
505
-
506
- /**
507
- * @default 'down'
508
- */
509
- pressed: string;
510
- }
375
+ interface Selectors {
376
+ /**
377
+ * @default '.prompt'
378
+ */
379
+ prompt: string;
380
+
381
+ /**
382
+ * @default '.search.button'
383
+ */
384
+ searchButton: string;
385
+
386
+ /**
387
+ * @default '.results'
388
+ */
389
+ results: string;
390
+
391
+ /**
392
+ * @default '.category'
393
+ */
394
+ category: string;
395
+
396
+ /**
397
+ * @default '.result'
398
+ */
399
+ result: string;
511
400
  }
512
401
 
513
- type MetadataSettings = MetadataSettings.Param;
402
+ interface RegExps {
403
+ /**
404
+ * @default /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g
405
+ */
406
+ escape: RegExp;
514
407
 
515
- namespace MetadataSettings {
516
- type Param = (Pick<_Impl, 'cache'> | Pick<_Impl, 'results'>) & Partial<Pick<_Impl, keyof _Impl>>;
408
+ /**
409
+ * @default '(?:\s|^)'
410
+ */
411
+ beginsWith: RegExp;
412
+ }
413
+
414
+ interface ClassNames {
415
+ /**
416
+ * @default 'active'
417
+ */
418
+ active: string;
419
+
420
+ /**
421
+ * @default 'empty'
422
+ */
423
+ empty: string;
424
+
425
+ /**
426
+ * @default 'focus'
427
+ */
428
+ focus: string;
429
+
430
+ /**
431
+ * @default 'loading'
432
+ */
433
+ loading: string;
434
+
435
+ /**
436
+ * @default 'down'
437
+ */
438
+ pressed: string;
439
+ }
517
440
 
518
- interface _Impl {
519
- /**
520
- * @default 'cache'
521
- */
522
- cache: string;
441
+ interface Metadatas {
442
+ /**
443
+ * @default 'cache'
444
+ */
445
+ cache: string;
523
446
 
524
- /**
525
- * @default 'results'
526
- */
527
- results: string;
528
- }
447
+ /**
448
+ * @default 'results'
449
+ */
450
+ results: string;
529
451
  }
530
452
 
531
- type ErrorSettings = ErrorSettings.Param;
532
-
533
- namespace ErrorSettings {
534
- type Param = (
535
- | Pick<_Impl, 'source'>
536
- | Pick<_Impl, 'noResultsHeader'>
537
- | Pick<_Impl, 'noResults'>
538
- | Pick<_Impl, 'logging'>
539
- | Pick<_Impl, 'noTemplate'>
540
- | Pick<_Impl, 'serverError'>
541
- | Pick<_Impl, 'maxResults'>
542
- | Pick<_Impl, 'method'>
543
- ) &
544
- Partial<Pick<_Impl, keyof _Impl>>;
545
-
546
- interface _Impl {
547
- /**
548
- * @default 'Cannot search. No source used, and Fomantic API module was not included'
549
- */
550
- source: string;
551
-
552
- /**
553
- * @default 'No Results'
554
- */
555
- noResultsHeader: string;
556
-
557
- /**
558
- * @default 'Your search returned no results'
559
- */
560
- noResults: string;
561
-
562
- /**
563
- * @default 'Error in debug logging, exiting.'
564
- */
565
- logging: string;
566
-
567
- /**
568
- * @default 'A valid template name was not specified.'
569
- */
570
- noTemplate: string;
571
-
572
- /**
573
- * @default 'There was an issue with querying the server.'
574
- */
575
- serverError: string;
576
-
577
- /**
578
- * @default 'Results must be an array to use maxResults setting'
579
- */
580
- maxResults: string;
581
-
582
- /**
583
- * @default 'The method you called is not defined.'
584
- */
585
- method: string;
586
- }
453
+ interface Errors {
454
+ /**
455
+ * @default 'Cannot search. No source used, and Fomantic API module was not included'
456
+ */
457
+ source: string;
458
+
459
+ /**
460
+ * @default 'No Results'
461
+ */
462
+ noResultsHeader: string;
463
+
464
+ /**
465
+ * @default 'Your search returned no results'
466
+ */
467
+ noResults: string;
468
+
469
+ /**
470
+ * @default 'Error in debug logging, exiting.'
471
+ */
472
+ logging: string;
473
+
474
+ /**
475
+ * @default 'A valid template name was not specified.'
476
+ */
477
+ noTemplate: string;
478
+
479
+ /**
480
+ * @default 'There was an issue with querying the server.'
481
+ */
482
+ serverError: string;
483
+
484
+ /**
485
+ * @default 'Results must be an array to use maxResults setting'
486
+ */
487
+ maxResults: string;
488
+
489
+ /**
490
+ * @default 'The method you called is not defined.'
491
+ */
492
+ method: string;
587
493
  }
588
494
  }
589
495
  }