Справочник API

Bases sub-types

Composite types referenced by Base snapshots, tables, fields, records, and views.

Текст этой страницы API пока доступен на английском. Сигнатуры и идентификаторы не зависят от языка интерфейса.

Composite types referenced by Base snapshots, tables, fields, records, and views. Supporting IBaseSnapshot. Types are ordered from direct top-level fields to deeper nested structures and enums.

Overview

TypeKindUsed by
BaseIdtypeIBaseSnapshot
ITableSnapshotinterfaceIBaseSnapshot
TableIdtypeIBaseSnapshot, ITableSnapshot, IViewSnapshot
BaseCellMatrixtypeITableSnapshot
FieldIdtypeITableSnapshot, IFieldSnapshot, IRecordSnapshot, IViewSnapshot
IBaseResourcesinterfaceITableSnapshot
IFieldSnapshotinterfaceITableSnapshot
IRecordSnapshotinterfaceITableSnapshot
IViewSnapshotinterfaceITableSnapshot
RecordIdtypeITableSnapshot, IRecordSnapshot
ViewIdtypeITableSnapshot, IViewSnapshot
BaseCellValuetypeIFieldSnapshot, IRecordSnapshot
BaseFieldTypeenumIFieldSnapshot
BaseViewTypeenumIViewSnapshot
FieldConfigtypeIFieldSnapshot
IBaseCellDatainterfaceBaseCellMatrix
IFilterConfiginterfaceIViewSnapshot
IGroupConfiginterfaceIViewSnapshot
ISortConfiginterfaceIViewSnapshot
IViewFieldSettinginterfaceIViewSnapshot
ViewSpecificConfigtypeIViewSnapshot
BaseCellPrimitiveValuetypeIBaseCellData
BaseCellValueTypetypeIBaseCellData
BaseFilterConjunctionenumIFilterConfig
BasePrimitiveCellValuetypeBaseCellValue
BaseSortDirectionenumISortConfig, IGroupConfig
IBaseViewCommonConfiginterfaceViewSpecificConfig, IGridViewConfig, IKanbanViewConfig, ICalendarViewConfig
ICalendarViewConfiginterfaceViewSpecificConfig
IFilterConditioninterfaceIFilterConfig
IGalleryViewConfiginterfaceViewSpecificConfig
IGanttViewConfiginterfaceViewSpecificConfig
IGridViewConfiginterfaceViewSpecificConfig
IKanbanViewConfiginterfaceViewSpecificConfig
BaseFilterOperatorenumIFilterCondition
IBaseConditionalColoringConfiginterfaceIBaseViewCommonConfig
IBaseViewColorConditioninterfaceIGanttViewConfig, IBaseConditionalColorRule
ICardLayoutConfiginterfaceIKanbanViewConfig, IGalleryViewConfig
IKanbanColumnSettinginterfaceIKanbanViewConfig
IKanbanFieldCardSettinginterfaceIKanbanViewConfig, IGalleryViewConfig
KanbanCardLayoutModetypeIKanbanViewConfig, IGalleryViewConfig
BaseConditionalColorOperatortypeIBaseViewColorCondition
BaseConditionalColorTargettypeIBaseViewColorCondition, IBaseConditionalColorRule
BaseConditionalDateModetypeIBaseViewColorCondition
IBaseConditionalColorRuleinterfaceIBaseConditionalColoringConfig

BaseId

import type { BaseId } from '@univerjs/core' · Used by IBaseSnapshot

TypeScript
type BaseId = string

ITableSnapshot

import type { ITableSnapshot } from '@univerjs/core' · Used by IBaseSnapshot

TypeScript
interface ITableSnapshot {  id: TableId  name: string  formulaName?: string  fields: Record<FieldId, IFieldSnapshot>  fieldOrder: FieldId[]  records: Record<RecordId, IRecordSnapshot>  recordOrder?: RecordId[]  rowIndex?: Record<RecordId, number>  rowId?: Record<number, RecordId>  colIndex?: Record<FieldId, number>  colId?: Record<number, FieldId>  cellData?: BaseCellMatrix  resources?: IBaseResources  views: Record<ViewId, IViewSnapshot>  viewOrder: ViewId[]  primaryFieldId: FieldId}

