x4js 1.5.21 → 1.5.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/lib/cjs/index.js +1 -1
  2. package/lib/cjs/index.js.map +1 -1
  3. package/lib/esm/index.mjs +1 -1
  4. package/lib/esm/index.mjs.map +1 -1
  5. package/lib/src/version.ts +1 -1
  6. package/lib/types/action.d.ts +57 -0
  7. package/lib/types/app_sockets.d.ts +29 -0
  8. package/lib/types/application.d.ts +104 -0
  9. package/lib/types/autocomplete.d.ts +58 -0
  10. package/lib/types/base_component.d.ts +88 -0
  11. package/lib/types/button.d.ts +151 -0
  12. package/lib/types/calendar.d.ts +82 -0
  13. package/lib/types/canvas.d.ts +92 -0
  14. package/lib/types/cardview.d.ts +87 -0
  15. package/lib/types/checkbox.d.ts +77 -0
  16. package/lib/types/color.d.ts +148 -0
  17. package/lib/types/colorpicker.d.ts +107 -0
  18. package/lib/types/combobox.d.ts +107 -0
  19. package/lib/types/component.d.ts +601 -0
  20. package/lib/types/datastore.d.ts +396 -0
  21. package/lib/types/dialog.d.ts +175 -0
  22. package/lib/types/dom_events.d.ts +302 -0
  23. package/lib/types/drag_manager.d.ts +54 -0
  24. package/lib/types/drawtext.d.ts +48 -0
  25. package/lib/types/fileupload.d.ts +64 -0
  26. package/lib/types/form.d.ts +133 -0
  27. package/lib/types/formatters.d.ts +35 -0
  28. package/lib/types/gridview.d.ts +175 -0
  29. package/lib/types/i18n.d.ts +73 -0
  30. package/lib/types/icon.d.ts +64 -0
  31. package/lib/types/image.d.ts +55 -0
  32. package/lib/types/index.d.ts +84 -0
  33. package/lib/types/input.d.ts +91 -0
  34. package/lib/types/label.d.ts +58 -0
  35. package/lib/types/layout.d.ts +87 -0
  36. package/lib/types/link.d.ts +50 -0
  37. package/lib/types/listview.d.ts +178 -0
  38. package/lib/types/md5.d.ts +61 -0
  39. package/lib/types/menu.d.ts +130 -0
  40. package/lib/types/messagebox.d.ts +69 -0
  41. package/lib/types/panel.d.ts +47 -0
  42. package/lib/types/popup.d.ts +75 -0
  43. package/lib/types/property_editor.d.ts +71 -0
  44. package/lib/types/radiobtn.d.ts +73 -0
  45. package/lib/types/rating.d.ts +53 -0
  46. package/lib/types/request.d.ts +52 -0
  47. package/lib/types/router.d.ts +42 -0
  48. package/lib/types/settings.d.ts +37 -0
  49. package/lib/types/sidebarview.d.ts +49 -0
  50. package/lib/types/spreadsheet.d.ts +222 -0
  51. package/lib/types/styles.d.ts +85 -0
  52. package/lib/types/svgcomponent.d.ts +215 -0
  53. package/lib/types/tabbar.d.ts +58 -0
  54. package/lib/types/tabview.d.ts +49 -0
  55. package/lib/types/textarea.d.ts +77 -0
  56. package/lib/types/textedit.d.ts +123 -0
  57. package/lib/types/toaster.d.ts +42 -0
  58. package/lib/types/tools.d.ts +394 -0
  59. package/lib/types/tooltips.d.ts +46 -0
  60. package/lib/types/treeview.d.ts +144 -0
  61. package/lib/types/version.d.ts +29 -0
  62. package/lib/types/x4dom.d.ts +49 -0
  63. package/lib/types/x4events.d.ts +269 -0
  64. package/lib/types/x4react.d.ts +41 -0
  65. package/package.json +3 -2
