@ai-matrx/records-ui 0.9.0 → 0.10.3
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 +89 -0
- package/dist/index.cjs +166 -43
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +66 -31
- package/dist/index.d.ts +66 -31
- package/dist/index.js +227 -104
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { Uuid as Uuid$1, Table, Field, RecordDocument, ReadRow, RecordsError, WriteConflict,
|
|
3
|
+
import { Uuid as Uuid$1, Table, Field, RecordDocument, ReadRow, RecordsError, WriteConflict, ParityFieldType, NewFieldDeclaration, ValueEnvelope, RuleExpression, AggregateBucket, AggregateMeasure, DocTemplateRow, DocRenderRow, AnonTokenBinding, RecordsConfig, RecordsActor, RecordsDataSource } from '@ai-matrx/records';
|
|
4
4
|
import { Uuid, Field as Field$1, ReadRow as ReadRow$1 } from '@ai-matrx/records/react';
|
|
5
5
|
import { RecordsClient } from '@ai-matrx/records/core';
|
|
6
6
|
import { MatrxColumnDef } from '@ai-matrx/design-system/data-table/types';
|
|
@@ -347,12 +347,21 @@ interface GridEditing {
|
|
|
347
347
|
/** The value to DRAW for one cell — the optimistic one when there is one. */
|
|
348
348
|
valueFor: (row: ReadRow, field: Field) => unknown;
|
|
349
349
|
editing: CellAddress | null;
|
|
350
|
+
/** What has been typed into the open cell. Owned here, never by the cell. */
|
|
351
|
+
draft: unknown;
|
|
352
|
+
/** The open cell's editor reports every keystroke to the session. */
|
|
353
|
+
type: (value: unknown) => void;
|
|
350
354
|
stateOf: (rowId: Uuid$1, key: string) => CellState;
|
|
351
355
|
refusalOf: (rowId: Uuid$1, key: string) => CellRefusal | null;
|
|
352
356
|
begin: (address: CellAddress) => void;
|
|
353
357
|
cancel: () => void;
|
|
354
|
-
/**
|
|
355
|
-
|
|
358
|
+
/**
|
|
359
|
+
* Commit the open cell — whatever is in `draft`. `move` opens the
|
|
360
|
+
* next/previous editable cell after it. It takes NO value: a caller that
|
|
361
|
+
* passed one would be a second copy of the typed value, which is the defect
|
|
362
|
+
* this file's header describes.
|
|
363
|
+
*/
|
|
364
|
+
commit: (move?: "next" | "previous" | null) => void;
|
|
356
365
|
/** Write the attempted value again, after re-reading the version. */
|
|
357
366
|
retry: (rowId: Uuid$1, key: string) => void;
|
|
358
367
|
/** Drop the edit and show what the other person wrote. */
|
|
@@ -390,6 +399,9 @@ declare function GridCell({ field, row, editing, canWrite, }: {
|
|
|
390
399
|
canWrite: boolean;
|
|
391
400
|
}): react.JSX.Element;
|
|
392
401
|
|
|
402
|
+
declare function hintIsMachineIdentity(hint: string): boolean;
|
|
403
|
+
/** The hint a PERSON should read, or null when the hint is for an engineer. */
|
|
404
|
+
declare function hintForAPerson(hint: string | null | undefined): string | null;
|
|
393
405
|
declare function RefusalNotice({ error, className, actions, }: {
|
|
394
406
|
error: RecordsError;
|
|
395
407
|
className?: string | undefined;
|
|
@@ -468,6 +480,33 @@ interface CustomFieldsSectionProps {
|
|
|
468
480
|
}
|
|
469
481
|
declare function CustomFieldsSection({ tableId, entityToken, recordId, title, className, }: CustomFieldsSectionProps): react.JSX.Element | null;
|
|
470
482
|
|
|
483
|
+
/** The three behaviours that carry no parity type of their own. */
|
|
484
|
+
type PlainFieldType = "text" | "long_text" | "number";
|
|
485
|
+
/** What a person picks in the panel: one of the thirteen, or one of the three. */
|
|
486
|
+
type PickableFieldType = ParityFieldType | PlainFieldType;
|
|
487
|
+
interface FieldTypeChoice {
|
|
488
|
+
id: PickableFieldType;
|
|
489
|
+
/** The word on the menu. */
|
|
490
|
+
label: string;
|
|
491
|
+
/** One line, under the word, saying what it is FOR. Never what it is made of. */
|
|
492
|
+
explanation: string;
|
|
493
|
+
/** The heading it sits under, so sixteen choices read as four short lists. */
|
|
494
|
+
group: "Words" | "Numbers and dates" | "Choices and people" | "Worked out";
|
|
495
|
+
}
|
|
496
|
+
declare const FIELD_TYPE_CHOICES: FieldTypeChoice[];
|
|
497
|
+
declare const FIELD_TYPE_GROUPS: FieldTypeChoice["group"][];
|
|
498
|
+
declare function fieldTypeChoice(id: string): FieldTypeChoice | undefined;
|
|
499
|
+
/** The three that are a plain behaviour rather than one of the thirteen. */
|
|
500
|
+
declare function isPlainFieldType(id: string): id is PlainFieldType;
|
|
501
|
+
/**
|
|
502
|
+
* THE GUARD THIS FILE NEEDS, because the list it explains is generated.
|
|
503
|
+
*
|
|
504
|
+
* Returns the parity types the store ships that nothing here explains. The
|
|
505
|
+
* suite asserts it is empty; a fourteenth type would otherwise reach the menu
|
|
506
|
+
* with a blank line under it and nobody would notice until a person did.
|
|
507
|
+
*/
|
|
508
|
+
declare function parityTypesWithNoExplanation(): string[];
|
|
509
|
+
|
|
471
510
|
/** `Day rate` → `day_rate`. Shown, so nothing about it is a surprise. */
|
|
472
511
|
declare function keyFor(label: string): string;
|
|
473
512
|
interface FieldEditorProps {
|
|
@@ -481,6 +520,29 @@ interface FieldEditorProps {
|
|
|
481
520
|
className?: string | undefined;
|
|
482
521
|
}
|
|
483
522
|
declare function FieldEditor({ tableId, field, onSaved, onCancel, onRemoved, className }: FieldEditorProps): react.JSX.Element;
|
|
523
|
+
/**
|
|
524
|
+
* WHAT THE PANEL STILL NEEDS BEFORE THE STORE WOULD TAKE THIS, in plain words.
|
|
525
|
+
*
|
|
526
|
+
* It answers exactly the questions this panel asked, so every sentence names a
|
|
527
|
+
* control the person is looking at. It is NOT a second copy of the store's
|
|
528
|
+
* rules and it is not allowed to become one: the store decides, and every one
|
|
529
|
+
* of these is something the panel can see is unanswered without asking it.
|
|
530
|
+
*
|
|
531
|
+
* Exported so the suite can assert the sentences without driving the whole
|
|
532
|
+
* panel, and so the red twin can assert that removing it puts the contract row
|
|
533
|
+
* id back in front of a person.
|
|
534
|
+
*/
|
|
535
|
+
declare function whatIsMissing(state: {
|
|
536
|
+
type: PickableFieldType;
|
|
537
|
+
label: string;
|
|
538
|
+
options: string[];
|
|
539
|
+
via: string;
|
|
540
|
+
pick: string;
|
|
541
|
+
agg: NonNullable<NewFieldDeclaration["agg"]>;
|
|
542
|
+
of: string;
|
|
543
|
+
relations: Field[];
|
|
544
|
+
formulaFields: string[];
|
|
545
|
+
}): string | null;
|
|
484
546
|
|
|
485
547
|
interface FieldProposalRow {
|
|
486
548
|
id: string;
|
|
@@ -635,33 +697,6 @@ declare function editorKindFor(field: Field): EditorKind;
|
|
|
635
697
|
*/
|
|
636
698
|
declare function fieldTypeLabel(field: Field): string;
|
|
637
699
|
|
|
638
|
-
/** The three behaviours that carry no parity type of their own. */
|
|
639
|
-
type PlainFieldType = "text" | "long_text" | "number";
|
|
640
|
-
/** What a person picks in the panel: one of the thirteen, or one of the three. */
|
|
641
|
-
type PickableFieldType = ParityFieldType | PlainFieldType;
|
|
642
|
-
interface FieldTypeChoice {
|
|
643
|
-
id: PickableFieldType;
|
|
644
|
-
/** The word on the menu. */
|
|
645
|
-
label: string;
|
|
646
|
-
/** One line, under the word, saying what it is FOR. Never what it is made of. */
|
|
647
|
-
explanation: string;
|
|
648
|
-
/** The heading it sits under, so sixteen choices read as four short lists. */
|
|
649
|
-
group: "Words" | "Numbers and dates" | "Choices and people" | "Worked out";
|
|
650
|
-
}
|
|
651
|
-
declare const FIELD_TYPE_CHOICES: FieldTypeChoice[];
|
|
652
|
-
declare const FIELD_TYPE_GROUPS: FieldTypeChoice["group"][];
|
|
653
|
-
declare function fieldTypeChoice(id: string): FieldTypeChoice | undefined;
|
|
654
|
-
/** The three that are a plain behaviour rather than one of the thirteen. */
|
|
655
|
-
declare function isPlainFieldType(id: string): id is PlainFieldType;
|
|
656
|
-
/**
|
|
657
|
-
* THE GUARD THIS FILE NEEDS, because the list it explains is generated.
|
|
658
|
-
*
|
|
659
|
-
* Returns the parity types the store ships that nothing here explains. The
|
|
660
|
-
* suite asserts it is empty; a fourteenth type would otherwise reach the menu
|
|
661
|
-
* with a blank line under it and nobody would notice until a person did.
|
|
662
|
-
*/
|
|
663
|
-
declare function parityTypesWithNoExplanation(): string[];
|
|
664
|
-
|
|
665
700
|
/** One Field of a package-owned Table, in the store's own words. */
|
|
666
701
|
interface SystemFieldSpec {
|
|
667
702
|
key: string;
|
|
@@ -1551,4 +1586,4 @@ declare function useCanShare(): boolean;
|
|
|
1551
1586
|
declare function shareUnavailableReason(): string;
|
|
1552
1587
|
declare function ShareControl({ kind, organizationId, subjectId, name, size, variant, className, }: ShareControlProps): ReactNode;
|
|
1553
1588
|
|
|
1554
|
-
export { ACTION_KINDS, ACTION_TABLE, ActionInbox, type ActionInboxProps, type ActionKind, BookingSlots, type BookingSlotsProps, CAPTURE_MODES, CHART_KINDS, CHART_KIND_LABEL, CHART_NEEDS, CHECKLIST_TABLE, COMMENT_TABLE, type CaptureMode, type CaptureQueuePort, CaptureSheet, type CaptureSheetProps, type CellAddress, type CellRefusal, type CellState, ChartBlock, type ChartBlockProps, type ChartKind, type ChartSpec, ChecklistRunner, type ChecklistRunnerProps, type ChecklistSpec, type ChecklistStepSpec, CommentThread, type CommentThreadProps, CustomFieldsSection, type CustomFieldsSectionProps, DASHBOARD_TABLE, DEFAULT_FIELDS, DEFAULT_VIEW_NAME, DashboardCanvas, type DashboardCanvasProps, type DashboardSpec, type DeclareResult, DocRender, type DocRenderProps, DocTemplate, type DocTemplateProps, type DocTemplateSpec, type EditorKind, EmbedFrame, type EmbedFrameProps, type EnrichAsk, type EnrichOutcome, EnrichPanel, type EnrichPanelProps, ExportMenu, type ExportMenuProps, FIELD_TYPE_CHOICES, FIELD_TYPE_GROUPS, FORM_FLOWS, FORM_TABLE, FieldControl, FieldEditor, type FieldEditorControlProps, type FieldEditorProps, FieldLabel, type FieldProposalRow, type FieldTypeChoice, FormBuilder, type FormBuilderProps, type FormFlow, type FormQuestionSpec, FormRunner, type FormRunnerProps, type FormSpec, type FormTheme, Grid, GridCell, type GridEditing, 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, type LabelLookup, NO_CHAT_REASON, NO_ENRICH_REASON, NO_MEMBERS_REASON, NO_RIGHTS, NO_SAVED_VIEWS_REASON, NO_SHARE_REASON, NO_UPLOAD_REASON, type NewFieldSpec, type NewTableSpec, NotifyRuleEditor, type NotifyRuleEditorProps, type NotifyRuleSpec, type OrganizationMember, PARITY_LABEL, PARITY_MADE_OF, Peek, type PeekProps, type PendingCapture, PersonPicker, type PersonPickerProps, type PickableFieldType, type PlainFieldType, PortalShell, type PortalShellProps, type ProposalOutcome, ProposalRow, type ProposalRowProps, type ProposedChange, ProvenanceBadge, PublicViewPage, type PublicViewPageProps, type QueuedAction, type QueuedActionSpec, 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, 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_TABLE, ViewBar, type ViewBarProps, type ViewLayout, type ViewSort, ViewSwitcher, type ViewSwitcherProps, actionDocument, addFields, bodyForReading, bodyFromKeys, columnForField, dashboardDocument, dashboardFromRecord, declareTable, editorKindFor, ensureSystemTable, envelopeFor, fieldIsEditable, fieldName, fieldToken, fieldTypeChoice, fieldTypeLabel, formDocument, formFromRecord, groupLabel, humanize, idsOf, isId, isPlainFieldType, isSignatureField, keyFor, laneFor, memberName, parityTypesWithNoExplanation, personActor, personRecordForMember, pointsAtRecords, recordName, recordsDataSource, renderValue, rowName, scalarText, shareUnavailableReason, storeDecidesRights, submissionStamp, tableName, tokenFor, useCanShare, useEmbedHandshake, useGridEditing, useRecordLabels, useRecordsUi, useSystemTable, useTableRights, useViewRecords, viewDocument, viewFromRecord, viewPatchDocument };
|
|
1589
|
+
export { ACTION_KINDS, ACTION_TABLE, ActionInbox, type ActionInboxProps, type ActionKind, BookingSlots, type BookingSlotsProps, CAPTURE_MODES, CHART_KINDS, CHART_KIND_LABEL, CHART_NEEDS, CHECKLIST_TABLE, COMMENT_TABLE, type CaptureMode, type CaptureQueuePort, CaptureSheet, type CaptureSheetProps, type CellAddress, type CellRefusal, type CellState, ChartBlock, type ChartBlockProps, type ChartKind, type ChartSpec, ChecklistRunner, type ChecklistRunnerProps, type ChecklistSpec, type ChecklistStepSpec, CommentThread, type CommentThreadProps, CustomFieldsSection, type CustomFieldsSectionProps, DASHBOARD_TABLE, DEFAULT_FIELDS, DEFAULT_VIEW_NAME, DashboardCanvas, type DashboardCanvasProps, type DashboardSpec, type DeclareResult, DocRender, type DocRenderProps, DocTemplate, type DocTemplateProps, type DocTemplateSpec, type EditorKind, EmbedFrame, type EmbedFrameProps, type EnrichAsk, type EnrichOutcome, EnrichPanel, type EnrichPanelProps, ExportMenu, type ExportMenuProps, FIELD_TYPE_CHOICES, FIELD_TYPE_GROUPS, FORM_FLOWS, FORM_TABLE, FieldControl, FieldEditor, type FieldEditorControlProps, type FieldEditorProps, FieldLabel, type FieldProposalRow, type FieldTypeChoice, FormBuilder, type FormBuilderProps, type FormFlow, type FormQuestionSpec, FormRunner, type FormRunnerProps, type FormSpec, type FormTheme, Grid, GridCell, type GridEditing, 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, type LabelLookup, NO_CHAT_REASON, NO_ENRICH_REASON, NO_MEMBERS_REASON, NO_RIGHTS, NO_SAVED_VIEWS_REASON, NO_SHARE_REASON, NO_UPLOAD_REASON, type NewFieldSpec, type NewTableSpec, NotifyRuleEditor, type NotifyRuleEditorProps, type NotifyRuleSpec, type OrganizationMember, PARITY_LABEL, PARITY_MADE_OF, Peek, type PeekProps, type PendingCapture, PersonPicker, type PersonPickerProps, type PickableFieldType, type PlainFieldType, PortalShell, type PortalShellProps, type ProposalOutcome, ProposalRow, type ProposalRowProps, type ProposedChange, ProvenanceBadge, PublicViewPage, type PublicViewPageProps, type QueuedAction, type QueuedActionSpec, 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, 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_TABLE, ViewBar, type ViewBarProps, type ViewLayout, type ViewSort, ViewSwitcher, type ViewSwitcherProps, actionDocument, addFields, bodyForReading, bodyFromKeys, columnForField, dashboardDocument, dashboardFromRecord, declareTable, editorKindFor, ensureSystemTable, envelopeFor, fieldIsEditable, fieldName, fieldToken, fieldTypeChoice, fieldTypeLabel, formDocument, formFromRecord, groupLabel, hintForAPerson, hintIsMachineIdentity, humanize, idsOf, isId, isPlainFieldType, isSignatureField, keyFor, laneFor, memberName, parityTypesWithNoExplanation, personActor, personRecordForMember, pointsAtRecords, recordName, recordsDataSource, renderValue, rowName, scalarText, shareUnavailableReason, storeDecidesRights, submissionStamp, tableName, tokenFor, useCanShare, useEmbedHandshake, useGridEditing, useRecordLabels, useRecordsUi, useSystemTable, useTableRights, useViewRecords, viewDocument, viewFromRecord, viewPatchDocument, whatIsMissing };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { Uuid as Uuid$1, Table, Field, RecordDocument, ReadRow, RecordsError, WriteConflict,
|
|
3
|
+
import { Uuid as Uuid$1, Table, Field, RecordDocument, ReadRow, RecordsError, WriteConflict, ParityFieldType, NewFieldDeclaration, ValueEnvelope, RuleExpression, AggregateBucket, AggregateMeasure, DocTemplateRow, DocRenderRow, AnonTokenBinding, RecordsConfig, RecordsActor, RecordsDataSource } from '@ai-matrx/records';
|
|
4
4
|
import { Uuid, Field as Field$1, ReadRow as ReadRow$1 } from '@ai-matrx/records/react';
|
|
5
5
|
import { RecordsClient } from '@ai-matrx/records/core';
|
|
6
6
|
import { MatrxColumnDef } from '@ai-matrx/design-system/data-table/types';
|
|
@@ -347,12 +347,21 @@ interface GridEditing {
|
|
|
347
347
|
/** The value to DRAW for one cell — the optimistic one when there is one. */
|
|
348
348
|
valueFor: (row: ReadRow, field: Field) => unknown;
|
|
349
349
|
editing: CellAddress | null;
|
|
350
|
+
/** What has been typed into the open cell. Owned here, never by the cell. */
|
|
351
|
+
draft: unknown;
|
|
352
|
+
/** The open cell's editor reports every keystroke to the session. */
|
|
353
|
+
type: (value: unknown) => void;
|
|
350
354
|
stateOf: (rowId: Uuid$1, key: string) => CellState;
|
|
351
355
|
refusalOf: (rowId: Uuid$1, key: string) => CellRefusal | null;
|
|
352
356
|
begin: (address: CellAddress) => void;
|
|
353
357
|
cancel: () => void;
|
|
354
|
-
/**
|
|
355
|
-
|
|
358
|
+
/**
|
|
359
|
+
* Commit the open cell — whatever is in `draft`. `move` opens the
|
|
360
|
+
* next/previous editable cell after it. It takes NO value: a caller that
|
|
361
|
+
* passed one would be a second copy of the typed value, which is the defect
|
|
362
|
+
* this file's header describes.
|
|
363
|
+
*/
|
|
364
|
+
commit: (move?: "next" | "previous" | null) => void;
|
|
356
365
|
/** Write the attempted value again, after re-reading the version. */
|
|
357
366
|
retry: (rowId: Uuid$1, key: string) => void;
|
|
358
367
|
/** Drop the edit and show what the other person wrote. */
|
|
@@ -390,6 +399,9 @@ declare function GridCell({ field, row, editing, canWrite, }: {
|
|
|
390
399
|
canWrite: boolean;
|
|
391
400
|
}): react.JSX.Element;
|
|
392
401
|
|
|
402
|
+
declare function hintIsMachineIdentity(hint: string): boolean;
|
|
403
|
+
/** The hint a PERSON should read, or null when the hint is for an engineer. */
|
|
404
|
+
declare function hintForAPerson(hint: string | null | undefined): string | null;
|
|
393
405
|
declare function RefusalNotice({ error, className, actions, }: {
|
|
394
406
|
error: RecordsError;
|
|
395
407
|
className?: string | undefined;
|
|
@@ -468,6 +480,33 @@ interface CustomFieldsSectionProps {
|
|
|
468
480
|
}
|
|
469
481
|
declare function CustomFieldsSection({ tableId, entityToken, recordId, title, className, }: CustomFieldsSectionProps): react.JSX.Element | null;
|
|
470
482
|
|
|
483
|
+
/** The three behaviours that carry no parity type of their own. */
|
|
484
|
+
type PlainFieldType = "text" | "long_text" | "number";
|
|
485
|
+
/** What a person picks in the panel: one of the thirteen, or one of the three. */
|
|
486
|
+
type PickableFieldType = ParityFieldType | PlainFieldType;
|
|
487
|
+
interface FieldTypeChoice {
|
|
488
|
+
id: PickableFieldType;
|
|
489
|
+
/** The word on the menu. */
|
|
490
|
+
label: string;
|
|
491
|
+
/** One line, under the word, saying what it is FOR. Never what it is made of. */
|
|
492
|
+
explanation: string;
|
|
493
|
+
/** The heading it sits under, so sixteen choices read as four short lists. */
|
|
494
|
+
group: "Words" | "Numbers and dates" | "Choices and people" | "Worked out";
|
|
495
|
+
}
|
|
496
|
+
declare const FIELD_TYPE_CHOICES: FieldTypeChoice[];
|
|
497
|
+
declare const FIELD_TYPE_GROUPS: FieldTypeChoice["group"][];
|
|
498
|
+
declare function fieldTypeChoice(id: string): FieldTypeChoice | undefined;
|
|
499
|
+
/** The three that are a plain behaviour rather than one of the thirteen. */
|
|
500
|
+
declare function isPlainFieldType(id: string): id is PlainFieldType;
|
|
501
|
+
/**
|
|
502
|
+
* THE GUARD THIS FILE NEEDS, because the list it explains is generated.
|
|
503
|
+
*
|
|
504
|
+
* Returns the parity types the store ships that nothing here explains. The
|
|
505
|
+
* suite asserts it is empty; a fourteenth type would otherwise reach the menu
|
|
506
|
+
* with a blank line under it and nobody would notice until a person did.
|
|
507
|
+
*/
|
|
508
|
+
declare function parityTypesWithNoExplanation(): string[];
|
|
509
|
+
|
|
471
510
|
/** `Day rate` → `day_rate`. Shown, so nothing about it is a surprise. */
|
|
472
511
|
declare function keyFor(label: string): string;
|
|
473
512
|
interface FieldEditorProps {
|
|
@@ -481,6 +520,29 @@ interface FieldEditorProps {
|
|
|
481
520
|
className?: string | undefined;
|
|
482
521
|
}
|
|
483
522
|
declare function FieldEditor({ tableId, field, onSaved, onCancel, onRemoved, className }: FieldEditorProps): react.JSX.Element;
|
|
523
|
+
/**
|
|
524
|
+
* WHAT THE PANEL STILL NEEDS BEFORE THE STORE WOULD TAKE THIS, in plain words.
|
|
525
|
+
*
|
|
526
|
+
* It answers exactly the questions this panel asked, so every sentence names a
|
|
527
|
+
* control the person is looking at. It is NOT a second copy of the store's
|
|
528
|
+
* rules and it is not allowed to become one: the store decides, and every one
|
|
529
|
+
* of these is something the panel can see is unanswered without asking it.
|
|
530
|
+
*
|
|
531
|
+
* Exported so the suite can assert the sentences without driving the whole
|
|
532
|
+
* panel, and so the red twin can assert that removing it puts the contract row
|
|
533
|
+
* id back in front of a person.
|
|
534
|
+
*/
|
|
535
|
+
declare function whatIsMissing(state: {
|
|
536
|
+
type: PickableFieldType;
|
|
537
|
+
label: string;
|
|
538
|
+
options: string[];
|
|
539
|
+
via: string;
|
|
540
|
+
pick: string;
|
|
541
|
+
agg: NonNullable<NewFieldDeclaration["agg"]>;
|
|
542
|
+
of: string;
|
|
543
|
+
relations: Field[];
|
|
544
|
+
formulaFields: string[];
|
|
545
|
+
}): string | null;
|
|
484
546
|
|
|
485
547
|
interface FieldProposalRow {
|
|
486
548
|
id: string;
|
|
@@ -635,33 +697,6 @@ declare function editorKindFor(field: Field): EditorKind;
|
|
|
635
697
|
*/
|
|
636
698
|
declare function fieldTypeLabel(field: Field): string;
|
|
637
699
|
|
|
638
|
-
/** The three behaviours that carry no parity type of their own. */
|
|
639
|
-
type PlainFieldType = "text" | "long_text" | "number";
|
|
640
|
-
/** What a person picks in the panel: one of the thirteen, or one of the three. */
|
|
641
|
-
type PickableFieldType = ParityFieldType | PlainFieldType;
|
|
642
|
-
interface FieldTypeChoice {
|
|
643
|
-
id: PickableFieldType;
|
|
644
|
-
/** The word on the menu. */
|
|
645
|
-
label: string;
|
|
646
|
-
/** One line, under the word, saying what it is FOR. Never what it is made of. */
|
|
647
|
-
explanation: string;
|
|
648
|
-
/** The heading it sits under, so sixteen choices read as four short lists. */
|
|
649
|
-
group: "Words" | "Numbers and dates" | "Choices and people" | "Worked out";
|
|
650
|
-
}
|
|
651
|
-
declare const FIELD_TYPE_CHOICES: FieldTypeChoice[];
|
|
652
|
-
declare const FIELD_TYPE_GROUPS: FieldTypeChoice["group"][];
|
|
653
|
-
declare function fieldTypeChoice(id: string): FieldTypeChoice | undefined;
|
|
654
|
-
/** The three that are a plain behaviour rather than one of the thirteen. */
|
|
655
|
-
declare function isPlainFieldType(id: string): id is PlainFieldType;
|
|
656
|
-
/**
|
|
657
|
-
* THE GUARD THIS FILE NEEDS, because the list it explains is generated.
|
|
658
|
-
*
|
|
659
|
-
* Returns the parity types the store ships that nothing here explains. The
|
|
660
|
-
* suite asserts it is empty; a fourteenth type would otherwise reach the menu
|
|
661
|
-
* with a blank line under it and nobody would notice until a person did.
|
|
662
|
-
*/
|
|
663
|
-
declare function parityTypesWithNoExplanation(): string[];
|
|
664
|
-
|
|
665
700
|
/** One Field of a package-owned Table, in the store's own words. */
|
|
666
701
|
interface SystemFieldSpec {
|
|
667
702
|
key: string;
|
|
@@ -1551,4 +1586,4 @@ declare function useCanShare(): boolean;
|
|
|
1551
1586
|
declare function shareUnavailableReason(): string;
|
|
1552
1587
|
declare function ShareControl({ kind, organizationId, subjectId, name, size, variant, className, }: ShareControlProps): ReactNode;
|
|
1553
1588
|
|
|
1554
|
-
export { ACTION_KINDS, ACTION_TABLE, ActionInbox, type ActionInboxProps, type ActionKind, BookingSlots, type BookingSlotsProps, CAPTURE_MODES, CHART_KINDS, CHART_KIND_LABEL, CHART_NEEDS, CHECKLIST_TABLE, COMMENT_TABLE, type CaptureMode, type CaptureQueuePort, CaptureSheet, type CaptureSheetProps, type CellAddress, type CellRefusal, type CellState, ChartBlock, type ChartBlockProps, type ChartKind, type ChartSpec, ChecklistRunner, type ChecklistRunnerProps, type ChecklistSpec, type ChecklistStepSpec, CommentThread, type CommentThreadProps, CustomFieldsSection, type CustomFieldsSectionProps, DASHBOARD_TABLE, DEFAULT_FIELDS, DEFAULT_VIEW_NAME, DashboardCanvas, type DashboardCanvasProps, type DashboardSpec, type DeclareResult, DocRender, type DocRenderProps, DocTemplate, type DocTemplateProps, type DocTemplateSpec, type EditorKind, EmbedFrame, type EmbedFrameProps, type EnrichAsk, type EnrichOutcome, EnrichPanel, type EnrichPanelProps, ExportMenu, type ExportMenuProps, FIELD_TYPE_CHOICES, FIELD_TYPE_GROUPS, FORM_FLOWS, FORM_TABLE, FieldControl, FieldEditor, type FieldEditorControlProps, type FieldEditorProps, FieldLabel, type FieldProposalRow, type FieldTypeChoice, FormBuilder, type FormBuilderProps, type FormFlow, type FormQuestionSpec, FormRunner, type FormRunnerProps, type FormSpec, type FormTheme, Grid, GridCell, type GridEditing, 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, type LabelLookup, NO_CHAT_REASON, NO_ENRICH_REASON, NO_MEMBERS_REASON, NO_RIGHTS, NO_SAVED_VIEWS_REASON, NO_SHARE_REASON, NO_UPLOAD_REASON, type NewFieldSpec, type NewTableSpec, NotifyRuleEditor, type NotifyRuleEditorProps, type NotifyRuleSpec, type OrganizationMember, PARITY_LABEL, PARITY_MADE_OF, Peek, type PeekProps, type PendingCapture, PersonPicker, type PersonPickerProps, type PickableFieldType, type PlainFieldType, PortalShell, type PortalShellProps, type ProposalOutcome, ProposalRow, type ProposalRowProps, type ProposedChange, ProvenanceBadge, PublicViewPage, type PublicViewPageProps, type QueuedAction, type QueuedActionSpec, 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, 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_TABLE, ViewBar, type ViewBarProps, type ViewLayout, type ViewSort, ViewSwitcher, type ViewSwitcherProps, actionDocument, addFields, bodyForReading, bodyFromKeys, columnForField, dashboardDocument, dashboardFromRecord, declareTable, editorKindFor, ensureSystemTable, envelopeFor, fieldIsEditable, fieldName, fieldToken, fieldTypeChoice, fieldTypeLabel, formDocument, formFromRecord, groupLabel, humanize, idsOf, isId, isPlainFieldType, isSignatureField, keyFor, laneFor, memberName, parityTypesWithNoExplanation, personActor, personRecordForMember, pointsAtRecords, recordName, recordsDataSource, renderValue, rowName, scalarText, shareUnavailableReason, storeDecidesRights, submissionStamp, tableName, tokenFor, useCanShare, useEmbedHandshake, useGridEditing, useRecordLabels, useRecordsUi, useSystemTable, useTableRights, useViewRecords, viewDocument, viewFromRecord, viewPatchDocument };
|
|
1589
|
+
export { ACTION_KINDS, ACTION_TABLE, ActionInbox, type ActionInboxProps, type ActionKind, BookingSlots, type BookingSlotsProps, CAPTURE_MODES, CHART_KINDS, CHART_KIND_LABEL, CHART_NEEDS, CHECKLIST_TABLE, COMMENT_TABLE, type CaptureMode, type CaptureQueuePort, CaptureSheet, type CaptureSheetProps, type CellAddress, type CellRefusal, type CellState, ChartBlock, type ChartBlockProps, type ChartKind, type ChartSpec, ChecklistRunner, type ChecklistRunnerProps, type ChecklistSpec, type ChecklistStepSpec, CommentThread, type CommentThreadProps, CustomFieldsSection, type CustomFieldsSectionProps, DASHBOARD_TABLE, DEFAULT_FIELDS, DEFAULT_VIEW_NAME, DashboardCanvas, type DashboardCanvasProps, type DashboardSpec, type DeclareResult, DocRender, type DocRenderProps, DocTemplate, type DocTemplateProps, type DocTemplateSpec, type EditorKind, EmbedFrame, type EmbedFrameProps, type EnrichAsk, type EnrichOutcome, EnrichPanel, type EnrichPanelProps, ExportMenu, type ExportMenuProps, FIELD_TYPE_CHOICES, FIELD_TYPE_GROUPS, FORM_FLOWS, FORM_TABLE, FieldControl, FieldEditor, type FieldEditorControlProps, type FieldEditorProps, FieldLabel, type FieldProposalRow, type FieldTypeChoice, FormBuilder, type FormBuilderProps, type FormFlow, type FormQuestionSpec, FormRunner, type FormRunnerProps, type FormSpec, type FormTheme, Grid, GridCell, type GridEditing, 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, type LabelLookup, NO_CHAT_REASON, NO_ENRICH_REASON, NO_MEMBERS_REASON, NO_RIGHTS, NO_SAVED_VIEWS_REASON, NO_SHARE_REASON, NO_UPLOAD_REASON, type NewFieldSpec, type NewTableSpec, NotifyRuleEditor, type NotifyRuleEditorProps, type NotifyRuleSpec, type OrganizationMember, PARITY_LABEL, PARITY_MADE_OF, Peek, type PeekProps, type PendingCapture, PersonPicker, type PersonPickerProps, type PickableFieldType, type PlainFieldType, PortalShell, type PortalShellProps, type ProposalOutcome, ProposalRow, type ProposalRowProps, type ProposedChange, ProvenanceBadge, PublicViewPage, type PublicViewPageProps, type QueuedAction, type QueuedActionSpec, 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, 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_TABLE, ViewBar, type ViewBarProps, type ViewLayout, type ViewSort, ViewSwitcher, type ViewSwitcherProps, actionDocument, addFields, bodyForReading, bodyFromKeys, columnForField, dashboardDocument, dashboardFromRecord, declareTable, editorKindFor, ensureSystemTable, envelopeFor, fieldIsEditable, fieldName, fieldToken, fieldTypeChoice, fieldTypeLabel, formDocument, formFromRecord, groupLabel, hintForAPerson, hintIsMachineIdentity, humanize, idsOf, isId, isPlainFieldType, isSignatureField, keyFor, laneFor, memberName, parityTypesWithNoExplanation, personActor, personRecordForMember, pointsAtRecords, recordName, recordsDataSource, renderValue, rowName, scalarText, shareUnavailableReason, storeDecidesRights, submissionStamp, tableName, tokenFor, useCanShare, useEmbedHandshake, useGridEditing, useRecordLabels, useRecordsUi, useSystemTable, useTableRights, useViewRecords, viewDocument, viewFromRecord, viewPatchDocument, whatIsMissing };
|