@yuneta/gobj-ui 7.32.9 → 7.32.11
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 +94 -2
- package/dist/gobj-ui.cjs.js +1057 -360
- package/dist/gobj-ui.es.js +1046 -361
- package/index.js +18 -0
- package/package.json +1 -1
- package/src/c_yui_json.js +157 -2
- package/src/c_yui_node.js +47 -9
- package/src/c_yui_preferences.js +282 -0
- package/src/c_yui_shell.js +57 -1
- package/src/i18n_key_functions.js +6 -0
- package/src/json_level_stepper.wiring.test.js +186 -0
- package/src/preferences.wiring.test.js +159 -0
- package/src/yui_preferences.js +331 -0
package/dist/gobj-ui.cjs.js
CHANGED
|
@@ -239,6 +239,33 @@ function focus_trap_panel() {
|
|
|
239
239
|
let top = top_trap();
|
|
240
240
|
return top ? top.$panel : null;
|
|
241
241
|
}
|
|
242
|
+
// src/node_tree_model.js
|
|
243
|
+
/************************************************************
|
|
244
|
+
* NAVIGATION MODES — the three ways a tree can show the way in.
|
|
245
|
+
*
|
|
246
|
+
* "stack" — one chrome strip per ancestor. Whatever each
|
|
247
|
+
* node declared, painted at every level.
|
|
248
|
+
* "back" — only the tip's parent, and only as a "← parent".
|
|
249
|
+
* "path" — no strips at all: the trail as ONE breadcrumb
|
|
250
|
+
* line, drawn by the root.
|
|
251
|
+
*
|
|
252
|
+
* A mode is a FILTER over what the app declared, applied when the
|
|
253
|
+
* renders are asked for — never a rewrite of the declared
|
|
254
|
+
* projections. That is what makes going back to "stack" free and
|
|
255
|
+
* exact: an app that declares `vertical` chrome gets `vertical`
|
|
256
|
+
* back, not the tabs a canonical "stack" shape would have imposed.
|
|
257
|
+
*
|
|
258
|
+
* The index projection is NEVER touched: how a node shows its own
|
|
259
|
+
* children when it IS the page is not a statement about depth.
|
|
260
|
+
************************************************************/
|
|
261
|
+
var NAV_MODES = [
|
|
262
|
+
"stack",
|
|
263
|
+
"back",
|
|
264
|
+
"path"
|
|
265
|
+
];
|
|
266
|
+
function is_nav_mode(mode) {
|
|
267
|
+
return NAV_MODES.indexOf(mode) >= 0;
|
|
268
|
+
}
|
|
242
269
|
// src/shell_show_on.js
|
|
243
270
|
/***********************************************************************
|
|
244
271
|
* shell_show_on.js
|
|
@@ -1278,7 +1305,7 @@ function secondary_nav_renders(item, layout) {
|
|
|
1278
1305
|
/***************************************************************
|
|
1279
1306
|
* Constants
|
|
1280
1307
|
***************************************************************/
|
|
1281
|
-
var GCLASS_NAME$
|
|
1308
|
+
var GCLASS_NAME$24 = "C_YUI_SHELL";
|
|
1282
1309
|
var __live_shells__ = [];
|
|
1283
1310
|
var __retiring_shell__ = null;
|
|
1284
1311
|
var __dead_entries__ = /* @__PURE__ */ new Set();
|
|
@@ -1305,7 +1332,7 @@ var LAYER_DEFS = [
|
|
|
1305
1332
|
/***************************************************************
|
|
1306
1333
|
* Attrs
|
|
1307
1334
|
***************************************************************/
|
|
1308
|
-
var attrs_table$
|
|
1335
|
+
var attrs_table$24 = [
|
|
1309
1336
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
1310
1337
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_JSON, "config", 0, null, "Shell declarative config (zones, menu, stages, toolbar)"),
|
|
1311
1338
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "default_route", 0, "", "Fallback route if hash is empty"),
|
|
@@ -1316,7 +1343,7 @@ var attrs_table$23 = [
|
|
|
1316
1343
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "$container", 0, null, "Root HTMLElement of the shell"),
|
|
1317
1344
|
(0, _yuneta_gobj_js.SDATA_END)()
|
|
1318
1345
|
];
|
|
1319
|
-
var PRIVATE_DATA$
|
|
1346
|
+
var PRIVATE_DATA$24 = {
|
|
1320
1347
|
zones: {},
|
|
1321
1348
|
layers: {},
|
|
1322
1349
|
window_layer: null,
|
|
@@ -1359,14 +1386,14 @@ var PRIVATE_DATA$23 = {
|
|
|
1359
1386
|
connected: null,
|
|
1360
1387
|
active_dropdown: null
|
|
1361
1388
|
};
|
|
1362
|
-
var __gclass__$
|
|
1389
|
+
var __gclass__$24 = null;
|
|
1363
1390
|
/******************************
|
|
1364
1391
|
* Framework Methods
|
|
1365
1392
|
******************************/
|
|
1366
1393
|
/***************************************************************
|
|
1367
1394
|
* Framework Method: Create
|
|
1368
1395
|
***************************************************************/
|
|
1369
|
-
function mt_create$
|
|
1396
|
+
function mt_create$24(gobj) {
|
|
1370
1397
|
const subscriber = (0, _yuneta_gobj_js.gobj_read_pointer_attr)(gobj, "subscriber");
|
|
1371
1398
|
if (subscriber) (0, _yuneta_gobj_js.gobj_subscribe_event)(gobj, null, {}, subscriber);
|
|
1372
1399
|
__live_shells__.push(gobj);
|
|
@@ -1376,7 +1403,7 @@ function mt_create$23(gobj) {
|
|
|
1376
1403
|
/***************************************************************
|
|
1377
1404
|
* Framework Method: Start
|
|
1378
1405
|
***************************************************************/
|
|
1379
|
-
function mt_start$
|
|
1406
|
+
function mt_start$23(gobj) {
|
|
1380
1407
|
let config = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "config") || {};
|
|
1381
1408
|
let priv = gobj.priv;
|
|
1382
1409
|
if (!validate_config(config)) {
|
|
@@ -1520,7 +1547,7 @@ function mt_start$22(gobj) {
|
|
|
1520
1547
|
/***************************************************************
|
|
1521
1548
|
* Framework Method: Stop
|
|
1522
1549
|
***************************************************************/
|
|
1523
|
-
function mt_stop$
|
|
1550
|
+
function mt_stop$22(gobj) {
|
|
1524
1551
|
let priv = gobj.priv;
|
|
1525
1552
|
if (!priv) return 0;
|
|
1526
1553
|
retire_overlays(gobj);
|
|
@@ -1584,7 +1611,7 @@ function mt_stop$21(gobj) {
|
|
|
1584
1611
|
/***************************************************************
|
|
1585
1612
|
* Framework Method: Destroy
|
|
1586
1613
|
***************************************************************/
|
|
1587
|
-
function mt_destroy$
|
|
1614
|
+
function mt_destroy$24(gobj) {
|
|
1588
1615
|
retire_overlays(gobj);
|
|
1589
1616
|
close_toolbar_dropdown(gobj);
|
|
1590
1617
|
let live_idx = __live_shells__.indexOf(gobj);
|
|
@@ -3710,22 +3737,26 @@ function ac_nav_item_close(gobj, event, kw, src) {
|
|
|
3710
3737
|
* EV_ICONS_CHANGED). So they reach only the subscribers that
|
|
3711
3738
|
* declare them. Every other event of the shell goes out as before.
|
|
3712
3739
|
***************************************************************/
|
|
3713
|
-
var OPTIONAL_EVENTS = /* @__PURE__ */ new Set([
|
|
3740
|
+
var OPTIONAL_EVENTS = /* @__PURE__ */ new Set([
|
|
3741
|
+
"EV_CONNECTION_STATE",
|
|
3742
|
+
"EV_ICONS_CHANGED",
|
|
3743
|
+
"EV_NAV_MODE_CHANGED"
|
|
3744
|
+
]);
|
|
3714
3745
|
function mt_publication_pre_filter(gobj, subs, event, kw) {
|
|
3715
3746
|
if (!OPTIONAL_EVENTS.has(event)) return 1;
|
|
3716
3747
|
let subscriber = subs && subs.subscriber;
|
|
3717
3748
|
if (!subscriber || !(0, _yuneta_gobj_js.gobj_has_event)(subscriber, event, 0)) return 0;
|
|
3718
3749
|
return 1;
|
|
3719
3750
|
}
|
|
3720
|
-
var gmt$
|
|
3721
|
-
mt_create: mt_create$
|
|
3722
|
-
mt_start: mt_start$
|
|
3723
|
-
mt_stop: mt_stop$
|
|
3724
|
-
mt_destroy: mt_destroy$
|
|
3751
|
+
var gmt$24 = {
|
|
3752
|
+
mt_create: mt_create$24,
|
|
3753
|
+
mt_start: mt_start$23,
|
|
3754
|
+
mt_stop: mt_stop$22,
|
|
3755
|
+
mt_destroy: mt_destroy$24,
|
|
3725
3756
|
mt_publication_pre_filter
|
|
3726
3757
|
};
|
|
3727
|
-
function create_gclass$
|
|
3728
|
-
if (__gclass__$
|
|
3758
|
+
function create_gclass$24(gclass_name) {
|
|
3759
|
+
if (__gclass__$24) {
|
|
3729
3760
|
(0, _yuneta_gobj_js.log_error)(`GClass ALREADY created: ${gclass_name}`);
|
|
3730
3761
|
return -1;
|
|
3731
3762
|
}
|
|
@@ -3765,15 +3796,16 @@ function create_gclass$23(gclass_name) {
|
|
|
3765
3796
|
["EV_ROUTE_REQUESTED", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT | _yuneta_gobj_js.event_flag_t.EVF_PUBLIC_EVENT | _yuneta_gobj_js.event_flag_t.EVF_NO_WARN_SUBS],
|
|
3766
3797
|
["EV_ROUTE_CHANGED", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT | _yuneta_gobj_js.event_flag_t.EVF_PUBLIC_EVENT | _yuneta_gobj_js.event_flag_t.EVF_NO_WARN_SUBS],
|
|
3767
3798
|
["EV_LANGUAGE_CHANGED", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT | _yuneta_gobj_js.event_flag_t.EVF_PUBLIC_EVENT | _yuneta_gobj_js.event_flag_t.EVF_NO_WARN_SUBS],
|
|
3799
|
+
["EV_NAV_MODE_CHANGED", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT | _yuneta_gobj_js.event_flag_t.EVF_PUBLIC_EVENT | _yuneta_gobj_js.event_flag_t.EVF_NO_WARN_SUBS],
|
|
3768
3800
|
["EV_ICONS_CHANGED", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT | _yuneta_gobj_js.event_flag_t.EVF_PUBLIC_EVENT | _yuneta_gobj_js.event_flag_t.EVF_NO_WARN_SUBS],
|
|
3769
3801
|
["EV_CONNECTION_STATE", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT | _yuneta_gobj_js.event_flag_t.EVF_NO_WARN_SUBS]
|
|
3770
3802
|
];
|
|
3771
|
-
__gclass__$
|
|
3772
|
-
if (!__gclass__$
|
|
3803
|
+
__gclass__$24 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, event_types, states, gmt$24, 0, attrs_table$24, PRIVATE_DATA$24, 0, 0, 0, _yuneta_gobj_js.gclass_flag_t.gcflag_no_check_output_events);
|
|
3804
|
+
if (!__gclass__$24) return -1;
|
|
3773
3805
|
return 0;
|
|
3774
3806
|
}
|
|
3775
3807
|
function register_c_yui_shell() {
|
|
3776
|
-
return create_gclass$
|
|
3808
|
+
return create_gclass$24(GCLASS_NAME$24);
|
|
3777
3809
|
}
|
|
3778
3810
|
/***************************************************************
|
|
3779
3811
|
* Public helpers — exported alongside register_c_yui_shell().
|
|
@@ -3893,7 +3925,7 @@ function yui_shell_previous_route(shell_gobj) {
|
|
|
3893
3925
|
function yui_shell_of(gobj) {
|
|
3894
3926
|
let g = gobj;
|
|
3895
3927
|
while (g) {
|
|
3896
|
-
if ((0, _yuneta_gobj_js.gobj_gclass_name)(g) === GCLASS_NAME$
|
|
3928
|
+
if ((0, _yuneta_gobj_js.gobj_gclass_name)(g) === GCLASS_NAME$24) return g;
|
|
3897
3929
|
g = (0, _yuneta_gobj_js.gobj_parent)(g);
|
|
3898
3930
|
}
|
|
3899
3931
|
return __live_shells__.length > 0 ? __live_shells__[__live_shells__.length - 1] : null;
|
|
@@ -4194,6 +4226,55 @@ function yui_shell_translate(shell_gobj, $el) {
|
|
|
4194
4226
|
(0, _yuneta_gobj_js.refresh_language)($el, priv.translator);
|
|
4195
4227
|
}
|
|
4196
4228
|
/************************************************************
|
|
4229
|
+
* The app switched the language: re-translate the whole document (every
|
|
4230
|
+
* node carrying data-i18n / data-i18n-title / data-i18n-aria-label) and
|
|
4231
|
+
* PUBLISH the fact, so the views that build DOM imperatively — Tabulator
|
|
4232
|
+
* headers and paginators, composed titles, row counters — can re-render
|
|
4233
|
+
* what no attribute can reach.
|
|
4234
|
+
*
|
|
4235
|
+
* The app remains the owner of the locales: it switches its i18next and
|
|
4236
|
+
* calls this. The shell only fans the fact out.
|
|
4237
|
+
************************************************************/
|
|
4238
|
+
function yui_shell_language_changed(shell_gobj) {
|
|
4239
|
+
if (!shell_gobj || !(0, _yuneta_gobj_js.is_gobj)(shell_gobj)) return;
|
|
4240
|
+
let priv = shell_gobj.priv;
|
|
4241
|
+
if (priv && typeof priv.translator === "function") (0, _yuneta_gobj_js.refresh_language)(document.body, priv.translator);
|
|
4242
|
+
(0, _yuneta_gobj_js.gobj_publish_event)(shell_gobj, "EV_LANGUAGE_CHANGED", {});
|
|
4243
|
+
}
|
|
4244
|
+
/************************************************************
|
|
4245
|
+
* How the trees of nodes show the way in: the reader's choice
|
|
4246
|
+
* for the whole app, one of NAV_MODES (C_YUI_NODE):
|
|
4247
|
+
*
|
|
4248
|
+
* "stack" a strip of tabs per level, stacked (the default)
|
|
4249
|
+
* "back" one "back to parent" link
|
|
4250
|
+
* "path" a breadcrumb
|
|
4251
|
+
*
|
|
4252
|
+
* Kept in this browser (localStorage), like the theme and the
|
|
4253
|
+
* language. Every C_YUI_NODE root that has no `nav_mode` of its
|
|
4254
|
+
* own reads it, and follows a change: yui_shell_set_nav_mode()
|
|
4255
|
+
* publishes EV_NAV_MODE_CHANGED. Up to gobj-ui 7.32.10 each app
|
|
4256
|
+
* kept its own (gui_agent one for the app, yunovatios one per
|
|
4257
|
+
* tree) and handed it to its trees.
|
|
4258
|
+
************************************************************/
|
|
4259
|
+
var NAV_MODE_KEY = "yui_nav_mode";
|
|
4260
|
+
function yui_shell_nav_mode(shell_gobj) {
|
|
4261
|
+
let mode = (0, _yuneta_gobj_js.kw_get_local_storage_value)(NAV_MODE_KEY, NAV_MODES[0], false);
|
|
4262
|
+
return is_nav_mode(mode) ? mode : NAV_MODES[0];
|
|
4263
|
+
}
|
|
4264
|
+
function yui_shell_set_nav_mode(shell_gobj, mode) {
|
|
4265
|
+
if (!shell_gobj || !(0, _yuneta_gobj_js.is_gobj)(shell_gobj)) {
|
|
4266
|
+
(0, _yuneta_gobj_js.log_error)(`yui_shell_set_nav_mode(): no shell`);
|
|
4267
|
+
return -1;
|
|
4268
|
+
}
|
|
4269
|
+
if (!is_nav_mode(mode)) {
|
|
4270
|
+
(0, _yuneta_gobj_js.log_error)(`yui_shell_set_nav_mode(): unknown nav_mode '${mode}' — expected one of ${NAV_MODES.join("|")}`);
|
|
4271
|
+
return -1;
|
|
4272
|
+
}
|
|
4273
|
+
if ((0, _yuneta_gobj_js.kw_set_local_storage_value)(NAV_MODE_KEY, mode) < 0) return -1;
|
|
4274
|
+
(0, _yuneta_gobj_js.gobj_publish_event)(shell_gobj, "EV_NAV_MODE_CHANGED", { nav_mode: mode });
|
|
4275
|
+
return 0;
|
|
4276
|
+
}
|
|
4277
|
+
/************************************************************
|
|
4197
4278
|
* The user icons changed (lib_icons.js: yui_icons_set_user,
|
|
4198
4279
|
* yui_icons_put_user, yui_icons_remove_user): PUBLISH it, so
|
|
4199
4280
|
* the views that decided at render time whether a name is an
|
|
@@ -5063,7 +5144,7 @@ function yui_shell_confirm_yesnocancel(shell, message, opts) {
|
|
|
5063
5144
|
/***************************************************************
|
|
5064
5145
|
* Constants
|
|
5065
5146
|
***************************************************************/
|
|
5066
|
-
var GCLASS_NAME$
|
|
5147
|
+
var GCLASS_NAME$23 = "C_YUI_WINDOW";
|
|
5067
5148
|
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>";
|
|
5068
5149
|
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>";
|
|
5069
5150
|
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>";
|
|
@@ -5076,7 +5157,7 @@ var __title_seq__ = 0;
|
|
|
5076
5157
|
/***************************************************************
|
|
5077
5158
|
* Data
|
|
5078
5159
|
***************************************************************/
|
|
5079
|
-
var attrs_table$
|
|
5160
|
+
var attrs_table$23 = [
|
|
5080
5161
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
5081
5162
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "$parent", 0, null, "$container will be appended to $parent if not null, else to the window layer of the shell (document.body while there is none), following the shell when it is destroyed or another is built"),
|
|
5082
5163
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_INTEGER, "x", 0, "300", "X position"),
|
|
@@ -5114,7 +5195,7 @@ var attrs_table$22 = [
|
|
|
5114
5195
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "win_resize_handler", 0, null, "Internal: native window 'resize' listener"),
|
|
5115
5196
|
(0, _yuneta_gobj_js.SDATA_END)()
|
|
5116
5197
|
];
|
|
5117
|
-
var PRIVATE_DATA$
|
|
5198
|
+
var PRIVATE_DATA$23 = {
|
|
5118
5199
|
prevSize: 0,
|
|
5119
5200
|
placed_by_shell: false,
|
|
5120
5201
|
back_shell: null,
|
|
@@ -5123,14 +5204,14 @@ var PRIVATE_DATA$22 = {
|
|
|
5123
5204
|
release_focus: null,
|
|
5124
5205
|
escape_order: 0
|
|
5125
5206
|
};
|
|
5126
|
-
var __gclass__$
|
|
5207
|
+
var __gclass__$23 = null;
|
|
5127
5208
|
/******************************
|
|
5128
5209
|
* Framework Methods
|
|
5129
5210
|
******************************/
|
|
5130
5211
|
/***************************************************************
|
|
5131
5212
|
* Framework Method: Create
|
|
5132
5213
|
***************************************************************/
|
|
5133
|
-
function mt_create$
|
|
5214
|
+
function mt_create$23(gobj) {
|
|
5134
5215
|
const subscriber = (0, _yuneta_gobj_js.gobj_read_pointer_attr)(gobj, "subscriber");
|
|
5135
5216
|
if (subscriber) (0, _yuneta_gobj_js.gobj_subscribe_event)(gobj, null, {}, subscriber);
|
|
5136
5217
|
let window_id = "window-" + (0, _yuneta_gobj_js.clean_name)((0, _yuneta_gobj_js.gobj_short_name)(gobj));
|
|
@@ -5193,7 +5274,7 @@ function mt_create$22(gobj) {
|
|
|
5193
5274
|
* it could not be seen, and the next Tab gave it back to the
|
|
5194
5275
|
* overlay; it opens under it now, and is there when it goes.
|
|
5195
5276
|
***************************************************************/
|
|
5196
|
-
function mt_start$
|
|
5277
|
+
function mt_start$22(gobj) {
|
|
5197
5278
|
let priv = gobj.priv;
|
|
5198
5279
|
let $container = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "$container");
|
|
5199
5280
|
if (!$container) {
|
|
@@ -5212,7 +5293,7 @@ function mt_start$21(gobj) {
|
|
|
5212
5293
|
/***************************************************************
|
|
5213
5294
|
* Framework Method: Destroy
|
|
5214
5295
|
***************************************************************/
|
|
5215
|
-
function mt_destroy$
|
|
5296
|
+
function mt_destroy$23(gobj) {
|
|
5216
5297
|
let priv = gobj.priv;
|
|
5217
5298
|
give_focus_back(gobj);
|
|
5218
5299
|
yui_shell_unwatch_changes(gobj);
|
|
@@ -5495,7 +5576,7 @@ function resolve_manager(gobj) {
|
|
|
5495
5576
|
if (typeof m === "string") {
|
|
5496
5577
|
let name = m;
|
|
5497
5578
|
m = (0, _yuneta_gobj_js.gobj_find_service)(name, false) || null;
|
|
5498
|
-
if (!m) (0, _yuneta_gobj_js.log_warning)(`${GCLASS_NAME$
|
|
5579
|
+
if (!m) (0, _yuneta_gobj_js.log_warning)(`${GCLASS_NAME$23}: window manager '${name}' not found: no dock, no minimize`);
|
|
5499
5580
|
(0, _yuneta_gobj_js.gobj_write_attr)(gobj, "manager", m);
|
|
5500
5581
|
}
|
|
5501
5582
|
return m;
|
|
@@ -6272,16 +6353,16 @@ function ac_shell_changed$2(gobj, event, kw, src) {
|
|
|
6272
6353
|
/***************************
|
|
6273
6354
|
* FSM
|
|
6274
6355
|
***************************/
|
|
6275
|
-
var gmt$
|
|
6276
|
-
mt_create: mt_create$
|
|
6277
|
-
mt_start: mt_start$
|
|
6278
|
-
mt_destroy: mt_destroy$
|
|
6356
|
+
var gmt$23 = {
|
|
6357
|
+
mt_create: mt_create$23,
|
|
6358
|
+
mt_start: mt_start$22,
|
|
6359
|
+
mt_destroy: mt_destroy$23
|
|
6279
6360
|
};
|
|
6280
6361
|
/***************************************************************
|
|
6281
6362
|
* Create the GClass
|
|
6282
6363
|
***************************************************************/
|
|
6283
|
-
function create_gclass$
|
|
6284
|
-
if (__gclass__$
|
|
6364
|
+
function create_gclass$23(gclass_name) {
|
|
6365
|
+
if (__gclass__$23) {
|
|
6285
6366
|
(0, _yuneta_gobj_js.log_error)(`GClass ALREADY created: ${gclass_name}`);
|
|
6286
6367
|
return -1;
|
|
6287
6368
|
}
|
|
@@ -6322,15 +6403,15 @@ function create_gclass$22(gclass_name) {
|
|
|
6322
6403
|
["EV_CLOSE_WINDOW", 0],
|
|
6323
6404
|
["EV_SHELL_CHANGED", 0]
|
|
6324
6405
|
];
|
|
6325
|
-
__gclass__$
|
|
6326
|
-
if (!__gclass__$
|
|
6406
|
+
__gclass__$23 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, event_types, states, gmt$23, 0, attrs_table$23, PRIVATE_DATA$23, 0, 0, 0, 0);
|
|
6407
|
+
if (!__gclass__$23) return -1;
|
|
6327
6408
|
return 0;
|
|
6328
6409
|
}
|
|
6329
6410
|
/***************************************************************
|
|
6330
6411
|
* Register GClass
|
|
6331
6412
|
***************************************************************/
|
|
6332
6413
|
function register_c_yui_window() {
|
|
6333
|
-
return create_gclass$
|
|
6414
|
+
return create_gclass$23(GCLASS_NAME$23);
|
|
6334
6415
|
}
|
|
6335
6416
|
// src/c_yui_window_manager.js
|
|
6336
6417
|
/***********************************************************************
|
|
@@ -6376,14 +6457,14 @@ function register_c_yui_window() {
|
|
|
6376
6457
|
/***************************************************************
|
|
6377
6458
|
* Constants
|
|
6378
6459
|
***************************************************************/
|
|
6379
|
-
var GCLASS_NAME$
|
|
6460
|
+
var GCLASS_NAME$22 = "C_YUI_WINDOW_MANAGER";
|
|
6380
6461
|
var DOCK_Z = 1e6;
|
|
6381
6462
|
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>";
|
|
6382
6463
|
var __chip_seq__ = 0;
|
|
6383
6464
|
/***************************************************************
|
|
6384
6465
|
* Data
|
|
6385
6466
|
***************************************************************/
|
|
6386
|
-
var attrs_table$
|
|
6467
|
+
var attrs_table$22 = [
|
|
6387
6468
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
6388
6469
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "dock_mode", 0, "floating", "floating | inline | responsive (floating on wide screens, inline on narrow)"),
|
|
6389
6470
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "dock_corner", 0, "bottom-left", "Floating placement: top-left | top-right | bottom-left | bottom-right"),
|
|
@@ -6393,20 +6474,20 @@ var attrs_table$21 = [
|
|
|
6393
6474
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "$container", 0, null, "Internal: the dock element"),
|
|
6394
6475
|
(0, _yuneta_gobj_js.SDATA_END)()
|
|
6395
6476
|
];
|
|
6396
|
-
var PRIVATE_DATA$
|
|
6477
|
+
var PRIVATE_DATA$22 = {
|
|
6397
6478
|
windows: null,
|
|
6398
6479
|
mql: null,
|
|
6399
6480
|
mql_handler: null,
|
|
6400
6481
|
lang_shell: null
|
|
6401
6482
|
};
|
|
6402
|
-
var __gclass__$
|
|
6483
|
+
var __gclass__$22 = null;
|
|
6403
6484
|
/******************************
|
|
6404
6485
|
* Framework Methods
|
|
6405
6486
|
******************************/
|
|
6406
6487
|
/***************************************************************
|
|
6407
6488
|
* Framework Method: Create
|
|
6408
6489
|
***************************************************************/
|
|
6409
|
-
function mt_create$
|
|
6490
|
+
function mt_create$22(gobj) {
|
|
6410
6491
|
let priv = gobj.priv;
|
|
6411
6492
|
priv.windows = [];
|
|
6412
6493
|
if (((0, _yuneta_gobj_js.gobj_read_attr)(gobj, "dock_mode") || "floating") === "responsive") {
|
|
@@ -6426,7 +6507,7 @@ function mt_create$21(gobj) {
|
|
|
6426
6507
|
/***************************************************************
|
|
6427
6508
|
* Framework Method: Destroy
|
|
6428
6509
|
***************************************************************/
|
|
6429
|
-
function mt_destroy$
|
|
6510
|
+
function mt_destroy$22(gobj) {
|
|
6430
6511
|
let priv = gobj.priv;
|
|
6431
6512
|
yui_shell_unwatch_changes(gobj);
|
|
6432
6513
|
if (priv.lang_shell) {
|
|
@@ -6977,7 +7058,7 @@ function ac_shell_changed$1(gobj, event, kw, src) {
|
|
|
6977
7058
|
* language the window was opened in (a reader took the
|
|
6978
7059
|
* aria-labelledby, which changed; the tooltip did not).
|
|
6979
7060
|
************************************************************/
|
|
6980
|
-
function ac_language_changed$
|
|
7061
|
+
function ac_language_changed$14(gobj, event, kw, src) {
|
|
6981
7062
|
let priv = gobj.priv;
|
|
6982
7063
|
for (let entry of priv.windows) {
|
|
6983
7064
|
if (!entry.title_prefix || !entry.$chip) continue;
|
|
@@ -6995,19 +7076,19 @@ function ac_language_changed$13(gobj, event, kw, src) {
|
|
|
6995
7076
|
/***************************
|
|
6996
7077
|
* FSM
|
|
6997
7078
|
***************************/
|
|
6998
|
-
var gmt$
|
|
6999
|
-
mt_create: mt_create$
|
|
7000
|
-
mt_destroy: mt_destroy$
|
|
7079
|
+
var gmt$22 = {
|
|
7080
|
+
mt_create: mt_create$22,
|
|
7081
|
+
mt_destroy: mt_destroy$22
|
|
7001
7082
|
};
|
|
7002
7083
|
/***************************************************************
|
|
7003
7084
|
* Create the GClass
|
|
7004
7085
|
***************************************************************/
|
|
7005
|
-
function create_gclass$
|
|
7006
|
-
if (__gclass__$
|
|
7086
|
+
function create_gclass$22(gclass_name) {
|
|
7087
|
+
if (__gclass__$22) {
|
|
7007
7088
|
(0, _yuneta_gobj_js.log_error)(`GClass ALREADY created: ${gclass_name}`);
|
|
7008
7089
|
return -1;
|
|
7009
7090
|
}
|
|
7010
|
-
__gclass__$
|
|
7091
|
+
__gclass__$22 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, [
|
|
7011
7092
|
["EV_REGISTER_WINDOW", 0],
|
|
7012
7093
|
["EV_UNREGISTER_WINDOW", 0],
|
|
7013
7094
|
["EV_MINIMIZE_WINDOW", 0],
|
|
@@ -7048,18 +7129,18 @@ function create_gclass$21(gclass_name) {
|
|
|
7048
7129
|
],
|
|
7049
7130
|
[
|
|
7050
7131
|
"EV_LANGUAGE_CHANGED",
|
|
7051
|
-
ac_language_changed$
|
|
7132
|
+
ac_language_changed$14,
|
|
7052
7133
|
null
|
|
7053
7134
|
]
|
|
7054
|
-
]]], gmt$
|
|
7055
|
-
if (!__gclass__$
|
|
7135
|
+
]]], gmt$22, 0, attrs_table$22, PRIVATE_DATA$22, 0, 0, 0, 0);
|
|
7136
|
+
if (!__gclass__$22) return -1;
|
|
7056
7137
|
return 0;
|
|
7057
7138
|
}
|
|
7058
7139
|
/***************************************************************
|
|
7059
7140
|
* Register GClass
|
|
7060
7141
|
***************************************************************/
|
|
7061
7142
|
function register_c_yui_window_manager() {
|
|
7062
|
-
return create_gclass$
|
|
7143
|
+
return create_gclass$22(GCLASS_NAME$22);
|
|
7063
7144
|
}
|
|
7064
7145
|
// src/yui_build_stamp.js
|
|
7065
7146
|
/***********************************************************************
|
|
@@ -7239,11 +7320,11 @@ function build_page_url(loc) {
|
|
|
7239
7320
|
/***************************************************************
|
|
7240
7321
|
* Constants
|
|
7241
7322
|
***************************************************************/
|
|
7242
|
-
var GCLASS_NAME$
|
|
7323
|
+
var GCLASS_NAME$21 = "C_YUI_UPDATE_WATCH";
|
|
7243
7324
|
/***************************************************************
|
|
7244
7325
|
* Data
|
|
7245
7326
|
***************************************************************/
|
|
7246
|
-
var attrs_table$
|
|
7327
|
+
var attrs_table$21 = [
|
|
7247
7328
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
7248
7329
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_INTEGER, "min_interval_ms", 0, "60000", "Minimum time between two checks, except a forced one"),
|
|
7249
7330
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_INTEGER, "period_ms", 0, "3600000", "Periodic check, for a screen that never gets the focus back; 0 = off (user-approved exception to No polling)"),
|
|
@@ -7252,7 +7333,7 @@ var attrs_table$20 = [
|
|
|
7252
7333
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "$parent", 0, null, "Where the bar mounts (default: the shell's notification layer, document.body while there is none)"),
|
|
7253
7334
|
(0, _yuneta_gobj_js.SDATA_END)()
|
|
7254
7335
|
];
|
|
7255
|
-
var PRIVATE_DATA$
|
|
7336
|
+
var PRIVATE_DATA$21 = {
|
|
7256
7337
|
running: null,
|
|
7257
7338
|
deployed: null,
|
|
7258
7339
|
dismissed: "",
|
|
@@ -7264,7 +7345,7 @@ var PRIVATE_DATA$20 = {
|
|
|
7264
7345
|
lang_shell: null,
|
|
7265
7346
|
dom_handlers: null
|
|
7266
7347
|
};
|
|
7267
|
-
var __gclass__$
|
|
7348
|
+
var __gclass__$21 = null;
|
|
7268
7349
|
var __live_watches__ = [];
|
|
7269
7350
|
/******************************
|
|
7270
7351
|
* Framework Methods
|
|
@@ -7272,7 +7353,7 @@ var __live_watches__ = [];
|
|
|
7272
7353
|
/***************************************************************
|
|
7273
7354
|
* Framework Method: Create
|
|
7274
7355
|
***************************************************************/
|
|
7275
|
-
function mt_create$
|
|
7356
|
+
function mt_create$21(gobj) {
|
|
7276
7357
|
let priv = gobj.priv;
|
|
7277
7358
|
priv.running = running_build(typeof document !== "undefined" ? document : null);
|
|
7278
7359
|
priv.dom_handlers = [];
|
|
@@ -7286,7 +7367,7 @@ function mt_create$20(gobj) {
|
|
|
7286
7367
|
/***************************************************************
|
|
7287
7368
|
* Framework Method: Start
|
|
7288
7369
|
***************************************************************/
|
|
7289
|
-
function mt_start$
|
|
7370
|
+
function mt_start$21(gobj) {
|
|
7290
7371
|
let priv = gobj.priv;
|
|
7291
7372
|
(0, _yuneta_gobj_js.gobj_start)(priv.gobj_timer);
|
|
7292
7373
|
if (!priv.running) {
|
|
@@ -7313,7 +7394,7 @@ function mt_start$20(gobj) {
|
|
|
7313
7394
|
/***************************************************************
|
|
7314
7395
|
* Framework Method: Stop
|
|
7315
7396
|
***************************************************************/
|
|
7316
|
-
function mt_stop$
|
|
7397
|
+
function mt_stop$21(gobj) {
|
|
7317
7398
|
let priv = gobj.priv;
|
|
7318
7399
|
for (let [target, type, fn] of priv.dom_handlers) target.removeEventListener(type, fn);
|
|
7319
7400
|
priv.dom_handlers = [];
|
|
@@ -7323,7 +7404,7 @@ function mt_stop$20(gobj) {
|
|
|
7323
7404
|
/***************************************************************
|
|
7324
7405
|
* Framework Method: Destroy
|
|
7325
7406
|
***************************************************************/
|
|
7326
|
-
function mt_destroy$
|
|
7407
|
+
function mt_destroy$21(gobj) {
|
|
7327
7408
|
let priv = gobj.priv;
|
|
7328
7409
|
let idx = __live_watches__.indexOf(gobj);
|
|
7329
7410
|
if (idx >= 0) __live_watches__.splice(idx, 1);
|
|
@@ -7617,7 +7698,7 @@ function ac_shell_changed(gobj, event, kw, src) {
|
|
|
7617
7698
|
* the shell's container, where the app's refresh does not
|
|
7618
7699
|
* reach.
|
|
7619
7700
|
************************************************************/
|
|
7620
|
-
function ac_language_changed$
|
|
7701
|
+
function ac_language_changed$13(gobj, event, kw, src) {
|
|
7621
7702
|
let priv = gobj.priv;
|
|
7622
7703
|
if (priv.$bar) (0, _yuneta_gobj_js.refresh_language)(priv.$bar, i18next.t);
|
|
7623
7704
|
return 0;
|
|
@@ -7625,17 +7706,17 @@ function ac_language_changed$12(gobj, event, kw, src) {
|
|
|
7625
7706
|
/***************************
|
|
7626
7707
|
* FSM
|
|
7627
7708
|
***************************/
|
|
7628
|
-
var gmt$
|
|
7629
|
-
mt_create: mt_create$
|
|
7630
|
-
mt_start: mt_start$
|
|
7631
|
-
mt_stop: mt_stop$
|
|
7632
|
-
mt_destroy: mt_destroy$
|
|
7709
|
+
var gmt$21 = {
|
|
7710
|
+
mt_create: mt_create$21,
|
|
7711
|
+
mt_start: mt_start$21,
|
|
7712
|
+
mt_stop: mt_stop$21,
|
|
7713
|
+
mt_destroy: mt_destroy$21
|
|
7633
7714
|
};
|
|
7634
7715
|
/***************************************************************
|
|
7635
7716
|
* Create the GClass
|
|
7636
7717
|
***************************************************************/
|
|
7637
|
-
function create_gclass$
|
|
7638
|
-
if (__gclass__$
|
|
7718
|
+
function create_gclass$21(gclass_name) {
|
|
7719
|
+
if (__gclass__$21) {
|
|
7639
7720
|
(0, _yuneta_gobj_js.log_error)(`GClass ALREADY created: ${gclass_name}`);
|
|
7640
7721
|
return -1;
|
|
7641
7722
|
}
|
|
@@ -7667,7 +7748,7 @@ function create_gclass$20(gclass_name) {
|
|
|
7667
7748
|
],
|
|
7668
7749
|
[
|
|
7669
7750
|
"EV_LANGUAGE_CHANGED",
|
|
7670
|
-
ac_language_changed$
|
|
7751
|
+
ac_language_changed$13,
|
|
7671
7752
|
null
|
|
7672
7753
|
]
|
|
7673
7754
|
]], ["ST_STALE", [
|
|
@@ -7713,7 +7794,7 @@ function create_gclass$20(gclass_name) {
|
|
|
7713
7794
|
],
|
|
7714
7795
|
[
|
|
7715
7796
|
"EV_LANGUAGE_CHANGED",
|
|
7716
|
-
ac_language_changed$
|
|
7797
|
+
ac_language_changed$13,
|
|
7717
7798
|
null
|
|
7718
7799
|
]
|
|
7719
7800
|
]]];
|
|
@@ -7730,15 +7811,15 @@ function create_gclass$20(gclass_name) {
|
|
|
7730
7811
|
["EV_NEW_BUILD", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT | _yuneta_gobj_js.event_flag_t.EVF_NO_WARN_SUBS],
|
|
7731
7812
|
["EV_BUILD_CURRENT", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT | _yuneta_gobj_js.event_flag_t.EVF_NO_WARN_SUBS]
|
|
7732
7813
|
];
|
|
7733
|
-
__gclass__$
|
|
7734
|
-
if (!__gclass__$
|
|
7814
|
+
__gclass__$21 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, event_types, states, gmt$21, 0, attrs_table$21, PRIVATE_DATA$21, 0, 0, 0, 0);
|
|
7815
|
+
if (!__gclass__$21) return -1;
|
|
7735
7816
|
return 0;
|
|
7736
7817
|
}
|
|
7737
7818
|
/***************************************************************
|
|
7738
7819
|
* Register GClass
|
|
7739
7820
|
***************************************************************/
|
|
7740
7821
|
function register_c_yui_update_watch() {
|
|
7741
|
-
return create_gclass$
|
|
7822
|
+
return create_gclass$21(GCLASS_NAME$21);
|
|
7742
7823
|
}
|
|
7743
7824
|
/***************************************************************
|
|
7744
7825
|
* The app switched its language (call it AFTER switching the
|
|
@@ -7839,11 +7920,11 @@ function pager_back_action(stack, back_on_root) {
|
|
|
7839
7920
|
/***************************************************************
|
|
7840
7921
|
* Constants
|
|
7841
7922
|
***************************************************************/
|
|
7842
|
-
var GCLASS_NAME$
|
|
7923
|
+
var GCLASS_NAME$20 = "C_YUI_PAGER";
|
|
7843
7924
|
/***************************************************************
|
|
7844
7925
|
* Data
|
|
7845
7926
|
***************************************************************/
|
|
7846
|
-
var attrs_table$
|
|
7927
|
+
var attrs_table$20 = [
|
|
7847
7928
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
7848
7929
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "root_title", 0, "", "Title shown on the root page"),
|
|
7849
7930
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_BOOLEAN, "back_on_root", 0, true, "On the root page the back affordance emits EV_PAGER_EXIT"),
|
|
@@ -7851,15 +7932,15 @@ var attrs_table$19 = [
|
|
|
7851
7932
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "$container", 0, null, "HTMLElement root, mounted by the parent"),
|
|
7852
7933
|
(0, _yuneta_gobj_js.SDATA_END)()
|
|
7853
7934
|
];
|
|
7854
|
-
var PRIVATE_DATA$
|
|
7855
|
-
var __gclass__$
|
|
7935
|
+
var PRIVATE_DATA$20 = { stack: null };
|
|
7936
|
+
var __gclass__$20 = null;
|
|
7856
7937
|
/******************************
|
|
7857
7938
|
* Framework Methods
|
|
7858
7939
|
******************************/
|
|
7859
7940
|
/***************************************************************
|
|
7860
7941
|
* Framework Method: Create
|
|
7861
7942
|
***************************************************************/
|
|
7862
|
-
function mt_create$
|
|
7943
|
+
function mt_create$20(gobj) {
|
|
7863
7944
|
let priv = gobj.priv;
|
|
7864
7945
|
priv.stack = [];
|
|
7865
7946
|
build_ui$17(gobj);
|
|
@@ -7870,17 +7951,17 @@ function mt_create$19(gobj) {
|
|
|
7870
7951
|
/***************************************************************
|
|
7871
7952
|
* Framework Method: Start
|
|
7872
7953
|
***************************************************************/
|
|
7873
|
-
function mt_start$
|
|
7954
|
+
function mt_start$20(gobj) {}
|
|
7874
7955
|
/***************************************************************
|
|
7875
7956
|
* Framework Method: Stop
|
|
7876
7957
|
***************************************************************/
|
|
7877
|
-
function mt_stop$
|
|
7958
|
+
function mt_stop$20(gobj) {
|
|
7878
7959
|
(0, _yuneta_gobj_js.gobj_stop_children)(gobj);
|
|
7879
7960
|
}
|
|
7880
7961
|
/***************************************************************
|
|
7881
7962
|
* Framework Method: Destroy
|
|
7882
7963
|
***************************************************************/
|
|
7883
|
-
function mt_destroy$
|
|
7964
|
+
function mt_destroy$20(gobj) {
|
|
7884
7965
|
destroy_ui$12(gobj);
|
|
7885
7966
|
}
|
|
7886
7967
|
/***************************
|
|
@@ -8044,7 +8125,7 @@ function ac_push_page(gobj, event, kw, src) {
|
|
|
8044
8125
|
let priv = gobj.priv;
|
|
8045
8126
|
let resolved = resolve_panel$1(kw.content);
|
|
8046
8127
|
if (!resolved.$el) {
|
|
8047
|
-
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$
|
|
8128
|
+
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$20}: EV_PUSH_PAGE without content`);
|
|
8048
8129
|
return -1;
|
|
8049
8130
|
}
|
|
8050
8131
|
let $body = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "$container").querySelector(".yui-pager-body");
|
|
@@ -8097,7 +8178,7 @@ function ac_replace_page(gobj, event, kw, src) {
|
|
|
8097
8178
|
let priv = gobj.priv;
|
|
8098
8179
|
let resolved = resolve_panel$1(kw.content);
|
|
8099
8180
|
if (!resolved.$el) {
|
|
8100
|
-
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$
|
|
8181
|
+
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$20}: EV_REPLACE_PAGE without content`);
|
|
8101
8182
|
return -1;
|
|
8102
8183
|
}
|
|
8103
8184
|
let $body = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "$container").querySelector(".yui-pager-body");
|
|
@@ -8164,17 +8245,17 @@ function ac_resize$5(gobj, event, kw, src) {
|
|
|
8164
8245
|
/***************************
|
|
8165
8246
|
* FSM
|
|
8166
8247
|
***************************/
|
|
8167
|
-
var gmt$
|
|
8168
|
-
mt_create: mt_create$
|
|
8169
|
-
mt_start: mt_start$
|
|
8170
|
-
mt_stop: mt_stop$
|
|
8171
|
-
mt_destroy: mt_destroy$
|
|
8248
|
+
var gmt$20 = {
|
|
8249
|
+
mt_create: mt_create$20,
|
|
8250
|
+
mt_start: mt_start$20,
|
|
8251
|
+
mt_stop: mt_stop$20,
|
|
8252
|
+
mt_destroy: mt_destroy$20
|
|
8172
8253
|
};
|
|
8173
8254
|
/***************************************************************
|
|
8174
8255
|
* Create the GClass
|
|
8175
8256
|
***************************************************************/
|
|
8176
|
-
function create_gclass$
|
|
8177
|
-
if (__gclass__$
|
|
8257
|
+
function create_gclass$20(gclass_name) {
|
|
8258
|
+
if (__gclass__$20) {
|
|
8178
8259
|
(0, _yuneta_gobj_js.log_error)(`GClass ALREADY created: ${gclass_name}`);
|
|
8179
8260
|
return -1;
|
|
8180
8261
|
}
|
|
@@ -8239,15 +8320,15 @@ function create_gclass$19(gclass_name) {
|
|
|
8239
8320
|
["EV_PAGE_DISCARD", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT],
|
|
8240
8321
|
["EV_PAGER_EXIT", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT]
|
|
8241
8322
|
];
|
|
8242
|
-
__gclass__$
|
|
8243
|
-
if (!__gclass__$
|
|
8323
|
+
__gclass__$20 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, event_types, states, gmt$20, 0, attrs_table$20, PRIVATE_DATA$20, 0, 0, 0, 0);
|
|
8324
|
+
if (!__gclass__$20) return -1;
|
|
8244
8325
|
return 0;
|
|
8245
8326
|
}
|
|
8246
8327
|
/***************************************************************
|
|
8247
8328
|
* Register GClass
|
|
8248
8329
|
***************************************************************/
|
|
8249
8330
|
function register_c_yui_pager() {
|
|
8250
|
-
return create_gclass$
|
|
8331
|
+
return create_gclass$20(GCLASS_NAME$20);
|
|
8251
8332
|
}
|
|
8252
8333
|
// src/wizard_helpers.js
|
|
8253
8334
|
/***********************************************************************
|
|
@@ -8366,11 +8447,11 @@ function wizard_should_validate(linear, has_gobj) {
|
|
|
8366
8447
|
/***************************************************************
|
|
8367
8448
|
* Constants
|
|
8368
8449
|
***************************************************************/
|
|
8369
|
-
var GCLASS_NAME$
|
|
8450
|
+
var GCLASS_NAME$19 = "C_YUI_WIZARD";
|
|
8370
8451
|
/***************************************************************
|
|
8371
8452
|
* Data
|
|
8372
8453
|
***************************************************************/
|
|
8373
|
-
var attrs_table$
|
|
8454
|
+
var attrs_table$19 = [
|
|
8374
8455
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
8375
8456
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "confirm_label", 0, "confirm", "i18n key of the last-step primary button"),
|
|
8376
8457
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "next_label", 0, "next", "i18n key of the primary button (not last step)"),
|
|
@@ -8380,20 +8461,20 @@ var attrs_table$18 = [
|
|
|
8380
8461
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "$container", 0, null, "HTMLElement root, mounted by the parent"),
|
|
8381
8462
|
(0, _yuneta_gobj_js.SDATA_END)()
|
|
8382
8463
|
];
|
|
8383
|
-
var PRIVATE_DATA$
|
|
8464
|
+
var PRIVATE_DATA$19 = {
|
|
8384
8465
|
steps: null,
|
|
8385
8466
|
idx: 0,
|
|
8386
8467
|
acc: null,
|
|
8387
8468
|
awaiting: false
|
|
8388
8469
|
};
|
|
8389
|
-
var __gclass__$
|
|
8470
|
+
var __gclass__$19 = null;
|
|
8390
8471
|
/******************************
|
|
8391
8472
|
* Framework Methods
|
|
8392
8473
|
******************************/
|
|
8393
8474
|
/***************************************************************
|
|
8394
8475
|
* Framework Method: Create
|
|
8395
8476
|
***************************************************************/
|
|
8396
|
-
function mt_create$
|
|
8477
|
+
function mt_create$19(gobj) {
|
|
8397
8478
|
let priv = gobj.priv;
|
|
8398
8479
|
priv.steps = [];
|
|
8399
8480
|
priv.idx = 0;
|
|
@@ -8407,17 +8488,17 @@ function mt_create$18(gobj) {
|
|
|
8407
8488
|
/***************************************************************
|
|
8408
8489
|
* Framework Method: Start
|
|
8409
8490
|
***************************************************************/
|
|
8410
|
-
function mt_start$
|
|
8491
|
+
function mt_start$19(gobj) {}
|
|
8411
8492
|
/***************************************************************
|
|
8412
8493
|
* Framework Method: Stop
|
|
8413
8494
|
***************************************************************/
|
|
8414
|
-
function mt_stop$
|
|
8495
|
+
function mt_stop$19(gobj) {
|
|
8415
8496
|
(0, _yuneta_gobj_js.gobj_stop_children)(gobj);
|
|
8416
8497
|
}
|
|
8417
8498
|
/***************************************************************
|
|
8418
8499
|
* Framework Method: Destroy
|
|
8419
8500
|
***************************************************************/
|
|
8420
|
-
function mt_destroy$
|
|
8501
|
+
function mt_destroy$19(gobj) {
|
|
8421
8502
|
destroy_ui$11(gobj);
|
|
8422
8503
|
}
|
|
8423
8504
|
/***************************
|
|
@@ -8638,7 +8719,7 @@ function ac_set_steps(gobj, event, kw, src) {
|
|
|
8638
8719
|
let priv = gobj.priv;
|
|
8639
8720
|
let steps_in = kw && kw.steps || [];
|
|
8640
8721
|
if (steps_in.length === 0) {
|
|
8641
|
-
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$
|
|
8722
|
+
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$19}: EV_SET_STEPS with no steps`);
|
|
8642
8723
|
return -1;
|
|
8643
8724
|
}
|
|
8644
8725
|
let $body = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "$container").querySelector(".yui-wizard-body");
|
|
@@ -8648,7 +8729,7 @@ function ac_set_steps(gobj, event, kw, src) {
|
|
|
8648
8729
|
let st = steps_in[i];
|
|
8649
8730
|
let resolved = resolve_panel(st.content);
|
|
8650
8731
|
if (!resolved.$el) {
|
|
8651
|
-
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$
|
|
8732
|
+
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$19}: step '${st.id}' has no content`);
|
|
8652
8733
|
return -1;
|
|
8653
8734
|
}
|
|
8654
8735
|
resolved.$el.classList.add("is-hidden");
|
|
@@ -8782,17 +8863,17 @@ function ac_resize$4(gobj, event, kw, src) {
|
|
|
8782
8863
|
/***************************
|
|
8783
8864
|
* FSM
|
|
8784
8865
|
***************************/
|
|
8785
|
-
var gmt$
|
|
8786
|
-
mt_create: mt_create$
|
|
8787
|
-
mt_start: mt_start$
|
|
8788
|
-
mt_stop: mt_stop$
|
|
8789
|
-
mt_destroy: mt_destroy$
|
|
8866
|
+
var gmt$19 = {
|
|
8867
|
+
mt_create: mt_create$19,
|
|
8868
|
+
mt_start: mt_start$19,
|
|
8869
|
+
mt_stop: mt_stop$19,
|
|
8870
|
+
mt_destroy: mt_destroy$19
|
|
8790
8871
|
};
|
|
8791
8872
|
/***************************************************************
|
|
8792
8873
|
* Create the GClass
|
|
8793
8874
|
***************************************************************/
|
|
8794
|
-
function create_gclass$
|
|
8795
|
-
if (__gclass__$
|
|
8875
|
+
function create_gclass$19(gclass_name) {
|
|
8876
|
+
if (__gclass__$19) {
|
|
8796
8877
|
(0, _yuneta_gobj_js.log_error)(`GClass ALREADY created: ${gclass_name}`);
|
|
8797
8878
|
return -1;
|
|
8798
8879
|
}
|
|
@@ -8870,15 +8951,15 @@ function create_gclass$18(gclass_name) {
|
|
|
8870
8951
|
["EV_WIZARD_CANCEL", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT],
|
|
8871
8952
|
["EV_STEP_VALIDATE", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT | _yuneta_gobj_js.event_flag_t.EVF_NO_WARN_SUBS]
|
|
8872
8953
|
];
|
|
8873
|
-
__gclass__$
|
|
8874
|
-
if (!__gclass__$
|
|
8954
|
+
__gclass__$19 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, event_types, states, gmt$19, 0, attrs_table$19, PRIVATE_DATA$19, 0, 0, 0, 0);
|
|
8955
|
+
if (!__gclass__$19) return -1;
|
|
8875
8956
|
return 0;
|
|
8876
8957
|
}
|
|
8877
8958
|
/***************************************************************
|
|
8878
8959
|
* Register GClass
|
|
8879
8960
|
***************************************************************/
|
|
8880
8961
|
function register_c_yui_wizard() {
|
|
8881
|
-
return create_gclass$
|
|
8962
|
+
return create_gclass$19(GCLASS_NAME$19);
|
|
8882
8963
|
}
|
|
8883
8964
|
// src/yui_tabulator_i18n.js
|
|
8884
8965
|
/***********************************************************************
|
|
@@ -11754,11 +11835,11 @@ function name_json_editor_menu($editor) {
|
|
|
11754
11835
|
/***************************************************************
|
|
11755
11836
|
* Constants
|
|
11756
11837
|
***************************************************************/
|
|
11757
|
-
var GCLASS_NAME$
|
|
11838
|
+
var GCLASS_NAME$18 = "C_YUI_FORM";
|
|
11758
11839
|
/***************************************************************
|
|
11759
11840
|
* Data
|
|
11760
11841
|
***************************************************************/
|
|
11761
|
-
var attrs_table$
|
|
11842
|
+
var attrs_table$18 = [
|
|
11762
11843
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of publishing messages"),
|
|
11763
11844
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "$parent", 0, null, "$container will be appended to $parent if not null, else do it manually"),
|
|
11764
11845
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "template", 0, "<div>You must supply a template for form</div>", "Template for form, object -> TEMPLATE, array -> DESC"),
|
|
@@ -11789,7 +11870,7 @@ var attrs_table$17 = [
|
|
|
11789
11870
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_BOOLEAN, "edited", 0, false, "The reader changed the form (typed, cleared, pasted) since it was loaded, saved or undone: what closing it would lose. A field the record lacks, filled with its default, is a change of the form (`changes`) and not of the reader"),
|
|
11790
11871
|
(0, _yuneta_gobj_js.SDATA_END)()
|
|
11791
11872
|
];
|
|
11792
|
-
var PRIVATE_DATA$
|
|
11873
|
+
var PRIVATE_DATA$18 = {
|
|
11793
11874
|
loading_rows: 0,
|
|
11794
11875
|
tables: null,
|
|
11795
11876
|
table_seq: 0,
|
|
@@ -11798,14 +11879,14 @@ var PRIVATE_DATA$17 = {
|
|
|
11798
11879
|
change_seq: 0,
|
|
11799
11880
|
cell_edit: null
|
|
11800
11881
|
};
|
|
11801
|
-
var __gclass__$
|
|
11882
|
+
var __gclass__$18 = null;
|
|
11802
11883
|
/***************************
|
|
11803
11884
|
* Framework Methods
|
|
11804
11885
|
***************************/
|
|
11805
11886
|
/************************************************************
|
|
11806
11887
|
* Framework Method create
|
|
11807
11888
|
************************************************************/
|
|
11808
|
-
function mt_create$
|
|
11889
|
+
function mt_create$18(gobj) {
|
|
11809
11890
|
let subscriber = (0, _yuneta_gobj_js.gobj_read_pointer_attr)(gobj, "subscriber");
|
|
11810
11891
|
if (!subscriber) subscriber = (0, _yuneta_gobj_js.gobj_parent)(gobj);
|
|
11811
11892
|
(0, _yuneta_gobj_js.gobj_subscribe_event)(gobj, null, {}, subscriber);
|
|
@@ -11833,14 +11914,14 @@ function mt_writing$2(gobj, path) {
|
|
|
11833
11914
|
* In this point, all children
|
|
11834
11915
|
* and subscriptions are already deleted.
|
|
11835
11916
|
************************************************************/
|
|
11836
|
-
function mt_destroy$
|
|
11917
|
+
function mt_destroy$18(gobj) {
|
|
11837
11918
|
yui_asset_release((0, _yuneta_gobj_js.gobj_read_attr)(gobj, "$container"));
|
|
11838
11919
|
destroy_ui$10(gobj);
|
|
11839
11920
|
}
|
|
11840
11921
|
/************************************************************
|
|
11841
11922
|
* Framework Method start
|
|
11842
11923
|
************************************************************/
|
|
11843
|
-
function mt_start$
|
|
11924
|
+
function mt_start$18(gobj) {
|
|
11844
11925
|
let priv = gobj.priv;
|
|
11845
11926
|
let shell = yui_shell_of(gobj);
|
|
11846
11927
|
if (shell) {
|
|
@@ -11853,7 +11934,7 @@ function mt_start$17(gobj) {
|
|
|
11853
11934
|
/************************************************************
|
|
11854
11935
|
* Framework Method stop
|
|
11855
11936
|
************************************************************/
|
|
11856
|
-
function mt_stop$
|
|
11937
|
+
function mt_stop$18(gobj) {
|
|
11857
11938
|
let priv = gobj.priv;
|
|
11858
11939
|
if (priv.lang_shell && !(0, _yuneta_gobj_js.gobj_is_destroying)(priv.lang_shell)) (0, _yuneta_gobj_js.gobj_unsubscribe_event)(priv.lang_shell, "EV_LANGUAGE_CHANGED", {}, gobj);
|
|
11859
11940
|
priv.lang_shell = null;
|
|
@@ -14821,7 +14902,7 @@ function ac_name_json_editors(gobj, event, kw, src) {
|
|
|
14821
14902
|
* in the old language until it draws it again, so each is told to
|
|
14822
14903
|
* (a new onRenderMenu), and the render names it again.
|
|
14823
14904
|
************************************************************/
|
|
14824
|
-
function ac_language_changed$
|
|
14905
|
+
function ac_language_changed$12(gobj, event, kw, src) {
|
|
14825
14906
|
let $container = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "$container");
|
|
14826
14907
|
if (!$container) return 0;
|
|
14827
14908
|
for (let $editor of $container.querySelectorAll(".jsoneditor")) {
|
|
@@ -14891,19 +14972,19 @@ function cmd_get_picked_files(gobj, cmd, kw, src) {
|
|
|
14891
14972
|
data: files
|
|
14892
14973
|
};
|
|
14893
14974
|
}
|
|
14894
|
-
var gmt$
|
|
14895
|
-
mt_create: mt_create$
|
|
14975
|
+
var gmt$18 = {
|
|
14976
|
+
mt_create: mt_create$18,
|
|
14896
14977
|
mt_writing: mt_writing$2,
|
|
14897
|
-
mt_start: mt_start$
|
|
14898
|
-
mt_stop: mt_stop$
|
|
14899
|
-
mt_destroy: mt_destroy$
|
|
14978
|
+
mt_start: mt_start$18,
|
|
14979
|
+
mt_stop: mt_stop$18,
|
|
14980
|
+
mt_destroy: mt_destroy$18,
|
|
14900
14981
|
mt_command_parser: mt_command_parser$2
|
|
14901
14982
|
};
|
|
14902
14983
|
/***************************************************************
|
|
14903
14984
|
* Create the GClass
|
|
14904
14985
|
***************************************************************/
|
|
14905
|
-
function create_gclass$
|
|
14906
|
-
if (__gclass__$
|
|
14986
|
+
function create_gclass$18(gclass_name) {
|
|
14987
|
+
if (__gclass__$18) {
|
|
14907
14988
|
(0, _yuneta_gobj_js.log_error)(`GClass ALREADY created: ${gclass_name}`);
|
|
14908
14989
|
return -1;
|
|
14909
14990
|
}
|
|
@@ -15010,7 +15091,7 @@ function create_gclass$17(gclass_name) {
|
|
|
15010
15091
|
],
|
|
15011
15092
|
[
|
|
15012
15093
|
"EV_LANGUAGE_CHANGED",
|
|
15013
|
-
ac_language_changed$
|
|
15094
|
+
ac_language_changed$12,
|
|
15014
15095
|
null
|
|
15015
15096
|
]
|
|
15016
15097
|
]]];
|
|
@@ -15037,16 +15118,16 @@ function create_gclass$17(gclass_name) {
|
|
|
15037
15118
|
["EV_NAME_JSON_EDITORS", 0],
|
|
15038
15119
|
["EV_LANGUAGE_CHANGED", 0]
|
|
15039
15120
|
];
|
|
15040
|
-
__gclass__$
|
|
15041
|
-
if (!__gclass__$
|
|
15121
|
+
__gclass__$18 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, event_types, states, gmt$18, 0, attrs_table$18, PRIVATE_DATA$18, 0, 0, 0, 0);
|
|
15122
|
+
if (!__gclass__$18) return -1;
|
|
15042
15123
|
return 0;
|
|
15043
15124
|
}
|
|
15044
15125
|
/***************************************************************
|
|
15045
15126
|
* Register GClass
|
|
15046
15127
|
***************************************************************/
|
|
15047
15128
|
function register_c_yui_form() {
|
|
15048
|
-
if ((0, _yuneta_gobj_js.gclass_find_by_name)(GCLASS_NAME$
|
|
15049
|
-
return create_gclass$
|
|
15129
|
+
if ((0, _yuneta_gobj_js.gclass_find_by_name)(GCLASS_NAME$18, false)) return 0;
|
|
15130
|
+
return create_gclass$18(GCLASS_NAME$18);
|
|
15050
15131
|
}
|
|
15051
15132
|
// src/lib_maplibre.js
|
|
15052
15133
|
/***********************************************************************
|
|
@@ -15289,12 +15370,12 @@ function yui_maplibre_relocalize(map, t) {
|
|
|
15289
15370
|
/***************************************************************
|
|
15290
15371
|
* Constants
|
|
15291
15372
|
***************************************************************/
|
|
15292
|
-
var GCLASS_NAME$
|
|
15373
|
+
var GCLASS_NAME$17 = "C_YUI_MAP";
|
|
15293
15374
|
var GESTURE_HINT_MS = 2e3;
|
|
15294
15375
|
/***************************************************************
|
|
15295
15376
|
* Data
|
|
15296
15377
|
***************************************************************/
|
|
15297
|
-
var attrs_table$
|
|
15378
|
+
var attrs_table$17 = [
|
|
15298
15379
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
15299
15380
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_JSON, "devices", "[]", null, "List of devices"),
|
|
15300
15381
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_JSON, "map_settings", 0, {
|
|
@@ -15315,7 +15396,7 @@ var attrs_table$16 = [
|
|
|
15315
15396
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_INTEGER, "timeout_idle", 0, 5, "Idle timeout in seconds"),
|
|
15316
15397
|
(0, _yuneta_gobj_js.SDATA_END)()
|
|
15317
15398
|
];
|
|
15318
|
-
var PRIVATE_DATA$
|
|
15399
|
+
var PRIVATE_DATA$17 = {
|
|
15319
15400
|
xmap: null,
|
|
15320
15401
|
gesture_hint_timer: null,
|
|
15321
15402
|
geojson: null,
|
|
@@ -15325,21 +15406,21 @@ var PRIVATE_DATA$16 = {
|
|
|
15325
15406
|
markers: {},
|
|
15326
15407
|
draggedFeature: null
|
|
15327
15408
|
};
|
|
15328
|
-
var __gclass__$
|
|
15409
|
+
var __gclass__$17 = null;
|
|
15329
15410
|
/******************************
|
|
15330
15411
|
* Framework Methods
|
|
15331
15412
|
******************************/
|
|
15332
15413
|
/***************************************************************
|
|
15333
15414
|
* Framework Method: Create
|
|
15334
15415
|
***************************************************************/
|
|
15335
|
-
function mt_create$
|
|
15416
|
+
function mt_create$17(gobj) {
|
|
15336
15417
|
let priv = gobj.priv;
|
|
15337
15418
|
let subscriber = (0, _yuneta_gobj_js.gobj_read_pointer_attr)(gobj, "subscriber");
|
|
15338
15419
|
if (!subscriber) subscriber = (0, _yuneta_gobj_js.gobj_parent)(gobj);
|
|
15339
15420
|
(0, _yuneta_gobj_js.gobj_subscribe_event)(gobj, null, {}, subscriber);
|
|
15340
15421
|
let map_settings = (0, _yuneta_gobj_js.json_deep_copy)((0, _yuneta_gobj_js.gobj_read_attr)(gobj, "map_settings"));
|
|
15341
15422
|
let $map = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "$map");
|
|
15342
|
-
if ($map) $map.classList.add(GCLASS_NAME$
|
|
15423
|
+
if ($map) $map.classList.add(GCLASS_NAME$17);
|
|
15343
15424
|
Object.assign(map_settings, {
|
|
15344
15425
|
container: $map,
|
|
15345
15426
|
cooperativeGestures: true,
|
|
@@ -15404,7 +15485,7 @@ function mt_create$16(gobj) {
|
|
|
15404
15485
|
* rewritten in place, and the map's locale with them so a
|
|
15405
15486
|
* control or a popup built later is right too.
|
|
15406
15487
|
***************************************************************/
|
|
15407
|
-
function ac_language_changed$
|
|
15488
|
+
function ac_language_changed$11(gobj, event, kw, src) {
|
|
15408
15489
|
let priv = gobj.priv;
|
|
15409
15490
|
if (priv.xmap) yui_maplibre_relocalize(priv.xmap, i18next.t);
|
|
15410
15491
|
return 0;
|
|
@@ -15418,7 +15499,7 @@ function ac_language_changed$10(gobj, event, kw, src) {
|
|
|
15418
15499
|
* in OUR dom -- cannot touch any of it. The shell says when the
|
|
15419
15500
|
* language changed and this view rewrites those strings.
|
|
15420
15501
|
***************************************************************/
|
|
15421
|
-
function mt_start$
|
|
15502
|
+
function mt_start$17(gobj) {
|
|
15422
15503
|
let shell = yui_shell_of(gobj);
|
|
15423
15504
|
if (shell) (0, _yuneta_gobj_js.gobj_subscribe_event)(shell, "EV_LANGUAGE_CHANGED", {}, gobj);
|
|
15424
15505
|
return 0;
|
|
@@ -15426,7 +15507,7 @@ function mt_start$16(gobj) {
|
|
|
15426
15507
|
/***************************************************************
|
|
15427
15508
|
* Framework Method: Stop
|
|
15428
15509
|
***************************************************************/
|
|
15429
|
-
function mt_stop$
|
|
15510
|
+
function mt_stop$17(gobj) {
|
|
15430
15511
|
let shell = yui_shell_of(gobj);
|
|
15431
15512
|
if (shell) (0, _yuneta_gobj_js.gobj_unsubscribe_event)(shell, "EV_LANGUAGE_CHANGED", {}, gobj);
|
|
15432
15513
|
retire_marker_windows(gobj);
|
|
@@ -15447,7 +15528,7 @@ function retire_marker_windows(gobj) {
|
|
|
15447
15528
|
/***************************************************************
|
|
15448
15529
|
* Framework Method: Destroy
|
|
15449
15530
|
***************************************************************/
|
|
15450
|
-
function mt_destroy$
|
|
15531
|
+
function mt_destroy$17(gobj) {
|
|
15451
15532
|
let priv = gobj.priv;
|
|
15452
15533
|
if (priv.gesture_hint_timer) {
|
|
15453
15534
|
clearTimeout(priv.gesture_hint_timer);
|
|
@@ -15945,21 +16026,21 @@ function ac_hide$10(gobj, event, kw, src) {
|
|
|
15945
16026
|
/***************************
|
|
15946
16027
|
* FSM
|
|
15947
16028
|
***************************/
|
|
15948
|
-
var gmt$
|
|
15949
|
-
mt_create: mt_create$
|
|
15950
|
-
mt_start: mt_start$
|
|
15951
|
-
mt_stop: mt_stop$
|
|
15952
|
-
mt_destroy: mt_destroy$
|
|
16029
|
+
var gmt$17 = {
|
|
16030
|
+
mt_create: mt_create$17,
|
|
16031
|
+
mt_start: mt_start$17,
|
|
16032
|
+
mt_stop: mt_stop$17,
|
|
16033
|
+
mt_destroy: mt_destroy$17
|
|
15953
16034
|
};
|
|
15954
16035
|
/***************************************************************
|
|
15955
16036
|
* Create the GClass
|
|
15956
16037
|
***************************************************************/
|
|
15957
|
-
function create_gclass$
|
|
15958
|
-
if (__gclass__$
|
|
16038
|
+
function create_gclass$17(gclass_name) {
|
|
16039
|
+
if (__gclass__$17) {
|
|
15959
16040
|
(0, _yuneta_gobj_js.log_error)(`GClass ALREADY created: ${gclass_name}`);
|
|
15960
16041
|
return -1;
|
|
15961
16042
|
}
|
|
15962
|
-
__gclass__$
|
|
16043
|
+
__gclass__$17 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, [
|
|
15963
16044
|
["EV_LANGUAGE_CHANGED", 0],
|
|
15964
16045
|
["EV_EDIT_MAP", 0],
|
|
15965
16046
|
["EV_CONTROL_MAP", 0],
|
|
@@ -15972,7 +16053,7 @@ function create_gclass$16(gclass_name) {
|
|
|
15972
16053
|
], [["ST_IDLE", [
|
|
15973
16054
|
[
|
|
15974
16055
|
"EV_LANGUAGE_CHANGED",
|
|
15975
|
-
ac_language_changed$
|
|
16056
|
+
ac_language_changed$11,
|
|
15976
16057
|
null
|
|
15977
16058
|
],
|
|
15978
16059
|
[
|
|
@@ -16015,15 +16096,15 @@ function create_gclass$16(gclass_name) {
|
|
|
16015
16096
|
ac_hide$10,
|
|
16016
16097
|
null
|
|
16017
16098
|
]
|
|
16018
|
-
]]], gmt$
|
|
16019
|
-
if (!__gclass__$
|
|
16099
|
+
]]], gmt$17, 0, attrs_table$17, PRIVATE_DATA$17, 0, 0, 0, 0);
|
|
16100
|
+
if (!__gclass__$17) return -1;
|
|
16020
16101
|
return 0;
|
|
16021
16102
|
}
|
|
16022
16103
|
/***************************************************************
|
|
16023
16104
|
* Register GClass
|
|
16024
16105
|
***************************************************************/
|
|
16025
16106
|
function register_c_yui_map() {
|
|
16026
|
-
return create_gclass$
|
|
16107
|
+
return create_gclass$17(GCLASS_NAME$17);
|
|
16027
16108
|
}
|
|
16028
16109
|
// src/yui_uplot_ink.js
|
|
16029
16110
|
/***********************************************************************
|
|
@@ -16287,11 +16368,11 @@ function yui_uplot_fmt_date(get_locale) {
|
|
|
16287
16368
|
/***************************************************************
|
|
16288
16369
|
* Constants
|
|
16289
16370
|
***************************************************************/
|
|
16290
|
-
var GCLASS_NAME$
|
|
16371
|
+
var GCLASS_NAME$16 = "C_YUI_UPLOT";
|
|
16291
16372
|
/***************************************************************
|
|
16292
16373
|
* Data
|
|
16293
16374
|
***************************************************************/
|
|
16294
|
-
var attrs_table$
|
|
16375
|
+
var attrs_table$16 = [
|
|
16295
16376
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
16296
16377
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "title", 0, "", "Chart title"),
|
|
16297
16378
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_INTEGER, "width", 0, 800, "Chart width"),
|
|
@@ -16309,18 +16390,18 @@ var attrs_table$15 = [
|
|
|
16309
16390
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_INTEGER, "timeout_idle", 0, 5, "Idle timeout (seconds)"),
|
|
16310
16391
|
(0, _yuneta_gobj_js.SDATA_END)()
|
|
16311
16392
|
];
|
|
16312
|
-
var PRIVATE_DATA$
|
|
16393
|
+
var PRIVATE_DATA$16 = {
|
|
16313
16394
|
theme_observer: null,
|
|
16314
16395
|
lang_shell: null
|
|
16315
16396
|
};
|
|
16316
|
-
var __gclass__$
|
|
16397
|
+
var __gclass__$16 = null;
|
|
16317
16398
|
/******************************
|
|
16318
16399
|
* Framework Methods
|
|
16319
16400
|
******************************/
|
|
16320
16401
|
/***************************************************************
|
|
16321
16402
|
* Framework Method: Create
|
|
16322
16403
|
***************************************************************/
|
|
16323
|
-
function mt_create$
|
|
16404
|
+
function mt_create$16(gobj) {
|
|
16324
16405
|
build_ui$14(gobj);
|
|
16325
16406
|
gobj.priv.theme_observer = yui_watch_theme(gobj);
|
|
16326
16407
|
let subscriber = (0, _yuneta_gobj_js.gobj_read_pointer_attr)(gobj, "subscriber");
|
|
@@ -16330,7 +16411,7 @@ function mt_create$15(gobj) {
|
|
|
16330
16411
|
/***************************************************************
|
|
16331
16412
|
* Framework Method: Start
|
|
16332
16413
|
***************************************************************/
|
|
16333
|
-
function mt_start$
|
|
16414
|
+
function mt_start$16(gobj) {
|
|
16334
16415
|
let priv = gobj.priv;
|
|
16335
16416
|
let shell = yui_shell_of(gobj);
|
|
16336
16417
|
if (shell) {
|
|
@@ -16341,7 +16422,7 @@ function mt_start$15(gobj) {
|
|
|
16341
16422
|
/***************************************************************
|
|
16342
16423
|
* Framework Method: Stop
|
|
16343
16424
|
***************************************************************/
|
|
16344
|
-
function mt_stop$
|
|
16425
|
+
function mt_stop$16(gobj) {
|
|
16345
16426
|
let priv = gobj.priv;
|
|
16346
16427
|
if (priv.lang_shell && !(0, _yuneta_gobj_js.gobj_is_destroying)(priv.lang_shell)) (0, _yuneta_gobj_js.gobj_unsubscribe_event)(priv.lang_shell, "EV_LANGUAGE_CHANGED", {}, gobj);
|
|
16347
16428
|
priv.lang_shell = null;
|
|
@@ -16349,7 +16430,7 @@ function mt_stop$15(gobj) {
|
|
|
16349
16430
|
/***************************************************************
|
|
16350
16431
|
* Framework Method: Destroy
|
|
16351
16432
|
***************************************************************/
|
|
16352
|
-
function mt_destroy$
|
|
16433
|
+
function mt_destroy$16(gobj) {
|
|
16353
16434
|
if (gobj.priv.theme_observer) {
|
|
16354
16435
|
gobj.priv.theme_observer.disconnect();
|
|
16355
16436
|
gobj.priv.theme_observer = null;
|
|
@@ -16510,7 +16591,7 @@ function ac_theme$4(gobj, event, kw, src) {
|
|
|
16510
16591
|
* reading of the legend ask for it when they are written,
|
|
16511
16592
|
* so they are written again.
|
|
16512
16593
|
******************************************************/
|
|
16513
|
-
function ac_language_changed$
|
|
16594
|
+
function ac_language_changed$10(gobj, event, kw, src) {
|
|
16514
16595
|
let uplot = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "uplot");
|
|
16515
16596
|
if (!uplot) return 0;
|
|
16516
16597
|
try {
|
|
@@ -16550,21 +16631,21 @@ function ac_clear$1(gobj, event, kw, src) {
|
|
|
16550
16631
|
/***************************
|
|
16551
16632
|
* FSM
|
|
16552
16633
|
***************************/
|
|
16553
|
-
var gmt$
|
|
16554
|
-
mt_create: mt_create$
|
|
16555
|
-
mt_start: mt_start$
|
|
16556
|
-
mt_stop: mt_stop$
|
|
16557
|
-
mt_destroy: mt_destroy$
|
|
16634
|
+
var gmt$16 = {
|
|
16635
|
+
mt_create: mt_create$16,
|
|
16636
|
+
mt_start: mt_start$16,
|
|
16637
|
+
mt_stop: mt_stop$16,
|
|
16638
|
+
mt_destroy: mt_destroy$16
|
|
16558
16639
|
};
|
|
16559
16640
|
/***************************************************************
|
|
16560
16641
|
* Create the GClass
|
|
16561
16642
|
***************************************************************/
|
|
16562
|
-
function create_gclass$
|
|
16563
|
-
if (__gclass__$
|
|
16643
|
+
function create_gclass$16(gclass_name) {
|
|
16644
|
+
if (__gclass__$16) {
|
|
16564
16645
|
(0, _yuneta_gobj_js.log_error)(`GClass ALREADY created: ${gclass_name}`);
|
|
16565
16646
|
return -1;
|
|
16566
16647
|
}
|
|
16567
|
-
__gclass__$
|
|
16648
|
+
__gclass__$16 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, [
|
|
16568
16649
|
["EV_LOAD_DATA", 0],
|
|
16569
16650
|
["EV_ADD_SERIE", 0],
|
|
16570
16651
|
["EV_DEL_SERIE", 0],
|
|
@@ -16599,18 +16680,18 @@ function create_gclass$15(gclass_name) {
|
|
|
16599
16680
|
],
|
|
16600
16681
|
[
|
|
16601
16682
|
"EV_LANGUAGE_CHANGED",
|
|
16602
|
-
ac_language_changed$
|
|
16683
|
+
ac_language_changed$10,
|
|
16603
16684
|
null
|
|
16604
16685
|
]
|
|
16605
|
-
]]], gmt$
|
|
16606
|
-
if (!__gclass__$
|
|
16686
|
+
]]], gmt$16, 0, attrs_table$16, PRIVATE_DATA$16, 0, 0, 0, 0);
|
|
16687
|
+
if (!__gclass__$16) return -1;
|
|
16607
16688
|
return 0;
|
|
16608
16689
|
}
|
|
16609
16690
|
/***************************************************************
|
|
16610
16691
|
* Register GClass
|
|
16611
16692
|
***************************************************************/
|
|
16612
16693
|
function register_c_yui_uplot() {
|
|
16613
|
-
return create_gclass$
|
|
16694
|
+
return create_gclass$16(GCLASS_NAME$16);
|
|
16614
16695
|
}
|
|
16615
16696
|
// src/yui_toolbar.js
|
|
16616
16697
|
function yui_toolbar(attrs = {}, items = []) {
|
|
@@ -44556,7 +44637,7 @@ function keep_canvas_tab_order(gobj, graph, name_key) {
|
|
|
44556
44637
|
/***************************************************************
|
|
44557
44638
|
* Constants
|
|
44558
44639
|
***************************************************************/
|
|
44559
|
-
var GCLASS_NAME$
|
|
44640
|
+
var GCLASS_NAME$15 = "C_YUI_JSON_GRAPH";
|
|
44560
44641
|
var FOLD_SWALLOWED_EVENTS$1 = [
|
|
44561
44642
|
"pointerdown",
|
|
44562
44643
|
"pointerup",
|
|
@@ -44621,7 +44702,7 @@ function layout_label(key) {
|
|
|
44621
44702
|
/***************************************************************
|
|
44622
44703
|
* Data
|
|
44623
44704
|
***************************************************************/
|
|
44624
|
-
var attrs_table$
|
|
44705
|
+
var attrs_table$15 = [
|
|
44625
44706
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
44626
44707
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "path", 0, "", "Root path label"),
|
|
44627
44708
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_JSON, "json_data", 0, null, "JSON data to visualize"),
|
|
@@ -44632,7 +44713,7 @@ var attrs_table$14 = [
|
|
|
44632
44713
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_INTEGER, "minimap_min_nodes", 0, 10, "Show the minimap from this many cards on (0 = never), as the treedb graph does"),
|
|
44633
44714
|
(0, _yuneta_gobj_js.SDATA_END)()
|
|
44634
44715
|
];
|
|
44635
|
-
var PRIVATE_DATA$
|
|
44716
|
+
var PRIVATE_DATA$15 = {
|
|
44636
44717
|
canvas_id: "",
|
|
44637
44718
|
graph: null,
|
|
44638
44719
|
node_counter: 0,
|
|
@@ -44663,7 +44744,7 @@ var PRIVATE_DATA$14 = {
|
|
|
44663
44744
|
lit_edge_id: "",
|
|
44664
44745
|
cards: null
|
|
44665
44746
|
};
|
|
44666
|
-
var __gclass__$
|
|
44747
|
+
var __gclass__$15 = null;
|
|
44667
44748
|
var __layout_registered__$1 = false;
|
|
44668
44749
|
/***************************************************************
|
|
44669
44750
|
* Type colours, ONE EXPLICIT PALETTE PER THEME and not a
|
|
@@ -44768,7 +44849,7 @@ function type_color(type, dark) {
|
|
|
44768
44849
|
/***************************************************************
|
|
44769
44850
|
* Framework Method: Create
|
|
44770
44851
|
***************************************************************/
|
|
44771
|
-
function mt_create$
|
|
44852
|
+
function mt_create$15(gobj) {
|
|
44772
44853
|
let priv = gobj.priv;
|
|
44773
44854
|
priv.collapsed = /* @__PURE__ */ new Set();
|
|
44774
44855
|
priv.reserved = /* @__PURE__ */ new Map();
|
|
@@ -44791,18 +44872,18 @@ function mt_create$14(gobj) {
|
|
|
44791
44872
|
/***************************************************************
|
|
44792
44873
|
* Framework Method: Start
|
|
44793
44874
|
***************************************************************/
|
|
44794
|
-
function mt_start$
|
|
44875
|
+
function mt_start$15(gobj) {
|
|
44795
44876
|
build_graph$4(gobj);
|
|
44796
44877
|
load_json(gobj);
|
|
44797
44878
|
}
|
|
44798
44879
|
/***************************************************************
|
|
44799
44880
|
* Framework Method: Stop
|
|
44800
44881
|
***************************************************************/
|
|
44801
|
-
function mt_stop$
|
|
44882
|
+
function mt_stop$15(gobj) {}
|
|
44802
44883
|
/***************************************************************
|
|
44803
44884
|
* Framework Method: Destroy
|
|
44804
44885
|
***************************************************************/
|
|
44805
|
-
function mt_destroy$
|
|
44886
|
+
function mt_destroy$15(gobj) {
|
|
44806
44887
|
if (gobj.priv.find_timer) {
|
|
44807
44888
|
clearTimeout(gobj.priv.find_timer);
|
|
44808
44889
|
gobj.priv.find_timer = null;
|
|
@@ -46343,17 +46424,17 @@ function ac_hide$9(gobj, event, kw, src) {
|
|
|
46343
46424
|
/***************************
|
|
46344
46425
|
* FSM
|
|
46345
46426
|
***************************/
|
|
46346
|
-
var gmt$
|
|
46347
|
-
mt_create: mt_create$
|
|
46348
|
-
mt_start: mt_start$
|
|
46349
|
-
mt_stop: mt_stop$
|
|
46350
|
-
mt_destroy: mt_destroy$
|
|
46427
|
+
var gmt$15 = {
|
|
46428
|
+
mt_create: mt_create$15,
|
|
46429
|
+
mt_start: mt_start$15,
|
|
46430
|
+
mt_stop: mt_stop$15,
|
|
46431
|
+
mt_destroy: mt_destroy$15
|
|
46351
46432
|
};
|
|
46352
46433
|
/***************************************************************
|
|
46353
46434
|
* Create the GClass
|
|
46354
46435
|
***************************************************************/
|
|
46355
|
-
function create_gclass$
|
|
46356
|
-
if (__gclass__$
|
|
46436
|
+
function create_gclass$15(gclass_name) {
|
|
46437
|
+
if (__gclass__$15) {
|
|
46357
46438
|
(0, _yuneta_gobj_js.log_error)(`GClass ALREADY created: ${gclass_name}`);
|
|
46358
46439
|
return -1;
|
|
46359
46440
|
}
|
|
@@ -46482,16 +46563,16 @@ function create_gclass$14(gclass_name) {
|
|
|
46482
46563
|
["EV_HIDE", 0],
|
|
46483
46564
|
["EV_JSON_ITEM_CLICKED", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT]
|
|
46484
46565
|
];
|
|
46485
|
-
__gclass__$
|
|
46486
|
-
if (!__gclass__$
|
|
46566
|
+
__gclass__$15 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, event_types, states, gmt$15, 0, attrs_table$15, PRIVATE_DATA$15, 0, 0, 0, 0);
|
|
46567
|
+
if (!__gclass__$15) return -1;
|
|
46487
46568
|
return 0;
|
|
46488
46569
|
}
|
|
46489
46570
|
/***************************************************************
|
|
46490
46571
|
* Register GClass
|
|
46491
46572
|
***************************************************************/
|
|
46492
46573
|
function register_c_yui_json_graph() {
|
|
46493
|
-
if ((0, _yuneta_gobj_js.gclass_find_by_name)(GCLASS_NAME$
|
|
46494
|
-
return create_gclass$
|
|
46574
|
+
if ((0, _yuneta_gobj_js.gclass_find_by_name)(GCLASS_NAME$15, false)) return 0;
|
|
46575
|
+
return create_gclass$15(GCLASS_NAME$15);
|
|
46495
46576
|
}
|
|
46496
46577
|
// src/c_yui_json.js
|
|
46497
46578
|
/***********************************************************************
|
|
@@ -46555,7 +46636,7 @@ function register_c_yui_json_graph() {
|
|
|
46555
46636
|
/***************************************************************
|
|
46556
46637
|
* Constants
|
|
46557
46638
|
***************************************************************/
|
|
46558
|
-
var GCLASS_NAME$
|
|
46639
|
+
var GCLASS_NAME$14 = "C_YUI_JSON";
|
|
46559
46640
|
var MAX_RENDER_ROWS = 5e3;
|
|
46560
46641
|
var MAX_TEXT_CHARS = 2e6;
|
|
46561
46642
|
var MAX_LABEL_CHARS = 40;
|
|
@@ -46580,7 +46661,7 @@ var VIEW_MODE_STORAGE_KEY = "yui_json_view_mode";
|
|
|
46580
46661
|
/***************************************************************
|
|
46581
46662
|
* Data
|
|
46582
46663
|
***************************************************************/
|
|
46583
|
-
var attrs_table$
|
|
46664
|
+
var attrs_table$14 = [
|
|
46584
46665
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
46585
46666
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "title", 0, "", "Optional header title (i18n key)"),
|
|
46586
46667
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_JSON, "json_data", 0, null, "Initial JSON to render (usually already collapsed)"),
|
|
@@ -46588,7 +46669,7 @@ var attrs_table$13 = [
|
|
|
46588
46669
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "$container", 0, null, "HTMLElement root, mounted by the parent"),
|
|
46589
46670
|
(0, _yuneta_gobj_js.SDATA_END)()
|
|
46590
46671
|
];
|
|
46591
|
-
var PRIVATE_DATA$
|
|
46672
|
+
var PRIVATE_DATA$14 = {
|
|
46592
46673
|
root: null,
|
|
46593
46674
|
expanded: null,
|
|
46594
46675
|
pending: null,
|
|
@@ -46606,14 +46687,14 @@ var PRIVATE_DATA$13 = {
|
|
|
46606
46687
|
$mode_btns: null,
|
|
46607
46688
|
lang_shell: null
|
|
46608
46689
|
};
|
|
46609
|
-
var __gclass__$
|
|
46690
|
+
var __gclass__$14 = null;
|
|
46610
46691
|
/******************************
|
|
46611
46692
|
* Framework Methods
|
|
46612
46693
|
******************************/
|
|
46613
46694
|
/***************************************************************
|
|
46614
46695
|
* Framework Method: Create
|
|
46615
46696
|
***************************************************************/
|
|
46616
|
-
function mt_create$
|
|
46697
|
+
function mt_create$14(gobj) {
|
|
46617
46698
|
let priv = gobj.priv;
|
|
46618
46699
|
priv.expanded = /* @__PURE__ */ new Set();
|
|
46619
46700
|
priv.pending = /* @__PURE__ */ new Set();
|
|
@@ -46631,7 +46712,7 @@ function mt_create$13(gobj) {
|
|
|
46631
46712
|
/***************************************************************
|
|
46632
46713
|
* Framework Method: Start
|
|
46633
46714
|
***************************************************************/
|
|
46634
|
-
function mt_start$
|
|
46715
|
+
function mt_start$14(gobj) {
|
|
46635
46716
|
let priv = gobj.priv;
|
|
46636
46717
|
if (priv.root !== null) (0, _yuneta_gobj_js.gobj_change_state)(gobj, "ST_READY");
|
|
46637
46718
|
let shell = yui_shell_of(gobj);
|
|
@@ -46644,7 +46725,7 @@ function mt_start$13(gobj) {
|
|
|
46644
46725
|
/***************************************************************
|
|
46645
46726
|
* Framework Method: Stop
|
|
46646
46727
|
***************************************************************/
|
|
46647
|
-
function mt_stop$
|
|
46728
|
+
function mt_stop$14(gobj) {
|
|
46648
46729
|
let priv = gobj.priv;
|
|
46649
46730
|
if (priv.lang_shell && !(0, _yuneta_gobj_js.gobj_is_destroying)(priv.lang_shell)) (0, _yuneta_gobj_js.gobj_unsubscribe_event)(priv.lang_shell, "EV_LANGUAGE_CHANGED", {}, gobj);
|
|
46650
46731
|
priv.lang_shell = null;
|
|
@@ -46653,7 +46734,7 @@ function mt_stop$13(gobj) {
|
|
|
46653
46734
|
/***************************************************************
|
|
46654
46735
|
* Framework Method: Destroy
|
|
46655
46736
|
***************************************************************/
|
|
46656
|
-
function mt_destroy$
|
|
46737
|
+
function mt_destroy$14(gobj) {
|
|
46657
46738
|
destroy_ui$7(gobj);
|
|
46658
46739
|
}
|
|
46659
46740
|
/***************************
|
|
@@ -46710,6 +46791,8 @@ function build_ui$12(gobj) {
|
|
|
46710
46791
|
priv.$search_ctl = $container.querySelector(".JSON_SEARCH_CONTROL");
|
|
46711
46792
|
priv.$expand_btn = $container.querySelector(".EV_EXPAND_ALL");
|
|
46712
46793
|
priv.$collapse_btn = $container.querySelector(".EV_COLLAPSE_ALL");
|
|
46794
|
+
priv.$collapse_level_btn = $container.querySelector(".EV_COLLAPSE_LEVEL");
|
|
46795
|
+
priv.$expand_level_btn = $container.querySelector(".EV_EXPAND_LEVEL");
|
|
46713
46796
|
priv.$graph = $container.querySelector(".JSON_GRAPH");
|
|
46714
46797
|
priv.$mode_btns = /* @__PURE__ */ new Map();
|
|
46715
46798
|
VIEWS$1.forEach(function(v) {
|
|
@@ -46736,6 +46819,8 @@ function destroy_ui$7(gobj) {
|
|
|
46736
46819
|
priv.$search_ctl = null;
|
|
46737
46820
|
priv.$expand_btn = null;
|
|
46738
46821
|
priv.$collapse_btn = null;
|
|
46822
|
+
priv.$collapse_level_btn = null;
|
|
46823
|
+
priv.$expand_level_btn = null;
|
|
46739
46824
|
priv.$mode_btns = null;
|
|
46740
46825
|
}
|
|
46741
46826
|
/************************************************************
|
|
@@ -46783,7 +46868,7 @@ function make_toolbar$4(gobj) {
|
|
|
46783
46868
|
[yui_toolbar_icon("yi-magnifying-glass")]
|
|
46784
46869
|
]]
|
|
46785
46870
|
]);
|
|
46786
|
-
left_items.push(icon_button$1(gobj, "yi-angles-down", "EV_EXPAND_ALL", "expand loaded"), icon_button$1(gobj, "yi-angles-up", "EV_COLLAPSE_ALL", "collapse all"));
|
|
46871
|
+
left_items.push(icon_button$1(gobj, "yi-angles-down", "EV_EXPAND_ALL", "expand loaded"), icon_button$1(gobj, "yi-angles-up", "EV_COLLAPSE_ALL", "collapse all"), icon_button$1(gobj, "yi-square-minus", "EV_COLLAPSE_LEVEL", "collapse one level"), icon_button$1(gobj, "yi-square-plus", "EV_EXPAND_LEVEL", "expand one level"));
|
|
46787
46872
|
attach_clear($search_control, $search_input);
|
|
46788
46873
|
left_items.push($search_control);
|
|
46789
46874
|
let right_items = [view_mode_switch$1(gobj), icon_button$1(gobj, "yi-copy", "EV_COPY_ALL", "copy json")];
|
|
@@ -46941,7 +47026,9 @@ function apply_view_mode$1(gobj) {
|
|
|
46941
47026
|
[
|
|
46942
47027
|
priv.$search_ctl,
|
|
46943
47028
|
priv.$expand_btn,
|
|
46944
|
-
priv.$collapse_btn
|
|
47029
|
+
priv.$collapse_btn,
|
|
47030
|
+
priv.$collapse_level_btn,
|
|
47031
|
+
priv.$expand_level_btn
|
|
46945
47032
|
].forEach(function($el) {
|
|
46946
47033
|
if ($el) $el.classList.toggle("is-hidden", mode !== "tree");
|
|
46947
47034
|
});
|
|
@@ -47059,7 +47146,7 @@ function render_text(gobj) {
|
|
|
47059
47146
|
return;
|
|
47060
47147
|
}
|
|
47061
47148
|
let dump = json_text_dump(priv.root, MAX_TEXT_CHARS);
|
|
47062
|
-
if (dump.error) (0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$
|
|
47149
|
+
if (dump.error) (0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$14}: cannot dump the document as text: ${dump.error}`);
|
|
47063
47150
|
let $pre = (0, _yuneta_gobj_js.createElement2)([
|
|
47064
47151
|
"pre",
|
|
47065
47152
|
{ class: "JSON_TEXT_BODY" },
|
|
@@ -47412,6 +47499,70 @@ function collect_loaded_paths(value, segments, out) {
|
|
|
47412
47499
|
});
|
|
47413
47500
|
}
|
|
47414
47501
|
}
|
|
47502
|
+
/************************************************************
|
|
47503
|
+
* The entries of a container, as [key, value] pairs: the keys
|
|
47504
|
+
* of an object, the indexes of an array (as strings, the way
|
|
47505
|
+
* a path spells them). None for anything else.
|
|
47506
|
+
************************************************************/
|
|
47507
|
+
function entries_of(value) {
|
|
47508
|
+
let type = json_type(value);
|
|
47509
|
+
if (type === "object") return Object.entries(value);
|
|
47510
|
+
if (type === "array") return value.map((v, i) => [String(i), v]);
|
|
47511
|
+
return [];
|
|
47512
|
+
}
|
|
47513
|
+
/************************************************************
|
|
47514
|
+
* Is it a container the tree can open in place: an object or
|
|
47515
|
+
* an array that is loaded (not a `__collapsed__` sentinel,
|
|
47516
|
+
* which opens through the backend).
|
|
47517
|
+
************************************************************/
|
|
47518
|
+
function is_open_able(value) {
|
|
47519
|
+
if (is_collapsed(value)) return false;
|
|
47520
|
+
let type = json_type(value);
|
|
47521
|
+
return type === "object" || type === "array";
|
|
47522
|
+
}
|
|
47523
|
+
/************************************************************
|
|
47524
|
+
* The shallowest level that has a loaded container still
|
|
47525
|
+
* closed, -1 when every loaded container is open. A level is
|
|
47526
|
+
* the depth of a row: 0 for an entry of the root.
|
|
47527
|
+
************************************************************/
|
|
47528
|
+
function first_closed_level(priv, value, segments) {
|
|
47529
|
+
let level = -1;
|
|
47530
|
+
for (let [k, v] of entries_of(value)) {
|
|
47531
|
+
if (!is_open_able(v)) continue;
|
|
47532
|
+
let child = segments.concat(k);
|
|
47533
|
+
let found = priv.expanded.has(seg_join(child)) ? first_closed_level(priv, v, child) : child.length - 1;
|
|
47534
|
+
if (found >= 0 && (level < 0 || found < level)) level = found;
|
|
47535
|
+
}
|
|
47536
|
+
return level;
|
|
47537
|
+
}
|
|
47538
|
+
/************************************************************
|
|
47539
|
+
* The deepest level with a container open in sight (all its
|
|
47540
|
+
* parents open too), -1 when none is. Only what the reader
|
|
47541
|
+
* sees counts: an open container under a closed one is not
|
|
47542
|
+
* on screen, and folding it would change nothing they see.
|
|
47543
|
+
************************************************************/
|
|
47544
|
+
function deepest_open_level(priv, value, segments) {
|
|
47545
|
+
let level = -1;
|
|
47546
|
+
for (let [k, v] of entries_of(value)) {
|
|
47547
|
+
if (!is_open_able(v)) continue;
|
|
47548
|
+
let child = segments.concat(k);
|
|
47549
|
+
if (!priv.expanded.has(seg_join(child))) continue;
|
|
47550
|
+
level = Math.max(level, child.length - 1, deepest_open_level(priv, v, child));
|
|
47551
|
+
}
|
|
47552
|
+
return level;
|
|
47553
|
+
}
|
|
47554
|
+
/************************************************************
|
|
47555
|
+
* Open every loaded container of the levels up to `level`.
|
|
47556
|
+
************************************************************/
|
|
47557
|
+
function open_levels_up_to(priv, value, segments, level) {
|
|
47558
|
+
for (let [k, v] of entries_of(value)) {
|
|
47559
|
+
if (!is_open_able(v)) continue;
|
|
47560
|
+
let child = segments.concat(k);
|
|
47561
|
+
if (child.length - 1 > level) continue;
|
|
47562
|
+
priv.expanded.add(seg_join(child));
|
|
47563
|
+
open_levels_up_to(priv, v, child, level);
|
|
47564
|
+
}
|
|
47565
|
+
}
|
|
47415
47566
|
/***************************
|
|
47416
47567
|
* Actions
|
|
47417
47568
|
***************************/
|
|
@@ -47467,8 +47618,8 @@ function ac_subtree_error(gobj, event, kw, src) {
|
|
|
47467
47618
|
error,
|
|
47468
47619
|
is_key
|
|
47469
47620
|
});
|
|
47470
|
-
if (kw.by_design) (0, _yuneta_gobj_js.log_warning)(`${GCLASS_NAME$
|
|
47471
|
-
else (0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$
|
|
47621
|
+
if (kw.by_design) (0, _yuneta_gobj_js.log_warning)(`${GCLASS_NAME$14}: subtree not loaded at '${path}': ${error}`);
|
|
47622
|
+
else (0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$14}: subtree load failed at '${path}': ${error}`);
|
|
47472
47623
|
render_view$1(gobj);
|
|
47473
47624
|
return 0;
|
|
47474
47625
|
}
|
|
@@ -47536,6 +47687,36 @@ function ac_collapse_all$1(gobj, event, kw, src) {
|
|
|
47536
47687
|
return 0;
|
|
47537
47688
|
}
|
|
47538
47689
|
/************************************************************
|
|
47690
|
+
* EV_EXPAND_LEVEL — open the next level: every loaded
|
|
47691
|
+
* container of the shallowest level that still has one closed.
|
|
47692
|
+
* The levels above it are all open already, so the tree shows
|
|
47693
|
+
* one level more. A `__collapsed__` sentinel is not opened: it
|
|
47694
|
+
* asks the backend, as with "expand loaded".
|
|
47695
|
+
************************************************************/
|
|
47696
|
+
function ac_expand_level(gobj, event, kw, src) {
|
|
47697
|
+
let priv = gobj.priv;
|
|
47698
|
+
if (priv.root === null || priv.root === void 0) return 0;
|
|
47699
|
+
let level = first_closed_level(priv, priv.root, []);
|
|
47700
|
+
if (level < 0) return 0;
|
|
47701
|
+
open_levels_up_to(priv, priv.root, [], level);
|
|
47702
|
+
render_view$1(gobj);
|
|
47703
|
+
return 0;
|
|
47704
|
+
}
|
|
47705
|
+
/************************************************************
|
|
47706
|
+
* EV_COLLAPSE_LEVEL — fold the deepest level open in sight:
|
|
47707
|
+
* every container open at that level or under it is closed,
|
|
47708
|
+
* so the tree shows one level less.
|
|
47709
|
+
************************************************************/
|
|
47710
|
+
function ac_collapse_level(gobj, event, kw, src) {
|
|
47711
|
+
let priv = gobj.priv;
|
|
47712
|
+
if (priv.root === null || priv.root === void 0) return 0;
|
|
47713
|
+
let level = deepest_open_level(priv, priv.root, []);
|
|
47714
|
+
if (level < 0) return 0;
|
|
47715
|
+
for (let path of Array.from(priv.expanded)) if (seg_split(path).length - 1 >= level) priv.expanded.delete(path);
|
|
47716
|
+
render_view$1(gobj);
|
|
47717
|
+
return 0;
|
|
47718
|
+
}
|
|
47719
|
+
/************************************************************
|
|
47539
47720
|
* EV_COPY_ALL — copy the working document to the clipboard
|
|
47540
47721
|
************************************************************/
|
|
47541
47722
|
function ac_copy_all$1(gobj, event, kw, src) {
|
|
@@ -47543,14 +47724,14 @@ function ac_copy_all$1(gobj, event, kw, src) {
|
|
|
47543
47724
|
if (priv.root === null || priv.root === void 0) return 0;
|
|
47544
47725
|
let dump = json_text_dump(priv.root, 0);
|
|
47545
47726
|
if (dump.error) {
|
|
47546
|
-
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$
|
|
47727
|
+
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$14}: cannot copy the document: ${dump.error}`);
|
|
47547
47728
|
return -1;
|
|
47548
47729
|
}
|
|
47549
47730
|
let text = dump.text;
|
|
47550
47731
|
if (navigator.clipboard && navigator.clipboard.writeText) navigator.clipboard.writeText(text).catch(function(e) {
|
|
47551
|
-
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$
|
|
47732
|
+
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$14}: clipboard write failed: ${e}`);
|
|
47552
47733
|
});
|
|
47553
|
-
else (0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$
|
|
47734
|
+
else (0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$14}: clipboard API unavailable`);
|
|
47554
47735
|
return 0;
|
|
47555
47736
|
}
|
|
47556
47737
|
/************************************************************
|
|
@@ -47566,7 +47747,7 @@ function ac_set_view_mode$1(gobj, event, kw, src) {
|
|
|
47566
47747
|
let mode = kw.mode;
|
|
47567
47748
|
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;
|
|
47568
47749
|
else if (!VIEWS$1.some((v) => v.mode === mode)) {
|
|
47569
|
-
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$
|
|
47750
|
+
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$14}: unknown view_mode '${mode}'`);
|
|
47570
47751
|
return -1;
|
|
47571
47752
|
}
|
|
47572
47753
|
if (mode === current_view_mode$1(gobj)) return 0;
|
|
@@ -47604,7 +47785,7 @@ function ac_json_item_clicked(gobj, event, kw, src) {
|
|
|
47604
47785
|
* and loading the graph again would throw away the reader's
|
|
47605
47786
|
* camera for nothing.
|
|
47606
47787
|
************************************************************/
|
|
47607
|
-
function ac_language_changed$
|
|
47788
|
+
function ac_language_changed$9(gobj, event, kw, src) {
|
|
47608
47789
|
let priv = gobj.priv;
|
|
47609
47790
|
let $container = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "$container");
|
|
47610
47791
|
if ($container) {
|
|
@@ -47638,17 +47819,17 @@ function ac_refresh$5(gobj, event, kw, src) {
|
|
|
47638
47819
|
/***************************
|
|
47639
47820
|
* FSM
|
|
47640
47821
|
***************************/
|
|
47641
|
-
var gmt$
|
|
47642
|
-
mt_create: mt_create$
|
|
47643
|
-
mt_start: mt_start$
|
|
47644
|
-
mt_stop: mt_stop$
|
|
47645
|
-
mt_destroy: mt_destroy$
|
|
47822
|
+
var gmt$14 = {
|
|
47823
|
+
mt_create: mt_create$14,
|
|
47824
|
+
mt_start: mt_start$14,
|
|
47825
|
+
mt_stop: mt_stop$14,
|
|
47826
|
+
mt_destroy: mt_destroy$14
|
|
47646
47827
|
};
|
|
47647
47828
|
/***************************************************************
|
|
47648
47829
|
* Create the GClass
|
|
47649
47830
|
***************************************************************/
|
|
47650
|
-
function create_gclass$
|
|
47651
|
-
if (__gclass__$
|
|
47831
|
+
function create_gclass$14(gclass_name) {
|
|
47832
|
+
if (__gclass__$14) {
|
|
47652
47833
|
(0, _yuneta_gobj_js.log_error)(`GClass ALREADY created: ${gclass_name}`);
|
|
47653
47834
|
return -1;
|
|
47654
47835
|
}
|
|
@@ -47665,7 +47846,7 @@ function create_gclass$13(gclass_name) {
|
|
|
47665
47846
|
],
|
|
47666
47847
|
[
|
|
47667
47848
|
"EV_LANGUAGE_CHANGED",
|
|
47668
|
-
ac_language_changed$
|
|
47849
|
+
ac_language_changed$9,
|
|
47669
47850
|
null
|
|
47670
47851
|
],
|
|
47671
47852
|
[
|
|
@@ -47729,6 +47910,16 @@ function create_gclass$13(gclass_name) {
|
|
|
47729
47910
|
ac_collapse_all$1,
|
|
47730
47911
|
null
|
|
47731
47912
|
],
|
|
47913
|
+
[
|
|
47914
|
+
"EV_EXPAND_LEVEL",
|
|
47915
|
+
ac_expand_level,
|
|
47916
|
+
null
|
|
47917
|
+
],
|
|
47918
|
+
[
|
|
47919
|
+
"EV_COLLAPSE_LEVEL",
|
|
47920
|
+
ac_collapse_level,
|
|
47921
|
+
null
|
|
47922
|
+
],
|
|
47732
47923
|
[
|
|
47733
47924
|
"EV_COPY_ALL",
|
|
47734
47925
|
ac_copy_all$1,
|
|
@@ -47741,7 +47932,7 @@ function create_gclass$13(gclass_name) {
|
|
|
47741
47932
|
],
|
|
47742
47933
|
[
|
|
47743
47934
|
"EV_LANGUAGE_CHANGED",
|
|
47744
|
-
ac_language_changed$
|
|
47935
|
+
ac_language_changed$9,
|
|
47745
47936
|
null
|
|
47746
47937
|
],
|
|
47747
47938
|
[
|
|
@@ -47769,6 +47960,8 @@ function create_gclass$13(gclass_name) {
|
|
|
47769
47960
|
["EV_SEARCH", 0],
|
|
47770
47961
|
["EV_EXPAND_ALL", 0],
|
|
47771
47962
|
["EV_COLLAPSE_ALL", 0],
|
|
47963
|
+
["EV_EXPAND_LEVEL", 0],
|
|
47964
|
+
["EV_COLLAPSE_LEVEL", 0],
|
|
47772
47965
|
["EV_COPY_ALL", 0],
|
|
47773
47966
|
["EV_SET_VIEW_MODE", 0],
|
|
47774
47967
|
["EV_JSON_ITEM_CLICKED", 0],
|
|
@@ -47778,17 +47971,17 @@ function create_gclass$13(gclass_name) {
|
|
|
47778
47971
|
["EV_HIDE", 0],
|
|
47779
47972
|
["EV_EXPAND_PATH", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT | _yuneta_gobj_js.event_flag_t.EVF_NO_WARN_SUBS]
|
|
47780
47973
|
];
|
|
47781
|
-
__gclass__$
|
|
47782
|
-
if (!__gclass__$
|
|
47974
|
+
__gclass__$14 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, event_types, states, gmt$14, 0, attrs_table$14, PRIVATE_DATA$14, 0, 0, 0, 0);
|
|
47975
|
+
if (!__gclass__$14) return -1;
|
|
47783
47976
|
return 0;
|
|
47784
47977
|
}
|
|
47785
47978
|
/***************************************************************
|
|
47786
47979
|
* Register GClass
|
|
47787
47980
|
***************************************************************/
|
|
47788
47981
|
function register_c_yui_json() {
|
|
47789
|
-
if ((0, _yuneta_gobj_js.gclass_find_by_name)(GCLASS_NAME$
|
|
47982
|
+
if ((0, _yuneta_gobj_js.gclass_find_by_name)(GCLASS_NAME$14, false)) return 0;
|
|
47790
47983
|
if (!(0, _yuneta_gobj_js.gclass_find_by_name)("C_YUI_JSON_GRAPH", false)) register_c_yui_json_graph();
|
|
47791
|
-
return create_gclass$
|
|
47984
|
+
return create_gclass$14(GCLASS_NAME$14);
|
|
47792
47985
|
}
|
|
47793
47986
|
// src/c_yui_json_pad.js
|
|
47794
47987
|
/***********************************************************************
|
|
@@ -47872,7 +48065,7 @@ function register_c_yui_json() {
|
|
|
47872
48065
|
/***************************************************************
|
|
47873
48066
|
* Constants
|
|
47874
48067
|
***************************************************************/
|
|
47875
|
-
var GCLASS_NAME$
|
|
48068
|
+
var GCLASS_NAME$13 = "C_YUI_JSON_PAD";
|
|
47876
48069
|
var PANES = ["a", "b"];
|
|
47877
48070
|
var MODE_OF_STATE = {
|
|
47878
48071
|
ST_SINGLE: "single",
|
|
@@ -47908,26 +48101,26 @@ var KIND_TAG = {
|
|
|
47908
48101
|
/***************************************************************
|
|
47909
48102
|
* Data
|
|
47910
48103
|
***************************************************************/
|
|
47911
|
-
var attrs_table$
|
|
48104
|
+
var attrs_table$13 = [
|
|
47912
48105
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
47913
48106
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "storage_key", 0, "yui_json_pad", "localStorage key the two texts and the layout are kept under. Empty: nothing is kept"),
|
|
47914
48107
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "$container", 0, null, "HTMLElement root, mounted by the host"),
|
|
47915
48108
|
(0, _yuneta_gobj_js.SDATA_END)()
|
|
47916
48109
|
];
|
|
47917
|
-
var PRIVATE_DATA$
|
|
48110
|
+
var PRIVATE_DATA$13 = {
|
|
47918
48111
|
panes: null,
|
|
47919
48112
|
$compare: null,
|
|
47920
48113
|
$notice: null,
|
|
47921
48114
|
$diff: null
|
|
47922
48115
|
};
|
|
47923
|
-
var __gclass__$
|
|
48116
|
+
var __gclass__$13 = null;
|
|
47924
48117
|
/******************************
|
|
47925
48118
|
* Framework Methods
|
|
47926
48119
|
******************************/
|
|
47927
48120
|
/***************************************************************
|
|
47928
48121
|
* Framework Method: Create
|
|
47929
48122
|
***************************************************************/
|
|
47930
|
-
function mt_create$
|
|
48123
|
+
function mt_create$13(gobj) {
|
|
47931
48124
|
let priv = gobj.priv;
|
|
47932
48125
|
let subscriber = (0, _yuneta_gobj_js.gobj_read_pointer_attr)(gobj, "subscriber");
|
|
47933
48126
|
if (!subscriber) subscriber = (0, _yuneta_gobj_js.gobj_parent)(gobj);
|
|
@@ -47947,7 +48140,7 @@ function mt_create$12(gobj) {
|
|
|
47947
48140
|
/***************************************************************
|
|
47948
48141
|
* Framework Method: Start
|
|
47949
48142
|
***************************************************************/
|
|
47950
|
-
function mt_start$
|
|
48143
|
+
function mt_start$13(gobj) {
|
|
47951
48144
|
let priv = gobj.priv;
|
|
47952
48145
|
for (const id of PANES) if (priv.panes[id].gobj_json) (0, _yuneta_gobj_js.gobj_start)(priv.panes[id].gobj_json);
|
|
47953
48146
|
restore_state(gobj);
|
|
@@ -47956,7 +48149,7 @@ function mt_start$12(gobj) {
|
|
|
47956
48149
|
/***************************************************************
|
|
47957
48150
|
* Framework Method: Stop
|
|
47958
48151
|
***************************************************************/
|
|
47959
|
-
function mt_stop$
|
|
48152
|
+
function mt_stop$13(gobj) {
|
|
47960
48153
|
let priv = gobj.priv;
|
|
47961
48154
|
save_state(gobj);
|
|
47962
48155
|
for (const id of PANES) {
|
|
@@ -47967,7 +48160,7 @@ function mt_stop$12(gobj) {
|
|
|
47967
48160
|
/***************************************************************
|
|
47968
48161
|
* Framework Method: Destroy
|
|
47969
48162
|
***************************************************************/
|
|
47970
|
-
function mt_destroy$
|
|
48163
|
+
function mt_destroy$13(gobj) {}
|
|
47971
48164
|
/***************************
|
|
47972
48165
|
* Local Methods
|
|
47973
48166
|
***************************/
|
|
@@ -48534,21 +48727,21 @@ function ac_expand_path$1(gobj, event, kw, src) {
|
|
|
48534
48727
|
/***************************************************************
|
|
48535
48728
|
* FSM
|
|
48536
48729
|
***************************************************************/
|
|
48537
|
-
var gmt$
|
|
48538
|
-
mt_create: mt_create$
|
|
48539
|
-
mt_start: mt_start$
|
|
48540
|
-
mt_stop: mt_stop$
|
|
48541
|
-
mt_destroy: mt_destroy$
|
|
48730
|
+
var gmt$13 = {
|
|
48731
|
+
mt_create: mt_create$13,
|
|
48732
|
+
mt_start: mt_start$13,
|
|
48733
|
+
mt_stop: mt_stop$13,
|
|
48734
|
+
mt_destroy: mt_destroy$13
|
|
48542
48735
|
};
|
|
48543
48736
|
/***************************************************************
|
|
48544
48737
|
* Create the GClass
|
|
48545
48738
|
***************************************************************/
|
|
48546
|
-
function create_gclass$
|
|
48547
|
-
if (__gclass__$
|
|
48739
|
+
function create_gclass$13(gclass_name) {
|
|
48740
|
+
if (__gclass__$13) {
|
|
48548
48741
|
(0, _yuneta_gobj_js.log_error)(`GClass ALREADY created: ${gclass_name}`);
|
|
48549
48742
|
return -1;
|
|
48550
48743
|
}
|
|
48551
|
-
__gclass__$
|
|
48744
|
+
__gclass__$13 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, [
|
|
48552
48745
|
["EV_PASTE", 0],
|
|
48553
48746
|
["EV_VIEW", 0],
|
|
48554
48747
|
["EV_CLEAR", 0],
|
|
@@ -48658,8 +48851,8 @@ function create_gclass$12(gclass_name) {
|
|
|
48658
48851
|
null
|
|
48659
48852
|
]
|
|
48660
48853
|
]]
|
|
48661
|
-
], gmt$
|
|
48662
|
-
if (!__gclass__$
|
|
48854
|
+
], gmt$13, 0, attrs_table$13, PRIVATE_DATA$13, 0, 0, 0, 0);
|
|
48855
|
+
if (!__gclass__$13) return -1;
|
|
48663
48856
|
return 0;
|
|
48664
48857
|
}
|
|
48665
48858
|
/***************************************************************
|
|
@@ -48667,7 +48860,7 @@ function create_gclass$12(gclass_name) {
|
|
|
48667
48860
|
***************************************************************/
|
|
48668
48861
|
function register_c_yui_json_pad() {
|
|
48669
48862
|
if (!(0, _yuneta_gobj_js.gclass_find_by_name)("C_YUI_JSON", false)) register_c_yui_json();
|
|
48670
|
-
return create_gclass$
|
|
48863
|
+
return create_gclass$13(GCLASS_NAME$13);
|
|
48671
48864
|
}
|
|
48672
48865
|
// src/gclass_view_model.js
|
|
48673
48866
|
/***********************************************************************
|
|
@@ -49424,7 +49617,7 @@ function own_trace_levels(rows, scope) {
|
|
|
49424
49617
|
/***************************************************************
|
|
49425
49618
|
* Constants
|
|
49426
49619
|
***************************************************************/
|
|
49427
|
-
var GCLASS_NAME$
|
|
49620
|
+
var GCLASS_NAME$12 = "C_YUI_FSM_GRAPH";
|
|
49428
49621
|
var LAYOUTS$1 = {
|
|
49429
49622
|
"dagre-lr": { g6_layout: {
|
|
49430
49623
|
type: "antv-dagre",
|
|
@@ -49452,7 +49645,7 @@ var MIN_READABLE_ZOOM$1 = .5;
|
|
|
49452
49645
|
/***************************************************************
|
|
49453
49646
|
* Data
|
|
49454
49647
|
***************************************************************/
|
|
49455
|
-
var attrs_table$
|
|
49648
|
+
var attrs_table$12 = [
|
|
49456
49649
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
49457
49650
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_JSON, "fsm", 0, null, "The `fsm` block of a gclass view model: {entry_state, states, rows, published, unreachable}"),
|
|
49458
49651
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "current_state", 0, "", "State of the instance the host is showing, lit in the graph"),
|
|
@@ -49462,7 +49655,7 @@ var attrs_table$11 = [
|
|
|
49462
49655
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "layout", 0, DEFAULT_LAYOUT, "Layout key (see LAYOUTS)"),
|
|
49463
49656
|
(0, _yuneta_gobj_js.SDATA_END)()
|
|
49464
49657
|
];
|
|
49465
|
-
var PRIVATE_DATA$
|
|
49658
|
+
var PRIVATE_DATA$12 = {
|
|
49466
49659
|
graph: null,
|
|
49467
49660
|
theme: null,
|
|
49468
49661
|
theme_observer: null,
|
|
@@ -49470,14 +49663,14 @@ var PRIVATE_DATA$11 = {
|
|
|
49470
49663
|
_resize_raf: 0,
|
|
49471
49664
|
$layout_select: null
|
|
49472
49665
|
};
|
|
49473
|
-
var __gclass__$
|
|
49666
|
+
var __gclass__$12 = null;
|
|
49474
49667
|
/******************************
|
|
49475
49668
|
* Framework Methods
|
|
49476
49669
|
******************************/
|
|
49477
49670
|
/***************************************************************
|
|
49478
49671
|
* Framework Method: Create
|
|
49479
49672
|
***************************************************************/
|
|
49480
|
-
function mt_create$
|
|
49673
|
+
function mt_create$12(gobj) {
|
|
49481
49674
|
let priv = gobj.priv;
|
|
49482
49675
|
if (!(0, _yuneta_gobj_js.gobj_read_str_attr)(gobj, "canvas_id")) (0, _yuneta_gobj_js.gobj_write_attr)(gobj, "canvas_id", "fsm_graph_" + (0, _yuneta_gobj_js.clean_name)((0, _yuneta_gobj_js.gobj_name)(gobj)));
|
|
49483
49676
|
priv.theme = yui_theme_now();
|
|
@@ -49489,7 +49682,7 @@ function mt_create$11(gobj) {
|
|
|
49489
49682
|
/***************************************************************
|
|
49490
49683
|
* Framework Method: Start
|
|
49491
49684
|
***************************************************************/
|
|
49492
|
-
function mt_start$
|
|
49685
|
+
function mt_start$12(gobj) {
|
|
49493
49686
|
build_graph$3(gobj);
|
|
49494
49687
|
load_fsm(gobj);
|
|
49495
49688
|
gobj.priv.theme_observer = yui_watch_theme(function() {
|
|
@@ -49499,7 +49692,7 @@ function mt_start$11(gobj) {
|
|
|
49499
49692
|
/***************************************************************
|
|
49500
49693
|
* Framework Method: Stop
|
|
49501
49694
|
***************************************************************/
|
|
49502
|
-
function mt_stop$
|
|
49695
|
+
function mt_stop$12(gobj) {
|
|
49503
49696
|
let priv = gobj.priv;
|
|
49504
49697
|
if (priv.theme_observer) {
|
|
49505
49698
|
try {
|
|
@@ -49529,7 +49722,7 @@ function mt_stop$11(gobj) {
|
|
|
49529
49722
|
/***************************************************************
|
|
49530
49723
|
* Framework Method: Destroy
|
|
49531
49724
|
***************************************************************/
|
|
49532
|
-
function mt_destroy$
|
|
49725
|
+
function mt_destroy$12(gobj) {
|
|
49533
49726
|
destroy_ui$6(gobj);
|
|
49534
49727
|
}
|
|
49535
49728
|
/***************************
|
|
@@ -49903,7 +50096,7 @@ function camera(gobj, what, fn) {
|
|
|
49903
50096
|
************************************************************/
|
|
49904
50097
|
function ac_set_fsm(gobj, event, kw, src) {
|
|
49905
50098
|
if (kw.fsm === void 0) {
|
|
49906
|
-
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$
|
|
50099
|
+
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$12}: EV_SET_FSM without an fsm`);
|
|
49907
50100
|
return -1;
|
|
49908
50101
|
}
|
|
49909
50102
|
(0, _yuneta_gobj_js.gobj_write_attr)(gobj, "fsm", kw.fsm);
|
|
@@ -49918,7 +50111,7 @@ function ac_change_layout$1(gobj, event, kw, src) {
|
|
|
49918
50111
|
let priv = gobj.priv;
|
|
49919
50112
|
let key = kw.layout;
|
|
49920
50113
|
if (!LAYOUTS$1[key]) {
|
|
49921
|
-
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$
|
|
50114
|
+
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$12}: unknown layout '${key}'`);
|
|
49922
50115
|
return -1;
|
|
49923
50116
|
}
|
|
49924
50117
|
(0, _yuneta_gobj_js.gobj_write_attr)(gobj, "layout", key);
|
|
@@ -49975,7 +50168,7 @@ function ac_theme_changed(gobj, event, kw, src) {
|
|
|
49975
50168
|
* inside an innerHTML string, where refresh_language()
|
|
49976
50169
|
* cannot reach.
|
|
49977
50170
|
************************************************************/
|
|
49978
|
-
function ac_language_changed$
|
|
50171
|
+
function ac_language_changed$8(gobj, event, kw, src) {
|
|
49979
50172
|
let $container = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "$container");
|
|
49980
50173
|
if ($container) (0, _yuneta_gobj_js.refresh_language)($container, i18next.t);
|
|
49981
50174
|
load_fsm(gobj);
|
|
@@ -50013,21 +50206,21 @@ function ac_hide$7(gobj, event, kw, src) {
|
|
|
50013
50206
|
/***************************
|
|
50014
50207
|
* FSM
|
|
50015
50208
|
***************************/
|
|
50016
|
-
var gmt$
|
|
50017
|
-
mt_create: mt_create$
|
|
50018
|
-
mt_start: mt_start$
|
|
50019
|
-
mt_stop: mt_stop$
|
|
50020
|
-
mt_destroy: mt_destroy$
|
|
50209
|
+
var gmt$12 = {
|
|
50210
|
+
mt_create: mt_create$12,
|
|
50211
|
+
mt_start: mt_start$12,
|
|
50212
|
+
mt_stop: mt_stop$12,
|
|
50213
|
+
mt_destroy: mt_destroy$12
|
|
50021
50214
|
};
|
|
50022
50215
|
/***************************************************************
|
|
50023
50216
|
* Create the GClass
|
|
50024
50217
|
***************************************************************/
|
|
50025
|
-
function create_gclass$
|
|
50026
|
-
if (__gclass__$
|
|
50218
|
+
function create_gclass$12(gclass_name) {
|
|
50219
|
+
if (__gclass__$12) {
|
|
50027
50220
|
(0, _yuneta_gobj_js.log_error)(`GClass ALREADY created: ${gclass_name}`);
|
|
50028
50221
|
return -1;
|
|
50029
50222
|
}
|
|
50030
|
-
__gclass__$
|
|
50223
|
+
__gclass__$12 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, [
|
|
50031
50224
|
["EV_SET_FSM", 0],
|
|
50032
50225
|
["EV_CHANGE_LAYOUT", 0],
|
|
50033
50226
|
["EV_ZOOM_IN", 0],
|
|
@@ -50082,7 +50275,7 @@ function create_gclass$11(gclass_name) {
|
|
|
50082
50275
|
],
|
|
50083
50276
|
[
|
|
50084
50277
|
"EV_LANGUAGE_CHANGED",
|
|
50085
|
-
ac_language_changed$
|
|
50278
|
+
ac_language_changed$8,
|
|
50086
50279
|
null
|
|
50087
50280
|
],
|
|
50088
50281
|
[
|
|
@@ -50095,16 +50288,16 @@ function create_gclass$11(gclass_name) {
|
|
|
50095
50288
|
ac_hide$7,
|
|
50096
50289
|
null
|
|
50097
50290
|
]
|
|
50098
|
-
]]], gmt$
|
|
50099
|
-
if (!__gclass__$
|
|
50291
|
+
]]], gmt$12, 0, attrs_table$12, PRIVATE_DATA$12, 0, 0, 0, 0);
|
|
50292
|
+
if (!__gclass__$12) return -1;
|
|
50100
50293
|
return 0;
|
|
50101
50294
|
}
|
|
50102
50295
|
/***************************************************************
|
|
50103
50296
|
* Register GClass
|
|
50104
50297
|
***************************************************************/
|
|
50105
50298
|
function register_c_yui_fsm_graph() {
|
|
50106
|
-
if ((0, _yuneta_gobj_js.gclass_find_by_name)(GCLASS_NAME$
|
|
50107
|
-
return create_gclass$
|
|
50299
|
+
if ((0, _yuneta_gobj_js.gclass_find_by_name)(GCLASS_NAME$12, false)) return 0;
|
|
50300
|
+
return create_gclass$12(GCLASS_NAME$12);
|
|
50108
50301
|
}
|
|
50109
50302
|
// src/yui_clipboard.js
|
|
50110
50303
|
/***********************************************************************
|
|
@@ -50287,7 +50480,7 @@ function yui_button_mark_done($button, label) {
|
|
|
50287
50480
|
/***************************************************************
|
|
50288
50481
|
* Constants
|
|
50289
50482
|
***************************************************************/
|
|
50290
|
-
var GCLASS_NAME$
|
|
50483
|
+
var GCLASS_NAME$11 = "C_YUI_GCLASS";
|
|
50291
50484
|
var VIEWS = [{
|
|
50292
50485
|
mode: "zones",
|
|
50293
50486
|
icon: "yi-table",
|
|
@@ -50333,7 +50526,7 @@ var ROWS_CAP = 20;
|
|
|
50333
50526
|
/***************************************************************
|
|
50334
50527
|
* Data
|
|
50335
50528
|
***************************************************************/
|
|
50336
|
-
var attrs_table$
|
|
50529
|
+
var attrs_table$11 = [
|
|
50337
50530
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
50338
50531
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_JSON, "description", 0, null, "The gclass description, as `view-gclass` answers it or `describe_local_gclass()` builds it"),
|
|
50339
50532
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "gclass_name", 0, "", "Name to head the view with when the description carries none"),
|
|
@@ -50344,7 +50537,7 @@ var attrs_table$10 = [
|
|
|
50344
50537
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "$container", 0, null, "HTMLElement root, mounted by the parent"),
|
|
50345
50538
|
(0, _yuneta_gobj_js.SDATA_END)()
|
|
50346
50539
|
];
|
|
50347
|
-
var PRIVATE_DATA$
|
|
50540
|
+
var PRIVATE_DATA$11 = {
|
|
50348
50541
|
model: null,
|
|
50349
50542
|
search: "",
|
|
50350
50543
|
collapsed: null,
|
|
@@ -50358,14 +50551,14 @@ var PRIVATE_DATA$10 = {
|
|
|
50358
50551
|
$mode_btns: null,
|
|
50359
50552
|
lang_shell: null
|
|
50360
50553
|
};
|
|
50361
|
-
var __gclass__$
|
|
50554
|
+
var __gclass__$11 = null;
|
|
50362
50555
|
/******************************
|
|
50363
50556
|
* Framework Methods
|
|
50364
50557
|
******************************/
|
|
50365
50558
|
/***************************************************************
|
|
50366
50559
|
* Framework Method: Create
|
|
50367
50560
|
***************************************************************/
|
|
50368
|
-
function mt_create$
|
|
50561
|
+
function mt_create$11(gobj) {
|
|
50369
50562
|
let priv = gobj.priv;
|
|
50370
50563
|
priv.collapsed = /* @__PURE__ */ new Set();
|
|
50371
50564
|
priv.expanded = /* @__PURE__ */ new Set();
|
|
@@ -50381,7 +50574,7 @@ function mt_create$10(gobj) {
|
|
|
50381
50574
|
/***************************************************************
|
|
50382
50575
|
* Framework Method: Start
|
|
50383
50576
|
***************************************************************/
|
|
50384
|
-
function mt_start$
|
|
50577
|
+
function mt_start$11(gobj) {
|
|
50385
50578
|
let priv = gobj.priv;
|
|
50386
50579
|
let shell = yui_shell_of(gobj);
|
|
50387
50580
|
if (shell) {
|
|
@@ -50393,7 +50586,7 @@ function mt_start$10(gobj) {
|
|
|
50393
50586
|
/***************************************************************
|
|
50394
50587
|
* Framework Method: Stop
|
|
50395
50588
|
***************************************************************/
|
|
50396
|
-
function mt_stop$
|
|
50589
|
+
function mt_stop$11(gobj) {
|
|
50397
50590
|
let priv = gobj.priv;
|
|
50398
50591
|
if (priv.lang_shell && !(0, _yuneta_gobj_js.gobj_is_destroying)(priv.lang_shell)) (0, _yuneta_gobj_js.gobj_unsubscribe_event)(priv.lang_shell, "EV_LANGUAGE_CHANGED", {}, gobj);
|
|
50399
50592
|
priv.lang_shell = null;
|
|
@@ -50402,7 +50595,7 @@ function mt_stop$10(gobj) {
|
|
|
50402
50595
|
/***************************************************************
|
|
50403
50596
|
* Framework Method: Destroy
|
|
50404
50597
|
***************************************************************/
|
|
50405
|
-
function mt_destroy$
|
|
50598
|
+
function mt_destroy$11(gobj) {
|
|
50406
50599
|
destroy_ui$5(gobj);
|
|
50407
50600
|
}
|
|
50408
50601
|
/***************************
|
|
@@ -50864,7 +51057,7 @@ function build_zone(gobj, zone) {
|
|
|
50864
51057
|
body = build_machine(gobj, model.fsm);
|
|
50865
51058
|
break;
|
|
50866
51059
|
default:
|
|
50867
|
-
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$
|
|
51060
|
+
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$11}: unknown zone '${zone.id}'`);
|
|
50868
51061
|
return null;
|
|
50869
51062
|
}
|
|
50870
51063
|
let collapsed = priv.collapsed.has(zone.id);
|
|
@@ -51808,7 +52001,7 @@ function ac_set_description(gobj, event, kw, src) {
|
|
|
51808
52001
|
let priv = gobj.priv;
|
|
51809
52002
|
let description = kw.description;
|
|
51810
52003
|
if (description === void 0) {
|
|
51811
|
-
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$
|
|
52004
|
+
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$11}: EV_SET_DESCRIPTION without a description`);
|
|
51812
52005
|
return -1;
|
|
51813
52006
|
}
|
|
51814
52007
|
(0, _yuneta_gobj_js.gobj_write_attr)(gobj, "description", description === null ? null : (0, _yuneta_gobj_js.json_deep_copy)(description));
|
|
@@ -51823,7 +52016,7 @@ function ac_set_description(gobj, event, kw, src) {
|
|
|
51823
52016
|
function ac_set_view_mode(gobj, event, kw, src) {
|
|
51824
52017
|
let mode = kw.mode;
|
|
51825
52018
|
if (!VIEWS.some((v) => v.mode === mode)) {
|
|
51826
|
-
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$
|
|
52019
|
+
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$11}: unknown view_mode '${mode}'`);
|
|
51827
52020
|
return -1;
|
|
51828
52021
|
}
|
|
51829
52022
|
if (mode === current_view_mode(gobj)) return 0;
|
|
@@ -51839,7 +52032,7 @@ function ac_toggle_zone(gobj, event, kw, src) {
|
|
|
51839
52032
|
let priv = gobj.priv;
|
|
51840
52033
|
let zone = kw.zone;
|
|
51841
52034
|
if (!ZONES.some((z) => z.id === zone)) {
|
|
51842
|
-
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$
|
|
52035
|
+
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$11}: unknown zone '${zone}'`);
|
|
51843
52036
|
return -1;
|
|
51844
52037
|
}
|
|
51845
52038
|
let collapsed = !priv.collapsed.has(zone);
|
|
@@ -51847,7 +52040,7 @@ function ac_toggle_zone(gobj, event, kw, src) {
|
|
|
51847
52040
|
else priv.collapsed.delete(zone);
|
|
51848
52041
|
let $zone = priv.$zones ? priv.$zones.querySelector(`.GCLASS_ZONE[data-zone="${zone}"]`) : null;
|
|
51849
52042
|
if (!$zone) {
|
|
51850
|
-
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$
|
|
52043
|
+
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$11}: zone '${zone}' is not drawn`);
|
|
51851
52044
|
return -1;
|
|
51852
52045
|
}
|
|
51853
52046
|
$zone.classList.toggle("is-collapsed", collapsed);
|
|
@@ -51870,7 +52063,7 @@ function ac_set_machine_view(gobj, event, kw, src) {
|
|
|
51870
52063
|
let priv = gobj.priv;
|
|
51871
52064
|
let mode = kw.mode;
|
|
51872
52065
|
if (!MACHINE_VIEWS.some((v) => v.mode === mode)) {
|
|
51873
|
-
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$
|
|
52066
|
+
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$11}: unknown machine view '${mode}'`);
|
|
51874
52067
|
return -1;
|
|
51875
52068
|
}
|
|
51876
52069
|
if (mode === priv.machine_view) return 0;
|
|
@@ -51907,7 +52100,7 @@ function ac_copy_all(gobj, event, kw, src) {
|
|
|
51907
52100
|
function ac_show_all(gobj, event, kw, src) {
|
|
51908
52101
|
let priv = gobj.priv;
|
|
51909
52102
|
if (!ZONES.some((z) => z.id === kw.zone)) {
|
|
51910
|
-
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$
|
|
52103
|
+
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$11}: show all of no zone '${kw.zone}'`);
|
|
51911
52104
|
return -1;
|
|
51912
52105
|
}
|
|
51913
52106
|
priv.expanded.add(kw.zone);
|
|
@@ -51931,7 +52124,7 @@ function ac_set_traces(gobj, event, kw, src) {
|
|
|
51931
52124
|
************************************************************/
|
|
51932
52125
|
function ac_gclass_trace_toggled(gobj, event, kw, src) {
|
|
51933
52126
|
if (!kw || !kw.level) {
|
|
51934
|
-
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$
|
|
52127
|
+
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$11}: a gclass trace set of no level`);
|
|
51935
52128
|
return -1;
|
|
51936
52129
|
}
|
|
51937
52130
|
return ask_gclass_trace(gobj, [kw.level], !!kw.set);
|
|
@@ -51944,7 +52137,7 @@ function ac_gclass_traces_cleared(gobj, event, kw, src) {
|
|
|
51944
52137
|
let traces = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "traces");
|
|
51945
52138
|
let levels = own_trace_levels(trace_rows({ gobj_trace_level: [] }, traces && traces.info), "gclass");
|
|
51946
52139
|
if (!levels.length) {
|
|
51947
|
-
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$
|
|
52140
|
+
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$11}: no gclass trace to remove`);
|
|
51948
52141
|
return -1;
|
|
51949
52142
|
}
|
|
51950
52143
|
return ask_gclass_trace(gobj, levels, false);
|
|
@@ -51953,7 +52146,7 @@ function ask_gclass_trace(gobj, levels, set) {
|
|
|
51953
52146
|
let priv = gobj.priv;
|
|
51954
52147
|
let traces = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "traces");
|
|
51955
52148
|
if (!traces || typeof traces !== "object") {
|
|
51956
|
-
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$
|
|
52149
|
+
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$11}: a gclass trace set, and no host that can set it`);
|
|
51957
52150
|
return -1;
|
|
51958
52151
|
}
|
|
51959
52152
|
(0, _yuneta_gobj_js.gobj_write_attr)(gobj, "traces", {
|
|
@@ -51993,7 +52186,7 @@ function refresh_zone(gobj, zone_id) {
|
|
|
51993
52186
|
* is. Re-rendering is the only way both end up in the same
|
|
51994
52187
|
* language.
|
|
51995
52188
|
************************************************************/
|
|
51996
|
-
function ac_language_changed$
|
|
52189
|
+
function ac_language_changed$7(gobj, event, kw, src) {
|
|
51997
52190
|
let priv = gobj.priv;
|
|
51998
52191
|
let $container = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "$container");
|
|
51999
52192
|
if ($container) {
|
|
@@ -52028,17 +52221,17 @@ function ac_hide$6(gobj, event, kw, src) {
|
|
|
52028
52221
|
/***************************
|
|
52029
52222
|
* FSM
|
|
52030
52223
|
***************************/
|
|
52031
|
-
var gmt$
|
|
52032
|
-
mt_create: mt_create$
|
|
52033
|
-
mt_start: mt_start$
|
|
52034
|
-
mt_stop: mt_stop$
|
|
52035
|
-
mt_destroy: mt_destroy$
|
|
52224
|
+
var gmt$11 = {
|
|
52225
|
+
mt_create: mt_create$11,
|
|
52226
|
+
mt_start: mt_start$11,
|
|
52227
|
+
mt_stop: mt_stop$11,
|
|
52228
|
+
mt_destroy: mt_destroy$11
|
|
52036
52229
|
};
|
|
52037
52230
|
/***************************************************************
|
|
52038
52231
|
* Create the GClass
|
|
52039
52232
|
***************************************************************/
|
|
52040
|
-
function create_gclass$
|
|
52041
|
-
if (__gclass__$
|
|
52233
|
+
function create_gclass$11(gclass_name) {
|
|
52234
|
+
if (__gclass__$11) {
|
|
52042
52235
|
(0, _yuneta_gobj_js.log_error)(`GClass ALREADY created: ${gclass_name}`);
|
|
52043
52236
|
return -1;
|
|
52044
52237
|
}
|
|
@@ -52075,7 +52268,7 @@ function create_gclass$10(gclass_name) {
|
|
|
52075
52268
|
],
|
|
52076
52269
|
[
|
|
52077
52270
|
"EV_LANGUAGE_CHANGED",
|
|
52078
|
-
ac_language_changed$
|
|
52271
|
+
ac_language_changed$7,
|
|
52079
52272
|
null
|
|
52080
52273
|
],
|
|
52081
52274
|
[
|
|
@@ -52131,17 +52324,17 @@ function create_gclass$10(gclass_name) {
|
|
|
52131
52324
|
["EV_GCLASS_TRACES_CLEARED", 0],
|
|
52132
52325
|
["EV_SET_GCLASS_TRACE", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT]
|
|
52133
52326
|
];
|
|
52134
|
-
__gclass__$
|
|
52135
|
-
if (!__gclass__$
|
|
52327
|
+
__gclass__$11 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, event_types, states, gmt$11, 0, attrs_table$11, PRIVATE_DATA$11, 0, 0, 0, 0);
|
|
52328
|
+
if (!__gclass__$11) return -1;
|
|
52136
52329
|
return 0;
|
|
52137
52330
|
}
|
|
52138
52331
|
/***************************************************************
|
|
52139
52332
|
* Register GClass
|
|
52140
52333
|
***************************************************************/
|
|
52141
52334
|
function register_c_yui_gclass() {
|
|
52142
|
-
if ((0, _yuneta_gobj_js.gclass_find_by_name)(GCLASS_NAME$
|
|
52335
|
+
if ((0, _yuneta_gobj_js.gclass_find_by_name)(GCLASS_NAME$11, false)) return 0;
|
|
52143
52336
|
if (!(0, _yuneta_gobj_js.gclass_find_by_name)("C_YUI_FSM_GRAPH", false)) register_c_yui_fsm_graph();
|
|
52144
|
-
return create_gclass$
|
|
52337
|
+
return create_gclass$11(GCLASS_NAME$11);
|
|
52145
52338
|
}
|
|
52146
52339
|
// src/gclass_describe.js
|
|
52147
52340
|
/***********************************************************************
|
|
@@ -52608,11 +52801,11 @@ function is_mobile$3() {
|
|
|
52608
52801
|
/***************************************************************
|
|
52609
52802
|
* Constants
|
|
52610
52803
|
***************************************************************/
|
|
52611
|
-
var GCLASS_NAME$
|
|
52804
|
+
var GCLASS_NAME$10 = "C_YUI_GOBJ_TREE_JS";
|
|
52612
52805
|
/***************************************************************
|
|
52613
52806
|
* Data
|
|
52614
52807
|
***************************************************************/
|
|
52615
|
-
var attrs_table$
|
|
52808
|
+
var attrs_table$10 = [
|
|
52616
52809
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
52617
52810
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "$container", 0, null, "Container element"),
|
|
52618
52811
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "canvas_id", 0, "", "Canvas ID"),
|
|
@@ -52752,7 +52945,7 @@ function load_view_state(gobj) {
|
|
|
52752
52945
|
let state = (0, _yuneta_gobj_js.kw_get_local_storage_value)(view_store_key(gobj), null, false);
|
|
52753
52946
|
return state && typeof state === "object" ? state : null;
|
|
52754
52947
|
}
|
|
52755
|
-
var PRIVATE_DATA$
|
|
52948
|
+
var PRIVATE_DATA$10 = {
|
|
52756
52949
|
canvas_id: "",
|
|
52757
52950
|
graph: null,
|
|
52758
52951
|
node_counter: 0,
|
|
@@ -52793,7 +52986,7 @@ var PRIVATE_DATA$9 = {
|
|
|
52793
52986
|
viewer_awaits_set: 0,
|
|
52794
52987
|
view_refused: false
|
|
52795
52988
|
};
|
|
52796
|
-
var __gclass__$
|
|
52989
|
+
var __gclass__$10 = null;
|
|
52797
52990
|
var __layout_registered__ = false;
|
|
52798
52991
|
/***************************************************************
|
|
52799
52992
|
* Node colours by role.
|
|
@@ -53061,7 +53254,7 @@ function get_layout_cfg(layout_key) {
|
|
|
53061
53254
|
/***************************************************************
|
|
53062
53255
|
* Framework Method: Create
|
|
53063
53256
|
***************************************************************/
|
|
53064
|
-
function mt_create$
|
|
53257
|
+
function mt_create$10(gobj) {
|
|
53065
53258
|
let priv = gobj.priv;
|
|
53066
53259
|
priv.canvas_id = "gobj-tree-canvas-" + (0, _yuneta_gobj_js.clean_name)((0, _yuneta_gobj_js.gobj_name)(gobj));
|
|
53067
53260
|
(0, _yuneta_gobj_js.gobj_write_str_attr)(gobj, "canvas_id", priv.canvas_id);
|
|
@@ -53085,7 +53278,7 @@ function mt_create$9(gobj) {
|
|
|
53085
53278
|
/***************************************************************
|
|
53086
53279
|
* Framework Method: Start
|
|
53087
53280
|
***************************************************************/
|
|
53088
|
-
function mt_start$
|
|
53281
|
+
function mt_start$10(gobj) {
|
|
53089
53282
|
restore_view_shape(gobj);
|
|
53090
53283
|
let shell = yui_shell_of(gobj);
|
|
53091
53284
|
if (shell) (0, _yuneta_gobj_js.gobj_subscribe_event)(shell, "EV_LANGUAGE_CHANGED", {}, gobj);
|
|
@@ -53095,7 +53288,7 @@ function mt_start$9(gobj) {
|
|
|
53095
53288
|
/***************************************************************
|
|
53096
53289
|
* Framework Method: Stop
|
|
53097
53290
|
***************************************************************/
|
|
53098
|
-
function mt_stop$
|
|
53291
|
+
function mt_stop$10(gobj) {
|
|
53099
53292
|
let priv = gobj.priv;
|
|
53100
53293
|
let shell = yui_shell_of(gobj);
|
|
53101
53294
|
if (shell) (0, _yuneta_gobj_js.gobj_unsubscribe_event)(shell, "EV_LANGUAGE_CHANGED", {}, gobj);
|
|
@@ -53105,7 +53298,7 @@ function mt_stop$9(gobj) {
|
|
|
53105
53298
|
/***************************************************************
|
|
53106
53299
|
* Framework Method: Destroy
|
|
53107
53300
|
***************************************************************/
|
|
53108
|
-
function mt_destroy$
|
|
53301
|
+
function mt_destroy$10(gobj) {
|
|
53109
53302
|
let priv = gobj.priv;
|
|
53110
53303
|
if (priv.theme_observer) {
|
|
53111
53304
|
priv.theme_observer.disconnect();
|
|
@@ -55451,7 +55644,7 @@ function ac_open_yuno_traces(gobj, event, kw, src) {
|
|
|
55451
55644
|
* A rebuild, not a re-translation: the words live inside the
|
|
55452
55645
|
* innerHTML of G6 nodes, where refresh_language() cannot go.
|
|
55453
55646
|
************************************************************/
|
|
55454
|
-
function ac_language_changed$
|
|
55647
|
+
function ac_language_changed$6(gobj, event, kw, src) {
|
|
55455
55648
|
let $container = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "$container");
|
|
55456
55649
|
if ($container) (0, _yuneta_gobj_js.refresh_language)($container, i18next.t);
|
|
55457
55650
|
hide_popover(gobj);
|
|
@@ -55462,17 +55655,17 @@ function ac_language_changed$5(gobj, event, kw, src) {
|
|
|
55462
55655
|
/***************************
|
|
55463
55656
|
* FSM
|
|
55464
55657
|
***************************/
|
|
55465
|
-
var gmt$
|
|
55466
|
-
mt_create: mt_create$
|
|
55467
|
-
mt_start: mt_start$
|
|
55468
|
-
mt_stop: mt_stop$
|
|
55469
|
-
mt_destroy: mt_destroy$
|
|
55658
|
+
var gmt$10 = {
|
|
55659
|
+
mt_create: mt_create$10,
|
|
55660
|
+
mt_start: mt_start$10,
|
|
55661
|
+
mt_stop: mt_stop$10,
|
|
55662
|
+
mt_destroy: mt_destroy$10
|
|
55470
55663
|
};
|
|
55471
55664
|
/***************************************************************
|
|
55472
55665
|
* Create the GClass
|
|
55473
55666
|
***************************************************************/
|
|
55474
|
-
function create_gclass$
|
|
55475
|
-
if (__gclass__$
|
|
55667
|
+
function create_gclass$10(gclass_name) {
|
|
55668
|
+
if (__gclass__$10) {
|
|
55476
55669
|
(0, _yuneta_gobj_js.log_error)(`GClass ALREADY created: ${gclass_name}`);
|
|
55477
55670
|
return -1;
|
|
55478
55671
|
}
|
|
@@ -55574,7 +55767,7 @@ function create_gclass$9(gclass_name) {
|
|
|
55574
55767
|
],
|
|
55575
55768
|
[
|
|
55576
55769
|
"EV_LANGUAGE_CHANGED",
|
|
55577
|
-
ac_language_changed$
|
|
55770
|
+
ac_language_changed$6,
|
|
55578
55771
|
null
|
|
55579
55772
|
],
|
|
55580
55773
|
[
|
|
@@ -55646,15 +55839,15 @@ function create_gclass$9(gclass_name) {
|
|
|
55646
55839
|
["EV_SET_TRACE_LEVEL", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT],
|
|
55647
55840
|
["EV_GCLASS_WANTED", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT]
|
|
55648
55841
|
];
|
|
55649
|
-
__gclass__$
|
|
55650
|
-
if (!__gclass__$
|
|
55842
|
+
__gclass__$10 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, event_types, states, gmt$10, 0, attrs_table$10, PRIVATE_DATA$10, 0, 0, 0, 0);
|
|
55843
|
+
if (!__gclass__$10) return -1;
|
|
55651
55844
|
return 0;
|
|
55652
55845
|
}
|
|
55653
55846
|
/***************************************************************
|
|
55654
55847
|
* Register GClass
|
|
55655
55848
|
***************************************************************/
|
|
55656
55849
|
function register_c_yui_gobj_tree_js() {
|
|
55657
|
-
return create_gclass$
|
|
55850
|
+
return create_gclass$10(GCLASS_NAME$10);
|
|
55658
55851
|
}
|
|
55659
55852
|
// src/c_yui_service_view.js
|
|
55660
55853
|
/***********************************************************************
|
|
@@ -55722,13 +55915,13 @@ function register_c_yui_gobj_tree_js() {
|
|
|
55722
55915
|
/***************************************************************
|
|
55723
55916
|
* Constants
|
|
55724
55917
|
***************************************************************/
|
|
55725
|
-
var GCLASS_NAME$
|
|
55918
|
+
var GCLASS_NAME$9 = "C_YUI_SERVICE_VIEW";
|
|
55726
55919
|
var DEFAULT_TRANSPORT_SERVICE = "__remote_service__";
|
|
55727
55920
|
var DEFAULT_TRANSPORT_ATTR = "gobj_remote_yuno";
|
|
55728
55921
|
/***************************************************************
|
|
55729
55922
|
* Data
|
|
55730
55923
|
***************************************************************/
|
|
55731
|
-
var attrs_table$
|
|
55924
|
+
var attrs_table$9 = [
|
|
55732
55925
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
55733
55926
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "view_gclass", 0, "", "GClass of the hosted view (must be registered)"),
|
|
55734
55927
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "service_name", 0, "", "Service name of the hosted view — UNIQUE per mount"),
|
|
@@ -55738,8 +55931,8 @@ var attrs_table$8 = [
|
|
|
55738
55931
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "$container", 0, null, "Root HTMLElement"),
|
|
55739
55932
|
(0, _yuneta_gobj_js.SDATA_END)()
|
|
55740
55933
|
];
|
|
55741
|
-
var PRIVATE_DATA$
|
|
55742
|
-
var __gclass__$
|
|
55934
|
+
var PRIVATE_DATA$9 = { view: null };
|
|
55935
|
+
var __gclass__$9 = null;
|
|
55743
55936
|
/***************************
|
|
55744
55937
|
* Public helper
|
|
55745
55938
|
***************************/
|
|
@@ -55765,7 +55958,7 @@ var __gclass__$8 = null;
|
|
|
55765
55958
|
************************************************************/
|
|
55766
55959
|
function yui_mount_service_view(host, spec) {
|
|
55767
55960
|
if (!host || !(0, _yuneta_gobj_js.is_gobj)(host) || !spec) {
|
|
55768
|
-
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$
|
|
55961
|
+
(0, _yuneta_gobj_js.log_error)(`${GCLASS_NAME$9}: yui_mount_service_view without host or spec`);
|
|
55769
55962
|
return null;
|
|
55770
55963
|
}
|
|
55771
55964
|
const gclass = spec.gclass;
|
|
@@ -55827,7 +56020,7 @@ function expose_view_container(host, view) {
|
|
|
55827
56020
|
/***************************************************************
|
|
55828
56021
|
* Framework Method: Create
|
|
55829
56022
|
***************************************************************/
|
|
55830
|
-
function mt_create$
|
|
56023
|
+
function mt_create$9(gobj) {
|
|
55831
56024
|
let priv = gobj.priv;
|
|
55832
56025
|
let subscriber = (0, _yuneta_gobj_js.gobj_read_pointer_attr)(gobj, "subscriber");
|
|
55833
56026
|
if (!subscriber) subscriber = (0, _yuneta_gobj_js.gobj_parent)(gobj);
|
|
@@ -55847,14 +56040,14 @@ function mt_create$8(gobj) {
|
|
|
55847
56040
|
* The view starts HERE and not in mt_create, so its first
|
|
55848
56041
|
* request goes out when the host shows it.
|
|
55849
56042
|
***************************************************************/
|
|
55850
|
-
function mt_start$
|
|
56043
|
+
function mt_start$9(gobj) {
|
|
55851
56044
|
const view = gobj.priv.view;
|
|
55852
56045
|
if (view && !(0, _yuneta_gobj_js.gobj_is_running)(view)) (0, _yuneta_gobj_js.gobj_start)(view);
|
|
55853
56046
|
}
|
|
55854
56047
|
/***************************************************************
|
|
55855
56048
|
* Framework Method: Stop
|
|
55856
56049
|
***************************************************************/
|
|
55857
|
-
function mt_stop$
|
|
56050
|
+
function mt_stop$9(gobj) {
|
|
55858
56051
|
const view = gobj.priv.view;
|
|
55859
56052
|
if (view && (0, _yuneta_gobj_js.gobj_is_running)(view)) (0, _yuneta_gobj_js.gobj_stop)(view);
|
|
55860
56053
|
}
|
|
@@ -55865,7 +56058,7 @@ function mt_stop$8(gobj) {
|
|
|
55865
56058
|
* gobj_destroy cascades onto it — and deregisters its name. Do
|
|
55866
56059
|
* NOT destroy it again here.
|
|
55867
56060
|
***************************************************************/
|
|
55868
|
-
function mt_destroy$
|
|
56061
|
+
function mt_destroy$9(gobj) {
|
|
55869
56062
|
let priv = gobj.priv;
|
|
55870
56063
|
priv.view = null;
|
|
55871
56064
|
const $c = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "$container");
|
|
@@ -55887,26 +56080,26 @@ function ac_view_shown(gobj, event, kw, src) {
|
|
|
55887
56080
|
/***************************
|
|
55888
56081
|
* FSM
|
|
55889
56082
|
***************************/
|
|
55890
|
-
var gmt$
|
|
55891
|
-
mt_create: mt_create$
|
|
55892
|
-
mt_start: mt_start$
|
|
55893
|
-
mt_stop: mt_stop$
|
|
55894
|
-
mt_destroy: mt_destroy$
|
|
56083
|
+
var gmt$9 = {
|
|
56084
|
+
mt_create: mt_create$9,
|
|
56085
|
+
mt_start: mt_start$9,
|
|
56086
|
+
mt_stop: mt_stop$9,
|
|
56087
|
+
mt_destroy: mt_destroy$9
|
|
55895
56088
|
};
|
|
55896
|
-
function create_gclass$
|
|
55897
|
-
if (__gclass__$
|
|
56089
|
+
function create_gclass$9(gclass_name) {
|
|
56090
|
+
if (__gclass__$9) {
|
|
55898
56091
|
(0, _yuneta_gobj_js.log_error)(`GClass ALREADY created: ${gclass_name}`);
|
|
55899
56092
|
return -1;
|
|
55900
56093
|
}
|
|
55901
|
-
__gclass__$
|
|
56094
|
+
__gclass__$9 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, [["EV_VIEW_SHOWN", 0]], [["ST_IDLE", [[
|
|
55902
56095
|
"EV_VIEW_SHOWN",
|
|
55903
56096
|
ac_view_shown,
|
|
55904
56097
|
null
|
|
55905
|
-
]]]], gmt$
|
|
55906
|
-
return __gclass__$
|
|
56098
|
+
]]]], gmt$9, 0, attrs_table$9, PRIVATE_DATA$9, 0, 0, 0, 0);
|
|
56099
|
+
return __gclass__$9 ? 0 : -1;
|
|
55907
56100
|
}
|
|
55908
56101
|
function register_c_yui_service_view() {
|
|
55909
|
-
return create_gclass$
|
|
56102
|
+
return create_gclass$9(GCLASS_NAME$9);
|
|
55910
56103
|
}
|
|
55911
56104
|
// src/nav_cards_helpers.js
|
|
55912
56105
|
/***********************************************************************
|
|
@@ -56100,7 +56293,7 @@ function cards_grid_descriptor(items, show_label, badge_of) {
|
|
|
56100
56293
|
/***************************************************************
|
|
56101
56294
|
* Constants
|
|
56102
56295
|
***************************************************************/
|
|
56103
|
-
var GCLASS_NAME$
|
|
56296
|
+
var GCLASS_NAME$8 = "C_YUI_NAV";
|
|
56104
56297
|
var SUPPORTED_LAYOUTS = [
|
|
56105
56298
|
"vertical",
|
|
56106
56299
|
"icon-bar",
|
|
@@ -56118,7 +56311,7 @@ function is_decorative(it) {
|
|
|
56118
56311
|
/***************************************************************
|
|
56119
56312
|
* Attrs
|
|
56120
56313
|
***************************************************************/
|
|
56121
|
-
var attrs_table$
|
|
56314
|
+
var attrs_table$8 = [
|
|
56122
56315
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
56123
56316
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "menu_id", 0, "", "Id of the menu this nav renders"),
|
|
56124
56317
|
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "nav_label", 0, "", "i18n key of the label for aria/heading; falls back to 'navigation'"),
|
|
@@ -56137,18 +56330,18 @@ var attrs_table$7 = [
|
|
|
56137
56330
|
(0, _yuneta_gobj_js.SDATA_END)()
|
|
56138
56331
|
];
|
|
56139
56332
|
var __nav_aria_seq__ = 0;
|
|
56140
|
-
var PRIVATE_DATA$
|
|
56333
|
+
var PRIVATE_DATA$8 = {
|
|
56141
56334
|
click_handler: null,
|
|
56142
56335
|
key_handler: null
|
|
56143
56336
|
};
|
|
56144
|
-
var __gclass__$
|
|
56337
|
+
var __gclass__$8 = null;
|
|
56145
56338
|
/******************************
|
|
56146
56339
|
* Framework Methods
|
|
56147
56340
|
******************************/
|
|
56148
56341
|
/***************************************************************
|
|
56149
56342
|
* Framework Method: Create
|
|
56150
56343
|
***************************************************************/
|
|
56151
|
-
function mt_create$
|
|
56344
|
+
function mt_create$8(gobj) {
|
|
56152
56345
|
let subscriber = (0, _yuneta_gobj_js.gobj_read_pointer_attr)(gobj, "subscriber");
|
|
56153
56346
|
if (!subscriber) subscriber = (0, _yuneta_gobj_js.gobj_parent)(gobj);
|
|
56154
56347
|
(0, _yuneta_gobj_js.gobj_subscribe_event)(gobj, null, {}, subscriber);
|
|
@@ -56157,7 +56350,7 @@ function mt_create$7(gobj) {
|
|
|
56157
56350
|
/***************************************************************
|
|
56158
56351
|
* Framework Method: Start
|
|
56159
56352
|
***************************************************************/
|
|
56160
|
-
function mt_start$
|
|
56353
|
+
function mt_start$8(gobj) {
|
|
56161
56354
|
let shell = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "shell");
|
|
56162
56355
|
if (shell) try {
|
|
56163
56356
|
(0, _yuneta_gobj_js.gobj_subscribe_event)(shell, "EV_ROUTE_CHANGED", {}, gobj);
|
|
@@ -56168,11 +56361,11 @@ function mt_start$7(gobj) {
|
|
|
56168
56361
|
/***************************************************************
|
|
56169
56362
|
* Framework Method: Stop
|
|
56170
56363
|
***************************************************************/
|
|
56171
|
-
function mt_stop$
|
|
56364
|
+
function mt_stop$8(gobj) {}
|
|
56172
56365
|
/***************************************************************
|
|
56173
56366
|
* Framework Method: Destroy
|
|
56174
56367
|
***************************************************************/
|
|
56175
|
-
function mt_destroy$
|
|
56368
|
+
function mt_destroy$8(gobj) {
|
|
56176
56369
|
let $c = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "$container");
|
|
56177
56370
|
let priv = gobj.priv;
|
|
56178
56371
|
if ($c && priv && priv.click_handler) $c.removeEventListener("click", priv.click_handler);
|
|
@@ -56946,14 +57139,14 @@ function ac_route_changed(gobj, event, kw, src) {
|
|
|
56946
57139
|
/***************************************************************
|
|
56947
57140
|
* FSM
|
|
56948
57141
|
***************************************************************/
|
|
56949
|
-
var gmt$
|
|
56950
|
-
mt_create: mt_create$
|
|
56951
|
-
mt_start: mt_start$
|
|
56952
|
-
mt_stop: mt_stop$
|
|
56953
|
-
mt_destroy: mt_destroy$
|
|
57142
|
+
var gmt$8 = {
|
|
57143
|
+
mt_create: mt_create$8,
|
|
57144
|
+
mt_start: mt_start$8,
|
|
57145
|
+
mt_stop: mt_stop$8,
|
|
57146
|
+
mt_destroy: mt_destroy$8
|
|
56954
57147
|
};
|
|
56955
|
-
function create_gclass$
|
|
56956
|
-
if (__gclass__$
|
|
57148
|
+
function create_gclass$8(gclass_name) {
|
|
57149
|
+
if (__gclass__$8) {
|
|
56957
57150
|
(0, _yuneta_gobj_js.log_error)(`GClass ALREADY created: ${gclass_name}`);
|
|
56958
57151
|
return -1;
|
|
56959
57152
|
}
|
|
@@ -56982,11 +57175,503 @@ function create_gclass$7(gclass_name) {
|
|
|
56982
57175
|
["EV_NAV_ITEM_CLOSE", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT | _yuneta_gobj_js.event_flag_t.EVF_PUBLIC_EVENT],
|
|
56983
57176
|
["EV_DRAWER_CLOSE_REQUESTED", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT | _yuneta_gobj_js.event_flag_t.EVF_PUBLIC_EVENT]
|
|
56984
57177
|
];
|
|
56985
|
-
__gclass__$
|
|
56986
|
-
if (!__gclass__$
|
|
57178
|
+
__gclass__$8 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, event_types, states, gmt$8, 0, attrs_table$8, PRIVATE_DATA$8, 0, 0, 0, 0);
|
|
57179
|
+
if (!__gclass__$8) return -1;
|
|
56987
57180
|
return 0;
|
|
56988
57181
|
}
|
|
56989
57182
|
function register_c_yui_nav() {
|
|
57183
|
+
return create_gclass$8(GCLASS_NAME$8);
|
|
57184
|
+
}
|
|
57185
|
+
// src/yui_preferences.js
|
|
57186
|
+
/***********************************************************************
|
|
57187
|
+
* yui_preferences.js
|
|
57188
|
+
*
|
|
57189
|
+
* The Preferences page of an app: what the READER chose for this
|
|
57190
|
+
* browser. Every app shows at least the same three rows, in one
|
|
57191
|
+
* box headed "Appearance":
|
|
57192
|
+
*
|
|
57193
|
+
* Theme light theme | dark theme
|
|
57194
|
+
* Language the app's languages, each in its own words
|
|
57195
|
+
* Navigation stacked strips | back to parent | breadcrumb
|
|
57196
|
+
*
|
|
57197
|
+
* Two ways to use it:
|
|
57198
|
+
*
|
|
57199
|
+
* - C_YUI_PREFERENCES, a whole page: a view the shell mounts at
|
|
57200
|
+
* /preferences. It draws the three rows, then the boxes the app
|
|
57201
|
+
* adds (the `sections` of the setup).
|
|
57202
|
+
* - The parts, for an app whose page has fields of its own with
|
|
57203
|
+
* actions of its own: yui_pref_header(), yui_pref_field(),
|
|
57204
|
+
* yui_pref_segment() and yui_pref_appearance_fields(). The host
|
|
57205
|
+
* declares EV_SET_THEME, EV_SET_LANGUAGE and EV_SET_NAV_MODE
|
|
57206
|
+
* ({value}) and hands them to yui_pref_apply().
|
|
57207
|
+
*
|
|
57208
|
+
* The theme and the language are the APP's: it says once, at start
|
|
57209
|
+
* up, how to read them and how to change them, with
|
|
57210
|
+
* yui_preferences_setup(). The navigation is the shell's
|
|
57211
|
+
* (yui_shell_nav_mode / yui_shell_set_nav_mode): every C_YUI_NODE
|
|
57212
|
+
* tree with no mode of its own follows it, and an app with no tree
|
|
57213
|
+
* keeps the choice for the day it has one.
|
|
57214
|
+
*
|
|
57215
|
+
* A language is SHOWN and NAMED in its own words ("Español", with
|
|
57216
|
+
* its `lang`): a reader looking for their language finds it in the
|
|
57217
|
+
* language they read, and an app of ten languages needs no key per
|
|
57218
|
+
* language name.
|
|
57219
|
+
*
|
|
57220
|
+
* Copyright (c) 2026, ArtGins.
|
|
57221
|
+
* All Rights Reserved.
|
|
57222
|
+
***********************************************************************/
|
|
57223
|
+
/***************************************************************
|
|
57224
|
+
* Constants
|
|
57225
|
+
***************************************************************/
|
|
57226
|
+
var YUI_PREFERENCES_I18N_KEYS = [
|
|
57227
|
+
"light theme",
|
|
57228
|
+
"dark theme",
|
|
57229
|
+
"stacked strips",
|
|
57230
|
+
"back to parent",
|
|
57231
|
+
"breadcrumb"
|
|
57232
|
+
];
|
|
57233
|
+
var THEMES = [{
|
|
57234
|
+
value: "light",
|
|
57235
|
+
key: "light theme",
|
|
57236
|
+
icon: "yi-sun"
|
|
57237
|
+
}, {
|
|
57238
|
+
value: "dark",
|
|
57239
|
+
key: "dark theme",
|
|
57240
|
+
icon: "yi-moon"
|
|
57241
|
+
}];
|
|
57242
|
+
var NAV_MODE_OPTIONS = [
|
|
57243
|
+
{
|
|
57244
|
+
value: "stack",
|
|
57245
|
+
key: "stacked strips",
|
|
57246
|
+
icon: "yi-layer-group"
|
|
57247
|
+
},
|
|
57248
|
+
{
|
|
57249
|
+
value: "back",
|
|
57250
|
+
key: "back to parent",
|
|
57251
|
+
icon: "yi-arrow-left"
|
|
57252
|
+
},
|
|
57253
|
+
{
|
|
57254
|
+
value: "path",
|
|
57255
|
+
key: "breadcrumb",
|
|
57256
|
+
icon: "yi-route"
|
|
57257
|
+
}
|
|
57258
|
+
];
|
|
57259
|
+
var __setup__ = null;
|
|
57260
|
+
/***************************
|
|
57261
|
+
* Setup
|
|
57262
|
+
***************************/
|
|
57263
|
+
/***************************************************************
|
|
57264
|
+
* How this app reads and changes its theme and its language, and
|
|
57265
|
+
* the boxes it adds to the page. Called once, at start up, before
|
|
57266
|
+
* the page is shown:
|
|
57267
|
+
*
|
|
57268
|
+
* yui_preferences_setup({
|
|
57269
|
+
* current_theme: () => "dark",
|
|
57270
|
+
* set_theme: (value) => {...},
|
|
57271
|
+
* languages: [{value: "en", text: "English"},
|
|
57272
|
+
* {value: "es", text: "Español"}],
|
|
57273
|
+
* current_language: () => "es",
|
|
57274
|
+
* set_language: (value) => {...}, // the app's i18next
|
|
57275
|
+
* sections: (gobj) => [...], // optional: boxes
|
|
57276
|
+
* });
|
|
57277
|
+
*
|
|
57278
|
+
* set_language() switches the app's i18next; the shell is told after
|
|
57279
|
+
* it (yui_shell_language_changed), so the app does not do it twice.
|
|
57280
|
+
***************************************************************/
|
|
57281
|
+
function yui_preferences_setup(opts) {
|
|
57282
|
+
let o = opts || {};
|
|
57283
|
+
for (let name of [
|
|
57284
|
+
"current_theme",
|
|
57285
|
+
"set_theme",
|
|
57286
|
+
"current_language",
|
|
57287
|
+
"set_language"
|
|
57288
|
+
]) if (typeof o[name] !== "function") {
|
|
57289
|
+
(0, _yuneta_gobj_js.log_error)(`yui_preferences_setup(): '${name}' must be a function`);
|
|
57290
|
+
return -1;
|
|
57291
|
+
}
|
|
57292
|
+
if (!Array.isArray(o.languages) || o.languages.length === 0) {
|
|
57293
|
+
(0, _yuneta_gobj_js.log_error)(`yui_preferences_setup(): 'languages' must list the app's languages`);
|
|
57294
|
+
return -1;
|
|
57295
|
+
}
|
|
57296
|
+
if (o.sections !== void 0 && typeof o.sections !== "function") {
|
|
57297
|
+
(0, _yuneta_gobj_js.log_error)(`yui_preferences_setup(): 'sections' must be a function`);
|
|
57298
|
+
return -1;
|
|
57299
|
+
}
|
|
57300
|
+
__setup__ = o;
|
|
57301
|
+
return 0;
|
|
57302
|
+
}
|
|
57303
|
+
function setup_of(who) {
|
|
57304
|
+
if (!__setup__) (0, _yuneta_gobj_js.log_error)(`${who}: no yui_preferences_setup() — the app must call it at start up`);
|
|
57305
|
+
return __setup__;
|
|
57306
|
+
}
|
|
57307
|
+
/***************************
|
|
57308
|
+
* Parts of the page
|
|
57309
|
+
***************************/
|
|
57310
|
+
/***************************************************************
|
|
57311
|
+
* The title of the page and the name of its first box.
|
|
57312
|
+
***************************************************************/
|
|
57313
|
+
function yui_pref_header() {
|
|
57314
|
+
return [
|
|
57315
|
+
"div",
|
|
57316
|
+
{
|
|
57317
|
+
class: "PREF_HEADER",
|
|
57318
|
+
style: "margin-bottom:0.5rem;"
|
|
57319
|
+
},
|
|
57320
|
+
[[
|
|
57321
|
+
"h1",
|
|
57322
|
+
{
|
|
57323
|
+
class: "PREF_TITLE title is-3 has-text-link",
|
|
57324
|
+
style: "margin-bottom:0.25rem;",
|
|
57325
|
+
i18n: "preferences"
|
|
57326
|
+
},
|
|
57327
|
+
"preferences"
|
|
57328
|
+
], [
|
|
57329
|
+
"p",
|
|
57330
|
+
{
|
|
57331
|
+
class: "PREF_SUBTITLE subtitle is-6 has-text-grey",
|
|
57332
|
+
style: "margin-bottom:1rem;",
|
|
57333
|
+
i18n: "appearance"
|
|
57334
|
+
},
|
|
57335
|
+
"appearance"
|
|
57336
|
+
]]
|
|
57337
|
+
];
|
|
57338
|
+
}
|
|
57339
|
+
/***************************************************************
|
|
57340
|
+
* A box of fields, as wide as the page reads well.
|
|
57341
|
+
***************************************************************/
|
|
57342
|
+
function yui_pref_box(fields, extra_class) {
|
|
57343
|
+
return [
|
|
57344
|
+
"div",
|
|
57345
|
+
{
|
|
57346
|
+
class: `PREF_BOX box ${extra_class || ""}`,
|
|
57347
|
+
style: "max-width:540px;"
|
|
57348
|
+
},
|
|
57349
|
+
fields
|
|
57350
|
+
];
|
|
57351
|
+
}
|
|
57352
|
+
/***************************************************************
|
|
57353
|
+
* One field: its label over its control.
|
|
57354
|
+
***************************************************************/
|
|
57355
|
+
function yui_pref_field(label_key, control, extra_class) {
|
|
57356
|
+
return [
|
|
57357
|
+
"div",
|
|
57358
|
+
{
|
|
57359
|
+
class: `PREF_FIELD field ${extra_class || ""}`,
|
|
57360
|
+
style: "margin-bottom:1.25rem;"
|
|
57361
|
+
},
|
|
57362
|
+
[[
|
|
57363
|
+
"label",
|
|
57364
|
+
{
|
|
57365
|
+
class: "PREF_LABEL label",
|
|
57366
|
+
i18n: label_key
|
|
57367
|
+
},
|
|
57368
|
+
label_key
|
|
57369
|
+
], [
|
|
57370
|
+
"div",
|
|
57371
|
+
{ class: "PREF_CONTROL control" },
|
|
57372
|
+
[control]
|
|
57373
|
+
]]
|
|
57374
|
+
];
|
|
57375
|
+
}
|
|
57376
|
+
/***************************************************************
|
|
57377
|
+
* A segmented choice: one button per option, the current one
|
|
57378
|
+
* marked (`is-primary is-selected`). An option is
|
|
57379
|
+
*
|
|
57380
|
+
* {value, key, icon} the label and the name are the key
|
|
57381
|
+
* {value, text, lang} the label and the name are the text,
|
|
57382
|
+
* which is data (a language's own name)
|
|
57383
|
+
*
|
|
57384
|
+
* A click sends `event_name` {value} to `gobj`: the click is an OS
|
|
57385
|
+
* notification, the change is an action of the host.
|
|
57386
|
+
***************************************************************/
|
|
57387
|
+
function yui_pref_segment(gobj, event_name, options, current, extra_class) {
|
|
57388
|
+
let buttons = options.map(function(opt) {
|
|
57389
|
+
let active = opt.value === current;
|
|
57390
|
+
let cls = "PREF_SEGMENT_ITEM button" + (active ? " is-primary is-selected" : "");
|
|
57391
|
+
let kids = [];
|
|
57392
|
+
if (opt.icon) kids.push([
|
|
57393
|
+
"span",
|
|
57394
|
+
{ class: "icon" },
|
|
57395
|
+
[yui_toolbar_icon(opt.icon)]
|
|
57396
|
+
]);
|
|
57397
|
+
let attrs = {
|
|
57398
|
+
type: "button",
|
|
57399
|
+
class: cls,
|
|
57400
|
+
"aria-pressed": active ? "true" : "false"
|
|
57401
|
+
};
|
|
57402
|
+
if (opt.key) {
|
|
57403
|
+
kids.push([
|
|
57404
|
+
"span",
|
|
57405
|
+
{
|
|
57406
|
+
class: "PREF_SEGMENT_TEXT",
|
|
57407
|
+
i18n: opt.key
|
|
57408
|
+
},
|
|
57409
|
+
opt.key
|
|
57410
|
+
]);
|
|
57411
|
+
attrs.title = (0, i18next.t)(opt.key);
|
|
57412
|
+
attrs["data-i18n-title"] = opt.key;
|
|
57413
|
+
attrs["aria-label"] = (0, i18next.t)(opt.key);
|
|
57414
|
+
attrs["data-i18n-aria-label"] = opt.key;
|
|
57415
|
+
} else {
|
|
57416
|
+
kids.push([
|
|
57417
|
+
"span",
|
|
57418
|
+
{
|
|
57419
|
+
class: "PREF_SEGMENT_TEXT",
|
|
57420
|
+
lang: opt.lang || opt.value
|
|
57421
|
+
},
|
|
57422
|
+
text_node(opt.text)
|
|
57423
|
+
]);
|
|
57424
|
+
attrs.title = opt.text;
|
|
57425
|
+
attrs["aria-label"] = opt.text;
|
|
57426
|
+
attrs.lang = opt.lang || opt.value;
|
|
57427
|
+
}
|
|
57428
|
+
return [
|
|
57429
|
+
"button",
|
|
57430
|
+
attrs,
|
|
57431
|
+
kids,
|
|
57432
|
+
{ click: function() {
|
|
57433
|
+
(0, _yuneta_gobj_js.gobj_send_event)(gobj, event_name, { value: opt.value }, gobj);
|
|
57434
|
+
} }
|
|
57435
|
+
];
|
|
57436
|
+
});
|
|
57437
|
+
return [
|
|
57438
|
+
"div",
|
|
57439
|
+
{ class: `PREF_SEGMENT buttons has-addons ${extra_class || ""}` },
|
|
57440
|
+
buttons
|
|
57441
|
+
];
|
|
57442
|
+
}
|
|
57443
|
+
/***************************************************************
|
|
57444
|
+
* The three rows every app shows: theme, language, navigation.
|
|
57445
|
+
* Their clicks send EV_SET_THEME / EV_SET_LANGUAGE /
|
|
57446
|
+
* EV_SET_NAV_MODE {value} to `gobj`.
|
|
57447
|
+
***************************************************************/
|
|
57448
|
+
function yui_pref_appearance_fields(gobj) {
|
|
57449
|
+
let setup = setup_of("yui_pref_appearance_fields()");
|
|
57450
|
+
if (!setup) return [];
|
|
57451
|
+
let shell = yui_shell_of(gobj);
|
|
57452
|
+
let languages = setup.languages.map((l) => ({
|
|
57453
|
+
value: l.value,
|
|
57454
|
+
text: l.text,
|
|
57455
|
+
lang: l.value
|
|
57456
|
+
}));
|
|
57457
|
+
return [
|
|
57458
|
+
yui_pref_field("theme", yui_pref_segment(gobj, "EV_SET_THEME", THEMES, setup.current_theme(), "PREF_THEME"), "PREF_THEME_FIELD"),
|
|
57459
|
+
yui_pref_field("language", yui_pref_segment(gobj, "EV_SET_LANGUAGE", languages, setup.current_language(), "PREF_LANGUAGE"), "PREF_LANGUAGE_FIELD"),
|
|
57460
|
+
yui_pref_field("navigation", yui_pref_segment(gobj, "EV_SET_NAV_MODE", NAV_MODE_OPTIONS, shell ? yui_shell_nav_mode(shell) : "stack", "PREF_NAVIGATION"), "PREF_NAVIGATION_FIELD")
|
|
57461
|
+
];
|
|
57462
|
+
}
|
|
57463
|
+
/***************************************************************
|
|
57464
|
+
* The extra boxes of the app (its `sections`), or none.
|
|
57465
|
+
***************************************************************/
|
|
57466
|
+
function yui_pref_sections(gobj) {
|
|
57467
|
+
let setup = setup_of("yui_pref_sections()");
|
|
57468
|
+
if (!setup || !setup.sections) return [];
|
|
57469
|
+
let boxes = setup.sections(gobj);
|
|
57470
|
+
return Array.isArray(boxes) ? boxes : [];
|
|
57471
|
+
}
|
|
57472
|
+
/***************************
|
|
57473
|
+
* Applying a choice
|
|
57474
|
+
***************************/
|
|
57475
|
+
/***************************************************************
|
|
57476
|
+
* Apply one of the three choices: EV_SET_THEME, EV_SET_LANGUAGE
|
|
57477
|
+
* or EV_SET_NAV_MODE, with its {value}. The host calls it from
|
|
57478
|
+
* its action and draws its page again: which option is marked is
|
|
57479
|
+
* markup, which no refresh_language() moves.
|
|
57480
|
+
***************************************************************/
|
|
57481
|
+
function yui_pref_apply(gobj, event, kw) {
|
|
57482
|
+
let setup = setup_of("yui_pref_apply()");
|
|
57483
|
+
if (!setup) return -1;
|
|
57484
|
+
let value = kw && kw.value || "";
|
|
57485
|
+
let shell = yui_shell_of(gobj);
|
|
57486
|
+
switch (event) {
|
|
57487
|
+
case "EV_SET_THEME":
|
|
57488
|
+
setup.set_theme(value);
|
|
57489
|
+
return 0;
|
|
57490
|
+
case "EV_SET_LANGUAGE":
|
|
57491
|
+
setup.set_language(value);
|
|
57492
|
+
if (shell) yui_shell_language_changed(shell);
|
|
57493
|
+
else (0, _yuneta_gobj_js.refresh_language)(document.body, i18next.t);
|
|
57494
|
+
return 0;
|
|
57495
|
+
case "EV_SET_NAV_MODE":
|
|
57496
|
+
if (!shell) {
|
|
57497
|
+
(0, _yuneta_gobj_js.log_error)(`yui_pref_apply(): no shell, the navigation cannot change`);
|
|
57498
|
+
return -1;
|
|
57499
|
+
}
|
|
57500
|
+
return yui_shell_set_nav_mode(shell, value);
|
|
57501
|
+
default:
|
|
57502
|
+
(0, _yuneta_gobj_js.log_error)(`yui_pref_apply(): '${event}' is not a preference`);
|
|
57503
|
+
return -1;
|
|
57504
|
+
}
|
|
57505
|
+
}
|
|
57506
|
+
// src/c_yui_preferences.js
|
|
57507
|
+
/***********************************************************************
|
|
57508
|
+
* c_yui_preferences.js
|
|
57509
|
+
* C_YUI_PREFERENCES GClass.
|
|
57510
|
+
*
|
|
57511
|
+
* The Preferences page of an app, whole: a view the shell
|
|
57512
|
+
* mounts at /preferences (a route target of the app config).
|
|
57513
|
+
*
|
|
57514
|
+
* "/preferences": {"target": {"gclass": "C_YUI_PREFERENCES"}}
|
|
57515
|
+
*
|
|
57516
|
+
* It draws the three rows every app shows -- theme, language,
|
|
57517
|
+
* navigation (yui_preferences.js) -- and then the boxes the
|
|
57518
|
+
* app adds in its yui_preferences_setup(). A press applies at
|
|
57519
|
+
* once and is kept in this browser; the page is drawn again
|
|
57520
|
+
* to mark the new choice, and when the language changes from
|
|
57521
|
+
* elsewhere (the toolbar), because which option is marked is
|
|
57522
|
+
* markup.
|
|
57523
|
+
*
|
|
57524
|
+
* An app whose page has fields with actions of its own keeps
|
|
57525
|
+
* its own view and draws the same rows with the parts of
|
|
57526
|
+
* yui_preferences.js.
|
|
57527
|
+
*
|
|
57528
|
+
* Copyright (c) 2026, ArtGins.
|
|
57529
|
+
* All Rights Reserved.
|
|
57530
|
+
***********************************************************************/
|
|
57531
|
+
/***************************************************************
|
|
57532
|
+
* Constants
|
|
57533
|
+
***************************************************************/
|
|
57534
|
+
var GCLASS_NAME$7 = "C_YUI_PREFERENCES";
|
|
57535
|
+
/***************************************************************
|
|
57536
|
+
* Data
|
|
57537
|
+
***************************************************************/
|
|
57538
|
+
var attrs_table$7 = [
|
|
57539
|
+
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
57540
|
+
(0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "$container", 0, null, "Root HTMLElement (shell view contract)"),
|
|
57541
|
+
(0, _yuneta_gobj_js.SDATA_END)()
|
|
57542
|
+
];
|
|
57543
|
+
var PRIVATE_DATA$7 = { shell: null };
|
|
57544
|
+
var __gclass__$7 = null;
|
|
57545
|
+
/******************************
|
|
57546
|
+
* Framework Methods
|
|
57547
|
+
******************************/
|
|
57548
|
+
/***************************************************************
|
|
57549
|
+
* Framework Method: Create
|
|
57550
|
+
***************************************************************/
|
|
57551
|
+
function mt_create$7(gobj) {
|
|
57552
|
+
let $container = (0, _yuneta_gobj_js.createElement2)([
|
|
57553
|
+
"div",
|
|
57554
|
+
{ class: "C_YUI_PREFERENCES PREF_PAGE p-4" },
|
|
57555
|
+
[]
|
|
57556
|
+
]);
|
|
57557
|
+
(0, _yuneta_gobj_js.gobj_write_attr)(gobj, "$container", $container);
|
|
57558
|
+
let subscriber = (0, _yuneta_gobj_js.gobj_read_pointer_attr)(gobj, "subscriber");
|
|
57559
|
+
if (!subscriber) subscriber = (0, _yuneta_gobj_js.gobj_parent)(gobj);
|
|
57560
|
+
(0, _yuneta_gobj_js.gobj_subscribe_event)(gobj, null, {}, subscriber);
|
|
57561
|
+
}
|
|
57562
|
+
/***************************************************************
|
|
57563
|
+
* Framework Method: Start
|
|
57564
|
+
***************************************************************/
|
|
57565
|
+
function mt_start$7(gobj) {
|
|
57566
|
+
let priv = gobj.priv;
|
|
57567
|
+
priv.shell = yui_shell_of(gobj);
|
|
57568
|
+
if (priv.shell) (0, _yuneta_gobj_js.gobj_subscribe_event)(priv.shell, "EV_LANGUAGE_CHANGED", {}, gobj);
|
|
57569
|
+
render$1(gobj);
|
|
57570
|
+
}
|
|
57571
|
+
/***************************************************************
|
|
57572
|
+
* Framework Method: Stop
|
|
57573
|
+
***************************************************************/
|
|
57574
|
+
function mt_stop$7(gobj) {
|
|
57575
|
+
let priv = gobj.priv;
|
|
57576
|
+
if (priv.shell) {
|
|
57577
|
+
(0, _yuneta_gobj_js.gobj_unsubscribe_event)(priv.shell, "EV_LANGUAGE_CHANGED", {}, gobj);
|
|
57578
|
+
priv.shell = null;
|
|
57579
|
+
}
|
|
57580
|
+
}
|
|
57581
|
+
/***************************************************************
|
|
57582
|
+
* Framework Method: Destroy
|
|
57583
|
+
***************************************************************/
|
|
57584
|
+
function mt_destroy$7(gobj) {
|
|
57585
|
+
let $container = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "$container");
|
|
57586
|
+
if ($container && $container.parentNode) $container.parentNode.removeChild($container);
|
|
57587
|
+
(0, _yuneta_gobj_js.gobj_write_attr)(gobj, "$container", null);
|
|
57588
|
+
}
|
|
57589
|
+
/***************************
|
|
57590
|
+
* Local Methods
|
|
57591
|
+
***************************/
|
|
57592
|
+
/***************************************************************
|
|
57593
|
+
* Draw the page: the header, the box of the three rows, the
|
|
57594
|
+
* boxes of the app.
|
|
57595
|
+
***************************************************************/
|
|
57596
|
+
function render$1(gobj) {
|
|
57597
|
+
let $container = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "$container");
|
|
57598
|
+
if (!$container) return;
|
|
57599
|
+
$container.replaceChildren();
|
|
57600
|
+
$container.appendChild((0, _yuneta_gobj_js.createElement2)(yui_pref_header()));
|
|
57601
|
+
$container.appendChild((0, _yuneta_gobj_js.createElement2)(yui_pref_box(yui_pref_appearance_fields(gobj), "PREF_APPEARANCE")));
|
|
57602
|
+
for (let box of yui_pref_sections(gobj)) $container.appendChild(box && box.nodeType ? box : (0, _yuneta_gobj_js.createElement2)(box));
|
|
57603
|
+
(0, _yuneta_gobj_js.refresh_language)($container, i18next.t);
|
|
57604
|
+
}
|
|
57605
|
+
/***************************
|
|
57606
|
+
* Actions
|
|
57607
|
+
***************************/
|
|
57608
|
+
/***************************************************************
|
|
57609
|
+
* EV_SET_THEME / EV_SET_LANGUAGE / EV_SET_NAV_MODE {value}:
|
|
57610
|
+
* a press on one of the three rows.
|
|
57611
|
+
***************************************************************/
|
|
57612
|
+
function ac_set_preference(gobj, event, kw, src) {
|
|
57613
|
+
let ret = yui_pref_apply(gobj, event, kw);
|
|
57614
|
+
render$1(gobj);
|
|
57615
|
+
return ret;
|
|
57616
|
+
}
|
|
57617
|
+
/***************************************************************
|
|
57618
|
+
* The language changed somewhere else (the toolbar).
|
|
57619
|
+
***************************************************************/
|
|
57620
|
+
function ac_language_changed$5(gobj, event, kw, src) {
|
|
57621
|
+
render$1(gobj);
|
|
57622
|
+
return 0;
|
|
57623
|
+
}
|
|
57624
|
+
/***************************************************************
|
|
57625
|
+
* FSM
|
|
57626
|
+
***************************************************************/
|
|
57627
|
+
var gmt$7 = {
|
|
57628
|
+
mt_create: mt_create$7,
|
|
57629
|
+
mt_start: mt_start$7,
|
|
57630
|
+
mt_stop: mt_stop$7,
|
|
57631
|
+
mt_destroy: mt_destroy$7
|
|
57632
|
+
};
|
|
57633
|
+
/***************************************************************
|
|
57634
|
+
* Create the GClass
|
|
57635
|
+
***************************************************************/
|
|
57636
|
+
function create_gclass$7(gclass_name) {
|
|
57637
|
+
if (__gclass__$7) {
|
|
57638
|
+
(0, _yuneta_gobj_js.log_error)(`GClass ALREADY created: ${gclass_name}`);
|
|
57639
|
+
return -1;
|
|
57640
|
+
}
|
|
57641
|
+
__gclass__$7 = (0, _yuneta_gobj_js.gclass_create)(gclass_name, [
|
|
57642
|
+
["EV_SET_THEME", 0],
|
|
57643
|
+
["EV_SET_LANGUAGE", 0],
|
|
57644
|
+
["EV_SET_NAV_MODE", 0],
|
|
57645
|
+
["EV_LANGUAGE_CHANGED", 0]
|
|
57646
|
+
], [["ST_IDLE", [
|
|
57647
|
+
[
|
|
57648
|
+
"EV_SET_THEME",
|
|
57649
|
+
ac_set_preference,
|
|
57650
|
+
null
|
|
57651
|
+
],
|
|
57652
|
+
[
|
|
57653
|
+
"EV_SET_LANGUAGE",
|
|
57654
|
+
ac_set_preference,
|
|
57655
|
+
null
|
|
57656
|
+
],
|
|
57657
|
+
[
|
|
57658
|
+
"EV_SET_NAV_MODE",
|
|
57659
|
+
ac_set_preference,
|
|
57660
|
+
null
|
|
57661
|
+
],
|
|
57662
|
+
[
|
|
57663
|
+
"EV_LANGUAGE_CHANGED",
|
|
57664
|
+
ac_language_changed$5,
|
|
57665
|
+
null
|
|
57666
|
+
]
|
|
57667
|
+
]]], gmt$7, 0, attrs_table$7, PRIVATE_DATA$7, 0, 0, 0, 0);
|
|
57668
|
+
if (!__gclass__$7) return -1;
|
|
57669
|
+
return 0;
|
|
57670
|
+
}
|
|
57671
|
+
/***************************************************************
|
|
57672
|
+
* Register GClass
|
|
57673
|
+
***************************************************************/
|
|
57674
|
+
function register_c_yui_preferences() {
|
|
56990
57675
|
return create_gclass$7(GCLASS_NAME$7);
|
|
56991
57676
|
}
|
|
56992
57677
|
// src/shell_route_map.js
|
|
@@ -89729,6 +90414,7 @@ exports.USER_ICON_PREFIX = USER_ICON_PREFIX;
|
|
|
89729
90414
|
exports.YUI_FILE_ACCEPT = YUI_FILE_ACCEPT;
|
|
89730
90415
|
exports.YUI_PERIODS = YUI_PERIODS;
|
|
89731
90416
|
exports.YUI_PERIODS_DEFAULT = YUI_PERIODS_DEFAULT;
|
|
90417
|
+
exports.YUI_PREFERENCES_I18N_KEYS = YUI_PREFERENCES_I18N_KEYS;
|
|
89732
90418
|
exports.YUI_ROLLING = YUI_ROLLING;
|
|
89733
90419
|
exports.addClasses = addClasses;
|
|
89734
90420
|
exports.apply_dev_traces = apply_dev_traces;
|
|
@@ -89770,6 +90456,7 @@ exports.register_c_yui_map = register_c_yui_map;
|
|
|
89770
90456
|
exports.register_c_yui_nav = register_c_yui_nav;
|
|
89771
90457
|
exports.register_c_yui_pager = register_c_yui_pager;
|
|
89772
90458
|
exports.register_c_yui_period = register_c_yui_period;
|
|
90459
|
+
exports.register_c_yui_preferences = register_c_yui_preferences;
|
|
89773
90460
|
exports.register_c_yui_schema_editor = register_c_yui_schema_editor;
|
|
89774
90461
|
exports.register_c_yui_service_view = register_c_yui_service_view;
|
|
89775
90462
|
exports.register_c_yui_shell = register_c_yui_shell;
|
|
@@ -89813,6 +90500,14 @@ exports.yui_icons_remove_user = yui_icons_remove_user;
|
|
|
89813
90500
|
exports.yui_icons_set_user = yui_icons_set_user;
|
|
89814
90501
|
exports.yui_is_dark = yui_is_dark;
|
|
89815
90502
|
exports.yui_mount_service_view = yui_mount_service_view;
|
|
90503
|
+
exports.yui_pref_appearance_fields = yui_pref_appearance_fields;
|
|
90504
|
+
exports.yui_pref_apply = yui_pref_apply;
|
|
90505
|
+
exports.yui_pref_box = yui_pref_box;
|
|
90506
|
+
exports.yui_pref_field = yui_pref_field;
|
|
90507
|
+
exports.yui_pref_header = yui_pref_header;
|
|
90508
|
+
exports.yui_pref_sections = yui_pref_sections;
|
|
90509
|
+
exports.yui_pref_segment = yui_pref_segment;
|
|
90510
|
+
exports.yui_preferences_setup = yui_preferences_setup;
|
|
89816
90511
|
exports.yui_shell_close_drawer = yui_shell_close_drawer;
|
|
89817
90512
|
exports.yui_shell_close_dropdown = yui_shell_close_dropdown;
|
|
89818
90513
|
exports.yui_shell_confirm_danger = yui_shell_confirm_danger;
|
|
@@ -89820,6 +90515,7 @@ exports.yui_shell_confirm_ok = yui_shell_confirm_ok;
|
|
|
89820
90515
|
exports.yui_shell_confirm_yesno = yui_shell_confirm_yesno;
|
|
89821
90516
|
exports.yui_shell_confirm_yesnocancel = yui_shell_confirm_yesnocancel;
|
|
89822
90517
|
exports.yui_shell_escape_order = yui_shell_escape_order;
|
|
90518
|
+
exports.yui_shell_nav_mode = yui_shell_nav_mode;
|
|
89823
90519
|
exports.yui_shell_navigate = yui_shell_navigate;
|
|
89824
90520
|
exports.yui_shell_open_drawer = yui_shell_open_drawer;
|
|
89825
90521
|
exports.yui_shell_overlay_dismissed = yui_shell_overlay_dismissed;
|
|
@@ -89831,6 +90527,7 @@ exports.yui_shell_register_overlay = yui_shell_register_overlay;
|
|
|
89831
90527
|
exports.yui_shell_set_avatar_provider = yui_shell_set_avatar_provider;
|
|
89832
90528
|
exports.yui_shell_set_connection_state = yui_shell_set_connection_state;
|
|
89833
90529
|
exports.yui_shell_set_nav_item_badge = yui_shell_set_nav_item_badge;
|
|
90530
|
+
exports.yui_shell_set_nav_mode = yui_shell_set_nav_mode;
|
|
89834
90531
|
exports.yui_shell_set_sub_routes = yui_shell_set_sub_routes;
|
|
89835
90532
|
exports.yui_shell_set_toolbar_item_badge = yui_shell_set_toolbar_item_badge;
|
|
89836
90533
|
exports.yui_shell_set_toolbar_item_icon = yui_shell_set_toolbar_item_icon;
|