@ai-matrx/records-ui 0.115.74 → 0.115.76

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
@@ -2059,6 +2059,8 @@ interface GridProps {
2059
2059
  * Space only opens.
2060
2060
  */
2061
2061
  onCloseRecord?: (() => void) | undefined;
2062
+ /** The ids the grid is showing, in the order it shows them (AT-RECORD: previous / next in the expanded record). */
2063
+ onRowsShown?: ((ids: Uuid$1[]) => void) | undefined;
2062
2064
  /** SCR-2. Called when an admin clicks the "+" at the end of the headers. */
2063
2065
  onAddField?: (() => void) | undefined;
2064
2066
  /**
@@ -3502,7 +3504,7 @@ declare const SUBSCRIPTION_CADENCE_LABEL: Record<SubscriptionCadence, string>;
3502
3504
  declare const SUBSCRIPTION_CHANNEL_VALUES: readonly ["in_app", "email", "sms"];
3503
3505
  type SubscriptionChannel = (typeof SUBSCRIPTION_CHANNEL_VALUES)[number];
3504
3506
  declare const SUBSCRIPTION_CHANNEL_LABEL: Record<SubscriptionChannel, string>;
3505
- declare const ROLLUP_AGG_VALUES: readonly ["count", "sum", "avg", "min", "max"];
3507
+ declare const ROLLUP_AGG_VALUES: readonly ["count", "sum", "avg", "min", "max", "countall", "counta", "and", "or", "xor", "arrayjoin", "concatenate", "arrayunique", "arraycompact"];
3506
3508
  type RollupAgg = (typeof ROLLUP_AGG_VALUES)[number];
3507
3509
  declare const ROLLUP_AGG_LABEL: Record<RollupAgg, string>;
3508
3510
  declare const FORMULA_OP_VALUES: readonly ["concat", "add", "sub", "mul", "div"];
@@ -3792,10 +3794,10 @@ declare function announceTableArchived({ notify, client, tableId, name, onRestor
3792
3794
 
3793
3795
  /** What a look may hold, with this package's grid look. */
3794
3796
  type ViewLook = base.ViewLook<GridPresentation>;
3795
- declare const lookDocument: (look: Partial<Pick<base.SavedViewSpec<GridPresentation>, "layout" | "measure" | "presentation" | "where" | "sorts" | "groupField" | "swimlaneField" | "collapsedColumns" | "dateField" | "startField" | "endField" | "imageField">>) => Record<string, unknown>;
3796
- declare const lookFromDocument: (doc: Record<string, unknown> | null | undefined) => Partial<Pick<base.SavedViewSpec<GridPresentation>, "layout" | "measure" | "presentation" | "where" | "sorts" | "groupField" | "swimlaneField" | "collapsedColumns" | "dateField" | "startField" | "endField" | "imageField">>;
3797
- declare const readLooks: (client: Pick<_ai_matrx_records_core.RecordsClient, "viewLookRead">, tableId: _ai_matrx_records.Uuid) => Promise<_ai_matrx_records.RecordsResult<Record<string, Partial<Pick<base.SavedViewSpec<GridPresentation>, "layout" | "measure" | "presentation" | "where" | "sorts" | "groupField" | "swimlaneField" | "collapsedColumns" | "dateField" | "startField" | "endField" | "imageField">>>>>;
3798
- declare const keepLook: (client: Pick<_ai_matrx_records_core.RecordsClient, "viewLookSet">, tableId: _ai_matrx_records.Uuid, viewId: _ai_matrx_records.Uuid, look: Partial<Pick<base.SavedViewSpec<GridPresentation>, "layout" | "measure" | "presentation" | "where" | "sorts" | "groupField" | "swimlaneField" | "collapsedColumns" | "dateField" | "startField" | "endField" | "imageField">> | null) => Promise<_ai_matrx_records.RecordsResult<Record<string, unknown> | null>>;
3797
+ declare const lookDocument: (look: Partial<Pick<base.SavedViewSpec<GridPresentation>, "presentation" | "layout" | "measure" | "where" | "sorts" | "groupField" | "swimlaneField" | "collapsedColumns" | "dateField" | "startField" | "endField" | "imageField">>) => Record<string, unknown>;
3798
+ declare const lookFromDocument: (doc: Record<string, unknown> | null | undefined) => Partial<Pick<base.SavedViewSpec<GridPresentation>, "presentation" | "layout" | "measure" | "where" | "sorts" | "groupField" | "swimlaneField" | "collapsedColumns" | "dateField" | "startField" | "endField" | "imageField">>;
3799
+ declare const readLooks: (client: Pick<_ai_matrx_records_core.RecordsClient, "viewLookRead">, tableId: _ai_matrx_records.Uuid) => Promise<_ai_matrx_records.RecordsResult<Record<string, Partial<Pick<base.SavedViewSpec<GridPresentation>, "presentation" | "layout" | "measure" | "where" | "sorts" | "groupField" | "swimlaneField" | "collapsedColumns" | "dateField" | "startField" | "endField" | "imageField">>>>>;
3800
+ declare const keepLook: (client: Pick<_ai_matrx_records_core.RecordsClient, "viewLookSet">, tableId: _ai_matrx_records.Uuid, viewId: _ai_matrx_records.Uuid, look: Partial<Pick<base.SavedViewSpec<GridPresentation>, "presentation" | "layout" | "measure" | "where" | "sorts" | "groupField" | "swimlaneField" | "collapsedColumns" | "dateField" | "startField" | "endField" | "imageField">> | null) => Promise<_ai_matrx_records.RecordsResult<Record<string, unknown> | null>>;
3799
3801
  /** The words of the look bar. One sentence, then the doors. */
3800
3802
  declare const LOOK_WORDS: {
3801
3803
  /** The reason, for a tooltip or a screen reader — never a line on the page (interface-text). */
@@ -3835,6 +3837,8 @@ interface ViewSwitcherProps {
3835
3837
  openRecordId?: Uuid$1 | null | undefined;
3836
3838
  /** Put the record panel away (Escape, or Space on the open row): `Grid.onCloseRecord`. */
3837
3839
  onCloseRecord?: (() => void) | undefined;
3840
+ /** The ids the grid shows, in its order (`Grid.onRowsShown`). */
3841
+ onRowsShown?: ((ids: Uuid$1[]) => void) | undefined;
3838
3842
  /**
3839
3843
  * Called after a card moves between columns, so the host re-reads the rows it owns. A
3840
3844
  * board that moved a card and left the row list alone would show the card in two places
@@ -3942,7 +3946,7 @@ declare function useViewRecords(view: SavedViewSpec, pageSize?: number, filter?:
3942
3946
  */
3943
3947
  membership: string;
3944
3948
  };
3945
- declare function ViewSwitcher({ view, onLayoutChange, onViewChange, onOpenRecord, openRecordId, onCloseRecord, onMoved, onNewRecordForm, onAskWhoChanged, pageSize: pageSizeAsked, titleField, filter, onClearFilter, chooser, viewId, onOrderPlaced, footer, embedded, sortOverride, searchOverride, onSearchChange, searchBox, hideRefusedRowActions, newRowLabel, className, }: ViewSwitcherProps): react.JSX.Element;
3949
+ declare function ViewSwitcher({ view, onLayoutChange, onViewChange, onOpenRecord, openRecordId, onCloseRecord, onRowsShown, onMoved, onNewRecordForm, onAskWhoChanged, pageSize: pageSizeAsked, titleField, filter, onClearFilter, chooser, viewId, onOrderPlaced, footer, embedded, sortOverride, searchOverride, onSearchChange, searchBox, hideRefusedRowActions, newRowLabel, className, }: ViewSwitcherProps): react.JSX.Element;
3946
3950
 
3947
3951
  /** The host app's saved zone (IANA). `null` / junk clears it: the device zone applies. */
3948
3952
  declare function setPersonTimeZone(next: string | null | undefined): void;
@@ -5906,6 +5910,12 @@ interface TablePageProps$1 {
5906
5910
  * Absent, nothing changes: the page opens exactly as it did.
5907
5911
  */
5908
5912
  activeRecordId?: Uuid | null | undefined;
5913
+ /**
5914
+ * THE RECORD IN THE ADDRESS (AT-RECORD). Told whenever the open record changes (null: shut), so the
5915
+ * host can write `?record=` — pushed when one opens, replaced when she steps to the next, so Back
5916
+ * closes it and a pasted link reopens it. Read back through `activeRecordId`.
5917
+ */
5918
+ onRecordChange?: ((recordId: Uuid | null, how: "open" | "step" | "close") => void) | undefined;
5909
5919
  /**
5910
5920
  * WHICH VIEW THE ADDRESS NAMES — `grid`, `kanban`, `calendar`, `gallery` or
5911
5921
  * `dashboards`, exactly as the host read it out of `?view=`.
@@ -6826,10 +6836,19 @@ interface ViewActionHost {
6826
6836
  togglePersonal?: () => void | Promise<void>;
6827
6837
  /** Move the view to a named section of the list. Left out, no such verb. */
6828
6838
  moveToSection?: () => void | Promise<void>;
6839
+ /** Copy another view's settings onto this one (AT-RECORD, Airtable's "Copy view configuration"). Left out, no such verb. */
6840
+ copySettings?: () => void | Promise<void>;
6829
6841
  }
6830
6842
  /** `whyNot`: the person's reason they may not change this table's views, or null when they may. */
6831
6843
  declare function viewActions(whyNot: string | null, host: ViewActionHost, locked?: boolean, personal?: boolean): ObjectAction[];
6832
6844
 
6845
+ interface RecordNeighbors {
6846
+ index: number;
6847
+ total: number;
6848
+ previous: string | null;
6849
+ next: string | null;
6850
+ }
6851
+
6833
6852
  interface RecordPanelProps {
6834
6853
  tableId: Uuid$1;
6835
6854
  recordId: Uuid$1;
@@ -6842,8 +6861,14 @@ interface RecordPanelProps {
6842
6861
  onAskAboutField?: ((fieldKey: string) => void) | undefined;
6843
6862
  /** Drawn as the record's own page (no "Open" link to itself). */
6844
6863
  onPage?: boolean | undefined;
6845
- }
6846
- declare function RecordPanel({ tableId, recordId, onClose, onAskAboutField, onPage }: RecordPanelProps): react.JSX.Element;
6864
+ /** Where this record sits in the view the grid shows, and how to move to another (AT-RECORD). */
6865
+ neighbors?: RecordNeighbors | null | undefined;
6866
+ onStep?: ((recordId: Uuid$1) => void) | undefined;
6867
+ /** Drawn over the grid, wide (true) or beside it; `onToggleExpand` draws the control. */
6868
+ expanded?: boolean | undefined;
6869
+ onToggleExpand?: (() => void) | undefined;
6870
+ }
6871
+ declare function RecordPanel({ tableId, recordId, onClose, onAskAboutField, onPage, neighbors, onStep, expanded, onToggleExpand }: RecordPanelProps): react.JSX.Element;
6847
6872
 
6848
6873
  /**
6849
6874
  * The column a record page writes its body in: the formatted-text column NAMED like a page's body
package/dist/index.d.ts CHANGED
@@ -2059,6 +2059,8 @@ interface GridProps {
2059
2059
  * Space only opens.
2060
2060
  */
2061
2061
  onCloseRecord?: (() => void) | undefined;
2062
+ /** The ids the grid is showing, in the order it shows them (AT-RECORD: previous / next in the expanded record). */
2063
+ onRowsShown?: ((ids: Uuid$1[]) => void) | undefined;
2062
2064
  /** SCR-2. Called when an admin clicks the "+" at the end of the headers. */
2063
2065
  onAddField?: (() => void) | undefined;
2064
2066
  /**
@@ -3502,7 +3504,7 @@ declare const SUBSCRIPTION_CADENCE_LABEL: Record<SubscriptionCadence, string>;
3502
3504
  declare const SUBSCRIPTION_CHANNEL_VALUES: readonly ["in_app", "email", "sms"];
3503
3505
  type SubscriptionChannel = (typeof SUBSCRIPTION_CHANNEL_VALUES)[number];
3504
3506
  declare const SUBSCRIPTION_CHANNEL_LABEL: Record<SubscriptionChannel, string>;
3505
- declare const ROLLUP_AGG_VALUES: readonly ["count", "sum", "avg", "min", "max"];
3507
+ declare const ROLLUP_AGG_VALUES: readonly ["count", "sum", "avg", "min", "max", "countall", "counta", "and", "or", "xor", "arrayjoin", "concatenate", "arrayunique", "arraycompact"];
3506
3508
  type RollupAgg = (typeof ROLLUP_AGG_VALUES)[number];
3507
3509
  declare const ROLLUP_AGG_LABEL: Record<RollupAgg, string>;
3508
3510
  declare const FORMULA_OP_VALUES: readonly ["concat", "add", "sub", "mul", "div"];
@@ -3792,10 +3794,10 @@ declare function announceTableArchived({ notify, client, tableId, name, onRestor
3792
3794
 
3793
3795
  /** What a look may hold, with this package's grid look. */
3794
3796
  type ViewLook = base.ViewLook<GridPresentation>;
3795
- declare const lookDocument: (look: Partial<Pick<base.SavedViewSpec<GridPresentation>, "layout" | "measure" | "presentation" | "where" | "sorts" | "groupField" | "swimlaneField" | "collapsedColumns" | "dateField" | "startField" | "endField" | "imageField">>) => Record<string, unknown>;
3796
- declare const lookFromDocument: (doc: Record<string, unknown> | null | undefined) => Partial<Pick<base.SavedViewSpec<GridPresentation>, "layout" | "measure" | "presentation" | "where" | "sorts" | "groupField" | "swimlaneField" | "collapsedColumns" | "dateField" | "startField" | "endField" | "imageField">>;
3797
- declare const readLooks: (client: Pick<_ai_matrx_records_core.RecordsClient, "viewLookRead">, tableId: _ai_matrx_records.Uuid) => Promise<_ai_matrx_records.RecordsResult<Record<string, Partial<Pick<base.SavedViewSpec<GridPresentation>, "layout" | "measure" | "presentation" | "where" | "sorts" | "groupField" | "swimlaneField" | "collapsedColumns" | "dateField" | "startField" | "endField" | "imageField">>>>>;
3798
- declare const keepLook: (client: Pick<_ai_matrx_records_core.RecordsClient, "viewLookSet">, tableId: _ai_matrx_records.Uuid, viewId: _ai_matrx_records.Uuid, look: Partial<Pick<base.SavedViewSpec<GridPresentation>, "layout" | "measure" | "presentation" | "where" | "sorts" | "groupField" | "swimlaneField" | "collapsedColumns" | "dateField" | "startField" | "endField" | "imageField">> | null) => Promise<_ai_matrx_records.RecordsResult<Record<string, unknown> | null>>;
3797
+ declare const lookDocument: (look: Partial<Pick<base.SavedViewSpec<GridPresentation>, "presentation" | "layout" | "measure" | "where" | "sorts" | "groupField" | "swimlaneField" | "collapsedColumns" | "dateField" | "startField" | "endField" | "imageField">>) => Record<string, unknown>;
3798
+ declare const lookFromDocument: (doc: Record<string, unknown> | null | undefined) => Partial<Pick<base.SavedViewSpec<GridPresentation>, "presentation" | "layout" | "measure" | "where" | "sorts" | "groupField" | "swimlaneField" | "collapsedColumns" | "dateField" | "startField" | "endField" | "imageField">>;
3799
+ declare const readLooks: (client: Pick<_ai_matrx_records_core.RecordsClient, "viewLookRead">, tableId: _ai_matrx_records.Uuid) => Promise<_ai_matrx_records.RecordsResult<Record<string, Partial<Pick<base.SavedViewSpec<GridPresentation>, "presentation" | "layout" | "measure" | "where" | "sorts" | "groupField" | "swimlaneField" | "collapsedColumns" | "dateField" | "startField" | "endField" | "imageField">>>>>;
3800
+ declare const keepLook: (client: Pick<_ai_matrx_records_core.RecordsClient, "viewLookSet">, tableId: _ai_matrx_records.Uuid, viewId: _ai_matrx_records.Uuid, look: Partial<Pick<base.SavedViewSpec<GridPresentation>, "presentation" | "layout" | "measure" | "where" | "sorts" | "groupField" | "swimlaneField" | "collapsedColumns" | "dateField" | "startField" | "endField" | "imageField">> | null) => Promise<_ai_matrx_records.RecordsResult<Record<string, unknown> | null>>;
3799
3801
  /** The words of the look bar. One sentence, then the doors. */
3800
3802
  declare const LOOK_WORDS: {
3801
3803
  /** The reason, for a tooltip or a screen reader — never a line on the page (interface-text). */
@@ -3835,6 +3837,8 @@ interface ViewSwitcherProps {
3835
3837
  openRecordId?: Uuid$1 | null | undefined;
3836
3838
  /** Put the record panel away (Escape, or Space on the open row): `Grid.onCloseRecord`. */
3837
3839
  onCloseRecord?: (() => void) | undefined;
3840
+ /** The ids the grid shows, in its order (`Grid.onRowsShown`). */
3841
+ onRowsShown?: ((ids: Uuid$1[]) => void) | undefined;
3838
3842
  /**
3839
3843
  * Called after a card moves between columns, so the host re-reads the rows it owns. A
3840
3844
  * board that moved a card and left the row list alone would show the card in two places
@@ -3942,7 +3946,7 @@ declare function useViewRecords(view: SavedViewSpec, pageSize?: number, filter?:
3942
3946
  */
3943
3947
  membership: string;
3944
3948
  };
3945
- declare function ViewSwitcher({ view, onLayoutChange, onViewChange, onOpenRecord, openRecordId, onCloseRecord, onMoved, onNewRecordForm, onAskWhoChanged, pageSize: pageSizeAsked, titleField, filter, onClearFilter, chooser, viewId, onOrderPlaced, footer, embedded, sortOverride, searchOverride, onSearchChange, searchBox, hideRefusedRowActions, newRowLabel, className, }: ViewSwitcherProps): react.JSX.Element;
3949
+ declare function ViewSwitcher({ view, onLayoutChange, onViewChange, onOpenRecord, openRecordId, onCloseRecord, onRowsShown, onMoved, onNewRecordForm, onAskWhoChanged, pageSize: pageSizeAsked, titleField, filter, onClearFilter, chooser, viewId, onOrderPlaced, footer, embedded, sortOverride, searchOverride, onSearchChange, searchBox, hideRefusedRowActions, newRowLabel, className, }: ViewSwitcherProps): react.JSX.Element;
3946
3950
 
3947
3951
  /** The host app's saved zone (IANA). `null` / junk clears it: the device zone applies. */
3948
3952
  declare function setPersonTimeZone(next: string | null | undefined): void;
@@ -5906,6 +5910,12 @@ interface TablePageProps$1 {
5906
5910
  * Absent, nothing changes: the page opens exactly as it did.
5907
5911
  */
5908
5912
  activeRecordId?: Uuid | null | undefined;
5913
+ /**
5914
+ * THE RECORD IN THE ADDRESS (AT-RECORD). Told whenever the open record changes (null: shut), so the
5915
+ * host can write `?record=` — pushed when one opens, replaced when she steps to the next, so Back
5916
+ * closes it and a pasted link reopens it. Read back through `activeRecordId`.
5917
+ */
5918
+ onRecordChange?: ((recordId: Uuid | null, how: "open" | "step" | "close") => void) | undefined;
5909
5919
  /**
5910
5920
  * WHICH VIEW THE ADDRESS NAMES — `grid`, `kanban`, `calendar`, `gallery` or
5911
5921
  * `dashboards`, exactly as the host read it out of `?view=`.
@@ -6826,10 +6836,19 @@ interface ViewActionHost {
6826
6836
  togglePersonal?: () => void | Promise<void>;
6827
6837
  /** Move the view to a named section of the list. Left out, no such verb. */
6828
6838
  moveToSection?: () => void | Promise<void>;
6839
+ /** Copy another view's settings onto this one (AT-RECORD, Airtable's "Copy view configuration"). Left out, no such verb. */
6840
+ copySettings?: () => void | Promise<void>;
6829
6841
  }
6830
6842
  /** `whyNot`: the person's reason they may not change this table's views, or null when they may. */
6831
6843
  declare function viewActions(whyNot: string | null, host: ViewActionHost, locked?: boolean, personal?: boolean): ObjectAction[];
6832
6844
 
6845
+ interface RecordNeighbors {
6846
+ index: number;
6847
+ total: number;
6848
+ previous: string | null;
6849
+ next: string | null;
6850
+ }
6851
+
6833
6852
  interface RecordPanelProps {
6834
6853
  tableId: Uuid$1;
6835
6854
  recordId: Uuid$1;
@@ -6842,8 +6861,14 @@ interface RecordPanelProps {
6842
6861
  onAskAboutField?: ((fieldKey: string) => void) | undefined;
6843
6862
  /** Drawn as the record's own page (no "Open" link to itself). */
6844
6863
  onPage?: boolean | undefined;
6845
- }
6846
- declare function RecordPanel({ tableId, recordId, onClose, onAskAboutField, onPage }: RecordPanelProps): react.JSX.Element;
6864
+ /** Where this record sits in the view the grid shows, and how to move to another (AT-RECORD). */
6865
+ neighbors?: RecordNeighbors | null | undefined;
6866
+ onStep?: ((recordId: Uuid$1) => void) | undefined;
6867
+ /** Drawn over the grid, wide (true) or beside it; `onToggleExpand` draws the control. */
6868
+ expanded?: boolean | undefined;
6869
+ onToggleExpand?: (() => void) | undefined;
6870
+ }
6871
+ declare function RecordPanel({ tableId, recordId, onClose, onAskAboutField, onPage, neighbors, onStep, expanded, onToggleExpand }: RecordPanelProps): react.JSX.Element;
6847
6872
 
6848
6873
  /**
6849
6874
  * The column a record page writes its body in: the formatted-text column NAMED like a page's body