plane/web/store/root.ts

59 lines
1.9 KiB
TypeScript
Raw Normal View History

// mobx lite
import { enableStaticRendering } from "mobx-react-lite";
// store imports
import UserStore from "./user";
import ThemeStore from "./theme";
import ProjectPublishStore, { IProjectPublishStore } from "./project-publish";
import IssuesStore from "./issues";
import DraftIssuesStore from "./draft-issue";
2023-09-20 06:52:48 +00:00
import WorkspaceStore, { IWorkspaceStore } from "./workspaces";
import ProjectStore, { IProjectStore } from "./projects";
import IssueStore, { IIssueStore } from "./issue-store";
import ModuleStore, { IModuleStore } from "./modules";
import CycleStore, { ICycleStore } from "./cycles";
import ViewStore, { IViewStore } from "./views";
import IssueFilterStore, { IIssueFilterStore } from "./issue-filters";
import IssueViewDetailStore from "./issue_detail";
2023-09-15 10:07:54 +00:00
import IssueKanBanViewStore from "./issue-views/kanban-view";
enableStaticRendering(typeof window === "undefined");
export class RootStore {
user;
theme;
projectPublish: IProjectPublishStore;
issues: IssuesStore;
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);
this.projectPublish = new ProjectPublishStore(this);
this.issues = new IssuesStore(this);
2023-09-20 06:52:48 +00:00
this.workspace = new WorkspaceStore(this);
this.project = new ProjectStore(this);
this.issue = new IssueStore(this);
this.module = new ModuleStore(this);
this.cycle = new CycleStore(this);
this.view = new ViewStore(this);
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);
}
}