Related types: TableId · FieldId · IFieldSnapshot · RecordId · IRecordSnapshot · BaseCellMatrix · IBaseResources · ViewId · IViewSnapshot

TableId

import type { TableId } from '@univerjs/core' · Used by IBaseSnapshot · ITableSnapshot · IViewSnapshot

TypeScript
type TableId = string

BaseCellMatrix

import type { BaseCellMatrix } from '@univerjs/core' · Used by ITableSnapshot

TypeScript
type BaseCellMatrix = Record<number, Record<number, IBaseCellData>>

FieldId

import type { FieldId } from '@univerjs/core' · Used by ITableSnapshot · IFieldSnapshot · IRecordSnapshot · IViewSnapshot · ISortConfig · IGroupConfig · IKanbanViewConfig · ICalendarViewConfig · IGanttViewConfig · IGalleryViewConfig · IFilterCondition · ICardLayoutConfig · IBaseViewColorCondition

TypeScript
type FieldId = string

IBaseResources

import type { IBaseResources } from '@univerjs/core' · Used by ITableSnapshot

TypeScript
interface IBaseResources {  multiValueSets?: Record<string, string[]>  memberSets?: Record<string, string[]>  attachmentSets?: Record<string, string[]>  attachments?: Record<string, Record<string, unknown>>}

IFieldSnapshot

import type { IFieldSnapshot } from '@univerjs/core' · Used by ITableSnapshot

TypeScript
interface IFieldSnapshot {  id: FieldId  name: string  description?: string  type: BaseFieldType  config: FieldConfig  defaultValue?: CellValue  system?: boolean  readonly?: boolean}

Related types: FieldId · BaseFieldType · FieldConfig · CellValue

IRecordSnapshot

import type { IRecordSnapshot } from '@univerjs/core' · Used by ITableSnapshot

TypeScript
interface IRecordSnapshot {  id: RecordId  values: Record<FieldId, CellValue>  orderKey: string  createdAt: number  updatedAt: number  createdBy?: string  updatedBy?: string}

Related types: RecordId · FieldId · CellValue

IViewSnapshot

import type { IViewSnapshot } from '@univerjs/core' · Used by ITableSnapshot

TypeScript
interface IViewSnapshot<TConfig extends ViewSpecificConfig = ViewSpecificConfig> {  id: ViewId  tableId: TableId  name: string  type: BaseViewType  fieldOrder?: FieldId[]  fieldSettings?: Record<FieldId, IViewFieldSetting>  filter?: IFilterConfig | null  sort?: ISortConfig[]  group?: IGroupConfig[]  config: TConfig}

Related types: ViewId · TableId · BaseViewType · FieldId · IViewFieldSetting · IFilterConfig · ISortConfig · IGroupConfig

RecordId

import type { RecordId } from '@univerjs/core' · Used by ITableSnapshot · IRecordSnapshot

TypeScript
type RecordId = string

ViewId

import type { ViewId } from '@univerjs/core' · Used by ITableSnapshot · IViewSnapshot

TypeScript
type ViewId = string

BaseCellValue

import type { BaseCellValue } from '@univerjs/core' · Used by IFieldSnapshot · IRecordSnapshot

TypeScript
type BaseCellValue =  | PrimitiveCellValue  | PrimitiveCellValue[]  | Record<string, unknown>  | Record<string, unknown>[]  | null

Related types: PrimitiveCellValue

BaseFieldType

import { BaseFieldType } from '@univerjs/core' · Used by IFieldSnapshot

TypeScript
enum BaseFieldType {  Text = 'text',  SingleSelect = 'singleSelect',  MultiSelect = 'multiSelect',  Person = 'person',  Group = 'group',  Date = 'date',  Attachment = 'attachment',  Number = 'number',  Checkbox = 'checkbox',  Link = 'link',  Formula = 'formula',  Numbering = 'numbering',  Phone = 'phone',  Email = 'email',  Progress = 'progress',  Currency = 'currency',  Rating = 'rating',  RecordLink = 'recordLink',  RecordId = 'recordId',  CreatedBy = 'createdBy',  UpdatedBy = 'updatedBy',  CreatedAt = 'createdAt',  UpdatedAt = 'updatedAt',}

