@yuneta/gobj-ui 5.14.1 → 5.14.2

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.
@@ -14333,7 +14333,7 @@ function yui_shell_show_route_map(shell, opts) {
14333
14333
  if (typeof m.close === "function") m.close();
14334
14334
  return null;
14335
14335
  }
14336
- if ((0, _yuneta_gobj_js.gclass_find_by_name)("C_YUI_WINDOW") !== null) {
14336
+ if ((0, _yuneta_gobj_js.gclass_find_by_name)("C_YUI_WINDOW")) {
14337
14337
  let win_ref = { gobj: null };
14338
14338
  let $body = build_body(shell, t);
14339
14339
  let $parent = yui_shell_popup_layer(shell) || typeof document !== "undefined" && document.getElementById("top-layer") || null;
@@ -14911,7 +14911,7 @@ function build_schema_child(gobj) {
14911
14911
  let priv = gobj.priv;
14912
14912
  if (priv.schema_gobj) return;
14913
14913
  if (!(0, _yuneta_gobj_js.is_object)((0, _yuneta_gobj_js.gobj_read_attr)(gobj, "descs"))) return;
14914
- if ((0, _yuneta_gobj_js.gclass_find_by_name)("C_YUI_TREEDB_SCHEMA") === null) {
14914
+ if (!(0, _yuneta_gobj_js.gclass_find_by_name)("C_YUI_TREEDB_SCHEMA")) {
14915
14915
  (0, _yuneta_gobj_js.log_error)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)}: C_YUI_TREEDB_SCHEMA not registered by the app`);
14916
14916
  return;
14917
14917
  }
@@ -15374,7 +15374,7 @@ function open_json_viewer$1(gobj) {
15374
15374
  request_print_tranger$1(gobj, "");
15375
15375
  return;
15376
15376
  }
15377
- if ((0, _yuneta_gobj_js.gclass_find_by_name)("C_YUI_JSON") === null) {
15377
+ if (!(0, _yuneta_gobj_js.gclass_find_by_name)("C_YUI_JSON")) {
15378
15378
  (0, _yuneta_gobj_js.log_error)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)}: C_YUI_JSON not registered by the app`);
15379
15379
  yui_shell_show_error(yui_shell_of(gobj), "raw json viewer unavailable", { t: i18next.t });
15380
15380
  return;
@@ -18559,7 +18559,7 @@ function is_mobile() {
18559
18559
  function open_json_viewer(gobj) {
18560
18560
  let priv = gobj.priv;
18561
18561
  if (priv.json_win || priv.json_modal) return;
18562
- if ((0, _yuneta_gobj_js.gclass_find_by_name)("C_YUI_JSON") === null) {
18562
+ if (!(0, _yuneta_gobj_js.gclass_find_by_name)("C_YUI_JSON")) {
18563
18563
  (0, _yuneta_gobj_js.log_error)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)}: C_YUI_JSON not registered by the app`);
18564
18564
  yui_shell_show_error(yui_shell_of(gobj), "raw json viewer unavailable", { t: i18next.t });
18565
18565
  return;
@@ -14328,7 +14328,7 @@ function yui_shell_show_route_map(shell, opts) {
14328
14328
  if (typeof m.close === "function") m.close();
14329
14329
  return null;
14330
14330
  }
14331
- if (gclass_find_by_name("C_YUI_WINDOW") !== null) {
14331
+ if (gclass_find_by_name("C_YUI_WINDOW")) {
14332
14332
  let win_ref = { gobj: null };
14333
14333
  let $body = build_body(shell, t);
14334
14334
  let $parent = yui_shell_popup_layer(shell) || typeof document !== "undefined" && document.getElementById("top-layer") || null;
@@ -14906,7 +14906,7 @@ function build_schema_child(gobj) {
14906
14906
  let priv = gobj.priv;
14907
14907
  if (priv.schema_gobj) return;
14908
14908
  if (!is_object(gobj_read_attr(gobj, "descs"))) return;
14909
- if (gclass_find_by_name("C_YUI_TREEDB_SCHEMA") === null) {
14909
+ if (!gclass_find_by_name("C_YUI_TREEDB_SCHEMA")) {
14910
14910
  log_error(`${gobj_short_name(gobj)}: C_YUI_TREEDB_SCHEMA not registered by the app`);
14911
14911
  return;
14912
14912
  }
@@ -15369,7 +15369,7 @@ function open_json_viewer$1(gobj) {
15369
15369
  request_print_tranger$1(gobj, "");
15370
15370
  return;
15371
15371
  }
15372
- if (gclass_find_by_name("C_YUI_JSON") === null) {
15372
+ if (!gclass_find_by_name("C_YUI_JSON")) {
15373
15373
  log_error(`${gobj_short_name(gobj)}: C_YUI_JSON not registered by the app`);
15374
15374
  yui_shell_show_error(yui_shell_of(gobj), "raw json viewer unavailable", { t });
15375
15375
  return;
@@ -18546,7 +18546,7 @@ function is_mobile() {
18546
18546
  function open_json_viewer(gobj) {
18547
18547
  let priv = gobj.priv;
18548
18548
  if (priv.json_win || priv.json_modal) return;
18549
- if (gclass_find_by_name("C_YUI_JSON") === null) {
18549
+ if (!gclass_find_by_name("C_YUI_JSON")) {
18550
18550
  log_error(`${gobj_short_name(gobj)}: C_YUI_JSON not registered by the app`);
18551
18551
  yui_shell_show_error(yui_shell_of(gobj), "raw json viewer unavailable", { t });
18552
18552
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuneta/gobj-ui",
3
- "version": "5.14.1",
3
+ "version": "5.14.2",
4
4
  "type": "module",
5
5
  "main": "dist/gobj-ui.cjs.js",
6
6
  "module": "dist/gobj-ui.es.js",
@@ -572,7 +572,7 @@ function open_json_viewer(gobj)
572
572
  if(priv.json_win || priv.json_modal) {
573
573
  return; /* already open */
574
574
  }
575
- if(gclass_find_by_name("C_YUI_JSON") === null) {
575
+ if(!gclass_find_by_name("C_YUI_JSON")) {
576
576
  log_error(`${gobj_short_name(gobj)}: C_YUI_JSON not registered by the app`);
577
577
  yui_shell_show_error(yui_shell_of(gobj), "raw json viewer unavailable", {t: t});
578
578
  return;
@@ -714,7 +714,7 @@ function build_schema_child(gobj)
714
714
  if(!is_object(gobj_read_attr(gobj, "descs"))) {
715
715
  return;
716
716
  }
717
- if(gclass_find_by_name("C_YUI_TREEDB_SCHEMA") === null) {
717
+ if(!gclass_find_by_name("C_YUI_TREEDB_SCHEMA")) {
718
718
  log_error(`${gobj_short_name(gobj)}: C_YUI_TREEDB_SCHEMA not registered by the app`);
719
719
  return;
720
720
  }
@@ -1442,7 +1442,7 @@ function open_json_viewer(gobj)
1442
1442
  return;
1443
1443
  }
1444
1444
 
1445
- if(gclass_find_by_name("C_YUI_JSON") === null) {
1445
+ if(!gclass_find_by_name("C_YUI_JSON")) {
1446
1446
  log_error(`${gobj_short_name(gobj)}: C_YUI_JSON not registered by the app`);
1447
1447
  yui_shell_show_error(yui_shell_of(gobj), "raw json viewer unavailable", {t: t});
1448
1448
  return;
@@ -453,8 +453,13 @@ export function yui_shell_show_route_map(shell, opts)
453
453
  return null;
454
454
  }
455
455
 
456
- /* Preferred: a resizable, maximisable floating window. */
457
- if(gclass_find_by_name("C_YUI_WINDOW") !== null) {
456
+ /* Preferred: a resizable, maximisable floating window.
457
+ *
458
+ * Truthiness, never `!== null`: a lookup that does not find its name
459
+ * used to answer `undefined`, so `!== null` was TRUE for a gclass that
460
+ * is NOT registered and this branch built a window out of nothing.
461
+ * gobj-js >= 7.12.0 returns null, and this reads right either way. */
462
+ if(gclass_find_by_name("C_YUI_WINDOW")) {
458
463
  let win_ref = {gobj: null};
459
464
  /* A workspace surface, not a thing floating over one view: it
460
465
  * joins the dock when the app HAS one (minimise, restore, focus