x4js 1.4.8 → 1.4.9
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/build.sh +5 -0
- package/lib/application.d.ts +15 -11
- package/lib/application.js +15 -11
- package/lib/base64.d.ts +15 -11
- package/lib/base64.js +15 -11
- package/lib/base_component.d.ts +18 -1
- package/lib/base_component.js +18 -1
- package/lib/button.d.ts +15 -11
- package/lib/button.js +15 -11
- package/lib/calendar.d.ts +15 -11
- package/lib/calendar.js +15 -11
- package/lib/canvas.d.ts +15 -11
- package/lib/canvas.js +15 -11
- package/lib/cardview.d.ts +15 -11
- package/lib/cardview.js +15 -11
- package/lib/checkbox.d.ts +17 -12
- package/lib/checkbox.js +18 -11
- package/lib/color.d.ts +15 -11
- package/lib/color.js +15 -11
- package/lib/colorpicker.d.ts +18 -11
- package/lib/colorpicker.js +18 -11
- package/lib/combobox.d.ts +15 -11
- package/lib/combobox.js +16 -12
- package/lib/component.d.ts +18 -14
- package/lib/component.js +18 -14
- package/lib/datastore.d.ts +15 -11
- package/lib/datastore.js +15 -11
- package/lib/dialog.d.ts +15 -11
- package/lib/dialog.js +19 -14
- package/lib/dom_events.d.ts +17 -1
- package/lib/dom_events.js +17 -1
- package/lib/drag_manager.d.ts +28 -0
- package/lib/drawtext.d.ts +15 -11
- package/lib/drawtext.js +15 -11
- package/lib/fileupload.d.ts +15 -11
- package/lib/fileupload.js +15 -11
- package/lib/form.d.ts +15 -11
- package/lib/form.js +15 -11
- package/lib/formatters.d.ts +15 -11
- package/lib/formatters.js +15 -11
- package/lib/gridview.d.ts +15 -11
- package/lib/gridview.js +59 -29
- package/lib/i18n.d.ts +15 -11
- package/lib/i18n.js +15 -11
- package/lib/icon.d.ts +20 -12
- package/lib/icon.js +107 -25
- package/lib/image.d.ts +15 -11
- package/lib/image.js +15 -11
- package/lib/index.d.ts +28 -0
- package/lib/index.js +28 -0
- package/lib/input.d.ts +15 -11
- package/lib/input.js +15 -11
- package/lib/label.d.ts +15 -11
- package/lib/label.js +15 -11
- package/lib/layout.d.ts +21 -17
- package/lib/layout.js +21 -17
- package/lib/link.d.ts +15 -11
- package/lib/link.js +15 -11
- package/lib/listview.d.ts +15 -11
- package/lib/listview.js +15 -11
- package/lib/md5.d.ts +15 -10
- package/lib/md5.js +15 -10
- package/lib/menu.d.ts +15 -11
- package/lib/menu.js +19 -12
- package/lib/messagebox.d.ts +15 -11
- package/lib/messagebox.js +17 -13
- package/lib/panel.d.ts +15 -11
- package/lib/panel.js +15 -11
- package/lib/popup.d.ts +15 -11
- package/lib/popup.js +15 -11
- package/lib/property_editor.d.ts +15 -11
- package/lib/property_editor.js +15 -11
- package/lib/radiobtn.d.ts +15 -11
- package/lib/radiobtn.js +15 -11
- package/lib/rating.d.ts +15 -11
- package/lib/rating.js +15 -11
- package/lib/request.d.ts +15 -11
- package/lib/request.js +15 -11
- package/lib/router.d.ts +28 -0
- package/lib/router.js +28 -0
- package/lib/settings.d.ts +15 -11
- package/lib/settings.js +15 -11
- package/lib/sidebarview.d.ts +15 -11
- package/lib/sidebarview.js +15 -11
- package/lib/smartedit.d.ts +15 -11
- package/lib/smartedit.js +15 -11
- package/lib/spreadsheet.d.ts +15 -11
- package/lib/spreadsheet.js +15 -11
- package/lib/styles.d.ts +16 -12
- package/lib/styles.js +21 -14
- package/lib/svgcomponent.d.ts +15 -11
- package/lib/svgcomponent.js +15 -11
- package/lib/tabbar.d.ts +17 -2
- package/lib/tabbar.js +17 -2
- package/lib/tabview.d.ts +15 -11
- package/lib/tabview.js +15 -11
- package/lib/textarea.d.ts +15 -11
- package/lib/textarea.js +15 -11
- package/lib/textedit.d.ts +15 -11
- package/lib/textedit.js +15 -11
- package/lib/texthiliter.d.ts +15 -11
- package/lib/texthiliter.js +15 -11
- package/lib/toaster.d.ts +15 -11
- package/lib/toaster.js +15 -11
- package/lib/tools.d.ts +15 -11
- package/lib/tools.js +15 -11
- package/lib/tooltips.d.ts +15 -11
- package/lib/tooltips.js +15 -11
- package/lib/treeview.d.ts +15 -11
- package/lib/treeview.js +15 -11
- package/lib/x4.css +1572 -0
- package/lib/x4_events.d.ts +15 -11
- package/lib/x4_events.js +15 -11
- package/package.json +5 -1
- package/src/MIT-license.md +14 -0
- package/src/application.ts +15 -11
- package/src/base64.ts +15 -11
- package/src/base_component.ts +18 -1
- package/src/button.ts +15 -11
- package/src/calendar.ts +15 -11
- package/src/canvas.ts +15 -11
- package/src/cardview.ts +15 -11
- package/src/checkbox.ts +21 -12
- package/src/color.ts +15 -11
- package/src/colorpicker.ts +19 -11
- package/src/combobox.ts +16 -12
- package/src/component.ts +18 -14
- package/src/datastore.ts +15 -11
- package/src/dialog.ts +19 -14
- package/src/dom_events.ts +17 -1
- package/src/drag_manager.ts +28 -0
- package/src/drawtext.ts +15 -11
- package/src/fileupload.ts +15 -11
- package/src/form.ts +15 -11
- package/src/formatters.ts +15 -11
- package/src/gridview.ts +76 -30
- package/src/i18n.ts +15 -11
- package/src/icon.ts +125 -33
- package/src/image.ts +15 -11
- package/src/index.ts +29 -0
- package/src/input.ts +15 -11
- package/src/label.ts +15 -11
- package/src/layout.ts +21 -17
- package/src/link.ts +15 -11
- package/src/listview.ts +15 -11
- package/src/md5.ts +15 -10
- package/src/menu.ts +19 -12
- package/src/messagebox.ts +17 -13
- package/src/panel.ts +15 -11
- package/src/popup.ts +15 -11
- package/src/property_editor.ts +15 -11
- package/src/radiobtn.ts +15 -11
- package/src/rating.ts +15 -11
- package/src/request.ts +15 -11
- package/src/router.ts +28 -0
- package/src/settings.ts +15 -11
- package/src/sidebarview.ts +15 -11
- package/src/smartedit.ts +15 -11
- package/src/spreadsheet.ts +15 -11
- package/src/styles.ts +23 -14
- package/src/svgcomponent.ts +15 -11
- package/src/tabbar.ts +17 -2
- package/src/tabview.ts +15 -11
- package/src/textarea.ts +15 -11
- package/src/textedit.ts +15 -11
- package/src/texthiliter.ts +15 -11
- package/src/toaster.ts +15 -11
- package/src/tools.ts +15 -11
- package/src/tooltips.ts +15 -11
- package/src/treeview.ts +15 -11
- package/src/x4.less +115 -87
- package/src/x4_events.ts +15 -11
- package/x4.css +111 -80
package/lib/icon.js
CHANGED
|
@@ -8,20 +8,24 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @file icon.ts
|
|
10
10
|
* @author Etienne Cochard
|
|
11
|
-
* @license
|
|
12
|
-
* Copyright (c) 2019-2021 R-libre ingenierie
|
|
13
11
|
*
|
|
14
|
-
*
|
|
15
|
-
* it under the terms of the GNU General Public License as published by
|
|
16
|
-
* the Free Software Foundation; either version 3 of the License, or
|
|
17
|
-
* (at your option) any later version.
|
|
12
|
+
* Copyright (c) 2019-2022 R-libre ingenierie
|
|
18
13
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
14
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
15
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
16
|
+
* in the Software without restriction, including without limitation the rights
|
|
17
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
18
|
+
* of the Software, and to permit persons to whom the Software is furnished to do so,
|
|
19
|
+
* subject to the following conditions:
|
|
20
|
+
* The above copyright notice and this permission notice shall be included in all copies
|
|
21
|
+
* or substantial portions of the Software.
|
|
23
22
|
*
|
|
24
|
-
*
|
|
23
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
24
|
+
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
25
|
+
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
26
|
+
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
27
|
+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
28
|
+
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
25
29
|
**/
|
|
26
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
31
|
exports.Icon = exports.EvLoaded = void 0;
|
|
@@ -33,6 +37,15 @@ function EvLoaded(url, svg, context = null) {
|
|
|
33
37
|
return (0, x4_events_1.BasicEvent)({ url, svg, context });
|
|
34
38
|
}
|
|
35
39
|
exports.EvLoaded = EvLoaded;
|
|
40
|
+
function trimQuotes(str) {
|
|
41
|
+
const l = str.length;
|
|
42
|
+
if (str[0] == '"' && str[l - 1] == '"') {
|
|
43
|
+
str = str.substring(1, l - 1);
|
|
44
|
+
str = str.replaceAll('\\"', "'");
|
|
45
|
+
return str;
|
|
46
|
+
}
|
|
47
|
+
return str;
|
|
48
|
+
}
|
|
36
49
|
class Loader extends x4_events_1.EventSource {
|
|
37
50
|
svgs;
|
|
38
51
|
constructor() {
|
|
@@ -52,13 +65,21 @@ class Loader extends x4_events_1.EventSource {
|
|
|
52
65
|
this.svgs.set(url, null);
|
|
53
66
|
// then start loading
|
|
54
67
|
const _load = async (url) => {
|
|
55
|
-
|
|
56
|
-
if (
|
|
57
|
-
const svg =
|
|
68
|
+
// shortcut
|
|
69
|
+
if (url.substring(0, 24) == "data:image/svg+xml;utf8,") {
|
|
70
|
+
const svg = url.substring(24);
|
|
58
71
|
this.svgs.set(url, svg);
|
|
59
|
-
//console.log( 'signal=', url );
|
|
60
72
|
this.signal('loaded', EvLoaded(url, svg));
|
|
61
73
|
}
|
|
74
|
+
else {
|
|
75
|
+
const r = await fetch(url);
|
|
76
|
+
if (r.ok) {
|
|
77
|
+
const svg = await r.text();
|
|
78
|
+
this.svgs.set(url, svg);
|
|
79
|
+
//console.log( 'signal=', url );
|
|
80
|
+
this.signal('loaded', EvLoaded(url, svg));
|
|
81
|
+
}
|
|
82
|
+
}
|
|
62
83
|
};
|
|
63
84
|
_load(url);
|
|
64
85
|
}
|
|
@@ -72,46 +93,100 @@ class Icon extends component_1.Component {
|
|
|
72
93
|
m_icon;
|
|
73
94
|
m_iconName;
|
|
74
95
|
constructor(props) {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
96
|
+
if ((0, tools_1.isString)(props)) {
|
|
97
|
+
super({ icon: props });
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
super(props);
|
|
101
|
+
}
|
|
102
|
+
this._setIcon(this.m_props.icon, false);
|
|
103
|
+
if (this.m_props.size) {
|
|
104
|
+
this.setStyleValue('fontSize', this.m_props.size);
|
|
79
105
|
}
|
|
80
106
|
}
|
|
81
107
|
_setIcon(icon, remove_old) {
|
|
82
|
-
const reUrl = /\s*url\s*\(\s*(.+)\s*\)\s*/gi;
|
|
83
|
-
const reSvg = /\s*svg\s*\(\s*(.+)\s*\)\s*/gi;
|
|
84
|
-
const reSvg2 = /(.*\.svg)$/gi;
|
|
85
|
-
const reCls = /\s*cls\s*\(\s*(.+)\s*\)\s*/gi;
|
|
86
108
|
if (!icon) {
|
|
87
109
|
this.m_iconName = '';
|
|
88
110
|
return;
|
|
89
111
|
}
|
|
90
112
|
this.removeClass('@svg');
|
|
113
|
+
// todo: deprecated
|
|
91
114
|
let name, url;
|
|
92
115
|
if (typeof (icon) === 'number') {
|
|
93
116
|
icon = icon.toString(16);
|
|
94
117
|
name = icon;
|
|
95
118
|
}
|
|
96
119
|
else {
|
|
120
|
+
// var( <var-name> )
|
|
121
|
+
//
|
|
122
|
+
// in the .css
|
|
123
|
+
// --------------------------
|
|
124
|
+
// :root {
|
|
125
|
+
// --chevron-up: svgpath( "M0 96C0 78.33 14.33 64 32 64H416C433.7 64 448 78.33 448 96C448 113.7 433.7 128 416 128H32C14.33 128 0 113.7 0 96z" );
|
|
126
|
+
// }
|
|
127
|
+
//
|
|
128
|
+
// var( "--chevron-up" )
|
|
129
|
+
const reVar = /\s*var\s*\(\s*(.+)\s*\)\s*/gi;
|
|
130
|
+
let match_var = reVar.exec(icon);
|
|
131
|
+
while (match_var) {
|
|
132
|
+
const varname = match_var[1].trim();
|
|
133
|
+
icon = styles_1.Stylesheet.getVar(varname).trim();
|
|
134
|
+
if (icon == '' || icon === undefined) {
|
|
135
|
+
console.error(`icon: unable to find variable named '${varname}'`);
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
icon = trimQuotes(icon);
|
|
140
|
+
}
|
|
141
|
+
match_var = reVar.exec(icon);
|
|
142
|
+
}
|
|
143
|
+
// svg( <svg-filename> ) -> svg( "mysvgfile.svg" )
|
|
144
|
+
// <svg-filename>.svg -> "mysvgfile.svg"
|
|
145
|
+
const reSvg = /\s*svg\s*\(\s*(.+)\s*\)\s*/gi;
|
|
146
|
+
const reSvg2 = /(.*\.svg)$/gi;
|
|
97
147
|
let match_svg = reSvg.exec(icon) || reSvg2.exec(icon);
|
|
98
148
|
if (match_svg) {
|
|
99
149
|
const url = match_svg[1].trim();
|
|
100
150
|
this._setSVG(url);
|
|
101
151
|
return;
|
|
102
152
|
}
|
|
153
|
+
// svgpath( <svg-path> )
|
|
154
|
+
// svgpath( "M0 96C0 78.33 14.33 64 32 64H416C433.7 64 448 78.33 448 96C448 113.7 433.7 128 416 128H32C14.33 128 0 113.7 0 96z" )
|
|
155
|
+
const reSvg3 = /\s*svgpath\s*\(\s*(.+)\s*\)\s*/gi;
|
|
156
|
+
let match_pth = reSvg3.exec(icon);
|
|
157
|
+
if (match_pth) {
|
|
158
|
+
const pth = this._setSVGPath(match_pth[1].trim());
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
// data( <direct> )
|
|
162
|
+
// data( "data:image/svg+xml;utf8,<svg...></svg>" )
|
|
163
|
+
const reSvg4 = /^\s*(data\:image\/.+)\s*$/gi;
|
|
164
|
+
let match_dta = reSvg4.exec(icon);
|
|
165
|
+
if (match_dta) {
|
|
166
|
+
this._setSVG(match_dta[1]);
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
const reCls = /\s*cls\s*\(\s*(.+)\s*\)\s*/gi;
|
|
103
170
|
let match_cls = reCls.exec(icon);
|
|
104
171
|
if (match_cls) {
|
|
105
172
|
const classes = match_cls[1].trim();
|
|
106
173
|
this.addClass(classes);
|
|
107
174
|
return;
|
|
108
175
|
}
|
|
176
|
+
const reUrl = /\s*url\s*\(\s*(.+)\s*\)\s*/gi;
|
|
109
177
|
let match_url = reUrl.exec(icon);
|
|
110
178
|
if (match_url) {
|
|
111
|
-
url = match_url[1].trim();
|
|
112
|
-
|
|
179
|
+
url = trimQuotes(match_url[1].trim());
|
|
180
|
+
if (url.substring(0, 5) == 'data:') {
|
|
181
|
+
this._setSVG(url);
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
name = url.replace(/[/\\\.\* ]/g, '_');
|
|
186
|
+
}
|
|
113
187
|
}
|
|
114
188
|
else {
|
|
189
|
+
// todo: deprecated
|
|
115
190
|
name = icon;
|
|
116
191
|
icon = styles_1.Stylesheet.getVar('icon-' + icon);
|
|
117
192
|
if (icon == '' || icon === undefined) {
|
|
@@ -170,6 +245,13 @@ class Icon extends component_1.Component {
|
|
|
170
245
|
svgLoader.on('loaded', set);
|
|
171
246
|
svgLoader.load(url);
|
|
172
247
|
}
|
|
248
|
+
/**
|
|
249
|
+
* todo: try to extract viewbox
|
|
250
|
+
*/
|
|
251
|
+
_setSVGPath(pth) {
|
|
252
|
+
this.addClass('@svg-icon');
|
|
253
|
+
this.setContent(tools_1.HtmlString.from(`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path d="${pth}/></svg>`), false);
|
|
254
|
+
}
|
|
173
255
|
/**
|
|
174
256
|
*
|
|
175
257
|
*/
|
package/lib/image.d.ts
CHANGED
|
@@ -7,20 +7,24 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @file image.ts
|
|
9
9
|
* @author Etienne Cochard
|
|
10
|
-
* @license
|
|
11
|
-
* Copyright (c) 2019-2021 R-libre ingenierie
|
|
12
10
|
*
|
|
13
|
-
*
|
|
14
|
-
* it under the terms of the GNU General Public License as published by
|
|
15
|
-
* the Free Software Foundation; either version 3 of the License, or
|
|
16
|
-
* (at your option) any later version.
|
|
11
|
+
* Copyright (c) 2019-2022 R-libre ingenierie
|
|
17
12
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
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.
|
|
22
21
|
*
|
|
23
|
-
*
|
|
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.
|
|
24
28
|
**/
|
|
25
29
|
import { Component, CProps } from './component';
|
|
26
30
|
interface ImageProps extends CProps {
|
package/lib/image.js
CHANGED
|
@@ -8,20 +8,24 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @file image.ts
|
|
10
10
|
* @author Etienne Cochard
|
|
11
|
-
* @license
|
|
12
|
-
* Copyright (c) 2019-2021 R-libre ingenierie
|
|
13
11
|
*
|
|
14
|
-
*
|
|
15
|
-
* it under the terms of the GNU General Public License as published by
|
|
16
|
-
* the Free Software Foundation; either version 3 of the License, or
|
|
17
|
-
* (at your option) any later version.
|
|
12
|
+
* Copyright (c) 2019-2022 R-libre ingenierie
|
|
18
13
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
14
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
15
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
16
|
+
* in the Software without restriction, including without limitation the rights
|
|
17
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
18
|
+
* of the Software, and to permit persons to whom the Software is furnished to do so,
|
|
19
|
+
* subject to the following conditions:
|
|
20
|
+
* The above copyright notice and this permission notice shall be included in all copies
|
|
21
|
+
* or substantial portions of the Software.
|
|
23
22
|
*
|
|
24
|
-
*
|
|
23
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
24
|
+
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
25
|
+
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
26
|
+
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
27
|
+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
28
|
+
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
25
29
|
**/
|
|
26
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
31
|
exports.Image = void 0;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ___ ___ __
|
|
3
|
+
* \ \_/ / / _
|
|
4
|
+
* \ / /_| |_
|
|
5
|
+
* / _ \____ _|
|
|
6
|
+
* /__/ \__\ |_|
|
|
7
|
+
*
|
|
8
|
+
* @file index.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
|
+
**/
|
|
1
29
|
export * from "./application";
|
|
2
30
|
export * from "./base_component";
|
|
3
31
|
export * from "./base64";
|
package/lib/index.js
CHANGED
|
@@ -1,4 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* ___ ___ __
|
|
4
|
+
* \ \_/ / / _
|
|
5
|
+
* \ / /_| |_
|
|
6
|
+
* / _ \____ _|
|
|
7
|
+
* /__/ \__\ |_|
|
|
8
|
+
*
|
|
9
|
+
* @file index.ts
|
|
10
|
+
* @author Etienne Cochard
|
|
11
|
+
*
|
|
12
|
+
* Copyright (c) 2019-2022 R-libre ingenierie
|
|
13
|
+
*
|
|
14
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
15
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
16
|
+
* in the Software without restriction, including without limitation the rights
|
|
17
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
18
|
+
* of the Software, and to permit persons to whom the Software is furnished to do so,
|
|
19
|
+
* subject to the following conditions:
|
|
20
|
+
* The above copyright notice and this permission notice shall be included in all copies
|
|
21
|
+
* or substantial portions of the Software.
|
|
22
|
+
*
|
|
23
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
24
|
+
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
25
|
+
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
26
|
+
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
27
|
+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
28
|
+
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
29
|
+
**/
|
|
2
30
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
31
|
if (k2 === undefined) k2 = k;
|
|
4
32
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
package/lib/input.d.ts
CHANGED
|
@@ -7,20 +7,24 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @file input.ts
|
|
9
9
|
* @author Etienne Cochard
|
|
10
|
-
* @license
|
|
11
|
-
* Copyright (c) 2019-2021 R-libre ingenierie
|
|
12
10
|
*
|
|
13
|
-
*
|
|
14
|
-
* it under the terms of the GNU General Public License as published by
|
|
15
|
-
* the Free Software Foundation; either version 3 of the License, or
|
|
16
|
-
* (at your option) any later version.
|
|
11
|
+
* Copyright (c) 2019-2022 R-libre ingenierie
|
|
17
12
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
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.
|
|
22
21
|
*
|
|
23
|
-
*
|
|
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.
|
|
24
28
|
**/
|
|
25
29
|
import { Component, CProps, CEventMap } from './component';
|
|
26
30
|
export declare type EditType = 'text' | 'number' | 'email' | 'date' | 'password' | 'file' | 'checkbox' | 'radio';
|
package/lib/input.js
CHANGED
|
@@ -8,20 +8,24 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @file input.ts
|
|
10
10
|
* @author Etienne Cochard
|
|
11
|
-
* @license
|
|
12
|
-
* Copyright (c) 2019-2021 R-libre ingenierie
|
|
13
11
|
*
|
|
14
|
-
*
|
|
15
|
-
* it under the terms of the GNU General Public License as published by
|
|
16
|
-
* the Free Software Foundation; either version 3 of the License, or
|
|
17
|
-
* (at your option) any later version.
|
|
12
|
+
* Copyright (c) 2019-2022 R-libre ingenierie
|
|
18
13
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
14
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
15
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
16
|
+
* in the Software without restriction, including without limitation the rights
|
|
17
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
18
|
+
* of the Software, and to permit persons to whom the Software is furnished to do so,
|
|
19
|
+
* subject to the following conditions:
|
|
20
|
+
* The above copyright notice and this permission notice shall be included in all copies
|
|
21
|
+
* or substantial portions of the Software.
|
|
23
22
|
*
|
|
24
|
-
*
|
|
23
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
24
|
+
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
25
|
+
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
26
|
+
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
27
|
+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
28
|
+
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
25
29
|
**/
|
|
26
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
31
|
exports.Input = void 0;
|
package/lib/label.d.ts
CHANGED
|
@@ -7,20 +7,24 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @file label.ts
|
|
9
9
|
* @author Etienne Cochard
|
|
10
|
-
* @license
|
|
11
|
-
* Copyright (c) 2019-2021 R-libre ingenierie
|
|
12
10
|
*
|
|
13
|
-
*
|
|
14
|
-
* it under the terms of the GNU General Public License as published by
|
|
15
|
-
* the Free Software Foundation; either version 3 of the License, or
|
|
16
|
-
* (at your option) any later version.
|
|
11
|
+
* Copyright (c) 2019-2022 R-libre ingenierie
|
|
17
12
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
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.
|
|
22
21
|
*
|
|
23
|
-
*
|
|
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.
|
|
24
28
|
**/
|
|
25
29
|
import { Component, CProps } from './component';
|
|
26
30
|
import { HtmlString } from './tools';
|
package/lib/label.js
CHANGED
|
@@ -8,20 +8,24 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @file label.ts
|
|
10
10
|
* @author Etienne Cochard
|
|
11
|
-
* @license
|
|
12
|
-
* Copyright (c) 2019-2021 R-libre ingenierie
|
|
13
11
|
*
|
|
14
|
-
*
|
|
15
|
-
* it under the terms of the GNU General Public License as published by
|
|
16
|
-
* the Free Software Foundation; either version 3 of the License, or
|
|
17
|
-
* (at your option) any later version.
|
|
12
|
+
* Copyright (c) 2019-2022 R-libre ingenierie
|
|
18
13
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
14
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
15
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
16
|
+
* in the Software without restriction, including without limitation the rights
|
|
17
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
18
|
+
* of the Software, and to permit persons to whom the Software is furnished to do so,
|
|
19
|
+
* subject to the following conditions:
|
|
20
|
+
* The above copyright notice and this permission notice shall be included in all copies
|
|
21
|
+
* or substantial portions of the Software.
|
|
23
22
|
*
|
|
24
|
-
*
|
|
23
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
24
|
+
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
25
|
+
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
26
|
+
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
27
|
+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
28
|
+
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
25
29
|
**/
|
|
26
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
31
|
exports.Label = void 0;
|
package/lib/layout.d.ts
CHANGED
|
@@ -5,23 +5,27 @@
|
|
|
5
5
|
* / \____ _|
|
|
6
6
|
* /__/\__\ |_|
|
|
7
7
|
*
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
8
|
+
* @file layout.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
|
+
*/
|
|
25
29
|
import { Component, CProps, ComponentContent, Container, ContainerProps, ContainerEventMap } from './component';
|
|
26
30
|
export declare class AbsLayout<P extends ContainerProps = ContainerProps, E extends ContainerEventMap = ContainerEventMap> extends Container<P, E> {
|
|
27
31
|
}
|
package/lib/layout.js
CHANGED
|
@@ -6,23 +6,27 @@
|
|
|
6
6
|
* / \____ _|
|
|
7
7
|
* /__/\__\ |_|
|
|
8
8
|
*
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
9
|
+
* @file layout.ts
|
|
10
|
+
* @author Etienne Cochard
|
|
11
|
+
*
|
|
12
|
+
* Copyright (c) 2019-2022 R-libre ingenierie
|
|
13
|
+
*
|
|
14
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
15
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
16
|
+
* in the Software without restriction, including without limitation the rights
|
|
17
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
18
|
+
* of the Software, and to permit persons to whom the Software is furnished to do so,
|
|
19
|
+
* subject to the following conditions:
|
|
20
|
+
* The above copyright notice and this permission notice shall be included in all copies
|
|
21
|
+
* or substantial portions of the Software.
|
|
22
|
+
*
|
|
23
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
24
|
+
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
25
|
+
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
26
|
+
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
27
|
+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
28
|
+
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
29
|
+
*/
|
|
26
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
31
|
exports.ScrollView = exports.TableLayout = exports.GridLayout = exports.AutoLayout = exports.VLayout = exports.HLayout = exports.AbsLayout = void 0;
|
|
28
32
|
const component_1 = require("./component");
|
package/lib/link.d.ts
CHANGED
|
@@ -7,20 +7,24 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @file link.ts
|
|
9
9
|
* @author Etienne Cochard
|
|
10
|
-
* @license
|
|
11
|
-
* Copyright (c) 2019-2021 R-libre ingenierie
|
|
12
10
|
*
|
|
13
|
-
*
|
|
14
|
-
* it under the terms of the GNU General Public License as published by
|
|
15
|
-
* the Free Software Foundation; either version 3 of the License, or
|
|
16
|
-
* (at your option) any later version.
|
|
11
|
+
* Copyright (c) 2019-2022 R-libre ingenierie
|
|
17
12
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
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.
|
|
22
21
|
*
|
|
23
|
-
*
|
|
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.
|
|
24
28
|
**/
|
|
25
29
|
import { Component, CProps, CEventMap, HtmlString } from './component';
|
|
26
30
|
import { EvClick, EventCallback } from './x4_events';
|