x4js 2.0.12 → 2.0.14
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 +20 -15
- package/{lib/src/demo → demo}/assets/radio.svg +3 -3
- package/{lib/src/demo → demo}/index.html +11 -11
- package/{lib/src/demo → demo}/main.scss +23 -21
- package/{lib/src/demo/main.tsx → demo/main.ts} +324 -323
- 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 +20 -15
- 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/base.scss +25 -26
- package/lib/src/components/boxes/boxes.module.scss +54 -37
- package/lib/src/components/boxes/boxes.ts +278 -125
- package/lib/src/components/breadcrumb/breadcrumb.scss +56 -0
- package/lib/src/components/breadcrumb/breadcrumb.ts +93 -0
- package/lib/src/components/breadcrumb/chevron-right.svg +1 -0
- package/lib/src/components/btngroup/btngroup.module.scss +40 -28
- package/lib/src/components/btngroup/btngroup.ts +152 -101
- package/lib/src/components/button/button.module.scss +172 -153
- package/lib/src/components/button/button.ts +185 -117
- package/lib/src/components/calendar/calendar.module.scss +162 -162
- package/lib/src/components/calendar/calendar.ts +326 -325
- 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 +269 -0
- package/lib/src/components/checkbox/check.svg +3 -3
- package/lib/src/components/checkbox/checkbox.module.scss +141 -141
- package/lib/src/components/checkbox/checkbox.ts +139 -124
- package/lib/src/components/colorinput/colorinput.module.scss +64 -64
- package/lib/src/components/colorinput/colorinput.ts +90 -87
- package/lib/src/components/colorpicker/colorpicker.module.scss +132 -132
- package/lib/src/components/colorpicker/colorpicker.ts +481 -476
- package/lib/src/components/combobox/combobox.module.scss +132 -120
- package/lib/src/components/combobox/combobox.ts +275 -190
- package/lib/src/components/combobox/updown.svg +3 -3
- package/lib/src/components/components.ts +41 -0
- package/lib/src/components/dialog/dialog.module.scss +105 -71
- package/lib/src/components/dialog/dialog.ts +212 -92
- 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 +38 -34
- package/lib/src/components/form/form.ts +172 -36
- 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/header/header.module.scss +39 -39
- package/lib/src/components/header/header.ts +129 -123
- package/lib/src/components/icon/icon.module.scss +30 -30
- package/lib/src/components/icon/icon.ts +139 -134
- package/lib/src/components/image/image.module.scss +27 -20
- package/lib/src/components/image/image.ts +168 -67
- package/lib/src/components/input/input.module.scss +74 -69
- package/lib/src/components/input/input.ts +398 -274
- 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 +525 -0
- package/lib/src/components/label/label.module.scss +76 -52
- package/lib/src/components/label/label.ts +97 -55
- package/lib/src/components/link/link.ts +81 -0
- package/lib/src/components/listbox/listbox.module.scss +161 -103
- package/lib/src/components/listbox/listbox.ts +539 -427
- package/lib/src/components/menu/menu.module.scss +116 -107
- package/lib/src/components/menu/menu.ts +174 -168
- package/lib/src/components/messages/messages.module.scss +92 -47
- package/lib/src/components/messages/messages.ts +215 -64
- package/lib/src/components/messages/pen-field.svg +1 -0
- package/lib/src/components/normalize.scss +391 -386
- package/lib/src/components/notification/notification.module.scss +83 -81
- package/lib/src/components/notification/notification.ts +107 -108
- package/lib/src/components/panel/panel.module.scss +59 -47
- package/lib/src/components/panel/panel.ts +57 -56
- package/lib/src/components/popup/popup.module.scss +45 -43
- package/lib/src/components/popup/popup.ts +440 -395
- package/lib/src/components/progress/progress.module.scss +56 -56
- package/lib/src/components/progress/progress.ts +43 -42
- 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 +108 -0
- package/lib/src/components/propgrid/propgrid.ts +271 -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/rating/rating.module.scss +22 -22
- package/lib/src/components/rating/rating.ts +131 -125
- 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 +137 -76
- package/lib/src/components/sizers/sizer.module.scss +89 -89
- package/lib/src/components/sizers/sizer.ts +130 -119
- package/lib/src/components/slider/slider.module.scss +117 -70
- package/lib/src/components/slider/slider.ts +197 -142
- package/lib/src/components/switch/switch.module.scss +126 -126
- package/lib/src/components/switch/switch.ts +61 -55
- package/lib/src/components/tabs/tabs.module.scss +45 -46
- package/lib/src/components/tabs/tabs.ts +199 -157
- package/lib/src/components/textarea/textarea.module.scss +63 -59
- package/lib/src/components/textarea/textarea.ts +125 -54
- package/lib/src/components/textedit/textedit.module.scss +115 -113
- package/lib/src/components/textedit/textedit.ts +110 -82
- package/lib/src/components/themes.scss +88 -77
- 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 +71 -50
- package/lib/src/components/tooltips/tooltips.ts +108 -102
- package/lib/src/components/treeview/treeview.module.scss +184 -115
- package/lib/src/components/treeview/treeview.ts +445 -403
- package/lib/src/components/viewport/viewport.module.scss +31 -24
- package/lib/src/components/viewport/viewport.ts +41 -38
- package/lib/src/core/component.ts +1072 -979
- package/lib/src/core/core_application.ts +264 -0
- package/lib/src/core/core_colors.ts +249 -249
- package/lib/src/core/core_data.ts +1309 -0
- package/lib/src/core/core_dom.ts +471 -471
- package/lib/src/core/core_dragdrop.ts +200 -200
- package/lib/src/core/core_element.ts +109 -97
- package/lib/src/core/core_events.ts +177 -149
- package/lib/src/core/core_i18n.ts +393 -377
- package/lib/src/core/core_react.ts +79 -0
- package/lib/src/core/core_router.ts +237 -221
- package/lib/src/core/core_styles.ts +214 -214
- package/lib/src/core/core_svg.ts +711 -550
- package/lib/src/core/core_tools.ts +906 -673
- package/lib/src/types/scss.d.ts +4 -4
- package/lib/src/types/x4react.d.ts +8 -8
- package/lib/src/x4.scss +18 -18
- package/lib/src/x4.ts +31 -62
- package/lib/src/x4tsx.d.ts +25 -0
- package/lib/styles/x4.css +1 -1
- package/lib/types/x4js.d.ts +853 -127
- package/package.json +5 -6
- 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 +278 -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 +269 -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 +105 -0
- package/src/components/dialog/dialog.ts +212 -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 +30 -0
- package/src/components/icon/icon.ts +139 -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 +398 -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 +525 -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 +45 -0
- package/src/components/popup/popup.ts +440 -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 +108 -0
- package/src/components/propgrid/propgrid.ts +271 -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 +131 -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 +199 -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 +110 -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 +1072 -0
- package/src/core/core_application.ts +264 -0
- package/src/core/core_colors.ts +250 -0
- package/src/core/core_data.ts +1309 -0
- package/src/core/core_dom.ts +471 -0
- package/src/core/core_dragdrop.ts +201 -0
- package/src/core/core_element.ts +110 -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_styles.ts +214 -0
- package/src/core/core_svg.ts +711 -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/x4.ts +31 -62
- package/src/x4tsx.d.ts +25 -0
- package/tsconfig.json +14 -0
- /package/{lib/src/demo → demo}/assets/house-light.svg +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 Apr 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,7 @@ declare module 'x4js' {
|
|
|
259
294
|
|
|
260
295
|
type ComponentAttributes = Record<string,string|number|boolean>;
|
|
261
296
|
|
|
262
|
-
type ComponentContent = Component | string | UnsafeHtml |
|
|
297
|
+
type ComponentContent = Component | Component[] | string | string[] | UnsafeHtml | UnsafeHtml[] | number | boolean;
|
|
263
298
|
|
|
264
299
|
export interface ComponentProps {
|
|
265
300
|
tag?: string;
|
|
@@ -275,6 +310,7 @@ declare module 'x4js' {
|
|
|
275
310
|
height?: string | number;
|
|
276
311
|
disabled?: true;
|
|
277
312
|
hidden?: true;
|
|
313
|
+
flex?: boolean | number;
|
|
278
314
|
tooltip?: string;
|
|
279
315
|
existingDOM?: HTMLElement;
|
|
280
316
|
}
|
|
@@ -285,20 +321,23 @@ declare module 'x4js' {
|
|
|
285
321
|
export interface ComponentEvents extends EventMap {
|
|
286
322
|
}
|
|
287
323
|
|
|
288
|
-
export class Component<P extends ComponentProps = ComponentProps, E extends ComponentEvents = ComponentEvents> extends CoreElement<E> {
|
|
324
|
+
@class_ns( "x4" ) export class Component<P extends ComponentProps = ComponentProps, E extends ComponentEvents = ComponentEvents> extends CoreElement<E> {
|
|
289
325
|
dom: Element;
|
|
290
326
|
props: P;
|
|
291
|
-
|
|
327
|
+
clsprefix: string;
|
|
328
|
+
#store: Map<string|Symbol,any>;
|
|
292
329
|
constructor( props: P );
|
|
293
330
|
hasClass( cls: string ): void;
|
|
294
331
|
addClass( cls: string ): void;
|
|
295
332
|
removeClass( cls: string ): void;
|
|
333
|
+
removeClassEx( re: RegExp ): void;
|
|
296
334
|
toggleClass( cls: string ): void;
|
|
297
335
|
setClass( cls: string, set: boolean ): void;
|
|
298
336
|
setAttributes( attrs: ComponentAttributes ): void;
|
|
299
337
|
setAttribute( name: string, value: string | number | boolean ): void;
|
|
300
338
|
getAttribute( name: string ): string;
|
|
301
339
|
getData( name: string ): string;
|
|
340
|
+
getIntData( name: string ): number;
|
|
302
341
|
setData( name: string, value: string ): void;
|
|
303
342
|
setInternalData( name: string|Symbol, value: any ): this;
|
|
304
343
|
getInternalData( name: string|Symbol ): any;
|
|
@@ -323,18 +362,20 @@ declare module 'x4js' {
|
|
|
323
362
|
getComputedStyle( ): void;
|
|
324
363
|
setCapture( pointerId: number ): void;
|
|
325
364
|
releaseCapture( pointerId: number ): void;
|
|
326
|
-
getBoundingRect( ):
|
|
327
|
-
focus( ):
|
|
365
|
+
getBoundingRect( ): IRect;
|
|
366
|
+
focus( ): this;
|
|
367
|
+
hasFocus( ): void;
|
|
328
368
|
scrollIntoView( arg: boolean | ScrollIntoViewOptions ): void;
|
|
329
369
|
isVisible( ): void;
|
|
330
|
-
show( vis: any ):
|
|
331
|
-
hide( ):
|
|
332
|
-
enable( ena: any ):
|
|
333
|
-
disable( ):
|
|
370
|
+
show( vis: any ): this;
|
|
371
|
+
hide( ): this;
|
|
372
|
+
enable( ena: any ): this;
|
|
373
|
+
disable( ): this;
|
|
334
374
|
isDisabled( ): void;
|
|
335
375
|
nextElement<T extends Component = Component>( ): T;
|
|
336
376
|
prevElement<T extends Component = Component>( ): T;
|
|
337
377
|
parentElement<T extends Component>( cls: Constructor<T> ): T;
|
|
378
|
+
parentElement<T extends Component>( dom: Node, cls: Constructor<T> ): T;
|
|
338
379
|
firstChild<T extends Component = Component>( ): T;
|
|
339
380
|
lastChild<T extends Component = Component>( ): T;
|
|
340
381
|
enumChildComponents( recursive: boolean ): void;
|
|
@@ -353,6 +394,10 @@ declare module 'x4js' {
|
|
|
353
394
|
constructor( );
|
|
354
395
|
}
|
|
355
396
|
|
|
397
|
+
export class Space extends Component {
|
|
398
|
+
constructor( width: number|string, cls: string );
|
|
399
|
+
}
|
|
400
|
+
|
|
356
401
|
export interface EvClick extends ComponentEvent {
|
|
357
402
|
}
|
|
358
403
|
|
|
@@ -360,11 +405,16 @@ declare module 'x4js' {
|
|
|
360
405
|
value: any;
|
|
361
406
|
}
|
|
362
407
|
|
|
408
|
+
export interface EvFocus extends ComponentEvent {
|
|
409
|
+
focus_out: boolean;
|
|
410
|
+
}
|
|
411
|
+
|
|
363
412
|
interface ISelection {
|
|
364
413
|
}
|
|
365
414
|
|
|
366
415
|
export interface EvSelectionChange extends ComponentEvent {
|
|
367
416
|
selection: ISelection;
|
|
417
|
+
empty: boolean;
|
|
368
418
|
}
|
|
369
419
|
|
|
370
420
|
export interface EvContextMenu extends ComponentEvent {
|
|
@@ -434,7 +484,7 @@ declare module 'x4js' {
|
|
|
434
484
|
|
|
435
485
|
type DropCallback = ( command: 'enter' | 'leave' | 'drag' | 'drop', el: Component, infos: DropInfo ) => void;
|
|
436
486
|
|
|
437
|
-
type FilterCallback = ( el: Component ) => boolean;
|
|
487
|
+
type FilterCallback = ( el: Component, data: DataTransfer ) => boolean;
|
|
438
488
|
|
|
439
489
|
class DragManager {
|
|
440
490
|
dragSource: Component;
|
|
@@ -465,6 +515,7 @@ declare module 'x4js' {
|
|
|
465
515
|
}
|
|
466
516
|
|
|
467
517
|
interface RouterEvents extends EventMap {
|
|
518
|
+
change: EvChange;
|
|
468
519
|
error: EvError;
|
|
469
520
|
}
|
|
470
521
|
|
|
@@ -486,6 +537,7 @@ declare module 'x4js' {
|
|
|
486
537
|
_dom: SVGElement;
|
|
487
538
|
constructor( tag: string );
|
|
488
539
|
getDom( ): void;
|
|
540
|
+
reset( ): void;
|
|
489
541
|
stroke( color: string, width: number ): this;
|
|
490
542
|
strokeWidth( width: number ): this;
|
|
491
543
|
strokeCap( cap: "butt" | "round" | "sqaure" ): void;
|
|
@@ -493,11 +545,15 @@ declare module 'x4js' {
|
|
|
493
545
|
antiAlias( set: boolean ): void;
|
|
494
546
|
fill( color: string ): this;
|
|
495
547
|
no_fill( ): this;
|
|
548
|
+
getAttr( name: string ): string;
|
|
549
|
+
getNumAttr( name: string ): void;
|
|
496
550
|
setAttr( name: string, value: string ): this;
|
|
497
551
|
setStyle<K extends keyof CSSStyleDeclaration>( name: K, value: string | number ): this;
|
|
498
|
-
addClass( cls: string ):
|
|
552
|
+
addClass( cls: string ): this;
|
|
553
|
+
removeClass( cls: string ): this;
|
|
499
554
|
clip( id: string ): this;
|
|
500
555
|
transform( tr: string ): this;
|
|
556
|
+
clear_transform( ): void;
|
|
501
557
|
rotate( deg: number, cx: number, cy: number ): this;
|
|
502
558
|
translate( dx: number, dy: number ): this;
|
|
503
559
|
scale( x: number ): this;
|
|
@@ -508,10 +564,12 @@ declare module 'x4js' {
|
|
|
508
564
|
_path: string;
|
|
509
565
|
constructor( );
|
|
510
566
|
_update( ): this;
|
|
567
|
+
reset( ): void;
|
|
511
568
|
moveTo( x: number, y: number ): this;
|
|
512
569
|
lineTo( x: number, y: number ): this;
|
|
570
|
+
curveTo( x1: number, y1: number, x2: number, y2: number, x3: number, y3: number ): void;
|
|
513
571
|
closePath( ): this;
|
|
514
|
-
arc( x: number, y: number, r: number, start: number, end: number ): this;
|
|
572
|
+
arc( x: number, y: number, r: number, start: number, end: number, clockwise: any ): this;
|
|
515
573
|
}
|
|
516
574
|
|
|
517
575
|
export class SvgText extends SvgItem {
|
|
@@ -523,6 +581,10 @@ declare module 'x4js' {
|
|
|
523
581
|
verticalAlign( align: 'top' | 'center' | 'bottom' | 'baseline' ): this;
|
|
524
582
|
}
|
|
525
583
|
|
|
584
|
+
export class SvgIcon extends SvgItem {
|
|
585
|
+
constructor( svg: string );
|
|
586
|
+
}
|
|
587
|
+
|
|
526
588
|
export class SvgShape extends SvgItem {
|
|
527
589
|
constructor( tag: string );
|
|
528
590
|
}
|
|
@@ -540,49 +602,59 @@ declare module 'x4js' {
|
|
|
540
602
|
export class SvgGroup extends SvgItem {
|
|
541
603
|
constructor( tag: any );
|
|
542
604
|
append<K extends SvgItem>( item: K ): K;
|
|
605
|
+
appendItems<K extends SvgItem>( items: K[] ): void;
|
|
543
606
|
path( ): SvgPath;
|
|
544
607
|
text( x: number, y: number, txt: string ): void;
|
|
545
|
-
ellipse( x: number, y: number, r1: number, r2:
|
|
608
|
+
ellipse( x: number, y: number, r1: number, r2: number ): SvgShape;
|
|
609
|
+
circle( x: number, y: number, r1: number ): SvgShape;
|
|
610
|
+
icon( svg: string, x: number, y: number, w: number, h: number ): SvgIcon;
|
|
546
611
|
rect( x: number, y: number, w: number, h: number ): SvgShape;
|
|
547
|
-
group(
|
|
612
|
+
group( id: string ): void;
|
|
548
613
|
linear_gradient( x1: number_or_perc, y1: number_or_perc, x2: number_or_perc, y2: number_or_perc ): void;
|
|
549
614
|
clear( ): void;
|
|
550
615
|
}
|
|
551
616
|
|
|
552
617
|
export class SvgBuilder extends SvgGroup {
|
|
553
618
|
g_clip_id: any;
|
|
619
|
+
g_pat_id: any;
|
|
554
620
|
constructor( );
|
|
555
621
|
addClip( x: number, y: number, w: number, h: number ): void;
|
|
622
|
+
addPattern( x: number, y: number, w: number, h: number ): void;
|
|
556
623
|
}
|
|
557
624
|
|
|
558
625
|
interface SvgProps extends ComponentProps {
|
|
559
626
|
viewbox?: string;
|
|
560
|
-
svg
|
|
627
|
+
svg: SvgBuilder;
|
|
561
628
|
}
|
|
562
629
|
|
|
563
630
|
export class SvgComponent<P extends SvgProps = SvgProps> extends Component<P> {
|
|
564
631
|
constructor( props: P );
|
|
632
|
+
setSvg( bld: SvgBuilder ): void;
|
|
633
|
+
addItems( items: SvgItem[] ): void;
|
|
565
634
|
}
|
|
566
635
|
|
|
567
636
|
// ---------------------------------------
|
|
568
637
|
// from /src/components/boxes/boxes.ts
|
|
569
638
|
|
|
570
639
|
export interface BoxProps extends ComponentProps {
|
|
640
|
+
tag?: string;
|
|
571
641
|
}
|
|
572
642
|
|
|
573
|
-
export class Box<P extends BoxProps=BoxProps, E extends ComponentEvents=ComponentEvents> extends Component<P,E> {
|
|
643
|
+
@class_ns( "x4" ) export class Box<P extends BoxProps=BoxProps, E extends ComponentEvents=ComponentEvents> extends Component<P,E> {
|
|
574
644
|
}
|
|
575
645
|
|
|
576
|
-
export class HBox<P extends BoxProps=BoxProps, E extends ComponentEvents=ComponentEvents> extends Box<P,E> {
|
|
646
|
+
@class_ns( "x4" ) export class HBox<P extends BoxProps=BoxProps, E extends ComponentEvents=ComponentEvents> extends Box<P,E> {
|
|
577
647
|
}
|
|
578
648
|
|
|
579
|
-
export class VBox<P extends BoxProps=BoxProps, E extends ComponentEvents=ComponentEvents> extends Box<P,E> {
|
|
649
|
+
@class_ns( "x4" ) export class VBox<P extends BoxProps=BoxProps, E extends ComponentEvents=ComponentEvents> extends Box<P,E> {
|
|
580
650
|
constructor( p: P );
|
|
581
651
|
}
|
|
582
652
|
|
|
653
|
+
type ContentBuilder = ( ) => Component;
|
|
654
|
+
|
|
583
655
|
interface StackItem {
|
|
584
656
|
name: string;
|
|
585
|
-
content: Component;
|
|
657
|
+
content: Component | ContentBuilder;
|
|
586
658
|
}
|
|
587
659
|
|
|
588
660
|
interface StackedLayoutProps extends Omit<ComponentProps,"content"> {
|
|
@@ -590,15 +662,66 @@ declare module 'x4js' {
|
|
|
590
662
|
items: StackItem[];
|
|
591
663
|
}
|
|
592
664
|
|
|
593
|
-
interface
|
|
665
|
+
interface StackItemEx extends StackItem {
|
|
594
666
|
page: Component;
|
|
595
667
|
}
|
|
596
668
|
|
|
597
|
-
export class StackBox extends Box<StackedLayoutProps> {
|
|
598
|
-
_items:
|
|
669
|
+
@class_ns( "x4" ) export class StackBox extends Box<StackedLayoutProps> {
|
|
670
|
+
_items: StackItemEx[];
|
|
599
671
|
constructor( props: StackedLayoutProps );
|
|
672
|
+
addItem( item: StackItem ): void;
|
|
600
673
|
select( name: string ): void;
|
|
601
|
-
_createPage( page:
|
|
674
|
+
_createPage( page: StackItemEx ): void;
|
|
675
|
+
getPage( name: string ): void;
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
export interface GridboxProps extends BoxProps {
|
|
679
|
+
rows?: number | string | string[];
|
|
680
|
+
columns?: number | string | string[];
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
@class_ns("x4") export class GridBox<P extends GridboxProps=GridboxProps, E extends ComponentEvents=ComponentEvents> extends Box<P,E> {
|
|
684
|
+
constructor( props: P );
|
|
685
|
+
setRows( r: number | string | string[] ): void;
|
|
686
|
+
setCols( r: number | string | string[] ): void;
|
|
687
|
+
setRowCount( n: number ): void;
|
|
688
|
+
setColCount( n: number ): void;
|
|
689
|
+
setTemplate( t: string[] ): void;
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
interface MasonryProps extends Omit<BoxProps,"content"> {
|
|
693
|
+
items: Component[];
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
@class_ns("x4") export class MasonryBox extends Box<MasonryProps> {
|
|
697
|
+
constructor( props: MasonryProps );
|
|
698
|
+
resizeItem( item: Component ): void;
|
|
699
|
+
resizeAllItems( ): void;
|
|
700
|
+
setItems( items: Component[] ): void;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
// ---------------------------------------
|
|
704
|
+
// from /src/components/breadcrumb/breadcrumb.ts
|
|
705
|
+
|
|
706
|
+
interface BreadcrumbEvents extends ComponentEvents {
|
|
707
|
+
click: EvClick;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
interface BreadcrumbElement {
|
|
711
|
+
name?: string;
|
|
712
|
+
icon?: string;
|
|
713
|
+
label: string;
|
|
714
|
+
click?: ( name: string ) => void;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
interface BreadcrumbsProps extends BoxProps {
|
|
718
|
+
items: BreadcrumbElement[];
|
|
719
|
+
click?: EventCallback<EvClick>;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
@class_ns( "x4" ) export class Breadcrumbs extends HBox<BreadcrumbsProps,BreadcrumbEvents> {
|
|
723
|
+
constructor( props: BreadcrumbsProps );
|
|
724
|
+
setItems( elements: BreadcrumbElement[ ] ): void;
|
|
602
725
|
}
|
|
603
726
|
|
|
604
727
|
// ---------------------------------------
|
|
@@ -618,7 +741,7 @@ declare module 'x4js' {
|
|
|
618
741
|
iconId?: string;
|
|
619
742
|
}
|
|
620
743
|
|
|
621
|
-
export class Icon extends Component<IconProps> {
|
|
744
|
+
@class_ns( "x4" ) export class Icon extends Component<IconProps> {
|
|
622
745
|
constructor( props: IconProps );
|
|
623
746
|
setIcon( iconId: string ): void;
|
|
624
747
|
}
|
|
@@ -633,12 +756,18 @@ declare module 'x4js' {
|
|
|
633
756
|
export interface ButtonProps extends ComponentProps {
|
|
634
757
|
label?: string;
|
|
635
758
|
icon?: string;
|
|
759
|
+
tabindex?: boolean | number;
|
|
760
|
+
autorepeat?: number | boolean;
|
|
636
761
|
click?: EventCallback<EvClick>;
|
|
637
762
|
}
|
|
638
763
|
|
|
639
|
-
export class Button extends Component<ButtonProps,ButtonEvents> {
|
|
764
|
+
@class_ns( "x4" ) export class Button extends Component<ButtonProps,ButtonEvents> {
|
|
765
|
+
#text: Component;
|
|
640
766
|
constructor( props: ButtonProps );
|
|
641
767
|
_on_click( ev: MouseEvent ): void;
|
|
768
|
+
_on_mouse( e: PointerEvent ): void;
|
|
769
|
+
click( ): void;
|
|
770
|
+
_on_keydown( e: KeyboardEvent ): void;
|
|
642
771
|
setText( text: string | UnsafeHtml ): void;
|
|
643
772
|
setIcon( icon: string ): void;
|
|
644
773
|
}
|
|
@@ -646,28 +775,49 @@ declare module 'x4js' {
|
|
|
646
775
|
// ---------------------------------------
|
|
647
776
|
// from /src/components/label/label.ts
|
|
648
777
|
|
|
649
|
-
interface LabelProps extends ComponentProps {
|
|
778
|
+
export interface LabelProps extends ComponentProps {
|
|
650
779
|
text?: string | UnsafeHtml;
|
|
651
780
|
icon?: string;
|
|
652
781
|
labelFor?: string;
|
|
653
782
|
}
|
|
654
783
|
|
|
655
|
-
export class Label extends Component<LabelProps> {
|
|
784
|
+
@class_ns( "x4" ) export class Label extends Component<LabelProps> {
|
|
785
|
+
#text: Component;
|
|
656
786
|
constructor( p: LabelProps );
|
|
657
787
|
setText( text: string | UnsafeHtml ): void;
|
|
658
788
|
setIcon( icon: string ): void;
|
|
659
789
|
}
|
|
660
790
|
|
|
791
|
+
export interface SimpleTextProps extends ComponentProps {
|
|
792
|
+
text: string | UnsafeHtml;
|
|
793
|
+
align?: "left" | "center" | "right";
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
@class_ns( "x4" ) export class SimpleText extends Component<SimpleTextProps> {
|
|
797
|
+
constructor( p: SimpleTextProps );
|
|
798
|
+
setText( text: string | UnsafeHtml ): void;
|
|
799
|
+
}
|
|
800
|
+
|
|
661
801
|
// ---------------------------------------
|
|
662
802
|
// from /src/components/form/form.ts
|
|
663
803
|
|
|
664
|
-
type
|
|
804
|
+
type FormValues = Record<string,string>;
|
|
665
805
|
|
|
666
|
-
|
|
806
|
+
export interface FormProps extends BoxProps {
|
|
807
|
+
autoComplete?: boolean;
|
|
808
|
+
}
|
|
667
809
|
|
|
668
|
-
|
|
810
|
+
type ValidationFn = ( values: FormValues, is_valid: boolean ) => boolean;
|
|
811
|
+
|
|
812
|
+
@class_ns( "x4" ) export class Form<P extends FormProps = FormProps> extends Box<P> {
|
|
813
|
+
validator: ValidationFn;
|
|
814
|
+
constructor( props: P );
|
|
815
|
+
_get_inputs( ): void;
|
|
669
816
|
setValues( values: FormValues ): void;
|
|
670
817
|
getValues( ): FormValues;
|
|
818
|
+
setAutoComplete( on: any ): void;
|
|
819
|
+
setValidator( validator: ValidationFn ): void;
|
|
820
|
+
validate( ): FormValues;
|
|
671
821
|
}
|
|
672
822
|
|
|
673
823
|
// ---------------------------------------
|
|
@@ -679,13 +829,17 @@ declare module 'x4js' {
|
|
|
679
829
|
|
|
680
830
|
interface CSizerEvent extends ComponentEvents {
|
|
681
831
|
resize: EvSizeChange;
|
|
832
|
+
start: ComponentEvent;
|
|
833
|
+
stop: ComponentEvent;
|
|
682
834
|
}
|
|
683
835
|
|
|
684
|
-
|
|
685
|
-
|
|
836
|
+
type SizerType = "left" | "top" | "right" | "bottom";
|
|
837
|
+
|
|
838
|
+
@class_ns( "x4" ) export class CSizer extends Component<ComponentProps,CSizerEvent> {
|
|
839
|
+
_type: SizerType;
|
|
686
840
|
_ref: Component;
|
|
687
841
|
_delta: Point;
|
|
688
|
-
constructor( type:
|
|
842
|
+
constructor( type: SizerType, target: Component );
|
|
689
843
|
_onMouseMove( e: PointerEvent ): void;
|
|
690
844
|
}
|
|
691
845
|
|
|
@@ -698,31 +852,35 @@ declare module 'x4js' {
|
|
|
698
852
|
}
|
|
699
853
|
|
|
700
854
|
export interface PopupProps extends ComponentProps {
|
|
701
|
-
modal?: boolean;
|
|
702
855
|
autoClose?: boolean | string;
|
|
703
856
|
sizable?: boolean;
|
|
704
857
|
movable?: boolean;
|
|
705
858
|
}
|
|
706
859
|
|
|
707
|
-
export class Popup<P extends PopupProps = PopupProps, E extends PopupEvents = PopupEvents> extends
|
|
708
|
-
_isopen: any;
|
|
860
|
+
@class_ns( "x4" ) export class Popup<P extends PopupProps = PopupProps, E extends PopupEvents = PopupEvents> extends Box<P,E> {
|
|
709
861
|
_isshown: any;
|
|
862
|
+
_ismodal: any;
|
|
710
863
|
constructor( props: P );
|
|
711
864
|
displayNear( rc: Rect, dst: any, src: any, offset: any ): void;
|
|
712
865
|
displayCenter( ): void;
|
|
713
866
|
displayAt( x: number, y: number ): void;
|
|
714
|
-
_show( ): void;
|
|
715
|
-
show( show: any ): void;
|
|
716
867
|
isOpen( ): void;
|
|
868
|
+
_do_hide( ): void;
|
|
869
|
+
_do_show( ): void;
|
|
870
|
+
__show( ): void;
|
|
871
|
+
__hide( ): void;
|
|
872
|
+
__append( ): void;
|
|
873
|
+
__remove( ): void;
|
|
874
|
+
show( show: any ): this;
|
|
717
875
|
close( ): void;
|
|
718
876
|
_dismiss: any;
|
|
719
877
|
dismiss( after: any ): void;
|
|
720
|
-
_showModalMask( ): void;
|
|
721
|
-
_updateModalMask( ): void;
|
|
722
878
|
_createSizers( ): void;
|
|
879
|
+
_showModalMask( ): void;
|
|
880
|
+
_hideModalMask( ): void;
|
|
723
881
|
}
|
|
724
882
|
|
|
725
|
-
|
|
883
|
+
export class CMover {
|
|
726
884
|
ref: Component;
|
|
727
885
|
delta: Point;
|
|
728
886
|
self: boolean;
|
|
@@ -736,9 +894,11 @@ declare module 'x4js' {
|
|
|
736
894
|
export interface DialogProps extends PopupProps {
|
|
737
895
|
icon?: string;
|
|
738
896
|
title: string;
|
|
739
|
-
form
|
|
897
|
+
form?: Form;
|
|
740
898
|
buttons: BtnGroupItem[];
|
|
741
|
-
closable?: boolean;
|
|
899
|
+
closable?: boolean | string;
|
|
900
|
+
modal?: boolean;
|
|
901
|
+
btnclick?: EventCallback<EvBtnClick>;
|
|
742
902
|
}
|
|
743
903
|
|
|
744
904
|
export interface EvBtnClick extends CoreEvent {
|
|
@@ -750,18 +910,23 @@ declare module 'x4js' {
|
|
|
750
910
|
close: ComponentEvent;
|
|
751
911
|
}
|
|
752
912
|
|
|
753
|
-
export class Dialog<P extends DialogProps = DialogProps, E extends DialogEvents = DialogEvents> extends Popup<P,E> {
|
|
913
|
+
@class_ns("x4") export class Dialog<P extends DialogProps = DialogProps, E extends DialogEvents = DialogEvents> extends Popup<P, E> {
|
|
914
|
+
form: Form;
|
|
754
915
|
constructor( props: P );
|
|
755
|
-
|
|
756
|
-
|
|
916
|
+
focusNext( next: boolean ): boolean;
|
|
917
|
+
setContent( form: Form ): void;
|
|
918
|
+
getForm( ): void;
|
|
919
|
+
getValues( ): void;
|
|
920
|
+
getButton( name: string ): void;
|
|
921
|
+
queryInterface<T extends IComponentInterface>( name: string ): T;
|
|
757
922
|
}
|
|
758
923
|
|
|
759
924
|
// ---------------------------------------
|
|
760
925
|
// from /src/components/btngroup/btngroup.ts
|
|
761
926
|
|
|
762
|
-
type predefined =
|
|
927
|
+
type predefined = `ok${ "" | `.${string}`}` | `cancel${ "" | `.${string}`}` | `yes${ "" | `.${string}`}` | `no${ "" | `.${string}`}` | `retry${ "" | `.${string}`}` | `abort${ "" | `.${string}`}` | "-" | ">>" | "~";
|
|
763
928
|
|
|
764
|
-
type BtnGroupItem = predefined | Button | Label;
|
|
929
|
+
type BtnGroupItem = predefined | Button | Label | Input;
|
|
765
930
|
|
|
766
931
|
interface BtnGroupEvents extends ComponentEvents {
|
|
767
932
|
btnclick: EvBtnClick;
|
|
@@ -775,9 +940,10 @@ declare module 'x4js' {
|
|
|
775
940
|
btnclick?: EventCallback<EvBtnClick>;
|
|
776
941
|
}
|
|
777
942
|
|
|
778
|
-
export class BtnGroup extends Box<BtnGroupProps,BtnGroupEvents> {
|
|
943
|
+
@class_ns( "x4" ) export class BtnGroup extends Box<BtnGroupProps,BtnGroupEvents> {
|
|
779
944
|
constructor( props: BtnGroupProps );
|
|
780
945
|
setButtons( btns: BtnGroupItem[] ): void;
|
|
946
|
+
getButton( id: string ): void;
|
|
781
947
|
}
|
|
782
948
|
|
|
783
949
|
// ---------------------------------------
|
|
@@ -798,11 +964,11 @@ declare module 'x4js' {
|
|
|
798
964
|
items: MenuElement[];
|
|
799
965
|
}
|
|
800
966
|
|
|
801
|
-
|
|
967
|
+
@class_ns( "x4" ) class CMenuSep extends Component {
|
|
802
968
|
constructor( );
|
|
803
969
|
}
|
|
804
970
|
|
|
805
|
-
|
|
971
|
+
@class_ns( "x4" ) class CMenuItem extends Component {
|
|
806
972
|
menu: Menu;
|
|
807
973
|
constructor( itm: MenuItem );
|
|
808
974
|
dismiss( after: boolean ): void;
|
|
@@ -810,7 +976,7 @@ declare module 'x4js' {
|
|
|
810
976
|
closeSub( ): void;
|
|
811
977
|
}
|
|
812
978
|
|
|
813
|
-
export class Menu extends Popup {
|
|
979
|
+
@class_ns( "x4" ) export class Menu extends Popup {
|
|
814
980
|
constructor( props: MenuProps );
|
|
815
981
|
}
|
|
816
982
|
|
|
@@ -828,7 +994,7 @@ declare module 'x4js' {
|
|
|
828
994
|
change?: EventCallback<EvChange>;
|
|
829
995
|
}
|
|
830
996
|
|
|
831
|
-
export class Calendar extends VBox<CalendarProps, CalendarEventMap> {
|
|
997
|
+
@class_ns( "x4" ) export class Calendar extends VBox<CalendarProps, CalendarEventMap> {
|
|
832
998
|
m_date: Date;
|
|
833
999
|
constructor( props: CalendarProps );
|
|
834
1000
|
_update( ): void;
|
|
@@ -844,6 +1010,9 @@ declare module 'x4js' {
|
|
|
844
1010
|
|
|
845
1011
|
export interface BaseProps extends ComponentProps {
|
|
846
1012
|
name?: string;
|
|
1013
|
+
autofocus?: boolean;
|
|
1014
|
+
focus?: EventCallback<EvFocus>;
|
|
1015
|
+
change?: EventCallback<EvChange>;
|
|
847
1016
|
}
|
|
848
1017
|
|
|
849
1018
|
interface CheckboxProps extends BaseProps {
|
|
@@ -889,27 +1058,39 @@ declare module 'x4js' {
|
|
|
889
1058
|
}
|
|
890
1059
|
|
|
891
1060
|
export interface TextInputProps extends BaseProps {
|
|
892
|
-
type: "text" | "email" | "password";
|
|
1061
|
+
type: "text" | "email" | "password" | "date" | "number";
|
|
893
1062
|
readonly?: boolean;
|
|
894
1063
|
required?: boolean;
|
|
895
1064
|
pattern?: string;
|
|
896
|
-
value
|
|
1065
|
+
value?: string | number;
|
|
897
1066
|
placeholder?: string;
|
|
898
1067
|
spellcheck?: boolean;
|
|
1068
|
+
minlength?: number;
|
|
1069
|
+
maxlength?: number;
|
|
899
1070
|
}
|
|
900
1071
|
|
|
901
1072
|
type InputProps = CheckboxProps | RadioProps | TextInputProps | RangeProps | DateProps | NumberProps | FileProps;
|
|
902
1073
|
|
|
903
|
-
|
|
1074
|
+
interface InputEvents extends ComponentEvent {
|
|
1075
|
+
focus: EvFocus;
|
|
1076
|
+
change: EvChange;
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
@class_ns( "x4" ) export class Input extends Component<InputProps,InputEvents> {
|
|
904
1080
|
constructor( props: InputProps );
|
|
1081
|
+
on_focus( ev: FocusEvent, focus_out: boolean ): void;
|
|
1082
|
+
on_change( ev: InputEvent ): void;
|
|
905
1083
|
getValue( ): void;
|
|
906
1084
|
setValue( value: string ): void;
|
|
907
1085
|
getNumValue( ): void;
|
|
908
|
-
setNumValue( value: number ): void;
|
|
1086
|
+
setNumValue( value: number, ndec: any ): void;
|
|
1087
|
+
getCheck( ): void;
|
|
1088
|
+
setCheck( ck: boolean ): void;
|
|
909
1089
|
setReadOnly( ro: boolean ): void;
|
|
910
1090
|
selectAll( ): void;
|
|
911
1091
|
select( start: number, length: number ): void;
|
|
912
1092
|
getSelection( ): void;
|
|
1093
|
+
isValid( ): void;
|
|
913
1094
|
queryInterface<T extends IComponentInterface>( name: string ): T;
|
|
914
1095
|
}
|
|
915
1096
|
|
|
@@ -924,12 +1105,14 @@ declare module 'x4js' {
|
|
|
924
1105
|
label: string;
|
|
925
1106
|
checked?: boolean;
|
|
926
1107
|
value?: boolean | number | string;
|
|
1108
|
+
name?: string;
|
|
927
1109
|
change?: EventCallback<EvChange>;
|
|
928
1110
|
}
|
|
929
1111
|
|
|
930
|
-
export class Checkbox extends Component<CheckboxProps,CheckBoxEvents> {
|
|
1112
|
+
@class_ns( "x4" ) export class Checkbox extends Component<CheckboxProps,CheckBoxEvents> {
|
|
931
1113
|
_input: Input;
|
|
932
1114
|
constructor( props: CheckboxProps );
|
|
1115
|
+
_on_click( ev: MouseEvent ): void;
|
|
933
1116
|
_on_change( ): void;
|
|
934
1117
|
getCheck( ): void;
|
|
935
1118
|
setCheck( ck: boolean ): void;
|
|
@@ -944,7 +1127,8 @@ declare module 'x4js' {
|
|
|
944
1127
|
color: Color | string;
|
|
945
1128
|
}
|
|
946
1129
|
|
|
947
|
-
export class ColorInput extends HBox<ColorInputProps> {
|
|
1130
|
+
@class_ns( "x4" ) export class ColorInput extends HBox<ColorInputProps> {
|
|
1131
|
+
"$cls-ns": any;
|
|
948
1132
|
constructor( props: ColorInputProps );
|
|
949
1133
|
}
|
|
950
1134
|
|
|
@@ -974,7 +1158,7 @@ declare module 'x4js' {
|
|
|
974
1158
|
sat_change: SatChangeEvent;
|
|
975
1159
|
}
|
|
976
1160
|
|
|
977
|
-
export class Saturation extends Box<BoxProps,CommonEvents> {
|
|
1161
|
+
@class_ns( "x4" ) export class Saturation extends Box<BoxProps,CommonEvents> {
|
|
978
1162
|
mdown: any;
|
|
979
1163
|
irect: Rect;
|
|
980
1164
|
hsv: Hsv;
|
|
@@ -989,7 +1173,7 @@ declare module 'x4js' {
|
|
|
989
1173
|
move( sens: string, delta: number ): void;
|
|
990
1174
|
}
|
|
991
1175
|
|
|
992
|
-
|
|
1176
|
+
@class_ns( "x4" ) class HueSlider extends Box<BoxProps,CommonEvents> {
|
|
993
1177
|
thumb: Component;
|
|
994
1178
|
hsv: Hsv;
|
|
995
1179
|
mdown: any;
|
|
@@ -1002,7 +1186,7 @@ declare module 'x4js' {
|
|
|
1002
1186
|
move( delta: number ): void;
|
|
1003
1187
|
}
|
|
1004
1188
|
|
|
1005
|
-
|
|
1189
|
+
@class_ns( "x4" ) class AlphaSlider extends Box<BoxProps,CommonEvents> {
|
|
1006
1190
|
thumb: Component;
|
|
1007
1191
|
color: Component;
|
|
1008
1192
|
hsv: Hsv;
|
|
@@ -1026,7 +1210,7 @@ declare module 'x4js' {
|
|
|
1026
1210
|
change: ChangeEvent;
|
|
1027
1211
|
}
|
|
1028
1212
|
|
|
1029
|
-
export class ColorPicker extends VBox<ColorPickerProps,ColorPickerChangeEvents> {
|
|
1213
|
+
@class_ns( "x4" ) export class ColorPicker extends VBox<ColorPickerProps,ColorPickerChangeEvents> {
|
|
1030
1214
|
_base: Color;
|
|
1031
1215
|
_sat: Saturation;
|
|
1032
1216
|
_swatch: Component;
|
|
@@ -1039,11 +1223,11 @@ declare module 'x4js' {
|
|
|
1039
1223
|
// ---------------------------------------
|
|
1040
1224
|
// from /src/components/viewport/viewport.ts
|
|
1041
1225
|
|
|
1042
|
-
export class Viewport extends Component {
|
|
1226
|
+
@class_ns( "x4" ) export class Viewport extends Component {
|
|
1043
1227
|
constructor( props: ComponentProps );
|
|
1044
1228
|
}
|
|
1045
1229
|
|
|
1046
|
-
export class ScrollView extends Component {
|
|
1230
|
+
@class_ns( "x4" ) export class ScrollView extends Component {
|
|
1047
1231
|
constructor( props: ComponentProps );
|
|
1048
1232
|
getViewport( ): void;
|
|
1049
1233
|
}
|
|
@@ -1051,18 +1235,11 @@ declare module 'x4js' {
|
|
|
1051
1235
|
// ---------------------------------------
|
|
1052
1236
|
// from /src/components/listbox/listbox.ts
|
|
1053
1237
|
|
|
1054
|
-
enum kbNav {
|
|
1055
|
-
first,
|
|
1056
|
-
prev,
|
|
1057
|
-
next,
|
|
1058
|
-
last,
|
|
1059
|
-
}
|
|
1060
|
-
|
|
1061
1238
|
type ListboxID = number | string;
|
|
1062
1239
|
|
|
1063
1240
|
export interface ListItem {
|
|
1064
1241
|
id: ListboxID;
|
|
1065
|
-
text: string;
|
|
1242
|
+
text: string | UnsafeHtml;
|
|
1066
1243
|
iconId?: string;
|
|
1067
1244
|
data?: any;
|
|
1068
1245
|
cls?: string;
|
|
@@ -1079,30 +1256,39 @@ declare module 'x4js' {
|
|
|
1079
1256
|
interface ListboxProps extends Omit<ComponentProps,'content'> {
|
|
1080
1257
|
items?: ListItem[];
|
|
1081
1258
|
renderer?: ( item: ListItem ) => Component;
|
|
1259
|
+
footer?: Component;
|
|
1082
1260
|
checkable?: true;
|
|
1261
|
+
multisel?: true;
|
|
1262
|
+
dblClick?: EventCallback<EvDblClick>;
|
|
1263
|
+
selectionChange?: EventCallback<EvSelectionChange>;
|
|
1264
|
+
contextMenu?: EventCallback<EvContextMenu>;
|
|
1083
1265
|
}
|
|
1084
1266
|
|
|
1085
|
-
export class Listbox extends Component<ListboxProps,ListboxEvents> {
|
|
1267
|
+
@class_ns( "x4" ) export class Listbox extends Component<ListboxProps,ListboxEvents> {
|
|
1086
1268
|
_view: Viewport;
|
|
1087
|
-
|
|
1088
|
-
|
|
1269
|
+
_lastsel: ListboxID;
|
|
1270
|
+
_multisel: Set<ListboxID>;
|
|
1089
1271
|
_items: ListItem[];
|
|
1090
1272
|
preventFocus: any;
|
|
1091
1273
|
constructor( props: ListboxProps );
|
|
1092
1274
|
_on_key( ev: KeyboardEvent ): void;
|
|
1093
1275
|
navigate( sens: kbNav ): void;
|
|
1094
|
-
|
|
1276
|
+
_itemWithID( id: ListboxID ): void;
|
|
1277
|
+
_on_click( ev: MouseEvent ): void;
|
|
1095
1278
|
_on_ctx_menu( ev: MouseEvent ): void;
|
|
1096
|
-
_selectItem( id: ListboxID, item: Component ): void;
|
|
1097
|
-
|
|
1279
|
+
_selectItem( id: ListboxID, item: Component, mode: "single" | "toggle" ): void;
|
|
1280
|
+
getItem( id: ListboxID ): ListItem;
|
|
1281
|
+
select( ids: ListboxID | ListboxID[], notify: any ): void;
|
|
1098
1282
|
_findItemIndex( id: ListboxID ): void;
|
|
1283
|
+
_clearSelection( ): void;
|
|
1099
1284
|
clearSelection( ): void;
|
|
1100
|
-
setItems( items: ListItem[] ): void;
|
|
1285
|
+
setItems( items: ListItem[], keepSel: any ): void;
|
|
1101
1286
|
renderItem( item: ListItem ): void;
|
|
1102
1287
|
defaultRenderer( item: ListItem ): Component;
|
|
1103
1288
|
filter( filter: string ): void;
|
|
1104
1289
|
appendItem( item: ListItem, prepend: any, select: any ): void;
|
|
1105
1290
|
updateItem( id: any, item: ListItem ): void;
|
|
1291
|
+
getSelection( ): void;
|
|
1106
1292
|
}
|
|
1107
1293
|
|
|
1108
1294
|
// ---------------------------------------
|
|
@@ -1116,22 +1302,29 @@ declare module 'x4js' {
|
|
|
1116
1302
|
items: ListItem[];
|
|
1117
1303
|
}
|
|
1118
1304
|
|
|
1119
|
-
|
|
1305
|
+
@class_ns( "x4" ) export class DropdownList extends Popup<DropdownProps,DropdownEvents> {
|
|
1120
1306
|
_list: Listbox;
|
|
1121
1307
|
constructor( props: DropdownProps, content: ListItem[] );
|
|
1122
1308
|
getList( ): void;
|
|
1123
1309
|
}
|
|
1124
1310
|
|
|
1311
|
+
interface ComboboxEvents extends ComponentEvents {
|
|
1312
|
+
selectionChange: EvSelectionChange;
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1125
1315
|
interface ComboboxProps extends Omit<ComponentProps,"content"> {
|
|
1126
1316
|
label?: string;
|
|
1317
|
+
name?: string;
|
|
1318
|
+
value?: string;
|
|
1127
1319
|
labelWidth?: number | string;
|
|
1128
1320
|
readonly?: boolean;
|
|
1321
|
+
required?: boolean;
|
|
1129
1322
|
items: ListItem[];
|
|
1323
|
+
selectionChange?: EventCallback<EvSelectionChange>;
|
|
1130
1324
|
}
|
|
1131
1325
|
|
|
1132
|
-
export class Combobox extends Component<ComboboxProps> {
|
|
1133
|
-
|
|
1134
|
-
_label: Label;
|
|
1326
|
+
@class_ns( "x4" ) export class Combobox extends Component<ComboboxProps,ComboboxEvents> {
|
|
1327
|
+
_popup: DropdownList;
|
|
1135
1328
|
_input: Input;
|
|
1136
1329
|
_button: Button;
|
|
1137
1330
|
_prevent_close: any;
|
|
@@ -1142,6 +1335,349 @@ declare module 'x4js' {
|
|
|
1142
1335
|
_on_focusout( ): void;
|
|
1143
1336
|
_on_click( ): void;
|
|
1144
1337
|
showDropDown( ): void;
|
|
1338
|
+
setItems( items: ListItem[] ): void;
|
|
1339
|
+
getValue( ): void;
|
|
1340
|
+
setValue( value: string ): void;
|
|
1341
|
+
selectItem( index: ListboxID ): void;
|
|
1342
|
+
getSelection( ): void;
|
|
1343
|
+
_getList( ): void;
|
|
1344
|
+
queryInterface<T extends IComponentInterface>( name: string ): T;
|
|
1345
|
+
}
|
|
1346
|
+
|
|
1347
|
+
// ---------------------------------------
|
|
1348
|
+
// from /src/components/filedrop/filedrop.ts
|
|
1349
|
+
|
|
1350
|
+
type LoadCallback = ( files: FileList ) => void;
|
|
1351
|
+
|
|
1352
|
+
interface FileDialogProps extends ComponentProps {
|
|
1353
|
+
accept: string;
|
|
1354
|
+
multiple?: boolean;
|
|
1355
|
+
callback: LoadCallback;
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
export class FileDialog extends Component {
|
|
1359
|
+
constructor( props: FileDialogProps );
|
|
1360
|
+
showDialog( ): void;
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
export interface EvDropChange extends CoreEvent {
|
|
1364
|
+
files: FileList;
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
interface FileDropEvents extends ComponentEvents {
|
|
1368
|
+
change: EvDropChange;
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
interface FileDropProps extends ComponentProps {
|
|
1372
|
+
label?: string | UnsafeHtml;
|
|
1373
|
+
icon?: string;
|
|
1374
|
+
multiple?: boolean;
|
|
1375
|
+
accept: string;
|
|
1376
|
+
change: EventCallback<EvDropChange>;
|
|
1377
|
+
}
|
|
1378
|
+
|
|
1379
|
+
@class_ns( "x4" ) export class FileDrop extends VBox<FileDropProps,FileDropEvents> {
|
|
1380
|
+
constructor( props: FileDropProps );
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
// ---------------------------------------
|
|
1384
|
+
// from /src/core/core_data.ts
|
|
1385
|
+
|
|
1386
|
+
type DataRecordID = any;
|
|
1387
|
+
|
|
1388
|
+
type DataFieldValue = string | Date | number | boolean;
|
|
1389
|
+
|
|
1390
|
+
type ChangeCallback = (type: string, id?: DataRecordID) => void;
|
|
1391
|
+
|
|
1392
|
+
type CalcCallback = () => string;
|
|
1393
|
+
|
|
1394
|
+
type FieldType = 'string' | 'int' | 'float' | 'date' | 'bool' | 'array' | 'object' | 'any' | 'calc';
|
|
1395
|
+
|
|
1396
|
+
type DataIndex = Uint32Array;
|
|
1397
|
+
|
|
1398
|
+
export interface EvDataChange extends CoreEvent {
|
|
1399
|
+
change_type: 'create' | 'update' | 'delete' | 'data' | 'change';
|
|
1400
|
+
id?: DataRecordID;
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
export interface MetaData {
|
|
1404
|
+
type?: FieldType;
|
|
1405
|
+
prec?: number;
|
|
1406
|
+
required?: boolean;
|
|
1407
|
+
calc?: (rec: DataRecord) => any;
|
|
1408
|
+
model?: DataModel;
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
export interface FieldInfo extends MetaData {
|
|
1412
|
+
name: string;
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1415
|
+
class MetaInfos {
|
|
1416
|
+
name: string;
|
|
1417
|
+
id: string;
|
|
1418
|
+
fields: FieldInfo[];
|
|
1419
|
+
constructor( name: string );
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1422
|
+
interface ModelConstructor {
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
export class DataModel {
|
|
1426
|
+
getFields( ): FieldInfo[];
|
|
1427
|
+
validate( record: DataRecord ): Error[];
|
|
1428
|
+
getFieldIndex( name: string ): number;
|
|
1429
|
+
serialize( input: DataRecord ): any;
|
|
1430
|
+
unSerialize( data: any, id: DataRecordID ): DataRecord;
|
|
1431
|
+
_convertField( field: FieldInfo, input: any ): any;
|
|
1432
|
+
getID( rec: DataRecord ): any;
|
|
1433
|
+
getRaw( name: string | number, rec: DataRecord ): any;
|
|
1434
|
+
getField( name: string, rec: DataRecord ): string;
|
|
1435
|
+
}
|
|
1436
|
+
|
|
1437
|
+
export class DataRecord {
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
interface DataEventMap extends EventMap {
|
|
1441
|
+
change?: EvChange;
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
type DataSolver = ( data: any ) => DataRecord[];
|
|
1445
|
+
|
|
1446
|
+
export interface DataProxyProps {
|
|
1447
|
+
url: string;
|
|
1448
|
+
params?: string[];
|
|
1449
|
+
solver?: DataSolver;
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
export class DataProxy extends CoreElement<DataEventMap> {
|
|
1453
|
+
m_props: DataProxyProps;
|
|
1454
|
+
constructor( props: DataProxyProps );
|
|
1455
|
+
load( url: string ): void;
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
interface DataStoreProps {
|
|
1459
|
+
model: DataModel;
|
|
1460
|
+
data?: any[];
|
|
1461
|
+
url?: string;
|
|
1462
|
+
autoload?: false;
|
|
1463
|
+
solver?: DataSolver;
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1466
|
+
interface DataStoreEventMap extends EventMap {
|
|
1467
|
+
data_change: EvDataChange;
|
|
1468
|
+
}
|
|
1469
|
+
|
|
1470
|
+
export class DataStore extends EventSource<DataStoreEventMap> {
|
|
1471
|
+
m_model: DataModel;
|
|
1472
|
+
m_fields: FieldInfo[];
|
|
1473
|
+
m_records: DataRecord[];
|
|
1474
|
+
m_proxy: DataProxy;
|
|
1475
|
+
m_rec_index: DataIndex;
|
|
1476
|
+
constructor( props: DataStoreProps );
|
|
1477
|
+
load( url: string ): void;
|
|
1478
|
+
reload( ): void;
|
|
1479
|
+
setData( records: any[] ): void;
|
|
1480
|
+
setRawData( records: DataRecord[] ): void;
|
|
1481
|
+
_rebuildIndex( ): void;
|
|
1482
|
+
update( rec: DataRecord ): void;
|
|
1483
|
+
append( rec: DataRecord | any ): void;
|
|
1484
|
+
getMaxId( ): void;
|
|
1485
|
+
delete( id: DataRecordID ): boolean;
|
|
1486
|
+
indexOfId( id: DataRecordID ): number;
|
|
1487
|
+
getById( id: DataRecordID ): DataRecord;
|
|
1488
|
+
getByIndex( index: number ): DataRecord;
|
|
1489
|
+
_getRecord( index: number ): DataRecord;
|
|
1490
|
+
moveTo( other: DataStore ): void;
|
|
1491
|
+
createView( opts: DataViewProps ): DataView;
|
|
1492
|
+
createIndex( filter: FilterInfo ): DataIndex;
|
|
1493
|
+
sortIndex( index: DataIndex, sort: SortProp[] ): void;
|
|
1494
|
+
forEach( cb: ( rec: DataRecord, index: number ) => any ): void;
|
|
1495
|
+
export( ): void;
|
|
1496
|
+
changed( ): void;
|
|
1497
|
+
getModel( ): void;
|
|
1498
|
+
}
|
|
1499
|
+
|
|
1500
|
+
export interface EvViewChange extends CoreEvent {
|
|
1501
|
+
change_type: "change" | "filter" | "sort";
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
interface DataViewEventMap extends EventMap {
|
|
1505
|
+
view_change: EvViewChange;
|
|
1506
|
+
}
|
|
1507
|
+
|
|
1508
|
+
interface DataViewProps {
|
|
1509
|
+
store?: DataStore;
|
|
1510
|
+
filter?: FilterInfo;
|
|
1511
|
+
order?: string | SortProp[] | SortProp;
|
|
1512
|
+
}
|
|
1513
|
+
|
|
1514
|
+
type FilterFunc = ( rec: DataRecord ) => boolean;
|
|
1515
|
+
|
|
1516
|
+
export interface FilterInfo {
|
|
1517
|
+
op: '<' | '<=' | '=' | '>=' | '>' | '<>' | 'empty-result' | FilterFunc;
|
|
1518
|
+
field?: string;
|
|
1519
|
+
value?: string | RegExp;
|
|
1520
|
+
caseSensitive?: boolean;
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1523
|
+
export interface SortProp {
|
|
1524
|
+
field: string;
|
|
1525
|
+
ascending: boolean;
|
|
1526
|
+
numeric?: boolean;
|
|
1527
|
+
}
|
|
1528
|
+
|
|
1529
|
+
export class DataView extends CoreElement<DataViewEventMap> {
|
|
1530
|
+
m_index: DataIndex;
|
|
1531
|
+
m_store: DataStore;
|
|
1532
|
+
m_model: DataModel;
|
|
1533
|
+
m_sort: SortProp[];
|
|
1534
|
+
m_filter: FilterInfo;
|
|
1535
|
+
m_props: DataViewProps;
|
|
1536
|
+
constructor( props: DataViewProps );
|
|
1537
|
+
_storeChange( ev: EvDataChange ): void;
|
|
1538
|
+
filter( filter: FilterInfo ): number;
|
|
1539
|
+
_filter( filter: FilterInfo, notify: boolean ): number;
|
|
1540
|
+
sort( props: SortProp[] ): void;
|
|
1541
|
+
_sort( props: SortProp[], notify: boolean ): void;
|
|
1542
|
+
getStore( ): void;
|
|
1543
|
+
getCount( ): void;
|
|
1544
|
+
indexOfId( id: DataRecordID ): number;
|
|
1545
|
+
getByIndex( index: number ): DataRecord;
|
|
1546
|
+
getIdByIndex( index: number ): DataRecordID;
|
|
1547
|
+
getRecId( rec: DataRecord ): DataRecordID;
|
|
1548
|
+
getById( id: DataRecordID ): DataRecord;
|
|
1549
|
+
getModel( ): void;
|
|
1550
|
+
changed( ): void;
|
|
1551
|
+
forEach( cb: ( rec: DataRecord, index: number ) => any ): void;
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
// ---------------------------------------
|
|
1555
|
+
// from /src/components/image/image.ts
|
|
1556
|
+
|
|
1557
|
+
interface ImageEvents extends ComponentEvents {
|
|
1558
|
+
change: EvDropChange;
|
|
1559
|
+
clear: CoreEvent;
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
export interface ImageProps extends ComponentProps {
|
|
1563
|
+
src: string;
|
|
1564
|
+
fit?: "contain" | "cover" | "fill" | "scale-down";
|
|
1565
|
+
position?: string;
|
|
1566
|
+
lazy?: boolean;
|
|
1567
|
+
alt?: string;
|
|
1568
|
+
draggable?: boolean;
|
|
1569
|
+
candrop?: boolean;
|
|
1570
|
+
accept?: string;
|
|
1571
|
+
change?: EventCallback<EvDropChange>;
|
|
1572
|
+
clear?: EventCallback<CoreEvent>;
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
@class_ns( "x4" ) export class Image<P extends ImageProps = ImageProps, E extends ImageEvents = ImageEvents> extends Component<P,E> {
|
|
1576
|
+
_img: Component;
|
|
1577
|
+
constructor( props: P );
|
|
1578
|
+
setImage( src: string ): void;
|
|
1579
|
+
setBase64( mime: string, base64: string ): void;
|
|
1580
|
+
clear( ): void;
|
|
1581
|
+
}
|
|
1582
|
+
|
|
1583
|
+
// ---------------------------------------
|
|
1584
|
+
// from /src/components/gridview/gridview.ts
|
|
1585
|
+
|
|
1586
|
+
type CellRenderer = (rec: DataRecord) => Component;
|
|
1587
|
+
|
|
1588
|
+
type CellClassifier = (data: any, rec: DataRecord, col: string ) => string;
|
|
1589
|
+
|
|
1590
|
+
type ColType = "number" | "money" | "checkbox" | "date" | "string" | "image" | "percent" | "icon";
|
|
1591
|
+
|
|
1592
|
+
interface GridColumn {
|
|
1593
|
+
id: any;
|
|
1594
|
+
title: string;
|
|
1595
|
+
width: number;
|
|
1596
|
+
fixed?: boolean;
|
|
1597
|
+
flex?: number;
|
|
1598
|
+
align?: 'left' | 'center' | 'right';
|
|
1599
|
+
header_align?: 'left' | 'center' | 'right';
|
|
1600
|
+
renderer?: CellRenderer;
|
|
1601
|
+
formatter?: (input: any) => string;
|
|
1602
|
+
type?: ColType;
|
|
1603
|
+
cls?: string;
|
|
1604
|
+
sortable?: boolean;
|
|
1605
|
+
footer_val?: string;
|
|
1606
|
+
classifier?: CellClassifier;
|
|
1607
|
+
}
|
|
1608
|
+
|
|
1609
|
+
interface GridColumnEx extends GridColumn {
|
|
1610
|
+
sens?: "up" | "dn";
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1613
|
+
export interface GridviewEvents extends ComponentEvents {
|
|
1614
|
+
click?: EvClick;
|
|
1615
|
+
dblClick?: EvDblClick;
|
|
1616
|
+
contextMenu?: EvContextMenu;
|
|
1617
|
+
selectionChange?: EvSelectionChange;
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1620
|
+
export interface GridviewProps extends ComponentProps {
|
|
1621
|
+
footer?: boolean;
|
|
1622
|
+
store: DataStore;
|
|
1623
|
+
columns: GridColumn[];
|
|
1624
|
+
click?: EventCallback<EvClick>;
|
|
1625
|
+
dblClick?: EventCallback<EvDblClick>;
|
|
1626
|
+
contextMenu?: EventCallback<EvContextMenu>;
|
|
1627
|
+
selectionChange?: EventCallback<EvSelectionChange>;
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
@class_ns("x4") export class Gridview<P extends GridviewProps = GridviewProps, E extends GridviewEvents = GridviewEvents> extends Component<P,E> {
|
|
1631
|
+
_dataview: DataView;
|
|
1632
|
+
_datamodel: DataModel;
|
|
1633
|
+
_columns: GridColumnEx[];
|
|
1634
|
+
_lock: number;
|
|
1635
|
+
_dirty: number;
|
|
1636
|
+
_row_height: number;
|
|
1637
|
+
_left: number;
|
|
1638
|
+
_top: number;
|
|
1639
|
+
_body: Component;
|
|
1640
|
+
_viewport: Component;
|
|
1641
|
+
_fheader: Box;
|
|
1642
|
+
_hheader: Box;
|
|
1643
|
+
_vheader: Box;
|
|
1644
|
+
_ffooter: Box;
|
|
1645
|
+
_footer: Box;
|
|
1646
|
+
_vis_rows: Map<number, { h: Component, r: Component }>;
|
|
1647
|
+
_start: number;
|
|
1648
|
+
_end: number;
|
|
1649
|
+
_selection: Set<number>;
|
|
1650
|
+
_num_fmt: any;
|
|
1651
|
+
_mny_fmt: any;
|
|
1652
|
+
_dte_fmt: any;
|
|
1653
|
+
_has_fixed: boolean;
|
|
1654
|
+
_has_footer: boolean;
|
|
1655
|
+
constructor( props: P );
|
|
1656
|
+
_on_key( ev: KeyboardEvent ): void;
|
|
1657
|
+
navigate( sens: kbNav ): void;
|
|
1658
|
+
_scrollToIndex( index: number, block: any ): void;
|
|
1659
|
+
setStore( store: DataStore ): void;
|
|
1660
|
+
getView( ): DataView;
|
|
1661
|
+
lock( lock: boolean ): void;
|
|
1662
|
+
_getColCount( ): void;
|
|
1663
|
+
_getCol( index: number ): void;
|
|
1664
|
+
_buildColHeader( fixed: boolean ): void;
|
|
1665
|
+
_buildColFooter( fixed: boolean ): void;
|
|
1666
|
+
_sortCol( col: number, ascending: boolean ): void;
|
|
1667
|
+
sortCol( colIdx: any, ascending: boolean ): void;
|
|
1668
|
+
_renderCell( rec: DataRecord, column: GridColumnEx, extra_cls: string[] ): ComponentContent;
|
|
1669
|
+
_buildRow( rowid: number, rec: DataRecord, top: number ): void;
|
|
1670
|
+
_buildRowHeader( rowid: number, rec: DataRecord, top: number ): void;
|
|
1671
|
+
_updateFlexs( ): void;
|
|
1672
|
+
_computeFullSize( ): void;
|
|
1673
|
+
_init( ): void;
|
|
1674
|
+
_on_dblclk( e: UIEvent, row: number ): void;
|
|
1675
|
+
_update( force: any ): void;
|
|
1676
|
+
_clearSelection( ): void;
|
|
1677
|
+
_addSelection( rowid: number ): void;
|
|
1678
|
+
getSelection( ): void;
|
|
1679
|
+
getFirstSel( ): void;
|
|
1680
|
+
selectItem( id: any ): void;
|
|
1145
1681
|
}
|
|
1146
1682
|
|
|
1147
1683
|
// ---------------------------------------
|
|
@@ -1158,7 +1694,7 @@ declare module 'x4js' {
|
|
|
1158
1694
|
items: HeaderItem[];
|
|
1159
1695
|
}
|
|
1160
1696
|
|
|
1161
|
-
export class Header extends HBox<HeaderProps> {
|
|
1697
|
+
@class_ns( "x4" ) export class Header extends HBox<HeaderProps> {
|
|
1162
1698
|
_els: Component[];
|
|
1163
1699
|
_vwp: Component;
|
|
1164
1700
|
constructor( props: HeaderProps );
|
|
@@ -1167,21 +1703,52 @@ declare module 'x4js' {
|
|
|
1167
1703
|
}
|
|
1168
1704
|
|
|
1169
1705
|
// ---------------------------------------
|
|
1170
|
-
// from /src/components/
|
|
1706
|
+
// from /src/components/keyboard/keyboard.ts
|
|
1707
|
+
|
|
1708
|
+
interface KeyboardProps extends BoxProps {
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1711
|
+
@class_ns( "x4" ) export class Keyboard extends HBox<KeyboardProps> {
|
|
1712
|
+
mode: "lower" | "upper" | "number" | "date";
|
|
1713
|
+
locale: string;
|
|
1714
|
+
keyboard: Box;
|
|
1715
|
+
visible: boolean;
|
|
1716
|
+
input: HTMLInputElement;
|
|
1717
|
+
constructor( props: KeyboardProps );
|
|
1718
|
+
handleKey( e: UIEvent ): void;
|
|
1719
|
+
_focusNext( ): void;
|
|
1720
|
+
_switchMode( m: "lower" | "upper" | "number" | "date" ): void;
|
|
1721
|
+
_redraw( ): void;
|
|
1722
|
+
_scrollIntoView( el: HTMLElement ): void;
|
|
1723
|
+
_updateVis: any;
|
|
1724
|
+
showOn( el: Component ): void;
|
|
1725
|
+
handleFocus( target: Element, enter: boolean ): void;
|
|
1726
|
+
_insertChar( caret: any, text: string, ch: string ): void;
|
|
1727
|
+
_backspace( caret: any, text: string ): void;
|
|
1728
|
+
_getCaret( ): void;
|
|
1729
|
+
_restoreCaretPos( caret: any ): void;
|
|
1730
|
+
fireKey( key: number, cb: Function ): void;
|
|
1731
|
+
_createContent( ): void;
|
|
1732
|
+
}
|
|
1171
1733
|
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
alt?: string;
|
|
1178
|
-
draggable?: boolean;
|
|
1734
|
+
// ---------------------------------------
|
|
1735
|
+
// from /src/components/link/link.ts
|
|
1736
|
+
|
|
1737
|
+
interface LinkEvents extends ComponentEvents {
|
|
1738
|
+
click: EvClick;
|
|
1179
1739
|
}
|
|
1180
1740
|
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1741
|
+
interface LinkProps extends ComponentProps {
|
|
1742
|
+
href: string;
|
|
1743
|
+
text?: string | UnsafeHtml;
|
|
1744
|
+
icon?: string;
|
|
1745
|
+
click?: EventCallback<EvClick>;
|
|
1746
|
+
}
|
|
1747
|
+
|
|
1748
|
+
@class_ns( "x4" ) export class Link extends Component<LinkProps,LinkEvents> {
|
|
1749
|
+
constructor( props: LinkProps );
|
|
1750
|
+
setText( text: string | UnsafeHtml ): void;
|
|
1751
|
+
_on_click( ev: MouseEvent ): void;
|
|
1185
1752
|
}
|
|
1186
1753
|
|
|
1187
1754
|
// ---------------------------------------
|
|
@@ -1192,11 +1759,24 @@ declare module 'x4js' {
|
|
|
1192
1759
|
click: (button: string) => void;
|
|
1193
1760
|
}
|
|
1194
1761
|
|
|
1195
|
-
export class MessageBox extends Dialog<DialogProps> {
|
|
1196
|
-
|
|
1762
|
+
@class_ns( "x4" ) export class MessageBox extends Dialog<DialogProps> {
|
|
1763
|
+
constructor( props: DialogProps );
|
|
1764
|
+
_create( msg: string | UnsafeHtml, buttons: BtnGroupItem[], title: string ): void;
|
|
1765
|
+
show( msg: string | UnsafeHtml, buttons: BtnGroupItem[], title: string ): MessageBox;
|
|
1766
|
+
showAsync( msg: string | UnsafeHtml, buttons: BtnGroupItem[], title: string ): Promise<string>;
|
|
1767
|
+
}
|
|
1768
|
+
|
|
1769
|
+
@class_ns( "x4" ) export class InputBox extends Dialog<DialogProps> {
|
|
1770
|
+
constructor( props: DialogProps );
|
|
1771
|
+
getValue( ): void;
|
|
1772
|
+
_create( msg: string | UnsafeHtml, value: string, title: string ): void;
|
|
1773
|
+
showAsync( msg: string | UnsafeHtml, value: string, title: string ): Promise<string>;
|
|
1774
|
+
}
|
|
1775
|
+
|
|
1776
|
+
@class_ns( "x4" ) export class PromptBox extends Dialog<DialogProps> {
|
|
1197
1777
|
constructor( props: DialogProps );
|
|
1198
|
-
|
|
1199
|
-
|
|
1778
|
+
_create( msg: string | UnsafeHtml, editor: Component, title: string ): void;
|
|
1779
|
+
showAsync( msg: string | UnsafeHtml, editor: Component, title: string ): Promise<string>;
|
|
1200
1780
|
}
|
|
1201
1781
|
|
|
1202
1782
|
// ---------------------------------------
|
|
@@ -1211,7 +1791,7 @@ declare module 'x4js' {
|
|
|
1211
1791
|
text: string | UnsafeHtml;
|
|
1212
1792
|
}
|
|
1213
1793
|
|
|
1214
|
-
export class Notification extends Popup {
|
|
1794
|
+
@class_ns( "x4" ) export class Notification extends Popup {
|
|
1215
1795
|
constructor( props: NotificationProps );
|
|
1216
1796
|
close( ): void;
|
|
1217
1797
|
display( time_in_s: any ): void;
|
|
@@ -1226,7 +1806,7 @@ declare module 'x4js' {
|
|
|
1226
1806
|
bodyModel?: Constructor<Component>;
|
|
1227
1807
|
}
|
|
1228
1808
|
|
|
1229
|
-
export class Panel extends VBox<PanelProps> {
|
|
1809
|
+
@class_ns( "x4" ) export class Panel extends VBox<PanelProps> {
|
|
1230
1810
|
_title: Component;
|
|
1231
1811
|
_body: Component;
|
|
1232
1812
|
constructor( props: PanelProps );
|
|
@@ -1243,12 +1823,109 @@ declare module 'x4js' {
|
|
|
1243
1823
|
max: number;
|
|
1244
1824
|
}
|
|
1245
1825
|
|
|
1246
|
-
export class Progress extends Component<ProgressProps> {
|
|
1826
|
+
@class_ns( "x4" ) export class Progress extends Component<ProgressProps> {
|
|
1247
1827
|
_bar: Component;
|
|
1248
1828
|
constructor( props: ProgressProps );
|
|
1249
1829
|
setValue( value: number ): void;
|
|
1250
1830
|
}
|
|
1251
1831
|
|
|
1832
|
+
// ---------------------------------------
|
|
1833
|
+
// from /src/components/select/select.ts
|
|
1834
|
+
|
|
1835
|
+
export interface SelectProps extends ComponentProps {
|
|
1836
|
+
name?: string;
|
|
1837
|
+
value: string;
|
|
1838
|
+
items: ListItem[];
|
|
1839
|
+
multiple?: boolean;
|
|
1840
|
+
change?: EventCallback<EvChange>;
|
|
1841
|
+
focus?: EventCallback<EvFocus>;
|
|
1842
|
+
}
|
|
1843
|
+
|
|
1844
|
+
interface SelectEvents extends ComponentEvent {
|
|
1845
|
+
focus: EvFocus;
|
|
1846
|
+
change: EvChange;
|
|
1847
|
+
}
|
|
1848
|
+
|
|
1849
|
+
@class_ns( "x4" ) export class Select extends Component<SelectProps,SelectEvents> {
|
|
1850
|
+
constructor( props: SelectProps );
|
|
1851
|
+
on_focus( ev: FocusEvent, focus_out: boolean ): void;
|
|
1852
|
+
on_change( ev: InputEvent ): void;
|
|
1853
|
+
setItems( items: ListItem[] ): void;
|
|
1854
|
+
getValue( ): void;
|
|
1855
|
+
setValue( value: string ): void;
|
|
1856
|
+
}
|
|
1857
|
+
|
|
1858
|
+
// ---------------------------------------
|
|
1859
|
+
// from /src/components/propgrid/propgrid.ts
|
|
1860
|
+
|
|
1861
|
+
type IValue = boolean | number | string;
|
|
1862
|
+
|
|
1863
|
+
type IValueCB = ( name: string) => IValue;
|
|
1864
|
+
|
|
1865
|
+
export interface PropertyValue {
|
|
1866
|
+
type: 'boolean' | 'number' | 'string' | 'password' | 'options';
|
|
1867
|
+
title?: string;
|
|
1868
|
+
desc?: string;
|
|
1869
|
+
name?: string;
|
|
1870
|
+
value: IValue | IValueCB;
|
|
1871
|
+
options?: ListItem[];
|
|
1872
|
+
callback: ( name: string, value: any ) => void;
|
|
1873
|
+
step?: number;
|
|
1874
|
+
live?: boolean;
|
|
1875
|
+
cls?: string;
|
|
1876
|
+
}
|
|
1877
|
+
|
|
1878
|
+
export interface PropertyGroup {
|
|
1879
|
+
title: string;
|
|
1880
|
+
desc?: string;
|
|
1881
|
+
icon?: string;
|
|
1882
|
+
cls?: string;
|
|
1883
|
+
collapsible?: boolean;
|
|
1884
|
+
items: PropertyValue[];
|
|
1885
|
+
}
|
|
1886
|
+
|
|
1887
|
+
export interface PropertyProps extends ComponentProps {
|
|
1888
|
+
groups: PropertyGroup[];
|
|
1889
|
+
}
|
|
1890
|
+
|
|
1891
|
+
@class_ns( "x4" ) export class PropertyGrid extends VBox {
|
|
1892
|
+
root: Component;
|
|
1893
|
+
groups: PropertyGroup[];
|
|
1894
|
+
constructor( props: PropertyProps );
|
|
1895
|
+
setItems( _grps: PropertyGroup[] ): void;
|
|
1896
|
+
makeGroupHeader( g: PropertyGroup ): void;
|
|
1897
|
+
makePropertyRow( item: PropertyValue ): void;
|
|
1898
|
+
setPropValue( name: string, value: any ): void;
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1901
|
+
// ---------------------------------------
|
|
1902
|
+
// from /src/components/radio/radio.ts
|
|
1903
|
+
|
|
1904
|
+
interface RadioEvents extends ComponentEvents {
|
|
1905
|
+
change?: EvChange;
|
|
1906
|
+
}
|
|
1907
|
+
|
|
1908
|
+
interface RadioProps extends ComponentProps {
|
|
1909
|
+
label: string;
|
|
1910
|
+
icon?: string;
|
|
1911
|
+
name: string;
|
|
1912
|
+
value: number | string;
|
|
1913
|
+
checked?: boolean;
|
|
1914
|
+
change?: EventCallback<EvChange>;
|
|
1915
|
+
}
|
|
1916
|
+
|
|
1917
|
+
@class_ns( "x4" ) export class Radio extends Component<RadioProps,RadioEvents> {
|
|
1918
|
+
_check: HBox;
|
|
1919
|
+
_input: Input;
|
|
1920
|
+
_label: Label;
|
|
1921
|
+
constructor( props: RadioProps );
|
|
1922
|
+
_on_click( ev: MouseEvent ): void;
|
|
1923
|
+
_on_change( ): void;
|
|
1924
|
+
setCheck( ck: boolean ): void;
|
|
1925
|
+
setLabel( text: string ): void;
|
|
1926
|
+
getValue( ): void;
|
|
1927
|
+
}
|
|
1928
|
+
|
|
1252
1929
|
// ---------------------------------------
|
|
1253
1930
|
// from /src/components/rating/rating.ts
|
|
1254
1931
|
|
|
@@ -1264,7 +1941,7 @@ declare module 'x4js' {
|
|
|
1264
1941
|
change?: EventCallback<EvChange>;
|
|
1265
1942
|
}
|
|
1266
1943
|
|
|
1267
|
-
export class Rating extends HBox<RatingProps,RatingEventMap> {
|
|
1944
|
+
@class_ns( "x4" ) export class Rating extends HBox<RatingProps,RatingEventMap> {
|
|
1268
1945
|
m_els: Component[];
|
|
1269
1946
|
m_input: Input;
|
|
1270
1947
|
constructor( props: RatingProps );
|
|
@@ -1277,14 +1954,27 @@ declare module 'x4js' {
|
|
|
1277
1954
|
}
|
|
1278
1955
|
|
|
1279
1956
|
// ---------------------------------------
|
|
1280
|
-
// from /src/components/
|
|
1957
|
+
// from /src/components/tickline/tickline.ts
|
|
1281
1958
|
|
|
1282
|
-
interface
|
|
1283
|
-
|
|
1959
|
+
interface TickLineProps extends ComponentProps {
|
|
1960
|
+
values: number[];
|
|
1961
|
+
min?: number;
|
|
1962
|
+
max?: number;
|
|
1963
|
+
color?: Color;
|
|
1964
|
+
background?: Color;
|
|
1965
|
+
type: "bars" | "line";
|
|
1284
1966
|
}
|
|
1285
1967
|
|
|
1968
|
+
export class TickLine extends Component<TickLineProps> {
|
|
1969
|
+
constructor( props: TickLineProps );
|
|
1970
|
+
update( ): void;
|
|
1971
|
+
}
|
|
1972
|
+
|
|
1973
|
+
// ---------------------------------------
|
|
1974
|
+
// from /src/components/slider/slider.ts
|
|
1975
|
+
|
|
1286
1976
|
interface SliderEvents extends ComponentEvents {
|
|
1287
|
-
change:
|
|
1977
|
+
change: EvChange;
|
|
1288
1978
|
}
|
|
1289
1979
|
|
|
1290
1980
|
interface SliderProps extends ComponentProps {
|
|
@@ -1292,9 +1982,11 @@ declare module 'x4js' {
|
|
|
1292
1982
|
min: number;
|
|
1293
1983
|
max: number;
|
|
1294
1984
|
step?: number;
|
|
1985
|
+
vertical?: boolean;
|
|
1986
|
+
change?: EventCallback<EvChange>;
|
|
1295
1987
|
}
|
|
1296
1988
|
|
|
1297
|
-
export class Slider extends Component<SliderProps,SliderEvents> {
|
|
1989
|
+
@class_ns( "x4" ) export class Slider extends Component<SliderProps,SliderEvents> {
|
|
1298
1990
|
_mdown: any;
|
|
1299
1991
|
_irect: Rect;
|
|
1300
1992
|
_thumb: Component;
|
|
@@ -1302,10 +1994,14 @@ declare module 'x4js' {
|
|
|
1302
1994
|
_range: Input;
|
|
1303
1995
|
constructor( props: SliderProps );
|
|
1304
1996
|
_on_mousedown( ev: PointerEvent ): void;
|
|
1997
|
+
_getMinMax( ): void;
|
|
1305
1998
|
_on_mousemove( ev: PointerEvent ): void;
|
|
1306
1999
|
_update( ): void;
|
|
1307
2000
|
_on_mouseup( ev: PointerEvent ): void;
|
|
1308
2001
|
_on_key( ev: KeyboardEvent ): void;
|
|
2002
|
+
setMin( min: number ): void;
|
|
2003
|
+
setMax( max: number ): void;
|
|
2004
|
+
setValue( v: number ): void;
|
|
1309
2005
|
}
|
|
1310
2006
|
|
|
1311
2007
|
// ---------------------------------------
|
|
@@ -1317,7 +2013,7 @@ declare module 'x4js' {
|
|
|
1317
2013
|
value?: string;
|
|
1318
2014
|
}
|
|
1319
2015
|
|
|
1320
|
-
export class Switch extends HBox<SwitchProps> {
|
|
2016
|
+
@class_ns( "x4" ) export class Switch extends HBox<SwitchProps> {
|
|
1321
2017
|
constructor( props: SwitchProps );
|
|
1322
2018
|
}
|
|
1323
2019
|
|
|
@@ -1328,10 +2024,10 @@ declare module 'x4js' {
|
|
|
1328
2024
|
name: string;
|
|
1329
2025
|
title: string;
|
|
1330
2026
|
icon?: string;
|
|
1331
|
-
|
|
2027
|
+
content: Component;
|
|
1332
2028
|
}
|
|
1333
2029
|
|
|
1334
|
-
|
|
2030
|
+
@class_ns( "x4" ) class CTab extends Button {
|
|
1335
2031
|
constructor( props: ButtonProps, item: TabItem );
|
|
1336
2032
|
}
|
|
1337
2033
|
|
|
@@ -1347,12 +2043,14 @@ declare module 'x4js' {
|
|
|
1347
2043
|
click: TablistClickEvent;
|
|
1348
2044
|
}
|
|
1349
2045
|
|
|
1350
|
-
|
|
2046
|
+
@class_ns( "x4" ) class CTabList extends HBox<TablistProps,TablistEvents> {
|
|
1351
2047
|
_selitem: Button;
|
|
1352
|
-
|
|
1353
|
-
constructor( props: TablistProps, content: TabItem[] );
|
|
2048
|
+
constructor( props: TablistProps, items: TabItem[] );
|
|
1354
2049
|
_on_click( ev: EvClick ): void;
|
|
1355
2050
|
select( name: string ): void;
|
|
2051
|
+
setItems( items: TabItem[ ] ): void;
|
|
2052
|
+
addItem( tab: TabItem ): void;
|
|
2053
|
+
getTabCount( ): void;
|
|
1356
2054
|
}
|
|
1357
2055
|
|
|
1358
2056
|
interface TabsProps extends Omit<ComponentProps,"content"> {
|
|
@@ -1360,12 +2058,14 @@ declare module 'x4js' {
|
|
|
1360
2058
|
items: TabItem[];
|
|
1361
2059
|
}
|
|
1362
2060
|
|
|
1363
|
-
export class Tabs extends VBox<TabsProps> {
|
|
2061
|
+
@class_ns( "x4" ) export class Tabs extends VBox<TabsProps> {
|
|
1364
2062
|
_list: CTabList;
|
|
1365
2063
|
_stack: StackBox;
|
|
1366
2064
|
constructor( props: TabsProps );
|
|
1367
2065
|
selectTab( name: string ): void;
|
|
1368
2066
|
_onclick( ev: TablistClickEvent ): void;
|
|
2067
|
+
getTab( name: string ): void;
|
|
2068
|
+
addTab( item: TabItem ): void;
|
|
1369
2069
|
}
|
|
1370
2070
|
|
|
1371
2071
|
// ---------------------------------------
|
|
@@ -1375,11 +2075,22 @@ declare module 'x4js' {
|
|
|
1375
2075
|
label?: string;
|
|
1376
2076
|
value?: string;
|
|
1377
2077
|
resize?: boolean;
|
|
2078
|
+
readonly?: boolean;
|
|
2079
|
+
}
|
|
2080
|
+
|
|
2081
|
+
class SimpleTextArea extends Component {
|
|
2082
|
+
constructor( props: TextAreaProps );
|
|
2083
|
+
setText( text: string ): void;
|
|
2084
|
+
getText( ): void;
|
|
2085
|
+
queryInterface<T>( name: string ): T;
|
|
1378
2086
|
}
|
|
1379
2087
|
|
|
1380
|
-
export class TextArea extends VBox {
|
|
1381
|
-
_input:
|
|
2088
|
+
@class_ns( "x4" ) export class TextArea extends VBox {
|
|
2089
|
+
_input: SimpleTextArea;
|
|
1382
2090
|
constructor( props: TextAreaProps );
|
|
2091
|
+
setText( text: string ): void;
|
|
2092
|
+
getText( ): void;
|
|
2093
|
+
queryInterface<T>( name: string ): T;
|
|
1383
2094
|
}
|
|
1384
2095
|
|
|
1385
2096
|
// ---------------------------------------
|
|
@@ -1389,22 +2100,31 @@ declare module 'x4js' {
|
|
|
1389
2100
|
label: string | UnsafeHtml;
|
|
1390
2101
|
labelWidth?: number;
|
|
1391
2102
|
inputId?: string;
|
|
1392
|
-
type?: "text" | "email" | "password";
|
|
2103
|
+
type?: "text" | "email" | "password" | "date" | "number";
|
|
2104
|
+
name?: string;
|
|
1393
2105
|
readonly?: boolean;
|
|
1394
2106
|
required?: boolean;
|
|
1395
2107
|
value: string | number;
|
|
1396
2108
|
placeholder?: string;
|
|
2109
|
+
autofocus?: boolean;
|
|
1397
2110
|
inputGadgets?: Component[];
|
|
2111
|
+
inputAttrs?: any;
|
|
2112
|
+
focus?: EventCallback<EvFocus>;
|
|
2113
|
+
change?: EventCallback<EvChange>;
|
|
1398
2114
|
}
|
|
1399
2115
|
|
|
1400
|
-
export class TextEdit extends HBox {
|
|
2116
|
+
@class_ns( "x4" ) export class TextEdit extends HBox {
|
|
2117
|
+
input: Input;
|
|
1401
2118
|
constructor( props: TextEditProps );
|
|
2119
|
+
getValue( ): void;
|
|
2120
|
+
setValue( value: string ): void;
|
|
2121
|
+
getInput( ): void;
|
|
1402
2122
|
}
|
|
1403
2123
|
|
|
1404
2124
|
// ---------------------------------------
|
|
1405
2125
|
// from /src/components/tooltips/tooltips.ts
|
|
1406
2126
|
|
|
1407
|
-
|
|
2127
|
+
@class_ns( "x4" ) class Tooltip extends Popup {
|
|
1408
2128
|
constructor( props: PopupProps );
|
|
1409
2129
|
setText( text: string|UnsafeHtml ): void;
|
|
1410
2130
|
}
|
|
@@ -1431,6 +2151,7 @@ declare module 'x4js' {
|
|
|
1431
2151
|
|
|
1432
2152
|
interface TreeviewProps extends Omit<ComponentProps,"content"> {
|
|
1433
2153
|
items: TreeItem[];
|
|
2154
|
+
footer?: Component;
|
|
1434
2155
|
}
|
|
1435
2156
|
|
|
1436
2157
|
interface ChangeEvent extends ComponentEvent {
|
|
@@ -1438,10 +2159,10 @@ declare module 'x4js' {
|
|
|
1438
2159
|
}
|
|
1439
2160
|
|
|
1440
2161
|
interface TreeviewEvents extends ComponentEvents {
|
|
1441
|
-
|
|
2162
|
+
selectionChange?: EvSelectionChange;
|
|
1442
2163
|
}
|
|
1443
2164
|
|
|
1444
|
-
|
|
2165
|
+
@class_ns( "x4" ) class CTreeViewItem extends Box {
|
|
1445
2166
|
_item: TreeItem;
|
|
1446
2167
|
_label: Component;
|
|
1447
2168
|
_icon: Icon;
|
|
@@ -1452,7 +2173,8 @@ declare module 'x4js' {
|
|
|
1452
2173
|
setItems( items: TreeItem[ ] ): void;
|
|
1453
2174
|
}
|
|
1454
2175
|
|
|
1455
|
-
export class Treeview extends Component<TreeviewProps,TreeviewEvents> {
|
|
2176
|
+
@class_ns( "x4" ) export class Treeview extends Component<TreeviewProps,TreeviewEvents> {
|
|
2177
|
+
_view: Viewport;
|
|
1456
2178
|
_selection: ListboxID;
|
|
1457
2179
|
_selitem: Component;
|
|
1458
2180
|
_items: TreeItem[];
|
|
@@ -1466,7 +2188,11 @@ declare module 'x4js' {
|
|
|
1466
2188
|
_selectItem( id: ListboxID, item: Component ): void;
|
|
1467
2189
|
_findItem( id: ListboxID ): void;
|
|
1468
2190
|
clearSelection( ): void;
|
|
2191
|
+
getSelection( ): void;
|
|
1469
2192
|
}
|
|
1470
2193
|
|
|
2194
|
+
// ---------------------------------------
|
|
2195
|
+
// from /src/components/components.ts
|
|
2196
|
+
|
|
1471
2197
|
}
|
|
1472
2198
|
|