@ai-matrx/records-ui 0.115.74 → 0.115.75
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/CHANGELOG.md +18 -1
- package/dist/index.cjs +538 -395
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +26 -3
- package/dist/index.d.ts +26 -3
- package/dist/index.js +520 -377
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
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
|
/**
|
|
@@ -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=`.
|
|
@@ -6830,6 +6840,13 @@ interface ViewActionHost {
|
|
|
6830
6840
|
/** `whyNot`: the person's reason they may not change this table's views, or null when they may. */
|
|
6831
6841
|
declare function viewActions(whyNot: string | null, host: ViewActionHost, locked?: boolean, personal?: boolean): ObjectAction[];
|
|
6832
6842
|
|
|
6843
|
+
interface RecordNeighbors {
|
|
6844
|
+
index: number;
|
|
6845
|
+
total: number;
|
|
6846
|
+
previous: string | null;
|
|
6847
|
+
next: string | null;
|
|
6848
|
+
}
|
|
6849
|
+
|
|
6833
6850
|
interface RecordPanelProps {
|
|
6834
6851
|
tableId: Uuid$1;
|
|
6835
6852
|
recordId: Uuid$1;
|
|
@@ -6842,8 +6859,14 @@ interface RecordPanelProps {
|
|
|
6842
6859
|
onAskAboutField?: ((fieldKey: string) => void) | undefined;
|
|
6843
6860
|
/** Drawn as the record's own page (no "Open" link to itself). */
|
|
6844
6861
|
onPage?: boolean | undefined;
|
|
6845
|
-
|
|
6846
|
-
|
|
6862
|
+
/** Where this record sits in the view the grid shows, and how to move to another (AT-RECORD). */
|
|
6863
|
+
neighbors?: RecordNeighbors | null | undefined;
|
|
6864
|
+
onStep?: ((recordId: Uuid$1) => void) | undefined;
|
|
6865
|
+
/** Drawn over the grid, wide (true) or beside it; `onToggleExpand` draws the control. */
|
|
6866
|
+
expanded?: boolean | undefined;
|
|
6867
|
+
onToggleExpand?: (() => void) | undefined;
|
|
6868
|
+
}
|
|
6869
|
+
declare function RecordPanel({ tableId, recordId, onClose, onAskAboutField, onPage, neighbors, onStep, expanded, onToggleExpand }: RecordPanelProps): react.JSX.Element;
|
|
6847
6870
|
|
|
6848
6871
|
/**
|
|
6849
6872
|
* 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
|
/**
|
|
@@ -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=`.
|
|
@@ -6830,6 +6840,13 @@ interface ViewActionHost {
|
|
|
6830
6840
|
/** `whyNot`: the person's reason they may not change this table's views, or null when they may. */
|
|
6831
6841
|
declare function viewActions(whyNot: string | null, host: ViewActionHost, locked?: boolean, personal?: boolean): ObjectAction[];
|
|
6832
6842
|
|
|
6843
|
+
interface RecordNeighbors {
|
|
6844
|
+
index: number;
|
|
6845
|
+
total: number;
|
|
6846
|
+
previous: string | null;
|
|
6847
|
+
next: string | null;
|
|
6848
|
+
}
|
|
6849
|
+
|
|
6833
6850
|
interface RecordPanelProps {
|
|
6834
6851
|
tableId: Uuid$1;
|
|
6835
6852
|
recordId: Uuid$1;
|
|
@@ -6842,8 +6859,14 @@ interface RecordPanelProps {
|
|
|
6842
6859
|
onAskAboutField?: ((fieldKey: string) => void) | undefined;
|
|
6843
6860
|
/** Drawn as the record's own page (no "Open" link to itself). */
|
|
6844
6861
|
onPage?: boolean | undefined;
|
|
6845
|
-
|
|
6846
|
-
|
|
6862
|
+
/** Where this record sits in the view the grid shows, and how to move to another (AT-RECORD). */
|
|
6863
|
+
neighbors?: RecordNeighbors | null | undefined;
|
|
6864
|
+
onStep?: ((recordId: Uuid$1) => void) | undefined;
|
|
6865
|
+
/** Drawn over the grid, wide (true) or beside it; `onToggleExpand` draws the control. */
|
|
6866
|
+
expanded?: boolean | undefined;
|
|
6867
|
+
onToggleExpand?: (() => void) | undefined;
|
|
6868
|
+
}
|
|
6869
|
+
declare function RecordPanel({ tableId, recordId, onClose, onAskAboutField, onPage, neighbors, onStep, expanded, onToggleExpand }: RecordPanelProps): react.JSX.Element;
|
|
6847
6870
|
|
|
6848
6871
|
/**
|
|
6849
6872
|
* The column a record page writes its body in: the formatted-text column NAMED like a page's body
|