@ai-matrx/records-ui 0.93.118 → 0.93.119

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.d.cts CHANGED
@@ -2331,7 +2331,7 @@ interface CustomFieldsAgentDoor {
2331
2331
  setValues: (values: CustomFieldValuesRequest) => Promise<CustomFieldSetResult>;
2332
2332
  }
2333
2333
  declare const ADDABLE_TYPES: {
2334
- value: "number" | "member" | "text" | "long_text" | "currency" | "percent" | "datetime" | "email" | "url" | "phone" | "attachment";
2334
+ value: "number" | "attachment" | "currency" | "datetime" | "email" | "text" | "member" | "percent" | "phone" | "url" | "long_text";
2335
2335
  label: string;
2336
2336
  }[];
2337
2337
  /**
package/dist/index.d.ts CHANGED
@@ -2331,7 +2331,7 @@ interface CustomFieldsAgentDoor {
2331
2331
  setValues: (values: CustomFieldValuesRequest) => Promise<CustomFieldSetResult>;
2332
2332
  }
2333
2333
  declare const ADDABLE_TYPES: {
2334
- value: "number" | "member" | "text" | "long_text" | "currency" | "percent" | "datetime" | "email" | "url" | "phone" | "attachment";
2334
+ value: "number" | "attachment" | "currency" | "datetime" | "email" | "text" | "member" | "percent" | "phone" | "url" | "long_text";
2335
2335
  label: string;
2336
2336
  }[];
2337
2337
  /**
package/dist/index.js CHANGED
@@ -16461,6 +16461,7 @@ function GridBody({
16461
16461
  }
16462
16462
  ) : null,
16463
16463
  question.refused.length > 0 ? /* @__PURE__ */ jsx51("p", { role: "status", "data-records-filter-refused": "", className: "text-xs text-muted-foreground", children: question.refused.join(" ") }) : null,
16464
+ storePaged && (serverRead.data?.sortIgnored.length ?? 0) > 0 ? /* @__PURE__ */ jsx51("p", { role: "status", "data-records-sort-ignored": serverRead.data?.sortIgnored.join(" "), className: "text-xs text-muted-foreground", children: "Sort skipped: column not available" }) : null,
16464
16465
  runner.outcome && !(merged && runner.outcome.kind === "ran" && runner.outcome.undo !== null) ? /* @__PURE__ */ jsx51(ActionOutcomeNotice, { outcome: runner.outcome, onUndo: () => void runner.undo(), onDismiss: runner.dismiss }) : null,
16465
16466
  duplicated ? /* @__PURE__ */ jsxs45("p", { role: "status", "data-records-duplicated": "", className: "flex items-center gap-2 rounded border border-border bg-muted/40 px-2 py-1 text-xs", children: [
16466
16467
  /* @__PURE__ */ jsx51("span", { children: duplicated }),
@@ -32051,15 +32052,33 @@ function personActor(userId) {
32051
32052
  function recordsDataSource(client, fallbackSchema = "custom") {
32052
32053
  const supabase = client;
32053
32054
  return {
32054
- rpc(fn, args, options) {
32055
- const on = supabase.schema(options?.schema ?? fallbackSchema);
32056
- return on.rpc(fn, args);
32055
+ async rpc(fn, args, options) {
32056
+ const schema = options?.schema ?? fallbackSchema;
32057
+ if (schema === "custom" && supabase.auth?.getSession && !await hasSession(supabase.auth.getSession)) {
32058
+ return { data: null, error: SIGNED_OUT };
32059
+ }
32060
+ const on = supabase.schema(schema);
32061
+ return await on.rpc(fn, args);
32057
32062
  },
32058
32063
  schema(name) {
32059
32064
  return supabase.schema(name);
32060
32065
  }
32061
32066
  };
32062
32067
  }
32068
+ var SIGNED_OUT = {
32069
+ code: "42501",
32070
+ message: "Nobody is signed in, so there is nothing to read.",
32071
+ hint: "Sign in, then try again.",
32072
+ details: null
32073
+ };
32074
+ async function hasSession(getSession) {
32075
+ try {
32076
+ const answer = await getSession();
32077
+ return Boolean(answer?.data?.session);
32078
+ } catch {
32079
+ return true;
32080
+ }
32081
+ }
32063
32082
 
32064
32083
  // src/TablePage.tsx
32065
32084
  import { useCallback as useCallback52, useEffect as useEffect84, useRef as useRef32, useState as useState97 } from "react";