BaseViewType

import { BaseViewType } from '@univerjs/core' · Used by IViewSnapshot

TypeScript
enum BaseViewType {  Grid = 'grid',  Kanban = 'kanban',  Calendar = 'calendar',  Gantt = 'gantt',  Gallery = 'gallery',  Pivot = 'pivot',}

FieldConfig

import type { FieldConfig } from '@univerjs/core' · Used by IFieldSnapshot

TypeScript
type FieldConfig = Record<string, unknown>

IBaseCellData

import type { IBaseCellData } from '@univerjs/core' · Used by BaseCellMatrix

TypeScript
interface IBaseCellData {  v?: BaseCellPrimitiveValue  t?: BaseCellValueType | null  p?: IDocumentData | null  f?: string | null  si?: string | null}

Related types: BaseCellPrimitiveValue · BaseCellValueType · IDocumentData

IFilterConfig

import type { IFilterConfig } from '@univerjs/core' · Used by IViewSnapshot

TypeScript
interface IFilterConfig {  conjunction: BaseFilterConjunction  conditions: IFilterCondition[]}

Related types: BaseFilterConjunction · IFilterCondition

IGroupConfig

import type { IGroupConfig } from '@univerjs/core' · Used by IViewSnapshot

TypeScript
interface IGroupConfig {  fieldId: FieldId  direction?: BaseSortDirection  hideEmptyGroup?: boolean}

Related types: FieldId · BaseSortDirection

ISortConfig

import type { ISortConfig } from '@univerjs/core' · Used by IViewSnapshot

TypeScript
interface ISortConfig {  fieldId: FieldId  direction: BaseSortDirection}

Related types: FieldId · BaseSortDirection

IViewFieldSetting

import type { IViewFieldSetting } from '@univerjs/core' · Used by IViewSnapshot

TypeScript
interface IViewFieldSetting {  hidden?: boolean  width?: number  showInCard?: boolean}

ViewSpecificConfig

import type { ViewSpecificConfig } from '@univerjs/core' · Used by IViewSnapshot

TypeScript
type ViewSpecificConfig =  | IGridViewConfig  | IKanbanViewConfig  | ICalendarViewConfig  | IGanttViewConfig  | IGalleryViewConfig  | (IBaseViewCommonConfig & Record<string, unknown>)

Related types: IGridViewConfig · IKanbanViewConfig · ICalendarViewConfig · IGanttViewConfig · IGalleryViewConfig · IBaseViewCommonConfig

BaseCellPrimitiveValue

import type { BaseCellPrimitiveValue } from '@univerjs/core' · Used by IBaseCellData

TypeScript
type BaseCellPrimitiveValue = string | number | boolean | null

BaseCellValueType

import type { BaseCellValueType } from '@univerjs/core' · Used by IBaseCellData

TypeScript
type BaseCellValueType = CellValueType

Related types: CellValueType

BaseFilterConjunction

import { BaseFilterConjunction } from '@univerjs/core' · Used by IFilterConfig

TypeScript
enum BaseFilterConjunction {  AND = 'and',  OR = 'or',}

BasePrimitiveCellValue

import type { BasePrimitiveCellValue } from '@univerjs/core' · Used by BaseCellValue

TypeScript
type BasePrimitiveCellValue = string | number | boolean

BaseSortDirection

import { BaseSortDirection } from '@univerjs/core' · Used by ISortConfig · IGroupConfig

TypeScript
enum BaseSortDirection {  ASC = 'asc',  DESC = 'desc',}

IBaseViewCommonConfig

import type { IBaseViewCommonConfig } from '@univerjs/core' · Used by ViewSpecificConfig · IGridViewConfig · IKanbanViewConfig · ICalendarViewConfig · IGanttViewConfig · IGalleryViewConfig

Configuration shared by every Base view type.

TypeScript
interface IBaseViewCommonConfig {  conditionalColoring?: IBaseConditionalColoringConfig | null}

