@ai-matrx/records-ui 0.90.0 → 0.90.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, ComponentType, RefObject } from 'react';
3
3
  import * as _ai_matrx_records from '@ai-matrx/records';
4
- import { PermissionLevel, Table, RecordScopeContext, EnrichCell, RecordsError, Field, TableDecorations, Uuid as Uuid$1, RowAction, RecordDocument, StoreFilter, AggregateFilter, ReadRow, RelationDisplay, WriteConflict, RecordsErrorCode, RecordFilter, RuleExpression, RecordsResult, SavedViewRow, DeclarableFieldKind, ParityFieldType, NewFieldDeclaration, HiddenFieldNotice, ValueEnvelope, ChecklistRequirementKind, ContextPolicy, WorkDueState, FieldSensitivity, StageRuleOnFail, SubscriptionCadence, WorkApprovalState, WorkInboxKind, FieldKind, ArchiveLane, ArchivedRow, WorkInboxView, WorkInboxItem, FormSummary, PortalCard, PortalPrincipal, PortalPreviewRow, MySubscription, DashboardBlockKind, AggregateBucket, AggregateMeasure, AggregateCompare, DashboardTarget, DashboardBlock, DashboardSummary, DocTemplateRow, DocRenderRow, QuietHours, DashboardBlockResult, ChecklistRunStep, BookingSummary, CaptureSheetFace, CaptureField, AnonTokenBinding, RecordsConfig, RecordsActor, RecordsDataSource, HistoryActor, FieldHistoryEntry } from '@ai-matrx/records';
4
+ import { PermissionLevel, Table, RecordScopeContext, EnrichCell, RecordsError, Field, TableDecorations, Uuid as Uuid$1, RecordDocument, RowAction, ReadRow, StoreFilter, AggregateFilter, RelationDisplay, WriteConflict, RecordsErrorCode, RecordFilter, RuleExpression, RecordsResult, SavedViewRow, DeclarableFieldKind, ParityFieldType, NewFieldDeclaration, HiddenFieldNotice, ValueEnvelope, ChecklistRequirementKind, ContextPolicy, WorkDueState, FieldSensitivity, StageRuleOnFail, SubscriptionCadence, WorkApprovalState, WorkInboxKind, FieldKind, ArchiveLane, ArchivedRow, WorkInboxView, WorkInboxItem, FormSummary, PortalCard, PortalPrincipal, PortalPreviewRow, MySubscription, DashboardBlockKind, AggregateBucket, AggregateMeasure, AggregateCompare, DashboardTarget, DashboardBlock, DashboardSummary, DocTemplateRow, DocRenderRow, QuietHours, DashboardBlockResult, ChecklistRunStep, BookingSummary, CaptureSheetFace, CaptureField, AnonTokenBinding, RecordsConfig, RecordsActor, RecordsDataSource, HistoryActor, FieldHistoryEntry } from '@ai-matrx/records';
5
5
  import { Uuid, Field as Field$1, ReadRow as ReadRow$1, StoreFilter as StoreFilter$1 } from '@ai-matrx/records/react';
6
6
  import { TableStyle, GroupAggregateSpec, GroupOrder, ChoiceColorLookup } from '@ai-matrx/design-system/data-table';
7
7
  import { FieldFormatConfig } from '@ai-matrx/design-system/field-formats';
@@ -455,6 +455,39 @@ interface GridContextSnapshot {
455
455
  total: number | null;
456
456
  search: string;
457
457
  }
458
+ /** Where the cursor is, as the data table tells it (`spreadsheet.onSelectionChange`). */
459
+ interface GridCursor {
460
+ active: {
461
+ rowId: string;
462
+ columnId: string;
463
+ };
464
+ rowIds: string[];
465
+ columnIds: string[];
466
+ cellCount: number;
467
+ tsv: string;
468
+ }
469
+ declare function gridContextSnapshot(args: {
470
+ tableId: Uuid$1;
471
+ table: Table | null;
472
+ fields: readonly Field[];
473
+ /** The Field keys on screen, in order. */
474
+ shownKeys: readonly string[];
475
+ rows: readonly ReadRow[];
476
+ rowActions: readonly RowAction[];
477
+ canWrite: boolean;
478
+ cursor: GridCursor | null;
479
+ /** The cell whose editor is open, which wins over the cursor. */
480
+ editing: {
481
+ rowId: Uuid$1;
482
+ key: string;
483
+ draft: unknown;
484
+ } | null;
485
+ selectedIds: readonly string[];
486
+ total: number | null;
487
+ search: string;
488
+ }): GridContextSnapshot;
489
+ /** A snapshot's identity: two snapshots with the same key say the same thing. */
490
+ declare function gridContextKey(snapshot: GridContextSnapshot): string;
458
491
 
