@yuneta/gobj-ui 5.4.0 → 5.6.0
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 +114 -0
- package/dist/gobj-ui.cjs.js +562 -216
- package/dist/gobj-ui.es.js +559 -217
- package/index.js +6 -0
- package/package.json +44 -44
- package/src/c_yui_nav.js +6 -1
- package/src/c_yui_node.js +34 -2
- package/src/c_yui_service_view.js +362 -0
- package/src/c_yui_shell.css +47 -0
- package/src/c_yui_shell.js +148 -16
package/dist/gobj-ui.es.js
CHANGED
|
@@ -794,7 +794,7 @@ function secondary_nav_renders(item, layout) {
|
|
|
794
794
|
/***************************************************************
|
|
795
795
|
* Constants
|
|
796
796
|
***************************************************************/
|
|
797
|
-
var GCLASS_NAME$
|
|
797
|
+
var GCLASS_NAME$18 = "C_YUI_SHELL";
|
|
798
798
|
var __last_shell__ = null;
|
|
799
799
|
var ZONE_IDS = [
|
|
800
800
|
"top",
|
|
@@ -816,7 +816,7 @@ var LAYER_DEFS = [
|
|
|
816
816
|
/***************************************************************
|
|
817
817
|
* Attrs
|
|
818
818
|
***************************************************************/
|
|
819
|
-
var attrs_table$
|
|
819
|
+
var attrs_table$18 = [
|
|
820
820
|
SDATA(data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
821
821
|
SDATA(data_type_t.DTP_JSON, "config", 0, null, "Shell declarative config (zones, menu, stages, toolbar)"),
|
|
822
822
|
SDATA(data_type_t.DTP_STRING, "default_route", 0, "", "Fallback route if hash is empty"),
|
|
@@ -827,7 +827,7 @@ var attrs_table$17 = [
|
|
|
827
827
|
SDATA(data_type_t.DTP_POINTER, "$container", 0, null, "Root HTMLElement of the shell"),
|
|
828
828
|
SDATA_END()
|
|
829
829
|
];
|
|
830
|
-
var PRIVATE_DATA$
|
|
830
|
+
var PRIVATE_DATA$18 = {
|
|
831
831
|
zones: {},
|
|
832
832
|
layers: {},
|
|
833
833
|
stages: {},
|
|
@@ -849,14 +849,14 @@ var PRIVATE_DATA$17 = {
|
|
|
849
849
|
conn_nodes: [],
|
|
850
850
|
active_dropdown: null
|
|
851
851
|
};
|
|
852
|
-
var __gclass__$
|
|
852
|
+
var __gclass__$18 = null;
|
|
853
853
|
/******************************
|
|
854
854
|
* Framework Methods
|
|
855
855
|
******************************/
|
|
856
856
|
/***************************************************************
|
|
857
857
|
* Framework Method: Create
|
|
858
858
|
***************************************************************/
|
|
859
|
-
function mt_create$
|
|
859
|
+
function mt_create$18(gobj) {
|
|
860
860
|
const subscriber = gobj_read_pointer_attr(gobj, "subscriber");
|
|
861
861
|
if (subscriber) gobj_subscribe_event(gobj, null, {}, subscriber);
|
|
862
862
|
__last_shell__ = gobj;
|
|
@@ -865,7 +865,7 @@ function mt_create$17(gobj) {
|
|
|
865
865
|
/***************************************************************
|
|
866
866
|
* Framework Method: Start
|
|
867
867
|
***************************************************************/
|
|
868
|
-
function mt_start$
|
|
868
|
+
function mt_start$15(gobj) {
|
|
869
869
|
let config = gobj_read_attr(gobj, "config") || {};
|
|
870
870
|
let priv = gobj.priv;
|
|
871
871
|
if (!validate_config(config)) {
|
|
@@ -934,7 +934,7 @@ function mt_start$14(gobj) {
|
|
|
934
934
|
/***************************************************************
|
|
935
935
|
* Framework Method: Stop
|
|
936
936
|
***************************************************************/
|
|
937
|
-
function mt_stop$
|
|
937
|
+
function mt_stop$15(gobj) {
|
|
938
938
|
let priv = gobj.priv;
|
|
939
939
|
if (!priv) return;
|
|
940
940
|
close_toolbar_dropdown(gobj);
|
|
@@ -975,7 +975,7 @@ function mt_stop$14(gobj) {
|
|
|
975
975
|
/***************************************************************
|
|
976
976
|
* Framework Method: Destroy
|
|
977
977
|
***************************************************************/
|
|
978
|
-
function mt_destroy$
|
|
978
|
+
function mt_destroy$18(gobj) {
|
|
979
979
|
close_toolbar_dropdown(gobj);
|
|
980
980
|
let $container = gobj_read_attr(gobj, "$container");
|
|
981
981
|
if ($container && $container.parentNode) $container.parentNode.removeChild($container);
|
|
@@ -1585,8 +1585,7 @@ function build_view_gobj(gobj, entry, route, stage) {
|
|
|
1585
1585
|
}
|
|
1586
1586
|
stage.el.appendChild($view);
|
|
1587
1587
|
gobj_start(view);
|
|
1588
|
-
|
|
1589
|
-
if (priv && typeof priv.translator === "function" && target.gclass === "C_YUI_NAV") refresh_language($view, priv.translator);
|
|
1588
|
+
if (target.gclass === "C_YUI_NAV") yui_shell_translate(gobj, $view);
|
|
1590
1589
|
return view;
|
|
1591
1590
|
}
|
|
1592
1591
|
function safe_id(s) {
|
|
@@ -1652,17 +1651,59 @@ function build_toolbar(gobj, config) {
|
|
|
1652
1651
|
$zone.appendChild($bar);
|
|
1653
1652
|
}
|
|
1654
1653
|
/************************************************************
|
|
1654
|
+
* The badge node of a toolbar item — the little count pinned to
|
|
1655
|
+
* the corner of its icon (unread notifications, active alarms).
|
|
1656
|
+
*
|
|
1657
|
+
* ALWAYS rendered, hidden when empty, so the runtime setter has a
|
|
1658
|
+
* node to write into and does not have to rebuild the button.
|
|
1659
|
+
*
|
|
1660
|
+
* EMPTY IS 0, "" AND null ALIKE: a badge reading "0" is worse than
|
|
1661
|
+
* no badge — it draws the eye to say nothing. A count is only
|
|
1662
|
+
* worth a pixel when there IS something.
|
|
1663
|
+
*
|
|
1664
|
+
* Capped at 99+: the toolbar is a fixed-width row, and a four
|
|
1665
|
+
* digit pill pushes the items next to it off a phone screen.
|
|
1666
|
+
*
|
|
1667
|
+
* role="status" and NOT aria-hidden, deliberately. The button
|
|
1668
|
+
* carries an explicit aria-label, and an explicit label REPLACES
|
|
1669
|
+
* the element's content for a screen reader — so a badge inside
|
|
1670
|
+
* it would be silent. As its own live region it is both read and
|
|
1671
|
+
* announced when the count changes, which is the whole point of a
|
|
1672
|
+
* badge that means "something needs you".
|
|
1673
|
+
************************************************************/
|
|
1674
|
+
function badge_text(value) {
|
|
1675
|
+
if (value === null || value === void 0 || value === false) return "";
|
|
1676
|
+
if (typeof value === "number") {
|
|
1677
|
+
if (!isFinite(value) || value <= 0) return "";
|
|
1678
|
+
return value > 99 ? "99+" : String(Math.floor(value));
|
|
1679
|
+
}
|
|
1680
|
+
return String(value).trim();
|
|
1681
|
+
}
|
|
1682
|
+
function badge_node(value) {
|
|
1683
|
+
let text = badge_text(value);
|
|
1684
|
+
let attrs = {
|
|
1685
|
+
class: "yui-toolbar-badge",
|
|
1686
|
+
role: "status"
|
|
1687
|
+
};
|
|
1688
|
+
if (!text) attrs.hidden = "hidden";
|
|
1689
|
+
return [
|
|
1690
|
+
"span",
|
|
1691
|
+
attrs,
|
|
1692
|
+
text
|
|
1693
|
+
];
|
|
1694
|
+
}
|
|
1695
|
+
/************************************************************
|
|
1655
1696
|
* Renderer for the default ("action") item kind.
|
|
1656
1697
|
************************************************************/
|
|
1657
1698
|
function build_toolbar_action_item(gobj, it) {
|
|
1658
1699
|
let children = [];
|
|
1659
1700
|
if (!empty_string(it.icon)) children.push([
|
|
1660
1701
|
"span",
|
|
1661
|
-
{ class: "icon" },
|
|
1662
|
-
["i", {
|
|
1702
|
+
{ class: "icon yui-toolbar-icon" },
|
|
1703
|
+
[["i", {
|
|
1663
1704
|
class: it.icon,
|
|
1664
1705
|
"aria-hidden": "true"
|
|
1665
|
-
}]
|
|
1706
|
+
}], badge_node(it.badge)]
|
|
1666
1707
|
]);
|
|
1667
1708
|
if (!empty_string(it.name)) children.push([
|
|
1668
1709
|
"span",
|
|
@@ -1957,7 +1998,7 @@ function open_toolbar_dropdown(gobj, item, action, $trigger) {
|
|
|
1957
1998
|
} else style_parts.push(`left:${Math.max(0, Math.round(rect.left))}px`);
|
|
1958
1999
|
$panel.setAttribute("style", style_parts.join(";"));
|
|
1959
2000
|
priv.layers.popup.appendChild($panel);
|
|
1960
|
-
|
|
2001
|
+
yui_shell_translate(gobj, $panel);
|
|
1961
2002
|
let backdrop = (ev) => {
|
|
1962
2003
|
if ($panel.contains(ev.target)) return;
|
|
1963
2004
|
if ($trigger && $trigger.contains(ev.target)) return;
|
|
@@ -2370,14 +2411,14 @@ function ac_nav_item_close(gobj, event, kw, src) {
|
|
|
2370
2411
|
/***************************************************************
|
|
2371
2412
|
* FSM
|
|
2372
2413
|
***************************************************************/
|
|
2373
|
-
var gmt$
|
|
2374
|
-
mt_create: mt_create$
|
|
2375
|
-
mt_start: mt_start$
|
|
2376
|
-
mt_stop: mt_stop$
|
|
2377
|
-
mt_destroy: mt_destroy$
|
|
2414
|
+
var gmt$18 = {
|
|
2415
|
+
mt_create: mt_create$18,
|
|
2416
|
+
mt_start: mt_start$15,
|
|
2417
|
+
mt_stop: mt_stop$15,
|
|
2418
|
+
mt_destroy: mt_destroy$18
|
|
2378
2419
|
};
|
|
2379
|
-
function create_gclass$
|
|
2380
|
-
if (__gclass__$
|
|
2420
|
+
function create_gclass$18(gclass_name) {
|
|
2421
|
+
if (__gclass__$18) {
|
|
2381
2422
|
log_error(`GClass ALREADY created: ${gclass_name}`);
|
|
2382
2423
|
return -1;
|
|
2383
2424
|
}
|
|
@@ -2398,19 +2439,19 @@ function create_gclass$17(gclass_name) {
|
|
|
2398
2439
|
null
|
|
2399
2440
|
]
|
|
2400
2441
|
]]];
|
|
2401
|
-
__gclass__$
|
|
2442
|
+
__gclass__$18 = gclass_create(gclass_name, [
|
|
2402
2443
|
["EV_NAV_CLICKED", 0],
|
|
2403
2444
|
["EV_DRAWER_CLOSE_REQUESTED", 0],
|
|
2404
2445
|
["EV_NAV_ITEM_CLOSE", event_flag_t.EVF_OUTPUT_EVENT | event_flag_t.EVF_PUBLIC_EVENT | event_flag_t.EVF_NO_WARN_SUBS],
|
|
2405
2446
|
["EV_ROUTE_REQUESTED", event_flag_t.EVF_OUTPUT_EVENT | event_flag_t.EVF_PUBLIC_EVENT | event_flag_t.EVF_NO_WARN_SUBS],
|
|
2406
2447
|
["EV_ROUTE_CHANGED", event_flag_t.EVF_OUTPUT_EVENT | event_flag_t.EVF_PUBLIC_EVENT | event_flag_t.EVF_NO_WARN_SUBS],
|
|
2407
2448
|
["EV_LANGUAGE_CHANGED", event_flag_t.EVF_OUTPUT_EVENT | event_flag_t.EVF_PUBLIC_EVENT | event_flag_t.EVF_NO_WARN_SUBS]
|
|
2408
|
-
], states, gmt$
|
|
2409
|
-
if (!__gclass__$
|
|
2449
|
+
], states, gmt$18, 0, attrs_table$18, PRIVATE_DATA$18, 0, 0, 0, gclass_flag_t.gcflag_no_check_output_events);
|
|
2450
|
+
if (!__gclass__$18) return -1;
|
|
2410
2451
|
return 0;
|
|
2411
2452
|
}
|
|
2412
2453
|
function register_c_yui_shell() {
|
|
2413
|
-
return create_gclass$
|
|
2454
|
+
return create_gclass$18(GCLASS_NAME$18);
|
|
2414
2455
|
}
|
|
2415
2456
|
/***************************************************************
|
|
2416
2457
|
* Public helpers — exported alongside register_c_yui_shell().
|
|
@@ -2469,7 +2510,7 @@ function remembered_position(gobj, route) {
|
|
|
2469
2510
|
function yui_shell_of(gobj) {
|
|
2470
2511
|
let g = gobj;
|
|
2471
2512
|
while (g) {
|
|
2472
|
-
if (gobj_gclass_name(g) === GCLASS_NAME$
|
|
2513
|
+
if (gobj_gclass_name(g) === GCLASS_NAME$18) return g;
|
|
2473
2514
|
g = gobj_parent(g);
|
|
2474
2515
|
}
|
|
2475
2516
|
return __last_shell__;
|
|
@@ -2606,9 +2647,10 @@ function yui_shell_refresh_avatars(shell_gobj) {
|
|
|
2606
2647
|
* Register the host's i18n translator (a t-function:
|
|
2607
2648
|
* key => translated string). The host still translates the
|
|
2608
2649
|
* static shell tree itself via refresh_language($container, t);
|
|
2609
|
-
* this is only so the shell
|
|
2610
|
-
*
|
|
2611
|
-
*
|
|
2650
|
+
* this is only so the shell — and the library components that
|
|
2651
|
+
* build DOM under it — can translate DOM built LAZILY, after
|
|
2652
|
+
* that one-shot pass and often outside $container.
|
|
2653
|
+
* Optional: with no translator such DOM renders raw keys
|
|
2612
2654
|
* (the previous behaviour).
|
|
2613
2655
|
************************************************************/
|
|
2614
2656
|
function yui_shell_set_translator(shell_gobj, t) {
|
|
@@ -2617,6 +2659,33 @@ function yui_shell_set_translator(shell_gobj, t) {
|
|
|
2617
2659
|
priv.translator = typeof t === "function" ? t : null;
|
|
2618
2660
|
}
|
|
2619
2661
|
/************************************************************
|
|
2662
|
+
* Apply the registered translator to a FRESHLY BUILT subtree.
|
|
2663
|
+
*
|
|
2664
|
+
* Carrying the `i18n` key on a node is not enough for it to
|
|
2665
|
+
* render translated: the node is born holding the raw English
|
|
2666
|
+
* key, and the host's refresh_language() passes walk what
|
|
2667
|
+
* ALREADY exists — the shell tree at start up, document.body on
|
|
2668
|
+
* a language switch. Anything built after that (a dropdown
|
|
2669
|
+
* panel, a nav a node renders when you walk into it) is reached
|
|
2670
|
+
* by neither, so it renders the key: lower-case English that
|
|
2671
|
+
* never changes language, i.e. exactly what a MISSING key looks
|
|
2672
|
+
* like.
|
|
2673
|
+
*
|
|
2674
|
+
* The division of labour, unchanged: LIBRARY-built DOM is
|
|
2675
|
+
* translated through here; APP view gclasses translate their own
|
|
2676
|
+
* DOM (they own a `t` — see mount_view).
|
|
2677
|
+
*
|
|
2678
|
+
* Silent no-op with no shell or no translator: an app that never
|
|
2679
|
+
* registered one keeps the previous behaviour instead of losing
|
|
2680
|
+
* its chrome.
|
|
2681
|
+
************************************************************/
|
|
2682
|
+
function yui_shell_translate(shell_gobj, $el) {
|
|
2683
|
+
if (!$el || !shell_gobj || !is_gobj(shell_gobj)) return;
|
|
2684
|
+
let priv = shell_gobj.priv;
|
|
2685
|
+
if (!priv || typeof priv.translator !== "function") return;
|
|
2686
|
+
refresh_language($el, priv.translator);
|
|
2687
|
+
}
|
|
2688
|
+
/************************************************************
|
|
2620
2689
|
* Set the backend-connection state painted by every
|
|
2621
2690
|
* type:"connection" toolbar item. Host/event-driven: the
|
|
2622
2691
|
* app calls this from its transport handlers (EV_ON_OPEN →
|
|
@@ -2645,6 +2714,41 @@ function yui_shell_set_toolbar_item_icon(shell_gobj, item_id, icon_class) {
|
|
|
2645
2714
|
if ($i) $i.className = icon_class;
|
|
2646
2715
|
}
|
|
2647
2716
|
/************************************************************
|
|
2717
|
+
* Set (or clear) a toolbar item's badge — the count pinned to
|
|
2718
|
+
* its icon.
|
|
2719
|
+
*
|
|
2720
|
+
* yui_shell_set_toolbar_item_badge(shell, "alarms", 3);
|
|
2721
|
+
* yui_shell_set_toolbar_item_badge(shell, "alarms", 0); // hidden
|
|
2722
|
+
*
|
|
2723
|
+
* This is the API that matters: a count is a RUNTIME fact. The
|
|
2724
|
+
* `badge` field of a toolbar item only seeds the first paint, and
|
|
2725
|
+
* an app whose number never changes did not need a badge.
|
|
2726
|
+
*
|
|
2727
|
+
* 0 / "" / null / false all clear it, and a number over 99 renders
|
|
2728
|
+
* "99+" — see badge_node(). Accepts a string for the states that
|
|
2729
|
+
* are not counts ("!", "…").
|
|
2730
|
+
*
|
|
2731
|
+
* Silent no-op on an unknown item id: a toolbar that does not
|
|
2732
|
+
* declare the item (an app without alarms) must not be an error
|
|
2733
|
+
* at every tick of whatever feeds the number.
|
|
2734
|
+
************************************************************/
|
|
2735
|
+
function yui_shell_set_toolbar_item_badge(shell_gobj, item_id, value) {
|
|
2736
|
+
if (!shell_gobj || !is_gobj(shell_gobj) || empty_string(item_id)) return;
|
|
2737
|
+
let $container = gobj_read_attr(shell_gobj, "$container");
|
|
2738
|
+
if (!$container) return;
|
|
2739
|
+
let $badge = $container.querySelector(`[data-toolbar-item-id="${item_id}"] .yui-toolbar-badge`);
|
|
2740
|
+
if (!$badge) return;
|
|
2741
|
+
let text = badge_text(value);
|
|
2742
|
+
if (!text) {
|
|
2743
|
+
$badge.textContent = "";
|
|
2744
|
+
$badge.setAttribute("hidden", "hidden");
|
|
2745
|
+
return;
|
|
2746
|
+
}
|
|
2747
|
+
if ($badge.textContent === text && !$badge.hasAttribute("hidden")) return;
|
|
2748
|
+
$badge.textContent = text;
|
|
2749
|
+
$badge.removeAttribute("hidden");
|
|
2750
|
+
}
|
|
2751
|
+
/************************************************************
|
|
2648
2752
|
* Programmatic close of any open toolbar dropdown. Useful for
|
|
2649
2753
|
* external triggers (e.g. EV_LOGOUT firing from elsewhere) that
|
|
2650
2754
|
* want to dismiss whatever menu is on screen.
|
|
@@ -3126,7 +3230,7 @@ function yui_shell_confirm_yesnocancel(shell, message, opts) {
|
|
|
3126
3230
|
/***************************************************************
|
|
3127
3231
|
* Constants
|
|
3128
3232
|
***************************************************************/
|
|
3129
|
-
var GCLASS_NAME$
|
|
3233
|
+
var GCLASS_NAME$17 = "C_YUI_WINDOW";
|
|
3130
3234
|
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>";
|
|
3131
3235
|
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>";
|
|
3132
3236
|
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>";
|
|
@@ -3135,7 +3239,7 @@ var MOBILE_MAX = 768;
|
|
|
3135
3239
|
/***************************************************************
|
|
3136
3240
|
* Data
|
|
3137
3241
|
***************************************************************/
|
|
3138
|
-
var attrs_table$
|
|
3242
|
+
var attrs_table$17 = [
|
|
3139
3243
|
SDATA(data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
3140
3244
|
SDATA(data_type_t.DTP_POINTER, "$parent", 0, null, "$container will be appended to $parent if not null, else to document.body"),
|
|
3141
3245
|
SDATA(data_type_t.DTP_INTEGER, "x", 0, "300", "X position"),
|
|
@@ -3173,15 +3277,15 @@ var attrs_table$16 = [
|
|
|
3173
3277
|
SDATA(data_type_t.DTP_POINTER, "win_resize_handler", 0, null, "Internal: native window 'resize' listener"),
|
|
3174
3278
|
SDATA_END()
|
|
3175
3279
|
];
|
|
3176
|
-
var PRIVATE_DATA$
|
|
3177
|
-
var __gclass__$
|
|
3280
|
+
var PRIVATE_DATA$17 = { prevSize: 0 };
|
|
3281
|
+
var __gclass__$17 = null;
|
|
3178
3282
|
/******************************
|
|
3179
3283
|
* Framework Methods
|
|
3180
3284
|
******************************/
|
|
3181
3285
|
/***************************************************************
|
|
3182
3286
|
* Framework Method: Create
|
|
3183
3287
|
***************************************************************/
|
|
3184
|
-
function mt_create$
|
|
3288
|
+
function mt_create$17(gobj) {
|
|
3185
3289
|
const subscriber = gobj_read_pointer_attr(gobj, "subscriber");
|
|
3186
3290
|
if (subscriber) gobj_subscribe_event(gobj, null, {}, subscriber);
|
|
3187
3291
|
gobj_write_attr(gobj, "window_id", "window-" + clean_name(gobj_short_name(gobj)));
|
|
@@ -3217,7 +3321,7 @@ function mt_create$16(gobj) {
|
|
|
3217
3321
|
/***************************************************************
|
|
3218
3322
|
* Framework Method: Destroy
|
|
3219
3323
|
***************************************************************/
|
|
3220
|
-
function mt_destroy$
|
|
3324
|
+
function mt_destroy$17(gobj) {
|
|
3221
3325
|
let manager = gobj_read_pointer_attr(gobj, "manager");
|
|
3222
3326
|
if (manager) gobj_send_event(manager, "EV_UNREGISTER_WINDOW", { window: gobj }, gobj);
|
|
3223
3327
|
let back_overlay = gobj_read_attr(gobj, "back_overlay");
|
|
@@ -3946,15 +4050,15 @@ function ac_close(gobj, event, kw, src) {
|
|
|
3946
4050
|
/***************************
|
|
3947
4051
|
* FSM
|
|
3948
4052
|
***************************/
|
|
3949
|
-
var gmt$
|
|
3950
|
-
mt_create: mt_create$
|
|
3951
|
-
mt_destroy: mt_destroy$
|
|
4053
|
+
var gmt$17 = {
|
|
4054
|
+
mt_create: mt_create$17,
|
|
4055
|
+
mt_destroy: mt_destroy$17
|
|
3952
4056
|
};
|
|
3953
4057
|
/***************************************************************
|
|
3954
4058
|
* Create the GClass
|
|
3955
4059
|
***************************************************************/
|
|
3956
|
-
function create_gclass$
|
|
3957
|
-
if (__gclass__$
|
|
4060
|
+
function create_gclass$17(gclass_name) {
|
|
4061
|
+
if (__gclass__$17) {
|
|
3958
4062
|
log_error(`GClass ALREADY created: ${gclass_name}`);
|
|
3959
4063
|
return -1;
|
|
3960
4064
|
}
|
|
@@ -3980,7 +4084,7 @@ function create_gclass$16(gclass_name) {
|
|
|
3980
4084
|
null
|
|
3981
4085
|
]
|
|
3982
4086
|
]]];
|
|
3983
|
-
__gclass__$
|
|
4087
|
+
__gclass__$17 = gclass_create(gclass_name, [
|
|
3984
4088
|
["EV_WINDOW_TO_CLOSE", event_flag_t.EVF_OUTPUT_EVENT | event_flag_t.EVF_NO_WARN_SUBS],
|
|
3985
4089
|
["EV_WINDOW_MOVED", event_flag_t.EVF_OUTPUT_EVENT | event_flag_t.EVF_NO_WARN_SUBS],
|
|
3986
4090
|
["EV_WINDOW_RESIZED", event_flag_t.EVF_OUTPUT_EVENT | event_flag_t.EVF_NO_WARN_SUBS],
|
|
@@ -3988,15 +4092,15 @@ function create_gclass$16(gclass_name) {
|
|
|
3988
4092
|
["EV_SHOW", 0],
|
|
3989
4093
|
["EV_HIDE", 0],
|
|
3990
4094
|
["EV_CLOSE_WINDOW", 0]
|
|
3991
|
-
], states, gmt$
|
|
3992
|
-
if (!__gclass__$
|
|
4095
|
+
], states, gmt$17, 0, attrs_table$17, PRIVATE_DATA$17, 0, 0, 0, 0);
|
|
4096
|
+
if (!__gclass__$17) return -1;
|
|
3993
4097
|
return 0;
|
|
3994
4098
|
}
|
|
3995
4099
|
/***************************************************************
|
|
3996
4100
|
* Register GClass
|
|
3997
4101
|
***************************************************************/
|
|
3998
4102
|
function register_c_yui_window() {
|
|
3999
|
-
return create_gclass$
|
|
4103
|
+
return create_gclass$17(GCLASS_NAME$17);
|
|
4000
4104
|
}
|
|
4001
4105
|
//#endregion
|
|
4002
4106
|
//#region src/c_yui_window_manager.js
|
|
@@ -4034,13 +4138,13 @@ function register_c_yui_window() {
|
|
|
4034
4138
|
/***************************************************************
|
|
4035
4139
|
* Constants
|
|
4036
4140
|
***************************************************************/
|
|
4037
|
-
var GCLASS_NAME$
|
|
4141
|
+
var GCLASS_NAME$16 = "C_YUI_WINDOW_MANAGER";
|
|
4038
4142
|
var DOCK_Z = 1e6;
|
|
4039
4143
|
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>";
|
|
4040
4144
|
/***************************************************************
|
|
4041
4145
|
* Data
|
|
4042
4146
|
***************************************************************/
|
|
4043
|
-
var attrs_table$
|
|
4147
|
+
var attrs_table$16 = [
|
|
4044
4148
|
SDATA(data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
4045
4149
|
SDATA(data_type_t.DTP_STRING, "dock_mode", 0, "floating", "floating | inline | responsive (floating on wide screens, inline on narrow)"),
|
|
4046
4150
|
SDATA(data_type_t.DTP_STRING, "dock_corner", 0, "bottom-left", "Floating placement: top-left | top-right | bottom-left | bottom-right"),
|
|
@@ -4050,20 +4154,20 @@ var attrs_table$15 = [
|
|
|
4050
4154
|
SDATA(data_type_t.DTP_POINTER, "$container", 0, null, "Internal: the dock element"),
|
|
4051
4155
|
SDATA_END()
|
|
4052
4156
|
];
|
|
4053
|
-
var PRIVATE_DATA$
|
|
4157
|
+
var PRIVATE_DATA$16 = {
|
|
4054
4158
|
windows: null,
|
|
4055
4159
|
z: 0,
|
|
4056
4160
|
mql: null,
|
|
4057
4161
|
mql_handler: null
|
|
4058
4162
|
};
|
|
4059
|
-
var __gclass__$
|
|
4163
|
+
var __gclass__$16 = null;
|
|
4060
4164
|
/******************************
|
|
4061
4165
|
* Framework Methods
|
|
4062
4166
|
******************************/
|
|
4063
4167
|
/***************************************************************
|
|
4064
4168
|
* Framework Method: Create
|
|
4065
4169
|
***************************************************************/
|
|
4066
|
-
function mt_create$
|
|
4170
|
+
function mt_create$16(gobj) {
|
|
4067
4171
|
let priv = gobj.priv;
|
|
4068
4172
|
priv.windows = [];
|
|
4069
4173
|
priv.z = 10;
|
|
@@ -4082,7 +4186,7 @@ function mt_create$15(gobj) {
|
|
|
4082
4186
|
/***************************************************************
|
|
4083
4187
|
* Framework Method: Destroy
|
|
4084
4188
|
***************************************************************/
|
|
4085
|
-
function mt_destroy$
|
|
4189
|
+
function mt_destroy$16(gobj) {
|
|
4086
4190
|
let priv = gobj.priv;
|
|
4087
4191
|
if (priv.mql && priv.mql_handler) {
|
|
4088
4192
|
priv.mql.removeEventListener("change", priv.mql_handler);
|
|
@@ -4441,19 +4545,19 @@ function ac_focus_window(gobj, event, kw, src) {
|
|
|
4441
4545
|
/***************************
|
|
4442
4546
|
* FSM
|
|
4443
4547
|
***************************/
|
|
4444
|
-
var gmt$
|
|
4445
|
-
mt_create: mt_create$
|
|
4446
|
-
mt_destroy: mt_destroy$
|
|
4548
|
+
var gmt$16 = {
|
|
4549
|
+
mt_create: mt_create$16,
|
|
4550
|
+
mt_destroy: mt_destroy$16
|
|
4447
4551
|
};
|
|
4448
4552
|
/***************************************************************
|
|
4449
4553
|
* Create the GClass
|
|
4450
4554
|
***************************************************************/
|
|
4451
|
-
function create_gclass$
|
|
4452
|
-
if (__gclass__$
|
|
4555
|
+
function create_gclass$16(gclass_name) {
|
|
4556
|
+
if (__gclass__$16) {
|
|
4453
4557
|
log_error(`GClass ALREADY created: ${gclass_name}`);
|
|
4454
4558
|
return -1;
|
|
4455
4559
|
}
|
|
4456
|
-
__gclass__$
|
|
4560
|
+
__gclass__$16 = gclass_create(gclass_name, [
|
|
4457
4561
|
["EV_REGISTER_WINDOW", 0],
|
|
4458
4562
|
["EV_UNREGISTER_WINDOW", 0],
|
|
4459
4563
|
["EV_MINIMIZE_WINDOW", 0],
|
|
@@ -4479,15 +4583,15 @@ function create_gclass$15(gclass_name) {
|
|
|
4479
4583
|
ac_focus_window,
|
|
4480
4584
|
null
|
|
4481
4585
|
]
|
|
4482
|
-
]]], gmt$
|
|
4483
|
-
if (!__gclass__$
|
|
4586
|
+
]]], gmt$16, 0, attrs_table$16, PRIVATE_DATA$16, 0, 0, 0, 0);
|
|
4587
|
+
if (!__gclass__$16) return -1;
|
|
4484
4588
|
return 0;
|
|
4485
4589
|
}
|
|
4486
4590
|
/***************************************************************
|
|
4487
4591
|
* Register GClass
|
|
4488
4592
|
***************************************************************/
|
|
4489
4593
|
function register_c_yui_window_manager() {
|
|
4490
|
-
return create_gclass$
|
|
4594
|
+
return create_gclass$16(GCLASS_NAME$16);
|
|
4491
4595
|
}
|
|
4492
4596
|
//#endregion
|
|
4493
4597
|
//#region src/pager_helpers.js
|
|
@@ -4573,11 +4677,11 @@ function pager_back_action(stack, back_on_root) {
|
|
|
4573
4677
|
/***************************************************************
|
|
4574
4678
|
* Constants
|
|
4575
4679
|
***************************************************************/
|
|
4576
|
-
var GCLASS_NAME$
|
|
4680
|
+
var GCLASS_NAME$15 = "C_YUI_PAGER";
|
|
4577
4681
|
/***************************************************************
|
|
4578
4682
|
* Data
|
|
4579
4683
|
***************************************************************/
|
|
4580
|
-
var attrs_table$
|
|
4684
|
+
var attrs_table$15 = [
|
|
4581
4685
|
SDATA(data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
4582
4686
|
SDATA(data_type_t.DTP_STRING, "root_title", 0, "", "Title shown on the root page"),
|
|
4583
4687
|
SDATA(data_type_t.DTP_BOOLEAN, "back_on_root", 0, true, "On the root page the back affordance emits EV_PAGER_EXIT"),
|
|
@@ -4585,15 +4689,15 @@ var attrs_table$14 = [
|
|
|
4585
4689
|
SDATA(data_type_t.DTP_POINTER, "$container", 0, null, "HTMLElement root, mounted by the parent"),
|
|
4586
4690
|
SDATA_END()
|
|
4587
4691
|
];
|
|
4588
|
-
var PRIVATE_DATA$
|
|
4589
|
-
var __gclass__$
|
|
4692
|
+
var PRIVATE_DATA$15 = { stack: null };
|
|
4693
|
+
var __gclass__$15 = null;
|
|
4590
4694
|
/******************************
|
|
4591
4695
|
* Framework Methods
|
|
4592
4696
|
******************************/
|
|
4593
4697
|
/***************************************************************
|
|
4594
4698
|
* Framework Method: Create
|
|
4595
4699
|
***************************************************************/
|
|
4596
|
-
function mt_create$
|
|
4700
|
+
function mt_create$15(gobj) {
|
|
4597
4701
|
let priv = gobj.priv;
|
|
4598
4702
|
priv.stack = [];
|
|
4599
4703
|
build_ui$13(gobj);
|
|
@@ -4604,17 +4708,17 @@ function mt_create$14(gobj) {
|
|
|
4604
4708
|
/***************************************************************
|
|
4605
4709
|
* Framework Method: Start
|
|
4606
4710
|
***************************************************************/
|
|
4607
|
-
function mt_start$
|
|
4711
|
+
function mt_start$14(gobj) {}
|
|
4608
4712
|
/***************************************************************
|
|
4609
4713
|
* Framework Method: Stop
|
|
4610
4714
|
***************************************************************/
|
|
4611
|
-
function mt_stop$
|
|
4715
|
+
function mt_stop$14(gobj) {
|
|
4612
4716
|
gobj_stop_children(gobj);
|
|
4613
4717
|
}
|
|
4614
4718
|
/***************************************************************
|
|
4615
4719
|
* Framework Method: Destroy
|
|
4616
4720
|
***************************************************************/
|
|
4617
|
-
function mt_destroy$
|
|
4721
|
+
function mt_destroy$15(gobj) {
|
|
4618
4722
|
destroy_ui$9(gobj);
|
|
4619
4723
|
}
|
|
4620
4724
|
/***************************
|
|
@@ -4772,7 +4876,7 @@ function ac_push_page(gobj, event, kw, src) {
|
|
|
4772
4876
|
let priv = gobj.priv;
|
|
4773
4877
|
let resolved = resolve_panel$1(kw.content);
|
|
4774
4878
|
if (!resolved.$el) {
|
|
4775
|
-
log_error(`${GCLASS_NAME$
|
|
4879
|
+
log_error(`${GCLASS_NAME$15}: EV_PUSH_PAGE without content`);
|
|
4776
4880
|
return -1;
|
|
4777
4881
|
}
|
|
4778
4882
|
let $body = gobj_read_attr(gobj, "$container").querySelector(".yui-pager-body");
|
|
@@ -4825,7 +4929,7 @@ function ac_replace_page(gobj, event, kw, src) {
|
|
|
4825
4929
|
let priv = gobj.priv;
|
|
4826
4930
|
let resolved = resolve_panel$1(kw.content);
|
|
4827
4931
|
if (!resolved.$el) {
|
|
4828
|
-
log_error(`${GCLASS_NAME$
|
|
4932
|
+
log_error(`${GCLASS_NAME$15}: EV_REPLACE_PAGE without content`);
|
|
4829
4933
|
return -1;
|
|
4830
4934
|
}
|
|
4831
4935
|
let $body = gobj_read_attr(gobj, "$container").querySelector(".yui-pager-body");
|
|
@@ -4892,17 +4996,17 @@ function ac_resize$4(gobj, event, kw, src) {
|
|
|
4892
4996
|
/***************************
|
|
4893
4997
|
* FSM
|
|
4894
4998
|
***************************/
|
|
4895
|
-
var gmt$
|
|
4896
|
-
mt_create: mt_create$
|
|
4897
|
-
mt_start: mt_start$
|
|
4898
|
-
mt_stop: mt_stop$
|
|
4899
|
-
mt_destroy: mt_destroy$
|
|
4999
|
+
var gmt$15 = {
|
|
5000
|
+
mt_create: mt_create$15,
|
|
5001
|
+
mt_start: mt_start$14,
|
|
5002
|
+
mt_stop: mt_stop$14,
|
|
5003
|
+
mt_destroy: mt_destroy$15
|
|
4900
5004
|
};
|
|
4901
5005
|
/***************************************************************
|
|
4902
5006
|
* Create the GClass
|
|
4903
5007
|
***************************************************************/
|
|
4904
|
-
function create_gclass$
|
|
4905
|
-
if (__gclass__$
|
|
5008
|
+
function create_gclass$15(gclass_name) {
|
|
5009
|
+
if (__gclass__$15) {
|
|
4906
5010
|
log_error(`GClass ALREADY created: ${gclass_name}`);
|
|
4907
5011
|
return -1;
|
|
4908
5012
|
}
|
|
@@ -4953,7 +5057,7 @@ function create_gclass$14(gclass_name) {
|
|
|
4953
5057
|
null
|
|
4954
5058
|
]
|
|
4955
5059
|
]]];
|
|
4956
|
-
__gclass__$
|
|
5060
|
+
__gclass__$15 = gclass_create(gclass_name, [
|
|
4957
5061
|
["EV_PUSH_PAGE", 0],
|
|
4958
5062
|
["EV_POP_PAGE", 0],
|
|
4959
5063
|
["EV_BACK", 0],
|
|
@@ -4966,15 +5070,15 @@ function create_gclass$14(gclass_name) {
|
|
|
4966
5070
|
["EV_PAGE_SHOWN", event_flag_t.EVF_OUTPUT_EVENT | event_flag_t.EVF_NO_WARN_SUBS],
|
|
4967
5071
|
["EV_PAGE_DISCARD", event_flag_t.EVF_OUTPUT_EVENT],
|
|
4968
5072
|
["EV_PAGER_EXIT", event_flag_t.EVF_OUTPUT_EVENT]
|
|
4969
|
-
], states, gmt$
|
|
4970
|
-
if (!__gclass__$
|
|
5073
|
+
], states, gmt$15, 0, attrs_table$15, PRIVATE_DATA$15, 0, 0, 0, 0);
|
|
5074
|
+
if (!__gclass__$15) return -1;
|
|
4971
5075
|
return 0;
|
|
4972
5076
|
}
|
|
4973
5077
|
/***************************************************************
|
|
4974
5078
|
* Register GClass
|
|
4975
5079
|
***************************************************************/
|
|
4976
5080
|
function register_c_yui_pager() {
|
|
4977
|
-
return create_gclass$
|
|
5081
|
+
return create_gclass$15(GCLASS_NAME$15);
|
|
4978
5082
|
}
|
|
4979
5083
|
//#endregion
|
|
4980
5084
|
//#region src/wizard_helpers.js
|
|
@@ -5095,11 +5199,11 @@ function wizard_should_validate(linear, has_gobj) {
|
|
|
5095
5199
|
/***************************************************************
|
|
5096
5200
|
* Constants
|
|
5097
5201
|
***************************************************************/
|
|
5098
|
-
var GCLASS_NAME$
|
|
5202
|
+
var GCLASS_NAME$14 = "C_YUI_WIZARD";
|
|
5099
5203
|
/***************************************************************
|
|
5100
5204
|
* Data
|
|
5101
5205
|
***************************************************************/
|
|
5102
|
-
var attrs_table$
|
|
5206
|
+
var attrs_table$14 = [
|
|
5103
5207
|
SDATA(data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
5104
5208
|
SDATA(data_type_t.DTP_STRING, "confirm_label", 0, "confirm", "i18n key of the last-step primary button"),
|
|
5105
5209
|
SDATA(data_type_t.DTP_STRING, "next_label", 0, "next", "i18n key of the primary button (not last step)"),
|
|
@@ -5109,20 +5213,20 @@ var attrs_table$13 = [
|
|
|
5109
5213
|
SDATA(data_type_t.DTP_POINTER, "$container", 0, null, "HTMLElement root, mounted by the parent"),
|
|
5110
5214
|
SDATA_END()
|
|
5111
5215
|
];
|
|
5112
|
-
var PRIVATE_DATA$
|
|
5216
|
+
var PRIVATE_DATA$14 = {
|
|
5113
5217
|
steps: null,
|
|
5114
5218
|
idx: 0,
|
|
5115
5219
|
acc: null,
|
|
5116
5220
|
awaiting: false
|
|
5117
5221
|
};
|
|
5118
|
-
var __gclass__$
|
|
5222
|
+
var __gclass__$14 = null;
|
|
5119
5223
|
/******************************
|
|
5120
5224
|
* Framework Methods
|
|
5121
5225
|
******************************/
|
|
5122
5226
|
/***************************************************************
|
|
5123
5227
|
* Framework Method: Create
|
|
5124
5228
|
***************************************************************/
|
|
5125
|
-
function mt_create$
|
|
5229
|
+
function mt_create$14(gobj) {
|
|
5126
5230
|
let priv = gobj.priv;
|
|
5127
5231
|
priv.steps = [];
|
|
5128
5232
|
priv.idx = 0;
|
|
@@ -5136,17 +5240,17 @@ function mt_create$13(gobj) {
|
|
|
5136
5240
|
/***************************************************************
|
|
5137
5241
|
* Framework Method: Start
|
|
5138
5242
|
***************************************************************/
|
|
5139
|
-
function mt_start$
|
|
5243
|
+
function mt_start$13(gobj) {}
|
|
5140
5244
|
/***************************************************************
|
|
5141
5245
|
* Framework Method: Stop
|
|
5142
5246
|
***************************************************************/
|
|
5143
|
-
function mt_stop$
|
|
5247
|
+
function mt_stop$13(gobj) {
|
|
5144
5248
|
gobj_stop_children(gobj);
|
|
5145
5249
|
}
|
|
5146
5250
|
/***************************************************************
|
|
5147
5251
|
* Framework Method: Destroy
|
|
5148
5252
|
***************************************************************/
|
|
5149
|
-
function mt_destroy$
|
|
5253
|
+
function mt_destroy$14(gobj) {
|
|
5150
5254
|
destroy_ui$8(gobj);
|
|
5151
5255
|
}
|
|
5152
5256
|
/***************************
|
|
@@ -5353,7 +5457,7 @@ function ac_set_steps(gobj, event, kw, src) {
|
|
|
5353
5457
|
let priv = gobj.priv;
|
|
5354
5458
|
let steps_in = kw && kw.steps || [];
|
|
5355
5459
|
if (steps_in.length === 0) {
|
|
5356
|
-
log_error(`${GCLASS_NAME$
|
|
5460
|
+
log_error(`${GCLASS_NAME$14}: EV_SET_STEPS with no steps`);
|
|
5357
5461
|
return -1;
|
|
5358
5462
|
}
|
|
5359
5463
|
let $body = gobj_read_attr(gobj, "$container").querySelector(".yui-wizard-body");
|
|
@@ -5363,7 +5467,7 @@ function ac_set_steps(gobj, event, kw, src) {
|
|
|
5363
5467
|
let st = steps_in[i];
|
|
5364
5468
|
let resolved = resolve_panel(st.content);
|
|
5365
5469
|
if (!resolved.$el) {
|
|
5366
|
-
log_error(`${GCLASS_NAME$
|
|
5470
|
+
log_error(`${GCLASS_NAME$14}: step '${st.id}' has no content`);
|
|
5367
5471
|
return -1;
|
|
5368
5472
|
}
|
|
5369
5473
|
resolved.$el.classList.add("is-hidden");
|
|
@@ -5497,17 +5601,17 @@ function ac_resize$3(gobj, event, kw, src) {
|
|
|
5497
5601
|
/***************************
|
|
5498
5602
|
* FSM
|
|
5499
5603
|
***************************/
|
|
5500
|
-
var gmt$
|
|
5501
|
-
mt_create: mt_create$
|
|
5502
|
-
mt_start: mt_start$
|
|
5503
|
-
mt_stop: mt_stop$
|
|
5504
|
-
mt_destroy: mt_destroy$
|
|
5604
|
+
var gmt$14 = {
|
|
5605
|
+
mt_create: mt_create$14,
|
|
5606
|
+
mt_start: mt_start$13,
|
|
5607
|
+
mt_stop: mt_stop$13,
|
|
5608
|
+
mt_destroy: mt_destroy$14
|
|
5505
5609
|
};
|
|
5506
5610
|
/***************************************************************
|
|
5507
5611
|
* Create the GClass
|
|
5508
5612
|
***************************************************************/
|
|
5509
|
-
function create_gclass$
|
|
5510
|
-
if (__gclass__$
|
|
5613
|
+
function create_gclass$14(gclass_name) {
|
|
5614
|
+
if (__gclass__$14) {
|
|
5511
5615
|
log_error(`GClass ALREADY created: ${gclass_name}`);
|
|
5512
5616
|
return -1;
|
|
5513
5617
|
}
|
|
@@ -5568,7 +5672,7 @@ function create_gclass$13(gclass_name) {
|
|
|
5568
5672
|
null
|
|
5569
5673
|
]
|
|
5570
5674
|
]]];
|
|
5571
|
-
__gclass__$
|
|
5675
|
+
__gclass__$14 = gclass_create(gclass_name, [
|
|
5572
5676
|
["EV_SET_STEPS", 0],
|
|
5573
5677
|
["EV_NEXT", 0],
|
|
5574
5678
|
["EV_PREV", 0],
|
|
@@ -5584,15 +5688,15 @@ function create_gclass$13(gclass_name) {
|
|
|
5584
5688
|
["EV_WIZARD_DONE", event_flag_t.EVF_OUTPUT_EVENT],
|
|
5585
5689
|
["EV_WIZARD_CANCEL", event_flag_t.EVF_OUTPUT_EVENT],
|
|
5586
5690
|
["EV_STEP_VALIDATE", event_flag_t.EVF_OUTPUT_EVENT | event_flag_t.EVF_NO_WARN_SUBS]
|
|
5587
|
-
], states, gmt$
|
|
5588
|
-
if (!__gclass__$
|
|
5691
|
+
], states, gmt$14, 0, attrs_table$14, PRIVATE_DATA$14, 0, 0, 0, 0);
|
|
5692
|
+
if (!__gclass__$14) return -1;
|
|
5589
5693
|
return 0;
|
|
5590
5694
|
}
|
|
5591
5695
|
/***************************************************************
|
|
5592
5696
|
* Register GClass
|
|
5593
5697
|
***************************************************************/
|
|
5594
5698
|
function register_c_yui_wizard() {
|
|
5595
|
-
return create_gclass$
|
|
5699
|
+
return create_gclass$14(GCLASS_NAME$14);
|
|
5596
5700
|
}
|
|
5597
5701
|
//#endregion
|
|
5598
5702
|
//#region src/yui_inputs.js
|
|
@@ -5762,11 +5866,11 @@ function yui_watch_theme(gobj, event = "EV_THEME") {
|
|
|
5762
5866
|
/***************************************************************
|
|
5763
5867
|
* Constants
|
|
5764
5868
|
***************************************************************/
|
|
5765
|
-
var GCLASS_NAME$
|
|
5869
|
+
var GCLASS_NAME$13 = "C_YUI_FORM";
|
|
5766
5870
|
/***************************************************************
|
|
5767
5871
|
* Data
|
|
5768
5872
|
***************************************************************/
|
|
5769
|
-
var attrs_table$
|
|
5873
|
+
var attrs_table$13 = [
|
|
5770
5874
|
SDATA(data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of publishing messages"),
|
|
5771
5875
|
SDATA(data_type_t.DTP_POINTER, "$parent", 0, null, "$container will be appended to $parent if not null, else do it manually"),
|
|
5772
5876
|
SDATA(data_type_t.DTP_POINTER, "template", 0, "<div>You must supply a template for form</div>", "Template for form, object -> TEMPLATE, array -> DESC"),
|
|
@@ -5794,15 +5898,15 @@ var attrs_table$12 = [
|
|
|
5794
5898
|
SDATA(data_type_t.DTP_BOOLEAN, "changes", 0, false, "Indicates if changes have been made"),
|
|
5795
5899
|
SDATA_END()
|
|
5796
5900
|
];
|
|
5797
|
-
var PRIVATE_DATA$
|
|
5798
|
-
var __gclass__$
|
|
5901
|
+
var PRIVATE_DATA$13 = {};
|
|
5902
|
+
var __gclass__$13 = null;
|
|
5799
5903
|
/***************************
|
|
5800
5904
|
* Framework Methods
|
|
5801
5905
|
***************************/
|
|
5802
5906
|
/************************************************************
|
|
5803
5907
|
* Framework Method create
|
|
5804
5908
|
************************************************************/
|
|
5805
|
-
function mt_create$
|
|
5909
|
+
function mt_create$13(gobj) {
|
|
5806
5910
|
let subscriber = gobj_read_pointer_attr(gobj, "subscriber");
|
|
5807
5911
|
if (!subscriber) subscriber = gobj_parent(gobj);
|
|
5808
5912
|
gobj_subscribe_event(gobj, null, {}, subscriber);
|
|
@@ -5814,20 +5918,20 @@ function mt_create$12(gobj) {
|
|
|
5814
5918
|
* In this point, all children
|
|
5815
5919
|
* and subscriptions are already deleted.
|
|
5816
5920
|
************************************************************/
|
|
5817
|
-
function mt_destroy$
|
|
5921
|
+
function mt_destroy$13(gobj) {
|
|
5818
5922
|
destroy_ui$7(gobj);
|
|
5819
5923
|
}
|
|
5820
5924
|
/************************************************************
|
|
5821
5925
|
* Framework Method start
|
|
5822
5926
|
************************************************************/
|
|
5823
|
-
function mt_start$
|
|
5927
|
+
function mt_start$12(gobj) {
|
|
5824
5928
|
let record = gobj_read_attr(gobj, "record");
|
|
5825
5929
|
if (record) gobj_send_event(gobj, "EV_LOAD_RECORD", record, gobj);
|
|
5826
5930
|
}
|
|
5827
5931
|
/************************************************************
|
|
5828
5932
|
* Framework Method stop
|
|
5829
5933
|
************************************************************/
|
|
5830
|
-
function mt_stop$
|
|
5934
|
+
function mt_stop$12(gobj) {}
|
|
5831
5935
|
/***************************
|
|
5832
5936
|
* Local Methods
|
|
5833
5937
|
***************************/
|
|
@@ -7838,17 +7942,17 @@ function ac_timeout(gobj, event, kw, src) {
|
|
|
7838
7942
|
/***************************
|
|
7839
7943
|
* FSM
|
|
7840
7944
|
***************************/
|
|
7841
|
-
var gmt$
|
|
7842
|
-
mt_create: mt_create$
|
|
7843
|
-
mt_start: mt_start$
|
|
7844
|
-
mt_stop: mt_stop$
|
|
7845
|
-
mt_destroy: mt_destroy$
|
|
7945
|
+
var gmt$13 = {
|
|
7946
|
+
mt_create: mt_create$13,
|
|
7947
|
+
mt_start: mt_start$12,
|
|
7948
|
+
mt_stop: mt_stop$12,
|
|
7949
|
+
mt_destroy: mt_destroy$13
|
|
7846
7950
|
};
|
|
7847
7951
|
/***************************************************************
|
|
7848
7952
|
* Create the GClass
|
|
7849
7953
|
***************************************************************/
|
|
7850
|
-
function create_gclass$
|
|
7851
|
-
if (__gclass__$
|
|
7954
|
+
function create_gclass$13(gclass_name) {
|
|
7955
|
+
if (__gclass__$13) {
|
|
7852
7956
|
log_error(`GClass ALREADY created: ${gclass_name}`);
|
|
7853
7957
|
return -1;
|
|
7854
7958
|
}
|
|
@@ -7929,7 +8033,7 @@ function create_gclass$12(gclass_name) {
|
|
|
7929
8033
|
null
|
|
7930
8034
|
]
|
|
7931
8035
|
]]];
|
|
7932
|
-
__gclass__$
|
|
8036
|
+
__gclass__$13 = gclass_create(gclass_name, [
|
|
7933
8037
|
["EV_LOAD_RECORD", 0],
|
|
7934
8038
|
["EV_SAVE_RECORD", event_flag_t.EVF_OUTPUT_EVENT],
|
|
7935
8039
|
["EV_UNDO_RECORD", 0],
|
|
@@ -7945,16 +8049,16 @@ function create_gclass$12(gclass_name) {
|
|
|
7945
8049
|
["EV_SHOW", 0],
|
|
7946
8050
|
["EV_HIDE", 0],
|
|
7947
8051
|
["EV_TIMEOUT", 0]
|
|
7948
|
-
], states, gmt$
|
|
7949
|
-
if (!__gclass__$
|
|
8052
|
+
], states, gmt$13, 0, attrs_table$13, PRIVATE_DATA$13, 0, 0, 0, 0);
|
|
8053
|
+
if (!__gclass__$13) return -1;
|
|
7950
8054
|
return 0;
|
|
7951
8055
|
}
|
|
7952
8056
|
/***************************************************************
|
|
7953
8057
|
* Register GClass
|
|
7954
8058
|
***************************************************************/
|
|
7955
8059
|
function register_c_yui_form() {
|
|
7956
|
-
if (gclass_find_by_name(GCLASS_NAME$
|
|
7957
|
-
return create_gclass$
|
|
8060
|
+
if (gclass_find_by_name(GCLASS_NAME$13, false)) return 0;
|
|
8061
|
+
return create_gclass$13(GCLASS_NAME$13);
|
|
7958
8062
|
}
|
|
7959
8063
|
//#endregion
|
|
7960
8064
|
//#region src/lib_maplibre.js
|
|
@@ -8114,11 +8218,11 @@ var MarkerControl = class {
|
|
|
8114
8218
|
/***************************************************************
|
|
8115
8219
|
* Constants
|
|
8116
8220
|
***************************************************************/
|
|
8117
|
-
var GCLASS_NAME$
|
|
8221
|
+
var GCLASS_NAME$12 = "C_YUI_MAP";
|
|
8118
8222
|
/***************************************************************
|
|
8119
8223
|
* Data
|
|
8120
8224
|
***************************************************************/
|
|
8121
|
-
var attrs_table$
|
|
8225
|
+
var attrs_table$12 = [
|
|
8122
8226
|
SDATA(data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
8123
8227
|
SDATA(data_type_t.DTP_JSON, "devices", "[]", null, "List of devices"),
|
|
8124
8228
|
SDATA(data_type_t.DTP_JSON, "map_settings", 0, {
|
|
@@ -8139,7 +8243,7 @@ var attrs_table$11 = [
|
|
|
8139
8243
|
SDATA(data_type_t.DTP_INTEGER, "timeout_idle", 0, 5, "Idle timeout in seconds"),
|
|
8140
8244
|
SDATA_END()
|
|
8141
8245
|
];
|
|
8142
|
-
var PRIVATE_DATA$
|
|
8246
|
+
var PRIVATE_DATA$12 = {
|
|
8143
8247
|
xmap: null,
|
|
8144
8248
|
geojson: null,
|
|
8145
8249
|
resizeObserver: null,
|
|
@@ -8148,21 +8252,21 @@ var PRIVATE_DATA$11 = {
|
|
|
8148
8252
|
markers: {},
|
|
8149
8253
|
draggedFeature: null
|
|
8150
8254
|
};
|
|
8151
|
-
var __gclass__$
|
|
8255
|
+
var __gclass__$12 = null;
|
|
8152
8256
|
/******************************
|
|
8153
8257
|
* Framework Methods
|
|
8154
8258
|
******************************/
|
|
8155
8259
|
/***************************************************************
|
|
8156
8260
|
* Framework Method: Create
|
|
8157
8261
|
***************************************************************/
|
|
8158
|
-
function mt_create$
|
|
8262
|
+
function mt_create$12(gobj) {
|
|
8159
8263
|
let priv = gobj.priv;
|
|
8160
8264
|
let subscriber = gobj_read_pointer_attr(gobj, "subscriber");
|
|
8161
8265
|
if (!subscriber) subscriber = gobj_parent(gobj);
|
|
8162
8266
|
gobj_subscribe_event(gobj, null, {}, subscriber);
|
|
8163
8267
|
let map_settings = json_deep_copy(gobj_read_attr(gobj, "map_settings"));
|
|
8164
8268
|
let $map = gobj_read_attr(gobj, "$map");
|
|
8165
|
-
if ($map) $map.classList.add(GCLASS_NAME$
|
|
8269
|
+
if ($map) $map.classList.add(GCLASS_NAME$12);
|
|
8166
8270
|
Object.assign(map_settings, { container: $map });
|
|
8167
8271
|
priv.onClick = (ev) => {
|
|
8168
8272
|
onClick(gobj, ev);
|
|
@@ -8211,7 +8315,7 @@ function mt_create$11(gobj) {
|
|
|
8211
8315
|
/***************************************************************
|
|
8212
8316
|
* Framework Method: Destroy
|
|
8213
8317
|
***************************************************************/
|
|
8214
|
-
function mt_destroy$
|
|
8318
|
+
function mt_destroy$12(gobj) {
|
|
8215
8319
|
let priv = gobj.priv;
|
|
8216
8320
|
if (priv.resizeObserver) {
|
|
8217
8321
|
priv.resizeObserver.disconnect();
|
|
@@ -8627,19 +8731,19 @@ function ac_hide$7(gobj, event, kw, src) {
|
|
|
8627
8731
|
/***************************
|
|
8628
8732
|
* FSM
|
|
8629
8733
|
***************************/
|
|
8630
|
-
var gmt$
|
|
8631
|
-
mt_create: mt_create$
|
|
8632
|
-
mt_destroy: mt_destroy$
|
|
8734
|
+
var gmt$12 = {
|
|
8735
|
+
mt_create: mt_create$12,
|
|
8736
|
+
mt_destroy: mt_destroy$12
|
|
8633
8737
|
};
|
|
8634
8738
|
/***************************************************************
|
|
8635
8739
|
* Create the GClass
|
|
8636
8740
|
***************************************************************/
|
|
8637
|
-
function create_gclass$
|
|
8638
|
-
if (__gclass__$
|
|
8741
|
+
function create_gclass$12(gclass_name) {
|
|
8742
|
+
if (__gclass__$12) {
|
|
8639
8743
|
log_error(`GClass ALREADY created: ${gclass_name}`);
|
|
8640
8744
|
return -1;
|
|
8641
8745
|
}
|
|
8642
|
-
__gclass__$
|
|
8746
|
+
__gclass__$12 = gclass_create(gclass_name, [
|
|
8643
8747
|
["EV_EDIT_MAP", 0],
|
|
8644
8748
|
["EV_CONTROL_MAP", 0],
|
|
8645
8749
|
["EV_MAP_ON_LOAD", 0],
|
|
@@ -8683,15 +8787,15 @@ function create_gclass$11(gclass_name) {
|
|
|
8683
8787
|
ac_hide$7,
|
|
8684
8788
|
null
|
|
8685
8789
|
]
|
|
8686
|
-
]]], gmt$
|
|
8687
|
-
if (!__gclass__$
|
|
8790
|
+
]]], gmt$12, 0, attrs_table$12, PRIVATE_DATA$12, 0, 0, 0, 0);
|
|
8791
|
+
if (!__gclass__$12) return -1;
|
|
8688
8792
|
return 0;
|
|
8689
8793
|
}
|
|
8690
8794
|
/***************************************************************
|
|
8691
8795
|
* Register GClass
|
|
8692
8796
|
***************************************************************/
|
|
8693
8797
|
function register_c_yui_map() {
|
|
8694
|
-
return create_gclass$
|
|
8798
|
+
return create_gclass$12(GCLASS_NAME$12);
|
|
8695
8799
|
}
|
|
8696
8800
|
//#endregion
|
|
8697
8801
|
//#region src/c_yui_uplot.js
|
|
@@ -8706,11 +8810,11 @@ function register_c_yui_map() {
|
|
|
8706
8810
|
/***************************************************************
|
|
8707
8811
|
* Constants
|
|
8708
8812
|
***************************************************************/
|
|
8709
|
-
var GCLASS_NAME$
|
|
8813
|
+
var GCLASS_NAME$11 = "C_YUI_UPLOT";
|
|
8710
8814
|
/***************************************************************
|
|
8711
8815
|
* Data
|
|
8712
8816
|
***************************************************************/
|
|
8713
|
-
var attrs_table$
|
|
8817
|
+
var attrs_table$11 = [
|
|
8714
8818
|
SDATA(data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
8715
8819
|
SDATA(data_type_t.DTP_STRING, "title", 0, "", "Chart title"),
|
|
8716
8820
|
SDATA(data_type_t.DTP_INTEGER, "width", 0, 800, "Chart width"),
|
|
@@ -8745,15 +8849,15 @@ var attrs_table$10 = [
|
|
|
8745
8849
|
SDATA(data_type_t.DTP_INTEGER, "timeout_idle", 0, 5, "Idle timeout (seconds)"),
|
|
8746
8850
|
SDATA_END()
|
|
8747
8851
|
];
|
|
8748
|
-
var PRIVATE_DATA$
|
|
8749
|
-
var __gclass__$
|
|
8852
|
+
var PRIVATE_DATA$11 = {};
|
|
8853
|
+
var __gclass__$11 = null;
|
|
8750
8854
|
/******************************
|
|
8751
8855
|
* Framework Methods
|
|
8752
8856
|
******************************/
|
|
8753
8857
|
/***************************************************************
|
|
8754
8858
|
* Framework Method: Create
|
|
8755
8859
|
***************************************************************/
|
|
8756
|
-
function mt_create$
|
|
8860
|
+
function mt_create$11(gobj) {
|
|
8757
8861
|
build_ui$10(gobj);
|
|
8758
8862
|
let subscriber = gobj_read_pointer_attr(gobj, "subscriber");
|
|
8759
8863
|
if (!subscriber) subscriber = gobj_parent(gobj);
|
|
@@ -8762,15 +8866,15 @@ function mt_create$10(gobj) {
|
|
|
8762
8866
|
/***************************************************************
|
|
8763
8867
|
* Framework Method: Start
|
|
8764
8868
|
***************************************************************/
|
|
8765
|
-
function mt_start$
|
|
8869
|
+
function mt_start$11(gobj) {}
|
|
8766
8870
|
/***************************************************************
|
|
8767
8871
|
* Framework Method: Stop
|
|
8768
8872
|
***************************************************************/
|
|
8769
|
-
function mt_stop$
|
|
8873
|
+
function mt_stop$11(gobj) {}
|
|
8770
8874
|
/***************************************************************
|
|
8771
8875
|
* Framework Method: Destroy
|
|
8772
8876
|
***************************************************************/
|
|
8773
|
-
function mt_destroy$
|
|
8877
|
+
function mt_destroy$11(gobj) {
|
|
8774
8878
|
let uplot = gobj_read_attr(gobj, "uplot");
|
|
8775
8879
|
if (uplot) {
|
|
8776
8880
|
uplot.destroy();
|
|
@@ -8936,21 +9040,21 @@ function ac_clear(gobj, event, kw, src) {
|
|
|
8936
9040
|
/***************************
|
|
8937
9041
|
* FSM
|
|
8938
9042
|
***************************/
|
|
8939
|
-
var gmt$
|
|
8940
|
-
mt_create: mt_create$
|
|
8941
|
-
mt_start: mt_start$
|
|
8942
|
-
mt_stop: mt_stop$
|
|
8943
|
-
mt_destroy: mt_destroy$
|
|
9043
|
+
var gmt$11 = {
|
|
9044
|
+
mt_create: mt_create$11,
|
|
9045
|
+
mt_start: mt_start$11,
|
|
9046
|
+
mt_stop: mt_stop$11,
|
|
9047
|
+
mt_destroy: mt_destroy$11
|
|
8944
9048
|
};
|
|
8945
9049
|
/***************************************************************
|
|
8946
9050
|
* Create the GClass
|
|
8947
9051
|
***************************************************************/
|
|
8948
|
-
function create_gclass$
|
|
8949
|
-
if (__gclass__$
|
|
9052
|
+
function create_gclass$11(gclass_name) {
|
|
9053
|
+
if (__gclass__$11) {
|
|
8950
9054
|
log_error(`GClass ALREADY created: ${gclass_name}`);
|
|
8951
9055
|
return -1;
|
|
8952
9056
|
}
|
|
8953
|
-
__gclass__$
|
|
9057
|
+
__gclass__$11 = gclass_create(gclass_name, [
|
|
8954
9058
|
["EV_LOAD_DATA", 0],
|
|
8955
9059
|
["EV_ADD_SERIE", 0],
|
|
8956
9060
|
["EV_DEL_SERIE", 0],
|
|
@@ -8976,15 +9080,15 @@ function create_gclass$10(gclass_name) {
|
|
|
8976
9080
|
ac_clear,
|
|
8977
9081
|
null
|
|
8978
9082
|
]
|
|
8979
|
-
]]], gmt$
|
|
8980
|
-
if (!__gclass__$
|
|
9083
|
+
]]], gmt$11, 0, attrs_table$11, PRIVATE_DATA$11, 0, 0, 0, 0);
|
|
9084
|
+
if (!__gclass__$11) return -1;
|
|
8981
9085
|
return 0;
|
|
8982
9086
|
}
|
|
8983
9087
|
/***************************************************************
|
|
8984
9088
|
* Register GClass
|
|
8985
9089
|
***************************************************************/
|
|
8986
9090
|
function register_c_yui_uplot() {
|
|
8987
|
-
return create_gclass$
|
|
9091
|
+
return create_gclass$11(GCLASS_NAME$11);
|
|
8988
9092
|
}
|
|
8989
9093
|
//#endregion
|
|
8990
9094
|
//#region src/yui_toolbar.js
|
|
@@ -9191,11 +9295,11 @@ function ensure_drag_canvas_patch() {
|
|
|
9191
9295
|
/***************************************************************
|
|
9192
9296
|
* Constants
|
|
9193
9297
|
***************************************************************/
|
|
9194
|
-
var GCLASS_NAME$
|
|
9298
|
+
var GCLASS_NAME$10 = "C_YUI_JSON_GRAPH";
|
|
9195
9299
|
/***************************************************************
|
|
9196
9300
|
* Data
|
|
9197
9301
|
***************************************************************/
|
|
9198
|
-
var attrs_table$
|
|
9302
|
+
var attrs_table$10 = [
|
|
9199
9303
|
SDATA(data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
9200
9304
|
SDATA(data_type_t.DTP_STRING, "path", 0, "", "Root path label"),
|
|
9201
9305
|
SDATA(data_type_t.DTP_JSON, "json_data", 0, null, "JSON data to visualize"),
|
|
@@ -9204,7 +9308,7 @@ var attrs_table$9 = [
|
|
|
9204
9308
|
SDATA(data_type_t.DTP_STRING, "wide", 0, "36px", "Height of header"),
|
|
9205
9309
|
SDATA_END()
|
|
9206
9310
|
];
|
|
9207
|
-
var PRIVATE_DATA$
|
|
9311
|
+
var PRIVATE_DATA$10 = {
|
|
9208
9312
|
canvas_id: "",
|
|
9209
9313
|
graph: null,
|
|
9210
9314
|
node_counter: 0,
|
|
@@ -9213,7 +9317,7 @@ var PRIVATE_DATA$9 = {
|
|
|
9213
9317
|
resize_observer: null,
|
|
9214
9318
|
_resize_raf: 0
|
|
9215
9319
|
};
|
|
9216
|
-
var __gclass__$
|
|
9320
|
+
var __gclass__$10 = null;
|
|
9217
9321
|
var __layout_registered__$1 = false;
|
|
9218
9322
|
/***************************************************************
|
|
9219
9323
|
* Type colors matching the original mx_json_viewer
|
|
@@ -9278,7 +9382,7 @@ function type_color(type, dark) {
|
|
|
9278
9382
|
/***************************************************************
|
|
9279
9383
|
* Framework Method: Create
|
|
9280
9384
|
***************************************************************/
|
|
9281
|
-
function mt_create$
|
|
9385
|
+
function mt_create$10(gobj) {
|
|
9282
9386
|
let priv = gobj.priv;
|
|
9283
9387
|
priv.canvas_id = "json-canvas-" + clean_name(gobj_name(gobj));
|
|
9284
9388
|
gobj_write_str_attr(gobj, "canvas_id", priv.canvas_id);
|
|
@@ -9297,18 +9401,18 @@ function mt_create$9(gobj) {
|
|
|
9297
9401
|
/***************************************************************
|
|
9298
9402
|
* Framework Method: Start
|
|
9299
9403
|
***************************************************************/
|
|
9300
|
-
function mt_start$
|
|
9404
|
+
function mt_start$10(gobj) {
|
|
9301
9405
|
build_graph$3(gobj);
|
|
9302
9406
|
load_json(gobj);
|
|
9303
9407
|
}
|
|
9304
9408
|
/***************************************************************
|
|
9305
9409
|
* Framework Method: Stop
|
|
9306
9410
|
***************************************************************/
|
|
9307
|
-
function mt_stop$
|
|
9411
|
+
function mt_stop$10(gobj) {}
|
|
9308
9412
|
/***************************************************************
|
|
9309
9413
|
* Framework Method: Destroy
|
|
9310
9414
|
***************************************************************/
|
|
9311
|
-
function mt_destroy$
|
|
9415
|
+
function mt_destroy$10(gobj) {
|
|
9312
9416
|
let priv = gobj.priv;
|
|
9313
9417
|
if (priv.theme_observer) {
|
|
9314
9418
|
priv.theme_observer.disconnect();
|
|
@@ -9904,17 +10008,17 @@ function ac_hide$6(gobj, event, kw, src) {
|
|
|
9904
10008
|
/***************************
|
|
9905
10009
|
* FSM
|
|
9906
10010
|
***************************/
|
|
9907
|
-
var gmt$
|
|
9908
|
-
mt_create: mt_create$
|
|
9909
|
-
mt_start: mt_start$
|
|
9910
|
-
mt_stop: mt_stop$
|
|
9911
|
-
mt_destroy: mt_destroy$
|
|
10011
|
+
var gmt$10 = {
|
|
10012
|
+
mt_create: mt_create$10,
|
|
10013
|
+
mt_start: mt_start$10,
|
|
10014
|
+
mt_stop: mt_stop$10,
|
|
10015
|
+
mt_destroy: mt_destroy$10
|
|
9912
10016
|
};
|
|
9913
10017
|
/***************************************************************
|
|
9914
10018
|
* Create the GClass
|
|
9915
10019
|
***************************************************************/
|
|
9916
|
-
function create_gclass$
|
|
9917
|
-
if (__gclass__$
|
|
10020
|
+
function create_gclass$10(gclass_name) {
|
|
10021
|
+
if (__gclass__$10) {
|
|
9918
10022
|
log_error(`GClass ALREADY created: ${gclass_name}`);
|
|
9919
10023
|
return -1;
|
|
9920
10024
|
}
|
|
@@ -9975,7 +10079,7 @@ function create_gclass$9(gclass_name) {
|
|
|
9975
10079
|
null
|
|
9976
10080
|
]
|
|
9977
10081
|
]]];
|
|
9978
|
-
__gclass__$
|
|
10082
|
+
__gclass__$10 = gclass_create(gclass_name, [
|
|
9979
10083
|
["EV_LOAD_DATA", 0],
|
|
9980
10084
|
["EV_REFRESH", 0],
|
|
9981
10085
|
["EV_THEME", 0],
|
|
@@ -9988,15 +10092,15 @@ function create_gclass$9(gclass_name) {
|
|
|
9988
10092
|
["EV_SHOW", 0],
|
|
9989
10093
|
["EV_HIDE", 0],
|
|
9990
10094
|
["EV_JSON_ITEM_CLICKED", event_flag_t.EVF_OUTPUT_EVENT]
|
|
9991
|
-
], states, gmt$
|
|
9992
|
-
if (!__gclass__$
|
|
10095
|
+
], states, gmt$10, 0, attrs_table$10, PRIVATE_DATA$10, 0, 0, 0, 0);
|
|
10096
|
+
if (!__gclass__$10) return -1;
|
|
9993
10097
|
return 0;
|
|
9994
10098
|
}
|
|
9995
10099
|
/***************************************************************
|
|
9996
10100
|
* Register GClass
|
|
9997
10101
|
***************************************************************/
|
|
9998
10102
|
function register_c_yui_json_graph() {
|
|
9999
|
-
return create_gclass$
|
|
10103
|
+
return create_gclass$10(GCLASS_NAME$10);
|
|
10000
10104
|
}
|
|
10001
10105
|
/************************************************************
|
|
10002
10106
|
* JSON type discriminator (viewer vocabulary)
|
|
@@ -10173,19 +10277,19 @@ function format_epoch(value) {
|
|
|
10173
10277
|
/***************************************************************
|
|
10174
10278
|
* Constants
|
|
10175
10279
|
***************************************************************/
|
|
10176
|
-
var GCLASS_NAME$
|
|
10280
|
+
var GCLASS_NAME$9 = "C_YUI_JSON";
|
|
10177
10281
|
var MAX_RENDER_ROWS = 5e3;
|
|
10178
10282
|
/***************************************************************
|
|
10179
10283
|
* Data
|
|
10180
10284
|
***************************************************************/
|
|
10181
|
-
var attrs_table$
|
|
10285
|
+
var attrs_table$9 = [
|
|
10182
10286
|
SDATA(data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
10183
10287
|
SDATA(data_type_t.DTP_STRING, "title", 0, "", "Optional header title (i18n key)"),
|
|
10184
10288
|
SDATA(data_type_t.DTP_JSON, "json_data", 0, null, "Initial JSON to render (usually already collapsed)"),
|
|
10185
10289
|
SDATA(data_type_t.DTP_POINTER, "$container", 0, null, "HTMLElement root, mounted by the parent"),
|
|
10186
10290
|
SDATA_END()
|
|
10187
10291
|
];
|
|
10188
|
-
var PRIVATE_DATA$
|
|
10292
|
+
var PRIVATE_DATA$9 = {
|
|
10189
10293
|
root: null,
|
|
10190
10294
|
expanded: null,
|
|
10191
10295
|
pending: null,
|
|
@@ -10194,14 +10298,14 @@ var PRIVATE_DATA$8 = {
|
|
|
10194
10298
|
$tree: null,
|
|
10195
10299
|
$search: null
|
|
10196
10300
|
};
|
|
10197
|
-
var __gclass__$
|
|
10301
|
+
var __gclass__$9 = null;
|
|
10198
10302
|
/******************************
|
|
10199
10303
|
* Framework Methods
|
|
10200
10304
|
******************************/
|
|
10201
10305
|
/***************************************************************
|
|
10202
10306
|
* Framework Method: Create
|
|
10203
10307
|
***************************************************************/
|
|
10204
|
-
function mt_create$
|
|
10308
|
+
function mt_create$9(gobj) {
|
|
10205
10309
|
let priv = gobj.priv;
|
|
10206
10310
|
priv.expanded = /* @__PURE__ */ new Set();
|
|
10207
10311
|
priv.pending = /* @__PURE__ */ new Set();
|
|
@@ -10217,17 +10321,17 @@ function mt_create$8(gobj) {
|
|
|
10217
10321
|
/***************************************************************
|
|
10218
10322
|
* Framework Method: Start
|
|
10219
10323
|
***************************************************************/
|
|
10220
|
-
function mt_start$
|
|
10324
|
+
function mt_start$9(gobj) {
|
|
10221
10325
|
render_tree(gobj);
|
|
10222
10326
|
}
|
|
10223
10327
|
/***************************************************************
|
|
10224
10328
|
* Framework Method: Stop
|
|
10225
10329
|
***************************************************************/
|
|
10226
|
-
function mt_stop$
|
|
10330
|
+
function mt_stop$9(gobj) {}
|
|
10227
10331
|
/***************************************************************
|
|
10228
10332
|
* Framework Method: Destroy
|
|
10229
10333
|
***************************************************************/
|
|
10230
|
-
function mt_destroy$
|
|
10334
|
+
function mt_destroy$9(gobj) {
|
|
10231
10335
|
destroy_ui$4(gobj);
|
|
10232
10336
|
}
|
|
10233
10337
|
/***************************
|
|
@@ -10731,7 +10835,7 @@ function ac_subtree_error(gobj, event, kw, src) {
|
|
|
10731
10835
|
let path = kw.path || "";
|
|
10732
10836
|
priv.pending.delete(path);
|
|
10733
10837
|
priv.errors.set(path, kw.error || "error");
|
|
10734
|
-
log_error(`${GCLASS_NAME$
|
|
10838
|
+
log_error(`${GCLASS_NAME$9}: subtree load failed at '${path}': ${kw.error || ""}`);
|
|
10735
10839
|
render_tree(gobj);
|
|
10736
10840
|
return 0;
|
|
10737
10841
|
}
|
|
@@ -10806,9 +10910,9 @@ function ac_copy_all(gobj, event, kw, src) {
|
|
|
10806
10910
|
if (priv.root === null || priv.root === void 0) return 0;
|
|
10807
10911
|
let text = JSON.stringify(priv.root, null, 4);
|
|
10808
10912
|
if (navigator.clipboard && navigator.clipboard.writeText) navigator.clipboard.writeText(text).catch(function(e) {
|
|
10809
|
-
log_error(`${GCLASS_NAME$
|
|
10913
|
+
log_error(`${GCLASS_NAME$9}: clipboard write failed: ${e}`);
|
|
10810
10914
|
});
|
|
10811
|
-
else log_error(`${GCLASS_NAME$
|
|
10915
|
+
else log_error(`${GCLASS_NAME$9}: clipboard API unavailable`);
|
|
10812
10916
|
return 0;
|
|
10813
10917
|
}
|
|
10814
10918
|
/************************************************************
|
|
@@ -10847,17 +10951,17 @@ function ac_refresh$3(gobj, event, kw, src) {
|
|
|
10847
10951
|
/***************************
|
|
10848
10952
|
* FSM
|
|
10849
10953
|
***************************/
|
|
10850
|
-
var gmt$
|
|
10851
|
-
mt_create: mt_create$
|
|
10852
|
-
mt_start: mt_start$
|
|
10853
|
-
mt_stop: mt_stop$
|
|
10854
|
-
mt_destroy: mt_destroy$
|
|
10954
|
+
var gmt$9 = {
|
|
10955
|
+
mt_create: mt_create$9,
|
|
10956
|
+
mt_start: mt_start$9,
|
|
10957
|
+
mt_stop: mt_stop$9,
|
|
10958
|
+
mt_destroy: mt_destroy$9
|
|
10855
10959
|
};
|
|
10856
10960
|
/***************************************************************
|
|
10857
10961
|
* Create the GClass
|
|
10858
10962
|
***************************************************************/
|
|
10859
|
-
function create_gclass$
|
|
10860
|
-
if (__gclass__$
|
|
10963
|
+
function create_gclass$9(gclass_name) {
|
|
10964
|
+
if (__gclass__$9) {
|
|
10861
10965
|
log_error(`GClass ALREADY created: ${gclass_name}`);
|
|
10862
10966
|
return -1;
|
|
10863
10967
|
}
|
|
@@ -10954,7 +11058,7 @@ function create_gclass$8(gclass_name) {
|
|
|
10954
11058
|
null
|
|
10955
11059
|
]
|
|
10956
11060
|
]]];
|
|
10957
|
-
__gclass__$
|
|
11061
|
+
__gclass__$9 = gclass_create(gclass_name, [
|
|
10958
11062
|
["EV_SET_JSON", 0],
|
|
10959
11063
|
["EV_SUBTREE_LOADED", 0],
|
|
10960
11064
|
["EV_SUBTREE_ERROR", 0],
|
|
@@ -10969,15 +11073,15 @@ function create_gclass$8(gclass_name) {
|
|
|
10969
11073
|
["EV_SHOW", 0],
|
|
10970
11074
|
["EV_HIDE", 0],
|
|
10971
11075
|
["EV_EXPAND_PATH", event_flag_t.EVF_OUTPUT_EVENT | event_flag_t.EVF_NO_WARN_SUBS]
|
|
10972
|
-
], states, gmt$
|
|
10973
|
-
if (!__gclass__$
|
|
11076
|
+
], states, gmt$9, 0, attrs_table$9, PRIVATE_DATA$9, 0, 0, 0, 0);
|
|
11077
|
+
if (!__gclass__$9) return -1;
|
|
10974
11078
|
return 0;
|
|
10975
11079
|
}
|
|
10976
11080
|
/***************************************************************
|
|
10977
11081
|
* Register GClass
|
|
10978
11082
|
***************************************************************/
|
|
10979
11083
|
function register_c_yui_json() {
|
|
10980
|
-
return create_gclass$
|
|
11084
|
+
return create_gclass$9(GCLASS_NAME$9);
|
|
10981
11085
|
}
|
|
10982
11086
|
//#endregion
|
|
10983
11087
|
//#region src/c_yui_gobj_tree_js.js
|
|
@@ -10992,11 +11096,11 @@ function register_c_yui_json() {
|
|
|
10992
11096
|
/***************************************************************
|
|
10993
11097
|
* Constants
|
|
10994
11098
|
***************************************************************/
|
|
10995
|
-
var GCLASS_NAME$
|
|
11099
|
+
var GCLASS_NAME$8 = "C_YUI_GOBJ_TREE_JS";
|
|
10996
11100
|
/***************************************************************
|
|
10997
11101
|
* Data
|
|
10998
11102
|
***************************************************************/
|
|
10999
|
-
var attrs_table$
|
|
11103
|
+
var attrs_table$8 = [
|
|
11000
11104
|
SDATA(data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
11001
11105
|
SDATA(data_type_t.DTP_POINTER, "$container", 0, null, "Container element"),
|
|
11002
11106
|
SDATA(data_type_t.DTP_STRING, "canvas_id", 0, "", "Canvas ID"),
|
|
@@ -11005,7 +11109,7 @@ var attrs_table$7 = [
|
|
|
11005
11109
|
SDATA(data_type_t.DTP_INTEGER, "collapse_threshold", 0, 10, "Auto-collapse a node whose direct children exceed this number. 0 disables auto-collapse."),
|
|
11006
11110
|
SDATA_END()
|
|
11007
11111
|
];
|
|
11008
|
-
var PRIVATE_DATA$
|
|
11112
|
+
var PRIVATE_DATA$8 = {
|
|
11009
11113
|
canvas_id: "",
|
|
11010
11114
|
graph: null,
|
|
11011
11115
|
node_counter: 0,
|
|
@@ -11020,7 +11124,7 @@ var PRIVATE_DATA$7 = {
|
|
|
11020
11124
|
resize_observer: null,
|
|
11021
11125
|
_resize_raf: 0
|
|
11022
11126
|
};
|
|
11023
|
-
var __gclass__$
|
|
11127
|
+
var __gclass__$8 = null;
|
|
11024
11128
|
var __layout_registered__ = false;
|
|
11025
11129
|
/***************************************************************
|
|
11026
11130
|
* Node colors by role
|
|
@@ -11199,7 +11303,7 @@ function get_layout_cfg(layout_key) {
|
|
|
11199
11303
|
/***************************************************************
|
|
11200
11304
|
* Framework Method: Create
|
|
11201
11305
|
***************************************************************/
|
|
11202
|
-
function mt_create$
|
|
11306
|
+
function mt_create$8(gobj) {
|
|
11203
11307
|
let priv = gobj.priv;
|
|
11204
11308
|
priv.canvas_id = "gobj-tree-canvas-" + clean_name(gobj_name(gobj));
|
|
11205
11309
|
gobj_write_str_attr(gobj, "canvas_id", priv.canvas_id);
|
|
@@ -11222,18 +11326,18 @@ function mt_create$7(gobj) {
|
|
|
11222
11326
|
/***************************************************************
|
|
11223
11327
|
* Framework Method: Start
|
|
11224
11328
|
***************************************************************/
|
|
11225
|
-
function mt_start$
|
|
11329
|
+
function mt_start$8(gobj) {
|
|
11226
11330
|
build_graph$2(gobj);
|
|
11227
11331
|
load_tree(gobj);
|
|
11228
11332
|
}
|
|
11229
11333
|
/***************************************************************
|
|
11230
11334
|
* Framework Method: Stop
|
|
11231
11335
|
***************************************************************/
|
|
11232
|
-
function mt_stop$
|
|
11336
|
+
function mt_stop$8(gobj) {}
|
|
11233
11337
|
/***************************************************************
|
|
11234
11338
|
* Framework Method: Destroy
|
|
11235
11339
|
***************************************************************/
|
|
11236
|
-
function mt_destroy$
|
|
11340
|
+
function mt_destroy$8(gobj) {
|
|
11237
11341
|
let priv = gobj.priv;
|
|
11238
11342
|
if (priv.theme_observer) {
|
|
11239
11343
|
priv.theme_observer.disconnect();
|
|
@@ -12452,21 +12556,21 @@ function ac_hide$4(gobj, event, kw, src) {
|
|
|
12452
12556
|
/***************************
|
|
12453
12557
|
* FSM
|
|
12454
12558
|
***************************/
|
|
12455
|
-
var gmt$
|
|
12456
|
-
mt_create: mt_create$
|
|
12457
|
-
mt_start: mt_start$
|
|
12458
|
-
mt_stop: mt_stop$
|
|
12459
|
-
mt_destroy: mt_destroy$
|
|
12559
|
+
var gmt$8 = {
|
|
12560
|
+
mt_create: mt_create$8,
|
|
12561
|
+
mt_start: mt_start$8,
|
|
12562
|
+
mt_stop: mt_stop$8,
|
|
12563
|
+
mt_destroy: mt_destroy$8
|
|
12460
12564
|
};
|
|
12461
12565
|
/***************************************************************
|
|
12462
12566
|
* Create the GClass
|
|
12463
12567
|
***************************************************************/
|
|
12464
|
-
function create_gclass$
|
|
12465
|
-
if (__gclass__$
|
|
12568
|
+
function create_gclass$8(gclass_name) {
|
|
12569
|
+
if (__gclass__$8) {
|
|
12466
12570
|
log_error(`GClass ALREADY created: ${gclass_name}`);
|
|
12467
12571
|
return -1;
|
|
12468
12572
|
}
|
|
12469
|
-
__gclass__$
|
|
12573
|
+
__gclass__$8 = gclass_create(gclass_name, [
|
|
12470
12574
|
["EV_REFRESH", 0],
|
|
12471
12575
|
["EV_THEME", 0],
|
|
12472
12576
|
["EV_CHANGE_LAYOUT", 0],
|
|
@@ -12552,14 +12656,247 @@ function create_gclass$7(gclass_name) {
|
|
|
12552
12656
|
ac_hide$4,
|
|
12553
12657
|
null
|
|
12554
12658
|
]
|
|
12555
|
-
]]], gmt$
|
|
12556
|
-
if (!__gclass__$
|
|
12659
|
+
]]], gmt$8, 0, attrs_table$8, PRIVATE_DATA$8, 0, 0, 0, 0);
|
|
12660
|
+
if (!__gclass__$8) return -1;
|
|
12557
12661
|
return 0;
|
|
12558
12662
|
}
|
|
12559
12663
|
/***************************************************************
|
|
12560
12664
|
* Register GClass
|
|
12561
12665
|
***************************************************************/
|
|
12562
12666
|
function register_c_yui_gobj_tree_js() {
|
|
12667
|
+
return create_gclass$8(GCLASS_NAME$8);
|
|
12668
|
+
}
|
|
12669
|
+
//#endregion
|
|
12670
|
+
//#region src/c_yui_service_view.js
|
|
12671
|
+
/***********************************************************************
|
|
12672
|
+
* c_yui_service_view.js
|
|
12673
|
+
*
|
|
12674
|
+
* Mounting a view that TALKS TO A BACKEND.
|
|
12675
|
+
*
|
|
12676
|
+
* THE PROBLEM
|
|
12677
|
+
* -----------
|
|
12678
|
+
* A view that asks the backend for data does it with
|
|
12679
|
+
* gobj_command(remote, "...", kw, src = itself)
|
|
12680
|
+
* and C_IEVENT_CLI routes the answer back with
|
|
12681
|
+
* gobj_find_service(gobj_name(src))
|
|
12682
|
+
* which only finds REGISTERED SERVICES.
|
|
12683
|
+
*
|
|
12684
|
+
* Neither host creates one: C_YUI_SHELL mounts a route's view with
|
|
12685
|
+
* `gobj_create()` and C_YUI_NODE with `gobj_create_pure_child()`.
|
|
12686
|
+
* So a backend-talking view mounted directly never receives a single
|
|
12687
|
+
* answer — and not quietly: the ievent logs "service not found" once
|
|
12688
|
+
* per answer while the view sits empty forever.
|
|
12689
|
+
*
|
|
12690
|
+
* There is a second half. A route's `target.kw` is STATIC JSON, so
|
|
12691
|
+
* it cannot carry the live transport pointer the view needs. It has
|
|
12692
|
+
* to be resolved at mount time and injected.
|
|
12693
|
+
*
|
|
12694
|
+
* THE PIECE
|
|
12695
|
+
* ---------
|
|
12696
|
+
* Both halves had been written four separate times, in three repos,
|
|
12697
|
+
* each wrapper saying the same thing in its own header. They are
|
|
12698
|
+
* here now, in two shapes, because the four callers are not alike:
|
|
12699
|
+
*
|
|
12700
|
+
* yui_mount_service_view(host, spec) — the helper. For a wrapper
|
|
12701
|
+
* that has its OWN extras on top (bridging url segments to the
|
|
12702
|
+
* hosted view, rebinding it when a connection drops). Those
|
|
12703
|
+
* extras are app or route logic and do NOT belong here; the
|
|
12704
|
+
* wrapper keeps them and drops only the boilerplate.
|
|
12705
|
+
*
|
|
12706
|
+
* C_YUI_SERVICE_VIEW — the gclass, for a route with NO extras:
|
|
12707
|
+
* declare it in the route/node and name the view it hosts. It
|
|
12708
|
+
* is the helper plus a lifecycle, nothing more.
|
|
12709
|
+
*
|
|
12710
|
+
* CONTRACT of the hosted gclass:
|
|
12711
|
+
* - declares the attr the transport is injected under
|
|
12712
|
+
* (`gobj_remote_yuno` by default),
|
|
12713
|
+
* - builds its `$container` in mt_create (re-exposed as the
|
|
12714
|
+
* host's, which is what the shell/node mounts),
|
|
12715
|
+
* - flags EVF_PUBLIC_EVENT on what arrives from the backend
|
|
12716
|
+
* (EV_MT_COMMAND_ANSWER and anything the remote publishes): the
|
|
12717
|
+
* ievent drops events that are not public.
|
|
12718
|
+
*
|
|
12719
|
+
* NAMES: the service name must be UNIQUE per mount. A duplicate is
|
|
12720
|
+
* not fatal and that is the danger — gobj-js logs "service ALREADY
|
|
12721
|
+
* REGISTERED. Will be UPDATED" and REBINDS the name, so the answers
|
|
12722
|
+
* of one view would land in the other. Derive it from the route (or
|
|
12723
|
+
* from whatever else makes the mount unique: a connection id, a
|
|
12724
|
+
* workspace) and never from the gclass alone.
|
|
12725
|
+
*
|
|
12726
|
+
* Copyright (c) 2026, ArtGins.
|
|
12727
|
+
* All Rights Reserved.
|
|
12728
|
+
***********************************************************************/
|
|
12729
|
+
/***************************************************************
|
|
12730
|
+
* Constants
|
|
12731
|
+
***************************************************************/
|
|
12732
|
+
var GCLASS_NAME$7 = "C_YUI_SERVICE_VIEW";
|
|
12733
|
+
var DEFAULT_TRANSPORT_SERVICE = "__remote_service__";
|
|
12734
|
+
var DEFAULT_TRANSPORT_ATTR = "gobj_remote_yuno";
|
|
12735
|
+
/***************************************************************
|
|
12736
|
+
* Data
|
|
12737
|
+
***************************************************************/
|
|
12738
|
+
var attrs_table$7 = [
|
|
12739
|
+
SDATA(data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
12740
|
+
SDATA(data_type_t.DTP_STRING, "view_gclass", 0, "", "GClass of the hosted view (must be registered)"),
|
|
12741
|
+
SDATA(data_type_t.DTP_STRING, "service_name", 0, "", "Service name of the hosted view — UNIQUE per mount"),
|
|
12742
|
+
SDATA(data_type_t.DTP_JSON, "view_kw", 0, null, "kw passed to the hosted view"),
|
|
12743
|
+
SDATA(data_type_t.DTP_STRING, "transport_service", 0, DEFAULT_TRANSPORT_SERVICE, "Service name of the live transport"),
|
|
12744
|
+
SDATA(data_type_t.DTP_STRING, "transport_attr", 0, DEFAULT_TRANSPORT_ATTR, "Attr of the hosted view the transport is injected under"),
|
|
12745
|
+
SDATA(data_type_t.DTP_POINTER, "$container", 0, null, "Root HTMLElement"),
|
|
12746
|
+
SDATA_END()
|
|
12747
|
+
];
|
|
12748
|
+
var PRIVATE_DATA$7 = { view: null };
|
|
12749
|
+
var __gclass__$7 = null;
|
|
12750
|
+
/***************************
|
|
12751
|
+
* Public helper
|
|
12752
|
+
***************************/
|
|
12753
|
+
/************************************************************
|
|
12754
|
+
* Create `spec.gclass` as a NAMED SERVICE under `host`, with the
|
|
12755
|
+
* live transport injected, and return it (null on failure, error
|
|
12756
|
+
* already logged). The caller owns what happens next — starting
|
|
12757
|
+
* it, exposing its DOM, bridging routes into it.
|
|
12758
|
+
*
|
|
12759
|
+
* spec = {
|
|
12760
|
+
* gclass, // string, required — must be registered
|
|
12761
|
+
* name, // string, required — service name, unique per mount
|
|
12762
|
+
* kw, // object, optional — the view's kw
|
|
12763
|
+
* transport, // gobj | service name | omitted:
|
|
12764
|
+
* // a gobj is used as-is (the caller already
|
|
12765
|
+
* // resolved it — e.g. per connection), a string
|
|
12766
|
+
* // is looked up with gobj_find_service(), and
|
|
12767
|
+
* // omitted means "__remote_service__".
|
|
12768
|
+
* // null DISABLES injection: for a hosted view
|
|
12769
|
+
* // that takes its transport some other way.
|
|
12770
|
+
* transport_attr // string, optional — default "gobj_remote_yuno"
|
|
12771
|
+
* }
|
|
12772
|
+
************************************************************/
|
|
12773
|
+
function yui_mount_service_view(host, spec) {
|
|
12774
|
+
if (!host || !is_gobj(host) || !spec) {
|
|
12775
|
+
log_error(`${GCLASS_NAME$7}: yui_mount_service_view without host or spec`);
|
|
12776
|
+
return null;
|
|
12777
|
+
}
|
|
12778
|
+
const gclass = spec.gclass;
|
|
12779
|
+
const name = spec.name;
|
|
12780
|
+
if (empty_string(gclass) || empty_string(name)) {
|
|
12781
|
+
log_error(`${gobj_short_name(host)}: mounting a service view needs gclass and name`);
|
|
12782
|
+
return null;
|
|
12783
|
+
}
|
|
12784
|
+
if (!gclass_find_by_name(gclass)) {
|
|
12785
|
+
log_error(`${gobj_short_name(host)}: gclass '${gclass}' is not registered`);
|
|
12786
|
+
return null;
|
|
12787
|
+
}
|
|
12788
|
+
let kw = Object.assign({}, spec.kw || {});
|
|
12789
|
+
let transport = Object.prototype.hasOwnProperty.call(spec, "transport") ? spec.transport : DEFAULT_TRANSPORT_SERVICE;
|
|
12790
|
+
if (transport !== null) {
|
|
12791
|
+
if (is_string(transport)) {
|
|
12792
|
+
const service_name = transport;
|
|
12793
|
+
transport = gobj_find_service(service_name);
|
|
12794
|
+
if (!transport) {
|
|
12795
|
+
log_error(`${gobj_short_name(host)}: transport service '${service_name}' not found`);
|
|
12796
|
+
return null;
|
|
12797
|
+
}
|
|
12798
|
+
}
|
|
12799
|
+
if (!is_gobj(transport)) {
|
|
12800
|
+
log_error(`${gobj_short_name(host)}: transport is not a gobj`);
|
|
12801
|
+
return null;
|
|
12802
|
+
}
|
|
12803
|
+
kw[spec.transport_attr || DEFAULT_TRANSPORT_ATTR] = transport;
|
|
12804
|
+
}
|
|
12805
|
+
const view = gobj_create_service(name, gclass, kw, host);
|
|
12806
|
+
if (!view) {
|
|
12807
|
+
log_error(`${gobj_short_name(host)}: cannot create '${gclass}' as '${name}'`);
|
|
12808
|
+
return null;
|
|
12809
|
+
}
|
|
12810
|
+
return view;
|
|
12811
|
+
}
|
|
12812
|
+
/************************************************************
|
|
12813
|
+
* The hosted view's $container, re-exposed as the host's — the
|
|
12814
|
+
* shell/node mounts the HOST, so without this nothing is drawn.
|
|
12815
|
+
* Never returns without setting one: an empty div beats a blank
|
|
12816
|
+
* screen with the reason only in the console.
|
|
12817
|
+
************************************************************/
|
|
12818
|
+
function expose_view_container(host, view) {
|
|
12819
|
+
let $c = view ? gobj_read_attr(view, "$container") : null;
|
|
12820
|
+
if (!$c) {
|
|
12821
|
+
log_error(`${gobj_short_name(host)}: hosted view does not expose $container — check its mt_create`);
|
|
12822
|
+
$c = createElement2([
|
|
12823
|
+
"div",
|
|
12824
|
+
{},
|
|
12825
|
+
""
|
|
12826
|
+
]);
|
|
12827
|
+
}
|
|
12828
|
+
gobj_write_attr(host, "$container", $c);
|
|
12829
|
+
return $c;
|
|
12830
|
+
}
|
|
12831
|
+
/***************************
|
|
12832
|
+
* Framework Methods
|
|
12833
|
+
***************************/
|
|
12834
|
+
/***************************************************************
|
|
12835
|
+
* Framework Method: Create
|
|
12836
|
+
***************************************************************/
|
|
12837
|
+
function mt_create$7(gobj) {
|
|
12838
|
+
let priv = gobj.priv;
|
|
12839
|
+
let subscriber = gobj_read_pointer_attr(gobj, "subscriber");
|
|
12840
|
+
if (!subscriber) subscriber = gobj_parent(gobj);
|
|
12841
|
+
gobj_subscribe_event(gobj, null, {}, subscriber);
|
|
12842
|
+
priv.view = yui_mount_service_view(gobj, {
|
|
12843
|
+
gclass: gobj_read_str_attr(gobj, "view_gclass"),
|
|
12844
|
+
name: gobj_read_str_attr(gobj, "service_name"),
|
|
12845
|
+
kw: gobj_read_attr(gobj, "view_kw") || {},
|
|
12846
|
+
transport: gobj_read_str_attr(gobj, "transport_service"),
|
|
12847
|
+
transport_attr: gobj_read_str_attr(gobj, "transport_attr")
|
|
12848
|
+
});
|
|
12849
|
+
expose_view_container(gobj, priv.view);
|
|
12850
|
+
}
|
|
12851
|
+
/***************************************************************
|
|
12852
|
+
* Framework Method: Start
|
|
12853
|
+
*
|
|
12854
|
+
* The view starts HERE and not in mt_create, so its first
|
|
12855
|
+
* request goes out when the host shows it.
|
|
12856
|
+
***************************************************************/
|
|
12857
|
+
function mt_start$7(gobj) {
|
|
12858
|
+
const view = gobj.priv.view;
|
|
12859
|
+
if (view && !gobj_is_running(view)) gobj_start(view);
|
|
12860
|
+
}
|
|
12861
|
+
/***************************************************************
|
|
12862
|
+
* Framework Method: Stop
|
|
12863
|
+
***************************************************************/
|
|
12864
|
+
function mt_stop$7(gobj) {
|
|
12865
|
+
const view = gobj.priv.view;
|
|
12866
|
+
if (view && gobj_is_running(view)) gobj_stop(view);
|
|
12867
|
+
}
|
|
12868
|
+
/***************************************************************
|
|
12869
|
+
* Framework Method: Destroy
|
|
12870
|
+
*
|
|
12871
|
+
* The view is a SERVICE created with this gobj as its parent, so
|
|
12872
|
+
* gobj_destroy cascades onto it — and deregisters its name. Do
|
|
12873
|
+
* NOT destroy it again here.
|
|
12874
|
+
***************************************************************/
|
|
12875
|
+
function mt_destroy$7(gobj) {
|
|
12876
|
+
let priv = gobj.priv;
|
|
12877
|
+
priv.view = null;
|
|
12878
|
+
const $c = gobj_read_attr(gobj, "$container");
|
|
12879
|
+
if ($c && $c.parentNode) $c.parentNode.removeChild($c);
|
|
12880
|
+
gobj_write_attr(gobj, "$container", null);
|
|
12881
|
+
}
|
|
12882
|
+
/***************************
|
|
12883
|
+
* FSM
|
|
12884
|
+
***************************/
|
|
12885
|
+
var gmt$7 = {
|
|
12886
|
+
mt_create: mt_create$7,
|
|
12887
|
+
mt_start: mt_start$7,
|
|
12888
|
+
mt_stop: mt_stop$7,
|
|
12889
|
+
mt_destroy: mt_destroy$7
|
|
12890
|
+
};
|
|
12891
|
+
function create_gclass$7(gclass_name) {
|
|
12892
|
+
if (__gclass__$7) {
|
|
12893
|
+
log_error(`GClass ALREADY created: ${gclass_name}`);
|
|
12894
|
+
return -1;
|
|
12895
|
+
}
|
|
12896
|
+
__gclass__$7 = gclass_create(gclass_name, [], [["ST_IDLE", []]], gmt$7, 0, attrs_table$7, PRIVATE_DATA$7, 0, 0, 0, 0);
|
|
12897
|
+
return __gclass__$7 ? 0 : -1;
|
|
12898
|
+
}
|
|
12899
|
+
function register_c_yui_service_view() {
|
|
12563
12900
|
return create_gclass$7(GCLASS_NAME$7);
|
|
12564
12901
|
}
|
|
12565
12902
|
//#endregion
|
|
@@ -12678,7 +13015,12 @@ function cards_grid_descriptor(items, show_label) {
|
|
|
12678
13015
|
* container; build_ui re-applies them on every rebuild.
|
|
12679
13016
|
*
|
|
12680
13017
|
* Each item supports:
|
|
12681
|
-
* id, name, icon (CSS class or svg id), route,
|
|
13018
|
+
* id, name, icon (CSS class or svg id), route, disabled
|
|
13019
|
+
* (`badge` was listed here for a long time and NOTHING ever
|
|
13020
|
+
* rendered it — a menu item cannot carry a count today. The
|
|
13021
|
+
* toolbar can: `badge` on a toolbar item plus
|
|
13022
|
+
* yui_shell_set_toolbar_item_badge(). Implement it here the
|
|
13023
|
+
* day a menu entry needs one, rather than re-listing it.)
|
|
12682
13024
|
* class — extra CSS class(es) on the item (tabs layout), e.g.
|
|
12683
13025
|
* a per-item state colour like "yui-nav-disconnected"
|
|
12684
13026
|
* closable — render a trailing ✕ that emits EV_NAV_ITEM_CLOSE
|
|
@@ -53269,6 +53611,6 @@ function setup_frontend_view(self) {
|
|
|
53269
53611
|
return win;
|
|
53270
53612
|
}
|
|
53271
53613
|
//#endregion
|
|
53272
|
-
export { EditControl, MarkerControl, 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, 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_gobj_tree_js, register_c_yui_json, register_c_yui_json_graph, register_c_yui_map, register_c_yui_nav, register_c_yui_pager, register_c_yui_period, 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_submit_state, setup_dev, setup_frontend_view, toggleClasses, yui_is_dark, yui_shell_close_drawer, yui_shell_close_dropdown, 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_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 };
|
|
53614
|
+
export { EditControl, MarkerControl, 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_gobj_tree_js, register_c_yui_json, register_c_yui_json_graph, register_c_yui_map, register_c_yui_nav, register_c_yui_pager, register_c_yui_period, 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_submit_state, setup_dev, setup_frontend_view, toggleClasses, yui_is_dark, yui_mount_service_view, yui_shell_close_drawer, yui_shell_close_dropdown, 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 };
|
|
53273
53615
|
|
|
53274
53616
|
//# sourceMappingURL=gobj-ui.es.js.map
|