@ai-matrx/records 0.58.19 → 0.58.21
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 +15 -0
- package/dist/react/index.cjs +50 -19
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +30 -1
- package/dist/react/index.d.ts +30 -1
- package/dist/react/index.js +50 -19
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
package/dist/react/index.d.cts
CHANGED
|
@@ -11949,6 +11949,35 @@ interface UseRecordsState extends Async<{
|
|
|
11949
11949
|
}
|
|
11950
11950
|
/** A page of records, realtime-aware when the host bound the port. */
|
|
11951
11951
|
declare function useRecords(tableId: Uuid | null, options?: UseRecordsOptions): UseRecordsState;
|
|
11952
|
+
interface UseRecordPageOptions {
|
|
11953
|
+
/** Rows per page. */
|
|
11954
|
+
pageSize?: number;
|
|
11955
|
+
/** Zero-based page. */
|
|
11956
|
+
page?: number;
|
|
11957
|
+
/** The store's one filter shape (flat or a Rule expression), compiled in the store's own query. */
|
|
11958
|
+
filter?: StoreFilter;
|
|
11959
|
+
/** Text searched by the store over every column this reader may see (and choice words). */
|
|
11960
|
+
search?: string | null;
|
|
11961
|
+
/** The order; empty = the store's own (or the view's hand order when `viewId` is named). */
|
|
11962
|
+
sort?: readonly RecordPageSort[];
|
|
11963
|
+
/** A hand-ordered view: the page follows the positions the view keeps. */
|
|
11964
|
+
viewId?: Uuid | null;
|
|
11965
|
+
}
|
|
11966
|
+
interface UseRecordPageState extends Async<{
|
|
11967
|
+
rows: ReadRow[];
|
|
11968
|
+
total: number | null;
|
|
11969
|
+
}> {
|
|
11970
|
+
live: boolean;
|
|
11971
|
+
liveReason: string;
|
|
11972
|
+
}
|
|
11973
|
+
/**
|
|
11974
|
+
* DOOR-SPEED. ONE PAGE THE STORE SORTED, SEARCHED, FILTERED AND COUNTED (`client.listPage` →
|
|
11975
|
+
* `custom.read_records_page`), realtime-aware exactly like `useRecords`: a notice re-reads only the
|
|
11976
|
+
* ids it names and patches them into this page. What a grid pages with — a row on page six of a
|
|
11977
|
+
* thousand is found by the store's search, a sort orders the whole table, and `total` is the
|
|
11978
|
+
* matching set this reader may see. `tableId: null` reads nothing.
|
|
11979
|
+
*/
|
|
11980
|
+
declare function useRecordPage(tableId: Uuid | null, options?: UseRecordPageOptions): UseRecordPageState;
|
|
11952
11981
|
/** One record, its values and (optionally) which Rule version computed each. */
|
|
11953
11982
|
/**
|
|
11954
11983
|
* HOW MANY TIMES THIS PAGE HAS WRITTEN THIS RECORD (lane RECORDS-UI-FIX, 2026-09-23).
|
|
@@ -12149,4 +12178,4 @@ declare function useEntityReferenceKinds(): EntityReferenceRead<EntityReferenceK
|
|
|
12149
12178
|
/** The words of each reference, read for THIS person (withheld where they may not open it). */
|
|
12150
12179
|
declare function useEntityReferenceWords(refs: readonly EntityRef[]): EntityReferenceRead<EntityRefWithWords[]>;
|
|
12151
12180
|
|
|
12152
|
-
export { ABSENCE_REASONS, ACTOR_VOCABULARY, ARCHIVE_LANES, ARCHIVE_LANE_LABEL, ARCHIVE_LANE_MEANS, type AbsenceReason, type ActionRefusal, type ActionRunResult, type Actor, type AggregateBucket, type AggregateCompare, type AggregateCompareKind, type AggregateCompareWindows, type AggregateDelta, type AggregateFilter, type AggregateMeasure, type AggregateOperation, type AggregateRow, type AggregateWindow, type AnonTokenBinding, type ArchiveLane, type ArchivedDoorRow, type ArchivedRow, type BookingAvailability, type BookingDeclared, type BookingSummary, type BookingWindow, COMPUTE_ON, CONTEXT_POLICIES, type CaptureField, type CaptureFileRef, type CaptureOutcome, type CaptureQuestion, type CaptureQueue, type CaptureQueueCounts, type CaptureQueueOptions, type CaptureQueuePorts, type CaptureQueueStore, type CaptureSheetFace, type CaptureSheetSummary, type CaptureSyncReport, type ChecklistDeclared, type ChecklistRequirement, type ChecklistRequirementKind, type ChecklistRoleSpec, type ChecklistRunStarted, type ChecklistRunStep, type ChecklistRunSummary, type ChecklistSpec, type ChecklistStepCompleted, type ChecklistStepSpec, type ChecklistTemplateShape, type ChecklistTemplateSummary, type ChecklistTrigger, type ChecklistTriggerKind, type ChoiceOption, type ChoiceOptions, type CoerceOptions, type Coerced, type CoercedAnswers, type CoercibleField, type CommentThreadRead, type CommentWritten, type ComputeOn, type ContextPolicy, type ConversationScope, type ConversationScopeContext, type CustomFieldTableType, DECLARABLE_FIELD_KINDS, DEFAULT_ARCHIVE_LANE, DEFAULT_PORTAL_ARCHIVE_FILTER, DELIVERIES, type DashboardBlock, type DashboardBlockKind, type DashboardBlockResult, type DashboardRunResult, type DashboardSummary, type DashboardTarget, type DashboardTargetBase, type DashboardTargetOp, type DashboardTargetResult, type DashboardTotals, type DeclarableFieldKind, type DecorationColor, type DecorationPath, type DecorationRule, type DecorationRuleOp, type DecorationTarget, type Delivery, type DigestPreview, type DocRenderRow, type DocSignatureCheck, type DocSignatureRow, type DocTemplateRow, type DocToken, type DocUnresolvedToken, ENTITY_TOKENS, type EnrichAlternate, type EnrichCell, type EnrichDeclared, type EnrichDueRow, type EnrichRun, type EnrichSource, type Enrichment, type EnrichmentSummary, type EntityFieldRights, type EntityFieldValue, type EntityRecordMatch, type EntityRecordRead, type EntityRecordsFound, type EntityRef, type EntityRefWithWords, type EntityReferenceKind, type EntityReferenceRead, type EntityTableFacts, type EntityToken, type ExampleBuilt, type ExampleSpec, type ExternalPrincipalCard, FIELD_KINDS, FIELD_SENSITIVITIES, FIELD_SOURCES, FRESHNESS, type Field, type FieldBehavior, type FieldHistoryEntry, type FieldKind, type FieldPatch, type FieldProposal, type FieldRule, type FieldSensitivity, type FieldSource, type FieldTypeWord, type ForbiddenEnvelopeWord, type FormSummary, type FormulaParse, type Freshness, type GridLayout, type GridLayoutMode, type GridRowHeight, type HiddenFieldNotice, type HistoryActor, type HistoryActorKind, type HistoryChange, type Home, type ImportBatchResult, type ImportColumnPlan, type ImportColumnsDeclared, type ImportFinished, type ImportOpened, type ImportOutcome, type ImportPlan, type ImportPolicy, type ImportProposal, type ImportReport, type ImportRun, type InboundAddress, type InboundDeclared, type InboxCounts, type InboxStateChange, type IoExportPage, KERNEL_TABLES, type KernelTableName, type KernelTargets, MERGE_FIELD_MODIFIERS, MERGE_FIELD_SEMANTIC_TYPES, MERGE_FIELD_SOURCES, type MergeField, type MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, type MergeFieldSemanticType, type MergeFieldSource, type MergeFieldTransform, type MissingBehavior, type MyLevel, type MySubscription, type NewEntityFieldDeclaration, type NewFieldDeclaration, ON_DELETE, OVERRIDE_POLICIES, type OnDelete, type OutsideShareAnswer, type OverridePolicy, PARITY_FIELD_TYPES, PERMISSION_LEVELS, PER_VALUE_ACCESS_WORDS, PIPELINE_RULE_KINDS, PORTAL_ACCENTS, PORTAL_ARCHIVE_FILTERS, type ParityFieldType, type ParityFieldTypeDescriptor, type PerValueAccessWord, type PermissionLevel, type PgError, type Pipeline, type PipelineColumn, type PipelineDeclared, type PipelineGate, type PipelineGatePreview, type PipelineMissingField, type PipelineMoveMany, type PipelineMoveManyItem, type PipelineMoveManyResult, type PipelineMoveResult, type PipelineMoveVerdict, type PipelineRule, type PipelineRuleKind, type PipelineSpec, type PipelineStage, type PipelineVerdict, type PortalAccent, type PortalArchiveAnswer, type PortalArchiveFilter, type PortalCard, type PortalConfig, type PortalConfigInput, type PortalFooterLink, type PortalFormAnswer, type PortalFormInput, type PortalFormRef, type PortalFormSpec, type PortalInvitation, type PortalPreviewRow, type PortalPrincipal, type PortalRevocation, type PortalStage, type PortalStyle, type PortalStyleInput, type PortalSummary, type PortalTableExposure, type PortalTableRef, type PredictedRefusal, type ProvenancePointer, type PublishBinding, type QueuedCapture, type QueuedCaptureFile, type QueuedCaptureState, type QuietHours, REFUSALS_WORTH_REPEATING, RELATION_BINDINGS, RELATION_CARDINALITIES, RELATION_FLAVORS, RETIRED_ACTOR_WORDS, RULE_NODE_KINDS, RULE_USES, type ReadRow, type ReadValue, type RecordChange, type RecordChangeAction, type RecordChangeResult, type RecordComment, type RecordDocument, type RecordEvent, type RecordFilter, type RecordGraphWritten, type RecordHeader, type RecordHistoryEntry, type RecordPage, type RecordPageSort, type RecordRead, type RecordRevision, type RecordScopeComment, type RecordScopeContext, type RecordScopeField, type RecordScopeHistoryEntry, type RecordScopeRelation, type RecordScopeWithheld, type RecordsActor, type RecordsChangeSink, type RecordsConfig, type RecordsDataSource, type RecordsError, type RecordsErrorCode, type RecordsErrorSink, type RecordsFilter, RecordsProvider, type RecordsProviderProps, type RecordsRealtimePort, type RecordsResolverPort, type RecordsResponse, type RecordsResult, type RecordsTableQuery, type RegisteredTable, type Relation, type RelationBinding, type RelationCardinality, type RelationCarries, type RelationCoordinate, type RelationDisplay, type RelationDisplaySpec, type RelationFlavor, type RelationProperties, type RelationStore, type RelationTarget, type RelationWordsManyArgs, type ResolutionTriple, type ResolvedPublishBinding, type RestorePreview, type RestoreResult, type RetiredActorWord, type RowAction, type RowActionStep, type Rule, type RuleAnswer, type RuleExpression, type RuleNodeKind, type RuleUse, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, STORAGE_MODES, STORE_DOORS, STORE_KNOBS, STORE_REFUSAL_CODES, type SavedViewRow, type SavedViewSpecIn, type StagePending, type StagePendingOnBoard, type StageRuleEnforcement, type StageRuleOnFail, type StageRuleWarning, type StaleWriteDetail, type StorageMode, type StoreDoorName, type StoreFilter, type StoreRefusalCode, type StoredRecord, type StuckRow, type Subscription, type SubscriptionBlock, type SubscriptionCadence, type SubscriptionSpec, TABLE_DISPLAYS, TABLE_ORIGINS, TABLE_TYPES, type Table, type TableArchiveProgress, type TableCapacity, type TableDecorations, type TableDisplay, type TableHome, type TableHomeDestination, type TableListEntry, type TableMoved, type TableOrigin, type TablePlacement, type TablePlacementFact, type TableProposal, type TableRowCount, type TableSyncResult, type TableSyncSource, type TableSyncSpec, type TableType, type TableWebhook, type TableWebhookDeclared, type Timestamp, type UseEntityFieldMutation, type UseFieldMutation, type UseRecordMutation, type UseRecordsOptions, type UseRecordsState, type UseTableArchive, type Uuid, VALUE_ALTERNATE_KEYS, VALUE_ENVELOPE_KEYS, type ValueAlternate, type ValueAlternateKey, type ValueEnvelope, type ValueEnvelopeKey, type ValueSource, type ViewLayout, type ViewOrderSet, type WorkApprovalDecision, type WorkApprovalFiled, type WorkApprovalState, type WorkApprover, type WorkAssignment, type WorkAssignmentField, type WorkChange, type WorkDecideMany, type WorkDecideManyItem, type WorkDecideManyResult, type WorkDecideVerdict, type WorkDueState, type WorkGraph, type WorkInboxItem, type WorkInboxKind, type WorkInboxView, type WorkInstantiation, type WorkListFlavour, type WorkListItem, type WorkOrigin, type WorkRecordState, type WorkSlotHold, type WorkState, type WorkTemplateNode, type WorkTemplateRelation, type WorkTurn, type WriteConflict, actionRefusals, allowsOtherValues, archivedByLine, archivedWhen, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, coerceTypedAnswer, coerceTypedAnswers, coercionLabel, emptyArchiveLine, emptyPortalArchiveLine, entityReferenceKinds, entityReferenceKindsOf, entityReferenceWords, entityRefsOf, entityRefsToWrite, err, exampleSpec, exportPageXlsx, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isArchiveLane, isDecided, isEntityReferenceConfig, isOwnOp, isPortalAccent, isPortalArchiveFilter, isRecordsErr, isRuleFilter, isTheChosen, keptGroups, keptOutOfSight, keptTableHref, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, moveConsequence, moveInOrder, offeredAsContext, ok, openCaptureQueue, optionKey, optionLabel, parseTableHome, parseTableMoved, portalArchiveConsequence, portalConfirmLine, portalPath, portalTitleTypedBack, publicFormPath, recordChangeTrigger, recordSourceKey, recordSourceTable, rememberedOpCount, sameDocument, scopeChip, sheetSyncSpec, stableFilterKey, tableShapeChanged, useEntityFieldMutation, useEntityFieldRights, useEntityFields, useEntityRecord, useEntityReferenceKinds, useEntityReferenceWords, useEntityTable, useFieldMutation, useFields, useMergeField, useMyLevel, useMyLevels, useOptionalRecordsClient, useRecord, useRecordChangeRevision, useRecordMutation, useRecords, useRecordsActor, useRecordsClient, useTable, useTableArchive, useTables, withRowCounts, withTablePlacement };
|
|
12181
|
+
export { ABSENCE_REASONS, ACTOR_VOCABULARY, ARCHIVE_LANES, ARCHIVE_LANE_LABEL, ARCHIVE_LANE_MEANS, type AbsenceReason, type ActionRefusal, type ActionRunResult, type Actor, type AggregateBucket, type AggregateCompare, type AggregateCompareKind, type AggregateCompareWindows, type AggregateDelta, type AggregateFilter, type AggregateMeasure, type AggregateOperation, type AggregateRow, type AggregateWindow, type AnonTokenBinding, type ArchiveLane, type ArchivedDoorRow, type ArchivedRow, type BookingAvailability, type BookingDeclared, type BookingSummary, type BookingWindow, COMPUTE_ON, CONTEXT_POLICIES, type CaptureField, type CaptureFileRef, type CaptureOutcome, type CaptureQuestion, type CaptureQueue, type CaptureQueueCounts, type CaptureQueueOptions, type CaptureQueuePorts, type CaptureQueueStore, type CaptureSheetFace, type CaptureSheetSummary, type CaptureSyncReport, type ChecklistDeclared, type ChecklistRequirement, type ChecklistRequirementKind, type ChecklistRoleSpec, type ChecklistRunStarted, type ChecklistRunStep, type ChecklistRunSummary, type ChecklistSpec, type ChecklistStepCompleted, type ChecklistStepSpec, type ChecklistTemplateShape, type ChecklistTemplateSummary, type ChecklistTrigger, type ChecklistTriggerKind, type ChoiceOption, type ChoiceOptions, type CoerceOptions, type Coerced, type CoercedAnswers, type CoercibleField, type CommentThreadRead, type CommentWritten, type ComputeOn, type ContextPolicy, type ConversationScope, type ConversationScopeContext, type CustomFieldTableType, DECLARABLE_FIELD_KINDS, DEFAULT_ARCHIVE_LANE, DEFAULT_PORTAL_ARCHIVE_FILTER, DELIVERIES, type DashboardBlock, type DashboardBlockKind, type DashboardBlockResult, type DashboardRunResult, type DashboardSummary, type DashboardTarget, type DashboardTargetBase, type DashboardTargetOp, type DashboardTargetResult, type DashboardTotals, type DeclarableFieldKind, type DecorationColor, type DecorationPath, type DecorationRule, type DecorationRuleOp, type DecorationTarget, type Delivery, type DigestPreview, type DocRenderRow, type DocSignatureCheck, type DocSignatureRow, type DocTemplateRow, type DocToken, type DocUnresolvedToken, ENTITY_TOKENS, type EnrichAlternate, type EnrichCell, type EnrichDeclared, type EnrichDueRow, type EnrichRun, type EnrichSource, type Enrichment, type EnrichmentSummary, type EntityFieldRights, type EntityFieldValue, type EntityRecordMatch, type EntityRecordRead, type EntityRecordsFound, type EntityRef, type EntityRefWithWords, type EntityReferenceKind, type EntityReferenceRead, type EntityTableFacts, type EntityToken, type ExampleBuilt, type ExampleSpec, type ExternalPrincipalCard, FIELD_KINDS, FIELD_SENSITIVITIES, FIELD_SOURCES, FRESHNESS, type Field, type FieldBehavior, type FieldHistoryEntry, type FieldKind, type FieldPatch, type FieldProposal, type FieldRule, type FieldSensitivity, type FieldSource, type FieldTypeWord, type ForbiddenEnvelopeWord, type FormSummary, type FormulaParse, type Freshness, type GridLayout, type GridLayoutMode, type GridRowHeight, type HiddenFieldNotice, type HistoryActor, type HistoryActorKind, type HistoryChange, type Home, type ImportBatchResult, type ImportColumnPlan, type ImportColumnsDeclared, type ImportFinished, type ImportOpened, type ImportOutcome, type ImportPlan, type ImportPolicy, type ImportProposal, type ImportReport, type ImportRun, type InboundAddress, type InboundDeclared, type InboxCounts, type InboxStateChange, type IoExportPage, KERNEL_TABLES, type KernelTableName, type KernelTargets, MERGE_FIELD_MODIFIERS, MERGE_FIELD_SEMANTIC_TYPES, MERGE_FIELD_SOURCES, type MergeField, type MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, type MergeFieldSemanticType, type MergeFieldSource, type MergeFieldTransform, type MissingBehavior, type MyLevel, type MySubscription, type NewEntityFieldDeclaration, type NewFieldDeclaration, ON_DELETE, OVERRIDE_POLICIES, type OnDelete, type OutsideShareAnswer, type OverridePolicy, PARITY_FIELD_TYPES, PERMISSION_LEVELS, PER_VALUE_ACCESS_WORDS, PIPELINE_RULE_KINDS, PORTAL_ACCENTS, PORTAL_ARCHIVE_FILTERS, type ParityFieldType, type ParityFieldTypeDescriptor, type PerValueAccessWord, type PermissionLevel, type PgError, type Pipeline, type PipelineColumn, type PipelineDeclared, type PipelineGate, type PipelineGatePreview, type PipelineMissingField, type PipelineMoveMany, type PipelineMoveManyItem, type PipelineMoveManyResult, type PipelineMoveResult, type PipelineMoveVerdict, type PipelineRule, type PipelineRuleKind, type PipelineSpec, type PipelineStage, type PipelineVerdict, type PortalAccent, type PortalArchiveAnswer, type PortalArchiveFilter, type PortalCard, type PortalConfig, type PortalConfigInput, type PortalFooterLink, type PortalFormAnswer, type PortalFormInput, type PortalFormRef, type PortalFormSpec, type PortalInvitation, type PortalPreviewRow, type PortalPrincipal, type PortalRevocation, type PortalStage, type PortalStyle, type PortalStyleInput, type PortalSummary, type PortalTableExposure, type PortalTableRef, type PredictedRefusal, type ProvenancePointer, type PublishBinding, type QueuedCapture, type QueuedCaptureFile, type QueuedCaptureState, type QuietHours, REFUSALS_WORTH_REPEATING, RELATION_BINDINGS, RELATION_CARDINALITIES, RELATION_FLAVORS, RETIRED_ACTOR_WORDS, RULE_NODE_KINDS, RULE_USES, type ReadRow, type ReadValue, type RecordChange, type RecordChangeAction, type RecordChangeResult, type RecordComment, type RecordDocument, type RecordEvent, type RecordFilter, type RecordGraphWritten, type RecordHeader, type RecordHistoryEntry, type RecordPage, type RecordPageSort, type RecordRead, type RecordRevision, type RecordScopeComment, type RecordScopeContext, type RecordScopeField, type RecordScopeHistoryEntry, type RecordScopeRelation, type RecordScopeWithheld, type RecordsActor, type RecordsChangeSink, type RecordsConfig, type RecordsDataSource, type RecordsError, type RecordsErrorCode, type RecordsErrorSink, type RecordsFilter, RecordsProvider, type RecordsProviderProps, type RecordsRealtimePort, type RecordsResolverPort, type RecordsResponse, type RecordsResult, type RecordsTableQuery, type RegisteredTable, type Relation, type RelationBinding, type RelationCardinality, type RelationCarries, type RelationCoordinate, type RelationDisplay, type RelationDisplaySpec, type RelationFlavor, type RelationProperties, type RelationStore, type RelationTarget, type RelationWordsManyArgs, type ResolutionTriple, type ResolvedPublishBinding, type RestorePreview, type RestoreResult, type RetiredActorWord, type RowAction, type RowActionStep, type Rule, type RuleAnswer, type RuleExpression, type RuleNodeKind, type RuleUse, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, STORAGE_MODES, STORE_DOORS, STORE_KNOBS, STORE_REFUSAL_CODES, type SavedViewRow, type SavedViewSpecIn, type StagePending, type StagePendingOnBoard, type StageRuleEnforcement, type StageRuleOnFail, type StageRuleWarning, type StaleWriteDetail, type StorageMode, type StoreDoorName, type StoreFilter, type StoreRefusalCode, type StoredRecord, type StuckRow, type Subscription, type SubscriptionBlock, type SubscriptionCadence, type SubscriptionSpec, TABLE_DISPLAYS, TABLE_ORIGINS, TABLE_TYPES, type Table, type TableArchiveProgress, type TableCapacity, type TableDecorations, type TableDisplay, type TableHome, type TableHomeDestination, type TableListEntry, type TableMoved, type TableOrigin, type TablePlacement, type TablePlacementFact, type TableProposal, type TableRowCount, type TableSyncResult, type TableSyncSource, type TableSyncSpec, type TableType, type TableWebhook, type TableWebhookDeclared, type Timestamp, type UseEntityFieldMutation, type UseFieldMutation, type UseRecordMutation, type UseRecordPageOptions, type UseRecordPageState, type UseRecordsOptions, type UseRecordsState, type UseTableArchive, type Uuid, VALUE_ALTERNATE_KEYS, VALUE_ENVELOPE_KEYS, type ValueAlternate, type ValueAlternateKey, type ValueEnvelope, type ValueEnvelopeKey, type ValueSource, type ViewLayout, type ViewOrderSet, type WorkApprovalDecision, type WorkApprovalFiled, type WorkApprovalState, type WorkApprover, type WorkAssignment, type WorkAssignmentField, type WorkChange, type WorkDecideMany, type WorkDecideManyItem, type WorkDecideManyResult, type WorkDecideVerdict, type WorkDueState, type WorkGraph, type WorkInboxItem, type WorkInboxKind, type WorkInboxView, type WorkInstantiation, type WorkListFlavour, type WorkListItem, type WorkOrigin, type WorkRecordState, type WorkSlotHold, type WorkState, type WorkTemplateNode, type WorkTemplateRelation, type WorkTurn, type WriteConflict, actionRefusals, allowsOtherValues, archivedByLine, archivedWhen, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, coerceTypedAnswer, coerceTypedAnswers, coercionLabel, emptyArchiveLine, emptyPortalArchiveLine, entityReferenceKinds, entityReferenceKindsOf, entityReferenceWords, entityRefsOf, entityRefsToWrite, err, exampleSpec, exportPageXlsx, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isArchiveLane, isDecided, isEntityReferenceConfig, isOwnOp, isPortalAccent, isPortalArchiveFilter, isRecordsErr, isRuleFilter, isTheChosen, keptGroups, keptOutOfSight, keptTableHref, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, moveConsequence, moveInOrder, offeredAsContext, ok, openCaptureQueue, optionKey, optionLabel, parseTableHome, parseTableMoved, portalArchiveConsequence, portalConfirmLine, portalPath, portalTitleTypedBack, publicFormPath, recordChangeTrigger, recordSourceKey, recordSourceTable, rememberedOpCount, sameDocument, scopeChip, sheetSyncSpec, stableFilterKey, tableShapeChanged, useEntityFieldMutation, useEntityFieldRights, useEntityFields, useEntityRecord, useEntityReferenceKinds, useEntityReferenceWords, useEntityTable, useFieldMutation, useFields, useMergeField, useMyLevel, useMyLevels, useOptionalRecordsClient, useRecord, useRecordChangeRevision, useRecordMutation, useRecordPage, useRecords, useRecordsActor, useRecordsClient, useTable, useTableArchive, useTables, withRowCounts, withTablePlacement };
|
package/dist/react/index.d.ts
CHANGED
|
@@ -11949,6 +11949,35 @@ interface UseRecordsState extends Async<{
|
|
|
11949
11949
|
}
|
|
11950
11950
|
/** A page of records, realtime-aware when the host bound the port. */
|
|
11951
11951
|
declare function useRecords(tableId: Uuid | null, options?: UseRecordsOptions): UseRecordsState;
|
|
11952
|
+
interface UseRecordPageOptions {
|
|
11953
|
+
/** Rows per page. */
|
|
11954
|
+
pageSize?: number;
|
|
11955
|
+
/** Zero-based page. */
|
|
11956
|
+
page?: number;
|
|
11957
|
+
/** The store's one filter shape (flat or a Rule expression), compiled in the store's own query. */
|
|
11958
|
+
filter?: StoreFilter;
|
|
11959
|
+
/** Text searched by the store over every column this reader may see (and choice words). */
|
|
11960
|
+
search?: string | null;
|
|
11961
|
+
/** The order; empty = the store's own (or the view's hand order when `viewId` is named). */
|
|
11962
|
+
sort?: readonly RecordPageSort[];
|
|
11963
|
+
/** A hand-ordered view: the page follows the positions the view keeps. */
|
|
11964
|
+
viewId?: Uuid | null;
|
|
11965
|
+
}
|
|
11966
|
+
interface UseRecordPageState extends Async<{
|
|
11967
|
+
rows: ReadRow[];
|
|
11968
|
+
total: number | null;
|
|
11969
|
+
}> {
|
|
11970
|
+
live: boolean;
|
|
11971
|
+
liveReason: string;
|
|
11972
|
+
}
|
|
11973
|
+
/**
|
|
11974
|
+
* DOOR-SPEED. ONE PAGE THE STORE SORTED, SEARCHED, FILTERED AND COUNTED (`client.listPage` →
|
|
11975
|
+
* `custom.read_records_page`), realtime-aware exactly like `useRecords`: a notice re-reads only the
|
|
11976
|
+
* ids it names and patches them into this page. What a grid pages with — a row on page six of a
|
|
11977
|
+
* thousand is found by the store's search, a sort orders the whole table, and `total` is the
|
|
11978
|
+
* matching set this reader may see. `tableId: null` reads nothing.
|
|
11979
|
+
*/
|
|
11980
|
+
declare function useRecordPage(tableId: Uuid | null, options?: UseRecordPageOptions): UseRecordPageState;
|
|
11952
11981
|
/** One record, its values and (optionally) which Rule version computed each. */
|
|
11953
11982
|
/**
|
|
11954
11983
|
* HOW MANY TIMES THIS PAGE HAS WRITTEN THIS RECORD (lane RECORDS-UI-FIX, 2026-09-23).
|
|
@@ -12149,4 +12178,4 @@ declare function useEntityReferenceKinds(): EntityReferenceRead<EntityReferenceK
|
|
|
12149
12178
|
/** The words of each reference, read for THIS person (withheld where they may not open it). */
|
|
12150
12179
|
declare function useEntityReferenceWords(refs: readonly EntityRef[]): EntityReferenceRead<EntityRefWithWords[]>;
|
|
12151
12180
|
|
|
12152
|
-
export { ABSENCE_REASONS, ACTOR_VOCABULARY, ARCHIVE_LANES, ARCHIVE_LANE_LABEL, ARCHIVE_LANE_MEANS, type AbsenceReason, type ActionRefusal, type ActionRunResult, type Actor, type AggregateBucket, type AggregateCompare, type AggregateCompareKind, type AggregateCompareWindows, type AggregateDelta, type AggregateFilter, type AggregateMeasure, type AggregateOperation, type AggregateRow, type AggregateWindow, type AnonTokenBinding, type ArchiveLane, type ArchivedDoorRow, type ArchivedRow, type BookingAvailability, type BookingDeclared, type BookingSummary, type BookingWindow, COMPUTE_ON, CONTEXT_POLICIES, type CaptureField, type CaptureFileRef, type CaptureOutcome, type CaptureQuestion, type CaptureQueue, type CaptureQueueCounts, type CaptureQueueOptions, type CaptureQueuePorts, type CaptureQueueStore, type CaptureSheetFace, type CaptureSheetSummary, type CaptureSyncReport, type ChecklistDeclared, type ChecklistRequirement, type ChecklistRequirementKind, type ChecklistRoleSpec, type ChecklistRunStarted, type ChecklistRunStep, type ChecklistRunSummary, type ChecklistSpec, type ChecklistStepCompleted, type ChecklistStepSpec, type ChecklistTemplateShape, type ChecklistTemplateSummary, type ChecklistTrigger, type ChecklistTriggerKind, type ChoiceOption, type ChoiceOptions, type CoerceOptions, type Coerced, type CoercedAnswers, type CoercibleField, type CommentThreadRead, type CommentWritten, type ComputeOn, type ContextPolicy, type ConversationScope, type ConversationScopeContext, type CustomFieldTableType, DECLARABLE_FIELD_KINDS, DEFAULT_ARCHIVE_LANE, DEFAULT_PORTAL_ARCHIVE_FILTER, DELIVERIES, type DashboardBlock, type DashboardBlockKind, type DashboardBlockResult, type DashboardRunResult, type DashboardSummary, type DashboardTarget, type DashboardTargetBase, type DashboardTargetOp, type DashboardTargetResult, type DashboardTotals, type DeclarableFieldKind, type DecorationColor, type DecorationPath, type DecorationRule, type DecorationRuleOp, type DecorationTarget, type Delivery, type DigestPreview, type DocRenderRow, type DocSignatureCheck, type DocSignatureRow, type DocTemplateRow, type DocToken, type DocUnresolvedToken, ENTITY_TOKENS, type EnrichAlternate, type EnrichCell, type EnrichDeclared, type EnrichDueRow, type EnrichRun, type EnrichSource, type Enrichment, type EnrichmentSummary, type EntityFieldRights, type EntityFieldValue, type EntityRecordMatch, type EntityRecordRead, type EntityRecordsFound, type EntityRef, type EntityRefWithWords, type EntityReferenceKind, type EntityReferenceRead, type EntityTableFacts, type EntityToken, type ExampleBuilt, type ExampleSpec, type ExternalPrincipalCard, FIELD_KINDS, FIELD_SENSITIVITIES, FIELD_SOURCES, FRESHNESS, type Field, type FieldBehavior, type FieldHistoryEntry, type FieldKind, type FieldPatch, type FieldProposal, type FieldRule, type FieldSensitivity, type FieldSource, type FieldTypeWord, type ForbiddenEnvelopeWord, type FormSummary, type FormulaParse, type Freshness, type GridLayout, type GridLayoutMode, type GridRowHeight, type HiddenFieldNotice, type HistoryActor, type HistoryActorKind, type HistoryChange, type Home, type ImportBatchResult, type ImportColumnPlan, type ImportColumnsDeclared, type ImportFinished, type ImportOpened, type ImportOutcome, type ImportPlan, type ImportPolicy, type ImportProposal, type ImportReport, type ImportRun, type InboundAddress, type InboundDeclared, type InboxCounts, type InboxStateChange, type IoExportPage, KERNEL_TABLES, type KernelTableName, type KernelTargets, MERGE_FIELD_MODIFIERS, MERGE_FIELD_SEMANTIC_TYPES, MERGE_FIELD_SOURCES, type MergeField, type MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, type MergeFieldSemanticType, type MergeFieldSource, type MergeFieldTransform, type MissingBehavior, type MyLevel, type MySubscription, type NewEntityFieldDeclaration, type NewFieldDeclaration, ON_DELETE, OVERRIDE_POLICIES, type OnDelete, type OutsideShareAnswer, type OverridePolicy, PARITY_FIELD_TYPES, PERMISSION_LEVELS, PER_VALUE_ACCESS_WORDS, PIPELINE_RULE_KINDS, PORTAL_ACCENTS, PORTAL_ARCHIVE_FILTERS, type ParityFieldType, type ParityFieldTypeDescriptor, type PerValueAccessWord, type PermissionLevel, type PgError, type Pipeline, type PipelineColumn, type PipelineDeclared, type PipelineGate, type PipelineGatePreview, type PipelineMissingField, type PipelineMoveMany, type PipelineMoveManyItem, type PipelineMoveManyResult, type PipelineMoveResult, type PipelineMoveVerdict, type PipelineRule, type PipelineRuleKind, type PipelineSpec, type PipelineStage, type PipelineVerdict, type PortalAccent, type PortalArchiveAnswer, type PortalArchiveFilter, type PortalCard, type PortalConfig, type PortalConfigInput, type PortalFooterLink, type PortalFormAnswer, type PortalFormInput, type PortalFormRef, type PortalFormSpec, type PortalInvitation, type PortalPreviewRow, type PortalPrincipal, type PortalRevocation, type PortalStage, type PortalStyle, type PortalStyleInput, type PortalSummary, type PortalTableExposure, type PortalTableRef, type PredictedRefusal, type ProvenancePointer, type PublishBinding, type QueuedCapture, type QueuedCaptureFile, type QueuedCaptureState, type QuietHours, REFUSALS_WORTH_REPEATING, RELATION_BINDINGS, RELATION_CARDINALITIES, RELATION_FLAVORS, RETIRED_ACTOR_WORDS, RULE_NODE_KINDS, RULE_USES, type ReadRow, type ReadValue, type RecordChange, type RecordChangeAction, type RecordChangeResult, type RecordComment, type RecordDocument, type RecordEvent, type RecordFilter, type RecordGraphWritten, type RecordHeader, type RecordHistoryEntry, type RecordPage, type RecordPageSort, type RecordRead, type RecordRevision, type RecordScopeComment, type RecordScopeContext, type RecordScopeField, type RecordScopeHistoryEntry, type RecordScopeRelation, type RecordScopeWithheld, type RecordsActor, type RecordsChangeSink, type RecordsConfig, type RecordsDataSource, type RecordsError, type RecordsErrorCode, type RecordsErrorSink, type RecordsFilter, RecordsProvider, type RecordsProviderProps, type RecordsRealtimePort, type RecordsResolverPort, type RecordsResponse, type RecordsResult, type RecordsTableQuery, type RegisteredTable, type Relation, type RelationBinding, type RelationCardinality, type RelationCarries, type RelationCoordinate, type RelationDisplay, type RelationDisplaySpec, type RelationFlavor, type RelationProperties, type RelationStore, type RelationTarget, type RelationWordsManyArgs, type ResolutionTriple, type ResolvedPublishBinding, type RestorePreview, type RestoreResult, type RetiredActorWord, type RowAction, type RowActionStep, type Rule, type RuleAnswer, type RuleExpression, type RuleNodeKind, type RuleUse, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, STORAGE_MODES, STORE_DOORS, STORE_KNOBS, STORE_REFUSAL_CODES, type SavedViewRow, type SavedViewSpecIn, type StagePending, type StagePendingOnBoard, type StageRuleEnforcement, type StageRuleOnFail, type StageRuleWarning, type StaleWriteDetail, type StorageMode, type StoreDoorName, type StoreFilter, type StoreRefusalCode, type StoredRecord, type StuckRow, type Subscription, type SubscriptionBlock, type SubscriptionCadence, type SubscriptionSpec, TABLE_DISPLAYS, TABLE_ORIGINS, TABLE_TYPES, type Table, type TableArchiveProgress, type TableCapacity, type TableDecorations, type TableDisplay, type TableHome, type TableHomeDestination, type TableListEntry, type TableMoved, type TableOrigin, type TablePlacement, type TablePlacementFact, type TableProposal, type TableRowCount, type TableSyncResult, type TableSyncSource, type TableSyncSpec, type TableType, type TableWebhook, type TableWebhookDeclared, type Timestamp, type UseEntityFieldMutation, type UseFieldMutation, type UseRecordMutation, type UseRecordsOptions, type UseRecordsState, type UseTableArchive, type Uuid, VALUE_ALTERNATE_KEYS, VALUE_ENVELOPE_KEYS, type ValueAlternate, type ValueAlternateKey, type ValueEnvelope, type ValueEnvelopeKey, type ValueSource, type ViewLayout, type ViewOrderSet, type WorkApprovalDecision, type WorkApprovalFiled, type WorkApprovalState, type WorkApprover, type WorkAssignment, type WorkAssignmentField, type WorkChange, type WorkDecideMany, type WorkDecideManyItem, type WorkDecideManyResult, type WorkDecideVerdict, type WorkDueState, type WorkGraph, type WorkInboxItem, type WorkInboxKind, type WorkInboxView, type WorkInstantiation, type WorkListFlavour, type WorkListItem, type WorkOrigin, type WorkRecordState, type WorkSlotHold, type WorkState, type WorkTemplateNode, type WorkTemplateRelation, type WorkTurn, type WriteConflict, actionRefusals, allowsOtherValues, archivedByLine, archivedWhen, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, coerceTypedAnswer, coerceTypedAnswers, coercionLabel, emptyArchiveLine, emptyPortalArchiveLine, entityReferenceKinds, entityReferenceKindsOf, entityReferenceWords, entityRefsOf, entityRefsToWrite, err, exampleSpec, exportPageXlsx, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isArchiveLane, isDecided, isEntityReferenceConfig, isOwnOp, isPortalAccent, isPortalArchiveFilter, isRecordsErr, isRuleFilter, isTheChosen, keptGroups, keptOutOfSight, keptTableHref, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, moveConsequence, moveInOrder, offeredAsContext, ok, openCaptureQueue, optionKey, optionLabel, parseTableHome, parseTableMoved, portalArchiveConsequence, portalConfirmLine, portalPath, portalTitleTypedBack, publicFormPath, recordChangeTrigger, recordSourceKey, recordSourceTable, rememberedOpCount, sameDocument, scopeChip, sheetSyncSpec, stableFilterKey, tableShapeChanged, useEntityFieldMutation, useEntityFieldRights, useEntityFields, useEntityRecord, useEntityReferenceKinds, useEntityReferenceWords, useEntityTable, useFieldMutation, useFields, useMergeField, useMyLevel, useMyLevels, useOptionalRecordsClient, useRecord, useRecordChangeRevision, useRecordMutation, useRecords, useRecordsActor, useRecordsClient, useTable, useTableArchive, useTables, withRowCounts, withTablePlacement };
|
|
12181
|
+
export { ABSENCE_REASONS, ACTOR_VOCABULARY, ARCHIVE_LANES, ARCHIVE_LANE_LABEL, ARCHIVE_LANE_MEANS, type AbsenceReason, type ActionRefusal, type ActionRunResult, type Actor, type AggregateBucket, type AggregateCompare, type AggregateCompareKind, type AggregateCompareWindows, type AggregateDelta, type AggregateFilter, type AggregateMeasure, type AggregateOperation, type AggregateRow, type AggregateWindow, type AnonTokenBinding, type ArchiveLane, type ArchivedDoorRow, type ArchivedRow, type BookingAvailability, type BookingDeclared, type BookingSummary, type BookingWindow, COMPUTE_ON, CONTEXT_POLICIES, type CaptureField, type CaptureFileRef, type CaptureOutcome, type CaptureQuestion, type CaptureQueue, type CaptureQueueCounts, type CaptureQueueOptions, type CaptureQueuePorts, type CaptureQueueStore, type CaptureSheetFace, type CaptureSheetSummary, type CaptureSyncReport, type ChecklistDeclared, type ChecklistRequirement, type ChecklistRequirementKind, type ChecklistRoleSpec, type ChecklistRunStarted, type ChecklistRunStep, type ChecklistRunSummary, type ChecklistSpec, type ChecklistStepCompleted, type ChecklistStepSpec, type ChecklistTemplateShape, type ChecklistTemplateSummary, type ChecklistTrigger, type ChecklistTriggerKind, type ChoiceOption, type ChoiceOptions, type CoerceOptions, type Coerced, type CoercedAnswers, type CoercibleField, type CommentThreadRead, type CommentWritten, type ComputeOn, type ContextPolicy, type ConversationScope, type ConversationScopeContext, type CustomFieldTableType, DECLARABLE_FIELD_KINDS, DEFAULT_ARCHIVE_LANE, DEFAULT_PORTAL_ARCHIVE_FILTER, DELIVERIES, type DashboardBlock, type DashboardBlockKind, type DashboardBlockResult, type DashboardRunResult, type DashboardSummary, type DashboardTarget, type DashboardTargetBase, type DashboardTargetOp, type DashboardTargetResult, type DashboardTotals, type DeclarableFieldKind, type DecorationColor, type DecorationPath, type DecorationRule, type DecorationRuleOp, type DecorationTarget, type Delivery, type DigestPreview, type DocRenderRow, type DocSignatureCheck, type DocSignatureRow, type DocTemplateRow, type DocToken, type DocUnresolvedToken, ENTITY_TOKENS, type EnrichAlternate, type EnrichCell, type EnrichDeclared, type EnrichDueRow, type EnrichRun, type EnrichSource, type Enrichment, type EnrichmentSummary, type EntityFieldRights, type EntityFieldValue, type EntityRecordMatch, type EntityRecordRead, type EntityRecordsFound, type EntityRef, type EntityRefWithWords, type EntityReferenceKind, type EntityReferenceRead, type EntityTableFacts, type EntityToken, type ExampleBuilt, type ExampleSpec, type ExternalPrincipalCard, FIELD_KINDS, FIELD_SENSITIVITIES, FIELD_SOURCES, FRESHNESS, type Field, type FieldBehavior, type FieldHistoryEntry, type FieldKind, type FieldPatch, type FieldProposal, type FieldRule, type FieldSensitivity, type FieldSource, type FieldTypeWord, type ForbiddenEnvelopeWord, type FormSummary, type FormulaParse, type Freshness, type GridLayout, type GridLayoutMode, type GridRowHeight, type HiddenFieldNotice, type HistoryActor, type HistoryActorKind, type HistoryChange, type Home, type ImportBatchResult, type ImportColumnPlan, type ImportColumnsDeclared, type ImportFinished, type ImportOpened, type ImportOutcome, type ImportPlan, type ImportPolicy, type ImportProposal, type ImportReport, type ImportRun, type InboundAddress, type InboundDeclared, type InboxCounts, type InboxStateChange, type IoExportPage, KERNEL_TABLES, type KernelTableName, type KernelTargets, MERGE_FIELD_MODIFIERS, MERGE_FIELD_SEMANTIC_TYPES, MERGE_FIELD_SOURCES, type MergeField, type MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, type MergeFieldSemanticType, type MergeFieldSource, type MergeFieldTransform, type MissingBehavior, type MyLevel, type MySubscription, type NewEntityFieldDeclaration, type NewFieldDeclaration, ON_DELETE, OVERRIDE_POLICIES, type OnDelete, type OutsideShareAnswer, type OverridePolicy, PARITY_FIELD_TYPES, PERMISSION_LEVELS, PER_VALUE_ACCESS_WORDS, PIPELINE_RULE_KINDS, PORTAL_ACCENTS, PORTAL_ARCHIVE_FILTERS, type ParityFieldType, type ParityFieldTypeDescriptor, type PerValueAccessWord, type PermissionLevel, type PgError, type Pipeline, type PipelineColumn, type PipelineDeclared, type PipelineGate, type PipelineGatePreview, type PipelineMissingField, type PipelineMoveMany, type PipelineMoveManyItem, type PipelineMoveManyResult, type PipelineMoveResult, type PipelineMoveVerdict, type PipelineRule, type PipelineRuleKind, type PipelineSpec, type PipelineStage, type PipelineVerdict, type PortalAccent, type PortalArchiveAnswer, type PortalArchiveFilter, type PortalCard, type PortalConfig, type PortalConfigInput, type PortalFooterLink, type PortalFormAnswer, type PortalFormInput, type PortalFormRef, type PortalFormSpec, type PortalInvitation, type PortalPreviewRow, type PortalPrincipal, type PortalRevocation, type PortalStage, type PortalStyle, type PortalStyleInput, type PortalSummary, type PortalTableExposure, type PortalTableRef, type PredictedRefusal, type ProvenancePointer, type PublishBinding, type QueuedCapture, type QueuedCaptureFile, type QueuedCaptureState, type QuietHours, REFUSALS_WORTH_REPEATING, RELATION_BINDINGS, RELATION_CARDINALITIES, RELATION_FLAVORS, RETIRED_ACTOR_WORDS, RULE_NODE_KINDS, RULE_USES, type ReadRow, type ReadValue, type RecordChange, type RecordChangeAction, type RecordChangeResult, type RecordComment, type RecordDocument, type RecordEvent, type RecordFilter, type RecordGraphWritten, type RecordHeader, type RecordHistoryEntry, type RecordPage, type RecordPageSort, type RecordRead, type RecordRevision, type RecordScopeComment, type RecordScopeContext, type RecordScopeField, type RecordScopeHistoryEntry, type RecordScopeRelation, type RecordScopeWithheld, type RecordsActor, type RecordsChangeSink, type RecordsConfig, type RecordsDataSource, type RecordsError, type RecordsErrorCode, type RecordsErrorSink, type RecordsFilter, RecordsProvider, type RecordsProviderProps, type RecordsRealtimePort, type RecordsResolverPort, type RecordsResponse, type RecordsResult, type RecordsTableQuery, type RegisteredTable, type Relation, type RelationBinding, type RelationCardinality, type RelationCarries, type RelationCoordinate, type RelationDisplay, type RelationDisplaySpec, type RelationFlavor, type RelationProperties, type RelationStore, type RelationTarget, type RelationWordsManyArgs, type ResolutionTriple, type ResolvedPublishBinding, type RestorePreview, type RestoreResult, type RetiredActorWord, type RowAction, type RowActionStep, type Rule, type RuleAnswer, type RuleExpression, type RuleNodeKind, type RuleUse, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, STORAGE_MODES, STORE_DOORS, STORE_KNOBS, STORE_REFUSAL_CODES, type SavedViewRow, type SavedViewSpecIn, type StagePending, type StagePendingOnBoard, type StageRuleEnforcement, type StageRuleOnFail, type StageRuleWarning, type StaleWriteDetail, type StorageMode, type StoreDoorName, type StoreFilter, type StoreRefusalCode, type StoredRecord, type StuckRow, type Subscription, type SubscriptionBlock, type SubscriptionCadence, type SubscriptionSpec, TABLE_DISPLAYS, TABLE_ORIGINS, TABLE_TYPES, type Table, type TableArchiveProgress, type TableCapacity, type TableDecorations, type TableDisplay, type TableHome, type TableHomeDestination, type TableListEntry, type TableMoved, type TableOrigin, type TablePlacement, type TablePlacementFact, type TableProposal, type TableRowCount, type TableSyncResult, type TableSyncSource, type TableSyncSpec, type TableType, type TableWebhook, type TableWebhookDeclared, type Timestamp, type UseEntityFieldMutation, type UseFieldMutation, type UseRecordMutation, type UseRecordPageOptions, type UseRecordPageState, type UseRecordsOptions, type UseRecordsState, type UseTableArchive, type Uuid, VALUE_ALTERNATE_KEYS, VALUE_ENVELOPE_KEYS, type ValueAlternate, type ValueAlternateKey, type ValueEnvelope, type ValueEnvelopeKey, type ValueSource, type ViewLayout, type ViewOrderSet, type WorkApprovalDecision, type WorkApprovalFiled, type WorkApprovalState, type WorkApprover, type WorkAssignment, type WorkAssignmentField, type WorkChange, type WorkDecideMany, type WorkDecideManyItem, type WorkDecideManyResult, type WorkDecideVerdict, type WorkDueState, type WorkGraph, type WorkInboxItem, type WorkInboxKind, type WorkInboxView, type WorkInstantiation, type WorkListFlavour, type WorkListItem, type WorkOrigin, type WorkRecordState, type WorkSlotHold, type WorkState, type WorkTemplateNode, type WorkTemplateRelation, type WorkTurn, type WriteConflict, actionRefusals, allowsOtherValues, archivedByLine, archivedWhen, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, coerceTypedAnswer, coerceTypedAnswers, coercionLabel, emptyArchiveLine, emptyPortalArchiveLine, entityReferenceKinds, entityReferenceKindsOf, entityReferenceWords, entityRefsOf, entityRefsToWrite, err, exampleSpec, exportPageXlsx, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isArchiveLane, isDecided, isEntityReferenceConfig, isOwnOp, isPortalAccent, isPortalArchiveFilter, isRecordsErr, isRuleFilter, isTheChosen, keptGroups, keptOutOfSight, keptTableHref, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, moveConsequence, moveInOrder, offeredAsContext, ok, openCaptureQueue, optionKey, optionLabel, parseTableHome, parseTableMoved, portalArchiveConsequence, portalConfirmLine, portalPath, portalTitleTypedBack, publicFormPath, recordChangeTrigger, recordSourceKey, recordSourceTable, rememberedOpCount, sameDocument, scopeChip, sheetSyncSpec, stableFilterKey, tableShapeChanged, useEntityFieldMutation, useEntityFieldRights, useEntityFields, useEntityRecord, useEntityReferenceKinds, useEntityReferenceWords, useEntityTable, useFieldMutation, useFields, useMergeField, useMyLevel, useMyLevels, useOptionalRecordsClient, useRecord, useRecordChangeRevision, useRecordMutation, useRecordPage, useRecords, useRecordsActor, useRecordsClient, useTable, useTableArchive, useTables, withRowCounts, withTablePlacement };
|
package/dist/react/index.js
CHANGED
|
@@ -7959,26 +7959,8 @@ function useFields(tableId, recordType) {
|
|
|
7959
7959
|
tableId ? `fields:${tableId}:${recordType ?? ""}:${revision}` : null
|
|
7960
7960
|
);
|
|
7961
7961
|
}
|
|
7962
|
-
function
|
|
7962
|
+
function useLiveRows(tableId, base) {
|
|
7963
7963
|
const client = useRecordsClient();
|
|
7964
|
-
const pageSize = options.pageSize ?? 50;
|
|
7965
|
-
const page = options.page ?? 0;
|
|
7966
|
-
const filterKey = stableFilterKey(options.filter);
|
|
7967
|
-
const base = useAsync(
|
|
7968
|
-
async (c) => {
|
|
7969
|
-
if (!tableId) return { ok: true, data: { rows: [], total: null } };
|
|
7970
|
-
return c.list({
|
|
7971
|
-
table_id: tableId,
|
|
7972
|
-
...filterKey === "{}" ? {} : { filter: options.filter },
|
|
7973
|
-
limit: pageSize,
|
|
7974
|
-
offset: page * pageSize
|
|
7975
|
-
});
|
|
7976
|
-
},
|
|
7977
|
-
// The QUESTION, not the object: a parent that rebuilds `{status: "Cancelled"}`
|
|
7978
|
-
// on every render must not re-read the page on every render, and a parent
|
|
7979
|
-
// that changes the question must re-read on the first one.
|
|
7980
|
-
[tableId, pageSize, page, filterKey]
|
|
7981
|
-
);
|
|
7982
7964
|
const realtime = client.config.realtime;
|
|
7983
7965
|
const { reload, setData } = base;
|
|
7984
7966
|
useEffect(() => {
|
|
@@ -8025,6 +8007,54 @@ function useRecords(tableId, options = {}) {
|
|
|
8025
8007
|
}, [realtime, tableId, client, reload, setData, base.data]);
|
|
8026
8008
|
const live = Boolean(realtime && tableId);
|
|
8027
8009
|
const liveReason = realtime ? tableId ? "Live: changes to this table re-read through the read door." : "Not live: no table selected." : "Not live: this host bound no realtime port, so this list updates when you reload it.";
|
|
8010
|
+
return { live, liveReason };
|
|
8011
|
+
}
|
|
8012
|
+
function useRecords(tableId, options = {}) {
|
|
8013
|
+
const pageSize = options.pageSize ?? 50;
|
|
8014
|
+
const page = options.page ?? 0;
|
|
8015
|
+
const filterKey = stableFilterKey(options.filter);
|
|
8016
|
+
const base = useAsync(
|
|
8017
|
+
async (c) => {
|
|
8018
|
+
if (!tableId) return { ok: true, data: { rows: [], total: null } };
|
|
8019
|
+
return c.list({
|
|
8020
|
+
table_id: tableId,
|
|
8021
|
+
...filterKey === "{}" ? {} : { filter: options.filter },
|
|
8022
|
+
limit: pageSize,
|
|
8023
|
+
offset: page * pageSize
|
|
8024
|
+
});
|
|
8025
|
+
},
|
|
8026
|
+
// The QUESTION, not the object: a parent that rebuilds `{status: "Cancelled"}`
|
|
8027
|
+
// on every render must not re-read the page on every render, and a parent
|
|
8028
|
+
// that changes the question must re-read on the first one.
|
|
8029
|
+
[tableId, pageSize, page, filterKey]
|
|
8030
|
+
);
|
|
8031
|
+
const { live, liveReason } = useLiveRows(tableId, base);
|
|
8032
|
+
return { ...base, live, liveReason };
|
|
8033
|
+
}
|
|
8034
|
+
function useRecordPage(tableId, options = {}) {
|
|
8035
|
+
const pageSize = options.pageSize ?? 50;
|
|
8036
|
+
const page = options.page ?? 0;
|
|
8037
|
+
const filterKey = stableFilterKey(options.filter);
|
|
8038
|
+
const search = options.search && options.search.trim() !== "" ? options.search.trim() : null;
|
|
8039
|
+
const sortKey = JSON.stringify(options.sort ?? []);
|
|
8040
|
+
const viewId = options.viewId ?? null;
|
|
8041
|
+
const base = useAsync(
|
|
8042
|
+
async (c) => {
|
|
8043
|
+
if (!tableId) return { ok: true, data: { rows: [], total: null } };
|
|
8044
|
+
const answered = await c.listPage({
|
|
8045
|
+
table_id: tableId,
|
|
8046
|
+
...filterKey === "{}" ? {} : { filter: options.filter },
|
|
8047
|
+
search,
|
|
8048
|
+
sort: JSON.parse(sortKey),
|
|
8049
|
+
view_id: viewId,
|
|
8050
|
+
limit: pageSize,
|
|
8051
|
+
offset: page * pageSize
|
|
8052
|
+
});
|
|
8053
|
+
return answered.ok ? { ok: true, data: { rows: answered.data.rows, total: answered.data.total } } : answered;
|
|
8054
|
+
},
|
|
8055
|
+
[tableId, pageSize, page, filterKey, search, sortKey, viewId]
|
|
8056
|
+
);
|
|
8057
|
+
const { live, liveReason } = useLiveRows(tableId, base);
|
|
8028
8058
|
return { ...base, live, liveReason };
|
|
8029
8059
|
}
|
|
8030
8060
|
function useRecordChangeRevision(recordId) {
|
|
@@ -9222,6 +9252,7 @@ export {
|
|
|
9222
9252
|
useRecord,
|
|
9223
9253
|
useRecordChangeRevision,
|
|
9224
9254
|
useRecordMutation,
|
|
9255
|
+
useRecordPage,
|
|
9225
9256
|
useRecords,
|
|
9226
9257
|
useRecordsActor,
|
|
9227
9258
|
useRecordsClient,
|