459
492
  /**
460
493
  * What a person may do to one table. The four words and the ladder are the
@@ -4652,4 +4685,4 @@ interface PipelineBoardProps {
4652
4685
  }
4653
4686
  declare function PipelineBoard({ tableId, rows, titleKey, measure, filter, onMeasureChange, onOpenRecord, onMoved, style, dateFields, className, }: PipelineBoardProps): react.JSX.Element;
4654
4687
 
4655
- export { ABSENCE_WORD_LABEL, ABSENCE_WORD_VALUES, ACTION_KINDS, ARCHIVED_NEVER_DESTROYED, ARCHIVE_MEANS, type AbsenceWord, ActionInbox, type ActionInboxProps, type ActionKind, type AgentBuildAsk, ArchivedDisclosure, type ArchivedDisclosureProps, ArchivedPortals, type ArchivedPortalsProps, ArchivedView, type ArchivedViewProps, BOOKING_NOT_HERE_LINE, BOOKING_PAGE_STATE_LABEL, BOOKING_PAGE_STATE_VALUES, BookingBuilder, type BookingBuilderProps, type BookingPageState, BookingSlots, type BookingSlotsProps, BuildOrAsk, type BuildOrAskProps, type BuildableKind, CAPTURE_MODES, CHART_KINDS, CHART_KIND_LABEL, CHART_NEEDS, CHECKLIST_REQUIREMENT_KINDS, CHECKLIST_REQUIREMENT_LABEL, CONDITION_OPS, CONTEXT_POLICY_LABEL, 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, ChecklistTemplateEditor, ChecklistsPanel, type ChecklistsPanelProps, CommentThread, type CommentThreadProps, type ConditionField, ConditionGroup, type ConditionGroupProps, ConditionRow, type ConditionRowProps, CustomFieldsSection, type CustomFieldsSectionProps, DEFAULT_FOOTER, DEFAULT_VIEW_NAME, DUE_STATE_LABEL, DashboardCanvas, type DashboardCanvasProps, DigestScheduler, type DigestSchedulerProps, DocRender, type DocRenderProps, DocTemplate, type DocTemplateProps, type DocTemplateSpec, EMPTY_PRESENTATION, ENGINEER_TEXT, ENTITY_REFERENCE_KINDS_MISSING, type EditorKind, EmbedFrame, type EmbedFrameProps, type EnrichAsk, EnrichBadge, type EnrichBadgeProps, type EnrichOutcome, EnrichPanel, type EnrichPanelProps, EntityReferenceKindPicker, type EntityReferenceKindPickerProps, ExportMenu, type ExportMenuProps, FIELD_RULE_KIND_LABEL, FIELD_RULE_KIND_VALUES, FIELD_SENSITIVITY_LABEL, FIELD_TYPE_CHOICES, FIELD_TYPE_GROUPS, FOOTER_WORDS, FORMULA_OP_JOINS, FORMULA_OP_LABEL, FORMULA_OP_VALUES, FORM_FLOWS, FORM_NOT_HERE_LINE, FROZEN_COLUMN_WIDTH, FieldControl, FieldEditor, type FieldEditorControlProps, type FieldEditorProps, FieldHistoryPanel, type FieldHistoryPanelProps, FieldLabel, type FieldProposalRow, type FieldRuleKindValue, type FieldTypeChoice, FilePicker, type FilePickerProps, type FooterPlacement, type FormAsked, FormBuilder, type FormBuilderProps, type FormFlow, type FormQuestionSpec, FormRunner, type FormRunnerProps, type FormSpec, type FormSubmitOutcome, type FormTheme, FormsPanel, type FormsPanelProps, type FormulaOp, Grid, GridCell, type GridEditing, type GridGrouping, type GridPresentation, type GridProps, HistoryPanel, type HistoryPanelProps, type HostLayout, INBOX_GROUPINGS, INBOX_VIEWS, IN_MEMORY_QUEUE_REASON, ImportWizard, type ImportWizardProps, InTableToolbar, type InboxGroup, type InboxGrouping, KERNEL_REASON, LANE_EMPTY, LANE_TITLE, LAYOUT_FIELD_KIND, LAYOUT_LABEL, LAYOUT_NEEDS, LAYOUT_NO_FIELD, LEVEL_WORD, LOOK_WORDS, type LabelLookup, type LinkRail, MACHINE_IDENTITY, MANUAL_SORT, MAX_ROW_HEIGHT, MIN_ROW_HEIGHT, type MainView, MyChecklistSteps, NEEDS_A_SENTENCE, NOT_ANSWERED_YET, NOT_DRAWN_HERE, NO_AGENT_PORT, 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_RULES_YET, NO_SAVED_VIEWS_REASON, NO_SHARE_REASON, NO_UPLOAD_REASON, NotifyRuleEditor, type NotifyRuleEditorProps, type NotifyRuleSpec, type OpenRecordsAsk, type OrganizationMember, PAGE_VIEWS, PAGE_VIEW_LABEL, PARITY_LABEL, PARITY_MADE_OF, PORTAL_NOT_HERE_LINE, PROPOSED_CHANGE_ACT_LABEL, PROPOSED_CHANGE_ACT_VALUES, type PageView, Peek, type PeekProps, type PendingCapture, PersonPicker, type PersonPickerProps, type PickableFieldType, PipelineBoard, type PipelineBoardProps, type PlainFieldType, type PlainRefusal, type PortalAnswer, PortalBuilder, type PortalBuilderProps, PortalCardView, type PortalCardViewProps, PortalLookEditor, type PortalLookEditorProps, PortalShell, type PortalShellProps, PortalsPanel, type PortalsPanelProps, type ProposalOutcome, ProposalRow, type ProposalRowProps, type ProposedChange, type ProposedChangeAct, ProvenanceBadge, PublicViewPage, type PublicViewPageProps, ROLLUP_AGG_LABEL, ROLLUP_AGG_VALUES, RULE_NOT_HERE_LINE, type ReaskContext, RecordChat, type RecordChatContext, type RecordChatEntry, type RecordChatProps, type RecordChatWithheld, RecordChip, RecordForm, type RecordFormProps, RecordLabelProvider, RecordValue, RecordsMount, type RecordsMountProps, type RecordsUiHost, RecordsUiProvider, ReferenceBuilder, type ReferenceBuilderProps, type ReferenceChoice, RefusalLine, RefusalNotice, type RelationFieldType, RelationPicker, type RelationPickerProps, type RenderTextSlot, type ResolveName, type RollupAgg, SAVED_VIEWS_UNAVAILABLE, SAY_WHAT_YOU_ARE_WAITING_FOR_AFTER_MS, SECTIONS_UNKNOWN, SERIES_COLORS, SHARE_NOT_YOURS_LINE, SOMEBODY, STAGE_RULE_ON_FAIL_LABEL, STORE_ANSWERS_THESE, STORE_DECIDES_REASON, SUBSCRIPTION_CADENCES, SUBSCRIPTION_CADENCE_LABEL, SUBSCRIPTION_CHANNEL_LABEL, SUBSCRIPTION_CHANNEL_VALUES, type SavedDashboard, type SavedForm, type SavedView, type SavedViewSpec, ShareControl, type ShareControlProps, type ShareSubject, type ShownViewReport, SignBlock, type SignBlockProps, type SnoozeChoice, type SortStateAction, SortStateControl, type SortStateControlProps, StageRulesSection, type StageRulesSectionProps, StepRow, type SubscriptionChannel, SubscriptionsPanel, type SubscriptionsPanelProps, type Surface, type SurfacePress, type SystemFieldSpec, type SystemTableSpec, TABLE_LANES, TABLE_MENU, TABLE_NOT_REACHABLE, THE_SYSTEM, type TableLane, type TableOpening, TablePage, type TablePageHeaderChrome, type TablePageProps, type TableRights, TableSettings, type TableSettingsProps, TableToolbarSlotContext, TablesHome, type TablesHomeProps, type TrackedVersion, type UseSystemTableState, VIEW_KEYS, VIEW_LAYOUTS, VIEW_NOT_SAVED_YET, VISIBILITY_LANES, VISIBILITY_LANE_TITLE, ViewBar, type ViewBarProps, type ViewKeyDeclaration, type ViewKeyLayout, type ViewKeyWriter, type ViewLayout, type ViewLook, type ViewSettings, type ViewSettingsPatch, type ViewSort, type ViewSortKey, ViewSwitcher, type ViewSwitcherProps, type VisibilityLane, WITHHELD_RECORD_LABEL, WITHHELD_WORD, WORK_APPROVAL_STATES, WORK_APPROVAL_STATE_LABEL, WORK_DUE_STATES, WORK_INBOX_KINDS, WORK_INBOX_KIND_GROUP_LABEL, WORK_INBOX_KIND_LABEL, type WhatYouMayDo, WhereItLives, type WhereItLivesProps, type WhoChanged, WhoChangedSource, WithheldValue, actorBadge, actorWords, applyLook, archiveConfirmSentence, archivedRowLine, asRefusal, askableFields, blockFromSpec, bodyForReading, bodyFromKeys, calendarDayLabel, calendarDayOf, cameFromLine, cardTitleField, cardWords, carriesTimeOfDay, cellState, chooseSurface, colorFromTheValue, columnForField, conditionInWords, conditionIsDrawable, conditionIsSimple, conditionValue, controlFor, currencyCodeFor, dashboardDeclareArgs, dashboardFromSummary, dateFormatFor, dateText, declareView, defaultViewOf, designatedLayoutOf, editorKindFor, ensureSystemTable, entityReferenceSpec, envelopeFor, fieldIsEditable, fieldName, fieldToken, fieldTypeChoice, fieldTypeLabel, footerOf, formDeclareArgs, formFromSummary, formPresentation, formatForField, groupInbox, groupLabel, handOrderLine, handOrderSortState, hasTimePart, hintForAPerson, hintIsMachineIdentity, humanize, idsOf, isDateField, isEngineerText, isId, isMachineIdentity, isParityFieldType, isPlainFieldType, isRelationFieldType, isSignatureField, keepLook, keptByTheApp, keyFor, kindsWithNoChoice, laneFor, lastChangeSentence, lookDiffers, lookDocument, lookFromDocument, lookPart, looksLikeId, machineIdentityIn, mayNotRestoreLine, memberName, nextInWords, nextSummaryAt, openingRail, openingView, pageViewFromParam, parityTypesWithNoExplanation, parseGridPresentation, personActor, personRecordForMember, pointsAtRecords, presentationDocument, presentationIsEmpty, previewLine, previewWords, publiclyAnswerable, railFromParam, readLooks, recordName, recordNameIn, recordsDataSource, refusal, refusalForAPerson, refusalFromThrown, refusalLineForAPerson, refusalOr, renderValue, resolveTableStyle, revokeConsequence, rowName, rowNameIn, saveToViewPlan, saveViewPatch, scalarText, seedIsSatisfied, shareUnavailableReason, snoozeChoices, specFromBlock, storeDecidesRights, styleFromDecorations, submissionStamp, surfaceChosen, tableName, tableOpening, tableRightsAt, unknownRailLine, unknownViewLine, useCanShare, useEmbedHandshake, useEnrichCells, useGridEditing, useLabelWait, useMeasuredWidth, useMyChecklistSteps, useRecordLabels, useRecordRights, useRecordsUi, useRowRights, useSystemTable, useTableRights, useTableToolbarSlot, useViewRecords, useWhoChanged, viewDocument, viewFromRow, viewKeysFor, viewPatchDocument, viewSettings, viewSettingsFor, viewSettingsPatch, visibilityLaneFor, whatIsMissing, whatIsMissingForEntityReference, whatYouMayDo, whatYouMayDoWithTable, whenWords, whyNotAskable, withheldNoticeOf, withheldSentence };
4688
+ export { ABSENCE_WORD_LABEL, ABSENCE_WORD_VALUES, ACTION_KINDS, ARCHIVED_NEVER_DESTROYED, ARCHIVE_MEANS, type AbsenceWord, ActionInbox, type ActionInboxProps, type ActionKind, type AgentBuildAsk, ArchivedDisclosure, type ArchivedDisclosureProps, ArchivedPortals, type ArchivedPortalsProps, ArchivedView, type ArchivedViewProps, BOOKING_NOT_HERE_LINE, BOOKING_PAGE_STATE_LABEL, BOOKING_PAGE_STATE_VALUES, BookingBuilder, type BookingBuilderProps, type BookingPageState, BookingSlots, type BookingSlotsProps, BuildOrAsk, type BuildOrAskProps, type BuildableKind, CAPTURE_MODES, CHART_KINDS, CHART_KIND_LABEL, CHART_NEEDS, CHECKLIST_REQUIREMENT_KINDS, CHECKLIST_REQUIREMENT_LABEL, CONDITION_OPS, CONTEXT_POLICY_LABEL, 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, ChecklistTemplateEditor, ChecklistsPanel, type ChecklistsPanelProps, CommentThread, type CommentThreadProps, type ConditionField, ConditionGroup, type ConditionGroupProps, ConditionRow, type ConditionRowProps, CustomFieldsSection, type CustomFieldsSectionProps, DEFAULT_FOOTER, DEFAULT_VIEW_NAME, DUE_STATE_LABEL, DashboardCanvas, type DashboardCanvasProps, DigestScheduler, type DigestSchedulerProps, DocRender, type DocRenderProps, DocTemplate, type DocTemplateProps, type DocTemplateSpec, EMPTY_PRESENTATION, ENGINEER_TEXT, ENTITY_REFERENCE_KINDS_MISSING, type EditorKind, EmbedFrame, type EmbedFrameProps, type EnrichAsk, EnrichBadge, type EnrichBadgeProps, type EnrichOutcome, EnrichPanel, type EnrichPanelProps, EntityReferenceKindPicker, type EntityReferenceKindPickerProps, ExportMenu, type ExportMenuProps, FIELD_RULE_KIND_LABEL, FIELD_RULE_KIND_VALUES, FIELD_SENSITIVITY_LABEL, FIELD_TYPE_CHOICES, FIELD_TYPE_GROUPS, FOOTER_WORDS, FORMULA_OP_JOINS, FORMULA_OP_LABEL, FORMULA_OP_VALUES, FORM_FLOWS, FORM_NOT_HERE_LINE, FROZEN_COLUMN_WIDTH, FieldControl, FieldEditor, type FieldEditorControlProps, type FieldEditorProps, FieldHistoryPanel, type FieldHistoryPanelProps, FieldLabel, type FieldProposalRow, type FieldRuleKindValue, type FieldTypeChoice, FilePicker, type FilePickerProps, type FooterPlacement, type FormAsked, FormBuilder, type FormBuilderProps, type FormFlow, type FormQuestionSpec, FormRunner, type FormRunnerProps, type FormSpec, type FormSubmitOutcome, type FormTheme, FormsPanel, type FormsPanelProps, type FormulaOp, Grid, GridCell, type GridContextRecord, type GridContextSnapshot, type GridEditing, type GridGrouping, type GridPresentation, type GridProps, HistoryPanel, type HistoryPanelProps, type HostLayout, INBOX_GROUPINGS, INBOX_VIEWS, IN_MEMORY_QUEUE_REASON, ImportWizard, type ImportWizardProps, InTableToolbar, type InboxGroup, type InboxGrouping, KERNEL_REASON, LANE_EMPTY, LANE_TITLE, LAYOUT_FIELD_KIND, LAYOUT_LABEL, LAYOUT_NEEDS, LAYOUT_NO_FIELD, LEVEL_WORD, LOOK_WORDS, type LabelLookup, type LinkRail, MACHINE_IDENTITY, MANUAL_SORT, MAX_ROW_HEIGHT, MIN_ROW_HEIGHT, type MainView, MyChecklistSteps, NEEDS_A_SENTENCE, NOT_ANSWERED_YET, NOT_DRAWN_HERE, NO_AGENT_PORT, 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_RULES_YET, NO_SAVED_VIEWS_REASON, NO_SHARE_REASON, NO_UPLOAD_REASON, NotifyRuleEditor, type NotifyRuleEditorProps, type NotifyRuleSpec, type OpenRecordsAsk, type OrganizationMember, PAGE_VIEWS, PAGE_VIEW_LABEL, PARITY_LABEL, PARITY_MADE_OF, PORTAL_NOT_HERE_LINE, PROPOSED_CHANGE_ACT_LABEL, PROPOSED_CHANGE_ACT_VALUES, type PageView, Peek, type PeekProps, type PendingCapture, PersonPicker, type PersonPickerProps, type PickableFieldType, PipelineBoard, type PipelineBoardProps, type PlainFieldType, type PlainRefusal, type PortalAnswer, PortalBuilder, type PortalBuilderProps, PortalCardView, type PortalCardViewProps, PortalLookEditor, type PortalLookEditorProps, PortalShell, type PortalShellProps, PortalsPanel, type PortalsPanelProps, type ProposalOutcome, ProposalRow, type ProposalRowProps, type ProposedChange, type ProposedChangeAct, ProvenanceBadge, PublicViewPage, type PublicViewPageProps, ROLLUP_AGG_LABEL, ROLLUP_AGG_VALUES, RULE_NOT_HERE_LINE, type ReaskContext, RecordChat, type RecordChatContext, type RecordChatEntry, type RecordChatProps, type RecordChatWithheld, RecordChip, RecordForm, type RecordFormProps, RecordLabelProvider, RecordValue, RecordsMount, type RecordsMountProps, type RecordsUiHost, RecordsUiProvider, ReferenceBuilder, type ReferenceBuilderProps, type ReferenceChoice, RefusalLine, RefusalNotice, type RelationFieldType, RelationPicker, type RelationPickerProps, type RenderTextSlot, type ResolveName, type RollupAgg, SAVED_VIEWS_UNAVAILABLE, SAY_WHAT_YOU_ARE_WAITING_FOR_AFTER_MS, SECTIONS_UNKNOWN, SERIES_COLORS, SHARE_NOT_YOURS_LINE, SOMEBODY, STAGE_RULE_ON_FAIL_LABEL, STORE_ANSWERS_THESE, STORE_DECIDES_REASON, SUBSCRIPTION_CADENCES, SUBSCRIPTION_CADENCE_LABEL, SUBSCRIPTION_CHANNEL_LABEL, SUBSCRIPTION_CHANNEL_VALUES, type SavedDashboard, type SavedForm, type SavedView, type SavedViewSpec, ShareControl, type ShareControlProps, type ShareSubject, type ShownViewReport, SignBlock, type SignBlockProps, type SnoozeChoice, type SortStateAction, SortStateControl, type SortStateControlProps, StageRulesSection, type StageRulesSectionProps, StepRow, type SubscriptionChannel, SubscriptionsPanel, type SubscriptionsPanelProps, type Surface, type SurfacePress, type SystemFieldSpec, type SystemTableSpec, TABLE_LANES, TABLE_MENU, TABLE_NOT_REACHABLE, THE_SYSTEM, type TableLane, type TableOpening, TablePage, type TablePageHeaderChrome, type TablePageProps, type TableRights, TableSettings, type TableSettingsProps, TableToolbarSlotContext, TablesHome, type TablesHomeProps, type TrackedVersion, type UseSystemTableState, VIEW_KEYS, VIEW_LAYOUTS, VIEW_NOT_SAVED_YET, VISIBILITY_LANES, VISIBILITY_LANE_TITLE, ViewBar, type ViewBarProps, type ViewKeyDeclaration, type ViewKeyLayout, type ViewKeyWriter, type ViewLayout, type ViewLook, type ViewSettings, type ViewSettingsPatch, type ViewSort, type ViewSortKey, ViewSwitcher, type ViewSwitcherProps, type VisibilityLane, WITHHELD_RECORD_LABEL, WITHHELD_WORD, WORK_APPROVAL_STATES, WORK_APPROVAL_STATE_LABEL, WORK_DUE_STATES, WORK_INBOX_KINDS, WORK_INBOX_KIND_GROUP_LABEL, WORK_INBOX_KIND_LABEL, type WhatYouMayDo, WhereItLives, type WhereItLivesProps, type WhoChanged, WhoChangedSource, WithheldValue, actorBadge, actorWords, applyLook, archiveConfirmSentence, archivedRowLine, asRefusal, askableFields, blockFromSpec, bodyForReading, bodyFromKeys, calendarDayLabel, calendarDayOf, cameFromLine, cardTitleField, cardWords, carriesTimeOfDay, cellState, chooseSurface, colorFromTheValue, columnForField, conditionInWords, conditionIsDrawable, conditionIsSimple, conditionValue, controlFor, currencyCodeFor, dashboardDeclareArgs, dashboardFromSummary, dateFormatFor, dateText, declareView, defaultViewOf, designatedLayoutOf, editorKindFor, ensureSystemTable, entityReferenceSpec, envelopeFor, fieldIsEditable, fieldName, fieldToken, fieldTypeChoice, fieldTypeLabel, footerOf, formDeclareArgs, formFromSummary, formPresentation, formatForField, gridContextKey, gridContextSnapshot, groupInbox, groupLabel, handOrderLine, handOrderSortState, hasTimePart, hintForAPerson, hintIsMachineIdentity, humanize, idsOf, isDateField, isEngineerText, isId, isMachineIdentity, isParityFieldType, isPlainFieldType, isRelationFieldType, isSignatureField, keepLook, keptByTheApp, keyFor, kindsWithNoChoice, laneFor, lastChangeSentence, lookDiffers, lookDocument, lookFromDocument, lookPart, looksLikeId, machineIdentityIn, mayNotRestoreLine, memberName, nextInWords, nextSummaryAt, openingRail, openingView, pageViewFromParam, parityTypesWithNoExplanation, parseGridPresentation, personActor, personRecordForMember, pointsAtRecords, presentationDocument, presentationIsEmpty, previewLine, previewWords, publiclyAnswerable, railFromParam, readLooks, recordName, recordNameIn, recordsDataSource, refusal, refusalForAPerson, refusalFromThrown, refusalLineForAPerson, refusalOr, renderValue, resolveTableStyle, revokeConsequence, rowName, rowNameIn, saveToViewPlan, saveViewPatch, scalarText, seedIsSatisfied, shareUnavailableReason, snoozeChoices, specFromBlock, storeDecidesRights, styleFromDecorations, submissionStamp, surfaceChosen, tableName, tableOpening, tableRightsAt, unknownRailLine, unknownViewLine, useCanShare, useEmbedHandshake, useEnrichCells, useGridEditing, useLabelWait, useMeasuredWidth, useMyChecklistSteps, useRecordLabels, useRecordRights, useRecordsUi, useRowRights, useSystemTable, useTableRights, useTableToolbarSlot, useViewRecords, useWhoChanged, viewDocument, viewFromRow, viewKeysFor, viewPatchDocument, viewSettings, viewSettingsFor, viewSettingsPatch, visibilityLaneFor, whatIsMissing, whatIsMissingForEntityReference, whatYouMayDo, whatYouMayDoWithTable, whenWords, whyNotAskable, withheldNoticeOf, withheldSentence };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, ComponentType, RefObject } from 'react';
3
3
  import * as _ai_matrx_records from '@ai-matrx/records';
4
- import { PermissionLevel, Table, RecordScopeContext, EnrichCell, RecordsError, Field, TableDecorations, Uuid as Uuid$1, RowAction, RecordDocument, StoreFilter, AggregateFilter, ReadRow, RelationDisplay, WriteConflict, RecordsErrorCode, RecordFilter, RuleExpression, RecordsResult, SavedViewRow, DeclarableFieldKind, ParityFieldType, NewFieldDeclaration, HiddenFieldNotice, ValueEnvelope, ChecklistRequirementKind, ContextPolicy, WorkDueState, FieldSensitivity, StageRuleOnFail, SubscriptionCadence, WorkApprovalState, WorkInboxKind, FieldKind, ArchiveLane, ArchivedRow, WorkInboxView, WorkInboxItem, FormSummary, PortalCard, PortalPrincipal, PortalPreviewRow, MySubscription, DashboardBlockKind, AggregateBucket, AggregateMeasure, AggregateCompare, DashboardTarget, DashboardBlock, DashboardSummary, DocTemplateRow, DocRenderRow, QuietHours, DashboardBlockResult, ChecklistRunStep, BookingSummary, CaptureSheetFace, CaptureField, AnonTokenBinding, RecordsConfig, RecordsActor, RecordsDataSource, HistoryActor, FieldHistoryEntry } from '@ai-matrx/records';
4
+ import { PermissionLevel, Table, RecordScopeContext, EnrichCell, RecordsError, Field, TableDecorations, Uuid as Uuid$1, RecordDocument, RowAction, ReadRow, StoreFilter, AggregateFilter, RelationDisplay, WriteConflict, RecordsErrorCode, RecordFilter, RuleExpression, RecordsResult, SavedViewRow, DeclarableFieldKind, ParityFieldType, NewFieldDeclaration, HiddenFieldNotice, ValueEnvelope, ChecklistRequirementKind, ContextPolicy, WorkDueState, FieldSensitivity, StageRuleOnFail, SubscriptionCadence, WorkApprovalState, WorkInboxKind, FieldKind, ArchiveLane, ArchivedRow, WorkInboxView, WorkInboxItem, FormSummary, PortalCard, PortalPrincipal, PortalPreviewRow, MySubscription, DashboardBlockKind, AggregateBucket, AggregateMeasure, AggregateCompare, DashboardTarget, DashboardBlock, DashboardSummary, DocTemplateRow, DocRenderRow, QuietHours, DashboardBlockResult, ChecklistRunStep, BookingSummary, CaptureSheetFace, CaptureField, AnonTokenBinding, RecordsConfig, RecordsActor, RecordsDataSource, HistoryActor, FieldHistoryEntry } from '@ai-matrx/records';
5
5
  import { Uuid, Field as Field$1, ReadRow as ReadRow$1, StoreFilter as StoreFilter$1 } from '@ai-matrx/records/react';
6
6
  import { TableStyle, GroupAggregateSpec, GroupOrder, ChoiceColorLookup } from '@ai-matrx/design-system/data-table';
7
7
  import { FieldFormatConfig } from '@ai-matrx/design-system/field-formats';
@@ -455,6 +455,39 @@ interface GridContextSnapshot {
455
455
  total: number | null;
456
456
  search: string;
457
457
  }
458
+ /** Where the cursor is, as the data table tells it (`spreadsheet.onSelectionChange`). */
459
+ interface GridCursor {
460
+ active: {
461
+ rowId: string;
462
+ columnId: string;
463
+ };
464
+ rowIds: string[];
465
+ columnIds: string[];
466
+ cellCount: number;
467
+ tsv: string;
468
+ }
469
+ declare function gridContextSnapshot(args: {
470
+ tableId: Uuid$1;
471
+ table: Table | null;
472
+ fields: readonly Field[];
473
+ /** The Field keys on screen, in order. */
474
+ shownKeys: readonly string[];
475
+ rows: readonly ReadRow[];
476
+ rowActions: readonly RowAction[];
477
+ canWrite: boolean;
478
+ cursor: GridCursor | null;
479
+ /** The cell whose editor is open, which wins over the cursor. */
480
+ editing: {
481
+ rowId: Uuid$1;
482
+ key: string;
483
+ draft: unknown;
484
+ } | null;
485
+ selectedIds: readonly string[];
486
+ total: number | null;
487
+ search: string;
488
+ }): GridContextSnapshot;
489
+ /** A snapshot's identity: two snapshots with the same key say the same thing. */
490
+ declare function gridContextKey(snapshot: GridContextSnapshot): string;
458
491
 
