@yuneta/gobj-ui 7.23.141 → 7.23.143
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 +50 -11
- package/dist/gobj-ui.cjs.js +774 -248
- package/dist/gobj-ui.es.js +773 -249
- package/index.js +2 -0
- package/package.json +1 -1
- package/src/c_g6_nodes_tree.js +24 -14
- package/src/c_yui_json_pad.js +454 -0
- package/src/c_yui_schema_editor.js +16 -0
- package/src/c_yui_treedb_graph.js +7 -2
- package/src/c_yui_treedb_topic_with_form.js +14 -0
- package/src/schema_import.js +2 -1
- package/src/schema_model.js +2 -1
- package/src/schema_to_c.js +1 -1
- package/src/schema_validate.js +20 -0
- package/src/schema_validate.test.js +44 -0
- package/src/treedb_fold_model.js +52 -20
- package/src/treedb_fold_model.test.js +40 -5
- package/src/yui_json_pad.js +109 -0
package/dist/gobj-ui.cjs.js
CHANGED
|
@@ -871,7 +871,7 @@ function secondary_nav_renders(item, layout) {
|
|
|
871
871
|
/***************************************************************
|
|
872
872
|
* Constants
|
|
873
873
|
***************************************************************/
|
|
874
|
-
var GCLASS_NAME$
|
|
874
|
+
var GCLASS_NAME$22 = "C_YUI_SHELL";
|
|
875
875
|
var __last_shell__ = null;
|
|
876
876
|
var ZONE_IDS = [
|
|
877
877
|
"top",
|
|
@@ -893,7 +893,7 @@ var LAYER_DEFS = [
|
|
|
893
893
|
/***************************************************************
|
|
894
894
|
* Attrs
|
|
895
895
|
***************************************************************/
|
|
896
|
-
var attrs_table$
|
|
896
|
+
var attrs_table$22 = [
|
|
897
897
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
898
898
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_JSON, "config", 0, null, "Shell declarative config (zones, menu, stages, toolbar)"),
|
|
899
899
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "default_route", 0, "", "Fallback route if hash is empty"),
|
|
@@ -904,7 +904,7 @@ var attrs_table$21 = [
|
|
|
904
904
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "$container", 0, null, "Root HTMLElement of the shell"),
|
|
905
905
|
(0, _yuneta_gobj_js.SDATA_END)()
|
|
906
906
|
];
|
|
907
|
-
var PRIVATE_DATA$
|
|
907
|
+
var PRIVATE_DATA$22 = {
|
|
908
908
|
zones: {},
|
|
909
909
|
layers: {},
|
|
910
910
|
stages: {},
|
|
@@ -927,23 +927,23 @@ var PRIVATE_DATA$21 = {
|
|
|
927
927
|
conn_nodes: [],
|
|
928
928
|
active_dropdown: null
|
|
929
929
|
};
|
|
930
|
-
var __gclass__$
|
|
930
|
+
var __gclass__$22 = null;
|
|
931
931
|
/******************************
|
|
932
932
|
* Framework Methods
|
|
933
933
|
******************************/
|
|
934
934
|
/***************************************************************
|
|
935
935
|
* Framework Method: Create
|
|
936
936
|
***************************************************************/
|
|
937
|
-
function mt_create$
|
|
937
|
+
function mt_create$22(gobj) {
|
|
938
938
|
const subscriber = (0, _yuneta_gobj_js.gobj_read_pointer_attr)(gobj, "subscriber");
|
|
939
939
|
if (subscriber) (0, _yuneta_gobj_js.gobj_subscribe_event)(gobj, null, {}, subscriber);
|
|
940
940
|
__last_shell__ = gobj;
|
|
941
|
-
build_ui$
|
|
941
|
+
build_ui$19(gobj);
|
|
942
942
|
}
|
|
943
943
|
/***************************************************************
|
|
944
944
|
* Framework Method: Start
|
|
945
945
|
***************************************************************/
|
|
946
|
-
function mt_start$
|
|
946
|
+
function mt_start$20(gobj) {
|
|
947
947
|
let config = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "config") || {};
|
|
948
948
|
let priv = gobj.priv;
|
|
949
949
|
if (!validate_config(config)) {
|
|
@@ -1012,7 +1012,7 @@ function mt_start$19(gobj) {
|
|
|
1012
1012
|
/***************************************************************
|
|
1013
1013
|
* Framework Method: Stop
|
|
1014
1014
|
***************************************************************/
|
|
1015
|
-
function mt_stop$
|
|
1015
|
+
function mt_stop$20(gobj) {
|
|
1016
1016
|
let priv = gobj.priv;
|
|
1017
1017
|
if (!priv) return 0;
|
|
1018
1018
|
close_toolbar_dropdown(gobj);
|
|
@@ -1053,7 +1053,7 @@ function mt_stop$19(gobj) {
|
|
|
1053
1053
|
/***************************************************************
|
|
1054
1054
|
* Framework Method: Destroy
|
|
1055
1055
|
***************************************************************/
|
|
1056
|
-
function mt_destroy$
|
|
1056
|
+
function mt_destroy$22(gobj) {
|
|
1057
1057
|
close_toolbar_dropdown(gobj);
|
|
1058
1058
|
let $container = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "$container");
|
|
1059
1059
|
if ($container && $container.parentNode) $container.parentNode.removeChild($container);
|
|
@@ -1169,7 +1169,7 @@ function check_route_unique(route_owner, item, menu_id) {
|
|
|
1169
1169
|
/************************************************************
|
|
1170
1170
|
* Build the DOM: layers → base → zones
|
|
1171
1171
|
************************************************************/
|
|
1172
|
-
function build_ui$
|
|
1172
|
+
function build_ui$19(gobj) {
|
|
1173
1173
|
let priv = gobj.priv;
|
|
1174
1174
|
let shell_cfg = ((0, _yuneta_gobj_js.gobj_read_attr)(gobj, "config") || {}).shell || {};
|
|
1175
1175
|
let $container = (0, _yuneta_gobj_js.createElement2)(["div", { class: "C_YUI_SHELL yui-shell" }]);
|
|
@@ -2556,14 +2556,14 @@ function ac_nav_item_close(gobj, event, kw, src) {
|
|
|
2556
2556
|
/***************************************************************
|
|
2557
2557
|
* FSM
|
|
2558
2558
|
***************************************************************/
|
|
2559
|
-
var gmt$
|
|
2560
|
-
mt_create: mt_create$
|
|
2561
|
-
mt_start: mt_start$
|
|
2562
|
-
mt_stop: mt_stop$
|
|
2563
|
-
mt_destroy: mt_destroy$
|
|
2559
|
+
var gmt$22 = {
|
|
2560
|
+
mt_create: mt_create$22,
|
|
2561
|
+
mt_start: mt_start$20,
|
|
2562
|
+
mt_stop: mt_stop$20,
|
|
2563
|
+
mt_destroy: mt_destroy$22
|
|
2564
2564
|
};
|
|
2565
|
-
function create_gclass$
|
|
2566
|
-
if (__gclass__$
|
|
2565
|
+
function create_gclass$22(gclass_name) {
|
|
2566
|
+
if (__gclass__$22) {
|
|
2567
2567
|
(0, _yuneta_gobj_js.log_error)(`GClass ALREADY created: ${gclass_name}`);
|
|
2568
2568
|
return -1;
|
|
2569
2569
|
}
|
|
@@ -2592,12 +2592,12 @@ function create_gclass$21(gclass_name) {
|
|
|
2592
2592
|
["EV_ROUTE_CHANGED", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT | _yuneta_gobj_js.event_flag_t.EVF_PUBLIC_EVENT | _yuneta_gobj_js.event_flag_t.EVF_NO_WARN_SUBS],
|
|
2593
2593
|
["EV_LANGUAGE_CHANGED", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT | _yuneta_gobj_js.event_flag_t.EVF_PUBLIC_EVENT | _yuneta_gobj_js.event_flag_t.EVF_NO_WARN_SUBS]
|
|
2594
2594
|
];
|
|
2595
|
-
__gclass__$
|
|
2596
|
-
if (!__gclass__$
|
|
2595
|
+
__gclass__$22 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, event_types, states, gmt$22, 0, attrs_table$22, PRIVATE_DATA$22, 0, 0, 0, _yuneta_gobj_js.gclass_flag_t.gcflag_no_check_output_events);
|
|
2596
|
+
if (!__gclass__$22) return -1;
|
|
2597
2597
|
return 0;
|
|
2598
2598
|
}
|
|
2599
2599
|
function register_c_yui_shell() {
|
|
2600
|
-
return create_gclass$
|
|
2600
|
+
return create_gclass$22(GCLASS_NAME$22);
|
|
2601
2601
|
}
|
|
2602
2602
|
/***************************************************************
|
|
2603
2603
|
* Public helpers — exported alongside register_c_yui_shell().
|
|
@@ -2690,7 +2690,7 @@ function yui_shell_last_route_under(shell_gobj, route) {
|
|
|
2690
2690
|
function yui_shell_of(gobj) {
|
|
2691
2691
|
let g = gobj;
|
|
2692
2692
|
while (g) {
|
|
2693
|
-
if ((0, _yuneta_gobj_js.gobj_gclass_name)(g) === GCLASS_NAME$
|
|
2693
|
+
if ((0, _yuneta_gobj_js.gobj_gclass_name)(g) === GCLASS_NAME$22) return g;
|
|
2694
2694
|
g = (0, _yuneta_gobj_js.gobj_parent)(g);
|
|
2695
2695
|
}
|
|
2696
2696
|
return __last_shell__;
|
|
@@ -3444,7 +3444,7 @@ function yui_shell_confirm_yesnocancel(shell, message, opts) {
|
|
|
3444
3444
|
/***************************************************************
|
|
3445
3445
|
* Constants
|
|
3446
3446
|
***************************************************************/
|
|
3447
|
-
var GCLASS_NAME$
|
|
3447
|
+
var GCLASS_NAME$21 = "C_YUI_WINDOW";
|
|
3448
3448
|
var WC_MIN = "<svg viewBox=\"0 0 16 16\" aria-hidden=\"true\"><rect x=\"3\" y=\"11\" width=\"10\" height=\"1.6\" rx=\"0.8\" fill=\"currentColor\"/></svg>";
|
|
3449
3449
|
var WC_MAX = "<svg viewBox=\"0 0 16 16\" aria-hidden=\"true\"><rect x=\"3.3\" y=\"3.3\" width=\"9.4\" height=\"9.4\" rx=\"1.6\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"/></svg>";
|
|
3450
3450
|
var WC_RESTORE = "<svg viewBox=\"0 0 16 16\" aria-hidden=\"true\"><rect x=\"5.2\" y=\"3\" width=\"7.8\" height=\"7.8\" rx=\"1.3\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\"/><rect x=\"3\" y=\"5.2\" width=\"7.8\" height=\"7.8\" rx=\"1.3\" fill=\"var(--bulma-scheme-main)\" stroke=\"currentColor\" stroke-width=\"1.4\"/></svg>";
|
|
@@ -3453,7 +3453,7 @@ var MOBILE_MAX = 768;
|
|
|
3453
3453
|
/***************************************************************
|
|
3454
3454
|
* Data
|
|
3455
3455
|
***************************************************************/
|
|
3456
|
-
var attrs_table$
|
|
3456
|
+
var attrs_table$21 = [
|
|
3457
3457
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
3458
3458
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "$parent", 0, null, "$container will be appended to $parent if not null, else to document.body"),
|
|
3459
3459
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_INTEGER, "x", 0, "300", "X position"),
|
|
@@ -3491,21 +3491,21 @@ var attrs_table$20 = [
|
|
|
3491
3491
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "win_resize_handler", 0, null, "Internal: native window 'resize' listener"),
|
|
3492
3492
|
(0, _yuneta_gobj_js.SDATA_END)()
|
|
3493
3493
|
];
|
|
3494
|
-
var PRIVATE_DATA$
|
|
3495
|
-
var __gclass__$
|
|
3494
|
+
var PRIVATE_DATA$21 = { prevSize: 0 };
|
|
3495
|
+
var __gclass__$21 = null;
|
|
3496
3496
|
/******************************
|
|
3497
3497
|
* Framework Methods
|
|
3498
3498
|
******************************/
|
|
3499
3499
|
/***************************************************************
|
|
3500
3500
|
* Framework Method: Create
|
|
3501
3501
|
***************************************************************/
|
|
3502
|
-
function mt_create$
|
|
3502
|
+
function mt_create$21(gobj) {
|
|
3503
3503
|
const subscriber = (0, _yuneta_gobj_js.gobj_read_pointer_attr)(gobj, "subscriber");
|
|
3504
3504
|
if (subscriber) (0, _yuneta_gobj_js.gobj_subscribe_event)(gobj, null, {}, subscriber);
|
|
3505
3505
|
let window_id = "window-" + (0, _yuneta_gobj_js.clean_name)((0, _yuneta_gobj_js.gobj_short_name)(gobj));
|
|
3506
3506
|
(0, _yuneta_gobj_js.gobj_write_attr)(gobj, "window_id", window_id);
|
|
3507
3507
|
let manager = resolve_manager(gobj);
|
|
3508
|
-
build_ui$
|
|
3508
|
+
build_ui$18(gobj);
|
|
3509
3509
|
if (manager) {
|
|
3510
3510
|
let $c = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "$container");
|
|
3511
3511
|
if ($c) $c.addEventListener("pointerdown", function() {
|
|
@@ -3539,7 +3539,7 @@ function mt_create$20(gobj) {
|
|
|
3539
3539
|
/***************************************************************
|
|
3540
3540
|
* Framework Method: Destroy
|
|
3541
3541
|
***************************************************************/
|
|
3542
|
-
function mt_destroy$
|
|
3542
|
+
function mt_destroy$21(gobj) {
|
|
3543
3543
|
let manager = (0, _yuneta_gobj_js.gobj_read_pointer_attr)(gobj, "manager");
|
|
3544
3544
|
if (manager) (0, _yuneta_gobj_js.gobj_send_event)(manager, "EV_UNREGISTER_WINDOW", { window: gobj }, gobj);
|
|
3545
3545
|
let back_overlay = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "back_overlay");
|
|
@@ -3712,7 +3712,7 @@ function do_minimize(gobj) {
|
|
|
3712
3712
|
/************************************************************
|
|
3713
3713
|
* Build UI
|
|
3714
3714
|
************************************************************/
|
|
3715
|
-
function build_ui$
|
|
3715
|
+
function build_ui$18(gobj) {
|
|
3716
3716
|
ensure_window_style();
|
|
3717
3717
|
let mobile = is_mobile$4();
|
|
3718
3718
|
let header = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "header");
|
|
@@ -4273,15 +4273,15 @@ function ac_close(gobj, event, kw, src) {
|
|
|
4273
4273
|
/***************************
|
|
4274
4274
|
* FSM
|
|
4275
4275
|
***************************/
|
|
4276
|
-
var gmt$
|
|
4277
|
-
mt_create: mt_create$
|
|
4278
|
-
mt_destroy: mt_destroy$
|
|
4276
|
+
var gmt$21 = {
|
|
4277
|
+
mt_create: mt_create$21,
|
|
4278
|
+
mt_destroy: mt_destroy$21
|
|
4279
4279
|
};
|
|
4280
4280
|
/***************************************************************
|
|
4281
4281
|
* Create the GClass
|
|
4282
4282
|
***************************************************************/
|
|
4283
|
-
function create_gclass$
|
|
4284
|
-
if (__gclass__$
|
|
4283
|
+
function create_gclass$21(gclass_name) {
|
|
4284
|
+
if (__gclass__$21) {
|
|
4285
4285
|
(0, _yuneta_gobj_js.log_error)(`GClass ALREADY created: ${gclass_name}`);
|
|
4286
4286
|
return -1;
|
|
4287
4287
|
}
|
|
@@ -4316,15 +4316,15 @@ function create_gclass$20(gclass_name) {
|
|
|
4316
4316
|
["EV_HIDE", 0],
|
|
4317
4317
|
["EV_CLOSE_WINDOW", 0]
|
|
4318
4318
|
];
|
|
4319
|
-
__gclass__$
|
|
4320
|
-
if (!__gclass__$
|
|
4319
|
+
__gclass__$21 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, event_types, states, gmt$21, 0, attrs_table$21, PRIVATE_DATA$21, 0, 0, 0, 0);
|
|
4320
|
+
if (!__gclass__$21) return -1;
|
|
4321
4321
|
return 0;
|
|
4322
4322
|
}
|
|
4323
4323
|
/***************************************************************
|
|
4324
4324
|
* Register GClass
|
|
4325
4325
|
***************************************************************/
|
|
4326
4326
|
function register_c_yui_window() {
|
|
4327
|
-
return create_gclass$
|
|
4327
|
+
return create_gclass$21(GCLASS_NAME$21);
|
|
4328
4328
|
}
|
|
4329
4329
|
//#endregion
|
|
4330
4330
|
//#region src/c_yui_window_manager.js
|
|
@@ -4362,13 +4362,13 @@ function register_c_yui_window() {
|
|
|
4362
4362
|
/***************************************************************
|
|
4363
4363
|
* Constants
|
|
4364
4364
|
***************************************************************/
|
|
4365
|
-
var GCLASS_NAME$
|
|
4365
|
+
var GCLASS_NAME$20 = "C_YUI_WINDOW_MANAGER";
|
|
4366
4366
|
var DOCK_Z = 1e6;
|
|
4367
4367
|
var WC_X = "<svg viewBox=\"0 0 16 16\" aria-hidden=\"true\"><path d=\"M4.5 4.5 L11.5 11.5 M11.5 4.5 L4.5 11.5\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"/></svg>";
|
|
4368
4368
|
/***************************************************************
|
|
4369
4369
|
* Data
|
|
4370
4370
|
***************************************************************/
|
|
4371
|
-
var attrs_table$
|
|
4371
|
+
var attrs_table$20 = [
|
|
4372
4372
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
4373
4373
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "dock_mode", 0, "floating", "floating | inline | responsive (floating on wide screens, inline on narrow)"),
|
|
4374
4374
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "dock_corner", 0, "bottom-left", "Floating placement: top-left | top-right | bottom-left | bottom-right"),
|
|
@@ -4378,20 +4378,20 @@ var attrs_table$19 = [
|
|
|
4378
4378
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "$container", 0, null, "Internal: the dock element"),
|
|
4379
4379
|
(0, _yuneta_gobj_js.SDATA_END)()
|
|
4380
4380
|
];
|
|
4381
|
-
var PRIVATE_DATA$
|
|
4381
|
+
var PRIVATE_DATA$20 = {
|
|
4382
4382
|
windows: null,
|
|
4383
4383
|
z: 0,
|
|
4384
4384
|
mql: null,
|
|
4385
4385
|
mql_handler: null
|
|
4386
4386
|
};
|
|
4387
|
-
var __gclass__$
|
|
4387
|
+
var __gclass__$20 = null;
|
|
4388
4388
|
/******************************
|
|
4389
4389
|
* Framework Methods
|
|
4390
4390
|
******************************/
|
|
4391
4391
|
/***************************************************************
|
|
4392
4392
|
* Framework Method: Create
|
|
4393
4393
|
***************************************************************/
|
|
4394
|
-
function mt_create$
|
|
4394
|
+
function mt_create$20(gobj) {
|
|
4395
4395
|
let priv = gobj.priv;
|
|
4396
4396
|
priv.windows = [];
|
|
4397
4397
|
priv.z = 10;
|
|
@@ -4410,7 +4410,7 @@ function mt_create$19(gobj) {
|
|
|
4410
4410
|
/***************************************************************
|
|
4411
4411
|
* Framework Method: Destroy
|
|
4412
4412
|
***************************************************************/
|
|
4413
|
-
function mt_destroy$
|
|
4413
|
+
function mt_destroy$20(gobj) {
|
|
4414
4414
|
let priv = gobj.priv;
|
|
4415
4415
|
if (priv.mql && priv.mql_handler) {
|
|
4416
4416
|
priv.mql.removeEventListener("change", priv.mql_handler);
|
|
@@ -4779,19 +4779,19 @@ function ac_focus_window(gobj, event, kw, src) {
|
|
|
4779
4779
|
/***************************
|
|
4780
4780
|
* FSM
|
|
4781
4781
|
***************************/
|
|
4782
|
-
var gmt$
|
|
4783
|
-
mt_create: mt_create$
|
|
4784
|
-
mt_destroy: mt_destroy$
|
|
4782
|
+
var gmt$20 = {
|
|
4783
|
+
mt_create: mt_create$20,
|
|
4784
|
+
mt_destroy: mt_destroy$20
|
|
4785
4785
|
};
|
|
4786
4786
|
/***************************************************************
|
|
4787
4787
|
* Create the GClass
|
|
4788
4788
|
***************************************************************/
|
|
4789
|
-
function create_gclass$
|
|
4790
|
-
if (__gclass__$
|
|
4789
|
+
function create_gclass$20(gclass_name) {
|
|
4790
|
+
if (__gclass__$20) {
|
|
4791
4791
|
(0, _yuneta_gobj_js.log_error)(`GClass ALREADY created: ${gclass_name}`);
|
|
4792
4792
|
return -1;
|
|
4793
4793
|
}
|
|
4794
|
-
__gclass__$
|
|
4794
|
+
__gclass__$20 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, [
|
|
4795
4795
|
["EV_REGISTER_WINDOW", 0],
|
|
4796
4796
|
["EV_UNREGISTER_WINDOW", 0],
|
|
4797
4797
|
["EV_MINIMIZE_WINDOW", 0],
|
|
@@ -4817,15 +4817,15 @@ function create_gclass$19(gclass_name) {
|
|
|
4817
4817
|
ac_focus_window,
|
|
4818
4818
|
null
|
|
4819
4819
|
]
|
|
4820
|
-
]]], gmt$
|
|
4821
|
-
if (!__gclass__$
|
|
4820
|
+
]]], gmt$20, 0, attrs_table$20, PRIVATE_DATA$20, 0, 0, 0, 0);
|
|
4821
|
+
if (!__gclass__$20) return -1;
|
|
4822
4822
|
return 0;
|
|
4823
4823
|
}
|
|
4824
4824
|
/***************************************************************
|
|
4825
4825
|
* Register GClass
|
|
4826
4826
|
***************************************************************/
|
|
4827
4827
|
function register_c_yui_window_manager() {
|
|
4828
|
-
return create_gclass$
|
|
4828
|
+
return create_gclass$20(GCLASS_NAME$20);
|
|
4829
4829
|
}
|
|
4830
4830
|
//#endregion
|
|
4831
4831
|
//#region src/pager_helpers.js
|
|
@@ -4911,11 +4911,11 @@ function pager_back_action(stack, back_on_root) {
|
|
|
4911
4911
|
/***************************************************************
|
|
4912
4912
|
* Constants
|
|
4913
4913
|
***************************************************************/
|
|
4914
|
-
var GCLASS_NAME$
|
|
4914
|
+
var GCLASS_NAME$19 = "C_YUI_PAGER";
|
|
4915
4915
|
/***************************************************************
|
|
4916
4916
|
* Data
|
|
4917
4917
|
***************************************************************/
|
|
4918
|
-
var attrs_table$
|
|
4918
|
+
var attrs_table$19 = [
|
|
4919
4919
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
4920
4920
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "root_title", 0, "", "Title shown on the root page"),
|
|
4921
4921
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_BOOLEAN, "back_on_root", 0, true, "On the root page the back affordance emits EV_PAGER_EXIT"),
|
|
@@ -4923,18 +4923,18 @@ var attrs_table$18 = [
|
|
|
4923
4923
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "$container", 0, null, "HTMLElement root, mounted by the parent"),
|
|
4924
4924
|
(0, _yuneta_gobj_js.SDATA_END)()
|
|
4925
4925
|
];
|
|
4926
|
-
var PRIVATE_DATA$
|
|
4927
|
-
var __gclass__$
|
|
4926
|
+
var PRIVATE_DATA$19 = { stack: null };
|
|
4927
|
+
var __gclass__$19 = null;
|
|
4928
4928
|
/******************************
|
|
4929
4929
|
* Framework Methods
|
|
4930
4930
|
******************************/
|
|
4931
4931
|
/***************************************************************
|
|
4932
4932
|
* Framework Method: Create
|
|
4933
4933
|
***************************************************************/
|
|
4934
|
-
function mt_create$
|
|
4934
|
+
function mt_create$19(gobj) {
|
|
4935
4935
|
let priv = gobj.priv;
|
|
4936
4936
|
priv.stack = [];
|
|
4937
|
-
build_ui$
|
|
4937
|
+
build_ui$17(gobj);
|
|
4938
4938
|
let subscriber = (0, _yuneta_gobj_js.gobj_read_pointer_attr)(gobj, "subscriber");
|
|
4939
4939
|
if (!subscriber) subscriber = (0, _yuneta_gobj_js.gobj_parent)(gobj);
|
|
4940
4940
|
(0, _yuneta_gobj_js.gobj_subscribe_event)(gobj, null, {}, subscriber);
|
|
@@ -4942,17 +4942,17 @@ function mt_create$18(gobj) {
|
|
|
4942
4942
|
/***************************************************************
|
|
4943
4943
|
* Framework Method: Start
|
|
4944
4944
|
***************************************************************/
|
|
4945
|
-
function mt_start$
|
|
4945
|
+
function mt_start$19(gobj) {}
|
|
4946
4946
|
/***************************************************************
|
|
4947
4947
|
* Framework Method: Stop
|
|
4948
4948
|
***************************************************************/
|
|
4949
|
-
function mt_stop$
|
|
4949
|
+
function mt_stop$19(gobj) {
|
|
4950
4950
|
(0, _yuneta_gobj_js.gobj_stop_children)(gobj);
|
|
4951
4951
|
}
|
|
4952
4952
|
/***************************************************************
|
|
4953
4953
|
* Framework Method: Destroy
|
|
4954
4954
|
***************************************************************/
|
|
4955
|
-
function mt_destroy$
|
|
4955
|
+
function mt_destroy$19(gobj) {
|
|
4956
4956
|
destroy_ui$12(gobj);
|
|
4957
4957
|
}
|
|
4958
4958
|
/***************************
|
|
@@ -4961,7 +4961,7 @@ function mt_destroy$18(gobj) {
|
|
|
4961
4961
|
/************************************************************
|
|
4962
4962
|
* Build UI
|
|
4963
4963
|
************************************************************/
|
|
4964
|
-
function build_ui$
|
|
4964
|
+
function build_ui$17(gobj) {
|
|
4965
4965
|
let $container = (0, _yuneta_gobj_js.createElement2)([
|
|
4966
4966
|
"div",
|
|
4967
4967
|
{
|
|
@@ -5113,7 +5113,7 @@ function ac_push_page(gobj, event, kw, src) {
|
|
|
5113
5113
|
let priv = gobj.priv;
|
|
5114
5114
|
let resolved = resolve_panel$1(kw.content);
|
|
5115
5115
|
if (!resolved.$el) {
|
|
5116
|
-
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$
|
|
5116
|
+
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$19}: EV_PUSH_PAGE without content`);
|
|
5117
5117
|
return -1;
|
|
5118
5118
|
}
|
|
5119
5119
|
let $body = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "$container").querySelector(".yui-pager-body");
|
|
@@ -5166,7 +5166,7 @@ function ac_replace_page(gobj, event, kw, src) {
|
|
|
5166
5166
|
let priv = gobj.priv;
|
|
5167
5167
|
let resolved = resolve_panel$1(kw.content);
|
|
5168
5168
|
if (!resolved.$el) {
|
|
5169
|
-
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$
|
|
5169
|
+
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$19}: EV_REPLACE_PAGE without content`);
|
|
5170
5170
|
return -1;
|
|
5171
5171
|
}
|
|
5172
5172
|
let $body = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "$container").querySelector(".yui-pager-body");
|
|
@@ -5233,17 +5233,17 @@ function ac_resize$5(gobj, event, kw, src) {
|
|
|
5233
5233
|
/***************************
|
|
5234
5234
|
* FSM
|
|
5235
5235
|
***************************/
|
|
5236
|
-
var gmt$
|
|
5237
|
-
mt_create: mt_create$
|
|
5238
|
-
mt_start: mt_start$
|
|
5239
|
-
mt_stop: mt_stop$
|
|
5240
|
-
mt_destroy: mt_destroy$
|
|
5236
|
+
var gmt$19 = {
|
|
5237
|
+
mt_create: mt_create$19,
|
|
5238
|
+
mt_start: mt_start$19,
|
|
5239
|
+
mt_stop: mt_stop$19,
|
|
5240
|
+
mt_destroy: mt_destroy$19
|
|
5241
5241
|
};
|
|
5242
5242
|
/***************************************************************
|
|
5243
5243
|
* Create the GClass
|
|
5244
5244
|
***************************************************************/
|
|
5245
|
-
function create_gclass$
|
|
5246
|
-
if (__gclass__$
|
|
5245
|
+
function create_gclass$19(gclass_name) {
|
|
5246
|
+
if (__gclass__$19) {
|
|
5247
5247
|
(0, _yuneta_gobj_js.log_error)(`GClass ALREADY created: ${gclass_name}`);
|
|
5248
5248
|
return -1;
|
|
5249
5249
|
}
|
|
@@ -5308,15 +5308,15 @@ function create_gclass$18(gclass_name) {
|
|
|
5308
5308
|
["EV_PAGE_DISCARD", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT],
|
|
5309
5309
|
["EV_PAGER_EXIT", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT]
|
|
5310
5310
|
];
|
|
5311
|
-
__gclass__$
|
|
5312
|
-
if (!__gclass__$
|
|
5311
|
+
__gclass__$19 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, event_types, states, gmt$19, 0, attrs_table$19, PRIVATE_DATA$19, 0, 0, 0, 0);
|
|
5312
|
+
if (!__gclass__$19) return -1;
|
|
5313
5313
|
return 0;
|
|
5314
5314
|
}
|
|
5315
5315
|
/***************************************************************
|
|
5316
5316
|
* Register GClass
|
|
5317
5317
|
***************************************************************/
|
|
5318
5318
|
function register_c_yui_pager() {
|
|
5319
|
-
return create_gclass$
|
|
5319
|
+
return create_gclass$19(GCLASS_NAME$19);
|
|
5320
5320
|
}
|
|
5321
5321
|
//#endregion
|
|
5322
5322
|
//#region src/wizard_helpers.js
|
|
@@ -5437,11 +5437,11 @@ function wizard_should_validate(linear, has_gobj) {
|
|
|
5437
5437
|
/***************************************************************
|
|
5438
5438
|
* Constants
|
|
5439
5439
|
***************************************************************/
|
|
5440
|
-
var GCLASS_NAME$
|
|
5440
|
+
var GCLASS_NAME$18 = "C_YUI_WIZARD";
|
|
5441
5441
|
/***************************************************************
|
|
5442
5442
|
* Data
|
|
5443
5443
|
***************************************************************/
|
|
5444
|
-
var attrs_table$
|
|
5444
|
+
var attrs_table$18 = [
|
|
5445
5445
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
5446
5446
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "confirm_label", 0, "confirm", "i18n key of the last-step primary button"),
|
|
5447
5447
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "next_label", 0, "next", "i18n key of the primary button (not last step)"),
|
|
@@ -5451,26 +5451,26 @@ var attrs_table$17 = [
|
|
|
5451
5451
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "$container", 0, null, "HTMLElement root, mounted by the parent"),
|
|
5452
5452
|
(0, _yuneta_gobj_js.SDATA_END)()
|
|
5453
5453
|
];
|
|
5454
|
-
var PRIVATE_DATA$
|
|
5454
|
+
var PRIVATE_DATA$18 = {
|
|
5455
5455
|
steps: null,
|
|
5456
5456
|
idx: 0,
|
|
5457
5457
|
acc: null,
|
|
5458
5458
|
awaiting: false
|
|
5459
5459
|
};
|
|
5460
|
-
var __gclass__$
|
|
5460
|
+
var __gclass__$18 = null;
|
|
5461
5461
|
/******************************
|
|
5462
5462
|
* Framework Methods
|
|
5463
5463
|
******************************/
|
|
5464
5464
|
/***************************************************************
|
|
5465
5465
|
* Framework Method: Create
|
|
5466
5466
|
***************************************************************/
|
|
5467
|
-
function mt_create$
|
|
5467
|
+
function mt_create$18(gobj) {
|
|
5468
5468
|
let priv = gobj.priv;
|
|
5469
5469
|
priv.steps = [];
|
|
5470
5470
|
priv.idx = 0;
|
|
5471
5471
|
priv.acc = null;
|
|
5472
5472
|
priv.awaiting = false;
|
|
5473
|
-
build_ui$
|
|
5473
|
+
build_ui$16(gobj);
|
|
5474
5474
|
let subscriber = (0, _yuneta_gobj_js.gobj_read_pointer_attr)(gobj, "subscriber");
|
|
5475
5475
|
if (!subscriber) subscriber = (0, _yuneta_gobj_js.gobj_parent)(gobj);
|
|
5476
5476
|
(0, _yuneta_gobj_js.gobj_subscribe_event)(gobj, null, {}, subscriber);
|
|
@@ -5478,17 +5478,17 @@ function mt_create$17(gobj) {
|
|
|
5478
5478
|
/***************************************************************
|
|
5479
5479
|
* Framework Method: Start
|
|
5480
5480
|
***************************************************************/
|
|
5481
|
-
function mt_start$
|
|
5481
|
+
function mt_start$18(gobj) {}
|
|
5482
5482
|
/***************************************************************
|
|
5483
5483
|
* Framework Method: Stop
|
|
5484
5484
|
***************************************************************/
|
|
5485
|
-
function mt_stop$
|
|
5485
|
+
function mt_stop$18(gobj) {
|
|
5486
5486
|
(0, _yuneta_gobj_js.gobj_stop_children)(gobj);
|
|
5487
5487
|
}
|
|
5488
5488
|
/***************************************************************
|
|
5489
5489
|
* Framework Method: Destroy
|
|
5490
5490
|
***************************************************************/
|
|
5491
|
-
function mt_destroy$
|
|
5491
|
+
function mt_destroy$18(gobj) {
|
|
5492
5492
|
destroy_ui$11(gobj);
|
|
5493
5493
|
}
|
|
5494
5494
|
/***************************
|
|
@@ -5497,7 +5497,7 @@ function mt_destroy$17(gobj) {
|
|
|
5497
5497
|
/************************************************************
|
|
5498
5498
|
* Build UI
|
|
5499
5499
|
************************************************************/
|
|
5500
|
-
function build_ui$
|
|
5500
|
+
function build_ui$16(gobj) {
|
|
5501
5501
|
let $container = (0, _yuneta_gobj_js.createElement2)([
|
|
5502
5502
|
"div",
|
|
5503
5503
|
{
|
|
@@ -5698,7 +5698,7 @@ function ac_set_steps(gobj, event, kw, src) {
|
|
|
5698
5698
|
let priv = gobj.priv;
|
|
5699
5699
|
let steps_in = kw && kw.steps || [];
|
|
5700
5700
|
if (steps_in.length === 0) {
|
|
5701
|
-
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$
|
|
5701
|
+
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$18}: EV_SET_STEPS with no steps`);
|
|
5702
5702
|
return -1;
|
|
5703
5703
|
}
|
|
5704
5704
|
let $body = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "$container").querySelector(".yui-wizard-body");
|
|
@@ -5708,7 +5708,7 @@ function ac_set_steps(gobj, event, kw, src) {
|
|
|
5708
5708
|
let st = steps_in[i];
|
|
5709
5709
|
let resolved = resolve_panel(st.content);
|
|
5710
5710
|
if (!resolved.$el) {
|
|
5711
|
-
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$
|
|
5711
|
+
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$18}: step '${st.id}' has no content`);
|
|
5712
5712
|
return -1;
|
|
5713
5713
|
}
|
|
5714
5714
|
resolved.$el.classList.add("is-hidden");
|
|
@@ -5842,17 +5842,17 @@ function ac_resize$4(gobj, event, kw, src) {
|
|
|
5842
5842
|
/***************************
|
|
5843
5843
|
* FSM
|
|
5844
5844
|
***************************/
|
|
5845
|
-
var gmt$
|
|
5846
|
-
mt_create: mt_create$
|
|
5847
|
-
mt_start: mt_start$
|
|
5848
|
-
mt_stop: mt_stop$
|
|
5849
|
-
mt_destroy: mt_destroy$
|
|
5845
|
+
var gmt$18 = {
|
|
5846
|
+
mt_create: mt_create$18,
|
|
5847
|
+
mt_start: mt_start$18,
|
|
5848
|
+
mt_stop: mt_stop$18,
|
|
5849
|
+
mt_destroy: mt_destroy$18
|
|
5850
5850
|
};
|
|
5851
5851
|
/***************************************************************
|
|
5852
5852
|
* Create the GClass
|
|
5853
5853
|
***************************************************************/
|
|
5854
|
-
function create_gclass$
|
|
5855
|
-
if (__gclass__$
|
|
5854
|
+
function create_gclass$18(gclass_name) {
|
|
5855
|
+
if (__gclass__$18) {
|
|
5856
5856
|
(0, _yuneta_gobj_js.log_error)(`GClass ALREADY created: ${gclass_name}`);
|
|
5857
5857
|
return -1;
|
|
5858
5858
|
}
|
|
@@ -5930,15 +5930,15 @@ function create_gclass$17(gclass_name) {
|
|
|
5930
5930
|
["EV_WIZARD_CANCEL", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT],
|
|
5931
5931
|
["EV_STEP_VALIDATE", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT | _yuneta_gobj_js.event_flag_t.EVF_NO_WARN_SUBS]
|
|
5932
5932
|
];
|
|
5933
|
-
__gclass__$
|
|
5934
|
-
if (!__gclass__$
|
|
5933
|
+
__gclass__$18 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, event_types, states, gmt$18, 0, attrs_table$18, PRIVATE_DATA$18, 0, 0, 0, 0);
|
|
5934
|
+
if (!__gclass__$18) return -1;
|
|
5935
5935
|
return 0;
|
|
5936
5936
|
}
|
|
5937
5937
|
/***************************************************************
|
|
5938
5938
|
* Register GClass
|
|
5939
5939
|
***************************************************************/
|
|
5940
5940
|
function register_c_yui_wizard() {
|
|
5941
|
-
return create_gclass$
|
|
5941
|
+
return create_gclass$18(GCLASS_NAME$18);
|
|
5942
5942
|
}
|
|
5943
5943
|
//#endregion
|
|
5944
5944
|
//#region src/yui_tabulator_i18n.js
|
|
@@ -7066,11 +7066,11 @@ function count_branches(value) {
|
|
|
7066
7066
|
/***************************************************************
|
|
7067
7067
|
* Constants
|
|
7068
7068
|
***************************************************************/
|
|
7069
|
-
var GCLASS_NAME$
|
|
7069
|
+
var GCLASS_NAME$17 = "C_YUI_FORM";
|
|
7070
7070
|
/***************************************************************
|
|
7071
7071
|
* Data
|
|
7072
7072
|
***************************************************************/
|
|
7073
|
-
var attrs_table$
|
|
7073
|
+
var attrs_table$17 = [
|
|
7074
7074
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of publishing messages"),
|
|
7075
7075
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "$parent", 0, null, "$container will be appended to $parent if not null, else do it manually"),
|
|
7076
7076
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "template", 0, "<div>You must supply a template for form</div>", "Template for form, object -> TEMPLATE, array -> DESC"),
|
|
@@ -7100,41 +7100,41 @@ var attrs_table$16 = [
|
|
|
7100
7100
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_BOOLEAN, "changes", 0, false, "Indicates if changes have been made"),
|
|
7101
7101
|
(0, _yuneta_gobj_js.SDATA_END)()
|
|
7102
7102
|
];
|
|
7103
|
-
var PRIVATE_DATA$
|
|
7104
|
-
var __gclass__$
|
|
7103
|
+
var PRIVATE_DATA$17 = {};
|
|
7104
|
+
var __gclass__$17 = null;
|
|
7105
7105
|
/***************************
|
|
7106
7106
|
* Framework Methods
|
|
7107
7107
|
***************************/
|
|
7108
7108
|
/************************************************************
|
|
7109
7109
|
* Framework Method create
|
|
7110
7110
|
************************************************************/
|
|
7111
|
-
function mt_create$
|
|
7111
|
+
function mt_create$17(gobj) {
|
|
7112
7112
|
let subscriber = (0, _yuneta_gobj_js.gobj_read_pointer_attr)(gobj, "subscriber");
|
|
7113
7113
|
if (!subscriber) subscriber = (0, _yuneta_gobj_js.gobj_parent)(gobj);
|
|
7114
7114
|
(0, _yuneta_gobj_js.gobj_subscribe_event)(gobj, null, {}, subscriber);
|
|
7115
7115
|
let name = (0, _yuneta_gobj_js.clean_name)((0, _yuneta_gobj_js.gobj_name)(gobj));
|
|
7116
7116
|
(0, _yuneta_gobj_js.gobj_write_attr)(gobj, "form_id", "form" + name);
|
|
7117
|
-
build_ui$
|
|
7117
|
+
build_ui$15(gobj);
|
|
7118
7118
|
}
|
|
7119
7119
|
/************************************************************
|
|
7120
7120
|
* Framework Method destroy
|
|
7121
7121
|
* In this point, all children
|
|
7122
7122
|
* and subscriptions are already deleted.
|
|
7123
7123
|
************************************************************/
|
|
7124
|
-
function mt_destroy$
|
|
7124
|
+
function mt_destroy$17(gobj) {
|
|
7125
7125
|
destroy_ui$10(gobj);
|
|
7126
7126
|
}
|
|
7127
7127
|
/************************************************************
|
|
7128
7128
|
* Framework Method start
|
|
7129
7129
|
************************************************************/
|
|
7130
|
-
function mt_start$
|
|
7130
|
+
function mt_start$17(gobj) {
|
|
7131
7131
|
let record = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "record");
|
|
7132
7132
|
if (record) (0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_LOAD_RECORD", record, gobj);
|
|
7133
7133
|
}
|
|
7134
7134
|
/************************************************************
|
|
7135
7135
|
* Framework Method stop
|
|
7136
7136
|
************************************************************/
|
|
7137
|
-
function mt_stop$
|
|
7137
|
+
function mt_stop$17(gobj) {}
|
|
7138
7138
|
/***************************
|
|
7139
7139
|
* Local Methods
|
|
7140
7140
|
***************************/
|
|
@@ -7389,7 +7389,7 @@ function build_toolbar(gobj) {
|
|
|
7389
7389
|
/************************************************************
|
|
7390
7390
|
* Build UI
|
|
7391
7391
|
************************************************************/
|
|
7392
|
-
function build_ui$
|
|
7392
|
+
function build_ui$15(gobj) {
|
|
7393
7393
|
let $container = (0, _yuneta_gobj_js.createElement2)([
|
|
7394
7394
|
"div",
|
|
7395
7395
|
{
|
|
@@ -9407,18 +9407,18 @@ function cmd_get_picked_files(gobj, cmd, kw, src) {
|
|
|
9407
9407
|
data: files
|
|
9408
9408
|
};
|
|
9409
9409
|
}
|
|
9410
|
-
var gmt$
|
|
9411
|
-
mt_create: mt_create$
|
|
9412
|
-
mt_start: mt_start$
|
|
9413
|
-
mt_stop: mt_stop$
|
|
9414
|
-
mt_destroy: mt_destroy$
|
|
9410
|
+
var gmt$17 = {
|
|
9411
|
+
mt_create: mt_create$17,
|
|
9412
|
+
mt_start: mt_start$17,
|
|
9413
|
+
mt_stop: mt_stop$17,
|
|
9414
|
+
mt_destroy: mt_destroy$17,
|
|
9415
9415
|
mt_command_parser: mt_command_parser$2
|
|
9416
9416
|
};
|
|
9417
9417
|
/***************************************************************
|
|
9418
9418
|
* Create the GClass
|
|
9419
9419
|
***************************************************************/
|
|
9420
|
-
function create_gclass$
|
|
9421
|
-
if (__gclass__$
|
|
9420
|
+
function create_gclass$17(gclass_name) {
|
|
9421
|
+
if (__gclass__$17) {
|
|
9422
9422
|
(0, _yuneta_gobj_js.log_error)(`GClass ALREADY created: ${gclass_name}`);
|
|
9423
9423
|
return -1;
|
|
9424
9424
|
}
|
|
@@ -9516,16 +9516,16 @@ function create_gclass$16(gclass_name) {
|
|
|
9516
9516
|
["EV_HIDE", 0],
|
|
9517
9517
|
["EV_TIMEOUT", 0]
|
|
9518
9518
|
];
|
|
9519
|
-
__gclass__$
|
|
9520
|
-
if (!__gclass__$
|
|
9519
|
+
__gclass__$17 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, event_types, states, gmt$17, 0, attrs_table$17, PRIVATE_DATA$17, 0, 0, 0, 0);
|
|
9520
|
+
if (!__gclass__$17) return -1;
|
|
9521
9521
|
return 0;
|
|
9522
9522
|
}
|
|
9523
9523
|
/***************************************************************
|
|
9524
9524
|
* Register GClass
|
|
9525
9525
|
***************************************************************/
|
|
9526
9526
|
function register_c_yui_form() {
|
|
9527
|
-
if ((0, _yuneta_gobj_js.gclass_find_by_name)(GCLASS_NAME$
|
|
9528
|
-
return create_gclass$
|
|
9527
|
+
if ((0, _yuneta_gobj_js.gclass_find_by_name)(GCLASS_NAME$17, false)) return 0;
|
|
9528
|
+
return create_gclass$17(GCLASS_NAME$17);
|
|
9529
9529
|
}
|
|
9530
9530
|
//#endregion
|
|
9531
9531
|
//#region src/lib_maplibre.js
|
|
@@ -9763,12 +9763,12 @@ function yui_maplibre_relocalize(map, t) {
|
|
|
9763
9763
|
/***************************************************************
|
|
9764
9764
|
* Constants
|
|
9765
9765
|
***************************************************************/
|
|
9766
|
-
var GCLASS_NAME$
|
|
9766
|
+
var GCLASS_NAME$16 = "C_YUI_MAP";
|
|
9767
9767
|
var GESTURE_HINT_MS = 2e3;
|
|
9768
9768
|
/***************************************************************
|
|
9769
9769
|
* Data
|
|
9770
9770
|
***************************************************************/
|
|
9771
|
-
var attrs_table$
|
|
9771
|
+
var attrs_table$16 = [
|
|
9772
9772
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
9773
9773
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_JSON, "devices", "[]", null, "List of devices"),
|
|
9774
9774
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_JSON, "map_settings", 0, {
|
|
@@ -9789,7 +9789,7 @@ var attrs_table$15 = [
|
|
|
9789
9789
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_INTEGER, "timeout_idle", 0, 5, "Idle timeout in seconds"),
|
|
9790
9790
|
(0, _yuneta_gobj_js.SDATA_END)()
|
|
9791
9791
|
];
|
|
9792
|
-
var PRIVATE_DATA$
|
|
9792
|
+
var PRIVATE_DATA$16 = {
|
|
9793
9793
|
xmap: null,
|
|
9794
9794
|
gesture_hint_timer: null,
|
|
9795
9795
|
geojson: null,
|
|
@@ -9799,21 +9799,21 @@ var PRIVATE_DATA$15 = {
|
|
|
9799
9799
|
markers: {},
|
|
9800
9800
|
draggedFeature: null
|
|
9801
9801
|
};
|
|
9802
|
-
var __gclass__$
|
|
9802
|
+
var __gclass__$16 = null;
|
|
9803
9803
|
/******************************
|
|
9804
9804
|
* Framework Methods
|
|
9805
9805
|
******************************/
|
|
9806
9806
|
/***************************************************************
|
|
9807
9807
|
* Framework Method: Create
|
|
9808
9808
|
***************************************************************/
|
|
9809
|
-
function mt_create$
|
|
9809
|
+
function mt_create$16(gobj) {
|
|
9810
9810
|
let priv = gobj.priv;
|
|
9811
9811
|
let subscriber = (0, _yuneta_gobj_js.gobj_read_pointer_attr)(gobj, "subscriber");
|
|
9812
9812
|
if (!subscriber) subscriber = (0, _yuneta_gobj_js.gobj_parent)(gobj);
|
|
9813
9813
|
(0, _yuneta_gobj_js.gobj_subscribe_event)(gobj, null, {}, subscriber);
|
|
9814
9814
|
let map_settings = (0, _yuneta_gobj_js.json_deep_copy)((0, _yuneta_gobj_js.gobj_read_attr)(gobj, "map_settings"));
|
|
9815
9815
|
let $map = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "$map");
|
|
9816
|
-
if ($map) $map.classList.add(GCLASS_NAME$
|
|
9816
|
+
if ($map) $map.classList.add(GCLASS_NAME$16);
|
|
9817
9817
|
Object.assign(map_settings, {
|
|
9818
9818
|
container: $map,
|
|
9819
9819
|
cooperativeGestures: true,
|
|
@@ -9892,7 +9892,7 @@ function ac_language_changed$9(gobj, event, kw, src) {
|
|
|
9892
9892
|
* in OUR dom -- cannot touch any of it. The shell says when the
|
|
9893
9893
|
* language changed and this view rewrites those strings.
|
|
9894
9894
|
***************************************************************/
|
|
9895
|
-
function mt_start$
|
|
9895
|
+
function mt_start$16(gobj) {
|
|
9896
9896
|
let shell = yui_shell_of(gobj);
|
|
9897
9897
|
if (shell) (0, _yuneta_gobj_js.gobj_subscribe_event)(shell, "EV_LANGUAGE_CHANGED", {}, gobj);
|
|
9898
9898
|
return 0;
|
|
@@ -9900,7 +9900,7 @@ function mt_start$15(gobj) {
|
|
|
9900
9900
|
/***************************************************************
|
|
9901
9901
|
* Framework Method: Stop
|
|
9902
9902
|
***************************************************************/
|
|
9903
|
-
function mt_stop$
|
|
9903
|
+
function mt_stop$16(gobj) {
|
|
9904
9904
|
let shell = yui_shell_of(gobj);
|
|
9905
9905
|
if (shell) (0, _yuneta_gobj_js.gobj_unsubscribe_event)(shell, "EV_LANGUAGE_CHANGED", {}, gobj);
|
|
9906
9906
|
return 0;
|
|
@@ -9908,7 +9908,7 @@ function mt_stop$15(gobj) {
|
|
|
9908
9908
|
/***************************************************************
|
|
9909
9909
|
* Framework Method: Destroy
|
|
9910
9910
|
***************************************************************/
|
|
9911
|
-
function mt_destroy$
|
|
9911
|
+
function mt_destroy$16(gobj) {
|
|
9912
9912
|
let priv = gobj.priv;
|
|
9913
9913
|
if (priv.gesture_hint_timer) {
|
|
9914
9914
|
clearTimeout(priv.gesture_hint_timer);
|
|
@@ -10372,21 +10372,21 @@ function ac_hide$10(gobj, event, kw, src) {
|
|
|
10372
10372
|
/***************************
|
|
10373
10373
|
* FSM
|
|
10374
10374
|
***************************/
|
|
10375
|
-
var gmt$
|
|
10376
|
-
mt_create: mt_create$
|
|
10377
|
-
mt_start: mt_start$
|
|
10378
|
-
mt_stop: mt_stop$
|
|
10379
|
-
mt_destroy: mt_destroy$
|
|
10375
|
+
var gmt$16 = {
|
|
10376
|
+
mt_create: mt_create$16,
|
|
10377
|
+
mt_start: mt_start$16,
|
|
10378
|
+
mt_stop: mt_stop$16,
|
|
10379
|
+
mt_destroy: mt_destroy$16
|
|
10380
10380
|
};
|
|
10381
10381
|
/***************************************************************
|
|
10382
10382
|
* Create the GClass
|
|
10383
10383
|
***************************************************************/
|
|
10384
|
-
function create_gclass$
|
|
10385
|
-
if (__gclass__$
|
|
10384
|
+
function create_gclass$16(gclass_name) {
|
|
10385
|
+
if (__gclass__$16) {
|
|
10386
10386
|
(0, _yuneta_gobj_js.log_error)(`GClass ALREADY created: ${gclass_name}`);
|
|
10387
10387
|
return -1;
|
|
10388
10388
|
}
|
|
10389
|
-
__gclass__$
|
|
10389
|
+
__gclass__$16 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, [
|
|
10390
10390
|
["EV_LANGUAGE_CHANGED", 0],
|
|
10391
10391
|
["EV_EDIT_MAP", 0],
|
|
10392
10392
|
["EV_CONTROL_MAP", 0],
|
|
@@ -10436,15 +10436,15 @@ function create_gclass$15(gclass_name) {
|
|
|
10436
10436
|
ac_hide$10,
|
|
10437
10437
|
null
|
|
10438
10438
|
]
|
|
10439
|
-
]]], gmt$
|
|
10440
|
-
if (!__gclass__$
|
|
10439
|
+
]]], gmt$16, 0, attrs_table$16, PRIVATE_DATA$16, 0, 0, 0, 0);
|
|
10440
|
+
if (!__gclass__$16) return -1;
|
|
10441
10441
|
return 0;
|
|
10442
10442
|
}
|
|
10443
10443
|
/***************************************************************
|
|
10444
10444
|
* Register GClass
|
|
10445
10445
|
***************************************************************/
|
|
10446
10446
|
function register_c_yui_map() {
|
|
10447
|
-
return create_gclass$
|
|
10447
|
+
return create_gclass$16(GCLASS_NAME$16);
|
|
10448
10448
|
}
|
|
10449
10449
|
//#endregion
|
|
10450
10450
|
//#region src/c_yui_uplot.js
|
|
@@ -10519,11 +10519,11 @@ function themed_axes(axes) {
|
|
|
10519
10519
|
/***************************************************************
|
|
10520
10520
|
* Constants
|
|
10521
10521
|
***************************************************************/
|
|
10522
|
-
var GCLASS_NAME$
|
|
10522
|
+
var GCLASS_NAME$15 = "C_YUI_UPLOT";
|
|
10523
10523
|
/***************************************************************
|
|
10524
10524
|
* Data
|
|
10525
10525
|
***************************************************************/
|
|
10526
|
-
var attrs_table$
|
|
10526
|
+
var attrs_table$15 = [
|
|
10527
10527
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
10528
10528
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "title", 0, "", "Chart title"),
|
|
10529
10529
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_INTEGER, "width", 0, 800, "Chart width"),
|
|
@@ -10541,16 +10541,16 @@ var attrs_table$14 = [
|
|
|
10541
10541
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_INTEGER, "timeout_idle", 0, 5, "Idle timeout (seconds)"),
|
|
10542
10542
|
(0, _yuneta_gobj_js.SDATA_END)()
|
|
10543
10543
|
];
|
|
10544
|
-
var PRIVATE_DATA$
|
|
10545
|
-
var __gclass__$
|
|
10544
|
+
var PRIVATE_DATA$15 = { theme_observer: null };
|
|
10545
|
+
var __gclass__$15 = null;
|
|
10546
10546
|
/******************************
|
|
10547
10547
|
* Framework Methods
|
|
10548
10548
|
******************************/
|
|
10549
10549
|
/***************************************************************
|
|
10550
10550
|
* Framework Method: Create
|
|
10551
10551
|
***************************************************************/
|
|
10552
|
-
function mt_create$
|
|
10553
|
-
build_ui$
|
|
10552
|
+
function mt_create$15(gobj) {
|
|
10553
|
+
build_ui$14(gobj);
|
|
10554
10554
|
gobj.priv.theme_observer = yui_watch_theme(gobj);
|
|
10555
10555
|
let subscriber = (0, _yuneta_gobj_js.gobj_read_pointer_attr)(gobj, "subscriber");
|
|
10556
10556
|
if (!subscriber) subscriber = (0, _yuneta_gobj_js.gobj_parent)(gobj);
|
|
@@ -10559,15 +10559,15 @@ function mt_create$14(gobj) {
|
|
|
10559
10559
|
/***************************************************************
|
|
10560
10560
|
* Framework Method: Start
|
|
10561
10561
|
***************************************************************/
|
|
10562
|
-
function mt_start$
|
|
10562
|
+
function mt_start$15(gobj) {}
|
|
10563
10563
|
/***************************************************************
|
|
10564
10564
|
* Framework Method: Stop
|
|
10565
10565
|
***************************************************************/
|
|
10566
|
-
function mt_stop$
|
|
10566
|
+
function mt_stop$15(gobj) {}
|
|
10567
10567
|
/***************************************************************
|
|
10568
10568
|
* Framework Method: Destroy
|
|
10569
10569
|
***************************************************************/
|
|
10570
|
-
function mt_destroy$
|
|
10570
|
+
function mt_destroy$15(gobj) {
|
|
10571
10571
|
if (gobj.priv.theme_observer) {
|
|
10572
10572
|
gobj.priv.theme_observer.disconnect();
|
|
10573
10573
|
gobj.priv.theme_observer = null;
|
|
@@ -10585,7 +10585,7 @@ function mt_destroy$14(gobj) {
|
|
|
10585
10585
|
/************************************************************
|
|
10586
10586
|
* Build UI
|
|
10587
10587
|
************************************************************/
|
|
10588
|
-
function build_ui$
|
|
10588
|
+
function build_ui$14(gobj) {
|
|
10589
10589
|
let $container = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "$container");
|
|
10590
10590
|
if (!$container) {
|
|
10591
10591
|
$container = (0, _yuneta_gobj_js.createElement2)(["div", {
|
|
@@ -10742,7 +10742,7 @@ function ac_del_serie(gobj, event, kw, src) {
|
|
|
10742
10742
|
/******************************************************
|
|
10743
10743
|
*
|
|
10744
10744
|
******************************************************/
|
|
10745
|
-
function ac_clear(gobj, event, kw, src) {
|
|
10745
|
+
function ac_clear$1(gobj, event, kw, src) {
|
|
10746
10746
|
let uplot$7 = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "uplot");
|
|
10747
10747
|
uplot$7.setData([[]]);
|
|
10748
10748
|
for (let idx = uplot$7.series.length - 1; idx > 0; idx--) uplot$7.delSeries(idx);
|
|
@@ -10751,21 +10751,21 @@ function ac_clear(gobj, event, kw, src) {
|
|
|
10751
10751
|
/***************************
|
|
10752
10752
|
* FSM
|
|
10753
10753
|
***************************/
|
|
10754
|
-
var gmt$
|
|
10755
|
-
mt_create: mt_create$
|
|
10756
|
-
mt_start: mt_start$
|
|
10757
|
-
mt_stop: mt_stop$
|
|
10758
|
-
mt_destroy: mt_destroy$
|
|
10754
|
+
var gmt$15 = {
|
|
10755
|
+
mt_create: mt_create$15,
|
|
10756
|
+
mt_start: mt_start$15,
|
|
10757
|
+
mt_stop: mt_stop$15,
|
|
10758
|
+
mt_destroy: mt_destroy$15
|
|
10759
10759
|
};
|
|
10760
10760
|
/***************************************************************
|
|
10761
10761
|
* Create the GClass
|
|
10762
10762
|
***************************************************************/
|
|
10763
|
-
function create_gclass$
|
|
10764
|
-
if (__gclass__$
|
|
10763
|
+
function create_gclass$15(gclass_name) {
|
|
10764
|
+
if (__gclass__$15) {
|
|
10765
10765
|
(0, _yuneta_gobj_js.log_error)(`GClass ALREADY created: ${gclass_name}`);
|
|
10766
10766
|
return -1;
|
|
10767
10767
|
}
|
|
10768
|
-
__gclass__$
|
|
10768
|
+
__gclass__$15 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, [
|
|
10769
10769
|
["EV_LOAD_DATA", 0],
|
|
10770
10770
|
["EV_ADD_SERIE", 0],
|
|
10771
10771
|
["EV_DEL_SERIE", 0],
|
|
@@ -10789,7 +10789,7 @@ function create_gclass$14(gclass_name) {
|
|
|
10789
10789
|
],
|
|
10790
10790
|
[
|
|
10791
10791
|
"EV_CLEAR",
|
|
10792
|
-
ac_clear,
|
|
10792
|
+
ac_clear$1,
|
|
10793
10793
|
null
|
|
10794
10794
|
],
|
|
10795
10795
|
[
|
|
@@ -10797,15 +10797,15 @@ function create_gclass$14(gclass_name) {
|
|
|
10797
10797
|
ac_theme$4,
|
|
10798
10798
|
null
|
|
10799
10799
|
]
|
|
10800
|
-
]]], gmt$
|
|
10801
|
-
if (!__gclass__$
|
|
10800
|
+
]]], gmt$15, 0, attrs_table$15, PRIVATE_DATA$15, 0, 0, 0, 0);
|
|
10801
|
+
if (!__gclass__$15) return -1;
|
|
10802
10802
|
return 0;
|
|
10803
10803
|
}
|
|
10804
10804
|
/***************************************************************
|
|
10805
10805
|
* Register GClass
|
|
10806
10806
|
***************************************************************/
|
|
10807
10807
|
function register_c_yui_uplot() {
|
|
10808
|
-
return create_gclass$
|
|
10808
|
+
return create_gclass$15(GCLASS_NAME$15);
|
|
10809
10809
|
}
|
|
10810
10810
|
//#endregion
|
|
10811
10811
|
//#region src/yui_toolbar.js
|
|
@@ -11895,7 +11895,7 @@ function ensure_drag_canvas_patch() {
|
|
|
11895
11895
|
/***************************************************************
|
|
11896
11896
|
* Constants
|
|
11897
11897
|
***************************************************************/
|
|
11898
|
-
var GCLASS_NAME$
|
|
11898
|
+
var GCLASS_NAME$14 = "C_YUI_JSON_GRAPH";
|
|
11899
11899
|
var FOLD_SWALLOWED_EVENTS$1 = [
|
|
11900
11900
|
"pointerdown",
|
|
11901
11901
|
"pointerup",
|
|
@@ -11955,7 +11955,7 @@ function layout_label(key) {
|
|
|
11955
11955
|
/***************************************************************
|
|
11956
11956
|
* Data
|
|
11957
11957
|
***************************************************************/
|
|
11958
|
-
var attrs_table$
|
|
11958
|
+
var attrs_table$14 = [
|
|
11959
11959
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
11960
11960
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "path", 0, "", "Root path label"),
|
|
11961
11961
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_JSON, "json_data", 0, null, "JSON data to visualize"),
|
|
@@ -11965,7 +11965,7 @@ var attrs_table$13 = [
|
|
|
11965
11965
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "layout", 0, "json-tree", "Layout key (see LAYOUTS)"),
|
|
11966
11966
|
(0, _yuneta_gobj_js.SDATA_END)()
|
|
11967
11967
|
];
|
|
11968
|
-
var PRIVATE_DATA$
|
|
11968
|
+
var PRIVATE_DATA$14 = {
|
|
11969
11969
|
canvas_id: "",
|
|
11970
11970
|
graph: null,
|
|
11971
11971
|
node_counter: 0,
|
|
@@ -11990,7 +11990,7 @@ var PRIVATE_DATA$13 = {
|
|
|
11990
11990
|
center_posted: false,
|
|
11991
11991
|
pending_keep: null
|
|
11992
11992
|
};
|
|
11993
|
-
var __gclass__$
|
|
11993
|
+
var __gclass__$14 = null;
|
|
11994
11994
|
var __layout_registered__$1 = false;
|
|
11995
11995
|
/***************************************************************
|
|
11996
11996
|
* Type colours, ONE EXPLICIT PALETTE PER THEME and not a
|
|
@@ -12095,7 +12095,7 @@ function type_color(type, dark) {
|
|
|
12095
12095
|
/***************************************************************
|
|
12096
12096
|
* Framework Method: Create
|
|
12097
12097
|
***************************************************************/
|
|
12098
|
-
function mt_create$
|
|
12098
|
+
function mt_create$14(gobj) {
|
|
12099
12099
|
let priv = gobj.priv;
|
|
12100
12100
|
priv.collapsed = /* @__PURE__ */ new Set();
|
|
12101
12101
|
priv.reserved = /* @__PURE__ */ new Map();
|
|
@@ -12107,7 +12107,7 @@ function mt_create$13(gobj) {
|
|
|
12107
12107
|
(0, _yuneta_gobj_js.gobj_subscribe_event)(gobj, null, {}, subscriber);
|
|
12108
12108
|
priv.theme = yui_theme_now();
|
|
12109
12109
|
priv.theme_observer = yui_watch_theme(gobj);
|
|
12110
|
-
build_ui$
|
|
12110
|
+
build_ui$13(gobj);
|
|
12111
12111
|
ensure_drag_canvas_patch();
|
|
12112
12112
|
ensure_pinch_zoom_patch();
|
|
12113
12113
|
if (!__layout_registered__$1) {
|
|
@@ -12118,18 +12118,18 @@ function mt_create$13(gobj) {
|
|
|
12118
12118
|
/***************************************************************
|
|
12119
12119
|
* Framework Method: Start
|
|
12120
12120
|
***************************************************************/
|
|
12121
|
-
function mt_start$
|
|
12121
|
+
function mt_start$14(gobj) {
|
|
12122
12122
|
build_graph$4(gobj);
|
|
12123
12123
|
load_json(gobj);
|
|
12124
12124
|
}
|
|
12125
12125
|
/***************************************************************
|
|
12126
12126
|
* Framework Method: Stop
|
|
12127
12127
|
***************************************************************/
|
|
12128
|
-
function mt_stop$
|
|
12128
|
+
function mt_stop$14(gobj) {}
|
|
12129
12129
|
/***************************************************************
|
|
12130
12130
|
* Framework Method: Destroy
|
|
12131
12131
|
***************************************************************/
|
|
12132
|
-
function mt_destroy$
|
|
12132
|
+
function mt_destroy$14(gobj) {
|
|
12133
12133
|
if (gobj.priv.find_timer) {
|
|
12134
12134
|
clearTimeout(gobj.priv.find_timer);
|
|
12135
12135
|
gobj.priv.find_timer = null;
|
|
@@ -12159,7 +12159,7 @@ function mt_destroy$13(gobj) {
|
|
|
12159
12159
|
/************************************************************
|
|
12160
12160
|
* Build UI
|
|
12161
12161
|
************************************************************/
|
|
12162
|
-
function build_ui$
|
|
12162
|
+
function build_ui$13(gobj) {
|
|
12163
12163
|
let priv = gobj.priv;
|
|
12164
12164
|
let $toolbar = make_toolbar$5(gobj);
|
|
12165
12165
|
let $container = (0, _yuneta_gobj_js.createElement2)([
|
|
@@ -13381,17 +13381,17 @@ function ac_hide$9(gobj, event, kw, src) {
|
|
|
13381
13381
|
/***************************
|
|
13382
13382
|
* FSM
|
|
13383
13383
|
***************************/
|
|
13384
|
-
var gmt$
|
|
13385
|
-
mt_create: mt_create$
|
|
13386
|
-
mt_start: mt_start$
|
|
13387
|
-
mt_stop: mt_stop$
|
|
13388
|
-
mt_destroy: mt_destroy$
|
|
13384
|
+
var gmt$14 = {
|
|
13385
|
+
mt_create: mt_create$14,
|
|
13386
|
+
mt_start: mt_start$14,
|
|
13387
|
+
mt_stop: mt_stop$14,
|
|
13388
|
+
mt_destroy: mt_destroy$14
|
|
13389
13389
|
};
|
|
13390
13390
|
/***************************************************************
|
|
13391
13391
|
* Create the GClass
|
|
13392
13392
|
***************************************************************/
|
|
13393
|
-
function create_gclass$
|
|
13394
|
-
if (__gclass__$
|
|
13393
|
+
function create_gclass$14(gclass_name) {
|
|
13394
|
+
if (__gclass__$14) {
|
|
13395
13395
|
(0, _yuneta_gobj_js.log_error)(`GClass ALREADY created: ${gclass_name}`);
|
|
13396
13396
|
return -1;
|
|
13397
13397
|
}
|
|
@@ -13508,16 +13508,16 @@ function create_gclass$13(gclass_name) {
|
|
|
13508
13508
|
["EV_HIDE", 0],
|
|
13509
13509
|
["EV_JSON_ITEM_CLICKED", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT]
|
|
13510
13510
|
];
|
|
13511
|
-
__gclass__$
|
|
13512
|
-
if (!__gclass__$
|
|
13511
|
+
__gclass__$14 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, event_types, states, gmt$14, 0, attrs_table$14, PRIVATE_DATA$14, 0, 0, 0, 0);
|
|
13512
|
+
if (!__gclass__$14) return -1;
|
|
13513
13513
|
return 0;
|
|
13514
13514
|
}
|
|
13515
13515
|
/***************************************************************
|
|
13516
13516
|
* Register GClass
|
|
13517
13517
|
***************************************************************/
|
|
13518
13518
|
function register_c_yui_json_graph() {
|
|
13519
|
-
if ((0, _yuneta_gobj_js.gclass_find_by_name)(GCLASS_NAME$
|
|
13520
|
-
return create_gclass$
|
|
13519
|
+
if ((0, _yuneta_gobj_js.gclass_find_by_name)(GCLASS_NAME$14, false)) return 0;
|
|
13520
|
+
return create_gclass$14(GCLASS_NAME$14);
|
|
13521
13521
|
}
|
|
13522
13522
|
//#endregion
|
|
13523
13523
|
//#region src/c_yui_json.js
|
|
@@ -13582,7 +13582,7 @@ function register_c_yui_json_graph() {
|
|
|
13582
13582
|
/***************************************************************
|
|
13583
13583
|
* Constants
|
|
13584
13584
|
***************************************************************/
|
|
13585
|
-
var GCLASS_NAME$
|
|
13585
|
+
var GCLASS_NAME$13 = "C_YUI_JSON";
|
|
13586
13586
|
var MAX_RENDER_ROWS = 5e3;
|
|
13587
13587
|
var MAX_TEXT_CHARS = 2e6;
|
|
13588
13588
|
var MAX_LABEL_CHARS = 40;
|
|
@@ -13607,7 +13607,7 @@ var VIEW_MODE_STORAGE_KEY = "yui_json_view_mode";
|
|
|
13607
13607
|
/***************************************************************
|
|
13608
13608
|
* Data
|
|
13609
13609
|
***************************************************************/
|
|
13610
|
-
var attrs_table$
|
|
13610
|
+
var attrs_table$13 = [
|
|
13611
13611
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
13612
13612
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "title", 0, "", "Optional header title (i18n key)"),
|
|
13613
13613
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_JSON, "json_data", 0, null, "Initial JSON to render (usually already collapsed)"),
|
|
@@ -13615,7 +13615,7 @@ var attrs_table$12 = [
|
|
|
13615
13615
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "$container", 0, null, "HTMLElement root, mounted by the parent"),
|
|
13616
13616
|
(0, _yuneta_gobj_js.SDATA_END)()
|
|
13617
13617
|
];
|
|
13618
|
-
var PRIVATE_DATA$
|
|
13618
|
+
var PRIVATE_DATA$13 = {
|
|
13619
13619
|
root: null,
|
|
13620
13620
|
expanded: null,
|
|
13621
13621
|
pending: null,
|
|
@@ -13632,14 +13632,14 @@ var PRIVATE_DATA$12 = {
|
|
|
13632
13632
|
$collapse_btn: null,
|
|
13633
13633
|
$mode_btns: null
|
|
13634
13634
|
};
|
|
13635
|
-
var __gclass__$
|
|
13635
|
+
var __gclass__$13 = null;
|
|
13636
13636
|
/******************************
|
|
13637
13637
|
* Framework Methods
|
|
13638
13638
|
******************************/
|
|
13639
13639
|
/***************************************************************
|
|
13640
13640
|
* Framework Method: Create
|
|
13641
13641
|
***************************************************************/
|
|
13642
|
-
function mt_create$
|
|
13642
|
+
function mt_create$13(gobj) {
|
|
13643
13643
|
let priv = gobj.priv;
|
|
13644
13644
|
priv.expanded = /* @__PURE__ */ new Set();
|
|
13645
13645
|
priv.pending = /* @__PURE__ */ new Set();
|
|
@@ -13647,7 +13647,7 @@ function mt_create$12(gobj) {
|
|
|
13647
13647
|
priv.search = "";
|
|
13648
13648
|
let json_data = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "json_data");
|
|
13649
13649
|
if (json_data !== null && json_data !== void 0) priv.root = (0, _yuneta_gobj_js.json_deep_copy)(json_data);
|
|
13650
|
-
build_ui$
|
|
13650
|
+
build_ui$12(gobj);
|
|
13651
13651
|
resolve_initial_view_mode(gobj);
|
|
13652
13652
|
apply_view_mode$1(gobj);
|
|
13653
13653
|
let subscriber = (0, _yuneta_gobj_js.gobj_read_pointer_attr)(gobj, "subscriber");
|
|
@@ -13657,19 +13657,19 @@ function mt_create$12(gobj) {
|
|
|
13657
13657
|
/***************************************************************
|
|
13658
13658
|
* Framework Method: Start
|
|
13659
13659
|
***************************************************************/
|
|
13660
|
-
function mt_start$
|
|
13660
|
+
function mt_start$13(gobj) {
|
|
13661
13661
|
render_view$1(gobj);
|
|
13662
13662
|
}
|
|
13663
13663
|
/***************************************************************
|
|
13664
13664
|
* Framework Method: Stop
|
|
13665
13665
|
***************************************************************/
|
|
13666
|
-
function mt_stop$
|
|
13666
|
+
function mt_stop$13(gobj) {
|
|
13667
13667
|
teardown_graph_child$1(gobj);
|
|
13668
13668
|
}
|
|
13669
13669
|
/***************************************************************
|
|
13670
13670
|
* Framework Method: Destroy
|
|
13671
13671
|
***************************************************************/
|
|
13672
|
-
function mt_destroy$
|
|
13672
|
+
function mt_destroy$13(gobj) {
|
|
13673
13673
|
destroy_ui$7(gobj);
|
|
13674
13674
|
}
|
|
13675
13675
|
/***************************
|
|
@@ -13678,7 +13678,7 @@ function mt_destroy$12(gobj) {
|
|
|
13678
13678
|
/************************************************************
|
|
13679
13679
|
* Build UI
|
|
13680
13680
|
************************************************************/
|
|
13681
|
-
function build_ui$
|
|
13681
|
+
function build_ui$12(gobj) {
|
|
13682
13682
|
let priv = gobj.priv;
|
|
13683
13683
|
let $toolbar = make_toolbar$4(gobj);
|
|
13684
13684
|
let $container = (0, _yuneta_gobj_js.createElement2)([
|
|
@@ -14073,7 +14073,7 @@ function render_text(gobj) {
|
|
|
14073
14073
|
return;
|
|
14074
14074
|
}
|
|
14075
14075
|
let dump = json_text_dump(priv.root, MAX_TEXT_CHARS);
|
|
14076
|
-
if (dump.error) (0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$
|
|
14076
|
+
if (dump.error) (0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$13}: cannot dump the document as text: ${dump.error}`);
|
|
14077
14077
|
let $pre = (0, _yuneta_gobj_js.createElement2)([
|
|
14078
14078
|
"pre",
|
|
14079
14079
|
{ class: "JSON_TEXT_BODY" },
|
|
@@ -14456,7 +14456,7 @@ function ac_subtree_error(gobj, event, kw, src) {
|
|
|
14456
14456
|
let path = kw.path || "";
|
|
14457
14457
|
priv.pending.delete(path);
|
|
14458
14458
|
priv.errors.set(path, kw.error || "error");
|
|
14459
|
-
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$
|
|
14459
|
+
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$13}: subtree load failed at '${path}': ${kw.error || ""}`);
|
|
14460
14460
|
render_view$1(gobj);
|
|
14461
14461
|
return 0;
|
|
14462
14462
|
}
|
|
@@ -14531,14 +14531,14 @@ function ac_copy_all$1(gobj, event, kw, src) {
|
|
|
14531
14531
|
if (priv.root === null || priv.root === void 0) return 0;
|
|
14532
14532
|
let dump = json_text_dump(priv.root, 0);
|
|
14533
14533
|
if (dump.error) {
|
|
14534
|
-
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$
|
|
14534
|
+
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$13}: cannot copy the document: ${dump.error}`);
|
|
14535
14535
|
return -1;
|
|
14536
14536
|
}
|
|
14537
14537
|
let text = dump.text;
|
|
14538
14538
|
if (navigator.clipboard && navigator.clipboard.writeText) navigator.clipboard.writeText(text).catch(function(e) {
|
|
14539
|
-
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$
|
|
14539
|
+
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$13}: clipboard write failed: ${e}`);
|
|
14540
14540
|
});
|
|
14541
|
-
else (0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$
|
|
14541
|
+
else (0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$13}: clipboard API unavailable`);
|
|
14542
14542
|
return 0;
|
|
14543
14543
|
}
|
|
14544
14544
|
/************************************************************
|
|
@@ -14554,7 +14554,7 @@ function ac_set_view_mode$1(gobj, event, kw, src) {
|
|
|
14554
14554
|
let mode = kw.mode;
|
|
14555
14555
|
if (mode === void 0 || mode === null || mode === "") mode = VIEWS$1[(VIEWS$1.findIndex((v) => v.mode === current_view_mode$1(gobj)) + 1) % VIEWS$1.length].mode;
|
|
14556
14556
|
else if (!VIEWS$1.some((v) => v.mode === mode)) {
|
|
14557
|
-
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$
|
|
14557
|
+
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$13}: unknown view_mode '${mode}'`);
|
|
14558
14558
|
return -1;
|
|
14559
14559
|
}
|
|
14560
14560
|
if (mode === current_view_mode$1(gobj)) return 0;
|
|
@@ -14620,17 +14620,17 @@ function ac_refresh$5(gobj, event, kw, src) {
|
|
|
14620
14620
|
/***************************
|
|
14621
14621
|
* FSM
|
|
14622
14622
|
***************************/
|
|
14623
|
-
var gmt$
|
|
14624
|
-
mt_create: mt_create$
|
|
14625
|
-
mt_start: mt_start$
|
|
14626
|
-
mt_stop: mt_stop$
|
|
14627
|
-
mt_destroy: mt_destroy$
|
|
14623
|
+
var gmt$13 = {
|
|
14624
|
+
mt_create: mt_create$13,
|
|
14625
|
+
mt_start: mt_start$13,
|
|
14626
|
+
mt_stop: mt_stop$13,
|
|
14627
|
+
mt_destroy: mt_destroy$13
|
|
14628
14628
|
};
|
|
14629
14629
|
/***************************************************************
|
|
14630
14630
|
* Create the GClass
|
|
14631
14631
|
***************************************************************/
|
|
14632
|
-
function create_gclass$
|
|
14633
|
-
if (__gclass__$
|
|
14632
|
+
function create_gclass$13(gclass_name) {
|
|
14633
|
+
if (__gclass__$13) {
|
|
14634
14634
|
(0, _yuneta_gobj_js.log_error)(`GClass ALREADY created: ${gclass_name}`);
|
|
14635
14635
|
return -1;
|
|
14636
14636
|
}
|
|
@@ -14760,16 +14760,389 @@ function create_gclass$12(gclass_name) {
|
|
|
14760
14760
|
["EV_HIDE", 0],
|
|
14761
14761
|
["EV_EXPAND_PATH", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT | _yuneta_gobj_js.event_flag_t.EVF_NO_WARN_SUBS]
|
|
14762
14762
|
];
|
|
14763
|
-
__gclass__$
|
|
14764
|
-
if (!__gclass__$
|
|
14763
|
+
__gclass__$13 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, event_types, states, gmt$13, 0, attrs_table$13, PRIVATE_DATA$13, 0, 0, 0, 0);
|
|
14764
|
+
if (!__gclass__$13) return -1;
|
|
14765
14765
|
return 0;
|
|
14766
14766
|
}
|
|
14767
14767
|
/***************************************************************
|
|
14768
14768
|
* Register GClass
|
|
14769
14769
|
***************************************************************/
|
|
14770
14770
|
function register_c_yui_json() {
|
|
14771
|
-
if ((0, _yuneta_gobj_js.gclass_find_by_name)(GCLASS_NAME$
|
|
14771
|
+
if ((0, _yuneta_gobj_js.gclass_find_by_name)(GCLASS_NAME$13, false)) return 0;
|
|
14772
14772
|
if (!(0, _yuneta_gobj_js.gclass_find_by_name)("C_YUI_JSON_GRAPH", false)) register_c_yui_json_graph();
|
|
14773
|
+
return create_gclass$13(GCLASS_NAME$13);
|
|
14774
|
+
}
|
|
14775
|
+
//#endregion
|
|
14776
|
+
//#region src/c_yui_json_pad.js
|
|
14777
|
+
/***********************************************************************
|
|
14778
|
+
* c_yui_json_pad.js
|
|
14779
|
+
*
|
|
14780
|
+
* C_YUI_JSON_PAD -- a pad to paste JSON from OUTSIDE and read it
|
|
14781
|
+
* with the library's own viewer.
|
|
14782
|
+
*
|
|
14783
|
+
* The viewer (C_YUI_JSON: the lazy tree, the raw text and the
|
|
14784
|
+
* graph) only ever showed what an app fetched. A JSON that came
|
|
14785
|
+
* from anywhere else -- a log line, a config file, an answer copied
|
|
14786
|
+
* from a terminal -- had to be read in whatever the operator had
|
|
14787
|
+
* at hand. This is the blank page for it: paste, and read it the
|
|
14788
|
+
* way every other document of the app is read.
|
|
14789
|
+
*
|
|
14790
|
+
* DOM (UPPER_SNAKE logical classes):
|
|
14791
|
+
*
|
|
14792
|
+
* JSON_PAD the root
|
|
14793
|
+
* JSON_PAD_BAR the text area and its two buttons
|
|
14794
|
+
* JSON_PAD_INPUT where the text goes
|
|
14795
|
+
* JSON_PAD_VIEW read what is in the text area
|
|
14796
|
+
* JSON_PAD_CLEAR empty the pad
|
|
14797
|
+
* JSON_PAD_ERROR "invalid JSON" and the parser's reason
|
|
14798
|
+
* JSON_PAD_BODY the C_YUI_JSON child
|
|
14799
|
+
*
|
|
14800
|
+
* Every way in is an event:
|
|
14801
|
+
*
|
|
14802
|
+
* EV_PASTE {text} a paste ANYWHERE in the pad replaces the
|
|
14803
|
+
* document and shows it at once -- there
|
|
14804
|
+
* is one document here, not a text to edit
|
|
14805
|
+
* EV_VIEW the text area as it is (typed, or edited
|
|
14806
|
+
* after a paste); also Ctrl+Enter
|
|
14807
|
+
* EV_CLEAR back to the blank pad
|
|
14808
|
+
*
|
|
14809
|
+
* FSM: ST_EMPTY (nothing shown) and ST_SHOWING. EV_EXPAND_PATH,
|
|
14810
|
+
* which the viewer publishes when a `__collapsed__` sentinel is
|
|
14811
|
+
* opened, only exists in ST_SHOWING, and is answered with
|
|
14812
|
+
* EV_SUBTREE_ERROR: a pasted document has no backend to fetch the
|
|
14813
|
+
* rest from -- the source truncated it, and the pad says so.
|
|
14814
|
+
*
|
|
14815
|
+
* Hosted by setup_json_pad() (yui_json_pad.js) in a C_YUI_WINDOW;
|
|
14816
|
+
* any host can mount `$container` itself.
|
|
14817
|
+
*
|
|
14818
|
+
* Copyright (c) 2026, ArtGins.
|
|
14819
|
+
* All Rights Reserved.
|
|
14820
|
+
***********************************************************************/
|
|
14821
|
+
/***************************************************************
|
|
14822
|
+
* Constants
|
|
14823
|
+
***************************************************************/
|
|
14824
|
+
var GCLASS_NAME$12 = "C_YUI_JSON_PAD";
|
|
14825
|
+
/***************************************************************
|
|
14826
|
+
* Data
|
|
14827
|
+
***************************************************************/
|
|
14828
|
+
var attrs_table$12 = [
|
|
14829
|
+
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
14830
|
+
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "$container", 0, null, "HTMLElement root, mounted by the host"),
|
|
14831
|
+
(0, _yuneta_gobj_js.SDATA_END)()
|
|
14832
|
+
];
|
|
14833
|
+
var PRIVATE_DATA$12 = {
|
|
14834
|
+
$input: null,
|
|
14835
|
+
$error: null,
|
|
14836
|
+
$reason: null,
|
|
14837
|
+
gobj_json: null
|
|
14838
|
+
};
|
|
14839
|
+
var __gclass__$12 = null;
|
|
14840
|
+
/******************************
|
|
14841
|
+
* Framework Methods
|
|
14842
|
+
******************************/
|
|
14843
|
+
/***************************************************************
|
|
14844
|
+
* Framework Method: Create
|
|
14845
|
+
***************************************************************/
|
|
14846
|
+
function mt_create$12(gobj) {
|
|
14847
|
+
let priv = gobj.priv;
|
|
14848
|
+
let subscriber = (0, _yuneta_gobj_js.gobj_read_pointer_attr)(gobj, "subscriber");
|
|
14849
|
+
if (!subscriber) subscriber = (0, _yuneta_gobj_js.gobj_parent)(gobj);
|
|
14850
|
+
(0, _yuneta_gobj_js.gobj_subscribe_event)(gobj, null, {}, subscriber);
|
|
14851
|
+
build_ui$11(gobj);
|
|
14852
|
+
priv.gobj_json = (0, _yuneta_gobj_js.gobj_create_pure_child)("json_pad_view", "C_YUI_JSON", {}, gobj);
|
|
14853
|
+
let $view = (0, _yuneta_gobj_js.gobj_read_attr)(priv.gobj_json, "$container");
|
|
14854
|
+
if (!$view) {
|
|
14855
|
+
(0, _yuneta_gobj_js.log_error)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)}: C_YUI_JSON without $container`);
|
|
14856
|
+
return;
|
|
14857
|
+
}
|
|
14858
|
+
(0, _yuneta_gobj_js.gobj_read_attr)(gobj, "$container").querySelector(".JSON_PAD_BODY").appendChild($view);
|
|
14859
|
+
}
|
|
14860
|
+
/***************************************************************
|
|
14861
|
+
* Framework Method: Start
|
|
14862
|
+
***************************************************************/
|
|
14863
|
+
function mt_start$12(gobj) {
|
|
14864
|
+
let priv = gobj.priv;
|
|
14865
|
+
if (priv.gobj_json) (0, _yuneta_gobj_js.gobj_start)(priv.gobj_json);
|
|
14866
|
+
if (priv.$input) priv.$input.focus();
|
|
14867
|
+
}
|
|
14868
|
+
/***************************************************************
|
|
14869
|
+
* Framework Method: Stop
|
|
14870
|
+
***************************************************************/
|
|
14871
|
+
function mt_stop$12(gobj) {
|
|
14872
|
+
let priv = gobj.priv;
|
|
14873
|
+
if (priv.gobj_json && (0, _yuneta_gobj_js.gobj_is_running)(priv.gobj_json)) (0, _yuneta_gobj_js.gobj_stop)(priv.gobj_json);
|
|
14874
|
+
}
|
|
14875
|
+
/***************************************************************
|
|
14876
|
+
* Framework Method: Destroy
|
|
14877
|
+
***************************************************************/
|
|
14878
|
+
function mt_destroy$12(gobj) {}
|
|
14879
|
+
/***************************
|
|
14880
|
+
* Local Methods
|
|
14881
|
+
***************************/
|
|
14882
|
+
/***************************************************************
|
|
14883
|
+
* The pad: the text area and its buttons, the error line, and
|
|
14884
|
+
* the body the viewer is mounted in.
|
|
14885
|
+
***************************************************************/
|
|
14886
|
+
function build_ui$11(gobj) {
|
|
14887
|
+
let priv = gobj.priv;
|
|
14888
|
+
let button = (cls, icon, key, event_name) => {
|
|
14889
|
+
return [
|
|
14890
|
+
"button",
|
|
14891
|
+
{
|
|
14892
|
+
class: `${cls} button`,
|
|
14893
|
+
type: "button",
|
|
14894
|
+
title: (0, i18next.t)(key),
|
|
14895
|
+
"data-i18n-title": key,
|
|
14896
|
+
"aria-label": (0, i18next.t)(key),
|
|
14897
|
+
"data-i18n-aria-label": key
|
|
14898
|
+
},
|
|
14899
|
+
[yui_toolbar_icon(icon), [
|
|
14900
|
+
"span",
|
|
14901
|
+
{
|
|
14902
|
+
style: "padding-left:5px;",
|
|
14903
|
+
i18n: key
|
|
14904
|
+
},
|
|
14905
|
+
key
|
|
14906
|
+
]],
|
|
14907
|
+
{ click: (evt) => {
|
|
14908
|
+
evt.stopPropagation();
|
|
14909
|
+
(0, _yuneta_gobj_js.gobj_send_event)(gobj, event_name, {}, gobj);
|
|
14910
|
+
} }
|
|
14911
|
+
];
|
|
14912
|
+
};
|
|
14913
|
+
priv.$input = (0, _yuneta_gobj_js.createElement2)([
|
|
14914
|
+
"textarea",
|
|
14915
|
+
{
|
|
14916
|
+
class: "JSON_PAD_INPUT textarea",
|
|
14917
|
+
rows: 3,
|
|
14918
|
+
spellcheck: "false",
|
|
14919
|
+
placeholder: (0, i18next.t)("paste json here"),
|
|
14920
|
+
"data-i18n-placeholder": "paste json here",
|
|
14921
|
+
title: (0, i18next.t)("paste json here"),
|
|
14922
|
+
"data-i18n-title": "paste json here",
|
|
14923
|
+
"aria-label": (0, i18next.t)("paste json here"),
|
|
14924
|
+
"data-i18n-aria-label": "paste json here",
|
|
14925
|
+
style: "font-family:monospace; resize:vertical; min-height:4.5em;"
|
|
14926
|
+
},
|
|
14927
|
+
"",
|
|
14928
|
+
{ keydown: (evt) => {
|
|
14929
|
+
if ((evt.ctrlKey || evt.metaKey) && evt.key === "Enter") {
|
|
14930
|
+
evt.preventDefault();
|
|
14931
|
+
(0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_VIEW", {}, gobj);
|
|
14932
|
+
}
|
|
14933
|
+
} }
|
|
14934
|
+
]);
|
|
14935
|
+
priv.$reason = (0, _yuneta_gobj_js.createElement2)([
|
|
14936
|
+
"span",
|
|
14937
|
+
{
|
|
14938
|
+
class: "JSON_PAD_ERROR_REASON",
|
|
14939
|
+
style: "margin-left:.5em; font-family:monospace;"
|
|
14940
|
+
},
|
|
14941
|
+
""
|
|
14942
|
+
]);
|
|
14943
|
+
priv.$error = (0, _yuneta_gobj_js.createElement2)([
|
|
14944
|
+
"div",
|
|
14945
|
+
{
|
|
14946
|
+
class: "JSON_PAD_ERROR is-hidden has-text-danger is-size-7",
|
|
14947
|
+
role: "alert"
|
|
14948
|
+
},
|
|
14949
|
+
[[
|
|
14950
|
+
"span",
|
|
14951
|
+
{
|
|
14952
|
+
class: "JSON_PAD_ERROR_LABEL",
|
|
14953
|
+
style: "font-weight:600;",
|
|
14954
|
+
i18n: "invalid json"
|
|
14955
|
+
},
|
|
14956
|
+
"invalid json"
|
|
14957
|
+
], priv.$reason]
|
|
14958
|
+
]);
|
|
14959
|
+
let $container = (0, _yuneta_gobj_js.createElement2)([
|
|
14960
|
+
"div",
|
|
14961
|
+
{
|
|
14962
|
+
class: "C_YUI_JSON_PAD JSON_PAD",
|
|
14963
|
+
style: "height:100%; display:flex; flex-direction:column; gap:.5rem; padding:.5rem;"
|
|
14964
|
+
},
|
|
14965
|
+
[
|
|
14966
|
+
[
|
|
14967
|
+
"div",
|
|
14968
|
+
{
|
|
14969
|
+
class: "JSON_PAD_BAR",
|
|
14970
|
+
style: "display:flex; gap:.5rem; align-items:flex-start;"
|
|
14971
|
+
},
|
|
14972
|
+
[[
|
|
14973
|
+
"div",
|
|
14974
|
+
{ style: "flex:1 1 auto; min-width:0;" },
|
|
14975
|
+
[priv.$input]
|
|
14976
|
+
], [
|
|
14977
|
+
"div",
|
|
14978
|
+
{ style: "flex:0 0 auto; display:flex; flex-direction:column; gap:.5rem;" },
|
|
14979
|
+
[button("JSON_PAD_VIEW", "yi-eye", "view", "EV_VIEW"), button("JSON_PAD_CLEAR", "yi-broom", "clear", "EV_CLEAR")]
|
|
14980
|
+
]]
|
|
14981
|
+
],
|
|
14982
|
+
priv.$error,
|
|
14983
|
+
[
|
|
14984
|
+
"div",
|
|
14985
|
+
{
|
|
14986
|
+
class: "JSON_PAD_BODY",
|
|
14987
|
+
style: "flex:1 1 auto; min-height:0; display:flex; flex-direction:column;"
|
|
14988
|
+
},
|
|
14989
|
+
[]
|
|
14990
|
+
]
|
|
14991
|
+
],
|
|
14992
|
+
{ paste: (evt) => {
|
|
14993
|
+
let text = evt.clipboardData ? evt.clipboardData.getData("text") : "";
|
|
14994
|
+
if (!text) return;
|
|
14995
|
+
evt.preventDefault();
|
|
14996
|
+
(0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_PASTE", { text }, gobj);
|
|
14997
|
+
} }
|
|
14998
|
+
]);
|
|
14999
|
+
(0, _yuneta_gobj_js.gobj_write_attr)(gobj, "$container", $container);
|
|
15000
|
+
}
|
|
15001
|
+
/***************************************************************
|
|
15002
|
+
* Read `text` as JSON and show it, or say why it is not.
|
|
15003
|
+
***************************************************************/
|
|
15004
|
+
function show_text(gobj, text) {
|
|
15005
|
+
let priv = gobj.priv;
|
|
15006
|
+
let src = String(text || "").trim();
|
|
15007
|
+
if (!src) {
|
|
15008
|
+
clear_pad(gobj, false);
|
|
15009
|
+
return 0;
|
|
15010
|
+
}
|
|
15011
|
+
let doc;
|
|
15012
|
+
try {
|
|
15013
|
+
doc = JSON.parse(src);
|
|
15014
|
+
} catch (e) {
|
|
15015
|
+
(0, _yuneta_gobj_js.log_warning)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)}: the pasted text is not JSON: ${e.message}`);
|
|
15016
|
+
priv.$reason.textContent = e.message;
|
|
15017
|
+
priv.$error.classList.remove("is-hidden");
|
|
15018
|
+
return -1;
|
|
15019
|
+
}
|
|
15020
|
+
priv.$error.classList.add("is-hidden");
|
|
15021
|
+
priv.$reason.textContent = "";
|
|
15022
|
+
(0, _yuneta_gobj_js.gobj_send_event)(priv.gobj_json, "EV_SET_JSON", { json: doc }, gobj);
|
|
15023
|
+
(0, _yuneta_gobj_js.gobj_change_state)(gobj, "ST_SHOWING");
|
|
15024
|
+
return 0;
|
|
15025
|
+
}
|
|
15026
|
+
/***************************************************************
|
|
15027
|
+
* Back to the blank pad; `with_text` empties the text area too.
|
|
15028
|
+
***************************************************************/
|
|
15029
|
+
function clear_pad(gobj, with_text) {
|
|
15030
|
+
let priv = gobj.priv;
|
|
15031
|
+
if (with_text) priv.$input.value = "";
|
|
15032
|
+
priv.$error.classList.add("is-hidden");
|
|
15033
|
+
priv.$reason.textContent = "";
|
|
15034
|
+
(0, _yuneta_gobj_js.gobj_send_event)(priv.gobj_json, "EV_SET_JSON", { json: null }, gobj);
|
|
15035
|
+
(0, _yuneta_gobj_js.gobj_change_state)(gobj, "ST_EMPTY");
|
|
15036
|
+
}
|
|
15037
|
+
/***************************
|
|
15038
|
+
* Actions
|
|
15039
|
+
***************************/
|
|
15040
|
+
/***************************************************************
|
|
15041
|
+
* A paste: it becomes the text area and the document at once.
|
|
15042
|
+
***************************************************************/
|
|
15043
|
+
function ac_paste(gobj, event, kw, src) {
|
|
15044
|
+
let priv = gobj.priv;
|
|
15045
|
+
let text = kw && typeof kw.text === "string" ? kw.text : "";
|
|
15046
|
+
priv.$input.value = text;
|
|
15047
|
+
return show_text(gobj, text);
|
|
15048
|
+
}
|
|
15049
|
+
/***************************************************************
|
|
15050
|
+
* The text area as it is now.
|
|
15051
|
+
***************************************************************/
|
|
15052
|
+
function ac_view(gobj, event, kw, src) {
|
|
15053
|
+
let priv = gobj.priv;
|
|
15054
|
+
return show_text(gobj, priv.$input.value);
|
|
15055
|
+
}
|
|
15056
|
+
/***************************************************************
|
|
15057
|
+
* The blank pad again.
|
|
15058
|
+
***************************************************************/
|
|
15059
|
+
function ac_clear(gobj, event, kw, src) {
|
|
15060
|
+
let priv = gobj.priv;
|
|
15061
|
+
clear_pad(gobj, true);
|
|
15062
|
+
priv.$input.focus();
|
|
15063
|
+
return 0;
|
|
15064
|
+
}
|
|
15065
|
+
/***************************************************************
|
|
15066
|
+
* The viewer asks for a `__collapsed__` subtree. A pasted
|
|
15067
|
+
* document has no backend to ask for it: the SOURCE truncated
|
|
15068
|
+
* it, and that is the answer.
|
|
15069
|
+
***************************************************************/
|
|
15070
|
+
function ac_expand_path(gobj, event, kw, src) {
|
|
15071
|
+
let priv = gobj.priv;
|
|
15072
|
+
(0, _yuneta_gobj_js.gobj_send_event)(priv.gobj_json, "EV_SUBTREE_ERROR", {
|
|
15073
|
+
path: kw && kw.path || "",
|
|
15074
|
+
error: (0, i18next.t)("collapsed in the source")
|
|
15075
|
+
}, gobj);
|
|
15076
|
+
return 0;
|
|
15077
|
+
}
|
|
15078
|
+
/***************************************************************
|
|
15079
|
+
* FSM
|
|
15080
|
+
***************************************************************/
|
|
15081
|
+
var gmt$12 = {
|
|
15082
|
+
mt_create: mt_create$12,
|
|
15083
|
+
mt_start: mt_start$12,
|
|
15084
|
+
mt_stop: mt_stop$12,
|
|
15085
|
+
mt_destroy: mt_destroy$12
|
|
15086
|
+
};
|
|
15087
|
+
/***************************************************************
|
|
15088
|
+
* Create the GClass
|
|
15089
|
+
***************************************************************/
|
|
15090
|
+
function create_gclass$12(gclass_name) {
|
|
15091
|
+
if (__gclass__$12) {
|
|
15092
|
+
(0, _yuneta_gobj_js.log_error)(`GClass ALREADY created: ${gclass_name}`);
|
|
15093
|
+
return -1;
|
|
15094
|
+
}
|
|
15095
|
+
__gclass__$12 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, [
|
|
15096
|
+
["EV_PASTE", 0],
|
|
15097
|
+
["EV_VIEW", 0],
|
|
15098
|
+
["EV_CLEAR", 0],
|
|
15099
|
+
["EV_EXPAND_PATH", 0]
|
|
15100
|
+
], [["ST_EMPTY", [
|
|
15101
|
+
[
|
|
15102
|
+
"EV_PASTE",
|
|
15103
|
+
ac_paste,
|
|
15104
|
+
null
|
|
15105
|
+
],
|
|
15106
|
+
[
|
|
15107
|
+
"EV_VIEW",
|
|
15108
|
+
ac_view,
|
|
15109
|
+
null
|
|
15110
|
+
],
|
|
15111
|
+
[
|
|
15112
|
+
"EV_CLEAR",
|
|
15113
|
+
ac_clear,
|
|
15114
|
+
null
|
|
15115
|
+
]
|
|
15116
|
+
]], ["ST_SHOWING", [
|
|
15117
|
+
[
|
|
15118
|
+
"EV_PASTE",
|
|
15119
|
+
ac_paste,
|
|
15120
|
+
null
|
|
15121
|
+
],
|
|
15122
|
+
[
|
|
15123
|
+
"EV_VIEW",
|
|
15124
|
+
ac_view,
|
|
15125
|
+
null
|
|
15126
|
+
],
|
|
15127
|
+
[
|
|
15128
|
+
"EV_CLEAR",
|
|
15129
|
+
ac_clear,
|
|
15130
|
+
null
|
|
15131
|
+
],
|
|
15132
|
+
[
|
|
15133
|
+
"EV_EXPAND_PATH",
|
|
15134
|
+
ac_expand_path,
|
|
15135
|
+
null
|
|
15136
|
+
]
|
|
15137
|
+
]]], gmt$12, 0, attrs_table$12, PRIVATE_DATA$12, 0, 0, 0, 0);
|
|
15138
|
+
if (!__gclass__$12) return -1;
|
|
15139
|
+
return 0;
|
|
15140
|
+
}
|
|
15141
|
+
/***************************************************************
|
|
15142
|
+
* Register GClass
|
|
15143
|
+
***************************************************************/
|
|
15144
|
+
function register_c_yui_json_pad() {
|
|
15145
|
+
if (!(0, _yuneta_gobj_js.gclass_find_by_name)("C_YUI_JSON", false)) register_c_yui_json();
|
|
14773
15146
|
return create_gclass$12(GCLASS_NAME$12);
|
|
14774
15147
|
}
|
|
14775
15148
|
//#endregion
|
|
@@ -21348,7 +21721,7 @@ function register_c_yui_nav() {
|
|
|
21348
21721
|
}
|
|
21349
21722
|
//#endregion
|
|
21350
21723
|
//#region src/shell_route_map.js
|
|
21351
|
-
var WIN_NAME$
|
|
21724
|
+
var WIN_NAME$2 = "shell-route-map-window";
|
|
21352
21725
|
var __show_refs__ = true;
|
|
21353
21726
|
var __open_modal__ = null;
|
|
21354
21727
|
function scroll_to_current($body) {
|
|
@@ -21688,7 +22061,7 @@ function mark_current_row($body, hash, t) {
|
|
|
21688
22061
|
***************************************************************/
|
|
21689
22062
|
function yui_shell_show_route_map(shell, opts) {
|
|
21690
22063
|
let t = opts && opts.t || i18next.default.t.bind(i18next.default);
|
|
21691
|
-
let existing = (0, _yuneta_gobj_js.gobj_find_service)(WIN_NAME$
|
|
22064
|
+
let existing = (0, _yuneta_gobj_js.gobj_find_service)(WIN_NAME$2, false);
|
|
21692
22065
|
if (existing && (0, _yuneta_gobj_js.is_gobj)(existing)) {
|
|
21693
22066
|
(0, _yuneta_gobj_js.gobj_send_event)(existing, "EV_CLOSE_WINDOW", {}, shell);
|
|
21694
22067
|
return null;
|
|
@@ -21703,7 +22076,7 @@ function yui_shell_show_route_map(shell, opts) {
|
|
|
21703
22076
|
let win_ref = { gobj: null };
|
|
21704
22077
|
let $body = build_body(shell, t);
|
|
21705
22078
|
let $parent = yui_shell_popup_layer(shell) || typeof document !== "undefined" && document.getElementById("top-layer") || null;
|
|
21706
|
-
let win = (0, _yuneta_gobj_js.gobj_create_service)(WIN_NAME$
|
|
22079
|
+
let win = (0, _yuneta_gobj_js.gobj_create_service)(WIN_NAME$2, "C_YUI_WINDOW", {
|
|
21707
22080
|
$parent,
|
|
21708
22081
|
subscriber: null,
|
|
21709
22082
|
modal: false,
|
|
@@ -25401,6 +25774,14 @@ function create_tabulator(gobj) {
|
|
|
25401
25774
|
let remembered_size = load_page_size(gobj);
|
|
25402
25775
|
if (remembered_size !== null && tabulator_settings.pagination) tabulator_settings.paginationSize = remembered_size;
|
|
25403
25776
|
gobj.priv._page_size = tabulator_settings.paginationSize;
|
|
25777
|
+
let pkey_col = columns.find((c) => c && c.field === pkey);
|
|
25778
|
+
if (pkey_col && !tabulator_settings.initialSort && !(0, _yuneta_gobj_js.gobj_read_bool_attr)(gobj, "with_remote_paging")) {
|
|
25779
|
+
if (!pkey_col.sorter) pkey_col.sorter = "alphanum";
|
|
25780
|
+
tabulator_settings.initialSort = [{
|
|
25781
|
+
column: pkey,
|
|
25782
|
+
dir: "asc"
|
|
25783
|
+
}];
|
|
25784
|
+
}
|
|
25404
25785
|
Object.assign(tabulator_settings, {
|
|
25405
25786
|
index: pkey,
|
|
25406
25787
|
columns,
|
|
@@ -27675,7 +28056,9 @@ function fold_build_model(descs, records, opts) {
|
|
|
27675
28056
|
opts = (0, _yuneta_gobj_js.is_object)(opts) ? opts : {};
|
|
27676
28057
|
let hidden = new Set((0, _yuneta_gobj_js.is_array)(opts.hidden_topics) ? opts.hidden_topics : []);
|
|
27677
28058
|
let loose_shown = new Set((0, _yuneta_gobj_js.is_array)(opts.loose_topics) ? opts.loose_topics : []);
|
|
27678
|
-
let main_topic = opts.main_topic ||
|
|
28059
|
+
let main_topic = opts.main_topic || "";
|
|
28060
|
+
if (main_topic && !fold_is_hierarchical(descs, main_topic)) main_topic = "";
|
|
28061
|
+
if (!main_topic) main_topic = fold_main_topic(descs);
|
|
27679
28062
|
if (main_topic && (!descs[main_topic] || hidden.has(main_topic))) main_topic = "";
|
|
27680
28063
|
let linked = fold_linked_topics(descs, main_topic);
|
|
27681
28064
|
let totals = {};
|
|
@@ -27796,28 +28179,49 @@ function count_levels(model) {
|
|
|
27796
28179
|
model.levels = deepest;
|
|
27797
28180
|
}
|
|
27798
28181
|
/************************************************************
|
|
27799
|
-
*
|
|
27800
|
-
*
|
|
27801
|
-
*
|
|
27802
|
-
*
|
|
27803
|
-
*
|
|
28182
|
+
* A HIERARCHICAL topic: one hooked to ITSELF -- places inside
|
|
28183
|
+
* places, groups inside groups, roles inside roles. It is the
|
|
28184
|
+
* only kind of topic a tree can hang from: a topic that only
|
|
28185
|
+
* reaches OTHER topics is a list with children, and making it
|
|
28186
|
+
* the trunk drew the agent's treedb from `yunos` instead of
|
|
28187
|
+
* `realms`.
|
|
28188
|
+
*
|
|
28189
|
+
* (Not the engine's `entity` tier, which is any topic with
|
|
28190
|
+
* hooks AND fkeys: that one sizes a card and says nothing about
|
|
28191
|
+
* where a tree starts.)
|
|
28192
|
+
************************************************************/
|
|
28193
|
+
function fold_is_hierarchical(descs, topic_name) {
|
|
28194
|
+
if (!(0, _yuneta_gobj_js.is_object)(descs) || !descs[topic_name]) return false;
|
|
28195
|
+
return hook_targets(descs, topic_name).has(topic_name);
|
|
28196
|
+
}
|
|
28197
|
+
/************************************************************
|
|
28198
|
+
* The topic the tree hangs from. Only a HIERARCHICAL topic can
|
|
28199
|
+
* be it, and in this order:
|
|
28200
|
+
*
|
|
28201
|
+
* the one the schema MARKS (`main_topic: true` on the topic,
|
|
28202
|
+
* sent by the backend in its desc since SDK 7.19; the first
|
|
28203
|
+
* one in schema order if a schema marks two);
|
|
28204
|
+
* else the one whose hooks reach the most OTHER topics,
|
|
28205
|
+
* schema order breaking a tie.
|
|
28206
|
+
*
|
|
28207
|
+
* "" when no topic is hooked to itself: there is no trunk, and
|
|
28208
|
+
* every topic is a tree of its own. (A pick by the reader comes
|
|
28209
|
+
* first of all, and is fold_build_model's business.)
|
|
27804
28210
|
************************************************************/
|
|
27805
28211
|
function fold_main_topic(descs) {
|
|
27806
28212
|
descs = (0, _yuneta_gobj_js.is_object)(descs) ? descs : {};
|
|
28213
|
+
let candidates = Object.keys(descs).filter((topic_name) => {
|
|
28214
|
+
return topic_name.substring(0, 2) !== "__" && fold_is_hierarchical(descs, topic_name);
|
|
28215
|
+
});
|
|
28216
|
+
for (let topic_name of candidates) if (descs[topic_name].main_topic === true) return topic_name;
|
|
27807
28217
|
let best = "";
|
|
27808
|
-
let best_score =
|
|
27809
|
-
let
|
|
27810
|
-
for (let topic_name of Object.keys(descs)) {
|
|
27811
|
-
if (topic_name.substring(0, 2) === "__") continue;
|
|
28218
|
+
let best_score = -1;
|
|
28219
|
+
for (let topic_name of candidates) {
|
|
27812
28220
|
let reach = hook_targets(descs, topic_name);
|
|
27813
|
-
let self = reach.has(topic_name);
|
|
27814
28221
|
reach.delete(topic_name);
|
|
27815
|
-
|
|
27816
|
-
if (score === 0) continue;
|
|
27817
|
-
if (score > best_score || score === best_score && self && !best_self) {
|
|
28222
|
+
if (reach.size > best_score) {
|
|
27818
28223
|
best = topic_name;
|
|
27819
|
-
best_score =
|
|
27820
|
-
best_self = self;
|
|
28224
|
+
best_score = reach.size;
|
|
27821
28225
|
}
|
|
27822
28226
|
}
|
|
27823
28227
|
return best;
|
|
@@ -55303,13 +55707,13 @@ var NODE_MODES$1 = [
|
|
|
55303
55707
|
"shape"
|
|
55304
55708
|
];
|
|
55305
55709
|
var PILL_SIZE = {
|
|
55306
|
-
|
|
55710
|
+
entity: [200, 30],
|
|
55307
55711
|
extended: [180, 28],
|
|
55308
55712
|
child: [160, 26]
|
|
55309
55713
|
};
|
|
55310
55714
|
var PORT_R_PILL = 6;
|
|
55311
55715
|
var SHAPE_SIZE = {
|
|
55312
|
-
|
|
55716
|
+
entity: 32,
|
|
55313
55717
|
extended: 28,
|
|
55314
55718
|
child: 22
|
|
55315
55719
|
};
|
|
@@ -55397,7 +55801,7 @@ var attrs_table$4 = [
|
|
|
55397
55801
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_LIST, "layout_names", _yuneta_gobj_js.sdata_flag_t.SDF_RD, JSON.stringify(Object.keys(_layouts)), "Available layout names (read-only, for parent to query)"),
|
|
55398
55802
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "hook_port_position", 0, "bottom", "Hook port position"),
|
|
55399
55803
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "fkey_port_position", 0, "top", "Fkey port position"),
|
|
55400
|
-
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_INTEGER, "expand_depth", 0,
|
|
55804
|
+
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_INTEGER, "expand_depth", 0, 1, "Levels open when a treedb loads, until the reader steps (`fold_level`): 1 = the roots alone (the default), 2 = the roots and their children. Every open hook shows its first page"),
|
|
55401
55805
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_INTEGER, "fold_level", 0, 0, "The level of the MAIN tree the toolbar's stepper stands on: 1 = its roots, N = N-1 levels under them; 0 = `expand_depth`. The host persists it and sends EV_SET_FOLD_LEVEL; it is published back in EV_LEGEND_STATE (`fold`) with the levels the tree has"),
|
|
55402
55806
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_INTEGER, "fold_page_size", 0, 24, "Children of one hook shown per page; the `+N` chip after the page opens the next one"),
|
|
55403
55807
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_LIST, "hidden_topics", 0, "[]", "Topics left out of the tree: no card, no pill counts them, no edge reaches them"),
|
|
@@ -55489,7 +55893,7 @@ var PRIVATE_DATA$4 = {
|
|
|
55489
55893
|
_layout_asked: "",
|
|
55490
55894
|
_nodes_total: 0,
|
|
55491
55895
|
_nodes_placed: 0,
|
|
55492
|
-
expand_depth:
|
|
55896
|
+
expand_depth: 1,
|
|
55493
55897
|
fold_level: 0,
|
|
55494
55898
|
fold_page_size: 24,
|
|
55495
55899
|
hidden_topics: null,
|
|
@@ -56213,7 +56617,12 @@ function configure_behaviour(gobj) {
|
|
|
56213
56617
|
graph_write_behaviors(gobj, behaviors);
|
|
56214
56618
|
}
|
|
56215
56619
|
/************************************************************
|
|
56216
|
-
* Count hooks and fkeys in topic desc, classify node type
|
|
56620
|
+
* Count hooks and fkeys in topic desc, classify node type:
|
|
56621
|
+
* `child` (no hooks), `extended` (hooks, no fkeys), `entity`
|
|
56622
|
+
* (both). It sizes the card and nothing else. It used to be
|
|
56623
|
+
* called `hierarchical`, and that word means something else now:
|
|
56624
|
+
* a topic hooked to ITSELF, the only kind a tree can hang from
|
|
56625
|
+
* (treedb_fold_model).
|
|
56217
56626
|
************************************************************/
|
|
56218
56627
|
function calculate_hooks_fkeys_counter(desc) {
|
|
56219
56628
|
let cols = desc.cols;
|
|
@@ -56230,7 +56639,7 @@ function calculate_hooks_fkeys_counter(desc) {
|
|
|
56230
56639
|
}
|
|
56231
56640
|
if (desc.hooks_counter === 0) desc.node_treedb_type = "child";
|
|
56232
56641
|
else if (desc.fkeys_counter === 0) desc.node_treedb_type = "extended";
|
|
56233
|
-
else desc.node_treedb_type = "
|
|
56642
|
+
else desc.node_treedb_type = "entity";
|
|
56234
56643
|
}
|
|
56235
56644
|
/************************************************************
|
|
56236
56645
|
* Build ports for a topic desc
|
|
@@ -56603,7 +57012,7 @@ function dress_ports(gobj, style, ports, geometry, topic_defaults, r_default, fi
|
|
|
56603
57012
|
************************************************************/
|
|
56604
57013
|
function pill_shape_of(gobj, desc, record, geometry) {
|
|
56605
57014
|
let priv = gobj.priv;
|
|
56606
|
-
let size = PILL_SIZE[desc.node_treedb_type] || PILL_SIZE.
|
|
57015
|
+
let size = PILL_SIZE[desc.node_treedb_type] || PILL_SIZE.entity;
|
|
56607
57016
|
let ports = build_ports(gobj, desc);
|
|
56608
57017
|
let paint = node_paint_of(gobj, desc, geometry);
|
|
56609
57018
|
let style = {
|
|
@@ -56652,7 +57061,7 @@ function figure_shape_of(gobj, desc, record, geometry, flags) {
|
|
|
56652
57061
|
let dark = priv.theme === "dark";
|
|
56653
57062
|
let f = flags || {};
|
|
56654
57063
|
let tier = desc.node_treedb_type;
|
|
56655
|
-
let side = SHAPE_SIZE[tier] || SHAPE_SIZE.
|
|
57064
|
+
let side = SHAPE_SIZE[tier] || SHAPE_SIZE.entity;
|
|
56656
57065
|
let labels = (0, _yuneta_gobj_js.gobj_read_bool_attr)(gobj, "node_labels");
|
|
56657
57066
|
let figure = node_figure_of(gobj, desc, geometry || {});
|
|
56658
57067
|
let paint = node_paint_of(gobj, desc, geometry);
|
|
@@ -59718,7 +60127,7 @@ function show_node_detail_popover(gobj, node_id) {
|
|
|
59718
60127
|
clamp_popover_position(gobj, popover);
|
|
59719
60128
|
}
|
|
59720
60129
|
/************************************************************
|
|
59721
|
-
* Re-render every HTML (
|
|
60130
|
+
* Re-render every HTML (entity) node so its card adopts
|
|
59722
60131
|
* the given theme: entity cards and leaf chips (baked innerHTML,
|
|
59723
60132
|
* not re-themed by setTheme()) are regenerated; structural
|
|
59724
60133
|
* junction diamonds get their neutral fill/stroke re-themed.
|
|
@@ -59837,7 +60246,7 @@ function refresh_minimap(gobj) {
|
|
|
59837
60246
|
}
|
|
59838
60247
|
/************************************************************
|
|
59839
60248
|
* The innerHTML of ONE node, in the given theme and highlight state.
|
|
59840
|
-
* The three treedb tiers (
|
|
60249
|
+
* The three treedb tiers (entity / extended / child) each have
|
|
59841
60250
|
* their own card, and both the theme refresh and the highlight need the
|
|
59842
60251
|
* same three-way choice — it lived inline in the theme refresh and is
|
|
59843
60252
|
* shared now. Returns null for a node that carries no desc.
|
|
@@ -59854,7 +60263,7 @@ function node_innerHTML_of(nd, theme, highlight, selected, anchored, pills_html)
|
|
|
59854
60263
|
switch (desc.node_treedb_type) {
|
|
59855
60264
|
case "child": return build_chip_innerHTML(fill, theme, record.icon, label, record.id, highlight, selected, anchored);
|
|
59856
60265
|
case "extended": return build_node_innerHTML(fill, theme, record.icon, label, desc.topic_name, true, record.id, highlight, selected, anchored, pills_html);
|
|
59857
|
-
case "
|
|
60266
|
+
case "entity": return build_node_innerHTML(fill, theme, record.icon, label, desc.topic_name, false, record.id, highlight, selected, anchored, pills_html);
|
|
59858
60267
|
}
|
|
59859
60268
|
return null;
|
|
59860
60269
|
}
|
|
@@ -60051,7 +60460,7 @@ function build_chip_innerHTML(color, theme, icon, label, key, highlight, selecte
|
|
|
60051
60460
|
`;
|
|
60052
60461
|
}
|
|
60053
60462
|
/************************************************************
|
|
60054
|
-
* Build innerHTML for
|
|
60463
|
+
* Build innerHTML for entity (HTML) nodes.
|
|
60055
60464
|
*
|
|
60056
60465
|
* Card style modelled on the documentation schema graphs
|
|
60057
60466
|
* (docs gen_treedb_graphs.py): rounded card, soft tint of the
|
|
@@ -61369,12 +61778,13 @@ function publish_legend_state(gobj, visible) {
|
|
|
61369
61778
|
loose: loose.length,
|
|
61370
61779
|
loose_shown: model.loose_shown.has(topic_name),
|
|
61371
61780
|
hidden: model.hidden.has(topic_name),
|
|
61372
|
-
linked: model.linked.has(topic_name)
|
|
61781
|
+
linked: model.linked.has(topic_name),
|
|
61782
|
+
hierarchical: fold_is_hierarchical(priv.descs, topic_name)
|
|
61373
61783
|
});
|
|
61374
61784
|
}
|
|
61375
61785
|
(0, _yuneta_gobj_js.gobj_publish_event)(gobj, "EV_LEGEND_STATE", {
|
|
61376
61786
|
main_topic: model.main_topic,
|
|
61377
|
-
main_chosen: !!(0, _yuneta_gobj_js.gobj_read_str_attr)(gobj, "main_topic"),
|
|
61787
|
+
main_chosen: !!model.main_topic && (0, _yuneta_gobj_js.gobj_read_str_attr)(gobj, "main_topic") === model.main_topic,
|
|
61378
61788
|
topics,
|
|
61379
61789
|
fold: {
|
|
61380
61790
|
topic: model.main_topic,
|
|
@@ -62950,7 +63360,7 @@ var attrs_table$3 = [
|
|
|
62950
63360
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
62951
63361
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_LIST, "operation_modes", 0, "[\"reading\", \"operation\", \"writing\", \"edition\"]", "Available **permission** or behaviour modes. These operation modes are required to be accomplish by the graph handler (G6 child). TODO permissions must match treedb permissions."),
|
|
62952
63362
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_BOOLEAN, "with_treedb_tables", 0, false, "Include treedb tables"),
|
|
62953
|
-
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_INTEGER, "expand_depth", 0,
|
|
63363
|
+
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_INTEGER, "expand_depth", 0, 1, "Levels of the treedb open when it loads, until the reader steps (`fold_level`): 1 = the roots alone (the default), 2 = the roots and their children. Forwarded to the G6 child"),
|
|
62954
63364
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_INTEGER, "fold_page_size", 0, 24, "Children of one hook shown per page in the graph; a `+N` chip opens the next page. Forwarded to the G6 child"),
|
|
62955
63365
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_INTEGER, "minimap_min_nodes", 0, 30, "Show the minimap from this many nodes on (0 = never). Forwarded to the G6 child"),
|
|
62956
63366
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_BOOLEAN, "with_gridline", 0, true, "Draw the grid under the graph. Forwarded to the G6 child"),
|
|
@@ -64601,6 +65011,7 @@ function refresh_legend(gobj) {
|
|
|
64601
65011
|
let topics = state.topics.slice().sort((a, b) => {
|
|
64602
65012
|
return String(a.topic).localeCompare(String(b.topic));
|
|
64603
65013
|
});
|
|
65014
|
+
let hierarchical_count = topics.filter((e) => e.hierarchical && !e.hidden).length;
|
|
64604
65015
|
for (let entry of topics) {
|
|
64605
65016
|
let topic_name = entry.topic;
|
|
64606
65017
|
let is_main = topic_name === state.main_topic;
|
|
@@ -64695,7 +65106,7 @@ function refresh_legend(gobj) {
|
|
|
64695
65106
|
"★"
|
|
64696
65107
|
]]
|
|
64697
65108
|
]);
|
|
64698
|
-
else if (!hidden) extras.push([
|
|
65109
|
+
else if (!hidden && entry.hierarchical && hierarchical_count > 1) extras.push([
|
|
64699
65110
|
"button",
|
|
64700
65111
|
{
|
|
64701
65112
|
class: "GRAPH_LEGEND_STAR button",
|
|
@@ -66044,7 +66455,7 @@ function sort_by_order(list) {
|
|
|
66044
66455
|
* schema_version, c_schema_version, system_schema_version,
|
|
66045
66456
|
* topics: [{
|
|
66046
66457
|
* id, name, order, record,
|
|
66047
|
-
* pkey, topic_version, system_topic,
|
|
66458
|
+
* pkey, topic_version, system_topic, main_topic,
|
|
66048
66459
|
* cols: [{id, name, order, record}]
|
|
66049
66460
|
* }]
|
|
66050
66461
|
* }],
|
|
@@ -66093,6 +66504,7 @@ function build_schema_model(records) {
|
|
|
66093
66504
|
tkey: record.tkey || "",
|
|
66094
66505
|
topic_version: record.topic_version,
|
|
66095
66506
|
system_topic: !!record.system_topic,
|
|
66507
|
+
main_topic: !!record.main_topic,
|
|
66096
66508
|
cols: []
|
|
66097
66509
|
};
|
|
66098
66510
|
by_topic_id[entry.id] = entry;
|
|
@@ -66389,6 +66801,12 @@ function validate_schema(treedb, options) {
|
|
|
66389
66801
|
if (is_fkey && FKEY_TYPES.indexOf(type) < 0) add("error", "fkey has a bad type", topic.name, col.name, type);
|
|
66390
66802
|
}
|
|
66391
66803
|
}
|
|
66804
|
+
let marked = treedb.topics.filter((topic) => topic.main_topic);
|
|
66805
|
+
if (marked.length > 1) add("error", "more than one main topic", marked[1].name, "", marked.map((topic) => topic.name).join(", "));
|
|
66806
|
+
for (let topic of marked) if (!topic.cols.some((col) => {
|
|
66807
|
+
let hook = col_hook(col.record);
|
|
66808
|
+
return col_flags(col.record).indexOf("hook") >= 0 && !!hook && Object.prototype.hasOwnProperty.call(hook, topic.name);
|
|
66809
|
+
})) add("error", "main topic not hooked to itself", topic.name, "", "");
|
|
66392
66810
|
let hooked = {};
|
|
66393
66811
|
for (let topic of treedb.topics) for (let col of topic.cols) {
|
|
66394
66812
|
let hook = col_hook(col.record);
|
|
@@ -66580,7 +66998,8 @@ var TOPIC_KEY_ORDER = [
|
|
|
66580
66998
|
"system_flag",
|
|
66581
66999
|
"tkey",
|
|
66582
67000
|
"topic_version",
|
|
66583
|
-
"system_topic"
|
|
67001
|
+
"system_topic",
|
|
67002
|
+
"main_topic"
|
|
66584
67003
|
];
|
|
66585
67004
|
var COL_KEY_ORDER = [
|
|
66586
67005
|
"header",
|
|
@@ -66838,7 +67257,8 @@ var TOPIC_FIELDS = [
|
|
|
66838
67257
|
"system_flag",
|
|
66839
67258
|
"tkey",
|
|
66840
67259
|
"topic_version",
|
|
66841
|
-
"system_topic"
|
|
67260
|
+
"system_topic",
|
|
67261
|
+
"main_topic"
|
|
66842
67262
|
];
|
|
66843
67263
|
var COL_FIELDS = [
|
|
66844
67264
|
"header",
|
|
@@ -68455,6 +68875,20 @@ function render_topics(gobj, $body) {
|
|
|
68455
68875
|
{},
|
|
68456
68876
|
""
|
|
68457
68877
|
],
|
|
68878
|
+
topic.main_topic ? [
|
|
68879
|
+
"span",
|
|
68880
|
+
{
|
|
68881
|
+
class: "SCHEMA_TOPIC_MAIN ml-2",
|
|
68882
|
+
style: "color:#d4a017;",
|
|
68883
|
+
title: (0, i18next.t)("main topic"),
|
|
68884
|
+
"data-i18n-title": "main topic"
|
|
68885
|
+
},
|
|
68886
|
+
"★"
|
|
68887
|
+
] : [
|
|
68888
|
+
"span",
|
|
68889
|
+
{},
|
|
68890
|
+
""
|
|
68891
|
+
],
|
|
68458
68892
|
ambiguous ? [
|
|
68459
68893
|
"div",
|
|
68460
68894
|
{ class: "SCHEMA_TOPIC_ID is-size-7 yui-text-quiet" },
|
|
@@ -69449,6 +69883,26 @@ function open_topic_form(gobj, treedb, topic) {
|
|
|
69449
69883
|
]]
|
|
69450
69884
|
]]
|
|
69451
69885
|
],
|
|
69886
|
+
[
|
|
69887
|
+
"div",
|
|
69888
|
+
{ class: "SCHEMA_TOPIC_FORM_MAIN field mb-3" },
|
|
69889
|
+
[[
|
|
69890
|
+
"label",
|
|
69891
|
+
{ class: "checkbox" },
|
|
69892
|
+
[["input", el_attrs({
|
|
69893
|
+
type: "checkbox",
|
|
69894
|
+
"data-name": "main_topic",
|
|
69895
|
+
checked: record.main_topic ? "checked" : void 0
|
|
69896
|
+
})], [
|
|
69897
|
+
"span",
|
|
69898
|
+
{
|
|
69899
|
+
class: "ml-1",
|
|
69900
|
+
i18n: "main topic"
|
|
69901
|
+
},
|
|
69902
|
+
(0, i18next.t)("main topic")
|
|
69903
|
+
]]
|
|
69904
|
+
]]
|
|
69905
|
+
],
|
|
69452
69906
|
[
|
|
69453
69907
|
"div",
|
|
69454
69908
|
{
|
|
@@ -70241,6 +70695,7 @@ function topic_record(gobj, treedb, topic, values) {
|
|
|
70241
70695
|
record.tkey = values.tkey || "";
|
|
70242
70696
|
record.topic_version = values.topic_version === "" ? 1 : Number(values.topic_version);
|
|
70243
70697
|
record.system_topic = !!values.system_topic;
|
|
70698
|
+
record.main_topic = !!values.main_topic;
|
|
70244
70699
|
return record;
|
|
70245
70700
|
}
|
|
70246
70701
|
/***************************
|
|
@@ -74499,7 +74954,7 @@ function build_dev_panel() {
|
|
|
74499
74954
|
* Copyright (c) 2026, ArtGins.
|
|
74500
74955
|
* All Rights Reserved.
|
|
74501
74956
|
***********************************************************************/
|
|
74502
|
-
var WIN_NAME = "Frontend-View-Window";
|
|
74957
|
+
var WIN_NAME$1 = "Frontend-View-Window";
|
|
74503
74958
|
/******************************
|
|
74504
74959
|
* Public API
|
|
74505
74960
|
******************************/
|
|
@@ -74516,7 +74971,7 @@ var WIN_NAME = "Frontend-View-Window";
|
|
|
74516
74971
|
* Returns the window gobj, or null.
|
|
74517
74972
|
************************************************************/
|
|
74518
74973
|
function setup_frontend_view(self) {
|
|
74519
|
-
if ((0, _yuneta_gobj_js.gobj_find_service)(WIN_NAME, false)) return null;
|
|
74974
|
+
if ((0, _yuneta_gobj_js.gobj_find_service)(WIN_NAME$1, false)) return null;
|
|
74520
74975
|
let $body = (0, _yuneta_gobj_js.createElement2)([
|
|
74521
74976
|
"div",
|
|
74522
74977
|
{
|
|
@@ -74525,7 +74980,7 @@ function setup_frontend_view(self) {
|
|
|
74525
74980
|
},
|
|
74526
74981
|
[]
|
|
74527
74982
|
]);
|
|
74528
|
-
let win = (0, _yuneta_gobj_js.gobj_create_service)(WIN_NAME, "C_YUI_WINDOW", {
|
|
74983
|
+
let win = (0, _yuneta_gobj_js.gobj_create_service)(WIN_NAME$1, "C_YUI_WINDOW", {
|
|
74529
74984
|
$parent: typeof document !== "undefined" && document.getElementById("top-layer") || null,
|
|
74530
74985
|
subscriber: null,
|
|
74531
74986
|
modal: false,
|
|
@@ -74557,6 +75012,75 @@ function setup_frontend_view(self) {
|
|
|
74557
75012
|
return win;
|
|
74558
75013
|
}
|
|
74559
75014
|
//#endregion
|
|
75015
|
+
//#region src/yui_json_pad.js
|
|
75016
|
+
/***********************************************************************
|
|
75017
|
+
* yui_json_pad.js
|
|
75018
|
+
*
|
|
75019
|
+
* JSON viewer -- a blank C_YUI_JSON_PAD in a floating window,
|
|
75020
|
+
* to paste JSON from outside and read it with the library's own
|
|
75021
|
+
* viewer. Peer of the frontend view (yui_frontend_view.js), and
|
|
75022
|
+
* opened the same way: an entry of the account menu.
|
|
75023
|
+
*
|
|
75024
|
+
* Copyright (c) 2026, ArtGins.
|
|
75025
|
+
* All Rights Reserved.
|
|
75026
|
+
***********************************************************************/
|
|
75027
|
+
var WIN_NAME = "Json-Viewer-Window";
|
|
75028
|
+
/******************************
|
|
75029
|
+
* Public API
|
|
75030
|
+
******************************/
|
|
75031
|
+
/************************************************************
|
|
75032
|
+
* Open a blank JSON pad (C_YUI_JSON_PAD) inside a non-modal
|
|
75033
|
+
* C_YUI_WINDOW, the same shape as the frontend view.
|
|
75034
|
+
*
|
|
75035
|
+
* Self-contained: it registers C_YUI_JSON_PAD (and the
|
|
75036
|
+
* C_YUI_JSON it hosts) if the app did not, so an app gets the
|
|
75037
|
+
* viewer with one menu entry and one action.
|
|
75038
|
+
*
|
|
75039
|
+
* Returns the window gobj, or null.
|
|
75040
|
+
************************************************************/
|
|
75041
|
+
function setup_json_pad(self) {
|
|
75042
|
+
if ((0, _yuneta_gobj_js.gobj_find_service)(WIN_NAME, false)) return null;
|
|
75043
|
+
if (!(0, _yuneta_gobj_js.gclass_find_by_name)("C_YUI_JSON_PAD", false)) register_c_yui_json_pad();
|
|
75044
|
+
let $body = (0, _yuneta_gobj_js.createElement2)([
|
|
75045
|
+
"div",
|
|
75046
|
+
{
|
|
75047
|
+
class: "YJSONPAD_BODY",
|
|
75048
|
+
style: "height:100%; display:flex; flex-direction:column;"
|
|
75049
|
+
},
|
|
75050
|
+
[]
|
|
75051
|
+
]);
|
|
75052
|
+
let win = (0, _yuneta_gobj_js.gobj_create_service)(WIN_NAME, "C_YUI_WINDOW", {
|
|
75053
|
+
$parent: typeof document !== "undefined" && document.getElementById("top-layer") || null,
|
|
75054
|
+
subscriber: null,
|
|
75055
|
+
modal: false,
|
|
75056
|
+
showMax: true,
|
|
75057
|
+
showFooter: false,
|
|
75058
|
+
resizable: true,
|
|
75059
|
+
center: false,
|
|
75060
|
+
auto_save_size_and_position: true,
|
|
75061
|
+
width: 900,
|
|
75062
|
+
height: 640,
|
|
75063
|
+
logical_class: "JSON_VIEWER_WINDOW",
|
|
75064
|
+
title: "json viewer",
|
|
75065
|
+
icon: "yi-code",
|
|
75066
|
+
body: $body,
|
|
75067
|
+
manager: (0, _yuneta_gobj_js.gobj_find_service)("__window_manager__", false) || null
|
|
75068
|
+
}, self);
|
|
75069
|
+
if (!win) {
|
|
75070
|
+
(0, _yuneta_gobj_js.log_error)("yui_json_pad: cannot create the json-viewer window");
|
|
75071
|
+
return null;
|
|
75072
|
+
}
|
|
75073
|
+
let pad = (0, _yuneta_gobj_js.gobj_create_pure_child)("json_pad", "C_YUI_JSON_PAD", {}, win);
|
|
75074
|
+
let $pad = pad ? (0, _yuneta_gobj_js.gobj_read_attr)(pad, "$container") : null;
|
|
75075
|
+
if (!$pad) {
|
|
75076
|
+
(0, _yuneta_gobj_js.log_error)("yui_json_pad: C_YUI_JSON_PAD without $container");
|
|
75077
|
+
return win;
|
|
75078
|
+
}
|
|
75079
|
+
$body.appendChild($pad);
|
|
75080
|
+
(0, _yuneta_gobj_js.gobj_start_tree)(win);
|
|
75081
|
+
return win;
|
|
75082
|
+
}
|
|
75083
|
+
//#endregion
|
|
74560
75084
|
exports.EditControl = EditControl;
|
|
74561
75085
|
exports.MarkerControl = MarkerControl;
|
|
74562
75086
|
exports.YUI_FILE_ACCEPT = YUI_FILE_ACCEPT;
|
|
@@ -74597,6 +75121,7 @@ exports.register_c_yui_gclass = register_c_yui_gclass;
|
|
|
74597
75121
|
exports.register_c_yui_gobj_tree_js = register_c_yui_gobj_tree_js;
|
|
74598
75122
|
exports.register_c_yui_json = register_c_yui_json;
|
|
74599
75123
|
exports.register_c_yui_json_graph = register_c_yui_json_graph;
|
|
75124
|
+
exports.register_c_yui_json_pad = register_c_yui_json_pad;
|
|
74600
75125
|
exports.register_c_yui_map = register_c_yui_map;
|
|
74601
75126
|
exports.register_c_yui_nav = register_c_yui_nav;
|
|
74602
75127
|
exports.register_c_yui_pager = register_c_yui_pager;
|
|
@@ -74622,6 +75147,7 @@ exports.set_pressed_state = set_pressed_state;
|
|
|
74622
75147
|
exports.set_submit_state = set_submit_state;
|
|
74623
75148
|
exports.setup_dev = setup_dev;
|
|
74624
75149
|
exports.setup_frontend_view = setup_frontend_view;
|
|
75150
|
+
exports.setup_json_pad = setup_json_pad;
|
|
74625
75151
|
exports.toggleClasses = toggleClasses;
|
|
74626
75152
|
exports.yui_array_buffer_to_base64 = yui_array_buffer_to_base64;
|
|
74627
75153
|
exports.yui_asset_element = yui_asset_element;
|