domma-js 1.1.0 → 1.2.0
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/README.md +6 -0
- package/assets/types/catalogue.json +29 -29
- package/assets/types/generated/public/assets/icons/code.d.ts +236 -1
- package/assets/types/generated/src/auth.d.ts +38 -38
- package/assets/types/generated/src/avatar.d.ts +31 -31
- package/assets/types/generated/src/binding-source.d.ts +3 -3
- package/assets/types/generated/src/component-factory.d.ts +15 -15
- package/assets/types/generated/src/component.d.ts +4 -4
- package/assets/types/generated/src/components/back-to-top.d.ts +18 -18
- package/assets/types/generated/src/components/badge.d.ts +26 -26
- package/assets/types/generated/src/components/card.d.ts +30 -30
- package/assets/types/generated/src/components/command-palette.d.ts +69 -69
- package/assets/types/generated/src/components/dropzone.d.ts +54 -54
- package/assets/types/generated/src/components/focus-trap.d.ts +22 -22
- package/assets/types/generated/src/components/loader.d.ts +15 -15
- package/assets/types/generated/src/components/modal.d.ts +59 -59
- package/assets/types/generated/src/components/range-slider.d.ts +54 -54
- package/assets/types/generated/src/components/shared.d.ts +1 -1
- package/assets/types/generated/src/components/split-pane.d.ts +45 -45
- package/assets/types/generated/src/components/toast.d.ts +38 -38
- package/assets/types/generated/src/components/tooltip.d.ts +24 -24
- package/assets/types/generated/src/components/virtual-list.d.ts +61 -61
- package/assets/types/generated/src/config.d.ts +21 -21
- package/assets/types/generated/src/context-cursor.d.ts +6 -6
- package/assets/types/generated/src/context-menu.d.ts +72 -72
- package/assets/types/generated/src/dom.d.ts +12 -12
- package/assets/types/generated/src/effects.d.ts +154 -141
- package/assets/types/generated/src/elements.d.ts +644 -644
- package/assets/types/generated/src/flags.d.ts +38 -38
- package/assets/types/generated/src/forms.d.ts +100 -100
- package/assets/types/generated/src/globals.d.ts +6 -6
- package/assets/types/generated/src/http.d.ts +12 -12
- package/assets/types/generated/src/i18n.d.ts +8 -8
- package/assets/types/generated/src/icons.d.ts +13 -13
- package/assets/types/generated/src/index.d.ts +10 -10
- package/assets/types/generated/src/input-group.d.ts +21 -21
- package/assets/types/generated/src/models.d.ts +21 -21
- package/assets/types/generated/src/popover.d.ts +45 -45
- package/assets/types/generated/src/router.d.ts +30 -30
- package/assets/types/generated/src/sanitize.d.ts +13 -5
- package/assets/types/generated/src/schema-builder.d.ts +34 -34
- package/assets/types/generated/src/skeleton.d.ts +11 -11
- package/assets/types/generated/src/sortable.d.ts +46 -46
- package/assets/types/generated/src/tables.d.ts +75 -75
- package/assets/types/generated/src/theme.d.ts +8 -8
- package/assets/types/generated/src/treeview.d.ts +48 -48
- package/assets/types/generated/src/utils.d.ts +13 -13
- package/assets/types/generated/vendor/domma-reactive.d.ts +2 -2
- package/package.json +22 -16
- package/public/dist/bundles/domma-complete.css +53 -14
- package/public/dist/bundles/domma-data-focused.css +53 -14
- package/public/dist/bundles/domma-essentials.css +53 -14
- package/public/dist/bundles/domma-full.css +53 -14
- package/public/dist/bundles/domma-minimal.css +47 -8
- package/public/dist/domma-flags.esm.js +3 -3
- package/public/dist/domma-flags.min.js +3 -3
- package/public/dist/domma-syntax.min.js +3 -3
- package/public/dist/domma.css +42 -3
- package/public/dist/domma.esm.js +4 -4
- package/public/dist/domma.esm.js.map +1 -1
- package/public/dist/domma.min.js +4 -4
- package/public/dist/domma.min.js.map +1 -1
- package/public/dist/elements.css +3 -3
- package/public/dist/grid.css +3 -3
- package/public/dist/syntax.css +3 -3
- package/public/dist/themes/domma-themes.css +3 -3
|
@@ -70,7 +70,7 @@ export class Modal extends Component {
|
|
|
70
70
|
title: string;
|
|
71
71
|
content: string;
|
|
72
72
|
footer: string;
|
|
73
|
-
buttons:
|
|
73
|
+
buttons: never[];
|
|
74
74
|
safe: boolean;
|
|
75
75
|
className: string;
|
|
76
76
|
headerClass: string;
|
|
@@ -80,13 +80,13 @@ export class Modal extends Component {
|
|
|
80
80
|
trapFocus: boolean;
|
|
81
81
|
returnFocus: boolean;
|
|
82
82
|
visible: boolean;
|
|
83
|
-
onOpen:
|
|
84
|
-
onOpened:
|
|
85
|
-
onClose:
|
|
86
|
-
onClosed:
|
|
87
|
-
onBeforeOpen:
|
|
88
|
-
onBeforeClose:
|
|
89
|
-
onButtonClick:
|
|
83
|
+
onOpen: null;
|
|
84
|
+
onOpened: null;
|
|
85
|
+
onClose: null;
|
|
86
|
+
onClosed: null;
|
|
87
|
+
onBeforeOpen: null;
|
|
88
|
+
onBeforeClose: null;
|
|
89
|
+
onButtonClick: null;
|
|
90
90
|
};
|
|
91
91
|
/**
|
|
92
92
|
* @param {import('./shared.js').ComponentTarget} selector - the element to make a modal; null makes one
|
|
@@ -96,30 +96,30 @@ export class Modal extends Component {
|
|
|
96
96
|
_factoryMade: boolean;
|
|
97
97
|
_isOpen: boolean;
|
|
98
98
|
_timers: any[];
|
|
99
|
-
_restoreFocus: Element;
|
|
99
|
+
_restoreFocus: Element | null;
|
|
100
100
|
_given: ModalOptions;
|
|
101
101
|
_init(): void;
|
|
102
|
-
_authored: boolean;
|
|
103
|
-
_host: HTMLElement | HTMLDivElement;
|
|
104
|
-
_addedClasses: string[];
|
|
105
|
-
_addedAttrs: any[];
|
|
102
|
+
_authored: boolean | undefined;
|
|
103
|
+
_host: HTMLElement | HTMLDivElement | null | undefined;
|
|
104
|
+
_addedClasses: string[] | undefined;
|
|
105
|
+
_addedAttrs: any[] | undefined;
|
|
106
106
|
/** Whether this open traps focus: on by default, except over a page left usable (no backdrop). */
|
|
107
107
|
_wantsTrap(): boolean;
|
|
108
108
|
_startTrap(): void;
|
|
109
|
-
_trap: FocusTrap;
|
|
109
|
+
_trap: FocusTrap | null | undefined;
|
|
110
110
|
/** Options the caller passed, without the defaults. */
|
|
111
111
|
_givenOptions(): ModalOptions;
|
|
112
112
|
_render(): void;
|
|
113
|
-
_backdrop: HTMLDivElement;
|
|
114
|
-
_dialog: HTMLDivElement;
|
|
115
|
-
_titleEl: HTMLHeadingElement;
|
|
116
|
-
_header: HTMLDivElement;
|
|
117
|
-
_body: HTMLDivElement;
|
|
118
|
-
_footer: HTMLDivElement;
|
|
119
|
-
_footerText: HTMLSpanElement;
|
|
113
|
+
_backdrop: HTMLDivElement | null | undefined;
|
|
114
|
+
_dialog: HTMLDivElement | undefined;
|
|
115
|
+
_titleEl: HTMLHeadingElement | undefined;
|
|
116
|
+
_header: HTMLDivElement | undefined;
|
|
117
|
+
_body: HTMLDivElement | undefined;
|
|
118
|
+
_footer: HTMLDivElement | undefined;
|
|
119
|
+
_footerText: HTMLSpanElement | null | undefined;
|
|
120
120
|
_renderButtons(): void;
|
|
121
121
|
_bind(): void;
|
|
122
|
-
_downOnBackdrop: boolean;
|
|
122
|
+
_downOnBackdrop: boolean | undefined;
|
|
123
123
|
/** A node is ours unless it sits inside another modal nested in this one. */
|
|
124
124
|
_ownsNode(node: any): boolean;
|
|
125
125
|
_later(fn: any, ms: any): void;
|
|
@@ -178,7 +178,7 @@ export class Modal extends Component {
|
|
|
178
178
|
*/
|
|
179
179
|
setButtons(buttons: ModalButton[] | null): this;
|
|
180
180
|
_applyOptions(): void;
|
|
181
|
-
_destroyed: boolean;
|
|
181
|
+
_destroyed: boolean | undefined;
|
|
182
182
|
/**
|
|
183
183
|
* Permanent alias of destroy().
|
|
184
184
|
* @returns {void}
|
|
@@ -193,146 +193,146 @@ export type ModalButton = {
|
|
|
193
193
|
/**
|
|
194
194
|
* - Passed to onButtonClick (default `btn-<index>`)
|
|
195
195
|
*/
|
|
196
|
-
id?: string;
|
|
196
|
+
id?: string | undefined;
|
|
197
197
|
/**
|
|
198
198
|
* - Label
|
|
199
199
|
*/
|
|
200
|
-
text?: string;
|
|
200
|
+
text?: string | undefined;
|
|
201
201
|
/**
|
|
202
202
|
* - Adds `btn-<variant>`
|
|
203
203
|
*/
|
|
204
|
-
variant?: string;
|
|
204
|
+
variant?: string | undefined;
|
|
205
205
|
/**
|
|
206
206
|
* - Extra classes
|
|
207
207
|
*/
|
|
208
|
-
className?: string;
|
|
208
|
+
className?: string | undefined;
|
|
209
209
|
/**
|
|
210
210
|
* - false keeps the modal open after the click
|
|
211
211
|
*/
|
|
212
|
-
close?: boolean;
|
|
213
|
-
onClick?: (modal: ModalInstance, event: MouseEvent) => void;
|
|
212
|
+
close?: boolean | undefined;
|
|
213
|
+
onClick?: ((modal: ModalInstance, event: MouseEvent) => void) | undefined;
|
|
214
214
|
};
|
|
215
215
|
export type ModalOptions = {
|
|
216
216
|
/**
|
|
217
217
|
* - Show backdrop overlay
|
|
218
218
|
*/
|
|
219
|
-
backdrop?: boolean;
|
|
219
|
+
backdrop?: boolean | undefined;
|
|
220
220
|
/**
|
|
221
221
|
* - Close modal when clicking backdrop
|
|
222
222
|
*/
|
|
223
|
-
backdropClose?: boolean;
|
|
223
|
+
backdropClose?: boolean | undefined;
|
|
224
224
|
/**
|
|
225
225
|
* - Close modal on Escape key
|
|
226
226
|
*/
|
|
227
|
-
keyboard?: boolean;
|
|
227
|
+
keyboard?: boolean | undefined;
|
|
228
228
|
/**
|
|
229
229
|
* - Same as `keyboard`; either false keeps Escape from closing
|
|
230
230
|
*/
|
|
231
|
-
closeOnEscape?: boolean;
|
|
231
|
+
closeOnEscape?: boolean | undefined;
|
|
232
232
|
/**
|
|
233
233
|
* - Animation type
|
|
234
234
|
*/
|
|
235
|
-
animation?: import("../elements.js").AnimationType |
|
|
235
|
+
animation?: false | import("../elements.js").AnimationType | undefined;
|
|
236
236
|
/**
|
|
237
237
|
* - Animation duration in ms
|
|
238
238
|
*/
|
|
239
|
-
animationDuration?: number;
|
|
239
|
+
animationDuration?: number | undefined;
|
|
240
240
|
/**
|
|
241
241
|
* - Show close button
|
|
242
242
|
*/
|
|
243
|
-
closeButton?: boolean;
|
|
243
|
+
closeButton?: boolean | undefined;
|
|
244
244
|
/**
|
|
245
245
|
* - A named size or any CSS width (the factory's default is 'large')
|
|
246
246
|
*/
|
|
247
|
-
size?: "small" | "sm" | "
|
|
247
|
+
size?: (string & {}) | "small" | "sm" | "md" | "lg" | "xl" | "medium" | "large" | "xlarge" | "full" | undefined;
|
|
248
248
|
/**
|
|
249
249
|
* - Centre vertically (false: near the top)
|
|
250
250
|
*/
|
|
251
|
-
centered?: boolean;
|
|
251
|
+
centered?: boolean | undefined;
|
|
252
252
|
/**
|
|
253
253
|
* - Scroll the body inside a capped height
|
|
254
254
|
*/
|
|
255
|
-
scrollable?: boolean;
|
|
255
|
+
scrollable?: boolean | undefined;
|
|
256
256
|
/**
|
|
257
257
|
* - Title text
|
|
258
258
|
*/
|
|
259
|
-
title?: string;
|
|
259
|
+
title?: string | undefined;
|
|
260
260
|
/**
|
|
261
261
|
* - Body content (factory mode): HTML (sanitised unless `safe: false`) or a Node
|
|
262
262
|
*/
|
|
263
|
-
content?: string | Node;
|
|
263
|
+
content?: string | Node | undefined;
|
|
264
264
|
/**
|
|
265
265
|
* - Footer text
|
|
266
266
|
*/
|
|
267
|
-
footer?: string;
|
|
267
|
+
footer?: string | undefined;
|
|
268
268
|
/**
|
|
269
269
|
* - Footer buttons (the factory's default is one Close button)
|
|
270
270
|
*/
|
|
271
|
-
buttons?: ModalButton[];
|
|
271
|
+
buttons?: ModalButton[] | undefined;
|
|
272
272
|
/**
|
|
273
273
|
* - false: content is trusted HTML (not sanitised)
|
|
274
274
|
*/
|
|
275
|
-
safe?: boolean;
|
|
275
|
+
safe?: boolean | undefined;
|
|
276
276
|
/**
|
|
277
277
|
* - Extra classes on the dialog
|
|
278
278
|
*/
|
|
279
|
-
className?: string;
|
|
279
|
+
className?: string | undefined;
|
|
280
280
|
/**
|
|
281
281
|
* - Extra classes on the header
|
|
282
282
|
*/
|
|
283
|
-
headerClass?: string;
|
|
283
|
+
headerClass?: string | undefined;
|
|
284
284
|
/**
|
|
285
285
|
* - Extra classes on the body
|
|
286
286
|
*/
|
|
287
|
-
bodyClass?: string;
|
|
287
|
+
bodyClass?: string | undefined;
|
|
288
288
|
/**
|
|
289
289
|
* - Extra classes on the footer
|
|
290
290
|
*/
|
|
291
|
-
footerClass?: string;
|
|
291
|
+
footerClass?: string | undefined;
|
|
292
292
|
/**
|
|
293
293
|
* - Focus the dialog on open
|
|
294
294
|
*/
|
|
295
|
-
focus?: boolean;
|
|
295
|
+
focus?: boolean | undefined;
|
|
296
296
|
/**
|
|
297
297
|
* - Keep Tab inside while open (default true; false without a backdrop unless given)
|
|
298
298
|
*/
|
|
299
|
-
trapFocus?: boolean;
|
|
299
|
+
trapFocus?: boolean | undefined;
|
|
300
300
|
/**
|
|
301
301
|
* - Put focus back where it was on close
|
|
302
302
|
*/
|
|
303
|
-
returnFocus?: boolean;
|
|
303
|
+
returnFocus?: boolean | undefined;
|
|
304
304
|
/**
|
|
305
305
|
* - Open at once
|
|
306
306
|
*/
|
|
307
|
-
visible?: boolean;
|
|
307
|
+
visible?: boolean | undefined;
|
|
308
308
|
/**
|
|
309
309
|
* - When opening starts
|
|
310
310
|
*/
|
|
311
|
-
onOpen?: ((modal: ModalInstance) => void) | null;
|
|
311
|
+
onOpen?: ((modal: ModalInstance) => void) | null | undefined;
|
|
312
312
|
/**
|
|
313
313
|
* - After open animation completes
|
|
314
314
|
*/
|
|
315
|
-
onOpened?: ((modal: ModalInstance) => void) | null;
|
|
315
|
+
onOpened?: ((modal: ModalInstance) => void) | null | undefined;
|
|
316
316
|
/**
|
|
317
317
|
* - When closing starts
|
|
318
318
|
*/
|
|
319
|
-
onClose?: ((modal: ModalInstance) => void) | null;
|
|
319
|
+
onClose?: ((modal: ModalInstance) => void) | null | undefined;
|
|
320
320
|
/**
|
|
321
321
|
* - After close animation completes
|
|
322
322
|
*/
|
|
323
|
-
onClosed?: ((modal: ModalInstance) => void) | null;
|
|
323
|
+
onClosed?: ((modal: ModalInstance) => void) | null | undefined;
|
|
324
324
|
/**
|
|
325
325
|
* - Return false to refuse the open
|
|
326
326
|
*/
|
|
327
|
-
onBeforeOpen?: ((modal: ModalInstance) => boolean | void) | null;
|
|
327
|
+
onBeforeOpen?: ((modal: ModalInstance) => boolean | void) | null | undefined;
|
|
328
328
|
/**
|
|
329
329
|
* - Return false to refuse the close
|
|
330
330
|
*/
|
|
331
|
-
onBeforeClose?: ((modal: ModalInstance) => boolean | void) | null;
|
|
331
|
+
onBeforeClose?: ((modal: ModalInstance) => boolean | void) | null | undefined;
|
|
332
332
|
/**
|
|
333
333
|
* - A footer button was clicked
|
|
334
334
|
*/
|
|
335
|
-
onButtonClick?: ((buttonId: string, modal: ModalInstance) => void) | null;
|
|
335
|
+
onButtonClick?: ((buttonId: string, modal: ModalInstance) => void) | null | undefined;
|
|
336
336
|
};
|
|
337
337
|
export type ModalInstance = Modal;
|
|
338
338
|
import Component from '../component.js';
|
|
@@ -53,21 +53,21 @@ export class RangeSlider extends Component {
|
|
|
53
53
|
* @param {RangeSliderOptions} [options]
|
|
54
54
|
*/
|
|
55
55
|
constructor(element: string | Element | null, options?: RangeSliderOptions);
|
|
56
|
-
_isInput: boolean;
|
|
57
|
-
_made: any[];
|
|
58
|
-
_hooked: any[];
|
|
59
|
-
_dispatching: boolean;
|
|
56
|
+
_isInput: boolean | undefined;
|
|
57
|
+
_made: any[] | undefined;
|
|
58
|
+
_hooked: any[] | undefined;
|
|
59
|
+
_dispatching: boolean | undefined;
|
|
60
60
|
_drag: {
|
|
61
61
|
index: number;
|
|
62
62
|
pointerId: any;
|
|
63
63
|
start: number[];
|
|
64
|
-
};
|
|
65
|
-
_timers: any[];
|
|
66
|
-
_values: number[];
|
|
64
|
+
} | null;
|
|
65
|
+
_timers: any[] | undefined;
|
|
66
|
+
_values: number[] | undefined;
|
|
67
67
|
get _min(): number;
|
|
68
68
|
get _max(): number;
|
|
69
69
|
/** The step used to snap values; null for step 'any'. */
|
|
70
|
-
get _step(): number;
|
|
70
|
+
get _step(): number | null;
|
|
71
71
|
/** The step the arrow keys move by. */
|
|
72
72
|
get _keyStep(): number;
|
|
73
73
|
/** Snap to the step grid (counted from min, as a native range input does) and clamp. */
|
|
@@ -81,18 +81,18 @@ export class RangeSlider extends Component {
|
|
|
81
81
|
get _vertical(): boolean;
|
|
82
82
|
get _rtl(): boolean;
|
|
83
83
|
_setupInputs(): void;
|
|
84
|
-
_inputs: HTMLElement[];
|
|
84
|
+
_inputs: (HTMLElement | null)[] | null | undefined;
|
|
85
85
|
_restore: {
|
|
86
|
-
name: string;
|
|
87
|
-
hidden: boolean;
|
|
88
|
-
tabindex: string;
|
|
89
|
-
ariaHidden: string;
|
|
90
|
-
min: string;
|
|
91
|
-
max: string;
|
|
92
|
-
step: string;
|
|
93
|
-
disabled: string;
|
|
94
|
-
value: string;
|
|
95
|
-
};
|
|
86
|
+
name: string | null;
|
|
87
|
+
hidden: boolean | "until-found";
|
|
88
|
+
tabindex: string | null;
|
|
89
|
+
ariaHidden: string | null;
|
|
90
|
+
min: string | null;
|
|
91
|
+
max: string | null;
|
|
92
|
+
step: string | null;
|
|
93
|
+
disabled: string | null;
|
|
94
|
+
value: string | null;
|
|
95
|
+
} | undefined;
|
|
96
96
|
_syncInputAttrs(): void;
|
|
97
97
|
/**
|
|
98
98
|
* Code (or M.bind, which writes `input.value`) setting a value programmatically fires
|
|
@@ -102,7 +102,7 @@ export class RangeSlider extends Component {
|
|
|
102
102
|
_hookValues(): void;
|
|
103
103
|
/** Push the current values into the real inputs. */
|
|
104
104
|
_writeInputs(): void;
|
|
105
|
-
_writing: boolean;
|
|
105
|
+
_writing: boolean | undefined;
|
|
106
106
|
/**
|
|
107
107
|
* A form reset returns each input to its value attribute. Inputs this component made,
|
|
108
108
|
* and a caller's input without one, would reset to the midpoint - give them the
|
|
@@ -112,25 +112,25 @@ export class RangeSlider extends Component {
|
|
|
112
112
|
/** Read the inputs back after something outside changed them. */
|
|
113
113
|
_fromInputs(): void;
|
|
114
114
|
_bindInputs(): void;
|
|
115
|
-
_labels: any[];
|
|
115
|
+
_labels: any[] | undefined;
|
|
116
116
|
_labelText(): any;
|
|
117
117
|
_render(): void;
|
|
118
|
-
_ticksEl: HTMLDivElement;
|
|
119
|
-
_marksEl: HTMLDivElement;
|
|
120
|
-
_thumbs: any[] | HTMLDivElement[];
|
|
121
|
-
_fillEl: HTMLDivElement;
|
|
122
|
-
_track: HTMLDivElement;
|
|
123
|
-
_root: HTMLDivElement;
|
|
118
|
+
_ticksEl: HTMLDivElement | null | undefined;
|
|
119
|
+
_marksEl: HTMLDivElement | null | undefined;
|
|
120
|
+
_thumbs: any[] | HTMLDivElement[] | undefined;
|
|
121
|
+
_fillEl: HTMLDivElement | undefined;
|
|
122
|
+
_track: HTMLDivElement | undefined;
|
|
123
|
+
_root: HTMLDivElement | null | undefined;
|
|
124
124
|
/** Values a tick is drawn at. */
|
|
125
125
|
_tickValues(): number[];
|
|
126
126
|
_place(el: any, pct: any): void;
|
|
127
|
-
_renderTicks(root: any): HTMLDivElement;
|
|
128
|
-
_renderMarks(root: any): HTMLDivElement;
|
|
127
|
+
_renderTicks(root: any): HTMLDivElement | null;
|
|
128
|
+
_renderMarks(root: any): HTMLDivElement | null;
|
|
129
129
|
/** Move the thumbs and fill to the current values and update the ARIA. */
|
|
130
130
|
_paint(): void;
|
|
131
131
|
_applyDisabled(): void;
|
|
132
132
|
_bindRoot(): void;
|
|
133
|
-
_rootHandlers: any[] | (string | HTMLDivElement | ((e: any) => void))[][];
|
|
133
|
+
_rootHandlers: any[] | (string | HTMLDivElement | ((e: any) => void) | null | undefined)[][] | undefined;
|
|
134
134
|
_unbindRoot(): void;
|
|
135
135
|
/** The value under a pointer. */
|
|
136
136
|
_valueAt(e: any): number;
|
|
@@ -195,80 +195,80 @@ export default RangeSlider;
|
|
|
195
195
|
export type RangeSliderValue = number | [number, number];
|
|
196
196
|
export type RangeSliderMark = {
|
|
197
197
|
value: number;
|
|
198
|
-
label?: string;
|
|
198
|
+
label?: string | undefined;
|
|
199
199
|
};
|
|
200
200
|
export type RangeSliderOptions = {
|
|
201
201
|
/**
|
|
202
202
|
* Default: the input's min, else 0
|
|
203
203
|
*/
|
|
204
|
-
min?: number;
|
|
204
|
+
min?: number | undefined;
|
|
205
205
|
/**
|
|
206
206
|
* Default: the input's max, else 100
|
|
207
207
|
*/
|
|
208
|
-
max?: number;
|
|
208
|
+
max?: number | undefined;
|
|
209
209
|
/**
|
|
210
210
|
* Default: the input's step, else 1
|
|
211
211
|
*/
|
|
212
|
-
step?: number | "any";
|
|
212
|
+
step?: number | "any" | undefined;
|
|
213
213
|
/**
|
|
214
214
|
* A number, or [low, high] / "low,high" with range: true
|
|
215
215
|
*/
|
|
216
|
-
value?: RangeSliderValue |
|
|
216
|
+
value?: string | RangeSliderValue | null | undefined;
|
|
217
217
|
/**
|
|
218
218
|
* Two thumbs; two inputs, sharing `name` unless `names` is given
|
|
219
219
|
*/
|
|
220
|
-
range?: boolean;
|
|
221
|
-
orientation?: "
|
|
220
|
+
range?: boolean | undefined;
|
|
221
|
+
orientation?: "vertical" | "horizontal" | undefined;
|
|
222
222
|
/**
|
|
223
223
|
* true = every step, n = every n units, or the values to draw at
|
|
224
224
|
*/
|
|
225
|
-
ticks?:
|
|
225
|
+
ticks?: number | boolean | number[] | undefined;
|
|
226
226
|
/**
|
|
227
227
|
* Label the ticks (always on for an array)
|
|
228
228
|
*/
|
|
229
|
-
tickLabels?: boolean;
|
|
229
|
+
tickLabels?: boolean | undefined;
|
|
230
230
|
/**
|
|
231
231
|
* Formats the value for ticks, marks, the tooltip and aria-valuetext
|
|
232
232
|
*/
|
|
233
|
-
labels?: ((value: number, where: "tick" | "mark" | "tooltip" | "aria") => string) | null;
|
|
233
|
+
labels?: ((value: number, where: "tick" | "mark" | "tooltip" | "aria") => string) | null | undefined;
|
|
234
234
|
/**
|
|
235
235
|
* Read when `labels` is not set
|
|
236
236
|
*/
|
|
237
|
-
format?: ((value: number, where: "tick" | "mark" | "tooltip" | "aria") => string) | null;
|
|
237
|
+
format?: ((value: number, where: "tick" | "mark" | "tooltip" | "aria") => string) | null | undefined;
|
|
238
238
|
/**
|
|
239
239
|
* Default 'hover' (also shown on focus and while dragging)
|
|
240
240
|
*/
|
|
241
|
-
tooltip?: "
|
|
242
|
-
marks?: RangeSliderMark[] | null;
|
|
243
|
-
disabled?: boolean;
|
|
244
|
-
name?: string | null;
|
|
241
|
+
tooltip?: "hover" | "always" | "never" | undefined;
|
|
242
|
+
marks?: RangeSliderMark[] | null | undefined;
|
|
243
|
+
disabled?: boolean | undefined;
|
|
244
|
+
name?: string | null | undefined;
|
|
245
245
|
/**
|
|
246
246
|
* [lowName, highName] for range: true
|
|
247
247
|
*/
|
|
248
|
-
names?: [string, string] | null;
|
|
248
|
+
names?: [string, string] | null | undefined;
|
|
249
249
|
/**
|
|
250
250
|
* range: true - the closest the thumbs may come
|
|
251
251
|
*/
|
|
252
|
-
minDistance?: number;
|
|
252
|
+
minDistance?: number | undefined;
|
|
253
253
|
/**
|
|
254
254
|
* null = follow the page's direction
|
|
255
255
|
*/
|
|
256
|
-
rtl?: boolean | null;
|
|
257
|
-
ariaLabel?: string | null;
|
|
258
|
-
ariaLabels?: [string, string] | null;
|
|
259
|
-
className?: string;
|
|
256
|
+
rtl?: boolean | null | undefined;
|
|
257
|
+
ariaLabel?: string | null | undefined;
|
|
258
|
+
ariaLabels?: [string, string] | null | undefined;
|
|
259
|
+
className?: string | undefined;
|
|
260
260
|
/**
|
|
261
261
|
* While dragging, and on each key press
|
|
262
262
|
*/
|
|
263
|
-
onInput?: ((value: RangeSliderValue) => void) | null;
|
|
263
|
+
onInput?: ((value: RangeSliderValue) => void) | null | undefined;
|
|
264
264
|
/**
|
|
265
265
|
* When the value is committed
|
|
266
266
|
*/
|
|
267
|
-
onChange?: ((value: RangeSliderValue) => void) | null;
|
|
267
|
+
onChange?: ((value: RangeSliderValue) => void) | null | undefined;
|
|
268
268
|
/**
|
|
269
269
|
* Return false to refuse a move
|
|
270
270
|
*/
|
|
271
|
-
onBeforeChange?: ((next: RangeSliderValue, current: RangeSliderValue) => boolean | void) | null;
|
|
271
|
+
onBeforeChange?: ((next: RangeSliderValue, current: RangeSliderValue) => boolean | void) | null | undefined;
|
|
272
272
|
};
|
|
273
273
|
export type RangeSliderInstance = RangeSlider;
|
|
274
274
|
import Component from '../component.js';
|
|
@@ -59,7 +59,7 @@ export function uniqueId(prefix: string): string;
|
|
|
59
59
|
* @param {T[]} list
|
|
60
60
|
* @returns {(T & {all(): T[]})|null}
|
|
61
61
|
*/
|
|
62
|
-
export function firstWithAll<T extends
|
|
62
|
+
export function firstWithAll<T extends object>(list: T[]): (T & {
|
|
63
63
|
all(): T[];
|
|
64
64
|
}) | null;
|
|
65
65
|
/**
|
|
@@ -38,34 +38,34 @@ export function splitPaneFor(el: Element, options?: SplitPaneOptions): SplitPane
|
|
|
38
38
|
export class SplitPane extends Component {
|
|
39
39
|
static defaults: {
|
|
40
40
|
direction: string;
|
|
41
|
-
sizes:
|
|
41
|
+
sizes: null;
|
|
42
42
|
minSize: number;
|
|
43
|
-
maxSize:
|
|
43
|
+
maxSize: null;
|
|
44
44
|
gutterSize: number;
|
|
45
45
|
snapOffset: number;
|
|
46
46
|
collapsible: boolean;
|
|
47
47
|
collapsedSize: number;
|
|
48
48
|
collapseButton: boolean;
|
|
49
|
-
persistKey:
|
|
50
|
-
cursor:
|
|
49
|
+
persistKey: null;
|
|
50
|
+
cursor: null;
|
|
51
51
|
disabled: boolean;
|
|
52
52
|
step: number;
|
|
53
53
|
largeStep: number;
|
|
54
54
|
gutterLabel: string;
|
|
55
|
-
onBeforeDrag:
|
|
56
|
-
onDragStart:
|
|
57
|
-
onDrag:
|
|
58
|
-
onDragEnd:
|
|
59
|
-
onResize:
|
|
60
|
-
onCollapse:
|
|
61
|
-
onExpand:
|
|
55
|
+
onBeforeDrag: null;
|
|
56
|
+
onDragStart: null;
|
|
57
|
+
onDrag: null;
|
|
58
|
+
onDragEnd: null;
|
|
59
|
+
onResize: null;
|
|
60
|
+
onCollapse: null;
|
|
61
|
+
onExpand: null;
|
|
62
62
|
};
|
|
63
63
|
/**
|
|
64
64
|
* @param {string|HTMLElement} element - The container; its element children are the panes
|
|
65
65
|
* @param {SplitPaneOptions} [options]
|
|
66
66
|
*/
|
|
67
67
|
constructor(element: string | HTMLElement, options?: SplitPaneOptions);
|
|
68
|
-
_gutters: any[];
|
|
68
|
+
_gutters: any[] | undefined;
|
|
69
69
|
_drag: {
|
|
70
70
|
index: any;
|
|
71
71
|
pointerId: any;
|
|
@@ -73,20 +73,20 @@ export class SplitPane extends Component {
|
|
|
73
73
|
startSize: any;
|
|
74
74
|
available: number;
|
|
75
75
|
sign: number;
|
|
76
|
-
gutter:
|
|
77
|
-
};
|
|
78
|
-
_collapsed: any[];
|
|
79
|
-
_restoreTo: any[];
|
|
80
|
-
_addedIds: any[];
|
|
81
|
-
_frame: number;
|
|
82
|
-
_containerStyle: string;
|
|
76
|
+
gutter: undefined;
|
|
77
|
+
} | null;
|
|
78
|
+
_collapsed: any[] | undefined;
|
|
79
|
+
_restoreTo: any[] | undefined;
|
|
80
|
+
_addedIds: any[] | undefined;
|
|
81
|
+
_frame: number | undefined;
|
|
82
|
+
_containerStyle: string | null | undefined;
|
|
83
83
|
/** The pane elements. @type {HTMLElement[]} */
|
|
84
84
|
panes: HTMLElement[];
|
|
85
|
-
_paneStyles: string[];
|
|
85
|
+
_paneStyles: (string | null)[] | undefined;
|
|
86
86
|
get horizontal(): boolean;
|
|
87
87
|
_build(): void;
|
|
88
88
|
_sizes: any;
|
|
89
|
-
_observer: ResizeObserver;
|
|
89
|
+
_observer: ResizeObserver | null | undefined;
|
|
90
90
|
_makeGutter(i: any): HTMLDivElement;
|
|
91
91
|
/** Settings that can change after set-up: disabled, gutter size, cursor, label, buttons. */
|
|
92
92
|
_applyOptions(): void;
|
|
@@ -112,7 +112,7 @@ export class SplitPane extends Component {
|
|
|
112
112
|
* within both panes' limits.
|
|
113
113
|
*/
|
|
114
114
|
_moveBoundary(i: any, want: any, { snap }?: {
|
|
115
|
-
snap?: boolean;
|
|
115
|
+
snap?: boolean | undefined;
|
|
116
116
|
}): boolean;
|
|
117
117
|
_onPointerDown(e: any, i: any): void;
|
|
118
118
|
_onPointerMove: (e: any) => void;
|
|
@@ -155,7 +155,7 @@ export class SplitPane extends Component {
|
|
|
155
155
|
sizes: any[];
|
|
156
156
|
collapsed: any;
|
|
157
157
|
restoreTo: any;
|
|
158
|
-
};
|
|
158
|
+
} | null;
|
|
159
159
|
_save(): void;
|
|
160
160
|
}
|
|
161
161
|
export default SplitPane;
|
|
@@ -167,73 +167,73 @@ export type SplitPaneOptions = {
|
|
|
167
167
|
/**
|
|
168
168
|
* - 'horizontal' = side by side (default), 'vertical' = stacked
|
|
169
169
|
*/
|
|
170
|
-
direction?: "
|
|
170
|
+
direction?: "vertical" | "horizontal" | undefined;
|
|
171
171
|
/**
|
|
172
172
|
* - Percentages, one per pane (scaled to add up to 100); equal by default
|
|
173
173
|
*/
|
|
174
|
-
sizes?: number[] | null;
|
|
174
|
+
sizes?: number[] | null | undefined;
|
|
175
175
|
/**
|
|
176
176
|
* - Minimum size, one value or one per pane (default 0)
|
|
177
177
|
*/
|
|
178
|
-
minSize?: SplitPaneSize | SplitPaneSize[];
|
|
178
|
+
minSize?: SplitPaneSize | SplitPaneSize[] | undefined;
|
|
179
179
|
/**
|
|
180
180
|
* - Maximum size, one value or one per pane (default none)
|
|
181
181
|
*/
|
|
182
|
-
maxSize?: SplitPaneSize | null |
|
|
182
|
+
maxSize?: SplitPaneSize | (SplitPaneSize | null)[] | null | undefined;
|
|
183
183
|
/**
|
|
184
184
|
* - Gutter thickness in px (default 8)
|
|
185
185
|
*/
|
|
186
|
-
gutterSize?: number;
|
|
186
|
+
gutterSize?: number | undefined;
|
|
187
187
|
/**
|
|
188
188
|
* - Snap to a limit when dragged within this many px of it (default 0)
|
|
189
189
|
*/
|
|
190
|
-
snapOffset?: number;
|
|
190
|
+
snapOffset?: number | undefined;
|
|
191
191
|
/**
|
|
192
192
|
* - Which panes the gutter gestures may collapse
|
|
193
193
|
*/
|
|
194
|
-
collapsible?: boolean | boolean[];
|
|
194
|
+
collapsible?: boolean | boolean[] | undefined;
|
|
195
195
|
/**
|
|
196
196
|
* - What a collapsed pane shrinks to (default 0)
|
|
197
197
|
*/
|
|
198
|
-
collapsedSize?: SplitPaneSize | SplitPaneSize[];
|
|
198
|
+
collapsedSize?: SplitPaneSize | SplitPaneSize[] | undefined;
|
|
199
199
|
/**
|
|
200
200
|
* - A small toggle button in gutters next to a collapsible pane
|
|
201
201
|
*/
|
|
202
|
-
collapseButton?: boolean;
|
|
202
|
+
collapseButton?: boolean | undefined;
|
|
203
203
|
/**
|
|
204
204
|
* - Remember sizes and collapse state with S under 'split-pane:<key>'
|
|
205
205
|
*/
|
|
206
|
-
persistKey?: string | null;
|
|
206
|
+
persistKey?: string | null | undefined;
|
|
207
207
|
/**
|
|
208
208
|
* - Gutter cursor (default col-resize / row-resize)
|
|
209
209
|
*/
|
|
210
|
-
cursor?: string | null;
|
|
211
|
-
disabled?: boolean;
|
|
210
|
+
cursor?: string | null | undefined;
|
|
211
|
+
disabled?: boolean | undefined;
|
|
212
212
|
/**
|
|
213
213
|
* - Percent per arrow key (default 1)
|
|
214
214
|
*/
|
|
215
|
-
step?: number;
|
|
215
|
+
step?: number | undefined;
|
|
216
216
|
/**
|
|
217
217
|
* - Percent per Shift+arrow (default 10)
|
|
218
218
|
*/
|
|
219
|
-
largeStep?: number;
|
|
219
|
+
largeStep?: number | undefined;
|
|
220
220
|
/**
|
|
221
221
|
* - The gutters' aria-label
|
|
222
222
|
*/
|
|
223
|
-
gutterLabel?: string;
|
|
223
|
+
gutterLabel?: string | undefined;
|
|
224
224
|
/**
|
|
225
225
|
* - Return false to refuse a drag
|
|
226
226
|
*/
|
|
227
|
-
onBeforeDrag?: ((gutterIndex: number, event: PointerEvent) => boolean | void) | null;
|
|
228
|
-
onDragStart?: ((sizes: number[], gutterIndex: number) => void) | null;
|
|
229
|
-
onDrag?: ((sizes: number[], gutterIndex: number) => void) | null;
|
|
230
|
-
onDragEnd?: ((sizes: number[], gutterIndex: number) => void) | null;
|
|
227
|
+
onBeforeDrag?: ((gutterIndex: number, event: PointerEvent) => boolean | void) | null | undefined;
|
|
228
|
+
onDragStart?: ((sizes: number[], gutterIndex: number) => void) | null | undefined;
|
|
229
|
+
onDrag?: ((sizes: number[], gutterIndex: number) => void) | null | undefined;
|
|
230
|
+
onDragEnd?: ((sizes: number[], gutterIndex: number) => void) | null | undefined;
|
|
231
231
|
/**
|
|
232
232
|
* - Any size change: drag, keys, setSizes, collapse
|
|
233
233
|
*/
|
|
234
|
-
onResize?: ((sizes: number[]) => void) | null;
|
|
235
|
-
onCollapse?: ((paneIndex: number) => void) | null;
|
|
236
|
-
onExpand?: ((paneIndex: number) => void) | null;
|
|
234
|
+
onResize?: ((sizes: number[]) => void) | null | undefined;
|
|
235
|
+
onCollapse?: ((paneIndex: number) => void) | null | undefined;
|
|
236
|
+
onExpand?: ((paneIndex: number) => void) | null | undefined;
|
|
237
237
|
};
|
|
238
238
|
export type SplitPaneInstance = SplitPane;
|
|
239
239
|
import Component from '../component.js';
|