domma-js 1.1.0 → 1.1.1
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 +14 -14
- package/public/dist/bundles/domma-data-focused.css +14 -14
- package/public/dist/bundles/domma-essentials.css +14 -14
- package/public/dist/bundles/domma-full.css +14 -14
- package/public/dist/bundles/domma-minimal.css +8 -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 +3 -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
|
@@ -66,14 +66,14 @@ export class Toast extends Component {
|
|
|
66
66
|
html: boolean;
|
|
67
67
|
safe: boolean;
|
|
68
68
|
icon: string;
|
|
69
|
-
actions:
|
|
69
|
+
actions: never[];
|
|
70
70
|
maxToasts: number;
|
|
71
71
|
className: string;
|
|
72
|
-
onShow:
|
|
73
|
-
onClose:
|
|
74
|
-
onPause:
|
|
75
|
-
onResume:
|
|
76
|
-
onAction:
|
|
72
|
+
onShow: null;
|
|
73
|
+
onClose: null;
|
|
74
|
+
onPause: null;
|
|
75
|
+
onResume: null;
|
|
76
|
+
onAction: null;
|
|
77
77
|
};
|
|
78
78
|
/**
|
|
79
79
|
* @param {string|Node} [message]
|
|
@@ -81,15 +81,15 @@ export class Toast extends Component {
|
|
|
81
81
|
*/
|
|
82
82
|
constructor(message?: string | Node, options?: ToastOptions);
|
|
83
83
|
_visible: boolean;
|
|
84
|
-
_timer: number;
|
|
84
|
+
_timer: number | null;
|
|
85
85
|
_remaining: number;
|
|
86
86
|
_started: number;
|
|
87
87
|
_paused: boolean;
|
|
88
88
|
_render(): void;
|
|
89
|
-
_titleEl: HTMLDivElement;
|
|
90
|
-
_messageEl: HTMLDivElement;
|
|
91
|
-
_actionsEl: HTMLDivElement;
|
|
92
|
-
_bar: HTMLDivElement;
|
|
89
|
+
_titleEl: HTMLDivElement | undefined;
|
|
90
|
+
_messageEl: HTMLDivElement | undefined;
|
|
91
|
+
_actionsEl: HTMLDivElement | undefined;
|
|
92
|
+
_bar: HTMLDivElement | null | undefined;
|
|
93
93
|
_writeMessage(): void;
|
|
94
94
|
_renderActions(): void;
|
|
95
95
|
_bind(): void;
|
|
@@ -158,116 +158,116 @@ export type ToastAction = {
|
|
|
158
158
|
/**
|
|
159
159
|
* - Button label (`text` is accepted too)
|
|
160
160
|
*/
|
|
161
|
-
label?: string;
|
|
161
|
+
label?: string | undefined;
|
|
162
162
|
/**
|
|
163
163
|
* - Alias of `label`
|
|
164
164
|
*/
|
|
165
|
-
text?: string;
|
|
165
|
+
text?: string | undefined;
|
|
166
166
|
/**
|
|
167
167
|
* - Click handler
|
|
168
168
|
*/
|
|
169
|
-
onClick?: (event: MouseEvent, toast: ToastInstance) => void;
|
|
169
|
+
onClick?: ((event: MouseEvent, toast: ToastInstance) => void) | undefined;
|
|
170
170
|
/**
|
|
171
171
|
* - Close toast on click
|
|
172
172
|
*/
|
|
173
|
-
closeOnClick?: boolean;
|
|
173
|
+
closeOnClick?: boolean | undefined;
|
|
174
174
|
/**
|
|
175
175
|
* - Primary style
|
|
176
176
|
*/
|
|
177
|
-
primary?: boolean;
|
|
177
|
+
primary?: boolean | undefined;
|
|
178
178
|
};
|
|
179
179
|
export type ToastOptions = {
|
|
180
180
|
/**
|
|
181
181
|
* - The message (text unless `html: true`)
|
|
182
182
|
*/
|
|
183
|
-
message?: string | Node;
|
|
183
|
+
message?: string | Node | undefined;
|
|
184
184
|
/**
|
|
185
185
|
* - Toast title
|
|
186
186
|
*/
|
|
187
|
-
title?: string;
|
|
187
|
+
title?: string | undefined;
|
|
188
188
|
/**
|
|
189
189
|
* - Toast type
|
|
190
190
|
*/
|
|
191
|
-
type?: import("../elements.js").ToastType;
|
|
191
|
+
type?: import("../elements.js").ToastType | undefined;
|
|
192
192
|
/**
|
|
193
193
|
* - Toast position
|
|
194
194
|
*/
|
|
195
|
-
position?: import("../elements.js").ToastPosition;
|
|
195
|
+
position?: import("../elements.js").ToastPosition | undefined;
|
|
196
196
|
/**
|
|
197
197
|
* - Auto-dismiss duration in ms (0 = no auto-dismiss)
|
|
198
198
|
*/
|
|
199
|
-
duration?: number;
|
|
199
|
+
duration?: number | undefined;
|
|
200
200
|
/**
|
|
201
201
|
* - Pause countdown on hover
|
|
202
202
|
*/
|
|
203
|
-
pauseOnHover?: boolean;
|
|
203
|
+
pauseOnHover?: boolean | undefined;
|
|
204
204
|
/**
|
|
205
205
|
* - Show progress bar
|
|
206
206
|
*/
|
|
207
|
-
showProgress?: boolean;
|
|
207
|
+
showProgress?: boolean | undefined;
|
|
208
208
|
/**
|
|
209
209
|
* - Animation style
|
|
210
210
|
*/
|
|
211
|
-
animation?:
|
|
211
|
+
animation?: (string & {}) | "fade" | "slide" | undefined;
|
|
212
212
|
/**
|
|
213
213
|
* - Animation duration in ms
|
|
214
214
|
*/
|
|
215
|
-
animationDuration?: number;
|
|
215
|
+
animationDuration?: number | undefined;
|
|
216
216
|
/**
|
|
217
217
|
* - Show close button
|
|
218
218
|
*/
|
|
219
|
-
closable?: boolean;
|
|
219
|
+
closable?: boolean | undefined;
|
|
220
220
|
/**
|
|
221
221
|
* - The message is HTML (sanitised unless `safe: false`)
|
|
222
222
|
*/
|
|
223
|
-
html?: boolean;
|
|
223
|
+
html?: boolean | undefined;
|
|
224
224
|
/**
|
|
225
225
|
* - Sanitise HTML message / icon
|
|
226
226
|
*/
|
|
227
|
-
safe?: boolean;
|
|
227
|
+
safe?: boolean | undefined;
|
|
228
228
|
/**
|
|
229
229
|
* - Icon name (data-icon), HTML string or Node; the typed helpers default to the type's icon
|
|
230
230
|
*/
|
|
231
|
-
icon?: string | Node | null;
|
|
231
|
+
icon?: string | Node | null | undefined;
|
|
232
232
|
/**
|
|
233
233
|
* - Action buttons
|
|
234
234
|
*/
|
|
235
|
-
actions?: ToastAction[];
|
|
235
|
+
actions?: ToastAction[] | undefined;
|
|
236
236
|
/**
|
|
237
237
|
* - One action button (used when `actions` is empty)
|
|
238
238
|
*/
|
|
239
|
-
action?: ToastAction;
|
|
239
|
+
action?: ToastAction | undefined;
|
|
240
240
|
/**
|
|
241
241
|
* - Maximum number of toasts on screen; the oldest closes
|
|
242
242
|
*/
|
|
243
|
-
maxToasts?: number;
|
|
243
|
+
maxToasts?: number | undefined;
|
|
244
244
|
/**
|
|
245
245
|
* - Extra classes on the toast
|
|
246
246
|
*/
|
|
247
|
-
className?: string;
|
|
247
|
+
className?: string | undefined;
|
|
248
248
|
/**
|
|
249
249
|
* - When the toast shows
|
|
250
250
|
*/
|
|
251
|
-
onShow?: ((toast: ToastInstance) => void) | null;
|
|
251
|
+
onShow?: ((toast: ToastInstance) => void) | null | undefined;
|
|
252
252
|
/**
|
|
253
253
|
* - After the exit animation, just before removal
|
|
254
254
|
*/
|
|
255
|
-
onClose?: ((toast: ToastInstance) => void) | null;
|
|
255
|
+
onClose?: ((toast: ToastInstance) => void) | null | undefined;
|
|
256
256
|
/**
|
|
257
257
|
* - The countdown paused (hover)
|
|
258
258
|
*/
|
|
259
|
-
onPause?: ((toast: ToastInstance) => void) | null;
|
|
259
|
+
onPause?: ((toast: ToastInstance) => void) | null | undefined;
|
|
260
260
|
/**
|
|
261
261
|
* - The countdown resumed
|
|
262
262
|
*/
|
|
263
|
-
onResume?: ((toast: ToastInstance) => void) | null;
|
|
263
|
+
onResume?: ((toast: ToastInstance) => void) | null | undefined;
|
|
264
264
|
/**
|
|
265
265
|
* - An action button was clicked
|
|
266
266
|
*/
|
|
267
267
|
onAction?: ((detail: {
|
|
268
268
|
action: ToastAction;
|
|
269
269
|
index: number;
|
|
270
|
-
}, toast: ToastInstance) => void) | null;
|
|
270
|
+
}, toast: ToastInstance) => void) | null | undefined;
|
|
271
271
|
};
|
|
272
272
|
export type ToastInstance = Toast;
|
|
273
273
|
/**
|
|
@@ -43,9 +43,9 @@ export class Tooltip extends Component {
|
|
|
43
43
|
safe: boolean;
|
|
44
44
|
visible: boolean;
|
|
45
45
|
className: string;
|
|
46
|
-
maxWidth:
|
|
47
|
-
onShow:
|
|
48
|
-
onHide:
|
|
46
|
+
maxWidth: null;
|
|
47
|
+
onShow: null;
|
|
48
|
+
onHide: null;
|
|
49
49
|
};
|
|
50
50
|
/**
|
|
51
51
|
* Option aliases the old wrapper accepted.
|
|
@@ -58,12 +58,12 @@ export class Tooltip extends Component {
|
|
|
58
58
|
* @param {TooltipOptions} [options]
|
|
59
59
|
*/
|
|
60
60
|
constructor(element: string | Element, options?: TooltipOptions);
|
|
61
|
-
_visible: boolean;
|
|
62
|
-
_bubble: HTMLDivElement;
|
|
63
|
-
_timers: {};
|
|
61
|
+
_visible: boolean | undefined;
|
|
62
|
+
_bubble: HTMLDivElement | null;
|
|
63
|
+
_timers: {} | undefined;
|
|
64
64
|
/** Content falls back to data-tooltip / title; a title is held aside so the browser's own does not show too. */
|
|
65
65
|
_takeTitle(): void;
|
|
66
|
-
_title: string;
|
|
66
|
+
_title: string | null | undefined;
|
|
67
67
|
_content(): any;
|
|
68
68
|
_bindTrigger(): void;
|
|
69
69
|
_clear(name: any): void;
|
|
@@ -131,70 +131,70 @@ export default Tooltip;
|
|
|
131
131
|
* Show / hide delays in ms.
|
|
132
132
|
*/
|
|
133
133
|
export type TooltipDelay = {
|
|
134
|
-
show?: number;
|
|
135
|
-
hide?: number;
|
|
134
|
+
show?: number | undefined;
|
|
135
|
+
hide?: number | undefined;
|
|
136
136
|
};
|
|
137
137
|
export type TooltipOptions = {
|
|
138
138
|
/**
|
|
139
139
|
* - Tooltip content (falls back to data-tooltip, then title)
|
|
140
140
|
*/
|
|
141
|
-
content?: string | Node | ((target: HTMLElement) => string | Node);
|
|
141
|
+
content?: string | Node | ((target: HTMLElement) => string | Node) | undefined;
|
|
142
142
|
/**
|
|
143
143
|
* - Position relative to element (flips when there is no room)
|
|
144
144
|
*/
|
|
145
|
-
position?: import("../elements.js").TooltipPosition;
|
|
145
|
+
position?: import("../elements.js").TooltipPosition | undefined;
|
|
146
146
|
/**
|
|
147
147
|
* - Alias of `position`
|
|
148
148
|
*/
|
|
149
|
-
placement?: import("../elements.js").TooltipPosition;
|
|
149
|
+
placement?: import("../elements.js").TooltipPosition | undefined;
|
|
150
150
|
/**
|
|
151
151
|
* - How to trigger; several separated by spaces ('hover focus')
|
|
152
152
|
*/
|
|
153
|
-
trigger?: "
|
|
153
|
+
trigger?: "click" | "focus" | (string & {}) | "manual" | "hover" | undefined;
|
|
154
154
|
/**
|
|
155
155
|
* - Show delay in ms, or {show, hide}
|
|
156
156
|
*/
|
|
157
|
-
delay?: number | TooltipDelay;
|
|
157
|
+
delay?: number | TooltipDelay | undefined;
|
|
158
158
|
/**
|
|
159
159
|
* - Hide delay in ms
|
|
160
160
|
*/
|
|
161
|
-
hideDelay?: number;
|
|
161
|
+
hideDelay?: number | undefined;
|
|
162
162
|
/**
|
|
163
163
|
* - Fade in and out
|
|
164
164
|
*/
|
|
165
|
-
animation?: boolean;
|
|
165
|
+
animation?: boolean | undefined;
|
|
166
166
|
/**
|
|
167
167
|
* - Gap in px between target and bubble
|
|
168
168
|
*/
|
|
169
|
-
offset?: number;
|
|
169
|
+
offset?: number | undefined;
|
|
170
170
|
/**
|
|
171
171
|
* - String content is HTML (sanitised unless `safe: false`), not text
|
|
172
172
|
*/
|
|
173
|
-
html?: boolean;
|
|
173
|
+
html?: boolean | undefined;
|
|
174
174
|
/**
|
|
175
175
|
* - Sanitise HTML content
|
|
176
176
|
*/
|
|
177
|
-
safe?: boolean;
|
|
177
|
+
safe?: boolean | undefined;
|
|
178
178
|
/**
|
|
179
179
|
* - Show at once
|
|
180
180
|
*/
|
|
181
|
-
visible?: boolean;
|
|
181
|
+
visible?: boolean | undefined;
|
|
182
182
|
/**
|
|
183
183
|
* - Extra classes on the bubble
|
|
184
184
|
*/
|
|
185
|
-
className?: string;
|
|
185
|
+
className?: string | undefined;
|
|
186
186
|
/**
|
|
187
187
|
* - Any CSS width; numbers are px
|
|
188
188
|
*/
|
|
189
|
-
maxWidth?: number |
|
|
189
|
+
maxWidth?: string | number | null | undefined;
|
|
190
190
|
/**
|
|
191
191
|
* - When the tooltip shows
|
|
192
192
|
*/
|
|
193
|
-
onShow?: ((tooltip: TooltipInstance) => void) | null;
|
|
193
|
+
onShow?: ((tooltip: TooltipInstance) => void) | null | undefined;
|
|
194
194
|
/**
|
|
195
195
|
* - When the tooltip hides
|
|
196
196
|
*/
|
|
197
|
-
onHide?: ((tooltip: TooltipInstance) => void) | null;
|
|
197
|
+
onHide?: ((tooltip: TooltipInstance) => void) | null | undefined;
|
|
198
198
|
};
|
|
199
199
|
export type TooltipInstance = Tooltip;
|
|
200
200
|
import Component from '../component.js';
|
|
@@ -51,62 +51,62 @@ export function virtualListFor(el: Element, options?: VirtualListOptions): Virtu
|
|
|
51
51
|
*/
|
|
52
52
|
export class VirtualList<T = any> extends Component {
|
|
53
53
|
static defaults: {
|
|
54
|
-
items:
|
|
54
|
+
items: null;
|
|
55
55
|
count: number;
|
|
56
|
-
getItem:
|
|
56
|
+
getItem: null;
|
|
57
57
|
itemHeight: number;
|
|
58
58
|
estimatedItemHeight: number;
|
|
59
59
|
overscan: number;
|
|
60
|
-
render:
|
|
60
|
+
render: null;
|
|
61
61
|
safe: boolean;
|
|
62
|
-
keyField:
|
|
63
|
-
label:
|
|
64
|
-
loadMore:
|
|
62
|
+
keyField: null;
|
|
63
|
+
label: null;
|
|
64
|
+
loadMore: null;
|
|
65
65
|
threshold: number;
|
|
66
|
-
loadingTemplate:
|
|
67
|
-
endTemplate:
|
|
68
|
-
errorTemplate:
|
|
66
|
+
loadingTemplate: null;
|
|
67
|
+
endTemplate: null;
|
|
68
|
+
errorTemplate: null;
|
|
69
69
|
rowClass: string;
|
|
70
|
-
onRender:
|
|
71
|
-
onScroll:
|
|
72
|
-
onLoadMore:
|
|
73
|
-
onLoaded:
|
|
74
|
-
onEnd:
|
|
75
|
-
onError:
|
|
76
|
-
onItemClick:
|
|
70
|
+
onRender: null;
|
|
71
|
+
onScroll: null;
|
|
72
|
+
onLoadMore: null;
|
|
73
|
+
onLoaded: null;
|
|
74
|
+
onEnd: null;
|
|
75
|
+
onError: null;
|
|
76
|
+
onItemClick: null;
|
|
77
77
|
};
|
|
78
78
|
/**
|
|
79
79
|
* @param {string|HTMLElement} element - The scrolling container
|
|
80
80
|
* @param {VirtualListOptions<T>} [options]
|
|
81
81
|
*/
|
|
82
82
|
constructor(element: string | HTMLElement, options?: VirtualListOptions<T>);
|
|
83
|
-
_id: string;
|
|
84
|
-
_rows: Map<any, any
|
|
85
|
-
_rowByEl: WeakMap<object, any
|
|
86
|
-
_heights: Map<any, any
|
|
87
|
-
_offsets: Float64Array;
|
|
88
|
-
_dirtyFrom: number;
|
|
89
|
-
_active: number;
|
|
90
|
-
_focusWithin: boolean;
|
|
91
|
-
_frame: number;
|
|
83
|
+
_id: string | undefined;
|
|
84
|
+
_rows: Map<any, any> | undefined;
|
|
85
|
+
_rowByEl: WeakMap<object, any> | undefined;
|
|
86
|
+
_heights: Map<any, any> | undefined;
|
|
87
|
+
_offsets: Float64Array<ArrayBuffer> | null;
|
|
88
|
+
_dirtyFrom: number | undefined;
|
|
89
|
+
_active: number | undefined;
|
|
90
|
+
_focusWithin: boolean | undefined;
|
|
91
|
+
_frame: number | undefined;
|
|
92
92
|
_range: {
|
|
93
93
|
start: number;
|
|
94
94
|
end: number;
|
|
95
|
-
};
|
|
95
|
+
} | undefined;
|
|
96
96
|
_load: {
|
|
97
97
|
busy: boolean;
|
|
98
98
|
done: boolean;
|
|
99
|
-
error:
|
|
99
|
+
error: null;
|
|
100
100
|
page: number;
|
|
101
101
|
gen: number;
|
|
102
|
-
};
|
|
103
|
-
_statusHeight: number;
|
|
102
|
+
} | undefined;
|
|
103
|
+
_statusHeight: number | undefined;
|
|
104
104
|
_setData(items: any, count: any, getItem: any): void;
|
|
105
|
-
_items: any[];
|
|
106
|
-
_count: number;
|
|
105
|
+
_items: any[] | null | undefined;
|
|
106
|
+
_count: number | null | undefined;
|
|
107
107
|
_getItem: any;
|
|
108
108
|
/** How many rows there are. */
|
|
109
|
-
get count(): number;
|
|
109
|
+
get count(): number | null | undefined;
|
|
110
110
|
_itemAt(i: any): any;
|
|
111
111
|
_keyOf(item: any, i: any): any;
|
|
112
112
|
get _fixed(): boolean;
|
|
@@ -127,12 +127,12 @@ export class VirtualList<T = any> extends Component {
|
|
|
127
127
|
*/
|
|
128
128
|
getVisibleRange(): VirtualListRange;
|
|
129
129
|
_build(): void;
|
|
130
|
-
_original: DocumentFragment;
|
|
131
|
-
_spacer: HTMLDivElement;
|
|
132
|
-
_list: HTMLDivElement;
|
|
133
|
-
_status: HTMLDivElement;
|
|
134
|
-
_hostObserver: ResizeObserver;
|
|
135
|
-
_rowObserver: ResizeObserver;
|
|
130
|
+
_original: DocumentFragment | null | undefined;
|
|
131
|
+
_spacer: HTMLDivElement | undefined;
|
|
132
|
+
_list: HTMLDivElement | null | undefined;
|
|
133
|
+
_status: HTMLDivElement | undefined;
|
|
134
|
+
_hostObserver: ResizeObserver | null | undefined;
|
|
135
|
+
_rowObserver: ResizeObserver | null | undefined;
|
|
136
136
|
_schedule(): void;
|
|
137
137
|
_onScroll: () => void;
|
|
138
138
|
_makeRow(): HTMLDivElement;
|
|
@@ -267,44 +267,44 @@ export type VirtualListRange = {
|
|
|
267
267
|
*/
|
|
268
268
|
export type VirtualListTemplate = string | Node | ((error?: unknown) => string | Node | null) | null;
|
|
269
269
|
export type VirtualListOptions<T = any> = {
|
|
270
|
-
items?: T[] | null;
|
|
270
|
+
items?: T[] | null | undefined;
|
|
271
271
|
/**
|
|
272
272
|
* - With getItem, instead of items
|
|
273
273
|
*/
|
|
274
|
-
count?: number;
|
|
275
|
-
getItem?: ((index: number) => T) | null;
|
|
274
|
+
count?: number | undefined;
|
|
275
|
+
getItem?: ((index: number) => T) | null | undefined;
|
|
276
276
|
/**
|
|
277
277
|
* - px, or 'auto' to measure each row (default 40)
|
|
278
278
|
*/
|
|
279
|
-
itemHeight?: number | "auto";
|
|
279
|
+
itemHeight?: number | "auto" | undefined;
|
|
280
280
|
/**
|
|
281
281
|
* - Height assumed for unmeasured rows in 'auto' mode (default 40)
|
|
282
282
|
*/
|
|
283
|
-
estimatedItemHeight?: number;
|
|
283
|
+
estimatedItemHeight?: number | undefined;
|
|
284
284
|
/**
|
|
285
285
|
* - Rows rendered beyond each edge (default 4)
|
|
286
286
|
*/
|
|
287
|
-
overscan?: number;
|
|
287
|
+
overscan?: number | undefined;
|
|
288
288
|
/**
|
|
289
289
|
* - A string is HTML (sanitised unless safe: false); an Element goes in as it is
|
|
290
290
|
*/
|
|
291
|
-
render?: ((item: T, index: number) => string | Node) | null;
|
|
291
|
+
render?: ((item: T, index: number) => string | Node) | null | undefined;
|
|
292
292
|
/**
|
|
293
293
|
* - false: render() strings are inserted unsanitised (default true)
|
|
294
294
|
*/
|
|
295
|
-
safe?: boolean;
|
|
295
|
+
safe?: boolean | undefined;
|
|
296
296
|
/**
|
|
297
297
|
* - Property name or function giving each item a stable key (default: the index)
|
|
298
298
|
*/
|
|
299
|
-
keyField?: string | ((item: T, index: number) => unknown) | null;
|
|
299
|
+
keyField?: string | ((item: T, index: number) => unknown) | null | undefined;
|
|
300
300
|
/**
|
|
301
301
|
* - aria-label for the list
|
|
302
302
|
*/
|
|
303
|
-
label?: string | null;
|
|
303
|
+
label?: string | null | undefined;
|
|
304
304
|
/**
|
|
305
305
|
* - Extra class on every row
|
|
306
306
|
*/
|
|
307
|
-
rowClass?: string;
|
|
307
|
+
rowClass?: string | undefined;
|
|
308
308
|
/**
|
|
309
309
|
* - Called near the end; resolves to the next items, or {items, done}
|
|
310
310
|
*/
|
|
@@ -314,27 +314,27 @@ export type VirtualListOptions<T = any> = {
|
|
|
314
314
|
}) => Promise<T[] | {
|
|
315
315
|
items: T[];
|
|
316
316
|
done?: boolean;
|
|
317
|
-
}>) | null;
|
|
317
|
+
}>) | null | undefined;
|
|
318
318
|
/**
|
|
319
319
|
* - px from the end at which loadMore is called (default 200)
|
|
320
320
|
*/
|
|
321
|
-
threshold?: number;
|
|
322
|
-
loadingTemplate?: VirtualListTemplate;
|
|
323
|
-
endTemplate?: VirtualListTemplate;
|
|
321
|
+
threshold?: number | undefined;
|
|
322
|
+
loadingTemplate?: VirtualListTemplate | undefined;
|
|
323
|
+
endTemplate?: VirtualListTemplate | undefined;
|
|
324
324
|
/**
|
|
325
325
|
* - A [data-vlist-retry] element inside it retries
|
|
326
326
|
*/
|
|
327
|
-
errorTemplate?: VirtualListTemplate;
|
|
328
|
-
onRender?: ((range: VirtualListRange) => void) | null;
|
|
329
|
-
onScroll?: ((visible: VirtualListRange) => void) | null;
|
|
327
|
+
errorTemplate?: VirtualListTemplate | undefined;
|
|
328
|
+
onRender?: ((range: VirtualListRange) => void) | null | undefined;
|
|
329
|
+
onScroll?: ((visible: VirtualListRange) => void) | null | undefined;
|
|
330
330
|
onLoadMore?: ((info: {
|
|
331
331
|
count: number;
|
|
332
332
|
page: number;
|
|
333
|
-
}) => void) | null;
|
|
334
|
-
onLoaded?: ((items: T[]) => void) | null;
|
|
335
|
-
onEnd?: (() => void) | null;
|
|
336
|
-
onError?: ((error: unknown) => void) | null;
|
|
337
|
-
onItemClick?: ((item: T, index: number, event: MouseEvent | KeyboardEvent) => void) | null;
|
|
333
|
+
}) => void) | null | undefined;
|
|
334
|
+
onLoaded?: ((items: T[]) => void) | null | undefined;
|
|
335
|
+
onEnd?: (() => void) | null | undefined;
|
|
336
|
+
onError?: ((error: unknown) => void) | null | undefined;
|
|
337
|
+
onItemClick?: ((item: T, index: number, event: MouseEvent | KeyboardEvent) => void) | null | undefined;
|
|
338
338
|
};
|
|
339
339
|
export type VirtualListInstance<T = any> = VirtualList<T>;
|
|
340
340
|
import Component from '../component.js';
|
|
@@ -2,7 +2,7 @@ export namespace configEngine {
|
|
|
2
2
|
let _configs: Map<any, any>;
|
|
3
3
|
let _components: Map<any, any>;
|
|
4
4
|
let _eventHandlers: Map<any, any>;
|
|
5
|
-
let _initCallbacks:
|
|
5
|
+
let _initCallbacks: never[];
|
|
6
6
|
let _domReady: boolean;
|
|
7
7
|
let _autoWrap: boolean;
|
|
8
8
|
/**
|
|
@@ -117,19 +117,19 @@ export type ComponentType = "card" | "modal" | "tabs" | "accordion" | "tooltip"
|
|
|
117
117
|
* Properties applied to the matched elements once (`initial`) - each is the collection method of the same name.
|
|
118
118
|
*/
|
|
119
119
|
export type InitialProperties = {
|
|
120
|
-
css?: Record<string, string | number
|
|
120
|
+
css?: Record<string, string | number> | undefined;
|
|
121
121
|
/**
|
|
122
122
|
* Converted to text, as textContent does
|
|
123
123
|
*/
|
|
124
|
-
text?: string | number | boolean;
|
|
125
|
-
html?: string | number | boolean;
|
|
126
|
-
addClass?: string;
|
|
127
|
-
removeClass?: string;
|
|
128
|
-
toggleClass?: string;
|
|
124
|
+
text?: string | number | boolean | undefined;
|
|
125
|
+
html?: string | number | boolean | undefined;
|
|
126
|
+
addClass?: string | undefined;
|
|
127
|
+
removeClass?: string | undefined;
|
|
128
|
+
toggleClass?: string | undefined;
|
|
129
129
|
/**
|
|
130
130
|
* Attribute name -> value (converted to text)
|
|
131
131
|
*/
|
|
132
|
-
attr?: Record<string, string | number | boolean
|
|
132
|
+
attr?: Record<string, string | number | boolean> | undefined;
|
|
133
133
|
};
|
|
134
134
|
/**
|
|
135
135
|
* A declarative event action: applied to `target` (a selector) or else to the element the event fired on.
|
|
@@ -138,20 +138,20 @@ export type EventAction = {
|
|
|
138
138
|
/**
|
|
139
139
|
* Selector of the elements to change (default: the event target)
|
|
140
140
|
*/
|
|
141
|
-
target?: string;
|
|
142
|
-
css?: Record<string, string | number
|
|
141
|
+
target?: string | undefined;
|
|
142
|
+
css?: Record<string, string | number> | undefined;
|
|
143
143
|
/**
|
|
144
144
|
* Converted to text, as textContent does
|
|
145
145
|
*/
|
|
146
|
-
text?: string | number | boolean;
|
|
147
|
-
html?: string | number | boolean;
|
|
148
|
-
addClass?: string;
|
|
149
|
-
removeClass?: string;
|
|
150
|
-
toggleClass?: string;
|
|
146
|
+
text?: string | number | boolean | undefined;
|
|
147
|
+
html?: string | number | boolean | undefined;
|
|
148
|
+
addClass?: string | undefined;
|
|
149
|
+
removeClass?: string | undefined;
|
|
150
|
+
toggleClass?: string | undefined;
|
|
151
151
|
/**
|
|
152
152
|
* Written to the console
|
|
153
153
|
*/
|
|
154
|
-
log?: string;
|
|
154
|
+
log?: string | undefined;
|
|
155
155
|
};
|
|
156
156
|
/**
|
|
157
157
|
* An event handler in a setup config. `this` is the event target.
|
|
@@ -176,23 +176,23 @@ export type SelectorConfig = {
|
|
|
176
176
|
/**
|
|
177
177
|
* Component to create on the selector
|
|
178
178
|
*/
|
|
179
|
-
component?: ComponentType;
|
|
179
|
+
component?: ComponentType | undefined;
|
|
180
180
|
/**
|
|
181
181
|
* Options for that component (`schema` and `data` for `form`)
|
|
182
182
|
*/
|
|
183
|
-
options?: Record<string, any
|
|
183
|
+
options?: Record<string, any> | undefined;
|
|
184
184
|
/**
|
|
185
185
|
* Applied to the matched elements once
|
|
186
186
|
*/
|
|
187
|
-
initial?: InitialProperties;
|
|
187
|
+
initial?: InitialProperties | undefined;
|
|
188
188
|
/**
|
|
189
189
|
* Event name -> what it runs
|
|
190
190
|
*/
|
|
191
|
-
events?: Record<string, EventActions
|
|
191
|
+
events?: Record<string, EventActions> | undefined;
|
|
192
192
|
/**
|
|
193
193
|
* Called first with the matched elements
|
|
194
194
|
*/
|
|
195
|
-
init?: (this: import("./dom.js").DommaCollection, $el: import("./dom.js").DommaCollection) => void;
|
|
195
|
+
init?: ((this: import("./dom.js").DommaCollection, $el: import("./dom.js").DommaCollection) => void) | undefined;
|
|
196
196
|
};
|
|
197
197
|
/**
|
|
198
198
|
* Configuration keyed by selector.
|
|
@@ -20,9 +20,9 @@ export function resolveCursorColours(doc?: Document): {
|
|
|
20
20
|
* @returns {string}
|
|
21
21
|
*/
|
|
22
22
|
export function cursorSvg({ size, fill, halo }?: {
|
|
23
|
-
size?: number;
|
|
24
|
-
fill?: string;
|
|
25
|
-
halo?: string;
|
|
23
|
+
size?: number | undefined;
|
|
24
|
+
fill?: string | undefined;
|
|
25
|
+
halo?: string | undefined;
|
|
26
26
|
}): string;
|
|
27
27
|
/**
|
|
28
28
|
* The full CSS `cursor` value, keyword fallback included.
|
|
@@ -35,7 +35,7 @@ export function cursorSvg({ size, fill, halo }?: {
|
|
|
35
35
|
* @param {Object} [options] see cursorSvg
|
|
36
36
|
* @returns {string}
|
|
37
37
|
*/
|
|
38
|
-
export function cursorValue(options?:
|
|
38
|
+
export function cursorValue(options?: Object): string;
|
|
39
39
|
/**
|
|
40
40
|
* Add or replace one menu's cursor rule.
|
|
41
41
|
*
|
|
@@ -48,8 +48,8 @@ export function cursorValue(options?: any): string;
|
|
|
48
48
|
*/
|
|
49
49
|
export function setCursorRule(id: string | number, selector: string, spec: {
|
|
50
50
|
kind: "glyph" | "keyword" | "custom";
|
|
51
|
-
size?: number;
|
|
52
|
-
value?: string;
|
|
51
|
+
size?: number | undefined;
|
|
52
|
+
value?: string | undefined;
|
|
53
53
|
}): void;
|
|
54
54
|
/** Drop one menu's rule. Called from ContextMenu#destroy. */
|
|
55
55
|
export function clearCursorRule(id: any): void;
|