import { ObjectValues, FlowAnyExistential, FlowAnyObject, ObjectMap } from '../private_utils'; import { ModelChange } from '../types/base'; import Sdk from '../sdk'; import { FieldId } from '../types/field'; import { GroupData, GroupLevelData, ViewData, ViewId } from '../types/view'; import { RecordId } from '../types/record'; import { AirtableInterface } from '../types/airtable_interface'; import { Color } from '../colors'; import AbstractModelWithAsyncData from './abstract_model_with_async_data'; import RecordStore from './record_store'; import Record from './record'; export declare const WatchableViewDataStoreKeys: Readonly<{ visibleRecords: "visibleRecords"; visibleRecordIds: "visibleRecordIds"; groups: "groups"; groupLevels: "groupLevels"; recordColors: "recordColors"; allFieldIds: "allFieldIds"; visibleFieldIds: "visibleFieldIds"; }>; /** @internal */ export declare type WatchableViewDataStoreKey = ObjectValues; /** @internal */ declare class ViewDataStore extends AbstractModelWithAsyncData { static _className: string; static _isWatchableKey(key: string): boolean; static _shouldLoadDataForKey(key: WatchableViewDataStoreKey): boolean; readonly viewId: ViewId; readonly parentRecordStore: RecordStore; _mostRecentTableLoadPromise: Promise | null; readonly _airtableInterface: AirtableInterface; constructor(sdk: Sdk, parentRecordStore: RecordStore, viewId: ViewId); get _dataOrNullIfDeleted(): ViewData | null; _onChangeIsDataLoaded(): void; get isDataLoaded(): boolean; __onDataDeletion(): void; loadDataAsync(): Promise; _loadDataAsync(): Promise>; unloadData(): void; _unloadData(): void; __generateChangesForParentTableAddMultipleRecords(recordIds: Array): Array; __generateChangesForParentTableDeleteMultipleRecords(recordIds: ReadonlyArray): Array; __recursivelyRemoveRecordsFromGroupsInPlace(groups: Array | null, recordIdsToDeleteSet: ObjectMap): GroupData[] | null; /** * The record IDs that are not filtered out of this view. * Can be watched to know when records are created, deleted, reordered, or * filtered in and out of this view. */ get visibleRecordIds(): Array; /** * The records that are not filtered out of this view. * Can be watched to know when records are created, deleted, reordered, or * filtered in and out of this view. */ get visibleRecords(): Array; /** * Gets the groups in a view, can be watched to be notified if a record changes groups, * if a record is changed/deleted/created, if sort order of groups changes, grouping * heirarchy changes, or grouping field changes. * * @hidden */ get groups(): Array | null; /** * Gets the group config for this view, can be watched to know when groupLevels * changes (reorder, groups deleted, groups changed, grouped field changes) */ get groupLevels(): Array | null; /** * Get the color name for the specified record in this view, or null if no * color is available. Watch with 'recordColors' * * @param recordOrRecordId the record/record id to get the color for */ getRecordColor(record: Record): Color | null; get allFieldIds(): Array; get visibleFieldIds(): Array; triggerOnChangeForDirtyPaths(dirtyPaths: FlowAnyObject): void; } /** @internal */ export default ViewDataStore;