plane/web/store/root.store.ts

57 lines
2.2 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-15 12:32:15 +00:00
import { IMemberRootStore, MemberRootStore } from "./member";
import { IInboxRootStore, InboxRootStore } from "./inbox";
import { IProjectEstimateStore, ProjectEstimatesStore } from "./estimate.store";
2023-12-18 11:28:18 +00:00
import { GlobalViewStore, IGlobalViewStore } from "./global-view.store";
2023-12-15 12:32:15 +00:00
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-15 12:32:15 +00:00
memberRoot: IMemberRootStore;
inboxRoot: IInboxRootStore;
2023-12-12 10:20:14 +00:00
cycle: ICycleStore;
module: IModuleStore;
2023-12-15 11:31:36 +00:00
projectView: IProjectViewStore;
2023-12-18 11:28:18 +00:00
globalView: IGlobalViewStore;
page: IPageStore;
issue: IIssueRootStore;
state: IStateStore;
estimate: IProjectEstimateStore;
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-15 12:32:15 +00:00
this.memberRoot = new MemberRootStore(this);
this.inboxRoot = new InboxRootStore(this);
2023-12-11 18:02:21 +00:00
// independent stores
this.cycle = new CycleStore(this);
this.module = new ModulesStore(this);
2023-12-15 11:31:36 +00:00
this.projectView = new ProjectViewStore(this);
2023-12-18 11:28:18 +00:00
this.globalView = new GlobalViewStore(this);
this.page = new PageStore(this);
this.issue = new IssueRootStore(this);
this.state = new StateStore(this);
this.estimate = new ProjectEstimatesStore(this);
2023-12-11 09:25:05 +00:00
}
}