@ai-matrx/records-ui 0.30.0 → 0.38.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 +255 -0
- package/README.md +3 -3
- package/dist/index.cjs +3834 -2242
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +205 -29
- package/dist/index.d.ts +205 -29
- package/dist/index.js +3829 -2208
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
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`. */
|
|
@@ -1252,6 +1381,8 @@ interface ViewSwitcherProps {
|
|
|
1252
1381
|
onOpenRecord?: ((recordId: Uuid) => void) | undefined;
|
|
1253
1382
|
/** The host's whole-record form, offered by the grid when an empty record is refused. */
|
|
1254
1383
|
onNewRecordForm?: (() => void) | undefined;
|
|
1384
|
+
/** "Who changed this?" from a grid cell — the host opens that column's timeline. */
|
|
1385
|
+
onAskWhoChanged?: ((fieldKey: string, recordId: Uuid) => void) | undefined;
|
|
1255
1386
|
pageSize?: number | undefined;
|
|
1256
1387
|
className?: string | undefined;
|
|
1257
1388
|
}
|
|
@@ -1263,7 +1394,7 @@ declare function useViewRecords(view: SavedViewSpec, pageSize?: number): {
|
|
|
1263
1394
|
/** Where membership came from, in a sentence. A screen that hides this is hiding the view's meaning. */
|
|
1264
1395
|
membership: string;
|
|
1265
1396
|
};
|
|
1266
|
-
declare function ViewSwitcher({ view, onLayoutChange, onViewChange, onOpenRecord, onNewRecordForm, pageSize, className, }: ViewSwitcherProps): react.JSX.Element;
|
|
1397
|
+
declare function ViewSwitcher({ view, onLayoutChange, onViewChange, onOpenRecord, onNewRecordForm, onAskWhoChanged, pageSize, className, }: ViewSwitcherProps): react.JSX.Element;
|
|
1267
1398
|
|
|
1268
1399
|
interface ViewBarProps {
|
|
1269
1400
|
/** The Table whose views these are. */
|
|
@@ -1353,20 +1484,39 @@ declare function ActionInbox({ tableId, includeSettled, onOpenRecord, className
|
|
|
1353
1484
|
interface HistoryPanelProps {
|
|
1354
1485
|
tableId: Uuid;
|
|
1355
1486
|
recordId: Uuid;
|
|
1487
|
+
/**
|
|
1488
|
+
* "Who changed THIS column?" — the host opens that field's own timeline. Left
|
|
1489
|
+
* out, the per-field control is absent rather than dead.
|
|
1490
|
+
*/
|
|
1491
|
+
onAskAboutField?: ((fieldKey: string) => void) | undefined;
|
|
1356
1492
|
className?: string | undefined;
|
|
1357
1493
|
}
|
|
1358
|
-
declare function HistoryPanel({ tableId, recordId, className }: HistoryPanelProps): react.JSX.Element;
|
|
1494
|
+
declare function HistoryPanel({ tableId, recordId, onAskAboutField, className }: HistoryPanelProps): react.JSX.Element;
|
|
1359
1495
|
|
|
1360
|
-
/** The package-owned Table every comment is a record of. */
|
|
1361
|
-
declare const COMMENT_TABLE: SystemTableSpec;
|
|
1362
1496
|
interface CommentThreadProps {
|
|
1363
|
-
/** The Table the commented-on record belongs to — its
|
|
1497
|
+
/** The Table the commented-on record belongs to — its Fields name an anchor. */
|
|
1364
1498
|
tableId: Uuid;
|
|
1365
1499
|
/** The record being discussed. */
|
|
1366
1500
|
recordId: Uuid;
|
|
1501
|
+
/** Open on the thread about ONE column, and post there by default. */
|
|
1502
|
+
fieldKey?: string | undefined;
|
|
1503
|
+
className?: string | undefined;
|
|
1504
|
+
}
|
|
1505
|
+
declare function CommentThread({ tableId, recordId, fieldKey, className }: CommentThreadProps): react.JSX.Element;
|
|
1506
|
+
|
|
1507
|
+
interface FieldHistoryPanelProps {
|
|
1508
|
+
tableId: Uuid;
|
|
1509
|
+
/** The column being asked about, by its key. */
|
|
1510
|
+
fieldKey: string;
|
|
1511
|
+
/** Scoped to ONE record when present; the whole Table when absent. */
|
|
1512
|
+
recordId?: Uuid | undefined;
|
|
1513
|
+
/** The host's way back — a cell menu opens this, so it closes too. */
|
|
1514
|
+
onClose?: (() => void) | undefined;
|
|
1515
|
+
/** Open a record from one of its rows. Absent, the row is not a link. */
|
|
1516
|
+
onOpenRecord?: ((recordId: Uuid) => void) | undefined;
|
|
1367
1517
|
className?: string | undefined;
|
|
1368
1518
|
}
|
|
1369
|
-
declare function
|
|
1519
|
+
declare function FieldHistoryPanel({ tableId, fieldKey, recordId, onClose, onOpenRecord, className, }: FieldHistoryPanelProps): react.JSX.Element;
|
|
1370
1520
|
|
|
1371
1521
|
/** How a form is put in front of a person. */
|
|
1372
1522
|
declare const FORM_FLOWS: readonly ["one-at-a-time", "single-page"];
|
|
@@ -1748,11 +1898,13 @@ declare function SignBlock({ tableId, recordId, render, className }: SignBlockPr
|
|
|
1748
1898
|
interface NotifyRuleSpec {
|
|
1749
1899
|
name: string;
|
|
1750
1900
|
savedViewId: Uuid;
|
|
1751
|
-
/** `
|
|
1901
|
+
/** `instant` fires the moment a record enters the view; the rest are summaries. */
|
|
1752
1902
|
cadence?: string;
|
|
1753
|
-
/** The
|
|
1903
|
+
/** The summary's schedule — "monday 08:00". Meaningless for `instant`. */
|
|
1754
1904
|
schedule?: string | null;
|
|
1755
1905
|
channel?: string;
|
|
1906
|
+
/** The hours not to be told in. A send inside them is MOVED, never dropped. */
|
|
1907
|
+
quietHours?: QuietHours | null;
|
|
1756
1908
|
/** Who is told. Left out, the person setting it up — "tell ME". */
|
|
1757
1909
|
recipientUserId?: Uuid | null;
|
|
1758
1910
|
eventKey?: string;
|
|
@@ -1887,7 +2039,18 @@ declare const CAPTURE_MODES: readonly ["reading", "photo", "voice"];
|
|
|
1887
2039
|
type CaptureMode = (typeof CAPTURE_MODES)[number];
|
|
1888
2040
|
declare const IN_MEMORY_QUEUE_REASON: string;
|
|
1889
2041
|
interface CaptureSheetProps {
|
|
1890
|
-
/**
|
|
2042
|
+
/**
|
|
2043
|
+
* A DECLARED capture sheet. Given one, this component runs THAT sheet — its
|
|
2044
|
+
* questions, in its order, with its required ones, one at a time, through
|
|
2045
|
+
* `custom.capture_open` and `custom.capture_submit`, with the durable queue. That is
|
|
2046
|
+
* the crew case (PRODUCTS row 15) and it is what twelve people doing the same round
|
|
2047
|
+
* need: somebody has SAID what the questions are.
|
|
2048
|
+
*
|
|
2049
|
+
* Without one this stays the ad-hoc capture below, which guesses which Field a
|
|
2050
|
+
* reading goes in — right for a quick one-off, wrong for a crew.
|
|
2051
|
+
*/
|
|
2052
|
+
sheetId?: Uuid | undefined;
|
|
2053
|
+
/** The Table a capture becomes a record in. Not needed when `sheetId` is given. */
|
|
1891
2054
|
tableId: Uuid;
|
|
1892
2055
|
/** Which Field a reading's number goes in. Defaults to the first range Field. */
|
|
1893
2056
|
readingField?: string | undefined;
|
|
@@ -1897,7 +2060,20 @@ interface CaptureSheetProps {
|
|
|
1897
2060
|
attachmentField?: string | undefined;
|
|
1898
2061
|
className?: string | undefined;
|
|
1899
2062
|
}
|
|
1900
|
-
declare function CaptureSheet({ tableId, readingField, noteField, attachmentField, className, }: CaptureSheetProps): react.JSX.Element;
|
|
2063
|
+
declare function CaptureSheet({ sheetId, tableId, readingField, noteField, attachmentField, className, }: CaptureSheetProps): react.JSX.Element;
|
|
2064
|
+
|
|
2065
|
+
interface CaptureRunProps {
|
|
2066
|
+
sheetId: Uuid$1;
|
|
2067
|
+
/**
|
|
2068
|
+
* The sheet, already loaded — by a server render, or from the phone's own copy. Given
|
|
2069
|
+
* one, this component makes NO network call before the first question is on screen.
|
|
2070
|
+
*/
|
|
2071
|
+
face?: CaptureSheetFace | null | undefined;
|
|
2072
|
+
className?: string | undefined;
|
|
2073
|
+
}
|
|
2074
|
+
/** What control one question gets. `attachment` is why a phone opens its camera. */
|
|
2075
|
+
declare function controlFor(field: CaptureField | undefined): "photo" | "voice" | "number" | "text";
|
|
2076
|
+
declare function CaptureRun({ sheetId, face: given, className }: CaptureRunProps): react.JSX.Element;
|
|
1901
2077
|
|
|
1902
2078
|
interface PortalShellProps {
|
|
1903
2079
|
/** The Table the outsider's records belong to. */
|
|
@@ -2228,4 +2404,4 @@ declare function useCanShare(): boolean;
|
|
|
2228
2404
|
declare function shareUnavailableReason(): string;
|
|
2229
2405
|
declare function ShareControl({ kind, organizationId, subjectId, name, may, size, variant, className, }: ShareControlProps): ReactNode;
|
|
2230
2406
|
|
|
2231
|
-
export { ACTION_KINDS, ActionInbox, type ActionInboxProps, type ActionKind, BookingSlots, type BookingSlotsProps, CAPTURE_MODES, CHART_KINDS, CHART_KIND_LABEL, CHART_NEEDS, CHECKLIST_TABLE,
|
|
2407
|
+
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, 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, 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, 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 };
|