@northdata/fomantic-ui 2.8.722 → 2.9.401

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 (157) hide show
  1. package/lib/semantic-ui/dist/components/accordion.css +62 -69
  2. package/lib/semantic-ui/dist/components/accordion.js +595 -618
  3. package/lib/semantic-ui/dist/components/accordion.min.css +4 -4
  4. package/lib/semantic-ui/dist/components/accordion.min.js +6 -6
  5. package/lib/semantic-ui/dist/components/api.js +1225 -1177
  6. package/lib/semantic-ui/dist/components/api.min.js +6 -6
  7. package/lib/semantic-ui/dist/components/button.css +291 -634
  8. package/lib/semantic-ui/dist/components/button.min.css +4 -4
  9. package/lib/semantic-ui/dist/components/calendar.css +149 -33
  10. package/lib/semantic-ui/dist/components/calendar.js +2045 -1774
  11. package/lib/semantic-ui/dist/components/calendar.min.css +4 -4
  12. package/lib/semantic-ui/dist/components/calendar.min.js +6 -6
  13. package/lib/semantic-ui/dist/components/card.css +147 -537
  14. package/lib/semantic-ui/dist/components/card.min.css +4 -4
  15. package/lib/semantic-ui/dist/components/checkbox.css +215 -405
  16. package/lib/semantic-ui/dist/components/checkbox.js +888 -876
  17. package/lib/semantic-ui/dist/components/checkbox.min.css +4 -4
  18. package/lib/semantic-ui/dist/components/checkbox.min.js +6 -6
  19. package/lib/semantic-ui/dist/components/container.css +20 -21
  20. package/lib/semantic-ui/dist/components/container.min.css +4 -4
  21. package/lib/semantic-ui/dist/components/dimmer.css +76 -184
  22. package/lib/semantic-ui/dist/components/dimmer.js +732 -753
  23. package/lib/semantic-ui/dist/components/dimmer.min.css +4 -4
  24. package/lib/semantic-ui/dist/components/dimmer.min.js +6 -6
  25. package/lib/semantic-ui/dist/components/divider.css +81 -88
  26. package/lib/semantic-ui/dist/components/divider.min.css +4 -4
  27. package/lib/semantic-ui/dist/components/dropdown.css +431 -450
  28. package/lib/semantic-ui/dist/components/dropdown.js +4432 -4238
  29. package/lib/semantic-ui/dist/components/dropdown.min.css +4 -4
  30. package/lib/semantic-ui/dist/components/dropdown.min.js +6 -6
  31. package/lib/semantic-ui/dist/components/feed.css +130 -87
  32. package/lib/semantic-ui/dist/components/feed.min.css +4 -4
  33. package/lib/semantic-ui/dist/components/flag.css +541 -511
  34. package/lib/semantic-ui/dist/components/flag.min.css +4 -4
  35. package/lib/semantic-ui/dist/components/form.css +437 -476
  36. package/lib/semantic-ui/dist/components/form.js +2199 -2033
  37. package/lib/semantic-ui/dist/components/form.min.css +4 -4
  38. package/lib/semantic-ui/dist/components/form.min.js +6 -6
  39. package/lib/semantic-ui/dist/components/grid.css +151 -306
  40. package/lib/semantic-ui/dist/components/grid.min.css +4 -4
  41. package/lib/semantic-ui/dist/components/header.css +82 -99
  42. package/lib/semantic-ui/dist/components/header.min.css +4 -4
  43. package/lib/semantic-ui/dist/components/icon.css +2744 -2706
  44. package/lib/semantic-ui/dist/components/icon.min.css +4 -4
  45. package/lib/semantic-ui/dist/components/image.css +38 -73
  46. package/lib/semantic-ui/dist/components/image.min.css +4 -4
  47. package/lib/semantic-ui/dist/components/input.css +344 -254
  48. package/lib/semantic-ui/dist/components/input.min.css +4 -4
  49. package/lib/semantic-ui/dist/components/item.css +91 -139
  50. package/lib/semantic-ui/dist/components/item.min.css +4 -4
  51. package/lib/semantic-ui/dist/components/label.css +244 -267
  52. package/lib/semantic-ui/dist/components/label.min.css +4 -4
  53. package/lib/semantic-ui/dist/components/list.css +75 -113
  54. package/lib/semantic-ui/dist/components/list.min.css +4 -4
  55. package/lib/semantic-ui/dist/components/loader.css +142 -601
  56. package/lib/semantic-ui/dist/components/loader.min.css +4 -4
  57. package/lib/semantic-ui/dist/components/menu.css +398 -638
  58. package/lib/semantic-ui/dist/components/menu.min.css +9 -1
  59. package/lib/semantic-ui/dist/components/message.css +116 -332
  60. package/lib/semantic-ui/dist/components/message.min.css +4 -4
  61. package/lib/semantic-ui/dist/components/modal.css +149 -138
  62. package/lib/semantic-ui/dist/components/modal.js +1637 -1209
  63. package/lib/semantic-ui/dist/components/modal.min.css +4 -4
  64. package/lib/semantic-ui/dist/components/modal.min.js +6 -6
  65. package/lib/semantic-ui/dist/components/popup.css +284 -277
  66. package/lib/semantic-ui/dist/components/popup.js +1561 -1541
  67. package/lib/semantic-ui/dist/components/popup.min.css +4 -4
  68. package/lib/semantic-ui/dist/components/popup.min.js +6 -6
  69. package/lib/semantic-ui/dist/components/reset.css +12 -17
  70. package/lib/semantic-ui/dist/components/reset.min.css +4 -4
  71. package/lib/semantic-ui/dist/components/search.css +99 -137
  72. package/lib/semantic-ui/dist/components/search.js +1641 -1565
  73. package/lib/semantic-ui/dist/components/search.min.css +4 -4
  74. package/lib/semantic-ui/dist/components/search.min.js +6 -6
  75. package/lib/semantic-ui/dist/components/segment.css +149 -275
  76. package/lib/semantic-ui/dist/components/segment.min.css +4 -4
  77. package/lib/semantic-ui/dist/components/site.css +40 -48
  78. package/lib/semantic-ui/dist/components/site.js +455 -493
  79. package/lib/semantic-ui/dist/components/site.min.css +4 -4
  80. package/lib/semantic-ui/dist/components/site.min.js +6 -6
  81. package/lib/semantic-ui/dist/components/tab.css +16 -20
  82. package/lib/semantic-ui/dist/components/tab.js +967 -1001
  83. package/lib/semantic-ui/dist/components/tab.min.css +4 -4
  84. package/lib/semantic-ui/dist/components/tab.min.js +6 -6
  85. package/lib/semantic-ui/dist/components/table.css +465 -424
  86. package/lib/semantic-ui/dist/components/table.min.css +4 -4
  87. package/lib/semantic-ui/dist/components/transition.css +264 -1282
  88. package/lib/semantic-ui/dist/components/transition.js +1034 -1109
  89. package/lib/semantic-ui/dist/components/transition.min.css +4 -4
  90. package/lib/semantic-ui/dist/components/transition.min.js +6 -6
  91. package/lib/semantic-ui/dist/semantic-packed.css +5610 -6590
  92. package/lib/semantic-ui/dist/semantic.css +8547 -11697
  93. package/lib/semantic-ui/dist/semantic.full.css +14698 -11227
  94. package/lib/semantic-ui/dist/semantic.full.min.css +6 -262
  95. package/lib/semantic-ui/dist/semantic.js +19428 -19253
  96. package/lib/semantic-ui/dist/semantic.min.css +128 -128
  97. package/lib/semantic-ui/dist/semantic.min.js +6 -6
  98. package/lib/semantic-ui/dist/themes/basic/assets/fonts/LICENSE.txt +91 -0
  99. package/lib/semantic-ui/dist/themes/basic/assets/fonts/icons.woff2 +0 -0
  100. package/lib/semantic-ui/dist/themes/default/assets/fonts/LICENSE_icons.txt +165 -0
  101. package/lib/semantic-ui/dist/themes/default/assets/fonts/brand-icons.woff +0 -0
  102. package/lib/semantic-ui/dist/themes/default/assets/fonts/brand-icons.woff2 +0 -0
  103. package/lib/semantic-ui/dist/themes/default/assets/fonts/icons.woff +0 -0
  104. package/lib/semantic-ui/dist/themes/default/assets/fonts/icons.woff2 +0 -0
  105. package/lib/semantic-ui/dist/themes/default/assets/fonts/outline-icons.woff +0 -0
  106. package/lib/semantic-ui/dist/themes/default/assets/fonts/outline-icons.woff2 +0 -0
  107. package/lib/semantic-ui/types/fomantic-ui-accordion.d.ts +244 -0
  108. package/lib/semantic-ui/types/fomantic-ui-api.d.ts +561 -0
  109. package/lib/semantic-ui/types/fomantic-ui-calendar.d.ts +867 -0
  110. package/lib/semantic-ui/types/fomantic-ui-checkbox.d.ts +342 -0
  111. package/lib/semantic-ui/types/fomantic-ui-dimmer.d.ts +408 -0
  112. package/lib/semantic-ui/types/fomantic-ui-dropdown.d.ts +1221 -0
  113. package/lib/semantic-ui/types/fomantic-ui-embed.d.ts +343 -0
  114. package/lib/semantic-ui/types/fomantic-ui-flyout.d.ts +539 -0
  115. package/lib/semantic-ui/types/fomantic-ui-form.d.ts +759 -0
  116. package/lib/semantic-ui/types/fomantic-ui-modal.d.ts +567 -0
  117. package/lib/semantic-ui/types/fomantic-ui-nag.d.ts +270 -0
  118. package/lib/semantic-ui/types/fomantic-ui-popup.d.ts +549 -0
  119. package/lib/semantic-ui/types/fomantic-ui-progress.d.ts +465 -0
  120. package/lib/semantic-ui/types/fomantic-ui-rating.d.ts +187 -0
  121. package/lib/semantic-ui/types/fomantic-ui-search.d.ts +612 -0
  122. package/lib/semantic-ui/types/fomantic-ui-shape.d.ts +274 -0
  123. package/lib/semantic-ui/types/fomantic-ui-sidebar.d.ts +402 -0
  124. package/lib/semantic-ui/types/fomantic-ui-slider.d.ts +368 -0
  125. package/lib/semantic-ui/types/fomantic-ui-sticky.d.ts +215 -0
  126. package/lib/semantic-ui/types/fomantic-ui-tab.d.ts +361 -0
  127. package/lib/semantic-ui/types/fomantic-ui-toast.d.ts +526 -0
  128. package/lib/semantic-ui/types/fomantic-ui-transition.d.ts +389 -0
  129. package/lib/semantic-ui/types/fomantic-ui-visibility.d.ts +355 -0
  130. package/lib/semantic-ui/types/index.d.ts +63 -0
  131. package/package.json +19 -8
  132. package/lib/semantic-ui/dist/components/shape.css +0 -160
  133. package/lib/semantic-ui/dist/components/shape.js +0 -848
  134. package/lib/semantic-ui/dist/components/shape.min.css +0 -9
  135. package/lib/semantic-ui/dist/components/shape.min.js +0 -11
  136. package/lib/semantic-ui/dist/themes/basic/assets/fonts/icons.eot +0 -0
  137. package/lib/semantic-ui/dist/themes/basic/assets/fonts/icons.svg +0 -450
  138. package/lib/semantic-ui/dist/themes/basic/assets/fonts/icons.ttf +0 -0
  139. package/lib/semantic-ui/dist/themes/default/assets/fonts/brand-icons.eot +0 -0
  140. package/lib/semantic-ui/dist/themes/default/assets/fonts/brand-icons.svg +0 -3570
  141. package/lib/semantic-ui/dist/themes/default/assets/fonts/brand-icons.ttf +0 -0
  142. package/lib/semantic-ui/dist/themes/default/assets/fonts/icons.eot +0 -0
  143. package/lib/semantic-ui/dist/themes/default/assets/fonts/icons.svg +0 -4938
  144. package/lib/semantic-ui/dist/themes/default/assets/fonts/icons.ttf +0 -0
  145. package/lib/semantic-ui/dist/themes/default/assets/fonts/outline-icons.eot +0 -0
  146. package/lib/semantic-ui/dist/themes/default/assets/fonts/outline-icons.svg +0 -803
  147. package/lib/semantic-ui/dist/themes/default/assets/fonts/outline-icons.ttf +0 -0
  148. package/lib/semantic-ui/dist/themes/github/assets/fonts/octicons-local.ttf +0 -0
  149. package/lib/semantic-ui/dist/themes/github/assets/fonts/octicons.svg +0 -200
  150. package/lib/semantic-ui/dist/themes/github/assets/fonts/octicons.ttf +0 -0
  151. package/lib/semantic-ui/dist/themes/github/assets/fonts/octicons.woff +0 -0
  152. package/lib/semantic-ui/dist/themes/material/assets/fonts/icons.eot +0 -0
  153. package/lib/semantic-ui/dist/themes/material/assets/fonts/icons.svg +0 -2373
  154. package/lib/semantic-ui/dist/themes/material/assets/fonts/icons.ttf +0 -0
  155. package/lib/semantic-ui/dist/themes/material/assets/fonts/icons.woff +0 -0
  156. package/lib/semantic-ui/dist/themes/material/assets/fonts/icons.woff2 +0 -0
  157. /package/lib/semantic-ui/dist/themes/{default → famfamfam}/assets/images/flags.png +0 -0
