@yuneta/gobj-ui 7.26.8 → 7.26.10
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 +86 -0
- package/dist/gobj-ui.cjs.js +217 -82
- package/dist/gobj-ui.es.js +218 -83
- package/package.json +7 -3
- package/src/c_g6_nodes_tree.js +37 -7
- package/src/c_yui_form.js +47 -13
- package/src/c_yui_gclass.js +1 -1
- package/src/c_yui_gobj_tree_js.js +6 -2
- package/src/c_yui_nav.js +2 -2
- package/src/c_yui_schema_editor.js +22 -22
- package/src/c_yui_shell.js +57 -3
- package/src/c_yui_treedb_topic_with_form.js +4 -4
- package/src/c_yui_treedb_topics.js +9 -9
- package/src/c_yui_window.js +13 -11
- package/src/c_yui_window_manager.js +58 -6
- package/src/form_toolbar_plan.js +5 -5
- package/src/map_stop_windows.wiring.test.js +112 -0
- package/src/overlay_marker_after_back.wiring.test.js +212 -0
- package/src/shell_modals.js +2 -2
- package/src/vite_plugin_yuneta_html.test.js +17 -2
- package/src/window_show.wiring.test.js +50 -3
- 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 +2 -2
- package/src/yui_text.js +12 -0
- package/src/yui_text.test.js +29 -1
- package/vite-plugin-yuneta-html.js +15 -1
package/dist/gobj-ui.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SDATA, SDATA_END, clean_name, createElement2, createOneHtml, create_template_record, data_type_t, debounce, delete_from_list, duplicate_objects, empty_json, empty_string, escapeHtml, event_flag_t, flat_diff, gclass_create, gclass_find_by_name, gclass_flag_t, getPositionRelativeToBody, gobj_bottom_gobj, gobj_change_state, gobj_command, gobj_create, gobj_create_pure_child, gobj_create_service, gobj_current_state, gobj_destroy, gobj_find_child, gobj_find_service, gobj_full_name, gobj_gclass_name, gobj_get_gclass_trace_level2, gobj_global_trace_level, gobj_global_trace_no_level, gobj_has_event, gobj_is_destroying, gobj_is_playing, gobj_is_pure_child, gobj_is_running, gobj_is_service, gobj_is_volatil, gobj_match_children, gobj_name, gobj_parent, gobj_post_event, gobj_publish_event, gobj_read_attr, gobj_read_bool_attr, gobj_read_integer_attr, gobj_read_pointer_attr, gobj_read_str_attr, gobj_save_persistent_attrs, gobj_send_event, gobj_set_trace_machine_format, gobj_short_name, gobj_start, gobj_start_tree, gobj_stop, gobj_stop_children, gobj_subscribe_event, gobj_unsubscribe_event, gobj_write_attr, gobj_write_bool_attr, gobj_write_integer_attr, gobj_write_str_attr, gobj_yuno, gobj_yuno_name, is_array, is_boolean, is_date, is_gobj, is_null, is_number, is_object, is_string, json2flat, json_deep_copy, json_is_identical, json_object_size, json_object_update, json_object_update_missing, json_size, kw_clone_by_keys, kw_flag_t, kw_get_dict, kw_get_dict_value, kw_get_int, kw_get_local_storage_value, kw_get_str, kw_has_key, kw_set_dict_value, kw_set_local_storage_value, kwid_find_one_record, kwid_new_dict, log_error, log_warning, msg_iev_get_stack, parseBoolean, parseSVG, refresh_language, safeSrc, sdata_flag_t, set_console_log_enabled, set_log_callback, sprintf, str_in_list, template_get_field_desc, trace_level_t, trace_msg, treedb_decoder_fkey, treedb_encoder_fkey, treedb_get_field_desc, treedb_hook_data_size } from "@yuneta/gobj-js";
|
|
1
|
+
import { SDATA, SDATA_END, clean_name, createElement2, createOneHtml, create_template_record, data_type_t, debounce, delete_from_list, duplicate_objects, empty_json, empty_string, escapeHtml, event_flag_t, flat_diff, gclass_create, gclass_find_by_name, gclass_flag_t, getPositionRelativeToBody, gobj_bottom_gobj, gobj_change_state, gobj_command, gobj_create, gobj_create_pure_child, gobj_create_service, gobj_current_state, gobj_destroy, gobj_find_child, gobj_find_service, gobj_full_name, gobj_gclass_name, gobj_get_gclass_trace_level2, gobj_global_trace_level, gobj_global_trace_no_level, gobj_has_event, gobj_is_destroying, gobj_is_playing, gobj_is_pure_child, gobj_is_running, gobj_is_service, gobj_is_volatil, gobj_match_children, gobj_name, gobj_parent, gobj_post_event, gobj_publish_event, gobj_read_attr, gobj_read_bool_attr, gobj_read_integer_attr, gobj_read_pointer_attr, gobj_read_str_attr, gobj_save_persistent_attrs, gobj_send_event, gobj_set_trace_machine_format, gobj_short_name, gobj_start, gobj_start_tree, gobj_stop, gobj_stop_children, gobj_subscribe_event, gobj_unsubscribe_event, gobj_write_attr, gobj_write_bool_attr, gobj_write_integer_attr, gobj_write_str_attr, gobj_yuno, gobj_yuno_name, html_markup, is_array, is_boolean, is_date, is_gobj, is_null, is_number, is_object, is_string, json2flat, json_deep_copy, json_is_identical, json_object_size, json_object_update, json_object_update_missing, json_size, kw_clone_by_keys, kw_flag_t, kw_get_dict, kw_get_dict_value, kw_get_int, kw_get_local_storage_value, kw_get_str, kw_has_key, kw_set_dict_value, kw_set_local_storage_value, kwid_find_one_record, kwid_new_dict, log_error, log_warning, msg_iev_get_stack, parseBoolean, parseSVG, refresh_language, safeSrc, sdata_flag_t, set_console_log_enabled, set_log_callback, sprintf, str_in_list, template_get_field_desc, trace_level_t, trace_msg, treedb_decoder_fkey, treedb_encoder_fkey, treedb_get_field_desc, treedb_hook_data_size } from "@yuneta/gobj-js";
|
|
2
2
|
import i18next, { t } from "i18next";
|
|
3
3
|
import TomSelect from "tom-select";
|
|
4
4
|
import { createJSONEditor } from "vanilla-jsoneditor";
|
|
@@ -914,6 +914,7 @@ var PRIVATE_DATA$22 = {
|
|
|
914
914
|
overlay_stack: [],
|
|
915
915
|
overlay_seq: 0,
|
|
916
916
|
expected_pops: 0,
|
|
917
|
+
pending_markers: [],
|
|
917
918
|
popstate_handler: null,
|
|
918
919
|
avatar_provider: null,
|
|
919
920
|
avatar_nodes: [],
|
|
@@ -971,6 +972,7 @@ function mt_start$20(gobj) {
|
|
|
971
972
|
if (!p) return;
|
|
972
973
|
if (p.expected_pops > 0) {
|
|
973
974
|
p.expected_pops--;
|
|
975
|
+
if (p.expected_pops === 0) push_pending_markers(gobj);
|
|
974
976
|
return;
|
|
975
977
|
}
|
|
976
978
|
if (p.overlay_stack.length === 0) return;
|
|
@@ -2416,14 +2418,35 @@ function push_overlay_history(gobj, close, opts) {
|
|
|
2416
2418
|
keep_on_navigate: !!(opts && opts.keep_on_navigate)
|
|
2417
2419
|
};
|
|
2418
2420
|
priv.overlay_stack.push(entry);
|
|
2421
|
+
if (priv.expected_pops > 0) {
|
|
2422
|
+
entry.marker_pending = true;
|
|
2423
|
+
priv.pending_markers.push(entry);
|
|
2424
|
+
return entry;
|
|
2425
|
+
}
|
|
2426
|
+
if (!push_overlay_marker(gobj, entry)) return null;
|
|
2427
|
+
return entry;
|
|
2428
|
+
}
|
|
2429
|
+
function push_overlay_marker(gobj, entry) {
|
|
2430
|
+
let priv = gobj.priv;
|
|
2419
2431
|
try {
|
|
2420
2432
|
window.history.pushState({ __yui_overlay__: entry.id }, "");
|
|
2421
2433
|
} catch (e) {
|
|
2422
|
-
priv.overlay_stack.
|
|
2434
|
+
let idx = priv.overlay_stack.indexOf(entry);
|
|
2435
|
+
if (idx >= 0) priv.overlay_stack.splice(idx, 1);
|
|
2423
2436
|
log_warning(`C_YUI_SHELL: overlay pushState failed: ${e}`);
|
|
2424
|
-
return
|
|
2437
|
+
return false;
|
|
2438
|
+
}
|
|
2439
|
+
return true;
|
|
2440
|
+
}
|
|
2441
|
+
function push_pending_markers(gobj) {
|
|
2442
|
+
let priv = gobj.priv;
|
|
2443
|
+
let pending = priv.pending_markers.splice(0);
|
|
2444
|
+
for (let entry of pending) {
|
|
2445
|
+
entry.marker_pending = false;
|
|
2446
|
+
if (entry.dismissed || priv.overlay_stack.indexOf(entry) < 0) continue;
|
|
2447
|
+
entry.hash = window.location.hash;
|
|
2448
|
+
push_overlay_marker(gobj, entry);
|
|
2425
2449
|
}
|
|
2426
|
-
return entry;
|
|
2427
2450
|
}
|
|
2428
2451
|
function overlay_dismissed(gobj, entry) {
|
|
2429
2452
|
let priv = gobj.priv;
|
|
@@ -2432,6 +2455,7 @@ function overlay_dismissed(gobj, entry) {
|
|
|
2432
2455
|
let idx = priv.overlay_stack.indexOf(entry);
|
|
2433
2456
|
if (idx < 0) return;
|
|
2434
2457
|
priv.overlay_stack.splice(idx, 1);
|
|
2458
|
+
if (entry.marker_pending) return;
|
|
2435
2459
|
let st = window.history.state;
|
|
2436
2460
|
if (st && st.__yui_overlay__ === entry.id) {
|
|
2437
2461
|
priv.expected_pops++;
|
|
@@ -3055,6 +3079,16 @@ function text_node(value) {
|
|
|
3055
3079
|
if (value === null || value === void 0) return document.createTextNode("");
|
|
3056
3080
|
return document.createTextNode(String(value).trim());
|
|
3057
3081
|
}
|
|
3082
|
+
/************************************************************
|
|
3083
|
+
* A Tabulator `titleFormatter` that shows the column title as text.
|
|
3084
|
+
*
|
|
3085
|
+
* Tabulator puts a STRING title in with innerHTML, so a title taken
|
|
3086
|
+
* from a schema (`header`, which the schema editor writes) is markup
|
|
3087
|
+
* unless the column carries a formatter that returns a Node.
|
|
3088
|
+
************************************************************/
|
|
3089
|
+
function text_title_formatter(cell) {
|
|
3090
|
+
return text_node(cell.getValue());
|
|
3091
|
+
}
|
|
3058
3092
|
//#endregion
|
|
3059
3093
|
//#region src/shell_modals.js
|
|
3060
3094
|
/***********************************************************************
|
|
@@ -3277,7 +3311,7 @@ function yui_shell_show_modal(shell, content, opts) {
|
|
|
3277
3311
|
class: "MODAL_TITLE_KIND",
|
|
3278
3312
|
i18n: title
|
|
3279
3313
|
},
|
|
3280
|
-
title
|
|
3314
|
+
text_node(title)
|
|
3281
3315
|
]] : [])
|
|
3282
3316
|
],
|
|
3283
3317
|
[
|
|
@@ -3466,7 +3500,7 @@ function build_dialog(shell, message, buttons, opts) {
|
|
|
3466
3500
|
class: "CONFIRM_TITLE yui-confirm-title has-text-centered",
|
|
3467
3501
|
i18n: title
|
|
3468
3502
|
},
|
|
3469
|
-
title
|
|
3503
|
+
text_node(title)
|
|
3470
3504
|
]);
|
|
3471
3505
|
$card_children.push(["button", {
|
|
3472
3506
|
class: "CONFIRM_CLOSE delete yui-confirm-x",
|
|
@@ -3701,11 +3735,11 @@ function mt_create$21(gobj) {
|
|
|
3701
3735
|
let $c = gobj_read_attr(gobj, "$container");
|
|
3702
3736
|
if ($c) $c.addEventListener("pointerdown", function() {
|
|
3703
3737
|
let m = gobj_read_pointer_attr(gobj, "manager");
|
|
3704
|
-
if (m) gobj_send_event(m, "EV_FOCUS_WINDOW", { window: gobj }, gobj);
|
|
3738
|
+
if (m) gobj_send_event(m, "EV_FOCUS_WINDOW", { window: gobj_full_name(gobj) }, gobj);
|
|
3705
3739
|
}, true);
|
|
3706
3740
|
let chip_title = composed_title(gobj);
|
|
3707
3741
|
gobj_send_event(manager, "EV_REGISTER_WINDOW", {
|
|
3708
|
-
window: gobj,
|
|
3742
|
+
window: gobj_full_name(gobj),
|
|
3709
3743
|
title: chip_title ? chip_title : gobj_short_name(gobj),
|
|
3710
3744
|
title_key: gobj_read_str_attr(gobj, "title") || "",
|
|
3711
3745
|
title_kind_text: empty_string(gobj_read_str_attr(gobj, "title")) ? "" : t(gobj_read_str_attr(gobj, "title")),
|
|
@@ -3724,7 +3758,7 @@ function mt_create$21(gobj) {
|
|
|
3724
3758
|
***************************************************************/
|
|
3725
3759
|
function mt_destroy$21(gobj) {
|
|
3726
3760
|
let manager = gobj_read_pointer_attr(gobj, "manager");
|
|
3727
|
-
if (manager) gobj_send_event(manager, "EV_UNREGISTER_WINDOW", { window: gobj }, gobj);
|
|
3761
|
+
if (manager) gobj_send_event(manager, "EV_UNREGISTER_WINDOW", { window: gobj_full_name(gobj) }, gobj);
|
|
3728
3762
|
let back_overlay = gobj_read_attr(gobj, "back_overlay");
|
|
3729
3763
|
if (back_overlay) {
|
|
3730
3764
|
let shell = yui_shell_of(gobj);
|
|
@@ -3840,7 +3874,7 @@ function build_default_header(gobj) {
|
|
|
3840
3874
|
class: "WINDOW_TITLE_KIND has-text-weight-semibold",
|
|
3841
3875
|
i18n: title
|
|
3842
3876
|
},
|
|
3843
|
-
title
|
|
3877
|
+
text_node(title)
|
|
3844
3878
|
]);
|
|
3845
3879
|
return createElement2([
|
|
3846
3880
|
"span",
|
|
@@ -3892,7 +3926,7 @@ function do_minimize(gobj) {
|
|
|
3892
3926
|
log_error(`${gobj_short_name(gobj)}: minimize without a window manager`);
|
|
3893
3927
|
return;
|
|
3894
3928
|
}
|
|
3895
|
-
gobj_send_event(manager, "EV_MINIMIZE_WINDOW", { window: gobj }, gobj);
|
|
3929
|
+
gobj_send_event(manager, "EV_MINIMIZE_WINDOW", { window: gobj_full_name(gobj) }, gobj);
|
|
3896
3930
|
}
|
|
3897
3931
|
/************************************************************
|
|
3898
3932
|
* Build UI
|
|
@@ -3993,7 +4027,7 @@ function build_ui$18(gobj) {
|
|
|
3993
4027
|
"data-i18n-aria-label": "minimize",
|
|
3994
4028
|
style: gobj_read_bool_attr(gobj, "showMin") && gobj_read_pointer_attr(gobj, "manager") ? "" : "display:none;"
|
|
3995
4029
|
},
|
|
3996
|
-
WC_MIN,
|
|
4030
|
+
html_markup(WC_MIN),
|
|
3997
4031
|
{ click: (evt) => {
|
|
3998
4032
|
evt.stopPropagation();
|
|
3999
4033
|
do_minimize(gobj);
|
|
@@ -4010,7 +4044,7 @@ function build_ui$18(gobj) {
|
|
|
4010
4044
|
"data-i18n-aria-label": "maximize",
|
|
4011
4045
|
style: gobj_read_bool_attr(gobj, "showMax") ? "" : "display:none;"
|
|
4012
4046
|
},
|
|
4013
|
-
WC_MAX,
|
|
4047
|
+
html_markup(WC_MAX),
|
|
4014
4048
|
{ click: (evt) => {
|
|
4015
4049
|
evt.stopPropagation();
|
|
4016
4050
|
toggle(gobj);
|
|
@@ -4026,7 +4060,7 @@ function build_ui$18(gobj) {
|
|
|
4026
4060
|
"aria-label": t("close"),
|
|
4027
4061
|
"data-i18n-aria-label": "close"
|
|
4028
4062
|
},
|
|
4029
|
-
WC_CLOSE,
|
|
4063
|
+
html_markup(WC_CLOSE),
|
|
4030
4064
|
{ click: (evt) => {
|
|
4031
4065
|
evt.stopPropagation();
|
|
4032
4066
|
gobj_send_event(gobj, "EV_CLOSE_WINDOW", {}, gobj);
|
|
@@ -4101,7 +4135,7 @@ function build_ui$18(gobj) {
|
|
|
4101
4135
|
[[
|
|
4102
4136
|
"span",
|
|
4103
4137
|
{ style: "display:inline-block;height:1.4em; width:1.4em;" },
|
|
4104
|
-
"<svg viewBox=\"0 0 500 500\"><path d=\"m427.87 493.69a33.778 33.78 0 0 1-23.882-57.661l33.778-33.78a33.799 33.8 0 0 1 47.83 47.763l-33.778 33.78a33.778 33.78 0 0 1-23.882 9.8976zm-190.44 0a33.778 33.78 0 0 1-23.882-57.661l224.22-224.23a33.799 33.8 0 0 1 47.83 47.763l-224.22 224.23a33.778 33.78 0 0 1-23.882 9.8976zm-197.26 0a33.778 33.78 0 0 1-23.882-57.661l421.46-421.47a33.786 33.786 0 1 1 47.797 47.763l-421.49 421.47a33.778 33.78 0 0 1-23.882 9.8976z\" fill=\"var(--bulma-text)\" stroke-width=\"33.78\"/></svg>"
|
|
4138
|
+
html_markup("<svg viewBox=\"0 0 500 500\"><path d=\"m427.87 493.69a33.778 33.78 0 0 1-23.882-57.661l33.778-33.78a33.799 33.8 0 0 1 47.83 47.763l-33.778 33.78a33.778 33.78 0 0 1-23.882 9.8976zm-190.44 0a33.778 33.78 0 0 1-23.882-57.661l224.22-224.23a33.799 33.8 0 0 1 47.83 47.763l-224.22 224.23a33.778 33.78 0 0 1-23.882 9.8976zm-197.26 0a33.778 33.78 0 0 1-23.882-57.661l421.46-421.47a33.786 33.786 0 1 1 47.797 47.763l-421.49 421.47a33.778 33.78 0 0 1-23.882 9.8976z\" fill=\"var(--bulma-text)\" stroke-width=\"33.78\"/></svg>")
|
|
4105
4139
|
]],
|
|
4106
4140
|
{ pointerdown: (evt) => {
|
|
4107
4141
|
rsStart(gobj, evt);
|
|
@@ -4131,7 +4165,7 @@ function build_ui$18(gobj) {
|
|
|
4131
4165
|
[[
|
|
4132
4166
|
"span",
|
|
4133
4167
|
{ style: "display:inline-block;height:1.4em; width:1.4em;" },
|
|
4134
|
-
"<svg viewBox=\"0 0 500 500\"><path d=\"m427.87 493.69a33.778 33.78 0 0 1-23.882-57.661l33.778-33.78a33.799 33.8 0 0 1 47.83 47.763l-33.778 33.78a33.778 33.78 0 0 1-23.882 9.8976zm-190.44 0a33.778 33.78 0 0 1-23.882-57.661l224.22-224.23a33.799 33.8 0 0 1 47.83 47.763l-224.22 224.23a33.778 33.78 0 0 1-23.882 9.8976zm-197.26 0a33.778 33.78 0 0 1-23.882-57.661l421.46-421.47a33.786 33.786 0 1 1 47.797 47.763l-421.49 421.47a33.778 33.78 0 0 1-23.882 9.8976z\" fill=\"var(--bulma-text)\" stroke-width=\"33.78\"/></svg>"
|
|
4168
|
+
html_markup("<svg viewBox=\"0 0 500 500\"><path d=\"m427.87 493.69a33.778 33.78 0 0 1-23.882-57.661l33.778-33.78a33.799 33.8 0 0 1 47.83 47.763l-33.778 33.78a33.778 33.78 0 0 1-23.882 9.8976zm-190.44 0a33.778 33.78 0 0 1-23.882-57.661l224.22-224.23a33.799 33.8 0 0 1 47.83 47.763l-224.22 224.23a33.778 33.78 0 0 1-23.882 9.8976zm-197.26 0a33.778 33.78 0 0 1-23.882-57.661l421.46-421.47a33.786 33.786 0 1 1 47.797 47.763l-421.49 421.47a33.778 33.78 0 0 1-23.882 9.8976z\" fill=\"var(--bulma-text)\" stroke-width=\"33.78\"/></svg>")
|
|
4135
4169
|
]],
|
|
4136
4170
|
{ pointerdown: (evt) => {
|
|
4137
4171
|
rsStart(gobj, evt);
|
|
@@ -4488,7 +4522,7 @@ function ac_refresh$11(gobj, event, kw, src) {
|
|
|
4488
4522
|
function ac_show$15(gobj, event, kw, src) {
|
|
4489
4523
|
let manager = gobj_read_pointer_attr(gobj, "manager");
|
|
4490
4524
|
if (manager) {
|
|
4491
|
-
gobj_send_event(manager, "EV_FOCUS_WINDOW", { window: gobj }, gobj);
|
|
4525
|
+
gobj_send_event(manager, "EV_FOCUS_WINDOW", { window: gobj_full_name(gobj) }, gobj);
|
|
4492
4526
|
return 0;
|
|
4493
4527
|
}
|
|
4494
4528
|
let $container = gobj_read_attr(gobj, "$container");
|
|
@@ -4837,6 +4871,29 @@ function chip_lead(icon) {
|
|
|
4837
4871
|
/************************************************************
|
|
4838
4872
|
* Find a registry entry by its window gobj.
|
|
4839
4873
|
************************************************************/
|
|
4874
|
+
/************************************************************
|
|
4875
|
+
* The window an event is about. A kw is plain json (the machine
|
|
4876
|
+
* trace dumps it), so the window travels in it as its FULL NAME,
|
|
4877
|
+
* which the trace can print, and the gobj is the event's src --
|
|
4878
|
+
* every sender is the window itself. Up to 7.26.9 the kw carried
|
|
4879
|
+
* the gobj; that is still taken, with a warning, for this release.
|
|
4880
|
+
************************************************************/
|
|
4881
|
+
var warned_gobj_in_kw = false;
|
|
4882
|
+
function window_of(gobj, event, kw, src) {
|
|
4883
|
+
let w = kw && kw.window;
|
|
4884
|
+
if (is_gobj(w)) {
|
|
4885
|
+
if (!warned_gobj_in_kw) {
|
|
4886
|
+
warned_gobj_in_kw = true;
|
|
4887
|
+
log_warning(`${gobj_short_name(gobj)}: ${event} carries the window gobj in its kw: send {window: gobj_full_name(window)} from the window`);
|
|
4888
|
+
}
|
|
4889
|
+
return w;
|
|
4890
|
+
}
|
|
4891
|
+
if (!is_gobj(src) || gobj_full_name(src) !== w) {
|
|
4892
|
+
log_error(`${gobj_short_name(gobj)}: ${event}: window '${w}' is not the src of the event (${is_gobj(src) ? gobj_full_name(src) : String(src)})`);
|
|
4893
|
+
return null;
|
|
4894
|
+
}
|
|
4895
|
+
return src;
|
|
4896
|
+
}
|
|
4840
4897
|
function find_entry(priv, win) {
|
|
4841
4898
|
for (let e of priv.windows) if (e.gobj === win) return e;
|
|
4842
4899
|
return null;
|
|
@@ -4909,8 +4966,9 @@ function on_chip_click(gobj, entry) {
|
|
|
4909
4966
|
************************************************************/
|
|
4910
4967
|
function ac_register_window(gobj, event, kw, src) {
|
|
4911
4968
|
let priv = gobj.priv;
|
|
4912
|
-
let win = kw
|
|
4913
|
-
if (!win
|
|
4969
|
+
let win = window_of(gobj, event, kw, src);
|
|
4970
|
+
if (!win) return -1;
|
|
4971
|
+
if (find_entry(priv, win)) return 0;
|
|
4914
4972
|
apply_placement(gobj);
|
|
4915
4973
|
let title = kw.title || gobj_name(win) || "window";
|
|
4916
4974
|
let title_key = kw.title_key || "";
|
|
@@ -4965,7 +5023,7 @@ function ac_register_window(gobj, event, kw, src) {
|
|
|
4965
5023
|
"aria-label": t("close"),
|
|
4966
5024
|
"data-i18n-aria-label": "close"
|
|
4967
5025
|
},
|
|
4968
|
-
WC_X,
|
|
5026
|
+
html_markup(WC_X),
|
|
4969
5027
|
{ click: (evt) => {
|
|
4970
5028
|
evt.stopPropagation();
|
|
4971
5029
|
gobj_send_event(entry.gobj, "EV_CLOSE_WINDOW", {}, gobj);
|
|
@@ -5000,7 +5058,9 @@ function ac_register_window(gobj, event, kw, src) {
|
|
|
5000
5058
|
************************************************************/
|
|
5001
5059
|
function ac_unregister_window(gobj, event, kw, src) {
|
|
5002
5060
|
let priv = gobj.priv;
|
|
5003
|
-
let
|
|
5061
|
+
let win = window_of(gobj, event, kw, src);
|
|
5062
|
+
if (!win) return -1;
|
|
5063
|
+
let entry = find_entry(priv, win);
|
|
5004
5064
|
if (!entry) return 0;
|
|
5005
5065
|
if (entry.$chip && entry.$chip.parentNode) entry.$chip.parentNode.removeChild(entry.$chip);
|
|
5006
5066
|
priv.windows = priv.windows.filter((e) => e !== entry);
|
|
@@ -5011,7 +5071,9 @@ function ac_unregister_window(gobj, event, kw, src) {
|
|
|
5011
5071
|
* EV_MINIMIZE_WINDOW { window }
|
|
5012
5072
|
************************************************************/
|
|
5013
5073
|
function ac_minimize_window(gobj, event, kw, src) {
|
|
5014
|
-
let
|
|
5074
|
+
let win = window_of(gobj, event, kw, src);
|
|
5075
|
+
if (!win) return -1;
|
|
5076
|
+
let entry = find_entry(gobj.priv, win);
|
|
5015
5077
|
if (entry) minimize_entry(gobj, entry);
|
|
5016
5078
|
return 0;
|
|
5017
5079
|
}
|
|
@@ -5019,7 +5081,9 @@ function ac_minimize_window(gobj, event, kw, src) {
|
|
|
5019
5081
|
* EV_FOCUS_WINDOW { window }
|
|
5020
5082
|
************************************************************/
|
|
5021
5083
|
function ac_focus_window(gobj, event, kw, src) {
|
|
5022
|
-
let
|
|
5084
|
+
let win = window_of(gobj, event, kw, src);
|
|
5085
|
+
if (!win) return -1;
|
|
5086
|
+
let entry = find_entry(gobj.priv, win);
|
|
5023
5087
|
if (entry) focus_entry(gobj, entry);
|
|
5024
5088
|
return 0;
|
|
5025
5089
|
}
|
|
@@ -6604,12 +6668,12 @@ function yui_asset_element(answer, opts = {}) {
|
|
|
6604
6668
|
const children = [[
|
|
6605
6669
|
"span",
|
|
6606
6670
|
{ class: "ASSET_OTHER_TYPE" },
|
|
6607
|
-
|
|
6671
|
+
text_node(answer.content_type || "?")
|
|
6608
6672
|
]];
|
|
6609
6673
|
if (opts.detail) children.push([
|
|
6610
6674
|
"span",
|
|
6611
6675
|
{ class: "ASSET_OTHER_DETAIL" },
|
|
6612
|
-
|
|
6676
|
+
text_node(opts.detail)
|
|
6613
6677
|
]);
|
|
6614
6678
|
const $card = createElement2([
|
|
6615
6679
|
"div",
|
|
@@ -8406,7 +8470,7 @@ function toolbar_button$1(gobj, name) {
|
|
|
8406
8470
|
[[
|
|
8407
8471
|
"span",
|
|
8408
8472
|
{ class: "icon m-0" },
|
|
8409
|
-
"<i class=\"yi-floppy-disk\"></i>"
|
|
8473
|
+
html_markup("<i class=\"yi-floppy-disk\"></i>")
|
|
8410
8474
|
], [
|
|
8411
8475
|
"span",
|
|
8412
8476
|
{
|
|
@@ -8433,7 +8497,7 @@ function toolbar_button$1(gobj, name) {
|
|
|
8433
8497
|
[[
|
|
8434
8498
|
"span",
|
|
8435
8499
|
{ class: "icon m-0" },
|
|
8436
|
-
"<i class=\"yi-arrow-rotate-left\"></i>"
|
|
8500
|
+
html_markup("<i class=\"yi-arrow-rotate-left\"></i>")
|
|
8437
8501
|
], [
|
|
8438
8502
|
"span",
|
|
8439
8503
|
{
|
|
@@ -8459,7 +8523,7 @@ function toolbar_button$1(gobj, name) {
|
|
|
8459
8523
|
[[
|
|
8460
8524
|
"span",
|
|
8461
8525
|
{ class: "icon m-0" },
|
|
8462
|
-
"<i class=\"yi-broom-wide\"></i>"
|
|
8526
|
+
html_markup("<i class=\"yi-broom-wide\"></i>")
|
|
8463
8527
|
], [
|
|
8464
8528
|
"span",
|
|
8465
8529
|
{
|
|
@@ -8485,7 +8549,7 @@ function toolbar_button$1(gobj, name) {
|
|
|
8485
8549
|
[[
|
|
8486
8550
|
"span",
|
|
8487
8551
|
{ class: "icon m-0" },
|
|
8488
|
-
"<i class=\"yi-copy\"></i>"
|
|
8552
|
+
html_markup("<i class=\"yi-copy\"></i>")
|
|
8489
8553
|
], [
|
|
8490
8554
|
"span",
|
|
8491
8555
|
{
|
|
@@ -8511,7 +8575,7 @@ function toolbar_button$1(gobj, name) {
|
|
|
8511
8575
|
[[
|
|
8512
8576
|
"span",
|
|
8513
8577
|
{ class: "icon m-0" },
|
|
8514
|
-
"<i class=\"yi-paste\"></i>"
|
|
8578
|
+
html_markup("<i class=\"yi-paste\"></i>")
|
|
8515
8579
|
], [
|
|
8516
8580
|
"span",
|
|
8517
8581
|
{
|
|
@@ -8602,6 +8666,7 @@ function destroy_ui$10(gobj) {
|
|
|
8602
8666
|
let $container = gobj_read_attr(gobj, "$container");
|
|
8603
8667
|
if ($container) {
|
|
8604
8668
|
destroy_widgets(gobj, $container);
|
|
8669
|
+
if (gobj.priv && gobj.priv.tables) gobj.priv.tables.clear();
|
|
8605
8670
|
if ($container.parentNode) $container.parentNode.removeChild($container);
|
|
8606
8671
|
gobj_write_attr(gobj, "$container", null);
|
|
8607
8672
|
}
|
|
@@ -8640,6 +8705,7 @@ function cell_icon(icon_class, key) {
|
|
|
8640
8705
|
function table_identity(gobj, $table) {
|
|
8641
8706
|
if (!$table.yui_table_id) {
|
|
8642
8707
|
let priv = gobj.priv;
|
|
8708
|
+
for (let [id, ref] of priv.tables) if (!ref.deref()) priv.tables.delete(id);
|
|
8643
8709
|
priv.table_seq += 1;
|
|
8644
8710
|
$table.yui_table_id = `t${priv.table_seq}`;
|
|
8645
8711
|
priv.tables.set($table.yui_table_id, new WeakRef($table));
|
|
@@ -8678,11 +8744,15 @@ function destroy_widgets(gobj, $container) {
|
|
|
8678
8744
|
log_warning(`${gobj_short_name(gobj)}: cannot destroy ${what}: ${e}`);
|
|
8679
8745
|
}
|
|
8680
8746
|
};
|
|
8747
|
+
let forget = ($el) => {
|
|
8748
|
+
if ($el.yui_table_id && gobj.priv && gobj.priv.tables) gobj.priv.tables.delete($el.yui_table_id);
|
|
8749
|
+
};
|
|
8681
8750
|
$container.querySelectorAll(".yui-tabulator-table-nested").forEach(($el) => {
|
|
8682
8751
|
if ($el.tabulator) {
|
|
8683
8752
|
destroy("nested table", $el.tabulator);
|
|
8684
8753
|
$el.tabulator = null;
|
|
8685
8754
|
}
|
|
8755
|
+
forget($el);
|
|
8686
8756
|
});
|
|
8687
8757
|
$container.querySelectorAll(".yui-form-data-input").forEach(($el) => {
|
|
8688
8758
|
if ($el.tom_select) {
|
|
@@ -8697,6 +8767,7 @@ function destroy_widgets(gobj, $container) {
|
|
|
8697
8767
|
destroy("table", $el.tabulator);
|
|
8698
8768
|
$el.tabulator = null;
|
|
8699
8769
|
}
|
|
8770
|
+
forget($el);
|
|
8700
8771
|
});
|
|
8701
8772
|
}
|
|
8702
8773
|
/******************************************************************
|
|
@@ -8735,6 +8806,16 @@ function name_form_control($field, conf) {
|
|
|
8735
8806
|
if ($clear) {
|
|
8736
8807
|
const CLEAR_KEY = "remove all selected options";
|
|
8737
8808
|
$clear.setAttribute("role", "button");
|
|
8809
|
+
$clear.setAttribute("tabindex", "0");
|
|
8810
|
+
if (!$clear.yui_keys_wired) {
|
|
8811
|
+
$clear.yui_keys_wired = true;
|
|
8812
|
+
$clear.addEventListener("keydown", function(evt) {
|
|
8813
|
+
if (evt.key === "Enter" || evt.key === " ") {
|
|
8814
|
+
evt.preventDefault();
|
|
8815
|
+
$clear.click();
|
|
8816
|
+
}
|
|
8817
|
+
});
|
|
8818
|
+
}
|
|
8738
8819
|
$clear.setAttribute("title", t(CLEAR_KEY));
|
|
8739
8820
|
$clear.setAttribute("data-i18n-title", CLEAR_KEY);
|
|
8740
8821
|
$clear.setAttribute("aria-label", t(CLEAR_KEY));
|
|
@@ -9266,7 +9347,7 @@ function create_form_field(gobj, $form, prefix, field_desc, { tag, inputType, na
|
|
|
9266
9347
|
[[
|
|
9267
9348
|
"span",
|
|
9268
9349
|
{ class: "icon m-0" },
|
|
9269
|
-
"<i class=\"yi-plus\"></i>"
|
|
9350
|
+
html_markup("<i class=\"yi-plus\"></i>")
|
|
9270
9351
|
], [
|
|
9271
9352
|
"span",
|
|
9272
9353
|
{
|
|
@@ -9820,7 +9901,7 @@ function create_coordinates(gobj, attrs) {
|
|
|
9820
9901
|
], [
|
|
9821
9902
|
"span",
|
|
9822
9903
|
{ class: "icon is-left is-clickable" },
|
|
9823
|
-
"<i class=\"yi-location-crosshairs\"></i>",
|
|
9904
|
+
html_markup("<i class=\"yi-location-crosshairs\"></i>"),
|
|
9824
9905
|
{ "click": function(evt) {
|
|
9825
9906
|
evt.stopPropagation();
|
|
9826
9907
|
getLocation(gobj, this.closest(".control").querySelector("input"));
|
|
@@ -9919,6 +10000,7 @@ function template2columns(gobj, columns, template, sub_elements) {
|
|
|
9919
10000
|
let column = {
|
|
9920
10001
|
field: field_desc.name,
|
|
9921
10002
|
title: t(field_desc.header || field_desc.name),
|
|
10003
|
+
titleFormatter: text_title_formatter,
|
|
9922
10004
|
editable: get_editable_state,
|
|
9923
10005
|
editor: false,
|
|
9924
10006
|
headerWordWrap: true,
|
|
@@ -10760,8 +10842,8 @@ function ac_add_table_row(gobj, event, kw, src) {
|
|
|
10760
10842
|
});
|
|
10761
10843
|
setTimeout(function() {
|
|
10762
10844
|
if (gobj_is_destroying(gobj)) return;
|
|
10763
|
-
let $
|
|
10764
|
-
if ($
|
|
10845
|
+
let $target = loading ? $table : $table.closest(".yui-tabulator-table");
|
|
10846
|
+
if ($target && $target.tabulator) $target.tabulator.redraw();
|
|
10765
10847
|
}, 30);
|
|
10766
10848
|
return 0;
|
|
10767
10849
|
}
|
|
@@ -19650,7 +19732,7 @@ function event_flag_chips(flags) {
|
|
|
19650
19732
|
return [
|
|
19651
19733
|
"span",
|
|
19652
19734
|
{ class: cls },
|
|
19653
|
-
flag.replace("EVF_", "")
|
|
19735
|
+
text_node(flag.replace("EVF_", ""))
|
|
19654
19736
|
];
|
|
19655
19737
|
});
|
|
19656
19738
|
}
|
|
@@ -21822,14 +21904,18 @@ function restore_view_anchored(gobj, anchor) {
|
|
|
21822
21904
|
if (!new_node_id) return;
|
|
21823
21905
|
if (typeof anchor.zoom === "number" && anchor.zoom > 0) try {
|
|
21824
21906
|
graph.zoomTo(anchor.zoom);
|
|
21825
|
-
} catch (e) {
|
|
21907
|
+
} catch (e) {
|
|
21908
|
+
log_warning(`${gobj_short_name(gobj)}: zoom not restored: ${e}`);
|
|
21909
|
+
}
|
|
21826
21910
|
try {
|
|
21827
21911
|
let canvas_pos = graph.getElementPosition(new_node_id);
|
|
21828
21912
|
let vp = graph.getViewportByCanvas([canvas_pos[0], canvas_pos[1]]);
|
|
21829
21913
|
let dx = anchor.viewport_x - vp[0];
|
|
21830
21914
|
let dy = anchor.viewport_y - vp[1];
|
|
21831
21915
|
graph.translateBy([dx, dy]);
|
|
21832
|
-
} catch (e) {
|
|
21916
|
+
} catch (e) {
|
|
21917
|
+
log_warning(`${gobj_short_name(gobj)}: anchor node not put back at its screen spot: ${e}`);
|
|
21918
|
+
}
|
|
21833
21919
|
}
|
|
21834
21920
|
/************************************************************
|
|
21835
21921
|
* Capture the current screen position + zoom of a node,
|
|
@@ -23574,7 +23660,7 @@ function render_submenu(gobj, items) {
|
|
|
23574
23660
|
class: "menu-label",
|
|
23575
23661
|
i18n: nav_label
|
|
23576
23662
|
} : { class: "menu-label" },
|
|
23577
|
-
nav_label || "—"
|
|
23663
|
+
text_node(nav_label || "—")
|
|
23578
23664
|
], [
|
|
23579
23665
|
"ul",
|
|
23580
23666
|
{ class: "menu-list" },
|
|
@@ -23611,7 +23697,7 @@ function render_accordion(gobj, items) {
|
|
|
23611
23697
|
let $hdr = createElement2([
|
|
23612
23698
|
"button",
|
|
23613
23699
|
head_attrs,
|
|
23614
|
-
head_text
|
|
23700
|
+
text_node(head_text)
|
|
23615
23701
|
]);
|
|
23616
23702
|
$container.appendChild($hdr);
|
|
23617
23703
|
let $ul = createElement2(["ul", {
|
|
@@ -25433,7 +25519,7 @@ function topic_card_meta(desc) {
|
|
|
25433
25519
|
title: t("version"),
|
|
25434
25520
|
"data-i18n-title": "version"
|
|
25435
25521
|
},
|
|
25436
|
-
`v${desc.topic_version}`
|
|
25522
|
+
text_node(`v${desc.topic_version}`)
|
|
25437
25523
|
]);
|
|
25438
25524
|
head.push([
|
|
25439
25525
|
"span",
|
|
@@ -25441,7 +25527,7 @@ function topic_card_meta(desc) {
|
|
|
25441
25527
|
[[
|
|
25442
25528
|
"span",
|
|
25443
25529
|
{},
|
|
25444
|
-
|
|
25530
|
+
text_node(n_cols)
|
|
25445
25531
|
], [
|
|
25446
25532
|
"span",
|
|
25447
25533
|
{ i18n: "columns" },
|
|
@@ -25472,7 +25558,7 @@ function topic_card_meta(desc) {
|
|
|
25472
25558
|
], [
|
|
25473
25559
|
"span",
|
|
25474
25560
|
{ class: "TREEDB_TOPIC_CARD_REL_LIST" },
|
|
25475
|
-
list
|
|
25561
|
+
text_node(list)
|
|
25476
25562
|
]]
|
|
25477
25563
|
]);
|
|
25478
25564
|
}
|
|
@@ -25504,7 +25590,7 @@ function topic_card_meta(desc) {
|
|
|
25504
25590
|
[
|
|
25505
25591
|
"span",
|
|
25506
25592
|
{ class: "TREEDB_TOPIC_CARD_REL_LIST" },
|
|
25507
|
-
list
|
|
25593
|
+
text_node(list)
|
|
25508
25594
|
]
|
|
25509
25595
|
]
|
|
25510
25596
|
];
|
|
@@ -25782,7 +25868,7 @@ function build_topic_info_panel(gobj, $info, topic, desc) {
|
|
|
25782
25868
|
if (desc.topic_version !== void 0 && desc.topic_version !== null && desc.topic_version !== "") push_meta("version", [
|
|
25783
25869
|
"span",
|
|
25784
25870
|
{ class: "tag is-info" },
|
|
25785
|
-
|
|
25871
|
+
text_node(desc.topic_version)
|
|
25786
25872
|
]);
|
|
25787
25873
|
let sf_names = system_flag_names(desc.system_flag);
|
|
25788
25874
|
if (sf_names.length > 0) push_meta("system", [
|
|
@@ -25837,18 +25923,18 @@ function build_topic_info_panel(gobj, $info, topic, desc) {
|
|
|
25837
25923
|
[[
|
|
25838
25924
|
"code",
|
|
25839
25925
|
is_key ? { class: "has-text-weight-bold" } : {},
|
|
25840
|
-
|
|
25926
|
+
text_node(col.id)
|
|
25841
25927
|
]]
|
|
25842
25928
|
],
|
|
25843
25929
|
[
|
|
25844
25930
|
"td",
|
|
25845
25931
|
{},
|
|
25846
|
-
|
|
25932
|
+
text_node(type)
|
|
25847
25933
|
],
|
|
25848
25934
|
[
|
|
25849
25935
|
"td",
|
|
25850
25936
|
is_key ? { class: "has-text-weight-semibold" } : {},
|
|
25851
|
-
|
|
25937
|
+
text_node(rel)
|
|
25852
25938
|
]
|
|
25853
25939
|
]
|
|
25854
25940
|
]);
|
|
@@ -25870,7 +25956,7 @@ function build_topic_info_panel(gobj, $info, topic, desc) {
|
|
|
25870
25956
|
], [
|
|
25871
25957
|
"span",
|
|
25872
25958
|
{ i18n: `${topic}` },
|
|
25873
|
-
|
|
25959
|
+
text_node(topic)
|
|
25874
25960
|
]]
|
|
25875
25961
|
]]
|
|
25876
25962
|
],
|
|
@@ -29030,7 +29116,7 @@ function col_title_formatter(gobj, col) {
|
|
|
29030
29116
|
return createElement2([
|
|
29031
29117
|
"span",
|
|
29032
29118
|
attrs,
|
|
29033
|
-
text
|
|
29119
|
+
text_node(text)
|
|
29034
29120
|
]);
|
|
29035
29121
|
};
|
|
29036
29122
|
}
|
|
@@ -29529,7 +29615,7 @@ function file_cell_formatter(cell, formatterParams, onRendered) {
|
|
|
29529
29615
|
const children = [["span", { class: "FILE_CELL_ICON icon yi-eye" }], [
|
|
29530
29616
|
"span",
|
|
29531
29617
|
{ class: "FILE_CELL_ID" },
|
|
29532
|
-
yui_file_id_label(ids[0])
|
|
29618
|
+
text_node(yui_file_id_label(ids[0]))
|
|
29533
29619
|
]];
|
|
29534
29620
|
if (ids.length > 1) children.push([
|
|
29535
29621
|
"span",
|
|
@@ -31463,7 +31549,7 @@ function build_delete_question(gobj, records) {
|
|
|
31463
31549
|
], [
|
|
31464
31550
|
"strong",
|
|
31465
31551
|
{},
|
|
31466
|
-
|
|
31552
|
+
text_node(one[pkey])
|
|
31467
31553
|
]]
|
|
31468
31554
|
]);
|
|
31469
31555
|
else lines.push([
|
|
@@ -31708,7 +31794,7 @@ function ac_open_columns(gobj, event, kw, src) {
|
|
|
31708
31794
|
[$cb, [
|
|
31709
31795
|
"span",
|
|
31710
31796
|
{ class: "ml-2" },
|
|
31711
|
-
column.getDefinition().title || field
|
|
31797
|
+
text_node(column.getDefinition().title || field)
|
|
31712
31798
|
]]
|
|
31713
31799
|
]));
|
|
31714
31800
|
}
|
|
@@ -60399,6 +60485,34 @@ function ensure_brush_select_owned() {
|
|
|
60399
60485
|
__brush_select_registered__ = true;
|
|
60400
60486
|
}
|
|
60401
60487
|
//#endregion
|
|
60488
|
+
//#region src/yui_data_color.js
|
|
60489
|
+
/***********************************************************************
|
|
60490
|
+
* yui_data_color.js
|
|
60491
|
+
*
|
|
60492
|
+
* A colour read from DATA, checked before it goes into markup.
|
|
60493
|
+
*
|
|
60494
|
+
* A card of the treedb graph is html, and the colour a user gave it
|
|
60495
|
+
* (a `__graphs__` record) is written into its `style="..."`. A value
|
|
60496
|
+
* like `red" onmouseover="...` would leave the attribute and run.
|
|
60497
|
+
* Only the plain colour syntaxes pass -- hex, the rgb()/hsl()
|
|
60498
|
+
* functions, a name -- and the browser, where it can, also checks
|
|
60499
|
+
* that it is a colour.
|
|
60500
|
+
*
|
|
60501
|
+
* Copyright (c) 2026, ArtGins.
|
|
60502
|
+
* All Rights Reserved.
|
|
60503
|
+
***********************************************************************/
|
|
60504
|
+
var DATA_COLOR_RE = /^(#[0-9a-f]{3,8}|(rgb|rgba|hsl|hsla)\([0-9.,%\s/+-]+\)|[a-z]+)$/i;
|
|
60505
|
+
/************************************************************
|
|
60506
|
+
* `value` when it is a css colour, else null.
|
|
60507
|
+
************************************************************/
|
|
60508
|
+
function css_color_or_null(value) {
|
|
60509
|
+
if (typeof value !== "string" || !DATA_COLOR_RE.test(value)) return null;
|
|
60510
|
+
if (typeof CSS !== "undefined" && CSS && typeof CSS.supports === "function") {
|
|
60511
|
+
if (!CSS.supports("color", value)) return null;
|
|
60512
|
+
}
|
|
60513
|
+
return value;
|
|
60514
|
+
}
|
|
60515
|
+
//#endregion
|
|
60402
60516
|
//#region src/c_g6_nodes_tree.js
|
|
60403
60517
|
/***********************************************************************
|
|
60404
60518
|
* c_g6_nodes_tree.js
|
|
@@ -61694,6 +61808,17 @@ function topic_defaults_of(gobj, topic_name) {
|
|
|
61694
61808
|
return is_object(topic_props) && is_object(topic_props.defaults) ? topic_props.defaults : null;
|
|
61695
61809
|
}
|
|
61696
61810
|
/************************************************************
|
|
61811
|
+
* A colour read from DATA (a `__graphs__` record), or null.
|
|
61812
|
+
* It is written into a card's html (see yui_data_color.js): a
|
|
61813
|
+
* refused value logs, and the node wears the topic's colour.
|
|
61814
|
+
************************************************************/
|
|
61815
|
+
function data_color(gobj, value) {
|
|
61816
|
+
if (value === void 0 || value === null || value === "") return null;
|
|
61817
|
+
let color = css_color_or_null(value);
|
|
61818
|
+
if (!color) log_warning(`${gobj_short_name(gobj)}: colour refused, not a css colour: ${JSON.stringify(value)}`);
|
|
61819
|
+
return color;
|
|
61820
|
+
}
|
|
61821
|
+
/************************************************************
|
|
61697
61822
|
* What a node is PAINTED with: its own colours, then the
|
|
61698
61823
|
* topic's default, then the topic's colour.
|
|
61699
61824
|
*
|
|
@@ -61709,10 +61834,10 @@ function topic_defaults_of(gobj, topic_name) {
|
|
|
61709
61834
|
function node_paint_of(gobj, desc, geometry) {
|
|
61710
61835
|
let defaults = topic_defaults_of(gobj, desc.topic_name);
|
|
61711
61836
|
let g = is_object(geometry) ? geometry : {};
|
|
61712
|
-
let fill = g.fill || defaults && defaults.fill || desc.color;
|
|
61837
|
+
let fill = data_color(gobj, g.fill) || data_color(gobj, defaults && defaults.fill) || desc.color;
|
|
61713
61838
|
return {
|
|
61714
61839
|
fill,
|
|
61715
|
-
stroke: g.stroke || defaults && defaults.stroke || getStrokeColor(fill),
|
|
61840
|
+
stroke: data_color(gobj, g.stroke) || data_color(gobj, defaults && defaults.stroke) || getStrokeColor(fill),
|
|
61716
61841
|
lineWidth: g.lineWidth || defaults && defaults.lineWidth || 1
|
|
61717
61842
|
};
|
|
61718
61843
|
}
|
|
@@ -63671,7 +63796,9 @@ function select_node(gobj, node_id) {
|
|
|
63671
63796
|
history_pause(gobj);
|
|
63672
63797
|
try {
|
|
63673
63798
|
graph.setElementState(node_id, ["selected"]);
|
|
63674
|
-
} catch (e) {
|
|
63799
|
+
} catch (e) {
|
|
63800
|
+
log_warning(`${gobj_short_name(gobj)}: node state not set: ${e}`);
|
|
63801
|
+
}
|
|
63675
63802
|
priv._selected_node_id = node_id;
|
|
63676
63803
|
paint_selection(gobj, [node_id]);
|
|
63677
63804
|
show_resize_handles(gobj);
|
|
@@ -63697,7 +63824,9 @@ function deselect_node(gobj) {
|
|
|
63697
63824
|
let states = {};
|
|
63698
63825
|
for (let id of clearing) states[id] = [];
|
|
63699
63826
|
graph.setElementState(states);
|
|
63700
|
-
} catch (e) {
|
|
63827
|
+
} catch (e) {
|
|
63828
|
+
log_warning(`${gobj_short_name(gobj)}: node states not cleared: ${e}`);
|
|
63829
|
+
}
|
|
63701
63830
|
priv._selected_node_id = null;
|
|
63702
63831
|
paint_selection(gobj, []);
|
|
63703
63832
|
graph_draw(gobj).then(() => {
|
|
@@ -64770,7 +64899,9 @@ function select_edge(gobj, edge_id) {
|
|
|
64770
64899
|
history_pause(gobj);
|
|
64771
64900
|
try {
|
|
64772
64901
|
graph.setElementState(edge_id, ["selected"]);
|
|
64773
|
-
} catch (e) {
|
|
64902
|
+
} catch (e) {
|
|
64903
|
+
log_warning(`${gobj_short_name(gobj)}: edge state not set: ${e}`);
|
|
64904
|
+
}
|
|
64774
64905
|
show_edge_icon(gobj);
|
|
64775
64906
|
graph_draw(gobj).then(() => {
|
|
64776
64907
|
history_resume(gobj);
|
|
@@ -64786,7 +64917,9 @@ function deselect_edge(gobj) {
|
|
|
64786
64917
|
history_pause(gobj);
|
|
64787
64918
|
try {
|
|
64788
64919
|
graph.setElementState(priv._selected_edge_id, []);
|
|
64789
|
-
} catch (e) {
|
|
64920
|
+
} catch (e) {
|
|
64921
|
+
log_warning(`${gobj_short_name(gobj)}: edge state not cleared: ${e}`);
|
|
64922
|
+
}
|
|
64790
64923
|
priv._selected_edge_id = null;
|
|
64791
64924
|
graph_draw(gobj).then(() => {
|
|
64792
64925
|
history_resume(gobj);
|
|
@@ -64876,7 +65009,9 @@ function show_edge_popover(gobj) {
|
|
|
64876
65009
|
history_pause(gobj);
|
|
64877
65010
|
try {
|
|
64878
65011
|
graph.setElementState(edge_id, []);
|
|
64879
|
-
} catch (e) {
|
|
65012
|
+
} catch (e) {
|
|
65013
|
+
log_warning(`${gobj_short_name(gobj)}: edge state not cleared for the style preview: ${e}`);
|
|
65014
|
+
}
|
|
64880
65015
|
graph_draw(gobj).then(() => {
|
|
64881
65016
|
history_resume(gobj);
|
|
64882
65017
|
});
|
|
@@ -74533,7 +74668,7 @@ function show_notice(gobj, key, detail, detail_is_key) {
|
|
|
74533
74668
|
$notice.appendChild(createElement2([
|
|
74534
74669
|
"span",
|
|
74535
74670
|
attrs,
|
|
74536
|
-
detail_is_key ? t(`${detail}`) : `${detail}`
|
|
74671
|
+
text_node(detail_is_key ? t(`${detail}`) : `${detail}`)
|
|
74537
74672
|
]));
|
|
74538
74673
|
}
|
|
74539
74674
|
}
|
|
@@ -74768,7 +74903,7 @@ function open_card(gobj, logical, title, icon, tags, event, kw) {
|
|
|
74768
74903
|
], [
|
|
74769
74904
|
"span",
|
|
74770
74905
|
{ class: "ml-1" },
|
|
74771
|
-
|
|
74906
|
+
text_node(tag.text)
|
|
74772
74907
|
]] : `${tag.text}`
|
|
74773
74908
|
];
|
|
74774
74909
|
});
|
|
@@ -74795,7 +74930,7 @@ function open_card(gobj, logical, title, icon, tags, event, kw) {
|
|
|
74795
74930
|
], [
|
|
74796
74931
|
"span",
|
|
74797
74932
|
{ class: `${logical}_NAME has-text-weight-semibold` },
|
|
74798
|
-
|
|
74933
|
+
text_node(title)
|
|
74799
74934
|
]]
|
|
74800
74935
|
], [
|
|
74801
74936
|
"div",
|
|
@@ -74902,7 +75037,7 @@ function render_topics(gobj, $body) {
|
|
|
74902
75037
|
[
|
|
74903
75038
|
"span",
|
|
74904
75039
|
{ class: "has-text-weight-semibold" },
|
|
74905
|
-
|
|
75040
|
+
text_node(topic.name)
|
|
74906
75041
|
],
|
|
74907
75042
|
topic.system_topic ? [
|
|
74908
75043
|
"span",
|
|
@@ -74936,7 +75071,7 @@ function render_topics(gobj, $body) {
|
|
|
74936
75071
|
[[
|
|
74937
75072
|
"code",
|
|
74938
75073
|
{},
|
|
74939
|
-
|
|
75074
|
+
text_node(topic.id)
|
|
74940
75075
|
]]
|
|
74941
75076
|
] : [
|
|
74942
75077
|
"span",
|
|
@@ -74951,13 +75086,13 @@ function render_topics(gobj, $body) {
|
|
|
74951
75086
|
[[
|
|
74952
75087
|
"code",
|
|
74953
75088
|
{},
|
|
74954
|
-
|
|
75089
|
+
text_node(topic.pkey || "id")
|
|
74955
75090
|
]]
|
|
74956
75091
|
],
|
|
74957
75092
|
[
|
|
74958
75093
|
"td",
|
|
74959
75094
|
{ class: "SCHEMA_TOPIC_COLS has-text-right" },
|
|
74960
|
-
|
|
75095
|
+
text_node(topic.cols.length)
|
|
74961
75096
|
],
|
|
74962
75097
|
[
|
|
74963
75098
|
"td",
|
|
@@ -74965,7 +75100,7 @@ function render_topics(gobj, $body) {
|
|
|
74965
75100
|
[[
|
|
74966
75101
|
"span",
|
|
74967
75102
|
{ class: `tag ${pending ? "is-warning" : "is-info"} is-light` },
|
|
74968
|
-
|
|
75103
|
+
text_node(topic.topic_version === void 0 ? "?" : topic.topic_version)
|
|
74969
75104
|
]]
|
|
74970
75105
|
],
|
|
74971
75106
|
[
|
|
@@ -75241,7 +75376,7 @@ function column_row(gobj, topic, col, index, readonly, twice) {
|
|
|
75241
75376
|
return [
|
|
75242
75377
|
"span",
|
|
75243
75378
|
{ class: `SCHEMA_COL_FLAG tag ${yui_tint(flag_style(flag))}`.trimEnd() },
|
|
75244
|
-
|
|
75379
|
+
text_node(flag)
|
|
75245
75380
|
];
|
|
75246
75381
|
});
|
|
75247
75382
|
let link = "";
|
|
@@ -75277,7 +75412,7 @@ function column_row(gobj, topic, col, index, readonly, twice) {
|
|
|
75277
75412
|
[
|
|
75278
75413
|
"code",
|
|
75279
75414
|
{},
|
|
75280
|
-
|
|
75415
|
+
text_node(col.name)
|
|
75281
75416
|
],
|
|
75282
75417
|
ambiguous ? [
|
|
75283
75418
|
"span",
|
|
@@ -75285,7 +75420,7 @@ function column_row(gobj, topic, col, index, readonly, twice) {
|
|
|
75285
75420
|
[[
|
|
75286
75421
|
"code",
|
|
75287
75422
|
{},
|
|
75288
|
-
|
|
75423
|
+
text_node(col.id)
|
|
75289
75424
|
]]
|
|
75290
75425
|
] : [
|
|
75291
75426
|
"span",
|
|
@@ -75309,7 +75444,7 @@ function column_row(gobj, topic, col, index, readonly, twice) {
|
|
|
75309
75444
|
[
|
|
75310
75445
|
"td",
|
|
75311
75446
|
{ class: "SCHEMA_COL_HEADER" },
|
|
75312
|
-
|
|
75447
|
+
text_node(record.header || "")
|
|
75313
75448
|
],
|
|
75314
75449
|
[
|
|
75315
75450
|
"td",
|
|
@@ -75317,7 +75452,7 @@ function column_row(gobj, topic, col, index, readonly, twice) {
|
|
|
75317
75452
|
[[
|
|
75318
75453
|
"code",
|
|
75319
75454
|
{},
|
|
75320
|
-
|
|
75455
|
+
text_node(record.type || "")
|
|
75321
75456
|
]]
|
|
75322
75457
|
],
|
|
75323
75458
|
[
|
|
@@ -75335,7 +75470,7 @@ function column_row(gobj, topic, col, index, readonly, twice) {
|
|
|
75335
75470
|
[
|
|
75336
75471
|
"td",
|
|
75337
75472
|
{ class: "SCHEMA_COL_LINK" },
|
|
75338
|
-
|
|
75473
|
+
text_node(link)
|
|
75339
75474
|
],
|
|
75340
75475
|
[
|
|
75341
75476
|
"td",
|
|
@@ -75746,7 +75881,7 @@ function flags_field(gobj, type, current) {
|
|
|
75746
75881
|
})], [
|
|
75747
75882
|
"span",
|
|
75748
75883
|
{ class: "SCHEMA_FLAG_NAME ml-1" },
|
|
75749
|
-
|
|
75884
|
+
text_node(flag.name)
|
|
75750
75885
|
]]
|
|
75751
75886
|
];
|
|
75752
75887
|
});
|
|
@@ -76083,12 +76218,12 @@ function open_report(gobj, findings, treedb_id) {
|
|
|
76083
76218
|
[
|
|
76084
76219
|
"td",
|
|
76085
76220
|
{ class: "SCHEMA_REPORT_TOPIC" },
|
|
76086
|
-
|
|
76221
|
+
text_node(finding.topic || "")
|
|
76087
76222
|
],
|
|
76088
76223
|
[
|
|
76089
76224
|
"td",
|
|
76090
76225
|
{ class: "SCHEMA_REPORT_COL" },
|
|
76091
|
-
|
|
76226
|
+
text_node(finding.col || "")
|
|
76092
76227
|
],
|
|
76093
76228
|
[
|
|
76094
76229
|
"td",
|
|
@@ -76096,7 +76231,7 @@ function open_report(gobj, findings, treedb_id) {
|
|
|
76096
76231
|
[[
|
|
76097
76232
|
"code",
|
|
76098
76233
|
{},
|
|
76099
|
-
|
|
76234
|
+
text_node(finding.detail || "")
|
|
76100
76235
|
]]
|
|
76101
76236
|
]
|
|
76102
76237
|
]
|
|
@@ -76532,7 +76667,7 @@ function render_import_plan(gobj, plan) {
|
|
|
76532
76667
|
], [
|
|
76533
76668
|
"code",
|
|
76534
76669
|
{ class: "ml-2" },
|
|
76535
|
-
|
|
76670
|
+
text_node(what)
|
|
76536
76671
|
]]
|
|
76537
76672
|
];
|
|
76538
76673
|
});
|
|
@@ -76551,7 +76686,7 @@ function render_import_plan(gobj, plan) {
|
|
|
76551
76686
|
[
|
|
76552
76687
|
"span",
|
|
76553
76688
|
{ class: "ml-1" },
|
|
76554
|
-
|
|
76689
|
+
text_node(plan.writes.length)
|
|
76555
76690
|
],
|
|
76556
76691
|
[
|
|
76557
76692
|
"span",
|
|
@@ -76564,7 +76699,7 @@ function render_import_plan(gobj, plan) {
|
|
|
76564
76699
|
[
|
|
76565
76700
|
"span",
|
|
76566
76701
|
{ class: "ml-1 has-text-weight-bold" },
|
|
76567
|
-
|
|
76702
|
+
text_node(deletes.length)
|
|
76568
76703
|
]
|
|
76569
76704
|
]
|
|
76570
76705
|
], [
|
|
@@ -76606,7 +76741,7 @@ function open_orphans(gobj) {
|
|
|
76606
76741
|
[[
|
|
76607
76742
|
"code",
|
|
76608
76743
|
{},
|
|
76609
|
-
|
|
76744
|
+
text_node(entry.id)
|
|
76610
76745
|
]]
|
|
76611
76746
|
],
|
|
76612
76747
|
[
|
|
@@ -80507,7 +80642,7 @@ function traffic_scalar_row(key, value) {
|
|
|
80507
80642
|
[
|
|
80508
80643
|
"span",
|
|
80509
80644
|
{ class: "TRAFFIC_KEY" },
|
|
80510
|
-
key + ":"
|
|
80645
|
+
text_node(key + ":")
|
|
80511
80646
|
],
|
|
80512
80647
|
[
|
|
80513
80648
|
"span",
|
|
@@ -80602,7 +80737,7 @@ function traffic_value_node(key, value) {
|
|
|
80602
80737
|
[
|
|
80603
80738
|
"span",
|
|
80604
80739
|
{ class: "TRAFFIC_KEY" },
|
|
80605
|
-
key + ":"
|
|
80740
|
+
text_node(key + ":")
|
|
80606
80741
|
],
|
|
80607
80742
|
[
|
|
80608
80743
|
"span",
|