@yuneta/gobj-ui 7.26.7 → 7.26.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/README.md +53 -0
- package/dist/gobj-ui.cjs.js +534 -232
- package/dist/gobj-ui.es.js +534 -232
- package/package.json +2 -2
- package/src/c_g6_nodes_tree.js +65 -31
- package/src/c_yui_form.js +230 -63
- package/src/c_yui_gclass.js +23 -22
- package/src/c_yui_gobj_tree_js.js +13 -9
- package/src/c_yui_json.js +7 -6
- package/src/c_yui_json_graph.js +8 -7
- package/src/c_yui_json_pad.js +2 -1
- package/src/c_yui_map.js +25 -1
- package/src/c_yui_nav.js +9 -8
- package/src/c_yui_schema_editor.js +25 -24
- package/src/c_yui_shell.js +64 -3
- package/src/c_yui_treedb_topic_with_form.js +26 -21
- package/src/c_yui_treedb_topics.js +17 -16
- package/src/c_yui_window.js +73 -32
- package/src/c_yui_window_manager.js +3 -2
- package/src/form_json_field.js +10 -3
- package/src/form_json_field.test.js +6 -0
- package/src/form_json_field.wiring.test.js +1 -1
- package/src/form_table_rearm.wiring.test.js +158 -0
- package/src/form_toolbar_plan.js +5 -5
- package/src/g6_event_kw.js +36 -0
- package/src/map_stop_windows.wiring.test.js +112 -0
- package/src/nav_cards_helpers.js +2 -1
- package/src/nav_cards_helpers.test.js +7 -3
- package/src/overlay_marker_after_back.wiring.test.js +212 -0
- package/src/schema_to_c.js +10 -0
- package/src/schema_to_c.test.js +8 -1
- package/src/shell_modals.js +7 -5
- package/src/shell_route_map.js +12 -13
- package/src/treedb_topics_transport.wiring.test.js +26 -0
- package/src/vite_plugin_yuneta_html.test.js +94 -0
- package/src/window_show.wiring.test.js +83 -0
- package/src/window_veto_back.wiring.test.js +35 -0
- package/src/yui_asset.js +3 -2
- package/src/yui_data_color.js +33 -0
- package/src/yui_data_color.test.js +27 -0
- package/src/yui_dev.js +15 -13
- package/src/yui_frontend_view.js +4 -4
- package/src/yui_gclass_view.js +3 -3
- package/src/yui_text.js +43 -0
- package/src/yui_text.test.js +67 -0
- package/vite-plugin-yuneta-html.js +24 -5
package/dist/gobj-ui.cjs.js
CHANGED
|
@@ -919,6 +919,7 @@ var PRIVATE_DATA$22 = {
|
|
|
919
919
|
overlay_stack: [],
|
|
920
920
|
overlay_seq: 0,
|
|
921
921
|
expected_pops: 0,
|
|
922
|
+
pending_markers: [],
|
|
922
923
|
popstate_handler: null,
|
|
923
924
|
avatar_provider: null,
|
|
924
925
|
avatar_nodes: [],
|
|
@@ -976,6 +977,7 @@ function mt_start$20(gobj) {
|
|
|
976
977
|
if (!p) return;
|
|
977
978
|
if (p.expected_pops > 0) {
|
|
978
979
|
p.expected_pops--;
|
|
980
|
+
if (p.expected_pops === 0) push_pending_markers(gobj);
|
|
979
981
|
return;
|
|
980
982
|
}
|
|
981
983
|
if (p.overlay_stack.length === 0) return;
|
|
@@ -2392,6 +2394,7 @@ function drain_overlays(gobj) {
|
|
|
2392
2394
|
let kept = [];
|
|
2393
2395
|
while (entries.length > 0) {
|
|
2394
2396
|
let entry = entries.pop();
|
|
2397
|
+
if (entry.dismissed) continue;
|
|
2395
2398
|
if (entry.keep_on_navigate) {
|
|
2396
2399
|
kept.unshift(entry);
|
|
2397
2400
|
continue;
|
|
@@ -2420,21 +2423,44 @@ function push_overlay_history(gobj, close, opts) {
|
|
|
2420
2423
|
keep_on_navigate: !!(opts && opts.keep_on_navigate)
|
|
2421
2424
|
};
|
|
2422
2425
|
priv.overlay_stack.push(entry);
|
|
2426
|
+
if (priv.expected_pops > 0) {
|
|
2427
|
+
entry.marker_pending = true;
|
|
2428
|
+
priv.pending_markers.push(entry);
|
|
2429
|
+
return entry;
|
|
2430
|
+
}
|
|
2431
|
+
if (!push_overlay_marker(gobj, entry)) return null;
|
|
2432
|
+
return entry;
|
|
2433
|
+
}
|
|
2434
|
+
function push_overlay_marker(gobj, entry) {
|
|
2435
|
+
let priv = gobj.priv;
|
|
2423
2436
|
try {
|
|
2424
2437
|
window.history.pushState({ __yui_overlay__: entry.id }, "");
|
|
2425
2438
|
} catch (e) {
|
|
2426
|
-
priv.overlay_stack.
|
|
2439
|
+
let idx = priv.overlay_stack.indexOf(entry);
|
|
2440
|
+
if (idx >= 0) priv.overlay_stack.splice(idx, 1);
|
|
2427
2441
|
(0, _yuneta_gobj_js.log_warning)(`C_YUI_SHELL: overlay pushState failed: ${e}`);
|
|
2428
|
-
return
|
|
2442
|
+
return false;
|
|
2443
|
+
}
|
|
2444
|
+
return true;
|
|
2445
|
+
}
|
|
2446
|
+
function push_pending_markers(gobj) {
|
|
2447
|
+
let priv = gobj.priv;
|
|
2448
|
+
let pending = priv.pending_markers.splice(0);
|
|
2449
|
+
for (let entry of pending) {
|
|
2450
|
+
entry.marker_pending = false;
|
|
2451
|
+
if (entry.dismissed || priv.overlay_stack.indexOf(entry) < 0) continue;
|
|
2452
|
+
entry.hash = window.location.hash;
|
|
2453
|
+
push_overlay_marker(gobj, entry);
|
|
2429
2454
|
}
|
|
2430
|
-
return entry;
|
|
2431
2455
|
}
|
|
2432
2456
|
function overlay_dismissed(gobj, entry) {
|
|
2433
2457
|
let priv = gobj.priv;
|
|
2434
2458
|
if (!priv || !priv.overlay_stack || !entry) return;
|
|
2459
|
+
entry.dismissed = true;
|
|
2435
2460
|
let idx = priv.overlay_stack.indexOf(entry);
|
|
2436
2461
|
if (idx < 0) return;
|
|
2437
2462
|
priv.overlay_stack.splice(idx, 1);
|
|
2463
|
+
if (entry.marker_pending) return;
|
|
2438
2464
|
let st = window.history.state;
|
|
2439
2465
|
if (st && st.__yui_overlay__ === entry.id) {
|
|
2440
2466
|
priv.expected_pops++;
|
|
@@ -3030,6 +3056,45 @@ function yui_shell_close_dropdown(shell_gobj) {
|
|
|
3030
3056
|
close_toolbar_dropdown(shell_gobj);
|
|
3031
3057
|
}
|
|
3032
3058
|
//#endregion
|
|
3059
|
+
//#region src/yui_text.js
|
|
3060
|
+
/***********************************************************************
|
|
3061
|
+
* yui_text.js
|
|
3062
|
+
*
|
|
3063
|
+
* DATA as text for createElement2().
|
|
3064
|
+
*
|
|
3065
|
+
* createElement2() takes a string content that starts with '<' for
|
|
3066
|
+
* MARKUP and parses it (that is how a component passes an inline
|
|
3067
|
+
* icon). So a value that came from outside -- a backend answer, a
|
|
3068
|
+
* treedb node, a name somebody typed, a frame of the traffic -- must
|
|
3069
|
+
* never go in as a bare string: "<img src=x onerror=...>" would run.
|
|
3070
|
+
* It goes in as a Text node, which is always text.
|
|
3071
|
+
*
|
|
3072
|
+
* Trimmed like createElement2() trims a string, so the change of
|
|
3073
|
+
* form does not change what is shown. A Text node under an
|
|
3074
|
+
* `i18n`/`data-i18n` element is still re-translated by
|
|
3075
|
+
* refresh_language(), which sets textContent.
|
|
3076
|
+
*
|
|
3077
|
+
* Copyright (c) 2026, ArtGins.
|
|
3078
|
+
* All Rights Reserved.
|
|
3079
|
+
***********************************************************************/
|
|
3080
|
+
/************************************************************
|
|
3081
|
+
* A Text node with `value` as its text ("" for null/undefined).
|
|
3082
|
+
************************************************************/
|
|
3083
|
+
function text_node(value) {
|
|
3084
|
+
if (value === null || value === void 0) return document.createTextNode("");
|
|
3085
|
+
return document.createTextNode(String(value).trim());
|
|
3086
|
+
}
|
|
3087
|
+
/************************************************************
|
|
3088
|
+
* A Tabulator `titleFormatter` that shows the column title as text.
|
|
3089
|
+
*
|
|
3090
|
+
* Tabulator puts a STRING title in with innerHTML, so a title taken
|
|
3091
|
+
* from a schema (`header`, which the schema editor writes) is markup
|
|
3092
|
+
* unless the column carries a formatter that returns a Node.
|
|
3093
|
+
************************************************************/
|
|
3094
|
+
function text_title_formatter(cell) {
|
|
3095
|
+
return text_node(cell.getValue());
|
|
3096
|
+
}
|
|
3097
|
+
//#endregion
|
|
3033
3098
|
//#region src/shell_modals.js
|
|
3034
3099
|
/***********************************************************************
|
|
3035
3100
|
* shell_modals.js
|
|
@@ -3142,7 +3207,7 @@ function show_notification(shell, kind, message, opts) {
|
|
|
3142
3207
|
...p_attrs,
|
|
3143
3208
|
class: "TOAST_MSG"
|
|
3144
3209
|
},
|
|
3145
|
-
message
|
|
3210
|
+
typeof message === "string" ? text_node(message) : message
|
|
3146
3211
|
]]
|
|
3147
3212
|
]);
|
|
3148
3213
|
$layer.appendChild($note);
|
|
@@ -3244,14 +3309,14 @@ function yui_shell_show_modal(shell, content, opts) {
|
|
|
3244
3309
|
(title_prefix ? [[
|
|
3245
3310
|
"span",
|
|
3246
3311
|
{ class: "MODAL_TITLE_PREFIX" },
|
|
3247
|
-
title_prefix
|
|
3312
|
+
text_node(title_prefix)
|
|
3248
3313
|
]] : []).concat(title ? [[
|
|
3249
3314
|
"span",
|
|
3250
3315
|
{
|
|
3251
3316
|
class: "MODAL_TITLE_KIND",
|
|
3252
3317
|
i18n: title
|
|
3253
3318
|
},
|
|
3254
|
-
title
|
|
3319
|
+
text_node(title)
|
|
3255
3320
|
]] : [])
|
|
3256
3321
|
],
|
|
3257
3322
|
[
|
|
@@ -3402,7 +3467,7 @@ function build_dialog(shell, message, buttons, opts) {
|
|
|
3402
3467
|
class: "CONFIRM_MSG yui-confirm-msg",
|
|
3403
3468
|
i18n: message
|
|
3404
3469
|
},
|
|
3405
|
-
message
|
|
3470
|
+
text_node(message)
|
|
3406
3471
|
]] : [message];
|
|
3407
3472
|
let $footer_children = buttons.map((b) => {
|
|
3408
3473
|
let cls = "CONFIRM_BTN button px-5";
|
|
@@ -3440,7 +3505,7 @@ function build_dialog(shell, message, buttons, opts) {
|
|
|
3440
3505
|
class: "CONFIRM_TITLE yui-confirm-title has-text-centered",
|
|
3441
3506
|
i18n: title
|
|
3442
3507
|
},
|
|
3443
|
-
title
|
|
3508
|
+
text_node(title)
|
|
3444
3509
|
]);
|
|
3445
3510
|
$card_children.push(["button", {
|
|
3446
3511
|
class: "CONFIRM_CLOSE delete yui-confirm-x",
|
|
@@ -3645,9 +3710,9 @@ var attrs_table$21 = [
|
|
|
3645
3710
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "title_prefix", 0, "", "Optional DATA half of the title (a topic/service/marker name), shown before `title` and never translated. Use it instead of composing `${name} · ${t(key)}` into `title`, which cannot re-translate"),
|
|
3646
3711
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "title", 0, "", "Window title, an i18n KEY: painted in the title bar (unless `header` overrides it) and on the dock chip. Pass the key, not t(key), or it cannot re-translate"),
|
|
3647
3712
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "icon", 0, "", "Window icon (by window type), leading the title bar and the dock chip: a yi-* class name or inline SVG"),
|
|
3648
|
-
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "focus", 0, null, "
|
|
3649
|
-
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_BOOLEAN, "modal", 0, false, "
|
|
3650
|
-
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_BOOLEAN, "keyboard", 0, true, "
|
|
3713
|
+
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "focus", 0, null, "NOT implemented yet: would bring focus to the element, a number or a selector"),
|
|
3714
|
+
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_BOOLEAN, "modal", 0, false, "NOT implemented yet: would enable modal mode"),
|
|
3715
|
+
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_BOOLEAN, "keyboard", 0, true, "NOT implemented yet: would close the window on ESC (Escape does nothing today)"),
|
|
3651
3716
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_BOOLEAN, "back_dismissable", 0, true, "Browser Back closes this window (floating overlays only; ignored when it has a `manager`)"),
|
|
3652
3717
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_BOOLEAN, "keep_on_navigate", 0, false, "This window is a navigation PANEL: a route change does not close it"),
|
|
3653
3718
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "back_overlay", 0, null, "Internal: overlay-history entry (Back-button integration)"),
|
|
@@ -3806,7 +3871,7 @@ function build_default_header(gobj) {
|
|
|
3806
3871
|
if (!(0, _yuneta_gobj_js.empty_string)(prefix)) items.push([
|
|
3807
3872
|
"span",
|
|
3808
3873
|
{ class: "WINDOW_TITLE_PREFIX has-text-weight-semibold" },
|
|
3809
|
-
|
|
3874
|
+
text_node(prefix)
|
|
3810
3875
|
]);
|
|
3811
3876
|
if (!(0, _yuneta_gobj_js.empty_string)(title)) items.push([
|
|
3812
3877
|
"span",
|
|
@@ -3814,7 +3879,7 @@ function build_default_header(gobj) {
|
|
|
3814
3879
|
class: "WINDOW_TITLE_KIND has-text-weight-semibold",
|
|
3815
3880
|
i18n: title
|
|
3816
3881
|
},
|
|
3817
|
-
title
|
|
3882
|
+
text_node(title)
|
|
3818
3883
|
]);
|
|
3819
3884
|
return (0, _yuneta_gobj_js.createElement2)([
|
|
3820
3885
|
"span",
|
|
@@ -4152,15 +4217,24 @@ function destroy_ui$13(gobj) {
|
|
|
4152
4217
|
function register_back_overlay(gobj) {
|
|
4153
4218
|
let shell = yui_shell_of(gobj);
|
|
4154
4219
|
if (!shell) return;
|
|
4220
|
+
const rearm = function() {
|
|
4221
|
+
if (!(0, _yuneta_gobj_js.gobj_is_destroying)(gobj) && !(0, _yuneta_gobj_js.gobj_read_attr)(gobj, "back_overlay")) register_back_overlay(gobj);
|
|
4222
|
+
};
|
|
4155
4223
|
let overlay = yui_shell_register_overlay(shell, function() {
|
|
4156
4224
|
(0, _yuneta_gobj_js.gobj_write_attr)(gobj, "back_overlay", null);
|
|
4157
|
-
close_window(gobj);
|
|
4158
|
-
if (
|
|
4225
|
+
const closing = close_window(gobj);
|
|
4226
|
+
if (closing.state === "vetoed") rearm();
|
|
4227
|
+
else if (closing.state === "asking") closing.answer.then(rearm);
|
|
4159
4228
|
}, { keep_on_navigate: (0, _yuneta_gobj_js.gobj_read_bool_attr)(gobj, "keep_on_navigate") });
|
|
4160
4229
|
(0, _yuneta_gobj_js.gobj_write_attr)(gobj, "back_overlay", overlay);
|
|
4161
4230
|
}
|
|
4162
4231
|
/************************************************************
|
|
4163
|
-
*
|
|
4232
|
+
* Ask to close the window. Answers what happened:
|
|
4233
|
+
* {state: "closed"} the window is destroyed
|
|
4234
|
+
* {state: "vetoed"} a subscriber kept it open
|
|
4235
|
+
* {state: "asking", answer} a subscriber asked a question
|
|
4236
|
+
* first; `answer` resolves to
|
|
4237
|
+
* it once it is over
|
|
4164
4238
|
************************************************************/
|
|
4165
4239
|
function close_window(gobj) {
|
|
4166
4240
|
let kw_close = { abort_close: false };
|
|
@@ -4171,19 +4245,26 @@ function close_window(gobj) {
|
|
|
4171
4245
|
if ((0, _yuneta_gobj_js.gobj_is_running)(gobj)) (0, _yuneta_gobj_js.gobj_stop)(gobj);
|
|
4172
4246
|
(0, _yuneta_gobj_js.gobj_stop_children)(gobj);
|
|
4173
4247
|
(0, _yuneta_gobj_js.gobj_destroy)(gobj);
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4248
|
+
return { state: "closed" };
|
|
4249
|
+
}
|
|
4250
|
+
if (!kw_close.warning) return { state: "vetoed" };
|
|
4251
|
+
return {
|
|
4252
|
+
state: "asking",
|
|
4253
|
+
answer: yui_shell_confirm_yesnocancel(yui_shell_of(gobj), kw_close.warning, {
|
|
4254
|
+
t: i18next.t,
|
|
4255
|
+
yes_label: "yes",
|
|
4256
|
+
no_label: "no",
|
|
4257
|
+
cancel_label: "cancel"
|
|
4258
|
+
}).then(function(answer) {
|
|
4259
|
+
if (answer !== "yes") return answer;
|
|
4260
|
+
if ((0, _yuneta_gobj_js.gobj_is_destroying)(gobj)) return answer;
|
|
4261
|
+
if (on_close) on_close();
|
|
4262
|
+
if ((0, _yuneta_gobj_js.gobj_is_running)(gobj)) (0, _yuneta_gobj_js.gobj_stop)(gobj);
|
|
4263
|
+
(0, _yuneta_gobj_js.gobj_stop_children)(gobj);
|
|
4264
|
+
(0, _yuneta_gobj_js.gobj_destroy)(gobj);
|
|
4265
|
+
return answer;
|
|
4266
|
+
})
|
|
4267
|
+
};
|
|
4187
4268
|
}
|
|
4188
4269
|
/************************************************************
|
|
4189
4270
|
*
|
|
@@ -4444,6 +4525,19 @@ function ac_refresh$11(gobj, event, kw, src) {
|
|
|
4444
4525
|
*
|
|
4445
4526
|
************************************************************/
|
|
4446
4527
|
function ac_show$15(gobj, event, kw, src) {
|
|
4528
|
+
let manager = (0, _yuneta_gobj_js.gobj_read_pointer_attr)(gobj, "manager");
|
|
4529
|
+
if (manager) {
|
|
4530
|
+
(0, _yuneta_gobj_js.gobj_send_event)(manager, "EV_FOCUS_WINDOW", { window: gobj }, gobj);
|
|
4531
|
+
return 0;
|
|
4532
|
+
}
|
|
4533
|
+
let $container = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "$container");
|
|
4534
|
+
if (!$container) {
|
|
4535
|
+
(0, _yuneta_gobj_js.log_error)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)}: EV_SHOW without a container`);
|
|
4536
|
+
return -1;
|
|
4537
|
+
}
|
|
4538
|
+
$container.style.removeProperty("display");
|
|
4539
|
+
let $parent = $container.parentNode;
|
|
4540
|
+
if ($parent && $parent.lastChild !== $container) $parent.appendChild($container);
|
|
4447
4541
|
return 0;
|
|
4448
4542
|
}
|
|
4449
4543
|
/************************************************************
|
|
@@ -4865,7 +4959,7 @@ function ac_register_window(gobj, event, kw, src) {
|
|
|
4865
4959
|
if (prefix) label_items.push([
|
|
4866
4960
|
"span",
|
|
4867
4961
|
{ class: "yui-dock-label-prefix" },
|
|
4868
|
-
|
|
4962
|
+
text_node(prefix)
|
|
4869
4963
|
]);
|
|
4870
4964
|
if (title_key) label_items.push([
|
|
4871
4965
|
"span",
|
|
@@ -4878,7 +4972,7 @@ function ac_register_window(gobj, event, kw, src) {
|
|
|
4878
4972
|
if (label_items.length === 0) label_items.push([
|
|
4879
4973
|
"span",
|
|
4880
4974
|
{ class: "yui-dock-label-kind" },
|
|
4881
|
-
|
|
4975
|
+
text_node(title)
|
|
4882
4976
|
]);
|
|
4883
4977
|
let entry = {
|
|
4884
4978
|
gobj: win,
|
|
@@ -6549,12 +6643,12 @@ function yui_asset_element(answer, opts = {}) {
|
|
|
6549
6643
|
const children = [[
|
|
6550
6644
|
"span",
|
|
6551
6645
|
{ class: "ASSET_OTHER_TYPE" },
|
|
6552
|
-
|
|
6646
|
+
text_node(answer.content_type || "?")
|
|
6553
6647
|
]];
|
|
6554
6648
|
if (opts.detail) children.push([
|
|
6555
6649
|
"span",
|
|
6556
6650
|
{ class: "ASSET_OTHER_DETAIL" },
|
|
6557
|
-
|
|
6651
|
+
text_node(opts.detail)
|
|
6558
6652
|
]);
|
|
6559
6653
|
const $card = (0, _yuneta_gobj_js.createElement2)([
|
|
6560
6654
|
"div",
|
|
@@ -8155,13 +8249,18 @@ function parse_json_field(value, type) {
|
|
|
8155
8249
|
};
|
|
8156
8250
|
}
|
|
8157
8251
|
/************************************************************
|
|
8158
|
-
* What a jsoneditor content ({text} or {json}) holds:
|
|
8159
|
-
* text as typed, or the tree-mode json
|
|
8252
|
+
* What a jsoneditor content ({text} or {json}) holds, as TEXT:
|
|
8253
|
+
* the text as typed, or the tree-mode json serialized -- which is
|
|
8254
|
+
* what get_form_values() reads out of the editor too. Handing the
|
|
8255
|
+
* tree-mode value back as is made parse_json_field() parse a
|
|
8256
|
+
* string ROOT a second time: "123" was checked as the number 123,
|
|
8257
|
+
* and "abc" as a text that is no json.
|
|
8160
8258
|
************************************************************/
|
|
8161
8259
|
function json_editor_value(content) {
|
|
8162
8260
|
if (!content) return;
|
|
8163
8261
|
if (content.text !== void 0) return content.text;
|
|
8164
|
-
|
|
8262
|
+
if (content.json === void 0) return;
|
|
8263
|
+
return JSON.stringify(content.json);
|
|
8165
8264
|
}
|
|
8166
8265
|
//#endregion
|
|
8167
8266
|
//#region src/c_yui_form.js
|
|
@@ -8210,7 +8309,11 @@ var attrs_table$17 = [
|
|
|
8210
8309
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_BOOLEAN, "changes", 0, false, "Indicates if changes have been made"),
|
|
8211
8310
|
(0, _yuneta_gobj_js.SDATA_END)()
|
|
8212
8311
|
];
|
|
8213
|
-
var PRIVATE_DATA$17 = {
|
|
8312
|
+
var PRIVATE_DATA$17 = {
|
|
8313
|
+
rearm_timer: null,
|
|
8314
|
+
tables: null,
|
|
8315
|
+
table_seq: 0
|
|
8316
|
+
};
|
|
8214
8317
|
var __gclass__$17 = null;
|
|
8215
8318
|
/***************************
|
|
8216
8319
|
* Framework Methods
|
|
@@ -8224,6 +8327,7 @@ function mt_create$17(gobj) {
|
|
|
8224
8327
|
(0, _yuneta_gobj_js.gobj_subscribe_event)(gobj, null, {}, subscriber);
|
|
8225
8328
|
let name = (0, _yuneta_gobj_js.clean_name)((0, _yuneta_gobj_js.gobj_name)(gobj));
|
|
8226
8329
|
(0, _yuneta_gobj_js.gobj_write_attr)(gobj, "form_id", "form" + name);
|
|
8330
|
+
gobj.priv.tables = /* @__PURE__ */ new Map();
|
|
8227
8331
|
build_ui$15(gobj);
|
|
8228
8332
|
}
|
|
8229
8333
|
/************************************************************
|
|
@@ -8277,26 +8381,30 @@ function set_changed_stated(gobj, changed) {
|
|
|
8277
8381
|
enable($button_save, true, "MediumSeaGreen");
|
|
8278
8382
|
enable($button_undo, true, "Magenta");
|
|
8279
8383
|
$form.querySelectorAll(".yui-tabulator-table").forEach(($table) => {
|
|
8280
|
-
if (isEventSet($table.tabulator, "dataChanged")) $table.tabulator.off("dataChanged");
|
|
8384
|
+
if ($table.tabulator && isEventSet($table.tabulator, "dataChanged")) $table.tabulator.off("dataChanged");
|
|
8281
8385
|
$table.querySelectorAll(".yui-tabulator-table-nested").forEach(($table_nested) => {
|
|
8282
|
-
if (isEventSet($table_nested.tabulator, "dataChanged")) $table_nested.tabulator.off("dataChanged");
|
|
8386
|
+
if ($table_nested.tabulator && isEventSet($table_nested.tabulator, "dataChanged")) $table_nested.tabulator.off("dataChanged");
|
|
8283
8387
|
});
|
|
8284
8388
|
});
|
|
8285
8389
|
} else {
|
|
8286
8390
|
(0, _yuneta_gobj_js.gobj_write_bool_attr)(gobj, "changes", false);
|
|
8287
8391
|
enable($button_save, false, OFF_COLOR);
|
|
8288
8392
|
enable($button_undo, false, OFF_COLOR);
|
|
8289
|
-
|
|
8290
|
-
|
|
8291
|
-
|
|
8292
|
-
|
|
8393
|
+
if (gobj.priv.rearm_timer) clearTimeout(gobj.priv.rearm_timer);
|
|
8394
|
+
gobj.priv.rearm_timer = setTimeout(function() {
|
|
8395
|
+
gobj.priv.rearm_timer = null;
|
|
8396
|
+
if ((0, _yuneta_gobj_js.gobj_is_destroying)(gobj)) return;
|
|
8397
|
+
const rearm = (tabulator) => {
|
|
8398
|
+
if (!tabulator) return;
|
|
8399
|
+
if (isEventSet(tabulator, "dataChanged")) tabulator.off("dataChanged");
|
|
8400
|
+
tabulator.on("dataChanged", function(data) {
|
|
8293
8401
|
(0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_RECORD_CHANGED", {}, gobj);
|
|
8294
8402
|
});
|
|
8403
|
+
};
|
|
8404
|
+
$form.querySelectorAll(".yui-tabulator-table").forEach(($table) => {
|
|
8405
|
+
rearm($table.tabulator);
|
|
8295
8406
|
$table.querySelectorAll(".yui-tabulator-table-nested").forEach(($table_nested) => {
|
|
8296
|
-
|
|
8297
|
-
$table_nested.tabulator.on("dataChanged", function(data) {
|
|
8298
|
-
(0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_RECORD_CHANGED", {}, gobj);
|
|
8299
|
-
});
|
|
8407
|
+
rearm($table_nested.tabulator);
|
|
8300
8408
|
});
|
|
8301
8409
|
});
|
|
8302
8410
|
}, 200);
|
|
@@ -8526,9 +8634,14 @@ function build_ui$15(gobj) {
|
|
|
8526
8634
|
* Destroy UI
|
|
8527
8635
|
************************************************************/
|
|
8528
8636
|
function destroy_ui$10(gobj) {
|
|
8637
|
+
if (gobj.priv && gobj.priv.rearm_timer) {
|
|
8638
|
+
clearTimeout(gobj.priv.rearm_timer);
|
|
8639
|
+
gobj.priv.rearm_timer = null;
|
|
8640
|
+
}
|
|
8529
8641
|
let $container = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "$container");
|
|
8530
8642
|
if ($container) {
|
|
8531
8643
|
destroy_widgets(gobj, $container);
|
|
8644
|
+
if (gobj.priv && gobj.priv.tables) gobj.priv.tables.clear();
|
|
8532
8645
|
if ($container.parentNode) $container.parentNode.removeChild($container);
|
|
8533
8646
|
(0, _yuneta_gobj_js.gobj_write_attr)(gobj, "$container", null);
|
|
8534
8647
|
}
|
|
@@ -8542,11 +8655,52 @@ function destroy_ui$10(gobj) {
|
|
|
8542
8655
|
function cell_icon(icon_class, key) {
|
|
8543
8656
|
let $i = document.createElement("i");
|
|
8544
8657
|
$i.className = icon_class;
|
|
8658
|
+
$i.setAttribute("role", "button");
|
|
8659
|
+
$i.setAttribute("tabindex", "0");
|
|
8545
8660
|
$i.setAttribute("title", (0, i18next.t)(key));
|
|
8661
|
+
$i.setAttribute("data-i18n-title", key);
|
|
8546
8662
|
$i.setAttribute("aria-label", (0, i18next.t)(key));
|
|
8663
|
+
$i.setAttribute("data-i18n-aria-label", key);
|
|
8664
|
+
$i.addEventListener("keydown", function(evt) {
|
|
8665
|
+
if (evt.key === "Enter" || evt.key === " ") {
|
|
8666
|
+
evt.preventDefault();
|
|
8667
|
+
$i.click();
|
|
8668
|
+
}
|
|
8669
|
+
});
|
|
8547
8670
|
return $i;
|
|
8548
8671
|
}
|
|
8549
8672
|
/************************************************************
|
|
8673
|
+
* The identity of a table element, for the kw of
|
|
8674
|
+
* EV_ADD_TABLE_ROW: a kw is plain json, and an element (with its
|
|
8675
|
+
* `.tabulator`, circular) broke the `machine` trace that dumps it.
|
|
8676
|
+
* Given on first use and kept on the element; the registry holds
|
|
8677
|
+
* it weakly, so a nested table re-built by its row formatter is
|
|
8678
|
+
* not kept alive by it.
|
|
8679
|
+
************************************************************/
|
|
8680
|
+
function table_identity(gobj, $table) {
|
|
8681
|
+
if (!$table.yui_table_id) {
|
|
8682
|
+
let priv = gobj.priv;
|
|
8683
|
+
for (let [id, ref] of priv.tables) if (!ref.deref()) priv.tables.delete(id);
|
|
8684
|
+
priv.table_seq += 1;
|
|
8685
|
+
$table.yui_table_id = `t${priv.table_seq}`;
|
|
8686
|
+
priv.tables.set($table.yui_table_id, new WeakRef($table));
|
|
8687
|
+
}
|
|
8688
|
+
return $table.yui_table_id;
|
|
8689
|
+
}
|
|
8690
|
+
/************************************************************
|
|
8691
|
+
* The element of a table identity, or null when it is gone.
|
|
8692
|
+
************************************************************/
|
|
8693
|
+
function find_table(gobj, table_id) {
|
|
8694
|
+
let priv = gobj.priv;
|
|
8695
|
+
let ref = priv.tables ? priv.tables.get(table_id) : null;
|
|
8696
|
+
let $table = ref ? ref.deref() : null;
|
|
8697
|
+
if (!$table) {
|
|
8698
|
+
if (priv.tables) priv.tables.delete(table_id);
|
|
8699
|
+
return null;
|
|
8700
|
+
}
|
|
8701
|
+
return $table;
|
|
8702
|
+
}
|
|
8703
|
+
/************************************************************
|
|
8550
8704
|
* Destroy the third-party widgets the form built. Removing
|
|
8551
8705
|
* their DOM is not enough: Tom Select keeps listeners on
|
|
8552
8706
|
* `document` and `window`, the jsoneditor is a live Svelte app
|
|
@@ -8557,16 +8711,23 @@ function cell_icon(icon_class, key) {
|
|
|
8557
8711
|
function destroy_widgets(gobj, $container) {
|
|
8558
8712
|
let destroy = (what, widget) => {
|
|
8559
8713
|
try {
|
|
8560
|
-
widget.destroy();
|
|
8714
|
+
let r = widget.destroy();
|
|
8715
|
+
if (r && typeof r.then === "function") r.catch((e) => {
|
|
8716
|
+
(0, _yuneta_gobj_js.log_warning)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)}: cannot destroy ${what}: ${e}`);
|
|
8717
|
+
});
|
|
8561
8718
|
} catch (e) {
|
|
8562
8719
|
(0, _yuneta_gobj_js.log_warning)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)}: cannot destroy ${what}: ${e}`);
|
|
8563
8720
|
}
|
|
8564
8721
|
};
|
|
8722
|
+
let forget = ($el) => {
|
|
8723
|
+
if ($el.yui_table_id && gobj.priv && gobj.priv.tables) gobj.priv.tables.delete($el.yui_table_id);
|
|
8724
|
+
};
|
|
8565
8725
|
$container.querySelectorAll(".yui-tabulator-table-nested").forEach(($el) => {
|
|
8566
8726
|
if ($el.tabulator) {
|
|
8567
8727
|
destroy("nested table", $el.tabulator);
|
|
8568
8728
|
$el.tabulator = null;
|
|
8569
8729
|
}
|
|
8730
|
+
forget($el);
|
|
8570
8731
|
});
|
|
8571
8732
|
$container.querySelectorAll(".yui-form-data-input").forEach(($el) => {
|
|
8572
8733
|
if ($el.tom_select) {
|
|
@@ -8581,6 +8742,7 @@ function destroy_widgets(gobj, $container) {
|
|
|
8581
8742
|
destroy("table", $el.tabulator);
|
|
8582
8743
|
$el.tabulator = null;
|
|
8583
8744
|
}
|
|
8745
|
+
forget($el);
|
|
8584
8746
|
});
|
|
8585
8747
|
}
|
|
8586
8748
|
/******************************************************************
|
|
@@ -8615,6 +8777,25 @@ function name_form_control($field, conf) {
|
|
|
8615
8777
|
$ts.setAttribute("aria-label", (0, i18next.t)(key));
|
|
8616
8778
|
$ts.setAttribute("data-i18n-aria-label", key);
|
|
8617
8779
|
}
|
|
8780
|
+
let $clear = $field.querySelector(".ts-wrapper .clear-button");
|
|
8781
|
+
if ($clear) {
|
|
8782
|
+
const CLEAR_KEY = "remove all selected options";
|
|
8783
|
+
$clear.setAttribute("role", "button");
|
|
8784
|
+
$clear.setAttribute("tabindex", "0");
|
|
8785
|
+
if (!$clear.yui_keys_wired) {
|
|
8786
|
+
$clear.yui_keys_wired = true;
|
|
8787
|
+
$clear.addEventListener("keydown", function(evt) {
|
|
8788
|
+
if (evt.key === "Enter" || evt.key === " ") {
|
|
8789
|
+
evt.preventDefault();
|
|
8790
|
+
$clear.click();
|
|
8791
|
+
}
|
|
8792
|
+
});
|
|
8793
|
+
}
|
|
8794
|
+
$clear.setAttribute("title", (0, i18next.t)(CLEAR_KEY));
|
|
8795
|
+
$clear.setAttribute("data-i18n-title", CLEAR_KEY);
|
|
8796
|
+
$clear.setAttribute("aria-label", (0, i18next.t)(CLEAR_KEY));
|
|
8797
|
+
$clear.setAttribute("data-i18n-aria-label", CLEAR_KEY);
|
|
8798
|
+
}
|
|
8618
8799
|
}
|
|
8619
8800
|
function build_form(gobj) {
|
|
8620
8801
|
let form_id = (0, _yuneta_gobj_js.gobj_read_str_attr)(gobj, "form_id");
|
|
@@ -8965,12 +9146,7 @@ function apply_form_mode(gobj, $form) {
|
|
|
8965
9146
|
******************************************************************/
|
|
8966
9147
|
function create_form_field(gobj, $form, prefix, field_desc, { tag, inputType, name, label, label_i18n, placeholder, options, extras, readonly, required, hidden, default_value }) {
|
|
8967
9148
|
let $element;
|
|
8968
|
-
let
|
|
8969
|
-
$row: null,
|
|
8970
|
-
$table: null,
|
|
8971
|
-
record: {},
|
|
8972
|
-
loading: false
|
|
8973
|
-
};
|
|
9149
|
+
let $add_table = null;
|
|
8974
9150
|
switch (tag) {
|
|
8975
9151
|
case "input":
|
|
8976
9152
|
switch (inputType) {
|
|
@@ -8988,7 +9164,7 @@ function create_form_field(gobj, $form, prefix, field_desc, { tag, inputType, na
|
|
|
8988
9164
|
i18n: label_i18n || label,
|
|
8989
9165
|
for: name
|
|
8990
9166
|
},
|
|
8991
|
-
label
|
|
9167
|
+
text_node(label)
|
|
8992
9168
|
]]
|
|
8993
9169
|
], [
|
|
8994
9170
|
"div",
|
|
@@ -9021,7 +9197,7 @@ function create_form_field(gobj, $form, prefix, field_desc, { tag, inputType, na
|
|
|
9021
9197
|
i18n: label_i18n || label,
|
|
9022
9198
|
for: name
|
|
9023
9199
|
},
|
|
9024
|
-
label
|
|
9200
|
+
text_node(label)
|
|
9025
9201
|
]]
|
|
9026
9202
|
], [
|
|
9027
9203
|
"div",
|
|
@@ -9062,7 +9238,7 @@ function create_form_field(gobj, $form, prefix, field_desc, { tag, inputType, na
|
|
|
9062
9238
|
i18n: label_i18n || label,
|
|
9063
9239
|
for: name
|
|
9064
9240
|
},
|
|
9065
|
-
label
|
|
9241
|
+
text_node(label)
|
|
9066
9242
|
]]
|
|
9067
9243
|
], [
|
|
9068
9244
|
"div",
|
|
@@ -9093,7 +9269,7 @@ function create_form_field(gobj, $form, prefix, field_desc, { tag, inputType, na
|
|
|
9093
9269
|
i18n: label_i18n || label,
|
|
9094
9270
|
for: name
|
|
9095
9271
|
},
|
|
9096
|
-
label
|
|
9272
|
+
text_node(label)
|
|
9097
9273
|
]]
|
|
9098
9274
|
], [
|
|
9099
9275
|
"div",
|
|
@@ -9123,7 +9299,7 @@ function create_form_field(gobj, $form, prefix, field_desc, { tag, inputType, na
|
|
|
9123
9299
|
class: "label",
|
|
9124
9300
|
i18n: label_i18n || label
|
|
9125
9301
|
},
|
|
9126
|
-
label
|
|
9302
|
+
text_node(label)
|
|
9127
9303
|
]]
|
|
9128
9304
|
], [
|
|
9129
9305
|
"div",
|
|
@@ -9158,7 +9334,15 @@ function create_form_field(gobj, $form, prefix, field_desc, { tag, inputType, na
|
|
|
9158
9334
|
{ click: function(evt) {
|
|
9159
9335
|
evt.stopPropagation();
|
|
9160
9336
|
evt.preventDefault();
|
|
9161
|
-
(
|
|
9337
|
+
if (!$add_table) {
|
|
9338
|
+
(0, _yuneta_gobj_js.log_error)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)}: "add" of a field without a table`);
|
|
9339
|
+
return;
|
|
9340
|
+
}
|
|
9341
|
+
(0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_ADD_TABLE_ROW", {
|
|
9342
|
+
table_id: table_identity(gobj, $add_table),
|
|
9343
|
+
record: {},
|
|
9344
|
+
loading: false
|
|
9345
|
+
}, gobj);
|
|
9162
9346
|
} }
|
|
9163
9347
|
]]
|
|
9164
9348
|
]]
|
|
@@ -9214,7 +9398,7 @@ function create_form_field(gobj, $form, prefix, field_desc, { tag, inputType, na
|
|
|
9214
9398
|
i18n: label_i18n || label,
|
|
9215
9399
|
for: name
|
|
9216
9400
|
},
|
|
9217
|
-
label
|
|
9401
|
+
text_node(label)
|
|
9218
9402
|
]]
|
|
9219
9403
|
], [
|
|
9220
9404
|
"div",
|
|
@@ -9300,7 +9484,7 @@ function create_form_field(gobj, $form, prefix, field_desc, { tag, inputType, na
|
|
|
9300
9484
|
value: option,
|
|
9301
9485
|
i18n: option
|
|
9302
9486
|
},
|
|
9303
|
-
|
|
9487
|
+
text_node(option)
|
|
9304
9488
|
]),
|
|
9305
9489
|
{ "change": function(evt) {
|
|
9306
9490
|
(0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_RECORD_CHANGED", {}, gobj);
|
|
@@ -9329,14 +9513,14 @@ function create_form_field(gobj, $form, prefix, field_desc, { tag, inputType, na
|
|
|
9329
9513
|
opts.map((option) => is_icon ? [
|
|
9330
9514
|
"option",
|
|
9331
9515
|
{ value: option },
|
|
9332
|
-
option
|
|
9516
|
+
text_node(option)
|
|
9333
9517
|
] : [
|
|
9334
9518
|
"option",
|
|
9335
9519
|
{
|
|
9336
9520
|
value: option,
|
|
9337
9521
|
i18n: option
|
|
9338
9522
|
},
|
|
9339
|
-
option
|
|
9523
|
+
text_node(option)
|
|
9340
9524
|
])
|
|
9341
9525
|
];
|
|
9342
9526
|
$extend = (0, _yuneta_gobj_js.createElement2)(extend);
|
|
@@ -9389,7 +9573,7 @@ function create_form_field(gobj, $form, prefix, field_desc, { tag, inputType, na
|
|
|
9389
9573
|
}], [
|
|
9390
9574
|
"span",
|
|
9391
9575
|
{ i18n: label_key },
|
|
9392
|
-
label_key
|
|
9576
|
+
text_node(label_key)
|
|
9393
9577
|
]]
|
|
9394
9578
|
]);
|
|
9395
9579
|
$control.appendChild($extend);
|
|
@@ -9441,7 +9625,7 @@ function create_form_field(gobj, $form, prefix, field_desc, { tag, inputType, na
|
|
|
9441
9625
|
}]);
|
|
9442
9626
|
$control.appendChild($extend);
|
|
9443
9627
|
$extend.tabulator = create_tabulator$1(gobj, $extend, name, options);
|
|
9444
|
-
|
|
9628
|
+
$add_table = $extend;
|
|
9445
9629
|
break;
|
|
9446
9630
|
case "coordinates": {
|
|
9447
9631
|
let attrs = {
|
|
@@ -9791,6 +9975,7 @@ function template2columns(gobj, columns, template, sub_elements) {
|
|
|
9791
9975
|
let column = {
|
|
9792
9976
|
field: field_desc.name,
|
|
9793
9977
|
title: (0, i18next.t)(field_desc.header || field_desc.name),
|
|
9978
|
+
titleFormatter: text_title_formatter,
|
|
9794
9979
|
editable: get_editable_state,
|
|
9795
9980
|
editor: false,
|
|
9796
9981
|
headerWordWrap: true,
|
|
@@ -9824,11 +10009,13 @@ function template2columns(gobj, columns, template, sub_elements) {
|
|
|
9824
10009
|
hozAlign: "center",
|
|
9825
10010
|
cellClick: function(evt, cell) {
|
|
9826
10011
|
evt.stopPropagation();
|
|
9827
|
-
let $
|
|
9828
|
-
|
|
10012
|
+
let $extend = cell.getRow().getElement().querySelector(`[name="${field_desc.name}"]`);
|
|
10013
|
+
if (!$extend) {
|
|
10014
|
+
(0, _yuneta_gobj_js.log_error)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)}: nested table '${field_desc.name}' not found in its row`);
|
|
10015
|
+
return;
|
|
10016
|
+
}
|
|
9829
10017
|
(0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_ADD_TABLE_ROW", {
|
|
9830
|
-
$
|
|
9831
|
-
$table: $extend,
|
|
10018
|
+
table_id: table_identity(gobj, $extend),
|
|
9832
10019
|
record: {},
|
|
9833
10020
|
loading: false
|
|
9834
10021
|
}, gobj);
|
|
@@ -9961,12 +10148,22 @@ function template2columns(gobj, columns, template, sub_elements) {
|
|
|
9961
10148
|
* out-of-range number is more precise than anything generic here.
|
|
9962
10149
|
************************************************************/
|
|
9963
10150
|
function field_validation_message($input) {
|
|
9964
|
-
|
|
9965
|
-
|
|
9966
|
-
if (v && v.valueMissing) return (0, i18next.t)("this field is required");
|
|
10151
|
+
let key = field_validation_key($input);
|
|
10152
|
+
if (key) return (0, i18next.t)(key);
|
|
9967
10153
|
return $input.validationMessage;
|
|
9968
10154
|
}
|
|
9969
10155
|
/************************************************************
|
|
10156
|
+
* The i18n key of the message, when the message is ours ("" when
|
|
10157
|
+
* it is the browser's): written as the help line's data-i18n, so
|
|
10158
|
+
* a language change re-translates the line on screen.
|
|
10159
|
+
************************************************************/
|
|
10160
|
+
function field_validation_key($input) {
|
|
10161
|
+
if ($input.yui_json_error) return $input.yui_json_error;
|
|
10162
|
+
let v = $input.validity;
|
|
10163
|
+
if (v && v.valueMissing) return "this field is required";
|
|
10164
|
+
return "";
|
|
10165
|
+
}
|
|
10166
|
+
/************************************************************
|
|
9970
10167
|
* Mark a field as wrong, or clear the mark. One place: the same
|
|
9971
10168
|
* three lines lived in the `invalid` and `blur` handlers of every
|
|
9972
10169
|
* field kind.
|
|
@@ -9978,12 +10175,16 @@ function mark_field_validity($input) {
|
|
|
9978
10175
|
$input.classList.remove("is-danger");
|
|
9979
10176
|
if ($h) {
|
|
9980
10177
|
$h.textContent = "";
|
|
10178
|
+
$h.removeAttribute("data-i18n");
|
|
9981
10179
|
$h.style.display = "none";
|
|
9982
10180
|
}
|
|
9983
10181
|
return true;
|
|
9984
10182
|
}
|
|
9985
10183
|
$input.classList.add("is-danger");
|
|
9986
10184
|
if ($h) {
|
|
10185
|
+
let key = field_validation_key($input);
|
|
10186
|
+
if (key) $h.setAttribute("data-i18n", key);
|
|
10187
|
+
else $h.removeAttribute("data-i18n");
|
|
9987
10188
|
$h.textContent = field_validation_message($input);
|
|
9988
10189
|
$h.style.display = "block";
|
|
9989
10190
|
}
|
|
@@ -10277,15 +10478,13 @@ function load_tabulator_data(gobj, $table, value) {
|
|
|
10277
10478
|
}
|
|
10278
10479
|
let tabulator = $table.tabulator;
|
|
10279
10480
|
if (tabulator.initialized) for (let row of value) (0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_ADD_TABLE_ROW", {
|
|
10280
|
-
|
|
10281
|
-
$table,
|
|
10481
|
+
table_id: table_identity(gobj, $table),
|
|
10282
10482
|
record: row,
|
|
10283
10483
|
loading: true
|
|
10284
10484
|
}, gobj);
|
|
10285
10485
|
else tabulator.on("tableBuilt", function() {
|
|
10286
10486
|
for (let row of value) (0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_ADD_TABLE_ROW", {
|
|
10287
|
-
|
|
10288
|
-
$table,
|
|
10487
|
+
table_id: table_identity(gobj, $table),
|
|
10289
10488
|
record: row,
|
|
10290
10489
|
loading: true
|
|
10291
10490
|
}, gobj);
|
|
@@ -10385,11 +10584,16 @@ function treedb_value_2_form_value(gobj, field_desc, value) {
|
|
|
10385
10584
|
/************************************************************
|
|
10386
10585
|
* A json field's value, parsed. validate_form() refuses a field
|
|
10387
10586
|
* that does not parse, so reaching the error here is a path that
|
|
10388
|
-
* skipped it: logged,
|
|
10587
|
+
* skipped it: logged, and the value is handed on AS IT IS. An
|
|
10588
|
+
* empty `{}` / `[]` in its place is a value nobody wrote, and
|
|
10589
|
+
* saved it wipes the column.
|
|
10389
10590
|
************************************************************/
|
|
10390
10591
|
function parse_json_value(gobj, field_desc, value) {
|
|
10391
10592
|
let r = parse_json_field(value, field_desc.type);
|
|
10392
|
-
if (r.error)
|
|
10593
|
+
if (r.error) {
|
|
10594
|
+
(0, _yuneta_gobj_js.log_error)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)}: field '${field_desc.name}' (${field_desc.type}) holds no valid json, handed on as it is`);
|
|
10595
|
+
return value;
|
|
10596
|
+
}
|
|
10393
10597
|
return r.value;
|
|
10394
10598
|
}
|
|
10395
10599
|
/************************************************************
|
|
@@ -10450,7 +10654,9 @@ function form_value_2_treedb_value(gobj, field_desc, value) {
|
|
|
10450
10654
|
value = parseInt(value) || 0;
|
|
10451
10655
|
break;
|
|
10452
10656
|
case "object":
|
|
10453
|
-
case "dict":
|
|
10657
|
+
case "dict":
|
|
10658
|
+
value = parse_json_value(gobj, field_desc, value);
|
|
10659
|
+
break;
|
|
10454
10660
|
case "array":
|
|
10455
10661
|
case "list":
|
|
10456
10662
|
value = parse_json_value(gobj, field_desc, value);
|
|
@@ -10586,9 +10792,13 @@ function ac_set_file_preview(gobj, event, kw, src) {
|
|
|
10586
10792
|
* or from load_tabulator_data() to load data from backend
|
|
10587
10793
|
************************************************************/
|
|
10588
10794
|
function ac_add_table_row(gobj, event, kw, src) {
|
|
10589
|
-
let
|
|
10590
|
-
let $table =
|
|
10591
|
-
let tabulator = $table.tabulator;
|
|
10795
|
+
let table_id = kw.table_id;
|
|
10796
|
+
let $table = find_table(gobj, table_id);
|
|
10797
|
+
let tabulator = $table ? $table.tabulator : null;
|
|
10798
|
+
if (!tabulator) {
|
|
10799
|
+
(0, _yuneta_gobj_js.log_error)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)}: EV_ADD_TABLE_ROW to a table that is gone: '${table_id}'`);
|
|
10800
|
+
return -1;
|
|
10801
|
+
}
|
|
10592
10802
|
let record = kw.record;
|
|
10593
10803
|
let loading = kw.loading;
|
|
10594
10804
|
tabulator.addRow(record).then(function(row) {
|
|
@@ -10606,10 +10816,9 @@ function ac_add_table_row(gobj, event, kw, src) {
|
|
|
10606
10816
|
(0, _yuneta_gobj_js.log_error)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)}: cannot add a table row: ${error}`);
|
|
10607
10817
|
});
|
|
10608
10818
|
setTimeout(function() {
|
|
10609
|
-
if (
|
|
10610
|
-
|
|
10611
|
-
|
|
10612
|
-
} else tabulator.redraw();
|
|
10819
|
+
if ((0, _yuneta_gobj_js.gobj_is_destroying)(gobj)) return;
|
|
10820
|
+
let $target = loading ? $table : $table.closest(".yui-tabulator-table");
|
|
10821
|
+
if ($target && $target.tabulator) $target.tabulator.redraw();
|
|
10613
10822
|
}, 30);
|
|
10614
10823
|
return 0;
|
|
10615
10824
|
}
|
|
@@ -11223,10 +11432,22 @@ function mt_start$16(gobj) {
|
|
|
11223
11432
|
function mt_stop$16(gobj) {
|
|
11224
11433
|
let shell = yui_shell_of(gobj);
|
|
11225
11434
|
if (shell) (0, _yuneta_gobj_js.gobj_unsubscribe_event)(shell, "EV_LANGUAGE_CHANGED", {}, gobj);
|
|
11435
|
+
retire_marker_windows(gobj);
|
|
11226
11436
|
(0, _yuneta_gobj_js.gobj_stop_children)(gobj);
|
|
11227
11437
|
return 0;
|
|
11228
11438
|
}
|
|
11229
11439
|
/***************************************************************
|
|
11440
|
+
* Destroy the windows the markers opened.
|
|
11441
|
+
***************************************************************/
|
|
11442
|
+
function retire_marker_windows(gobj) {
|
|
11443
|
+
let windows = (0, _yuneta_gobj_js.gobj_match_children)(gobj, { __gclass_name__: "C_YUI_WINDOW" }) || [];
|
|
11444
|
+
for (let win of windows) {
|
|
11445
|
+
if ((0, _yuneta_gobj_js.gobj_is_running)(win)) (0, _yuneta_gobj_js.gobj_stop)(win);
|
|
11446
|
+
(0, _yuneta_gobj_js.gobj_stop_children)(win);
|
|
11447
|
+
(0, _yuneta_gobj_js.gobj_destroy)(win);
|
|
11448
|
+
}
|
|
11449
|
+
}
|
|
11450
|
+
/***************************************************************
|
|
11230
11451
|
* Framework Method: Destroy
|
|
11231
11452
|
***************************************************************/
|
|
11232
11453
|
function mt_destroy$16(gobj) {
|
|
@@ -13307,6 +13528,41 @@ function ensure_drag_canvas_patch() {
|
|
|
13307
13528
|
__drag_canvas_patched__ = true;
|
|
13308
13529
|
}
|
|
13309
13530
|
//#endregion
|
|
13531
|
+
//#region src/g6_event_kw.js
|
|
13532
|
+
/***********************************************************************
|
|
13533
|
+
* g6_event_kw.js
|
|
13534
|
+
*
|
|
13535
|
+
* The kw an FSM event carries for a G6 pointer event: an identity
|
|
13536
|
+
* and three scalars, never the event. Shared by the three graphs
|
|
13537
|
+
* (C_G6_NODES_TREE, C_YUI_JSON_GRAPH, C_YUI_GOBJ_TREE_JS), which
|
|
13538
|
+
* each had a copy.
|
|
13539
|
+
*
|
|
13540
|
+
* Copyright (c) 2026, ArtGins.
|
|
13541
|
+
* All Rights Reserved.
|
|
13542
|
+
***********************************************************************/
|
|
13543
|
+
/************************************************************
|
|
13544
|
+
* A G6 event, as PLAIN JSON.
|
|
13545
|
+
*
|
|
13546
|
+
* A kw is dumped by the `machine` trace (`trace_json(kw)`), and a
|
|
13547
|
+
* G6 / @antv/g event is circular: serializing one THROWS, so the
|
|
13548
|
+
* first thing a kw carrying `evt` breaks is the trace the FSM
|
|
13549
|
+
* exists to feed. It also drags a live graph element into a
|
|
13550
|
+
* message that may be read after that element is gone.
|
|
13551
|
+
*
|
|
13552
|
+
* What the actions read of it is an id and three scalars. The
|
|
13553
|
+
* event itself never leaves the callback that received it.
|
|
13554
|
+
************************************************************/
|
|
13555
|
+
function g6_event_kw(evt) {
|
|
13556
|
+
let target = evt && evt.target ? evt.target : null;
|
|
13557
|
+
let client = evt && evt.client ? evt.client : null;
|
|
13558
|
+
return {
|
|
13559
|
+
id: target && target.id ? String(target.id) : "",
|
|
13560
|
+
shift: !!(evt && evt.shiftKey),
|
|
13561
|
+
client_x: client && typeof client.x === "number" ? client.x : 0,
|
|
13562
|
+
client_y: client && typeof client.y === "number" ? client.y : 0
|
|
13563
|
+
};
|
|
13564
|
+
}
|
|
13565
|
+
//#endregion
|
|
13310
13566
|
//#region src/c_yui_json_graph.js
|
|
13311
13567
|
/***********************************************************************
|
|
13312
13568
|
* c_yui_json_graph.js
|
|
@@ -13811,12 +14067,7 @@ function build_graph$4(gobj) {
|
|
|
13811
14067
|
});
|
|
13812
14068
|
if (priv.theme) graph.setTheme(priv.theme);
|
|
13813
14069
|
graph.on(_antv_g6.NodeEvent.CLICK, (evt) => {
|
|
13814
|
-
|
|
13815
|
-
(0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_NODE_CLICK", {
|
|
13816
|
-
id: evt && evt.target && evt.target.id ? String(evt.target.id) : "",
|
|
13817
|
-
client_x: client && typeof client.x === "number" ? client.x : 0,
|
|
13818
|
-
client_y: client && typeof client.y === "number" ? client.y : 0
|
|
13819
|
-
}, gobj);
|
|
14070
|
+
(0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_NODE_CLICK", g6_event_kw(evt), gobj);
|
|
13820
14071
|
});
|
|
13821
14072
|
graph.on("aftertransform", () => {
|
|
13822
14073
|
yui_graph_update_zoom((0, _yuneta_gobj_js.gobj_read_attr)(gobj, "$container"), priv.graph);
|
|
@@ -14751,7 +15002,9 @@ function ac_node_click$4(gobj, event, kw, src) {
|
|
|
14751
15002
|
let nodedata;
|
|
14752
15003
|
try {
|
|
14753
15004
|
nodedata = graph.getNodeData(node_id);
|
|
14754
|
-
} catch (e) {
|
|
15005
|
+
} catch (e) {
|
|
15006
|
+
(0, _yuneta_gobj_js.log_warning)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)}: node '${node_id}' clicked, not in the graph: ${e}`);
|
|
15007
|
+
}
|
|
14755
15008
|
if (priv.anchor_state === "arming") {
|
|
14756
15009
|
priv.anchor_id = node_id;
|
|
14757
15010
|
priv.anchor_path = nodedata && nodedata.data ? nodedata.data.path : "";
|
|
@@ -15636,7 +15889,7 @@ function push_collapsed_row(ctx, value, segments, depth, key, rows) {
|
|
|
15636
15889
|
let key_spec = key === null || key === "" ? null : [
|
|
15637
15890
|
"span",
|
|
15638
15891
|
{ class: "JSON_KEY" },
|
|
15639
|
-
|
|
15892
|
+
text_node(key)
|
|
15640
15893
|
];
|
|
15641
15894
|
let stub_text = (info.is_array ? "[" : "{") + (size !== void 0 ? String(size) : "?") + (info.is_array ? "]" : "}");
|
|
15642
15895
|
let children = [];
|
|
@@ -15651,7 +15904,7 @@ function push_collapsed_row(ctx, value, segments, depth, key, rows) {
|
|
|
15651
15904
|
children.push([
|
|
15652
15905
|
"span",
|
|
15653
15906
|
{ class: "JSON_STUB" },
|
|
15654
|
-
stub_text
|
|
15907
|
+
text_node(stub_text)
|
|
15655
15908
|
]);
|
|
15656
15909
|
children.push([
|
|
15657
15910
|
"span",
|
|
@@ -15715,7 +15968,7 @@ function toggle_row(gobj, key, size, is_object, depth, path, open, value) {
|
|
|
15715
15968
|
body.push([
|
|
15716
15969
|
"span",
|
|
15717
15970
|
{ class: "JSON_KEY" },
|
|
15718
|
-
|
|
15971
|
+
text_node(key)
|
|
15719
15972
|
]);
|
|
15720
15973
|
body.push([
|
|
15721
15974
|
"span",
|
|
@@ -15732,7 +15985,7 @@ function toggle_row(gobj, key, size, is_object, depth, path, open, value) {
|
|
|
15732
15985
|
if (label) body.push([
|
|
15733
15986
|
"span",
|
|
15734
15987
|
{ class: "JSON_SUMMARY_ID ml-2" },
|
|
15735
|
-
label
|
|
15988
|
+
text_node(label)
|
|
15736
15989
|
]);
|
|
15737
15990
|
return [
|
|
15738
15991
|
"div",
|
|
@@ -15778,7 +16031,7 @@ function leaf_row(key, value, depth) {
|
|
|
15778
16031
|
body.push([
|
|
15779
16032
|
"span",
|
|
15780
16033
|
{ class: "JSON_KEY" },
|
|
15781
|
-
|
|
16034
|
+
text_node(key)
|
|
15782
16035
|
]);
|
|
15783
16036
|
body.push([
|
|
15784
16037
|
"span",
|
|
@@ -15789,7 +16042,7 @@ function leaf_row(key, value, depth) {
|
|
|
15789
16042
|
body.push([
|
|
15790
16043
|
"span",
|
|
15791
16044
|
{ class: "JSON_VALUE JSON_TYPE_" + type.toUpperCase() },
|
|
15792
|
-
text
|
|
16045
|
+
text_node(text)
|
|
15793
16046
|
]);
|
|
15794
16047
|
if (key !== null && is_time_field(String(key))) {
|
|
15795
16048
|
let wall = format_epoch(value);
|
|
@@ -16837,7 +17090,7 @@ function render_diff(gobj) {
|
|
|
16837
17090
|
[
|
|
16838
17091
|
"td",
|
|
16839
17092
|
{ class: "JSON_PAD_DIFF_PATH" },
|
|
16840
|
-
row.id
|
|
17093
|
+
text_node(row.id)
|
|
16841
17094
|
],
|
|
16842
17095
|
value_cell("JSON_PAD_DIFF_FROM", row, "from"),
|
|
16843
17096
|
value_cell("JSON_PAD_DIFF_TO", row, "to")
|
|
@@ -18644,7 +18897,7 @@ function render_raw(gobj) {
|
|
|
18644
18897
|
let children = [[
|
|
18645
18898
|
"pre",
|
|
18646
18899
|
{ class: "GCLASS_RAW_BODY" },
|
|
18647
|
-
dump.text
|
|
18900
|
+
document.createTextNode(String(dump.text))
|
|
18648
18901
|
]];
|
|
18649
18902
|
if (dump.capped) children.push([
|
|
18650
18903
|
"div",
|
|
@@ -18761,7 +19014,7 @@ function build_head(gobj, model) {
|
|
|
18761
19014
|
for (let flag of model.gcflag) items.push([
|
|
18762
19015
|
"span",
|
|
18763
19016
|
{ class: "GCLASS_CHIP GCLASS_GCFLAG" },
|
|
18764
|
-
flag
|
|
19017
|
+
text_node(flag)
|
|
18765
19018
|
]);
|
|
18766
19019
|
let current = (0, _yuneta_gobj_js.gobj_read_str_attr)(gobj, "current_state");
|
|
18767
19020
|
if (current) items.push([
|
|
@@ -18924,7 +19177,7 @@ function flag_chips(flags) {
|
|
|
18924
19177
|
return [
|
|
18925
19178
|
"span",
|
|
18926
19179
|
{ class: cls },
|
|
18927
|
-
flag
|
|
19180
|
+
text_node(flag)
|
|
18928
19181
|
];
|
|
18929
19182
|
});
|
|
18930
19183
|
}
|
|
@@ -18941,12 +19194,12 @@ function build_attrs(attrs) {
|
|
|
18941
19194
|
[
|
|
18942
19195
|
"td",
|
|
18943
19196
|
{ class: "GCLASS_CELL_KEY" },
|
|
18944
|
-
a.id
|
|
19197
|
+
text_node(a.id)
|
|
18945
19198
|
],
|
|
18946
19199
|
[
|
|
18947
19200
|
"td",
|
|
18948
19201
|
{ class: "GCLASS_CELL_TYPE" },
|
|
18949
|
-
a.type
|
|
19202
|
+
text_node(a.type)
|
|
18950
19203
|
],
|
|
18951
19204
|
[
|
|
18952
19205
|
"td",
|
|
@@ -18956,12 +19209,12 @@ function build_attrs(attrs) {
|
|
|
18956
19209
|
[
|
|
18957
19210
|
"td",
|
|
18958
19211
|
{ class: "GCLASS_CELL_DEFAULT" },
|
|
18959
|
-
|
|
19212
|
+
text_node(a.default_value)
|
|
18960
19213
|
],
|
|
18961
19214
|
[
|
|
18962
19215
|
"td",
|
|
18963
19216
|
{ class: "GCLASS_CELL_DESC" },
|
|
18964
|
-
|
|
19217
|
+
text_node(a.description)
|
|
18965
19218
|
]
|
|
18966
19219
|
]
|
|
18967
19220
|
];
|
|
@@ -19029,7 +19282,7 @@ function build_commands(commands) {
|
|
|
19029
19282
|
[[
|
|
19030
19283
|
"td",
|
|
19031
19284
|
{ colspan: "2" },
|
|
19032
|
-
c.label
|
|
19285
|
+
text_node(c.label)
|
|
19033
19286
|
]]
|
|
19034
19287
|
]);
|
|
19035
19288
|
continue;
|
|
@@ -19037,12 +19290,12 @@ function build_commands(commands) {
|
|
|
19037
19290
|
let name_items = [[
|
|
19038
19291
|
"span",
|
|
19039
19292
|
{ class: "GCLASS_CMD_NAME" },
|
|
19040
|
-
c.id
|
|
19293
|
+
text_node(c.id)
|
|
19041
19294
|
]];
|
|
19042
19295
|
for (let alias of c.alias) name_items.push([
|
|
19043
19296
|
"span",
|
|
19044
19297
|
{ class: "GCLASS_CHIP GCLASS_ALIAS" },
|
|
19045
|
-
alias
|
|
19298
|
+
text_node(alias)
|
|
19046
19299
|
]);
|
|
19047
19300
|
name_items = name_items.concat(flag_chips(c.flags));
|
|
19048
19301
|
rows.push([
|
|
@@ -19055,7 +19308,7 @@ function build_commands(commands) {
|
|
|
19055
19308
|
], [
|
|
19056
19309
|
"td",
|
|
19057
19310
|
{ class: "GCLASS_CELL_DESC" },
|
|
19058
|
-
c.description
|
|
19311
|
+
text_node(c.description)
|
|
19059
19312
|
]]
|
|
19060
19313
|
]);
|
|
19061
19314
|
for (let p of c.parameters) rows.push([
|
|
@@ -19073,18 +19326,18 @@ function build_commands(commands) {
|
|
|
19073
19326
|
[
|
|
19074
19327
|
"span",
|
|
19075
19328
|
{ class: "GCLASS_PARAM_NAME" },
|
|
19076
|
-
p.id
|
|
19329
|
+
text_node(p.id)
|
|
19077
19330
|
],
|
|
19078
19331
|
[
|
|
19079
19332
|
"span",
|
|
19080
19333
|
{ class: "GCLASS_PARAM_TYPE" },
|
|
19081
|
-
p.type
|
|
19334
|
+
text_node(p.type)
|
|
19082
19335
|
]
|
|
19083
19336
|
].concat(flag_chips(p.flags))
|
|
19084
19337
|
], [
|
|
19085
19338
|
"td",
|
|
19086
19339
|
{ class: "GCLASS_CELL_DESC" },
|
|
19087
|
-
p.description
|
|
19340
|
+
text_node(p.description)
|
|
19088
19341
|
]]
|
|
19089
19342
|
]);
|
|
19090
19343
|
}
|
|
@@ -19160,11 +19413,11 @@ function build_traces(levels) {
|
|
|
19160
19413
|
[[
|
|
19161
19414
|
"td",
|
|
19162
19415
|
{ class: "GCLASS_CELL_KEY" },
|
|
19163
|
-
l.id
|
|
19416
|
+
text_node(l.id)
|
|
19164
19417
|
], [
|
|
19165
19418
|
"td",
|
|
19166
19419
|
{ class: "GCLASS_CELL_DESC" },
|
|
19167
|
-
l.description
|
|
19420
|
+
text_node(l.description)
|
|
19168
19421
|
]]
|
|
19169
19422
|
];
|
|
19170
19423
|
})
|
|
@@ -19201,7 +19454,7 @@ function build_machine(gobj, fsm) {
|
|
|
19201
19454
|
let items = [[
|
|
19202
19455
|
"span",
|
|
19203
19456
|
{ class: "GCLASS_MX_STATE_NAME" },
|
|
19204
|
-
state.name
|
|
19457
|
+
text_node(state.name)
|
|
19205
19458
|
]];
|
|
19206
19459
|
if (state.name === current) cls += " is-current";
|
|
19207
19460
|
if (unreachable.has(state.name)) {
|
|
@@ -19231,7 +19484,7 @@ function build_machine(gobj, fsm) {
|
|
|
19231
19484
|
[[
|
|
19232
19485
|
"span",
|
|
19233
19486
|
{},
|
|
19234
|
-
row.event
|
|
19487
|
+
text_node(row.event)
|
|
19235
19488
|
]].concat(event_flag_chips(row.flags))
|
|
19236
19489
|
]];
|
|
19237
19490
|
row.cells.forEach(function(cell, i) {
|
|
@@ -19253,7 +19506,7 @@ function build_machine(gobj, fsm) {
|
|
|
19253
19506
|
if (cell.action) items.push([
|
|
19254
19507
|
"span",
|
|
19255
19508
|
{ class: "GCLASS_MX_ACTION" },
|
|
19256
|
-
cell.action
|
|
19509
|
+
text_node(cell.action)
|
|
19257
19510
|
]);
|
|
19258
19511
|
else if (cell.has_action) items.push([
|
|
19259
19512
|
"span",
|
|
@@ -19282,7 +19535,7 @@ function build_machine(gobj, fsm) {
|
|
|
19282
19535
|
items.push([
|
|
19283
19536
|
"span",
|
|
19284
19537
|
{ class: "GCLASS_MX_NEXT" },
|
|
19285
|
-
cell.next_state
|
|
19538
|
+
text_node(cell.next_state)
|
|
19286
19539
|
]);
|
|
19287
19540
|
}
|
|
19288
19541
|
cells.push([
|
|
@@ -19334,7 +19587,7 @@ function build_machine(gobj, fsm) {
|
|
|
19334
19587
|
[[
|
|
19335
19588
|
"span",
|
|
19336
19589
|
{ class: "GCLASS_CHIP GCLASS_PUB_EVENT" },
|
|
19337
|
-
p.event
|
|
19590
|
+
text_node(p.event)
|
|
19338
19591
|
]].concat(event_flag_chips(p.flags))
|
|
19339
19592
|
];
|
|
19340
19593
|
})
|
|
@@ -19454,7 +19707,7 @@ function event_flag_chips(flags) {
|
|
|
19454
19707
|
return [
|
|
19455
19708
|
"span",
|
|
19456
19709
|
{ class: cls },
|
|
19457
|
-
flag.replace("EVF_", "")
|
|
19710
|
+
text_node(flag.replace("EVF_", ""))
|
|
19458
19711
|
];
|
|
19459
19712
|
});
|
|
19460
19713
|
}
|
|
@@ -21247,12 +21500,7 @@ function build_graph$2(gobj) {
|
|
|
21247
21500
|
save_view_state(gobj);
|
|
21248
21501
|
});
|
|
21249
21502
|
graph.on(_antv_g6.NodeEvent.CLICK, (evt) => {
|
|
21250
|
-
|
|
21251
|
-
(0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_NODE_CLICK", {
|
|
21252
|
-
id: evt && evt.target && evt.target.id ? String(evt.target.id) : "",
|
|
21253
|
-
client_x: client && typeof client.x === "number" ? client.x : 0,
|
|
21254
|
-
client_y: client && typeof client.y === "number" ? client.y : 0
|
|
21255
|
-
}, gobj);
|
|
21503
|
+
(0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_NODE_CLICK", g6_event_kw(evt), gobj);
|
|
21256
21504
|
});
|
|
21257
21505
|
graph.on(_antv_g6.CanvasEvent.CLICK, (evt) => {
|
|
21258
21506
|
hide_popover(gobj);
|
|
@@ -21631,14 +21879,18 @@ function restore_view_anchored(gobj, anchor) {
|
|
|
21631
21879
|
if (!new_node_id) return;
|
|
21632
21880
|
if (typeof anchor.zoom === "number" && anchor.zoom > 0) try {
|
|
21633
21881
|
graph.zoomTo(anchor.zoom);
|
|
21634
|
-
} catch (e) {
|
|
21882
|
+
} catch (e) {
|
|
21883
|
+
(0, _yuneta_gobj_js.log_warning)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)}: zoom not restored: ${e}`);
|
|
21884
|
+
}
|
|
21635
21885
|
try {
|
|
21636
21886
|
let canvas_pos = graph.getElementPosition(new_node_id);
|
|
21637
21887
|
let vp = graph.getViewportByCanvas([canvas_pos[0], canvas_pos[1]]);
|
|
21638
21888
|
let dx = anchor.viewport_x - vp[0];
|
|
21639
21889
|
let dy = anchor.viewport_y - vp[1];
|
|
21640
21890
|
graph.translateBy([dx, dy]);
|
|
21641
|
-
} catch (e) {
|
|
21891
|
+
} catch (e) {
|
|
21892
|
+
(0, _yuneta_gobj_js.log_warning)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)}: anchor node not put back at its screen spot: ${e}`);
|
|
21893
|
+
}
|
|
21642
21894
|
}
|
|
21643
21895
|
/************************************************************
|
|
21644
21896
|
* Capture the current screen position + zoom of a node,
|
|
@@ -22269,7 +22521,9 @@ function ac_node_click$3(gobj, event, kw, src) {
|
|
|
22269
22521
|
if (!node_data) try {
|
|
22270
22522
|
let nd = graph.getNodeData(node_id);
|
|
22271
22523
|
if (nd && nd.data) node_data = nd.data;
|
|
22272
|
-
} catch (e) {
|
|
22524
|
+
} catch (e) {
|
|
22525
|
+
(0, _yuneta_gobj_js.log_warning)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)}: node '${node_id}' clicked, not in the graph: ${e}`);
|
|
22526
|
+
}
|
|
22273
22527
|
if (!node_data) return 0;
|
|
22274
22528
|
if (priv.anchor_state === "arming") {
|
|
22275
22529
|
priv.anchor_id = node_id;
|
|
@@ -22800,7 +23054,7 @@ function card_descriptor(it, show_label) {
|
|
|
22800
23054
|
class: "yui-nav-label",
|
|
22801
23055
|
i18n: label
|
|
22802
23056
|
},
|
|
22803
|
-
label
|
|
23057
|
+
text_node(label)
|
|
22804
23058
|
]);
|
|
22805
23059
|
let a_attrs = {
|
|
22806
23060
|
class: "yui-nav-item yui-nav-card",
|
|
@@ -23166,7 +23420,7 @@ function render_tabs(gobj, items) {
|
|
|
23166
23420
|
if (show_label && !(0, _yuneta_gobj_js.empty_string)(it.name)) children.push([
|
|
23167
23421
|
"span",
|
|
23168
23422
|
{ i18n: it.name },
|
|
23169
|
-
it.name
|
|
23423
|
+
text_node(it.name)
|
|
23170
23424
|
]);
|
|
23171
23425
|
if (it.closable) children.push([
|
|
23172
23426
|
"span",
|
|
@@ -23266,7 +23520,7 @@ function render_breadcrumb(gobj, items) {
|
|
|
23266
23520
|
class: "yui-nav-label",
|
|
23267
23521
|
i18n: label
|
|
23268
23522
|
},
|
|
23269
|
-
label
|
|
23523
|
+
text_node(label)
|
|
23270
23524
|
]);
|
|
23271
23525
|
}
|
|
23272
23526
|
let a_attrs = {
|
|
@@ -23333,7 +23587,7 @@ function render_backbar(gobj) {
|
|
|
23333
23587
|
], [
|
|
23334
23588
|
"span",
|
|
23335
23589
|
label_attrs,
|
|
23336
|
-
label
|
|
23590
|
+
text_node(label)
|
|
23337
23591
|
]]
|
|
23338
23592
|
]
|
|
23339
23593
|
]);
|
|
@@ -23381,7 +23635,7 @@ function render_submenu(gobj, items) {
|
|
|
23381
23635
|
class: "menu-label",
|
|
23382
23636
|
i18n: nav_label
|
|
23383
23637
|
} : { class: "menu-label" },
|
|
23384
|
-
nav_label || "—"
|
|
23638
|
+
text_node(nav_label || "—")
|
|
23385
23639
|
], [
|
|
23386
23640
|
"ul",
|
|
23387
23641
|
{ class: "menu-list" },
|
|
@@ -23418,7 +23672,7 @@ function render_accordion(gobj, items) {
|
|
|
23418
23672
|
let $hdr = (0, _yuneta_gobj_js.createElement2)([
|
|
23419
23673
|
"button",
|
|
23420
23674
|
head_attrs,
|
|
23421
|
-
head_text
|
|
23675
|
+
text_node(head_text)
|
|
23422
23676
|
]);
|
|
23423
23677
|
$container.appendChild($hdr);
|
|
23424
23678
|
let $ul = (0, _yuneta_gobj_js.createElement2)(["ul", {
|
|
@@ -23458,7 +23712,7 @@ function item_li(gobj, it, opts) {
|
|
|
23458
23712
|
[
|
|
23459
23713
|
"span",
|
|
23460
23714
|
span_attrs,
|
|
23461
|
-
label
|
|
23715
|
+
text_node(label)
|
|
23462
23716
|
]
|
|
23463
23717
|
];
|
|
23464
23718
|
}
|
|
@@ -23479,7 +23733,7 @@ function item_li(gobj, it, opts) {
|
|
|
23479
23733
|
class: "yui-nav-label",
|
|
23480
23734
|
i18n: label
|
|
23481
23735
|
},
|
|
23482
|
-
label
|
|
23736
|
+
text_node(label)
|
|
23483
23737
|
] : null;
|
|
23484
23738
|
let a_class = "yui-nav-item";
|
|
23485
23739
|
if (stacked || icon_pos === "top" || icon_pos === "bottom") a_class += " yui-nav-stacked";
|
|
@@ -23536,7 +23790,7 @@ function item_iconbar(gobj, it, opts) {
|
|
|
23536
23790
|
class: "yui-nav-label is-size-7",
|
|
23537
23791
|
i18n: label
|
|
23538
23792
|
},
|
|
23539
|
-
label
|
|
23793
|
+
text_node(label)
|
|
23540
23794
|
] : null;
|
|
23541
23795
|
let children = [];
|
|
23542
23796
|
if (icon_pos === "bottom") {
|
|
@@ -23751,12 +24005,12 @@ function render_node(node) {
|
|
|
23751
24005
|
class: "ROUTEMAP_NAME",
|
|
23752
24006
|
i18n: node.label
|
|
23753
24007
|
},
|
|
23754
|
-
node.label
|
|
24008
|
+
text_node(node.label)
|
|
23755
24009
|
]);
|
|
23756
24010
|
if (node.route) row.push([
|
|
23757
24011
|
"code",
|
|
23758
24012
|
{ class: "ROUTEMAP_ROUTE" },
|
|
23759
|
-
node.route
|
|
24013
|
+
text_node(node.route)
|
|
23760
24014
|
]);
|
|
23761
24015
|
if (node.gclass) row.push([
|
|
23762
24016
|
"span",
|
|
@@ -23770,7 +24024,7 @@ function render_node(node) {
|
|
|
23770
24024
|
if (node.event) row.push([
|
|
23771
24025
|
"span",
|
|
23772
24026
|
{ class: "ROUTEMAP_EVENT" },
|
|
23773
|
-
node.event
|
|
24027
|
+
text_node(node.event)
|
|
23774
24028
|
]);
|
|
23775
24029
|
if (node.ref) row.push([
|
|
23776
24030
|
"span",
|
|
@@ -24986,7 +25240,7 @@ function build_ui$6(gobj) {
|
|
|
24986
25240
|
], [
|
|
24987
25241
|
"span",
|
|
24988
25242
|
{ class: "TREEDB_TOPICS_SOURCE_URL" },
|
|
24989
|
-
source_url
|
|
25243
|
+
text_node(source_url)
|
|
24990
25244
|
]]
|
|
24991
25245
|
],
|
|
24992
25246
|
...graph_items,
|
|
@@ -25157,7 +25411,7 @@ function add_tab(gobj, gobj2, id, text, icon) {
|
|
|
25157
25411
|
i18n: text,
|
|
25158
25412
|
class: ""
|
|
25159
25413
|
},
|
|
25160
|
-
text
|
|
25414
|
+
text_node(text)
|
|
25161
25415
|
]));
|
|
25162
25416
|
(0, _yuneta_gobj_js.refresh_language)($a, i18next.t);
|
|
25163
25417
|
$a.addEventListener("click", function(ev) {
|
|
@@ -25240,7 +25494,7 @@ function topic_card_meta(desc) {
|
|
|
25240
25494
|
title: (0, i18next.t)("version"),
|
|
25241
25495
|
"data-i18n-title": "version"
|
|
25242
25496
|
},
|
|
25243
|
-
`v${desc.topic_version}`
|
|
25497
|
+
text_node(`v${desc.topic_version}`)
|
|
25244
25498
|
]);
|
|
25245
25499
|
head.push([
|
|
25246
25500
|
"span",
|
|
@@ -25248,7 +25502,7 @@ function topic_card_meta(desc) {
|
|
|
25248
25502
|
[[
|
|
25249
25503
|
"span",
|
|
25250
25504
|
{},
|
|
25251
|
-
|
|
25505
|
+
text_node(n_cols)
|
|
25252
25506
|
], [
|
|
25253
25507
|
"span",
|
|
25254
25508
|
{ i18n: "columns" },
|
|
@@ -25279,7 +25533,7 @@ function topic_card_meta(desc) {
|
|
|
25279
25533
|
], [
|
|
25280
25534
|
"span",
|
|
25281
25535
|
{ class: "TREEDB_TOPIC_CARD_REL_LIST" },
|
|
25282
|
-
list
|
|
25536
|
+
text_node(list)
|
|
25283
25537
|
]]
|
|
25284
25538
|
]);
|
|
25285
25539
|
}
|
|
@@ -25311,7 +25565,7 @@ function topic_card_meta(desc) {
|
|
|
25311
25565
|
[
|
|
25312
25566
|
"span",
|
|
25313
25567
|
{ class: "TREEDB_TOPIC_CARD_REL_LIST" },
|
|
25314
|
-
list
|
|
25568
|
+
text_node(list)
|
|
25315
25569
|
]
|
|
25316
25570
|
]
|
|
25317
25571
|
];
|
|
@@ -25354,7 +25608,7 @@ function add_topic_card(gobj, id, text, icon, desc) {
|
|
|
25354
25608
|
class: "yui-nav-label",
|
|
25355
25609
|
i18n: text
|
|
25356
25610
|
},
|
|
25357
|
-
text
|
|
25611
|
+
text_node(text)
|
|
25358
25612
|
]]
|
|
25359
25613
|
]);
|
|
25360
25614
|
$card.addEventListener("click", function(ev) {
|
|
@@ -25383,7 +25637,7 @@ function add_topic_card(gobj, id, text, icon, desc) {
|
|
|
25383
25637
|
class: "TREEDB_TOPIC_CARD_NAME",
|
|
25384
25638
|
i18n: text
|
|
25385
25639
|
},
|
|
25386
|
-
text
|
|
25640
|
+
text_node(text)
|
|
25387
25641
|
],
|
|
25388
25642
|
...topic_card_meta(desc),
|
|
25389
25643
|
[
|
|
@@ -25589,7 +25843,7 @@ function build_topic_info_panel(gobj, $info, topic, desc) {
|
|
|
25589
25843
|
if (desc.topic_version !== void 0 && desc.topic_version !== null && desc.topic_version !== "") push_meta("version", [
|
|
25590
25844
|
"span",
|
|
25591
25845
|
{ class: "tag is-info" },
|
|
25592
|
-
|
|
25846
|
+
text_node(desc.topic_version)
|
|
25593
25847
|
]);
|
|
25594
25848
|
let sf_names = system_flag_names(desc.system_flag);
|
|
25595
25849
|
if (sf_names.length > 0) push_meta("system", [
|
|
@@ -25600,7 +25854,7 @@ function build_topic_info_panel(gobj, $info, topic, desc) {
|
|
|
25600
25854
|
if (pkey) push_meta("pkey", [
|
|
25601
25855
|
"code",
|
|
25602
25856
|
{},
|
|
25603
|
-
pkey
|
|
25857
|
+
text_node(pkey)
|
|
25604
25858
|
]);
|
|
25605
25859
|
if (pkey2s.length > 0) push_meta("pkey2s", [
|
|
25606
25860
|
"span",
|
|
@@ -25608,13 +25862,13 @@ function build_topic_info_panel(gobj, $info, topic, desc) {
|
|
|
25608
25862
|
pkey2s.map((name) => [
|
|
25609
25863
|
"span",
|
|
25610
25864
|
{ class: "tag is-warning" },
|
|
25611
|
-
name
|
|
25865
|
+
text_node(name)
|
|
25612
25866
|
])
|
|
25613
25867
|
]);
|
|
25614
25868
|
push_meta("tkey", tkey ? [
|
|
25615
25869
|
"code",
|
|
25616
25870
|
{},
|
|
25617
|
-
tkey
|
|
25871
|
+
text_node(tkey)
|
|
25618
25872
|
] : [
|
|
25619
25873
|
"span",
|
|
25620
25874
|
{
|
|
@@ -25644,18 +25898,18 @@ function build_topic_info_panel(gobj, $info, topic, desc) {
|
|
|
25644
25898
|
[[
|
|
25645
25899
|
"code",
|
|
25646
25900
|
is_key ? { class: "has-text-weight-bold" } : {},
|
|
25647
|
-
|
|
25901
|
+
text_node(col.id)
|
|
25648
25902
|
]]
|
|
25649
25903
|
],
|
|
25650
25904
|
[
|
|
25651
25905
|
"td",
|
|
25652
25906
|
{},
|
|
25653
|
-
|
|
25907
|
+
text_node(type)
|
|
25654
25908
|
],
|
|
25655
25909
|
[
|
|
25656
25910
|
"td",
|
|
25657
25911
|
is_key ? { class: "has-text-weight-semibold" } : {},
|
|
25658
|
-
|
|
25912
|
+
text_node(rel)
|
|
25659
25913
|
]
|
|
25660
25914
|
]
|
|
25661
25915
|
]);
|
|
@@ -25677,7 +25931,7 @@ function build_topic_info_panel(gobj, $info, topic, desc) {
|
|
|
25677
25931
|
], [
|
|
25678
25932
|
"span",
|
|
25679
25933
|
{ i18n: `${topic}` },
|
|
25680
|
-
|
|
25934
|
+
text_node(topic)
|
|
25681
25935
|
]]
|
|
25682
25936
|
]]
|
|
25683
25937
|
],
|
|
@@ -28837,7 +29091,7 @@ function col_title_formatter(gobj, col) {
|
|
|
28837
29091
|
return (0, _yuneta_gobj_js.createElement2)([
|
|
28838
29092
|
"span",
|
|
28839
29093
|
attrs,
|
|
28840
|
-
text
|
|
29094
|
+
text_node(text)
|
|
28841
29095
|
]);
|
|
28842
29096
|
};
|
|
28843
29097
|
}
|
|
@@ -29336,7 +29590,7 @@ function file_cell_formatter(cell, formatterParams, onRendered) {
|
|
|
29336
29590
|
const children = [["span", { class: "FILE_CELL_ICON icon yi-eye" }], [
|
|
29337
29591
|
"span",
|
|
29338
29592
|
{ class: "FILE_CELL_ID" },
|
|
29339
|
-
yui_file_id_label(ids[0])
|
|
29593
|
+
text_node(yui_file_id_label(ids[0]))
|
|
29340
29594
|
]];
|
|
29341
29595
|
if (ids.length > 1) children.push([
|
|
29342
29596
|
"span",
|
|
@@ -29425,7 +29679,7 @@ function build_json_cell_preview(value) {
|
|
|
29425
29679
|
[["span", { class: "JSON_CELL_ICON icon yi-eye" }], [
|
|
29426
29680
|
"span",
|
|
29427
29681
|
{ class: "JSON_CELL_PREVIEW" },
|
|
29428
|
-
text
|
|
29682
|
+
text_node(text)
|
|
29429
29683
|
]]
|
|
29430
29684
|
]);
|
|
29431
29685
|
}
|
|
@@ -30038,7 +30292,7 @@ function open_cell_file_dialog(gobj, row_id, col_id) {
|
|
|
30038
30292
|
[[
|
|
30039
30293
|
"span",
|
|
30040
30294
|
{ class: "CELL_FILE_ID" },
|
|
30041
|
-
id
|
|
30295
|
+
text_node(id)
|
|
30042
30296
|
]]
|
|
30043
30297
|
]]
|
|
30044
30298
|
]));
|
|
@@ -30097,7 +30351,7 @@ function fill_cell_file_slot(gobj, pend, answer, error) {
|
|
|
30097
30351
|
if (meta) $caption.appendChild((0, _yuneta_gobj_js.createElement2)([
|
|
30098
30352
|
"span",
|
|
30099
30353
|
{ class: "CELL_FILE_META" },
|
|
30100
|
-
meta
|
|
30354
|
+
text_node(meta)
|
|
30101
30355
|
]));
|
|
30102
30356
|
let $open = yui_asset_open_link(answer);
|
|
30103
30357
|
if ($open) $caption.appendChild($open);
|
|
@@ -30174,7 +30428,7 @@ function open_hook_choice_dialog(gobj, targets, parent_id, hook) {
|
|
|
30174
30428
|
[[
|
|
30175
30429
|
"span",
|
|
30176
30430
|
{ i18n: tg.topic_name },
|
|
30177
|
-
tg.topic_name
|
|
30431
|
+
text_node(tg.topic_name)
|
|
30178
30432
|
]],
|
|
30179
30433
|
{ click: () => {
|
|
30180
30434
|
(0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_CHOOSE_LINKED", {
|
|
@@ -30425,8 +30679,8 @@ function transform__form_value_2_treedb_value(gobj, col, value, operation) {
|
|
|
30425
30679
|
case "coordinates":
|
|
30426
30680
|
case "blob": {
|
|
30427
30681
|
let r = parse_json_field(value, field_desc.type);
|
|
30428
|
-
if (r.error) (0, _yuneta_gobj_js.
|
|
30429
|
-
value = r.value;
|
|
30682
|
+
if (r.error) (0, _yuneta_gobj_js.log_error)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)}: column '${col.id}' (${field_desc.type}) holds no valid json, handed on as it is`);
|
|
30683
|
+
else value = r.value;
|
|
30430
30684
|
break;
|
|
30431
30685
|
}
|
|
30432
30686
|
case "enum":
|
|
@@ -31270,7 +31524,7 @@ function build_delete_question(gobj, records) {
|
|
|
31270
31524
|
], [
|
|
31271
31525
|
"strong",
|
|
31272
31526
|
{},
|
|
31273
|
-
|
|
31527
|
+
text_node(one[pkey])
|
|
31274
31528
|
]]
|
|
31275
31529
|
]);
|
|
31276
31530
|
else lines.push([
|
|
@@ -31515,7 +31769,7 @@ function ac_open_columns(gobj, event, kw, src) {
|
|
|
31515
31769
|
[$cb, [
|
|
31516
31770
|
"span",
|
|
31517
31771
|
{ class: "ml-2" },
|
|
31518
|
-
column.getDefinition().title || field
|
|
31772
|
+
text_node(column.getDefinition().title || field)
|
|
31519
31773
|
]]
|
|
31520
31774
|
]));
|
|
31521
31775
|
}
|
|
@@ -60206,6 +60460,34 @@ function ensure_brush_select_owned() {
|
|
|
60206
60460
|
__brush_select_registered__ = true;
|
|
60207
60461
|
}
|
|
60208
60462
|
//#endregion
|
|
60463
|
+
//#region src/yui_data_color.js
|
|
60464
|
+
/***********************************************************************
|
|
60465
|
+
* yui_data_color.js
|
|
60466
|
+
*
|
|
60467
|
+
* A colour read from DATA, checked before it goes into markup.
|
|
60468
|
+
*
|
|
60469
|
+
* A card of the treedb graph is html, and the colour a user gave it
|
|
60470
|
+
* (a `__graphs__` record) is written into its `style="..."`. A value
|
|
60471
|
+
* like `red" onmouseover="...` would leave the attribute and run.
|
|
60472
|
+
* Only the plain colour syntaxes pass -- hex, the rgb()/hsl()
|
|
60473
|
+
* functions, a name -- and the browser, where it can, also checks
|
|
60474
|
+
* that it is a colour.
|
|
60475
|
+
*
|
|
60476
|
+
* Copyright (c) 2026, ArtGins.
|
|
60477
|
+
* All Rights Reserved.
|
|
60478
|
+
***********************************************************************/
|
|
60479
|
+
var DATA_COLOR_RE = /^(#[0-9a-f]{3,8}|(rgb|rgba|hsl|hsla)\([0-9.,%\s/+-]+\)|[a-z]+)$/i;
|
|
60480
|
+
/************************************************************
|
|
60481
|
+
* `value` when it is a css colour, else null.
|
|
60482
|
+
************************************************************/
|
|
60483
|
+
function css_color_or_null(value) {
|
|
60484
|
+
if (typeof value !== "string" || !DATA_COLOR_RE.test(value)) return null;
|
|
60485
|
+
if (typeof CSS !== "undefined" && CSS && typeof CSS.supports === "function") {
|
|
60486
|
+
if (!CSS.supports("color", value)) return null;
|
|
60487
|
+
}
|
|
60488
|
+
return value;
|
|
60489
|
+
}
|
|
60490
|
+
//#endregion
|
|
60209
60491
|
//#region src/c_g6_nodes_tree.js
|
|
60210
60492
|
/***********************************************************************
|
|
60211
60493
|
* c_g6_nodes_tree.js
|
|
@@ -60423,6 +60705,7 @@ var attrs_table$4 = [
|
|
|
60423
60705
|
(0, _yuneta_gobj_js.SDATA_END)()
|
|
60424
60706
|
];
|
|
60425
60707
|
var PRIVATE_DATA$4 = {
|
|
60708
|
+
_drag_unwire: null,
|
|
60426
60709
|
anchor_id: "",
|
|
60427
60710
|
anchor_state: "off",
|
|
60428
60711
|
last_zoom: 1,
|
|
@@ -60582,6 +60865,10 @@ function mt_stop$4(gobj) {
|
|
|
60582
60865
|
function mt_destroy$4(gobj) {
|
|
60583
60866
|
let priv = gobj.priv;
|
|
60584
60867
|
uninstall_fold_listener(gobj);
|
|
60868
|
+
if (priv._drag_unwire) {
|
|
60869
|
+
priv._drag_unwire();
|
|
60870
|
+
priv._drag_unwire = null;
|
|
60871
|
+
}
|
|
60585
60872
|
if (priv._on_pointerdown_focus) {
|
|
60586
60873
|
priv.$container.removeEventListener("pointerdown", priv._on_pointerdown_focus, true);
|
|
60587
60874
|
priv._on_pointerdown_focus = null;
|
|
@@ -60737,28 +61024,6 @@ function build_graph$1(gobj) {
|
|
|
60737
61024
|
});
|
|
60738
61025
|
}
|
|
60739
61026
|
/************************************************************
|
|
60740
|
-
* A G6 event, as PLAIN JSON.
|
|
60741
|
-
*
|
|
60742
|
-
* A kw is dumped by the `machine` trace (`trace_json(kw)`), and a
|
|
60743
|
-
* G6 / @antv/g event is circular: serializing one THROWS, so the
|
|
60744
|
-
* first thing a kw carrying `evt` breaks is the trace the FSM
|
|
60745
|
-
* exists to feed. It also drags a live graph element into a
|
|
60746
|
-
* message that may be read after that element is gone.
|
|
60747
|
-
*
|
|
60748
|
-
* What the actions read of it is an id and three scalars. The
|
|
60749
|
-
* event itself never leaves the callback that received it.
|
|
60750
|
-
************************************************************/
|
|
60751
|
-
function g6_event_kw(evt) {
|
|
60752
|
-
let target = evt && evt.target ? evt.target : null;
|
|
60753
|
-
let client = evt && evt.client ? evt.client : null;
|
|
60754
|
-
return {
|
|
60755
|
-
id: target && target.id ? String(target.id) : "",
|
|
60756
|
-
shift: !!(evt && evt.shiftKey),
|
|
60757
|
-
client_x: client && typeof client.x === "number" ? client.x : 0,
|
|
60758
|
-
client_y: client && typeof client.y === "number" ? client.y : 0
|
|
60759
|
-
};
|
|
60760
|
-
}
|
|
60761
|
-
/************************************************************
|
|
60762
61027
|
* Configure G6 event handlers
|
|
60763
61028
|
************************************************************/
|
|
60764
61029
|
function configure_events(gobj) {
|
|
@@ -61518,6 +61783,17 @@ function topic_defaults_of(gobj, topic_name) {
|
|
|
61518
61783
|
return (0, _yuneta_gobj_js.is_object)(topic_props) && (0, _yuneta_gobj_js.is_object)(topic_props.defaults) ? topic_props.defaults : null;
|
|
61519
61784
|
}
|
|
61520
61785
|
/************************************************************
|
|
61786
|
+
* A colour read from DATA (a `__graphs__` record), or null.
|
|
61787
|
+
* It is written into a card's html (see yui_data_color.js): a
|
|
61788
|
+
* refused value logs, and the node wears the topic's colour.
|
|
61789
|
+
************************************************************/
|
|
61790
|
+
function data_color(gobj, value) {
|
|
61791
|
+
if (value === void 0 || value === null || value === "") return null;
|
|
61792
|
+
let color = css_color_or_null(value);
|
|
61793
|
+
if (!color) (0, _yuneta_gobj_js.log_warning)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)}: colour refused, not a css colour: ${JSON.stringify(value)}`);
|
|
61794
|
+
return color;
|
|
61795
|
+
}
|
|
61796
|
+
/************************************************************
|
|
61521
61797
|
* What a node is PAINTED with: its own colours, then the
|
|
61522
61798
|
* topic's default, then the topic's colour.
|
|
61523
61799
|
*
|
|
@@ -61533,10 +61809,10 @@ function topic_defaults_of(gobj, topic_name) {
|
|
|
61533
61809
|
function node_paint_of(gobj, desc, geometry) {
|
|
61534
61810
|
let defaults = topic_defaults_of(gobj, desc.topic_name);
|
|
61535
61811
|
let g = (0, _yuneta_gobj_js.is_object)(geometry) ? geometry : {};
|
|
61536
|
-
let fill = g.fill || defaults && defaults.fill || desc.color;
|
|
61812
|
+
let fill = data_color(gobj, g.fill) || data_color(gobj, defaults && defaults.fill) || desc.color;
|
|
61537
61813
|
return {
|
|
61538
61814
|
fill,
|
|
61539
|
-
stroke: g.stroke || defaults && defaults.stroke || getStrokeColor(fill),
|
|
61815
|
+
stroke: data_color(gobj, g.stroke) || data_color(gobj, defaults && defaults.stroke) || getStrokeColor(fill),
|
|
61540
61816
|
lineWidth: g.lineWidth || defaults && defaults.lineWidth || 1
|
|
61541
61817
|
};
|
|
61542
61818
|
}
|
|
@@ -63495,7 +63771,9 @@ function select_node(gobj, node_id) {
|
|
|
63495
63771
|
history_pause(gobj);
|
|
63496
63772
|
try {
|
|
63497
63773
|
graph.setElementState(node_id, ["selected"]);
|
|
63498
|
-
} catch (e) {
|
|
63774
|
+
} catch (e) {
|
|
63775
|
+
(0, _yuneta_gobj_js.log_warning)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)}: node state not set: ${e}`);
|
|
63776
|
+
}
|
|
63499
63777
|
priv._selected_node_id = node_id;
|
|
63500
63778
|
paint_selection(gobj, [node_id]);
|
|
63501
63779
|
show_resize_handles(gobj);
|
|
@@ -63521,7 +63799,9 @@ function deselect_node(gobj) {
|
|
|
63521
63799
|
let states = {};
|
|
63522
63800
|
for (let id of clearing) states[id] = [];
|
|
63523
63801
|
graph.setElementState(states);
|
|
63524
|
-
} catch (e) {
|
|
63802
|
+
} catch (e) {
|
|
63803
|
+
(0, _yuneta_gobj_js.log_warning)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)}: node states not cleared: ${e}`);
|
|
63804
|
+
}
|
|
63525
63805
|
priv._selected_node_id = null;
|
|
63526
63806
|
paint_selection(gobj, []);
|
|
63527
63807
|
graph_draw(gobj).then(() => {
|
|
@@ -63733,6 +64013,11 @@ function start_node_resize(gobj, e, mx, my) {
|
|
|
63733
64013
|
document.addEventListener("pointermove", onPointerMove);
|
|
63734
64014
|
document.addEventListener("pointerup", onPointerUp);
|
|
63735
64015
|
document.addEventListener("pointercancel", onPointerCancel);
|
|
64016
|
+
gobj.priv._drag_unwire = function() {
|
|
64017
|
+
document.removeEventListener("pointermove", onPointerMove);
|
|
64018
|
+
document.removeEventListener("pointerup", onPointerUp);
|
|
64019
|
+
document.removeEventListener("pointercancel", onPointerCancel);
|
|
64020
|
+
};
|
|
63736
64021
|
}
|
|
63737
64022
|
/************************************************************
|
|
63738
64023
|
* Port selection and individual port resizing
|
|
@@ -64348,6 +64633,11 @@ function start_link_drag(gobj, e) {
|
|
|
64348
64633
|
document.addEventListener("pointermove", onPointerMove);
|
|
64349
64634
|
document.addEventListener("pointerup", onPointerUp);
|
|
64350
64635
|
document.addEventListener("pointercancel", onPointerCancel);
|
|
64636
|
+
gobj.priv._drag_unwire = function() {
|
|
64637
|
+
document.removeEventListener("pointermove", onPointerMove);
|
|
64638
|
+
document.removeEventListener("pointerup", onPointerUp);
|
|
64639
|
+
document.removeEventListener("pointercancel", onPointerCancel);
|
|
64640
|
+
};
|
|
64351
64641
|
}
|
|
64352
64642
|
/************************************************************
|
|
64353
64643
|
* Find if a canvas point hits a valid hook port during
|
|
@@ -64566,6 +64856,11 @@ function start_port_resize(gobj, e) {
|
|
|
64566
64856
|
document.addEventListener("pointermove", onPointerMove);
|
|
64567
64857
|
document.addEventListener("pointerup", onPointerUp);
|
|
64568
64858
|
document.addEventListener("pointercancel", onPointerCancel);
|
|
64859
|
+
gobj.priv._drag_unwire = function() {
|
|
64860
|
+
document.removeEventListener("pointermove", onPointerMove);
|
|
64861
|
+
document.removeEventListener("pointerup", onPointerUp);
|
|
64862
|
+
document.removeEventListener("pointercancel", onPointerCancel);
|
|
64863
|
+
};
|
|
64569
64864
|
}
|
|
64570
64865
|
/************************************************************
|
|
64571
64866
|
* Edge selection: show a floating properties icon near
|
|
@@ -64579,7 +64874,9 @@ function select_edge(gobj, edge_id) {
|
|
|
64579
64874
|
history_pause(gobj);
|
|
64580
64875
|
try {
|
|
64581
64876
|
graph.setElementState(edge_id, ["selected"]);
|
|
64582
|
-
} catch (e) {
|
|
64877
|
+
} catch (e) {
|
|
64878
|
+
(0, _yuneta_gobj_js.log_warning)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)}: edge state not set: ${e}`);
|
|
64879
|
+
}
|
|
64583
64880
|
show_edge_icon(gobj);
|
|
64584
64881
|
graph_draw(gobj).then(() => {
|
|
64585
64882
|
history_resume(gobj);
|
|
@@ -64595,7 +64892,9 @@ function deselect_edge(gobj) {
|
|
|
64595
64892
|
history_pause(gobj);
|
|
64596
64893
|
try {
|
|
64597
64894
|
graph.setElementState(priv._selected_edge_id, []);
|
|
64598
|
-
} catch (e) {
|
|
64895
|
+
} catch (e) {
|
|
64896
|
+
(0, _yuneta_gobj_js.log_warning)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)}: edge state not cleared: ${e}`);
|
|
64897
|
+
}
|
|
64599
64898
|
priv._selected_edge_id = null;
|
|
64600
64899
|
graph_draw(gobj).then(() => {
|
|
64601
64900
|
history_resume(gobj);
|
|
@@ -64685,7 +64984,9 @@ function show_edge_popover(gobj) {
|
|
|
64685
64984
|
history_pause(gobj);
|
|
64686
64985
|
try {
|
|
64687
64986
|
graph.setElementState(edge_id, []);
|
|
64688
|
-
} catch (e) {
|
|
64987
|
+
} catch (e) {
|
|
64988
|
+
(0, _yuneta_gobj_js.log_warning)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)}: edge state not cleared for the style preview: ${e}`);
|
|
64989
|
+
}
|
|
64689
64990
|
graph_draw(gobj).then(() => {
|
|
64690
64991
|
history_resume(gobj);
|
|
64691
64992
|
});
|
|
@@ -72740,6 +73041,7 @@ var JSON_SHORT_ESCAPES = {
|
|
|
72740
73041
|
"\f": "f"
|
|
72741
73042
|
};
|
|
72742
73043
|
function json_control(ch) {
|
|
73044
|
+
if (ch === "\0") return "\\\\ufffd";
|
|
72743
73045
|
let short = JSON_SHORT_ESCAPES[ch];
|
|
72744
73046
|
if (short) return C_BACKSLASH + short;
|
|
72745
73047
|
return "\\\\u" + ch.charCodeAt(0).toString(16).padStart(4, "0");
|
|
@@ -74341,7 +74643,7 @@ function show_notice(gobj, key, detail, detail_is_key) {
|
|
|
74341
74643
|
$notice.appendChild((0, _yuneta_gobj_js.createElement2)([
|
|
74342
74644
|
"span",
|
|
74343
74645
|
attrs,
|
|
74344
|
-
detail_is_key ? (0, i18next.t)(`${detail}`) : `${detail}`
|
|
74646
|
+
text_node(detail_is_key ? (0, i18next.t)(`${detail}`) : `${detail}`)
|
|
74345
74647
|
]));
|
|
74346
74648
|
}
|
|
74347
74649
|
}
|
|
@@ -74435,7 +74737,7 @@ function render_toolbar(gobj) {
|
|
|
74435
74737
|
$trail.push([
|
|
74436
74738
|
"span",
|
|
74437
74739
|
{ class: "SCHEMA_CRUMB_TREEDB" },
|
|
74438
|
-
priv.treedb_id
|
|
74740
|
+
text_node(priv.treedb_id)
|
|
74439
74741
|
]);
|
|
74440
74742
|
}
|
|
74441
74743
|
if (priv.topic_name) {
|
|
@@ -74447,7 +74749,7 @@ function render_toolbar(gobj) {
|
|
|
74447
74749
|
$trail.push([
|
|
74448
74750
|
"span",
|
|
74449
74751
|
{ class: "SCHEMA_CRUMB_TOPIC" },
|
|
74450
|
-
priv.topic_name
|
|
74752
|
+
text_node(priv.topic_name)
|
|
74451
74753
|
]);
|
|
74452
74754
|
}
|
|
74453
74755
|
if (priv.diagram) {
|
|
@@ -74576,7 +74878,7 @@ function open_card(gobj, logical, title, icon, tags, event, kw) {
|
|
|
74576
74878
|
], [
|
|
74577
74879
|
"span",
|
|
74578
74880
|
{ class: "ml-1" },
|
|
74579
|
-
|
|
74881
|
+
text_node(tag.text)
|
|
74580
74882
|
]] : `${tag.text}`
|
|
74581
74883
|
];
|
|
74582
74884
|
});
|
|
@@ -74603,7 +74905,7 @@ function open_card(gobj, logical, title, icon, tags, event, kw) {
|
|
|
74603
74905
|
], [
|
|
74604
74906
|
"span",
|
|
74605
74907
|
{ class: `${logical}_NAME has-text-weight-semibold` },
|
|
74606
|
-
|
|
74908
|
+
text_node(title)
|
|
74607
74909
|
]]
|
|
74608
74910
|
], [
|
|
74609
74911
|
"div",
|
|
@@ -74710,7 +75012,7 @@ function render_topics(gobj, $body) {
|
|
|
74710
75012
|
[
|
|
74711
75013
|
"span",
|
|
74712
75014
|
{ class: "has-text-weight-semibold" },
|
|
74713
|
-
|
|
75015
|
+
text_node(topic.name)
|
|
74714
75016
|
],
|
|
74715
75017
|
topic.system_topic ? [
|
|
74716
75018
|
"span",
|
|
@@ -74744,7 +75046,7 @@ function render_topics(gobj, $body) {
|
|
|
74744
75046
|
[[
|
|
74745
75047
|
"code",
|
|
74746
75048
|
{},
|
|
74747
|
-
|
|
75049
|
+
text_node(topic.id)
|
|
74748
75050
|
]]
|
|
74749
75051
|
] : [
|
|
74750
75052
|
"span",
|
|
@@ -74759,13 +75061,13 @@ function render_topics(gobj, $body) {
|
|
|
74759
75061
|
[[
|
|
74760
75062
|
"code",
|
|
74761
75063
|
{},
|
|
74762
|
-
|
|
75064
|
+
text_node(topic.pkey || "id")
|
|
74763
75065
|
]]
|
|
74764
75066
|
],
|
|
74765
75067
|
[
|
|
74766
75068
|
"td",
|
|
74767
75069
|
{ class: "SCHEMA_TOPIC_COLS has-text-right" },
|
|
74768
|
-
|
|
75070
|
+
text_node(topic.cols.length)
|
|
74769
75071
|
],
|
|
74770
75072
|
[
|
|
74771
75073
|
"td",
|
|
@@ -74773,7 +75075,7 @@ function render_topics(gobj, $body) {
|
|
|
74773
75075
|
[[
|
|
74774
75076
|
"span",
|
|
74775
75077
|
{ class: `tag ${pending ? "is-warning" : "is-info"} is-light` },
|
|
74776
|
-
|
|
75078
|
+
text_node(topic.topic_version === void 0 ? "?" : topic.topic_version)
|
|
74777
75079
|
]]
|
|
74778
75080
|
],
|
|
74779
75081
|
[
|
|
@@ -75049,7 +75351,7 @@ function column_row(gobj, topic, col, index, readonly, twice) {
|
|
|
75049
75351
|
return [
|
|
75050
75352
|
"span",
|
|
75051
75353
|
{ class: `SCHEMA_COL_FLAG tag ${yui_tint(flag_style(flag))}`.trimEnd() },
|
|
75052
|
-
|
|
75354
|
+
text_node(flag)
|
|
75053
75355
|
];
|
|
75054
75356
|
});
|
|
75055
75357
|
let link = "";
|
|
@@ -75085,7 +75387,7 @@ function column_row(gobj, topic, col, index, readonly, twice) {
|
|
|
75085
75387
|
[
|
|
75086
75388
|
"code",
|
|
75087
75389
|
{},
|
|
75088
|
-
|
|
75390
|
+
text_node(col.name)
|
|
75089
75391
|
],
|
|
75090
75392
|
ambiguous ? [
|
|
75091
75393
|
"span",
|
|
@@ -75093,7 +75395,7 @@ function column_row(gobj, topic, col, index, readonly, twice) {
|
|
|
75093
75395
|
[[
|
|
75094
75396
|
"code",
|
|
75095
75397
|
{},
|
|
75096
|
-
|
|
75398
|
+
text_node(col.id)
|
|
75097
75399
|
]]
|
|
75098
75400
|
] : [
|
|
75099
75401
|
"span",
|
|
@@ -75117,7 +75419,7 @@ function column_row(gobj, topic, col, index, readonly, twice) {
|
|
|
75117
75419
|
[
|
|
75118
75420
|
"td",
|
|
75119
75421
|
{ class: "SCHEMA_COL_HEADER" },
|
|
75120
|
-
|
|
75422
|
+
text_node(record.header || "")
|
|
75121
75423
|
],
|
|
75122
75424
|
[
|
|
75123
75425
|
"td",
|
|
@@ -75125,7 +75427,7 @@ function column_row(gobj, topic, col, index, readonly, twice) {
|
|
|
75125
75427
|
[[
|
|
75126
75428
|
"code",
|
|
75127
75429
|
{},
|
|
75128
|
-
|
|
75430
|
+
text_node(record.type || "")
|
|
75129
75431
|
]]
|
|
75130
75432
|
],
|
|
75131
75433
|
[
|
|
@@ -75143,7 +75445,7 @@ function column_row(gobj, topic, col, index, readonly, twice) {
|
|
|
75143
75445
|
[
|
|
75144
75446
|
"td",
|
|
75145
75447
|
{ class: "SCHEMA_COL_LINK" },
|
|
75146
|
-
|
|
75448
|
+
text_node(link)
|
|
75147
75449
|
],
|
|
75148
75450
|
[
|
|
75149
75451
|
"td",
|
|
@@ -75554,7 +75856,7 @@ function flags_field(gobj, type, current) {
|
|
|
75554
75856
|
})], [
|
|
75555
75857
|
"span",
|
|
75556
75858
|
{ class: "SCHEMA_FLAG_NAME ml-1" },
|
|
75557
|
-
|
|
75859
|
+
text_node(flag.name)
|
|
75558
75860
|
]]
|
|
75559
75861
|
];
|
|
75560
75862
|
});
|
|
@@ -75891,12 +76193,12 @@ function open_report(gobj, findings, treedb_id) {
|
|
|
75891
76193
|
[
|
|
75892
76194
|
"td",
|
|
75893
76195
|
{ class: "SCHEMA_REPORT_TOPIC" },
|
|
75894
|
-
|
|
76196
|
+
text_node(finding.topic || "")
|
|
75895
76197
|
],
|
|
75896
76198
|
[
|
|
75897
76199
|
"td",
|
|
75898
76200
|
{ class: "SCHEMA_REPORT_COL" },
|
|
75899
|
-
|
|
76201
|
+
text_node(finding.col || "")
|
|
75900
76202
|
],
|
|
75901
76203
|
[
|
|
75902
76204
|
"td",
|
|
@@ -75904,7 +76206,7 @@ function open_report(gobj, findings, treedb_id) {
|
|
|
75904
76206
|
[[
|
|
75905
76207
|
"code",
|
|
75906
76208
|
{},
|
|
75907
|
-
|
|
76209
|
+
text_node(finding.detail || "")
|
|
75908
76210
|
]]
|
|
75909
76211
|
]
|
|
75910
76212
|
]
|
|
@@ -76340,7 +76642,7 @@ function render_import_plan(gobj, plan) {
|
|
|
76340
76642
|
], [
|
|
76341
76643
|
"code",
|
|
76342
76644
|
{ class: "ml-2" },
|
|
76343
|
-
|
|
76645
|
+
text_node(what)
|
|
76344
76646
|
]]
|
|
76345
76647
|
];
|
|
76346
76648
|
});
|
|
@@ -76359,7 +76661,7 @@ function render_import_plan(gobj, plan) {
|
|
|
76359
76661
|
[
|
|
76360
76662
|
"span",
|
|
76361
76663
|
{ class: "ml-1" },
|
|
76362
|
-
|
|
76664
|
+
text_node(plan.writes.length)
|
|
76363
76665
|
],
|
|
76364
76666
|
[
|
|
76365
76667
|
"span",
|
|
@@ -76372,7 +76674,7 @@ function render_import_plan(gobj, plan) {
|
|
|
76372
76674
|
[
|
|
76373
76675
|
"span",
|
|
76374
76676
|
{ class: "ml-1 has-text-weight-bold" },
|
|
76375
|
-
|
|
76677
|
+
text_node(deletes.length)
|
|
76376
76678
|
]
|
|
76377
76679
|
]
|
|
76378
76680
|
], [
|
|
@@ -76414,7 +76716,7 @@ function open_orphans(gobj) {
|
|
|
76414
76716
|
[[
|
|
76415
76717
|
"code",
|
|
76416
76718
|
{},
|
|
76417
|
-
|
|
76719
|
+
text_node(entry.id)
|
|
76418
76720
|
]]
|
|
76419
76721
|
],
|
|
76420
76722
|
[
|
|
@@ -80293,7 +80595,7 @@ function traffic_scalar_row(key, value) {
|
|
|
80293
80595
|
let val_children = [[
|
|
80294
80596
|
"span",
|
|
80295
80597
|
{ class: "TRAFFIC_VAL " + cls },
|
|
80296
|
-
text
|
|
80598
|
+
text_node(text)
|
|
80297
80599
|
]];
|
|
80298
80600
|
if (key in TRAFFIC_TS_FIELDS && typeof value === "number") {
|
|
80299
80601
|
let iso = traffic_iso(value);
|
|
@@ -80315,7 +80617,7 @@ function traffic_scalar_row(key, value) {
|
|
|
80315
80617
|
[
|
|
80316
80618
|
"span",
|
|
80317
80619
|
{ class: "TRAFFIC_KEY" },
|
|
80318
|
-
key + ":"
|
|
80620
|
+
text_node(key + ":")
|
|
80319
80621
|
],
|
|
80320
80622
|
[
|
|
80321
80623
|
"span",
|
|
@@ -80410,7 +80712,7 @@ function traffic_value_node(key, value) {
|
|
|
80410
80712
|
[
|
|
80411
80713
|
"span",
|
|
80412
80714
|
{ class: "TRAFFIC_KEY" },
|
|
80413
|
-
key + ":"
|
|
80715
|
+
text_node(key + ":")
|
|
80414
80716
|
],
|
|
80415
80717
|
[
|
|
80416
80718
|
"span",
|
|
@@ -80426,7 +80728,7 @@ function traffic_value_node(key, value) {
|
|
|
80426
80728
|
]] : object_preview_parts(value, count).map((t) => [
|
|
80427
80729
|
"span",
|
|
80428
80730
|
{ class: "TRAFFIC_PREV " + t.cls },
|
|
80429
|
-
t.text
|
|
80731
|
+
text_node(t.text)
|
|
80430
80732
|
]);
|
|
80431
80733
|
return [
|
|
80432
80734
|
"details",
|
|
@@ -80443,7 +80745,7 @@ function traffic_value_node(key, value) {
|
|
|
80443
80745
|
[
|
|
80444
80746
|
"span",
|
|
80445
80747
|
{ class: "TRAFFIC_NEST_KEY" },
|
|
80446
|
-
key
|
|
80748
|
+
text_node(key)
|
|
80447
80749
|
],
|
|
80448
80750
|
[
|
|
80449
80751
|
"span",
|
|
@@ -80478,17 +80780,17 @@ function event_spans(e) {
|
|
|
80478
80780
|
], [
|
|
80479
80781
|
"span",
|
|
80480
80782
|
{ class: "TRAFFIC_EVENT" },
|
|
80481
|
-
e.event
|
|
80783
|
+
text_node(e.event)
|
|
80482
80784
|
]];
|
|
80483
80785
|
if (e.command) spans.push([
|
|
80484
80786
|
"span",
|
|
80485
80787
|
{ class: "TRAFFIC_CMD" },
|
|
80486
|
-
e.command
|
|
80788
|
+
text_node(e.command)
|
|
80487
80789
|
]);
|
|
80488
80790
|
if (e.title) spans.push([
|
|
80489
80791
|
"span",
|
|
80490
80792
|
{ class: "TRAFFIC_SRC" },
|
|
80491
|
-
e.title
|
|
80793
|
+
text_node(e.title)
|
|
80492
80794
|
]);
|
|
80493
80795
|
return spans;
|
|
80494
80796
|
}
|
|
@@ -80568,7 +80870,7 @@ function render_full(e) {
|
|
|
80568
80870
|
], [
|
|
80569
80871
|
"pre",
|
|
80570
80872
|
{ class: "TRAFFIC_FULL" },
|
|
80571
|
-
text
|
|
80873
|
+
document.createTextNode(String(text))
|
|
80572
80874
|
]];
|
|
80573
80875
|
return (0, _yuneta_gobj_js.createElement2)([
|
|
80574
80876
|
"div",
|