x4js 2.0.13 → 2.0.15
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/README.md +5 -0
- package/{lib/src/demo → demo}/main.scss +3 -1
- package/{lib/src/demo/main.tsx → demo/main.ts} +37 -36
- 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/README.txt +5 -0
- package/lib/cjs/x4.css +1 -1
- package/lib/cjs/x4.js +2 -1
- package/lib/esm/x4.css +1 -1
- package/lib/esm/x4.mjs +2 -1
- package/lib/src/components/boxes/boxes.module.scss +17 -0
- package/lib/src/components/boxes/boxes.ts +258 -17
- package/lib/src/components/breadcrumb/breadcrumb.scss +56 -28
- package/lib/src/components/breadcrumb/breadcrumb.ts +93 -84
- package/lib/src/components/btngroup/btngroup.module.scss +12 -0
- package/lib/src/components/btngroup/btngroup.ts +41 -8
- package/lib/src/components/button/button.module.scss +23 -5
- package/lib/src/components/button/button.ts +72 -4
- package/lib/src/components/canvas/canvas.module.scss +25 -0
- package/lib/src/components/canvas/canvas.ts +189 -0
- package/lib/src/components/canvas/canvas_ex.ts +276 -0
- package/lib/src/components/checkbox/checkbox.ts +18 -4
- package/lib/src/components/combobox/combobox.module.scss +24 -15
- package/lib/src/components/combobox/combobox.ts +107 -24
- package/lib/src/components/components.ts +7 -0
- package/lib/src/components/dialog/dialog.module.scss +40 -7
- package/lib/src/components/dialog/dialog.ts +166 -31
- package/lib/src/components/filedrop/cloud-arrow-up.svg +1 -0
- package/lib/src/components/filedrop/filedrop.module.scss +70 -0
- package/lib/src/components/filedrop/filedrop.ts +131 -0
- package/lib/src/components/form/form.module.scss +4 -0
- package/lib/src/components/form/form.ts +137 -6
- package/lib/src/components/gridview/arrow-down-light.svg +1 -0
- package/lib/src/components/gridview/arrow-up-light.svg +1 -0
- package/lib/src/components/gridview/gridview.module.scss +324 -0
- package/lib/src/components/gridview/gridview.ts +1175 -0
- package/lib/src/components/icon/icon.module.scss +2 -1
- package/lib/src/components/icon/icon.ts +4 -3
- package/lib/src/components/image/image.module.scss +8 -1
- package/lib/src/components/image/image.ts +105 -6
- package/lib/src/components/input/input.module.scss +8 -3
- package/lib/src/components/input/input.ts +178 -31
- package/lib/src/components/keyboard/arrow-up.svg +1 -0
- package/lib/src/components/keyboard/delete-left.svg +1 -0
- package/lib/src/components/keyboard/eye-slash.svg +1 -0
- package/lib/src/components/keyboard/keyboard.module.scss +134 -0
- package/lib/src/components/keyboard/keyboard.ts +526 -0
- package/lib/src/components/label/label.module.scss +22 -4
- package/lib/src/components/label/label.ts +33 -0
- package/lib/src/components/link/link.ts +81 -78
- package/lib/src/components/listbox/listbox.module.scss +61 -3
- package/lib/src/components/listbox/listbox.ts +164 -56
- package/lib/src/components/menu/menu.module.scss +10 -1
- package/lib/src/components/menu/menu.ts +6 -3
- package/lib/src/components/messages/messages.module.scss +44 -0
- package/lib/src/components/messages/messages.ts +164 -18
- package/lib/src/components/messages/pen-field.svg +1 -0
- package/lib/src/components/normalize.scss +5 -0
- package/lib/src/components/notification/notification.module.scss +4 -2
- package/lib/src/components/notification/notification.ts +2 -4
- package/lib/src/components/panel/panel.module.scss +12 -0
- package/lib/src/components/popup/popup.module.scss +10 -2
- package/lib/src/components/popup/popup.ts +141 -95
- package/lib/src/components/propgrid/folder-closed.svg +1 -0
- package/lib/src/components/propgrid/folder-open.svg +1 -0
- package/lib/src/components/propgrid/progrid.module.scss +112 -0
- package/lib/src/components/propgrid/propgrid.ts +288 -0
- package/lib/src/components/propgrid/updown.svg +4 -0
- package/lib/src/components/radio/radio.module.scss +147 -0
- package/lib/src/components/radio/radio.svg +4 -0
- package/lib/src/components/radio/radio.ts +142 -0
- package/lib/src/components/select/select.module.scss +9 -0
- package/lib/src/components/select/select.ts +134 -0
- package/lib/src/components/shared.scss +47 -0
- package/lib/src/components/sizers/sizer.ts +10 -2
- package/lib/src/components/slider/slider.module.scss +77 -30
- package/lib/src/components/slider/slider.ts +72 -22
- package/lib/src/components/tabs/tabs.module.scss +1 -2
- package/lib/src/components/tabs/tabs.ts +49 -12
- package/lib/src/components/textarea/textarea.module.scss +6 -2
- package/lib/src/components/textarea/textarea.ts +73 -8
- package/lib/src/components/textedit/textedit.module.scss +3 -1
- package/lib/src/components/textedit/textedit.ts +47 -15
- package/lib/src/components/themes.scss +7 -0
- package/lib/src/components/tickline/tickline.module.scss +26 -0
- package/lib/src/components/tickline/tickline.ts +82 -0
- package/lib/src/components/tooltips/comments-question.svg +1 -0
- package/lib/src/components/tooltips/tooltips.scss +30 -9
- package/lib/src/components/tooltips/tooltips.ts +10 -5
- package/lib/src/components/treeview/treeview.module.scss +129 -60
- package/lib/src/components/treeview/treeview.ts +47 -12
- package/lib/src/components/viewport/viewport.module.scss +7 -0
- package/lib/src/core/component.ts +113 -40
- package/lib/src/core/core_application.ts +223 -2
- package/lib/src/core/core_colors.ts +2 -2
- package/lib/src/{components/grid/datastore.ts → core/core_data.ts} +264 -252
- package/lib/src/core/core_dragdrop.ts +3 -3
- package/lib/src/core/core_element.ts +18 -1
- package/lib/src/core/core_events.ts +28 -0
- package/lib/src/core/core_i18n.ts +19 -3
- package/lib/src/core/core_react.ts +79 -0
- package/lib/src/core/core_router.ts +25 -9
- package/lib/src/core/core_state.ts +62 -0
- package/lib/src/core/core_styles.ts +5 -5
- package/lib/src/core/core_svg.ts +174 -12
- package/lib/src/core/core_tools.ts +305 -87
- package/lib/src/x4tsx.d.ts +25 -0
- package/lib/styles/x4.css +1 -1
- package/lib/types/x4js.d.ts +828 -119
- package/package.json +4 -4
- package/scripts/build.mjs +378 -0
- package/scripts/prepack.mjs +346 -0
- package/src/components/base.scss +25 -0
- package/src/components/boxes/boxes.module.scss +54 -0
- package/src/components/boxes/boxes.ts +370 -0
- package/src/components/breadcrumb/breadcrumb.scss +56 -0
- package/src/components/breadcrumb/breadcrumb.ts +93 -0
- package/src/components/breadcrumb/chevron-right.svg +1 -0
- package/src/components/btngroup/btngroup.module.scss +41 -0
- package/src/components/btngroup/btngroup.ts +153 -0
- package/src/components/button/button.module.scss +173 -0
- package/src/components/button/button.ts +185 -0
- package/src/components/calendar/calendar-check-sharp-light.svg +1 -0
- package/src/components/calendar/calendar.module.scss +163 -0
- package/src/components/calendar/calendar.ts +327 -0
- package/src/components/calendar/chevron-left-sharp-light.svg +1 -0
- package/src/components/calendar/chevron-right-sharp-light.svg +1 -0
- package/src/components/canvas/canvas.module.scss +25 -0
- package/src/components/canvas/canvas.ts +189 -0
- package/src/components/canvas/canvas_ex.ts +276 -0
- package/src/components/checkbox/check.svg +4 -0
- package/src/components/checkbox/checkbox.module.scss +142 -0
- package/src/components/checkbox/checkbox.ts +140 -0
- package/src/components/colorinput/colorinput.module.scss +65 -0
- package/src/components/colorinput/colorinput.ts +91 -0
- package/src/components/colorinput/crosshairs-simple-sharp-light.svg +1 -0
- package/src/components/colorpicker/colorpicker.module.scss +133 -0
- package/src/components/colorpicker/colorpicker.ts +482 -0
- package/src/components/combobox/combobox.module.scss +133 -0
- package/src/components/combobox/combobox.ts +275 -0
- package/src/components/combobox/updown.svg +4 -0
- package/src/components/components.ts +41 -0
- package/src/components/dialog/dialog.module.scss +104 -0
- package/src/components/dialog/dialog.ts +229 -0
- package/src/components/dialog/xmark-sharp-light.svg +1 -0
- package/src/components/filedrop/cloud-arrow-up.svg +1 -0
- package/src/components/filedrop/filedrop.module.scss +70 -0
- package/src/components/filedrop/filedrop.ts +131 -0
- package/src/components/form/form.module.scss +38 -0
- package/src/components/form/form.ts +172 -0
- package/src/components/gridview/arrow-down-light.svg +1 -0
- package/src/components/gridview/arrow-up-light.svg +1 -0
- package/src/components/gridview/gridview.module.scss +324 -0
- package/src/components/gridview/gridview.ts +1175 -0
- package/src/components/header/header.module.scss +40 -0
- package/src/components/header/header.ts +130 -0
- package/src/components/icon/icon.module.scss +31 -0
- package/src/components/icon/icon.ts +137 -0
- package/src/components/image/image.module.scss +28 -0
- package/src/components/image/image.ts +168 -0
- package/src/components/input/input.module.scss +74 -0
- package/src/components/input/input.ts +422 -0
- package/src/components/keyboard/arrow-up.svg +1 -0
- package/src/components/keyboard/delete-left.svg +1 -0
- package/src/components/keyboard/eye-slash.svg +1 -0
- package/src/components/keyboard/keyboard.module.scss +134 -0
- package/src/components/keyboard/keyboard.ts +526 -0
- package/src/components/label/label.module.scss +76 -0
- package/src/components/label/label.ts +97 -0
- package/src/components/link/link.ts +81 -0
- package/src/components/listbox/listbox.module.scss +161 -0
- package/src/components/listbox/listbox.ts +539 -0
- package/src/components/menu/caret-right-solid.svg +1 -0
- package/src/components/menu/menu.module.scss +117 -0
- package/src/components/menu/menu.ts +174 -0
- package/src/components/messages/circle-exclamation.svg +1 -0
- package/src/components/messages/messages.module.scss +92 -0
- package/src/components/messages/messages.ts +215 -0
- package/src/components/messages/pen-field.svg +1 -0
- package/src/components/normalize.scss +391 -0
- package/src/components/notification/circle-check-solid.svg +1 -0
- package/src/components/notification/circle-exclamation-solid.svg +1 -0
- package/src/components/notification/circle-notch-light.svg +1 -0
- package/src/components/notification/notification.module.scss +84 -0
- package/src/components/notification/notification.ts +107 -0
- package/src/components/notification/xmark-sharp-light.svg +1 -0
- package/src/components/panel/panel.module.scss +60 -0
- package/src/components/panel/panel.ts +58 -0
- package/src/components/popup/popup.module.scss +51 -0
- package/src/components/popup/popup.ts +442 -0
- package/src/components/progress/progress.module.scss +57 -0
- package/src/components/progress/progress.ts +44 -0
- package/src/components/propgrid/folder-closed.svg +1 -0
- package/src/components/propgrid/folder-open.svg +1 -0
- package/src/components/propgrid/progrid.module.scss +112 -0
- package/src/components/propgrid/propgrid.ts +288 -0
- package/src/components/propgrid/updown.svg +4 -0
- package/src/components/radio/radio.module.scss +147 -0
- package/src/components/radio/radio.svg +4 -0
- package/src/components/radio/radio.ts +142 -0
- package/src/components/rating/rating.module.scss +23 -0
- package/src/components/rating/rating.ts +131 -0
- package/src/components/rating/star-sharp-light.svg +1 -0
- package/src/components/rating/star-sharp-solid.svg +1 -0
- package/src/components/select/select.module.scss +9 -0
- package/src/components/select/select.ts +134 -0
- package/src/components/shared.scss +137 -0
- package/src/components/sizers/sizer.module.scss +90 -0
- package/src/components/sizers/sizer.ts +132 -0
- package/src/components/slider/slider.module.scss +118 -0
- package/src/components/slider/slider.ts +198 -0
- package/src/components/switch/switch.module.scss +127 -0
- package/src/components/switch/switch.ts +62 -0
- package/src/components/tabs/tabs.module.scss +45 -0
- package/src/components/tabs/tabs.ts +205 -0
- package/src/components/textarea/textarea.module.scss +63 -0
- package/src/components/textarea/textarea.ts +125 -0
- package/src/components/textedit/textedit.module.scss +116 -0
- package/src/components/textedit/textedit.ts +115 -0
- package/src/components/themes.scss +88 -0
- package/src/components/tickline/tickline.module.scss +26 -0
- package/src/components/tickline/tickline.ts +82 -0
- package/src/components/tooltips/circle-info-sharp-light.svg +1 -0
- package/src/components/tooltips/comments-question.svg +1 -0
- package/src/components/tooltips/tooltips.scss +72 -0
- package/src/components/tooltips/tooltips.ts +109 -0
- package/src/components/treeview/chevron-down-light.svg +1 -0
- package/src/components/treeview/treeview.module.scss +185 -0
- package/src/components/treeview/treeview.ts +445 -0
- package/src/components/viewport/viewport.module.scss +32 -0
- package/src/components/viewport/viewport.ts +41 -0
- package/src/core/component.ts +1075 -0
- package/src/core/core_application.ts +265 -0
- package/src/core/core_colors.ts +250 -0
- package/src/core/core_data.ts +1310 -0
- package/src/core/core_dom.ts +471 -0
- package/src/core/core_dragdrop.ts +201 -0
- package/src/core/core_element.ts +115 -0
- package/src/core/core_events.ts +177 -0
- package/src/core/core_i18n.ts +393 -0
- package/src/core/core_react.ts +79 -0
- package/src/core/core_router.ts +237 -0
- package/src/core/core_state.ts +62 -0
- package/src/core/core_styles.ts +214 -0
- package/src/core/core_svg.ts +712 -0
- package/src/core/core_tools.ts +906 -0
- package/src/types/scss.d.ts +4 -0
- package/src/types/svg.d.ts +1 -0
- package/src/types/x4react.d.ts +9 -0
- package/src/x4.scss +19 -0
- package/src/x4tsx.d.ts +25 -0
- package/tsconfig.json +14 -0
- package/lib/src/components/grid/gridview.ts +0 -1108
- package/lib/src/components/grid/memdb.ts +0 -325
- /package/{lib/src/demo → demo}/assets/house-light.svg +0 -0
- /package/{lib/src/demo → demo}/assets/radio.svg +0 -0
- /package/{lib/src/demo → demo}/index.html +0 -0
package/lib/types/x4js.d.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
13
13
|
*
|
|
14
14
|
* AUTOGENERATED CODE, DO NOT MODIFY
|
|
15
|
-
* generated on
|
|
15
|
+
* generated on Tue Jul 22 2025
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
|
|
@@ -55,6 +55,16 @@ declare module 'x4js' {
|
|
|
55
55
|
constructor( l: number, t: number, w: number, h: number );
|
|
56
56
|
constructor( l: Rect );
|
|
57
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;
|
|
58
68
|
}
|
|
59
69
|
|
|
60
70
|
export interface Point {
|
|
@@ -62,12 +72,26 @@ declare module 'x4js' {
|
|
|
62
72
|
y: number;
|
|
63
73
|
}
|
|
64
74
|
|
|
75
|
+
export interface Size {
|
|
76
|
+
w: number;
|
|
77
|
+
h: number;
|
|
78
|
+
}
|
|
79
|
+
|
|
65
80
|
export interface IComponentInterface {
|
|
66
81
|
}
|
|
67
82
|
|
|
68
83
|
export interface IFormElement extends IComponentInterface {
|
|
69
84
|
getRawValue( ): any;
|
|
70
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;
|
|
71
95
|
}
|
|
72
96
|
|
|
73
97
|
interface Features {
|
|
@@ -75,7 +99,7 @@ declare module 'x4js' {
|
|
|
75
99
|
}
|
|
76
100
|
|
|
77
101
|
export class Timer {
|
|
78
|
-
_timers: Map<string,any>;
|
|
102
|
+
_timers: Map<string, any>;
|
|
79
103
|
setTimeout( name: string, time: number, callback: Function ): void;
|
|
80
104
|
clearTimeout( name: string ): void;
|
|
81
105
|
setInterval( name: string, time: number, callback: Function ): void;
|
|
@@ -83,6 +107,15 @@ declare module 'x4js' {
|
|
|
83
107
|
clearAllTimeouts( ): void;
|
|
84
108
|
}
|
|
85
109
|
|
|
110
|
+
enum kbNav {
|
|
111
|
+
first,
|
|
112
|
+
prev,
|
|
113
|
+
pgdn,
|
|
114
|
+
pgup,
|
|
115
|
+
next,
|
|
116
|
+
last,
|
|
117
|
+
}
|
|
118
|
+
|
|
86
119
|
// ---------------------------------------
|
|
87
120
|
// from /src/core/core_events.ts
|
|
88
121
|
|
|
@@ -106,6 +139,7 @@ declare module 'x4js' {
|
|
|
106
139
|
_registry: Map<string,EventCallback[]>;
|
|
107
140
|
constructor( source: unknown );
|
|
108
141
|
addListener<K extends keyof E>( name: K, callback: ( ev: E[K] ) => void, capturing: any ): void;
|
|
142
|
+
removeListener<K extends keyof E>( name: K, callback: (ev: E[K]) => any ): void;
|
|
109
143
|
fire<K extends keyof E>( name: K, evx: E[K] ): void;
|
|
110
144
|
}
|
|
111
145
|
|
|
@@ -123,6 +157,7 @@ declare module 'x4js' {
|
|
|
123
157
|
clearInterval( name: string ): void;
|
|
124
158
|
clearTimeouts( ): void;
|
|
125
159
|
on<K extends keyof E>( name: K, listener: ( ev: E[K] ) => void ): void;
|
|
160
|
+
off<K extends keyof E>( name: K, listener: ( ev: E[K] ) => void ): void;
|
|
126
161
|
fire<K extends keyof E>( name: K, ev: E[K] ): void;
|
|
127
162
|
}
|
|
128
163
|
|
|
@@ -259,7 +294,9 @@ declare module 'x4js' {
|
|
|
259
294
|
|
|
260
295
|
type ComponentAttributes = Record<string,string|number|boolean>;
|
|
261
296
|
|
|
262
|
-
type
|
|
297
|
+
type CreateComponentCallBack = ( attrs: Record<string,string> ) => ComponentContent;
|
|
298
|
+
|
|
299
|
+
type ComponentContent = Component | Component[] | string | string[] | UnsafeHtml | UnsafeHtml[] | number | boolean;
|
|
263
300
|
|
|
264
301
|
export interface ComponentProps {
|
|
265
302
|
tag?: string;
|
|
@@ -275,6 +312,7 @@ declare module 'x4js' {
|
|
|
275
312
|
height?: string | number;
|
|
276
313
|
disabled?: true;
|
|
277
314
|
hidden?: true;
|
|
315
|
+
flex?: boolean | number;
|
|
278
316
|
tooltip?: string;
|
|
279
317
|
existingDOM?: HTMLElement;
|
|
280
318
|
}
|
|
@@ -289,21 +327,22 @@ declare module 'x4js' {
|
|
|
289
327
|
dom: Element;
|
|
290
328
|
props: P;
|
|
291
329
|
clsprefix: string;
|
|
292
|
-
store: Map<string|
|
|
330
|
+
#store: Map<string|symbol,any>;
|
|
293
331
|
constructor( props: P );
|
|
294
332
|
hasClass( cls: string ): void;
|
|
295
333
|
addClass( cls: string ): void;
|
|
296
334
|
removeClass( cls: string ): void;
|
|
297
335
|
removeClassEx( re: RegExp ): void;
|
|
298
336
|
toggleClass( cls: string ): void;
|
|
299
|
-
setClass( cls: string, set: boolean ):
|
|
300
|
-
setAttributes( attrs: ComponentAttributes ):
|
|
337
|
+
setClass( cls: string, set: boolean ): this;
|
|
338
|
+
setAttributes( attrs: ComponentAttributes ): this;
|
|
301
339
|
setAttribute( name: string, value: string | number | boolean ): void;
|
|
302
340
|
getAttribute( name: string ): string;
|
|
303
341
|
getData( name: string ): string;
|
|
342
|
+
getIntData( name: string ): number;
|
|
304
343
|
setData( name: string, value: string ): void;
|
|
305
|
-
setInternalData( name: string|
|
|
306
|
-
getInternalData( name: string|
|
|
344
|
+
setInternalData( name: string|symbol, value: any ): this;
|
|
345
|
+
getInternalData( name: string|symbol ): any;
|
|
307
346
|
addDOMEvent<K extends keyof GlobalDOMEvents>( name: K, listener: GlobalDOMEvents[K], prepend: any ): void;
|
|
308
347
|
setDOMEvents( events: GlobalDOMEvents ): void;
|
|
309
348
|
mapPropEvents<N extends keyof E>( props: P, elements: N[] ): void;
|
|
@@ -326,23 +365,25 @@ declare module 'x4js' {
|
|
|
326
365
|
setCapture( pointerId: number ): void;
|
|
327
366
|
releaseCapture( pointerId: number ): void;
|
|
328
367
|
getBoundingRect( ): Rect;
|
|
329
|
-
focus( ):
|
|
368
|
+
focus( ): this;
|
|
369
|
+
hasFocus( ): void;
|
|
330
370
|
scrollIntoView( arg: boolean | ScrollIntoViewOptions ): void;
|
|
331
371
|
isVisible( ): void;
|
|
332
|
-
show( vis: any ):
|
|
333
|
-
hide( ):
|
|
334
|
-
enable( ena: any ):
|
|
335
|
-
disable( ):
|
|
372
|
+
show( vis: any ): this;
|
|
373
|
+
hide( ): this;
|
|
374
|
+
enable( ena: any ): this;
|
|
375
|
+
disable( ): this;
|
|
336
376
|
isDisabled( ): void;
|
|
337
377
|
nextElement<T extends Component = Component>( ): T;
|
|
338
378
|
prevElement<T extends Component = Component>( ): T;
|
|
339
379
|
parentElement<T extends Component>( cls: Constructor<T> ): T;
|
|
380
|
+
parentElement<T extends Component>( dom: Node, cls: Constructor<T> ): T;
|
|
340
381
|
firstChild<T extends Component = Component>( ): T;
|
|
341
382
|
lastChild<T extends Component = Component>( ): T;
|
|
342
383
|
enumChildComponents( recursive: boolean ): void;
|
|
343
384
|
enumChildNodes( recursive: boolean ): void;
|
|
344
385
|
animate( keyframes: Keyframe[], duration: number ): void;
|
|
345
|
-
createElement( clsOrTag: string | ComponentConstructor |
|
|
386
|
+
createElement( clsOrTag: string | ComponentConstructor | symbol | CreateComponentCallBack, attrs: any, children: Component[] ): Component | Component[];
|
|
346
387
|
createFragment( ): Component[];
|
|
347
388
|
queryInterface<T>( name: string ): T;
|
|
348
389
|
}
|
|
@@ -355,6 +396,10 @@ declare module 'x4js' {
|
|
|
355
396
|
constructor( );
|
|
356
397
|
}
|
|
357
398
|
|
|
399
|
+
export class Space extends Component {
|
|
400
|
+
constructor( width: number|string, cls: string );
|
|
401
|
+
}
|
|
402
|
+
|
|
358
403
|
export interface EvClick extends ComponentEvent {
|
|
359
404
|
}
|
|
360
405
|
|
|
@@ -362,11 +407,16 @@ declare module 'x4js' {
|
|
|
362
407
|
value: any;
|
|
363
408
|
}
|
|
364
409
|
|
|
410
|
+
export interface EvFocus extends ComponentEvent {
|
|
411
|
+
focus_out: boolean;
|
|
412
|
+
}
|
|
413
|
+
|
|
365
414
|
interface ISelection {
|
|
366
415
|
}
|
|
367
416
|
|
|
368
417
|
export interface EvSelectionChange extends ComponentEvent {
|
|
369
418
|
selection: ISelection;
|
|
419
|
+
empty: boolean;
|
|
370
420
|
}
|
|
371
421
|
|
|
372
422
|
export interface EvContextMenu extends ComponentEvent {
|
|
@@ -436,7 +486,7 @@ declare module 'x4js' {
|
|
|
436
486
|
|
|
437
487
|
type DropCallback = ( command: 'enter' | 'leave' | 'drag' | 'drop', el: Component, infos: DropInfo ) => void;
|
|
438
488
|
|
|
439
|
-
type FilterCallback = ( el: Component ) => boolean;
|
|
489
|
+
type FilterCallback = ( el: Component, data: DataTransfer ) => boolean;
|
|
440
490
|
|
|
441
491
|
class DragManager {
|
|
442
492
|
dragSource: Component;
|
|
@@ -467,6 +517,7 @@ declare module 'x4js' {
|
|
|
467
517
|
}
|
|
468
518
|
|
|
469
519
|
interface RouterEvents extends EventMap {
|
|
520
|
+
change: EvChange;
|
|
470
521
|
error: EvError;
|
|
471
522
|
}
|
|
472
523
|
|
|
@@ -488,6 +539,7 @@ declare module 'x4js' {
|
|
|
488
539
|
_dom: SVGElement;
|
|
489
540
|
constructor( tag: string );
|
|
490
541
|
getDom( ): void;
|
|
542
|
+
reset( ): void;
|
|
491
543
|
stroke( color: string, width: number ): this;
|
|
492
544
|
strokeWidth( width: number ): this;
|
|
493
545
|
strokeCap( cap: "butt" | "round" | "sqaure" ): void;
|
|
@@ -495,11 +547,15 @@ declare module 'x4js' {
|
|
|
495
547
|
antiAlias( set: boolean ): void;
|
|
496
548
|
fill( color: string ): this;
|
|
497
549
|
no_fill( ): this;
|
|
550
|
+
getAttr( name: string ): string;
|
|
551
|
+
getNumAttr( name: string ): void;
|
|
498
552
|
setAttr( name: string, value: string ): this;
|
|
499
553
|
setStyle<K extends keyof CSSStyleDeclaration>( name: K, value: string | number ): this;
|
|
500
|
-
addClass( cls: string ):
|
|
554
|
+
addClass( cls: string ): this;
|
|
555
|
+
removeClass( cls: string ): this;
|
|
501
556
|
clip( id: string ): this;
|
|
502
557
|
transform( tr: string ): this;
|
|
558
|
+
clear_transform( ): void;
|
|
503
559
|
rotate( deg: number, cx: number, cy: number ): this;
|
|
504
560
|
translate( dx: number, dy: number ): this;
|
|
505
561
|
scale( x: number ): this;
|
|
@@ -510,10 +566,12 @@ declare module 'x4js' {
|
|
|
510
566
|
_path: string;
|
|
511
567
|
constructor( );
|
|
512
568
|
_update( ): this;
|
|
569
|
+
reset( ): void;
|
|
513
570
|
moveTo( x: number, y: number ): this;
|
|
514
571
|
lineTo( x: number, y: number ): this;
|
|
572
|
+
curveTo( x1: number, y1: number, x2: number, y2: number, x3: number, y3: number ): void;
|
|
515
573
|
closePath( ): this;
|
|
516
|
-
arc( x: number, y: number, r: number, start: number, end: number ): this;
|
|
574
|
+
arc( x: number, y: number, r: number, start: number, end: number, clockwise: any ): this;
|
|
517
575
|
}
|
|
518
576
|
|
|
519
577
|
export class SvgText extends SvgItem {
|
|
@@ -525,6 +583,10 @@ declare module 'x4js' {
|
|
|
525
583
|
verticalAlign( align: 'top' | 'center' | 'bottom' | 'baseline' ): this;
|
|
526
584
|
}
|
|
527
585
|
|
|
586
|
+
export class SvgIcon extends SvgItem {
|
|
587
|
+
constructor( svg: string );
|
|
588
|
+
}
|
|
589
|
+
|
|
528
590
|
export class SvgShape extends SvgItem {
|
|
529
591
|
constructor( tag: string );
|
|
530
592
|
}
|
|
@@ -542,34 +604,42 @@ declare module 'x4js' {
|
|
|
542
604
|
export class SvgGroup extends SvgItem {
|
|
543
605
|
constructor( tag: any );
|
|
544
606
|
append<K extends SvgItem>( item: K ): K;
|
|
607
|
+
appendItems<K extends SvgItem>( items: K[] ): void;
|
|
545
608
|
path( ): SvgPath;
|
|
546
609
|
text( x: number, y: number, txt: string ): void;
|
|
547
|
-
ellipse( x: number, y: number, r1: number, r2:
|
|
610
|
+
ellipse( x: number, y: number, r1: number, r2: number ): SvgShape;
|
|
611
|
+
circle( x: number, y: number, r1: number ): SvgShape;
|
|
612
|
+
icon( svg: string, x: number, y: number, w: number, h: number ): SvgIcon;
|
|
548
613
|
rect( x: number, y: number, w: number, h: number ): SvgShape;
|
|
549
|
-
group(
|
|
614
|
+
group( id: string ): void;
|
|
550
615
|
linear_gradient( x1: number_or_perc, y1: number_or_perc, x2: number_or_perc, y2: number_or_perc ): void;
|
|
551
616
|
clear( ): void;
|
|
552
617
|
}
|
|
553
618
|
|
|
554
619
|
export class SvgBuilder extends SvgGroup {
|
|
555
620
|
g_clip_id: any;
|
|
621
|
+
g_pat_id: any;
|
|
556
622
|
constructor( );
|
|
557
623
|
addClip( x: number, y: number, w: number, h: number ): void;
|
|
624
|
+
addPattern( x: number, y: number, w: number, h: number ): void;
|
|
558
625
|
}
|
|
559
626
|
|
|
560
627
|
interface SvgProps extends ComponentProps {
|
|
561
628
|
viewbox?: string;
|
|
562
|
-
svg
|
|
629
|
+
svg: SvgBuilder;
|
|
563
630
|
}
|
|
564
631
|
|
|
565
632
|
export class SvgComponent<P extends SvgProps = SvgProps> extends Component<P> {
|
|
566
633
|
constructor( props: P );
|
|
634
|
+
setSvg( bld: SvgBuilder ): void;
|
|
635
|
+
addItems( items: SvgItem[] ): void;
|
|
567
636
|
}
|
|
568
637
|
|
|
569
638
|
// ---------------------------------------
|
|
570
639
|
// from /src/components/boxes/boxes.ts
|
|
571
640
|
|
|
572
641
|
export interface BoxProps extends ComponentProps {
|
|
642
|
+
tag?: string;
|
|
573
643
|
}
|
|
574
644
|
|
|
575
645
|
@class_ns( "x4" ) export class Box<P extends BoxProps=BoxProps, E extends ComponentEvents=ComponentEvents> extends Component<P,E> {
|
|
@@ -582,25 +652,77 @@ declare module 'x4js' {
|
|
|
582
652
|
constructor( p: P );
|
|
583
653
|
}
|
|
584
654
|
|
|
655
|
+
type ContentBuilder = ( ) => Component;
|
|
656
|
+
|
|
585
657
|
interface StackItem {
|
|
586
658
|
name: string;
|
|
587
|
-
content: Component;
|
|
659
|
+
content: Component | ContentBuilder;
|
|
660
|
+
title?: string;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
interface StackeBoxEvents extends ComponentEvents {
|
|
664
|
+
pageChange?: EvSelectionChange;
|
|
588
665
|
}
|
|
589
666
|
|
|
590
|
-
interface
|
|
667
|
+
export interface StackBoxProps extends Omit<ComponentProps,"content"> {
|
|
591
668
|
default: string;
|
|
592
669
|
items: StackItem[];
|
|
670
|
+
pageChange?: EventCallback<EvSelectionChange>;
|
|
593
671
|
}
|
|
594
672
|
|
|
595
|
-
interface
|
|
673
|
+
interface StackItemEx extends StackItem {
|
|
596
674
|
page: Component;
|
|
597
675
|
}
|
|
598
676
|
|
|
599
|
-
@class_ns( "x4" ) export class StackBox extends Box<
|
|
600
|
-
_items:
|
|
601
|
-
|
|
677
|
+
@class_ns( "x4" ) export class StackBox<P extends StackBoxProps = StackBoxProps, E extends StackeBoxEvents = StackeBoxEvents> extends Box<StackBoxProps,StackeBoxEvents> {
|
|
678
|
+
_items: StackItemEx[];
|
|
679
|
+
_cur: number;
|
|
680
|
+
constructor( props: StackBoxProps );
|
|
681
|
+
addItem( item: StackItem ): void;
|
|
602
682
|
select( name: string ): void;
|
|
603
|
-
_createPage( page:
|
|
683
|
+
_createPage( page: StackItemEx ): void;
|
|
684
|
+
getPage( name: string ): void;
|
|
685
|
+
getItem( name: string ): void;
|
|
686
|
+
getCurPage( ): void;
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
@class_ns( "x4" ) export class AssistBox extends StackBox {
|
|
690
|
+
selectNextPage( nxt: any ): void;
|
|
691
|
+
isFirstPage( ): void;
|
|
692
|
+
isLastPage( ): void;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
interface GridBoxItem {
|
|
696
|
+
row: number;
|
|
697
|
+
col: number;
|
|
698
|
+
item: Component;
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
export interface GridBoxProps extends Omit<BoxProps,"content"> {
|
|
702
|
+
rows?: number | string | string[];
|
|
703
|
+
columns?: number | string | string[];
|
|
704
|
+
items?: GridBoxItem[];
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
@class_ns("x4") export class GridBox<P extends GridBoxProps=GridBoxProps, E extends ComponentEvents=ComponentEvents> extends Box<P,E> {
|
|
708
|
+
constructor( props: P );
|
|
709
|
+
setRows( r: number | string | string[] ): void;
|
|
710
|
+
setCols( r: number | string | string[] ): void;
|
|
711
|
+
setRowCount( n: number ): void;
|
|
712
|
+
setColCount( n: number ): void;
|
|
713
|
+
setTemplate( t: string[] ): void;
|
|
714
|
+
setItems( items: GridBoxItem[] ): void;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
interface MasonryProps extends Omit<BoxProps,"content"> {
|
|
718
|
+
items: Component[];
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
@class_ns("x4") export class MasonryBox extends Box<MasonryProps> {
|
|
722
|
+
constructor( props: MasonryProps );
|
|
723
|
+
resizeItem( item: Component ): void;
|
|
724
|
+
resizeAllItems( ): void;
|
|
725
|
+
setItems( items: Component[] ): void;
|
|
604
726
|
}
|
|
605
727
|
|
|
606
728
|
// ---------------------------------------
|
|
@@ -611,9 +733,10 @@ declare module 'x4js' {
|
|
|
611
733
|
}
|
|
612
734
|
|
|
613
735
|
interface BreadcrumbElement {
|
|
736
|
+
name?: string;
|
|
614
737
|
icon?: string;
|
|
615
|
-
name: string;
|
|
616
738
|
label: string;
|
|
739
|
+
click?: ( name: string ) => void;
|
|
617
740
|
}
|
|
618
741
|
|
|
619
742
|
interface BreadcrumbsProps extends BoxProps {
|
|
@@ -623,6 +746,7 @@ declare module 'x4js' {
|
|
|
623
746
|
|
|
624
747
|
@class_ns( "x4" ) export class Breadcrumbs extends HBox<BreadcrumbsProps,BreadcrumbEvents> {
|
|
625
748
|
constructor( props: BreadcrumbsProps );
|
|
749
|
+
setItems( elements: BreadcrumbElement[ ] ): void;
|
|
626
750
|
}
|
|
627
751
|
|
|
628
752
|
// ---------------------------------------
|
|
@@ -657,12 +781,18 @@ declare module 'x4js' {
|
|
|
657
781
|
export interface ButtonProps extends ComponentProps {
|
|
658
782
|
label?: string;
|
|
659
783
|
icon?: string;
|
|
784
|
+
tabindex?: boolean | number;
|
|
785
|
+
autorepeat?: number | boolean;
|
|
660
786
|
click?: EventCallback<EvClick>;
|
|
661
787
|
}
|
|
662
788
|
|
|
663
789
|
@class_ns( "x4" ) export class Button extends Component<ButtonProps,ButtonEvents> {
|
|
790
|
+
#text: Component;
|
|
664
791
|
constructor( props: ButtonProps );
|
|
665
792
|
_on_click( ev: MouseEvent ): void;
|
|
793
|
+
_on_mouse( e: PointerEvent ): void;
|
|
794
|
+
click( ): void;
|
|
795
|
+
_on_keydown( e: KeyboardEvent ): void;
|
|
666
796
|
setText( text: string | UnsafeHtml ): void;
|
|
667
797
|
setIcon( icon: string ): void;
|
|
668
798
|
}
|
|
@@ -683,19 +813,36 @@ declare module 'x4js' {
|
|
|
683
813
|
setIcon( icon: string ): void;
|
|
684
814
|
}
|
|
685
815
|
|
|
816
|
+
export interface SimpleTextProps extends ComponentProps {
|
|
817
|
+
text: string | UnsafeHtml;
|
|
818
|
+
align?: "left" | "center" | "right";
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
@class_ns( "x4" ) export class SimpleText extends Component<SimpleTextProps> {
|
|
822
|
+
constructor( p: SimpleTextProps );
|
|
823
|
+
setText( text: string | UnsafeHtml ): void;
|
|
824
|
+
}
|
|
825
|
+
|
|
686
826
|
// ---------------------------------------
|
|
687
827
|
// from /src/components/form/form.ts
|
|
688
828
|
|
|
689
|
-
type
|
|
690
|
-
|
|
691
|
-
type FormValues = Record<string,FormValue>;
|
|
829
|
+
type FormValues = Record<string,string>;
|
|
692
830
|
|
|
693
831
|
export interface FormProps extends BoxProps {
|
|
832
|
+
autoComplete?: boolean;
|
|
694
833
|
}
|
|
695
834
|
|
|
835
|
+
type ValidationFn = ( values: FormValues, is_valid: boolean ) => boolean;
|
|
836
|
+
|
|
696
837
|
@class_ns( "x4" ) export class Form<P extends FormProps = FormProps> extends Box<P> {
|
|
838
|
+
validator: ValidationFn;
|
|
839
|
+
constructor( props: P );
|
|
840
|
+
_get_inputs( ): void;
|
|
697
841
|
setValues( values: FormValues ): void;
|
|
698
842
|
getValues( ): FormValues;
|
|
843
|
+
setAutoComplete( on: any ): void;
|
|
844
|
+
setValidator( validator: ValidationFn ): void;
|
|
845
|
+
validate( ): FormValues;
|
|
699
846
|
}
|
|
700
847
|
|
|
701
848
|
// ---------------------------------------
|
|
@@ -707,13 +854,17 @@ declare module 'x4js' {
|
|
|
707
854
|
|
|
708
855
|
interface CSizerEvent extends ComponentEvents {
|
|
709
856
|
resize: EvSizeChange;
|
|
857
|
+
start: ComponentEvent;
|
|
858
|
+
stop: ComponentEvent;
|
|
710
859
|
}
|
|
711
860
|
|
|
861
|
+
type SizerType = "left" | "top" | "right" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
862
|
+
|
|
712
863
|
@class_ns( "x4" ) export class CSizer extends Component<ComponentProps,CSizerEvent> {
|
|
713
|
-
_type:
|
|
864
|
+
_type: SizerType;
|
|
714
865
|
_ref: Component;
|
|
715
866
|
_delta: Point;
|
|
716
|
-
constructor( type:
|
|
867
|
+
constructor( type: SizerType, target: Component );
|
|
717
868
|
_onMouseMove( e: PointerEvent ): void;
|
|
718
869
|
}
|
|
719
870
|
|
|
@@ -726,31 +877,35 @@ declare module 'x4js' {
|
|
|
726
877
|
}
|
|
727
878
|
|
|
728
879
|
export interface PopupProps extends ComponentProps {
|
|
729
|
-
modal?: boolean;
|
|
730
880
|
autoClose?: boolean | string;
|
|
731
881
|
sizable?: boolean;
|
|
732
882
|
movable?: boolean;
|
|
733
883
|
}
|
|
734
884
|
|
|
735
|
-
@class_ns( "x4" ) export class Popup<P extends PopupProps = PopupProps, E extends PopupEvents = PopupEvents> extends
|
|
736
|
-
_isopen: any;
|
|
885
|
+
@class_ns( "x4" ) export class Popup<P extends PopupProps = PopupProps, E extends PopupEvents = PopupEvents> extends Box<P,E> {
|
|
737
886
|
_isshown: any;
|
|
887
|
+
_ismodal: any;
|
|
738
888
|
constructor( props: P );
|
|
739
889
|
displayNear( rc: Rect, dst: any, src: any, offset: any ): void;
|
|
740
|
-
displayCenter(
|
|
890
|
+
displayCenter( center: any ): void;
|
|
741
891
|
displayAt( x: number, y: number ): void;
|
|
742
|
-
_show( ): void;
|
|
743
|
-
show( show: any ): void;
|
|
744
892
|
isOpen( ): void;
|
|
893
|
+
_do_hide( ): void;
|
|
894
|
+
_do_show( ): void;
|
|
895
|
+
__show( ): void;
|
|
896
|
+
__hide( ): void;
|
|
897
|
+
__append( ): void;
|
|
898
|
+
__remove( ): void;
|
|
899
|
+
show( show: any ): this;
|
|
745
900
|
close( ): void;
|
|
746
901
|
_dismiss: any;
|
|
747
902
|
dismiss( after: any ): void;
|
|
748
|
-
_showModalMask( ): void;
|
|
749
|
-
_updateModalMask( ): void;
|
|
750
903
|
_createSizers( ): void;
|
|
904
|
+
_showModalMask( ): void;
|
|
905
|
+
_hideModalMask( ): void;
|
|
751
906
|
}
|
|
752
907
|
|
|
753
|
-
|
|
908
|
+
export class CMover {
|
|
754
909
|
ref: Component;
|
|
755
910
|
delta: Point;
|
|
756
911
|
self: boolean;
|
|
@@ -764,9 +919,11 @@ declare module 'x4js' {
|
|
|
764
919
|
export interface DialogProps extends PopupProps {
|
|
765
920
|
icon?: string;
|
|
766
921
|
title: string;
|
|
767
|
-
form
|
|
922
|
+
form?: Form;
|
|
768
923
|
buttons: BtnGroupItem[];
|
|
769
|
-
closable?: boolean;
|
|
924
|
+
closable?: boolean | string;
|
|
925
|
+
modal?: boolean;
|
|
926
|
+
btnclick?: EventCallback<EvBtnClick>;
|
|
770
927
|
}
|
|
771
928
|
|
|
772
929
|
export interface EvBtnClick extends CoreEvent {
|
|
@@ -778,18 +935,26 @@ declare module 'x4js' {
|
|
|
778
935
|
close: ComponentEvent;
|
|
779
936
|
}
|
|
780
937
|
|
|
781
|
-
@class_ns(
|
|
938
|
+
@class_ns("x4") export class Dialog<P extends DialogProps = DialogProps, E extends DialogEvents = DialogEvents> extends Popup<P, E> {
|
|
939
|
+
form: Form;
|
|
940
|
+
_title: Label;
|
|
782
941
|
constructor( props: P );
|
|
783
|
-
|
|
784
|
-
|
|
942
|
+
focusNext( next: boolean ): boolean;
|
|
943
|
+
setContent( form: Form ): void;
|
|
944
|
+
getForm( ): void;
|
|
945
|
+
getValues( ): void;
|
|
946
|
+
getButton( name: string ): void;
|
|
947
|
+
queryInterface<T extends IComponentInterface>( name: string ): T;
|
|
948
|
+
setTitle( title: string ): void;
|
|
949
|
+
getBtnBar( ): void;
|
|
785
950
|
}
|
|
786
951
|
|
|
787
952
|
// ---------------------------------------
|
|
788
953
|
// from /src/components/btngroup/btngroup.ts
|
|
789
954
|
|
|
790
|
-
type predefined = `ok${ "" | `.${string}`}` | `cancel${ "" | `.${string}`}` | `yes${ "" | `.${string}`}` | `no${ "" | `.${string}`}` | `retry${ "" | `.${string}`}` | `abort${ "" | `.${string}`}` | "-";
|
|
955
|
+
type predefined = `ok${ "" | `.${string}`}` | `cancel${ "" | `.${string}`}` | `yes${ "" | `.${string}`}` | `no${ "" | `.${string}`}` | `retry${ "" | `.${string}`}` | `abort${ "" | `.${string}`}` | "-" | ">>" | "~";
|
|
791
956
|
|
|
792
|
-
type BtnGroupItem = predefined | Button | Label;
|
|
957
|
+
type BtnGroupItem = predefined | Button | Label | Input;
|
|
793
958
|
|
|
794
959
|
interface BtnGroupEvents extends ComponentEvents {
|
|
795
960
|
btnclick: EvBtnClick;
|
|
@@ -806,6 +971,7 @@ declare module 'x4js' {
|
|
|
806
971
|
@class_ns( "x4" ) export class BtnGroup extends Box<BtnGroupProps,BtnGroupEvents> {
|
|
807
972
|
constructor( props: BtnGroupProps );
|
|
808
973
|
setButtons( btns: BtnGroupItem[] ): void;
|
|
974
|
+
getButton( id: string ): void;
|
|
809
975
|
}
|
|
810
976
|
|
|
811
977
|
// ---------------------------------------
|
|
@@ -872,6 +1038,12 @@ declare module 'x4js' {
|
|
|
872
1038
|
|
|
873
1039
|
export interface BaseProps extends ComponentProps {
|
|
874
1040
|
name?: string;
|
|
1041
|
+
autofocus?: boolean;
|
|
1042
|
+
required?: boolean;
|
|
1043
|
+
readonly?: boolean;
|
|
1044
|
+
placeholder?: string;
|
|
1045
|
+
focus?: EventCallback<EvFocus>;
|
|
1046
|
+
change?: EventCallback<EvChange>;
|
|
875
1047
|
}
|
|
876
1048
|
|
|
877
1049
|
interface CheckboxProps extends BaseProps {
|
|
@@ -882,62 +1054,79 @@ declare module 'x4js' {
|
|
|
882
1054
|
|
|
883
1055
|
interface RadioProps extends BaseProps {
|
|
884
1056
|
type: "radio";
|
|
885
|
-
value
|
|
1057
|
+
value?: boolean | number | string;
|
|
886
1058
|
checked?: boolean;
|
|
887
1059
|
}
|
|
888
1060
|
|
|
889
1061
|
export interface RangeProps extends BaseProps {
|
|
890
1062
|
type: "range";
|
|
891
|
-
value
|
|
1063
|
+
value?: number;
|
|
892
1064
|
min: number;
|
|
893
1065
|
max: number;
|
|
894
1066
|
step?: number;
|
|
895
1067
|
}
|
|
896
1068
|
|
|
897
|
-
interface
|
|
1069
|
+
export interface FileProps extends BaseProps {
|
|
1070
|
+
type: "file";
|
|
1071
|
+
accept: string | string[];
|
|
1072
|
+
value?: never;
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
export interface DateProps extends BaseProps {
|
|
898
1076
|
type: "date";
|
|
1077
|
+
value?: Date | string;
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
export interface TimeProps extends BaseProps {
|
|
1081
|
+
type: "time";
|
|
899
1082
|
readonly?: boolean;
|
|
900
1083
|
required?: boolean;
|
|
901
|
-
value
|
|
1084
|
+
value?: string;
|
|
902
1085
|
}
|
|
903
1086
|
|
|
904
|
-
interface NumberProps extends BaseProps {
|
|
1087
|
+
export interface NumberProps extends BaseProps {
|
|
905
1088
|
type: "number";
|
|
906
1089
|
readonly?: boolean;
|
|
907
1090
|
required?: boolean;
|
|
908
|
-
value
|
|
1091
|
+
value?: number | string;
|
|
909
1092
|
min?: number;
|
|
910
1093
|
max?: number;
|
|
911
1094
|
step?: number;
|
|
912
1095
|
}
|
|
913
1096
|
|
|
914
|
-
interface FileProps extends BaseProps {
|
|
915
|
-
type: "file";
|
|
916
|
-
accept: string | string[];
|
|
917
|
-
}
|
|
918
|
-
|
|
919
1097
|
export interface TextInputProps extends BaseProps {
|
|
920
|
-
type
|
|
1098
|
+
type?: "text" | "email" | "password";
|
|
921
1099
|
readonly?: boolean;
|
|
922
1100
|
required?: boolean;
|
|
923
1101
|
pattern?: string;
|
|
924
|
-
value
|
|
925
|
-
placeholder?: string;
|
|
1102
|
+
value?: string | number;
|
|
926
1103
|
spellcheck?: boolean;
|
|
1104
|
+
minlength?: number;
|
|
1105
|
+
maxlength?: number;
|
|
927
1106
|
}
|
|
928
1107
|
|
|
929
|
-
type InputProps =
|
|
1108
|
+
type InputProps = TextInputProps | CheckboxProps | RadioProps | RangeProps | DateProps | NumberProps | FileProps | TimeProps;
|
|
930
1109
|
|
|
931
|
-
|
|
1110
|
+
interface InputEvents extends ComponentEvent {
|
|
1111
|
+
focus: EvFocus;
|
|
1112
|
+
change: EvChange;
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
@class_ns( "x4" ) export class Input extends Component<InputProps,InputEvents> {
|
|
932
1116
|
constructor( props: InputProps );
|
|
1117
|
+
on_focus( ev: FocusEvent, focus_out: boolean ): void;
|
|
1118
|
+
on_change( ev: InputEvent ): void;
|
|
933
1119
|
getValue( ): void;
|
|
934
1120
|
setValue( value: string ): void;
|
|
935
|
-
getNumValue(
|
|
936
|
-
setNumValue( value: number ): void;
|
|
1121
|
+
getNumValue( defNan: number ): void;
|
|
1122
|
+
setNumValue( value: number, ndec: any ): void;
|
|
1123
|
+
getCheck( ): void;
|
|
1124
|
+
setCheck( ck: boolean ): void;
|
|
937
1125
|
setReadOnly( ro: boolean ): void;
|
|
938
1126
|
selectAll( ): void;
|
|
939
1127
|
select( start: number, length: number ): void;
|
|
940
1128
|
getSelection( ): void;
|
|
1129
|
+
isValid( ): void;
|
|
941
1130
|
queryInterface<T extends IComponentInterface>( name: string ): T;
|
|
942
1131
|
}
|
|
943
1132
|
|
|
@@ -952,12 +1141,14 @@ declare module 'x4js' {
|
|
|
952
1141
|
label: string;
|
|
953
1142
|
checked?: boolean;
|
|
954
1143
|
value?: boolean | number | string;
|
|
1144
|
+
name?: string;
|
|
955
1145
|
change?: EventCallback<EvChange>;
|
|
956
1146
|
}
|
|
957
1147
|
|
|
958
1148
|
@class_ns( "x4" ) export class Checkbox extends Component<CheckboxProps,CheckBoxEvents> {
|
|
959
1149
|
_input: Input;
|
|
960
1150
|
constructor( props: CheckboxProps );
|
|
1151
|
+
_on_click( ev: MouseEvent ): void;
|
|
961
1152
|
_on_change( ): void;
|
|
962
1153
|
getCheck( ): void;
|
|
963
1154
|
setCheck( ck: boolean ): void;
|
|
@@ -1080,18 +1271,11 @@ declare module 'x4js' {
|
|
|
1080
1271
|
// ---------------------------------------
|
|
1081
1272
|
// from /src/components/listbox/listbox.ts
|
|
1082
1273
|
|
|
1083
|
-
enum kbNav {
|
|
1084
|
-
first,
|
|
1085
|
-
prev,
|
|
1086
|
-
next,
|
|
1087
|
-
last,
|
|
1088
|
-
}
|
|
1089
|
-
|
|
1090
1274
|
type ListboxID = number | string;
|
|
1091
1275
|
|
|
1092
1276
|
export interface ListItem {
|
|
1093
1277
|
id: ListboxID;
|
|
1094
|
-
text: string;
|
|
1278
|
+
text: string | UnsafeHtml;
|
|
1095
1279
|
iconId?: string;
|
|
1096
1280
|
data?: any;
|
|
1097
1281
|
cls?: string;
|
|
@@ -1108,30 +1292,39 @@ declare module 'x4js' {
|
|
|
1108
1292
|
interface ListboxProps extends Omit<ComponentProps,'content'> {
|
|
1109
1293
|
items?: ListItem[];
|
|
1110
1294
|
renderer?: ( item: ListItem ) => Component;
|
|
1295
|
+
footer?: Component;
|
|
1111
1296
|
checkable?: true;
|
|
1297
|
+
multisel?: true;
|
|
1298
|
+
dblClick?: EventCallback<EvDblClick>;
|
|
1299
|
+
selectionChange?: EventCallback<EvSelectionChange>;
|
|
1300
|
+
contextMenu?: EventCallback<EvContextMenu>;
|
|
1112
1301
|
}
|
|
1113
1302
|
|
|
1114
1303
|
@class_ns( "x4" ) export class Listbox extends Component<ListboxProps,ListboxEvents> {
|
|
1115
1304
|
_view: Viewport;
|
|
1116
|
-
|
|
1117
|
-
|
|
1305
|
+
_lastsel: ListboxID;
|
|
1306
|
+
_multisel: Set<ListboxID>;
|
|
1118
1307
|
_items: ListItem[];
|
|
1119
1308
|
preventFocus: any;
|
|
1120
1309
|
constructor( props: ListboxProps );
|
|
1121
1310
|
_on_key( ev: KeyboardEvent ): void;
|
|
1122
1311
|
navigate( sens: kbNav ): void;
|
|
1123
|
-
|
|
1312
|
+
_itemWithID( id: ListboxID ): void;
|
|
1313
|
+
_on_click( ev: MouseEvent ): void;
|
|
1124
1314
|
_on_ctx_menu( ev: MouseEvent ): void;
|
|
1125
|
-
_selectItem( id: ListboxID, item: Component ): void;
|
|
1126
|
-
|
|
1315
|
+
_selectItem( id: ListboxID, item: Component, mode: "single" | "toggle" ): void;
|
|
1316
|
+
getItem( id: ListboxID ): ListItem;
|
|
1317
|
+
select( ids: ListboxID | ListboxID[], notify: any ): void;
|
|
1127
1318
|
_findItemIndex( id: ListboxID ): void;
|
|
1319
|
+
_clearSelection( ): void;
|
|
1128
1320
|
clearSelection( ): void;
|
|
1129
|
-
setItems( items: ListItem[] ): void;
|
|
1321
|
+
setItems( items: ListItem[], keepSel: any ): void;
|
|
1130
1322
|
renderItem( item: ListItem ): void;
|
|
1131
1323
|
defaultRenderer( item: ListItem ): Component;
|
|
1132
1324
|
filter( filter: string ): void;
|
|
1133
1325
|
appendItem( item: ListItem, prepend: any, select: any ): void;
|
|
1134
1326
|
updateItem( id: any, item: ListItem ): void;
|
|
1327
|
+
getSelection( ): void;
|
|
1135
1328
|
}
|
|
1136
1329
|
|
|
1137
1330
|
// ---------------------------------------
|
|
@@ -1145,22 +1338,29 @@ declare module 'x4js' {
|
|
|
1145
1338
|
items: ListItem[];
|
|
1146
1339
|
}
|
|
1147
1340
|
|
|
1148
|
-
@class_ns( "x4" ) class
|
|
1341
|
+
@class_ns( "x4" ) export class DropdownList extends Popup<DropdownProps,DropdownEvents> {
|
|
1149
1342
|
_list: Listbox;
|
|
1150
1343
|
constructor( props: DropdownProps, content: ListItem[] );
|
|
1151
1344
|
getList( ): void;
|
|
1152
1345
|
}
|
|
1153
1346
|
|
|
1347
|
+
interface ComboboxEvents extends ComponentEvents {
|
|
1348
|
+
selectionChange: EvSelectionChange;
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1154
1351
|
interface ComboboxProps extends Omit<ComponentProps,"content"> {
|
|
1155
1352
|
label?: string;
|
|
1353
|
+
name?: string;
|
|
1354
|
+
value?: string;
|
|
1156
1355
|
labelWidth?: number | string;
|
|
1157
1356
|
readonly?: boolean;
|
|
1357
|
+
required?: boolean;
|
|
1158
1358
|
items: ListItem[];
|
|
1359
|
+
selectionChange?: EventCallback<EvSelectionChange>;
|
|
1159
1360
|
}
|
|
1160
1361
|
|
|
1161
|
-
@class_ns( "x4" ) export class Combobox extends Component<ComboboxProps> {
|
|
1162
|
-
|
|
1163
|
-
_label: Label;
|
|
1362
|
+
@class_ns( "x4" ) export class Combobox extends Component<ComboboxProps,ComboboxEvents> {
|
|
1363
|
+
_popup: DropdownList;
|
|
1164
1364
|
_input: Input;
|
|
1165
1365
|
_button: Button;
|
|
1166
1366
|
_prevent_close: any;
|
|
@@ -1171,33 +1371,230 @@ declare module 'x4js' {
|
|
|
1171
1371
|
_on_focusout( ): void;
|
|
1172
1372
|
_on_click( ): void;
|
|
1173
1373
|
showDropDown( ): void;
|
|
1374
|
+
setItems( items: ListItem[] ): void;
|
|
1375
|
+
getValue( ): void;
|
|
1376
|
+
setValue( value: string ): void;
|
|
1377
|
+
selectItem( index: ListboxID ): void;
|
|
1378
|
+
getSelection( ): void;
|
|
1379
|
+
_getList( ): void;
|
|
1380
|
+
queryInterface<T extends IComponentInterface>( name: string ): T;
|
|
1174
1381
|
}
|
|
1175
1382
|
|
|
1176
1383
|
// ---------------------------------------
|
|
1177
|
-
// from /src/components/
|
|
1384
|
+
// from /src/components/filedrop/filedrop.ts
|
|
1178
1385
|
|
|
1179
|
-
|
|
1386
|
+
type LoadCallback = ( files: FileList ) => void;
|
|
1387
|
+
|
|
1388
|
+
interface FileDialogProps extends ComponentProps {
|
|
1389
|
+
accept: string;
|
|
1390
|
+
multiple?: boolean;
|
|
1391
|
+
callback: LoadCallback;
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1394
|
+
export class FileDialog extends Component {
|
|
1395
|
+
constructor( props: FileDialogProps );
|
|
1396
|
+
showDialog( ): void;
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
export interface EvDropChange extends CoreEvent {
|
|
1400
|
+
files: FileList;
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
interface FileDropEvents extends ComponentEvents {
|
|
1404
|
+
change: EvDropChange;
|
|
1405
|
+
}
|
|
1406
|
+
|
|
1407
|
+
interface FileDropProps extends ComponentProps {
|
|
1408
|
+
label?: string | UnsafeHtml;
|
|
1409
|
+
icon?: string;
|
|
1410
|
+
multiple?: boolean;
|
|
1411
|
+
accept: string;
|
|
1412
|
+
change: EventCallback<EvDropChange>;
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1415
|
+
@class_ns( "x4" ) export class FileDrop extends VBox<FileDropProps,FileDropEvents> {
|
|
1416
|
+
constructor( props: FileDropProps );
|
|
1417
|
+
}
|
|
1418
|
+
|
|
1419
|
+
// ---------------------------------------
|
|
1420
|
+
// from /src/core/core_data.ts
|
|
1421
|
+
|
|
1422
|
+
type DataRecordID = any;
|
|
1423
|
+
|
|
1424
|
+
type DataFieldValue = string | Date | number | boolean;
|
|
1425
|
+
|
|
1426
|
+
type ChangeCallback = (type: string, id?: DataRecordID) => void;
|
|
1427
|
+
|
|
1428
|
+
type CalcCallback = () => string;
|
|
1429
|
+
|
|
1430
|
+
type FieldType = 'string' | 'int' | 'float' | 'date' | 'bool' | 'array' | 'object' | 'any' | 'calc';
|
|
1431
|
+
|
|
1432
|
+
type DataIndex = Uint32Array;
|
|
1433
|
+
|
|
1434
|
+
export interface EvDataChange extends CoreEvent {
|
|
1435
|
+
change_type: 'create' | 'update' | 'delete' | 'data' | 'change';
|
|
1436
|
+
id?: DataRecordID;
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
export interface MetaData {
|
|
1440
|
+
type?: FieldType;
|
|
1441
|
+
prec?: number;
|
|
1442
|
+
required?: boolean;
|
|
1443
|
+
calc?: (rec: DataRecord) => any;
|
|
1444
|
+
model?: DataModel;
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1447
|
+
export interface FieldInfo extends MetaData {
|
|
1180
1448
|
name: string;
|
|
1181
|
-
title: string;
|
|
1182
|
-
iconId?: string;
|
|
1183
|
-
width?: number;
|
|
1184
1449
|
}
|
|
1185
1450
|
|
|
1186
|
-
|
|
1187
|
-
|
|
1451
|
+
class MetaInfos {
|
|
1452
|
+
name: string;
|
|
1453
|
+
id: string;
|
|
1454
|
+
fields: FieldInfo[];
|
|
1455
|
+
constructor( name: string );
|
|
1188
1456
|
}
|
|
1189
1457
|
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1458
|
+
interface ModelConstructor {
|
|
1459
|
+
}
|
|
1460
|
+
|
|
1461
|
+
export class DataModel {
|
|
1462
|
+
getFields( ): FieldInfo[];
|
|
1463
|
+
validate( record: DataRecord ): Error[];
|
|
1464
|
+
getFieldIndex( name: string ): number;
|
|
1465
|
+
serialize<T = any>( input: DataRecord ): T;
|
|
1466
|
+
unSerialize( data: any, id: DataRecordID ): DataRecord;
|
|
1467
|
+
_convertField( field: FieldInfo, input: any ): any;
|
|
1468
|
+
getID( rec: DataRecord ): any;
|
|
1469
|
+
getRaw( name: string | number, rec: DataRecord ): any;
|
|
1470
|
+
getField( name: string, rec: DataRecord ): string;
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
export class DataRecord {
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1476
|
+
interface DataEventMap extends EventMap {
|
|
1477
|
+
change?: EvChange;
|
|
1478
|
+
}
|
|
1479
|
+
|
|
1480
|
+
type DataSolver = ( data: any ) => DataRecord[];
|
|
1481
|
+
|
|
1482
|
+
export interface DataProxyProps {
|
|
1483
|
+
url: string;
|
|
1484
|
+
params?: string[];
|
|
1485
|
+
solver?: DataSolver;
|
|
1486
|
+
}
|
|
1487
|
+
|
|
1488
|
+
export class DataProxy extends CoreElement<DataEventMap> {
|
|
1489
|
+
m_props: DataProxyProps;
|
|
1490
|
+
constructor( props: DataProxyProps );
|
|
1491
|
+
load( url: string ): void;
|
|
1492
|
+
}
|
|
1493
|
+
|
|
1494
|
+
interface DataStoreProps {
|
|
1495
|
+
model: DataModel;
|
|
1496
|
+
data?: any[];
|
|
1497
|
+
url?: string;
|
|
1498
|
+
autoload?: false;
|
|
1499
|
+
solver?: DataSolver;
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
interface DataStoreEventMap extends EventMap {
|
|
1503
|
+
data_change: EvDataChange;
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
export class DataStore extends EventSource<DataStoreEventMap> {
|
|
1507
|
+
m_model: DataModel;
|
|
1508
|
+
m_fields: FieldInfo[];
|
|
1509
|
+
m_records: DataRecord[];
|
|
1510
|
+
m_proxy: DataProxy;
|
|
1511
|
+
m_rec_index: DataIndex;
|
|
1512
|
+
constructor( props: DataStoreProps );
|
|
1513
|
+
load( url: string ): void;
|
|
1514
|
+
reload( ): void;
|
|
1515
|
+
setData( records: any[] ): void;
|
|
1516
|
+
setRawData( records: DataRecord[] ): void;
|
|
1517
|
+
_rebuildIndex( ): void;
|
|
1518
|
+
update( rec: DataRecord ): void;
|
|
1519
|
+
append( rec: DataRecord | any ): void;
|
|
1520
|
+
getMaxId( ): void;
|
|
1521
|
+
delete( id: DataRecordID ): boolean;
|
|
1522
|
+
indexOfId( id: DataRecordID ): number;
|
|
1523
|
+
getById( id: DataRecordID ): DataRecord;
|
|
1524
|
+
getByIndex( index: number ): DataRecord;
|
|
1525
|
+
_getRecord( index: number ): DataRecord;
|
|
1526
|
+
moveTo( other: DataStore ): void;
|
|
1527
|
+
createView( opts: DataViewProps ): DataView;
|
|
1528
|
+
createIndex( filter: FilterInfo ): DataIndex;
|
|
1529
|
+
sortIndex( index: DataIndex, sort: SortProp[] ): void;
|
|
1530
|
+
forEach( cb: ( rec: DataRecord, index: number ) => any ): void;
|
|
1531
|
+
export( ): void;
|
|
1532
|
+
changed( ): void;
|
|
1533
|
+
getModel( ): void;
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
export interface EvViewChange extends CoreEvent {
|
|
1537
|
+
change_type: "change" | "filter" | "sort";
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1540
|
+
interface DataViewEventMap extends EventMap {
|
|
1541
|
+
view_change: EvViewChange;
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1544
|
+
interface DataViewProps {
|
|
1545
|
+
store?: DataStore;
|
|
1546
|
+
filter?: FilterInfo;
|
|
1547
|
+
order?: string | SortProp[] | SortProp;
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1550
|
+
type FilterFunc = ( rec: DataRecord ) => boolean;
|
|
1551
|
+
|
|
1552
|
+
export interface FilterInfo {
|
|
1553
|
+
op: '<' | '<=' | '=' | '>=' | '>' | '<>' | 'empty-result' | FilterFunc;
|
|
1554
|
+
field?: string;
|
|
1555
|
+
value?: string | RegExp;
|
|
1556
|
+
caseSensitive?: boolean;
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1559
|
+
export interface SortProp {
|
|
1560
|
+
field: string;
|
|
1561
|
+
ascending: boolean;
|
|
1562
|
+
numeric?: boolean;
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1565
|
+
export class DataView extends CoreElement<DataViewEventMap> {
|
|
1566
|
+
m_index: DataIndex;
|
|
1567
|
+
m_store: DataStore;
|
|
1568
|
+
m_model: DataModel;
|
|
1569
|
+
m_sort: SortProp[];
|
|
1570
|
+
m_filter: FilterInfo;
|
|
1571
|
+
m_props: DataViewProps;
|
|
1572
|
+
constructor( props: DataViewProps );
|
|
1573
|
+
_storeChange( ev: EvDataChange ): void;
|
|
1574
|
+
filter( filter: FilterInfo ): number;
|
|
1575
|
+
_filter( filter: FilterInfo, notify: boolean ): number;
|
|
1576
|
+
sort( props: SortProp[] ): void;
|
|
1577
|
+
_sort( props: SortProp[], notify: boolean ): void;
|
|
1578
|
+
getStore( ): void;
|
|
1579
|
+
getCount( ): void;
|
|
1580
|
+
indexOfId( id: DataRecordID ): number;
|
|
1581
|
+
getByIndex( index: number ): DataRecord;
|
|
1582
|
+
getIdByIndex( index: number ): DataRecordID;
|
|
1583
|
+
getRecId( rec: DataRecord ): DataRecordID;
|
|
1584
|
+
getById( id: DataRecordID ): DataRecord;
|
|
1585
|
+
getModel( ): void;
|
|
1586
|
+
changed( ): void;
|
|
1587
|
+
forEach( cb: ( rec: DataRecord, index: number ) => any ): void;
|
|
1196
1588
|
}
|
|
1197
1589
|
|
|
1198
1590
|
// ---------------------------------------
|
|
1199
1591
|
// from /src/components/image/image.ts
|
|
1200
1592
|
|
|
1593
|
+
interface ImageEvents extends ComponentEvents {
|
|
1594
|
+
change: EvDropChange;
|
|
1595
|
+
clear: CoreEvent;
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1201
1598
|
export interface ImageProps extends ComponentProps {
|
|
1202
1599
|
src: string;
|
|
1203
1600
|
fit?: "contain" | "cover" | "fill" | "scale-down";
|
|
@@ -1205,12 +1602,169 @@ declare module 'x4js' {
|
|
|
1205
1602
|
lazy?: boolean;
|
|
1206
1603
|
alt?: string;
|
|
1207
1604
|
draggable?: boolean;
|
|
1605
|
+
candrop?: boolean;
|
|
1606
|
+
accept?: string;
|
|
1607
|
+
change?: EventCallback<EvDropChange>;
|
|
1608
|
+
clear?: EventCallback<CoreEvent>;
|
|
1208
1609
|
}
|
|
1209
1610
|
|
|
1210
|
-
@class_ns( "x4" ) export class Image extends Component<
|
|
1611
|
+
@class_ns( "x4" ) export class Image<P extends ImageProps = ImageProps, E extends ImageEvents = ImageEvents> extends Component<P,E> {
|
|
1211
1612
|
_img: Component;
|
|
1212
|
-
constructor( props:
|
|
1613
|
+
constructor( props: P );
|
|
1213
1614
|
setImage( src: string ): void;
|
|
1615
|
+
setBase64( mime: string, base64: string ): void;
|
|
1616
|
+
clear( ): void;
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
// ---------------------------------------
|
|
1620
|
+
// from /src/components/gridview/gridview.ts
|
|
1621
|
+
|
|
1622
|
+
type CellRenderer = (rec: DataRecord) => Component;
|
|
1623
|
+
|
|
1624
|
+
type CellClassifier = (data: any, rec: DataRecord, col: string ) => string;
|
|
1625
|
+
|
|
1626
|
+
type ColType = "number" | "money" | "checkbox" | "date" | "string" | "image" | "percent" | "icon";
|
|
1627
|
+
|
|
1628
|
+
interface GridColumn {
|
|
1629
|
+
id: any;
|
|
1630
|
+
title: string;
|
|
1631
|
+
width: number;
|
|
1632
|
+
fixed?: boolean;
|
|
1633
|
+
flex?: number;
|
|
1634
|
+
align?: 'left' | 'center' | 'right';
|
|
1635
|
+
header_align?: 'left' | 'center' | 'right';
|
|
1636
|
+
renderer?: CellRenderer;
|
|
1637
|
+
formatter?: (input: any) => string;
|
|
1638
|
+
type?: ColType;
|
|
1639
|
+
cls?: string;
|
|
1640
|
+
sortable?: boolean;
|
|
1641
|
+
footer_val?: string;
|
|
1642
|
+
classifier?: CellClassifier;
|
|
1643
|
+
}
|
|
1644
|
+
|
|
1645
|
+
interface GridColumnEx extends GridColumn {
|
|
1646
|
+
sens?: "up" | "dn";
|
|
1647
|
+
}
|
|
1648
|
+
|
|
1649
|
+
export interface GridviewEvents extends ComponentEvents {
|
|
1650
|
+
click?: EvClick;
|
|
1651
|
+
dblClick?: EvDblClick;
|
|
1652
|
+
contextMenu?: EvContextMenu;
|
|
1653
|
+
selectionChange?: EvSelectionChange;
|
|
1654
|
+
}
|
|
1655
|
+
|
|
1656
|
+
export interface GridviewProps extends ComponentProps {
|
|
1657
|
+
footer?: boolean;
|
|
1658
|
+
store: DataStore;
|
|
1659
|
+
columns: GridColumn[];
|
|
1660
|
+
click?: EventCallback<EvClick>;
|
|
1661
|
+
dblClick?: EventCallback<EvDblClick>;
|
|
1662
|
+
contextMenu?: EventCallback<EvContextMenu>;
|
|
1663
|
+
selectionChange?: EventCallback<EvSelectionChange>;
|
|
1664
|
+
}
|
|
1665
|
+
|
|
1666
|
+
@class_ns("x4") export class Gridview<P extends GridviewProps = GridviewProps, E extends GridviewEvents = GridviewEvents> extends Component<P,E> {
|
|
1667
|
+
_dataview: DataView;
|
|
1668
|
+
_datamodel: DataModel;
|
|
1669
|
+
_columns: GridColumnEx[];
|
|
1670
|
+
_lock: number;
|
|
1671
|
+
_dirty: number;
|
|
1672
|
+
_row_height: number;
|
|
1673
|
+
_left: number;
|
|
1674
|
+
_top: number;
|
|
1675
|
+
_body: Component;
|
|
1676
|
+
_viewport: Component;
|
|
1677
|
+
_fheader: Box;
|
|
1678
|
+
_hheader: Box;
|
|
1679
|
+
_vheader: Box;
|
|
1680
|
+
_ffooter: Box;
|
|
1681
|
+
_footer: Box;
|
|
1682
|
+
_vis_rows: Map<number, { h: Component, r: Component }>;
|
|
1683
|
+
_start: number;
|
|
1684
|
+
_end: number;
|
|
1685
|
+
_selection: Set<number>;
|
|
1686
|
+
_num_fmt: any;
|
|
1687
|
+
_mny_fmt: any;
|
|
1688
|
+
_dte_fmt: any;
|
|
1689
|
+
_has_fixed: boolean;
|
|
1690
|
+
_has_footer: boolean;
|
|
1691
|
+
constructor( props: P );
|
|
1692
|
+
_on_key( ev: KeyboardEvent ): void;
|
|
1693
|
+
navigate( sens: kbNav ): void;
|
|
1694
|
+
_scrollToIndex( index: number, block: any ): void;
|
|
1695
|
+
setStore( store: DataStore ): void;
|
|
1696
|
+
getView( ): DataView;
|
|
1697
|
+
lock( lock: boolean ): void;
|
|
1698
|
+
_getColCount( ): void;
|
|
1699
|
+
_getCol( index: number ): void;
|
|
1700
|
+
_buildColHeader( fixed: boolean ): void;
|
|
1701
|
+
_buildColFooter( fixed: boolean ): void;
|
|
1702
|
+
_sortCol( col: number, ascending: boolean ): void;
|
|
1703
|
+
sortCol( colIdx: any, ascending: boolean ): void;
|
|
1704
|
+
_renderCell( rec: DataRecord, column: GridColumnEx, extra_cls: string[] ): ComponentContent;
|
|
1705
|
+
_buildRow( rowid: number, rec: DataRecord, top: number ): void;
|
|
1706
|
+
_buildRowHeader( rowid: number, rec: DataRecord, top: number ): void;
|
|
1707
|
+
_updateFlexs( ): void;
|
|
1708
|
+
_computeFullSize( ): void;
|
|
1709
|
+
_init( ): void;
|
|
1710
|
+
_on_dblclk( e: UIEvent, row: number ): void;
|
|
1711
|
+
_update( force: any ): void;
|
|
1712
|
+
_clearSelection( ): void;
|
|
1713
|
+
_addSelection( rowid: number ): void;
|
|
1714
|
+
getSelection( ): void;
|
|
1715
|
+
getFirstSel( ): void;
|
|
1716
|
+
selectItem( id: any ): void;
|
|
1717
|
+
}
|
|
1718
|
+
|
|
1719
|
+
// ---------------------------------------
|
|
1720
|
+
// from /src/components/header/header.ts
|
|
1721
|
+
|
|
1722
|
+
interface HeaderItem {
|
|
1723
|
+
name: string;
|
|
1724
|
+
title: string;
|
|
1725
|
+
iconId?: string;
|
|
1726
|
+
width?: number;
|
|
1727
|
+
}
|
|
1728
|
+
|
|
1729
|
+
interface HeaderProps extends Omit<ComponentProps,"content"> {
|
|
1730
|
+
items: HeaderItem[];
|
|
1731
|
+
}
|
|
1732
|
+
|
|
1733
|
+
@class_ns( "x4" ) export class Header extends HBox<HeaderProps> {
|
|
1734
|
+
_els: Component[];
|
|
1735
|
+
_vwp: Component;
|
|
1736
|
+
constructor( props: HeaderProps );
|
|
1737
|
+
_calc_sizes( ): void;
|
|
1738
|
+
_on_resize( ): void;
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1741
|
+
// ---------------------------------------
|
|
1742
|
+
// from /src/components/keyboard/keyboard.ts
|
|
1743
|
+
|
|
1744
|
+
interface KeyboardProps extends BoxProps {
|
|
1745
|
+
}
|
|
1746
|
+
|
|
1747
|
+
@class_ns( "x4" ) export class Keyboard extends HBox<KeyboardProps> {
|
|
1748
|
+
mode: "lower" | "upper" | "number" | "date";
|
|
1749
|
+
locale: string;
|
|
1750
|
+
keyboard: Box;
|
|
1751
|
+
visible: boolean;
|
|
1752
|
+
input: HTMLInputElement;
|
|
1753
|
+
constructor( props: KeyboardProps );
|
|
1754
|
+
handleKey( e: UIEvent ): void;
|
|
1755
|
+
_focusNext( ): void;
|
|
1756
|
+
_switchMode( m: "lower" | "upper" | "number" | "date" ): void;
|
|
1757
|
+
_redraw( ): void;
|
|
1758
|
+
_scrollIntoView( el: HTMLElement ): void;
|
|
1759
|
+
_updateVis: any;
|
|
1760
|
+
showOn( el: Component ): void;
|
|
1761
|
+
handleFocus( target: Element, enter: boolean ): void;
|
|
1762
|
+
_insertChar( caret: any, text: string, ch: string ): void;
|
|
1763
|
+
_backspace( caret: any, text: string ): void;
|
|
1764
|
+
_getCaret( ): void;
|
|
1765
|
+
_restoreCaretPos( caret: any ): void;
|
|
1766
|
+
fireKey( key: number, cb: Function ): void;
|
|
1767
|
+
_createContent( ): void;
|
|
1214
1768
|
}
|
|
1215
1769
|
|
|
1216
1770
|
// ---------------------------------------
|
|
@@ -1222,7 +1776,8 @@ declare module 'x4js' {
|
|
|
1222
1776
|
|
|
1223
1777
|
interface LinkProps extends ComponentProps {
|
|
1224
1778
|
href: string;
|
|
1225
|
-
text
|
|
1779
|
+
text?: string | UnsafeHtml;
|
|
1780
|
+
icon?: string;
|
|
1226
1781
|
click?: EventCallback<EvClick>;
|
|
1227
1782
|
}
|
|
1228
1783
|
|
|
@@ -1241,10 +1796,23 @@ declare module 'x4js' {
|
|
|
1241
1796
|
}
|
|
1242
1797
|
|
|
1243
1798
|
@class_ns( "x4" ) export class MessageBox extends Dialog<DialogProps> {
|
|
1244
|
-
m_label: Label;
|
|
1245
1799
|
constructor( props: DialogProps );
|
|
1246
|
-
|
|
1247
|
-
show( msg: string | UnsafeHtml ): MessageBox;
|
|
1800
|
+
_create( msg: string | UnsafeHtml, buttons: BtnGroupItem[], title: string ): void;
|
|
1801
|
+
show( msg: string | UnsafeHtml, buttons: BtnGroupItem[], title: string ): MessageBox;
|
|
1802
|
+
showAsync( msg: string | UnsafeHtml, buttons: BtnGroupItem[], title: string ): Promise<string>;
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1805
|
+
@class_ns( "x4" ) export class InputBox extends Dialog<DialogProps> {
|
|
1806
|
+
constructor( props: DialogProps );
|
|
1807
|
+
getValue( ): void;
|
|
1808
|
+
_create( msg: string | UnsafeHtml, value: string, title: string ): void;
|
|
1809
|
+
showAsync( msg: string | UnsafeHtml, value: string, title: string ): Promise<string>;
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1812
|
+
@class_ns( "x4" ) export class PromptBox extends Dialog<DialogProps> {
|
|
1813
|
+
constructor( props: DialogProps );
|
|
1814
|
+
_create( msg: string | UnsafeHtml, editor: Component, title: string ): void;
|
|
1815
|
+
showAsync( msg: string | UnsafeHtml, editor: Component, title: string ): Promise<string>;
|
|
1248
1816
|
}
|
|
1249
1817
|
|
|
1250
1818
|
// ---------------------------------------
|
|
@@ -1297,6 +1865,103 @@ declare module 'x4js' {
|
|
|
1297
1865
|
setValue( value: number ): void;
|
|
1298
1866
|
}
|
|
1299
1867
|
|
|
1868
|
+
// ---------------------------------------
|
|
1869
|
+
// from /src/components/select/select.ts
|
|
1870
|
+
|
|
1871
|
+
export interface SelectProps extends ComponentProps {
|
|
1872
|
+
name?: string;
|
|
1873
|
+
value: string;
|
|
1874
|
+
items: ListItem[];
|
|
1875
|
+
multiple?: boolean;
|
|
1876
|
+
change?: EventCallback<EvChange>;
|
|
1877
|
+
focus?: EventCallback<EvFocus>;
|
|
1878
|
+
}
|
|
1879
|
+
|
|
1880
|
+
interface SelectEvents extends ComponentEvent {
|
|
1881
|
+
focus: EvFocus;
|
|
1882
|
+
change: EvChange;
|
|
1883
|
+
}
|
|
1884
|
+
|
|
1885
|
+
@class_ns( "x4" ) export class Select extends Component<SelectProps,SelectEvents> {
|
|
1886
|
+
constructor( props: SelectProps );
|
|
1887
|
+
on_focus( ev: FocusEvent, focus_out: boolean ): void;
|
|
1888
|
+
on_change( ev: InputEvent ): void;
|
|
1889
|
+
setItems( items: ListItem[] ): void;
|
|
1890
|
+
getValue( ): void;
|
|
1891
|
+
setValue( value: string ): void;
|
|
1892
|
+
}
|
|
1893
|
+
|
|
1894
|
+
// ---------------------------------------
|
|
1895
|
+
// from /src/components/propgrid/propgrid.ts
|
|
1896
|
+
|
|
1897
|
+
type IValue = boolean | number | string;
|
|
1898
|
+
|
|
1899
|
+
type IValueCB = ( name: string) => IValue;
|
|
1900
|
+
|
|
1901
|
+
export interface PropertyValue {
|
|
1902
|
+
type: 'boolean' | 'number' | 'string' | 'password' | 'options' | 'label' | 'button';
|
|
1903
|
+
title?: string;
|
|
1904
|
+
desc?: string;
|
|
1905
|
+
name?: string;
|
|
1906
|
+
value: IValue | IValueCB;
|
|
1907
|
+
options?: ListItem[];
|
|
1908
|
+
callback: ( name: string, value: any ) => void;
|
|
1909
|
+
step?: number;
|
|
1910
|
+
live?: boolean;
|
|
1911
|
+
cls?: string;
|
|
1912
|
+
}
|
|
1913
|
+
|
|
1914
|
+
export interface PropertyGroup {
|
|
1915
|
+
title: string;
|
|
1916
|
+
desc?: string;
|
|
1917
|
+
icon?: string;
|
|
1918
|
+
cls?: string;
|
|
1919
|
+
collapsible?: boolean;
|
|
1920
|
+
items: PropertyValue[];
|
|
1921
|
+
}
|
|
1922
|
+
|
|
1923
|
+
export interface PropertyProps extends ComponentProps {
|
|
1924
|
+
groups: PropertyGroup[];
|
|
1925
|
+
}
|
|
1926
|
+
|
|
1927
|
+
@class_ns( "x4" ) export class PropertyGrid extends VBox {
|
|
1928
|
+
root: Component;
|
|
1929
|
+
groups: PropertyGroup[];
|
|
1930
|
+
constructor( props: PropertyProps );
|
|
1931
|
+
setItems( _grps: PropertyGroup[] ): void;
|
|
1932
|
+
makeGroupHeader( g: PropertyGroup ): void;
|
|
1933
|
+
makePropertyRow( item: PropertyValue ): void;
|
|
1934
|
+
setPropValue( name: string, value: any ): void;
|
|
1935
|
+
}
|
|
1936
|
+
|
|
1937
|
+
// ---------------------------------------
|
|
1938
|
+
// from /src/components/radio/radio.ts
|
|
1939
|
+
|
|
1940
|
+
interface RadioEvents extends ComponentEvents {
|
|
1941
|
+
change?: EvChange;
|
|
1942
|
+
}
|
|
1943
|
+
|
|
1944
|
+
interface RadioProps extends ComponentProps {
|
|
1945
|
+
label: string;
|
|
1946
|
+
icon?: string;
|
|
1947
|
+
name: string;
|
|
1948
|
+
value: number | string;
|
|
1949
|
+
checked?: boolean;
|
|
1950
|
+
change?: EventCallback<EvChange>;
|
|
1951
|
+
}
|
|
1952
|
+
|
|
1953
|
+
@class_ns( "x4" ) export class Radio extends Component<RadioProps,RadioEvents> {
|
|
1954
|
+
_check: HBox;
|
|
1955
|
+
_input: Input;
|
|
1956
|
+
_label: Label;
|
|
1957
|
+
constructor( props: RadioProps );
|
|
1958
|
+
_on_click( ev: MouseEvent ): void;
|
|
1959
|
+
_on_change( ): void;
|
|
1960
|
+
setCheck( ck: boolean ): void;
|
|
1961
|
+
setLabel( text: string ): void;
|
|
1962
|
+
getValue( ): void;
|
|
1963
|
+
}
|
|
1964
|
+
|
|
1300
1965
|
// ---------------------------------------
|
|
1301
1966
|
// from /src/components/rating/rating.ts
|
|
1302
1967
|
|
|
@@ -1325,14 +1990,27 @@ declare module 'x4js' {
|
|
|
1325
1990
|
}
|
|
1326
1991
|
|
|
1327
1992
|
// ---------------------------------------
|
|
1328
|
-
// from /src/components/
|
|
1993
|
+
// from /src/components/tickline/tickline.ts
|
|
1329
1994
|
|
|
1330
|
-
interface
|
|
1331
|
-
|
|
1995
|
+
interface TickLineProps extends ComponentProps {
|
|
1996
|
+
values: number[];
|
|
1997
|
+
min?: number;
|
|
1998
|
+
max?: number;
|
|
1999
|
+
color?: Color;
|
|
2000
|
+
background?: Color;
|
|
2001
|
+
type: "bars" | "line";
|
|
2002
|
+
}
|
|
2003
|
+
|
|
2004
|
+
export class TickLine extends Component<TickLineProps> {
|
|
2005
|
+
constructor( props: TickLineProps );
|
|
2006
|
+
update( ): void;
|
|
1332
2007
|
}
|
|
1333
2008
|
|
|
2009
|
+
// ---------------------------------------
|
|
2010
|
+
// from /src/components/slider/slider.ts
|
|
2011
|
+
|
|
1334
2012
|
interface SliderEvents extends ComponentEvents {
|
|
1335
|
-
change:
|
|
2013
|
+
change: EvChange;
|
|
1336
2014
|
}
|
|
1337
2015
|
|
|
1338
2016
|
interface SliderProps extends ComponentProps {
|
|
@@ -1340,6 +2018,8 @@ declare module 'x4js' {
|
|
|
1340
2018
|
min: number;
|
|
1341
2019
|
max: number;
|
|
1342
2020
|
step?: number;
|
|
2021
|
+
vertical?: boolean;
|
|
2022
|
+
change?: EventCallback<EvChange>;
|
|
1343
2023
|
}
|
|
1344
2024
|
|
|
1345
2025
|
@class_ns( "x4" ) export class Slider extends Component<SliderProps,SliderEvents> {
|
|
@@ -1350,10 +2030,14 @@ declare module 'x4js' {
|
|
|
1350
2030
|
_range: Input;
|
|
1351
2031
|
constructor( props: SliderProps );
|
|
1352
2032
|
_on_mousedown( ev: PointerEvent ): void;
|
|
2033
|
+
_getMinMax( ): void;
|
|
1353
2034
|
_on_mousemove( ev: PointerEvent ): void;
|
|
1354
2035
|
_update( ): void;
|
|
1355
2036
|
_on_mouseup( ev: PointerEvent ): void;
|
|
1356
2037
|
_on_key( ev: KeyboardEvent ): void;
|
|
2038
|
+
setMin( min: number ): void;
|
|
2039
|
+
setMax( max: number ): void;
|
|
2040
|
+
setValue( v: number ): void;
|
|
1357
2041
|
}
|
|
1358
2042
|
|
|
1359
2043
|
// ---------------------------------------
|
|
@@ -1376,7 +2060,7 @@ declare module 'x4js' {
|
|
|
1376
2060
|
name: string;
|
|
1377
2061
|
title: string;
|
|
1378
2062
|
icon?: string;
|
|
1379
|
-
|
|
2063
|
+
content: Component;
|
|
1380
2064
|
}
|
|
1381
2065
|
|
|
1382
2066
|
@class_ns( "x4" ) class CTab extends Button {
|
|
@@ -1397,10 +2081,12 @@ declare module 'x4js' {
|
|
|
1397
2081
|
|
|
1398
2082
|
@class_ns( "x4" ) class CTabList extends HBox<TablistProps,TablistEvents> {
|
|
1399
2083
|
_selitem: Button;
|
|
1400
|
-
|
|
1401
|
-
constructor( props: TablistProps, content: TabItem[] );
|
|
2084
|
+
constructor( props: TablistProps, items: TabItem[] );
|
|
1402
2085
|
_on_click( ev: EvClick ): void;
|
|
1403
2086
|
select( name: string ): void;
|
|
2087
|
+
setItems( items: TabItem[ ] ): void;
|
|
2088
|
+
addItem( tab: TabItem ): void;
|
|
2089
|
+
getTabCount( ): void;
|
|
1404
2090
|
}
|
|
1405
2091
|
|
|
1406
2092
|
interface TabsProps extends Omit<ComponentProps,"content"> {
|
|
@@ -1411,9 +2097,13 @@ declare module 'x4js' {
|
|
|
1411
2097
|
@class_ns( "x4" ) export class Tabs extends VBox<TabsProps> {
|
|
1412
2098
|
_list: CTabList;
|
|
1413
2099
|
_stack: StackBox;
|
|
2100
|
+
_current: string;
|
|
1414
2101
|
constructor( props: TabsProps );
|
|
1415
2102
|
selectTab( name: string ): void;
|
|
1416
2103
|
_onclick( ev: TablistClickEvent ): void;
|
|
2104
|
+
getTab( name: string ): void;
|
|
2105
|
+
getCurTab( ): void;
|
|
2106
|
+
addTab( item: TabItem ): void;
|
|
1417
2107
|
}
|
|
1418
2108
|
|
|
1419
2109
|
// ---------------------------------------
|
|
@@ -1423,30 +2113,46 @@ declare module 'x4js' {
|
|
|
1423
2113
|
label?: string;
|
|
1424
2114
|
value?: string;
|
|
1425
2115
|
resize?: boolean;
|
|
2116
|
+
readonly?: boolean;
|
|
2117
|
+
}
|
|
2118
|
+
|
|
2119
|
+
class SimpleTextArea extends Component {
|
|
2120
|
+
constructor( props: TextAreaProps );
|
|
2121
|
+
setText( text: string ): void;
|
|
2122
|
+
getText( ): void;
|
|
2123
|
+
queryInterface<T>( name: string ): T;
|
|
1426
2124
|
}
|
|
1427
2125
|
|
|
1428
2126
|
@class_ns( "x4" ) export class TextArea extends VBox {
|
|
1429
|
-
_input:
|
|
2127
|
+
_input: SimpleTextArea;
|
|
1430
2128
|
constructor( props: TextAreaProps );
|
|
2129
|
+
setText( text: string ): void;
|
|
2130
|
+
getText( ): void;
|
|
2131
|
+
queryInterface<T>( name: string ): T;
|
|
1431
2132
|
}
|
|
1432
2133
|
|
|
1433
2134
|
// ---------------------------------------
|
|
1434
2135
|
// from /src/components/textedit/textedit.ts
|
|
1435
2136
|
|
|
1436
|
-
|
|
2137
|
+
type TextEditInputs = TextInputProps | NumberProps | DateProps | TimeProps;
|
|
2138
|
+
|
|
2139
|
+
interface TextEditBase {
|
|
1437
2140
|
label: string | UnsafeHtml;
|
|
1438
2141
|
labelWidth?: number;
|
|
2142
|
+
inputWidth?: number;
|
|
1439
2143
|
inputId?: string;
|
|
1440
|
-
type?: "text" | "email" | "password";
|
|
1441
|
-
readonly?: boolean;
|
|
1442
|
-
required?: boolean;
|
|
1443
|
-
value: string | number;
|
|
1444
|
-
placeholder?: string;
|
|
1445
2144
|
inputGadgets?: Component[];
|
|
2145
|
+
inputAttrs?: any;
|
|
1446
2146
|
}
|
|
1447
2147
|
|
|
2148
|
+
type TextEditProps = TextEditInputs & TextEditBase;
|
|
2149
|
+
|
|
1448
2150
|
@class_ns( "x4" ) export class TextEdit extends HBox {
|
|
2151
|
+
input: Input;
|
|
1449
2152
|
constructor( props: TextEditProps );
|
|
2153
|
+
getValue( ): void;
|
|
2154
|
+
setValue( value: string ): void;
|
|
2155
|
+
getInput( ): void;
|
|
1450
2156
|
}
|
|
1451
2157
|
|
|
1452
2158
|
// ---------------------------------------
|
|
@@ -1479,6 +2185,7 @@ declare module 'x4js' {
|
|
|
1479
2185
|
|
|
1480
2186
|
interface TreeviewProps extends Omit<ComponentProps,"content"> {
|
|
1481
2187
|
items: TreeItem[];
|
|
2188
|
+
footer?: Component;
|
|
1482
2189
|
}
|
|
1483
2190
|
|
|
1484
2191
|
interface ChangeEvent extends ComponentEvent {
|
|
@@ -1486,7 +2193,7 @@ declare module 'x4js' {
|
|
|
1486
2193
|
}
|
|
1487
2194
|
|
|
1488
2195
|
interface TreeviewEvents extends ComponentEvents {
|
|
1489
|
-
|
|
2196
|
+
selectionChange?: EvSelectionChange;
|
|
1490
2197
|
}
|
|
1491
2198
|
|
|
1492
2199
|
@class_ns( "x4" ) class CTreeViewItem extends Box {
|
|
@@ -1501,6 +2208,7 @@ declare module 'x4js' {
|
|
|
1501
2208
|
}
|
|
1502
2209
|
|
|
1503
2210
|
@class_ns( "x4" ) export class Treeview extends Component<TreeviewProps,TreeviewEvents> {
|
|
2211
|
+
_view: Viewport;
|
|
1504
2212
|
_selection: ListboxID;
|
|
1505
2213
|
_selitem: Component;
|
|
1506
2214
|
_items: TreeItem[];
|
|
@@ -1514,6 +2222,7 @@ declare module 'x4js' {
|
|
|
1514
2222
|
_selectItem( id: ListboxID, item: Component ): void;
|
|
1515
2223
|
_findItem( id: ListboxID ): void;
|
|
1516
2224
|
clearSelection( ): void;
|
|
2225
|
+
getSelection( ): void;
|
|
1517
2226
|
}
|
|
1518
2227
|
|
|
1519
2228
|
// ---------------------------------------
|