x4js 1.4.8 → 1.4.11
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 +29 -22
- 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 +19 -15
- package/lib/component.js +19 -15
- package/lib/datastore.d.ts +15 -11
- package/lib/datastore.js +16 -12
- 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 +16 -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 +27 -17
- package/lib/layout.js +61 -18
- package/lib/link.d.ts +15 -11
- package/lib/link.js +15 -11
- package/lib/listview.d.ts +18 -14
- package/lib/listview.js +16 -23
- package/lib/md5.d.ts +16 -11
- package/lib/md5.js +16 -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 +20 -18
- 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 +16 -12
- 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 +16 -12
- 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 +17 -12
- package/lib/tooltips.d.ts +15 -11
- package/lib/tooltips.js +16 -12
- package/lib/treeview.d.ts +15 -11
- package/lib/treeview.js +15 -11
- package/{x4.css → lib/x4.css} +269 -106
- package/lib/x4_events.d.ts +17 -12
- package/lib/x4_events.js +24 -14
- 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 +30 -22
- package/src/canvas.ts +22 -18
- 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 +21 -16
- package/src/datastore.ts +16 -12
- 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 +19 -12
- 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 +75 -20
- package/src/link.ts +15 -11
- package/src/listview.ts +18 -14
- package/src/md5.ts +16 -10
- package/src/menu.ts +19 -12
- package/src/messagebox.ts +17 -13
- package/src/panel.ts +15 -11
- package/src/popup.ts +20 -19
- package/src/property_editor.ts +15 -11
- package/src/radiobtn.ts +15 -11
- package/src/rating.ts +15 -11
- package/src/request.ts +16 -12
- 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 +17 -13
- package/src/texthiliter.ts +15 -11
- package/src/toaster.ts +15 -11
- package/src/tools.ts +18 -12
- package/src/tooltips.ts +16 -12
- package/src/treeview.ts +15 -11
- package/src/x4.less +289 -120
- package/src/x4_events.ts +27 -16
- package/tsconfig.json +1 -1
package/lib/layout.js
CHANGED
|
@@ -6,25 +6,29 @@
|
|
|
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
|
-
exports.ScrollView = exports.TableLayout = exports.GridLayout = exports.AutoLayout = exports.VLayout = exports.HLayout = exports.AbsLayout = void 0;
|
|
31
|
+
exports.Masonry = exports.ScrollView = exports.TableLayout = exports.GridLayout = exports.AutoLayout = exports.VLayout = exports.HLayout = exports.AbsLayout = void 0;
|
|
28
32
|
const component_1 = require("./component");
|
|
29
33
|
const tools_1 = require("./tools");
|
|
30
34
|
// ============================================================================
|
|
@@ -269,3 +273,42 @@ class ScrollView extends component_1.Component {
|
|
|
269
273
|
}
|
|
270
274
|
}
|
|
271
275
|
exports.ScrollView = ScrollView;
|
|
276
|
+
// :: MASONERY ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
|
277
|
+
// from a nice article of Andy Barefoot
|
|
278
|
+
// https://medium.com/@andybarefoot/a-masonry-style-layout-using-css-grid-8c663d355ebb
|
|
279
|
+
class Masonry extends component_1.Container {
|
|
280
|
+
constructor(props) {
|
|
281
|
+
super(props);
|
|
282
|
+
this.setDomEvent('sizechange', () => {
|
|
283
|
+
this.resizeAllItems();
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
resizeItem(item) {
|
|
287
|
+
const style = this.getComputedStyle();
|
|
288
|
+
const rowHeight = style.parse('grid-auto-rows');
|
|
289
|
+
const rowGap = style.parse('grid-row-gap');
|
|
290
|
+
let content = item.queryItem('.content');
|
|
291
|
+
if (!content) {
|
|
292
|
+
content = item;
|
|
293
|
+
}
|
|
294
|
+
if (content && (rowHeight + rowGap)) {
|
|
295
|
+
const rc = content.getBoundingRect();
|
|
296
|
+
const rowSpan = Math.ceil((rc.height + rowGap) / (rowHeight + rowGap));
|
|
297
|
+
item.setStyleValue('gridRowEnd', "span " + rowSpan);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
resizeAllItems() {
|
|
301
|
+
this.queryAll(".item", (itm) => {
|
|
302
|
+
;
|
|
303
|
+
this.resizeItem(itm);
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
addItem(itm) {
|
|
307
|
+
itm.addClass('content');
|
|
308
|
+
this.appendChild(new component_1.Container({
|
|
309
|
+
cls: 'item',
|
|
310
|
+
content: itm
|
|
311
|
+
}));
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
exports.Masonry = Masonry;
|
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';
|
package/lib/link.js
CHANGED
|
@@ -8,20 +8,24 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @file link.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.Link = void 0;
|
package/lib/listview.d.ts
CHANGED
|
@@ -7,22 +7,26 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @file listview.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
|
-
import { Container, Component,
|
|
29
|
+
import { Container, Component, ContainerProps, ContainerEventMap, EvDblClick } from './component';
|
|
26
30
|
import { IconID } from './icon';
|
|
27
31
|
import { VLayout } from './layout';
|
|
28
32
|
import { Popup, PopupEventMap, PopupProps } from './popup';
|
|
@@ -31,7 +35,7 @@ import { EvContextMenu, EvSelectionChange, EvClick, EventCallback, BasicEvent }
|
|
|
31
35
|
/**
|
|
32
36
|
* item definition
|
|
33
37
|
*/
|
|
34
|
-
export
|
|
38
|
+
export interface ListViewItem {
|
|
35
39
|
id: any;
|
|
36
40
|
text?: string | HtmlString;
|
|
37
41
|
html?: boolean;
|
|
@@ -63,7 +67,7 @@ export interface ListViewEventMap extends ContainerEventMap {
|
|
|
63
67
|
/**
|
|
64
68
|
* listview properties
|
|
65
69
|
*/
|
|
66
|
-
export interface ListViewProps<E extends ListViewEventMap = ListViewEventMap> extends
|
|
70
|
+
export interface ListViewProps<E extends ListViewEventMap = ListViewEventMap> extends ContainerProps<E> {
|
|
67
71
|
items?: ListViewItem[];
|
|
68
72
|
populate?: PopulateItems;
|
|
69
73
|
gadgets?: Component[];
|
package/lib/listview.js
CHANGED
|
@@ -8,40 +8,33 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @file listview.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
|
-
exports.PopupListView = exports.EvCancel = exports.ListView =
|
|
31
|
+
exports.PopupListView = exports.EvCancel = exports.ListView = void 0;
|
|
28
32
|
const component_1 = require("./component");
|
|
29
33
|
const layout_1 = require("./layout");
|
|
30
34
|
const popup_1 = require("./popup");
|
|
31
35
|
const tools_1 = require("./tools");
|
|
32
36
|
const menu_1 = require("./menu");
|
|
33
37
|
const x4_events_1 = require("./x4_events");
|
|
34
|
-
/**
|
|
35
|
-
* item definition
|
|
36
|
-
*/
|
|
37
|
-
class ListViewItem {
|
|
38
|
-
id;
|
|
39
|
-
text; // if you need pure text
|
|
40
|
-
html; // if text is html
|
|
41
|
-
icon;
|
|
42
|
-
data;
|
|
43
|
-
}
|
|
44
|
-
exports.ListViewItem = ListViewItem;
|
|
45
38
|
;
|
|
46
39
|
/**
|
|
47
40
|
* Standard listview class
|
package/lib/md5.d.ts
CHANGED
|
@@ -8,19 +8,24 @@
|
|
|
8
8
|
* @file md5.ts
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
* @license
|
|
11
|
-
* Copyright (c) 2019-2021 R-libre ingenierie
|
|
12
11
|
*
|
|
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.
|
|
12
|
+
* Copyright (c) 2019-2022 R-libre ingenierie
|
|
17
13
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
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
22
|
*
|
|
23
|
-
*
|
|
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.
|
|
24
29
|
**/
|
|
25
30
|
export declare class Md5 {
|
|
26
31
|
static hashStr(str: string, raw?: false): string;
|
|
@@ -46,7 +51,7 @@ export declare class Md5 {
|
|
|
46
51
|
appendAsciiStr(str: string): this;
|
|
47
52
|
appendByteArray(input: Uint8Array): this;
|
|
48
53
|
getState(): {
|
|
49
|
-
buffer:
|
|
54
|
+
buffer: string;
|
|
50
55
|
buflen: number;
|
|
51
56
|
length: number;
|
|
52
57
|
state: number[];
|
package/lib/md5.js
CHANGED
|
@@ -9,19 +9,24 @@
|
|
|
9
9
|
* @file md5.ts
|
|
10
10
|
* @author Etienne Cochard
|
|
11
11
|
* @license
|
|
12
|
-
* Copyright (c) 2019-2021 R-libre ingenierie
|
|
13
12
|
*
|
|
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.
|
|
13
|
+
* Copyright (c) 2019-2022 R-libre ingenierie
|
|
18
14
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
15
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
16
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
17
|
+
* in the Software without restriction, including without limitation the rights
|
|
18
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
19
|
+
* of the Software, and to permit persons to whom the Software is furnished to do so,
|
|
20
|
+
* subject to the following conditions:
|
|
21
|
+
* The above copyright notice and this permission notice shall be included in all copies
|
|
22
|
+
* or substantial portions of the Software.
|
|
23
23
|
*
|
|
24
|
-
*
|
|
24
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
25
|
+
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
26
|
+
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
27
|
+
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
28
|
+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
29
|
+
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
25
30
|
**/
|
|
26
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
32
|
exports.Md5 = void 0;
|
|
@@ -338,6 +343,7 @@ class Md5 {
|
|
|
338
343
|
const self = this;
|
|
339
344
|
const s = self._state;
|
|
340
345
|
return {
|
|
346
|
+
//@ts-ignore
|
|
341
347
|
buffer: String.fromCharCode.apply(null, self._buffer8),
|
|
342
348
|
buflen: self._bufferLength,
|
|
343
349
|
length: self._dataLength,
|
package/lib/menu.d.ts
CHANGED
|
@@ -7,20 +7,24 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @file menu.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 { CEventMap, Component, CProps } from './component';
|
|
26
30
|
import { EvClick, EventCallback } from './x4_events';
|
package/lib/menu.js
CHANGED
|
@@ -8,20 +8,24 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @file menu.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.MenuBar = exports.MenuItem = exports.Menu = exports.MenuTitle = exports.MenuSeparator = void 0;
|
|
@@ -195,8 +199,10 @@ class MenuItem extends component_1.Component {
|
|
|
195
199
|
if (props.checked !== undefined) {
|
|
196
200
|
icon = props.checked ? 'cls(far fa-check)' : 0; //todo: use stylesheet
|
|
197
201
|
}
|
|
202
|
+
let popIco = null;
|
|
198
203
|
if (this.isPopup) {
|
|
199
204
|
this.addClass('@popup-menu-item');
|
|
205
|
+
popIco = new icon_1.Icon("var( --x4-icon-chevron-right )");
|
|
200
206
|
}
|
|
201
207
|
if (!text && !icon) {
|
|
202
208
|
this.addClass('@separator');
|
|
@@ -209,7 +215,8 @@ class MenuItem extends component_1.Component {
|
|
|
209
215
|
// this.setAttribute( 'tabindex', '0' );
|
|
210
216
|
this.setContent([
|
|
211
217
|
icon < 0 ? null : new icon_1.Icon({ icon }),
|
|
212
|
-
new label_1.Label({ flex: 1, text })
|
|
218
|
+
new label_1.Label({ flex: 1, text }),
|
|
219
|
+
popIco
|
|
213
220
|
]);
|
|
214
221
|
}
|
|
215
222
|
get id() {
|
package/lib/messagebox.d.ts
CHANGED
|
@@ -7,20 +7,24 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @file messagebox.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 { Dialog, DialogProps } from './dialog';
|
|
26
30
|
import { HtmlString } from './tools';
|
package/lib/messagebox.js
CHANGED
|
@@ -8,20 +8,24 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @file messagebox.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.PromptDialogBox = exports.MessageBox = void 0;
|
|
@@ -35,7 +39,7 @@ class MessageBox extends dialog_1.Dialog {
|
|
|
35
39
|
m_label;
|
|
36
40
|
constructor(props) {
|
|
37
41
|
// remove overloaded elements from DialogBoxProps
|
|
38
|
-
let icon = props.icon ?? '
|
|
42
|
+
let icon = props.icon ?? 'var( --x4-icon-exclamation )'; // todo: resolve that
|
|
39
43
|
props.icon = undefined;
|
|
40
44
|
let buttons = props.buttons === undefined ? ['ok'] : props.buttons;
|
|
41
45
|
props.buttons = undefined;
|
|
@@ -44,7 +48,7 @@ class MessageBox extends dialog_1.Dialog {
|
|
|
44
48
|
this.form.updateContent(new layout_1.HLayout({
|
|
45
49
|
style: { padding: 8 },
|
|
46
50
|
content: [
|
|
47
|
-
new icon_1.Icon({ cls: 'icon', icon }),
|
|
51
|
+
icon ? new icon_1.Icon({ cls: 'icon', icon }) : null,
|
|
48
52
|
this.m_label = new label_1.Label({ cls: 'text', text: msg, multiline: true })
|
|
49
53
|
]
|
|
50
54
|
}), buttons);
|
package/lib/panel.d.ts
CHANGED
|
@@ -7,20 +7,24 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @file panel.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, ComponentContent, ContainerProps, ContainerEventMap } from './component';
|
|
26
30
|
import { VLayout } from './layout';
|