plane/web/store/root.ts

51 lines
1.8 KiB
TypeScript
Raw Normal View History

// mobx lite
import { enableStaticRendering } from "mobx-react-lite";
// store imports
import UserStore from "./user";
import ThemeStore from "./theme";
2023-09-20 15:03:25 +00:00
import ProjectPublishStore, { IProjectPublishStore } from "./project_publish";
import IssueStore, { IIssueStore } from "./issue";
import DraftIssuesStore from "./issue_draft";
2023-09-20 15:03:25 +00:00
import WorkspaceStore, { IWorkspaceStore } from "./workspace";
import ProjectStore, { IProjectStore } from "./project";
2023-09-20 06:52:48 +00:00
import ModuleStore, { IModuleStore } from "./modules";
import CycleStore, { ICycleStore } from "./cycles";
import ViewStore, { IViewStore } from "./views";
2023-09-20 15:03:25 +00:00
import IssueFilterStore, { IIssueFilterStore } from "./issue_filters";
2023-09-20 06:52:48 +00:00
import IssueViewDetailStore from "./issue_detail";
import IssueKanBanViewStore from "./kanban_view";
enableStaticRendering(typeof window === "undefined");
export class RootStore {
user;
theme;
projectPublish: IProjectPublishStore;
draftIssuesStore: DraftIssuesStore;
2023-09-20 06:52:48 +00:00
workspace: IWorkspaceStore;
project: IProjectStore;
issue: IIssueStore;
module: IModuleStore;
cycle: ICycleStore;
view: IViewStore;
issueFilter: IIssueFilterStore;
2023-09-15 10:07:54 +00:00
issueDetail: IssueViewDetailStore;
issueKanBanView: IssueKanBanViewStore;
constructor() {
this.user = new UserStore(this);
this.theme = new ThemeStore(this);
2023-09-20 06:52:48 +00:00
this.workspace = new WorkspaceStore(this);
this.project = new ProjectStore(this);
2023-09-20 15:03:25 +00:00
this.projectPublish = new ProjectPublishStore(this);
2023-09-20 06:52:48 +00:00
this.module = new ModuleStore(this);
this.cycle = new CycleStore(this);
this.view = new ViewStore(this);
2023-09-20 15:03:25 +00:00
this.issue = new IssueStore(this);
2023-09-20 06:52:48 +00:00
this.issueFilter = new IssueFilterStore(this);
2023-09-15 10:07:54 +00:00
this.issueDetail = new IssueViewDetailStore(this);
this.issueKanBanView = new IssueKanBanViewStore(this);
this.draftIssuesStore = new DraftIssuesStore(this);
}
}