@yuneta/gobj-ui 7.23.188 → 7.23.189
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/dist/gobj-ui.cjs.js +3 -4
- package/dist/gobj-ui.es.js +3 -4
- package/package.json +1 -1
- package/src/c_yui_treedb_topics.js +20 -10
package/dist/gobj-ui.cjs.js
CHANGED
|
@@ -24751,10 +24751,9 @@ function open_json_viewer$1(gobj, opts) {
|
|
|
24751
24751
|
}
|
|
24752
24752
|
let mobile = is_mobile$2();
|
|
24753
24753
|
let shell = yui_shell_of(gobj);
|
|
24754
|
-
let
|
|
24755
|
-
|
|
24756
|
-
|
|
24757
|
-
}, gobj);
|
|
24754
|
+
let jv_kw = { subscriber: gobj };
|
|
24755
|
+
if (schema) jv_kw.json_data = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "descs");
|
|
24756
|
+
let jv = (0, _yuneta_gobj_js.gobj_create_service)(`treedb-topics-json-${(0, _yuneta_gobj_js.clean_name)((0, _yuneta_gobj_js.gobj_name)(gobj))}`, "C_YUI_JSON", jv_kw, gobj);
|
|
24758
24757
|
if (!jv) {
|
|
24759
24758
|
(0, _yuneta_gobj_js.log_error)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)}: cannot create the JSON viewer`);
|
|
24760
24759
|
return;
|
package/dist/gobj-ui.es.js
CHANGED
|
@@ -24746,10 +24746,9 @@ function open_json_viewer$1(gobj, opts) {
|
|
|
24746
24746
|
}
|
|
24747
24747
|
let mobile = is_mobile$2();
|
|
24748
24748
|
let shell = yui_shell_of(gobj);
|
|
24749
|
-
let
|
|
24750
|
-
|
|
24751
|
-
|
|
24752
|
-
}, gobj);
|
|
24749
|
+
let jv_kw = { subscriber: gobj };
|
|
24750
|
+
if (schema) jv_kw.json_data = gobj_read_attr(gobj, "descs");
|
|
24751
|
+
let jv = gobj_create_service(`treedb-topics-json-${clean_name(gobj_name(gobj))}`, "C_YUI_JSON", jv_kw, gobj);
|
|
24753
24752
|
if (!jv) {
|
|
24754
24753
|
log_error(`${gobj_short_name(gobj)}: cannot create the JSON viewer`);
|
|
24755
24754
|
return;
|
package/package.json
CHANGED
|
@@ -1718,19 +1718,29 @@ function open_json_viewer(gobj, opts)
|
|
|
1718
1718
|
let mobile = is_mobile();
|
|
1719
1719
|
let shell = yui_shell_of(gobj);
|
|
1720
1720
|
|
|
1721
|
+
/* No `title`: the host titles it — the window's title bar on
|
|
1722
|
+
* desktop, the dialog's header on mobile. The viewer's own title
|
|
1723
|
+
* would land INSIDE that host, doubling it. */
|
|
1724
|
+
let jv_kw = {
|
|
1725
|
+
subscriber: gobj /* publishes EV_EXPAND_PATH to us */
|
|
1726
|
+
};
|
|
1727
|
+
if(schema) {
|
|
1728
|
+
/* The schema is here already and it is small: it goes in whole,
|
|
1729
|
+
* and no drill-down happens because nothing is collapsed.
|
|
1730
|
+
*
|
|
1731
|
+
* Written as `json_data: schema? descs : null` it cost two
|
|
1732
|
+
* errors on EVERY raw-json open: a `DTP_JSON` attr takes a dict
|
|
1733
|
+
* or a list, and gobj-js REFUSES a null with "attr must be a
|
|
1734
|
+
* json dict/list" -- and then json2data() fails and the create
|
|
1735
|
+
* carries on with the attr unset. An attr you have nothing to
|
|
1736
|
+
* say about is one you do not mention. */
|
|
1737
|
+
jv_kw.json_data = gobj_read_attr(gobj, "descs");
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1721
1740
|
let jv = gobj_create_service(
|
|
1722
1741
|
`treedb-topics-json-${clean_name(gobj_name(gobj))}`,
|
|
1723
1742
|
"C_YUI_JSON",
|
|
1724
|
-
|
|
1725
|
-
/* No `title`: the host titles it — the window's title bar on
|
|
1726
|
-
* desktop, the dialog's header on mobile. The viewer's own
|
|
1727
|
-
* title would land INSIDE that host, doubling it. */
|
|
1728
|
-
subscriber: gobj, /* publishes EV_EXPAND_PATH to us */
|
|
1729
|
-
/* The schema is here already and it is small: it goes in
|
|
1730
|
-
* whole, and no drill-down happens because nothing is
|
|
1731
|
-
* collapsed. */
|
|
1732
|
-
json_data: schema? gobj_read_attr(gobj, "descs") : null
|
|
1733
|
-
},
|
|
1743
|
+
jv_kw,
|
|
1734
1744
|
gobj
|
|
1735
1745
|
);
|
|
1736
1746
|
if(!jv) {
|