@yuneta/gobj-ui 5.13.0 → 5.14.1
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
CHANGED
|
@@ -15557,6 +15557,13 @@ function ac_mt_command_answer$1(gobj, event, kw, src) {
|
|
|
15557
15557
|
break;
|
|
15558
15558
|
case "create-node":
|
|
15559
15559
|
case "update-node":
|
|
15560
|
+
(0, _yuneta_gobj_js.gobj_publish_event)(gobj, "EV_RECORD_WRITTEN", {
|
|
15561
|
+
treedb_name: (0, _yuneta_gobj_js.kw_get_str)(gobj, kw_command, "treedb_name", "", 0),
|
|
15562
|
+
topic_name: (0, _yuneta_gobj_js.kw_get_str)(gobj, kw_command, "topic_name", "", 0),
|
|
15563
|
+
record: (0, _yuneta_gobj_js.kw_get_dict)(gobj, kw_command, "record", {}, 0),
|
|
15564
|
+
created: command === "create-node"
|
|
15565
|
+
});
|
|
15566
|
+
break;
|
|
15560
15567
|
case "delete-node": break;
|
|
15561
15568
|
default: (0, _yuneta_gobj_js.log_error)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)} Command unknown: ${command}`);
|
|
15562
15569
|
}
|
|
@@ -15962,6 +15969,7 @@ function create_gclass$5(gclass_name) {
|
|
|
15962
15969
|
["EV_CREATE_RECORD", 0],
|
|
15963
15970
|
["EV_UPDATE_RECORD", 0],
|
|
15964
15971
|
["EV_DELETE_RECORD", 0],
|
|
15972
|
+
["EV_RECORD_WRITTEN", _yuneta_gobj_js.event_flag_t.EVF_OUTPUT_EVENT | _yuneta_gobj_js.event_flag_t.EVF_NO_WARN_SUBS],
|
|
15965
15973
|
["EV_REFRESH_TOPIC", 0],
|
|
15966
15974
|
["EV_OPEN_JSON", 0],
|
|
15967
15975
|
["EV_EXPAND_PATH", 0],
|
|
@@ -16680,6 +16688,10 @@ function create_tabulator(gobj) {
|
|
|
16680
16688
|
case "real":
|
|
16681
16689
|
hozAlign = "right";
|
|
16682
16690
|
sorter = "number";
|
|
16691
|
+
break;
|
|
16692
|
+
case "rowid":
|
|
16693
|
+
hozAlign = "right";
|
|
16694
|
+
sorter = "number";
|
|
16683
16695
|
}
|
|
16684
16696
|
let colDef = {
|
|
16685
16697
|
title: col_label(col, (0, _yuneta_gobj_js.gobj_read_str_attr)(gobj, "topic_name")),
|
|
@@ -16833,7 +16845,8 @@ function transform__treedb_value_2_table_value(gobj, col, value, row, field) {
|
|
|
16833
16845
|
case "string":
|
|
16834
16846
|
case "email":
|
|
16835
16847
|
case "tel":
|
|
16836
|
-
case "url":
|
|
16848
|
+
case "url":
|
|
16849
|
+
case "rowid": break;
|
|
16837
16850
|
case "integer": break;
|
|
16838
16851
|
case "real": break;
|
|
16839
16852
|
case "boolean": break;
|
package/dist/gobj-ui.es.js
CHANGED
|
@@ -15552,6 +15552,13 @@ function ac_mt_command_answer$1(gobj, event, kw, src) {
|
|
|
15552
15552
|
break;
|
|
15553
15553
|
case "create-node":
|
|
15554
15554
|
case "update-node":
|
|
15555
|
+
gobj_publish_event(gobj, "EV_RECORD_WRITTEN", {
|
|
15556
|
+
treedb_name: kw_get_str(gobj, kw_command, "treedb_name", "", 0),
|
|
15557
|
+
topic_name: kw_get_str(gobj, kw_command, "topic_name", "", 0),
|
|
15558
|
+
record: kw_get_dict(gobj, kw_command, "record", {}, 0),
|
|
15559
|
+
created: command === "create-node"
|
|
15560
|
+
});
|
|
15561
|
+
break;
|
|
15555
15562
|
case "delete-node": break;
|
|
15556
15563
|
default: log_error(`${gobj_short_name(gobj)} Command unknown: ${command}`);
|
|
15557
15564
|
}
|
|
@@ -15957,6 +15964,7 @@ function create_gclass$5(gclass_name) {
|
|
|
15957
15964
|
["EV_CREATE_RECORD", 0],
|
|
15958
15965
|
["EV_UPDATE_RECORD", 0],
|
|
15959
15966
|
["EV_DELETE_RECORD", 0],
|
|
15967
|
+
["EV_RECORD_WRITTEN", event_flag_t.EVF_OUTPUT_EVENT | event_flag_t.EVF_NO_WARN_SUBS],
|
|
15960
15968
|
["EV_REFRESH_TOPIC", 0],
|
|
15961
15969
|
["EV_OPEN_JSON", 0],
|
|
15962
15970
|
["EV_EXPAND_PATH", 0],
|
|
@@ -16675,6 +16683,10 @@ function create_tabulator(gobj) {
|
|
|
16675
16683
|
case "real":
|
|
16676
16684
|
hozAlign = "right";
|
|
16677
16685
|
sorter = "number";
|
|
16686
|
+
break;
|
|
16687
|
+
case "rowid":
|
|
16688
|
+
hozAlign = "right";
|
|
16689
|
+
sorter = "number";
|
|
16678
16690
|
}
|
|
16679
16691
|
let colDef = {
|
|
16680
16692
|
title: col_label(col, gobj_read_str_attr(gobj, "topic_name")),
|
|
@@ -16828,7 +16840,8 @@ function transform__treedb_value_2_table_value(gobj, col, value, row, field) {
|
|
|
16828
16840
|
case "string":
|
|
16829
16841
|
case "email":
|
|
16830
16842
|
case "tel":
|
|
16831
|
-
case "url":
|
|
16843
|
+
case "url":
|
|
16844
|
+
case "rowid": break;
|
|
16832
16845
|
case "integer": break;
|
|
16833
16846
|
case "real": break;
|
|
16834
16847
|
case "boolean": break;
|
package/package.json
CHANGED
|
@@ -842,6 +842,12 @@ function create_tabulator(gobj)
|
|
|
842
842
|
hozAlign = "right";
|
|
843
843
|
sorter = "number";
|
|
844
844
|
break;
|
|
845
|
+
/* A rowid is a NUMBER stored as a string key: sorted as text,
|
|
846
|
+
* "9" lands after "69". Read like the integer it is. */
|
|
847
|
+
case "rowid":
|
|
848
|
+
hozAlign = "right";
|
|
849
|
+
sorter = "number";
|
|
850
|
+
break;
|
|
845
851
|
}
|
|
846
852
|
|
|
847
853
|
let colDef = {
|
|
@@ -1068,6 +1074,7 @@ function transform__treedb_value_2_table_value(gobj, col, value, row, field)
|
|
|
1068
1074
|
case "email": // string subtype — plain text in the cell
|
|
1069
1075
|
case "tel": // string subtype — plain text in the cell
|
|
1070
1076
|
case "url": // string subtype — plain text in the cell
|
|
1077
|
+
case "rowid": // the record's own key — shown as it comes
|
|
1071
1078
|
break;
|
|
1072
1079
|
case "integer":
|
|
1073
1080
|
break;
|
|
@@ -1717,6 +1717,24 @@ function ac_mt_command_answer(gobj, event, kw, src)
|
|
|
1717
1717
|
|
|
1718
1718
|
case "create-node":
|
|
1719
1719
|
case "update-node":
|
|
1720
|
+
/*
|
|
1721
|
+
* The view refreshes itself from the treedb's own
|
|
1722
|
+
* EV_TREEDB_NODE_* events, which arrive for EVERY writer. This
|
|
1723
|
+
* says something those cannot: THIS view has just written THIS
|
|
1724
|
+
* record, and it succeeded. A host whose save is not finished
|
|
1725
|
+
* with one record — a schema editor, where a column change also
|
|
1726
|
+
* has to raise the versions that publish it — needs exactly that,
|
|
1727
|
+
* and cannot use the node events without answering its own writes
|
|
1728
|
+
* in a loop.
|
|
1729
|
+
*/
|
|
1730
|
+
gobj_publish_event(gobj, "EV_RECORD_WRITTEN", {
|
|
1731
|
+
treedb_name: kw_get_str(gobj, kw_command, "treedb_name", "", 0),
|
|
1732
|
+
topic_name: kw_get_str(gobj, kw_command, "topic_name", "", 0),
|
|
1733
|
+
record: kw_get_dict(gobj, kw_command, "record", {}, 0),
|
|
1734
|
+
created: (command === "create-node")
|
|
1735
|
+
});
|
|
1736
|
+
break;
|
|
1737
|
+
|
|
1720
1738
|
case "delete-node":
|
|
1721
1739
|
// Don't process by here, process on subscribed events.
|
|
1722
1740
|
break;
|
|
@@ -2239,6 +2257,8 @@ function create_gclass(gclass_name)
|
|
|
2239
2257
|
["EV_CREATE_RECORD", 0],
|
|
2240
2258
|
["EV_UPDATE_RECORD", 0],
|
|
2241
2259
|
["EV_DELETE_RECORD", 0],
|
|
2260
|
+
["EV_RECORD_WRITTEN", event_flag_t.EVF_OUTPUT_EVENT|
|
|
2261
|
+
event_flag_t.EVF_NO_WARN_SUBS],
|
|
2242
2262
|
["EV_REFRESH_TOPIC", 0],
|
|
2243
2263
|
["EV_OPEN_JSON", 0],
|
|
2244
2264
|
["EV_EXPAND_PATH", 0],
|