plane/web/store/root.ts

78 lines
3.0 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 ModuleIssueStore, { IModuleIssueStore } from "./module_issue";
import ModuleFilterStore, { IModuleFilterStore } from "./module_filters";
import ModuleIssueKanBanViewStore, { IModuleIssueKanBanViewStore } from "./module_issue_kanban_view";
2023-09-20 06:52:48 +00:00
import CycleStore, { ICycleStore } from "./cycles";
import CycleIssueStore, { ICycleIssueStore } from "./cycle_issue";
import CycleIssueFilterStore, { ICycleIssueFilterStore } from "./cycle_issue_filters";
import CycleIssueKanBanViewStore, { ICycleIssueKanBanViewStore } from "./cycle_issue_kanban_view";
2023-09-20 06:52:48 +00:00
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";
import CalendarStore, { ICalendarStore } from "./calendar";
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;
2023-09-20 06:52:48 +00:00
module: IModuleStore;
moduleIssue: IModuleIssueStore;
moduleFilter: IModuleFilterStore;
moduleIssueKanBanView: IModuleIssueKanBanViewStore;
2023-09-20 06:52:48 +00:00
cycle: ICycleStore;
cycleIssue: ICycleIssueStore;
cycleIssueFilter: ICycleIssueFilterStore;
cycleIssueKanBanView: ICycleIssueKanBanViewStore;
2023-09-20 06:52:48 +00:00
view: IViewStore;
issueFilter: IIssueFilterStore;
2023-09-15 10:07:54 +00:00
issueDetail: IssueViewDetailStore;
issueKanBanView: IssueKanBanViewStore;
calendar: ICalendarStore;
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.moduleIssue = new ModuleIssueStore(this);
this.moduleFilter = new ModuleFilterStore(this);
this.moduleIssueKanBanView = new ModuleIssueKanBanViewStore(this);
2023-09-20 06:52:48 +00:00
this.cycle = new CycleStore(this);
this.cycleIssue = new CycleIssueStore(this);
this.cycleIssueFilter = new CycleIssueFilterStore(this);
this.cycleIssueKanBanView = new CycleIssueKanBanViewStore(this);
2023-09-20 06:52:48 +00:00
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);
this.calendar = new CalendarStore(this);
}
}