@ai-matrx/records-ui 0.115.76 → 0.115.77

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
@@ -6957,12 +6957,14 @@ declare function duplicateProgressWords(p: TableDuplicateProgress): string;
6957
6957
  interface TableDuplicateDialogProps {
6958
6958
  tableId: Uuid;
6959
6959
  name: string;
6960
+ /** The table's own organization: every write says which organization it is for (the copy stays in it). */
6961
+ organizationId?: Uuid | null | undefined;
6960
6962
  open: boolean;
6961
6963
  onOpenChange: (open: boolean) => void;
6962
6964
  /** The copy landed: the host opens it (a list re-reads). Absent, "Open the copy" follows its path. */
6963
6965
  onDuplicated?: ((copy: TableDuplicated) => void) | undefined;
6964
6966
  }
6965
- declare function TableDuplicateDialog({ tableId, name, open, onOpenChange, onDuplicated }: TableDuplicateDialogProps): react.JSX.Element;
6967
+ declare function TableDuplicateDialog({ tableId, name, organizationId, open, onOpenChange, onDuplicated }: TableDuplicateDialogProps): react.JSX.Element;
6966
6968
 
6967
6969
  declare function CalendarLinkOnce({ url }: {
6968
6970
  url: string;
package/dist/index.d.ts CHANGED
@@ -6957,12 +6957,14 @@ declare function duplicateProgressWords(p: TableDuplicateProgress): string;
6957
6957
  interface TableDuplicateDialogProps {
6958
6958
  tableId: Uuid;
6959
6959
  name: string;
6960
+ /** The table's own organization: every write says which organization it is for (the copy stays in it). */
6961
+ organizationId?: Uuid | null | undefined;
6960
6962
  open: boolean;
6961
6963
  onOpenChange: (open: boolean) => void;
6962
6964
  /** The copy landed: the host opens it (a list re-reads). Absent, "Open the copy" follows its path. */
6963
6965
  onDuplicated?: ((copy: TableDuplicated) => void) | undefined;
6964
6966
  }
6965
- declare function TableDuplicateDialog({ tableId, name, open, onOpenChange, onDuplicated }: TableDuplicateDialogProps): react.JSX.Element;
6967
+ declare function TableDuplicateDialog({ tableId, name, organizationId, open, onOpenChange, onDuplicated }: TableDuplicateDialogProps): react.JSX.Element;
6966
6968
 
6967
6969
  declare function CalendarLinkOnce({ url }: {
6968
6970
  url: string;
package/dist/index.js CHANGED
@@ -52656,19 +52656,19 @@ var GROUPS = ["Move", "Select", "Edit", "Clipboard", "Record"];
52656
52656
  function asksShortcutHelp(event) {
52657
52657
  const target = event.target;
52658
52658
  const typing = Boolean(target && (["INPUT", "TEXTAREA", "SELECT"].includes(target.tagName) || target.isContentEditable));
52659
- if (event.key === "/" && (event.ctrlKey || event.metaKey) && !event.altKey) return true;
52660
52659
  return event.key === "?" && !event.ctrlKey && !event.metaKey && !event.altKey && !typing;
52661
52660
  }
52662
52661
  function GridShortcutsHelp() {
52663
52662
  const [open, setOpen] = useState144(false);
52664
52663
  useEffect122(() => {
52665
52664
  const onKey = (event) => {
52666
- if (event.defaultPrevented || !asksShortcutHelp(event)) return;
52665
+ if (!asksShortcutHelp(event)) return;
52667
52666
  event.preventDefault();
52667
+ event.stopPropagation();
52668
52668
  setOpen((now) => !now);
52669
52669
  };
52670
- document.addEventListener("keydown", onKey);
52671
- return () => document.removeEventListener("keydown", onKey);
52670
+ document.addEventListener("keydown", onKey, true);
52671
+ return () => document.removeEventListener("keydown", onKey, true);
52672
52672
  }, []);
52673
52673
  if (!open) return null;
52674
52674
  const mac = typeof navigator !== "undefined" && /Mac|iPhone|iPad/.test(navigator.platform);
@@ -52945,7 +52945,7 @@ function duplicateProgressWords(p) {
52945
52945
  if (p.views.total > 0 && p.step === "views") return `Copying views \xB7 ${p.views.done} of ${p.views.total}`;
52946
52946
  return "Copying columns\u2026";
52947
52947
  }
52948
- function TableDuplicateDialog({ tableId, name, open, onOpenChange, onDuplicated }) {
52948
+ function TableDuplicateDialog({ tableId, name, organizationId, open, onOpenChange, onDuplicated }) {
52949
52949
  const client = useRecordsClient105();
52950
52950
  const host = useRecordsUi();
52951
52951
  const [typed2, setTyped] = useState148(() => copyNameFor(name));
@@ -52967,6 +52967,7 @@ function TableDuplicateDialog({ tableId, name, open, onOpenChange, onDuplicated
52967
52967
  const made = await client.tableDuplicate({
52968
52968
  tableId,
52969
52969
  withRecords,
52970
+ ...organizationId ? { organizationId } : {},
52970
52971
  name: typed2.trim(),
52971
52972
  onProgress: (progress) => setPhase({ kind: "copying", progress })
52972
52973
  });
@@ -54430,6 +54431,7 @@ function TablePage({
54430
54431
  {
54431
54432
  tableId,
54432
54433
  name: table.data.name,
54434
+ organizationId: organizationId ?? null,
54433
54435
  open: duplicateOpen,
54434
54436
  onOpenChange: setDuplicateOpen,
54435
54437
  ...actionHost?.onDuplicated ? { onDuplicated: actionHost.onDuplicated } : {}