@@ -0,0 +1,561 @@
1
+ declare namespace FomanticUI {
2
+ interface API {
3
+ settings: APISettings;
4
+
5
+ /**
6
+ * Execute query using existing API settings.
7
+ */
8
+ (behavior: 'query'): JQuery;
9
+
10
+ /**
11
+ * Adds data to existing templated url and returns full url string.
12
+ */
13
+ (behavior: 'add url data', url: string, data: any): JQuery;
14
+
15
+ /**
16
+ * Gets promise for current API request.
17
+ */
18
+ (behavior: 'get request'): JQuery;
19
+
20
+ /**
21
+ * Aborts current API request.
22
+ */
23
+ (behavior: 'abort'): JQuery;
24
+
25
+ /**
26
+ * Returns whether last request was cancelled.
27
+ */
28
+ (behavior: 'was cancelled'): boolean;
29
+
30
+ /**
31
+ * Returns whether last request was failure.
32
+ */
33
+ (behavior: 'was failure'): boolean;
34
+
35
+ /**
36
+ * Returns whether last request was successful.
37
+ */
38
+ (behavior: 'was successful'): boolean;
39
+
40
+ /**
41
+ * Returns whether last request was completed.
42
+ */
43
+ (behavior: 'was complete'): boolean;
44
+
45
+ /**
46
+ * Returns whether element is disabled.
47
+ */
48
+ (behavior: 'is disabled'): boolean;
49
+
50
+ /**
51
+ * Returns whether element response is mocked.
52
+ */
53
+ (behavior: 'is mocked'): boolean;
54
+
55
+ /**
56
+ * Returns whether element is loading.
57
+ */
58
+ (behavior: 'is loading'): boolean;
59
+
60
+ /**
61
+ * Sets loading state to element.
62
+ */
63
+ (behavior: 'set loading'): void;
64
+
65
+ /**
66
+ * Sets error state to element.
67
+ */
68
+ (behavior: 'set error'): void;
69
+
70
+ /**
71
+ * Removes loading state to element.
72
+ */
73
+ (behavior: 'remove loading'): void;
74
+
75
+ /**
76
+ * Removes error state to element.
77
+ */
78
+ (behavior: 'remove error'): void;
79
+
80
+ /**
81
+ * Gets event that API request will occur on.
82
+ */
83
+ (behavior: 'get event'): string;
84
+
85
+ /**
86
+ * Returns 'encodeURIComponent' value only if value passed is not already encoded.
87
+ */
88
+ (behavior: 'get url encoded value', value: any): string;
89
+
90
+ /**
91
+ * Reads a locally cached response for a URL.
92
+ */
93
+ (behavior: 'read cached response', url: string): any;
94
+
95
+ /**
96
+ * Writes a cached response for a URL.
97
+ */
98
+ (behavior: 'write cached response', url: string, response: any): void;
99
+
100
+ /**
101
+ * Creates new cache, removing all locally cached URLs.
102
+ */
103
+ (behavior: 'create cache'): void;
104
+
105
+ /**
106
+ * Removes API settings from the page and all events.
107
+ */
108
+ (behavior: 'destroy'): JQuery;
109
+
110
+ <K extends keyof APISettings | JQueryAjaxSettings>(behavior: 'setting', name: K, value?: undefined,): Partial<Pick<APISettings, keyof APISettings>> | Partial<Pick<JQueryAjaxSettings, keyof JQueryAjaxSettings>>;
111
+ <K extends keyof APISettings>(behavior: 'setting', name: K, value: APISettings[K]): JQuery;
112
+ (behavior: 'setting', value: Partial<Pick<APISettings, keyof APISettings>> | Partial<Pick<JQueryAjaxSettings, keyof JQueryAjaxSettings>>): JQuery;
113
+ (settings?: Partial<Pick<APISettings, keyof APISettings>> | Partial<Pick<JQueryAjaxSettings, keyof JQueryAjaxSettings>>): JQuery;
114
+ }
115
+
116
+ /**
117
+ * @see {@link https://fomantic-ui.com/behaviors/api.html#/settings}
118
+ */
119
+ interface APISettings {
120
+ // region API Settings
121
+
122
+ /**
123
+ * When API event should occur.
124
+ * @default 'auto'
125
+ */
126
+ on: string;
127
+
128
+ /**
129
+ * Object containing all templates endpoints
130
+ * @default {}
131
+ */
132
+ api: {[key: string]: string};
133
+
134
+ /**
135
+ * Can be set to 'local' to cache successful returned AJAX responses when using a JSON API.
136
+ * This helps avoid server roundtrips when API endpoints will return the same results when accessed repeatedly.
137
+ * Setting to 'false', will add cache busting parameters to the URL.
138
+ * @default true
139
+ */
140
+ cache: boolean | 'local';
141
+
142
+ /**
143
+ * UI state will be applied to this element, defaults to triggering element.
144
+ * @default false
145
+ */
146
+ stateContext: false | string | JQuery<any>;
147
+
148
+ /**
149
+ * Whether to encode parameters with 'encodeURIComponent' before adding into url string.
150
+ * @default true
151
+ */
152
+ encodeParameters: boolean;
153
+
154
+ /**
155
+ * Whether to automatically include default data like {value} and {text}.
156
+ * @default true
157
+ */
158
+ defaultData: boolean;
159
+
160
+ /**
161
+ * Whether to serialize closest form and include in request.
162
+ * Use `true` to convert complex named keys like `a[b][1][c][]` into a nested object
163
+ * Use `formdata` for formdata web api
164
+ * @default false
165
+ */
166
+ serializeForm: boolean;
167
+
168
+ /**
169
+ * How long to wait when a request is made before triggering request, useful for rate limiting 'oninput'.
170
+ * @default 0
171
+ */
172
+ throttle: number;
173
+
174
+ /**
175
+ * When set to false will not delay the first request made, when no others are queued.
176
+ * @default true
177
+ */
178
+ throttleFirstRequest: boolean;
179
+
180
+ /**
181
+ * Whether an API request can occur while another request is still pending.
182
+ * @default false
183
+ */
184
+ interruptRequests: boolean;
185
+
186
+ /**
187
+ * Minimum duration to show loading indication.
188
+ * @default 0
189
+ */
190
+ loadingDuration: number;
191
+
192
+ /**
193
+ * The default 'auto' will automatically remove error state after error duration, unless the element is a 'form'.
194
+ * @default 'auto'
195
+ */
196
+ hideError: 'auto' | boolean;
197
+
198
+ /**
199
+ * Setting to 'true', will not remove error. Setting to a duration in milliseconds to show error state after request error.
200
+ * @default 2000
201
+ */
202
+ errorDuration: true | number;
203
+
204
+ // endregion
205
+
206
+ // region API Settings
207
+
208
+ /**
209
+ * Named API action for query, originally specified in '$.fn.settings.api'.
210
+ * @default false
211
+ */
212
+ action: string | false;
213
+
214
+ /**
215
+ * Templated URL for query, will override specified action.
216
+ * @default false
217
+ */
218
+ url: string | false;
219
+
220
+ /**
221
+ * base URL to apply to all endpoints. Will be prepended to each given url.
222
+ * @default ''
223
+ */
224
+ base: string;
225
+
226
+ /**
227
+ * Variables to use for replacement.
228
+ * @default false
229
+ */
230
+ urlData: any;
231
+
232
+ /**
233
+ * Can be set to a Javascript object which will be returned automatically instead of requesting JSON from server.
234
+ * @default false
235
+ */
236
+ response: any;
237
+
238
+ /**
239
+ * When specified, this function can be used to retrieve content from a server and return it asynchronously instead of a standard AJAX call.
240
+ * The callback function should return the server response.
241
+ * @default false
242
+ */
243
+ responseAsync: ((settings: APISettings, callback: (response: any) => void) => void) | false;
244
+
245
+ /**
246
+ * Alias of 'response'.
247
+ * @default false
248
+ */
249
+ mockResponse: any;
250
+
251
+ /**
252
+ * Alias of 'responseAsync'.
253
+ * @default false
254
+ */
255
+ mockResponseAsync: ((settings: APISettings, callback: (response: any) => void) => void) | false;
256
+
257
+ /**
258
+ * If set, the onResponse event handler is able to handle an raw Array Object, which is probably returned by the requested source.
259
+ * Even if the datatype is json, it won't be force converted into an object anymore then.
260
+ * @default true
261
+ */
262
+ rawResponse: boolean;
263
+
264
+ /**
265
+ * Method for transmitting request to server.
266
+ * @default 'get'
267
+ */
268
+ method: Uppercase<'get' | 'post' | 'put' | 'delete' | 'head' | 'options' | 'patch'> | Lowercase<'get' | 'post' | 'put' | 'delete' | 'head' | 'options' | 'patch'>;
269
+
270
+ /**
271
+ * Expected data type of response.
272
+ * @default 'json'
273
+ */
274
+ dataType: 'xml' | 'json' | 'jsonp' | 'script' | 'html' | 'text';
275
+
276
+ /**
277
+ * Expected data type of response.
278
+ * @default {}
279
+ */
280
+ data: any;
281
+
282
+ // endregion
283
+
284
+ // region Callbacks
285
+
286
+ /**
287
+ * Allows modifying settings before request, or cancelling request.
288
+ */
289
+ beforeSend(settings: APISettings): any;
290
+
291
+ /**
292
+ * Allows modifying XHR object for request.
293
+ */
294
+ beforeXHR(xhrObject: JQuery.jqXHR): any;
295
+
296
+ /**
297
+ * Callback that occurs when request is made. Receives both the API success promise and the XHR request promise.
298
+ */
299
+ onRequest(promise: JQuery.Deferred<any>, xhr: JQuery.jqXHR): void;
300
+
301
+ /**
302
+ * Allows modifying the server's response before parsed by other callbacks to determine API event success.
303
+ */
304
+ onResponse(response: any): any;
305
+
306
+ /**
307
+ * Determines whether completed JSON response should be treated as successful.
308
+ *
309
+ * @see {@link http://fomantic-ui.com/behaviors/api.html#determining-json-success}
310
+ */
311
+ successTest(response: any): boolean;
312
+
313
+ /**
314
+ * Callback after successful response, JSON response must pass 'successTest'.
315
+ */
316
+ onSuccess(response: any, element: JQuery, xhr: JQuery.jqXHR): void;
317
+
318
+ /**
319
+ * Callback on request complete regardless of conditions.
320
+ */
321
+ onComplete(response: any, element: JQuery, xhr: JQuery.jqXHR): void;
322
+
323
+ /**
324
+ * Callback on failed response, or JSON response that fails 'successTest'.
325
+ */
326
+ onFailure(response: any, element: JQuery): void;
327
+
328
+ /**
329
+ * Callback on server error from returned status code, or XHR failure.
330
+ */
331
+ onError(errorMessage: string, element: JQuery, xhr: JQuery.jqXHR): void;
332
+
333
+ /**
334
+ * Callback on abort caused by user clicking a link or manually cancelling request.
335
+ */
336
+ onAbort(errorMessage: string, element: JQuery, xhr: JQuery.jqXHR): void;
337
+
338
+ // endregion
339
+
340
+ // region DOM Settings
341
+
342
+ /**
343
+ * Selectors used to find parts of a module.
344
+ */
345
+ selector: API.SelectorSettings;
346
+
347
+ /**
348
+ * Class names used to determine element state.
349
+ */
350
+ className: API.ClassNameSettings;
351
+
352
+ /**
353
+ * Regular expressions used for template matching.
354
+ */
355
+ regExp: API.RegExpSettings;
356
+
357
+ /**
358
+ * Metadata used to store XHR and response promise.
359
+ */
360
+ metadata: API.MetadataSettings;
361
+
362
+ // endregion
363
+
364
+ // region Debug Settings
365
+
366
+ /**
367
+ * Name used in log statements.
368
+ * @default 'API'
369
+ */
370
+ name: string;
371
+
372
+ /**
373
+ * Event namespace. Makes sure module teardown does not effect other events attached to an element.
374
+ * @default 'api'
375
+ */
376
+ namespace: string;
377
+
378
+ /**
379
+ * Silences all console output including error messages, regardless of other debug settings.
380
+ * @default false
381
+ */
382
+ silent: boolean;
383
+
384
+ /**
385
+ * Debug output to console.
386
+ * @default false
387
+ */
388
+ debug: boolean;
389
+
390
+ /**
391
+ * Show 'console.table' output with performance metrics.
392
+ * @default true
393
+ */
394
+ performance: boolean;
395
+
396
+ /**
397
+ * Debug output includes all internal behaviors.
398
+ * @default false
399
+ */
400
+ verbose: boolean;
401
+
402
+ errors: API.ErrorSettings;
403
+
404
+ // endregion
405
+ }
406
+
407
+ namespace API {
408
+ type SelectorSettings = Partial<Pick<Settings.Selectors, keyof Settings.Selectors>>;
409
+ type ClassNameSettings = Partial<Pick<Settings.ClassNames, keyof Settings.ClassNames>>;
410
+ type RegExpSettings = Partial<Pick<Settings.RegExps, keyof Settings.RegExps>>;
411
+ type MetadataSettings = Partial<Pick<Settings.Metadatas, keyof Settings.Metadatas>>;
412
+ type ErrorSettings = Partial<Pick<Settings.Errors, keyof Settings.Errors>>;
413
+
414
+ namespace Settings {
415
+ interface Selectors {
416
+ /**
417
+ * @default '.disabled'
418
+ */
419
+ disabled: string;
420
+
421
+ /**
422
+ * @default 'form'
423
+ */
424
+ form: string;
425
+ }
426
+
427
+ interface ClassNames {
428
+ /**
429
+ * @default 'loading'
430
+ */
431
+ loading: string;
432
+
433
+ /**
434
+ * @default 'error'
435
+ */
436
+ error: string;
437
+ }
438
+
439
+ interface RegExps {
440
+ /**
441
+ * @default /{\$*[\da-z]+}/gi
442
+ */
443
+ required: RegExp;
444
+
445
+ /**
446
+ * @default /{\/\$*[\da-z]+}/gi
447
+ */
448
+ optional: RegExp;
449
+
450
+ /**
451
+ * @default /^[_a-z][\w-]*(?:\[[\w-]*])*$/i
452
+ */
453
+ validate: RegExp;
454
+
455
+ /**
456
+ * /[\w-]+|(?=\[])/gi
457
+ */
458
+ key: RegExp;
459
+
460
+ /**
461
+ * @default /^$/
462
+ */
463
+ push: RegExp;
464
+
465
+ /**
466
+ * @default /^\d+$/
467
+ */
468
+ fixed: RegExp;
469
+
470
+ /**
471
+ * @default /^[\w-]+$/i
472
+ */
473
+ named: RegExp;
474
+ }
475
+
476
+ interface Metadatas {
477
+ /**
478
+ * @default 'action'
479
+ */
480
+ action: string;
481
+
482
+ /**
483
+ * @default 'url'
484
+ */
485
+ url: string;
486
+ }
487
+
488
+ interface Errors {
489
+ /**
490
+ * @default 'The before send function has aborted the request.'
491
+ */
492
+ beforeSend: string;
493
+
494
+ /**
495
+ * @default 'There was an error with your request.'
496
+ */
497
+ error: string;
498
+
499
+ /**
500
+ * @default 'API Request Aborted. Exit conditions met.'
501
+ */
502
+ exitConditions: string;
503
+
504
+ /**
505
+ * @default 'JSON could not be parsed during error handling.'
506
+ */
507
+ JSONParse: string;
508
+
509
+ /**
510
+ * @default 'You are using legacy API success callback names.'
511
+ */
512
+ legacyParameters: string;
513
+
514
+ /**
515
+ * @default 'The method you called is not defined.'
516
+ */
517
+ method: string;
518
+
519
+ /**
520
+ * @default 'API action used but no url was defined.'
521
+ */
522
+ missingAction: string;
523
+
524
+ /**
525
+ * @default 'No URL specified for API event.'
526
+ */
527
+ missingURL: string;
528
+
529
+ /**
530
+ * @default 'The beforeSend callback must return a settings object, beforeSend ignored.'
531
+ */
532
+ noReturnedValue: string;
533
+
534
+ /**
535
+ * @default 'There was an error with your request.'
536
+ */
537
+ parseError: string;
538
+
539
+ /**
540
+ * @default 'Caching responses locally requires session storage.'
541
+ */
542
+ noStorage: string;
543
+
544
+ /**
545
+ * @default 'Missing a required URL parameter: '
546
+ */
547
+ requiredParameter: string;
548
+
549
+ /**
550
+ * @default 'Server gave an error: '
551
+ */
552
+ statusMessage: string;
553
+
554
+ /**
555
+ * @default 'Your request timed out.'
556
+ */
557
+ timeout: string;
558
+ }
559
+ }
560
+ }
561
+ }