@@ -0,0 +1,601 @@
1
+ /**
2
+ * ___ ___ __
3
+ * \ \/ / / _
4
+ * \ / /_| |_
5
+ * / \____ _|
6
+ * /__/\__\ |_|
7
+ *
8
+ * @file components.ts
9
+ * @author Etienne Cochard
10
+ *
11
+ * Copyright (c) 2019-2022 R-libre ingenierie
12
+ *
13
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ * of this software and associated documentation files (the "Software"), to deal
15
+ * in the Software without restriction, including without limitation the rights
16
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
17
+ * of the Software, and to permit persons to whom the Software is furnished to do so,
18
+ * subject to the following conditions:
19
+ * The above copyright notice and this permission notice shall be included in all copies
20
+ * or substantial portions of the Software.
21
+ *
22
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
23
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
24
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
25
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28
+ */
29
+ /**
30
+ * @todo
31
+ * create Container class
32
+ */
33
+ import { Rect, Size, HtmlString, Constructor } from './tools';
34
+ import { Stylesheet, ComputedStyle } from './styles';
35
+ import { BasicEvent, EventCallback } from './x4events';
36
+ import { BaseComponent, BaseComponentProps, BaseComponentEventMap } from './base_component';
37
+ import { IDOMEvents, X4ElementEventMap } from './dom_events';
38
+ export { HtmlString, isHtmlString, html } from './tools';
39
+ export interface EventHandler<T> {
40
+ (ev: T): any;
41
+ }
42
+ export interface ICaptureInfo {
43
+ initiator: Component;
44
+ handler: EventHandler<UIEvent>;
45
+ iframes: NodeListOf<HTMLIFrameElement>;
46
+ }
47
+ /** @ignore properties without 'px' unit */
48
+ export declare const _x4_unitless: {
49
+ animationIterationCount: number;
50
+ borderImageOutset: number;
51
+ borderImageSlice: number;
52
+ borderImageWidth: number;
53
+ boxFlex: number;
54
+ boxFlexGroup: number;
55
+ boxOrdinalGroup: number;
56
+ columnCount: number;
57
+ flex: number;
58
+ flexGrow: number;
59
+ flexPositive: number;
60
+ flexShrink: number;
61
+ flexNegative: number;
62
+ flexOrder: number;
63
+ gridRow: number;
64
+ gridColumn: number;
65
+ fontWeight: number;
66
+ lineClamp: number;
67
+ lineHeight: number;
68
+ opacity: number;
69
+ order: number;
70
+ orphans: number;
71
+ tabSize: number;
72
+ widows: number;
73
+ zIndex: number;
74
+ zoom: number;
75
+ fillOpacity: number;
76
+ floodOpacity: number;
77
+ stopOpacity: number;
78
+ strokeDasharray: number;
79
+ strokeDashoffset: number;
80
+ strokeMiterlimit: number;
81
+ strokeOpacity: number;
82
+ strokeWidth: number;
83
+ };
84
+ /**
85
+ *
86
+ */
87
+ export type VoidCallback = () => void;
88
+ export type ComponentOrString = Component | string | HtmlString;
89
+ export type ComponentContent = ComponentOrString | ComponentOrString[];
90
+ interface IMap<T> {
91
+ [key: string]: T;
92
+ }
93
+ /**
94
+ * DblClick Event
95
+ * double click event
96
+ */
97
+ export interface EvDblClick extends BasicEvent {
98
+ }
99
+ export declare function EvDblClick(context?: any): EvDblClick;
100
+ /**
101
+ * DblFocus Event
102
+ * double click event
103
+ */
104
+ export interface EvFocus extends BasicEvent {
105
+ readonly focus: boolean;
106
+ }
107
+ export declare function EvFocus(focus?: boolean, context?: any): EvFocus;
108
+ /**
109
+ * basic event map of Component
110
+ */
111
+ export interface CEventMap extends BaseComponentEventMap {
112
+ }
113
+ /**
114
+ * Basic properties of every Component
115
+ */
116
+ export interface CProps<T extends CEventMap = CEventMap> extends BaseComponentProps<T> {
117
+ tag?: string;
118
+ ns?: string;
119
+ cls?: string;
120
+ id?: string;
121
+ style?: IMap<string | number>;
122
+ attrs?: object;
123
+ dom_events?: IDOMEvents;
124
+ data?: any;
125
+ content?: ComponentContent;
126
+ tooltip?: string;
127
+ ref?: string;
128
+ left?: number;
129
+ top?: number;
130
+ width?: number | string;
131
+ height?: number | string;
132
+ tabIndex?: number | boolean;
133
+ flex?: number | string;
134
+ enabled?: boolean;
135
+ }
136
+ /**
137
+ *
138
+ */
139
+ export declare class Component<P extends CProps<CEventMap> = CProps<CEventMap>, E extends CEventMap = CEventMap> extends BaseComponent<P, E> {
140
+ private m_dom;
141
+ private m_iprops;
142
+ private static __sb_width;
143
+ private static __comp_guid;
144
+ private static __privateEvents;
145
+ private static __sizeObserver;
146
+ private static __createObserver;
147
+ private static __capture;
148
+ private static __capture_mask;
149
+ private static __css;
150
+ constructor(props?: P);
151
+ /**
152
+ *
153
+ */
154
+ get uid(): number;
155
+ /**
156
+ * change the component content
157
+ * @param content new content or null
158
+ */
159
+ setContent(content: ComponentContent, refreshAll?: boolean): void;
160
+ getContent(): ComponentContent;
161
+ /**
162
+ * add a new child to the component content
163
+ * @param content
164
+ */
165
+ appendChild(content: ComponentContent): void;
166
+ /**
167
+ *
168
+ */
169
+ setTag(tag: string, namespace?: string): void;
170
+ /**
171
+ * get the Component data value
172
+ * @param name name to get
173
+ */
174
+ getData(name: string | Symbol): any;
175
+ /**
176
+ * set the Component data value
177
+ * @param name name to get
178
+ * @param value
179
+ */
180
+ setData(name: string | Symbol, value: any): void;
181
+ /**
182
+ * return the DOM associated with the Component (if any)
183
+ */
184
+ get dom(): HTMLElement;
185
+ /**
186
+ * shows the element
187
+ * @param show
188
+ */
189
+ show(show?: boolean): void;
190
+ /**
191
+ * hides the element
192
+ */
193
+ hide(): void;
194
+ /**
195
+ * enable or disable the element
196
+ * @param enable
197
+ */
198
+ enable(enable?: boolean): void;
199
+ /**
200
+ * disable the element
201
+ */
202
+ disable(): void;
203
+ /**
204
+ * set the focus on the element
205
+ */
206
+ focus(): void;
207
+ /**
208
+ * change the object style
209
+ * @param style - style to add
210
+ * @example ```typescript
211
+ * el.setStyle( {left:100} );
212
+ */
213
+ setStyle(style: object): void;
214
+ /**
215
+ * change a style value
216
+ * @param name string style nale
217
+ * @param value any style value or null to remove style
218
+ */
219
+ setStyleValue(name: string, value: any): void;
220
+ private _setDomStyleValue;
221
+ /**
222
+ * compute the element style
223
+ * @return all styles computed
224
+ */
225
+ getComputedStyle(pseudoElt?: string): ComputedStyle;
226
+ /**
227
+ * return a single stype value
228
+ * @param name - value to get
229
+ */
230
+ getStyleValue(name: string): any;
231
+ /**
232
+ * define the elements attributes
233
+ * @param attrs
234
+ */
235
+ setAttributes(attrs: any): void;
236
+ /**
237
+ * change a single attribute
238
+ * @param name attribute name
239
+ * @param value new value
240
+ */
241
+ setAttribute(name: string, value: any): void;
242
+ private _setDomAttribute;
243
+ /**
244
+ * remove an atrribute
245
+ * @param name name of the attribute
246
+ */
247
+ removeAttribute(name: string): void;
248
+ /**
249
+ * get an attribute value
250
+ * @param {string} name - attribute name
251
+ * @return {string} attribute value
252
+ * @example ```typescript
253
+ * let chk = el.getAttribute( 'checked' );
254
+ * @review double cache
255
+ */
256
+ getAttribute(name: string): string;
257
+ /**
258
+ * check if the element has an attribute
259
+ * @param name attribute name
260
+ * @return true is attribute is present
261
+ * @example ```typescript
262
+ * if( el.hasAttribute('checked') ) {
263
+ * }
264
+ */
265
+ hasAttribute(name: string): boolean;
266
+ /**
267
+ * a some classnames to the component
268
+ * classes can be separated by a space
269
+ * @param cls class to add
270
+ * @example ```typescript
271
+ * addClass( 'my class name @flex' );
272
+ */
273
+ addClass(name: string): void;
274
+ /**
275
+ * Remove a class from the element
276
+ * @param {string|array} name - classes in string form can be space separated
277
+ *
278
+ * @example ```typescript
279
+ * el.removeClass( 'myclass' );
280
+ * el.removeClass( 'myclass1 myclass2' );
281
+ */
282
+ removeClass(name: string): void;
283
+ /**
284
+ *
285
+ * @param cls
286
+ * @param set
287
+ */
288
+ setClass(cls: string, set: boolean): this;
289
+ /**
290
+ * Toggle a class from the element (if present remove, if absent add)
291
+ * @param {string|string[]} name - classes in string form can be space separated
292
+ * @example ```typescript
293
+ * el.toggleClass( 'myclass' );
294
+ * el.toggleClass( 'myclass1 myclass2');
295
+ * el.toggleClass( ['myclass1','myclass2']);
296
+ */
297
+ toggleClass(name: string): void;
298
+ /**
299
+ * check if the object has the class
300
+ * @param cls
301
+ */
302
+ hasClass(cls: string): boolean;
303
+ /**
304
+ * remove all classes from the object
305
+ * this is usefull for component recycling & reusing
306
+ */
307
+ clearClasses(): string;
308
+ _build(): HTMLElement;
309
+ render(props: P): void;
310
+ _createDOM(): HTMLElement;
311
+ protected _setTabIndex(tabIndex: number | boolean, defValue?: number): void;
312
+ private static _observeCreation;
313
+ dispose(): void;
314
+ protected _dispose(with_dom: boolean, timers: boolean): void;
315
+ componentDisposed(): void;
316
+ componentCreated(): void;
317
+ /**
318
+ *
319
+ */
320
+ update(delay?: number): void;
321
+ /**
322
+ * empty the node
323
+ */
324
+ _empty(): void;
325
+ _updateContent(): void;
326
+ /**
327
+ * @return the bounding rectangle
328
+ * @example ```typescript
329
+ * let rc = el.getBoundingRect( );
330
+ * console.log( rc.left, rc.top, rc.right, rc.bottom );
331
+ */
332
+ getBoundingRect(withMargins?: boolean): Rect;
333
+ /**
334
+ * append a new dom event handler
335
+ * @param name - you can specify multiple names separated by a space
336
+ * @param handler
337
+ * @example
338
+ *
339
+ * this.setDomEvent( 'drag drop', this._handleDrag, this );
340
+ * this.setDomEvent( 'dblclick', this._handleDblClick, this );
341
+ */
342
+ setDomEvent<K extends keyof X4ElementEventMap>(type: K, listener: (this: HTMLDivElement, ev: X4ElementEventMap[K]) => void): void;
343
+ private _setDomEvent;
344
+ /**
345
+ *
346
+ */
347
+ clearDomEvent<K extends keyof X4ElementEventMap>(type: K): void;
348
+ /**
349
+ *
350
+ * @param name
351
+ * @param handler
352
+ */
353
+ createEvent(name: string, handler: Function): void;
354
+ /**
355
+ * dispatch a dom event to the appropriated component
356
+ * called by the system
357
+ */
358
+ private static _dispatchEvent;
359
+ /**
360
+ * dispatch a dom event to the appropriated component
361
+ * called by the system
362
+ */
363
+ private static _dispatchUnbubbleEvent;
364
+ /**
365
+ * called when a size change on an observed component
366
+ */
367
+ private static _observeSize;
368
+ /**
369
+ * enum all children recursively
370
+ * @param recursive - if true do a full sub-child search
371
+ * @param cb - callback
372
+ * return true to stop enumeration
373
+ */
374
+ enumChilds(cb: (child: Component) => boolean | void, recursive?: boolean): boolean;
375
+ /**
376
+ * apprend a child to the DOM
377
+ * @param props child to append (or string)
378
+ */
379
+ private _appendChild;
380
+ /**
381
+ * generate classes from the component inheritance
382
+ * @example
383
+ * Button extends Component will give
384
+ * x-comp x-button
385
+ */
386
+ private _genClassName;
387
+ /**
388
+ * prepend the system class name prefix on a name if needed (if class starts with @)
389
+ */
390
+ private _makeCls;
391
+ /**
392
+ *
393
+ */
394
+ private static dispatchCaptures;
395
+ /**
396
+ * capture mouse events
397
+ * @param capture name of the current capture
398
+ * @param callback funciton to call on captured mouse events
399
+ *
400
+ * @example
401
+ * Component.setCapture( this, ( ev: MouseEvent, initiator: Component ) => {
402
+ * if( ev.type=='mousemove' ) {
403
+ * this.setStyle( {
404
+ * left: ev.clientX,
405
+ * top: ev.clientY
406
+ * } );
407
+ * }
408
+ * else if( ev.type=='mouseup' ) {
409
+ * Component.releaseCapture( );
410
+ * }
411
+ * } );
412
+ */
413
+ protected static setCapture(initiator: Component, listener: EventHandler<UIEvent>): void;
414
+ protected static releaseCapture(): void;
415
+ /**
416
+ * ensure the component is visible
417
+ * @param: alignToTop
418
+ */
419
+ scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
420
+ /**
421
+ * search for a given css selector
422
+ * @param selector
423
+ * @returns child or null
424
+ */
425
+ queryItem<T extends Component>(selector: string): T;
426
+ queryAll(selector: string, cb?: (el: Component) => void): HTMLElement[];
427
+ /**
428
+ * find a child with the given ID
429
+ * @param id id (without '#')
430
+ * @returns child or null
431
+ *
432
+ * @example
433
+ * let btn = this.childWithId<Button>( 'myButtonId' );
434
+ */
435
+ itemWithId<T extends Component>(id: string): T;
436
+ /**
437
+ * find a child with given ref
438
+ * @param ref
439
+ * @return found child or null
440
+ */
441
+ itemWithRef<T = Component>(ref: string): T;
442
+ /**
443
+ *
444
+ */
445
+ get ref(): string;
446
+ /**
447
+ *
448
+ */
449
+ static getCss(): Stylesheet;
450
+ /**
451
+ * return the parent element
452
+ * care, object must have been created (dom!=null)
453
+ */
454
+ getParent(): Component;
455
+ /**
456
+ * get a component from a DOM element
457
+ * move up to the hierarchy to find the request class type.
458
+ * @param dom
459
+ * @param classname
460
+ * @returns
461
+ *
462
+ * @example
463
+ *
464
+ * with a DOM like that:
465
+ * Button
466
+ * Label
467
+ * Icon <- the DOM you have (dom-icon)
468
+ *
469
+ * let btn = Component.getElement( dom-icon, Button );
470
+ */
471
+ static getElement<T extends Component>(dom: HTMLElement | Element, classname?: Constructor<T> | string): T;
472
+ /**
473
+ * compute the scrollbar size ( width = height)
474
+ */
475
+ static getScrollbarSize(): any;
476
+ /**
477
+ * check if the Component is visible to the user
478
+ */
479
+ isUserVisible(): boolean;
480
+ }
481
+ /**
482
+ * warp <b>temporarily</b> a DOM element to be able to acces to exact API
483
+ * @param dom dom element to wrap
484
+ * @review qui libere le fly_element ? -> timeout
485
+ */
486
+ export declare function flyWrap<T extends Component>(dom: HTMLElement | EventTarget): T;
487
+ /**
488
+ * simple flex spacer
489
+ */
490
+ export declare class Flex extends Component {
491
+ constructor(props?: CProps);
492
+ }
493
+ /**
494
+ * simple space between 2 elements
495
+ */
496
+ export declare class Space extends Component {
497
+ m_size: number | string;
498
+ constructor(size: number | string);
499
+ componentCreated(): void;
500
+ }
501
+ /**
502
+ * sizable separator
503
+ */
504
+ type SizeMode = null | 'minimize' | 'maximize' | 'restore';
505
+ export interface EvSize extends BasicEvent {
506
+ readonly size: Size;
507
+ readonly mode: SizeMode;
508
+ }
509
+ export declare function EvSize(size: Size, mode?: SizeMode, context?: any): EvSize;
510
+ interface SeparatorEventMap extends CEventMap {
511
+ resize?: EvSize;
512
+ }
513
+ interface SeparatorProps extends CProps<SeparatorEventMap> {
514
+ readonly orientation: 'vertical' | 'horizontal';
515
+ readonly sizing: 'before' | 'after';
516
+ readonly collapsible?: boolean;
517
+ }
518
+ export declare class Separator extends Component<SeparatorProps, SeparatorEventMap> {
519
+ m_irect: Rect;
520
+ m_delta: number;
521
+ m_target: Component;
522
+ constructor(props: SeparatorProps);
523
+ render(): void;
524
+ private _collapse;
525
+ private _mousedown;
526
+ _startMoving(x: number, y: number, ev: UIEvent): void;
527
+ private _pointerMoved;
528
+ private _findTarget;
529
+ }
530
+ /**
531
+ * properties
532
+ */
533
+ type SizerOverlaySens = 'left' | 'top' | 'right' | 'bottom' | 'topleft' | 'topright' | 'bottomleft' | 'bottomright';
534
+ export interface EvOverlayResize extends BasicEvent {
535
+ ui_event: UIEvent;
536
+ sens: SizerOverlaySens;
537
+ }
538
+ export declare function EvOverlayResize(ui_event: UIEvent, sens: SizerOverlaySens, context?: any): EvOverlayResize;
539
+ interface SizerOverlayEventMap extends CEventMap {
540
+ resize: EvSize;
541
+ rawresize: EvOverlayResize;
542
+ }
543
+ export interface SizerOverlayProps extends CProps<SizerOverlayEventMap> {
544
+ sens: SizerOverlaySens;
545
+ target: Component;
546
+ resize?: EventCallback<EvSize>;
547
+ }
548
+ export declare class SizerOverlay extends Component<SizerOverlayProps, SizerOverlayEventMap> {
549
+ private m_delta;
550
+ private m_irect;
551
+ constructor(props: SizerOverlayProps);
552
+ resetflex(event: UIEvent): void;
553
+ _mousedown(ev: UIEvent): void;
554
+ private _is_horz;
555
+ get sens(): SizerOverlaySens;
556
+ private _handle_mouse;
557
+ }
558
+ /**
559
+ * sequence: Shift+Ctrl+Alt+A
560
+ */
561
+ export interface Shortcut {
562
+ sequence: string;
563
+ name: string;
564
+ immediate: boolean;
565
+ callback?: (domTarget: any) => void;
566
+ }
567
+ interface EvShortcut extends BasicEvent {
568
+ name: string;
569
+ }
570
+ declare function EvShortcut(name: string): EvShortcut;
571
+ export interface ContainerEventMap extends CEventMap {
572
+ shortcut: EvShortcut;
573
+ }
574
+ export interface ContainerProps<E extends ContainerEventMap = ContainerEventMap> extends CProps<E> {
575
+ }
576
+ /**
577
+ * you can construct a Container as usual with it's properties but also directly with it's children array
578
+ *
579
+ * @example
580
+ * new Container( [
581
+ * child1,
582
+ * child2
583
+ * ])
584
+ */
585
+ export declare class Container<P extends ContainerProps = ContainerProps, E extends ContainerEventMap = ContainerEventMap> extends Component<P, E> {
586
+ private m_shortcuts;
587
+ constructor(props: P | ComponentOrString[]);
588
+ /**
589
+ * add an application shortcut
590
+ * @param sequence key sequence Shift+Ctrl+Alt+K
591
+ * @param callback callback to call
592
+ */
593
+ addShortcut(sequence: string | string[], name: string, callback?: EventHandler<KeyboardEvent>, immediate?: boolean): void;
594
+ /**
595
+ * remove all shortcuts for a target
596
+ */
597
+ removeShortcuts(): void;
598
+ /** @ignore this function is binded */
599
+ private _handleKeydown;
600
+ }
601
+ export type ComponentConstructor<T> = new (props: CProps) => T;