x4js 1.5.40 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/changelog.txt +23 -0
- package/lib/README.txt +1 -1
- package/lib/changelog.txt +3 -0
- package/lib/cjs/{index.js → x4js.js} +3 -3
- package/lib/cjs/x4js.js.map +7 -0
- package/lib/esm/{index.mjs → x4js.mjs} +3 -3
- package/lib/esm/{index.mjs.map → x4js.mjs.map} +1 -1
- package/lib/src/MIT-license.md +1 -1
- package/lib/src/action.ts +1 -1
- package/lib/src/app_sockets.ts +1 -1
- package/lib/src/application.ts +1 -1
- package/lib/src/autocomplete.ts +1 -1
- package/lib/src/base64.ts +1 -1
- package/lib/src/base_component.ts +1 -1
- package/lib/src/button.ts +1 -1
- package/lib/src/calendar.ts +1 -1
- package/lib/src/canvas.ts +1 -1
- package/lib/src/cardview.ts +1 -1
- package/lib/src/checkbox.ts +1 -1
- package/lib/src/color.ts +1 -1
- package/lib/src/colorpicker.ts +1 -1
- package/lib/src/combobox.ts +1 -1
- package/lib/src/component.ts +1 -1
- package/lib/src/copyright.txt +1 -1
- package/lib/src/datastore.ts +1 -1
- package/lib/src/dialog.ts +1 -1
- package/lib/src/dom_events.ts +1 -1
- package/lib/src/drag_manager.ts +1 -1
- package/lib/src/drawtext.ts +1 -1
- package/lib/src/fileupload.ts +1 -1
- package/lib/src/form.ts +1 -1
- package/lib/src/formatters.ts +1 -1
- package/lib/src/gridview.ts +1 -1
- package/lib/src/i18n.ts +1 -1
- package/lib/src/icon.ts +1 -1
- package/lib/src/image.ts +1 -1
- package/lib/src/index.ts +1 -1
- package/lib/src/input.ts +1 -1
- package/lib/src/label.ts +1 -1
- package/lib/src/layout.ts +1 -1
- package/lib/src/link.ts +1 -1
- package/lib/src/listview.ts +1 -1
- package/lib/src/md5.ts +1 -1
- package/lib/src/menu.ts +1 -1
- package/lib/src/messagebox.ts +1 -1
- package/lib/src/panel.ts +1 -1
- package/lib/src/popup.ts +1 -1
- package/lib/src/property_editor.ts +1 -1
- package/lib/src/radiobtn.ts +1 -1
- package/lib/src/rating.ts +1 -1
- package/lib/src/request.ts +1 -1
- package/lib/src/router.ts +1 -1
- package/lib/src/settings.ts +1 -1
- package/lib/src/sidebarview.ts +1 -1
- package/lib/src/spreadsheet.ts +1 -1
- package/lib/src/styles.ts +1 -1
- package/lib/src/svgcomponent.ts +1 -1
- package/lib/src/tabbar.ts +1 -1
- package/lib/src/tabview.ts +1 -1
- package/lib/src/textarea.ts +1 -1
- package/lib/src/textedit.ts +1 -1
- package/lib/src/toaster.ts +1 -1
- package/lib/src/tools.ts +1 -1
- package/lib/src/tooltips.ts +1 -1
- package/lib/src/treeview.ts +1 -1
- package/lib/src/version.ts +2 -2
- package/lib/src/x4.less +1 -1
- package/lib/src/x4dom.ts +1 -1
- package/lib/src/x4events.ts +1 -1
- package/lib/src/x4js.ts +89 -0
- package/lib/src/x4react.ts +1 -1
- package/lib/styles/x4.css +1 -1
- package/lib/styles/x4.less +1 -1
- package/lib/types/x4js.d.ts +6762 -0
- package/package.json +10 -8
- package/lib/cjs/index.js.map +0 -7
- package/lib/esm/index.js.map +0 -7
- package/lib/types/action.d.ts +0 -57
- package/lib/types/app_sockets.d.ts +0 -29
- package/lib/types/application.d.ts +0 -108
- package/lib/types/autocomplete.d.ts +0 -63
- package/lib/types/base_component.d.ts +0 -88
- package/lib/types/button.d.ts +0 -151
- package/lib/types/calendar.d.ts +0 -82
- package/lib/types/canvas.d.ts +0 -92
- package/lib/types/cardview.d.ts +0 -87
- package/lib/types/checkbox.d.ts +0 -77
- package/lib/types/color.d.ts +0 -148
- package/lib/types/colorpicker.d.ts +0 -107
- package/lib/types/combobox.d.ts +0 -111
- package/lib/types/component.d.ts +0 -603
- package/lib/types/datastore.d.ts +0 -396
- package/lib/types/dialog.d.ts +0 -175
- package/lib/types/dom_events.d.ts +0 -302
- package/lib/types/drag_manager.d.ts +0 -58
- package/lib/types/drawtext.d.ts +0 -48
- package/lib/types/fileupload.d.ts +0 -64
- package/lib/types/form.d.ts +0 -142
- package/lib/types/formatters.d.ts +0 -35
- package/lib/types/gridview.d.ts +0 -175
- package/lib/types/i18n.d.ts +0 -73
- package/lib/types/icon.d.ts +0 -71
- package/lib/types/image.d.ts +0 -56
- package/lib/types/index.d.ts +0 -84
- package/lib/types/input.d.ts +0 -97
- package/lib/types/label.d.ts +0 -67
- package/lib/types/layout.d.ts +0 -89
- package/lib/types/link.d.ts +0 -50
- package/lib/types/listview.d.ts +0 -178
- package/lib/types/md5.d.ts +0 -61
- package/lib/types/menu.d.ts +0 -130
- package/lib/types/messagebox.d.ts +0 -69
- package/lib/types/panel.d.ts +0 -47
- package/lib/types/popup.d.ts +0 -75
- package/lib/types/property_editor.d.ts +0 -71
- package/lib/types/radiobtn.d.ts +0 -73
- package/lib/types/rating.d.ts +0 -53
- package/lib/types/request.d.ts +0 -52
- package/lib/types/router.d.ts +0 -67
- package/lib/types/settings.d.ts +0 -37
- package/lib/types/sidebarview.d.ts +0 -51
- package/lib/types/spreadsheet.d.ts +0 -222
- package/lib/types/styles.d.ts +0 -85
- package/lib/types/svgcomponent.d.ts +0 -216
- package/lib/types/tabbar.d.ts +0 -58
- package/lib/types/tabview.d.ts +0 -49
- package/lib/types/textarea.d.ts +0 -77
- package/lib/types/textedit.d.ts +0 -126
- package/lib/types/toaster.d.ts +0 -42
- package/lib/types/tools.d.ts +0 -394
- package/lib/types/tooltips.d.ts +0 -46
- package/lib/types/treeview.d.ts +0 -144
- package/lib/types/version.d.ts +0 -29
- package/lib/types/x4dom.d.ts +0 -49
- package/lib/types/x4events.d.ts +0 -269
- package/lib/types/x4react.d.ts +0 -41
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ___ ___ __
|
|
3
|
-
* \ \_/ / / _
|
|
4
|
-
* \ / /_| |_
|
|
5
|
-
* / _ \____ _|
|
|
6
|
-
* /__/ \__\ |_|
|
|
7
|
-
*
|
|
8
|
-
* @file spreadsheet.ts
|
|
9
|
-
* @author Etienne Cochard
|
|
10
|
-
*
|
|
11
|
-
* Copyright (c) 2019-2022 R-libre ingenierie
|
|
12
|
-
*
|
|
13
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
14
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
15
|
-
* in the Software without restriction, including without limitation the rights
|
|
16
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
17
|
-
* of the Software, and to permit persons to whom the Software is furnished to do so,
|
|
18
|
-
* subject to the following conditions:
|
|
19
|
-
* The above copyright notice and this permission notice shall be included in all copies
|
|
20
|
-
* or substantial portions of the Software.
|
|
21
|
-
*
|
|
22
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
23
|
-
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
24
|
-
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
25
|
-
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
26
|
-
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
27
|
-
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
28
|
-
**/
|
|
29
|
-
import { Component, EvDblClick, ContainerEventMap, ContainerProps } from './component';
|
|
30
|
-
import { InputProps } from './input';
|
|
31
|
-
import { VLayout } from './layout';
|
|
32
|
-
import { FormatFunc } from './formatters';
|
|
33
|
-
import { EvContextMenu, EvChange, EvSelectionChange, EventCallback } from './x4events';
|
|
34
|
-
export interface EditorFactory {
|
|
35
|
-
(props: InputProps, row: number, col: number): Component;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
*
|
|
39
|
-
*/
|
|
40
|
-
export interface ColProp {
|
|
41
|
-
title: string;
|
|
42
|
-
width: number;
|
|
43
|
-
formatter?: string;
|
|
44
|
-
align?: string;
|
|
45
|
-
cls?: string;
|
|
46
|
-
min_width?: number;
|
|
47
|
-
renderer?: FormatFunc;
|
|
48
|
-
createEditor?: EditorFactory;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
*
|
|
52
|
-
*/
|
|
53
|
-
export interface SpreadsheetEventSet extends ContainerEventMap {
|
|
54
|
-
change?: EvChange;
|
|
55
|
-
dblClick?: EvDblClick;
|
|
56
|
-
selectionChange?: EvSelectionChange;
|
|
57
|
-
contextMenu?: EvContextMenu;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
*
|
|
61
|
-
*/
|
|
62
|
-
export interface SpreadsheetProps extends ContainerProps {
|
|
63
|
-
columns: ColProp[];
|
|
64
|
-
maxrows?: number;
|
|
65
|
-
autoedit?: boolean;
|
|
66
|
-
change?: EventCallback<EvChange>;
|
|
67
|
-
dblClick?: EventCallback<EvDblClick>;
|
|
68
|
-
selectionChange?: EventCallback<EvSelectionChange>;
|
|
69
|
-
contextMenu?: EventCallback<EvContextMenu>;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
*
|
|
73
|
-
*/
|
|
74
|
-
export declare class Spreadsheet extends VLayout<SpreadsheetProps, SpreadsheetEventSet> {
|
|
75
|
-
private m_columns;
|
|
76
|
-
private m_row_limit;
|
|
77
|
-
private m_cells_data;
|
|
78
|
-
private m_rows_data;
|
|
79
|
-
protected m_view: Component;
|
|
80
|
-
protected m_container: Component;
|
|
81
|
-
protected m_header: Component;
|
|
82
|
-
private m_itemHeight;
|
|
83
|
-
private m_topIndex;
|
|
84
|
-
private m_visible_cells;
|
|
85
|
-
private m_row_count;
|
|
86
|
-
private m_selection;
|
|
87
|
-
private m_editor;
|
|
88
|
-
private m_autoedit;
|
|
89
|
-
private m_lockupdate;
|
|
90
|
-
private m_auto_row_count;
|
|
91
|
-
private m_recycler;
|
|
92
|
-
private m_used_cells;
|
|
93
|
-
constructor(props: SpreadsheetProps);
|
|
94
|
-
componentCreated(): void;
|
|
95
|
-
setColWidth(col: number, width: number): void;
|
|
96
|
-
getColWidth(col: number): number;
|
|
97
|
-
setColTitle(col: number, title: string): void;
|
|
98
|
-
/**
|
|
99
|
-
* reset the spreadsheet
|
|
100
|
-
* @param columns
|
|
101
|
-
*/
|
|
102
|
-
reset(columns?: ColProp[]): void;
|
|
103
|
-
/**
|
|
104
|
-
* insert a row
|
|
105
|
-
* @param before row number before wich insert the new row
|
|
106
|
-
*/
|
|
107
|
-
insertRow(before: number): void;
|
|
108
|
-
/**
|
|
109
|
-
* remove a row
|
|
110
|
-
* @param rowtodel row number to remove
|
|
111
|
-
*/
|
|
112
|
-
deleteRow(rowtodel: number): void;
|
|
113
|
-
/**
|
|
114
|
-
* insert a new column
|
|
115
|
-
* @param before column index before to insert the new column or <0 to append
|
|
116
|
-
*/
|
|
117
|
-
insertCol(before: number, column: ColProp): void;
|
|
118
|
-
/**
|
|
119
|
-
* remove a column
|
|
120
|
-
* @param coltodel
|
|
121
|
-
*/
|
|
122
|
-
deleteCol(coltodel: number): void;
|
|
123
|
-
/**
|
|
124
|
-
*
|
|
125
|
-
* @param row
|
|
126
|
-
* @param col
|
|
127
|
-
*/
|
|
128
|
-
private _getCellData;
|
|
129
|
-
private _focus;
|
|
130
|
-
private _ctxMenu;
|
|
131
|
-
/** @ignore */
|
|
132
|
-
render(): void;
|
|
133
|
-
/**
|
|
134
|
-
*
|
|
135
|
-
*/
|
|
136
|
-
private _on_col_resize;
|
|
137
|
-
/**
|
|
138
|
-
* compute misc dimensions
|
|
139
|
-
* - item height
|
|
140
|
-
* - scroll width
|
|
141
|
-
*/
|
|
142
|
-
private _computeItemHeight;
|
|
143
|
-
/**
|
|
144
|
-
* compute columns widths
|
|
145
|
-
* use col.width for fixed size columns
|
|
146
|
-
* if col.width < 0 that mean that this is a proportion of the remaining space
|
|
147
|
-
*/
|
|
148
|
-
private _calcColWidths;
|
|
149
|
-
/**
|
|
150
|
-
* create a cell (component)
|
|
151
|
-
* and append it to the parent view
|
|
152
|
-
* if a cell was reviously recyled, use it
|
|
153
|
-
*/
|
|
154
|
-
private _createCell;
|
|
155
|
-
/**
|
|
156
|
-
* build cells of the spreadsheet
|
|
157
|
-
* cells are recycled when scrolling,
|
|
158
|
-
* only visibles cells exists
|
|
159
|
-
*/
|
|
160
|
-
private _buildItems;
|
|
161
|
-
/** @ignore */
|
|
162
|
-
private _itemClick;
|
|
163
|
-
private _itemDblClick;
|
|
164
|
-
/**
|
|
165
|
-
*
|
|
166
|
-
* @param rowIdx
|
|
167
|
-
* @param colIdx
|
|
168
|
-
* @param scrollIntoView
|
|
169
|
-
*/
|
|
170
|
-
protected _selectItem(rowIdx: number, colIdx: number, scrollIntoView?: boolean): void;
|
|
171
|
-
private _scrollIntoView;
|
|
172
|
-
/**
|
|
173
|
-
*
|
|
174
|
-
* @param row
|
|
175
|
-
* @param col
|
|
176
|
-
*/
|
|
177
|
-
private _findItem;
|
|
178
|
-
/**
|
|
179
|
-
*
|
|
180
|
-
*/
|
|
181
|
-
private _updateScroll;
|
|
182
|
-
/**
|
|
183
|
-
*
|
|
184
|
-
* @param event
|
|
185
|
-
* @param t
|
|
186
|
-
*/
|
|
187
|
-
private _moveSel;
|
|
188
|
-
private _handleKey;
|
|
189
|
-
private _keyPress;
|
|
190
|
-
/**
|
|
191
|
-
* return the selection
|
|
192
|
-
* { row, col }
|
|
193
|
-
*/
|
|
194
|
-
getSelection(): {
|
|
195
|
-
row: number;
|
|
196
|
-
col: number;
|
|
197
|
-
};
|
|
198
|
-
select(row: number, col: number, scrollIntoView?: boolean): void;
|
|
199
|
-
/**
|
|
200
|
-
* return the row count
|
|
201
|
-
*/
|
|
202
|
-
rowCount(): number;
|
|
203
|
-
/**
|
|
204
|
-
* return the maximum row index filled with something
|
|
205
|
-
*/
|
|
206
|
-
getMaxRowCount(): number;
|
|
207
|
-
getColCount(): number;
|
|
208
|
-
setRowStyle(row: number, cls: string): void;
|
|
209
|
-
getRowStyle(row: number): string;
|
|
210
|
-
setCellStyle(row: number, col: number, cls: string): void;
|
|
211
|
-
getCellText(row: number, col: number): string;
|
|
212
|
-
getCellNumber(row: number, col: number): number;
|
|
213
|
-
clearRow(row: number): void;
|
|
214
|
-
clearCell(row: number, col: number): void;
|
|
215
|
-
editCurCell(forceText?: string): void;
|
|
216
|
-
editCell(row: number, col: number, forcedText?: string): void;
|
|
217
|
-
_setupEditor(): void;
|
|
218
|
-
killEditor(save: boolean): void;
|
|
219
|
-
clearData(): void;
|
|
220
|
-
setCellText(row: number, col: number, value: string): void;
|
|
221
|
-
lockUpdate(start: boolean): void;
|
|
222
|
-
}
|
package/lib/types/styles.d.ts
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ___ ___ __
|
|
3
|
-
* \ \_/ / / _
|
|
4
|
-
* \ / /_| |_
|
|
5
|
-
* / _ \____ _|
|
|
6
|
-
* /__/ \__\ |_|
|
|
7
|
-
*
|
|
8
|
-
* @file styles.ts
|
|
9
|
-
* @author Etienne Cochard
|
|
10
|
-
*
|
|
11
|
-
* Copyright (c) 2019-2022 R-libre ingenierie
|
|
12
|
-
*
|
|
13
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
14
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
15
|
-
* in the Software without restriction, including without limitation the rights
|
|
16
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
17
|
-
* of the Software, and to permit persons to whom the Software is furnished to do so,
|
|
18
|
-
* subject to the following conditions:
|
|
19
|
-
* The above copyright notice and this permission notice shall be included in all copies
|
|
20
|
-
* or substantial portions of the Software.
|
|
21
|
-
*
|
|
22
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
23
|
-
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
24
|
-
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
25
|
-
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
26
|
-
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
27
|
-
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
28
|
-
**/
|
|
29
|
-
/**
|
|
30
|
-
* -- [ @STYLESHEET ] -----------------------------------------------------------------
|
|
31
|
-
*/
|
|
32
|
-
export declare class Stylesheet {
|
|
33
|
-
private m_sheet;
|
|
34
|
-
private m_rules;
|
|
35
|
-
constructor();
|
|
36
|
-
/**
|
|
37
|
-
* add a new rule to the style sheet
|
|
38
|
-
* @param {string} name - internal rule name
|
|
39
|
-
* @param {string} definition - css definition of the rule
|
|
40
|
-
* @example
|
|
41
|
-
* setRule('xbody', "body { background-color: #ff0000; }" );
|
|
42
|
-
*/
|
|
43
|
-
setRule(name: string, definition: any): void;
|
|
44
|
-
/**
|
|
45
|
-
* return the style variable value
|
|
46
|
-
* @param name - variable name
|
|
47
|
-
* @example
|
|
48
|
-
* ```
|
|
49
|
-
* let color = Component.getCss( ).getVar( 'button-color' );
|
|
50
|
-
* ```
|
|
51
|
-
*/
|
|
52
|
-
static getVar(name: string): any;
|
|
53
|
-
static guid: number;
|
|
54
|
-
static doc_style: CSSStyleDeclaration;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* -- [ @CSSPARSER ] -----------------------------------------------------------------
|
|
58
|
-
*
|
|
59
|
-
* adaptation of jss-for-node-js
|
|
60
|
-
*/
|
|
61
|
-
export declare class CSSParser {
|
|
62
|
-
private result;
|
|
63
|
-
parse(css: any): string;
|
|
64
|
-
static mk_string(rules: any): string;
|
|
65
|
-
private parse_json;
|
|
66
|
-
private makePropertyName;
|
|
67
|
-
private makeSelectorName;
|
|
68
|
-
addProperty(scope: string, property: string, value: any): void;
|
|
69
|
-
}
|
|
70
|
-
export declare class ComputedStyle {
|
|
71
|
-
m_style: CSSStyleDeclaration;
|
|
72
|
-
constructor(style: CSSStyleDeclaration);
|
|
73
|
-
/**
|
|
74
|
-
* return the raw value
|
|
75
|
-
*/
|
|
76
|
-
value(name: string): string;
|
|
77
|
-
/**
|
|
78
|
-
* return the interpreted value
|
|
79
|
-
*/
|
|
80
|
-
parse(name: string): number;
|
|
81
|
-
/**
|
|
82
|
-
*
|
|
83
|
-
*/
|
|
84
|
-
get style(): CSSStyleDeclaration;
|
|
85
|
-
}
|
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ___ ___ __
|
|
3
|
-
* \ \_/ / / _
|
|
4
|
-
* \ / /_| |_
|
|
5
|
-
* / _ \____ _|
|
|
6
|
-
* /__/ \__\ |_|
|
|
7
|
-
*
|
|
8
|
-
* @file svgcomponent.ts
|
|
9
|
-
* @author Etienne Cochard
|
|
10
|
-
*
|
|
11
|
-
* Copyright (c) 2019-2022 R-libre ingenierie
|
|
12
|
-
*
|
|
13
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
14
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
15
|
-
* in the Software without restriction, including without limitation the rights
|
|
16
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
17
|
-
* of the Software, and to permit persons to whom the Software is furnished to do so,
|
|
18
|
-
* subject to the following conditions:
|
|
19
|
-
* The above copyright notice and this permission notice shall be included in all copies
|
|
20
|
-
* or substantial portions of the Software.
|
|
21
|
-
*
|
|
22
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
23
|
-
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
24
|
-
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
25
|
-
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
26
|
-
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
27
|
-
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
28
|
-
**/
|
|
29
|
-
import { Component, CProps } from './component';
|
|
30
|
-
/**
|
|
31
|
-
*
|
|
32
|
-
*/
|
|
33
|
-
export declare abstract class SVGItem {
|
|
34
|
-
private m_tag;
|
|
35
|
-
private m_attrs;
|
|
36
|
-
private m_style;
|
|
37
|
-
constructor(tag: string);
|
|
38
|
-
/**
|
|
39
|
-
* render the item
|
|
40
|
-
* @returns
|
|
41
|
-
*/
|
|
42
|
-
render(): string;
|
|
43
|
-
/**
|
|
44
|
-
* change the stroke color
|
|
45
|
-
* @param color
|
|
46
|
-
*/
|
|
47
|
-
stroke(color: string, width?: number): this;
|
|
48
|
-
/**
|
|
49
|
-
* change the stroke width
|
|
50
|
-
* @param width
|
|
51
|
-
*/
|
|
52
|
-
strokeWidth(width: number): this;
|
|
53
|
-
/**
|
|
54
|
-
* change the fill color
|
|
55
|
-
* @param color
|
|
56
|
-
*/
|
|
57
|
-
fill(color: string): this;
|
|
58
|
-
/**
|
|
59
|
-
* define a new attribute
|
|
60
|
-
* @param name attibute name
|
|
61
|
-
* @param value attribute value
|
|
62
|
-
* @returns this
|
|
63
|
-
*/
|
|
64
|
-
attr(name: string, value: string): this;
|
|
65
|
-
style(name: string, value: string | number): this;
|
|
66
|
-
/**
|
|
67
|
-
* add a class
|
|
68
|
-
* @param name class name to add
|
|
69
|
-
*/
|
|
70
|
-
class(name: string): this;
|
|
71
|
-
/**
|
|
72
|
-
*
|
|
73
|
-
*/
|
|
74
|
-
renderAttrs(): string;
|
|
75
|
-
/**
|
|
76
|
-
*
|
|
77
|
-
*/
|
|
78
|
-
renderStyle(): string;
|
|
79
|
-
/**
|
|
80
|
-
*
|
|
81
|
-
*/
|
|
82
|
-
renderContent(): string;
|
|
83
|
-
/**
|
|
84
|
-
*
|
|
85
|
-
*/
|
|
86
|
-
clip(id: string): this;
|
|
87
|
-
/**
|
|
88
|
-
*
|
|
89
|
-
*/
|
|
90
|
-
transform(tr: string): this;
|
|
91
|
-
/**
|
|
92
|
-
*
|
|
93
|
-
*/
|
|
94
|
-
rotate(deg: number, cx: number, cy: number): this;
|
|
95
|
-
translate(dx: number, dy: number): this;
|
|
96
|
-
scale(x: number): this;
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
*
|
|
100
|
-
*/
|
|
101
|
-
export declare class SVGPath extends SVGItem {
|
|
102
|
-
private m_path;
|
|
103
|
-
constructor();
|
|
104
|
-
renderAttrs(): string;
|
|
105
|
-
/**
|
|
106
|
-
* move the current pos
|
|
107
|
-
* @param x new pos x
|
|
108
|
-
* @param y new pos y
|
|
109
|
-
* @returns this
|
|
110
|
-
*/
|
|
111
|
-
moveTo(x: number, y: number): this;
|
|
112
|
-
/**
|
|
113
|
-
* draw aline to the given point
|
|
114
|
-
* @param x end x
|
|
115
|
-
* @param y end y
|
|
116
|
-
* @returns this
|
|
117
|
-
*/
|
|
118
|
-
lineTo(x: number, y: number): this;
|
|
119
|
-
/**
|
|
120
|
-
* close the currentPath
|
|
121
|
-
*/
|
|
122
|
-
closePath(): this;
|
|
123
|
-
/**
|
|
124
|
-
* draw an arc
|
|
125
|
-
* @param x center x
|
|
126
|
-
* @param y center y
|
|
127
|
-
* @param r radius
|
|
128
|
-
* @param start angle start in degrees
|
|
129
|
-
* @param end angle end in degrees
|
|
130
|
-
* @returns this
|
|
131
|
-
*/
|
|
132
|
-
arc(x: number, y: number, r: number, start: number, end: number): this;
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
*
|
|
136
|
-
*/
|
|
137
|
-
export declare class SVGText extends SVGItem {
|
|
138
|
-
private m_text;
|
|
139
|
-
constructor(x: number, y: number, txt: string);
|
|
140
|
-
font(font: string): this;
|
|
141
|
-
fontSize(size: number | string): this;
|
|
142
|
-
fontWeight(weight: 'light' | 'normal' | 'bold'): this;
|
|
143
|
-
textAlign(align: 'left' | 'center' | 'right'): this;
|
|
144
|
-
verticalAlign(align: 'top' | 'center' | 'bottom'): this;
|
|
145
|
-
renderContent(): any;
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
*
|
|
149
|
-
*/
|
|
150
|
-
export declare class SVGShape extends SVGItem {
|
|
151
|
-
constructor(tag: string);
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
*
|
|
155
|
-
*/
|
|
156
|
-
type number_or_perc = number | `${string}%`;
|
|
157
|
-
export declare class SVGGradient extends SVGItem {
|
|
158
|
-
private static g_id;
|
|
159
|
-
private m_id;
|
|
160
|
-
private m_stops;
|
|
161
|
-
constructor(x1: number_or_perc, y1: number_or_perc, x2: number_or_perc, y2: number_or_perc);
|
|
162
|
-
get id(): string;
|
|
163
|
-
addStop(offset: number_or_perc, color: string): this;
|
|
164
|
-
renderContent(): string;
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
*
|
|
168
|
-
*/
|
|
169
|
-
export declare class SVGGroup extends SVGItem {
|
|
170
|
-
protected m_items: SVGItem[];
|
|
171
|
-
constructor(tag?: string);
|
|
172
|
-
path(): SVGPath;
|
|
173
|
-
text(x: any, y: any, txt: any): SVGText;
|
|
174
|
-
ellipse(x: any, y: any, r1: any, r2?: any): SVGShape;
|
|
175
|
-
rect(x: any, y: any, w: any, h: any): SVGShape;
|
|
176
|
-
group(): SVGGroup;
|
|
177
|
-
/**
|
|
178
|
-
*
|
|
179
|
-
* example
|
|
180
|
-
* ```ts
|
|
181
|
-
* const g = c.linear_gradient( '0%', '0%', '0%', '100%' )
|
|
182
|
-
* .addStop( 0, 'red' )
|
|
183
|
-
* .addStop( 100, 'green' );
|
|
184
|
-
*
|
|
185
|
-
* p.rect( 0, 0, 100, 100 )
|
|
186
|
-
* .stroke( g.id );
|
|
187
|
-
*
|
|
188
|
-
* ```
|
|
189
|
-
*/
|
|
190
|
-
linear_gradient(x1: number_or_perc, y1: number_or_perc, x2: number_or_perc, y2: number_or_perc): SVGGradient;
|
|
191
|
-
/**
|
|
192
|
-
* clear
|
|
193
|
-
*/
|
|
194
|
-
clear(): void;
|
|
195
|
-
renderContent(): string;
|
|
196
|
-
}
|
|
197
|
-
/**
|
|
198
|
-
*
|
|
199
|
-
*/
|
|
200
|
-
export declare class SVGPathBuilder extends SVGGroup {
|
|
201
|
-
private static g_clip_id;
|
|
202
|
-
constructor();
|
|
203
|
-
addClip(x: number, y: number, w: number, h: number): string;
|
|
204
|
-
render(): string;
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
*
|
|
208
|
-
*/
|
|
209
|
-
export interface SVGProps extends CProps {
|
|
210
|
-
viewBox?: string;
|
|
211
|
-
path?: string;
|
|
212
|
-
}
|
|
213
|
-
export declare class SVGComponent<P extends SVGProps = SVGProps> extends Component<P> {
|
|
214
|
-
constructor(props: P);
|
|
215
|
-
}
|
|
216
|
-
export {};
|
package/lib/types/tabbar.d.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ___ ___ __
|
|
3
|
-
* \ \_/ / / _
|
|
4
|
-
* \ / /_| |_
|
|
5
|
-
* / _ \____ _|
|
|
6
|
-
* /__/ \__\ |_|
|
|
7
|
-
*
|
|
8
|
-
* @file tabbar.ts
|
|
9
|
-
* @author Etienne Cochard
|
|
10
|
-
*
|
|
11
|
-
* Copyright (c) 2019-2022 R-libre ingenierie
|
|
12
|
-
*
|
|
13
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
14
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
15
|
-
* in the Software without restriction, including without limitation the rights
|
|
16
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
17
|
-
* of the Software, and to permit persons to whom the Software is furnished to do so,
|
|
18
|
-
* subject to the following conditions:
|
|
19
|
-
* The above copyright notice and this permission notice shall be included in all copies
|
|
20
|
-
* or substantial portions of the Software.
|
|
21
|
-
*
|
|
22
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
23
|
-
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
24
|
-
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
25
|
-
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
26
|
-
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
27
|
-
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
28
|
-
**/
|
|
29
|
-
import { Component, Container, ContainerEventMap, CProps, EventHandler } from './component';
|
|
30
|
-
import { EvChange } from './x4events';
|
|
31
|
-
import { IconID } from './icon.js';
|
|
32
|
-
interface TabBarEventMap extends ContainerEventMap {
|
|
33
|
-
change: EvChange;
|
|
34
|
-
}
|
|
35
|
-
interface TabBarProps extends CProps<TabBarEventMap> {
|
|
36
|
-
pages?: ITabPage[];
|
|
37
|
-
default?: string;
|
|
38
|
-
vertical?: boolean;
|
|
39
|
-
change: EventHandler<EvChange>;
|
|
40
|
-
}
|
|
41
|
-
export interface ITabPage {
|
|
42
|
-
id: string;
|
|
43
|
-
title?: string;
|
|
44
|
-
icon?: IconID;
|
|
45
|
-
page: Component;
|
|
46
|
-
}
|
|
47
|
-
export declare class TabBar extends Container<TabBarProps, TabBarEventMap> {
|
|
48
|
-
private m_pages;
|
|
49
|
-
private m_curPage;
|
|
50
|
-
constructor(props: TabBarProps);
|
|
51
|
-
componentCreated(): void;
|
|
52
|
-
addPage(page: ITabPage): void;
|
|
53
|
-
render(): void;
|
|
54
|
-
select(id: string | null, notify?: boolean): boolean;
|
|
55
|
-
private _select;
|
|
56
|
-
get selection(): Component;
|
|
57
|
-
}
|
|
58
|
-
export {};
|
package/lib/types/tabview.d.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ___ ___ __
|
|
3
|
-
* \ \_/ / / _
|
|
4
|
-
* \ / /_| |_
|
|
5
|
-
* / _ \____ _|
|
|
6
|
-
* /__/ \__\ |_|
|
|
7
|
-
*
|
|
8
|
-
* @file tabview.ts
|
|
9
|
-
* @author Etienne Cochard
|
|
10
|
-
*
|
|
11
|
-
* Copyright (c) 2019-2022 R-libre ingenierie
|
|
12
|
-
*
|
|
13
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
14
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
15
|
-
* in the Software without restriction, including without limitation the rights
|
|
16
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
17
|
-
* of the Software, and to permit persons to whom the Software is furnished to do so,
|
|
18
|
-
* subject to the following conditions:
|
|
19
|
-
* The above copyright notice and this permission notice shall be included in all copies
|
|
20
|
-
* or substantial portions of the Software.
|
|
21
|
-
*
|
|
22
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
23
|
-
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
24
|
-
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
25
|
-
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
26
|
-
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
27
|
-
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
28
|
-
**/
|
|
29
|
-
import { Component } from './component';
|
|
30
|
-
import { CardView, CardViewProps, ICardViewItem } from './cardview';
|
|
31
|
-
import { MenuItem } from './menu';
|
|
32
|
-
interface TabProps extends CardViewProps {
|
|
33
|
-
tab_selector?: boolean;
|
|
34
|
-
menu?: MenuItem;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Standard TabView class
|
|
38
|
-
*/
|
|
39
|
-
export declare class TabView extends CardView<TabProps> {
|
|
40
|
-
protected m_tab_selector: boolean;
|
|
41
|
-
protected m_menu: MenuItem;
|
|
42
|
-
constructor(props: TabProps);
|
|
43
|
-
/** @ignore */
|
|
44
|
-
render(): void;
|
|
45
|
-
protected _updateSelector(): void;
|
|
46
|
-
protected _prepareSelector(card: ICardViewItem): Component;
|
|
47
|
-
protected _preparePage(page: Component): void;
|
|
48
|
-
}
|
|
49
|
-
export {};
|
package/lib/types/textarea.d.ts
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ___ ___ __
|
|
3
|
-
* \ \_/ / / _
|
|
4
|
-
* \ / /_| |_
|
|
5
|
-
* / _ \____ _|
|
|
6
|
-
* /__/ \__\ |_|
|
|
7
|
-
*
|
|
8
|
-
* @file textarea.ts
|
|
9
|
-
* @author Etienne Cochard
|
|
10
|
-
*
|
|
11
|
-
* Copyright (c) 2019-2022 R-libre ingenierie
|
|
12
|
-
*
|
|
13
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
14
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
15
|
-
* in the Software without restriction, including without limitation the rights
|
|
16
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
17
|
-
* of the Software, and to permit persons to whom the Software is furnished to do so,
|
|
18
|
-
* subject to the following conditions:
|
|
19
|
-
* The above copyright notice and this permission notice shall be included in all copies
|
|
20
|
-
* or substantial portions of the Software.
|
|
21
|
-
*
|
|
22
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
23
|
-
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
24
|
-
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
25
|
-
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
26
|
-
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
27
|
-
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
28
|
-
**/
|
|
29
|
-
import { Component, CProps, CEventMap } from './component';
|
|
30
|
-
import { EvChange, EventCallback } from './x4events';
|
|
31
|
-
interface TextAreaEventMap extends CEventMap {
|
|
32
|
-
change: EvChange;
|
|
33
|
-
}
|
|
34
|
-
interface Selection {
|
|
35
|
-
start: number;
|
|
36
|
-
end: number;
|
|
37
|
-
}
|
|
38
|
-
export interface TextAreaProps extends CProps {
|
|
39
|
-
text?: string;
|
|
40
|
-
readOnly?: boolean;
|
|
41
|
-
tabIndex?: number;
|
|
42
|
-
placeHolder?: string;
|
|
43
|
-
name?: string;
|
|
44
|
-
rows?: number;
|
|
45
|
-
autoGrow?: boolean;
|
|
46
|
-
autoFocus?: boolean;
|
|
47
|
-
spellcheck?: boolean;
|
|
48
|
-
change?: EventCallback<EvChange>;
|
|
49
|
-
}
|
|
50
|
-
export declare class TextArea extends Component<TextAreaProps, TextAreaEventMap> {
|
|
51
|
-
constructor(props: TextAreaProps);
|
|
52
|
-
/** @ignore */
|
|
53
|
-
render(props: TextAreaProps): void;
|
|
54
|
-
private _change;
|
|
55
|
-
componentCreated(): void;
|
|
56
|
-
get value(): string;
|
|
57
|
-
set value(t: string);
|
|
58
|
-
get text(): string;
|
|
59
|
-
set text(text: string);
|
|
60
|
-
private _calcHeight;
|
|
61
|
-
private _updateHeight;
|
|
62
|
-
/**
|
|
63
|
-
* @deprected use appendText
|
|
64
|
-
* insert text at cursor position
|
|
65
|
-
*/
|
|
66
|
-
insertText(text: any): void;
|
|
67
|
-
/**
|
|
68
|
-
* append the text
|
|
69
|
-
*/
|
|
70
|
-
appendText(text: any): void;
|
|
71
|
-
replaceText(text: any): void;
|
|
72
|
-
getSelection(): Selection;
|
|
73
|
-
setSelection(sel: Selection): void;
|
|
74
|
-
getStoreValue(): any;
|
|
75
|
-
setStoreValue(value: any): void;
|
|
76
|
-
}
|
|
77
|
-
export {};
|