@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.
package/dist/index.js CHANGED
@@ -182,7 +182,7 @@ import {
182
182
  withoutAddition,
183
183
  withoutLeadingBlank,
184
184
  workedOutErrorFor
185
- } from "./chunk-THRMANHB.js";
185
+ } from "./chunk-KP2R7LVO.js";
186
186
  import {
187
187
  CHART_PLOT_PX,
188
188
  EMBEDDED_ROW_PX,
@@ -293,7 +293,7 @@ import {
293
293
  visibilityLaneFor,
294
294
  whyNotAskable,
295
295
  writeOnTheWinningVersion_exports
296
- } from "./chunk-OKAAPN6O.js";
296
+ } from "./chunk-CV4D2BZY.js";
297
297
  import {
298
298
  ACTION_CHECKING_ACCESS_REASON,
299
299
  ACTION_NOT_HERE_REASON,
@@ -3607,7 +3607,7 @@ function DocTemplate({ tableId, seed, pageSettings, activeTemplateId, onActiveTe
3607
3607
  setActiveId(saved.data);
3608
3608
  await load();
3609
3609
  }
3610
- if (fields.error) return /* @__PURE__ */ jsx10(RefusalNotice, { error: fields.error, className });
3610
+ if (fields.error) return /* @__PURE__ */ jsx10(RefusalNotice, { error: fields.error, onRetry: fields.reload, className });
3611
3611
  if (error) {
3612
3612
  return /* @__PURE__ */ jsx10(
3613
3613
  RefusalNotice,
@@ -7683,7 +7683,7 @@ function CustomRecordForm({
7683
7683
  () => fields.data ? predictWriteRefusals({ fields: fields.data, document: document2, ...recordType ? { recordType } : {} }) : [],
7684
7684
  [fields.data, document2, recordType]
7685
7685
  );
7686
- if (fields.error) return /* @__PURE__ */ jsx24(RefusalNotice, { error: fields.error, className });
7686
+ if (fields.error) return /* @__PURE__ */ jsx24(RefusalNotice, { error: fields.error, onRetry: fields.reload, className });
7687
7687
  if (existing.error) return /* @__PURE__ */ jsx24(RefusalNotice, { error: existing.error, className });
7688
7688
  const storeSaid = said.error && said.error !== answered ? said.error : null;
7689
7689
  const fieldProblems = predicted.filter((p) => p.field_key);
@@ -9826,7 +9826,7 @@ function AddLinkedDialog({
9826
9826
  "Add to ",
9827
9827
  column.source_table_name
9828
9828
  ] }) }),
9829
- fields.error ? /* @__PURE__ */ jsx28(RefusalNotice, { error: fields.error }) : initial ? /* @__PURE__ */ jsx28(
9829
+ fields.error ? /* @__PURE__ */ jsx28(RefusalNotice, { error: fields.error, onRetry: fields.reload }) : initial ? /* @__PURE__ */ jsx28(
9830
9830
  RecordForm,
9831
9831
  {
9832
9832
  tableId: column.source_table_id,
@@ -14175,8 +14175,8 @@ function GridBody({
14175
14175
  if (!embedded) rememberRowCount(`${tableId}:page:last`, rows.length);
14176
14176
  }
14177
14177
  }, [rowsAnswered, rowMemoryKey, rows.length, embedded, tableId]);
14178
- if (table.error) return /* @__PURE__ */ jsx44(RefusalNotice, { error: table.error, className });
14179
- if (fields.error) return /* @__PURE__ */ jsx44(RefusalNotice, { error: fields.error, className });
14178
+ if (table.error) return /* @__PURE__ */ jsx44(RefusalNotice, { error: table.error, onRetry: table.reload, className });
14179
+ if (fields.error) return /* @__PURE__ */ jsx44(RefusalNotice, { error: fields.error, onRetry: fields.reload, className });
14180
14180
  const nothingToShowYet = table.loading && !table.data || // No columns on a table whose level may hide them: not yet known which (one read, Confidential only).
14181
14181
  !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.
14182
14182
  !records.data && !records.error || countedButNotReturned || manual && hand.loading && rows.length === 0;
@@ -14217,7 +14217,7 @@ function GridBody({
14217
14217
  } : {},
14218
14218
  children: [
14219
14219
  toolbarActions ? /* @__PURE__ */ jsx44("div", { className: "flex items-center gap-2", "data-records-grid-actions": "", children: /* @__PURE__ */ jsx44("div", { className: "ml-auto flex items-center gap-1", children: toolbarActions }) }) : null,
14220
- records.error ? /* @__PURE__ */ jsx44(RefusalNotice, { error: inColumnWords(records.error, fields.data ?? []) }) : null,
14220
+ records.error ? /* @__PURE__ */ jsx44(RefusalNotice, { error: inColumnWords(records.error, fields.data ?? []), onRetry: records.reload }) : null,
14221
14221
  manual && hand.error ? /* @__PURE__ */ jsx44(RefusalNotice, { error: hand.error }) : null,
14222
14222
  archived ? /* @__PURE__ */ jsxs39(
14223
14223
  "p",
@@ -15419,7 +15419,7 @@ function Peek({ tableId, recordId, onClose, className, onPage = false }) {
15419
15419
  if (fields.data) rememberRowCount(peekMemoryKey, shownFieldCount);
15420
15420
  }, [fields.data, peekMemoryKey, shownFieldCount]);
15421
15421
  if (record.error) return /* @__PURE__ */ jsx51(RefusalNotice, { error: record.error, className });
15422
- if (fields.error) return /* @__PURE__ */ jsx51(RefusalNotice, { error: fields.error, className });
15422
+ if (fields.error) return /* @__PURE__ */ jsx51(RefusalNotice, { error: fields.error, onRetry: fields.reload, className });
15423
15423
  const document2 = record.data?.document;
15424
15424
  if (document2 && isLockedStub({ document: document2, level: null })) {
15425
15425
  const filed = document2["submitted_at"];
@@ -16774,7 +16774,7 @@ function ChecklistRunner({
16774
16774
  () => runs?.find((r) => r.run_id === activeId) ?? null,
16775
16775
  [runs, activeId]
16776
16776
  );
16777
- if (table.error) return /* @__PURE__ */ jsx57(RefusalNotice, { error: table.error, className });
16777
+ if (table.error) return /* @__PURE__ */ jsx57(RefusalNotice, { error: table.error, onRetry: table.reload, className });
16778
16778
  if (quietWhenEmpty && !runId) {
16779
16779
  const startable = mayStart && rights.write && (templates?.length ?? 0) > 0;
16780
16780
  if (runs === null || runs.length === 0 && !startable && !error && !said) return null;
@@ -19396,8 +19396,8 @@ function TableSettingsPanel({
19396
19396
  const [deliberate, setDeliberate] = useState64(null);
19397
19397
  const [askingToRemove, setAskingToRemove] = useState64(null);
19398
19398
  const [enriching, setEnriching] = useState64(null);
19399
- if (table.error) return /* @__PURE__ */ jsx70(RefusalNotice, { error: table.error, className });
19400
- if (fields.error) return /* @__PURE__ */ jsx70(RefusalNotice, { error: fields.error, className });
19399
+ if (table.error) return /* @__PURE__ */ jsx70(RefusalNotice, { error: table.error, onRetry: table.reload, className });
19400
+ if (fields.error) return /* @__PURE__ */ jsx70(RefusalNotice, { error: fields.error, onRetry: fields.reload, className });
19401
19401
  if (!rights.structure) {
19402
19402
  if (tableIsLocked(table.data)) {
19403
19403
  return /* @__PURE__ */ jsxs64("div", { className: cn29("flex flex-col items-start gap-2 text-xs text-muted-foreground", className), "data-table-locked": "", children: [
@@ -20282,7 +20282,7 @@ function PipelineBoard({
20282
20282
  onMoved?.();
20283
20283
  void reload();
20284
20284
  };
20285
- if (fields.error) return /* @__PURE__ */ jsx73(RefusalNotice, { error: fields.error });
20285
+ if (fields.error) return /* @__PURE__ */ jsx73(RefusalNotice, { error: fields.error, onRetry: fields.reload });
20286
20286
  if (error) return /* @__PURE__ */ jsx73(RefusalNotice, { error });
20287
20287
  if (loading || fields.loading && !fields.data) return /* @__PURE__ */ jsx73(Skeleton16, { className: "h-40 w-full" });
20288
20288
  if (!definition?.is_pipeline) {
@@ -26301,8 +26301,8 @@ function Board({
26301
26301
  tableId: view.subject,
26302
26302
  needed: viewQuestionAsked && !records.loading && records.rows.length === 0
26303
26303
  });
26304
- if (fields.error) return /* @__PURE__ */ jsx88(RefusalNotice, { error: fields.error });
26305
- if (records.error) return /* @__PURE__ */ jsx88(RefusalNotice, { error: records.error });
26304
+ if (fields.error) return /* @__PURE__ */ jsx88(RefusalNotice, { error: fields.error, onRetry: fields.reload });
26305
+ if (records.error) return /* @__PURE__ */ jsx88(RefusalNotice, { error: records.error, onRetry: records.reload });
26306
26306
  if (fields.loading && !fields.data || records.loading && records.rows.length === 0) return /* @__PURE__ */ jsx88(RecordsSkeleton, { layout: view.layout });
26307
26307
  const all = fields.data ?? [];
26308
26308
  const byKey = (key) => all.find((f) => f.key === key);
@@ -31873,7 +31873,7 @@ function ConnectedFormRunner(props) {
31873
31873
  },
31874
31874
  [client, form.subject, form.questions, form.endings]
31875
31875
  );
31876
- if (fields.error) return /* @__PURE__ */ jsx104(RefusalNotice, { error: fields.error, className });
31876
+ if (fields.error) return /* @__PURE__ */ jsx104(RefusalNotice, { error: fields.error, onRetry: fields.reload, className });
31877
31877
  if (fields.loading && !fields.data) return /* @__PURE__ */ jsx104(Skeleton28, { className: cn54("h-40 w-full", className) });
31878
31878
  return /* @__PURE__ */ jsx104(
31879
31879
  FormStage,
@@ -32769,7 +32769,7 @@ function FormBuilder({ tableId, seed, activeFormId, onActiveForm, startWithOne,
32769
32769
  (made) => setMakeOnMount(made ? "made" : "not-made")
32770
32770
  );
32771
32771
  }, [createOnMount, makeOnMount, forms, fields.data, create, table.data, table.error]);
32772
- if (fields.error) return /* @__PURE__ */ jsx105(RefusalNotice, { error: fields.error, className });
32772
+ if (fields.error) return /* @__PURE__ */ jsx105(RefusalNotice, { error: fields.error, onRetry: fields.reload, className });
32773
32773
  if (error) {
32774
32774
  return /* @__PURE__ */ jsx105(
32775
32775
  RefusalNotice,
@@ -33646,7 +33646,7 @@ function SignBlock({ tableId, recordId, render, className }) {
33646
33646
  setName("");
33647
33647
  await load();
33648
33648
  }
33649
- if (fields.error) return /* @__PURE__ */ jsx107(RefusalNotice, { error: fields.error, className });
33649
+ if (fields.error) return /* @__PURE__ */ jsx107(RefusalNotice, { error: fields.error, onRetry: fields.reload, className });
33650
33650
  if (error) {
33651
33651
  return /* @__PURE__ */ jsx107(
33652
33652
  RefusalNotice,
@@ -38598,8 +38598,8 @@ function AdHocCaptureSheet({
38598
38598
  await keep([...queue.current, item]);
38599
38599
  await flush();
38600
38600
  }
38601
- if (table.error) return /* @__PURE__ */ jsx119(RefusalNotice, { error: table.error, className });
38602
- if (fields.error) return /* @__PURE__ */ jsx119(RefusalNotice, { error: fields.error, className });
38601
+ if (table.error) return /* @__PURE__ */ jsx119(RefusalNotice, { error: table.error, onRetry: table.reload, className });
38602
+ if (fields.error) return /* @__PURE__ */ jsx119(RefusalNotice, { error: fields.error, onRetry: fields.reload, className });
38603
38603
  if (fields.loading || pending === null) return /* @__PURE__ */ jsx119(Skeleton41, { className: cn67("h-64 w-full", className) });
38604
38604
  const keys = resolved();
38605
38605
  return /* @__PURE__ */ jsxs112("section", { className: cn67("mx-auto flex w-full max-w-sm flex-col gap-2", className), children: [
@@ -38967,7 +38967,7 @@ function EmbedFrame({
38967
38967
  setSecret(null);
38968
38968
  setTokenId(null);
38969
38969
  }, [client, tokenId]);
38970
- if (table.error) return /* @__PURE__ */ jsx122(RefusalNotice, { error: table.error, className });
38970
+ if (table.error) return /* @__PURE__ */ jsx122(RefusalNotice, { error: table.error, onRetry: table.reload, className });
38971
38971
  if (table.loading && !table.data) return /* @__PURE__ */ jsx122(Skeleton44, { className: cn70("h-48 w-full", className) });
38972
38972
  if (!rights.admin) {
38973
38973
  return /* @__PURE__ */ jsxs115("p", { className: cn70("rounded border border-dashed px-2 py-1 text-xs text-muted-foreground", className), children: [
@@ -41205,7 +41205,7 @@ function TablePage({
41205
41205
  const headerNode = header && !embedded ? header({ actions: table.data ? pageActions : null, tableName: table.data?.name ?? null }) : null;
41206
41206
  if (table.error) return /* @__PURE__ */ jsxs124(Fragment57, { children: [
41207
41207
  headerNode,
41208
- /* @__PURE__ */ jsx131(RefusalNotice, { error: table.error })
41208
+ /* @__PURE__ */ jsx131(RefusalNotice, { error: table.error, onRetry: table.reload })
41209
41209
  ] });
41210
41210
  if (table.loading && !table.data) {
41211
41211
  return /* @__PURE__ */ jsxs124(Fragment57, { children: [