ngx-diagrams
Version:
> Light Weight, Modular, Typed Diagram Engine for Angular
29 lines (28 loc) • 1.11 kB
TypeScript
import { MonoTypeOperatorFunction, Observable, Subject } from 'rxjs';
import { BaseEvent, LockEvent } from './interfaces/event.interface';
import { ID } from './utils/tool-kit.util';
import { HashMap } from './utils/types';
export declare type BaseEntityType = 'node' | 'link' | 'port' | 'point';
export declare class BaseEntity {
protected _id: ID;
protected destroyed$: Subject<void>;
protected locked$: import("./state/state").ValueState<boolean>;
protected readonly _logPrefix: string;
constructor(id?: ID, logPrefix?: string);
get id(): ID;
set id(id: ID);
log(message: string, ...args: any): void;
withLog(message: string, ...args: any): any;
entityPipe<T>(logMessage?: string): MonoTypeOperatorFunction<T>;
getLocked(): boolean;
setLocked(locked?: boolean): void;
doClone(lookupTable: HashMap<any>, clone: any): void;
clone(lookupTable?: HashMap<any>): any;
serialize(): {
id: string;
locked: boolean;
};
lockChanges(): Observable<LockEvent>;
destroy(): void;
onEntityDestroy(): Observable<BaseEvent<BaseEntity>>;
}