@ai-matrx/records-ui 0.30.0 → 0.40.0
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 +313 -0
- package/README.md +3 -3
- package/dist/index.cjs +4356 -2287
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +265 -32
- package/dist/index.d.ts +265 -32
- package/dist/index.js +4339 -2237
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, ComponentType, RefObject } from 'react';
|
|
3
|
-
import
|
|
3
|
+
import * as _ai_matrx_records from '@ai-matrx/records';
|
|
4
|
+
import { PermissionLevel, Table, RecordScopeContext, EnrichCell, RecordsError, Uuid as Uuid$1, AggregateFilter, Field, RecordDocument, ReadRow, WriteConflict, ParityFieldType, NewFieldDeclaration, ValueEnvelope, WorkInboxKind, RuleExpression, FormSummary, PortalCard, PortalPrincipal, PortalPreviewRow, DashboardBlockKind, AggregateBucket, AggregateMeasure, DashboardBlock, DashboardSummary, DocTemplateRow, DocRenderRow, QuietHours, DashboardBlockResult, CaptureSheetFace, CaptureField, AnonTokenBinding, RecordsConfig, RecordsActor, RecordsDataSource, FieldTypeWord } from '@ai-matrx/records';
|
|
4
5
|
import { Uuid, Field as Field$1, ReadRow as ReadRow$1 } from '@ai-matrx/records/react';
|
|
5
6
|
import { RecordsClient } from '@ai-matrx/records/core';
|
|
6
7
|
import { FieldFormatConfig } from '@ai-matrx/design-system/field-formats';
|
|
@@ -52,13 +53,34 @@ interface RecordChatEntry {
|
|
|
52
53
|
label: string;
|
|
53
54
|
/** `text` for a scalar, `json` for a structure. The host maps this to its own vocabulary. */
|
|
54
55
|
type: "text" | "json";
|
|
56
|
+
/**
|
|
57
|
+
* DYN: a merge field resolves to a TRIPLE, not a string. The prompt gets the
|
|
58
|
+
* rendered value; the RUN gets this, and it is the only thing a "where did
|
|
59
|
+
* that come from" question can be answered from — so a host can turn a cited
|
|
60
|
+
* answer into a link to the record AND to the version it was read at.
|
|
61
|
+
*/
|
|
62
|
+
cite?: {
|
|
63
|
+
record_id: Uuid;
|
|
64
|
+
field_id: Uuid;
|
|
65
|
+
value_version: number;
|
|
66
|
+
written_at: string | null;
|
|
67
|
+
};
|
|
55
68
|
}
|
|
56
|
-
/** A Field the
|
|
69
|
+
/** A Field the agent was NOT given, named rather than silently dropped. */
|
|
57
70
|
interface RecordChatWithheld {
|
|
58
71
|
key: string;
|
|
59
72
|
label: string;
|
|
60
73
|
/** The store's own reason. */
|
|
61
74
|
reason: string;
|
|
75
|
+
/**
|
|
76
|
+
* WHICH ABSENCE THIS IS. `masked` — the store kept it from THIS READER.
|
|
77
|
+
* `policy` — the organization keeps it out of conversations, and the same
|
|
78
|
+
* person can read it on the record two inches away. A screen that collapsed
|
|
79
|
+
* the two would tell somebody the wrong thing about their own access.
|
|
80
|
+
*/
|
|
81
|
+
because?: "masked" | "policy";
|
|
82
|
+
/** The whole sentence, already written. A screen prints it; it composes nothing. */
|
|
83
|
+
says?: string;
|
|
62
84
|
}
|
|
63
85
|
/** Everything the host's chat surface needs, and nothing about how it should look. */
|
|
64
86
|
interface RecordChatContext {
|
|
@@ -73,10 +95,18 @@ interface RecordChatContext {
|
|
|
73
95
|
tableName: string;
|
|
74
96
|
/** The record's own title, for the panel's one-row header and the chip. */
|
|
75
97
|
title: string;
|
|
98
|
+
/** What the scope chip says: `About: Acme Industrial`. */
|
|
99
|
+
chip: string;
|
|
76
100
|
/** The grounding, already read through the read door. */
|
|
77
101
|
entries: RecordChatEntry[];
|
|
78
102
|
/** What this reader is NOT being given, with the store's reason for each. */
|
|
79
103
|
withheld: RecordChatWithheld[];
|
|
104
|
+
/** Questions derived from THIS record's shape. Never a fixed list. */
|
|
105
|
+
suggested: string[];
|
|
106
|
+
/** One sentence naming what is not in the conversation. Printed verbatim. */
|
|
107
|
+
says: string;
|
|
108
|
+
/** The whole door answer, for a host that wants the history or the relations. */
|
|
109
|
+
scope: RecordScopeContext;
|
|
80
110
|
}
|
|
81
111
|
declare const NO_CHAT_REASON: string;
|
|
82
112
|
interface RecordChatProps {
|
|
@@ -86,29 +116,73 @@ interface RecordChatProps {
|
|
|
86
116
|
}
|
|
87
117
|
declare function RecordChat({ tableId, recordId, className }: RecordChatProps): react.JSX.Element;
|
|
88
118
|
|
|
89
|
-
/** What the host is asked to have the
|
|
119
|
+
/** What the host is asked to have the SERVER's `records` tool do. */
|
|
90
120
|
interface EnrichAsk {
|
|
91
121
|
tableId: Uuid;
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}>;
|
|
122
|
+
fieldId: Uuid;
|
|
123
|
+
fieldKey: string;
|
|
124
|
+
/** How many records this run covers. */
|
|
125
|
+
rows: number;
|
|
126
|
+
/** True: ask the model and report what it WOULD write, writing nothing. */
|
|
127
|
+
previewOnly: boolean;
|
|
99
128
|
}
|
|
100
129
|
interface EnrichOutcome {
|
|
101
130
|
ok: boolean;
|
|
102
131
|
/** What happened, in a sentence — the server's own words when it has some. */
|
|
103
132
|
message: string;
|
|
133
|
+
/** For a preview: what would go in each cell. */
|
|
134
|
+
wouldWrite?: Array<{
|
|
135
|
+
record_id: string;
|
|
136
|
+
value?: unknown;
|
|
137
|
+
absent?: string;
|
|
138
|
+
says?: string;
|
|
139
|
+
}>;
|
|
104
140
|
}
|
|
105
141
|
declare const NO_ENRICH_REASON: string;
|
|
142
|
+
/** Which of the four things this cell is. One place, so nothing can disagree. */
|
|
143
|
+
declare function cellState(cell: EnrichCell | undefined): "none" | "agent" | "yours" | "unsure";
|
|
144
|
+
interface EnrichBadgeProps {
|
|
145
|
+
cell: EnrichCell | undefined;
|
|
146
|
+
/** Bound when this person may change the record; absent, no pin control is drawn. */
|
|
147
|
+
onPin?: ((pinned: boolean) => void | Promise<void>) | undefined;
|
|
148
|
+
className?: string | undefined;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* THE BADGE. Drawn beside every agent-owned value, always.
|
|
152
|
+
*
|
|
153
|
+
* The word on it is the state; `stale` rides along as a second, smaller word rather than a
|
|
154
|
+
* colour, because "this is six weeks old" is a sentence and not a hue — a person reading a
|
|
155
|
+
* red cell has to be told what red means, and then told again next week.
|
|
156
|
+
*/
|
|
157
|
+
declare function EnrichBadge({ cell, onPin, className }: EnrichBadgeProps): react.JSX.Element | null;
|
|
158
|
+
/**
|
|
159
|
+
* Every badge on a page of a grid, in ONE round trip.
|
|
160
|
+
*
|
|
161
|
+
* A badge asked per cell is one round trip per badge — fifty round trips to draw fifty
|
|
162
|
+
* badges, which is why the store answers the whole page at once. The hook is keyed by the
|
|
163
|
+
* record ids the grid is actually drawing, so paging re-asks and scrolling does not.
|
|
164
|
+
*/
|
|
165
|
+
declare function useEnrichCells(tableId: Uuid | undefined, recordIds: Uuid[] | undefined): {
|
|
166
|
+
cells: Map<string, EnrichCell>;
|
|
167
|
+
refresh: () => Promise<void>;
|
|
168
|
+
error: RecordsError | null;
|
|
169
|
+
};
|
|
106
170
|
interface EnrichPanelProps {
|
|
107
171
|
tableId: Uuid;
|
|
108
|
-
|
|
172
|
+
/** Open straight onto one column. Absent, the panel lists every agent-owned column. */
|
|
173
|
+
fieldId?: Uuid | undefined;
|
|
109
174
|
className?: string | undefined;
|
|
110
175
|
}
|
|
111
|
-
|
|
176
|
+
/**
|
|
177
|
+
* THE PANEL — the whole of an enrichment in one screen, in a person's own words.
|
|
178
|
+
*
|
|
179
|
+
* It is deliberately NOT a settings form with a Save button at the bottom. The order is the
|
|
180
|
+
* order somebody actually thinks in: what should go in this column · what it may look at ·
|
|
181
|
+
* how often to check it again · what it has cost so far · SEE IT ON FIVE ROWS · and only
|
|
182
|
+
* then, turn it on. The preview is not a nicety: it is the only honest way to find out what
|
|
183
|
+
* a model will write into other people's data before it writes it.
|
|
184
|
+
*/
|
|
185
|
+
declare function EnrichPanel({ tableId, fieldId, className }: EnrichPanelProps): react.JSX.Element;
|
|
112
186
|
|
|
113
187
|
/**
|
|
114
188
|
* What a person may do to one table. The four words and the ladder are the
|
|
@@ -229,6 +303,26 @@ interface RecordsUiHost {
|
|
|
229
303
|
* nowhere.
|
|
230
304
|
*/
|
|
231
305
|
chat?: (context: RecordChatContext) => ReactNode;
|
|
306
|
+
/**
|
|
307
|
+
* OPTIONAL. "TALK TO THIS RECORD" — the HOST opens its own one chat surface
|
|
308
|
+
* (AGT-N-9, PRODUCTS row 11).
|
|
309
|
+
*
|
|
310
|
+
* `chat` is the port that RENDERS a chat inside a panel this package draws.
|
|
311
|
+
* This one is the other direction: a menu entry in the grid, the cell menu or
|
|
312
|
+
* the record header says "the person wants to talk about this record", and the
|
|
313
|
+
* host opens the chat where the host puts chats — full height, the platform's
|
|
314
|
+
* own pattern — and binds the conversation to the record through
|
|
315
|
+
* `conversationScopeBind`. Drawing a chat next to a grid row from inside this
|
|
316
|
+
* package would be the parallel layer the canvas ruling forbids.
|
|
317
|
+
*
|
|
318
|
+
* ABSENT, NEVER DEAD: where neither this nor `chat` is bound, the entries do
|
|
319
|
+
* not render at all.
|
|
320
|
+
*/
|
|
321
|
+
talkToRecord?: (target: {
|
|
322
|
+
tableId: Uuid$1;
|
|
323
|
+
recordId: Uuid$1;
|
|
324
|
+
title: string;
|
|
325
|
+
}) => void;
|
|
232
326
|
/**
|
|
233
327
|
* OPTIONAL. THE SERVER'S `records` TOOL (SCR-27).
|
|
234
328
|
*
|
|
@@ -592,10 +686,20 @@ declare function useGridEditing({ tableId, fields, rows, reload, canWrite, mayWr
|
|
|
592
686
|
* `data-matrx-cell-control` is the data table's own opt-out from whole-row
|
|
593
687
|
* click, so opening a cell never also opens the record panel behind it.
|
|
594
688
|
*/
|
|
595
|
-
declare function GridCell({ field, row, editing, canWrite, whyNot, format, }: {
|
|
689
|
+
declare function GridCell({ field, row, editing, canWrite, whyNot, format, onAskWhoChanged, }: {
|
|
596
690
|
field: Field;
|
|
597
691
|
row: ReadRow;
|
|
598
|
-
|
|
692
|
+
/**
|
|
693
|
+
* The edit session, or NULL on a cell nobody may edit.
|
|
694
|
+
*
|
|
695
|
+
* 🚨 Null is not "do not render me". "Who changed this?" is a READING
|
|
696
|
+
* question — the person who may not edit a cell is exactly the person who
|
|
697
|
+
* wants to know who did — and the cell used to disappear entirely the moment
|
|
698
|
+
* editing was off, taking the control with it while this file's own comments
|
|
699
|
+
* claimed it was offered at viewer. A null session means no editor, nothing
|
|
700
|
+
* else.
|
|
701
|
+
*/
|
|
702
|
+
editing: GridEditing | null;
|
|
599
703
|
/** Whether this person may write THIS row. Asked before the cell is drawn. */
|
|
600
704
|
canWrite: boolean;
|
|
601
705
|
/**
|
|
@@ -606,6 +710,12 @@ declare function GridCell({ field, row, editing, canWrite, whyNot, format, }: {
|
|
|
606
710
|
whyNot?: string | undefined;
|
|
607
711
|
/** The column's declared format, so the read view reads like its header. */
|
|
608
712
|
format?: FieldFormatConfig | undefined;
|
|
713
|
+
/**
|
|
714
|
+
* "WHO CHANGED THIS?" — the question a person asks of the CELL they are
|
|
715
|
+
* looking at. Bound by the host; absent, no control is drawn at all, because
|
|
716
|
+
* a control that opens nothing is the thing this package exists to prevent.
|
|
717
|
+
*/
|
|
718
|
+
onAskWhoChanged?: ((fieldKey: string, recordId: Uuid$1) => void) | undefined;
|
|
609
719
|
}): react.JSX.Element;
|
|
610
720
|
|
|
611
721
|
/**
|
|
@@ -762,6 +872,15 @@ interface GridProps {
|
|
|
762
872
|
onOpenRecord?: ((recordId: Uuid) => void) | undefined;
|
|
763
873
|
/** SCR-2. Called when an admin clicks the "+" at the end of the headers. */
|
|
764
874
|
onAddField?: (() => void) | undefined;
|
|
875
|
+
/**
|
|
876
|
+
* "WHO CHANGED THIS?" — from the cell, about that column, on that record.
|
|
877
|
+
*
|
|
878
|
+
* The question people actually ask is about a CELL they are looking at, not
|
|
879
|
+
* about a record they then have to open. The store answers it
|
|
880
|
+
* (`custom.field_history`), and the host decides where the answer appears —
|
|
881
|
+
* a side panel, a window, a route. Unbound, the control is ABSENT, not dead.
|
|
882
|
+
*/
|
|
883
|
+
onAskWhoChanged?: ((fieldKey: string, recordId: Uuid) => void) | undefined;
|
|
765
884
|
/**
|
|
766
885
|
* The host's whole-record form. Offered BY NAME when the store refuses an
|
|
767
886
|
* empty record — a Table with a required Field cannot be added to one cell at
|
|
@@ -802,7 +921,7 @@ interface GridProps {
|
|
|
802
921
|
onPresentationChange?: ((next: GridPresentation) => void) | undefined;
|
|
803
922
|
className?: string | undefined;
|
|
804
923
|
}
|
|
805
|
-
declare function Grid({ tableId, pageSize, onOpenRecord, onAddField, onNewRecordForm, toolbarActions, editable, presentation, onPresentationChange, className, }: GridProps): react.JSX.Element;
|
|
924
|
+
declare function Grid({ tableId, pageSize, onOpenRecord, onAddField, onNewRecordForm, toolbarActions, editable, presentation, onPresentationChange, className, onAskWhoChanged, }: GridProps): react.JSX.Element;
|
|
806
925
|
/**
|
|
807
926
|
* One Field becomes one column. The header is the Field's own NAME — never its
|
|
808
927
|
* key (`names.ts`) — and the cell is the value, rendered by its parity type and
|
|
@@ -811,6 +930,18 @@ declare function Grid({ tableId, pageSize, onOpenRecord, onAddField, onNewRecord
|
|
|
811
930
|
declare function columnForField(field: Field$1, editing?: GridEditing | null, mayWriteRow?: (rowId: Uuid) => boolean, whyNotRow?: (rowId: Uuid) => string, look?: {
|
|
812
931
|
format?: FieldFormatConfig;
|
|
813
932
|
frozen?: boolean;
|
|
933
|
+
},
|
|
934
|
+
/** "Who changed this?" from the cell's own menu. Absent, no control is drawn. */
|
|
935
|
+
onAskWhoChanged?: ((fieldKey: string, recordId: Uuid) => void) | undefined,
|
|
936
|
+
/**
|
|
937
|
+
* PRODUCTS row 10 — the provenance of a cell a MODEL owns. `cellFor` answers the page's
|
|
938
|
+
* already-fetched badge data for one row; `onPin` is bound only where this person may
|
|
939
|
+
* change the record, so a viewer reads every badge and is offered no control they do not
|
|
940
|
+
* have. Absent entirely, no badge is drawn and the column looks exactly as it did.
|
|
941
|
+
*/
|
|
942
|
+
enrich?: {
|
|
943
|
+
cellFor: (recordId: Uuid) => _ai_matrx_records.EnrichCell | undefined;
|
|
944
|
+
onPin?: ((recordId: Uuid, fieldKey: string, pinned: boolean) => void | Promise<void>) | undefined;
|
|
814
945
|
}): MatrxColumnDef<ReadRow$1>;
|
|
815
946
|
|
|
816
947
|
interface ExportMenuProps {
|
|
@@ -825,12 +956,10 @@ declare function ExportMenu({ tableId, rows, label, className }: ExportMenuProps
|
|
|
825
956
|
|
|
826
957
|
interface ImportWizardProps {
|
|
827
958
|
tableId: Uuid;
|
|
828
|
-
/** SCR-N-7: what "add this as a field" does. Absent means the offer is not made. */
|
|
829
|
-
onProposeField?: ((header: string) => void) | undefined;
|
|
830
959
|
onDone?: ((written: number) => void) | undefined;
|
|
831
960
|
className?: string | undefined;
|
|
832
961
|
}
|
|
833
|
-
declare function ImportWizard({ tableId,
|
|
962
|
+
declare function ImportWizard({ tableId, onDone, className }: ImportWizardProps): react.JSX.Element;
|
|
834
963
|
|
|
835
964
|
interface CustomFieldsSectionProps {
|
|
836
965
|
/** The standard table's registered token (REC-33), e.g. `party`, `crm_deal`. */
|
|
@@ -845,15 +974,33 @@ declare function CustomFieldsSection({ entityToken, recordId, title, className,
|
|
|
845
974
|
|
|
846
975
|
/** The three behaviours that carry no parity type of their own. */
|
|
847
976
|
type PlainFieldType = "text" | "long_text" | "number";
|
|
848
|
-
/**
|
|
849
|
-
|
|
977
|
+
/**
|
|
978
|
+
* THE ONE A PERSON COMING FROM AIRTABLE REACHES FOR FIRST, AND IT WAS NOT HERE.
|
|
979
|
+
*
|
|
980
|
+
* The list above offered `member` (a Person) and `attachment` (a File) — the two
|
|
981
|
+
* relations whose target is a Table the PLATFORM keeps — and nothing at all for
|
|
982
|
+
* "this job belongs to that customer". The store has taken it since 2026-09-20
|
|
983
|
+
* (`custom.field_declare` with `type: "relation"` and a `relation_target`), the
|
|
984
|
+
* Field type has named it since the same day, and `editorKindFor` has answered
|
|
985
|
+
* `"relation"` for one since long before that. Only the menu did not offer it,
|
|
986
|
+
* so the guide's section 3 told a person to pick a kind that did not exist.
|
|
987
|
+
*
|
|
988
|
+
* It is NOT a fourteenth parity type. `custom.parity_field_types()` ships
|
|
989
|
+
* thirteen and a relation is a BEHAVIOUR — the same behaviour `member` and
|
|
990
|
+
* `attachment` are made of — so it sits beside the three plain ones as its own
|
|
991
|
+
* word, and `parityTypesWithNoExplanation()` is unaffected by it in both
|
|
992
|
+
* directions: it does not appear there, and it cannot hide a real gap there.
|
|
993
|
+
*/
|
|
994
|
+
type RelationFieldType = "relation";
|
|
995
|
+
/** What a person picks in the panel: one of the thirteen, one of the three, or a link. */
|
|
996
|
+
type PickableFieldType = ParityFieldType | PlainFieldType | RelationFieldType;
|
|
850
997
|
interface FieldTypeChoice {
|
|
851
998
|
id: PickableFieldType;
|
|
852
999
|
/** The word on the menu. */
|
|
853
1000
|
label: string;
|
|
854
1001
|
/** One line, under the word, saying what it is FOR. Never what it is made of. */
|
|
855
1002
|
explanation: string;
|
|
856
|
-
/** The heading it sits under, so
|
|
1003
|
+
/** The heading it sits under, so seventeen choices read as four short lists. */
|
|
857
1004
|
group: "Words" | "Numbers and dates" | "Choices and people" | "Worked out";
|
|
858
1005
|
}
|
|
859
1006
|
declare const FIELD_TYPE_CHOICES: FieldTypeChoice[];
|
|
@@ -861,12 +1008,23 @@ declare const FIELD_TYPE_GROUPS: FieldTypeChoice["group"][];
|
|
|
861
1008
|
declare function fieldTypeChoice(id: string): FieldTypeChoice | undefined;
|
|
862
1009
|
/** The three that are a plain behaviour rather than one of the thirteen. */
|
|
863
1010
|
declare function isPlainFieldType(id: string): id is PlainFieldType;
|
|
1011
|
+
/**
|
|
1012
|
+
* The one that is a relation a person aims themselves. It is neither plain nor
|
|
1013
|
+
* one of the thirteen, so every caller that branched on `isPlainFieldType`
|
|
1014
|
+
* alone has to answer this question too — which is why it is a named function
|
|
1015
|
+
* and not an inline string comparison at four call sites.
|
|
1016
|
+
*/
|
|
1017
|
+
declare function isRelationFieldType(id: string): id is RelationFieldType;
|
|
864
1018
|
/**
|
|
865
1019
|
* THE GUARD THIS FILE NEEDS, because the list it explains is generated.
|
|
866
1020
|
*
|
|
867
1021
|
* Returns the parity types the store ships that nothing here explains. The
|
|
868
1022
|
* suite asserts it is empty; a fourteenth type would otherwise reach the menu
|
|
869
1023
|
* with a blank line under it and nobody would notice until a person did.
|
|
1024
|
+
*
|
|
1025
|
+
* `relation` is deliberately NOT one of the thirteen and therefore never
|
|
1026
|
+
* appears in this answer: `PARITY_FIELD_TYPES` is the store's own generated
|
|
1027
|
+
* list and a behaviour that carries no parity type is not in it.
|
|
870
1028
|
*/
|
|
871
1029
|
declare function parityTypesWithNoExplanation(): string[];
|
|
872
1030
|
|
|
@@ -905,6 +1063,8 @@ declare function whatIsMissing(state: {
|
|
|
905
1063
|
of: string;
|
|
906
1064
|
relations: Field[];
|
|
907
1065
|
formulaFields: string[];
|
|
1066
|
+
/** Only a link asks for one, so a caller about any other kind leaves it out. */
|
|
1067
|
+
relationTarget?: string;
|
|
908
1068
|
}): string | null;
|
|
909
1069
|
|
|
910
1070
|
interface FieldProposalRow {
|
|
@@ -1170,6 +1330,12 @@ interface SavedViewSpec {
|
|
|
1170
1330
|
layout: ViewLayout;
|
|
1171
1331
|
/** Kanban: the Field whose value becomes a column. */
|
|
1172
1332
|
groupField?: string | null;
|
|
1333
|
+
/**
|
|
1334
|
+
* Kanban: a number Field to TOTAL under each column heading. It lives on the VIEW for
|
|
1335
|
+
* the same reason the colours do — two people read one board two ways and neither
|
|
1336
|
+
* reading is a fact about the records.
|
|
1337
|
+
*/
|
|
1338
|
+
measure?: string | null;
|
|
1173
1339
|
/** Calendar: the Field that places a record in the month. */
|
|
1174
1340
|
dateField?: string | null;
|
|
1175
1341
|
/** Gallery: the Field shown large on the card. */
|
|
@@ -1250,8 +1416,16 @@ interface ViewSwitcherProps {
|
|
|
1250
1416
|
*/
|
|
1251
1417
|
onViewChange?: ((patch: Partial<SavedViewSpec>) => void) | undefined;
|
|
1252
1418
|
onOpenRecord?: ((recordId: Uuid) => void) | undefined;
|
|
1419
|
+
/**
|
|
1420
|
+
* Called after a card moves between columns, so the host re-reads the rows it owns. A
|
|
1421
|
+
* board that moved a card and left the row list alone would show the card in two places
|
|
1422
|
+
* until something else happened to reload.
|
|
1423
|
+
*/
|
|
1424
|
+
onMoved?: (() => void) | undefined;
|
|
1253
1425
|
/** The host's whole-record form, offered by the grid when an empty record is refused. */
|
|
1254
1426
|
onNewRecordForm?: (() => void) | undefined;
|
|
1427
|
+
/** "Who changed this?" from a grid cell — the host opens that column's timeline. */
|
|
1428
|
+
onAskWhoChanged?: ((fieldKey: string, recordId: Uuid) => void) | undefined;
|
|
1255
1429
|
pageSize?: number | undefined;
|
|
1256
1430
|
className?: string | undefined;
|
|
1257
1431
|
}
|
|
@@ -1263,7 +1437,7 @@ declare function useViewRecords(view: SavedViewSpec, pageSize?: number): {
|
|
|
1263
1437
|
/** Where membership came from, in a sentence. A screen that hides this is hiding the view's meaning. */
|
|
1264
1438
|
membership: string;
|
|
1265
1439
|
};
|
|
1266
|
-
declare function ViewSwitcher({ view, onLayoutChange, onViewChange, onOpenRecord, onNewRecordForm, pageSize, className, }: ViewSwitcherProps): react.JSX.Element;
|
|
1440
|
+
declare function ViewSwitcher({ view, onLayoutChange, onViewChange, onOpenRecord, onMoved, onNewRecordForm, onAskWhoChanged, pageSize, className, }: ViewSwitcherProps): react.JSX.Element;
|
|
1267
1441
|
|
|
1268
1442
|
interface ViewBarProps {
|
|
1269
1443
|
/** The Table whose views these are. */
|
|
@@ -1353,20 +1527,39 @@ declare function ActionInbox({ tableId, includeSettled, onOpenRecord, className
|
|
|
1353
1527
|
interface HistoryPanelProps {
|
|
1354
1528
|
tableId: Uuid;
|
|
1355
1529
|
recordId: Uuid;
|
|
1530
|
+
/**
|
|
1531
|
+
* "Who changed THIS column?" — the host opens that field's own timeline. Left
|
|
1532
|
+
* out, the per-field control is absent rather than dead.
|
|
1533
|
+
*/
|
|
1534
|
+
onAskAboutField?: ((fieldKey: string) => void) | undefined;
|
|
1356
1535
|
className?: string | undefined;
|
|
1357
1536
|
}
|
|
1358
|
-
declare function HistoryPanel({ tableId, recordId, className }: HistoryPanelProps): react.JSX.Element;
|
|
1537
|
+
declare function HistoryPanel({ tableId, recordId, onAskAboutField, className }: HistoryPanelProps): react.JSX.Element;
|
|
1359
1538
|
|
|
1360
|
-
/** The package-owned Table every comment is a record of. */
|
|
1361
|
-
declare const COMMENT_TABLE: SystemTableSpec;
|
|
1362
1539
|
interface CommentThreadProps {
|
|
1363
|
-
/** The Table the commented-on record belongs to — its
|
|
1540
|
+
/** The Table the commented-on record belongs to — its Fields name an anchor. */
|
|
1364
1541
|
tableId: Uuid;
|
|
1365
1542
|
/** The record being discussed. */
|
|
1366
1543
|
recordId: Uuid;
|
|
1544
|
+
/** Open on the thread about ONE column, and post there by default. */
|
|
1545
|
+
fieldKey?: string | undefined;
|
|
1546
|
+
className?: string | undefined;
|
|
1547
|
+
}
|
|
1548
|
+
declare function CommentThread({ tableId, recordId, fieldKey, className }: CommentThreadProps): react.JSX.Element;
|
|
1549
|
+
|
|
1550
|
+
interface FieldHistoryPanelProps {
|
|
1551
|
+
tableId: Uuid;
|
|
1552
|
+
/** The column being asked about, by its key. */
|
|
1553
|
+
fieldKey: string;
|
|
1554
|
+
/** Scoped to ONE record when present; the whole Table when absent. */
|
|
1555
|
+
recordId?: Uuid | undefined;
|
|
1556
|
+
/** The host's way back — a cell menu opens this, so it closes too. */
|
|
1557
|
+
onClose?: (() => void) | undefined;
|
|
1558
|
+
/** Open a record from one of its rows. Absent, the row is not a link. */
|
|
1559
|
+
onOpenRecord?: ((recordId: Uuid) => void) | undefined;
|
|
1367
1560
|
className?: string | undefined;
|
|
1368
1561
|
}
|
|
1369
|
-
declare function
|
|
1562
|
+
declare function FieldHistoryPanel({ tableId, fieldKey, recordId, onClose, onOpenRecord, className, }: FieldHistoryPanelProps): react.JSX.Element;
|
|
1370
1563
|
|
|
1371
1564
|
/** How a form is put in front of a person. */
|
|
1372
1565
|
declare const FORM_FLOWS: readonly ["one-at-a-time", "single-page"];
|
|
@@ -1748,11 +1941,13 @@ declare function SignBlock({ tableId, recordId, render, className }: SignBlockPr
|
|
|
1748
1941
|
interface NotifyRuleSpec {
|
|
1749
1942
|
name: string;
|
|
1750
1943
|
savedViewId: Uuid;
|
|
1751
|
-
/** `
|
|
1944
|
+
/** `instant` fires the moment a record enters the view; the rest are summaries. */
|
|
1752
1945
|
cadence?: string;
|
|
1753
|
-
/** The
|
|
1946
|
+
/** The summary's schedule — "monday 08:00". Meaningless for `instant`. */
|
|
1754
1947
|
schedule?: string | null;
|
|
1755
1948
|
channel?: string;
|
|
1949
|
+
/** The hours not to be told in. A send inside them is MOVED, never dropped. */
|
|
1950
|
+
quietHours?: QuietHours | null;
|
|
1756
1951
|
/** Who is told. Left out, the person setting it up — "tell ME". */
|
|
1757
1952
|
recipientUserId?: Uuid | null;
|
|
1758
1953
|
eventKey?: string;
|
|
@@ -1887,7 +2082,18 @@ declare const CAPTURE_MODES: readonly ["reading", "photo", "voice"];
|
|
|
1887
2082
|
type CaptureMode = (typeof CAPTURE_MODES)[number];
|
|
1888
2083
|
declare const IN_MEMORY_QUEUE_REASON: string;
|
|
1889
2084
|
interface CaptureSheetProps {
|
|
1890
|
-
/**
|
|
2085
|
+
/**
|
|
2086
|
+
* A DECLARED capture sheet. Given one, this component runs THAT sheet — its
|
|
2087
|
+
* questions, in its order, with its required ones, one at a time, through
|
|
2088
|
+
* `custom.capture_open` and `custom.capture_submit`, with the durable queue. That is
|
|
2089
|
+
* the crew case (PRODUCTS row 15) and it is what twelve people doing the same round
|
|
2090
|
+
* need: somebody has SAID what the questions are.
|
|
2091
|
+
*
|
|
2092
|
+
* Without one this stays the ad-hoc capture below, which guesses which Field a
|
|
2093
|
+
* reading goes in — right for a quick one-off, wrong for a crew.
|
|
2094
|
+
*/
|
|
2095
|
+
sheetId?: Uuid | undefined;
|
|
2096
|
+
/** The Table a capture becomes a record in. Not needed when `sheetId` is given. */
|
|
1891
2097
|
tableId: Uuid;
|
|
1892
2098
|
/** Which Field a reading's number goes in. Defaults to the first range Field. */
|
|
1893
2099
|
readingField?: string | undefined;
|
|
@@ -1897,7 +2103,20 @@ interface CaptureSheetProps {
|
|
|
1897
2103
|
attachmentField?: string | undefined;
|
|
1898
2104
|
className?: string | undefined;
|
|
1899
2105
|
}
|
|
1900
|
-
declare function CaptureSheet({ tableId, readingField, noteField, attachmentField, className, }: CaptureSheetProps): react.JSX.Element;
|
|
2106
|
+
declare function CaptureSheet({ sheetId, tableId, readingField, noteField, attachmentField, className, }: CaptureSheetProps): react.JSX.Element;
|
|
2107
|
+
|
|
2108
|
+
interface CaptureRunProps {
|
|
2109
|
+
sheetId: Uuid$1;
|
|
2110
|
+
/**
|
|
2111
|
+
* The sheet, already loaded — by a server render, or from the phone's own copy. Given
|
|
2112
|
+
* one, this component makes NO network call before the first question is on screen.
|
|
2113
|
+
*/
|
|
2114
|
+
face?: CaptureSheetFace | null | undefined;
|
|
2115
|
+
className?: string | undefined;
|
|
2116
|
+
}
|
|
2117
|
+
/** What control one question gets. `attachment` is why a phone opens its camera. */
|
|
2118
|
+
declare function controlFor(field: CaptureField | undefined): "photo" | "voice" | "number" | "text";
|
|
2119
|
+
declare function CaptureRun({ sheetId, face: given, className }: CaptureRunProps): react.JSX.Element;
|
|
1901
2120
|
|
|
1902
2121
|
interface PortalShellProps {
|
|
1903
2122
|
/** The Table the outsider's records belong to. */
|
|
@@ -2228,4 +2447,18 @@ declare function useCanShare(): boolean;
|
|
|
2228
2447
|
declare function shareUnavailableReason(): string;
|
|
2229
2448
|
declare function ShareControl({ kind, organizationId, subjectId, name, may, size, variant, className, }: ShareControlProps): ReactNode;
|
|
2230
2449
|
|
|
2231
|
-
|
|
2450
|
+
interface PipelineBoardProps {
|
|
2451
|
+
tableId: Uuid;
|
|
2452
|
+
/** The rows the view holds — the SAME rows every other layout of this view draws. */
|
|
2453
|
+
rows: ReadRow$1[];
|
|
2454
|
+
/** A number column to total under each heading. The person picks it; nothing is guessed. */
|
|
2455
|
+
measure?: string | null;
|
|
2456
|
+
onMeasureChange?: ((key: string | null) => void) | undefined;
|
|
2457
|
+
onOpenRecord?: ((recordId: Uuid) => void) | undefined;
|
|
2458
|
+
/** Called after a move lands, so the host re-reads the rows it owns. */
|
|
2459
|
+
onMoved?: (() => void) | undefined;
|
|
2460
|
+
className?: string | undefined;
|
|
2461
|
+
}
|
|
2462
|
+
declare function PipelineBoard({ tableId, rows, measure, onMeasureChange, onOpenRecord, onMoved, className, }: PipelineBoardProps): react.JSX.Element;
|
|
2463
|
+
|
|
2464
|
+
export { ACTION_KINDS, ActionInbox, type ActionInboxProps, type ActionKind, BookingSlots, type BookingSlotsProps, CAPTURE_MODES, CHART_KINDS, CHART_KIND_LABEL, CHART_NEEDS, CHECKLIST_TABLE, type Capability, type CaptureMode, type CaptureQueuePort, CaptureRun, type CaptureRunProps, CaptureSheet, type CaptureSheetProps, type CellAddress, type CellRefusal, type CellState, ChartBlock, type ChartBlockProps, type ChartConfig, ChartFrame, type ChartKind, ChartLegendContent, type ChartSpec, ChartTooltipContent, ChecklistRunner, type ChecklistRunnerProps, type ChecklistSpec, type ChecklistStepSpec, CommentThread, type CommentThreadProps, CustomFieldsSection, type CustomFieldsSectionProps, DEFAULT_FIELDS, DEFAULT_VIEW_NAME, DashboardCanvas, type DashboardCanvasProps, type DeclareResult, DocRender, type DocRenderProps, DocTemplate, type DocTemplateProps, type DocTemplateSpec, EMPTY_PRESENTATION, type EditorKind, EmbedFrame, type EmbedFrameProps, type EnrichAsk, EnrichBadge, type EnrichBadgeProps, type EnrichOutcome, EnrichPanel, type EnrichPanelProps, ExportMenu, type ExportMenuProps, FIELD_TYPE_CHOICES, FIELD_TYPE_GROUPS, FORM_FLOWS, FROZEN_COLUMN_WIDTH, FieldControl, FieldEditor, type FieldEditorControlProps, type FieldEditorProps, FieldHistoryPanel, type FieldHistoryPanelProps, FieldLabel, type FieldProposalRow, type FieldTypeChoice, FormBuilder, type FormBuilderProps, type FormFlow, type FormQuestionSpec, FormRunner, type FormRunnerProps, type FormSpec, type FormSubmitOutcome, type FormTheme, FormsPanel, type FormsPanelProps, Grid, GridCell, type GridEditing, type GridGrouping, type GridPresentation, type GridProps, HistoryPanel, type HistoryPanelProps, IN_MEMORY_QUEUE_REASON, ImportWizard, type ImportWizardProps, KERNEL_REASON, LANE_EMPTY, LANE_TITLE, LAYOUT_FIELD_KIND, LAYOUT_LABEL, LAYOUT_NEEDS, LAYOUT_NO_FIELD, LEVEL_WORD, type LabelLookup, MACHINE_IDENTITY, MAX_ROW_HEIGHT, MIN_ROW_HEIGHT, NOT_ANSWERED_YET, NO_CHAT_REASON, NO_COLUMNS_WHY, NO_COLUMNS_YET, NO_ENRICH_REASON, NO_MEMBERS_REASON, NO_OPEN_RECORDS_REASON, NO_REASK_REASON, NO_RIGHTS, NO_SAVED_VIEWS_REASON, NO_SHARE_REASON, NO_UPLOAD_REASON, type NewFieldSpec, type NewTableSpec, NotifyRuleEditor, type NotifyRuleEditorProps, type NotifyRuleSpec, type OpenRecordsAsk, type OrganizationMember, PARITY_LABEL, PARITY_MADE_OF, Peek, type PeekProps, type PendingCapture, PersonPicker, type PersonPickerProps, type PickableFieldType, PipelineBoard, type PipelineBoardProps, type PlainFieldType, type PlainRefusal, type PortalAnswer, PortalCardView, type PortalCardViewProps, PortalShell, type PortalShellProps, PortalsPanel, type PortalsPanelProps, type ProposalOutcome, ProposalRow, type ProposalRowProps, type ProposedChange, ProvenanceBadge, PublicViewPage, type PublicViewPageProps, type ReaskContext, RecordChat, type RecordChatContext, type RecordChatEntry, type RecordChatProps, type RecordChatWithheld, RecordChip, RecordForm, type RecordFormProps, RecordLabelProvider, RecordValue, RecordsMount, type RecordsMountProps, type RecordsUiHost, RecordsUiProvider, RefusalLine, RefusalNotice, type RelationFieldType, RelationPicker, type RelationPickerProps, SERIES_COLORS, STORE_DECIDES_REASON, type SavedDashboard, type SavedForm, type SavedView, type SavedViewSpec, ShareControl, type ShareControlProps, type ShareSubject, SignBlock, type SignBlockProps, SubscriptionsPanel, type SubscriptionsPanelProps, type SystemFieldSpec, type SystemTableSpec, TABLE_LANES, TABLE_NOT_REACHABLE, type TableLane, TablePage, type TablePageProps, type TableRights, TableSettings, type TableSettingsProps, TablesHome, type TablesHomeProps, type TrackedVersion, type UseSystemTableState, VIEW_LAYOUTS, VIEW_NOT_SAVED_YET, VIEW_TABLE, ViewBar, type ViewBarProps, type ViewLayout, type ViewSort, ViewSwitcher, type ViewSwitcherProps, type WhatYouMayDo, addFields, blockFromSpec, bodyForReading, bodyFromKeys, cellState, colorFromTheValue, columnForField, controlFor, currencyCodeFor, dashboardDeclareArgs, dashboardFromSummary, declareTable, editorKindFor, ensureSystemTable, envelopeFor, fieldDeclarationFor, fieldIsEditable, fieldName, fieldToken, fieldTypeChoice, fieldTypeLabel, formDeclareArgs, formFromSummary, formPresentation, formatForField, groupLabel, hintForAPerson, hintIsMachineIdentity, humanize, idsOf, isId, isMachineIdentity, isPlainFieldType, isRelationFieldType, isSignatureField, keyFor, laneFor, machineIdentityIn, memberName, parityTypesWithNoExplanation, parseGridPresentation, personActor, personRecordForMember, pointsAtRecords, presentationDocument, presentationIsEmpty, previewLine, recordName, recordsDataSource, refusalForAPerson, refusalLineForAPerson, renderValue, revokeConsequence, rowName, scalarText, shareUnavailableReason, specFromBlock, storeDecidesRights, submissionStamp, tableName, tableRightsAt, tokenFor, useCanShare, useEmbedHandshake, useEnrichCells, useGridEditing, useMeasuredWidth, useRecordLabels, useRecordRights, useRecordsUi, useRowRights, useSystemTable, useTableRights, useViewRecords, viewDocument, viewFromRecord, viewPatchDocument, whatIsMissing, whatYouMayDo, whatYouMayDoWithTable };
|