@ai-matrx/records-ui 0.115.60 → 0.115.62
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 +18 -0
- package/dist/index.cjs +10 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +313 -304
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,29 @@
|
|
|
1
1
|
# Changelog — @ai-matrx/records-ui
|
|
2
2
|
|
|
3
|
+
## 0.115.62
|
|
4
|
+
|
|
5
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
|
+
`git diff npm/records-ui/v0.115.61..npm/records-ui/v0.115.62 -- apps/shared/records-ui`).
|
|
7
|
+
No source changes intended and no consumer action required.
|
|
8
|
+
|
|
9
|
+
## 0.115.61
|
|
10
|
+
|
|
11
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
12
|
+
`git diff npm/records-ui/v0.115.60..npm/records-ui/v0.115.61 -- apps/shared/records-ui`).
|
|
13
|
+
No source changes intended and no consumer action required.
|
|
14
|
+
|
|
3
15
|
## 0.115.60
|
|
4
16
|
|
|
5
17
|
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
18
|
`git diff npm/records-ui/v0.115.59..npm/records-ui/v0.115.60 -- apps/shared/records-ui`).
|
|
7
19
|
No source changes intended and no consumer action required.
|
|
8
20
|
|
|
21
|
+
## 0.115.59
|
|
22
|
+
|
|
23
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
24
|
+
`git diff npm/records-ui/v0.115.58..npm/records-ui/v0.115.59 -- apps/shared/records-ui`).
|
|
25
|
+
No source changes intended and no consumer action required.
|
|
26
|
+
|
|
9
27
|
## 0.115.58
|
|
10
28
|
|
|
11
29
|
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
package/dist/index.cjs
CHANGED
|
@@ -30765,7 +30765,7 @@ async function sha256Text(text) {
|
|
|
30765
30765
|
function typeWord2(t) {
|
|
30766
30766
|
return fieldTypeChoice(t)?.label ?? t;
|
|
30767
30767
|
}
|
|
30768
|
-
function SaveToTable({ source, shapeIndex = 0, onOpenTable, onSaved, onClose, className }) {
|
|
30768
|
+
function SaveToTable({ source, shapeIndex = 0, onOpenTable, onSaved, onClose, makeAtOnce = false, className }) {
|
|
30769
30769
|
const client = (0, import_react168.useRecordsClient)();
|
|
30770
30770
|
const shapes = (0, import_react167.useMemo)(() => shapesOfSource(source), [source]);
|
|
30771
30771
|
const [which, setWhich] = (0, import_react167.useState)(() => Math.min(Math.max(0, shapeIndex), Math.max(0, shapes.length - 1)));
|
|
@@ -30795,6 +30795,14 @@ function SaveToTable({ source, shapeIndex = 0, onOpenTable, onSaved, onClose, cl
|
|
|
30795
30795
|
const [phase, setPhase] = (0, import_react167.useState)("ready");
|
|
30796
30796
|
const [made, setMade] = (0, import_react167.useState)(null);
|
|
30797
30797
|
const sourceName = source.title?.trim() || shape?.name || "the rows above";
|
|
30798
|
+
const makeRef = (0, import_react167.useRef)(null);
|
|
30799
|
+
const madeAtOnce = (0, import_react167.useRef)(false);
|
|
30800
|
+
const tablesKnown = tables.data !== void 0;
|
|
30801
|
+
(0, import_react167.useEffect)(() => {
|
|
30802
|
+
if (!makeAtOnce || madeAtOnce.current || !shape || !tablesKnown || !makeRef.current) return;
|
|
30803
|
+
madeAtOnce.current = true;
|
|
30804
|
+
void makeRef.current();
|
|
30805
|
+
}, [makeAtOnce, shape, tablesKnown]);
|
|
30798
30806
|
const sourceText = (0, import_react167.useMemo)(() => JSON.stringify({ headers, rows }), [headers, rows]);
|
|
30799
30807
|
const wizardSource = (0, import_react167.useMemo)(
|
|
30800
30808
|
() => ({ name: sourceName, parsed: { headers, rows }, text: sourceText }),
|
|
@@ -30904,6 +30912,7 @@ function SaveToTable({ source, shapeIndex = 0, onOpenTable, onSaved, onClose, cl
|
|
|
30904
30912
|
setPhase("ready");
|
|
30905
30913
|
}
|
|
30906
30914
|
};
|
|
30915
|
+
makeRef.current = make;
|
|
30907
30916
|
const busy = phase === "making" || phase === "writing";
|
|
30908
30917
|
return /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: (0, import_design_system85.cn)("flex min-w-0 flex-col gap-3 text-sm", className), "data-save-to-table": "", children: [
|
|
30909
30918
|
/* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "flex flex-wrap items-center gap-2", children: [
|