fomantic-ui 2.9.3-beta.43 → 2.9.3-beta.45
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 +3 -2
- package/types/fomantic-ui-accordion.d.ts +250 -0
- package/types/fomantic-ui-api.d.ts +607 -0
- package/types/fomantic-ui-calendar.d.ts +820 -0
- package/types/fomantic-ui-checkbox.d.ts +378 -0
- package/types/fomantic-ui-dimmer.d.ts +485 -0
- package/types/fomantic-ui-dropdown.d.ts +1402 -0
- package/types/fomantic-ui-embed.d.ts +372 -0
- package/types/fomantic-ui-flyout.d.ts +558 -0
- package/types/fomantic-ui-form.d.ts +780 -0
- package/types/fomantic-ui-modal.d.ts +553 -0
- package/types/fomantic-ui-nag.d.ts +319 -0
- package/types/fomantic-ui-popup.d.ts +619 -0
- package/types/fomantic-ui-progress.d.ts +533 -0
- package/types/fomantic-ui-rating.d.ts +218 -0
- package/types/fomantic-ui-search.d.ts +590 -0
- package/types/fomantic-ui-shape.d.ts +316 -0
- package/types/fomantic-ui-sidebar.d.ts +478 -0
- package/types/fomantic-ui-slider.d.ts +379 -0
- package/types/fomantic-ui-sticky.d.ts +261 -0
- package/types/fomantic-ui-tab.d.ts +427 -0
- package/types/fomantic-ui-tests.ts +23 -0
- package/types/fomantic-ui-toast.d.ts +620 -0
- package/types/fomantic-ui-transition.d.ts +405 -0
- package/types/fomantic-ui-visibility.d.ts +422 -0
- package/types/index.d.ts +64 -0
- package/types/tsconfig.json +23 -0
- package/types/tslint.json +1 -0
@@ -0,0 +1,820 @@
|
|
1
|
+
declare namespace FomanticUI {
|
2
|
+
interface Calendar {
|
3
|
+
settings: CalendarSettings;
|
4
|
+
|
5
|
+
/**
|
6
|
+
* Refresh the calendar
|
7
|
+
*/
|
8
|
+
(behavior: 'refresh'): JQuery;
|
9
|
+
|
10
|
+
/**
|
11
|
+
* Call the popup module (e.g. passing show will show the calendar popup)
|
12
|
+
*/
|
13
|
+
(behavior: 'popup', arguments: any): JQuery;
|
14
|
+
|
15
|
+
/**
|
16
|
+
* Focus the calendar input
|
17
|
+
*/
|
18
|
+
(behavior: 'focus'): JQuery;
|
19
|
+
|
20
|
+
/**
|
21
|
+
* Blur the calendar input
|
22
|
+
*/
|
23
|
+
(behavior: 'blur'): JQuery;
|
24
|
+
|
25
|
+
/**
|
26
|
+
* Clear the selected date
|
27
|
+
*/
|
28
|
+
(behavior: 'clear'): JQuery;
|
29
|
+
|
30
|
+
/**
|
31
|
+
* Get the selected date
|
32
|
+
*/
|
33
|
+
(behavior: 'get date'): Date | string;
|
34
|
+
|
35
|
+
/**
|
36
|
+
* Set the selected date.
|
37
|
+
* Pass false to updateInput to disable updating the input.
|
38
|
+
* Pass false to fireChange to disable the onBeforeChange and onChange callbacks for this change
|
39
|
+
*/
|
40
|
+
(behavior: 'set date', date: string, updateInput: boolean, fireChange: boolean): JQuery;
|
41
|
+
|
42
|
+
/**
|
43
|
+
* Get the current selection mode (year, month, day, hour, minute)
|
44
|
+
*/
|
45
|
+
(behavior: 'get mode'): 'year' | 'month' | 'day' | 'hour' | 'minute';
|
46
|
+
|
47
|
+
/**
|
48
|
+
* Set the current selection mode (year, month, day, hour, minute)
|
49
|
+
*/
|
50
|
+
(behavior: 'set mode', mode: 'year' | 'month' | 'day' | 'hour' | 'minute'): JQuery;
|
51
|
+
|
52
|
+
/**
|
53
|
+
* Get the start date for range selection
|
54
|
+
*/
|
55
|
+
(behavior: 'get startDate'): Date | string;
|
56
|
+
|
57
|
+
/**
|
58
|
+
* Set the start date for range selection
|
59
|
+
*/
|
60
|
+
(behavior: 'set startDate', date: Date | string): JQuery;
|
61
|
+
|
62
|
+
/**
|
63
|
+
* Get the end date for range selection
|
64
|
+
*/
|
65
|
+
(behavior: 'get endDate'): Date | string;
|
66
|
+
|
67
|
+
/**
|
68
|
+
* Set the end date for range selection
|
69
|
+
*/
|
70
|
+
(behavior: 'set endDate', date: Date | string): JQuery;
|
71
|
+
|
72
|
+
/**
|
73
|
+
* Get the currently focused date
|
74
|
+
*/
|
75
|
+
(behavior: 'get focusDate'): Date | string;
|
76
|
+
|
77
|
+
/**
|
78
|
+
* Set the currently focused date
|
79
|
+
*/
|
80
|
+
(behavior: 'set focusDate', date: Date | string): JQuery;
|
81
|
+
|
82
|
+
/**
|
83
|
+
* Set the minimal selectable date
|
84
|
+
*/
|
85
|
+
(behavior: 'set minDate', date: Date | string): JQuery;
|
86
|
+
|
87
|
+
/**
|
88
|
+
* Set the maximal selectable date
|
89
|
+
*/
|
90
|
+
(behavior: 'set maxDate', date: Date | string): JQuery;
|
91
|
+
|
92
|
+
(behavior: 'destroy'): JQuery;
|
93
|
+
|
94
|
+
<K extends keyof CalendarSettings>(behavior: 'setting', name: K, value?: undefined): CalendarSettings._Impl[K];
|
95
|
+
<K extends keyof CalendarSettings>(behavior: 'setting', name: K, value: CalendarSettings._Impl[K]): JQuery;
|
96
|
+
(behavior: 'setting', value: CalendarSettings): JQuery;
|
97
|
+
(settings?: CalendarSettings): JQuery;
|
98
|
+
}
|
99
|
+
|
100
|
+
/**
|
101
|
+
* @see {@link https://fomantic-ui.com/modules/calendar.html#/settings}
|
102
|
+
*/
|
103
|
+
type CalendarSettings = CalendarSettings.Param;
|
104
|
+
|
105
|
+
namespace CalendarSettings {
|
106
|
+
type Param = (
|
107
|
+
| Pick<_Impl, 'type'>
|
108
|
+
| Pick<_Impl, 'firstDayOfWeek'>
|
109
|
+
| Pick<_Impl, 'constantHeight'>
|
110
|
+
| Pick<_Impl, 'today'>
|
111
|
+
| Pick<_Impl, 'closable'>
|
112
|
+
| Pick<_Impl, 'monthFirst'>
|
113
|
+
| Pick<_Impl, 'touchReadonly'>
|
114
|
+
| Pick<_Impl, 'inline'>
|
115
|
+
| Pick<_Impl, 'showWeekNumbers'>
|
116
|
+
| Pick<_Impl, 'disabledDaysOfWeek'>
|
117
|
+
| Pick<_Impl, 'disabledDates'>
|
118
|
+
| Pick<_Impl, 'enabledDates'>
|
119
|
+
| Pick<_Impl, 'eventDates'>
|
120
|
+
| Pick<_Impl, 'eventClass'>
|
121
|
+
| Pick<_Impl, 'on'>
|
122
|
+
| Pick<_Impl, 'initialDate'>
|
123
|
+
| Pick<_Impl, 'startMode'>
|
124
|
+
| Pick<_Impl, 'minDate'>
|
125
|
+
| Pick<_Impl, 'maxDate'>
|
126
|
+
| Pick<_Impl, 'ampm'>
|
127
|
+
| Pick<_Impl, 'disableYear'>
|
128
|
+
| Pick<_Impl, 'disableMonth'>
|
129
|
+
| Pick<_Impl, 'disableMinute'>
|
130
|
+
| Pick<_Impl, 'formatInput'>
|
131
|
+
| Pick<_Impl, 'startCalendar'>
|
132
|
+
| Pick<_Impl, 'endCalendar'>
|
133
|
+
| Pick<_Impl, 'multiMonth'>
|
134
|
+
| Pick<_Impl, 'minTimeGap'>
|
135
|
+
| Pick<_Impl, 'centuryBreak'>
|
136
|
+
| Pick<_Impl, 'currentCentury'>
|
137
|
+
| Pick<_Impl, 'selectAdjacentDays'>
|
138
|
+
| Pick<_Impl, 'popupOptions'>
|
139
|
+
| Pick<_Impl, 'onBeforeChange'>
|
140
|
+
| Pick<_Impl, 'onChange'>
|
141
|
+
| Pick<_Impl, 'onShow'>
|
142
|
+
| Pick<_Impl, 'onVisible'>
|
143
|
+
| Pick<_Impl, 'onHide'>
|
144
|
+
| Pick<_Impl, 'onHidden'>
|
145
|
+
| Pick<_Impl, 'onSelect'>
|
146
|
+
| Pick<_Impl, 'selector'>
|
147
|
+
| Pick<_Impl, 'className'>
|
148
|
+
| Pick<_Impl, 'regExp'>
|
149
|
+
| Pick<_Impl, 'name'>
|
150
|
+
| Pick<_Impl, 'namespace'>
|
151
|
+
| Pick<_Impl, 'silent'>
|
152
|
+
| Pick<_Impl, 'debug'>
|
153
|
+
| Pick<_Impl, 'performance'>
|
154
|
+
| Pick<_Impl, 'verbose'>
|
155
|
+
| Pick<_Impl, 'error'>
|
156
|
+
) &
|
157
|
+
Partial<Pick<_Impl, keyof _Impl>>;
|
158
|
+
|
159
|
+
interface _Impl {
|
160
|
+
// region Toast Settings
|
161
|
+
|
162
|
+
/**
|
163
|
+
* Picker type, can be 'datetime', 'date', 'time', 'month', or 'year'.
|
164
|
+
*
|
165
|
+
* @default 'datetime'
|
166
|
+
*/
|
167
|
+
type: 'datetime' | 'date' | 'time' | 'month' | 'year';
|
168
|
+
|
169
|
+
/**
|
170
|
+
* Day for first day column (0 = Sunday).
|
171
|
+
*
|
172
|
+
* @default 0
|
173
|
+
*/
|
174
|
+
firstDayOfWeek: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7;
|
175
|
+
|
176
|
+
/**
|
177
|
+
* Add row(s) to shorter months to keep day calendar height consistent (6 rows).
|
178
|
+
*
|
179
|
+
* @default 'true'
|
180
|
+
*/
|
181
|
+
constantHeight: boolean;
|
182
|
+
|
183
|
+
/**
|
184
|
+
* Show a 'today/now' button at the bottom of the calendar.
|
185
|
+
*
|
186
|
+
* @default false
|
187
|
+
*/
|
188
|
+
today: boolean;
|
189
|
+
|
190
|
+
/**
|
191
|
+
* Close the popup after selecting a date/time.
|
192
|
+
*
|
193
|
+
* @default false
|
194
|
+
*/
|
195
|
+
closable: true;
|
196
|
+
|
197
|
+
/**
|
198
|
+
* Month before day when parsing/converting date from/to text.
|
199
|
+
*
|
200
|
+
* @default true
|
201
|
+
*/
|
202
|
+
monthFirst: boolean;
|
203
|
+
|
204
|
+
/**
|
205
|
+
* Set input to readonly on touch devices.
|
206
|
+
*
|
207
|
+
* @default true
|
208
|
+
*/
|
209
|
+
touchReadonly: boolean;
|
210
|
+
|
211
|
+
/**
|
212
|
+
* Create the calendar inline instead of inside a popup.
|
213
|
+
*
|
214
|
+
* @default false
|
215
|
+
*/
|
216
|
+
inline: boolean;
|
217
|
+
|
218
|
+
/**
|
219
|
+
* Display the week number on the left.
|
220
|
+
*
|
221
|
+
* @default false
|
222
|
+
*/
|
223
|
+
showWeekNumbers: boolean;
|
224
|
+
|
225
|
+
/**
|
226
|
+
* Disable some days of the week from selection (0= Sunday, 1=Monday, ...).
|
227
|
+
*
|
228
|
+
* @default []
|
229
|
+
*/
|
230
|
+
disabledDaysOfWeek: number[];
|
231
|
+
|
232
|
+
/**
|
233
|
+
* An array of Date-Objects or Objects with given message to show in a popup when hovering over the appropriate date '{date: Date, message: string}'.
|
234
|
+
*
|
235
|
+
* @default []
|
236
|
+
*/
|
237
|
+
disabledDates: object[];
|
238
|
+
|
239
|
+
/**
|
240
|
+
* An array of Date-Objects to be enabled for selection. All other dates are disabled.
|
241
|
+
*
|
242
|
+
* @default []
|
243
|
+
*/
|
244
|
+
enabledDates: object[];
|
245
|
+
|
246
|
+
/**
|
247
|
+
* An array of Date-Objects or Objects with given message to show in a popup when hovering over the appropriate date
|
248
|
+
* and an individual class for the cell '{date: Date, message: string, class: string}'.
|
249
|
+
*
|
250
|
+
* @default []
|
251
|
+
*/
|
252
|
+
eventDates: object[];
|
253
|
+
|
254
|
+
/**
|
255
|
+
* Default class to be added to each cell of an eventDate date element when no specific class is given to the eventDate element.
|
256
|
+
*
|
257
|
+
* @default 'blue'
|
258
|
+
*/
|
259
|
+
eventClass: string;
|
260
|
+
|
261
|
+
/**
|
262
|
+
* Choose when to show the popup (defaults to 'focus' for input, 'click' for others).
|
263
|
+
*
|
264
|
+
* @default null
|
265
|
+
*/
|
266
|
+
on: null | 'focus' | 'click';
|
267
|
+
|
268
|
+
/**
|
269
|
+
* Date to display initially when no date is selected (null = now).
|
270
|
+
*
|
271
|
+
* @default null
|
272
|
+
*/
|
273
|
+
initialDate: null | Date;
|
274
|
+
|
275
|
+
/**
|
276
|
+
* Display mode to start in, can be 'year', 'month', 'day', 'hour', 'minute' (false = 'day').
|
277
|
+
*
|
278
|
+
* @default false
|
279
|
+
*/
|
280
|
+
startMode: false | 'year' | 'month' | 'day' | 'hour' | 'minute';
|
281
|
+
|
282
|
+
/**
|
283
|
+
* Minimum date/time that can be selected, dates/times before are disabled.
|
284
|
+
*
|
285
|
+
* @default null
|
286
|
+
*/
|
287
|
+
minDate: null | Date;
|
288
|
+
|
289
|
+
/**
|
290
|
+
* Maximum date/time that can be selected, dates/times after are disabled.
|
291
|
+
*
|
292
|
+
* @default null
|
293
|
+
*/
|
294
|
+
maxDate: null | Date;
|
295
|
+
|
296
|
+
/**
|
297
|
+
* Show am/pm in time mode.
|
298
|
+
*
|
299
|
+
* @default true
|
300
|
+
*/
|
301
|
+
ampm: boolean;
|
302
|
+
|
303
|
+
/**
|
304
|
+
* Disable year selection mode.
|
305
|
+
*
|
306
|
+
* @default false
|
307
|
+
*/
|
308
|
+
disableYear: boolean;
|
309
|
+
|
310
|
+
/**
|
311
|
+
* Disable month selection mode.
|
312
|
+
*
|
313
|
+
* @default false
|
314
|
+
*/
|
315
|
+
disableMonth: boolean;
|
316
|
+
|
317
|
+
/**
|
318
|
+
* Disable minute selection mode.
|
319
|
+
*
|
320
|
+
* @default false
|
321
|
+
*/
|
322
|
+
disableMinute: boolean;
|
323
|
+
|
324
|
+
/**
|
325
|
+
* Format the input text upon input blur and module creation.
|
326
|
+
*
|
327
|
+
* @default true
|
328
|
+
*/
|
329
|
+
formatInput: boolean;
|
330
|
+
|
331
|
+
/**
|
332
|
+
* jQuery object or selector for another calendar that represents the start date of a date range.
|
333
|
+
*
|
334
|
+
* @default null
|
335
|
+
*/
|
336
|
+
startCalendar: null | JQuery | string;
|
337
|
+
|
338
|
+
/**
|
339
|
+
* jQuery object or selector for another calendar that represents the end date of a date range.
|
340
|
+
*
|
341
|
+
* @default null
|
342
|
+
*/
|
343
|
+
endCalendar: null | JQuery | string;
|
344
|
+
|
345
|
+
/**
|
346
|
+
* Show multiple months when in 'day' mode.
|
347
|
+
*
|
348
|
+
* @default 1
|
349
|
+
*/
|
350
|
+
multiMonth: number;
|
351
|
+
|
352
|
+
/**
|
353
|
+
* Minimum time gap, can only be 5, 10, 15, 20, 30.
|
354
|
+
*
|
355
|
+
* @default 5
|
356
|
+
*/
|
357
|
+
minTimeGap: 5 | 10 | 15 | 20 | 30;
|
358
|
+
|
359
|
+
/**
|
360
|
+
* Starting short year until 99 where it will be assumed to belong to the last century.
|
361
|
+
*
|
362
|
+
* @default 60
|
363
|
+
*/
|
364
|
+
centuryBreak: number;
|
365
|
+
|
366
|
+
/**
|
367
|
+
* Century to be added to 2-digit years (00 to 'centuryBreak' -1).
|
368
|
+
*
|
369
|
+
* @default 2000
|
370
|
+
*/
|
371
|
+
currentCentury: number;
|
372
|
+
|
373
|
+
/**
|
374
|
+
* Make adjacent days from previous and next month also selectable.
|
375
|
+
*
|
376
|
+
* @default false
|
377
|
+
*/
|
378
|
+
selectAdjacentDays: 5 | 10 | 15 | 20 | 30;
|
379
|
+
|
380
|
+
popupOptions: Calendar.PopupSettings;
|
381
|
+
|
382
|
+
text: Calendar.TextSettings;
|
383
|
+
|
384
|
+
// endregion
|
385
|
+
|
386
|
+
// region Callbacks
|
387
|
+
|
388
|
+
/**
|
389
|
+
* Is called before a calendar date changes. 'return false;' will cancel the change.
|
390
|
+
* @since 2.8.0
|
391
|
+
*/
|
392
|
+
onBeforeChange(this: JQuery): void;
|
393
|
+
|
394
|
+
/**
|
395
|
+
* Is called after a calendar date has changed.
|
396
|
+
*/
|
397
|
+
onChange(this: JQuery): void;
|
398
|
+
|
399
|
+
/**
|
400
|
+
* Is called before a calendar is shown. 'return false;' will prevent the calendar to be shown.
|
401
|
+
*/
|
402
|
+
onShow(this: JQuery): void;
|
403
|
+
|
404
|
+
/**
|
405
|
+
* Is called when the calendar is shown.
|
406
|
+
*/
|
407
|
+
onVisible(this: JQuery): void;
|
408
|
+
|
409
|
+
/**
|
410
|
+
* Is called before a calendar is hidden. 'return false;' will prevent the calendar to be hidden.
|
411
|
+
*/
|
412
|
+
onHide(this: JQuery): void;
|
413
|
+
|
414
|
+
/**
|
415
|
+
* Is called when the calendar is hidden.
|
416
|
+
*/
|
417
|
+
onHidden(this: JQuery): void;
|
418
|
+
|
419
|
+
/**
|
420
|
+
* Is called when a cell of the calendar is selected providing its value and current mode.
|
421
|
+
* 'return false;' will prevent the selection.
|
422
|
+
*/
|
423
|
+
onSelect(this: JQuery, date: Date, mode: string): void;
|
424
|
+
|
425
|
+
// endregion
|
426
|
+
|
427
|
+
// region DOM Settings
|
428
|
+
|
429
|
+
/**
|
430
|
+
* DOM Selectors used internally.
|
431
|
+
* If the calendars parent node matches the append selector, the calendar is appended to the input field instead of prepended.
|
432
|
+
*/
|
433
|
+
selector: Calendar.SelectorSettings;
|
434
|
+
|
435
|
+
/**
|
436
|
+
* Class names used to attach style to state.
|
437
|
+
*/
|
438
|
+
className: Calendar.ClassNameSettings;
|
439
|
+
|
440
|
+
/**
|
441
|
+
* Icon names used internally.
|
442
|
+
*/
|
443
|
+
regExp: Calendar.RegExpSettings;
|
444
|
+
|
445
|
+
metadata: Calendar.MetadataSettings;
|
446
|
+
|
447
|
+
// endregion
|
448
|
+
|
449
|
+
// region Debug Settings
|
450
|
+
|
451
|
+
/**
|
452
|
+
* Name used in log statements
|
453
|
+
*/
|
454
|
+
name: string;
|
455
|
+
|
456
|
+
/**
|
457
|
+
* Event namespace. Makes sure module teardown does not effect other events attached to an element.
|
458
|
+
*/
|
459
|
+
namespace: string;
|
460
|
+
|
461
|
+
/**
|
462
|
+
* Silences all console output including error messages, regardless of other debug settings.
|
463
|
+
*/
|
464
|
+
silent: boolean;
|
465
|
+
|
466
|
+
/**
|
467
|
+
* Debug output to console
|
468
|
+
*/
|
469
|
+
debug: boolean;
|
470
|
+
|
471
|
+
/**
|
472
|
+
* Show console.table output with performance metrics
|
473
|
+
*/
|
474
|
+
performance: boolean;
|
475
|
+
|
476
|
+
/**
|
477
|
+
* Debug output includes all internal behaviors
|
478
|
+
*/
|
479
|
+
verbose: boolean;
|
480
|
+
|
481
|
+
error: Calendar.ErrorSettings;
|
482
|
+
|
483
|
+
// endregion
|
484
|
+
}
|
485
|
+
}
|
486
|
+
|
487
|
+
namespace Calendar {
|
488
|
+
type PopupSettings = PopupSettings.Param;
|
489
|
+
|
490
|
+
namespace PopupSettings {
|
491
|
+
type Param = (
|
492
|
+
| Pick<_Impl, 'position'>
|
493
|
+
| Pick<_Impl, 'lastResort'>
|
494
|
+
| Pick<_Impl, 'prefer'>
|
495
|
+
| Pick<_Impl, 'hideOnScroll'>
|
496
|
+
) &
|
497
|
+
Partial<Pick<_Impl, keyof _Impl>>;
|
498
|
+
|
499
|
+
interface _Impl {
|
500
|
+
/**
|
501
|
+
* @default 'bottom left'
|
502
|
+
*/
|
503
|
+
position: string;
|
504
|
+
|
505
|
+
/**
|
506
|
+
* @default 'bottom left'
|
507
|
+
*/
|
508
|
+
lastResort: string;
|
509
|
+
|
510
|
+
/**
|
511
|
+
* @default 'opposite'
|
512
|
+
*/
|
513
|
+
prefer: string;
|
514
|
+
|
515
|
+
/**
|
516
|
+
* @default false
|
517
|
+
*/
|
518
|
+
hideOnScroll: boolean;
|
519
|
+
}
|
520
|
+
}
|
521
|
+
|
522
|
+
type TextSettings = TextSettings.Param;
|
523
|
+
|
524
|
+
namespace TextSettings {
|
525
|
+
type Param = (
|
526
|
+
| Pick<_Impl, 'days'>
|
527
|
+
| Pick<_Impl, 'months'>
|
528
|
+
| Pick<_Impl, 'monthsShort'>
|
529
|
+
| Pick<_Impl, 'today'>
|
530
|
+
| Pick<_Impl, 'now'>
|
531
|
+
| Pick<_Impl, 'am'>
|
532
|
+
| Pick<_Impl, 'pm'>
|
533
|
+
) &
|
534
|
+
Partial<Pick<_Impl, keyof _Impl>>;
|
535
|
+
|
536
|
+
interface _Impl {
|
537
|
+
/**
|
538
|
+
* @default ['S', 'M', 'T', 'W', 'T', 'F', 'S']
|
539
|
+
*/
|
540
|
+
days: string[];
|
541
|
+
|
542
|
+
/**
|
543
|
+
* @default ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
|
544
|
+
*/
|
545
|
+
months: string[];
|
546
|
+
|
547
|
+
/**
|
548
|
+
* @default ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
|
549
|
+
*/
|
550
|
+
monthsShort: string[];
|
551
|
+
|
552
|
+
/**
|
553
|
+
* @default 'Today'
|
554
|
+
*/
|
555
|
+
today: string;
|
556
|
+
|
557
|
+
/**
|
558
|
+
* @default 'Now'
|
559
|
+
*/
|
560
|
+
now: string;
|
561
|
+
|
562
|
+
/**
|
563
|
+
* @default 'AM'
|
564
|
+
*/
|
565
|
+
am: string;
|
566
|
+
|
567
|
+
/**
|
568
|
+
* @default 'PM'
|
569
|
+
*/
|
570
|
+
pm: boolean;
|
571
|
+
}
|
572
|
+
}
|
573
|
+
|
574
|
+
type SelectorSettings = SelectorSettings.Param;
|
575
|
+
|
576
|
+
namespace SelectorSettings {
|
577
|
+
type Param = (
|
578
|
+
| Pick<_Impl, 'popup'>
|
579
|
+
| Pick<_Impl, 'input'>
|
580
|
+
| Pick<_Impl, 'activator'>
|
581
|
+
| Pick<_Impl, 'append'>
|
582
|
+
) &
|
583
|
+
Partial<Pick<_Impl, keyof _Impl>>;
|
584
|
+
|
585
|
+
interface _Impl {
|
586
|
+
/**
|
587
|
+
* @default '.ui.popup'
|
588
|
+
*/
|
589
|
+
popup: string;
|
590
|
+
|
591
|
+
/**
|
592
|
+
* @default 'input'
|
593
|
+
*/
|
594
|
+
input: string;
|
595
|
+
|
596
|
+
/**
|
597
|
+
* @default 'input'
|
598
|
+
*/
|
599
|
+
activator: string;
|
600
|
+
|
601
|
+
/**
|
602
|
+
* @default '.inline.field,.inline.fields'
|
603
|
+
*/
|
604
|
+
append: string;
|
605
|
+
}
|
606
|
+
}
|
607
|
+
|
608
|
+
type ClassNameSettings = ClassNameSettings.Param;
|
609
|
+
|
610
|
+
namespace ClassNameSettings {
|
611
|
+
type Param = (
|
612
|
+
| Pick<_Impl, 'calendar'>
|
613
|
+
| Pick<_Impl, 'active'>
|
614
|
+
| Pick<_Impl, 'popup'>
|
615
|
+
| Pick<_Impl, 'grid'>
|
616
|
+
| Pick<_Impl, 'column'>
|
617
|
+
| Pick<_Impl, 'table'>
|
618
|
+
| Pick<_Impl, 'prev'>
|
619
|
+
| Pick<_Impl, 'next'>
|
620
|
+
| Pick<_Impl, 'prevIcon'>
|
621
|
+
| Pick<_Impl, 'nextIcon'>
|
622
|
+
| Pick<_Impl, 'link'>
|
623
|
+
| Pick<_Impl, 'cell'>
|
624
|
+
| Pick<_Impl, 'disabledCell'>
|
625
|
+
| Pick<_Impl, 'weekCell'>
|
626
|
+
| Pick<_Impl, 'adjacentCell'>
|
627
|
+
| Pick<_Impl, 'activeCell'>
|
628
|
+
| Pick<_Impl, 'rangeCell'>
|
629
|
+
| Pick<_Impl, 'focusCell'>
|
630
|
+
| Pick<_Impl, 'todayCell'>
|
631
|
+
| Pick<_Impl, 'today'>
|
632
|
+
) &
|
633
|
+
Partial<Pick<_Impl, keyof _Impl>>;
|
634
|
+
|
635
|
+
interface _Impl {
|
636
|
+
/**
|
637
|
+
* @default 'calendar'
|
638
|
+
*/
|
639
|
+
calendar: string;
|
640
|
+
|
641
|
+
/**
|
642
|
+
* @default 'active'
|
643
|
+
*/
|
644
|
+
active: string;
|
645
|
+
|
646
|
+
/**
|
647
|
+
* @default 'ui popup'
|
648
|
+
*/
|
649
|
+
popup: string;
|
650
|
+
|
651
|
+
/**
|
652
|
+
* @default 'ui equal width grid'
|
653
|
+
*/
|
654
|
+
grid: string;
|
655
|
+
|
656
|
+
/**
|
657
|
+
* @default 'column'
|
658
|
+
*/
|
659
|
+
column: string;
|
660
|
+
|
661
|
+
/**
|
662
|
+
* @default 'ui celled center aligned unstackable table'
|
663
|
+
*/
|
664
|
+
table: string;
|
665
|
+
|
666
|
+
/**
|
667
|
+
* @default 'prev link'
|
668
|
+
*/
|
669
|
+
prev: string;
|
670
|
+
|
671
|
+
/**
|
672
|
+
* @default 'next link'
|
673
|
+
*/
|
674
|
+
next: string;
|
675
|
+
|
676
|
+
/**
|
677
|
+
* @default 'chevron left icon'
|
678
|
+
*/
|
679
|
+
prevIcon: string;
|
680
|
+
|
681
|
+
/**
|
682
|
+
* @default 'chevron right icon'
|
683
|
+
*/
|
684
|
+
nextIcon: string;
|
685
|
+
|
686
|
+
/**
|
687
|
+
* @default 'link'
|
688
|
+
*/
|
689
|
+
link: string;
|
690
|
+
|
691
|
+
/**
|
692
|
+
* @default 'link'
|
693
|
+
*/
|
694
|
+
cell: string;
|
695
|
+
|
696
|
+
/**
|
697
|
+
* @default 'disabled'
|
698
|
+
*/
|
699
|
+
disabledCell: string;
|
700
|
+
|
701
|
+
/**
|
702
|
+
* @default 'disabled'
|
703
|
+
*/
|
704
|
+
weekCell: string;
|
705
|
+
|
706
|
+
/**
|
707
|
+
* @default 'adjacent'
|
708
|
+
*/
|
709
|
+
adjacentCell: string;
|
710
|
+
|
711
|
+
/**
|
712
|
+
* @default 'active'
|
713
|
+
*/
|
714
|
+
activeCell: string;
|
715
|
+
|
716
|
+
/**
|
717
|
+
* @default 'range'
|
718
|
+
*/
|
719
|
+
rangeCell: string;
|
720
|
+
|
721
|
+
/**
|
722
|
+
* @default 'focus'
|
723
|
+
*/
|
724
|
+
focusCell: string;
|
725
|
+
|
726
|
+
/**
|
727
|
+
* @default 'today'
|
728
|
+
*/
|
729
|
+
todayCell: string;
|
730
|
+
|
731
|
+
/**
|
732
|
+
* @default 'today link'
|
733
|
+
*/
|
734
|
+
today: string;
|
735
|
+
}
|
736
|
+
}
|
737
|
+
|
738
|
+
type RegExpSettings = RegExpSettings.Param;
|
739
|
+
|
740
|
+
namespace RegExpSettings {
|
741
|
+
type Param = (Pick<_Impl, 'dateWords'> | Pick<_Impl, 'dateNumbers'>) & Partial<Pick<_Impl, keyof _Impl>>;
|
742
|
+
|
743
|
+
interface _Impl {
|
744
|
+
/**
|
745
|
+
* @default /[^A-Za-z\u00C0-\u024F]+/g
|
746
|
+
*/
|
747
|
+
dateWords: RegExp;
|
748
|
+
|
749
|
+
/**
|
750
|
+
* @default /[^\d:]+/g
|
751
|
+
*/
|
752
|
+
dateNumbers: RegExp;
|
753
|
+
}
|
754
|
+
}
|
755
|
+
|
756
|
+
type MetadataSettings = MetadataSettings.Param;
|
757
|
+
|
758
|
+
namespace MetadataSettings {
|
759
|
+
type Param = (
|
760
|
+
| Pick<_Impl, 'date'>
|
761
|
+
| Pick<_Impl, 'focusDate'>
|
762
|
+
| Pick<_Impl, 'startDate'>
|
763
|
+
| Pick<_Impl, 'endDate'>
|
764
|
+
| Pick<_Impl, 'mode'>
|
765
|
+
| Pick<_Impl, 'monthOffset'>
|
766
|
+
) &
|
767
|
+
Partial<Pick<_Impl, keyof _Impl>>;
|
768
|
+
|
769
|
+
interface _Impl {
|
770
|
+
/**
|
771
|
+
* @default 'date'
|
772
|
+
*/
|
773
|
+
date: string;
|
774
|
+
|
775
|
+
/**
|
776
|
+
* @default 'focusDate'
|
777
|
+
*/
|
778
|
+
focusDate: string;
|
779
|
+
|
780
|
+
/**
|
781
|
+
* @default 'startDate'
|
782
|
+
*/
|
783
|
+
startDate: string;
|
784
|
+
|
785
|
+
/**
|
786
|
+
* @default 'endDate'
|
787
|
+
*/
|
788
|
+
endDate: string;
|
789
|
+
|
790
|
+
/**
|
791
|
+
* @default 'mode'
|
792
|
+
*/
|
793
|
+
mode: string;
|
794
|
+
|
795
|
+
/**
|
796
|
+
* @default 'monthOffset'
|
797
|
+
*/
|
798
|
+
monthOffset: string;
|
799
|
+
}
|
800
|
+
}
|
801
|
+
|
802
|
+
type ErrorSettings = ErrorSettings.Param;
|
803
|
+
|
804
|
+
namespace ErrorSettings {
|
805
|
+
type Param = (Pick<_Impl, 'popup'> | Pick<_Impl, 'method'>) & Partial<Pick<_Impl, keyof _Impl>>;
|
806
|
+
|
807
|
+
interface _Impl {
|
808
|
+
/**
|
809
|
+
* @default 'UI Popup, a required component is not included in this page.'
|
810
|
+
*/
|
811
|
+
popup: string;
|
812
|
+
|
813
|
+
/**
|
814
|
+
* @default 'The method you called is not defined.'
|
815
|
+
*/
|
816
|
+
method: string;
|
817
|
+
}
|
818
|
+
}
|
819
|
+
}
|
820
|
+
}
|