459
492
  /**
460
493
  * What a person may do to one table. The four words and the ladder are the
@@ -4652,4 +4685,4 @@ interface PipelineBoardProps {
4652
4685
  }
4653
4686
  declare function PipelineBoard({ tableId, rows, titleKey, measure, filter, onMeasureChange, onOpenRecord, onMoved, style, dateFields, className, }: PipelineBoardProps): react.JSX.Element;
4654
4687
 
4655
- export { ABSENCE_WORD_LABEL, ABSENCE_WORD_VALUES, ACTION_KINDS, ARCHIVED_NEVER_DESTROYED, ARCHIVE_MEANS, type AbsenceWord, ActionInbox, type ActionInboxProps, type ActionKind, type AgentBuildAsk, ArchivedDisclosure, type ArchivedDisclosureProps, ArchivedPortals, type ArchivedPortalsProps, ArchivedView, type ArchivedViewProps, BOOKING_NOT_HERE_LINE, BOOKING_PAGE_STATE_LABEL, BOOKING_PAGE_STATE_VALUES, BookingBuilder, type BookingBuilderProps, type BookingPageState, BookingSlots, type BookingSlotsProps, BuildOrAsk, type BuildOrAskProps, type BuildableKind, CAPTURE_MODES, CHART_KINDS, CHART_KIND_LABEL, CHART_NEEDS, CHECKLIST_REQUIREMENT_KINDS, CHECKLIST_REQUIREMENT_LABEL, CONDITION_OPS, CONTEXT_POLICY_LABEL, 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, ChecklistTemplateEditor, ChecklistsPanel, type ChecklistsPanelProps, CommentThread, type CommentThreadProps, type ConditionField, ConditionGroup, type ConditionGroupProps, ConditionRow, type ConditionRowProps, CustomFieldsSection, type CustomFieldsSectionProps, DEFAULT_FOOTER, DEFAULT_VIEW_NAME, DUE_STATE_LABEL, DashboardCanvas, type DashboardCanvasProps, DigestScheduler, type DigestSchedulerProps, DocRender, type DocRenderProps, DocTemplate, type DocTemplateProps, type DocTemplateSpec, EMPTY_PRESENTATION, ENGINEER_TEXT, ENTITY_REFERENCE_KINDS_MISSING, type EditorKind, EmbedFrame, type EmbedFrameProps, type EnrichAsk, EnrichBadge, type EnrichBadgeProps, type EnrichOutcome, EnrichPanel, type EnrichPanelProps, EntityReferenceKindPicker, type EntityReferenceKindPickerProps, ExportMenu, type ExportMenuProps, FIELD_RULE_KIND_LABEL, FIELD_RULE_KIND_VALUES, FIELD_SENSITIVITY_LABEL, FIELD_TYPE_CHOICES, FIELD_TYPE_GROUPS, FOOTER_WORDS, FORMULA_OP_JOINS, FORMULA_OP_LABEL, FORMULA_OP_VALUES, FORM_FLOWS, FORM_NOT_HERE_LINE, FROZEN_COLUMN_WIDTH, FieldControl, FieldEditor, type FieldEditorControlProps, type FieldEditorProps, FieldHistoryPanel, type FieldHistoryPanelProps, FieldLabel, type FieldProposalRow, type FieldRuleKindValue, type FieldTypeChoice, FilePicker, type FilePickerProps, type FooterPlacement, type FormAsked, FormBuilder, type FormBuilderProps, type FormFlow, type FormQuestionSpec, FormRunner, type FormRunnerProps, type FormSpec, type FormSubmitOutcome, type FormTheme, FormsPanel, type FormsPanelProps, type FormulaOp, Grid, GridCell, type GridEditing, type GridGrouping, type GridPresentation, type GridProps, HistoryPanel, type HistoryPanelProps, type HostLayout, INBOX_GROUPINGS, INBOX_VIEWS, IN_MEMORY_QUEUE_REASON, ImportWizard, type ImportWizardProps, InTableToolbar, type InboxGroup, type InboxGrouping, KERNEL_REASON, LANE_EMPTY, LANE_TITLE, LAYOUT_FIELD_KIND, LAYOUT_LABEL, LAYOUT_NEEDS, LAYOUT_NO_FIELD, LEVEL_WORD, LOOK_WORDS, type LabelLookup, type LinkRail, MACHINE_IDENTITY, MANUAL_SORT, MAX_ROW_HEIGHT, MIN_ROW_HEIGHT, type MainView, MyChecklistSteps, NEEDS_A_SENTENCE, NOT_ANSWERED_YET, NOT_DRAWN_HERE, NO_AGENT_PORT, 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_RULES_YET, NO_SAVED_VIEWS_REASON, NO_SHARE_REASON, NO_UPLOAD_REASON, NotifyRuleEditor, type NotifyRuleEditorProps, type NotifyRuleSpec, type OpenRecordsAsk, type OrganizationMember, PAGE_VIEWS, PAGE_VIEW_LABEL, PARITY_LABEL, PARITY_MADE_OF, PORTAL_NOT_HERE_LINE, PROPOSED_CHANGE_ACT_LABEL, PROPOSED_CHANGE_ACT_VALUES, type PageView, Peek, type PeekProps, type PendingCapture, PersonPicker, type PersonPickerProps, type PickableFieldType, PipelineBoard, type PipelineBoardProps, type PlainFieldType, type PlainRefusal, type PortalAnswer, PortalBuilder, type PortalBuilderProps, PortalCardView, type PortalCardViewProps, PortalLookEditor, type PortalLookEditorProps, PortalShell, type PortalShellProps, PortalsPanel, type PortalsPanelProps, type ProposalOutcome, ProposalRow, type ProposalRowProps, type ProposedChange, type ProposedChangeAct, ProvenanceBadge, PublicViewPage, type PublicViewPageProps, ROLLUP_AGG_LABEL, ROLLUP_AGG_VALUES, RULE_NOT_HERE_LINE, type ReaskContext, RecordChat, type RecordChatContext, type RecordChatEntry, type RecordChatProps, type RecordChatWithheld, RecordChip, RecordForm, type RecordFormProps, RecordLabelProvider, RecordValue, RecordsMount, type RecordsMountProps, type RecordsUiHost, RecordsUiProvider, ReferenceBuilder, type ReferenceBuilderProps, type ReferenceChoice, RefusalLine, RefusalNotice, type RelationFieldType, RelationPicker, type RelationPickerProps, type RenderTextSlot, type ResolveName, type RollupAgg, SAVED_VIEWS_UNAVAILABLE, SAY_WHAT_YOU_ARE_WAITING_FOR_AFTER_MS, SECTIONS_UNKNOWN, SERIES_COLORS, SHARE_NOT_YOURS_LINE, SOMEBODY, STAGE_RULE_ON_FAIL_LABEL, STORE_ANSWERS_THESE, STORE_DECIDES_REASON, SUBSCRIPTION_CADENCES, SUBSCRIPTION_CADENCE_LABEL, SUBSCRIPTION_CHANNEL_LABEL, SUBSCRIPTION_CHANNEL_VALUES, type SavedDashboard, type SavedForm, type SavedView, type SavedViewSpec, ShareControl, type ShareControlProps, type ShareSubject, type ShownViewReport, SignBlock, type SignBlockProps, type SnoozeChoice, type SortStateAction, SortStateControl, type SortStateControlProps, StageRulesSection, type StageRulesSectionProps, StepRow, type SubscriptionChannel, SubscriptionsPanel, type SubscriptionsPanelProps, type Surface, type SurfacePress, type SystemFieldSpec, type SystemTableSpec, TABLE_LANES, TABLE_MENU, TABLE_NOT_REACHABLE, THE_SYSTEM, type TableLane, type TableOpening, TablePage, type TablePageHeaderChrome, type TablePageProps, type TableRights, TableSettings, type TableSettingsProps, TableToolbarSlotContext, TablesHome, type TablesHomeProps, type TrackedVersion, type UseSystemTableState, VIEW_KEYS, VIEW_LAYOUTS, VIEW_NOT_SAVED_YET, VISIBILITY_LANES, VISIBILITY_LANE_TITLE, ViewBar, type ViewBarProps, type ViewKeyDeclaration, type ViewKeyLayout, type ViewKeyWriter, type ViewLayout, type ViewLook, type ViewSettings, type ViewSettingsPatch, type ViewSort, type ViewSortKey, ViewSwitcher, type ViewSwitcherProps, type VisibilityLane, WITHHELD_RECORD_LABEL, WITHHELD_WORD, WORK_APPROVAL_STATES, WORK_APPROVAL_STATE_LABEL, WORK_DUE_STATES, WORK_INBOX_KINDS, WORK_INBOX_KIND_GROUP_LABEL, WORK_INBOX_KIND_LABEL, type WhatYouMayDo, WhereItLives, type WhereItLivesProps, type WhoChanged, WhoChangedSource, WithheldValue, actorBadge, actorWords, applyLook, archiveConfirmSentence, archivedRowLine, asRefusal, askableFields, blockFromSpec, bodyForReading, bodyFromKeys, calendarDayLabel, calendarDayOf, cameFromLine, cardTitleField, cardWords, carriesTimeOfDay, cellState, chooseSurface, colorFromTheValue, columnForField, conditionInWords, conditionIsDrawable, conditionIsSimple, conditionValue, controlFor, currencyCodeFor, dashboardDeclareArgs, dashboardFromSummary, dateFormatFor, dateText, declareView, defaultViewOf, designatedLayoutOf, editorKindFor, ensureSystemTable, entityReferenceSpec, envelopeFor, fieldIsEditable, fieldName, fieldToken, fieldTypeChoice, fieldTypeLabel, footerOf, formDeclareArgs, formFromSummary, formPresentation, formatForField, groupInbox, groupLabel, handOrderLine, handOrderSortState, hasTimePart, hintForAPerson, hintIsMachineIdentity, humanize, idsOf, isDateField, isEngineerText, isId, isMachineIdentity, isParityFieldType, isPlainFieldType, isRelationFieldType, isSignatureField, keepLook, keptByTheApp, keyFor, kindsWithNoChoice, laneFor, lastChangeSentence, lookDiffers, lookDocument, lookFromDocument, lookPart, looksLikeId, machineIdentityIn, mayNotRestoreLine, memberName, nextInWords, nextSummaryAt, openingRail, openingView, pageViewFromParam, parityTypesWithNoExplanation, parseGridPresentation, personActor, personRecordForMember, pointsAtRecords, presentationDocument, presentationIsEmpty, previewLine, previewWords, publiclyAnswerable, railFromParam, readLooks, recordName, recordNameIn, recordsDataSource, refusal, refusalForAPerson, refusalFromThrown, refusalLineForAPerson, refusalOr, renderValue, resolveTableStyle, revokeConsequence, rowName, rowNameIn, saveToViewPlan, saveViewPatch, scalarText, seedIsSatisfied, shareUnavailableReason, snoozeChoices, specFromBlock, storeDecidesRights, styleFromDecorations, submissionStamp, surfaceChosen, tableName, tableOpening, tableRightsAt, unknownRailLine, unknownViewLine, useCanShare, useEmbedHandshake, useEnrichCells, useGridEditing, useLabelWait, useMeasuredWidth, useMyChecklistSteps, useRecordLabels, useRecordRights, useRecordsUi, useRowRights, useSystemTable, useTableRights, useTableToolbarSlot, useViewRecords, useWhoChanged, viewDocument, viewFromRow, viewKeysFor, viewPatchDocument, viewSettings, viewSettingsFor, viewSettingsPatch, visibilityLaneFor, whatIsMissing, whatIsMissingForEntityReference, whatYouMayDo, whatYouMayDoWithTable, whenWords, whyNotAskable, withheldNoticeOf, withheldSentence };
4688
+ export { ABSENCE_WORD_LABEL, ABSENCE_WORD_VALUES, ACTION_KINDS, ARCHIVED_NEVER_DESTROYED, ARCHIVE_MEANS, type AbsenceWord, ActionInbox, type ActionInboxProps, type ActionKind, type AgentBuildAsk, ArchivedDisclosure, type ArchivedDisclosureProps, ArchivedPortals, type ArchivedPortalsProps, ArchivedView, type ArchivedViewProps, BOOKING_NOT_HERE_LINE, BOOKING_PAGE_STATE_LABEL, BOOKING_PAGE_STATE_VALUES, BookingBuilder, type BookingBuilderProps, type BookingPageState, BookingSlots, type BookingSlotsProps, BuildOrAsk, type BuildOrAskProps, type BuildableKind, CAPTURE_MODES, CHART_KINDS, CHART_KIND_LABEL, CHART_NEEDS, CHECKLIST_REQUIREMENT_KINDS, CHECKLIST_REQUIREMENT_LABEL, CONDITION_OPS, CONTEXT_POLICY_LABEL, 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, ChecklistTemplateEditor, ChecklistsPanel, type ChecklistsPanelProps, CommentThread, type CommentThreadProps, type ConditionField, ConditionGroup, type ConditionGroupProps, ConditionRow, type ConditionRowProps, CustomFieldsSection, type CustomFieldsSectionProps, DEFAULT_FOOTER, DEFAULT_VIEW_NAME, DUE_STATE_LABEL, DashboardCanvas, type DashboardCanvasProps, DigestScheduler, type DigestSchedulerProps, DocRender, type DocRenderProps, DocTemplate, type DocTemplateProps, type DocTemplateSpec, EMPTY_PRESENTATION, ENGINEER_TEXT, ENTITY_REFERENCE_KINDS_MISSING, type EditorKind, EmbedFrame, type EmbedFrameProps, type EnrichAsk, EnrichBadge, type EnrichBadgeProps, type EnrichOutcome, EnrichPanel, type EnrichPanelProps, EntityReferenceKindPicker, type EntityReferenceKindPickerProps, ExportMenu, type ExportMenuProps, FIELD_RULE_KIND_LABEL, FIELD_RULE_KIND_VALUES, FIELD_SENSITIVITY_LABEL, FIELD_TYPE_CHOICES, FIELD_TYPE_GROUPS, FOOTER_WORDS, FORMULA_OP_JOINS, FORMULA_OP_LABEL, FORMULA_OP_VALUES, FORM_FLOWS, FORM_NOT_HERE_LINE, FROZEN_COLUMN_WIDTH, FieldControl, FieldEditor, type FieldEditorControlProps, type FieldEditorProps, FieldHistoryPanel, type FieldHistoryPanelProps, FieldLabel, type FieldProposalRow, type FieldRuleKindValue, type FieldTypeChoice, FilePicker, type FilePickerProps, type FooterPlacement, type FormAsked, FormBuilder, type FormBuilderProps, type FormFlow, type FormQuestionSpec, FormRunner, type FormRunnerProps, type FormSpec, type FormSubmitOutcome, type FormTheme, FormsPanel, type FormsPanelProps, type FormulaOp, Grid, GridCell, type GridContextRecord, type GridContextSnapshot, type GridEditing, type GridGrouping, type GridPresentation, type GridProps, HistoryPanel, type HistoryPanelProps, type HostLayout, INBOX_GROUPINGS, INBOX_VIEWS, IN_MEMORY_QUEUE_REASON, ImportWizard, type ImportWizardProps, InTableToolbar, type InboxGroup, type InboxGrouping, KERNEL_REASON, LANE_EMPTY, LANE_TITLE, LAYOUT_FIELD_KIND, LAYOUT_LABEL, LAYOUT_NEEDS, LAYOUT_NO_FIELD, LEVEL_WORD, LOOK_WORDS, type LabelLookup, type LinkRail, MACHINE_IDENTITY, MANUAL_SORT, MAX_ROW_HEIGHT, MIN_ROW_HEIGHT, type MainView, MyChecklistSteps, NEEDS_A_SENTENCE, NOT_ANSWERED_YET, NOT_DRAWN_HERE, NO_AGENT_PORT, 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_RULES_YET, NO_SAVED_VIEWS_REASON, NO_SHARE_REASON, NO_UPLOAD_REASON, NotifyRuleEditor, type NotifyRuleEditorProps, type NotifyRuleSpec, type OpenRecordsAsk, type OrganizationMember, PAGE_VIEWS, PAGE_VIEW_LABEL, PARITY_LABEL, PARITY_MADE_OF, PORTAL_NOT_HERE_LINE, PROPOSED_CHANGE_ACT_LABEL, PROPOSED_CHANGE_ACT_VALUES, type PageView, Peek, type PeekProps, type PendingCapture, PersonPicker, type PersonPickerProps, type PickableFieldType, PipelineBoard, type PipelineBoardProps, type PlainFieldType, type PlainRefusal, type PortalAnswer, PortalBuilder, type PortalBuilderProps, PortalCardView, type PortalCardViewProps, PortalLookEditor, type PortalLookEditorProps, PortalShell, type PortalShellProps, PortalsPanel, type PortalsPanelProps, type ProposalOutcome, ProposalRow, type ProposalRowProps, type ProposedChange, type ProposedChangeAct, ProvenanceBadge, PublicViewPage, type PublicViewPageProps, ROLLUP_AGG_LABEL, ROLLUP_AGG_VALUES, RULE_NOT_HERE_LINE, type ReaskContext, RecordChat, type RecordChatContext, type RecordChatEntry, type RecordChatProps, type RecordChatWithheld, RecordChip, RecordForm, type RecordFormProps, RecordLabelProvider, RecordValue, RecordsMount, type RecordsMountProps, type RecordsUiHost, RecordsUiProvider, ReferenceBuilder, type ReferenceBuilderProps, type ReferenceChoice, RefusalLine, RefusalNotice, type RelationFieldType, RelationPicker, type RelationPickerProps, type RenderTextSlot, type ResolveName, type RollupAgg, SAVED_VIEWS_UNAVAILABLE, SAY_WHAT_YOU_ARE_WAITING_FOR_AFTER_MS, SECTIONS_UNKNOWN, SERIES_COLORS, SHARE_NOT_YOURS_LINE, SOMEBODY, STAGE_RULE_ON_FAIL_LABEL, STORE_ANSWERS_THESE, STORE_DECIDES_REASON, SUBSCRIPTION_CADENCES, SUBSCRIPTION_CADENCE_LABEL, SUBSCRIPTION_CHANNEL_LABEL, SUBSCRIPTION_CHANNEL_VALUES, type SavedDashboard, type SavedForm, type SavedView, type SavedViewSpec, ShareControl, type ShareControlProps, type ShareSubject, type ShownViewReport, SignBlock, type SignBlockProps, type SnoozeChoice, type SortStateAction, SortStateControl, type SortStateControlProps, StageRulesSection, type StageRulesSectionProps, StepRow, type SubscriptionChannel, SubscriptionsPanel, type SubscriptionsPanelProps, type Surface, type SurfacePress, type SystemFieldSpec, type SystemTableSpec, TABLE_LANES, TABLE_MENU, TABLE_NOT_REACHABLE, THE_SYSTEM, type TableLane, type TableOpening, TablePage, type TablePageHeaderChrome, type TablePageProps, type TableRights, TableSettings, type TableSettingsProps, TableToolbarSlotContext, TablesHome, type TablesHomeProps, type TrackedVersion, type UseSystemTableState, VIEW_KEYS, VIEW_LAYOUTS, VIEW_NOT_SAVED_YET, VISIBILITY_LANES, VISIBILITY_LANE_TITLE, ViewBar, type ViewBarProps, type ViewKeyDeclaration, type ViewKeyLayout, type ViewKeyWriter, type ViewLayout, type ViewLook, type ViewSettings, type ViewSettingsPatch, type ViewSort, type ViewSortKey, ViewSwitcher, type ViewSwitcherProps, type VisibilityLane, WITHHELD_RECORD_LABEL, WITHHELD_WORD, WORK_APPROVAL_STATES, WORK_APPROVAL_STATE_LABEL, WORK_DUE_STATES, WORK_INBOX_KINDS, WORK_INBOX_KIND_GROUP_LABEL, WORK_INBOX_KIND_LABEL, type WhatYouMayDo, WhereItLives, type WhereItLivesProps, type WhoChanged, WhoChangedSource, WithheldValue, actorBadge, actorWords, applyLook, archiveConfirmSentence, archivedRowLine, asRefusal, askableFields, blockFromSpec, bodyForReading, bodyFromKeys, calendarDayLabel, calendarDayOf, cameFromLine, cardTitleField, cardWords, carriesTimeOfDay, cellState, chooseSurface, colorFromTheValue, columnForField, conditionInWords, conditionIsDrawable, conditionIsSimple, conditionValue, controlFor, currencyCodeFor, dashboardDeclareArgs, dashboardFromSummary, dateFormatFor, dateText, declareView, defaultViewOf, designatedLayoutOf, editorKindFor, ensureSystemTable, entityReferenceSpec, envelopeFor, fieldIsEditable, fieldName, fieldToken, fieldTypeChoice, fieldTypeLabel, footerOf, formDeclareArgs, formFromSummary, formPresentation, formatForField, gridContextKey, gridContextSnapshot, groupInbox, groupLabel, handOrderLine, handOrderSortState, hasTimePart, hintForAPerson, hintIsMachineIdentity, humanize, idsOf, isDateField, isEngineerText, isId, isMachineIdentity, isParityFieldType, isPlainFieldType, isRelationFieldType, isSignatureField, keepLook, keptByTheApp, keyFor, kindsWithNoChoice, laneFor, lastChangeSentence, lookDiffers, lookDocument, lookFromDocument, lookPart, looksLikeId, machineIdentityIn, mayNotRestoreLine, memberName, nextInWords, nextSummaryAt, openingRail, openingView, pageViewFromParam, parityTypesWithNoExplanation, parseGridPresentation, personActor, personRecordForMember, pointsAtRecords, presentationDocument, presentationIsEmpty, previewLine, previewWords, publiclyAnswerable, railFromParam, readLooks, recordName, recordNameIn, recordsDataSource, refusal, refusalForAPerson, refusalFromThrown, refusalLineForAPerson, refusalOr, renderValue, resolveTableStyle, revokeConsequence, rowName, rowNameIn, saveToViewPlan, saveViewPatch, scalarText, seedIsSatisfied, shareUnavailableReason, snoozeChoices, specFromBlock, storeDecidesRights, styleFromDecorations, submissionStamp, surfaceChosen, tableName, tableOpening, tableRightsAt, unknownRailLine, unknownViewLine, useCanShare, useEmbedHandshake, useEnrichCells, useGridEditing, useLabelWait, useMeasuredWidth, useMyChecklistSteps, useRecordLabels, useRecordRights, useRecordsUi, useRowRights, useSystemTable, useTableRights, useTableToolbarSlot, useViewRecords, useWhoChanged, viewDocument, viewFromRow, viewKeysFor, viewPatchDocument, viewSettings, viewSettingsFor, viewSettingsPatch, visibilityLaneFor, whatIsMissing, whatIsMissingForEntityReference, whatYouMayDo, whatYouMayDoWithTable, whenWords, whyNotAskable, withheldNoticeOf, withheldSentence };
package/dist/index.js CHANGED
@@ -5050,9 +5050,8 @@ function FieldEditor({ tableId, field: field2, onSaved, onCancel, onRemoved, cla
5050
5050
  onCancel ? /* @__PURE__ */ jsx21(Button9, { size: "sm", variant: "ghost", onClick: onCancel, children: "Cancel" }) : null,
