@ai-matrx/records-ui 0.115.40 → 0.115.42
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 +162 -108
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +196 -141
- package/dist/index.js.map +1 -1
- package/dist/pickers.cjs +1 -1
- package/dist/pickers.cjs.map +1 -1
- package/dist/pickers.js +1 -1
- package/dist/pickers.js.map +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -2018,7 +2018,7 @@ function RefusalLine({ error, className }) {
|
|
|
2018
2018
|
ErrorBox2,
|
|
2019
2019
|
{
|
|
2020
2020
|
"data-refusal-line": "",
|
|
2021
|
-
className: cn3("text-xs text-destructive", className),
|
|
2021
|
+
className: cn3("whitespace-normal break-words text-xs text-destructive [overflow-wrap:anywhere]", className),
|
|
2022
2022
|
message: archivedOrganizationId(error) ? "This organization is archived. An owner can restore it." : refusalLineForAPerson(error),
|
|
2023
2023
|
error,
|
|
2024
2024
|
origin: "records-ui/RefusalLine",
|
|
@@ -11403,6 +11403,102 @@ function useWhoChanged(fieldKey, recordId) {
|
|
|
11403
11403
|
};
|
|
11404
11404
|
}
|
|
11405
11405
|
|
|
11406
|
+
// src/gridHeldKeys.ts
|
|
11407
|
+
function isHeldKey(e) {
|
|
11408
|
+
if (e.metaKey || e.ctrlKey || e.altKey) return false;
|
|
11409
|
+
return e.key.length === 1 || e.key === "Tab" || e.key === "Enter" || e.key === "Backspace";
|
|
11410
|
+
}
|
|
11411
|
+
function splitHeldKeys(held) {
|
|
11412
|
+
let seed = "";
|
|
11413
|
+
let i = 0;
|
|
11414
|
+
for (; i < held.length; i++) {
|
|
11415
|
+
const k = held[i];
|
|
11416
|
+
if (k.key === "Tab" || k.key === "Enter") break;
|
|
11417
|
+
if (k.key === "Backspace") seed = seed.slice(0, -1);
|
|
11418
|
+
else seed += k.key;
|
|
11419
|
+
}
|
|
11420
|
+
return { seed, rest: held.slice(i) };
|
|
11421
|
+
}
|
|
11422
|
+
var EDITOR = "[data-matrx-cell-editor]";
|
|
11423
|
+
var CATCHER = "[data-matrx-type-catcher]";
|
|
11424
|
+
function typeInto(box, ch) {
|
|
11425
|
+
const proto = box instanceof HTMLTextAreaElement ? HTMLTextAreaElement.prototype : HTMLInputElement.prototype;
|
|
11426
|
+
const setValue = Object.getOwnPropertyDescriptor(proto, "value")?.set;
|
|
11427
|
+
const start = box.selectionStart ?? box.value.length;
|
|
11428
|
+
const end = box.selectionEnd ?? box.value.length;
|
|
11429
|
+
setValue?.call(box, box.value.slice(0, start) + ch + box.value.slice(end));
|
|
11430
|
+
box.setSelectionRange?.(start + ch.length, start + ch.length);
|
|
11431
|
+
box.dispatchEvent(new Event("input", { bubbles: true }));
|
|
11432
|
+
}
|
|
11433
|
+
function editorBox(scope) {
|
|
11434
|
+
const active = typeof document !== "undefined" ? document.activeElement : null;
|
|
11435
|
+
if ((active instanceof HTMLInputElement || active instanceof HTMLTextAreaElement) && active.closest(EDITOR)) return active;
|
|
11436
|
+
return scope.querySelector(
|
|
11437
|
+
`${EDITOR} textarea, ${EDITOR} input[type=text], ${EDITOR} input:not([type])`
|
|
11438
|
+
);
|
|
11439
|
+
}
|
|
11440
|
+
function holdKeys() {
|
|
11441
|
+
const held = [];
|
|
11442
|
+
const queue = [];
|
|
11443
|
+
const ours = /* @__PURE__ */ new WeakSet();
|
|
11444
|
+
const hold = (e) => {
|
|
11445
|
+
if (e.key === "Escape" && !ours.has(e)) {
|
|
11446
|
+
held.length = 0;
|
|
11447
|
+
queue.length = 0;
|
|
11448
|
+
return;
|
|
11449
|
+
}
|
|
11450
|
+
if (ours.has(e) || !isHeldKey(e)) return;
|
|
11451
|
+
const target = e.target instanceof Element ? e.target : null;
|
|
11452
|
+
if (target && target.closest("input, textarea, [contenteditable=true]") && !target.closest(`${CATCHER}, ${EDITOR}`)) return;
|
|
11453
|
+
e.preventDefault();
|
|
11454
|
+
e.stopPropagation();
|
|
11455
|
+
held.push({ key: e.key, shiftKey: e.shiftKey });
|
|
11456
|
+
};
|
|
11457
|
+
window.addEventListener("keydown", hold, true);
|
|
11458
|
+
let released = false;
|
|
11459
|
+
const release = () => {
|
|
11460
|
+
if (!released) window.removeEventListener("keydown", hold, true);
|
|
11461
|
+
released = true;
|
|
11462
|
+
return [...queue.splice(0), ...held.splice(0)];
|
|
11463
|
+
};
|
|
11464
|
+
const takeSeed = () => {
|
|
11465
|
+
const first = splitHeldKeys(held.splice(0));
|
|
11466
|
+
queue.push(...first.rest);
|
|
11467
|
+
return first.seed;
|
|
11468
|
+
};
|
|
11469
|
+
const deliver = async (scope) => {
|
|
11470
|
+
const editorOpen = () => Boolean(scope.querySelector(EDITOR));
|
|
11471
|
+
const until = async (done) => {
|
|
11472
|
+
for (let i = 0; i < 100 && !done(); i++) await new Promise((r) => setTimeout(r, 30));
|
|
11473
|
+
};
|
|
11474
|
+
await until(editorOpen);
|
|
11475
|
+
for (; ; ) {
|
|
11476
|
+
if (held.length > 0) queue.push(...held.splice(0));
|
|
11477
|
+
const next = queue.shift();
|
|
11478
|
+
if (!next) {
|
|
11479
|
+
await new Promise((r) => setTimeout(r, 60));
|
|
11480
|
+
if (held.length === 0) break;
|
|
11481
|
+
continue;
|
|
11482
|
+
}
|
|
11483
|
+
const wasOpen = editorOpen();
|
|
11484
|
+
const box = wasOpen ? editorBox(scope) : null;
|
|
11485
|
+
const catcher = !wasOpen ? scope.querySelector(CATCHER) : null;
|
|
11486
|
+
if (next.key.length === 1 && (box || catcher)) {
|
|
11487
|
+
typeInto(box ?? catcher, next.key);
|
|
11488
|
+
} else {
|
|
11489
|
+
const event = new KeyboardEvent("keydown", { key: next.key, shiftKey: next.shiftKey, bubbles: true, cancelable: true });
|
|
11490
|
+
ours.add(event);
|
|
11491
|
+
const to = box ?? catcher ?? document.activeElement ?? null;
|
|
11492
|
+
to?.dispatchEvent(event);
|
|
11493
|
+
}
|
|
11494
|
+
if (next.key === "Tab" || next.key === "Enter") await until(() => !editorOpen());
|
|
11495
|
+
else if (!wasOpen && next.key.length === 1) await until(editorOpen);
|
|
11496
|
+
else await new Promise((r) => setTimeout(r, 15));
|
|
11497
|
+
}
|
|
11498
|
+
};
|
|
11499
|
+
return { release, deliver, takeSeed };
|
|
11500
|
+
}
|
|
11501
|
+
|
|
11406
11502
|
// src/unsentWrites.ts
|
|
11407
11503
|
import { useEffect as useEffect24, useRef as useRef20 } from "react";
|
|
11408
11504
|
var UNSENT_LINE = "Not saved";
|
|
@@ -11924,20 +12020,29 @@ function useGridEditing({ tableId, fields, rows, reload, reloadAfterWrite, canWr
|
|
|
11924
12020
|
const addRecord = useCallback10(async () => {
|
|
11925
12021
|
setBusy(true);
|
|
11926
12022
|
setRowError(null);
|
|
12023
|
+
const hold = holdKeys();
|
|
11927
12024
|
const written = await client.recordWrite({ table_id: tableId, data: {} });
|
|
11928
12025
|
setBusy(false);
|
|
11929
12026
|
if (!written.ok) {
|
|
12027
|
+
hold.release();
|
|
11930
12028
|
setRowError(written.error);
|
|
11931
12029
|
return written.error;
|
|
11932
12030
|
}
|
|
11933
12031
|
reload();
|
|
11934
12032
|
const first = order[0];
|
|
12033
|
+
if (!first) hold.release();
|
|
11935
12034
|
if (first) {
|
|
11936
12035
|
startedFrom.current = void 0;
|
|
11937
|
-
const
|
|
12036
|
+
const seed = hold.takeSeed();
|
|
12037
|
+
const opened = seed === "" ? openingDraft(first, void 0) : seed;
|
|
11938
12038
|
typed2.current = opened;
|
|
11939
12039
|
setDraft(opened);
|
|
11940
12040
|
setEditing({ rowId: written.data, key: first });
|
|
12041
|
+
try {
|
|
12042
|
+
await hold.deliver(document);
|
|
12043
|
+
} finally {
|
|
12044
|
+
hold.release();
|
|
12045
|
+
}
|
|
11941
12046
|
}
|
|
11942
12047
|
return null;
|
|
11943
12048
|
}, [client, tableId, reload, order, fields]);
|
|
@@ -13439,8 +13544,9 @@ function SplitRecordDialog({ tableId, record, document: document2, open, onOpenC
|
|
|
13439
13544
|
setMoving(/* @__PURE__ */ new Set());
|
|
13440
13545
|
onOpenChange(false);
|
|
13441
13546
|
onChanged?.();
|
|
13442
|
-
const made = await client.
|
|
13443
|
-
const
|
|
13547
|
+
const made = await client.listByIds({ table_id: tableId, ids: [created] });
|
|
13548
|
+
const madeRow = made.ok ? made.data.find((r) => r.id === created) : void 0;
|
|
13549
|
+
const madeDoc = madeRow?.document ?? {};
|
|
13444
13550
|
const fieldKeys = new Set((fields.data ?? []).map((f) => f.key));
|
|
13445
13551
|
const titleKey = table.data?.title_field ?? (["name", "title"].find((k) => fieldKeys.has(k)) ?? null);
|
|
13446
13552
|
const titleHeld = titleKey !== null && typeof madeDoc[titleKey] === "string" && String(madeDoc[titleKey]).trim() !== "";
|
|
@@ -13537,6 +13643,7 @@ import {
|
|
|
13537
13643
|
DialogFooter as DialogFooter3,
|
|
13538
13644
|
DialogHeader as DialogHeader4,
|
|
13539
13645
|
DialogTitle as DialogTitle4,
|
|
13646
|
+
Input,
|
|
13540
13647
|
Skeleton as Skeleton5
|
|
13541
13648
|
} from "@ai-matrx/design-system";
|
|
13542
13649
|
|
|
@@ -13868,14 +13975,17 @@ function ExtractParentDialog({ tableId, record, document: document2, open, onOpe
|
|
|
13868
13975
|
const [parentId, setParentId] = useState41(null);
|
|
13869
13976
|
const parentFields = useFields5(parentId ?? tableId);
|
|
13870
13977
|
const parentTable = useTable5(parentId ?? tableId);
|
|
13978
|
+
const homeTable = useTable5(tableId);
|
|
13979
|
+
const [parentNameTyped, setParentNameTyped] = useState41("");
|
|
13871
13980
|
const [copying, setCopying] = useState41(/* @__PURE__ */ new Set());
|
|
13872
13981
|
const [busy, setBusy] = useState41(false);
|
|
13873
13982
|
const [refusal3, setRefusal] = useState41(null);
|
|
13874
13983
|
const doc = document2 ?? {};
|
|
13875
13984
|
const pickable = useMemo18(() => {
|
|
13876
|
-
const home = tables.rows.find((t) => t.table_id === tableId)?.organization_id;
|
|
13877
|
-
return { ...tables, rows:
|
|
13878
|
-
|
|
13985
|
+
const home = tables.rows.find((t) => t.table_id === tableId)?.organization_id ?? homeTable.data?.organization_id;
|
|
13986
|
+
if (home === void 0) return { ...tables, rows: [], loading: tables.loading || homeTable.loading };
|
|
13987
|
+
return { ...tables, rows: tables.rows.filter((t) => t.table_id !== tableId && t.organization_id === home) };
|
|
13988
|
+
}, [tables, tableId, homeTable.data, homeTable.loading]);
|
|
13879
13989
|
const shared = useMemo18(() => {
|
|
13880
13990
|
if (!parentId) return [];
|
|
13881
13991
|
const there = new Set((parentFields.data ?? []).map((f) => f.key));
|
|
@@ -13888,12 +13998,14 @@ function ExtractParentDialog({ tableId, record, document: document2, open, onOpe
|
|
|
13888
13998
|
if (!next) {
|
|
13889
13999
|
setParentId(null);
|
|
13890
14000
|
setCopying(/* @__PURE__ */ new Set());
|
|
14001
|
+
setParentNameTyped("");
|
|
13891
14002
|
setRefusal(null);
|
|
13892
14003
|
}
|
|
13893
14004
|
onOpenChange(next);
|
|
13894
14005
|
};
|
|
13895
14006
|
const pick = (id) => {
|
|
13896
14007
|
setParentId(id);
|
|
14008
|
+
setParentNameTyped("");
|
|
13897
14009
|
setCopying(/* @__PURE__ */ new Set());
|
|
13898
14010
|
setRefusal(null);
|
|
13899
14011
|
};
|
|
@@ -13903,8 +14015,14 @@ function ExtractParentDialog({ tableId, record, document: document2, open, onOpe
|
|
|
13903
14015
|
else next.delete(key);
|
|
13904
14016
|
return next;
|
|
13905
14017
|
});
|
|
14018
|
+
const typedName = parentNameTyped.trim();
|
|
14019
|
+
const hasChoice = copying.size > 0 || typedName !== "";
|
|
13906
14020
|
const extract = async () => {
|
|
13907
14021
|
if (!parentId) return;
|
|
14022
|
+
if (!hasChoice) {
|
|
14023
|
+
setRefusal({ code: "invalid", message: "Tick at least one value to copy up, or name the new parent.", hint: "", ours: true });
|
|
14024
|
+
return;
|
|
14025
|
+
}
|
|
13908
14026
|
setBusy(true);
|
|
13909
14027
|
setRefusal(null);
|
|
13910
14028
|
const done = await client.migrateExtractParent({
|
|
@@ -13924,9 +14042,17 @@ function ExtractParentDialog({ tableId, record, document: document2, open, onOpe
|
|
|
13924
14042
|
setCopying(/* @__PURE__ */ new Set());
|
|
13925
14043
|
onOpenChange(false);
|
|
13926
14044
|
onChanged?.();
|
|
13927
|
-
const made = await client.
|
|
13928
|
-
const madeDoc = made.ok ? made.data.
|
|
13929
|
-
|
|
14045
|
+
const made = await client.listByIds({ table_id: parentTableId, ids: [created] });
|
|
14046
|
+
const madeDoc = (made.ok ? made.data.find((r) => r.id === created)?.document : void 0) ?? {};
|
|
14047
|
+
let madeName = recordNameIn(parentTable.data ?? null, madeDoc, `New ${parentName}`);
|
|
14048
|
+
const parentTitleKey = parentTable.data?.title_field ?? (["name", "title"].find((k) => (parentFields.data ?? []).some((f) => f.key === k)) ?? null);
|
|
14049
|
+
if (typedName !== "" && parentTitleKey !== null) {
|
|
14050
|
+
const renamed = await (0, recordVersions_exports.updateRecordAt)(client, { record_id: created, patch: { [parentTitleKey]: typedName }, version: await (0, recordVersions_exports.readVersionNow)(client, created) });
|
|
14051
|
+
if (renamed.ok) {
|
|
14052
|
+
madeName = typedName;
|
|
14053
|
+
onChanged?.();
|
|
14054
|
+
}
|
|
14055
|
+
}
|
|
13930
14056
|
const undo = async () => {
|
|
13931
14057
|
const back = await client.migrateUndo({ migration_id: migration });
|
|
13932
14058
|
if (!back.ok) throw new Error(refusalSentence(back.error));
|
|
@@ -13983,10 +14109,21 @@ function ExtractParentDialog({ tableId, record, document: document2, open, onOpe
|
|
|
13983
14109
|
/* @__PURE__ */ jsx52("span", { className: "shrink-0 font-medium", children: fieldName(f) }),
|
|
13984
14110
|
/* @__PURE__ */ jsx52("span", { className: "min-w-0 truncate text-muted-foreground", children: valueWords(doc[f.key]) })
|
|
13985
14111
|
] }) }, f.key)) }) }),
|
|
14112
|
+
parentId ? /* @__PURE__ */ jsx52(
|
|
14113
|
+
Input,
|
|
14114
|
+
{
|
|
14115
|
+
value: parentNameTyped,
|
|
14116
|
+
onChange: (e) => setParentNameTyped(e.target.value),
|
|
14117
|
+
placeholder: `Name for the new ${parentName}`,
|
|
14118
|
+
"aria-label": "Name for the new parent",
|
|
14119
|
+
disabled: busy,
|
|
14120
|
+
"data-records-extract-name": ""
|
|
14121
|
+
}
|
|
14122
|
+
) : null,
|
|
13986
14123
|
refusal3 ? /* @__PURE__ */ jsx52(RefusalNotice, { error: refusal3 }) : null,
|
|
13987
14124
|
/* @__PURE__ */ jsxs46(DialogFooter3, { children: [
|
|
13988
14125
|
/* @__PURE__ */ jsx52(Button25, { variant: "ghost", size: "sm", onClick: () => close(false), disabled: busy, children: "Cancel" }),
|
|
13989
|
-
/* @__PURE__ */ jsx52(Button25, { size: "sm", onClick: () => void extract(), disabled: !parentId || loadingShared || busy, "data-records-extract-go": "", children: busy ? "Extracting\u2026" : "Extract" })
|
|
14126
|
+
/* @__PURE__ */ jsx52(Button25, { size: "sm", onClick: () => void extract(), disabled: !parentId || loadingShared || busy || !hasChoice, "data-records-extract-go": "", children: busy ? "Extracting\u2026" : "Extract" })
|
|
13990
14127
|
] })
|
|
13991
14128
|
] }) });
|
|
13992
14129
|
}
|
|
@@ -17354,7 +17491,7 @@ function useMergedGridControls(args) {
|
|
|
17354
17491
|
},
|
|
17355
17492
|
variant: "destructive",
|
|
17356
17493
|
title: dialog?.kind === "delete" ? `Delete the ${fieldName(dialog.field)} column?` : "Delete this column?",
|
|
17357
|
-
description: mutation.error && dialog?.kind === "delete" ? `The store kept the column: ${refusalSentence(mutation.error)}` : "
|
|
17494
|
+
description: mutation.error && dialog?.kind === "delete" ? `The store kept the column: ${refusalSentence(mutation.error)}` : "Removes it from the table and every view. Its values stay in record history; anything still using it is named.",
|
|
17358
17495
|
confirmLabel: "Delete column",
|
|
17359
17496
|
cancelLabel: "Keep",
|
|
17360
17497
|
busy: deleteBusy,
|
|
@@ -17462,7 +17599,7 @@ import { humanizeIdentifier as humanizeIdentifier6 } from "@ai-matrx/kit/text-ca
|
|
|
17462
17599
|
// src/StandardRecordForm.tsx
|
|
17463
17600
|
import { useState as useState53 } from "react";
|
|
17464
17601
|
import { useEntityRecord as useEntityRecord2, useRecordsClient as useRecordsClient29 } from "@ai-matrx/records/react";
|
|
17465
|
-
import { Input, Textarea as Textarea2, cn as cn33 } from "@ai-matrx/design-system";
|
|
17602
|
+
import { Input as Input2, Textarea as Textarea2, cn as cn33 } from "@ai-matrx/design-system";
|
|
17466
17603
|
|
|
17467
17604
|
// src/CustomFieldsSection.tsx
|
|
17468
17605
|
import { useEffect as useEffect39, useMemo as useMemo25, useRef as useRef27, useState as useState52 } from "react";
|
|
@@ -17977,7 +18114,7 @@ function StandardRecordForm({ token: token2, recordId, columns, onSaved, classNa
|
|
|
17977
18114
|
}
|
|
17978
18115
|
}
|
|
17979
18116
|
) : /* @__PURE__ */ jsx65(
|
|
17980
|
-
|
|
18117
|
+
Input2,
|
|
17981
18118
|
{
|
|
17982
18119
|
id,
|
|
17983
18120
|
autoFocus: true,
|
|
@@ -19169,7 +19306,7 @@ import {
|
|
|
19169
19306
|
HoverCard,
|
|
19170
19307
|
HoverCardContent,
|
|
19171
19308
|
HoverCardTrigger,
|
|
19172
|
-
Input as
|
|
19309
|
+
Input as Input3,
|
|
19173
19310
|
Label as Label14,
|
|
19174
19311
|
Skeleton as Skeleton6,
|
|
19175
19312
|
Switch,
|
|
@@ -19385,7 +19522,7 @@ function EnrichPanel({ tableId, fieldId, className }) {
|
|
|
19385
19522
|
/* @__PURE__ */ jsxs62("div", { className: "space-y-1", children: [
|
|
19386
19523
|
/* @__PURE__ */ jsx68(Label14, { className: "text-xs", htmlFor: "new-instruction", children: "What goes in this column" }),
|
|
19387
19524
|
/* @__PURE__ */ jsx68(
|
|
19388
|
-
|
|
19525
|
+
Input3,
|
|
19389
19526
|
{
|
|
19390
19527
|
id: "new-instruction",
|
|
19391
19528
|
value: setup.instruction,
|
|
@@ -19398,7 +19535,7 @@ function EnrichPanel({ tableId, fieldId, className }) {
|
|
|
19398
19535
|
/* @__PURE__ */ jsxs62("div", { className: "space-y-1", children: [
|
|
19399
19536
|
/* @__PURE__ */ jsx68(Label14, { className: "text-xs", htmlFor: "new-every", children: "Look at each one again after" }),
|
|
19400
19537
|
/* @__PURE__ */ jsx68(
|
|
19401
|
-
|
|
19538
|
+
Input3,
|
|
19402
19539
|
{
|
|
19403
19540
|
id: "new-every",
|
|
19404
19541
|
value: setup.every,
|
|
@@ -19467,7 +19604,7 @@ function EnrichPanel({ tableId, fieldId, className }) {
|
|
|
19467
19604
|
/* @__PURE__ */ jsxs62("div", { className: "space-y-1", children: [
|
|
19468
19605
|
/* @__PURE__ */ jsx68(Label14, { className: "text-xs", htmlFor: `instr-${row.field_id}`, children: "What goes in this column" }),
|
|
19469
19606
|
/* @__PURE__ */ jsx68(
|
|
19470
|
-
|
|
19607
|
+
Input3,
|
|
19471
19608
|
{
|
|
19472
19609
|
id: `instr-${row.field_id}`,
|
|
19473
19610
|
value: d.instruction,
|
|
@@ -19492,7 +19629,7 @@ function EnrichPanel({ tableId, fieldId, className }) {
|
|
|
19492
19629
|
/* @__PURE__ */ jsxs62("div", { className: "space-y-1", children: [
|
|
19493
19630
|
/* @__PURE__ */ jsx68(Label14, { className: "text-xs", htmlFor: `every-${row.field_id}`, children: "Look at each one again after" }),
|
|
19494
19631
|
/* @__PURE__ */ jsx68(
|
|
19495
|
-
|
|
19632
|
+
Input3,
|
|
19496
19633
|
{
|
|
19497
19634
|
id: `every-${row.field_id}`,
|
|
19498
19635
|
value: d.every,
|
|
@@ -23720,97 +23857,6 @@ function useRowFollowsItsMove(args) {
|
|
|
23720
23857
|
return { noteWrite };
|
|
23721
23858
|
}
|
|
23722
23859
|
|
|
23723
|
-
// src/gridHeldKeys.ts
|
|
23724
|
-
function isHeldKey(e) {
|
|
23725
|
-
if (e.metaKey || e.ctrlKey || e.altKey) return false;
|
|
23726
|
-
return e.key.length === 1 || e.key === "Tab" || e.key === "Enter" || e.key === "Backspace";
|
|
23727
|
-
}
|
|
23728
|
-
function splitHeldKeys(held) {
|
|
23729
|
-
let seed = "";
|
|
23730
|
-
let i = 0;
|
|
23731
|
-
for (; i < held.length; i++) {
|
|
23732
|
-
const k = held[i];
|
|
23733
|
-
if (k.key === "Tab" || k.key === "Enter") break;
|
|
23734
|
-
if (k.key === "Backspace") seed = seed.slice(0, -1);
|
|
23735
|
-
else seed += k.key;
|
|
23736
|
-
}
|
|
23737
|
-
return { seed, rest: held.slice(i) };
|
|
23738
|
-
}
|
|
23739
|
-
var EDITOR = "[data-matrx-cell-editor]";
|
|
23740
|
-
var CATCHER = "[data-matrx-type-catcher]";
|
|
23741
|
-
function typeInto(box, ch) {
|
|
23742
|
-
const proto = box instanceof HTMLTextAreaElement ? HTMLTextAreaElement.prototype : HTMLInputElement.prototype;
|
|
23743
|
-
const setValue = Object.getOwnPropertyDescriptor(proto, "value")?.set;
|
|
23744
|
-
const start = box.selectionStart ?? box.value.length;
|
|
23745
|
-
const end = box.selectionEnd ?? box.value.length;
|
|
23746
|
-
setValue?.call(box, box.value.slice(0, start) + ch + box.value.slice(end));
|
|
23747
|
-
box.setSelectionRange?.(start + ch.length, start + ch.length);
|
|
23748
|
-
box.dispatchEvent(new Event("input", { bubbles: true }));
|
|
23749
|
-
}
|
|
23750
|
-
function editorBox(scope) {
|
|
23751
|
-
const active = typeof document !== "undefined" ? document.activeElement : null;
|
|
23752
|
-
if ((active instanceof HTMLInputElement || active instanceof HTMLTextAreaElement) && active.closest(EDITOR)) return active;
|
|
23753
|
-
return scope.querySelector(
|
|
23754
|
-
`${EDITOR} textarea, ${EDITOR} input[type=text], ${EDITOR} input:not([type])`
|
|
23755
|
-
);
|
|
23756
|
-
}
|
|
23757
|
-
function holdKeys() {
|
|
23758
|
-
const held = [];
|
|
23759
|
-
const queue = [];
|
|
23760
|
-
const ours = /* @__PURE__ */ new WeakSet();
|
|
23761
|
-
const hold = (e) => {
|
|
23762
|
-
if (ours.has(e) || !isHeldKey(e)) return;
|
|
23763
|
-
const target = e.target instanceof Element ? e.target : null;
|
|
23764
|
-
if (target && target.closest("input, textarea, [contenteditable=true]") && !target.closest(`${CATCHER}, ${EDITOR}`)) return;
|
|
23765
|
-
e.preventDefault();
|
|
23766
|
-
e.stopPropagation();
|
|
23767
|
-
held.push({ key: e.key, shiftKey: e.shiftKey });
|
|
23768
|
-
};
|
|
23769
|
-
window.addEventListener("keydown", hold, true);
|
|
23770
|
-
let released = false;
|
|
23771
|
-
const release = () => {
|
|
23772
|
-
if (!released) window.removeEventListener("keydown", hold, true);
|
|
23773
|
-
released = true;
|
|
23774
|
-
return [...queue.splice(0), ...held.splice(0)];
|
|
23775
|
-
};
|
|
23776
|
-
const takeSeed = () => {
|
|
23777
|
-
const first = splitHeldKeys(held.splice(0));
|
|
23778
|
-
queue.push(...first.rest);
|
|
23779
|
-
return first.seed;
|
|
23780
|
-
};
|
|
23781
|
-
const deliver = async (scope) => {
|
|
23782
|
-
const editorOpen = () => Boolean(scope.querySelector(EDITOR));
|
|
23783
|
-
const until = async (done) => {
|
|
23784
|
-
for (let i = 0; i < 100 && !done(); i++) await new Promise((r) => setTimeout(r, 30));
|
|
23785
|
-
};
|
|
23786
|
-
await until(editorOpen);
|
|
23787
|
-
for (; ; ) {
|
|
23788
|
-
if (held.length > 0) queue.push(...held.splice(0));
|
|
23789
|
-
const next = queue.shift();
|
|
23790
|
-
if (!next) {
|
|
23791
|
-
await new Promise((r) => setTimeout(r, 60));
|
|
23792
|
-
if (held.length === 0) break;
|
|
23793
|
-
continue;
|
|
23794
|
-
}
|
|
23795
|
-
const wasOpen = editorOpen();
|
|
23796
|
-
const box = wasOpen ? editorBox(scope) : null;
|
|
23797
|
-
const catcher = !wasOpen ? scope.querySelector(CATCHER) : null;
|
|
23798
|
-
if (next.key.length === 1 && (box || catcher)) {
|
|
23799
|
-
typeInto(box ?? catcher, next.key);
|
|
23800
|
-
} else {
|
|
23801
|
-
const event = new KeyboardEvent("keydown", { key: next.key, shiftKey: next.shiftKey, bubbles: true, cancelable: true });
|
|
23802
|
-
ours.add(event);
|
|
23803
|
-
const to = box ?? catcher ?? document.activeElement ?? null;
|
|
23804
|
-
to?.dispatchEvent(event);
|
|
23805
|
-
}
|
|
23806
|
-
if (next.key === "Tab" || next.key === "Enter") await until(() => !editorOpen());
|
|
23807
|
-
else if (!wasOpen && next.key.length === 1) await until(editorOpen);
|
|
23808
|
-
else await new Promise((r) => setTimeout(r, 15));
|
|
23809
|
-
}
|
|
23810
|
-
};
|
|
23811
|
-
return { release, deliver, takeSeed };
|
|
23812
|
-
}
|
|
23813
|
-
|
|
23814
23860
|
// src/gridAssist.tsx
|
|
23815
23861
|
import { copyText } from "@ai-matrx/kit/clipboard";
|
|
23816
23862
|
import { useCallback as useCallback25, useEffect as useEffect52, useMemo as useMemo35, useRef as useRef35, useState as useState66 } from "react";
|
|
@@ -27658,7 +27704,7 @@ import {
|
|
|
27658
27704
|
Button as Button60,
|
|
27659
27705
|
Checkbox as Checkbox11,
|
|
27660
27706
|
ConfirmDialog as ConfirmDialog6,
|
|
27661
|
-
Input as
|
|
27707
|
+
Input as Input4,
|
|
27662
27708
|
Select as Select11,
|
|
27663
27709
|
SelectContent as SelectContent11,
|
|
27664
27710
|
SelectItem as SelectItem11,
|
|
@@ -30164,7 +30210,7 @@ function SaveToTable({ source, shapeIndex = 0, onOpenTable, onSaved, onClose, cl
|
|
|
30164
30210
|
/* @__PURE__ */ jsxs88("label", { className: "flex flex-col gap-1", children: [
|
|
30165
30211
|
/* @__PURE__ */ jsx99("span", { className: "text-xs font-medium", children: "Table name" }),
|
|
30166
30212
|
/* @__PURE__ */ jsx99(
|
|
30167
|
-
|
|
30213
|
+
Input4,
|
|
30168
30214
|
{
|
|
30169
30215
|
value: name ?? proposedName,
|
|
30170
30216
|
onChange: (e) => setName(e.target.value),
|
|
@@ -30176,7 +30222,7 @@ function SaveToTable({ source, shapeIndex = 0, onOpenTable, onSaved, onClose, cl
|
|
|
30176
30222
|
/* @__PURE__ */ jsxs88("label", { className: "flex flex-col gap-1", children: [
|
|
30177
30223
|
/* @__PURE__ */ jsx99("span", { className: "text-xs font-medium", children: "Description (optional)" }),
|
|
30178
30224
|
/* @__PURE__ */ jsx99(
|
|
30179
|
-
|
|
30225
|
+
Input4,
|
|
30180
30226
|
{
|
|
30181
30227
|
value: description,
|
|
30182
30228
|
onChange: (e) => setDescription(e.target.value),
|
|
@@ -30204,7 +30250,7 @@ function SaveToTable({ source, shapeIndex = 0, onOpenTable, onSaved, onClose, cl
|
|
|
30204
30250
|
}
|
|
30205
30251
|
),
|
|
30206
30252
|
/* @__PURE__ */ jsx99(
|
|
30207
|
-
|
|
30253
|
+
Input4,
|
|
30208
30254
|
{
|
|
30209
30255
|
value: c.label,
|
|
30210
30256
|
"aria-label": `Name of the column ${c.header}`,
|
|
@@ -30233,7 +30279,7 @@ function SaveToTable({ source, shapeIndex = 0, onOpenTable, onSaved, onClose, cl
|
|
|
30233
30279
|
}
|
|
30234
30280
|
),
|
|
30235
30281
|
c.guess.type === "select" && c.use ? /* @__PURE__ */ jsx99(
|
|
30236
|
-
|
|
30282
|
+
Input4,
|
|
30237
30283
|
{
|
|
30238
30284
|
className: "col-span-2 col-start-2",
|
|
30239
30285
|
value: c.options,
|
|
@@ -30629,7 +30675,7 @@ import {
|
|
|
30629
30675
|
DialogHeader as DialogHeader15,
|
|
30630
30676
|
DialogTitle as DialogTitle15,
|
|
30631
30677
|
ErrorBox as ErrorBox5,
|
|
30632
|
-
Input as
|
|
30678
|
+
Input as Input5
|
|
30633
30679
|
} from "@ai-matrx/design-system";
|
|
30634
30680
|
import { jsx as jsx101, jsxs as jsxs90 } from "react/jsx-runtime";
|
|
30635
30681
|
var TABLE_NAME_MAX = 120;
|
|
@@ -30715,7 +30761,7 @@ function TableRenameDialog({
|
|
|
30715
30761
|
children: [
|
|
30716
30762
|
/* @__PURE__ */ jsx101(DialogHeader15, { children: /* @__PURE__ */ jsx101(DialogTitle15, { children: "Rename table" }) }),
|
|
30717
30763
|
/* @__PURE__ */ jsx101(
|
|
30718
|
-
|
|
30764
|
+
Input5,
|
|
30719
30765
|
{
|
|
30720
30766
|
ref: box,
|
|
30721
30767
|
"aria-label": "Table name",
|
|
@@ -30766,7 +30812,7 @@ import { levelHasShownTo as levelHasShownTo2 } from "@ai-matrx/records";
|
|
|
30766
30812
|
// src/ArchiveDeliberately.tsx
|
|
30767
30813
|
import { useState as useState82 } from "react";
|
|
30768
30814
|
import { useRecordsClient as useRecordsClient55 } from "@ai-matrx/records/react";
|
|
30769
|
-
import { Button as Button63, Dialog as Dialog16, DialogContent as DialogContent16, DialogFooter as DialogFooter12, DialogHeader as DialogHeader16, DialogTitle as DialogTitle16, ErrorBox as ErrorBox6, Input as
|
|
30815
|
+
import { Button as Button63, Dialog as Dialog16, DialogContent as DialogContent16, DialogFooter as DialogFooter12, DialogHeader as DialogHeader16, DialogTitle as DialogTitle16, ErrorBox as ErrorBox6, Input as Input6, Textarea as Textarea4 } from "@ai-matrx/design-system";
|
|
30770
30816
|
import { jsx as jsx102, jsxs as jsxs91 } from "react/jsx-runtime";
|
|
30771
30817
|
function codeDependsRefusal(error) {
|
|
30772
30818
|
if (!error) return null;
|
|
@@ -30825,7 +30871,7 @@ function ArchiveDeliberatelyDialog({ tableId, name, slug, declaredIn, open, onOp
|
|
|
30825
30871
|
/* @__PURE__ */ jsx102("span", { className: "font-mono", children: slug }),
|
|
30826
30872
|
" to confirm"
|
|
30827
30873
|
] }),
|
|
30828
|
-
/* @__PURE__ */ jsx102(
|
|
30874
|
+
/* @__PURE__ */ jsx102(Input6, { autoFocus: true, value: typed2, onChange: (e) => setTyped(e.target.value), "aria-label": "Table slug", disabled: busy })
|
|
30829
30875
|
] }),
|
|
30830
30876
|
/* @__PURE__ */ jsxs91("label", { className: "flex flex-col gap-1", children: [
|
|
30831
30877
|
/* @__PURE__ */ jsx102("span", { children: "Why" }),
|
|
@@ -39067,7 +39113,7 @@ function ArchivedPortals({
|
|
|
39067
39113
|
// src/ViewBar.tsx
|
|
39068
39114
|
import { useCallback as useCallback43, useEffect as useEffect89, useRef as useRef50, useState as useState109 } from "react";
|
|
39069
39115
|
import { useRecordsClient as useRecordsClient74 } from "@ai-matrx/records/react";
|
|
39070
|
-
import { Badge as Badge15, Button as Button80, Input as
|
|
39116
|
+
import { Badge as Badge15, Button as Button80, Input as Input7, Popover as Popover16, PopoverContent as PopoverContent16, PopoverTrigger as PopoverTrigger16, Skeleton as Skeleton18, cn as cn65 } from "@ai-matrx/design-system";
|
|
39071
39117
|
import { DndContext, PointerSensor, closestCenter, useDroppable, useSensor, useSensors } from "@dnd-kit/core";
|
|
39072
39118
|
import { SortableContext, useSortable, verticalListSortingStrategy } from "@dnd-kit/sortable";
|
|
39073
39119
|
import { CSS as CSS2 } from "@dnd-kit/utilities";
|
|
@@ -39433,7 +39479,7 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
|
|
|
39433
39479
|
},
|
|
39434
39480
|
children: [
|
|
39435
39481
|
/* @__PURE__ */ jsx131(
|
|
39436
|
-
|
|
39482
|
+
Input7,
|
|
39437
39483
|
{
|
|
39438
39484
|
autoFocus: true,
|
|
39439
39485
|
"aria-label": "New name for this section",
|
|
@@ -39513,7 +39559,7 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
|
|
|
39513
39559
|
children: [
|
|
39514
39560
|
/* @__PURE__ */ jsxs119("div", { className: "flex items-center gap-1", children: [
|
|
39515
39561
|
/* @__PURE__ */ jsx131(
|
|
39516
|
-
|
|
39562
|
+
Input7,
|
|
39517
39563
|
{
|
|
39518
39564
|
autoFocus: true,
|
|
39519
39565
|
"aria-label": "Name for the new view",
|
|
@@ -39549,7 +39595,7 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
|
|
|
39549
39595
|
void moveToSection(current, movingTo);
|
|
39550
39596
|
},
|
|
39551
39597
|
children: [
|
|
39552
|
-
/* @__PURE__ */ jsx131(
|
|
39598
|
+
/* @__PURE__ */ jsx131(Input7, { "aria-label": "Name for a new section", value: movingTo, onChange: (e) => setMovingTo(e.target.value), className: "h-7 min-w-0 flex-1 text-xs", placeholder: "New section", maxLength: 60 }),
|
|
39553
39599
|
/* @__PURE__ */ jsx131(Button80, { size: "sm", type: "submit", className: "h-7", disabled: !sectionNameOk(movingTo), children: "Add" })
|
|
39554
39600
|
]
|
|
39555
39601
|
}
|
|
@@ -39565,7 +39611,7 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
|
|
|
39565
39611
|
},
|
|
39566
39612
|
children: [
|
|
39567
39613
|
/* @__PURE__ */ jsx131(
|
|
39568
|
-
|
|
39614
|
+
Input7,
|
|
39569
39615
|
{
|
|
39570
39616
|
autoFocus: true,
|
|
39571
39617
|
"aria-label": "New name for this view",
|
|
@@ -41627,7 +41673,7 @@ function MigrationLog({ entries, readError, canUndo, whyNotUndo, onUndone, class
|
|
|
41627
41673
|
/* @__PURE__ */ jsx136("ul", { className: "flex flex-col divide-y rounded border text-xs", children: entries.map((entry) => /* @__PURE__ */ jsxs124("li", { "data-migration-id": entry.id, className: "flex items-center gap-2 px-2 py-1.5", children: [
|
|
41628
41674
|
/* @__PURE__ */ jsx136("span", { className: "shrink-0 font-medium", children: migrationWords(entry.verb) }),
|
|
41629
41675
|
/* @__PURE__ */ jsx136("span", { className: "min-w-0 flex-1 truncate text-muted-foreground", title: entry.note ?? void 0, children: entry.note ?? "" }),
|
|
41630
|
-
/* @__PURE__ */ jsx136("span", { className: "w-28 shrink-0 whitespace-nowrap text-right text-muted-foreground", title: new Date(entry.applied_at).toLocaleString(), children: whenText(entry.applied_at) }),
|
|
41676
|
+
/* @__PURE__ */ jsx136("span", { className: "min-w-28 shrink-0 whitespace-nowrap text-right text-muted-foreground", title: new Date(entry.applied_at).toLocaleString(), children: whenText(entry.applied_at) }),
|
|
41631
41677
|
entry.undone_at ? /* @__PURE__ */ jsx136("span", { className: "w-14 shrink-0 text-right text-muted-foreground", children: "Undone" }) : canUndo ? /* @__PURE__ */ jsx136(
|
|
41632
41678
|
Button85,
|
|
41633
41679
|
{
|
|
@@ -41825,12 +41871,21 @@ function VersionRow({
|
|
|
41825
41871
|
] }),
|
|
41826
41872
|
/* @__PURE__ */ jsx137("span", { className: "shrink-0 font-medium", children: operationWords(entry.operation_label) }),
|
|
41827
41873
|
/* @__PURE__ */ jsx137(Who, { actor: entry.actor }),
|
|
41828
|
-
/* @__PURE__ */
|
|
41829
|
-
|
|
41874
|
+
/* @__PURE__ */ jsxs125("span", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
|
|
41875
|
+
/* @__PURE__ */ jsx137(
|
|
41876
|
+
"span",
|
|
41877
|
+
{
|
|
41878
|
+
className: "min-w-0 truncate text-muted-foreground",
|
|
41879
|
+
title: entry.changes.length === 0 ? "nothing about the values changed" : entry.changes.map((c) => c.label).join(", "),
|
|
41880
|
+
children: entry.changes.length === 0 ? "nothing about the values changed" : entry.changes.map((c) => c.label).join(", ")
|
|
41881
|
+
}
|
|
41882
|
+
),
|
|
41883
|
+
entry.undoable ? /* @__PURE__ */ jsx137(Badge19, { variant: "secondary", className: "min-w-0 shrink truncate text-[10px]", title: "part of a bigger change", children: "part of a bigger change" }) : null
|
|
41884
|
+
] }),
|
|
41830
41885
|
/* @__PURE__ */ jsx137(
|
|
41831
41886
|
"span",
|
|
41832
41887
|
{
|
|
41833
|
-
className: "w-28 shrink-0 whitespace-nowrap text-right text-muted-foreground",
|
|
41888
|
+
className: "min-w-28 shrink-0 whitespace-nowrap text-right text-muted-foreground",
|
|
41834
41889
|
title: new Date(entry.occurred_at).toLocaleString(),
|
|
41835
41890
|
children: whenText(entry.occurred_at)
|
|
41836
41891
|
}
|
|
@@ -49278,7 +49333,7 @@ function TableAsk({ tableId, onOpenInQuestions, viewId }) {
|
|
|
49278
49333
|
setSaid({ kind: "asking", reads: words2.trim() });
|
|
49279
49334
|
const got = await askTable({ tableId, question: words2.trim(), viewId: viewId ?? "" });
|
|
49280
49335
|
setSaid(
|
|
49281
|
-
got.ok ? { kind: "agent-answer", answer: got.answer, costPoints: got.costPoints ?? null } : { kind: "agent-failed", error: (0, refusals_exports.refusal)("door", got.message,
|
|
49336
|
+
got.ok ? { kind: "agent-answer", answer: got.answer, costPoints: got.costPoints ?? null } : { kind: "agent-failed", error: (0, refusals_exports.refusal)("door", got.message, got.hint ?? null) }
|
|
49282
49337
|
);
|
|
49283
49338
|
return;
|
|
49284
49339
|
}
|
|
@@ -50428,7 +50483,7 @@ function FormsPanel({ tableId, activeFormId, className }) {
|
|
|
50428
50483
|
// src/CaptureSheet.tsx
|
|
50429
50484
|
import { useCallback as useCallback65, useEffect as useEffect117, useRef as useRef62, useState as useState139 } from "react";
|
|
50430
50485
|
import { useFields as useFields36, useRecordsClient as useRecordsClient101, useTable as useTable38 } from "@ai-matrx/records/react";
|
|
50431
|
-
import { Button as Button110, Input as
|
|
50486
|
+
import { Button as Button110, Input as Input9, Skeleton as Skeleton43, Textarea as Textarea8, cn as cn95 } from "@ai-matrx/design-system";
|
|
50432
50487
|
|
|
50433
50488
|
// src/CaptureRun.tsx
|
|
50434
50489
|
import { useCallback as useCallback64, useEffect as useEffect116, useMemo as useMemo78, useRef as useRef61, useState as useState138 } from "react";
|
|
@@ -50438,7 +50493,7 @@ import {
|
|
|
50438
50493
|
openCaptureQueue
|
|
50439
50494
|
} from "@ai-matrx/records";
|
|
50440
50495
|
import { useRecordsClient as useRecordsClient100 } from "@ai-matrx/records/react";
|
|
50441
|
-
import { Button as Button109, Input as
|
|
50496
|
+
import { Button as Button109, Input as Input8, Skeleton as Skeleton42, Textarea as Textarea7, cn as cn94 } from "@ai-matrx/design-system";
|
|
50442
50497
|
import { jsx as jsx163, jsxs as jsxs151 } from "react/jsx-runtime";
|
|
50443
50498
|
function controlFor(field2) {
|
|
50444
50499
|
if (!field2) return "text";
|
|
@@ -50747,7 +50802,7 @@ function CaptureRun({ sheetId, face: given, className }) {
|
|
|
50747
50802
|
" is on the phone. It goes up with the capture."
|
|
50748
50803
|
] }) : null
|
|
50749
50804
|
] }) : control === "number" ? /* @__PURE__ */ jsx163(
|
|
50750
|
-
|
|
50805
|
+
Input8,
|
|
50751
50806
|
{
|
|
50752
50807
|
id: `capture-${q.field}`,
|
|
50753
50808
|
"data-testid": `capture-input-${q.field}`,
|
|
@@ -50971,7 +51026,7 @@ function AdHocCaptureSheet({
|
|
|
50971
51026
|
] }),
|
|
50972
51027
|
error ? /* @__PURE__ */ jsx164(RefusalNotice, { error }) : null,
|
|
50973
51028
|
mode === "reading" ? keys.reading ? /* @__PURE__ */ jsx164(
|
|
50974
|
-
|
|
51029
|
+
Input9,
|
|
50975
51030
|
{
|
|
50976
51031
|
"aria-label": "Reading",
|
|
50977
51032
|
inputMode: "decimal",
|
|
@@ -51266,7 +51321,7 @@ function PublicRow({ row, fields }) {
|
|
|
51266
51321
|
import { copyText as copyText11 } from "@ai-matrx/kit/clipboard";
|
|
51267
51322
|
import { useCallback as useCallback68, useEffect as useEffect120, useState as useState142 } from "react";
|
|
51268
51323
|
import { useRecordsClient as useRecordsClient104 } from "@ai-matrx/records/react";
|
|
51269
|
-
import { Button as Button112, Input as
|
|
51324
|
+
import { Button as Button112, Input as Input10, Skeleton as Skeleton46, Textarea as Textarea9, cn as cn98 } from "@ai-matrx/design-system";
|
|
51270
51325
|
import { useTable as useTable39 } from "@ai-matrx/records/react";
|
|
51271
51326
|
import { Fragment as Fragment66, jsx as jsx167, jsxs as jsxs155 } from "react/jsx-runtime";
|
|
51272
51327
|
function EmbedFrame({
|
|
@@ -51337,7 +51392,7 @@ function EmbedFrame({
|
|
|
51337
51392
|
/* @__PURE__ */ jsxs155("label", { className: "flex flex-col gap-1 text-xs", children: [
|
|
51338
51393
|
/* @__PURE__ */ jsx167("span", { className: "text-muted-foreground", children: "Sites this embed works on" }),
|
|
51339
51394
|
/* @__PURE__ */ jsx167(
|
|
51340
|
-
|
|
51395
|
+
Input10,
|
|
51341
51396
|
{
|
|
51342
51397
|
"aria-label": "Allowed origins",
|
|
51343
51398
|
className: "h-8 text-xs",
|
|
@@ -51415,7 +51470,7 @@ import {
|
|
|
51415
51470
|
DropdownMenuRadioItem as DropdownMenuRadioItem3,
|
|
51416
51471
|
DropdownMenuSeparator as DropdownMenuSeparator5,
|
|
51417
51472
|
DropdownMenuTrigger as DropdownMenuTrigger10,
|
|
51418
|
-
Input as
|
|
51473
|
+
Input as Input12,
|
|
51419
51474
|
Skeleton as Skeleton47,
|
|
51420
51475
|
cn as cn100,
|
|
51421
51476
|
useIsMobile as useIsMobile2
|
|
@@ -51883,7 +51938,7 @@ function TableReferenceDialog({
|
|
|
51883
51938
|
import { formatCount as formatCount7 } from "@ai-matrx/kit/format";
|
|
51884
51939
|
import { useState as useState147 } from "react";
|
|
51885
51940
|
import { tableShapeChanged as tableShapeChanged13, useRecordsClient as useRecordsClient105 } from "@ai-matrx/records/react";
|
|
51886
|
-
import { Button as Button117, Dialog as Dialog20, DialogContent as DialogContent20, DialogFooter as DialogFooter13, DialogHeader as DialogHeader20, DialogTitle as DialogTitle20, ErrorBox as ErrorBox8, Input as
|
|
51941
|
+
import { Button as Button117, Dialog as Dialog20, DialogContent as DialogContent20, DialogFooter as DialogFooter13, DialogHeader as DialogHeader20, DialogTitle as DialogTitle20, ErrorBox as ErrorBox8, Input as Input11, Switch as Switch6 } from "@ai-matrx/design-system";
|
|
51887
51942
|
import { Fragment as Fragment69, jsx as jsx172, jsxs as jsxs160 } from "react/jsx-runtime";
|
|
51888
51943
|
function copyNameFor(name) {
|
|
51889
51944
|
return `${name.trim() || "Table"} (copy)`;
|
|
@@ -51955,7 +52010,7 @@ function TableDuplicateDialog({ tableId, name, open, onOpenChange, onDuplicated
|
|
|
51955
52010
|
] }) : null
|
|
51956
52011
|
] }) : /* @__PURE__ */ jsxs160("div", { className: "flex flex-col gap-3 text-sm", children: [
|
|
51957
52012
|
/* @__PURE__ */ jsx172(
|
|
51958
|
-
|
|
52013
|
+
Input11,
|
|
51959
52014
|
{
|
|
51960
52015
|
autoFocus: true,
|
|
51961
52016
|
"aria-label": "Name of the copy",
|
|
@@ -53482,7 +53537,7 @@ function TablePage({
|
|
|
53482
53537
|
},
|
|
53483
53538
|
children: [
|
|
53484
53539
|
/* @__PURE__ */ jsx175(
|
|
53485
|
-
|
|
53540
|
+
Input12,
|
|
53486
53541
|
{
|
|
53487
53542
|
autoFocus: true,
|
|
53488
53543
|
"aria-label": LOOK_WORDS.newName,
|
|
@@ -53800,7 +53855,7 @@ import { formatCount as formatCount8 } from "@ai-matrx/kit/format";
|
|
|
53800
53855
|
import { TapTargetSearchGroup as TapTargetSearchGroup2, TooltipProvider } from "@ai-matrx/design-system";
|
|
53801
53856
|
import { MatrxTableCardShowMore as MatrxTableCardShowMore3 } from "@ai-matrx/design-system/data-table";
|
|
53802
53857
|
import { useEffect as useEffect124, useMemo as useMemo83, useRef as useRef64, useState as useState151 } from "react";
|
|
53803
|
-
import { Button as Button120, ErrorBox as ErrorBox9, Input as
|
|
53858
|
+
import { Button as Button120, ErrorBox as ErrorBox9, Input as Input13, cn as cn101 } from "@ai-matrx/design-system";
|
|
53804
53859
|
import { SEED_FRESH_MS, useRecordsClient as useRecordsClient107, useSeededAnswerAt } from "@ai-matrx/records/react";
|
|
53805
53860
|
import { Fragment as Fragment71, jsx as jsx176, jsxs as jsxs164 } from "react/jsx-runtime";
|
|
53806
53861
|
var entityTitleColumn = entityNameColumn;
|
|
@@ -54000,7 +54055,7 @@ function EntityTablePageBody({
|
|
|
54000
54055
|
setNaming("");
|
|
54001
54056
|
}, children: "New page" }) : null,
|
|
54002
54057
|
entity.creatable && naming !== null ? /* @__PURE__ */ jsx176(
|
|
54003
|
-
|
|
54058
|
+
Input13,
|
|
54004
54059
|
{
|
|
54005
54060
|
autoFocus: true,
|
|
54006
54061
|
"data-records-entity-new": source.token,
|