@ai-matrx/records-ui 0.101.31 → 0.101.34

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
@@ -588,6 +588,12 @@ interface ReferenceChipRef {
588
588
  icon?: string | null | undefined;
589
589
  }
590
590
  interface RecordsUiHost {
591
+ /**
592
+ * Draws an icon kept as a NAME ("Briefcase" — how the store keeps an icon a person picked from the
593
+ * icon list). A relation cell in an embedded table wears its record's icon; an emoji is drawn as
594
+ * text and a name only through this port. Unbound (or `null` back), the page glyph stands in.
595
+ */
596
+ renderIcon?: ((name: string) => ReactNode) | undefined;
591
597
  /**
592
598
  * TEMPORARY (one-grid merge, steps 5-8). Which table grid draws: `classic` — the default Grid
593
599
  * as it shipped in 0.86; `merged` — the same grid with the older /data grid's control layer on
@@ -2247,6 +2253,15 @@ interface GridProps {
2247
2253
  field: string;
2248
2254
  direction: "asc" | "desc";
2249
2255
  } | null | undefined;
2256
+ /**
2257
+ * THE VIEWER'S OWN SEARCH, handed by the host (CHAIR-EMBEDDED-FIDELITY 15), the way `sortOverride`
2258
+ * hands a sort: it filters rows for this viewer only, is never written to the view, and is asked of
2259
+ * the store's own search (`custom.read_records_page`'s `search`), never a filter over loaded rows.
2260
+ * `null` / `""` clears it. Left out, an embedded grid's own magnifier owns the term.
2261
+ */
2262
+ searchOverride?: string | null | undefined;
2263
+ /** Every change of the term, from the embedded magnifier or the override (a controlled host's echo). */
2264
+ onSearchChange?: ((search: string) => void) | undefined;
2250
2265
  /** The new-row line's words ("New page"). Default "Add row". */
2251
2266
  newRowLabel?: string | undefined;
2252
2267
  /**
@@ -2327,6 +2342,11 @@ interface ViewReading {
2327
2342
  */
2328
2343
  type LabelLookup = ((field: Field$1, id: string) => string | null) & {
2329
2344
  archived?: (field: Field$1, id: string) => boolean;
2345
+ /** The linked record's own icon, and its table's icon for one that has none (same call as the words). */
2346
+ icons?: (field: Field$1, id: string) => {
2347
+ icon: string | null;
2348
+ tableIcon: string | null;
2349
+ } | undefined;
2330
2350
  };
2331
2351
  /**
2332
2352
  * HOW LONG A CELL MAY SAY "Loading…" BEFORE IT HAS TO SAY WHAT IT IS WAITING
@@ -3899,6 +3919,9 @@ interface ViewSwitcherProps {
3899
3919
  field: string;
3900
3920
  direction: "asc" | "desc";
3901
3921
  } | null | undefined;
3922
+ /** The viewer's own search (`GridProps.searchOverride`): this viewer only, never saved, asked of the store. */
3923
+ searchOverride?: string | null | undefined;
3924
+ onSearchChange?: ((search: string) => void) | undefined;
3902
3925
  /** The grid's new-row line words (`GridProps.newRowLabel`). */
3903
3926
  newRowLabel?: string | undefined;
3904
3927
  className?: string | undefined;
@@ -3930,7 +3953,7 @@ declare function useViewRecords(view: SavedViewSpec, pageSize?: number, filter?:
3930
3953
  */
3931
3954
  membership: string;
3932
3955
  };
3933
- declare function ViewSwitcher({ view, onLayoutChange, onViewChange, onOpenRecord, openRecordId, onCloseRecord, onMoved, onNewRecordForm, onAskWhoChanged, pageSize: pageSizeAsked, titleField, filter, onClearFilter, hostLayout, onHostLayoutChange, chooser, openExport, viewId, onOrderPlaced, footer, embedded, sortOverride, newRowLabel, className, }: ViewSwitcherProps): react.JSX.Element;
3956
+ declare function ViewSwitcher({ view, onLayoutChange, onViewChange, onOpenRecord, openRecordId, onCloseRecord, onMoved, onNewRecordForm, onAskWhoChanged, pageSize: pageSizeAsked, titleField, filter, onClearFilter, hostLayout, onHostLayoutChange, chooser, openExport, viewId, onOrderPlaced, footer, embedded, sortOverride, searchOverride, onSearchChange, newRowLabel, className, }: ViewSwitcherProps): react.JSX.Element;
3934
3957
 
3935
3958
  type CalendarMode = "month" | "week" | "day" | "list";
3936
3959
  interface CalendarViewProps {
@@ -5974,6 +5997,13 @@ interface TablePageProps$1 {
5974
5997
  presentation?: "page" | "embedded" | undefined;
5975
5998
  /** The new-row line's words in an embedded table ("New page"). */
5976
5999
  newRowLabel?: string | undefined;
6000
+ /**
6001
+ * The viewer's own search, handed by the host (the `sortOverride` model): filters rows for this
6002
+ * viewer only, is never saved to the view, and is asked of the store's search. An embedded table
6003
+ * also draws its own magnifier (`onSearchChange` hears it).
6004
+ */
6005
+ searchOverride?: string | null | undefined;
6006
+ onSearchChange?: ((search: string) => void) | undefined;
5977
6007
  /** Rows per page for every layout. */
5978
6008
  pageSize?: number | undefined;
5979
6009
  /**
@@ -6372,6 +6402,14 @@ interface EntitySourceState {
6372
6402
  refused: string;
6373
6403
  }>;
6374
6404
  reload: () => void;
6405
+ /**
6406
+ * "SHOW MORE" (CHAIR-EMBEDDED-FIDELITY 16): the rows the door has not given yet are asked as the
6407
+ * NEXT page (`limit` = one page, `offset` = rows held) and appended — never the whole source.
6408
+ */
6409
+ loadMore: () => Promise<void>;
6410
+ /** The door counts more rows than are held. */
6411
+ hasMore: boolean;
6412
+ loadingMore: boolean;
6375
6413
  }
6376
6414
  /** A standard source's presented columns and one page of its rows, read as the person. */
6377
6415
  declare function useEntitySource(token: string, options?: {
@@ -6382,10 +6420,11 @@ declare function entityNameColumn(columns: readonly EntityColumn[]): EntityColum
6382
6420
  /** The columns of the one table, from the door's presented columns. */
6383
6421
  declare function entityTableColumns(columns: readonly EntityColumn[]): MatrxColumnDef$1<EntityRow>[];
6384
6422
  /** A standard source in the one table. */
6385
- declare function EntityGrid({ entity, pageSize, drill }: {
6423
+ declare function EntityGrid({ entity, pageSize, drill, embedded }: {
6386
6424
  entity: EntitySourceState;
6387
6425
  pageSize?: number;
6388
6426
  drill?: MatrxDataTableDrillConfig;
6427
+ embedded?: boolean;
6389
6428
  }): react.JSX.Element;
6390
6429
 
6391
6430
  /** A standard source, by its registry token. */
package/dist/index.d.ts CHANGED
@@ -588,6 +588,12 @@ interface ReferenceChipRef {
588
588
  icon?: string | null | undefined;
589
589
  }
590
590
  interface RecordsUiHost {
591
+ /**
592
+ * Draws an icon kept as a NAME ("Briefcase" — how the store keeps an icon a person picked from the
593
+ * icon list). A relation cell in an embedded table wears its record's icon; an emoji is drawn as
594
+ * text and a name only through this port. Unbound (or `null` back), the page glyph stands in.
595
+ */
596
+ renderIcon?: ((name: string) => ReactNode) | undefined;
591
597
  /**
592
598
  * TEMPORARY (one-grid merge, steps 5-8). Which table grid draws: `classic` — the default Grid
593
599
  * as it shipped in 0.86; `merged` — the same grid with the older /data grid's control layer on
@@ -2247,6 +2253,15 @@ interface GridProps {
2247
2253
  field: string;
2248
2254
  direction: "asc" | "desc";
2249
2255
  } | null | undefined;
2256
+ /**
2257
+ * THE VIEWER'S OWN SEARCH, handed by the host (CHAIR-EMBEDDED-FIDELITY 15), the way `sortOverride`
2258
+ * hands a sort: it filters rows for this viewer only, is never written to the view, and is asked of
2259
+ * the store's own search (`custom.read_records_page`'s `search`), never a filter over loaded rows.
2260
+ * `null` / `""` clears it. Left out, an embedded grid's own magnifier owns the term.
2261
+ */
2262
+ searchOverride?: string | null | undefined;
2263
+ /** Every change of the term, from the embedded magnifier or the override (a controlled host's echo). */
2264
+ onSearchChange?: ((search: string) => void) | undefined;
2250
2265
  /** The new-row line's words ("New page"). Default "Add row". */
2251
2266
  newRowLabel?: string | undefined;
2252
2267
  /**
@@ -2327,6 +2342,11 @@ interface ViewReading {
2327
2342
  */
2328
2343
  type LabelLookup = ((field: Field$1, id: string) => string | null) & {
2329
2344
  archived?: (field: Field$1, id: string) => boolean;
2345
+ /** The linked record's own icon, and its table's icon for one that has none (same call as the words). */
2346
+ icons?: (field: Field$1, id: string) => {
2347
+ icon: string | null;
2348
+ tableIcon: string | null;
2349
+ } | undefined;
2330
2350
  };
2331
2351
  /**
2332
2352
  * HOW LONG A CELL MAY SAY "Loading…" BEFORE IT HAS TO SAY WHAT IT IS WAITING
@@ -3899,6 +3919,9 @@ interface ViewSwitcherProps {
3899
3919
  field: string;
3900
3920
  direction: "asc" | "desc";
3901
3921
  } | null | undefined;
3922
+ /** The viewer's own search (`GridProps.searchOverride`): this viewer only, never saved, asked of the store. */
3923
+ searchOverride?: string | null | undefined;
3924
+ onSearchChange?: ((search: string) => void) | undefined;
3902
3925
  /** The grid's new-row line words (`GridProps.newRowLabel`). */
3903
3926
  newRowLabel?: string | undefined;
3904
3927
  className?: string | undefined;
@@ -3930,7 +3953,7 @@ declare function useViewRecords(view: SavedViewSpec, pageSize?: number, filter?:
3930
3953
  */
3931
3954
  membership: string;
3932
3955
  };
3933
- declare function ViewSwitcher({ view, onLayoutChange, onViewChange, onOpenRecord, openRecordId, onCloseRecord, onMoved, onNewRecordForm, onAskWhoChanged, pageSize: pageSizeAsked, titleField, filter, onClearFilter, hostLayout, onHostLayoutChange, chooser, openExport, viewId, onOrderPlaced, footer, embedded, sortOverride, newRowLabel, className, }: ViewSwitcherProps): react.JSX.Element;
3956
+ declare function ViewSwitcher({ view, onLayoutChange, onViewChange, onOpenRecord, openRecordId, onCloseRecord, onMoved, onNewRecordForm, onAskWhoChanged, pageSize: pageSizeAsked, titleField, filter, onClearFilter, hostLayout, onHostLayoutChange, chooser, openExport, viewId, onOrderPlaced, footer, embedded, sortOverride, searchOverride, onSearchChange, newRowLabel, className, }: ViewSwitcherProps): react.JSX.Element;
3934
3957
 
3935
3958
  type CalendarMode = "month" | "week" | "day" | "list";
3936
3959
  interface CalendarViewProps {
@@ -5974,6 +5997,13 @@ interface TablePageProps$1 {
5974
5997
  presentation?: "page" | "embedded" | undefined;
5975
5998
  /** The new-row line's words in an embedded table ("New page"). */
5976
5999
  newRowLabel?: string | undefined;
6000
+ /**
6001
+ * The viewer's own search, handed by the host (the `sortOverride` model): filters rows for this
6002
+ * viewer only, is never saved to the view, and is asked of the store's search. An embedded table
6003
+ * also draws its own magnifier (`onSearchChange` hears it).
6004
+ */
6005
+ searchOverride?: string | null | undefined;
6006
+ onSearchChange?: ((search: string) => void) | undefined;
5977
6007
  /** Rows per page for every layout. */
5978
6008
  pageSize?: number | undefined;
5979
6009
  /**
@@ -6372,6 +6402,14 @@ interface EntitySourceState {
6372
6402
  refused: string;
6373
6403
  }>;
6374
6404
  reload: () => void;
6405
+ /**
6406
+ * "SHOW MORE" (CHAIR-EMBEDDED-FIDELITY 16): the rows the door has not given yet are asked as the
6407
+ * NEXT page (`limit` = one page, `offset` = rows held) and appended — never the whole source.
6408
+ */
6409
+ loadMore: () => Promise<void>;
6410
+ /** The door counts more rows than are held. */
6411
+ hasMore: boolean;
6412
+ loadingMore: boolean;
6375
6413
  }
6376
6414
  /** A standard source's presented columns and one page of its rows, read as the person. */
6377
6415
  declare function useEntitySource(token: string, options?: {
@@ -6382,10 +6420,11 @@ declare function entityNameColumn(columns: readonly EntityColumn[]): EntityColum
6382
6420
  /** The columns of the one table, from the door's presented columns. */
6383
6421
  declare function entityTableColumns(columns: readonly EntityColumn[]): MatrxColumnDef$1<EntityRow>[];
6384
6422
  /** A standard source in the one table. */
6385
- declare function EntityGrid({ entity, pageSize, drill }: {
6423
+ declare function EntityGrid({ entity, pageSize, drill, embedded }: {
6386
6424
  entity: EntitySourceState;
6387
6425
  pageSize?: number;
6388
6426
  drill?: MatrxDataTableDrillConfig;
6427
+ embedded?: boolean;
6389
6428
  }): react.JSX.Element;
6390
6429
 
6391
6430
  /** A standard source, by its registry token. */