@yuneta/gobj-ui 7.23.142 → 7.23.143
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 +26 -0
- package/dist/gobj-ui.cjs.js +665 -213
- package/dist/gobj-ui.es.js +664 -214
- package/index.js +2 -0
- package/package.json +1 -1
- package/src/c_yui_json_pad.js +454 -0
- package/src/c_yui_treedb_topic_with_form.js +14 -0
- package/src/yui_json_pad.js +109 -0
package/README.md
CHANGED
|
@@ -663,6 +663,11 @@ url is what gives way, cut with an ellipsis, and the whole value stays in the
|
|
|
663
663
|
> only paginating the FETCH is not. `page_size` sets the display page for both
|
|
664
664
|
> paths.
|
|
665
665
|
|
|
666
|
+
**A topic table opens sorted by `id`** (since `7.23.143`): the pkey, ascending
|
|
667
|
+
and natural (`alphanum`, so `d2` comes before `d10`) — normalized records are
|
|
668
|
+
read by their key. Not when the app passes its own `initialSort`, and not with
|
|
669
|
+
`with_remote_paging`, where a sort in the browser would reorder one page.
|
|
670
|
+
|
|
666
671
|
`C_YUI_TREEDB_TOPICS` takes **`with_remote_paging`** (off by default) and
|
|
667
672
|
forwards it to every topic table: the table pulls the page it is showing
|
|
668
673
|
instead of the host pushing the whole topic down. It needs the SDK's `nodes`
|
|
@@ -1902,6 +1907,27 @@ if(id) {
|
|
|
1902
1907
|
$box.appendChild(yui_asset_element(answer, {detail: device.foto_name}));
|
|
1903
1908
|
```
|
|
1904
1909
|
|
|
1910
|
+
### JSON viewer — `setup_json_pad`
|
|
1911
|
+
|
|
1912
|
+
`setup_json_pad(self)` opens a **blank JSON pad** (`C_YUI_JSON_PAD`) in a
|
|
1913
|
+
floating `C_YUI_WINDOW`: paste JSON from outside — a log line, a config file, an
|
|
1914
|
+
answer copied from a terminal — and read it with the library's own viewer
|
|
1915
|
+
(`C_YUI_JSON`: tree, text, graph). Wire it to an account-menu entry, next to the
|
|
1916
|
+
frontend view (`EV_OPEN_JSON_VIEWER` in every SPA of the ecosystem). Like the
|
|
1917
|
+
frontend view it returns `null` when the window is already open, so the host
|
|
1918
|
+
toggles with it, and it registers `C_YUI_JSON_PAD` (and the `C_YUI_JSON` it
|
|
1919
|
+
hosts) itself when the app did not.
|
|
1920
|
+
|
|
1921
|
+
- A **paste anywhere in the pad** replaces the document and shows it at once;
|
|
1922
|
+
**view** (or Ctrl+Enter) reads the text area as typed; **clear** empties it.
|
|
1923
|
+
- Text that is not JSON leaves the last document on screen and says so under
|
|
1924
|
+
the text area, with the parser's reason.
|
|
1925
|
+
- A `__collapsed__` sentinel in a pasted dump is answered with
|
|
1926
|
+
`EV_SUBTREE_ERROR`: the source truncated it, and a pad has no backend to ask.
|
|
1927
|
+
|
|
1928
|
+
Consumer i18n keys: `json viewer`, `paste json here`, `invalid json`,
|
|
1929
|
+
`collapsed in the source` (plus `view` and `clear`, which every app has).
|
|
1930
|
+
|
|
1905
1931
|
### Frontend view — `setup_frontend_view`
|
|
1906
1932
|
|
|
1907
1933
|
`setup_frontend_view(self)` opens the **gobj tree of the app's own yuno** in a
|