x4js 2.0.26 → 2.0.30
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/.vscode/launch.json +14 -0
- package/.vscode/settings.json +2 -0
- package/ai-comments.txt +97 -0
- package/demo/assets/house-light.svg +1 -0
- package/demo/assets/radio.svg +4 -0
- package/demo/index.html +12 -0
- package/demo/main.scss +23 -0
- package/demo/main.ts +324 -0
- package/demo/package.json +26 -0
- package/demo/scss.d.ts +4 -0
- package/demo/svg.d.ts +1 -0
- package/demo/tsconfig.json +14 -0
- package/lib/types/x4js.d.ts +0 -2374
- package/package.json +23 -47
- package/prepack.mjs +3 -0
- package/scripts/prepack.mjs +342 -0
- package/src/colors.scss +246 -0
- package/src/components/boxes/boxes.module.scss +1 -1
- package/src/components/boxes/boxes.ts +139 -28
- package/src/components/button/button.ts +80 -33
- package/src/components/combobox/combobox.ts +1 -1
- package/src/components/dialog/dialog.ts +4 -0
- package/src/components/gauge/gauge.module.scss +3 -0
- package/src/components/gauge/gauge.ts +1 -1
- package/src/components/gridview/gridview.ts +106 -8
- package/src/components/icon/icon.ts +42 -14
- package/src/components/input/input.ts +155 -76
- package/src/components/keyboard/keyboard.module.scss +1 -1
- package/src/components/keyboard/keyboard.ts +31 -9
- package/src/components/label/label.module.scss +9 -0
- package/src/components/label/label.ts +10 -6
- package/src/components/link/link.module.scss +44 -0
- package/src/components/link/link.ts +7 -1
- package/src/components/listbox/listbox.module.scss +18 -4
- package/src/components/listbox/listbox.ts +34 -15
- package/src/components/menu/menu.module.scss +14 -2
- package/src/components/menu/menu.ts +1 -1
- package/src/components/messages/messages.ts +13 -5
- package/src/components/panel/panel.module.scss +7 -0
- package/src/components/popup/popup.ts +14 -10
- package/src/components/propgrid/propgrid.ts +13 -3
- package/src/components/shared.scss +4 -0
- package/src/components/spreadsheet/spreadsheet.module.scss +308 -0
- package/src/components/spreadsheet/spreadsheet.ts +1223 -0
- package/src/components/tabs/tabs.module.scss +1 -0
- package/src/components/textarea/textarea.ts +8 -2
- package/src/components/textedit/textedit.ts +7 -0
- package/src/components/themes.scss +2 -0
- package/src/components/tooltips/tooltips.ts +15 -3
- package/src/core/component.ts +358 -162
- package/src/core/core_application.ts +129 -32
- package/src/core/core_colors.ts +382 -119
- package/src/core/core_data.ts +73 -86
- package/src/core/core_dom.ts +10 -0
- package/src/core/core_dragdrop.ts +32 -7
- package/src/core/core_element.ts +111 -4
- package/src/core/core_events.ts +48 -11
- package/src/core/core_i18n.ts +2 -0
- package/src/core/core_pdf.ts +454 -0
- package/src/core/core_router.ts +64 -5
- package/src/core/core_state.ts +1 -0
- package/src/core/core_styles.ts +11 -12
- package/src/core/core_svg.ts +348 -51
- package/src/core/core_tools.ts +105 -17
- package/src/x4.ts +1 -0
- package/src/x4tsx.d.ts +2 -1
- package/tsconfig.json +11 -0
- package/lib/README.txt +0 -20
- package/lib/cjs/x4.css +0 -1
- package/lib/cjs/x4.js +0 -2
- package/lib/esm/x4.css +0 -1
- package/lib/esm/x4.mjs +0 -2
- package/lib/styles/x4.css +0 -1
package/lib/types/x4js.d.ts
CHANGED
|
@@ -1,2374 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ___ ___ __
|
|
3
|
-
* \ \/ / / _
|
|
4
|
-
* \ / /_| |_
|
|
5
|
-
* / \____ _|
|
|
6
|
-
* /__/\__\ |_|
|
|
7
|
-
*
|
|
8
|
-
* @author Etienne Cochard
|
|
9
|
-
* @copyright (c) 2024 R-libre ingenierie
|
|
10
|
-
*
|
|
11
|
-
* Use of this source code is governed by an MIT-style license
|
|
12
|
-
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
13
|
-
*
|
|
14
|
-
* AUTOGENERATED CODE, DO NOT MODIFY
|
|
15
|
-
* generated on Fri Sep 19 2025
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
declare module 'x4js' {
|
|
20
|
-
|
|
21
|
-
// ---------------------------------------
|
|
22
|
-
// from /src/core/core_i18n.ts
|
|
23
|
-
|
|
24
|
-
interface Language {
|
|
25
|
-
name: string;
|
|
26
|
-
base: string;
|
|
27
|
-
src_translations: any;
|
|
28
|
-
translations: any;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// ---------------------------------------
|
|
32
|
-
// from /src/core/core_tools.ts
|
|
33
|
-
|
|
34
|
-
type Constructor<P> = {
|
|
35
|
-
new( params: any[] ): P;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export class UnsafeHtml extends String {
|
|
39
|
-
constructor( value: string );
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface IRect {
|
|
43
|
-
left: number;
|
|
44
|
-
top: number;
|
|
45
|
-
height: number;
|
|
46
|
-
width: number;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export class Rect implements IRect {
|
|
50
|
-
left: number;
|
|
51
|
-
top: number;
|
|
52
|
-
height: number;
|
|
53
|
-
width: number;
|
|
54
|
-
constructor( );
|
|
55
|
-
constructor( l: number, t: number, w: number, h: number );
|
|
56
|
-
constructor( l: Rect );
|
|
57
|
-
constructor( l: number | IRect, t: number, w: number, h: number );
|
|
58
|
-
contains( pt: Point ): boolean;
|
|
59
|
-
contains( rc: Rect ): boolean;
|
|
60
|
-
contains( arg: any ): boolean;
|
|
61
|
-
touches( rc: Rect ): boolean;
|
|
62
|
-
normalize( ): this;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export interface Size {
|
|
66
|
-
w: number;
|
|
67
|
-
h: number;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export interface Point {
|
|
71
|
-
x: number;
|
|
72
|
-
y: number;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export interface Size {
|
|
76
|
-
w: number;
|
|
77
|
-
h: number;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export interface IComponentInterface {
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export interface IFormElement extends IComponentInterface {
|
|
84
|
-
getRawValue( ): any;
|
|
85
|
-
setRawValue( v: any ): void;
|
|
86
|
-
isValid( ): boolean;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export interface ITabHandler extends IComponentInterface {
|
|
90
|
-
focusNext( next: boolean ): boolean;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export interface ITipHandler extends IComponentInterface {
|
|
94
|
-
getTip( ): string;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
interface Features {
|
|
98
|
-
eyedropper: 1;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export class Timer {
|
|
102
|
-
_timers: Map<string, any>;
|
|
103
|
-
setTimeout( name: string, time: number, callback: Function ): void;
|
|
104
|
-
clearTimeout( name: string ): void;
|
|
105
|
-
setInterval( name: string, time: number, callback: Function ): void;
|
|
106
|
-
clearInterval( name: string ): void;
|
|
107
|
-
clearAllTimeouts( ): void;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
enum kbNav {
|
|
111
|
-
first,
|
|
112
|
-
prev,
|
|
113
|
-
pgdn,
|
|
114
|
-
pgup,
|
|
115
|
-
next,
|
|
116
|
-
last,
|
|
117
|
-
left,
|
|
118
|
-
right,
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
// ---------------------------------------
|
|
122
|
-
// from /src/core/core_events.ts
|
|
123
|
-
|
|
124
|
-
export interface CoreEvent {
|
|
125
|
-
type?: string;
|
|
126
|
-
source?: CoreElement;
|
|
127
|
-
context?: any;
|
|
128
|
-
propagationStopped?: boolean;
|
|
129
|
-
defaultPrevented?: boolean;
|
|
130
|
-
stopPropagation( ): void;
|
|
131
|
-
preventDefault( ): void;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
export interface EventMap {
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
type EventCallback<T extends CoreEvent = CoreEvent> = (event: T) => any;
|
|
138
|
-
|
|
139
|
-
export class EventSource<E extends EventMap = EventMap> {
|
|
140
|
-
_source: unknown;
|
|
141
|
-
_registry: Map<string,EventCallback[]>;
|
|
142
|
-
constructor( source: unknown );
|
|
143
|
-
addListener<K extends keyof E>( name: K, callback: ( ev: E[K] ) => void, capturing: any ): void;
|
|
144
|
-
removeListener<K extends keyof E>( name: K, callback: (ev: E[K]) => any ): void;
|
|
145
|
-
fire<K extends keyof E>( name: K, evx: E[K] ): void;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
// ---------------------------------------
|
|
149
|
-
// from /src/core/core_element.ts
|
|
150
|
-
|
|
151
|
-
export class CoreElement<E extends EventMap = EventMap> {
|
|
152
|
-
#events: EventSource<E>;
|
|
153
|
-
#timers: Map<string, Function>;
|
|
154
|
-
__startTimer( name: string, ms: number, repeat: boolean, callback: ( ) => void ): void;
|
|
155
|
-
__stopTimer( name: string ): void;
|
|
156
|
-
setTimeout( name: string, ms: number, callback: () => void ): void;
|
|
157
|
-
clearTimeout( name: string ): void;
|
|
158
|
-
setInterval( name: string, ms: number, callback: ( ) => void ): void;
|
|
159
|
-
clearInterval( name: string ): void;
|
|
160
|
-
clearTimeouts( ): void;
|
|
161
|
-
on<K extends keyof E>( name: K, listener: ( ev: E[K] ) => void ): void;
|
|
162
|
-
off<K extends keyof E>( name: K, listener: ( ev: E[K] ) => void ): void;
|
|
163
|
-
fire<K extends keyof E>( name: K, ev: E[K] ): void;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
// ---------------------------------------
|
|
167
|
-
// from /src/core/core_styles.ts
|
|
168
|
-
|
|
169
|
-
type ariaValues = {
|
|
170
|
-
"aria-activedescendant": 1;
|
|
171
|
-
"role": 1;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
export class Stylesheet {
|
|
175
|
-
m_sheet: CSSStyleSheet;
|
|
176
|
-
m_rules: Map<string, number>;
|
|
177
|
-
constructor( );
|
|
178
|
-
setRule( name: string, definition: any ): void;
|
|
179
|
-
getVar( name: string ): any;
|
|
180
|
-
guid: number;
|
|
181
|
-
doc_style: CSSStyleDeclaration;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
export class ComputedStyle {
|
|
185
|
-
m_style: CSSStyleDeclaration;
|
|
186
|
-
constructor( style: CSSStyleDeclaration );
|
|
187
|
-
value( name: keyof CSSStyleDeclaration ): any;
|
|
188
|
-
parse( name: keyof CSSStyleDeclaration ): number;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
// ---------------------------------------
|
|
192
|
-
// from /src/core/core_dom.ts
|
|
193
|
-
|
|
194
|
-
type DOMEventHandler = ( ev: Event ) => void;
|
|
195
|
-
|
|
196
|
-
type EventEntry = Record<string,DOMEventHandler | DOMEventHandler[]>;
|
|
197
|
-
|
|
198
|
-
export interface GlobalDOMEvents {
|
|
199
|
-
abort?: (ev: UIEvent) => any;
|
|
200
|
-
animationcancel?: (ev: AnimationEvent) => any;
|
|
201
|
-
animationend?: (ev: AnimationEvent) => any;
|
|
202
|
-
animationiteration?: (ev: AnimationEvent) => any;
|
|
203
|
-
animationstart?: (ev: AnimationEvent) => any;
|
|
204
|
-
auxclick?: (ev: MouseEvent) => any;
|
|
205
|
-
blur?: (ev: FocusEvent) => any;
|
|
206
|
-
cancel?: (ev: Event) => any;
|
|
207
|
-
canplay?: (ev: Event) => any;
|
|
208
|
-
canplaythrough?: (ev: Event) => any;
|
|
209
|
-
change?: (ev: Event) => any;
|
|
210
|
-
click?: (ev: MouseEvent) => any;
|
|
211
|
-
close?: (ev: Event) => any;
|
|
212
|
-
contextmenu?: (ev: MouseEvent) => any;
|
|
213
|
-
cuechange?: (ev: Event) => any;
|
|
214
|
-
dblclick?: (ev: MouseEvent) => any;
|
|
215
|
-
drag?: (ev: DragEvent) => any;
|
|
216
|
-
dragend?: (ev: DragEvent) => any;
|
|
217
|
-
dragenter?: (ev: DragEvent) => any;
|
|
218
|
-
dragexit?: (ev: Event) => any;
|
|
219
|
-
dragleave?: (ev: DragEvent) => any;
|
|
220
|
-
dragover?: (ev: DragEvent) => any;
|
|
221
|
-
dragstart?: (ev: DragEvent) => any;
|
|
222
|
-
drop?: (ev: DragEvent) => any;
|
|
223
|
-
durationchange?: (ev: Event) => any;
|
|
224
|
-
emptied?: (ev: Event) => any;
|
|
225
|
-
ended?: (ev: Event) => any;
|
|
226
|
-
error?: OnErrorEventHandler;
|
|
227
|
-
focusin?: (ev: FocusEvent) => any;
|
|
228
|
-
focusout?: (ev: FocusEvent) => any;
|
|
229
|
-
focus?: (ev: FocusEvent) => any;
|
|
230
|
-
gotpointercapture?: (ev: PointerEvent) => any;
|
|
231
|
-
input?: (ev: Event) => any;
|
|
232
|
-
invalid?: (ev: Event) => any;
|
|
233
|
-
keydown?: (ev: KeyboardEvent) => any;
|
|
234
|
-
keypress?: (ev: KeyboardEvent) => any;
|
|
235
|
-
keyup?: (ev: KeyboardEvent) => any;
|
|
236
|
-
load?: (ev: Event) => any;
|
|
237
|
-
loadeddata?: (ev: Event) => any;
|
|
238
|
-
loadedmetadata?: (ev: Event) => any;
|
|
239
|
-
loadstart?: (ev: Event) => any;
|
|
240
|
-
lostpointercapture?: (ev: PointerEvent) => any;
|
|
241
|
-
mousedown?: (ev: MouseEvent) => any;
|
|
242
|
-
mouseenter?: (ev: MouseEvent) => any;
|
|
243
|
-
mouseleave?: (ev: MouseEvent) => any;
|
|
244
|
-
mousemove?: (ev: MouseEvent) => any;
|
|
245
|
-
mouseout?: (ev: MouseEvent) => any;
|
|
246
|
-
mouseover?: (ev: MouseEvent) => any;
|
|
247
|
-
mouseup?: (ev: MouseEvent) => any;
|
|
248
|
-
pause?: (ev: Event) => any;
|
|
249
|
-
play?: (ev: Event) => any;
|
|
250
|
-
playing?: (ev: Event) => any;
|
|
251
|
-
pointercancel?: (ev: PointerEvent) => any;
|
|
252
|
-
pointerdown?: (ev: PointerEvent) => any;
|
|
253
|
-
pointerenter?: (ev: PointerEvent) => any;
|
|
254
|
-
pointerleave?: (ev: PointerEvent) => any;
|
|
255
|
-
pointermove?: (ev: PointerEvent) => any;
|
|
256
|
-
pointerout?: (ev: PointerEvent) => any;
|
|
257
|
-
pointerover?: (ev: PointerEvent) => any;
|
|
258
|
-
pointerup?: (ev: PointerEvent) => any;
|
|
259
|
-
progress?: (ev: ProgressEvent) => any;
|
|
260
|
-
ratechange?: (ev: Event) => any;
|
|
261
|
-
reset?: (ev: Event) => any;
|
|
262
|
-
scroll?: (ev: Event) => any;
|
|
263
|
-
securitypolicyviolation?: (ev: SecurityPolicyViolationEvent) => any;
|
|
264
|
-
seeked?: (ev: Event) => any;
|
|
265
|
-
seeking?: (ev: Event) => any;
|
|
266
|
-
select?: (ev: Event) => any;
|
|
267
|
-
selectionchange?: (ev: Event) => any;
|
|
268
|
-
selectstart?: (ev: Event) => any;
|
|
269
|
-
stalled?: (ev: Event) => any;
|
|
270
|
-
submit?: (ev: Event) => any;
|
|
271
|
-
suspend?: (ev: Event) => any;
|
|
272
|
-
timeupdate?: (ev: Event) => any;
|
|
273
|
-
toggle?: (ev: Event) => any;
|
|
274
|
-
touchcancel?: (ev: TouchEvent) => any;
|
|
275
|
-
touchend?: (ev: TouchEvent) => any;
|
|
276
|
-
touchmove?: (ev: TouchEvent) => any;
|
|
277
|
-
touchstart?: (ev: TouchEvent) => any;
|
|
278
|
-
transitioncancel?: (ev: TransitionEvent) => any;
|
|
279
|
-
transitionend?: (ev: TransitionEvent) => any;
|
|
280
|
-
transitionrun?: (ev: TransitionEvent) => any;
|
|
281
|
-
transitionstart?: (ev: TransitionEvent) => any;
|
|
282
|
-
volumechange?: (ev: Event) => any;
|
|
283
|
-
waiting?: (ev: Event) => any;
|
|
284
|
-
wheel?: (ev: WheelEvent) => any;
|
|
285
|
-
resized?: (ev: Event) => void;
|
|
286
|
-
created?: ( ev: Event ) => void;
|
|
287
|
-
removed?: ( ev: Event ) => void;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
// ---------------------------------------
|
|
291
|
-
// from /src/core/core_application.ts
|
|
292
|
-
|
|
293
|
-
export interface EvMessage extends CoreEvent {
|
|
294
|
-
msg: string;
|
|
295
|
-
params: any;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
export interface ApplicationEvents extends EventMap {
|
|
299
|
-
global: EvMessage;
|
|
300
|
-
message: EvMessage;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
class Process {
|
|
304
|
-
getMaxTouchPoints( ): void;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
export class Application<E extends ApplicationEvents = ApplicationEvents> extends CoreElement<E> {
|
|
308
|
-
env: any;
|
|
309
|
-
mainview: Component;
|
|
310
|
-
process: any;
|
|
311
|
-
constructor( );
|
|
312
|
-
setMainView( view: Component ): void;
|
|
313
|
-
instance<P extends Application = Application>( ): P;
|
|
314
|
-
getMainView( ): void;
|
|
315
|
-
setEnv( name: string, value: any ): void;
|
|
316
|
-
getEnv( name: string, def_value: any ): void;
|
|
317
|
-
fireGlobal( msg: string, params: any ): void;
|
|
318
|
-
_setupKeyboard( ): void;
|
|
319
|
-
focusNext( next: boolean ): void;
|
|
320
|
-
setupSocketMessaging( path: string, looseCallback: ( ) => void ): void;
|
|
321
|
-
getStorage( name: string ): string;
|
|
322
|
-
getStorageJSON( name: string ): any;
|
|
323
|
-
setStorage( name: string, value: string | number ): void;
|
|
324
|
-
setStorageJSON( name: string, value: any ): void;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
// ---------------------------------------
|
|
328
|
-
// from /src/core/component.ts
|
|
329
|
-
|
|
330
|
-
interface RefType<T extends Component> {
|
|
331
|
-
dom: T;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
type ComponentAttributes = Record<string,string|number|boolean>;
|
|
335
|
-
|
|
336
|
-
type CreateComponentCallBack = ( attrs: Record<string,string> ) => ComponentContent;
|
|
337
|
-
|
|
338
|
-
type ComponentContent = Component | Component[] | string | string[] | UnsafeHtml | UnsafeHtml[] | number | boolean;
|
|
339
|
-
|
|
340
|
-
export interface ComponentProps {
|
|
341
|
-
tag?: string;
|
|
342
|
-
ns?: string;
|
|
343
|
-
style?: Partial<CSSStyleDeclaration>;
|
|
344
|
-
attrs?: Record<string,string|number|boolean>;
|
|
345
|
-
content?: ComponentContent;
|
|
346
|
-
dom_events?: GlobalDOMEvents;
|
|
347
|
-
cls?: string;
|
|
348
|
-
id?: string;
|
|
349
|
-
ref?: RefType<any>;
|
|
350
|
-
width?: string | number;
|
|
351
|
-
height?: string | number;
|
|
352
|
-
disabled?: boolean;
|
|
353
|
-
hidden?: boolean;
|
|
354
|
-
flex?: boolean | number;
|
|
355
|
-
tooltip?: string;
|
|
356
|
-
existingDOM?: HTMLElement;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
export interface ComponentEvent extends CoreEvent {
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
export interface ComponentEvents extends EventMap {
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
@class_ns( "x4" ) export class Component<P extends ComponentProps = ComponentProps, E extends ComponentEvents = ComponentEvents> extends CoreElement<E> {
|
|
366
|
-
dom: Element;
|
|
367
|
-
props: P;
|
|
368
|
-
clsprefix: string;
|
|
369
|
-
#store: Map<string|symbol,any>;
|
|
370
|
-
constructor( props: P );
|
|
371
|
-
onGlobalEvent( cb: ( ev: EvMessage ) => void ): void;
|
|
372
|
-
hasClass( cls: string ): void;
|
|
373
|
-
addClass( cls: string ): void;
|
|
374
|
-
removeClass( cls: string ): void;
|
|
375
|
-
removeClassEx( re: RegExp ): void;
|
|
376
|
-
toggleClass( cls: string ): void;
|
|
377
|
-
setClass( cls: string, set: boolean ): this;
|
|
378
|
-
setAttributes( attrs: ComponentAttributes ): this;
|
|
379
|
-
setAttribute( name: string, value: string | number | boolean ): void;
|
|
380
|
-
getAttribute( name: string ): string;
|
|
381
|
-
getData( name: string ): string;
|
|
382
|
-
getIntData( name: string ): number;
|
|
383
|
-
setData( name: string, value: string ): void;
|
|
384
|
-
setInternalData( name: string|symbol, value: any ): this;
|
|
385
|
-
getInternalData<T = any>( name: string|symbol ): T;
|
|
386
|
-
addDOMEvent<K extends keyof GlobalDOMEvents>( name: K, listener: GlobalDOMEvents[K], prepend: any ): void;
|
|
387
|
-
setDOMEvents( events: GlobalDOMEvents ): void;
|
|
388
|
-
mapPropEvents<N extends keyof E>( props: P, elements: N[] ): void;
|
|
389
|
-
clearContent( ): void;
|
|
390
|
-
setContent( content: ComponentContent ): void;
|
|
391
|
-
appendContent( content: ComponentContent ): void;
|
|
392
|
-
prependContent( content: ComponentContent ): void;
|
|
393
|
-
removeChild( child: Component ): void;
|
|
394
|
-
queryAll( selector: string ): Component[];
|
|
395
|
-
query<T extends Component = Component>( selector: string ): T;
|
|
396
|
-
setAria( name: keyof ariaValues, value: string | number | boolean ): this;
|
|
397
|
-
setStyle( style: Partial<CSSStyleDeclaration> ): this;
|
|
398
|
-
setStyleValue<K extends keyof CSSStyleDeclaration>( name: K, value: CSSStyleDeclaration[K] | number ): this;
|
|
399
|
-
getStyleValue<K extends keyof CSSStyleDeclaration>( name: K ): void;
|
|
400
|
-
setWidth( w: number | string ): void;
|
|
401
|
-
setHeight( h: number | string ): void;
|
|
402
|
-
setStyleVariable( name: string, value: string ): void;
|
|
403
|
-
getStyleVariable( name: string ): void;
|
|
404
|
-
getComputedStyle( ): void;
|
|
405
|
-
setCapture( pointerId: number ): void;
|
|
406
|
-
releaseCapture( pointerId: number ): void;
|
|
407
|
-
getBoundingRect( ): Rect;
|
|
408
|
-
focus( ): this;
|
|
409
|
-
hasFocus( ): void;
|
|
410
|
-
scrollIntoView( arg: boolean | ScrollIntoViewOptions ): void;
|
|
411
|
-
isVisible( ): void;
|
|
412
|
-
show( vis: any ): this;
|
|
413
|
-
hide( ): this;
|
|
414
|
-
enable( ena: any ): this;
|
|
415
|
-
disable( ): this;
|
|
416
|
-
isDisabled( ): void;
|
|
417
|
-
nextElement<T extends Component = Component>( ): T;
|
|
418
|
-
prevElement<T extends Component = Component>( ): T;
|
|
419
|
-
parentElement<T extends Component>( cls: Constructor<T> ): T;
|
|
420
|
-
parentElement<T extends Component>( dom: Node, cls: Constructor<T> ): T;
|
|
421
|
-
firstChild<T extends Component = Component>( ): T;
|
|
422
|
-
lastChild<T extends Component = Component>( ): T;
|
|
423
|
-
enumChildComponents( recursive: boolean ): void;
|
|
424
|
-
enumChildNodes( recursive: boolean ): void;
|
|
425
|
-
visitChildren( cb: ( el: Component ) => boolean ): void;
|
|
426
|
-
animate( keyframes: Keyframe[], duration: number ): void;
|
|
427
|
-
createElement( clsOrTag: string | ComponentConstructor | symbol | CreateComponentCallBack, attrs: any, children: Component[] ): Component | Component[];
|
|
428
|
-
createFragment( ): Component[];
|
|
429
|
-
queryInterface<T>( name: string ): T;
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
type ComponentConstructor = {
|
|
433
|
-
new( params: any[] ): Component;
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
export class Flex extends Component {
|
|
437
|
-
constructor( );
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
export class Space extends Component {
|
|
441
|
-
constructor( width: number|string, cls: string );
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
export interface EvClick extends ComponentEvent {
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
export interface EvChange extends ComponentEvent {
|
|
448
|
-
value: any;
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
export interface EvFocus extends ComponentEvent {
|
|
452
|
-
focus_out: boolean;
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
type ISelection = number | string | any;
|
|
456
|
-
|
|
457
|
-
export interface EvSelectionChange extends ComponentEvent {
|
|
458
|
-
selection: ISelection[];
|
|
459
|
-
empty: boolean;
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
export interface EvContextMenu extends ComponentEvent {
|
|
463
|
-
uievent: UIEvent;
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
export interface EvDrag extends ComponentEvent {
|
|
467
|
-
element: unknown;
|
|
468
|
-
data: any;
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
export interface EvError extends ComponentEvent {
|
|
472
|
-
code: number;
|
|
473
|
-
message: string;
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
export interface EvDblClick extends ComponentEvent {
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
// ---------------------------------------
|
|
480
|
-
// from /src/core/core_colors.ts
|
|
481
|
-
|
|
482
|
-
export interface Rgb {
|
|
483
|
-
red: number;
|
|
484
|
-
green: number;
|
|
485
|
-
blue: number;
|
|
486
|
-
alpha: number;
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
export interface Hsv {
|
|
490
|
-
hue: number;
|
|
491
|
-
saturation: number;
|
|
492
|
-
value: number;
|
|
493
|
-
alpha: number;
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
export class Color {
|
|
497
|
-
rgb: [red:number,green:number,blue:number,alpha:number];
|
|
498
|
-
invalid: any;
|
|
499
|
-
constructor( value: string );
|
|
500
|
-
constructor( r: number, g: number, b: number, a: number );
|
|
501
|
-
constructor( args: any[] );
|
|
502
|
-
setValue( value: string ): this;
|
|
503
|
-
setHsv( h: number, s: number, v: number, a: any ): this;
|
|
504
|
-
setRgb( r: number, g: number, b: number, a: number ): this;
|
|
505
|
-
toRgbString( withAlpha: boolean ): string;
|
|
506
|
-
toHexString( ): string;
|
|
507
|
-
toRgb( ): Rgb;
|
|
508
|
-
toHsv( ): Hsv;
|
|
509
|
-
getAlpha( ): void;
|
|
510
|
-
setAlpha( a: number ): this;
|
|
511
|
-
isInvalid( ): void;
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
// ---------------------------------------
|
|
515
|
-
// from /src/core/core_data.ts
|
|
516
|
-
|
|
517
|
-
type DataRecordID = any;
|
|
518
|
-
|
|
519
|
-
type DataFieldValue = string | Date | number | boolean;
|
|
520
|
-
|
|
521
|
-
type ChangeCallback = (type: string, id?: DataRecordID) => void;
|
|
522
|
-
|
|
523
|
-
type CalcCallback = () => string;
|
|
524
|
-
|
|
525
|
-
type FieldType = 'string' | 'int' | 'float' | 'date' | 'bool' | 'array' | 'object' | 'any' | 'calc';
|
|
526
|
-
|
|
527
|
-
type DataIndex = Uint32Array;
|
|
528
|
-
|
|
529
|
-
export interface EvDataChange extends CoreEvent {
|
|
530
|
-
change_type: 'create' | 'update' | 'delete' | 'data' | 'change';
|
|
531
|
-
id?: DataRecordID;
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
export interface MetaData {
|
|
535
|
-
type?: FieldType;
|
|
536
|
-
prec?: number;
|
|
537
|
-
required?: boolean;
|
|
538
|
-
calc?: (rec: DataRecord) => any;
|
|
539
|
-
model?: DataModel;
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
export interface FieldInfo extends MetaData {
|
|
543
|
-
name: string;
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
class MetaInfos {
|
|
547
|
-
name: string;
|
|
548
|
-
id: string;
|
|
549
|
-
fields: FieldInfo[];
|
|
550
|
-
constructor( name: string );
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
interface ModelConstructor {
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
export class DataModel {
|
|
557
|
-
getFields( ): FieldInfo[];
|
|
558
|
-
validate( record: DataRecord ): Error[];
|
|
559
|
-
getFieldIndex( name: string ): number;
|
|
560
|
-
serialize<T = any>( input: DataRecord ): T;
|
|
561
|
-
unSerialize( data: any, id: DataRecordID ): DataRecord;
|
|
562
|
-
_convertField( field: FieldInfo, input: any ): any;
|
|
563
|
-
getID( rec: DataRecord ): any;
|
|
564
|
-
getRaw( name: string | number, rec: DataRecord ): any;
|
|
565
|
-
getField( name: string, rec: DataRecord ): string;
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
export class DataRecord {
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
interface DataEventMap extends EventMap {
|
|
572
|
-
change?: EvChange;
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
type DataSolver = ( data: any ) => DataRecord[];
|
|
576
|
-
|
|
577
|
-
export interface DataProxyProps {
|
|
578
|
-
url: string;
|
|
579
|
-
params?: string[];
|
|
580
|
-
solver?: DataSolver;
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
export class DataProxy extends CoreElement<DataEventMap> {
|
|
584
|
-
m_props: DataProxyProps;
|
|
585
|
-
constructor( props: DataProxyProps );
|
|
586
|
-
load( url: string ): void;
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
interface DataStoreProps {
|
|
590
|
-
model: DataModel;
|
|
591
|
-
data?: any[];
|
|
592
|
-
url?: string;
|
|
593
|
-
autoload?: false;
|
|
594
|
-
solver?: DataSolver;
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
interface DataStoreEventMap extends EventMap {
|
|
598
|
-
data_change: EvDataChange;
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
export class DataStore extends EventSource<DataStoreEventMap> {
|
|
602
|
-
m_model: DataModel;
|
|
603
|
-
m_fields: FieldInfo[];
|
|
604
|
-
m_records: DataRecord[];
|
|
605
|
-
m_proxy: DataProxy;
|
|
606
|
-
m_rec_index: DataIndex;
|
|
607
|
-
constructor( props: DataStoreProps );
|
|
608
|
-
load( url: string ): void;
|
|
609
|
-
reload( ): void;
|
|
610
|
-
setData( records: any[] ): void;
|
|
611
|
-
setRawData( records: DataRecord[] ): void;
|
|
612
|
-
_rebuildIndex( ): void;
|
|
613
|
-
update( rec: DataRecord ): void;
|
|
614
|
-
append( rec: DataRecord | any ): void;
|
|
615
|
-
getMaxId( ): void;
|
|
616
|
-
delete( id: DataRecordID ): boolean;
|
|
617
|
-
indexOfId( id: DataRecordID ): number;
|
|
618
|
-
getById( id: DataRecordID ): DataRecord;
|
|
619
|
-
getByIndex( index: number ): DataRecord;
|
|
620
|
-
_getRecord( index: number ): DataRecord;
|
|
621
|
-
moveTo( other: DataStore ): void;
|
|
622
|
-
createView( opts: DataViewProps ): DataView;
|
|
623
|
-
createIndex( filter: FilterInfo ): DataIndex;
|
|
624
|
-
sortIndex( index: DataIndex, sort: SortProp[] ): void;
|
|
625
|
-
forEach( cb: ( rec: DataRecord, index: number ) => any ): void;
|
|
626
|
-
export( ): void;
|
|
627
|
-
changed( ): void;
|
|
628
|
-
getModel( ): void;
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
export interface EvViewChange extends CoreEvent {
|
|
632
|
-
change_type: "change" | "filter" | "sort";
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
interface DataViewEventMap extends EventMap {
|
|
636
|
-
view_change: EvViewChange;
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
interface DataViewProps {
|
|
640
|
-
store?: DataStore;
|
|
641
|
-
filter?: FilterInfo;
|
|
642
|
-
order?: string | SortProp[] | SortProp;
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
type FilterFunc = ( rec: DataRecord ) => boolean;
|
|
646
|
-
|
|
647
|
-
export interface FilterInfo {
|
|
648
|
-
op: '<' | '<=' | '=' | '>=' | '>' | '<>' | 'empty-result' | FilterFunc;
|
|
649
|
-
field?: string;
|
|
650
|
-
value?: string | RegExp;
|
|
651
|
-
caseSensitive?: boolean;
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
export interface SortProp {
|
|
655
|
-
field: string;
|
|
656
|
-
ascending: boolean;
|
|
657
|
-
numeric?: boolean;
|
|
658
|
-
}
|
|
659
|
-
|
|
660
|
-
export class DataView extends CoreElement<DataViewEventMap> {
|
|
661
|
-
m_index: DataIndex;
|
|
662
|
-
m_store: DataStore;
|
|
663
|
-
m_model: DataModel;
|
|
664
|
-
m_sort: SortProp[];
|
|
665
|
-
m_filter: FilterInfo;
|
|
666
|
-
m_props: DataViewProps;
|
|
667
|
-
constructor( props: DataViewProps );
|
|
668
|
-
_storeChange( ev: EvDataChange ): void;
|
|
669
|
-
filter( filter: FilterInfo ): number;
|
|
670
|
-
_filter( filter: FilterInfo, notify: boolean ): number;
|
|
671
|
-
sort( props: SortProp[] ): void;
|
|
672
|
-
_sort( props: SortProp[], notify: boolean ): void;
|
|
673
|
-
getStore( ): void;
|
|
674
|
-
getCount( ): void;
|
|
675
|
-
indexOfId( id: DataRecordID ): number;
|
|
676
|
-
getByIndex( index: number ): DataRecord;
|
|
677
|
-
getIdByIndex( index: number ): DataRecordID;
|
|
678
|
-
getRecId( rec: DataRecord ): DataRecordID;
|
|
679
|
-
getById( id: DataRecordID ): DataRecord;
|
|
680
|
-
getModel( ): void;
|
|
681
|
-
changed( ): void;
|
|
682
|
-
forEach( cb: ( rec: DataRecord, index: number ) => any ): void;
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
// ---------------------------------------
|
|
686
|
-
// from /src/core/core_dragdrop.ts
|
|
687
|
-
|
|
688
|
-
interface DropInfo {
|
|
689
|
-
pt: Point;
|
|
690
|
-
data: DataTransfer;
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
type DropCallback = ( command: 'enter' | 'leave' | 'drag' | 'drop', el: Component, infos: DropInfo ) => void;
|
|
694
|
-
|
|
695
|
-
type FilterCallback = ( el: Component, data: DataTransfer ) => boolean;
|
|
696
|
-
|
|
697
|
-
class DragManager {
|
|
698
|
-
dragSource: Component;
|
|
699
|
-
dragGhost: HTMLElement;
|
|
700
|
-
dropTarget: Component;
|
|
701
|
-
notified: Component;
|
|
702
|
-
timer: any;
|
|
703
|
-
registerDraggableElement( el: Component ): void;
|
|
704
|
-
registerDropTarget( el: Component, cb: DropCallback, filterCB: FilterCallback ): void;
|
|
705
|
-
_startCheck( ): void;
|
|
706
|
-
_check( ): void;
|
|
707
|
-
}
|
|
708
|
-
|
|
709
|
-
// ---------------------------------------
|
|
710
|
-
// from /src/core/core_react.ts
|
|
711
|
-
|
|
712
|
-
export class x4_react {
|
|
713
|
-
create_element( tag: string, props: any, content: any[] ): Component;
|
|
714
|
-
create_element<X extends Component>( tag: string | Constructor<X>, props: X["props"], content: any[] ): void;
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
// ---------------------------------------
|
|
718
|
-
// from /src/core/core_router.ts
|
|
719
|
-
|
|
720
|
-
type RouteHandler = ( params: any, path: string ) => void;
|
|
721
|
-
|
|
722
|
-
interface Segment {
|
|
723
|
-
keys: string[];
|
|
724
|
-
pattern: RegExp;
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
interface Route {
|
|
728
|
-
keys: string[];
|
|
729
|
-
pattern: RegExp;
|
|
730
|
-
handler: RouteHandler;
|
|
731
|
-
}
|
|
732
|
-
|
|
733
|
-
interface RouterEvents extends EventMap {
|
|
734
|
-
change: EvChange;
|
|
735
|
-
error: EvError;
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
export class Router extends EventSource< RouterEvents > {
|
|
739
|
-
m_routes: Route[];
|
|
740
|
-
m_useHash: boolean;
|
|
741
|
-
constructor( useHash: any );
|
|
742
|
-
get( uri: string | RegExp, handler: RouteHandler ): void;
|
|
743
|
-
init( ): void;
|
|
744
|
-
_getLocation( ): void;
|
|
745
|
-
navigate( uri: string, notify: any, replace: any ): void;
|
|
746
|
-
_find( url: string ): { params: Record<string,any>, handlers: RouteHandler[] };
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
// ---------------------------------------
|
|
750
|
-
// from /src/core/core_state.ts
|
|
751
|
-
|
|
752
|
-
type StateData = boolean | number | string | Date | any;
|
|
753
|
-
|
|
754
|
-
type State = Record<string,StateData>;
|
|
755
|
-
|
|
756
|
-
export class StateManager {
|
|
757
|
-
_state: StateData;
|
|
758
|
-
_subscribers: Map<string,any>;
|
|
759
|
-
_currentTracking: Set<string>;
|
|
760
|
-
constructor( initialState: StateData );
|
|
761
|
-
getState( path: string, defaultValue: StateData ): void;
|
|
762
|
-
setState( path: string, value: StateData, context: any ): void;
|
|
763
|
-
}
|
|
764
|
-
|
|
765
|
-
// ---------------------------------------
|
|
766
|
-
// from /src/core/core_svg.ts
|
|
767
|
-
|
|
768
|
-
class SvgItem {
|
|
769
|
-
_dom: SVGElement;
|
|
770
|
-
constructor( tag: string );
|
|
771
|
-
getDom( ): void;
|
|
772
|
-
reset( ): void;
|
|
773
|
-
stroke( color: string, width: number ): this;
|
|
774
|
-
strokeWidth( width: number ): this;
|
|
775
|
-
strokeCap( cap: "butt" | "round" | "sqaure" ): void;
|
|
776
|
-
strokeOpacity( opacity: number ): void;
|
|
777
|
-
antiAlias( set: boolean ): void;
|
|
778
|
-
fill( color: string ): this;
|
|
779
|
-
no_fill( ): this;
|
|
780
|
-
getAttr( name: string ): string;
|
|
781
|
-
getNumAttr( name: string ): void;
|
|
782
|
-
setAttr( name: string, value: string ): this;
|
|
783
|
-
setStyle<K extends keyof CSSStyleDeclaration>( name: K, value: string | number ): this;
|
|
784
|
-
addClass( cls: string ): this;
|
|
785
|
-
removeClass( cls: string ): this;
|
|
786
|
-
clip( id: string ): this;
|
|
787
|
-
transform( tr: string ): this;
|
|
788
|
-
add_transformation( tr: string ): this;
|
|
789
|
-
clear_transform( ): void;
|
|
790
|
-
rotate( deg: number, cx: number, cy: number ): this;
|
|
791
|
-
add_rotation( deg: number, cx: number, cy: number ): this;
|
|
792
|
-
translate( dx: number, dy: number ): this;
|
|
793
|
-
add_translation( dx: number, dy: number ): this;
|
|
794
|
-
scale( x: number ): this;
|
|
795
|
-
add_scale( x: number ): this;
|
|
796
|
-
addDOMEvent<K extends keyof GlobalDOMEvents>( name: K, listener: GlobalDOMEvents[K], prepend: any ): void;
|
|
797
|
-
}
|
|
798
|
-
|
|
799
|
-
export class SvgPath extends SvgItem {
|
|
800
|
-
_path: string;
|
|
801
|
-
constructor( );
|
|
802
|
-
_update( ): this;
|
|
803
|
-
reset( ): void;
|
|
804
|
-
moveTo( x: number, y: number ): this;
|
|
805
|
-
lineTo( x: number, y: number ): this;
|
|
806
|
-
curveTo( x1: number, y1: number, x2: number, y2: number, x3: number, y3: number ): void;
|
|
807
|
-
closePath( ): this;
|
|
808
|
-
arc( x: number, y: number, r: number, start: number, end: number, clockwise: any ): this;
|
|
809
|
-
}
|
|
810
|
-
|
|
811
|
-
export class SvgText extends SvgItem {
|
|
812
|
-
constructor( x: number, y: number, txt: string );
|
|
813
|
-
font( font: string ): this;
|
|
814
|
-
fontSize( size: number | string ): this;
|
|
815
|
-
fontWeight( weight: 'light' | 'normal' | 'bold' ): this;
|
|
816
|
-
textAlign( align: 'left' | 'center' | 'right' ): this;
|
|
817
|
-
verticalAlign( align: 'top' | 'center' | 'bottom' | 'baseline' ): this;
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
export class SvgIcon extends SvgItem {
|
|
821
|
-
constructor( svg: string );
|
|
822
|
-
}
|
|
823
|
-
|
|
824
|
-
export class SvgShape extends SvgItem {
|
|
825
|
-
constructor( tag: string );
|
|
826
|
-
}
|
|
827
|
-
|
|
828
|
-
type number_or_perc = number | `${string}%`;
|
|
829
|
-
|
|
830
|
-
export class SvgGradient extends SvgItem {
|
|
831
|
-
g_id: any;
|
|
832
|
-
_id: string;
|
|
833
|
-
_stops: { offset: number_or_perc, color: string } [];
|
|
834
|
-
constructor( x1: number_or_perc, y1: number_or_perc, x2: number_or_perc, y2: number_or_perc );
|
|
835
|
-
addStop( offset: number_or_perc, color: string ): this;
|
|
836
|
-
}
|
|
837
|
-
|
|
838
|
-
export class SvgGroup extends SvgItem {
|
|
839
|
-
constructor( tag: any );
|
|
840
|
-
append<K extends SvgItem>( item: K ): K;
|
|
841
|
-
appendItems<K extends SvgItem>( items: K[] ): void;
|
|
842
|
-
path( ): SvgPath;
|
|
843
|
-
text( x: number, y: number, txt: string ): void;
|
|
844
|
-
ellipse( x: number, y: number, r1: number, r2: number ): SvgShape;
|
|
845
|
-
circle( x: number, y: number, r1: number ): SvgShape;
|
|
846
|
-
icon( svg: string, x: number, y: number, w: number, h: number ): SvgIcon;
|
|
847
|
-
rect( x: number, y: number, w: number, h: number ): SvgShape;
|
|
848
|
-
group( id: string ): void;
|
|
849
|
-
linear_gradient( x1: number_or_perc, y1: number_or_perc, x2: number_or_perc, y2: number_or_perc ): void;
|
|
850
|
-
clear( ): void;
|
|
851
|
-
}
|
|
852
|
-
|
|
853
|
-
export class SvgBuilder extends SvgGroup {
|
|
854
|
-
g_clip_id: any;
|
|
855
|
-
g_pat_id: any;
|
|
856
|
-
constructor( );
|
|
857
|
-
addClip( x: number, y: number, w: number, h: number ): void;
|
|
858
|
-
addPattern( x: number, y: number, w: number, h: number ): void;
|
|
859
|
-
}
|
|
860
|
-
|
|
861
|
-
interface SvgProps extends ComponentProps {
|
|
862
|
-
viewbox?: string;
|
|
863
|
-
svg: SvgBuilder;
|
|
864
|
-
}
|
|
865
|
-
|
|
866
|
-
export class SvgComponent<P extends SvgProps = SvgProps> extends Component<P> {
|
|
867
|
-
constructor( props: P );
|
|
868
|
-
setSvg( bld: SvgBuilder ): void;
|
|
869
|
-
addItems( items: SvgItem[] ): void;
|
|
870
|
-
}
|
|
871
|
-
|
|
872
|
-
// ---------------------------------------
|
|
873
|
-
// from /src/components/boxes/boxes.ts
|
|
874
|
-
|
|
875
|
-
export interface BoxProps extends ComponentProps {
|
|
876
|
-
tag?: string;
|
|
877
|
-
}
|
|
878
|
-
|
|
879
|
-
@class_ns( "x4" ) export class Box<P extends BoxProps=BoxProps, E extends ComponentEvents=ComponentEvents> extends Component<P,E> {
|
|
880
|
-
}
|
|
881
|
-
|
|
882
|
-
@class_ns( "x4" ) export class HBox<P extends BoxProps=BoxProps, E extends ComponentEvents=ComponentEvents> extends Box<P,E> {
|
|
883
|
-
}
|
|
884
|
-
|
|
885
|
-
@class_ns( "x4" ) export class VBox<P extends BoxProps=BoxProps, E extends ComponentEvents=ComponentEvents> extends Box<P,E> {
|
|
886
|
-
constructor( p: P );
|
|
887
|
-
}
|
|
888
|
-
|
|
889
|
-
type ContentBuilder = ( ) => Component;
|
|
890
|
-
|
|
891
|
-
interface StackItem {
|
|
892
|
-
name: string;
|
|
893
|
-
content: Component | ContentBuilder;
|
|
894
|
-
title?: string;
|
|
895
|
-
}
|
|
896
|
-
|
|
897
|
-
interface StackeBoxEvents extends ComponentEvents {
|
|
898
|
-
pageChange?: EvSelectionChange;
|
|
899
|
-
}
|
|
900
|
-
|
|
901
|
-
export interface StackBoxProps extends Omit<ComponentProps,"content"> {
|
|
902
|
-
default: string;
|
|
903
|
-
items: StackItem[];
|
|
904
|
-
pageChange?: EventCallback<EvSelectionChange>;
|
|
905
|
-
}
|
|
906
|
-
|
|
907
|
-
interface StackItemEx extends StackItem {
|
|
908
|
-
page: Component;
|
|
909
|
-
}
|
|
910
|
-
|
|
911
|
-
@class_ns( "x4" ) export class StackBox<P extends StackBoxProps = StackBoxProps, E extends StackeBoxEvents = StackeBoxEvents> extends Box<StackBoxProps,StackeBoxEvents> {
|
|
912
|
-
_items: StackItemEx[];
|
|
913
|
-
_cur: number;
|
|
914
|
-
constructor( props: StackBoxProps );
|
|
915
|
-
addItem( item: StackItem ): void;
|
|
916
|
-
removeItem( name: string ): void;
|
|
917
|
-
select( name: string ): void;
|
|
918
|
-
_createPage( page: StackItemEx ): void;
|
|
919
|
-
getPage( name: string ): void;
|
|
920
|
-
getPageCount( ): void;
|
|
921
|
-
enumPageNames( ): void;
|
|
922
|
-
getItem( name: string ): void;
|
|
923
|
-
getCurPage( ): void;
|
|
924
|
-
}
|
|
925
|
-
|
|
926
|
-
@class_ns( "x4" ) export class AssistBox extends StackBox {
|
|
927
|
-
selectNextPage( nxt: any ): void;
|
|
928
|
-
isFirstPage( ): void;
|
|
929
|
-
isLastPage( ): void;
|
|
930
|
-
}
|
|
931
|
-
|
|
932
|
-
interface GridBoxItem {
|
|
933
|
-
row: number;
|
|
934
|
-
col: number;
|
|
935
|
-
item: Component;
|
|
936
|
-
}
|
|
937
|
-
|
|
938
|
-
export interface GridBoxProps extends Omit<BoxProps,"content"> {
|
|
939
|
-
rows?: number | string | string[];
|
|
940
|
-
columns?: number | string | string[];
|
|
941
|
-
items?: GridBoxItem[];
|
|
942
|
-
}
|
|
943
|
-
|
|
944
|
-
@class_ns("x4") export class GridBox<P extends GridBoxProps=GridBoxProps, E extends ComponentEvents=ComponentEvents> extends Box<P,E> {
|
|
945
|
-
constructor( props: P );
|
|
946
|
-
setRows( r: number | string | string[] ): void;
|
|
947
|
-
setCols( r: number | string | string[] ): void;
|
|
948
|
-
setRowCount( n: number ): void;
|
|
949
|
-
setColCount( n: number ): void;
|
|
950
|
-
setTemplate( t: string[] ): void;
|
|
951
|
-
setItems( items: GridBoxItem[] ): void;
|
|
952
|
-
}
|
|
953
|
-
|
|
954
|
-
interface MasonryProps extends Omit<BoxProps,"content"> {
|
|
955
|
-
items: Component[];
|
|
956
|
-
}
|
|
957
|
-
|
|
958
|
-
@class_ns("x4") export class MasonryBox extends Box<MasonryProps> {
|
|
959
|
-
constructor( props: MasonryProps );
|
|
960
|
-
resizeItem( item: Component ): void;
|
|
961
|
-
resizeAllItems( ): void;
|
|
962
|
-
setItems( items: Component[] ): void;
|
|
963
|
-
}
|
|
964
|
-
|
|
965
|
-
// ---------------------------------------
|
|
966
|
-
// from /src/components/breadcrumb/breadcrumb.ts
|
|
967
|
-
|
|
968
|
-
interface BreadcrumbEvents extends ComponentEvents {
|
|
969
|
-
click: EvClick;
|
|
970
|
-
}
|
|
971
|
-
|
|
972
|
-
interface BreadcrumbElement {
|
|
973
|
-
name?: string;
|
|
974
|
-
icon?: string;
|
|
975
|
-
label: string;
|
|
976
|
-
click?: ( name: string ) => void;
|
|
977
|
-
}
|
|
978
|
-
|
|
979
|
-
interface BreadcrumbsProps extends BoxProps {
|
|
980
|
-
items: BreadcrumbElement[];
|
|
981
|
-
click?: EventCallback<EvClick>;
|
|
982
|
-
}
|
|
983
|
-
|
|
984
|
-
@class_ns( "x4" ) export class Breadcrumbs extends HBox<BreadcrumbsProps,BreadcrumbEvents> {
|
|
985
|
-
constructor( props: BreadcrumbsProps );
|
|
986
|
-
setItems( elements: BreadcrumbElement[ ] ): void;
|
|
987
|
-
}
|
|
988
|
-
|
|
989
|
-
// ---------------------------------------
|
|
990
|
-
// from /src/components/icon/icon.ts
|
|
991
|
-
|
|
992
|
-
type solveCallback = (data:string)=>void;
|
|
993
|
-
|
|
994
|
-
class SvgLoader {
|
|
995
|
-
cache: Map<string,string>;
|
|
996
|
-
waiters: Map<string,solveCallback[]>;
|
|
997
|
-
constructor( );
|
|
998
|
-
load( file: string ): Promise<string>;
|
|
999
|
-
_load( file: string ): Promise<string>;
|
|
1000
|
-
}
|
|
1001
|
-
|
|
1002
|
-
export interface IconProps extends ComponentProps {
|
|
1003
|
-
iconId?: string;
|
|
1004
|
-
}
|
|
1005
|
-
|
|
1006
|
-
@class_ns( "x4" ) export class Icon extends Component<IconProps> {
|
|
1007
|
-
constructor( props: IconProps );
|
|
1008
|
-
setIcon( iconId: string ): void;
|
|
1009
|
-
}
|
|
1010
|
-
|
|
1011
|
-
// ---------------------------------------
|
|
1012
|
-
// from /src/components/button/button.ts
|
|
1013
|
-
|
|
1014
|
-
interface ButtonEvents extends ComponentEvents {
|
|
1015
|
-
click: EvClick;
|
|
1016
|
-
}
|
|
1017
|
-
|
|
1018
|
-
export interface ButtonProps extends ComponentProps {
|
|
1019
|
-
label?: string;
|
|
1020
|
-
icon?: string;
|
|
1021
|
-
tabindex?: boolean | number;
|
|
1022
|
-
autorepeat?: number | boolean;
|
|
1023
|
-
click?: EventCallback<EvClick>;
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
|
-
@class_ns( "x4" ) export class Button extends Component<ButtonProps,ButtonEvents> {
|
|
1027
|
-
#text: Component;
|
|
1028
|
-
constructor( props: ButtonProps );
|
|
1029
|
-
_on_click( ev: MouseEvent ): void;
|
|
1030
|
-
_on_mouse( e: PointerEvent ): void;
|
|
1031
|
-
click( ): void;
|
|
1032
|
-
_on_keydown( e: KeyboardEvent ): void;
|
|
1033
|
-
setText( text: string | UnsafeHtml ): void;
|
|
1034
|
-
setIcon( icon: string ): void;
|
|
1035
|
-
}
|
|
1036
|
-
|
|
1037
|
-
// ---------------------------------------
|
|
1038
|
-
// from /src/components/label/label.ts
|
|
1039
|
-
|
|
1040
|
-
export interface LabelProps extends ComponentProps {
|
|
1041
|
-
text?: string | UnsafeHtml;
|
|
1042
|
-
icon?: string;
|
|
1043
|
-
labelFor?: string;
|
|
1044
|
-
}
|
|
1045
|
-
|
|
1046
|
-
@class_ns( "x4" ) export class Label extends Component<LabelProps> {
|
|
1047
|
-
#text: Component;
|
|
1048
|
-
constructor( p: LabelProps );
|
|
1049
|
-
setText( text: string | UnsafeHtml ): void;
|
|
1050
|
-
setIcon( icon: string ): void;
|
|
1051
|
-
}
|
|
1052
|
-
|
|
1053
|
-
export interface SimpleTextProps extends ComponentProps {
|
|
1054
|
-
text: string | UnsafeHtml;
|
|
1055
|
-
align?: "left" | "center" | "right";
|
|
1056
|
-
}
|
|
1057
|
-
|
|
1058
|
-
@class_ns( "x4" ) export class SimpleText extends Component<SimpleTextProps> {
|
|
1059
|
-
constructor( p: SimpleTextProps );
|
|
1060
|
-
setText( text: string | UnsafeHtml ): void;
|
|
1061
|
-
}
|
|
1062
|
-
|
|
1063
|
-
// ---------------------------------------
|
|
1064
|
-
// from /src/components/form/form.ts
|
|
1065
|
-
|
|
1066
|
-
type FormValues = Record<string,any>;
|
|
1067
|
-
|
|
1068
|
-
export interface FormProps extends BoxProps {
|
|
1069
|
-
autoComplete?: boolean;
|
|
1070
|
-
}
|
|
1071
|
-
|
|
1072
|
-
type ValidationFn = ( values: FormValues, is_valid: boolean ) => boolean;
|
|
1073
|
-
|
|
1074
|
-
@class_ns( "x4" ) export class Form<P extends FormProps = FormProps> extends Box<P> {
|
|
1075
|
-
validator: ValidationFn;
|
|
1076
|
-
constructor( props: P );
|
|
1077
|
-
_get_inputs( ): void;
|
|
1078
|
-
setValues( values: FormValues ): void;
|
|
1079
|
-
getValues<T extends FormValues = FormValues>( ): T;
|
|
1080
|
-
setAutoComplete( on: any ): void;
|
|
1081
|
-
setValidator( validator: ValidationFn ): void;
|
|
1082
|
-
validate( ): FormValues;
|
|
1083
|
-
}
|
|
1084
|
-
|
|
1085
|
-
// ---------------------------------------
|
|
1086
|
-
// from /src/components/sizers/sizer.ts
|
|
1087
|
-
|
|
1088
|
-
export interface EvSizeChange extends ComponentEvent {
|
|
1089
|
-
size: number;
|
|
1090
|
-
}
|
|
1091
|
-
|
|
1092
|
-
interface CSizerEvent extends ComponentEvents {
|
|
1093
|
-
resize: EvSizeChange;
|
|
1094
|
-
start: ComponentEvent;
|
|
1095
|
-
stop: ComponentEvent;
|
|
1096
|
-
}
|
|
1097
|
-
|
|
1098
|
-
type SizerType = "left" | "top" | "right" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
1099
|
-
|
|
1100
|
-
@class_ns( "x4" ) export class CSizer extends Component<ComponentProps,CSizerEvent> {
|
|
1101
|
-
_type: SizerType;
|
|
1102
|
-
_ref: Component;
|
|
1103
|
-
_delta: Point;
|
|
1104
|
-
constructor( type: SizerType, target: Component );
|
|
1105
|
-
_onMouseMove( e: PointerEvent ): void;
|
|
1106
|
-
}
|
|
1107
|
-
|
|
1108
|
-
// ---------------------------------------
|
|
1109
|
-
// from /src/components/popup/popup.ts
|
|
1110
|
-
|
|
1111
|
-
export interface PopupEvents extends ComponentEvents {
|
|
1112
|
-
closed: ComponentEvent;
|
|
1113
|
-
opened: ComponentEvent;
|
|
1114
|
-
}
|
|
1115
|
-
|
|
1116
|
-
export interface PopupProps extends ComponentProps {
|
|
1117
|
-
autoClose?: boolean | string;
|
|
1118
|
-
sizable?: boolean;
|
|
1119
|
-
movable?: boolean;
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
|
-
@class_ns( "x4" ) export class Popup<P extends PopupProps = PopupProps, E extends PopupEvents = PopupEvents> extends Box<P,E> {
|
|
1123
|
-
_isshown: any;
|
|
1124
|
-
_ismodal: any;
|
|
1125
|
-
constructor( props: P );
|
|
1126
|
-
displayNear( rc: Rect, dst: any, src: any, offset: any ): void;
|
|
1127
|
-
displayCenter( center: any ): void;
|
|
1128
|
-
displayAt( x: number, y: number ): void;
|
|
1129
|
-
isOpen( ): void;
|
|
1130
|
-
_do_hide( ): void;
|
|
1131
|
-
_do_show( ): void;
|
|
1132
|
-
__show( ): void;
|
|
1133
|
-
__hide( ): void;
|
|
1134
|
-
__append( ): void;
|
|
1135
|
-
__remove( ): void;
|
|
1136
|
-
show( show: any ): this;
|
|
1137
|
-
close( ): void;
|
|
1138
|
-
_dismiss: any;
|
|
1139
|
-
dismiss( after: any ): void;
|
|
1140
|
-
_createSizers( ): void;
|
|
1141
|
-
_showModalMask( ): void;
|
|
1142
|
-
_hideModalMask( ): void;
|
|
1143
|
-
}
|
|
1144
|
-
|
|
1145
|
-
export class CMover {
|
|
1146
|
-
ref: Component;
|
|
1147
|
-
delta: Point;
|
|
1148
|
-
self: boolean;
|
|
1149
|
-
constructor( x: Component, ref: Component );
|
|
1150
|
-
_onMouseMove( e: PointerEvent ): void;
|
|
1151
|
-
}
|
|
1152
|
-
|
|
1153
|
-
// ---------------------------------------
|
|
1154
|
-
// from /src/components/dialog/dialog.ts
|
|
1155
|
-
|
|
1156
|
-
export interface DialogProps extends PopupProps {
|
|
1157
|
-
icon?: string;
|
|
1158
|
-
title: string;
|
|
1159
|
-
form?: Form;
|
|
1160
|
-
buttons: BtnGroupItem[];
|
|
1161
|
-
closable?: boolean | string;
|
|
1162
|
-
modal?: boolean;
|
|
1163
|
-
btnclick?: EventCallback<EvBtnClick>;
|
|
1164
|
-
}
|
|
1165
|
-
|
|
1166
|
-
export interface EvBtnClick extends CoreEvent {
|
|
1167
|
-
button: string;
|
|
1168
|
-
}
|
|
1169
|
-
|
|
1170
|
-
interface DialogEvents extends PopupEvents {
|
|
1171
|
-
btnclick: EvBtnClick;
|
|
1172
|
-
close: ComponentEvent;
|
|
1173
|
-
}
|
|
1174
|
-
|
|
1175
|
-
@class_ns("x4") export class Dialog<P extends DialogProps = DialogProps, E extends DialogEvents = DialogEvents> extends Popup<P, E> {
|
|
1176
|
-
form: Form;
|
|
1177
|
-
_title: Label;
|
|
1178
|
-
constructor( props: P );
|
|
1179
|
-
focusNext( next: boolean ): boolean;
|
|
1180
|
-
setContent( form: Form ): void;
|
|
1181
|
-
getForm( ): void;
|
|
1182
|
-
getValues( ): void;
|
|
1183
|
-
getButton( name: string ): void;
|
|
1184
|
-
queryInterface<T extends IComponentInterface>( name: string ): T;
|
|
1185
|
-
setTitle( title: string ): void;
|
|
1186
|
-
getBtnBar( ): void;
|
|
1187
|
-
}
|
|
1188
|
-
|
|
1189
|
-
// ---------------------------------------
|
|
1190
|
-
// from /src/components/btngroup/btngroup.ts
|
|
1191
|
-
|
|
1192
|
-
type predefined = `ok${ "" | `.${string}`}` | `cancel${ "" | `.${string}`}` | `yes${ "" | `.${string}`}` | `no${ "" | `.${string}`}` | `retry${ "" | `.${string}`}` | `abort${ "" | `.${string}`}` | "-" | ">>" | "~";
|
|
1193
|
-
|
|
1194
|
-
type BtnGroupItem = predefined | Button | Label | Input;
|
|
1195
|
-
|
|
1196
|
-
interface BtnGroupEvents extends ComponentEvents {
|
|
1197
|
-
btnclick: EvBtnClick;
|
|
1198
|
-
}
|
|
1199
|
-
|
|
1200
|
-
interface BtnGroupProps extends Omit<ComponentProps,"content"> {
|
|
1201
|
-
align?: "left" | "center" | "right";
|
|
1202
|
-
vertical?: boolean;
|
|
1203
|
-
items: BtnGroupItem[];
|
|
1204
|
-
reverse?: boolean;
|
|
1205
|
-
btnclick?: EventCallback<EvBtnClick>;
|
|
1206
|
-
}
|
|
1207
|
-
|
|
1208
|
-
@class_ns( "x4" ) export class BtnGroup extends Box<BtnGroupProps,BtnGroupEvents> {
|
|
1209
|
-
constructor( props: BtnGroupProps );
|
|
1210
|
-
setButtons( btns: BtnGroupItem[] ): void;
|
|
1211
|
-
getButton( id: string ): void;
|
|
1212
|
-
}
|
|
1213
|
-
|
|
1214
|
-
// ---------------------------------------
|
|
1215
|
-
// from /src/components/menu/menu.ts
|
|
1216
|
-
|
|
1217
|
-
export interface MenuItem {
|
|
1218
|
-
cls?: string;
|
|
1219
|
-
icon?: string;
|
|
1220
|
-
text: string | UnsafeHtml;
|
|
1221
|
-
menu?: Menu;
|
|
1222
|
-
disabled?: true;
|
|
1223
|
-
click?: DOMEventHandler;
|
|
1224
|
-
}
|
|
1225
|
-
|
|
1226
|
-
type MenuElement = MenuItem | Component | string;
|
|
1227
|
-
|
|
1228
|
-
export interface MenuProps extends Omit<PopupProps,"content"> {
|
|
1229
|
-
items: MenuElement[];
|
|
1230
|
-
}
|
|
1231
|
-
|
|
1232
|
-
@class_ns( "x4" ) class CMenuSep extends Component {
|
|
1233
|
-
constructor( );
|
|
1234
|
-
}
|
|
1235
|
-
|
|
1236
|
-
@class_ns( "x4" ) class CMenuItem extends Component {
|
|
1237
|
-
menu: Menu;
|
|
1238
|
-
constructor( itm: MenuItem );
|
|
1239
|
-
dismiss( after: boolean ): void;
|
|
1240
|
-
openSub( delayed: boolean ): void;
|
|
1241
|
-
closeSub( ): void;
|
|
1242
|
-
}
|
|
1243
|
-
|
|
1244
|
-
@class_ns( "x4" ) export class Menu extends Popup {
|
|
1245
|
-
constructor( props: MenuProps );
|
|
1246
|
-
}
|
|
1247
|
-
|
|
1248
|
-
// ---------------------------------------
|
|
1249
|
-
// from /src/components/calendar/calendar.ts
|
|
1250
|
-
|
|
1251
|
-
interface CalendarEventMap extends ComponentEvents {
|
|
1252
|
-
change?: EvChange;
|
|
1253
|
-
}
|
|
1254
|
-
|
|
1255
|
-
interface CalendarProps extends ComponentProps {
|
|
1256
|
-
date?: Date;
|
|
1257
|
-
minDate?: Date;
|
|
1258
|
-
maxDate?: Date;
|
|
1259
|
-
change?: EventCallback<EvChange>;
|
|
1260
|
-
}
|
|
1261
|
-
|
|
1262
|
-
@class_ns( "x4" ) export class Calendar extends VBox<CalendarProps, CalendarEventMap> {
|
|
1263
|
-
m_date: Date;
|
|
1264
|
-
constructor( props: CalendarProps );
|
|
1265
|
-
_update( ): void;
|
|
1266
|
-
select( date: Date ): void;
|
|
1267
|
-
_next( n: boolean ): void;
|
|
1268
|
-
_choose( type: 'month' | 'year' ): void;
|
|
1269
|
-
getDate( ): void;
|
|
1270
|
-
setDate( date: Date ): void;
|
|
1271
|
-
}
|
|
1272
|
-
|
|
1273
|
-
// ---------------------------------------
|
|
1274
|
-
// from /src/components/canvas/canvas_ex.ts
|
|
1275
|
-
|
|
1276
|
-
export interface CanvasEx extends CanvasRenderingContext2D {
|
|
1277
|
-
width: number;
|
|
1278
|
-
height: number;
|
|
1279
|
-
smoothLine( points: any[], path: CanvasPath, move: boolean ): void;
|
|
1280
|
-
smoothLineEx( _points: any[], tension: number, numOfSeg: number, path: CanvasPath, move: boolean, close: boolean ): void;
|
|
1281
|
-
line( x1: number, y1: number, x2: number, y2: number, color: string, lineWidth: number ): void;
|
|
1282
|
-
roundRect( x: number, y: number, width: number, height: number, radius: number ): void;
|
|
1283
|
-
calcTextSize( text: string, rounded: boolean ): { width: number, height: number };
|
|
1284
|
-
setFontSize( fs: number ): void;
|
|
1285
|
-
circle( x: number, y: number, radius: number ): void;
|
|
1286
|
-
}
|
|
1287
|
-
|
|
1288
|
-
// ---------------------------------------
|
|
1289
|
-
// from /src/components/canvas/canvas.ts
|
|
1290
|
-
|
|
1291
|
-
export interface EvPaint extends ComponentEvent {
|
|
1292
|
-
ctx: CanvasEx;
|
|
1293
|
-
}
|
|
1294
|
-
|
|
1295
|
-
interface CanvasEventMap extends ComponentEvents {
|
|
1296
|
-
paint: EvPaint;
|
|
1297
|
-
}
|
|
1298
|
-
|
|
1299
|
-
export interface CanvasProps extends ComponentProps {
|
|
1300
|
-
paint_cb?: (ctx: CanvasEx ) => void;
|
|
1301
|
-
paint?: EventCallback<EvPaint>;
|
|
1302
|
-
clear?: boolean;
|
|
1303
|
-
}
|
|
1304
|
-
|
|
1305
|
-
@class_ns( "x4" ) export class Canvas extends Component<CanvasProps, CanvasEventMap> {
|
|
1306
|
-
m_iwidth: number;
|
|
1307
|
-
m_iheight: number;
|
|
1308
|
-
m_scale: any;
|
|
1309
|
-
m_canvas: Component;
|
|
1310
|
-
constructor( props: CanvasProps );
|
|
1311
|
-
scale( scale: number ): void;
|
|
1312
|
-
getContext( ): void;
|
|
1313
|
-
$update_rep: any;
|
|
1314
|
-
redraw( wait: number ): void;
|
|
1315
|
-
_paint( ): void;
|
|
1316
|
-
paint( ctx: CanvasEx ): void;
|
|
1317
|
-
}
|
|
1318
|
-
|
|
1319
|
-
// ---------------------------------------
|
|
1320
|
-
// from /src/components/input/input.ts
|
|
1321
|
-
|
|
1322
|
-
export interface BaseProps extends ComponentProps {
|
|
1323
|
-
name?: string;
|
|
1324
|
-
autofocus?: boolean;
|
|
1325
|
-
required?: boolean;
|
|
1326
|
-
readonly?: boolean;
|
|
1327
|
-
placeholder?: string;
|
|
1328
|
-
focus?: EventCallback<EvFocus>;
|
|
1329
|
-
change?: EventCallback<EvChange>;
|
|
1330
|
-
}
|
|
1331
|
-
|
|
1332
|
-
interface CheckboxProps extends BaseProps {
|
|
1333
|
-
type: "checkbox";
|
|
1334
|
-
value?: boolean | number | string;
|
|
1335
|
-
checked?: boolean;
|
|
1336
|
-
}
|
|
1337
|
-
|
|
1338
|
-
interface RadioProps extends BaseProps {
|
|
1339
|
-
type: "radio";
|
|
1340
|
-
value?: boolean | number | string;
|
|
1341
|
-
checked?: boolean;
|
|
1342
|
-
}
|
|
1343
|
-
|
|
1344
|
-
export interface RangeProps extends BaseProps {
|
|
1345
|
-
type: "range";
|
|
1346
|
-
value?: number;
|
|
1347
|
-
min: number;
|
|
1348
|
-
max: number;
|
|
1349
|
-
step?: number;
|
|
1350
|
-
}
|
|
1351
|
-
|
|
1352
|
-
export interface FileProps extends BaseProps {
|
|
1353
|
-
type: "file";
|
|
1354
|
-
accept: string | string[];
|
|
1355
|
-
value?: never;
|
|
1356
|
-
}
|
|
1357
|
-
|
|
1358
|
-
export interface DateProps extends BaseProps {
|
|
1359
|
-
type: "date";
|
|
1360
|
-
value?: Date | string;
|
|
1361
|
-
}
|
|
1362
|
-
|
|
1363
|
-
export interface TimeProps extends BaseProps {
|
|
1364
|
-
type: "time";
|
|
1365
|
-
readonly?: boolean;
|
|
1366
|
-
required?: boolean;
|
|
1367
|
-
value?: string;
|
|
1368
|
-
}
|
|
1369
|
-
|
|
1370
|
-
export interface NumberProps extends BaseProps {
|
|
1371
|
-
type: "number";
|
|
1372
|
-
readonly?: boolean;
|
|
1373
|
-
required?: boolean;
|
|
1374
|
-
value?: number | string;
|
|
1375
|
-
min?: number;
|
|
1376
|
-
max?: number;
|
|
1377
|
-
step?: number;
|
|
1378
|
-
}
|
|
1379
|
-
|
|
1380
|
-
export interface TextInputProps extends BaseProps {
|
|
1381
|
-
type?: "text" | "email" | "password";
|
|
1382
|
-
readonly?: boolean;
|
|
1383
|
-
required?: boolean;
|
|
1384
|
-
pattern?: string;
|
|
1385
|
-
value?: string | number;
|
|
1386
|
-
spellcheck?: boolean;
|
|
1387
|
-
minlength?: number;
|
|
1388
|
-
maxlength?: number;
|
|
1389
|
-
}
|
|
1390
|
-
|
|
1391
|
-
type InputProps = TextInputProps | CheckboxProps | RadioProps | RangeProps | DateProps | NumberProps | FileProps | TimeProps;
|
|
1392
|
-
|
|
1393
|
-
interface InputEvents extends ComponentEvent {
|
|
1394
|
-
focus: EvFocus;
|
|
1395
|
-
change: EvChange;
|
|
1396
|
-
}
|
|
1397
|
-
|
|
1398
|
-
@class_ns( "x4" ) export class Input extends Component<InputProps,InputEvents> {
|
|
1399
|
-
constructor( props: InputProps );
|
|
1400
|
-
on_focus( ev: FocusEvent, focus_out: boolean ): void;
|
|
1401
|
-
on_change( ev: InputEvent ): void;
|
|
1402
|
-
getValue( ): void;
|
|
1403
|
-
setValue( value: string ): void;
|
|
1404
|
-
getNumValue( defNan: number ): void;
|
|
1405
|
-
setNumValue( value: number, ndec: any ): void;
|
|
1406
|
-
getCheck( ): void;
|
|
1407
|
-
setCheck( ck: boolean ): void;
|
|
1408
|
-
setReadOnly( ro: boolean ): void;
|
|
1409
|
-
selectAll( ): void;
|
|
1410
|
-
select( start: number, length: number ): void;
|
|
1411
|
-
getSelection( ): void;
|
|
1412
|
-
isValid( ): void;
|
|
1413
|
-
queryInterface<T extends IComponentInterface>( name: string ): T;
|
|
1414
|
-
}
|
|
1415
|
-
|
|
1416
|
-
// ---------------------------------------
|
|
1417
|
-
// from /src/components/checkbox/checkbox.ts
|
|
1418
|
-
|
|
1419
|
-
interface CheckBoxEvents extends ComponentEvents {
|
|
1420
|
-
change?: EvChange;
|
|
1421
|
-
}
|
|
1422
|
-
|
|
1423
|
-
interface CheckboxProps extends ComponentProps {
|
|
1424
|
-
label: string;
|
|
1425
|
-
checked?: boolean;
|
|
1426
|
-
value?: boolean | number | string;
|
|
1427
|
-
name?: string;
|
|
1428
|
-
change?: EventCallback<EvChange>;
|
|
1429
|
-
}
|
|
1430
|
-
|
|
1431
|
-
@class_ns( "x4" ) export class Checkbox extends Component<CheckboxProps,CheckBoxEvents> {
|
|
1432
|
-
_input: Input;
|
|
1433
|
-
constructor( props: CheckboxProps );
|
|
1434
|
-
_on_click( ev: MouseEvent ): void;
|
|
1435
|
-
_on_change( ): void;
|
|
1436
|
-
getCheck( ): void;
|
|
1437
|
-
setCheck( ck: boolean ): void;
|
|
1438
|
-
setLabel( text: string ): void;
|
|
1439
|
-
toggle( ): void;
|
|
1440
|
-
}
|
|
1441
|
-
|
|
1442
|
-
// ---------------------------------------
|
|
1443
|
-
// from /src/components/colorinput/colorinput.ts
|
|
1444
|
-
|
|
1445
|
-
interface ColorInputProps extends BoxProps {
|
|
1446
|
-
color: Color | string;
|
|
1447
|
-
}
|
|
1448
|
-
|
|
1449
|
-
@class_ns( "x4" ) export class ColorInput extends HBox<ColorInputProps> {
|
|
1450
|
-
"$cls-ns": any;
|
|
1451
|
-
constructor( props: ColorInputProps );
|
|
1452
|
-
}
|
|
1453
|
-
|
|
1454
|
-
// ---------------------------------------
|
|
1455
|
-
// from /src/components/colorpicker/colorpicker.ts
|
|
1456
|
-
|
|
1457
|
-
interface ColorPickerProps extends ComponentProps {
|
|
1458
|
-
color: string | Color;
|
|
1459
|
-
}
|
|
1460
|
-
|
|
1461
|
-
interface HueChangeEvent extends ComponentEvent {
|
|
1462
|
-
hue: number;
|
|
1463
|
-
}
|
|
1464
|
-
|
|
1465
|
-
interface AlphaChangeEvent extends ComponentEvent {
|
|
1466
|
-
alpha: number;
|
|
1467
|
-
}
|
|
1468
|
-
|
|
1469
|
-
interface SatChangeEvent extends ComponentEvent {
|
|
1470
|
-
saturation: number;
|
|
1471
|
-
value: number;
|
|
1472
|
-
}
|
|
1473
|
-
|
|
1474
|
-
interface CommonEvents extends ComponentEvents {
|
|
1475
|
-
hue_change: HueChangeEvent;
|
|
1476
|
-
alpha_change: AlphaChangeEvent;
|
|
1477
|
-
sat_change: SatChangeEvent;
|
|
1478
|
-
}
|
|
1479
|
-
|
|
1480
|
-
@class_ns( "x4" ) export class Saturation extends Box<BoxProps,CommonEvents> {
|
|
1481
|
-
mdown: any;
|
|
1482
|
-
irect: Rect;
|
|
1483
|
-
hsv: Hsv;
|
|
1484
|
-
color: Component;
|
|
1485
|
-
thumb: Component;
|
|
1486
|
-
constructor( props: BoxProps, init: Hsv );
|
|
1487
|
-
mousedown( ev: PointerEvent ): void;
|
|
1488
|
-
mousemove( ev: PointerEvent ): void;
|
|
1489
|
-
mouseup( ev: PointerEvent ): void;
|
|
1490
|
-
updateThumbMarker( ): void;
|
|
1491
|
-
updateBaseColor( hsv: Hsv ): void;
|
|
1492
|
-
move( sens: string, delta: number ): void;
|
|
1493
|
-
}
|
|
1494
|
-
|
|
1495
|
-
@class_ns( "x4" ) class HueSlider extends Box<BoxProps,CommonEvents> {
|
|
1496
|
-
thumb: Component;
|
|
1497
|
-
hsv: Hsv;
|
|
1498
|
-
mdown: any;
|
|
1499
|
-
irect: Rect;
|
|
1500
|
-
constructor( props: BoxProps, init: Hsv );
|
|
1501
|
-
mousedown( ev: PointerEvent ): void;
|
|
1502
|
-
mousemove( ev: PointerEvent ): void;
|
|
1503
|
-
mouseup( ev: PointerEvent ): void;
|
|
1504
|
-
updateHue( hsv: Hsv ): void;
|
|
1505
|
-
move( delta: number ): void;
|
|
1506
|
-
}
|
|
1507
|
-
|
|
1508
|
-
@class_ns( "x4" ) class AlphaSlider extends Box<BoxProps,CommonEvents> {
|
|
1509
|
-
thumb: Component;
|
|
1510
|
-
color: Component;
|
|
1511
|
-
hsv: Hsv;
|
|
1512
|
-
mdown: any;
|
|
1513
|
-
irect: Rect;
|
|
1514
|
-
constructor( props: BoxProps, init: Hsv );
|
|
1515
|
-
_on_mousedown( ev: PointerEvent ): void;
|
|
1516
|
-
_on_mousemove( ev: PointerEvent ): void;
|
|
1517
|
-
_on_mouseup( ev: PointerEvent ): void;
|
|
1518
|
-
updateAlpha( ): void;
|
|
1519
|
-
updateBaseColor( hsv: Hsv ): void;
|
|
1520
|
-
setColor( hsv: Hsv ): void;
|
|
1521
|
-
move( delta: number ): void;
|
|
1522
|
-
}
|
|
1523
|
-
|
|
1524
|
-
interface ChangeEvent extends ComponentEvent {
|
|
1525
|
-
color: Color;
|
|
1526
|
-
}
|
|
1527
|
-
|
|
1528
|
-
interface ColorPickerChangeEvents extends ComponentEvents {
|
|
1529
|
-
change: ChangeEvent;
|
|
1530
|
-
}
|
|
1531
|
-
|
|
1532
|
-
@class_ns( "x4" ) export class ColorPicker extends VBox<ColorPickerProps,ColorPickerChangeEvents> {
|
|
1533
|
-
_base: Color;
|
|
1534
|
-
_sat: Saturation;
|
|
1535
|
-
_swatch: Component;
|
|
1536
|
-
_hue: HueSlider;
|
|
1537
|
-
_alpha: AlphaSlider;
|
|
1538
|
-
constructor( props: ColorPickerProps );
|
|
1539
|
-
_onkey( ev: KeyboardEvent ): void;
|
|
1540
|
-
}
|
|
1541
|
-
|
|
1542
|
-
// ---------------------------------------
|
|
1543
|
-
// from /src/components/viewport/viewport.ts
|
|
1544
|
-
|
|
1545
|
-
@class_ns( "x4" ) export class Viewport extends Component {
|
|
1546
|
-
constructor( props: ComponentProps );
|
|
1547
|
-
}
|
|
1548
|
-
|
|
1549
|
-
@class_ns( "x4" ) export class ScrollView extends Component {
|
|
1550
|
-
constructor( props: ComponentProps );
|
|
1551
|
-
getViewport( ): void;
|
|
1552
|
-
}
|
|
1553
|
-
|
|
1554
|
-
// ---------------------------------------
|
|
1555
|
-
// from /src/components/header/header.ts
|
|
1556
|
-
|
|
1557
|
-
interface HeaderItem {
|
|
1558
|
-
name: string;
|
|
1559
|
-
title: string;
|
|
1560
|
-
iconId?: string;
|
|
1561
|
-
width?: number;
|
|
1562
|
-
}
|
|
1563
|
-
|
|
1564
|
-
interface HeaderProps extends Omit<ComponentProps,"content"> {
|
|
1565
|
-
items: HeaderItem[];
|
|
1566
|
-
target?: Component;
|
|
1567
|
-
}
|
|
1568
|
-
|
|
1569
|
-
@class_ns( "x4" ) export class Header extends HBox<HeaderProps> {
|
|
1570
|
-
_els: Component[];
|
|
1571
|
-
_vwp: Component;
|
|
1572
|
-
constructor( props: HeaderProps );
|
|
1573
|
-
_calc_sizes( ): void;
|
|
1574
|
-
_on_resize( ): void;
|
|
1575
|
-
}
|
|
1576
|
-
|
|
1577
|
-
// ---------------------------------------
|
|
1578
|
-
// from /src/components/listbox/listbox.ts
|
|
1579
|
-
|
|
1580
|
-
type ListboxID = number | string;
|
|
1581
|
-
|
|
1582
|
-
export interface ListItem {
|
|
1583
|
-
id: ListboxID;
|
|
1584
|
-
text: string | UnsafeHtml;
|
|
1585
|
-
iconId?: string;
|
|
1586
|
-
data?: any;
|
|
1587
|
-
cls?: string;
|
|
1588
|
-
checked?: boolean;
|
|
1589
|
-
}
|
|
1590
|
-
|
|
1591
|
-
interface ListboxEvents extends ComponentEvents {
|
|
1592
|
-
click?: EvClick;
|
|
1593
|
-
dblClick?: EvDblClick;
|
|
1594
|
-
contextMenu?: EvContextMenu;
|
|
1595
|
-
selectionChange?: EvSelectionChange;
|
|
1596
|
-
}
|
|
1597
|
-
|
|
1598
|
-
interface ListboxProps extends Omit<ComponentProps,'content'> {
|
|
1599
|
-
items?: ListItem[];
|
|
1600
|
-
renderer?: ( item: ListItem ) => Component;
|
|
1601
|
-
header?: Header;
|
|
1602
|
-
footer?: Component;
|
|
1603
|
-
checkable?: true;
|
|
1604
|
-
multisel?: true;
|
|
1605
|
-
dblClick?: EventCallback<EvDblClick>;
|
|
1606
|
-
selectionChange?: EventCallback<EvSelectionChange>;
|
|
1607
|
-
contextMenu?: EventCallback<EvContextMenu>;
|
|
1608
|
-
}
|
|
1609
|
-
|
|
1610
|
-
@class_ns( "x4" ) export class Listbox extends Component<ListboxProps,ListboxEvents> {
|
|
1611
|
-
_view: Viewport;
|
|
1612
|
-
_lastsel: ListboxID;
|
|
1613
|
-
_multisel: Set<ListboxID>;
|
|
1614
|
-
_items: ListItem[];
|
|
1615
|
-
preventFocus: any;
|
|
1616
|
-
constructor( props: ListboxProps );
|
|
1617
|
-
_on_key( ev: KeyboardEvent ): void;
|
|
1618
|
-
navigate( sens: kbNav ): void;
|
|
1619
|
-
_itemWithID( id: ListboxID ): void;
|
|
1620
|
-
_on_click( ev: MouseEvent ): void;
|
|
1621
|
-
_on_ctx_menu( ev: MouseEvent ): void;
|
|
1622
|
-
_selectItem( id: ListboxID, item: Component, mode: "single" | "toggle" ): void;
|
|
1623
|
-
getItem( id: ListboxID ): ListItem;
|
|
1624
|
-
select( ids: ListboxID | ListboxID[], notify: any ): void;
|
|
1625
|
-
_findItemIndex( id: ListboxID ): void;
|
|
1626
|
-
_clearSelection( ): void;
|
|
1627
|
-
clearSelection( ): void;
|
|
1628
|
-
setItems( items: ListItem[], keepSel: any ): void;
|
|
1629
|
-
renderItem( item: ListItem ): void;
|
|
1630
|
-
defaultRenderer( item: ListItem ): Component;
|
|
1631
|
-
filter( filter: string | RegExp ): void;
|
|
1632
|
-
appendItem( item: ListItem, prepend: any, select: any ): void;
|
|
1633
|
-
updateItem( id: any, item: ListItem ): void;
|
|
1634
|
-
getSelection( ): void;
|
|
1635
|
-
}
|
|
1636
|
-
|
|
1637
|
-
// ---------------------------------------
|
|
1638
|
-
// from /src/components/combobox/combobox.ts
|
|
1639
|
-
|
|
1640
|
-
interface DropdownEvents extends PopupEvents {
|
|
1641
|
-
selectionChange: EvSelectionChange;
|
|
1642
|
-
}
|
|
1643
|
-
|
|
1644
|
-
interface DropdownProps extends Omit<PopupProps,"content"> {
|
|
1645
|
-
items: ListItem[];
|
|
1646
|
-
}
|
|
1647
|
-
|
|
1648
|
-
@class_ns( "x4" ) export class DropdownList extends Popup<DropdownProps,DropdownEvents> {
|
|
1649
|
-
_list: Listbox;
|
|
1650
|
-
constructor( props: DropdownProps, content: ListItem[] );
|
|
1651
|
-
getList( ): void;
|
|
1652
|
-
}
|
|
1653
|
-
|
|
1654
|
-
interface ComboboxEvents extends ComponentEvents {
|
|
1655
|
-
selectionChange: EvSelectionChange;
|
|
1656
|
-
}
|
|
1657
|
-
|
|
1658
|
-
interface ComboboxProps extends Omit<ComponentProps,"content"> {
|
|
1659
|
-
label?: string;
|
|
1660
|
-
name?: string;
|
|
1661
|
-
value?: string;
|
|
1662
|
-
labelWidth?: number | string;
|
|
1663
|
-
readonly?: boolean;
|
|
1664
|
-
required?: boolean;
|
|
1665
|
-
items: ListItem[];
|
|
1666
|
-
selectionChange?: EventCallback<EvSelectionChange>;
|
|
1667
|
-
}
|
|
1668
|
-
|
|
1669
|
-
@class_ns( "x4" ) export class Combobox extends Component<ComboboxProps,ComboboxEvents> {
|
|
1670
|
-
_popup: DropdownList;
|
|
1671
|
-
_input: Input;
|
|
1672
|
-
_button: Button;
|
|
1673
|
-
_prevent_close: any;
|
|
1674
|
-
_edit: HBox;
|
|
1675
|
-
constructor( props: ComboboxProps );
|
|
1676
|
-
_on_key( ev: KeyboardEvent ): void;
|
|
1677
|
-
_on_input( ): void;
|
|
1678
|
-
_on_focusout( ): void;
|
|
1679
|
-
_on_click( ): void;
|
|
1680
|
-
showDropDown( ): void;
|
|
1681
|
-
setItems( items: ListItem[] ): void;
|
|
1682
|
-
getValue( ): void;
|
|
1683
|
-
setValue( value: string ): void;
|
|
1684
|
-
selectItem( index: ListboxID ): void;
|
|
1685
|
-
getSelection( ): void;
|
|
1686
|
-
_getList( ): void;
|
|
1687
|
-
queryInterface<T extends IComponentInterface>( name: string ): T;
|
|
1688
|
-
getInput( ): void;
|
|
1689
|
-
}
|
|
1690
|
-
|
|
1691
|
-
// ---------------------------------------
|
|
1692
|
-
// from /src/components/filedrop/filedrop.ts
|
|
1693
|
-
|
|
1694
|
-
type LoadCallback = ( files: FileList ) => void;
|
|
1695
|
-
|
|
1696
|
-
interface FileDialogProps extends ComponentProps {
|
|
1697
|
-
accept: string;
|
|
1698
|
-
multiple?: boolean;
|
|
1699
|
-
callback: LoadCallback;
|
|
1700
|
-
}
|
|
1701
|
-
|
|
1702
|
-
export class FileDialog extends Component {
|
|
1703
|
-
constructor( props: FileDialogProps );
|
|
1704
|
-
showDialog( ): void;
|
|
1705
|
-
}
|
|
1706
|
-
|
|
1707
|
-
export interface EvDropChange extends CoreEvent {
|
|
1708
|
-
files: FileList;
|
|
1709
|
-
}
|
|
1710
|
-
|
|
1711
|
-
interface FileDropEvents extends ComponentEvents {
|
|
1712
|
-
change: EvDropChange;
|
|
1713
|
-
}
|
|
1714
|
-
|
|
1715
|
-
interface FileDropProps extends ComponentProps {
|
|
1716
|
-
label?: string | UnsafeHtml;
|
|
1717
|
-
icon?: string;
|
|
1718
|
-
multiple?: boolean;
|
|
1719
|
-
accept: string;
|
|
1720
|
-
change: EventCallback<EvDropChange>;
|
|
1721
|
-
}
|
|
1722
|
-
|
|
1723
|
-
@class_ns( "x4" ) export class FileDrop extends VBox<FileDropProps,FileDropEvents> {
|
|
1724
|
-
constructor( props: FileDropProps );
|
|
1725
|
-
}
|
|
1726
|
-
|
|
1727
|
-
// ---------------------------------------
|
|
1728
|
-
// from /src/components/gauge/gauge.ts
|
|
1729
|
-
|
|
1730
|
-
export interface GaugeProps extends ComponentProps {
|
|
1731
|
-
colors?: string[];
|
|
1732
|
-
min?: number;
|
|
1733
|
-
max?: number;
|
|
1734
|
-
}
|
|
1735
|
-
|
|
1736
|
-
@class_ns( "x4" ) export class Gauge extends Component<GaugeProps> {
|
|
1737
|
-
pos: number;
|
|
1738
|
-
stops: string[];
|
|
1739
|
-
uppos: ( ) => void;
|
|
1740
|
-
constructor( props: GaugeProps );
|
|
1741
|
-
setRange( min: number, max: number ): void;
|
|
1742
|
-
setPos( pos: number ): void;
|
|
1743
|
-
setColorStops( colors: string[] ): void;
|
|
1744
|
-
update( delay: number ): void;
|
|
1745
|
-
}
|
|
1746
|
-
|
|
1747
|
-
// ---------------------------------------
|
|
1748
|
-
// from /src/components/image/image.ts
|
|
1749
|
-
|
|
1750
|
-
interface ImageEvents extends ComponentEvents {
|
|
1751
|
-
change: EvDropChange;
|
|
1752
|
-
clear: CoreEvent;
|
|
1753
|
-
}
|
|
1754
|
-
|
|
1755
|
-
export interface ImageProps extends ComponentProps {
|
|
1756
|
-
src: string;
|
|
1757
|
-
fit?: "contain" | "cover" | "fill" | "scale-down";
|
|
1758
|
-
position?: string;
|
|
1759
|
-
lazy?: boolean;
|
|
1760
|
-
alt?: string;
|
|
1761
|
-
draggable?: boolean;
|
|
1762
|
-
candrop?: boolean;
|
|
1763
|
-
accept?: string;
|
|
1764
|
-
change?: EventCallback<EvDropChange>;
|
|
1765
|
-
clear?: EventCallback<CoreEvent>;
|
|
1766
|
-
}
|
|
1767
|
-
|
|
1768
|
-
@class_ns( "x4" ) export class Image<P extends ImageProps = ImageProps, E extends ImageEvents = ImageEvents> extends Component<P,E> {
|
|
1769
|
-
_img: Component;
|
|
1770
|
-
constructor( props: P );
|
|
1771
|
-
setImage( src: string ): void;
|
|
1772
|
-
setBase64( mime: string, base64: string ): void;
|
|
1773
|
-
clear( ): void;
|
|
1774
|
-
}
|
|
1775
|
-
|
|
1776
|
-
// ---------------------------------------
|
|
1777
|
-
// from /src/components/gridview/gridview.ts
|
|
1778
|
-
|
|
1779
|
-
type CellRenderer = (rec: DataRecord) => Component;
|
|
1780
|
-
|
|
1781
|
-
type CellClassifier = (data: any, rec: DataRecord, col: string ) => string;
|
|
1782
|
-
|
|
1783
|
-
type ColType = "number" | "money" | "checkbox" | "date" | "string" | "image" | "percent" | "icon";
|
|
1784
|
-
|
|
1785
|
-
export interface GridColumn {
|
|
1786
|
-
id: any;
|
|
1787
|
-
title: string;
|
|
1788
|
-
width: number;
|
|
1789
|
-
fixed?: boolean;
|
|
1790
|
-
flex?: number;
|
|
1791
|
-
align?: 'left' | 'center' | 'right';
|
|
1792
|
-
header_align?: 'left' | 'center' | 'right';
|
|
1793
|
-
renderer?: CellRenderer;
|
|
1794
|
-
formatter?: (input: any) => string;
|
|
1795
|
-
type?: ColType;
|
|
1796
|
-
cls?: string;
|
|
1797
|
-
sortable?: boolean;
|
|
1798
|
-
footer_val?: string;
|
|
1799
|
-
classifier?: CellClassifier;
|
|
1800
|
-
}
|
|
1801
|
-
|
|
1802
|
-
interface GridColumnEx extends GridColumn {
|
|
1803
|
-
sens?: "up" | "dn";
|
|
1804
|
-
}
|
|
1805
|
-
|
|
1806
|
-
export interface GridviewEvents extends ComponentEvents {
|
|
1807
|
-
click?: EvClick;
|
|
1808
|
-
dblClick?: EvDblClick;
|
|
1809
|
-
contextMenu?: EvContextMenu;
|
|
1810
|
-
selectionChange?: EvSelectionChange;
|
|
1811
|
-
}
|
|
1812
|
-
|
|
1813
|
-
export interface GridviewProps extends ComponentProps {
|
|
1814
|
-
footer?: boolean;
|
|
1815
|
-
store: DataStore;
|
|
1816
|
-
columns: GridColumn[];
|
|
1817
|
-
click?: EventCallback<EvClick>;
|
|
1818
|
-
dblClick?: EventCallback<EvDblClick>;
|
|
1819
|
-
contextMenu?: EventCallback<EvContextMenu>;
|
|
1820
|
-
selectionChange?: EventCallback<EvSelectionChange>;
|
|
1821
|
-
}
|
|
1822
|
-
|
|
1823
|
-
@class_ns("x4") export class Gridview<P extends GridviewProps = GridviewProps, E extends GridviewEvents = GridviewEvents> extends Component<P,E> {
|
|
1824
|
-
_dataview: DataView;
|
|
1825
|
-
_datamodel: DataModel;
|
|
1826
|
-
_columns: GridColumnEx[];
|
|
1827
|
-
_lock: number;
|
|
1828
|
-
_dirty: number;
|
|
1829
|
-
_row_height: number;
|
|
1830
|
-
_left: number;
|
|
1831
|
-
_top: number;
|
|
1832
|
-
_body: Component;
|
|
1833
|
-
_viewport: Component;
|
|
1834
|
-
_fheader: Box;
|
|
1835
|
-
_hheader: Box;
|
|
1836
|
-
_vheader: Box;
|
|
1837
|
-
_ffooter: Box;
|
|
1838
|
-
_footer: Box;
|
|
1839
|
-
_vis_rows: Map<number, { h: Component, r: Component }>;
|
|
1840
|
-
_start: number;
|
|
1841
|
-
_end: number;
|
|
1842
|
-
_selection: Set<number>;
|
|
1843
|
-
_num_fmt: any;
|
|
1844
|
-
_mny_fmt: any;
|
|
1845
|
-
_dte_fmt: any;
|
|
1846
|
-
_has_fixed: boolean;
|
|
1847
|
-
_has_footer: boolean;
|
|
1848
|
-
constructor( props: P );
|
|
1849
|
-
_on_key( ev: KeyboardEvent ): void;
|
|
1850
|
-
navigate( sens: kbNav ): void;
|
|
1851
|
-
_scrollToIndex( index: number, block: any ): void;
|
|
1852
|
-
setStore( store: DataStore ): void;
|
|
1853
|
-
getView( ): DataView;
|
|
1854
|
-
lock( lock: boolean ): void;
|
|
1855
|
-
_getColCount( ): void;
|
|
1856
|
-
_getCol( index: number ): void;
|
|
1857
|
-
_buildColHeader( fixed: boolean ): void;
|
|
1858
|
-
_buildColFooter( fixed: boolean ): void;
|
|
1859
|
-
_sortCol( col: number, ascending: boolean ): void;
|
|
1860
|
-
sortCol( colIdx: any, ascending: boolean ): void;
|
|
1861
|
-
_renderCell( rec: DataRecord, column: GridColumnEx, extra_cls: string[] ): ComponentContent;
|
|
1862
|
-
_buildRow( rowid: number, rec: DataRecord, top: number ): void;
|
|
1863
|
-
_buildRowHeader( rowid: number, rec: DataRecord, top: number ): void;
|
|
1864
|
-
_updateFlexs( ): void;
|
|
1865
|
-
_computeFullSize( ): void;
|
|
1866
|
-
_init( ): void;
|
|
1867
|
-
_on_dblclk( e: UIEvent, row: number ): void;
|
|
1868
|
-
_update( force: any ): void;
|
|
1869
|
-
_clearSelection( ): void;
|
|
1870
|
-
_addSelection( rowid: number ): void;
|
|
1871
|
-
getSelection( ): void;
|
|
1872
|
-
getFirstSel( ): void;
|
|
1873
|
-
selectItem( id: any ): void;
|
|
1874
|
-
}
|
|
1875
|
-
|
|
1876
|
-
// ---------------------------------------
|
|
1877
|
-
// from /src/components/keyboard/keyboard.ts
|
|
1878
|
-
|
|
1879
|
-
interface KeyboardProps extends BoxProps {
|
|
1880
|
-
}
|
|
1881
|
-
|
|
1882
|
-
@class_ns( "x4" ) export class Keyboard extends HBox<KeyboardProps> {
|
|
1883
|
-
mode: "lower" | "upper" | "number" | "date";
|
|
1884
|
-
locale: string;
|
|
1885
|
-
keyboard: Box;
|
|
1886
|
-
visible: boolean;
|
|
1887
|
-
input: HTMLInputElement;
|
|
1888
|
-
constructor( props: KeyboardProps );
|
|
1889
|
-
setZoom( perc: number ): void;
|
|
1890
|
-
handleKey( e: UIEvent ): void;
|
|
1891
|
-
_focusNext( ): void;
|
|
1892
|
-
_switchMode( m: "lower" | "upper" | "number" | "date" ): void;
|
|
1893
|
-
_redraw( ): void;
|
|
1894
|
-
_scrollIntoView( el: HTMLElement ): void;
|
|
1895
|
-
_updateVis: any;
|
|
1896
|
-
showOn( el: Component ): void;
|
|
1897
|
-
handleFocus( target: Element, enter: boolean ): void;
|
|
1898
|
-
_insertChar( caret: any, text: string, ch: string ): void;
|
|
1899
|
-
_backspace( caret: any, text: string ): void;
|
|
1900
|
-
_getCaret( ): void;
|
|
1901
|
-
_restoreCaretPos( caret: any ): void;
|
|
1902
|
-
fireKey( key: number, cb: Function ): void;
|
|
1903
|
-
_createContent( ): void;
|
|
1904
|
-
}
|
|
1905
|
-
|
|
1906
|
-
// ---------------------------------------
|
|
1907
|
-
// from /src/components/link/link.ts
|
|
1908
|
-
|
|
1909
|
-
interface LinkEvents extends ComponentEvents {
|
|
1910
|
-
click: EvClick;
|
|
1911
|
-
}
|
|
1912
|
-
|
|
1913
|
-
interface LinkProps extends ComponentProps {
|
|
1914
|
-
href: string;
|
|
1915
|
-
text?: string | UnsafeHtml;
|
|
1916
|
-
icon?: string;
|
|
1917
|
-
click?: EventCallback<EvClick>;
|
|
1918
|
-
}
|
|
1919
|
-
|
|
1920
|
-
@class_ns( "x4" ) export class Link extends Component<LinkProps,LinkEvents> {
|
|
1921
|
-
constructor( props: LinkProps );
|
|
1922
|
-
setText( text: string | UnsafeHtml ): void;
|
|
1923
|
-
_on_click( ev: MouseEvent ): void;
|
|
1924
|
-
}
|
|
1925
|
-
|
|
1926
|
-
// ---------------------------------------
|
|
1927
|
-
// from /src/components/messages/messages.ts
|
|
1928
|
-
|
|
1929
|
-
export interface MessageBoxProps extends DialogProps {
|
|
1930
|
-
message: string;
|
|
1931
|
-
click: (button: string) => void;
|
|
1932
|
-
}
|
|
1933
|
-
|
|
1934
|
-
@class_ns( "x4" ) export class MessageBox extends Dialog<DialogProps> {
|
|
1935
|
-
constructor( props: DialogProps );
|
|
1936
|
-
_create( msg: string | UnsafeHtml, buttons: BtnGroupItem[], title: string ): void;
|
|
1937
|
-
show( msg: string | UnsafeHtml, buttons: BtnGroupItem[], title: string ): MessageBox;
|
|
1938
|
-
showAsync( msg: string | UnsafeHtml, buttons: BtnGroupItem[], title: string ): Promise<string>;
|
|
1939
|
-
}
|
|
1940
|
-
|
|
1941
|
-
@class_ns( "x4" ) export class InputBox extends Dialog<DialogProps> {
|
|
1942
|
-
constructor( props: DialogProps );
|
|
1943
|
-
getValue( ): void;
|
|
1944
|
-
_create( msg: string | UnsafeHtml, value: string, title: string ): void;
|
|
1945
|
-
showAsync( msg: string | UnsafeHtml, value: string, title: string ): Promise<string>;
|
|
1946
|
-
}
|
|
1947
|
-
|
|
1948
|
-
@class_ns( "x4" ) export class PromptBox extends Dialog<DialogProps> {
|
|
1949
|
-
constructor( props: DialogProps );
|
|
1950
|
-
_create( msg: string | UnsafeHtml, editor: Component, title: string ): void;
|
|
1951
|
-
showAsync( msg: string | UnsafeHtml, editor: Component, title: string ): Promise<string>;
|
|
1952
|
-
show( msg: string | UnsafeHtml, editor: Component, title: string, callback: ( btn: string ) => boolean | Promise<boolean> | Promise<void> ): void;
|
|
1953
|
-
}
|
|
1954
|
-
|
|
1955
|
-
// ---------------------------------------
|
|
1956
|
-
// from /src/components/notification/notification.ts
|
|
1957
|
-
|
|
1958
|
-
interface NotificationProps extends ComponentProps {
|
|
1959
|
-
loading?: boolean;
|
|
1960
|
-
iconId?: string;
|
|
1961
|
-
closable?: boolean;
|
|
1962
|
-
mode?: "success" | "danger";
|
|
1963
|
-
title: string;
|
|
1964
|
-
text: string | UnsafeHtml;
|
|
1965
|
-
}
|
|
1966
|
-
|
|
1967
|
-
@class_ns( "x4" ) export class Notification extends Popup {
|
|
1968
|
-
constructor( props: NotificationProps );
|
|
1969
|
-
close( ): void;
|
|
1970
|
-
display( time_in_s: any ): void;
|
|
1971
|
-
}
|
|
1972
|
-
|
|
1973
|
-
// ---------------------------------------
|
|
1974
|
-
// from /src/components/panel/panel.ts
|
|
1975
|
-
|
|
1976
|
-
interface PanelProps extends ComponentProps {
|
|
1977
|
-
title: string;
|
|
1978
|
-
icon?: string;
|
|
1979
|
-
bodyModel?: Constructor<Component>;
|
|
1980
|
-
}
|
|
1981
|
-
|
|
1982
|
-
@class_ns( "x4" ) export class Panel extends VBox<PanelProps> {
|
|
1983
|
-
_title: Component;
|
|
1984
|
-
_body: Component;
|
|
1985
|
-
constructor( props: PanelProps );
|
|
1986
|
-
setContent( content: ComponentContent ): void;
|
|
1987
|
-
setTitle( title: string | UnsafeHtml ): void;
|
|
1988
|
-
}
|
|
1989
|
-
|
|
1990
|
-
// ---------------------------------------
|
|
1991
|
-
// from /src/components/progress/progress.ts
|
|
1992
|
-
|
|
1993
|
-
interface ProgressProps extends ComponentProps {
|
|
1994
|
-
value: number;
|
|
1995
|
-
min: number;
|
|
1996
|
-
max: number;
|
|
1997
|
-
}
|
|
1998
|
-
|
|
1999
|
-
@class_ns( "x4" ) export class Progress extends Component<ProgressProps> {
|
|
2000
|
-
_bar: Component;
|
|
2001
|
-
constructor( props: ProgressProps );
|
|
2002
|
-
setValue( value: number ): void;
|
|
2003
|
-
}
|
|
2004
|
-
|
|
2005
|
-
// ---------------------------------------
|
|
2006
|
-
// from /src/components/select/select.ts
|
|
2007
|
-
|
|
2008
|
-
export interface SelectProps extends ComponentProps {
|
|
2009
|
-
name?: string;
|
|
2010
|
-
value: string;
|
|
2011
|
-
items: ListItem[];
|
|
2012
|
-
multiple?: boolean;
|
|
2013
|
-
change?: EventCallback<EvChange>;
|
|
2014
|
-
focus?: EventCallback<EvFocus>;
|
|
2015
|
-
}
|
|
2016
|
-
|
|
2017
|
-
interface SelectEvents extends ComponentEvent {
|
|
2018
|
-
focus: EvFocus;
|
|
2019
|
-
change: EvChange;
|
|
2020
|
-
}
|
|
2021
|
-
|
|
2022
|
-
@class_ns( "x4" ) export class Select extends Component<SelectProps,SelectEvents> {
|
|
2023
|
-
constructor( props: SelectProps );
|
|
2024
|
-
on_focus( ev: FocusEvent, focus_out: boolean ): void;
|
|
2025
|
-
on_change( ev: InputEvent ): void;
|
|
2026
|
-
setItems( items: ListItem[] ): void;
|
|
2027
|
-
getValue( ): void;
|
|
2028
|
-
setValue( value: string ): void;
|
|
2029
|
-
}
|
|
2030
|
-
|
|
2031
|
-
// ---------------------------------------
|
|
2032
|
-
// from /src/components/propgrid/propgrid.ts
|
|
2033
|
-
|
|
2034
|
-
type IValue = boolean | number | string;
|
|
2035
|
-
|
|
2036
|
-
type IValueCB = ( name: string) => IValue;
|
|
2037
|
-
|
|
2038
|
-
export interface PropertyValue {
|
|
2039
|
-
type: 'boolean' | 'number' | 'string' | 'password' | 'options' | 'label' | 'button';
|
|
2040
|
-
title?: string;
|
|
2041
|
-
desc?: string;
|
|
2042
|
-
name?: string;
|
|
2043
|
-
value: IValue | IValueCB;
|
|
2044
|
-
options?: ListItem[];
|
|
2045
|
-
callback: ( name: string, value: any ) => void;
|
|
2046
|
-
step?: number;
|
|
2047
|
-
live?: boolean;
|
|
2048
|
-
cls?: string;
|
|
2049
|
-
}
|
|
2050
|
-
|
|
2051
|
-
export interface PropertyGroup {
|
|
2052
|
-
title: string;
|
|
2053
|
-
desc?: string;
|
|
2054
|
-
icon?: string;
|
|
2055
|
-
cls?: string;
|
|
2056
|
-
collapsible?: boolean;
|
|
2057
|
-
items: PropertyValue[];
|
|
2058
|
-
}
|
|
2059
|
-
|
|
2060
|
-
export interface PropertyProps extends ComponentProps {
|
|
2061
|
-
groups: PropertyGroup[];
|
|
2062
|
-
}
|
|
2063
|
-
|
|
2064
|
-
@class_ns( "x4" ) export class PropertyGrid extends VBox {
|
|
2065
|
-
root: Component;
|
|
2066
|
-
groups: PropertyGroup[];
|
|
2067
|
-
constructor( props: PropertyProps );
|
|
2068
|
-
setItems( _grps: PropertyGroup[] ): void;
|
|
2069
|
-
makeGroupHeader( g: PropertyGroup ): void;
|
|
2070
|
-
makePropertyRow( item: PropertyValue ): void;
|
|
2071
|
-
setPropValue( name: string, value: any ): void;
|
|
2072
|
-
}
|
|
2073
|
-
|
|
2074
|
-
// ---------------------------------------
|
|
2075
|
-
// from /src/components/radio/radio.ts
|
|
2076
|
-
|
|
2077
|
-
interface RadioEvents extends ComponentEvents {
|
|
2078
|
-
change?: EvChange;
|
|
2079
|
-
}
|
|
2080
|
-
|
|
2081
|
-
interface RadioProps extends ComponentProps {
|
|
2082
|
-
label: string;
|
|
2083
|
-
icon?: string;
|
|
2084
|
-
name: string;
|
|
2085
|
-
value: number | string;
|
|
2086
|
-
checked?: boolean;
|
|
2087
|
-
change?: EventCallback<EvChange>;
|
|
2088
|
-
}
|
|
2089
|
-
|
|
2090
|
-
@class_ns( "x4" ) export class Radio extends Component<RadioProps,RadioEvents> {
|
|
2091
|
-
_check: HBox;
|
|
2092
|
-
_input: Input;
|
|
2093
|
-
_label: Label;
|
|
2094
|
-
constructor( props: RadioProps );
|
|
2095
|
-
_on_click( ev: MouseEvent ): void;
|
|
2096
|
-
_on_change( ): void;
|
|
2097
|
-
setCheck( ck: boolean ): void;
|
|
2098
|
-
setLabel( text: string ): void;
|
|
2099
|
-
getValue( ): void;
|
|
2100
|
-
}
|
|
2101
|
-
|
|
2102
|
-
// ---------------------------------------
|
|
2103
|
-
// from /src/components/rating/rating.ts
|
|
2104
|
-
|
|
2105
|
-
interface RatingEventMap extends ComponentEvents {
|
|
2106
|
-
change: EvChange;
|
|
2107
|
-
}
|
|
2108
|
-
|
|
2109
|
-
export interface RatingProps extends ComponentProps {
|
|
2110
|
-
steps?: number;
|
|
2111
|
-
value?: number;
|
|
2112
|
-
icon?: string;
|
|
2113
|
-
name?: string;
|
|
2114
|
-
change?: EventCallback<EvChange>;
|
|
2115
|
-
}
|
|
2116
|
-
|
|
2117
|
-
@class_ns( "x4" ) export class Rating extends HBox<RatingProps,RatingEventMap> {
|
|
2118
|
-
m_els: Component[];
|
|
2119
|
-
m_input: Input;
|
|
2120
|
-
constructor( props: RatingProps );
|
|
2121
|
-
_update( ): void;
|
|
2122
|
-
getValue( ): void;
|
|
2123
|
-
setValue( v: number ): void;
|
|
2124
|
-
setSteps( n: number ): void;
|
|
2125
|
-
setShape( icon: string ): void;
|
|
2126
|
-
_on_click( ev: MouseEvent ): void;
|
|
2127
|
-
}
|
|
2128
|
-
|
|
2129
|
-
// ---------------------------------------
|
|
2130
|
-
// from /src/components/slider/slider.ts
|
|
2131
|
-
|
|
2132
|
-
interface SliderEvents extends ComponentEvents {
|
|
2133
|
-
change: EvChange;
|
|
2134
|
-
}
|
|
2135
|
-
|
|
2136
|
-
interface SliderProps extends ComponentProps {
|
|
2137
|
-
value: number;
|
|
2138
|
-
min: number;
|
|
2139
|
-
max: number;
|
|
2140
|
-
step?: number;
|
|
2141
|
-
vertical?: boolean;
|
|
2142
|
-
change?: EventCallback<EvChange>;
|
|
2143
|
-
}
|
|
2144
|
-
|
|
2145
|
-
@class_ns( "x4" ) export class Slider extends Component<SliderProps,SliderEvents> {
|
|
2146
|
-
_mdown: any;
|
|
2147
|
-
_irect: Rect;
|
|
2148
|
-
_thumb: Component;
|
|
2149
|
-
_bar: Component;
|
|
2150
|
-
_range: Input;
|
|
2151
|
-
constructor( props: SliderProps );
|
|
2152
|
-
_on_mousedown( ev: PointerEvent ): void;
|
|
2153
|
-
_getMinMax( ): void;
|
|
2154
|
-
_on_mousemove( ev: PointerEvent ): void;
|
|
2155
|
-
_update( ): void;
|
|
2156
|
-
_on_mouseup( ev: PointerEvent ): void;
|
|
2157
|
-
_on_key( ev: KeyboardEvent ): void;
|
|
2158
|
-
setMin( min: number ): void;
|
|
2159
|
-
setMax( max: number ): void;
|
|
2160
|
-
setValue( v: number ): void;
|
|
2161
|
-
}
|
|
2162
|
-
|
|
2163
|
-
// ---------------------------------------
|
|
2164
|
-
// from /src/components/switch/switch.ts
|
|
2165
|
-
|
|
2166
|
-
interface SwitchProps extends ComponentProps {
|
|
2167
|
-
label: string;
|
|
2168
|
-
checked?: boolean;
|
|
2169
|
-
value?: string;
|
|
2170
|
-
}
|
|
2171
|
-
|
|
2172
|
-
@class_ns( "x4" ) export class Switch extends HBox<SwitchProps> {
|
|
2173
|
-
constructor( props: SwitchProps );
|
|
2174
|
-
}
|
|
2175
|
-
|
|
2176
|
-
// ---------------------------------------
|
|
2177
|
-
// from /src/components/tabs/tabs.ts
|
|
2178
|
-
|
|
2179
|
-
export interface TabItem {
|
|
2180
|
-
name: string;
|
|
2181
|
-
title: string;
|
|
2182
|
-
icon?: string;
|
|
2183
|
-
content: Component;
|
|
2184
|
-
cls?: string;
|
|
2185
|
-
}
|
|
2186
|
-
|
|
2187
|
-
@class_ns( "x4" ) class CTab extends Button {
|
|
2188
|
-
constructor( props: ButtonProps, item: TabItem );
|
|
2189
|
-
}
|
|
2190
|
-
|
|
2191
|
-
interface TablistClickEvent extends CoreEvent {
|
|
2192
|
-
name: string;
|
|
2193
|
-
}
|
|
2194
|
-
|
|
2195
|
-
interface TablistProps extends ComponentProps {
|
|
2196
|
-
click: ( ev: TablistClickEvent ) => void;
|
|
2197
|
-
}
|
|
2198
|
-
|
|
2199
|
-
interface TablistEvents extends ComponentEvents {
|
|
2200
|
-
click: TablistClickEvent;
|
|
2201
|
-
}
|
|
2202
|
-
|
|
2203
|
-
@class_ns( "x4" ) class CTabList extends HBox<TablistProps,TablistEvents> {
|
|
2204
|
-
_selitem: Button;
|
|
2205
|
-
constructor( props: TablistProps, items: TabItem[] );
|
|
2206
|
-
_on_click( ev: EvClick ): void;
|
|
2207
|
-
select( name: string ): void;
|
|
2208
|
-
setItems( items: TabItem[ ] ): void;
|
|
2209
|
-
addItem( tab: TabItem ): void;
|
|
2210
|
-
removeItem( name: string ): void;
|
|
2211
|
-
}
|
|
2212
|
-
|
|
2213
|
-
interface TabsProps extends Omit<ComponentProps,"content"> {
|
|
2214
|
-
default: string;
|
|
2215
|
-
items: TabItem[];
|
|
2216
|
-
}
|
|
2217
|
-
|
|
2218
|
-
@class_ns( "x4" ) export class Tabs extends VBox<TabsProps> {
|
|
2219
|
-
_list: CTabList;
|
|
2220
|
-
_stack: StackBox;
|
|
2221
|
-
_current: string;
|
|
2222
|
-
constructor( props: TabsProps );
|
|
2223
|
-
selectTab( name: string ): void;
|
|
2224
|
-
_onclick( ev: TablistClickEvent ): void;
|
|
2225
|
-
getTab( name: string ): void;
|
|
2226
|
-
getCurTab( ): void;
|
|
2227
|
-
addTab( item: TabItem ): void;
|
|
2228
|
-
removeTab( name: string ): void;
|
|
2229
|
-
enumTabs( ): string[];
|
|
2230
|
-
}
|
|
2231
|
-
|
|
2232
|
-
// ---------------------------------------
|
|
2233
|
-
// from /src/components/textarea/textarea.ts
|
|
2234
|
-
|
|
2235
|
-
interface TextAreaProps extends BaseProps {
|
|
2236
|
-
label?: string;
|
|
2237
|
-
value?: string;
|
|
2238
|
-
resize?: boolean;
|
|
2239
|
-
readonly?: boolean;
|
|
2240
|
-
}
|
|
2241
|
-
|
|
2242
|
-
class SimpleTextArea extends Component {
|
|
2243
|
-
constructor( props: TextAreaProps );
|
|
2244
|
-
setText( text: string ): void;
|
|
2245
|
-
getText( ): void;
|
|
2246
|
-
queryInterface<T>( name: string ): T;
|
|
2247
|
-
}
|
|
2248
|
-
|
|
2249
|
-
@class_ns( "x4" ) export class TextArea extends VBox {
|
|
2250
|
-
_input: SimpleTextArea;
|
|
2251
|
-
constructor( props: TextAreaProps );
|
|
2252
|
-
setText( text: string ): void;
|
|
2253
|
-
getText( ): void;
|
|
2254
|
-
queryInterface<T>( name: string ): T;
|
|
2255
|
-
}
|
|
2256
|
-
|
|
2257
|
-
// ---------------------------------------
|
|
2258
|
-
// from /src/components/textedit/textedit.ts
|
|
2259
|
-
|
|
2260
|
-
type TextEditInputs = TextInputProps | NumberProps | DateProps | TimeProps;
|
|
2261
|
-
|
|
2262
|
-
interface TextEditBase {
|
|
2263
|
-
label: string | UnsafeHtml;
|
|
2264
|
-
labelWidth?: number;
|
|
2265
|
-
inputWidth?: number;
|
|
2266
|
-
inputId?: string;
|
|
2267
|
-
inputGadgets?: Component[];
|
|
2268
|
-
inputAttrs?: any;
|
|
2269
|
-
}
|
|
2270
|
-
|
|
2271
|
-
type TextEditProps = TextEditInputs & TextEditBase;
|
|
2272
|
-
|
|
2273
|
-
@class_ns( "x4" ) export class TextEdit extends HBox {
|
|
2274
|
-
input: Input;
|
|
2275
|
-
constructor( props: TextEditProps );
|
|
2276
|
-
getValue( ): void;
|
|
2277
|
-
setValue( value: string ): void;
|
|
2278
|
-
getInput( ): void;
|
|
2279
|
-
}
|
|
2280
|
-
|
|
2281
|
-
// ---------------------------------------
|
|
2282
|
-
// from /src/components/tickline/tickline.ts
|
|
2283
|
-
|
|
2284
|
-
interface TickLineProps extends ComponentProps {
|
|
2285
|
-
values: number[];
|
|
2286
|
-
min?: number;
|
|
2287
|
-
max?: number;
|
|
2288
|
-
color?: Color;
|
|
2289
|
-
background?: Color;
|
|
2290
|
-
type: "bars" | "line";
|
|
2291
|
-
}
|
|
2292
|
-
|
|
2293
|
-
export class TickLine extends Component<TickLineProps> {
|
|
2294
|
-
constructor( props: TickLineProps );
|
|
2295
|
-
update( ): void;
|
|
2296
|
-
}
|
|
2297
|
-
|
|
2298
|
-
// ---------------------------------------
|
|
2299
|
-
// from /src/components/tooltips/tooltips.ts
|
|
2300
|
-
|
|
2301
|
-
@class_ns( "x4" ) class Tooltip extends Popup {
|
|
2302
|
-
constructor( props: PopupProps );
|
|
2303
|
-
setText( text: string|UnsafeHtml ): void;
|
|
2304
|
-
}
|
|
2305
|
-
|
|
2306
|
-
// ---------------------------------------
|
|
2307
|
-
// from /src/components/treeview/treeview.ts
|
|
2308
|
-
|
|
2309
|
-
enum kbTreeNav {
|
|
2310
|
-
first,
|
|
2311
|
-
prev,
|
|
2312
|
-
next,
|
|
2313
|
-
last,
|
|
2314
|
-
parent,
|
|
2315
|
-
child,
|
|
2316
|
-
expand,
|
|
2317
|
-
collapse,
|
|
2318
|
-
toggle,
|
|
2319
|
-
}
|
|
2320
|
-
|
|
2321
|
-
export interface TreeItem extends ListItem {
|
|
2322
|
-
children?: TreeItem[];
|
|
2323
|
-
open?: boolean;
|
|
2324
|
-
}
|
|
2325
|
-
|
|
2326
|
-
interface TreeviewProps extends Omit<ComponentProps,"content"> {
|
|
2327
|
-
items: TreeItem[];
|
|
2328
|
-
footer?: Component;
|
|
2329
|
-
selectionChange?: EventCallback<EvSelectionChange>;
|
|
2330
|
-
dblClick?: EventCallback<EvDblClick>;
|
|
2331
|
-
click?: EventCallback<EvClick>;
|
|
2332
|
-
}
|
|
2333
|
-
|
|
2334
|
-
interface TreeviewEvents extends ComponentEvents {
|
|
2335
|
-
selectionChange?: EvSelectionChange;
|
|
2336
|
-
dblClick?: EvDblClick;
|
|
2337
|
-
click?: EvClick;
|
|
2338
|
-
}
|
|
2339
|
-
|
|
2340
|
-
@class_ns( "x4" ) class CTreeViewItem extends Box {
|
|
2341
|
-
_item: TreeItem;
|
|
2342
|
-
_label: Component;
|
|
2343
|
-
_icon: Icon;
|
|
2344
|
-
_childs: Component;
|
|
2345
|
-
constructor( props: BoxProps, item: TreeItem );
|
|
2346
|
-
toggle( ev: UIEvent ): void;
|
|
2347
|
-
open( open: any ): void;
|
|
2348
|
-
setItems( items: TreeItem[ ] ): void;
|
|
2349
|
-
}
|
|
2350
|
-
|
|
2351
|
-
@class_ns( "x4" ) export class Treeview extends Component<TreeviewProps,TreeviewEvents> {
|
|
2352
|
-
_view: Viewport;
|
|
2353
|
-
_selection: ListboxID;
|
|
2354
|
-
_selitem: Component;
|
|
2355
|
-
_items: TreeItem[];
|
|
2356
|
-
constructor( props: TreeviewProps );
|
|
2357
|
-
setItems( items: TreeItem[ ] ): void;
|
|
2358
|
-
_on_click( ev: UIEvent ): void;
|
|
2359
|
-
_onkey( ev: KeyboardEvent ): void;
|
|
2360
|
-
navigate( sens: kbTreeNav ): void;
|
|
2361
|
-
_flattenOpenItems( ): void;
|
|
2362
|
-
_flattenItems( ): void;
|
|
2363
|
-
_selectItem( id: ListboxID, item: Component ): void;
|
|
2364
|
-
_findItem( id: ListboxID ): void;
|
|
2365
|
-
clearSelection( ): void;
|
|
2366
|
-
getSelection( ): void;
|
|
2367
|
-
selectItem( id: ListboxID ): void;
|
|
2368
|
-
}
|
|
2369
|
-
|
|
2370
|
-
// ---------------------------------------
|
|
2371
|
-
// from /src/components/components.ts
|
|
2372
|
-
|
|
2373
|
-
}
|
|
2374
|
-
|