mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: core root store import fixes
This commit is contained in:
parent
c9147e7a57
commit
78d4d981d1
@ -8,13 +8,13 @@ import { ICycle, CycleDateCheckData, TCyclePlotType } from "@plane/types";
|
|||||||
// helpers
|
// helpers
|
||||||
import { orderCycles, shouldFilterCycle } from "@/helpers/cycle.helper";
|
import { orderCycles, shouldFilterCycle } from "@/helpers/cycle.helper";
|
||||||
import { getDate } from "@/helpers/date-time.helper";
|
import { getDate } from "@/helpers/date-time.helper";
|
||||||
// plane web store
|
|
||||||
import { RootStore } from "@/plane-web/store/root.store";
|
|
||||||
// services
|
// services
|
||||||
import { CycleService } from "@/services/cycle.service";
|
import { CycleService } from "@/services/cycle.service";
|
||||||
import { CycleArchiveService } from "@/services/cycle_archive.service";
|
import { CycleArchiveService } from "@/services/cycle_archive.service";
|
||||||
import { IssueService } from "@/services/issue";
|
import { IssueService } from "@/services/issue";
|
||||||
import { ProjectService } from "@/services/project";
|
import { ProjectService } from "@/services/project";
|
||||||
|
// store
|
||||||
|
import { CoreRootStore } from "./root.store";
|
||||||
|
|
||||||
export interface ICycleStore {
|
export interface ICycleStore {
|
||||||
// loaders
|
// loaders
|
||||||
@ -84,7 +84,7 @@ export class CycleStore implements ICycleStore {
|
|||||||
cycleService;
|
cycleService;
|
||||||
cycleArchiveService;
|
cycleArchiveService;
|
||||||
|
|
||||||
constructor(_rootStore: RootStore) {
|
constructor(_rootStore: CoreRootStore) {
|
||||||
makeObservable(this, {
|
makeObservable(this, {
|
||||||
// observables
|
// observables
|
||||||
loader: observable.ref,
|
loader: observable.ref,
|
||||||
|
@ -3,8 +3,8 @@ import { action, computed, observable, makeObservable, runInAction, reaction } f
|
|||||||
import { computedFn } from "mobx-utils";
|
import { computedFn } from "mobx-utils";
|
||||||
// types
|
// types
|
||||||
import { TCycleDisplayFilters, TCycleFilters, TCycleFiltersByState } from "@plane/types";
|
import { TCycleDisplayFilters, TCycleFilters, TCycleFiltersByState } from "@plane/types";
|
||||||
// plane web store
|
// store
|
||||||
import { RootStore } from "@/plane-web/store/root.store";
|
import { CoreRootStore } from "./root.store";
|
||||||
|
|
||||||
export interface ICycleFilterStore {
|
export interface ICycleFilterStore {
|
||||||
// observables
|
// observables
|
||||||
@ -35,9 +35,9 @@ export class CycleFilterStore implements ICycleFilterStore {
|
|||||||
searchQuery: string = "";
|
searchQuery: string = "";
|
||||||
archivedCyclesSearchQuery: string = "";
|
archivedCyclesSearchQuery: string = "";
|
||||||
// root store
|
// root store
|
||||||
rootStore: RootStore;
|
rootStore: CoreRootStore;
|
||||||
|
|
||||||
constructor(_rootStore: RootStore) {
|
constructor(_rootStore: CoreRootStore) {
|
||||||
makeObservable(this, {
|
makeObservable(this, {
|
||||||
// observables
|
// observables
|
||||||
displayFilters: observable,
|
displayFilters: observable,
|
||||||
|
@ -10,10 +10,10 @@ import {
|
|||||||
TWidgetKeys,
|
TWidgetKeys,
|
||||||
TWidgetStatsRequestParams,
|
TWidgetStatsRequestParams,
|
||||||
} from "@plane/types";
|
} from "@plane/types";
|
||||||
// plane web store
|
|
||||||
import { RootStore } from "@/plane-web/store/root.store";
|
|
||||||
// services
|
// services
|
||||||
import { DashboardService } from "@/services/dashboard.service";
|
import { DashboardService } from "@/services/dashboard.service";
|
||||||
|
// plane web store
|
||||||
|
import { CoreRootStore } from "./root.store";
|
||||||
|
|
||||||
export interface IDashboardStore {
|
export interface IDashboardStore {
|
||||||
// error states
|
// error states
|
||||||
@ -74,7 +74,7 @@ export class DashboardStore implements IDashboardStore {
|
|||||||
// services
|
// services
|
||||||
dashboardService;
|
dashboardService;
|
||||||
|
|
||||||
constructor(_rootStore: RootStore) {
|
constructor(_rootStore: CoreRootStore) {
|
||||||
makeObservable(this, {
|
makeObservable(this, {
|
||||||
// error states
|
// error states
|
||||||
widgetStatsError: observable,
|
widgetStatsError: observable,
|
||||||
|
@ -6,12 +6,11 @@ import { action, computed, makeObservable, observable, runInAction } from "mobx"
|
|||||||
import { computedFn } from "mobx-utils";
|
import { computedFn } from "mobx-utils";
|
||||||
// types
|
// types
|
||||||
import { IEstimate as IEstimateType, IEstimateFormData } from "@plane/types";
|
import { IEstimate as IEstimateType, IEstimateFormData } from "@plane/types";
|
||||||
// plane web store
|
|
||||||
import { RootStore } from "@/plane-web/store/root.store";
|
|
||||||
// services
|
// services
|
||||||
import estimateService from "@/services/project/estimate.service";
|
import estimateService from "@/services/project/estimate.service";
|
||||||
// store
|
// store
|
||||||
import { IEstimate, Estimate } from "@/store/estimates/estimate";
|
import { IEstimate, Estimate } from "@/store/estimates/estimate";
|
||||||
|
import { CoreRootStore } from "../root.store";
|
||||||
|
|
||||||
type TEstimateLoader = "init-loader" | "mutation-loader" | undefined;
|
type TEstimateLoader = "init-loader" | "mutation-loader" | undefined;
|
||||||
type TErrorCodes = {
|
type TErrorCodes = {
|
||||||
@ -52,7 +51,7 @@ export class ProjectEstimateStore implements IProjectEstimateStore {
|
|||||||
estimates: Record<string, IEstimate> = {}; // estimate_id -> estimate
|
estimates: Record<string, IEstimate> = {}; // estimate_id -> estimate
|
||||||
error: TErrorCodes | undefined = undefined;
|
error: TErrorCodes | undefined = undefined;
|
||||||
|
|
||||||
constructor(private store: RootStore) {
|
constructor(private store: CoreRootStore) {
|
||||||
makeObservable(this, {
|
makeObservable(this, {
|
||||||
// observables
|
// observables
|
||||||
loader: observable.ref,
|
loader: observable.ref,
|
||||||
|
@ -14,8 +14,8 @@ import {
|
|||||||
getWorkspaceEventPayload,
|
getWorkspaceEventPayload,
|
||||||
getPageEventPayload,
|
getPageEventPayload,
|
||||||
} from "@/constants/event-tracker";
|
} from "@/constants/event-tracker";
|
||||||
// plane web store
|
// store
|
||||||
import { RootStore } from "@/plane-web/store/root.store";
|
import { CoreRootStore } from "./root.store";
|
||||||
|
|
||||||
export interface IEventTrackerStore {
|
export interface IEventTrackerStore {
|
||||||
// properties
|
// properties
|
||||||
@ -39,7 +39,7 @@ export interface IEventTrackerStore {
|
|||||||
export class EventTrackerStore implements IEventTrackerStore {
|
export class EventTrackerStore implements IEventTrackerStore {
|
||||||
trackElement: string | undefined = undefined;
|
trackElement: string | undefined = undefined;
|
||||||
rootStore;
|
rootStore;
|
||||||
constructor(_rootStore: RootStore) {
|
constructor(_rootStore: CoreRootStore) {
|
||||||
makeObservable(this, {
|
makeObservable(this, {
|
||||||
// properties
|
// properties
|
||||||
trackElement: observable,
|
trackElement: observable,
|
||||||
|
@ -7,10 +7,10 @@ import { computedFn } from "mobx-utils";
|
|||||||
import { IIssueFilterOptions, IWorkspaceView } from "@plane/types";
|
import { IIssueFilterOptions, IWorkspaceView } from "@plane/types";
|
||||||
// constants
|
// constants
|
||||||
import { EIssueFilterType } from "@/constants/issue";
|
import { EIssueFilterType } from "@/constants/issue";
|
||||||
// plane web store
|
|
||||||
import { RootStore } from "@/plane-web/store/root.store";
|
|
||||||
// services
|
// services
|
||||||
import { WorkspaceService } from "@/services/workspace.service";
|
import { WorkspaceService } from "@/services/workspace.service";
|
||||||
|
// store
|
||||||
|
import { CoreRootStore } from "./root.store";
|
||||||
|
|
||||||
export interface IGlobalViewStore {
|
export interface IGlobalViewStore {
|
||||||
// observables
|
// observables
|
||||||
@ -41,7 +41,7 @@ export class GlobalViewStore implements IGlobalViewStore {
|
|||||||
// services
|
// services
|
||||||
workspaceService;
|
workspaceService;
|
||||||
|
|
||||||
constructor(_rootStore: RootStore) {
|
constructor(_rootStore: CoreRootStore) {
|
||||||
makeObservable(this, {
|
makeObservable(this, {
|
||||||
// observables
|
// observables
|
||||||
globalViewMap: observable,
|
globalViewMap: observable,
|
||||||
|
@ -15,12 +15,11 @@ import {
|
|||||||
} from "@plane/types";
|
} from "@plane/types";
|
||||||
// helpers
|
// helpers
|
||||||
import { EInboxIssueCurrentTab, EInboxIssueStatus, EPastDurationFilters, getCustomDates } from "@/helpers/inbox.helper";
|
import { EInboxIssueCurrentTab, EInboxIssueStatus, EPastDurationFilters, getCustomDates } from "@/helpers/inbox.helper";
|
||||||
// plane web store
|
|
||||||
import { RootStore } from "@/plane-web/store/root.store";
|
|
||||||
// services
|
// services
|
||||||
import { InboxIssueService } from "@/services/inbox";
|
import { InboxIssueService } from "@/services/inbox";
|
||||||
// root store
|
// root store
|
||||||
import { IInboxIssueStore, InboxIssueStore } from "@/store/inbox/inbox-issue.store";
|
import { IInboxIssueStore, InboxIssueStore } from "@/store/inbox/inbox-issue.store";
|
||||||
|
import { CoreRootStore } from "../root.store";
|
||||||
|
|
||||||
type TLoader =
|
type TLoader =
|
||||||
| "init-loading"
|
| "init-loading"
|
||||||
@ -90,7 +89,7 @@ export class ProjectInboxStore implements IProjectInboxStore {
|
|||||||
// services
|
// services
|
||||||
inboxIssueService;
|
inboxIssueService;
|
||||||
|
|
||||||
constructor(private store: RootStore) {
|
constructor(private store: CoreRootStore) {
|
||||||
makeObservable(this, {
|
makeObservable(this, {
|
||||||
currentTab: observable.ref,
|
currentTab: observable.ref,
|
||||||
loader: observable.ref,
|
loader: observable.ref,
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
import isEmpty from "lodash/isEmpty";
|
import isEmpty from "lodash/isEmpty";
|
||||||
import { autorun, makeObservable, observable } from "mobx";
|
import { autorun, makeObservable, observable } from "mobx";
|
||||||
import { ICycle, IIssueLabel, IModule, IProject, IState, IUserLite } from "@plane/types";
|
import { ICycle, IIssueLabel, IModule, IProject, IState, IUserLite } from "@plane/types";
|
||||||
// plane web store
|
|
||||||
import { RootStore } from "@/plane-web/store/root.store";
|
|
||||||
// root store
|
// root store
|
||||||
import { IWorkspaceMembership } from "@/store/member/workspace-member.store";
|
import { IWorkspaceMembership } from "@/store/member/workspace-member.store";
|
||||||
|
import { CoreRootStore } from "../root.store";
|
||||||
import { IStateStore, StateStore } from "../state.store";
|
import { IStateStore, StateStore } from "../state.store";
|
||||||
// issues data store
|
// issues data store
|
||||||
import { IArchivedIssuesFilter, ArchivedIssuesFilter, IArchivedIssues, ArchivedIssues } from "./archived";
|
import { IArchivedIssuesFilter, ArchivedIssuesFilter, IArchivedIssues, ArchivedIssues } from "./archived";
|
||||||
@ -44,7 +43,7 @@ export interface IIssueRootStore {
|
|||||||
moduleMap: Record<string, IModule> | undefined;
|
moduleMap: Record<string, IModule> | undefined;
|
||||||
cycleMap: Record<string, ICycle> | undefined;
|
cycleMap: Record<string, ICycle> | undefined;
|
||||||
|
|
||||||
rootStore: RootStore;
|
rootStore: CoreRootStore;
|
||||||
|
|
||||||
issues: IIssueStore;
|
issues: IIssueStore;
|
||||||
|
|
||||||
@ -99,7 +98,7 @@ export class IssueRootStore implements IIssueRootStore {
|
|||||||
moduleMap: Record<string, IModule> | undefined = undefined;
|
moduleMap: Record<string, IModule> | undefined = undefined;
|
||||||
cycleMap: Record<string, ICycle> | undefined = undefined;
|
cycleMap: Record<string, ICycle> | undefined = undefined;
|
||||||
|
|
||||||
rootStore: RootStore;
|
rootStore: CoreRootStore;
|
||||||
|
|
||||||
issues: IIssueStore;
|
issues: IIssueStore;
|
||||||
|
|
||||||
@ -134,7 +133,7 @@ export class IssueRootStore implements IIssueRootStore {
|
|||||||
issueKanBanView: IIssueKanBanViewStore;
|
issueKanBanView: IIssueKanBanViewStore;
|
||||||
issueCalendarView: ICalendarStore;
|
issueCalendarView: ICalendarStore;
|
||||||
|
|
||||||
constructor(rootStore: RootStore) {
|
constructor(rootStore: CoreRootStore) {
|
||||||
makeObservable(this, {
|
makeObservable(this, {
|
||||||
workspaceSlug: observable.ref,
|
workspaceSlug: observable.ref,
|
||||||
projectId: observable.ref,
|
projectId: observable.ref,
|
||||||
|
@ -6,10 +6,10 @@ import { computedFn } from "mobx-utils";
|
|||||||
import { IIssueLabel, IIssueLabelTree } from "@plane/types";
|
import { IIssueLabel, IIssueLabelTree } from "@plane/types";
|
||||||
// helpers
|
// helpers
|
||||||
import { buildTree } from "@/helpers/array.helper";
|
import { buildTree } from "@/helpers/array.helper";
|
||||||
// plane web store
|
|
||||||
import { RootStore } from "@/plane-web/store/root.store";
|
|
||||||
// services
|
// services
|
||||||
import { IssueLabelService } from "@/services/issue";
|
import { IssueLabelService } from "@/services/issue";
|
||||||
|
// store
|
||||||
|
import { CoreRootStore } from "./root.store";
|
||||||
|
|
||||||
export interface ILabelStore {
|
export interface ILabelStore {
|
||||||
//Loaders
|
//Loaders
|
||||||
@ -55,7 +55,7 @@ export class LabelStore implements ILabelStore {
|
|||||||
// services
|
// services
|
||||||
issueLabelService;
|
issueLabelService;
|
||||||
|
|
||||||
constructor(_rootStore: RootStore) {
|
constructor(_rootStore: CoreRootStore) {
|
||||||
makeObservable(this, {
|
makeObservable(this, {
|
||||||
labelMap: observable,
|
labelMap: observable,
|
||||||
fetchedMap: observable,
|
fetchedMap: observable,
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { action, makeObservable, observable } from "mobx";
|
import { action, makeObservable, observable } from "mobx";
|
||||||
// types
|
// types
|
||||||
import { IUserLite } from "@plane/types";
|
import { IUserLite } from "@plane/types";
|
||||||
// plane web store
|
// store
|
||||||
import { RootStore } from "@/plane-web/store/root.store";
|
import { CoreRootStore } from "../root.store";
|
||||||
import { IProjectMemberStore, ProjectMemberStore } from "./project-member.store";
|
import { IProjectMemberStore, ProjectMemberStore } from "./project-member.store";
|
||||||
import { IWorkspaceMemberStore, WorkspaceMemberStore } from "./workspace-member.store";
|
import { IWorkspaceMemberStore, WorkspaceMemberStore } from "./workspace-member.store";
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ export class MemberRootStore implements IMemberRootStore {
|
|||||||
workspace: IWorkspaceMemberStore;
|
workspace: IWorkspaceMemberStore;
|
||||||
project: IProjectMemberStore;
|
project: IProjectMemberStore;
|
||||||
|
|
||||||
constructor(_rootStore: RootStore) {
|
constructor(_rootStore: CoreRootStore) {
|
||||||
makeObservable(this, {
|
makeObservable(this, {
|
||||||
// observables
|
// observables
|
||||||
memberMap: observable,
|
memberMap: observable,
|
||||||
|
@ -8,12 +8,12 @@ import { computedFn } from "mobx-utils";
|
|||||||
import { IModule, ILinkDetails, TModulePlotType } from "@plane/types";
|
import { IModule, ILinkDetails, TModulePlotType } from "@plane/types";
|
||||||
// helpers
|
// helpers
|
||||||
import { orderModules, shouldFilterModule } from "@/helpers/module.helper";
|
import { orderModules, shouldFilterModule } from "@/helpers/module.helper";
|
||||||
// plane web store
|
|
||||||
import { RootStore } from "@/plane-web/store/root.store";
|
|
||||||
// services
|
// services
|
||||||
import { ModuleService } from "@/services/module.service";
|
import { ModuleService } from "@/services/module.service";
|
||||||
import { ModuleArchiveService } from "@/services/module_archive.service";
|
import { ModuleArchiveService } from "@/services/module_archive.service";
|
||||||
import { ProjectService } from "@/services/project";
|
import { ProjectService } from "@/services/project";
|
||||||
|
// store
|
||||||
|
import { CoreRootStore } from "./root.store";
|
||||||
|
|
||||||
export interface IModuleStore {
|
export interface IModuleStore {
|
||||||
//Loaders
|
//Loaders
|
||||||
@ -85,7 +85,7 @@ export class ModulesStore implements IModuleStore {
|
|||||||
moduleService;
|
moduleService;
|
||||||
moduleArchiveService;
|
moduleArchiveService;
|
||||||
|
|
||||||
constructor(_rootStore: RootStore) {
|
constructor(_rootStore: CoreRootStore) {
|
||||||
makeObservable(this, {
|
makeObservable(this, {
|
||||||
// observables
|
// observables
|
||||||
loader: observable.ref,
|
loader: observable.ref,
|
||||||
|
@ -3,8 +3,8 @@ import { action, computed, observable, makeObservable, runInAction, reaction } f
|
|||||||
import { computedFn } from "mobx-utils";
|
import { computedFn } from "mobx-utils";
|
||||||
// types
|
// types
|
||||||
import { TModuleDisplayFilters, TModuleFilters, TModuleFiltersByState } from "@plane/types";
|
import { TModuleDisplayFilters, TModuleFilters, TModuleFiltersByState } from "@plane/types";
|
||||||
// plane web store
|
// store
|
||||||
import { RootStore } from "@/plane-web/store/root.store";
|
import { CoreRootStore } from "./root.store";
|
||||||
|
|
||||||
export interface IModuleFilterStore {
|
export interface IModuleFilterStore {
|
||||||
// observables
|
// observables
|
||||||
@ -35,9 +35,9 @@ export class ModuleFilterStore implements IModuleFilterStore {
|
|||||||
searchQuery: string = "";
|
searchQuery: string = "";
|
||||||
archivedModulesSearchQuery: string = "";
|
archivedModulesSearchQuery: string = "";
|
||||||
// root store
|
// root store
|
||||||
rootStore: RootStore;
|
rootStore: CoreRootStore;
|
||||||
|
|
||||||
constructor(_rootStore: RootStore) {
|
constructor(_rootStore: CoreRootStore) {
|
||||||
makeObservable(this, {
|
makeObservable(this, {
|
||||||
// observables
|
// observables
|
||||||
displayFilters: observable,
|
displayFilters: observable,
|
||||||
|
@ -6,12 +6,11 @@ import { computedFn } from "mobx-utils";
|
|||||||
import { TPage, TPageFilters, TPageNavigationTabs } from "@plane/types";
|
import { TPage, TPageFilters, TPageNavigationTabs } from "@plane/types";
|
||||||
// helpers
|
// helpers
|
||||||
import { filterPagesByPageType, getPageName, orderPages, shouldFilterPage } from "@/helpers/page.helper";
|
import { filterPagesByPageType, getPageName, orderPages, shouldFilterPage } from "@/helpers/page.helper";
|
||||||
// plane web store
|
|
||||||
import { RootStore } from "@/plane-web/store/root.store";
|
|
||||||
// services
|
// services
|
||||||
import { ProjectPageService } from "@/services/page";
|
import { ProjectPageService } from "@/services/page";
|
||||||
// store
|
// store
|
||||||
import { IPage, Page } from "@/store/pages/page";
|
import { IPage, Page } from "@/store/pages/page";
|
||||||
|
import { CoreRootStore } from "../root.store";
|
||||||
|
|
||||||
type TLoader = "init-loader" | "mutation-loader" | undefined;
|
type TLoader = "init-loader" | "mutation-loader" | undefined;
|
||||||
|
|
||||||
@ -51,7 +50,7 @@ export class ProjectPageStore implements IProjectPageStore {
|
|||||||
// service
|
// service
|
||||||
service: ProjectPageService;
|
service: ProjectPageService;
|
||||||
|
|
||||||
constructor(private store: RootStore) {
|
constructor(private store: CoreRootStore) {
|
||||||
makeObservable(this, {
|
makeObservable(this, {
|
||||||
// observables
|
// observables
|
||||||
loader: observable.ref,
|
loader: observable.ref,
|
||||||
|
@ -3,10 +3,10 @@ import { observable, action, makeObservable, runInAction, computed } from "mobx"
|
|||||||
import { computedFn } from "mobx-utils";
|
import { computedFn } from "mobx-utils";
|
||||||
// types
|
// types
|
||||||
import { IProjectView } from "@plane/types";
|
import { IProjectView } from "@plane/types";
|
||||||
// plane web store
|
|
||||||
import { RootStore } from "@/plane-web/store/root.store";
|
|
||||||
// services
|
// services
|
||||||
import { ViewService } from "@/services/view.service";
|
import { ViewService } from "@/services/view.service";
|
||||||
|
// store
|
||||||
|
import { CoreRootStore } from "./root.store";
|
||||||
|
|
||||||
export interface IProjectViewStore {
|
export interface IProjectViewStore {
|
||||||
//Loaders
|
//Loaders
|
||||||
@ -49,7 +49,7 @@ export class ProjectViewStore implements IProjectViewStore {
|
|||||||
// services
|
// services
|
||||||
viewService;
|
viewService;
|
||||||
|
|
||||||
constructor(_rootStore: RootStore) {
|
constructor(_rootStore: CoreRootStore) {
|
||||||
makeObservable(this, {
|
makeObservable(this, {
|
||||||
// observables
|
// observables
|
||||||
loader: observable.ref,
|
loader: observable.ref,
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
// plane web store
|
import { CoreRootStore } from "../root.store";
|
||||||
import { RootStore } from "@/plane-web/store/root.store";
|
|
||||||
import { IProjectPublishStore, ProjectPublishStore } from "./project-publish.store";
|
import { IProjectPublishStore, ProjectPublishStore } from "./project-publish.store";
|
||||||
import { IProjectStore, ProjectStore } from "./project.store";
|
import { IProjectStore, ProjectStore } from "./project.store";
|
||||||
import { IProjectFilterStore, ProjectFilterStore } from "./project_filter.store";
|
import { IProjectFilterStore, ProjectFilterStore } from "./project_filter.store";
|
||||||
@ -15,7 +14,7 @@ export class ProjectRootStore {
|
|||||||
projectFilter: IProjectFilterStore;
|
projectFilter: IProjectFilterStore;
|
||||||
publish: IProjectPublishStore;
|
publish: IProjectPublishStore;
|
||||||
|
|
||||||
constructor(_root: RootStore) {
|
constructor(_root: CoreRootStore) {
|
||||||
this.project = new ProjectStore(_root);
|
this.project = new ProjectStore(_root);
|
||||||
this.projectFilter = new ProjectFilterStore(_root);
|
this.projectFilter = new ProjectFilterStore(_root);
|
||||||
this.publish = new ProjectPublishStore(this);
|
this.publish = new ProjectPublishStore(this);
|
||||||
|
@ -53,9 +53,12 @@ export class CoreRootStore {
|
|||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.router = new RouterStore();
|
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.workspaceRoot = new WorkspaceRootStore(this);
|
||||||
this.projectRoot = new ProjectRootStore(this);
|
this.projectRoot = new ProjectRootStore(this);
|
||||||
this.user = new UserStore(this);
|
|
||||||
this.memberRoot = new MemberRootStore(this);
|
this.memberRoot = new MemberRootStore(this);
|
||||||
this.cycle = new CycleStore(this);
|
this.cycle = new CycleStore(this);
|
||||||
this.cycleFilter = new CycleFilterStore(this);
|
this.cycleFilter = new CycleFilterStore(this);
|
||||||
@ -67,15 +70,10 @@ export class CoreRootStore {
|
|||||||
this.state = new StateStore(this);
|
this.state = new StateStore(this);
|
||||||
this.label = new LabelStore(this);
|
this.label = new LabelStore(this);
|
||||||
this.dashboard = new DashboardStore(this);
|
this.dashboard = new DashboardStore(this);
|
||||||
this.commandPalette = new CommandPaletteStore();
|
|
||||||
this.theme = new ThemeStore(this);
|
|
||||||
this.eventTracker = new EventTrackerStore(this);
|
this.eventTracker = new EventTrackerStore(this);
|
||||||
this.instance = new InstanceStore();
|
|
||||||
this.multipleSelect = new MultipleSelectStore();
|
this.multipleSelect = new MultipleSelectStore();
|
||||||
// inbox
|
|
||||||
this.projectInbox = new ProjectInboxStore(this);
|
this.projectInbox = new ProjectInboxStore(this);
|
||||||
this.projectPages = new ProjectPageStore(this);
|
this.projectPages = new ProjectPageStore(this);
|
||||||
this.theme = new ThemeStore(this);
|
|
||||||
this.projectEstimate = new ProjectEstimateStore(this);
|
this.projectEstimate = new ProjectEstimateStore(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,6 +81,10 @@ export class CoreRootStore {
|
|||||||
// handling the system theme when user logged out from the app
|
// handling the system theme when user logged out from the app
|
||||||
localStorage.setItem("theme", "system");
|
localStorage.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.workspaceRoot = new WorkspaceRootStore(this);
|
||||||
this.projectRoot = new ProjectRootStore(this);
|
this.projectRoot = new ProjectRootStore(this);
|
||||||
this.memberRoot = new MemberRootStore(this);
|
this.memberRoot = new MemberRootStore(this);
|
||||||
@ -96,11 +98,7 @@ export class CoreRootStore {
|
|||||||
this.state = new StateStore(this);
|
this.state = new StateStore(this);
|
||||||
this.label = new LabelStore(this);
|
this.label = new LabelStore(this);
|
||||||
this.dashboard = new DashboardStore(this);
|
this.dashboard = new DashboardStore(this);
|
||||||
this.router = new RouterStore();
|
|
||||||
this.commandPalette = new CommandPaletteStore();
|
|
||||||
this.eventTracker = new EventTrackerStore(this);
|
this.eventTracker = new EventTrackerStore(this);
|
||||||
this.instance = new InstanceStore();
|
|
||||||
this.user = new UserStore(this);
|
|
||||||
this.projectInbox = new ProjectInboxStore(this);
|
this.projectInbox = new ProjectInboxStore(this);
|
||||||
this.projectPages = new ProjectPageStore(this);
|
this.projectPages = new ProjectPageStore(this);
|
||||||
this.multipleSelect = new MultipleSelectStore();
|
this.multipleSelect = new MultipleSelectStore();
|
||||||
|
@ -6,10 +6,10 @@ import { computedFn } from "mobx-utils";
|
|||||||
import { IState } from "@plane/types";
|
import { IState } from "@plane/types";
|
||||||
// helpers
|
// helpers
|
||||||
import { sortStates } from "@/helpers/state.helper";
|
import { sortStates } from "@/helpers/state.helper";
|
||||||
// plane web store
|
|
||||||
import { RootStore } from "@/plane-web/store/root.store";
|
|
||||||
// services
|
// services
|
||||||
import { ProjectStateService } from "@/services/project";
|
import { ProjectStateService } from "@/services/project";
|
||||||
|
// plane web store
|
||||||
|
import { CoreRootStore } from "./root.store";
|
||||||
|
|
||||||
export interface IStateStore {
|
export interface IStateStore {
|
||||||
//Loaders
|
//Loaders
|
||||||
@ -52,7 +52,7 @@ export class StateStore implements IStateStore {
|
|||||||
router;
|
router;
|
||||||
stateService;
|
stateService;
|
||||||
|
|
||||||
constructor(_rootStore: RootStore) {
|
constructor(_rootStore: CoreRootStore) {
|
||||||
makeObservable(this, {
|
makeObservable(this, {
|
||||||
// observables
|
// observables
|
||||||
stateMap: observable,
|
stateMap: observable,
|
||||||
|
@ -22,7 +22,7 @@ export class ThemeStore implements IThemeStore {
|
|||||||
workspaceAnalyticsSidebarCollapsed: boolean | undefined = undefined;
|
workspaceAnalyticsSidebarCollapsed: boolean | undefined = undefined;
|
||||||
issueDetailSidebarCollapsed: boolean | undefined = undefined;
|
issueDetailSidebarCollapsed: boolean | undefined = undefined;
|
||||||
|
|
||||||
constructor(private store: RootStore) {
|
constructor() {
|
||||||
makeObservable(this, {
|
makeObservable(this, {
|
||||||
// observable
|
// observable
|
||||||
sidebarCollapsed: observable.ref,
|
sidebarCollapsed: observable.ref,
|
||||||
|
@ -5,12 +5,11 @@ import { action, makeObservable, observable, runInAction } from "mobx";
|
|||||||
import { IUser } from "@plane/types";
|
import { IUser } from "@plane/types";
|
||||||
// helpers
|
// helpers
|
||||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||||
// plane web store
|
|
||||||
import { RootStore } from "@/plane-web/store/root.store";
|
|
||||||
// services
|
// services
|
||||||
import { AuthService } from "@/services/auth.service";
|
import { AuthService } from "@/services/auth.service";
|
||||||
import { UserService } from "@/services/user.service";
|
import { UserService } from "@/services/user.service";
|
||||||
// stores
|
// stores
|
||||||
|
import { CoreRootStore } from "@/store/root.store";
|
||||||
import { IAccountStore } from "@/store/user/account.store";
|
import { IAccountStore } from "@/store/user/account.store";
|
||||||
import { ProfileStore, IUserProfileStore } from "@/store/user/profile.store";
|
import { ProfileStore, IUserProfileStore } from "@/store/user/profile.store";
|
||||||
import { IUserMembershipStore, UserMembershipStore } from "@/store/user/user-membership.store";
|
import { IUserMembershipStore, UserMembershipStore } from "@/store/user/user-membership.store";
|
||||||
@ -56,7 +55,7 @@ export class UserStore implements IUserStore {
|
|||||||
userService: UserService;
|
userService: UserService;
|
||||||
authService: AuthService;
|
authService: AuthService;
|
||||||
|
|
||||||
constructor(private store: RootStore) {
|
constructor(private store: CoreRootStore) {
|
||||||
// stores
|
// stores
|
||||||
this.userProfile = new ProfileStore(store);
|
this.userProfile = new ProfileStore(store);
|
||||||
this.userSettings = new UserSettingsStore();
|
this.userSettings = new UserSettingsStore();
|
||||||
|
@ -2,10 +2,10 @@ import set from "lodash/set";
|
|||||||
import { action, computed, observable, makeObservable, runInAction } from "mobx";
|
import { action, computed, observable, makeObservable, runInAction } from "mobx";
|
||||||
// types
|
// types
|
||||||
import { IWorkspace } from "@plane/types";
|
import { IWorkspace } from "@plane/types";
|
||||||
// plane web store
|
|
||||||
import { RootStore } from "@/plane-web/store/root.store";
|
|
||||||
// services
|
// services
|
||||||
import { WorkspaceService } from "@/services/workspace.service";
|
import { WorkspaceService } from "@/services/workspace.service";
|
||||||
|
// store
|
||||||
|
import { CoreRootStore } from "@/store/root.store";
|
||||||
// sub-stores
|
// sub-stores
|
||||||
import { ApiTokenStore, IApiTokenStore } from "./api-token.store";
|
import { ApiTokenStore, IApiTokenStore } from "./api-token.store";
|
||||||
import { IWebhookStore, WebhookStore } from "./webhook.store";
|
import { IWebhookStore, WebhookStore } from "./webhook.store";
|
||||||
@ -44,7 +44,7 @@ export class WorkspaceRootStore implements IWorkspaceRootStore {
|
|||||||
webhook: IWebhookStore;
|
webhook: IWebhookStore;
|
||||||
apiToken: IApiTokenStore;
|
apiToken: IApiTokenStore;
|
||||||
|
|
||||||
constructor(_rootStore: RootStore) {
|
constructor(_rootStore: CoreRootStore) {
|
||||||
makeObservable(this, {
|
makeObservable(this, {
|
||||||
loader: observable.ref,
|
loader: observable.ref,
|
||||||
// observables
|
// observables
|
||||||
|
Loading…
Reference in New Issue
Block a user