import type { Disposable, Slot } from '@blockeditor/global/utils'; import type { UniComponent } from '../../../_common/components/uni-component/uni-component.js'; import type { InsertToPosition } from '../../types.js'; import { type ColumnConfig, type ColumnConfigManager } from '../columns/manager.js'; import type { DataViewManager } from '../data-view-manager.js'; export type DetailSlotProps = { view: DataViewManager; rowId: string; }; export interface DetailSlots { header?: UniComponent; } export interface DataSource { allPropertyConfig: ColumnConfig[]; properties: string[]; rows: string[]; cellGetValue: (rowId: string, propertyId: string) => unknown; cellGetRenderValue: (rowId: string, propertyId: string) => unknown; cellGetExtra: (rowId: string, columnId: string) => unknown; cellChangeRenderValue: (rowId: string, propertyId: string, value: unknown) => unknown; cellChangeValue: (rowId: string, propertyId: string, value: unknown) => void; rowAdd: (InsertToPosition: InsertToPosition | number) => string; rowDelete: (ids: string[]) => void; propertyGetName: (propertyId: string) => string; propertyGetDefaultWidth: (propertyId: string) => number; propertyGetType: (propertyId: string) => string; propertyGetData: (propertyId: string) => Record; propertyGetReadonly: (columnId: string) => boolean; propertyChangeName: (propertyId: string, name: string) => void; propertyChangeType: (propertyId: string, type: string) => void; propertyChangeData: (propertyId: string, data: Record) => void; propertyAdd: (InsertToPosition: InsertToPosition, type?: string) => string; propertyDelete: (id: string) => void; propertyDuplicate: (columnId: string) => string; columnConfigManager: ColumnConfigManager; /** * @deprecated */ captureSync(): void; slots: { update: Slot; }; onCellUpdate: (rowId: string, propertyId: string, callback: () => void) => Disposable; detailSlots: DetailSlots; rowMove(rowId: string, position: InsertToPosition): void; } export declare abstract class BaseDataSource implements DataSource { abstract cellChangeValue(rowId: string, propertyId: string, value: unknown): void; cellChangeRenderValue(rowId: string, propertyId: string, value: unknown): void; cellGetRenderValue(rowId: string, propertyId: string): unknown; cellGetExtra(_rowId: string, _propertyId: string): unknown; abstract cellGetValue(rowId: string, propertyId: string): unknown; abstract properties: string[]; abstract propertyAdd(InsertToPosition: InsertToPosition): string; abstract propertyChangeData(propertyId: string, data: Record): void; abstract propertyChangeName(propertyId: string, name: string): void; abstract propertyChangeType(propertyId: string, type: string): void; abstract propertyDelete(id: string): void; abstract propertyDuplicate(columnId: string): string; abstract propertyGetData(propertyId: string): Record; propertyGetReadonly(_propertyId: string): boolean; propertyGetDefaultWidth(_propertyId: string): number; onCellUpdate(_rowId: string, _propertyId: string, _callback: () => void): Disposable; abstract propertyGetName(propertyId: string): string; abstract propertyGetType(propertyId: string): string; abstract rowAdd(InsertToPosition: InsertToPosition | number): string; abstract rowDelete(ids: string[]): void; abstract rows: string[]; abstract slots: { update: Slot; }; captureSync(): void; columnConfigManager: ColumnConfigManager; abstract allPropertyConfig: ColumnConfig[]; get detailSlots(): DetailSlots; abstract rowMove(rowId: string, position: InsertToPosition): void; } export type DatabaseBlockDatasourceConfig = { type: 'database-block'; pageId: string; blockId: string; }; export type AllPageDatasourceConfig = { type: 'all-pages'; }; export type TagsDatasourceConfig = { type: 'tags'; }; export type DataSourceConfig = DatabaseBlockDatasourceConfig | AllPageDatasourceConfig | TagsDatasourceConfig; export type GetConfig = T extends { type: K; } ? T : never; //# sourceMappingURL=base.d.ts.map