@yuneta/gobj-ui 7.25.3 → 7.25.4
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 +11 -1
- package/dist/gobj-ui.es.js +11 -1
- package/package.json +1 -1
- package/src/c_g6_nodes_tree.js +12 -0
- package/src/c_yui_treedb_topic_with_form.js +8 -0
package/dist/gobj-ui.cjs.js
CHANGED
|
@@ -29108,6 +29108,7 @@ function transform__form_value_2_treedb_value(gobj, col, value, operation) {
|
|
|
29108
29108
|
switch (field_desc.real_type) {
|
|
29109
29109
|
case "string":
|
|
29110
29110
|
if (value && (0, _yuneta_gobj_js.is_date)(value)) value = value.toISOString();
|
|
29111
|
+
else if (typeof value === "number" && value > 0) value = (/* @__PURE__ */ new Date(value * 1e3)).toISOString();
|
|
29111
29112
|
break;
|
|
29112
29113
|
case "integer":
|
|
29113
29114
|
if (value && (0, _yuneta_gobj_js.is_date)(value)) value = value.getTime() / 1e3;
|
|
@@ -29440,7 +29441,10 @@ function ac_confirmed$2(gobj, event, kw, src) {
|
|
|
29440
29441
|
let topic_name = (0, _yuneta_gobj_js.gobj_read_str_attr)(gobj, "topic_name");
|
|
29441
29442
|
if (what === "delete_selection" || what === "delete_row") {
|
|
29442
29443
|
let found = yui_rows_by_ids(tabulator, Array.isArray(kw.ids) ? kw.ids : []);
|
|
29443
|
-
if (found.missing.length)
|
|
29444
|
+
if (found.missing.length) {
|
|
29445
|
+
(0, _yuneta_gobj_js.log_error)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)}: ${event}: rows gone while confirming the delete, not deleted: ${found.missing.join(", ")}`);
|
|
29446
|
+
yui_shell_show_error(yui_shell_of(gobj), "some records were gone before the delete", { t: i18next.t });
|
|
29447
|
+
}
|
|
29444
29448
|
if (!found.rows.length) return -1;
|
|
29445
29449
|
for (let row of found.rows) (0, _yuneta_gobj_js.gobj_publish_event)(gobj, "EV_DELETE_RECORD", {
|
|
29446
29450
|
topic_name,
|
|
@@ -66451,6 +66455,7 @@ function ac_confirmed$1(gobj, event, kw, src) {
|
|
|
66451
66455
|
if (what === "delete_selection") {
|
|
66452
66456
|
let ids = kw && Array.isArray(kw.ids) ? kw.ids : [];
|
|
66453
66457
|
let nodes = [];
|
|
66458
|
+
let missing = [];
|
|
66454
66459
|
for (let id of ids) {
|
|
66455
66460
|
let nd = null;
|
|
66456
66461
|
try {
|
|
@@ -66459,6 +66464,11 @@ function ac_confirmed$1(gobj, event, kw, src) {
|
|
|
66459
66464
|
nd = null;
|
|
66460
66465
|
}
|
|
66461
66466
|
if (nd && nd.data && nd.data.desc) nodes.push(nd);
|
|
66467
|
+
else missing.push(id);
|
|
66468
|
+
}
|
|
66469
|
+
if (missing.length) {
|
|
66470
|
+
(0, _yuneta_gobj_js.log_error)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)}: ${event}: cards gone while confirming the delete, not deleted: ${missing.join(", ")}`);
|
|
66471
|
+
yui_shell_show_error(yui_shell_of(gobj), "some records were gone before the delete", { t: i18next.t });
|
|
66462
66472
|
}
|
|
66463
66473
|
if (!nodes.length) {
|
|
66464
66474
|
(0, _yuneta_gobj_js.log_error)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)}: ${event} names no node any more`);
|
package/dist/gobj-ui.es.js
CHANGED
|
@@ -29103,6 +29103,7 @@ function transform__form_value_2_treedb_value(gobj, col, value, operation) {
|
|
|
29103
29103
|
switch (field_desc.real_type) {
|
|
29104
29104
|
case "string":
|
|
29105
29105
|
if (value && is_date(value)) value = value.toISOString();
|
|
29106
|
+
else if (typeof value === "number" && value > 0) value = (/* @__PURE__ */ new Date(value * 1e3)).toISOString();
|
|
29106
29107
|
break;
|
|
29107
29108
|
case "integer":
|
|
29108
29109
|
if (value && is_date(value)) value = value.getTime() / 1e3;
|
|
@@ -29435,7 +29436,10 @@ function ac_confirmed$2(gobj, event, kw, src) {
|
|
|
29435
29436
|
let topic_name = gobj_read_str_attr(gobj, "topic_name");
|
|
29436
29437
|
if (what === "delete_selection" || what === "delete_row") {
|
|
29437
29438
|
let found = yui_rows_by_ids(tabulator, Array.isArray(kw.ids) ? kw.ids : []);
|
|
29438
|
-
if (found.missing.length)
|
|
29439
|
+
if (found.missing.length) {
|
|
29440
|
+
log_error(`${gobj_short_name(gobj)}: ${event}: rows gone while confirming the delete, not deleted: ${found.missing.join(", ")}`);
|
|
29441
|
+
yui_shell_show_error(yui_shell_of(gobj), "some records were gone before the delete", { t });
|
|
29442
|
+
}
|
|
29439
29443
|
if (!found.rows.length) return -1;
|
|
29440
29444
|
for (let row of found.rows) gobj_publish_event(gobj, "EV_DELETE_RECORD", {
|
|
29441
29445
|
topic_name,
|
|
@@ -66446,6 +66450,7 @@ function ac_confirmed$1(gobj, event, kw, src) {
|
|
|
66446
66450
|
if (what === "delete_selection") {
|
|
66447
66451
|
let ids = kw && Array.isArray(kw.ids) ? kw.ids : [];
|
|
66448
66452
|
let nodes = [];
|
|
66453
|
+
let missing = [];
|
|
66449
66454
|
for (let id of ids) {
|
|
66450
66455
|
let nd = null;
|
|
66451
66456
|
try {
|
|
@@ -66454,6 +66459,11 @@ function ac_confirmed$1(gobj, event, kw, src) {
|
|
|
66454
66459
|
nd = null;
|
|
66455
66460
|
}
|
|
66456
66461
|
if (nd && nd.data && nd.data.desc) nodes.push(nd);
|
|
66462
|
+
else missing.push(id);
|
|
66463
|
+
}
|
|
66464
|
+
if (missing.length) {
|
|
66465
|
+
log_error(`${gobj_short_name(gobj)}: ${event}: cards gone while confirming the delete, not deleted: ${missing.join(", ")}`);
|
|
66466
|
+
yui_shell_show_error(yui_shell_of(gobj), "some records were gone before the delete", { t });
|
|
66457
66467
|
}
|
|
66458
66468
|
if (!nodes.length) {
|
|
66459
66469
|
log_error(`${gobj_short_name(gobj)}: ${event} names no node any more`);
|
package/package.json
CHANGED
package/src/c_g6_nodes_tree.js
CHANGED
|
@@ -174,6 +174,7 @@ import {
|
|
|
174
174
|
} from "./g6_touch_gestures.js";
|
|
175
175
|
import {yui_theme_now, yui_watch_theme} from "./yui_theme.js";
|
|
176
176
|
import {yui_shell_of} from "./c_yui_shell.js";
|
|
177
|
+
import {yui_shell_show_error} from "./shell_modals.js";
|
|
177
178
|
|
|
178
179
|
/***************************************************************
|
|
179
180
|
* YuiToolbar — G6 Toolbar subclass that adds per-item className
|
|
@@ -11761,6 +11762,7 @@ function ac_confirmed(gobj, event, kw, src)
|
|
|
11761
11762
|
if(what === "delete_selection") {
|
|
11762
11763
|
let ids = (kw && Array.isArray(kw.ids))? kw.ids : [];
|
|
11763
11764
|
let nodes = [];
|
|
11765
|
+
let missing = [];
|
|
11764
11766
|
for(let id of ids) {
|
|
11765
11767
|
let nd = null;
|
|
11766
11768
|
try {
|
|
@@ -11770,8 +11772,18 @@ function ac_confirmed(gobj, event, kw, src)
|
|
|
11770
11772
|
}
|
|
11771
11773
|
if(nd && nd.data && nd.data.desc) {
|
|
11772
11774
|
nodes.push(nd);
|
|
11775
|
+
} else {
|
|
11776
|
+
missing.push(id);
|
|
11773
11777
|
}
|
|
11774
11778
|
}
|
|
11779
|
+
if(missing.length) {
|
|
11780
|
+
/* Gone while the question was open (another writer deleted
|
|
11781
|
+
* them): said, to the log and to the person (a low of the
|
|
11782
|
+
* 2026-09-22 review); the rest go on. */
|
|
11783
|
+
log_error(`${gobj_short_name(gobj)}: ${event}: cards gone while ` +
|
|
11784
|
+
`confirming the delete, not deleted: ${missing.join(", ")}`);
|
|
11785
|
+
yui_shell_show_error(yui_shell_of(gobj), "some records were gone before the delete", {t: t});
|
|
11786
|
+
}
|
|
11775
11787
|
if(!nodes.length) {
|
|
11776
11788
|
log_error(`${gobj_short_name(gobj)}: ${event} names no node any more`);
|
|
11777
11789
|
return -1;
|
|
@@ -110,6 +110,7 @@ import {
|
|
|
110
110
|
import {delete_impact} from "./delete_impact.js";
|
|
111
111
|
|
|
112
112
|
import "./c_yui_treedb_topic_with_form.css";
|
|
113
|
+
import {yui_shell_show_error} from "./shell_modals.js";
|
|
113
114
|
import {set_toolbar_busy} from "./form_busy.js";
|
|
114
115
|
import "./tabulator.css";
|
|
115
116
|
import {cell_text, hook_cell_spec} from "./table_cell_text.js";
|
|
@@ -3506,6 +3507,10 @@ function transform__form_value_2_treedb_value(gobj, col, value, operation)
|
|
|
3506
3507
|
case "string":
|
|
3507
3508
|
if(value && is_date(value)) {
|
|
3508
3509
|
value = value.toISOString();
|
|
3510
|
+
} else if(typeof value === "number" && value > 0) {
|
|
3511
|
+
/* The form hands an epoch in seconds (form_time_value);
|
|
3512
|
+
* a string column stores the instant as ISO text. */
|
|
3513
|
+
value = new Date(value * 1000).toISOString();
|
|
3509
3514
|
}
|
|
3510
3515
|
break;
|
|
3511
3516
|
case "integer":
|
|
@@ -4092,6 +4097,9 @@ function ac_confirmed(gobj, event, kw, src)
|
|
|
4092
4097
|
* them): never replaced by the row that took their place. */
|
|
4093
4098
|
log_error(`${gobj_short_name(gobj)}: ${event}: rows gone while ` +
|
|
4094
4099
|
`confirming the delete, not deleted: ${found.missing.join(", ")}`);
|
|
4100
|
+
/* The person who answered "yes" is told, not only the log
|
|
4101
|
+
* (a low of the 2026-09-22 review). */
|
|
4102
|
+
yui_shell_show_error(yui_shell_of(gobj), "some records were gone before the delete", {t: t});
|
|
4095
4103
|
}
|
|
4096
4104
|
if(!found.rows.length) {
|
|
4097
4105
|
return -1; /* Error already logged, or nothing was named */
|