π₯π₯π₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.
TypeScript boardsbug-trackerdjangodockerganttissue-trackerjirajira-alternativekanbanlinearpostgresqlproduct-managementproject-managementproject-planningpythonreactredistypesciptvitework-management
fix: core root store import fixes
sriram veeraghanta78d4d981d187
diff --git a/web/core/store/cycle.store.ts b/web/core/store/cycle.store.tsindex c781fbc406..4c1541a789 100644--- a/web/core/store/cycle.store.ts+++ b/web/core/store/cycle.store.ts@@ -8,13 +8,13 @@ import { ICycle, CycleDateCheckData, TCyclePlotType } from "@plane/types";// helpersimport { orderCycles, shouldFilterCycle } from "@/helpers/cycle.helper";import { getDate } from "@/helpers/date-time.helper";-// plane web store-import { RootStore } from "@/plane-web/store/root.store";// servicesimport { CycleService } from "@/services/cycle.service";import { CycleArchiveService } from "@/services/cycle_archive.service";import { IssueService } from "@/services/issue";import { ProjectService } from "@/services/project";+// store+import { CoreRootStore } from "./root.store";export interface ICycleStore {// loaders@@ -84,7 +84,7 @@ export class CycleStore implements ICycleStore {cycleService;cycleArchiveService;- constructor(_rootStore: RootStore) {+ constructor(_rootStore: CoreRootStore) {makeObservable(this, {// observablesloader: observable.ref,diff --git a/web/core/store/cycle_filter.store.ts b/web/core/store/cycle_filter.store.tsindex 675027a4f1..070ab3b19d 100644--- a/web/core/store/cycle_filter.store.ts+++ b/web/core/store/cycle_filter.store.ts@@ -3,8 +3,8 @@ import { action, computed, observable, makeObservable, runInAction, reaction } fimport { computedFn } from "mobx-utils";// typesimport { TCycleDisplayFilters, TCycleFilters, TCycleFiltersByState } from "@plane/types";-// plane web store-import { RootStore } from "@/plane-web/store/root.store";+// store+import { CoreRootStore } from "./root.store";export interface ICycleFilterStore {// observables@@ -35,9 +35,9 @@ export class CycleFilterStore implements ICycleFilterStore {searchQuery: string = "";archivedCyclesSearchQuery: string = "";// root store- rootStore: RootStore;+ rootStore: CoreRootStore;- constructor(_rootStore: RootStore) {+ constructor(_rootStore: CoreRootStore) {makeObservable(this, {// observablesdisplayFilters: observable,diff --git a/web/core/store/dashboard.store.ts b/web/core/store/dashboard.store.tsindex 46c376e48c..9bdaadf4b0 100644--- a/web/core/store/dashboard.store.ts+++ b/web/core/store/dashboard.store.ts@@ -10,10 +10,10 @@ import {TWidgetKeys,TWidgetStatsRequestParams,} from "@plane/types";-// plane web store-import { RootStore } from "@/plane-web/store/root.store";// servicesimport { DashboardService } from "@/services/dashboard.service";+// plane web store+import { CoreRootStore } from "./root.store";export interface IDashboardStore {// error states@@ -74,7 +74,7 @@ export class DashboardStore implements IDashboardStore {// servicesdashboardService;- constructor(_rootStore: RootStore) {+ constructor(_rootStore: CoreRootStore) {makeObservable(this, {// error stateswidgetStatsError: observable,diff --git a/web/core/store/estimates/project-estimate.store.ts b/web/core/store/estimates/project-estimate.store.tsindex 8626abead8..c9e8408122 100644--- a/web/core/store/estimates/project-estimate.store.ts+++ b/web/core/store/estimates/project-estimate.store.ts@@ -6,12 +6,11 @@ import { action, computed, makeObservable, observable, runInAction } from "mobx"import { computedFn } from "mobx-utils";// typesimport { IEstimate as IEstimateType, IEstimateFormData } from "@plane/types";-// plane web store-import { RootStore } from "@/plane-web/store/root.store";// servicesimport estimateService from "@/services/project/estimate.service";// storeimport { IEstimate, Estimate } from "@/store/estimates/estimate";+import { CoreRootStore } from "../root.store";type TEstimateLoader = "init-loader" | "mutation-loader" | undefined;type TErrorCodes = {@@ -52,7 +51,7 @@ export class ProjectEstimateStore implements IProjectEstimateStore {estimates: Record<string, IEstimate> = {}; // estimate_id -> estimateerror: TErrorCodes | undefined = undefined;- constructor(private store: RootStore) {+ constructor(private store: CoreRootStore) {makeObservable(this, {// observablesloader: observable.ref,diff --git a/web/core/store/event-tracker.store.ts b/web/core/store/event-tracker.store.tsindex e9c4b0e412..075c79d667 100644--- a/web/core/store/event-tracker.store.ts+++ b/web/core/store/event-tracker.store.ts@@ -14,8 +14,8 @@ import {getWorkspaceEventPayload,getPageEventPayload,} from "@/constants/event-tracker";-// plane web store-import { RootStore } from "@/plane-web/store/root.store";+// store+import { CoreRootStore } from "./root.store";export interface IEventTrackerStore {// properties@@ -39,7 +39,7 @@ export interface IEventTrackerStore {export class EventTrackerStore implements IEventTrackerStore {trackElement: string | undefined = undefined;rootStore;- constructor(_rootStore: RootStore) {+ constructor(_rootStore: CoreRootStore) {makeObservable(this, {// propertiestrackElement: observable,diff --git a/web/core/store/global-view.store.ts b/web/core/store/global-view.store.tsindex bc1574f05d..52d826bb63 100644--- a/web/core/store/global-view.store.ts+++ b/web/core/store/global-view.store.ts@@ -7,10 +7,10 @@ import { computedFn } from "mobx-utils";import { IIssueFilterOptions, IWorkspaceView } from "@plane/types";// constantsimport { EIssueFilterType } from "@/constants/issue";-// plane web store-import { RootStore } from "@/plane-web/store/root.store";// servicesimport { WorkspaceService } from "@/services/workspace.service";+// store+import { CoreRootStore } from "./root.store";export interface IGlobalViewStore {// observables@@ -41,7 +41,7 @@ export class GlobalViewStore implements IGlobalViewStore {// servicesworkspaceService;- constructor(_rootStore: RootStore) {+ constructor(_rootStore: CoreRootStore) {makeObservable(this, {// observablesglobalViewMap: observable,diff --git a/web/core/store/inbox/project-inbox.store.ts b/web/core/store/inbox/project-inbox.store.tsindex 163f59dd1f..73cafcb350 100644--- a/web/core/store/inbox/project-inbox.store.ts+++ b/web/core/store/inbox/project-inbox.store.ts@@ -15,12 +15,11 @@ import {} from "@plane/types";// helpersimport { EInboxIssueCurrentTab, EInboxIssueStatus, EPastDurationFilters, getCustomDates } from "@/helpers/inbox.helper";-// plane web store-import { RootStore } from "@/plane-web/store/root.store";// servicesimport { InboxIssueService } from "@/services/inbox";// root storeimport { IInboxIssueStore, InboxIssueStore } from "@/store/inbox/inbox-issue.store";+import { CoreRootStore } from "../root.store";type TLoader =| "init-loading"@@ -90,7 +89,7 @@ export class ProjectInboxStore implements IProjectInboxStore {// servicesinboxIssueService;- constructor(private store: RootStore) {+ constructor(private store: CoreRootStore) {makeObservable(this, {currentTab: observable.ref,loader: observable.ref,diff --git a/web/core/store/issue/root.store.ts b/web/core/store/issue/root.store.tsindex ae1a241541..232acbba56 100644--- a/web/core/store/issue/root.store.ts+++ b/web/core/store/issue/root.store.ts@@ -1,10 +1,9 @@import isEmpty from "lodash/isEmpty";import { autorun, makeObservable, observable } from "mobx";import { ICycle, IIssueLabel, IModule, IProject, IState, IUserLite } from "@plane/types";-// plane web store-import { RootStore } from "@/plane-web/store/root.store";// root storeimport { IWorkspaceMembership } from "@/store/member/workspace-member.store";+import { CoreRootStore } from "../root.store";import { IStateStore, StateStore } from "../state.store";// issues data storeimport { IArchivedIssuesFilter, ArchivedIssuesFilter, IArchivedIssues, ArchivedIssues } from "./archived";@@ -44,7 +43,7 @@ export interface IIssueRootStore {moduleMap: Record<string, IModule> | undefined;cycleMap: Record<string, ICycle> | undefined;- rootStore: RootStore;+ rootStore: CoreRootStore;issues: IIssueStore;@@ -99,7 +98,7 @@ export class IssueRootStore implements IIssueRootStore {moduleMap: Record<string, IModule> | undefined = undefined;cycleMap: Record<string, ICycle> | undefined = undefined;- rootStore: RootStore;+ rootStore: CoreRootStore;issues: IIssueStore;@@ -134,7 +133,7 @@ export class IssueRootStore implements IIssueRootStore {issueKanBanView: IIssueKanBanViewStore;issueCalendarView: ICalendarStore;- constructor(rootStore: RootStore) {+ constructor(rootStore: CoreRootStore) {makeObservable(this, {workspaceSlug: observable.ref,projectId: observable.ref,diff --git a/web/core/store/label.store.ts b/web/core/store/label.store.tsindex 0a1c71d21d..ebf1cc5684 100644--- a/web/core/store/label.store.ts+++ b/web/core/store/label.store.ts@@ -6,10 +6,10 @@ import { computedFn } from "mobx-utils";import { IIssueLabel, IIssueLabelTree } from "@plane/types";// helpersimport { buildTree } from "@/helpers/array.helper";-// plane web store-import { RootStore } from "@/plane-web/store/root.store";// servicesimport { IssueLabelService } from "@/services/issue";+// store+import { CoreRootStore } from "./root.store";export interface ILabelStore {//Loaders@@ -55,7 +55,7 @@ export class LabelStore implements ILabelStore {// servicesissueLabelService;- constructor(_rootStore: RootStore) {+ constructor(_rootStore: CoreRootStore) {makeObservable(this, {labelMap: observable,fetchedMap: observable,diff --git a/web/core/store/member/index.ts b/web/core/store/member/index.tsindex db4b80a19f..9ab757b0ad 100644--- a/web/core/store/member/index.ts+++ b/web/core/store/member/index.ts@@ -1,8 +1,8 @@import { action, makeObservable, observable } from "mobx";// typesimport { IUserLite } from "@plane/types";-// plane web store-import { RootStore } from "@/plane-web/store/root.store";+// store+import { CoreRootStore } from "../root.store";import { IProjectMemberStore, ProjectMemberStore } from "./project-member.store";import { IWorkspaceMemberStore, WorkspaceMemberStore } from "./workspace-member.store";@@ -23,7 +23,7 @@ export class MemberRootStore implements IMemberRootStore {workspace: IWorkspaceMemberStore;project: IProjectMemberStore;- constructor(_rootStore: RootStore) {+ constructor(_rootStore: CoreRootStore) {makeObservable(this, {// observablesmemberMap: observable,diff --git a/web/core/store/module.store.ts b/web/core/store/module.store.tsindex 81e734dbc9..c966bb7746 100644--- a/web/core/store/module.store.ts+++ b/web/core/store/module.store.ts@@ -8,12 +8,12 @@ import { computedFn } from "mobx-utils";import { IModule, ILinkDetails, TModulePlotType } from "@plane/types";// helpersimport { orderModules, shouldFilterModule } from "@/helpers/module.helper";-// plane web store-import { RootStore } from "@/plane-web/store/root.store";// servicesimport { ModuleService } from "@/services/module.service";import { ModuleArchiveService } from "@/services/module_archive.service";import { ProjectService } from "@/services/project";+// store+import { CoreRootStore } from "./root.store";export interface IModuleStore {//Loaders@@ -85,7 +85,7 @@ export class ModulesStore implements IModuleStore {moduleService;moduleArchiveService;- constructor(_rootStore: RootStore) {+ constructor(_rootStore: CoreRootStore) {makeObservable(this, {// observablesloader: observable.ref,diff --git a/web/core/store/module_filter.store.ts b/web/core/store/module_filter.store.tsindex 9812ef9b1a..5d2b60482e 100644--- a/web/core/store/module_filter.store.ts+++ b/web/core/store/module_filter.store.ts@@ -3,8 +3,8 @@ import { action, computed, observable, makeObservable, runInAction, reaction } fimport { computedFn } from "mobx-utils";// typesimport { TModuleDisplayFilters, TModuleFilters, TModuleFiltersByState } from "@plane/types";-// plane web store-import { RootStore } from "@/plane-web/store/root.store";+// store+import { CoreRootStore } from "./root.store";export interface IModuleFilterStore {// observables@@ -35,9 +35,9 @@ export class ModuleFilterStore implements IModuleFilterStore {searchQuery: string = "";archivedModulesSearchQuery: string = "";// root store- rootStore: RootStore;+ rootStore: CoreRootStore;- constructor(_rootStore: RootStore) {+ constructor(_rootStore: CoreRootStore) {makeObservable(this, {// observablesdisplayFilters: observable,diff --git a/web/core/store/pages/project-page.store.ts b/web/core/store/pages/project-page.store.tsindex fa8c16eab0..b5b76091c0 100644--- a/web/core/store/pages/project-page.store.ts+++ b/web/core/store/pages/project-page.store.ts@@ -6,12 +6,11 @@ import { computedFn } from "mobx-utils";import { TPage, TPageFilters, TPageNavigationTabs } from "@plane/types";// helpersimport { filterPagesByPageType, getPageName, orderPages, shouldFilterPage } from "@/helpers/page.helper";-// plane web store-import { RootStore } from "@/plane-web/store/root.store";// servicesimport { ProjectPageService } from "@/services/page";// storeimport { IPage, Page } from "@/store/pages/page";+import { CoreRootStore } from "../root.store";type TLoader = "init-loader" | "mutation-loader" | undefined;@@ -51,7 +50,7 @@ export class ProjectPageStore implements IProjectPageStore {// serviceservice: ProjectPageService;- constructor(private store: RootStore) {+ constructor(private store: CoreRootStore) {makeObservable(this, {// observablesloader: observable.ref,diff --git a/web/core/store/project-view.store.ts b/web/core/store/project-view.store.tsindex 073032a970..ba7d738b7f 100644--- a/web/core/store/project-view.store.ts+++ b/web/core/store/project-view.store.ts@@ -3,10 +3,10 @@ import { observable, action, makeObservable, runInAction, computed } from "mobx"import { computedFn } from "mobx-utils";// typesimport { IProjectView } from "@plane/types";-// plane web store-import { RootStore } from "@/plane-web/store/root.store";// servicesimport { ViewService } from "@/services/view.service";+// store+import { CoreRootStore } from "./root.store";export interface IProjectViewStore {//Loaders@@ -49,7 +49,7 @@ export class ProjectViewStore implements IProjectViewStore {// servicesviewService;- constructor(_rootStore: RootStore) {+ constructor(_rootStore: CoreRootStore) {makeObservable(this, {// observablesloader: observable.ref,diff --git a/web/core/store/project/index.ts b/web/core/store/project/index.tsindex fe5683b7d7..6425127618 100644--- a/web/core/store/project/index.ts+++ b/web/core/store/project/index.ts@@ -1,5 +1,4 @@-// plane web store-import { RootStore } from "@/plane-web/store/root.store";+import { CoreRootStore } from "../root.store";import { IProjectPublishStore, ProjectPublishStore } from "./project-publish.store";import { IProjectStore, ProjectStore } from "./project.store";import { IProjectFilterStore, ProjectFilterStore } from "./project_filter.store";@@ -15,7 +14,7 @@ export class ProjectRootStore {projectFilter: IProjectFilterStore;publish: IProjectPublishStore;- constructor(_root: RootStore) {+ constructor(_root: CoreRootStore) {this.project = new ProjectStore(_root);this.projectFilter = new ProjectFilterStore(_root);this.publish = new ProjectPublishStore(this);diff --git a/web/core/store/root.store.ts b/web/core/store/root.store.tsindex c24ed1d620..9bdf6d1480 100644--- a/web/core/store/root.store.ts+++ b/web/core/store/root.store.ts@@ -53,9 +53,12 @@ export class CoreRootStore {constructor() {this.router = new RouterStore();+ this.commandPalette = new CommandPaletteStore();+ this.instance = new InstanceStore();+ this.user = new UserStore(this);+ this.theme = new ThemeStore();this.workspaceRoot = new WorkspaceRootStore(this);this.projectRoot = new ProjectRootStore(this);- this.user = new UserStore(this);this.memberRoot = new MemberRootStore(this);this.cycle = new CycleStore(this);this.cycleFilter = new CycleFilterStore(this);@@ -67,15 +70,10 @@ export class CoreRootStore {this.state = new StateStore(this);this.label = new LabelStore(this);this.dashboard = new DashboardStore(this);- this.commandPalette = new CommandPaletteStore();- this.theme = new ThemeStore(this);this.eventTracker = new EventTrackerStore(this);- this.instance = new InstanceStore();this.multipleSelect = new MultipleSelectStore();- // inboxthis.projectInbox = new ProjectInboxStore(this);this.projectPages = new ProjectPageStore(this);- this.theme = new ThemeStore(this);this.projectEstimate = new ProjectEstimateStore(this);}@@ -83,6 +81,10 @@ export class CoreRootStore {// handling the system theme when user logged out from the applocalStorage.setItem("theme", "system");+ this.router = new RouterStore();+ this.commandPalette = new CommandPaletteStore();+ this.instance = new InstanceStore();+ this.user = new UserStore(this);this.workspaceRoot = new WorkspaceRootStore(this);this.projectRoot = new ProjectRootStore(this);this.memberRoot = new MemberRootStore(this);@@ -96,11 +98,7 @@ export class CoreRootStore {this.state = new StateStore(this);this.label = new LabelStore(this);this.dashboard = new DashboardStore(this);- this.router = new RouterStore();- this.commandPalette = new CommandPaletteStore();this.eventTracker = new EventTrackerStore(this);- this.instance = new InstanceStore();- this.user = new UserStore(this);this.projectInbox = new ProjectInboxStore(this);this.projectPages = new ProjectPageStore(this);this.multipleSelect = new MultipleSelectStore();diff --git a/web/core/store/state.store.ts b/web/core/store/state.store.tsindex 985a43fd2d..90f957a4f3 100644--- a/web/core/store/state.store.ts+++ b/web/core/store/state.store.ts@@ -6,10 +6,10 @@ import { computedFn } from "mobx-utils";import { IState } from "@plane/types";// helpersimport { sortStates } from "@/helpers/state.helper";-// plane web store-import { RootStore } from "@/plane-web/store/root.store";// servicesimport { ProjectStateService } from "@/services/project";+// plane web store+import { CoreRootStore } from "./root.store";export interface IStateStore {//Loaders@@ -52,7 +52,7 @@ export class StateStore implements IStateStore {router;stateService;- constructor(_rootStore: RootStore) {+ constructor(_rootStore: CoreRootStore) {makeObservable(this, {// observablesstateMap: observable,diff --git a/web/core/store/theme.store.ts b/web/core/store/theme.store.tsindex 637a179f92..1d0e63eaa3 100644--- a/web/core/store/theme.store.ts+++ b/web/core/store/theme.store.ts@@ -22,7 +22,7 @@ export class ThemeStore implements IThemeStore {workspaceAnalyticsSidebarCollapsed: boolean | undefined = undefined;issueDetailSidebarCollapsed: boolean | undefined = undefined;- constructor(private store: RootStore) {+ constructor() {makeObservable(this, {// observablesidebarCollapsed: observable.ref,diff --git a/web/core/store/user/index.ts b/web/core/store/user/index.tsindex f973f8e64d..80f80ad56e 100644--- a/web/core/store/user/index.ts+++ b/web/core/store/user/index.ts@@ -5,12 +5,11 @@ import { action, makeObservable, observable, runInAction } from "mobx";import { IUser } from "@plane/types";// helpersimport { API_BASE_URL } from "@/helpers/common.helper";-// plane web store-import { RootStore } from "@/plane-web/store/root.store";// servicesimport { AuthService } from "@/services/auth.service";import { UserService } from "@/services/user.service";// stores+import { CoreRootStore } from "@/store/root.store";import { IAccountStore } from "@/store/user/account.store";import { ProfileStore, IUserProfileStore } from "@/store/user/profile.store";import { IUserMembershipStore, UserMembershipStore } from "@/store/user/user-membership.store";@@ -56,7 +55,7 @@ export class UserStore implements IUserStore {userService: UserService;authService: AuthService;- constructor(private store: RootStore) {+ constructor(private store: CoreRootStore) {// storesthis.userProfile = new ProfileStore(store);this.userSettings = new UserSettingsStore();diff --git a/web/core/store/workspace/index.ts b/web/core/store/workspace/index.tsindex 87d61baba8..eba260eaab 100644--- a/web/core/store/workspace/index.ts+++ b/web/core/store/workspace/index.ts@@ -2,10 +2,10 @@ import set from "lodash/set";import { action, computed, observable, makeObservable, runInAction } from "mobx";// typesimport { IWorkspace } from "@plane/types";-// plane web store-import { RootStore } from "@/plane-web/store/root.store";// servicesimport { WorkspaceService } from "@/services/workspace.service";+// store+import { CoreRootStore } from "@/store/root.store";// sub-storesimport { ApiTokenStore, IApiTokenStore } from "./api-token.store";import { IWebhookStore, WebhookStore } from "./webhook.store";@@ -44,7 +44,7 @@ export class WorkspaceRootStore implements IWorkspaceRootStore {webhook: IWebhookStore;apiToken: IApiTokenStore;- constructor(_rootStore: RootStore) {+ constructor(_rootStore: CoreRootStore) {makeObservable(this, {loader: observable.ref,// observables