Related types: IBaseConditionalColoringConfig

ICalendarViewConfig

import type { ICalendarViewConfig } from '@univerjs/core' · Used by ViewSpecificConfig

TypeScript
interface ICalendarViewConfig extends IBaseViewCommonConfig {  startDateFieldId: FieldId  endDateFieldId?: FieldId  titleFieldId?: FieldId  colorFieldId?: FieldId  mode: 'month' | 'week' | 'day'  timeslotSize?: 'short' | 'medium' | 'long'  timeZone?: 'local' | string  displayColor?: { type: 'custom'; color: string } | { type: 'selectField'; fieldId: FieldId }  fieldSettings?: Record<FieldId, { hidden?: boolean; order?: number }>}

Related types: IBaseViewCommonConfig · FieldId

IFilterCondition

import type { IFilterCondition } from '@univerjs/core' · Used by IFilterConfig

TypeScript
interface IFilterCondition {  fieldId: FieldId  operator: BaseFilterOperator  operand?: unknown}

Related types: FieldId · BaseFilterOperator

IGalleryViewConfig

import type { IGalleryViewConfig } from '@univerjs/core' · Used by ViewSpecificConfig

TypeScript
interface IGalleryViewConfig extends IBaseViewCommonConfig {  card: ICardLayoutConfig  coverFieldId?: FieldId | null  cardLayout?: KanbanCardLayoutMode  showFieldNames?: boolean  fieldSettings?: Record<FieldId, IKanbanFieldCardSetting>  cardSize?: 'small' | 'medium' | 'large'}

Related types: IBaseViewCommonConfig · ICardLayoutConfig · FieldId · KanbanCardLayoutMode · IKanbanFieldCardSetting

IGanttViewConfig

import type { IGanttViewConfig } from '@univerjs/core' · Used by ViewSpecificConfig

TypeScript
interface IGanttViewConfig extends IBaseViewCommonConfig {  startDateFieldId: FieldId  endDateFieldId: FieldId  titleFieldId?: FieldId  progressFieldId?: FieldId  dependencyFieldId?: FieldId  scale: 'week' | 'month' | 'quarter' | 'year'  leftPaneWidth?: number  leftPaneCollapsed?: boolean  showTodayLine?: boolean  showWeekend?: boolean  displayColor?:    | { type: 'custom'; color: string }    | { type: 'selectField'; fieldId: FieldId }    | { type: 'conditional'; rules: IBaseViewColorCondition[] }  fieldSettings?: Record<FieldId, { hidden?: boolean; order?: number }>  workingDaysOnly?: boolean  workingDays?: {    weekdays: Array<1 | 2 | 3 | 4 | 5 | 6 | 7>    exceptions: Array<{      id: string      date: number      name: string      type: 'off' | 'working'    }>  }}

Related types: IBaseViewCommonConfig · FieldId · IBaseViewColorCondition

IGridViewConfig

import type { IGridViewConfig } from '@univerjs/core' · Used by ViewSpecificConfig

TypeScript
interface IGridViewConfig extends IBaseViewCommonConfig {  frozenFieldCount?: number  showRecordIndex?: boolean  rowHeight?: 'short' | 'medium' | 'tall' | 'extraTall'}

Related types: IBaseViewCommonConfig

IKanbanViewConfig

import type { IKanbanViewConfig } from '@univerjs/core' · Used by ViewSpecificConfig

TypeScript
interface IKanbanViewConfig extends IBaseViewCommonConfig {  groupFieldId: FieldId  coverFieldId?: FieldId | null  cardLayout?: KanbanCardLayoutMode  showFieldNames?: boolean  fieldSettings?: Record<FieldId, IKanbanFieldCardSetting>  columnSettings?: Record<string, IKanbanColumnSetting>  card?: ICardLayoutConfig}

Related types: IBaseViewCommonConfig · FieldId · KanbanCardLayoutMode · IKanbanFieldCardSetting · IKanbanColumnSetting · ICardLayoutConfig

BaseFilterOperator

import { BaseFilterOperator } from '@univerjs/core' · Used by IFilterCondition

