You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
685 B
33 lines
685 B
import PageRecord from '../../structures/PageRecord';
|
|
|
|
export abstract class EditorNodeContract {
|
|
protected pageRec!: PageRecord;
|
|
protected nodeRec!: any; // TODO
|
|
|
|
get page() {
|
|
return this.pageRec;
|
|
}
|
|
|
|
set page(page: PageRecord) {
|
|
this.pageRec = page;
|
|
}
|
|
|
|
get identifier() {
|
|
return this.nodeRec.UUID;
|
|
}
|
|
|
|
public abstract isDirty(): boolean | Promise<boolean>;
|
|
|
|
public needsSave(): boolean | Promise<boolean> {
|
|
return false;
|
|
}
|
|
|
|
public needsLoad(): boolean | Promise<boolean> {
|
|
return false;
|
|
}
|
|
|
|
public performSave(): void | Promise<void> {}
|
|
|
|
public performLoad(): void | Promise<void> {}
|
|
}
|