@ai-matrx/records-ui 0.116.43 → 0.116.44

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.
@@ -4784,7 +4784,7 @@ import { AlchemyMenu } from "@ai-matrx/alchemy/react";
4784
4784
  import { OutboundLink as OutboundLink5 } from "@ai-matrx/kit/outbound-react";
4785
4785
  import { humanizeIdentifier } from "@ai-matrx/kit/text-case";
4786
4786
  import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
4787
- var SaveToTable = lazy(() => import("./SaveToTable-4B67TPSC.js").then((m) => ({ default: m.SaveToTable })));
4787
+ var SaveToTable = lazy(() => import("./SaveToTable-EGBEB5WG.js").then((m) => ({ default: m.SaveToTable })));
4788
4788
  var LONGEST_READ = 5e5;
4789
4789
  var FENCE = /^```(?:json)?[ \t]*\r?\n([\s\S]*?)\r?\n?```$/;
4790
4790
  function isPlainObject(v) {
@@ -12325,4 +12325,4 @@ export {
12325
12325
  RecordNameText,
12326
12326
  HeldChangeDecision
12327
12327
  };
12328
- //# sourceMappingURL=chunk-THRMANHB.js.map
12328
+ //# sourceMappingURL=chunk-KP2R7LVO.js.map
package/dist/index.cjs CHANGED
@@ -4570,7 +4570,7 @@ function ImportWizard({ tableId, source, onDone, onWrote, autoRun, className })
4570
4570
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "text-muted-foreground", children: "Reading the rows this import refused\u2026" }) : null
4571
4571
  ] }, r.import_id)) })
4572
4572
  ] }) : null,
4573
- table.error ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(RefusalNotice, { error: table.error }) : null
4573
+ table.error ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(RefusalNotice, { error: table.error, onRetry: table.reload }) : null
4574
4574
  ] });
4575
4575
  }
4576
4576
  var import_react58, import_react59, import_core7, import_design_system31, import_records20, import_text_case5, import_jsx_runtime39, BATCH, SAMPLES, COLUMNS_PER_CALL, ABSENT, LEAVE, TITLE_COPY, TYPED_VALUES;
@@ -24272,7 +24272,7 @@ function DocTemplate({ tableId, seed, pageSettings, activeTemplateId, onActiveTe
24272
24272
  setActiveId(saved.data);
24273
24273
  await load();
24274
24274
  }
24275
- if (fields.error) return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(RefusalNotice, { error: fields.error, className });
24275
+ if (fields.error) return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(RefusalNotice, { error: fields.error, onRetry: fields.reload, className });
24276
24276
  if (error) {
24277
24277
  return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
24278
24278
  RefusalNotice,
@@ -28310,7 +28310,7 @@ function CustomRecordForm({
28310
28310
  () => fields.data ? (0, import_core15.predictWriteRefusals)({ fields: fields.data, document: document2, ...recordType ? { recordType } : {} }) : [],
28311
28311
  [fields.data, document2, recordType]
28312
28312
  );
28313
- if (fields.error) return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(RefusalNotice, { error: fields.error, className });
28313
+ if (fields.error) return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(RefusalNotice, { error: fields.error, onRetry: fields.reload, className });
28314
28314
  if (existing.error) return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(RefusalNotice, { error: existing.error, className });
28315
28315
  const storeSaid = said2.error && said2.error !== answered ? said2.error : null;
28316
28316
  const fieldProblems = predicted.filter((p) => p.field_key);
@@ -30433,7 +30433,7 @@ function AddLinkedDialog({
30433
30433
  "Add to ",
30434
30434
  column.source_table_name
30435
30435
  ] }) }),
30436
- fields.error ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(RefusalNotice, { error: fields.error }) : initial ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
30436
+ fields.error ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(RefusalNotice, { error: fields.error, onRetry: fields.reload }) : initial ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
30437
30437
  RecordForm,
30438
30438
  {
30439
30439
  tableId: column.source_table_id,
@@ -34760,8 +34760,8 @@ function GridBody({
34760
34760
  if (!embedded) rememberRowCount(`${tableId}:page:last`, rows.length);
34761
34761
  }
34762
34762
  }, [rowsAnswered, rowMemoryKey, rows.length, embedded, tableId]);
34763
- if (table.error) return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(RefusalNotice, { error: table.error, className });
34764
- if (fields.error) return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(RefusalNotice, { error: fields.error, className });
34763
+ if (table.error) return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(RefusalNotice, { error: table.error, onRetry: table.reload, className });
34764
+ if (fields.error) return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(RefusalNotice, { error: fields.error, onRetry: fields.reload, className });
34765
34765
  const nothingToShowYet = table.loading && !table.data || // No columns on a table whose level may hide them: not yet known which (one read, Confidential only).
