@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.
@@ -45,9 +45,9 @@ describe("vite-plugin-yuneta-html", () => {
45
45
  test("a declared csp_connect_src goes into connect-src, comments left out", () => {
46
46
  const html = transform({
47
47
  title: "App",
48
- csp_connect_src: ["wss://host:4620", "_comment: why", "https://tiles.example"]
48
+ csp_connect_src: ["wss://host:7301", "_comment: why", "https://tiles.example"]
49
49
  });
50
- expect(connect_src(html)).toEqual(["'self'", "wss://host:4620", "https://tiles.example"]);
50
+ expect(connect_src(html)).toEqual(["'self'", "wss://host:7301", "https://tiles.example"]);
51
51
  expect(html).toContain("<title>App</title>");
52
52
  });
53
53
 
@@ -73,10 +73,10 @@ describe("vite-plugin-yuneta-html", () => {
73
73
  title: "App",
74
74
  csp_connect_src: [
75
75
  "wss://a:1; base-uri *", "wss://b, wss://c", "wss://d wss://e",
76
- "wss://ok:4620"
76
+ "wss://ok:7301"
77
77
  ]
78
78
  });
79
- expect(connect_src(html)).toEqual(["'self'", "wss://ok:4620"]);
79
+ expect(connect_src(html)).toEqual(["'self'", "wss://ok:7301"]);
80
80
  expect(html).not.toContain("base-uri");
81
81
  expect(err).toHaveBeenCalledTimes(3);
82
82
  err.mockRestore();
package/src/yui_dev.js CHANGED
@@ -1455,7 +1455,7 @@ function refresh_dev_chrome()
1455
1455
  }
1456
1456
 
1457
1457
  /* The payload of a FOLDED entry as text, the way it is on screen: one line
1458
- * per row, a closed branch as its one-line summary (`data {places: […], …}`)
1458
+ * per row, a closed branch as its one-line summary (`data {sites: […], …}`)
1459
1459
  * and only an OPENED branch with its content, four characters further in.
1460
1460
  *
1461
1461
  * Read from the painted DOM and not from the payload, because whether a
@@ -38,13 +38,13 @@ describe("entry_shown_lines", () => {
38
38
  it("copies a closed branch as its one-line summary", () => {
39
39
  const $e = painted({
40
40
  result: 0,
41
- comment: "db_history^4620: 500 nodes",
42
- data: {places: [1, 2, 3], families: [4], devices: [5, 6]},
41
+ comment: "db_history^7301: 500 nodes",
42
+ data: {sites: [1, 2, 3], buildings: [4], devices: [5, 6]},
43
43
  });
44
44
  expect(entry_shown_lines($e)).toEqual([
45
45
  " • result: 0",
46
- " • comment: db_history^4620: 500 nodes",
47
- " ▸ data {places:[…],families:[…],devices:[…]}",
46
+ " • comment: db_history^7301: 500 nodes",
47
+ " ▸ data {sites:[…],buildings:[…],devices:[…]}",
48
48
  ]);
49
49
  });
50
50
 
@@ -66,7 +66,7 @@ describe("render_name (the line view)", () => {
66
66
  const $e = render_name({
67
67
  kind: "traffic", dir: "in", event: "EV_YUNO_STATS", command: "",
68
68
  title: "gui_agent_yuno <== wss://cc:1996", ts: "09:19:03.421", size: 1024,
69
- kw: {result: 0, data: {yuno_id: "4046", kind: "cpu"}},
69
+ kw: {result: 0, data: {yuno_id: "7701", kind: "cpu"}},
70
70
  });
71
71
  expect($e.classList.contains("TRAFFIC_NAME")).toBe(true);
72
72
  expect($e.querySelector(".TRAFFIC_EVENT").textContent).toBe("EV_YUNO_STATS");
@@ -12,10 +12,10 @@
12
12
  * is only its frame.
13
13
  *
14
14
  * let handle = open_gobj_tree_view(gobj, {
15
- * name: "gate_energy-4046",
15
+ * name: "gate_probe-7701",
16
16
  * source: "remote",
17
- * yuno_name: "gate_energy^4046",
18
- * title_prefix: "gate_energy^4046",
17
+ * yuno_name: "gate_probe^7701",
18
+ * title_prefix: "gate_probe^7701",
19
19
  * title: "gobj tree", // an i18n KEY
20
20
  * $header: $status, // optional
21
21
  * on_close: () => gobj_send_event(gobj, "EV_VIEW_CLOSED", {}, gobj),
package/src/yui_icons.css CHANGED
@@ -631,8 +631,8 @@
631
631
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M176 24c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40c-35.3 0-64 28.7-64 64l-40 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l40 0 0 56-40 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l40 0 0 56-40 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l40 0c0 35.3 28.7 64 64 64l0 40c0 13.3 10.7 24 24 24s24-10.7 24-24l0-40 56 0 0 40c0 13.3 10.7 24 24 24s24-10.7 24-24l0-40 56 0 0 40c0 13.3 10.7 24 24 24s24-10.7 24-24l0-40c35.3 0 64-28.7 64-64l40 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-40 0 0-56 40 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-40 0 0-56 40 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-40 0c0-35.3-28.7-64-64-64l0-40c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40-56 0 0-40c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40-56 0 0-40zM160 128l192 0c17.7 0 32 14.3 32 32l0 192c0 17.7-14.3 32-32 32l-192 0c-17.7 0-32-14.3-32-32l0-192c0-17.7 14.3-32 32-32zm16 48l0 160 160 0 0-160-160 0z'/%3E%3C/svg%3E");
632
632
  }
633
633
 
634
- /* A controller, a box in the field: the server (FontAwesome Free
635
- * 7.3.1). */
634
+ /* A server: a machine that serves others, a rack unit (FontAwesome
635
+ * Free 7.3.1). */
636
636
  .yi-server::before {
637
637
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M64 32C28.7 32 0 60.7 0 96l0 64c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-64c0-35.3-28.7-64-64-64L64 32zm216 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm56 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zM64 288c-35.3 0-64 28.7-64 64l0 64c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-64c0-35.3-28.7-64-64-64L64 288zm216 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm56 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z'/%3E%3C/svg%3E");
638
638
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M64 32C28.7 32 0 60.7 0 96l0 64c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-64c0-35.3-28.7-64-64-64L64 32zm216 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm56 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zM64 288c-35.3 0-64 28.7-64 64l0 64c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-64c0-35.3-28.7-64-64-64L64 288zm216 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm56 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z'/%3E%3C/svg%3E");
@@ -764,7 +764,7 @@
764
764
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M288 64c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32L32 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z'/%3E%3C/svg%3E");
765
765
  }
766
766
 
767
- /* A hierarchy of groups to file things in -- zones, places: the tree of
767
+ /* A hierarchy of groups to file things in -- zones, sites: the tree of
768
768
  * folders of Windows Explorer, VS Code or Drive. The sitemap is the site
769
769
  * map (FontAwesome Free 7.3.1). */
770
770
  .yi-folder-tree::before {
@@ -4,23 +4,23 @@ import {row_matches, is_fkey_ref, is_hook_size} from "./yui_row_search.js";
4
4
 
5
5
  describe("row_matches", () => {
6
6
  const row = {
7
- id: "E00000042",
7
+ id: "D00000042",
8
8
  name: "",
9
- place: [
9
+ site: [
10
10
  {
11
- id: "es.city.site-a.local-13-gate",
12
- topic_name: "places",
11
+ id: "north.campus-a.room-13",
12
+ topic_name: "sites",
13
13
  hook_name: "devices"
14
14
  }
15
15
  ],
16
- tension: 400,
16
+ capacity: 400,
17
17
  enabled: true,
18
18
  _operation: "hidden",
19
19
  __md_treedb__: {topic_name: "devices"}
20
20
  };
21
21
 
22
22
  it("finds a plain field", () => {
23
- expect(row_matches(row, "e00000042")).toBe(true);
23
+ expect(row_matches(row, "d00000042")).toBe(true);
24
24
  });
25
25
 
26
26
  it("finds a number", () => {
@@ -28,13 +28,13 @@ describe("row_matches", () => {
28
28
  });
29
29
 
30
30
  it("finds a value INSIDE an fkey, which is the whole point", () => {
31
- expect(row_matches(row, "local-13-gate")).toBe(true);
31
+ expect(row_matches(row, "room-13")).toBe(true);
32
32
  });
33
33
 
34
34
  it("does NOT match the structural halves of an fkey", () => {
35
35
  /* `topic_name`/`hook_name` are the same two words on every row:
36
36
  * matching them turns the term into a wildcard. */
37
- expect(row_matches(row, "places")).toBe(false);
37
+ expect(row_matches(row, "sites")).toBe(false);
38
38
  expect(row_matches(row, "hook")).toBe(false);
39
39
  });
40
40
 
@@ -56,14 +56,14 @@ describe("row_matches, on a table loaded with hook_size", () => {
56
56
  /* What a topic table gets since 7.23.163: the hook is the COUNT
57
57
  * of its children, not their ids. */
58
58
  const row = {
59
- id: "places-madrid",
60
- name: "Madrid",
59
+ id: "sites-north",
60
+ name: "North",
61
61
  devices: [{size: 400}],
62
- __md_treedb__: {topic_name: "places"}
62
+ __md_treedb__: {topic_name: "sites"}
63
63
  };
64
64
 
65
65
  it("does NOT match the count of a hook", () => {
66
- /* It did, and "400" then answered every place holding 400
66
+ /* It did, and "400" then answered every site holding 400
67
67
  * devices together with the ones that really say 400. */
68
68
  expect(row_matches(row, "400")).toBe(false);
69
69
  expect(row_matches(row, "40")).toBe(false);
@@ -71,19 +71,19 @@ describe("row_matches, on a table loaded with hook_size", () => {
71
71
  });
72
72
 
73
73
  it("still matches the rest of the row", () => {
74
- expect(row_matches(row, "madrid")).toBe(true);
74
+ expect(row_matches(row, "north")).toBe(true);
75
75
  });
76
76
 
77
77
  it("still walks a hook that DID come with its children", () => {
78
78
  /* A node event carries whole hooks whatever the table asked
79
79
  * for, so both shapes reach this row. */
80
80
  const loaded = {
81
- id: "places-madrid",
81
+ id: "sites-north",
82
82
  devices: [
83
- {id: "E00000042", topic_name: "devices", hook_name: "places"}
83
+ {id: "D00000042", topic_name: "devices", hook_name: "sites"}
84
84
  ]
85
85
  };
86
- expect(row_matches(loaded, "e00000042")).toBe(true);
86
+ expect(row_matches(loaded, "d00000042")).toBe(true);
87
87
  });
88
88
  });
89
89
 
@@ -70,8 +70,8 @@ describe("yui_shell_last_route_under", () => {
70
70
 
71
71
  describe("yui_shell_previous_route", () => {
72
72
  it("answers the route before the current one, as browser Back does", () => {
73
- const s = shell(["/topics", "/topics/device_types", "/topics/devices"]);
74
- expect(yui_shell_previous_route(s)).toBe("/topics/device_types");
73
+ const s = shell(["/topics", "/topics/models", "/topics/devices"]);
74
+ expect(yui_shell_previous_route(s)).toBe("/topics/models");
75
75
  });
76
76
 
77
77
  it("goes back to the previous record, not past it", () => {
@@ -36,8 +36,8 @@ describe("yui_tab_split_subpath", () => {
36
36
  test("a composite id survives the url it travelled in", () => {
37
37
  /* 0x1F joins the two halves of these ids and reaches the url
38
38
  * percent-encoded. */
39
- expect(yui_tab_split_subpath("node-a%1F4630/treedb_authzs/__graphs__"))
40
- .toEqual({id: "node-a" + US + "4630",
39
+ expect(yui_tab_split_subpath("node-a%1F7302/treedb_authzs/__graphs__"))
40
+ .toEqual({id: "node-a" + US + "7302",
41
41
  tail: "treedb_authzs/__graphs__"});
42
42
  });
43
43