@yuneta/gobj-ui 7.29.4 → 7.29.6
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 +27 -27
- package/dist/gobj-ui.cjs.js +16 -16
- package/dist/gobj-ui.es.js +16 -16
- package/package.json +1 -1
- package/src/c_g6_nodes_tree.js +1 -1
- package/src/c_yui_node.js +1 -1
- package/src/c_yui_treedb_topics.js +5 -5
- package/src/c_yui_window.js +1 -1
- package/src/lib_icons.test.js +1 -1
- package/src/named_controls.wiring.test.js +2 -2
- package/src/schema_version_bump.test.js +6 -6
- package/src/shell_dialog_names.wiring.test.js +2 -2
- package/src/treedb_fold_model.js +3 -3
- package/src/treedb_fold_model.test.js +141 -141
- package/src/treedb_layout.js +7 -7
- package/src/vite_plugin_yuneta_html.test.js +4 -4
- package/src/yui_dev.js +1 -1
- package/src/yui_dev_copy.test.js +5 -5
- package/src/yui_gobj_tree_view.js +3 -3
- package/src/yui_icons.css +3 -3
- package/src/yui_row_search.test.js +16 -16
- package/src/yui_shell_last_route.test.js +2 -2
- package/src/yui_tab_routes.test.js +2 -2
package/README.md
CHANGED
|
@@ -1278,7 +1278,7 @@ it used to call `tabulator.setFilter` straight from the DOM handler, where the
|
|
|
1278
1278
|
A hook cell shows how many children the row has (`[5675]`). A click on it
|
|
1279
1279
|
opens the **child topic's table, filtered** to the rows whose fkey names this
|
|
1280
1280
|
row (since `7.23.162`). Above the table, a chip says which filter is on,
|
|
1281
|
-
"filtered by
|
|
1281
|
+
"filtered by models model_a", and its ✕ brings the whole topic back.
|
|
1282
1282
|
|
|
1283
1283
|
The child table already pages, searches, opens a record and exports. Until
|
|
1284
1284
|
`7.23.162` the click opened a popup that listed every child id instead:
|
|
@@ -1290,16 +1290,16 @@ click inside, and the ids did nothing.
|
|
|
1290
1290
|
|
|
1291
1291
|
```c
|
|
1292
1292
|
'devices': {
|
|
1293
|
-
'header': '
|
|
1293
|
+
'header': 'Devices',
|
|
1294
1294
|
'type': 'object',
|
|
1295
1295
|
'flag': ['hook'],
|
|
1296
1296
|
'hook': {
|
|
1297
|
-
'devices': '
|
|
1297
|
+
'devices': 'site'
|
|
1298
1298
|
}
|
|
1299
1299
|
}
|
|
1300
1300
|
```
|
|
1301
1301
|
|
|
1302
|
-
A click on this hook opens `devices`, filtered to the rows whose `
|
|
1302
|
+
A click on this hook opens `devices`, filtered to the rows whose `site`
|
|
1303
1303
|
names the clicked row.
|
|
1304
1304
|
- A hook whose children live in more than one topic asks which one, in the
|
|
1305
1305
|
standardized dialog (Escape, Back and a click outside close it).
|
|
@@ -1319,8 +1319,8 @@ The table asks its host to switch, because the tabs belong to the host:
|
|
|
1319
1319
|
|
|
1320
1320
|
```
|
|
1321
1321
|
C_YUI_TREEDB_TOPIC_WITH_FORM C_YUI_TREEDB_TOPICS
|
|
1322
|
-
EV_OPEN_LINKED {topic_name: "devices", fkey: "
|
|
1323
|
-
parent_topic: "
|
|
1322
|
+
EV_OPEN_LINKED {topic_name: "devices", fkey: "site",
|
|
1323
|
+
parent_topic: "sites", parent_id: "north", hook: "devices"} ──►
|
|
1324
1324
|
select the tab of `devices`
|
|
1325
1325
|
EV_FILTER_BY_PARENT {fkey, parent_topic, parent_id, hook} ◄── to that topic's table
|
|
1326
1326
|
```
|
|
@@ -2086,7 +2086,7 @@ a level or two, with a count on every cut.
|
|
|
2086
2086
|
are the records with no drawable parent, a node's children are the records
|
|
2087
2087
|
whose fkey names it through a hook, and a node is visible when a visible
|
|
2088
2088
|
parent shows it or it is a shown root — the **union**, so a device that hangs
|
|
2089
|
-
from its
|
|
2089
|
+
from its site AND its building is drawn once, under whichever opened
|
|
2090
2090
|
first, and folding one of the two leaves it where the other shows it.
|
|
2091
2091
|
- **`expand_depth`** (default `1` since `7.23.142`, `2` before) is how much
|
|
2092
2092
|
opens on load until the reader steps: the roots alone. **`fold_page_size`** (default `24`) is how many children of
|
|
@@ -2109,14 +2109,14 @@ a level or two, with a count on every cut.
|
|
|
2109
2109
|
JSON graph's fold handles are — G6 never reads the DOM `click`, it builds its
|
|
2110
2110
|
own from the pointer pair.
|
|
2111
2111
|
- **The toolbar's fold STEPPER** (since `7.23.141`; it replaced the *expand
|
|
2112
|
-
all* / *collapse all* pair): `▸` · **`
|
|
2112
|
+
all* / *collapse all* pair): `▸` · **`sites level 2/4`** · `▾`. It walks the
|
|
2113
2113
|
**main tree** one level at a time, the way the frontend view opens one level
|
|
2114
2114
|
per press: level 1 is the main topic's roots (and the loose records the
|
|
2115
2115
|
reader asked to see), each `▾` opens the next level through every topic that
|
|
2116
2116
|
is not hidden, each `▸` folds the deepest one. The readout says what the two
|
|
2117
2117
|
buttons act on — the main topic's swatch and name (data, never translated;
|
|
2118
2118
|
gone on a phone, the numbers stay) and `level N/M` — the WORD as well as the
|
|
2119
|
-
numbers, because the legend chip under it says `
|
|
2119
|
+
numbers, because the legend chip under it says `sites 2/4` too and there it
|
|
2120
2120
|
means records on screen — and a button is disabled at either end. **A level is a floor, not a picture**: stepping down
|
|
2121
2121
|
opens only what is folded above the new level and keeps the pages and pills
|
|
2122
2122
|
already open; stepping up folds from the new level down and touches nothing
|
|
@@ -2158,9 +2158,9 @@ One consumer key came with it: `show more`, the chip's tooltip.
|
|
|
2158
2158
|
### Layouts: what G6 offers, and the two made for a treedb
|
|
2159
2159
|
|
|
2160
2160
|
What a treedb graph IS, once folded: a **forest read top to bottom**. A main
|
|
2161
|
-
topic is a tree (
|
|
2161
|
+
topic is a tree (sites: country, region, campus), the other topics hang
|
|
2162
2162
|
from its nodes through hooks, a record may hang from two parents (a device
|
|
2163
|
-
from its
|
|
2163
|
+
from its site AND its building), and every visible node was reached from a
|
|
2164
2164
|
root. Tens to a few hundred cards on screen, never the store.
|
|
2165
2165
|
|
|
2166
2166
|
G6 5.1 registers these layouts, and this is how each meets that shape:
|
|
@@ -2242,8 +2242,8 @@ module defaults with every config it is given.
|
|
|
2242
2242
|
|
|
2243
2243
|
Both take the **same spanning tree**, chosen deterministically: roots are the
|
|
2244
2244
|
nodes with no incoming edge, in node order; a node belongs to the **first
|
|
2245
|
-
parent that reaches it** in a breadth-first walk (the
|
|
2246
|
-
|
|
2245
|
+
parent that reaches it** in a breadth-first walk (the site, not the
|
|
2246
|
+
building, because the site's column came first) and its other links are
|
|
2247
2247
|
drawn as edges across the tree; the children of a node are ordered by the
|
|
2248
2248
|
**hook they hang from** (the parent's port order — the schema's column order)
|
|
2249
2249
|
and then by node order (record order, the pages' order); a cycle nothing
|
|
@@ -2256,8 +2256,8 @@ node's `data.port_keys`, because a CLOSED node (below) has no ports on its
|
|
|
2256
2256
|
style and its children still sit in schema order — so the adapter needs no
|
|
2257
2257
|
model, only the G6 data.
|
|
2258
2258
|
|
|
2259
|
-
The walks are **iterative**, not recursive: a self-referent hook (a
|
|
2260
|
-
inside a
|
|
2259
|
+
The walks are **iterative**, not recursive: a self-referent hook (a site
|
|
2260
|
+
inside a site inside a site) is as deep as the store says, and the stack is
|
|
2261
2261
|
not. A 20000-node chain is a test.
|
|
2262
2262
|
|
|
2263
2263
|
### The three views of a record: card, pill, figure
|
|
@@ -2507,11 +2507,11 @@ them:
|
|
|
2507
2507
|
|---|---|
|
|
2508
2508
|
| the chip body | **show / hide** the topic. A hidden topic leaves the MODEL, not just the drawing: no card, no pill counts it, no edge reaches it, and whatever hung from it alone has no parent any more. The name is struck through and the count is the total. |
|
|
2509
2509
|
| `★` / `☆` | the **main topic**: the trunk the tree hangs from, always a **hierarchical** topic (hooked to itself); the hollow star appears only on the other hierarchical topics, and only when there are two or more (`7.23.142`). Filled on the main one (a mark, not a button — the main topic cannot be hidden, because hiding the trunk turns everything into roots, which is the pile); hollow on the others, where it moves the star. |
|
|
2510
|
-
| `+N` | the topic's **loose records**: the ones that should hang from the main tree and do not (a device with no
|
|
2510
|
+
| `+N` | the topic's **loose records**: the ones that should hang from the main tree and do not (a device with no site). Counted here, shown only on request. |
|
|
2511
2511
|
| `⌖` | **highlight** the topic — the focus, with `reveal: "all"`. |
|
|
2512
2512
|
|
|
2513
2513
|
**Only a HIERARCHICAL topic can be the main one** (since `7.23.142`): a topic
|
|
2514
|
-
hooked to ITSELF —
|
|
2514
|
+
hooked to ITSELF — sites inside sites, groups inside groups, roles inside
|
|
2515
2515
|
roles (`fold_is_hierarchical()`). A topic that only reaches OTHER topics is a
|
|
2516
2516
|
list with children, and the old rule (*the topic whose hooks reach the most
|
|
2517
2517
|
others*) drew the agent's treedb from `yunos` instead of `realms`. In order:
|
|
@@ -2524,8 +2524,8 @@ others*) drew the agent's treedb from `yunos` instead of `realms`. In order:
|
|
|
2524
2524
|
3. the hierarchical topic that reaches the most other topics, schema order
|
|
2525
2525
|
breaking a tie.
|
|
2526
2526
|
|
|
2527
|
-
In
|
|
2528
|
-
|
|
2527
|
+
In the treedbs of the SDK there is exactly one hierarchical topic each
|
|
2528
|
+
(`roles` in the authorization treedb, `realms` in the agent's), so the mark
|
|
2529
2529
|
only has something to decide once a schema grows a second one. A treedb with
|
|
2530
2530
|
no topic hooked to itself has no trunk, and every topic is a tree of its own.
|
|
2531
2531
|
|
|
@@ -2541,9 +2541,9 @@ What the main topic governs, in `treedb_fold_model.js`:
|
|
|
2541
2541
|
- a topic the schema does not tie to the main one is its own tree, with its
|
|
2542
2542
|
own roots, as before.
|
|
2543
2543
|
|
|
2544
|
-
So *
|
|
2545
|
-
`
|
|
2546
|
-
`users` and `
|
|
2544
|
+
So *sites with their users and nothing else* is hiding `devices`,
|
|
2545
|
+
`buildings` and `models`; *sites with their devices* is hiding
|
|
2546
|
+
`users` and `buildings`. Each combination is a user preference **per
|
|
2547
2547
|
treedb**: `hidden_topics`, `main_topic` and `loose_topics` are `SDF_PERSIST`
|
|
2548
2548
|
attrs of `C_YUI_TREEDB_GRAPH`, saved under the view's name, and both hosts
|
|
2549
2549
|
name the view after the treedb.
|
|
@@ -3400,10 +3400,10 @@ import {open_gobj_tree_view, close_gobj_tree_view}
|
|
|
3400
3400
|
from "@yuneta/gobj-ui/src/yui_gobj_tree_view.js";
|
|
3401
3401
|
|
|
3402
3402
|
priv.view = open_gobj_tree_view(gobj, {
|
|
3403
|
-
name: "
|
|
3403
|
+
name: "gate_probe-7701", /* names the window, the tree and its saved arrangement */
|
|
3404
3404
|
source: "remote",
|
|
3405
|
-
yuno_name: "
|
|
3406
|
-
title_prefix: "
|
|
3405
|
+
yuno_name: "gate_probe^7701", /* before the gclass in the gclass window's title */
|
|
3406
|
+
title_prefix: "gate_probe^7701",
|
|
3407
3407
|
title: "gobj tree", /* an i18n KEY */
|
|
3408
3408
|
$header: priv.$status,
|
|
3409
3409
|
on_close: () => gobj_send_event(gobj, "EV_VIEW_CLOSED", {}, gobj),
|
|
@@ -3489,7 +3489,7 @@ gclass of a **backend** yuno the host passes the answer of `view-gclass` as
|
|
|
3489
3489
|
description describes the CLASS and cannot carry it, so the host supplies it —
|
|
3490
3490
|
the gobj tree passes `node_data.state` — and the machine lights that column.
|
|
3491
3491
|
Omitted, nothing is lit. `opts.instance_name` names that instance beside its
|
|
3492
|
-
state in the head (`
|
|
3492
|
+
state in the head (`tranger_events: ST_IDLE`): a gclass has several, and a
|
|
3493
3493
|
state with no name said whose it was to nobody.
|
|
3494
3494
|
|
|
3495
3495
|
`opts.traces` (`{info, pending}`) says the host can SET this gclass' traces for
|
|
@@ -4451,7 +4451,7 @@ export default { plugins: [ yunetaHtmlPlugin({ defaultTitle: "My App" }) ] };
|
|
|
4451
4451
|
"metadata": {"description": "What the app does"},
|
|
4452
4452
|
"csp_connect_src": [
|
|
4453
4453
|
"_comment: the backend this SPA talks to",
|
|
4454
|
-
"wss://my.host:
|
|
4454
|
+
"wss://my.host:7301",
|
|
4455
4455
|
"https://auth.my.host"
|
|
4456
4456
|
]
|
|
4457
4457
|
}
|
package/dist/gobj-ui.cjs.js
CHANGED
|
@@ -5262,7 +5262,7 @@ function ensure_window_style() {
|
|
|
5262
5262
|
* starts with '<', otherwise a yi-* class name.
|
|
5263
5263
|
*
|
|
5264
5264
|
* The two halves are separate text nodes on purpose. Titles here are
|
|
5265
|
-
* nearly always "<what> · <kind>" — `
|
|
5265
|
+
* nearly always "<what> · <kind>" — `raw_events · keys` — and
|
|
5266
5266
|
* composing that into one string is what makes a title untranslatable:
|
|
5267
5267
|
* `${topic} · ${t("keys")}` is not an i18n key, so i18next answers it
|
|
5268
5268
|
* with itself and it stays in the language it was built in for the
|
|
@@ -59725,10 +59725,10 @@ function ac_set_landing_view(gobj, event, kw, src) {
|
|
|
59725
59725
|
* Back from a topic to WHERE THE READER WAS.
|
|
59726
59726
|
*
|
|
59727
59727
|
* Browser Back and this button must land on the same place, or the
|
|
59728
|
-
* reader cannot tell which one to trust
|
|
59729
|
-
*
|
|
59730
|
-
*
|
|
59731
|
-
*
|
|
59728
|
+
* reader cannot tell which one to trust. The button went to the
|
|
59729
|
+
* landing whatever came before it, so "linked records" from `models`
|
|
59730
|
+
* opened `devices`, and the arrow then showed the cards instead of
|
|
59731
|
+
* `models`, where Back went.
|
|
59732
59732
|
*
|
|
59733
59733
|
* So it asks the shell for the route before this one
|
|
59734
59734
|
* (yui_shell_previous_route): the previous topic, the landing, or the
|
|
@@ -65557,7 +65557,7 @@ function node_label(desc, record) {
|
|
|
65557
65557
|
*
|
|
65558
65558
|
* - A node is visible when SOME visible parent shows it, or it is
|
|
65559
65559
|
* a shown root. A record with two parents (a device hangs from
|
|
65560
|
-
* its
|
|
65560
|
+
* its site AND its building) is drawn ONCE, under whichever
|
|
65561
65561
|
* opened first, and folding one of the two leaves it where the
|
|
65562
65562
|
* other one shows it. The union, never the intersection.
|
|
65563
65563
|
*
|
|
@@ -65772,8 +65772,8 @@ function count_levels(model) {
|
|
|
65772
65772
|
model.levels = deepest;
|
|
65773
65773
|
}
|
|
65774
65774
|
/************************************************************
|
|
65775
|
-
* A HIERARCHICAL topic: one hooked to ITSELF --
|
|
65776
|
-
*
|
|
65775
|
+
* A HIERARCHICAL topic: one hooked to ITSELF -- sites inside
|
|
65776
|
+
* sites, groups inside groups, roles inside roles. It is the
|
|
65777
65777
|
* only kind of topic a tree can hang from: a topic that only
|
|
65778
65778
|
* reaches OTHER topics is a list with children, and making it
|
|
65779
65779
|
* the trunk drew the agent's treedb from `yunos` instead of
|
|
@@ -66117,11 +66117,11 @@ function fold_reveal(model, state, node_key) {
|
|
|
66117
66117
|
* Two layouts made for a treedb, and nothing else.
|
|
66118
66118
|
*
|
|
66119
66119
|
* What a treedb graph IS, once it is folded (treedb_fold_model.js):
|
|
66120
|
-
* a forest read top to bottom. A main topic is a tree (
|
|
66121
|
-
* country, region,
|
|
66122
|
-
*
|
|
66123
|
-
*
|
|
66124
|
-
*
|
|
66120
|
+
* a forest read top to bottom. A main topic is a tree (sites:
|
|
66121
|
+
* country, region, campus), the other topics hang from its nodes
|
|
66122
|
+
* through hooks (buildings, devices, users), a record may hang
|
|
66123
|
+
* from two parents (a device from its site AND its building), and
|
|
66124
|
+
* every visible node was reached from a root.
|
|
66125
66125
|
* Tens to a few hundred cards on screen, never the whole store.
|
|
66126
66126
|
*
|
|
66127
66127
|
* G6's own layouts either do not know that or pay for not knowing:
|
|
@@ -66143,8 +66143,8 @@ function fold_reveal(model, state, node_key) {
|
|
|
66143
66143
|
*
|
|
66144
66144
|
* - roots are the nodes with no incoming edge, in node order;
|
|
66145
66145
|
* - a node belongs to the FIRST parent that reaches it in a
|
|
66146
|
-
* breadth-first walk from the roots -- the
|
|
66147
|
-
*
|
|
66146
|
+
* breadth-first walk from the roots -- the site, not the
|
|
66147
|
+
* building, because the site's column came first -- and the
|
|
66148
66148
|
* other links are drawn as edges across the tree;
|
|
66149
66149
|
* - the children of a node are ordered by the HOOK they hang from
|
|
66150
66150
|
* (the parent's port order, which is the schema's column order)
|
|
@@ -72023,7 +72023,7 @@ function geometry_has_position(g) {
|
|
|
72023
72023
|
* `manual` means "leave every node where it was put", and where none
|
|
72024
72024
|
* was put it means a cascade: get_default_ne_xy() walks x and y
|
|
72025
72025
|
* together, so a treedb opened for the first time was a diagonal pile
|
|
72026
|
-
* of cards —
|
|
72026
|
+
* of cards — a hundred of them on a large one — and the only way out was to
|
|
72027
72027
|
* know to pick a layout by hand. It is the right default only once
|
|
72028
72028
|
* there ARE saved positions to leave alone.
|
|
72029
72029
|
*
|
package/dist/gobj-ui.es.js
CHANGED
|
@@ -5257,7 +5257,7 @@ function ensure_window_style() {
|
|
|
5257
5257
|
* starts with '<', otherwise a yi-* class name.
|
|
5258
5258
|
*
|
|
5259
5259
|
* The two halves are separate text nodes on purpose. Titles here are
|
|
5260
|
-
* nearly always "<what> · <kind>" — `
|
|
5260
|
+
* nearly always "<what> · <kind>" — `raw_events · keys` — and
|
|
5261
5261
|
* composing that into one string is what makes a title untranslatable:
|
|
5262
5262
|
* `${topic} · ${t("keys")}` is not an i18n key, so i18next answers it
|
|
5263
5263
|
* with itself and it stays in the language it was built in for the
|
|
@@ -59720,10 +59720,10 @@ function ac_set_landing_view(gobj, event, kw, src) {
|
|
|
59720
59720
|
* Back from a topic to WHERE THE READER WAS.
|
|
59721
59721
|
*
|
|
59722
59722
|
* Browser Back and this button must land on the same place, or the
|
|
59723
|
-
* reader cannot tell which one to trust
|
|
59724
|
-
*
|
|
59725
|
-
*
|
|
59726
|
-
*
|
|
59723
|
+
* reader cannot tell which one to trust. The button went to the
|
|
59724
|
+
* landing whatever came before it, so "linked records" from `models`
|
|
59725
|
+
* opened `devices`, and the arrow then showed the cards instead of
|
|
59726
|
+
* `models`, where Back went.
|
|
59727
59727
|
*
|
|
59728
59728
|
* So it asks the shell for the route before this one
|
|
59729
59729
|
* (yui_shell_previous_route): the previous topic, the landing, or the
|
|
@@ -65552,7 +65552,7 @@ function node_label(desc, record) {
|
|
|
65552
65552
|
*
|
|
65553
65553
|
* - A node is visible when SOME visible parent shows it, or it is
|
|
65554
65554
|
* a shown root. A record with two parents (a device hangs from
|
|
65555
|
-
* its
|
|
65555
|
+
* its site AND its building) is drawn ONCE, under whichever
|
|
65556
65556
|
* opened first, and folding one of the two leaves it where the
|
|
65557
65557
|
* other one shows it. The union, never the intersection.
|
|
65558
65558
|
*
|
|
@@ -65767,8 +65767,8 @@ function count_levels(model) {
|
|
|
65767
65767
|
model.levels = deepest;
|
|
65768
65768
|
}
|
|
65769
65769
|
/************************************************************
|
|
65770
|
-
* A HIERARCHICAL topic: one hooked to ITSELF --
|
|
65771
|
-
*
|
|
65770
|
+
* A HIERARCHICAL topic: one hooked to ITSELF -- sites inside
|
|
65771
|
+
* sites, groups inside groups, roles inside roles. It is the
|
|
65772
65772
|
* only kind of topic a tree can hang from: a topic that only
|
|
65773
65773
|
* reaches OTHER topics is a list with children, and making it
|
|
65774
65774
|
* the trunk drew the agent's treedb from `yunos` instead of
|
|
@@ -66112,11 +66112,11 @@ function fold_reveal(model, state, node_key) {
|
|
|
66112
66112
|
* Two layouts made for a treedb, and nothing else.
|
|
66113
66113
|
*
|
|
66114
66114
|
* What a treedb graph IS, once it is folded (treedb_fold_model.js):
|
|
66115
|
-
* a forest read top to bottom. A main topic is a tree (
|
|
66116
|
-
* country, region,
|
|
66117
|
-
*
|
|
66118
|
-
*
|
|
66119
|
-
*
|
|
66115
|
+
* a forest read top to bottom. A main topic is a tree (sites:
|
|
66116
|
+
* country, region, campus), the other topics hang from its nodes
|
|
66117
|
+
* through hooks (buildings, devices, users), a record may hang
|
|
66118
|
+
* from two parents (a device from its site AND its building), and
|
|
66119
|
+
* every visible node was reached from a root.
|
|
66120
66120
|
* Tens to a few hundred cards on screen, never the whole store.
|
|
66121
66121
|
*
|
|
66122
66122
|
* G6's own layouts either do not know that or pay for not knowing:
|
|
@@ -66138,8 +66138,8 @@ function fold_reveal(model, state, node_key) {
|
|
|
66138
66138
|
*
|
|
66139
66139
|
* - roots are the nodes with no incoming edge, in node order;
|
|
66140
66140
|
* - a node belongs to the FIRST parent that reaches it in a
|
|
66141
|
-
* breadth-first walk from the roots -- the
|
|
66142
|
-
*
|
|
66141
|
+
* breadth-first walk from the roots -- the site, not the
|
|
66142
|
+
* building, because the site's column came first -- and the
|
|
66143
66143
|
* other links are drawn as edges across the tree;
|
|
66144
66144
|
* - the children of a node are ordered by the HOOK they hang from
|
|
66145
66145
|
* (the parent's port order, which is the schema's column order)
|
|
@@ -72018,7 +72018,7 @@ function geometry_has_position(g) {
|
|
|
72018
72018
|
* `manual` means "leave every node where it was put", and where none
|
|
72019
72019
|
* was put it means a cascade: get_default_ne_xy() walks x and y
|
|
72020
72020
|
* together, so a treedb opened for the first time was a diagonal pile
|
|
72021
|
-
* of cards —
|
|
72021
|
+
* of cards — a hundred of them on a large one — and the only way out was to
|
|
72022
72022
|
* know to pick a layout by hand. It is the right default only once
|
|
72023
72023
|
* there ARE saved positions to leave alone.
|
|
72024
72024
|
*
|
package/package.json
CHANGED
package/src/c_g6_nodes_tree.js
CHANGED
|
@@ -7997,7 +7997,7 @@ function geometry_has_position(g)
|
|
|
7997
7997
|
* `manual` means "leave every node where it was put", and where none
|
|
7998
7998
|
* was put it means a cascade: get_default_ne_xy() walks x and y
|
|
7999
7999
|
* together, so a treedb opened for the first time was a diagonal pile
|
|
8000
|
-
* of cards —
|
|
8000
|
+
* of cards — a hundred of them on a large one — and the only way out was to
|
|
8001
8001
|
* know to pick a layout by hand. It is the right default only once
|
|
8002
8002
|
* there ARE saved positions to leave alone.
|
|
8003
8003
|
*
|
package/src/c_yui_node.js
CHANGED
|
@@ -605,7 +605,7 @@ function walk_path(node, path)
|
|
|
605
605
|
* its zone navs are appended into shell zones, outside this
|
|
606
606
|
* node's own $container. Neither pass reaches them, so without
|
|
607
607
|
* this every strip renders its raw i18n key: `treedb`,
|
|
608
|
-
* `
|
|
608
|
+
* `main database`, `data` in lower-case English next to a
|
|
609
609
|
* translated menu — which reads as a MISSING key and sent more
|
|
610
610
|
* than one person looking for the wrong bug.
|
|
611
611
|
*
|
|
@@ -636,7 +636,7 @@ function add_tab(gobj, gobj2, id, text, icon)
|
|
|
636
636
|
* initial text is the raw key (the topic_name). Tabs are built
|
|
637
637
|
* lazily when topic descriptions arrive from the backend —
|
|
638
638
|
* AFTER the host's one-time refresh_language($container,t) —
|
|
639
|
-
* so without this they stay as raw keys ("
|
|
639
|
+
* so without this they stay as raw keys ("groups", …).
|
|
640
640
|
* `t` is the i18next translator already imported here.
|
|
641
641
|
*/
|
|
642
642
|
refresh_language($a, t);
|
|
@@ -2844,10 +2844,10 @@ function ac_set_landing_view(gobj, event, kw, src)
|
|
|
2844
2844
|
* Back from a topic to WHERE THE READER WAS.
|
|
2845
2845
|
*
|
|
2846
2846
|
* Browser Back and this button must land on the same place, or the
|
|
2847
|
-
* reader cannot tell which one to trust
|
|
2848
|
-
*
|
|
2849
|
-
*
|
|
2850
|
-
*
|
|
2847
|
+
* reader cannot tell which one to trust. The button went to the
|
|
2848
|
+
* landing whatever came before it, so "linked records" from `models`
|
|
2849
|
+
* opened `devices`, and the arrow then showed the cards instead of
|
|
2850
|
+
* `models`, where Back went.
|
|
2851
2851
|
*
|
|
2852
2852
|
* So it asks the shell for the route before this one
|
|
2853
2853
|
* (yui_shell_previous_route): the previous topic, the landing, or the
|
package/src/c_yui_window.js
CHANGED
|
@@ -475,7 +475,7 @@ function ensure_window_style()
|
|
|
475
475
|
* starts with '<', otherwise a yi-* class name.
|
|
476
476
|
*
|
|
477
477
|
* The two halves are separate text nodes on purpose. Titles here are
|
|
478
|
-
* nearly always "<what> · <kind>" — `
|
|
478
|
+
* nearly always "<what> · <kind>" — `raw_events · keys` — and
|
|
479
479
|
* composing that into one string is what makes a title untranslatable:
|
|
480
480
|
* `${topic} · ${t("keys")}` is not an i18n key, so i18next answers it
|
|
481
481
|
* with itself and it stays in the language it was built in for the
|
package/src/lib_icons.test.js
CHANGED
|
@@ -152,7 +152,7 @@ test("a user icon lives in its own namespace", () => {
|
|
|
152
152
|
expect(USER_ICON_PREFIX).toBe("yi-u-");
|
|
153
153
|
expect(yui_user_icon_class("transformer")).toBe("yi-u-transformer");
|
|
154
154
|
expect(yui_icons_is_svg_field(ICONS_TOPIC, "svg")).toBe(true);
|
|
155
|
-
expect(yui_icons_is_svg_field("
|
|
155
|
+
expect(yui_icons_is_svg_field("models", "svg")).toBe(false);
|
|
156
156
|
expect(yui_icons_is_svg_field(ICONS_TOPIC, "id")).toBe(false);
|
|
157
157
|
});
|
|
158
158
|
|
|
@@ -698,14 +698,14 @@ describe("a chip of the dock", () => {
|
|
|
698
698
|
gobj_start(dock);
|
|
699
699
|
const w = gobj_create_service(`nwin${seq}`, "C_YUI_WINDOW", {
|
|
700
700
|
header: "x", body: ["div", {}, "x"],
|
|
701
|
-
title: "keys", title_prefix: "
|
|
701
|
+
title: "keys", title_prefix: "raw_events", manager: dock
|
|
702
702
|
}, yuno);
|
|
703
703
|
gobj_start(w);
|
|
704
704
|
|
|
705
705
|
const $toggle = chip(dock).querySelector(".DOCK_CHIP_TOGGLE");
|
|
706
706
|
const names = ($toggle.getAttribute("aria-labelledby") || "").split(" ")
|
|
707
707
|
.map((id) => $toggle.querySelector(`#${id}`).textContent);
|
|
708
|
-
expect(names).toEqual(["
|
|
708
|
+
expect(names).toEqual(["raw_events", "keys"]);
|
|
709
709
|
});
|
|
710
710
|
|
|
711
711
|
test("its toggle minimises and brings back, through the FSM; its ✕ closes", () => {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
import {describe, it, expect} from "vitest";
|
|
16
16
|
import {topic_is_draft} from "./c_yui_schema_editor.js";
|
|
17
17
|
|
|
18
|
-
const TOPIC = {id: "
|
|
18
|
+
const TOPIC = {id: "groups", topic_version: 5};
|
|
19
19
|
|
|
20
20
|
describe("topic_is_draft", () => {
|
|
21
21
|
it("says nothing about a topic this session never wrote", () => {
|
|
@@ -23,18 +23,18 @@ describe("topic_is_draft", () => {
|
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
it("a written topic is a draft, whatever its version says", () => {
|
|
26
|
-
expect(topic_is_draft({written: {
|
|
27
|
-
expect(topic_is_draft({written: {
|
|
28
|
-
{id: "
|
|
26
|
+
expect(topic_is_draft({written: {groups: true}}, TOPIC)).toBe(true);
|
|
27
|
+
expect(topic_is_draft({written: {groups: true}},
|
|
28
|
+
{id: "groups", topic_version: 6})).toBe(true);
|
|
29
29
|
});
|
|
30
30
|
|
|
31
31
|
it("a topic the host names is a draft too (EV_DRAFTS)", () => {
|
|
32
|
-
expect(topic_is_draft({written: {}, host_ids: {
|
|
32
|
+
expect(topic_is_draft({written: {}, host_ids: {groups: true}}, TOPIC)).toBe(true);
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
it("answers false rather than throwing on a missing half", () => {
|
|
36
36
|
expect(topic_is_draft(null, TOPIC)).toBe(false);
|
|
37
|
-
expect(topic_is_draft({written: {
|
|
37
|
+
expect(topic_is_draft({written: {groups: true}}, null)).toBe(false);
|
|
38
38
|
expect(topic_is_draft({}, TOPIC)).toBe(false);
|
|
39
39
|
});
|
|
40
40
|
});
|
|
@@ -72,12 +72,12 @@ describe("a modal of the shell is named", () => {
|
|
|
72
72
|
test("by the two halves of its title, the kind half carrying its key", () => {
|
|
73
73
|
const $box = document.createElement("div");
|
|
74
74
|
const handle = yui_shell_show_modal(shell, $box,
|
|
75
|
-
{dialog: true, title: "keys", title_prefix: "
|
|
75
|
+
{dialog: true, title: "keys", title_prefix: "raw_events", logical_class: "NAMED_SHEET"});
|
|
76
76
|
const $modal = document.querySelector(".NAMED_SHEET");
|
|
77
77
|
|
|
78
78
|
const [$prefix, $kind] = named_by($modal, "aria-labelledby");
|
|
79
79
|
expect($prefix.classList.contains("MODAL_TITLE_PREFIX")).toBe(true);
|
|
80
|
-
expect($prefix.textContent).toBe("
|
|
80
|
+
expect($prefix.textContent).toBe("raw_events");
|
|
81
81
|
expect($kind.classList.contains("MODAL_TITLE_KIND")).toBe(true);
|
|
82
82
|
expect($kind.dataset.i18n || $kind.getAttribute("i18n")).toBe("keys");
|
|
83
83
|
expect(named_by($modal, "aria-labelledby").length).toBe(2);
|
package/src/treedb_fold_model.js
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
*
|
|
29
29
|
* - A node is visible when SOME visible parent shows it, or it is
|
|
30
30
|
* a shown root. A record with two parents (a device hangs from
|
|
31
|
-
* its
|
|
31
|
+
* its site AND its building) is drawn ONCE, under whichever
|
|
32
32
|
* opened first, and folding one of the two leaves it where the
|
|
33
33
|
* other one shows it. The union, never the intersection.
|
|
34
34
|
*
|
|
@@ -361,8 +361,8 @@ function count_levels(model)
|
|
|
361
361
|
}
|
|
362
362
|
|
|
363
363
|
/************************************************************
|
|
364
|
-
* A HIERARCHICAL topic: one hooked to ITSELF --
|
|
365
|
-
*
|
|
364
|
+
* A HIERARCHICAL topic: one hooked to ITSELF -- sites inside
|
|
365
|
+
* sites, groups inside groups, roles inside roles. It is the
|
|
366
366
|
* only kind of topic a tree can hang from: a topic that only
|
|
367
367
|
* reaches OTHER topics is a list with children, and making it
|
|
368
368
|
* the trunk drew the agent's treedb from `yunos` instead of
|