@ai-matrx/records-ui 0.116.101 → 0.116.102
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/CHANGELOG.md +1 -1
- package/dist/index.cjs +31 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +31 -8
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.116.
|
|
3
|
+
## 0.116.102
|
|
4
4
|
|
|
5
5
|
- **Move under… and Also points at never move the dialog (lane CLOSE-LINK round 2, 2026-10-23).** `MoveUnderDialog` draws its search box before a table is picked (disabled, "Pick a table first"), and `AlsoPointsAt` keeps one fixed-height box for "Reading tables…", "No other tables yet." and the list, so nothing below shifts when the tables arrive. Guards: assertions in `a-record-moves-under-another-and-a-refused-move-says-why.test.tsx` and `every-table-picker-hides-value-sets.test.tsx` (red before). Consumer action: none.
|
|
6
6
|
|
package/dist/index.cjs
CHANGED
|
@@ -32424,6 +32424,25 @@ var import_design_system90 = require("@ai-matrx/design-system");
|
|
|
32424
32424
|
init_Refusal();
|
|
32425
32425
|
init_refusals();
|
|
32426
32426
|
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
32427
|
+
function keptWhileAway(outcome, readBackUnsent, readBackRefusal) {
|
|
32428
|
+
if (!readBackUnsent || outcome.written === 0) return outcome;
|
|
32429
|
+
const values = outcome.readBack + outcome.missing;
|
|
32430
|
+
return {
|
|
32431
|
+
...outcome,
|
|
32432
|
+
readBack: 0,
|
|
32433
|
+
missing: 0,
|
|
32434
|
+
waiting: values,
|
|
32435
|
+
refusals: readBackRefusal === void 0 ? outcome.refusals : outcome.refusals.filter((why) => why !== readBackRefusal)
|
|
32436
|
+
};
|
|
32437
|
+
}
|
|
32438
|
+
function outcomeSentence(outcome) {
|
|
32439
|
+
const waiting = outcome.waiting ?? 0;
|
|
32440
|
+
if (waiting > 0) {
|
|
32441
|
+
return `${waiting} ${waiting === 1 ? "value is" : "values are"} saved on this computer and will be sent to the table when you are back online.`;
|
|
32442
|
+
}
|
|
32443
|
+
const whole = outcome.missing === 0 && outcome.refusals.length === 0;
|
|
32444
|
+
return whole ? `All ${outcome.readBack} ${outcome.readBack === 1 ? "value is" : "values are"} in the table \u2014 read back out of it, not just accepted.` : `${outcome.readBack} of ${outcome.readBack + outcome.missing} values are in the table. The rest are not, and nothing was lost from what you copied \u2014 it is still on your clipboard.`;
|
|
32445
|
+
}
|
|
32427
32446
|
function PastePreview({
|
|
32428
32447
|
plan,
|
|
32429
32448
|
noun,
|
|
@@ -32566,8 +32585,9 @@ function PastePreview({
|
|
|
32566
32585
|
}
|
|
32567
32586
|
function Outcome({ outcome, onClose }) {
|
|
32568
32587
|
const whole = outcome.missing === 0 && outcome.refusals.length === 0;
|
|
32588
|
+
const look = (outcome.waiting ?? 0) > 0 ? "waiting" : whole ? "whole" : "partial";
|
|
32569
32589
|
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(import_jsx_runtime104.Fragment, { children: [
|
|
32570
|
-
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("p", { className: "text-sm", "data-matrx-paste-outcome":
|
|
32590
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("p", { className: "text-sm", "data-matrx-paste-outcome": look, children: outcomeSentence(outcome) }),
|
|
32571
32591
|
outcome.refusals.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("ul", { className: "flex flex-col gap-1", children: outcome.refusals.slice(0, 8).map((why, index) => /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("li", { className: "text-xs text-muted-foreground", children: why }, index)) }) : null,
|
|
32572
32592
|
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "flex justify-end pt-1", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_design_system90.Button, { size: "sm", onClick: onClose, autoFocus: true, children: "Close" }) })
|
|
32573
32593
|
] });
|
|
@@ -35867,7 +35887,8 @@ function GridBody({
|
|
|
35867
35887
|
let missing = 0;
|
|
35868
35888
|
const fieldOf2 = new Map((fields.data ?? []).map((f) => [f.key, f]));
|
|
35869
35889
|
const refusals = [];
|
|
35870
|
-
|
|
35890
|
+
const readBackRefusal = reread.ok ? void 0 : `The rows were written and this could not read them back to check: ${refusalSentence(reread.error)}`;
|
|
35891
|
+
if (readBackRefusal !== void 0) refusals.push(readBackRefusal);
|
|
35871
35892
|
const seen = new Map((reread.ok ? reread.data : []).map((r) => [r.id, r.document ?? {}]));
|
|
35872
35893
|
for (const entry of expected) {
|
|
35873
35894
|
const stored = seen.get(entry.recordId);
|
|
@@ -35877,7 +35898,7 @@ function GridBody({
|
|
|
35877
35898
|
}
|
|
35878
35899
|
}
|
|
35879
35900
|
records.reload();
|
|
35880
|
-
return { written: lines2, readBack, missing, refusals };
|
|
35901
|
+
return keptWhileAway({ written: lines2, readBack, missing, refusals }, !reread.ok && isUnsentWrite(reread.error), readBackRefusal);
|
|
35881
35902
|
},
|
|
35882
35903
|
[rows, client, tableId, editing, undo, records, versions, fields.data]
|
|
35883
35904
|
);
|
|
@@ -35909,7 +35930,7 @@ function GridBody({
|
|
|
35909
35930
|
if (!held) return { written: 0, readBack: 0, missing: 0, refusals: [] };
|
|
35910
35931
|
if (merged) {
|
|
35911
35932
|
const outcome = await applyPasteAsOne(held.plan);
|
|
35912
|
-
if (outcome.missing === 0 && outcome.refusals.length === 0) {
|
|
35933
|
+
if (outcome.missing === 0 && outcome.refusals.length === 0 && (outcome.waiting ?? 0) === 0) {
|
|
35913
35934
|
setPastePlan(null);
|
|
35914
35935
|
sheetController.current?.focusGrid();
|
|
35915
35936
|
}
|
|
@@ -35957,12 +35978,14 @@ function GridBody({
|
|
|
35957
35978
|
const fieldOf2 = new Map((fields.data ?? []).map((f) => [f.key, f]));
|
|
35958
35979
|
const seen = /* @__PURE__ */ new Map();
|
|
35959
35980
|
const READ_BACK_PAGE = 500;
|
|
35981
|
+
let readBackRefusal;
|
|
35982
|
+
let readBackUnsent = false;
|
|
35960
35983
|
for (let offset = 0; ; offset += READ_BACK_PAGE) {
|
|
35961
35984
|
const reread = await client.list({ table_id: tableId, limit: READ_BACK_PAGE, offset });
|
|
35962
35985
|
if (!reread.ok) {
|
|
35963
|
-
|
|
35964
|
-
|
|
35965
|
-
);
|
|
35986
|
+
readBackRefusal = `The rows were written and this could not read them back to check: ${refusalSentence(reread.error)}`;
|
|
35987
|
+
readBackUnsent = isUnsentWrite(reread.error);
|
|
35988
|
+
refusals.push(readBackRefusal);
|
|
35966
35989
|
break;
|
|
35967
35990
|
}
|
|
35968
35991
|
for (const row of reread.data.rows) {
|
|
@@ -35982,7 +36005,7 @@ function GridBody({
|
|
|
35982
36005
|
}
|
|
35983
36006
|
}
|
|
35984
36007
|
records.reload();
|
|
35985
|
-
return { written, readBack, missing, refusals };
|
|
36008
|
+
return keptWhileAway({ written, readBack, missing, refusals }, readBackUnsent, readBackRefusal);
|
|
35986
36009
|
}, [pastePlan, client, tableId, records, merged, applyPasteAsOne, versions, fields.data]);
|
|
35987
36010
|
const columnIds = (0, import_react197.useMemo)(() => ordered.map((field2) => field2.key), [ordered]);
|
|
35988
36011
|
const lookWrites = (0, import_react197.useRef)(null);
|