@yuneta/gobj-ui 2.0.0 → 2.2.3
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 +25 -20
- package/dist/gobj-ui.cjs.js +2340 -528
- package/dist/gobj-ui.es.js +2340 -530
- package/index.js +32 -31
- package/package.json +6 -7
- package/{c_g6_nodes_tree.js → src/c_g6_nodes_tree.js} +6 -1
- package/{c_yui_form.js → src/c_yui_form.js} +1 -1
- package/{c_yui_gobj_tree_js.js → src/c_yui_gobj_tree_js.js} +1 -1
- package/{c_yui_json_graph.js → src/c_yui_json_graph.js} +1 -1
- package/{c_yui_main.js → src/c_yui_main.js} +3 -3
- package/{c_yui_map.js → src/c_yui_map.js} +6 -1
- package/{c_yui_nav.js → src/c_yui_nav.js} +134 -26
- package/{c_yui_pager.js → src/c_yui_pager.js} +1 -1
- package/{c_yui_routing.css → src/c_yui_routing.css} +1 -1
- package/{c_yui_routing.js → src/c_yui_routing.js} +1 -1
- package/{c_yui_shell.css → src/c_yui_shell.css} +110 -0
- package/{c_yui_shell.js → src/c_yui_shell.js} +175 -13
- package/{c_yui_tabs.js → src/c_yui_tabs.js} +1 -1
- package/{c_yui_treedb_graph.js → src/c_yui_treedb_graph.js} +35 -9
- package/{c_yui_treedb_topic_with_form.js → src/c_yui_treedb_topic_with_form.js} +1 -1
- package/{c_yui_treedb_topics.js → src/c_yui_treedb_topics.js} +36 -8
- package/{c_yui_uplot.js → src/c_yui_uplot.js} +1 -1
- package/{c_yui_window.js → src/c_yui_window.js} +242 -21
- package/src/c_yui_window_manager.js +602 -0
- package/{c_yui_wizard.js → src/c_yui_wizard.js} +1 -1
- package/{shell_modals.js → src/shell_modals.js} +53 -13
- package/src/tabulator.css +53 -0
- package/src/yui_dev.js +1484 -0
- package/{yui_icons.css → src/yui_icons.css} +5 -0
- package/src/yui_inputs.css +32 -0
- package/src/yui_inputs.js +71 -0
- package/vite.config.js +0 -131
- package/yui_dev.js +0 -583
- /package/{c_yui_main.css → src/c_yui_main.css} +0 -0
- /package/{c_yui_map.css → src/c_yui_map.css} +0 -0
- /package/{c_yui_treedb_topic_with_form.css → src/c_yui_treedb_topic_with_form.css} +0 -0
- /package/{g6_drag_canvas_touch.js → src/g6_drag_canvas_touch.js} +0 -0
- /package/{lib_graph.css → src/lib_graph.css} +0 -0
- /package/{lib_graph.js → src/lib_graph.js} +0 -0
- /package/{lib_icons.js → src/lib_icons.js} +0 -0
- /package/{lib_maplibre.js → src/lib_maplibre.js} +0 -0
- /package/{pager_helpers.js → src/pager_helpers.js} +0 -0
- /package/{pager_helpers.test.js → src/pager_helpers.test.js} +0 -0
- /package/{route_resolver.js → src/route_resolver.js} +0 -0
- /package/{route_resolver.test.js → src/route_resolver.test.js} +0 -0
- /package/{shell_focus_trap.js → src/shell_focus_trap.js} +0 -0
- /package/{shell_focus_trap.test.js → src/shell_focus_trap.test.js} +0 -0
- /package/{shell_show_on.js → src/shell_show_on.js} +0 -0
- /package/{shell_show_on.test.js → src/shell_show_on.test.js} +0 -0
- /package/{shell_toolbar_helpers.js → src/shell_toolbar_helpers.js} +0 -0
- /package/{shell_toolbar_helpers.test.js → src/shell_toolbar_helpers.test.js} +0 -0
- /package/{themes.js → src/themes.js} +0 -0
- /package/{wizard_helpers.js → src/wizard_helpers.js} +0 -0
- /package/{wizard_helpers.test.js → src/wizard_helpers.test.js} +0 -0
- /package/{ytable.css → src/ytable.css} +0 -0
- /package/{ytable.js → src/ytable.js} +0 -0
- /package/{yui_toolbar.css → src/yui_toolbar.css} +0 -0
- /package/{yui_toolbar.js → src/yui_toolbar.js} +0 -0
|
@@ -97,6 +97,11 @@
|
|
|
97
97
|
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M256 160l0 96 128 0 0-96-128 0zm-64 0l-128 0 0 96 128 0 0-96zM0 320L0 96C0 60.7 28.7 32 64 32l320 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64l0-96zm384 0l-128 0 0 96 128 0 0-96zM192 416l0-96-128 0 0 96 128 0z'/%3E%3C/svg%3E");
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
.yi-terminal::before {
|
|
101
|
+
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512'%3E%3Cpath d='M9.4 86.6C-3.1 74.1-3.1 53.9 9.4 41.4s32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L178.7 256 9.4 86.6zM256 416l288 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-288 0c-17.7 0-32-14.3-32-32s14.3-32 32-32z'/%3E%3C/svg%3E");
|
|
102
|
+
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512'%3E%3Cpath d='M9.4 86.6C-3.1 74.1-3.1 53.9 9.4 41.4s32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L178.7 256 9.4 86.6zM256 416l288 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-288 0c-17.7 0-32-14.3-32-32s14.3-32 32-32z'/%3E%3C/svg%3E");
|
|
103
|
+
}
|
|
104
|
+
|
|
100
105
|
.yi-user::before {
|
|
101
106
|
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M224 248a120 120 0 1 0 0-240 120 120 0 1 0 0 240zm-29.7 56C95.8 304 16 383.8 16 482.3 16 498.7 29.3 512 45.7 512l356.6 0c16.4 0 29.7-13.3 29.7-29.7 0-98.5-79.8-178.3-178.3-178.3l-59.4 0z'/%3E%3C/svg%3E");
|
|
102
107
|
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M224 248a120 120 0 1 0 0-240 120 120 0 1 0 0 240zm-29.7 56C95.8 304 16 383.8 16 482.3 16 498.7 29.3 512 45.7 512l356.6 0c16.4 0 29.7-13.3 29.7-29.7 0-98.5-79.8-178.3-178.3-178.3l-59.4 0z'/%3E%3C/svg%3E");
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/***********************************************************************
|
|
2
|
+
* yui_inputs.css
|
|
3
|
+
*
|
|
4
|
+
* Styling for the editable-input helpers in yui_inputs.js.
|
|
5
|
+
*
|
|
6
|
+
* The clear button itself is Bulma's `.delete`; here we only
|
|
7
|
+
* position it over the input's right padding and show it only
|
|
8
|
+
* while the field has content.
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) 2026, ArtGins.
|
|
11
|
+
* All Rights Reserved.
|
|
12
|
+
***********************************************************************/
|
|
13
|
+
.control.has-clear {
|
|
14
|
+
position: relative;
|
|
15
|
+
}
|
|
16
|
+
.control.has-clear input.input {
|
|
17
|
+
padding-right: 2.25em;
|
|
18
|
+
}
|
|
19
|
+
/* Descendant selector (3 classes) so these win over Bulma's own
|
|
20
|
+
* `.delete` rules (position:relative; display:inline-block) regardless
|
|
21
|
+
* of which stylesheet loads last. */
|
|
22
|
+
.control.has-clear .yui-input-clear {
|
|
23
|
+
position: absolute;
|
|
24
|
+
top: 50%;
|
|
25
|
+
right: 0.5em;
|
|
26
|
+
transform: translateY(-50%);
|
|
27
|
+
display: none;
|
|
28
|
+
z-index: 4;
|
|
29
|
+
}
|
|
30
|
+
.control.has-clear .yui-input-clear.is-visible {
|
|
31
|
+
display: inline-block;
|
|
32
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/***********************************************************************
|
|
2
|
+
* yui_inputs.js
|
|
3
|
+
*
|
|
4
|
+
* Reusable editable-input helpers.
|
|
5
|
+
*
|
|
6
|
+
* NORM: every editable text/search input gets a clear (✕) button
|
|
7
|
+
* that appears only while the field has content. `attach_clear()`
|
|
8
|
+
* wires it onto any Bulma `.control` that wraps an `<input>`:
|
|
9
|
+
*
|
|
10
|
+
* let $input = createElement2(["input", {class:"input"}, ...]);
|
|
11
|
+
* let $control = createElement2(["div", {class:"control"}, [$input]]);
|
|
12
|
+
* attach_clear($control, $input);
|
|
13
|
+
*
|
|
14
|
+
* The button is Bulma's own `.delete` (theme-aware). On click it
|
|
15
|
+
* clears the value, refocuses the input, and dispatches a synthetic
|
|
16
|
+
* `input` event so any existing listener (filter, etc.) reacts
|
|
17
|
+
* exactly as if the user emptied the field by hand. An optional
|
|
18
|
+
* `on_clear` callback runs after, for extra teardown (e.g. a
|
|
19
|
+
* console wiping its response panel).
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) 2026, ArtGins.
|
|
22
|
+
* All Rights Reserved.
|
|
23
|
+
***********************************************************************/
|
|
24
|
+
import "./yui_inputs.css";
|
|
25
|
+
|
|
26
|
+
import {createElement2} from "@yuneta/gobj-js";
|
|
27
|
+
|
|
28
|
+
import i18next from "i18next";
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
/***************************************************************
|
|
32
|
+
* Add a clear (✕) button to a Bulma control wrapping an input.
|
|
33
|
+
* Returns the button element (already appended to $control).
|
|
34
|
+
***************************************************************/
|
|
35
|
+
function attach_clear($control, $input, on_clear)
|
|
36
|
+
{
|
|
37
|
+
if(!$control || !$input) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
$control.classList.add("has-clear");
|
|
41
|
+
|
|
42
|
+
let $btn = createElement2(["button", {
|
|
43
|
+
type: "button",
|
|
44
|
+
class: "delete is-medium yui-input-clear",
|
|
45
|
+
tabindex: "-1",
|
|
46
|
+
title: i18next.t("clear"),
|
|
47
|
+
"aria-label": i18next.t("clear")
|
|
48
|
+
}]);
|
|
49
|
+
|
|
50
|
+
function sync()
|
|
51
|
+
{
|
|
52
|
+
$btn.classList.toggle("is-visible", !!$input.value);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
$input.addEventListener("input", sync);
|
|
56
|
+
$btn.addEventListener("click", () => {
|
|
57
|
+
$input.value = "";
|
|
58
|
+
$input.dispatchEvent(new Event("input", {bubbles: true}));
|
|
59
|
+
if(typeof on_clear === "function") {
|
|
60
|
+
on_clear();
|
|
61
|
+
}
|
|
62
|
+
$input.focus();
|
|
63
|
+
sync();
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
$control.appendChild($btn);
|
|
67
|
+
sync();
|
|
68
|
+
return $btn;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export {attach_clear};
|
package/vite.config.js
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "vite";
|
|
2
|
-
import terser from "@rollup/plugin-terser";
|
|
3
|
-
|
|
4
|
-
export default defineConfig({
|
|
5
|
-
build: {
|
|
6
|
-
lib: {
|
|
7
|
-
entry: "index.js",
|
|
8
|
-
name: "libYui"
|
|
9
|
-
},
|
|
10
|
-
rollupOptions: {
|
|
11
|
-
checks: {
|
|
12
|
-
pluginTimings: false
|
|
13
|
-
},
|
|
14
|
-
external: [
|
|
15
|
-
"@yuneta/gobj-js",
|
|
16
|
-
"@antv/g6",
|
|
17
|
-
"bulma",
|
|
18
|
-
"i18next",
|
|
19
|
-
"maplibre-gl",
|
|
20
|
-
"tabulator-tables",
|
|
21
|
-
"tom-select",
|
|
22
|
-
"uplot",
|
|
23
|
-
"vanilla-jsoneditor",
|
|
24
|
-
],
|
|
25
|
-
output: [
|
|
26
|
-
// Non-minified ES Module
|
|
27
|
-
{
|
|
28
|
-
format: "es",
|
|
29
|
-
dir: "dist",
|
|
30
|
-
entryFileNames: "gobj-ui.es.js",
|
|
31
|
-
},
|
|
32
|
-
// Non-minified UMD Module
|
|
33
|
-
{
|
|
34
|
-
name: "libYui",
|
|
35
|
-
format: "umd",
|
|
36
|
-
dir: "dist",
|
|
37
|
-
entryFileNames: "gobj-ui.umd.js",
|
|
38
|
-
globals: {
|
|
39
|
-
"@yuneta/gobj-js": "gobjJs",
|
|
40
|
-
"@antv/g6": "G6",
|
|
41
|
-
"i18next": "i18next",
|
|
42
|
-
"maplibre-gl": "maplibregl",
|
|
43
|
-
"tabulator-tables": "Tabulator",
|
|
44
|
-
"tom-select": "TomSelect",
|
|
45
|
-
"uplot": "uPlot",
|
|
46
|
-
"vanilla-jsoneditor": "JSONEditor",
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
// Non-minified CJS Module
|
|
50
|
-
{
|
|
51
|
-
name: "libYui",
|
|
52
|
-
format: "cjs",
|
|
53
|
-
dir: "dist",
|
|
54
|
-
entryFileNames: "gobj-ui.cjs.js",
|
|
55
|
-
},
|
|
56
|
-
// Non-minified IIFE Module
|
|
57
|
-
{
|
|
58
|
-
name: "libYui",
|
|
59
|
-
format: "iife",
|
|
60
|
-
dir: "dist",
|
|
61
|
-
entryFileNames: "gobj-ui.iife.js",
|
|
62
|
-
globals: {
|
|
63
|
-
"@yuneta/gobj-js": "gobjJs",
|
|
64
|
-
"@antv/g6": "G6",
|
|
65
|
-
"i18next": "i18next",
|
|
66
|
-
"maplibre-gl": "maplibregl",
|
|
67
|
-
"tabulator-tables": "Tabulator",
|
|
68
|
-
"tom-select": "TomSelect",
|
|
69
|
-
"uplot": "uPlot",
|
|
70
|
-
"vanilla-jsoneditor": "JSONEditor",
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
// Minified ES Module
|
|
75
|
-
{
|
|
76
|
-
format: "es",
|
|
77
|
-
dir: "dist",
|
|
78
|
-
entryFileNames: "gobj-ui.es.min.js",
|
|
79
|
-
plugins: [terser()]
|
|
80
|
-
},
|
|
81
|
-
// Minified UMD Module
|
|
82
|
-
{
|
|
83
|
-
name: "libYui",
|
|
84
|
-
format: "umd",
|
|
85
|
-
dir: "dist",
|
|
86
|
-
entryFileNames: "gobj-ui.umd.min.js",
|
|
87
|
-
plugins: [terser()],
|
|
88
|
-
globals: {
|
|
89
|
-
"@yuneta/gobj-js": "gobjJs",
|
|
90
|
-
"@antv/g6": "G6",
|
|
91
|
-
"i18next": "i18next",
|
|
92
|
-
"maplibre-gl": "maplibregl",
|
|
93
|
-
"tabulator-tables": "Tabulator",
|
|
94
|
-
"tom-select": "TomSelect",
|
|
95
|
-
"uplot": "uPlot",
|
|
96
|
-
"vanilla-jsoneditor": "JSONEditor",
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
// Minified CJS Module
|
|
100
|
-
{
|
|
101
|
-
name: "libYui",
|
|
102
|
-
format: "cjs",
|
|
103
|
-
dir: "dist",
|
|
104
|
-
entryFileNames: "gobj-ui.cjs.min.js",
|
|
105
|
-
plugins: [terser()]
|
|
106
|
-
},
|
|
107
|
-
// Minified IIFE Module
|
|
108
|
-
{
|
|
109
|
-
name: "libYui",
|
|
110
|
-
format: "iife",
|
|
111
|
-
dir: "dist",
|
|
112
|
-
entryFileNames: "gobj-ui.iife.min.js",
|
|
113
|
-
plugins: [terser()],
|
|
114
|
-
globals: {
|
|
115
|
-
"@yuneta/gobj-js": "gobjJs",
|
|
116
|
-
"@antv/g6": "G6",
|
|
117
|
-
"i18next": "i18next",
|
|
118
|
-
"maplibre-gl": "maplibregl",
|
|
119
|
-
"tabulator-tables": "Tabulator",
|
|
120
|
-
"tom-select": "TomSelect",
|
|
121
|
-
"uplot": "uPlot",
|
|
122
|
-
"vanilla-jsoneditor": "JSONEditor",
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
]
|
|
126
|
-
},
|
|
127
|
-
sourcemap: true,
|
|
128
|
-
minify: false,
|
|
129
|
-
target: "esnext"
|
|
130
|
-
}
|
|
131
|
-
});
|