@rcsb/rcsb-saguaro
Version:
RCSB 1D Feature Viewer
76 lines (75 loc) • 2.6 kB
TypeScript
import { RcsbFvRowExtendedConfigInterface, RcsbFvRowConfigInterface } from "../../RcsbFvConfig/RcsbFvConfigInterface";
import { RcsbFvContextManager, TrackDataInterface, TrackVisibilityInterface } from "../../RcsbFvContextManager/RcsbFvContextManager";
export interface RcsbFvRowRenderConfigInterface<P extends {
[k: string]: any;
} = {}, S extends {
[k: string]: any;
} = {}, R extends {
[k: string]: any;
} = {}, M extends {
[k: string]: any;
} = {}> extends RcsbFvRowExtendedConfigInterface<P, S, R, M> {
key: string;
renderSchedule?: "async" | "sync" | "fixed";
}
export declare class BoardDataState<P extends {
[k: string]: any;
} = {}, S extends {
[k: string]: any;
} = {}, R extends {
[k: string]: any;
} = {}, M extends {
[k: string]: any;
} = {}> {
private rowConfigData;
private readonly rowStatusMap;
private readonly contextManager;
private readonly subscription;
private readonly boardId;
constructor(config: {
contextManager: RcsbFvContextManager;
boardId: string;
rowConfigData?: RcsbFvRowConfigInterface<P, S, R, M>[];
});
getBoardData(): RcsbFvRowRenderConfigInterface<P, S, R, M>[];
setBoardData(rowConfigData: RcsbFvRowConfigInterface<P, S, R, M>[]): void;
refresh(): void;
/**Adds a new track to the board
* @param configRow Track configuration object
* */
addTrack(configRow: RcsbFvRowConfigInterface<P, S, R, M>): void;
/**Modifies visibility of a board track
* @param obj Target track id and visibility flag (true/false)
* */
changeTrackVisibility(obj: TrackVisibilityInterface): void;
moveTrack(move: {
oldIndex: number;
newIndex: number;
}): void;
/**Replace board track rack data
* @param obj New track data and target track id
* */
updateTrackData(obj: TrackDataInterface): void;
/**Add new data to a given board track
* @param obj Additional track data and target track id
* */
addTrackData(obj: TrackDataInterface): void;
/**Rerender the board track
* @param trackId Id that identifies the track
* */
resetTrack(trackId: string): void;
unsubscribe(): void;
/**Modifies a board track data
* @param obj Additional track data and target track id
* @param flag Replace track data or add data to the current one
* */
private changeTrackData;
private checkRow;
private subscribe;
/**Row Track Board Ready Event
* @param rowData
* */
private rowReady;
private boardReady;
private uniqueTrackId;
}