@yuneta/gobj-ui 1.0.1 → 2.2.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 +40 -363
- package/dist/gobj-ui.cjs.js +11154 -5506
- package/dist/gobj-ui.es.js +11131 -5508
- package/index.js +41 -14
- package/package.json +11 -9
- package/src/c_g6_nodes_tree.js +6 -1
- package/src/c_yui_form.js +1 -1
- package/src/c_yui_gobj_tree_js.js +1 -1
- package/src/c_yui_json_graph.js +1 -1
- package/src/c_yui_main.js +3 -3
- package/src/c_yui_map.js +6 -1
- package/src/c_yui_nav.js +881 -0
- package/src/c_yui_pager.js +545 -0
- package/src/c_yui_routing.css +1 -1
- package/src/c_yui_routing.js +1 -1
- package/src/c_yui_shell.css +571 -0
- package/src/c_yui_shell.js +2474 -0
- package/src/c_yui_tabs.js +1 -1
- package/src/c_yui_treedb_graph.js +35 -9
- package/src/c_yui_treedb_topic_with_form.js +1 -1
- package/src/c_yui_treedb_topics.js +36 -8
- package/src/c_yui_uplot.js +1 -1
- package/src/c_yui_window.js +242 -21
- package/src/c_yui_window_manager.js +602 -0
- package/src/c_yui_wizard.js +612 -0
- package/src/pager_helpers.js +138 -0
- package/src/pager_helpers.test.js +140 -0
- package/src/route_resolver.js +53 -0
- package/src/route_resolver.test.js +82 -0
- package/src/shell_focus_trap.js +123 -0
- package/src/shell_focus_trap.test.js +299 -0
- package/src/shell_modals.js +445 -0
- package/src/shell_show_on.js +91 -0
- package/src/shell_show_on.test.js +86 -0
- package/src/shell_toolbar_helpers.js +221 -0
- package/src/shell_toolbar_helpers.test.js +207 -0
- package/src/tabulator.css +53 -0
- package/src/wizard_helpers.js +117 -0
- package/src/wizard_helpers.test.js +122 -0
- package/src/yui_dev.js +1257 -362
- package/src/yui_icons.css +5 -0
- package/src/yui_inputs.css +32 -0
- package/src/yui_inputs.js +71 -0
- package/vite-plugin-yuneta-html.js +2 -2
- package/skeleton/config.json +0 -20
- package/skeleton/index.html +0 -37
package/index.js
CHANGED
|
@@ -1,29 +1,25 @@
|
|
|
1
1
|
/***********************************************************************
|
|
2
|
-
* @yuneta/gobj-ui/index.js
|
|
2
|
+
* @yuneta/gobj-ui/index.js (v2 / main line)
|
|
3
3
|
*
|
|
4
|
-
* Yuneta UI Library - Reusable GUI components
|
|
4
|
+
* Yuneta UI Library - Reusable GUI components.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* and now evolves only in wattyzer/gui/src/gobj-ui/
|
|
10
|
-
* (vendored flat copy). Legacy apps (estadodelaire)
|
|
11
|
-
* consume this package and only need the
|
|
12
|
-
* legacy stack (C_YUI_MAIN + C_YUI_WINDOW + C_YUI_TABS
|
|
13
|
-
* + C_YUI_ROUTING + TreeDB views + chart/map widgets).
|
|
14
|
-
* Removing the new stack from here makes their bundles
|
|
15
|
-
* smaller and keeps the dependency direction clean.
|
|
6
|
+
* Barrel re-exports for the v2 source, which lives in src/.
|
|
7
|
+
* This is the canonical line, embedded as the yunetas submodule
|
|
8
|
+
* kernel/js/gobj-ui and consumed by wattyzer via a file: dep.
|
|
16
9
|
*
|
|
17
|
-
* Copyright (c)
|
|
10
|
+
* Copyright (c) 2024-2026, ArtGins.
|
|
18
11
|
* All Rights Reserved.
|
|
19
12
|
***********************************************************************/
|
|
20
13
|
|
|
21
14
|
/*
|
|
22
|
-
* Components
|
|
15
|
+
* Components
|
|
23
16
|
*/
|
|
24
17
|
export { register_c_yui_main, display_volatil_modal, display_info_message, display_warning_message, display_error_message, get_yesnocancel, get_yesno, get_ok } from "./src/c_yui_main.js";
|
|
25
18
|
export { register_c_yui_window } from "./src/c_yui_window.js";
|
|
19
|
+
export { register_c_yui_window_manager } from "./src/c_yui_window_manager.js";
|
|
26
20
|
export { register_c_yui_tabs } from "./src/c_yui_tabs.js";
|
|
21
|
+
export { register_c_yui_pager } from "./src/c_yui_pager.js";
|
|
22
|
+
export { register_c_yui_wizard } from "./src/c_yui_wizard.js";
|
|
27
23
|
export { register_c_yui_form } from "./src/c_yui_form.js";
|
|
28
24
|
export { register_c_yui_routing } from "./src/c_yui_routing.js";
|
|
29
25
|
export { register_c_yui_map } from "./src/c_yui_map.js";
|
|
@@ -31,6 +27,35 @@ export { register_c_yui_uplot } from "./src/c_yui_uplot.js";
|
|
|
31
27
|
export { register_c_yui_json_graph } from "./src/c_yui_json_graph.js";
|
|
32
28
|
export { register_c_yui_gobj_tree_js } from "./src/c_yui_gobj_tree_js.js";
|
|
33
29
|
|
|
30
|
+
/*
|
|
31
|
+
* Declarative shell + menu navigation (new in v7.4)
|
|
32
|
+
*/
|
|
33
|
+
export {
|
|
34
|
+
register_c_yui_shell,
|
|
35
|
+
yui_shell_navigate,
|
|
36
|
+
yui_shell_open_drawer,
|
|
37
|
+
yui_shell_close_drawer,
|
|
38
|
+
yui_shell_toggle_drawer,
|
|
39
|
+
yui_shell_push_escape,
|
|
40
|
+
yui_shell_pop_escape,
|
|
41
|
+
yui_shell_set_avatar_provider,
|
|
42
|
+
yui_shell_refresh_avatars,
|
|
43
|
+
yui_shell_set_translator,
|
|
44
|
+
yui_shell_set_connection_state,
|
|
45
|
+
yui_shell_set_toolbar_item_icon,
|
|
46
|
+
yui_shell_close_dropdown,
|
|
47
|
+
} from "./src/c_yui_shell.js";
|
|
48
|
+
export { register_c_yui_nav } from "./src/c_yui_nav.js";
|
|
49
|
+
export {
|
|
50
|
+
yui_shell_show_info,
|
|
51
|
+
yui_shell_show_warning,
|
|
52
|
+
yui_shell_show_error,
|
|
53
|
+
yui_shell_show_modal,
|
|
54
|
+
yui_shell_confirm_ok,
|
|
55
|
+
yui_shell_confirm_yesno,
|
|
56
|
+
yui_shell_confirm_yesnocancel,
|
|
57
|
+
} from "./src/shell_modals.js";
|
|
58
|
+
|
|
34
59
|
/*
|
|
35
60
|
* TreeDB components
|
|
36
61
|
*/
|
|
@@ -48,12 +73,14 @@ export { EditControl, MarkerControl } from "./src/lib_maplibre.js";
|
|
|
48
73
|
export { themes } from "./src/themes.js";
|
|
49
74
|
export { YTable, createYTable } from "./src/ytable.js";
|
|
50
75
|
export { yui_toolbar } from "./src/yui_toolbar.js";
|
|
76
|
+
export { attach_clear } from "./src/yui_inputs.js";
|
|
51
77
|
export { info_traffic, setup_dev, build_dev_panel, apply_dev_traces, dev_window_was_open } from "./src/yui_dev.js";
|
|
52
78
|
|
|
53
79
|
/*
|
|
54
80
|
* CSS - import these in your main entry point
|
|
55
81
|
* Example:
|
|
56
82
|
* import "gobj-ui/src/c_yui_main.css";
|
|
83
|
+
* import "gobj-ui/src/c_yui_shell.css"; // declarative shell
|
|
57
84
|
* import "gobj-ui/src/c_yui_map.css";
|
|
58
85
|
* import "gobj-ui/src/c_yui_routing.css";
|
|
59
86
|
* import "gobj-ui/src/ytable.css";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yuneta/gobj-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/gobj-ui.cjs.js",
|
|
6
6
|
"module": "dist/gobj-ui.es.js",
|
|
@@ -9,35 +9,37 @@
|
|
|
9
9
|
"import": "./dist/gobj-ui.es.js",
|
|
10
10
|
"require": "./dist/gobj-ui.cjs.js"
|
|
11
11
|
},
|
|
12
|
-
"./
|
|
12
|
+
"./index.js": "./index.js",
|
|
13
13
|
"./vite-plugin-yuneta-html.js": "./vite-plugin-yuneta-html.js",
|
|
14
|
-
"./
|
|
14
|
+
"./src/*": "./src/*"
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"dist/gobj-ui.es.js",
|
|
18
18
|
"dist/gobj-ui.cjs.js",
|
|
19
19
|
"index.js",
|
|
20
20
|
"src/",
|
|
21
|
-
"skeleton/",
|
|
22
21
|
"vite-plugin-yuneta-html.js"
|
|
23
22
|
],
|
|
24
|
-
"description": "Yuneta UI Library —
|
|
23
|
+
"description": "Yuneta UI Library — v2 (active development) declarative shell (C_YUI_SHELL+NAV+PAGER+WIZARD) + legacy GClass GUI stack (C_YUI_MAIN/WINDOW/TABS/ROUTING + TreeDB editors + charts/maps). Consumed by wattyzer. The frozen legacy-only line lives on the v1 branch (consumed by estadodelaire and hidraulia).",
|
|
25
24
|
"scripts": {
|
|
26
25
|
"build": "vite build",
|
|
26
|
+
"test": "vitest run",
|
|
27
27
|
"prepublishOnly": "npm run build"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@rollup/plugin-terser": "^1.0.0",
|
|
31
|
-
"@
|
|
32
|
-
"
|
|
31
|
+
"@vitest/coverage-v8": "^4.1.6",
|
|
32
|
+
"@yuneta/gobj-js": "^7.3.4",
|
|
33
|
+
"vite": "^8.0.10",
|
|
34
|
+
"vitest": "^4.1.6"
|
|
33
35
|
},
|
|
34
36
|
"peerDependencies": {
|
|
35
|
-
"@yuneta/gobj-js": "^7.3.4",
|
|
36
37
|
"@antv/g6": "^5.1.0",
|
|
38
|
+
"@yuneta/gobj-js": "^7.3.4",
|
|
37
39
|
"bulma": "^1.0.4",
|
|
38
40
|
"i18next": "^26.0.7",
|
|
39
41
|
"maplibre-gl": "^5.24.0",
|
|
40
|
-
"tabulator-tables": "^6.
|
|
42
|
+
"tabulator-tables": "^6.5.2",
|
|
41
43
|
"tom-select": "^2.6.0",
|
|
42
44
|
"uplot": "^1.6.32",
|
|
43
45
|
"vanilla-jsoneditor": "^0.23.0"
|
package/src/c_g6_nodes_tree.js
CHANGED
|
@@ -575,7 +575,12 @@ function get_default_ne_xy(gobj)
|
|
|
575
575
|
************************************************************/
|
|
576
576
|
function build_ui(gobj)
|
|
577
577
|
{
|
|
578
|
-
//
|
|
578
|
+
// $container set externally; tag it so the gclass owning this
|
|
579
|
+
// G6 canvas is identifiable in the browser Inspector.
|
|
580
|
+
let $container = gobj_read_attr(gobj, "$container");
|
|
581
|
+
if($container) {
|
|
582
|
+
$container.classList.add(GCLASS_NAME);
|
|
583
|
+
}
|
|
579
584
|
}
|
|
580
585
|
|
|
581
586
|
/************************************************************
|
package/src/c_yui_form.js
CHANGED
|
@@ -284,7 +284,7 @@ function build_ui(gobj)
|
|
|
284
284
|
*
|
|
285
285
|
*----------------------------------------------*/
|
|
286
286
|
let $container = createElement2(
|
|
287
|
-
['div', {class: '
|
|
287
|
+
['div', {class: 'C_YUI_FORM is-flex is-flex-direction-row overscroll-contain', style:'height:100%; width:100%; box-sizing:border-box;'}, [
|
|
288
288
|
|
|
289
289
|
/*----------------------------*
|
|
290
290
|
* Form
|
|
@@ -385,7 +385,7 @@ function build_ui(gobj)
|
|
|
385
385
|
let $toolbar = make_toolbar(gobj);
|
|
386
386
|
|
|
387
387
|
let $container = createElement2(
|
|
388
|
-
['div', {class: '
|
|
388
|
+
['div', {class: 'C_YUI_GOBJ_TREE_JS', style: 'height:100%; display:flex; flex-direction:column; position:relative;'}, [
|
|
389
389
|
['div', {class: 'is-flex-grow-0 is-flex toolbar_yui_gobj_tree'}, $toolbar],
|
|
390
390
|
['div', {class: 'is-flex-grow-1', style: 'height:100%; min-height:0; overflow:hidden;'}, [
|
|
391
391
|
['div', {id: priv.canvas_id, class: 'gobj-tree-container', style: 'height:100%; min-height:0; border: 1px solid var(--bulma-border-weak); border-radius:0.2rem;'}, [
|
package/src/c_yui_json_graph.js
CHANGED
|
@@ -221,7 +221,7 @@ function build_ui(gobj)
|
|
|
221
221
|
let $toolbar = make_toolbar(gobj);
|
|
222
222
|
|
|
223
223
|
let $container = createElement2(
|
|
224
|
-
['div', {class: '
|
|
224
|
+
['div', {class: 'C_YUI_JSON_GRAPH', style: 'height:100%; display:flex; flex-direction:column;'}, [
|
|
225
225
|
['div', {class: 'is-flex-grow-0 is-flex toolbar_yui_json_graph'}, $toolbar],
|
|
226
226
|
['div', {class: 'is-flex-grow-1', style: 'height:100%; min-height:0; overflow:hidden;'}, [
|
|
227
227
|
['div', {id: priv.canvas_id, class: 'json-graph-container', style: 'height:100%; min-height:0; border: 1px solid var(--bulma-border-weak); border-radius:0.2rem;'}, [
|
package/src/c_yui_main.js
CHANGED
|
@@ -167,8 +167,8 @@ function build_ui(gobj)
|
|
|
167
167
|
/*----------------------------------------------*
|
|
168
168
|
* Layout Schema
|
|
169
169
|
*----------------------------------------------*/
|
|
170
|
-
const $
|
|
171
|
-
['div', {id: 'root', class: 'root'}, [
|
|
170
|
+
const $container = createElement2(
|
|
171
|
+
['div', {id: 'root', class: 'C_YUI_MAIN root'}, [
|
|
172
172
|
['div', {id: 'top-layer', class: 'top-layer'}],
|
|
173
173
|
['div', {id: 'content-layer', class: 'content-layer is-hidden'}],
|
|
174
174
|
['div', {id: 'bottom-layer', class: 'bottom-layer'}],
|
|
@@ -178,7 +178,7 @@ function build_ui(gobj)
|
|
|
178
178
|
`<iframe id="iframe-publi-page" src="./${gobj_read_attr(gobj, "publi_page")}/index.html" width="100%" height="100%"></iframe>`]
|
|
179
179
|
]]
|
|
180
180
|
);
|
|
181
|
-
document.body.appendChild($
|
|
181
|
+
document.body.appendChild($container);
|
|
182
182
|
|
|
183
183
|
const iframe = document.getElementById('iframe-publi-page');
|
|
184
184
|
if(iframe) {
|
package/src/c_yui_map.js
CHANGED
|
@@ -111,8 +111,13 @@ function mt_create(gobj)
|
|
|
111
111
|
|
|
112
112
|
let map_settings = json_deep_copy(gobj_read_attr(gobj, "map_settings"));
|
|
113
113
|
|
|
114
|
+
let $map = gobj_read_attr(gobj, "$map");
|
|
115
|
+
if($map) {
|
|
116
|
+
/* Tag the external mount so this gclass is identifiable in the Inspector */
|
|
117
|
+
$map.classList.add(GCLASS_NAME);
|
|
118
|
+
}
|
|
114
119
|
Object.assign(map_settings, {
|
|
115
|
-
container:
|
|
120
|
+
container: $map,
|
|
116
121
|
});
|
|
117
122
|
|
|
118
123
|
/*-----------------------------*
|