@ai-matrx/records-ui 0.93.12 → 0.93.13

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
@@ -16575,7 +16575,7 @@ function PipelineBoard({
16575
16575
  };
16576
16576
  if (fields.error) return /* @__PURE__ */ jsx57(RefusalNotice, { error: fields.error });
16577
16577
  if (error) return /* @__PURE__ */ jsx57(RefusalNotice, { error });
16578
- if (loading || fields.loading) return /* @__PURE__ */ jsx57(Skeleton6, { className: "h-40 w-full" });
16578
+ if (loading || fields.loading && !fields.data) return /* @__PURE__ */ jsx57(Skeleton6, { className: "h-40 w-full" });
16579
16579
  if (!definition?.is_pipeline) {
16580
16580
  return /* @__PURE__ */ jsx57("p", { className: "rounded border border-dashed p-4 text-xs text-muted-foreground", children: definition?.why ?? "This table has no stage column yet, so there is no board to draw." });
16581
16581
  }
@@ -17272,7 +17272,7 @@ function Board({
17272
17272
  );
17273
17273
  if (fields.error) return /* @__PURE__ */ jsx58(RefusalNotice, { error: fields.error });
17274
17274
  if (records.error) return /* @__PURE__ */ jsx58(RefusalNotice, { error: records.error });
17275
- if (fields.loading || records.loading) return /* @__PURE__ */ jsx58(Skeleton7, { className: "h-40 w-full" });
17275
+ if (fields.loading && !fields.data || records.loading && records.rows.length === 0) return /* @__PURE__ */ jsx58(Skeleton7, { className: "h-40 w-full" });
17276
17276
  const all = fields.data ?? [];
17277
17277
  const byKey = (key) => all.find((f) => f.key === key);
17278
17278
  const noRows = records.rows.length === 0 ? /* @__PURE__ */ jsx58(
@@ -20164,7 +20164,7 @@ function CommentThread({ tableId, recordId, fieldKey, className }) {
20164
20164
  return people.filter((p) => !picked.some((already) => already.userId === p.userId)).filter((p) => q === "" || (p.name ?? p.email ?? "").toLowerCase().includes(q)).slice(0, 6);
20165
20165
  }, [mentionQuery, people, picked]);
20166
20166
  if (error) return /* @__PURE__ */ jsx66(RefusalNotice, { error, className });
20167
- if (!thread || table.loading || fields.loading) return /* @__PURE__ */ jsx66(Skeleton14, { className: cn40("h-32 w-full", className) });
20167
+ if (!thread || table.loading && !table.data || fields.loading && !fields.data) return /* @__PURE__ */ jsx66(Skeleton14, { className: cn40("h-32 w-full", className) });
20168
20168
  const shown3 = fieldKey ? thread.comments.filter((c) => c.field_key === fieldKey) : thread.comments;
20169
20169
  const roots = shown3.filter((c) => !c.parent_comment_id);
20170
20170
  const repliesOf = (id) => shown3.filter((c) => c.parent_comment_id === id);
@@ -20384,7 +20384,7 @@ function FieldHistoryPanel({
20384
20384
  }, [load]);
20385
20385
  const label = (fields.data ?? []).find((f) => f.key === fieldKey)?.label || humanize(fieldKey);
20386
20386
  if (error) return /* @__PURE__ */ jsx67(RefusalNotice, { error, className });
20387
- if (!rows || fields.loading || table.loading) return /* @__PURE__ */ jsx67(Skeleton15, { className: cn41("h-40 w-full", className) });
20387
+ if (!rows || fields.loading && !fields.data || table.loading && !table.data) return /* @__PURE__ */ jsx67(Skeleton15, { className: cn41("h-40 w-full", className) });
20388
20388
  async function start(row) {
20389
20389
  setSaid(null);
20390
20390
  setPending({ phase: "asking", recordId: row.record_id, version: row.version });
@@ -22728,7 +22728,7 @@ function ConnectedFormRunner(props) {
22728
22728
  [client, form.subject, form.questions]
22729
22729
  );
22730
22730
  if (fields.error) return /* @__PURE__ */ jsx75(RefusalNotice, { error: fields.error, className });
22731
- if (fields.loading) return /* @__PURE__ */ jsx75(Skeleton21, { className: cn49("h-40 w-full", className) });
22731
+ if (fields.loading && !fields.data) return /* @__PURE__ */ jsx75(Skeleton21, { className: cn49("h-40 w-full", className) });
22732
22732
  return /* @__PURE__ */ jsx75(
22733
22733
  FormStage,
22734
22734
  {
@@ -24207,7 +24207,7 @@ function DocTemplate({ tableId, seed, activeTemplateId, onActiveTemplate, classN
24207
24207
  }
24208
24208
  );
24209
24209
  }
24210
- if (templates === null || fields.loading) return /* @__PURE__ */ jsx79(Skeleton24, { className: cn53("h-64 w-full", className) });
24210
+ if (templates === null || fields.loading && !fields.data) return /* @__PURE__ */ jsx79(Skeleton24, { className: cn53("h-64 w-full", className) });
24211
24211
  if (!rights.admin) {
24212
24212
  return /* @__PURE__ */ jsx79("p", { className: cn53("text-xs text-muted-foreground", className), children: rights.why("structure") });
24213
24213
  }
@@ -25897,7 +25897,7 @@ function BookingBuilder({ tableId, bookingId, onSaved, onClose, className }) {
25897
25897
  await load();
25898
25898
  onSaved?.({ form_id: formId });
25899
25899
  }
25900
- if (!loaded || fields.loading) return /* @__PURE__ */ jsx85(Skeleton29, { className: cn59("h-64 w-full", className) });
25900
+ if (!loaded || fields.loading && !fields.data) return /* @__PURE__ */ jsx85(Skeleton29, { className: cn59("h-64 w-full", className) });
25901
25901
  if (!rights.structure) {
25902
25902
  return /* @__PURE__ */ jsx85("p", { className: cn59("text-xs text-muted-foreground", className), children: rights.why("structure") ?? "Making a booking page needs the admin level on this table, because it lets people with no account take time in your calendar." });
25903
25903
  }
@@ -27190,7 +27190,7 @@ function EmbedFrame({
27190
27190
  setTokenId(null);
27191
27191
  }, [client, tokenId]);
27192
27192
  if (table.error) return /* @__PURE__ */ jsx91(RefusalNotice, { error: table.error, className });
27193
- if (table.loading) return /* @__PURE__ */ jsx91(Skeleton35, { className: cn65("h-48 w-full", className) });
27193
+ if (table.loading && !table.data) return /* @__PURE__ */ jsx91(Skeleton35, { className: cn65("h-48 w-full", className) });
27194
27194
  if (!rights.admin) {
27195
27195
  return /* @__PURE__ */ jsxs85("p", { className: cn65("rounded border border-dashed px-2 py-1 text-xs text-muted-foreground", className), children: [
27196
27196
  rights.why("structure"),
@@ -28794,7 +28794,7 @@ function TablePage({
28794
28794
  headerNode,
28795
28795
  /* @__PURE__ */ jsx97(RefusalNotice, { error: table.error })
28796
28796
  ] });
28797
- if (table.loading) return /* @__PURE__ */ jsxs90(Fragment40, { children: [
28797
+ if (table.loading && !table.data) return /* @__PURE__ */ jsxs90(Fragment40, { children: [
28798
28798
  headerNode,
28799
28799
  /* @__PURE__ */ jsx97(Skeleton38, { className: "h-40 w-full" })
28800
28800
  ] });