@yuneta/gobj-ui 7.23.142 → 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 +26 -0
- package/dist/gobj-ui.cjs.js +665 -213
- package/dist/gobj-ui.es.js +664 -214
- package/index.js +2 -0
- package/package.json +1 -1
- package/src/c_yui_json_pad.js +454 -0
- package/src/c_yui_treedb_topic_with_form.js +14 -0
- package/src/yui_json_pad.js +109 -0
package/dist/gobj-ui.es.js
CHANGED
|
@@ -866,7 +866,7 @@ function secondary_nav_renders(item, layout) {
|
|
|
866
866
|
/***************************************************************
|
|
867
867
|
* Constants
|
|
868
868
|
***************************************************************/
|
|
869
|
-
var GCLASS_NAME$
|
|
869
|
+
var GCLASS_NAME$22 = "C_YUI_SHELL";
|
|
870
870
|
var __last_shell__ = null;
|
|
871
871
|
var ZONE_IDS = [
|
|
872
872
|
"top",
|
|
@@ -888,7 +888,7 @@ var LAYER_DEFS = [
|
|
|
888
888
|
/***************************************************************
|
|
889
889
|
* Attrs
|
|
890
890
|
***************************************************************/
|
|
891
|
-
var attrs_table$
|
|
891
|
+
var attrs_table$22 = [
|
|
892
892
|
SDATA(data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
893
893
|
SDATA(data_type_t.DTP_JSON, "config", 0, null, "Shell declarative config (zones, menu, stages, toolbar)"),
|
|
894
894
|
SDATA(data_type_t.DTP_STRING, "default_route", 0, "", "Fallback route if hash is empty"),
|
|
@@ -899,7 +899,7 @@ var attrs_table$21 = [
|
|
|
899
899
|
SDATA(data_type_t.DTP_POINTER, "$container", 0, null, "Root HTMLElement of the shell"),
|
|
900
900
|
SDATA_END()
|
|
901
901
|
];
|
|
902
|
-
var PRIVATE_DATA$
|
|
902
|
+
var PRIVATE_DATA$22 = {
|
|
903
903
|
zones: {},
|
|
904
904
|
layers: {},
|
|
905
905
|
stages: {},
|
|
@@ -922,23 +922,23 @@ var PRIVATE_DATA$21 = {
|
|
|
922
922
|
conn_nodes: [],
|
|
923
923
|
active_dropdown: null
|
|
924
924
|
};
|
|
925
|
-
var __gclass__$
|
|
925
|
+
var __gclass__$22 = null;
|
|
926
926
|
/******************************
|
|
927
927
|
* Framework Methods
|
|
928
928
|
******************************/
|
|
929
929
|
/***************************************************************
|
|
930
930
|
* Framework Method: Create
|
|
931
931
|
***************************************************************/
|
|
932
|
-
function mt_create$
|
|
932
|
+
function mt_create$22(gobj) {
|
|
933
933
|
const subscriber = gobj_read_pointer_attr(gobj, "subscriber");
|
|
934
934
|
if (subscriber) gobj_subscribe_event(gobj, null, {}, subscriber);
|
|
935
935
|
__last_shell__ = gobj;
|
|
936
|
-
build_ui$
|
|
936
|
+
build_ui$19(gobj);
|
|
937
937
|
}
|
|
938
938
|
/***************************************************************
|
|
939
939
|
* Framework Method: Start
|
|
940
940
|
***************************************************************/
|
|
941
|
-
function mt_start$
|
|
941
|
+
function mt_start$20(gobj) {
|
|
942
942
|
let config = gobj_read_attr(gobj, "config") || {};
|
|
943
943
|
let priv = gobj.priv;
|
|
944
944
|
if (!validate_config(config)) {
|
|
@@ -1007,7 +1007,7 @@ function mt_start$19(gobj) {
|
|
|
1007
1007
|
/***************************************************************
|
|
1008
1008
|
* Framework Method: Stop
|
|
1009
1009
|
***************************************************************/
|
|
1010
|
-
function mt_stop$
|
|
1010
|
+
function mt_stop$20(gobj) {
|
|
1011
1011
|
let priv = gobj.priv;
|
|
1012
1012
|
if (!priv) return 0;
|
|
1013
1013
|
close_toolbar_dropdown(gobj);
|
|
@@ -1048,7 +1048,7 @@ function mt_stop$19(gobj) {
|
|
|
1048
1048
|
/***************************************************************
|
|
1049
1049
|
* Framework Method: Destroy
|
|
1050
1050
|
***************************************************************/
|
|
1051
|
-
function mt_destroy$
|
|
1051
|
+
function mt_destroy$22(gobj) {
|
|
1052
1052
|
close_toolbar_dropdown(gobj);
|
|
1053
1053
|
let $container = gobj_read_attr(gobj, "$container");
|
|
1054
1054
|
if ($container && $container.parentNode) $container.parentNode.removeChild($container);
|
|
@@ -1164,7 +1164,7 @@ function check_route_unique(route_owner, item, menu_id) {
|
|
|
1164
1164
|
/************************************************************
|
|
1165
1165
|
* Build the DOM: layers → base → zones
|
|
1166
1166
|
************************************************************/
|
|
1167
|
-
function build_ui$
|
|
1167
|
+
function build_ui$19(gobj) {
|
|
1168
1168
|
let priv = gobj.priv;
|
|
1169
1169
|
let shell_cfg = (gobj_read_attr(gobj, "config") || {}).shell || {};
|
|
1170
1170
|
let $container = createElement2(["div", { class: "C_YUI_SHELL yui-shell" }]);
|
|
@@ -2551,14 +2551,14 @@ function ac_nav_item_close(gobj, event, kw, src) {
|
|
|
2551
2551
|
/***************************************************************
|
|
2552
2552
|
* FSM
|
|
2553
2553
|
***************************************************************/
|
|
2554
|
-
var gmt$
|
|
2555
|
-
mt_create: mt_create$
|
|
2556
|
-
mt_start: mt_start$
|
|
2557
|
-
mt_stop: mt_stop$
|
|
2558
|
-
mt_destroy: mt_destroy$
|
|
2554
|
+
var gmt$22 = {
|
|
2555
|
+
mt_create: mt_create$22,
|
|
2556
|
+
mt_start: mt_start$20,
|
|
2557
|
+
mt_stop: mt_stop$20,
|
|
2558
|
+
mt_destroy: mt_destroy$22
|
|
2559
2559
|
};
|
|
2560
|
-
function create_gclass$
|
|
2561
|
-
if (__gclass__$
|
|
2560
|
+
function create_gclass$22(gclass_name) {
|
|
2561
|
+
if (__gclass__$22) {
|
|
2562
2562
|
log_error(`GClass ALREADY created: ${gclass_name}`);
|
|
2563
2563
|
return -1;
|
|
2564
2564
|
}
|
|
@@ -2587,12 +2587,12 @@ function create_gclass$21(gclass_name) {
|
|
|
2587
2587
|
["EV_ROUTE_CHANGED", event_flag_t.EVF_OUTPUT_EVENT | event_flag_t.EVF_PUBLIC_EVENT | event_flag_t.EVF_NO_WARN_SUBS],
|
|
2588
2588
|
["EV_LANGUAGE_CHANGED", event_flag_t.EVF_OUTPUT_EVENT | event_flag_t.EVF_PUBLIC_EVENT | event_flag_t.EVF_NO_WARN_SUBS]
|
|
2589
2589
|
];
|
|
2590
|
-
__gclass__$
|
|
2591
|
-
if (!__gclass__$
|
|
2590
|
+
__gclass__$22 = gclass_create(gclass_name, event_types, states, gmt$22, 0, attrs_table$22, PRIVATE_DATA$22, 0, 0, 0, gclass_flag_t.gcflag_no_check_output_events);
|
|
2591
|
+
if (!__gclass__$22) return -1;
|
|
2592
2592
|
return 0;
|
|
2593
2593
|
}
|
|
2594
2594
|
function register_c_yui_shell() {
|
|
2595
|
-
return create_gclass$
|
|
2595
|
+
return create_gclass$22(GCLASS_NAME$22);
|
|
2596
2596
|
}
|
|
2597
2597
|
/***************************************************************
|
|
2598
2598
|
* Public helpers — exported alongside register_c_yui_shell().
|
|
@@ -2685,7 +2685,7 @@ function yui_shell_last_route_under(shell_gobj, route) {
|
|
|
2685
2685
|
function yui_shell_of(gobj) {
|
|
2686
2686
|
let g = gobj;
|
|
2687
2687
|
while (g) {
|
|
2688
|
-
if (gobj_gclass_name(g) === GCLASS_NAME$
|
|
2688
|
+
if (gobj_gclass_name(g) === GCLASS_NAME$22) return g;
|
|
2689
2689
|
g = gobj_parent(g);
|
|
2690
2690
|
}
|
|
2691
2691
|
return __last_shell__;
|
|
@@ -3439,7 +3439,7 @@ function yui_shell_confirm_yesnocancel(shell, message, opts) {
|
|
|
3439
3439
|
/***************************************************************
|
|
3440
3440
|
* Constants
|
|
3441
3441
|
***************************************************************/
|
|
3442
|
-
var GCLASS_NAME$
|
|
3442
|
+
var GCLASS_NAME$21 = "C_YUI_WINDOW";
|
|
3443
3443
|
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>";
|
|
3444
3444
|
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>";
|
|
3445
3445
|
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>";
|
|
@@ -3448,7 +3448,7 @@ var MOBILE_MAX = 768;
|
|
|
3448
3448
|
/***************************************************************
|
|
3449
3449
|
* Data
|
|
3450
3450
|
***************************************************************/
|
|
3451
|
-
var attrs_table$
|
|
3451
|
+
var attrs_table$21 = [
|
|
3452
3452
|
SDATA(data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
3453
3453
|
SDATA(data_type_t.DTP_POINTER, "$parent", 0, null, "$container will be appended to $parent if not null, else to document.body"),
|
|
3454
3454
|
SDATA(data_type_t.DTP_INTEGER, "x", 0, "300", "X position"),
|
|
@@ -3486,21 +3486,21 @@ var attrs_table$20 = [
|
|
|
3486
3486
|
SDATA(data_type_t.DTP_POINTER, "win_resize_handler", 0, null, "Internal: native window 'resize' listener"),
|
|
3487
3487
|
SDATA_END()
|
|
3488
3488
|
];
|
|
3489
|
-
var PRIVATE_DATA$
|
|
3490
|
-
var __gclass__$
|
|
3489
|
+
var PRIVATE_DATA$21 = { prevSize: 0 };
|
|
3490
|
+
var __gclass__$21 = null;
|
|
3491
3491
|
/******************************
|
|
3492
3492
|
* Framework Methods
|
|
3493
3493
|
******************************/
|
|
3494
3494
|
/***************************************************************
|
|
3495
3495
|
* Framework Method: Create
|
|
3496
3496
|
***************************************************************/
|
|
3497
|
-
function mt_create$
|
|
3497
|
+
function mt_create$21(gobj) {
|
|
3498
3498
|
const subscriber = gobj_read_pointer_attr(gobj, "subscriber");
|
|
3499
3499
|
if (subscriber) gobj_subscribe_event(gobj, null, {}, subscriber);
|
|
3500
3500
|
let window_id = "window-" + clean_name(gobj_short_name(gobj));
|
|
3501
3501
|
gobj_write_attr(gobj, "window_id", window_id);
|
|
3502
3502
|
let manager = resolve_manager(gobj);
|
|
3503
|
-
build_ui$
|
|
3503
|
+
build_ui$18(gobj);
|
|
3504
3504
|
if (manager) {
|
|
3505
3505
|
let $c = gobj_read_attr(gobj, "$container");
|
|
3506
3506
|
if ($c) $c.addEventListener("pointerdown", function() {
|
|
@@ -3534,7 +3534,7 @@ function mt_create$20(gobj) {
|
|
|
3534
3534
|
/***************************************************************
|
|
3535
3535
|
* Framework Method: Destroy
|
|
3536
3536
|
***************************************************************/
|
|
3537
|
-
function mt_destroy$
|
|
3537
|
+
function mt_destroy$21(gobj) {
|
|
3538
3538
|
let manager = gobj_read_pointer_attr(gobj, "manager");
|
|
3539
3539
|
if (manager) gobj_send_event(manager, "EV_UNREGISTER_WINDOW", { window: gobj }, gobj);
|
|
3540
3540
|
let back_overlay = gobj_read_attr(gobj, "back_overlay");
|
|
@@ -3707,7 +3707,7 @@ function do_minimize(gobj) {
|
|
|
3707
3707
|
/************************************************************
|
|
3708
3708
|
* Build UI
|
|
3709
3709
|
************************************************************/
|
|
3710
|
-
function build_ui$
|
|
3710
|
+
function build_ui$18(gobj) {
|
|
3711
3711
|
ensure_window_style();
|
|
3712
3712
|
let mobile = is_mobile$4();
|
|
3713
3713
|
let header = gobj_read_attr(gobj, "header");
|
|
@@ -4268,15 +4268,15 @@ function ac_close(gobj, event, kw, src) {
|
|
|
4268
4268
|
/***************************
|
|
4269
4269
|
* FSM
|
|
4270
4270
|
***************************/
|
|
4271
|
-
var gmt$
|
|
4272
|
-
mt_create: mt_create$
|
|
4273
|
-
mt_destroy: mt_destroy$
|
|
4271
|
+
var gmt$21 = {
|
|
4272
|
+
mt_create: mt_create$21,
|
|
4273
|
+
mt_destroy: mt_destroy$21
|
|
4274
4274
|
};
|
|
4275
4275
|
/***************************************************************
|
|
4276
4276
|
* Create the GClass
|
|
4277
4277
|
***************************************************************/
|
|
4278
|
-
function create_gclass$
|
|
4279
|
-
if (__gclass__$
|
|
4278
|
+
function create_gclass$21(gclass_name) {
|
|
4279
|
+
if (__gclass__$21) {
|
|
4280
4280
|
log_error(`GClass ALREADY created: ${gclass_name}`);
|
|
4281
4281
|
return -1;
|
|
4282
4282
|
}
|
|
@@ -4311,15 +4311,15 @@ function create_gclass$20(gclass_name) {
|
|
|
4311
4311
|
["EV_HIDE", 0],
|
|
4312
4312
|
["EV_CLOSE_WINDOW", 0]
|
|
4313
4313
|
];
|
|
4314
|
-
__gclass__$
|
|
4315
|
-
if (!__gclass__$
|
|
4314
|
+
__gclass__$21 = gclass_create(gclass_name, event_types, states, gmt$21, 0, attrs_table$21, PRIVATE_DATA$21, 0, 0, 0, 0);
|
|
4315
|
+
if (!__gclass__$21) return -1;
|
|
4316
4316
|
return 0;
|
|
4317
4317
|
}
|
|
4318
4318
|
/***************************************************************
|
|
4319
4319
|
* Register GClass
|
|
4320
4320
|
***************************************************************/
|
|
4321
4321
|
function register_c_yui_window() {
|
|
4322
|
-
return create_gclass$
|
|
4322
|
+
return create_gclass$21(GCLASS_NAME$21);
|
|
4323
4323
|
}
|
|
4324
4324
|
//#endregion
|
|
4325
4325
|
//#region src/c_yui_window_manager.js
|
|
@@ -4357,13 +4357,13 @@ function register_c_yui_window() {
|
|
|
4357
4357
|
/***************************************************************
|
|
4358
4358
|
* Constants
|
|
4359
4359
|
***************************************************************/
|
|
4360
|
-
var GCLASS_NAME$
|
|
4360
|
+
var GCLASS_NAME$20 = "C_YUI_WINDOW_MANAGER";
|
|
4361
4361
|
var DOCK_Z = 1e6;
|
|
4362
4362
|
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>";
|
|
4363
4363
|
/***************************************************************
|
|
4364
4364
|
* Data
|
|
4365
4365
|
***************************************************************/
|
|
4366
|
-
var attrs_table$
|
|
4366
|
+
var attrs_table$20 = [
|
|
4367
4367
|
SDATA(data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
4368
4368
|
SDATA(data_type_t.DTP_STRING, "dock_mode", 0, "floating", "floating | inline | responsive (floating on wide screens, inline on narrow)"),
|
|
4369
4369
|
SDATA(data_type_t.DTP_STRING, "dock_corner", 0, "bottom-left", "Floating placement: top-left | top-right | bottom-left | bottom-right"),
|
|
@@ -4373,20 +4373,20 @@ var attrs_table$19 = [
|
|
|
4373
4373
|
SDATA(data_type_t.DTP_POINTER, "$container", 0, null, "Internal: the dock element"),
|
|
4374
4374
|
SDATA_END()
|
|
4375
4375
|
];
|
|
4376
|
-
var PRIVATE_DATA$
|
|
4376
|
+
var PRIVATE_DATA$20 = {
|
|
4377
4377
|
windows: null,
|
|
4378
4378
|
z: 0,
|
|
4379
4379
|
mql: null,
|
|
4380
4380
|
mql_handler: null
|
|
4381
4381
|
};
|
|
4382
|
-
var __gclass__$
|
|
4382
|
+
var __gclass__$20 = null;
|
|
4383
4383
|
/******************************
|
|
4384
4384
|
* Framework Methods
|
|
4385
4385
|
******************************/
|
|
4386
4386
|
/***************************************************************
|
|
4387
4387
|
* Framework Method: Create
|
|
4388
4388
|
***************************************************************/
|
|
4389
|
-
function mt_create$
|
|
4389
|
+
function mt_create$20(gobj) {
|
|
4390
4390
|
let priv = gobj.priv;
|
|
4391
4391
|
priv.windows = [];
|
|
4392
4392
|
priv.z = 10;
|
|
@@ -4405,7 +4405,7 @@ function mt_create$19(gobj) {
|
|
|
4405
4405
|
/***************************************************************
|
|
4406
4406
|
* Framework Method: Destroy
|
|
4407
4407
|
***************************************************************/
|
|
4408
|
-
function mt_destroy$
|
|
4408
|
+
function mt_destroy$20(gobj) {
|
|
4409
4409
|
let priv = gobj.priv;
|
|
4410
4410
|
if (priv.mql && priv.mql_handler) {
|
|
4411
4411
|
priv.mql.removeEventListener("change", priv.mql_handler);
|
|
@@ -4774,19 +4774,19 @@ function ac_focus_window(gobj, event, kw, src) {
|
|
|
4774
4774
|
/***************************
|
|
4775
4775
|
* FSM
|
|
4776
4776
|
***************************/
|
|
4777
|
-
var gmt$
|
|
4778
|
-
mt_create: mt_create$
|
|
4779
|
-
mt_destroy: mt_destroy$
|
|
4777
|
+
var gmt$20 = {
|
|
4778
|
+
mt_create: mt_create$20,
|
|
4779
|
+
mt_destroy: mt_destroy$20
|
|
4780
4780
|
};
|
|
4781
4781
|
/***************************************************************
|
|
4782
4782
|
* Create the GClass
|
|
4783
4783
|
***************************************************************/
|
|
4784
|
-
function create_gclass$
|
|
4785
|
-
if (__gclass__$
|
|
4784
|
+
function create_gclass$20(gclass_name) {
|
|
4785
|
+
if (__gclass__$20) {
|
|
4786
4786
|
log_error(`GClass ALREADY created: ${gclass_name}`);
|
|
4787
4787
|
return -1;
|
|
4788
4788
|
}
|
|
4789
|
-
__gclass__$
|
|
4789
|
+
__gclass__$20 = gclass_create(gclass_name, [
|
|
4790
4790
|
["EV_REGISTER_WINDOW", 0],
|
|
4791
4791
|
["EV_UNREGISTER_WINDOW", 0],
|
|
4792
4792
|
["EV_MINIMIZE_WINDOW", 0],
|
|
@@ -4812,15 +4812,15 @@ function create_gclass$19(gclass_name) {
|
|
|
4812
4812
|
ac_focus_window,
|
|
4813
4813
|
null
|
|
4814
4814
|
]
|
|
4815
|
-
]]], gmt$
|
|
4816
|
-
if (!__gclass__$
|
|
4815
|
+
]]], gmt$20, 0, attrs_table$20, PRIVATE_DATA$20, 0, 0, 0, 0);
|
|
4816
|
+
if (!__gclass__$20) return -1;
|
|
4817
4817
|
return 0;
|
|
4818
4818
|
}
|
|
4819
4819
|
/***************************************************************
|
|
4820
4820
|
* Register GClass
|
|
4821
4821
|
***************************************************************/
|
|
4822
4822
|
function register_c_yui_window_manager() {
|
|
4823
|
-
return create_gclass$
|
|
4823
|
+
return create_gclass$20(GCLASS_NAME$20);
|
|
4824
4824
|
}
|
|
4825
4825
|
//#endregion
|
|
4826
4826
|
//#region src/pager_helpers.js
|
|
@@ -4906,11 +4906,11 @@ function pager_back_action(stack, back_on_root) {
|
|
|
4906
4906
|
/***************************************************************
|
|
4907
4907
|
* Constants
|
|
4908
4908
|
***************************************************************/
|
|
4909
|
-
var GCLASS_NAME$
|
|
4909
|
+
var GCLASS_NAME$19 = "C_YUI_PAGER";
|
|
4910
4910
|
/***************************************************************
|
|
4911
4911
|
* Data
|
|
4912
4912
|
***************************************************************/
|
|
4913
|
-
var attrs_table$
|
|
4913
|
+
var attrs_table$19 = [
|
|
4914
4914
|
SDATA(data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
4915
4915
|
SDATA(data_type_t.DTP_STRING, "root_title", 0, "", "Title shown on the root page"),
|
|
4916
4916
|
SDATA(data_type_t.DTP_BOOLEAN, "back_on_root", 0, true, "On the root page the back affordance emits EV_PAGER_EXIT"),
|
|
@@ -4918,18 +4918,18 @@ var attrs_table$18 = [
|
|
|
4918
4918
|
SDATA(data_type_t.DTP_POINTER, "$container", 0, null, "HTMLElement root, mounted by the parent"),
|
|
4919
4919
|
SDATA_END()
|
|
4920
4920
|
];
|
|
4921
|
-
var PRIVATE_DATA$
|
|
4922
|
-
var __gclass__$
|
|
4921
|
+
var PRIVATE_DATA$19 = { stack: null };
|
|
4922
|
+
var __gclass__$19 = null;
|
|
4923
4923
|
/******************************
|
|
4924
4924
|
* Framework Methods
|
|
4925
4925
|
******************************/
|
|
4926
4926
|
/***************************************************************
|
|
4927
4927
|
* Framework Method: Create
|
|
4928
4928
|
***************************************************************/
|
|
4929
|
-
function mt_create$
|
|
4929
|
+
function mt_create$19(gobj) {
|
|
4930
4930
|
let priv = gobj.priv;
|
|
4931
4931
|
priv.stack = [];
|
|
4932
|
-
build_ui$
|
|
4932
|
+
build_ui$17(gobj);
|
|
4933
4933
|
let subscriber = gobj_read_pointer_attr(gobj, "subscriber");
|
|
4934
4934
|
if (!subscriber) subscriber = gobj_parent(gobj);
|
|
4935
4935
|
gobj_subscribe_event(gobj, null, {}, subscriber);
|
|
@@ -4937,17 +4937,17 @@ function mt_create$18(gobj) {
|
|
|
4937
4937
|
/***************************************************************
|
|
4938
4938
|
* Framework Method: Start
|
|
4939
4939
|
***************************************************************/
|
|
4940
|
-
function mt_start$
|
|
4940
|
+
function mt_start$19(gobj) {}
|
|
4941
4941
|
/***************************************************************
|
|
4942
4942
|
* Framework Method: Stop
|
|
4943
4943
|
***************************************************************/
|
|
4944
|
-
function mt_stop$
|
|
4944
|
+
function mt_stop$19(gobj) {
|
|
4945
4945
|
gobj_stop_children(gobj);
|
|
4946
4946
|
}
|
|
4947
4947
|
/***************************************************************
|
|
4948
4948
|
* Framework Method: Destroy
|
|
4949
4949
|
***************************************************************/
|
|
4950
|
-
function mt_destroy$
|
|
4950
|
+
function mt_destroy$19(gobj) {
|
|
4951
4951
|
destroy_ui$12(gobj);
|
|
4952
4952
|
}
|
|
4953
4953
|
/***************************
|
|
@@ -4956,7 +4956,7 @@ function mt_destroy$18(gobj) {
|
|
|
4956
4956
|
/************************************************************
|
|
4957
4957
|
* Build UI
|
|
4958
4958
|
************************************************************/
|
|
4959
|
-
function build_ui$
|
|
4959
|
+
function build_ui$17(gobj) {
|
|
4960
4960
|
let $container = createElement2([
|
|
4961
4961
|
"div",
|
|
4962
4962
|
{
|
|
@@ -5108,7 +5108,7 @@ function ac_push_page(gobj, event, kw, src) {
|
|
|
5108
5108
|
let priv = gobj.priv;
|
|
5109
5109
|
let resolved = resolve_panel$1(kw.content);
|
|
5110
5110
|
if (!resolved.$el) {
|
|
5111
|
-
log_error(`${GCLASS_NAME$
|
|
5111
|
+
log_error(`${GCLASS_NAME$19}: EV_PUSH_PAGE without content`);
|
|
5112
5112
|
return -1;
|
|
5113
5113
|
}
|
|
5114
5114
|
let $body = gobj_read_attr(gobj, "$container").querySelector(".yui-pager-body");
|
|
@@ -5161,7 +5161,7 @@ function ac_replace_page(gobj, event, kw, src) {
|
|
|
5161
5161
|
let priv = gobj.priv;
|
|
5162
5162
|
let resolved = resolve_panel$1(kw.content);
|
|
5163
5163
|
if (!resolved.$el) {
|
|
5164
|
-
log_error(`${GCLASS_NAME$
|
|
5164
|
+
log_error(`${GCLASS_NAME$19}: EV_REPLACE_PAGE without content`);
|
|
5165
5165
|
return -1;
|
|
5166
5166
|
}
|
|
5167
5167
|
let $body = gobj_read_attr(gobj, "$container").querySelector(".yui-pager-body");
|
|
@@ -5228,17 +5228,17 @@ function ac_resize$5(gobj, event, kw, src) {
|
|
|
5228
5228
|
/***************************
|
|
5229
5229
|
* FSM
|
|
5230
5230
|
***************************/
|
|
5231
|
-
var gmt$
|
|
5232
|
-
mt_create: mt_create$
|
|
5233
|
-
mt_start: mt_start$
|
|
5234
|
-
mt_stop: mt_stop$
|
|
5235
|
-
mt_destroy: mt_destroy$
|
|
5231
|
+
var gmt$19 = {
|
|
5232
|
+
mt_create: mt_create$19,
|
|
5233
|
+
mt_start: mt_start$19,
|
|
5234
|
+
mt_stop: mt_stop$19,
|
|
5235
|
+
mt_destroy: mt_destroy$19
|
|
5236
5236
|
};
|
|
5237
5237
|
/***************************************************************
|
|
5238
5238
|
* Create the GClass
|
|
5239
5239
|
***************************************************************/
|
|
5240
|
-
function create_gclass$
|
|
5241
|
-
if (__gclass__$
|
|
5240
|
+
function create_gclass$19(gclass_name) {
|
|
5241
|
+
if (__gclass__$19) {
|
|
5242
5242
|
log_error(`GClass ALREADY created: ${gclass_name}`);
|
|
5243
5243
|
return -1;
|
|
5244
5244
|
}
|
|
@@ -5303,15 +5303,15 @@ function create_gclass$18(gclass_name) {
|
|
|
5303
5303
|
["EV_PAGE_DISCARD", event_flag_t.EVF_OUTPUT_EVENT],
|
|
5304
5304
|
["EV_PAGER_EXIT", event_flag_t.EVF_OUTPUT_EVENT]
|
|
5305
5305
|
];
|
|
5306
|
-
__gclass__$
|
|
5307
|
-
if (!__gclass__$
|
|
5306
|
+
__gclass__$19 = gclass_create(gclass_name, event_types, states, gmt$19, 0, attrs_table$19, PRIVATE_DATA$19, 0, 0, 0, 0);
|
|
5307
|
+
if (!__gclass__$19) return -1;
|
|
5308
5308
|
return 0;
|
|
5309
5309
|
}
|
|
5310
5310
|
/***************************************************************
|
|
5311
5311
|
* Register GClass
|
|
5312
5312
|
***************************************************************/
|
|
5313
5313
|
function register_c_yui_pager() {
|
|
5314
|
-
return create_gclass$
|
|
5314
|
+
return create_gclass$19(GCLASS_NAME$19);
|
|
5315
5315
|
}
|
|
5316
5316
|
//#endregion
|
|
5317
5317
|
//#region src/wizard_helpers.js
|
|
@@ -5432,11 +5432,11 @@ function wizard_should_validate(linear, has_gobj) {
|
|
|
5432
5432
|
/***************************************************************
|
|
5433
5433
|
* Constants
|
|
5434
5434
|
***************************************************************/
|
|
5435
|
-
var GCLASS_NAME$
|
|
5435
|
+
var GCLASS_NAME$18 = "C_YUI_WIZARD";
|
|
5436
5436
|
/***************************************************************
|
|
5437
5437
|
* Data
|
|
5438
5438
|
***************************************************************/
|
|
5439
|
-
var attrs_table$
|
|
5439
|
+
var attrs_table$18 = [
|
|
5440
5440
|
SDATA(data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
5441
5441
|
SDATA(data_type_t.DTP_STRING, "confirm_label", 0, "confirm", "i18n key of the last-step primary button"),
|
|
5442
5442
|
SDATA(data_type_t.DTP_STRING, "next_label", 0, "next", "i18n key of the primary button (not last step)"),
|
|
@@ -5446,26 +5446,26 @@ var attrs_table$17 = [
|
|
|
5446
5446
|
SDATA(data_type_t.DTP_POINTER, "$container", 0, null, "HTMLElement root, mounted by the parent"),
|
|
5447
5447
|
SDATA_END()
|
|
5448
5448
|
];
|
|
5449
|
-
var PRIVATE_DATA$
|
|
5449
|
+
var PRIVATE_DATA$18 = {
|
|
5450
5450
|
steps: null,
|
|
5451
5451
|
idx: 0,
|
|
5452
5452
|
acc: null,
|
|
5453
5453
|
awaiting: false
|
|
5454
5454
|
};
|
|
5455
|
-
var __gclass__$
|
|
5455
|
+
var __gclass__$18 = null;
|
|
5456
5456
|
/******************************
|
|
5457
5457
|
* Framework Methods
|
|
5458
5458
|
******************************/
|
|
5459
5459
|
/***************************************************************
|
|
5460
5460
|
* Framework Method: Create
|
|
5461
5461
|
***************************************************************/
|
|
5462
|
-
function mt_create$
|
|
5462
|
+
function mt_create$18(gobj) {
|
|
5463
5463
|
let priv = gobj.priv;
|
|
5464
5464
|
priv.steps = [];
|
|
5465
5465
|
priv.idx = 0;
|
|
5466
5466
|
priv.acc = null;
|
|
5467
5467
|
priv.awaiting = false;
|
|
5468
|
-
build_ui$
|
|
5468
|
+
build_ui$16(gobj);
|
|
5469
5469
|
let subscriber = gobj_read_pointer_attr(gobj, "subscriber");
|
|
5470
5470
|
if (!subscriber) subscriber = gobj_parent(gobj);
|
|
5471
5471
|
gobj_subscribe_event(gobj, null, {}, subscriber);
|
|
@@ -5473,17 +5473,17 @@ function mt_create$17(gobj) {
|
|
|
5473
5473
|
/***************************************************************
|
|
5474
5474
|
* Framework Method: Start
|
|
5475
5475
|
***************************************************************/
|
|
5476
|
-
function mt_start$
|
|
5476
|
+
function mt_start$18(gobj) {}
|
|
5477
5477
|
/***************************************************************
|
|
5478
5478
|
* Framework Method: Stop
|
|
5479
5479
|
***************************************************************/
|
|
5480
|
-
function mt_stop$
|
|
5480
|
+
function mt_stop$18(gobj) {
|
|
5481
5481
|
gobj_stop_children(gobj);
|
|
5482
5482
|
}
|
|
5483
5483
|
/***************************************************************
|
|
5484
5484
|
* Framework Method: Destroy
|
|
5485
5485
|
***************************************************************/
|
|
5486
|
-
function mt_destroy$
|
|
5486
|
+
function mt_destroy$18(gobj) {
|
|
5487
5487
|
destroy_ui$11(gobj);
|
|
5488
5488
|
}
|
|
5489
5489
|
/***************************
|
|
@@ -5492,7 +5492,7 @@ function mt_destroy$17(gobj) {
|
|
|
5492
5492
|
/************************************************************
|
|
5493
5493
|
* Build UI
|
|
5494
5494
|
************************************************************/
|
|
5495
|
-
function build_ui$
|
|
5495
|
+
function build_ui$16(gobj) {
|
|
5496
5496
|
let $container = createElement2([
|
|
5497
5497
|
"div",
|
|
5498
5498
|
{
|
|
@@ -5693,7 +5693,7 @@ function ac_set_steps(gobj, event, kw, src) {
|
|
|
5693
5693
|
let priv = gobj.priv;
|
|
5694
5694
|
let steps_in = kw && kw.steps || [];
|
|
5695
5695
|
if (steps_in.length === 0) {
|
|
5696
|
-
log_error(`${GCLASS_NAME$
|
|
5696
|
+
log_error(`${GCLASS_NAME$18}: EV_SET_STEPS with no steps`);
|
|
5697
5697
|
return -1;
|
|
5698
5698
|
}
|
|
5699
5699
|
let $body = gobj_read_attr(gobj, "$container").querySelector(".yui-wizard-body");
|
|
@@ -5703,7 +5703,7 @@ function ac_set_steps(gobj, event, kw, src) {
|
|
|
5703
5703
|
let st = steps_in[i];
|
|
5704
5704
|
let resolved = resolve_panel(st.content);
|
|
5705
5705
|
if (!resolved.$el) {
|
|
5706
|
-
log_error(`${GCLASS_NAME$
|
|
5706
|
+
log_error(`${GCLASS_NAME$18}: step '${st.id}' has no content`);
|
|
5707
5707
|
return -1;
|
|
5708
5708
|
}
|
|
5709
5709
|
resolved.$el.classList.add("is-hidden");
|
|
@@ -5837,17 +5837,17 @@ function ac_resize$4(gobj, event, kw, src) {
|
|
|
5837
5837
|
/***************************
|
|
5838
5838
|
* FSM
|
|
5839
5839
|
***************************/
|
|
5840
|
-
var gmt$
|
|
5841
|
-
mt_create: mt_create$
|
|
5842
|
-
mt_start: mt_start$
|
|
5843
|
-
mt_stop: mt_stop$
|
|
5844
|
-
mt_destroy: mt_destroy$
|
|
5840
|
+
var gmt$18 = {
|
|
5841
|
+
mt_create: mt_create$18,
|
|
5842
|
+
mt_start: mt_start$18,
|
|
5843
|
+
mt_stop: mt_stop$18,
|
|
5844
|
+
mt_destroy: mt_destroy$18
|
|
5845
5845
|
};
|
|
5846
5846
|
/***************************************************************
|
|
5847
5847
|
* Create the GClass
|
|
5848
5848
|
***************************************************************/
|
|
5849
|
-
function create_gclass$
|
|
5850
|
-
if (__gclass__$
|
|
5849
|
+
function create_gclass$18(gclass_name) {
|
|
5850
|
+
if (__gclass__$18) {
|
|
5851
5851
|
log_error(`GClass ALREADY created: ${gclass_name}`);
|
|
5852
5852
|
return -1;
|
|
5853
5853
|
}
|
|
@@ -5925,15 +5925,15 @@ function create_gclass$17(gclass_name) {
|
|
|
5925
5925
|
["EV_WIZARD_CANCEL", event_flag_t.EVF_OUTPUT_EVENT],
|
|
5926
5926
|
["EV_STEP_VALIDATE", event_flag_t.EVF_OUTPUT_EVENT | event_flag_t.EVF_NO_WARN_SUBS]
|
|
5927
5927
|
];
|
|
5928
|
-
__gclass__$
|
|
5929
|
-
if (!__gclass__$
|
|
5928
|
+
__gclass__$18 = gclass_create(gclass_name, event_types, states, gmt$18, 0, attrs_table$18, PRIVATE_DATA$18, 0, 0, 0, 0);
|
|
5929
|
+
if (!__gclass__$18) return -1;
|
|
5930
5930
|
return 0;
|
|
5931
5931
|
}
|
|
5932
5932
|
/***************************************************************
|
|
5933
5933
|
* Register GClass
|
|
5934
5934
|
***************************************************************/
|
|
5935
5935
|
function register_c_yui_wizard() {
|
|
5936
|
-
return create_gclass$
|
|
5936
|
+
return create_gclass$18(GCLASS_NAME$18);
|
|
5937
5937
|
}
|
|
5938
5938
|
//#endregion
|
|
5939
5939
|
//#region src/yui_tabulator_i18n.js
|
|
@@ -7061,11 +7061,11 @@ function count_branches(value) {
|
|
|
7061
7061
|
/***************************************************************
|
|
7062
7062
|
* Constants
|
|
7063
7063
|
***************************************************************/
|
|
7064
|
-
var GCLASS_NAME$
|
|
7064
|
+
var GCLASS_NAME$17 = "C_YUI_FORM";
|
|
7065
7065
|
/***************************************************************
|
|
7066
7066
|
* Data
|
|
7067
7067
|
***************************************************************/
|
|
7068
|
-
var attrs_table$
|
|
7068
|
+
var attrs_table$17 = [
|
|
7069
7069
|
SDATA(data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of publishing messages"),
|
|
7070
7070
|
SDATA(data_type_t.DTP_POINTER, "$parent", 0, null, "$container will be appended to $parent if not null, else do it manually"),
|
|
7071
7071
|
SDATA(data_type_t.DTP_POINTER, "template", 0, "<div>You must supply a template for form</div>", "Template for form, object -> TEMPLATE, array -> DESC"),
|
|
@@ -7095,41 +7095,41 @@ var attrs_table$16 = [
|
|
|
7095
7095
|
SDATA(data_type_t.DTP_BOOLEAN, "changes", 0, false, "Indicates if changes have been made"),
|
|
7096
7096
|
SDATA_END()
|
|
7097
7097
|
];
|
|
7098
|
-
var PRIVATE_DATA$
|
|
7099
|
-
var __gclass__$
|
|
7098
|
+
var PRIVATE_DATA$17 = {};
|
|
7099
|
+
var __gclass__$17 = null;
|
|
7100
7100
|
/***************************
|
|
7101
7101
|
* Framework Methods
|
|
7102
7102
|
***************************/
|
|
7103
7103
|
/************************************************************
|
|
7104
7104
|
* Framework Method create
|
|
7105
7105
|
************************************************************/
|
|
7106
|
-
function mt_create$
|
|
7106
|
+
function mt_create$17(gobj) {
|
|
7107
7107
|
let subscriber = gobj_read_pointer_attr(gobj, "subscriber");
|
|
7108
7108
|
if (!subscriber) subscriber = gobj_parent(gobj);
|
|
7109
7109
|
gobj_subscribe_event(gobj, null, {}, subscriber);
|
|
7110
7110
|
let name = clean_name(gobj_name(gobj));
|
|
7111
7111
|
gobj_write_attr(gobj, "form_id", "form" + name);
|
|
7112
|
-
build_ui$
|
|
7112
|
+
build_ui$15(gobj);
|
|
7113
7113
|
}
|
|
7114
7114
|
/************************************************************
|
|
7115
7115
|
* Framework Method destroy
|
|
7116
7116
|
* In this point, all children
|
|
7117
7117
|
* and subscriptions are already deleted.
|
|
7118
7118
|
************************************************************/
|
|
7119
|
-
function mt_destroy$
|
|
7119
|
+
function mt_destroy$17(gobj) {
|
|
7120
7120
|
destroy_ui$10(gobj);
|
|
7121
7121
|
}
|
|
7122
7122
|
/************************************************************
|
|
7123
7123
|
* Framework Method start
|
|
7124
7124
|
************************************************************/
|
|
7125
|
-
function mt_start$
|
|
7125
|
+
function mt_start$17(gobj) {
|
|
7126
7126
|
let record = gobj_read_attr(gobj, "record");
|
|
7127
7127
|
if (record) gobj_send_event(gobj, "EV_LOAD_RECORD", record, gobj);
|
|
7128
7128
|
}
|
|
7129
7129
|
/************************************************************
|
|
7130
7130
|
* Framework Method stop
|
|
7131
7131
|
************************************************************/
|
|
7132
|
-
function mt_stop$
|
|
7132
|
+
function mt_stop$17(gobj) {}
|
|
7133
7133
|
/***************************
|
|
7134
7134
|
* Local Methods
|
|
7135
7135
|
***************************/
|
|
@@ -7384,7 +7384,7 @@ function build_toolbar(gobj) {
|
|
|
7384
7384
|
/************************************************************
|
|
7385
7385
|
* Build UI
|
|
7386
7386
|
************************************************************/
|
|
7387
|
-
function build_ui$
|
|
7387
|
+
function build_ui$15(gobj) {
|
|
7388
7388
|
let $container = createElement2([
|
|
7389
7389
|
"div",
|
|
7390
7390
|
{
|
|
@@ -9402,18 +9402,18 @@ function cmd_get_picked_files(gobj, cmd, kw, src) {
|
|
|
9402
9402
|
data: files
|
|
9403
9403
|
};
|
|
9404
9404
|
}
|
|
9405
|
-
var gmt$
|
|
9406
|
-
mt_create: mt_create$
|
|
9407
|
-
mt_start: mt_start$
|
|
9408
|
-
mt_stop: mt_stop$
|
|
9409
|
-
mt_destroy: mt_destroy$
|
|
9405
|
+
var gmt$17 = {
|
|
9406
|
+
mt_create: mt_create$17,
|
|
9407
|
+
mt_start: mt_start$17,
|
|
9408
|
+
mt_stop: mt_stop$17,
|
|
9409
|
+
mt_destroy: mt_destroy$17,
|
|
9410
9410
|
mt_command_parser: mt_command_parser$2
|
|
9411
9411
|
};
|
|
9412
9412
|
/***************************************************************
|
|
9413
9413
|
* Create the GClass
|
|
9414
9414
|
***************************************************************/
|
|
9415
|
-
function create_gclass$
|
|
9416
|
-
if (__gclass__$
|
|
9415
|
+
function create_gclass$17(gclass_name) {
|
|
9416
|
+
if (__gclass__$17) {
|
|
9417
9417
|
log_error(`GClass ALREADY created: ${gclass_name}`);
|
|
9418
9418
|
return -1;
|
|
9419
9419
|
}
|
|
@@ -9511,16 +9511,16 @@ function create_gclass$16(gclass_name) {
|
|
|
9511
9511
|
["EV_HIDE", 0],
|
|
9512
9512
|
["EV_TIMEOUT", 0]
|
|
9513
9513
|
];
|
|
9514
|
-
__gclass__$
|
|
9515
|
-
if (!__gclass__$
|
|
9514
|
+
__gclass__$17 = gclass_create(gclass_name, event_types, states, gmt$17, 0, attrs_table$17, PRIVATE_DATA$17, 0, 0, 0, 0);
|
|
9515
|
+
if (!__gclass__$17) return -1;
|
|
9516
9516
|
return 0;
|
|
9517
9517
|
}
|
|
9518
9518
|
/***************************************************************
|
|
9519
9519
|
* Register GClass
|
|
9520
9520
|
***************************************************************/
|
|
9521
9521
|
function register_c_yui_form() {
|
|
9522
|
-
if (gclass_find_by_name(GCLASS_NAME$
|
|
9523
|
-
return create_gclass$
|
|
9522
|
+
if (gclass_find_by_name(GCLASS_NAME$17, false)) return 0;
|
|
9523
|
+
return create_gclass$17(GCLASS_NAME$17);
|
|
9524
9524
|
}
|
|
9525
9525
|
//#endregion
|
|
9526
9526
|
//#region src/lib_maplibre.js
|
|
@@ -9758,12 +9758,12 @@ function yui_maplibre_relocalize(map, t) {
|
|
|
9758
9758
|
/***************************************************************
|
|
9759
9759
|
* Constants
|
|
9760
9760
|
***************************************************************/
|
|
9761
|
-
var GCLASS_NAME$
|
|
9761
|
+
var GCLASS_NAME$16 = "C_YUI_MAP";
|
|
9762
9762
|
var GESTURE_HINT_MS = 2e3;
|
|
9763
9763
|
/***************************************************************
|
|
9764
9764
|
* Data
|
|
9765
9765
|
***************************************************************/
|
|
9766
|
-
var attrs_table$
|
|
9766
|
+
var attrs_table$16 = [
|
|
9767
9767
|
SDATA(data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
9768
9768
|
SDATA(data_type_t.DTP_JSON, "devices", "[]", null, "List of devices"),
|
|
9769
9769
|
SDATA(data_type_t.DTP_JSON, "map_settings", 0, {
|
|
@@ -9784,7 +9784,7 @@ var attrs_table$15 = [
|
|
|
9784
9784
|
SDATA(data_type_t.DTP_INTEGER, "timeout_idle", 0, 5, "Idle timeout in seconds"),
|
|
9785
9785
|
SDATA_END()
|
|
9786
9786
|
];
|
|
9787
|
-
var PRIVATE_DATA$
|
|
9787
|
+
var PRIVATE_DATA$16 = {
|
|
9788
9788
|
xmap: null,
|
|
9789
9789
|
gesture_hint_timer: null,
|
|
9790
9790
|
geojson: null,
|
|
@@ -9794,21 +9794,21 @@ var PRIVATE_DATA$15 = {
|
|
|
9794
9794
|
markers: {},
|
|
9795
9795
|
draggedFeature: null
|
|
9796
9796
|
};
|
|
9797
|
-
var __gclass__$
|
|
9797
|
+
var __gclass__$16 = null;
|
|
9798
9798
|
/******************************
|
|
9799
9799
|
* Framework Methods
|
|
9800
9800
|
******************************/
|
|
9801
9801
|
/***************************************************************
|
|
9802
9802
|
* Framework Method: Create
|
|
9803
9803
|
***************************************************************/
|
|
9804
|
-
function mt_create$
|
|
9804
|
+
function mt_create$16(gobj) {
|
|
9805
9805
|
let priv = gobj.priv;
|
|
9806
9806
|
let subscriber = gobj_read_pointer_attr(gobj, "subscriber");
|
|
9807
9807
|
if (!subscriber) subscriber = gobj_parent(gobj);
|
|
9808
9808
|
gobj_subscribe_event(gobj, null, {}, subscriber);
|
|
9809
9809
|
let map_settings = json_deep_copy(gobj_read_attr(gobj, "map_settings"));
|
|
9810
9810
|
let $map = gobj_read_attr(gobj, "$map");
|
|
9811
|
-
if ($map) $map.classList.add(GCLASS_NAME$
|
|
9811
|
+
if ($map) $map.classList.add(GCLASS_NAME$16);
|
|
9812
9812
|
Object.assign(map_settings, {
|
|
9813
9813
|
container: $map,
|
|
9814
9814
|
cooperativeGestures: true,
|
|
@@ -9887,7 +9887,7 @@ function ac_language_changed$9(gobj, event, kw, src) {
|
|
|
9887
9887
|
* in OUR dom -- cannot touch any of it. The shell says when the
|
|
9888
9888
|
* language changed and this view rewrites those strings.
|
|
9889
9889
|
***************************************************************/
|
|
9890
|
-
function mt_start$
|
|
9890
|
+
function mt_start$16(gobj) {
|
|
9891
9891
|
let shell = yui_shell_of(gobj);
|
|
9892
9892
|
if (shell) gobj_subscribe_event(shell, "EV_LANGUAGE_CHANGED", {}, gobj);
|
|
9893
9893
|
return 0;
|
|
@@ -9895,7 +9895,7 @@ function mt_start$15(gobj) {
|
|
|
9895
9895
|
/***************************************************************
|
|
9896
9896
|
* Framework Method: Stop
|
|
9897
9897
|
***************************************************************/
|
|
9898
|
-
function mt_stop$
|
|
9898
|
+
function mt_stop$16(gobj) {
|
|
9899
9899
|
let shell = yui_shell_of(gobj);
|
|
9900
9900
|
if (shell) gobj_unsubscribe_event(shell, "EV_LANGUAGE_CHANGED", {}, gobj);
|
|
9901
9901
|
return 0;
|
|
@@ -9903,7 +9903,7 @@ function mt_stop$15(gobj) {
|
|
|
9903
9903
|
/***************************************************************
|
|
9904
9904
|
* Framework Method: Destroy
|
|
9905
9905
|
***************************************************************/
|
|
9906
|
-
function mt_destroy$
|
|
9906
|
+
function mt_destroy$16(gobj) {
|
|
9907
9907
|
let priv = gobj.priv;
|
|
9908
9908
|
if (priv.gesture_hint_timer) {
|
|
9909
9909
|
clearTimeout(priv.gesture_hint_timer);
|
|
@@ -10367,21 +10367,21 @@ function ac_hide$10(gobj, event, kw, src) {
|
|
|
10367
10367
|
/***************************
|
|
10368
10368
|
* FSM
|
|
10369
10369
|
***************************/
|
|
10370
|
-
var gmt$
|
|
10371
|
-
mt_create: mt_create$
|
|
10372
|
-
mt_start: mt_start$
|
|
10373
|
-
mt_stop: mt_stop$
|
|
10374
|
-
mt_destroy: mt_destroy$
|
|
10370
|
+
var gmt$16 = {
|
|
10371
|
+
mt_create: mt_create$16,
|
|
10372
|
+
mt_start: mt_start$16,
|
|
10373
|
+
mt_stop: mt_stop$16,
|
|
10374
|
+
mt_destroy: mt_destroy$16
|
|
10375
10375
|
};
|
|
10376
10376
|
/***************************************************************
|
|
10377
10377
|
* Create the GClass
|
|
10378
10378
|
***************************************************************/
|
|
10379
|
-
function create_gclass$
|
|
10380
|
-
if (__gclass__$
|
|
10379
|
+
function create_gclass$16(gclass_name) {
|
|
10380
|
+
if (__gclass__$16) {
|
|
10381
10381
|
log_error(`GClass ALREADY created: ${gclass_name}`);
|
|
10382
10382
|
return -1;
|
|
10383
10383
|
}
|
|
10384
|
-
__gclass__$
|
|
10384
|
+
__gclass__$16 = gclass_create(gclass_name, [
|
|
10385
10385
|
["EV_LANGUAGE_CHANGED", 0],
|
|
10386
10386
|
["EV_EDIT_MAP", 0],
|
|
10387
10387
|
["EV_CONTROL_MAP", 0],
|
|
@@ -10431,15 +10431,15 @@ function create_gclass$15(gclass_name) {
|
|
|
10431
10431
|
ac_hide$10,
|
|
10432
10432
|
null
|
|
10433
10433
|
]
|
|
10434
|
-
]]], gmt$
|
|
10435
|
-
if (!__gclass__$
|
|
10434
|
+
]]], gmt$16, 0, attrs_table$16, PRIVATE_DATA$16, 0, 0, 0, 0);
|
|
10435
|
+
if (!__gclass__$16) return -1;
|
|
10436
10436
|
return 0;
|
|
10437
10437
|
}
|
|
10438
10438
|
/***************************************************************
|
|
10439
10439
|
* Register GClass
|
|
10440
10440
|
***************************************************************/
|
|
10441
10441
|
function register_c_yui_map() {
|
|
10442
|
-
return create_gclass$
|
|
10442
|
+
return create_gclass$16(GCLASS_NAME$16);
|
|
10443
10443
|
}
|
|
10444
10444
|
//#endregion
|
|
10445
10445
|
//#region src/c_yui_uplot.js
|
|
@@ -10514,11 +10514,11 @@ function themed_axes(axes) {
|
|
|
10514
10514
|
/***************************************************************
|
|
10515
10515
|
* Constants
|
|
10516
10516
|
***************************************************************/
|
|
10517
|
-
var GCLASS_NAME$
|
|
10517
|
+
var GCLASS_NAME$15 = "C_YUI_UPLOT";
|
|
10518
10518
|
/***************************************************************
|
|
10519
10519
|
* Data
|
|
10520
10520
|
***************************************************************/
|
|
10521
|
-
var attrs_table$
|
|
10521
|
+
var attrs_table$15 = [
|
|
10522
10522
|
SDATA(data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
10523
10523
|
SDATA(data_type_t.DTP_STRING, "title", 0, "", "Chart title"),
|
|
10524
10524
|
SDATA(data_type_t.DTP_INTEGER, "width", 0, 800, "Chart width"),
|
|
@@ -10536,16 +10536,16 @@ var attrs_table$14 = [
|
|
|
10536
10536
|
SDATA(data_type_t.DTP_INTEGER, "timeout_idle", 0, 5, "Idle timeout (seconds)"),
|
|
10537
10537
|
SDATA_END()
|
|
10538
10538
|
];
|
|
10539
|
-
var PRIVATE_DATA$
|
|
10540
|
-
var __gclass__$
|
|
10539
|
+
var PRIVATE_DATA$15 = { theme_observer: null };
|
|
10540
|
+
var __gclass__$15 = null;
|
|
10541
10541
|
/******************************
|
|
10542
10542
|
* Framework Methods
|
|
10543
10543
|
******************************/
|
|
10544
10544
|
/***************************************************************
|
|
10545
10545
|
* Framework Method: Create
|
|
10546
10546
|
***************************************************************/
|
|
10547
|
-
function mt_create$
|
|
10548
|
-
build_ui$
|
|
10547
|
+
function mt_create$15(gobj) {
|
|
10548
|
+
build_ui$14(gobj);
|
|
10549
10549
|
gobj.priv.theme_observer = yui_watch_theme(gobj);
|
|
10550
10550
|
let subscriber = gobj_read_pointer_attr(gobj, "subscriber");
|
|
10551
10551
|
if (!subscriber) subscriber = gobj_parent(gobj);
|
|
@@ -10554,15 +10554,15 @@ function mt_create$14(gobj) {
|
|
|
10554
10554
|
/***************************************************************
|
|
10555
10555
|
* Framework Method: Start
|
|
10556
10556
|
***************************************************************/
|
|
10557
|
-
function mt_start$
|
|
10557
|
+
function mt_start$15(gobj) {}
|
|
10558
10558
|
/***************************************************************
|
|
10559
10559
|
* Framework Method: Stop
|
|
10560
10560
|
***************************************************************/
|
|
10561
|
-
function mt_stop$
|
|
10561
|
+
function mt_stop$15(gobj) {}
|
|
10562
10562
|
/***************************************************************
|
|
10563
10563
|
* Framework Method: Destroy
|
|
10564
10564
|
***************************************************************/
|
|
10565
|
-
function mt_destroy$
|
|
10565
|
+
function mt_destroy$15(gobj) {
|
|
10566
10566
|
if (gobj.priv.theme_observer) {
|
|
10567
10567
|
gobj.priv.theme_observer.disconnect();
|
|
10568
10568
|
gobj.priv.theme_observer = null;
|
|
@@ -10580,7 +10580,7 @@ function mt_destroy$14(gobj) {
|
|
|
10580
10580
|
/************************************************************
|
|
10581
10581
|
* Build UI
|
|
10582
10582
|
************************************************************/
|
|
10583
|
-
function build_ui$
|
|
10583
|
+
function build_ui$14(gobj) {
|
|
10584
10584
|
let $container = gobj_read_attr(gobj, "$container");
|
|
10585
10585
|
if (!$container) {
|
|
10586
10586
|
$container = createElement2(["div", {
|
|
@@ -10737,7 +10737,7 @@ function ac_del_serie(gobj, event, kw, src) {
|
|
|
10737
10737
|
/******************************************************
|
|
10738
10738
|
*
|
|
10739
10739
|
******************************************************/
|
|
10740
|
-
function ac_clear(gobj, event, kw, src) {
|
|
10740
|
+
function ac_clear$1(gobj, event, kw, src) {
|
|
10741
10741
|
let uplot = gobj_read_attr(gobj, "uplot");
|
|
10742
10742
|
uplot.setData([[]]);
|
|
10743
10743
|
for (let idx = uplot.series.length - 1; idx > 0; idx--) uplot.delSeries(idx);
|
|
@@ -10746,21 +10746,21 @@ function ac_clear(gobj, event, kw, src) {
|
|
|
10746
10746
|
/***************************
|
|
10747
10747
|
* FSM
|
|
10748
10748
|
***************************/
|
|
10749
|
-
var gmt$
|
|
10750
|
-
mt_create: mt_create$
|
|
10751
|
-
mt_start: mt_start$
|
|
10752
|
-
mt_stop: mt_stop$
|
|
10753
|
-
mt_destroy: mt_destroy$
|
|
10749
|
+
var gmt$15 = {
|
|
10750
|
+
mt_create: mt_create$15,
|
|
10751
|
+
mt_start: mt_start$15,
|
|
10752
|
+
mt_stop: mt_stop$15,
|
|
10753
|
+
mt_destroy: mt_destroy$15
|
|
10754
10754
|
};
|
|
10755
10755
|
/***************************************************************
|
|
10756
10756
|
* Create the GClass
|
|
10757
10757
|
***************************************************************/
|
|
10758
|
-
function create_gclass$
|
|
10759
|
-
if (__gclass__$
|
|
10758
|
+
function create_gclass$15(gclass_name) {
|
|
10759
|
+
if (__gclass__$15) {
|
|
10760
10760
|
log_error(`GClass ALREADY created: ${gclass_name}`);
|
|
10761
10761
|
return -1;
|
|
10762
10762
|
}
|
|
10763
|
-
__gclass__$
|
|
10763
|
+
__gclass__$15 = gclass_create(gclass_name, [
|
|
10764
10764
|
["EV_LOAD_DATA", 0],
|
|
10765
10765
|
["EV_ADD_SERIE", 0],
|
|
10766
10766
|
["EV_DEL_SERIE", 0],
|
|
@@ -10784,7 +10784,7 @@ function create_gclass$14(gclass_name) {
|
|
|
10784
10784
|
],
|
|
10785
10785
|
[
|
|
10786
10786
|
"EV_CLEAR",
|
|
10787
|
-
ac_clear,
|
|
10787
|
+
ac_clear$1,
|
|
10788
10788
|
null
|
|
10789
10789
|
],
|
|
10790
10790
|
[
|
|
@@ -10792,15 +10792,15 @@ function create_gclass$14(gclass_name) {
|
|
|
10792
10792
|
ac_theme$4,
|
|
10793
10793
|
null
|
|
10794
10794
|
]
|
|
10795
|
-
]]], gmt$
|
|
10796
|
-
if (!__gclass__$
|
|
10795
|
+
]]], gmt$15, 0, attrs_table$15, PRIVATE_DATA$15, 0, 0, 0, 0);
|
|
10796
|
+
if (!__gclass__$15) return -1;
|
|
10797
10797
|
return 0;
|
|
10798
10798
|
}
|
|
10799
10799
|
/***************************************************************
|
|
10800
10800
|
* Register GClass
|
|
10801
10801
|
***************************************************************/
|
|
10802
10802
|
function register_c_yui_uplot() {
|
|
10803
|
-
return create_gclass$
|
|
10803
|
+
return create_gclass$15(GCLASS_NAME$15);
|
|
10804
10804
|
}
|
|
10805
10805
|
//#endregion
|
|
10806
10806
|
//#region src/yui_toolbar.js
|
|
@@ -11890,7 +11890,7 @@ function ensure_drag_canvas_patch() {
|
|
|
11890
11890
|
/***************************************************************
|
|
11891
11891
|
* Constants
|
|
11892
11892
|
***************************************************************/
|
|
11893
|
-
var GCLASS_NAME$
|
|
11893
|
+
var GCLASS_NAME$14 = "C_YUI_JSON_GRAPH";
|
|
11894
11894
|
var FOLD_SWALLOWED_EVENTS$1 = [
|
|
11895
11895
|
"pointerdown",
|
|
11896
11896
|
"pointerup",
|
|
@@ -11950,7 +11950,7 @@ function layout_label(key) {
|
|
|
11950
11950
|
/***************************************************************
|
|
11951
11951
|
* Data
|
|
11952
11952
|
***************************************************************/
|
|
11953
|
-
var attrs_table$
|
|
11953
|
+
var attrs_table$14 = [
|
|
11954
11954
|
SDATA(data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
11955
11955
|
SDATA(data_type_t.DTP_STRING, "path", 0, "", "Root path label"),
|
|
11956
11956
|
SDATA(data_type_t.DTP_JSON, "json_data", 0, null, "JSON data to visualize"),
|
|
@@ -11960,7 +11960,7 @@ var attrs_table$13 = [
|
|
|
11960
11960
|
SDATA(data_type_t.DTP_STRING, "layout", 0, "json-tree", "Layout key (see LAYOUTS)"),
|
|
11961
11961
|
SDATA_END()
|
|
11962
11962
|
];
|
|
11963
|
-
var PRIVATE_DATA$
|
|
11963
|
+
var PRIVATE_DATA$14 = {
|
|
11964
11964
|
canvas_id: "",
|
|
11965
11965
|
graph: null,
|
|
11966
11966
|
node_counter: 0,
|
|
@@ -11985,7 +11985,7 @@ var PRIVATE_DATA$13 = {
|
|
|
11985
11985
|
center_posted: false,
|
|
11986
11986
|
pending_keep: null
|
|
11987
11987
|
};
|
|
11988
|
-
var __gclass__$
|
|
11988
|
+
var __gclass__$14 = null;
|
|
11989
11989
|
var __layout_registered__$1 = false;
|
|
11990
11990
|
/***************************************************************
|
|
11991
11991
|
* Type colours, ONE EXPLICIT PALETTE PER THEME and not a
|
|
@@ -12090,7 +12090,7 @@ function type_color(type, dark) {
|
|
|
12090
12090
|
/***************************************************************
|
|
12091
12091
|
* Framework Method: Create
|
|
12092
12092
|
***************************************************************/
|
|
12093
|
-
function mt_create$
|
|
12093
|
+
function mt_create$14(gobj) {
|
|
12094
12094
|
let priv = gobj.priv;
|
|
12095
12095
|
priv.collapsed = /* @__PURE__ */ new Set();
|
|
12096
12096
|
priv.reserved = /* @__PURE__ */ new Map();
|
|
@@ -12102,7 +12102,7 @@ function mt_create$13(gobj) {
|
|
|
12102
12102
|
gobj_subscribe_event(gobj, null, {}, subscriber);
|
|
12103
12103
|
priv.theme = yui_theme_now();
|
|
12104
12104
|
priv.theme_observer = yui_watch_theme(gobj);
|
|
12105
|
-
build_ui$
|
|
12105
|
+
build_ui$13(gobj);
|
|
12106
12106
|
ensure_drag_canvas_patch();
|
|
12107
12107
|
ensure_pinch_zoom_patch();
|
|
12108
12108
|
if (!__layout_registered__$1) {
|
|
@@ -12113,18 +12113,18 @@ function mt_create$13(gobj) {
|
|
|
12113
12113
|
/***************************************************************
|
|
12114
12114
|
* Framework Method: Start
|
|
12115
12115
|
***************************************************************/
|
|
12116
|
-
function mt_start$
|
|
12116
|
+
function mt_start$14(gobj) {
|
|
12117
12117
|
build_graph$4(gobj);
|
|
12118
12118
|
load_json(gobj);
|
|
12119
12119
|
}
|
|
12120
12120
|
/***************************************************************
|
|
12121
12121
|
* Framework Method: Stop
|
|
12122
12122
|
***************************************************************/
|
|
12123
|
-
function mt_stop$
|
|
12123
|
+
function mt_stop$14(gobj) {}
|
|
12124
12124
|
/***************************************************************
|
|
12125
12125
|
* Framework Method: Destroy
|
|
12126
12126
|
***************************************************************/
|
|
12127
|
-
function mt_destroy$
|
|
12127
|
+
function mt_destroy$14(gobj) {
|
|
12128
12128
|
if (gobj.priv.find_timer) {
|
|
12129
12129
|
clearTimeout(gobj.priv.find_timer);
|
|
12130
12130
|
gobj.priv.find_timer = null;
|
|
@@ -12154,7 +12154,7 @@ function mt_destroy$13(gobj) {
|
|
|
12154
12154
|
/************************************************************
|
|
12155
12155
|
* Build UI
|
|
12156
12156
|
************************************************************/
|
|
12157
|
-
function build_ui$
|
|
12157
|
+
function build_ui$13(gobj) {
|
|
12158
12158
|
let priv = gobj.priv;
|
|
12159
12159
|
let $toolbar = make_toolbar$5(gobj);
|
|
12160
12160
|
let $container = createElement2([
|
|
@@ -13376,17 +13376,17 @@ function ac_hide$9(gobj, event, kw, src) {
|
|
|
13376
13376
|
/***************************
|
|
13377
13377
|
* FSM
|
|
13378
13378
|
***************************/
|
|
13379
|
-
var gmt$
|
|
13380
|
-
mt_create: mt_create$
|
|
13381
|
-
mt_start: mt_start$
|
|
13382
|
-
mt_stop: mt_stop$
|
|
13383
|
-
mt_destroy: mt_destroy$
|
|
13379
|
+
var gmt$14 = {
|
|
13380
|
+
mt_create: mt_create$14,
|
|
13381
|
+
mt_start: mt_start$14,
|
|
13382
|
+
mt_stop: mt_stop$14,
|
|
13383
|
+
mt_destroy: mt_destroy$14
|
|
13384
13384
|
};
|
|
13385
13385
|
/***************************************************************
|
|
13386
13386
|
* Create the GClass
|
|
13387
13387
|
***************************************************************/
|
|
13388
|
-
function create_gclass$
|
|
13389
|
-
if (__gclass__$
|
|
13388
|
+
function create_gclass$14(gclass_name) {
|
|
13389
|
+
if (__gclass__$14) {
|
|
13390
13390
|
log_error(`GClass ALREADY created: ${gclass_name}`);
|
|
13391
13391
|
return -1;
|
|
13392
13392
|
}
|
|
@@ -13503,16 +13503,16 @@ function create_gclass$13(gclass_name) {
|
|
|
13503
13503
|
["EV_HIDE", 0],
|
|
13504
13504
|
["EV_JSON_ITEM_CLICKED", event_flag_t.EVF_OUTPUT_EVENT]
|
|
13505
13505
|
];
|
|
13506
|
-
__gclass__$
|
|
13507
|
-
if (!__gclass__$
|
|
13506
|
+
__gclass__$14 = gclass_create(gclass_name, event_types, states, gmt$14, 0, attrs_table$14, PRIVATE_DATA$14, 0, 0, 0, 0);
|
|
13507
|
+
if (!__gclass__$14) return -1;
|
|
13508
13508
|
return 0;
|
|
13509
13509
|
}
|
|
13510
13510
|
/***************************************************************
|
|
13511
13511
|
* Register GClass
|
|
13512
13512
|
***************************************************************/
|
|
13513
13513
|
function register_c_yui_json_graph() {
|
|
13514
|
-
if (gclass_find_by_name(GCLASS_NAME$
|
|
13515
|
-
return create_gclass$
|
|
13514
|
+
if (gclass_find_by_name(GCLASS_NAME$14, false)) return 0;
|
|
13515
|
+
return create_gclass$14(GCLASS_NAME$14);
|
|
13516
13516
|
}
|
|
13517
13517
|
//#endregion
|
|
13518
13518
|
//#region src/c_yui_json.js
|
|
@@ -13577,7 +13577,7 @@ function register_c_yui_json_graph() {
|
|
|
13577
13577
|
/***************************************************************
|
|
13578
13578
|
* Constants
|
|
13579
13579
|
***************************************************************/
|
|
13580
|
-
var GCLASS_NAME$
|
|
13580
|
+
var GCLASS_NAME$13 = "C_YUI_JSON";
|
|
13581
13581
|
var MAX_RENDER_ROWS = 5e3;
|
|
13582
13582
|
var MAX_TEXT_CHARS = 2e6;
|
|
13583
13583
|
var MAX_LABEL_CHARS = 40;
|
|
@@ -13602,7 +13602,7 @@ var VIEW_MODE_STORAGE_KEY = "yui_json_view_mode";
|
|
|
13602
13602
|
/***************************************************************
|
|
13603
13603
|
* Data
|
|
13604
13604
|
***************************************************************/
|
|
13605
|
-
var attrs_table$
|
|
13605
|
+
var attrs_table$13 = [
|
|
13606
13606
|
SDATA(data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
13607
13607
|
SDATA(data_type_t.DTP_STRING, "title", 0, "", "Optional header title (i18n key)"),
|
|
13608
13608
|
SDATA(data_type_t.DTP_JSON, "json_data", 0, null, "Initial JSON to render (usually already collapsed)"),
|
|
@@ -13610,7 +13610,7 @@ var attrs_table$12 = [
|
|
|
13610
13610
|
SDATA(data_type_t.DTP_POINTER, "$container", 0, null, "HTMLElement root, mounted by the parent"),
|
|
13611
13611
|
SDATA_END()
|
|
13612
13612
|
];
|
|
13613
|
-
var PRIVATE_DATA$
|
|
13613
|
+
var PRIVATE_DATA$13 = {
|
|
13614
13614
|
root: null,
|
|
13615
13615
|
expanded: null,
|
|
13616
13616
|
pending: null,
|
|
@@ -13627,14 +13627,14 @@ var PRIVATE_DATA$12 = {
|
|
|
13627
13627
|
$collapse_btn: null,
|
|
13628
13628
|
$mode_btns: null
|
|
13629
13629
|
};
|
|
13630
|
-
var __gclass__$
|
|
13630
|
+
var __gclass__$13 = null;
|
|
13631
13631
|
/******************************
|
|
13632
13632
|
* Framework Methods
|
|
13633
13633
|
******************************/
|
|
13634
13634
|
/***************************************************************
|
|
13635
13635
|
* Framework Method: Create
|
|
13636
13636
|
***************************************************************/
|
|
13637
|
-
function mt_create$
|
|
13637
|
+
function mt_create$13(gobj) {
|
|
13638
13638
|
let priv = gobj.priv;
|
|
13639
13639
|
priv.expanded = /* @__PURE__ */ new Set();
|
|
13640
13640
|
priv.pending = /* @__PURE__ */ new Set();
|
|
@@ -13642,7 +13642,7 @@ function mt_create$12(gobj) {
|
|
|
13642
13642
|
priv.search = "";
|
|
13643
13643
|
let json_data = gobj_read_attr(gobj, "json_data");
|
|
13644
13644
|
if (json_data !== null && json_data !== void 0) priv.root = json_deep_copy(json_data);
|
|
13645
|
-
build_ui$
|
|
13645
|
+
build_ui$12(gobj);
|
|
13646
13646
|
resolve_initial_view_mode(gobj);
|
|
13647
13647
|
apply_view_mode$1(gobj);
|
|
13648
13648
|
let subscriber = gobj_read_pointer_attr(gobj, "subscriber");
|
|
@@ -13652,19 +13652,19 @@ function mt_create$12(gobj) {
|
|
|
13652
13652
|
/***************************************************************
|
|
13653
13653
|
* Framework Method: Start
|
|
13654
13654
|
***************************************************************/
|
|
13655
|
-
function mt_start$
|
|
13655
|
+
function mt_start$13(gobj) {
|
|
13656
13656
|
render_view$1(gobj);
|
|
13657
13657
|
}
|
|
13658
13658
|
/***************************************************************
|
|
13659
13659
|
* Framework Method: Stop
|
|
13660
13660
|
***************************************************************/
|
|
13661
|
-
function mt_stop$
|
|
13661
|
+
function mt_stop$13(gobj) {
|
|
13662
13662
|
teardown_graph_child$1(gobj);
|
|
13663
13663
|
}
|
|
13664
13664
|
/***************************************************************
|
|
13665
13665
|
* Framework Method: Destroy
|
|
13666
13666
|
***************************************************************/
|
|
13667
|
-
function mt_destroy$
|
|
13667
|
+
function mt_destroy$13(gobj) {
|
|
13668
13668
|
destroy_ui$7(gobj);
|
|
13669
13669
|
}
|
|
13670
13670
|
/***************************
|
|
@@ -13673,7 +13673,7 @@ function mt_destroy$12(gobj) {
|
|
|
13673
13673
|
/************************************************************
|
|
13674
13674
|
* Build UI
|
|
13675
13675
|
************************************************************/
|
|
13676
|
-
function build_ui$
|
|
13676
|
+
function build_ui$12(gobj) {
|
|
13677
13677
|
let priv = gobj.priv;
|
|
13678
13678
|
let $toolbar = make_toolbar$4(gobj);
|
|
13679
13679
|
let $container = createElement2([
|
|
@@ -14068,7 +14068,7 @@ function render_text(gobj) {
|
|
|
14068
14068
|
return;
|
|
14069
14069
|
}
|
|
14070
14070
|
let dump = json_text_dump(priv.root, MAX_TEXT_CHARS);
|
|
14071
|
-
if (dump.error) log_error(`${GCLASS_NAME$
|
|
14071
|
+
if (dump.error) log_error(`${GCLASS_NAME$13}: cannot dump the document as text: ${dump.error}`);
|
|
14072
14072
|
let $pre = createElement2([
|
|
14073
14073
|
"pre",
|
|
14074
14074
|
{ class: "JSON_TEXT_BODY" },
|
|
@@ -14451,7 +14451,7 @@ function ac_subtree_error(gobj, event, kw, src) {
|
|
|
14451
14451
|
let path = kw.path || "";
|
|
14452
14452
|
priv.pending.delete(path);
|
|
14453
14453
|
priv.errors.set(path, kw.error || "error");
|
|
14454
|
-
log_error(`${GCLASS_NAME$
|
|
14454
|
+
log_error(`${GCLASS_NAME$13}: subtree load failed at '${path}': ${kw.error || ""}`);
|
|
14455
14455
|
render_view$1(gobj);
|
|
14456
14456
|
return 0;
|
|
14457
14457
|
}
|
|
@@ -14526,14 +14526,14 @@ function ac_copy_all$1(gobj, event, kw, src) {
|
|
|
14526
14526
|
if (priv.root === null || priv.root === void 0) return 0;
|
|
14527
14527
|
let dump = json_text_dump(priv.root, 0);
|
|
14528
14528
|
if (dump.error) {
|
|
14529
|
-
log_error(`${GCLASS_NAME$
|
|
14529
|
+
log_error(`${GCLASS_NAME$13}: cannot copy the document: ${dump.error}`);
|
|
14530
14530
|
return -1;
|
|
14531
14531
|
}
|
|
14532
14532
|
let text = dump.text;
|
|
14533
14533
|
if (navigator.clipboard && navigator.clipboard.writeText) navigator.clipboard.writeText(text).catch(function(e) {
|
|
14534
|
-
log_error(`${GCLASS_NAME$
|
|
14534
|
+
log_error(`${GCLASS_NAME$13}: clipboard write failed: ${e}`);
|
|
14535
14535
|
});
|
|
14536
|
-
else log_error(`${GCLASS_NAME$
|
|
14536
|
+
else log_error(`${GCLASS_NAME$13}: clipboard API unavailable`);
|
|
14537
14537
|
return 0;
|
|
14538
14538
|
}
|
|
14539
14539
|
/************************************************************
|
|
@@ -14549,7 +14549,7 @@ function ac_set_view_mode$1(gobj, event, kw, src) {
|
|
|
14549
14549
|
let mode = kw.mode;
|
|
14550
14550
|
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;
|
|
14551
14551
|
else if (!VIEWS$1.some((v) => v.mode === mode)) {
|
|
14552
|
-
log_error(`${GCLASS_NAME$
|
|
14552
|
+
log_error(`${GCLASS_NAME$13}: unknown view_mode '${mode}'`);
|
|
14553
14553
|
return -1;
|
|
14554
14554
|
}
|
|
14555
14555
|
if (mode === current_view_mode$1(gobj)) return 0;
|
|
@@ -14615,17 +14615,17 @@ function ac_refresh$5(gobj, event, kw, src) {
|
|
|
14615
14615
|
/***************************
|
|
14616
14616
|
* FSM
|
|
14617
14617
|
***************************/
|
|
14618
|
-
var gmt$
|
|
14619
|
-
mt_create: mt_create$
|
|
14620
|
-
mt_start: mt_start$
|
|
14621
|
-
mt_stop: mt_stop$
|
|
14622
|
-
mt_destroy: mt_destroy$
|
|
14618
|
+
var gmt$13 = {
|
|
14619
|
+
mt_create: mt_create$13,
|
|
14620
|
+
mt_start: mt_start$13,
|
|
14621
|
+
mt_stop: mt_stop$13,
|
|
14622
|
+
mt_destroy: mt_destroy$13
|
|
14623
14623
|
};
|
|
14624
14624
|
/***************************************************************
|
|
14625
14625
|
* Create the GClass
|
|
14626
14626
|
***************************************************************/
|
|
14627
|
-
function create_gclass$
|
|
14628
|
-
if (__gclass__$
|
|
14627
|
+
function create_gclass$13(gclass_name) {
|
|
14628
|
+
if (__gclass__$13) {
|
|
14629
14629
|
log_error(`GClass ALREADY created: ${gclass_name}`);
|
|
14630
14630
|
return -1;
|
|
14631
14631
|
}
|
|
@@ -14755,16 +14755,389 @@ function create_gclass$12(gclass_name) {
|
|
|
14755
14755
|
["EV_HIDE", 0],
|
|
14756
14756
|
["EV_EXPAND_PATH", event_flag_t.EVF_OUTPUT_EVENT | event_flag_t.EVF_NO_WARN_SUBS]
|
|
14757
14757
|
];
|
|
14758
|
-
__gclass__$
|
|
14759
|
-
if (!__gclass__$
|
|
14758
|
+
__gclass__$13 = gclass_create(gclass_name, event_types, states, gmt$13, 0, attrs_table$13, PRIVATE_DATA$13, 0, 0, 0, 0);
|
|
14759
|
+
if (!__gclass__$13) return -1;
|
|
14760
14760
|
return 0;
|
|
14761
14761
|
}
|
|
14762
14762
|
/***************************************************************
|
|
14763
14763
|
* Register GClass
|
|
14764
14764
|
***************************************************************/
|
|
14765
14765
|
function register_c_yui_json() {
|
|
14766
|
-
if (gclass_find_by_name(GCLASS_NAME$
|
|
14766
|
+
if (gclass_find_by_name(GCLASS_NAME$13, false)) return 0;
|
|
14767
14767
|
if (!gclass_find_by_name("C_YUI_JSON_GRAPH", false)) register_c_yui_json_graph();
|
|
14768
|
+
return create_gclass$13(GCLASS_NAME$13);
|
|
14769
|
+
}
|
|
14770
|
+
//#endregion
|
|
14771
|
+
//#region src/c_yui_json_pad.js
|
|
14772
|
+
/***********************************************************************
|
|
14773
|
+
* c_yui_json_pad.js
|
|
14774
|
+
*
|
|
14775
|
+
* C_YUI_JSON_PAD -- a pad to paste JSON from OUTSIDE and read it
|
|
14776
|
+
* with the library's own viewer.
|
|
14777
|
+
*
|
|
14778
|
+
* The viewer (C_YUI_JSON: the lazy tree, the raw text and the
|
|
14779
|
+
* graph) only ever showed what an app fetched. A JSON that came
|
|
14780
|
+
* from anywhere else -- a log line, a config file, an answer copied
|
|
14781
|
+
* from a terminal -- had to be read in whatever the operator had
|
|
14782
|
+
* at hand. This is the blank page for it: paste, and read it the
|
|
14783
|
+
* way every other document of the app is read.
|
|
14784
|
+
*
|
|
14785
|
+
* DOM (UPPER_SNAKE logical classes):
|
|
14786
|
+
*
|
|
14787
|
+
* JSON_PAD the root
|
|
14788
|
+
* JSON_PAD_BAR the text area and its two buttons
|
|
14789
|
+
* JSON_PAD_INPUT where the text goes
|
|
14790
|
+
* JSON_PAD_VIEW read what is in the text area
|
|
14791
|
+
* JSON_PAD_CLEAR empty the pad
|
|
14792
|
+
* JSON_PAD_ERROR "invalid JSON" and the parser's reason
|
|
14793
|
+
* JSON_PAD_BODY the C_YUI_JSON child
|
|
14794
|
+
*
|
|
14795
|
+
* Every way in is an event:
|
|
14796
|
+
*
|
|
14797
|
+
* EV_PASTE {text} a paste ANYWHERE in the pad replaces the
|
|
14798
|
+
* document and shows it at once -- there
|
|
14799
|
+
* is one document here, not a text to edit
|
|
14800
|
+
* EV_VIEW the text area as it is (typed, or edited
|
|
14801
|
+
* after a paste); also Ctrl+Enter
|
|
14802
|
+
* EV_CLEAR back to the blank pad
|
|
14803
|
+
*
|
|
14804
|
+
* FSM: ST_EMPTY (nothing shown) and ST_SHOWING. EV_EXPAND_PATH,
|
|
14805
|
+
* which the viewer publishes when a `__collapsed__` sentinel is
|
|
14806
|
+
* opened, only exists in ST_SHOWING, and is answered with
|
|
14807
|
+
* EV_SUBTREE_ERROR: a pasted document has no backend to fetch the
|
|
14808
|
+
* rest from -- the source truncated it, and the pad says so.
|
|
14809
|
+
*
|
|
14810
|
+
* Hosted by setup_json_pad() (yui_json_pad.js) in a C_YUI_WINDOW;
|
|
14811
|
+
* any host can mount `$container` itself.
|
|
14812
|
+
*
|
|
14813
|
+
* Copyright (c) 2026, ArtGins.
|
|
14814
|
+
* All Rights Reserved.
|
|
14815
|
+
***********************************************************************/
|
|
14816
|
+
/***************************************************************
|
|
14817
|
+
* Constants
|
|
14818
|
+
***************************************************************/
|
|
14819
|
+
var GCLASS_NAME$12 = "C_YUI_JSON_PAD";
|
|
14820
|
+
/***************************************************************
|
|
14821
|
+
* Data
|
|
14822
|
+
***************************************************************/
|
|
14823
|
+
var attrs_table$12 = [
|
|
14824
|
+
SDATA(data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
14825
|
+
SDATA(data_type_t.DTP_POINTER, "$container", 0, null, "HTMLElement root, mounted by the host"),
|
|
14826
|
+
SDATA_END()
|
|
14827
|
+
];
|
|
14828
|
+
var PRIVATE_DATA$12 = {
|
|
14829
|
+
$input: null,
|
|
14830
|
+
$error: null,
|
|
14831
|
+
$reason: null,
|
|
14832
|
+
gobj_json: null
|
|
14833
|
+
};
|
|
14834
|
+
var __gclass__$12 = null;
|
|
14835
|
+
/******************************
|
|
14836
|
+
* Framework Methods
|
|
14837
|
+
******************************/
|
|
14838
|
+
/***************************************************************
|
|
14839
|
+
* Framework Method: Create
|
|
14840
|
+
***************************************************************/
|
|
14841
|
+
function mt_create$12(gobj) {
|
|
14842
|
+
let priv = gobj.priv;
|
|
14843
|
+
let subscriber = gobj_read_pointer_attr(gobj, "subscriber");
|
|
14844
|
+
if (!subscriber) subscriber = gobj_parent(gobj);
|
|
14845
|
+
gobj_subscribe_event(gobj, null, {}, subscriber);
|
|
14846
|
+
build_ui$11(gobj);
|
|
14847
|
+
priv.gobj_json = gobj_create_pure_child("json_pad_view", "C_YUI_JSON", {}, gobj);
|
|
14848
|
+
let $view = gobj_read_attr(priv.gobj_json, "$container");
|
|
14849
|
+
if (!$view) {
|
|
14850
|
+
log_error(`${gobj_short_name(gobj)}: C_YUI_JSON without $container`);
|
|
14851
|
+
return;
|
|
14852
|
+
}
|
|
14853
|
+
gobj_read_attr(gobj, "$container").querySelector(".JSON_PAD_BODY").appendChild($view);
|
|
14854
|
+
}
|
|
14855
|
+
/***************************************************************
|
|
14856
|
+
* Framework Method: Start
|
|
14857
|
+
***************************************************************/
|
|
14858
|
+
function mt_start$12(gobj) {
|
|
14859
|
+
let priv = gobj.priv;
|
|
14860
|
+
if (priv.gobj_json) gobj_start(priv.gobj_json);
|
|
14861
|
+
if (priv.$input) priv.$input.focus();
|
|
14862
|
+
}
|
|
14863
|
+
/***************************************************************
|
|
14864
|
+
* Framework Method: Stop
|
|
14865
|
+
***************************************************************/
|
|
14866
|
+
function mt_stop$12(gobj) {
|
|
14867
|
+
let priv = gobj.priv;
|
|
14868
|
+
if (priv.gobj_json && gobj_is_running(priv.gobj_json)) gobj_stop(priv.gobj_json);
|
|
14869
|
+
}
|
|
14870
|
+
/***************************************************************
|
|
14871
|
+
* Framework Method: Destroy
|
|
14872
|
+
***************************************************************/
|
|
14873
|
+
function mt_destroy$12(gobj) {}
|
|
14874
|
+
/***************************
|
|
14875
|
+
* Local Methods
|
|
14876
|
+
***************************/
|
|
14877
|
+
/***************************************************************
|
|
14878
|
+
* The pad: the text area and its buttons, the error line, and
|
|
14879
|
+
* the body the viewer is mounted in.
|
|
14880
|
+
***************************************************************/
|
|
14881
|
+
function build_ui$11(gobj) {
|
|
14882
|
+
let priv = gobj.priv;
|
|
14883
|
+
let button = (cls, icon, key, event_name) => {
|
|
14884
|
+
return [
|
|
14885
|
+
"button",
|
|
14886
|
+
{
|
|
14887
|
+
class: `${cls} button`,
|
|
14888
|
+
type: "button",
|
|
14889
|
+
title: t(key),
|
|
14890
|
+
"data-i18n-title": key,
|
|
14891
|
+
"aria-label": t(key),
|
|
14892
|
+
"data-i18n-aria-label": key
|
|
14893
|
+
},
|
|
14894
|
+
[yui_toolbar_icon(icon), [
|
|
14895
|
+
"span",
|
|
14896
|
+
{
|
|
14897
|
+
style: "padding-left:5px;",
|
|
14898
|
+
i18n: key
|
|
14899
|
+
},
|
|
14900
|
+
key
|
|
14901
|
+
]],
|
|
14902
|
+
{ click: (evt) => {
|
|
14903
|
+
evt.stopPropagation();
|
|
14904
|
+
gobj_send_event(gobj, event_name, {}, gobj);
|
|
14905
|
+
} }
|
|
14906
|
+
];
|
|
14907
|
+
};
|
|
14908
|
+
priv.$input = createElement2([
|
|
14909
|
+
"textarea",
|
|
14910
|
+
{
|
|
14911
|
+
class: "JSON_PAD_INPUT textarea",
|
|
14912
|
+
rows: 3,
|
|
14913
|
+
spellcheck: "false",
|
|
14914
|
+
placeholder: t("paste json here"),
|
|
14915
|
+
"data-i18n-placeholder": "paste json here",
|
|
14916
|
+
title: t("paste json here"),
|
|
14917
|
+
"data-i18n-title": "paste json here",
|
|
14918
|
+
"aria-label": t("paste json here"),
|
|
14919
|
+
"data-i18n-aria-label": "paste json here",
|
|
14920
|
+
style: "font-family:monospace; resize:vertical; min-height:4.5em;"
|
|
14921
|
+
},
|
|
14922
|
+
"",
|
|
14923
|
+
{ keydown: (evt) => {
|
|
14924
|
+
if ((evt.ctrlKey || evt.metaKey) && evt.key === "Enter") {
|
|
14925
|
+
evt.preventDefault();
|
|
14926
|
+
gobj_send_event(gobj, "EV_VIEW", {}, gobj);
|
|
14927
|
+
}
|
|
14928
|
+
} }
|
|
14929
|
+
]);
|
|
14930
|
+
priv.$reason = createElement2([
|
|
14931
|
+
"span",
|
|
14932
|
+
{
|
|
14933
|
+
class: "JSON_PAD_ERROR_REASON",
|
|
14934
|
+
style: "margin-left:.5em; font-family:monospace;"
|
|
14935
|
+
},
|
|
14936
|
+
""
|
|
14937
|
+
]);
|
|
14938
|
+
priv.$error = createElement2([
|
|
14939
|
+
"div",
|
|
14940
|
+
{
|
|
14941
|
+
class: "JSON_PAD_ERROR is-hidden has-text-danger is-size-7",
|
|
14942
|
+
role: "alert"
|
|
14943
|
+
},
|
|
14944
|
+
[[
|
|
14945
|
+
"span",
|
|
14946
|
+
{
|
|
14947
|
+
class: "JSON_PAD_ERROR_LABEL",
|
|
14948
|
+
style: "font-weight:600;",
|
|
14949
|
+
i18n: "invalid json"
|
|
14950
|
+
},
|
|
14951
|
+
"invalid json"
|
|
14952
|
+
], priv.$reason]
|
|
14953
|
+
]);
|
|
14954
|
+
let $container = createElement2([
|
|
14955
|
+
"div",
|
|
14956
|
+
{
|
|
14957
|
+
class: "C_YUI_JSON_PAD JSON_PAD",
|
|
14958
|
+
style: "height:100%; display:flex; flex-direction:column; gap:.5rem; padding:.5rem;"
|
|
14959
|
+
},
|
|
14960
|
+
[
|
|
14961
|
+
[
|
|
14962
|
+
"div",
|
|
14963
|
+
{
|
|
14964
|
+
class: "JSON_PAD_BAR",
|
|
14965
|
+
style: "display:flex; gap:.5rem; align-items:flex-start;"
|
|
14966
|
+
},
|
|
14967
|
+
[[
|
|
14968
|
+
"div",
|
|
14969
|
+
{ style: "flex:1 1 auto; min-width:0;" },
|
|
14970
|
+
[priv.$input]
|
|
14971
|
+
], [
|
|
14972
|
+
"div",
|
|
14973
|
+
{ style: "flex:0 0 auto; display:flex; flex-direction:column; gap:.5rem;" },
|
|
14974
|
+
[button("JSON_PAD_VIEW", "yi-eye", "view", "EV_VIEW"), button("JSON_PAD_CLEAR", "yi-broom", "clear", "EV_CLEAR")]
|
|
14975
|
+
]]
|
|
14976
|
+
],
|
|
14977
|
+
priv.$error,
|
|
14978
|
+
[
|
|
14979
|
+
"div",
|
|
14980
|
+
{
|
|
14981
|
+
class: "JSON_PAD_BODY",
|
|
14982
|
+
style: "flex:1 1 auto; min-height:0; display:flex; flex-direction:column;"
|
|
14983
|
+
},
|
|
14984
|
+
[]
|
|
14985
|
+
]
|
|
14986
|
+
],
|
|
14987
|
+
{ paste: (evt) => {
|
|
14988
|
+
let text = evt.clipboardData ? evt.clipboardData.getData("text") : "";
|
|
14989
|
+
if (!text) return;
|
|
14990
|
+
evt.preventDefault();
|
|
14991
|
+
gobj_send_event(gobj, "EV_PASTE", { text }, gobj);
|
|
14992
|
+
} }
|
|
14993
|
+
]);
|
|
14994
|
+
gobj_write_attr(gobj, "$container", $container);
|
|
14995
|
+
}
|
|
14996
|
+
/***************************************************************
|
|
14997
|
+
* Read `text` as JSON and show it, or say why it is not.
|
|
14998
|
+
***************************************************************/
|
|
14999
|
+
function show_text(gobj, text) {
|
|
15000
|
+
let priv = gobj.priv;
|
|
15001
|
+
let src = String(text || "").trim();
|
|
15002
|
+
if (!src) {
|
|
15003
|
+
clear_pad(gobj, false);
|
|
15004
|
+
return 0;
|
|
15005
|
+
}
|
|
15006
|
+
let doc;
|
|
15007
|
+
try {
|
|
15008
|
+
doc = JSON.parse(src);
|
|
15009
|
+
} catch (e) {
|
|
15010
|
+
log_warning(`${gobj_short_name(gobj)}: the pasted text is not JSON: ${e.message}`);
|
|
15011
|
+
priv.$reason.textContent = e.message;
|
|
15012
|
+
priv.$error.classList.remove("is-hidden");
|
|
15013
|
+
return -1;
|
|
15014
|
+
}
|
|
15015
|
+
priv.$error.classList.add("is-hidden");
|
|
15016
|
+
priv.$reason.textContent = "";
|
|
15017
|
+
gobj_send_event(priv.gobj_json, "EV_SET_JSON", { json: doc }, gobj);
|
|
15018
|
+
gobj_change_state(gobj, "ST_SHOWING");
|
|
15019
|
+
return 0;
|
|
15020
|
+
}
|
|
15021
|
+
/***************************************************************
|
|
15022
|
+
* Back to the blank pad; `with_text` empties the text area too.
|
|
15023
|
+
***************************************************************/
|
|
15024
|
+
function clear_pad(gobj, with_text) {
|
|
15025
|
+
let priv = gobj.priv;
|
|
15026
|
+
if (with_text) priv.$input.value = "";
|
|
15027
|
+
priv.$error.classList.add("is-hidden");
|
|
15028
|
+
priv.$reason.textContent = "";
|
|
15029
|
+
gobj_send_event(priv.gobj_json, "EV_SET_JSON", { json: null }, gobj);
|
|
15030
|
+
gobj_change_state(gobj, "ST_EMPTY");
|
|
15031
|
+
}
|
|
15032
|
+
/***************************
|
|
15033
|
+
* Actions
|
|
15034
|
+
***************************/
|
|
15035
|
+
/***************************************************************
|
|
15036
|
+
* A paste: it becomes the text area and the document at once.
|
|
15037
|
+
***************************************************************/
|
|
15038
|
+
function ac_paste(gobj, event, kw, src) {
|
|
15039
|
+
let priv = gobj.priv;
|
|
15040
|
+
let text = kw && typeof kw.text === "string" ? kw.text : "";
|
|
15041
|
+
priv.$input.value = text;
|
|
15042
|
+
return show_text(gobj, text);
|
|
15043
|
+
}
|
|
15044
|
+
/***************************************************************
|
|
15045
|
+
* The text area as it is now.
|
|
15046
|
+
***************************************************************/
|
|
15047
|
+
function ac_view(gobj, event, kw, src) {
|
|
15048
|
+
let priv = gobj.priv;
|
|
15049
|
+
return show_text(gobj, priv.$input.value);
|
|
15050
|
+
}
|
|
15051
|
+
/***************************************************************
|
|
15052
|
+
* The blank pad again.
|
|
15053
|
+
***************************************************************/
|
|
15054
|
+
function ac_clear(gobj, event, kw, src) {
|
|
15055
|
+
let priv = gobj.priv;
|
|
15056
|
+
clear_pad(gobj, true);
|
|
15057
|
+
priv.$input.focus();
|
|
15058
|
+
return 0;
|
|
15059
|
+
}
|
|
15060
|
+
/***************************************************************
|
|
15061
|
+
* The viewer asks for a `__collapsed__` subtree. A pasted
|
|
15062
|
+
* document has no backend to ask for it: the SOURCE truncated
|
|
15063
|
+
* it, and that is the answer.
|
|
15064
|
+
***************************************************************/
|
|
15065
|
+
function ac_expand_path(gobj, event, kw, src) {
|
|
15066
|
+
let priv = gobj.priv;
|
|
15067
|
+
gobj_send_event(priv.gobj_json, "EV_SUBTREE_ERROR", {
|
|
15068
|
+
path: kw && kw.path || "",
|
|
15069
|
+
error: t("collapsed in the source")
|
|
15070
|
+
}, gobj);
|
|
15071
|
+
return 0;
|
|
15072
|
+
}
|
|
15073
|
+
/***************************************************************
|
|
15074
|
+
* FSM
|
|
15075
|
+
***************************************************************/
|
|
15076
|
+
var gmt$12 = {
|
|
15077
|
+
mt_create: mt_create$12,
|
|
15078
|
+
mt_start: mt_start$12,
|
|
15079
|
+
mt_stop: mt_stop$12,
|
|
15080
|
+
mt_destroy: mt_destroy$12
|
|
15081
|
+
};
|
|
15082
|
+
/***************************************************************
|
|
15083
|
+
* Create the GClass
|
|
15084
|
+
***************************************************************/
|
|
15085
|
+
function create_gclass$12(gclass_name) {
|
|
15086
|
+
if (__gclass__$12) {
|
|
15087
|
+
log_error(`GClass ALREADY created: ${gclass_name}`);
|
|
15088
|
+
return -1;
|
|
15089
|
+
}
|
|
15090
|
+
__gclass__$12 = gclass_create(gclass_name, [
|
|
15091
|
+
["EV_PASTE", 0],
|
|
15092
|
+
["EV_VIEW", 0],
|
|
15093
|
+
["EV_CLEAR", 0],
|
|
15094
|
+
["EV_EXPAND_PATH", 0]
|
|
15095
|
+
], [["ST_EMPTY", [
|
|
15096
|
+
[
|
|
15097
|
+
"EV_PASTE",
|
|
15098
|
+
ac_paste,
|
|
15099
|
+
null
|
|
15100
|
+
],
|
|
15101
|
+
[
|
|
15102
|
+
"EV_VIEW",
|
|
15103
|
+
ac_view,
|
|
15104
|
+
null
|
|
15105
|
+
],
|
|
15106
|
+
[
|
|
15107
|
+
"EV_CLEAR",
|
|
15108
|
+
ac_clear,
|
|
15109
|
+
null
|
|
15110
|
+
]
|
|
15111
|
+
]], ["ST_SHOWING", [
|
|
15112
|
+
[
|
|
15113
|
+
"EV_PASTE",
|
|
15114
|
+
ac_paste,
|
|
15115
|
+
null
|
|
15116
|
+
],
|
|
15117
|
+
[
|
|
15118
|
+
"EV_VIEW",
|
|
15119
|
+
ac_view,
|
|
15120
|
+
null
|
|
15121
|
+
],
|
|
15122
|
+
[
|
|
15123
|
+
"EV_CLEAR",
|
|
15124
|
+
ac_clear,
|
|
15125
|
+
null
|
|
15126
|
+
],
|
|
15127
|
+
[
|
|
15128
|
+
"EV_EXPAND_PATH",
|
|
15129
|
+
ac_expand_path,
|
|
15130
|
+
null
|
|
15131
|
+
]
|
|
15132
|
+
]]], gmt$12, 0, attrs_table$12, PRIVATE_DATA$12, 0, 0, 0, 0);
|
|
15133
|
+
if (!__gclass__$12) return -1;
|
|
15134
|
+
return 0;
|
|
15135
|
+
}
|
|
15136
|
+
/***************************************************************
|
|
15137
|
+
* Register GClass
|
|
15138
|
+
***************************************************************/
|
|
15139
|
+
function register_c_yui_json_pad() {
|
|
15140
|
+
if (!gclass_find_by_name("C_YUI_JSON", false)) register_c_yui_json();
|
|
14768
15141
|
return create_gclass$12(GCLASS_NAME$12);
|
|
14769
15142
|
}
|
|
14770
15143
|
//#endregion
|
|
@@ -21343,7 +21716,7 @@ function register_c_yui_nav() {
|
|
|
21343
21716
|
}
|
|
21344
21717
|
//#endregion
|
|
21345
21718
|
//#region src/shell_route_map.js
|
|
21346
|
-
var WIN_NAME$
|
|
21719
|
+
var WIN_NAME$2 = "shell-route-map-window";
|
|
21347
21720
|
var __show_refs__ = true;
|
|
21348
21721
|
var __open_modal__ = null;
|
|
21349
21722
|
function scroll_to_current($body) {
|
|
@@ -21683,7 +22056,7 @@ function mark_current_row($body, hash, t) {
|
|
|
21683
22056
|
***************************************************************/
|
|
21684
22057
|
function yui_shell_show_route_map(shell, opts) {
|
|
21685
22058
|
let t = opts && opts.t || i18next.t.bind(i18next);
|
|
21686
|
-
let existing = gobj_find_service(WIN_NAME$
|
|
22059
|
+
let existing = gobj_find_service(WIN_NAME$2, false);
|
|
21687
22060
|
if (existing && is_gobj(existing)) {
|
|
21688
22061
|
gobj_send_event(existing, "EV_CLOSE_WINDOW", {}, shell);
|
|
21689
22062
|
return null;
|
|
@@ -21698,7 +22071,7 @@ function yui_shell_show_route_map(shell, opts) {
|
|
|
21698
22071
|
let win_ref = { gobj: null };
|
|
21699
22072
|
let $body = build_body(shell, t);
|
|
21700
22073
|
let $parent = yui_shell_popup_layer(shell) || typeof document !== "undefined" && document.getElementById("top-layer") || null;
|
|
21701
|
-
let win = gobj_create_service(WIN_NAME$
|
|
22074
|
+
let win = gobj_create_service(WIN_NAME$2, "C_YUI_WINDOW", {
|
|
21702
22075
|
$parent,
|
|
21703
22076
|
subscriber: null,
|
|
21704
22077
|
modal: false,
|
|
@@ -25396,6 +25769,14 @@ function create_tabulator(gobj) {
|
|
|
25396
25769
|
let remembered_size = load_page_size(gobj);
|
|
25397
25770
|
if (remembered_size !== null && tabulator_settings.pagination) tabulator_settings.paginationSize = remembered_size;
|
|
25398
25771
|
gobj.priv._page_size = tabulator_settings.paginationSize;
|
|
25772
|
+
let pkey_col = columns.find((c) => c && c.field === pkey);
|
|
25773
|
+
if (pkey_col && !tabulator_settings.initialSort && !gobj_read_bool_attr(gobj, "with_remote_paging")) {
|
|
25774
|
+
if (!pkey_col.sorter) pkey_col.sorter = "alphanum";
|
|
25775
|
+
tabulator_settings.initialSort = [{
|
|
25776
|
+
column: pkey,
|
|
25777
|
+
dir: "asc"
|
|
25778
|
+
}];
|
|
25779
|
+
}
|
|
25399
25780
|
Object.assign(tabulator_settings, {
|
|
25400
25781
|
index: pkey,
|
|
25401
25782
|
columns,
|
|
@@ -74568,7 +74949,7 @@ function build_dev_panel() {
|
|
|
74568
74949
|
* Copyright (c) 2026, ArtGins.
|
|
74569
74950
|
* All Rights Reserved.
|
|
74570
74951
|
***********************************************************************/
|
|
74571
|
-
var WIN_NAME = "Frontend-View-Window";
|
|
74952
|
+
var WIN_NAME$1 = "Frontend-View-Window";
|
|
74572
74953
|
/******************************
|
|
74573
74954
|
* Public API
|
|
74574
74955
|
******************************/
|
|
@@ -74585,7 +74966,7 @@ var WIN_NAME = "Frontend-View-Window";
|
|
|
74585
74966
|
* Returns the window gobj, or null.
|
|
74586
74967
|
************************************************************/
|
|
74587
74968
|
function setup_frontend_view(self) {
|
|
74588
|
-
if (gobj_find_service(WIN_NAME, false)) return null;
|
|
74969
|
+
if (gobj_find_service(WIN_NAME$1, false)) return null;
|
|
74589
74970
|
let $body = createElement2([
|
|
74590
74971
|
"div",
|
|
74591
74972
|
{
|
|
@@ -74594,7 +74975,7 @@ function setup_frontend_view(self) {
|
|
|
74594
74975
|
},
|
|
74595
74976
|
[]
|
|
74596
74977
|
]);
|
|
74597
|
-
let win = gobj_create_service(WIN_NAME, "C_YUI_WINDOW", {
|
|
74978
|
+
let win = gobj_create_service(WIN_NAME$1, "C_YUI_WINDOW", {
|
|
74598
74979
|
$parent: typeof document !== "undefined" && document.getElementById("top-layer") || null,
|
|
74599
74980
|
subscriber: null,
|
|
74600
74981
|
modal: false,
|
|
@@ -74626,6 +75007,75 @@ function setup_frontend_view(self) {
|
|
|
74626
75007
|
return win;
|
|
74627
75008
|
}
|
|
74628
75009
|
//#endregion
|
|
74629
|
-
|
|
75010
|
+
//#region src/yui_json_pad.js
|
|
75011
|
+
/***********************************************************************
|
|
75012
|
+
* yui_json_pad.js
|
|
75013
|
+
*
|
|
75014
|
+
* JSON viewer -- a blank C_YUI_JSON_PAD in a floating window,
|
|
75015
|
+
* to paste JSON from outside and read it with the library's own
|
|
75016
|
+
* viewer. Peer of the frontend view (yui_frontend_view.js), and
|
|
75017
|
+
* opened the same way: an entry of the account menu.
|
|
75018
|
+
*
|
|
75019
|
+
* Copyright (c) 2026, ArtGins.
|
|
75020
|
+
* All Rights Reserved.
|
|
75021
|
+
***********************************************************************/
|
|
75022
|
+
var WIN_NAME = "Json-Viewer-Window";
|
|
75023
|
+
/******************************
|
|
75024
|
+
* Public API
|
|
75025
|
+
******************************/
|
|
75026
|
+
/************************************************************
|
|
75027
|
+
* Open a blank JSON pad (C_YUI_JSON_PAD) inside a non-modal
|
|
75028
|
+
* C_YUI_WINDOW, the same shape as the frontend view.
|
|
75029
|
+
*
|
|
75030
|
+
* Self-contained: it registers C_YUI_JSON_PAD (and the
|
|
75031
|
+
* C_YUI_JSON it hosts) if the app did not, so an app gets the
|
|
75032
|
+
* viewer with one menu entry and one action.
|
|
75033
|
+
*
|
|
75034
|
+
* Returns the window gobj, or null.
|
|
75035
|
+
************************************************************/
|
|
75036
|
+
function setup_json_pad(self) {
|
|
75037
|
+
if (gobj_find_service(WIN_NAME, false)) return null;
|
|
75038
|
+
if (!gclass_find_by_name("C_YUI_JSON_PAD", false)) register_c_yui_json_pad();
|
|
75039
|
+
let $body = createElement2([
|
|
75040
|
+
"div",
|
|
75041
|
+
{
|
|
75042
|
+
class: "YJSONPAD_BODY",
|
|
75043
|
+
style: "height:100%; display:flex; flex-direction:column;"
|
|
75044
|
+
},
|
|
75045
|
+
[]
|
|
75046
|
+
]);
|
|
75047
|
+
let win = gobj_create_service(WIN_NAME, "C_YUI_WINDOW", {
|
|
75048
|
+
$parent: typeof document !== "undefined" && document.getElementById("top-layer") || null,
|
|
75049
|
+
subscriber: null,
|
|
75050
|
+
modal: false,
|
|
75051
|
+
showMax: true,
|
|
75052
|
+
showFooter: false,
|
|
75053
|
+
resizable: true,
|
|
75054
|
+
center: false,
|
|
75055
|
+
auto_save_size_and_position: true,
|
|
75056
|
+
width: 900,
|
|
75057
|
+
height: 640,
|
|
75058
|
+
logical_class: "JSON_VIEWER_WINDOW",
|
|
75059
|
+
title: "json viewer",
|
|
75060
|
+
icon: "yi-code",
|
|
75061
|
+
body: $body,
|
|
75062
|
+
manager: gobj_find_service("__window_manager__", false) || null
|
|
75063
|
+
}, self);
|
|
75064
|
+
if (!win) {
|
|
75065
|
+
log_error("yui_json_pad: cannot create the json-viewer window");
|
|
75066
|
+
return null;
|
|
75067
|
+
}
|
|
75068
|
+
let pad = gobj_create_pure_child("json_pad", "C_YUI_JSON_PAD", {}, win);
|
|
75069
|
+
let $pad = pad ? gobj_read_attr(pad, "$container") : null;
|
|
75070
|
+
if (!$pad) {
|
|
75071
|
+
log_error("yui_json_pad: C_YUI_JSON_PAD without $container");
|
|
75072
|
+
return win;
|
|
75073
|
+
}
|
|
75074
|
+
$body.appendChild($pad);
|
|
75075
|
+
gobj_start_tree(win);
|
|
75076
|
+
return win;
|
|
75077
|
+
}
|
|
75078
|
+
//#endregion
|
|
75079
|
+
export { EditControl, MarkerControl, YUI_FILE_ACCEPT, YUI_PERIODS, YUI_PERIODS_DEFAULT, YUI_ROLLING, addClasses, apply_dev_traces, attach_clear, build_dev_panel, dev_window_was_open, disableElements, enableElements, epoch_to_local_input, epoch_to_ms, expose_view_container, fmt_epoch, getStrokeColor, infer_period, info_traffic, inject_svg_icons, is_current_period, iso_week, local_input_to_epoch, ms_to_epoch, period_bounds, period_bounds_epoch, period_label, period_name, period_shift, period_spec, period_start, refresh_clear, register_c_g6_nodes_tree, register_c_yui_form, register_c_yui_fsm_graph, register_c_yui_gclass, register_c_yui_gobj_tree_js, register_c_yui_json, register_c_yui_json_graph, register_c_yui_json_pad, register_c_yui_map, register_c_yui_nav, register_c_yui_pager, register_c_yui_period, register_c_yui_schema_editor, register_c_yui_service_view, register_c_yui_shell, register_c_yui_treedb_graph, register_c_yui_treedb_schema, register_c_yui_treedb_topic_with_form, register_c_yui_treedb_topics, register_c_yui_uplot, register_c_yui_window, register_c_yui_window_manager, register_c_yui_wizard, removeChildElements, removeClasses, rolling_bounds, safe_locale, set_active_state, set_cancel_state, set_pressed_state, set_submit_state, setup_dev, setup_frontend_view, setup_json_pad, toggleClasses, yui_array_buffer_to_base64, yui_asset_element, yui_asset_id, yui_asset_ids, yui_asset_missing, yui_asset_src, yui_file_control, yui_file_id_label, yui_file_read, yui_file_sha256, yui_file_size_label, yui_files_manifest, yui_is_dark, yui_mount_service_view, yui_shell_close_drawer, yui_shell_close_dropdown, yui_shell_confirm_danger, yui_shell_confirm_ok, yui_shell_confirm_yesno, yui_shell_confirm_yesnocancel, yui_shell_navigate, yui_shell_open_drawer, yui_shell_overlay_dismissed, yui_shell_pop_escape, yui_shell_push_escape, yui_shell_refresh_avatars, yui_shell_register_event_handler, yui_shell_register_overlay, yui_shell_set_avatar_provider, yui_shell_set_connection_state, yui_shell_set_sub_routes, yui_shell_set_toolbar_item_badge, yui_shell_set_toolbar_item_icon, yui_shell_set_translator, yui_shell_show_error, yui_shell_show_info, yui_shell_show_modal, yui_shell_show_route_map, yui_shell_show_warning, yui_shell_toggle_drawer, yui_shell_unpark_route, yui_theme_now, yui_toolbar, yui_watch_theme };
|
|
74630
75080
|
|
|
74631
75081
|
//# sourceMappingURL=gobj-ui.es.js.map
|