import type { ColumnDataType, DatabaseBlockModel } from '@blocksuite/affine-model'; import { type InsertToPosition } from '@blocksuite/affine-shared/utils'; import { type DatabaseFlags, DataSourceBase, type DataViewDataType, type PropertyMetaConfig, type TypeInstance, type ViewManager, type ViewMeta } from '@blocksuite/data-view'; import type { EditorHost } from '@blocksuite/std'; import { type ReadonlySignal } from '@preact/signals-core'; export declare class DatabaseBlockDataSource extends DataSourceBase { static externalProperties: import("@preact/signals-core").Signal; static propertiesList: ReadonlySignal<(PropertyMetaConfig<"link", {}, string, string> | PropertyMetaConfig | PropertyMetaConfig<"checkbox", {}, boolean, boolean> | PropertyMetaConfig<"date", {}, number | null, number | null> | PropertyMetaConfig<"multi-select", { options: { id: string; value: string; color: string; }[]; }, string[], string[]> | PropertyMetaConfig<"number", { format: "number" | "numberWithCommas" | "percent" | "currencyYen" | "currencyINR" | "currencyCNY" | "currencyUSD" | "currencyEUR" | "currencyGBP"; decimal?: number | undefined; }, number | null, number | null> | PropertyMetaConfig<"progress", {}, number, number> | PropertyMetaConfig<"select", { options: { id: string; value: string; color: string; }[]; }, string | null, string | null> | PropertyMetaConfig<"image", {}, string | null, string | null> | PropertyMetaConfig<"rich-text", {}, import("./properties/rich-text/define.js").RichTextCellType | undefined, string> | PropertyMetaConfig<"title", {}, import("@blocksuite/store").Text | undefined, string>)[]>; static propertiesMap: ReadonlySignal<{ [k: string]: PropertyMetaConfig; }>; private _batch; private readonly _model; featureFlags$: ReadonlySignal; properties$: ReadonlySignal; readonly$: ReadonlySignal; rows$: ReadonlySignal; viewConverts: import("@blocksuite/data-view").ViewConvertConfig[]; viewDataList$: ReadonlySignal; viewManager: ViewManager; viewMetas: ViewMeta[]; get doc(): import("@blocksuite/store").Store; allPropertyMetas$: ReadonlySignal[]>; propertyMetas$: ReadonlySignal; constructor(model: DatabaseBlockModel); private _runCapture; private getModelById; private newPropertyName; cellValueChange(rowId: string, propertyId: string, value: unknown): void; cellValueGet(rowId: string, propertyId: string): unknown; propertyAdd(insertToPosition: InsertToPosition, type?: string): string | undefined; protected getNormalPropertyAndIndex(propertyId: string): { column: ColumnDataType>; index: number; } | undefined; private getPropertyAndIndex; private updateProperty; propertyDataGet(propertyId: string): Record; propertyDataSet(propertyId: string, data: Record): void; propertyDataTypeGet(propertyId: string): TypeInstance | undefined; propertyDelete(id: string): void; propertyDuplicate(propertyId: string): string | undefined; propertyMetaGet(type: string): PropertyMetaConfig | undefined; propertyNameGet(propertyId: string): string; propertyNameSet(propertyId: string, name: string): void; propertyReadonlyGet(propertyId: string): boolean; propertyTypeGet(propertyId: string): string | undefined; propertyTypeSet(propertyId: string, toType: string): void; rowAdd(insertPosition: InsertToPosition | number): string; rowDelete(ids: string[]): void; rowMove(rowId: string, position: InsertToPosition): void; viewDataAdd(viewData: DataViewDataType): string; viewDataDelete(viewId: string): void; viewDataDuplicate(id: string): string; viewDataGet(viewId: string): DataViewDataType | undefined; viewDataMoveTo(id: string, position: InsertToPosition): void; viewDataUpdate(id: string, updater: (data: ViewData) => Partial): void; viewMetaGet(type: string): ViewMeta; viewMetaGetById(viewId: string): ViewMeta | undefined; } export declare const databaseViewInitTemplate: (datasource: DatabaseBlockDataSource, viewType: string) => void; export declare const convertToDatabase: (host: EditorHost, viewType: string) => void; //# sourceMappingURL=data-source.d.ts.map