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
|
@@ -36,19 +36,19 @@ export type ContextMenuItem = {
|
|
|
36
36
|
/**
|
|
37
37
|
* - Item text
|
|
38
38
|
*/
|
|
39
|
-
label?: string;
|
|
39
|
+
label?: string | undefined;
|
|
40
40
|
/**
|
|
41
41
|
* - Item text, when there is no label
|
|
42
42
|
*/
|
|
43
|
-
text?: string;
|
|
43
|
+
text?: string | undefined;
|
|
44
44
|
/**
|
|
45
45
|
* - Item text, when there is no label or text
|
|
46
46
|
*/
|
|
47
|
-
name?: string;
|
|
47
|
+
name?: string | undefined;
|
|
48
48
|
/**
|
|
49
49
|
* - Domma icon name, rendered through data-icon
|
|
50
50
|
*/
|
|
51
|
-
icon?: string;
|
|
51
|
+
icon?: string | undefined;
|
|
52
52
|
/**
|
|
53
53
|
* - Arbitrary value carried to onSelect (with the item)
|
|
54
54
|
*/
|
|
@@ -56,227 +56,227 @@ export type ContextMenuItem = {
|
|
|
56
56
|
/**
|
|
57
57
|
* - Invoked with the delegated target and the open context
|
|
58
58
|
*/
|
|
59
|
-
action?: (target: HTMLElement | null, ctx: ContextMenuContext) => void | Promise<void
|
|
59
|
+
action?: ((target: HTMLElement | null, ctx: ContextMenuContext) => void | Promise<void>) | undefined;
|
|
60
60
|
/**
|
|
61
61
|
* - Greyed but still shown; a function is resolved per target
|
|
62
62
|
*/
|
|
63
|
-
disabled?: boolean | ((target: HTMLElement, ctx: ContextMenuContext) => boolean);
|
|
63
|
+
disabled?: boolean | ((target: HTMLElement, ctx: ContextMenuContext) => boolean) | undefined;
|
|
64
64
|
/**
|
|
65
65
|
* - Omitted entirely when false; a function is resolved per target
|
|
66
66
|
*/
|
|
67
|
-
visible?: boolean | ((target: HTMLElement, ctx: ContextMenuContext) => boolean);
|
|
67
|
+
visible?: boolean | ((target: HTMLElement, ctx: ContextMenuContext) => boolean) | undefined;
|
|
68
68
|
/**
|
|
69
69
|
* - Destructive styling
|
|
70
70
|
*/
|
|
71
|
-
danger?: boolean;
|
|
71
|
+
danger?: boolean | undefined;
|
|
72
72
|
/**
|
|
73
73
|
* - Extra classes on the item
|
|
74
74
|
*/
|
|
75
|
-
className?: string | string[];
|
|
75
|
+
className?: string | string[] | undefined;
|
|
76
76
|
/**
|
|
77
77
|
* - Right-aligned hint text - display only, no key is bound
|
|
78
78
|
*/
|
|
79
|
-
shortcut?: string;
|
|
79
|
+
shortcut?: string | undefined;
|
|
80
80
|
/**
|
|
81
81
|
* - Nested items, to unlimited depth
|
|
82
82
|
*/
|
|
83
|
-
submenu?: ContextMenuItem[] | ((target: HTMLElement, ctx: ContextMenuContext) => ContextMenuItem[]);
|
|
83
|
+
submenu?: ContextMenuItem[] | ((target: HTMLElement, ctx: ContextMenuContext) => ContextMenuItem[]) | undefined;
|
|
84
84
|
/**
|
|
85
85
|
* - Item kind (default 'item')
|
|
86
86
|
*/
|
|
87
|
-
type?: "
|
|
87
|
+
type?: "header" | "item" | "divider" | "checkbox" | "radio" | undefined;
|
|
88
88
|
/**
|
|
89
89
|
* - Checked state for checkbox/radio types
|
|
90
90
|
*/
|
|
91
|
-
checked?: boolean | ((target: HTMLElement, ctx: ContextMenuContext) => boolean);
|
|
91
|
+
checked?: boolean | ((target: HTMLElement, ctx: ContextMenuContext) => boolean) | undefined;
|
|
92
92
|
/**
|
|
93
93
|
* - Shorthand for type: 'divider'
|
|
94
94
|
*/
|
|
95
|
-
divider?: boolean;
|
|
95
|
+
divider?: boolean | undefined;
|
|
96
96
|
/**
|
|
97
97
|
* - Shorthand for type: 'header'
|
|
98
98
|
*/
|
|
99
|
-
header?: string;
|
|
99
|
+
header?: string | undefined;
|
|
100
100
|
};
|
|
101
101
|
export type ContextMenuOptions = {
|
|
102
102
|
/**
|
|
103
103
|
* - Items, or a resolver called with the delegated target. Accepts a Domma Reactive observable.
|
|
104
104
|
*/
|
|
105
|
-
items?: ContextMenuItem[] | ((target: HTMLElement, ctx: ContextMenuContext) => ContextMenuItem[]) | import("../vendor/domma-reactive.js").Observable<ContextMenuItem[]
|
|
105
|
+
items?: ContextMenuItem[] | ((target: HTMLElement, ctx: ContextMenuContext) => ContextMenuItem[]) | import("../vendor/domma-reactive.js").Observable<ContextMenuItem[]> | undefined;
|
|
106
106
|
/**
|
|
107
107
|
* - Delegation selector - the menu claims only descendants matching it (default: the whole container)
|
|
108
108
|
*/
|
|
109
|
-
match?: string | null;
|
|
109
|
+
match?: string | null | undefined;
|
|
110
110
|
/**
|
|
111
111
|
* - Regions inside the container that decline and fall through outward
|
|
112
112
|
*/
|
|
113
|
-
exclude?: string | null;
|
|
113
|
+
exclude?: string | null | undefined;
|
|
114
114
|
/**
|
|
115
115
|
* - False declines the gesture and falls through to the next menu outward
|
|
116
116
|
*/
|
|
117
|
-
enabled?: boolean | ((target: HTMLElement, ctx: ContextMenuContext) => boolean);
|
|
117
|
+
enabled?: boolean | ((target: HTMLElement, ctx: ContextMenuContext) => boolean) | undefined;
|
|
118
118
|
/**
|
|
119
119
|
* - Merge ancestor menus' items rather than replacing them (default 'append')
|
|
120
120
|
*/
|
|
121
|
-
inherit?: "append" | "prepend" |
|
|
121
|
+
inherit?: false | "append" | "prepend" | undefined;
|
|
122
122
|
/**
|
|
123
123
|
* - Tie-break only when two menus bind the SAME element; depth wins otherwise
|
|
124
124
|
*/
|
|
125
|
-
priority?: number;
|
|
125
|
+
priority?: number | undefined;
|
|
126
126
|
/**
|
|
127
127
|
* - This menu owns its region: once it encloses the click and accepts it, nothing bound deeper is offered the gesture. Not a veto - an exclusive menu that declines steps aside.
|
|
128
128
|
*/
|
|
129
|
-
exclusive?: boolean;
|
|
129
|
+
exclusive?: boolean | undefined;
|
|
130
130
|
/**
|
|
131
131
|
* - Shift+right-click passes through to the browser's own menu (default true)
|
|
132
132
|
*/
|
|
133
|
-
nativeOnShift?: boolean;
|
|
133
|
+
nativeOnShift?: boolean | undefined;
|
|
134
134
|
/**
|
|
135
135
|
* - Close after an item is chosen (default true)
|
|
136
136
|
*/
|
|
137
|
-
closeOnSelect?: boolean;
|
|
137
|
+
closeOnSelect?: boolean | undefined;
|
|
138
138
|
/**
|
|
139
139
|
* - Close on Esc (default true)
|
|
140
140
|
*/
|
|
141
|
-
closeOnEscape?: boolean;
|
|
141
|
+
closeOnEscape?: boolean | undefined;
|
|
142
142
|
/**
|
|
143
143
|
* - Close on outside mousedown (default true)
|
|
144
144
|
*/
|
|
145
|
-
closeOnClickOutside?: boolean;
|
|
145
|
+
closeOnClickOutside?: boolean | undefined;
|
|
146
146
|
/**
|
|
147
147
|
* - Close on scroll - the anchoring point has moved (default true)
|
|
148
148
|
*/
|
|
149
|
-
closeOnScroll?: boolean;
|
|
149
|
+
closeOnScroll?: boolean | undefined;
|
|
150
150
|
/**
|
|
151
151
|
* - Long-press duration in ms for touch, or false to disable (default 500)
|
|
152
152
|
*/
|
|
153
|
-
longPress?: number | false;
|
|
153
|
+
longPress?: number | false | undefined;
|
|
154
154
|
/**
|
|
155
155
|
* - Pointer over a claimed region: 'auto' (the CSS `context-menu` keyword, default), 'glyph' (a generated themed cursor), false (leave it alone) or any CSS cursor value
|
|
156
156
|
*/
|
|
157
|
-
cursor?: "auto" | "glyph" |
|
|
157
|
+
cursor?: false | (string & {}) | "auto" | "glyph" | undefined;
|
|
158
158
|
/**
|
|
159
159
|
* - Glyph cursor size in px, clamped to 32 - browsers ignore anything larger (default 26)
|
|
160
160
|
*/
|
|
161
|
-
cursorSize?: number;
|
|
161
|
+
cursorSize?: number | undefined;
|
|
162
162
|
/**
|
|
163
163
|
* - Extra class on the menu root
|
|
164
164
|
*/
|
|
165
|
-
className?: string;
|
|
165
|
+
className?: string | undefined;
|
|
166
166
|
/**
|
|
167
167
|
* - Minimum menu width (default '200px')
|
|
168
168
|
*/
|
|
169
|
-
minWidth?: string;
|
|
169
|
+
minWidth?: string | undefined;
|
|
170
170
|
/**
|
|
171
171
|
* - Maximum menu width (default '320px')
|
|
172
172
|
*/
|
|
173
|
-
maxWidth?: string;
|
|
173
|
+
maxWidth?: string | undefined;
|
|
174
174
|
/**
|
|
175
175
|
* - Maximum menu height before it scrolls (default '60vh')
|
|
176
176
|
*/
|
|
177
|
-
maxHeight?: string;
|
|
177
|
+
maxHeight?: string | undefined;
|
|
178
178
|
/**
|
|
179
179
|
* - Offset [x, y] from the cursor point (default [2, 2])
|
|
180
180
|
*/
|
|
181
|
-
offset?: [number, number];
|
|
181
|
+
offset?: [number, number] | undefined;
|
|
182
182
|
/**
|
|
183
183
|
* - Flip across the cursor and clamp to the viewport (default true)
|
|
184
184
|
*/
|
|
185
|
-
flip?: boolean;
|
|
185
|
+
flip?: boolean | undefined;
|
|
186
186
|
/**
|
|
187
187
|
* - Whether to transition on open and close (default true)
|
|
188
188
|
*/
|
|
189
|
-
animation?: boolean;
|
|
189
|
+
animation?: boolean | undefined;
|
|
190
190
|
/**
|
|
191
191
|
* - Transition duration in ms (default 120)
|
|
192
192
|
*/
|
|
193
|
-
animationDuration?: number;
|
|
193
|
+
animationDuration?: number | undefined;
|
|
194
194
|
/**
|
|
195
195
|
* - How the panel enters (default 'scale')
|
|
196
196
|
*/
|
|
197
|
-
transition?: "scale" | "fade" | "slide" | "none";
|
|
197
|
+
transition?: "scale" | "fade" | "slide" | "none" | undefined;
|
|
198
198
|
/**
|
|
199
199
|
* - Any CSS easing (default cubic-bezier(0.16, 1, 0.3, 1))
|
|
200
200
|
*/
|
|
201
|
-
easing?: string;
|
|
201
|
+
easing?: string | undefined;
|
|
202
202
|
/**
|
|
203
203
|
* - Preset key ('primary'|'success'|'danger'|'warning'|'info') or any CSS colour
|
|
204
204
|
*/
|
|
205
|
-
accent?: string | null;
|
|
205
|
+
accent?: string | null | undefined;
|
|
206
206
|
/**
|
|
207
207
|
* - Overrides the panel background
|
|
208
208
|
*/
|
|
209
|
-
surface?: string | null;
|
|
209
|
+
surface?: string | null | undefined;
|
|
210
210
|
/**
|
|
211
211
|
* - 'none'|'sm'|'md'|'lg'|'xl', or any CSS length
|
|
212
212
|
*/
|
|
213
|
-
radius?: string | null;
|
|
213
|
+
radius?: string | null | undefined;
|
|
214
214
|
/**
|
|
215
215
|
* - 'none'|'sm'|'md'|'lg'|'xl'
|
|
216
216
|
*/
|
|
217
|
-
shadow?: string | null;
|
|
217
|
+
shadow?: string | null | undefined;
|
|
218
218
|
/**
|
|
219
219
|
* - 20-100; translucent panel with a blurred backdrop. Clamped.
|
|
220
220
|
*/
|
|
221
|
-
opacity?: number | null;
|
|
221
|
+
opacity?: number | null | undefined;
|
|
222
222
|
/**
|
|
223
223
|
* - Row height and font size (default 'comfortable')
|
|
224
224
|
*/
|
|
225
|
-
density?: "comfortable" | "compact";
|
|
225
|
+
density?: "comfortable" | "compact" | undefined;
|
|
226
226
|
/**
|
|
227
227
|
* - Custom item renderer returning HTML
|
|
228
228
|
*/
|
|
229
|
-
itemTemplate?: ((item: ContextMenuItem, index: number) => string) | null;
|
|
229
|
+
itemTemplate?: ((item: ContextMenuItem, index: number) => string) | null | undefined;
|
|
230
230
|
/**
|
|
231
231
|
* - Hover grace before a submenu opens, in ms (default 150)
|
|
232
232
|
*/
|
|
233
|
-
submenuDelay?: number;
|
|
233
|
+
submenuDelay?: number | undefined;
|
|
234
234
|
/**
|
|
235
235
|
* - Render your own panel instead of an item list. Called only once this menu has claimed the gesture. Return an element for Domma to position and dismiss, or nothing to manage it yourself.
|
|
236
236
|
*/
|
|
237
|
-
render?: ((ctx: ContextMenuContext) => HTMLElement | void) | null;
|
|
237
|
+
render?: ((ctx: ContextMenuContext) => HTMLElement | void) | null | undefined;
|
|
238
238
|
/**
|
|
239
239
|
* - Open on Shift+F10 and the Menu key against the focused element (default true)
|
|
240
240
|
*/
|
|
241
|
-
keyboardTrigger?: boolean;
|
|
241
|
+
keyboardTrigger?: boolean | undefined;
|
|
242
242
|
/**
|
|
243
243
|
* - Jump to an item by typing (default true)
|
|
244
244
|
*/
|
|
245
|
-
typeahead?: boolean;
|
|
245
|
+
typeahead?: boolean | undefined;
|
|
246
246
|
/**
|
|
247
247
|
* - aria-label for the menu
|
|
248
248
|
*/
|
|
249
|
-
ariaLabel?: string;
|
|
249
|
+
ariaLabel?: string | undefined;
|
|
250
250
|
/**
|
|
251
251
|
* - Bind items to a Domma Model
|
|
252
252
|
*/
|
|
253
253
|
model?: {
|
|
254
254
|
get(key: string): any;
|
|
255
|
-
} | null;
|
|
255
|
+
} | null | undefined;
|
|
256
256
|
/**
|
|
257
257
|
* - Model key holding the items array
|
|
258
258
|
*/
|
|
259
|
-
modelKey?: string | null;
|
|
259
|
+
modelKey?: string | null | undefined;
|
|
260
260
|
/**
|
|
261
261
|
* - Return false to decline and fall through to the next menu outward
|
|
262
262
|
*/
|
|
263
|
-
onBeforeOpen?: ((ctx: ContextMenuContext) => boolean | void) | null;
|
|
263
|
+
onBeforeOpen?: ((ctx: ContextMenuContext) => boolean | void) | null | undefined;
|
|
264
264
|
/**
|
|
265
265
|
* - Fired once the menu is on screen
|
|
266
266
|
*/
|
|
267
|
-
onOpen?: ((ctx: ContextMenuContext) => void) | null;
|
|
267
|
+
onOpen?: ((ctx: ContextMenuContext) => void) | null | undefined;
|
|
268
268
|
/**
|
|
269
269
|
* - Return false to keep it open
|
|
270
270
|
*/
|
|
271
|
-
onBeforeClose?: ((ctx: ContextMenuContext | null) => boolean | void) | null;
|
|
271
|
+
onBeforeClose?: ((ctx: ContextMenuContext | null) => boolean | void) | null | undefined;
|
|
272
272
|
/**
|
|
273
273
|
* - Fired after the menu is dismissed
|
|
274
274
|
*/
|
|
275
|
-
onClose?: ((ctx: ContextMenuContext | null) => void) | null;
|
|
275
|
+
onClose?: ((ctx: ContextMenuContext | null) => void) | null | undefined;
|
|
276
276
|
/**
|
|
277
277
|
* - Fired before the item's own action
|
|
278
278
|
*/
|
|
279
|
-
onSelect?: ((item: ContextMenuItem, ctx: ContextMenuContext) => void) | null;
|
|
279
|
+
onSelect?: ((item: ContextMenuItem, ctx: ContextMenuContext) => void) | null | undefined;
|
|
280
280
|
};
|
|
281
281
|
/**
|
|
282
282
|
* One accepted candidate for a gesture.
|
|
@@ -404,8 +404,8 @@ declare class ContextMenu extends Component {
|
|
|
404
404
|
* @param {ContextMenuOptions} [options]
|
|
405
405
|
*/
|
|
406
406
|
constructor(selector: string | HTMLElement, options?: ContextMenuOptions);
|
|
407
|
-
selector: string;
|
|
408
|
-
_node: HTMLElement;
|
|
407
|
+
selector: string | null;
|
|
408
|
+
_node: HTMLElement | null;
|
|
409
409
|
_menu: any;
|
|
410
410
|
_submenus: any[];
|
|
411
411
|
_isOpen: boolean;
|
|
@@ -414,11 +414,11 @@ declare class ContextMenu extends Component {
|
|
|
414
414
|
_renderedItems: any[];
|
|
415
415
|
_ctx: any;
|
|
416
416
|
_typeaheadBuffer: string;
|
|
417
|
-
_typeaheadTimer: number;
|
|
418
|
-
_submenuTimer: number;
|
|
417
|
+
_typeaheadTimer: number | null;
|
|
418
|
+
_submenuTimer: number | null;
|
|
419
419
|
_observableDispose: any;
|
|
420
|
-
_restoreFocusTo: Element;
|
|
421
|
-
_chain: any;
|
|
420
|
+
_restoreFocusTo: Element | null;
|
|
421
|
+
_chain: any[] | null;
|
|
422
422
|
_cursorId: number;
|
|
423
423
|
/**
|
|
424
424
|
* Put this menu's cursor into the shared stylesheet.
|
|
@@ -476,7 +476,7 @@ declare class ContextMenu extends Component {
|
|
|
476
476
|
* @returns {this}
|
|
477
477
|
*/
|
|
478
478
|
open(x: number, y: number, target?: HTMLElement): this;
|
|
479
|
-
_openResolved(x: any, y: any, hit: any, items: any, event: any, fromKeyboard?: boolean, chain?:
|
|
479
|
+
_openResolved(x: any, y: any, hit: any, items: any, event: any, fromKeyboard?: boolean, chain?: null): void;
|
|
480
480
|
/**
|
|
481
481
|
* Close the menu.
|
|
482
482
|
* @returns {this}
|
|
@@ -550,13 +550,13 @@ declare class ContextMenu extends Component {
|
|
|
550
550
|
* side OF THE CURSOR rather than to the other side of an element, which is
|
|
551
551
|
* the part that differs from Dropdown._positionMenu().
|
|
552
552
|
*/
|
|
553
|
-
_positionAt(menu: any, x: any, y: any, anchorRect?:
|
|
553
|
+
_positionAt(menu: any, x: any, y: any, anchorRect?: null): void;
|
|
554
554
|
_bindOpenListeners(): void;
|
|
555
|
-
_outsideHandler: (e: any) => void;
|
|
556
|
-
_contextHandler: (e: any) => void;
|
|
557
|
-
_keyHandler: (e: any) => void;
|
|
558
|
-
_scrollHandler: (event: any) => void;
|
|
559
|
-
_resizeHandler: () => this;
|
|
555
|
+
_outsideHandler: ((e: any) => void) | null | undefined;
|
|
556
|
+
_contextHandler: ((e: any) => void) | null | undefined;
|
|
557
|
+
_keyHandler: ((e: any) => void) | null | undefined;
|
|
558
|
+
_scrollHandler: ((event: any) => void) | null | undefined;
|
|
559
|
+
_resizeHandler: (() => this) | null | undefined;
|
|
560
560
|
_unbindOpenListeners(): void;
|
|
561
561
|
_focusableItems(): any[];
|
|
562
562
|
_moveFocus(delta: any): void;
|
|
@@ -244,7 +244,7 @@ export class DommaCollection {
|
|
|
244
244
|
* @param {DommaHtmlOptions} [options] - Sanitisation options
|
|
245
245
|
* @returns {this}
|
|
246
246
|
*/
|
|
247
|
-
html(content: string, options?: DommaHtmlOptions): this;
|
|
247
|
+
html(content: string, options?: DommaHtmlOptions | undefined): this;
|
|
248
248
|
/**
|
|
249
249
|
* Get the combined text content of every element.
|
|
250
250
|
* @overload
|
|
@@ -600,7 +600,7 @@ export class DommaCollection {
|
|
|
600
600
|
* @param {EventHandler<any>} [handler]
|
|
601
601
|
* @returns {this}
|
|
602
602
|
*/
|
|
603
|
-
off(event?: string, handler?: EventHandler<any>): this;
|
|
603
|
+
off(event?: string | undefined, handler?: EventHandler<any> | undefined): this;
|
|
604
604
|
/**
|
|
605
605
|
* Remove delegated handlers bound with this selector (all of them when no handler is given).
|
|
606
606
|
* @overload
|
|
@@ -609,7 +609,7 @@ export class DommaCollection {
|
|
|
609
609
|
* @param {EventHandler<any>} [handler]
|
|
610
610
|
* @returns {this}
|
|
611
611
|
*/
|
|
612
|
-
off(event: string, selector: string, handler?: EventHandler<any>): this;
|
|
612
|
+
off(event: string, selector: string, handler?: EventHandler<any> | undefined): this;
|
|
613
613
|
/**
|
|
614
614
|
* Attach a handler that runs once.
|
|
615
615
|
* @template {keyof HTMLElementEventMap} K
|
|
@@ -993,7 +993,7 @@ export class DommaCollection {
|
|
|
993
993
|
* @param {(this: HTMLElement) => void} [callback]
|
|
994
994
|
* @returns {this}
|
|
995
995
|
*/
|
|
996
|
-
animate(properties: AnimationProperties, callback?: (this: HTMLElement) => void): this;
|
|
996
|
+
animate(properties: AnimationProperties, callback?: ((this: HTMLElement) => void) | undefined): this;
|
|
997
997
|
/**
|
|
998
998
|
* Animate CSS properties (numbers are pixels).
|
|
999
999
|
* @overload
|
|
@@ -1002,7 +1002,7 @@ export class DommaCollection {
|
|
|
1002
1002
|
* @param {(this: HTMLElement) => void} [callback]
|
|
1003
1003
|
* @returns {this}
|
|
1004
1004
|
*/
|
|
1005
|
-
animate(properties: AnimationProperties, duration: Duration, callback?: (this: HTMLElement) => void): this;
|
|
1005
|
+
animate(properties: AnimationProperties, duration: Duration, callback?: ((this: HTMLElement) => void) | undefined): this;
|
|
1006
1006
|
/**
|
|
1007
1007
|
* Animate CSS properties (numbers are pixels) with a CSS easing.
|
|
1008
1008
|
* @overload
|
|
@@ -1012,7 +1012,7 @@ export class DommaCollection {
|
|
|
1012
1012
|
* @param {(this: HTMLElement) => void} [callback]
|
|
1013
1013
|
* @returns {this}
|
|
1014
1014
|
*/
|
|
1015
|
-
animate(properties: AnimationProperties, duration: Duration, easing: string, callback?: (this: HTMLElement) => void): this;
|
|
1015
|
+
animate(properties: AnimationProperties, duration: Duration, easing: string, callback?: ((this: HTMLElement) => void) | undefined): this;
|
|
1016
1016
|
/**
|
|
1017
1017
|
* Stop animations.
|
|
1018
1018
|
* @returns {this}
|
|
@@ -1135,7 +1135,7 @@ export class DommaCollection {
|
|
|
1135
1135
|
* @param {Document | Element | DocumentFragment} [context] - Where to look for a CSS selector (default: document)
|
|
1136
1136
|
* @returns {DommaCollection}
|
|
1137
1137
|
*/
|
|
1138
|
-
export function dom(selector: DommaSelector, context?: Document |
|
|
1138
|
+
export function dom(selector: DommaSelector, context?: Element | Document | DocumentFragment | undefined): DommaCollection;
|
|
1139
1139
|
/**
|
|
1140
1140
|
* Run a function when the DOM is ready (straight away if it already is).
|
|
1141
1141
|
* @overload
|
|
@@ -1201,21 +1201,21 @@ export type DommaHtmlOptions = {
|
|
|
1201
1201
|
/**
|
|
1202
1202
|
* - Sanitise content (true = safe, false = raw - TRUSTED content only)
|
|
1203
1203
|
*/
|
|
1204
|
-
safe?: boolean;
|
|
1204
|
+
safe?: boolean | undefined;
|
|
1205
1205
|
/**
|
|
1206
1206
|
* - Sanitiser preset
|
|
1207
1207
|
*/
|
|
1208
|
-
preset?: "default" | "strict" | "basic";
|
|
1208
|
+
preset?: "default" | "strict" | "basic" | undefined;
|
|
1209
1209
|
/**
|
|
1210
1210
|
* - Custom allowed HTML tags (overrides the preset)
|
|
1211
1211
|
*/
|
|
1212
|
-
allowedTags?: string[];
|
|
1212
|
+
allowedTags?: string[] | undefined;
|
|
1213
1213
|
/**
|
|
1214
1214
|
* - Custom allowed attributes (overrides the preset)
|
|
1215
1215
|
*/
|
|
1216
|
-
allowedAttrs?: string[];
|
|
1216
|
+
allowedAttrs?: string[] | undefined;
|
|
1217
1217
|
/**
|
|
1218
1218
|
* - Allow data-* attributes
|
|
1219
1219
|
*/
|
|
1220
|
-
allowDataAttrs?: boolean;
|
|
1220
|
+
allowDataAttrs?: boolean | undefined;
|
|
1221
1221
|
};
|