34766
34766
  !structure.settled && (fields.data ?? []).length === 0 || fields.loading && !fields.data || !rights.known || rowRightsWaiting || records.loading && rows.length === 0 || // The page read has neither answered nor refused: nothing has been said yet, so nothing is empty.
34767
34767
  !records.data && !records.error || countedButNotReturned || manual && hand.loading && rows.length === 0;
@@ -34802,7 +34802,7 @@ function GridBody({
34802
34802
  } : {},
34803
34803
  children: [
34804
34804
  toolbarActions ? /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("div", { className: "flex items-center gap-2", "data-records-grid-actions": "", children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("div", { className: "ml-auto flex items-center gap-1", children: toolbarActions }) }) : null,
34805
- records.error ? /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(RefusalNotice, { error: inColumnWords(records.error, fields.data ?? []) }) : null,
34805
+ records.error ? /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(RefusalNotice, { error: inColumnWords(records.error, fields.data ?? []), onRetry: records.reload }) : null,
34806
34806
  manual && hand.error ? /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(RefusalNotice, { error: hand.error }) : null,
34807
34807
  archived ? /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
34808
34808
  "p",
@@ -36011,7 +36011,7 @@ function Peek({ tableId, recordId, onClose, className, onPage = false }) {
36011
36011
  if (fields.data) rememberRowCount(peekMemoryKey, shownFieldCount);
36012
36012
  }, [fields.data, peekMemoryKey, shownFieldCount]);
36013
36013
  if (record.error) return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(RefusalNotice, { error: record.error, className });
36014
- if (fields.error) return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(RefusalNotice, { error: fields.error, className });
36014
+ if (fields.error) return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(RefusalNotice, { error: fields.error, onRetry: fields.reload, className });
36015
36015
  const document2 = record.data?.document;
36016
36016
  if (document2 && (0, import_records51.isLockedStub)({ document: document2, level: null })) {
36017
36017
  const filed = document2["submitted_at"];
@@ -37370,7 +37370,7 @@ function ChecklistRunner({
37370
37370
  () => runs?.find((r) => r.run_id === activeId) ?? null,
37371
37371
  [runs, activeId]
37372
37372
  );
37373
- if (table.error) return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(RefusalNotice, { error: table.error, className });
37373
+ if (table.error) return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(RefusalNotice, { error: table.error, onRetry: table.reload, className });
37374
37374
  if (quietWhenEmpty && !runId) {
37375
37375
  const startable = mayStart && rights.write && (templates?.length ?? 0) > 0;
37376
37376
  if (runs === null || runs.length === 0 && !startable && !error && !said2) return null;
@@ -40015,8 +40015,8 @@ function TableSettingsPanel({
40015
40015
  const [deliberate, setDeliberate] = (0, import_react234.useState)(null);
40016
40016
  const [askingToRemove, setAskingToRemove] = (0, import_react234.useState)(null);
40017
40017
  const [enriching, setEnriching] = (0, import_react234.useState)(null);
40018
- if (table.error) return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(RefusalNotice, { error: table.error, className });
40019
- if (fields.error) return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(RefusalNotice, { error: fields.error, className });
40018
+ if (table.error) return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(RefusalNotice, { error: table.error, onRetry: table.reload, className });
40019
+ if (fields.error) return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(RefusalNotice, { error: fields.error, onRetry: fields.reload, className });
40020
40020
  if (!rights.structure) {
40021
40021
  if (tableIsLocked(table.data)) {
40022
40022
  return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: (0, import_design_system116.cn)("flex flex-col items-start gap-2 text-xs text-muted-foreground", className), "data-table-locked": "", children: [
@@ -40896,7 +40896,7 @@ function PipelineBoard({
40896
40896
  onMoved?.();
40897
40897
  void reload();
40898
40898
  };
40899
- if (fields.error) return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(RefusalNotice, { error: fields.error });
40899
+ if (fields.error) return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(RefusalNotice, { error: fields.error, onRetry: fields.reload });
40900
40900
  if (error) return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(RefusalNotice, { error });
40901
40901
  if (loading || fields.loading && !fields.data) return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_design_system118.Skeleton, { className: "h-40 w-full" });
40902
40902
  if (!definition?.is_pipeline) {
@@ -46933,8 +46933,8 @@ function Board({
46933
46933
  tableId: view.subject,
46934
46934
  needed: viewQuestionAsked && !records.loading && records.rows.length === 0
46935
46935
  });
46936
- if (fields.error) return /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(RefusalNotice, { error: fields.error });
46937
- if (records.error) return /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(RefusalNotice, { error: records.error });
46936
+ if (fields.error) return /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(RefusalNotice, { error: fields.error, onRetry: fields.reload });
46937
+ if (records.error) return /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(RefusalNotice, { error: records.error, onRetry: records.reload });
46938
46938
  if (fields.loading && !fields.data || records.loading && records.rows.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(RecordsSkeleton, { layout: view.layout });
46939
46939
  const all = fields.data ?? [];
46940
46940
  const byKey = (key) => all.find((f) => f.key === key);
@@ -52523,7 +52523,7 @@ function ConnectedFormRunner(props) {
52523
52523
  },
52524
52524
  [client, form.subject, form.questions, form.endings]
52525
52525
  );
52526
- if (fields.error) return /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(RefusalNotice, { error: fields.error, className });
52526
+ if (fields.error) return /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(RefusalNotice, { error: fields.error, onRetry: fields.reload, className });
52527
52527
  if (fields.loading && !fields.data) return /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(import_design_system147.Skeleton, { className: (0, import_design_system147.cn)("h-40 w-full", className) });
52528
52528
  return /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(
52529
52529
  FormStage,
@@ -53417,7 +53417,7 @@ function FormBuilder({ tableId, seed, activeFormId, onActiveForm, startWithOne,
53417
53417
  (made) => setMakeOnMount(made ? "made" : "not-made")
53418
53418
  );
53419
53419
  }, [createOnMount, makeOnMount, forms, fields.data, create, table.data, table.error]);
53420
- if (fields.error) return /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(RefusalNotice, { error: fields.error, className });
53420
+ if (fields.error) return /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(RefusalNotice, { error: fields.error, onRetry: fields.reload, className });
53421
53421
  if (error) {
53422
53422
  return /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
53423
53423
  RefusalNotice,
@@ -54304,7 +54304,7 @@ function SignBlock({ tableId, recordId, render, className }) {
54304
54304
  setName("");
54305
54305
  await load();
54306
54306
  }
54307
- if (fields.error) return /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(RefusalNotice, { error: fields.error, className });
54307
+ if (fields.error) return /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(RefusalNotice, { error: fields.error, onRetry: fields.reload, className });
54308
54308
  if (error) {
54309
54309
  return /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
54310
54310
  RefusalNotice,
@@ -59262,8 +59262,8 @@ function AdHocCaptureSheet({
59262
59262
  await keep([...queue.current, item]);
59263
59263
  await flush();
59264
59264
  }
59265
- if (table.error) return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(RefusalNotice, { error: table.error, className });
59266
- if (fields.error) return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(RefusalNotice, { error: fields.error, className });
59265
+ if (table.error) return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(RefusalNotice, { error: table.error, onRetry: table.reload, className });
59266
+ if (fields.error) return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(RefusalNotice, { error: fields.error, onRetry: fields.reload, className });
59267
59267
  if (fields.loading || pending === null) return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(import_design_system163.Skeleton, { className: (0, import_design_system163.cn)("h-64 w-full", className) });
59268
59268
  const keys = resolved();
59269
59269
  return /* @__PURE__ */ (0, import_jsx_runtime186.jsxs)("section", { className: (0, import_design_system163.cn)("mx-auto flex w-full max-w-sm flex-col gap-2", className), children: [
@@ -59636,7 +59636,7 @@ function EmbedFrame({
59636
59636
  setSecret(null);
59637
59637
  setTokenId(null);
59638
59638
  }, [client, tokenId]);
59639
- if (table.error) return /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(RefusalNotice, { error: table.error, className });
59639
+ if (table.error) return /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(RefusalNotice, { error: table.error, onRetry: table.reload, className });
59640
59640
  if (table.loading && !table.data) return /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(import_design_system166.Skeleton, { className: (0, import_design_system166.cn)("h-48 w-full", className) });
59641
59641
  if (!rights.admin) {
59642
59642
  return /* @__PURE__ */ (0, import_jsx_runtime189.jsxs)("p", { className: (0, import_design_system166.cn)("rounded border border-dashed px-2 py-1 text-xs text-muted-foreground", className), children: [
@@ -61879,7 +61879,7 @@ function TablePage({
61879
61879
  const headerNode = header && !embedded ? header({ actions: table.data ? pageActions : null, tableName: table.data?.name ?? null }) : null;
61880
61880
  if (table.error) return /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(import_jsx_runtime198.Fragment, { children: [
61881
61881
  headerNode,
61882
- /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(RefusalNotice, { error: table.error })
61882
+ /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(RefusalNotice, { error: table.error, onRetry: table.reload })
61883
61883
  ] });
61884
61884
  if (table.loading && !table.data) {
61885
61885
  return /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(import_jsx_runtime198.Fragment, { children: [