plane/web/store/root.store.ts

45 lines
1.6 KiB
TypeScript
Raw Normal View History

2023-12-11 09:25:05 +00:00
import { enableStaticRendering } from "mobx-react-lite";
// root stores
2023-12-11 18:02:21 +00:00
import { AppRootStore, IAppRootStore } from "./application";
2023-12-12 10:20:14 +00:00
import { IProjectRootStore, ProjectRootStore } from "./project";
import { CycleStore, ICycleStore } from "./cycle.store";
2023-12-15 11:31:36 +00:00
import { IProjectViewStore, ProjectViewStore } from "./project-view.store";
2023-12-12 10:20:14 +00:00
import { IModuleStore, ModulesStore } from "./module.store";
import { IUserStore, UserStore } from "./user";
import { IWorkspaceRootStore, WorkspaceRootStore } from "./workspace";
import { IssueRootStore, IIssueRootStore } from "./issue/root.store";
import { IStateStore, StateStore } from "./state.store";
import { IPageStore, PageStore } from "./page.store";
import { ILabelRootStore, LabelRootStore } from "./label";
2023-12-11 09:25:05 +00:00
enableStaticRendering(typeof window === "undefined");
export class RootStore {
2023-12-11 18:02:21 +00:00
app: IAppRootStore;
user: IUserStore;
workspaceRoot: IWorkspaceRootStore;
projectRoot: IProjectRootStore;
labelRoot: ILabelRootStore;
2023-12-12 10:20:14 +00:00
cycle: ICycleStore;
module: IModuleStore;
2023-12-15 11:31:36 +00:00
projectView: IProjectViewStore;
page: IPageStore;
issue: IIssueRootStore;
state: IStateStore;
2023-12-11 09:25:05 +00:00
constructor() {
this.app = new AppRootStore(this);
2023-12-11 14:45:07 +00:00
this.user = new UserStore(this);
this.workspaceRoot = new WorkspaceRootStore(this);
this.projectRoot = new ProjectRootStore(this);
this.labelRoot = new LabelRootStore(this);
2023-12-11 18:02:21 +00:00
// independent stores
this.state = new StateStore(this);
this.issue = new IssueRootStore(this);
this.cycle = new CycleStore(this);
this.module = new ModulesStore(this);
2023-12-15 11:31:36 +00:00
this.projectView = new ProjectViewStore(this);
this.page = new PageStore(this);
2023-12-11 09:25:05 +00:00
}
}