TypeScript
enum BaseFilterOperator {  IS = 'is',  IS_NOT = 'isNot',  CONTAINS = 'contains',  NOT_CONTAINS = 'notContains',  IS_EMPTY = 'isEmpty',  IS_NOT_EMPTY = 'isNotEmpty',  GREATER_THAN = 'greaterThan',  GREATER_THAN_OR_EQUAL = 'greaterThanOrEqual',  LESS_THAN = 'lessThan',  LESS_THAN_OR_EQUAL = 'lessThanOrEqual',  BEFORE = 'before',  AFTER = 'after',}

IBaseConditionalColoringConfig

import type { IBaseConditionalColoringConfig } from '@univerjs/core' · Used by IBaseViewCommonConfig

Persisted conditional coloring configuration for one Base view.

TypeScript
interface IBaseConditionalColoringConfig {  rules: IBaseConditionalColorRule[]}

Related types: IBaseConditionalColorRule

IBaseViewColorCondition

import type { IBaseViewColorCondition } from '@univerjs/core' · Used by IGanttViewConfig · IBaseConditionalColorRule

A color condition stored by a Base view.

Rules are evaluated in array order. Earlier matching rules are painted last and therefore have higher visual priority than later matching rules.

TypeScript
interface IBaseViewColorCondition {  id: string  color: string  target?: BaseConditionalColorTarget  fieldId: FieldId  operator: BaseConditionalColorOperator  operand?: unknown  dateMode?: BaseConditionalDateMode}

Related types: BaseConditionalColorTarget · FieldId · BaseConditionalColorOperator · BaseConditionalDateMode

ICardLayoutConfig

import type { ICardLayoutConfig } from '@univerjs/core' · Used by IKanbanViewConfig · IGalleryViewConfig

TypeScript
interface ICardLayoutConfig {  titleFieldId?: FieldId  coverFieldId?: FieldId | null  fieldIds: FieldId[]}

Related types: FieldId

IKanbanColumnSetting

import type { IKanbanColumnSetting } from '@univerjs/core' · Used by IKanbanViewConfig

TypeScript
interface IKanbanColumnSetting {  title?: string  color?: string  collapsed?: boolean}

IKanbanFieldCardSetting

import type { IKanbanFieldCardSetting } from '@univerjs/core' · Used by IKanbanViewConfig · IGalleryViewConfig

TypeScript
interface IKanbanFieldCardSetting {  hidden?: boolean  order?: number}

KanbanCardLayoutMode

import type { KanbanCardLayoutMode } from '@univerjs/core' · Used by IKanbanViewConfig · IGalleryViewConfig

TypeScript
type KanbanCardLayoutMode = 'normal' | 'compose'

BaseConditionalColorOperator

import type { BaseConditionalColorOperator } from '@univerjs/core' · Used by IBaseViewColorCondition

TypeScript
type BaseConditionalColorOperator =  (typeof BaseConditionalColorOperator)[keyof typeof BaseConditionalColorOperator]

BaseConditionalColorTarget

import type { BaseConditionalColorTarget } from '@univerjs/core' · Used by IBaseViewColorCondition · IBaseConditionalColorRule

TypeScript
type BaseConditionalColorTarget =  (typeof BaseConditionalColorTarget)[keyof typeof BaseConditionalColorTarget]

BaseConditionalDateMode

import type { BaseConditionalDateMode } from '@univerjs/core' · Used by IBaseViewColorCondition

TypeScript
type BaseConditionalDateMode =  (typeof BaseConditionalDateMode)[keyof typeof BaseConditionalDateMode]

IBaseConditionalColorRule

import type { IBaseConditionalColorRule } from '@univerjs/core' · Used by IBaseConditionalColoringConfig

A complete Base conditional coloring rule used by Grid and other Base views.

TypeScript
interface IBaseConditionalColorRule extends IBaseViewColorCondition {  target: BaseConditionalColorTarget}

Related types: IBaseViewColorCondition · BaseConditionalColorTarget

Насколько полезно это руководство?

© 2026 DreamNum Co., Ltd.