5051
5051
  field2 ? /* @__PURE__ */ jsx21("div", { className: "ml-auto flex items-center gap-2", children: askingToRemove ? /* @__PURE__ */ jsxs16(Fragment6, { children: [
5052
5052
  /* @__PURE__ */ jsxs16("span", { className: "text-destructive", children: [
5053
- "Removing ",
5054
- fieldName(field2),
5055
- " takes it off every record of this table. The values stay in the record's history and nothing else is deleted."
5053
+ archiveConfirmSentence(`the field \u201C${fieldName(field2)}\u201D`),
5054
+ " Its values stay in every record and come back with it."
5056
5055
  ] }),
5057
5056
  /* @__PURE__ */ jsx21(Button9, { size: "sm", variant: "destructive", disabled: mutation.saving, onClick: () => void remove(), children: "Remove it" }),
5058
5057
  /* @__PURE__ */ jsx21(Button9, { size: "sm", variant: "ghost", onClick: () => setAskingToRemove(false), children: "Keep it" })
@@ -7048,6 +7047,8 @@ function addColumnColumn(onAdd) {
7048
7047
  sortable: false,
7049
7048
  filter: false,
7050
7049
  hideable: false,
7050
+ // A control, never a drag handle: no button inside the reorder button, and it stays last.
7051
+ reorderable: false,
7051
7052
  resizable: false,
7052
7053
  compact: true,
7053
7054
  width: 40
@@ -10430,6 +10431,7 @@ function Grid({
10430
10431
  const view = presentation.grouping;
10431
10432
  const field2 = view?.field ?? null;
10432
10433
  if (field2 === null && !onPresentationChange) return null;
10434
+ if (field2 === null && merged && phone) return null;
10433
10435
  const aggregates = view && Object.keys(view.aggregates ?? {}).length > 0 ? view.aggregates : field2 ? { [field2]: { kind: "count" } } : void 0;
10434
10436
  return {
10435
10437
  columnId: field2,
@@ -10460,7 +10462,7 @@ function Grid({
10460
10462
  }
10461
10463
  } : {}
10462
10464
  };
10463
- }, [presentation, onPresentationChange, writeLook]);
10465
+ }, [presentation, onPresentationChange, writeLook, merged, phone]);
10464
10466
  const labelOfField = useCallback15(
10465
10467
  (key) => {
10466
10468
  const held = (fields.data ?? []).find((f) => f.key === key);
@@ -10842,6 +10844,41 @@ function Grid({
10842
10844
  toolbar: {
10843
10845
  search: true,
10844
10846
  searchPlaceholder: "Search records",
10847
+ /*
10848
+ * A PHONE (tranche 6o): search and the one Tools button sit side by side at the START of
10849
+ * the row, so Tools is never scrolled out of reach; the search is the same query.
10850
+ */
10851
+ ...merged && phone ? {
10852
+ customSearch: /* @__PURE__ */ jsxs32("div", { className: "flex min-w-0 flex-1 items-center gap-1.5", "data-records-grid-phone-search": "", children: [
10853
+ /* @__PURE__ */ jsx39(
10854
+ "input",
10855
+ {
10856
+ type: "search",
10857
+ value: query.search,
10858
+ placeholder: "Search",
10859
+ "aria-label": "Search records",
10860
+ onChange: (event) => {
10861
+ const search = event.target.value;
10862
+ setQuery((held) => ({ ...held, search, page: 1 }));
10863
+ },
10864
+ className: "h-8 w-full min-w-0 rounded-md border border-input bg-background px-2 text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
10865
+ style: { fontSize: "16px" }
10866
+ }
10867
+ ),
10868
+ /* @__PURE__ */ jsx39(
10869
+ Button24,
10870
+ {
10871
+ size: "sm",
10872
+ variant: "outline",
10873
+ className: "h-8 shrink-0",
10874
+ "data-records-grid-tools": "",
10875
+ "aria-haspopup": "dialog",
10876
+ onClick: () => setToolsOpen(true),
10877
+ children: "Tools"
10878
+ }
10879
+ )
10880
+ ] })
10881
+ } : {},
10845
10882
  /* ONE ROW (lane TABLE-PAGE-CHROME): on a table page the grid's search, columns and
10846
10883
  sort are drawn INTO the page's toolbar row, never a second bar under it. */
10847
10884
  ...toolbarSlot !== void 0 ? { portalInto: toolbarSlot, singleRow: true } : {},
@@ -10892,32 +10929,18 @@ function Grid({
10892
10929
  )
10893
10930
  ] });
10894
10931
  if (!merged || !phone) return all;
10895
- return /* @__PURE__ */ jsxs32(Fragment15, { children: [
10896
- /* @__PURE__ */ jsx39(
10897
- Button24,
10898
- {
10899
- size: "sm",
10900
- variant: "outline",
10901
- className: "h-8 shrink-0",
10902
- "data-records-grid-tools": "",
10903
- "aria-haspopup": "dialog",
10904
- onClick: () => setToolsOpen(true),
10905
- children: "Tools"
10906
- }
10907
- ),
10908
- /* @__PURE__ */ jsx39(BottomSheet, { open: toolsOpen, onOpenChange: setToolsOpen, title: "Table tools", surface: "solid", children: /* @__PURE__ */ jsx39(
10909
- "div",
10910
- {
10911
- "data-records-grid-tools-sheet": "",
10912
- className: "flex flex-col items-stretch gap-1 px-3 pb-6 [&>button]:justify-start [&_button]:min-h-10",
10913
- onClickCapture: (event) => {
10914
- const target = event.target.closest("button");
10915
- if (target && !target.hasAttribute("aria-haspopup")) setToolsOpen(false);
10916
- },
10917
- children: all
10918
- }
10919
- ) })
10920
- ] });
10932
+ return /* @__PURE__ */ jsx39(Fragment15, { children: /* @__PURE__ */ jsx39(BottomSheet, { open: toolsOpen, onOpenChange: setToolsOpen, title: "Table tools", surface: "solid", children: /* @__PURE__ */ jsx39(
10933
+ "div",
10934
+ {
10935
+ "data-records-grid-tools-sheet": "",
10936
+ className: "flex flex-col items-stretch gap-1 px-3 pb-6 [&>button]:justify-start [&_button]:min-h-10",
10937
+ onClickCapture: (event) => {
10938
+ const target = event.target.closest("button");
10939
+ if (target && !target.hasAttribute("aria-haspopup")) setToolsOpen(false);
10940
+ },
10941
+ children: all
10942
+ }
10943
+ ) }) });
10921
10944
  })()
10922
10945
  }
10923
10946
  },
@@ -13535,9 +13558,8 @@ function TableSettings({
13535
13558
  shape.error ? /* @__PURE__ */ jsx48(RefusalNotice, { error: shape.error }) : null,
13536
13559
  askingToRemove ? /* @__PURE__ */ jsxs41("div", { className: "flex flex-wrap items-center gap-2 rounded border border-destructive/40 px-2 py-1.5", children: [
13537
13560
  /* @__PURE__ */ jsxs41("span", { className: "text-destructive", children: [
13538
- "Removing ",
13539
- fieldName(askingToRemove),
13540
- " takes it off every record of this table. The values stay in each record's history and nothing else is deleted."
13561
+ archiveConfirmSentence(`the field \u201C${fieldName(askingToRemove)}\u201D`),
13562
+ " Its values stay in every record and come back with it."
13541
13563
  ] }),
13542
13564
  /* @__PURE__ */ jsx48(
13543
13565
  Button32,
@@ -21286,6 +21308,7 @@ function NotifyRuleEditor({ tableId, seed, chosenRuleId, onChoose, className })
21286
21308
  const [views, setViews] = useState63(null);
21287
21309
  const [error, setError] = useState63(null);
21288
21310
  const [busy, setBusy] = useState63(false);
21311
+ const [stopping, setStopping] = useState63(null);
21289
21312
  const load = useCallback36(async () => {
21290
21313
  const [held, offered] = await Promise.all([
21291
21314
  // THE PERSON'S OWN DOOR, not the notifier's. It answers what is addressed
@@ -21382,6 +21405,7 @@ function NotifyRuleEditor({ tableId, seed, chosenRuleId, onChoose, className })
21382
21405
  await load();
21383
21406
  }
21384
21407
  async function unsubscribe(ruleId) {
21408
+ setStopping(null);
21385
21409
  setBusy(true);
21386
21410
  const deleted = await client.recordDelete({ record_id: ruleId });
21387
21411
  setBusy(false);
@@ -21443,14 +21467,18 @@ function NotifyRuleEditor({ tableId, seed, chosenRuleId, onChoose, className })
21443
21467
  children: "Use for this form"
21444
21468
  }
21445
21469
  ) : null,
21446
- rights.write && !(onChoose && held.rule_id === chosenRuleId) ? /* @__PURE__ */ jsx73(
21470
+ rights.write && !(onChoose && held.rule_id === chosenRuleId) && stopping === held.rule_id ? /* @__PURE__ */ jsxs66("span", { className: cn50("flex flex-wrap items-center gap-2", onChoose ? void 0 : "ml-auto"), children: [
21471
+ /* @__PURE__ */ jsx73("span", { className: "text-xs text-destructive", children: archiveConfirmSentence("this subscription") }),
21472
+ /* @__PURE__ */ jsx73(Button55, { size: "sm", variant: "destructive", disabled: busy, onClick: () => void unsubscribe(held.rule_id), children: "Stop telling me" }),
21473
+ /* @__PURE__ */ jsx73(Button55, { size: "sm", variant: "ghost", onClick: () => setStopping(null), children: "Keep it" })
21474
+ ] }) : rights.write && !(onChoose && held.rule_id === chosenRuleId) ? /* @__PURE__ */ jsx73(
21447
21475
  Button55,
21448
21476
  {
21449
21477
  size: "sm",
21450
21478
  variant: "ghost",
21451
21479
  className: onChoose ? void 0 : "ml-auto",
21452
21480
  disabled: busy,
21453
- onClick: () => void unsubscribe(held.rule_id),
21481
+ onClick: () => setStopping(held.rule_id),
21454
21482
  children: "Stop telling me"
21455
21483
  }
21456
21484
  ) : null
@@ -23217,6 +23245,7 @@ function DashboardCanvas({ tableId, activeDashboardId, filter, className }) {
23217
23245
  const [boards, setBoards] = useState69(null);
23218
23246
  const [error, setError] = useState69(null);
23219
23247
  const [activeId, setActiveId] = useState69(activeDashboardId ?? null);
23248
+ const [askingToRemove, setAskingToRemove] = useState69(null);
23220
23249
  const [run, setRun] = useState69(null);
23221
23250
  const [running, setRunning] = useState69(false);
23222
23251
  const [question, setQuestion] = useState69("");
@@ -23327,6 +23356,7 @@ function DashboardCanvas({ tableId, activeDashboardId, filter, className }) {
23327
23356
  else setError(again.error);
23328
23357
  }, [client, activeId, filter, grain]);
23329
23358
  async function remove(target) {
23359
+ setAskingToRemove(null);
23330
23360
  const gone = await client.dashboardDelete({ dashboard_id: target.id });
23331
23361
  if (!gone.ok) {
23332
23362
  setError(gone.error);
@@ -23415,7 +23445,11 @@ function DashboardCanvas({ tableId, activeDashboardId, filter, className }) {
23415
23445
  children: scheduling ? "Done" : "Send on a schedule"
23416
23446
  }
23417
23447
  ),
23418
- rights.admin ? /* @__PURE__ */ jsx80(Button60, { size: "sm", variant: "ghost", onClick: () => void remove(board), children: "Delete" }) : null
23448
+ rights.admin && askingToRemove === board.id ? /* @__PURE__ */ jsxs73(Fragment32, { children: [
23449
+ /* @__PURE__ */ jsx80("span", { className: "text-xs text-destructive", children: archiveConfirmSentence(`the dashboard \u201C${board.name}\u201D`) }),
23450
+ /* @__PURE__ */ jsx80(Button60, { size: "sm", variant: "destructive", onClick: () => void remove(board), children: "Remove it" }),
23451
+ /* @__PURE__ */ jsx80(Button60, { size: "sm", variant: "ghost", onClick: () => setAskingToRemove(null), children: "Keep it" })
23452
+ ] }) : rights.admin ? /* @__PURE__ */ jsx80(Button60, { size: "sm", variant: "ghost", onClick: () => setAskingToRemove(board.id), children: "Remove" }) : null
23419
23453
  ] }) : null
23420
23454
  ] }),
23421
23455
  board && scheduling ? (
@@ -26862,8 +26896,9 @@ function TablePage({
26862
26896
  name: table.data?.name,
26863
26897
  may: rights.share,
26864
26898
  initiallyOpen: shareFromLink || shareAsked > 0,
26865
- ...phone ? { key: `share-${shareAsked}`, className: "hidden" } : { key: "share" }
26866
- }
26899
+ ...phone ? { className: "hidden" } : {}
26900
+ },
26901
+ phone ? `share-${shareAsked}` : "share"
26867
26902
  ),
26868
26903
  /* @__PURE__ */ jsxs86(DropdownMenu4, { children: [
26869
26904
  /* @__PURE__ */ jsx94(DropdownMenuTrigger4, { asChild: true, children: /* @__PURE__ */ jsx94(Button72, { size: "sm", variant: "ghost", "aria-label": "Table menu", title: "Table menu", "data-table-menu": "", children: /* @__PURE__ */ jsxs86("svg", { viewBox: "0 0 24 24", className: "h-4 w-4", fill: "currentColor", "aria-hidden": "true", children: [
@@ -27528,6 +27563,8 @@ export {
27528
27563
  formFromSummary,
27529
27564
  formPresentation,
27530
27565
  formatForField,
27566
+ gridContextKey,
27567
+ gridContextSnapshot,
27531
27568
  groupInbox,
27532
27569
  groupLabel,
27533
27570
  handOrderLine,