@ai-matrx/records-ui 0.95.18 → 0.95.19
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 +6 -0
- package/dist/index.cjs +22 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +22 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -19771,9 +19771,27 @@ function GridBody({
|
|
|
19771
19771
|
return { written, readBack, missing, refusals };
|
|
19772
19772
|
}, [pastePlan, client, tableId, records, merged, applyPasteAsOne, versions]);
|
|
19773
19773
|
const columnIds = useMemo32(() => ordered.map((field2) => field2.key), [ordered]);
|
|
19774
|
+
const lookWrites = useRef26(null);
|
|
19774
19775
|
const writeLook = useCallback23(
|
|
19775
|
-
(next) =>
|
|
19776
|
-
|
|
19776
|
+
(next) => {
|
|
19777
|
+
if (!onPresentationChange) return;
|
|
19778
|
+
const held = lookWrites.current?.base === presentation ? lookWrites.current : null;
|
|
19779
|
+
const merged2 = { ...held?.merged ?? presentation };
|
|
19780
|
+
const before = presentation;
|
|
19781
|
+
const after = next;
|
|
19782
|
+
for (const key of /* @__PURE__ */ new Set([...Object.keys(before), ...Object.keys(after)])) {
|
|
19783
|
+
if (before[key] === after[key]) continue;
|
|
19784
|
+
if (after[key] === void 0) delete merged2[key];
|
|
19785
|
+
else merged2[key] = after[key];
|
|
19786
|
+
}
|
|
19787
|
+
const entry = { base: presentation, merged: merged2 };
|
|
19788
|
+
lookWrites.current = entry;
|
|
19789
|
+
queueMicrotask(() => {
|
|
19790
|
+
if (lookWrites.current === entry) lookWrites.current = null;
|
|
19791
|
+
});
|
|
19792
|
+
onPresentationChange(merged2);
|
|
19793
|
+
},
|
|
19794
|
+
[onPresentationChange, presentation]
|
|
19777
19795
|
);
|
|
19778
19796
|
const chooseSummary = useCallback23(
|
|
19779
19797
|
(key, op2) => {
|
|
@@ -19782,9 +19800,9 @@ function GridBody({
|
|
|
19782
19800
|
else next[key] = op2;
|
|
19783
19801
|
setLocalSummaries(next);
|
|
19784
19802
|
const { summaries: _dropped, ...rest } = presentation;
|
|
19785
|
-
|
|
19803
|
+
writeLook(Object.keys(next).length > 0 ? { ...rest, summaries: next } : rest);
|
|
19786
19804
|
},
|
|
19787
|
-
[chosenSummaries, presentation,
|
|
19805
|
+
[chosenSummaries, presentation, writeLook]
|
|
19788
19806
|
);
|
|
19789
19807
|
const handToAgent = useCallback23(
|
|
19790
19808
|
(action3, row) => host.runAgentAction?.({
|